@pisell/materials 6.3.10 → 6.3.12

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 (47) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +4 -4
  6. package/build/lowcode/preview.js +150 -169
  7. package/build/lowcode/render/default/view.js +27 -40
  8. package/build/lowcode/view.js +27 -40
  9. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  10. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
  11. package/es/components/dataSourceComponents/fields/index.d.ts +3 -3
  12. package/es/components/productCard/components/Packages/utils.d.ts +1 -1
  13. package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.js +2 -0
  14. package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  15. package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  16. package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  17. package/es/components/table/Table/index.js +7 -3
  18. package/es/components/table/Table/utils.d.ts +1 -1
  19. package/es/components/table/hooks/useTransColumns.d.ts +1 -1
  20. package/es/components/table/hooks/useTransColumns.js +1 -1
  21. package/es/components/table/index.js +3 -1
  22. package/es/utils/index.d.ts +1 -1
  23. package/es/utils/platform.d.ts +1 -1
  24. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  25. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
  26. package/lib/components/dataSourceComponents/fields/index.d.ts +3 -3
  27. package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
  28. package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.js +2 -0
  29. package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  30. package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  31. package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  32. package/lib/components/table/Table/index.js +8 -4
  33. package/lib/components/table/Table/utils.d.ts +1 -1
  34. package/lib/components/table/hooks/useTransColumns.d.ts +1 -1
  35. package/lib/components/table/hooks/useTransColumns.js +1 -1
  36. package/lib/components/table/index.js +3 -1
  37. package/lib/utils/index.d.ts +1 -1
  38. package/lib/utils/platform.d.ts +1 -1
  39. package/package.json +1 -1
  40. package/dist/umd/materials.min.css +0 -1
  41. package/dist/umd/materials.min.js +0 -1
  42. package/dist/umd/static/DotsSix.57d66266.svg +0 -1
  43. package/dist/umd/static/arrow-left.e542294f.svg +0 -1
  44. package/dist/umd/static/arrow-right.763f03e0.svg +0 -1
  45. package/dist/umd/static/filter-lines.04a54ae9.svg +0 -1
  46. package/dist/umd/static/help-circle.31c9be40.svg +0 -1
  47. package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +0 -1
@@ -1,5 +1,5 @@
1
1
  declare const useDataSourceKey: () => {
2
- dataSourceKey: string | import("../../provider/dataSource/DataSourceContext").DataSourceType | undefined;
3
- dataSourceKeyRef: import("react").MutableRefObject<string | import("../../provider/dataSource/DataSourceContext").DataSourceType | undefined>;
2
+ dataSourceKey: string | undefined;
3
+ dataSourceKeyRef: import("react").MutableRefObject<string | undefined>;
4
4
  };
5
5
  export default useDataSourceKey;
@@ -19,7 +19,7 @@ interface UseTablePropsProps {
19
19
  */
20
20
  declare const useTableProps: (props: UseTablePropsProps) => {
21
21
  currentComponentId: any;
22
- title: string | number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
22
+ title: number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
23
23
  pagination: {
24
24
  total: number;
25
25
  current: number;
@@ -28,7 +28,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
28
28
  showSizeChanger: boolean;
29
29
  };
30
30
  columns: import("./useColumns").Column[];
31
- subTitle: string | number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
31
+ subTitle: number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
32
32
  buttons: any[] | null;
33
33
  filter: {
34
34
  dom: any;
@@ -79,7 +79,7 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
79
79
  name?: string | undefined;
80
80
  fieldKey?: string | undefined;
81
81
  } & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
82
- }) | import("react").FC<any> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
82
+ }) | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
83
83
  Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
84
84
  } & {
85
85
  Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
@@ -95,7 +95,7 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
95
95
  extraParams?: Record<string, any> | undefined;
96
96
  } & {
97
97
  dataSource?: any;
98
- }) => JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
98
+ }) => JSX.Element) | import("react").FC<any> | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
99
99
  onChange: (value: string) => void;
100
- } & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
100
+ } & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
101
101
  export { getFieldComponent, formFieldMap };
@@ -17,4 +17,4 @@ export declare const minusSign: (item: any, type?: string) => "" | "-";
17
17
  * @Author: WangHan
18
18
  * @Date: 2024-11-22 10:58
19
19
  */
