@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
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
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
|
+
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; }
|
|
3
|
+
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; }
|
|
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
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
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
7
|
import { DndContext, PointerSensor, useSensor, useSensors } from "@dnd-kit/core";
|
|
8
8
|
import { SortableContext, arrayMove, useSortable } from "@dnd-kit/sortable";
|
|
9
9
|
import { CSS } from "@dnd-kit/utilities";
|
|
@@ -41,7 +41,7 @@ export default function Sortable(_ref) {
|
|
|
41
41
|
var overIndex = list === null || list === void 0 ? void 0 : list.findIndex(function (i) {
|
|
42
42
|
return getRowKey(i) === (over === null || over === void 0 ? void 0 : over.id);
|
|
43
43
|
});
|
|
44
|
-
onChange === null || onChange === void 0
|
|
44
|
+
onChange === null || onChange === void 0 || onChange(arrayMove(list, activeIndex, overIndex));
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
sensors: sensors
|
|
@@ -1,13 +1,12 @@
|
|
|
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 _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; }
|
|
3
|
-
function _toPropertyKey(
|
|
4
|
-
function _toPrimitive(
|
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
|
+
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); }
|
|
5
5
|
import React from "react";
|
|
6
6
|
import classNames from "classnames";
|
|
7
7
|
import "./index.less";
|
|
8
8
|
var prefix = "pisell-lowcode-";
|
|
9
9
|
var ClassicLayout = function ClassicLayout(props) {
|
|
10
|
-
var _classNames2;
|
|
11
10
|
var header = props.header,
|
|
12
11
|
content = props.content,
|
|
13
12
|
footer = props.footer,
|
|
@@ -22,7 +21,7 @@ var ClassicLayout = function ClassicLayout(props) {
|
|
|
22
21
|
}, /*#__PURE__*/React.createElement("header", {
|
|
23
22
|
className: classNames(_defineProperty({}, "".concat(prefix, "claseic-layout-fixed-header"), fixedHeader))
|
|
24
23
|
}, header), content, /*#__PURE__*/React.createElement("footer", {
|
|
25
|
-
className: classNames((
|
|
24
|
+
className: classNames(_defineProperty(_defineProperty({}, "".concat(prefix, "claseic-layout-fixed-footer"), fixedFooter), footerClassName, footerClassName)),
|
|
26
25
|
style: footerStyle
|
|
27
26
|
}, footer));
|
|
28
27
|
};
|
|
@@ -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 };
|
|
@@ -1,11 +1,11 @@
|
|
|
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
|
var _excluded = ["type", "size", "color"];
|
|
3
3
|
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); }
|
|
4
|
-
function ownKeys(
|
|
5
|
-
function _objectSpread(
|
|
4
|
+
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; }
|
|
5
|
+
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; }
|
|
6
6
|
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; }
|
|
7
|
-
function _toPropertyKey(
|
|
8
|
-
function _toPrimitive(
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
8
|
+
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); }
|
|
9
9
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
10
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
11
|
import React, { forwardRef } from 'react';
|
|
@@ -2,7 +2,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
2
2
|
import { createFromIconfontCN } from '@ant-design/icons';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
var MyIcon = createFromIconfontCN({
|
|
5
|
-
scriptUrl: 'https://static.pisellcdn.com/pisell2iconfont1.
|
|
5
|
+
scriptUrl: 'https://static.pisellcdn.com/pisell2iconfont1.11.js' // 在 iconfont.cn 上生成
|
|
6
6
|
});
|
|
7
7
|
var IconFont = function IconFont(props) {
|
|
8
8
|
return /*#__PURE__*/React.createElement(MyIcon, _extends({}, props, {
|
|
@@ -1,8 +1,8 @@
|
|
|
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
|
var _excluded = ["className", "paginationType", "pagination", "footer", "header", "listHeight", "loadMoreData", "arrow"];
|
|
3
3
|
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; }
|
|
4
|
-
function _toPropertyKey(
|
|
5
|
-
function _toPrimitive(
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
5
|
+
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); }
|
|
6
6
|
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); }
|
|
7
7
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
8
8
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -47,7 +47,7 @@ var List = function List(props) {
|
|
|
47
47
|
var position = useScroll(listRef);
|
|
48
48
|
var isShowDownArrow = useMemo(function () {
|
|
49
49
|
var _listRef$current, _listRef$current2;
|
|
50
|
-
return arrow && (listRef === null || listRef === void 0 ? void 0 : listRef.current) && ((position === null || position === void 0 ? void 0 : position.top) || 0) + (listRef === null || listRef === void 0
|
|
50
|
+
return arrow && (listRef === null || listRef === void 0 ? void 0 : listRef.current) && ((position === null || position === void 0 ? void 0 : position.top) || 0) + (listRef === null || listRef === void 0 || (_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.clientHeight) < ((_listRef$current2 = listRef.current) === null || _listRef$current2 === void 0 ? void 0 : _listRef$current2.scrollHeight);
|
|
51
51
|
}, [position, arrow]);
|
|
52
52
|
var isShowUpArrow = useMemo(function () {
|
|
53
53
|
return arrow && ((position === null || position === void 0 ? void 0 : position.top) || 0) > 0;
|
|
@@ -90,13 +90,13 @@ var List = function List(props) {
|
|
|
90
90
|
}),
|
|
91
91
|
scrollableTarget: scrollListId
|
|
92
92
|
}, /*#__PURE__*/React.createElement(AntList, _extends({}, others, {
|
|
93
|
-
className: classNames(className, _defineProperty({}, "".concat(prefix, "list-one-line-wrap"), props === null || props === void 0
|
|
93
|
+
className: classNames(className, _defineProperty({}, "".concat(prefix, "list-one-line-wrap"), props === null || props === void 0 || (_props$grid = props.grid) === null || _props$grid === void 0 ? void 0 : _props$grid.oneLine))
|
|
94
94
|
}))), isShowDownArrow && downArrow), _footer && /*#__PURE__*/React.createElement("div", {
|
|
95
95
|
className: "".concat(prefix, "scroll-footer-wrap")
|
|
96
96
|
}, _footer));
|
|
97
97
|
}
|
|
98
98
|
return /*#__PURE__*/React.createElement(AntList, _extends({}, props, {
|
|
99
|
-
className: classNames(className, _defineProperty({}, "".concat(prefix, "list-one-line-wrap"), props === null || props === void 0
|
|
99
|
+
className: classNames(className, _defineProperty({}, "".concat(prefix, "list-one-line-wrap"), props === null || props === void 0 || (_props$grid2 = props.grid) === null || _props$grid2 === void 0 ? void 0 : _props$grid2.oneLine))
|
|
100
100
|
}));
|
|
101
101
|
}, [props, _footer, isShowDownArrow, isShowUpArrow, scrollListId]);
|
|
102
102
|
return list;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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
|
-
var _excluded = ["value", "onChange", "defaultValue", "originValue", "selectType"];
|
|
2
|
+
var _excluded = ["value", "onChange", "defaultValue", "originValue", "selectType", "resetText", "doneText"];
|
|
3
3
|
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); }
|
|
4
4
|
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; }
|
|
5
5
|
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; }
|
|
@@ -31,6 +31,8 @@ var PisellAdjustPrice = function PisellAdjustPrice(props) {
|
|
|
31
31
|
originValue = props.originValue,
|
|
32
32
|
_props$selectType = props.selectType,
|
|
33
33
|
selectType = _props$selectType === void 0 ? 'light' : _props$selectType,
|
|
34
|
+
resetText = props.resetText,
|
|
35
|
+
doneText = props.doneText,
|
|
34
36
|
others = _objectWithoutProperties(props, _excluded);
|
|
35
37
|
var config = usePisellConfig();
|
|
36
38
|
var _useState = useState(value || 0),
|
|
@@ -177,6 +179,8 @@ var PisellAdjustPrice = function PisellAdjustPrice(props) {
|
|
|
177
179
|
onChange: handleChange,
|
|
178
180
|
onEnter: handleEnter,
|
|
179
181
|
placeholder: discountMode === 'amount' ? '0' : '%',
|
|
182
|
+
resetText: resetText,
|
|
183
|
+
doneText: doneText,
|
|
180
184
|
rightItemsStyle: {
|
|
181
185
|
buttonBackgroundColor: configColor.buttonBackgroundColor,
|
|
182
186
|
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;
|
|
@@ -37,7 +37,20 @@ var PisellCardList = function PisellCardList(props) {
|
|
|
37
37
|
showValidDate = props.showValidDate,
|
|
38
38
|
empty = props.empty,
|
|
39
39
|
showEmpty = props.showEmpty,
|
|
40
|
-
showBalanceSymbol = props.showBalanceSymbol
|
|
40
|
+
showBalanceSymbol = props.showBalanceSymbol,
|
|
41
|
+
onChangeDebounce = props.onChangeDebounce,
|
|
42
|
+
showStatus = props.showStatus,
|
|
43
|
+
nameTitleStyle = props.nameTitleStyle,
|
|
44
|
+
enableEditAmount = props.enableEditAmount,
|
|
45
|
+
useExternalDetail = props.useExternalDetail,
|
|
46
|
+
onDetail = props.onDetail,
|
|
47
|
+
formatBalance = props.formatBalance,
|
|
48
|
+
formatBalanceTitle = props.formatBalanceTitle,
|
|
49
|
+
formatRedeem = props.formatRedeem,
|
|
50
|
+
formatRedeemTitle = props.formatRedeemTitle,
|
|
51
|
+
onBeforeEditAmount = props.onBeforeEditAmount,
|
|
52
|
+
onItemClick = props.onItemClick,
|
|
53
|
+
showActiveBackground = props.showActiveBackground;
|
|
41
54
|
return data.length ? /*#__PURE__*/React.createElement(PisellCheckboxGroup, {
|
|
42
55
|
options: data,
|
|
43
56
|
value: value,
|
|
@@ -48,9 +61,17 @@ var PisellCardList = function PisellCardList(props) {
|
|
|
48
61
|
onChange: onChange,
|
|
49
62
|
iconPosition: "hide",
|
|
50
63
|
fullWidth: fullWidth,
|
|
64
|
+
onChangeDebounce: onChangeDebounce,
|
|
65
|
+
onItemClick: onItemClick,
|
|
66
|
+
showActiveBackground: showActiveBackground,
|
|
51
67
|
renderOption: function renderOption(item, active, index) {
|
|
52
68
|
return /*#__PURE__*/React.createElement(PisellWalletPassCard, _extends({}, item, {
|
|
53
69
|
active: active,
|
|
70
|
+
mode: mode,
|
|
71
|
+
showActiveIcon: true,
|
|
72
|
+
showStatus: showStatus || (item === null || item === void 0 ? void 0 : item.showStatus),
|
|
73
|
+
cardStatus: item === null || item === void 0 ? void 0 : item.cardStatus,
|
|
74
|
+
nameTitleStyle: nameTitleStyle || (item === null || item === void 0 ? void 0 : item.nameTitleStyle),
|
|
54
75
|
showName: showName || (item === null || item === void 0 ? void 0 : item.showName),
|
|
55
76
|
showBalance: showBalance || (item === null || item === void 0 ? void 0 : item.showBalance),
|
|
56
77
|
showCode: showCode || (item === null || item === void 0 ? void 0 : item.showCode),
|
|
@@ -63,18 +84,36 @@ var PisellCardList = function PisellCardList(props) {
|
|
|
63
84
|
showBalanceSymbol: showBalanceSymbol || (item === null || item === void 0 ? void 0 : item.showBalanceSymbol),
|
|
64
85
|
showActions: props.showActions || (item === null || item === void 0 ? void 0 : item.showActions),
|
|
65
86
|
actions: props.actions || (item === null || item === void 0 ? void 0 : item.actions),
|
|
87
|
+
enableEditAmount: enableEditAmount || (item === null || item === void 0 ? void 0 : item.enableEditAmount),
|
|
88
|
+
useExternalDetail: useExternalDetail || (item === null || item === void 0 ? void 0 : item.useExternalDetail),
|
|
89
|
+
onDetail: function onDetail(record) {
|
|
90
|
+
var _props$onDetail;
|
|
91
|
+
return props === null || props === void 0 || (_props$onDetail = props.onDetail) === null || _props$onDetail === void 0 ? void 0 : _props$onDetail.call(props, record, index);
|
|
92
|
+
},
|
|
66
93
|
beforeEdit: function beforeEdit(record) {
|
|
67
94
|
var _props$beforeEdit;
|
|
68
95
|
return props === null || props === void 0 || (_props$beforeEdit = props.beforeEdit) === null || _props$beforeEdit === void 0 ? void 0 : _props$beforeEdit.call(props, record, index);
|
|
69
96
|
},
|
|
97
|
+
onConfirmEditAmount: function onConfirmEditAmount(value) {
|
|
98
|
+
var _props$onConfirmEditA;
|
|
99
|
+
(_props$onConfirmEditA = props.onConfirmEditAmount) === null || _props$onConfirmEditA === void 0 || _props$onConfirmEditA.call(props, value, index, item);
|
|
100
|
+
},
|
|
70
101
|
onConfirmEdit: function onConfirmEdit(newVal) {
|
|
71
102
|
var _props$onConfirmEdit;
|
|
72
|
-
(_props$onConfirmEdit = props.onConfirmEdit) === null || _props$onConfirmEdit === void 0 || _props$onConfirmEdit.call(props, newVal, index);
|
|
103
|
+
(_props$onConfirmEdit = props.onConfirmEdit) === null || _props$onConfirmEdit === void 0 || _props$onConfirmEdit.call(props, newVal, index, item);
|
|
73
104
|
},
|
|
105
|
+
formatBalance: formatBalance || (item === null || item === void 0 ? void 0 : item.formatBalance),
|
|
106
|
+
formatBalanceTitle: formatBalanceTitle || (item === null || item === void 0 ? void 0 : item.formatBalanceTitle),
|
|
74
107
|
type: type,
|
|
75
108
|
style: direction === 'vertical' || direction === 'horizontal' && fullWidth ? {
|
|
76
109
|
width: '100%'
|
|
77
|
-
} : {}
|
|
110
|
+
} : {},
|
|
111
|
+
formatRedeem: formatRedeem || (item === null || item === void 0 ? void 0 : item.formatRedeem),
|
|
112
|
+
formatRedeemTitle: formatRedeemTitle || (item === null || item === void 0 ? void 0 : item.formatRedeemTitle),
|
|
113
|
+
onBeforeEditAmount: function onBeforeEditAmount(record) {
|
|
114
|
+
var _props$onBeforeEditAm;
|
|
115
|
+
return props === null || props === void 0 || (_props$onBeforeEditAm = props.onBeforeEditAmount) === null || _props$onBeforeEditAm === void 0 ? void 0 : _props$onBeforeEditAm.call(props, record, index, item);
|
|
116
|
+
}
|
|
78
117
|
}));
|
|
79
118
|
}
|
|
80
119
|
}) : showEmpty && (empty || /*#__PURE__*/React.createElement(PisellEmpty, null));
|
|
@@ -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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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
|
-
var _excluded = ["platform", "gap", "style", "options", "onChange", "value", "renderOption", "padding", "rowKey", "mode", "direction", "fullWidth", "iconPosition", "optionClassName", "optionActiveClassName"];
|
|
2
|
+
var _excluded = ["platform", "gap", "style", "options", "onChange", "value", "renderOption", "padding", "rowKey", "mode", "direction", "fullWidth", "iconPosition", "optionClassName", "optionActiveClassName", "onChangeDebounce", "onItemClick", "showActiveBackground"];
|
|
3
3
|
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); }
|
|
4
4
|
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; }
|
|
5
5
|
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; }
|
|
@@ -18,6 +18,7 @@ import React, { useEffect, useMemo } from 'react';
|
|
|
18
18
|
import usePisellConfig from "../pisell-config-provider/hooks/usePisellConfig";
|
|
19
19
|
import classNames from 'classnames';
|
|
20
20
|
import { Checkbox, Radio } from 'antd';
|
|
21
|
+
import { useDebounceFn } from "ahooks";
|
|
21
22
|
import { isNumber } from '@pisell/utils';
|
|
22
23
|
import { changeArray } from '@pisell/utils';
|
|
23
24
|
import "./index.less";
|
|
@@ -63,6 +64,10 @@ var PisellCheckboxGroup = function PisellCheckboxGroup(props) {
|
|
|
63
64
|
iconPosition = _props$iconPosition === void 0 ? 'left' : _props$iconPosition,
|
|
64
65
|
optionClassName = props.optionClassName,
|
|
65
66
|
optionActiveClassName = props.optionActiveClassName,
|
|
67
|
+
onChangeDebounce = props.onChangeDebounce,
|
|
68
|
+
onItemClick = props.onItemClick,
|
|
69
|
+
_props$showActiveBack = props.showActiveBackground,
|
|
70
|
+
showActiveBackground = _props$showActiveBack === void 0 ? false : _props$showActiveBack,
|
|
66
71
|
rest = _objectWithoutProperties(props, _excluded);
|
|
67
72
|
var _useState = useState([]),
|
|
68
73
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -141,6 +146,14 @@ var PisellCheckboxGroup = function PisellCheckboxGroup(props) {
|
|
|
141
146
|
// 单选模式, 只返回第一个值
|
|
142
147
|
onChange === null || onChange === void 0 || onChange(mode === 'single' ? val[0] : val, item);
|
|
143
148
|
};
|
|
149
|
+
var _useDebounceFn = useDebounceFn(function (key, item) {
|
|
150
|
+
handleSelectItem(key, item);
|
|
151
|
+
}, {
|
|
152
|
+
wait: 400,
|
|
153
|
+
leading: true,
|
|
154
|
+
trailing: false
|
|
155
|
+
}),
|
|
156
|
+
run = _useDebounceFn.run;
|
|
144
157
|
|
|
145
158
|
/**
|
|
146
159
|
* @title: 选择
|
|
@@ -173,14 +186,20 @@ var PisellCheckboxGroup = function PisellCheckboxGroup(props) {
|
|
|
173
186
|
}), options.map(function (option, index) {
|
|
174
187
|
var active = _value.includes(option[rowKey]);
|
|
175
188
|
return /*#__PURE__*/React.createElement(PisellRow, {
|
|
176
|
-
className: classNames('pisell-checkbox-group-item', optionClassName, _defineProperty({
|
|
177
|
-
'pisell-checkbox-group-item-active': active
|
|
178
|
-
|
|
189
|
+
className: classNames('pisell-checkbox-group-item', optionClassName, _defineProperty(_defineProperty({
|
|
190
|
+
'pisell-checkbox-group-item-active': active,
|
|
191
|
+
'pisell-checkbox-group-item-with-background': active && showActiveBackground
|
|
192
|
+
}, optionActiveClassName, active), 'pisell-checkbox-group-item-error', option.error)),
|
|
179
193
|
key: option[rowKey],
|
|
180
194
|
gap: 10,
|
|
181
195
|
style: rowStyle,
|
|
182
196
|
onClick: function onClick(e) {
|
|
197
|
+
onItemClick === null || onItemClick === void 0 || onItemClick(e, option);
|
|
183
198
|
if (option.disabled) return;
|
|
199
|
+
if (onChangeDebounce) {
|
|
200
|
+
run(option[rowKey], option);
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
184
203
|
handleSelectItem(option[rowKey], option);
|
|
185
204
|
},
|
|
186
205
|
leftContent: iconPosition === 'left' && /*#__PURE__*/React.createElement(CheckBoxItem, {
|