@aglyn/shared-ui-jsx-forms 1.0.0-beta.143

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.
Files changed (150) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +7 -0
  3. package/package.json +52 -0
  4. package/src/index.d.ts +17 -0
  5. package/src/index.js +18 -0
  6. package/src/index.js.map +1 -0
  7. package/src/lib/components/color-picker-tokens.d.ts +135 -0
  8. package/src/lib/components/color-picker-tokens.js +431 -0
  9. package/src/lib/components/color-picker-tokens.js.map +1 -0
  10. package/src/lib/components/color-picker.component.d.ts +64 -0
  11. package/src/lib/components/color-picker.component.js +322 -0
  12. package/src/lib/components/color-picker.component.js.map +1 -0
  13. package/src/lib/components/create-artifact-drawer.component.d.ts +100 -0
  14. package/src/lib/components/create-artifact-drawer.component.js +184 -0
  15. package/src/lib/components/create-artifact-drawer.component.js.map +1 -0
  16. package/src/lib/components/grid-form-template.component.d.ts +21 -0
  17. package/src/lib/components/grid-form-template.component.js +81 -0
  18. package/src/lib/components/grid-form-template.component.js.map +1 -0
  19. package/src/lib/components/icon-select.component.d.ts +52 -0
  20. package/src/lib/components/icon-select.component.js +453 -0
  21. package/src/lib/components/icon-select.component.js.map +1 -0
  22. package/src/lib/components/select.component.d.ts +58 -0
  23. package/src/lib/components/select.component.js +107 -0
  24. package/src/lib/components/select.component.js.map +1 -0
  25. package/src/lib/components/switch.component.d.ts +38 -0
  26. package/src/lib/components/switch.component.js +76 -0
  27. package/src/lib/components/switch.component.js.map +1 -0
  28. package/src/lib/components/text-field.component.d.ts +45 -0
  29. package/src/lib/components/text-field.component.js +77 -0
  30. package/src/lib/components/text-field.component.js.map +1 -0
  31. package/src/lib/components/textarea.component.d.ts +45 -0
  32. package/src/lib/components/textarea.component.js +61 -0
  33. package/src/lib/components/textarea.component.js.map +1 -0
  34. package/src/lib/components/toggle-button.component.d.ts +27 -0
  35. package/src/lib/components/toggle-button.component.js +116 -0
  36. package/src/lib/components/toggle-button.component.js.map +1 -0
  37. package/src/lib/constants/component-mappers.d.ts +42 -0
  38. package/src/lib/constants/component-mappers.js +70 -0
  39. package/src/lib/constants/component-mappers.js.map +1 -0
  40. package/src/lib/constants/dynamic-fields.d.ts +45 -0
  41. package/src/lib/constants/dynamic-fields.js +65 -0
  42. package/src/lib/constants/dynamic-fields.js.map +1 -0
  43. package/src/lib/constants/field-configurations.d.ts +53 -0
  44. package/src/lib/constants/field-configurations.js +121 -0
  45. package/src/lib/constants/field-configurations.js.map +1 -0
  46. package/src/lib/constants/flags.d.ts +72 -0
  47. package/src/lib/constants/flags.js +69 -0
  48. package/src/lib/constants/flags.js.map +1 -0
  49. package/src/lib/hocs/with-grid-item.d.ts +25 -0
  50. package/src/lib/hocs/with-grid-item.js +48 -0
  51. package/src/lib/hocs/with-grid-item.js.map +1 -0
  52. package/src/lib/jsx-forms.d.ts +41 -0
  53. package/src/lib/jsx-forms.js +42 -0
  54. package/src/lib/jsx-forms.js.map +1 -0
  55. package/src/lib/mapper/breakpoint-span.d.ts +73 -0
  56. package/src/lib/mapper/breakpoint-span.js +346 -0
  57. package/src/lib/mapper/breakpoint-span.js.map +1 -0
  58. package/src/lib/mapper/checkbox.d.ts +43 -0
  59. package/src/lib/mapper/checkbox.js +111 -0
  60. package/src/lib/mapper/checkbox.js.map +1 -0
  61. package/src/lib/mapper/css-border.d.ts +113 -0
  62. package/src/lib/mapper/css-border.js +410 -0
  63. package/src/lib/mapper/css-border.js.map +1 -0
  64. package/src/lib/mapper/css-dimension.d.ts +89 -0
  65. package/src/lib/mapper/css-dimension.js +327 -0
  66. package/src/lib/mapper/css-dimension.js.map +1 -0
  67. package/src/lib/mapper/css-gradient.d.ts +110 -0
  68. package/src/lib/mapper/css-gradient.js +720 -0
  69. package/src/lib/mapper/css-gradient.js.map +1 -0
  70. package/src/lib/mapper/data-table.d.ts +23 -0
  71. package/src/lib/mapper/data-table.js +296 -0
  72. package/src/lib/mapper/data-table.js.map +1 -0
  73. package/src/lib/mapper/date-picker.d.ts +26 -0
  74. package/src/lib/mapper/date-picker.js +69 -0
  75. package/src/lib/mapper/date-picker.js.map +1 -0
  76. package/src/lib/mapper/dual-list-select.d.ts +115 -0
  77. package/src/lib/mapper/dual-list-select.js +353 -0
  78. package/src/lib/mapper/dual-list-select.js.map +1 -0
  79. package/src/lib/mapper/field-array.d.ts +71 -0
  80. package/src/lib/mapper/field-array.js +326 -0
  81. package/src/lib/mapper/field-array.js.map +1 -0
  82. package/src/lib/mapper/form-field-grid.d.ts +155 -0
  83. package/src/lib/mapper/form-field-grid.js +194 -0
  84. package/src/lib/mapper/form-field-grid.js.map +1 -0
  85. package/src/lib/mapper/index.d.ts +50 -0
  86. package/src/lib/mapper/index.js +49 -0
  87. package/src/lib/mapper/index.js.map +1 -0
  88. package/src/lib/mapper/multiple-choice-list.d.ts +32 -0
  89. package/src/lib/mapper/multiple-choice-list.js +105 -0
  90. package/src/lib/mapper/multiple-choice-list.js.map +1 -0
  91. package/src/lib/mapper/plain-text.d.ts +31 -0
  92. package/src/lib/mapper/plain-text.js +48 -0
  93. package/src/lib/mapper/plain-text.js.map +1 -0
  94. package/src/lib/mapper/preset-choice.d.ts +106 -0
  95. package/src/lib/mapper/preset-choice.js +267 -0
  96. package/src/lib/mapper/preset-choice.js.map +1 -0
  97. package/src/lib/mapper/radio.d.ts +40 -0
  98. package/src/lib/mapper/radio.js +122 -0
  99. package/src/lib/mapper/radio.js.map +1 -0
  100. package/src/lib/mapper/select.d.ts +60 -0
  101. package/src/lib/mapper/select.js +203 -0
  102. package/src/lib/mapper/select.js.map +1 -0
  103. package/src/lib/mapper/slider.d.ts +45 -0
  104. package/src/lib/mapper/slider.js +119 -0
  105. package/src/lib/mapper/slider.js.map +1 -0
  106. package/src/lib/mapper/stored-field-value.d.ts +23 -0
  107. package/src/lib/mapper/stored-field-value.js +29 -0
  108. package/src/lib/mapper/stored-field-value.js.map +1 -0
  109. package/src/lib/mapper/sub-form.d.ts +39 -0
  110. package/src/lib/mapper/sub-form.js +108 -0
  111. package/src/lib/mapper/sub-form.js.map +1 -0
  112. package/src/lib/mapper/switch.d.ts +47 -0
  113. package/src/lib/mapper/switch.js +93 -0
  114. package/src/lib/mapper/switch.js.map +1 -0
  115. package/src/lib/mapper/tabs.d.ts +34 -0
  116. package/src/lib/mapper/tabs.js +64 -0
  117. package/src/lib/mapper/tabs.js.map +1 -0
  118. package/src/lib/mapper/text-field.d.ts +33 -0
  119. package/src/lib/mapper/text-field.js +88 -0
  120. package/src/lib/mapper/text-field.js.map +1 -0
  121. package/src/lib/mapper/textarea.d.ts +31 -0
  122. package/src/lib/mapper/textarea.js +68 -0
  123. package/src/lib/mapper/textarea.js.map +1 -0
  124. package/src/lib/mapper/theme-scale.d.ts +79 -0
  125. package/src/lib/mapper/theme-scale.js +162 -0
  126. package/src/lib/mapper/theme-scale.js.map +1 -0
  127. package/src/lib/mapper/time-picker.d.ts +26 -0
  128. package/src/lib/mapper/time-picker.js +69 -0
  129. package/src/lib/mapper/time-picker.js.map +1 -0
  130. package/src/lib/mapper/types.d.ts +43 -0
  131. package/src/lib/mapper/types.js +22 -0
  132. package/src/lib/mapper/types.js.map +1 -0
  133. package/src/lib/mapper/validation-error.d.ts +24 -0
  134. package/src/lib/mapper/validation-error.js +24 -0
  135. package/src/lib/mapper/validation-error.js.map +1 -0
  136. package/src/lib/mapper/wizard.d.ts +21 -0
  137. package/src/lib/mapper/wizard.js +203 -0
  138. package/src/lib/mapper/wizard.js.map +1 -0
  139. package/src/lib/types.d.ts +19 -0
  140. package/src/lib/types.js +18 -0
  141. package/src/lib/types.js.map +1 -0
  142. package/src/lib/utils/option-is-equal-to-value.d.ts +20 -0
  143. package/src/lib/utils/option-is-equal-to-value.js +21 -0
  144. package/src/lib/utils/option-is-equal-to-value.js.map +1 -0
  145. package/src/lib/utils/validation-message.d.ts +22 -0
  146. package/src/lib/utils/validation-message.js +24 -0
  147. package/src/lib/utils/validation-message.js.map +1 -0
  148. package/src/lib/vendor/data-driven-forms.d.ts +33 -0
  149. package/src/lib/vendor/data-driven-forms.js +29 -0
  150. package/src/lib/vendor/data-driven-forms.js.map +1 -0
