@pisell/materials 1.0.897 → 1.0.898

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 (119) 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 +1 -1
  6. package/build/lowcode/preview.js +145 -145
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +17 -17
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +18 -18
  11. package/es/components/appVersionControl/index.d.ts +4 -0
  12. package/es/components/dataSourceComponents/dataSourceForm/BaseForm.d.ts +3 -0
  13. package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +56 -0
  14. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +39 -0
  15. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +99 -0
  16. package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +80 -0
  17. package/es/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +16 -0
  18. package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +16 -0
  19. package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +25 -0
  20. package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  21. package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  22. package/es/components/dataSourceComponents/fields/index.d.ts +10 -10
  23. package/es/components/drag-sort-tree/index.d.ts +3 -0
  24. package/es/components/hardwareErrorTip/demo.d.ts +3 -0
  25. package/es/components/hardwareErrorTip/errorCard/index.d.ts +28 -0
  26. package/es/components/hardwareErrorTip/errorTipStatistics/index.d.ts +12 -0
  27. package/es/components/hardwareErrorTip/index.d.ts +19 -0
  28. package/es/components/hardwareErrorTip/logCard/index.d.ts +27 -0
  29. package/es/components/hardwareErrorTip/types.d.ts +28 -0
  30. package/es/components/login-and-register/index.d.ts +82 -0
  31. package/es/components/pisell-config-provider/index.d.ts +12 -0
  32. package/es/components/pisellCardList/index.d.ts +97 -0
  33. package/es/components/pisellCardList/index.js +6 -2
  34. package/es/components/pisellCheckboxGroup/index.d.ts +38 -0
  35. package/es/components/pisellEmpty/index.d.ts +19 -0
  36. package/es/components/pisellWalletPassCard/index.d.ts +4 -0
  37. package/es/components/pisellWalletPassCard/index.js +30 -10
  38. package/es/components/pisellWalletPassCard/index.less +8 -3
  39. package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
  40. package/es/components/productCard/components/Header/Actions/index.d.ts +3 -0
  41. package/es/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
  42. package/es/components/productCard/components/Packages/utils.d.ts +1 -1
  43. package/es/components/productCard/components/Time/components/SelectHolder/index.d.ts +3 -0
  44. package/es/components/productCard/components/Time/components/SelectResource/index.d.ts +18 -0
  45. package/es/components/productCard/components/Time/index.d.ts +3 -0
  46. package/es/components/table/Actions/component/ExportImport/index.d.ts +7 -0
  47. package/es/components/table/Gallery/components/GalleryItem/index.d.ts +14 -0
  48. package/es/components/table/Gallery/index.d.ts +5 -0
  49. package/es/components/table/Table/fields/index.d.ts +2 -2
  50. package/es/components/table/Table/index.d.ts +4 -0
  51. package/es/components/table/Table/utils.d.ts +173 -0
  52. package/es/components/table/hooks/useTableSetting.d.ts +22 -0
  53. package/es/components/table/hooks/useTransDataSource.d.ts +12 -0
  54. package/es/components/table/types.d.ts +253 -0
  55. package/es/components/translation/index.d.ts +15 -0
  56. package/es/components/versionModal/index.d.ts +24 -0
  57. package/es/components/walletCard/Guide/index.d.ts +3 -0
  58. package/es/components/walletCard/index.d.ts +71 -0
  59. package/es/index.d.ts +143 -0
  60. package/es/locales/en-US.d.ts +317 -0
  61. package/es/locales/en-US.js +2 -1
  62. package/es/locales/zh-CN.d.ts +311 -0
  63. package/es/locales/zh-TW.d.ts +311 -0
  64. package/es/utils/platform.d.ts +1 -1
  65. package/lib/components/appVersionControl/index.d.ts +4 -0
  66. package/lib/components/dataSourceComponents/dataSourceForm/BaseForm.d.ts +3 -0
  67. package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +56 -0
  68. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +39 -0
  69. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +99 -0
  70. package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +80 -0
  71. package/lib/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +16 -0
  72. package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +16 -0
  73. package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +25 -0
  74. package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  75. package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  76. package/lib/components/dataSourceComponents/fields/index.d.ts +10 -10
  77. package/lib/components/drag-sort-tree/index.d.ts +3 -0
  78. package/lib/components/hardwareErrorTip/demo.d.ts +3 -0
  79. package/lib/components/hardwareErrorTip/errorCard/index.d.ts +28 -0
  80. package/lib/components/hardwareErrorTip/errorTipStatistics/index.d.ts +12 -0
  81. package/lib/components/hardwareErrorTip/index.d.ts +19 -0
  82. package/lib/components/hardwareErrorTip/logCard/index.d.ts +27 -0
  83. package/lib/components/hardwareErrorTip/types.d.ts +28 -0
  84. package/lib/components/login-and-register/index.d.ts +82 -0
  85. package/lib/components/pisell-config-provider/index.d.ts +12 -0
  86. package/lib/components/pisellCardList/index.d.ts +97 -0
  87. package/lib/components/pisellCardList/index.js +6 -2
  88. package/lib/components/pisellCheckboxGroup/index.d.ts +38 -0
  89. package/lib/components/pisellEmpty/index.d.ts +19 -0
  90. package/lib/components/pisellWalletPassCard/index.d.ts +4 -0
  91. package/lib/components/pisellWalletPassCard/index.js +24 -12
  92. package/lib/components/pisellWalletPassCard/index.less +8 -3
  93. package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
  94. package/lib/components/productCard/components/Header/Actions/index.d.ts +3 -0
  95. package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
  96. package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
  97. package/lib/components/productCard/components/Time/components/SelectHolder/index.d.ts +3 -0
  98. package/lib/components/productCard/components/Time/components/SelectResource/index.d.ts +18 -0
  99. package/lib/components/productCard/components/Time/index.d.ts +3 -0
  100. package/lib/components/table/Actions/component/ExportImport/index.d.ts +7 -0
  101. package/lib/components/table/Gallery/components/GalleryItem/index.d.ts +14 -0
  102. package/lib/components/table/Gallery/index.d.ts +5 -0
  103. package/lib/components/table/Table/fields/index.d.ts +2 -2
  104. package/lib/components/table/Table/index.d.ts +4 -0
  105. package/lib/components/table/Table/utils.d.ts +173 -0
  106. package/lib/components/table/hooks/useTableSetting.d.ts +22 -0
  107. package/lib/components/table/hooks/useTransDataSource.d.ts +12 -0
  108. package/lib/components/table/types.d.ts +253 -0
  109. package/lib/components/translation/index.d.ts +15 -0
  110. package/lib/components/versionModal/index.d.ts +24 -0
  111. package/lib/components/walletCard/Guide/index.d.ts +3 -0
  112. package/lib/components/walletCard/index.d.ts +71 -0
  113. package/lib/index.d.ts +143 -0
  114. package/lib/locales/en-US.d.ts +317 -0
  115. package/lib/locales/en-US.js +2 -1
  116. package/lib/locales/zh-CN.d.ts +311 -0
  117. package/lib/locales/zh-TW.d.ts +311 -0
  118. package/lib/utils/platform.d.ts +1 -1
  119. package/package.json +1 -1
