@pisell/private-materials 6.3.92 → 6.3.94
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 +2 -2
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +8 -8
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +9 -9
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/es/components/eftpos/hooks.d.ts +1 -0
- package/es/components/eftposPay/app.d.ts +1 -1
- package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/hooks/useThemeTokens.d.ts +7 -0
- package/es/hooks/useThemeTokens.js +20 -0
- package/es/plus/skuOptionsSelection/components/NormalCard/index.js +6 -5
- package/es/plus/skuOptionsSelection/components/OptionsCard/index.js +3 -2
- package/es/plus/skuOptionsSelection/store/store.js +2 -1
- package/es/plus/skuOptionsSelection/types.d.ts +14 -0
- package/es/plus/skuOptionsSelection/types.js +4 -0
- package/es/plus/skuOptionsSelection/utils/transformBundleGroup.js +10 -1
- package/es/plus/skuOptionsSelection/utils/transformOptionGroup.js +10 -1
- package/es/plus/skuOptionsSelection/utils/transformVariantGroup.js +8 -2
- package/es/pro/Cards/components/SKUCard/index.d.ts +2 -56
- package/es/pro/Cards/components/SKUCard/index.js +51 -20
- package/es/pro/Cards/components/SKUCard/index.less +23 -2
- package/es/pro/Cards/components/SKUCard/locales.d.ts +12 -0
- package/es/pro/Cards/components/SKUCard/locales.js +11 -0
- package/es/pro/Cards/components/SKUCard/types.d.ts +73 -0
- package/es/pro/Cards/components/SKUCard/types.js +1 -0
- package/es/pro/NumericStepper/index.d.ts +5 -0
- package/es/pro/NumericStepper/index.js +8 -2
- package/es/pro/NumericStepper/index.less +1 -9
- package/es/pro/Selector/BatchSelectorDemo.js +2 -12
- package/es/pro/Selector/Selector.js +6 -4
- package/es/pro/Selector/SelectorGroup.d.ts +1 -1
- package/es/pro/Selector/SelectorGroup.js +5 -1
- package/es/pro/Selector/components/Card/index.js +9 -7
- package/es/pro/Selector/components/Card/index.less +24 -15
- package/es/pro/Selector/components/Indicator/index.js +1 -1
- package/es/pro/Selector/components/Indicator/index.less +12 -12
- package/es/pro/Selector/components/Media/index.d.ts +1 -1
- package/es/pro/Selector/components/Media/index.less +1 -1
- package/es/pro/Selector/selectorGroup.less +9 -1
- package/es/pro/Selector/types.d.ts +10 -0
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/lib/components/eftpos/hooks.d.ts +1 -0
- package/lib/components/eftposPay/app.d.ts +1 -1
- package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/hooks/useThemeTokens.d.ts +7 -0
- package/lib/hooks/useThemeTokens.js +40 -0
- package/lib/plus/skuOptionsSelection/components/NormalCard/index.js +11 -10
- package/lib/plus/skuOptionsSelection/components/OptionsCard/index.js +3 -2
- package/lib/plus/skuOptionsSelection/store/store.js +2 -1
- package/lib/plus/skuOptionsSelection/types.d.ts +14 -0
- package/lib/plus/skuOptionsSelection/utils/transformBundleGroup.js +15 -9
- package/lib/plus/skuOptionsSelection/utils/transformOptionGroup.js +9 -6
- package/lib/plus/skuOptionsSelection/utils/transformVariantGroup.js +8 -7
- package/lib/pro/Cards/components/SKUCard/index.d.ts +2 -56
- package/lib/pro/Cards/components/SKUCard/index.js +60 -15
- package/lib/pro/Cards/components/SKUCard/index.less +23 -2
- package/lib/pro/Cards/components/SKUCard/locales.d.ts +12 -0
- package/lib/pro/Cards/components/SKUCard/locales.js +35 -0
- package/lib/pro/Cards/components/SKUCard/types.d.ts +73 -0
- package/lib/pro/Cards/components/SKUCard/types.js +17 -0
- package/lib/pro/NumericStepper/index.d.ts +5 -0
- package/lib/pro/NumericStepper/index.js +11 -3
- package/lib/pro/NumericStepper/index.less +1 -9
- package/lib/pro/Selector/BatchSelectorDemo.js +13 -19
- package/lib/pro/Selector/Selector.js +7 -1
- package/lib/pro/Selector/SelectorGroup.d.ts +1 -1
- package/lib/pro/Selector/SelectorGroup.js +7 -1
- package/lib/pro/Selector/components/Card/index.js +10 -7
- package/lib/pro/Selector/components/Card/index.less +24 -15
- package/lib/pro/Selector/components/Indicator/index.js +1 -1
- package/lib/pro/Selector/components/Indicator/index.less +12 -12
- package/lib/pro/Selector/components/Media/index.d.ts +1 -1
- package/lib/pro/Selector/components/Media/index.js +7 -4
- package/lib/pro/Selector/components/Media/index.less +1 -1
- package/lib/pro/Selector/selectorGroup.less +9 -1
- package/lib/pro/Selector/types.d.ts +10 -0
- package/lowcode/eco-cup-list/meta.ts +1 -1
- package/lowcode/eco-customer-list/meta.ts +1 -1
- package/lowcode/selector/meta.ts +15 -2
- package/lowcode/selector.group/meta.ts +15 -2
- package/lowcode/sku-options-selection/meta.ts +106 -2
- package/package.json +2 -2
|
@@ -1,4 +1,6 @@
|
|
|
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
|
+
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; }
|
|
2
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; }
|
|
3
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
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); }
|
|
@@ -13,6 +15,7 @@ import { useMemo, useState, useCallback, useEffect } from 'react';
|
|
|
13
15
|
import classNames from 'classnames';
|
|
14
16
|
import { isMobile } from '@pisell/utils';
|
|
15
17
|
import { NumberKeyboard } from "../keyboards";
|
|
18
|
+
import useThemeTokens from "../../hooks/useThemeTokens";
|
|
16
19
|
import "./index.less";
|
|
17
20
|
|
|
18
21
|
/**
|
|
@@ -48,7 +51,8 @@ var NumericStepper = function NumericStepper(_ref) {
|
|
|
48
51
|
variant = _ref$variant === void 0 ? 'separated' : _ref$variant,
|
|
49
52
|
_ref$enableInput = _ref.enableInput,
|
|
50
53
|
enableInput = _ref$enableInput === void 0 ? true : _ref$enableInput,
|
|
51
|
-
displayMaxWidth = _ref.displayMaxWidth
|
|
54
|
+
displayMaxWidth = _ref.displayMaxWidth,
|
|
55
|
+
theme = _ref.theme;
|
|
52
56
|
var _useState = useState(false),
|
|
53
57
|
_useState2 = _slicedToArray(_useState, 2),
|
|
54
58
|
open = _useState2[0],
|
|
@@ -60,6 +64,8 @@ var NumericStepper = function NumericStepper(_ref) {
|
|
|
60
64
|
var _isMobile = useMemo(function () {
|
|
61
65
|
return isMobile();
|
|
62
66
|
}, [isMobile]);
|
|
67
|
+
var _useThemeTokens = useThemeTokens(theme),
|
|
68
|
+
colorPrimary = _useThemeTokens.colorPrimary;
|
|
63
69
|
var _useState5 = useState(''),
|
|
64
70
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
65
71
|
tempValue = _useState6[0],
|
|
@@ -267,7 +273,7 @@ var NumericStepper = function NumericStepper(_ref) {
|
|
|
267
273
|
}))));
|
|
268
274
|
return /*#__PURE__*/React.createElement("div", {
|
|
269
275
|
className: stepperClasses,
|
|
270
|
-
style: styles === null || styles === void 0 ? void 0 : styles.container,
|
|
276
|
+
style: _objectSpread(_objectSpread({}, (styles === null || styles === void 0 ? void 0 : styles.container) || {}), {}, _defineProperty({}, '--color-primary', colorPrimary)),
|
|
271
277
|
onClick: function onClick(e) {
|
|
272
278
|
return e.stopPropagation();
|
|
273
279
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
// ========== 变量定义 ==========
|
|
2
|
-
@primary-color: #
|
|
3
|
-
@primary-hover: #6b46c1;
|
|
4
|
-
@primary-active: #553c9a;
|
|
2
|
+
@primary-color: var(--color-primary, #5d3f9f);
|
|
5
3
|
|
|
6
4
|
@text-color: #101828;
|
|
7
5
|
@text-secondary: #344054;
|
|
@@ -77,13 +75,7 @@
|
|
|
77
75
|
align-items: center;
|
|
78
76
|
display: flex;
|
|
79
77
|
height: 100%;
|
|
80
|
-
|
|
81
|
-
&:hover .numeric-stepper-button:not(.numeric-stepper-button-disabled) {
|
|
82
|
-
background-color: @primary-hover;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
78
|
&:active .numeric-stepper-button:not(.numeric-stepper-button-disabled) {
|
|
86
|
-
background-color: @primary-active;
|
|
87
79
|
transform: scale(0.95);
|
|
88
80
|
}
|
|
89
81
|
|
|
@@ -35,13 +35,6 @@ var dataSource = [{
|
|
|
35
35
|
title: '披萨',
|
|
36
36
|
value: 'pizza'
|
|
37
37
|
}],
|
|
38
|
-
grid: {
|
|
39
|
-
columns: 2,
|
|
40
|
-
gutter: 16,
|
|
41
|
-
colConfig: {
|
|
42
|
-
span: 3
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
38
|
ruleConfig: {
|
|
46
39
|
required: 1,
|
|
47
40
|
autoValidate: true
|
|
@@ -120,10 +113,6 @@ var dataSource = [{
|
|
|
120
113
|
value: 'extra-onion',
|
|
121
114
|
cover: 'https://file.mypisell-dev.com/pisel/image/9/52fe9ca4233877f2c06865d27b9fb7912022_12_01_13_32_47_147_00076174656__1080_1073__.jpeg'
|
|
122
115
|
}],
|
|
123
|
-
grid: {
|
|
124
|
-
columns: 3,
|
|
125
|
-
gutter: 16
|
|
126
|
-
},
|
|
127
116
|
variant: 'card',
|
|
128
117
|
itemProps: {
|
|
129
118
|
layout: 'vertical',
|
|
@@ -299,7 +288,8 @@ export var BatchSelectorDemo = function BatchSelectorDemo() {
|
|
|
299
288
|
padding: '0',
|
|
300
289
|
margin: '0 auto',
|
|
301
290
|
height: '100vh',
|
|
302
|
-
overflow: 'auto'
|
|
291
|
+
overflow: 'auto',
|
|
292
|
+
'--theme-color': '#5d3f9f'
|
|
303
293
|
},
|
|
304
294
|
ref: containerRef
|
|
305
295
|
}, /*#__PURE__*/React.createElement(Title, {
|
|
@@ -10,7 +10,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
10
10
|
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; }
|
|
11
11
|
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; }
|
|
12
12
|
import React, { useEffect, useImperativeHandle, forwardRef } from 'react';
|
|
13
|
-
import {
|
|
13
|
+
import { Tag, Select } from 'antd';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
15
|
import { CheckCircleOutlined, ExclamationCircleOutlined } from '@ant-design/icons';
|
|
16
16
|
// @ts-ignore
|
|
@@ -22,10 +22,9 @@ import NumericStepper from "../NumericStepper";
|
|
|
22
22
|
import useSelectionController from "./hooks/useSelectionController";
|
|
23
23
|
import usePresetProps from "./hooks/usePresetProps";
|
|
24
24
|
import useEngineContext from "../../hooks/useEngineContext";
|
|
25
|
+
import useThemeTokens from "../../hooks/useThemeTokens";
|
|
25
26
|
import Item from "./Item";
|
|
26
27
|
import "./selector.less";
|
|
27
|
-
var ARow = Row;
|
|
28
|
-
var ACol = Col;
|
|
29
28
|
var ATag = Tag;
|
|
30
29
|
export var SelectorContext = /*#__PURE__*/React.createContext({
|
|
31
30
|
disabled: false,
|
|
@@ -55,6 +54,9 @@ var Selector = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
55
54
|
valueType = _props$valueType === void 0 ? 'primitive' : _props$valueType,
|
|
56
55
|
_props$variant = props.variant,
|
|
57
56
|
variant = _props$variant === void 0 ? 'default' : _props$variant;
|
|
57
|
+
var _useThemeTokens = useThemeTokens(props.theme),
|
|
58
|
+
colorPrimary = _useThemeTokens.colorPrimary,
|
|
59
|
+
colorPrimaryBg = _useThemeTokens.colorPrimaryBg;
|
|
58
60
|
var context = useEngineContext();
|
|
59
61
|
locales.init(localeTexts, (context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.storage) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.get('umi_locale')) || 'en');
|
|
60
62
|
var _useSelectionControll = useSelectionController(props),
|
|
@@ -322,7 +324,7 @@ var Selector = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
322
324
|
return /*#__PURE__*/React.createElement("div", {
|
|
323
325
|
id: "pisell-pro-selector-".concat(props.id),
|
|
324
326
|
className: classNames('pisell-pro-selector', props.className),
|
|
325
|
-
style: props.style
|
|
327
|
+
style: _objectSpread(_objectSpread({}, props.style || {}), {}, _defineProperty(_defineProperty({}, '--color-primary', colorPrimary), '--color-primary-bg', colorPrimaryBg))
|
|
326
328
|
}, renderHeader(), /*#__PURE__*/React.createElement(SelectorContext.Provider, {
|
|
327
329
|
value: {
|
|
328
330
|
mode: mode,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { SelectionValue, SelectorGroupProps } from './types';
|
|
2
|
+
import type { SelectionValue, SelectorGroupProps } from './types';
|
|
3
3
|
import './selectorGroup.less';
|
|
4
4
|
export declare type SelectorGroupRef = {
|
|
5
5
|
getValues: (includeHidden?: boolean) => Record<string, SelectionValue>;
|
|
@@ -27,6 +27,7 @@ import { isEqual } from 'lodash';
|
|
|
27
27
|
import { locales } from '@pisell/utils';
|
|
28
28
|
import localeTexts from "./locales";
|
|
29
29
|
import useEngineContext from "../../hooks/useEngineContext";
|
|
30
|
+
import useThemeTokens from "../../hooks/useThemeTokens";
|
|
30
31
|
import Selector from "./Selector";
|
|
31
32
|
import { normalizeRules, computeAutoHiddenGroups, computeEffects, getSelectedSet, pruneValuesByAllowOnly, generateSimpleUUID } from "./utils";
|
|
32
33
|
import { IntersectionObserverProvider, IntersectionItem } from "./components/IntersectionObserver";
|
|
@@ -44,6 +45,9 @@ var SelectorGroup = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
44
45
|
_props$preserve = props.preserve,
|
|
45
46
|
preserveDefault = _props$preserve === void 0 ? false : _props$preserve,
|
|
46
47
|
style = props.style;
|
|
48
|
+
var _useThemeTokens = useThemeTokens(props.theme),
|
|
49
|
+
colorPrimary = _useThemeTokens.colorPrimary,
|
|
50
|
+
colorPrimaryBg = _useThemeTokens.colorPrimaryBg;
|
|
47
51
|
var _useState = useState(-1),
|
|
48
52
|
_useState2 = _slicedToArray(_useState, 2),
|
|
49
53
|
activeIndex = _useState2[0],
|
|
@@ -556,7 +560,7 @@ var SelectorGroup = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
556
560
|
return /*#__PURE__*/React.createElement("div", {
|
|
557
561
|
className: classNames('pisell-batch-selector', "pisell-batch-selector-".concat(_uniqueId)),
|
|
558
562
|
ref: containerRef,
|
|
559
|
-
style: style
|
|
563
|
+
style: _objectSpread(_objectSpread({}, style || {}), {}, _defineProperty(_defineProperty({}, '--color-primary', colorPrimary), '--color-primary-bg', colorPrimaryBg))
|
|
560
564
|
}, renderTabs(), /*#__PURE__*/React.createElement(IntersectionObserverProvider, {
|
|
561
565
|
rootMargin: "-70px 0px 0px 0px",
|
|
562
566
|
disabled: ((_props$tabProps2 = props.tabProps) === null || _props$tabProps2 === void 0 ? void 0 : _props$tabProps2.visible) === false,
|
|
@@ -33,13 +33,15 @@ var Card = function Card(_ref) {
|
|
|
33
33
|
className = _ref.className,
|
|
34
34
|
style = _ref.style;
|
|
35
35
|
// 样式属性对象,用于传递给样式函数
|
|
36
|
-
var styleProps = {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
var styleProps = useMemo(function () {
|
|
37
|
+
return {
|
|
38
|
+
selected: selected,
|
|
39
|
+
disabled: disabled,
|
|
40
|
+
hoverable: hoverable,
|
|
41
|
+
variant: variant,
|
|
42
|
+
layout: layout
|
|
43
|
+
};
|
|
44
|
+
}, [selected, disabled, hoverable, variant, layout]);
|
|
43
45
|
|
|
44
46
|
// 计算容器样式
|
|
45
47
|
var containerStyle = useMemo(function () {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* Card组件样式 */
|
|
2
2
|
.pisell-pro-card {
|
|
3
3
|
position: relative;
|
|
4
|
-
display:
|
|
4
|
+
display: flex;
|
|
5
5
|
border-radius: 8px;
|
|
6
6
|
transition: all 0.2s;
|
|
7
7
|
box-sizing: border-box;
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
/* 布局样式 */
|
|
23
23
|
&-vertical {
|
|
24
24
|
border-radius: 12px;
|
|
25
|
+
flex-direction: column;
|
|
25
26
|
|
|
26
27
|
.pisell-pro-card_content {
|
|
27
28
|
flex: 1;
|
|
@@ -32,6 +33,7 @@
|
|
|
32
33
|
align-items: center;
|
|
33
34
|
justify-content: center;
|
|
34
35
|
margin: 0;
|
|
36
|
+
padding: 0;
|
|
35
37
|
height: 64px;
|
|
36
38
|
}
|
|
37
39
|
|
|
@@ -42,12 +44,18 @@
|
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
&-horizontal {
|
|
45
|
-
|
|
47
|
+
flex-direction: row;
|
|
46
48
|
align-items: center;
|
|
47
49
|
gap: 10px;
|
|
48
50
|
|
|
49
51
|
&.pisell-pro-card-actions-left {
|
|
50
|
-
|
|
52
|
+
.pisell-pro-card_actions {
|
|
53
|
+
order: 0;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.pisell-pro-card_content {
|
|
57
|
+
order: 1;
|
|
58
|
+
}
|
|
51
59
|
}
|
|
52
60
|
|
|
53
61
|
.pisell-pro-card_content {
|
|
@@ -61,6 +69,7 @@
|
|
|
61
69
|
margin: 0;
|
|
62
70
|
padding: 0;
|
|
63
71
|
height: 100%;
|
|
72
|
+
order: 1;
|
|
64
73
|
}
|
|
65
74
|
|
|
66
75
|
.pisell-pro-card_actions-item {
|
|
@@ -94,34 +103,34 @@
|
|
|
94
103
|
/* 选中状态 - outlined类型 */
|
|
95
104
|
&-selected&-selected-outlined {
|
|
96
105
|
&.pisell-pro-card-outlined {
|
|
97
|
-
border-color: #
|
|
98
|
-
background-color: #f9f5ff;
|
|
106
|
+
border-color: var(--color-primary, #5d3f9f);
|
|
107
|
+
background-color: var(--color-primary-bg, #f9f5ff);
|
|
99
108
|
}
|
|
100
109
|
|
|
101
110
|
&.pisell-pro-card-borderless {
|
|
102
|
-
border-color: #
|
|
111
|
+
border-color: var(--color-primary, #5d3f9f);
|
|
103
112
|
}
|
|
104
113
|
.pisell-pro-card_content {
|
|
105
|
-
color: #
|
|
114
|
+
color: var(--color-primary, #5d3f9f);
|
|
106
115
|
}
|
|
107
116
|
}
|
|
108
117
|
|
|
109
118
|
/* 选中状态 - outlined-bold类型(加粗边框,使用 outline 实现不影响布局) */
|
|
110
119
|
&-selected&-selected-outlined-bold {
|
|
111
120
|
&.pisell-pro-card-outlined {
|
|
112
|
-
border-color: #
|
|
113
|
-
background-color: #f9f5ff;
|
|
114
|
-
outline: 2px solid #
|
|
121
|
+
border-color: var(--color-primary, #5d3f9f);
|
|
122
|
+
background-color: var(--color-primary-bg, #f9f5ff);
|
|
123
|
+
outline: 2px solid var(--color-primary, #5d3f9f);
|
|
115
124
|
outline-offset: -2px;
|
|
116
125
|
}
|
|
117
126
|
|
|
118
127
|
&.pisell-pro-card-borderless {
|
|
119
|
-
border-color: #
|
|
120
|
-
outline: 2px solid #
|
|
128
|
+
border-color: var(--color-primary, #5d3f9f);
|
|
129
|
+
outline: 2px solid var(--color-primary, #5d3f9f);
|
|
121
130
|
outline-offset: -2px;
|
|
122
131
|
}
|
|
123
132
|
.pisell-pro-card_content {
|
|
124
|
-
color: #
|
|
133
|
+
color: var(--color-primary, #5d3f9f);
|
|
125
134
|
}
|
|
126
135
|
}
|
|
127
136
|
|
|
@@ -129,9 +138,9 @@
|
|
|
129
138
|
&-selected&-selected-filled {
|
|
130
139
|
&.pisell-pro-card-outlined,
|
|
131
140
|
&.pisell-pro-card-borderless {
|
|
132
|
-
background-color: #
|
|
141
|
+
background-color: var(--color-primary, #5d3f9f);
|
|
133
142
|
color: #ffffff;
|
|
134
|
-
border-color: #
|
|
143
|
+
border-color: var(--color-primary, #5d3f9f);
|
|
135
144
|
|
|
136
145
|
.pisell-pro-card_content {
|
|
137
146
|
color: #ffffff;
|
|
@@ -82,7 +82,7 @@ var Indicator = function Indicator(props) {
|
|
|
82
82
|
};
|
|
83
83
|
return /*#__PURE__*/React.createElement("label", {
|
|
84
84
|
className: classes,
|
|
85
|
-
style: styles.container
|
|
85
|
+
style: styles === null || styles === void 0 ? void 0 : styles.container
|
|
86
86
|
}, /*#__PURE__*/React.createElement("input", {
|
|
87
87
|
type: mode === 'single' ? 'radio' : 'checkbox',
|
|
88
88
|
className: "".concat(prefixCls, "-input"),
|
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
position: relative;
|
|
27
27
|
box-sizing: border-box;
|
|
28
28
|
border: 1px solid #d0d5dd;
|
|
29
|
-
background-color: #ffffff;
|
|
30
29
|
display: flex;
|
|
31
30
|
align-items: center;
|
|
32
31
|
justify-content: center;
|
|
@@ -55,38 +54,39 @@
|
|
|
55
54
|
}
|
|
56
55
|
|
|
57
56
|
&-single.pisell-pro-indicator-outlined.pisell-pro-indicator-checked &-inner {
|
|
58
|
-
border-color: #
|
|
59
|
-
background-color:
|
|
57
|
+
border-color: var(--color-primary, #5d3f9f);
|
|
58
|
+
background-color: var(--color-primary-bg, transparent);
|
|
60
59
|
}
|
|
61
60
|
|
|
62
61
|
&-single.pisell-pro-indicator-outlined &-dot {
|
|
63
62
|
width: 45%;
|
|
64
63
|
height: 45%;
|
|
65
|
-
background-color: #
|
|
64
|
+
background-color: var(--color-primary, #5d3f9f);
|
|
66
65
|
border-radius: 50%;
|
|
67
66
|
}
|
|
68
67
|
|
|
69
68
|
&-single.pisell-pro-indicator-filled.pisell-pro-indicator-checked &-inner {
|
|
70
|
-
border-color: #
|
|
71
|
-
background-color: #
|
|
69
|
+
border-color: var(--color-primary, #5d3f9f);
|
|
70
|
+
background-color: var(--color-primary, #5d3f9f);
|
|
72
71
|
}
|
|
73
72
|
|
|
74
73
|
&-single.pisell-pro-indicator-filled &-check-icon {
|
|
75
74
|
color: #ffffff;
|
|
76
75
|
}
|
|
77
76
|
|
|
78
|
-
&-multiple.pisell-pro-indicator-outlined.pisell-pro-indicator-checked
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
&-multiple.pisell-pro-indicator-outlined.pisell-pro-indicator-checked
|
|
78
|
+
&-inner {
|
|
79
|
+
border-color: var(--color-primary, #5d3f9f);
|
|
80
|
+
background-color: var(--color-primary-bg, transparent);
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
&-multiple.pisell-pro-indicator-outlined &-check-icon {
|
|
84
|
-
color: #
|
|
84
|
+
color: var(--color-primary, #5d3f9f);
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
&-multiple.pisell-pro-indicator-filled.pisell-pro-indicator-checked &-inner {
|
|
88
|
-
border-color: #
|
|
89
|
-
background-color: #
|
|
88
|
+
border-color: var(--color-primary, #5d3f9f);
|
|
89
|
+
background-color: var(--color-primary, #5d3f9f);
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
&-multiple.pisell-pro-indicator-filled &-check-icon {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './index.less';
|
|
3
3
|
import type { MediaProps, MediaStyleProps, MediaShape, MediaSize, MediaCoverType } from './types';
|
|
4
|
-
export type { MediaProps, MediaStyleProps, MediaShape, MediaSize, MediaCoverType };
|
|
4
|
+
export type { MediaProps, MediaStyleProps, MediaShape, MediaSize, MediaCoverType, };
|
|
5
5
|
declare const Media: React.FC<MediaProps>;
|
|
6
6
|
export default Media;
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
.pisell-batch-selector {
|
|
2
2
|
.pisell-product-select__tabs-wrapper {
|
|
3
3
|
padding: 16px 0;
|
|
4
|
+
|
|
5
|
+
.pisell-tabstruct-item--selected {
|
|
6
|
+
background-color: var(--color-primary, #5d3f9f);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.pisell-tabstruct-selection {
|
|
10
|
+
background-color: var(--color-primary, #5d3f9f);
|
|
11
|
+
}
|
|
4
12
|
}
|
|
5
13
|
|
|
6
14
|
&__content {
|
|
@@ -13,4 +21,4 @@
|
|
|
13
21
|
padding-top: 16px;
|
|
14
22
|
}
|
|
15
23
|
}
|
|
16
|
-
}
|
|
24
|
+
}
|
|
@@ -158,6 +158,11 @@ export declare type HeaderProps = {
|
|
|
158
158
|
};
|
|
159
159
|
export interface SelectorProps<T = OptionKey> extends GroupItem {
|
|
160
160
|
className?: string;
|
|
161
|
+
theme?: {
|
|
162
|
+
token?: {
|
|
163
|
+
colorPrimary?: string;
|
|
164
|
+
};
|
|
165
|
+
};
|
|
161
166
|
value?: SelectionValue<T>;
|
|
162
167
|
defaultValue?: SelectionValue<T>;
|
|
163
168
|
onChange?: (value: SelectionValue<T>) => void;
|
|
@@ -201,6 +206,11 @@ export interface SelectorGroupProps {
|
|
|
201
206
|
dataSource: GroupItem[];
|
|
202
207
|
defaultValue?: Record<string, SelectionValue>;
|
|
203
208
|
linkageRules?: ExprRule[] | Record<string, any>;
|
|
209
|
+
theme?: {
|
|
210
|
+
token?: {
|
|
211
|
+
colorPrimary?: string;
|
|
212
|
+
};
|
|
213
|
+
};
|
|
204
214
|
onChange?: (values: Record<string, SelectionValue>) => void;
|
|
205
215
|
preserve?: boolean;
|
|
206
216
|
tabProps?: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PosProps, RouteType } from './const';
|
|
3
|
-
declare const App: ({ action, api, device_number, terminal, tyroUrl, tyroVersion, onChangeParams, isMobile, channel, formatAmount, ...props }: Omit<PosProps, "
|
|
3
|
+
declare const App: ({ action, api, device_number, terminal, tyroUrl, tyroVersion, onChangeParams, isMobile, channel, formatAmount, ...props }: Omit<PosProps, "mode" | "type" | "getApi"> & {
|
|
4
4
|
action: RouteType;
|
|
5
5
|
device_number: string | number;
|
|
6
6
|
api: ReturnType<PosProps['getApi']>;
|
|
@@ -0,0 +1,40 @@
|
|
|
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/hooks/useThemeTokens.ts
|
|
20
|
+
var useThemeTokens_exports = {};
|
|
21
|
+
__export(useThemeTokens_exports, {
|
|
22
|
+
default: () => useThemeTokens_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(useThemeTokens_exports);
|
|
25
|
+
var import_antd = require("antd");
|
|
26
|
+
var themeTokenCache = /* @__PURE__ */ new Map();
|
|
27
|
+
var useThemeTokens = (themeInput) => {
|
|
28
|
+
var _a;
|
|
29
|
+
const { useToken, getDesignToken } = import_antd.theme;
|
|
30
|
+
const { token: antdToken } = useToken();
|
|
31
|
+
const overrideColorPrimary = ((_a = themeInput == null ? void 0 : themeInput.token) == null ? void 0 : _a.colorPrimary) || antdToken.colorPrimary;
|
|
32
|
+
const cached = themeTokenCache.get(overrideColorPrimary);
|
|
33
|
+
if (cached) return cached;
|
|
34
|
+
const computed = getDesignToken({
|
|
35
|
+
token: { colorPrimary: overrideColorPrimary }
|
|
36
|
+
});
|
|
37
|
+
themeTokenCache.set(overrideColorPrimary, computed);
|
|
38
|
+
return computed;
|
|
39
|
+
};
|
|
40
|
+
var useThemeTokens_default = useThemeTokens;
|
|
@@ -37,6 +37,7 @@ var import_decimal = __toESM(require("decimal.js"));
|
|
|
37
37
|
var import_hooks = require("../../hooks");
|
|
38
38
|
var import_Cards = require("../../../../pro/Cards");
|
|
39
39
|
var NormalCard = (props) => {
|
|
40
|
+
var _a, _b;
|
|
40
41
|
const {
|
|
41
42
|
_key: uniqueKey,
|
|
42
43
|
ruleConfig,
|
|
@@ -58,7 +59,7 @@ var NormalCard = (props) => {
|
|
|
58
59
|
return null;
|
|
59
60
|
return import_react.default.cloneElement(props == null ? void 0 : props.numberSelector, {
|
|
60
61
|
onChange: (v) => {
|
|
61
|
-
var
|
|
62
|
+
var _a2;
|
|
62
63
|
const _price = add_price !== void 0 && add_price !== null ? add_price : price;
|
|
63
64
|
const priceType = price_type === "markdown" ? -1 : 1;
|
|
64
65
|
const totalPrice = new import_decimal.default(_price).times(new import_decimal.default(v)).times(priceType).toNumber();
|
|
@@ -70,7 +71,7 @@ var NormalCard = (props) => {
|
|
|
70
71
|
original_price: _price,
|
|
71
72
|
original_total: _price
|
|
72
73
|
};
|
|
73
|
-
(
|
|
74
|
+
(_a2 = props == null ? void 0 : props.actions) == null ? void 0 : _a2.update(uniqueKey, {
|
|
74
75
|
quantity: v,
|
|
75
76
|
data: newOriginal,
|
|
76
77
|
totalPrice
|
|
@@ -90,23 +91,22 @@ var NormalCard = (props) => {
|
|
|
90
91
|
return `${price_type === "markdown" ? "-" : ""}${symbol}${price || 0}`;
|
|
91
92
|
}, [price, price_type, symbol, add_price]);
|
|
92
93
|
const handleChange = () => {
|
|
93
|
-
var
|
|
94
|
+
var _a2, _b2;
|
|
94
95
|
if (disabled || isNumberSelector) return;
|
|
95
96
|
if (selected) {
|
|
96
|
-
(
|
|
97
|
+
(_a2 = props == null ? void 0 : props.actions) == null ? void 0 : _a2.update(uniqueKey, { quantity: 0 });
|
|
97
98
|
} else {
|
|
98
99
|
const _price = add_price !== void 0 && add_price !== null ? add_price : price;
|
|
99
100
|
const priceType = price_type === "markdown" ? -1 : 1;
|
|
100
|
-
const finalPrice = new import_decimal.default(_price).times(priceType).toString();
|
|
101
101
|
const newOriginal = {
|
|
102
102
|
..._original,
|
|
103
103
|
quantity: 1,
|
|
104
104
|
num: 1,
|
|
105
|
-
price:
|
|
106
|
-
original_price:
|
|
107
|
-
original_total:
|
|
105
|
+
price: _price,
|
|
106
|
+
original_price: _price,
|
|
107
|
+
original_total: _price
|
|
108
108
|
};
|
|
109
|
-
(
|
|
109
|
+
(_b2 = props == null ? void 0 : props.actions) == null ? void 0 : _b2.update(uniqueKey, {
|
|
110
110
|
quantity: 1,
|
|
111
111
|
data: newOriginal,
|
|
112
112
|
totalPrice: new import_decimal.default(_price).times(priceType).toNumber()
|
|
@@ -135,7 +135,8 @@ var NormalCard = (props) => {
|
|
|
135
135
|
}
|
|
136
136
|
))),
|
|
137
137
|
onClick: handleChange,
|
|
138
|
-
skuCardConfig
|
|
138
|
+
skuCardConfig,
|
|
139
|
+
skuDisabled: ((_b = (_a = props == null ? void 0 : props.dataSource) == null ? void 0 : _a._extra) == null ? void 0 : _b.disabled) === true
|
|
139
140
|
}
|
|
140
141
|
);
|
|
141
142
|
};
|
|
@@ -42,7 +42,7 @@ var import_OptionsModal = __toESM(require("../OptionsModal"));
|
|
|
42
42
|
var import_OptionItemCard = __toESM(require("./OptionItemCard"));
|
|
43
43
|
var import_index = require("./index.less");
|
|
44
44
|
var OptionsCard = (props) => {
|
|
45
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
45
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
46
46
|
const { _key: uniqueKey, selected, disabled } = (props == null ? void 0 : props.dataSource) || {};
|
|
47
47
|
const {
|
|
48
48
|
cover,
|
|
@@ -196,7 +196,8 @@ var OptionsCard = (props) => {
|
|
|
196
196
|
arrow: true,
|
|
197
197
|
selected,
|
|
198
198
|
disabled,
|
|
199
|
-
skuCardConfig
|
|
199
|
+
skuCardConfig,
|
|
200
|
+
skuDisabled: ((_j = (_i = props == null ? void 0 : props.dataSource) == null ? void 0 : _i._extra) == null ? void 0 : _j.disabled) === true
|
|
200
201
|
}
|
|
201
202
|
)), (selectedOptions == null ? void 0 : selectedOptions.length) > 0 && /* @__PURE__ */ import_react.default.createElement(
|
|
202
203
|
import_OptionItemCard.default,
|
|
@@ -46,7 +46,8 @@ var initialState = {
|
|
|
46
46
|
selectorValue: {},
|
|
47
47
|
skuCardConfig: import_types.defaultSkuCardConfig,
|
|
48
48
|
customConfig: {
|
|
49
|
-
modalWidth: "480px"
|
|
49
|
+
modalWidth: "480px",
|
|
50
|
+
selectorLayout: null
|
|
50
51
|
}
|
|
51
52
|
};
|
|
52
53
|
var store = (0, import_createStore.default)(initialState);
|