@pisell/materials 3.0.62 → 3.0.64
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 +142 -142
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +22 -54
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +22 -54
- package/es/components/Pagination/index.d.ts +1 -1
- package/es/components/TimeResourceSelector/index.d.ts +21 -0
- package/es/components/TimeResourceSelector/index.js +115 -0
- package/es/components/TimeResourceSelector/index.less +59 -0
- package/es/components/cardPro/index.js +1 -4
- package/es/components/iconfont/index.js +1 -1
- package/es/components/pisellAnchor/index.d.ts +15 -0
- package/es/components/pisellAnchor/index.js +126 -0
- package/es/components/pisellAnchor/index.less +177 -0
- package/es/components/pisellAvatar/index.d.ts +19 -0
- package/es/components/pisellAvatar/index.js +90 -0
- package/es/components/pisellAvatar/index.less +26 -0
- package/es/components/pisellCard/index.d.ts +8 -0
- package/es/components/pisellCard/index.js +34 -5
- package/es/components/pisellCard/index.less +31 -4
- package/es/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
- package/es/components/pisellCustomCheckboxGroup/index.js +72 -0
- package/es/components/pisellCustomCheckboxGroup/index.less +0 -0
- package/es/components/pisellDropdown/index.d.ts +20 -0
- package/es/components/pisellDropdown/index.js +51 -0
- package/es/components/pisellDropdown/index.less +44 -0
- package/es/components/pisellEmpty/index.d.ts +2 -1
- package/es/components/pisellHeaderProgressBar/index.d.ts +29 -0
- package/es/components/pisellHeaderProgressBar/index.js +76 -0
- package/es/components/pisellHeaderProgressBar/index.less +18 -0
- package/es/components/pisellImageCarousels/index.d.ts +18 -0
- package/es/components/pisellImageCarousels/index.js +108 -0
- package/es/components/pisellImageCarousels/index.less +92 -0
- package/es/components/pisellList01/index.d.ts +17 -0
- package/es/components/pisellList01/index.js +105 -0
- package/es/components/pisellList01/index.less +53 -0
- package/es/components/pisellModal/components/PcModal/index.js +1 -1
- package/es/components/pisellSectionHeaders/index.d.ts +21 -0
- package/es/components/pisellSectionHeaders/index.js +35 -0
- package/es/components/pisellSectionHeaders/index.less +46 -0
- package/es/components/pisellText/components/Amount/index.js +1 -1
- package/es/components/pisellViewGrid/index.d.ts +16 -0
- package/es/components/pisellViewGrid/index.js +66 -0
- package/es/components/pisellViewGrid/index.less +31 -0
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +4 -0
- package/es/components/productCard/components/Header/DeleteButton/index.js +21 -0
- package/es/components/productCard/components/Header/DeleteButton/index.less +15 -0
- package/es/components/productCard/components/Header/index.js +6 -15
- package/es/components/productCard/components/Header/index.less +0 -11
- package/es/components/productCard/hooks/useOpenNote.js +3 -2
- package/es/components/productCard/index.js +18 -5
- package/es/components/productCard/index.less +30 -2
- package/es/components/productCard/status.js +3 -1
- package/es/components/productCard/types.d.ts +2 -0
- package/es/components/productCard/utils.js +17 -1
- package/es/components/section-footers/index.d.ts +9 -0
- package/es/components/section-footers/index.js +17 -0
- package/es/components/section-footers/index.less +5 -0
- package/es/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
- package/es/components/table/Actions/component/ExportImport/utils/index.js +11 -0
- package/es/index.d.ts +10 -0
- package/es/index.js +10 -0
- package/lib/components/Pagination/index.d.ts +1 -1
- package/lib/components/TimeResourceSelector/index.d.ts +21 -0
- package/lib/components/TimeResourceSelector/index.js +109 -0
- package/lib/components/TimeResourceSelector/index.less +59 -0
- package/lib/components/cardPro/index.js +0 -3
- package/lib/components/iconfont/index.js +1 -1
- package/lib/components/pisellAnchor/index.d.ts +15 -0
- package/lib/components/pisellAnchor/index.js +120 -0
- package/lib/components/pisellAnchor/index.less +177 -0
- package/lib/components/pisellAvatar/index.d.ts +19 -0
- package/lib/components/pisellAvatar/index.js +108 -0
- package/lib/components/pisellAvatar/index.less +26 -0
- package/lib/components/pisellCard/index.d.ts +8 -0
- package/lib/components/pisellCard/index.js +30 -7
- package/lib/components/pisellCard/index.less +31 -4
- package/lib/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
- package/lib/components/pisellCustomCheckboxGroup/index.js +71 -0
- package/lib/components/pisellCustomCheckboxGroup/index.less +0 -0
- package/lib/components/pisellDropdown/index.d.ts +20 -0
- package/lib/components/pisellDropdown/index.js +72 -0
- package/lib/components/pisellDropdown/index.less +44 -0
- package/lib/components/pisellEmpty/index.d.ts +2 -1
- package/lib/components/pisellHeaderProgressBar/index.d.ts +29 -0
- package/lib/components/pisellHeaderProgressBar/index.js +88 -0
- package/lib/components/pisellHeaderProgressBar/index.less +18 -0
- package/lib/components/pisellImageCarousels/index.d.ts +18 -0
- package/lib/components/pisellImageCarousels/index.js +108 -0
- package/lib/components/pisellImageCarousels/index.less +92 -0
- package/lib/components/pisellList01/index.d.ts +17 -0
- package/lib/components/pisellList01/index.js +113 -0
- package/lib/components/pisellList01/index.less +53 -0
- package/lib/components/pisellModal/components/PcModal/index.js +1 -1
- package/lib/components/pisellSectionHeaders/index.d.ts +21 -0
- package/lib/components/pisellSectionHeaders/index.js +52 -0
- package/lib/components/pisellSectionHeaders/index.less +46 -0
- package/lib/components/pisellText/components/Amount/index.js +2 -2
- package/lib/components/pisellViewGrid/index.d.ts +16 -0
- package/lib/components/pisellViewGrid/index.js +98 -0
- package/lib/components/pisellViewGrid/index.less +31 -0
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +4 -0
- package/lib/components/productCard/components/Header/DeleteButton/index.js +53 -0
- package/lib/components/productCard/components/Header/DeleteButton/index.less +15 -0
- package/lib/components/productCard/components/Header/index.js +4 -14
- package/lib/components/productCard/components/Header/index.less +0 -11
- package/lib/components/productCard/hooks/useOpenNote.js +2 -1
- package/lib/components/productCard/index.js +94 -74
- package/lib/components/productCard/index.less +30 -2
- package/lib/components/productCard/status.js +3 -1
- package/lib/components/productCard/types.d.ts +2 -0
- package/lib/components/productCard/utils.js +15 -4
- package/lib/components/section-footers/index.d.ts +9 -0
- package/lib/components/section-footers/index.js +44 -0
- package/lib/components/section-footers/index.less +5 -0
- package/lib/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
- package/lib/components/table/Actions/component/ExportImport/utils/index.js +31 -0
- package/lib/index.d.ts +10 -0
- package/lib/index.js +30 -0
- package/lowcode/pisell-anchor/meta.ts +118 -0
- package/lowcode/pisell-anchor/snippets.ts +26 -0
- package/lowcode/pisell-avatar/__screenshots__/avatar-1.jpg +0 -0
- package/lowcode/pisell-avatar/meta.ts +111 -0
- package/lowcode/pisell-avatar/snippets.ts +14 -0
- package/lowcode/pisell-card/meta.ts +62 -27
- package/lowcode/pisell-card/snippets.ts +6 -0
- package/lowcode/pisell-custom-checkbox-group/__screenshots__/card-1.png +0 -0
- package/lowcode/pisell-custom-checkbox-group/meta.ts +204 -0
- package/lowcode/pisell-custom-checkbox-group/snippets.ts +56 -0
- package/lowcode/pisell-dropdown/__screenshots__/dropdown-1.png +0 -0
- package/lowcode/pisell-dropdown/meta.ts +180 -0
- package/lowcode/pisell-dropdown/snippets.ts +69 -0
- package/lowcode/pisell-header-progress-bar/meta.ts +116 -0
- package/lowcode/pisell-header-progress-bar/snippets.ts +24 -0
- package/lowcode/pisell-image-carousels/meta.ts +143 -0
- package/lowcode/pisell-image-carousels/snippets.ts +20 -0
- package/lowcode/pisell-list01/meta.ts +74 -0
- package/lowcode/pisell-list01/snippets.ts +35 -0
- package/lowcode/pisell-section-headers/meta.ts +91 -0
- package/lowcode/pisell-section-headers/snippets.ts +22 -0
- package/lowcode/pisell-view-grid/__screenshots__/card-1.png +0 -0
- package/lowcode/pisell-view-grid/meta.ts +167 -0
- package/lowcode/pisell-view-grid/snippets.ts +54 -0
- package/lowcode/section-footers/meta.ts +66 -0
- package/lowcode/section-footers/snippe.ts +21 -0
- package/package.json +4 -3
- 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
|
@@ -33,7 +33,7 @@ __export(Amount_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(Amount_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
|
-
var
|
|
36
|
+
var import_utils = require("@pisell/utils");
|
|
37
37
|
var import_usePisellConfig = __toESM(require("../../../pisell-config-provider/hooks/usePisellConfig"));
|
|
38
38
|
var Amount = (props) => {
|
|
39
39
|
const {
|
|
@@ -46,7 +46,7 @@ var Amount = (props) => {
|
|
|
46
46
|
} = props;
|
|
47
47
|
const config = (0, import_usePisellConfig.default)();
|
|
48
48
|
const amount = (0, import_react.useMemo)(() => {
|
|
49
|
-
return (0,
|
|
49
|
+
return (0, import_utils.formatAmountWithOptions)(value, (config == null ? void 0 : config.symbol) || "", {
|
|
50
50
|
precision,
|
|
51
51
|
showCurrencySymbol,
|
|
52
52
|
useThousandsSeparator,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface PisellViewGridProps {
|
|
4
|
+
columns?: number;
|
|
5
|
+
horizontalGap?: number;
|
|
6
|
+
verticalGap?: number;
|
|
7
|
+
singleRow?: boolean;
|
|
8
|
+
dataSource?: any[];
|
|
9
|
+
renderItem?: (item: any, index: number) => React.ReactNode;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
style?: React.CSSProperties;
|
|
14
|
+
}
|
|
15
|
+
declare const PisellViewGrid: React.FC<PisellViewGridProps>;
|
|
16
|
+
export default PisellViewGrid;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/pisellViewGrid/index.tsx
|
|
30
|
+
var pisellViewGrid_exports = {};
|
|
31
|
+
__export(pisellViewGrid_exports, {
|
|
32
|
+
default: () => pisellViewGrid_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(pisellViewGrid_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_pisellLoading = __toESM(require("../pisellLoading"));
|
|
37
|
+
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_index = require("./index.less");
|
|
39
|
+
var PisellViewGrid = ({
|
|
40
|
+
columns = 3,
|
|
41
|
+
horizontalGap = 10,
|
|
42
|
+
verticalGap = 10,
|
|
43
|
+
singleRow = false,
|
|
44
|
+
dataSource = [],
|
|
45
|
+
renderItem,
|
|
46
|
+
loading = false,
|
|
47
|
+
children,
|
|
48
|
+
className,
|
|
49
|
+
style
|
|
50
|
+
}) => {
|
|
51
|
+
const classes = (0, import_classnames.default)(
|
|
52
|
+
"pisell-view-grid",
|
|
53
|
+
{
|
|
54
|
+
"pisell-view-grid-single-row": singleRow
|
|
55
|
+
},
|
|
56
|
+
className
|
|
57
|
+
);
|
|
58
|
+
return /* @__PURE__ */ import_react.default.createElement(import_pisellLoading.default, { loading, fullscreen: false, style: { width: "100%" } }, /* @__PURE__ */ import_react.default.createElement(
|
|
59
|
+
"div",
|
|
60
|
+
{
|
|
61
|
+
className: classes,
|
|
62
|
+
style: {
|
|
63
|
+
...style,
|
|
64
|
+
width: "100%",
|
|
65
|
+
overflow: "hidden"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
69
|
+
"div",
|
|
70
|
+
{
|
|
71
|
+
className: "pisell-view-grid-content",
|
|
72
|
+
style: !singleRow ? {
|
|
73
|
+
gap: `${verticalGap}px ${horizontalGap}px`,
|
|
74
|
+
gridTemplateColumns: `repeat(${columns}, 1fr)`,
|
|
75
|
+
width: "100%"
|
|
76
|
+
} : {
|
|
77
|
+
display: "flex",
|
|
78
|
+
flexWrap: "nowrap",
|
|
79
|
+
overflowX: "auto",
|
|
80
|
+
width: "100%"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
dataSource.map((item, index) => /* @__PURE__ */ import_react.default.createElement(
|
|
84
|
+
"div",
|
|
85
|
+
{
|
|
86
|
+
key: index,
|
|
87
|
+
className: "pisell-view-grid-item",
|
|
88
|
+
style: {
|
|
89
|
+
minWidth: 0,
|
|
90
|
+
flex: `0 0 calc(100% / ${columns})`
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
renderItem == null ? void 0 : renderItem(item, index)
|
|
94
|
+
))
|
|
95
|
+
)
|
|
96
|
+
));
|
|
97
|
+
};
|
|
98
|
+
var pisellViewGrid_default = PisellViewGrid;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
.pisell-view-grid {
|
|
2
|
+
position: relative;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100%;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
|
|
7
|
+
&-content {
|
|
8
|
+
display: grid;
|
|
9
|
+
width: 100%;
|
|
10
|
+
// grid-template-columns: repeat(4, 1fr);
|
|
11
|
+
// gap: 10px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&-item {
|
|
15
|
+
width: 100%;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&-single-row {
|
|
19
|
+
&::-webkit-scrollbar {
|
|
20
|
+
display: none;
|
|
21
|
+
}
|
|
22
|
+
-ms-overflow-style: none;
|
|
23
|
+
scrollbar-width: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// &-item {
|
|
27
|
+
// box-sizing: border-box;
|
|
28
|
+
// display: inline-block;
|
|
29
|
+
// vertical-align: top;
|
|
30
|
+
// }
|
|
31
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/productCard/components/Header/DeleteButton/index.tsx
|
|
30
|
+
var DeleteButton_exports = {};
|
|
31
|
+
__export(DeleteButton_exports, {
|
|
32
|
+
default: () => DeleteButton_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(DeleteButton_exports);
|
|
35
|
+
var import_antd = require("antd");
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_iconfont = __toESM(require("../../../../iconfont"));
|
|
38
|
+
var import_index = require("./index.less");
|
|
39
|
+
var prefix = "pisell-lowcode-";
|
|
40
|
+
var DeleteButton = ({ onDelete }) => {
|
|
41
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
className: `${prefix}product-delete`,
|
|
45
|
+
onClick: (e) => {
|
|
46
|
+
e.stopPropagation();
|
|
47
|
+
onDelete();
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "text", icon: /* @__PURE__ */ import_react.default.createElement(import_iconfont.default, { type: "pisell2-trash-01" }) })
|
|
51
|
+
);
|
|
52
|
+
};
|
|
53
|
+
var DeleteButton_default = DeleteButton;
|
|
@@ -32,12 +32,11 @@ __export(Header_exports, {
|
|
|
32
32
|
default: () => Header_default
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(Header_exports);
|
|
35
|
-
var import_antd = require("antd");
|
|
36
35
|
var import_react = __toESM(require("react"));
|
|
37
36
|
var import_classnames = __toESM(require("classnames"));
|
|
38
|
-
var import_iconfont = __toESM(require("../../../iconfont"));
|
|
39
37
|
var import_utils = require("@pisell/utils");
|
|
40
38
|
var import_options = __toESM(require("../Packages/components/options"));
|
|
39
|
+
var import_DeleteButton = __toESM(require("./DeleteButton"));
|
|
41
40
|
var import_index = require("./index.less");
|
|
42
41
|
var prefix = "pisell-lowcode-";
|
|
43
42
|
var Header = (props) => {
|
|
@@ -50,7 +49,8 @@ var Header = (props) => {
|
|
|
50
49
|
image,
|
|
51
50
|
name,
|
|
52
51
|
price,
|
|
53
|
-
symbol
|
|
52
|
+
symbol,
|
|
53
|
+
disabled
|
|
54
54
|
} = item;
|
|
55
55
|
const showPrice = (0, import_react.useMemo)(() => {
|
|
56
56
|
return (bundle == null ? void 0 : bundle.length) > 0 || (options == null ? void 0 : options.length) > 0;
|
|
@@ -66,17 +66,7 @@ var Header = (props) => {
|
|
|
66
66
|
headerCenterStyle && `${prefix}product-options-header`
|
|
67
67
|
)
|
|
68
68
|
},
|
|
69
|
-
isShowDelete && !disabledEdit ? /* @__PURE__ */ import_react.default.createElement(
|
|
70
|
-
"div",
|
|
71
|
-
{
|
|
72
|
-
className: `${prefix}product-delete`,
|
|
73
|
-
onClick: (e) => {
|
|
74
|
-
e.stopPropagation();
|
|
75
|
-
onDelete();
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
/* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "text", icon: /* @__PURE__ */ import_react.default.createElement(import_iconfont.default, { type: "pisell2-trash-01" }) })
|
|
79
|
-
) : null,
|
|
69
|
+
isShowDelete && !disabledEdit && !disabled ? /* @__PURE__ */ import_react.default.createElement(import_DeleteButton.default, { onDelete }) : null,
|
|
80
70
|
showImage ? /* @__PURE__ */ import_react.default.createElement(
|
|
81
71
|
"img",
|
|
82
72
|
{
|
|
@@ -12,17 +12,6 @@
|
|
|
12
12
|
align-items: normal;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
&-product-delete {
|
|
16
|
-
position: absolute;
|
|
17
|
-
padding: 0;
|
|
18
|
-
top: 0;
|
|
19
|
-
right: 0;
|
|
20
|
-
cursor: pointer;
|
|
21
|
-
.pisell-lowcode-btn {
|
|
22
|
-
padding: 0;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
15
|
&-product-header-cover {
|
|
27
16
|
width: 64px;
|
|
28
17
|
height: 64px;
|
|
@@ -55,13 +55,14 @@ var useOpenNote = ({ onNoteChange }, ref) => {
|
|
|
55
55
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
56
56
|
import__.PisellModal,
|
|
57
57
|
{
|
|
58
|
-
platform: "pc",
|
|
58
|
+
platform: (0, import_utils.isMobile)() ? "h5" : "pc",
|
|
59
59
|
open,
|
|
60
60
|
bodyStyle: { padding: 0 },
|
|
61
61
|
title: (item == null ? void 0 : item.note) ? import_utils.locales.getText("pisell2.product.card.discount.edit.note") : import_utils.locales.getText("pisell2.product.card.discount.add.note"),
|
|
62
62
|
onCancel: () => setOpen(false),
|
|
63
63
|
onOk: handleOk,
|
|
64
64
|
destroyOnClose: true,
|
|
65
|
+
mobileModalHeight: "80vh",
|
|
65
66
|
className: "pisell-lowcode__booking-select-pet-modal-wrap",
|
|
66
67
|
okText: import_utils.locales.getText("pisell2.product.card.confirm"),
|
|
67
68
|
cancelText: import_utils.locales.getText("pisell2.product.card.cancel")
|
|
@@ -38,6 +38,7 @@ var import_antd = require("antd");
|
|
|
38
38
|
var import_utils = require("@pisell/utils");
|
|
39
39
|
var import_cardPro = __toESM(require("../cardPro"));
|
|
40
40
|
var import_Header = __toESM(require("./components/Header"));
|
|
41
|
+
var import_DeleteButton = __toESM(require("./components/Header/DeleteButton"));
|
|
41
42
|
var import_Time = __toESM(require("./components/Time"));
|
|
42
43
|
var import_Packages = __toESM(require("./components/Packages"));
|
|
43
44
|
var import_Sales = __toESM(require("./components/Sales"));
|
|
@@ -48,10 +49,12 @@ var import_Action = __toESM(require("./components/Action"));
|
|
|
48
49
|
var import_useOpenNote = __toESM(require("./hooks/useOpenNote"));
|
|
49
50
|
var import_locales = __toESM(require("./locales"));
|
|
50
51
|
var import_status = require("./status");
|
|
52
|
+
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
|
51
53
|
var import_index = require("./index.less");
|
|
52
|
-
import_utils.locales.init(import_locales.default, localStorage.getItem("umi_locale") || "en");
|
|
53
54
|
var ProductCard = (props) => {
|
|
54
|
-
var _a;
|
|
55
|
+
var _a, _b;
|
|
56
|
+
const context = (0, import_useEngineContext.default)();
|
|
57
|
+
const utils = context.appHelper.utils || {};
|
|
55
58
|
const {
|
|
56
59
|
dataSource = import_status.defaultValue.dataSource,
|
|
57
60
|
isShowImage = import_status.defaultValue.isShowImage,
|
|
@@ -67,6 +70,8 @@ var ProductCard = (props) => {
|
|
|
67
70
|
...other
|
|
68
71
|
} = props;
|
|
69
72
|
const useOpenNoteRef = (0, import_react.useRef)();
|
|
73
|
+
const locale = ((_a = utils == null ? void 0 : utils.storage) == null ? void 0 : _a.get("umi_locale")) || localStorage.getItem("umi_locale");
|
|
74
|
+
import_utils.locales.init(import_locales.default, locale || "en");
|
|
70
75
|
console.log(dataSource, isShowImage, isShowNote, "dataSource");
|
|
71
76
|
const {
|
|
72
77
|
image,
|
|
@@ -85,88 +90,103 @@ var ProductCard = (props) => {
|
|
|
85
90
|
return (bundle == null ? void 0 : bundle.length) || (relation_products == null ? void 0 : relation_products.length);
|
|
86
91
|
}, [bundle, relation_products]);
|
|
87
92
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
88
|
-
|
|
93
|
+
"div",
|
|
89
94
|
{
|
|
90
|
-
className: (0, import_classnames.default)("pisell-lowcode-product-card", {
|
|
91
|
-
["pisell-lowcode-product-card-
|
|
92
|
-
|
|
93
|
-
}),
|
|
94
|
-
key: _id
|
|
95
|
+
className: (0, import_classnames.default)("pisell-lowcode-product-card-wrap", {
|
|
96
|
+
["pisell-lowcode-product-card-disabled"]: dataSource == null ? void 0 : dataSource.disabled
|
|
97
|
+
})
|
|
95
98
|
},
|
|
96
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
97
|
-
|
|
99
|
+
(dataSource == null ? void 0 : dataSource.disabled) && /* @__PURE__ */ import_react.default.createElement("div", { className: "delete-btn-wrapper" }, /* @__PURE__ */ import_react.default.createElement(import_DeleteButton.default, { onDelete: () => onDelete == null ? void 0 : onDelete(dataSource) })),
|
|
100
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
101
|
+
import_cardPro.default,
|
|
98
102
|
{
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
103
|
+
className: (0, import_classnames.default)("pisell-lowcode-product-card", {
|
|
104
|
+
["pisell-lowcode-product-card-image"]: !showImage,
|
|
105
|
+
["pisell-lowcode-normal-product-card"]: !showImage && isNormalProduct
|
|
106
|
+
}),
|
|
107
|
+
key: _id
|
|
104
108
|
},
|
|
105
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
106
|
-
|
|
109
|
+
/* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
110
|
+
"div",
|
|
107
111
|
{
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
showImage,
|
|
113
|
-
onDelete: () => {
|
|
114
|
-
onDelete == null ? void 0 : onDelete(dataSource);
|
|
112
|
+
onClick: (e) => {
|
|
113
|
+
e.preventDefault();
|
|
114
|
+
e.stopPropagation();
|
|
115
|
+
onCard == null ? void 0 : onCard(dataSource);
|
|
115
116
|
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
117
|
+
},
|
|
118
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
119
|
+
import_Header.default,
|
|
120
|
+
{
|
|
121
|
+
...other,
|
|
122
|
+
item: dataSource,
|
|
123
|
+
isShowImage,
|
|
124
|
+
isShowDelete,
|
|
125
|
+
showImage,
|
|
126
|
+
onDelete: () => {
|
|
127
|
+
onDelete == null ? void 0 : onDelete(dataSource);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
),
|
|
131
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
132
|
+
import_Time.default,
|
|
133
|
+
{
|
|
134
|
+
item: dataSource,
|
|
135
|
+
isShowHolder,
|
|
136
|
+
onLike: (item) => onLike == null ? void 0 : onLike(item)
|
|
137
|
+
}
|
|
138
|
+
),
|
|
139
|
+
/* @__PURE__ */ import_react.default.createElement(import_Packages.default, { item: dataSource, isShowPackageNote }),
|
|
140
|
+
/* @__PURE__ */ import_react.default.createElement(import_Sales.default, { item: dataSource, isShowNote }),
|
|
141
|
+
((_b = dataSource.items) == null ? void 0 : _b.length) ? /* @__PURE__ */ import_react.default.createElement(import_MultiDay.default, { dataSource, hideDivider }) : /* @__PURE__ */ import_react.default.createElement(
|
|
142
|
+
import_AmountFooter.default,
|
|
143
|
+
{
|
|
144
|
+
item: dataSource,
|
|
145
|
+
hideDivider,
|
|
146
|
+
type: "total"
|
|
147
|
+
}
|
|
148
|
+
),
|
|
149
|
+
isShowNote ? /* @__PURE__ */ import_react.default.createElement(
|
|
150
|
+
import_Note.default,
|
|
151
|
+
{
|
|
152
|
+
...other,
|
|
153
|
+
item: dataSource,
|
|
154
|
+
openNote: () => {
|
|
155
|
+
useOpenNoteRef.current.open({
|
|
156
|
+
item: dataSource
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
) : null,
|
|
161
|
+
isShowAction && actionText ? /* @__PURE__ */ import_react.default.createElement(
|
|
162
|
+
import_Action.default,
|
|
163
|
+
{
|
|
164
|
+
item: dataSource,
|
|
165
|
+
onAction: () => onAction == null ? void 0 : onAction(dataSource)
|
|
166
|
+
}
|
|
167
|
+
) : null,
|
|
168
|
+
errorMessage ? /* @__PURE__ */ import_react.default.createElement(
|
|
169
|
+
import_antd.Alert,
|
|
170
|
+
{
|
|
171
|
+
message: errorMessage,
|
|
172
|
+
type: "warning",
|
|
173
|
+
showIcon: true,
|
|
174
|
+
className: "pisell-lowcode-product-card-error"
|
|
175
|
+
}
|
|
176
|
+
) : null
|
|
177
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
178
|
+
import_useOpenNote.default,
|
|
138
179
|
{
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
180
|
+
ref: useOpenNoteRef,
|
|
181
|
+
onNoteChange: (e) => {
|
|
182
|
+
onNote == null ? void 0 : onNote({
|
|
183
|
+
...dataSource,
|
|
184
|
+
note: e || ""
|
|
144
185
|
});
|
|
145
186
|
}
|
|
146
187
|
}
|
|
147
|
-
)
|
|
148
|
-
|
|
149
|
-
errorMessage ? /* @__PURE__ */ import_react.default.createElement(
|
|
150
|
-
import_antd.Alert,
|
|
151
|
-
{
|
|
152
|
-
message: errorMessage,
|
|
153
|
-
type: "warning",
|
|
154
|
-
showIcon: true,
|
|
155
|
-
className: "pisell-lowcode-product-card-error"
|
|
156
|
-
}
|
|
157
|
-
) : null
|
|
158
|
-
), /* @__PURE__ */ import_react.default.createElement(
|
|
159
|
-
import_useOpenNote.default,
|
|
160
|
-
{
|
|
161
|
-
ref: useOpenNoteRef,
|
|
162
|
-
onNoteChange: (e) => {
|
|
163
|
-
onNote == null ? void 0 : onNote({
|
|
164
|
-
...dataSource,
|
|
165
|
-
note: e || ""
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
))
|
|
188
|
+
))
|
|
189
|
+
)
|
|
170
190
|
);
|
|
171
191
|
};
|
|
172
192
|
var productCard_default = ProductCard;
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
width: 6px;
|
|
38
38
|
height: 100%;
|
|
39
39
|
background: var(--Blue-400, #53b1fd);
|
|
40
|
-
z-index:
|
|
40
|
+
z-index: 1 !important;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -47,8 +47,36 @@
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
.pisell-lowcode-product-card-wrap {
|
|
51
|
+
position: relative;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.pisell-lowcode-product-card-disabled {
|
|
55
|
+
opacity: 1;
|
|
56
|
+
|
|
57
|
+
.pisell-lowcode-product-card {
|
|
58
|
+
opacity: 0.4;
|
|
59
|
+
pointer-events: none;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.delete-btn-wrapper {
|
|
63
|
+
opacity: 1;
|
|
64
|
+
pointer-events: auto;
|
|
65
|
+
position: absolute;
|
|
66
|
+
top: 1px;
|
|
67
|
+
right: 1px;
|
|
68
|
+
z-index: 10;
|
|
69
|
+
|
|
70
|
+
.anticon {
|
|
71
|
+
color: red;
|
|
72
|
+
cursor: pointer;
|
|
73
|
+
opacity: 1;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
50
78
|
.pisell-lowcode-product-card-error {
|
|
51
79
|
border: none !important;
|
|
52
80
|
margin: 8px -16px -8px;
|
|
53
81
|
border-radius: 0 0 8px 8px;
|
|
54
|
-
}
|
|
82
|
+
}
|
|
@@ -39,6 +39,7 @@ var import_utils = require("@pisell/utils");
|
|
|
39
39
|
var import_zh_cn = require("dayjs/locale/zh-cn");
|
|
40
40
|
var import_en = require("dayjs/locale/en");
|
|
41
41
|
var import_zh_tw = require("dayjs/locale/zh-tw");
|
|
42
|
+
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
|
42
43
|
var isEn = (item) => {
|
|
43
44
|
const locale = (item == null ? void 0 : item.locale) || "en-US";
|
|
44
45
|
const _isEn = locale === "en-US" || locale === "en";
|
|
@@ -59,9 +60,12 @@ var formatMultiDayDate = (item) => {
|
|
|
59
60
|
return date;
|
|
60
61
|
};
|
|
61
62
|
var getServiceTime = (item, currentDate) => {
|
|
63
|
+
var _a, _b, _c, _d;
|
|
62
64
|
if (!(0, import_dayjs.default)(currentDate).isValid())
|
|
63
65
|
return "";
|
|
64
|
-
const
|
|
66
|
+
const context = (0, import_useEngineContext.default)();
|
|
67
|
+
const utils = context.appHelper.utils || {};
|
|
68
|
+
const locale = (item == null ? void 0 : item.locale) || ((_a = utils == null ? void 0 : utils.storage) == null ? void 0 : _a.get("umi_locale")) || "en-US";
|
|
65
69
|
const isEn2 = locale === "en-US" || locale === "en";
|
|
66
70
|
const localeTypes = {
|
|
67
71
|
"en-US": "en",
|
|
@@ -69,10 +73,17 @@ var getServiceTime = (item, currentDate) => {
|
|
|
69
73
|
"zh-HK": "zh-tw"
|
|
70
74
|
};
|
|
71
75
|
import_dayjs.default.locale(localeTypes[locale]);
|
|
72
|
-
|
|
73
|
-
|
|
76
|
+
let startDate = (0, import_dayjs.default)(item == null ? void 0 : item.start_date);
|
|
77
|
+
let endDate = (0, import_dayjs.default)(item == null ? void 0 : item.end_date);
|
|
74
78
|
const diffInDays = endDate.diff(startDate, "day");
|
|
75
|
-
|
|
79
|
+
let _format = isEn2 ? "ddd, DD/MM/YYYY" : "YYYY-MM-DD,ddd";
|
|
80
|
+
if ((item == null ? void 0 : item.hasOwnProperty("format")) && ((_b = item == null ? void 0 : item.format) == null ? void 0 : _b.length) > 0) {
|
|
81
|
+
_format = isEn2 ? (_c = item == null ? void 0 : item.format) == null ? void 0 : _c[0] : (_d = item == null ? void 0 : item.format) == null ? void 0 : _d[1];
|
|
82
|
+
}
|
|
83
|
+
if (item == null ? void 0 : item.show_time) {
|
|
84
|
+
startDate = (0, import_dayjs.default)(`${item == null ? void 0 : item.start_date} ${item == null ? void 0 : item.start_time}`);
|
|
85
|
+
endDate = (0, import_dayjs.default)(`${item == null ? void 0 : item.end_date} ${item == null ? void 0 : item.end_time}`);
|
|
86
|
+
}
|
|
76
87
|
const date = `${startDate.format(_format)} ~ ${endDate.format(_format)}`;
|
|
77
88
|
const duration = `${diffInDays} ${import_utils.locales.getText("pisell2.product.card.day")(diffInDays)}`;
|
|
78
89
|
return `${date} (${duration})`;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface SectionFooterProps {
|
|
3
|
+
left?: React.ReactNode;
|
|
4
|
+
middle?: React.ReactNode;
|
|
5
|
+
right?: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const SectionFooters: (props: SectionFooterProps) => import("react").JSX.Element;
|
|
9
|
+
export default SectionFooters;
|