@tachybase/client 0.23.22 → 0.23.35
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/application/schema-initializer/components/SchemaInitializerChildren.mjs +1 -1
- package/es/built-in/admin-layout/InternalAdminLayout.mjs +4 -2
- package/es/built-in/admin-layout/MenuEditor.mjs +2 -2
- package/es/built-in/admin-layout/style.d.ts +1 -1
- package/es/built-in/admin-layout/style.mjs +4 -4
- package/es/built-in/assistant/Assistant.provider.d.ts +0 -6
- package/es/built-in/assistant/Assistant.provider.mjs +15 -112
- package/es/built-in/assistant/index.d.ts +0 -1
- package/es/built-in/assistant/index.mjs +0 -7
- package/es/built-in/attachment-preview/previewers/file-pdf.mjs +4 -2
- package/es/built-in/context-menu/ContextMenu.provider.d.ts +1 -0
- package/es/built-in/context-menu/ContextMenu.provider.mjs +29 -1
- package/es/built-in/context-menu/index.mjs +1 -0
- package/es/built-in/index.mjs +44 -5
- package/es/built-in/page-style/TabHeader.d.ts +1 -1
- package/es/built-in/page-style/TabHeader.mjs +26 -33
- package/es/built-in/page-style/TabHeader.style.d.ts +4 -0
- package/es/built-in/page-style/TabHeader.style.mjs +35 -0
- package/es/built-in/pinned-list/PinnedPluginListProvider.d.ts +3 -1
- package/es/built-in/pinned-list/PinnedPluginListProvider.mjs +5 -4
- package/es/built-in/scroll-assistant/useJoystick.mjs +3 -1
- package/es/built-in/setting-layout/SettingLayout.mjs +10 -1
- package/es/built-in/{assistant/calculator → setting-layout}/style.d.ts +1 -1
- package/es/built-in/setting-layout/style.mjs +25 -0
- package/es/collection-manager/action-hooks.d.ts +1 -4
- package/es/collection-manager/action-hooks.mjs +39 -11
- package/es/icon/preloaded.mjs +4 -4
- package/es/modules/actions/associate/AssociateActionInitializer.d.ts +1 -0
- package/es/modules/actions/associate/AssociateActionInitializer.mjs +71 -0
- package/es/modules/actions/associate/AssociateActionProvider.d.ts +7 -0
- package/es/modules/actions/associate/AssociateActionProvider.mjs +82 -0
- package/es/modules/actions/associate/AssociateActionSettings.d.ts +2 -0
- package/es/modules/actions/associate/AssociateActionSettings.mjs +57 -0
- package/es/modules/blocks/data-blocks/details-multi/detailsWithPaginationSettings.mjs +2 -1
- package/es/modules/blocks/data-blocks/form/RecordFormBlockInitializer.mjs +21 -14
- package/es/modules/blocks/data-blocks/form/createEditFormBlockUISchema.d.ts +1 -2
- package/es/modules/blocks/data-blocks/grid-card/gridCardBlockSettings.mjs +2 -1
- package/es/modules/blocks/data-blocks/list/listBlockSettings.mjs +2 -1
- package/es/modules/blocks/data-blocks/table/TableActionInitializers.mjs +15 -0
- package/es/modules/blocks/data-blocks/table/tableBlockSettings.mjs +2 -1
- package/es/modules/blocks/data-blocks/table/tableColumnSettings.mjs +2 -2
- package/es/modules/blocks/data-blocks/table-selector/tableSelectorBlockSettings.mjs +2 -1
- package/es/modules/fields/component/Cascader/cascaderComponentFieldSettings.mjs +2 -1
- package/es/modules/fields/component/Radio/radioComponentFieldSettings.mjs +4 -0
- package/es/modules/fields/component/Select/selectComponentFieldSettings.mjs +16 -2
- package/es/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.mjs +2 -1
- package/es/modules/menu/GroupItem.mjs +5 -1
- package/es/modules/menu/LinkMenuItem.mjs +7 -3
- package/es/modules/menu/PageMenuItem.mjs +5 -1
- package/es/modules/menu/UploadMenuItem.d.ts +1 -0
- package/es/modules/menu/UploadMenuItem.mjs +81 -0
- package/es/modules/menu/menuItemInitializer.d.ts +0 -4
- package/es/modules/menu/menuItemInitializer.mjs +3 -23
- package/es/schema-component/antd/action/Action.Designer.mjs +4 -1
- package/es/schema-component/antd/association-select/AssociationSelect.mjs +4 -2
- package/es/schema-component/antd/checkbox/Checkbox.mjs +11 -6
- package/es/schema-component/antd/date-picker/DatePicker.mjs +4 -0
- package/es/schema-component/antd/form-item/FormItem.Settings.d.ts +2 -0
- package/es/schema-component/antd/form-item/FormItem.Settings.mjs +14 -1
- package/es/schema-component/antd/form-v2/Form.Settings.mjs +2 -1
- package/es/schema-component/antd/grid-card/GridCard.Designer.mjs +2 -1
- package/es/schema-component/antd/list/List.Designer.mjs +2 -1
- package/es/schema-component/antd/menu/AdminMenu.d.ts +1 -0
- package/es/schema-component/antd/menu/AdminMenu.mjs +71 -0
- package/es/schema-component/antd/menu/AdminMenu.style.d.ts +4 -0
- package/es/schema-component/antd/menu/AdminMenu.style.mjs +36 -0
- package/es/schema-component/antd/menu/Menu.Designer.d.ts +1 -1
- package/es/schema-component/antd/menu/Menu.Designer.mjs +59 -40
- package/es/schema-component/antd/menu/Menu.mjs +108 -141
- package/es/schema-component/antd/menu/Menu.styles.d.ts +1 -2
- package/es/schema-component/antd/menu/Menu.styles.mjs +8 -20
- package/es/schema-component/antd/menu/MenuSearch.d.ts +5 -0
- package/es/schema-component/antd/menu/MenuSearch.mjs +32 -0
- package/es/schema-component/antd/menu/tools.d.ts +9 -0
- package/es/schema-component/antd/menu/tools.mjs +36 -0
- package/es/schema-component/antd/scroll-area/ScrollArea.mjs +0 -17
- package/es/schema-component/antd/select/Select.d.ts +3 -13
- package/es/schema-component/antd/select/Select.mjs +33 -2
- package/es/schema-component/antd/table/Table.Void.Designer.mjs +2 -1
- package/es/schema-component/antd/table-v2/TableBlockDesigner.mjs +2 -1
- package/es/schema-component/antd/table-v2/TableSelectorDesigner.mjs +2 -1
- package/es/schema-component/common/dnd-context/index.d.ts +1 -2
- package/es/schema-component/common/sortable-item/DragHandleMenu.d.ts +1 -0
- package/es/schema-component/common/sortable-item/DragHandleMenu.mjs +78 -0
- package/es/schema-component/common/sortable-item/DragHandleMenu.style.d.ts +3 -0
- package/es/schema-component/common/sortable-item/DragHandleMenu.style.mjs +25 -0
- package/es/schema-initializer/SchemaInitializerPlugin.mjs +5 -2
- package/es/schema-initializer/utils.mjs +9 -7
- package/es/schema-settings/GeneralSchemaDesigner.d.ts +2 -1
- package/es/schema-settings/GeneralSchemaDesigner.mjs +9 -1
- package/es/schema-settings/SchemaSettings.d.ts +3 -1
- package/es/schema-settings/SchemaSettings.mjs +16 -4
- package/es/schema-settings/SchemaSettingsPlugin.mjs +2 -0
- package/es/schema-settings/SchemaSettingsSortingRule.mjs +2 -1
- package/es/schema-settings/styles.mjs +2 -2
- package/lib/application/schema-initializer/components/SchemaInitializerChildren.js +1 -1
- package/lib/built-in/admin-layout/InternalAdminLayout.js +4 -2
- package/lib/built-in/admin-layout/MenuEditor.js +2 -2
- package/lib/built-in/admin-layout/style.js +4 -4
- package/lib/built-in/assistant/Assistant.provider.js +16 -115
- package/lib/built-in/assistant/index.js +3 -16
- package/lib/built-in/attachment-preview/previewers/file-pdf.js +4 -2
- package/lib/built-in/context-menu/ContextMenu.provider.js +29 -0
- package/lib/built-in/context-menu/index.js +1 -0
- package/lib/built-in/index.js +44 -5
- package/lib/built-in/page-style/TabHeader.js +26 -33
- package/lib/built-in/page-style/TabHeader.style.js +69 -0
- package/lib/built-in/pinned-list/PinnedPluginListProvider.js +5 -4
- package/lib/built-in/scroll-assistant/useJoystick.js +17 -1
- package/lib/built-in/setting-layout/SettingLayout.js +10 -1
- package/lib/built-in/{assistant/calculator/CalculatorKey.js → setting-layout/style.js} +25 -11
- package/lib/collection-manager/action-hooks.js +39 -11
- package/lib/icon/preloaded.js +4 -4
- package/lib/locale/en_US.js +8 -0
- package/lib/locale/zh-CN.js +8 -0
- package/lib/modules/actions/associate/AssociateActionInitializer.js +105 -0
- package/lib/modules/actions/associate/AssociateActionProvider.js +116 -0
- package/lib/modules/actions/associate/AssociateActionSettings.js +91 -0
- package/lib/modules/blocks/data-blocks/details-multi/detailsWithPaginationSettings.js +2 -1
- package/lib/modules/blocks/data-blocks/form/RecordFormBlockInitializer.js +21 -14
- package/lib/modules/blocks/data-blocks/grid-card/gridCardBlockSettings.js +2 -1
- package/lib/modules/blocks/data-blocks/list/listBlockSettings.js +2 -1
- package/lib/modules/blocks/data-blocks/table/TableActionInitializers.js +15 -0
- package/lib/modules/blocks/data-blocks/table/tableBlockSettings.js +2 -1
- package/lib/modules/blocks/data-blocks/table/tableColumnSettings.js +2 -2
- package/lib/modules/blocks/data-blocks/table-selector/tableSelectorBlockSettings.js +2 -1
- package/lib/modules/fields/component/Cascader/cascaderComponentFieldSettings.js +2 -1
- package/lib/modules/fields/component/Radio/radioComponentFieldSettings.js +4 -0
- package/lib/modules/fields/component/Select/selectComponentFieldSettings.js +16 -2
- package/lib/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.js +2 -1
- package/lib/modules/menu/GroupItem.js +5 -1
- package/lib/modules/menu/LinkMenuItem.js +7 -3
- package/lib/modules/menu/PageMenuItem.js +5 -1
- package/lib/modules/menu/UploadMenuItem.js +115 -0
- package/lib/modules/menu/menuItemInitializer.js +2 -23
- package/lib/schema-component/antd/action/Action.Designer.js +4 -1
- package/lib/schema-component/antd/association-select/AssociationSelect.js +4 -2
- package/lib/schema-component/antd/checkbox/Checkbox.js +11 -6
- package/lib/schema-component/antd/date-picker/DatePicker.js +4 -0
- package/lib/schema-component/antd/form-item/FormItem.Settings.js +16 -1
- package/lib/schema-component/antd/form-v2/Form.Settings.js +2 -1
- package/lib/schema-component/antd/grid-card/GridCard.Designer.js +2 -1
- package/lib/schema-component/antd/list/List.Designer.js +2 -1
- package/lib/schema-component/antd/menu/AdminMenu.js +105 -0
- package/lib/schema-component/antd/menu/AdminMenu.style.js +70 -0
- package/lib/schema-component/antd/menu/Menu.Designer.js +59 -40
- package/lib/schema-component/antd/menu/Menu.js +108 -141
- package/lib/schema-component/antd/menu/Menu.styles.js +8 -20
- package/lib/schema-component/antd/menu/MenuSearch.js +80 -0
- package/lib/schema-component/antd/menu/tools.js +72 -0
- package/lib/schema-component/antd/scroll-area/ScrollArea.js +0 -17
- package/lib/schema-component/antd/select/Select.js +33 -2
- package/lib/schema-component/antd/table/Table.Void.Designer.js +2 -1
- package/lib/schema-component/antd/table-v2/TableBlockDesigner.js +2 -1
- package/lib/schema-component/antd/table-v2/TableSelectorDesigner.js +2 -1
- package/lib/schema-component/common/sortable-item/DragHandleMenu.js +112 -0
- package/lib/schema-component/common/sortable-item/DragHandleMenu.style.js +59 -0
- package/lib/schema-initializer/SchemaInitializerPlugin.js +5 -2
- package/lib/schema-initializer/utils.js +9 -7
- package/lib/schema-settings/GeneralSchemaDesigner.js +9 -1
- package/lib/schema-settings/SchemaSettings.js +16 -4
- package/lib/schema-settings/SchemaSettingsPlugin.js +2 -0
- package/lib/schema-settings/SchemaSettingsSortingRule.js +2 -1
- package/lib/schema-settings/styles.js +2 -2
- package/package.json +8 -7
- package/es/built-in/assistant/calculator/AutoScalingText.d.ts +0 -3
- package/es/built-in/assistant/calculator/AutoScalingText.mjs +0 -33
- package/es/built-in/assistant/calculator/Calculator.d.ts +0 -2
- package/es/built-in/assistant/calculator/Calculator.mjs +0 -235
- package/es/built-in/assistant/calculator/CalculatorDisplay.d.ts +0 -4
- package/es/built-in/assistant/calculator/CalculatorDisplay.mjs +0 -21
- package/es/built-in/assistant/calculator/CalculatorKey.d.ts +0 -5
- package/es/built-in/assistant/calculator/CalculatorKey.mjs +0 -11
- package/es/built-in/assistant/calculator/CalculatorProvider.d.ts +0 -10
- package/es/built-in/assistant/calculator/CalculatorProvider.mjs +0 -29
- package/es/built-in/assistant/calculator/Draggable.d.ts +0 -8
- package/es/built-in/assistant/calculator/Draggable.mjs +0 -54
- package/es/built-in/assistant/calculator/style.mjs +0 -25
- package/es/built-in/assistant/search-and-jump/index.d.ts +0 -16
- package/es/built-in/assistant/search-and-jump/index.mjs +0 -59
- package/lib/built-in/assistant/calculator/AutoScalingText.js +0 -67
- package/lib/built-in/assistant/calculator/Calculator.js +0 -283
- package/lib/built-in/assistant/calculator/CalculatorDisplay.js +0 -55
- package/lib/built-in/assistant/calculator/CalculatorProvider.js +0 -65
- package/lib/built-in/assistant/calculator/Draggable.js +0 -102
- package/lib/built-in/assistant/calculator/style.js +0 -59
- package/lib/built-in/assistant/search-and-jump/index.js +0 -96
|
@@ -2,6 +2,7 @@ import * as __WEBPACK_EXTERNAL_MODULE__application_Plugin_mjs__ from "../applica
|
|
|
2
2
|
import * as __WEBPACK_EXTERNAL_MODULE__modules_actions_add_child_addChildActionSettings_mjs__ from "../modules/actions/add-child/addChildActionSettings.mjs";
|
|
3
3
|
import * as __WEBPACK_EXTERNAL_MODULE__modules_actions_add_new_addNewActionSettings_mjs__ from "../modules/actions/add-new/addNewActionSettings.mjs";
|
|
4
4
|
import * as __WEBPACK_EXTERNAL_MODULE__modules_actions_add_record_customizeAddRecordActionSettings_mjs__ from "../modules/actions/add-record/customizeAddRecordActionSettings.mjs";
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__modules_actions_associate_AssociateActionSettings_mjs__ from "../modules/actions/associate/AssociateActionSettings.mjs";
|
|
5
6
|
import * as __WEBPACK_EXTERNAL_MODULE__modules_actions_bulk_destroy_bulkDeleteActionSettings_mjs__ from "../modules/actions/bulk-destroy/bulkDeleteActionSettings.mjs";
|
|
6
7
|
import * as __WEBPACK_EXTERNAL_MODULE__modules_actions_delete_deleteActionSettings_mjs__ from "../modules/actions/delete/deleteActionSettings.mjs";
|
|
7
8
|
import * as __WEBPACK_EXTERNAL_MODULE__modules_actions_disassociate_disassociateActionSettings_mjs__ from "../modules/actions/disassociate/disassociateActionSettings.mjs";
|
|
@@ -83,6 +84,7 @@ class SchemaSettingsPlugin extends __WEBPACK_EXTERNAL_MODULE__application_Plugin
|
|
|
83
84
|
this.schemaSettingsManager.add(__WEBPACK_EXTERNAL_MODULE__modules_actions_save_record_customizeSaveRecordActionSettings_mjs__.customizeSaveRecordActionSettings);
|
|
84
85
|
this.schemaSettingsManager.add(__WEBPACK_EXTERNAL_MODULE__modules_actions_add_child_addChildActionSettings_mjs__.addChildActionSettings);
|
|
85
86
|
this.schemaSettingsManager.add(__WEBPACK_EXTERNAL_MODULE__modules_actions_expand_collapse_expendableActionSettings_mjs__.expendableActionSettings);
|
|
87
|
+
this.schemaSettingsManager.add(__WEBPACK_EXTERNAL_MODULE__modules_actions_associate_AssociateActionSettings_mjs__.associateActionSettings);
|
|
86
88
|
this.schemaSettingsManager.add(__WEBPACK_EXTERNAL_MODULE__modules_blocks_data_blocks_form_fieldSettingsFormItem_mjs__.fieldSettingsFormItem);
|
|
87
89
|
this.schemaSettingsManager.add(__WEBPACK_EXTERNAL_MODULE__modules_blocks_data_blocks_form_FilterItemCustomSettings_mjs__.FilterItemCustomSettings);
|
|
88
90
|
this.schemaSettingsManager.add(__WEBPACK_EXTERNAL_MODULE__modules_blocks_data_blocks_table_tableColumnSettings_mjs__.tableColumnSettings);
|
|
@@ -9,7 +9,7 @@ function _tagged_template_literal(strings, raw) {
|
|
|
9
9
|
}
|
|
10
10
|
function _templateObject() {
|
|
11
11
|
const data = _tagged_template_literal([
|
|
12
|
-
"\n pointer-events: none;\n position: absolute;\n font-size: 12px;\n
|
|
12
|
+
"\n pointer-events: none;\n position: absolute;\n font-size: 12px;\n padding: 0;\n line-height: 16px;\n height: 16px;\n border-bottom-right-radius: 2px;\n border-radius: 2px;\n top: 2px;\n left: 2px;\n .title-tag {\n padding: 0 3px;\n border-radius: 2px;\n background: var(--colorSettings);\n color: #fff;\n display: block;\n }\n "
|
|
13
13
|
]);
|
|
14
14
|
_templateObject = function() {
|
|
15
15
|
return data;
|
|
@@ -18,7 +18,7 @@ function _templateObject() {
|
|
|
18
18
|
}
|
|
19
19
|
function _templateObject1() {
|
|
20
20
|
const data = _tagged_template_literal([
|
|
21
|
-
"\n & .ant-space-item .anticon {\n margin: 0;\n }\n\n &:hover {\n display:
|
|
21
|
+
"\n & .ant-space-item .anticon {\n margin: 0;\n }\n\n &:hover {\n display: flex !important;\n }\n "
|
|
22
22
|
]);
|
|
23
23
|
_templateObject1 = function() {
|
|
24
24
|
return data;
|
|
@@ -39,7 +39,7 @@ const SchemaInitializerChildren = (props)=>{
|
|
|
39
39
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(jsx_runtime_namespaceObject.Fragment, {
|
|
40
40
|
children: children.sort((a, b)=>(a.sort || 0) - (b.sort || 0)).map((item, index)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(SchemaInitializerChild, {
|
|
41
41
|
...item
|
|
42
|
-
}, item.
|
|
42
|
+
}, item.key || (null == item ? void 0 : item.name) || index))
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
45
|
const typeComponentMap = {
|
|
@@ -75,7 +75,7 @@ const InternalAdminLayout = (props)=>{
|
|
|
75
75
|
sideMenuRef: sideMenuRef
|
|
76
76
|
}),
|
|
77
77
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
78
|
-
className: styles.
|
|
78
|
+
className: styles.headerTabs,
|
|
79
79
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_AdminTabs_js_namespaceObject.AdminTabs, {})
|
|
80
80
|
})
|
|
81
81
|
]
|
|
@@ -83,7 +83,9 @@ const InternalAdminLayout = (props)=>{
|
|
|
83
83
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
84
84
|
className: styles.right,
|
|
85
85
|
children: [
|
|
86
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_index_js_namespaceObject.PinnedPluginList, {
|
|
86
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_index_js_namespaceObject.PinnedPluginList, {
|
|
87
|
+
belongToFilter: "pinnedmenu"
|
|
88
|
+
}),
|
|
87
89
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_index_js_namespaceObject.CurrentUser, {})
|
|
88
90
|
]
|
|
89
91
|
})
|
|
@@ -49,6 +49,7 @@ const useMenuProps = ()=>{
|
|
|
49
49
|
};
|
|
50
50
|
};
|
|
51
51
|
const MenuEditor = (props)=>{
|
|
52
|
+
const { sideMenuRef } = props;
|
|
52
53
|
const { setTitle } = (0, external_document_title_index_js_namespaceObject.useDocumentTitle)();
|
|
53
54
|
const navigate = (0, external_react_router_namespaceObject.useNavigate)();
|
|
54
55
|
const params = (0, external_react_router_namespaceObject.useParams)();
|
|
@@ -56,12 +57,11 @@ const MenuEditor = (props)=>{
|
|
|
56
57
|
const isMatchAdmin = (0, external_react_router_namespaceObject.useMatch)('/admin');
|
|
57
58
|
const isMatchAdminName = (0, external_react_router_namespaceObject.useMatch)('/admin/:name');
|
|
58
59
|
const defaultSelectedUid = params.name;
|
|
59
|
-
const { sideMenuRef } = props;
|
|
60
60
|
const ctx = (0, external_acl_index_js_namespaceObject.useACLRoleContext)();
|
|
61
61
|
const [current, setCurrent] = (0, external_react_namespaceObject.useState)(null);
|
|
62
62
|
const onSelect = (param)=>{
|
|
63
63
|
let { item } = param;
|
|
64
|
-
const schema = item.props.schema;
|
|
64
|
+
const schema = item.props.schema || {};
|
|
65
65
|
setTitle(schema.title);
|
|
66
66
|
setCurrent(schema);
|
|
67
67
|
navigate("/admin/".concat(schema['x-uid']));
|
|
@@ -82,7 +82,7 @@ function _templateObject3() {
|
|
|
82
82
|
}
|
|
83
83
|
function _templateObject4() {
|
|
84
84
|
const data = _tagged_template_literal([
|
|
85
|
-
"\n display: inline-flex;\n flex-shrink: 0;\n color: #fff;\n padding: 0;\n align-items: center;\n padding: 0 12px 0 12px;\n "
|
|
85
|
+
"\n display: inline-flex;\n flex-shrink: 0;\n color: #fff;\n padding: 0;\n align-items: center;\n padding: 0 12px 0 12px;\n cursor: pointer;\n "
|
|
86
86
|
]);
|
|
87
87
|
_templateObject4 = function() {
|
|
88
88
|
return data;
|
|
@@ -118,7 +118,7 @@ function _templateObject7() {
|
|
|
118
118
|
}
|
|
119
119
|
function _templateObject8() {
|
|
120
120
|
const data = _tagged_template_literal([
|
|
121
|
-
"\n flex: 1 1 auto;\n width: 0;\n
|
|
121
|
+
"\n flex: 1 1 auto;\n display: flex;\n width: 0;\n overflow: hidden;\n white-space: nowrap;\n margin: 0;\n "
|
|
122
122
|
]);
|
|
123
123
|
_templateObject8 = function() {
|
|
124
124
|
return data;
|
|
@@ -136,7 +136,7 @@ function _templateObject9() {
|
|
|
136
136
|
}
|
|
137
137
|
function _templateObject10() {
|
|
138
138
|
const data = _tagged_template_literal([
|
|
139
|
-
"\n height: 100%;\n
|
|
139
|
+
"\n height: 100%;\n position: relative;\n left: 0;\n top: 0;\n background: rgba(0, 0, 0, 0);\n z-index: 100;\n "
|
|
140
140
|
]);
|
|
141
141
|
_templateObject10 = function() {
|
|
142
142
|
return data;
|
|
@@ -163,7 +163,7 @@ const useStyles = (0, external_antd_style_namespaceObject.createStyles)((param)=
|
|
|
163
163
|
logo: css(_templateObject5()),
|
|
164
164
|
title: css(_templateObject6()),
|
|
165
165
|
right: css(_templateObject7()),
|
|
166
|
-
|
|
166
|
+
headerTabs: css(_templateObject8()),
|
|
167
167
|
notice: css(_templateObject9()),
|
|
168
168
|
sider: css(_templateObject10()),
|
|
169
169
|
main: css(_templateObject11())
|
|
@@ -26,134 +26,35 @@ var __webpack_require__ = {};
|
|
|
26
26
|
var __webpack_exports__ = {};
|
|
27
27
|
__webpack_require__.r(__webpack_exports__);
|
|
28
28
|
__webpack_require__.d(__webpack_exports__, {
|
|
29
|
-
AssistantProvider: ()=>AssistantProvider
|
|
30
|
-
AssistantList: ()=>AssistantList,
|
|
31
|
-
AssistantListProvider: ()=>AssistantListProvider
|
|
29
|
+
AssistantProvider: ()=>AssistantProvider
|
|
32
30
|
});
|
|
33
31
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
34
|
-
const external_react_namespaceObject = require("react");
|
|
35
|
-
const schema_namespaceObject = require("@tachybase/schema");
|
|
36
32
|
const icons_namespaceObject = require("@ant-design/icons");
|
|
37
33
|
const external_antd_namespaceObject = require("antd");
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
-
const external_react_hotkeys_hook_namespaceObject = require("react-hotkeys-hook");
|
|
41
|
-
const index_js_namespaceObject = require("../../icon/index.js");
|
|
42
|
-
const external_schema_component_index_js_namespaceObject = require("../../schema-component/index.js");
|
|
43
|
-
const external_acl_index_js_namespaceObject = require("../acl/index.js");
|
|
44
|
-
const external_context_menu_index_js_namespaceObject = require("../context-menu/index.js");
|
|
45
|
-
const CalculatorProvider_js_namespaceObject = require("./calculator/CalculatorProvider.js");
|
|
46
|
-
const external_context_js_namespaceObject = require("./context.js");
|
|
47
|
-
const external_search_and_jump_index_js_namespaceObject = require("./search-and-jump/index.js");
|
|
48
|
-
function _tagged_template_literal(strings, raw) {
|
|
49
|
-
if (!raw) raw = strings.slice(0);
|
|
50
|
-
return Object.freeze(Object.defineProperties(strings, {
|
|
51
|
-
raw: {
|
|
52
|
-
value: Object.freeze(raw)
|
|
53
|
-
}
|
|
54
|
-
}));
|
|
55
|
-
}
|
|
56
|
-
function _templateObject() {
|
|
57
|
-
const data = _tagged_template_literal([
|
|
58
|
-
"\n display: inline-block;\n .ant-btn {\n border: 0;\n height: var(--tb-header-height);\n width: 46px;\n border-radius: 0;\n color: rgba(255, 255, 255, 0.65);\n &:hover {\n background: rgba(255, 255, 255, 0.1) !important;\n }\n }\n "
|
|
59
|
-
]);
|
|
60
|
-
_templateObject = function() {
|
|
61
|
-
return data;
|
|
62
|
-
};
|
|
63
|
-
return data;
|
|
64
|
-
}
|
|
34
|
+
const index_js_namespaceObject = require("../acl/index.js");
|
|
35
|
+
const external_pinned_list_index_js_namespaceObject = require("../pinned-list/index.js");
|
|
65
36
|
const AssistantProvider = (param)=>{
|
|
66
37
|
let { children } = param;
|
|
67
|
-
const { designable, setDesignable } = (0, external_schema_component_index_js_namespaceObject.useDesignable)();
|
|
68
|
-
const { visible, setVisible } = (0, CalculatorProvider_js_namespaceObject.useCalculator)();
|
|
69
|
-
const { setOpen } = (0, external_search_and_jump_index_js_namespaceObject.useSearchAndJump)();
|
|
70
|
-
(0, external_react_namespaceObject.useRef)();
|
|
71
|
-
(0, external_react_hotkeys_hook_namespaceObject.useHotkeys)('Ctrl+Shift+U', ()=>setDesignable(!designable), [
|
|
72
|
-
designable
|
|
73
|
-
]);
|
|
74
|
-
(0, external_react_hotkeys_hook_namespaceObject.useHotkeys)('Ctrl+K', ()=>setOpen((open)=>!open), []);
|
|
75
|
-
(0, external_react_hotkeys_hook_namespaceObject.useHotkeys)('Cmd+K', ()=>setOpen((open)=>!open), []);
|
|
76
|
-
const { contextMenuEnabled, setContextMenuEnable } = (0, external_context_menu_index_js_namespaceObject.useContextMenu)();
|
|
77
38
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
|
|
78
39
|
children: [
|
|
79
40
|
children,
|
|
80
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.FloatButton, {
|
|
94
|
-
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_namespaceObject.Icon, {
|
|
95
|
-
type: "Design"
|
|
96
|
-
}),
|
|
97
|
-
type: designable ? 'primary' : 'default',
|
|
98
|
-
onClick: ()=>setDesignable(!designable)
|
|
99
|
-
}),
|
|
100
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.FloatButton, {
|
|
101
|
-
type: visible ? 'primary' : 'default',
|
|
102
|
-
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.CalculatorOutlined, {}),
|
|
103
|
-
onClick: ()=>{
|
|
104
|
-
setVisible((visible)=>!visible);
|
|
105
|
-
}
|
|
106
|
-
}),
|
|
107
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.FloatButton, {
|
|
108
|
-
type: contextMenuEnabled ? 'primary' : 'default',
|
|
109
|
-
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.ToolOutlined, {
|
|
110
|
-
onClick: ()=>setContextMenuEnable(!contextMenuEnabled)
|
|
111
|
-
})
|
|
112
|
-
}),
|
|
113
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(AssistantList, {})
|
|
114
|
-
]
|
|
41
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_namespaceObject.ACLRolesCheckProvider, {
|
|
42
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.FloatButton.Group, {
|
|
43
|
+
trigger: "click",
|
|
44
|
+
type: "default",
|
|
45
|
+
style: {
|
|
46
|
+
right: 24,
|
|
47
|
+
zIndex: 1250
|
|
48
|
+
},
|
|
49
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.ToolOutlined, {}),
|
|
50
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_pinned_list_index_js_namespaceObject.PinnedPluginList, {
|
|
51
|
+
belongToFilter: "hoverbutton"
|
|
52
|
+
})
|
|
53
|
+
})
|
|
115
54
|
})
|
|
116
55
|
]
|
|
117
56
|
});
|
|
118
57
|
};
|
|
119
|
-
const AssistantListProvider = (props)=>{
|
|
120
|
-
const { children, items } = props;
|
|
121
|
-
const ctx = (0, external_react_namespaceObject.useContext)(external_context_js_namespaceObject.AssistantListContext);
|
|
122
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(jsx_runtime_namespaceObject.Fragment, {
|
|
123
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_context_js_namespaceObject.AssistantListContext.Provider, {
|
|
124
|
-
value: {
|
|
125
|
-
items: {
|
|
126
|
-
...ctx.items,
|
|
127
|
-
...items
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
children: children
|
|
131
|
-
})
|
|
132
|
-
});
|
|
133
|
-
};
|
|
134
|
-
const useStyles = (0, external_antd_style_namespaceObject.createStyles)((param)=>{
|
|
135
|
-
let { css } = param;
|
|
136
|
-
return {
|
|
137
|
-
container: css(_templateObject())
|
|
138
|
-
};
|
|
139
|
-
});
|
|
140
|
-
const AssistantList = ()=>{
|
|
141
|
-
const { allowAll, snippets } = (0, external_acl_index_js_namespaceObject.useACLRoleContext)();
|
|
142
|
-
const getSnippetsAllow = function(aclKey) {
|
|
143
|
-
let isPublic = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
|
|
144
|
-
return allowAll || isPublic || (null == snippets ? void 0 : snippets.includes(aclKey));
|
|
145
|
-
};
|
|
146
|
-
const { styles } = useStyles();
|
|
147
|
-
const ctx = (0, external_react_namespaceObject.useContext)(external_context_js_namespaceObject.AssistantListContext);
|
|
148
|
-
const { components } = (0, external_react_namespaceObject.useContext)(schema_namespaceObject.SchemaOptionsContext);
|
|
149
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
150
|
-
className: styles.container,
|
|
151
|
-
children: Object.keys(ctx.items).sort((a, b)=>ctx.items[a].order - ctx.items[b].order).filter((key)=>getSnippetsAllow(ctx.items[key].snippet, ctx.items[key].isPublic)).map((key)=>{
|
|
152
|
-
const Action = (0, external_lodash_namespaceObject.get)(components, ctx.items[key].component);
|
|
153
|
-
return Action ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Action, {}, key) : null;
|
|
154
|
-
})
|
|
155
|
-
});
|
|
156
|
-
};
|
|
157
58
|
var __webpack_export_target__ = exports;
|
|
158
59
|
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
159
60
|
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
@@ -6,14 +6,8 @@ var __webpack_modules__ = {
|
|
|
6
6
|
"./Assistant.provider": function(module) {
|
|
7
7
|
module.exports = require("./Assistant.provider.js");
|
|
8
8
|
},
|
|
9
|
-
"./calculator/CalculatorProvider": function(module) {
|
|
10
|
-
module.exports = require("./calculator/CalculatorProvider.js");
|
|
11
|
-
},
|
|
12
9
|
"./context?d80f": function(module) {
|
|
13
10
|
module.exports = require("./context.js");
|
|
14
|
-
},
|
|
15
|
-
"./search-and-jump": function(module) {
|
|
16
|
-
module.exports = require("./search-and-jump/index.js");
|
|
17
11
|
}
|
|
18
12
|
};
|
|
19
13
|
var __webpack_module_cache__ = {};
|
|
@@ -71,15 +65,13 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
71
65
|
});
|
|
72
66
|
var _application_Plugin__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../application/Plugin");
|
|
73
67
|
var _Assistant_provider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./Assistant.provider");
|
|
74
|
-
var
|
|
75
|
-
var _search_and_jump__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("./search-and-jump");
|
|
76
|
-
var _context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("./context?d80f");
|
|
68
|
+
var _context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("./context?d80f");
|
|
77
69
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
78
|
-
for(var __WEBPACK_IMPORT_KEY__ in
|
|
70
|
+
for(var __WEBPACK_IMPORT_KEY__ in _context__WEBPACK_IMPORTED_MODULE_2__)if ([
|
|
79
71
|
"default",
|
|
80
72
|
"PluginAssistant"
|
|
81
73
|
].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
82
|
-
return
|
|
74
|
+
return _context__WEBPACK_IMPORTED_MODULE_2__[key];
|
|
83
75
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
84
76
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
85
77
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
@@ -91,11 +83,6 @@ for(var __WEBPACK_IMPORT_KEY__ in _Assistant_provider__WEBPACK_IMPORTED_MODULE_1
|
|
|
91
83
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
92
84
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
93
85
|
class PluginAssistant extends _application_Plugin__WEBPACK_IMPORTED_MODULE_0__.Plugin {
|
|
94
|
-
async load() {
|
|
95
|
-
this.app.use(_search_and_jump__WEBPACK_IMPORTED_MODULE_3__.SearchAndJumpProvider);
|
|
96
|
-
this.app.use(_calculator_CalculatorProvider__WEBPACK_IMPORTED_MODULE_2__.CalculatorProvider);
|
|
97
|
-
this.app.use(_Assistant_provider__WEBPACK_IMPORTED_MODULE_1__.AssistantListProvider, this.options.config);
|
|
98
|
-
}
|
|
99
86
|
async afterLoad() {
|
|
100
87
|
this.app.use(_Assistant_provider__WEBPACK_IMPORTED_MODULE_1__.AssistantProvider);
|
|
101
88
|
}
|
|
@@ -37,6 +37,7 @@ const external_react_zoom_pan_pinch_namespaceObject = require("react-zoom-pan-pi
|
|
|
37
37
|
const external_file_pdf_style_js_namespaceObject = require("./file-pdf.style.js");
|
|
38
38
|
require("react-pdf/dist/Page/AnnotationLayer.css");
|
|
39
39
|
require("react-pdf/dist/Page/TextLayer.css");
|
|
40
|
+
const index_js_namespaceObject = require("../../../block-provider/index.js");
|
|
40
41
|
const options = {
|
|
41
42
|
cMapUrl: "https://assets.tachybase.com/pdfjs-dist@".concat(external_react_pdf_namespaceObject.pdfjs.version, "/cmaps/"),
|
|
42
43
|
cMapPacked: true,
|
|
@@ -52,13 +53,14 @@ const TransformInternal = (param)=>{
|
|
|
52
53
|
});
|
|
53
54
|
};
|
|
54
55
|
const CheckedComponent = (props)=>{
|
|
55
|
-
const { file, fileInfo, width, noTransformWrapper
|
|
56
|
+
const { file, fileInfo, width, noTransformWrapper } = props;
|
|
56
57
|
const pdfInfo = (null == file ? void 0 : file.url) || fileInfo;
|
|
57
58
|
const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
|
|
58
59
|
const { styles } = (0, external_file_pdf_style_js_namespaceObject.useStyles)();
|
|
59
60
|
const containerRef = (0, external_react_namespaceObject.useRef)(null);
|
|
60
61
|
const [pdfWidth, setPdfWidth] = (0, external_react_namespaceObject.useState)(600);
|
|
61
62
|
const [numPages, setNumPages] = (0, external_react_namespaceObject.useState)(1);
|
|
63
|
+
const isMobile = (0, index_js_namespaceObject.useIsMobile)();
|
|
62
64
|
const onDocumentLoadSuccess = async (params)=>{
|
|
63
65
|
var _containerRef_current;
|
|
64
66
|
const { numPages, _transport } = params;
|
|
@@ -94,7 +96,7 @@ const CheckedComponent = (props)=>{
|
|
|
94
96
|
loading: "",
|
|
95
97
|
onLoadSuccess: onDocumentLoadSuccess,
|
|
96
98
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TransformInternal, {
|
|
97
|
-
noTransformWrapper: noTransformWrapper,
|
|
99
|
+
noTransformWrapper: noTransformWrapper || !isMobile,
|
|
98
100
|
children: Array.from(new Array(numPages), (el, index)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_react_pdf_namespaceObject.Page, {
|
|
99
101
|
pageNumber: index + 1,
|
|
100
102
|
width: width || pdfWidth,
|
|
@@ -26,13 +26,17 @@ var __webpack_require__ = {};
|
|
|
26
26
|
var __webpack_exports__ = {};
|
|
27
27
|
__webpack_require__.r(__webpack_exports__);
|
|
28
28
|
__webpack_require__.d(__webpack_exports__, {
|
|
29
|
+
ContextMenuButtonProvider: ()=>ContextMenuButtonProvider,
|
|
29
30
|
ContextMenuProvider: ()=>ContextMenuProvider
|
|
30
31
|
});
|
|
31
32
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
32
33
|
const external_react_namespaceObject = require("react");
|
|
34
|
+
const icons_namespaceObject = require("@ant-design/icons");
|
|
33
35
|
const external_ahooks_namespaceObject = require("ahooks");
|
|
34
36
|
const external_antd_namespaceObject = require("antd");
|
|
35
37
|
const index_js_namespaceObject = require("../../application/index.js");
|
|
38
|
+
const external_schema_component_index_js_namespaceObject = require("../../schema-component/index.js");
|
|
39
|
+
const external_pinned_list_index_js_namespaceObject = require("../pinned-list/index.js");
|
|
36
40
|
const external_useContextMenu_js_namespaceObject = require("./useContextMenu.js");
|
|
37
41
|
const STORAGE_KEYS = {
|
|
38
42
|
HIDDEN_SCROLL_AREA: 'hidden-scroll-area',
|
|
@@ -95,6 +99,31 @@ const ContextMenuProvider = (param)=>{
|
|
|
95
99
|
})
|
|
96
100
|
});
|
|
97
101
|
};
|
|
102
|
+
const ContextMenuButton = ()=>{
|
|
103
|
+
const { contextMenuEnabled, setContextMenuEnable } = (0, external_useContextMenu_js_namespaceObject.useContextMenu)();
|
|
104
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.FloatButton, {
|
|
105
|
+
type: contextMenuEnabled ? 'primary' : 'default',
|
|
106
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.ToolOutlined, {}),
|
|
107
|
+
onClick: ()=>setContextMenuEnable(!contextMenuEnabled)
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
const ContextMenuButtonProvider = (props)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_pinned_list_index_js_namespaceObject.PinnedPluginListProvider, {
|
|
111
|
+
items: {
|
|
112
|
+
cm: {
|
|
113
|
+
order: 90,
|
|
114
|
+
component: 'ContextMenuButton',
|
|
115
|
+
pin: true,
|
|
116
|
+
isPublic: true,
|
|
117
|
+
belongTo: 'hoverbutton'
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_schema_component_index_js_namespaceObject.SchemaComponentOptions, {
|
|
121
|
+
components: {
|
|
122
|
+
ContextMenuButton
|
|
123
|
+
},
|
|
124
|
+
children: props.children
|
|
125
|
+
})
|
|
126
|
+
});
|
|
98
127
|
var __webpack_export_target__ = exports;
|
|
99
128
|
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
100
129
|
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
@@ -39,6 +39,7 @@ class PluginContextMenu extends Plugin_js_namespaceObject.Plugin {
|
|
|
39
39
|
async load() {
|
|
40
40
|
this.app.use(ScrollAssistantStatus_provider_js_namespaceObject.ScrollAssistantStatusProvider);
|
|
41
41
|
this.app.use(external_ContextMenu_provider_js_namespaceObject.ContextMenuProvider);
|
|
42
|
+
this.app.use(external_ContextMenu_provider_js_namespaceObject.ContextMenuButtonProvider);
|
|
42
43
|
this.app.pluginContextMenu.add(external_ContextMenuItemsProps_js_namespaceObject.designerMode.name, external_ContextMenuItemsProps_js_namespaceObject.designerMode);
|
|
43
44
|
this.app.pluginContextMenu.add(external_ContextMenuItemsProps_js_namespaceObject.fullScreen.name, external_ContextMenuItemsProps_js_namespaceObject.fullScreen);
|
|
44
45
|
this.app.pluginContextMenu.add(external_ContextMenuItemsProps_js_namespaceObject.disableRightMenu.name, external_ContextMenuItemsProps_js_namespaceObject.disableRightMenu);
|
package/lib/built-in/index.js
CHANGED
|
@@ -472,7 +472,7 @@ const AppMaintainingDialog = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_2__.
|
|
|
472
472
|
let { app } = param;
|
|
473
473
|
const { icon, status, title, subTitle } = getProps(app);
|
|
474
474
|
const manager = app.noticeManager;
|
|
475
|
-
manager.status(app.i18n.t(title) + app.i18n.t(subTitle), _application__WEBPACK_IMPORTED_MODULE_12__.NoticeLevel.INFO);
|
|
475
|
+
manager.status(app.i18n.t(title) + ' ' + app.i18n.t(subTitle), _application__WEBPACK_IMPORTED_MODULE_12__.NoticeLevel.INFO);
|
|
476
476
|
return null;
|
|
477
477
|
}, {
|
|
478
478
|
displayName: 'AppMaintainingDialog'
|
|
@@ -581,26 +581,65 @@ class BuiltInPlugin extends _application_Plugin__WEBPACK_IMPORTED_MODULE_13__.Pl
|
|
|
581
581
|
order: 50,
|
|
582
582
|
component: 'DesignableSwitch',
|
|
583
583
|
pin: true,
|
|
584
|
-
snippet: 'ui.*'
|
|
584
|
+
snippet: 'ui.*',
|
|
585
|
+
belongTo: 'pinnedmenu'
|
|
585
586
|
},
|
|
586
587
|
wf: {
|
|
587
588
|
order: 100,
|
|
588
589
|
component: 'WorkflowLink',
|
|
589
590
|
pin: true,
|
|
590
|
-
snippet: 'pm.*'
|
|
591
|
+
snippet: 'pm.*',
|
|
592
|
+
belongTo: 'pinnedmenu'
|
|
591
593
|
},
|
|
592
594
|
ds: {
|
|
593
595
|
order: 200,
|
|
594
596
|
component: 'DatasourceLink',
|
|
595
597
|
pin: true,
|
|
596
|
-
snippet: 'pm.*'
|
|
598
|
+
snippet: 'pm.*',
|
|
599
|
+
belongTo: 'pinnedmenu'
|
|
597
600
|
},
|
|
598
601
|
sc: {
|
|
599
602
|
order: 400,
|
|
600
603
|
component: 'SettingsCenterDropdown',
|
|
601
604
|
pin: true,
|
|
602
605
|
snippet: 'pm.*',
|
|
603
|
-
isPublic: true
|
|
606
|
+
isPublic: true,
|
|
607
|
+
belongTo: 'pinnedmenu'
|
|
608
|
+
},
|
|
609
|
+
ca: {
|
|
610
|
+
order: 300,
|
|
611
|
+
component: 'CalculatorButton',
|
|
612
|
+
pin: true,
|
|
613
|
+
isPublic: true,
|
|
614
|
+
belongTo: 'hoverbutton'
|
|
615
|
+
},
|
|
616
|
+
cm: {
|
|
617
|
+
order: 90,
|
|
618
|
+
component: 'ContextMenuButton',
|
|
619
|
+
pin: true,
|
|
620
|
+
isPublic: true,
|
|
621
|
+
belongTo: 'hoverbutton'
|
|
622
|
+
},
|
|
623
|
+
db: {
|
|
624
|
+
order: 60,
|
|
625
|
+
component: 'DesignableButton',
|
|
626
|
+
pin: true,
|
|
627
|
+
snippet: 'ui.*',
|
|
628
|
+
belongTo: 'hoverbutton'
|
|
629
|
+
},
|
|
630
|
+
saj: {
|
|
631
|
+
order: 30,
|
|
632
|
+
component: 'SearchAndJumpButton',
|
|
633
|
+
pin: true,
|
|
634
|
+
snippet: 'pm.*',
|
|
635
|
+
belongTo: 'hoverbutton'
|
|
636
|
+
},
|
|
637
|
+
ai: {
|
|
638
|
+
order: 330,
|
|
639
|
+
component: 'AIChatButton',
|
|
640
|
+
pin: true,
|
|
641
|
+
isPublic: true,
|
|
642
|
+
belongTo: 'hoverbutton'
|
|
604
643
|
}
|
|
605
644
|
}
|
|
606
645
|
}
|
|
@@ -52,6 +52,7 @@ const external_react_router_namespaceObject = require("react-router");
|
|
|
52
52
|
const external_react_router_dom_namespaceObject = require("react-router-dom");
|
|
53
53
|
const index_js_namespaceObject = require("../../icon/index.js");
|
|
54
54
|
const external_PageStyle_provider_js_namespaceObject = require("./PageStyle.provider.js");
|
|
55
|
+
const external_TabHeader_style_js_namespaceObject = require("./TabHeader.style.js");
|
|
55
56
|
function _tagged_template_literal(strings, raw) {
|
|
56
57
|
if (!raw) raw = strings.slice(0);
|
|
57
58
|
return Object.freeze(Object.defineProperties(strings, {
|
|
@@ -61,41 +62,29 @@ function _tagged_template_literal(strings, raw) {
|
|
|
61
62
|
}));
|
|
62
63
|
}
|
|
63
64
|
function _templateObject() {
|
|
64
|
-
const data = _tagged_template_literal([
|
|
65
|
-
"\n margin: 6px 2px;\n align-items: center;\n background-image: none;\n background: rgba(0, 0, 0, 0.04);\n border-radius: 6px;\n border: 1px solid transparent;\n color: rgba(255, 255, 255, 0.88);\n cursor: pointer;\n display: inline-flex;\n font-size: 14px;\n font-weight: 400;\n gap: 8px;\n height: 32px;\n justify-content: center;\n line-height: 1.5714285714285714;\n outline: none;\n padding: 4px 15px;\n position: relative;\n text-align: center;\n touch-action: manipulation;\n transition: all 0.1s cubic-bezier(0.645, 0.045, 0.355, 1);\n user-select: none;\n white-space: nowrap;\n "
|
|
66
|
-
]);
|
|
67
|
-
_templateObject = function() {
|
|
68
|
-
return data;
|
|
69
|
-
};
|
|
70
|
-
return data;
|
|
71
|
-
}
|
|
72
|
-
function _templateObject1() {
|
|
73
|
-
const data = _tagged_template_literal([
|
|
74
|
-
"\n background: transparent;\n "
|
|
75
|
-
]);
|
|
76
|
-
_templateObject1 = function() {
|
|
77
|
-
return data;
|
|
78
|
-
};
|
|
79
|
-
return data;
|
|
80
|
-
}
|
|
81
|
-
function _templateObject2() {
|
|
82
65
|
const data = _tagged_template_literal([
|
|
83
66
|
"\n color: rgba(255, 255, 255, 0.88);\n "
|
|
84
67
|
]);
|
|
85
|
-
|
|
68
|
+
_templateObject = function() {
|
|
86
69
|
return data;
|
|
87
70
|
};
|
|
88
71
|
return data;
|
|
89
72
|
}
|
|
90
73
|
const Tag = (param)=>{
|
|
91
74
|
let { onClick, onClose, children, active } = param;
|
|
75
|
+
const { styles } = (0, external_TabHeader_style_js_namespaceObject.useStyles)();
|
|
92
76
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
|
|
93
77
|
onClick: onClick,
|
|
94
|
-
className: external_classnames_default()(
|
|
78
|
+
className: external_classnames_default()(styles.tabHeader, {
|
|
79
|
+
active
|
|
80
|
+
}),
|
|
95
81
|
children: [
|
|
96
|
-
|
|
82
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
83
|
+
className: "tab-text",
|
|
84
|
+
children: children
|
|
85
|
+
}),
|
|
97
86
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Button, {
|
|
98
|
-
className: (0, css_namespaceObject.css)(
|
|
87
|
+
className: (0, css_namespaceObject.css)(_templateObject()),
|
|
99
88
|
type: "text",
|
|
100
89
|
onClick: onClose,
|
|
101
90
|
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_namespaceObject.Icon, {
|
|
@@ -110,17 +99,21 @@ const TabHeader = ()=>{
|
|
|
110
99
|
const location = (0, external_react_router_dom_namespaceObject.useLocation)();
|
|
111
100
|
const { items, setItems } = (0, external_react_namespaceObject.useContext)(external_PageStyle_provider_js_namespaceObject.PageStyleContext);
|
|
112
101
|
const targetKey = location.pathname;
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
102
|
+
const { styles } = (0, external_TabHeader_style_js_namespaceObject.useStyles)();
|
|
103
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
104
|
+
className: styles.tabWrapper,
|
|
105
|
+
children: items.map((item)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Tag, {
|
|
106
|
+
active: item.key === targetKey,
|
|
107
|
+
onClick: ()=>{
|
|
108
|
+
navigate(item.key);
|
|
109
|
+
},
|
|
110
|
+
onClose: (e)=>{
|
|
111
|
+
e.stopPropagation();
|
|
112
|
+
setItems((items)=>items.filter((i)=>i.key !== item.key));
|
|
113
|
+
},
|
|
114
|
+
children: item.label
|
|
115
|
+
}, item.key))
|
|
116
|
+
});
|
|
124
117
|
};
|
|
125
118
|
var __webpack_export_target__ = exports;
|
|
126
119
|
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|