@pisell/materials 6.3.4 → 6.3.5
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 +2 -2
- package/build/lowcode/render/default/view.js +8 -8
- package/build/lowcode/view.js +10 -10
- package/es/components/DragSortList/index.js +6 -6
- package/es/components/classicLayout/index.js +4 -5
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- 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 +15 -15
- package/es/components/icon/index.js +5 -5
- package/es/components/list/index.js +6 -6
- package/es/components/pisellCardList/index.js +3 -1
- package/es/components/pisellCheckboxGroup/index.d.ts +1 -0
- package/es/components/pisellCheckboxGroup/index.js +15 -1
- package/es/components/pisellWalletPassCard/index.js +6 -1
- 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/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 +2 -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.js +4 -4
- package/es/components/table/Table/fields/text/filterUtil/index.js +0 -1
- 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/walletCard/Guide/index.js +12 -1
- package/es/hooks/useResponsive.js +2 -2
- package/es/locales/en-US.d.ts +1 -0
- package/es/locales/en-US.js +1 -0
- package/es/locales/zh-CN.d.ts +1 -0
- package/es/locales/zh-CN.js +1 -0
- package/es/locales/zh-TW.d.ts +1 -0
- package/es/locales/zh-TW.js +1 -0
- 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/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- 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 +15 -15
- package/lib/components/lowCodePage/index.js +1 -2
- package/lib/components/pisellCardList/index.js +3 -1
- package/lib/components/pisellCheckboxGroup/index.d.ts +1 -0
- package/lib/components/pisellCheckboxGroup/index.js +16 -0
- package/lib/components/pisellWalletPassCard/index.js +9 -1
- package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/lib/components/table/Table/fields/date/filterUtil/index.js +3 -6
- package/lib/components/table/Table/fields/index.d.ts +2 -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/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/walletCard/Guide/index.js +11 -1
- package/lib/hooks/useResponsive.js +3 -6
- package/lib/locales/en-US.d.ts +1 -0
- package/lib/locales/en-US.js +1 -0
- package/lib/locales/zh-CN.d.ts +1 -0
- package/lib/locales/zh-CN.js +1 -0
- package/lib/locales/zh-TW.d.ts +1 -0
- package/lib/locales/zh-TW.js +1 -0
- package/lib/utils/index.d.ts +1 -1
- package/lowcode/pisell-upload/meta.ts +8 -0
- package/lowcode/pisell-wallet-pass-card/meta.ts +19 -0
- package/package.json +2 -2
- 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
|
@@ -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,7 @@ declare const formFieldMap: {
|
|
|
59
59
|
FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
60
60
|
FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
61
61
|
};
|
|
62
|
-
declare const getFieldComponent: (fieldComponent: string) =>
|
|
63
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
64
|
-
} & {
|
|
65
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
66
|
-
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & 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").InputProps & {
|
|
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> & {
|
|
62
|
+
declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<import("./Input/type").InputProps> & {
|
|
69
63
|
JSON: import("react").FC<any>;
|
|
70
64
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
71
65
|
TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
@@ -78,18 +72,14 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
78
72
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
79
73
|
onChange: (value: string) => void;
|
|
80
74
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
81
|
-
rootDomain: "custom" | "
|
|
75
|
+
rootDomain: "custom" | "xzero" | "saas";
|
|
82
76
|
customDomain?: string | undefined;
|
|
83
77
|
value?: string | undefined;
|
|
84
78
|
tenantId: string;
|
|
85
79
|
name?: string | undefined;
|
|
86
80
|
fieldKey?: string | undefined;
|
|
87
81
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
88
|
-
}) | import("react").FC<import("./
|
|
89
|
-
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
90
|
-
} & {
|
|
91
|
-
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
92
|
-
}) | ((props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
82
|
+
}) | import("react").FC<import("./IconSelect/type").IconSelectProps & 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("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<any> | ((props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
93
83
|
options?: any;
|
|
94
84
|
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
95
85
|
labelField: string;
|
|
@@ -97,5 +87,15 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
97
87
|
extraParams?: Record<string, any> | undefined;
|
|
98
88
|
} & {
|
|
99
89
|
dataSource?: any;
|
|
100
|
-
}) => JSX.Element) |
|
|
90
|
+
}) => JSX.Element) | (import("react").FC<{}> & {
|
|
91
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
92
|
+
} & {
|
|
93
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
94
|
+
}) | 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<{}> & {
|
|
95
|
+
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
96
|
+
} & {
|
|
97
|
+
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
98
|
+
}) | 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>;
|
|
101
101
|
export { getFieldComponent, formFieldMap };
|
|
@@ -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;
|
|
@@ -62,7 +62,8 @@ var PisellCardList = (props) => {
|
|
|
62
62
|
showValidDate,
|
|
63
63
|
empty,
|
|
64
64
|
showEmpty,
|
|
65
|
-
showBalanceSymbol
|
|
65
|
+
showBalanceSymbol,
|
|
66
|
+
onChangeDebounce
|
|
66
67
|
} = props;
|
|
67
68
|
return data.length ? /* @__PURE__ */ import_react.default.createElement(
|
|
68
69
|
import_pisellCheckboxGroup.default,
|
|
@@ -76,6 +77,7 @@ var PisellCardList = (props) => {
|
|
|
76
77
|
onChange,
|
|
77
78
|
iconPosition: "hide",
|
|
78
79
|
fullWidth,
|
|
80
|
+
onChangeDebounce,
|
|
79
81
|
renderOption: (item, active, index) => {
|
|
80
82
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
81
83
|
import_pisellWalletPassCard.default,
|
|
@@ -23,6 +23,7 @@ export interface PisellCheckboxGroupProps extends React.HTMLAttributes<HTMLDivEl
|
|
|
23
23
|
iconPosition?: 'left' | 'right' | 'hide';
|
|
24
24
|
optionClassName?: string;
|
|
25
25
|
optionActiveClassName?: string;
|
|
26
|
+
onChangeDebounce?: boolean;
|
|
26
27
|
}
|
|
27
28
|
/**
|
|
28
29
|
* @title: PisellCheckboxGroup
|
|
@@ -36,6 +36,7 @@ var import_react = __toESM(require("react"));
|
|
|
36
36
|
var import_usePisellConfig = __toESM(require("../pisell-config-provider/hooks/usePisellConfig"));
|
|
37
37
|
var import_classnames = __toESM(require("classnames"));
|
|
38
38
|
var import_antd = require("antd");
|
|
39
|
+
var import_ahooks = require("ahooks");
|
|
39
40
|
var import_utils = require("@pisell/utils");
|
|
40
41
|
var import_utils2 = require("@pisell/utils");
|
|
41
42
|
var import_index = require("./index.less");
|
|
@@ -62,6 +63,7 @@ var PisellCheckboxGroup = (props) => {
|
|
|
62
63
|
iconPosition = "left",
|
|
63
64
|
optionClassName,
|
|
64
65
|
optionActiveClassName,
|
|
66
|
+
onChangeDebounce,
|
|
65
67
|
...rest
|
|
66
68
|
} = props;
|
|
67
69
|
const [_value, set_value] = (0, import_react2.useState)([]);
|
|
@@ -112,6 +114,16 @@ var PisellCheckboxGroup = (props) => {
|
|
|
112
114
|
const _onChange = (val, item) => {
|
|
113
115
|
onChange == null ? void 0 : onChange(mode === "single" ? val[0] : val, item);
|
|
114
116
|
};
|
|
117
|
+
const { run } = (0, import_ahooks.useDebounceFn)(
|
|
118
|
+
(key, item) => {
|
|
119
|
+
handleSelectItem(key, item);
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
wait: 400,
|
|
123
|
+
leading: true,
|
|
124
|
+
trailing: false
|
|
125
|
+
}
|
|
126
|
+
);
|
|
115
127
|
const handleSelectItem = (key, item) => {
|
|
116
128
|
let newVal = [key];
|
|
117
129
|
if (mode === "multiple") {
|
|
@@ -146,6 +158,10 @@ var PisellCheckboxGroup = (props) => {
|
|
|
146
158
|
style: rowStyle,
|
|
147
159
|
onClick: (e) => {
|
|
148
160
|
if (option.disabled) return;
|
|
161
|
+
if (onChangeDebounce) {
|
|
162
|
+
run(option[rowKey], option);
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
149
165
|
handleSelectItem(option[rowKey], option);
|
|
150
166
|
},
|
|
151
167
|
leftContent: iconPosition === "left" && /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -293,6 +293,7 @@ var PisellWalletPassCard = (props) => {
|
|
|
293
293
|
return /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-name-wrap" }, showName && name), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-store-name" }, showStoreName && storeName));
|
|
294
294
|
};
|
|
295
295
|
const renderBalanceInfo = () => {
|
|
296
|
+
var _a;
|
|
296
297
|
return /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-amount-wrap" }, showRedeem && !disabled && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-amount-item pisell-wallet-pass-card-redeem" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-amount-item-label" }, redeemTitle || (0, import_locales.getText)("pisell-wallet-pass-card-redeem"), isMini ? ": " : ""), /* @__PURE__ */ import_react.default.createElement(
|
|
297
298
|
import_Amount.default,
|
|
298
299
|
{
|
|
@@ -308,7 +309,14 @@ var PisellWalletPassCard = (props) => {
|
|
|
308
309
|
value: balance,
|
|
309
310
|
showCurrencySymbol: showBalanceSymbol
|
|
310
311
|
}
|
|
311
|
-
)), showDiscount && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-amount-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-amount-item-label" }, (0, import_locales.getText)("pisell-discount-card-title")), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-amount-item-value" },
|
|
312
|
+
)), showDiscount && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-amount-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-amount-item-label" }, (0, import_locales.getText)("pisell-discount-card-title")), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-amount-item-value" }, ((_a = props.metadata) == null ? void 0 : _a.discount_card_type) === "fixed_amount" ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, (0, import_locales.getText)("pisell-discount-card-fixed-amount-prefix"), " ", /* @__PURE__ */ import_react.default.createElement(
|
|
313
|
+
import_Amount.default,
|
|
314
|
+
{
|
|
315
|
+
className: "pisell-card-amount-item-value",
|
|
316
|
+
useThousandsSeparator: true,
|
|
317
|
+
value: discount
|
|
318
|
+
}
|
|
319
|
+
)) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, discount, "% ", (0, import_locales.getText)("pisell-discount-card-unit"))))), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-code-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-code" }, showCode && !isMini && /* @__PURE__ */ import_react.default.createElement("div", null, code), showValidDate && /* @__PURE__ */ import_react.default.createElement("div", null, (0, import_locales.getText)("pisell-wallet-pass-card-valid-to"), " ", !!validDate ? validDate : (0, import_locales.getText)("pisell-wallet-pass-card-expireDate")))));
|
|
312
320
|
};
|
|
313
321
|
const getInputItem = (name2) => {
|
|
314
322
|
if ("validDate" === name2) {
|
|
@@ -40,17 +40,14 @@ function filterUtil_default({
|
|
|
40
40
|
key,
|
|
41
41
|
item
|
|
42
42
|
}) {
|
|
43
|
-
if (!value)
|
|
44
|
-
return true;
|
|
43
|
+
if (!value) return true;
|
|
45
44
|
const valueDayjsObj = (0, import_dayjs.default)(value);
|
|
46
45
|
if (!valueDayjsObj.isValid()) {
|
|
47
46
|
return true;
|
|
48
47
|
}
|
|
49
48
|
const dataValue = (0, import_utils2.getValueByKeys)(item, key);
|
|
50
|
-
if ((0, import_utils.isUndefined)(dataValue))
|
|
51
|
-
return false;
|
|
49
|
+
if ((0, import_utils.isUndefined)(dataValue)) return false;
|
|
52
50
|
const dataDayjsObj = (0, import_dayjs.default)(dataValue);
|
|
53
|
-
if (!dataDayjsObj.isValid())
|
|
54
|
-
return false;
|
|
51
|
+
if (!dataDayjsObj.isValid()) return false;
|
|
55
52
|
return dataDayjsObj.isSame(valueDayjsObj, "day");
|
|
56
53
|
}
|
|
@@ -197,12 +197,12 @@ export declare const fieldList: ({
|
|
|
197
197
|
field_icon: string;
|
|
198
198
|
field_name: string;
|
|
199
199
|
field_type: string;
|
|
200
|
-
default_value:
|
|
200
|
+
default_value: boolean;
|
|
201
201
|
} | {
|
|
202
202
|
field_icon: string;
|
|
203
203
|
field_name: string;
|
|
204
204
|
field_type: string;
|
|
205
|
-
default_value:
|
|
205
|
+
default_value: string;
|
|
206
206
|
} | {
|
|
207
207
|
field_icon: string;
|
|
208
208
|
field_name: string;
|
|
@@ -43,19 +43,15 @@ function filterUtil_default({
|
|
|
43
43
|
key,
|
|
44
44
|
item
|
|
45
45
|
}) {
|
|
46
|
-
if (!value)
|
|
47
|
-
|
|
48
|
-
if ((value == null ? void 0 : value.length) !== 2)
|
|
49
|
-
return true;
|
|
46
|
+
if (!value) return true;
|
|
47
|
+
if ((value == null ? void 0 : value.length) !== 2) return true;
|
|
50
48
|
const valueDayjsObj = value.map((item2) => (0, import_dayjs.default)(item2 || ""));
|
|
51
49
|
if (valueDayjsObj.some((item2) => !item2.isValid())) {
|
|
52
50
|
return true;
|
|
53
51
|
}
|
|
54
52
|
const dataValue = (0, import_utils2.getValueByKeys)(item, key);
|
|
55
|
-
if ((0, import_utils.isUndefined)(dataValue))
|
|
56
|
-
return false;
|
|
53
|
+
if ((0, import_utils.isUndefined)(dataValue)) return false;
|
|
57
54
|
const dataDayjsObj = (0, import_dayjs.default)(dataValue);
|
|
58
|
-
if (!dataDayjsObj.isValid())
|
|
59
|
-
return false;
|
|
55
|
+
if (!dataDayjsObj.isValid()) return false;
|
|
60
56
|
return isDateInRange(dataDayjsObj, valueDayjsObj);
|
|
61
57
|
}
|
|
@@ -25,8 +25,7 @@ module.exports = __toCommonJS(utils_exports);
|
|
|
25
25
|
var import_utils = require("@pisell/utils");
|
|
26
26
|
var getValueByKeys = (obj, keys) => {
|
|
27
27
|
var _a;
|
|
28
|
-
if (!keys)
|
|
29
|
-
return keys;
|
|
28
|
+
if (!keys) return keys;
|
|
30
29
|
if ((0, import_utils.isString)(keys)) {
|
|
31
30
|
keys = [keys];
|
|
32
31
|
}
|
|
@@ -155,7 +155,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
|
|
|
155
155
|
sort?: SortType | undefined;
|
|
156
156
|
mode: "" | "localStorage" | "remote";
|
|
157
157
|
currentViewMode: ModeType;
|
|
158
|
-
}) => ("
|
|
158
|
+
}) => ("view_mode" | "filter_setting" | "group_by" | "order_by" | "column_setting" | "gallery_setting")[];
|
|
159
159
|
export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
|
|
160
160
|
export declare const stringify: (obj: Record<string, any>) => string;
|
|
161
161
|
export {};
|
|
@@ -51,9 +51,19 @@ var Guide = (props) => {
|
|
|
51
51
|
return (setting == null ? void 0 : setting.walletGuideConfig) || {};
|
|
52
52
|
}, [setting == null ? void 0 : setting.walletGuideConfig]);
|
|
53
53
|
const handleClick = (e) => {
|
|
54
|
-
var _a2;
|
|
54
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
|
|
55
55
|
e.stopPropagation();
|
|
56
56
|
if (!((_a2 = _setting == null ? void 0 : _setting.skipLink) == null ? void 0 : _a2.page)) return;
|
|
57
|
+
if ((_d2 = (_c2 = (_b2 = utils == null ? void 0 : utils.interaction) == null ? void 0 : _b2.utils) == null ? void 0 : _c2.isAppEnv) == null ? void 0 : _d2.call(_c2)) {
|
|
58
|
+
(_g2 = (_f2 = (_e2 = utils == null ? void 0 : utils.interaction) == null ? void 0 : _e2.utils) == null ? void 0 : _f2.postMessageToApp) == null ? void 0 : _g2.call(_f2, {
|
|
59
|
+
module: "global",
|
|
60
|
+
key: "openNative",
|
|
61
|
+
data: {
|
|
62
|
+
link: _setting == null ? void 0 : _setting.skipLink
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
57
67
|
utils == null ? void 0 : utils.jumpPageByLink(_setting == null ? void 0 : _setting.skipLink);
|
|
58
68
|
};
|
|
59
69
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -35,8 +35,7 @@ var responsiveConfig = {
|
|
|
35
35
|
function handleResize() {
|
|
36
36
|
const oldInfo = info;
|
|
37
37
|
calculate();
|
|
38
|
-
if (oldInfo === info)
|
|
39
|
-
return;
|
|
38
|
+
if (oldInfo === info) return;
|
|
40
39
|
for (const subscriber of subscribers) {
|
|
41
40
|
subscriber();
|
|
42
41
|
}
|
|
@@ -58,8 +57,7 @@ function calculate() {
|
|
|
58
57
|
}
|
|
59
58
|
function configResponsive(config) {
|
|
60
59
|
responsiveConfig = config;
|
|
61
|
-
if (info)
|
|
62
|
-
calculate();
|
|
60
|
+
if (info) calculate();
|
|
63
61
|
}
|
|
64
62
|
function useResponsive() {
|
|
65
63
|
if (import_utils.isBrowser && !listening) {
|
|
@@ -70,8 +68,7 @@ function useResponsive() {
|
|
|
70
68
|
}
|
|
71
69
|
const [state, setState] = (0, import_react.useState)(info);
|
|
72
70
|
(0, import_react.useEffect)(() => {
|
|
73
|
-
if (!import_utils.isBrowser)
|
|
74
|
-
return;
|
|
71
|
+
if (!import_utils.isBrowser) return;
|
|
75
72
|
if (!listening) {
|
|
76
73
|
window.addEventListener("resize", handleResize);
|
|
77
74
|
}
|
package/lib/locales/en-US.d.ts
CHANGED
|
@@ -136,6 +136,7 @@ declare const _default: {
|
|
|
136
136
|
'pisell-adjust-price-discount-can-be-maximum': string;
|
|
137
137
|
'pisell-discount-card-title': string;
|
|
138
138
|
'pisell-discount-card-unit': string;
|
|
139
|
+
'pisell-discount-card-fixed-amount-prefix': string;
|
|
139
140
|
'pisell-data-source-table-add': string;
|
|
140
141
|
'pisell-data-source-table-edit': string;
|
|
141
142
|
'pisell-data-source-table-detail': string;
|
package/lib/locales/en-US.js
CHANGED
|
@@ -169,6 +169,7 @@ var en_US_default = {
|
|
|
169
169
|
"pisell-adjust-price-discount-can-be-maximum": "Discount can be maximum",
|
|
170
170
|
"pisell-discount-card-title": "Discount",
|
|
171
171
|
"pisell-discount-card-unit": "off",
|
|
172
|
+
"pisell-discount-card-fixed-amount-prefix": "Save",
|
|
172
173
|
// 数据源表格
|
|
173
174
|
"pisell-data-source-table-add": "Add",
|
|
174
175
|
"pisell-data-source-table-edit": "Edit",
|
package/lib/locales/zh-CN.d.ts
CHANGED
|
@@ -136,6 +136,7 @@ declare const _default: {
|
|
|
136
136
|
'pisell-adjust-price-discount-can-be-maximum': string;
|
|
137
137
|
'pisell-discount-card-title': string;
|
|
138
138
|
'pisell-discount-card-unit': string;
|
|
139
|
+
'pisell-discount-card-fixed-amount-prefix': string;
|
|
139
140
|
'pisell-data-source-table-add': string;
|
|
140
141
|
'pisell-data-source-table-edit': string;
|
|
141
142
|
'pisell-data-source-table-detail': string;
|
package/lib/locales/zh-CN.js
CHANGED
|
@@ -169,6 +169,7 @@ var zh_CN_default = {
|
|
|
169
169
|
"pisell-adjust-price-discount-can-be-maximum": "折扣最高可达",
|
|
170
170
|
"pisell-discount-card-title": "折扣",
|
|
171
171
|
"pisell-discount-card-unit": "折扣",
|
|
172
|
+
"pisell-discount-card-fixed-amount-prefix": "立减",
|
|
172
173
|
"pisell-data-source-table-add": "添加",
|
|
173
174
|
"pisell-data-source-table-edit": "编辑",
|
|
174
175
|
"pisell-data-source-table-detail": "详情",
|
package/lib/locales/zh-TW.d.ts
CHANGED
|
@@ -136,6 +136,7 @@ declare const _default: {
|
|
|
136
136
|
'pisell-adjust-price-discount-can-be-maximum': string;
|
|
137
137
|
'pisell-discount-card-title': string;
|
|
138
138
|
'pisell-discount-card-unit': string;
|
|
139
|
+
'pisell-discount-card-fixed-amount-prefix': string;
|
|
139
140
|
'pisell-data-source-table-add': string;
|
|
140
141
|
'pisell-data-source-table-edit': string;
|
|
141
142
|
'pisell-data-source-table-detail': string;
|
package/lib/locales/zh-TW.js
CHANGED
|
@@ -169,6 +169,7 @@ var zh_TW_default = {
|
|
|
169
169
|
"pisell-adjust-price-discount-can-be-maximum": "折扣最高可達",
|
|
170
170
|
"pisell-discount-card-title": "折扣",
|
|
171
171
|
"pisell-discount-card-unit": "折扣",
|
|
172
|
+
"pisell-discount-card-fixed-amount-prefix": "立減",
|
|
172
173
|
// 数据源表格
|
|
173
174
|
"pisell-data-source-table-add": "添加",
|
|
174
175
|
"pisell-data-source-table-edit": "編輯",
|
package/lib/utils/index.d.ts
CHANGED
|
@@ -153,6 +153,19 @@ export default {
|
|
|
153
153
|
propType: 'bool',
|
|
154
154
|
setter: 'BoolSetter',
|
|
155
155
|
defaultValue: true,
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
name: 'discount',
|
|
159
|
+
title: { label: '折扣' },
|
|
160
|
+
propType: 'string',
|
|
161
|
+
setter: ['StringSetter', 'NumberSetter', 'VariableSetter'],
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: 'showDiscount',
|
|
165
|
+
title: { label: '显示折扣' },
|
|
166
|
+
propType: 'bool',
|
|
167
|
+
setter: 'BoolSetter',
|
|
168
|
+
defaultValue: true,
|
|
156
169
|
},
|
|
157
170
|
{
|
|
158
171
|
name: 'code',
|
|
@@ -213,6 +226,12 @@ export default {
|
|
|
213
226
|
setter: 'BoolSetter',
|
|
214
227
|
defaultValue: true,
|
|
215
228
|
},
|
|
229
|
+
{
|
|
230
|
+
name: 'metadata',
|
|
231
|
+
title: { label: '元信息' },
|
|
232
|
+
propType: 'object',
|
|
233
|
+
setter: 'JsonSetter',
|
|
234
|
+
}
|
|
216
235
|
],
|
|
217
236
|
},
|
|
218
237
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.5",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
"swiper": "^8.4.7",
|
|
72
72
|
"react-barcode": "^1.5.3",
|
|
73
73
|
"vod-js-sdk-v6": "^1.4.11",
|
|
74
|
-
"@pisell/icon": "0.0.11",
|
|
75
74
|
"@pisell/date-picker": "3.0.4",
|
|
75
|
+
"@pisell/icon": "0.0.11",
|
|
76
76
|
"@pisell/utils": "3.0.1"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.materials-grid{display:flex;flex-direction:column;height:100%;width:100%}.materials-grid-header{align-items:center;display:flex;justify-content:space-between;margin-bottom:16px}.materials-grid-header .right-wrap{align-items:center;display:flex;gap:8px}.materials-grid-actions{align-items:center;display:flex;justify-content:space-between;margin-bottom:16px}.materials-grid-actions .left-wrap{align-items:center;display:flex;flex:1 1}.materials-grid-actions .left-wrap .pisell-lowcode-form-item{margin-bottom:0}.materials-grid-actions .right-wrap{align-items:center;display:flex;gap:8px}.materials-grid-actions .right-wrap .icon{cursor:pointer;transition:.2s}.materials-grid-actions .right-wrap .icon:hover{color:var(--theme-color)}.materials-grid-actions .right-wrap .button{align-items:center;display:flex;font-size:12px;height:28px;justify-content:center}.filter-dropdown-wrap{display:flex;flex-direction:column;max-height:400px;max-width:calc(100vw - 24px);min-width:250px;padding:4px;width:400px}.filter-dropdown-wrap .filter-dropdown-wrap-content{flex:1 1;overflow:auto}.filter-dropdown-wrap .filter-dropdown-drag-item{align-items:center;background:#f9fafb;background:var(--gray-50,#f9fafb);border-radius:8px;display:flex;margin-bottom:12px;padding:8px 12px 12px}.filter-dropdown-wrap .filter-dropdown-drag-item .dots-six-icon{color:#98a2b3;cursor:pointer;font-size:24px}.filter-dropdown-wrap .filter-dropdown-drag-item .pisell-lowcode-form-item{margin-bottom:0}.filter-dropdown-wrap .filter-dropdown-drag-item .filter-dropdown-drag-item-right{flex:1 1;margin-left:16px}.filter-dropdown-wrap .filter-dropdown-drag-item .filter-dropdown-drag-item-right .filter-dropdown-drag-item-title{color:#777;color:var(--text-text-2,#777);font-size:14px;font-style:normal;font-weight:600;line-height:20px}.filter-dropdown-container-wrap{border-bottom:1px solid #e2e2e2;border-bottom:1px solid var(--surface-surface-4,#e2e2e2);margin-bottom:20px;min-height:70px}.filter-dropdown-container-wrap:last-child{border:none}.filter-dropdown-container-wrap .filter-dropdown-container-title-wrap{align-items:center;color:#919191;color:var(--text-text-3,#919191);display:flex;font-size:16px;font-style:normal;font-weight:600;line-height:22px;margin-bottom:12px}.filter-dropdown-container-wrap .filter-dropdown-container-title-wrap .filter-dropdown-container-title{color:#101828;color:var(--gray-900,#101828);font-size:16px;font-style:normal;font-weight:600;line-height:24px;margin-right:6px}.filter-dropdown-container-wrap .filter-dropdown-container-title-wrap .filter-dropdown-container-icon-help{color:#98a2b3;color:var(--gray-400,#98a2b3);font-size:20px}.filter-dropdown-container-wrap .filter-dropdown-container-filter-wrap{min-height:80px}.materials-sort-list-empty{color:#5a5a5a;display:block;padding-top:22px;text-align:center}.materials-grid-summary{margin-bottom:16px}.grid-view-table-wrap{position:relative}.materials-grid-paginator{align-items:center;background-color:#fff;border:1px solid #f0f0f0;border-radius:0 0 8px 8px;border-top:none;display:flex;height:50px;justify-content:center;margin:0!important;padding:0 20px;width:100%}.materials-grid-paginator .pisell-lowcode-pagination-total-text{color:#667085;color:var(--gray-500,#667085);font-size:14px;font-style:normal;font-weight:500;margin-right:auto}.materials-grid-paginator .pisell-lowcode-pagination-item{border:1px solid #d0d5dd;border-radius:0;border-right:0;margin:0;position:relative}.materials-grid-paginator .pisell-lowcode-pagination-jump-next,.materials-grid-paginator .pisell-lowcode-pagination-jump-prev{border:1px solid #d0d5dd;border-radius:0;border-right:none;margin:0}.materials-grid-paginator .pisell-lowcode-pagination-item-link:hover{color:rgba(0,0,0,.88)!important;font-weight:450!important}.materials-grid-paginator .pisell-lowcode-pagination-item-link:hover .pisell-lowcode-pagination-item-link-icon{color:rgba(0,0,0,.88)!important;font-weight:450!important}.materials-grid-paginator .pisell-lowcode-pagination-item-active:hover{border-color:#d0d5dd!important}.materials-grid-paginator .pisell-lowcode-pagination-item-active{background-color:rgba(0,0,0,.06)}.materials-grid-paginator .pisell-lowcode-pagination-item-active a{color:rgba(0,0,0,.88)!important;font-weight:450!important}.materials-grid-paginator .pisell-lowcode-pagination-prev{align-items:center;border:1px solid #d0d5dd;border-radius:8px 0 0 8px;border-right:none;display:flex;justify-content:center;margin:0;min-width:auto}.materials-grid-paginator .pisell-lowcode-pagination-next{align-items:center;border:1px solid #d0d5dd;border-radius:0 8px 8px 0;display:flex;justify-content:center;margin:0;min-width:auto}.paginator-page-btn{align-items:center;border-radius:4px 4px 4px 4px;color:#344054;color:var(--gray-700,#344054);cursor:pointer;display:flex;font-size:12px;font-weight:400;justify-content:center;padding:10px 16px;transition:.2s;-ms-user-select:none;user-select:none}.paginator-page-btn .paginator-page-btn-text{font-weight:600}.paginator-page-btn .paginator-page-btn-left-icon,.paginator-page-btn .paginator-page-btn-right-icon{font-size:20px}.paginator-page-btn .paginator-page-btn-left-icon{margin-right:8px}.paginator-page-btn .paginator-page-btn-right-icon{margin-left:8px}.paginator-page-btn.left{margin-right:auto}.paginator-page-btn.left .icon{font-size:18px;margin-right:8px}.paginator-page-btn.right{margin-left:auto}.paginator-page-btn.right .icon{font-size:18px;margin-left:8px;transform:rotate(180deg)}.materials-grid-paginator-mini{align-items:center;background-color:#fff;border:1px solid #f0f0f0;border-radius:0 0 8px 8px;border-top:none;display:flex;height:50px;justify-content:space-between;margin:0!important;overflow:hidden;padding:0 20px;width:100%}.materials-grid-paginator-mini .paginator-page-btn{padding:8px}.materials-grid-paginator-mini .materials-grid-paginator-center{align-items:center;display:flex;gap:4px;justify-content:center}.materials-grid-paginator-mini .materials-grid-paginator-center .materials-grid-paginator-center-text{color:#344054;color:var(--gray-700,#344054);font-size:14px;font-style:normal;font-weight:400}.materials-grid-paginator-mini .materials-grid-paginator-center .materials-grid-paginator-center-value{color:#344054;color:var(--gray-700,#344054);font-size:14px;font-style:normal;font-weight:500}.materials-grid-paginator-mini .pisell-lowcode-pagination-next,.materials-grid-paginator-mini .pisell-lowcode-pagination-prev{border:1px solid #d0d5dd;border-radius:8px;margin:0}.materials-grid-paginator-mini .pisell-lowcode-pagination-next .paginator-page-btn-left-icon,.materials-grid-paginator-mini .pisell-lowcode-pagination-prev .paginator-page-btn-left-icon{margin-right:0}.materials-grid-paginator-mini .pisell-lowcode-pagination-next .paginator-page-btn-right-icon,.materials-grid-paginator-mini .pisell-lowcode-pagination-prev .paginator-page-btn-right-icon{margin-left:0}.react-resizable{position:relative}.react-resizable-handle{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgd2lkdGg9IjYiIGhlaWdodD0iNiI+PHBhdGggZD0iTTYgNkgwVjQuMmg0LjJWMEg2djZaIiBvcGFjaXR5PSIuMzAyIi8+PC9zdmc+);background-origin:content-box;background-position:100% 100%;background-repeat:no-repeat;box-sizing:border-box;height:20px;padding:0 3px 3px 0;position:absolute;width:20px}.react-resizable-handle-sw{bottom:0;cursor:sw-resize;left:0;transform:rotate(90deg)}.react-resizable-handle-se{bottom:0;cursor:se-resize;right:0}.react-resizable-handle-nw{cursor:nw-resize;left:0;top:0;transform:rotate(180deg)}.react-resizable-handle-ne{cursor:ne-resize;right:0;top:0;transform:rotate(270deg)}.react-resizable-handle-e,.react-resizable-handle-w{cursor:ew-resize;margin-top:-10px;top:50%}.react-resizable-handle-w{left:0;transform:rotate(135deg)}.react-resizable-handle-e{right:0;transform:rotate(315deg)}.react-resizable-handle-n,.react-resizable-handle-s{cursor:ns-resize;left:50%;margin-left:-10px}.react-resizable-handle-n{top:0;transform:rotate(225deg)}.react-resizable-handle-s{bottom:0;transform:rotate(45deg)}.materials-grid-table-header-cell{align-items:center;display:flex;height:44px;padding:0 14px}.materials-grid-table-header-cell .field-icon{color:#777;font-size:18px}.materials-grid-table-header-cell .materials-grid-table-header-cell-content{color:#1b1b1b;flex:auto;font-size:14px;font-weight:600;overflow:hidden;padding-right:10px;text-overflow:ellipsis;white-space:nowrap;word-break:break-all}.materials-grid-table-header-cell .actions{align-items:center;display:flex;gap:8px}.materials-grid-table-header-cell .actions .action{color:#ababab;cursor:pointer;font-size:14px}.editable-cell-value-wrap{height:100%;width:100%}.materials-grid-table-cell{height:1px;padding:0!important}.cell-provider{align-items:center;border-radius:4px;cursor:pointer;display:flex;height:100%;justify-content:center;padding:12px;position:relative;width:100%}.cell-provider.focus{box-shadow:var(--theme-color) 0 0 0 1px!important}
|