@pisell/materials 1.0.543 → 1.0.545
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/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +2 -2
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +2 -2
- package/es/components/dataSourceComponents/dataSourceForm/group/index.less +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/utils.js +5 -5
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.js +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -1
- package/es/components/organizationTenantSwitcher/index.js +1 -0
- package/es/components/organizationTenantSwitcher/index.less +6 -0
- package/lib/components/dataSourceComponents/dataSourceForm/group/index.less +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/utils.js +3 -3
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -1
- package/lib/components/organizationTenantSwitcher/index.js +1 -0
- package/lib/components/organizationTenantSwitcher/index.less +6 -0
- package/lowcode/form-item-select/snippets.ts +3 -1
- package/package.json +3 -3
|
@@ -302,18 +302,18 @@ export var withOptions = function withOptions(WrappedComponent) {
|
|
|
302
302
|
}
|
|
303
303
|
}, []);
|
|
304
304
|
var options = useMemo(function () {
|
|
305
|
-
var _list$data, _list$data$data;
|
|
305
|
+
var _list$data, _list$data$data, _list$data$data$filte;
|
|
306
306
|
if (optionSourceType !== 'api') {
|
|
307
307
|
return propsOptions;
|
|
308
308
|
}
|
|
309
|
-
return (((_list$data = list.data) === null || _list$data === void 0 ? void 0 : (_list$data$data = _list$data.data) === null || _list$data$data === void 0 ? void 0 : _list$data$data.
|
|
309
|
+
return (((_list$data = list.data) === null || _list$data === void 0 ? void 0 : (_list$data$data = _list$data.data) === null || _list$data$data === void 0 ? void 0 : (_list$data$data$filte = _list$data$data.filter) === null || _list$data$data$filte === void 0 ? void 0 : _list$data$data$filte.call(_list$data$data, function (item) {
|
|
310
|
+
return !['draft', 'inactive', 'disabled'].includes(item === null || item === void 0 ? void 0 : item.status);
|
|
311
|
+
})) || []).map(function (item) {
|
|
310
312
|
return {
|
|
311
313
|
label: translationOriginal(item[labelField]),
|
|
312
314
|
value: item[valueField]
|
|
313
315
|
};
|
|
314
|
-
})
|
|
315
|
-
return a.label.localeCompare(b.label);
|
|
316
|
-
});
|
|
316
|
+
}) || [];
|
|
317
317
|
}, [propsOptions, optionSourceType, list === null || list === void 0 ? void 0 : (_list$data2 = list.data) === null || _list$data2 === void 0 ? void 0 : _list$data2.data]);
|
|
318
318
|
return /*#__PURE__*/React.createElement(WrappedComponent, _extends({}, props, {
|
|
319
319
|
options: options
|
|
@@ -158,7 +158,7 @@ var Filter = function Filter(props) {
|
|
|
158
158
|
layout: "inline",
|
|
159
159
|
className: "filter-form-wrapper",
|
|
160
160
|
onValuesChange: onValuesChange
|
|
161
|
-
}, searchDom, filterDom, show && /*#__PURE__*/React.createElement(FilterButton, {
|
|
161
|
+
}, searchDom, filterDom, show && sortButtonShow && /*#__PURE__*/React.createElement(FilterButton, {
|
|
162
162
|
value: list,
|
|
163
163
|
quickFilterMaxLength: quickFilterMaxLength,
|
|
164
164
|
formFiltersPrefix: '',
|
|
@@ -65,7 +65,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
65
65
|
useCustomAction: boolean;
|
|
66
66
|
actionType: string;
|
|
67
67
|
openMode: "modal" | "drawer";
|
|
68
|
-
openContentSize: "small" | "
|
|
68
|
+
openContentSize: "small" | "middle" | "large";
|
|
69
69
|
openTitle: string;
|
|
70
70
|
key: string;
|
|
71
71
|
} | undefined;
|
|
@@ -60,6 +60,7 @@ var OrganizationTenantSwitcher = function OrganizationTenantSwitcher(_ref2) {
|
|
|
60
60
|
};
|
|
61
61
|
var currentOrg = getCurrentOrg();
|
|
62
62
|
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
63
|
+
overlayClassName: "organization-tenant-switcher-overlay",
|
|
63
64
|
menu: {
|
|
64
65
|
items: items,
|
|
65
66
|
onClick: handleMenuClick,
|
|
@@ -330,14 +330,14 @@ var withOptions = (WrappedComponent) => {
|
|
|
330
330
|
}
|
|
331
331
|
}, []);
|
|
332
332
|
const options = (0, import_react.useMemo)(() => {
|
|
333
|
-
var _a2, _b;
|
|
333
|
+
var _a2, _b, _c;
|
|
334
334
|
if (optionSourceType !== "api") {
|
|
335
335
|
return propsOptions;
|
|
336
336
|
}
|
|
337
|
-
return (((_b = (_a2 = list.data) == null ? void 0 : _a2.data) == null ? void 0 : _b.map((item) => ({
|
|
337
|
+
return (((_c = (_b = (_a2 = list.data) == null ? void 0 : _a2.data) == null ? void 0 : _b.filter) == null ? void 0 : _c.call(_b, (item) => !["draft", "inactive", "disabled"].includes(item == null ? void 0 : item.status))) || []).map((item) => ({
|
|
338
338
|
label: translationOriginal(item[labelField]),
|
|
339
339
|
value: item[valueField]
|
|
340
|
-
}))
|
|
340
|
+
})) || [];
|
|
341
341
|
}, [propsOptions, optionSourceType, (_a = list == null ? void 0 : list.data) == null ? void 0 : _a.data]);
|
|
342
342
|
return /* @__PURE__ */ import_react.default.createElement(WrappedComponent, { ...props, options });
|
|
343
343
|
};
|
|
@@ -167,7 +167,7 @@ var Filter = (props) => {
|
|
|
167
167
|
},
|
|
168
168
|
searchDom,
|
|
169
169
|
filterDom,
|
|
170
|
-
show && /* @__PURE__ */ import_react.default.createElement(
|
|
170
|
+
show && sortButtonShow && /* @__PURE__ */ import_react.default.createElement(
|
|
171
171
|
import_FilterButton.default,
|
|
172
172
|
{
|
|
173
173
|
value: list,
|
|
@@ -65,7 +65,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
65
65
|
useCustomAction: boolean;
|
|
66
66
|
actionType: string;
|
|
67
67
|
openMode: "modal" | "drawer";
|
|
68
|
-
openContentSize: "small" | "
|
|
68
|
+
openContentSize: "small" | "middle" | "large";
|
|
69
69
|
openTitle: string;
|
|
70
70
|
key: string;
|
|
71
71
|
} | undefined;
|
|
@@ -13,6 +13,7 @@ export default [
|
|
|
13
13
|
optionSourceType: 'default',
|
|
14
14
|
optionFilterProp: 'label',
|
|
15
15
|
styleType: "antd",
|
|
16
|
+
showSearch: true,
|
|
16
17
|
options: [
|
|
17
18
|
{
|
|
18
19
|
label: 'A',
|
|
@@ -39,7 +40,8 @@ export default [
|
|
|
39
40
|
props: {
|
|
40
41
|
allowClear: true,
|
|
41
42
|
mode: 'multiple',
|
|
42
|
-
|
|
43
|
+
showSearch: true,
|
|
44
|
+
placeholder: selectMultiplePlaceholder,
|
|
43
45
|
optionSourceType: 'default',
|
|
44
46
|
optionFilterProp: 'label',
|
|
45
47
|
styleType: "antd",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.545",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
"swiper": "^8.4.7",
|
|
71
71
|
"react-barcode": "^1.5.3",
|
|
72
72
|
"@pisell/date-picker": "1.0.115",
|
|
73
|
-
"@pisell/
|
|
74
|
-
"@pisell/
|
|
73
|
+
"@pisell/utils": "1.0.43",
|
|
74
|
+
"@pisell/icon": "0.0.10"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
77
|
"react": "^18.0.0",
|