fastapi-rtk 1.0.42 → 1.0.43

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 (171) hide show
  1. package/dist/.bundled/jsonforms/cjs/_virtual/index3.cjs +2 -2
  2. package/dist/.bundled/jsonforms/cjs/_virtual/index4.cjs +2 -2
  3. package/dist/.bundled/jsonforms/cjs/_virtual/index5.cjs +2 -2
  4. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/MantineInputs/MantineBooleanInput.cjs +2 -1
  5. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/MantineInputs/MantineDateInput.cjs +2 -1
  6. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/MantineInputs/MantineDateTimeInput.cjs +2 -1
  7. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/MantineInputs/MantineEnumArrayInput.cjs +2 -1
  8. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/MantineInputs/MantineEnumInput.cjs +2 -1
  9. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/MantineInputs/MantineFileInput.cjs +4 -4
  10. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/MantineInputs/MantineImageInput.cjs +1 -1
  11. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/MantineInputs/MantineIntegerInput.cjs +1 -1
  12. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/MantineInputs/MantineJsonInput.cjs +2 -1
  13. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/MantineInputs/MantineNumberInput.cjs +4 -3
  14. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/MantineInputs/MantineOneOfEnumInput.cjs +2 -1
  15. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/MantineInputs/MantineTextInput.cjs +2 -1
  16. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/MantineInputs/MantineTimeInput.cjs +2 -1
  17. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/cells/MantineEnumArrayCell.cjs +5 -2
  18. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/cells/MantineEnumCell.cjs +2 -1
  19. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/cells/MantineOneOfEnumCell.cjs +2 -1
  20. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/complex/MantineEnumArrayControl.cjs +3 -2
  21. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/controls/MantineEnumControl.cjs +5 -1
  22. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/controls/MantineOneOfEnumControl.cjs +5 -1
  23. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/hooks/useBooleanProps.cjs +7 -3
  24. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/hooks/useCommonProps.cjs +25 -16
  25. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/hooks/useDateProps.cjs +23 -16
  26. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/hooks/useFileProps.cjs +2 -1
  27. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/hooks/useJsonProps.cjs +2 -2
  28. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/hooks/useMultiSelectProps.cjs +2 -1
  29. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/hooks/useNumberProps.cjs +5 -1
  30. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/hooks/useSelectProps.cjs +2 -1
  31. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/hooks/useTextProps.cjs +2 -1
  32. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/hooks/useTimeProps.cjs +10 -6
  33. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/utils/withLabelMappingProps.cjs +14 -0
  34. package/dist/.bundled/jsonforms/esm/_virtual/index3.mjs +2 -2
  35. package/dist/.bundled/jsonforms/esm/_virtual/index4.mjs +2 -2
  36. package/dist/.bundled/jsonforms/esm/_virtual/index5.mjs +2 -2
  37. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/MantineInputs/MantineBooleanInput.mjs +2 -1
  38. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/MantineInputs/MantineDateInput.mjs +2 -1
  39. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/MantineInputs/MantineDateTimeInput.mjs +2 -1
  40. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/MantineInputs/MantineEnumArrayInput.mjs +2 -1
  41. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/MantineInputs/MantineEnumInput.mjs +2 -1
  42. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/MantineInputs/MantineFileInput.mjs +5 -5
  43. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/MantineInputs/MantineImageInput.mjs +1 -1
  44. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/MantineInputs/MantineIntegerInput.mjs +1 -1
  45. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/MantineInputs/MantineJsonInput.mjs +2 -1
  46. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/MantineInputs/MantineNumberInput.mjs +4 -3
  47. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/MantineInputs/MantineOneOfEnumInput.mjs +2 -1
  48. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/MantineInputs/MantineTextInput.mjs +2 -1
  49. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/MantineInputs/MantineTimeInput.mjs +2 -1
  50. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/cells/MantineEnumArrayCell.mjs +5 -2
  51. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/cells/MantineEnumCell.mjs +2 -1
  52. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/cells/MantineOneOfEnumCell.mjs +2 -1
  53. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/complex/MantineEnumArrayControl.mjs +3 -2
  54. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/controls/MantineEnumControl.mjs +5 -1
  55. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/controls/MantineOneOfEnumControl.mjs +5 -1
  56. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/hooks/useBooleanProps.mjs +7 -3
  57. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/hooks/useCommonProps.mjs +26 -17
  58. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/hooks/useDateProps.mjs +23 -16
  59. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/hooks/useFileProps.mjs +2 -1
  60. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/hooks/useJsonProps.mjs +3 -3
  61. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/hooks/useMultiSelectProps.mjs +2 -1
  62. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/hooks/useNumberProps.mjs +5 -1
  63. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/hooks/useSelectProps.mjs +2 -1
  64. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/hooks/useTextProps.mjs +2 -1
  65. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/hooks/useTimeProps.mjs +10 -6
  66. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/utils/withLabelMappingProps.mjs +14 -0
  67. package/dist/.external/cjs/ajv@8.18.0/ajv/dist/compile/codegen/index.cjs +1 -1
  68. package/dist/.external/cjs/ajv@8.18.0/ajv/dist/compile/validate/index.cjs +1 -1
  69. package/dist/.external/cjs/ajv@8.18.0/ajv/dist/vocabularies/discriminator/index.cjs +1 -1
  70. package/dist/.external/esm/ajv@8.18.0/ajv/dist/compile/codegen/index.mjs +1 -1
  71. package/dist/.external/esm/ajv@8.18.0/ajv/dist/compile/validate/index.mjs +1 -1
  72. package/dist/.external/esm/ajv@8.18.0/ajv/dist/vocabularies/discriminator/index.mjs +1 -1
  73. package/dist/constants/cjs/index.cjs +6 -0
  74. package/dist/constants/esm/index.mjs +7 -1
  75. package/dist/constants/lib/index.d.ts +3 -0
  76. package/dist/core/cjs/Tables/NextGenDataGrid/NextGenDataGrid.cjs +23 -24
  77. package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/ColumnHeaderFilterInput/ColumnHeaderFilterInput.cjs +15 -6
  78. package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/useColumns.cjs +3 -3
  79. package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useEvent.cjs +10 -9
  80. package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useToolbarAlertBanner/useToolbarAlertBanner.cjs +7 -3
  81. package/dist/core/cjs/Wrappers/Provider/Provider.cjs +4 -0
  82. package/dist/core/esm/Tables/NextGenDataGrid/NextGenDataGrid.mjs +24 -25
  83. package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/ColumnHeaderFilterInput/ColumnHeaderFilterInput.mjs +16 -7
  84. package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/useColumns.mjs +4 -4
  85. package/dist/core/esm/Tables/NextGenDataGrid/hooks/useEvent.mjs +10 -9
  86. package/dist/core/esm/Tables/NextGenDataGrid/hooks/useToolbarAlertBanner/useToolbarAlertBanner.mjs +7 -3
  87. package/dist/core/esm/Wrappers/Provider/Provider.mjs +5 -1
  88. package/dist/core/lib/Tables/NextGenDataGrid/NextGenDataGrid.d.ts +4 -4
  89. package/dist/core/lib/Tables/NextGenDataGrid/hooks/useData.d.ts +1 -1
  90. package/dist/core/lib/Wrappers/Provider/Provider.d.ts +8 -4
  91. package/dist/core/lib/hooks/api/useApi.d.ts +4 -0
  92. package/dist/jsonforms/cjs/MantineInputs/MantineBooleanInput.cjs +2 -1
  93. package/dist/jsonforms/cjs/MantineInputs/MantineDateInput.cjs +2 -1
  94. package/dist/jsonforms/cjs/MantineInputs/MantineDateTimeInput.cjs +2 -1
  95. package/dist/jsonforms/cjs/MantineInputs/MantineEnumArrayInput.cjs +2 -1
  96. package/dist/jsonforms/cjs/MantineInputs/MantineEnumInput.cjs +2 -1
  97. package/dist/jsonforms/cjs/MantineInputs/MantineFileInput.cjs +4 -4
  98. package/dist/jsonforms/cjs/MantineInputs/MantineImageInput.cjs +1 -1
  99. package/dist/jsonforms/cjs/MantineInputs/MantineIntegerInput.cjs +1 -1
  100. package/dist/jsonforms/cjs/MantineInputs/MantineJsonInput.cjs +2 -1
  101. package/dist/jsonforms/cjs/MantineInputs/MantineNumberInput.cjs +4 -3
  102. package/dist/jsonforms/cjs/MantineInputs/MantineOneOfEnumInput.cjs +2 -1
  103. package/dist/jsonforms/cjs/MantineInputs/MantineTextInput.cjs +2 -1
  104. package/dist/jsonforms/cjs/MantineInputs/MantineTimeInput.cjs +2 -1
  105. package/dist/jsonforms/cjs/cells/MantineEnumArrayCell.cjs +5 -2
  106. package/dist/jsonforms/cjs/cells/MantineEnumCell.cjs +2 -1
  107. package/dist/jsonforms/cjs/cells/MantineOneOfEnumCell.cjs +2 -1
  108. package/dist/jsonforms/cjs/complex/MantineEnumArrayControl.cjs +3 -2
  109. package/dist/jsonforms/cjs/controls/MantineEnumControl.cjs +5 -1
  110. package/dist/jsonforms/cjs/controls/MantineOneOfEnumControl.cjs +5 -1
  111. package/dist/jsonforms/cjs/hooks/useBooleanProps.cjs +7 -3
  112. package/dist/jsonforms/cjs/hooks/useCommonProps.cjs +25 -16
  113. package/dist/jsonforms/cjs/hooks/useDateProps.cjs +23 -16
  114. package/dist/jsonforms/cjs/hooks/useFileProps.cjs +2 -1
  115. package/dist/jsonforms/cjs/hooks/useJsonProps.cjs +2 -2
  116. package/dist/jsonforms/cjs/hooks/useMultiSelectProps.cjs +2 -1
  117. package/dist/jsonforms/cjs/hooks/useNumberProps.cjs +5 -1
  118. package/dist/jsonforms/cjs/hooks/useSelectProps.cjs +2 -1
  119. package/dist/jsonforms/cjs/hooks/useTextProps.cjs +2 -1
  120. package/dist/jsonforms/cjs/hooks/useTimeProps.cjs +10 -6
  121. package/dist/jsonforms/cjs/utils/withLabelMappingProps.cjs +14 -0
  122. package/dist/jsonforms/esm/MantineInputs/MantineBooleanInput.mjs +2 -1
  123. package/dist/jsonforms/esm/MantineInputs/MantineDateInput.mjs +2 -1
  124. package/dist/jsonforms/esm/MantineInputs/MantineDateTimeInput.mjs +2 -1
  125. package/dist/jsonforms/esm/MantineInputs/MantineEnumArrayInput.mjs +2 -1
  126. package/dist/jsonforms/esm/MantineInputs/MantineEnumInput.mjs +2 -1
  127. package/dist/jsonforms/esm/MantineInputs/MantineFileInput.mjs +5 -5
  128. package/dist/jsonforms/esm/MantineInputs/MantineImageInput.mjs +1 -1
  129. package/dist/jsonforms/esm/MantineInputs/MantineIntegerInput.mjs +1 -1
  130. package/dist/jsonforms/esm/MantineInputs/MantineJsonInput.mjs +2 -1
  131. package/dist/jsonforms/esm/MantineInputs/MantineNumberInput.mjs +4 -3
  132. package/dist/jsonforms/esm/MantineInputs/MantineOneOfEnumInput.mjs +2 -1
  133. package/dist/jsonforms/esm/MantineInputs/MantineTextInput.mjs +2 -1
  134. package/dist/jsonforms/esm/MantineInputs/MantineTimeInput.mjs +2 -1
  135. package/dist/jsonforms/esm/cells/MantineEnumArrayCell.mjs +5 -2
  136. package/dist/jsonforms/esm/cells/MantineEnumCell.mjs +2 -1
  137. package/dist/jsonforms/esm/cells/MantineOneOfEnumCell.mjs +2 -1
  138. package/dist/jsonforms/esm/complex/MantineEnumArrayControl.mjs +3 -2
  139. package/dist/jsonforms/esm/controls/MantineEnumControl.mjs +5 -1
  140. package/dist/jsonforms/esm/controls/MantineOneOfEnumControl.mjs +5 -1
  141. package/dist/jsonforms/esm/hooks/useBooleanProps.mjs +7 -3
  142. package/dist/jsonforms/esm/hooks/useCommonProps.mjs +26 -17
  143. package/dist/jsonforms/esm/hooks/useDateProps.mjs +23 -16
  144. package/dist/jsonforms/esm/hooks/useFileProps.mjs +2 -1
  145. package/dist/jsonforms/esm/hooks/useJsonProps.mjs +3 -3
  146. package/dist/jsonforms/esm/hooks/useMultiSelectProps.mjs +2 -1
  147. package/dist/jsonforms/esm/hooks/useNumberProps.mjs +5 -1
  148. package/dist/jsonforms/esm/hooks/useSelectProps.mjs +2 -1
  149. package/dist/jsonforms/esm/hooks/useTextProps.mjs +2 -1
  150. package/dist/jsonforms/esm/hooks/useTimeProps.mjs +10 -6
  151. package/dist/jsonforms/esm/utils/withLabelMappingProps.mjs +14 -0
  152. package/dist/jsonforms/lib/MantineInputs/MantineFileInput.d.ts +2 -1
  153. package/dist/jsonforms/lib/MantineInputs/MantineNumberInput.d.ts +2 -1
  154. package/dist/jsonforms/lib/utils/withLabelMappingProps.d.ts +1 -0
  155. package/dist/utils/cjs/FastAPIRTKLogger/FastAPIRTKLogger.cjs +3 -1
  156. package/dist/utils/cjs/MemoWrapper/MemoWrapper.cjs +37 -0
  157. package/dist/utils/cjs/_virtual/_commonjsHelpers.cjs +4 -0
  158. package/dist/utils/cjs/_virtual/lodash.cjs +5 -0
  159. package/dist/utils/cjs/_virtual/lodash2.cjs +4 -0
  160. package/dist/utils/cjs/index.cjs +2 -0
  161. package/dist/utils/esm/FastAPIRTKLogger/FastAPIRTKLogger.mjs +3 -1
  162. package/dist/utils/esm/MemoWrapper/MemoWrapper.mjs +37 -0
  163. package/dist/utils/esm/_virtual/_commonjsHelpers.mjs +4 -0
  164. package/dist/utils/esm/_virtual/lodash.mjs +5 -0
  165. package/dist/utils/esm/_virtual/lodash2.mjs +4 -0
  166. package/dist/utils/esm/index.mjs +2 -0
  167. package/dist/utils/lib/FastAPIRTKLogger/FastAPIRTKLogger.d.ts +1 -0
  168. package/dist/utils/lib/MemoWrapper/MemoWrapper.d.ts +9 -0
  169. package/dist/utils/lib/MemoWrapper/index.d.ts +1 -0
  170. package/dist/utils/lib/index.d.ts +1 -0
  171. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- var codegen = {};