@@ -0,0 +1,97 @@
1
+ import React from 'react';
2
+ import { PisellCheckboxGroupProps } from '../pisellCheckboxGroup';
3
+ import { PisellContextType } from '../pisell-config-provider/context';
4
+ import { PisellWalletPassCardProps, FormatOption } from '../pisellWalletPassCard';
5
+ import './index.less';
6
+ export interface PisellCardListProps extends Omit<PisellCheckboxGroupProps, 'options'> {
7
+ platform?: PisellContextType['platform'];
8
+ /** 当用户查看完所有记录时,底部会显示此消息 */
9
+ endMessage?: React.ReactNode;
10
+ /** 加载下次数据时的加载站位 */
11
+ loader?: React.ReactNode;
12
+ /** 是否有更多数据 */
13
+ hasMore: boolean;
14
+ /** 加载更多数据回调 */
15
+ loadMoreData?: () => Promise<void>;
16
+ /** 当前list数据 */
17
+ data: PisellWalletPassCardProps[];
18
+ /** list空数据时展示内容 */
19
+ empty?: React.ReactNode;
20
+ /** 是否展示空状态 */
21
+ showEmpty?: boolean;
22
+ /** 是否展示卡片名称 */
23
+ showName?: boolean;
24
+ /** 是否展示店铺名称 */
25
+ showStoreName?: boolean;
26
+ /** 是否展示核销金额 */
27
+ showRedeem?: boolean;
28
+ /** 是否展示余额 */
29
+ showBalance?: boolean;
30
+ /** 是否展示编码 */
31
+ showCode?: boolean;
32
+ /** 是否展示到期时间 */
33
+ showValidDate?: boolean;
34
+ /** 是否展示详情按钮 */
35
+ showDetail?: boolean;
36
+ /** 是否展示二维码 */
37
+ showQrCode?: boolean;
38
+ /** 是否展示封面图 */
39
+ showCover?: boolean;
40
+ /** 是否余额货币单位 */
41
+ showBalanceSymbol?: boolean;
42
+ /** 卡片大小 */
43
+ type?: 'default' | 'mini';
44
+ /** 展示操作按钮 */
45
+ showActions?: boolean;
46
+ /** 操作按钮配置 */
47
+ actions?: {
48
+ /** 按钮展示方式 */
49
+ layout: 'expanded' | 'collapsed';
50
+ /** detail 按钮配置 */
51
+ detail?: {
52
+ visible: boolean;
53
+ iconColor: string;
54
+ };
55
+ /** edit按钮配置 */
56
+ edit?: {
57
+ visible: boolean;
58
+ iconColor: string;
59
+ dialogTitle: string;
60
+ enableDialog: boolean;
61
+ fields: {
62
+ name: string;
63
+ label: string;
64
+ };
65
+ };
66
+ };
67
+ /** 编辑编辑按钮后,弹窗展示之前 */
68
+ beforeEdit?: (value: any, index: number) => Promise<any> | boolean | void;
69
+ /** 编辑弹窗点击提交 */
70
+ onConfirmEdit?: (value: any, index: number) => void;
71
+ /** 是否展示状态标识 */
72
+ showStatus?: boolean;
73
+ /** 名称标题字号字重颜色配置 */
74
+ nameTitleStyle?: {
75
+ fontSize: number;
76
+ fontWeight: number;
77
+ color: string;
78
+ };
79
+ /** 开启编辑金额 */
80
+ enableEditAmount?: boolean;
81
+ /** 编辑金额事件 */
82
+ onConfirmEditAmount?: (value: string, index: number) => void;
83
+ /** 是否使用外部详情处理 */
84
+ useExternalDetail?: boolean;
85
+ /** 详情事件 */
86
+ onDetail?: (value: any, index: number) => void;
87
+ /** 自定义余额格式化函数,如果提供则优先使用 */
88
+ formatBalance?: (balance?: number, option?: FormatOption) => React.ReactNode;
89
+ /** 自定义余额标题格式化函数,如果提供则优先使用 */
90
+ formatBalanceTitle?: (balanceTitle?: string, option?: FormatOption) => React.ReactNode;
91
+ /** 自定义使用金额格式化函数,如果提供则优先使用 */
92
+ formatRedeem?: (redeem?: number, option?: FormatOption) => React.ReactNode;
93
+ /** 自定义使用金额标题格式化函数,如果提供则优先使用 */
94
+ formatRedeemTitle?: (redeemTitle?: string, option?: FormatOption) => React.ReactNode;
95
+ }
96
+ declare const _default: React.NamedExoticComponent<PisellCardListProps>;
97
+ export default _default;
@@ -45,7 +45,9 @@ var PisellCardList = function PisellCardList(props) {
45
45
  useExternalDetail = props.useExternalDetail,
46
46
  onDetail = props.onDetail,
47
47
  formatBalance = props.formatBalance,
48
- formatBalanceTitle = props.formatBalanceTitle;
48
+ formatBalanceTitle = props.formatBalanceTitle,
49
+ formatRedeem = props.formatRedeem,
50
+ formatRedeemTitle = props.formatRedeemTitle;
49
51
  return data.length ? /*#__PURE__*/React.createElement(PisellCheckboxGroup, {
50
52
  options: data,
51
53
  value: value,
@@ -100,7 +102,9 @@ var PisellCardList = function PisellCardList(props) {
100
102
  type: type,
101
103
  style: direction === 'vertical' || direction === 'horizontal' && fullWidth ? {
102
104
  width: '100%'
103
- } : {}
105
+ } : {},
106
+ formatRedeem: formatRedeem || (item === null || item === void 0 ? void 0 : item.formatRedeem),
107
+ formatRedeemTitle: formatRedeemTitle || (item === null || item === void 0 ? void 0 : item.formatRedeemTitle)
104
108
  }));
