@rjsf/mantine 6.0.0-beta.14

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 (173) hide show
  1. package/README.md +153 -0
  2. package/dist/index.js +1918 -0
  3. package/dist/index.js.map +7 -0
  4. package/dist/mantine.esm.js +1967 -0
  5. package/dist/mantine.esm.js.map +7 -0
  6. package/dist/mantine.umd.js +1714 -0
  7. package/lib/Form/index.d.ts +6 -0
  8. package/lib/Form/index.js +7 -0
  9. package/lib/Form/index.js.map +1 -0
  10. package/lib/Theme/index.d.ts +5 -0
  11. package/lib/Theme/index.js +10 -0
  12. package/lib/Theme/index.js.map +1 -0
  13. package/lib/index.d.ts +6 -0
  14. package/lib/index.js +7 -0
  15. package/lib/index.js.map +1 -0
  16. package/lib/templates/ArrayFieldItemTemplate.d.ts +6 -0
  17. package/lib/templates/ArrayFieldItemTemplate.js +14 -0
  18. package/lib/templates/ArrayFieldItemTemplate.js.map +1 -0
  19. package/lib/templates/ArrayFieldTemplate.d.ts +6 -0
  20. package/lib/templates/ArrayFieldTemplate.js +20 -0
  21. package/lib/templates/ArrayFieldTemplate.js.map +1 -0
  22. package/lib/templates/ArrayFieldTitleTemplate.d.ts +7 -0
  23. package/lib/templates/ArrayFieldTitleTemplate.js +18 -0
  24. package/lib/templates/ArrayFieldTitleTemplate.js.map +1 -0
  25. package/lib/templates/BaseInputTemplate.d.ts +8 -0
  26. package/lib/templates/BaseInputTemplate.js +36 -0
  27. package/lib/templates/BaseInputTemplate.js.map +1 -0
  28. package/lib/templates/ButtonTemplates/AddButton.d.ts +4 -0
  29. package/lib/templates/ButtonTemplates/AddButton.js +11 -0
  30. package/lib/templates/ButtonTemplates/AddButton.js.map +1 -0
  31. package/lib/templates/ButtonTemplates/IconButton.d.ts +8 -0
  32. package/lib/templates/ButtonTemplates/IconButton.js +25 -0
  33. package/lib/templates/ButtonTemplates/IconButton.js.map +1 -0
  34. package/lib/templates/ButtonTemplates/SubmitButton.d.ts +4 -0
  35. package/lib/templates/ButtonTemplates/SubmitButton.js +13 -0
  36. package/lib/templates/ButtonTemplates/SubmitButton.js.map +1 -0
  37. package/lib/templates/ButtonTemplates/index.d.ts +3 -0
  38. package/lib/templates/ButtonTemplates/index.js +15 -0
  39. package/lib/templates/ButtonTemplates/index.js.map +1 -0
  40. package/lib/templates/DescriptionField.d.ts +6 -0
  41. package/lib/templates/DescriptionField.js +15 -0
  42. package/lib/templates/DescriptionField.js.map +1 -0
  43. package/lib/templates/ErrorList.d.ts +6 -0
  44. package/lib/templates/ErrorList.js +13 -0
  45. package/lib/templates/ErrorList.js.map +1 -0
  46. package/lib/templates/FieldErrorTemplate.d.ts +6 -0
  47. package/lib/templates/FieldErrorTemplate.js +16 -0
  48. package/lib/templates/FieldErrorTemplate.js.map +1 -0
  49. package/lib/templates/FieldHelpTemplate.d.ts +6 -0
  50. package/lib/templates/FieldHelpTemplate.js +13 -0
  51. package/lib/templates/FieldHelpTemplate.js.map +1 -0
  52. package/lib/templates/FieldTemplate.d.ts +7 -0
  53. package/lib/templates/FieldTemplate.js +18 -0
  54. package/lib/templates/FieldTemplate.js.map +1 -0
  55. package/lib/templates/GridTemplate.d.ts +7 -0
  56. package/lib/templates/GridTemplate.js +20 -0
  57. package/lib/templates/GridTemplate.js.map +1 -0
  58. package/lib/templates/MultiSchemaFieldTemplate.d.ts +2 -0
  59. package/lib/templates/MultiSchemaFieldTemplate.js +6 -0
  60. package/lib/templates/MultiSchemaFieldTemplate.js.map +1 -0
  61. package/lib/templates/ObjectFieldTemplate.d.ts +8 -0
  62. package/lib/templates/ObjectFieldTemplate.js +24 -0
  63. package/lib/templates/ObjectFieldTemplate.js.map +1 -0
  64. package/lib/templates/TitleField.d.ts +6 -0
  65. package/lib/templates/TitleField.js +11 -0
  66. package/lib/templates/TitleField.js.map +1 -0
  67. package/lib/templates/WrapIfAdditionalTemplate.d.ts +7 -0
  68. package/lib/templates/WrapIfAdditionalTemplate.js +29 -0
  69. package/lib/templates/WrapIfAdditionalTemplate.js.map +1 -0
  70. package/lib/templates/icons.d.ts +11 -0
  71. package/lib/templates/icons.js +20 -0
  72. package/lib/templates/icons.js.map +1 -0
  73. package/lib/templates/index.d.ts +4 -0
  74. package/lib/templates/index.js +36 -0
  75. package/lib/templates/index.js.map +1 -0
  76. package/lib/tsconfig.tsbuildinfo +1 -0
  77. package/lib/utils.d.ts +2 -0
  78. package/lib/utils.js +35 -0
  79. package/lib/utils.js.map +1 -0
  80. package/lib/widgets/CheckboxWidget.d.ts +8 -0
  81. package/lib/widgets/CheckboxWidget.js +33 -0
  82. package/lib/widgets/CheckboxWidget.js.map +1 -0
  83. package/lib/widgets/CheckboxesWidget.d.ts +7 -0
  84. package/lib/widgets/CheckboxesWidget.js +33 -0
  85. package/lib/widgets/CheckboxesWidget.js.map +1 -0
  86. package/lib/widgets/ColorWidget.d.ts +6 -0
  87. package/lib/widgets/ColorWidget.js +28 -0
  88. package/lib/widgets/ColorWidget.js.map +1 -0
  89. package/lib/widgets/DateTime/AltDateTimeWidget.d.ts +13 -0
  90. package/lib/widgets/DateTime/AltDateTimeWidget.js +16 -0
  91. package/lib/widgets/DateTime/AltDateTimeWidget.js.map +1 -0
  92. package/lib/widgets/DateTime/AltDateWidget.d.ts +11 -0
  93. package/lib/widgets/DateTime/AltDateWidget.js +51 -0
  94. package/lib/widgets/DateTime/AltDateWidget.js.map +1 -0
  95. package/lib/widgets/DateTime/DateTimeInput.d.ts +5 -0
  96. package/lib/widgets/DateTime/DateTimeInput.js +39 -0
  97. package/lib/widgets/DateTime/DateTimeInput.js.map +1 -0
  98. package/lib/widgets/DateTime/DateTimeWidget.d.ts +6 -0
  99. package/lib/widgets/DateTime/DateTimeWidget.js +11 -0
  100. package/lib/widgets/DateTime/DateTimeWidget.js.map +1 -0
  101. package/lib/widgets/DateTime/DateWidget.d.ts +6 -0
  102. package/lib/widgets/DateTime/DateWidget.js +11 -0
  103. package/lib/widgets/DateTime/DateWidget.js.map +1 -0
  104. package/lib/widgets/DateTime/TimeWidget.d.ts +6 -0
  105. package/lib/widgets/DateTime/TimeWidget.js +27 -0
  106. package/lib/widgets/DateTime/TimeWidget.js.map +1 -0
  107. package/lib/widgets/DateTime/index.d.ts +5 -0
  108. package/lib/widgets/DateTime/index.js +6 -0
  109. package/lib/widgets/DateTime/index.js.map +1 -0
  110. package/lib/widgets/FileWidget.d.ts +7 -0
  111. package/lib/widgets/FileWidget.js +106 -0
  112. package/lib/widgets/FileWidget.js.map +1 -0
  113. package/lib/widgets/PasswordWidget.d.ts +7 -0
  114. package/lib/widgets/PasswordWidget.js +30 -0
  115. package/lib/widgets/PasswordWidget.js.map +1 -0
  116. package/lib/widgets/RadioWidget.d.ts +7 -0
  117. package/lib/widgets/RadioWidget.js +33 -0
  118. package/lib/widgets/RadioWidget.js.map +1 -0
  119. package/lib/widgets/RangeWidget.d.ts +7 -0
  120. package/lib/widgets/RangeWidget.js +34 -0
  121. package/lib/widgets/RangeWidget.js.map +1 -0
  122. package/lib/widgets/SelectWidget.d.ts +7 -0
  123. package/lib/widgets/SelectWidget.js +45 -0
  124. package/lib/widgets/SelectWidget.js.map +1 -0
  125. package/lib/widgets/TextareaWidget.d.ts +7 -0
  126. package/lib/widgets/TextareaWidget.js +30 -0
  127. package/lib/widgets/TextareaWidget.js.map +1 -0
  128. package/lib/widgets/index.d.ts +4 -0
  129. package/lib/widgets/index.js +34 -0
  130. package/lib/widgets/index.js.map +1 -0
  131. package/package.json +110 -0
  132. package/src/Form/index.ts +15 -0
  133. package/src/Theme/index.ts +18 -0
  134. package/src/index.ts +8 -0
  135. package/src/templates/ArrayFieldItemTemplate.tsx +40 -0
  136. package/src/templates/ArrayFieldTemplate.tsx +103 -0
  137. package/src/templates/ArrayFieldTitleTemplate.tsx +33 -0
  138. package/src/templates/BaseInputTemplate.tsx +134 -0
  139. package/src/templates/ButtonTemplates/AddButton.tsx +17 -0
  140. package/src/templates/ButtonTemplates/IconButton.tsx +87 -0
  141. package/src/templates/ButtonTemplates/SubmitButton.tsx +20 -0
  142. package/src/templates/ButtonTemplates/index.ts +21 -0
  143. package/src/templates/DescriptionField.tsx +24 -0
  144. package/src/templates/ErrorList.tsx +36 -0
  145. package/src/templates/FieldErrorTemplate.tsx +27 -0
  146. package/src/templates/FieldHelpTemplate.tsx +22 -0
  147. package/src/templates/FieldTemplate.tsx +66 -0
  148. package/src/templates/GridTemplate.tsx +30 -0
  149. package/src/templates/MultiSchemaFieldTemplate.tsx +15 -0
  150. package/src/templates/ObjectFieldTemplate.tsx +104 -0
  151. package/src/templates/TitleField.tsx +17 -0
  152. package/src/templates/WrapIfAdditionalTemplate.tsx +99 -0
  153. package/src/templates/icons.tsx +141 -0
  154. package/src/templates/index.ts +43 -0
  155. package/src/tsconfig.json +23 -0
  156. package/src/utils.ts +37 -0
  157. package/src/widgets/CheckboxWidget.tsx +110 -0
  158. package/src/widgets/CheckboxesWidget.tsx +112 -0
  159. package/src/widgets/ColorWidget.tsx +85 -0
  160. package/src/widgets/DateTime/AltDateTimeWidget.tsx +22 -0
  161. package/src/widgets/DateTime/AltDateWidget.tsx +139 -0
  162. package/src/widgets/DateTime/DateTimeInput.tsx +97 -0
  163. package/src/widgets/DateTime/DateTimeWidget.tsx +24 -0
  164. package/src/widgets/DateTime/DateWidget.tsx +22 -0
  165. package/src/widgets/DateTime/TimeWidget.tsx +83 -0
  166. package/src/widgets/DateTime/index.ts +5 -0
  167. package/src/widgets/FileWidget.tsx +176 -0
  168. package/src/widgets/PasswordWidget.tsx +88 -0
  169. package/src/widgets/RadioWidget.tsx +103 -0
  170. package/src/widgets/RangeWidget.tsx +95 -0
  171. package/src/widgets/SelectWidget.tsx +109 -0
  172. package/src/widgets/TextareaWidget.tsx +87 -0
  173. package/src/widgets/index.ts +42 -0
