@zealicsolutions/web-ui 1.0.140-beta.202 → 1.0.140-beta.204

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.
@@ -1,2 +1,2 @@
1
- var r={exports:{}};export{r as c};
1
+ var r={exports:{}};export{r};
2
2
  //# sourceMappingURL=index3.js.map
@@ -1,2 +1,2 @@
1
- var r={exports:{}};export{r};
1
+ var r={exports:{}};export{r as c};
2
2
  //# sourceMappingURL=index4.js.map
@@ -1,4 +1,4 @@
1
- import{jsx as e,Fragment as t}from"../node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.esm.js";import{css as o}from"../node_modules/@emotion/react/dist/emotion-react.esm.js";import"../contexts/AccountButtonContext/AccountButtonContext.js";import{memo as n,useMemo as i,Children as r,isValidElement as a,cloneElement as s}from"react";import"../contexts/ApiContext/ApiContext.js";import{useContainerRuntime as d}from"../contexts/ContainerRuntimeContext/ContainerRuntimeContext.js";import"../contexts/FormStepContext/FormStepContext.js";import{useFormContext as l}from"../node_modules/react-hook-form/dist/index.esm.mjs.js";import"../contexts/LayoutContext/LayoutContext.js";import"../theme/theme.js";import"../theme/provider.js";import"../theme/toastStyles.js";import{useMediaQuery as c}from"../theme/useMediaQuery.js";import"../contexts/MlrRichTextViewerContext/MlrRichTextViewerContext.js";import"../contexts/OrganismContext/OrganismContext.js";import{useOrganismContext as m}from"../contexts/OrganismContext/useOrganismContext.js";import"../contexts/PopupContext/PopupContext.js";import"../contexts/ReplicatorFormContext/ReplicatorFormContext.js";import"../contexts/ReplicatorRegistryContext/ReplicatorRegistryContext.js";import"../contexts/StateContext/StateContext.js";import"../contexts/WebpageContext/WebpageContext.js";import p from"../node_modules/react-slick/lib/index.js";import{FormContainer as u}from"./FormContainer.js";import{FormStepContainer as f}from"./FormStepContainer.js";import{resolveActiveVariant as g,getVariantContainerStyles as x,ReplicatorContainer as C}from"./ReplicatorContainer/ReplicatorContainer.js";import{ReplicatorFormSetup as h}from"./ReplicatorContainer/ReplicatorFormSetup.js";import{getBackgroundImageStyles as y}from"./helpers.js";import{getConfigurationWrapperStyle as I,slickStyles as j}from"./styles.js";import{u as b}from"../node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js";const v={dots:!0,infinite:!1,autoplay:!1,autoplaySpeed:5e3,arrows:!0,slidesToShow:1,slidesToScroll:1,adaptiveHeight:!0,swipeToSlide:!0},S=n(({id:n,type:S,name:F,config:k,children:w,metadata:P,isMobile:R,properties:V,nestedPathSegments:$=[],replicatorFieldId:M,parentStyleVariantConfig:D,parentContainerWithVariantsId:B,parentContainerActiveVariant:_})=>{const z=b(),{props:A,wide:O,compact:T}=k||{},W=M||A?.replicatorFieldId,{isConfigurationMode:L,onConfigurationItemClicked:N,selectedConfigurationItemId:E,currentStyleProperties:H,currentContentProperties:Q,formId:q,localState:G}=m(),J=d(),{activeVariant:K,containerId:U}=J,X=l(),Y=Boolean(q&&X),Z=i(()=>{if("replicator"===S)return;const e=V?.styleVariantConfig,t=e&&"object"==typeof e&&"data"in e?e.data:e;return t?.enabled&&t?.sourceDataModelFieldId?t:void 0},[S,V]),ee=i(()=>{return Z?.sourceDataModelFieldId&&Y?(e=J.nestedPathSegments||$,t=Z.sourceDataModelFieldId,e&&0!==e.length?[...e.map(e=>void 0!==e.index?`${e.dmfId}.${e.index}`:e.dmfId),t].filter(Boolean).join("."):t):"";var e,t},[Z?.sourceDataModelFieldId,Y,J.nestedPathSegments,$]),te=ee?X?.watch?.(ee):void 0,oe=i(()=>{if(!Z?.sourceDataModelFieldId)return null;const e=Z.sourceDataModelFieldId;if(Y&&void 0!==te){const t="string"==typeof te||"number"==typeof te?{id:String(te),value:te}:te,o=g(Z,{[e]:t});if(o)return o}const t=G?.[e];if(void 0!==t){const o=g(Z,{[e]:t});if(o)return o}const o=J.rawItemDataByDmfId?.[e],n=J.getDmfValue(e),i=o??n;if(void 0!==i){const t=g(Z,{[e]:i});if(t)return t}return null},[Z,J,Y,G,te]),ne=D,ie=oe??(_??K??null),re=(Z&&Z.enabled?n:B)||U||null,ae=i(()=>{const e=Z&&Z.enabled,t=e?Z:ne,o=ie,i=(e?n:B)||n;return void 0!==t||null!==o||void 0!==B?r.map(w,e=>a(e)?s(e,{...e.props,parentStyleVariantConfig:t,parentContainerWithVariantsId:i,parentContainerActiveVariant:o}):e):w},[w,Z,ie,ne,n,B]),se=E===n,de=se?{backgroundImage:Q?.backgroundImage??V?.backgroundImage??{imageFile:{url:""}}}:V,{containerProps:le={},containerStyle:ce={}}=O||{};let me={...ce};const{containerProps:pe={},containerStyle:ue={}}=T||{};let fe={...ue};H&&se&&(fe={...ue,...H},me={...ce,...H});const ge=c("xs"),xe=R??ge;let Ce=xe?fe:me;if(ie&&k){const e=x(k,ie,xe?"compact":"wide");Object.keys(e).length>0&&(Ce={...Ce,...e})}const he=xe?pe:le,ye={...A,...he,enableBackgroundImage:Ce?.enableBackgroundImage},Ie=i(()=>({entityId:n,entityType:S,entityName:F,entity:"container",libraryEntityId:P?.containerLibraryId||void 0,activeStyleVariant:ie,parentReplicatorWithVariants:re,parentStyleVariantConfig:Z&&Z.enabled?Z:ne}),[S,F,n,P,ie,re,Z,ne]),je=L?{onClick:e=>{e&&e.stopPropagation(),N(Ie,!1)},onDoubleClick:e=>{e?.stopPropagation(),N(Ie,!0)}}:{},be=`${n}.${xe?"mobile":"desktop"}`,ve=o`
1
+ import{jsx as e,Fragment as t}from"../node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.esm.js";import{css as o}from"../node_modules/@emotion/react/dist/emotion-react.esm.js";import"../contexts/AccountButtonContext/AccountButtonContext.js";import{memo as n,useMemo as i,Children as r,isValidElement as a,cloneElement as s}from"react";import"../contexts/ApiContext/ApiContext.js";import{useContainerRuntime as d}from"../contexts/ContainerRuntimeContext/ContainerRuntimeContext.js";import"../contexts/FormStepContext/FormStepContext.js";import{useFormContext as l}from"../node_modules/react-hook-form/dist/index.esm.mjs.js";import"../contexts/LayoutContext/LayoutContext.js";import"../theme/theme.js";import"../theme/provider.js";import"../theme/toastStyles.js";import{useMediaQuery as c}from"../theme/useMediaQuery.js";import"../contexts/MlrRichTextViewerContext/MlrRichTextViewerContext.js";import"../contexts/OrganismContext/OrganismContext.js";import{useOrganismContext as m}from"../contexts/OrganismContext/useOrganismContext.js";import"../contexts/PopupContext/PopupContext.js";import"../contexts/ReplicatorFormContext/ReplicatorFormContext.js";import"../contexts/ReplicatorRegistryContext/ReplicatorRegistryContext.js";import"../contexts/StateContext/StateContext.js";import"../contexts/WebpageContext/WebpageContext.js";import p from"../node_modules/react-slick/lib/index.js";import{FormContainer as u}from"./FormContainer.js";import{FormStepContainer as f}from"./FormStepContainer.js";import{resolveActiveVariant as g,getVariantContainerStyles as x,ReplicatorContainer as C}from"./ReplicatorContainer/ReplicatorContainer.js";import{ReplicatorFormSetup as h}from"./ReplicatorContainer/ReplicatorFormSetup.js";import{getBackgroundImageStyles as y}from"./helpers.js";import{getConfigurationWrapperStyle as I,slickStyles as j}from"./styles.js";import{u as b}from"../node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js";const v={dots:!0,infinite:!1,autoplay:!1,autoplaySpeed:5e3,arrows:!0,slidesToShow:1,slidesToScroll:1,adaptiveHeight:!0,swipeToSlide:!0},S=n(({id:n,type:S,name:F,config:k,children:P,metadata:w,isMobile:R,properties:V,nestedPathSegments:$=[],replicatorFieldId:M,parentStyleVariantConfig:D,parentContainerWithVariantsId:B,parentContainerActiveVariant:_})=>{const z=b(),{props:A,wide:O,compact:T}=k||{},W=M||A?.replicatorFieldId,{isConfigurationMode:L,onConfigurationItemClicked:N,selectedConfigurationItemId:E,currentStyleProperties:H,currentContentProperties:Q,formId:q,localState:G}=m(),J=d(),{activeVariant:K,containerId:U}=J,X=l(),Y=Boolean(q&&X),Z=i(()=>{if("replicator"===S)return;const e=V?.styleVariantConfig,t=e&&"object"==typeof e&&"data"in e?e.data:e;return t?.enabled&&t?.sourceDataModelFieldId?t:void 0},[S,V]),ee=i(()=>{return Z?.sourceDataModelFieldId&&Y?(e=J.nestedPathSegments||$,t=Z.sourceDataModelFieldId,e&&0!==e.length?[...e.map(e=>void 0!==e.index?`${e.dmfId}.${e.index}`:e.dmfId),t].filter(Boolean).join("."):t):"";var e,t},[Z?.sourceDataModelFieldId,Y,J.nestedPathSegments,$]),te=ee?X?.watch?.(ee):void 0,oe=i(()=>{if(!Z?.sourceDataModelFieldId)return null;const e=Z.sourceDataModelFieldId;if(Y&&void 0!==te){const t="string"==typeof te||"number"==typeof te?{id:String(te),value:te}:te,o=g(Z,{[e]:t});if(o)return o}const t=G?.[e];if(void 0!==t){const o=g(Z,{[e]:t});if(o)return o}const o=J.rawItemDataByDmfId?.[e],n=J.getDmfValue(e),i=o??n;if(void 0!==i){const t=g(Z,{[e]:i});if(t)return t}return null},[Z,J,Y,G,te]),ne=D,ie=oe??(_??K??null),re=(Z&&Z.enabled?n:B)||U||null,ae=i(()=>{const e=Z&&Z.enabled,t=e?Z:ne,o=ie,i=(e?n:B)||n;return void 0!==t||null!==o||void 0!==B?r.map(P,e=>a(e)?s(e,{...e.props,parentStyleVariantConfig:t,parentContainerWithVariantsId:i,parentContainerActiveVariant:o}):e):P},[P,Z,ie,ne,n,B]),se=E===n,de=se?{backgroundImage:Q?.backgroundImage??V?.backgroundImage??{imageFile:{url:""}}}:V,{containerProps:le={},containerStyle:ce={}}=O||{};let me={...ce};const{containerProps:pe={},containerStyle:ue={}}=T||{};let fe={...ue};H&&se&&(fe={...ue,...H},me={...ce,...H});const ge=c("xs"),xe=R??ge;let Ce=xe?fe:me;if(ie&&k){const e=x(k,ie,xe?"compact":"wide");Object.keys(e).length>0&&(Ce={...Ce,...e})}const he=xe?pe:le,ye={...A,...he,enableBackgroundImage:Ce?.enableBackgroundImage},Ie=i(()=>({entityId:n,entityType:S,entityName:F,entity:"container",libraryEntityId:w?.containerLibraryId||void 0,activeStyleVariant:ie,parentReplicatorWithVariants:re,parentStyleVariantConfig:Z&&Z.enabled?Z:ne}),[S,F,n,w,ie,re,Z,ne]),je=L?{onClick:e=>{e&&e.stopPropagation(),N(Ie,!1)},onDoubleClick:e=>{e?.stopPropagation(),N(Ie,!0)}}:{},be=`${n}.${xe?"mobile":"desktop"}`,ve=o`
2
2
  display: flex;
3
3
  position: relative; /* default containing block for absolute children */
4
4
  overflow: visible; /* allow positioned children to overflow */
@@ -9,7 +9,7 @@ import{jsx as e,Fragment as t}from"../node_modules/@emotion/react/jsx-runtime/di
9
9
  `;if("slider"===S||"journey_driven"===S)return e("div",{className:"slider-container",style:{width:"inherit",height:"inherit",display:"block",position:"relative"},...je,children:e(p,{"data-configuration-id":n,fade:"journey_driven"===S,css:o`
10
10
  ${ve};
11
11
  ${j};
12
- `,...v,...he,children:w})},be);const Se=e(C,{containerId:n,replicatorFieldId:W,nestedPathSegments:$,properties:V,config:k,renderWrapper:(t,i,r)=>{const a=x(k,r,xe?"compact":"wide"),s=r&&Object.keys(a).length>0?{...Ce,...a}:Ce,d=o`
12
+ `,...v,...he,children:P})},be);const Se=e(C,{containerId:n,replicatorFieldId:W,nestedPathSegments:$,properties:V,config:k,renderWrapper:(t,i,r)=>{const a=x(k,r,xe?"compact":"wide"),s=r&&Object.keys(a).length>0?{...Ce,...a}:Ce,d=o`
13
13
  display: flex;
14
14
  position: relative;
15
15
  overflow: visible;
@@ -17,5 +17,5 @@ import{jsx as e,Fragment as t}from"../node_modules/@emotion/react/jsx-runtime/di
17
17
  ${s};
18
18
  ${y(ye?.enableBackgroundImage,de?.backgroundImage?.imageFile?.url)}
19
19
  ${L?I({theme:z,selected:se}):void 0}
20
- `;return e("div",{id:`${n}-${void 0!==t?t:"single"}`,css:d,...L?{"data-configuration-id":n}:{},...je,children:i})},children:w}),Fe={form:e(u,{...A?.formProps,children:ae}),form_step:e(f,{id:n,...A?.formStepProps,metadata:P,containerProps:ye,children:ae}),replicator:Y&&W?e(h,{replicatorFieldId:W,nestedPathSegments:$,minInstances:A?.minInstances,maxInstances:A?.maxInstances,children:Se}):Se};if("replicator"===S)return e(t,{children:Fe.replicator});return e("div",{id:n,className:"empty_state"===S?"zeal-container zeal-empty-state":"zeal-container",css:ve,...L?{"data-configuration-id":n}:{},...je,children:Fe[S]||ae},be)});export{S as Container};
20
+ `;return e("div",{id:`${n}-${void 0!==t?t:"single"}`,css:d,...L?{"data-configuration-id":n}:{},...je,children:i})},children:P}),Fe={form:e(u,{...A?.formProps,children:ae}),filter:e(u,{...A?.formProps,children:ae}),form_step:e(f,{id:n,...A?.formStepProps,metadata:w,containerProps:ye,children:ae}),replicator:Y&&W?e(h,{replicatorFieldId:W,nestedPathSegments:$,minInstances:A?.minInstances,maxInstances:A?.maxInstances,children:Se}):Se};if("replicator"===S)return e(t,{children:Fe.replicator});return e("div",{id:n,className:"empty_state"===S?"zeal-container zeal-empty-state":"zeal-container",css:ve,...L?{"data-configuration-id":n}:{},...je,children:Fe[S]||ae},be)});export{S as Container};
21
21
  //# sourceMappingURL=Container.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Container.js","sources":["../../../../src/containers/Container.tsx"],"sourcesContent":[null],"names":["sliderSettings","dots","infinite","autoplay","autoplaySpeed","arrows","slidesToShow","slidesToScroll","adaptiveHeight","swipeToSlide","Container","memo","id","type","name","config","children","metadata","isMobile","properties","nestedPathSegments","replicatorFieldId","parentStyleVariantConfig","parentContainerWithVariantsId","parentContainerActiveVariant","theme","useTheme","props","wide","compact","containerReplicatorFieldId","isConfigurationMode","onConfigurationItemClicked","selectedConfigurationItemId","currentStyleProperties","currentContentProperties","formId","localState","useOrganismContext","containerRuntime","useContainerRuntime","activeVariant","runtimeParentVariant","containerId","parentContainerId","formContext","useFormContext","isFormMode","Boolean","containerStyleVariantConfig","useMemo","propsSvc","styleVariantConfig","svcData","data","enabled","sourceDataModelFieldId","undefined","formPath","segments","fieldName","length","map","seg","index","dmfId","filter","join","watchedFormValue","watch","containerOwnVariant","sourceField","normalized","String","value","resolved","resolveActiveVariant","stateVal","rawValue","rawItemDataByDmfId","fieldValue","getDmfValue","runtimeVal","inheritedVariantConfig","containerWithVariantsId","childrenWithVariantProps","hasOwnConfig","variantConfigToPass","activeVariantToPass","variantsContainerId","Children","child","isValidElement","cloneElement","selected","mergedProperties","backgroundImage","imageFile","url","containerProps","wideContainerProps","containerStyle","savedWideContainerStyles","wideContainerStyles","compactContainerProps","savedCompactContainerStyles","compactContainerStyles","isXs","useMediaQuery","isMobileProp","styles","variantStyles","getVariantContainerStyles","Object","keys","mergedContainerProps","enableBackgroundImage","configurationItemData","entityId","entityType","entityName","entity","libraryEntityId","containerLibraryId","activeStyleVariant","parentReplicatorWithVariants","configurationsItemInfo","onClick","e","stopPropagation","onDoubleClick","key","containerCss","css","getBackgroundImageStyles","getConfigurationWrapperStyle","_jsx","className","style","width","height","display","position","Slider","fade","slickStyles","replicatorContent","ReplicatorContainer","renderWrapper","iterationIndex","innerChildren","renderActiveVariant","mergedStyles","variantContainerCss","containersMap","form","FormContainer","formProps","form_step","FormStepContainer","formStepProps","replicator","ReplicatorFormSetup","minInstances","maxInstances","_Fragment"],"mappings":"o6DAgCA,MAAMA,EAA2B,CAC/BC,MAAM,EACNC,UAAU,EACVC,UAAU,EACVC,cAAe,IACfC,QAAQ,EACRC,aAAc,EACdC,eAAgB,EAChBC,gBAAgB,EAChBC,cAAc,GAGHC,EAYTC,EACF,EACEC,KACAC,OACAC,OACAC,SACAC,WACAC,WACAC,WACAC,aACAC,qBAAqB,GACrBC,oBACAC,2BACAC,gCACAC,mCAEA,MAAMC,EAAQC,KAERC,MAAEA,EAAKC,KAAEA,EAAIC,QAAEA,GAAYd,GAAU,CAAA,EAGrCe,EAA6BT,GAAqBM,GAAON,mBAEzDU,oBACJA,EAAmBC,2BACnBA,EAA0BC,4BAC1BA,EAA2BC,uBAC3BA,EAAsBC,yBACtBA,EAAwBC,OACxBA,EAAMC,WACNA,GACEC,IAGEC,EAAmBC,KACjBC,cAAeC,EAAsBC,YAAaC,GACxDL,EAGIM,EAAcC,IAC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EACnBV,mBAAoBA,EACpBD,WAAYA,EACZJ,OAAQA,EACRqI,cAAe,CAACC,EAAgBC,EAAeC,KAE7C,MACMxC,EAAgBC,EACpBjG,EACAwI,EAHmB1C,GAAe,UAAY,QAQ1C2C,EACJD,GAAuBtC,OAAOC,KAAKH,GAAelD,OAAS,EACvD,IAAKiD,MAAWC,GAChBD,GAEA2C,EAAsBpB,CAAG;;;;;cAK3BmB;cACAlB,EACAnB,IAAsBC,sBACtBrB,IAAkBC,iBAAiBC,WAAWC;cAE9CnE,EAAsBwG,EAA6B,CAAE9G,QAAOqE,mBAAcrC;YAG9E,OACE+E,EAAA,MAAA,CAEE5H,GAAI,GAAGA,UAAyB6C,IAAnB4F,EAA+BA,EAAiB,WAC7DhB,IAAKoB,KACA1H,EAAsB,CAAE,wBAAyBnB,GAAO,CAAA,KACzDkH,YAEHwB,KAKNtI,SAAAA,IAIC0I,GAAwE,CAC5EC,KAAMnB,EAACoB,EAAa,IAAKjI,GAAOkI,UAAY7I,SAAAqE,KAC5CyE,UACEtB,EAACuB,GACCnJ,GAAIA,KACAe,GAAOqI,cACX/I,SAAUA,EACVkF,eAAgBgB,GAAoBnG,SAEnCqE,KAGL4E,WACElH,GAAcjB,EACZ0G,EAAC0B,GACC7I,kBAAmBS,EACnBV,mBAAoBA,EACpB+I,aAAcxI,GAAOwI,aACrBC,aAAczI,GAAOyI,aAEpBpJ,SAAAkI,KACmB,IAO5B,GAAa,eAATrI,EACF,OAAO2H,EAAG6B,EAAA,CAAArJ,SAAA0I,GAAcO,aAO1B,OACEzB,EACE,MAAA,CAAA5H,GAAIA,EAEJ6H,UANO,gBAAT5H,EAAyB,kCAAoC,iBAO3DwH,IAAKD,MACArG,EAAsB,CAAE,wBAAyBnB,GAAO,CAAA,KACzDkH,GAAsB9G,SAEzB0I,GAAc7I,IAAgDwE,IAN1D8C"}
