@pisell/materials 2.2.114 → 2.2.115
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +3 -3
- package/build/lowcode/preview.js +144 -165
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +31 -40
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +36 -45
- package/es/components/batch-editor/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +9 -9
- package/es/components/date-picker/index.d.ts +1 -0
- package/es/components/filter/index.d.ts +0 -1
- package/es/components/page/index.d.ts +1 -0
- package/es/components/pisellText/components/Editable/index.js +130 -0
- package/es/components/pisellText/components/Editable/index.less +40 -0
- package/es/components/pisellText/index.js +2 -0
- package/es/components/productCard/components/Packages/utils.d.ts +1 -1
- package/es/components/select/index.js +4 -2
- package/es/components/sortableList/index.js +2 -1
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.js +9 -1
- package/es/components/table/Actions/component/ExportImport/index.js +55 -27
- package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/es/components/table/Table/SelectField/index.d.ts +1 -0
- package/es/components/table/Table/fields/index.d.ts +3 -2
- package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/fields/text/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/es/components/table/serve.js +8 -0
- package/es/components/tabs/index.js +9 -0
- package/es/components/walletCard/index.js +51 -40
- package/es/locales/en-US.js +2 -2
- package/es/locales/zh-CN.js +1 -1
- package/es/locales/zh-TW.js +1 -1
- package/es/typings.d.ts +7 -1
- package/es/utils/index.d.ts +1 -1
- package/es/utils/platform.d.ts +1 -1
- package/lib/components/batch-editor/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +9 -9
- package/lib/components/date-picker/index.d.ts +1 -0
- package/lib/components/filter/index.d.ts +0 -1
- package/lib/components/page/index.d.ts +1 -0
- package/lib/components/pisellText/components/Editable/index.js +139 -0
- package/lib/components/pisellText/components/Editable/index.less +40 -0
- package/lib/components/pisellText/index.js +2 -0
- package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/components/select/index.js +7 -2
- package/lib/components/sortableList/index.js +2 -2
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.js +7 -1
- package/lib/components/table/Actions/component/ExportImport/index.js +37 -25
- package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/lib/components/table/Table/SelectField/index.d.ts +1 -0
- package/lib/components/table/Table/fields/index.d.ts +3 -2
- package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/fields/text/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/lib/components/table/serve.js +8 -0
- package/lib/components/tabs/index.js +5 -0
- package/lib/components/walletCard/index.js +47 -29
- package/lib/locales/en-US.js +2 -2
- package/lib/locales/zh-CN.js +1 -1
- package/lib/locales/zh-TW.js +1 -1
- package/lib/typings.d.ts +7 -1
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/platform.d.ts +1 -1
- package/lowcode/pisell-text.editable/meta.ts +115 -0
- package/lowcode/pisell-text.editable/snippets.ts +15 -0
- package/lowcode/sortable-list/meta.ts +1 -1
- package/lowcode/wallet-card/meta.ts +23 -3
- package/package.json +11 -11
- package/es/components/appVersionControl/index.d.ts +0 -4
- package/es/components/auto-resize-text/auto-text-size-standalone.d.ts +0 -20
- package/es/components/auto-resize-text/index.d.ts +0 -6
- package/es/components/cardPro/index.d.ts +0 -3
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +0 -56
- package/es/components/dataSourceComponents/dataSourceTable/BaseTable.d.ts +0 -8
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +0 -28
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -38
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +0 -100
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +0 -33
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -84
- package/es/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +0 -17
- package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +0 -24
- package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +0 -16
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -25
- package/es/components/dataSourceComponents/fields/Upload/BaseUpload.d.ts +0 -5
- package/es/components/dataSourceComponents/fields/Upload/CameraPopover.d.ts +0 -5
- package/es/components/dataSourceComponents/fields/Upload/index.d.ts +0 -3
- package/es/components/dataSourceComponents/fields/Upload/type.d.ts +0 -38
- package/es/components/dataSourceComponents/hooks/usePlatform.d.ts +0 -5
- package/es/components/drag-sort-tree/TreeItem/index.d.ts +0 -18
- package/es/components/drag-sort-tree/index.d.ts +0 -4
- package/es/components/filter/types.d.ts +0 -46
- package/es/components/iconfont/index.d.ts +0 -8
- package/es/components/keyboard/index.d.ts +0 -22
- package/es/components/login-and-register/index.d.ts +0 -82
- package/es/components/pisell-config-provider/context.d.ts +0 -22
- package/es/components/pisell-config-provider/index.d.ts +0 -13
- package/es/components/pisellAdjustPrice/index.d.ts +0 -4
- package/es/components/pisellAdjustPrice/status.d.ts +0 -32
- package/es/components/pisellAdjustPrice/type.d.ts +0 -22
- package/es/components/pisellCamera/index.d.ts +0 -4
- package/es/components/pisellCardList/index.d.ts +0 -103
- package/es/components/pisellCheckboxGroup/index.d.ts +0 -40
- package/es/components/pisellEmpty/index.d.ts +0 -19
- package/es/components/pisellText/components/Amount/index.d.ts +0 -20
- package/es/components/pisellText/index.d.ts +0 -8
- package/es/components/pisellToast/index.d.ts +0 -17
- package/es/components/pisellToast/squareToast/index.d.ts +0 -15
- package/es/components/pisellToast/squareToast/methods.d.ts +0 -13
- package/es/components/pisellToast/squareToast/renderImperatively.d.ts +0 -29
- package/es/components/pisellToast/squareToast/toast.d.ts +0 -25
- package/es/components/pisellWalletPassCard/index.d.ts +0 -136
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +0 -14
- package/es/components/productCard/cartSkuCard/components/Note/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +0 -27
- package/es/components/productCard/cartSkuCard/components/discountReason/index.d.ts +0 -2
- package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -10
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +0 -20
- package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +0 -12
- package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +0 -46
- package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -6
- package/es/components/productCard/cartSkuCard/index.d.ts +0 -10
- package/es/components/productCard/cartSkuCard/locales.d.ts +0 -96
- package/es/components/productCard/components/Action/index.d.ts +0 -3
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +0 -3
- package/es/components/productCard/components/Header/index.d.ts +0 -3
- package/es/components/productCard/components/Sales/index.d.ts +0 -3
- package/es/components/productCard/components/Time/components/SelectHolder/index.d.ts +0 -3
- package/es/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +0 -13
- package/es/components/productCard/components/Time/components/SelectResource/index.d.ts +0 -18
- package/es/components/productCard/components/Time/index.d.ts +0 -3
- package/es/components/productCard/locales.d.ts +0 -84
- package/es/components/select/index.d.ts +0 -9
- package/es/components/sortableList/index.d.ts +0 -11
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +0 -7
- package/es/components/table/Actions/component/ExportImport/index.d.ts +0 -7
- package/es/components/table/Actions/index.d.ts +0 -17
- package/es/components/table/Gallery/components/GalleryItem/index.d.ts +0 -14
- package/es/components/table/Gallery/index.d.ts +0 -5
- package/es/components/table/Table/AddFieldModal/index.d.ts +0 -4
- package/es/components/table/Table/index.d.ts +0 -4
- package/es/components/table/Table/utils.d.ts +0 -161
- package/es/components/table/hooks/useTableSetting.d.ts +0 -21
- package/es/components/table/hooks/useTransDataSource.d.ts +0 -11
- package/es/components/table/index.d.ts +0 -4
- package/es/components/table/serve.d.ts +0 -13
- package/es/components/table/types.d.ts +0 -268
- package/es/components/tabs/index.d.ts +0 -16
- package/es/components/translation/index.d.ts +0 -14
- package/es/components/versionModal/index.d.ts +0 -23
- package/es/components/virtual-keyboard/Amount/index.d.ts +0 -5
- package/es/components/virtual-keyboard/Amount/themeConfig.d.ts +0 -32
- package/es/components/virtual-keyboard/Amount/types.d.ts +0 -44
- package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -15
- package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +0 -25
- package/es/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
- package/es/components/virtual-keyboard/Number/index.d.ts +0 -5
- package/es/components/virtual-keyboard/Number/themeConfig.d.ts +0 -32
- package/es/components/virtual-keyboard/Number/types.d.ts +0 -26
- package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -13
- package/es/components/virtual-keyboard/index.d.ts +0 -25
- package/es/components/virtualInput/BaseVirtualInput/index.d.ts +0 -40
- package/es/components/virtualInput/index.d.ts +0 -24
- package/es/components/walletCard/index.d.ts +0 -71
- package/es/index.d.ts +0 -144
- package/es/locales/en-US.d.ts +0 -307
- package/es/locales/zh-CN.d.ts +0 -302
- package/es/locales/zh-TW.d.ts +0 -302
- package/lib/components/appVersionControl/index.d.ts +0 -4
- package/lib/components/auto-resize-text/auto-text-size-standalone.d.ts +0 -20
- package/lib/components/auto-resize-text/index.d.ts +0 -6
- package/lib/components/cardPro/index.d.ts +0 -3
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +0 -56
- package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.d.ts +0 -8
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +0 -28
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -38
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +0 -100
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +0 -33
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -84
- package/lib/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +0 -17
- package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +0 -24
- package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +0 -16
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -25
- package/lib/components/dataSourceComponents/fields/Upload/BaseUpload.d.ts +0 -5
- package/lib/components/dataSourceComponents/fields/Upload/CameraPopover.d.ts +0 -5
- package/lib/components/dataSourceComponents/fields/Upload/index.d.ts +0 -3
- package/lib/components/dataSourceComponents/fields/Upload/type.d.ts +0 -38
- package/lib/components/dataSourceComponents/hooks/usePlatform.d.ts +0 -5
- package/lib/components/drag-sort-tree/TreeItem/index.d.ts +0 -18
- package/lib/components/drag-sort-tree/index.d.ts +0 -4
- package/lib/components/filter/types.d.ts +0 -46
- package/lib/components/iconfont/index.d.ts +0 -8
- package/lib/components/keyboard/index.d.ts +0 -22
- package/lib/components/login-and-register/index.d.ts +0 -82
- package/lib/components/pisell-config-provider/context.d.ts +0 -22
- package/lib/components/pisell-config-provider/index.d.ts +0 -13
- package/lib/components/pisellAdjustPrice/index.d.ts +0 -4
- package/lib/components/pisellAdjustPrice/status.d.ts +0 -32
- package/lib/components/pisellAdjustPrice/type.d.ts +0 -22
- package/lib/components/pisellCamera/index.d.ts +0 -4
- package/lib/components/pisellCardList/index.d.ts +0 -103
- package/lib/components/pisellCheckboxGroup/index.d.ts +0 -40
- package/lib/components/pisellEmpty/index.d.ts +0 -19
- package/lib/components/pisellText/components/Amount/index.d.ts +0 -20
- package/lib/components/pisellText/index.d.ts +0 -8
- package/lib/components/pisellToast/index.d.ts +0 -17
- package/lib/components/pisellToast/squareToast/index.d.ts +0 -15
- package/lib/components/pisellToast/squareToast/methods.d.ts +0 -13
- package/lib/components/pisellToast/squareToast/renderImperatively.d.ts +0 -29
- package/lib/components/pisellToast/squareToast/toast.d.ts +0 -25
- package/lib/components/pisellWalletPassCard/index.d.ts +0 -136
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +0 -14
- package/lib/components/productCard/cartSkuCard/components/Note/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +0 -27
- package/lib/components/productCard/cartSkuCard/components/discountReason/index.d.ts +0 -2
- package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -10
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +0 -20
- package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +0 -12
- package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +0 -46
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -6
- package/lib/components/productCard/cartSkuCard/index.d.ts +0 -10
- package/lib/components/productCard/cartSkuCard/locales.d.ts +0 -96
- package/lib/components/productCard/components/Action/index.d.ts +0 -3
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +0 -3
- package/lib/components/productCard/components/Header/index.d.ts +0 -3
- package/lib/components/productCard/components/Sales/index.d.ts +0 -3
- package/lib/components/productCard/components/Time/components/SelectHolder/index.d.ts +0 -3
- package/lib/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +0 -13
- package/lib/components/productCard/components/Time/components/SelectResource/index.d.ts +0 -18
- package/lib/components/productCard/components/Time/index.d.ts +0 -3
- package/lib/components/productCard/locales.d.ts +0 -84
- package/lib/components/select/index.d.ts +0 -9
- package/lib/components/sortableList/index.d.ts +0 -11
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +0 -7
- package/lib/components/table/Actions/component/ExportImport/index.d.ts +0 -7
- package/lib/components/table/Actions/index.d.ts +0 -17
- package/lib/components/table/Gallery/components/GalleryItem/index.d.ts +0 -14
- package/lib/components/table/Gallery/index.d.ts +0 -5
- package/lib/components/table/Table/AddFieldModal/index.d.ts +0 -4
- package/lib/components/table/Table/index.d.ts +0 -4
- package/lib/components/table/Table/utils.d.ts +0 -161
- package/lib/components/table/hooks/useTableSetting.d.ts +0 -21
- package/lib/components/table/hooks/useTransDataSource.d.ts +0 -11
- package/lib/components/table/index.d.ts +0 -4
- package/lib/components/table/serve.d.ts +0 -13
- package/lib/components/table/types.d.ts +0 -268
- package/lib/components/tabs/index.d.ts +0 -16
- package/lib/components/translation/index.d.ts +0 -14
- package/lib/components/versionModal/index.d.ts +0 -23
- package/lib/components/virtual-keyboard/Amount/index.d.ts +0 -5
- package/lib/components/virtual-keyboard/Amount/themeConfig.d.ts +0 -32
- package/lib/components/virtual-keyboard/Amount/types.d.ts +0 -44
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -15
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +0 -25
- package/lib/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
- package/lib/components/virtual-keyboard/Number/index.d.ts +0 -5
- package/lib/components/virtual-keyboard/Number/themeConfig.d.ts +0 -32
- package/lib/components/virtual-keyboard/Number/types.d.ts +0 -26
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -13
- package/lib/components/virtual-keyboard/index.d.ts +0 -25
- package/lib/components/virtualInput/BaseVirtualInput/index.d.ts +0 -40
- package/lib/components/virtualInput/index.d.ts +0 -24
- package/lib/components/walletCard/index.d.ts +0 -71
- package/lib/index.d.ts +0 -144
- package/lib/locales/en-US.d.ts +0 -307
- package/lib/locales/zh-CN.d.ts +0 -302
- package/lib/locales/zh-TW.d.ts +0 -302
|
@@ -4,10 +4,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
8
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
10
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
11
7
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
12
8
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
9
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -28,8 +24,6 @@ import Guest from "./Guest";
|
|
|
28
24
|
import Guide from "./Guide";
|
|
29
25
|
import "./index.less";
|
|
30
26
|
|
|
31
|
-
// 添加JSX类型声明
|
|
32
|
-
|
|
33
27
|
// 类型定义
|
|
34
28
|
|
|
35
29
|
// 默认值
|
|
@@ -41,7 +35,7 @@ var DEFAULT_PROPS = {
|
|
|
41
35
|
showWalletName: true,
|
|
42
36
|
shopName: 'Store name',
|
|
43
37
|
showShopName: true,
|
|
44
|
-
cardNo: '
|
|
38
|
+
cardNo: 'WL0000000001',
|
|
45
39
|
cardStyle: 'normal',
|
|
46
40
|
codeType: 'barCode',
|
|
47
41
|
platform: 'pc',
|
|
@@ -51,21 +45,41 @@ var DEFAULT_PROPS = {
|
|
|
51
45
|
walletName: 'Level',
|
|
52
46
|
isLogin: true,
|
|
53
47
|
items: [{
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
48
|
+
type: 'rechargeable',
|
|
49
|
+
display: 1,
|
|
50
|
+
custom_title: {
|
|
51
|
+
original: 'Balance',
|
|
52
|
+
'zh-CN': '充值卡',
|
|
53
|
+
'zh-HK': '充值卡',
|
|
54
|
+
en: 'Balance'
|
|
55
|
+
}
|
|
57
56
|
}, {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
type: 'point',
|
|
58
|
+
display: 1,
|
|
59
|
+
custom_title: {
|
|
60
|
+
original: 'Points',
|
|
61
|
+
'zh-CN': '积分卡',
|
|
62
|
+
'zh-HK': '積分卡',
|
|
63
|
+
en: 'Points'
|
|
64
|
+
}
|
|
61
65
|
}, {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
66
|
+
type: 'voucher',
|
|
67
|
+
display: 1,
|
|
68
|
+
custom_title: {
|
|
69
|
+
original: 'Voucher',
|
|
70
|
+
'zh-CN': '代金券',
|
|
71
|
+
'zh-HK': '代金券',
|
|
72
|
+
en: 'Voucher'
|
|
73
|
+
}
|
|
65
74
|
}, {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
75
|
+
type: 'discount',
|
|
76
|
+
display: 1,
|
|
77
|
+
custom_title: {
|
|
78
|
+
original: 'Discount',
|
|
79
|
+
'zh-CN': '折扣卡',
|
|
80
|
+
'zh-HK': '折扣卡',
|
|
81
|
+
en: 'Discount'
|
|
82
|
+
}
|
|
69
83
|
}]
|
|
70
84
|
};
|
|
71
85
|
|
|
@@ -93,7 +107,7 @@ var useCodeModal = function useCodeModal(cardNo, onCodeClick, codeType) {
|
|
|
93
107
|
if (interaction !== null && interaction !== void 0 && (_interaction$utils = interaction.utils) !== null && _interaction$utils !== void 0 && (_interaction$utils$is = _interaction$utils.isAppEnv) !== null && _interaction$utils$is !== void 0 && _interaction$utils$is.call(_interaction$utils)) {
|
|
94
108
|
var _interaction$utils2, _interaction$utils2$p;
|
|
95
109
|
var typeMap = {
|
|
96
|
-
|
|
110
|
+
qrCode: 'qrCode',
|
|
97
111
|
barCode: 'barCode'
|
|
98
112
|
};
|
|
99
113
|
interaction === null || interaction === void 0 || (_interaction$utils2 = interaction.utils) === null || _interaction$utils2 === void 0 || (_interaction$utils2$p = _interaction$utils2.postMessageToApp) === null || _interaction$utils2$p === void 0 || _interaction$utils2$p.call(_interaction$utils2, {
|
|
@@ -198,49 +212,44 @@ var CardHeader = function CardHeader(_ref2) {
|
|
|
198
212
|
|
|
199
213
|
// 子组件:卡片内容项
|
|
200
214
|
var CardItem = function CardItem(_ref3) {
|
|
215
|
+
var _context$appHelper2;
|
|
201
216
|
var item = _ref3.item,
|
|
202
217
|
symbol = _ref3.symbol;
|
|
203
|
-
var
|
|
204
|
-
|
|
218
|
+
var type = item.type,
|
|
219
|
+
custom_title = item.custom_title,
|
|
205
220
|
value = item.value;
|
|
221
|
+
var context = useEngineContext();
|
|
222
|
+
var utils = context === null || context === void 0 || (_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.utils;
|
|
223
|
+
var translationOriginal = (utils === null || utils === void 0 ? void 0 : utils.translationOriginal) || (utils === null || utils === void 0 ? void 0 : utils.translation);
|
|
206
224
|
return /*#__PURE__*/React.createElement("div", {
|
|
207
225
|
className: "pisell-wallet-card-item"
|
|
208
226
|
}, /*#__PURE__*/React.createElement("div", {
|
|
209
227
|
className: "pisell-wallet-card-item-label"
|
|
210
|
-
},
|
|
228
|
+
}, translationOriginal(custom_title || '') || ''), /*#__PURE__*/React.createElement("div", {
|
|
211
229
|
className: "pisell-wallet-card-item-value"
|
|
212
|
-
},
|
|
230
|
+
}, type === 'rechargeable' ? /*#__PURE__*/React.createElement(Amount, {
|
|
213
231
|
className: "pisell-card-amount-item-value",
|
|
214
232
|
platform: "h5",
|
|
215
233
|
symbol: symbol,
|
|
216
234
|
useThousandsSeparator: true,
|
|
217
235
|
showCurrencySymbol: true,
|
|
218
236
|
value: value
|
|
219
|
-
}) : value));
|
|
237
|
+
}) : value || '0'));
|
|
220
238
|
};
|
|
221
239
|
|
|
222
240
|
// 子组件:卡片内容
|
|
223
241
|
var CardContent = function CardContent(_ref4) {
|
|
224
242
|
var items = _ref4.items,
|
|
225
243
|
symbol = _ref4.symbol;
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
// 对 items 进行排序
|
|
230
|
-
var sortedItems = useMemo(function () {
|
|
231
|
-
if (!(items !== null && items !== void 0 && items.length)) return [];
|
|
232
|
-
return _toConsumableArray(items).sort(function (a, b) {
|
|
233
|
-
var indexA = expectedOrder.indexOf(a.key);
|
|
234
|
-
var indexB = expectedOrder.indexOf(b.key);
|
|
235
|
-
return indexA - indexB;
|
|
236
|
-
});
|
|
237
|
-
}, [items]);
|
|
244
|
+
var filteredItems = (items || []).filter(function (item) {
|
|
245
|
+
return item.display !== 0;
|
|
246
|
+
});
|
|
238
247
|
return /*#__PURE__*/React.createElement("div", {
|
|
239
248
|
className: "pisell-wallet-card-list",
|
|
240
249
|
style: {
|
|
241
|
-
justifyContent:
|
|
250
|
+
justifyContent: filteredItems.length > 1 ? 'space-between' : 'flex-start'
|
|
242
251
|
}
|
|
243
|
-
},
|
|
252
|
+
}, filteredItems.map(function (item, index) {
|
|
244
253
|
return /*#__PURE__*/React.createElement(CardItem, {
|
|
245
254
|
key: index,
|
|
246
255
|
item: item,
|
|
@@ -386,7 +395,9 @@ var WalletCard = function WalletCard(props) {
|
|
|
386
395
|
}
|
|
387
396
|
utils === null || utils === void 0 || utils.action({
|
|
388
397
|
type: 'pisell1.goWallet',
|
|
389
|
-
data: {
|
|
398
|
+
data: {
|
|
399
|
+
id: props.id
|
|
400
|
+
},
|
|
390
401
|
callback: function callback() {}
|
|
391
402
|
});
|
|
392
403
|
};
|
package/es/locales/en-US.js
CHANGED
|
@@ -162,7 +162,7 @@ export default {
|
|
|
162
162
|
'pisell-adjust-price-total-after-discount': 'Total after discount: ',
|
|
163
163
|
'pisell-adjust-price-discount-can-be-maximum': 'Discount can be maximum',
|
|
164
164
|
'pisell-discount-card-title': 'Discount',
|
|
165
|
-
'pisell-discount-card-unit': '
|
|
165
|
+
'pisell-discount-card-unit': 'OFF',
|
|
166
166
|
'pisell-discount-card-fixed-amount-prefix': 'Save',
|
|
167
167
|
// 数据源表格
|
|
168
168
|
'pisell-data-source-table-add': 'Add',
|
|
@@ -225,7 +225,7 @@ export default {
|
|
|
225
225
|
'pisell-action-get-data': 'Please get data first',
|
|
226
226
|
'pisell-action-delete-success': 'Deleted successfully',
|
|
227
227
|
'pisell-action-delete-failed': 'Delete failed, please try again',
|
|
228
|
-
'walletCard-
|
|
228
|
+
'walletCard-point': 'Points',
|
|
229
229
|
'walletCard-rechargeable': 'Balance',
|
|
230
230
|
'walletCard-voucher': 'Voucher',
|
|
231
231
|
'walletCard-discount': 'Discount',
|
package/es/locales/zh-CN.js
CHANGED
|
@@ -224,7 +224,7 @@ export default {
|
|
|
224
224
|
'pisell-action-get-data': '请先获取数据',
|
|
225
225
|
'pisell-action-delete-success': '删除成功',
|
|
226
226
|
'pisell-action-delete-failed': '删除失败,请重试',
|
|
227
|
-
'walletCard-
|
|
227
|
+
'walletCard-point': '积分',
|
|
228
228
|
'walletCard-rechargeable': '余额',
|
|
229
229
|
'walletCard-voucher': '代金券',
|
|
230
230
|
'walletCard-discount': '折扣卡',
|
package/es/locales/zh-TW.js
CHANGED
|
@@ -224,7 +224,7 @@ export default {
|
|
|
224
224
|
'pisell-action-get-data': '請先獲取數據',
|
|
225
225
|
'pisell-action-delete-success': '刪除成功',
|
|
226
226
|
'pisell-action-delete-failed': '刪除失敗,請重試',
|
|
227
|
-
'walletCard-
|
|
227
|
+
'walletCard-point': '積分',
|
|
228
228
|
'walletCard-rechargeable': '餘額',
|
|
229
229
|
'walletCard-voucher': '代金券',
|
|
230
230
|
'walletCard-discount': '折扣卡',
|
package/es/typings.d.ts
CHANGED
package/es/utils/index.d.ts
CHANGED
package/es/utils/platform.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const isMobile: () =>
|
|
1
|
+
export declare const isMobile: () => any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const useDataSourceKey: () => {
|
|
2
|
-
dataSourceKey: string | undefined;
|
|
3
|
-
dataSourceKeyRef: import("react").MutableRefObject<string | undefined>;
|
|
2
|
+
dataSourceKey: string | import("../../provider/dataSource/DataSourceContext").DataSourceType | undefined;
|
|
3
|
+
dataSourceKeyRef: import("react").MutableRefObject<string | import("../../provider/dataSource/DataSourceContext").DataSourceType | undefined>;
|
|
4
4
|
};
|
|
5
5
|
export default useDataSourceKey;
|
|
@@ -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" | "
|
|
5
|
+
rootDomain: "custom" | "xzero" | "saas";
|
|
6
6
|
customDomain?: string | undefined;
|
|
7
7
|
value?: string | undefined;
|
|
8
8
|
tenantId: string;
|
|
@@ -19,7 +19,7 @@ declare const formFieldMap: {
|
|
|
19
19
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
20
20
|
onChange: (value: string) => void;
|
|
21
21
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
22
|
-
rootDomain: "custom" | "
|
|
22
|
+
rootDomain: "custom" | "xzero" | "saas";
|
|
23
23
|
customDomain?: string | undefined;
|
|
24
24
|
value?: string | undefined;
|
|
25
25
|
tenantId: string;
|
|
@@ -59,11 +59,7 @@ declare const formFieldMap: {
|
|
|
59
59
|
FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
60
60
|
FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
61
61
|
};
|
|
62
|
-
declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<
|
|
63
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
64
|
-
} & {
|
|
65
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
66
|
-
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
62
|
+
declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<import("./Input/type").InputProps> & {
|
|
67
63
|
JSON: import("react").FC<any>;
|
|
68
64
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
69
65
|
TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
@@ -76,14 +72,18 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
|
|
|
76
72
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
77
73
|
onChange: (value: string) => void;
|
|
78
74
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
79
|
-
rootDomain: "custom" | "
|
|
75
|
+
rootDomain: "custom" | "xzero" | "saas";
|
|
80
76
|
customDomain?: string | undefined;
|
|
81
77
|
value?: string | undefined;
|
|
82
78
|
tenantId: string;
|
|
83
79
|
name?: string | undefined;
|
|
84
80
|
fieldKey?: string | undefined;
|
|
85
81
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
86
|
-
}) | (import("react").FC<{}> & {
|
|
82
|
+
}) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
|
|
83
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
84
|
+
} & {
|
|
85
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
86
|
+
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
|
|
87
87
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
88
88
|
} & {
|
|
89
89
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & 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<any> | import("react").FC<import("./
|
|
98
|
+
}) => JSX.Element) | import("react").FC<any> | 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
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>;
|
|
101
101
|
export { getFieldComponent, formFieldMap };
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/pisellText/components/Editable/index.tsx
|
|
30
|
+
var Editable_exports = {};
|
|
31
|
+
__export(Editable_exports, {
|
|
32
|
+
default: () => Editable_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Editable_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_icon = __toESM(require("../../../icon"));
|
|
38
|
+
var import_utils = require("@pisell/utils");
|
|
39
|
+
var import_classnames = __toESM(require("classnames"));
|
|
40
|
+
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
|
41
|
+
var import_translation = __toESM(require("../../../translation"));
|
|
42
|
+
var import_index = require("./index.less");
|
|
43
|
+
var Editable = (props) => {
|
|
44
|
+
const {
|
|
45
|
+
value,
|
|
46
|
+
children,
|
|
47
|
+
editable = false,
|
|
48
|
+
onChange,
|
|
49
|
+
className,
|
|
50
|
+
size = "middle",
|
|
51
|
+
...others
|
|
52
|
+
} = props;
|
|
53
|
+
const context = (0, import_useEngineContext.default)();
|
|
54
|
+
const [isEditing, setIsEditing] = (0, import_react.useState)(false);
|
|
55
|
+
const editableConfig = (0, import_react.useMemo)(() => {
|
|
56
|
+
if (typeof editable === "boolean") {
|
|
57
|
+
return editable ? {} : null;
|
|
58
|
+
}
|
|
59
|
+
return editable || null;
|
|
60
|
+
}, [editable]);
|
|
61
|
+
const currentLocale = (0, import_react.useMemo)(() => {
|
|
62
|
+
var _a, _b;
|
|
63
|
+
const locale = (_b = (_a = context.appHelper.utils) == null ? void 0 : _a.storage) == null ? void 0 : _b.get("umi_locale");
|
|
64
|
+
return import_utils.locales.formatLocale(locale);
|
|
65
|
+
}, []);
|
|
66
|
+
const displayValue = (0, import_react.useMemo)(() => {
|
|
67
|
+
if (typeof children === "string") return children;
|
|
68
|
+
if (typeof value === "string") {
|
|
69
|
+
return value;
|
|
70
|
+
}
|
|
71
|
+
if (value && typeof value === "object") {
|
|
72
|
+
return value[currentLocale] || "";
|
|
73
|
+
}
|
|
74
|
+
return "";
|
|
75
|
+
}, [value, currentLocale, children]);
|
|
76
|
+
const isMultiLanguage = (0, import_react.useMemo)(() => {
|
|
77
|
+
return !!value && typeof value === "object";
|
|
78
|
+
}, [value]);
|
|
79
|
+
const handleEdit = () => {
|
|
80
|
+
if (editableConfig == null ? void 0 : editableConfig.disabled) return;
|
|
81
|
+
setIsEditing(true);
|
|
82
|
+
};
|
|
83
|
+
const handleInputChange = (newValue) => {
|
|
84
|
+
if (!onChange) return;
|
|
85
|
+
onChange(newValue);
|
|
86
|
+
};
|
|
87
|
+
if (isEditing && editableConfig) {
|
|
88
|
+
if (isMultiLanguage) {
|
|
89
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("pisell-text-editable-editing", className) }, /* @__PURE__ */ import_react.default.createElement(
|
|
90
|
+
import_translation.default,
|
|
91
|
+
{
|
|
92
|
+
value,
|
|
93
|
+
onChange: handleInputChange,
|
|
94
|
+
onPressEnter: () => setIsEditing(false),
|
|
95
|
+
maxLength: editableConfig.maxLength,
|
|
96
|
+
size,
|
|
97
|
+
autoFocus: true
|
|
98
|
+
}
|
|
99
|
+
));
|
|
100
|
+
}
|
|
101
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
102
|
+
import_antd.Input,
|
|
103
|
+
{
|
|
104
|
+
value: displayValue,
|
|
105
|
+
onChange: (e) => handleInputChange(e.target.value),
|
|
106
|
+
onPressEnter: () => setIsEditing(false),
|
|
107
|
+
maxLength: editableConfig.maxLength,
|
|
108
|
+
size,
|
|
109
|
+
autoFocus: true,
|
|
110
|
+
className: (0, import_classnames.default)("pisell-text-editable-input", className),
|
|
111
|
+
style: others.style
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
116
|
+
"span",
|
|
117
|
+
{
|
|
118
|
+
className: (0, import_classnames.default)("pisell-text-editable", className, {
|
|
119
|
+
"pisell-text-editable-enabled": editableConfig && !editableConfig.disabled
|
|
120
|
+
}),
|
|
121
|
+
...others
|
|
122
|
+
},
|
|
123
|
+
displayValue,
|
|
124
|
+
editableConfig && !editableConfig.disabled && !isEditing && /* @__PURE__ */ import_react.default.createElement(
|
|
125
|
+
"span",
|
|
126
|
+
{
|
|
127
|
+
className: "pisell-text-editable-edit-icon",
|
|
128
|
+
onClick: (e) => {
|
|
129
|
+
e.preventDefault();
|
|
130
|
+
e.stopPropagation();
|
|
131
|
+
handleEdit();
|
|
132
|
+
},
|
|
133
|
+
title: "点击编辑"
|
|
134
|
+
},
|
|
135
|
+
editableConfig.icon || /* @__PURE__ */ import_react.default.createElement(import_icon.default, { type: "pisell2-edit-05", size: 16 })
|
|
136
|
+
)
|
|
137
|
+
);
|
|
138
|
+
};
|
|
139
|
+
var Editable_default = Editable;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
.pisell-text-editable {
|
|
2
|
+
position: relative;
|
|
3
|
+
|
|
4
|
+
&-enabled {
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
&-edit-icon {
|
|
9
|
+
margin-left: 4px;
|
|
10
|
+
color: rgba(0, 0, 0, 0.45);
|
|
11
|
+
font-size: 12px;
|
|
12
|
+
opacity: 1;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
pointer-events: auto;
|
|
15
|
+
z-index: 1;
|
|
16
|
+
|
|
17
|
+
&:hover {
|
|
18
|
+
color: #1890ff;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// 确保内部的图标不会阻止点击事件
|
|
22
|
+
* {
|
|
23
|
+
pointer-events: none;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&-input {
|
|
28
|
+
min-width: 100px;
|
|
29
|
+
|
|
30
|
+
&.ant-input {
|
|
31
|
+
border: 1px solid #1890ff;
|
|
32
|
+
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&-editing {
|
|
37
|
+
display: inline-block;
|
|
38
|
+
width: 100%;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -34,8 +34,10 @@ __export(pisellText_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(pisellText_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_Amount = __toESM(require("./components/Amount"));
|
|
37
|
+
var import_Editable = __toESM(require("./components/Editable"));
|
|
37
38
|
var PisellText = (props) => {
|
|
38
39
|
return /* @__PURE__ */ import_react.default.createElement("span", { ...props });
|
|
39
40
|
};
|
|
40
41
|
PisellText.Amount = import_Amount.default;
|
|
42
|
+
PisellText.Editable = import_Editable.default;
|
|
41
43
|
var pisellText_default = PisellText;
|
|
@@ -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) =>
|
|
20
|
+
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;
|
|
@@ -51,6 +51,7 @@ var SelectBase = (0, import_react.forwardRef)((props, ref) => {
|
|
|
51
51
|
options,
|
|
52
52
|
dropdownRender: propsDropdownRender,
|
|
53
53
|
showSearch,
|
|
54
|
+
onSearch,
|
|
54
55
|
styleType,
|
|
55
56
|
optionFilterProp = "value",
|
|
56
57
|
popupClassName,
|
|
@@ -111,7 +112,10 @@ var SelectBase = (0, import_react.forwardRef)((props, ref) => {
|
|
|
111
112
|
size: "middle",
|
|
112
113
|
placeholder: (0, import_locales.getText)("select-dropdown-render-search"),
|
|
113
114
|
value: searchValue,
|
|
114
|
-
onChange: (e) =>
|
|
115
|
+
onChange: (e) => {
|
|
116
|
+
onSearch == null ? void 0 : onSearch(e.target.value);
|
|
117
|
+
setSearchValue(e.target.value);
|
|
118
|
+
},
|
|
115
119
|
bordered: false,
|
|
116
120
|
allowClear: true,
|
|
117
121
|
prefix: /* @__PURE__ */ import_react.default.createElement(import_iconfont.default, { style: { color: "#98A2B3" }, type: "pisell2-search-lg" })
|
|
@@ -142,7 +146,8 @@ var SelectBase = (0, import_react.forwardRef)((props, ref) => {
|
|
|
142
146
|
checkboxChecked,
|
|
143
147
|
propsDropdownRender,
|
|
144
148
|
searchValue,
|
|
145
|
-
showSearch
|
|
149
|
+
showSearch,
|
|
150
|
+
onSearch
|
|
146
151
|
]
|
|
147
152
|
);
|
|
148
153
|
if (styleType === "system") {
|
|
@@ -54,8 +54,8 @@ var SortableList = (props) => {
|
|
|
54
54
|
activationConstraint
|
|
55
55
|
},
|
|
56
56
|
(params) => {
|
|
57
|
-
const { item, props: p, attributes, listeners, style } = params;
|
|
58
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { ...p, ...attributes, ...listeners, style }, renderItem == null ? void 0 : renderItem(item));
|
|
57
|
+
const { item, index, props: p, attributes, listeners, style } = params;
|
|
58
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { ...p, ...attributes, ...listeners, style }, renderItem == null ? void 0 : renderItem(item, index));
|
|
59
59
|
}
|
|
60
60
|
);
|
|
61
61
|
};
|
package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.js
CHANGED
|
@@ -27,6 +27,11 @@ var import_locales = require("../../../../../../../locales/index");
|
|
|
27
27
|
var import_serve = require("../../../../../serve");
|
|
28
28
|
var import_status = require("../../../../../status");
|
|
29
29
|
var import_file = require("../../utils/file");
|
|
30
|
+
var exportImportTypeMap = {
|
|
31
|
+
"current-page": "page",
|
|
32
|
+
"all-records": "all",
|
|
33
|
+
"selected-records": "select"
|
|
34
|
+
};
|
|
30
35
|
var _batchExport = async (params) => {
|
|
31
36
|
let { status } = await (0, import_serve.exportData)(params);
|
|
32
37
|
if (status) {
|
|
@@ -42,7 +47,7 @@ var _batchExport = async (params) => {
|
|
|
42
47
|
var batchExport = (exportParams, exportImport) => {
|
|
43
48
|
const { selectLists, apiUrl, otherParams } = exportImport;
|
|
44
49
|
let _name = (0, import_file.getFileDateName)();
|
|
45
|
-
let params = { ...otherParams };
|
|
50
|
+
let params = (otherParams == null ? void 0 : otherParams.export) ? { ...otherParams == null ? void 0 : otherParams.export } : { ...otherParams };
|
|
46
51
|
params.url = apiUrl == null ? void 0 : apiUrl.export;
|
|
47
52
|
console.log("exportParams", exportParams);
|
|
48
53
|
const type = (exportParams == null ? void 0 : exportParams.type) || import_status.defaultOptions.exportType;
|
|
@@ -72,6 +77,7 @@ var batchExport = (exportParams, exportImport) => {
|
|
|
72
77
|
params == null ? true : delete params.payment_status;
|
|
73
78
|
params == null ? true : delete params.status;
|
|
74
79
|
}
|
|
80
|
+
params.export_select = exportImportTypeMap[type];
|
|
75
81
|
return _batchExport(params);
|
|
76
82
|
};
|
|
77
83
|
// Annotate the CommonJS export names for ESM import in node:
|