4
- exports.__exports = codegen;
3
+ var discriminator = {};
4
+ exports.__exports = discriminator;
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- var discriminator = {};
4
- exports.__exports = discriminator;
3
+ var validate = {};
4
+ exports.__exports = validate;
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- var validate = {};
4
- exports.__exports = validate;
3
+ var codegen = {};
4
+ exports.__exports = codegen;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
+ const utils = require("fastapi-rtk/utils");
4
5
  const core = require("@mantine/core");
5
6
  const React = require("react");
6
7
  const useBooleanProps = require("../hooks/useBooleanProps.cjs");
@@ -20,6 +21,6 @@ function MantineBooleanInput(props) {
20
21
  const { inputWrapperOrder, ...__props } = _props;
21
22
  const InnerComponent = format === "checkbox" ? core.Checkbox : format === "native" ? core.NativeSelect : core.Select;
22
23
  const innerProps = format === "checkbox" ? {} : { inputWrapperOrder };
23
- return Component === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(InnerComponent, { ...innerProps, ...__props }) : Component;
24
+ return Component === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(utils.MemoWrapper, { componentName: `MantineBooleanInput-${path}`, ...innerProps, ...__props, children: /* @__PURE__ */ jsxRuntime.jsx(InnerComponent, { ...innerProps, ...__props }) }) : Component;
24
25
  }