1
+ {"version":3,"file":"Container.js","sources":["../../../../src/containers/Container.tsx"],"sourcesContent":[null],"names":["sliderSettings","dots","infinite","autoplay","autoplaySpeed","arrows","slidesToShow","slidesToScroll","adaptiveHeight","swipeToSlide","Container","memo","id","type","name","config","children","metadata","isMobile","properties","nestedPathSegments","replicatorFieldId","parentStyleVariantConfig","parentContainerWithVariantsId","parentContainerActiveVariant","theme","useTheme","props","wide","compact","containerReplicatorFieldId","isConfigurationMode","onConfigurationItemClicked","selectedConfigurationItemId","currentStyleProperties","currentContentProperties","formId","localState","useOrganismContext","containerRuntime","useContainerRuntime","activeVariant","runtimeParentVariant","containerId","parentContainerId","formContext","useFormContext","isFormMode","Boolean","containerStyleVariantConfig","useMemo","propsSvc","styleVariantConfig","svcData","data","enabled","sourceDataModelFieldId","undefined","formPath","segments","fieldName","length","map","seg","index","dmfId","filter","join","watchedFormValue","watch","containerOwnVariant","sourceField","normalized","String","value","resolved","resolveActiveVariant","stateVal","rawValue","rawItemDataByDmfId","fieldValue","getDmfValue","runtimeVal","inheritedVariantConfig","containerWithVariantsId","childrenWithVariantProps","hasOwnConfig","variantConfigToPass","activeVariantToPass","variantsContainerId","Children","child","isValidElement","cloneElement","selected","mergedProperties","backgroundImage","imageFile","url","containerProps","wideContainerProps","containerStyle","savedWideContainerStyles","wideContainerStyles","compactContainerProps","savedCompactContainerStyles","compactContainerStyles","isXs","useMediaQuery","isMobileProp","styles","variantStyles","getVariantContainerStyles","Object","keys","mergedContainerProps","enableBackgroundImage","configurationItemData","entityId","entityType","entityName","entity","libraryEntityId","containerLibraryId","activeStyleVariant","parentReplicatorWithVariants","configurationsItemInfo","onClick","e","stopPropagation","onDoubleClick","key","containerCss","css","getBackgroundImageStyles","getConfigurationWrapperStyle","_jsx","className","style","width","height","display","position","Slider","fade","slickStyles","replicatorContent","ReplicatorContainer","renderWrapper","iterationIndex","innerChildren","renderActiveVariant","mergedStyles","variantContainerCss","containersMap","form","FormContainer","formProps","form_step","FormStepContainer","formStepProps","replicator","ReplicatorFormSetup","minInstances","maxInstances","_Fragment"],"mappings":"o6DAgCA,MAAMA,EAA2B,CAC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,UACEtB,EAACuB,GACCnJ,GAAIA,KACAe,GAAOqI,cACX/I,SAAUA,EACVkF,eAAgBgB,GAAoBnG,SAEnCqE,KAGL4E,WACElH,GAAcjB,EACZ0G,EAAC0B,GACC7I,kBAAmBS,EACnBV,mBAAoBA,EACpB+I,aAAcxI,GAAOwI,aACrBC,aAAczI,GAAOyI,aAEpBpJ,SAAAkI,KACmB,IAO5B,GAAa,eAATrI,EACF,OAAO2H,EAAG6B,EAAA,CAAArJ,SAAA0I,GAAcO,aAO1B,OACEzB,EACE,MAAA,CAAA5H,GAAIA,EAEJ6H,UANO,gBAAT5H,EAAyB,kCAAoC,iBAO3DwH,IAAKD,MACArG,EAAsB,CAAE,wBAAyBnB,GAAO,CAAA,KACzDkH,GAAsB9G,SAEzB0I,GAAc7I,IAAgDwE,IAN1D8C"}
@@ -4,9 +4,9 @@ import { ValidationMode } from 'react-hook-form';
4
4
  import { SizesTypes } from 'theme';
5
5
  import type { AnyObject, Nullable, StylesType } from '../../typescript';
6
6
  import { Molecule } from './moleculeTypes';
7
- export type ContainerType = 'default' | 'row' | 'column' | 'slider' | 'form' | 'form_purpose' | 'form_step' | 'dynamic' | 'journey_driven' | 'journey_driven_step' | 'replicator' | 'empty_state';
7
+ export type ContainerType = 'default' | 'row' | 'column' | 'slider' | 'form' | 'form_purpose' | 'form_step' | 'filter' | 'dynamic' | 'journey_driven' | 'journey_driven_step' | 'replicator' | 'empty_state';
8
8
  export type ContainerTemplateType = 'row_content_container';
9
- export type WrappedContainerType = Extract<ContainerType, 'form' | 'form_step' | 'replicator'>;
9
+ export type WrappedContainerType = Extract<ContainerType, 'form' | 'form_step' | 'filter' | 'replicator'>;
10
10
  export type DmfId = string;
11
11
  export type ContainerPositionType = 'fixed' | 'sticky' | 'static' | 'relative';
12
12
  export type ContainerAlignItemsType = 'start' | 'center' | 'end' | 'stretch';