20
- export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;
20
+ export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => string | number;
@@ -99,6 +99,8 @@ export var batchExport = function batchExport(exportParams, exportImport) {
99
99
  params === null || params === void 0 || delete params.shipping_status;
100
100
  params === null || params === void 0 || delete params.payment_status;
101
101
  params === null || params === void 0 || delete params.status;
102
+ } else {
103
+ params === null || params === void 0 || delete params.ids;
102
104
  }
103
105
  params.export_select = exportImportTypeMap[type];
104
106
  return _batchExport(params);
@@ -1,5 +1,5 @@
1
1
  declare const useGapSize: (gap: number | number[]) => {
2
- horizontal: any;
3
- vertical: any;
2
+ horizontal: number;
3
+ vertical: number;
4
4
  };
5
5
  export default useGapSize;
@@ -2,4 +2,4 @@ export default function ({ value, key, item, }: {
2
2
  value: string | string[];
3
3
  key: string | string[];
4
4
  item: Record<string, any>;
5
- }): any;
5
+ }): boolean;
@@ -2,4 +2,4 @@ export default function ({ value, key, item, }: {
2
2
  value: string | string[] | Record<string, any>[];
3
3
  key: string | string[];
4
4
  item: Record<string, any>;
5
- }): any;
5
+ }): boolean;
@@ -57,11 +57,14 @@ var GridViewTable = function GridViewTable(_ref) {
57
57
  payload: newData
58
58
  });
59
59
  });
60
- var handleResize = function handleResize(index) {
60
+ var handleResize = function handleResize(index, record) {
61
61
  return function (e, _ref2) {
62
62
  var size = _ref2.size;
63
- var nextColumns = _toConsumableArray(columns);
64
- nextColumns[index] = _objectSpread(_objectSpread({}, nextColumns[index]), {}, {
63
+ var findIndex = column_setting.findIndex(function (item) {
64
+ return item.dataIndex === record.dataIndex;
65
+ });
66
+ var nextColumns = _toConsumableArray(column_setting);
67
+ nextColumns[findIndex] = _objectSpread(_objectSpread({}, nextColumns[findIndex]), {}, {
65
68
  width: size.width
66
69
  });
67
70
  form.setFieldValue('column_setting', nextColumns);
@@ -97,6 +100,7 @@ var GridViewTable = function GridViewTable(_ref) {
97
100
  var components = useGenTableComponents({
98
101
  form: form
99
102
  });
103
+ console.log(columns, 'columns12');
100
104
  var showTotal = useCallback(function (total, range, pageSize) {
101
105
  var start = range[0] - 1;
102
106
  var _current = start / pageSize + 1;
@@ -155,7 +155,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
155
155
  sort?: SortType | undefined;
156
156
  mode: "" | "localStorage" | "remote";
157
157
  currentViewMode: ModeType;
158
- }) => ("view_mode" | "filter_setting" | "group_by" | "order_by" | "column_setting" | "gallery_setting" | "filters")[];
158
+ }) => ("filters" | "view_mode" | "filter_setting" | "group_by" | "order_by" | "column_setting" | "gallery_setting")[];
159
159
  export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
160
160
  export declare const stringify: (obj: Record<string, any>) => string;
161
161
  export {};
@@ -4,7 +4,7 @@ declare type UseTransColumnsProps = {
4
4
  form: FormInstance;
5
5
  localPagination: boolean;
6
6
  handleSave?: (row: Record<string, any>) => void;
7
- handleResize?: (index: number) => (e: any, p2: any) => void;
7
+ handleResize?: (index: number, record: Record<string, any>) => (e: any, p2: any) => void;
8
8
  dragSort: boolean;
9
9
  bordered: boolean;
10
10
  };
@@ -186,7 +186,7 @@ var useTransColumns = function useTransColumns(params) {
186
186
  return _objectSpread(_objectSpread({
187
187
  record: record
188
188
  }, item), {}, {
189
- onResize: handleResize === null || handleResize === void 0 ? void 0 : handleResize(index),
189
+ onResize: handleResize === null || handleResize === void 0 ? void 0 : handleResize(index, record),
190
190
  position: position
191
191
  });
192
192
  }
@@ -252,7 +252,9 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
252
252
  try {
253
253
  if (!tableId) return {};
254
254
  var setting = getTableSettingByCurrentViewMode(tableId, currentViewMode);
255
- return (setting === null || setting === void 0 ? void 0 : setting.filters) || {};
255
+ var filters = (setting === null || setting === void 0 ? void 0 : setting.filters) || {};
256
+ filters.order_by = (setting === null || setting === void 0 ? void 0 : setting.order_by) || '';
257
+ return filters;
256
258
  } catch (e) {
257
259
  return {};
258
260
  }
@@ -1,4 +1,4 @@
1
1
  export declare const isBrowser: boolean;
2
- export declare const getCssNumber: (val: string | number) => string | number;
2
+ export declare const getCssNumber: (val: string | number) => string;
3
3
  export declare function uuid(): string;
4
4
  export * from './mergeWith';
@@ -1 +1 @@
1
- export declare const isMobile: () => any;
1
+ export declare const isMobile: () => boolean;
@@ -1,5 +1,5 @@
1
1
  declare const useDataSourceKey: () => {
2
- dataSourceKey: string | import("../../provider/dataSource/DataSourceContext").DataSourceType | undefined;
3
- dataSourceKeyRef: import("react").MutableRefObject<string | import("../../provider/dataSource/DataSourceContext").DataSourceType | undefined>;
2
+ dataSourceKey: string | undefined;
3
+ dataSourceKeyRef: import("react").MutableRefObject<string | undefined>;
4
4
  };
5
5
  export default useDataSourceKey;
@@ -19,7 +19,7 @@ interface UseTablePropsProps {
19
19
  */
20
20
  declare const useTableProps: (props: UseTablePropsProps) => {
21
21
  currentComponentId: any;
22
- title: string | number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
22
+ title: number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
23
23
  pagination: {
24
24
  total: number;
25
25
  current: number;
@@ -28,7 +28,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
28
28
  showSizeChanger: boolean;
29
29
  };
30
30
  columns: import("./useColumns").Column[];
31
- subTitle: string | number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
31
+ subTitle: number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
32
32
  buttons: any[] | null;
33
33
  filter: {
34
34
  dom: any;
@@ -79,7 +79,7 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
79
79
  name?: string | undefined;
80
80
  fieldKey?: string | undefined;
81
81
  } & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
82
- }) | import("react").FC<any> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
82
+ }) | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
83
83
  Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
84
84
  } & {
85
85
  Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
@@ -95,7 +95,7 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
95
95
  extraParams?: Record<string, any> | undefined;
96
96
  } & {
97
97
  dataSource?: any;
98
- }) => JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
98
+ }) => JSX.Element) | import("react").FC<any> | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
99
99
  onChange: (value: string) => void;
