forked from Stock-control-supervisors/awesome-go
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stock control supervisors Signed-off-by: Romeo Rosete <110788242+bombastictranz@users.noreply.github.com>
- Loading branch information
1 parent
daa922f
commit b6a96ee
Showing
1 changed file
with
1 addition
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9124],{34882:function(e,t,n){n.d(t,{A:function(){return FloatingMenu}});var r=n(95235),o=n(28165);n(2784);var i=n(3e3),a=n(99029),l=n(60943),c=n(15504),s=n(52903);function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){(0,r.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var u={name:"10s5uz4-FloatingMenu--EmptyList",styles:"position:absolute;label:FloatingMenu--EmptyList;"},EmptyList=function(e){var t=e.children;return(0,s.tZ)("div",{css:u,children:t})},listStyle=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return(0,o.iv)("max-height:",((e||0)+.5)*40-10,"px;overflow:auto;padding:10px;;label:FloatingMenu--listStyle;")},d={name:"8itggg-FloatingMenu--loadMoreStyle",styles:"align-items:flex-end;height:60px;label:FloatingMenu--loadMoreStyle;"},p=(0,o.iv)(i.ZT.paragraph3Medium," border-radius:3px;color:",a.w.neutral700,";cursor:pointer;;label:FloatingMenu--menuItem;"),b=(0,o.iv)("align-items:center;display:flex;height:",40,"px;padding:0 10px;& svg{fill:",a.w.neutral600,"!important;};label:FloatingMenu--menuItemDefaultStyle;"),g=(0,o.iv)(i.ZT.paragraph3Medium," color:",a.w.neutral500,";;label:FloatingMenu--menuItemDisabled;"),m=(0,o.iv)(i.ZT.paragraph3Medium," background-color:",a.w.blue10,";color:",a.w.blue,";font-weight:500;;label:FloatingMenu--menuItemHighlighted;"),h=(0,o.iv)("& svg{fill:",a.w.blue,"!important;};label:FloatingMenu--menuItemHighlightedDefault;"),f={name:"197pzti-FloatingMenu--menuItemIcon",styles:"display:flex;align-items:center;justify-content:center;margin-right:10px;label:FloatingMenu--menuItemIcon;"},y={name:"1l45eg0-FloatingMenu--menuItemText",styles:"flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;label:FloatingMenu--menuItemText;"};function ChildItem(e){var t=e.getLabelForItem,n=e.index,r=e.isHighlighted,o=e.item,i=e.renderIcon,a=e.renderMenuItem;return a?(0,s.tZ)(s.HY,{children:a({index:n,isHighlighted:r,item:o})}):(0,s.BX)(s.HY,{children:[i&&(0,s.tZ)("span",{css:f,children:i(o,t)}),(0,s.tZ)("span",{css:y,children:t(o)})]})}function FloatingMenu(e){var t=_objectSpread({align:"stretch",visibleItems:5},e),n=t.align,r=t.ariaLabel,i=t.getItemProps,a=t.getKeyForItem,u=t.getLabelForItem,f=t.getMenuProps,y=t.highlightedIndex,I=t.isLoadingMore,O=t.isOpen,j=t.items,v=t.maxWidth,w=t.minWidth,S=t.onLoadMore,P=t.showLoadMore,M=O&&j.length>0,F=_objectSpread(_objectSpread({},i({disabled:!1,index:j.length,item:null})),{},{onClick:void 0}),x=f({"aria-label":r}),L=(0,s.BX)("ul",_objectSpread(_objectSpread({"aria-hidden":!O,css:[listStyle(t.visibleItems),";label:FloatingMenu--list;"]},x),{},{"aria-labelledby":void 0,role:j.length>0?x.role:void 0,children:[(M?j:[]).map(function(e,n){var r=_objectSpread({},i({disabled:e.disabled,index:n,item:e})),l=y===n,c=t.renderMenuItem?void 0:[b,l&&h];return(0,o.az)("li",_objectSpread(_objectSpread({},r),{},{css:[p,e.disabled&&g,l&&m,c,";label:FloatingMenu--list;"],key:a?a(e):n}),(0,s.tZ)(ChildItem,{getLabelForItem:u,index:n,isHighlighted:l,item:e,renderIcon:t.renderIcon,renderMenuItem:t.renderMenuItem}))}),M&&(I||void 0!==P&&P)&&(0,o.az)("li",_objectSpread(_objectSpread({},F),{},{css:[p,d,";label:FloatingMenu--list;"],key:"Load more"}),(0,s.tZ)(l.W,{isLoading:!!I,onClick:S,size:"small",children:"Load more"}))]})),_=M?c.f:EmptyList;return(0,s.tZ)(_,{align:n,maxWidth:v,minWidth:w,children:L})}},23131:function(e,t,n){n.d(t,{p:function(){return Typeahead}});var r=n(95235),o=n(35196),i=n(2784),a=n(34882),l=n(21501),c=n(52903);function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){(0,r.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var s={name:"mg4rdd-Typeahead--rootStyles",styles:"position:relative;label:Typeahead--rootStyles;"};function Typeahead(e){var t,n,r=e.id,u=e.onChange,d=e.items,p=e.inputId,b=e.onInputValueChange,g=(0,i.useCallback)(function(t){return t?e.getLabelForItem(t):""},[e]),m=(0,i.useCallback)(function(t,n){var r=n.type,i=n.changes;switch(r){case o.Kb.stateChangeTypes.ItemClick:return _objectSpread(_objectSpread({},i),{},{isOpen:!1,inputValue:""});case o.Kb.stateChangeTypes.InputBlur:if(e.keepInputValueOnBlur)return _objectSpread(_objectSpread({},i),{},{inputValue:t.inputValue});return i;default:return i}},[e]),h=(0,i.useCallback)(function(e){u(e.selectedItem)},[u]),f=(0,o.Kb)({inputId:p,inputValue:e.inputValue,items:d,itemToString:g,id:r,onSelectedItemChange:h,onInputValueChange:b,selectedItem:e.selectedItem,stateReducer:m}),y=f.getInputProps,I=f.getItemProps,O=f.getMenuProps,j=f.getComboboxProps,v=f.highlightedIndex,w=f.isOpen,S=f.openMenu,P=f.selectedItem,M=f.inputValue,F=f.reset,x=e.showErrorOnNoResults&&P&&0===d.length||e.isErrored,L=e.labelId||void 0;return(0,c.BX)("div",_objectSpread(_objectSpread({css:s},j()),{},{children:[(0,c.tZ)(l.R,{ariaLabel:e.ariaLabel,ariaLabelledBy:L,autoComplete:e.autoComplete,clearSelection:F,disabledText:e.disabledText,getInputProps:y,getLabelForItem:e.getLabelForItem,iconEndName:e.iconEndName,inputValue:M,isBusy:e.isBusy,isDisabled:e.isDisabled,isErrored:!!x,onFocus:e.openOnFocus?S:void 0,placeholder:e.placeholder,renderIcon:e.renderIcon,renderIconAfter:e.renderIconAfter,selectedItem:P,size:e.size}),(t=_objectSpread(_objectSpread({},e.floatingMenuProps),{},{ariaLabel:e.menuAriaLabel,getItemProps:I,getKeyForItem:e.getKeyForItem,getLabelForItem:e.getLabelForItem,getMenuProps:O,highlightedIndex:v,isLoadingMore:e.isLoadingMore,isOpen:w,items:d,onLoadMore:e.onLoadMore,renderIcon:e.renderIcon,showLoadMore:e.showLoadMore}),(null===(n=e.renderFloatingMenu)||void 0===n?void 0:n.call(e,t))||(0,c.tZ)(a.A,_objectSpread({},t)))]}))}Typeahead.defaultProps={isDisabled:!1,openOnFocus:!1,renderFloatingMenu:function(e){return(0,c.tZ)(a.A,_objectSpread({},e))},showEmptyList:!1,showErrorOnNoResults:!1}},21501:function(e,t,n){n.d(t,{R:function(){return TypeaheadInput}});var r=n(95235),o=n(82269);n(2784);var i=n(23273),a=n(42126),l=n(22211),c=n(39479),s=n(44546),u=n(52903),d=["ref"];function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){(0,r.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var p=(0,c.B)("TypeaheadInput",{clearSelectionButton:{alignItems:"center",background:"transparent",border:"none",cursor:"pointer",display:"flex",height:"100%",justifyContent:"center",outline:"none",width:"100%"}}),ClearSelectionButton=function(e){var t=e.clearSelection;return(0,u.tZ)("button",{css:p.clearSelectionButton,onClick:t,title:"Clear Selection",type:"button",children:(0,u.tZ)(i.J,{canAcceptPointerEvents:!1,name:"x",size:20})})},InputIcon=function(e){return e.renderIcon?e.renderIcon(e.selectedItem,e.getLabelForItem,e.isFocused,e.iconSize):(0,u.tZ)(i.J,{name:"magnifyingGlass",size:e.iconSize})},TypeaheadInput=function(e){var t=e.selectedItem&&!e.isDisabled,n=e.getInputProps({"aria-labelledby":e.ariaLabelledBy,autoComplete:e.autoComplete,onFocus:e.onFocus}),r=n.ref,c=(0,o.Z)(n,d),p=(0,s.a)();return(0,u.BX)(u.HY,{children:[(0,u.tZ)("div",{ref:r}),(0,u.tZ)(a.o,_objectSpread(_objectSpread({},c),{},{ariaLabel:e.ariaLabel,autoComplete:"off",canClickIconAfter:!!e.renderIconAfter||t,disabledText:e.disabledText,isDisabled:e.isDisabled,isErrored:e.isErrored,placeholder:e.placeholder,renderIconAfter:function(n){var r=n.iconSize,o=n.isFocused,a=n.isHovered;return e.renderIconAfter?e.renderIconAfter():t?(0,u.tZ)(ClearSelectionButton,{clearSelection:function(t){t.currentTarget&&t.currentTarget.blur(),e.clearSelection()},isFocused:o,isHovered:a}):e.iconEndName&&(0,u.tZ)(i.J,{name:e.iconEndName,size:r})},renderIconBefore:function(t){var n=t.iconSize,r=t.isFocused;return p?e.isBusy?(0,u.tZ)("span",{style:{width:n},children:(0,u.tZ)(l.$,{})}):(0,u.tZ)(InputIcon,_objectSpread(_objectSpread({},e),{},{iconSize:n,isFocused:r})):null},size:e.size}))]})};TypeaheadInput.defaultProps={size:"small"}},11606:function(e,t,n){n.d(t,{t:function(){return useSize}});var r=n(95235),o=n(87865),i={desktop:"(min-width: 885px)",tablet:"(min-width: 660px) and (max-width: 885px)"},a={desktop:"(min-width: 1024px)",tablet:"(min-width: 660px) and (max-width: 1023px)"};function useSize(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.isEmbed,l=void 0!==n&&n?i:a;return(0,o.Oh)((e={all:{size:"small"}},(0,r.Z)(e,l.tablet,{size:"medium"}),(0,r.Z)(e,l.desktop,{size:"large"}),e)).size}},33252:function(e,t,n){n.d(t,{T:function(){return useSwrQuery}});var r=n(95235),o=n(40794);function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){(0,r.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function useSwrQuery(e,t){var n=(0,o.a)(e,t),r=!0;if(n.loading)try{var i=n.client.readQuery({query:e,variables:n.variables});r=null!=i}catch(e){r=!1}return _objectSpread(_objectSpread({},n),{},{loading:!r,usingCache:r&&n.loading})}}}]); |