drf-react-by-schema 0.28.8 → 0.28.10

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 (232) hide show
  1. package/dist/@types/index.d.ts +410 -0
  2. package/dist/@types/index.d.ts.map +1 -0
  3. package/dist/@types/index.js +9 -0
  4. package/dist/@types/string-mask.d.ts +10 -0
  5. package/dist/@types/string-mask.d.ts.map +1 -0
  6. package/dist/@types/string-mask.js +1 -0
  7. package/dist/api.d.ts +81 -0
  8. package/dist/api.d.ts.map +1 -0
  9. package/dist/api.js +1118 -0
  10. package/dist/components/DataGridBySchemaEditable/BooleanInputCell.d.ts +8 -0
  11. package/dist/components/DataGridBySchemaEditable/BooleanInputCell.d.ts.map +1 -0
  12. package/dist/components/DataGridBySchemaEditable/BooleanInputCell.js +86 -0
  13. package/dist/components/DataGridBySchemaEditable/ConditionalEditWrapper.d.ts +12 -0
  14. package/dist/components/DataGridBySchemaEditable/ConditionalEditWrapper.d.ts.map +1 -0
  15. package/dist/components/DataGridBySchemaEditable/ConditionalEditWrapper.js +71 -0
  16. package/dist/components/DataGridBySchemaEditable/ConfirmDialog.d.ts +9 -0
  17. package/dist/components/DataGridBySchemaEditable/ConfirmDialog.d.ts.map +1 -0
  18. package/dist/components/DataGridBySchemaEditable/ConfirmDialog.js +21 -0
  19. package/dist/components/DataGridBySchemaEditable/CustomToolbar.d.ts +26 -0
  20. package/dist/components/DataGridBySchemaEditable/CustomToolbar.d.ts.map +1 -0
  21. package/dist/components/DataGridBySchemaEditable/CustomToolbar.js +146 -0
  22. package/dist/components/DataGridBySchemaEditable/DataGridDesktop.d.ts +73 -0
  23. package/dist/components/DataGridBySchemaEditable/DataGridDesktop.d.ts.map +1 -0
  24. package/dist/components/DataGridBySchemaEditable/DataGridDesktop.js +421 -0
  25. package/dist/components/DataGridBySchemaEditable/DataGridMobile.d.ts +18 -0
  26. package/dist/components/DataGridBySchemaEditable/DataGridMobile.d.ts.map +1 -0
  27. package/dist/components/DataGridBySchemaEditable/DataGridMobile.js +105 -0
  28. package/dist/components/DataGridBySchemaEditable/FileInputCell.d.ts +11 -0
  29. package/dist/components/DataGridBySchemaEditable/FileInputCell.d.ts.map +1 -0
  30. package/dist/components/DataGridBySchemaEditable/FileInputCell.js +155 -0
  31. package/dist/components/DataGridBySchemaEditable/FooterToolbar.d.ts +12 -0
  32. package/dist/components/DataGridBySchemaEditable/FooterToolbar.d.ts.map +1 -0
  33. package/dist/components/DataGridBySchemaEditable/FooterToolbar.js +36 -0
  34. package/dist/components/DataGridBySchemaEditable/GeoEditCell.d.ts +10 -0
  35. package/dist/components/DataGridBySchemaEditable/GeoEditCell.d.ts.map +1 -0
  36. package/dist/components/DataGridBySchemaEditable/GeoEditCell.js +85 -0
  37. package/dist/components/DataGridBySchemaEditable/GeoThumbCell.d.ts +11 -0
  38. package/dist/components/DataGridBySchemaEditable/GeoThumbCell.d.ts.map +1 -0
  39. package/dist/components/DataGridBySchemaEditable/GeoThumbCell.js +90 -0
  40. package/dist/components/DataGridBySchemaEditable/GridActionsCellItemLink.d.ts +18 -0
  41. package/dist/components/DataGridBySchemaEditable/GridActionsCellItemLink.d.ts.map +1 -0
  42. package/dist/components/DataGridBySchemaEditable/GridActionsCellItemLink.js +24 -0
  43. package/dist/components/DataGridBySchemaEditable/GridDateInput.d.ts +8 -0
  44. package/dist/components/DataGridBySchemaEditable/GridDateInput.d.ts.map +1 -0
  45. package/dist/components/DataGridBySchemaEditable/GridDateInput.js +166 -0
  46. package/dist/components/DataGridBySchemaEditable/GridDateTimeInput.d.ts +6 -0
  47. package/dist/components/DataGridBySchemaEditable/GridDateTimeInput.d.ts.map +1 -0
  48. package/dist/components/DataGridBySchemaEditable/GridDateTimeInput.js +154 -0
  49. package/dist/components/DataGridBySchemaEditable/GridDecimalInput.d.ts +10 -0
  50. package/dist/components/DataGridBySchemaEditable/GridDecimalInput.d.ts.map +1 -0
  51. package/dist/components/DataGridBySchemaEditable/GridDecimalInput.js +78 -0
  52. package/dist/components/DataGridBySchemaEditable/GridGenericInput.d.ts +8 -0
  53. package/dist/components/DataGridBySchemaEditable/GridGenericInput.d.ts.map +1 -0
  54. package/dist/components/DataGridBySchemaEditable/GridGenericInput.js +30 -0
  55. package/dist/components/DataGridBySchemaEditable/GridPatternInput.d.ts +7 -0
  56. package/dist/components/DataGridBySchemaEditable/GridPatternInput.d.ts.map +1 -0
  57. package/dist/components/DataGridBySchemaEditable/GridPatternInput.js +74 -0
  58. package/dist/components/DataGridBySchemaEditable/InputInterval.d.ts +21 -0
  59. package/dist/components/DataGridBySchemaEditable/InputInterval.d.ts.map +1 -0
  60. package/dist/components/DataGridBySchemaEditable/InputInterval.js +131 -0
  61. package/dist/components/DataGridBySchemaEditable/MobileSearchBar.d.ts +9 -0
  62. package/dist/components/DataGridBySchemaEditable/MobileSearchBar.d.ts.map +1 -0
  63. package/dist/components/DataGridBySchemaEditable/MobileSearchBar.js +70 -0
  64. package/dist/components/DataGridBySchemaEditable/RowEditingWatcher.d.ts +7 -0
  65. package/dist/components/DataGridBySchemaEditable/RowEditingWatcher.d.ts.map +1 -0
  66. package/dist/components/DataGridBySchemaEditable/RowEditingWatcher.js +41 -0
  67. package/dist/components/DataGridBySchemaEditable/SelectEditInputCell.d.ts +24 -0
  68. package/dist/components/DataGridBySchemaEditable/SelectEditInputCell.d.ts.map +1 -0
  69. package/dist/components/DataGridBySchemaEditable/SelectEditInputCell.js +263 -0
  70. package/dist/components/DataGridBySchemaEditable/geoConstants.d.ts +5 -0
  71. package/dist/components/DataGridBySchemaEditable/geoConstants.d.ts.map +1 -0
  72. package/dist/components/DataGridBySchemaEditable/geoConstants.js +6 -0
  73. package/dist/components/DataGridBySchemaEditable/hooks/useDataGridActions.d.ts +33 -0
  74. package/dist/components/DataGridBySchemaEditable/hooks/useDataGridActions.d.ts.map +1 -0
  75. package/dist/components/DataGridBySchemaEditable/hooks/useDataGridActions.js +161 -0
  76. package/dist/components/DataGridBySchemaEditable/hooks/useOptionsAC.d.ts +14 -0
  77. package/dist/components/DataGridBySchemaEditable/hooks/useOptionsAC.d.ts.map +1 -0
  78. package/dist/components/DataGridBySchemaEditable/hooks/useOptionsAC.js +69 -0
  79. package/dist/components/DataGridBySchemaEditable/hooks/usePreparedColumns.d.ts +9 -0
  80. package/dist/components/DataGridBySchemaEditable/hooks/usePreparedColumns.d.ts.map +1 -0
  81. package/dist/components/DataGridBySchemaEditable/hooks/usePreparedColumns.js +73 -0
  82. package/dist/components/DataGridBySchemaEditable/hooks/useProcessRowUpdate.d.ts +30 -0
  83. package/dist/components/DataGridBySchemaEditable/hooks/useProcessRowUpdate.d.ts.map +1 -0
  84. package/dist/components/DataGridBySchemaEditable/hooks/useProcessRowUpdate.js +199 -0
  85. package/dist/components/DataGridBySchemaEditable/utils/columnFactory.d.ts +33 -0
  86. package/dist/components/DataGridBySchemaEditable/utils/columnFactory.d.ts.map +1 -0
  87. package/dist/components/DataGridBySchemaEditable/utils/columnFactory.js +270 -0
  88. package/dist/components/DataGridBySchemaEditable/utils.d.ts +40 -0
  89. package/dist/components/DataGridBySchemaEditable/utils.d.ts.map +1 -0
  90. package/dist/components/DataGridBySchemaEditable/utils.js +181 -0
  91. package/dist/components/DataGridBySchemaEditable.d.ts +64 -0
  92. package/dist/components/DataGridBySchemaEditable.d.ts.map +1 -0
  93. package/dist/components/DataGridBySchemaEditable.js +172 -0
  94. package/dist/components/DataTotals.d.ts +12 -0
  95. package/dist/components/DataTotals.d.ts.map +1 -0
  96. package/dist/components/DataTotals.js +32 -0
  97. package/dist/components/DataTotalsServer.d.ts +10 -0
  98. package/dist/components/DataTotalsServer.d.ts.map +1 -0
  99. package/dist/components/DataTotalsServer.js +18 -0
  100. package/dist/components/DialogActions.d.ts +11 -0
  101. package/dist/components/DialogActions.d.ts.map +1 -0
  102. package/dist/components/DialogActions.js +20 -0
  103. package/dist/components/FileTypeIcon.d.ts +18 -0
  104. package/dist/components/FileTypeIcon.d.ts.map +1 -0
  105. package/dist/components/FileTypeIcon.js +48 -0
  106. package/dist/components/GenericModelList.d.ts +53 -0
  107. package/dist/components/GenericModelList.d.ts.map +1 -0
  108. package/dist/components/GenericModelList.js +194 -0
  109. package/dist/components/GenericRelatedModelList.d.ts +55 -0
  110. package/dist/components/GenericRelatedModelList.d.ts.map +1 -0
  111. package/dist/components/GenericRelatedModelList.js +181 -0
  112. package/dist/components/GenericRelatedModelListTable.d.ts +56 -0
  113. package/dist/components/GenericRelatedModelListTable.d.ts.map +1 -0
  114. package/dist/components/GenericRelatedModelListTable.js +31 -0
  115. package/dist/components/Image.d.ts +10 -0
  116. package/dist/components/Image.d.ts.map +1 -0
  117. package/dist/components/Image.js +111 -0
  118. package/dist/components/details/DetailBySchema.d.ts +4 -0
  119. package/dist/components/details/DetailBySchema.d.ts.map +1 -0
  120. package/dist/components/details/DetailBySchema.js +175 -0
  121. package/dist/components/details/DetailFieldBySchema.d.ts +4 -0
  122. package/dist/components/details/DetailFieldBySchema.d.ts.map +1 -0
  123. package/dist/components/details/DetailFieldBySchema.js +88 -0
  124. package/dist/components/forms/ChangePasswordForm.d.ts +7 -0
  125. package/dist/components/forms/ChangePasswordForm.d.ts.map +1 -0
  126. package/dist/components/forms/ChangePasswordForm.js +93 -0
  127. package/dist/components/forms/DialogFormBySchema.d.ts +22 -0
  128. package/dist/components/forms/DialogFormBySchema.d.ts.map +1 -0
  129. package/dist/components/forms/DialogFormBySchema.js +97 -0
  130. package/dist/components/forms/FieldBySchema.d.ts +4 -0
  131. package/dist/components/forms/FieldBySchema.d.ts.map +1 -0
  132. package/dist/components/forms/FieldBySchema.js +80 -0
  133. package/dist/components/forms/ForgotPasswordForm.d.ts +11 -0
  134. package/dist/components/forms/ForgotPasswordForm.d.ts.map +1 -0
  135. package/dist/components/forms/ForgotPasswordForm.js +114 -0
  136. package/dist/components/forms/Form.d.ts +61 -0
  137. package/dist/components/forms/Form.d.ts.map +1 -0
  138. package/dist/components/forms/Form.js +264 -0
  139. package/dist/components/forms/FormActions.d.ts +20 -0
  140. package/dist/components/forms/FormActions.d.ts.map +1 -0
  141. package/dist/components/forms/FormActions.js +55 -0
  142. package/dist/components/forms/FormBySchema.d.ts +21 -0
  143. package/dist/components/forms/FormBySchema.d.ts.map +1 -0
  144. package/dist/components/forms/FormBySchema.js +280 -0
  145. package/dist/components/forms/FormWatcher.d.ts +10 -0
  146. package/dist/components/forms/FormWatcher.d.ts.map +1 -0
  147. package/dist/components/forms/FormWatcher.js +25 -0
  148. package/dist/components/forms/inputs/AutocompleteFieldBySchema.d.ts +13 -0
  149. package/dist/components/forms/inputs/AutocompleteFieldBySchema.d.ts.map +1 -0
  150. package/dist/components/forms/inputs/AutocompleteFieldBySchema.js +133 -0
  151. package/dist/components/forms/inputs/BooleanFieldBySchema.d.ts +4 -0
  152. package/dist/components/forms/inputs/BooleanFieldBySchema.d.ts.map +1 -0
  153. package/dist/components/forms/inputs/BooleanFieldBySchema.js +39 -0
  154. package/dist/components/forms/inputs/DesktopDatePickerBySchema.d.ts +5 -0
  155. package/dist/components/forms/inputs/DesktopDatePickerBySchema.d.ts.map +1 -0
  156. package/dist/components/forms/inputs/DesktopDatePickerBySchema.js +54 -0
  157. package/dist/components/forms/inputs/DesktopDateTimePickerBySchema.d.ts +5 -0
  158. package/dist/components/forms/inputs/DesktopDateTimePickerBySchema.d.ts.map +1 -0
  159. package/dist/components/forms/inputs/DesktopDateTimePickerBySchema.js +47 -0
  160. package/dist/components/forms/inputs/EditableAutocompleteFieldBySchema.d.ts +14 -0
  161. package/dist/components/forms/inputs/EditableAutocompleteFieldBySchema.d.ts.map +1 -0
  162. package/dist/components/forms/inputs/EditableAutocompleteFieldBySchema.js +272 -0
  163. package/dist/components/forms/inputs/FileFieldBySchema.d.ts +4 -0
  164. package/dist/components/forms/inputs/FileFieldBySchema.d.ts.map +1 -0
  165. package/dist/components/forms/inputs/FileFieldBySchema.js +144 -0
  166. package/dist/components/forms/inputs/FloatFieldBySchema.d.ts +4 -0
  167. package/dist/components/forms/inputs/FloatFieldBySchema.d.ts.map +1 -0
  168. package/dist/components/forms/inputs/FloatFieldBySchema.js +64 -0
  169. package/dist/components/forms/inputs/GeometryFieldBySchema.d.ts +8 -0
  170. package/dist/components/forms/inputs/GeometryFieldBySchema.d.ts.map +1 -0
  171. package/dist/components/forms/inputs/GeometryFieldBySchema.js +61 -0
  172. package/dist/components/forms/inputs/MapGeometryPicker.d.ts +19 -0
  173. package/dist/components/forms/inputs/MapGeometryPicker.d.ts.map +1 -0
  174. package/dist/components/forms/inputs/MapGeometryPicker.js +347 -0
  175. package/dist/components/forms/inputs/PatternFieldBySchema.d.ts +4 -0
  176. package/dist/components/forms/inputs/PatternFieldBySchema.d.ts.map +1 -0
  177. package/dist/components/forms/inputs/PatternFieldBySchema.js +56 -0
  178. package/dist/components/forms/inputs/TextFieldBySchema.d.ts +4 -0
  179. package/dist/components/forms/inputs/TextFieldBySchema.d.ts.map +1 -0
  180. package/dist/components/forms/inputs/TextFieldBySchema.js +56 -0
  181. package/dist/components/forms/inputs/leafletMarker.d.ts +37 -0
  182. package/dist/components/forms/inputs/leafletMarker.d.ts.map +1 -0
  183. package/dist/components/forms/inputs/leafletMarker.js +72 -0
  184. package/dist/context/APIWrapper.d.ts +18 -0
  185. package/dist/context/APIWrapper.d.ts.map +1 -0
  186. package/dist/context/APIWrapper.js +593 -0
  187. package/dist/context/APIWrapperContext.d.ts +132 -0
  188. package/dist/context/APIWrapperContext.d.ts.map +1 -0
  189. package/dist/context/APIWrapperContext.js +63 -0
  190. package/dist/context/DRFReactBySchemaContext.d.ts +31 -0
  191. package/dist/context/DRFReactBySchemaContext.d.ts.map +1 -0
  192. package/dist/context/DRFReactBySchemaContext.js +20 -0
  193. package/dist/context/DRFReactBySchemaProvider.d.ts +5 -0
  194. package/dist/context/DRFReactBySchemaProvider.d.ts.map +1 -0
  195. package/dist/context/DRFReactBySchemaProvider.js +105 -0
  196. package/dist/context/Overlays.d.ts +5 -0
  197. package/dist/context/Overlays.d.ts.map +1 -0
  198. package/dist/context/Overlays.js +114 -0
  199. package/dist/context/PrivateContext.d.ts +10 -0
  200. package/dist/context/PrivateContext.d.ts.map +1 -0
  201. package/dist/context/PrivateContext.js +16 -0
  202. package/dist/hooks/useDeepMemo.d.ts +2 -0
  203. package/dist/hooks/useDeepMemo.d.ts.map +1 -0
  204. package/dist/hooks/useDeepMemo.js +13 -0
  205. package/dist/hooks/useWhyDidYouUpdate.d.ts +4 -0
  206. package/dist/hooks/useWhyDidYouUpdate.d.ts.map +1 -0
  207. package/dist/hooks/useWhyDidYouUpdate.js +26 -0
  208. package/dist/index.d.ts +37 -0
  209. package/dist/index.d.ts.map +1 -0
  210. package/dist/index.js +110 -0
  211. package/dist/styles/grid.d.ts +3 -0
  212. package/dist/styles/grid.d.ts.map +1 -0
  213. package/dist/styles/grid.js +38 -0
  214. package/dist/styles/index.d.ts +3 -0
  215. package/dist/styles/index.d.ts.map +1 -0
  216. package/dist/styles/index.js +38 -0
  217. package/dist/styles/layout.d.ts +23 -0
  218. package/dist/styles/layout.d.ts.map +1 -0
  219. package/dist/styles/layout.js +71 -0
  220. package/dist/styles/texts.d.ts +66 -0
  221. package/dist/styles/texts.d.ts.map +1 -0
  222. package/dist/styles/texts.js +73 -0
  223. package/dist/styles/theme.d.ts +29 -0
  224. package/dist/styles/theme.d.ts.map +1 -0
  225. package/dist/styles/theme.js +226 -0
  226. package/dist/utils/index.d.ts +2 -0
  227. package/dist/utils/index.d.ts.map +1 -0
  228. package/dist/utils/index.js +17 -0
  229. package/dist/utils/utils.d.ts +107 -0
  230. package/dist/utils/utils.d.ts.map +1 -0
  231. package/dist/utils/utils.js +957 -0
  232. package/package.json +1 -1
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
+ return new (P || (P = Promise))(function (resolve, reject) {
38
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
42
+ });
43
+ };
44
+ var __importDefault = (this && this.__importDefault) || function (mod) {
45
+ return (mod && mod.__esModule) ? mod : { "default": mod };
46
+ };
47
+ Object.defineProperty(exports, "__esModule", { value: true });
48
+ exports.default = DialogFormBySchema;
49
+ const react_1 = __importStar(require("react"));
50
+ const axios_1 = __importDefault(require("axios"));
51
+ const react_hook_form_1 = require("react-hook-form");
52
+ const yup_1 = require("@hookform/resolvers/yup");
53
+ const Box_1 = __importDefault(require("@mui/material/Box"));
54
+ const Button_1 = __importDefault(require("@mui/material/Button"));
55
+ const styles_1 = require("@mui/material/styles");
56
+ const styles_2 = require("../../styles");
57
+ const FormBySchema_1 = __importDefault(require("./FormBySchema"));
58
+ const utils_1 = require("../../utils");
59
+ const texts_1 = require("../../styles/texts");
60
+ function DialogFormBySchema({ schema, validationSchema, initialValues, onEditModelSave, setDialog, getAutoComplete, fieldsLayout, hiddenFields, isCancelDisabled, forceSaveEnabled, optionsAC, }) {
61
+ const formTexts = (0, texts_1.getThemeTexts)((0, styles_1.useTheme)()).forms;
62
+ const { control, handleSubmit, reset, getValues, setValue, setError, formState: { errors, isDirty }, } = (0, react_hook_form_1.useForm)({
63
+ mode: 'onBlur',
64
+ resolver: validationSchema ? (0, yup_1.yupResolver)(validationSchema) : undefined,
65
+ });
66
+ (0, react_1.useEffect)(() => {
67
+ reset(initialValues);
68
+ // eslint-disable-next-line react-hooks/exhaustive-deps
69
+ }, []);
70
+ // Wrap the provided save handler so DRF field validation errors (e.g.
71
+ // raised in a serializer's `validate()`) are mapped onto the dialog fields,
72
+ // rendered exactly like yup errors.
73
+ const handleSubmitWrapper = (0, react_1.useCallback)((data) => __awaiter(this, void 0, void 0, function* () {
74
+ var _a;
75
+ const result = yield onEditModelSave(data);
76
+ if (axios_1.default.isAxiosError(result)) {
77
+ const fieldErrors = (0, utils_1.getFieldErrorsFromResponse)((_a = result.response) === null || _a === void 0 ? void 0 : _a.data, schema);
78
+ Object.entries(fieldErrors).forEach(([field, { type, message }]) => {
79
+ setError(field, { type, message });
80
+ });
81
+ }
82
+ return result;
83
+ }), [onEditModelSave, schema, setError]);
84
+ if (!schema) {
85
+ return react_1.default.createElement(react_1.default.Fragment, null, "Houve um erro ao carregar este formul\u00E1rio!");
86
+ }
87
+ return (react_1.default.createElement(react_1.default.Fragment, null, initialValues && control && (react_1.default.createElement("form", { onSubmit: handleSubmit(handleSubmitWrapper) },
88
+ react_1.default.createElement(Box_1.default, null,
89
+ react_1.default.createElement(FormBySchema_1.default, { control: control, errors: errors, schema: schema, getValues: getValues, setValue: setValue, optionsAC: optionsAC, isolatedGetAutoComplete: getAutoComplete, fieldsLayout: fieldsLayout, hiddenFields: hiddenFields, relatedEditable: false })),
90
+ react_1.default.createElement(Box_1.default, { sx: styles_2.Layout.flexRow },
91
+ !isCancelDisabled && (react_1.default.createElement(Button_1.default, { variant: "contained", color: "primary", size: "small", sx: { ml: 1 }, onClick: () => {
92
+ setDialog({
93
+ open: false,
94
+ });
95
+ } }, formTexts.dialogCancel)),
96
+ react_1.default.createElement(Button_1.default, { variant: "contained", name: "exitOnSave", disabled: !forceSaveEnabled && !isDirty, type: "submit", color: "primary", size: "small" }, formTexts.dialogSave))))));
97
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { FieldBySchemaProps } from '../../@types';
3
+ export default function FieldBySchema({ name, schema, control, errors, multiline, setValue, getValues, fieldKey, labelKey, index, optionsAC, optionsModel, getOptionLabel, renderOption, onEditModel, fieldsLayout, sx, options, isSemaphoric, label, onValueChange, decimalScale, autoFocus, ...other }: FieldBySchemaProps): React.JSX.Element;
4
+ //# sourceMappingURL=FieldBySchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldBySchema.d.ts","sourceRoot":"","sources":["../../../src/components/forms/FieldBySchema.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAc,kBAAkB,EAAqB,MAAM,cAAc,CAAC;AAajF,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,IAAI,EACJ,MAAM,EACN,OAAO,EACP,MAAM,EACN,SAAiB,EACjB,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,QAAiB,EACjB,KAAK,EACL,SAAS,EACT,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,EAAE,EACF,OAAO,EACP,YAAoB,EACpB,KAAK,EACL,aAAa,EACb,YAAgB,EAChB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,kBAAkB,qBA8NpB"}
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.default = FieldBySchema;
18
+ const react_1 = __importDefault(require("react"));
19
+ const DesktopDatePickerBySchema_1 = __importDefault(require("./inputs/DesktopDatePickerBySchema"));
20
+ const DesktopDateTimePickerBySchema_1 = __importDefault(require("./inputs/DesktopDateTimePickerBySchema"));
21
+ const EditableAutocompleteFieldBySchema_1 = __importDefault(require("./inputs/EditableAutocompleteFieldBySchema"));
22
+ const AutocompleteFieldBySchema_1 = __importDefault(require("./inputs/AutocompleteFieldBySchema"));
23
+ const BooleanFieldBySchema_1 = __importDefault(require("./inputs/BooleanFieldBySchema"));
24
+ const FloatFieldBySchema_1 = __importDefault(require("./inputs/FloatFieldBySchema"));
25
+ const TextFieldBySchema_1 = __importDefault(require("./inputs/TextFieldBySchema"));
26
+ const FileFieldBySchema_1 = __importDefault(require("./inputs/FileFieldBySchema"));
27
+ const PatternFieldBySchema_1 = __importDefault(require("./inputs/PatternFieldBySchema"));
28
+ const GeometryFieldBySchema_1 = __importDefault(require("./inputs/GeometryFieldBySchema"));
29
+ function FieldBySchema(_a) {
30
+ var _b, _c, _d;
31
+ var { name, schema, control, errors, multiline = false, setValue, getValues, fieldKey, labelKey = 'nome', index, optionsAC, optionsModel, getOptionLabel, renderOption, onEditModel, fieldsLayout, sx, options, isSemaphoric = false, label, onValueChange, decimalScale = 2, autoFocus } = _a, other = __rest(_a, ["name", "schema", "control", "errors", "multiline", "setValue", "getValues", "fieldKey", "labelKey", "index", "optionsAC", "optionsModel", "getOptionLabel", "renderOption", "onEditModel", "fieldsLayout", "sx", "options", "isSemaphoric", "label", "onValueChange", "decimalScale", "autoFocus"]);
32
+ const fieldSchema = schema[name];
33
+ // prevent switching from uncontrolled inputs (undefined) to controlled:
34
+ // DISABLED, understand what is going on!
35
+ // if (control._formValues[name] === undefined) {
36
+ // return <></>;
37
+ // }
38
+ switch (fieldSchema === null || fieldSchema === void 0 ? void 0 : fieldSchema.type) {
39
+ case 'date':
40
+ return (react_1.default.createElement(DesktopDatePickerBySchema_1.default, Object.assign({ name: name, schema: schema, control: control, errors: errors, multiline: multiline, fieldKey: fieldKey, index: index, sx: sx, onValueChange: onValueChange, autoFocus: autoFocus }, other)));
41
+ case 'datetime':
42
+ return (react_1.default.createElement(DesktopDateTimePickerBySchema_1.default, Object.assign({ name: name, schema: schema, control: control, errors: errors, multiline: multiline, fieldKey: fieldKey, index: index, sx: sx, onValueChange: onValueChange }, other)));
43
+ case 'nested object':
44
+ case 'field':
45
+ const relatedEditable = fieldSchema.related_editable;
46
+ const multiple = fieldSchema.many || false;
47
+ return (react_1.default.createElement(EditableAutocompleteFieldBySchema_1.default, Object.assign({ name: name, schema: schema, control: control, errors: errors, setValue: setValue, getValues: getValues, fieldKey: fieldKey, labelKey: labelKey, index: index, optionsAC: optionsAC, optionsModel: optionsModel, getOptionLabel: getOptionLabel, renderOption: renderOption, onEditModel: relatedEditable ? onEditModel : undefined, fieldsLayout: fieldsLayout, multiple: multiple, sx: sx, onValueChange: onValueChange, autoFocus: autoFocus }, other)));
48
+ case 'choice':
49
+ return (react_1.default.createElement(AutocompleteFieldBySchema_1.default, { index: index, name: name, schema: schema, control: control, errors: errors, fieldKey: fieldKey, optionIdKey: "value", optionLabelKey: "display_name", options: options, isSemaphoric: isSemaphoric, label: label, sx: sx, onValueChange: onValueChange, autoFocus: autoFocus }));
50
+ case 'list':
51
+ const multipleOptions = options || ((_b = fieldSchema.child) === null || _b === void 0 ? void 0 : _b.choices);
52
+ return (react_1.default.createElement(AutocompleteFieldBySchema_1.default, { index: index, name: name, schema: schema, multiple: true, control: control, errors: errors, fieldKey: fieldKey, optionIdKey: "value", optionLabelKey: "display_name", options: multipleOptions, isSemaphoric: isSemaphoric, label: label, sx: sx, onValueChange: onValueChange, autoFocus: autoFocus }));
53
+ case 'boolean':
54
+ return (react_1.default.createElement(BooleanFieldBySchema_1.default, Object.assign({ name: name, schema: schema, control: control, errors: errors, fieldKey: fieldKey, index: index, sx: sx, onValueChange: onValueChange, autoFocus: autoFocus }, other)));
55
+ case 'decimal':
56
+ case 'float':
57
+ return (react_1.default.createElement(FloatFieldBySchema_1.default, Object.assign({ name: name, schema: schema, control: control, errors: errors, multiline: multiline, fieldKey: fieldKey, index: index, onValueChange: onValueChange, decimalScale: decimalScale, label: label, sx: sx, autoFocus: autoFocus }, other)));
58
+ case 'file':
59
+ case 'file upload':
60
+ case 'image':
61
+ case 'image upload':
62
+ return (react_1.default.createElement(FileFieldBySchema_1.default, Object.assign({ name: name, schema: schema, control: control, errors: errors, fieldKey: fieldKey, index: index, sx: sx, onValueChange: onValueChange, autoFocus: autoFocus }, other)));
63
+ case 'point':
64
+ case 'polygon':
65
+ case 'multipoint':
66
+ case 'multipolygon':
67
+ case 'geometrycollection':
68
+ return (react_1.default.createElement(GeometryFieldBySchema_1.default, Object.assign({ name: name, schema: schema, control: control, errors: errors, geometry: fieldSchema.type, fieldKey: fieldKey, index: index, sx: sx, onValueChange: onValueChange, autoFocus: autoFocus }, other)));
69
+ case 'number':
70
+ case 'integer':
71
+ case 'password':
72
+ default:
73
+ if (fieldSchema === null || fieldSchema === void 0 ? void 0 : fieldSchema.pattern_format) {
74
+ return (react_1.default.createElement(PatternFieldBySchema_1.default, Object.assign({ name: name, schema: schema, control: control, errors: errors, fieldKey: fieldKey, index: index, sx: sx, onValueChange: onValueChange, autoFocus: autoFocus, type: (_c = fieldSchema.style) === null || _c === void 0 ? void 0 : _c.input_type }, other)));
75
+ }
76
+ const localMultiline = (fieldSchema === null || fieldSchema === void 0 ? void 0 : fieldSchema.model_multiline) === true || multiline;
77
+ const minRows = localMultiline ? 3 : 0;
78
+ return (react_1.default.createElement(TextFieldBySchema_1.default, Object.assign({ name: name, schema: schema, control: control, errors: errors, multiline: localMultiline, minRows: minRows, fieldKey: fieldKey, index: index, sx: sx, onValueChange: onValueChange, autoFocus: autoFocus, type: (_d = fieldSchema === null || fieldSchema === void 0 ? void 0 : fieldSchema.style) === null || _d === void 0 ? void 0 : _d.input_type }, other)));
79
+ }
80
+ }
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ export interface ForgotPasswordFormProps {
3
+ /** When provided, the form switches to the "confirm" step (new password). */
4
+ token?: string;
5
+ /** The user id (base64) that came with the reset link. */
6
+ uid?: string;
7
+ onSuccess?: () => void;
8
+ onBack?: () => void;
9
+ }
10
+ export default function ForgotPasswordForm({ token, uid, onSuccess, onBack, }: ForgotPasswordFormProps): React.JSX.Element;
11
+ //# sourceMappingURL=ForgotPasswordForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ForgotPasswordForm.d.ts","sourceRoot":"","sources":["../../../src/components/forms/ForgotPasswordForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAUxC,MAAM,WAAW,uBAAuB;IACtC,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,KAAK,EACL,GAAG,EACH,SAAS,EACT,MAAM,GACP,EAAE,uBAAuB,qBAoHzB"}
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
+ return new (P || (P = Promise))(function (resolve, reject) {
38
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
42
+ });
43
+ };
44
+ var __importDefault = (this && this.__importDefault) || function (mod) {
45
+ return (mod && mod.__esModule) ? mod : { "default": mod };
46
+ };
47
+ Object.defineProperty(exports, "__esModule", { value: true });
48
+ exports.default = ForgotPasswordForm;
49
+ const react_1 = __importStar(require("react"));
50
+ const Box_1 = __importDefault(require("@mui/material/Box"));
51
+ const TextField_1 = __importDefault(require("@mui/material/TextField"));
52
+ const Button_1 = __importDefault(require("@mui/material/Button"));
53
+ const Alert_1 = __importDefault(require("@mui/material/Alert"));
54
+ const styles_1 = require("@mui/material/styles");
55
+ const APIWrapperContext_1 = require("../../context/APIWrapperContext");
56
+ const texts_1 = require("../../styles/texts");
57
+ function ForgotPasswordForm({ token, uid, onSuccess, onBack, }) {
58
+ const { requestPasswordReset, confirmPasswordReset } = (0, APIWrapperContext_1.useAPIWrapper)();
59
+ const texts = (0, texts_1.getThemeTexts)((0, styles_1.useTheme)()).auth;
60
+ const isConfirm = Boolean(token && uid);
61
+ const [email, setEmail] = (0, react_1.useState)('');
62
+ const [newPassword, setNewPassword] = (0, react_1.useState)('');
63
+ const [confirmPassword, setConfirmPassword] = (0, react_1.useState)('');
64
+ const [message, setMessage] = (0, react_1.useState)('');
65
+ const [error, setError] = (0, react_1.useState)('');
66
+ const [loading, setLoading] = (0, react_1.useState)(false);
67
+ const handleRequest = (e) => __awaiter(this, void 0, void 0, function* () {
68
+ e.preventDefault();
69
+ setError('');
70
+ setMessage('');
71
+ setLoading(true);
72
+ const result = yield requestPasswordReset(email);
73
+ setLoading(false);
74
+ if (result && result.isAxiosError) {
75
+ setError(texts.forgotRequestError);
76
+ return;
77
+ }
78
+ setMessage(texts.forgotRequestSuccess);
79
+ });
80
+ const handleConfirm = (e) => __awaiter(this, void 0, void 0, function* () {
81
+ e.preventDefault();
82
+ setError('');
83
+ setMessage('');
84
+ if (newPassword !== confirmPassword) {
85
+ setError(texts.passwordsDoNotMatch);
86
+ return;
87
+ }
88
+ setLoading(true);
89
+ const result = yield confirmPasswordReset({
90
+ uid: uid,
91
+ token: token,
92
+ new_password: newPassword,
93
+ });
94
+ setLoading(false);
95
+ if (result && result.isAxiosError) {
96
+ setError(texts.forgotConfirmError);
97
+ return;
98
+ }
99
+ setMessage(texts.forgotConfirmSuccess);
100
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
101
+ });
102
+ return (react_1.default.createElement(Box_1.default, { component: "form", onSubmit: isConfirm ? handleConfirm : handleRequest, noValidate: true },
103
+ error && (react_1.default.createElement(Alert_1.default, { severity: "error", sx: { mb: 2 } }, error)),
104
+ message && (react_1.default.createElement(Alert_1.default, { severity: "success", sx: { mb: 2 } }, message)),
105
+ !isConfirm ? (react_1.default.createElement(TextField_1.default, { fullWidth: true, margin: "normal", type: "email", label: texts.email, value: email, onChange: (e) => setEmail(e.target.value), autoComplete: "email", required: true })) : (react_1.default.createElement(react_1.default.Fragment, null,
106
+ react_1.default.createElement(TextField_1.default, { fullWidth: true, margin: "normal", type: "password", label: texts.newPassword, value: newPassword, onChange: (e) => setNewPassword(e.target.value), autoComplete: "new-password", required: true }),
107
+ react_1.default.createElement(TextField_1.default, { fullWidth: true, margin: "normal", type: "password", label: texts.confirmPassword, value: confirmPassword, onChange: (e) => setConfirmPassword(e.target.value), autoComplete: "new-password", required: true }))),
108
+ react_1.default.createElement(Button_1.default, { type: "submit", variant: "contained", fullWidth: true, sx: { mt: 2 }, disabled: loading || (isConfirm ? !newPassword || !confirmPassword : !email) }, loading
109
+ ? texts.saving
110
+ : isConfirm
111
+ ? texts.forgotConfirmSubmit
112
+ : texts.forgotRequestSubmit),
113
+ onBack && (react_1.default.createElement(Button_1.default, { fullWidth: true, sx: { mt: 1 }, onClick: onBack }, texts.backToSignIn))));
114
+ }
@@ -0,0 +1,61 @@
1
+ import React from 'react';
2
+ import { AxiosError } from 'axios';
3
+ import { UseFormRegister } from 'react-hook-form';
4
+ import { AutocompleteItem, CommonFieldProps, CustomFormFieldLayouts, ExtraSxCommonFieldProps, FieldsProps, FormFieldLayout, FormSaveActions, Id, Item, OptionsAC, ExtraValidators, FieldKey, FormWatchObject, FieldList, TField, PartialItem } from '../../@types';
5
+ import { FormActionsProps } from './FormActions';
6
+ interface FormProps<T extends TField = void> extends Omit<CommonFieldProps<T>, 'fieldsLayout' | 'optionsAC'> {
7
+ model: string;
8
+ objId?: Id;
9
+ defaults?: PartialItem<T>;
10
+ objTitleField?: FieldKey<T>;
11
+ /** Optional. If the dev wants to do something after saving. Gets the new Id */
12
+ onSave?: (currentId: Id, newId: Id | AxiosError, buttonType: FormSaveActions) => void;
13
+ /** Optional. If the dev wants to do something after deleting item. Gets the item's Id */
14
+ onDelete?: (removedId: Id) => void;
15
+ /** Optional. If the dev wants to do something after canceling the form editing. */
16
+ onCancel?: React.MouseEventHandler<HTMLButtonElement>;
17
+ navigate?: {
18
+ (to: string): void;
19
+ (delta: number): void;
20
+ };
21
+ /** Optional. Exit function. If not provided and also no exitPath provided,
22
+ * navigate(exitPath) or history.back() will be used.
23
+ */
24
+ exit?: (newId?: Id) => void;
25
+ saveAndContinue?: boolean;
26
+ /** Optional. Path of the form.
27
+ * Use {ID} to indicate where the objId is located (example: /your-path/{ID}/edit).
28
+ * No {ID} means that the path ends with objId (example: /your-path/{ID}).
29
+ * If not provided, the actual location will be considered, ending with {ID}:
30
+ * actual-location-path/{ID} */
31
+ editPath?: string;
32
+ /** Optional. Path for exit. If none is defined and no 'exit' function is provided,
33
+ * windows.history.back() will be used.
34
+ */
35
+ exitPath?: string;
36
+ title?: string;
37
+ labelSave?: string;
38
+ labelSaveAndContinue?: string;
39
+ labelSaveAndCreateNew?: string;
40
+ labelCancel?: string;
41
+ labelRemove?: string;
42
+ fieldsLayout?: FormFieldLayout<T>[];
43
+ customFieldFormLayouts?: CustomFormFieldLayouts<T>;
44
+ hiddenFields?: FieldList<T>;
45
+ register?: UseFormRegister<Item<T>>;
46
+ optionsAC?: OptionsAC<T>;
47
+ setOptionsAC?: (x: OptionsAC<T>) => void;
48
+ isolatedGetAutoComplete?: (model: string) => Promise<AutocompleteItem[] | AxiosError>;
49
+ fieldsProps?: FieldsProps<T>;
50
+ relatedEditable?: boolean;
51
+ autoFocusField?: FieldKey<T>;
52
+ elevation?: number;
53
+ CustomFormActions?: (props: FormActionsProps) => React.JSX.Element;
54
+ extraValidators?: ExtraValidators<T>;
55
+ watchValues?: FieldList<T>;
56
+ onWatchChange?: (values: FormWatchObject<T>) => void;
57
+ reloadStateStamp?: number | string;
58
+ }
59
+ declare function Form<T extends TField = void>({ model, objId, defaults, objTitleField, onSave, onDelete, onCancel, navigate, exit: customExit, saveAndContinue, editPath, exitPath, title, labelSave, labelSaveAndContinue, labelSaveAndCreateNew, labelCancel, labelRemove, multiline, fieldKey, labelKey, optionsAC, setOptionsAC, optionsModel, getOptionLabel, renderOption, onEditModel, options, isSemaphoric, label, decimalScale, fieldsLayout, customFieldFormLayouts, fieldsProps, hiddenFields, isolatedGetAutoComplete, relatedEditable, autoFocusField, elevation, CustomFormActions, extraValidators, sxRow, sxRowMultiple, sxSection, sxSectionTitle, watchValues, onWatchChange, reloadStateStamp, }: FormProps<T> & Omit<ExtraSxCommonFieldProps, 'sx' | 'sxField' | 'sxLabel' | 'sxValue' | 'sxValueList' | 'sxValueListItem' | 'sxValueListItemText'>): React.JSX.Element;
60
+ export default Form;
61
+ //# sourceMappingURL=Form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../src/components/forms/Form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAEL,eAAe,EAMhB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,E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