@zealicsolutions/web-ui 1.0.29 → 1.0.30-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/containers/FormContainer.d.ts +0 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/containers/FormContainer.d.ts +0 -1
- package/dist/esm/containers/FormContainer.js +1 -1
- package/dist/esm/containers/FormContainer.js.map +1 -1
- package/dist/esm/containers/hooks/useStateModifierHandler.js +1 -1
- package/dist/esm/containers/hooks/useStateModifierHandler.js.map +1 -1
- package/package.json +1 -1
@@ -3,6 +3,5 @@ import { ValidationMode } from 'react-hook-form';
|
|
3
3
|
export declare type FormContainerProps = PropsWithChildren<{
|
4
4
|
mode?: keyof ValidationMode;
|
5
5
|
id?: string;
|
6
|
-
isTrigger?: boolean;
|
7
6
|
}>;
|
8
7
|
export declare const FormContainer: ({ mode, children, id }: FormContainerProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{__assign as
|
1
|
+
import{__assign as t}from"../node_modules/tslib/tslib.es6.js";import{jsx as o}from"../node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.esm.js";import{FormStepContextProvider as e}from"../contexts/FormStepContext/FormStepContextProvider.js";import{useEffect as r}from"react";import{useForm as n,FormProvider as i}from"../node_modules/react-hook-form/dist/index.esm.mjs.js";import{useStateModifierHandler as s}from"./hooks/useStateModifierHandler.js";import"../contexts/FormStepContext/FormStepContext.js";import"../contexts/ButtonActionsContext/ButtonActionsContext.js";import"../contexts/MlrRichTextViewerContext/MlrRichTextViewerContext.js";import{useOrganismContext as m}from"../contexts/hooks/useOrganismContext.js";import"../contexts/StateContext/StateContext.js";import"../contexts/AccountButtonContext/AccountButtonContext.js";var x={enter:!1},c=function(c){var d=c.mode,p=void 0===d?"onChange":d,a=c.children;c.id;var u=n({mode:p}),C=s().onStateChange,j=m().formId,f=void 0===j?"":j,l=u.formState.isDirty;return r((function(){l&&!x.enter&&(C({id:f,type:"started"}),x.enter=!0)}),[l]),o(i,t({},u,{children:o(e,{children:a})}))};export{c as FormContainer};
|
2
2
|
//# sourceMappingURL=FormContainer.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"FormContainer.js","sources":["../../../../src/containers/FormContainer.tsx"],"sourcesContent":[null],"names":["ignore","enter","FormContainer","_a","_b","mode","children","id","methods","useForm","onStateChange","useStateModifierHandler","isDirty","formState","useEffect","type","_jsx","FormProvider","__assign","FormStepContextProvider"],"mappings":"
|
1
|
+
{"version":3,"file":"FormContainer.js","sources":["../../../../src/containers/FormContainer.tsx"],"sourcesContent":[null],"names":["ignore","enter","FormContainer","_a","_b","mode","children","id","methods","useForm","onStateChange","useStateModifierHandler","_c","useOrganismContext","formId","isDirty","formState","useEffect","type","_jsx","FormProvider","__assign","FormStepContextProvider"],"mappings":"u1BAWA,IAAMA,EAAS,CACbC,OAAO,GAGIC,EAAgB,SAACC,OAAEC,EAAiBD,EAAAE,KAAjBA,OAAI,IAAAD,EAAG,WAAUA,EAAEE,EAAQH,EAAAG,SAAIH,EAAAI,GAC7D,IAAMC,EAAUC,EAAQ,CACtBJ,KAAIA,IAEEK,EAAkBC,kBAClBC,EAAgBC,IAAoBC,OAApCA,OAAM,IAAAF,EAAG,GAAEA,EAGJG,EACXP,EAAOQ,UAAAD,QASX,OAPAE,GAAU,WACJF,IAAYf,EAAOC,QACrBS,EAAc,CAAEH,GAAIO,EAAQI,KAAM,YAClClB,EAAOC,OAAQ,EAEnB,GAAG,CAACc,IAGFI,EAACC,EAAYC,EAAA,CAAA,EAAKb,EAAO,CAAAF,SACvBa,EAACG,EAAyB,CAAAhB,SAAAA,MAGhC"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import"../../contexts/FormStepContext/FormStepContext.js";import"react";import"../../contexts/ButtonActionsContext/ButtonActionsContext.js";import"../../contexts/MlrRichTextViewerContext/MlrRichTextViewerContext.js";import"../../contexts/OrganismContext/OrganismContext.js";import{useStateContext as t}from"../../contexts/hooks/useStateContext.js";import"../../contexts/AccountButtonContext/AccountButtonContext.js";var o=function(){var o=t(),e=o.stateConfig,n=o.stateHandler,r=o.authenticated;return{onStateChange:function(t){var o,i=t.id,c=t.type;i&&(null==e?void 0:e[i])&&Object.prototype.hasOwnProperty.call(e[i],"interacted")&&r&&(null==n||n(((o={})[i]={interacted:c},o)))}}};export{o as useStateModifierHandler};
|
1
|
+
import"../../contexts/FormStepContext/FormStepContext.js";import"react";import"../../contexts/ButtonActionsContext/ButtonActionsContext.js";import"../../contexts/MlrRichTextViewerContext/MlrRichTextViewerContext.js";import"../../contexts/OrganismContext/OrganismContext.js";import{useStateContext as t}from"../../contexts/hooks/useStateContext.js";import"../../contexts/AccountButtonContext/AccountButtonContext.js";var o=function(){var o=t(),e=o.stateConfig,n=o.stateHandler,r=o.authenticated;return{onStateChange:function(t){var o,i=t.id,c=t.type;console.log("onStateChange",{id:i,type:c}),i&&(null==e?void 0:e[i])&&Object.prototype.hasOwnProperty.call(e[i],"interacted")&&r&&(null==n||n(((o={})[i]={interacted:c},o)))}}};export{o as useStateModifierHandler};
|
2
2
|
//# sourceMappingURL=useStateModifierHandler.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useStateModifierHandler.js","sources":["../../../../../src/containers/hooks/useStateModifierHandler.ts"],"sourcesContent":[null],"names":["useStateModifierHandler","_a","useStateContext","stateConfig","stateHandler","authenticated","onStateChange","id","type","Object","prototype","hasOwnProperty","call","interacted"],"mappings":"gaAGa,IAAAA,EAA0B,WAC/B,IAAAC,EAA+CC,IAA7CC,EAAWF,EAAAE,YAAEC,EAAYH,EAAAG,aAAEC,EAAaJ,EAAAI,
|
1
|
+
{"version":3,"file":"useStateModifierHandler.js","sources":["../../../../../src/containers/hooks/useStateModifierHandler.ts"],"sourcesContent":[null],"names":["useStateModifierHandler","_a","useStateContext","stateConfig","stateHandler","authenticated","onStateChange","id","type","console","log","Object","prototype","hasOwnProperty","call","interacted"],"mappings":"gaAGa,IAAAA,EAA0B,WAC/B,IAAAC,EAA+CC,IAA7CC,EAAWF,EAAAE,YAAEC,EAAYH,EAAAG,aAAEC,EAAaJ,EAAAI,cAahD,MAAO,CAAEC,cAXa,SAACL,SAAEM,EAAEN,EAAAM,GAAEC,EAAIP,EAAAO,KAC/BC,QAAQC,IAAI,gBAAiB,CAAEH,GAAEA,EAAEC,KAAIA,IAGrCD,IACAJ,aAAW,EAAXA,EAAcI,KACdI,OAAOC,UAAUC,eAAeC,KAAKX,EAAYI,GAAK,eAE5BF,IAAeD,SAAAA,UAAkBG,GAAK,CAAEQ,WAAYP,OAClF,EAGF"}
|