25
26
  exports.MantineBooleanInput = MantineBooleanInput;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
+ const utils = require("fastapi-rtk/utils");
4
5
  const dates = require("@mantine/dates");
5
6
  const React = require("react");
6
7
  const useCommonProps = require("../hooks/useCommonProps.cjs");
@@ -15,6 +16,6 @@ function MantineDateInput(props) {
15
16
  if (!props.visible) {
16
17
  return null;
17
18
  }
18
- return Component === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(dates.DateInput, { ..._props }) : Component;
19
+ return Component === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(utils.MemoWrapper, { componentName: `MantineDateInput-${path}`, ..._props, children: /* @__PURE__ */ jsxRuntime.jsx(dates.DateInput, { ..._props }) }) : Component;
19
20
  }
20
21
  exports.MantineDateInput = MantineDateInput;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const core = require("fastapi-rtk/core");
5
+ const utils = require("fastapi-rtk/utils");
5
6
  const hooks = require("@mantine/hooks");
6
7
  const React = require("react");
7
8
  const useCommonProps = require("../hooks/useCommonProps.cjs");
@@ -29,6 +30,6 @@ function MantineDateTimeInput(props) {
29
30
  if (!props.visible) {
30
31
  return null;
31
32
  }
32
- return Component === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(core.DateTimePicker, { ..._props }) : Component;
33
+ return Component === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(utils.MemoWrapper, { componentName: `MantineDateTimeInput-${path}`, ..._props, children: /* @__PURE__ */ jsxRuntime.jsx(core.DateTimePicker, { ..._props }) }) : Component;
33
34
  }
34
35
  exports.MantineDateTimeInput = MantineDateTimeInput;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
+ const utils = require("fastapi-rtk/utils");
4
5
  const core = require("@mantine/core");
5
6
  const React = require("react");
6
7
  const useCommonProps = require("../hooks/useCommonProps.cjs");
@@ -15,6 +16,6 @@ function MantineEnumArrayInput(props) {
15
16
  if (!props.visible) {
16
17
  return null;
17
18
  }
18
- return Component === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(core.MultiSelect, { ..._props }) : Component;
19
+ return Component === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(utils.MemoWrapper, { componentName: `MantineEnumArrayInput-${path}`, ..._props, children: /* @__PURE__ */ jsxRuntime.jsx(core.MultiSelect, { ..._props }) }) : Component;
19
20
  }
20
21
  exports.MantineEnumArrayInput = MantineEnumArrayInput;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
+ const utils = require("fastapi-rtk/utils");
4
5
  const core = require("@mantine/core");
5
6
  const React = require("react");