@@ -0,0 +1,203 @@
1
+ import { _ as _extends } from "@swc/helpers/_/_extends";
2
+ import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
3
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
+ import { createElement as _createElement } from "react";
5
+ /**
6
+ * @license
7
+ * Copyright 2026 Aglyn LLC
8
+ *
9
+ * Licensed under the Apache License, Version 2.0 (the "License");
10
+ * you may not use this file except in compliance with the License.
11
+ * You may obtain a copy of the License at
12
+ *
13
+ * http://www.apache.org/licenses/LICENSE-2.0
14
+ *
15
+ * Unless required by applicable law or agreed to in writing, software
16
+ * distributed under the License is distributed on an "AS IS" BASIS,
17
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ * See the License for the specific language governing permissions and
19
+ * limitations under the License.
20
+ */ /**
21
+ * Ported from `@data-driven-forms/mui-component-mapper` (Apache-2.0) and
22
+ * updated for the current MUI APIs.
23
+ */ import { Fragment, useContext } from "react";
24
+ import { Button, Grid, Step, StepLabel, Stepper } from "@mui/material";
25
+ import { styled } from "@mui/material/styles";
26
+ import clsx from "clsx";
27
+ import CommonWizard from "@data-driven-forms/common/wizard";
28
+ import selectNext from "@data-driven-forms/common/wizard/select-next";
29
+ import { FormSpy, WizardContext } from "../vendor/data-driven-forms.js";
30
+ /* -------------------------------- wizard nav ------------------------------ */ const NAV_PREFIX = 'WizardNav';
31
+ const navClasses = {
32
+ stepper: `${NAV_PREFIX}-stepper`
33
+ };
34
+ const StyledStepper = styled(Stepper)(()=>({
35
+ [`&.${navClasses.stepper}`]: {
36
+ width: '100%'
37
+ }
38
+ }));
39
+ const WizardNav = ({ StepperProps = {}, stepsInfo, activeStepIndex })=>/*#__PURE__*/ _jsx(StyledStepper, _extends({}, StepperProps, {
40
+ className: clsx(navClasses.stepper, StepperProps.className),
41
+ activeStep: activeStepIndex,
42
+ children: stepsInfo.map(({ title, label, StepLabelProps = {}, StepProps = {} }, idx)=>/*#__PURE__*/ _createElement(Step, _extends({}, StepProps, {
43
+ key: idx
44
+ }), /*#__PURE__*/ _jsx(StepLabel, _extends({}, StepLabelProps, {
45
+ children: title || label
46
+ }))))
47
+ }));
48
+ /* ----------------------------- wizard buttons ----------------------------- */ const BUTTONS_PREFIX = 'WizardStepButtons';
49
+ const buttonClasses = {
50
+ buttons: `${BUTTONS_PREFIX}-buttons`,
51
+ button: `${BUTTONS_PREFIX}-button`,
52
+ buttonsContainer: `${BUTTONS_PREFIX}-buttonsContainer`
53
+ };
54
+ const StyledButtonsGrid = styled(Grid)(()=>({
55
+ [`& .${buttonClasses.buttons}`]: {
56
+ display: 'flex',
57
+ justifyContent: 'flex-end'
58
+ },
59
+ [`& .${buttonClasses.button}`]: {
60
+ marginRight: 16
61
+ },
62
+ [`&.${buttonClasses.buttonsContainer}`]: {
63
+ marginTop: 36
64
+ }
65
+ }));
66
+ const NextButton = ({ nextStep, handleNext, nextLabel, getState, handleSubmit, submitLabel, conditionalSubmitFlag })=>{
67
+ const nextResult = nextStep ? selectNext(nextStep, getState) : nextStep;
68
+ const progressNext = nextResult !== conditionalSubmitFlag && nextStep;
69
+ const { valid, validating, submitting } = getState();
70
+ return /*#__PURE__*/ _jsx(Button, {
71
+ variant: "contained",
72
+ color: "primary",
73
+ disabled: !valid || validating || submitting,
74
+ onClick: ()=>progressNext ? handleNext(nextResult) : handleSubmit(),
75
+ children: progressNext ? nextLabel : submitLabel
76
+ });
77
+ };
78
+ const WizardStepButtons = (_0)=>{
79
+ let { buttons: Buttons } = _0, props = _object_without_properties_loose(_0, [
80
+ "buttons"
81
+ ]);
82
+ if (Buttons) {
83
+ return /*#__PURE__*/ _jsx(Buttons, _extends({
84
+ classes: buttonClasses
85
+ }, props));
86
+ }
87
+ const { disableBack, handlePrev, nextStep, handleNext, buttonLabels: { cancel, submit, back, next }, formOptions, ButtonContainerProps = {}, conditionalSubmitFlag } = props;
88
+ return /*#__PURE__*/ _jsx(StyledButtonsGrid, _extends({
89
+ container: true,
90
+ direction: "row",
91
+ sx: {
92
+ justifyContent: 'space-evenly'
93
+ }
94
+ }, ButtonContainerProps, {
95
+ className: clsx(buttonClasses.buttonsContainer, ButtonContainerProps.className),
96
+ children: /*#__PURE__*/ _jsx(FormSpy, {
97
+ subscription: {
98
+ values: true,
99
+ valid: true,
100
+ validating: true,
101
+ submitting: true
102
+ },
103
+ children: ()=>/*#__PURE__*/ _jsxs(Fragment, {
104
+ children: [
105
+ /*#__PURE__*/ _jsx(Grid, {
106
+ size: {
107
+ md: 2,
108
+ xs: 2
109
+ },
110
+ children: /*#__PURE__*/ _jsx(Button, {
111
+ onClick: ()=>formOptions.onCancel == null ? void 0 : formOptions.onCancel.call(formOptions, formOptions.getState().values),
112
+ children: cancel
113
+ })
114
+ }),
115
+ /*#__PURE__*/ _jsxs(Grid, {
116
+ size: {
117
+ md: 10,
118
+ xs: 10
119
+ },
120
+ className: buttonClasses.buttons,
121
+ children: [
122
+ /*#__PURE__*/ _jsx(Button, {
123
+ disabled: disableBack,
124
+ onClick: ()=>handlePrev(),
125
+ className: buttonClasses.button,
126
+ children: back
127
+ }),
128
+ /*#__PURE__*/ _jsx(NextButton, _extends({}, formOptions, {
129
+ conditionalSubmitFlag: conditionalSubmitFlag,
130
+ handleNext: handleNext,
131
+ nextStep: nextStep,
132
+ nextLabel: next,
133
+ submitLabel: submit
134
+ }))
135
+ ]
136
+ })
137
+ ]
138
+ })
139
+ })
140
+ }));
141
+ };
142
+ /* --------------------------------- wizard --------------------------------- */ const PREFIX = 'MuiWizard';
143
+ const classes = {
144
+ wizardBody: `${PREFIX}-wizardBody`
145
+ };
146
+ const StyledWizard = styled(Grid)(()=>({
147
+ [`& .${classes.wizardBody}`]: {
148
+ padding: 24,
149
+ margin: 0
150
+ }
151
+ }));
152
+ const WizardInternal = ({ buttonLabels = {}, stepsInfo, ButtonContainerProps, StepperProps, WizardBodyProps = {}, WizardProps, conditionalSubmitFlag })=>{
153
+ const { formOptions, currentStep, handlePrev, onKeyDown, handleNext, activeStepIndex, prevSteps } = useContext(WizardContext);
154
+ const buttonLabelsFinal = _extends({
155
+ next: 'Continue',
156
+ submit: 'Submit',
157
+ cancel: 'Cancel',
158
+ back: 'Back'
159
+ }, buttonLabels);
160
+ return /*#__PURE__*/ _jsxs(StyledWizard, _extends({
161
+ container: true
162
+ }, WizardProps, {
163
+ onKeyDown: onKeyDown,
164
+ children: [
165
+ stepsInfo && /*#__PURE__*/ _jsx(WizardNav, {
166
+ StepperProps: StepperProps,
167
+ stepsInfo: stepsInfo,
168
+ activeStepIndex: activeStepIndex
169
+ }),
170
+ /*#__PURE__*/ _jsxs(Grid, _extends({
171
+ container: true,
172
+ spacing: 2
173
+ }, WizardBodyProps, {
174
+ className: clsx(classes.wizardBody, WizardBodyProps.className),
175
+ children: [
176
+ currentStep.fields.map((item)=>formOptions.renderForm([
177
+ item
178
+ ])),
179
+ /*#__PURE__*/ _jsx(WizardStepButtons, _extends({}, currentStep, {
180
+ formOptions: formOptions,
181
+ buttonLabels: buttonLabelsFinal,
182
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
183
+ handleNext: (nextStep)=>handleNext(nextStep),
184
+ handlePrev: ()=>handlePrev(),
185
+ disableBack: prevSteps.length === 0,
186
+ conditionalSubmitFlag: conditionalSubmitFlag,
187
+ ButtonContainerProps: ButtonContainerProps
188
+ }))
189
+ ]
190
+ }))
191
+ ]
192
+ }));
193
+ };
194
+ // The common Wizard's prop types are renderer-version specific; the schema
195
+ // always provides `fields` at runtime.
196
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
197
+ const CommonWizardAny = CommonWizard;
198
+ export const Wizard = (props)=>/*#__PURE__*/ _jsx(CommonWizardAny, _extends({
199
+ Wizard: WizardInternal
200
+ }, props));
201
+ export default Wizard;
202
+
203
+ //# sourceMappingURL=wizard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../libs/shared/ui/jsx-forms/src/lib/mapper/wizard.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Ported from `@data-driven-forms/mui-component-mapper` (Apache-2.0) and\n * updated for the current MUI APIs.\n */\n\nimport { Fragment, useContext } from 'react'\n\nimport {\n Button,\n Grid,\n type GridProps,\n Step,\n StepLabel,\n type StepLabelProps,\n type StepProps,\n Stepper,\n type StepperProps,\n} from '@mui/material'\nimport { styled } from '@mui/material/styles'\n\nimport clsx from 'clsx'\n\nimport CommonWizard from '@data-driven-forms/common/wizard'\nimport selectNext from '@data-driven-forms/common/wizard/select-next'\n\nimport {\n type FormOptions,\n FormSpy,\n WizardContext,\n} from '../vendor/data-driven-forms'\n\n\n/* -------------------------------- wizard nav ------------------------------ */\n\nconst NAV_PREFIX = 'WizardNav'\n\nconst navClasses = {\n stepper: `${NAV_PREFIX}-stepper`,\n}\n\nconst StyledStepper = styled(Stepper)(() => ({\n [`&.${navClasses.stepper}`]: {\n width: '100%',\n },\n}))\n\ninterface StepInfo {\n title?: string\n label?: string\n StepLabelProps?: StepLabelProps\n StepProps?: StepProps\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any\n}\n\ninterface WizardNavProps {\n StepperProps?: StepperProps\n stepsInfo: StepInfo[]\n activeStepIndex: number\n}\n\nconst WizardNav = ({\n StepperProps = {},\n stepsInfo,\n activeStepIndex,\n}: WizardNavProps) => (\n <StyledStepper\n {...StepperProps}\n className={clsx(navClasses.stepper, StepperProps.className)}\n activeStep={activeStepIndex}\n >\n {stepsInfo.map(({ title, label, StepLabelProps = {}, StepProps = {} }, idx) => (\n <Step {...StepProps} key={idx}>\n <StepLabel {...StepLabelProps}>{title || label}</StepLabel>\n </Step>\n ))}\n </StyledStepper>\n)\n\n/* ----------------------------- wizard buttons ----------------------------- */\n\nconst BUTTONS_PREFIX = 'WizardStepButtons'\n\nconst buttonClasses = {\n buttons: `${BUTTONS_PREFIX}-buttons`,\n button: `${BUTTONS_PREFIX}-button`,\n buttonsContainer: `${BUTTONS_PREFIX}-buttonsContainer`,\n}\n\nconst StyledButtonsGrid = styled(Grid)(() => ({\n [`& .${buttonClasses.buttons}`]: {\n display: 'flex',\n justifyContent: 'flex-end',\n },\n\n [`& .${buttonClasses.button}`]: {\n marginRight: 16,\n },\n\n [`&.${buttonClasses.buttonsContainer}`]: {\n marginTop: 36,\n },\n}))\n\ninterface NextButtonProps {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n nextStep?: any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n handleNext: (nextStep?: any) => void\n nextLabel: string\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getState: () => any\n handleSubmit: () => void\n submitLabel: string\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n conditionalSubmitFlag?: any\n}\n\nconst NextButton = ({\n nextStep,\n handleNext,\n nextLabel,\n getState,\n handleSubmit,\n submitLabel,\n conditionalSubmitFlag,\n}: NextButtonProps) => {\n const nextResult = nextStep ? selectNext(nextStep, getState) : nextStep\n const progressNext = nextResult !== conditionalSubmitFlag && nextStep\n const { valid, validating, submitting } = getState()\n\n return (\n <Button\n variant=\"contained\"\n color=\"primary\"\n disabled={!valid || validating || submitting}\n onClick={() => (progressNext ? handleNext(nextResult) : handleSubmit())}\n >\n {progressNext ? nextLabel : submitLabel}\n </Button>\n )\n}\n\ninterface ButtonLabels {\n cancel: string\n submit: string\n back: string\n next: string\n}\n\ninterface WizardStepButtonsProps {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n buttons?: React.ComponentType<any>\n disableBack: boolean\n handlePrev: () => void\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n nextStep?: any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n handleNext: (nextStep?: any) => void\n buttonLabels: ButtonLabels\n formOptions: FormOptions\n ButtonContainerProps?: GridProps\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n conditionalSubmitFlag?: any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any\n}\n\nconst WizardStepButtons = ({\n buttons: Buttons,\n ...props\n}: WizardStepButtonsProps) => {\n if (Buttons) {\n return <Buttons classes={buttonClasses} {...props} />\n }\n\n const {\n disableBack,\n handlePrev,\n nextStep,\n handleNext,\n buttonLabels: { cancel, submit, back, next },\n formOptions,\n ButtonContainerProps = {},\n conditionalSubmitFlag,\n } = props\n\n return (\n <StyledButtonsGrid\n container\n direction=\"row\"\n sx={{ justifyContent: 'space-evenly' }}\n {...ButtonContainerProps}\n className={clsx(\n buttonClasses.buttonsContainer,\n ButtonContainerProps.className,\n )}\n >\n <FormSpy\n subscription={{\n values: true,\n valid: true,\n validating: true,\n submitting: true,\n }}\n >\n {() => (\n <Fragment>\n <Grid size={{ md: 2, xs: 2 }}>\n <Button\n onClick={() =>\n formOptions.onCancel?.(formOptions.getState().values)\n }\n >\n {cancel}\n </Button>\n </Grid>\n <Grid size={{ md: 10, xs: 10 }} className={buttonClasses.buttons}>\n <Button\n disabled={disableBack}\n onClick={() => handlePrev()}\n className={buttonClasses.button}\n >\n {back}\n </Button>\n <NextButton\n {...formOptions}\n conditionalSubmitFlag={conditionalSubmitFlag}\n handleNext={handleNext}\n nextStep={nextStep}\n nextLabel={next}\n submitLabel={submit}\n />\n </Grid>\n </Fragment>\n )}\n </FormSpy>\n </StyledButtonsGrid>\n )\n}\n\n/* --------------------------------- wizard --------------------------------- */\n\nconst PREFIX = 'MuiWizard'\n\nconst classes = {\n wizardBody: `${PREFIX}-wizardBody`,\n}\n\nconst StyledWizard = styled(Grid)(() => ({\n [`& .${classes.wizardBody}`]: {\n padding: 24,\n margin: 0,\n },\n}))\n\ninterface WizardButtonLabels {\n next?: string\n submit?: string\n cancel?: string\n back?: string\n}\n\ninterface WizardInternalProps {\n buttonLabels?: WizardButtonLabels\n stepsInfo?: StepInfo[]\n ButtonContainerProps?: GridProps\n StepperProps?: StepperProps\n WizardBodyProps?: GridProps\n WizardProps?: GridProps\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n conditionalSubmitFlag?: any\n}\n\nconst WizardInternal = ({\n buttonLabels = {},\n stepsInfo,\n ButtonContainerProps,\n StepperProps,\n WizardBodyProps = {},\n WizardProps,\n conditionalSubmitFlag,\n}: WizardInternalProps) => {\n const {\n formOptions,\n currentStep,\n handlePrev,\n onKeyDown,\n handleNext,\n activeStepIndex,\n prevSteps,\n } = useContext(WizardContext)\n\n const buttonLabelsFinal = {\n next: 'Continue',\n submit: 'Submit',\n cancel: 'Cancel',\n back: 'Back',\n ...buttonLabels,\n }\n\n return (\n <StyledWizard\n container\n {...WizardProps}\n onKeyDown={onKeyDown as React.KeyboardEventHandler<HTMLDivElement>}\n >\n {stepsInfo && (\n <WizardNav\n StepperProps={StepperProps}\n stepsInfo={stepsInfo}\n activeStepIndex={activeStepIndex}\n />\n )}\n <Grid\n container\n spacing={2}\n {...WizardBodyProps}\n className={clsx(classes.wizardBody, WizardBodyProps.className)}\n >\n {/* eslint-disable-next-line @typescript-eslint/no-explicit-any */}\n {currentStep.fields.map((item: any) => formOptions.renderForm([item]))}\n <WizardStepButtons\n {...currentStep}\n formOptions={formOptions}\n buttonLabels={buttonLabelsFinal}\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n handleNext={(nextStep: any) => handleNext(nextStep)}\n handlePrev={() => handlePrev()}\n disableBack={prevSteps.length === 0}\n conditionalSubmitFlag={conditionalSubmitFlag}\n ButtonContainerProps={ButtonContainerProps}\n />\n </Grid>\n </StyledWizard>\n )\n}\n\nexport interface WizardProps {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any\n}\n\n// The common Wizard's prop types are renderer-version specific; the schema\n// always provides `fields` at runtime.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst CommonWizardAny = CommonWizard as React.ComponentType<any>\n\nexport const Wizard = (props: WizardProps) => (\n <CommonWizardAny Wizard={WizardInternal} {...props} />\n)\n\nexport default Wizard\n"],"names":["Fragment","useContext","Button","Grid","Step","StepLabel","Stepper","styled","clsx","CommonWizard","selectNext","FormSpy","WizardContext","NAV_PREFIX","navClasses","stepper","StyledStepper","width","WizardNav","StepperProps","stepsInfo","activeStepIndex","className","activeStep","map","title","label","StepLabelProps","StepProps","idx","key","BUTTONS_PREFIX","buttonClasses","buttons","button","buttonsContainer","StyledButtonsGrid","display","justifyContent","marginRight","marginTop","NextButton","nextStep","handleNext","nextLabel","getState","handleSubmit","submitLabel","conditionalSubmitFlag","nextResult","progressNext","valid","validating","submitting","variant","color","disabled","onClick","WizardStepButtons","Buttons","props","classes","disableBack","handlePrev","buttonLabels","cancel","submit","back","next","formOptions","ButtonContainerProps","container","direction","sx","subscription","values","size","md","xs","onCancel","PREFIX","wizardBody","StyledWizard","padding","margin","WizardInternal","WizardBodyProps","WizardProps","currentStep","onKeyDown","prevSteps","buttonLabelsFinal","spacing","fields","item","renderForm","length","CommonWizardAny","Wizard"],"mappings":";;;;AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;CAGC,GAED,SAASA,QAAQ,EAAEC,UAAU,QAAQ,QAAO;AAE5C,SACEC,MAAM,EACNC,IAAI,EAEJC,IAAI,EACJC,SAAS,EAGTC,OAAO,QAEF,gBAAe;AACtB,SAASC,MAAM,QAAQ,uBAAsB;AAE7C,OAAOC,UAAU,OAAM;AAEvB,OAAOC,kBAAkB,mCAAkC;AAC3D,OAAOC,gBAAgB,+CAA8C;AAErE,SAEEC,OAAO,EACPC,aAAa,QACR,iC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L,cAAc2B;wBACd,8DAA8D;wBAC9DhD,YAAY,CAACD,WAAkBC,WAAWD;wBAC1CqB,YAAY,IAAMA;wBAClBD,aAAa4B,UAAUM,MAAM,KAAK;wBAClChD,uBAAuBA;wBACvBsB,sBAAsBA;;;;;;AAKhC;AAOA,2EAA2E;AAC3E,uCAAuC;AACvC,8DAA8D;AAC9D,MAAM2B,kBAAkBxF;AAExB,OAAO,MAAMyF,SAAS,CAACtC,sBACrB,KAACqC;QAAgBC,QAAQb;OAAoBzB,QAC9C;AAED,eAAesC,OAAM"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import type { ComponentMapper, FormRendererProps } from './vendor/data-driven-forms';
18
+ export type FormTemplateComponent = JSX.ComponentType<FormRendererProps>;
19
+ export type FieldComponentMap = IndexOf<ComponentMapper>;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ export { };
17
+
18
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../libs/shared/ui/jsx-forms/src/lib/types.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2023 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ComponentMapper,\n FormRendererProps,\n} from './vendor/data-driven-forms'\n\nexport type FormTemplateComponent = JSX.ComponentType<FormRendererProps>\nexport type FieldComponentMap = IndexOf<ComponentMapper>\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAQD,WAAwD"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ export declare function optionIsEqualToValue<T, U extends {
18
+ value?: unknown;
19
+ }>(option: U, value: T): boolean;
20
+ export default optionIsEqualToValue;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ export function optionIsEqualToValue(option, value) {
17
+ return (option == null ? void 0 : option.value) === value;
18
+ }
19
+ export default optionIsEqualToValue;
20
+
21
+ //# sourceMappingURL=option-is-equal-to-value.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../libs/shared/ui/jsx-forms/src/lib/utils/option-is-equal-to-value.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2022 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function optionIsEqualToValue<T, U extends {value?: unknown}>(option: U, value: T) {\n return option?.value === value\n}\nexport default optionIsEqualToValue\n"],"names":["optionIsEqualToValue","option","value"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,OAAO,SAASA,qBAAqDC,MAAS,EAAEC,KAAQ;IACtF,OAAOD,CAAAA,0BAAAA,OAAQC,KAAK,MAAKA;AAC3B;AACA,eAAeF,qBAAoB"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ export declare const validationMessage: (meta: {
18
+ error?: string;
19
+ submitError?: string;
20
+ touched?: boolean;
21
+ }, validateOnMount: boolean) => string;
22
+ export default validationMessage;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ export const validationMessage = (meta, validateOnMount)=>{
17
+ if (validateOnMount) {
18
+ return meta.error || meta.submitError;
19
+ }
20
+ return meta.touched && (meta.error || meta.submitError);
21
+ };
22
+ export default validationMessage;
23
+
24
+ //# sourceMappingURL=validation-message.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../libs/shared/ui/jsx-forms/src/lib/utils/validation-message.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2022 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const validationMessage = (meta: { error?: string; submitError?: string; touched?: boolean }, validateOnMount: boolean) => {\n if (validateOnMount) {\n return meta.error || meta.submitError\n }\n return meta.touched && (meta.error || meta.submitError)\n}\n\nexport default validationMessage\n"],"names":["validationMessage","meta","validateOnMount","error","submitError","touched"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,OAAO,MAAMA,oBAAoB,CAACC,MAAmEC;IACnG,IAAIA,iBAAiB;QACnB,OAAOD,KAAKE,KAAK,IAAIF,KAAKG,WAAW;IACvC;IACA,OAAOH,KAAKI,OAAO,IAAKJ,CAAAA,KAAKE,KAAK,IAAIF,KAAKG,WAAW,AAAD;AACvD,EAAC;AAED,eAAeJ,kBAAiB"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ export { type ActionResolution, type AnyObject, type ComponentMapper, type ComponentType, componentTypes, composeValidators, type ConditionDefinition, type ConditionProp, type ConditionProps, type DataType, dataTypes, defaultSchemaValidator, type Field as FieldSchema, FieldArray, FieldProvider, Form, FormError, type FormOptions, FormRenderer, type FormRendererProps, FormSpy, type InnerWhenFunction, type LenghtOptions, type Meta, type NumericalityOptions, parseCondition, type PatternOptions, RendererContext, useFieldApi, type UseFieldApiComponentConfig, type UseFieldApiConfig, type UseFieldApiProps, useFormApi, type Validator, type ValidatorConfiguration, type ValidatorFunction, type ValidatorMapper, validatorMapper, type ValidatorType, validatorTypes, type WhenFunction, } from '@data-driven-forms/react-form-renderer';
18
+ export { default as WizardContext } from '@data-driven-forms/react-form-renderer/wizard-context';
19
+ export { type ExtendedMapperComponent, type FieldAction, type FieldActions, type FieldApi, type FormTemplateRenderProps, type Input, type PartialValidator, type ResolvePropsFunction, } from '@data-driven-forms/react-form-renderer/common-types';
20
+ import type { LegacySchemaType } from '@data-driven-forms/react-form-renderer/common-types/schema';
21
+ export interface FormSchema extends LegacySchemaType, Record<string, any> {
22
+ id?: string;
23
+ name?: string;
24
+ }
25
+ export { default as validation, type ValidationOptions, } from '@data-driven-forms/react-form-renderer/validation/validation';
26
+ export { prepareMsg, memoize, } from '@data-driven-forms/react-form-renderer/common';
27
+ import { prepareMsg as _prepareMsg } from '@data-driven-forms/react-form-renderer/common';
28
+ export type MessageObject = ReturnType<typeof _prepareMsg>;
29
+ export { default as prepareComponentProps } from '@data-driven-forms/react-form-renderer/prepare-component-props';
30
+ export { default as getVisibleFields } from '@data-driven-forms/react-form-renderer/get-visible-fields';
31
+ export { default as getValidates } from '@data-driven-forms/react-form-renderer/get-validates';
32
+ export { default as getConditionTriggers } from '@data-driven-forms/react-form-renderer/get-condition-triggers';
33
+ export { default as Condition } from '@data-driven-forms/react-form-renderer/condition';
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ export { componentTypes, composeValidators, dataTypes, // DefaultSchemaError,
17
+ defaultSchemaValidator, FieldArray, FieldProvider, Form, FormError, FormRenderer, FormSpy, parseCondition, RendererContext, useFieldApi, useFormApi, validatorMapper, validatorTypes } from "@data-driven-forms/react-form-renderer";
18
+ // The root ESM barrel of the renderer does not re-export WizardContext at
19
+ // runtime; the subpath entry does.
20
+ export { default as WizardContext } from "@data-driven-forms/react-form-renderer/wizard-context";
21
+ export { default as validation } from "@data-driven-forms/react-form-renderer/validation/validation";
22
+ export { prepareMsg, memoize } from "@data-driven-forms/react-form-renderer/common";
23
+ export { default as prepareComponentProps } from "@data-driven-forms/react-form-renderer/prepare-component-props";
24
+ export { default as getVisibleFields } from "@data-driven-forms/react-form-renderer/get-visible-fields";
25
+ export { default as getValidates } from "@data-driven-forms/react-form-renderer/get-validates";
26
+ export { default as getConditionTriggers } from "@data-driven-forms/react-form-renderer/get-condition-triggers";
27
+ export { default as Condition } from "@data-driven-forms/react-form-renderer/condition";
28
+
29
+ //# sourceMappingURL=data-driven-forms.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../libs/shared/ui/jsx-forms/src/lib/vendor/data-driven-forms.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2022 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport {\n type ActionResolution,\n type AnyObject,\n type ComponentMapper,\n type ComponentType,\n componentTypes,\n composeValidators,\n type ConditionDefinition,\n type ConditionProp,\n type ConditionProps,\n type DataType,\n dataTypes,\n // DefaultSchemaError,\n defaultSchemaValidator,\n type Field as FieldSchema,\n FieldArray,\n FieldProvider,\n Form,\n FormError,\n type FormOptions,\n FormRenderer,\n type FormRendererProps,\n FormSpy,\n type InnerWhenFunction,\n type LenghtOptions,\n type Meta,\n type NumericalityOptions,\n parseCondition,\n type PatternOptions,\n RendererContext,\n useFieldApi,\n type UseFieldApiComponentConfig,\n type UseFieldApiConfig,\n type UseFieldApiProps,\n useFormApi,\n type Validator,\n type ValidatorConfiguration,\n type ValidatorFunction,\n type ValidatorMapper,\n validatorMapper,\n type ValidatorType,\n validatorTypes,\n type WhenFunction,\n} from '@data-driven-forms/react-form-renderer'\n\n// The root ESM barrel of the renderer does not re-export WizardContext at\n// runtime; the subpath entry does.\nexport { default as WizardContext } from '@data-driven-forms/react-form-renderer/wizard-context'\n\n// Since v4 these types live only on the common-types entry, not the root\n// barrel. `ActionMapper`, `CommonTypes` and `MessageTypes` were removed\n// upstream with no replacement.\nexport {\n type ExtendedMapperComponent,\n type FieldAction,\n type FieldActions,\n type FieldApi,\n type FormTemplateRenderProps,\n type Input,\n type PartialValidator,\n type ResolvePropsFunction,\n} from '@data-driven-forms/react-form-renderer/common-types'\n\n// v4's `Schema<T>` derives `fields` from a ComponentMapper generic whose\n// default collapses to `never[]`; our schemas are plain field objects, so\n// the public type extends the legacy shape, keeping the id/name extras\n// (and arbitrary keys) the v3 module augmentation used to provide.\nimport type { LegacySchemaType } from '@data-driven-forms/react-form-renderer/common-types/schema'\nexport interface FormSchema extends LegacySchemaType, Record<string, any> {\n id?: string\n name?: string\n}\n\nexport {\n default as validation,\n type ValidationOptions,\n} from '@data-driven-forms/react-form-renderer/validation/validation'\n\nexport {\n prepareMsg,\n memoize,\n} from '@data-driven-forms/react-form-renderer/common'\n\n// v4 no longer exports the MessageObject interface; derive it from prepareMsg.\nimport { prepareMsg as _prepareMsg } from '@data-driven-forms/react-form-renderer/common'\nexport type MessageObject = ReturnType<typeof _prepareMsg>\n\nexport { default as prepareComponentProps } from '@data-driven-forms/react-form-renderer/prepare-component-props'\n\nexport { default as getVisibleFields } from '@data-driven-forms/react-form-renderer/get-visible-fields'\n\nexport { default as getValidates } from '@data-driven-forms/react-form-renderer/get-validates'\n\nexport { default as getConditionTriggers } from '@data-driven-forms/react-form-renderer/get-condition-triggers'\n\nexport { default as Condition } from '@data-driven-forms/react-form-renderer/condition'\n"],"names":["componentTypes","composeValidators","dataTypes","defaultSchemaValidator","FieldArray","FieldProvider","Form","FormError","FormRenderer","FormSpy","parseCondition","RendererContext","useFieldApi","useFormApi","validatorMapper","validatorTypes","default","WizardContext","validation","prepareMsg","memoize","prepareComponentProps","getVisibleFields","getValidates","getConditionTriggers","Condition"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAKEA,cAAc,EACdC,iBAAiB,EAKjBC,SAAS,EACT,sBAAsB;AACtBC,sBAAsB,EAEtBC,UAAU,EACVC,aAAa,EACbC,IAAI,EACJC,SAAS,EAETC,YAAY,EAEZC,OAAO,EAKPC,cAAc,EAEdC,eAAe,EACfC,WAAW,EAIXC,UAAU,EAKVC,eAAe,EAEfC,cAAc,QAET,yCAAwC;AAE/C,0EAA0E;AAC1E,mCAAmC;AACnC,SAASC,WAAWC,aAAa,QAAQ,wDAAuD;AA0BhG,SACED,WAAWE,UAAU,QAEhB,+DAA8D;AAErE,SACEC,UAAU,EACVC,OAAO,QACF,gDAA+C;AAMtD,SAASJ,WAAWK,qBAAqB,QAAQ,iEAAgE;AAEjH,SAASL,WAAWM,gBAAgB,QAAQ,4DAA2D;AAEvG,SAASN,WAAWO,YAAY,QAAQ,uDAAsD;AAE9F,SAASP,WAAWQ,oBAAoB,QAAQ,gEAA+D;AAE/G,SAASR,WAAWS,SAAS,QAAQ,mDAAkD"}