@pisell/materials 6.3.4 → 6.4.2
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 +4 -4
- package/build/lowcode/preview.js +150 -150
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +28 -24
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +34 -30
- package/es/components/DragSortList/index.js +6 -6
- package/es/components/classicLayout/index.js +4 -5
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +10 -10
- package/es/components/filter/index.d.ts +1 -0
- package/es/components/icon/index.js +5 -5
- package/es/components/iconfont/index.js +1 -1
- package/es/components/list/index.d.ts +1 -0
- package/es/components/list/index.js +6 -6
- package/es/components/pisell-config-provider/context.d.ts +2 -0
- package/es/components/pisell-config-provider/index.d.ts +1 -0
- package/es/components/pisellAdjustPrice/index.js +5 -1
- package/es/components/pisellAdjustPrice/type.d.ts +2 -0
- package/es/components/pisellCardList/index.d.ts +32 -2
- package/es/components/pisellCardList/index.js +42 -3
- package/es/components/pisellCardList/index.less +9 -1
- package/es/components/pisellCheckboxGroup/index.d.ts +4 -0
- package/es/components/pisellCheckboxGroup/index.js +23 -4
- package/es/components/pisellCheckboxGroup/index.less +28 -1
- package/es/components/pisellGoodPassCard/index.d.ts +1 -0
- package/es/components/pisellGoodPassCard/index.js +17 -5
- package/es/components/pisellText/components/Amount/index.js +2 -1
- package/es/components/pisellToast/index.js +3 -0
- package/es/components/pisellWalletPassCard/index.d.ts +53 -1
- package/es/components/pisellWalletPassCard/index.js +333 -75
- package/es/components/pisellWalletPassCard/index.less +48 -11
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.js +80 -0
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.less +75 -0
- package/es/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/MultiDay/index.js +82 -0
- package/es/components/productCard/cartSkuCard/components/MultiDay/index.less +31 -0
- package/es/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +14 -0
- package/es/components/productCard/cartSkuCard/components/MultiDay/utils.js +56 -0
- package/es/components/productCard/cartSkuCard/components/Note/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/Note/index.js +29 -0
- package/es/components/productCard/cartSkuCard/components/Note/index.less +27 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +27 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +93 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.less +117 -0
- package/es/components/productCard/cartSkuCard/components/discountReason/index.d.ts +2 -0
- package/es/components/productCard/cartSkuCard/components/discountReason/index.js +51 -0
- package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/holders/index.js +32 -0
- package/es/components/productCard/cartSkuCard/components/holders/index.less +32 -0
- package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +10 -0
- package/es/components/productCard/cartSkuCard/components/packages/index.js +52 -0
- package/es/components/productCard/cartSkuCard/components/packages/index.less +22 -0
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +20 -0
- package/es/components/productCard/cartSkuCard/components/packages/utils.js +40 -0
- package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/resources/index.js +39 -0
- package/es/components/productCard/cartSkuCard/components/resources/index.less +19 -0
- package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +12 -0
- package/es/components/productCard/cartSkuCard/components/sales/index.js +57 -0
- package/es/components/productCard/cartSkuCard/components/sales/index.less +22 -0
- package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/specs/index.js +44 -0
- package/es/components/productCard/cartSkuCard/components/specs/index.less +34 -0
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +45 -0
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.js +292 -0
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.less +35 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +6 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.js +54 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.less +38 -0
- package/es/components/productCard/cartSkuCard/index.d.ts +10 -0
- package/es/components/productCard/cartSkuCard/index.js +201 -0
- package/es/components/productCard/cartSkuCard/index.less +33 -0
- package/es/components/productCard/cartSkuCard/locales.d.ts +96 -0
- package/es/components/productCard/cartSkuCard/locales.js +30 -0
- package/es/components/productCard/components/Action/index.js +14 -1
- package/es/components/productCard/components/Action/index.less +3 -0
- package/es/components/productCard/components/Header/index.js +23 -8
- package/es/components/productCard/components/Header/index.less +16 -1
- package/es/components/productCard/components/Sales/index.js +2 -2
- package/es/components/productCard/components/Time/components/SelectHolderModal/index.js +3 -1
- package/es/components/productCard/components/Time/components/SelectHolderModal/index.less +3 -0
- package/es/components/productCard/index.d.ts +3 -1
- package/es/components/productCard/index.js +5 -2
- package/es/components/productCard/index.less +6 -0
- package/es/components/productCard/locales.js +3 -0
- package/es/components/qrcode/index.js +1 -1
- package/es/components/sort/components/InlineMenu/index.js +1 -1
- package/es/components/table/Actions/component/ButtonIcon/index.js +5 -5
- package/es/components/table/Actions/component/ViewMode/index.js +1 -1
- package/es/components/table/Gallery/components/GalleryItem/components/RenderFields/index.js +4 -5
- package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/es/components/table/Header/Buttons/index.js +5 -5
- package/es/components/table/Table/AddFieldModal/index.d.ts +1 -0
- package/es/components/table/Table/AddFieldModal/index.js +13 -13
- package/es/components/table/Table/AddFieldModal/index.less +11 -11
- package/es/components/table/Table/SelectField/index.d.ts +1 -0
- package/es/components/table/Table/SelectField/index.js +4 -4
- package/es/components/table/Table/fields/date/Edit/index.js +1 -1
- package/es/components/table/Table/fields/index.d.ts +3 -2
- package/es/components/table/Table/fields/link/Edit/index.js +5 -5
- package/es/components/table/Table/fields/rangePicker/filterUtil/index.js +1 -1
- package/es/components/table/Table/fields/search/filterUtil/index.js +0 -1
- package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/fields/text/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/text/Show/index.js +4 -4
- package/es/components/table/Table/fields/text/filterUtil/index.js +0 -1
- package/es/components/table/Table/fields/text/index.d.ts +1 -0
- package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/tableConfig/SortRow/index.js +2 -2
- package/es/components/table/Table/tableConfig/body/CellContent/index.js +3 -3
- package/es/components/table/Table/tableConfig/body/CellProvider/index.js +8 -8
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/hooks/useMergeColumnSetting.js +1 -2
- package/es/components/table/hooks/useTransDataSourceGroupSetting.js +5 -5
- package/es/components/table/hooks/useTransFilterSetting.js +5 -5
- package/es/components/translation/utils.js +5 -5
- package/es/components/virtual-keyboard/Number/index.js +4 -1
- package/es/components/virtual-keyboard/Number/types.d.ts +1 -0
- package/es/components/virtual-keyboard/index.d.ts +11 -0
- package/es/components/virtual-keyboard/index.js +88 -3
- package/es/components/virtual-keyboard/index.less +33 -1
- package/es/components/walletCard/Guide/index.js +12 -1
- package/es/hooks/useResponsive.js +2 -2
- package/es/index.d.ts +1 -0
- package/es/locales/en-US.d.ts +6 -0
- package/es/locales/en-US.js +9 -2
- package/es/locales/zh-CN.d.ts +6 -0
- package/es/locales/zh-CN.js +9 -2
- package/es/locales/zh-TW.d.ts +6 -0
- package/es/locales/zh-TW.js +9 -2
- package/es/utils/hoc.js +1 -1
- package/es/utils/index.d.ts +1 -1
- package/es/utils/miniRedux.js +8 -9
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +10 -10
- package/lib/components/filter/index.d.ts +1 -0
- package/lib/components/iconfont/index.js +1 -1
- package/lib/components/list/index.d.ts +1 -0
- package/lib/components/lowCodePage/index.js +1 -2
- package/lib/components/pisell-config-provider/context.d.ts +2 -0
- package/lib/components/pisell-config-provider/index.d.ts +1 -0
- package/lib/components/pisellAdjustPrice/index.js +4 -0
- package/lib/components/pisellAdjustPrice/type.d.ts +2 -0
- package/lib/components/pisellCardList/index.d.ts +32 -2
- package/lib/components/pisellCardList/index.js +42 -3
- package/lib/components/pisellCardList/index.less +9 -1
- package/lib/components/pisellCheckboxGroup/index.d.ts +4 -0
- package/lib/components/pisellCheckboxGroup/index.js +22 -1
- package/lib/components/pisellCheckboxGroup/index.less +28 -1
- package/lib/components/pisellGoodPassCard/index.d.ts +1 -0
- package/lib/components/pisellGoodPassCard/index.js +31 -4
- package/lib/components/pisellText/components/Amount/index.js +2 -1
- package/lib/components/pisellToast/index.js +3 -0
- package/lib/components/pisellWalletPassCard/index.d.ts +53 -1
- package/lib/components/pisellWalletPassCard/index.js +253 -59
- package/lib/components/pisellWalletPassCard/index.less +48 -11
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.js +80 -0
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.less +75 -0
- package/lib/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/MultiDay/index.js +71 -0
- package/lib/components/productCard/cartSkuCard/components/MultiDay/index.less +31 -0
- package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +14 -0
- package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.js +77 -0
- package/lib/components/productCard/cartSkuCard/components/Note/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/Note/index.js +56 -0
- package/lib/components/productCard/cartSkuCard/components/Note/index.less +27 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +27 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +82 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.less +117 -0
- package/lib/components/productCard/cartSkuCard/components/discountReason/index.d.ts +2 -0
- package/lib/components/productCard/cartSkuCard/components/discountReason/index.js +70 -0
- package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/holders/index.js +52 -0
- package/lib/components/productCard/cartSkuCard/components/holders/index.less +32 -0
- package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +10 -0
- package/lib/components/productCard/cartSkuCard/components/packages/index.js +73 -0
- package/lib/components/productCard/cartSkuCard/components/packages/index.less +22 -0
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +20 -0
- package/lib/components/productCard/cartSkuCard/components/packages/utils.js +44 -0
- package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/resources/index.js +71 -0
- package/lib/components/productCard/cartSkuCard/components/resources/index.less +19 -0
- package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +12 -0
- package/lib/components/productCard/cartSkuCard/components/sales/index.js +77 -0
- package/lib/components/productCard/cartSkuCard/components/sales/index.less +22 -0
- package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/specs/index.js +66 -0
- package/lib/components/productCard/cartSkuCard/components/specs/index.less +34 -0
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +45 -0
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.js +339 -0
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.less +35 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +6 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.js +68 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.less +38 -0
- package/lib/components/productCard/cartSkuCard/index.d.ts +10 -0
- package/lib/components/productCard/cartSkuCard/index.js +239 -0
- package/lib/components/productCard/cartSkuCard/index.less +33 -0
- package/lib/components/productCard/cartSkuCard/locales.d.ts +96 -0
- package/lib/components/productCard/cartSkuCard/locales.js +61 -0
- package/lib/components/productCard/components/Action/index.js +9 -0
- package/lib/components/productCard/components/Action/index.less +3 -0
- package/lib/components/productCard/components/Header/index.js +21 -11
- package/lib/components/productCard/components/Header/index.less +16 -1
- package/lib/components/productCard/components/Sales/index.js +2 -2
- package/lib/components/productCard/components/Time/components/SelectHolderModal/index.js +1 -1
- package/lib/components/productCard/components/Time/components/SelectHolderModal/index.less +3 -0
- package/lib/components/productCard/index.d.ts +3 -1
- package/lib/components/productCard/index.js +6 -2
- package/lib/components/productCard/index.less +6 -0
- package/lib/components/productCard/locales.js +12 -3
- package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/lib/components/table/Table/AddFieldModal/index.d.ts +1 -0
- package/lib/components/table/Table/AddFieldModal/index.js +9 -9
- package/lib/components/table/Table/AddFieldModal/index.less +11 -11
- package/lib/components/table/Table/SelectField/index.d.ts +1 -0
- package/lib/components/table/Table/fields/date/filterUtil/index.js +3 -6
- package/lib/components/table/Table/fields/index.d.ts +3 -2
- package/lib/components/table/Table/fields/rangePicker/filterUtil/index.js +4 -8
- package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/fields/text/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/text/index.d.ts +1 -0
- package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/fields/utils/index.js +1 -2
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/virtual-keyboard/Number/index.js +3 -0
- package/lib/components/virtual-keyboard/Number/types.d.ts +1 -0
- package/lib/components/virtual-keyboard/index.d.ts +11 -0
- package/lib/components/virtual-keyboard/index.js +60 -2
- package/lib/components/virtual-keyboard/index.less +33 -1
- package/lib/components/walletCard/Guide/index.js +11 -1
- package/lib/hooks/useResponsive.js +3 -6
- package/lib/index.d.ts +1 -0
- package/lib/locales/en-US.d.ts +6 -0
- package/lib/locales/en-US.js +9 -2
- package/lib/locales/zh-CN.d.ts +6 -0
- package/lib/locales/zh-CN.js +9 -2
- package/lib/locales/zh-TW.d.ts +6 -0
- package/lib/locales/zh-TW.js +9 -2
- package/lib/utils/index.d.ts +1 -1
- package/lowcode/_setters/antd-icon-setter/index.tsx +3 -2
- package/lowcode/pisell-card-list/meta.ts +50 -1
- package/lowcode/pisell-wallet-pass-card/actionsMeta.ts +7 -0
- package/lowcode/virtual-keyboard/meta.ts +131 -0
- package/package.json +7 -4
- package/dist/umd/materials.min.css +0 -1
- package/dist/umd/materials.min.js +0 -1
- package/dist/umd/static/DotsSix.57d66266.svg +0 -1
- package/dist/umd/static/arrow-left.e542294f.svg +0 -1
- package/dist/umd/static/arrow-right.763f03e0.svg +0 -1
- package/dist/umd/static/filter-lines.04a54ae9.svg +0 -1
- package/dist/umd/static/help-circle.31c9be40.svg +0 -1
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +0 -1
package/es/utils/index.d.ts
CHANGED
package/es/utils/miniRedux.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
function _typeof(
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
-
function ownKeys(
|
|
4
|
-
function _objectSpread(
|
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
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; }
|
|
6
|
-
function _toPropertyKey(
|
|
7
|
-
function _toPrimitive(
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
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); }
|
|
8
8
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9
9
|
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."); }
|
|
10
10
|
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); }
|
|
11
11
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
12
|
-
function _iterableToArrayLimit(
|
|
12
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
13
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
14
|
import React, { createContext, useCallback, useReducer } from 'react';
|
|
15
15
|
export default (function (_ref2) {
|
|
@@ -23,7 +23,6 @@ export default (function (_ref2) {
|
|
|
23
23
|
var Context = /*#__PURE__*/createContext({});
|
|
24
24
|
var Provider = function Provider(ComponentUi) {
|
|
25
25
|
var Components = function Components(props, ref) {
|
|
26
|
-
var _objectSpread2, _ref5;
|
|
27
26
|
var _useReducer = useReducer(function (state, _ref3) {
|
|
28
27
|
var type = _ref3.type,
|
|
29
28
|
payload = _ref3.payload;
|
|
@@ -48,14 +47,14 @@ export default (function (_ref2) {
|
|
|
48
47
|
});
|
|
49
48
|
}
|
|
50
49
|
}, []);
|
|
51
|
-
var _props = _objectSpread(_objectSpread({}, props), {}, (
|
|
50
|
+
var _props = _objectSpread(_objectSpread({}, props), {}, _defineProperty(_defineProperty({}, namespace, providerState), "dispatch", _dispatch));
|
|
52
51
|
var _ref = ref;
|
|
53
52
|
// if (_props.forwardedRef) {
|
|
54
53
|
// _ref = _props.forwardedRef;
|
|
55
54
|
// delete _props.forwardedRef;
|
|
56
55
|
// }
|
|
57
56
|
return /*#__PURE__*/React.createElement(Context.Provider, {
|
|
58
|
-
value: (
|
|
57
|
+
value: _defineProperty(_defineProperty({}, namespace, providerState), "dispatch", _dispatch)
|
|
59
58
|
}, /*#__PURE__*/React.createElement(ComponentUi, _extends({}, _props, {
|
|
60
59
|
ref: _ref
|
|
61
60
|
})));
|
|
@@ -43,7 +43,7 @@ export declare const withDataSource: <P extends unknown>(WrappedComponent: React
|
|
|
43
43
|
}) => JSX.Element;
|
|
44
44
|
export declare const withOptions: <P extends unknown>(WrappedComponent: React.ComponentType<P>) => (props: P & {
|
|
45
45
|
options?: any;
|
|
46
|
-
optionSourceType?: "
|
|
46
|
+
optionSourceType?: "custom" | "default" | "api" | undefined;
|
|
47
47
|
labelField: string;
|
|
48
48
|
valueField: string;
|
|
49
49
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const useDataSourceKey: () => {
|
|
2
|
-
dataSourceKey: string |
|
|
3
|
-
dataSourceKeyRef: import("react").MutableRefObject<string |
|
|
2
|
+
dataSourceKey: string | undefined;
|
|
3
|
+
dataSourceKeyRef: import("react").MutableRefObject<string | undefined>;
|
|
4
4
|
};
|
|
5
5
|
export default useDataSourceKey;
|
|
@@ -17,7 +17,7 @@ interface UseTablePropsProps {
|
|
|
17
17
|
* @returns
|
|
18
18
|
*/
|
|
19
19
|
declare const useTableProps: (props: UseTablePropsProps) => {
|
|
20
|
-
title:
|
|
20
|
+
title: number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
|
|
21
21
|
pagination: {
|
|
22
22
|
total: number;
|
|
23
23
|
current: number;
|
|
@@ -26,7 +26,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
26
26
|
showSizeChanger: boolean;
|
|
27
27
|
};
|
|
28
28
|
columns: import("./useColumns").Column[];
|
|
29
|
-
subTitle:
|
|
29
|
+
subTitle: number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
|
|
30
30
|
buttons: any[] | null;
|
|
31
31
|
filter: JSX.Element | null;
|
|
32
32
|
onRow: (record: any) => any;
|
|
@@ -53,7 +53,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
53
53
|
width: number;
|
|
54
54
|
align: "center" | "left" | "right";
|
|
55
55
|
fixed: false | "left" | "right";
|
|
56
|
-
type: "
|
|
56
|
+
type: "button" | "link";
|
|
57
57
|
items: OperationItem[];
|
|
58
58
|
} | undefined;
|
|
59
59
|
operationContent?: {
|
|
@@ -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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const SelectWithDataSource: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps & {
|
|
2
2
|
options?: any;
|
|
3
|
-
optionSourceType?: "
|
|
3
|
+
optionSourceType?: "custom" | "default" | "api" | undefined;
|
|
4
4
|
labelField: string;
|
|
5
5
|
valueField: string;
|
|
6
6
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -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;
|
|
@@ -34,7 +34,7 @@ declare const formFieldMap: {
|
|
|
34
34
|
};
|
|
35
35
|
FormItemSelect: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
36
36
|
options?: any;
|
|
37
|
-
optionSourceType?: "
|
|
37
|
+
optionSourceType?: "custom" | "default" | "api" | undefined;
|
|
38
38
|
labelField: string;
|
|
39
39
|
valueField: string;
|
|
40
40
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -59,13 +59,11 @@ 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<any> | import("react").FC<import("./
|
|
62
|
+
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
|
|
63
63
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
64
64
|
} & {
|
|
65
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("
|
|
67
|
-
onChange: (value: string) => void;
|
|
68
|
-
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
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> & {
|
|
69
67
|
JSON: import("react").FC<any>;
|
|
70
68
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
71
69
|
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>;
|
|
@@ -78,24 +76,26 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
78
76
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
79
77
|
onChange: (value: string) => void;
|
|
80
78
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
81
|
-
rootDomain: "custom" | "
|
|
79
|
+
rootDomain: "custom" | "xzero" | "saas";
|
|
82
80
|
customDomain?: string | undefined;
|
|
83
81
|
value?: string | undefined;
|
|
84
82
|
tenantId: string;
|
|
85
83
|
name?: string | undefined;
|
|
86
84
|
fieldKey?: string | undefined;
|
|
87
85
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
88
|
-
}) |
|
|
86
|
+
}) | (import("react").FC<{}> & {
|
|
89
87
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
90
88
|
} & {
|
|
91
89
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
92
90
|
}) | ((props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
93
91
|
options?: any;
|
|
94
|
-
optionSourceType?: "
|
|
92
|
+
optionSourceType?: "custom" | "default" | "api" | undefined;
|
|
95
93
|
labelField: string;
|
|
96
94
|
valueField: string;
|
|
97
95
|
extraParams?: Record<string, any> | undefined;
|
|
98
96
|
} & {
|
|
99
97
|
dataSource?: any;
|
|
100
|
-
}) => JSX.Element) | import("react").FC<import("./
|
|
98
|
+
}) => JSX.Element) | 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
|
+
onChange: (value: string) => void;
|
|
100
|
+
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
101
101
|
export { getFieldComponent, formFieldMap };
|
|
@@ -35,7 +35,7 @@ module.exports = __toCommonJS(iconfont_exports);
|
|
|
35
35
|
var import_icons = require("@ant-design/icons");
|
|
36
36
|
var import_react = __toESM(require("react"));
|
|
37
37
|
var MyIcon = (0, import_icons.createFromIconfontCN)({
|
|
38
|
-
scriptUrl: "https://static.pisellcdn.com/pisell2iconfont1.
|
|
38
|
+
scriptUrl: "https://static.pisellcdn.com/pisell2iconfont1.11.js"
|
|
39
39
|
// 在 iconfont.cn 上生成
|
|
40
40
|
});
|
|
41
41
|
var IconFont = (props) => {
|
|
@@ -41,8 +41,7 @@ var LowCodePage = (props) => {
|
|
|
41
41
|
const context = (0, import_useEngineContext.default)();
|
|
42
42
|
const { RenderLowCodeByKey, getRenderLowCodeByKey } = ((_a = context.appHelper) == null ? void 0 : _a.utils) || {};
|
|
43
43
|
const Com = (0, import_utils.isFunction)(getRenderLowCodeByKey) ? getRenderLowCodeByKey() : RenderLowCodeByKey;
|
|
44
|
-
if (!Com)
|
|
45
|
-
return /* @__PURE__ */ import_react.default.createElement("div", null, "RenderLowCodeByKey is not found");
|
|
44
|
+
if (!Com) return /* @__PURE__ */ import_react.default.createElement("div", null, "RenderLowCodeByKey is not found");
|
|
46
45
|
return /* @__PURE__ */ import_react.default.createElement(Com, { ...others, id, key: id });
|
|
47
46
|
};
|
|
48
47
|
var lowCodePage_default = LowCodePage;
|
|
@@ -49,6 +49,8 @@ var PisellAdjustPrice = (props) => {
|
|
|
49
49
|
defaultValue,
|
|
50
50
|
originValue,
|
|
51
51
|
selectType = "light",
|
|
52
|
+
resetText,
|
|
53
|
+
doneText,
|
|
52
54
|
...others
|
|
53
55
|
} = props;
|
|
54
56
|
const config = (0, import_usePisellConfig.default)();
|
|
@@ -180,6 +182,8 @@ var PisellAdjustPrice = (props) => {
|
|
|
180
182
|
onChange: handleChange,
|
|
181
183
|
onEnter: handleEnter,
|
|
182
184
|
placeholder: discountMode === "amount" ? "0" : "%",
|
|
185
|
+
resetText,
|
|
186
|
+
doneText,
|
|
183
187
|
rightItemsStyle: {
|
|
184
188
|
buttonBackgroundColor: configColor.buttonBackgroundColor,
|
|
185
189
|
textColor: configColor.textColor,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PisellCheckboxGroupProps } from '../pisellCheckboxGroup';
|
|
3
3
|
import { PisellContextType } from '../pisell-config-provider/context';
|
|
4
|
-
import { PisellWalletPassCardProps } from '../pisellWalletPassCard';
|
|
4
|
+
import { PisellWalletPassCardProps, FormatOption } from '../pisellWalletPassCard';
|
|
5
5
|
import './index.less';
|
|
6
6
|
export interface PisellCardListProps extends Omit<PisellCheckboxGroupProps, 'options'> {
|
|
7
7
|
platform?: PisellContextType['platform'];
|
|
@@ -67,7 +67,37 @@ export interface PisellCardListProps extends Omit<PisellCheckboxGroupProps, 'opt
|
|
|
67
67
|
/** 编辑编辑按钮后,弹窗展示之前 */
|
|
68
68
|
beforeEdit?: (value: any, index: number) => Promise<any> | boolean | void;
|
|
69
69
|
/** 编辑弹窗点击提交 */
|
|
70
|
-
onConfirmEdit?: (value: any, index: number) => void;
|
|
70
|
+
onConfirmEdit?: (value: any, index: number, data: any) => 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: number, index: number, data: any) => 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
|
+
onBeforeEditAmount?: (value: any, index: number, data: any) => Promise<any> | boolean | void;
|
|
97
|
+
/** 选项点击事件 */
|
|
98
|
+
onItemClick?: (e: React.MouseEvent<HTMLDivElement>, option: any) => void;
|
|
99
|
+
/** 是否展示选中状态的背景色 */
|
|
100
|
+
showActiveBackground?: boolean;
|
|
71
101
|
}
|
|
72
102
|
declare const _default: React.NamedExoticComponent<PisellCardListProps>;
|
|
73
103
|
export default _default;
|
|
@@ -62,7 +62,20 @@ var PisellCardList = (props) => {
|
|
|
62
62
|
showValidDate,
|
|
63
63
|
empty,
|
|
64
64
|
showEmpty,
|
|
65
|
-
showBalanceSymbol
|
|
65
|
+
showBalanceSymbol,
|
|
66
|
+
onChangeDebounce,
|
|
67
|
+
showStatus,
|
|
68
|
+
nameTitleStyle,
|
|
69
|
+
enableEditAmount,
|
|
70
|
+
useExternalDetail,
|
|
71
|
+
onDetail,
|
|
72
|
+
formatBalance,
|
|
73
|
+
formatBalanceTitle,
|
|
74
|
+
formatRedeem,
|
|
75
|
+
formatRedeemTitle,
|
|
76
|
+
onBeforeEditAmount,
|
|
77
|
+
onItemClick,
|
|
78
|
+
showActiveBackground
|
|
66
79
|
} = props;
|
|
67
80
|
return data.length ? /* @__PURE__ */ import_react.default.createElement(
|
|
68
81
|
import_pisellCheckboxGroup.default,
|
|
@@ -76,12 +89,20 @@ var PisellCardList = (props) => {
|
|
|
76
89
|
onChange,
|
|
77
90
|
iconPosition: "hide",
|
|
78
91
|
fullWidth,
|
|
92
|
+
onChangeDebounce,
|
|
93
|
+
onItemClick,
|
|
94
|
+
showActiveBackground,
|
|
79
95
|
renderOption: (item, active, index) => {
|
|
80
96
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
81
97
|
import_pisellWalletPassCard.default,
|
|
82
98
|
{
|
|
83
99
|
...item,
|
|
84
100
|
active,
|
|
101
|
+
mode,
|
|
102
|
+
showActiveIcon: true,
|
|
103
|
+
showStatus: showStatus || (item == null ? void 0 : item.showStatus),
|
|
104
|
+
cardStatus: item == null ? void 0 : item.cardStatus,
|
|
105
|
+
nameTitleStyle: nameTitleStyle || (item == null ? void 0 : item.nameTitleStyle),
|
|
85
106
|
showName: showName || (item == null ? void 0 : item.showName),
|
|
86
107
|
showBalance: showBalance || (item == null ? void 0 : item.showBalance),
|
|
87
108
|
showCode: showCode || (item == null ? void 0 : item.showCode),
|
|
@@ -94,16 +115,34 @@ var PisellCardList = (props) => {
|
|
|
94
115
|
showBalanceSymbol: showBalanceSymbol || (item == null ? void 0 : item.showBalanceSymbol),
|
|
95
116
|
showActions: props.showActions || (item == null ? void 0 : item.showActions),
|
|
96
117
|
actions: props.actions || (item == null ? void 0 : item.actions),
|
|
118
|
+
enableEditAmount: enableEditAmount || (item == null ? void 0 : item.enableEditAmount),
|
|
119
|
+
useExternalDetail: useExternalDetail || (item == null ? void 0 : item.useExternalDetail),
|
|
120
|
+
onDetail: (record) => {
|
|
121
|
+
var _a;
|
|
122
|
+
return (_a = props == null ? void 0 : props.onDetail) == null ? void 0 : _a.call(props, record, index);
|
|
123
|
+
},
|
|
97
124
|
beforeEdit: (record) => {
|
|
98
125
|
var _a;
|
|
99
126
|
return (_a = props == null ? void 0 : props.beforeEdit) == null ? void 0 : _a.call(props, record, index);
|
|
100
127
|
},
|
|
128
|
+
onConfirmEditAmount: (value2) => {
|
|
129
|
+
var _a;
|
|
130
|
+
(_a = props.onConfirmEditAmount) == null ? void 0 : _a.call(props, value2, index, item);
|
|
131
|
+
},
|
|
101
132
|
onConfirmEdit: (newVal) => {
|
|
102
133
|
var _a;
|
|
103
|
-
(_a = props.onConfirmEdit) == null ? void 0 : _a.call(props, newVal, index);
|
|
134
|
+
(_a = props.onConfirmEdit) == null ? void 0 : _a.call(props, newVal, index, item);
|
|
104
135
|
},
|
|
136
|
+
formatBalance: formatBalance || (item == null ? void 0 : item.formatBalance),
|
|
137
|
+
formatBalanceTitle: formatBalanceTitle || (item == null ? void 0 : item.formatBalanceTitle),
|
|
105
138
|
type,
|
|
106
|
-
style: direction === "vertical" || direction === "horizontal" && fullWidth ? { width: "100%" } : {}
|
|
139
|
+
style: direction === "vertical" || direction === "horizontal" && fullWidth ? { width: "100%" } : {},
|
|
140
|
+
formatRedeem: formatRedeem || (item == null ? void 0 : item.formatRedeem),
|
|
141
|
+
formatRedeemTitle: formatRedeemTitle || (item == null ? void 0 : item.formatRedeemTitle),
|
|
142
|
+
onBeforeEditAmount: (record) => {
|
|
143
|
+
var _a;
|
|
144
|
+
return (_a = props == null ? void 0 : props.onBeforeEditAmount) == null ? void 0 : _a.call(props, record, index, item);
|
|
145
|
+
}
|
|
107
146
|
}
|
|
108
147
|
);
|
|
109
148
|
}
|
|
@@ -72,4 +72,12 @@
|
|
|
72
72
|
// .pisell-card-disabled {
|
|
73
73
|
// color: var(--Gray-500, #667085);
|
|
74
74
|
// padding-bottom: 36px;
|
|
75
|
-
// }
|
|
75
|
+
// }
|
|
76
|
+
|
|
77
|
+
.keyboard-modal-wrapper {
|
|
78
|
+
.pisell-amount-keyboard-wrap {
|
|
79
|
+
padding: 10px;
|
|
80
|
+
background: rgba(29, 41, 57, .8) !important;
|
|
81
|
+
border-radius: 10px;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -5,6 +5,7 @@ export interface PisellCheckboxGroupOption {
|
|
|
5
5
|
label: string;
|
|
6
6
|
value: string;
|
|
7
7
|
disabled?: boolean;
|
|
8
|
+
error?: boolean;
|
|
8
9
|
[key: string]: any;
|
|
9
10
|
}
|
|
10
11
|
declare type PisellCheckboxGroupValue = string | string[] | any;
|
|
@@ -23,6 +24,9 @@ export interface PisellCheckboxGroupProps extends React.HTMLAttributes<HTMLDivEl
|
|
|
23
24
|
iconPosition?: 'left' | 'right' | 'hide';
|
|
24
25
|
optionClassName?: string;
|
|
25
26
|
optionActiveClassName?: string;
|
|
27
|
+
onChangeDebounce?: boolean;
|
|
28
|
+
onItemClick?: (e: React.MouseEvent<HTMLDivElement>, option: PisellCheckboxGroupOption) => void;
|
|
29
|
+
showActiveBackground?: boolean;
|
|
26
30
|
}
|
|
27
31
|
/**
|
|
28
32
|
* @title: PisellCheckboxGroup
|
|
@@ -36,6 +36,7 @@ var import_react = __toESM(require("react"));
|
|
|
36
36
|
var import_usePisellConfig = __toESM(require("../pisell-config-provider/hooks/usePisellConfig"));
|
|
37
37
|
var import_classnames = __toESM(require("classnames"));
|
|
38
38
|
var import_antd = require("antd");
|
|
39
|
+
var import_ahooks = require("ahooks");
|
|
39
40
|
var import_utils = require("@pisell/utils");
|
|
40
41
|
var import_utils2 = require("@pisell/utils");
|
|
41
42
|
var import_index = require("./index.less");
|
|
@@ -62,6 +63,9 @@ var PisellCheckboxGroup = (props) => {
|
|
|
62
63
|
iconPosition = "left",
|
|
63
64
|
optionClassName,
|
|
64
65
|
optionActiveClassName,
|
|
66
|
+
onChangeDebounce,
|
|
67
|
+
onItemClick,
|
|
68
|
+
showActiveBackground = false,
|
|
65
69
|
...rest
|
|
66
70
|
} = props;
|
|
67
71
|
const [_value, set_value] = (0, import_react2.useState)([]);
|
|
@@ -112,6 +116,16 @@ var PisellCheckboxGroup = (props) => {
|
|
|
112
116
|
const _onChange = (val, item) => {
|
|
113
117
|
onChange == null ? void 0 : onChange(mode === "single" ? val[0] : val, item);
|
|
114
118
|
};
|
|
119
|
+
const { run } = (0, import_ahooks.useDebounceFn)(
|
|
120
|
+
(key, item) => {
|
|
121
|
+
handleSelectItem(key, item);
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
wait: 400,
|
|
125
|
+
leading: true,
|
|
126
|
+
trailing: false
|
|
127
|
+
}
|
|
128
|
+
);
|
|
115
129
|
const handleSelectItem = (key, item) => {
|
|
116
130
|
let newVal = [key];
|
|
117
131
|
if (mode === "multiple") {
|
|
@@ -138,14 +152,21 @@ var PisellCheckboxGroup = (props) => {
|
|
|
138
152
|
optionClassName,
|
|
139
153
|
{
|
|
140
154
|
"pisell-checkbox-group-item-active": active,
|
|
141
|
-
|
|
155
|
+
"pisell-checkbox-group-item-with-background": active && showActiveBackground,
|
|
156
|
+
[optionActiveClassName]: active,
|
|
157
|
+
"pisell-checkbox-group-item-error": option.error
|
|
142
158
|
}
|
|
143
159
|
),
|
|
144
160
|
key: option[rowKey],
|
|
145
161
|
gap: 10,
|
|
146
162
|
style: rowStyle,
|
|
147
163
|
onClick: (e) => {
|
|
164
|
+
onItemClick == null ? void 0 : onItemClick(e, option);
|
|
148
165
|
if (option.disabled) return;
|
|
166
|
+
if (onChangeDebounce) {
|
|
167
|
+
run(option[rowKey], option);
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
149
170
|
handleSelectItem(option[rowKey], option);
|
|
150
171
|
},
|
|
151
172
|
leftContent: iconPosition === "left" && /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -24,10 +24,37 @@
|
|
|
24
24
|
|
|
25
25
|
&.pisell-checkbox-group-item-active {
|
|
26
26
|
&::before {
|
|
27
|
-
border-width:
|
|
27
|
+
border-width: 4px;
|
|
28
28
|
border-color: var(--theme-color);
|
|
29
|
+
z-index: 1;
|
|
30
|
+
box-sizing: border-box;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// 可选的背景色样式,需要额外的类名才会应用
|
|
34
|
+
&.pisell-checkbox-group-item-with-background {
|
|
35
|
+
&::before {
|
|
36
|
+
background: var(--Primary-50, #F9F5FF);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
.pisell-row-center {
|
|
40
|
+
.pisell-row {
|
|
41
|
+
position: relative;
|
|
42
|
+
z-index: 1;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
.pisell-row-right {
|
|
46
|
+
position: relative;
|
|
47
|
+
z-index: 1;
|
|
29
48
|
}
|
|
49
|
+
}
|
|
30
50
|
|
|
51
|
+
&.pisell-checkbox-group-item-error {
|
|
52
|
+
&::before {
|
|
53
|
+
border-color: var(--Error-500, #F04438);
|
|
54
|
+
border-width: 2px;
|
|
55
|
+
background: var(--Error-50, #FEF3F2);
|
|
56
|
+
z-index: 1;
|
|
57
|
+
}
|
|
31
58
|
}
|
|
32
59
|
}
|
|
33
60
|
}
|
|
@@ -44,6 +44,7 @@ export interface PisellGoodPassCardProps {
|
|
|
44
44
|
style: React.CSSProperties;
|
|
45
45
|
/**快捷展示排序 */
|
|
46
46
|
mixedSort?: (val: Discount[]) => Discount[];
|
|
47
|
+
isInModal: boolean;
|
|
47
48
|
}
|
|
48
49
|
declare const index: (props: PisellGoodPassCardProps) => JSX.Element;
|
|
49
50
|
export default index;
|
|
@@ -86,7 +86,18 @@ var index = (props) => {
|
|
|
86
86
|
onCancel: () => setShowModal(false),
|
|
87
87
|
className: `${clsPrefix}-all-items-modal`
|
|
88
88
|
},
|
|
89
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
89
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
90
|
+
"div",
|
|
91
|
+
{
|
|
92
|
+
style: {
|
|
93
|
+
padding: "10px 0",
|
|
94
|
+
display: "flex",
|
|
95
|
+
flexDirection: "column",
|
|
96
|
+
gap: 12
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
dataSource.map(renderVoucherItem)
|
|
100
|
+
)
|
|
90
101
|
);
|
|
91
102
|
};
|
|
92
103
|
const renderMixedMode = () => {
|
|
@@ -94,7 +105,23 @@ var index = (props) => {
|
|
|
94
105
|
const list = sortList.length > 3 ? sortList.slice(0, 3) : sortList;
|
|
95
106
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: `${clsPrefix}-header` }, /* @__PURE__ */ import_react.default.createElement("div", null, (0, import_locales.getText)("pisell2.text.goodpass.product-vouchers")), /* @__PURE__ */ import_react.default.createElement(import_antd.Typography.Text, { underline: true, onClick: () => setShowModal(true) }, (0, import_locales.getText)("pisell2.text.goodpass.view-more"))), /* @__PURE__ */ import_react.default.createElement(import_antd.Divider, { style: { margin: 4 } }), /* @__PURE__ */ import_react.default.createElement("div", { className: `${clsPrefix}-body` }, list.map(renderVoucherItem)));
|
|
96
107
|
};
|
|
97
|
-
|
|
108
|
+
const renderModalMode = () => {
|
|
109
|
+
const sortList = (mixedSort == null ? void 0 : mixedSort(dataSource)) || dataSource;
|
|
110
|
+
if (sortList.length === 0) return null;
|
|
111
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
112
|
+
"div",
|
|
113
|
+
{
|
|
114
|
+
style: {
|
|
115
|
+
padding: "10px 0",
|
|
116
|
+
display: "flex",
|
|
117
|
+
flexDirection: "column",
|
|
118
|
+
gap: 12
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
sortList.map(renderVoucherItem)
|
|
122
|
+
);
|
|
123
|
+
};
|
|
124
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, !props.isInModal ? renderModal() : null, dataSource.length > 0 ? /* @__PURE__ */ import_react.default.createElement(
|
|
98
125
|
import__.PisellCard,
|
|
99
126
|
{
|
|
100
127
|
padding: 8,
|
|
@@ -105,7 +132,7 @@ var index = (props) => {
|
|
|
105
132
|
},
|
|
106
133
|
className: clsPrefix
|
|
107
134
|
},
|
|
108
|
-
renderMixedMode()
|
|
109
|
-
));
|
|
135
|
+
props.isInModal ? renderModalMode() : renderMixedMode()
|
|
136
|
+
) : null);
|
|
110
137
|
};
|
|
111
138
|
var pisellGoodPassCard_default = index;
|
|
@@ -47,7 +47,8 @@ var Amount = (props) => {
|
|
|
47
47
|
} = props;
|
|
48
48
|
const config = (0, import_usePisellConfig.default)();
|
|
49
49
|
const amount = (0, import_react.useMemo)(() => {
|
|
50
|
-
|
|
50
|
+
var _a;
|
|
51
|
+
return (0, import_utils.formatAmountWithOptions)(value, symbol || (config == null ? void 0 : config.symbol) || ((_a = config == null ? void 0 : config.getSymbolic) == null ? void 0 : _a.call(config)) || "", {
|
|
51
52
|
precision,
|
|
52
53
|
showCurrencySymbol,
|
|
53
54
|
useThousandsSeparator,
|