100
- } & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
100
+ } & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
101
101
  export { getFieldComponent, formFieldMap };
@@ -17,4 +17,4 @@ export declare const minusSign: (item: any, type?: string) => "" | "-";
17
17
  * @Author: WangHan
18
18
  * @Date: 2024-11-22 10:58
19
19
  */
20
- export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;
20
+ export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => string | number;
@@ -76,6 +76,8 @@ var batchExport = (exportParams, exportImport) => {
76
76
  params == null ? true : delete params.shipping_status;
77
77
  params == null ? true : delete params.payment_status;
78
78
  params == null ? true : delete params.status;
79
+ } else {
80
+ params == null ? true : delete params.ids;
79
81
  }
80
82
  params.export_select = exportImportTypeMap[type];
81
83
  return _batchExport(params);
@@ -1,5 +1,5 @@
1
1
  declare const useGapSize: (gap: number | number[]) => {
2
- horizontal: any;
3
- vertical: any;
2
+ horizontal: number;
3
+ vertical: number;
4
4
  };
5
5
  export default useGapSize;
@@ -2,4 +2,4 @@ export default function ({ value, key, item, }: {
2
2
  value: string | string[];
3
3
  key: string | string[];
4
4
  item: Record<string, any>;
5
- }): any;
5
+ }): boolean;
@@ -2,4 +2,4 @@ export default function ({ value, key, item, }: {
2
2
  value: string | string[] | Record<string, any>[];
3
3
  key: string | string[];
4
4
  item: Record<string, any>;
5
- }): any;
5
+ }): boolean;
@@ -71,10 +71,13 @@ var GridViewTable = ({
71
71
  payload: newData
72
72
  });
73
73
  });