6
7
  const useCommonProps = require("../hooks/useCommonProps.cjs");
@@ -18,6 +19,6 @@ function MantineEnumInput(props) {
18
19
  return null;
19
20
  }
20
21
  const InnerComponent = isNative ? core.NativeSelect : core.Select;
21
- return Component === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(InnerComponent, { ..._props }) : Component;
22
+ return Component === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(utils.MemoWrapper, { componentName: `MantineEnumInput-${path}`, ..._props, children: /* @__PURE__ */ jsxRuntime.jsx(InnerComponent, { ..._props }) }) : Component;
22
23
  }
23
24
  exports.MantineEnumInput = MantineEnumInput;
@@ -7,7 +7,7 @@ const React = require("react");
7
7
  const useCommonProps = require("../hooks/useCommonProps.cjs");
8
8
  const useContextProps = require("../hooks/useContextProps.cjs");
9
9
  const useFileProps = require("../hooks/useFileProps.cjs");
10
- const InnerMantineFileInput = ({ contextName, children, ...props }) => {
10
+ const InnerMantineFileInput = ({ contextName, componentName, children, ...props }) => {
11
11
  const { value, ...commonProps } = useCommonProps.useCommonProps(props);
12
12
  const { path, schema, errors } = props;
13
13
  const accept = React.useMemo(
@@ -20,13 +20,13 @@ const InnerMantineFileInput = ({ contextName, children, ...props }) => {
20
20
  if (!props.visible) {
21
21
  return null;
22
22
  }
23
- return Component === void 0 ? /* @__PURE__ */ jsxRuntime.jsxs(core.Box, { children: [
23
+ return Component === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(utils.MemoWrapper, { componentName: `${componentName}-${path}`, ..._props, children: /* @__PURE__ */ jsxRuntime.jsxs(core.Box, { children: [
24
24
  /* @__PURE__ */ jsxRuntime.jsx(core.FileInput, { ..._props }),
25
25
  utils.parseFromValuesOrFunc(children, { componentProps, jsonFormsProps: props })
26
- ] }) : Component;
26
+ ] }) }) : Component;
27
27
  };
28
28
  function MantineFileInput(props) {
29
- return /* @__PURE__ */ jsxRuntime.jsx(InnerMantineFileInput, { ...props, contextName: "File" });
29
+ return /* @__PURE__ */ jsxRuntime.jsx(InnerMantineFileInput, { ...props, contextName: "File", componentName: "MantineFileInput" });
30
30
  }
31
31
  exports.InnerMantineFileInput = InnerMantineFileInput;
32
32
  exports.MantineFileInput = MantineFileInput;
@@ -12,7 +12,7 @@ function MantineImageInput(props) {
12
12
  getImageURL: (item) => typeof item === "string" ? item : URL.createObjectURL(item)
13
13
  }
14
14
  });
15
- return /* @__PURE__ */ jsxRuntime.jsx(MantineFileInput.InnerMantineFileInput, { ...props, contextName: "Image", children: ({ jsonFormsProps }) => jsonFormsProps.data ? /* @__PURE__ */ jsxRuntime.jsx(
15
+ return /* @__PURE__ */ jsxRuntime.jsx(MantineFileInput.InnerMantineFileInput, { ...props, contextName: "Image", componentName: "MantineImageInput", children: ({ jsonFormsProps }) => jsonFormsProps.data ? /* @__PURE__ */ jsxRuntime.jsx(
16
16
  core$1.Image,
17
17
  {
18
18
  src: getImageURL(jsonFormsProps.data),
@@ -3,6 +3,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const MantineNumberInput = require("./MantineNumberInput.cjs");
5
5
  function MantineIntegerInput(props) {
6
- return /* @__PURE__ */ jsxRuntime.jsx(MantineNumberInput.InnerMantineNumberInput, { ...props, contextName: "Integer" });
6
+ return /* @__PURE__ */ jsxRuntime.jsx(MantineNumberInput.InnerMantineNumberInput, { ...props, contextName: "Integer", componentName: "MantineIntegerInput" });
7
7
  }
8
8
  exports.MantineIntegerInput = MantineIntegerInput;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
+ const utils = require("fastapi-rtk/utils");
4
5
  const core = require("@mantine/core");
5
6
  const React = require("react");
6
7
  const useCommonProps = require("../hooks/useCommonProps.cjs");
@@ -15,6 +16,6 @@ function MantineJsonInput(props) {
15
16
  if (!props.visible) {
16
17
  return null;
17
18
  }
18
- return Component === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(core.JsonInput, { ..._props }) : Component;
19
+ return Component === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(utils.MemoWrapper, { componentName: `MantineJsonInput-${path}`, ..._props, children: /* @__PURE__ */ jsxRuntime.jsx(core.JsonInput, { ..._props }) }) : Component;
19
20
  }
20
21
  exports.MantineJsonInput = MantineJsonInput;
@@ -1,12 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
+ const utils = require("fastapi-rtk/utils");
4
5
  const core = require("@mantine/core");
5
6
  const React = require("react");
6
7
  const useCommonProps = require("../hooks/useCommonProps.cjs");
7
8
  const useContextProps = require("../hooks/useContextProps.cjs");
8
9
  const useNumberProps = require("../hooks/useNumberProps.cjs");
9
- const InnerMantineNumberInput = ({ contextName, ...props }) => {
10
+ const InnerMantineNumberInput = ({ contextName, componentName, ...props }) => {
10
11
  const { value, ...commonProps } = useCommonProps.useCommonProps(props);
11
12
  const { path } = props;
12
13
  const numberProps = useNumberProps.useNumberProps(contextName.toLowerCase(), { value, onChange: commonProps.onChange });
@@ -15,10 +16,10 @@ const InnerMantineNumberInput = ({ contextName, ...props }) => {
15
16
  if (!props.visible) {
16
17
  return null;
17
18
  }
18
- return Component === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(core.NumberInput, { ..._props }) : Component;
19
+ return Component === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(utils.MemoWrapper, { componentName: `${componentName}-${path}`, ..._props, children: /* @__PURE__ */ jsxRuntime.jsx(core.NumberInput, { ..._props }) }) : Component;
19
20
  };
20
21
  function MantineNumberInput(props) {
21
- return /* @__PURE__ */ jsxRuntime.jsx(InnerMantineNumberInput, { ...props, contextName: "Number" });
22
+ return /* @__PURE__ */ jsxRuntime.jsx(InnerMantineNumberInput, { ...props, contextName: "Number", componentName: "MantineNumberInput" });
22
23
  }
23
24
  exports.InnerMantineNumberInput = InnerMantineNumberInput;
24
25
  exports.MantineNumberInput = MantineNumberInput;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
+ const utils = require("fastapi-rtk/utils");
4
5
  const core = require("@mantine/core");
5
6
  const React = require("react");
6
7
  const useCommonProps = require("../hooks/useCommonProps.cjs");
@@ -29,6 +30,6 @@ function MantineOneOfEnumInput(props) {
29
30
  return null;
30
31
  }
31
32
  const InnerComponent = isNative ? core.NativeSelect : core.Select;
32
- return Component === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(InnerComponent, { ..._props }) : Component;
33
+ return Component === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(utils.MemoWrapper, { componentName: `MantineOneOfEnumInput-${path}`, ..._props, children: /* @__PURE__ */ jsxRuntime.jsx(InnerComponent, { ..._props }) }) : Component;
33
34
  }
34
35
  exports.MantineOneOfEnumInput = MantineOneOfEnumInput;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
+ const utils = require("fastapi-rtk/utils");
4
5
  const core = require("@mantine/core");
5
6
  const React = require("react");
6
7
  const useCommonProps = require("../hooks/useCommonProps.cjs");
@@ -15,6 +16,6 @@ function MantineTextInput(props) {
15
16
  if (!props.visible) {
16
17
  return null;
17
18
  }
18
- return Component === void 0 ? schema.format === "password" ? /* @__PURE__ */ jsxRuntime.jsx(core.PasswordInput, { ..._props }) : /* @__PURE__ */ jsxRuntime.jsx(core.TextInput, { ..._props }) : Component;
19
+ return Component === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(utils.MemoWrapper, { componentName: `MantineTextInput-${path}`, ..._props, children: schema.format === "password" ? /* @__PURE__ */ jsxRuntime.jsx(core.PasswordInput, { ..._props }) : /* @__PURE__ */ jsxRuntime.jsx(core.TextInput, { ..._props }) }) : Component;
19
20
  }
20
21
  exports.MantineTextInput = MantineTextInput;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const core = require("fastapi-rtk/core");
5
+ const utils = require("fastapi-rtk/utils");
5
6
  const React = require("react");
6
7
  const useCommonProps = require("../hooks/useCommonProps.cjs");
7
8
  const useContextProps = require("../hooks/useContextProps.cjs");
@@ -22,6 +23,6 @@ function MantineTimeInput(props) {
22
23
  if (!props.visible) {
23
24
  return null;
24
25
  }
25
- return Component === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(core.TimePicker, { ..._props }) : Component;
26
+ return Component === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(utils.MemoWrapper, { componentName: `MantineTimeInput-${path}`, ..._props, children: /* @__PURE__ */ jsxRuntime.jsx(core.TimePicker, { ..._props }) }) : Component;
26
27
  }
27
28
  exports.MantineTimeInput = MantineTimeInput;
@@ -5,7 +5,10 @@ const jsonformsCore_esm = require("../../../../../../../.external/cjs/@jsonforms
5
5
  const jsonformsReact_esm = require("../../../../../../../.external/cjs/@jsonforms_react@3.7.0_@jsonforms_core@3.7.0_react@19.2.4/@jsonforms/react/lib/jsonforms-react.esm.cjs");
6
6
  const MantineEnumArrayInput = require("../MantineInputs/MantineEnumArrayInput.cjs");
7
7
  const isEnumArrayControl = require("../testers/isEnumArrayControl.cjs");
8
- const mantineEnumArrayCellTester = jsonformsCore_esm.rankWith(1, isEnumArrayControl.isEnumArrayControl);
9
- const MantineEnumArrayCell = jsonformsReact_esm.withJsonFormsMultiEnumProps((props) => /* @__PURE__ */ jsxRuntime.jsx(MantineEnumArrayInput.MantineEnumArrayInput, { ...props }));
8
+ const withLabelMappingProps = require("../utils/withLabelMappingProps.cjs");
9
+ const mantineEnumArrayCellTester = jsonformsCore_esm.rankWith(2, isEnumArrayControl.isEnumArrayControl);
10
+ const MantineEnumArrayCell = jsonformsReact_esm.withJsonFormsMultiEnumProps(
11
+ withLabelMappingProps.withLabelMappingProps((props) => /* @__PURE__ */ jsxRuntime.jsx(MantineEnumArrayInput.MantineEnumArrayInput, { ...props }))
12
+ );
10
13
  exports.MantineEnumArrayCell = MantineEnumArrayCell;
11
14
  exports.mantineEnumArrayCellTester = mantineEnumArrayCellTester;
@@ -4,9 +4,10 @@ const jsxRuntime = require("react/jsx-runtime");
4
4
  const jsonformsCore_esm = require("../../../../../../../.external/cjs/@jsonforms_core@3.7.0/@jsonforms/core/lib/jsonforms-core.esm.cjs");
5
5
  const jsonformsReact_esm = require("../../../../../../../.external/cjs/@jsonforms_react@3.7.0_@jsonforms_core@3.7.0_react@19.2.4/@jsonforms/react/lib/jsonforms-react.esm.cjs");
6
6
  const MantineEnumInput = require("../MantineInputs/MantineEnumInput.cjs");
7
+ const withLabelMappingProps = require("../utils/withLabelMappingProps.cjs");
7
8
  const mantineEnumCellTester = jsonformsCore_esm.rankWith(2, jsonformsCore_esm.isEnumControl);
8
9
  const MantineEnumCell = jsonformsReact_esm.withJsonFormsEnumCellProps(
9
- jsonformsReact_esm.withTranslateProps((props) => /* @__PURE__ */ jsxRuntime.jsx(MantineEnumInput.MantineEnumInput, { ...props })),
10
+ jsonformsReact_esm.withTranslateProps(withLabelMappingProps.withLabelMappingProps((props) => /* @__PURE__ */ jsxRuntime.jsx(MantineEnumInput.MantineEnumInput, { ...props }))),
10
11
  false
11
12
  );
12
13
  exports.MantineEnumCell = MantineEnumCell;
@@ -4,9 +4,10 @@ const jsxRuntime = require("react/jsx-runtime");
4
4
  const jsonformsCore_esm = require("../../../../../../../.external/cjs/@jsonforms_core@3.7.0/@jsonforms/core/lib/jsonforms-core.esm.cjs");
5
5
  const jsonformsReact_esm = require("../../../../../../../.external/cjs/@jsonforms_react@3.7.0_@jsonforms_core@3.7.0_react@19.2.4/@jsonforms/react/lib/jsonforms-react.esm.cjs");
6
6
  const MantineOneOfEnumInput = require("../MantineInputs/MantineOneOfEnumInput.cjs");
7
+ const withLabelMappingProps = require("../utils/withLabelMappingProps.cjs");
7
8
  const mantineOneOfEnumCellTester = jsonformsCore_esm.rankWith(2, jsonformsCore_esm.isOneOfControl);
8
9
  const MantineOneOfEnumCell = jsonformsReact_esm.withJsonFormsOneOfEnumCellProps(
9
- jsonformsReact_esm.withTranslateProps((props) => /* @__PURE__ */ jsxRuntime.jsx(MantineOneOfEnumInput.MantineOneOfEnumInput, { ...props })),
10
+ jsonformsReact_esm.withTranslateProps(withLabelMappingProps.withLabelMappingProps((props) => /* @__PURE__ */ jsxRuntime.jsx(MantineOneOfEnumInput.MantineOneOfEnumInput, { ...props }))),
10
11
  false
11
12
  );
12
13
  exports.MantineOneOfEnumCell = MantineOneOfEnumCell;
@@ -4,7 +4,8 @@ const jsonformsCore_esm = require("../../../../../../../.external/cjs/@jsonforms
4
4
  const jsonformsReact_esm = require("../../../../../../../.external/cjs/@jsonforms_react@3.7.0_@jsonforms_core@3.7.0_react@19.2.4/@jsonforms/react/lib/jsonforms-react.esm.cjs");
5
5
  const MantineEnumArrayInput = require("../MantineInputs/MantineEnumArrayInput.cjs");
6
6
  const isEnumArrayControl = require("../testers/isEnumArrayControl.cjs");
7
- const mantineEnumArrayRendererTester = jsonformsCore_esm.rankWith(1, isEnumArrayControl.isEnumArrayControl);
8
- const MantineEnumArrayRenderer = jsonformsReact_esm.withJsonFormsMultiEnumProps(MantineEnumArrayInput.MantineEnumArrayInput);
7
+ const withLabelMappingProps = require("../utils/withLabelMappingProps.cjs");
8
+ const mantineEnumArrayRendererTester = jsonformsCore_esm.rankWith(2, isEnumArrayControl.isEnumArrayControl);
9
+ const MantineEnumArrayRenderer = jsonformsReact_esm.withJsonFormsMultiEnumProps(withLabelMappingProps.withLabelMappingProps(MantineEnumArrayInput.MantineEnumArrayInput));
9
10
  exports.MantineEnumArrayRenderer = MantineEnumArrayRenderer;
10
11
  exports.mantineEnumArrayRendererTester = mantineEnumArrayRendererTester;
@@ -3,7 +3,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsonformsCore_esm = require("../../../../../../../.external/cjs/@jsonforms_core@3.7.0/@jsonforms/core/lib/jsonforms-core.esm.cjs");
4
4
  const jsonformsReact_esm = require("../../../../../../../.external/cjs/@jsonforms_react@3.7.0_@jsonforms_core@3.7.0_react@19.2.4/@jsonforms/react/lib/jsonforms-react.esm.cjs");
5
5
  const MantineEnumInput = require("../MantineInputs/MantineEnumInput.cjs");
6
+ const withLabelMappingProps = require("../utils/withLabelMappingProps.cjs");
6
7
  const mantineEnumControlTester = jsonformsCore_esm.rankWith(2, jsonformsCore_esm.isEnumControl);
7
- const MantineEnumControl = jsonformsReact_esm.withJsonFormsEnumProps(jsonformsReact_esm.withTranslateProps(MantineEnumInput.MantineEnumInput), false);
8
+ const MantineEnumControl = jsonformsReact_esm.withJsonFormsEnumProps(
9
+ jsonformsReact_esm.withTranslateProps(withLabelMappingProps.withLabelMappingProps(MantineEnumInput.MantineEnumInput)),
10
+ false
11
+ );
8
12
  exports.MantineEnumControl = MantineEnumControl;
9
13
  exports.mantineEnumControlTester = mantineEnumControlTester;
@@ -3,7 +3,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsonformsCore_esm = require("../../../../../../../.external/cjs/@jsonforms_core@3.7.0/@jsonforms/core/lib/jsonforms-core.esm.cjs");
4
4
  const jsonformsReact_esm = require("../../../../../../../.external/cjs/@jsonforms_react@3.7.0_@jsonforms_core@3.7.0_react@19.2.4/@jsonforms/react/lib/jsonforms-react.esm.cjs");
5
5
  const MantineOneOfEnumInput = require("../MantineInputs/MantineOneOfEnumInput.cjs");
6
+ const withLabelMappingProps = require("../utils/withLabelMappingProps.cjs");
6
7
  const mantineOneOfEnumControlTester = jsonformsCore_esm.rankWith(2, jsonformsCore_esm.isOneOfControl);
7
- const MantineOneOfEnumControl = jsonformsReact_esm.withJsonFormsOneOfEnumProps(jsonformsReact_esm.withTranslateProps(MantineOneOfEnumInput.MantineOneOfEnumInput), false);
8
+ const MantineOneOfEnumControl = jsonformsReact_esm.withJsonFormsOneOfEnumProps(
9
+ jsonformsReact_esm.withTranslateProps(withLabelMappingProps.withLabelMappingProps(MantineOneOfEnumInput.MantineOneOfEnumInput)),
10
+ false
11
+ );
8
12
  exports.MantineOneOfEnumControl = MantineOneOfEnumControl;
9
13
  exports.mantineOneOfEnumControlTester = mantineOneOfEnumControlTester;
@@ -1,12 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const utils = require("fastapi-rtk/utils");
4
+ const React = require("react");
4
5
  function useBooleanProps(type, { value, onChange }) {
5
6
  switch (type) {
6
7
  case "checkbox":
7
8
  return {
8
9
  checked: value || false,
9
- onChange: (event) => onChange(event.target.checked)
10
+ onChange: React.useCallback((event) => onChange(event.target.checked), [onChange])
10
11
  };
11
12
  case "native":
12
13
  return {
@@ -21,7 +22,10 @@ function useBooleanProps(type, { value, onChange }) {
21
22
  }
22
23
  ],
23
24
  value: utils.isTruthy(value) ? String(value) : "",
24
- onChange: (event) => onChange(utils.isTruthy(event.currentTarget.value) ? event.currentTarget.value === String(true) : void 0)
25
+ onChange: React.useCallback(
26
+ (event) => onChange(utils.isTruthy(event.currentTarget.value) ? event.currentTarget.value === String(true) : void 0),
27
+ [onChange]
28
+ )
25
29
  };
26
30
  case "select":
27
31
  return {
@@ -36,7 +40,7 @@ function useBooleanProps(type, { value, onChange }) {
36
40
  }
37
41
  ],
38
42
  value: utils.isTruthy(value) ? String(value) : null,
39
- onChange: (value2) => onChange(utils.isTruthy(value2) ? value2 === String(true) : void 0)
43
+ onChange: React.useCallback((value2) => onChange(utils.isTruthy(value2) ? value2 === String(true) : void 0), [onChange])
40
44
  };
41
45
  default:
42
46
  throw new Error(`Unknown boolean type: ${type}`);
@@ -12,26 +12,32 @@ function useCommonProps(props = {}) {
12
12
  var _a, _b, _c, _d;
13
13
  const __ = core.useProps("__", {}, {});
14
14
  const [value, setValue] = React.useState(props.data);
15
- let valueIfNull = null;
16
- if (!isSchemaTypeInclude.isSchemaTypeInclude(props.schema.type, "null")) {
17
- if (isSchemaTypeInclude.isSchemaTypeInclude(props.schema.type, "array")) {
18
- valueIfNull = [];
19
- } else if (isSchemaTypeInclude.isSchemaTypeInclude(props.schema.type, "object")) {
20
- valueIfNull = {};
21
- } else if (isSchemaTypeInclude.isSchemaTypeInclude(props.schema.type, "string")) {
22
- valueIfNull = "";
15
+ const valueIfNull = React.useMemo(() => {
16
+ let valueIfNull2 = null;
17
+ if (!isSchemaTypeInclude.isSchemaTypeInclude(props.schema.type, "null")) {
18
+ if (isSchemaTypeInclude.isSchemaTypeInclude(props.schema.type, "array")) {
19
+ valueIfNull2 = [];
20
+ } else if (isSchemaTypeInclude.isSchemaTypeInclude(props.schema.type, "object")) {
21
+ valueIfNull2 = {};
22
+ } else if (isSchemaTypeInclude.isSchemaTypeInclude(props.schema.type, "string")) {
23
+ valueIfNull2 = "";
24
+ }
23
25
  }
24
- }
26
+ return valueIfNull2;
27
+ }, [props.schema.type]);
25
28
  const debouncedCallback = hooks.useDebouncedCallback((value2) => props.handleChange(props.path, value2), {
26
29
  delay: core$1.DEBOUNCE_JSONFORMS_DELAY,
27
30
  flushOnUnmount: true,
28
31
  ...__.debounceOptions
29
32
  });
30
- const onChange = (value2) => {
31
- const newValue = value2 ?? (__.setNull ? valueIfNull : void 0);
32
- setValue(newValue);
33
- __.debounce ? debouncedCallback(newValue) : props.handleChange(props.path, newValue);
34
- };
33
+ const onChange = React.useCallback(
34
+ (value2) => {
35
+ const newValue = value2 ?? (__.setNull ? valueIfNull : void 0);
36
+ setValue(newValue);
37
+ __.debounce ? debouncedCallback(newValue) : props.handleChange(props.path, newValue);
38
+ },
39
+ [props.handleChange, props.path, __.debounce, __.setNull, valueIfNull, debouncedCallback]
40
+ );
35
41
  React.useEffect(() => {
36
42
  setValue(props.data);
37
43
  }, [props.data]);
@@ -50,8 +56,11 @@ function useCommonProps(props = {}) {
50
56
  disabled: !props.enabled,
51
57
  value,
52
58
  onChange,
53
- onBlur: () => debouncedCallback.flush(),
54
- error: props.errors ? props.errors.split("\n").map((error) => /* @__PURE__ */ jsxRuntime.jsx("span", { style: { display: "block" }, children: error }, error)) : void 0,
59
+ onBlur: React.useCallback(() => debouncedCallback.flush(), [debouncedCallback]),
60
+ error: React.useMemo(
61
+ () => props.errors ? props.errors.split("\n").map((error) => /* @__PURE__ */ jsxRuntime.jsx("span", { style: { display: "block" }, children: error }, error)) : void 0,
62
+ [props.errors]
63
+ ),
55
64
  ...(_d = (_c = props.uischema) == null ? void 0 : _c.options) == null ? void 0 : _d.props,
56
65
  ...ifProps
57
66
  };
@@ -3,6 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const iconify = require("../../../../../../../.external/cjs/@iconify_react@6.0.2_react@19.2.4/@iconify/react/dist/iconify.cjs");
5
5
  const core = require("@mantine/core");
6
+ const React = require("react");
6
7
  const utcConverter = require("../utils/utcConverter.cjs");
7
8
  function useDateProps(type, isUTC, { value, toggle, onChange }) {
8
9
  const theme = core.useMantineTheme();
@@ -10,26 +11,32 @@ function useDateProps(type, isUTC, { value, toggle, onChange }) {
10
11
  if (type === "date") {
11
12
  props.valueFormat = "DD.MM.YYYY";
12
13
  props.value = value || null;
13
- props.onChange = (value2) => onChange(value2 || void 0);
14
+ props.onChange = React.useCallback((value2) => onChange(value2 || void 0), [onChange]);
14
15
  } else {
15
16
  props.valueFormat = isUTC ? "DD.MM.YYYY HH:mm (UTC)" : "DD.MM.YYYY HH:mm";
16
17
  props.value = value ? isUTC ? utcConverter.convertUTCStringToLocalString(value) : value : null;
17
- props.onChange = (value2) => onChange(value2 ? isUTC ? utcConverter.convertLocalStringToUTCString(value2) : value2 : void 0);
18
+ props.onChange = React.useCallback(
19
+ (value2) => onChange(value2 ? isUTC ? utcConverter.convertLocalStringToUTCString(value2) : value2 : void 0),
20
+ [onChange]
21
+ );
18
22
  props.placeholder = isUTC ? "DD.MM.YYYY HH:mm (UTC)" : "DD.MM.YYYY HH:mm";
19
- props.rightSection = /* @__PURE__ */ jsxRuntime.jsx(
20
- core.CloseButton,
21
- {
22
- title: isUTC ? "UTC" : "Local",
23
- variant: "transparent",
24
- size: "sm",
25
- onClick: () => {
26
- toggle();
27
- if (props.value) {
28
- onChange(isUTC ? utcConverter.convertUTCStringToLocalString(props.value) : utcConverter.convertLocalStringToUTCString(props.value));
29
- }
30
- },
31
- icon: /* @__PURE__ */ jsxRuntime.jsx(iconify.Icon, { icon: "tabler:timezone", color: isUTC ? theme.primaryColor : "gray" })
32
- }
23
+ props.rightSection = React.useMemo(
24
+ () => /* @__PURE__ */ jsxRuntime.jsx(
25
+ core.CloseButton,
26
+ {
27
+ title: isUTC ? "UTC" : "Local",
28
+ variant: "transparent",
29
+ size: "sm",
30
+ onClick: () => {
31
+ toggle();
32
+ if (props.value) {
33
+ onChange(isUTC ? utcConverter.convertUTCStringToLocalString(props.value) : utcConverter.convertLocalStringToUTCString(props.value));
34
+ }
35
+ },
36
+ icon: /* @__PURE__ */ jsxRuntime.jsx(iconify.Icon, { icon: "tabler:timezone", color: isUTC ? theme.primaryColor : "gray" })
37
+ }
38
+ ),
39
+ [isUTC, toggle, onChange, props.value, theme.primaryColor]
33
40
  );
34
41
  }
35
42
  return props;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
+ const React = require("react");
4
5
  function useFileProps({ value, onChange, accept, errors }) {
5
6
  var _a;
6
7
  const filteredErrors = (_a = errors == null ? void 0 : errors.split("\n").filter((error) => !error.startsWith("must be string"))) == null ? void 0 : _a.join("\n");
@@ -10,7 +11,7 @@ function useFileProps({ value, onChange, accept, errors }) {
10
11
  }
11
12
  return {
12
13
  value,
13
- onChange: (value2) => onChange(value2 || void 0),
14
+ onChange: React.useCallback((value2) => onChange(value2 || void 0), [onChange]),
14
15
  accept: accept || void 0,
15
16
  error: filteredErrors ? filteredErrors.split("\n").map((error) => /* @__PURE__ */ jsxRuntime.jsx("span", { style: { display: "block" }, children: error }, error)) : void 0,
16
17
  clearable: true
@@ -17,7 +17,7 @@ function useJsonProps({ value, onChange }) {
17
17
  validationError: "Invalid JSON",
18
18
  formatOnBlur: true,
19
19
  value: inputValue,
20
- onBlur: () => {
20
+ onBlur: React.useCallback(() => {
21
21
  if (!inputValue) {
22
22
  onChange(void 0);
23
23
  return;
@@ -27,7 +27,7 @@ function useJsonProps({ value, onChange }) {
27
27
  onChange(parsedValue);
28
28
  } catch {
29
29
  }
30
- },
30
+ }, [inputValue, onChange]),
31
31
  onChange: setInputValue
32
32
  };
33
33
  }
@@ -1,12 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const React = require("react");
3
4
  const useSelectProps = require("./useSelectProps.cjs");
4
5
  function useMultiSelectProps(value, options, { onChange }) {
5
6
  const props = useSelectProps.useSelectProps(value, options);
6
7
  return {
7
8
  ...props,
8
9
  value: props.value || [],
9
- onChange: (value2) => value2.length ? onChange(value2) : onChange(void 0)
10
+ onChange: React.useCallback((value2) => value2.length ? onChange(value2) : onChange(void 0), [onChange])
10
11
  };
11
12
  }
12
13
  exports.useMultiSelectProps = useMultiSelectProps;
@@ -1,11 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const React = require("react");
3
4
  function useNumberProps(type, { value, onChange }) {
4
5
  return {
5
6
  value: value ?? "",
6
7
  allowDecimal: type === "number" ? true : false,
7
8
  hideControls: true,
8
- onChange: (value2) => onChange(typeof value2 === "string" ? value2 || void 0 : value2 ?? void 0)
9
+ onChange: React.useCallback(
10
+ (value2) => onChange(typeof value2 === "string" ? value2 || void 0 : value2 ?? void 0),
11
+ [onChange]
12
+ )
9
13
  };
10
14
  }
11
15
  exports.useNumberProps = useNumberProps;
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const React = require("react");
3
4
  function useSelectProps(value, options, isNative = false, { onChange } = {}) {
4
5
  if (isNative) {
5
6
  return {
6
7
  data: [{ value: "", label: "" }, ...options],
7
8
  value: value || "",
8
- onChange: (event) => onChange(event.currentTarget.value || void 0)
9
+ onChange: React.useCallback((event) => onChange(event.currentTarget.value || void 0), [onChange])
9
10
  };
10
11
  } else {
11
12
  return { data: options, value: value || null, searchable: true };
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const React = require("react");
3
4
  function useTextProps({ value, onChange }) {
4
5
  return {
5
6
  value: value || "",
6
- onChange: (event) => onChange(event.target.value || void 0)
7
+ onChange: React.useCallback((event) => onChange(event.target.value || void 0), [onChange])
7
8
  };
8
9
  }
9
10
  exports.useTextProps = useTextProps;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const React = require("react");
3
4
  function useTimeProps({ value, onChange, withSeconds }) {
4
5
  if (withSeconds) {
5
6
  value = (value == null ? void 0 : value.length) === 5 ? `${value}:00` : value;
@@ -8,12 +9,15 @@ function useTimeProps({ value, onChange, withSeconds }) {
8
9
  }
9
10
  return {
10
11
  value: value || "",
11
- onChange: (value2) => {
12
- if (value2.length === 5) {
13
- value2 = `${value2}:00`;
14
- }
15
- onChange == null ? void 0 : onChange(value2 || void 0);
16
- }
12
+ onChange: React.useCallback(
13
+ (value2) => {
14
+ if (value2.length === 5) {
15
+ value2 = `${value2}:00`;
16
+ }
17
+ onChange == null ? void 0 : onChange(value2 || void 0);
18
+ },
19
+ [onChange]
20
+ )
17
21
  };
18
22
  }
19
23
  exports.useTimeProps = useTimeProps;