@tachybase/client 0.23.35 → 0.23.41
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/built-in/admin-layout/AdminLayout.mjs +15 -1
- package/es/built-in/index.mjs +0 -5
- package/es/collection-manager/interfaces/properties/index.mjs +1 -1
- package/es/index.d.ts +0 -1
- package/es/index.mjs +0 -1
- package/es/modules/actions/disassociate/__e2e__/templatesOfPage.mjs +1 -1
- package/es/modules/actions/view-edit-popup/PopupActionInitializer.mjs +1 -1
- package/es/modules/actions/view-edit-popup/UpdateActionInitializer.mjs +1 -1
- package/es/modules/blocks/data-blocks/form/__e2e__/form-create/schemaSettings.test.mjs +1 -1
- package/es/modules/blocks/data-blocks/form/__e2e__/form-create/templatesOfBug.mjs +12 -12
- package/es/modules/blocks/data-blocks/table/__e2e__/templatesOfBug.mjs +2 -2
- package/es/modules/blocks/data-blocks/table-selector/__e2e__/templatesOfBug.mjs +2 -2
- package/es/modules/dialog/__e2e__/templatesOfBug.mjs +9 -9
- package/es/schema-component/antd/association-field/schema.mjs +1 -1
- package/es/schema-component/antd/menu/AdminMenu.mjs +5 -1
- package/es/schema-component/antd/menu/AdminMenu.style.mjs +3 -3
- package/es/schema-component/antd/menu/Menu.Designer.d.ts +1 -0
- package/es/schema-component/antd/menu/Menu.Designer.mjs +4 -3
- package/es/schema-component/antd/menu/Menu.mjs +24 -30
- package/es/schema-component/antd/menu/Menu.styles.mjs +4 -2
- 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/common/sortable-item/SortableItem.d.ts +1 -0
- package/es/schema-initializer/SchemaInitializerPlugin.mjs +1 -0
- package/es/schema-initializer/buttons/TabPaneInitializers.d.ts +1 -0
- package/es/schema-initializer/buttons/TabPaneInitializers.mjs +9 -1
- package/lib/application/schema-initializer/components/SchemaInitializerButton.js +1 -1
- package/lib/built-in/admin-layout/AdminLayout.js +15 -1
- package/lib/built-in/index.js +99 -110
- package/lib/collection-manager/interfaces/properties/index.js +1 -1
- package/lib/index.js +71 -86
- package/lib/modules/actions/disassociate/__e2e__/templatesOfPage.js +1 -1
- package/lib/modules/actions/view-edit-popup/PopupActionInitializer.js +1 -1
- package/lib/modules/actions/view-edit-popup/UpdateActionInitializer.js +1 -1
- package/lib/modules/blocks/data-blocks/form/__e2e__/form-create/schemaSettings.test.js +1 -1
- package/lib/modules/blocks/data-blocks/form/__e2e__/form-create/templatesOfBug.js +12 -12
- package/lib/modules/blocks/data-blocks/table/__e2e__/templatesOfBug.js +2 -2
- package/lib/modules/blocks/data-blocks/table-selector/__e2e__/templatesOfBug.js +2 -2
- package/lib/modules/dialog/__e2e__/templatesOfBug.js +9 -9
- package/lib/schema-component/antd/association-field/schema.js +1 -1
- package/lib/schema-component/antd/menu/AdminMenu.js +5 -1
- package/lib/schema-component/antd/menu/AdminMenu.style.js +3 -3
- package/lib/schema-component/antd/menu/Menu.Designer.js +4 -2
- package/lib/schema-component/antd/menu/Menu.js +24 -30
- package/lib/schema-component/antd/menu/Menu.styles.js +4 -2
- package/lib/{built-in/assistant/context.js → schema-component/antd/menu/MenuAdd.js} +18 -6
- package/lib/schema-component/antd/menu/{MenuSearch.js → MenuSearchAdd.js} +30 -21
- package/lib/schema-component/antd/menu/MenuSearchAdd.style.js +59 -0
- package/lib/schema-initializer/SchemaInitializerPlugin.js +1 -0
- package/lib/schema-initializer/buttons/TabPaneInitializers.js +9 -0
- package/package.json +7 -7
- package/es/built-in/assistant/Assistant.provider.d.ts +0 -3
- package/es/built-in/assistant/Assistant.provider.mjs +0 -28
- 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 -6
- package/es/built-in/assistant/index.mjs +0 -9
- package/es/schema-component/antd/menu/MenuSearch.d.ts +0 -5
- package/es/schema-component/antd/menu/MenuSearch.mjs +0 -32
- package/lib/built-in/assistant/Assistant.provider.js +0 -62
- package/lib/built-in/assistant/index.js +0 -94
|
@@ -179,7 +179,7 @@ const T2797 = {
|
|
|
179
179
|
type: 'void',
|
|
180
180
|
'x-component': 'Tabs',
|
|
181
181
|
'x-component-props': {},
|
|
182
|
-
'x-initializer': '
|
|
182
|
+
'x-initializer': 'popup:addTab',
|
|
183
183
|
'x-index': 1,
|
|
184
184
|
properties: {
|
|
185
185
|
tab1: {
|
|
@@ -302,7 +302,7 @@ const T2797 = {
|
|
|
302
302
|
type: 'void',
|
|
303
303
|
'x-component': 'Tabs',
|
|
304
304
|
'x-component-props': {},
|
|
305
|
-
'x-initializer': '
|
|
305
|
+
'x-initializer': 'popup:addTab',
|
|
306
306
|
'x-index': 1,
|
|
307
307
|
properties: {
|
|
308
308
|
tab1: {
|
|
@@ -695,7 +695,7 @@ const T2838 = {
|
|
|
695
695
|
type: 'void',
|
|
696
696
|
'x-component': 'Tabs',
|
|
697
697
|
'x-component-props': {},
|
|
698
|
-
'x-initializer': '
|
|
698
|
+
'x-initializer': 'popup:addTab',
|
|
699
699
|
'x-index': 1,
|
|
700
700
|
properties: {
|
|
701
701
|
tab1: {
|
|
@@ -808,7 +808,7 @@ const T2838 = {
|
|
|
808
808
|
type: 'void',
|
|
809
809
|
'x-component': 'Tabs',
|
|
810
810
|
'x-component-props': {},
|
|
811
|
-
'x-initializer': '
|
|
811
|
+
'x-initializer': 'popup:addTab',
|
|
812
812
|
'x-index': 1,
|
|
813
813
|
properties: {
|
|
814
814
|
tab1: {
|
|
@@ -921,7 +921,7 @@ const T2838 = {
|
|
|
921
921
|
type: 'void',
|
|
922
922
|
'x-component': 'Tabs',
|
|
923
923
|
'x-component-props': {},
|
|
924
|
-
'x-initializer': '
|
|
924
|
+
'x-initializer': 'popup:addTab',
|
|
925
925
|
'x-index': 1,
|
|
926
926
|
properties: {
|
|
927
927
|
tab1: {
|
|
@@ -1379,7 +1379,7 @@ const tableWithRoles = {
|
|
|
1379
1379
|
type: 'void',
|
|
1380
1380
|
'x-component': 'Tabs',
|
|
1381
1381
|
'x-component-props': {},
|
|
1382
|
-
'x-initializer': '
|
|
1382
|
+
'x-initializer': 'popup:addTab',
|
|
1383
1383
|
properties: {
|
|
1384
1384
|
tab1: {
|
|
1385
1385
|
_isJSONSchemaObject: true,
|
|
@@ -1593,7 +1593,7 @@ const tableWithUsers = {
|
|
|
1593
1593
|
type: 'void',
|
|
1594
1594
|
'x-component': 'Tabs',
|
|
1595
1595
|
'x-component-props': {},
|
|
1596
|
-
'x-initializer': '
|
|
1596
|
+
'x-initializer': 'popup:addTab',
|
|
1597
1597
|
properties: {
|
|
1598
1598
|
tab1: {
|
|
1599
1599
|
_isJSONSchemaObject: true,
|
|
@@ -1840,7 +1840,7 @@ const tableWithInherit = {
|
|
|
1840
1840
|
type: 'void',
|
|
1841
1841
|
'x-component': 'Tabs',
|
|
1842
1842
|
'x-component-props': {},
|
|
1843
|
-
'x-initializer': '
|
|
1843
|
+
'x-initializer': 'popup:addTab',
|
|
1844
1844
|
properties: {
|
|
1845
1845
|
tab1: {
|
|
1846
1846
|
_isJSONSchemaObject: true,
|
|
@@ -2072,7 +2072,7 @@ const tableWithInheritWithoutAssociation = {
|
|
|
2072
2072
|
type: 'void',
|
|
2073
2073
|
'x-component': 'Tabs',
|
|
2074
2074
|
'x-component-props': {},
|
|
2075
|
-
'x-initializer': '
|
|
2075
|
+
'x-initializer': 'popup:addTab',
|
|
2076
2076
|
properties: {
|
|
2077
2077
|
tab1: {
|
|
2078
2078
|
_isJSONSchemaObject: true,
|
|
@@ -61,14 +61,18 @@ const AdminMenuCard = (props)=>{
|
|
|
61
61
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(schema_namespaceObject.FieldContext.Provider, {
|
|
62
62
|
value: field,
|
|
63
63
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_index_js_namespaceObject.SortableItem, {
|
|
64
|
+
className: "card-wrapper",
|
|
64
65
|
role: "button",
|
|
65
66
|
"aria-label": t(field.title),
|
|
66
67
|
removeParentsIfNoChildren: false,
|
|
68
|
+
overStyle: {
|
|
69
|
+
background: 'transparent'
|
|
70
|
+
},
|
|
67
71
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(DragHandleMenu_js_namespaceObject.DragHandleMenu, {
|
|
68
72
|
className: "drag-handle-menu",
|
|
69
73
|
isAdminMenu: true,
|
|
70
74
|
children: [
|
|
71
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("
|
|
75
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
72
76
|
className: "field-link",
|
|
73
77
|
role: "button",
|
|
74
78
|
"aria-label": t(field.title),
|
|
@@ -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 border: none;\n border-radius: 8px 8px 8px 8px;\n background: #ffffff;\n box-shadow:\n 0px 4px 8px 0px rgba(0, 5, 26, 0.15),\n 0px 0px 8px 0px rgba(0, 5, 26, 0.05);\n\n .ant-card-body {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n justify-items: center;\n gap: 10px;\n grid-row-gap: 10px;\n }\n\n .ant-card-body::before {\n display: none;\n }\n "
|
|
42
|
+
"\n border: none;\n border-radius: 8px 8px 8px 8px;\n background: #ffffff;\n box-shadow:\n 0px 4px 8px 0px rgba(0, 5, 26, 0.15),\n 0px 0px 8px 0px rgba(0, 5, 26, 0.05);\n\n .ant-card-body {\n display: grid;\n grid-template-columns: repeat(3, minmax(120px, 1fr));\n justify-items: center;\n gap: 10px;\n grid-row-gap: 10px;\n }\n\n .ant-card-body::before {\n display: none;\n }\n "
|
|
43
43
|
]);
|
|
44
44
|
_templateObject = function() {
|
|
45
45
|
return data;
|
|
@@ -48,8 +48,8 @@ function _templateObject() {
|
|
|
48
48
|
}
|
|
49
49
|
function _templateObject1() {
|
|
50
50
|
const data = _tagged_template_literal([
|
|
51
|
-
"\n &.ant-card-grid {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n\n width: 100%;\n height:
|
|
52
|
-
";\n }\n\n .tb-sortable-designer {\n width: 100%;\n height: 5rem;\n }\n\n .
|
|
51
|
+
"\n &.ant-card-grid {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n\n width: 100%;\n height: 100%;\n padding: 12px;\n color: inherit;\n border-radius: 8px;\n border: none;\n box-shadow: none;\n\n &:focus,\n &:active {\n background-color: #f4f4f4;\n }\n &:hover {\n border-radius: 8px;\n background-color: #f4f4f4;\n box-shadow: none;\n cursor: pointer;\n }\n\n .card-wrapper {\n width: 100%;\n height: 100%;\n background-color: transparent;\n border: none;\n }\n\n .drag-handle-menu {\n width: 100%;\n height: 100%;\n border-radius: 8px;\n border: none;\n }\n\n .ant-btn-icon {\n font-size: 1.2rem;\n text-align: center;\n }\n }\n\n &.ant-card-grid .ant-btn {\n display: grid;\n place-items: center;\n align-items: end;\n\n width: 100%;\n border: none;\n box-shadow: none;\n }\n\n .field-link {\n display: grid;\n place-items: center;\n\n width: 100%;\n height: 100%;\n padding: 0;\n border: none;\n border-radius: 8px;\n background-color: transparent;\n box-shadow: none;\n\n color: inherit;\n }\n\n .icon-wrapper {\n font-size: 1.2rem;\n text-align: center;\n margin-bottom: 0.3rem;\n }\n\n .field-title {\n text-align: center;\n vertical-align: middle;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: ",
|
|
52
|
+
";\n }\n\n .tb-sortable-designer {\n width: 100%;\n height: 5rem;\n }\n\n .general-schema-designer {\n position: absolute;\n left: 0;\n bottom: 0;\n\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n\n width: 100%;\n height: 45%;\n border-radius: 1px 1px 8px 8px;\n background: rgba(0, 0, 0, 0.5);\n visibility: hidden;\n }\n\n &.ant-card-grid:hover .general-schema-designer {\n visibility: visible;\n }\n\n .general-schema-designer .anticon-menu {\n padding: 1px;\n border-radius: 2px;\n background-color: #ffffff;\n color: #2f2f2f;\n }\n "
|
|
53
53
|
]);
|
|
54
54
|
_templateObject1 = function() {
|
|
55
55
|
return data;
|
|
@@ -26,6 +26,7 @@ var __webpack_require__ = {};
|
|
|
26
26
|
var __webpack_exports__ = {};
|
|
27
27
|
__webpack_require__.r(__webpack_exports__);
|
|
28
28
|
__webpack_require__.d(__webpack_exports__, {
|
|
29
|
+
InsertMenuItemsGroup: ()=>InsertMenuItemsGroup,
|
|
29
30
|
MenuDesigner: ()=>MenuDesigner
|
|
30
31
|
});
|
|
31
32
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
@@ -61,9 +62,9 @@ const findMenuSchema = (fieldSchema)=>{
|
|
|
61
62
|
parent = parent.parent;
|
|
62
63
|
}
|
|
63
64
|
};
|
|
64
|
-
const InsertMenuItemsGroup = ()=>{
|
|
65
|
+
const InsertMenuItemsGroup = (props)=>{
|
|
65
66
|
const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
|
|
66
|
-
const
|
|
67
|
+
const designable = (0, external_index_js_namespaceObject_3.useDesignable)();
|
|
67
68
|
const api = (0, external_index_js_namespaceObject_3.useAPIClient)();
|
|
68
69
|
const serverHooks = [
|
|
69
70
|
{
|
|
@@ -76,6 +77,7 @@ const InsertMenuItemsGroup = ()=>{
|
|
|
76
77
|
}
|
|
77
78
|
];
|
|
78
79
|
const insertPosition = 'beforeEnd';
|
|
80
|
+
const dn = props.dn || designable.dn;
|
|
79
81
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_index_js_namespaceObject_3.SchemaSettingsItemGroup, {
|
|
80
82
|
children: [
|
|
81
83
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_index_js_namespaceObject_3.SchemaSettingsModalItem, {
|
|
@@ -44,7 +44,7 @@ const external_AdminMenu_js_namespaceObject = require("./AdminMenu.js");
|
|
|
44
44
|
const external_locale_js_namespaceObject = require("./locale.js");
|
|
45
45
|
const external_Menu_Designer_js_namespaceObject = require("./Menu.Designer.js");
|
|
46
46
|
const external_Menu_styles_js_namespaceObject = require("./Menu.styles.js");
|
|
47
|
-
const
|
|
47
|
+
const external_MenuSearchAdd_js_namespaceObject = require("./MenuSearchAdd.js");
|
|
48
48
|
const external_tools_js_namespaceObject = require("./tools.js");
|
|
49
49
|
const external_util_js_namespaceObject = require("./util.js");
|
|
50
50
|
function _tagged_template_literal(strings, raw) {
|
|
@@ -65,7 +65,7 @@ function _templateObject() {
|
|
|
65
65
|
return data;
|
|
66
66
|
}
|
|
67
67
|
const HeaderMenu = (param)=>{
|
|
68
|
-
let { others, schema, mode, onSelect, setLoading, setDefaultSelectedKeys,
|
|
68
|
+
let { others, schema, mode, onSelect, setLoading, setDefaultSelectedKeys, designable, render, children } = param;
|
|
69
69
|
const { Component, getMenuItems } = (0, useMenuItem_js_namespaceObject.useMenuItem)();
|
|
70
70
|
const { token } = (0, external_index_js_namespaceObject_1.useToken)();
|
|
71
71
|
const { styles } = (0, external_Menu_styles_js_namespaceObject.useStyles)();
|
|
@@ -184,37 +184,27 @@ const SideMenu = (param)=>{
|
|
|
184
184
|
schema: newSideMenuSchema,
|
|
185
185
|
onlyRenderProperties: true
|
|
186
186
|
}, (0, schema_namespaceObject.uid)()));
|
|
187
|
-
|
|
187
|
+
{
|
|
188
|
+
const dn = (0, external_index_js_namespaceObject.createDesignable)({
|
|
189
|
+
t,
|
|
190
|
+
api,
|
|
191
|
+
refresh,
|
|
192
|
+
current: sideMenuSchemaRef.current
|
|
193
|
+
});
|
|
194
|
+
dn.loadAPIClientEvents();
|
|
188
195
|
const searchMenu = {
|
|
189
196
|
key: 'x-menu-search',
|
|
190
197
|
disabled: true,
|
|
191
|
-
label: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
192
|
-
|
|
198
|
+
label: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_MenuSearchAdd_js_namespaceObject.MenuSearchAdd, {
|
|
199
|
+
designable: designable,
|
|
200
|
+
setSearchMenuTitle: setSearchMenuTitle,
|
|
201
|
+
dn: dn
|
|
193
202
|
}),
|
|
194
203
|
order: -10,
|
|
195
204
|
notdelete: true
|
|
196
205
|
};
|
|
197
206
|
result.push(searchMenu);
|
|
198
207
|
}
|
|
199
|
-
if (designable) result.push({
|
|
200
|
-
key: 'x-designer-button',
|
|
201
|
-
disabled: true,
|
|
202
|
-
label: render({
|
|
203
|
-
'data-testid': 'schema-initializer-Menu-side',
|
|
204
|
-
insert: (s)=>{
|
|
205
|
-
const dn = (0, external_index_js_namespaceObject.createDesignable)({
|
|
206
|
-
t,
|
|
207
|
-
api,
|
|
208
|
-
refresh,
|
|
209
|
-
current: sideMenuSchemaRef.current
|
|
210
|
-
});
|
|
211
|
-
dn.loadAPIClientEvents();
|
|
212
|
-
dn.insertAdjacent('beforeEnd', s);
|
|
213
|
-
}
|
|
214
|
-
}),
|
|
215
|
-
order: -1,
|
|
216
|
-
notdelete: true
|
|
217
|
-
});
|
|
218
208
|
return result;
|
|
219
209
|
}, [
|
|
220
210
|
getMenuItems,
|
|
@@ -282,9 +272,7 @@ const Menu = (0, schema_namespaceObject.observer)((props)=>{
|
|
|
282
272
|
});
|
|
283
273
|
const sensors = (0, core_namespaceObject.useSensors)((0, core_namespaceObject.useSensor)(core_namespaceObject.PointerSensor, {
|
|
284
274
|
activationConstraint: {
|
|
285
|
-
distance:
|
|
286
|
-
delay: 300,
|
|
287
|
-
tolerance: 5
|
|
275
|
+
distance: 5
|
|
288
276
|
}
|
|
289
277
|
}));
|
|
290
278
|
const sideMenuSchema = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
@@ -342,9 +330,6 @@ const Menu = (0, schema_namespaceObject.observer)((props)=>{
|
|
|
342
330
|
onSelect: onSelect,
|
|
343
331
|
setLoading: setLoading,
|
|
344
332
|
setDefaultSelectedKeys: setDefaultSelectedKeys,
|
|
345
|
-
defaultSelectedKeys: defaultSelectedKeys,
|
|
346
|
-
defaultOpenKeys: defaultOpenKeys,
|
|
347
|
-
selectedKeys: selectedKeys,
|
|
348
333
|
designable: designable,
|
|
349
334
|
render: render,
|
|
350
335
|
children: children
|
|
@@ -400,6 +385,9 @@ Menu.Item = (0, schema_namespaceObject.observer)((props)=>{
|
|
|
400
385
|
"aria-label": t(field.title),
|
|
401
386
|
className: styles.designerCss,
|
|
402
387
|
removeParentsIfNoChildren: false,
|
|
388
|
+
overStyle: {
|
|
389
|
+
background: 'transparent'
|
|
390
|
+
},
|
|
403
391
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(DragHandleMenu_js_namespaceObject.DragHandleMenu, {
|
|
404
392
|
children: [
|
|
405
393
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
|
|
@@ -471,6 +459,9 @@ Menu.URL = (0, schema_namespaceObject.observer)((props)=>{
|
|
|
471
459
|
className: styles.designerCss,
|
|
472
460
|
removeParentsIfNoChildren: false,
|
|
473
461
|
"aria-label": t(field.title),
|
|
462
|
+
overStyle: {
|
|
463
|
+
background: 'transparent'
|
|
464
|
+
},
|
|
474
465
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(DragHandleMenu_js_namespaceObject.DragHandleMenu, {
|
|
475
466
|
children: [
|
|
476
467
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
|
|
@@ -539,6 +530,9 @@ Menu.SubMenu = (0, schema_namespaceObject.observer)((props)=>{
|
|
|
539
530
|
className: styles.subMenuDesignerCss,
|
|
540
531
|
removeParentsIfNoChildren: false,
|
|
541
532
|
"aria-label": t(field.title),
|
|
533
|
+
overStyle: {
|
|
534
|
+
background: 'transparent'
|
|
535
|
+
},
|
|
542
536
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(DragHandleMenu_js_namespaceObject.DragHandleMenu, {
|
|
543
537
|
name: schema.name,
|
|
544
538
|
isSubMenu: true,
|
|
@@ -57,7 +57,9 @@ function _templateObject1() {
|
|
|
57
57
|
}
|
|
58
58
|
function _templateObject2() {
|
|
59
59
|
const data = _tagged_template_literal([
|
|
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:
|
|
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: ",
|
|
61
|
+
";\n\n /* 使用 clip-path 裁剪为梯形 */\n clip-path: polygon(0 0, 100% 15%, 100% 85%, 0 100%);\n }\n }\n\n .ant-menu-submenu.ant-menu-submenu-inline.ant-menu-submenu-open > .ant-menu-submenu-title {\n ::before {\n background-color: ",
|
|
62
|
+
";\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
63
|
]);
|
|
62
64
|
_templateObject2 = function() {
|
|
63
65
|
return data;
|
|
@@ -87,7 +89,7 @@ const useStyles = (0, external_antd_style_namespaceObject.createStyles)((param)=
|
|
|
87
89
|
return {
|
|
88
90
|
subMenuDesignerCss: css(_templateObject()),
|
|
89
91
|
designerCss: css(_templateObject1()),
|
|
90
|
-
sideMenuClass: css(_templateObject2()),
|
|
92
|
+
sideMenuClass: css(_templateObject2(), token.colorBorder, token.colorPrimaryText),
|
|
91
93
|
menuItemClass: css(_templateObject3()),
|
|
92
94
|
headerMenuClass: css(_templateObject4())
|
|
93
95
|
};
|
|
@@ -26,13 +26,25 @@ 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
|
-
const
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
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
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
};
|
|
36
48
|
var __webpack_export_target__ = exports;
|
|
37
49
|
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
38
50
|
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
@@ -39,38 +39,47 @@ var __webpack_require__ = {};
|
|
|
39
39
|
var __webpack_exports__ = {};
|
|
40
40
|
__webpack_require__.r(__webpack_exports__);
|
|
41
41
|
__webpack_require__.d(__webpack_exports__, {
|
|
42
|
-
|
|
42
|
+
MenuSearchAdd: ()=>MenuSearchAdd
|
|
43
43
|
});
|
|
44
44
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
45
45
|
const external_antd_namespaceObject = require("antd");
|
|
46
46
|
const external_lodash_namespaceObject = require("lodash");
|
|
47
47
|
var external_lodash_default = /*#__PURE__*/ __webpack_require__.n(external_lodash_namespaceObject);
|
|
48
48
|
const external_index_js_namespaceObject = require("../../../index.js");
|
|
49
|
-
const
|
|
50
|
-
|
|
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;
|
|
51
53
|
const { t } = (0, external_index_js_namespaceObject.useTranslation)();
|
|
52
|
-
const
|
|
53
|
-
|
|
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);
|
|
54
59
|
}, 500);
|
|
55
60
|
const handleSearch = (value, event)=>{
|
|
56
61
|
event.stopPropagation();
|
|
57
|
-
|
|
58
|
-
};
|
|
59
|
-
const handleClear = (event)=>{
|
|
60
|
-
if ('' === event.target.value) {
|
|
61
|
-
event.stopPropagation();
|
|
62
|
-
debounceChangeValue('');
|
|
63
|
-
}
|
|
62
|
+
external_lodash_default().debounce(setSearchMenuTitle, 500)(value.trim());
|
|
64
63
|
};
|
|
65
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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
|
+
]
|
|
74
83
|
});
|
|
75
84
|
};
|
|
76
85
|
var __webpack_export_target__ = exports;
|
|
@@ -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 /* NOTE: 这里的样式是为了让搜索框的样式, 避免上层 antd 写死的 padding-left: 24px 的影响 */\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n\n /* NOTE: 放这三个样式是为了提升选择器优先级, 覆盖掉 antd 的默认样式 */\n .ant-input-outlined.ant-input-outlined.ant-input-outlined {\n background-color: #f9f9f9;\n border-radius: 5px;\n border: none;\n box-shadow: none;\n }\n\n /* 移除 antd 默认的后置搜索图标 */\n .ant-input-group-addon {\n display: none;\n }\n\n .menu-add-wrapper {\n .ant-dropdown-trigger {\n display: grid;\n place-items: center;\n\n width: 30px;\n /* 这里是为了和前边元素保持对齐, antd 组件写死了高度 */\n height: 28px;\n\n cursor: pointer;\n\n :hover,\n :active {\n border-radius: 5px;\n color: #ffffff;\n background-color: #f4f4f4;\n }\n }\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
|
+
menuSearchAdd: 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
|
+
});
|
|
@@ -154,6 +154,7 @@ class SchemaInitializerPlugin extends Plugin_js_namespaceObject.Plugin {
|
|
|
154
154
|
this.app.schemaInitializerManager.add(external_buttons_index_js_namespaceObject.tabPaneInitializersForRecordBlock);
|
|
155
155
|
this.app.schemaInitializerManager.add(external_buttons_index_js_namespaceObject.tabPaneInitializersForBulkEditFormBlock);
|
|
156
156
|
this.app.schemaInitializerManager.add(menuItemInitializer_js_namespaceObject.menuItemInitializer);
|
|
157
|
+
this.app.schemaInitializerManager.add(external_buttons_index_js_namespaceObject.tabPaneInitializers);
|
|
157
158
|
}
|
|
158
159
|
}
|
|
159
160
|
var __webpack_export_target__ = exports;
|
|
@@ -26,6 +26,7 @@ var __webpack_require__ = {};
|
|
|
26
26
|
var __webpack_exports__ = {};
|
|
27
27
|
__webpack_require__.r(__webpack_exports__);
|
|
28
28
|
__webpack_require__.d(__webpack_exports__, {
|
|
29
|
+
tabPaneInitializers: ()=>tabPaneInitializers,
|
|
29
30
|
tabPaneInitializersForRecordBlock: ()=>tabPaneInitializersForRecordBlock,
|
|
30
31
|
tabPaneInitializers_deprecated: ()=>tabPaneInitializers_deprecated,
|
|
31
32
|
TabPaneInitializersForCreateFormBlock: ()=>TabPaneInitializersForCreateFormBlock,
|
|
@@ -179,11 +180,19 @@ const TabPaneInitializersForBulkEditFormBlock = (props)=>/*#__PURE__*/ (0, jsx_r
|
|
|
179
180
|
...props,
|
|
180
181
|
isBulkEdit: true
|
|
181
182
|
});
|
|
183
|
+
const commonOptions = {
|
|
184
|
+
Component: TabPaneInitializers,
|
|
185
|
+
popover: false
|
|
186
|
+
};
|
|
182
187
|
const tabPaneInitializers_deprecated = new SchemaInitializer_js_namespaceObject.SchemaInitializer({
|
|
183
188
|
name: 'TabPaneInitializers',
|
|
184
189
|
Component: TabPaneInitializers,
|
|
185
190
|
popover: false
|
|
186
191
|
});
|
|
192
|
+
const tabPaneInitializers = new SchemaInitializer_js_namespaceObject.SchemaInitializer({
|
|
193
|
+
name: 'popup:addTab',
|
|
194
|
+
...commonOptions
|
|
195
|
+
});
|
|
187
196
|
const tabPaneInitializersForRecordBlock = new SchemaInitializer_js_namespaceObject.SchemaInitializer({
|
|
188
197
|
name: 'TabPaneInitializersForCreateFormBlock',
|
|
189
198
|
Component: TabPaneInitializersForCreateFormBlock,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tachybase/client",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.41",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -64,12 +64,12 @@
|
|
|
64
64
|
"react-zoom-pan-pinch": "^3.6.1",
|
|
65
65
|
"sanitize-html": "2.14.0",
|
|
66
66
|
"use-deep-compare-effect": "^1.8.1",
|
|
67
|
-
"@tachybase/components": "0.23.
|
|
68
|
-
"@tachybase/
|
|
69
|
-
"@tachybase/
|
|
70
|
-
"@tachybase/
|
|
71
|
-
"@tachybase/
|
|
72
|
-
"@tachybase/
|
|
67
|
+
"@tachybase/components": "0.23.41",
|
|
68
|
+
"@tachybase/evaluators": "0.23.41",
|
|
69
|
+
"@tachybase/requirejs": "0.23.41",
|
|
70
|
+
"@tachybase/sdk": "0.23.41",
|
|
71
|
+
"@tachybase/utils": "0.23.41",
|
|
72
|
+
"@tachybase/schema": "0.23.41"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@testing-library/react": "^14.3.1",
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
|
|
2
|
-
import * as __WEBPACK_EXTERNAL_MODULE__ant_design_icons__ from "@ant-design/icons";
|
|
3
|
-
import * as __WEBPACK_EXTERNAL_MODULE_antd__ from "antd";
|
|
4
|
-
import * as __WEBPACK_EXTERNAL_MODULE__acl_index_mjs__ from "../acl/index.mjs";
|
|
5
|
-
import * as __WEBPACK_EXTERNAL_MODULE__pinned_list_index_mjs__ from "../pinned-list/index.mjs";
|
|
6
|
-
const AssistantProvider = (param)=>{
|
|
7
|
-
let { children } = param;
|
|
8
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsxs)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.Fragment, {
|
|
9
|
-
children: [
|
|
10
|
-
children,
|
|
11
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__acl_index_mjs__.ACLRolesCheckProvider, {
|
|
12
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd__.FloatButton.Group, {
|
|
13
|
-
trigger: "click",
|
|
14
|
-
type: "default",
|
|
15
|
-
style: {
|
|
16
|
-
right: 24,
|
|
17
|
-
zIndex: 1250
|
|
18
|
-
},
|
|
19
|
-
icon: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__ant_design_icons__.ToolOutlined, {}),
|
|
20
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__pinned_list_index_mjs__.PinnedPluginList, {
|
|
21
|
-
belongToFilter: "hoverbutton"
|
|
22
|
-
})
|
|
23
|
-
})
|
|
24
|
-
})
|
|
25
|
-
]
|
|
26
|
-
});
|
|
27
|
-
};
|
|
28
|
-
export { AssistantProvider };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as __WEBPACK_EXTERNAL_MODULE__application_Plugin_mjs__ from "../../application/Plugin.mjs";
|
|
2
|
-
export * from "./context.mjs";
|
|
3
|
-
export * from "./Assistant.provider.mjs";
|
|
4
|
-
class PluginAssistant extends __WEBPACK_EXTERNAL_MODULE__application_Plugin_mjs__.Plugin {
|
|
5
|
-
async afterLoad() {
|
|
6
|
-
this.app.use(AssistantProvider);
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
export { PluginAssistant };
|