@pisell/materials 6.2.38 → 6.2.40

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 (137) 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 +7 -7
  6. package/build/lowcode/preview.js +7 -7
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +36 -21
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +35 -20
  11. package/es/components/dataSourceComponents/dataSourceTable/BaseTable.js +11 -4
  12. package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
  13. package/es/components/dataSourceComponents/dataSourceTable/filter/index.js +7 -2
  14. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  15. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +33 -15
  16. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +2 -1
  17. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +92 -6
  18. package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +5 -0
  19. package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  20. package/es/components/dataSourceComponents/fields/Upload/BaseUpload.js +199 -19
  21. package/es/components/dataSourceComponents/fields/Upload/CameraPopover.js +66 -0
  22. package/es/components/dataSourceComponents/fields/Upload/index.less +35 -3
  23. package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  24. package/es/components/dataSourceComponents/fields/index.d.ts +8 -8
  25. package/es/components/filter/types.d.ts +2 -0
  26. package/es/components/pisellCamera/index.js +228 -0
  27. package/es/components/pisellCamera/index.less +131 -0
  28. package/es/components/pisellCardList/index.js +3 -1
  29. package/es/components/pisellCheckboxGroup/index.js +15 -1
  30. package/es/components/pisellWalletPassCard/index.d.ts +1 -0
  31. package/es/components/pisellWalletPassCard/index.js +6 -1
  32. package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +2 -1
  33. package/es/components/productCard/cartSkuCard/components/swipeAction/index.js +74 -6
  34. package/es/components/productCard/cartSkuCard/components/swipeAction/index.less +39 -0
  35. package/es/components/productCard/cartSkuCard/index.js +2 -11
  36. package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  37. package/es/components/table/Table/fields/index.d.ts +2 -2
  38. package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  39. package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  40. package/es/components/table/Table/utils.d.ts +1 -1
  41. package/es/components/table/Table/utils.js +22 -1
  42. package/es/components/table/hooks/useTableSetting.d.ts +3 -4
  43. package/es/components/table/hooks/useTableSetting.js +113 -5
  44. package/es/components/table/index.js +14 -3
  45. package/es/components/table/types.d.ts +17 -0
  46. package/es/components/walletCard/Guide/index.js +12 -1
  47. package/es/components/walletCard/index.js +29 -3
  48. package/es/components/walletCard/index.less +27 -0
  49. package/es/locales/en-US.js +83 -69
  50. package/es/locales/zh-CN.js +84 -70
  51. package/es/locales/zh-TW.js +84 -70
  52. package/es/utils/index.d.ts +1 -1
  53. package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.js +8 -2
  54. package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
  55. package/lib/components/dataSourceComponents/dataSourceTable/filter/index.js +7 -2
  56. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  57. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +20 -7
  58. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +2 -1
  59. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +78 -7
  60. package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +5 -0
  61. package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  62. package/lib/components/dataSourceComponents/fields/Upload/BaseUpload.js +168 -5
  63. package/lib/components/dataSourceComponents/fields/Upload/CameraPopover.js +95 -0
  64. package/lib/components/dataSourceComponents/fields/Upload/index.less +35 -3
  65. package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  66. package/lib/components/dataSourceComponents/fields/index.d.ts +8 -8
  67. package/lib/components/filter/types.d.ts +2 -0
  68. package/lib/components/pisellCamera/index.js +222 -0
  69. package/lib/components/pisellCamera/index.less +131 -0
  70. package/lib/components/pisellCardList/index.js +3 -1
  71. package/lib/components/pisellCheckboxGroup/index.js +16 -0
  72. package/lib/components/pisellWalletPassCard/index.d.ts +1 -0
  73. package/lib/components/pisellWalletPassCard/index.js +9 -1
  74. package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +2 -1
  75. package/lib/components/productCard/cartSkuCard/components/swipeAction/index.js +45 -11
  76. package/lib/components/productCard/cartSkuCard/components/swipeAction/index.less +39 -0
  77. package/lib/components/productCard/cartSkuCard/index.js +2 -13
  78. package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  79. package/lib/components/table/Table/fields/index.d.ts +2 -2
  80. package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  81. package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  82. package/lib/components/table/Table/utils.d.ts +1 -1
  83. package/lib/components/table/Table/utils.js +18 -1
  84. package/lib/components/table/hooks/useTableSetting.d.ts +3 -4
  85. package/lib/components/table/hooks/useTableSetting.js +114 -4
  86. package/lib/components/table/index.js +12 -1
  87. package/lib/components/table/types.d.ts +17 -0
  88. package/lib/components/walletCard/Guide/index.js +11 -1
  89. package/lib/components/walletCard/index.js +27 -3
  90. package/lib/components/walletCard/index.less +27 -0
  91. package/lib/locales/en-US.js +15 -1
  92. package/lib/locales/zh-CN.js +15 -1
  93. package/lib/locales/zh-TW.js +15 -1
  94. package/lib/utils/index.d.ts +1 -1
  95. package/lowcode/data-source-table/meta.ts +358 -66
  96. package/lowcode/form-item-upload/meta.ts +20 -5
  97. package/lowcode/pisell-upload/meta.ts +8 -0
  98. package/lowcode/pisell-wallet-pass-card/meta.ts +19 -0
  99. package/lowcode/table/meta.ts +104 -0
  100. package/lowcode/wallet-card/meta.ts +81 -63
  101. package/package.json +2 -1
  102. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +0 -98
  103. package/es/components/dataSourceComponents/fields/Upload/type.d.ts +0 -37
  104. package/es/components/pisell-config-provider/context.d.ts +0 -20
  105. package/es/components/pisell-config-provider/index.d.ts +0 -12
  106. package/es/components/pisellAdjustPrice/index.d.ts +0 -4
  107. package/es/components/pisellAdjustPrice/type.d.ts +0 -20
  108. package/es/components/pisellCheckboxGroup/index.d.ts +0 -36
  109. package/es/components/pisellQRScanner/index.d.ts +0 -37
  110. package/es/components/pisellText/components/Amount/index.d.ts +0 -20
  111. package/es/components/table/Table/AddFieldModal/index.d.ts +0 -3
  112. package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -11
  113. package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +0 -21
  114. package/es/components/virtual-keyboard/Number/index.d.ts +0 -5
  115. package/es/components/virtual-keyboard/Number/types.d.ts +0 -25
  116. package/es/components/walletCard/index.d.ts +0 -67
  117. package/es/locales/en-US.d.ts +0 -278
  118. package/es/locales/zh-CN.d.ts +0 -273
  119. package/es/locales/zh-TW.d.ts +0 -273
  120. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +0 -98
  121. package/lib/components/dataSourceComponents/fields/Upload/type.d.ts +0 -37
  122. package/lib/components/pisell-config-provider/context.d.ts +0 -20
  123. package/lib/components/pisell-config-provider/index.d.ts +0 -12
  124. package/lib/components/pisellAdjustPrice/index.d.ts +0 -4
  125. package/lib/components/pisellAdjustPrice/type.d.ts +0 -20
  126. package/lib/components/pisellCheckboxGroup/index.d.ts +0 -36
  127. package/lib/components/pisellQRScanner/index.d.ts +0 -37
  128. package/lib/components/pisellText/components/Amount/index.d.ts +0 -20
  129. package/lib/components/table/Table/AddFieldModal/index.d.ts +0 -3
  130. package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -11
  131. package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +0 -21
  132. package/lib/components/virtual-keyboard/Number/index.d.ts +0 -5
  133. package/lib/components/virtual-keyboard/Number/types.d.ts +0 -25
  134. package/lib/components/walletCard/index.d.ts +0 -67
  135. package/lib/locales/en-US.d.ts +0 -278
  136. package/lib/locales/zh-CN.d.ts +0 -273
  137. package/lib/locales/zh-TW.d.ts +0 -273
