@pisell/materials 1.0.597 → 1.0.598
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +7 -7
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +34 -20
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +34 -20
- package/es/components/appVersionControl/index.d.ts +5 -0
- package/es/components/appVersionControl/index.js +221 -0
- package/es/components/appVersionControl/index.less +34 -0
- package/es/components/appVersionControl/types.d.ts +20 -0
- package/es/components/appVersionControl/types.js +1 -0
- package/es/components/customSelect/index.d.ts +17 -0
- package/es/components/customSelect/index.js +26 -0
- package/es/components/customSelect/index.less +7 -0
- package/es/components/pisellLayout/content.d.ts +7 -0
- package/es/components/pisellLayout/content.js +12 -0
- package/es/components/pisellLayout/footer.d.ts +7 -0
- package/es/components/pisellLayout/footer.js +12 -0
- package/es/components/pisellLayout/header.d.ts +7 -0
- package/es/components/pisellLayout/header.js +12 -0
- package/es/components/pisellLayout/index.d.ts +14 -0
- package/es/components/pisellLayout/index.js +15 -0
- package/es/components/pisellLayout/sider.d.ts +7 -0
- package/es/components/pisellLayout/sider.js +12 -0
- package/es/components/versionModal/index.d.ts +1 -0
- package/es/components/versionModal/index.js +5 -2
- package/es/index.d.ts +106 -136
- package/es/index.js +108 -167
- package/es/locales/en-US.d.ts +9 -1
- package/es/locales/en-US.js +15 -2
- package/es/locales/zh-CN.d.ts +9 -1
- package/es/locales/zh-CN.js +14 -2
- package/es/locales/zh-TW.d.ts +9 -0
- package/es/locales/zh-TW.js +15 -1
- package/lib/components/appVersionControl/index.d.ts +5 -0
- package/lib/components/appVersionControl/index.js +208 -0
- package/lib/components/appVersionControl/index.less +34 -0
- package/lib/components/appVersionControl/types.d.ts +20 -0
- package/lib/components/appVersionControl/types.js +17 -0
- package/lib/components/customSelect/index.d.ts +17 -0
- package/lib/components/customSelect/index.js +58 -0
- package/lib/components/customSelect/index.less +7 -0
- package/lib/components/pisellLayout/content.d.ts +7 -0
- package/lib/components/pisellLayout/content.js +42 -0
- package/lib/components/pisellLayout/footer.d.ts +7 -0
- package/lib/components/pisellLayout/footer.js +42 -0
- package/lib/components/pisellLayout/header.d.ts +7 -0
- package/lib/components/pisellLayout/header.js +42 -0
- package/lib/components/pisellLayout/index.d.ts +14 -0
- package/lib/components/pisellLayout/index.js +45 -0
- package/lib/components/pisellLayout/sider.d.ts +7 -0
- package/lib/components/pisellLayout/sider.js +42 -0
- package/lib/components/versionModal/index.d.ts +1 -0
- package/lib/components/versionModal/index.js +4 -2
- package/lib/index.d.ts +106 -136
- package/lib/index.js +156 -174
- package/lib/locales/en-US.d.ts +9 -1
- package/lib/locales/en-US.js +13 -2
- package/lib/locales/zh-CN.d.ts +9 -1
- package/lib/locales/zh-CN.js +12 -2
- package/lib/locales/zh-TW.d.ts +9 -0
- package/lib/locales/zh-TW.js +13 -1
- package/lowcode/app-version-control/meta.ts +76 -0
- package/lowcode/custom-select/meta.ts +206 -0
- package/lowcode/custom-select/snippets.ts +33 -0
- package/lowcode/form-item-icon-select/snippets.ts +1 -0
- package/lowcode/icon-select/meta.ts +1 -1
- package/lowcode/pisell-content/meta.ts +83 -0
- package/lowcode/pisell-footer/meta.ts +81 -0
- package/lowcode/pisell-header/meta.ts +83 -0
- package/lowcode/pisell-layout/meta.ts +174 -0
- package/lowcode/pisell-sider/meta.ts +142 -0
- package/lowcode/pisell-text/meta.ts +9 -8080
- package/package.json +1 -1
package/es/locales/zh-CN.d.ts
CHANGED
|
@@ -189,7 +189,6 @@ declare const _default: {
|
|
|
189
189
|
'pisell-version-modal-describe-update-notes': string;
|
|
190
190
|
'pisell-version-modal-version-error': string;
|
|
191
191
|
'pisell-version-modal-version-required': string;
|
|
192
|
-
'pisell-icon-select-placeholder': string;
|
|
193
192
|
'pisell-icon-select-outlined': string;
|
|
194
193
|
'pisell-icon-select-filled': string;
|
|
195
194
|
'pisell-icon-select-two-tone': string;
|
|
@@ -202,5 +201,14 @@ declare const _default: {
|
|
|
202
201
|
'subdomain-error-numbers-only': string;
|
|
203
202
|
'subdomain-error-hyphen-ends': string;
|
|
204
203
|
'subdomain-error-consecutive-hyphens': string;
|
|
204
|
+
'pisell-lowcode-app-version-control-live': string;
|
|
205
|
+
'pisell-lowcode-app-version-control-draft': string;
|
|
206
|
+
'pisell-lowcode-app-version-control-deprecated': string;
|
|
207
|
+
'pisell-lowcode-app-version-control-new-version': string;
|
|
208
|
+
'pisell-lowcode-app-version-control-promote-to-live': string;
|
|
209
|
+
'pisell-lowcode-app-version-control-promote-version': (version: string) => string;
|
|
210
|
+
'pisell-lowcode-app-version-control-promote-version-describe': string;
|
|
211
|
+
'pisell-lowcode-app-version-control-promote-version-ok': string;
|
|
212
|
+
'pisell-lowcode-app-version-control-promote-version-cancel': string;
|
|
205
213
|
};
|
|
206
214
|
export default _default;
|
package/es/locales/zh-CN.js
CHANGED
|
@@ -226,6 +226,7 @@ export default {
|
|
|
226
226
|
'pisell-delete-confirm-cancel': '取消',
|
|
227
227
|
'pisell-design-mode-action-disabled': '编辑模式下不可执行此操作',
|
|
228
228
|
'pisell-translation-original': '原始语言',
|
|
229
|
+
// 版本升级组件
|
|
229
230
|
'pisell-version-modal-title': '创建新版本',
|
|
230
231
|
'pisell-version-modal-current-version': '当前版本',
|
|
231
232
|
'pisell-version-modal-version': '版本号',
|
|
@@ -239,7 +240,6 @@ export default {
|
|
|
239
240
|
'pisell-version-modal-describe-update-notes': '描述此版本的主要更改...',
|
|
240
241
|
'pisell-version-modal-version-error': '版本号必须大于当前版本',
|
|
241
242
|
'pisell-version-modal-version-required': '版本号为必填项',
|
|
242
|
-
'pisell-icon-select-placeholder': '请选择图标',
|
|
243
243
|
'pisell-icon-select-outlined': '线框风格',
|
|
244
244
|
'pisell-icon-select-filled': '实底风格',
|
|
245
245
|
'pisell-icon-select-two-tone': '双色风格',
|
|
@@ -252,5 +252,17 @@ export default {
|
|
|
252
252
|
'subdomain-error-pattern': '子域名只能包含小写字母、数字和连字符',
|
|
253
253
|
'subdomain-error-numbers-only': '子域名不能全为数字',
|
|
254
254
|
'subdomain-error-hyphen-ends': '子域名不能以连字符开头或结尾',
|
|
255
|
-
'subdomain-error-consecutive-hyphens': '子域名不能包含连续的连字符'
|
|
255
|
+
'subdomain-error-consecutive-hyphens': '子域名不能包含连续的连字符',
|
|
256
|
+
// 应用版本控制组件
|
|
257
|
+
'pisell-lowcode-app-version-control-live': '正式版',
|
|
258
|
+
'pisell-lowcode-app-version-control-draft': '草稿',
|
|
259
|
+
'pisell-lowcode-app-version-control-deprecated': '已废弃',
|
|
260
|
+
'pisell-lowcode-app-version-control-new-version': '新版本',
|
|
261
|
+
'pisell-lowcode-app-version-control-promote-to-live': '发布正式版',
|
|
262
|
+
'pisell-lowcode-app-version-control-promote-version': function pisellLowcodeAppVersionControlPromoteVersion(version) {
|
|
263
|
+
return "\u53D1\u5E03\u7248\u672C ".concat(version || "", "?");
|
|
264
|
+
},
|
|
265
|
+
'pisell-lowcode-app-version-control-promote-version-describe': '发布版本后,该版本将无法再进行修改',
|
|
266
|
+
'pisell-lowcode-app-version-control-promote-version-ok': '发布',
|
|
267
|
+
'pisell-lowcode-app-version-control-promote-version-cancel': '取消'
|
|
256
268
|
};
|
package/es/locales/zh-TW.d.ts
CHANGED
|
@@ -201,5 +201,14 @@ declare const _default: {
|
|
|
201
201
|
'subdomain-error-numbers-only': string;
|
|
202
202
|
'subdomain-error-hyphen-ends': string;
|
|
203
203
|
'subdomain-error-consecutive-hyphens': string;
|
|
204
|
+
'pisell-lowcode-app-version-control-live': string;
|
|
205
|
+
'pisell-lowcode-app-version-control-draft': string;
|
|
206
|
+
'pisell-lowcode-app-version-control-deprecated': string;
|
|
207
|
+
'pisell-lowcode-app-version-control-new-version': string;
|
|
208
|
+
'pisell-lowcode-app-version-control-promote-to-live': string;
|
|
209
|
+
'pisell-lowcode-app-version-control-promote-version': (version: string) => string;
|
|
210
|
+
'pisell-lowcode-app-version-control-promote-version-describe': string;
|
|
211
|
+
'pisell-lowcode-app-version-control-promote-version-ok': string;
|
|
212
|
+
'pisell-lowcode-app-version-control-promote-version-cancel': string;
|
|
204
213
|
};
|
|
205
214
|
export default _default;
|
package/es/locales/zh-TW.js
CHANGED
|
@@ -226,6 +226,7 @@ export default {
|
|
|
226
226
|
'pisell-delete-confirm-cancel': '取消',
|
|
227
227
|
'pisell-design-mode-action-disabled': '編輯模式下不可執行此操作',
|
|
228
228
|
'pisell-translation-original': '原始語言',
|
|
229
|
+
// 版本升级组件
|
|
229
230
|
'pisell-version-modal-title': '創建新版本',
|
|
230
231
|
'pisell-version-modal-current-version': '當前版本',
|
|
231
232
|
'pisell-version-modal-version': '版本號',
|
|
@@ -239,6 +240,7 @@ export default {
|
|
|
239
240
|
'pisell-version-modal-describe-update-notes': '描述此版本的主要更改...',
|
|
240
241
|
'pisell-version-modal-version-error': '版本號必須大於當前版本',
|
|
241
242
|
'pisell-version-modal-version-required': '版本號為必填項',
|
|
243
|
+
// 图标选择组件
|
|
242
244
|
'pisell-icon-select-placeholder': '選擇圖標',
|
|
243
245
|
'pisell-icon-select-outlined': '線框風格',
|
|
244
246
|
'pisell-icon-select-filled': '實底風格',
|
|
@@ -252,5 +254,17 @@ export default {
|
|
|
252
254
|
'subdomain-error-pattern': '子域名只能包含小寫字母、數字和連字符',
|
|
253
255
|
'subdomain-error-numbers-only': '子域名不能全為數字',
|
|
254
256
|
'subdomain-error-hyphen-ends': '子域名不能以連字符開頭或結尾',
|
|
255
|
-
'subdomain-error-consecutive-hyphens': '子域名不能包含連續的連字符'
|
|
257
|
+
'subdomain-error-consecutive-hyphens': '子域名不能包含連續的連字符',
|
|
258
|
+
// 应用版本控制组件
|
|
259
|
+
'pisell-lowcode-app-version-control-live': '正式版',
|
|
260
|
+
'pisell-lowcode-app-version-control-draft': '草稿',
|
|
261
|
+
'pisell-lowcode-app-version-control-deprecated': '已廢棄',
|
|
262
|
+
'pisell-lowcode-app-version-control-new-version': '新版本',
|
|
263
|
+
'pisell-lowcode-app-version-control-promote-to-live': '發布正式版',
|
|
264
|
+
'pisell-lowcode-app-version-control-promote-version': function pisellLowcodeAppVersionControlPromoteVersion(version) {
|
|
265
|
+
return "\u767C\u5E03\u7248\u672C ".concat(version || "", "?");
|
|
266
|
+
},
|
|
267
|
+
'pisell-lowcode-app-version-control-promote-version-describe': '發布版本後,該版本將無法再進行修改',
|
|
268
|
+
'pisell-lowcode-app-version-control-promote-version-ok': '發布',
|
|
269
|
+
'pisell-lowcode-app-version-control-promote-version-cancel': '取消'
|
|
256
270
|
};
|
|
@@ -0,0 +1,208 @@
|
|
|
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/appVersionControl/index.tsx
|
|
30
|
+
var appVersionControl_exports = {};
|
|
31
|
+
__export(appVersionControl_exports, {
|
|
32
|
+
default: () => appVersionControl_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(appVersionControl_exports);
|
|
35
|
+
var import_classnames = __toESM(require("classnames"));
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_button = __toESM(require("../button"));
|
|
38
|
+
var import_customSelect = __toESM(require("../customSelect"));
|
|
39
|
+
var import_pisellCard = __toESM(require("../pisellCard"));
|
|
40
|
+
var import_pisellModal = __toESM(require("../pisellModal"));
|
|
41
|
+
var import_pisellAvatar = __toESM(require("../pisellAvatar"));
|
|
42
|
+
var import_icon = __toESM(require("../icon"));
|
|
43
|
+
var import_pisellRow = __toESM(require("../pisellRow"));
|
|
44
|
+
var import_pisellTags = __toESM(require("../pisellTags"));
|
|
45
|
+
var import_versionModal = __toESM(require("../versionModal"));
|
|
46
|
+
var import_locales = require("../../locales");
|
|
47
|
+
var import_index = require("./index.less");
|
|
48
|
+
var getStatusColor = (status) => {
|
|
49
|
+
if (status === "live")
|
|
50
|
+
return "success";
|
|
51
|
+
if (status === "draft")
|
|
52
|
+
return "warning";
|
|
53
|
+
if (status === "deprecated")
|
|
54
|
+
return "error";
|
|
55
|
+
return "gray";
|
|
56
|
+
};
|
|
57
|
+
var getStatusText = (status) => {
|
|
58
|
+
if (status === "live")
|
|
59
|
+
return (0, import_locales.getText)("pisell-lowcode-app-version-control-live");
|
|
60
|
+
if (status === "draft")
|
|
61
|
+
return (0, import_locales.getText)("pisell-lowcode-app-version-control-draft");
|
|
62
|
+
if (status === "deprecated")
|
|
63
|
+
return (0, import_locales.getText)("pisell-lowcode-app-version-control-deprecated");
|
|
64
|
+
};
|
|
65
|
+
var AppVersionControl = (props) => {
|
|
66
|
+
const {
|
|
67
|
+
value,
|
|
68
|
+
versions = [],
|
|
69
|
+
onVersionChange,
|
|
70
|
+
onCreateVersion,
|
|
71
|
+
onPromoteToLive,
|
|
72
|
+
className,
|
|
73
|
+
style,
|
|
74
|
+
allowPublish = true,
|
|
75
|
+
allowCreate = true
|
|
76
|
+
} = props;
|
|
77
|
+
const [promoteLoading, setPromoteLoading] = (0, import_react.useState)(false);
|
|
78
|
+
const [promoteToLiveModal, setPromoteToLiveModal] = (0, import_react.useState)(false);
|
|
79
|
+
const [publishVersionModal, setPublishVersionModal] = (0, import_react.useState)(false);
|
|
80
|
+
const [publishLoading, setPublishLoading] = (0, import_react.useState)(false);
|
|
81
|
+
const currentVersion = (0, import_react.useMemo)(() => {
|
|
82
|
+
return versions.find((v) => v.value === value);
|
|
83
|
+
}, [value, versions]);
|
|
84
|
+
const liveVersion = (0, import_react.useMemo)(() => {
|
|
85
|
+
var _a;
|
|
86
|
+
return (_a = versions.find((v) => v.status === "live")) == null ? void 0 : _a.version;
|
|
87
|
+
}, [versions]);
|
|
88
|
+
const handlePromoteToLive = async () => {
|
|
89
|
+
setPromoteLoading(true);
|
|
90
|
+
try {
|
|
91
|
+
await (onPromoteToLive == null ? void 0 : onPromoteToLive(value));
|
|
92
|
+
setPromoteToLiveModal(false);
|
|
93
|
+
} catch (error) {
|
|
94
|
+
console.error("Failed to promote version:", error);
|
|
95
|
+
} finally {
|
|
96
|
+
setPromoteLoading(false);
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
const handlePublishVersion = async (data) => {
|
|
100
|
+
setPublishLoading(true);
|
|
101
|
+
try {
|
|
102
|
+
await (onCreateVersion == null ? void 0 : onCreateVersion(data.version));
|
|
103
|
+
setPublishVersionModal(false);
|
|
104
|
+
} catch (error) {
|
|
105
|
+
console.error("Failed to create version:", error);
|
|
106
|
+
} finally {
|
|
107
|
+
setPublishLoading(false);
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
const handleVersionChange = (value2) => {
|
|
111
|
+
const version = versions.find((v) => v.value === value2);
|
|
112
|
+
onVersionChange == null ? void 0 : onVersionChange(value2, version);
|
|
113
|
+
};
|
|
114
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
115
|
+
import_pisellCard.default,
|
|
116
|
+
{
|
|
117
|
+
className: (0, import_classnames.default)("pisell-lowcode-app-version-control", className),
|
|
118
|
+
style
|
|
119
|
+
},
|
|
120
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
121
|
+
import_pisellAvatar.default,
|
|
122
|
+
{
|
|
123
|
+
size: "xl",
|
|
124
|
+
shape: "square",
|
|
125
|
+
borderRadius: 10,
|
|
126
|
+
useTextAvatar: true,
|
|
127
|
+
className: "pisell-lowcode-app-version-control-avatar",
|
|
128
|
+
src: currentVersion == null ? void 0 : currentVersion.avatar
|
|
129
|
+
},
|
|
130
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
131
|
+
import_icon.default,
|
|
132
|
+
{
|
|
133
|
+
type: "pisell2-container",
|
|
134
|
+
className: "pisell-lowcode-app-version-control-avatar-icon"
|
|
135
|
+
}
|
|
136
|
+
)
|
|
137
|
+
),
|
|
138
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-app-version-control-title" }, currentVersion == null ? void 0 : currentVersion.label),
|
|
139
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
140
|
+
import_customSelect.default,
|
|
141
|
+
{
|
|
142
|
+
options: versions,
|
|
143
|
+
value,
|
|
144
|
+
size: "large",
|
|
145
|
+
onChange: handleVersionChange,
|
|
146
|
+
style: { width: "100%" },
|
|
147
|
+
renderItem: (option) => /* @__PURE__ */ import_react.default.createElement(
|
|
148
|
+
import_pisellRow.default,
|
|
149
|
+
{
|
|
150
|
+
leftContent: option.label,
|
|
151
|
+
rightContent: /* @__PURE__ */ import_react.default.createElement(
|
|
152
|
+
import_pisellTags.default,
|
|
153
|
+
{
|
|
154
|
+
type: "pill_color",
|
|
155
|
+
color: getStatusColor(option.status),
|
|
156
|
+
className: "pisell-lowcode-app-version-control-tag"
|
|
157
|
+
},
|
|
158
|
+
getStatusText(option.status)
|
|
159
|
+
)
|
|
160
|
+
}
|
|
161
|
+
)
|
|
162
|
+
}
|
|
163
|
+
),
|
|
164
|
+
allowCreate && /* @__PURE__ */ import_react.default.createElement(
|
|
165
|
+
import_button.default,
|
|
166
|
+
{
|
|
167
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_icon.default, { type: "pisell2-plus" }),
|
|
168
|
+
block: true,
|
|
169
|
+
size: "large",
|
|
170
|
+
onClick: () => setPublishVersionModal(true)
|
|
171
|
+
},
|
|
172
|
+
(0, import_locales.getText)("pisell-lowcode-app-version-control-new-version")
|
|
173
|
+
),
|
|
174
|
+
allowPublish && /* @__PURE__ */ import_react.default.createElement(
|
|
175
|
+
import_button.default,
|
|
176
|
+
{
|
|
177
|
+
type: "primary",
|
|
178
|
+
block: true,
|
|
179
|
+
size: "large",
|
|
180
|
+
onClick: () => setPromoteToLiveModal(true)
|
|
181
|
+
},
|
|
182
|
+
(0, import_locales.getText)("pisell-lowcode-app-version-control-promote-to-live")
|
|
183
|
+
)
|
|
184
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
185
|
+
import_pisellModal.default.Information,
|
|
186
|
+
{
|
|
187
|
+
open: promoteToLiveModal,
|
|
188
|
+
title: (0, import_locales.getText)("pisell-lowcode-app-version-control-promote-version")(currentVersion == null ? void 0 : currentVersion.version),
|
|
189
|
+
describe: (0, import_locales.getText)("pisell-lowcode-app-version-control-promote-version-describe"),
|
|
190
|
+
okText: (0, import_locales.getText)("pisell-lowcode-app-version-control-promote-version-ok"),
|
|
191
|
+
cancelText: (0, import_locales.getText)("pisell-lowcode-app-version-control-promote-version-cancel"),
|
|
192
|
+
onOk: handlePromoteToLive,
|
|
193
|
+
confirmLoading: promoteLoading,
|
|
194
|
+
onCancel: () => setPromoteToLiveModal(false)
|
|
195
|
+
}
|
|
196
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
197
|
+
import_versionModal.default,
|
|
198
|
+
{
|
|
199
|
+
currentVersion: liveVersion || "",
|
|
200
|
+
visible: publishVersionModal,
|
|
201
|
+
onCancel: () => setPublishVersionModal(false),
|
|
202
|
+
onConfirm: handlePublishVersion,
|
|
203
|
+
isShowNote: false,
|
|
204
|
+
confirmLoading: publishLoading
|
|
205
|
+
}
|
|
206
|
+
));
|
|
207
|
+
};
|
|
208
|
+
var appVersionControl_default = AppVersionControl;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
.pisell-lowcode-app-version-control {
|
|
2
|
+
background-color: #fff;
|
|
3
|
+
.pisell-lowcode-card-body {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
gap: 12px;
|
|
9
|
+
padding: 12px !important;
|
|
10
|
+
.pisell-lowcode-app-version-control-avatar {
|
|
11
|
+
display: flex;
|
|
12
|
+
.pisell-lowcode-avatar-string {
|
|
13
|
+
display: flex;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.pisell-lowcode-app-version-control-avatar-icon {
|
|
18
|
+
font-size: 32px !important;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
.pisell-lowcode-app-version-control-title {
|
|
22
|
+
color: var(--Gray-900, #101828);
|
|
23
|
+
text-align: center;
|
|
24
|
+
font-size: 16px;
|
|
25
|
+
font-weight: 500;
|
|
26
|
+
line-height: 24px; /* 150% */
|
|
27
|
+
}
|
|
28
|
+
&:hover {
|
|
29
|
+
background: #fff !important;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
.pisell-lowcode-app-version-control-tag {
|
|
33
|
+
line-height: 20px;
|
|
34
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface Version {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
status: 'live' | 'draft' | 'deprecated';
|
|
7
|
+
version: string;
|
|
8
|
+
avatar?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface AppVersionControlProps {
|
|
11
|
+
value: string;
|
|
12
|
+
versions: Version[];
|
|
13
|
+
onVersionChange: (value: string, version: Version) => void;
|
|
14
|
+
onCreateVersion: (version: string) => Promise<boolean | undefined>;
|
|
15
|
+
onPromoteToLive: (value: string) => Promise<boolean | undefined>;
|
|
16
|
+
allowPublish?: boolean;
|
|
17
|
+
allowCreate?: boolean;
|
|
18
|
+
className?: string;
|
|
19
|
+
style?: React.CSSProperties;
|
|
20
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
|
|
15
|
+
// src/components/appVersionControl/types.ts
|
|
16
|
+
var types_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(types_exports);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SelectProps } from 'antd';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export interface BaseOption {
|
|
5
|
+
label: string;
|
|
6
|
+
value: string | number;
|
|
7
|
+
}
|
|
8
|
+
export interface CustomSelectProps<T extends BaseOption> extends Omit<SelectProps<T['value']>, 'options' | 'value' | 'onChange'> {
|
|
9
|
+
options: T[];
|
|
10
|
+
value: T['value'];
|
|
11
|
+
onChange: (value: T['value']) => void;
|
|
12
|
+
renderItem?: (option: T) => React.ReactNode;
|
|
13
|
+
className?: string;
|
|
14
|
+
style?: React.CSSProperties;
|
|
15
|
+
}
|
|
16
|
+
declare const CustomSelect: <T extends BaseOption>(props: CustomSelectProps<T>) => React.JSX.Element;
|
|
17
|
+
export default CustomSelect;
|
|
@@ -0,0 +1,58 @@
|
|
|
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/customSelect/index.tsx
|
|
30
|
+
var customSelect_exports = {};
|
|
31
|
+
__export(customSelect_exports, {
|
|
32
|
+
default: () => customSelect_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(customSelect_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_classnames = __toESM(require("classnames"));
|
|
37
|
+
var import_select = __toESM(require("../select"));
|
|
38
|
+
var import_index = require("./index.less");
|
|
39
|
+
var CustomSelect = (props) => {
|
|
40
|
+
const { options: propsOptions, value, onChange, renderItem } = props;
|
|
41
|
+
const options = (0, import_react.useMemo)(() => {
|
|
42
|
+
return propsOptions.map((option) => ({
|
|
43
|
+
label: renderItem ? renderItem(option) : option.label,
|
|
44
|
+
value: option.value
|
|
45
|
+
}));
|
|
46
|
+
}, [propsOptions, renderItem]);
|
|
47
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
48
|
+
import_select.default,
|
|
49
|
+
{
|
|
50
|
+
...props,
|
|
51
|
+
className: (0, import_classnames.default)("pisell-lowcode-custom-select", props.className),
|
|
52
|
+
options,
|
|
53
|
+
value,
|
|
54
|
+
onChange
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
var customSelect_default = CustomSelect;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { LayoutProps } from 'antd';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface PisellContentProps extends Omit<LayoutProps, 'prefixCls'> {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
declare const PisellContent: React.FC<PisellContentProps>;
|
|
7
|
+
export default PisellContent;
|
|
@@ -0,0 +1,42 @@
|
|
|
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/pisellLayout/content.tsx
|
|
30
|
+
var content_exports = {};
|
|
31
|
+
__export(content_exports, {
|
|
32
|
+
default: () => content_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(content_exports);
|
|
35
|
+
var import_antd = require("antd");
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var { Content } = import_antd.Layout;
|
|
38
|
+
var PisellContent = (props) => {
|
|
39
|
+
const { children, ...rest } = props;
|
|
40
|
+
return /* @__PURE__ */ import_react.default.createElement(Content, { ...rest }, children);
|
|
41
|
+
};
|
|
42
|
+
var content_default = PisellContent;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { LayoutProps } from 'antd';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface PisellFooterProps extends Omit<LayoutProps, 'prefixCls'> {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
declare const PisellFooter: React.FC<PisellFooterProps>;
|
|
7
|
+
export default PisellFooter;
|
|
@@ -0,0 +1,42 @@
|
|
|
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/pisellLayout/footer.tsx
|
|
30
|
+
var footer_exports = {};
|
|
31
|
+
__export(footer_exports, {
|
|
32
|
+
default: () => footer_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(footer_exports);
|
|
35
|
+
var import_antd = require("antd");
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var { Footer } = import_antd.Layout;
|
|
38
|
+
var PisellFooter = (props) => {
|
|
39
|
+
const { children, ...rest } = props;
|
|
40
|
+
return /* @__PURE__ */ import_react.default.createElement(Footer, { ...rest }, children);
|
|
41
|
+
};
|
|
42
|
+
var footer_default = PisellFooter;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { LayoutProps } from 'antd';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface PisellHeaderProps extends Omit<LayoutProps, 'prefixCls'> {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
declare const PisellHeader: React.FC<PisellHeaderProps>;
|
|
7
|
+
export default PisellHeader;
|
|
@@ -0,0 +1,42 @@
|
|
|
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/pisellLayout/header.tsx
|
|
30
|
+
var header_exports = {};
|
|
31
|
+
__export(header_exports, {
|
|
32
|
+
default: () => header_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(header_exports);
|
|
35
|
+
var import_antd = require("antd");
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var { Header } = import_antd.Layout;
|
|
38
|
+
var PisellHeader = (props) => {
|
|
39
|
+
const { children, ...rest } = props;
|
|
40
|
+
return /* @__PURE__ */ import_react.default.createElement(Header, { ...rest }, children);
|
|
41
|
+
};
|
|
42
|
+
var header_default = PisellHeader;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { LayoutProps } from 'antd';
|
|
2
|
+
import { Layout } from 'antd';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
export interface PisellLayoutProps extends LayoutProps {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
interface CompoundedComponent extends React.FC<PisellLayoutProps> {
|
|
8
|
+
Header: typeof Layout.Header;
|
|
9
|
+
Content: typeof Layout.Content;
|
|
10
|
+
Footer: typeof Layout.Footer;
|
|
11
|
+
Sider: typeof Layout.Sider;
|
|
12
|
+
}
|
|
13
|
+
declare const PisellLayout: CompoundedComponent;
|
|
14
|
+
export default PisellLayout;
|