@@ -1,2 +1,2 @@
1
- import{getDataByPath as e}from"../../../containers/utils/dataPathUtils.js";import"../../../contexts/AccountButtonContext/AccountButtonContext.js";import"react/jsx-runtime";import"../../../node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js";import{useState as t,useMemo as o,useContext as n,useCallback as r}from"react";import"../../../node_modules/stylis/dist/umd/stylis.js";import"../../../node_modules/@babel/runtime/helpers/extends.js";import"../../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js";import"../../../contexts/ApiContext/ApiContext.js";import{useContainerRuntime as a}from"../../../contexts/ContainerRuntimeContext/ContainerRuntimeContext.js";import"../../../contexts/FormStepContext/FormStepContext.js";import{useFormContext as i}from"../../../node_modules/react-hook-form/dist/index.esm.mjs.js";import"../../../contexts/LayoutContext/LayoutContext.js";import"../../../theme/theme.js";import"../../../theme/provider.js";import"../../../theme/toastStyles.js";import"../../../contexts/MlrRichTextViewerContext/MlrRichTextViewerContext.js";import"../../../contexts/OrganismContext/OrganismContext.js";import{useOrganismContext as s}from"../../../contexts/OrganismContext/useOrganismContext.js";import"../../../contexts/PopupContext/PopupContext.js";import{usePopupContext as l}from"../../../contexts/PopupContext/usePopupContext.js";import{useReplicatorForm as c}from"../../../contexts/ReplicatorFormContext/ReplicatorFormContext.js";import{useReplicatorRegistry as d}from"../../../contexts/ReplicatorRegistryContext/ReplicatorRegistryContext.js";import"../../../contexts/StateContext/StateContext.js";import{useStateContext as u}from"../../../contexts/StateContext/useStateContext.js";import{WebpageContext as g}from"../../../contexts/WebpageContext/WebpageContext.js";import{useSubmitForm as f}from"../../../contexts/ApiContext/globalQueries/form/useSubmitForm.js";import{encodeObjectToBase64Url as m,getByPath as p,composeRwoParamsV2 as y}from"../../../helpers/rwoContext.js";import{checkIsDataDrivenLink as w,resolveDataDrivenLink as h,navigateToExternalLink as I,checkIsInternalLink as v,downloadFile as x}from"../../../helpers/utils.js";const b=e=>{if(null==e)return e;if("object"==typeof e&&null!==e){const t=e;if("id"in t&&null!==t.id&&void 0!==t.id)return t.id;if("value"in t&&null!==t.value&&void 0!==t.value)return t.value}return e},C=e=>{if(null==e)return;const t=b(e);return"string"==typeof t||"number"==typeof t||"boolean"==typeof t?String(t):void 0},F=e=>{if(null==e)return;const t=b(e);return"string"==typeof t||"number"==typeof t||"boolean"==typeof t?String(t):void 0},k=e=>e&&"object"==typeof e?Object.entries(e).reduce((e,[t,o])=>{const n=F(o);return void 0!==n&&(e[t]=n),e},{}):{},O=e=>{if(null==e)return{value:e};if("object"==typeof e&&null!==e){const t=e;if("id"in t||"value"in t)return{...t}}return{value:e}},R=(e,t)=>{const o=Object.keys(t);if(0===o.length)return!1;if(o.some(o=>void 0!==e[o]&&JSON.stringify(e[o])===JSON.stringify(t[o])))return!0;for(const n of Object.values(e))if(Array.isArray(n))for(const e of n)if(e&&"object"==typeof e){const n=e;if(o.some(e=>void 0!==n[e]&&JSON.stringify(n[e])===JSON.stringify(t[e])))return!0}return!1},_=(e,t)=>{if(0!==Object.keys(t).length)for(let o=0;o<e.length;o+=1){const n=e[o];if(n&&"object"==typeof n&&R(n,t))return o}},A=(R,A={})=>{const{properties:S,moleculeId:j,onClick:T,disabled:D}=R,{onActionStart:E,onActionComplete:P,onActionError:L,onAllActionsComplete:N,stopOnError:B=!0,executeAsync:V=!0}=A,[M,J]=t(!1),[U,W]=t(-1),[$,q]=t([]),[K,X]=t(null),Y=o(()=>{const e=S?.action,t=e?.action,o=t||e;return o?Array.isArray(o)?o:o&&"object"==typeof o&&"type"in o?[o]:[]:[]},[S?.action]),{setActivePopup:G,clearActivePopup:H}=l(),Q=i()||{},z=s?.()||{},Z=a?.()||{},ee=u?.()||{},te=c(),oe=d(),ne=n(g),{onInternalNavigation:re,formId:ae,routing:ie,submitHandler:se,localState:le,localStateObject:ce,organismInfo:de,prefillData:ue}=z,{submitForm:ge}=f()||{},fe=r(async e=>{if(!e.link)throw new Error("Link configuration missing");if(w(e.link)){const t={};if(Z?.rawItemDataByDmfId&&Object.assign(t,Z.rawItemDataByDmfId),Q&&"function"==typeof Q.getValues){const e=Q.getValues();Object.keys(e).forEach(o=>{o in t||(t[o]=e[o])})}const o=ce?.data;o&&Object.keys(o).forEach(e=>{e in t||(t[e]=o[e])}),ce&&Object.keys(ce).forEach(e=>{e in t||(t[e]=ce[e])}),ee?.stateConfig&&Object.keys(ee.stateConfig).forEach(e=>{e in t||(t[e]=ee.stateConfig[e])});const n=h(e.link,t);if(!n)return;if(n.isExternal)I(n.destination);else{let e;if(n.recordId){const t={rwoRecordId:n.recordId};e={rwoContext:m(t)}}re?.({link:n.destination,webpageAlias:n.webpageAlias,query:e})}return}if(v(e.link)){const t={};return e.link?.targetFormId&&(t.organismId=String(e.link?.targetFormId)),e.link?.rwoKey&&(t.rwo=String(e.link?.rwoKey)),void re?.({link:e.link.internalLink||"",query:t})}I(e.link.externalLink||"")},[Z,Q,ce,ee,re]),me=r(async e=>{if(!e.download)throw new Error("Download configuration missing");x(e.download.url,e.download.name)},[]),pe=r(e=>{const t=e?.open_popup,o=t?.organismId;if(!o)throw new Error("Popup configuration missing");G?.({id:o})},[G]),ye=r(async e=>{if(!Q?.handleSubmit)throw new Error("Form context not available for submit action");const t=(ae??"").toString();if(!t)throw new Error("Form ID missing in OrganismContext for submit action");let o,n=ie?.rwoRecordIdFromUrl;if(!n)try{const e=new URLSearchParams(window.location.search),o=e.get("rwoContext"),r=e.get("selectedWebpageId");if(o&&r){const e=JSON.parse(atob(o))[r];if(e){const o=e[t];o?.rwoRecordId?n=o.rwoRecordId:e.rwoRecordId&&(n=e.rwoRecordId)}}}catch{}return await Q.handleSubmit(async r=>{const a={formId:t,data:r};let i;n&&(a.rwoRecordId=n);try{if(se)i=await se(a);else{if(!ge)return;i=await ge(a)}}catch(c){const t=e.submit?.onError?.link;if(t&&t.internalLink)if(v(t)){const e={};t?.rwoKey&&(e.rwo=String(t?.rwoKey)),re?.({link:t.internalLink||"",query:e})}else I(t.externalLink||"");throw c}o=i;const s=ee?.stateHandler;"function"==typeof s&&t&&s({[t]:{interacted:"completed"}});const l=e?.submit?.onSuccess?.link;if(l&&(l.internalLink||l.externalLink))if(v(l)){const e={};l?.rwoKey&&(e.rwo=String(l?.rwoKey)),re?.({link:l.internalLink||"",query:e})}else I(l.externalLink||"");return Q?.reset?.(),i},async e=>{throw new Error("Form validation failed")})(),o},[Q,ge,re,ae,ie]),we=r(async(t,o)=>{const n=Ce(t,o);if(!n)throw new Error(`Navigation configuration missing for ${o}`);switch(o){case"navigateToCreateForm":if(n.targetFormId){const e=`?organismId=${n.targetFormId}`;re?.({link:e})}break;case"navigateToEditForm":if(n.targetFormId){const e=(()=>{try{return new URLSearchParams(window.location.search).get("selectedWebpageId")||void 0}catch{return}})(),t=n?.link,o=t?.internalLink||`?organismId=${n.targetFormId}`,r=e=>{const t=e.match(/webpageId=([^/&#?]+)/);return t?t[1]:void 0},a=t?.internalLink?r(t.internalLink):void 0;if(e&&a===e){const t=(()=>{try{const e=new URLSearchParams(window.location.search).get("rwoContext");return e?JSON.parse(atob(e)):{}}catch{return{}}})(),r=e;if(r){const e=t[r]||{};if(e.rwoRecordId){const o={...t,[r]:{...e,[n.targetFormId]:{useWebpageContext:!0}}},a={rwoContext:btoa(JSON.stringify(o))},i=window.location.pathname+window.location.search;re?.({link:i,query:a})}else re?.({link:o})}else re?.({link:o})}else re?.({link:o})}break;case"navigateToPrepopulateForm":{const t=n?.link?.internalLink||"",{targetFormId:o}=n||{};if(!o&&!t)break;const r=Array.isArray(n?.fieldMap)?n.fieldMap:[],a=(()=>{try{return new URLSearchParams(window.location.search).get("selectedWebpageId")||void 0}catch{return}})(),i=t?(e=>{const t=e.match(/webpageId=([^/&#?]+)/);return t?t[1]:void 0})(t):void 0,s=a&&i===a,l=Z?.rawItemDataByDmfId||{},c=Z?.nestedPathSegments||[],d=Z?.itemIndex,u=(()=>{const e=ce?.data;if(e&&Object.keys(e).length>0)return e;if(le&&"object"==typeof le&&Object.keys(le).length>0)return le;if(ce&&"object"==typeof ce){const e=ce;if(Object.values(e).some(e=>Array.isArray(e)))return e}return{}})(),g=Q&&"function"==typeof Q.getValues?Q.getValues():{},f=new Map;r.forEach(e=>{e.sourceParent&&f.set(e.source,e.sourceParent)});const m=(e=>{const t=new Map;return e.forEach(e=>{const o=`${e.sourceParent||"root"}:${e.destinationParent||"root"}`;t.has(o)||t.set(o,{sourceParent:e.sourceParent,destinationParent:e.destinationParent,mappings:[]}),t.get(o).mappings.push(e)}),Array.from(t.values())})(r),p=((e,t)=>{const o={},n=new Set;return e.filter(e=>e.sourceParent&&e.destinationParent).forEach(e=>{e.destinationParent&&n.add(e.destinationParent)}),e.filter(e=>!e.destinationParent).forEach(e=>{e.mappings.forEach(e=>{if(n.has(e.destination))return;const r=t(e.source);void 0!==r&&(Array.isArray(r)?o[e.destination]=r:o[e.destination]=O(r))})}),e.filter(e=>e.sourceParent&&e.destinationParent).forEach(e=>{const n=t(e.sourceParent);if(!Array.isArray(n))return;const r=n.map(t=>{const o={},n=t;return e.mappings.forEach(e=>{const t=n[e.source];void 0!==t&&(o[e.destination]=O(t))}),o});o[e.destinationParent]=r}),o})(m,t=>((t,o,n,r,a,i,s)=>{if(console.log("[resolveFieldFromDataLayer] DEBUG:",{fieldId:t,parentFieldId:o,containerDataKeys:Object.keys(n),containerDataSample:JSON.stringify(n).slice(0,200),localStateDataKeys:Object.keys(r),nestedPathSegments:a,currentItemIndex:s}),void 0!==n[t])return console.log("[resolveFieldFromDataLayer] Found in containerData"),n[t];if(o){const i=r[o];if(console.log("[resolveFieldFromDataLayer] parentArray exists:",Array.isArray(i),"length:",Array.isArray(i)?i.length:0),Array.isArray(i)){if(Object.keys(n).length>0){const e=_(i,n);if(console.log("[resolveFieldFromDataLayer] PRIORITY 1 - matchedIndex:",e),void 0!==e){const o=i[e];if(void 0!==o[t])return console.log("[resolveFieldFromDataLayer] Found via PRIORITY 1 at index:",e),o[t]}}for(let e=0;e<a.length;e+=1){const n=a[e];if(n.dmfId===o&&void 0!==n.index&&(console.log("[resolveFieldFromDataLayer] PRIORITY 2 - found segment at idx:",e,"with index:",n.index),n.index<i.length)){const e=i[n.index];if(e&&void 0!==e[t])return console.log("[resolveFieldFromDataLayer] Found via PRIORITY 2 at index:",n.index),e[t]}}if(void 0!==s&&s<i.length){console.log("[resolveFieldFromDataLayer] PRIORITY 3 - trying currentItemIndex:",s);const e=i[s];if(e&&void 0!==e[t])return console.log("[resolveFieldFromDataLayer] Found via PRIORITY 3 at index:",s),e[t]}const l=a.findIndex(e=>e.dmfId===o);if(console.log("[resolveFieldFromDataLayer] PRIORITY 4 - parentSegmentIndex:",l),l>=0){const o=a.slice(0,l+1),n=e(r,o);if(n&&void 0!==n[t])return console.log("[resolveFieldFromDataLayer] Found via PRIORITY 4"),n[t]}}}for(let l=a.length-1;l>=0;l-=1){const o=a[l],i=r[o.dmfId];if(Array.isArray(i)){if(Object.keys(n).length>0){const e=_(i,n);if(void 0!==e){const o=i[e];if(void 0!==o[t])return o[t]}}const e=o.index;if(void 0!==e&&e<i.length){const o=i[e];if(o&&void 0!==o[t])return o[t]}}else{const o=a.slice(0,l+1),n=e(r,o);if(n&&void 0!==n[t])return n[t]}}return void 0!==r[t]?r[t]:void 0!==i[t]?i[t]:void 0})(t,f.get(t),l,u,c,g,d)),y=(()=>{try{const e=new URLSearchParams(window.location.search).get("rwoContext");return e?JSON.parse(atob(e)):{}}catch{return{}}})(),w={};if(Object.keys(p).length>0&&o){const e=i||a;let t;if(e){const n=y[e]||{},r=n[o]||{};t={...y,[e]:{...n,[o]:{...r,prefillData:p}}}}else t={...y,[o]:{prefillData:p}};w.rwoContext=btoa(JSON.stringify(t))}if(s){const e=window.location.pathname+window.location.search;re?.({link:e,query:Object.keys(w).length>0?w:void 0,state:{prefill:p,targetFormId:o}})}else{const e=t||`?organismId=${encodeURIComponent(String(o||""))}`;re?.({link:e,query:Object.keys(w).length>0?w:void 0,state:{prefill:p,targetFormId:o}})}}break;case"navigateToOrganismWithRwoContext":{const e=n?.sourceDataModelFieldId,t=n?.targetOrganismIds,o=n?.inputParams;if(!Array.isArray(t)||0===t.length)break;const r=(()=>{try{return new URLSearchParams(window.location.search).get("selectedWebpageId")||void 0}catch{return}})(),a=Q&&"function"==typeof Q.getValues?Q.getValues():{},i=Z?.rawItemDataByDmfId||{},s=ce?.data;console.log("═══════════════════════════════════════════════════════════"),console.log("[navigate_to_organism_with_rwo_context] DEBUG - Available Contexts"),console.log("═══════════════════════════════════════════════════════════"),console.log("Action Config:",{sourceFieldId:e,targetOrganismIds:t,inputParams:o}),console.log("-----------------------------------------------------------"),console.log("1. FORM CONTEXT (form.getValues()):",{available:Boolean(Q&&"function"==typeof Q.getValues),keys:Object.keys(a),sample:Object.keys(a).slice(0,5).reduce((e,t)=>(e[t]=a[t],e),{}),fullData:a}),console.log("-----------------------------------------------------------"),console.log("2. CONTAINER CONTEXT (containerRuntime.rawItemDataByDmfId):",{available:Boolean(Z?.rawItemDataByDmfId),keys:Object.keys(i),sample:Object.keys(i).slice(0,5).reduce((e,t)=>(e[t]=i[t],e),{}),fullData:i,itemIndex:Z?.itemIndex,nestedPathSegments:Z?.nestedPathSegments}),console.log("-----------------------------------------------------------"),console.log("3. LOCAL STATE OBJECT (localStateObject):",{available:Boolean(ce),hasDataProperty:Boolean(s),localStateObjectKeys:ce?Object.keys(ce):[],localStateDataKeys:s?Object.keys(s):[],localStateObjectSample:ce?JSON.stringify(ce).slice(0,200):null,localStateDataSample:s?JSON.stringify(s).slice(0,200):null,fullLocalStateObject:ce,fullLocalStateData:s}),console.log("-----------------------------------------------------------"),console.log("4. GLOBAL STATE (stateCtx.stateConfig):",{available:Boolean(ee?.stateConfig),keys:ee?.stateConfig?Object.keys(ee.stateConfig):[],sample:ee?.stateConfig?JSON.stringify(ee.stateConfig).slice(0,200):null}),console.log("═══════════════════════════════════════════════════════════");const l=(()=>{try{const e=new URLSearchParams(window.location.search).get("rwoContext");return e?JSON.parse(atob(e)):{}}catch{return{}}})(),c={};let d,u;if(console.log("-----------------------------------------------------------"),console.log("[navigate_to_organism_with_rwo_context] Starting value resolution..."),console.log("-----------------------------------------------------------"),o&&o.length>0){const e=ce?.data;o.forEach(t=>{let o,n;if(console.log(`\n[Resolving] sourceFieldId: "${t.sourceFieldId}"`),void 0===o&&void 0!==a[t.sourceFieldId]&&(o=a[t.sourceFieldId],n="formValues",console.log(" ✓ Found in FORM CONTEXT:",o)),void 0===o&&void 0!==i[t.sourceFieldId]&&(o=i[t.sourceFieldId],n="containerData",console.log(" ✓ Found in CONTAINER CONTEXT:",o)),void 0===o&&e&&void 0!==e[t.sourceFieldId]&&(o=e[t.sourceFieldId],n="localStateData",console.log(" ✓ Found in LOCAL STATE DATA:",o)),void 0===o&&ce){const e=p(ce,t.sourceFieldId);void 0!==e&&(o=e,n="localStateObject (direct path)",console.log(" ✓ Found in LOCAL STATE OBJECT (direct path):",o))}if(void 0===o&&ee?.stateConfig){const e=p(ee.stateConfig,t.sourceFieldId);void 0!==e&&(o=e,n="stateConfig",console.log(" ✓ Found in GLOBAL STATE:",o))}if(null!=o&&""!==o){const e=b(o);c[t.sourceFieldId]=e,console.log(" → Extracted value:",e,`(from ${n})`),!d&&e&&(d=String(e),console.log(" → Set as primaryRecordId:",d))}else console.log(" ✗ NOT FOUND in any context")}),d&&(c.rwoRecordId=d),console.log("\n[Result - inputParams mode]"),console.log(" organismContextValues:",c),console.log(" primaryRecordId:",d)}else if(e){let t,o;if(console.log(`\n[Single sourceFieldId mode] sourceFieldId: "${e}"`),!t&&Q&&"function"==typeof Q.getValues){const n=p(Q.getValues(),e);t=C(n),t&&(o="formValues",console.log(" ✓ Found in FORM CONTEXT:",n,"→",t))}if(!t&&Z?.rawItemDataByDmfId){const n=Z.rawItemDataByDmfId[e];t=F(n),t&&(o="containerData",console.log(" ✓ Found in CONTAINER CONTEXT:",n,"→",t))}if(!t&&ce){const n=ce?.data;if(n&&void 0!==n[e]){const r=n[e];t=F(r),t&&(o="localStateData",console.log(" ✓ Found in LOCAL STATE DATA:",r,"→",t))}if(!t){const n=p(ce,e);t=F(n),t&&(o="localStateObject (direct path)",console.log(" ✓ Found in LOCAL STATE OBJECT (direct path):",n,"→",t))}}if(!t&&ee?.stateConfig){const n=p(ee.stateConfig,e);t=F(n),t&&(o="stateConfig",console.log(" ✓ Found in GLOBAL STATE:",n,"→",t))}if(!t&&r){const e=l[r]||{};"string"==typeof e.rwoRecordId&&(t=e.rwoRecordId,o="existing webpage rwoRecordId",console.log(" ✓ Found in EXISTING WEBPAGE CONTEXT:",t))}t||console.log(" ✗ NOT FOUND in any context"),t&&(d=t,c.rwoRecordId=String(t),c[String(e)]=String(t),console.log(" → Set as primaryRecordId:",d,`(from ${o})`)),console.log("\n[Result - single sourceFieldId mode]"),console.log(" organismContextValues:",c),console.log(" primaryRecordId:",d)}if(console.log("\n═══════════════════════════════════════════════════════════"),console.log("[navigate_to_organism_with_rwo_context] FINAL RESULT"),console.log("═══════════════════════════════════════════════════════════"),console.log("Target Organism IDs:",t),console.log("Organism Context Values:",c),console.log("Primary Record ID:",d),console.log("═══════════════════════════════════════════════════════════\n"),r){const e=l[r]||{},o={...e};t.forEach(t=>{const n=e[t]||{};o[t]={...n,...c}}),u={...l,[r]:o}}else u={...l},t.forEach(e=>{const t=l[e]||{};u[e]={...t,...c}});const g={};(Object.keys(c).length>0||void 0!==d)&&(g.rwoContext=btoa(JSON.stringify(u)));const f=window.location.pathname+window.location.search;re?.({link:f,query:g})}break;case"navigateToPageWithRwoContext":{const e=n?.link,t=!1!==n?.includeRwoRecordId,o=Array.isArray(n?.rwoContextMapping)?n.rwoContextMapping:[];if(!e?.internalLink)break;const r=(e=>{const t=e.match(/webpageId=([^/&#?]+)/);return t?t[1]:void 0})(e.internalLink),a=n?.sourceDataModelFieldId,i=Q&&"function"==typeof Q.getValues?Q.getValues():{};let s=ie?.rwoRecordIdFromUrl;if(a){if(!s&&Z?.rawItemDataByDmfId){const e=Z.rawItemDataByDmfId[a];s=F(e)}if(!s){const e=p(i,a);s=C(e)}if(!s&&ce){const e=p(ce,a);s=F(e)}if(!s&&ee?.stateConfig){const e=p(ee.stateConfig,a);s=F(e)}s||(s=String(a))}const l=k(ce?.data),c=k(le),d=k(Z?.itemDataByDmfId),u=k(Z?.rawItemDataByDmfId),g=[ee?.stateConfig,ce,le,i,c,d,u,l].reduce((e,t)=>(t&&"object"==typeof t&&Object.assign(e,t),e),{}),{query:f}=y({selectedWebpageId:r,includeRwoRecordId:t,recordId:s,mapping:o,contextSource:g});re?.({link:e.internalLink,query:f})}}},[re,Q,le,ce,de,ie]),he=r(e=>{Q?.reset?.()},[Q]),Ie=r(e=>{Q?.reset?.(),"function"==typeof H?H():"function"==typeof G&&G(null)},[Q,H,G]),ve=r(e=>{const t=e?.add_replicator||{},o=t.targetReplicatorFieldId;let n,r,a,i;if(o&&oe){const e=oe.getReplicator(o);if(!e)return void console.error(`[add_replicator] Replicator "${o}" not found in registry. Make sure the replicator container is rendered and has the correct replicatorFieldId.`);n=o,r=oe.canAdd(o),a=e=>oe.append(o,e),i=e.fieldArrayMethods.fields.length}else{if(!te)return void console.error("[add_replicator] No target replicator available. Either:\n1. Configure targetReplicatorFieldId in the button action, or\n2. Place the button inside a replicator container.");n=te.replicatorFieldId,r=te.canAdd,a=te.fieldArrayMethods.append,i=te.fieldArrayMethods.fields.length}if(r&&(a({}),!1!==t.scrollToNew)){const e=`[data-replicator-instance="${n}-${i}"]`,t=(o=3)=>{requestAnimationFrame(()=>{setTimeout(()=>{const n=document.querySelector(e);n?n.scrollIntoView({behavior:"smooth",block:"nearest"}):o>0&&t(o-1)},50)})};t()}},[te,oe]),xe=r(e=>{const t=(e?.delete_replicator||{}).targetReplicatorFieldId;let o,n,r,a,i;if(t&&oe){const e=oe.getReplicator(t);if(!e)return void console.error(`[delete_replicator] Replicator "${t}" not found in registry. Make sure the replicator container is rendered and has the correct replicatorFieldId.`);o=t,n=oe.canRemove(t),r=e=>oe.remove(t,e),a=e.fieldArrayMethods.fields.length}else{if(!te)return void console.error("[delete_replicator] No target replicator available. Either:\n1. Configure targetReplicatorFieldId in the button action, or\n2. Place the button inside a replicator container.");o=te.replicatorFieldId,n=te.canRemove,r=te.fieldArrayMethods.remove,a=te.fieldArrayMethods.fields.length}n&&(i=void 0===Z?.itemIndex||t?a-1:Z.itemIndex,i<0||i>=a?console.error(`[delete_replicator] Invalid index ${i} (length: ${a})`):r(i))},[te,oe,Z]),be=r(async e=>{if(!ne?.openAIChat)return;if(ne.isAIAvailable&&!ne.isAIAvailable())return;const t=e?.open_ai_chat||e?.openAIChat||{},o=t?.inputParams,n=t?.cortexAgentId,r=Q&&"function"==typeof Q.getValues?Q.getValues():{},a=Z?.rawItemDataByDmfId||{},i={};if(o&&o.length>0)o.forEach(e=>{const t=r[e.sourceFieldId]??a[e.sourceFieldId];null!=t&&(i[e.sourceFieldId]=b(t))});else{const e=t?.cortexRwoContext?.sourceDataModelFieldId;if(e){let t;if(!t&&Z?.rawItemDataByDmfId){const o=Z.rawItemDataByDmfId[e];t=F(o)}if(!t&&Q&&"function"==typeof Q.getValues){const o=p(Q.getValues(),e);t=C(o)}if(!t&&ce){const o=p(ce,e);t=F(o)}if(!t&&ee?.stateConfig){const o=p(ee.stateConfig,e);t=F(o)}t&&(i.rwoRecordId=t,i.sourceDataModelFieldId=e)}}const s=Object.keys(i).length>0?{inputParams:i}:void 0;await ne.openAIChat({cortexAgentId:n,cortexRwoContext:s,inputParams:Object.keys(i).length>0?i:void 0})},[ne,Q,ce,Z,ee]),Ce=r((e,t)=>{switch(t){case"navigateToCreateForm":return e.navigateToCreateForm||e.navigate_to_create_form||null;case"navigateToEditForm":return e.navigateToEditForm||e.navigate_to_edit_form||null;case"navigateToPrepopulateForm":return e.navigateToPrepopulateForm||e.navigate_to_prepopulate_form||null;case"navigateToOrganismWithRwoContext":return e.navigateToOrganismWithRwoContext||e.navigate_to_organism_with_rwo_context||null;case"navigateToPageWithRwoContext":return e.navigateToPageWithRwoContext||e.navigate_to_page_with_rwo_context||null;default:return null}},[]),Fe=r(async(e,t)=>{E?.(e,t);try{let o;switch(e.type){case"link":await fe(e),o="Link executed";break;case"download":await me(e),o="Download executed";break;case"submit":o=await ye(e);break;case"open_popup":pe(e),o="Popup opened";break;case"navigate_to_create_form":await we(e,"navigateToCreateForm"),o="Navigation executed";break;case"navigate_to_edit_form":await we(e,"navigateToEditForm"),o="Navigation executed";break;case"navigate_to_prepopulate_form":await we(e,"navigateToPrepopulateForm"),o="Navigation executed";break;case"navigate_to_organism_with_rwo_context":await we(e,"navigateToOrganismWithRwoContext"),o="Navigation executed";break;case"navigate_to_page_with_rwo_context":await we(e,"navigateToPageWithRwoContext"),o="Navigation executed";break;case"reset":he(e),o="Reset executed";break;case"destroy":Ie(e),o="Destroy executed";break;case"open_ai_chat":await be(e),o="AI Chat opened";break;case"add_replicator":ve(e),o="Replicator instance added";break;case"delete_replicator":xe(e),o="Replicator instance deleted";break;default:throw new Error(`Unsupported action type: ${e.type}`)}return P?.(e,t,o),o}catch(o){const n=o instanceof Error?o:new Error(String(o));if(L?.(e,t,n),B)throw n;return null}},[E,P,L,B,fe,me,ye,pe,we,he,Ie,be,ve,xe]),ke=r(async()=>{if(0===Y.length)return[];J(!0),W(0),q([]),X(null);try{const e=Y.some(e=>"submit"===e?.type),t=new Set(["link","navigate_to_create_form","navigate_to_edit_form","navigate_to_prepopulate_form","navigate_to_organism_with_rwo_context","navigate_to_page_with_rwo_context"]),o=e=>"close"===e||"destroy"===e,n=(()=>{if(!e)return Y;return[...Y.filter(e=>e&&"submit"!==e.type&&!t.has(e.type)&&!o(e.type)),...Y.filter(e=>e&&"submit"===e.type),...Y.filter(e=>e&&o(e.type)),...Y.filter(e=>e&&t.has(e.type))]})(),r=[];for(let a=0;a<n.length;a+=1){W(a);const e=await Fe(n[a],a);r.push(e),q([...r])}return N?.(r),r}catch(e){const t=e instanceof Error?e:new Error(String(e));throw X(t),t}finally{J(!1),W(-1)}},[Y,Fe,N,V,B]),Oe=r(e=>{D||(T?T(e):Y.length>0&&ke().catch(()=>{}))},[D,j,T,Y,ke]);return{executeActions:ke,handleAction:Oe,isExecuting:M,currentActionIndex:U,results:$,error:K}};export{A as useButtonAction};
1
+ import{getDataByPath as e}from"../../../containers/utils/dataPathUtils.js";import"../../../contexts/AccountButtonContext/AccountButtonContext.js";import"react/jsx-runtime";import"../../../node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js";import{useState as t,useMemo as o,useContext as n,useCallback as r}from"react";import"../../../node_modules/stylis/dist/umd/stylis.js";import"../../../node_modules/@babel/runtime/helpers/extends.js";import"../../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js";import"../../../contexts/ApiContext/ApiContext.js";import{useContainerRuntime as a}from"../../../contexts/ContainerRuntimeContext/ContainerRuntimeContext.js";import"../../../contexts/FormStepContext/FormStepContext.js";import{useFormContext as i}from"../../../node_modules/react-hook-form/dist/index.esm.mjs.js";import"../../../contexts/LayoutContext/LayoutContext.js";import"../../../theme/theme.js";import"../../../theme/provider.js";import"../../../theme/toastStyles.js";import"../../../contexts/MlrRichTextViewerContext/MlrRichTextViewerContext.js";import"../../../contexts/OrganismContext/OrganismContext.js";import{useOrganismContext as s}from"../../../contexts/OrganismContext/useOrganismContext.js";import"../../../contexts/PopupContext/PopupContext.js";import{usePopupContext as c}from"../../../contexts/PopupContext/usePopupContext.js";import{useReplicatorForm as l}from"../../../contexts/ReplicatorFormContext/ReplicatorFormContext.js";import{useReplicatorRegistry as d}from"../../../contexts/ReplicatorRegistryContext/ReplicatorRegistryContext.js";import"../../../contexts/StateContext/StateContext.js";import{useStateContext as u}from"../../../contexts/StateContext/useStateContext.js";import{WebpageContext as g}from"../../../contexts/WebpageContext/WebpageContext.js";import{useSubmitForm as f}from"../../../contexts/ApiContext/globalQueries/form/useSubmitForm.js";import{encodeObjectToBase64Url as m,getByPath as p,composeRwoParamsV2 as y}from"../../../helpers/rwoContext.js";import{checkIsDataDrivenLink as h,resolveDataDrivenLink as w,navigateToExternalLink as I,checkIsInternalLink as v,downloadFile as x}from"../../../helpers/utils.js";const b=e=>{if(null==e)return e;if("object"==typeof e&&null!==e){const t=e;if("id"in t&&null!==t.id&&void 0!==t.id)return t.id;if("value"in t&&null!==t.value&&void 0!==t.value)return t.value}return e},C=e=>{if(null==e)return;const t=b(e);return"string"==typeof t||"number"==typeof t||"boolean"==typeof t?String(t):void 0},F=e=>{if(null==e)return;const t=b(e);return"string"==typeof t||"number"==typeof t||"boolean"==typeof t?String(t):void 0},k=e=>e&&"object"==typeof e?Object.entries(e).reduce((e,[t,o])=>{const n=F(o);return void 0!==n&&(e[t]=n),e},{}):{},O=e=>{if(null==e)return{value:e};if("object"==typeof e&&null!==e){const t=e;if("id"in t||"value"in t)return{...t}}return{value:e}},R=(e,t)=>{const o=Object.keys(t);if(0===o.length)return!1;if(o.every(o=>void 0!==e[o]&&JSON.stringify(e[o])===JSON.stringify(t[o])))return!0;for(const n of Object.values(e))if(Array.isArray(n))for(const e of n)if(e&&"object"==typeof e){const n=e;if(o.every(e=>void 0!==n[e]&&JSON.stringify(n[e])===JSON.stringify(t[e])))return!0}return!1},_=(e,t)=>{const o=Object.keys(t);if(0!==o.length){console.log("[findParentIndexByContainerData] Searching for exact match of",o.length,"keys");for(let o=0;o<e.length;o+=1){const n=e[o];if(n&&"object"==typeof n){const e=R(n,t);if(console.log(`[findParentIndexByContainerData] Index ${o} matches:`,e),e)return o}}console.log("[findParentIndexByContainerData] No exact match found")}},A=(R,A={})=>{const{properties:S,moleculeId:D,onClick:j,disabled:T}=R,{onActionStart:P,onActionComplete:E,onActionError:L,onAllActionsComplete:N,stopOnError:B=!0,executeAsync:V=!0}=A,[M,J]=t(!1),[$,U]=t(-1),[W,q]=t([]),[K,X]=t(null),Y=o(()=>{const e=S?.action,t=e?.action,o=t||e;return o?Array.isArray(o)?o:o&&"object"==typeof o&&"type"in o?[o]:[]:[]},[S?.action]),{setActivePopup:G,clearActivePopup:H}=c(),Q=i()||{},z=s?.()||{},Z=a?.()||{},ee=u?.()||{},te=l(),oe=d(),ne=n(g),{onInternalNavigation:re,formId:ae,routing:ie,submitHandler:se,localState:ce,localStateObject:le,organismInfo:de,prefillData:ue}=z,{submitForm:ge}=f()||{},fe=r(async e=>{if(!e.link)throw new Error("Link configuration missing");if(h(e.link)){const t={};if(Z?.rawItemDataByDmfId&&Object.assign(t,Z.rawItemDataByDmfId),Q&&"function"==typeof Q.getValues){const e=Q.getValues();Object.keys(e).forEach(o=>{o in t||(t[o]=e[o])})}const o=le?.data;o&&Object.keys(o).forEach(e=>{e in t||(t[e]=o[e])}),le&&Object.keys(le).forEach(e=>{e in t||(t[e]=le[e])}),ee?.stateConfig&&Object.keys(ee.stateConfig).forEach(e=>{e in t||(t[e]=ee.stateConfig[e])});const n=w(e.link,t);if(!n)return;if(n.isExternal)I(n.destination);else{let e;if(n.recordId){const t={rwoRecordId:n.recordId};e={rwoContext:m(t)}}re?.({link:n.destination,webpageAlias:n.webpageAlias,query:e})}return}if(v(e.link)){const t={};return e.link?.targetFormId&&(t.organismId=String(e.link?.targetFormId)),e.link?.rwoKey&&(t.rwo=String(e.link?.rwoKey)),void re?.({link:e.link.internalLink||"",query:t})}I(e.link.externalLink||"")},[Z,Q,le,ee,re]),me=r(async e=>{if(!e.download)throw new Error("Download configuration missing");x(e.download.url,e.download.name)},[]),pe=r(e=>{const t=e?.open_popup,o=t?.organismId;if(!o)throw new Error("Popup configuration missing");G?.({id:o})},[G]),ye=r(async e=>{if(!Q?.handleSubmit)throw new Error("Form context not available for submit action");const t=(ae??"").toString();if(!t)throw new Error("Form ID missing in OrganismContext for submit action");let o,n=ie?.rwoRecordIdFromUrl;if(!n)try{const e=new URLSearchParams(window.location.search),o=e.get("rwoContext"),r=e.get("selectedWebpageId");if(o&&r){const e=JSON.parse(atob(o))[r];if(e){const o=e[t];o?.rwoRecordId?n=o.rwoRecordId:e.rwoRecordId&&(n=e.rwoRecordId)}}}catch{}return await Q.handleSubmit(async r=>{const a={formId:t,data:r};let i;n&&(a.rwoRecordId=n);try{if(se)i=await se(a);else{if(!ge)return;i=await ge(a)}}catch(d){const t=e.submit?.onError?.link;if(t&&t.internalLink)if(v(t)){const e={};t?.rwoKey&&(e.rwo=String(t?.rwoKey)),re?.({link:t.internalLink||"",query:e})}else I(t.externalLink||"");throw d}o=i;const s=ee?.stateHandler;"function"==typeof s&&t&&s({[t]:{interacted:"completed"}});const c=e?.submit?.onSuccess?.link;if(c&&(c.internalLink||c.externalLink))if(v(c)){const e={};c?.rwoKey&&(e.rwo=String(c?.rwoKey)),re?.({link:c.internalLink||"",query:e})}else I(c.externalLink||"");const l=e.submit?.resetAfterSubmit;return!1!==l&&Q?.reset?.(),i},async e=>{throw new Error("Form validation failed")})(),o},[Q,ge,re,ae,ie]),he=r(async(t,o)=>{const n=Ce(t,o);if(!n)throw new Error(`Navigation configuration missing for ${o}`);switch(o){case"navigateToCreateForm":if(n.targetFormId){const e=`?organismId=${n.targetFormId}`;re?.({link:e})}break;case"navigateToEditForm":if(n.targetFormId){const e=(()=>{try{return new URLSearchParams(window.location.search).get("selectedWebpageId")||void 0}catch{return}})(),t=n?.link,o=t?.internalLink||`?organismId=${n.targetFormId}`,r=e=>{const t=e.match(/webpageId=([^/&#?]+)/);return t?t[1]:void 0},a=t?.internalLink?r(t.internalLink):void 0;if(e&&a===e){const t=(()=>{try{const e=new URLSearchParams(window.location.search).get("rwoContext");return e?JSON.parse(atob(e)):{}}catch{return{}}})(),r=e;if(r){const e=t[r]||{};if(e.rwoRecordId){const o={...t,[r]:{...e,[n.targetFormId]:{useWebpageContext:!0}}},a={rwoContext:btoa(JSON.stringify(o))},i=window.location.pathname+window.location.search;re?.({link:i,query:a})}else re?.({link:o})}else re?.({link:o})}else re?.({link:o})}break;case"navigateToPrepopulateForm":{const t=n?.link?.internalLink||"",{targetFormId:o}=n||{};if(!o&&!t)break;const r=Array.isArray(n?.fieldMap)?n.fieldMap:[],a=(()=>{try{return new URLSearchParams(window.location.search).get("selectedWebpageId")||void 0}catch{return}})(),i=t?(e=>{const t=e.match(/webpageId=([^/&#?]+)/);return t?t[1]:void 0})(t):void 0,s=a&&i===a,c=Z?.rawItemDataByDmfId||{},l=Z?.nestedPathSegments||[],d=Z?.itemIndex,u=(()=>{const e=le?.data;if(e&&Object.keys(e).length>0)return e;if(ce&&"object"==typeof ce&&Object.keys(ce).length>0)return ce;if(le&&"object"==typeof le){const e=le;if(Object.values(e).some(e=>Array.isArray(e)))return e}return{}})(),g=Q&&"function"==typeof Q.getValues?Q.getValues():{},f=new Map;r.forEach(e=>{e.sourceParent&&f.set(e.source,e.sourceParent)});const m=(e=>{const t=new Map;return e.forEach(e=>{const o=`${e.sourceParent||"root"}:${e.destinationParent||"root"}`;t.has(o)||t.set(o,{sourceParent:e.sourceParent,destinationParent:e.destinationParent,mappings:[]}),t.get(o).mappings.push(e)}),Array.from(t.values())})(r),p=((e,t)=>{const o={},n=new Set;return e.filter(e=>e.sourceParent&&e.destinationParent).forEach(e=>{e.destinationParent&&n.add(e.destinationParent)}),e.filter(e=>!e.destinationParent).forEach(e=>{e.mappings.forEach(e=>{if(n.has(e.destination))return;const r=t(e.source);void 0!==r&&(Array.isArray(r)?o[e.destination]=r:o[e.destination]=O(r))})}),e.filter(e=>e.sourceParent&&e.destinationParent).forEach(e=>{const n=t(e.sourceParent);if(!Array.isArray(n))return;const r=n.map(t=>{const o={},n=t;return e.mappings.forEach(e=>{const t=n[e.source];void 0!==t&&(o[e.destination]=O(t))}),o});o[e.destinationParent]=r}),o})(m,t=>((t,o,n,r,a,i,s)=>{if(console.log("[resolveFieldFromDataLayer] DEBUG:",{fieldId:t,parentFieldId:o,containerDataKeys:Object.keys(n),containerDataSample:JSON.stringify(n).slice(0,200),localStateDataKeys:Object.keys(r),nestedPathSegments:a,currentItemIndex:s}),void 0!==n[t])return console.log("[resolveFieldFromDataLayer] Found in containerData"),n[t];if(o){const i=r[o];if(console.log("[resolveFieldFromDataLayer] parentArray exists:",Array.isArray(i),"length:",Array.isArray(i)?i.length:0),Array.isArray(i)){if(Object.keys(n).length>0){const e=_(i,n);if(console.log("[resolveFieldFromDataLayer] PRIORITY 1 - matchedIndex:",e),void 0!==e){const o=i[e];if(void 0!==o[t])return console.log("[resolveFieldFromDataLayer] Found via PRIORITY 1 at index:",e),o[t]}}for(let e=0;e<a.length;e+=1){const n=a[e];if(n.dmfId===o&&void 0!==n.index&&(console.log("[resolveFieldFromDataLayer] PRIORITY 2 - found segment at idx:",e,"with index:",n.index),n.index<i.length)){const e=i[n.index];if(e&&void 0!==e[t])return console.log("[resolveFieldFromDataLayer] Found via PRIORITY 2 at index:",n.index),e[t]}}if(void 0!==s&&s<i.length){console.log("[resolveFieldFromDataLayer] PRIORITY 3 - trying currentItemIndex:",s);const e=i[s];if(e&&void 0!==e[t])return console.log("[resolveFieldFromDataLayer] Found via PRIORITY 3 at index:",s),e[t]}const c=a.findIndex(e=>e.dmfId===o);if(console.log("[resolveFieldFromDataLayer] PRIORITY 4 - parentSegmentIndex:",c),c>=0){const o=a.slice(0,c+1),n=e(r,o);if(n&&void 0!==n[t])return console.log("[resolveFieldFromDataLayer] Found via PRIORITY 4"),n[t]}}}for(let c=a.length-1;c>=0;c-=1){const o=a[c],i=r[o.dmfId];if(Array.isArray(i)){if(Object.keys(n).length>0){const e=_(i,n);if(void 0!==e){const o=i[e];if(void 0!==o[t])return o[t]}}const e=o.index;if(void 0!==e&&e<i.length){const o=i[e];if(o&&void 0!==o[t])return o[t]}}else{const o=a.slice(0,c+1),n=e(r,o);if(n&&void 0!==n[t])return n[t]}}return void 0!==r[t]?r[t]:void 0!==i[t]?i[t]:void 0})(t,f.get(t),c,u,l,g,d)),y=(()=>{try{const e=new URLSearchParams(window.location.search).get("rwoContext");return e?JSON.parse(atob(e)):{}}catch{return{}}})(),h={};if(Object.keys(p).length>0&&o){const e=i||a;let t;if(e){const n=y[e]||{},r=n[o]||{};t={...y,[e]:{...n,[o]:{...r,prefillData:p}}}}else t={...y,[o]:{prefillData:p}};h.rwoContext=btoa(JSON.stringify(t))}if(s){const e=window.location.pathname+window.location.search;re?.({link:e,query:Object.keys(h).length>0?h:void 0,state:{prefill:p,targetFormId:o}})}else{const e=t||`?organismId=${encodeURIComponent(String(o||""))}`;re?.({link:e,query:Object.keys(h).length>0?h:void 0,state:{prefill:p,targetFormId:o}})}}break;case"navigateToOrganismWithRwoContext":{const e=n?.sourceDataModelFieldId,t=n?.targetOrganismIds,o=n?.inputParams;if(!Array.isArray(t)||0===t.length)break;const r=(()=>{try{return new URLSearchParams(window.location.search).get("selectedWebpageId")||void 0}catch{return}})(),a=Q&&"function"==typeof Q.getValues?Q.getValues():{},i=Z?.rawItemDataByDmfId||{},s=le?.data;console.log("═══════════════════════════════════════════════════════════"),console.log("[navigate_to_organism_with_rwo_context] DEBUG - Available Contexts"),console.log("═══════════════════════════════════════════════════════════"),console.log("Action Config:",{sourceFieldId:e,targetOrganismIds:t,inputParams:o}),console.log("-----------------------------------------------------------"),console.log("1. FORM CONTEXT (form.getValues()):",{available:Boolean(Q&&"function"==typeof Q.getValues),keys:Object.keys(a),sample:Object.keys(a).slice(0,5).reduce((e,t)=>(e[t]=a[t],e),{}),fullData:a}),console.log("-----------------------------------------------------------"),console.log("2. CONTAINER CONTEXT (containerRuntime.rawItemDataByDmfId):",{available:Boolean(Z?.rawItemDataByDmfId),keys:Object.keys(i),sample:Object.keys(i).slice(0,5).reduce((e,t)=>(e[t]=i[t],e),{}),fullData:i,itemIndex:Z?.itemIndex,nestedPathSegments:Z?.nestedPathSegments}),console.log("-----------------------------------------------------------"),console.log("3. LOCAL STATE OBJECT (localStateObject):",{available:Boolean(le),hasDataProperty:Boolean(s),localStateObjectKeys:le?Object.keys(le):[],localStateDataKeys:s?Object.keys(s):[],localStateObjectSample:le?JSON.stringify(le).slice(0,200):null,localStateDataSample:s?JSON.stringify(s).slice(0,200):null,fullLocalStateObject:le,fullLocalStateData:s}),console.log("-----------------------------------------------------------"),console.log("4. GLOBAL STATE (stateCtx.stateConfig):",{available:Boolean(ee?.stateConfig),keys:ee?.stateConfig?Object.keys(ee.stateConfig):[],sample:ee?.stateConfig?JSON.stringify(ee.stateConfig).slice(0,200):null}),console.log("═══════════════════════════════════════════════════════════");const c=(()=>{try{const e=new URLSearchParams(window.location.search).get("rwoContext");return e?JSON.parse(atob(e)):{}}catch{return{}}})(),l={};let d,u;if(console.log("-----------------------------------------------------------"),console.log("[navigate_to_organism_with_rwo_context] Starting value resolution..."),console.log("-----------------------------------------------------------"),o&&o.length>0){const e=le?.data;o.forEach(t=>{let o,n;if(console.log(`\n[Resolving] sourceFieldId: "${t.sourceFieldId}"`),void 0===o&&void 0!==a[t.sourceFieldId]&&(o=a[t.sourceFieldId],n="formValues",console.log(" ✓ Found in FORM CONTEXT:",o)),void 0===o&&void 0!==i[t.sourceFieldId]&&(o=i[t.sourceFieldId],n="containerData",console.log(" ✓ Found in CONTAINER CONTEXT:",o)),void 0===o&&e&&void 0!==e[t.sourceFieldId]&&(o=e[t.sourceFieldId],n="localStateData",console.log(" ✓ Found in LOCAL STATE DATA:",o)),void 0===o&&le){const e=p(le,t.sourceFieldId);void 0!==e&&(o=e,n="localStateObject (direct path)",console.log(" ✓ Found in LOCAL STATE OBJECT (direct path):",o))}if(void 0===o&&ee?.stateConfig){const e=p(ee.stateConfig,t.sourceFieldId);void 0!==e&&(o=e,n="stateConfig",console.log(" ✓ Found in GLOBAL STATE:",o))}if(null!=o&&""!==o){const e=b(o);l[t.sourceFieldId]=e,console.log(" → Extracted value:",e,`(from ${n})`),!d&&e&&(d=String(e),console.log(" → Set as primaryRecordId:",d))}else console.log(" ✗ NOT FOUND in any context")}),d&&(l.rwoRecordId=d),console.log("\n[Result - inputParams mode]"),console.log(" organismContextValues:",l),console.log(" primaryRecordId:",d)}else if(e){let t,o;if(console.log(`\n[Single sourceFieldId mode] sourceFieldId: "${e}"`),!t&&Q&&"function"==typeof Q.getValues){const n=p(Q.getValues(),e);t=C(n),t&&(o="formValues",console.log(" ✓ Found in FORM CONTEXT:",n,"→",t))}if(!t&&Z?.rawItemDataByDmfId){const n=Z.rawItemDataByDmfId[e];t=F(n),t&&(o="containerData",console.log(" ✓ Found in CONTAINER CONTEXT:",n,"→",t))}if(!t&&le){const n=le?.data;if(n&&void 0!==n[e]){const r=n[e];t=F(r),t&&(o="localStateData",console.log(" ✓ Found in LOCAL STATE DATA:",r,"→",t))}if(!t){const n=p(le,e);t=F(n),t&&(o="localStateObject (direct path)",console.log(" ✓ Found in LOCAL STATE OBJECT (direct path):",n,"→",t))}}if(!t&&ee?.stateConfig){const n=p(ee.stateConfig,e);t=F(n),t&&(o="stateConfig",console.log(" ✓ Found in GLOBAL STATE:",n,"→",t))}if(!t&&r){const e=c[r]||{};"string"==typeof e.rwoRecordId&&(t=e.rwoRecordId,o="existing webpage rwoRecordId",console.log(" ✓ Found in EXISTING WEBPAGE CONTEXT:",t))}t||console.log(" ✗ NOT FOUND in any context"),t&&(d=t,l.rwoRecordId=String(t),l[String(e)]=String(t),console.log(" → Set as primaryRecordId:",d,`(from ${o})`)),console.log("\n[Result - single sourceFieldId mode]"),console.log(" organismContextValues:",l),console.log(" primaryRecordId:",d)}if(console.log("\n═══════════════════════════════════════════════════════════"),console.log("[navigate_to_organism_with_rwo_context] FINAL RESULT"),console.log("═══════════════════════════════════════════════════════════"),console.log("Target Organism IDs:",t),console.log("Organism Context Values:",l),console.log("Primary Record ID:",d),console.log("═══════════════════════════════════════════════════════════\n"),r){const e=c[r]||{},o={...e};t.forEach(t=>{const n=e[t]||{};o[t]={...n,...l}}),u={...c,[r]:o}}else u={...c},t.forEach(e=>{const t=c[e]||{};u[e]={...t,...l}});const g={};(Object.keys(l).length>0||void 0!==d)&&(g.rwoContext=btoa(JSON.stringify(u)));const f=window.location.pathname+window.location.search;re?.({link:f,query:g})}break;case"navigateToPageWithRwoContext":{const e=n?.link,t=!1!==n?.includeRwoRecordId,o=Array.isArray(n?.rwoContextMapping)?n.rwoContextMapping:[];if(!e?.internalLink)break;const r=(e=>{const t=e.match(/webpageId=([^/&#?]+)/);return t?t[1]:void 0})(e.internalLink),a=n?.sourceDataModelFieldId,i=Q&&"function"==typeof Q.getValues?Q.getValues():{};let s=ie?.rwoRecordIdFromUrl;if(a){if(!s&&Z?.rawItemDataByDmfId){const e=Z.rawItemDataByDmfId[a];s=F(e)}if(!s){const e=p(i,a);s=C(e)}if(!s&&le){const e=p(le,a);s=F(e)}if(!s&&ee?.stateConfig){const e=p(ee.stateConfig,a);s=F(e)}s||(s=String(a))}const c=k(le?.data),l=k(ce),d=k(Z?.itemDataByDmfId),u=k(Z?.rawItemDataByDmfId),g=[ee?.stateConfig,le,ce,i,l,d,u,c].reduce((e,t)=>(t&&"object"==typeof t&&Object.assign(e,t),e),{}),{query:f}=y({selectedWebpageId:r,includeRwoRecordId:t,recordId:s,mapping:o,contextSource:g});re?.({link:e.internalLink,query:f})}}},[re,Q,ce,le,de,ie]),we=r(e=>{Q?.reset?.()},[Q]),Ie=r(e=>{Q?.reset?.(),"function"==typeof H?H():"function"==typeof G&&G(null)},[Q,H,G]),ve=r(e=>{const t=e?.add_replicator||{},o=t.targetReplicatorFieldId;let n,r,a,i;if(o&&oe){const e=oe.getReplicator(o);if(!e)return void console.error(`[add_replicator] Replicator "${o}" not found in registry. Make sure the replicator container is rendered and has the correct replicatorFieldId.`);n=o,r=oe.canAdd(o),a=e=>oe.append(o,e),i=e.fieldArrayMethods.fields.length}else{if(!te)return void console.error("[add_replicator] No target replicator available. Either:\n1. Configure targetReplicatorFieldId in the button action, or\n2. Place the button inside a replicator container.");n=te.replicatorFieldId,r=te.canAdd,a=te.fieldArrayMethods.append,i=te.fieldArrayMethods.fields.length}if(r&&(a({}),!1!==t.scrollToNew)){const e=`[data-replicator-instance="${n}-${i}"]`,t=(o=3)=>{requestAnimationFrame(()=>{setTimeout(()=>{const n=document.querySelector(e);n?n.scrollIntoView({behavior:"smooth",block:"nearest"}):o>0&&t(o-1)},50)})};t()}},[te,oe]),xe=r(e=>{const t=(e?.delete_replicator||{}).targetReplicatorFieldId;let o,n,r,a,i;if(t&&oe){const e=oe.getReplicator(t);if(!e)return void console.error(`[delete_replicator] Replicator "${t}" not found in registry. Make sure the replicator container is rendered and has the correct replicatorFieldId.`);o=t,n=oe.canRemove(t),r=e=>oe.remove(t,e),a=e.fieldArrayMethods.fields.length}else{if(!te)return void console.error("[delete_replicator] No target replicator available. Either:\n1. Configure targetReplicatorFieldId in the button action, or\n2. Place the button inside a replicator container.");o=te.replicatorFieldId,n=te.canRemove,r=te.fieldArrayMethods.remove,a=te.fieldArrayMethods.fields.length}n&&(i=void 0===Z?.itemIndex||t?a-1:Z.itemIndex,i<0||i>=a?console.error(`[delete_replicator] Invalid index ${i} (length: ${a})`):r(i))},[te,oe,Z]),be=r(async e=>{if(!ne?.openAIChat)return;if(ne.isAIAvailable&&!ne.isAIAvailable())return;const t=e?.open_ai_chat||e?.openAIChat||{},o=t?.inputParams,n=t?.cortexAgentId,r=Q&&"function"==typeof Q.getValues?Q.getValues():{},a=Z?.rawItemDataByDmfId||{},i={};if(o&&o.length>0)o.forEach(e=>{const t=r[e.sourceFieldId]??a[e.sourceFieldId];null!=t&&(i[e.sourceFieldId]=b(t))});else{const e=t?.cortexRwoContext?.sourceDataModelFieldId;if(e){let t;if(!t&&Z?.rawItemDataByDmfId){const o=Z.rawItemDataByDmfId[e];t=F(o)}if(!t&&Q&&"function"==typeof Q.getValues){const o=p(Q.getValues(),e);t=C(o)}if(!t&&le){const o=p(le,e);t=F(o)}if(!t&&ee?.stateConfig){const o=p(ee.stateConfig,e);t=F(o)}t&&(i.rwoRecordId=t,i.sourceDataModelFieldId=e)}}const s=Object.keys(i).length>0?{inputParams:i}:void 0;await ne.openAIChat({cortexAgentId:n,cortexRwoContext:s,inputParams:Object.keys(i).length>0?i:void 0})},[ne,Q,le,Z,ee]),Ce=r((e,t)=>{switch(t){case"navigateToCreateForm":return e.navigateToCreateForm||e.navigate_to_create_form||null;case"navigateToEditForm":return e.navigateToEditForm||e.navigate_to_edit_form||null;case"navigateToPrepopulateForm":return e.navigateToPrepopulateForm||e.navigate_to_prepopulate_form||null;case"navigateToOrganismWithRwoContext":return e.navigateToOrganismWithRwoContext||e.navigate_to_organism_with_rwo_context||null;case"navigateToPageWithRwoContext":return e.navigateToPageWithRwoContext||e.navigate_to_page_with_rwo_context||null;default:return null}},[]),Fe=r(async(e,t)=>{P?.(e,t);try{let o;switch(e.type){case"link":await fe(e),o="Link executed";break;case"download":await me(e),o="Download executed";break;case"submit":o=await ye(e);break;case"open_popup":pe(e),o="Popup opened";break;case"navigate_to_create_form":await he(e,"navigateToCreateForm"),o="Navigation executed";break;case"navigate_to_edit_form":await he(e,"navigateToEditForm"),o="Navigation executed";break;case"navigate_to_prepopulate_form":await he(e,"navigateToPrepopulateForm"),o="Navigation executed";break;case"navigate_to_organism_with_rwo_context":await he(e,"navigateToOrganismWithRwoContext"),o="Navigation executed";break;case"navigate_to_page_with_rwo_context":await he(e,"navigateToPageWithRwoContext"),o="Navigation executed";break;case"reset":we(e),o="Reset executed";break;case"destroy":Ie(e),o="Destroy executed";break;case"open_ai_chat":await be(e),o="AI Chat opened";break;case"add_replicator":ve(e),o="Replicator instance added";break;case"delete_replicator":xe(e),o="Replicator instance deleted";break;default:throw new Error(`Unsupported action type: ${e.type}`)}return E?.(e,t,o),o}catch(o){const n=o instanceof Error?o:new Error(String(o));if(L?.(e,t,n),B)throw n;return null}},[P,E,L,B,fe,me,ye,pe,he,we,Ie,be,ve,xe]),ke=r(async()=>{if(0===Y.length)return[];J(!0),U(0),q([]),X(null);try{const e=Y.some(e=>"submit"===e?.type),t=new Set(["link","navigate_to_create_form","navigate_to_edit_form","navigate_to_prepopulate_form","navigate_to_organism_with_rwo_context","navigate_to_page_with_rwo_context"]),o=e=>"close"===e||"destroy"===e,n=(()=>{if(!e)return Y;return[...Y.filter(e=>e&&"submit"!==e.type&&!t.has(e.type)&&!o(e.type)),...Y.filter(e=>e&&"submit"===e.type),...Y.filter(e=>e&&o(e.type)),...Y.filter(e=>e&&t.has(e.type))]})(),r=[];for(let a=0;a<n.length;a+=1){U(a);const e=await Fe(n[a],a);r.push(e),q([...r])}return N?.(r),r}catch(e){const t=e instanceof Error?e:new Error(String(e));throw X(t),t}finally{J(!1),U(-1)}},[Y,Fe,N,V,B]),Oe=r(e=>{T||(j?j(e):Y.length>0&&ke().catch(()=>{}))},[T,D,j,Y,ke]);return{executeActions:ke,handleAction:Oe,isExecuting:M,currentActionIndex:$,results:W,error:K}};export{A as useButtonAction};
2
2
  //# sourceMappingURL=useButtonAction.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useButtonAction.js","sources":["../../../../../../src/molecules/Button/hooks/useButtonAction.ts"],"sourcesContent":[null],"names":["extractFieldValue","data","obj","id","undefined","value","getValueFromFormContext","extracted","String","getValueFromDisplayStructure","normalizeDmfMap","source","Object","entries","reduce","acc","key","normalized","wrapValueForFormContext","val","parentContainsContainerData","parentItem","containerData","containerKeys","keys","length","some","JSON","stringify","values","Array","isArray","nestedItem","nestedObj","findParentIndexByContainerData","parentArray","i","useButtonAction","props","options","properties","moleculeId","onClick","disabled","onActionStart","onActionComplete","onActionError","onAllActionsComplete","stopOnError","executeAsync","isExecuting","setIsExecuting","useState","currentActionIndex","setCurrentActionIndex","results","setResults","error","setError","actions","useMemo","actionContainer","action","nestedAction","actionConfig","setActivePopup","clearActivePopup","usePopupContext","form","useFormContext","organismCtx","useOrganismContext","containerRuntime","useContainerRuntime","stateCtx","useStateContext","replicatorFormContext","useReplicatorForm","replicatorRegistry","useReplicatorRegistry","webpageCtx","useContext","WebpageContext","onInternalNavigation","formId","organismFormId","routing","submitHandler","pageSubmitHandler","localState","localStateObject","organismInfo","prefillData","submitForm","useSubmitForm","executeLinkAction","useCallback","async","link","Error","checkIsDataDrivenLink","combinedData","rawItemDataByDmfId","assign","getValues","formValues","forEach","localStateData","stateConfig","resolved","resolveDataDrivenLink","isExternal","navigateToExternalLink","destination","query","recordId","rwoContextData","rwoRecordId","rwoContext","encodeObjectToBase64Url","webpageAlias","checkIsInternalLink","targetFormId","organismId","rwoKey","rwo","internalLink","externalLink","executeDownloadAction","download","downloadFile","url","name","executePopupAction","openPopup","open_popup","popupId","executeSubmitAction","handleSubmit","currentFormId","toString","submitResult","rwoRecordIdFromUrl","params","URLSearchParams","window","location","search","rwoContextParam","get","selectedWebpageId","webpageContext","parse","atob","organismContext","payload","result","err","errorLink","submit","onError","handler","stateHandler","interacted","successLink","onSuccess","reset","_invalid","executeNavigationAction","navigationType","config","getNavigationConfig","editCurrentWebpageId","editLinkObj","editLink","extractEditWebpageId","match","editTargetWebpageId","existingEditRwoContext","editContextWebpageId","existingWebpageContext","editRwoContext","useWebpageContext","editFormQuery","btoa","currentPath","pathname","baseInternalLink","fieldMap","prepopCurrentWebpageId","targetWebpageId","extractWebpageIdFromLink","isSamePageNavigation","prepopContainerData","prepopNestedPathSegments","nestedPathSegments","prepopItemIndex","itemIndex","prepopLocalStateData","objData","v","prepopFormValues","fieldParentMap","Map","m","sourceParent","set","mappingGroups","groups","mapping","destinationParent","has","mappings","push","from","groupMappingsByParent","prepopPrefill","resolveValue","destinationsWithInnerMappings","Set","filter","g","add","group","rawValue","sourceArray","destArray","map","srcItem","destItem","srcObj","buildDestinationValue","fieldId","parentFieldId","currentItemIndex","console","log","containerDataKeys","containerDataSample","slice","localStateDataKeys","matchedIndex","segIdx","segment","dmfId","index","parentSegmentIndex","findIndex","seg","parentPath","parentData","getDataByPath","segmentIndex","ancestorPath","ancestorData","resolveFieldFromDataLayer","existingPrepopRwoContext","prepopQuery","contextWebpageId","prepopRwoContext","existingOrganismContext","state","prefill","composed","encodeURIComponent","sourceFieldId","sourceDataModelFieldId","targetOrganismIds","inputParams","currentSelectedWebpageId","available","Boolean","sample","fullData","hasDataProperty","localStateObjectKeys","localStateObjectSample","localStateDataSample","fullLocalStateObject","fullLocalStateData","existingRwoContext","organismContextValues","primaryRecordId","newRwoContext","param","foundIn","raw","getByPath","extractedValue","fieldValue","existingWebpageCtx","orgId","existingOrgContext","navigationLink","linkObj","includeRwoRecordId","rwoContextMapping","normalizedLocalStateData","normalizedLocalState","normalizedContainerResolvedData","itemDataByDmfId","normalizedContainerRawData","contextSource","layer","composeRwoParamsV2","executeResetAction","executeDestroyAction","executeAddReplicatorAction","addConfig","add_replicator","targetReplicatorFieldId","targetReplicatorId","canAdd","appendFn","currentLength","entry","getReplicator","append","fieldArrayMethods","fields","replicatorFieldId","scrollToNew","selector","scrollToElement","retries","requestAnimationFrame","setTimeout","element","document","querySelector","scrollIntoView","behavior","block","executeDeleteReplicatorAction","delete_replicator","canRemove","removeFn","indexToRemove","remove","executeOpenAIChatAction","openAIChat","isAIAvailable","openAIChatConfig","open_ai_chat","cortexAgentIdOverride","cortexAgentId","chatParams","cortexRwoContext","resolvedRwoRecordId","type","navigateToCreateForm","navigate_to_create_form","navigateToEditForm","navigate_to_edit_form","navigateToPrepopulateForm","navigate_to_prepopulate_form","navigateToOrganismWithRwoContext","navigate_to_organism_with_rwo_context","navigateToPageWithRwoContext","navigate_to_page_with_rwo_context","executeSingleAction","executeActions","containsSubmit","a","navigationTypes","isCloser","t","orderedActions","executionResults","handleAction","event","catch"],"mappings":"upEAkCA,MAAMA,EAAqBC,IACzB,GAAIA,QAAqC,OAAOA,EAEhD,GAAoB,iBAATA,GAA8B,OAATA,EAAe,CAC7C,MAAMC,EAAMD,EAEZ,GAAI,OAAQC,GAAkB,OAAXA,EAAIC,SAA0BC,IAAXF,EAAIC,GACxC,OAAOD,EAAIC,GAGb,GAAI,UAAWD,GAAqB,OAAdA,EAAIG,YAAgCD,IAAdF,EAAIG,MAC9C,OAAOH,EAAIG,KAEd,CAED,OAAOJ,GAIHK,EAA2BL,IAC/B,GAAIA,QAAqC,OAEzC,MAAMM,EAAYP,EAAkBC,GACpC,MACuB,iBAAdM,GACc,iBAAdA,GACc,kBAAdA,EAEAC,OAAOD,QALhB,GAYIE,EAAgCR,IACpC,GAAIA,QAAqC,OAEzC,MAAMM,EAAYP,EAAkBC,GACpC,MACuB,iBAAdM,GACc,iBAAdA,GACc,kBAAdA,EAEAC,OA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AW,IAAIwT,GAChB,CAGD,OADAjU,IAAuBiU,GAChBA,CACR,CAAC,MAAOnN,GACP,MAAMpG,EAAQoG,aAAe1D,MAAQ0D,EAAM,IAAI1D,MAAM3F,OAAOqJ,IAG5D,MAFAnG,EAASD,GAEHA,CACP,CAAS,QACRN,GAAe,GACfG,GAAuB,EACxB,GACA,CAACK,EAAS6S,GAAqBzT,EAAsBE,EAAcD,IAGhEiU,GAAejR,EAClBkR,IACKvU,IAEAD,EACFA,EAAQwU,GACCvT,EAAQlC,OAAS,GAC1BgV,KAAiBU,MAAM,UAK3B,CAACxU,EAAUF,EAAYC,EAASiB,EAAS8S,KAG3C,MAAO,CACLA,kBACAQ,gBACA/T,cACAG,qBACAE,UACAE"}
1
+ {"version":3,"file":"useButtonAction.js","sources":["../../../../../../src/molecules/Button/hooks/useButtonAction.ts"],"sourcesContent":[null],"names":["extractFieldValue","data","obj","id","undefined","value","getValueFromFormContext","extracted","String","getValueFromDisplayStructure","normalizeDmfMap","source","Object","entries","reduce","acc","key","normalized","wrapValueForFormContext","val","parentContainsContainerData","parentItem","containerData","containerKeys","keys","length","every","JSON","stringify","values","Array","isArray","nestedItem","nestedObj","findParentIndexByContainerData","parentArray","console","log","i","matches","useButtonAction","props","options","properties","moleculeId","onClick","disabled","onActionStart","onActionComplete","onActionError","onAllActionsComplete","stopOnError","executeAsync","isExecuting","setIsExecuting","useState","currentActionIndex","setCurrentActionIndex","results","setResults","error","setError","actions","useMemo","actionContainer","action","nestedAction","actionConfig","setActivePopup","clearActivePopup","usePopupContext","form","useFormContext","organismCtx","useOrganismContext","containerRuntime","useContainerRuntime","stateCtx","useStateContext","replicatorFormContext","useReplicatorForm","replicatorRegistry","useReplicatorRegistry","webpageCtx","useContext","WebpageContext","onInternalNavigation","formId","organismFormId","routing","submitHandler","pageSubmitHandler","localState","localStateObject","organismInfo","prefillData","submitForm","useSubmitForm","executeLinkAction","useCallback","async","link","Error","checkIsDataDrivenLink","combinedData","rawItemDataByDmfId","assign","getValues","formValues","forEach","localStateData","stateConfig","resolved","resolveDataDrivenLink","isExternal","navigateToExternalLink","destination","query","recordId","rwoContextData","rwoRecordId","rwoContext","encodeObjectToBase64Url","webpageAlias","checkIsInternalLink","targetFormId","organismId","rwoKey","rwo","internalLink","externalLink","executeDownloadAction","download","downloadFile","url","name","executePopupAction","openPopup","open_popup","popupId","executeSubmitAction","handleSubmit","currentFormId","toString","submitResult","rwoRecordIdFromUrl","params","URLSearchParams","window","location","search","rwoContextParam","get","selectedWebpageId","webpageContext","parse","atob","organismContext","payload","result","err","errorLink","submit","onError","handler","stateHandler","interacted","successLink","onSuccess","resetAfterSubmit","reset","_invalid","executeNavigationAction","navigationType","config","getNavigationConfig","editCurrentWebpageId","editLinkObj","editLink","extractEditWebpageId","match","editTargetWebpageId","existingEditRwoContext","editContextWebpageId","existingWebpageContext","editRwoContext","useWebpageContext","editFormQuery","btoa","currentPath","pathname","baseInternalLink","fieldMap","prepopCurrentWebpageId","targetWebpageId","extractWebpageIdFromLink","isSamePageNavigation","prepopContainerData","prepopNestedPathSegments","nestedPathSegments","prepopItemIndex","itemIndex","prepopLocalStateData","objData","some","v","prepopFormValues","fieldParentMap","Map","m","sourceParent","set","mappingGroups","groups","mapping","destinationParent","has","mappings","push","from","groupMappingsByParent","prepopPrefill","resolveValue","destinationsWithInnerMappings","Set","filter","g","add","group","rawValue","sourceArray","destArray","map","srcItem","destItem","srcObj","buildDestinationValue","fieldId","parentFieldId","currentItemIndex","containerDataKeys","containerDataSample","slice","localStateDataKeys","matchedIndex","segIdx","segment","dmfId","index","parentSegmentIndex","findIndex","seg","parentPath","parentData","getDataByPath","segmentIndex","ancestorPath","ancestorData","resolveFieldFromDataLayer","existingPrepopRwoContext","prepopQuery","contextWebpageId","prepopRwoContext","existingOrganismContext","state","prefill","composed","encodeURIComponent","sourceFieldId","sourceDataModelFieldId","targetOrganismIds","inputParams","currentSelectedWebpageId","available","Boolean","sample","fullData","hasDataProperty","localStateObjectKeys","localStateObjectSample","localStateDataSample","fullLocalStateObject","fullLocalStateData","existingRwoContext","organismContextValues","primaryRecordId","newRwoContext","param","foundIn","raw","getByPath","extractedValue","fieldValue","existingWebpageCtx","orgId","existingOrgContext","navigationLink","linkObj","includeRwoRecordId","rwoContextMapping","normalizedLocalStateData","normalizedLocalState","normalizedContainerResolvedData","itemDataByDmfId","normalizedContainerRawData","contextSource","layer","composeRwoParamsV2","executeResetAction","executeDestroyAction","executeAddReplicatorAction","addConfig","add_replicator","targetReplicatorFieldId","targetReplicatorId","canAdd","appendFn","currentLength","entry","getReplicator","append","fieldArrayMethods","fields","replicatorFieldId","scrollToNew","selector","scrollToElement","retries","requestAnimationFrame","setTimeout","element","document","querySelector","scrollIntoView","behavior","block","executeDeleteReplicatorAction","delete_replicator","canRemove","removeFn","indexToRemove","remove","executeOpenAIChatAction","openAIChat","isAIAvailable","openAIChatConfig","open_ai_chat","cortexAgentIdOverride","cortexAgentId","chatParams","cortexRwoContext","resolvedRwoRecordId","type","navigateToCreateForm","navigate_to_create_form","navigateToEditForm","navigate_to_edit_form","navigateToPrepopulateForm","navigate_to_prepopulate_form","navigateToOrganismWithRwoContext","navigate_to_organism_with_rwo_context","navigateToPageWithRwoContext","navigate_to_page_with_rwo_context","executeSingleAction","executeActions","containsSubmit","a","navigationTypes","isCloser","t","orderedActions","executionResults","handleAction","event","catch"],"mappings":"upEAkCA,MAAMA,EAAqBC,IACzB,GAAIA,QAAqC,OAAOA,EAEhD,GAAoB,iBAATA,GAA8B,OAATA,EAAe,CAC7C,MAAMC,EAAMD,EAEZ,GAAI,OAAQC,GAAkB,OAAXA,EAAIC,SAA0BC,IAAXF,EAAIC,GACxC,OAAOD,EAAIC,GAGb,GAAI,UAAWD,GAAqB,OAAdA,EAAIG,YAAgCD,IAAdF,EAAIG,MAC9C,OAAOH,EAAIG,KAEd,CAED,OAAOJ,GAIHK,EAA2BL,IAC/B,GAAIA,QAAqC,OAEzC,MAAMM,EAAYP,EAAkBC,GACpC,MAC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OAAsBe,EAAgBvJ,IAAIsJ,EAAEd,QAAoBgB,EAASF,EAAEd,UAElElS,EAAQmK,OAAQ6I,GAAMA,GAAgB,WAAXA,EAAEd,SAC7BlS,EAAQmK,OAAQ6I,GAAMA,GAAKE,EAASF,EAAEd,UAClClS,EAAQmK,OAAQ6I,GAAMA,GAAKC,EAAgBvJ,IAAIsJ,EAAEd,OAE1E,EAVsB,GAYjBmB,EAA8B,GACpC,IAAK,IAAI7U,EAAI,EAAGA,EAAI4U,EAAezV,OAAQa,GAAK,EAAG,CACjDmB,EAAsBnB,GAEtB,MAAMyH,QAAe4M,GAAoBO,EAAe5U,GAAIA,GAC5D6U,EAAiBzJ,KAAK3D,GACtBpG,EAAW,IAAIwT,GAChB,CAGD,OADAjU,IAAuBiU,GAChBA,CACR,CAAC,MAAOnN,GACP,MAAMpG,EAAQoG,aAAe1D,MAAQ0D,EAAM,IAAI1D,MAAM9F,OAAOwJ,IAG5D,MAFAnG,EAASD,GAEHA,CACP,CAAS,QACRN,GAAe,GACfG,GAAuB,EACxB,GACA,CAACK,EAAS6S,GAAqBzT,EAAsBE,EAAcD,IAGhEiU,GAAejR,EAClBkR,IACKvU,IAEAD,EACFA,EAAQwU,GACCvT,EAAQrC,OAAS,GAC1BmV,KAAiBU,MAAM,UAK3B,CAACxU,EAAUF,EAAYC,EAASiB,EAAS8S,KAG3C,MAAO,CACLA,kBACAQ,gBACA/T,cACAG,qBACAE,UACAE"}
@@ -1,2 +1,2 @@
1
- import*as e from"react";import"../../node_modules/react-is/index.js";import"../../../../prop-types/index.js";import{clsx as o}from"../../../../clsx/dist/clsx.mjs.js";import r from"../utils/memoTheme.js";import t from"./AccordionContext.js";import s from"../utils/useSlot.js";import a,{getAccordionUtilityClass as i}from"./accordionClasses.js";import{jsxs as n,jsx as d}from"react/jsx-runtime";import p from"../styles/styled.js";import l from"../Paper/Paper.js";import{useDefaultProps as c}from"../DefaultPropsProvider/DefaultPropsProvider.js";import m from"../Collapse/Collapse.js";import u from"../../../utils/esm/chainPropTypes/chainPropTypes.js";import x from"../../../utils/esm/composeClasses/composeClasses.js";import f from"../../../utils/esm/useControlled/useControlled.js";import{r as b}from"../../../../../_virtual/index4.js";import{p as h}from"../../../../../_virtual/index5.js";const g=p(l,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:r}=e;return[{[`& .${a.region}`]:o.region},o.root,!r.square&&o.rounded,!r.disableGutters&&o.gutters]}})(r(({theme:e})=>{const o={duration:e.transitions.duration.shortest};return{position:"relative",transition:e.transitions.create(["margin"],o),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(e.vars||e).palette.divider,transition:e.transitions.create(["opacity","background-color"],o)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${a.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${a.disabled}`]:{backgroundColor:(e.vars||e).palette.action.disabledBackground}}}),r(({theme:e})=>({variants:[{props:e=>!e.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(e.vars||e).shape.borderRadius,borderBottomRightRadius:(e.vars||e).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:e=>!e.disableGutters,style:{[`&.${a.expanded}`]:{margin:"16px 0"}}}]}))),y=p("h3",{name:"MuiAccordion",slot:"Heading"})({all:"unset"}),j=e.forwardRef(function(r,a){const p=c({props:r,name:"MuiAccordion"}),{children:l,className:u,defaultExpanded:b=!1,disabled:h=!1,disableGutters:j=!1,expanded:T,onChange:v,square:C=!1,slots:P={},slotProps:R={},TransitionComponent:w,TransitionProps:A,...q}=p,[E,G]=f({controlled:T,default:b,name:"Accordion",state:"expanded"}),N=e.useCallback(e=>{G(!E),v&&v(e,!E)},[E,v,G]),[O,...B]=e.Children.toArray(l),F=e.useMemo(()=>({expanded:E,disabled:h,disableGutters:j,toggle:N}),[E,h,j,N]),M={...p,square:C,disabled:h,disableGutters:j,expanded:E},k=(e=>{const{classes:o,square:r,expanded:t,disabled:s,disableGutters:a}=e;return x({root:["root",!r&&"rounded",t&&"expanded",s&&"disabled",!a&&"gutters"],heading:["heading"],region:["region"]},i,o)})(M),S={slots:{transition:w,...P},slotProps:{transition:A,...R}},[$,_]=s("root",{elementType:g,externalForwardedProps:{...S,...q},className:o(k.root,u),shouldForwardComponentProp:!0,ownerState:M,ref:a,additionalProps:{square:C}}),[D,L]=s("heading",{elementType:y,externalForwardedProps:S,className:k.heading,ownerState:M}),[I,U]=s("transition",{elementType:m,externalForwardedProps:S,ownerState:M});return n($,{..._,children:[d(D,{...L,children:d(t.Provider,{value:F,children:O})}),d(I,{in:E,timeout:"auto",...U,children:d("div",{"aria-labelledby":O.props.id,id:O.props["aria-controls"],role:"region",className:k.region,children:B})})]})});"production"!==process.env.NODE_ENV&&(j.propTypes={children:u(h.exports.node.isRequired,o=>{const r=e.Children.toArray(o.children)[0];return b.exports.isFragment(r)?new Error("MUI: The Accordion doesn't accept a Fragment as a child. Consider providing an array instead."):e.isValidElement(r)?null:new Error("MUI: Expected the first child of Accordion to be a valid element.")}),classes:h.exports.object,className:h.exports.string,defaultExpanded:h.exports.bool,disabled:h.exports.bool,disableGutters:h.exports.bool,expanded:h.exports.bool,onChange:h.exports.func,slotProps:h.exports.shape({heading:h.exports.oneOfType([h.exports.func,h.exports.object]),root:h.exports.oneOfType([h.exports.func,h.exports.object]),transition:h.exports.oneOfType([h.exports.func,h.exports.object])}),slots:h.exports.shape({heading:h.exports.elementType,root:h.exports.elementType,transition:h.exports.elementType}),square:h.exports.bool,sx:h.exports.oneOfType([h.exports.arrayOf(h.exports.oneOfType([h.exports.func,h.exports.object,h.exports.bool])),h.exports.func,h.exports.object]),TransitionComponent:h.exports.elementType,TransitionProps:h.exports.object});var T=j;export{T as default};
1
+ import*as e from"react";import"../../node_modules/react-is/index.js";import"../../../../prop-types/index.js";import{clsx as o}from"../../../../clsx/dist/clsx.mjs.js";import r from"../utils/memoTheme.js";import t from"./AccordionContext.js";import s from"../utils/useSlot.js";import a,{getAccordionUtilityClass as i}from"./accordionClasses.js";import{jsxs as n,jsx as d}from"react/jsx-runtime";import p from"../styles/styled.js";import l from"../Paper/Paper.js";import{useDefaultProps as c}from"../DefaultPropsProvider/DefaultPropsProvider.js";import m from"../Collapse/Collapse.js";import u from"../../../utils/esm/chainPropTypes/chainPropTypes.js";import x from"../../../utils/esm/composeClasses/composeClasses.js";import f from"../../../utils/esm/useControlled/useControlled.js";import{r as b}from"../../../../../_virtual/index3.js";import{p as h}from"../../../../../_virtual/index5.js";const g=p(l,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:r}=e;return[{[`& .${a.region}`]:o.region},o.root,!r.square&&o.rounded,!r.disableGutters&&o.gutters]}})(r(({theme:e})=>{const o={duration:e.transitions.duration.shortest};return{position:"relative",transition:e.transitions.create(["margin"],o),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(e.vars||e).palette.divider,transition:e.transitions.create(["opacity","background-color"],o)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${a.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${a.disabled}`]:{backgroundColor:(e.vars||e).palette.action.disabledBackground}}}),r(({theme:e})=>({variants:[{props:e=>!e.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(e.vars||e).shape.borderRadius,borderBottomRightRadius:(e.vars||e).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:e=>!e.disableGutters,style:{[`&.${a.expanded}`]:{margin:"16px 0"}}}]}))),y=p("h3",{name:"MuiAccordion",slot:"Heading"})({all:"unset"}),j=e.forwardRef(function(r,a){const p=c({props:r,name:"MuiAccordion"}),{children:l,className:u,defaultExpanded:b=!1,disabled:h=!1,disableGutters:j=!1,expanded:T,onChange:v,square:C=!1,slots:P={},slotProps:R={},TransitionComponent:w,TransitionProps:A,...q}=p,[E,G]=f({controlled:T,default:b,name:"Accordion",state:"expanded"}),N=e.useCallback(e=>{G(!E),v&&v(e,!E)},[E,v,G]),[O,...B]=e.Children.toArray(l),F=e.useMemo(()=>({expanded:E,disabled:h,disableGutters:j,toggle:N}),[E,h,j,N]),M={...p,square:C,disabled:h,disableGutters:j,expanded:E},k=(e=>{const{classes:o,square:r,expanded:t,disabled:s,disableGutters:a}=e;return x({root:["root",!r&&"rounded",t&&"expanded",s&&"disabled",!a&&"gutters"],heading:["heading"],region:["region"]},i,o)})(M),S={slots:{transition:w,...P},slotProps:{transition:A,...R}},[$,_]=s("root",{elementType:g,externalForwardedProps:{...S,...q},className:o(k.root,u),shouldForwardComponentProp:!0,ownerState:M,ref:a,additionalProps:{square:C}}),[D,L]=s("heading",{elementType:y,externalForwardedProps:S,className:k.heading,ownerState:M}),[I,U]=s("transition",{elementType:m,externalForwardedProps:S,ownerState:M});return n($,{..._,children:[d(D,{...L,children:d(t.Provider,{value:F,children:O})}),d(I,{in:E,timeout:"auto",...U,children:d("div",{"aria-labelledby":O.props.id,id:O.props["aria-controls"],role:"region",className:k.region,children:B})})]})});"production"!==process.env.NODE_ENV&&(j.propTypes={children:u(h.exports.node.isRequired,o=>{const r=e.Children.toArray(o.children)[0];return b.exports.isFragment(r)?new Error("MUI: The Accordion doesn't accept a Fragment as a child. Consider providing an array instead."):e.isValidElement(r)?null:new Error("MUI: Expected the first child of Accordion to be a valid element.")}),classes:h.exports.object,className:h.exports.string,defaultExpanded:h.exports.bool,disabled:h.exports.bool,disableGutters:h.exports.bool,expanded:h.exports.bool,onChange:h.exports.func,slotProps:h.exports.shape({heading:h.exports.oneOfType([h.exports.func,h.exports.object]),root:h.exports.oneOfType([h.exports.func,h.exports.object]),transition:h.exports.oneOfType([h.exports.func,h.exports.object])}),slots:h.exports.shape({heading:h.exports.elementType,root:h.exports.elementType,transition:h.exports.elementType}),square:h.exports.bool,sx:h.exports.oneOfType([h.exports.arrayOf(h.exports.oneOfType([h.exports.func,h.exports.object,h.exports.bool])),h.exports.func,h.exports.object]),TransitionComponent:h.exports.elementType,TransitionProps:h.exports.object});var T=j;export{T as default};
2
2
  //# sourceMappingURL=Accordion.js.map
@@ -1,2 +1,2 @@
1
- import*as o from"react";import"../../node_modules/react-is/index.js";import"../../../../prop-types/index.js";import{clsx as e}from"../../../../clsx/dist/clsx.mjs.js";import{useRtl as t}from"../../../system/esm/RtlProvider/index.js";import r from"../styles/rootShouldForwardProp.js";import{getMenuUtilityClass as s}from"./menuClasses.js";import p from"../utils/useSlot.js";import{jsx as n}from"react/jsx-runtime";import a from"../styles/styled.js";import i,{PopoverPaper as l}from"../Popover/Popover.js";import c from"../MenuList/MenuList.js";import{useDefaultProps as u}from"../DefaultPropsProvider/DefaultPropsProvider.js";import m from"../../../utils/esm/useSlotProps/useSlotProps.js";import x from"../../../utils/esm/HTMLElementType/HTMLElementType.js";import d from"../../../utils/esm/composeClasses/composeClasses.js";import{r as f}from"../../../../../_virtual/index4.js";import{p as P}from"../../../../../_virtual/index5.js";const b={vertical:"top",horizontal:"right"},y={vertical:"top",horizontal:"left"},j=a(i,{shouldForwardProp:o=>r(o)||"classes"===o,name:"MuiMenu",slot:"Root"})({}),T=a(l,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),h=a(c,{name:"MuiMenu",slot:"List"})({outline:0}),v=o.forwardRef(function(r,a){const i=u({props:r,name:"MuiMenu"}),{autoFocus:l=!0,children:c,className:x,disableAutoFocusItem:P=!1,MenuListProps:v={},onClose:M,open:F,PaperProps:O={},PopoverClasses:g,transitionDuration:w="auto",TransitionProps:{onEntering:S,...C}={},variant:D="selectedMenu",slots:E={},slotProps:k={},...N}=i,L=t(),I={...i,autoFocus:l,disableAutoFocusItem:P,MenuListProps:v,onEntering:S,PaperProps:O,transitionDuration:w,TransitionProps:C,variant:D},R=(o=>{const{classes:e}=o;return d({root:["root"],paper:["paper"],list:["list"]},s,e)})(I),_=l&&!P&&F,z=o.useRef(null);let A=-1;o.Children.map(c,(e,t)=>{o.isValidElement(e)&&("production"!==process.env.NODE_ENV&&f.exports.isFragment(e)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join("\n")),e.props.disabled||("selectedMenu"===D&&e.props.selected||-1===A)&&(A=t))});const H={slots:E,slotProps:{list:v,transition:C,paper:O,...k}},K=m({elementType:E.root,externalSlotProps:k.root,ownerState:I,className:[R.root,x]}),[V,q]=p("paper",{className:R.paper,elementType:T,externalForwardedProps:H,shouldForwardComponentProp:!0,ownerState:I}),[U,W]=p("list",{className:e(R.list,v.className),elementType:h,shouldForwardComponentProp:!0,externalForwardedProps:H,getSlotProps:o=>({...o,onKeyDown:e=>{(o=>{"Tab"===o.key&&(o.preventDefault(),M&&M(o,"tabKeyDown"))})(e),o.onKeyDown?.(e)}}),ownerState:I}),B="function"==typeof H.slotProps.transition?H.slotProps.transition(I):H.slotProps.transition;return n(j,{onClose:M,anchorOrigin:{vertical:"bottom",horizontal:L?"right":"left"},transformOrigin:L?b:y,slots:{root:E.root,paper:V,backdrop:E.backdrop,...E.transition&&{transition:E.transition}},slotProps:{root:K,paper:q,backdrop:"function"==typeof k.backdrop?k.backdrop(I):k.backdrop,transition:{...B,onEntering:(...o)=>{((o,e)=>{z.current&&z.current.adjustStyleForScrollbar(o,{direction:L?"rtl":"ltr"}),S&&S(o,e)})(...o),B?.onEntering?.(...o)}}},open:F,ref:a,transitionDuration:w,ownerState:I,...N,classes:g,children:n(U,{actions:z,autoFocus:l&&(-1===A||P),autoFocusItem:_,variant:D,...W,children:c})})});"production"!==process.env.NODE_ENV&&(v.propTypes={anchorEl:P.exports.oneOfType([x,P.exports.func]),autoFocus:P.exports.bool,children:P.exports.node,classes:P.exports.object,className:P.exports.string,disableAutoFocusItem:P.exports.bool,MenuListProps:P.exports.object,onClose:P.exports.func,open:P.exports.bool.isRequired,PaperProps:P.exports.object,PopoverClasses:P.exports.object,slotProps:P.exports.shape({backdrop:P.exports.oneOfType([P.exports.func,P.exports.object]),list:P.exports.oneOfType([P.exports.func,P.exports.object]),paper:P.exports.oneOfType([P.exports.func,P.exports.object]),root:P.exports.oneOfType([P.exports.func,P.exports.object]),transition:P.exports.oneOfType([P.exports.func,P.exports.object])}),slots:P.exports.shape({backdrop:P.exports.elementType,list:P.exports.elementType,paper:P.exports.elementType,root:P.exports.elementType,transition:P.exports.elementType}),sx:P.exports.oneOfType([P.exports.arrayOf(P.exports.oneOfType([P.exports.func,P.exports.object,P.exports.bool])),P.exports.func,P.exports.object]),transitionDuration:P.exports.oneOfType([P.exports.oneOf(["auto"]),P.exports.number,P.exports.shape({appear:P.exports.number,enter:P.exports.number,exit:P.exports.number})]),TransitionProps:P.exports.object,variant:P.exports.oneOf(["menu","selectedMenu"])});var M=v;export{T as MenuPaper,M as default};
1
+ import*as o from"react";import"../../node_modules/react-is/index.js";import"../../../../prop-types/index.js";import{clsx as e}from"../../../../clsx/dist/clsx.mjs.js";import{useRtl as t}from"../../../system/esm/RtlProvider/index.js";import r from"../styles/rootShouldForwardProp.js";import{getMenuUtilityClass as s}from"./menuClasses.js";import p from"../utils/useSlot.js";import{jsx as n}from"react/jsx-runtime";import a from"../styles/styled.js";import i,{PopoverPaper as l}from"../Popover/Popover.js";import c from"../MenuList/MenuList.js";import{useDefaultProps as u}from"../DefaultPropsProvider/DefaultPropsProvider.js";import m from"../../../utils/esm/useSlotProps/useSlotProps.js";import x from"../../../utils/esm/HTMLElementType/HTMLElementType.js";import d from"../../../utils/esm/composeClasses/composeClasses.js";import{r as f}from"../../../../../_virtual/index3.js";import{p as P}from"../../../../../_virtual/index5.js";const b={vertical:"top",horizontal:"right"},y={vertical:"top",horizontal:"left"},j=a(i,{shouldForwardProp:o=>r(o)||"classes"===o,name:"MuiMenu",slot:"Root"})({}),T=a(l,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),h=a(c,{name:"MuiMenu",slot:"List"})({outline:0}),v=o.forwardRef(function(r,a){const i=u({props:r,name:"MuiMenu"}),{autoFocus:l=!0,children:c,className:x,disableAutoFocusItem:P=!1,MenuListProps:v={},onClose:M,open:F,PaperProps:O={},PopoverClasses:g,transitionDuration:w="auto",TransitionProps:{onEntering:S,...C}={},variant:D="selectedMenu",slots:E={},slotProps:k={},...N}=i,L=t(),I={...i,autoFocus:l,disableAutoFocusItem:P,MenuListProps:v,onEntering:S,PaperProps:O,transitionDuration:w,TransitionProps:C,variant:D},R=(o=>{const{classes:e}=o;return d({root:["root"],paper:["paper"],list:["list"]},s,e)})(I),_=l&&!P&&F,z=o.useRef(null);let A=-1;o.Children.map(c,(e,t)=>{o.isValidElement(e)&&("production"!==process.env.NODE_ENV&&f.exports.isFragment(e)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join("\n")),e.props.disabled||("selectedMenu"===D&&e.props.selected||-1===A)&&(A=t))});const H={slots:E,slotProps:{list:v,transition:C,paper:O,...k}},K=m({elementType:E.root,externalSlotProps:k.root,ownerState:I,className:[R.root,x]}),[V,q]=p("paper",{className:R.paper,elementType:T,externalForwardedProps:H,shouldForwardComponentProp:!0,ownerState:I}),[U,W]=p("list",{className:e(R.list,v.className),elementType:h,shouldForwardComponentProp:!0,externalForwardedProps:H,getSlotProps:o=>({...o,onKeyDown:e=>{(o=>{"Tab"===o.key&&(o.preventDefault(),M&&M(o,"tabKeyDown"))})(e),o.onKeyDown?.(e)}}),ownerState:I}),B="function"==typeof H.slotProps.transition?H.slotProps.transition(I):H.slotProps.transition;return n(j,{onClose:M,anchorOrigin:{vertical:"bottom",horizontal:L?"right":"left"},transformOrigin:L?b:y,slots:{root:E.root,paper:V,backdrop:E.backdrop,...E.transition&&{transition:E.transition}},slotProps:{root:K,paper:q,backdrop:"function"==typeof k.backdrop?k.backdrop(I):k.backdrop,transition:{...B,onEntering:(...o)=>{((o,e)=>{z.current&&z.current.adjustStyleForScrollbar(o,{direction:L?"rtl":"ltr"}),S&&S(o,e)})(...o),B?.onEntering?.(...o)}}},open:F,ref:a,transitionDuration:w,ownerState:I,...N,classes:g,children:n(U,{actions:z,autoFocus:l&&(-1===A||P),autoFocusItem:_,variant:D,...W,children:c})})});"production"!==process.env.NODE_ENV&&(v.propTypes={anchorEl:P.exports.oneOfType([x,P.exports.func]),autoFocus:P.exports.bool,children:P.exports.node,classes:P.exports.object,className:P.exports.string,disableAutoFocusItem:P.exports.bool,MenuListProps:P.exports.object,onClose:P.exports.func,open:P.exports.bool.isRequired,PaperProps:P.exports.object,PopoverClasses:P.exports.object,slotProps:P.exports.shape({backdrop:P.exports.oneOfType([P.exports.func,P.exports.object]),list:P.exports.oneOfType([P.exports.func,P.exports.object]),paper:P.exports.oneOfType([P.exports.func,P.exports.object]),root:P.exports.oneOfType([P.exports.func,P.exports.object]),transition:P.exports.oneOfType([P.exports.func,P.exports.object])}),slots:P.exports.shape({backdrop:P.exports.elementType,list:P.exports.elementType,paper:P.exports.elementType,root:P.exports.elementType,transition:P.exports.elementType}),sx:P.exports.oneOfType([P.exports.arrayOf(P.exports.oneOfType([P.exports.func,P.exports.object,P.exports.bool])),P.exports.func,P.exports.object]),transitionDuration:P.exports.oneOfType([P.exports.oneOf(["auto"]),P.exports.number,P.exports.shape({appear:P.exports.number,enter:P.exports.number,exit:P.exports.number})]),TransitionProps:P.exports.object,variant:P.exports.oneOf(["menu","selectedMenu"])});var M=v;export{T as MenuPaper,M as default};
2
2
  //# sourceMappingURL=Menu.js.map
@@ -1,2 +1,2 @@
1
- import*as e from"react";import"../../node_modules/react-is/index.js";import"../../../../prop-types/index.js";import{jsx as t}from"react/jsx-runtime";import r from"../../../utils/esm/getScrollbarSize/getScrollbarSize.js";import n from"../List/List.js";import s from"../../../utils/esm/useEnhancedEffect/useEnhancedEffect.js";import i from"../../../utils/esm/ownerWindow/ownerWindow.js";import o from"../../../utils/esm/useForkRef/useForkRef.js";import{r as l}from"../../../../../_virtual/index4.js";import{p as a}from"../../../../../_virtual/index5.js";import u from"../../../utils/esm/ownerDocument/ownerDocument.js";function c(e,t,r){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:r?null:e.firstChild}function p(e,t,r){return e===t?r?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:r?null:e.lastChild}function d(e,t){if(void 0===t)return!0;let r=e.innerText;return void 0===r&&(r=e.textContent),r=r.trim().toLowerCase(),0!==r.length&&(t.repeating?r[0]===t.keys[0]:r.startsWith(t.keys.join("")))}function m(e,t,r,n,s,i){let o=!1,l=s(e,t,!!t&&r);for(;l;){if(l===e.firstChild){if(o)return!1;o=!0}const t=!n&&(l.disabled||"true"===l.getAttribute("aria-disabled"));if(l.hasAttribute("tabindex")&&d(l,i)&&!t)return l.focus(),!0;l=s(e,l,r)}return!1}const f=e.forwardRef(function(a,f){const{actions:h,autoFocus:g=!1,autoFocusItem:b=!1,children:y,className:v,disabledItemsFocusable:x=!1,disableListWrap:w=!1,onKeyDown:E,variant:j="selectedMenu",...D}=a,k=e.useRef(null),C=e.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});s(()=>{g&&k.current.focus()},[g]),e.useImperativeHandle(h,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const n=!k.current.style.width;if(e.clientHeight<k.current.clientHeight&&n){const n=`${r(i(e))}px`;k.current.style["rtl"===t?"paddingLeft":"paddingRight"]=n,k.current.style.width=`calc(100% + ${n})`}return k.current}}),[]);const F=o(k,f);let S=-1;e.Children.forEach(y,(t,r)=>{e.isValidElement(t)?("production"!==process.env.NODE_ENV&&l.exports.isFragment(t)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join("\n")),t.props.disabled||("selectedMenu"===j&&t.props.selected||-1===S)&&(S=r),S===r&&(t.props.disabled||t.props.muiSkipListHighlight||t.type.muiSkipListHighlight)&&(S+=1,S>=y.length&&(S=-1))):S===r&&(S+=1,S>=y.length&&(S=-1))});const K=e.Children.map(y,(t,r)=>{if(r===S){const r={};return b&&(r.autoFocus=!0),void 0===t.props.tabIndex&&"selectedMenu"===j&&(r.tabIndex=0),e.cloneElement(t,r)}return t});return t(n,{role:"menu",ref:F,className:v,onKeyDown:e=>{const t=k.current,r=e.key;if(e.ctrlKey||e.metaKey||e.altKey)return void(E&&E(e));const n=u(t).activeElement;if("ArrowDown"===r)e.preventDefault(),m(t,n,w,x,c);else if("ArrowUp"===r)e.preventDefault(),m(t,n,w,x,p);else if("Home"===r)e.preventDefault(),m(t,null,w,x,c);else if("End"===r)e.preventDefault(),m(t,null,w,x,p);else if(1===r.length){const s=C.current,i=r.toLowerCase(),o=performance.now();s.keys.length>0&&(o-s.lastTime>500?(s.keys=[],s.repeating=!0,s.previousKeyMatched=!0):s.repeating&&i!==s.keys[0]&&(s.repeating=!1)),s.lastTime=o,s.keys.push(i);const l=n&&!s.repeating&&d(n,s);s.previousKeyMatched&&(l||m(t,n,!1,x,c,s))?e.preventDefault():s.previousKeyMatched=!1}E&&E(e)},tabIndex:g?0:-1,...D,children:K})});"production"!==process.env.NODE_ENV&&(f.propTypes={autoFocus:a.exports.bool,autoFocusItem:a.exports.bool,children:a.exports.node,className:a.exports.string,disabledItemsFocusable:a.exports.bool,disableListWrap:a.exports.bool,onKeyDown:a.exports.func,variant:a.exports.oneOf(["menu","selectedMenu"])});var h=f;export{h as default};
1
+ import*as e from"react";import"../../node_modules/react-is/index.js";import"../../../../prop-types/index.js";import{jsx as t}from"react/jsx-runtime";import r from"../../../utils/esm/getScrollbarSize/getScrollbarSize.js";import n from"../List/List.js";import s from"../../../utils/esm/useEnhancedEffect/useEnhancedEffect.js";import i from"../../../utils/esm/ownerWindow/ownerWindow.js";import o from"../../../utils/esm/useForkRef/useForkRef.js";import{r as l}from"../../../../../_virtual/index3.js";import{p as a}from"../../../../../_virtual/index5.js";import u from"../../../utils/esm/ownerDocument/ownerDocument.js";function c(e,t,r){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:r?null:e.firstChild}function p(e,t,r){return e===t?r?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:r?null:e.lastChild}function d(e,t){if(void 0===t)return!0;let r=e.innerText;return void 0===r&&(r=e.textContent),r=r.trim().toLowerCase(),0!==r.length&&(t.repeating?r[0]===t.keys[0]:r.startsWith(t.keys.join("")))}function m(e,t,r,n,s,i){let o=!1,l=s(e,t,!!t&&r);for(;l;){if(l===e.firstChild){if(o)return!1;o=!0}const t=!n&&(l.disabled||"true"===l.getAttribute("aria-disabled"));if(l.hasAttribute("tabindex")&&d(l,i)&&!t)return l.focus(),!0;l=s(e,l,r)}return!1}const f=e.forwardRef(function(a,f){const{actions:h,autoFocus:g=!1,autoFocusItem:b=!1,children:y,className:v,disabledItemsFocusable:x=!1,disableListWrap:w=!1,onKeyDown:E,variant:j="selectedMenu",...D}=a,k=e.useRef(null),C=e.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});s(()=>{g&&k.current.focus()},[g]),e.useImperativeHandle(h,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const n=!k.current.style.width;if(e.clientHeight<k.current.clientHeight&&n){const n=`${r(i(e))}px`;k.current.style["rtl"===t?"paddingLeft":"paddingRight"]=n,k.current.style.width=`calc(100% + ${n})`}return k.current}}),[]);const F=o(k,f);let S=-1;e.Children.forEach(y,(t,r)=>{e.isValidElement(t)?("production"!==process.env.NODE_ENV&&l.exports.isFragment(t)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join("\n")),t.props.disabled||("selectedMenu"===j&&t.props.selected||-1===S)&&(S=r),S===r&&(t.props.disabled||t.props.muiSkipListHighlight||t.type.muiSkipListHighlight)&&(S+=1,S>=y.length&&(S=-1))):S===r&&(S+=1,S>=y.length&&(S=-1))});const K=e.Children.map(y,(t,r)=>{if(r===S){const r={};return b&&(r.autoFocus=!0),void 0===t.props.tabIndex&&"selectedMenu"===j&&(r.tabIndex=0),e.cloneElement(t,r)}return t});return t(n,{role:"menu",ref:F,className:v,onKeyDown:e=>{const t=k.current,r=e.key;if(e.ctrlKey||e.metaKey||e.altKey)return void(E&&E(e));const n=u(t).activeElement;if("ArrowDown"===r)e.preventDefault(),m(t,n,w,x,c);else if("ArrowUp"===r)e.preventDefault(),m(t,n,w,x,p);else if("Home"===r)e.preventDefault(),m(t,null,w,x,c);else if("End"===r)e.preventDefault(),m(t,null,w,x,p);else if(1===r.length){const s=C.current,i=r.toLowerCase(),o=performance.now();s.keys.length>0&&(o-s.lastTime>500?(s.keys=[],s.repeating=!0,s.previousKeyMatched=!0):s.repeating&&i!==s.keys[0]&&(s.repeating=!1)),s.lastTime=o,s.keys.push(i);const l=n&&!s.repeating&&d(n,s);s.previousKeyMatched&&(l||m(t,n,!1,x,c,s))?e.preventDefault():s.previousKeyMatched=!1}E&&E(e)},tabIndex:g?0:-1,...D,children:K})});"production"!==process.env.NODE_ENV&&(f.propTypes={autoFocus:a.exports.bool,autoFocusItem:a.exports.bool,children:a.exports.node,className:a.exports.string,disabledItemsFocusable:a.exports.bool,disableListWrap:a.exports.bool,onKeyDown:a.exports.func,variant:a.exports.oneOf(["menu","selectedMenu"])});var h=f;export{h as default};
2
2
  //# sourceMappingURL=MenuList.js.map
@@ -1,2 +1,2 @@
1
- import*as e from"react";import"../../node_modules/react-is/index.js";import"../../../../prop-types/index.js";import{clsx as r}from"../../../../clsx/dist/clsx.mjs.js";import o from"../Menu/Menu.js";import{StyledSelectSelect as t,StyledSelectIcon as n}from"../NativeSelect/NativeSelectInput.js";import{isFilled as s}from"../InputBase/utils.js";import l from"../styles/slotShouldForwardProp.js";import a,{getSelectUtilityClasses as i}from"./selectClasses.js";import{jsxs as p,jsx as u}from"react/jsx-runtime";import c from"../styles/styled.js";import d from"../../../utils/esm/formatMuiErrorMessage/formatMuiErrorMessage.js";import m from"../../../utils/esm/useId/useId.js";import f from"../../../utils/esm/refType/refType.js";import v from"../../../utils/esm/composeClasses/composeClasses.js";import b from"../../../utils/esm/capitalize/capitalize.js";import x from"../../../utils/esm/useControlled/useControlled.js";import h from"../../../utils/esm/useForkRef/useForkRef.js";import y from"../../../utils/esm/ownerDocument/ownerDocument.js";import{r as g}from"../../../../../_virtual/index4.js";import{p as j}from"../../../../../_virtual/index5.js";var w;const E=c(t,{name:"MuiSelect",slot:"Select",overridesResolver:(e,r)=>{const{ownerState:o}=e;return[{[`&.${a.select}`]:r.select},{[`&.${a.select}`]:r[o.variant]},{[`&.${a.error}`]:r.error},{[`&.${a.multiple}`]:r.multiple}]}})({[`&.${a.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),S=c(n,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,r)=>{const{ownerState:o}=e;return[r.icon,o.variant&&r[`icon${b(o.variant)}`],o.open&&r.iconOpen]}})({}),I=c("input",{shouldForwardProp:e=>l(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function C(e,r){return"object"==typeof r&&null!==r?e===r:String(e)===String(r)}function O(e){return null==e||"string"==typeof e&&!e.trim()}const N=e.forwardRef(function(t,n){const{"aria-describedby":l,"aria-label":a,autoFocus:c,autoWidth:f,children:j,className:N,defaultOpen:M,defaultValue:P,disabled:D,displayEmpty:$,error:F=!1,IconComponent:R,inputRef:k,labelId:A,MenuProps:T={},multiple:V,name:U,onBlur:W,onChange:_,onClose:B,onFocus:q,onOpen:z,open:K,readOnly:L,renderValue:H,required:Y,SelectDisplayProps:G={},tabIndex:J,type:Q,value:X,variant:Z="standard",...ee}=t,[re,oe]=x({controlled:X,default:P,name:"Select"}),[te,ne]=x({controlled:K,default:M,name:"Select"}),se=e.useRef(null),le=e.useRef(null),[ae,ie]=e.useState(null),{current:pe}=e.useRef(null!=K),[ue,ce]=e.useState(),de=h(n,k),me=e.useCallback(e=>{le.current=e,e&&ie(e)},[]),fe=ae?.parentNode;e.useImperativeHandle(de,()=>({focus:()=>{le.current.focus()},node:se.current,value:re}),[re]),e.useEffect(()=>{M&&te&&ae&&!pe&&(ce(f?null:fe.clientWidth),le.current.focus())},[ae,f]),e.useEffect(()=>{c&&le.current.focus()},[c]),e.useEffect(()=>{if(!A)return;const e=y(le.current).getElementById(A);if(e){const r=()=>{getSelection().isCollapsed&&le.current.focus()};return e.addEventListener("click",r),()=>{e.removeEventListener("click",r)}}},[A]);const ve=(e,r)=>{e?z&&z(r):B&&B(r),pe||(ce(f?null:fe.clientWidth),ne(e))},be=e.Children.toArray(j),xe=e=>r=>{let o;if(r.currentTarget.hasAttribute("tabindex")){if(V){o=Array.isArray(re)?re.slice():[];const r=re.indexOf(e.props.value);-1===r?o.push(e.props.value):o.splice(r,1)}else o=e.props.value;if(e.props.onClick&&e.props.onClick(r),re!==o&&(oe(o),_)){const t=r.nativeEvent||r,n=new t.constructor(t.type,t);Object.defineProperty(n,"target",{writable:!0,value:{value:o,name:U}}),_(n,e)}V||ve(!1,r)}},he=null!==ae&&te;let ye,ge;delete ee["aria-invalid"];const je=[];let we=!1,Ee=!1;(s({value:re})||$)&&(H?ye=H(re):we=!0);const Se=be.map(r=>{if(!e.isValidElement(r))return null;let o;if("production"!==process.env.NODE_ENV&&g.exports.isFragment(r)&&console.error(["MUI: The Select component doesn't accept a Fragment as a child.","Consider providing an array instead."].join("\n")),V){if(!Array.isArray(re))throw new Error("production"!==process.env.NODE_ENV?"MUI: The `value` prop must be an array when using the `Select` component with `multiple`.":d(2));o=re.some(e=>C(e,r.props.value)),o&&we&&je.push(r.props.children)}else o=C(re,r.props.value),o&&we&&(ge=r.props.children);return o&&(Ee=!0),e.cloneElement(r,{"aria-selected":o?"true":"false",onClick:xe(r),onKeyUp:e=>{" "===e.key&&e.preventDefault(),r.props.onKeyUp&&r.props.onKeyUp(e)},role:"option",selected:o,value:void 0,"data-value":r.props.value})});"production"!==process.env.NODE_ENV&&e.useEffect(()=>{if(!Ee&&!V&&""!==re){const e=be.map(e=>e.props.value);[`MUI: You have provided an out-of-range value \`${re}\` for the select ${U?`(name="${U}") `:""}component.`,"Consider providing a value that matches one of the available options or ''.",`The available values are ${e.filter(e=>null!=e).map(e=>`\`${e}\``).join(", ")||'""'}.`].join("\n")}},[Ee,be,V,U,re]),we&&(ye=V?0===je.length?null:je.reduce((e,r,o)=>(e.push(r),o<je.length-1&&e.push(", "),e),[]):ge);let Ie,Ce=ue;!f&&pe&&ae&&(Ce=fe.clientWidth),Ie=void 0!==J?J:D?null:0;const Oe=G.id||(U?`mui-component-select-${U}`:void 0),Ne={...t,variant:Z,value:re,open:he,error:F},Me=(e=>{const{classes:r,variant:o,disabled:t,multiple:n,open:s,error:l}=e,a={select:["select",o,t&&"disabled",n&&"multiple",l&&"error"],icon:["icon",`icon${b(o)}`,s&&"iconOpen",t&&"disabled"],nativeInput:["nativeInput"]};return v(a,i,r)})(Ne),Pe={...T.PaperProps,...T.slotProps?.paper},De={...T.MenuListProps,...T.slotProps?.list},$e=m();return p(e.Fragment,{children:[u(E,{as:"div",ref:me,tabIndex:Ie,role:"combobox","aria-controls":he?$e:void 0,"aria-disabled":D?"true":void 0,"aria-expanded":he?"true":"false","aria-haspopup":"listbox","aria-label":a,"aria-labelledby":[A,Oe].filter(Boolean).join(" ")||void 0,"aria-describedby":l,"aria-required":Y?"true":void 0,"aria-invalid":F?"true":void 0,onKeyDown:e=>{if(!L){[" ","ArrowUp","ArrowDown","Enter"].includes(e.key)&&(e.preventDefault(),ve(!0,e))}},onMouseDown:D||L?null:e=>{0===e.button&&(e.preventDefault(),le.current.focus(),ve(!0,e))},onBlur:e=>{!he&&W&&(Object.defineProperty(e,"target",{writable:!0,value:{value:re,name:U}}),W(e))},onFocus:q,...G,ownerState:Ne,className:r(G.className,Me.select,N),id:Oe,children:O(ye)?w||(w=u("span",{className:"notranslate","aria-hidden":!0,children:"​"})):ye}),u(I,{"aria-invalid":F,value:Array.isArray(re)?re.join(","):re,name:U,ref:se,"aria-hidden":!0,onChange:e=>{const r=be.find(r=>r.props.value===e.target.value);void 0!==r&&(oe(r.props.value),_&&_(e,r))},tabIndex:-1,disabled:D,className:Me.nativeInput,autoFocus:c,required:Y,...ee,ownerState:Ne}),u(S,{as:R,className:Me.icon,ownerState:Ne}),u(o,{id:`menu-${U||""}`,anchorEl:fe,open:he,onClose:e=>{ve(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...T,slotProps:{...T.slotProps,list:{"aria-labelledby":A,role:"listbox","aria-multiselectable":V?"true":void 0,disableListWrap:!0,id:$e,...De},paper:{...Pe,style:{minWidth:Ce,...null!=Pe?Pe.style:null}}},children:Se})]})});"production"!==process.env.NODE_ENV&&(N.propTypes={"aria-describedby":j.exports.string,"aria-label":j.exports.string,autoFocus:j.exports.bool,autoWidth:j.exports.bool,children:j.exports.node,classes:j.exports.object,className:j.exports.string,defaultOpen:j.exports.bool,defaultValue:j.exports.any,disabled:j.exports.bool,displayEmpty:j.exports.bool,error:j.exports.bool,IconComponent:j.exports.elementType.isRequired,inputRef:f,labelId:j.exports.string,MenuProps:j.exports.object,multiple:j.exports.bool,name:j.exports.string,onBlur:j.exports.func,onChange:j.exports.func,onClose:j.exports.func,onFocus:j.exports.func,onOpen:j.exports.func,open:j.exports.bool,readOnly:j.exports.bool,renderValue:j.exports.func,required:j.exports.bool,SelectDisplayProps:j.exports.object,tabIndex:j.exports.oneOfType([j.exports.number,j.exports.string]),type:j.exports.any,value:j.exports.any,variant:j.exports.oneOf(["standard","outlined","filled"])});var M=N;export{M as default};
1
+ import*as e from"react";import"../../node_modules/react-is/index.js";import"../../../../prop-types/index.js";import{clsx as r}from"../../../../clsx/dist/clsx.mjs.js";import o from"../Menu/Menu.js";import{StyledSelectSelect as t,StyledSelectIcon as n}from"../NativeSelect/NativeSelectInput.js";import{isFilled as s}from"../InputBase/utils.js";import l from"../styles/slotShouldForwardProp.js";import a,{getSelectUtilityClasses as i}from"./selectClasses.js";import{jsxs as p,jsx as u}from"react/jsx-runtime";import c from"../styles/styled.js";import d from"../../../utils/esm/formatMuiErrorMessage/formatMuiErrorMessage.js";import m from"../../../utils/esm/useId/useId.js";import f from"../../../utils/esm/refType/refType.js";import v from"../../../utils/esm/composeClasses/composeClasses.js";import b from"../../../utils/esm/capitalize/capitalize.js";import x from"../../../utils/esm/useControlled/useControlled.js";import h from"../../../utils/esm/useForkRef/useForkRef.js";import y from"../../../utils/esm/ownerDocument/ownerDocument.js";import{r as g}from"../../../../../_virtual/index3.js";import{p as j}from"../../../../../_virtual/index5.js";var w;const E=c(t,{name:"MuiSelect",slot:"Select",overridesResolver:(e,r)=>{const{ownerState:o}=e;return[{[`&.${a.select}`]:r.select},{[`&.${a.select}`]:r[o.variant]},{[`&.${a.error}`]:r.error},{[`&.${a.multiple}`]:r.multiple}]}})({[`&.${a.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),S=c(n,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,r)=>{const{ownerState:o}=e;return[r.icon,o.variant&&r[`icon${b(o.variant)}`],o.open&&r.iconOpen]}})({}),I=c("input",{shouldForwardProp:e=>l(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function C(e,r){return"object"==typeof r&&null!==r?e===r:String(e)===String(r)}function O(e){return null==e||"string"==typeof e&&!e.trim()}const N=e.forwardRef(function(t,n){const{"aria-describedby":l,"aria-label":a,autoFocus:c,autoWidth:f,children:j,className:N,defaultOpen:M,defaultValue:P,disabled:D,displayEmpty:$,error:F=!1,IconComponent:R,inputRef:k,labelId:A,MenuProps:T={},multiple:V,name:U,onBlur:W,onChange:_,onClose:B,onFocus:q,onOpen:z,open:K,readOnly:L,renderValue:H,required:Y,SelectDisplayProps:G={},tabIndex:J,type:Q,value:X,variant:Z="standard",...ee}=t,[re,oe]=x({controlled:X,default:P,name:"Select"}),[te,ne]=x({controlled:K,default:M,name:"Select"}),se=e.useRef(null),le=e.useRef(null),[ae,ie]=e.useState(null),{current:pe}=e.useRef(null!=K),[ue,ce]=e.useState(),de=h(n,k),me=e.useCallback(e=>{le.current=e,e&&ie(e)},[]),fe=ae?.parentNode;e.useImperativeHandle(de,()=>({focus:()=>{le.current.focus()},node:se.current,value:re}),[re]),e.useEffect(()=>{M&&te&&ae&&!pe&&(ce(f?null:fe.clientWidth),le.current.focus())},[ae,f]),e.useEffect(()=>{c&&le.current.focus()},[c]),e.useEffect(()=>{if(!A)return;const e=y(le.current).getElementById(A);if(e){const r=()=>{getSelection().isCollapsed&&le.current.focus()};return e.addEventListener("click",r),()=>{e.removeEventListener("click",r)}}},[A]);const ve=(e,r)=>{e?z&&z(r):B&&B(r),pe||(ce(f?null:fe.clientWidth),ne(e))},be=e.Children.toArray(j),xe=e=>r=>{let o;if(r.currentTarget.hasAttribute("tabindex")){if(V){o=Array.isArray(re)?re.slice():[];const r=re.indexOf(e.props.value);-1===r?o.push(e.props.value):o.splice(r,1)}else o=e.props.value;if(e.props.onClick&&e.props.onClick(r),re!==o&&(oe(o),_)){const t=r.nativeEvent||r,n=new t.constructor(t.type,t);Object.defineProperty(n,"target",{writable:!0,value:{value:o,name:U}}),_(n,e)}V||ve(!1,r)}},he=null!==ae&&te;let ye,ge;delete ee["aria-invalid"];const je=[];let we=!1,Ee=!1;(s({value:re})||$)&&(H?ye=H(re):we=!0);const Se=be.map(r=>{if(!e.isValidElement(r))return null;let o;if("production"!==process.env.NODE_ENV&&g.exports.isFragment(r)&&console.error(["MUI: The Select component doesn't accept a Fragment as a child.","Consider providing an array instead."].join("\n")),V){if(!Array.isArray(re))throw new Error("production"!==process.env.NODE_ENV?"MUI: The `value` prop must be an array when using the `Select` component with `multiple`.":d(2));o=re.some(e=>C(e,r.props.value)),o&&we&&je.push(r.props.children)}else o=C(re,r.props.value),o&&we&&(ge=r.props.children);return o&&(Ee=!0),e.cloneElement(r,{"aria-selected":o?"true":"false",onClick:xe(r),onKeyUp:e=>{" "===e.key&&e.preventDefault(),r.props.onKeyUp&&r.props.onKeyUp(e)},role:"option",selected:o,value:void 0,"data-value":r.props.value})});"production"!==process.env.NODE_ENV&&e.useEffect(()=>{if(!Ee&&!V&&""!==re){const e=be.map(e=>e.props.value);[`MUI: You have provided an out-of-range value \`${re}\` for the select ${U?`(name="${U}") `:""}component.`,"Consider providing a value that matches one of the available options or ''.",`The available values are ${e.filter(e=>null!=e).map(e=>`\`${e}\``).join(", ")||'""'}.`].join("\n")}},[Ee,be,V,U,re]),we&&(ye=V?0===je.length?null:je.reduce((e,r,o)=>(e.push(r),o<je.length-1&&e.push(", "),e),[]):ge);let Ie,Ce=ue;!f&&pe&&ae&&(Ce=fe.clientWidth),Ie=void 0!==J?J:D?null:0;const Oe=G.id||(U?`mui-component-select-${U}`:void 0),Ne={...t,variant:Z,value:re,open:he,error:F},Me=(e=>{const{classes:r,variant:o,disabled:t,multiple:n,open:s,error:l}=e,a={select:["select",o,t&&"disabled",n&&"multiple",l&&"error"],icon:["icon",`icon${b(o)}`,s&&"iconOpen",t&&"disabled"],nativeInput:["nativeInput"]};return v(a,i,r)})(Ne),Pe={...T.PaperProps,...T.slotProps?.paper},De={...T.MenuListProps,...T.slotProps?.list},$e=m();return p(e.Fragment,{children:[u(E,{as:"div",ref:me,tabIndex:Ie,role:"combobox","aria-controls":he?$e:void 0,"aria-disabled":D?"true":void 0,"aria-expanded":he?"true":"false","aria-haspopup":"listbox","aria-label":a,"aria-labelledby":[A,Oe].filter(Boolean).join(" ")||void 0,"aria-describedby":l,"aria-required":Y?"true":void 0,"aria-invalid":F?"true":void 0,onKeyDown:e=>{if(!L){[" ","ArrowUp","ArrowDown","Enter"].includes(e.key)&&(e.preventDefault(),ve(!0,e))}},onMouseDown:D||L?null:e=>{0===e.button&&(e.preventDefault(),le.current.focus(),ve(!0,e))},onBlur:e=>{!he&&W&&(Object.defineProperty(e,"target",{writable:!0,value:{value:re,name:U}}),W(e))},onFocus:q,...G,ownerState:Ne,className:r(G.className,Me.select,N),id:Oe,children:O(ye)?w||(w=u("span",{className:"notranslate","aria-hidden":!0,children:"​"})):ye}),u(I,{"aria-invalid":F,value:Array.isArray(re)?re.join(","):re,name:U,ref:se,"aria-hidden":!0,onChange:e=>{const r=be.find(r=>r.props.value===e.target.value);void 0!==r&&(oe(r.props.value),_&&_(e,r))},tabIndex:-1,disabled:D,className:Me.nativeInput,autoFocus:c,required:Y,...ee,ownerState:Ne}),u(S,{as:R,className:Me.icon,ownerState:Ne}),u(o,{id:`menu-${U||""}`,anchorEl:fe,open:he,onClose:e=>{ve(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...T,slotProps:{...T.slotProps,list:{"aria-labelledby":A,role:"listbox","aria-multiselectable":V?"true":void 0,disableListWrap:!0,id:$e,...De},paper:{...Pe,style:{minWidth:Ce,...null!=Pe?Pe.style:null}}},children:Se})]})});"production"!==process.env.NODE_ENV&&(N.propTypes={"aria-describedby":j.exports.string,"aria-label":j.exports.string,autoFocus:j.exports.bool,autoWidth:j.exports.bool,children:j.exports.node,classes:j.exports.object,className:j.exports.string,defaultOpen:j.exports.bool,defaultValue:j.exports.any,disabled:j.exports.bool,displayEmpty:j.exports.bool,error:j.exports.bool,IconComponent:j.exports.elementType.isRequired,inputRef:f,labelId:j.exports.string,MenuProps:j.exports.object,multiple:j.exports.bool,name:j.exports.string,onBlur:j.exports.func,onChange:j.exports.func,onClose:j.exports.func,onFocus:j.exports.func,onOpen:j.exports.func,open:j.exports.bool,readOnly:j.exports.bool,renderValue:j.exports.func,required:j.exports.bool,SelectDisplayProps:j.exports.object,tabIndex:j.exports.oneOfType([j.exports.number,j.exports.string]),type:j.exports.any,value:j.exports.any,variant:j.exports.oneOf(["standard","outlined","filled"])});var M=N;export{M as default};
2
2
  //# sourceMappingURL=SelectInput.js.map