@pisell/materials 1.0.506 → 1.0.508
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 +3 -3
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +13 -13
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +21 -21
- 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/dataSourceComponents/dataSourceForm/submitButton/index.js +10 -16
- package/es/components/dataSourceComponents/dataSourceTable/BaseTable.js +6 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useFormat.js +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +7 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +22 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +6 -0
- package/es/components/dataSourceComponents/fields/Upload/BaseUpload.js +129 -60
- package/es/components/dataSourceComponents/fields/Upload/index.less +1 -0
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Upload/utils.js +24 -0
- package/es/components/page/index.js +4 -2
- package/es/components/pisellAnchor/index.d.ts +1 -0
- package/es/components/pisellAnchor/index.js +10 -4
- package/es/components/pisellHeaderProgressBar/index.d.ts +27 -0
- package/es/components/pisellHeaderProgressBar/index.js +75 -0
- package/es/components/pisellHeaderProgressBar/index.less +19 -0
- package/es/components/pisellList01/index.d.ts +13 -0
- package/es/components/pisellList01/index.js +94 -0
- package/es/components/pisellList01/index.less +45 -0
- package/es/components/pisellSectionHeaders/index.js +3 -7
- package/es/components/pisellSectionHeaders/index.less +8 -10
- package/es/components/pisellViewGrid/index.js +5 -1
- package/es/components/select/index.js +3 -2
- package/es/index.d.ts +2 -1
- package/es/index.js +3 -2
- 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/dataSourceComponents/dataSourceForm/submitButton/index.js +4 -5
- package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.js +6 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +7 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +23 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +6 -0
- package/lib/components/dataSourceComponents/fields/Upload/BaseUpload.js +160 -78
- package/lib/components/dataSourceComponents/fields/Upload/index.less +1 -0
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Upload/utils.js +24 -2
- package/lib/components/page/index.js +2 -2
- package/lib/components/pisellAnchor/index.d.ts +1 -0
- package/lib/components/pisellAnchor/index.js +9 -7
- package/lib/components/pisellHeaderProgressBar/index.d.ts +27 -0
- package/lib/components/pisellHeaderProgressBar/index.js +86 -0
- package/lib/components/pisellHeaderProgressBar/index.less +19 -0
- package/lib/components/pisellList01/index.d.ts +13 -0
- package/lib/components/pisellList01/index.js +97 -0
- package/lib/components/pisellList01/index.less +45 -0
- package/lib/components/pisellSectionHeaders/index.js +2 -8
- package/lib/components/pisellSectionHeaders/index.less +8 -10
- package/lib/components/pisellViewGrid/index.js +5 -1
- package/lib/components/select/index.js +2 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +6 -3
- package/lowcode/data-source-table/meta.ts +281 -0
- package/lowcode/pisell-custom-checkbox-group/meta.ts +156 -154
- package/lowcode/pisell-header-progress-bar/meta.ts +116 -0
- package/lowcode/pisell-header-progress-bar/snippets.ts +24 -0
- package/lowcode/pisell-list01/meta.ts +74 -0
- package/lowcode/pisell-list01/snippets.ts +35 -0
- package/package.json +1 -1
- package/es/components/pisellProgressBar/index.d.ts +0 -14
- package/es/components/pisellProgressBar/index.js +0 -44
- package/es/components/pisellProgressBar/index.less +0 -48
- package/lib/components/pisellProgressBar/index.d.ts +0 -14
- package/lib/components/pisellProgressBar/index.js +0 -62
- package/lib/components/pisellProgressBar/index.less +0 -48
- package/lowcode/pisell-progress-bar/meta.ts +0 -115
- package/lowcode/pisell-progress-bar/snippets.ts +0 -15
|
@@ -0,0 +1,97 @@
|
|
|
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_input = __toESM(require("../input"));
|
|
40
|
+
var import_index = require("./index.less");
|
|
41
|
+
var PisellList01 = ({
|
|
42
|
+
showSearch,
|
|
43
|
+
showCategory,
|
|
44
|
+
dataSource,
|
|
45
|
+
renderItem,
|
|
46
|
+
className,
|
|
47
|
+
style,
|
|
48
|
+
onChange
|
|
49
|
+
}) => {
|
|
50
|
+
const [currentAnchor, setCurrentAnchor] = (0, import_react.useState)("");
|
|
51
|
+
const [products, setProducts] = (0, import_react.useState)([]);
|
|
52
|
+
(0, import_react.useEffect)(() => {
|
|
53
|
+
if (currentAnchor) {
|
|
54
|
+
const currentData = dataSource == null ? void 0 : dataSource.find(
|
|
55
|
+
(item) => item.href === currentAnchor
|
|
56
|
+
);
|
|
57
|
+
setProducts((currentData == null ? void 0 : currentData.children) ?? []);
|
|
58
|
+
}
|
|
59
|
+
}, [currentAnchor, dataSource]);
|
|
60
|
+
(0, import_react.useEffect)(() => {
|
|
61
|
+
var _a;
|
|
62
|
+
setCurrentAnchor(((_a = dataSource == null ? void 0 : dataSource[0]) == null ? void 0 : _a.href) ?? "");
|
|
63
|
+
}, [dataSource]);
|
|
64
|
+
const categoryTitle = (0, import_react.useMemo)(() => {
|
|
65
|
+
var _a;
|
|
66
|
+
return (_a = dataSource == null ? void 0 : dataSource.find((item) => item.href === currentAnchor)) == null ? void 0 : _a.title;
|
|
67
|
+
}, [currentAnchor, dataSource]);
|
|
68
|
+
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(
|
|
69
|
+
import_input.default,
|
|
70
|
+
{
|
|
71
|
+
placeholder: "Search",
|
|
72
|
+
prefix: /* @__PURE__ */ import_react.default.createElement(import_icons.SearchOutlined, { style: { color: "#667085" } }),
|
|
73
|
+
allowClear: true,
|
|
74
|
+
size: "large",
|
|
75
|
+
className: "pisell-list-01-search-input"
|
|
76
|
+
}
|
|
77
|
+
)) : null, showCategory ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-list-01-categories" }, /* @__PURE__ */ import_react.default.createElement(
|
|
78
|
+
import_pisellAnchor.default,
|
|
79
|
+
{
|
|
80
|
+
items: dataSource,
|
|
81
|
+
getCurrentAnchor: currentAnchor,
|
|
82
|
+
onChange: (e) => {
|
|
83
|
+
onChange == null ? void 0 : onChange(e);
|
|
84
|
+
setCurrentAnchor(e);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
)) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-list-01-products" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-list-01-products-title" }, categoryTitle), /* @__PURE__ */ import_react.default.createElement(
|
|
88
|
+
import_pisellViewGrid.default,
|
|
89
|
+
{
|
|
90
|
+
dataSource: products,
|
|
91
|
+
columns: 1,
|
|
92
|
+
verticalGap: 16,
|
|
93
|
+
renderItem
|
|
94
|
+
}
|
|
95
|
+
)));
|
|
96
|
+
};
|
|
97
|
+
var pisellList01_default = PisellList01;
|
|
@@ -0,0 +1,45 @@
|
|
|
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,13 +46,7 @@ var PisellSectionHeaders = ({
|
|
|
46
46
|
onBack,
|
|
47
47
|
onAction
|
|
48
48
|
}) => {
|
|
49
|
-
const classes = (0, import_classnames.default)(
|
|
50
|
-
|
|
51
|
-
// {
|
|
52
|
-
// [`${prefixCls}-float`]: !takeSpace,
|
|
53
|
-
// },
|
|
54
|
-
className
|
|
55
|
-
);
|
|
56
|
-
return /* @__PURE__ */ import_react.default.createElement("div", null, /* @__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))));
|
|
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)));
|
|
57
51
|
};
|
|
58
52
|
var pisellSectionHeaders_default = PisellSectionHeaders;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
@prefix: pisell-section-headers;
|
|
2
|
-
@height: 56px;
|
|
3
2
|
|
|
4
3
|
.@{prefix} {
|
|
5
4
|
width: 100%;
|
|
6
|
-
height: @height;
|
|
7
5
|
z-index: 100;
|
|
8
|
-
position:
|
|
6
|
+
position: sticky;
|
|
9
7
|
top: 0;
|
|
10
|
-
left: 0;
|
|
11
8
|
border-bottom: 1px solid var(--Gray-300, #d0d5dd);
|
|
12
9
|
box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
|
|
10
|
+
padding: 16px;
|
|
11
|
+
height: auto;
|
|
13
12
|
|
|
14
13
|
&-fixed {
|
|
15
14
|
position: fixed;
|
|
@@ -18,15 +17,14 @@
|
|
|
18
17
|
}
|
|
19
18
|
|
|
20
19
|
&-placeholder {
|
|
21
|
-
height: @height;
|
|
22
20
|
width: 100%;
|
|
23
21
|
}
|
|
24
22
|
|
|
25
23
|
&-content {
|
|
26
24
|
height: 100%;
|
|
27
|
-
padding:
|
|
25
|
+
padding: 0;
|
|
28
26
|
display: flex;
|
|
29
|
-
align-items: center;
|
|
27
|
+
// align-items: center;
|
|
30
28
|
justify-content: space-between;
|
|
31
29
|
gap: 10px;
|
|
32
30
|
}
|
|
@@ -37,9 +35,9 @@
|
|
|
37
35
|
|
|
38
36
|
&-main {
|
|
39
37
|
flex: 1;
|
|
40
|
-
display: flex;
|
|
41
|
-
align-items: center;
|
|
42
|
-
justify-content: center;
|
|
38
|
+
// display: flex;
|
|
39
|
+
// align-items: center;
|
|
40
|
+
// justify-content: center;
|
|
43
41
|
}
|
|
44
42
|
|
|
45
43
|
&-actions {
|
|
@@ -91,9 +91,13 @@ var PisellViewGrid = ({
|
|
|
91
91
|
"div",
|
|
92
92
|
{
|
|
93
93
|
className: "pisell-view-grid-content",
|
|
94
|
-
style: {
|
|
94
|
+
style: !singleRow ? {
|
|
95
95
|
gap: `${verticalGap}px ${horizontalGap}px`,
|
|
96
96
|
gridTemplateColumns: `repeat(${columns}, 1fr)`
|
|
97
|
+
} : {
|
|
98
|
+
display: "flex",
|
|
99
|
+
flexWrap: "nowrap",
|
|
100
|
+
overflowX: "auto"
|
|
97
101
|
}
|
|
98
102
|
},
|
|
99
103
|
dataSource.map((item, index) => /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -98,9 +98,10 @@ var SelectBase = (0, import_react.forwardRef)((props, ref) => {
|
|
|
98
98
|
return mode === "multiple" && isShowDropdown && selectAll;
|
|
99
99
|
}, [mode, selectAll, isShowDropdown]);
|
|
100
100
|
const checkboxChecked = (0, import_react.useMemo)(() => {
|
|
101
|
+
var _a, _b, _c;
|
|
101
102
|
if (mode !== "multiple")
|
|
102
103
|
return false;
|
|
103
|
-
return (state == null ? void 0 : state.length) === (filteredOptions == null ? void 0 : filteredOptions.length) && state.sort().join("") === filteredOptions.map((item) => item.value).sort().join("");
|
|
104
|
+
return (state == null ? void 0 : state.length) === (filteredOptions == null ? void 0 : filteredOptions.length) && ((_a = state == null ? void 0 : state.sort()) == null ? void 0 : _a.join("")) === ((_c = (_b = filteredOptions == null ? void 0 : filteredOptions.map((item) => item.value)) == null ? void 0 : _b.sort()) == null ? void 0 : _c.join(""));
|
|
104
105
|
}, [state, filteredOptions]);
|
|
105
106
|
const dropdownRender = (0, import_react.useCallback)(
|
|
106
107
|
propsDropdownRender ? propsDropdownRender : (originNode) => {
|
package/lib/index.d.ts
CHANGED
|
@@ -147,5 +147,6 @@ export { default as PisellViewGrid } from './components/pisellViewGrid';
|
|
|
147
147
|
export { default as PisellCustomCheckboxGroup } from './components/pisellCustomCheckboxGroup';
|
|
148
148
|
export { default as PisellDropdown } from './components/pisellDropdown';
|
|
149
149
|
export { default as PisellSectionHeaders } from './components/pisellSectionHeaders';
|
|
150
|
-
export { default as PisellProgressBar } from './components/pisellProgressBar';
|
|
151
150
|
export { default as PisellImageCarousels } from './components/pisellImageCarousels';
|
|
151
|
+
export { default as PisellHeaderProgressBar } from './components/pisellHeaderProgressBar';
|
|
152
|
+
export { default as PisellList01 } from './components/pisellList01';
|
package/lib/index.js
CHANGED
|
@@ -115,14 +115,15 @@ __export(src_exports, {
|
|
|
115
115
|
PisellDropdown: () => import_pisellDropdown.default,
|
|
116
116
|
PisellEmpty: () => import_pisellEmpty.default,
|
|
117
117
|
PisellFloatingPanel: () => import_pisellFloatingPanel.default,
|
|
118
|
+
PisellHeaderProgressBar: () => import_pisellHeaderProgressBar.default,
|
|
118
119
|
PisellImageCarousels: () => import_pisellImageCarousels.default,
|
|
119
120
|
PisellInformationEntry: () => import_pisellInformationEntry.default,
|
|
120
121
|
PisellInput: () => import_pisellInput.default,
|
|
122
|
+
PisellList01: () => import_pisellList01.default,
|
|
121
123
|
PisellLoading: () => import_pisellLoading.default,
|
|
122
124
|
PisellModal: () => import_pisellModal.default,
|
|
123
125
|
PisellNumberKeyboard: () => import_Number.default,
|
|
124
126
|
PisellPriceKeyboard: () => import_Amount.default,
|
|
125
|
-
PisellProgressBar: () => import_pisellProgressBar.default,
|
|
126
127
|
PisellQrcode: () => import_pisellQrcode.default,
|
|
127
128
|
PisellRow: () => import_pisellRow.default,
|
|
128
129
|
PisellScan: () => import_pisellScan.default,
|
|
@@ -332,8 +333,9 @@ var import_pisellViewGrid = __toESM(require("./components/pisellViewGrid"));
|
|
|
332
333
|
var import_pisellCustomCheckboxGroup = __toESM(require("./components/pisellCustomCheckboxGroup"));
|
|
333
334
|
var import_pisellDropdown = __toESM(require("./components/pisellDropdown"));
|
|
334
335
|
var import_pisellSectionHeaders = __toESM(require("./components/pisellSectionHeaders"));
|
|
335
|
-
var import_pisellProgressBar = __toESM(require("./components/pisellProgressBar"));
|
|
336
336
|
var import_pisellImageCarousels = __toESM(require("./components/pisellImageCarousels"));
|
|
337
|
+
var import_pisellHeaderProgressBar = __toESM(require("./components/pisellHeaderProgressBar"));
|
|
338
|
+
var import_pisellList01 = __toESM(require("./components/pisellList01"));
|
|
337
339
|
// Annotate the CommonJS export names for ESM import in node:
|
|
338
340
|
0 && (module.exports = {
|
|
339
341
|
Affix,
|
|
@@ -422,14 +424,15 @@ var import_pisellImageCarousels = __toESM(require("./components/pisellImageCarou
|
|
|
422
424
|
PisellDropdown,
|
|
423
425
|
PisellEmpty,
|
|
424
426
|
PisellFloatingPanel,
|
|
427
|
+
PisellHeaderProgressBar,
|
|
425
428
|
PisellImageCarousels,
|
|
426
429
|
PisellInformationEntry,
|
|
427
430
|
PisellInput,
|
|
431
|
+
PisellList01,
|
|
428
432
|
PisellLoading,
|
|
429
433
|
PisellModal,
|
|
430
434
|
PisellNumberKeyboard,
|
|
431
435
|
PisellPriceKeyboard,
|
|
432
|
-
PisellProgressBar,
|
|
433
436
|
PisellQrcode,
|
|
434
437
|
PisellRow,
|
|
435
438
|
PisellScan,
|
|
@@ -853,6 +853,287 @@ const dataSourceTable = {
|
|
|
853
853
|
},
|
|
854
854
|
],
|
|
855
855
|
},
|
|
856
|
+
{
|
|
857
|
+
title: "表格按钮",
|
|
858
|
+
display: 'entry',
|
|
859
|
+
type: 'group',
|
|
860
|
+
name: '_tableButtons',
|
|
861
|
+
items: [
|
|
862
|
+
{
|
|
863
|
+
name: 'tableButtons.show',
|
|
864
|
+
title: {
|
|
865
|
+
label: {
|
|
866
|
+
type: 'i18n',
|
|
867
|
+
'en-US': 'Show Table Buttons',
|
|
868
|
+
'zh-CN': '开启表格按钮组',
|
|
869
|
+
},
|
|
870
|
+
tip: {
|
|
871
|
+
type: 'i18n',
|
|
872
|
+
'en-US': 'tableButtons.show | Whether to display the table button group',
|
|
873
|
+
'zh-CN': 'tableButtons.show | 是否显示表格按钮组',
|
|
874
|
+
},
|
|
875
|
+
},
|
|
876
|
+
propType: 'bool',
|
|
877
|
+
setter: 'BoolSetter',
|
|
878
|
+
defaultValue: false,
|
|
879
|
+
},
|
|
880
|
+
{
|
|
881
|
+
name: 'tableButtons.items',
|
|
882
|
+
title: {
|
|
883
|
+
label: {
|
|
884
|
+
type: 'i18n',
|
|
885
|
+
'en-US': 'Table Buttons',
|
|
886
|
+
'zh-CN': '表格按钮组',
|
|
887
|
+
},
|
|
888
|
+
tip: {
|
|
889
|
+
type: 'i18n',
|
|
890
|
+
'en-US': 'tableButtons.items | Table buttons on the right',
|
|
891
|
+
'zh-CN': 'tableButtons.items | 表格右侧按钮项',
|
|
892
|
+
},
|
|
893
|
+
},
|
|
894
|
+
condition: {
|
|
895
|
+
type: 'JSFunction',
|
|
896
|
+
value:
|
|
897
|
+
'target => !!target.getProps().getPropValue("tableButtons.show")',
|
|
898
|
+
},
|
|
899
|
+
setter: {
|
|
900
|
+
componentName: 'ArraySetter',
|
|
901
|
+
props: {
|
|
902
|
+
itemSetter: {
|
|
903
|
+
componentName: 'ObjectSetter',
|
|
904
|
+
props: {
|
|
905
|
+
config: {
|
|
906
|
+
items: [
|
|
907
|
+
{
|
|
908
|
+
name: 'label',
|
|
909
|
+
title: {
|
|
910
|
+
label: {
|
|
911
|
+
type: 'i18n',
|
|
912
|
+
'en-US': 'Button Text',
|
|
913
|
+
'zh-CN': '按钮文案',
|
|
914
|
+
},
|
|
915
|
+
tip: {
|
|
916
|
+
type: 'i18n',
|
|
917
|
+
'en-US': 'buttonText | Button text',
|
|
918
|
+
'zh-CN': 'buttonText | 按钮文案',
|
|
919
|
+
},
|
|
920
|
+
},
|
|
921
|
+
propType: 'string',
|
|
922
|
+
setter: 'PisellI18nSetter',
|
|
923
|
+
isRequired: true,
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
name: 'openMode',
|
|
927
|
+
condition: (target: any) => {
|
|
928
|
+
const actionType =
|
|
929
|
+
target.parent.getPropValue('actionType');
|
|
930
|
+
return actionType === 'add';
|
|
931
|
+
},
|
|
932
|
+
title: {
|
|
933
|
+
label: {
|
|
934
|
+
type: 'i18n',
|
|
935
|
+
'en-US': 'Open Mode',
|
|
936
|
+
'zh-CN': '打开方式',
|
|
937
|
+
},
|
|
938
|
+
tip: {
|
|
939
|
+
type: 'i18n',
|
|
940
|
+
'en-US': 'openMode | Open mode',
|
|
941
|
+
'zh-CN': 'openMode | 打开方式',
|
|
942
|
+
},
|
|
943
|
+
},
|
|
944
|
+
propType: {
|
|
945
|
+
type: 'oneOf',
|
|
946
|
+
value: ['modal', 'drawer'],
|
|
947
|
+
},
|
|
948
|
+
setter: {
|
|
949
|
+
componentName: 'RadioGroupSetter',
|
|
950
|
+
props: {
|
|
951
|
+
options: [
|
|
952
|
+
{
|
|
953
|
+
title: '对话框',
|
|
954
|
+
value: 'modal',
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
title: '抽屉',
|
|
958
|
+
value: 'drawer',
|
|
959
|
+
},
|
|
960
|
+
],
|
|
961
|
+
},
|
|
962
|
+
},
|
|
963
|
+
defaultValue: 'drawer',
|
|
964
|
+
},
|
|
965
|
+
{
|
|
966
|
+
name: 'openContentSize',
|
|
967
|
+
condition: (target: any) => {
|
|
968
|
+
const actionType =
|
|
969
|
+
target.parent.getPropValue('actionType');
|
|
970
|
+
return actionType === 'add';
|
|
971
|
+
},
|
|
972
|
+
title: {
|
|
973
|
+
label: {
|
|
974
|
+
type: 'i18n',
|
|
975
|
+
'en-US': 'Dialog Size',
|
|
976
|
+
'zh-CN': '弹窗尺寸',
|
|
977
|
+
},
|
|
978
|
+
tip: {
|
|
979
|
+
type: 'i18n',
|
|
980
|
+
'en-US': 'dialogSize | Dialog size',
|
|
981
|
+
'zh-CN': 'dialogSize | 弹窗尺寸',
|
|
982
|
+
},
|
|
983
|
+
},
|
|
984
|
+
propType: {
|
|
985
|
+
type: 'oneOf',
|
|
986
|
+
value: ['small', 'middle', 'large'],
|
|
987
|
+
},
|
|
988
|
+
setter: {
|
|
989
|
+
componentName: 'RadioGroupSetter',
|
|
990
|
+
props: {
|
|
991
|
+
options: [
|
|
992
|
+
{
|
|
993
|
+
title: '较窄',
|
|
994
|
+
value: 'small',
|
|
995
|
+
},
|
|
996
|
+
{
|
|
997
|
+
title: '中等',
|
|
998
|
+
value: 'middle',
|
|
999
|
+
},
|
|
1000
|
+
{
|
|
1001
|
+
title: '较宽',
|
|
1002
|
+
value: 'large',
|
|
1003
|
+
},
|
|
1004
|
+
],
|
|
1005
|
+
},
|
|
1006
|
+
},
|
|
1007
|
+
defaultValue: 'middle',
|
|
1008
|
+
},
|
|
1009
|
+
{
|
|
1010
|
+
name: 'openTitle',
|
|
1011
|
+
title: {
|
|
1012
|
+
label: {
|
|
1013
|
+
type: 'i18n',
|
|
1014
|
+
'en-US': 'Dialog Title',
|
|
1015
|
+
'zh-CN': '弹窗标题',
|
|
1016
|
+
},
|
|
1017
|
+
tip: {
|
|
1018
|
+
type: 'i18n',
|
|
1019
|
+
'en-US': 'dialogTitle | Dialog title',
|
|
1020
|
+
'zh-CN': 'dialogTitle | 弹窗标题',
|
|
1021
|
+
},
|
|
1022
|
+
},
|
|
1023
|
+
propType: 'string',
|
|
1024
|
+
setter: 'PisellI18nSetter',
|
|
1025
|
+
isRequired: true,
|
|
1026
|
+
condition: (target: any) => {
|
|
1027
|
+
const actionType =
|
|
1028
|
+
target.parent.getPropValue('actionType');
|
|
1029
|
+
return actionType === 'add';
|
|
1030
|
+
},
|
|
1031
|
+
},
|
|
1032
|
+
{
|
|
1033
|
+
name: 'actionType',
|
|
1034
|
+
title: {
|
|
1035
|
+
label: {
|
|
1036
|
+
type: 'i18n',
|
|
1037
|
+
'en-US': 'Action Type',
|
|
1038
|
+
'zh-CN': '操作类型',
|
|
1039
|
+
},
|
|
1040
|
+
tip: {
|
|
1041
|
+
type: 'i18n',
|
|
1042
|
+
'en-US': 'actionType | Action type',
|
|
1043
|
+
'zh-CN': 'actionType | 操作类型',
|
|
1044
|
+
},
|
|
1045
|
+
},
|
|
1046
|
+
propType: {
|
|
1047
|
+
type: 'oneOf',
|
|
1048
|
+
value: ['add', 'custom'],
|
|
1049
|
+
},
|
|
1050
|
+
extraProps: {
|
|
1051
|
+
setValue(target: any, value: any) {
|
|
1052
|
+
const key = target.parent.getPropValue('key');
|
|
1053
|
+
if (['add', 'custom'].includes(value)) {
|
|
1054
|
+
let content: any = getJsSlot();
|
|
1055
|
+
if (value !== 'custom') {
|
|
1056
|
+
content = getFormContent(target, value);
|
|
1057
|
+
}
|
|
1058
|
+
target.node.setPropValue('operationContent', {
|
|
1059
|
+
...(target.node.getPropValue(
|
|
1060
|
+
'operationContent'
|
|
1061
|
+
) || {}),
|
|
1062
|
+
[key]: content,
|
|
1063
|
+
});
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
return target.parent.setPropValue(
|
|
1067
|
+
'actionType',
|
|
1068
|
+
value
|
|
1069
|
+
);
|
|
1070
|
+
},
|
|
1071
|
+
},
|
|
1072
|
+
setter: {
|
|
1073
|
+
componentName: 'RadioGroupSetter',
|
|
1074
|
+
props: {
|
|
1075
|
+
options: [
|
|
1076
|
+
{
|
|
1077
|
+
title: '添加',
|
|
1078
|
+
value: 'add',
|
|
1079
|
+
},
|
|
1080
|
+
{
|
|
1081
|
+
title: '自定义',
|
|
1082
|
+
value: 'custom',
|
|
1083
|
+
},
|
|
1084
|
+
],
|
|
1085
|
+
},
|
|
1086
|
+
},
|
|
1087
|
+
},
|
|
1088
|
+
{
|
|
1089
|
+
name: 'buttonProps',
|
|
1090
|
+
title: {
|
|
1091
|
+
label: {
|
|
1092
|
+
type: 'i18n',
|
|
1093
|
+
'en-US': 'Button Style',
|
|
1094
|
+
'zh-CN': '按钮样式',
|
|
1095
|
+
},
|
|
1096
|
+
},
|
|
1097
|
+
propType: 'object',
|
|
1098
|
+
setter: 'JsonSetter',
|
|
1099
|
+
},
|
|
1100
|
+
],
|
|
1101
|
+
},
|
|
1102
|
+
},
|
|
1103
|
+
initialValue: () => {
|
|
1104
|
+
return {
|
|
1105
|
+
key: uuid(),
|
|
1106
|
+
title: '操作',
|
|
1107
|
+
};
|
|
1108
|
+
},
|
|
1109
|
+
},
|
|
1110
|
+
},
|
|
1111
|
+
},
|
|
1112
|
+
},
|
|
1113
|
+
{
|
|
1114
|
+
name: 'tableButtons.maxCount',
|
|
1115
|
+
title: {
|
|
1116
|
+
label: {
|
|
1117
|
+
type: 'i18n',
|
|
1118
|
+
'en-US': 'Max Count',
|
|
1119
|
+
'zh-CN': '最大展示数量',
|
|
1120
|
+
},
|
|
1121
|
+
tip: {
|
|
1122
|
+
type: 'i18n',
|
|
1123
|
+
'en-US': 'maxCount | Maximum display count',
|
|
1124
|
+
'zh-CN': 'maxCount | 最大展示数量',
|
|
1125
|
+
},
|
|
1126
|
+
},
|
|
1127
|
+
propType: 'number',
|
|
1128
|
+
condition: {
|
|
1129
|
+
type: 'JSFunction',
|
|
1130
|
+
value:
|
|
1131
|
+
'target => !!target.getProps().getPropValue("tableButtons.show")',
|
|
1132
|
+
},
|
|
1133
|
+
setter: 'NumberSetter',
|
|
1134
|
+
}
|
|
1135
|
+
],
|
|
1136
|
+
},
|
|
856
1137
|
{
|
|
857
1138
|
title: "标签页",
|
|
858
1139
|
display: 'entry',
|