@pisell/materials 2.2.41 → 2.2.43
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/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/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/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/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/index.js +3 -2
- package/es/components/productCard/hooks/useOpenNote.js +3 -2
- package/es/components/productCard/index.js +7 -3
- package/es/components/productCard/index.less +6 -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 +11 -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/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/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/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/index.js +3 -2
- package/lib/components/productCard/hooks/useOpenNote.js +2 -1
- package/lib/components/productCard/index.js +9 -4
- package/lib/components/productCard/index.less +6 -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/build/lowcode/assets-daily.json +0 -93
- package/build/lowcode/assets-dev.json +0 -93
- package/build/lowcode/assets-prod.json +0 -93
- package/build/lowcode/designer.html +0 -303
- package/build/lowcode/index.html +0 -305
- package/build/lowcode/index.js +0 -1
- package/build/lowcode/meta.js +0 -9
- package/build/lowcode/preview.css +0 -1
- package/build/lowcode/preview.html +0 -35
- package/build/lowcode/preview.js +0 -304
- package/build/lowcode/render/default/view.css +0 -1
- package/build/lowcode/render/default/view.js +0 -232
- package/build/lowcode/view.css +0 -1
- package/build/lowcode/view.js +0 -232
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
.pisell-image-carousel {
|
|
2
|
+
position: relative;
|
|
3
|
+
overflow: hidden;
|
|
4
|
+
|
|
5
|
+
.swiper {
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: 100%;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.swiper-slide {
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
|
|
15
|
+
img {
|
|
16
|
+
width: 100%;
|
|
17
|
+
height: 100%;
|
|
18
|
+
object-fit: cover;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// 导航箭头样式
|
|
23
|
+
.pisell-carousel-prev,
|
|
24
|
+
.pisell-carousel-next {
|
|
25
|
+
position: absolute;
|
|
26
|
+
top: 50%;
|
|
27
|
+
transform: translateY(-50%);
|
|
28
|
+
width: 44px;
|
|
29
|
+
height: 44px;
|
|
30
|
+
border-radius: 50%;
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
z-index: 10;
|
|
36
|
+
transition: all 0.3s;
|
|
37
|
+
padding: 10px;
|
|
38
|
+
background: rgba(255, 255, 255, 0.6);
|
|
39
|
+
backdrop-filter: blur(4px);
|
|
40
|
+
|
|
41
|
+
&:hover {
|
|
42
|
+
background: rgba(255, 255, 255, 1);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.carousel-arrow {
|
|
46
|
+
color: #344054;
|
|
47
|
+
font-size: 24px;
|
|
48
|
+
line-height: 1;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.pisell-carousel-prev {
|
|
53
|
+
left: 20px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.pisell-carousel-next {
|
|
57
|
+
right: 20px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// 分页点样式
|
|
61
|
+
.pisell-carousel-pagination {
|
|
62
|
+
position: absolute;
|
|
63
|
+
bottom: 16px;
|
|
64
|
+
left: 50%;
|
|
65
|
+
transform: translateX(-50%);
|
|
66
|
+
z-index: 10;
|
|
67
|
+
display: inline-flex;
|
|
68
|
+
padding: 12px;
|
|
69
|
+
justify-content: center;
|
|
70
|
+
align-items: center;
|
|
71
|
+
gap: 6px;
|
|
72
|
+
border-radius: 17px;
|
|
73
|
+
background: rgba(255, 255, 255, 0.9);
|
|
74
|
+
backdrop-filter: blur(4px);
|
|
75
|
+
width: max-content;
|
|
76
|
+
|
|
77
|
+
.swiper-pagination-bullet {
|
|
78
|
+
width: 10px;
|
|
79
|
+
height: 10px;
|
|
80
|
+
border-radius: 50%;
|
|
81
|
+
cursor: pointer;
|
|
82
|
+
background: var(--Gray-300, #d0d5dd);
|
|
83
|
+
mix-blend-mode: multiply;
|
|
84
|
+
margin: 0;
|
|
85
|
+
opacity: 1;
|
|
86
|
+
|
|
87
|
+
&-active {
|
|
88
|
+
background: var(--Primary-700, #6941c6);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface PisellList01Props {
|
|
4
|
+
dataSource?: any[];
|
|
5
|
+
showSearch: boolean;
|
|
6
|
+
showCategory: boolean;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
renderItem?: (item: any, index: number) => React.ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
onChange?: (anchor: string) => void;
|
|
12
|
+
onSearch?: (value: any) => void;
|
|
13
|
+
isShowEmpty?: boolean;
|
|
14
|
+
description?: any;
|
|
15
|
+
}
|
|
16
|
+
declare const PisellList01: React.FC<PisellList01Props>;
|
|
17
|
+
export default PisellList01;
|
|
@@ -0,0 +1,113 @@
|
|
|
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/pisellList01/index.tsx
|
|
30
|
+
var pisellList01_exports = {};
|
|
31
|
+
__export(pisellList01_exports, {
|
|
32
|
+
default: () => pisellList01_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(pisellList01_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_icons = require("@ant-design/icons");
|
|
37
|
+
var import_pisellViewGrid = __toESM(require("../pisellViewGrid"));
|
|
38
|
+
var import_pisellAnchor = __toESM(require("../pisellAnchor"));
|
|
39
|
+
var import_pisellEmpty = __toESM(require("../pisellEmpty"));
|
|
40
|
+
var import_input = __toESM(require("../input"));
|
|
41
|
+
var import_index = require("./index.less");
|
|
42
|
+
var PisellList01 = ({
|
|
43
|
+
showSearch,
|
|
44
|
+
showCategory,
|
|
45
|
+
placeholder,
|
|
46
|
+
dataSource,
|
|
47
|
+
renderItem,
|
|
48
|
+
className,
|
|
49
|
+
style,
|
|
50
|
+
onChange,
|
|
51
|
+
onSearch,
|
|
52
|
+
isShowEmpty = true,
|
|
53
|
+
description
|
|
54
|
+
}) => {
|
|
55
|
+
const [currentAnchor, setCurrentAnchor] = (0, import_react.useState)("");
|
|
56
|
+
const [products, setProducts] = (0, import_react.useState)([]);
|
|
57
|
+
(0, import_react.useEffect)(() => {
|
|
58
|
+
if (!showCategory) {
|
|
59
|
+
return setProducts(dataSource ?? []);
|
|
60
|
+
}
|
|
61
|
+
if (currentAnchor) {
|
|
62
|
+
const currentData = dataSource == null ? void 0 : dataSource.find(
|
|
63
|
+
(item) => item.href === currentAnchor
|
|
64
|
+
);
|
|
65
|
+
setProducts((currentData == null ? void 0 : currentData.children) ?? []);
|
|
66
|
+
}
|
|
67
|
+
}, [currentAnchor, dataSource, showCategory]);
|
|
68
|
+
(0, import_react.useEffect)(() => {
|
|
69
|
+
var _a;
|
|
70
|
+
setCurrentAnchor(((_a = dataSource == null ? void 0 : dataSource[0]) == null ? void 0 : _a.href) ?? "");
|
|
71
|
+
}, [dataSource]);
|
|
72
|
+
const categoryTitle = (0, import_react.useMemo)(() => {
|
|
73
|
+
var _a;
|
|
74
|
+
return (_a = dataSource == null ? void 0 : dataSource.find((item) => item.href === currentAnchor)) == null ? void 0 : _a.title;
|
|
75
|
+
}, [currentAnchor, dataSource]);
|
|
76
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `pisell-list-01 ${className}`, style }, showSearch ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-list-01-search" }, /* @__PURE__ */ import_react.default.createElement(
|
|
77
|
+
import_input.default,
|
|
78
|
+
{
|
|
79
|
+
placeholder: placeholder || "Search",
|
|
80
|
+
prefix: /* @__PURE__ */ import_react.default.createElement(import_icons.SearchOutlined, { style: { color: "#667085" } }),
|
|
81
|
+
onChange: onSearch,
|
|
82
|
+
allowClear: true,
|
|
83
|
+
size: "large",
|
|
84
|
+
className: "pisell-list-01-search-input"
|
|
85
|
+
}
|
|
86
|
+
)) : null, showCategory ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-list-01-categories" }, /* @__PURE__ */ import_react.default.createElement(
|
|
87
|
+
import_pisellAnchor.default,
|
|
88
|
+
{
|
|
89
|
+
items: dataSource,
|
|
90
|
+
getCurrentAnchor: currentAnchor,
|
|
91
|
+
onChange: (e) => {
|
|
92
|
+
onChange == null ? void 0 : onChange(e);
|
|
93
|
+
setCurrentAnchor(e);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
)) : null, /* @__PURE__ */ import_react.default.createElement(
|
|
97
|
+
"div",
|
|
98
|
+
{
|
|
99
|
+
className: `pisell-list-01-products ${!products.length && isShowEmpty ? "pisell-list-01-products-empty" : ""}`
|
|
100
|
+
},
|
|
101
|
+
showCategory ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-list-01-products-title" }, categoryTitle) : null,
|
|
102
|
+
products.length > 0 ? /* @__PURE__ */ import_react.default.createElement(
|
|
103
|
+
import_pisellViewGrid.default,
|
|
104
|
+
{
|
|
105
|
+
dataSource: products,
|
|
106
|
+
columns: 1,
|
|
107
|
+
verticalGap: 16,
|
|
108
|
+
renderItem
|
|
109
|
+
}
|
|
110
|
+
) : isShowEmpty ? /* @__PURE__ */ import_react.default.createElement(import_pisellEmpty.default, { description }) : null
|
|
111
|
+
));
|
|
112
|
+
};
|
|
113
|
+
var pisellList01_default = PisellList01;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
.pisell-list-01 {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
width: 100%;
|
|
5
|
+
|
|
6
|
+
&-search {
|
|
7
|
+
width: 100%;
|
|
8
|
+
padding: 16px;
|
|
9
|
+
|
|
10
|
+
.pisell-list-01-search-input {
|
|
11
|
+
display: flex;
|
|
12
|
+
padding: 10px 14px;
|
|
13
|
+
align-items: center;
|
|
14
|
+
gap: 8px;
|
|
15
|
+
align-self: stretch;
|
|
16
|
+
border-radius: 8px;
|
|
17
|
+
border: 1px solid var(--Gray-300, #d0d5dd);
|
|
18
|
+
background: var(--Base-White, #fff);
|
|
19
|
+
box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
|
|
20
|
+
height: 44px;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&-categories {
|
|
25
|
+
padding: 16px 0 16px 20px;
|
|
26
|
+
.pisell-lowcode-anchor-wrapper {
|
|
27
|
+
padding: 0;
|
|
28
|
+
margin: 0;
|
|
29
|
+
}
|
|
30
|
+
.pisell-lowcode-anchor-wrapper-horizontal::before {
|
|
31
|
+
border: none !important;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&-products {
|
|
36
|
+
padding: 20px;
|
|
37
|
+
.pisell-list-01-products-title {
|
|
38
|
+
color: var(--Gray-900, #101828);
|
|
39
|
+
font-size: 16px;
|
|
40
|
+
font-weight: 600;
|
|
41
|
+
line-height: 24px;
|
|
42
|
+
margin-bottom: 16px;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.products-empty {
|
|
47
|
+
padding: 0;
|
|
48
|
+
.pisell-empty-icon-wrap,
|
|
49
|
+
.pisell-lowcode-empty-description {
|
|
50
|
+
color: var(--Gray-500, #667085);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface PisellSectionHeadersProps {
|
|
4
|
+
/** 是否占据空间(true: 占据空间, false: 不占据空间) */
|
|
5
|
+
/** 左侧返回区域 */
|
|
6
|
+
backNode?: React.ReactNode;
|
|
7
|
+
/** 中间内容区域 */
|
|
8
|
+
centerNode?: React.ReactNode;
|
|
9
|
+
/** 右侧操作区域 */
|
|
10
|
+
actionNode?: React.ReactNode;
|
|
11
|
+
/** 自定义类名 */
|
|
12
|
+
className?: string;
|
|
13
|
+
/** 自定义样式 */
|
|
14
|
+
style?: React.CSSProperties;
|
|
15
|
+
/** 返回按钮点击事件 */
|
|
16
|
+
onBack?: () => void;
|
|
17
|
+
/** 操作区域点击事件 */
|
|
18
|
+
onAction?: () => void;
|
|
19
|
+
}
|
|
20
|
+
declare const PisellSectionHeaders: React.FC<PisellSectionHeadersProps>;
|
|
21
|
+
export default PisellSectionHeaders;
|
|
@@ -0,0 +1,52 @@
|
|
|
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/pisellSectionHeaders/index.tsx
|
|
30
|
+
var pisellSectionHeaders_exports = {};
|
|
31
|
+
__export(pisellSectionHeaders_exports, {
|
|
32
|
+
default: () => pisellSectionHeaders_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(pisellSectionHeaders_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_classnames = __toESM(require("classnames"));
|
|
37
|
+
var import_index = require("./index.less");
|
|
38
|
+
var prefixCls = "pisell-section-headers";
|
|
39
|
+
var PisellSectionHeaders = ({
|
|
40
|
+
// takeSpace = true,
|
|
41
|
+
backNode,
|
|
42
|
+
centerNode,
|
|
43
|
+
actionNode,
|
|
44
|
+
className,
|
|
45
|
+
style,
|
|
46
|
+
onBack,
|
|
47
|
+
onAction
|
|
48
|
+
}) => {
|
|
49
|
+
const classes = (0, import_classnames.default)(prefixCls, className);
|
|
50
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: classes, style: { ...style } }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-content` }, backNode && /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-back`, onClick: onBack }, backNode), centerNode && /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-main` }, centerNode), actionNode && /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-actions`, onClick: onAction }, actionNode)));
|
|
51
|
+
};
|
|
52
|
+
var pisellSectionHeaders_default = PisellSectionHeaders;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
@prefix: pisell-section-headers;
|
|
2
|
+
|
|
3
|
+
.@{prefix} {
|
|
4
|
+
width: 100%;
|
|
5
|
+
z-index: 100;
|
|
6
|
+
position: sticky;
|
|
7
|
+
top: 0;
|
|
8
|
+
border-bottom: 1px solid var(--Gray-300, #d0d5dd);
|
|
9
|
+
box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
|
|
10
|
+
padding: 16px;
|
|
11
|
+
height: auto;
|
|
12
|
+
|
|
13
|
+
&-fixed {
|
|
14
|
+
position: fixed;
|
|
15
|
+
top: 0;
|
|
16
|
+
left: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&-placeholder {
|
|
20
|
+
width: 100%;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&-content {
|
|
24
|
+
height: 100%;
|
|
25
|
+
padding: 0;
|
|
26
|
+
display: flex;
|
|
27
|
+
// align-items: center;
|
|
28
|
+
justify-content: space-between;
|
|
29
|
+
gap: 10px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&-back {
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&-main {
|
|
37
|
+
flex: 1;
|
|
38
|
+
// display: flex;
|
|
39
|
+
// align-items: center;
|
|
40
|
+
// justify-content: center;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&-actions {
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -50,7 +50,8 @@ var Header = (props) => {
|
|
|
50
50
|
image,
|
|
51
51
|
name,
|
|
52
52
|
price,
|
|
53
|
-
symbol
|
|
53
|
+
symbol,
|
|
54
|
+
show_delete
|
|
54
55
|
} = item;
|
|
55
56
|
const showPrice = (0, import_react.useMemo)(() => {
|
|
56
57
|
return (bundle == null ? void 0 : bundle.length) > 0 || (options == null ? void 0 : options.length) > 0;
|
|
@@ -66,7 +67,7 @@ var Header = (props) => {
|
|
|
66
67
|
headerCenterStyle && `${prefix}product-options-header`
|
|
67
68
|
)
|
|
68
69
|
},
|
|
69
|
-
isShowDelete && !disabledEdit ? /* @__PURE__ */ import_react.default.createElement(
|
|
70
|
+
isShowDelete && !disabledEdit || show_delete ? /* @__PURE__ */ import_react.default.createElement(
|
|
70
71
|
"div",
|
|
71
72
|
{
|
|
72
73
|
className: `${prefix}product-delete`,
|
|
@@ -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")
|
|
@@ -48,10 +48,12 @@ var import_Action = __toESM(require("./components/Action"));
|
|
|
48
48
|
var import_useOpenNote = __toESM(require("./hooks/useOpenNote"));
|
|
49
49
|
var import_locales = __toESM(require("./locales"));
|
|
50
50
|
var import_status = require("./status");
|
|
51
|
+
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
|
51
52
|
var import_index = require("./index.less");
|
|
52
|
-
import_utils.locales.init(import_locales.default, localStorage.getItem("umi_locale") || "en");
|
|
53
53
|
var ProductCard = (props) => {
|
|
54
|
-
var _a;
|
|
54
|
+
var _a, _b;
|
|
55
|
+
const context = (0, import_useEngineContext.default)();
|
|
56
|
+
const utils = context.appHelper.utils || {};
|
|
55
57
|
const {
|
|
56
58
|
dataSource = import_status.defaultValue.dataSource,
|
|
57
59
|
isShowImage = import_status.defaultValue.isShowImage,
|
|
@@ -67,6 +69,8 @@ var ProductCard = (props) => {
|
|
|
67
69
|
...other
|
|
68
70
|
} = props;
|
|
69
71
|
const useOpenNoteRef = (0, import_react.useRef)();
|
|
72
|
+
const locale = ((_a = utils == null ? void 0 : utils.storage) == null ? void 0 : _a.get("umi_locale")) || localStorage.getItem("umi_locale");
|
|
73
|
+
import_utils.locales.init(import_locales.default, locale || "en");
|
|
70
74
|
console.log(dataSource, isShowImage, isShowNote, "dataSource");
|
|
71
75
|
const {
|
|
72
76
|
image,
|
|
@@ -89,7 +93,8 @@ var ProductCard = (props) => {
|
|
|
89
93
|
{
|
|
90
94
|
className: (0, import_classnames.default)("pisell-lowcode-product-card", {
|
|
91
95
|
["pisell-lowcode-product-card-image"]: !showImage,
|
|
92
|
-
["pisell-lowcode-normal-product-card"]: !showImage && isNormalProduct
|
|
96
|
+
["pisell-lowcode-normal-product-card"]: !showImage && isNormalProduct,
|
|
97
|
+
["pisell-lowcode-product-card-disabled"]: dataSource == null ? void 0 : dataSource.disabled
|
|
93
98
|
}),
|
|
94
99
|
key: _id
|
|
95
100
|
},
|
|
@@ -125,7 +130,7 @@ var ProductCard = (props) => {
|
|
|
125
130
|
),
|
|
126
131
|
/* @__PURE__ */ import_react.default.createElement(import_Packages.default, { item: dataSource, isShowPackageNote }),
|
|
127
132
|
/* @__PURE__ */ import_react.default.createElement(import_Sales.default, { item: dataSource, isShowNote }),
|
|
128
|
-
((
|
|
133
|
+
((_b = dataSource.items) == null ? void 0 : _b.length) ? /* @__PURE__ */ import_react.default.createElement(import_MultiDay.default, { dataSource, hideDivider }) : /* @__PURE__ */ import_react.default.createElement(
|
|
129
134
|
import_AmountFooter.default,
|
|
130
135
|
{
|
|
131
136
|
item: dataSource,
|
|
@@ -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,12 @@
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
.pisell-lowcode-product-card-disabled {
|
|
51
|
+
opacity: 0.4;
|
|
52
|
+
}
|
|
53
|
+
|
|
50
54
|
.pisell-lowcode-product-card-error {
|
|
51
55
|
border: none !important;
|
|
52
56
|
margin: 8px -16px -8px;
|
|
53
57
|
border-radius: 0 0 8px 8px;
|
|
54
|
-
}
|
|
58
|
+
}
|