@feathery/react 2.6.1 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DropdownMultiField.930fcc2dddfa0d43e750.js +1 -0
- package/dist/Form/index.d.ts.map +1 -1
- package/dist/elements/fields/DropdownMultiField/index.d.ts.map +1 -1
- package/dist/elements/fields/DropdownMultiField/tests/test-utils.d.ts +0 -1
- package/dist/elements/fields/DropdownMultiField/tests/test-utils.d.ts.map +1 -1
- package/dist/elements/fields/DropdownMultiField/useCollapsedSelectionManager.d.ts +1 -2
- package/dist/elements/fields/DropdownMultiField/useCollapsedSelectionManager.d.ts.map +1 -1
- package/dist/elements/fields/DropdownMultiField/useDropdownInteractions.d.ts +2 -5
- package/dist/elements/fields/DropdownMultiField/useDropdownInteractions.d.ts.map +1 -1
- package/dist/elements/fields/DropdownMultiField/useDropdownOptions.d.ts +2 -7
- package/dist/elements/fields/DropdownMultiField/useDropdownOptions.d.ts.map +1 -1
- package/dist/elements/fields/DropdownMultiField/useSelectProps.d.ts +2 -2
- package/dist/elements/fields/DropdownMultiField/useSelectProps.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/utils/featheryClient/index.d.ts +2 -1
- package/dist/utils/featheryClient/index.d.ts.map +1 -1
- package/dist/utils/formHelperFunctions.d.ts.map +1 -1
- package/dist/utils/init.d.ts +2 -1
- package/dist/utils/init.d.ts.map +1 -1
- package/dist/utils/offlineRequestHandler.d.ts +26 -2
- package/dist/utils/offlineRequestHandler.d.ts.map +1 -1
- package/dist/utils/validation.d.ts.map +1 -1
- package/package.json +1 -1
- package/umd/DropdownMultiField.898572b300ad673a38c9.js +1 -0
- package/umd/index.js +1 -1
- package/dist/DropdownMultiField.34b18a5cc0cec9d6a39d.js +0 -1
- package/dist/elements/fields/DropdownMultiField/useSelectionOrdering.d.ts +0 -13
- package/dist/elements/fields/DropdownMultiField/useSelectionOrdering.d.ts.map +0 -1
- package/umd/DropdownMultiField.224b8de8619f6c12661d.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[599],{9069:(e,n,t)=>{t.d(n,{Z:()=>l});var o=t(5193),r=function(){return r=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},r.apply(this,arguments)};function l(e){var n,t,l,a=e.value,i=e.element,u=e.responsiveStyles,s=e.type,c=void 0===s?"input":s,p=e.inputFocused,d=void 0!==p&&p,f=e.repeatIndex,v=void 0===f?null:f,h=i.properties,y=null!==(l=(null!==(t=h.repeat_placeholder)&&void 0!==t?t:[])[null!=v?v:0])&&void 0!==l?l:h.placeholder||"",g=r(r({},u.getTarget("placeholderFocus")),u.getTarget("placeholderActive"));return(0,o.jsx)("span",r({css:r(r(r(r({position:"absolute",pointerEvents:"none",insetInlineStart:"0.75rem",transition:"0.2s ease all",top:"input"===c?"50%":"0.6rem"},u.getTarget("placeholder")),a?u.getTarget("placeholderFocus"):{}),d?g:{}),(n={},n["".concat(c,":focus ~ &")]=g,n))},{children:y}))}},6548:(e,n,t)=>{t.r(n),t.d(n,{default:()=>F});var o=t(5193),r=t(8156),l=t(6867),a=t(1587),i=t(1275),u=t(9069),s=t(5406),c=t(1929),p=t.n(c),d=t(7449),f=t(8776),v=t(2988),h=function(){return h=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},h.apply(this,arguments)},y=function(e){var n=e.children,t=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]])}return t}(e,["children"]),l=c.components.Option,a=(0,r.useRef)(null),i=function(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var o,r,l=t.call(e),a=[];try{for(;(void 0===n||n-- >0)&&!(o=l.next()).done;)a.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(t=l.return)&&t.call(l)}finally{if(r)throw r.error}}return a}((0,r.useState)(!1),2),u=i[0],s=i[1],p=t.selectProps.containerRef;return(0,o.jsxs)("div",h({ref:a,onMouseEnter:function(){return s(!0)},onMouseLeave:function(){return s(!1)}},{children:[(0,o.jsx)(l,h({},t,{children:n})),t.data.tooltip&&a.current&&(0,o.jsx)(d.Z,h({targetRef:a,containerRef:p,show:u,placement:"right"},{children:(0,o.jsx)(f.u,h({id:"tooltip-".concat(t.data.value),css:{zIndex:v.rM+1,padding:".4rem 0",transition:"opacity .10s linear",".tooltip-inner":{maxWidth:"200px",padding:".25rem .5rem",color:"#fff",textAlign:"center",backgroundColor:"#000",borderRadius:".25rem",fontSize:"smaller"}}},{children:t.data.tooltip}))}))]}))},g=c.components.MultiValueRemove,m=function(e){var n=e.selectProps;if(!n.collapseSelected)return(0,o.jsx)(g,h({},e));var t=h(h({},e.innerProps),{onMouseDown:function(t){var o,r,l;null===(o=n.onMultiValueRemovePointer)||void 0===o||o.call(n),t.preventDefault(),t.stopPropagation(),null===(l=null===(r=e.innerProps)||void 0===r?void 0:r.onMouseDown)||void 0===l||l.call(r,t)},onPointerDown:function(t){var o,r,l;null===(o=n.onMultiValueRemovePointer)||void 0===o||o.call(n),"touch"===t.pointerType&&t.preventDefault(),t.stopPropagation(),null===(l=null===(r=e.innerProps)||void 0===r?void 0:r.onPointerDown)||void 0===l||l.call(r,t)},"data-feathery-multi-value-remove":"true"});return(0,o.jsx)(g,h({},e,{innerProps:t}))},b=function(e){var n=c.components.Control,t=e.selectProps.onControlPress,r=function(e,n){return!!(null==t?void 0:t(e,{isTouch:n}))&&(e.preventDefault(),e.stopPropagation(),!0)};return(0,o.jsx)(n,h({},e,{innerProps:h(h({},e.innerProps),{onPointerDown:function(n){var t,o;r(n,"touch"===n.pointerType)||null===(o=null===(t=e.innerProps)||void 0===t?void 0:t.onPointerDown)||void 0===o||o.call(t,n)},onMouseDown:function(n){var t,o;r(n,!1)||null===(o=null===(t=e.innerProps)||void 0===t?void 0:t.onMouseDown)||void 0===o||o.call(t,n)},onTouchStart:function(n){var t,o;r(n,!0)||null===(o=null===(t=e.innerProps)||void 0===t?void 0:t.onTouchStart)||void 0===o||o.call(t,n)}})}))},C=function(e){var n=e.collapsedCount,t=e.onPress;return n>0?(0,o.jsxs)("span",h({"aria-hidden":"true",className:"rs-collapsed-chip","data-feathery-collapsed-indicator":"true",onPointerDown:function(e){t&&("touch"===e.pointerType&&e.preventDefault(),e.stopPropagation(),t(e))},onMouseDown:function(e){t&&(e.preventDefault(),e.stopPropagation(),t(e))},onTouchStart:function(e){t&&(e.stopPropagation(),t(e))},onClick:function(e){t&&(e.stopPropagation(),t(e))}},{children:["+",n]})):null},x=function(e){var n=e.selectProps,t=c.components.MultiValueContainer;if(!n.collapseSelected)return(0,o.jsx)(t,h({},e));var r=(Array.isArray(n.value)?n.value:[]).findIndex((function(n){return n.value===e.data.value})),l=Math.max(n.visibleCount-1,0),a=n.collapsedCount>0&&!n.isMeasuring&&n.visibleCount>0&&r>=0&&r===l,i=(0,o.jsx)(t,h({},e,{children:e.children}));return a?(0,o.jsxs)(o.Fragment,{children:[i,(0,o.jsx)(C,{collapsedCount:n.collapsedCount,onPress:n.onCollapsedChipPress})]}):i},w=function(e){var n,t=e.selectProps,r=c.components.MultiValue,l=t.visibleCount,a=t.collapseSelected&&!t.isMeasuring&&e.index>=l,i=t.collapseSelected&&t.isMeasuring&&e.index>=l,u=e.innerProps&&"style"in e.innerProps?e.innerProps.style:void 0,s=null===(n=e.innerProps)||void 0===n?void 0:n.onPointerDown,p=h(h({},e.innerProps),{"data-feathery-multi-value":"true"}),d=t.collapseSelected;return p.onPointerDown=function(e){var n;if(d)return"touch"===e.pointerType&&e.preventDefault(),e.stopPropagation(),void(null===(n=t.onCollapsedChipPress)||void 0===n||n.call(t,e));e.stopPropagation(),null==s||s(e)},p.onMouseDown=function(n){var o,r,l;if(d)return n.preventDefault(),n.stopPropagation(),void(null===(o=t.onCollapsedChipPress)||void 0===o||o.call(t,n));n.stopPropagation(),null===(l=null===(r=e.innerProps)||void 0===r?void 0:r.onMouseDown)||void 0===l||l.call(r,n)},p.onTouchStart=function(n){var o,r,l;if(d)return n.stopPropagation(),void(null===(o=t.onCollapsedChipPress)||void 0===o||o.call(t,n));n.stopPropagation(),null===(l=null===(r=e.innerProps)||void 0===r?void 0:r.onTouchStart)||void 0===l||l.call(r,n)},i?p.style=h(h({},u),{opacity:0,pointerEvents:"none",position:"absolute",left:0,top:0}):a?p.style=h(h({},u),{display:"none"}):u&&(p.style=u),(0,o.jsx)(r,h({},e,{selectProps:t,innerProps:p}))},S=t(1325),M=t.n(S),P=function(){return P=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},P.apply(this,arguments)},O=(0,r.forwardRef)((function(e,n){return(0,o.jsx)(p(),P({ref:n},e))}));O.displayName="DropdownSelect";var k=(0,r.forwardRef)((function(e,n){return(0,o.jsx)(M(),P({ref:n},e))}));k.displayName="DropdownCreatableSelect";var R=function(){return R=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},R.apply(this,arguments)},D=t(5487),L=function(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var o,r,l=t.call(e),a=[];try{for(;(void 0===n||n-- >0)&&!(o=l.next()).done;)a.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(t=l.return)&&t.call(l)}finally{if(r)throw r.error}}return a},T=function(e){return e&&parseFloat(e)||0};var j=new Map,E=!1,V=function(){E=!1,j.forEach((function(e){var n="option"===e.type?"option entry":"selected value",t=1===e.count?"":" entries",o=e.contexts.length?" at ".concat(e.contexts.join(", ")):"";console.warn("[Feathery] ".concat(e.entityLabel,' "').concat(e.field,'" skipped ').concat(e.count," invalid ").concat(n).concat(t," (").concat(e.reason,")").concat(o,"."),e.sample)})),j.clear()},A=function(e){return null==e?null:"string"==typeof e?e:"number"==typeof e||"boolean"==typeof e?String(e):null},I=function(e){var n=e.state,t=e.type,o=e.field,r=e.reason,l=e.context,a=e.payload,i=e.entityLabel,u=void 0===i?"Field":i,s="".concat(t,"|").concat(o,"|").concat(r,"|").concat(l);if(!n.has(s)){n.add(s);var c="".concat(t,"|").concat(o,"|").concat(r),p=j.get(c);p||(p={type:t,field:o,reason:r,entityLabel:u,count:0,contexts:[],sample:a},j.set(c,p)),p.count+=1,p.contexts.length<5&&p.contexts.push(l),void 0===p.sample&&(p.sample=a),E||(E=!0,"function"!=typeof queueMicrotask?Promise.resolve().then(V):queueMicrotask(V))}},_=function(e,n){var t=n.warningState,o=n.fieldKey,r=n.contextPrefix,l=n.labelOverrides,a=n.tooltipOverrides,i=n.labelMap,u=n.tooltipMap,s=n.entityLabel;return(Array.isArray(e)?e.filter((function(e){return null!=e})):[]).reduce((function(e,n,c){var p,d=function(e){var n=e.warningState,t=e.option,o=e.fieldKey,r=e.context,l=e.entityLabel,a="string"==typeof t||"number"==typeof t||"boolean"==typeof t?{value:t}:t;if(!a||"object"!=typeof a)return I({state:n,type:"option",field:o,reason:"invalid shape",context:r,payload:t,entityLabel:l}),null;var i=a,u=A(i.value);if(null===u)return I({state:n,type:"option",field:o,reason:"missing value",context:r,payload:t,entityLabel:l}),null;var s,c=u,p=i.label;"string"==typeof p?c=p:"number"!=typeof p&&"boolean"!=typeof p||(c=String(p));var d=i.tooltip;return"string"==typeof d?s=d:"number"!=typeof d&&"boolean"!=typeof d||(s=String(d)),{value:u,label:c,tooltip:s}}({warningState:t,option:n,fieldKey:o,context:"".concat(r,"[").concat(c,"]"),entityLabel:s});if(!d)return e;var f=d.label,v=null!==(p=d.tooltip)&&void 0!==p?p:"";if("string"==typeof n||"number"==typeof n||"boolean"==typeof n){var h=null==l?void 0:l[c],y=null==a?void 0:a[c];"string"==typeof h&&h.length?f=h:h&&(f=String(h)),"string"==typeof y&&y.length?v=y:y&&(v=String(y))}return i[d.value]=f,u[d.value]=v,e.push({value:d.value,label:f,tooltip:v}),e}),[])},K=function(){return K=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},K.apply(this,arguments)},B=function(){return B=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},B.apply(this,arguments)},W=function(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var o,r,l=t.call(e),a=[];try{for(;(void 0===n||n-- >0)&&!(o=l.next()).done;)a.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(t=l.return)&&t.call(l)}finally{if(r)throw r.error}}return a};function F(e){var n,t=e.element,c=e.responsiveStyles,p=e.fieldLabel,d=e.inlineError,f=e.required,v=void 0!==f&&f,h=e.disabled,g=void 0!==h&&h,C=e.fieldVal,S=void 0===C?[]:C,M=e.repeatIndex,P=void 0===M?null:M,j=e.editMode,E=e.onChange,V=void 0===E?function(){}:E,F=e.elementProps,q=void 0===F?{}:F,N=e.rightToLeft,Z=e.children,H=(0,l.Z)({element:t,error:d,breakpoint:c.getMobileBreakpoint()}),z=H.borderStyles,G=H.customBorder,J=(0,r.useRef)(null),Q=W((0,r.useState)(!1),2),U=Q[0],X=Q[1],Y=t.servar,$=Y.key,ee=(0,s.Z)(Y.metadata.salesforce_sync,j),ne=ee.dynamicOptions,te=ee.loadingDynamicOptions,oe=ee.shouldSalesforceSync,re=t.properties||{},le=re.translate||{},ae=le.no_options?function(){return le.no_options}:void 0,ie=function(e){var n=e.fieldVal,t=e.fieldKey,o=e.servar,l=e.dynamicOptions,a=e.shouldSalesforceSync,i=e.repeatIndex,u=e.entityLabel,s=(0,r.useMemo)((function(){return new Set}),[t]),c=(0,r.useMemo)((function(){return Array.isArray(n)?n.reduce((function(e,n,o){var r=A(n);return null===r?(I({state:s,type:"value",field:t,reason:"unsupported value type",context:"fieldVal[".concat(o,"]"),payload:n,entityLabel:u}),e):(e.push(r),e)}),[]):(I({state:s,type:"value",field:t,reason:"expected array for multi-select value",context:"fieldVal",payload:n,entityLabel:u}),[])}),[t,n,s,u]),p=(0,r.useCallback)((function(e){var n=Array.isArray(e)?function(e,n,t){if(t||2===arguments.length)for(var o,r=0,l=n.length;r<l;r++)!o&&r in n||(o||(o=Array.prototype.slice.call(n,0,r)),o[r]=n[r]);return e.concat(o||Array.prototype.slice.call(n))}([],function(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var o,r,l=t.call(e),a=[];try{for(;(void 0===n||n-- >0)&&!(o=l.next()).done;)a.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(t=l.return)&&t.call(l)}finally{if(r)throw r.error}}return a}(e),!1):[];return c.length?(c.forEach((function(e){if("string"!=typeof n[0]){var t=n;t.some((function(n){return A(null==n?void 0:n.value)===e}))||t.push({value:e,label:e})}else{var o=n;o.includes(e)||o.push(e)}})),n):n}),[c]),d=o.metadata.option_labels||[],f=o.metadata.option_tooltips||[],v=(0,r.useMemo)((function(){var e;if(a)return{source:p(l),contextPrefix:"dynamicOptions"};var n=null!==i?null===(e=o.metadata.repeat_options)||void 0===e?void 0:e[i]:void 0;return void 0!==n?{source:p(n),contextPrefix:"repeat_options"}:{source:p(o.metadata.options),contextPrefix:"options",labelOverrides:d,tooltipOverrides:f}}),[a,l,i,o.metadata.repeat_options,o.metadata.options,d,f,p]),h=(0,r.useMemo)((function(){var e={},n={};return{options:_(v.source,{warningState:s,fieldKey:t,contextPrefix:v.contextPrefix,labelOverrides:v.labelOverrides,tooltipOverrides:v.tooltipOverrides,labelMap:e,tooltipMap:n,entityLabel:u}),labelMap:e,tooltipMap:n}}),[t,u,v,s]),y=h.options,g=h.labelMap,m=h.tooltipMap,b=c.length?c.map((function(e){var n;return{label:null!==(n=g[e])&&void 0!==n?n:e,value:e,tooltip:m[e]}})):[];return{options:y,selectVal:b,labelMap:g,tooltipMap:m}}({fieldVal:S,fieldKey:$,servar:Y,dynamicOptions:ne,shouldSalesforceSync:oe,repeatIndex:P,entityLabel:"Dropdown field"}),ue=ie.options,se=ie.selectVal,ce=function(e){var n=e.containerRef,t=e.disabled,o=e.values,l=function(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var o,r,l=t.call(e),a=[];try{for(;(void 0===n||n-- >0)&&!(o=l.next()).done;)a.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(t=l.return)&&t.call(l)}finally{if(r)throw r.error}}return a}((0,r.useState)(!1),2),a=l[0],i=l[1],u=(0,r.useRef)(null),s=!a,c=function(e,n,t){var o=n.length,l=L((0,r.useState)(o),2),a=l[0],i=l[1],u=L((0,r.useState)(!1),2),s=u[0],c=u[1],p=L((0,r.useState)(0),2),d=p[0],f=p[1],v=(0,r.useRef)(!1),h=(0,r.useRef)(!1),y=(0,r.useRef)(!1),g=(0,r.useRef)(null),m=(0,r.useRef)(null),b=(0,r.useRef)(null),C=(0,r.useRef)(o),x=(0,r.useRef)(null),w=(0,r.useRef)(null),S=(0,r.useRef)(!1);(0,r.useEffect)((function(){return function(){var e;null===(e=x.current)||void 0===e||e.remove(),x.current=null}}),[]);var M=(0,r.useCallback)((function(){t&&(v.current?h.current=!0:(v.current=!0,h.current=!1,y.current||c(!0),y.current=!0,f((function(e){return e+1}))))}),[e,t,o]);(0,r.useEffect)((function(){var e=w.current;if(w.current=n,t)if(e){var o=e.length!==n.length||e.some((function(e,t){var o;return e.value!==(null===(o=n[t])||void 0===o?void 0:o.value)}));o&&M()}else M()}),[t,M,n]),(0,r.useEffect)((function(){if(t){var n=e.current;if(n){var o=new ResizeObserver((function(e){var n=e[e.length-1];if(n){var t=n.contentRect.width;if(!v.current)return S.current?(S.current=!1,void(b.current=t)):null===b.current?(b.current=t,void M()):void(Math.abs(t-b.current)>20&&(b.current=t,M()))}}));return o.observe(n),function(){return o.disconnect()}}}}),[e,t,M]),(0,r.useLayoutEffect)((function(){if(v.current)return g.current=(0,D.Kv)().requestAnimationFrame((function(){v.current=!1,y.current=!1;var r,l=e.current,a=Math.min(C.current,o),u=null;if(t&&l){var s=function(e){var n,t,o=null!==(n=e.ownerDocument)&&void 0!==n?n:(0,D.Kv)().document,r=e.getBoundingClientRect();if(r.width<=0||r.height<=0)return null;var l=e.cloneNode(!0);l.setAttribute("data-feathery-collapse-measure","true"),l.style.position="absolute",l.style.visibility="hidden",l.style.pointerEvents="none",l.style.left="-10000px",l.style.top="0",l.style.width="".concat(r.width,"px"),l.style.maxWidth="".concat(r.width,"px"),l.style.height="auto",l.style.maxHeight="none",l.style.whiteSpace="normal",l.style.overflow="visible",o.body.appendChild(l);var a=Array.from(l.querySelectorAll('[data-feathery-multi-value="true"]'));a.forEach((function(e){e.style.removeProperty("display"),e.style.removeProperty("opacity"),e.style.removeProperty("pointer-events"),e.style.removeProperty("position"),e.style.removeProperty("left"),e.style.removeProperty("top")}));var i=null===(t=a[0])||void 0===t?void 0:t.parentElement;return i&&(i.style.flexWrap="wrap",i.style.whiteSpace="normal",i.style.display="flex"),l.querySelectorAll('[data-feathery-collapsed-indicator="true"]').forEach((function(e){return e.remove()})),{node:l,cleanup:function(){l.remove()}}}(l);s&&(u=s.node,r=s.cleanup)}if(t&&u){var p=Array.from(u.querySelectorAll('[data-feathery-multi-value="true"]'));if(p.length){var d=p[0].offsetTop;a=p.length;for(var f=0;f<p.length;f+=1)if(p[f].offsetTop-d>20){a=f;break}var g=p[0].parentElement;if(g&&o>a){var w=function(e){var n,t=x.current;if(!t){var o=null===(n=e.ownerDocument)||void 0===n?void 0:n.createElement("span");if(!o)return null;o.setAttribute("aria-hidden","true"),o.setAttribute("data-feathery-collapsed-indicator","true"),o.className="rs-collapsed-chip",o.style.visibility="hidden",o.style.position="absolute",o.style.pointerEvents="none",o.style.whiteSpace="nowrap",o.style.top="0",o.style.left="0",x.current=o,t=o}return e.contains(t)||e.appendChild(t),t}(g);if(w){for(var P=g.getBoundingClientRect(),O=(0,D.Kv)().getComputedStyle(g),k=T(O.columnGap)||T(O.gap),R=T(O.paddingLeft),L=T(O.paddingRight),j=Math.max(P.width-R-L,0),E=function(){w.textContent="+".concat(Math.max(o-a,0));var e=w.getBoundingClientRect(),n=(0,D.Kv)().getComputedStyle(w);return e.width+T(n.marginLeft)+T(n.marginRight)},V=o+1,A=0,I=0;a>0&&A<V;){I=E();var _=p[a-1];if(!_)break;var K=_.getBoundingClientRect(),B=(0,D.Kv)().getComputedStyle(_);if(K.right-P.left-R+(k>0?k:T(B.marginRight))+I<=j+20)break;a-=1,A+=1}A>=V&&(a=Math.max(Math.min(a,o-1),0))}}}}null==r||r();var W=a||(t&&n.length?1:0);i((function(e){return e===W?e:W})),c(!1),S.current=!0,null!==m.current&&(0,D.Kv)().cancelAnimationFrame(m.current),m.current=(0,D.Kv)().requestAnimationFrame((function(){m.current=null,e.current&&(b.current=e.current.getBoundingClientRect().width)})),t&&(C.current=a),h.current&&(h.current=!1,M())})),function(){null!==g.current&&((0,D.Kv)().cancelAnimationFrame(g.current),g.current=null),null!==m.current&&((0,D.Kv)().cancelAnimationFrame(m.current),m.current=null)}}),[t,d,M,o]),(0,r.useEffect)((function(){if(!t)return c(!1),v.current=!1,h.current=!1,y.current=!1,b.current=null,void(S.current=!1);i((function(e){var n=Math.min(C.current,o)||(o>0?1:0);return e===n?e:n}))}),[t,o]),(0,r.useEffect)((function(){C.current=Math.min(C.current,o)}),[o]);var P=t?Math.max(o-a,0):0;return{visibleCount:t?a:o,collapsedCount:P,isMeasuring:!!t&&s}}(n,o,s),p=c.collapsedCount,d=c.isMeasuring,f=c.visibleCount,v=(0,r.useCallback)((function(e){var n,t;i(!1);var o=u.current||null;(null==e?void 0:e.skipBlur)||null===(n=null==o?void 0:o.blur)||void 0===n||n.call(o),null===(t=null==o?void 0:o.closeMenu)||void 0===t||t.call(o)}),[]),h=(0,r.useCallback)((function(e){var n;if(!t&&!(null==e?void 0:e.closest('[data-feathery-multi-value-remove="true"]'))){var o=u.current||null;null===(n=null==o?void 0:o.focus)||void 0===n||n.call(o)}}),[t]),y=(0,r.useCallback)((function(e){h(e.target)}),[h]),g=(0,r.useCallback)((function(e){h(e.target)}),[h]),m=(0,r.useCallback)((function(){i(!0)}),[]),b=(0,r.useCallback)((function(){i(!1)}),[]);return(0,r.useEffect)((function(){var e=function(e){var t=n.current;t&&(t.contains(e.target)||v())},t=(0,D.me)();return t.addEventListener("pointerdown",e,!0),function(){t.removeEventListener("pointerdown",e,!0)}}),[v,n]),(0,r.useMemo)((function(){return{collapseSelected:s,collapsedCount:p,menu:{isOpen:a,open:m,close:b,forceClose:v},pointer:{onMouseDown:y,onTouchStart:g,reset:function(){}},measurement:{isMeasuring:d,visibleCount:f},selectRef:u}}),[s,p,v,b,m,y,g,a,d,f,u])}({containerRef:J,disabled:g,values:se}),pe=ce.collapseSelected,de=ce.collapsedCount,fe=ce.menu,ve=ce.pointer,he=ce.measurement,ye=ce.selectRef,ge=fe.open,me=fe.close,be=fe.forceClose,Ce=ve.onMouseDown,xe=ve.onTouchStart,we=he.isMeasuring,Se=he.visibleCount,Me=W((0,r.useState)(!1),2),Pe=Me[0],Oe=Me[1],ke=(0,r.useMemo)((function(){return{Control:b,Option:y,MultiValue:w,MultiValueContainer:x,MultiValueRemove:m}}),[]),Re=!!Y.max_length&&se.length>=Y.max_length||te,De=Y.metadata.creatable_options;if(De&&le.create_option_label){var Le=le.create_option_label;n=Le.includes("{value}")?function(e){return Le.replace(/\{value\}/g,e)}:function(e){return"".concat(Le,' "').concat(e,'"')}}var Te=(0,r.useCallback)((function(e){var n=e.trim();if(!n)return!1;var t=n.toLowerCase(),o=ue.some((function(e){var n;return(null===(n=null==e?void 0:e.value)||void 0===n?void 0:n.toLowerCase())===t}));if(o)return!1;var r=se.some((function(e){var n;return(null===(n=null==e?void 0:e.value)||void 0===n?void 0:n.toLowerCase())===t}));return!r}),[ue,se]),je=(0,r.useCallback)((function(e){return Te(e)}),[Te]),Ee=function(e){var n=e.selectRef,t=e.containerRef,o=e.disabled,l=e.isMenuOpen,a=e.setIsMenuOpen,i=e.openCollapseMenu,u=e.closeCollapseMenu,s=e.forceCloseCollapseMenu,c=e.focusOnMouseDown,p=e.focusOnTouchStart,d=e.selectVal,f=e.options,v=e.isCreatableInputValid,h=e.create,y=e.disableAllOptions,g=e.onChange,m=(0,r.useRef)(0),b=(0,r.useCallback)((function(){m.current=performance.now()+250}),[]),C=(0,r.useCallback)((function(){return n.current}),[n]),x=(0,r.useCallback)((function(){var e,n,t=C();t&&(b(),a(!0),i(),null===(e=t.focus)||void 0===e||e.call(t),null===(n=t.openMenu)||void 0===n||n.call(t,"first"))}),[b,i,a,C]),w=(0,r.useCallback)((function(e){a(!1),u(),s(e)}),[u,s,a]),S=(0,r.useCallback)((function(){a(!0),i(),C()}),[i,a,C]),M=(0,r.useCallback)((function(){performance.now()<m.current||(a(!1),u())}),[u,a]),P=(0,r.useCallback)((function(e){return!l&&(!(null==e?void 0:e.closest('[data-feathery-multi-value-remove="true"]'))&&(x(),!0))}),[l,x]),O=(0,r.useCallback)((function(e){if(P(e.target))return e.preventDefault(),void e.stopPropagation();c(e)}),[c,P]),k=(0,r.useCallback)((function(e){P(e.target)?e.stopPropagation():p(e)}),[p,P]),R=(0,r.useCallback)((function(e,n){var t=n.isTouch;return!!P(e.currentTarget)&&(!t&&"preventDefault"in e&&e.preventDefault(),e.stopPropagation(),!0)}),[P]),L=(0,r.useCallback)((function(e){P(e.currentTarget)&&e.stopPropagation()}),[P]),T=(0,r.useCallback)((function(e,t){var o,r;"remove-value"!==t.action&&"pop-value"!==t.action||b();var a="remove-value"===t.action||"pop-value"===t.action||"select-option"===t.action||"create-option"===t.action;a&&l||w(a?{skipBlur:!0}:void 0),g(e,t),null===(r=null===(o=n.current)||void 0===o?void 0:o.focus)||void 0===r||r.call(o)}),[w,b,l,g,n]),j=(0,r.useCallback)((function(){var e,t,o,r=n.current,a=null==r?void 0:r.state,i=null==a?void 0:a.focusedOption,u=null!=i?i:null,s=null==u?void 0:u.value,c=Boolean(s),p=Boolean(h&&(null==u?void 0:u.__isNew__)),y=(t=null==a?void 0:a.inputValue,o=null!==(e=null==r?void 0:r.inputRef)&&void 0!==e?e:null,"string"==typeof t?t:"string"==typeof(null==o?void 0:o.value)?o.value:"").trim(),g=y.length>0,m=y.toLowerCase(),b=g&&f.some((function(e){var n;return(null===(n=null==e?void 0:e.value)||void 0===n?void 0:n.toLowerCase())===m})),C=g&&d.some((function(e){var n;return(null===(n=null==e?void 0:e.value)||void 0===n?void 0:n.toLowerCase())===m})),x=h&&g&&(v?v(y):!b&&!C),w=null==s?void 0:s.toLowerCase(),S=Boolean(w&&d.some((function(e){var n;return(null===(n=null==e?void 0:e.value)||void 0===n?void 0:n.toLowerCase())===w})));return l?x?"allow":p?"block":c?S?"block":"allow":"block":"block-open"}),[h,y,l,v,f,d,n]),E=(0,r.useCallback)((function(e){var t,o=j();if("allow"===o)return o;if(e.defaultPrevented||e.preventDefault(),e.isPropagationStopped()||e.stopPropagation(),"block-open"===o){var r=n.current;null===(t=null==r?void 0:r.openMenu)||void 0===t||t.call(r,"first")}return o}),[j,n]),V=(0,r.useCallback)((function(e){"Enter"!==e.key||o||E(e)}),[o,E]),A=(0,r.useCallback)((function(e){o||("Escape"!==e.key?"Enter"===e.key&&E(e):m.current=0)}),[o,E]);return(0,r.useEffect)((function(){if(l){var e=(0,D.me)(),n=function(e){var n=t.current;n&&(n.contains(e.target)||w())};return e.addEventListener("pointerdown",n,!0),function(){e.removeEventListener("pointerdown",n,!0)}}}),[w,t,l]),{handleWrapperMouseDown:O,handleWrapperTouchStart:k,handleKeyDownCapture:A,handleChange:T,handleSelectKeyDown:V,handleMenuOpen:S,handleMenuClose:M,handleControlPress:R,handleCollapsedChipPress:L,extendCloseSuppression:b}}({selectRef:ye,containerRef:J,disabled:g,isMenuOpen:Pe,setIsMenuOpen:Oe,openCollapseMenu:ge,closeCollapseMenu:me,forceCloseCollapseMenu:be,focusOnMouseDown:Ce,focusOnTouchStart:xe,selectVal:se,options:ue,isCreatableInputValid:De?Te:void 0,create:De,disableAllOptions:Re,onChange:V}),Ve=Ee.handleWrapperMouseDown,Ae=Ee.handleWrapperTouchStart,Ie=Ee.handleKeyDownCapture,_e=Ee.handleChange,Ke=Ee.handleSelectKeyDown,Be=Ee.handleMenuOpen,We=Ee.handleMenuClose,Fe=Ee.handleControlPress,qe=Ee.handleCollapsedChipPress,Ne=Ee.extendCloseSuppression,Ze=re.tooltipText?30:10,He=De?k:O;c.applyFontStyles("field");var ze=pe&&!we&&!U,Ge=(0,r.useMemo)((function(){return function(e){var n=e.chevronPosition,t=e.fontColor,o=e.menuZIndex,r=e.responsiveStyles,l=e.rightToLeft,a={control:function(e){return R(R(R({},e),r.getTarget("field")),{width:"100%",height:"100%",minHeight:"inherit",border:"none",boxShadow:"none",backgroundColor:"transparent",backgroundImage:"url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'><path d='M0 0.776454L0.970744 0L5 4.2094L9.02926 0L10 0.776454L5 6L0 0.776454Z' fill='%23".concat(t,"'/></svg>\")"),backgroundRepeat:"no-repeat",backgroundPosition:"".concat(l?"left":"right"," ").concat(n,"px center"),position:"relative"})},container:function(e){return R(R({},e),{height:"100%",minHeight:"inherit"})},valueContainer:function(e,n){var t,o,r,l,a=n.selectProps,i=!a.collapseSelected||!!a.inputValue,u=i?{paddingTop:void 0!==e.paddingTop?e.paddingTop:"8px",paddingBottom:void 0!==e.paddingBottom?e.paddingBottom:"8px"}:{};return R(R(R(R({},e),u),{paddingInlineEnd:28,display:"flex",minWidth:0,flexWrap:i?"wrap":"nowrap",alignItems:i?"flex-start":"center",alignContent:i?"flex-start":"center"}),a.collapseSelected?{"& .rs-collapsed-chip":{display:"inline-flex",alignItems:"center",padding:"3px 8px",margin:"2px",borderRadius:null!==(t=e.borderRadius)&&void 0!==t?t:2,backgroundColor:null!==(o=e.backgroundColor)&&void 0!==o?o:"rgba(221, 221, 221, 0.8)",color:null!==(r=e.color)&&void 0!==r?r:"#333",fontSize:null!==(l=e.fontSize)&&void 0!==l?l:"0.85em"}}:{})},multiValueLabel:function(e,n){return n.selectProps.collapseSelected?R(R({},e),{whiteSpace:"normal",overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:3,wordBreak:"break-word",maxWidth:"100%"}):R(R({},e),{whiteSpace:"normal",overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:3})},indicatorSeparator:function(){return{display:"none"}},indicatorsContainer:function(){return{display:"none"}},menu:function(e){return R(R({},e),{zIndex:o,textAlign:"start"})},multiValue:function(e,n){var t;return n.selectProps.collapseSelected?R(R({},e),{maxWidth:"100%",minWidth:0,overflow:"hidden",marginInline:"2px",borderRadius:null!==(t=e.borderRadius)&&void 0!==t?t:2}):e},input:function(e,n){var t=n.selectProps;return t.collapseSelected&&t.inputHidden?R(R({},e),{opacity:0,maxWidth:"1px",width:"1px",minWidth:"1px",flexBasis:0,flexGrow:0,flexShrink:0,margin:0,padding:0,pointerEvents:"none",position:"absolute",top:0,right:0,overflow:"hidden","> input":{width:"1px",minWidth:"1px",opacity:0,pointerEvents:"none"}}):e}};return a}({chevronPosition:Ze,fontColor:t.styles.font_color,menuZIndex:i.m,responsiveStyles:c,rightToLeft:N})}),[Ze,t.styles.font_color,c,N]),Je=function(e){var n=e.selectRef,t=e.containerRef,o=e.servar,l=e.selectVal,a=e.options,i=e.required,u=e.disabled,s=e.isMenuOpen,c=e.loadingDynamicOptions,p=e.selectStyles,d=e.selectComponentsOverride,f=e.collapseSelected,v=e.visibleCount,h=e.collapsedCount,y=e.isMeasuring,g=e.shouldHideInput,m=e.handleChange,b=e.setFocused,C=e.handleSelectKeyDown,x=e.handleMenuOpen,w=e.handleMenuClose,S=e.handleCollapsedChipPress,M=e.handleControlPress,P=e.extendCloseSuppression,O=e.noOptionsMessage,k=e.create,R=e.formatCreateLabel,D=e.isValidNewOption,L=e.ariaLabel;return(0,r.useMemo)((function(){return K(K(K({ref:n,inputId:o.key,isMulti:!0,value:l,options:a,required:i,isDisabled:u,menuIsOpen:s,styles:p,components:d,placeholder:"",openMenuOnClick:!f,closeMenuOnSelect:!1,tabSelectsValue:!1,blurInputOnSelect:!1,onChange:m,onFocus:function(){return b(!0)},onBlur:function(){return b(!1)},onKeyDown:C,onMenuOpen:x,onMenuClose:w,isOptionDisabled:function(){return o.max_length&&l.length>=o.max_length||c},noOptionsMessage:k?function(){return null}:O},f?{containerRef:t,visibleCount:v,collapsedCount:h,isMeasuring:y,collapseSelected:!0,inputHidden:g,onCollapsedChipPress:S,onControlPress:M,onMultiValueRemovePointer:P}:{containerRef:t,visibleCount:a.length,collapsedCount:0,isMeasuring:!1,collapseSelected:!1}),k&&K(K({},R?{formatCreateLabel:R}:{}),D?{isValidNewOption:D}:{})),{"aria-label":L})}),[n,o.key,o.max_length,l,a,i,u,s,p,d,f,t,v,h,y,g,m,b,C,x,w,S,M,P,c,O,k,R,D,L])}({selectRef:ye,containerRef:J,servar:Y,selectVal:se,options:ue,required:v,disabled:g,isMenuOpen:Pe,loadingDynamicOptions:te,selectStyles:Ge,selectComponentsOverride:ke,collapseSelected:pe,visibleCount:Se,collapsedCount:de,isMeasuring:we,shouldHideInput:ze,handleChange:_e,setFocused:X,handleSelectKeyDown:Ke,handleMenuOpen:Be,handleMenuClose:We,handleCollapsedChipPress:qe,handleControlPress:Fe,extendCloseSuppression:Ne,noOptionsMessage:ae,create:De,formatCreateLabel:n,isValidNewOption:De?je:void 0,ariaLabel:t.properties.aria_label});return(0,o.jsxs)("div",B({ref:J,css:B({maxWidth:"100%",width:"100%",height:"100%",position:"relative",pointerEvents:j?"none":"auto"},c.getTarget("fc"))},q,{children:[Z,p,(0,o.jsxs)("div",B({css:B(B(B({position:"relative",width:"100%",whiteSpace:"nowrap"},c.getTarget("sub-fc")),g?c.getTarget("disabled"):{}),{"&:hover":g?{}:B(B({},c.getTarget("hover")),z.hover),"&&":U?B(B({},c.getTarget("active")),z.active):{}}),onMouseDown:Ve,onTouchStart:Ae,onKeyDownCapture:Ie},{children:[G,(0,o.jsx)(He,B({},Je)),(0,o.jsx)(u.Z,{value:se.length||U,element:t,responsiveStyles:c,repeatIndex:P}),(0,o.jsx)(a.Z,{containerRef:J,id:t.id,text:t.properties.tooltipText,responsiveStyles:c,repeat:t.repeat})]}))]}))}}}]);
|
package/dist/Form/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Form/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EACZ,SAAS,EAMV,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Form/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EACZ,SAAS,EAMV,MAAM,OAAO,CAAC;AA6Df,OAAO,EAEL,WAAW,EAKZ,MAAM,eAAe,CAAC;AAsCvB,OAAO,EACL,eAAe,EACf,eAAe,EACf,cAAc,EACd,eAAe,EACf,aAAa,EACb,YAAY,EACZ,WAAW,EAEX,YAAY,EAGb,MAAM,eAAe,CAAC;AA6DvB,OAAkB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AA8B9D,cAAc,wBAAwB,CAAC;AACvC,YAAY,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEnE,MAAM,WAAW,KAAK;I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":"AAyBA,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,OAAO,EACP,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,QAAgB,EAChB,QAAgB,EAChB,QAAa,EACb,WAAkB,EAClB,QAAQ,EACR,QAAmB,EACnB,YAAiB,EACjB,WAAW,EACX,QAAQ,EACT,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/elements/fields/DropdownMultiField/index.tsx"],"names":[],"mappings":"AAyBA,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,OAAO,EACP,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,QAAgB,EAChB,QAAgB,EAChB,QAAa,EACb,WAAkB,EAClB,QAAQ,EACR,QAAmB,EACnB,YAAiB,EACjB,WAAW,EACX,QAAQ,EACT,EAAE,GAAG,oDAoPL"}
|
|
@@ -32,7 +32,6 @@ export declare const createCreatableElement: (options: string[]) => {
|
|
|
32
32
|
styles: any;
|
|
33
33
|
repeat: boolean;
|
|
34
34
|
};
|
|
35
|
-
export declare const createSelectionOrderingHarness: (element: any) => () => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
36
35
|
export declare const getSelectInput: () => HTMLInputElement;
|
|
37
36
|
export declare const getReactSelectContainer: () => HTMLElement;
|
|
38
37
|
export declare const getOptionElements: () => Element[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["../../../../../src/elements/fields/DropdownMultiField/tests/test-utils.tsx"],"names":[],"mappings":";AAGA,OAAO,EAGL,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACvB,0BAA0B,EAC3B,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACvB,0BAA0B,EAC3B,CAAC;AAWF,eAAO,MAAM,0BAA0B,SAC/B,MAAM,aACF,GAAG,WACL,GAAG;;;;;;CAWV,CAAC;AAEJ,eAAO,MAAM,wBAAwB,YAAa,GAAG,gBAAe,GAAG,QAOnE,CAAC;AAEL,eAAO,MAAM,sBAAsB,iDAOlC,CAAC;AAEF,eAAO,MAAM,qBAAqB,YACvB,MAAM,EAAE,WACR,MAAM,EAAE,aACN,MAAM,EAAE;;;;CAKnB,CAAC;AAEH,eAAO,MAAM,2BAA2B,kBAAmB,GAAG,EAAE;;CAE9D,CAAC;AAEH,eAAO,MAAM,sBAAsB,cACtB,MAAM,YACR,MAAM,EAAE;;;;;;CAKf,CAAC;AAEL,eAAO,MAAM,sBAAsB,YAAa,MAAM,EAAE;;;;;;CAIpD,CAAC;AAEL,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["../../../../../src/elements/fields/DropdownMultiField/tests/test-utils.tsx"],"names":[],"mappings":";AAGA,OAAO,EAGL,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACvB,0BAA0B,EAC3B,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACvB,0BAA0B,EAC3B,CAAC;AAWF,eAAO,MAAM,0BAA0B,SAC/B,MAAM,aACF,GAAG,WACL,GAAG;;;;;;CAWV,CAAC;AAEJ,eAAO,MAAM,wBAAwB,YAAa,GAAG,gBAAe,GAAG,QAOnE,CAAC;AAEL,eAAO,MAAM,sBAAsB,iDAOlC,CAAC;AAEF,eAAO,MAAM,qBAAqB,YACvB,MAAM,EAAE,WACR,MAAM,EAAE,aACN,MAAM,EAAE;;;;CAKnB,CAAC;AAEH,eAAO,MAAM,2BAA2B,kBAAmB,GAAG,EAAE;;CAE9D,CAAC;AAEH,eAAO,MAAM,sBAAsB,cACtB,MAAM,YACR,MAAM,EAAE;;;;;;CAKf,CAAC;AAEL,eAAO,MAAM,sBAAsB,YAAa,MAAM,EAAE;;;;;;CAIpD,CAAC;AAEL,eAAO,MAAM,cAAc,wBAI1B,CAAC;AAEF,eAAO,MAAM,uBAAuB,mBAInC,CAAC;AAEF,eAAO,MAAM,iBAAiB,iBAI7B,CAAC;AAEF,eAAO,MAAM,eAAe,SAAU,MAAM,wBAG3C,CAAC;AAEF,eAAO,MAAM,iBAAiB,iBAE7B,CAAC;AAEF,eAAO,MAAM,uBAAuB,SAAU,MAAM,wBAMnD,CAAC;AAEF,eAAO,MAAM,eAAe,SAAU,MAAM,uBAM3C,CAAC;AAEF,eAAO,MAAM,kCAAkC,UAAW,MAAM,SAG/D,CAAC;AAEF,eAAO,MAAM,wBAAwB,UAAW,MAAM,SAGrD,CAAC;AAEF,eAAO,MAAM,uBAAuB,SAAU,MAAM,SAGnD,CAAC;AAEF,eAAO,MAAM,gBAAgB,SAAgB,GAAG,kBAW/C,CAAC;AAEF,eAAO,MAAM,kBAAkB,SAAgB,GAAG,QAAQ,MAAM,kBAS/D,CAAC;AAEF,eAAO,MAAM,mBAAmB,SAAgB,GAAG,QAAQ,MAAM,kBAIhE,CAAC"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import type { SelectInstance } from 'react-select';
|
|
3
3
|
import type { OptionData } from './types';
|
|
4
4
|
declare type CollapseParams = {
|
|
5
|
-
collapseSelectedPreference: boolean;
|
|
6
5
|
containerRef: React.RefObject<HTMLElement | null>;
|
|
7
6
|
disabled: boolean;
|
|
8
7
|
values: OptionData[];
|
|
@@ -43,6 +42,6 @@ declare type CollapseControls = {
|
|
|
43
42
|
* @param params - Collapse configuration and dependencies
|
|
44
43
|
* @returns Collapse state, menu controls, pointer handlers, measurement data, and select ref
|
|
45
44
|
*/
|
|
46
|
-
export default function useCollapsedSelectionManager({
|
|
45
|
+
export default function useCollapsedSelectionManager({ containerRef, disabled, values }: CollapseParams): CollapseControls;
|
|
47
46
|
export {};
|
|
48
47
|
//# sourceMappingURL=useCollapsedSelectionManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCollapsedSelectionManager.d.ts","sourceRoot":"","sources":["../../../../src/elements/fields/DropdownMultiField/useCollapsedSelectionManager.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAInD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAG1C,aAAK,cAAc,GAAG;IACpB,
|
|
1
|
+
{"version":3,"file":"useCollapsedSelectionManager.d.ts","sourceRoot":"","sources":["../../../../src/elements/fields/DropdownMultiField/useCollapsedSelectionManager.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAInD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAG1C,aAAK,cAAc,GAAG;IACpB,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAClD,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,UAAU,EAAE,CAAC;CACtB,CAAC;AAEF,aAAK,gBAAgB,GAAG;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,aAAK,YAAY,GAAG;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,UAAU,EAAE,CAAC,OAAO,CAAC,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAClD,CAAC;AAEF,aAAK,eAAe,GAAG;IACrB,WAAW,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAC/D,YAAY,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAChE,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB,CAAC;AAEF,aAAK,gBAAgB,GAAG;IACtB,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,aAAK,gBAAgB,GAAG;IACtB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,YAAY,CAAC;IACnB,OAAO,EAAE,eAAe,CAAC;IACzB,WAAW,EAAE,gBAAgB,CAAC;IAC9B,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,UAAU,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;CACrE,CAAC;AAUF;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,UAAU,4BAA4B,CAAC,EACnD,YAAY,EACZ,QAAQ,EACR,MAAM,EACP,EAAE,cAAc,GAAG,gBAAgB,CA6GnC"}
|
|
@@ -7,8 +7,6 @@ interface UseDropdownInteractionsParams {
|
|
|
7
7
|
disabled: boolean;
|
|
8
8
|
isMenuOpen: boolean;
|
|
9
9
|
setIsMenuOpen: (open: boolean) => void;
|
|
10
|
-
collapseSelected: boolean;
|
|
11
|
-
collapseSelectedPreference: boolean;
|
|
12
10
|
openCollapseMenu: () => void;
|
|
13
11
|
closeCollapseMenu: () => void;
|
|
14
12
|
forceCloseCollapseMenu: (options?: {
|
|
@@ -16,13 +14,12 @@ interface UseDropdownInteractionsParams {
|
|
|
16
14
|
}) => void;
|
|
17
15
|
focusOnMouseDown: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
18
16
|
focusOnTouchStart: (event: React.TouchEvent<HTMLDivElement>) => void;
|
|
19
|
-
|
|
17
|
+
selectVal: OptionData[];
|
|
20
18
|
options: OptionData[];
|
|
21
19
|
isCreatableInputValid?: (inputValue: string) => boolean;
|
|
22
20
|
create: boolean;
|
|
23
21
|
disableAllOptions: boolean;
|
|
24
22
|
onChange: (selected: any, actionMeta: any) => void;
|
|
25
|
-
reorderSelection: (selected: any, actionMeta: any) => any;
|
|
26
23
|
}
|
|
27
24
|
interface UseDropdownInteractionsReturn {
|
|
28
25
|
handleWrapperMouseDown: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
@@ -45,6 +42,6 @@ interface UseDropdownInteractionsReturn {
|
|
|
45
42
|
* and outside click detection. Prevents form submission when appropriate and
|
|
46
43
|
* coordinates menu state across collapsed and expanded modes.
|
|
47
44
|
*/
|
|
48
|
-
export default function useDropdownInteractions({ selectRef, containerRef, disabled, isMenuOpen, setIsMenuOpen,
|
|
45
|
+
export default function useDropdownInteractions({ selectRef, containerRef, disabled, isMenuOpen, setIsMenuOpen, openCollapseMenu, closeCollapseMenu, forceCloseCollapseMenu, focusOnMouseDown, focusOnTouchStart, selectVal, options, isCreatableInputValid, create, disableAllOptions, onChange }: UseDropdownInteractionsParams): UseDropdownInteractionsReturn;
|
|
49
46
|
export {};
|
|
50
47
|
//# sourceMappingURL=useDropdownInteractions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDropdownInteractions.d.ts","sourceRoot":"","sources":["../../../../src/elements/fields/DropdownMultiField/useDropdownInteractions.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAyB1C,UAAU,6BAA6B;IAErC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,UAAU,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;IACpE,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAGlD,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"useDropdownInteractions.d.ts","sourceRoot":"","sources":["../../../../src/elements/fields/DropdownMultiField/useDropdownInteractions.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAyB1C,UAAU,6BAA6B;IAErC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,UAAU,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;IACpE,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAGlD,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAGvC,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,sBAAsB,EAAE,CAAC,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;IACnE,gBAAgB,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IACpE,iBAAiB,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAGrE,SAAS,EAAE,UAAU,EAAE,CAAC;IACxB,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,qBAAqB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC;IAGxD,MAAM,EAAE,OAAO,CAAC;IAChB,iBAAiB,EAAE,OAAO,CAAC;IAG3B,QAAQ,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,UAAU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|
|
4
4
|
fieldKey: string;
|
|
5
5
|
servar: any;
|
|
6
|
-
properties: any;
|
|
7
6
|
dynamicOptions: any[];
|
|
8
7
|
shouldSalesforceSync: boolean;
|
|
9
8
|
repeatIndex: number | null;
|
|
10
9
|
entityLabel: string;
|
|
11
|
-
collapseSelectedPreference: boolean;
|
|
12
10
|
}
|
|
13
11
|
interface UseDropdownOptionsReturn {
|
|
14
12
|
options: OptionData[];
|
|
15
|
-
|
|
13
|
+
selectVal: OptionData[];
|
|
16
14
|
labelMap: Record<string, string>;
|
|
17
15
|
tooltipMap: Record<string, string | undefined>;
|
|
18
|
-
reorderSelection: (selected: any, actionMeta: any) => any;
|
|
19
16
|
}
|
|
20
17
|
/**
|
|
21
18
|
* Handles all dropdown options building logic:
|
|
22
19
|
* - Normalizes field values
|
|
23
20
|
* - Determines option source (Salesforce, repeat, or default)
|
|
24
21
|
* - Builds options with labels and tooltips
|
|
25
|
-
* - Manages selection ordering
|
|
26
|
-
* - Supplies selection ordering helpers for interaction logic
|
|
27
22
|
*/
|
|
28
|
-
export default function useDropdownOptions({ fieldVal, fieldKey, servar,
|
|
23
|
+
export default function useDropdownOptions({ fieldVal, fieldKey, servar, dynamicOptions, shouldSalesforceSync, repeatIndex, entityLabel }: UseDropdownOptionsParams): UseDropdownOptionsReturn;
|
|
29
24
|
export {};
|
|
30
25
|
//# sourceMappingURL=useDropdownOptions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDropdownOptions.d.ts","sourceRoot":"","sources":["../../../../src/elements/fields/DropdownMultiField/useDropdownOptions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAiC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"useDropdownOptions.d.ts","sourceRoot":"","sources":["../../../../src/elements/fields/DropdownMultiField/useDropdownOptions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAiC,MAAM,SAAS,CAAC;AAczE,UAAU,wBAAwB;IAChC,QAAQ,EAAE,GAAG,EAAE,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,GAAG,CAAC;IACZ,cAAc,EAAE,GAAG,EAAE,CAAC;IACtB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,wBAAwB;IAChC,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,SAAS,EAAE,UAAU,EAAE,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;CAChD;AAED;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,cAAc,EACd,oBAAoB,EACpB,WAAW,EACX,WAAW,EACZ,EAAE,wBAAwB,GAAG,wBAAwB,CA+IrD"}
|
|
@@ -5,7 +5,7 @@ interface UseSelectPropsParams {
|
|
|
5
5
|
selectRef: React.RefObject<SelectInstance<OptionData, true> | null>;
|
|
6
6
|
containerRef: React.RefObject<HTMLElement | null>;
|
|
7
7
|
servar: any;
|
|
8
|
-
|
|
8
|
+
selectVal: OptionData[];
|
|
9
9
|
options: OptionData[];
|
|
10
10
|
required: boolean;
|
|
11
11
|
disabled: boolean;
|
|
@@ -38,7 +38,7 @@ interface UseSelectPropsParams {
|
|
|
38
38
|
* Organizes all props for the SelectComponent into a clean configuration object.
|
|
39
39
|
* Groups props by concern: core identity, styling, behavior, collapse features, etc.
|
|
40
40
|
*/
|
|
41
|
-
export default function useSelectProps({ selectRef, containerRef, servar,
|
|
41
|
+
export default function useSelectProps({ selectRef, containerRef, servar, selectVal, options, required, disabled, isMenuOpen, loadingDynamicOptions, selectStyles, selectComponentsOverride, collapseSelected, visibleCount, collapsedCount, isMeasuring, shouldHideInput, handleChange, setFocused, handleSelectKeyDown, handleMenuOpen, handleMenuClose, handleCollapsedChipPress, handleControlPress, extendCloseSuppression, noOptionsMessage, create, formatCreateLabel, isValidNewOption, ariaLabel }: UseSelectPropsParams): {
|
|
42
42
|
'aria-label': string | undefined;
|
|
43
43
|
isValidNewOption?: CreatableValidator | undefined;
|
|
44
44
|
formatCreateLabel?: ((inputValue: string) => string) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSelectProps.d.ts","sourceRoot":"","sources":["../../../../src/elements/fields/DropdownMultiField/useSelectProps.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,UAAU,oBAAoB;IAE5B,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,UAAU,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;IACpE,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAGlD,MAAM,EAAE,GAAG,CAAC;IACZ,
|
|
1
|
+
{"version":3,"file":"useSelectProps.d.ts","sourceRoot":"","sources":["../../../../src/elements/fields/DropdownMultiField/useSelectProps.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,UAAU,oBAAoB;IAE5B,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,UAAU,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;IACpE,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAGlD,MAAM,EAAE,GAAG,CAAC;I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