@pisell/materials 6.2.24 → 6.2.25
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 +7 -7
- package/build/lowcode/preview.js +146 -146
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +36 -27
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +41 -32
- package/es/components/DragSortList/index.js +6 -6
- package/es/components/classicLayout/index.js +4 -5
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +8 -8
- package/es/components/icon/index.js +5 -5
- package/es/components/iconfont/index.js +1 -1
- package/es/components/list/index.js +6 -6
- package/es/components/pisellAdjustPrice/index.d.ts +1 -6
- package/es/components/pisellAdjustPrice/index.js +64 -8
- package/es/components/pisellAdjustPrice/index.less +35 -6
- package/es/components/pisellAdjustPrice/status.js +32 -0
- package/es/components/pisellAdjustPrice/type.js +1 -0
- package/es/components/pisellToast/index.js +3 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +21 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +61 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.less +98 -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 +44 -0
- package/es/components/productCard/cartSkuCard/components/resources/index.less +20 -0
- package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +11 -0
- package/es/components/productCard/cartSkuCard/components/sales/index.js +55 -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 +43 -0
- package/es/components/productCard/cartSkuCard/components/specs/index.less +28 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +6 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.js +53 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.less +37 -0
- package/es/components/productCard/cartSkuCard/index.d.ts +8 -0
- package/es/components/productCard/cartSkuCard/index.js +195 -0
- package/es/components/productCard/cartSkuCard/index.less +69 -0
- package/es/components/productCard/cartSkuCard/locales.js +30 -0
- package/es/components/productCard/components/Header/index.js +4 -3
- package/es/components/productCard/components/Sales/index.js +2 -2
- package/es/components/productCard/index.d.ts +3 -1
- package/es/components/productCard/index.js +2 -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/Header/Buttons/index.js +5 -5
- package/es/components/table/Table/AddFieldModal/index.js +6 -6
- 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/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/text/Show/index.js +4 -4
- package/es/components/table/Table/fields/text/filterUtil/index.js +0 -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/Amount/index.d.ts +3 -20
- package/es/components/virtual-keyboard/Amount/index.js +79 -7
- package/es/components/virtual-keyboard/Amount/index.less +39 -0
- package/es/components/virtual-keyboard/Amount/themeConfig.js +32 -0
- package/es/components/virtual-keyboard/Amount/types.d.ts +44 -0
- package/es/components/virtual-keyboard/Amount/types.js +1 -0
- package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +3 -1
- package/es/components/virtual-keyboard/BaseNumberKeyboard/index.js +38 -10
- package/es/components/virtual-keyboard/Keyboard/index.js +2 -2
- package/es/components/virtual-keyboard/Number/index.d.ts +3 -11
- package/es/components/virtual-keyboard/Number/index.js +77 -7
- package/es/components/virtual-keyboard/Number/index.less +39 -0
- package/es/components/virtual-keyboard/Number/themeConfig.js +32 -0
- package/es/components/virtual-keyboard/Number/types.js +1 -0
- package/es/components/virtual-keyboard/VirtualKeyInput/index.js +10 -3
- 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/hooks/useResponsive.js +2 -2
- package/es/utils/hoc.js +1 -1
- package/es/utils/miniRedux.js +8 -9
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +8 -8
- package/lib/components/iconfont/index.js +1 -1
- package/lib/components/lowCodePage/index.js +1 -2
- package/lib/components/pisellAdjustPrice/index.d.ts +1 -6
- package/lib/components/pisellAdjustPrice/index.js +119 -57
- package/lib/components/pisellAdjustPrice/index.less +35 -6
- package/lib/components/pisellAdjustPrice/status.js +60 -0
- package/lib/components/pisellAdjustPrice/type.js +17 -0
- package/lib/components/pisellToast/index.js +3 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +21 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +71 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.less +98 -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 +73 -0
- package/lib/components/productCard/cartSkuCard/components/resources/index.less +20 -0
- package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +11 -0
- package/lib/components/productCard/cartSkuCard/components/sales/index.js +76 -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 +65 -0
- package/lib/components/productCard/cartSkuCard/components/specs/index.less +28 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +6 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.js +67 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.less +37 -0
- package/lib/components/productCard/cartSkuCard/index.d.ts +8 -0
- package/lib/components/productCard/cartSkuCard/index.js +216 -0
- package/lib/components/productCard/cartSkuCard/index.less +69 -0
- package/lib/components/productCard/cartSkuCard/locales.js +61 -0
- package/lib/components/productCard/components/Header/index.js +4 -3
- package/lib/components/productCard/components/Sales/index.js +2 -2
- package/lib/components/productCard/index.d.ts +3 -1
- package/lib/components/productCard/index.js +2 -0
- package/lib/components/table/Table/fields/date/filterUtil/index.js +3 -6
- package/lib/components/table/Table/fields/rangePicker/filterUtil/index.js +4 -8
- 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/Amount/index.d.ts +3 -20
- package/lib/components/virtual-keyboard/Amount/index.js +72 -16
- package/lib/components/virtual-keyboard/Amount/index.less +39 -0
- package/lib/components/virtual-keyboard/Amount/themeConfig.js +60 -0
- package/lib/components/virtual-keyboard/Amount/types.d.ts +44 -0
- package/lib/components/virtual-keyboard/Amount/types.js +17 -0
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +3 -1
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.js +31 -8
- package/lib/components/virtual-keyboard/Keyboard/index.js +2 -1
- package/lib/components/virtual-keyboard/Number/index.d.ts +3 -11
- package/lib/components/virtual-keyboard/Number/index.js +65 -11
- package/lib/components/virtual-keyboard/Number/index.less +39 -0
- package/lib/components/virtual-keyboard/Number/themeConfig.js +60 -0
- package/lib/components/virtual-keyboard/Number/types.js +17 -0
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.js +34 -20
- 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/hooks/useResponsive.js +3 -6
- package/lowcode/_setters/antd-icon-setter/index.tsx +3 -2
- package/lowcode/pisell-adjust-price/meta.ts +168 -0
- package/lowcode/pisell-adjust-price/snippets.ts +1 -0
- package/lowcode/pisell-number-keyboard/meta.ts +167 -0
- package/lowcode/pisell-price-keyboard/meta.ts +167 -0
- package/lowcode/virtual-keyboard/meta.ts +131 -0
- package/package.json +1 -1
- 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/components/iconfont/index.d.ts +0 -8
- package/es/components/productCard/locales.d.ts +0 -84
- package/es/components/productCard/status.d.ts +0 -32
- package/es/components/productCard/types.d.ts +0 -84
- package/es/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
- package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -11
- package/lib/components/iconfont/index.d.ts +0 -8
- package/lib/components/productCard/locales.d.ts +0 -84
- package/lib/components/productCard/status.d.ts +0 -32
- package/lib/components/productCard/types.d.ts +0 -84
- package/lib/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -11
|
@@ -2,14 +2,46 @@
|
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
gap: 20px;
|
|
5
|
+
background-color: var(--virtual-keyboard-background-color, #ffffff);
|
|
6
|
+
|
|
7
|
+
&.virtual-keyboard-component-dark {
|
|
8
|
+
background-color: var(--virtual-keyboard-background-color, rgba(0, 0, 0, 0.70));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&.virtual-keyboard-component-light {
|
|
12
|
+
background-color: var(--virtual-keyboard-background-color, #ffffff);
|
|
13
|
+
}
|
|
5
14
|
}
|
|
6
15
|
|
|
7
16
|
.virtual-keyboard-component-left {
|
|
8
17
|
padding: 10px;
|
|
9
18
|
width: 380px;
|
|
10
19
|
border-radius: 10px;
|
|
11
|
-
background: var(--
|
|
20
|
+
background: var(--virtual-keyboard-container-background-color, #D0D5DD);
|
|
12
21
|
backdrop-filter: blur(50px);
|
|
22
|
+
|
|
23
|
+
.pisell-virtual-keyboard-input {
|
|
24
|
+
background-color: var(--virtual-keyboard-button-background-color, #ffffff);
|
|
25
|
+
color: var(--virtual-keyboard-text-color, #000000);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.pisell-keyboard {
|
|
29
|
+
background-color: var(--virtual-keyboard-keyboard-background-color, #f9f9f9);
|
|
30
|
+
|
|
31
|
+
.pisell-keyboard-item {
|
|
32
|
+
background-color: var(--virtual-keyboard-keyboard-button-background-color, #ffffff);
|
|
33
|
+
color: var(--virtual-keyboard-keyboard-button-text-color, #000000);
|
|
34
|
+
|
|
35
|
+
&:hover {
|
|
36
|
+
background-color: var(--virtual-keyboard-keyboard-button-hover-color, #f5f5f5);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&.pisell-keyboard-item-primary {
|
|
40
|
+
background-color: var(--virtual-keyboard-primary-button-background-color, #4ca30d);
|
|
41
|
+
color: var(--virtual-keyboard-primary-button-text-color, #ffffff);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
13
45
|
}
|
|
14
46
|
|
|
15
47
|
.virtual-keyboard-component-right {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
2
|
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."); }
|
|
3
|
-
function _iterableToArrayLimit(
|
|
3
|
+
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; } }
|
|
4
4
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
5
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(
|
|
5
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
6
6
|
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); }
|
|
7
7
|
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; }
|
|
8
8
|
import { useEffect, useState, useMemo } from 'react';
|
package/es/utils/hoc.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
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); }
|
|
2
|
-
function _typeof(
|
|
2
|
+
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); }
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { get, set, has } from 'lodash';
|
|
5
5
|
import dayjs from "dayjs";
|
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
|
})));
|
|
@@ -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;
|
|
@@ -15,4 +15,4 @@ export declare const getFileMetadataParams: (file: RcFile & {
|
|
|
15
15
|
metadata?: MediaMetadata;
|
|
16
16
|
}) => Record<string, any>;
|
|
17
17
|
export declare const isValueEqual: (value: any, fileListValue: any) => boolean;
|
|
18
|
-
export declare const getBaseTime: (size: number) =>
|
|
18
|
+
export declare const getBaseTime: (size: number) => 1000 | 2000 | 4000 | 8000;
|
|
@@ -19,7 +19,7 @@ declare const formFieldMap: {
|
|
|
19
19
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
20
20
|
onChange: (value: string) => void;
|
|
21
21
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
22
|
-
rootDomain: "custom" | "
|
|
22
|
+
rootDomain: "custom" | "xzero" | "saas";
|
|
23
23
|
customDomain?: string | undefined;
|
|
24
24
|
value?: string | undefined;
|
|
25
25
|
tenantId: string;
|
|
@@ -59,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<
|
|
62
|
+
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<import("./Upload/type").UploadProps & 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,14 +76,14 @@ 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>;
|
|
@@ -97,5 +95,7 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
97
95
|
extraParams?: Record<string, any> | undefined;
|
|
98
96
|
} & {
|
|
99
97
|
dataSource?: any;
|
|
100
|
-
}) => JSX.Element) | import("react").FC<
|
|
98
|
+
}) => JSX.Element) | import("react").FC<any> | import("react").FC<import("./TimePicker/type").TimePickerProps & 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("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("./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.6.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;
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import './index.less';
|
|
2
|
-
|
|
3
|
-
value?: number;
|
|
4
|
-
originValue: number;
|
|
5
|
-
defaultValue?: number;
|
|
6
|
-
onChange?: (val: number) => void;
|
|
7
|
-
}
|
|
2
|
+
import { PisellAdjustPriceProps } from './type';
|
|
8
3
|
declare const PisellAdjustPrice: (props: PisellAdjustPriceProps) => JSX.Element;
|
|
9
4
|
export default PisellAdjustPrice;
|
|
@@ -35,13 +35,22 @@ module.exports = __toCommonJS(pisellAdjustPrice_exports);
|
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_antd = require("antd");
|
|
37
37
|
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_utils = require("@pisell/utils");
|
|
38
39
|
var import_pisellText = __toESM(require("../pisellText"));
|
|
39
40
|
var import_Amount = __toESM(require("../virtual-keyboard/Amount"));
|
|
40
41
|
var import_locales = require("../../locales");
|
|
41
42
|
var import_index = require("./index.less");
|
|
42
43
|
var import_usePisellConfig = __toESM(require("../pisell-config-provider/hooks/usePisellConfig"));
|
|
44
|
+
var import_status = require("./status");
|
|
43
45
|
var PisellAdjustPrice = (props) => {
|
|
44
|
-
const {
|
|
46
|
+
const {
|
|
47
|
+
value,
|
|
48
|
+
onChange,
|
|
49
|
+
defaultValue,
|
|
50
|
+
originValue,
|
|
51
|
+
selectType = "light",
|
|
52
|
+
...others
|
|
53
|
+
} = props;
|
|
45
54
|
const config = (0, import_usePisellConfig.default)();
|
|
46
55
|
const [newValue, setNewValue] = (0, import_react.useState)(value || 0);
|
|
47
56
|
const [updateMode, setUpdateMode] = (0, import_react.useState)(
|
|
@@ -53,6 +62,16 @@ var PisellAdjustPrice = (props) => {
|
|
|
53
62
|
(0, import_react.useEffect)(() => {
|
|
54
63
|
document.body.id = "body";
|
|
55
64
|
}, []);
|
|
65
|
+
const configColor = (0, import_react.useMemo)(() => {
|
|
66
|
+
const currentConfig = import_status.defaultConfig[selectType];
|
|
67
|
+
const validProps = Object.entries(props).reduce((acc, [key, value2]) => {
|
|
68
|
+
if (value2 !== void 0 && key in currentConfig) {
|
|
69
|
+
acc[key] = value2;
|
|
70
|
+
}
|
|
71
|
+
return acc;
|
|
72
|
+
}, {});
|
|
73
|
+
return { ...currentConfig, ...validProps };
|
|
74
|
+
}, [selectType, props]);
|
|
56
75
|
const handleEnter = () => {
|
|
57
76
|
if (isDiscountError) {
|
|
58
77
|
return;
|
|
@@ -92,65 +111,108 @@ var PisellAdjustPrice = (props) => {
|
|
|
92
111
|
return `${v}%`;
|
|
93
112
|
}
|
|
94
113
|
};
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
value: updateMode,
|
|
107
|
-
onChange: handleUpdateMode,
|
|
108
|
-
block: true
|
|
109
|
-
}
|
|
110
|
-
), updateMode === "discount" && /* @__PURE__ */ import_react.default.createElement(
|
|
111
|
-
import_antd.Segmented,
|
|
112
|
-
{
|
|
113
|
-
size: "large",
|
|
114
|
-
options: [
|
|
115
|
-
{
|
|
116
|
-
label: `${(0, import_locales.getText)("pisell-adjust-price-discount-amount")}(${(config == null ? void 0 : config.symbol) || "$"})`,
|
|
117
|
-
value: "amount"
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
label: `${(0, import_locales.getText)("pisell-adjust-price-discount-percentage")}(%)`,
|
|
121
|
-
value: "percentage"
|
|
122
|
-
}
|
|
123
|
-
],
|
|
124
|
-
value: discountMode,
|
|
125
|
-
onChange: (val) => {
|
|
126
|
-
setNewValue("");
|
|
127
|
-
setDiscountMode(val);
|
|
128
|
-
},
|
|
129
|
-
block: true
|
|
130
|
-
}
|
|
131
|
-
), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-adjust-price-amount-wrap" }, /* @__PURE__ */ import_react.default.createElement(
|
|
132
|
-
import_Amount.default,
|
|
133
|
-
{
|
|
134
|
-
...others,
|
|
135
|
-
inputFormat,
|
|
136
|
-
defaultValue: updateMode === "priceOverride" ? defaultValue : "",
|
|
137
|
-
key: updateMode,
|
|
138
|
-
value: newValue,
|
|
139
|
-
defaultSelect: updateMode === "priceOverride",
|
|
140
|
-
onChange: handleChange,
|
|
141
|
-
onEnter: handleEnter,
|
|
142
|
-
placeholder: discountMode === "amount" ? "0" : "%"
|
|
143
|
-
}
|
|
144
|
-
)), updateMode === "discount" && /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-low-code-adjust-price-total" }, isDiscountError ? /* @__PURE__ */ import_react.default.createElement(import_pisellText.default.Amount, { value: originValue }) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, newValue && (0, import_locales.getText)("pisell-adjust-price-total-after-discount"), /* @__PURE__ */ import_react.default.createElement(import_pisellText.default.Amount, { value: totalAfterDiscount }))), /* @__PURE__ */ import_react.default.createElement(
|
|
114
|
+
(0, import_react.useEffect)(() => {
|
|
115
|
+
(0, import_utils.setTheme)({
|
|
116
|
+
"--pisell-adjust-price-text-color": configColor.textColor,
|
|
117
|
+
"--pisell-adjust-price-background-color": configColor.backgroundColor,
|
|
118
|
+
"--pisell-adjust-price-container-background-color": configColor.containerBackgroundColor,
|
|
119
|
+
"--pisell-adjust-price-button-background-color": configColor.buttonBackgroundColor,
|
|
120
|
+
"--pisell-adjust-price-main-text-color": configColor.mainTextColor,
|
|
121
|
+
"--pisell-adjust-price-sub-text-color": configColor.subTextColor
|
|
122
|
+
});
|
|
123
|
+
}, [configColor]);
|
|
124
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
145
125
|
"div",
|
|
146
126
|
{
|
|
147
|
-
className: (0, import_classnames.default)("pisell-
|
|
148
|
-
|
|
127
|
+
className: (0, import_classnames.default)("pisell-lowcode-adjust-price-wrap", {
|
|
128
|
+
"pisell-lowcode-adjust-price-dark": selectType === "dark",
|
|
129
|
+
"pisell-lowcode-adjust-price-light": selectType === "light"
|
|
149
130
|
})
|
|
150
131
|
},
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
132
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
133
|
+
import_antd.Segmented,
|
|
134
|
+
{
|
|
135
|
+
size: "large",
|
|
136
|
+
options: [
|
|
137
|
+
{
|
|
138
|
+
label: (0, import_locales.getText)("pisell-adjust-price-price-override"),
|
|
139
|
+
value: "priceOverride"
|
|
140
|
+
},
|
|
141
|
+
{ label: (0, import_locales.getText)("pisell-adjust-price-discount"), value: "discount" }
|
|
142
|
+
],
|
|
143
|
+
value: updateMode,
|
|
144
|
+
onChange: handleUpdateMode,
|
|
145
|
+
block: true
|
|
146
|
+
}
|
|
147
|
+
),
|
|
148
|
+
updateMode === "discount" && /* @__PURE__ */ import_react.default.createElement(
|
|
149
|
+
import_antd.Segmented,
|
|
150
|
+
{
|
|
151
|
+
size: "large",
|
|
152
|
+
options: [
|
|
153
|
+
{
|
|
154
|
+
label: `${(0, import_locales.getText)("pisell-adjust-price-discount-amount")}(${(config == null ? void 0 : config.symbol) || "$"})`,
|
|
155
|
+
value: "amount"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
label: `${(0, import_locales.getText)("pisell-adjust-price-discount-percentage")}(%)`,
|
|
159
|
+
value: "percentage"
|
|
160
|
+
}
|
|
161
|
+
],
|
|
162
|
+
value: discountMode,
|
|
163
|
+
onChange: (val) => {
|
|
164
|
+
setNewValue("");
|
|
165
|
+
setDiscountMode(val);
|
|
166
|
+
},
|
|
167
|
+
block: true
|
|
168
|
+
}
|
|
169
|
+
),
|
|
170
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-adjust-price-amount-wrap" }, /* @__PURE__ */ import_react.default.createElement(
|
|
171
|
+
import_Amount.default,
|
|
172
|
+
{
|
|
173
|
+
...others,
|
|
174
|
+
selectType: selectType || "light",
|
|
175
|
+
inputFormat,
|
|
176
|
+
defaultValue: updateMode === "priceOverride" ? defaultValue : "",
|
|
177
|
+
key: updateMode,
|
|
178
|
+
value: newValue,
|
|
179
|
+
defaultSelect: updateMode === "priceOverride",
|
|
180
|
+
onChange: handleChange,
|
|
181
|
+
onEnter: handleEnter,
|
|
182
|
+
placeholder: discountMode === "amount" ? "0" : "%",
|
|
183
|
+
rightItemsStyle: {
|
|
184
|
+
buttonBackgroundColor: configColor.buttonBackgroundColor,
|
|
185
|
+
textColor: configColor.textColor,
|
|
186
|
+
resetButtonBackgroundColor: configColor.resetButtonBackgroundColor,
|
|
187
|
+
resetButtonTextColor: configColor.resetButtonTextColor,
|
|
188
|
+
isDoneButtonFollowTheme: configColor.isDoneButtonFollowTheme,
|
|
189
|
+
doneButtonBackgroundColor: configColor.doneButtonBackgroundColor,
|
|
190
|
+
doneButtonTextColor: configColor.doneButtonTextColor
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
)),
|
|
194
|
+
updateMode === "discount" && /* @__PURE__ */ import_react.default.createElement("div", null, configColor.isShowMainText ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-low-code-adjust-price-total" }, isDiscountError ? /* @__PURE__ */ import_react.default.createElement(import_pisellText.default.Amount, { value: originValue }) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, newValue && (0, import_locales.getText)("pisell-adjust-price-total-after-discount"), /* @__PURE__ */ import_react.default.createElement(import_pisellText.default.Amount, { value: totalAfterDiscount }))) : null, configColor.isShowSubText ? /* @__PURE__ */ import_react.default.createElement(
|
|
195
|
+
"div",
|
|
196
|
+
{
|
|
197
|
+
className: (0, import_classnames.default)(
|
|
198
|
+
"pisell-low-code-adjust-price-amount-desc",
|
|
199
|
+
{
|
|
200
|
+
["pisell-low-code-adjust-price-amount-desc-error"]: isDiscountError
|
|
201
|
+
}
|
|
202
|
+
)
|
|
203
|
+
},
|
|
204
|
+
(0, import_locales.getText)("pisell-adjust-price-discount-can-be-maximum"),
|
|
205
|
+
" ",
|
|
206
|
+
discountMode === "amount" ? /* @__PURE__ */ import_react.default.createElement(
|
|
207
|
+
import_pisellText.default.Amount,
|
|
208
|
+
{
|
|
209
|
+
value: originValue,
|
|
210
|
+
style: {
|
|
211
|
+
color: configColor.subTextColor
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
) : "100%"
|
|
215
|
+
) : null)
|
|
216
|
+
);
|
|
155
217
|
};
|
|
156
218
|
var pisellAdjustPrice_default = PisellAdjustPrice;
|
|
@@ -1,30 +1,59 @@
|
|
|
1
1
|
.pisell-lowcode-adjust-price-wrap {
|
|
2
2
|
width: 380px;
|
|
3
3
|
border-radius: 10px;
|
|
4
|
-
background-color:
|
|
4
|
+
background-color: var(--pisell-adjust-price-background-color);
|
|
5
5
|
padding: 10px;
|
|
6
6
|
display: flex;
|
|
7
7
|
flex-direction: column;
|
|
8
8
|
gap: 10px;
|
|
9
|
+
transition: all 0.3s ease;
|
|
10
|
+
|
|
11
|
+
// 浅色模式样式
|
|
12
|
+
&.pisell-lowcode-adjust-price-light {
|
|
13
|
+
.pisell-lowcode-segmented-item-label {
|
|
14
|
+
color: #667085;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// 深色模式样式
|
|
19
|
+
&.pisell-lowcode-adjust-price-dark {
|
|
20
|
+
.pisell-lowcode-segmented-item-label {
|
|
21
|
+
color: #d0d5dd;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.pisell-lowcode-segmented {
|
|
26
|
+
background: var(--pisell-adjust-price-container-background-color);
|
|
27
|
+
:hover {
|
|
28
|
+
color: var(--pisell-adjust-price-text-color);
|
|
29
|
+
}
|
|
30
|
+
.pisell-lowcode-segmented-item-selected {
|
|
31
|
+
background: var(--pisell-adjust-price-button-background-color);
|
|
32
|
+
.pisell-lowcode-segmented-item-label {
|
|
33
|
+
color: var(--pisell-adjust-price-text-color) !important;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
9
38
|
.pisell-lowcode-adjust-price-amount-wrap {
|
|
10
39
|
padding: 10px;
|
|
11
40
|
border-radius: 10px;
|
|
12
|
-
background: var(--
|
|
41
|
+
background: var(--pisell-adjust-price-container-background-color);
|
|
13
42
|
}
|
|
14
43
|
.pisell-low-code-adjust-price-total {
|
|
15
|
-
color: var(--
|
|
44
|
+
color: var(--pisell-adjust-price-main-text-color);
|
|
16
45
|
font-size: 20px;
|
|
17
46
|
font-weight: 600;
|
|
18
47
|
line-height: 30px; /* 150% */
|
|
19
48
|
}
|
|
20
49
|
.pisell-low-code-adjust-price-amount-desc {
|
|
21
|
-
color: var(--
|
|
50
|
+
color: var(--pisell-adjust-price-sub-text-color);
|
|
22
51
|
font-size: 16px;
|
|
23
52
|
font-style: normal;
|
|
24
53
|
font-weight: 400;
|
|
25
54
|
line-height: 24px; /* 150% */
|
|
26
55
|
}
|
|
27
56
|
.pisell-low-code-adjust-price-amount-desc-error {
|
|
28
|
-
color: var(--Error-600, #
|
|
57
|
+
color: var(--Error-600, #d92d20);
|
|
29
58
|
}
|
|
30
|
-
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/pisellAdjustPrice/status.ts
|
|
20
|
+
var status_exports = {};
|
|
21
|
+
__export(status_exports, {
|
|
22
|
+
defaultConfig: () => defaultConfig
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(status_exports);
|
|
25
|
+
var defaultConfig = {
|
|
26
|
+
dark: {
|
|
27
|
+
backgroundColor: "rgba(0, 0, 0, 0.70)",
|
|
28
|
+
containerBackgroundColor: "rgba(0, 0, 0, 0.40)",
|
|
29
|
+
buttonBackgroundColor: "#ffffff",
|
|
30
|
+
textColor: "#000000",
|
|
31
|
+
resetButtonBackgroundColor: "#ffffff",
|
|
32
|
+
resetButtonTextColor: "#d92d20",
|
|
33
|
+
isDoneButtonFollowTheme: true,
|
|
34
|
+
doneButtonBackgroundColor: "#4ca30d",
|
|
35
|
+
doneButtonTextColor: "#ffffff",
|
|
36
|
+
isShowMainText: true,
|
|
37
|
+
mainTextColor: "#ffffff",
|
|
38
|
+
isShowSubText: true,
|
|
39
|
+
subTextColor: "#d0d5dd"
|
|
40
|
+
},
|
|
41
|
+
light: {
|
|
42
|
+
backgroundColor: "#ffffff",
|
|
43
|
+
containerBackgroundColor: "#d0d5dd",
|
|
44
|
+
buttonBackgroundColor: "#ffffff",
|
|
45
|
+
textColor: "#000000",
|
|
46
|
+
resetButtonBackgroundColor: "#ffffff",
|
|
47
|
+
resetButtonTextColor: "#d92d20",
|
|
48
|
+
isDoneButtonFollowTheme: true,
|
|
49
|
+
doneButtonBackgroundColor: "#4ca30d",
|
|
50
|
+
doneButtonTextColor: "#ffffff",
|
|
51
|
+
isShowMainText: true,
|
|
52
|
+
mainTextColor: "#101828",
|
|
53
|
+
isShowSubText: true,
|
|
54
|
+
subTextColor: "#667085"
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
58
|
+
0 && (module.exports = {
|
|
59
|
+
defaultConfig
|
|
60
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
|
|
15
|
+
// src/components/pisellAdjustPrice/type.ts
|
|
16
|
+
var type_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(type_exports);
|
|
@@ -40,6 +40,9 @@ var import_index = require("./index.less");
|
|
|
40
40
|
var PisellToast = (props) => {
|
|
41
41
|
const { content, duration, showAction, actionText, onClose } = props;
|
|
42
42
|
const key = (0, import_utils.getUniqueId)();
|
|
43
|
+
if (!import_pisellMessage.message) {
|
|
44
|
+
return alert(content);
|
|
45
|
+
}
|
|
43
46
|
import_pisellMessage.message.open({
|
|
44
47
|
key,
|
|
45
48
|
content: /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-toast-content" }, /* @__PURE__ */ import_react.default.createElement("span", null, content), showAction && /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-toast-action" }, actionText), /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface IProps {
|
|
4
|
+
isShowImage?: boolean;
|
|
5
|
+
dataSource: {
|
|
6
|
+
image?: string;
|
|
7
|
+
bundle?: any[];
|
|
8
|
+
options?: any[];
|
|
9
|
+
product_option_string?: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
symbol?: string;
|
|
12
|
+
price?: string | number;
|
|
13
|
+
total?: number;
|
|
14
|
+
origin_total?: number;
|
|
15
|
+
num?: number;
|
|
16
|
+
};
|
|
17
|
+
style?: React.CSSProperties;
|
|
18
|
+
isMainProduct?: boolean;
|
|
19
|
+
}
|
|
20
|
+
declare const BasicInfo: (props: IProps) => JSX.Element;
|
|
21
|
+
export default BasicInfo;
|