@tachybase/client 0.23.22 → 0.23.40
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/SchemaInitializerButton.mjs +1 -1
- package/es/application/schema-initializer/components/SchemaInitializerChildren.mjs +1 -1
- package/es/built-in/admin-layout/AdminLayout.mjs +15 -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/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 -10
- 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/index.d.ts +0 -1
- package/es/index.mjs +0 -1
- 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 +75 -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 +2 -1
- package/es/schema-component/antd/menu/Menu.Designer.mjs +62 -42
- package/es/schema-component/antd/menu/Menu.mjs +124 -163
- 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/MenuAdd.d.ts +1 -0
- package/es/schema-component/antd/menu/MenuAdd.mjs +18 -0
- package/es/schema-component/antd/menu/MenuSearchAdd.d.ts +7 -0
- package/es/schema-component/antd/menu/MenuSearchAdd.mjs +41 -0
- package/es/schema-component/antd/menu/MenuSearchAdd.style.d.ts +3 -0
- package/es/schema-component/antd/menu/MenuSearchAdd.style.mjs +25 -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-component/common/sortable-item/SortableItem.d.ts +1 -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/SchemaInitializerButton.js +1 -1
- package/lib/application/schema-initializer/components/SchemaInitializerChildren.js +1 -1
- package/lib/built-in/admin-layout/AdminLayout.js +15 -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/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 +142 -114
- 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/context.js → setting-layout/style.js} +24 -5
- package/lib/collection-manager/action-hooks.js +39 -11
- package/lib/icon/preloaded.js +4 -4
- package/lib/index.js +71 -86
- 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 +109 -0
- package/lib/schema-component/antd/menu/AdminMenu.style.js +70 -0
- package/lib/schema-component/antd/menu/Menu.Designer.js +62 -41
- package/lib/schema-component/antd/menu/Menu.js +124 -163
- package/lib/schema-component/antd/menu/Menu.styles.js +8 -20
- package/lib/{built-in/assistant/calculator/CalculatorDisplay.js → schema-component/antd/menu/MenuAdd.js} +14 -17
- package/lib/schema-component/antd/menu/MenuSearchAdd.js +89 -0
- package/lib/schema-component/antd/menu/MenuSearchAdd.style.js +59 -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/Assistant.provider.d.ts +0 -9
- package/es/built-in/assistant/Assistant.provider.mjs +0 -125
- 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/context.d.ts +0 -3
- package/es/built-in/assistant/context.mjs +0 -6
- package/es/built-in/assistant/index.d.ts +0 -7
- package/es/built-in/assistant/index.mjs +0 -16
- 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/Assistant.provider.js +0 -161
- 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/CalculatorKey.js +0 -45
- 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/index.js +0 -107
- package/lib/built-in/assistant/search-and-jump/index.js +0 -96
|
@@ -32,16 +32,20 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
|
32
32
|
const external_react_namespaceObject = require("react");
|
|
33
33
|
const schema_namespaceObject = require("@tachybase/schema");
|
|
34
34
|
const client_namespaceObject = require("@tachybase/utils/client");
|
|
35
|
+
const core_namespaceObject = require("@dnd-kit/core");
|
|
35
36
|
const external_antd_namespaceObject = require("antd");
|
|
36
37
|
const external_react_dom_namespaceObject = require("react-dom");
|
|
37
|
-
const external_react_i18next_namespaceObject = require("react-i18next");
|
|
38
38
|
const external_index_js_namespaceObject = require("../../index.js");
|
|
39
39
|
const external_index_js_namespaceObject_1 = require("../../../index.js");
|
|
40
40
|
const useMenuItem_js_namespaceObject = require("../../../hooks/useMenuItem.js");
|
|
41
|
+
const DragHandleMenu_js_namespaceObject = require("../../common/sortable-item/DragHandleMenu.js");
|
|
41
42
|
const useProps_js_namespaceObject = require("../../hooks/useProps.js");
|
|
43
|
+
const external_AdminMenu_js_namespaceObject = require("./AdminMenu.js");
|
|
42
44
|
const external_locale_js_namespaceObject = require("./locale.js");
|
|
43
45
|
const external_Menu_Designer_js_namespaceObject = require("./Menu.Designer.js");
|
|
44
46
|
const external_Menu_styles_js_namespaceObject = require("./Menu.styles.js");
|
|
47
|
+
const external_MenuSearchAdd_js_namespaceObject = require("./MenuSearchAdd.js");
|
|
48
|
+
const external_tools_js_namespaceObject = require("./tools.js");
|
|
45
49
|
const external_util_js_namespaceObject = require("./util.js");
|
|
46
50
|
function _tagged_template_literal(strings, raw) {
|
|
47
51
|
if (!raw) raw = strings.slice(0);
|
|
@@ -60,31 +64,12 @@ function _templateObject() {
|
|
|
60
64
|
};
|
|
61
65
|
return data;
|
|
62
66
|
}
|
|
63
|
-
function _templateObject1() {
|
|
64
|
-
const data = _tagged_template_literal([
|
|
65
|
-
"\n border: none;\n max-width: 21rem;\n "
|
|
66
|
-
]);
|
|
67
|
-
_templateObject1 = function() {
|
|
68
|
-
return data;
|
|
69
|
-
};
|
|
70
|
-
return data;
|
|
71
|
-
}
|
|
72
|
-
function _templateObject2() {
|
|
73
|
-
const data = _tagged_template_literal([
|
|
74
|
-
"\n display: block;\n color: inherit;\n &:hover {\n color: inherit;\n }\n "
|
|
75
|
-
]);
|
|
76
|
-
_templateObject2 = function() {
|
|
77
|
-
return data;
|
|
78
|
-
};
|
|
79
|
-
return data;
|
|
80
|
-
}
|
|
81
67
|
const HeaderMenu = (param)=>{
|
|
82
|
-
let { others, schema, mode, onSelect, setLoading, setDefaultSelectedKeys,
|
|
68
|
+
let { others, schema, mode, onSelect, setLoading, setDefaultSelectedKeys, designable, render, children } = param;
|
|
83
69
|
const { Component, getMenuItems } = (0, useMenuItem_js_namespaceObject.useMenuItem)();
|
|
84
70
|
const { token } = (0, external_index_js_namespaceObject_1.useToken)();
|
|
71
|
+
const { styles } = (0, external_Menu_styles_js_namespaceObject.useStyles)();
|
|
85
72
|
const [items, setItems] = (0, external_react_namespaceObject.useState)([]);
|
|
86
|
-
const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
|
|
87
|
-
const { styles: itemStyle } = (0, external_Menu_styles_js_namespaceObject.useStyles)();
|
|
88
73
|
const result = getMenuItems(()=>children);
|
|
89
74
|
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
90
75
|
setItems(getItem());
|
|
@@ -148,9 +133,7 @@ const HeaderMenu = (param)=>{
|
|
|
148
133
|
});
|
|
149
134
|
};
|
|
150
135
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
151
|
-
|
|
152
|
-
display: 'flex'
|
|
153
|
-
},
|
|
136
|
+
className: styles.headerMenuClass,
|
|
154
137
|
children: [
|
|
155
138
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
156
139
|
style: {
|
|
@@ -163,74 +146,13 @@ const HeaderMenu = (param)=>{
|
|
|
163
146
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Popover, {
|
|
164
147
|
placement: "bottomRight",
|
|
165
148
|
arrow: false,
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
color: 'inherit',
|
|
174
|
-
padding: token.marginSM,
|
|
175
|
-
boxShadow: 'none',
|
|
176
|
-
width: '7rem',
|
|
177
|
-
height: '5rem'
|
|
178
|
-
},
|
|
179
|
-
className: itemStyle.menuItem,
|
|
180
|
-
onClick: ()=>{
|
|
181
|
-
onClick(item);
|
|
182
|
-
},
|
|
183
|
-
children: item.menu ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(schema_namespaceObject.SchemaContext.Provider, {
|
|
184
|
-
value: schema,
|
|
185
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(schema_namespaceObject.FieldContext.Provider, {
|
|
186
|
-
value: field,
|
|
187
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_index_js_namespaceObject.SortableItem, {
|
|
188
|
-
role: "button",
|
|
189
|
-
"aria-label": t(field.title),
|
|
190
|
-
className: styles.designerCss,
|
|
191
|
-
removeParentsIfNoChildren: false,
|
|
192
|
-
style: {
|
|
193
|
-
position: 'revert'
|
|
194
|
-
},
|
|
195
|
-
children: [
|
|
196
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("a", {
|
|
197
|
-
role: "button",
|
|
198
|
-
"aria-label": t(field.title),
|
|
199
|
-
title: t(field.title),
|
|
200
|
-
className: (0, external_index_js_namespaceObject_1.css)(_templateObject2()),
|
|
201
|
-
children: [
|
|
202
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
203
|
-
style: {
|
|
204
|
-
fontSize: '1.2rem',
|
|
205
|
-
textAlign: 'center',
|
|
206
|
-
marginBottom: '0.3rem'
|
|
207
|
-
},
|
|
208
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_index_js_namespaceObject_1.Icon, {
|
|
209
|
-
type: icon || 'QuestionCircleOutlined'
|
|
210
|
-
})
|
|
211
|
-
}),
|
|
212
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
213
|
-
style: {
|
|
214
|
-
textAlign: 'center',
|
|
215
|
-
whiteSpace: 'nowrap',
|
|
216
|
-
overflow: 'hidden',
|
|
217
|
-
textOverflow: 'ellipsis',
|
|
218
|
-
fontSize: token.fontSizeSM
|
|
219
|
-
},
|
|
220
|
-
children: t(field.title)
|
|
221
|
-
})
|
|
222
|
-
]
|
|
223
|
-
}),
|
|
224
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Designer, {})
|
|
225
|
-
]
|
|
226
|
-
})
|
|
227
|
-
})
|
|
228
|
-
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(jsx_runtime_namespaceObject.Fragment, {
|
|
229
|
-
children: item.label
|
|
230
|
-
})
|
|
231
|
-
}, item.key);
|
|
232
|
-
})
|
|
233
|
-
}),
|
|
149
|
+
overlayInnerStyle: {
|
|
150
|
+
padding: 0
|
|
151
|
+
},
|
|
152
|
+
content: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_AdminMenu_js_namespaceObject.AdminMenu, {
|
|
153
|
+
items: items,
|
|
154
|
+
onClick: onClick
|
|
155
|
+
}),
|
|
234
156
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Button, {
|
|
235
157
|
className: "iconButton",
|
|
236
158
|
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_index_js_namespaceObject_1.Icon, {
|
|
@@ -254,30 +176,35 @@ const SideMenu = (param)=>{
|
|
|
254
176
|
const { styles } = (0, external_Menu_styles_js_namespaceObject.useStyles)();
|
|
255
177
|
const sideMenuSchemaRef = (0, external_react_namespaceObject.useRef)(sideMenuSchema);
|
|
256
178
|
sideMenuSchemaRef.current = sideMenuSchema;
|
|
179
|
+
const [searchMenuTitle, setSearchMenuTitle] = (0, external_react_namespaceObject.useState)('');
|
|
257
180
|
const items = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
181
|
+
let newSideMenuSchema = sideMenuSchema;
|
|
182
|
+
if (searchMenuTitle) newSideMenuSchema = (0, external_tools_js_namespaceObject.getNewSideMenuSchema)(sideMenuSchema, searchMenuTitle);
|
|
258
183
|
const result = getMenuItems(()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(schema_namespaceObject.RecursionField, {
|
|
259
|
-
schema:
|
|
184
|
+
schema: newSideMenuSchema,
|
|
260
185
|
onlyRenderProperties: true
|
|
261
186
|
}, (0, schema_namespaceObject.uid)()));
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
187
|
+
{
|
|
188
|
+
const dn = (0, external_index_js_namespaceObject.createDesignable)({
|
|
189
|
+
t,
|
|
190
|
+
api,
|
|
191
|
+
refresh,
|
|
192
|
+
current: sideMenuSchemaRef.current
|
|
193
|
+
});
|
|
194
|
+
dn.loadAPIClientEvents();
|
|
195
|
+
const searchMenu = {
|
|
196
|
+
key: 'x-menu-search',
|
|
197
|
+
disabled: true,
|
|
198
|
+
label: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_MenuSearchAdd_js_namespaceObject.MenuSearchAdd, {
|
|
199
|
+
designable: designable,
|
|
200
|
+
setSearchMenuTitle: setSearchMenuTitle,
|
|
201
|
+
dn: dn
|
|
202
|
+
}),
|
|
203
|
+
order: -10,
|
|
204
|
+
notdelete: true
|
|
205
|
+
};
|
|
206
|
+
result.push(searchMenu);
|
|
207
|
+
}
|
|
281
208
|
return result;
|
|
282
209
|
}, [
|
|
283
210
|
getMenuItems,
|
|
@@ -286,7 +213,8 @@ const SideMenu = (param)=>{
|
|
|
286
213
|
render,
|
|
287
214
|
t,
|
|
288
215
|
api,
|
|
289
|
-
refresh
|
|
216
|
+
refresh,
|
|
217
|
+
searchMenuTitle
|
|
290
218
|
]);
|
|
291
219
|
if (loading) return null;
|
|
292
220
|
return 'mix' === mode && (null == sideMenuSchema ? void 0 : sideMenuSchema['x-component']) === 'Menu.SubMenu' && (null == sideMenuRef ? void 0 : null === (_sideMenuRef_current = sideMenuRef.current) || void 0 === _sideMenuRef_current ? void 0 : _sideMenuRef_current.firstChild) && /*#__PURE__*/ (0, external_react_dom_namespaceObject.createPortal)(/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(MenuModeContext.Provider, {
|
|
@@ -301,7 +229,8 @@ const SideMenu = (param)=>{
|
|
|
301
229
|
null == onSelect || onSelect(info);
|
|
302
230
|
},
|
|
303
231
|
className: styles.sideMenuClass,
|
|
304
|
-
items: items
|
|
232
|
+
items: items,
|
|
233
|
+
expandIcon: null
|
|
305
234
|
})
|
|
306
235
|
]
|
|
307
236
|
}), sideMenuRef.current.firstChild);
|
|
@@ -320,11 +249,11 @@ const MenuItemDesignerContext = /*#__PURE__*/ (0, external_react_namespaceObject
|
|
|
320
249
|
MenuItemDesignerContext.displayName = 'MenuItemDesignerContext';
|
|
321
250
|
const Menu = (0, schema_namespaceObject.observer)((props)=>{
|
|
322
251
|
const { onSelect, mode, selectedUid, defaultSelectedUid, sideMenuRefScopeKey, defaultSelectedKeys: dSelectedKeys, defaultOpenKeys: dOpenKeys, children, ...others } = (0, useProps_js_namespaceObject.useProps)(props);
|
|
323
|
-
const { t } = (0,
|
|
324
|
-
const Designer = (0, external_index_js_namespaceObject.useDesigner)();
|
|
325
|
-
const schema = (0, schema_namespaceObject.useFieldSchema)();
|
|
252
|
+
const { t } = (0, external_index_js_namespaceObject_1.useTranslation)();
|
|
326
253
|
const { refresh } = (0, external_index_js_namespaceObject.useDesignable)();
|
|
327
254
|
const api = (0, external_index_js_namespaceObject_1.useAPIClient)();
|
|
255
|
+
const Designer = (0, external_index_js_namespaceObject.useDesigner)();
|
|
256
|
+
const schema = (0, schema_namespaceObject.useFieldSchema)();
|
|
328
257
|
const { render } = (0, external_index_js_namespaceObject_1.useSchemaInitializerRender)(schema['x-initializer'], schema['x-initializer-props']);
|
|
329
258
|
const sideMenuRef = useSideMenuRef();
|
|
330
259
|
const [selectedKeys, setSelectedKeys] = (0, external_react_namespaceObject.useState)();
|
|
@@ -341,6 +270,11 @@ const Menu = (0, schema_namespaceObject.observer)((props)=>{
|
|
|
341
270
|
].includes(mode)) return dOpenKeys || defaultSelectedKeys;
|
|
342
271
|
return dOpenKeys;
|
|
343
272
|
});
|
|
273
|
+
const sensors = (0, core_namespaceObject.useSensors)((0, core_namespaceObject.useSensor)(core_namespaceObject.PointerSensor, {
|
|
274
|
+
activationConstraint: {
|
|
275
|
+
distance: 5
|
|
276
|
+
}
|
|
277
|
+
}));
|
|
344
278
|
const sideMenuSchema = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
345
279
|
let key;
|
|
346
280
|
if (selectedUid) {
|
|
@@ -383,6 +317,7 @@ const Menu = (0, schema_namespaceObject.observer)((props)=>{
|
|
|
383
317
|
]);
|
|
384
318
|
const { designable } = (0, external_index_js_namespaceObject.useDesignable)();
|
|
385
319
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_index_js_namespaceObject.DndContext, {
|
|
320
|
+
sensors: sensors,
|
|
386
321
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(MenuItemDesignerContext.Provider, {
|
|
387
322
|
value: Designer,
|
|
388
323
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(MenuModeContext.Provider, {
|
|
@@ -395,9 +330,6 @@ const Menu = (0, schema_namespaceObject.observer)((props)=>{
|
|
|
395
330
|
onSelect: onSelect,
|
|
396
331
|
setLoading: setLoading,
|
|
397
332
|
setDefaultSelectedKeys: setDefaultSelectedKeys,
|
|
398
|
-
defaultSelectedKeys: defaultSelectedKeys,
|
|
399
|
-
defaultOpenKeys: defaultOpenKeys,
|
|
400
|
-
selectedKeys: selectedKeys,
|
|
401
333
|
designable: designable,
|
|
402
334
|
render: render,
|
|
403
335
|
children: children
|
|
@@ -448,27 +380,31 @@ Menu.Item = (0, schema_namespaceObject.observer)((props)=>{
|
|
|
448
380
|
value: schema,
|
|
449
381
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(schema_namespaceObject.FieldContext.Provider, {
|
|
450
382
|
value: field,
|
|
451
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.
|
|
383
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_index_js_namespaceObject.SortableItem, {
|
|
452
384
|
role: "button",
|
|
453
385
|
"aria-label": t(field.title),
|
|
454
386
|
className: styles.designerCss,
|
|
455
387
|
removeParentsIfNoChildren: false,
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
388
|
+
overStyle: {
|
|
389
|
+
background: 'transparent'
|
|
390
|
+
},
|
|
391
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(DragHandleMenu_js_namespaceObject.DragHandleMenu, {
|
|
392
|
+
children: [
|
|
393
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
|
|
394
|
+
className: 'menuitem-title-wrapper',
|
|
395
|
+
children: [
|
|
396
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_index_js_namespaceObject_1.Icon, {
|
|
397
|
+
type: icon
|
|
398
|
+
}),
|
|
399
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
400
|
+
className: 'menuitem-title',
|
|
401
|
+
children: t(field.title)
|
|
402
|
+
})
|
|
403
|
+
]
|
|
404
|
+
}),
|
|
405
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Designer, {})
|
|
406
|
+
]
|
|
407
|
+
})
|
|
472
408
|
})
|
|
473
409
|
})
|
|
474
410
|
})
|
|
@@ -519,26 +455,36 @@ Menu.URL = (0, schema_namespaceObject.observer)((props)=>{
|
|
|
519
455
|
value: schema,
|
|
520
456
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(schema_namespaceObject.FieldContext.Provider, {
|
|
521
457
|
value: field,
|
|
522
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.
|
|
458
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_index_js_namespaceObject.SortableItem, {
|
|
523
459
|
className: styles.designerCss,
|
|
524
460
|
removeParentsIfNoChildren: false,
|
|
525
461
|
"aria-label": t(field.title),
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
462
|
+
overStyle: {
|
|
463
|
+
background: 'transparent'
|
|
464
|
+
},
|
|
465
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(DragHandleMenu_js_namespaceObject.DragHandleMenu, {
|
|
466
|
+
children: [
|
|
467
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
|
|
468
|
+
className: 'menuitem-title-wrapper',
|
|
469
|
+
children: [
|
|
470
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_index_js_namespaceObject_1.Icon, {
|
|
471
|
+
type: icon
|
|
472
|
+
}),
|
|
473
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
474
|
+
style: {
|
|
475
|
+
overflow: 'hidden',
|
|
476
|
+
textOverflow: 'ellipsis',
|
|
477
|
+
display: 'inline-block',
|
|
478
|
+
width: '100%',
|
|
479
|
+
verticalAlign: 'middle'
|
|
480
|
+
},
|
|
481
|
+
children: t(field.title)
|
|
482
|
+
})
|
|
483
|
+
]
|
|
484
|
+
}),
|
|
485
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Designer, {})
|
|
486
|
+
]
|
|
487
|
+
})
|
|
542
488
|
})
|
|
543
489
|
})
|
|
544
490
|
})
|
|
@@ -580,17 +526,32 @@ Menu.SubMenu = (0, schema_namespaceObject.observer)((props)=>{
|
|
|
580
526
|
value: schema,
|
|
581
527
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(schema_namespaceObject.FieldContext.Provider, {
|
|
582
528
|
value: field,
|
|
583
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.
|
|
529
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_index_js_namespaceObject.SortableItem, {
|
|
584
530
|
className: styles.subMenuDesignerCss,
|
|
585
531
|
removeParentsIfNoChildren: false,
|
|
586
532
|
"aria-label": t(field.title),
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
533
|
+
overStyle: {
|
|
534
|
+
background: 'transparent'
|
|
535
|
+
},
|
|
536
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(DragHandleMenu_js_namespaceObject.DragHandleMenu, {
|
|
537
|
+
name: schema.name,
|
|
538
|
+
isSubMenu: true,
|
|
539
|
+
children: [
|
|
540
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
|
|
541
|
+
className: 'submenu-title',
|
|
542
|
+
children: [
|
|
543
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_index_js_namespaceObject_1.Icon, {
|
|
544
|
+
type: icon
|
|
545
|
+
}),
|
|
546
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
547
|
+
className: 'menuitem-title',
|
|
548
|
+
children: t(field.title)
|
|
549
|
+
})
|
|
550
|
+
]
|
|
551
|
+
}),
|
|
552
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Designer, {})
|
|
553
|
+
]
|
|
554
|
+
})
|
|
594
555
|
})
|
|
595
556
|
})
|
|
596
557
|
}),
|
|
@@ -39,7 +39,7 @@ function _tagged_template_literal(strings, raw) {
|
|
|
39
39
|
}
|
|
40
40
|
function _templateObject() {
|
|
41
41
|
const data = _tagged_template_literal([
|
|
42
|
-
"\n position: relative;\n display:
|
|
42
|
+
"\n position: relative;\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n align-items: center;\n overflow: hidden;\n text-overflow: ellipsis;\n\n &:hover {\n .general-schema-designer {\n display: flex;\n }\n .ant-space-item:hover {\n border-radius: 5px;\n background-color: var(--colorSettings);\n color: #fff;\n }\n }\n &.tb-action-link {\n > .general-schema-designer {\n top: -10px;\n bottom: -10px;\n left: -10px;\n right: -10px;\n }\n }\n .submenu-title {\n display: flex;\n flex-direction: row;\n\n width: 100%;\n vertical-align: middle;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n .general-schema-designer {\n flex: 1;\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n pointer-events: none;\n display: none;\n .general-schema-designer-icons {\n pointer-events: all;\n .ant-space-item {\n line-height: 16px;\n width: 16px;\n padding-left: 1px;\n }\n }\n }\n "
|
|
43
43
|
]);
|
|
44
44
|
_templateObject = function() {
|
|
45
45
|
return data;
|
|
@@ -48,7 +48,7 @@ function _templateObject() {
|
|
|
48
48
|
}
|
|
49
49
|
function _templateObject1() {
|
|
50
50
|
const data = _tagged_template_literal([
|
|
51
|
-
"\n position: relative;\n display: flex;\n justify-content:
|
|
51
|
+
"\n position: relative;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n width: 100%;\n\n &:hover {\n .general-schema-designer {\n display: flex;\n }\n .ant-space-item:hover {\n border-radius: 5px;\n background-color: var(--colorSettings);\n color: #fff;\n }\n }\n &.tb-action-link {\n > .general-schema-designer {\n top: -10px;\n bottom: -10px;\n left: -10px;\n right: -10px;\n }\n }\n\n .menuitem-title-wrapper {\n display: flex;\n flex-direction: row;\n width: 100%;\n overflow: hidden;\n }\n .menuitem-title {\n vertical-align: middle;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .general-schema-designer {\n flex: 1;\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n display: none;\n pointer-events: none;\n > .general-schema-designer-icons {\n pointer-events: all;\n .ant-space-item {\n line-height: 16px;\n width: 16px;\n padding-left: 1px;\n }\n }\n }\n "
|
|
52
52
|
]);
|
|
53
53
|
_templateObject1 = function() {
|
|
54
54
|
return data;
|
|
@@ -57,7 +57,7 @@ function _templateObject1() {
|
|
|
57
57
|
}
|
|
58
58
|
function _templateObject2() {
|
|
59
59
|
const data = _tagged_template_literal([
|
|
60
|
-
"\n .ant-menu-
|
|
60
|
+
"\n height: 100%;\n overflow-y: auto;\n overflow-x: hidden;\n\n .ant-menu-submenu.ant-menu-submenu-inline .ant-menu-submenu-title {\n position: relative;\n ::before {\n content: '';\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n width: 3px;\n height: 50%;\n background-color: var(--colorPrimaryText);\n\n /* 使用 clip-path 裁剪为梯形 */\n clip-path: polygon(0 0, 100% 15%, 100% 85%, 0 100%);\n }\n }\n\n .ant-menu-item,\n .ant-menu-submenu-title {\n padding-inline-end: 10px;\n }\n\n .ant-menu-submenu-title {\n .ant-menu-title-content {\n > div {\n > .general-schema-designer {\n right: 6px !important;\n }\n > span.anticon {\n margin-right: 10px;\n }\n }\n }\n }\n "
|
|
61
61
|
]);
|
|
62
62
|
_templateObject2 = function() {
|
|
63
63
|
return data;
|
|
@@ -66,7 +66,7 @@ function _templateObject2() {
|
|
|
66
66
|
}
|
|
67
67
|
function _templateObject3() {
|
|
68
68
|
const data = _tagged_template_literal([
|
|
69
|
-
"\n
|
|
69
|
+
"\n :active {\n background: inherit;\n }\n "
|
|
70
70
|
]);
|
|
71
71
|
_templateObject3 = function() {
|
|
72
72
|
return data;
|
|
@@ -75,33 +75,21 @@ function _templateObject3() {
|
|
|
75
75
|
}
|
|
76
76
|
function _templateObject4() {
|
|
77
77
|
const data = _tagged_template_literal([
|
|
78
|
-
"\n :
|
|
78
|
+
"\n display: flex;\n "
|
|
79
79
|
]);
|
|
80
80
|
_templateObject4 = function() {
|
|
81
81
|
return data;
|
|
82
82
|
};
|
|
83
83
|
return data;
|
|
84
84
|
}
|
|
85
|
-
function _templateObject5() {
|
|
86
|
-
const data = _tagged_template_literal([
|
|
87
|
-
"\n &:hover {\n border-radius: ",
|
|
88
|
-
"px;\n background: rgba(0, 0, 0, 0.045);\n overflow: hidden;\n }\n .ant-btn {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n border: none;\n box-shadow: none;\n padding-left: 0;\n padding-right: 0;\n width: 100%;\n span {\n display: block;\n text-align: center;\n font-size: ",
|
|
89
|
-
"px;\n }\n .anticon {\n font-size: 1.2rem;\n margin-bottom: 0.3rem;\n text-align: center;\n }\n }\n .ant-btn-default {\n box-shadow: none;\n }\n .general-schema-designer {\n background: none;\n }\n "
|
|
90
|
-
]);
|
|
91
|
-
_templateObject5 = function() {
|
|
92
|
-
return data;
|
|
93
|
-
};
|
|
94
|
-
return data;
|
|
95
|
-
}
|
|
96
85
|
const useStyles = (0, external_antd_style_namespaceObject.createStyles)((param)=>{
|
|
97
86
|
let { css, token } = param;
|
|
98
87
|
return {
|
|
99
88
|
subMenuDesignerCss: css(_templateObject()),
|
|
100
89
|
designerCss: css(_templateObject1()),
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
menuItem: css(_templateObject5(), token.borderRadius, token.fontSizeSM)
|
|
90
|
+
sideMenuClass: css(_templateObject2()),
|
|
91
|
+
menuItemClass: css(_templateObject3()),
|
|
92
|
+
headerMenuClass: css(_templateObject4())
|
|
105
93
|
};
|
|
106
94
|
});
|
|
107
95
|
var __webpack_export_target__ = exports;
|
|
@@ -26,25 +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
|
-
|
|
29
|
+
MenuAdd: ()=>MenuAdd
|
|
30
30
|
});
|
|
31
31
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
32
|
-
require("
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
className: "calculator-display",
|
|
46
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_AutoScalingText_js_namespaceObject.AutoScalingText, {
|
|
47
|
-
children: formattedValue
|
|
32
|
+
const external_index_js_namespaceObject = require("../../../index.js");
|
|
33
|
+
const SchemaSettings_js_namespaceObject = require("../../../schema-settings/SchemaSettings.js");
|
|
34
|
+
const external_Menu_Designer_js_namespaceObject = require("./Menu.Designer.js");
|
|
35
|
+
const MenuAdd = (props)=>{
|
|
36
|
+
const { dn } = props;
|
|
37
|
+
const { getAriaLabel } = (0, external_index_js_namespaceObject.useGetAriaLabelOfDesigner)();
|
|
38
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(SchemaSettings_js_namespaceObject.SchemaSettingsDropdown, {
|
|
39
|
+
title: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_index_js_namespaceObject.Icon, {
|
|
40
|
+
type: "PlusOutlined",
|
|
41
|
+
"aria-label": getAriaLabel('add-menu')
|
|
42
|
+
}),
|
|
43
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_Menu_Designer_js_namespaceObject.InsertMenuItemsGroup, {
|
|
44
|
+
dn: dn
|
|
48
45
|
})
|
|
49
46
|
});
|
|
50
47
|
};
|
|
@@ -0,0 +1,89 @@
|
|
|
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
|
+
MenuSearchAdd: ()=>MenuSearchAdd
|
|
43
|
+
});
|
|
44
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
45
|
+
const external_antd_namespaceObject = require("antd");
|
|
46
|
+
const external_lodash_namespaceObject = require("lodash");
|
|
47
|
+
var external_lodash_default = /*#__PURE__*/ __webpack_require__.n(external_lodash_namespaceObject);
|
|
48
|
+
const external_index_js_namespaceObject = require("../../../index.js");
|
|
49
|
+
const external_MenuAdd_js_namespaceObject = require("./MenuAdd.js");
|
|
50
|
+
const external_MenuSearchAdd_style_js_namespaceObject = require("./MenuSearchAdd.style.js");
|
|
51
|
+
const MenuSearchAdd = (props)=>{
|
|
52
|
+
const { designable, dn, setSearchMenuTitle } = props;
|
|
53
|
+
const { t } = (0, external_index_js_namespaceObject.useTranslation)();
|
|
54
|
+
const { styles } = (0, external_MenuSearchAdd_style_js_namespaceObject.useStyles)();
|
|
55
|
+
const handleChange = external_lodash_default().debounce((event)=>{
|
|
56
|
+
event.stopPropagation();
|
|
57
|
+
const searchValue = event.target.value.trim();
|
|
58
|
+
setSearchMenuTitle(searchValue);
|
|
59
|
+
}, 500);
|
|
60
|
+
const handleSearch = (value, event)=>{
|
|
61
|
+
event.stopPropagation();
|
|
62
|
+
external_lodash_default().debounce(setSearchMenuTitle, 500)(value.trim());
|
|
63
|
+
};
|
|
64
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
65
|
+
className: styles.menuSearchAdd,
|
|
66
|
+
children: [
|
|
67
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Input.Search, {
|
|
68
|
+
allowClear: true,
|
|
69
|
+
placeholder: t('search Menu'),
|
|
70
|
+
prefix: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_index_js_namespaceObject.Icon, {
|
|
71
|
+
type: "SearchOutlined"
|
|
72
|
+
}),
|
|
73
|
+
onChange: handleChange,
|
|
74
|
+
onSearch: handleSearch
|
|
75
|
+
}),
|
|
76
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
77
|
+
className: "menu-add-wrapper",
|
|
78
|
+
children: designable && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_MenuAdd_js_namespaceObject.MenuAdd, {
|
|
79
|
+
dn: dn
|
|
80
|
+
})
|
|
81
|
+
})
|
|
82
|
+
]
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
var __webpack_export_target__ = exports;
|
|
86
|
+
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
87
|
+
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
88
|
+
value: true
|
|
89
|
+
});
|