105
109
  }
106
110
  }) : showEmpty && (empty || /*#__PURE__*/React.createElement(PisellEmpty, null));
@@ -0,0 +1,38 @@
1
+ import React from 'react';
2
+ import { PisellContextType } from '../pisell-config-provider/context';
3
+ import './index.less';
4
+ export interface PisellCheckboxGroupOption {
5
+ label: string;
6
+ value: string;
7
+ disabled?: boolean;
8
+ error?: boolean;
9
+ [key: string]: any;
10
+ }
11
+ declare type PisellCheckboxGroupValue = string | string[] | any;
12
+ export interface PisellCheckboxGroupProps extends React.HTMLAttributes<HTMLDivElement> {
13
+ platform?: PisellContextType['platform'];
14
+ direction?: 'horizontal' | 'vertical';
15
+ fullWidth?: boolean;
16
+ gap?: number;
17
+ padding?: number;
18
+ options: PisellCheckboxGroupOption[];
19
+ onChange?: (value: PisellCheckboxGroupValue, item: PisellCheckboxGroupOption) => void;
20
+ value?: PisellCheckboxGroupValue;
21
+ renderOption?: (option: PisellCheckboxGroupOption, active: boolean, index: number) => React.ReactNode;
22
+ rowKey?: string;
23
+ mode?: 'multiple' | 'single';
24
+ iconPosition?: 'left' | 'right' | 'hide';
25
+ optionClassName?: string;
26
+ optionActiveClassName?: string;
27
+ onChangeDebounce?: boolean;
28
+ }
29
+ /**
30
+ * @title: PisellCheckboxGroup
31
+ * @description: 选中组件
32
+ * @param {PisellCheckboxGroupProps} props
33
+ * @return {*}
34
+ * @Author: zhiwei.Wang
35
+ * @Date: 2024-08-16 10:34
36
+ */
37
+ declare const PisellCheckboxGroup: (props: PisellCheckboxGroupProps) => JSX.Element;
38
+ export default PisellCheckboxGroup;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import { EmptyProps } from 'antd';
3
+ import { PisellContextType } from '../pisell-config-provider/context';
4
+ import './index.less';
5
+ export interface PisellEmptyProps extends EmptyProps {
6
+ /** 平台 */
7
+ platform?: PisellContextType['platform'];
8
+ /** 额外内容描述 */
9
+ extraDescription?: React.ReactNode;
10
+ /** 额外内容描述 */
11
+ icon?: React.ReactNode;
12
+ /** 自定义底部额外操作区域 */
13
+ footer?: React.ReactNode;
14
+ /** 最大宽度 */
15
+ maxWidth?: number;
16
+ [key: string]: any;
17
+ }
18
+ declare const PisellEmpty: (props: PisellEmptyProps) => JSX.Element;
19
+ export default PisellEmpty;
@@ -122,6 +122,10 @@ export interface PisellWalletPassCardProps {
122
122
  formatBalance?: (balance?: number, option?: FormatOption) => React.ReactNode;
123
123
  /** 自定义余额标题格式化函数,如果提供则优先使用 */
124
124
  formatBalanceTitle?: (balanceTitle?: string, option?: FormatOption) => React.ReactNode;
125
+ /** 自定义使用金额格式化函数,如果提供则优先使用 */
126
+ formatRedeem?: (redeem?: number, option?: FormatOption) => React.ReactNode;
127
+ /** 自定义使用金额标题格式化函数,如果提供则优先使用 */
128
+ formatRedeemTitle?: (redeemTitle?: string, option?: FormatOption) => React.ReactNode;
125
129
  [key: string]: any;
126
130
  }
