@erpsquad/common 1.8.86 → 1.8.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/index/index.esm.js +4 -2
- package/dist/_virtual/index/index.esm.js.map +1 -1
- package/dist/_virtual/index/index.esm10.js +2 -4
- package/dist/_virtual/index/index.esm10.js.map +1 -1
- package/dist/_virtual/index/index.esm11.js +4 -2
- package/dist/_virtual/index/index.esm11.js.map +1 -1
- package/dist/_virtual/index/index.esm2.js +3 -3
- package/dist/_virtual/index/index.esm3.js +3 -3
- package/dist/_virtual/index/index.esm4.js +3 -3
- package/dist/_virtual/index/index.esm5.js +3 -3
- package/dist/_virtual/index/index.esm6.js +3 -3
- package/dist/_virtual/index/index.esm7.js +2 -4
- package/dist/_virtual/index/index.esm7.js.map +1 -1
- package/dist/_virtual/index/index.esm8.js +3 -3
- package/dist/_virtual/index/index.esm9.js +3 -3
- package/dist/_virtual/index/index.js +1 -1
- package/dist/_virtual/index/index10.js +1 -1
- package/dist/_virtual/index/index11.js +1 -1
- package/dist/_virtual/index/index2.js +1 -1
- package/dist/_virtual/index/index3.js +1 -1
- package/dist/_virtual/index/index4.js +1 -1
- package/dist/_virtual/index/index5.js +1 -1
- package/dist/_virtual/index/index6.js +1 -1
- package/dist/_virtual/index/index7.js +1 -1
- package/dist/_virtual/index/index8.js +1 -1
- package/dist/_virtual/index/index9.js +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/dynamic-select/index.esm.js +31 -34
- package/dist/components/form-control/form-builder/form-builder-element/dynamic-select/index.esm.js.map +1 -1
- package/dist/components/form-control/form-builder/form-builder-element/dynamic-select/index.js +16 -15
- package/dist/components/form-control/form-builder/form-builder-element/dynamic-select/index.js.map +1 -1
- package/dist/node_modules/@asseinfo/react-kanban/dist/index/index.esm.js +1 -1
- package/dist/node_modules/@asseinfo/react-kanban/dist/index/index.js +1 -1
- package/dist/node_modules/@mui/icons-material/utils/createSvgIcon/index.esm.js +1 -1
- package/dist/node_modules/@mui/icons-material/utils/createSvgIcon/index.js +1 -1
- package/dist/node_modules/@mui/icons-material/utils/createSvgIcon/index.js.map +1 -1
- package/dist/node_modules/@mui/system/colorManipulator/index.esm.js +2 -2
- package/dist/node_modules/@mui/system/colorManipulator/index.js +1 -1
- package/dist/node_modules/@mui/system/colorManipulator/index.js.map +1 -1
- package/dist/node_modules/@mui/system/createStyled/index.esm.js +6 -6
- package/dist/node_modules/@mui/system/createStyled/index.js +1 -1
- package/dist/node_modules/@mui/system/createStyled/index.js.map +1 -1
- package/dist/node_modules/@mui/system/useThemeWithoutDefault/index.esm.js +1 -1
- package/dist/node_modules/@mui/system/useThemeWithoutDefault/index.js +1 -1
- package/dist/node_modules/@mui/system/useThemeWithoutDefault/index.js.map +1 -1
- package/dist/node_modules/prop-types/checkPropTypes/index.esm.js +55 -48
- package/dist/node_modules/prop-types/checkPropTypes/index.esm.js.map +1 -1
- package/dist/node_modules/prop-types/checkPropTypes/index.js +1 -1
- package/dist/node_modules/prop-types/checkPropTypes/index.js.map +1 -1
- package/dist/node_modules/prop-types/factoryWithTypeCheckers/index.esm.js +2 -2
- package/dist/node_modules/prop-types/factoryWithTypeCheckers/index.esm.js.map +1 -1
- package/dist/node_modules/prop-types/factoryWithTypeCheckers/index.js +1 -1
- package/dist/node_modules/prop-types/factoryWithTypeCheckers/index.js.map +1 -1
- package/dist/node_modules/prop-types/index/index.esm.js +1 -1
- package/dist/node_modules/prop-types/index/index.js +1 -1
- package/dist/node_modules/prop-types/index/index.js.map +1 -1
- package/dist/style.css +70 -70
- package/package.json +1 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { getAugmentedNamespace } from "../_commonjsHelpers/index.esm.js";
|
|
2
|
+
import * as index from "../../node_modules/@mui/styled-engine/index/index.esm.js";
|
|
3
|
+
var require$$1 = /* @__PURE__ */ getAugmentedNamespace(index);
|
|
2
4
|
export {
|
|
3
|
-
|
|
5
|
+
require$$1 as default
|
|
4
6
|
};
|
|
5
7
|
//# sourceMappingURL=index.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import * as index from "../../node_modules/@mui/utils/esm/clamp/index/index.esm.js";
|
|
3
|
-
var require$$2 = /* @__PURE__ */ getAugmentedNamespace(index);
|
|
1
|
+
var dist = { exports: {} };
|
|
4
2
|
export {
|
|
5
|
-
|
|
3
|
+
dist as __module
|
|
6
4
|
};
|
|
7
5
|
//# sourceMappingURL=index.esm10.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm10.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.esm10.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { getAugmentedNamespace } from "../_commonjsHelpers/index.esm.js";
|
|
2
|
+
import * as index from "../../node_modules/@mui/material/utils/index/index.esm.js";
|
|
3
|
+
var require$$0 = /* @__PURE__ */ getAugmentedNamespace(index);
|
|
2
4
|
export {
|
|
3
|
-
|
|
5
|
+
require$$0 as default
|
|
4
6
|
};
|
|
5
7
|
//# sourceMappingURL=index.esm11.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm11.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.esm11.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getAugmentedNamespace } from "../_commonjsHelpers/index.esm.js";
|
|
2
|
-
import * as index from "../../node_modules/@mui/
|
|
3
|
-
var require$$
|
|
2
|
+
import * as index from "../../node_modules/@mui/utils/esm/deepmerge/index/index.esm.js";
|
|
3
|
+
var require$$4 = /* @__PURE__ */ getAugmentedNamespace(index);
|
|
4
4
|
export {
|
|
5
|
-
require$$
|
|
5
|
+
require$$4 as default
|
|
6
6
|
};
|
|
7
7
|
//# sourceMappingURL=index.esm2.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getAugmentedNamespace } from "../_commonjsHelpers/index.esm.js";
|
|
2
|
-
import * as index from "../../node_modules/@mui/
|
|
3
|
-
var require$$
|
|
2
|
+
import * as index from "../../node_modules/@mui/utils/esm/capitalize/index/index.esm.js";
|
|
3
|
+
var require$$5 = /* @__PURE__ */ getAugmentedNamespace(index);
|
|
4
4
|
export {
|
|
5
|
-
require$$
|
|
5
|
+
require$$5 as default
|
|
6
6
|
};
|
|
7
7
|
//# sourceMappingURL=index.esm3.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getAugmentedNamespace } from "../_commonjsHelpers/index.esm.js";
|
|
2
|
-
import * as index from "../../node_modules/@mui/utils/esm/
|
|
3
|
-
var require$$
|
|
2
|
+
import * as index from "../../node_modules/@mui/utils/esm/getDisplayName/index/index.esm.js";
|
|
3
|
+
var require$$6 = /* @__PURE__ */ getAugmentedNamespace(index);
|
|
4
4
|
export {
|
|
5
|
-
require$$
|
|
5
|
+
require$$6 as default
|
|
6
6
|
};
|
|
7
7
|
//# sourceMappingURL=index.esm4.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getAugmentedNamespace } from "../_commonjsHelpers/index.esm.js";
|
|
2
|
-
import * as index from "../../node_modules/@mui/
|
|
3
|
-
var require$$
|
|
2
|
+
import * as index from "../../node_modules/@mui/system/esm/createTheme/index/index.esm.js";
|
|
3
|
+
var require$$7 = /* @__PURE__ */ getAugmentedNamespace(index);
|
|
4
4
|
export {
|
|
5
|
-
require$$
|
|
5
|
+
require$$7 as default
|
|
6
6
|
};
|
|
7
7
|
//# sourceMappingURL=index.esm5.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getAugmentedNamespace } from "../_commonjsHelpers/index.esm.js";
|
|
2
|
-
import * as index from "../../node_modules/@mui/
|
|
3
|
-
var require$$
|
|
2
|
+
import * as index from "../../node_modules/@mui/system/esm/styleFunctionSx/index/index.esm.js";
|
|
3
|
+
var require$$8 = /* @__PURE__ */ getAugmentedNamespace(index);
|
|
4
4
|
export {
|
|
5
|
-
require$$
|
|
5
|
+
require$$8 as default
|
|
6
6
|
};
|
|
7
7
|
//# sourceMappingURL=index.esm6.js.map
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import * as index from "../../node_modules/@mui/system/esm/createTheme/index/index.esm.js";
|
|
3
|
-
var require$$7 = /* @__PURE__ */ getAugmentedNamespace(index);
|
|
1
|
+
var propTypes = { exports: {} };
|
|
4
2
|
export {
|
|
5
|
-
|
|
3
|
+
propTypes as __module
|
|
6
4
|
};
|
|
7
5
|
//# sourceMappingURL=index.esm7.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm7.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.esm7.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getAugmentedNamespace } from "../_commonjsHelpers/index.esm.js";
|
|
2
|
-
import * as index from "../../node_modules/@mui/
|
|
3
|
-
var require$$
|
|
2
|
+
import * as index from "../../node_modules/@mui/utils/esm/formatMuiErrorMessage/index/index.esm.js";
|
|
3
|
+
var require$$1 = /* @__PURE__ */ getAugmentedNamespace(index);
|
|
4
4
|
export {
|
|
5
|
-
require$$
|
|
5
|
+
require$$1 as default
|
|
6
6
|
};
|
|
7
7
|
//# sourceMappingURL=index.esm8.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getAugmentedNamespace } from "../_commonjsHelpers/index.esm.js";
|
|
2
|
-
import * as index from "../../node_modules/@mui/utils/esm/
|
|
3
|
-
var require$$
|
|
2
|
+
import * as index from "../../node_modules/@mui/utils/esm/clamp/index/index.esm.js";
|
|
3
|
+
var require$$2 = /* @__PURE__ */ getAugmentedNamespace(index);
|
|
4
4
|
export {
|
|
5
|
-
require$$
|
|
5
|
+
require$$2 as default
|
|
6
6
|
};
|
|
7
7
|
//# sourceMappingURL=index.esm9.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../_commonjsHelpers/index.js"),s=require("../../node_modules/@mui/styled-engine/index/index.js"),r=/* @__PURE__ */e.getAugmentedNamespace(s);exports.default=r;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0})
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.__module={exports:{}};
|
|
2
2
|
//# sourceMappingURL=index10.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../_commonjsHelpers/index.js"),r=require("../../node_modules/@mui/material/utils/index/index.js"),s=/* @__PURE__ */e.getAugmentedNamespace(r);exports.default=s;
|
|
2
2
|
//# sourceMappingURL=index11.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../_commonjsHelpers/index.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../_commonjsHelpers/index.js"),s=require("../../node_modules/@mui/utils/esm/deepmerge/index/index.js"),r=/* @__PURE__ */e.getAugmentedNamespace(s);exports.default=r;
|
|
2
2
|
//# sourceMappingURL=index2.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../_commonjsHelpers/index.js"),s=require("../../node_modules/@mui/
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../_commonjsHelpers/index.js"),s=require("../../node_modules/@mui/utils/esm/capitalize/index/index.js"),i=/* @__PURE__ */e.getAugmentedNamespace(s);exports.default=i;
|
|
2
2
|
//# sourceMappingURL=index3.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../_commonjsHelpers/index.js"),s=require("../../node_modules/@mui/utils/esm/
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../_commonjsHelpers/index.js"),s=require("../../node_modules/@mui/utils/esm/getDisplayName/index/index.js"),r=/* @__PURE__ */e.getAugmentedNamespace(s);exports.default=r;
|
|
2
2
|
//# sourceMappingURL=index4.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../_commonjsHelpers/index.js"),s=require("../../node_modules/@mui/
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../_commonjsHelpers/index.js"),s=require("../../node_modules/@mui/system/esm/createTheme/index/index.js"),r=/* @__PURE__ */e.getAugmentedNamespace(s);exports.default=r;
|
|
2
2
|
//# sourceMappingURL=index5.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../_commonjsHelpers/index.js"),s=require("../../node_modules/@mui/
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../_commonjsHelpers/index.js"),s=require("../../node_modules/@mui/system/esm/styleFunctionSx/index/index.js"),t=/* @__PURE__ */e.getAugmentedNamespace(s);exports.default=t;
|
|
2
2
|
//# sourceMappingURL=index6.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0})
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.__module={exports:{}};
|
|
2
2
|
//# sourceMappingURL=index7.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../_commonjsHelpers/index.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../_commonjsHelpers/index.js"),r=require("../../node_modules/@mui/utils/esm/formatMuiErrorMessage/index/index.js"),s=/* @__PURE__ */e.getAugmentedNamespace(r);exports.default=s;
|
|
2
2
|
//# sourceMappingURL=index8.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../_commonjsHelpers/index.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../_commonjsHelpers/index.js"),s=require("../../node_modules/@mui/utils/esm/clamp/index/index.js"),r=/* @__PURE__ */e.getAugmentedNamespace(s);exports.default=r;
|
|
2
2
|
//# sourceMappingURL=index9.js.map
|
package/dist/components/form-control/form-builder/form-builder-element/dynamic-select/index.esm.js
CHANGED
|
@@ -13,15 +13,15 @@ import { Chip } from "../../../../chip/chip/index.esm.js";
|
|
|
13
13
|
import { fetchApi } from "../../../../../utils/api/index.esm.js";
|
|
14
14
|
import { useLanguage } from "../../../../../hooks/useLangauge/index.esm.js";
|
|
15
15
|
/* empty css */
|
|
16
|
-
import Box from "../../../../../node_modules/@mui/material/Box/Box/index.esm.js";
|
|
17
|
-
import Divider from "../../../../../node_modules/@mui/material/Divider/Divider/index.esm.js";
|
|
18
16
|
import MenuItem from "../../../../../node_modules/@mui/material/MenuItem/MenuItem/index.esm.js";
|
|
19
|
-
import
|
|
17
|
+
import Box from "../../../../../node_modules/@mui/material/Box/Box/index.esm.js";
|
|
20
18
|
import CircularProgress from "../../../../../node_modules/@mui/material/CircularProgress/CircularProgress/index.esm.js";
|
|
21
19
|
import OutlinedInput from "../../../../../node_modules/@mui/material/OutlinedInput/OutlinedInput/index.esm.js";
|
|
22
20
|
import InputAdornment from "../../../../../node_modules/@mui/material/InputAdornment/InputAdornment/index.esm.js";
|
|
23
21
|
import IconButton from "../../../../../node_modules/@mui/material/IconButton/IconButton/index.esm.js";
|
|
24
22
|
import Close from "../../../../../node_modules/@mui/icons-material/esm/Close/index.esm.js";
|
|
23
|
+
import Divider from "../../../../../node_modules/@mui/material/Divider/Divider/index.esm.js";
|
|
24
|
+
import Add from "../../../../../node_modules/@mui/icons-material/esm/Add/index.esm.js";
|
|
25
25
|
import { MoreIcon } from "../../../../icons/more/index.esm.js";
|
|
26
26
|
const generateMenuItems = ({
|
|
27
27
|
options,
|
|
@@ -29,13 +29,13 @@ const generateMenuItems = ({
|
|
|
29
29
|
placeholder,
|
|
30
30
|
with_checkboxes,
|
|
31
31
|
values,
|
|
32
|
-
|
|
32
|
+
field,
|
|
33
33
|
disabledIds,
|
|
34
34
|
onChange,
|
|
35
35
|
handleChange,
|
|
36
36
|
hasParent,
|
|
37
|
-
t
|
|
38
|
-
|
|
37
|
+
t,
|
|
38
|
+
onFooterClick
|
|
39
39
|
}) => {
|
|
40
40
|
const itemDisabled = (id) => disabledIds == null ? void 0 : disabledIds.includes(id);
|
|
41
41
|
const items = [];
|
|
@@ -129,6 +129,20 @@ const generateMenuItems = ({
|
|
|
129
129
|
}
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
|
+
if (field.enable_footer) {
|
|
133
|
+
items.push(
|
|
134
|
+
/* @__PURE__ */ jsxs(Box, { children: [
|
|
135
|
+
/* @__PURE__ */ jsx(Divider, { flexItem: true, sx: { mt: "0.25rem !important", mb: "0.25rem !important" } }),
|
|
136
|
+
/* @__PURE__ */ jsxs(MenuItem, { sx: { gap: 1 }, onClick: onFooterClick, children: [
|
|
137
|
+
/* @__PURE__ */ jsx(Add, { fontSize: "small" }),
|
|
138
|
+
/* @__PURE__ */ jsxs(Typography, { type: "s4", color: "theme.secondary.1000", children: [
|
|
139
|
+
"Create New ",
|
|
140
|
+
field.label
|
|
141
|
+
] })
|
|
142
|
+
] })
|
|
143
|
+
] }, "footer")
|
|
144
|
+
);
|
|
145
|
+
}
|
|
132
146
|
if (!items.length || items.length == 1 && !multiple) {
|
|
133
147
|
items.push(
|
|
134
148
|
/* @__PURE__ */ jsx(MenuItem, { disabled: true, children: "No data available" }, "no-data")
|
|
@@ -309,10 +323,10 @@ const DynamicSearchSelect = React__default.memo((props) => {
|
|
|
309
323
|
return true;
|
|
310
324
|
}
|
|
311
325
|
return false;
|
|
312
|
-
}, [props.is_multiselect, props.name, watchedValue, filterKey, getSelectedData
|
|
326
|
+
}, [props.is_multiselect, props.name, watchedValue, filterKey, getSelectedData]);
|
|
313
327
|
const fetchIdOptions = useCallback(async () => {
|
|
314
|
-
if (await handleSelectedValue(filteredOptions)) return;
|
|
315
328
|
if (open) return;
|
|
329
|
+
if (await handleSelectedValue(filteredOptions)) return;
|
|
316
330
|
const condition = props.is_multiselect ? Array.isArray(watchedValue) && watchedValue.length > 0 : Boolean(watchedValue);
|
|
317
331
|
if (condition) {
|
|
318
332
|
setInitialLoading(true);
|
|
@@ -388,6 +402,7 @@ const DynamicSearchSelect = React__default.memo((props) => {
|
|
|
388
402
|
setIsAddLoading(true);
|
|
389
403
|
try {
|
|
390
404
|
const result = await addConfig.api(payload);
|
|
405
|
+
console.log("result", result);
|
|
391
406
|
setIsAddLoading(false);
|
|
392
407
|
setIsModalOpen(false);
|
|
393
408
|
if (!isInternalOptions) {
|
|
@@ -453,7 +468,6 @@ const DynamicSearchSelect = React__default.memo((props) => {
|
|
|
453
468
|
return Array.isArray(selectOptions) ? selectOptions.filter(Boolean) : [];
|
|
454
469
|
}, []);
|
|
455
470
|
useEffect(() => {
|
|
456
|
-
if (!addType) return;
|
|
457
471
|
const config = dynamicSelectAdd(addType);
|
|
458
472
|
setAddConfig(config);
|
|
459
473
|
}, [addType]);
|
|
@@ -519,7 +533,7 @@ const DynamicSearchSelect = React__default.memo((props) => {
|
|
|
519
533
|
}
|
|
520
534
|
);
|
|
521
535
|
} else {
|
|
522
|
-
const selectedOption = filteredOptions
|
|
536
|
+
const selectedOption = filteredOptions.find(
|
|
523
537
|
(option) => {
|
|
524
538
|
var _a2;
|
|
525
539
|
return (((_a2 = option.value) == null ? void 0 : _a2.id) || option.value) == selected;
|
|
@@ -566,35 +580,20 @@ const DynamicSearchSelect = React__default.memo((props) => {
|
|
|
566
580
|
placeholder: props.placeholder,
|
|
567
581
|
values: field.value,
|
|
568
582
|
with_checkboxes: true,
|
|
583
|
+
field: props,
|
|
569
584
|
disabledIds,
|
|
570
585
|
onChange: field.onChange,
|
|
571
586
|
handleChange,
|
|
572
587
|
hasParent,
|
|
573
|
-
t
|
|
574
|
-
|
|
575
|
-
// if (props?.onFooterClick) {
|
|
576
|
-
// props?.onFooterClick();
|
|
577
|
-
// } else {
|
|
578
|
-
// handleModalOpen();
|
|
579
|
-
// }
|
|
580
|
-
// }
|
|
581
|
-
}),
|
|
582
|
-
(props == null ? void 0 : props.enable_footer) && /* @__PURE__ */ jsxs(Box, { sx: { position: "sticky", bottom: 0, background: "#fff", zIndex: 1 }, children: [
|
|
583
|
-
/* @__PURE__ */ jsx(Divider, { flexItem: true, sx: { mt: "0.25rem !important", mb: "0.25rem !important" } }),
|
|
584
|
-
/* @__PURE__ */ jsxs(MenuItem, { sx: { gap: 1 }, onClick: () => {
|
|
588
|
+
t,
|
|
589
|
+
onFooterClick: () => {
|
|
585
590
|
if (props == null ? void 0 : props.onFooterClick) {
|
|
586
591
|
props == null ? void 0 : props.onFooterClick();
|
|
587
592
|
} else {
|
|
588
593
|
handleModalOpen();
|
|
589
594
|
}
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
/* @__PURE__ */ jsxs(Typography, { type: "s4", color: "theme.secondary.1000", children: [
|
|
593
|
-
"Create New ",
|
|
594
|
-
props.label
|
|
595
|
-
] })
|
|
596
|
-
] })
|
|
597
|
-
] }, "footer"),
|
|
595
|
+
}
|
|
596
|
+
}),
|
|
598
597
|
pagination.isLoadingMore && /* @__PURE__ */ jsx(MenuItem, { disabled: true, children: /* @__PURE__ */ jsx(Box, { sx: { display: "flex", justifyContent: "center", width: "100%" }, children: /* @__PURE__ */ jsx(CircularProgress, { size: 20 }) }) })
|
|
599
598
|
]
|
|
600
599
|
}
|
|
@@ -607,8 +606,7 @@ const DynamicSearchSelect = React__default.memo((props) => {
|
|
|
607
606
|
modalProps: {
|
|
608
607
|
maxWidth: "md",
|
|
609
608
|
fullWidth: true
|
|
610
|
-
}
|
|
611
|
-
...props == null ? void 0 : props.modalComponentProps
|
|
609
|
+
}
|
|
612
610
|
}) }),
|
|
613
611
|
props.is_multiselect && Array.isArray(field.value) && /* @__PURE__ */ jsx(
|
|
614
612
|
SelectedItems,
|
|
@@ -661,8 +659,7 @@ DynamicSearchSelect.propTypes = {
|
|
|
661
659
|
filterKey: PropTypes.string,
|
|
662
660
|
customeFilter: PropTypes.object,
|
|
663
661
|
refresh: PropTypes.bool,
|
|
664
|
-
addType: PropTypes.string
|
|
665
|
-
modalComponentProps: PropTypes.object
|
|
662
|
+
addType: PropTypes.string
|
|
666
663
|
};
|
|
667
664
|
export {
|
|
668
665
|
DynamicSearchSelect as default
|