@pisell/materials 1.0.585 → 1.0.587
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 +5 -5
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +17 -17
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +16 -16
- package/es/components/dataSourceComponents/fields/IconSelect/ReadPretty.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/IconSelect/ReadPretty.js +18 -0
- package/es/components/dataSourceComponents/fields/IconSelect/ReadPretty.less +6 -0
- package/es/components/dataSourceComponents/fields/IconSelect/WithMode.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/IconSelect/WithMode.js +5 -0
- package/es/components/dataSourceComponents/fields/IconSelect/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/IconSelect/index.js +4 -0
- package/es/components/dataSourceComponents/fields/IconSelect/type.d.ts +8 -0
- package/es/components/dataSourceComponents/fields/IconSelect/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +2 -1
- package/es/components/dataSourceComponents/fields/index.js +3 -1
- package/es/components/iconSelect/index.d.ts +10 -0
- package/es/components/iconSelect/index.js +216 -0
- package/es/components/iconSelect/index.less +54 -0
- package/es/components/iconSelect/utils.d.ts +14 -0
- package/es/components/iconSelect/utils.js +102 -0
- package/es/components/productCard/locales.d.ts +3 -0
- package/es/components/productCard/locales.js +9 -0
- package/es/components/productCard/utils.js +8 -2
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/es/locales/en-US.d.ts +8 -1
- package/es/locales/en-US.js +25 -9
- package/es/locales/zh-CN.d.ts +7 -0
- package/es/locales/zh-CN.js +8 -1
- package/es/locales/zh-TW.d.ts +7 -0
- package/es/locales/zh-TW.js +8 -1
- package/lib/components/dataSourceComponents/fields/IconSelect/ReadPretty.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/IconSelect/ReadPretty.js +52 -0
- package/lib/components/dataSourceComponents/fields/IconSelect/ReadPretty.less +6 -0
- package/lib/components/dataSourceComponents/fields/IconSelect/WithMode.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/IconSelect/WithMode.js +39 -0
- package/lib/components/dataSourceComponents/fields/IconSelect/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/IconSelect/index.js +38 -0
- package/lib/components/dataSourceComponents/fields/IconSelect/type.d.ts +8 -0
- package/lib/components/dataSourceComponents/fields/IconSelect/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +2 -1
- package/lib/components/dataSourceComponents/fields/index.js +3 -1
- package/lib/components/iconSelect/index.d.ts +10 -0
- package/lib/components/iconSelect/index.js +188 -0
- package/lib/components/iconSelect/index.less +54 -0
- package/lib/components/iconSelect/utils.d.ts +14 -0
- package/lib/components/iconSelect/utils.js +119 -0
- package/lib/components/productCard/locales.d.ts +3 -0
- package/lib/components/productCard/locales.js +3 -0
- package/lib/components/productCard/utils.js +6 -2
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -0
- package/lib/locales/en-US.d.ts +8 -1
- package/lib/locales/en-US.js +8 -2
- package/lib/locales/zh-CN.d.ts +7 -0
- package/lib/locales/zh-CN.js +8 -1
- package/lib/locales/zh-TW.d.ts +7 -0
- package/lib/locales/zh-TW.js +8 -1
- package/lowcode/_setters/antd-icon-setter/index.tsx +11 -4
- package/lowcode/data-source-form/constants.ts +2 -1
- package/lowcode/form-item-icon-select/meta.ts +65 -0
- package/lowcode/form-item-icon-select/snippets.ts +11 -0
- package/lowcode/icon-select/meta.ts +98 -0
- package/package.json +3 -3
package/es/locales/en-US.d.ts
CHANGED
|
@@ -168,11 +168,11 @@ declare const _default: {
|
|
|
168
168
|
'walletCard-discount': string;
|
|
169
169
|
'pisellQrcode-done': string;
|
|
170
170
|
'pisellQrcode-qrcode': string;
|
|
171
|
-
'pisell-design-mode-action-disabled': string;
|
|
172
171
|
'pisell-delete-confirm-title': string;
|
|
173
172
|
'pisell-delete-confirm-content': string;
|
|
174
173
|
'pisell-delete-confirm-ok': string;
|
|
175
174
|
'pisell-delete-confirm-cancel': string;
|
|
175
|
+
'pisell-design-mode-action-disabled': string;
|
|
176
176
|
'pisell-translation-original': string;
|
|
177
177
|
'pisell-version-modal-title': string;
|
|
178
178
|
'pisell-version-modal-current-version': string;
|
|
@@ -187,5 +187,12 @@ declare const _default: {
|
|
|
187
187
|
'pisell-version-modal-describe-update-notes': string;
|
|
188
188
|
'pisell-version-modal-version-error': string;
|
|
189
189
|
'pisell-version-modal-version-required': string;
|
|
190
|
+
'pisell-icon-select-placeholder': string;
|
|
191
|
+
'pisell-icon-select-outlined': string;
|
|
192
|
+
'pisell-icon-select-filled': string;
|
|
193
|
+
'pisell-icon-select-two-tone': string;
|
|
194
|
+
'pisell-icon-select-iconfont': string;
|
|
195
|
+
'pisell-icon-select-search': string;
|
|
196
|
+
'pisell-icon-select-select': string;
|
|
190
197
|
};
|
|
191
198
|
export default _default;
|
package/es/locales/en-US.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
3
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
5
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
6
|
-
export default (_tableFilterSearch$ = {
|
|
1
|
+
export default {
|
|
7
2
|
"table-filter-search": "Search",
|
|
8
3
|
"table-filter-clear": "Clear",
|
|
9
4
|
"table-filter-filter": "Filter",
|
|
@@ -224,9 +219,30 @@ export default (_tableFilterSearch$ = {
|
|
|
224
219
|
//PisellQrcode组件
|
|
225
220
|
'pisellQrcode-done': 'Done',
|
|
226
221
|
'pisellQrcode-qrcode': 'QR code',
|
|
227
|
-
'pisell-design-mode-action-disabled': 'This action cannot be performed in edit mode',
|
|
228
222
|
'pisell-delete-confirm-title': 'Confirm Delete',
|
|
229
223
|
'pisell-delete-confirm-content': 'Are you sure you want to delete this record? This action cannot be undone.',
|
|
230
224
|
'pisell-delete-confirm-ok': 'Delete',
|
|
231
|
-
'pisell-delete-confirm-cancel': 'Cancel'
|
|
232
|
-
|
|
225
|
+
'pisell-delete-confirm-cancel': 'Cancel',
|
|
226
|
+
'pisell-design-mode-action-disabled': 'This operation is not allowed in edit mode',
|
|
227
|
+
'pisell-translation-original': 'Original',
|
|
228
|
+
'pisell-version-modal-title': 'Publish new version',
|
|
229
|
+
'pisell-version-modal-current-version': 'Current version',
|
|
230
|
+
'pisell-version-modal-version': 'Version',
|
|
231
|
+
'pisell-version-modal-update-notes': 'Update notes',
|
|
232
|
+
'pisell-version-modal-patch': 'Patch',
|
|
233
|
+
'pisell-version-modal-minor': 'Minor',
|
|
234
|
+
'pisell-version-modal-major': 'Major',
|
|
235
|
+
'pisell-version-modal-custom': 'Custom version',
|
|
236
|
+
'pisell-version-modal-cancel': 'Cancel',
|
|
237
|
+
'pisell-version-modal-confirm': 'Confirm',
|
|
238
|
+
'pisell-version-modal-describe-update-notes': 'Describe the main changes in this version...',
|
|
239
|
+
'pisell-version-modal-version-error': 'Version number must be greater than the current version',
|
|
240
|
+
'pisell-version-modal-version-required': 'Version number is required',
|
|
241
|
+
'pisell-icon-select-placeholder': 'Select icon',
|
|
242
|
+
'pisell-icon-select-outlined': 'Outlined',
|
|
243
|
+
'pisell-icon-select-filled': 'Filled',
|
|
244
|
+
'pisell-icon-select-two-tone': 'Two-tone',
|
|
245
|
+
'pisell-icon-select-iconfont': 'Iconfont',
|
|
246
|
+
'pisell-icon-select-search': 'Search icon',
|
|
247
|
+
'pisell-icon-select-select': 'Select icon'
|
|
248
|
+
};
|
package/es/locales/zh-CN.d.ts
CHANGED
|
@@ -187,5 +187,12 @@ declare const _default: {
|
|
|
187
187
|
'pisell-version-modal-describe-update-notes': string;
|
|
188
188
|
'pisell-version-modal-version-error': string;
|
|
189
189
|
'pisell-version-modal-version-required': string;
|
|
190
|
+
'pisell-icon-select-placeholder': string;
|
|
191
|
+
'pisell-icon-select-outlined': string;
|
|
192
|
+
'pisell-icon-select-filled': string;
|
|
193
|
+
'pisell-icon-select-two-tone': string;
|
|
194
|
+
'pisell-icon-select-iconfont': string;
|
|
195
|
+
'pisell-icon-select-search': string;
|
|
196
|
+
'pisell-icon-select-select': string;
|
|
190
197
|
};
|
|
191
198
|
export default _default;
|
package/es/locales/zh-CN.js
CHANGED
|
@@ -236,5 +236,12 @@ export default {
|
|
|
236
236
|
'pisell-version-modal-confirm': '确定',
|
|
237
237
|
'pisell-version-modal-describe-update-notes': '描述此版本的主要更改...',
|
|
238
238
|
'pisell-version-modal-version-error': '版本号必须大于当前版本',
|
|
239
|
-
'pisell-version-modal-version-required': '版本号为必填项'
|
|
239
|
+
'pisell-version-modal-version-required': '版本号为必填项',
|
|
240
|
+
'pisell-icon-select-placeholder': '请选择图标',
|
|
241
|
+
'pisell-icon-select-outlined': '线框风格',
|
|
242
|
+
'pisell-icon-select-filled': '实底风格',
|
|
243
|
+
'pisell-icon-select-two-tone': '双色风格',
|
|
244
|
+
'pisell-icon-select-iconfont': 'Iconfont',
|
|
245
|
+
'pisell-icon-select-search': '搜索图标',
|
|
246
|
+
'pisell-icon-select-select': '选择图标'
|
|
240
247
|
};
|
package/es/locales/zh-TW.d.ts
CHANGED
|
@@ -187,5 +187,12 @@ declare const _default: {
|
|
|
187
187
|
'pisell-version-modal-describe-update-notes': string;
|
|
188
188
|
'pisell-version-modal-version-error': string;
|
|
189
189
|
'pisell-version-modal-version-required': string;
|
|
190
|
+
'pisell-icon-select-placeholder': string;
|
|
191
|
+
'pisell-icon-select-outlined': string;
|
|
192
|
+
'pisell-icon-select-filled': string;
|
|
193
|
+
'pisell-icon-select-two-tone': string;
|
|
194
|
+
'pisell-icon-select-iconfont': string;
|
|
195
|
+
'pisell-icon-select-search': string;
|
|
196
|
+
'pisell-icon-select-select': string;
|
|
190
197
|
};
|
|
191
198
|
export default _default;
|
package/es/locales/zh-TW.js
CHANGED
|
@@ -237,5 +237,12 @@ export default {
|
|
|
237
237
|
'pisell-version-modal-confirm': '确定',
|
|
238
238
|
'pisell-version-modal-describe-update-notes': '描述此版本的主要更改...',
|
|
239
239
|
'pisell-version-modal-version-error': '版本號必須大於當前版本',
|
|
240
|
-
'pisell-version-modal-version-required': '版本號為必填項'
|
|
240
|
+
'pisell-version-modal-version-required': '版本號為必填項',
|
|
241
|
+
'pisell-icon-select-placeholder': '選擇圖標',
|
|
242
|
+
'pisell-icon-select-outlined': '線框風格',
|
|
243
|
+
'pisell-icon-select-filled': '實底風格',
|
|
244
|
+
'pisell-icon-select-two-tone': '雙色風格',
|
|
245
|
+
'pisell-icon-select-iconfont': 'Iconfont',
|
|
246
|
+
'pisell-icon-select-search': '搜索圖標',
|
|
247
|
+
'pisell-icon-select-select': '選擇圖標'
|
|
241
248
|
};
|
|
@@ -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/dataSourceComponents/fields/IconSelect/ReadPretty.tsx
|
|
30
|
+
var ReadPretty_exports = {};
|
|
31
|
+
__export(ReadPretty_exports, {
|
|
32
|
+
default: () => ReadPretty_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(ReadPretty_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_icon = __toESM(require("../../../icon"));
|
|
38
|
+
var import_ReadPretty = require("./ReadPretty.less");
|
|
39
|
+
var IconSelectReadPretty = (props) => {
|
|
40
|
+
if (!props.value) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
44
|
+
import_antd.Button,
|
|
45
|
+
{
|
|
46
|
+
size: "large",
|
|
47
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_icon.default, { type: props.value, ...props }),
|
|
48
|
+
className: "pisell-icon-select-read-pretty"
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
var ReadPretty_default = IconSelectReadPretty;
|
|
@@ -0,0 +1,39 @@
|
|
|
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/dataSourceComponents/fields/IconSelect/WithMode.tsx
|
|
30
|
+
var WithMode_exports = {};
|
|
31
|
+
__export(WithMode_exports, {
|
|
32
|
+
default: () => WithMode_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(WithMode_exports);
|
|
35
|
+
var import_iconSelect = __toESM(require("../../../iconSelect"));
|
|
36
|
+
var import_ReadPretty = __toESM(require("./ReadPretty"));
|
|
37
|
+
var import_utils = require("../../dataSourceForm/utils");
|
|
38
|
+
var IconSelectWithMode = (0, import_utils.withMode)(import_iconSelect.default, import_ReadPretty.default);
|
|
39
|
+
var WithMode_default = IconSelectWithMode;
|
|
@@ -0,0 +1,38 @@
|
|
|
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/dataSourceComponents/fields/IconSelect/index.tsx
|
|
30
|
+
var IconSelect_exports = {};
|
|
31
|
+
__export(IconSelect_exports, {
|
|
32
|
+
default: () => IconSelect_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(IconSelect_exports);
|
|
35
|
+
var import_utils = require("../../dataSourceForm/utils");
|
|
36
|
+
var import_WithMode = __toESM(require("./WithMode"));
|
|
37
|
+
var IconSelect = (0, import_utils.withFormItem)(import_WithMode.default);
|
|
38
|
+
var IconSelect_default = IconSelect;
|
|
@@ -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/dataSourceComponents/fields/IconSelect/type.ts
|
|
16
|
+
var type_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(type_exports);
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
declare const Subdomain: React.FC<import("antd").InputProps & {
|
|
3
3
|
onChange: (value: string) => void;
|
|
4
4
|
onBlur?: ((e: React.FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
5
|
-
rootDomain:
|
|
5
|
+
rootDomain: string;
|
|
6
6
|
customDomain?: string | undefined;
|
|
7
7
|
value?: string | undefined;
|
|
8
8
|
isVerification?: boolean | undefined;
|
|
@@ -56,6 +56,7 @@ declare const formFieldMap: {
|
|
|
56
56
|
FormItemDateRangePicker: import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
57
57
|
FormItemUpload: import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
58
58
|
FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
59
|
+
FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
59
60
|
};
|
|
60
61
|
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<any> | (import("react").FC<{}> & {
|
|
61
62
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -93,5 +94,5 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
93
94
|
valueField: string;
|
|
94
95
|
} & {
|
|
95
96
|
dataSource?: any;
|
|
96
|
-
}) => import("react").JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
97
|
+
}) => import("react").JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
97
98
|
export { getFieldComponent, formFieldMap };
|
|
@@ -44,6 +44,7 @@ var import_TimePicker = __toESM(require("./TimePicker"));
|
|
|
44
44
|
var import_DateRangePicker = __toESM(require("./DateRangePicker"));
|
|
45
45
|
var import_Upload = __toESM(require("./Upload"));
|
|
46
46
|
var import_Translation = __toESM(require("./Translation"));
|
|
47
|
+
var import_IconSelect = __toESM(require("./IconSelect"));
|
|
47
48
|
var formFieldMap = {
|
|
48
49
|
FormItemCheckbox: import_Checkbox.default,
|
|
49
50
|
FormItemColorPicker: import_ColorPicker.default,
|
|
@@ -64,7 +65,8 @@ var formFieldMap = {
|
|
|
64
65
|
"FormItemCheckbox.Group": import_Checkbox.default.Group,
|
|
65
66
|
FormItemDateRangePicker: import_DateRangePicker.default,
|
|
66
67
|
FormItemUpload: import_Upload.default,
|
|
67
|
-
FormItemTranslation: import_Translation.default
|
|
68
|
+
FormItemTranslation: import_Translation.default,
|
|
69
|
+
FormItemIconSelect: import_IconSelect.default
|
|
68
70
|
};
|
|
69
71
|
var getFieldComponent = (fieldComponent) => {
|
|
70
72
|
return formFieldMap[fieldComponent];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface IconSelectProps {
|
|
4
|
+
value?: string;
|
|
5
|
+
onChange?: (value: string) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
defaultValue?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const IconSelect: React.FC<IconSelectProps>;
|
|
10
|
+
export default IconSelect;
|
|
@@ -0,0 +1,188 @@
|
|
|
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/iconSelect/index.tsx
|
|
30
|
+
var iconSelect_exports = {};
|
|
31
|
+
__export(iconSelect_exports, {
|
|
32
|
+
default: () => iconSelect_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(iconSelect_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_icons = require("@ant-design/icons");
|
|
38
|
+
var import_ahooks = require("ahooks");
|
|
39
|
+
var import_utils = require("@pisell/utils");
|
|
40
|
+
var import_locales = require("../../locales");
|
|
41
|
+
var import_utils2 = require("./utils");
|
|
42
|
+
var import_index = require("./index.less");
|
|
43
|
+
var IconGroupNameMap = {
|
|
44
|
+
outlined: (0, import_locales.getText)("pisell-icon-select-outlined"),
|
|
45
|
+
filled: (0, import_locales.getText)("pisell-icon-select-filled"),
|
|
46
|
+
"two-tone": (0, import_locales.getText)("pisell-icon-select-two-tone"),
|
|
47
|
+
iconfont: (0, import_locales.getText)("pisell-icon-select-iconfont")
|
|
48
|
+
};
|
|
49
|
+
var Icon = (props) => {
|
|
50
|
+
const { type, icons = {}, ...rest } = props;
|
|
51
|
+
const Comp = icons[type];
|
|
52
|
+
if (!Comp)
|
|
53
|
+
return null;
|
|
54
|
+
return /* @__PURE__ */ import_react.default.createElement(Comp, { ...rest });
|
|
55
|
+
};
|
|
56
|
+
var IconContent = ({
|
|
57
|
+
selectedGroup,
|
|
58
|
+
groups,
|
|
59
|
+
setSelectedGroup,
|
|
60
|
+
search,
|
|
61
|
+
setSearch,
|
|
62
|
+
list,
|
|
63
|
+
handleChange,
|
|
64
|
+
icons
|
|
65
|
+
}) => /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-icon-select-popup" }, /* @__PURE__ */ import_react.default.createElement(
|
|
66
|
+
import_antd.Radio.Group,
|
|
67
|
+
{
|
|
68
|
+
className: "pisell-lowcode-icon-select-radio-group",
|
|
69
|
+
size: "middle",
|
|
70
|
+
value: selectedGroup,
|
|
71
|
+
onChange: (e) => setSelectedGroup(e.target.value)
|
|
72
|
+
},
|
|
73
|
+
groups.map((item) => /* @__PURE__ */ import_react.default.createElement(import_antd.Radio.Button, { key: item.group, value: item.group }, IconGroupNameMap[item.group]))
|
|
74
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
75
|
+
import_antd.Input,
|
|
76
|
+
{
|
|
77
|
+
value: search,
|
|
78
|
+
size: "middle",
|
|
79
|
+
placeholder: (0, import_locales.getText)("pisell-icon-select-search"),
|
|
80
|
+
allowClear: true,
|
|
81
|
+
prefix: /* @__PURE__ */ import_react.default.createElement(import_icons.SearchOutlined, null),
|
|
82
|
+
onChange: (e) => setSearch(e.target.value),
|
|
83
|
+
style: { width: "100%" },
|
|
84
|
+
className: "pisell-lowcode-icon-select-search"
|
|
85
|
+
}
|
|
86
|
+
), /* @__PURE__ */ import_react.default.createElement("ul", { className: "pisell-lowcode-icon-select-content" }, list.map((item) => /* @__PURE__ */ import_react.default.createElement(
|
|
87
|
+
"li",
|
|
88
|
+
{
|
|
89
|
+
className: "pisell-lowcode-icon-select-item",
|
|
90
|
+
key: item.name,
|
|
91
|
+
onClick: () => handleChange(item.name),
|
|
92
|
+
title: item.name
|
|
93
|
+
},
|
|
94
|
+
/* @__PURE__ */ import_react.default.createElement(Icon, { type: item.name, icons })
|
|
95
|
+
))));
|
|
96
|
+
var IconSelect = (props) => {
|
|
97
|
+
const { disabled, defaultValue = "HeartOutlined" } = props;
|
|
98
|
+
const [open, setOpen] = (0, import_react.useState)(false);
|
|
99
|
+
const [search, setSearch] = (0, import_react.useState)("");
|
|
100
|
+
const [icons, setIcons] = (0, import_react.useState)({});
|
|
101
|
+
const [groups, setGroups] = (0, import_react.useState)([]);
|
|
102
|
+
const [selectedGroup, setSelectedGroup] = (0, import_react.useState)("outlined");
|
|
103
|
+
const [firstLoad, setFirstLoad] = (0, import_react.useState)(true);
|
|
104
|
+
const [list, setList] = (0, import_react.useState)([]);
|
|
105
|
+
const [value, onChange] = (0, import_ahooks.useControllableValue)(props, {
|
|
106
|
+
defaultValue
|
|
107
|
+
});
|
|
108
|
+
if (firstLoad && defaultValue && (0, import_utils.isUndefined)(value)) {
|
|
109
|
+
onChange(defaultValue);
|
|
110
|
+
setFirstLoad(false);
|
|
111
|
+
}
|
|
112
|
+
(0, import_react.useEffect)(() => {
|
|
113
|
+
var _a;
|
|
114
|
+
const iconList = (0, import_utils2.getIconList)();
|
|
115
|
+
const groups2 = [];
|
|
116
|
+
const icons2 = {};
|
|
117
|
+
iconList.forEach((item) => {
|
|
118
|
+
const { group, name, icon } = item;
|
|
119
|
+
if (groups2.every((item2) => item2.group !== group)) {
|
|
120
|
+
groups2.push({ group, list: [] });
|
|
121
|
+
}
|
|
122
|
+
const target = groups2.find((item2) => item2.group === group);
|
|
123
|
+
target.list.push(item);
|
|
124
|
+
icons2[item.name] = item == null ? void 0 : item.icon;
|
|
125
|
+
});
|
|
126
|
+
setIcons(icons2);
|
|
127
|
+
setGroups(groups2);
|
|
128
|
+
setSelectedGroup((_a = groups2[0]) == null ? void 0 : _a.group);
|
|
129
|
+
}, []);
|
|
130
|
+
(0, import_react.useEffect)(() => {
|
|
131
|
+
const currentGroup = groups.find((item) => item.group === selectedGroup);
|
|
132
|
+
setList(
|
|
133
|
+
((currentGroup == null ? void 0 : currentGroup.list) ?? []).filter((item) => {
|
|
134
|
+
return search ? item.name.toLowerCase().indexOf(search.toLowerCase()) > -1 : true;
|
|
135
|
+
})
|
|
136
|
+
);
|
|
137
|
+
}, [selectedGroup, search, groups]);
|
|
138
|
+
const handleChange = (icon) => {
|
|
139
|
+
onChange == null ? void 0 : onChange(icon);
|
|
140
|
+
hide();
|
|
141
|
+
};
|
|
142
|
+
const triggerNode = /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-icon-select-trigger" }, /* @__PURE__ */ import_react.default.createElement(Icon, { type: value, icons, style: { fontSize: 24 } }));
|
|
143
|
+
const hide = () => {
|
|
144
|
+
setOpen(false);
|
|
145
|
+
};
|
|
146
|
+
const handleOpenChange = (newOpen) => {
|
|
147
|
+
setOpen(newOpen);
|
|
148
|
+
};
|
|
149
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Space.Compact, { block: true, className: "pisell-lowcode-icon-select" }, /* @__PURE__ */ import_react.default.createElement(
|
|
150
|
+
import_antd.Popover,
|
|
151
|
+
{
|
|
152
|
+
content: /* @__PURE__ */ import_react.default.createElement(
|
|
153
|
+
IconContent,
|
|
154
|
+
{
|
|
155
|
+
selectedGroup,
|
|
156
|
+
groups,
|
|
157
|
+
setSelectedGroup,
|
|
158
|
+
search,
|
|
159
|
+
setSearch,
|
|
160
|
+
list,
|
|
161
|
+
handleChange,
|
|
162
|
+
icons
|
|
163
|
+
}
|
|
164
|
+
),
|
|
165
|
+
trigger: "click",
|
|
166
|
+
placement: "bottom",
|
|
167
|
+
open,
|
|
168
|
+
onOpenChange: handleOpenChange
|
|
169
|
+
},
|
|
170
|
+
value ? /* @__PURE__ */ import_react.default.createElement(
|
|
171
|
+
import_antd.Button,
|
|
172
|
+
{
|
|
173
|
+
size: "large",
|
|
174
|
+
disabled,
|
|
175
|
+
icon: triggerNode,
|
|
176
|
+
className: "pisell-lowcode-icon-select-button"
|
|
177
|
+
}
|
|
178
|
+
) : /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { className: "pisell-lowcode-icon-select-button-text" }, (0, import_locales.getText)("pisell-icon-select-select"))
|
|
179
|
+
), value && !disabled && /* @__PURE__ */ import_react.default.createElement(
|
|
180
|
+
import_antd.Button,
|
|
181
|
+
{
|
|
182
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_icons.CloseOutlined, null),
|
|
183
|
+
className: "pisell-lowcode-icon-select-button",
|
|
184
|
+
onClick: () => onChange == null ? void 0 : onChange("")
|
|
185
|
+
}
|
|
186
|
+
));
|
|
187
|
+
};
|
|
188
|
+
var iconSelect_default = IconSelect;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
.pisell-lowcode-icon-select-trigger {
|
|
2
|
+
font-size: 20px;
|
|
3
|
+
.anticon {
|
|
4
|
+
font-size: 20px;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.pisell-lowcode-icon-select-button {
|
|
9
|
+
// width: 44px;
|
|
10
|
+
// height: 44px;
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.pisell-lowcode-icon-select-button-text {
|
|
17
|
+
border-radius: 9px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.pisell-lowcode-icon-select-popup {
|
|
21
|
+
width: 350px;
|
|
22
|
+
border-radius: 12px;
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
gap: 12px;
|
|
26
|
+
.pisell-lowcode-icon-select-radio-group {
|
|
27
|
+
width: 100%;
|
|
28
|
+
display: flex;
|
|
29
|
+
& > * {
|
|
30
|
+
flex: 1;
|
|
31
|
+
padding: 0;
|
|
32
|
+
text-align: center;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
.pisell-lowcode-icon-select-content {
|
|
36
|
+
flex: 1;
|
|
37
|
+
overflow-y: auto;
|
|
38
|
+
max-height: 280px;
|
|
39
|
+
.pisell-lowcode-icon-select-item {
|
|
40
|
+
width: 36px;
|
|
41
|
+
height: 36px;
|
|
42
|
+
line-height: 36px;
|
|
43
|
+
font-size: 24px;
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
display: inline-block;
|
|
46
|
+
transition: background-color 0.2s;
|
|
47
|
+
text-align: center;
|
|
48
|
+
border-radius: 4px;
|
|
49
|
+
&:hover {
|
|
50
|
+
background-color: #f1f2f3;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare type IconGroup = 'outlined' | 'filled' | 'two-tone' | 'iconfont';
|
|
2
|
+
export declare function get(obj: any, path: string, defaultValue?: any): any;
|
|
3
|
+
export declare function getAntdIconList(): ({
|
|
4
|
+
name: any;
|
|
5
|
+
group: "filled" | "outlined" | "two-tone";
|
|
6
|
+
icon: any;
|
|
7
|
+
} | null)[];
|
|
8
|
+
interface IconItem {
|
|
9
|
+
name: string;
|
|
10
|
+
group: IconGroup;
|
|
11
|
+
icon: any;
|
|
12
|
+
}
|
|
13
|
+
export declare function getIconList(): IconItem[];
|
|
14
|
+
export {};
|