@@ -1,50 +1,50 @@
1
1
  export default {
2
- "table-filter-search": "搜索",
3
- "table-filter-clear": "清除",
4
- "table-filter-filter": "篩選",
5
- "table-filter-min": "最小",
6
- "table-filter-max": "最大",
7
- "table-pagination-previous": "上一頁",
8
- "table-pagination-next": "下一頁",
9
- "table-pagination-total": function tablePaginationTotal(current, total) {
2
+ 'table-filter-search': '搜索',
3
+ 'table-filter-clear': '清除',
4
+ 'table-filter-filter': '篩選',
5
+ 'table-filter-min': '最小',
6
+ 'table-filter-max': '最大',
7
+ 'table-pagination-previous': '上一頁',
8
+ 'table-pagination-next': '下一頁',
9
+ 'table-pagination-total': function tablePaginationTotal(current, total) {
10
10
  return "\u7B2C".concat(current, "\u9801 \u5171").concat(total, "\u9801");
11
11
  },
12
- "select-dropdown-render-select-all": "全選",
13
- "select-dropdown-render-search": "搜索",
14
- "sort-button-text": "排序",
15
- "sort-oldest-to-newest": "從舊到新",
16
- "sort-newest-to-oldest": "從新到舊",
17
- "sort-a-z": "A 到 Z",
18
- "sort-z-a": "Z 到 A",
19
- "sort-from-morning-to-night": "從早到晚",
20
- "sort-from-evening-to-morning": "從晚到早",
21
- "sort-0-9": "0 ~ 9",
22
- "sort-9-0": "9 ~ 0",
23
- "table-action-filter-button": "篩選",
24
- "table-action-filter-quick-filter": "快速篩選",
25
- "table-action-filter-quick-filter-tip": function tableActionFilterQuickFilterTip(count) {
12
+ 'select-dropdown-render-select-all': '全選',
13
+ 'select-dropdown-render-search': '搜索',
14
+ 'sort-button-text': '排序',
15
+ 'sort-oldest-to-newest': '從舊到新',
16
+ 'sort-newest-to-oldest': '從新到舊',
17
+ 'sort-a-z': 'A 到 Z',
18
+ 'sort-z-a': 'Z 到 A',
19
+ 'sort-from-morning-to-night': '從早到晚',
20
+ 'sort-from-evening-to-morning': '從晚到早',
21
+ 'sort-0-9': '0 ~ 9',
22
+ 'sort-9-0': '9 ~ 0',
23
+ 'table-action-filter-button': '篩選',
24
+ 'table-action-filter-quick-filter': '快速篩選',
25
+ 'table-action-filter-quick-filter-tip': function tableActionFilterQuickFilterTip(count) {
26
26
  return "\u5728\u9801\u9762\u4E0A\u76F4\u63A5\u555F\u7528\u5FEB\u901F\u7BE9\u9078\uFF0C\u4EE5\u4FBF\u9032\u884C\u65B9\u4FBF\u7684\u7BE9\u9078\u64CD\u4F5C\uFF0C\u6700\u591A\u5141\u8A31\u4F7F\u7528".concat(count, "\u500B\u7BE9\u9078\u5668\u3002");
27
27
  },
28
- "table-action-filter-other-filter": "篩選",
29
- "table-action-filter-other-filter-tip": function tableActionFilterOtherFilterTip() {
30
- return "在清單中選擇篩選條件進行篩選操作,並顯示對應的結果。";
28
+ 'table-action-filter-other-filter': '篩選',
29
+ 'table-action-filter-other-filter-tip': function tableActionFilterOtherFilterTip() {
30
+ return '在清單中選擇篩選條件進行篩選操作,並顯示對應的結果。';
31
31
  },
32
- "table-action-group-by-title": "分組條件",
33
- "table-action-group-by-title-tip": "請從下拉式選單中選擇要分組的字段,以便更好地組織和瀏覽數據。",
34
- "table-action-column-title": "表頭設置",
35
- "table-column-group-records": "條記錄",
36
- "table-column-group-lock-tip": "固定列不可移動順序",
37
- "table-column-drag-sort-disabled-tip": "已開啟自動排序,無法手動拖曳",
38
- "table-action-filter-no-filter": "沒有可用的篩選器。",
39
- "table-action-range-picker-presets-today": "今天",
40
- "table-action-range-picker-presets-yesterday": "昨天",
41
- "table-action-range-picker-presets-last-3-day": "過去3天",
42
- "table-action-range-picker-presets-last-7-day": "過去7天",
43
- "table-action-range-picker-presets-last-14-day": "過去14天",
44
- "table-action-range-picker-presets-last-30-day": "過去30天",
45
- "table-action-range-picker-presets-last-90-day": "過去90天",
46
- "virtual-keyboard-time-now": "此刻",
47
- "virtual-keyboard-time-ok": "確定",
32
+ 'table-action-group-by-title': '分組條件',
33
+ 'table-action-group-by-title-tip': '請從下拉式選單中選擇要分組的字段,以便更好地組織和瀏覽數據。',
34
+ 'table-action-column-title': '表頭設置',
35
+ 'table-column-group-records': '條記錄',
36
+ 'table-column-group-lock-tip': '固定列不可移動順序',
37
+ 'table-column-drag-sort-disabled-tip': '已開啟自動排序,無法手動拖曳',
38
+ 'table-action-filter-no-filter': '沒有可用的篩選器。',
39
+ 'table-action-range-picker-presets-today': '今天',
40
+ 'table-action-range-picker-presets-yesterday': '昨天',
41
+ 'table-action-range-picker-presets-last-3-day': '過去3天',
42
+ 'table-action-range-picker-presets-last-7-day': '過去7天',
43
+ 'table-action-range-picker-presets-last-14-day': '過去14天',
44
+ 'table-action-range-picker-presets-last-30-day': '過去30天',
45
+ 'table-action-range-picker-presets-last-90-day': '過去90天',
46
+ 'virtual-keyboard-time-now': '此刻',
47
+ 'virtual-keyboard-time-ok': '確定',
48
48
  'batch-editor-batch-edit': '批量編輯',
49
49
  'batch-editor-actions': '操作',
50
50
  'batch-editor-remove': '移除',
@@ -53,7 +53,7 @@ export default {
53
53
  'batch-editor-search': '搜索',
54
54
  'batch-editor-confirm': '確認',
55
55
  'batch-editor-batch-remove': '批量移除',
56
- 'batch-editor-what-price': "什麼價格",
56
+ 'batch-editor-what-price': '什麼價格',
57
57
  'batch-editor-quick-edit': '快速編輯',
58
58
  'batch-editor-quick-edit-title': function batchEditorQuickEditTitle(product, num) {
59
59
  return "\u60A8\u5DF2\u9078\u64C7 ".concat(product, " \u7B49").concat(num, "\u4EF6\u7522\u54C1");
@@ -131,7 +131,7 @@ export default {
131
131
  'date-picker-first_day_of_next_month': '下個月的第一天',
132
132
  'date-picker-last_day_of_last_month': '上個月的最後一天',
133
133
  'date-picker-invalid-date': '無效日期',
134
- "date-picker-apply": "确定",
134
+ 'date-picker-apply': '确定',
135
135
  'date-picker-shortcut-custom': '自定義',
136
136
  'pisell-input-copy-success': '復製成功',
137
137
  'pisell-input-copy': '復製',
@@ -155,14 +155,15 @@ export default {
155
155
  'pisell-wallet-pass-card-required': '此欄位為必填',
156
156
  'pisell-wallet-pass-card-expireDate': '長期',
157
157
  // 金额修改组件
158
- 'pisell-adjust-price-price-override': "一口價",
159
- 'pisell-adjust-price-discount': "折扣",
160
- 'pisell-adjust-price-discount-amount': "金額",
161
- 'pisell-adjust-price-discount-percentage': "百分比",
162
- 'pisell-adjust-price-total-after-discount': "打折后總價",
163
- 'pisell-adjust-price-discount-can-be-maximum': "折扣最高可達",
158
+ 'pisell-adjust-price-price-override': '一口價',
159
+ 'pisell-adjust-price-discount': '折扣',
160
+ 'pisell-adjust-price-discount-amount': '金額',
161
+ 'pisell-adjust-price-discount-percentage': '百分比',
162
+ 'pisell-adjust-price-total-after-discount': '打折后總價',
163
+ 'pisell-adjust-price-discount-can-be-maximum': '折扣最高可達',
164
164
  'pisell-discount-card-title': '折扣',
165
165
  'pisell-discount-card-unit': '折扣',
166
+ 'pisell-discount-card-fixed-amount-prefix': '立減',
166
167
  // 数据源表格
167
168
  'pisell-data-source-table-add': '添加',
168
169
  'pisell-data-source-table-edit': '編輯',
@@ -197,6 +198,7 @@ export default {
197
198
  'walletCard-done': '完成',
198
199
  'walletCard-qrcode': '二維碼',
199
200
  'walletCard-barcode': '條形碼',
201
+ 'walletCard-viewPin': '查看PIN',
200
202
  // 上传组件
201
203
  'pisell-upload-button': '上傳',
202
204
  'pisell-upload-setting-size-error': function pisellUploadSettingSizeError(maxSize) {
@@ -272,7 +274,7 @@ export default {
272
274
  'pisell-lowcode-app-version-control-new-version': '新版本',
273
275
  'pisell-lowcode-app-version-control-promote-to-live': '發布正式版',
274
276
  'pisell-lowcode-app-version-control-promote-version': function pisellLowcodeAppVersionControlPromoteVersion(version) {
275
- return "\u767C\u5E03\u7248\u672C ".concat(version || "", "?");
277
+ return "\u767C\u5E03\u7248\u672C ".concat(version || '', "?");
276
278
  },
277
279
  'pisell-lowcode-app-version-control-promote-version-describe': '您確定要發佈此版本嗎?',
278
280
  'pisell-lowcode-app-version-control-promote-version-ok': '發布',
@@ -284,27 +286,27 @@ export default {
284
286
  'pisell-lowcode-navigation-menu-add-sub-menu': '添加子菜單',
285
287
  'pisell-lowcode-navigation-menu-add-page': '添加頁面',
286
288
  'pisell-lowcode-navigation-menu-add-page-tip': '沒有找到導航, 請添加子菜單或頁面。',
287
- 'pisell-lowcode-navigation-menu-tag-base': "基础",
288
- 'pisell-lowcode-navigation-menu-tag-proCode': "Pro code",
289
- 'pisell-lowcode-navigation-menu-tag-pisell1': "Pisell 1.0",
290
- 'pisell-lowcode-navigation-menu-tag-group': "分組",
291
- 'pisell-lowcode-navigation-menu-tag-sub-menu': "子菜單",
292
- 'pisell-lowcode-navigation-menu-tag-custom': "自定義",
289
+ 'pisell-lowcode-navigation-menu-tag-base': '基础',
290
+ 'pisell-lowcode-navigation-menu-tag-proCode': 'Pro code',
291
+ 'pisell-lowcode-navigation-menu-tag-pisell1': 'Pisell 1.0',
292
+ 'pisell-lowcode-navigation-menu-tag-group': '分組',
293
+ 'pisell-lowcode-navigation-menu-tag-sub-menu': '子菜單',
294
+ 'pisell-lowcode-navigation-menu-tag-custom': '自定義',
293
295
  // 应用标识符
294
296
  'pisell-data-source-form-app-identifier-pattern': '只能包含小寫字母、數字、連字符、點和下劃線',
295
297
  'pisell-data-source-form-app-identifier-start-with-letter': '必須以字母開頭',
296
298
  'pisell-data-source-form-app-identifier-special-ends': '不能以連字符、點或下劃線結尾',
297
299
  'pisell-data-source-form-app-identifier-consecutive-special': '不能包含連續的連字符、點或下劃線',
298
300
  // QR Scanner 相關文案
299
- "qrscanner-loading": "正在識別二維碼...",
300
- "qrscanner-success": "識別成功: ",
301
- "qrscanner-success-qrcode": "二維碼識別成功: ",
302
- "qrscanner-success-barcode": "條形碼識別成功: ",
303
- "qrscanner-error-upload-image": "請上傳圖片文件",
304
- "qrscanner-error-load-failed": "讀取文件失敗",
305
- "qrscanner-error-no-code": "未檢測到二維碼或條形碼",
306
- "qrscanner-error-camera-init": "無法啟動攝像頭,請確保已授權",
307
- "qrscanner-error-process-image": "處理圖像時出錯",
301
+ 'qrscanner-loading': '正在識別二維碼...',
302
+ 'qrscanner-success': '識別成功: ',
303
+ 'qrscanner-success-qrcode': '二維碼識別成功: ',
304
+ 'qrscanner-success-barcode': '條形碼識別成功: ',
305
+ 'qrscanner-error-upload-image': '請上傳圖片文件',
306
+ 'qrscanner-error-load-failed': '讀取文件失敗',
307
+ 'qrscanner-error-no-code': '未檢測到二維碼或條形碼',
308
+ 'qrscanner-error-camera-init': '無法啟動攝像頭,請確保已授權',
309
+ 'qrscanner-error-process-image': '處理圖像時出錯',
308
310
  // 登录注册组件
309
311
  'pisell-login-and-register-title': '登入到您的帳戶',
310
312
  'pisell-login-and-register-subtitle': '歡迎回來!請輸入您的詳細信息。',
@@ -319,7 +321,7 @@ export default {
319
321
  'pisell-login-and-register-google': '繼續使用Google',
320
322
  'pisell-login-and-register-facebook': '繼續使用Facebook',
321
323
  'pisell-login-and-register-apple': '繼續使用Apple',
322
- 'pisell-login-and-register-sign-up': "沒有帳戶?註冊",
324
+ 'pisell-login-and-register-sign-up': '沒有帳戶?註冊',
323
325
  'pisell-login-and-register-login-tab': '登入',
324
326
  'pisell-login-and-register-register-tab': '註冊',
325
327
  'pisell-login-and-register-register-email-placeholder': '輸入您的電子郵件',
@@ -327,8 +329,20 @@ export default {
327
329
  'pisell-login-and-register-register-button-text': '創建帳戶',
328
330
  'pisell-login-and-register-remember-me': '記住我',
329
331
  'pisell-login-and-register-forgot-password': '忘記密碼?',
330
- 'pisell2.text.goodpass.product-vouchers': "優惠促銷",
331
- 'pisell2.text.goodpass.last-settlement': "(上次結算)",
332
- 'pisell2.text.goodpass.view-more': "查看更多",
333
- 'pisell2.text.goodpass.save': "節省"
332
+ 'pisell2.text.goodpass.product-vouchers': '優惠促銷',
333
+ 'pisell2.text.goodpass.last-settlement': '(上次結算)',
334
+ 'pisell2.text.goodpass.view-more': '查看更多',
335
+ 'pisell2.text.goodpass.save': '節省',
336
+ // 相机组件
337
+ 'pisell-camera-no-camera-accessible': '沒有找到攝像頭',
338
+ 'pisell-camera-permission-denied': '沒有權限使用攝像頭',
339
+ 'pisell-camera-switch-camera': '切換攝像頭',
340
+ 'pisell-camera-canvas': 'canvas不支持',
341
+ 'pisell-camera-checking': '正在檢測攝像頭...',
342
+ 'pisell-camera-no-camera-desc': '請檢查設備是否連接攝像頭或授權瀏覽器訪問攝像頭',
343
+ // 拍照组件
344
+ 'pisell-upload-camera-local-files': '本地文件',
345
+ 'pisell-upload-camera-capture': '拍攝/拍照',
346
+ 'pisell-upload-camera-retake': '重拍',
347
+ 'pisell-upload-camera-use': '使用照片'
334
348
  };
@@ -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';
@@ -56,6 +56,7 @@ var BaseTable = (props, ref) => {
56
56
  columns: propsColumns,
57
57
  dataSource,
58
58
  operationContent,
59
+ currentSettingKey,
59
60
  ...others
60
61
  } = props;
61
62
  const tableRef = (0, import_react.useRef)(null);
@@ -70,6 +71,9 @@ var BaseTable = (props, ref) => {
70
71
  }
71
72
  return originData;
72
73
  }, [originData, __designMode]);
74
+ const formatCurrentSettingKey = (0, import_react.useMemo)(() => {
75
+ return currentSettingKey || props.__id || "";
76
+ }, [currentSettingKey]);
73
77
  const { dataSourceKey, dataSourceKeyRef } = (0, import_useDataSourceKey.default)();
74
78
  const beforeClose = (0, import_react.useRef)();
75
79
  const setBeforeClose = (0, import_react.useCallback)((fn) => {
@@ -84,7 +88,7 @@ var BaseTable = (props, ref) => {
84
88
  Container,
85
89
  drawerContent
86
90
  } = (0, import_useDrawerState.default)(operationContent);
87
- const { queryPageConfig, handleValuesChange, refreshData, handleFilterChange, refreshCurrentPage } = (0, import_useTableQuery.default)(props);
91
+ const { queryPageConfig, handleValuesChange, refreshData, handleFilterChange, refreshCurrentPage, getInitialValues } = (0, import_useTableQuery.default)(props, formatCurrentSettingKey);
88
92
  const handleAllValuesChange = (changedValues, values) => {
89
93
  var _a;
90
94
  (_a = props == null ? void 0 : props.onValuesChange) == null ? void 0 : _a.call(props, changedValues, values);
@@ -130,7 +134,8 @@ var BaseTable = (props, ref) => {
130
134
  closeDrawer,
131
135
  refreshData,
132
136
  handleFilterChange,
133
- tableRef
137
+ tableRef,
138
+ getInitialValues
134
139
  });
135
140
  (0, import_react.useImperativeHandle)(ref, () => {
136
141
  if (tableRef.current) {
@@ -147,6 +152,7 @@ var BaseTable = (props, ref) => {
147
152
  ref: tableRef,
148
153
  ...others,
149
154
  ...transformProps,
155
+ currentSettingKey: formatCurrentSettingKey,
150
156
  dataSource: (data == null ? void 0 : data.data) || [],
151
157
  loading: list == null ? void 0 : list.loading,
152
158
  onValuesChange: handleAllValuesChange
@@ -21,6 +21,7 @@ interface FilterProps {
21
21
  placeholder: string;
22
22
  key: string;
23
23
  };
24
+ getInitialValues?: () => Record<string, any>;
24
25
  }
25
26
  declare const Filter: (props: FilterProps) => JSX.Element;
26
27
  export default Filter;
@@ -52,7 +52,8 @@ var Filter = (props) => {
52
52
  handleValuesChange,
53
53
  search,
54
54
  filterBy,
55
- show
55
+ show,
56
+ getInitialValues
56
57
  } = props;
57
58
  const [form] = import_antd.Form.useForm();
58
59
  const { dataSource } = (0, import_useDataSource.default)();
@@ -155,6 +156,9 @@ var Filter = (props) => {
155
156
  }
156
157
  ) : null;
157
158
  }, [search]);
159
+ const initialValues = (0, import_react.useMemo)(() => {
160
+ return getInitialValues == null ? void 0 : getInitialValues();
161
+ }, [search, filterBy]);
158
162
  return /* @__PURE__ */ import_react.default.createElement(
159
163
  import_antd.Form,
160
164
  {
@@ -163,7 +167,8 @@ var Filter = (props) => {
163
167
  size: "large",
164
168
  layout: "inline",
165
169
  className: "filter-form-wrapper",
166
- onValuesChange
170
+ onValuesChange,
171
+ initialValues
167
172
  },
168
173
  searchDom,
169
174
  filterDom,
@@ -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;
@@ -54,7 +54,8 @@ var useTableProps = (props) => {
54
54
  closeDrawer,
55
55
  refreshData,
56
56
  handleFilterChange,
57
- tableRef
57
+ tableRef,
58
+ getInitialValues
58
59
  } = props;
59
60
  const {
60
61
  title: propsTitle,
@@ -66,7 +67,9 @@ var useTableProps = (props) => {
66
67
  search,
67
68
  clickToDetail,
68
69
  onRow: propsOnRow,
69
- filterBy
70
+ filterBy,
71
+ currentSettingKey,
72
+ __id
70
73
  } = originProps;
71
74
  const {
72
75
  items,
@@ -114,13 +117,15 @@ var useTableProps = (props) => {
114
117
  openDrawer(item);
115
118
  });
116
119
  const handleDelete = (0, import_ahooks.useMemoizedFn)(
117
- async (record, softDelete) => {
120
+ async (record, softDelete, customDeleteAction) => {
118
121
  try {
119
122
  registerValueVariable == null ? void 0 : registerValueVariable(componentId, {
120
123
  currentRecord: { ...record }
121
124
  });
122
125
  setTimeout(async () => {
123
- if (softDelete) {
126
+ if (customDeleteAction) {
127
+ await customDeleteAction(record);
128
+ } else if (softDelete) {
124
129
  const deleteTime = (0, import_dayjs.default)().format("YYYY-MM-DD HH:mm:ss");
125
130
  await (update == null ? void 0 : update.runAsync({
126
131
  ...record,
@@ -167,7 +172,11 @@ var useTableProps = (props) => {
167
172
  okText: (0, import_locales.getText)("pisell-delete-confirm-ok"),
168
173
  cancelText: (0, import_locales.getText)("pisell-delete-confirm-cancel"),
169
174
  onOk: () => {
170
- handleDelete(record, item == null ? void 0 : item.softDelete);
175
+ handleDelete(
176
+ record,
177
+ item == null ? void 0 : item.softDelete,
178
+ item == null ? void 0 : item.customDeleteAction
179
+ );
171
180
  }
172
181
  });
173
182
  return;
@@ -260,16 +269,19 @@ var useTableProps = (props) => {
260
269
  if (!(propsFilter == null ? void 0 : propsFilter.show) && !(search == null ? void 0 : search.show)) {
261
270
  return null;
262
271
  }
263
- return /* @__PURE__ */ import_react.default.createElement(
272
+ const dom = /* @__PURE__ */ import_react.default.createElement(
264
273
  import_filter.default,
265
274
  {
266
275
  ...propsFilter,
267
276
  componentId,
268
277
  search,
269
278
  handleValuesChange: handleFilterChange,
270
- filterBy
279
+ filterBy,
280
+ getInitialValues
271
281
  }
272
282
  );
283
+ dom.__proto__.__items = propsFilter == null ? void 0 : propsFilter.items;
284
+ return dom;
273
285
  }, [propsFilter, search]);
274
286
  const onRow = (0, import_ahooks.useMemoizedFn)((record) => {
275
287
  if (!(clickToDetail == null ? void 0 : clickToDetail.show)) {
@@ -300,6 +312,7 @@ var useTableProps = (props) => {
300
312
  });
301
313
  return {
302
314
  ...originProps,
315
+ currentComponentId: componentId,
303
316
  title,
304
317
  pagination,
305
318
  columns,
@@ -11,7 +11,7 @@ declare type Params = {
11
11
  sortBy: string;
12
12
  };
13
13
  };
14
- declare const useTableQuery: (props: DataSourceTableProps) => {
14
+ declare const useTableQuery: (props: DataSourceTableProps, currentSettingHash: string) => {
15
15
  queryPageConfig: {
16
16
  page: number;
17
17
  pageSize: number;
@@ -28,5 +28,6 @@ declare const useTableQuery: (props: DataSourceTableProps) => {
28
28
  refreshData: () => void;
29
29
  handleFilterChange: (changedFields: any, allFields: any) => void;
30
30
  refreshCurrentPage: () => void;
31
+ getInitialValues: () => Record<string, any>;
31
32
  };
32
33
  export default useTableQuery;
@@ -24,25 +24,61 @@ __export(useTableQuery_exports, {
24
24
  module.exports = __toCommonJS(useTableQuery_exports);
25
25
  var import_react = require("react");
26
26
  var import_ahooks = require("ahooks");
27
- var useTableQuery = (props) => {
27
+ var import_utils = require("../../../table/Table/utils");
28
+ var useTableQuery = (props, currentSettingHash) => {
28
29
  var _a, _b, _c, _d;
29
- const { filterBy, sortBy, tabs } = props;
30
+ const { filterBy, sortBy, tabs, localSettings } = props;
31
+ const tableId = (0, import_react.useMemo)(() => {
32
+ if (props.__designMode === "design") {
33
+ return "designMode-mock-table-id";
34
+ }
35
+ return (props == null ? void 0 : props.currentComponentId) || props.__id;
36
+ }, [props.__id, props.__designMode, props == null ? void 0 : props.currentComponentId]);
37
+ const currentViewMode = (0, import_react.useMemo)(() => (0, import_utils.getCurrentViewModeFromLocalStorage)(tableId) || "grid", [tableId]);
30
38
  const [queryPageConfig, setQueryPageConfig] = (0, import_react.useState)({
31
39
  page: 1,
32
40
  pageSize: 20,
33
41
  filter: ((_b = (_a = tabs == null ? void 0 : tabs.items) == null ? void 0 : _a[0]) == null ? void 0 : _b.filterBy) || filterBy || {},
34
42
  sort: ((_d = (_c = tabs == null ? void 0 : tabs.items) == null ? void 0 : _c[0]) == null ? void 0 : _d.sortBy) || sortBy
35
43
  });
44
+ const getInitialValues = (0, import_ahooks.useMemoizedFn)(() => {
45
+ try {
46
+ if (!tableId) return {};
47
+ const setting = (0, import_utils.getTableSettingByCurrentViewMode)(tableId, currentViewMode);
48
+ console.log("setting22", setting);
49
+ return (setting == null ? void 0 : setting.filters) || {};
50
+ } catch (e) {
51
+ return {};
52
+ }
53
+ });
54
+ (0, import_react.useEffect)(() => {
55
+ var _a2;
56
+ if (!tableId) return;
57
+ const enable = !!((localSettings == null ? void 0 : localSettings.enable) && ((_a2 = localSettings.scope) == null ? void 0 : _a2.includes("filters")));
58
+ if (!enable) return;
59
+ const setting = (0, import_utils.getTableSettingByCurrentViewMode)(tableId, currentViewMode);
60
+ const persisted = (setting == null ? void 0 : setting.filters) || {};
61
+ if (persisted && Object.keys(persisted).length > 0) {
62
+ setQueryPageConfig((prev) => ({
63
+ ...prev,
64
+ filter: { ...prev.filter, ...persisted }
65
+ }));
66
+ }
67
+ }, [tableId, currentViewMode, JSON.stringify(localSettings)]);
36
68
  const handleValuesChange = (0, import_ahooks.useMemoizedFn)(
37
69
  (params, allParams) => {
70
+ var _a2;
38
71
  const { page, size } = params.pagination || {};
72
+ let nextFilterForSave = null;
39
73
  setQueryPageConfig((prev) => {
40
- var _a2, _b2, _c2;
74
+ var _a3, _b2, _c2;
41
75
  let sort = prev.sort || sortBy;
42
76
  let filter = prev.filter;
43
77
  if ("tabs" in params) {
44
- sort = ((_a2 = params.tabs) == null ? void 0 : _a2.sortBy) || sortBy || "";
45
- filter = { ...prev.filter, ...((_b2 = params.tabs) == null ? void 0 : _b2.filterBy) || {} };
78
+ sort = ((_a3 = params.tabs) == null ? void 0 : _a3.sortBy) || sortBy || "";
79
+ const tabsFilter = ((_b2 = params.tabs) == null ? void 0 : _b2.filterBy) || {};
80
+ filter = { ...prev.filter, ...tabsFilter };
81
+ nextFilterForSave = filter;
46
82
  }
47
83
  if ("order_by" in params) {
48
84
  sort = params.order_by || ((_c2 = allParams.tabs) == null ? void 0 : _c2.sortBy) || sortBy;
@@ -55,15 +91,49 @@ var useTableQuery = (props) => {
55
91
  filter
56
92
  };
57
93
  });
94
+ const enable = !!((localSettings == null ? void 0 : localSettings.enable) && ((_a2 = localSettings.scope) == null ? void 0 : _a2.includes("filters")));
95
+ if (enable && tableId && nextFilterForSave) {
96
+ const excluded = new Set((localSettings == null ? void 0 : localSettings.excludedFilterFields) || []);
97
+ const filtered = {};
98
+ Object.keys(nextFilterForSave).forEach((k) => {
99
+ if (!excluded.has(k)) {
100
+ filtered[k] = nextFilterForSave[k];
101
+ }
102
+ });
103
+ (0, import_utils.setTableSettingToLocalStorage)({
104
+ tableId,
105
+ tableSettingObj: { filters: filtered },
106
+ currentViewMode,
107
+ currentSettingHash
108
+ });
109
+ }
58
110
  }
59
111
  );
60
112
  const handleFilterChange = (0, import_ahooks.useMemoizedFn)(
61
113
  (changedFields, allFields) => {
114
+ var _a2;
115
+ const nextFilter = { ...allFields };
62
116
  setQueryPageConfig((prev) => ({
63
117
  ...prev,
64
118
  page: 1,
65
- filter: { ...prev.filter, ...allFields, ...filterBy || {} }
119
+ filter: { ...prev.filter, ...nextFilter, ...filterBy || {} }
66
120
  }));
121
+ const enable = !!((localSettings == null ? void 0 : localSettings.enable) && ((_a2 = localSettings.scope) == null ? void 0 : _a2.includes("filters")));
122
+ if (enable && tableId) {
123
+ const excluded = new Set((localSettings == null ? void 0 : localSettings.excludedFilterFields) || []);
124
+ const filtered = {};
125
+ Object.keys(nextFilter || {}).forEach((k) => {
126
+ if (!excluded.has(k)) {
127
+ filtered[k] = nextFilter[k];
128
+ }
129
+ });
130
+ (0, import_utils.setTableSettingToLocalStorage)({
131
+ tableId,
132
+ tableSettingObj: { filters: filtered },
133
+ currentViewMode,
134
+ currentSettingHash
135
+ });
136
+ }
67
137
  }
68
138
  );
69
139
  const refreshData = (0, import_ahooks.useMemoizedFn)(() => {
@@ -83,7 +153,8 @@ var useTableQuery = (props) => {
83
153
  handleValuesChange,
84
154
  refreshData,
85
155
  handleFilterChange,
86
- refreshCurrentPage
156
+ refreshCurrentPage,
157
+ getInitialValues
87
158
  };
88
159
  };
89
160
  var useTableQuery_default = useTableQuery;
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { ColumnType } from 'antd/es/table';
3
+ import { LocalSettingsType } from '../../table/types';
3
4
  import { DataSourceType } from '../provider/dataSource/DataSourceContext';
4
5
  export declare type OperationItem = {
5
6
  label?: string;
@@ -13,6 +14,9 @@ export declare type OperationItem = {
13
14
  afterClose?: () => void;
14
15
  };
15
16
  export interface DataSourceTableProps {
17
+ __id?: string;
18
+ currentComponentId?: string;
19
+ currentSettingKey?: string;
16
20
  title?: string | React.ReactNode | (() => React.ReactNode);
17
21
  subTitle?: string | React.ReactNode | (() => React.ReactNode);
18
22
  titleButtons?: {
@@ -76,4 +80,5 @@ export interface DataSourceTableProps {
76
80
  create?: Record<string, any>;
77
81
  destroy?: Record<string, any>;
78
82
  };
83
+ localSettings?: LocalSettingsType;
79
84
  }
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  declare const Subdomain: React.FC<import("antd").InputProps & {
3
3
  onChange: (value: string) => void;
4
4
  onBlur?: ((e: React.FocusEvent<HTMLInputElement, Element>) => void) | undefined;
5
- rootDomain: "custom" | "xzero" | "saas";
5
+ rootDomain: "custom" | "saas" | "xzero";
6
6
  customDomain?: string | undefined;
7
7
  value?: string | undefined;
8
8
  tenantId: string;