@tachybase/client 0.23.48 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/api-client/APIClient.d.ts +5 -2
- package/es/api-client/APIClient.mjs +93 -49
- package/es/api-client/hooks/useRequest.d.ts +2 -0
- package/es/application/Application.d.ts +6 -0
- package/es/application/Application.mjs +19 -0
- package/es/application/CustomRouterContextProvider.d.ts +54 -0
- package/es/application/CustomRouterContextProvider.mjs +209 -0
- package/es/application/RouterManager.d.ts +8 -3
- package/es/application/RouterManager.mjs +48 -15
- package/es/application/hooks/index.d.ts +1 -0
- package/es/application/hooks/index.mjs +1 -0
- package/es/application/hooks/useGlobalVariable.d.ts +1 -0
- package/es/application/hooks/useGlobalVariable.mjs +18 -0
- package/es/application/schema-initializer/context/index.d.ts +1 -1
- package/es/application/schema-settings/hooks/index.d.ts +1 -1
- package/es/application/schema-settings/hooks/index.mjs +6 -8
- package/es/block-provider/hooks/index.d.ts +2 -0
- package/es/block-provider/hooks/index.mjs +29 -22
- package/es/built-in/context-menu/ContextMenu.provider.mjs +6 -6
- package/es/built-in/context-menu/ContextMenuItemsProps.d.ts +4 -4
- package/es/built-in/context-menu/ContextMenuItemsProps.mjs +6 -6
- package/es/built-in/context-menu/index.mjs +1 -1
- package/es/built-in/context-menu/useContextMenu.d.ts +2 -2
- package/es/built-in/index.mjs +8 -0
- package/es/built-in/locale/LocalePlugin.mjs +5 -1
- package/es/built-in/page-style/PageStyle.provider.mjs +2 -2
- package/es/built-in/system-settings/SystemSettingsProvider.d.ts +2 -3
- package/es/built-in/system-settings/SystemSettingsProvider.mjs +4 -3
- package/es/built-in/system-settings/SystemSettingsShortcut.mjs +11 -8
- package/es/collection-manager/Configuration/AddCollectionAction.mjs +12 -2
- package/es/collection-manager/Configuration/ImportXlsx/ImportXlsxMetaAction.d.ts +2 -0
- package/es/collection-manager/Configuration/ImportXlsx/ImportXlsxMetaAction.mjs +255 -0
- package/es/collection-manager/Configuration/ImportXlsx/XlsxCollectionSchema.d.ts +89 -0
- package/es/collection-manager/Configuration/ImportXlsx/XlsxCollectionSchema.mjs +96 -0
- package/es/collection-manager/Configuration/ImportXlsx/XlsxEditFieldAction.d.ts +3 -0
- package/es/collection-manager/Configuration/ImportXlsx/XlsxEditFieldAction.mjs +47 -0
- package/es/collection-manager/Configuration/ImportXlsx/setUpdateXlsxCollectionField.d.ts +3 -0
- package/es/collection-manager/Configuration/ImportXlsx/setUpdateXlsxCollectionField.mjs +44 -0
- package/es/collection-manager/Configuration/ImportXlsx/xlsxFieldsConfigure.d.ts +1 -0
- package/es/collection-manager/Configuration/ImportXlsx/xlsxFieldsConfigure.mjs +380 -0
- package/es/collection-manager/Configuration/ImportXlsx/xlsxFormValueContextProvider.d.ts +8 -0
- package/es/collection-manager/Configuration/ImportXlsx/xlsxFormValueContextProvider.mjs +4 -0
- package/es/collection-manager/Configuration/ImportXlsx/xlsxImportAction.d.ts +1 -0
- package/es/collection-manager/Configuration/ImportXlsx/xlsxImportAction.mjs +187 -0
- package/es/collection-manager/Configuration/ImportXlsx/xlsxPreviewTable.d.ts +1 -0
- package/es/collection-manager/Configuration/ImportXlsx/xlsxPreviewTable.mjs +30 -0
- package/es/collection-manager/collectionPlugin.mjs +3 -1
- package/es/collection-manager/templates/import.mjs +1 -1
- package/es/collection-manager/templates/sql.d.ts +1 -1
- package/es/collection-manager/templates/view.d.ts +1 -1
- package/es/collection-manager/templates/xlsx.d.ts +11 -0
- package/es/collection-manager/templates/xlsx.mjs +19 -0
- package/es/data-source/collection-field-interface/CollectionFieldInterface.d.ts +1 -0
- package/es/data-source/collection-field-interface/CollectionFieldInterface.mjs +18 -0
- package/es/data-source/collection-field-interface/CollectionFieldInterfaceManager.d.ts +8 -1
- package/es/data-source/collection-field-interface/CollectionFieldInterfaceManager.mjs +20 -0
- package/es/data-source/commonsSettingsItem/fieldComponent.mjs +3 -1
- package/es/data-source/data-source/DataSource.d.ts +1 -1
- package/es/filter-provider/utils.mjs +6 -0
- package/es/i18n/i18n.mjs +7 -12
- package/es/modules/actions/delete/deleteActionSettings.mjs +10 -0
- package/es/modules/blocks/data-blocks/form/FilterItemCustomSettings.mjs +1 -1
- package/es/modules/blocks/data-blocks/form/fieldSettingsFormItem.mjs +9 -4
- package/es/modules/blocks/data-blocks/table/hooks/useTableBlockProps.mjs +6 -4
- package/es/modules/blocks/data-blocks/table/tableBlockSettings.mjs +4 -0
- package/es/modules/blocks/data-blocks/table/tableColumnSettings.mjs +44 -0
- package/es/modules/blocks/filter-blocks/collapse/filterCollapseItemFieldSettings.mjs +4 -0
- package/es/modules/blocks/filter-blocks/form/filterFormItemFieldSettings.mjs +9 -0
- package/es/modules/fields/component/Radio/radioComponentFieldSettings.mjs +0 -4
- package/es/modules/fields/component/SubTable/secondLevelSelect.d.ts +11 -0
- package/es/modules/fields/component/SubTable/secondLevelSelect.mjs +102 -0
- package/es/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.d.ts +79 -41
- package/es/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.mjs +103 -100
- package/es/powered-by/index.mjs +4 -7
- package/es/schema-component/antd/action/Action.Designer.mjs +43 -5
- package/es/schema-component/antd/action/Action.Modal.mjs +19 -31
- package/es/schema-component/antd/action/Action.Modal.style.d.ts +4 -0
- package/es/schema-component/antd/action/Action.Modal.style.mjs +35 -0
- package/es/schema-component/antd/action/Action.mjs +1 -3
- package/es/schema-component/antd/action/utils.d.ts +1 -1
- package/es/schema-component/antd/action/utils.mjs +70 -70
- package/es/schema-component/antd/association-field/SubTabs/InternalCollapse.mjs +2 -1
- package/es/schema-component/antd/checkbox/Checkbox.mjs +9 -2
- package/es/schema-component/antd/index.d.ts +1 -0
- package/es/schema-component/antd/index.mjs +1 -0
- package/es/schema-component/antd/media-card/MediaCard.d.ts +11 -0
- package/es/schema-component/antd/media-card/MediaCard.mjs +35 -0
- package/es/schema-component/antd/media-card/index.d.ts +1 -0
- package/es/schema-component/antd/media-card/index.mjs +1 -0
- package/es/schema-component/antd/media-card/style.d.ts +3 -0
- package/es/schema-component/antd/media-card/style.mjs +25 -0
- package/es/schema-component/antd/page/Page.d.ts +1 -5
- package/es/schema-component/antd/page/Page.mjs +235 -144
- package/es/schema-component/antd/page/Page.style.d.ts +5 -0
- package/es/schema-component/antd/page/Page.style.mjs +45 -0
- package/es/schema-component/antd/page/PageDesigner.d.ts +3 -0
- package/es/schema-component/antd/page/PageDesigner.mjs +28 -0
- package/es/schema-component/antd/page/PageTabDesigner.d.ts +0 -3
- package/es/schema-component/antd/page/PageTabDesigner.mjs +3 -50
- package/es/schema-component/antd/page/style.d.ts +1 -1
- package/es/schema-component/antd/page/style.mjs +3 -13
- package/es/schema-component/antd/password/Password.d.ts +1 -1
- package/es/schema-component/antd/password/utils.d.ts +1 -1
- package/es/schema-component/antd/scroll-area/ScrollArea.d.ts +1 -1
- package/es/schema-component/antd/scroll-area/ScrollArea.mjs +2 -1
- package/es/schema-component/antd/variable/TextArea.mjs +1 -1
- package/es/schema-component/antd/variable/TextAreaWithGlobalScope.d.ts +13 -0
- package/es/schema-component/antd/variable/TextAreaWithGlobalScope.mjs +59 -0
- package/es/schema-component/antd/variable/index.d.ts +1 -0
- package/es/schema-component/antd/variable/index.mjs +3 -0
- package/es/schema-component/common/dnd-context/index.mjs +1 -7
- package/es/schema-component/common/sortable-item/DragHandlePageTab.d.ts +1 -0
- package/es/schema-component/common/sortable-item/DragHandlePageTab.mjs +71 -0
- package/es/schema-component/common/sortable-item/DragHandlePageTab.style.d.ts +3 -0
- package/es/schema-component/common/sortable-item/DragHandlePageTab.style.mjs +25 -0
- package/es/schema-items/GeneralSettings.mjs +5 -0
- package/es/schema-settings/EditCustomDefaultValue.mjs +1 -1
- package/es/schema-settings/SchemaSettings.mjs +1 -1
- package/es/schema-settings/SchemaSettingsDefaultValue.mjs +2 -0
- package/es/schema-settings/utils/createModalSettingsItem.d.ts +26 -0
- package/es/schema-settings/utils/createModalSettingsItem.mjs +46 -0
- package/es/schema-settings/utils/createSelectSettingsItem.d.ts +25 -0
- package/es/schema-settings/utils/createSelectSettingsItem.mjs +40 -0
- package/es/schema-settings/utils/createSwitchSettingsItem.d.ts +21 -0
- package/es/schema-settings/utils/createSwitchSettingsItem.mjs +38 -0
- package/es/schema-settings/utils/createTextSettingsItem.d.ts +9 -0
- package/es/schema-settings/utils/createTextSettingsItem.mjs +21 -0
- package/es/schema-settings/utils/index.d.ts +4 -0
- package/es/schema-settings/utils/index.mjs +4 -0
- package/es/schema-settings/utils/util.d.ts +12 -0
- package/es/schema-settings/utils/util.mjs +24 -0
- package/es/user/CurrentUserProvider.mjs +6 -3
- package/lib/api-client/APIClient.js +93 -49
- package/lib/application/Application.js +19 -0
- package/lib/application/CustomRouterContextProvider.js +276 -0
- package/lib/application/RouterManager.js +49 -15
- package/lib/application/hooks/index.js +9 -0
- package/lib/application/hooks/useGlobalVariable.js +52 -0
- package/lib/application/schema-initializer/hooks/index.js +2 -2
- package/lib/application/schema-settings/hooks/index.js +6 -8
- package/lib/block-provider/hooks/index.js +80 -59
- package/lib/built-in/context-menu/ContextMenu.provider.js +6 -6
- package/lib/built-in/context-menu/ContextMenuItemsProps.js +6 -6
- package/lib/built-in/context-menu/index.js +1 -1
- package/lib/built-in/index.js +8 -0
- package/lib/built-in/locale/LocalePlugin.js +5 -1
- package/lib/built-in/page-style/PageStyle.provider.js +2 -2
- package/lib/built-in/system-settings/SystemSettingsProvider.js +4 -3
- package/lib/built-in/system-settings/SystemSettingsShortcut.js +11 -8
- package/lib/collection-manager/Configuration/AddCollectionAction.js +12 -2
- package/lib/collection-manager/Configuration/ImportXlsx/ImportXlsxMetaAction.js +304 -0
- package/lib/collection-manager/Configuration/ImportXlsx/XlsxCollectionSchema.js +130 -0
- package/lib/collection-manager/Configuration/ImportXlsx/XlsxEditFieldAction.js +81 -0
- package/lib/collection-manager/Configuration/ImportXlsx/setUpdateXlsxCollectionField.js +78 -0
- package/lib/collection-manager/Configuration/ImportXlsx/xlsxFieldsConfigure.js +414 -0
- package/lib/collection-manager/Configuration/ImportXlsx/xlsxFormValueContextProvider.js +53 -0
- package/lib/collection-manager/Configuration/ImportXlsx/xlsxImportAction.js +235 -0
- package/lib/collection-manager/Configuration/ImportXlsx/xlsxPreviewTable.js +64 -0
- package/lib/collection-manager/collectionPlugin.js +3 -1
- package/lib/collection-manager/templates/import.js +1 -1
- package/lib/collection-manager/templates/xlsx.js +53 -0
- package/lib/data-source/collection-field-interface/CollectionFieldInterface.js +18 -0
- package/lib/data-source/collection-field-interface/CollectionFieldInterfaceManager.js +20 -0
- package/lib/data-source/commonsSettingsItem/fieldComponent.js +3 -1
- package/lib/filter-provider/utils.js +6 -0
- package/lib/i18n/i18n.js +7 -12
- package/lib/locale/en_US.js +1 -0
- package/lib/locale/zh-CN.js +14 -2
- package/lib/modules/actions/delete/deleteActionSettings.js +10 -0
- package/lib/modules/blocks/data-blocks/form/FilterItemCustomSettings.js +1 -1
- package/lib/modules/blocks/data-blocks/form/fieldSettingsFormItem.js +9 -4
- package/lib/modules/blocks/data-blocks/table/hooks/useTableBlockProps.js +6 -4
- package/lib/modules/blocks/data-blocks/table/tableBlockSettings.js +4 -0
- package/lib/modules/blocks/data-blocks/table/tableColumnSettings.js +44 -0
- package/lib/modules/blocks/filter-blocks/collapse/filterCollapseItemFieldSettings.js +4 -0
- package/lib/modules/blocks/filter-blocks/form/filterFormItemFieldSettings.js +9 -0
- package/lib/modules/fields/component/Radio/radioComponentFieldSettings.js +0 -4
- package/lib/modules/fields/component/SubTable/secondLevelSelect.js +136 -0
- package/lib/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.js +104 -103
- package/lib/powered-by/index.js +4 -7
- package/lib/schema-component/antd/action/Action.Designer.js +43 -5
- package/lib/schema-component/antd/action/Action.Modal.js +19 -31
- package/lib/schema-component/antd/action/Action.Modal.style.js +69 -0
- package/lib/schema-component/antd/action/Action.js +1 -3
- package/lib/schema-component/antd/action/utils.js +70 -70
- package/lib/schema-component/antd/association-field/SubTabs/InternalCollapse.js +2 -1
- package/lib/schema-component/antd/checkbox/Checkbox.js +9 -2
- package/lib/schema-component/antd/index.js +18 -4
- package/lib/schema-component/antd/media-card/MediaCard.js +69 -0
- package/lib/schema-component/antd/media-card/index.js +65 -0
- package/lib/schema-component/antd/media-card/style.js +59 -0
- package/lib/schema-component/antd/page/Page.js +235 -144
- package/lib/schema-component/antd/page/Page.style.js +79 -0
- package/lib/schema-component/antd/page/PageDesigner.js +62 -0
- package/lib/schema-component/antd/page/PageTabDesigner.js +2 -50
- package/lib/schema-component/antd/page/style.js +3 -13
- package/lib/schema-component/antd/scroll-area/ScrollArea.js +2 -1
- package/lib/schema-component/antd/variable/TextArea.js +1 -1
- package/lib/schema-component/antd/variable/TextAreaWithGlobalScope.js +94 -0
- package/lib/schema-component/antd/variable/index.js +13 -1
- package/lib/schema-component/common/dnd-context/index.js +1 -7
- package/lib/schema-component/common/sortable-item/DragHandlePageTab.js +105 -0
- package/lib/schema-component/common/sortable-item/DragHandlePageTab.style.js +59 -0
- package/lib/schema-items/GeneralSettings.js +5 -0
- package/lib/schema-settings/EditCustomDefaultValue.js +1 -1
- package/lib/schema-settings/SchemaSettings.js +1 -1
- package/lib/schema-settings/SchemaSettingsDefaultValue.js +2 -0
- package/lib/schema-settings/utils/createModalSettingsItem.js +94 -0
- package/lib/schema-settings/utils/createSelectSettingsItem.js +88 -0
- package/lib/schema-settings/utils/createSwitchSettingsItem.js +86 -0
- package/lib/schema-settings/utils/createTextSettingsItem.js +55 -0
- package/lib/schema-settings/utils/index.js +92 -0
- package/lib/schema-settings/utils/util.js +74 -0
- package/lib/user/CurrentUserProvider.js +6 -3
- package/package.json +7 -7
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = function(exports1, definition) {
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = function(obj, prop) {
|
|
13
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
(()=>{
|
|
17
|
+
__webpack_require__.r = function(exports1) {
|
|
18
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
19
|
+
value: 'Module'
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
22
|
+
value: true
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
})();
|
|
26
|
+
var __webpack_exports__ = {};
|
|
27
|
+
__webpack_require__.r(__webpack_exports__);
|
|
28
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
29
|
+
PageDesigner: ()=>PageDesigner
|
|
30
|
+
});
|
|
31
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
32
|
+
const schema_namespaceObject = require("@tachybase/schema");
|
|
33
|
+
const external_antd_namespaceObject = require("antd");
|
|
34
|
+
const external_index_js_namespaceObject = require("../../index.js");
|
|
35
|
+
const index_js_namespaceObject = require("../../../application/schema-settings/hooks/index.js");
|
|
36
|
+
const context_index_js_namespaceObject = require("../../../application/schema-toolbar/context/index.js");
|
|
37
|
+
const PageDesigner = (param)=>{
|
|
38
|
+
let { title } = param;
|
|
39
|
+
const { designable } = (0, external_index_js_namespaceObject.useDesignable)();
|
|
40
|
+
const fieldSchema = (0, schema_namespaceObject.useFieldSchema)();
|
|
41
|
+
const { render } = (0, index_js_namespaceObject.useSchemaSettingsRender)(fieldSchema['x-settings'] || 'PageSettings', fieldSchema['x-settings-props']);
|
|
42
|
+
if (!designable) return null;
|
|
43
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(context_index_js_namespaceObject.SchemaToolbarProvider, {
|
|
44
|
+
title: title,
|
|
45
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
46
|
+
className: 'general-schema-designer',
|
|
47
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
48
|
+
className: 'general-schema-designer-icons',
|
|
49
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Space, {
|
|
50
|
+
size: 2,
|
|
51
|
+
align: 'center',
|
|
52
|
+
children: render()
|
|
53
|
+
})
|
|
54
|
+
})
|
|
55
|
+
})
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
var __webpack_export_target__ = exports;
|
|
59
|
+
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
60
|
+
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
61
|
+
value: true
|
|
62
|
+
});
|
|
@@ -26,70 +26,22 @@ var __webpack_require__ = {};
|
|
|
26
26
|
var __webpack_exports__ = {};
|
|
27
27
|
__webpack_require__.r(__webpack_exports__);
|
|
28
28
|
__webpack_require__.d(__webpack_exports__, {
|
|
29
|
-
PageDesigner: ()=>PageDesigner,
|
|
30
29
|
PageTabDesigner: ()=>PageTabDesigner
|
|
31
30
|
});
|
|
32
31
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
33
|
-
require("react");
|
|
34
32
|
const schema_namespaceObject = require("@tachybase/schema");
|
|
35
|
-
const icons_namespaceObject = require("@ant-design/icons");
|
|
36
|
-
const external_antd_namespaceObject = require("antd");
|
|
37
33
|
const external_index_js_namespaceObject = require("../../index.js");
|
|
38
34
|
const index_js_namespaceObject = require("../../../application/schema-settings/hooks/index.js");
|
|
39
35
|
const context_index_js_namespaceObject = require("../../../application/schema-toolbar/context/index.js");
|
|
40
|
-
const useGetAriaLabelOfDesigner_js_namespaceObject = require("../../../schema-settings/hooks/useGetAriaLabelOfDesigner.js");
|
|
41
|
-
const PageDesigner = (param)=>{
|
|
42
|
-
let { title } = param;
|
|
43
|
-
const { designable } = (0, external_index_js_namespaceObject.useDesignable)();
|
|
44
|
-
const fieldSchema = (0, schema_namespaceObject.useFieldSchema)();
|
|
45
|
-
const { render } = (0, index_js_namespaceObject.useSchemaSettingsRender)(fieldSchema['x-settings'] || 'PageSettings', fieldSchema['x-settings-props']);
|
|
46
|
-
if (!designable) return null;
|
|
47
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(context_index_js_namespaceObject.SchemaToolbarProvider, {
|
|
48
|
-
title: title,
|
|
49
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
50
|
-
className: 'general-schema-designer',
|
|
51
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
52
|
-
className: 'general-schema-designer-icons',
|
|
53
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Space, {
|
|
54
|
-
size: 2,
|
|
55
|
-
align: 'center',
|
|
56
|
-
children: render()
|
|
57
|
-
})
|
|
58
|
-
})
|
|
59
|
-
})
|
|
60
|
-
});
|
|
61
|
-
};
|
|
62
36
|
const PageTabDesigner = (param)=>{
|
|
63
37
|
let { schema } = param;
|
|
64
38
|
const { designable } = (0, external_index_js_namespaceObject.useDesignable)();
|
|
65
|
-
const { getAriaLabel } = (0, useGetAriaLabelOfDesigner_js_namespaceObject.useGetAriaLabelOfDesigner)();
|
|
66
39
|
const fieldSchema = (0, schema_namespaceObject.useFieldSchema)();
|
|
67
|
-
const { render } = (0, index_js_namespaceObject.useSchemaSettingsRender)(fieldSchema['x-settings'] || 'PageTabSettings', fieldSchema['x-settings-props']);
|
|
40
|
+
const { render: renderDesigner } = (0, index_js_namespaceObject.useSchemaSettingsRender)(fieldSchema['x-settings'] || 'PageTabSettings', fieldSchema['x-settings-props']);
|
|
68
41
|
if (!designable) return null;
|
|
69
42
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(context_index_js_namespaceObject.SchemaToolbarProvider, {
|
|
70
43
|
schema: schema,
|
|
71
|
-
children:
|
|
72
|
-
className: 'general-schema-designer',
|
|
73
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
74
|
-
className: 'general-schema-designer-icons',
|
|
75
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_antd_namespaceObject.Space, {
|
|
76
|
-
size: 3,
|
|
77
|
-
align: 'center',
|
|
78
|
-
children: [
|
|
79
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_index_js_namespaceObject.DragHandler, {
|
|
80
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.DragOutlined, {
|
|
81
|
-
style: {
|
|
82
|
-
marginRight: 0
|
|
83
|
-
},
|
|
84
|
-
role: "button",
|
|
85
|
-
"aria-label": getAriaLabel('drag-handler', 'tab')
|
|
86
|
-
})
|
|
87
|
-
}),
|
|
88
|
-
render()
|
|
89
|
-
]
|
|
90
|
-
})
|
|
91
|
-
})
|
|
92
|
-
})
|
|
44
|
+
children: renderDesigner()
|
|
93
45
|
});
|
|
94
46
|
};
|
|
95
47
|
var __webpack_export_target__ = exports;
|
|
@@ -26,10 +26,10 @@ var __webpack_require__ = {};
|
|
|
26
26
|
var __webpack_exports__ = {};
|
|
27
27
|
__webpack_require__.r(__webpack_exports__);
|
|
28
28
|
__webpack_require__.d(__webpack_exports__, {
|
|
29
|
-
|
|
29
|
+
getStyles: ()=>getStyles
|
|
30
30
|
});
|
|
31
31
|
const index_js_namespaceObject = require("../__builtins__/index.js");
|
|
32
|
-
const
|
|
32
|
+
const getStyles = (0, index_js_namespaceObject.genStyleHook)('tb-page', (token)=>{
|
|
33
33
|
const { componentCls } = token;
|
|
34
34
|
return {
|
|
35
35
|
[componentCls]: {
|
|
@@ -76,8 +76,7 @@ const useStyles = (0, index_js_namespaceObject.genStyleHook)('tb-page', (token)=
|
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
78
|
'.tb-page-header-wrapper': {
|
|
79
|
-
zIndex: 10
|
|
80
|
-
boxShadow: '1px 1px 10px 1px rgba(0, 0, 0, 0.1)'
|
|
79
|
+
zIndex: 10
|
|
81
80
|
},
|
|
82
81
|
'.pageHeaderCss': {
|
|
83
82
|
backgroundColor: token.colorBgContainer,
|
|
@@ -101,10 +100,6 @@ const useStyles = (0, index_js_namespaceObject.genStyleHook)('tb-page', (token)=
|
|
|
101
100
|
fontSize: 0,
|
|
102
101
|
height: 0
|
|
103
102
|
},
|
|
104
|
-
'.addTabBtn': {
|
|
105
|
-
borderColor: 'var(--colorSettings)',
|
|
106
|
-
color: 'var(--colorSettings)'
|
|
107
|
-
},
|
|
108
103
|
'.designerCss': {
|
|
109
104
|
position: 'relative',
|
|
110
105
|
'&:hover': {
|
|
@@ -161,11 +156,6 @@ const useStyles = (0, index_js_namespaceObject.genStyleHook)('tb-page', (token)=
|
|
|
161
156
|
paddingBottom: 0,
|
|
162
157
|
overflowX: 'hidden',
|
|
163
158
|
overflowY: 'scroll'
|
|
164
|
-
},
|
|
165
|
-
'.tb-tabs-wrapper': {
|
|
166
|
-
display: 'flex',
|
|
167
|
-
flexDirection: 'row',
|
|
168
|
-
justifyContent: 'flex-end'
|
|
169
159
|
}
|
|
170
160
|
}
|
|
171
161
|
};
|
|
@@ -33,7 +33,7 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
|
33
33
|
const external_react_namespaceObject = require("react");
|
|
34
34
|
const external_index_js_namespaceObject = require("../../../index.js");
|
|
35
35
|
const useJoystick_js_namespaceObject = require("../../../built-in/scroll-assistant/useJoystick.js");
|
|
36
|
-
const ScrollArea = ()=>{
|
|
36
|
+
const ScrollArea = (props)=>{
|
|
37
37
|
const ref = (0, external_react_namespaceObject.useRef)(null);
|
|
38
38
|
const { t } = (0, external_index_js_namespaceObject.useTranslation)();
|
|
39
39
|
(0, useJoystick_js_namespaceObject.useJoystick)(ref);
|
|
@@ -50,6 +50,7 @@ const ScrollArea = ()=>{
|
|
|
50
50
|
cursor: 'pointer',
|
|
51
51
|
userSelect: 'none'
|
|
52
52
|
},
|
|
53
|
+
...props,
|
|
53
54
|
children: t('Horizontal scrolling area')
|
|
54
55
|
});
|
|
55
56
|
};
|
|
@@ -187,7 +187,7 @@ function getCurrentRange(element) {
|
|
|
187
187
|
function TextArea(props) {
|
|
188
188
|
const { value: propsValue, scope, onChange, multiline = true, changeOnSelect } = props;
|
|
189
189
|
const fieldSchema = (0, schema_namespaceObject.useFieldSchema)();
|
|
190
|
-
const value = propsValue || fieldSchema.default || '';
|
|
190
|
+
const value = propsValue || (null == fieldSchema ? void 0 : fieldSchema.default) || '';
|
|
191
191
|
const { styles } = (0, external_style_js_namespaceObject.useStyles)({
|
|
192
192
|
multiline
|
|
193
193
|
});
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = function(exports1, definition) {
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = function(obj, prop) {
|
|
13
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
(()=>{
|
|
17
|
+
__webpack_require__.r = function(exports1) {
|
|
18
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
19
|
+
value: 'Module'
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
22
|
+
value: true
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
})();
|
|
26
|
+
var __webpack_exports__ = {};
|
|
27
|
+
__webpack_require__.r(__webpack_exports__);
|
|
28
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
29
|
+
useEnvironmentVariableOptions: ()=>useEnvironmentVariableOptions,
|
|
30
|
+
TextAreaWithGlobalScope: ()=>TextAreaWithGlobalScope
|
|
31
|
+
});
|
|
32
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
33
|
+
const external_react_namespaceObject = require("react");
|
|
34
|
+
const schema_namespaceObject = require("@tachybase/schema");
|
|
35
|
+
const useGlobalVariable_js_namespaceObject = require("../../../application/hooks/useGlobalVariable.js");
|
|
36
|
+
const index_js_namespaceObject = require("../input/index.js");
|
|
37
|
+
const external_password_index_js_namespaceObject = require("../password/index.js");
|
|
38
|
+
const external_RawTextArea_js_namespaceObject = require("./RawTextArea.js");
|
|
39
|
+
const external_TextArea_js_namespaceObject = require("./TextArea.js");
|
|
40
|
+
const external_Variable_js_namespaceObject = require("./Variable.js");
|
|
41
|
+
const useEnvironmentVariableOptions = (scope)=>{
|
|
42
|
+
const environmentVariables = (0, useGlobalVariable_js_namespaceObject.useGlobalVariable)('$env');
|
|
43
|
+
return (0, external_react_namespaceObject.useMemo)(()=>{
|
|
44
|
+
if (environmentVariables) return [
|
|
45
|
+
environmentVariables
|
|
46
|
+
].filter(Boolean);
|
|
47
|
+
return scope;
|
|
48
|
+
}, [
|
|
49
|
+
environmentVariables,
|
|
50
|
+
scope
|
|
51
|
+
]);
|
|
52
|
+
};
|
|
53
|
+
const isVariable = (value)=>{
|
|
54
|
+
const regex = /{{.*?}}/;
|
|
55
|
+
return regex.test(value);
|
|
56
|
+
};
|
|
57
|
+
const TextAreaWithGlobalScope = (0, schema_namespaceObject.connect)((props)=>{
|
|
58
|
+
const { supportsLineBreak, password, number, boolean, ...others } = props;
|
|
59
|
+
const scope = useEnvironmentVariableOptions(props.scope);
|
|
60
|
+
const fieldNames = {
|
|
61
|
+
value: 'name',
|
|
62
|
+
label: 'title'
|
|
63
|
+
};
|
|
64
|
+
if (supportsLineBreak) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_RawTextArea_js_namespaceObject.RawTextArea, {
|
|
65
|
+
...others,
|
|
66
|
+
scope: scope,
|
|
67
|
+
fieldNames: fieldNames,
|
|
68
|
+
rows: 3
|
|
69
|
+
});
|
|
70
|
+
if (number) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_Variable_js_namespaceObject.Variable.Input, {
|
|
71
|
+
...props,
|
|
72
|
+
scope: scope,
|
|
73
|
+
fieldNames: fieldNames
|
|
74
|
+
});
|
|
75
|
+
if (password && props.value && !isVariable(props.value)) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_password_index_js_namespaceObject.Password, {
|
|
76
|
+
...others,
|
|
77
|
+
autoFocus: true
|
|
78
|
+
});
|
|
79
|
+
if (boolean) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_Variable_js_namespaceObject.Variable.Input, {
|
|
80
|
+
...props,
|
|
81
|
+
scope: scope,
|
|
82
|
+
fieldNames: fieldNames
|
|
83
|
+
});
|
|
84
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_TextArea_js_namespaceObject.TextArea, {
|
|
85
|
+
...others,
|
|
86
|
+
scope: scope,
|
|
87
|
+
fieldNames: fieldNames
|
|
88
|
+
});
|
|
89
|
+
}, (0, schema_namespaceObject.mapReadPretty)(index_js_namespaceObject.Input.ReadPretty));
|
|
90
|
+
var __webpack_export_target__ = exports;
|
|
91
|
+
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
92
|
+
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
93
|
+
value: true
|
|
94
|
+
});
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
+
"./TextAreaWithGlobalScope": function(module) {
|
|
4
|
+
module.exports = require("./TextAreaWithGlobalScope.js");
|
|
5
|
+
},
|
|
3
6
|
"./Variable": function(module) {
|
|
4
7
|
module.exports = require("./Variable.js");
|
|
5
8
|
}
|
|
@@ -52,12 +55,21 @@ function __webpack_require__(moduleId) {
|
|
|
52
55
|
})();
|
|
53
56
|
var __webpack_exports__ = {};
|
|
54
57
|
__webpack_require__.r(__webpack_exports__);
|
|
58
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
59
|
+
TextAreaWithGlobalScope: function() {
|
|
60
|
+
return _TextAreaWithGlobalScope__WEBPACK_IMPORTED_MODULE_1__.TextAreaWithGlobalScope;
|
|
61
|
+
}
|
|
62
|
+
});
|
|
55
63
|
var _Variable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./Variable");
|
|
56
64
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
57
|
-
for(var __WEBPACK_IMPORT_KEY__ in _Variable__WEBPACK_IMPORTED_MODULE_0__)if (
|
|
65
|
+
for(var __WEBPACK_IMPORT_KEY__ in _Variable__WEBPACK_IMPORTED_MODULE_0__)if ([
|
|
66
|
+
"default",
|
|
67
|
+
"TextAreaWithGlobalScope"
|
|
68
|
+
].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
58
69
|
return _Variable__WEBPACK_IMPORTED_MODULE_0__[key];
|
|
59
70
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
60
71
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
72
|
+
var _TextAreaWithGlobalScope__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./TextAreaWithGlobalScope");
|
|
61
73
|
var __webpack_export_target__ = exports;
|
|
62
74
|
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
63
75
|
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
@@ -113,13 +113,7 @@ const DndContext = (0, schema_namespaceObject.observer)((props)=>{
|
|
|
113
113
|
dropAnimation: {
|
|
114
114
|
duration: 10,
|
|
115
115
|
easing: 'cubic-bezier(0.18, 0.67, 0.6, 1.22)'
|
|
116
|
-
}
|
|
117
|
-
children: visible && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
118
|
-
style: {
|
|
119
|
-
whiteSpace: 'nowrap'
|
|
120
|
-
},
|
|
121
|
-
children: t('Dragging')
|
|
122
|
-
})
|
|
116
|
+
}
|
|
123
117
|
}),
|
|
124
118
|
props.children
|
|
125
119
|
]
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = function(exports1, definition) {
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = function(obj, prop) {
|
|
13
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
(()=>{
|
|
17
|
+
__webpack_require__.r = function(exports1) {
|
|
18
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
19
|
+
value: 'Module'
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
22
|
+
value: true
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
})();
|
|
26
|
+
var __webpack_exports__ = {};
|
|
27
|
+
__webpack_require__.r(__webpack_exports__);
|
|
28
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
29
|
+
DragHandlePageTab: ()=>DragHandlePageTab
|
|
30
|
+
});
|
|
31
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
32
|
+
const external_react_namespaceObject = require("react");
|
|
33
|
+
const external_antd_style_namespaceObject = require("antd-style");
|
|
34
|
+
const index_js_namespaceObject = require("../../hooks/index.js");
|
|
35
|
+
const external_DragHandlePageTab_style_js_namespaceObject = require("./DragHandlePageTab.style.js");
|
|
36
|
+
const external_SortableItem_js_namespaceObject = require("./SortableItem.js");
|
|
37
|
+
const DragHandlePageTab = (props)=>{
|
|
38
|
+
const { isSubMenu, children, className: overStyle, isAdminMenu } = props;
|
|
39
|
+
const { draggable } = (0, external_react_namespaceObject.useContext)(external_SortableItem_js_namespaceObject.SortableContext);
|
|
40
|
+
const { designable } = (0, index_js_namespaceObject.useDesignable)();
|
|
41
|
+
const { attributes, listeners, setNodeRef, transform, isDragging } = draggable;
|
|
42
|
+
const { styles } = (0, external_DragHandlePageTab_style_js_namespaceObject.useStyles)();
|
|
43
|
+
const ref = (0, external_react_namespaceObject.useRef)(null);
|
|
44
|
+
const [dimensions, setDimensions] = (0, external_react_namespaceObject.useState)({
|
|
45
|
+
width: 0,
|
|
46
|
+
height: 0
|
|
47
|
+
});
|
|
48
|
+
const [initialPosition, setInitialPosition] = (0, external_react_namespaceObject.useState)({
|
|
49
|
+
x: 0,
|
|
50
|
+
y: 0
|
|
51
|
+
});
|
|
52
|
+
const centerOffset = {
|
|
53
|
+
x: 4 * dimensions.width,
|
|
54
|
+
y: 3 * dimensions.height
|
|
55
|
+
};
|
|
56
|
+
const style = {
|
|
57
|
+
position: isDragging ? 'fixed' : 'static',
|
|
58
|
+
top: isDragging ? initialPosition.y - centerOffset.y : 0,
|
|
59
|
+
left: isDragging ? initialPosition.x - centerOffset.x : 0,
|
|
60
|
+
width: isDragging ? 'max-content' : '100%',
|
|
61
|
+
height: isDragging ? 'max-content' : '100%',
|
|
62
|
+
zIndex: isDragging ? 999 : 'auto',
|
|
63
|
+
pointerEvents: isDragging ? 'none' : 'auto',
|
|
64
|
+
transform: transform ? "translate3d(".concat(transform.x, "px, ").concat(transform.y, "px, 0) scale(").concat(isDragging ? 1.05 : 1, ")") : void 0,
|
|
65
|
+
boxShadow: isDragging ? '0 4px 8px rgba(0, 0, 0, 0.1)' : 'none'
|
|
66
|
+
};
|
|
67
|
+
const handleMouseDown = (event)=>{
|
|
68
|
+
if (ref.current) {
|
|
69
|
+
const { width, height } = ref.current.getBoundingClientRect();
|
|
70
|
+
const { clientX, clientY } = event;
|
|
71
|
+
setDimensions({
|
|
72
|
+
width,
|
|
73
|
+
height
|
|
74
|
+
});
|
|
75
|
+
setInitialPosition({
|
|
76
|
+
x: clientX,
|
|
77
|
+
y: clientY
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
if (!designable) return children;
|
|
82
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
83
|
+
ref: setNodeRef,
|
|
84
|
+
className: (0, external_antd_style_namespaceObject.cx)(styles.dragHandleMenu, {
|
|
85
|
+
draggable: isDragging,
|
|
86
|
+
leftBorder: isSubMenu && isDragging,
|
|
87
|
+
adminMenu: isAdminMenu && isDragging
|
|
88
|
+
}, overStyle),
|
|
89
|
+
style: style,
|
|
90
|
+
...listeners,
|
|
91
|
+
...attributes,
|
|
92
|
+
role: "none",
|
|
93
|
+
onMouseDown: handleMouseDown,
|
|
94
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
95
|
+
ref: ref,
|
|
96
|
+
className: 'wrapper',
|
|
97
|
+
children: children
|
|
98
|
+
})
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
var __webpack_export_target__ = exports;
|
|
102
|
+
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
103
|
+
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
104
|
+
value: true
|
|
105
|
+
});
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = function(exports1, definition) {
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = function(obj, prop) {
|
|
13
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
(()=>{
|
|
17
|
+
__webpack_require__.r = function(exports1) {
|
|
18
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
19
|
+
value: 'Module'
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
22
|
+
value: true
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
})();
|
|
26
|
+
var __webpack_exports__ = {};
|
|
27
|
+
__webpack_require__.r(__webpack_exports__);
|
|
28
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
29
|
+
useStyles: ()=>useStyles
|
|
30
|
+
});
|
|
31
|
+
const external_antd_style_namespaceObject = require("antd-style");
|
|
32
|
+
function _tagged_template_literal(strings, raw) {
|
|
33
|
+
if (!raw) raw = strings.slice(0);
|
|
34
|
+
return Object.freeze(Object.defineProperties(strings, {
|
|
35
|
+
raw: {
|
|
36
|
+
value: Object.freeze(raw)
|
|
37
|
+
}
|
|
38
|
+
}));
|
|
39
|
+
}
|
|
40
|
+
function _templateObject() {
|
|
41
|
+
const data = _tagged_template_literal([
|
|
42
|
+
"\n position: relative;\n width: 100%;\n height: 100%;\n\n &.draggable {\n cursor: move;\n padding: 0 10px;\n border-radius: 5px;\n background: #f0f0f0;\n }\n\n .wrapper {\n display: flex;\n flex-direction: row;\n justify-content: space-around;\n }\n "
|
|
43
|
+
]);
|
|
44
|
+
_templateObject = function() {
|
|
45
|
+
return data;
|
|
46
|
+
};
|
|
47
|
+
return data;
|
|
48
|
+
}
|
|
49
|
+
const useStyles = (0, external_antd_style_namespaceObject.createStyles)((param)=>{
|
|
50
|
+
let { css, token } = param;
|
|
51
|
+
return {
|
|
52
|
+
dragHandleMenu: css(_templateObject())
|
|
53
|
+
};
|
|
54
|
+
});
|
|
55
|
+
var __webpack_export_target__ = exports;
|
|
56
|
+
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
57
|
+
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
58
|
+
value: true
|
|
59
|
+
});
|
|
@@ -33,6 +33,7 @@ const external_react_i18next_namespaceObject = require("react-i18next");
|
|
|
33
33
|
const index_js_namespaceObject = require("../application/schema-toolbar/index.js");
|
|
34
34
|
const external_collection_manager_index_js_namespaceObject = require("../collection-manager/index.js");
|
|
35
35
|
const external_schema_component_index_js_namespaceObject = require("../schema-component/index.js");
|
|
36
|
+
const SchemaSettingsDefaultValue_js_namespaceObject = require("../schema-settings/SchemaSettingsDefaultValue.js");
|
|
36
37
|
const generalSettingsItems = [
|
|
37
38
|
{
|
|
38
39
|
name: 'editFieldTitle',
|
|
@@ -232,6 +233,10 @@ const generalSettingsItems = [
|
|
|
232
233
|
const { required = true } = (0, index_js_namespaceObject.useSchemaToolbar)();
|
|
233
234
|
return !field.readPretty && 'FormField' !== fieldSchema['x-component'] && required;
|
|
234
235
|
}
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
name: 'editDefaultValue',
|
|
239
|
+
Component: SchemaSettingsDefaultValue_js_namespaceObject.SchemaSettingsDefaultValue
|
|
235
240
|
}
|
|
236
241
|
];
|
|
237
242
|
var __webpack_export_target__ = exports;
|
|
@@ -112,7 +112,7 @@ function _tagged_template_literal(strings, raw) {
|
|
|
112
112
|
}
|
|
113
113
|
function _templateObject() {
|
|
114
114
|
const data = _tagged_template_literal([
|
|
115
|
-
"\n .ant-dropdown-menu-item-group-list {\n max-height:
|
|
115
|
+
"\n .ant-dropdown-menu-item-group-list {\n max-height: 400px;\n overflow-y: auto;\n }\n "
|
|
116
116
|
]);
|
|
117
117
|
_templateObject = function() {
|
|
118
118
|
return data;
|
|
@@ -224,6 +224,8 @@ const SchemaSettingsDefaultValue = function(props) {
|
|
|
224
224
|
const schema = {
|
|
225
225
|
['x-uid']: fieldSchema['x-uid']
|
|
226
226
|
};
|
|
227
|
+
v.default = v.default || null;
|
|
228
|
+
field.value = v.default;
|
|
227
229
|
fieldSchema.default = v.default;
|
|
228
230
|
if (!v.default && 0 !== v.default) field.value = null;
|
|
229
231
|
schema.default = v.default;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.n = function(module) {
|
|
5
|
+
var getter = module && module.__esModule ? function() {
|
|
6
|
+
return module['default'];
|
|
7
|
+
} : function() {
|
|
8
|
+
return module;
|
|
9
|
+
};
|
|
10
|
+
__webpack_require__.d(getter, {
|
|
11
|
+
a: getter
|
|
12
|
+
});
|
|
13
|
+
return getter;
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
(()=>{
|
|
17
|
+
__webpack_require__.d = function(exports1, definition) {
|
|
18
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: definition[key]
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
(()=>{
|
|
25
|
+
__webpack_require__.o = function(obj, prop) {
|
|
26
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
27
|
+
};
|
|
28
|
+
})();
|
|
29
|
+
(()=>{
|
|
30
|
+
__webpack_require__.r = function(exports1) {
|
|
31
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
32
|
+
value: 'Module'
|
|
33
|
+
});
|
|
34
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
35
|
+
value: true
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
})();
|
|
39
|
+
var __webpack_exports__ = {};
|
|
40
|
+
__webpack_require__.r(__webpack_exports__);
|
|
41
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
42
|
+
createModalSettingsItem: ()=>createModalSettingsItem
|
|
43
|
+
});
|
|
44
|
+
const external_lodash_namespaceObject = require("lodash");
|
|
45
|
+
var external_lodash_default = /*#__PURE__*/ __webpack_require__.n(external_lodash_namespaceObject);
|
|
46
|
+
const external_react_i18next_namespaceObject = require("react-i18next");
|
|
47
|
+
const index_js_namespaceObject = require("../../schema-component/index.js");
|
|
48
|
+
const external_util_js_namespaceObject = require("./util.js");
|
|
49
|
+
function createModalSettingsItem(options) {
|
|
50
|
+
const { name, parentSchemaKey, valueKeys, schema, title, useSubmit = external_util_js_namespaceObject.useHookDefault, useVisible, defaultValue: propsDefaultValue, useDefaultValue = external_util_js_namespaceObject.useHookDefault, width, type = 'common' } = options;
|
|
51
|
+
return {
|
|
52
|
+
name,
|
|
53
|
+
type: 'actionModal',
|
|
54
|
+
useVisible,
|
|
55
|
+
useComponentProps () {
|
|
56
|
+
const fieldSchema = (0, external_util_js_namespaceObject.useSchemaByType)(type);
|
|
57
|
+
const { dn } = (0, index_js_namespaceObject.useDesignable)();
|
|
58
|
+
const defaultValue = useDefaultValue(propsDefaultValue);
|
|
59
|
+
const values = parentSchemaKey ? external_lodash_default().get(fieldSchema, parentSchemaKey) : void 0;
|
|
60
|
+
const compile = (0, index_js_namespaceObject.useCompile)();
|
|
61
|
+
const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
|
|
62
|
+
const onSubmit = useSubmit();
|
|
63
|
+
const { fieldSchema: tableColumnSchema } = (0, index_js_namespaceObject.useColumnSchema)() || {};
|
|
64
|
+
return {
|
|
65
|
+
title: 'function' == typeof title ? title(t) : compile(title),
|
|
66
|
+
width,
|
|
67
|
+
schema: schema({
|
|
68
|
+
...defaultValue,
|
|
69
|
+
...values
|
|
70
|
+
}),
|
|
71
|
+
onSubmit (values) {
|
|
72
|
+
const newSchema = (0, external_util_js_namespaceObject.getNewSchema)({
|
|
73
|
+
fieldSchema,
|
|
74
|
+
parentSchemaKey: parentSchemaKey,
|
|
75
|
+
value: values,
|
|
76
|
+
valueKeys
|
|
77
|
+
});
|
|
78
|
+
if (tableColumnSchema) {
|
|
79
|
+
dn.emit('patch', {
|
|
80
|
+
schema: newSchema
|
|
81
|
+
});
|
|
82
|
+
dn.refresh();
|
|
83
|
+
} else dn.deepMerge(newSchema);
|
|
84
|
+
return null == onSubmit ? void 0 : onSubmit(values);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
var __webpack_export_target__ = exports;
|
|
91
|
+
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
92
|
+
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
93
|
+
value: true
|
|
94
|
+
});
|