127
131
  declare const PisellWalletPassCard: (props: PisellWalletPassCardProps) => JSX.Element;
@@ -136,7 +136,9 @@ var PisellWalletPassCard = function PisellWalletPassCard(props) {
136
136
  cardStatus = props.cardStatus,
137
137
  nameTitleStyle = props.nameTitleStyle,
138
138
  formatBalance = props.formatBalance,
139
- formatBalanceTitle = props.formatBalanceTitle;
139
+ formatBalanceTitle = props.formatBalanceTitle,
140
+ formatRedeem = props.formatRedeem,
141
+ formatRedeemTitle = props.formatRedeemTitle;
140
142
  useEffect(function () {
141
143
  document.body.id = 'body';
142
144
  }, []);
@@ -437,6 +439,27 @@ var PisellWalletPassCard = function PisellWalletPassCard(props) {
437
439
  showCurrencySymbol: showBalanceSymbol
438
440
  });
439
441
  };
442
+
443
+ // 创建原始 redeem 标题 DOM 的辅助函数
444
+ var createOriginalRedeemTitleDom = function createOriginalRedeemTitleDom() {
445
+ return /*#__PURE__*/React.createElement("span", {
446
+ className: "pisell-card-amount-item-label-text"
447
+ }, formatRedeemTitle ? formatRedeemTitle(redeemTitle, {
448
+ originDom: /*#__PURE__*/React.createElement(React.Fragment, null, redeemTitle || getText('pisell-wallet-pass-card-redeem')),
449
+ active: active,
450
+ data: props
451
+ }) : redeemTitle || getText('pisell-wallet-pass-card-redeem'), isMini ? ': ' : '');
452
+ };
453
+
454
+ // 创建原始 redeem DOM 的辅助函数
455
+ var createOriginalRedeemDom = function createOriginalRedeemDom() {
456
+ return /*#__PURE__*/React.createElement(Amount, {
457
+ className: "pisell-card-amount-item-value",
458
+ useThousandsSeparator: true,
459
+ value: redeem,
460
+ onClick: handleEditAmount
461
+ });
462
+ };
440
463
  var renderBalanceInfo = function renderBalanceInfo() {
441
464
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
442
465
  className: "pisell-card-amount-wrap"
@@ -445,17 +468,14 @@ var PisellWalletPassCard = function PisellWalletPassCard(props) {
445
468
  }, /*#__PURE__*/React.createElement("div", {
446
469
  className: "pisell-card-amount-item-label",
447
470
  onClick: handleEditAmount
448
- }, enableEditAmount && /*#__PURE__*/React.createElement(Iconfont, {
471
+ }, enableEditAmount && active && /*#__PURE__*/React.createElement(Iconfont, {
449
472
  type: "pisell2-edit-05",
450
473
  className: "pisell-card-amount-item-label-icon"
451
- }), /*#__PURE__*/React.createElement("span", {
452
- className: "pisell-card-amount-item-label-text"
453
- }, redeemTitle || getText('pisell-wallet-pass-card-redeem'), isMini ? ': ' : '')), /*#__PURE__*/React.createElement(Amount, {
454
- className: "pisell-card-amount-item-value",
455
- useThousandsSeparator: true,
456
- value: redeem,
457
- onClick: handleEditAmount
458
- })), showBalance && /*#__PURE__*/React.createElement("div", {
474
+ }), createOriginalRedeemTitleDom()), formatRedeem ? formatRedeem(redeem, {
475
+ originDom: createOriginalRedeemDom(),
476
+ active: active,
477
+ data: props
478
+ }) : createOriginalRedeemDom()), showBalance && /*#__PURE__*/React.createElement("div", {
459
479
  className: "pisell-card-amount-item pisell-wallet-pass-card-balance"
460
480
  }, createOriginalBalanceTitleDom(), formatBalance ? formatBalance(balance, {
461
481
  originDom: createOriginalBalanceDom(),
@@ -228,7 +228,7 @@
228
228
 
229
229
  .pisell-card-amount-item-label,
230
230
  .pisell-card-amount-item-value {
231
- color: var(--Primary-600, #7f56d9);
231
+ color: var(--Gray-500, #667085);
232
232
  font-style: normal;
233
233
  font-weight: 600;
234
234
  }
@@ -237,13 +237,18 @@
237
237
  }
238
238
  .pisell-card-amount-item-value {
239
239
  font-size: 20px;
240
- text-decoration: underline;
241
240
  }
242
241
  }
243
242
 
244
243
  &.active {
245
244
  .pisell-wallet-pass-card-redeem {
246
- visibility: visible;
245
+ .pisell-card-amount-item-label,
246
+ .pisell-card-amount-item-value {
247
+ color: var(--Primary-600, #7f56d9);
248
+ }
249
+ .pisell-card-amount-item-value {
250
+ text-decoration: underline;
251
+ }
247
252
  }
248
253
  }
249
254
 
@@ -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) => string | number;
20
+ export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;
@@ -0,0 +1,3 @@
1
+ import './index.less';
2
+ declare const Actions: ({ children, style }: any) => JSX.Element | null;
3
+ export default Actions;
@@ -0,0 +1,3 @@
1
+ import './index.less';
2
+ declare const DeleteButton: ({ onDelete, type }: any) => JSX.Element;
3
+ export default DeleteButton;
@@ -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) => string | number;
20
+ export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;
@@ -0,0 +1,3 @@
1
+ import './index.less';
2
+ declare const SelectHolder: ({ lists, value, onChange, holderMode, isShowAddHolderButton, onAddHolder, addHolderButtonText, onClearHolder, isErrorHolder, allowClear, holderMaxCount, }: any) => JSX.Element;
3
+ export default SelectHolder;
@@ -0,0 +1,18 @@
1
+ import './index.less';
2
+ interface ResourceItem {
3
+ id: string | number;
4
+ label: string;
5
+ isError?: boolean;
6
+ [key: string]: any;
7
+ }
8
+ interface SelectResourceProps {
9
+ lists: ResourceItem[];
10
+ value: any;
11
+ onChange: (val: any) => void;
12
+ resourceMode?: 'multiple' | 'tags' | undefined;
13
+ maxLength?: number;
14
+ isParallelResource?: boolean;
15
+ [key: string]: any;
16
+ }
17
+ declare const SelectResource: ({ lists, value, onChange, resourceMode, allowClear, onClearResource, maxLength, isErrorResource, resourceErrorText, ...props }: SelectResourceProps) => JSX.Element;
18
+ export default SelectResource;
@@ -0,0 +1,3 @@
1
+ import './index.less';
2
+ declare const Time: ({ item, isShowHolder, onLike, isShowChangeResource, changeResource, changeHolder, isShowChangeHolder, holderMode, onAddHolder, isShowAddHolderButton, onClearHolder, onClearResource, }: any) => JSX.Element | null;
3
+ export default Time;
@@ -0,0 +1,7 @@
1
+ import { ExportImportType } from '../../../types';
2
+ import './index.less';
3
+ declare type ExportImportProps = {
4
+ exportImport: ExportImportType;
5
+ };
6
+ declare const ExportImport: ({ exportImport }: ExportImportProps) => JSX.Element;
7
+ export default ExportImport;
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import { GallerySettingType, GallerySettingValueType } from "../../../types";
3
+ import "./index.less";
4
+ declare type GalleryItemProps = {
5
+ record: Record<string, any>;
6
+ gallery: GallerySettingType;
7
+ columnsMap: Map<string, Record<string, any>>;
8
+ index: number;
9
+ gallerySetting: GallerySettingValueType;
10
+ columns: Record<string, any>[];
11
+ onClick: React.MouseEventHandler<HTMLDivElement>;
12
+ };
13
+ declare const GalleryItem: (props: GalleryItemProps) => JSX.Element;
14
+ export default GalleryItem;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { GalleryProps } from './types';
3
+ import './index.less';
4
+ declare const _default: React.MemoExoticComponent<(props: GalleryProps) => JSX.Element>;
5
+ export default _default;
@@ -197,12 +197,12 @@ export declare const fieldList: ({
197
197
  field_icon: string;
198
198
  field_name: string;
199
199
  field_type: string;
200
- default_value: boolean;
200
+ default_value: string;
201
201
  } | {
202
202
  field_icon: string;
203
203
  field_name: string;
204
204
  field_type: string;
205
- default_value: string;
205
+ default_value: boolean;
206
206
  } | {
207
207
  field_icon: string;
208
208
  field_name: string;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ declare const _default: React.NamedExoticComponent<any>;
4
+ export default _default;
@@ -0,0 +1,173 @@
1
+ import { GroupValue } from "../Actions/component/Group/PopoverContent";
2
+ import { FilterItemProps, FilterType } from "../../filter/types";
3
+ import { ColumnSettingType, DataSourceGroupType, GallerySettingValueType, ModeType, SortType } from "../types";
4
+ export declare const getHash: (obj: any) => any;
5
+ export declare const calcFilterSort: ({ dataSource, filter, sort, columns }: any) => any;
6
+ /**
7
+ * 合并列设置
8
+ * @param defaultColumns 默认列设置
9
+ * @param tableId 表ID
10
+ * @returns 合并后的列设置
11
+ */
12
+ export declare const mergeColumnSetting: ({ columns, tableId, currentViewMode, }: {
13
+ columns: Record<string, any>[];
14
+ tableId?: string | undefined;
15
+ currentViewMode: ModeType;
16
+ }) => {
17
+ isShow: boolean;
18
+ }[] | ({
19
+ width: any;
20
+ isShow: any;
21
+ sortIndex: number;
22
+ } | {
23
+ isShow: boolean;
24
+ sortIndex: number;
25
+ })[];
26
+ /**
27
+ * 对数据源进行排序
28
+ * @param dataSource 数据源数组
29
+ * @param sortObj 排序对象,包含排序的键、值和类型
30
+ * @returns 排序后的数据源数组
31
+ */
32
+ export declare const sortDataSource: (dataSource: Record<string, any>[], sortObj: {
33
+ sortKey: string;
34
+ sortValue: "asc" | "desc";
35
+ sortType: "date" | "string" | "number";
36
+ }) => Record<string, any>[];
37
+ /**
38
+ * 根据行键获取 ID
39
+ * @param item 记录对象
40
+ * @param rowKey 行键,可以是字符串或函数
41
+ * @returns 返回 ID
42
+ */
43
+ export declare const getIdByRowKey: (item: Record<string, any>, rowKey: string | ((params: any) => string)) => any;
44
+ /**
45
+ * 根据分组条件对数据源进行分组
46
+ * @param dataSource 数据源
47
+ * @param group 分组条件
48
+ * @param rowKey 行键生成函数或字符串
49
+ * @returns 返回分组后的数据源
50
+ */
51
+ export declare const groupDataSource: (dataSource: Record<string, any>[], group: GroupValue, rowKey: string | ((params: any) => string)) => Record<string, any>[];
52
+ declare type ViewSetting = {
53
+ order_by: string;
54
+ group_by: GroupValue;
55
+ column_setting: Record<string, any>[];
56
+ gallery_setting: GallerySettingValueType;
57
+ filters: any;
58
+ filter_setting: {
59
+ quickFilter: FilterItemProps[];
60
+ otherFilter: FilterItemProps[];
61
+ };
62
+ };
63
+ /**
64
+ * 本地存储的表格设置对象
65
+ */
66
+ declare type TableSettingObjType = {
67
+ view_mode: ModeType;
68
+ currentSettingHash: string;
69
+ } & {
70
+ [K in ModeType]: ViewSetting;
71
+ };
72
+ /**
73
+ * 将表格设置保存到本地存储
74
+ * @param tableId 表格id
75
+ * @param tableSettingObj 表格设置对象
76
+ */
77
+ export declare const setTableSettingToLocalStorage: ({ tableId, tableSettingObj, currentViewMode, currentSettingHash, }: {
78
+ tableId: string;
79
+ tableSettingObj: Partial<ViewSetting & {
80
+ view_mode: ModeType;
81
+ }>;
82
+ currentViewMode: ModeType;
83
+ currentSettingHash: string;
84
+ }) => {
85
+ key: string;
86
+ value: Record<string, any>;
87
+ } | undefined;
88
+ export declare const clearTableSettingToLocalStorage: (tableId?: string) => void;
89
+ /**
90
+ * 从本地存储中获取表格设置, 全部配置
91
+ * @param tableId 表格ID
92
+ * @returns 表格设置对象
93
+ */
94
+ export declare const getTableSettingFromLocalStorage: (tableId?: string) => Partial<TableSettingObjType>;
95
+ /**
96
+ * 从LocalStorage读取表当前视图模式
97
+ * @param tableId
98
+ */
99
+ export declare const getCurrentViewModeFromLocalStorage: (tableId?: string) => ModeType | undefined;
100
+ /**
101
+ * 根据视图模式获取配置
102
+ * @param tableId
103
+ * @param currentViewMode
104
+ */
105
+ export declare const getTableSettingByCurrentViewMode: (tableId: string, currentViewMode: ModeType) => ViewSetting | undefined;
106
+ /**
107
+ * 将表单值保存到本地存储中
108
+ * @param tableId 表单ID
109
+ * @param allValues 表单所有值
110
+ * @param keys 存储的键名
111
+ */
112
+ export declare const setFormValuesToLocalStorage: ({ tableId, allValues, keys, currentViewMode, currentSettingHash, }: {
113
+ tableId?: string | undefined;
114
+ allValues?: Record<string, any> | undefined;
115
+ keys?: string[] | undefined;
116
+ currentViewMode: ModeType;
117
+ currentSettingHash: string;
118
+ }) => {
119
+ key: string;
120
+ value: Record<string, any>;
121
+ } | undefined;
122
+ /**
123
+ * 获取表格键值
124
+ * @param tableId 表格ID
125
+ * @returns 返回格式化后的表格键值
126
+ */
127
+ export declare const getTableKey: (tableId: string) => string;
128
+ /**
129
+ * 合并筛选设置
130
+ * @param list 列表数据
131
+ * @param quickFilterMaxLength 快速筛选最大长度
132
+ * @param tableId 表ID
133
+ * @returns 返回合并后的筛选设置
134
+ */
135
+ export declare const mergeFilterSetting: ({ list, quickFilterMaxLength, tableId, sortButtonShow, currentViewMode, }: {
136
+ list: FilterItemProps[];
137
+ quickFilterMaxLength: number;
138
+ tableId?: string | undefined;
139
+ sortButtonShow: boolean;
140
+ currentViewMode: ModeType;
141
+ }) => {
142
+ quickFilter: FilterItemProps[];
143
+ otherFilter: FilterItemProps[];
144
+ notSortFilter: FilterItemProps[];
145
+ };
146
+ /**
147
+ * 过滤数据源
148
+ * @param dataSource 数据源
149
+ * @param filters 过滤条件
150
+ * @param filterLocalArr 本地过滤项
151
+ * @returns 过滤后的数据源
152
+ */
153
+ export declare const filterDataSource: (dataSource: Record<string, any>[], filters: Record<string, any>, filterLocalArr: FilterItemProps[]) => Record<string, any>[];
154
+ /**
155
+ * 根据模式获取设置键数组
156
+ * @param filter 筛选器
157
+ * @param columnSetting 列设置
158
+ * @param dataSourceGroup 数据源分组
159
+ * @param sort 排序
160
+ * @param mode 模式,可选值为 "localStorage" 或 "remote"
161
+ * @returns 返回设置键数组
162
+ */
163
+ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourceGroup, sort, mode, currentViewMode, }: {
164
+ filter?: FilterType | undefined;
165
+ columnSetting?: ColumnSettingType | undefined;
166
+ dataSourceGroup?: DataSourceGroupType | undefined;
167
+ sort?: SortType | undefined;
168
+ mode: "" | "localStorage" | "remote";
169
+ currentViewMode: ModeType;
170
+ }) => ("filter_setting" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
171
+ export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
172
+ export declare const stringify: (obj: Record<string, any>) => string;
173
+ export {};
@@ -0,0 +1,22 @@
1
+ import { FilterType } from "../../filter/types";
2
+ import { ColumnSettingType, DataSourceGroupType, GallerySettingType, GridViewType, ModeType, SortType, ExportImportModeType } from "../types";
3
+ declare type UseTableSettingProps = {
4
+ tableId?: string;
5
+ filter: FilterType;
6
+ columns: Record<string, any>[];
7
+ columnSetting?: ColumnSettingType;
8
+ dataSourceGroup?: DataSourceGroupType;
9
+ sort?: SortType;
10
+ view: GridViewType;
11
+ currentViewMode: ModeType;
12
+ gallery?: GallerySettingType;
13
+ currentSettingHash: string;
14
+ exportImport?: ExportImportModeType;
15
+ };
16
+ declare const useTableSetting: (params: UseTableSettingProps) => {
17
+ setTableSetting: (values: Record<string, any>) => void;
18
+ tableSetting: {
19
+ [x: string]: any;
20
+ };
21
+ };
22
+ export default useTableSetting;
@@ -0,0 +1,12 @@
1
+ import { FormInstance } from "antd/es/form";
2
+ import { FilterType } from "../../filter/types";
3
+ declare type UseTransDataSourceParams = {
4
+ form: FormInstance;
5
+ localPagination: boolean;
6
+ dataSource: Record<string, any>[];
7
+ rowKey: string | ((params: any) => string);
8
+ filter: FilterType;
9
+ currentView: 'gallery' | 'table';
10
+ };
11
+ declare const useTransDataSource: (params: UseTransDataSourceParams) => Record<string, any>[];
12
+ export default useTransDataSource;