@@ -0,0 +1,6 @@
1
+ import { ComponentType } from 'react';
2
+ import { FormProps } from '@rjsf/core';
3
+ import { FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
4
+ export declare function generateForm<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(): ComponentType<FormProps<T, S, F>>;
5
+ declare const _default: ComponentType<FormProps<any, RJSFSchema, any>>;
6
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { withTheme } from '@rjsf/core';
2
+ import { generateTheme } from '../Theme';
3
+ export function generateForm() {
4
+ return withTheme(generateTheme());
5
+ }
6
+ export default generateForm();
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Form/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,SAAS,EAAE,MAAM,YAAY,CAAC;AAGlD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,UAAU,YAAY;IAK1B,OAAO,SAAS,CAAU,aAAa,EAAW,CAAC,CAAC;AACtD,CAAC;AAED,eAAe,YAAY,EAAE,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { ThemeProps } from '@rjsf/core';
2
+ import { FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
3
+ export declare function generateTheme<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(): ThemeProps<T, S, F>;
4
+ declare const _default: ThemeProps<any, RJSFSchema, any>;
5
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { generateTemplates } from '../templates';
2
+ import { generateWidgets } from '../widgets';
3
+ export function generateTheme() {
4
+ return {
5
+ templates: generateTemplates(),
6
+ widgets: generateWidgets(),
7
+ };
8
+ }
9
+ export default generateTheme();
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Theme/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,UAAU,aAAa;IAK3B,OAAO;QACL,SAAS,EAAE,iBAAiB,EAAW;QACvC,OAAO,EAAE,eAAe,EAAW;KACpC,CAAC;AACJ,CAAC;AAED,eAAe,aAAa,EAAE,CAAC"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ import Form, { generateForm } from './Form';
2
+ import Templates, { generateTemplates } from './templates';
3
+ import Theme, { generateTheme } from './Theme';
4
+ import Widgets, { generateWidgets } from './widgets';
5
+ export { Form, Templates, Theme, Widgets, generateForm, generateTemplates, generateTheme, generateWidgets };
6
+ export default Form;
package/lib/index.js ADDED
@@ -0,0 +1,7 @@
1
+ import Form, { generateForm } from './Form';
2
+ import Templates, { generateTemplates } from './templates';
3
+ import Theme, { generateTheme } from './Theme';
4
+ import Widgets, { generateWidgets } from './widgets';
5
+ export { Form, Templates, Theme, Widgets, generateForm, generateTemplates, generateTheme, generateWidgets };
6
+ export default Form;
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,SAAS,EAAE,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,OAAO,EAAE,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAErD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;AAE5G,eAAe,IAAI,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { ArrayFieldItemTemplateType, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
+ /** The `ArrayFieldItemTemplate` component is the template used to render an items of an array.
3
+ *
4
+ * @param props - The `ArrayFieldItemTemplateType` props for the component
5
+ */
6
+ export default function ArrayFieldItemTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: ArrayFieldItemTemplateType<T, S, F>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { getTemplate, getUiOptions, } from '@rjsf/utils';
3
+ import { Box, Flex, Group } from '@mantine/core';
4
+ /** The `ArrayFieldItemTemplate` component is the template used to render an items of an array.
5
+ *
6
+ * @param props - The `ArrayFieldItemTemplateType` props for the component
7
+ */
8
+ export default function ArrayFieldItemTemplate(props) {
9
+ const { buttonsProps, className, hasToolbar, index, uiSchema, registry, children } = props;
10
+ const uiOptions = getUiOptions(uiSchema);
11
+ const ArrayFieldItemButtonsTemplate = getTemplate('ArrayFieldItemButtonsTemplate', registry, uiOptions);
12
+ return (_jsx(Box, { className: className || 'rjsf-array-item', mb: 'xs', children: _jsxs(Flex, { gap: 'xs', align: 'end', justify: 'center', children: [_jsx(Box, { w: '100%', children: children }), hasToolbar && (_jsx(Group, { wrap: 'nowrap', gap: 2, mb: 7, children: _jsx(ArrayFieldItemButtonsTemplate, { ...buttonsProps }) }))] }) }, `array-item-${index}`));
13
+ }
14
+ //# sourceMappingURL=ArrayFieldItemTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArrayFieldItemTemplate.js","sourceRoot":"","sources":["../../src/templates/ArrayFieldItemTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,WAAW,EACX,YAAY,GAGb,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEjD;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAI5C,KAA0C;IAC1C,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAC3F,MAAM,SAAS,GAAG,YAAY,CAAU,QAAQ,CAAC,CAAC;IAClD,MAAM,6BAA6B,GAAG,WAAW,CAC/C,+BAA+B,EAC/B,QAAQ,EACR,SAAS,CACV,CAAC;IAEF,OAAO,CACL,KAAC,GAAG,IAA6B,SAAS,EAAE,SAAS,IAAI,iBAAiB,EAAE,EAAE,EAAC,IAAI,YACjF,MAAC,IAAI,IAAC,GAAG,EAAC,IAAI,EAAC,KAAK,EAAC,KAAK,EAAC,OAAO,EAAC,QAAQ,aACzC,KAAC,GAAG,IAAC,CAAC,EAAC,MAAM,YAAE,QAAQ,GAAO,EAC7B,UAAU,IAAI,CACb,KAAC,KAAK,IAAC,IAAI,EAAC,QAAQ,EAAC,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,YAChC,KAAC,6BAA6B,OAAK,YAAY,GAAI,GAC7C,CACT,IACI,IARC,cAAc,KAAK,EAAE,CASzB,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { ArrayFieldTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
+ /** The `ArrayFieldTemplate` component is the template used to render all items in an array.
3
+ *
4
+ * @param props - The `ArrayFieldItemTemplateType` props for the component
5
+ */
6
+ export default function ArrayFieldTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: ArrayFieldTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { getTemplate, getUiOptions, buttonId, } from '@rjsf/utils';
3
+ import { Fieldset, Box, Group } from '@mantine/core';
4
+ /** The `ArrayFieldTemplate` component is the template used to render all items in an array.
5
+ *
6
+ * @param props - The `ArrayFieldItemTemplateType` props for the component
7
+ */
8
+ export default function ArrayFieldTemplate(props) {
9
+ const { canAdd, className, disabled, idSchema, items, onAddClick, readonly, required, schema, uiSchema, title, registry, } = props;
10
+ const uiOptions = getUiOptions(uiSchema);
11
+ const ArrayFieldDescriptionTemplate = getTemplate('ArrayFieldDescriptionTemplate', registry, uiOptions);
12
+ const ArrayFieldItemTemplate = getTemplate('ArrayFieldItemTemplate', registry, uiOptions);
13
+ const ArrayFieldTitleTemplate = getTemplate('ArrayFieldTitleTemplate', registry, uiOptions);
14
+ // Button templates are not overridden in the uiSchema
15
+ const { ButtonTemplates: { AddButton }, } = registry.templates;
16
+ const legend = (uiOptions.title || title) && (_jsx(ArrayFieldTitleTemplate, { idSchema: idSchema, required: required, title: uiOptions.title || title, schema: schema, uiSchema: uiSchema, registry: registry }));
17
+ return (_jsxs(Fieldset, { legend: legend, className: className, id: idSchema.$id, children: [(uiOptions.description || schema.description) && (_jsx(ArrayFieldDescriptionTemplate, { description: uiOptions.description || schema.description, idSchema: idSchema, schema: schema, uiSchema: uiSchema, registry: registry })), _jsx(Box, { className: 'row rjsf-array-item-list', children: items &&
18
+ items.map(({ key, ...itemProps }) => (_jsx(ArrayFieldItemTemplate, { ...itemProps }, key))) }), canAdd && (_jsx(Group, { justify: 'flex-end', children: _jsx(AddButton, { id: buttonId(idSchema, 'add'), className: 'rjsf-array-item-add', disabled: disabled || readonly, onClick: onAddClick, uiSchema: uiSchema, registry: registry, iconType: 'md' }) }))] }));
19
+ }
20
+ //# sourceMappingURL=ArrayFieldTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArrayFieldTemplate.js","sourceRoot":"","sources":["../../src/templates/ArrayFieldTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,WAAW,EACX,YAAY,EAGZ,QAAQ,GAIT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAErD;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAIxC,KAAuC;IACvC,MAAM,EACJ,MAAM,EACN,SAAS,EACT,QAAQ,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AA0B,YACtC,KAAK;oBACJ,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,SAAS,EAAuC,EAAE,EAAE,CAAC,CACxE,KAAC,sBAAsB,OAAe,SAAS,IAAlB,GAAG,CAAmB,CACpD,CAAC,GACA,EAEL,MAAM,IAAI,CACT,KAAC,KAAK,IAAC,OAAO,EAAC,UAAU,YACvB,KAAC,SAAS,IACR,EAAE,EAAE,QAAQ,CAAI,QAAQ,EAAE,KAAK,CAAC,EAChC,SAAS,EAAC,qBAAqB,EAC/B,QAAQ,EAAE,QAAQ,IAAI,QAAQ,EAC9B,OAAO,EAAE,UAAU,EACnB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAC,IAAI,GACb,GACI,CACT,IACQ,CACZ,CAAC;AACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { ArrayFieldTitleProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
+ /** The `ArrayFieldTitleTemplate` component renders a `TitleFieldTemplate` with an `id` derived from
3
+ * the `idSchema`.
4
+ *
5
+ * @param props - The `ArrayFieldTitleProps` for the component
6
+ */
7
+ export default function ArrayFieldTitleTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: ArrayFieldTitleProps<T, S, F>): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { getUiOptions, titleId, } from '@rjsf/utils';
3
+ import { Title } from '@mantine/core';
4
+ /** The `ArrayFieldTitleTemplate` component renders a `TitleFieldTemplate` with an `id` derived from
5
+ * the `idSchema`.
6
+ *
7
+ * @param props - The `ArrayFieldTitleProps` for the component
8
+ */
9
+ export default function ArrayFieldTitleTemplate(props) {
10
+ const { idSchema, title, uiSchema, registry } = props;
11
+ const options = getUiOptions(uiSchema, registry.globalUiOptions);
12
+ const { label: displayLabel = true } = options;
13
+ if (!title || !displayLabel) {
14
+ return null;
15
+ }
16
+ return (_jsx(Title, { id: titleId(idSchema), order: 4, fw: 'normal', children: title }));
17
+ }
18
+ //# sourceMappingURL=ArrayFieldTitleTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArrayFieldTitleTemplate.js","sourceRoot":"","sources":["../../src/templates/ArrayFieldTitleTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,YAAY,EACZ,OAAO,GAKR,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAI7C,KAAoC;IACpC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAEtD,MAAM,OAAO,GAAG,YAAY,CAAU,QAAQ,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC;IAC1E,MAAM,EAAE,KAAK,EAAE,YAAY,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC;IAC/C,IAAI,CAAC,KAAK,IAAI,CAAC,YAAY,EAAE,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,CACL,KAAC,KAAK,IAAC,EAAE,EAAE,OAAO,CAAI,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAC,QAAQ,YACnD,KAAK,GACA,CACT,CAAC;AACJ,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { BaseInputTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
+ /** The `BaseInputTemplate` is the template to use to render the basic `<input>` component for the `core` theme.
3
+ * It is used as the template for rendering many of the <input> based widgets that differ by `type` and callbacks only.
4
+ * It can be customized/overridden for other themes or individual implementations as needed.
5
+ *
6
+ * @param props - The `WidgetProps` for this template
7
+ */
8
+ export default function BaseInputTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: BaseInputTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,36 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useCallback } from 'react';
3
+ import { ariaDescribedByIds, examplesId, getInputProps, labelValue, } from '@rjsf/utils';
4
+ import { TextInput, NumberInput } from '@mantine/core';
5
+ import { cleanupOptions } from '../utils';
6
+ /** The `BaseInputTemplate` is the template to use to render the basic `<input>` component for the `core` theme.
7
+ * It is used as the template for rendering many of the <input> based widgets that differ by `type` and callbacks only.
8
+ * It can be customized/overridden for other themes or individual implementations as needed.
9
+ *
10
+ * @param props - The `WidgetProps` for this template
11
+ */
12
+ export default function BaseInputTemplate(props) {
13
+ const { id, type, schema, value, placeholder, required, disabled, readonly, autofocus, label, hideLabel, onChange, onChangeOverride, onBlur, onFocus, options, rawErrors, children, } = props;
14
+ const inputProps = getInputProps(schema, type, options, false);
15
+ const themeProps = cleanupOptions(options);
16
+ const handleNumberChange = useCallback((value) => onChange(value), [onChange]);
17
+ const handleChange = useCallback((e) => {
18
+ var _a;
19
+ const handler = onChangeOverride ? onChangeOverride : onChange;
20
+ const value = e.target.value === '' ? ((_a = options.emptyValue) !== null && _a !== void 0 ? _a : '') : e.target.value;
21
+ handler(value);
22
+ }, [onChange, onChangeOverride, options]);
23
+ const handleBlur = useCallback((e) => {
24
+ onBlur(id, e.target && e.target.value);
25
+ }, [onBlur, id]);
26
+ const handleFocus = useCallback((e) => {
27
+ onFocus(id, e.target && e.target.value);
28
+ }, [onFocus, id]);
29
+ const input = inputProps.type === 'number' || inputProps.type === 'integer' ? (_jsx(NumberInput, { id: id, name: id, label: labelValue(label || undefined, hideLabel, false), required: required, autoFocus: autofocus, disabled: disabled || readonly, onBlur: !readonly ? handleBlur : undefined, onChange: !readonly ? handleNumberChange : undefined, onFocus: !readonly ? handleFocus : undefined, placeholder: placeholder, error: rawErrors && rawErrors.length > 0 ? rawErrors.join('\n') : undefined, list: schema.examples ? examplesId(id) : undefined, ...inputProps, ...themeProps, step: typeof inputProps.step === 'number' ? inputProps.step : 1, type: 'text', value: value, "aria-describedby": ariaDescribedByIds(id, !!schema.examples) })) : (_jsx(TextInput, { id: id, name: id, label: labelValue(label || undefined, hideLabel, false), required: required, autoFocus: autofocus, disabled: disabled || readonly, onBlur: !readonly ? handleBlur : undefined, onChange: !readonly ? handleChange : undefined, onFocus: !readonly ? handleFocus : undefined, placeholder: placeholder, error: rawErrors && rawErrors.length > 0 ? rawErrors.join('\n') : undefined, list: schema.examples ? examplesId(id) : undefined, ...inputProps, ...themeProps, value: value, "aria-describedby": ariaDescribedByIds(id, !!schema.examples) }));
30
+ return (_jsxs(_Fragment, { children: [input, children, Array.isArray(schema.examples) && (_jsx("datalist", { id: examplesId(id), children: schema.examples
31
+ .concat(schema.default && !schema.examples.includes(schema.default) ? [schema.default] : [])
32
+ .map((example) => {
33
+ return _jsx("option", { value: example }, example);
34
+ }) }))] }));
35
+ }
36
+ //# sourceMappingURL=BaseInputTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseInputTemplate.js","sourceRoot":"","sources":["../../src/templates/BaseInputTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA2B,WAAW,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EACL,kBAAkB,EAElB,UAAU,EACV,aAAa,EACb,UAAU,GAIX,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEvD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAIvC,KAAsC;IACtC,MAAM,EACJ,EAAE,EACF,IAAI,EACJ,MAAM,EACN,KAAK,EACL,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,KAAK,EACL,SAAS,EACT,QAAQ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AO,iBAAsB,KAAK,EAAE,OAAO,IAAvB,OAAO,CAAoB,CAAC;gBAClD,CAAC,CAAC,GACK,CACZ,IACA,CACJ,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { FormContextType, IconButtonProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
+ /** The `AddButton` renders a button that represent the `Add` action on a form
3
+ */
4
+ export default function AddButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: IconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { TranslatableString } from '@rjsf/utils';
3
+ import IconButton from './IconButton';
4
+ import { Plus } from '../icons';
5
+ /** The `AddButton` renders a button that represent the `Add` action on a form
6
+ */
7
+ export default function AddButton(props) {
8
+ const { registry: { translateString }, } = props;
9
+ return (_jsx(IconButton, { title: translateString(TranslatableString.AddItemButton), variant: 'subtle', ...props, icon: _jsx(Plus, {}) }));
10
+ }
11
+ //# sourceMappingURL=AddButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AddButton.js","sourceRoot":"","sources":["../../../src/templates/ButtonTemplates/AddButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAkE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjH,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC;GACG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,KAA+B;IAE/B,MAAM,EACJ,QAAQ,EAAE,EAAE,eAAe,EAAE,GAC9B,GAAG,KAAK,CAAC;IACV,OAAO,CACL,KAAC,UAAU,IAAC,KAAK,EAAE,eAAe,CAAC,kBAAkB,CAAC,aAAa,CAAC,EAAE,OAAO,EAAC,QAAQ,KAAK,KAAK,EAAE,IAAI,EAAE,KAAC,IAAI,KAAG,GAAI,CACrH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { ActionIconProps } from '@mantine/core';
2
+ import { FormContextType, IconButtonProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
3
+ export type MantineIconButtonProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> = IconButtonProps<T, S, F> & Omit<ActionIconProps, 'onClick'>;
4
+ export default function IconButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: MantineIconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
5
+ export declare function CopyButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: MantineIconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
6
+ export declare function MoveDownButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: MantineIconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
7
+ export declare function MoveUpButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: MantineIconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
8
+ export declare function RemoveButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: MantineIconButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,25 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ActionIcon } from '@mantine/core';
3
+ import { TranslatableString } from '@rjsf/utils';
4
+ import { Copy, ChevronDown, ChevronUp, X } from '../icons';
5
+ export default function IconButton(props) {
6
+ const { icon, iconType = 'sm', color, onClick, uiSchema, registry, ...otherProps } = props;
7
+ return (_jsx(ActionIcon, { size: iconType, color: color, onClick: onClick, ...otherProps, children: icon }));
8
+ }
9
+ export function CopyButton(props) {
10
+ const { registry: { translateString }, } = props;
11
+ return (_jsx(IconButton, { title: translateString(TranslatableString.CopyButton), variant: 'subtle', ...props, icon: _jsx(Copy, {}) }));
12
+ }
13
+ export function MoveDownButton(props) {
14
+ const { registry: { translateString }, } = props;
15
+ return (_jsx(IconButton, { title: translateString(TranslatableString.MoveDownButton), variant: 'subtle', ...props, icon: _jsx(ChevronDown, {}) }));
16
+ }
17
+ export function MoveUpButton(props) {
18
+ const { registry: { translateString }, } = props;
19
+ return (_jsx(IconButton, { title: translateString(TranslatableString.MoveUpButton), variant: 'subtle', ...props, icon: _jsx(ChevronUp, {}) }));
20
+ }
21
+ export function RemoveButton(props) {
22
+ const { registry: { translateString }, } = props;
23
+ return (_jsx(IconButton, { title: translateString(TranslatableString.RemoveButton), variant: 'subtle', color: 'red', ...props, icon: _jsx(X, {}) }));
24
+ }
25
+ //# sourceMappingURL=IconButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconButton.js","sourceRoot":"","sources":["../../../src/templates/ButtonTemplates/IconButton.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAmB,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAkE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjH,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAQ3D,MAAM,CAAC,OAAO,UAAU,UAAU,CAChC,KAAsC;IAEtC,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IAC3F,OAAO,CACL,KAAC,UAAU,IACT,IAAI,EAAE,QAAmC,EACzC,KAAK,EAAE,KAAiC,EACxC,OAAO,EAAE,OAAsF,KAC3F,UAAU,YAEb,IAAI,GACM,CACd,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,UAAU,CACxB,KAAsC;IAEtC,MAAM,EACJ,QAAQ,EAAE,EAAE,eAAe,EAAE,GAC9B,GAAG,KAAK,CAAC;IACV,OAAO,CACL,KAAC,UAAU,IAAC,KAAK,EAAE,eAAe,CAAC,kBAAkB,CAAC,UAAU,CAAC,EAAE,OAAO,EAAC,QAAQ,KAAK,KAAK,EAAE,IAAI,EAAE,KAAC,IAAI,KAAG,GAAI,CAClH,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,cAAc,CAC5B,KAAsC;IAEtC,MAAM,EACJ,QAAQ,EAAE,EAAE,eAAe,EAAE,GAC9B,GAAG,KAAK,CAAC;IACV,OAAO,CACL,KAAC,UAAU,IACT,KAAK,EAAE,eAAe,CAAC,kBAAkB,CAAC,cAAc,CAAC,EACzD,OAAO,EAAC,QAAQ,KACZ,KAAK,EACT,IAAI,EAAE,KAAC,WAAW,KAAG,GACrB,CACH,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,YAAY,CAC1B,KAAsC;IAEtC,MAAM,EACJ,QAAQ,EAAE,EAAE,eAAe,EAAE,GAC9B,GAAG,KAAK,CAAC;IACV,OAAO,CACL,KAAC,UAAU,IACT,KAAK,EAAE,eAAe,CAAC,kBAAkB,CAAC,YAAY,CAAC,EACvD,OAAO,EAAC,QAAQ,KACZ,KAAK,EACT,IAAI,EAAE,KAAC,SAAS,KAAG,GACnB,CACH,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,YAAY,CAC1B,KAAsC;IAEtC,MAAM,EACJ,QAAQ,EAAE,EAAE,eAAe,EAAE,GAC9B,GAAG,KAAK,CAAC;IACV,OAAO,CACL,KAAC,UAAU,IACT,KAAK,EAAE,eAAe,CAAC,kBAAkB,CAAC,YAAY,CAAC,EACvD,OAAO,EAAC,QAAQ,EAChB,KAAK,EAAC,KAAK,KACP,KAAK,EACT,IAAI,EAAE,KAAC,CAAC,KAAG,GACX,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { FormContextType, RJSFSchema, StrictRJSFSchema, SubmitButtonProps } from '@rjsf/utils';
2
+ /** The `SubmitButton` renders a button that represent the `Submit` action on a form
3
+ */
4
+ export default function SubmitButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ uiSchema }: SubmitButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Button } from '@mantine/core';
3
+ import { getSubmitButtonOptions } from '@rjsf/utils';
4
+ /** The `SubmitButton` renders a button that represent the `Submit` action on a form
5
+ */
6
+ export default function SubmitButton({ uiSchema }) {
7
+ const { submitText, norender, props: submitButtonProps = {} } = getSubmitButtonOptions(uiSchema);
8
+ if (norender) {
9
+ return null;
10
+ }
11
+ return (_jsx(Button, { type: 'submit', variant: 'filled', ...submitButtonProps, children: submitText }));
12
+ }
13
+ //# sourceMappingURL=SubmitButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubmitButton.js","sourceRoot":"","sources":["../../../src/templates/ButtonTemplates/SubmitButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAoE,MAAM,aAAa,CAAC;AAEvH;GACG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAIlC,EAAE,QAAQ,EAA8B;IACxC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,iBAAiB,GAAG,EAAE,EAAE,GAAG,sBAAsB,CAAC,QAAQ,CAAC,CAAC;IACjG,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,CACL,KAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAC,QAAQ,KAAK,iBAAiB,YACzD,UAAU,GACJ,CACV,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { FormContextType, RJSFSchema, StrictRJSFSchema, TemplatesType } from '@rjsf/utils';
2
+ declare function buttonTemplates<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(): TemplatesType<T, S, F>['ButtonTemplates'];
3
+ export default buttonTemplates;
@@ -0,0 +1,15 @@
1
+ import SubmitButton from './SubmitButton';
2
+ import AddButton from './AddButton';
3
+ import { CopyButton, MoveDownButton, MoveUpButton, RemoveButton } from './IconButton';
4
+ function buttonTemplates() {
5
+ return {
6
+ SubmitButton,
7
+ AddButton,
8
+ CopyButton,
9
+ MoveDownButton,
10
+ MoveUpButton,
11
+ RemoveButton,
12
+ };
13
+ }
14
+ export default buttonTemplates;
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/ButtonTemplates/index.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEtF,SAAS,eAAe;IAKtB,OAAO;QACL,YAAY;QACZ,SAAS;QACT,UAAU;QACV,cAAc;QACd,YAAY;QACZ,YAAY;KACb,CAAC;AACJ,CAAC;AAED,eAAe,eAAe,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { DescriptionFieldProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
+ /** The `DescriptionField` is the template to use to render the description of a field
3
+ *
4
+ * @param props - The `DescriptionFieldProps` for this component
5
+ */
6
+ export default function DescriptionField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: DescriptionFieldProps<T, S, F>): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { RichDescription } from '@rjsf/core';
3
+ import { Text } from '@mantine/core';
4
+ /** The `DescriptionField` is the template to use to render the description of a field
5
+ *
6
+ * @param props - The `DescriptionFieldProps` for this component
7
+ */
8
+ export default function DescriptionField(props) {
9
+ const { id, description, registry, uiSchema } = props;
10
+ if (description) {
11
+ return (_jsx(Text, { id: id, mt: 3, mb: 'sm', children: _jsx(RichDescription, { description: description, registry: registry, uiSchema: uiSchema }) }));
12
+ }
13
+ return null;
14
+ }
15
+ //# sourceMappingURL=DescriptionField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DescriptionField.js","sourceRoot":"","sources":["../../src/templates/DescriptionField.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAItC,KAAqC;IACrC,MAAM,EAAE,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACtD,IAAI,WAAW,EAAE,CAAC;QAChB,OAAO,CACL,KAAC,IAAI,IAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAC,IAAI,YAC1B,KAAC,eAAe,IAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,GAAI,GAChF,CACR,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { ErrorListProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
+ /** The `ErrorList` component is the template that renders the all the errors associated with the fields in the `Form`
3
+ *
4
+ * @param props - The `ErrorListProps` for this component
5
+ */
6
+ export default function ErrorList<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ errors, registry, }: ErrorListProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { TranslatableString } from '@rjsf/utils';
3
+ import { Alert, Title, List } from '@mantine/core';
4
+ import { ExclamationCircle } from './icons';
5
+ /** The `ErrorList` component is the template that renders the all the errors associated with the fields in the `Form`
6
+ *
7
+ * @param props - The `ErrorListProps` for this component
8
+ */
9
+ export default function ErrorList({ errors, registry, }) {
10
+ const { translateString } = registry;
11
+ return (_jsx(Alert, { color: 'red', variant: 'transparent', title: _jsx(Title, { order: 5, fw: 'normal', children: translateString(TranslatableString.ErrorsLabel) }), icon: _jsx(ExclamationCircle, {}), children: _jsx(List, { children: errors.map((error, index) => (_jsx(List.Item, { c: 'red', children: error.stack }, `error-${index}`))) }) }));
12
+ }
13
+ //# sourceMappingURL=ErrorList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorList.js","sourceRoot":"","sources":["../../src/templates/ErrorList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAiE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAChH,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAoF,EACnH,MAAM,EACN,QAAQ,GACgB;IACxB,MAAM,EAAE,eAAe,EAAE,GAAG,QAAQ,CAAC;IAErC,OAAO,CACL,KAAC,KAAK,IACJ,KAAK,EAAC,KAAK,EACX,OAAO,EAAC,aAAa,EACrB,KAAK,EACH,KAAC,KAAK,IAAC,KAAK,EAAE,CAAC,EAAE,EAAE,EAAC,QAAQ,YACzB,eAAe,CAAC,kBAAkB,CAAC,WAAW,CAAC,GAC1C,EAEV,IAAI,EAAE,KAAC,iBAAiB,KAAG,YAE3B,KAAC,IAAI,cACF,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAC5B,KAAC,IAAI,CAAC,IAAI,IAAwB,CAAC,EAAC,KAAK,YACtC,KAAK,CAAC,KAAK,IADE,SAAS,KAAK,EAAE,CAEpB,CACb,CAAC,GACG,GACD,CACT,CAAC;AACJ,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { FieldErrorProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
+ /** The `FieldErrorTemplate` component renders the errors local to the particular field
3
+ *
4
+ * @param props - The `FieldErrorProps` for the errors being rendered
5
+ */
6
+ export default function FieldErrorTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ errors, idSchema }: FieldErrorProps<T, S, F>): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { errorId } from '@rjsf/utils';
3
+ import { Box, List } from '@mantine/core';
4
+ /** The `FieldErrorTemplate` component renders the errors local to the particular field
5
+ *
6
+ * @param props - The `FieldErrorProps` for the errors being rendered
7
+ */
8
+ export default function FieldErrorTemplate({ errors, idSchema }) {
9
+ if (!errors || !errors.length) {
10
+ return null;
11
+ }
12
+ // In mantine, errors are handled directly in each component, so there is no need to render a separate error template.
13
+ const id = errorId(idSchema);
14
+ return (_jsx(Box, { id: id, c: 'red', display: 'none', children: _jsx(List, { children: errors.map((error, index) => (_jsx(List.Item, { children: error }, `field-error-${index}`))) }) }));
15
+ }
16
+ //# sourceMappingURL=FieldErrorTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldErrorTemplate.js","sourceRoot":"","sources":["../../src/templates/FieldErrorTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAkE,MAAM,aAAa,CAAC;AACtG,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE1C;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAIxC,EAAE,MAAM,EAAE,QAAQ,EAA4B;IAC9C,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,sHAAsH;IACtH,MAAM,EAAE,GAAG,OAAO,CAAI,QAAQ,CAAC,CAAC;IAChC,OAAO,CACL,KAAC,GAAG,IAAC,EAAE,EAAE,EAAE,EAAE,CAAC,EAAC,KAAK,EAAC,OAAO,EAAC,MAAM,YACjC,KAAC,IAAI,cACF,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAC5B,KAAC,IAAI,CAAC,IAAI,cAA+B,KAAK,IAA9B,eAAe,KAAK,EAAE,CAAqB,CAC5D,CAAC,GACG,GACH,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { FieldHelpProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
+ /** The `FieldHelpTemplate` component renders any help desired for a field
3
+ *
4
+ * @param props - The `FieldHelpProps` to be rendered
5
+ */
6
+ export default function FieldHelpTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: FieldHelpProps<T, S, F>): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { helpId } from '@rjsf/utils';
3
+ import { Text } from '@mantine/core';
4
+ /** The `FieldHelpTemplate` component renders any help desired for a field
5
+ *
6
+ * @param props - The `FieldHelpProps` to be rendered
7
+ */
8
+ export default function FieldHelpTemplate(props) {
9
+ const { idSchema, help } = props;
10
+ const id = helpId(idSchema);
11
+ return !help ? null : (_jsx(Text, { id: id, size: 'sm', my: 'xs', c: 'dimmed', children: help }));
12
+ }
13
+ //# sourceMappingURL=FieldHelpTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldHelpTemplate.js","sourceRoot":"","sources":["../../src/templates/FieldHelpTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAiE,MAAM,aAAa,CAAC;AACpG,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAIvC,KAA8B;IAC9B,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAEjC,MAAM,EAAE,GAAG,MAAM,CAAI,QAAQ,CAAC,CAAC;IAE/B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACpB,KAAC,IAAI,IAAC,EAAE,EAAE,EAAE,EAAE,IAAI,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,QAAQ,YACvC,IAAI,GACA,CACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { FieldTemplateProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
+ /** The `FieldTemplate` component is the template used by `SchemaField` to render any field. It renders the field
3
+ * content, (label, description, children, errors and help) inside a `WrapIfAdditional` component.
4
+ *
5
+ * @param props - The `FieldTemplateProps` for this component
6
+ */
7
+ export default function FieldTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: FieldTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box } from '@mantine/core';
3
+ import { getTemplate, getUiOptions, } from '@rjsf/utils';
4
+ /** The `FieldTemplate` component is the template used by `SchemaField` to render any field. It renders the field
5
+ * content, (label, description, children, errors and help) inside a `WrapIfAdditional` component.
6
+ *
7
+ * @param props - The `FieldTemplateProps` for this component
8
+ */
9
+ export default function FieldTemplate(props) {
10
+ const { id, classNames, style, label, errors, help, displayLabel, description, rawDescription, hidden, schema, uiSchema, registry, children, ...otherProps } = props;
11
+ const uiOptions = getUiOptions(uiSchema);
12
+ const WrapIfAdditionalTemplate = getTemplate('WrapIfAdditionalTemplate', registry, uiOptions);
13
+ if (hidden) {
14
+ return _jsx(Box, { display: 'none', children: children });
15
+ }
16
+ return (_jsxs(WrapIfAdditionalTemplate, { id: id, classNames: classNames, style: style, label: label, schema: schema, uiSchema: uiSchema, registry: registry, ...otherProps, children: [children, errors, help] }));
17
+ }
18
+ //# sourceMappingURL=FieldTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldTemplate.js","sourceRoot":"","sources":["../../src/templates/FieldTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAKL,WAAW,EACX,YAAY,GACb,MAAM,aAAa,CAAC;AAErB;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAInC,KAAkC;IAClC,MAAM,EACJ,EAAE,EACF,UAAU,EACV,KAAK,EACL,KAAK,EACL,MAAM,EACN,IAAI,EACJ,YAAY,EACZ,WAAW,EACX,cAAc,EACd,MAAM,EACN,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,GAAG,UAAU,EACd,GAAG,KAAK,CAAC;IAEV,MAAM,SAAS,GAAG,YAAY,CAAU,QAAQ,CAAC,CAAC;IAClD,MAAM,wBAAwB,GAAG,WAAW,CAC1C,0BAA0B,EAC1B,QAAQ,EACR,SAAS,CACV,CAAC;IAEF,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,KAAC,GAAG,IAAC,OAAO,EAAC,MAAM,YAAE,QAAQ,GAAO,CAAC;IAC9C,CAAC;IAED,OAAO,CACL,MAAC,wBAAwB,IACvB,EAAE,EAAE,EAAE,EACN,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,KACd,UAAU,aAEb,QAAQ,EACR,MAAM,EACN,IAAI,IACoB,CAC5B,CAAC;AACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { GridTemplateProps } from '@rjsf/utils';
2
+ /** Renders a `GridTemplate` for mantine, which is expecting the column sizing information coming in via the
3
+ * extra props provided by the caller, which are spread directly on the `Grid`/`Grid.Col`.
4
+ *
5
+ * @param props - The GridTemplateProps, including the extra props containing the Mantine grid positioning details
6
+ */
7
+ export default function GridTemplate(props: GridTemplateProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Container, Grid } from '@mantine/core';
3
+ /** Renders a `GridTemplate` for mantine, which is expecting the column sizing information coming in via the
4
+ * extra props provided by the caller, which are spread directly on the `Grid`/`Grid.Col`.
5
+ *
6
+ * @param props - The GridTemplateProps, including the extra props containing the Mantine grid positioning details
7
+ */
8
+ export default function GridTemplate(props) {
9
+ const { children, column, fluid = true, ...rest } = props;
10
+ if (column) {
11
+ return _jsx(Grid.Col, { ...rest, children: children });
12
+ }
13
+ // Grid with fluid container
14
+ if (fluid) {
15
+ return (_jsx(Container, { p: '4', mx: 0, w: '100%', children: _jsx(Grid, { ...rest, children: children }) }));
16
+ }
17
+ // Grid without container
18
+ return (_jsx(Grid, { grow: true, ...rest, children: children }));
19
+ }
20
+ //# sourceMappingURL=GridTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridTemplate.js","sourceRoot":"","sources":["../../src/templates/GridTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAGhD;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAwB;IAC3D,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAE1D,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,KAAC,IAAI,CAAC,GAAG,OAAK,IAAI,YAAG,QAAQ,GAAY,CAAC;IACnD,CAAC;IAED,4BAA4B;IAC5B,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,CACL,KAAC,SAAS,IAAC,CAAC,EAAC,GAAG,EAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAC,MAAM,YAC9B,KAAC,IAAI,OAAK,IAAI,YAAG,QAAQ,GAAQ,GACvB,CACb,CAAC;IACJ,CAAC;IACD,yBAAyB;IACzB,OAAO,CACL,KAAC,IAAI,IAAC,IAAI,WAAK,IAAI,YAChB,QAAQ,GACJ,CACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { FormContextType, MultiSchemaFieldTemplateProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
+ export default function MultiSchemaFieldTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({ selector, optionSchemaField }: MultiSchemaFieldTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Stack } from '@mantine/core';
3
+ export default function MultiSchemaFieldTemplate({ selector, optionSchemaField }) {
4
+ return (_jsxs(Stack, { style: { marginBottom: '1rem' }, children: [selector, optionSchemaField] }));
5
+ }
6
+ //# sourceMappingURL=MultiSchemaFieldTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MultiSchemaFieldTemplate.js","sourceRoot":"","sources":["../../src/templates/MultiSchemaFieldTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGtC,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAI9C,EAAE,QAAQ,EAAE,iBAAiB,EAA0C;IACvE,OAAO,CACL,MAAC,KAAK,IAAC,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,aACnC,QAAQ,EACR,iBAAiB,IACZ,CACT,CAAC;AACJ,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { FormContextType, ObjectFieldTemplateProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
2
+ /** The `ObjectFieldTemplate` is the template to use to render all the inner properties of an object along with the
3
+ * title and description if available. If the object is expandable, then an `AddButton` is also rendered after all
4
+ * the properties.
5
+ *
6
+ * @param props - The `ObjectFieldTemplateProps` for this component
7
+ */
8
+ export default function ObjectFieldTemplate<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(props: ObjectFieldTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Container, Group, SimpleGrid } from '@mantine/core';
3
+ import { buttonId, canExpand, descriptionId, getTemplate, getUiOptions, titleId, } from '@rjsf/utils';
4
+ /** The `ObjectFieldTemplate` is the template to use to render all the inner properties of an object along with the
5
+ * title and description if available. If the object is expandable, then an `AddButton` is also rendered after all
6
+ * the properties.
7
+ *
8
+ * @param props - The `ObjectFieldTemplateProps` for this component
9
+ */
10
+ export default function ObjectFieldTemplate(props) {
11
+ const { title, description, disabled, properties, onAddClick, readonly, required, schema, uiSchema, idSchema, formData, registry, } = props;
12
+ const uiOptions = getUiOptions(uiSchema);
13
+ const TitleFieldTemplate = getTemplate('TitleFieldTemplate', registry, uiOptions);
14
+ const DescriptionFieldTemplate = getTemplate('DescriptionFieldTemplate', registry, uiOptions);
15
+ // Button templates are not overridden in the uiSchema
16
+ const { ButtonTemplates: { AddButton }, } = registry.templates;
17
+ const gridCols = (typeof (uiOptions === null || uiOptions === void 0 ? void 0 : uiOptions.gridCols) === 'number' && (uiOptions === null || uiOptions === void 0 ? void 0 : uiOptions.gridCols)) || undefined;
18
+ const gridSpacing = uiOptions === null || uiOptions === void 0 ? void 0 : uiOptions.gridSpacing;
19
+ const gridVerticalSpacing = uiOptions === null || uiOptions === void 0 ? void 0 : uiOptions.gridVerticalSpacing;
20
+ return (_jsxs(Container, { id: idSchema.$id, p: 0, children: [title && (_jsx(TitleFieldTemplate, { id: titleId(idSchema), title: title, required: required, schema: schema, uiSchema: uiSchema, registry: registry })), description && (_jsx(DescriptionFieldTemplate, { id: descriptionId(idSchema), description: description, schema: schema, uiSchema: uiSchema, registry: registry })), _jsx(SimpleGrid, { cols: gridCols, spacing: gridSpacing, verticalSpacing: gridVerticalSpacing, mb: 'sm', children: properties
21
+ .filter((e) => !e.hidden)
22
+ .map((element) => (_jsx(Box, { children: element.content }, element.name))) }), canExpand(schema, uiSchema, formData) && (_jsx(Group, { mt: 'xs', justify: 'flex-end', children: _jsx(AddButton, { id: buttonId(idSchema, 'add'), disabled: disabled || readonly, onClick: onAddClick(schema), className: 'rjsf-object-property-expand', uiSchema: uiSchema, registry: registry }) }))] }));
23
+ }
24
+ //# sourceMappingURL=ObjectFieldTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObjectFieldTemplate.js","sourceRoot":"","sources":["../../src/templates/ObjectFieldTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAkB,UAAU,EAAE,MAAM,eAAe,CAAC;AAClF,OAAO,EACL,QAAQ,EACR,SAAS,EACT,aAAa,EAEb,WAAW,EACX,YAAY,EAKZ,OAAO,GACR,MAAM,aAAa,CAAC;AAErB;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAIzC,KAAwC;IACxC,MAAM,EACJ,KAAK,EACL,WAAW,EACX,QAAQ,EACR,UAAU,EACV,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,GAAG,KAAK,CAAC;IACV,MAAM,SAAS,GAAG,YAAY,CAAU,QAAQ,CAAC,CAAC;IAClD,MAAM,kBAAkB,GAAG,WAAW,CAAgC,oBAAoB,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;IACjH,MAAM,wBAAwB,GAAG,WAAW,CAC1C,0BAA0B,EAC1B,QAAQ,EACR,SAAS,CACV,CAAC;IACF,sDAAsD;IACtD,MAAM,EACJ,eAAe,EAAE,EAAE,SAAS,EAAE,GAC/B,GAAG,QAAQ,C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