74
- const handleResize = (index) => (e, { size }) => {
75
- const nextColumns = [...columns];
76
- nextColumns[index] = {
77
- ...nextColumns[index],
74
+ const handleResize = (index, record) => (e, { size }) => {
75
+ const findIndex = column_setting.findIndex(
76
+ (item) => item.dataIndex === record.dataIndex
77
+ );
78
+ const nextColumns = [...column_setting];
79
+ nextColumns[findIndex] = {
80
+ ...nextColumns[findIndex],
78
81
  width: size.width
79
82
  };
80
83
  form.setFieldValue("column_setting", nextColumns);
@@ -108,6 +111,7 @@ var GridViewTable = ({
108
111
  const components = (0, import_useGenTableComponents.default)({
109
112
  form
110
113
  });
114
+ console.log(columns, "columns12");
111
115
  const showTotal = (0, import_react.useCallback)(
112
116
  (total, range, pageSize) => {
113
117
  let start = range[0] - 1;
@@ -155,7 +155,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
155
155
  sort?: SortType | undefined;
156
156
  mode: "" | "localStorage" | "remote";
157
157
  currentViewMode: ModeType;
158
- }) => ("view_mode" | "filter_setting" | "group_by" | "order_by" | "column_setting" | "gallery_setting" | "filters")[];
158
+ }) => ("filters" | "view_mode" | "filter_setting" | "group_by" | "order_by" | "column_setting" | "gallery_setting")[];
159
159
  export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
160
160
  export declare const stringify: (obj: Record<string, any>) => string;
161
161
  export {};
@@ -4,7 +4,7 @@ declare type UseTransColumnsProps = {
4
4
  form: FormInstance;
5
5
  localPagination: boolean;
6
6
  handleSave?: (row: Record<string, any>) => void;
7
- handleResize?: (index: number) => (e: any, p2: any) => void;
7
+ handleResize?: (index: number, record: Record<string, any>) => (e: any, p2: any) => void;
8
8
  dragSort: boolean;
9
9
  bordered: boolean;
10
10
  };
@@ -196,7 +196,7 @@ var useTransColumns = (params) => {
196
196
  onHeaderCell: (record) => ({
197
197
  record,
198
198
  ...item,
199
- onResize: handleResize == null ? void 0 : handleResize(index),
199
+ onResize: handleResize == null ? void 0 : handleResize(index, record),
200
200
  position
201
201
  })
202
202
  };
@@ -266,7 +266,9 @@ var GridView = (0, import_model.Provider)(
266
266
  try {
267
267
  if (!tableId) return {};
268
268
  const setting = (0, import_utils.getTableSettingByCurrentViewMode)(tableId, currentViewMode);
269
- return (setting == null ? void 0 : setting.filters) || {};
269
+ const filters = (setting == null ? void 0 : setting.filters) || {};
270
+ filters.order_by = (setting == null ? void 0 : setting.order_by) || "";
271
+ return filters;
270
272
  } catch (e) {
271
273
  return {};
272
274
  }
@@ -1,4 +1,4 @@
1
1
  export declare const isBrowser: boolean;
2
- export declare const getCssNumber: (val: string | number) => string | number;
2
+ export declare const getCssNumber: (val: string | number) => string;
3
3
  export declare function uuid(): string;
4
4
  export * from './mergeWith';
@@ -1 +1 @@
1
- export declare const isMobile: () => any;
1
+ export declare const isMobile: () => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "6.3.10",
3
+ "version": "6.3.12",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -1 +0,0 @@
1
- .materials-grid{display:flex;flex-direction:column;height:100%;width:100%}.materials-grid-header{align-items:center;display:flex;justify-content:space-between;margin-bottom:16px}.materials-grid-header .right-wrap{align-items:center;display:flex;gap:8px}.materials-grid-actions{align-items:center;display:flex;justify-content:space-between;margin-bottom:16px}.materials-grid-actions .left-wrap{align-items:center;display:flex;flex:1 1}.materials-grid-actions .left-wrap .pisell-lowcode-form-item{margin-bottom:0}.materials-grid-actions .right-wrap{align-items:center;display:flex;gap:8px}.materials-grid-actions .right-wrap .icon{cursor:pointer;transition:.2s}.materials-grid-actions .right-wrap .icon:hover{color:var(--theme-color)}.materials-grid-actions .right-wrap .button{align-items:center;display:flex;font-size:12px;height:28px;justify-content:center}.filter-dropdown-wrap{display:flex;flex-direction:column;max-height:400px;max-width:calc(100vw - 24px);min-width:250px;padding:4px;width:400px}.filter-dropdown-wrap .filter-dropdown-wrap-content{flex:1 1;overflow:auto}.filter-dropdown-wrap .filter-dropdown-drag-item{align-items:center;background:#f9fafb;background:var(--gray-50,#f9fafb);border-radius:8px;display:flex;margin-bottom:12px;padding:8px 12px 12px}.filter-dropdown-wrap .filter-dropdown-drag-item .dots-six-icon{color:#98a2b3;cursor:pointer;font-size:24px}.filter-dropdown-wrap .filter-dropdown-drag-item .pisell-lowcode-form-item{margin-bottom:0}.filter-dropdown-wrap .filter-dropdown-drag-item .filter-dropdown-drag-item-right{flex:1 1;margin-left:16px}.filter-dropdown-wrap .filter-dropdown-drag-item .filter-dropdown-drag-item-right .filter-dropdown-drag-item-title{color:#777;color:var(--text-text-2,#777);font-size:14px;font-style:normal;font-weight:600;line-height:20px}.filter-dropdown-container-wrap{border-bottom:1px solid #e2e2e2;border-bottom:1px solid var(--surface-surface-4,#e2e2e2);margin-bottom:20px;min-height:70px}.filter-dropdown-container-wrap:last-child{border:none}.filter-dropdown-container-wrap .filter-dropdown-container-title-wrap{align-items:center;color:#919191;color:var(--text-text-3,#919191);display:flex;font-size:16px;font-style:normal;font-weight:600;line-height:22px;margin-bottom:12px}.filter-dropdown-container-wrap .filter-dropdown-container-title-wrap .filter-dropdown-container-title{color:#101828;color:var(--gray-900,#101828);font-size:16px;font-style:normal;font-weight:600;line-height:24px;margin-right:6px}.filter-dropdown-container-wrap .filter-dropdown-container-title-wrap .filter-dropdown-container-icon-help{color:#98a2b3;color:var(--gray-400,#98a2b3);font-size:20px}.filter-dropdown-container-wrap .filter-dropdown-container-filter-wrap{min-height:80px}.materials-sort-list-empty{color:#5a5a5a;display:block;padding-top:22px;text-align:center}.materials-grid-summary{margin-bottom:16px}.grid-view-table-wrap{position:relative}.materials-grid-paginator{align-items:center;background-color:#fff;border:1px solid #f0f0f0;border-radius:0 0 8px 8px;border-top:none;display:flex;height:50px;justify-content:center;margin:0!important;padding:0 20px;width:100%}.materials-grid-paginator .pisell-lowcode-pagination-total-text{color:#667085;color:var(--gray-500,#667085);font-size:14px;font-style:normal;font-weight:500;margin-right:auto}.materials-grid-paginator .pisell-lowcode-pagination-item{border:1px solid #d0d5dd;border-radius:0;border-right:0;margin:0;position:relative}.materials-grid-paginator .pisell-lowcode-pagination-jump-next,.materials-grid-paginator .pisell-lowcode-pagination-jump-prev{border:1px solid #d0d5dd;border-radius:0;border-right:none;margin:0}.materials-grid-paginator .pisell-lowcode-pagination-item-link:hover{color:rgba(0,0,0,.88)!important;font-weight:450!important}.materials-grid-paginator .pisell-lowcode-pagination-item-link:hover .pisell-lowcode-pagination-item-link-icon{color:rgba(0,0,0,.88)!important;font-weight:450!important}.materials-grid-paginator .pisell-lowcode-pagination-item-active:hover{border-color:#d0d5dd!important}.materials-grid-paginator .pisell-lowcode-pagination-item-active{background-color:rgba(0,0,0,.06)}.materials-grid-paginator .pisell-lowcode-pagination-item-active a{color:rgba(0,0,0,.88)!important;font-weight:450!important}.materials-grid-paginator .pisell-lowcode-pagination-prev{align-items:center;border:1px solid #d0d5dd;border-radius:8px 0 0 8px;border-right:none;display:flex;justify-content:center;margin:0;min-width:auto}.materials-grid-paginator .pisell-lowcode-pagination-next{align-items:center;border:1px solid #d0d5dd;border-radius:0 8px 8px 0;display:flex;justify-content:center;margin:0;min-width:auto}.paginator-page-btn{align-items:center;border-radius:4px 4px 4px 4px;color:#344054;color:var(--gray-700,#344054);cursor:pointer;display:flex;font-size:12px;font-weight:400;justify-content:center;padding:10px 16px;transition:.2s;-ms-user-select:none;user-select:none}.paginator-page-btn .paginator-page-btn-text{font-weight:600}.paginator-page-btn .paginator-page-btn-left-icon,.paginator-page-btn .paginator-page-btn-right-icon{font-size:20px}.paginator-page-btn .paginator-page-btn-left-icon{margin-right:8px}.paginator-page-btn .paginator-page-btn-right-icon{margin-left:8px}.paginator-page-btn.left{margin-right:auto}.paginator-page-btn.left .icon{font-size:18px;margin-right:8px}.paginator-page-btn.right{margin-left:auto}.paginator-page-btn.right .icon{font-size:18px;margin-left:8px;transform:rotate(180deg)}.materials-grid-paginator-mini{align-items:center;background-color:#fff;border:1px solid #f0f0f0;border-radius:0 0 8px 8px;border-top:none;display:flex;height:50px;justify-content:space-between;margin:0!important;overflow:hidden;padding:0 20px;width:100%}.materials-grid-paginator-mini .paginator-page-btn{padding:8px}.materials-grid-paginator-mini .materials-grid-paginator-center{align-items:center;display:flex;gap:4px;justify-content:center}.materials-grid-paginator-mini .materials-grid-paginator-center .materials-grid-paginator-center-text{color:#344054;color:var(--gray-700,#344054);font-size:14px;font-style:normal;font-weight:400}.materials-grid-paginator-mini .materials-grid-paginator-center .materials-grid-paginator-center-value{color:#344054;color:var(--gray-700,#344054);font-size:14px;font-style:normal;font-weight:500}.materials-grid-paginator-mini .pisell-lowcode-pagination-next,.materials-grid-paginator-mini .pisell-lowcode-pagination-prev{border:1px solid #d0d5dd;border-radius:8px;margin:0}.materials-grid-paginator-mini .pisell-lowcode-pagination-next .paginator-page-btn-left-icon,.materials-grid-paginator-mini .pisell-lowcode-pagination-prev .paginator-page-btn-left-icon{margin-right:0}.materials-grid-paginator-mini .pisell-lowcode-pagination-next .paginator-page-btn-right-icon,.materials-grid-paginator-mini .pisell-lowcode-pagination-prev .paginator-page-btn-right-icon{margin-left:0}.react-resizable{position:relative}.react-resizable-handle{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgd2lkdGg9IjYiIGhlaWdodD0iNiI+PHBhdGggZD0iTTYgNkgwVjQuMmg0LjJWMEg2djZaIiBvcGFjaXR5PSIuMzAyIi8+PC9zdmc+);background-origin:content-box;background-position:100% 100%;background-repeat:no-repeat;box-sizing:border-box;height:20px;padding:0 3px 3px 0;position:absolute;width:20px}.react-resizable-handle-sw{bottom:0;cursor:sw-resize;left:0;transform:rotate(90deg)}.react-resizable-handle-se{bottom:0;cursor:se-resize;right:0}.react-resizable-handle-nw{cursor:nw-resize;left:0;top:0;transform:rotate(180deg)}.react-resizable-handle-ne{cursor:ne-resize;right:0;top:0;transform:rotate(270deg)}.react-resizable-handle-e,.react-resizable-handle-w{cursor:ew-resize;margin-top:-10px;top:50%}.react-resizable-handle-w{left:0;transform:rotate(135deg)}.react-resizable-handle-e{right:0;transform:rotate(315deg)}.react-resizable-handle-n,.react-resizable-handle-s{cursor:ns-resize;left:50%;margin-left:-10px}.react-resizable-handle-n{top:0;transform:rotate(225deg)}.react-resizable-handle-s{bottom:0;transform:rotate(45deg)}.materials-grid-table-header-cell{align-items:center;display:flex;height:44px;padding:0 14px}.materials-grid-table-header-cell .field-icon{color:#777;font-size:18px}.materials-grid-table-header-cell .materials-grid-table-header-cell-content{color:#1b1b1b;flex:auto;font-size:14px;font-weight:600;overflow:hidden;padding-right:10px;text-overflow:ellipsis;white-space:nowrap;word-break:break-all}.materials-grid-table-header-cell .actions{align-items:center;display:flex;gap:8px}.materials-grid-table-header-cell .actions .action{color:#ababab;cursor:pointer;font-size:14px}.editable-cell-value-wrap{height:100%;width:100%}.materials-grid-table-cell{height:1px;padding:0!important}.cell-provider{align-items:center;border-radius:4px;cursor:pointer;display:flex;height:100%;justify-content:center;padding:12px;position:relative;width:100%}.cell-provider.focus{box-shadow:var(--theme-color) 0 0 0 1px!important}