@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.
@@ -1,6 +1,6 @@
1
1
  .pisell-lowcode-data-source-form-group {
2
2
  display: flex;
3
- padding: 20px;
3
+ padding: 20px 20px 0;
4
4
  border-radius: 8px;
5
5
  border: 1px solid var(--Gray-300, #d0d5dd);
6
6
  margin-bottom: 24px;
@@ -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.map(function (item) {
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
- })) || []).sort(function (a, b) {
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" | "large" | "middle";
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,
@@ -19,6 +19,12 @@
19
19
  }
20
20
  }
21
21
 
22
+ .organization-tenant-switcher-overlay {
23
+ .pisell-lowcode-dropdown-menu-item {
24
+ padding: 9px 10px;
25
+ }
26
+ }
27
+
22
28
  .organization-tenant-switcher-switch-name {
23
29
  flex: 1;
24
30
  overflow: hidden;
@@ -1,6 +1,6 @@
1
1
  .pisell-lowcode-data-source-form-group {
2
2
  display: flex;
3
- padding: 20px;
3
+ padding: 20px 20px 0;
4
4
  border-radius: 8px;
5
5
  border: 1px solid var(--Gray-300, #d0d5dd);
6
6
  margin-bottom: 24px;
@@ -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
- }))) || []).sort((a, b) => a.label.localeCompare(b.label));
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" | "large" | "middle";
68
+ openContentSize: "small" | "middle" | "large";
69
69
  openTitle: string;
70
70
  key: string;
71
71
  } | undefined;
@@ -80,6 +80,7 @@ var OrganizationTenantSwitcher = ({
80
80
  return /* @__PURE__ */ import_react.default.createElement(
81
81
  import_antd.Dropdown,
82
82
  {
83
+ overlayClassName: "organization-tenant-switcher-overlay",
83
84
  menu: {
84
85
  items,
85
86
  onClick: handleMenuClick,
@@ -19,6 +19,12 @@
19
19
  }
20
20
  }
21
21
 
22
+ .organization-tenant-switcher-overlay {
23
+ .pisell-lowcode-dropdown-menu-item {
24
+ padding: 9px 10px;
25
+ }
26
+ }
27
+
22
28
  .organization-tenant-switcher-switch-name {
23
29
  flex: 1;
24
30
  overflow: hidden;
@@ -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
- placeholder: selectMultiplePlaceholder,
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.543",
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/icon": "0.0.10",
74
- "@pisell/utils": "1.0.43"
73
+ "@pisell/utils": "1.0.43",
74
+ "@pisell/icon": "0.0.10"
75
75
  },
76
76
  "peerDependencies": {
77
77
  "react": "^18.0.0",