@crystaldesign/diva-backoffice 26.2.0-beta.7 → 26.2.0-beta.8
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/build/esm/index.js +85 -75
- package/build/types/backoffice/src/ui/SelectClientRelationCatalog/Select/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/SelectClientRelationCatalog/index.d.ts.map +1 -1
- package/build/types/backoffice/src/ui/Table/CatalogTable/index.d.ts.map +1 -1
- package/package.json +9 -9
package/build/esm/index.js
CHANGED
|
@@ -19816,11 +19816,13 @@ function useSelectClientRelationCatalog (_ref) {
|
|
|
19816
19816
|
};
|
|
19817
19817
|
}
|
|
19818
19818
|
|
|
19819
|
+
var customSelectContainer = "custom-select-container-rPcLx";
|
|
19819
19820
|
var customSelect = "custom-select-ESUJX";
|
|
19820
|
-
var
|
|
19821
|
-
var
|
|
19822
|
-
var
|
|
19823
|
-
var
|
|
19821
|
+
var customSelectContentWrapper = "custom-select-content-wrapper-v98Ms";
|
|
19822
|
+
var customSelectOptionContent = "custom-select-option-content-LIbzl";
|
|
19823
|
+
var customSelectAvatar = "custom-select-avatar-DPCn1";
|
|
19824
|
+
var customSelectOptionText = "custom-select-option-text-crPF-";
|
|
19825
|
+
var css_248z$w = ".custom-select-container-rPcLx {\n display: flex;\n gap: 8px;\n height: 32px;\n}\n\n.custom-select-ESUJX {\n width: 300px;\n}\n\n.custom-select-content-wrapper-v98Ms {\n display: flex;\n align-items: center;\n height: 22px;\n}\n\n.custom-select-option-content-LIbzl {\n display: flex;\n align-items: center;\n gap: 8px;\n max-width: 100%;\n height: 100%;\n}\n\n.custom-select-option-content-LIbzl .custom-select-avatar-DPCn1 {\n flex-shrink: 0;\n}\n\n.custom-select-option-content-LIbzl .custom-select-option-text-crPF- {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n";
|
|
19824
19826
|
styleInject(css_248z$w);
|
|
19825
19827
|
|
|
19826
19828
|
var Selector = function Selector(_ref) {
|
|
@@ -19830,87 +19832,96 @@ var Selector = function Selector(_ref) {
|
|
|
19830
19832
|
onSelect = _ref.onSelect,
|
|
19831
19833
|
loading = _ref.loading,
|
|
19832
19834
|
valueState = _ref.value;
|
|
19833
|
-
var _useState = useState(),
|
|
19835
|
+
var _useState = useState(valueState),
|
|
19834
19836
|
_useState2 = _slicedToArray(_useState, 2),
|
|
19835
19837
|
value = _useState2[0],
|
|
19836
19838
|
setValue = _useState2[1];
|
|
19837
19839
|
useEffect(function () {
|
|
19838
|
-
if (loading
|
|
19840
|
+
if (loading === true) {
|
|
19839
19841
|
setValue(undefined);
|
|
19840
19842
|
onSelect(undefined);
|
|
19841
19843
|
}
|
|
19842
19844
|
}, [loading]);
|
|
19843
19845
|
useEffect(function () {
|
|
19844
|
-
|
|
19845
|
-
return i._id == valueState;
|
|
19846
|
-
});
|
|
19847
|
-
if (selItem) {
|
|
19848
|
-
setValue({
|
|
19849
|
-
label: /*#__PURE__*/jsxs(Fragment, {
|
|
19850
|
-
children: [/*#__PURE__*/jsx("div", {
|
|
19851
|
-
className: avatarWrapper,
|
|
19852
|
-
children: /*#__PURE__*/jsx(Avatar, {
|
|
19853
|
-
size: "small",
|
|
19854
|
-
src: selItem.image,
|
|
19855
|
-
shape: "square"
|
|
19856
|
-
})
|
|
19857
|
-
}), /*#__PURE__*/jsx("div", {
|
|
19858
|
-
className: selectTextWrapper,
|
|
19859
|
-
children: selItem.name
|
|
19860
|
-
})]
|
|
19861
|
-
}),
|
|
19862
|
-
value: selItem._id
|
|
19863
|
-
});
|
|
19864
|
-
}
|
|
19846
|
+
setValue(valueState);
|
|
19865
19847
|
}, [valueState]);
|
|
19866
|
-
|
|
19867
|
-
|
|
19868
|
-
|
|
19869
|
-
|
|
19870
|
-
|
|
19871
|
-
|
|
19872
|
-
|
|
19873
|
-
|
|
19874
|
-
|
|
19875
|
-
|
|
19848
|
+
var options = items.map(function (item) {
|
|
19849
|
+
return {
|
|
19850
|
+
label: item.name,
|
|
19851
|
+
value: item._id,
|
|
19852
|
+
image: item.image
|
|
19853
|
+
};
|
|
19854
|
+
});
|
|
19855
|
+
return /*#__PURE__*/jsx(Select$1, {
|
|
19856
|
+
classNames: {
|
|
19857
|
+
root: customSelect,
|
|
19858
|
+
popup: {
|
|
19859
|
+
listItem: customSelectContentWrapper
|
|
19860
|
+
},
|
|
19861
|
+
content: customSelectContentWrapper,
|
|
19862
|
+
placeholder: customSelectContentWrapper
|
|
19863
|
+
},
|
|
19864
|
+
showSearch: {
|
|
19876
19865
|
filterOption: function filterOption(input, option) {
|
|
19877
|
-
var _option$
|
|
19878
|
-
return
|
|
19879
|
-
},
|
|
19880
|
-
filterSort: filterSort
|
|
19881
|
-
|
|
19882
|
-
|
|
19883
|
-
|
|
19884
|
-
|
|
19885
|
-
|
|
19886
|
-
|
|
19887
|
-
|
|
19888
|
-
|
|
19889
|
-
|
|
19890
|
-
|
|
19891
|
-
|
|
19892
|
-
|
|
19893
|
-
|
|
19894
|
-
|
|
19895
|
-
|
|
19896
|
-
|
|
19897
|
-
|
|
19898
|
-
|
|
19899
|
-
|
|
19900
|
-
|
|
19901
|
-
|
|
19902
|
-
|
|
19866
|
+
var _option$label$toStrin, _option$label;
|
|
19867
|
+
return (_option$label$toStrin = option === null || option === void 0 || (_option$label = option.label) === null || _option$label === void 0 ? void 0 : _option$label.toString().toLowerCase().includes(input.toLowerCase())) !== null && _option$label$toStrin !== void 0 ? _option$label$toStrin : false;
|
|
19868
|
+
},
|
|
19869
|
+
filterSort: filterSort
|
|
19870
|
+
},
|
|
19871
|
+
allowClear: true,
|
|
19872
|
+
value: value,
|
|
19873
|
+
disabled: disabled,
|
|
19874
|
+
loading: loading,
|
|
19875
|
+
placeholder: text,
|
|
19876
|
+
options: options,
|
|
19877
|
+
onChange: function onChange(selectedValue) {
|
|
19878
|
+
setValue(selectedValue);
|
|
19879
|
+
onSelect(selectedValue);
|
|
19880
|
+
},
|
|
19881
|
+
optionRender: function optionRender(option) {
|
|
19882
|
+
return /*#__PURE__*/jsx(CustomSelectOption, {
|
|
19883
|
+
option: {
|
|
19884
|
+
image: option.data.image,
|
|
19885
|
+
label: option.label,
|
|
19886
|
+
value: option.value
|
|
19887
|
+
}
|
|
19888
|
+
});
|
|
19889
|
+
},
|
|
19890
|
+
labelRender: function labelRender(props) {
|
|
19891
|
+
var selectedOption = options.find(function (opt) {
|
|
19892
|
+
return opt.value === props.value;
|
|
19893
|
+
});
|
|
19894
|
+
if (!selectedOption) return props.label;
|
|
19895
|
+
return /*#__PURE__*/jsx(CustomSelectOption, {
|
|
19896
|
+
option: selectedOption
|
|
19897
|
+
});
|
|
19898
|
+
}
|
|
19903
19899
|
});
|
|
19904
19900
|
};
|
|
19905
19901
|
var filterSort = function filterSort(optionA, optionB) {
|
|
19906
|
-
if (!optionA.
|
|
19902
|
+
if (!optionA.label && !optionB.label) {
|
|
19907
19903
|
return 0;
|
|
19908
|
-
} else if (!optionA.
|
|
19904
|
+
} else if (!optionA.label) {
|
|
19909
19905
|
return 1;
|
|
19910
|
-
} else if (!optionB.
|
|
19906
|
+
} else if (!optionB.label) {
|
|
19911
19907
|
return -1;
|
|
19912
19908
|
}
|
|
19913
|
-
return optionA.
|
|
19909
|
+
return optionA.label.toString().toLowerCase().localeCompare(optionB.label.toString().toLowerCase());
|
|
19910
|
+
};
|
|
19911
|
+
var CustomSelectOption = function CustomSelectOption(_ref2) {
|
|
19912
|
+
var option = _ref2.option;
|
|
19913
|
+
return /*#__PURE__*/jsxs("div", {
|
|
19914
|
+
className: customSelectOptionContent,
|
|
19915
|
+
children: [/*#__PURE__*/jsx(Avatar, {
|
|
19916
|
+
size: "small",
|
|
19917
|
+
src: option.image,
|
|
19918
|
+
shape: "square",
|
|
19919
|
+
className: customSelectAvatar
|
|
19920
|
+
}), /*#__PURE__*/jsx("span", {
|
|
19921
|
+
className: customSelectOptionText,
|
|
19922
|
+
children: option.label
|
|
19923
|
+
})]
|
|
19924
|
+
});
|
|
19914
19925
|
};
|
|
19915
19926
|
|
|
19916
19927
|
function SelectClientRelationCatalog (_ref) {
|
|
@@ -19951,7 +19962,8 @@ function SelectClientRelationCatalog (_ref) {
|
|
|
19951
19962
|
catalogs = _useSelectClientRelat.catalogs,
|
|
19952
19963
|
onSelectCatalog = _useSelectClientRelat.onSelectCatalog,
|
|
19953
19964
|
loadingCatalogs = _useSelectClientRelat.loadingCatalogs;
|
|
19954
|
-
return /*#__PURE__*/jsxs(
|
|
19965
|
+
return /*#__PURE__*/jsxs("div", {
|
|
19966
|
+
className: customSelectContainer,
|
|
19955
19967
|
children: [!supplierGuid && /*#__PURE__*/jsx(Selector, {
|
|
19956
19968
|
value: selectedSupplier,
|
|
19957
19969
|
items: supplier,
|
|
@@ -26503,7 +26515,7 @@ var editableRow = "editable-row-9BEHi";
|
|
|
26503
26515
|
var checkbox = "checkbox-H7R-w";
|
|
26504
26516
|
var editableCellValueWrap = "editable-cell-value-wrap-ugTs4";
|
|
26505
26517
|
var contentWidth = "content-width-hGyVI";
|
|
26506
|
-
var css_248z$n = ".checkbox-readonly-0-bzT {\n cursor: default;\n}\n\n.checkbox-readonly-0-bzT .ant-checkbox-input {\n cursor: default;\n}\n\n.checkbox-readonly-0-bzT .ant-checkbox {\n cursor: default;\n}\n\n.editable-row-9BEHi:hover .checkbox-H7R-w .ant-checkbox {\n box-shadow: 0 0 5px rgba(0, 0, 0, 0.6);\n}\n\n.editable-cell-value-wrap-ugTs4 {\n padding: 5px 12px;\n cursor: pointer;\n}\n\n.editable-row-9BEHi:hover .editable-cell-value-wrap-ugTs4 {\n padding: 4px 11px;\n border: 1px solid #d9d9d9;\n border-radius: 4px;\n}\n\n.content-width-hGyVI .ant-modal-confirm-content {\n width: 100%;\n}\n\n.ant-select {\n display: flex !important;\n}\n\n/* Fix for antd Table extra column on Windows */\n/* workarround for https://github.com/ant-design/ant-design/issues/55633, if resolved try to remove this */\n.ant-table-cell-scrollbar:not(.ant-table-cell-fix-right) {\n display: none !important;\n}";
|
|
26518
|
+
var css_248z$n = ".checkbox-readonly-0-bzT {\n cursor: default;\n}\n\n.checkbox-readonly-0-bzT .ant-checkbox-input {\n cursor: default;\n}\n\n.checkbox-readonly-0-bzT .ant-checkbox {\n cursor: default;\n}\n\n.editable-row-9BEHi:hover .checkbox-H7R-w .ant-checkbox {\n box-shadow: 0 0 5px rgba(0, 0, 0, 0.6);\n}\n\n.editable-cell-value-wrap-ugTs4 {\n padding: 5px 12px;\n cursor: pointer;\n}\n\n.editable-row-9BEHi:hover .editable-cell-value-wrap-ugTs4 {\n padding: 4px 11px;\n border: 1px solid #d9d9d9;\n border-radius: 4px;\n}\n\n.content-width-hGyVI .ant-modal-confirm-content {\n width: 100%;\n}\n\n.ant-select {\n display: inline-flex !important;\n}\n\n/* Fix for antd Table extra column on Windows */\n/* workarround for https://github.com/ant-design/ant-design/issues/55633, if resolved try to remove this */\n.ant-table-cell-scrollbar:not(.ant-table-cell-fix-right) {\n display: none !important;\n}\n";
|
|
26507
26519
|
styleInject(css_248z$n);
|
|
26508
26520
|
|
|
26509
26521
|
function BooleanCell (_ref) {
|
|
@@ -29701,12 +29713,10 @@ function CatalogTable (props) {
|
|
|
29701
29713
|
filterContex: state.filterContex,
|
|
29702
29714
|
setFilterContext: state.setFilterContext,
|
|
29703
29715
|
tabs: state.configuration.tabs
|
|
29704
|
-
}), /*#__PURE__*/jsx(
|
|
29705
|
-
|
|
29706
|
-
|
|
29707
|
-
|
|
29708
|
-
dontLoadCatalogData: true
|
|
29709
|
-
})
|
|
29716
|
+
}), /*#__PURE__*/jsx(SelectClientRelationCatalog, {
|
|
29717
|
+
onSelectedCatalog: state.onSelectedCatalog,
|
|
29718
|
+
onLoadingCatalog: state.setLoading,
|
|
29719
|
+
dontLoadCatalogData: true
|
|
29710
29720
|
})]
|
|
29711
29721
|
}), /*#__PURE__*/jsx(BaseTable, {
|
|
29712
29722
|
state: state
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/SelectClientRelationCatalog/Select/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/SelectClientRelationCatalog/Select/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAWhC,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAQF,QAAA,MAAM,QAAQ,oEAAqE,KAAK,sBAyDvF,CAAC;AAsBF,eAAe,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/SelectClientRelationCatalog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/SelectClientRelationCatalog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGn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WAAW,CAAC,SAAS,MAAM,EAAE,KAAK,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/Table/CatalogTable/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAItC,MAAM,CAAC,OAAO,WAAW,CAAC,SAAS,MAAM,EAAE,KAAK,EAAE,UAAU,qBAa3D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystaldesign/diva-backoffice",
|
|
3
|
-
"version": "26.2.0-beta.
|
|
3
|
+
"version": "26.2.0-beta.8",
|
|
4
4
|
"license": "COMMERCIAL",
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"@testing-library/jest-dom": "^6.5.0",
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@ant-design/icons": "6.1.0",
|
|
17
17
|
"@babel/runtime": "7.24.7",
|
|
18
|
-
"@crystaldesign/content-box": "26.2.0-beta.
|
|
19
|
-
"@crystaldesign/content-item": "26.2.0-beta.
|
|
20
|
-
"@crystaldesign/diva-core": "26.2.0-beta.
|
|
21
|
-
"@crystaldesign/diva-utils": "26.2.0-beta.
|
|
22
|
-
"@crystaldesign/media-upload": "26.2.0-beta.
|
|
23
|
-
"@crystaldesign/rtf-editor": "26.2.0-beta.
|
|
24
|
-
"@crystaldesign/spreadsheet": "26.2.0-beta.
|
|
18
|
+
"@crystaldesign/content-box": "26.2.0-beta.8",
|
|
19
|
+
"@crystaldesign/content-item": "26.2.0-beta.8",
|
|
20
|
+
"@crystaldesign/diva-core": "26.2.0-beta.8",
|
|
21
|
+
"@crystaldesign/diva-utils": "26.2.0-beta.8",
|
|
22
|
+
"@crystaldesign/media-upload": "26.2.0-beta.8",
|
|
23
|
+
"@crystaldesign/rtf-editor": "26.2.0-beta.8",
|
|
24
|
+
"@crystaldesign/spreadsheet": "26.2.0-beta.8",
|
|
25
25
|
"@google/model-viewer": "3.5.0",
|
|
26
26
|
"ag-charts-community": "^10.1.0",
|
|
27
27
|
"ag-charts-react": "^10.1.0",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
},
|
|
52
52
|
"module": "build/esm/index.js",
|
|
53
53
|
"types": "./build/types/backoffice/src/index.d.ts",
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "bd92c858028d36fef4d7e647b5000c32b921075c"
|
|
55
55
|
}
|