@pisell/materials 6.0.10 → 6.0.12
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 -15
- package/build/lowcode/assets-dev.json +2 -6
- package/build/lowcode/assets-prod.json +11 -15
- 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 +22 -22
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +22 -22
- package/dist/umd/materials.min.css +1 -0
- package/dist/umd/materials.min.js +1 -0
- package/dist/umd/static/DotsSix.57d66266.svg +1 -0
- package/dist/umd/static/arrow-left.e542294f.svg +1 -0
- package/dist/umd/static/arrow-right.763f03e0.svg +1 -0
- package/dist/umd/static/filter-lines.04a54ae9.svg +1 -0
- package/dist/umd/static/help-circle.31c9be40.svg +1 -0
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +1 -0
- package/es/components/dataSourceComponents/dataSourceForm/BaseForm.js +94 -3
- package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.js +7 -6
- package/es/components/dataSourceComponents/dataSourceForm/type.d.ts +8 -0
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceForm/utils.js +120 -38
- package/es/components/dataSourceComponents/dataSourceMenu/index.d.ts +2 -0
- package/es/components/dataSourceComponents/dataSourceMenu/index.js +19 -0
- package/es/components/dataSourceComponents/dataSourceTable/BaseTable.js +46 -8
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/es/components/dataSourceComponents/fields/Input/index.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/Input/index.js +5 -1
- package/es/components/dataSourceComponents/fields/Input.Mobile/ReadPretty.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Input.Mobile/ReadPretty.js +28 -0
- package/es/components/dataSourceComponents/fields/Input.Mobile/ReadPretty.less +11 -0
- package/es/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +10 -0
- package/es/components/dataSourceComponents/fields/Input.Mobile/WithMode.js +212 -0
- package/es/components/dataSourceComponents/fields/Input.Mobile/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/Input.Mobile/index.js +14 -0
- package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +24 -0
- package/es/components/dataSourceComponents/fields/Input.Mobile/serve.js +59 -0
- package/es/components/dataSourceComponents/fields/Input.Mobile/type.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Input.Mobile/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +2 -3
- package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.js +76 -19
- package/es/components/dataSourceComponents/fields/Input.Subdomain/ReadPretty.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Input.Subdomain/ReadPretty.js +13 -0
- package/es/components/dataSourceComponents/fields/Input.Subdomain/ReadPretty.less +11 -0
- package/es/components/dataSourceComponents/fields/Input.Subdomain/WithMode.d.ts +13 -0
- package/es/components/dataSourceComponents/fields/Input.Subdomain/WithMode.js +206 -0
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +12 -0
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.js +4 -0
- package/es/components/dataSourceComponents/fields/Input.Subdomain/serve.d.ts +11 -0
- package/es/components/dataSourceComponents/fields/Input.Subdomain/serve.js +63 -0
- package/es/components/dataSourceComponents/fields/Input.Subdomain/type.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Input.Subdomain/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Translation/BaseTranslation.js +15 -4
- package/es/components/dataSourceComponents/fields/Translation/type.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Upload/BaseUpload.js +17 -13
- package/es/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Upload/ReadPretty.js +4 -2
- package/es/components/dataSourceComponents/fields/Upload/WithMode.js +5 -4
- package/es/components/dataSourceComponents/fields/Upload/index.less +1 -1
- package/es/components/dataSourceComponents/fields/Upload/serve.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Upload/serve.js +5 -5
- package/es/components/dataSourceComponents/fields/Upload/type.d.ts +8 -0
- package/es/components/dataSourceComponents/fields/index.d.ts +25 -2
- package/es/components/dataSourceComponents/fields/index.js +1 -0
- package/es/components/dataSourceComponents/fields/type.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/utils.js +1 -0
- package/es/components/dataSourceComponents/provider/actions/ActionsContext.d.ts +6 -1
- package/es/components/dataSourceComponents/provider/actions/ActionsProvider.d.ts +4 -1
- package/es/components/dataSourceComponents/provider/actions/ActionsProvider.js +0 -1
- package/es/components/form/index.js +12 -0
- package/es/components/iconfont/index.js +1 -1
- package/es/components/pisellDraggable/components/Action/Action.d.ts +10 -0
- package/es/components/pisellDraggable/components/Action/Action.js +31 -0
- package/es/components/pisellDraggable/components/Action/Action.less +50 -0
- package/es/components/pisellDraggable/components/Action/index.d.ts +2 -0
- package/es/components/pisellDraggable/components/Action/index.js +1 -0
- package/es/components/pisellDraggable/components/Handle/Handle.d.ts +3 -0
- package/es/components/pisellDraggable/components/Handle/Handle.js +15 -0
- package/es/components/pisellDraggable/components/Handle/index.d.ts +1 -0
- package/es/components/pisellDraggable/components/Handle/index.js +1 -0
- package/es/components/pisellDraggable/components/Remove/Remove.d.ts +3 -0
- package/es/components/pisellDraggable/components/Remove/Remove.js +17 -0
- package/es/components/pisellDraggable/components/Remove/index.d.ts +1 -0
- package/es/components/pisellDraggable/components/Remove/index.js +1 -0
- package/es/components/pisellDraggable/components/TreeItem/SortableTreeItem.d.ts +8 -0
- package/es/components/pisellDraggable/components/TreeItem/SortableTreeItem.js +51 -0
- package/es/components/pisellDraggable/components/TreeItem/TreeItem.d.ts +21 -0
- package/es/components/pisellDraggable/components/TreeItem/TreeItem.js +57 -0
- package/es/components/pisellDraggable/components/TreeItem/TreeItem.less +128 -0
- package/es/components/pisellDraggable/components/TreeItem/index.d.ts +2 -0
- package/es/components/pisellDraggable/components/TreeItem/index.js +2 -0
- package/es/components/pisellDraggable/components/index.d.ts +4 -0
- package/es/components/pisellDraggable/components/index.js +4 -0
- package/es/components/pisellDraggable/index.d.ts +27 -0
- package/es/components/pisellDraggable/index.js +380 -0
- package/es/components/pisellDraggable/types.d.ts +17 -0
- package/es/components/pisellDraggable/types.js +1 -0
- package/es/components/pisellDraggable/utilities.d.ts +17 -0
- package/es/components/pisellDraggable/utilities.js +230 -0
- package/es/components/pisellLayout/content.d.ts +8 -0
- package/es/components/pisellLayout/content.js +29 -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/pisellMenu/PisellMenu.d.ts +5 -0
- package/es/components/pisellMenu/PisellMenu.js +55 -0
- package/es/components/pisellMenu/PisellMenu.less +53 -0
- package/es/components/pisellMenu/index.d.ts +3 -0
- package/es/components/pisellMenu/index.js +2 -0
- package/es/components/pisellMenu/types.d.ts +30 -0
- package/es/components/pisellMenu/types.js +1 -0
- package/es/components/pisellModal/components/functions/index.less +3 -0
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/versionModal/index.d.ts +15 -0
- package/es/components/versionModal/index.js +192 -0
- package/es/components/versionModal/index.less +3 -0
- package/es/index.d.ts +92 -120
- package/es/index.js +92 -144
- package/es/locales/en-US.d.ts +22 -0
- package/es/locales/en-US.js +24 -1
- package/es/locales/zh-CN.d.ts +21 -0
- package/es/locales/zh-CN.js +24 -2
- package/es/locales/zh-TW.d.ts +20 -0
- package/es/locales/zh-TW.js +23 -2
- package/lib/components/dataSourceComponents/dataSourceForm/BaseForm.js +77 -4
- package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.js +1 -0
- package/lib/components/dataSourceComponents/dataSourceForm/type.d.ts +8 -0
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceForm/utils.js +138 -41
- package/lib/components/dataSourceComponents/dataSourceMenu/index.d.ts +2 -0
- package/lib/components/dataSourceComponents/dataSourceMenu/index.js +45 -0
- package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.js +14 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/lib/components/dataSourceComponents/fields/Input/index.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/Input/index.js +4 -0
- package/lib/components/dataSourceComponents/fields/Input.Mobile/ReadPretty.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Input.Mobile/ReadPretty.js +58 -0
- package/lib/components/dataSourceComponents/fields/Input.Mobile/ReadPretty.less +11 -0
- package/lib/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +10 -0
- package/lib/components/dataSourceComponents/fields/Input.Mobile/WithMode.js +171 -0
- package/lib/components/dataSourceComponents/fields/Input.Mobile/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/Input.Mobile/index.js +48 -0
- package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +24 -0
- package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.js +55 -0
- package/lib/components/dataSourceComponents/fields/Input.Mobile/type.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Input.Mobile/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +2 -3
- package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.js +36 -17
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/ReadPretty.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/ReadPretty.js +50 -0
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/ReadPretty.less +11 -0
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/WithMode.d.ts +13 -0
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/WithMode.js +167 -0
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +12 -0
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.js +38 -0
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/serve.d.ts +11 -0
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/serve.js +65 -0
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/type.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Translation/BaseTranslation.js +15 -4
- package/lib/components/dataSourceComponents/fields/Translation/type.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Upload/BaseUpload.js +5 -3
- package/lib/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Upload/ReadPretty.js +2 -2
- package/lib/components/dataSourceComponents/fields/Upload/WithMode.js +4 -4
- package/lib/components/dataSourceComponents/fields/Upload/index.less +1 -1
- package/lib/components/dataSourceComponents/fields/Upload/serve.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Upload/serve.js +5 -5
- package/lib/components/dataSourceComponents/fields/Upload/type.d.ts +8 -0
- package/lib/components/dataSourceComponents/fields/index.d.ts +25 -2
- package/lib/components/dataSourceComponents/fields/index.js +1 -0
- package/lib/components/dataSourceComponents/fields/type.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/utils.js +1 -0
- package/lib/components/dataSourceComponents/provider/actions/ActionsContext.d.ts +6 -1
- package/lib/components/dataSourceComponents/provider/actions/ActionsProvider.d.ts +4 -1
- package/lib/components/form/index.js +10 -1
- package/lib/components/iconfont/index.js +1 -1
- package/lib/components/pisellDraggable/components/Action/Action.d.ts +10 -0
- package/lib/components/pisellDraggable/components/Action/Action.js +60 -0
- package/lib/components/pisellDraggable/components/Action/Action.less +50 -0
- package/lib/components/pisellDraggable/components/Action/index.d.ts +2 -0
- package/lib/components/pisellDraggable/components/Action/index.js +29 -0
- package/lib/components/pisellDraggable/components/Handle/Handle.d.ts +3 -0
- package/lib/components/pisellDraggable/components/Handle/Handle.js +54 -0
- package/lib/components/pisellDraggable/components/Handle/index.d.ts +1 -0
- package/lib/components/pisellDraggable/components/Handle/index.js +29 -0
- package/lib/components/pisellDraggable/components/Remove/Remove.d.ts +3 -0
- package/lib/components/pisellDraggable/components/Remove/Remove.js +53 -0
- package/lib/components/pisellDraggable/components/Remove/index.d.ts +1 -0
- package/lib/components/pisellDraggable/components/Remove/index.js +29 -0
- package/lib/components/pisellDraggable/components/TreeItem/SortableTreeItem.d.ts +8 -0
- package/lib/components/pisellDraggable/components/TreeItem/SortableTreeItem.js +83 -0
- package/lib/components/pisellDraggable/components/TreeItem/TreeItem.d.ts +21 -0
- package/lib/components/pisellDraggable/components/TreeItem/TreeItem.js +93 -0
- package/lib/components/pisellDraggable/components/TreeItem/TreeItem.less +128 -0
- package/lib/components/pisellDraggable/components/TreeItem/index.d.ts +2 -0
- package/lib/components/pisellDraggable/components/TreeItem/index.js +32 -0
- package/lib/components/pisellDraggable/components/index.d.ts +4 -0
- package/lib/components/pisellDraggable/components/index.js +40 -0
- package/lib/components/pisellDraggable/index.d.ts +27 -0
- package/lib/components/pisellDraggable/index.js +271 -0
- package/lib/components/pisellDraggable/types.d.ts +17 -0
- package/lib/components/pisellDraggable/types.js +17 -0
- package/lib/components/pisellDraggable/utilities.d.ts +17 -0
- package/lib/components/pisellDraggable/utilities.js +190 -0
- package/lib/components/pisellLayout/content.d.ts +8 -0
- package/lib/components/pisellLayout/content.js +50 -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/pisellMenu/PisellMenu.d.ts +5 -0
- package/lib/components/pisellMenu/PisellMenu.js +91 -0
- package/lib/components/pisellMenu/PisellMenu.less +53 -0
- package/lib/components/pisellMenu/index.d.ts +3 -0
- package/lib/components/pisellMenu/index.js +36 -0
- package/lib/components/pisellMenu/types.d.ts +30 -0
- package/lib/components/pisellMenu/types.js +17 -0
- package/lib/components/pisellModal/components/functions/index.less +3 -0
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/versionModal/index.d.ts +15 -0
- package/lib/components/versionModal/index.js +219 -0
- package/lib/components/versionModal/index.less +3 -0
- package/lib/index.d.ts +92 -120
- package/lib/index.js +146 -157
- package/lib/locales/en-US.d.ts +22 -0
- package/lib/locales/en-US.js +24 -1
- package/lib/locales/zh-CN.d.ts +21 -0
- package/lib/locales/zh-CN.js +24 -2
- package/lib/locales/zh-TW.d.ts +20 -0
- package/lib/locales/zh-TW.js +23 -2
- package/lowcode/_utils/defaultSchema.ts +23 -2
- package/lowcode/button/meta.ts +4 -20
- package/lowcode/data-source-form/constants.ts +4 -0
- package/lowcode/data-source-form/meta.ts +138 -1
- package/lowcode/data-source-form/snippets.ts +54 -0
- package/lowcode/data-source-form/utils.ts +5 -1
- package/lowcode/data-source-menu/meta.ts +122 -0
- package/lowcode/data-source-table/meta.ts +32 -27
- package/lowcode/data-source-table/utils.tsx +33 -1
- package/lowcode/data-source-wrapper/meta.ts +6 -2
- package/lowcode/form-group/meta.ts +5 -1
- package/lowcode/form-item-input.mobile/__screenshots__/mobile.png +0 -0
- package/lowcode/form-item-input.mobile/meta.ts +301 -0
- package/lowcode/form-item-input.mobile/snippets.ts +27 -0
- package/lowcode/form-item-input.phone/meta.ts +9 -43
- package/lowcode/form-item-input.phone/snippets.ts +8 -2
- package/lowcode/form-item-input.subdomain/__screenshots__/subdomain.png +0 -0
- package/lowcode/form-item-input.subdomain/meta.ts +318 -0
- package/lowcode/form-item-input.subdomain/snippets.ts +27 -0
- package/lowcode/form.item/meta.ts +48 -0
- package/lowcode/pisell-content/meta.ts +86 -0
- package/lowcode/pisell-draggable/meta.ts +190 -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-menu/meta.ts +112 -0
- package/lowcode/pisell-sider/meta.ts +142 -0
- package/lowcode/pisell-text/meta.ts +9 -8080
- package/package.json +1 -1
|
@@ -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/Input.Subdomain/type.ts
|
|
16
|
+
var type_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(type_exports);
|
|
@@ -53,9 +53,20 @@ var Translation = ({
|
|
|
53
53
|
value = defaultValue,
|
|
54
54
|
onChange,
|
|
55
55
|
placeholder,
|
|
56
|
-
disabled
|
|
56
|
+
disabled,
|
|
57
|
+
type = "text"
|
|
58
|
+
// 默认为普通文本输入
|
|
57
59
|
}) => {
|
|
58
60
|
const [open, setOpen] = (0, import_react.useState)(false);
|
|
61
|
+
const getInputComponent = (0, import_react.useCallback)(() => {
|
|
62
|
+
switch (type) {
|
|
63
|
+
case "textarea":
|
|
64
|
+
return import_antd.Input.TextArea;
|
|
65
|
+
default:
|
|
66
|
+
return import_antd.Input;
|
|
67
|
+
}
|
|
68
|
+
}, [type]);
|
|
69
|
+
const InputComponent = getInputComponent();
|
|
59
70
|
const hasAnyTranslation = (0, import_react.useCallback)(() => {
|
|
60
71
|
if (!value) {
|
|
61
72
|
return false;
|
|
@@ -73,7 +84,7 @@ var Translation = ({
|
|
|
73
84
|
[value, onChange]
|
|
74
85
|
);
|
|
75
86
|
const content = /* @__PURE__ */ import_react.default.createElement("div", { className: "translation-popover" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { direction: "vertical", style: { width: "100%" }, size: 16 }, languageConfig.map(({ key, label }) => /* @__PURE__ */ import_react.default.createElement("div", { key, className: "translation-field" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "translation-label" }, label), /* @__PURE__ */ import_react.default.createElement(
|
|
76
|
-
|
|
87
|
+
InputComponent,
|
|
77
88
|
{
|
|
78
89
|
value: (value == null ? void 0 : value[key]) || "",
|
|
79
90
|
onChange: handleInputChange(key),
|
|
@@ -81,7 +92,7 @@ var Translation = ({
|
|
|
81
92
|
}
|
|
82
93
|
)))));
|
|
83
94
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: "translation-wrapper" }, /* @__PURE__ */ import_react.default.createElement(
|
|
84
|
-
|
|
95
|
+
InputComponent,
|
|
85
96
|
{
|
|
86
97
|
value: (value == null ? void 0 : value.original) || "",
|
|
87
98
|
onChange: handleInputChange("original"),
|
|
@@ -101,7 +112,7 @@ var Translation = ({
|
|
|
101
112
|
}
|
|
102
113
|
setOpen(open2);
|
|
103
114
|
},
|
|
104
|
-
placement: "
|
|
115
|
+
placement: "bottom"
|
|
105
116
|
},
|
|
106
117
|
/* @__PURE__ */ import_react.default.createElement(
|
|
107
118
|
"div",
|
|
@@ -63,6 +63,8 @@ var BaseUpload = (props) => {
|
|
|
63
63
|
typeMaxSizeMap,
|
|
64
64
|
enableMultilingual,
|
|
65
65
|
onChange,
|
|
66
|
+
mediaUploadUrl: propsMediaUploadUrl,
|
|
67
|
+
getHeaders: propsGetHeaders,
|
|
66
68
|
...restProps
|
|
67
69
|
} = props;
|
|
68
70
|
const [fileList, setFileList] = (0, import_react.useState)([]);
|
|
@@ -78,7 +80,7 @@ var BaseUpload = (props) => {
|
|
|
78
80
|
fileListRef.current = fileList;
|
|
79
81
|
}, [fileList]);
|
|
80
82
|
const { appHelper } = (0, import_useEngineContext.default)();
|
|
81
|
-
const { mediaUploadUrl, getHeaders } = appHelper == null ? void 0 : appHelper.constants;
|
|
83
|
+
const { mediaUploadUrl, getHeaders } = (appHelper == null ? void 0 : appHelper.constants) || {};
|
|
82
84
|
const handleImageError = (0, import_react.useCallback)((file) => {
|
|
83
85
|
setErrorImageMap((prev) => ({
|
|
84
86
|
...prev,
|
|
@@ -482,7 +484,7 @@ var BaseUpload = (props) => {
|
|
|
482
484
|
iconRender: () => /* @__PURE__ */ import_react.default.createElement(import_iconfont.default, { type: "pisell2-a-BlueFile1" }),
|
|
483
485
|
listType: "picture-card",
|
|
484
486
|
onChange: handleChange,
|
|
485
|
-
action: mediaUploadUrl,
|
|
487
|
+
action: propsMediaUploadUrl || mediaUploadUrl,
|
|
486
488
|
method: "post",
|
|
487
489
|
accept,
|
|
488
490
|
name: "file",
|
|
@@ -494,7 +496,7 @@ var BaseUpload = (props) => {
|
|
|
494
496
|
group_id: 0,
|
|
495
497
|
...(0, import_utils2.getFileMetadataParams)(file)
|
|
496
498
|
}),
|
|
497
|
-
headers: getHeaders == null ? void 0 : getHeaders(),
|
|
499
|
+
headers: (propsGetHeaders == null ? void 0 : propsGetHeaders()) || (getHeaders == null ? void 0 : getHeaders()),
|
|
498
500
|
beforeUpload,
|
|
499
501
|
className: "pisell-data-source-upload"
|
|
500
502
|
// itemRender: (originNode: React.ReactElement, file: UploadFile) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { UploadProps } from './type';
|
|
3
3
|
import './ReadPretty.less';
|
|
4
|
-
declare const UploadReadPretty: (props: UploadProps) => React.JSX.Element
|
|
4
|
+
declare const UploadReadPretty: (props: UploadProps) => React.JSX.Element | null;
|
|
5
5
|
export default UploadReadPretty;
|
|
@@ -59,7 +59,7 @@ var UploadReadPretty = (props) => {
|
|
|
59
59
|
if (!normalizedValue.length) {
|
|
60
60
|
return null;
|
|
61
61
|
}
|
|
62
|
-
return normalizedValue.map((item, index) => /* @__PURE__ */ import_react.default.createElement(
|
|
62
|
+
return /* @__PURE__ */ import_react.default.createElement("div", null, normalizedValue.map((item, index) => /* @__PURE__ */ import_react.default.createElement(
|
|
63
63
|
import_antd.Image,
|
|
64
64
|
{
|
|
65
65
|
key: `${String(item)}-${index}`,
|
|
@@ -72,6 +72,6 @@ var UploadReadPretty = (props) => {
|
|
|
72
72
|
maskClassName: "pisell-upload-read-pretty-mask"
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
));
|
|
75
|
+
)));
|
|
76
76
|
};
|
|
77
77
|
var ReadPretty_default = UploadReadPretty;
|
|
@@ -39,11 +39,11 @@ var import_BaseUpload = __toESM(require("./BaseUpload"));
|
|
|
39
39
|
var import_serve = require("./serve");
|
|
40
40
|
var import_utils2 = require("@pisell/utils");
|
|
41
41
|
var Upload = (props) => {
|
|
42
|
-
const { presetType } = props;
|
|
42
|
+
const { presetType, mediaConfig: propsMediaConfig } = props;
|
|
43
43
|
const { getExtensionsByIds, getMaxSizeByIds } = (0, import_serve.useMediaTypes)();
|
|
44
|
-
const { data: mediaConfig } = (0, import_serve.useMediaConfig)();
|
|
45
|
-
const presetTypeString = getExtensionsByIds(presetType);
|
|
46
|
-
const maxSizeMap = getMaxSizeByIds(presetType);
|
|
44
|
+
const { data: mediaConfig } = (0, import_serve.useMediaConfig)(propsMediaConfig);
|
|
45
|
+
const presetTypeString = getExtensionsByIds(presetType || []);
|
|
46
|
+
const maxSizeMap = getMaxSizeByIds(presetType || []);
|
|
47
47
|
const maxCount = (0, import_react.useMemo)(() => {
|
|
48
48
|
const minArr = [];
|
|
49
49
|
if ((0, import_utils2.isNumber)(mediaConfig == null ? void 0 : mediaConfig.upload_onetime_limit)) {
|
|
@@ -52,14 +52,14 @@ var getMediaTypeList = async () => {
|
|
|
52
52
|
);
|
|
53
53
|
return data;
|
|
54
54
|
};
|
|
55
|
-
var useMediaConfig = () => {
|
|
56
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
55
|
+
var useMediaConfig = (mediaConfig) => {
|
|
56
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
57
57
|
const context = (0, import_useEngineContext.default)();
|
|
58
|
-
const data = (_h = (_g = (_f = (_e = (_d = (_c = (_b = (_a = context.appHelper.utils) == null ? void 0 :
|
|
58
|
+
const data = (_i = (_h = (_g = (_f = (_e = (_d = (_c = (_b = (_a = context.appHelper) == null ? void 0 : _a.utils) == null ? void 0 : _b.getApp) == null ? void 0 : _c.call(_b)) == null ? void 0 : _d.data) == null ? void 0 : _e.store) == null ? void 0 : _f.getStore) == null ? void 0 : _g.call(_f)) == null ? void 0 : _h.getDataByModel) == null ? void 0 : _i.call(_h, "core", "core");
|
|
59
59
|
return {
|
|
60
60
|
data: {
|
|
61
|
-
upload_onetime_limit: data == null ? void 0 : data.media_upload_onetime_limit,
|
|
62
|
-
upload_maxsize: data == null ? void 0 : data.media_upload_maxsize
|
|
61
|
+
upload_onetime_limit: (mediaConfig == null ? void 0 : mediaConfig.upload_onetime_limit) || (data == null ? void 0 : data.media_upload_onetime_limit),
|
|
62
|
+
upload_maxsize: (mediaConfig == null ? void 0 : mediaConfig.upload_maxsize) || (data == null ? void 0 : data.media_upload_maxsize)
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
65
|
};
|
|
@@ -24,4 +24,12 @@ export interface UploadProps {
|
|
|
24
24
|
enableMultilingual?: boolean;
|
|
25
25
|
onChange?: UploadChangeHandler;
|
|
26
26
|
disabled?: boolean;
|
|
27
|
+
mediaUploadUrl?: string;
|
|
28
|
+
getHeaders?: () => Record<string, string>;
|
|
29
|
+
mediaConfig?: {
|
|
30
|
+
data: {
|
|
31
|
+
upload_onetime_limit: number;
|
|
32
|
+
upload_maxsize: number;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
27
35
|
}
|
|
@@ -16,6 +16,17 @@ declare const formFieldMap: {
|
|
|
16
16
|
onChange: (value: string) => void;
|
|
17
17
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
18
18
|
Phone: import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
19
|
+
Mobile: import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
20
|
+
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
21
|
+
onChange: (value: string) => void;
|
|
22
|
+
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
23
|
+
rootDomain: "custom" | "saas" | "xzero";
|
|
24
|
+
customDomain?: string | undefined;
|
|
25
|
+
value?: string | undefined;
|
|
26
|
+
tenantId: string;
|
|
27
|
+
name?: string | undefined;
|
|
28
|
+
fieldKey?: string | undefined;
|
|
29
|
+
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
19
30
|
};
|
|
20
31
|
FormItemRadio: import("react").FC<{}> & {
|
|
21
32
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -35,6 +46,7 @@ declare const formFieldMap: {
|
|
|
35
46
|
FormItemTimePicker: import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
36
47
|
'FormItemInput.JSON': import("react").FC<any>;
|
|
37
48
|
'FormItemInput.Phone': import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
49
|
+
'FormItemInput.Mobile': import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
38
50
|
'FormItemInput.Email': import("react").FC<import("antd").InputProps & {
|
|
39
51
|
onChange: (value: string) => void;
|
|
40
52
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
@@ -46,13 +58,13 @@ declare const formFieldMap: {
|
|
|
46
58
|
FormItemUpload: import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
47
59
|
FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
48
60
|
};
|
|
49
|
-
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> |
|
|
61
|
+
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
|
|
50
62
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
51
63
|
} & {
|
|
52
64
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
53
65
|
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
|
|
54
66
|
onChange: (value: string) => void;
|
|
55
|
-
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
67
|
+
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
56
68
|
JSON: import("react").FC<any>;
|
|
57
69
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
58
70
|
TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
@@ -61,6 +73,17 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
61
73
|
onChange: (value: string) => void;
|
|
62
74
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
63
75
|
Phone: import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
76
|
+
Mobile: import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
77
|
+
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
78
|
+
onChange: (value: string) => void;
|
|
79
|
+
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
80
|
+
rootDomain: "custom" | "saas" | "xzero";
|
|
81
|
+
customDomain?: string | undefined;
|
|
82
|
+
value?: string | undefined;
|
|
83
|
+
tenantId: string;
|
|
84
|
+
name?: string | undefined;
|
|
85
|
+
fieldKey?: string | undefined;
|
|
86
|
+
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
64
87
|
}) | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
|
|
65
88
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
66
89
|
} & {
|
|
@@ -56,6 +56,7 @@ var formFieldMap = {
|
|
|
56
56
|
FormItemTimePicker: import_TimePicker.default,
|
|
57
57
|
"FormItemInput.JSON": import_Input.default.JSON,
|
|
58
58
|
"FormItemInput.Phone": import_Input.default.Phone,
|
|
59
|
+
"FormItemInput.Mobile": import_Input.default.Mobile,
|
|
59
60
|
"FormItemInput.Email": import_Input.default.Email,
|
|
60
61
|
"FormItemInput.URL": import_Input.default.URL,
|
|
61
62
|
"FormItemInput.Password": import_Input.default.Password,
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export interface ActionsContextType {
|
|
3
|
-
|
|
3
|
+
visible?: boolean;
|
|
4
|
+
setVisible?: (visible: boolean) => void;
|
|
5
|
+
refreshTableData?: () => void;
|
|
6
|
+
onClose?: () => void;
|
|
7
|
+
beforeClose?: () => boolean | Promise<boolean>;
|
|
8
|
+
setBeforeClose?: (beforeClose: () => boolean | Promise<boolean>) => void;
|
|
4
9
|
}
|
|
5
10
|
declare const ActionsContext: import("react").Context<ActionsContextType>;
|
|
6
11
|
export default ActionsContext;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ActionsContextType } from './ActionsContext';
|
|
3
|
+
interface ActionsProviderProps extends ActionsContextType {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
3
6
|
/**
|
|
4
7
|
* 自定义请求的provider
|
|
5
8
|
* @param props
|
|
6
9
|
* @constructor
|
|
7
10
|
*/
|
|
8
|
-
declare const ActionsProvider: React.FC<
|
|
11
|
+
declare const ActionsProvider: React.FC<ActionsProviderProps>;
|
|
9
12
|
export default ActionsProvider;
|
|
@@ -76,7 +76,7 @@ var Form = class extends import_react.Component {
|
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
78
|
Form.Item = (props) => {
|
|
79
|
-
const { name, rules: propsRules, requiredobj, typeobj, patternobj, lenobj, validator } = props;
|
|
79
|
+
const { name, rules: propsRules, requiredobj, typeobj, patternobj, subdomainobj, phoneobj, mobileobj, lenobj, validator } = props;
|
|
80
80
|
const rules = (0, import_utils.isArr)(propsRules) ? propsRules : [];
|
|
81
81
|
if (requiredobj && requiredobj.required) {
|
|
82
82
|
rules.push(requiredobj);
|
|
@@ -87,6 +87,15 @@ Form.Item = (props) => {
|
|
|
87
87
|
if (patternobj && patternobj.pattern) {
|
|
88
88
|
rules.push(patternobj);
|
|
89
89
|
}
|
|
90
|
+
if (subdomainobj && subdomainobj.subdomain) {
|
|
91
|
+
rules.push(subdomainobj);
|
|
92
|
+
}
|
|
93
|
+
if (phoneobj && phoneobj.phone) {
|
|
94
|
+
rules.push(phoneobj);
|
|
95
|
+
}
|
|
96
|
+
if (mobileobj && mobileobj.mobile) {
|
|
97
|
+
rules.push(mobileobj);
|
|
98
|
+
}
|
|
90
99
|
if (lenobj && (lenobj.max || lenobj.min)) {
|
|
91
100
|
rules.push(lenobj);
|
|
92
101
|
}
|
|
@@ -35,7 +35,7 @@ module.exports = __toCommonJS(iconfont_exports);
|
|
|
35
35
|
var import_icons = require("@ant-design/icons");
|
|
36
36
|
var import_react = __toESM(require("react"));
|
|
37
37
|
var MyIcon = (0, import_icons.createFromIconfontCN)({
|
|
38
|
-
scriptUrl: "https://static.pisellcdn.com/
|
|
38
|
+
scriptUrl: "https://static.pisellcdn.com/pisell2/iconfont_1.0.js"
|
|
39
39
|
// 在 iconfont.cn 上生成
|
|
40
40
|
});
|
|
41
41
|
var IconFont = (props) => {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
import './Action.less';
|
|
3
|
+
export interface Props extends React.HTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
active?: {
|
|
5
|
+
fill: string;
|
|
6
|
+
background: string;
|
|
7
|
+
};
|
|
8
|
+
cursor?: CSSProperties['cursor'];
|
|
9
|
+
}
|
|
10
|
+
export declare const Action: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,60 @@
|
|
|
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/pisellDraggable/components/Action/Action.tsx
|
|
30
|
+
var Action_exports = {};
|
|
31
|
+
__export(Action_exports, {
|
|
32
|
+
Action: () => Action
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Action_exports);
|
|
35
|
+
var import_classnames = __toESM(require("classnames"));
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_Action = require("./Action.less");
|
|
38
|
+
var Action = (0, import_react.forwardRef)(
|
|
39
|
+
({ active, className, cursor, style, ...props }, ref) => {
|
|
40
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
41
|
+
"button",
|
|
42
|
+
{
|
|
43
|
+
ref,
|
|
44
|
+
...props,
|
|
45
|
+
className: (0, import_classnames.default)("Action", className),
|
|
46
|
+
tabIndex: 0,
|
|
47
|
+
style: {
|
|
48
|
+
...style,
|
|
49
|
+
cursor,
|
|
50
|
+
"--fill": active == null ? void 0 : active.fill,
|
|
51
|
+
"--background": active == null ? void 0 : active.background
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
58
|
+
0 && (module.exports = {
|
|
59
|
+
Action
|
|
60
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
@focused-outline-color: #4c9ffe;
|
|
2
|
+
|
|
3
|
+
.Action {
|
|
4
|
+
display: flex;
|
|
5
|
+
width: 12px;
|
|
6
|
+
padding: 15px;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
flex: 0 0 auto;
|
|
10
|
+
touch-action: none;
|
|
11
|
+
cursor: var(--cursor, pointer);
|
|
12
|
+
border-radius: 5px;
|
|
13
|
+
border: none;
|
|
14
|
+
outline: none;
|
|
15
|
+
appearance: none;
|
|
16
|
+
background-color: transparent;
|
|
17
|
+
-webkit-tap-highlight-color: transparent;
|
|
18
|
+
|
|
19
|
+
@media (hover: hover) {
|
|
20
|
+
&:hover {
|
|
21
|
+
background-color: var(--action-background, rgba(0, 0, 0, 0.05));
|
|
22
|
+
|
|
23
|
+
svg {
|
|
24
|
+
fill: #6f7b88;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
svg {
|
|
30
|
+
flex: 0 0 auto;
|
|
31
|
+
margin: auto;
|
|
32
|
+
height: 100%;
|
|
33
|
+
overflow: visible;
|
|
34
|
+
fill: #919eab;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&:active {
|
|
38
|
+
background-color: var(--background, rgba(0, 0, 0, 0.05));
|
|
39
|
+
|
|
40
|
+
svg {
|
|
41
|
+
fill: var(--fill, #788491);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&:focus-visible {
|
|
46
|
+
outline: none;
|
|
47
|
+
box-shadow: 0 0 0 2px rgba(255, 255, 255, 0),
|
|
48
|
+
0 0px 0px 2px @focused-outline-color;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/pisellDraggable/components/Action/index.ts
|
|
20
|
+
var Action_exports = {};
|
|
21
|
+
__export(Action_exports, {
|
|
22
|
+
Action: () => import_Action.Action
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(Action_exports);
|
|
25
|
+
var import_Action = require("./Action");
|
|
26
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
27
|
+
0 && (module.exports = {
|
|
28
|
+
Action
|
|
29
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
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/pisellDraggable/components/Handle/Handle.tsx
|
|
30
|
+
var Handle_exports = {};
|
|
31
|
+
__export(Handle_exports, {
|
|
32
|
+
Handle: () => Handle
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Handle_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_Action = require("../Action");
|
|
37
|
+
var Handle = (0, import_react.forwardRef)(
|
|
38
|
+
(props, ref) => {
|
|
39
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
40
|
+
import_Action.Action,
|
|
41
|
+
{
|
|
42
|
+
ref,
|
|
43
|
+
cursor: "grab",
|
|
44
|
+
"data-cypress": "draggable-handle",
|
|
45
|
+
...props
|
|
46
|
+
},
|
|
47
|
+
/* @__PURE__ */ import_react.default.createElement("svg", { viewBox: "0 0 20 20", width: "12" }, /* @__PURE__ */ import_react.default.createElement("path", { d: "M7 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 2zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 14zm6-8a2 2 0 1 0-.001-4.001A2 2 0 0 0 13 6zm0 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 14z" }))
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
52
|
+
0 && (module.exports = {
|
|
53
|
+
Handle
|
|
54
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Handle } from './Handle';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/pisellDraggable/components/Handle/index.ts
|
|
20
|
+
var Handle_exports = {};
|
|
21
|
+
__export(Handle_exports, {
|
|
22
|
+
Handle: () => import_Handle.Handle
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(Handle_exports);
|
|
25
|
+
var import_Handle = require("./Handle");
|
|
26
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
27
|
+
0 && (module.exports = {
|
|
28
|
+
Handle
|
|
29
|
+
});
|