@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
|
@@ -0,0 +1,69 @@
|
|
|
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 display: flex;\n justify-content: flex-start;\n align-items: center;\n width: 100%;\n padding: 0 10px;\n "
|
|
43
|
+
]);
|
|
44
|
+
_templateObject = function() {
|
|
45
|
+
return data;
|
|
46
|
+
};
|
|
47
|
+
return data;
|
|
48
|
+
}
|
|
49
|
+
function _templateObject1() {
|
|
50
|
+
const data = _tagged_template_literal([
|
|
51
|
+
"\n flex: 0 1 auto;\n position: relative;\n\n display: inline-flex;\n justify-content: center;\n align-items: center;\n gap: 8px;\n min-width: 10px;\n height: 32px;\n margin: 6px 2px;\n padding: 4px 15px;\n border: 1px solid transparent;\n border-radius: 6px;\n overflow: hidden;\n\n background-image: none;\n background: transparent;\n color: rgba(255, 255, 255, 0.88);\n\n font-size: 14px;\n font-weight: 400;\n line-height: 1.5714285714285714;\n outline: none;\n text-align: center;\n touch-action: manipulation;\n user-select: none;\n white-space: nowrap;\n cursor: pointer;\n\n transition: all 0.1s cubic-bezier(0.645, 0.045, 0.355, 1);\n\n &.active {\n background-color: rgba(0, 0, 0, 0.07);\n }\n\n .tab-text {\n min-width: 5px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n "
|
|
52
|
+
]);
|
|
53
|
+
_templateObject1 = function() {
|
|
54
|
+
return data;
|
|
55
|
+
};
|
|
56
|
+
return data;
|
|
57
|
+
}
|
|
58
|
+
const useStyles = (0, external_antd_style_namespaceObject.createStyles)((param)=>{
|
|
59
|
+
let { css, token } = param;
|
|
60
|
+
return {
|
|
61
|
+
tabWrapper: css(_templateObject()),
|
|
62
|
+
tabHeader: css(_templateObject1())
|
|
63
|
+
};
|
|
64
|
+
});
|
|
65
|
+
var __webpack_export_target__ = exports;
|
|
66
|
+
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
67
|
+
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
68
|
+
value: true
|
|
69
|
+
});
|
|
@@ -46,7 +46,7 @@ function _tagged_template_literal(strings, raw) {
|
|
|
46
46
|
}
|
|
47
47
|
function _templateObject() {
|
|
48
48
|
const data = _tagged_template_literal([
|
|
49
|
-
"\n display: inline-block;\n .ant-btn {\n border: 0;\n height: var(--tb-header-height);\n width: 46px;\n border-radius: 0;\n background: none;\n color: rgba(255, 255, 255, 0.65);\n &:hover {\n background: rgba(255, 255, 255, 0.1) !important;\n }\n }\n "
|
|
49
|
+
"\n display: inline-block;\n .ant-btn {\n border: 0;\n height: var(--tb-header-height);\n width: 46px;\n border-radius: 0;\n background: none;\n color: rgba(255, 255, 255, 0.65);\n &:hover {\n background: rgba(255, 255, 255, 0.1) !important;\n }\n }\n .ant-float-btn {\n margin-bottom: 16px;\n }\n "
|
|
50
50
|
]);
|
|
51
51
|
_templateObject = function() {
|
|
52
52
|
return data;
|
|
@@ -72,18 +72,19 @@ const useStyles = (0, external_antd_style_namespaceObject.createStyles)((param)=
|
|
|
72
72
|
container: css(_templateObject())
|
|
73
73
|
};
|
|
74
74
|
});
|
|
75
|
-
const PinnedPluginList = ()=>{
|
|
75
|
+
const PinnedPluginList = (param)=>{
|
|
76
|
+
let { belongToFilter } = param;
|
|
76
77
|
const { allowAll, snippets } = (0, index_js_namespaceObject.useACLRoleContext)();
|
|
77
78
|
const getSnippetsAllow = function(aclKey) {
|
|
78
79
|
let isPublic = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
|
|
79
80
|
return allowAll || isPublic || (null == snippets ? void 0 : snippets.includes(aclKey));
|
|
80
81
|
};
|
|
81
|
-
const { styles } = useStyles();
|
|
82
|
+
const { styles } = useStyles(belongToFilter);
|
|
82
83
|
const ctx = (0, external_react_namespaceObject.useContext)(external_context_js_namespaceObject.PinnedPluginListContext);
|
|
83
84
|
const { components } = (0, external_react_namespaceObject.useContext)(schema_namespaceObject.SchemaOptionsContext);
|
|
84
85
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
85
86
|
className: styles.container,
|
|
86
|
-
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)=>{
|
|
87
|
+
children: Object.keys(ctx.items).filter((key)=>ctx.items[key].belongTo === belongToFilter).sort((a, b)=>ctx.items[a].order - ctx.items[b].order).filter((key)=>getSnippetsAllow(ctx.items[key].snippet, ctx.items[key].isPublic)).map((key)=>{
|
|
87
88
|
const Action = (0, external_lodash_namespaceObject.get)(components, ctx.items[key].component);
|
|
88
89
|
return Action ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Action, {}, key) : null;
|
|
89
90
|
})
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
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
|
+
})();
|
|
3
16
|
(()=>{
|
|
4
17
|
__webpack_require__.d = function(exports1, definition) {
|
|
5
18
|
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
@@ -29,6 +42,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29
42
|
useJoystick: ()=>useJoystick
|
|
30
43
|
});
|
|
31
44
|
const external_react_namespaceObject = require("react");
|
|
45
|
+
const external_lodash_namespaceObject = require("lodash");
|
|
46
|
+
var external_lodash_default = /*#__PURE__*/ __webpack_require__.n(external_lodash_namespaceObject);
|
|
32
47
|
const useJoystick = (ref, callbacks)=>{
|
|
33
48
|
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
34
49
|
if (!ref.current) return;
|
|
@@ -47,6 +62,7 @@ const useJoystick = (ref, callbacks)=>{
|
|
|
47
62
|
let moveY = 0;
|
|
48
63
|
let displayX = 0;
|
|
49
64
|
let displayY = 0;
|
|
65
|
+
const debouncedOnMousewheel = external_lodash_default().debounce(onMousewheel, 16);
|
|
50
66
|
ele.addEventListener('mousedown', down);
|
|
51
67
|
ele.addEventListener('mousemove', move);
|
|
52
68
|
ele.addEventListener('mouseup', up);
|
|
@@ -54,7 +70,7 @@ const useJoystick = (ref, callbacks)=>{
|
|
|
54
70
|
ele.addEventListener('touchmove', move);
|
|
55
71
|
ele.addEventListener('touchend', up);
|
|
56
72
|
ele.addEventListener('contextmenu', onContextmenu);
|
|
57
|
-
ele.addEventListener('mousewheel',
|
|
73
|
+
ele.addEventListener('mousewheel', debouncedOnMousewheel);
|
|
58
74
|
const stickEle = createStickCanvas();
|
|
59
75
|
const baseEle = createBaseCanvas();
|
|
60
76
|
ele.appendChild(baseEle);
|
|
@@ -29,15 +29,16 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29
29
|
SettingLayout: ()=>SettingLayout
|
|
30
30
|
});
|
|
31
31
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
32
|
-
require("react");
|
|
33
32
|
const icons_namespaceObject = require("@ant-design/icons");
|
|
34
33
|
const pro_components_namespaceObject = require("@ant-design/pro-components");
|
|
35
34
|
const external_antd_namespaceObject = require("antd");
|
|
36
35
|
const external_react_router_namespaceObject = require("react-router");
|
|
36
|
+
const external_index_js_namespaceObject = require("../../index.js");
|
|
37
37
|
const index_js_namespaceObject = require("../../user/index.js");
|
|
38
38
|
const external_admin_layout_index_js_namespaceObject = require("../admin-layout/index.js");
|
|
39
39
|
const AdminProvider_js_namespaceObject = require("../admin-layout/AdminProvider.js");
|
|
40
40
|
const external_system_settings_index_js_namespaceObject = require("../system-settings/index.js");
|
|
41
|
+
const external_style_js_namespaceObject = require("./style.js");
|
|
41
42
|
const SettingLayout = (param)=>{
|
|
42
43
|
let { selectedKeys, onClick, route, children, fullscreen } = param;
|
|
43
44
|
var _result_data_data, _result_data, _result_data_data_logo, _result_data_data1, _result_data1, _data_data, _data_data1, _data_data2;
|
|
@@ -50,18 +51,26 @@ const SettingLayout = (param)=>{
|
|
|
50
51
|
fixedHeader: true,
|
|
51
52
|
siderMenuType: 'sub'
|
|
52
53
|
};
|
|
54
|
+
const app = (0, external_index_js_namespaceObject.useApp)();
|
|
53
55
|
const location = (0, external_react_router_namespaceObject.useLocation)();
|
|
54
56
|
const navigate = (0, external_react_router_namespaceObject.useNavigate)();
|
|
55
57
|
const { data } = (0, index_js_namespaceObject.useCurrentUserContext)();
|
|
56
58
|
const result = (0, external_system_settings_index_js_namespaceObject.useSystemSettings)();
|
|
59
|
+
const { styles } = (0, external_style_js_namespaceObject.useStyles)();
|
|
60
|
+
const redirectToUserHome = ()=>{
|
|
61
|
+
if (app.adminUrl.startsWith('/')) navigate(app.adminUrl);
|
|
62
|
+
else window.location.href = app.adminUrl;
|
|
63
|
+
};
|
|
57
64
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(AdminProvider_js_namespaceObject.AdminProvider, {
|
|
58
65
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pro_components_namespaceObject.ProConfigProvider, {
|
|
59
66
|
hashed: false,
|
|
60
67
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pro_components_namespaceObject.ProLayout, {
|
|
68
|
+
className: styles.settingLayout,
|
|
61
69
|
title: null == result ? void 0 : null === (_result_data = result.data) || void 0 === _result_data ? void 0 : null === (_result_data_data = _result_data.data) || void 0 === _result_data_data ? void 0 : _result_data_data.title,
|
|
62
70
|
logo: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("img", {
|
|
63
71
|
src: null == result ? void 0 : null === (_result_data1 = result.data) || void 0 === _result_data1 ? void 0 : null === (_result_data_data1 = _result_data1.data) || void 0 === _result_data_data1 ? void 0 : null === (_result_data_data_logo = _result_data_data1.logo) || void 0 === _result_data_data_logo ? void 0 : _result_data_data_logo.url
|
|
64
72
|
}),
|
|
73
|
+
onMenuHeaderClick: redirectToUserHome,
|
|
65
74
|
bgLayoutImgList: [
|
|
66
75
|
{
|
|
67
76
|
src: 'https://img.alicdn.com/imgextra/i2/O1CN01O4etvp1DvpFLKfuWq_!!6000000000279-2-tps-609-606.png',
|
|
@@ -26,13 +26,32 @@ var __webpack_require__ = {};
|
|
|
26
26
|
var __webpack_exports__ = {};
|
|
27
27
|
__webpack_require__.r(__webpack_exports__);
|
|
28
28
|
__webpack_require__.d(__webpack_exports__, {
|
|
29
|
-
|
|
29
|
+
useStyles: ()=>useStyles
|
|
30
30
|
});
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
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 /* Depends on antd's ProLayout component structure */\n .ant-pro-global-header-logo {\n cursor: pointer;\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
|
+
settingLayout: css(_templateObject())
|
|
53
|
+
};
|
|
34
54
|
});
|
|
35
|
-
AssistantListContext.displayName = 'AssistantListContext';
|
|
36
55
|
var __webpack_export_target__ = exports;
|
|
37
56
|
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
38
57
|
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
@@ -147,21 +147,49 @@ const useKanbanEvents = ()=>{
|
|
|
147
147
|
}
|
|
148
148
|
};
|
|
149
149
|
};
|
|
150
|
-
const
|
|
150
|
+
const toOneField = (field)=>[
|
|
151
|
+
'belongsTo',
|
|
152
|
+
'hasOne'
|
|
153
|
+
].includes(field.type);
|
|
154
|
+
const useSortFields = function(collectionName) {
|
|
155
|
+
let depth = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1, parentFieldName = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : '', parentLabel = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : '';
|
|
156
|
+
const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
|
|
151
157
|
const { getCollectionFields, getInterface } = (0, external_index_js_namespaceObject.useCollectionManager_deprecated)();
|
|
152
158
|
const fields = getCollectionFields(collectionName);
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
-
return
|
|
158
|
-
|
|
159
|
+
if (!Array.isArray(fields) || 0 === fields.length) return [];
|
|
160
|
+
fields.sort((a, b)=>{
|
|
161
|
+
const toOnFieldA = toOneField(a);
|
|
162
|
+
const toOnFieldB = toOneField(b);
|
|
163
|
+
if (toOnFieldA && !toOnFieldB) return 1;
|
|
164
|
+
if (!toOnFieldA && toOnFieldB) return -1;
|
|
165
|
+
return a.sort - b.sort;
|
|
166
|
+
});
|
|
167
|
+
return fields.map((field)=>{
|
|
159
168
|
var _field_uiSchema;
|
|
160
|
-
return
|
|
161
|
-
|
|
162
|
-
|
|
169
|
+
if (!field.interface) return null;
|
|
170
|
+
const fieldInterface = getInterface(field.interface);
|
|
171
|
+
if (!(null == fieldInterface ? void 0 : fieldInterface.sortable) && !toOneField(field)) return null;
|
|
172
|
+
if (!(null == fieldInterface ? void 0 : fieldInterface.sortable) && depth >= 2) return null;
|
|
173
|
+
if (field.target === collectionName) return null;
|
|
174
|
+
const value = parentFieldName ? "".concat(parentFieldName, ".").concat(field.name) : field.name;
|
|
175
|
+
const currentLabel = (null == field ? void 0 : null === (_field_uiSchema = field.uiSchema) || void 0 === _field_uiSchema ? void 0 : _field_uiSchema.title) || field.name;
|
|
176
|
+
let fullLabel = '';
|
|
177
|
+
if (parentLabel) {
|
|
178
|
+
if (parentLabel.includes('{{') || currentLabel.includes('{{')) {
|
|
179
|
+
const formatLabel = (label)=>label.includes('{{t(') ? "t(".concat(label.slice(4, -3), ")") : label.includes('{{') ? "t(".concat(label.slice(2, -2), ")") : '"'.concat(label, '"');
|
|
180
|
+
let formattedParentLabel = formatLabel(parentLabel);
|
|
181
|
+
const formattedCurrentLabel = formatLabel(currentLabel);
|
|
182
|
+
fullLabel = "{{t(".concat(formattedParentLabel, ' + "/" + ').concat(formattedCurrentLabel, ")}}");
|
|
183
|
+
} else fullLabel = "".concat(parentLabel, " / ").concat(currentLabel);
|
|
184
|
+
} else fullLabel = currentLabel;
|
|
185
|
+
const option = {
|
|
186
|
+
label: currentLabel,
|
|
187
|
+
fullLabel,
|
|
188
|
+
value
|
|
163
189
|
};
|
|
164
|
-
|
|
190
|
+
if (field.target) option.children = useSortFields(field.target, depth + 1, value, fullLabel);
|
|
191
|
+
return option;
|
|
192
|
+
}).filter(Boolean);
|
|
165
193
|
};
|
|
166
194
|
const useChildrenCollections = (collectionName)=>{
|
|
167
195
|
const { getChildrenCollections } = (0, external_index_js_namespaceObject.useCollectionManager_deprecated)();
|
package/lib/icon/preloaded.js
CHANGED
|
@@ -73,7 +73,7 @@ const Approval = ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("svg",
|
|
|
73
73
|
]
|
|
74
74
|
});
|
|
75
75
|
const ApprovalNew = ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("svg", {
|
|
76
|
-
|
|
76
|
+
fillRule: "evenodd",
|
|
77
77
|
viewBox: "0 0 34 34",
|
|
78
78
|
focusable: "false",
|
|
79
79
|
fill: "currentColor",
|
|
@@ -88,7 +88,7 @@ const ApprovalNew = ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("svg"
|
|
|
88
88
|
id: "Ellipse 42",
|
|
89
89
|
d: "M16.8963 7C14.6872 7 12.8963 8.79086 12.8963 11C12.8963 12.2907 13.5076 13.4385 14.4564 14.1699C14.7966 14.4322 15.018 14.8415 14.9526 15.266L14.6723 17.0856C14.5972 17.5734 14.1774 17.9334 13.6839 17.9334H10.999C10.4467 17.9334 9.99902 18.3811 9.99902 18.9334V22.012",
|
|
90
90
|
stroke: "white",
|
|
91
|
-
|
|
91
|
+
strokeWidth: "1.5"
|
|
92
92
|
}),
|
|
93
93
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
|
|
94
94
|
id: "Ellipse 43",
|
|
@@ -99,8 +99,8 @@ const ApprovalNew = ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("svg"
|
|
|
99
99
|
id: "Vector 5",
|
|
100
100
|
d: "M10.0479 25.0195H23.7546",
|
|
101
101
|
stroke: "white",
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
strokeWidth: "1.5",
|
|
103
|
+
strokeLinecap: "round"
|
|
104
104
|
})
|
|
105
105
|
]
|
|
106
106
|
})
|