@tachybase/client 0.23.58 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/api-client/APIClient.d.ts +5 -2
- package/es/api-client/APIClient.mjs +93 -49
- package/es/api-client/hooks/useRequest.d.ts +2 -0
- package/es/application/Application.d.ts +3 -0
- package/es/application/Application.mjs +11 -0
- package/es/application/CustomRouterContextProvider.d.ts +54 -0
- package/es/application/CustomRouterContextProvider.mjs +209 -0
- package/es/application/RouterManager.d.ts +8 -3
- package/es/application/RouterManager.mjs +48 -15
- package/es/application/schema-initializer/context/index.d.ts +1 -1
- package/es/block-provider/hooks/index.d.ts +2 -0
- package/es/block-provider/hooks/index.mjs +25 -21
- package/es/built-in/context-menu/ContextMenu.provider.mjs +6 -6
- package/es/built-in/context-menu/ContextMenuItemsProps.d.ts +4 -4
- package/es/built-in/context-menu/ContextMenuItemsProps.mjs +6 -6
- package/es/built-in/context-menu/index.mjs +1 -1
- package/es/built-in/context-menu/useContextMenu.d.ts +2 -2
- package/es/built-in/index.mjs +5 -0
- package/es/built-in/page-style/PageStyle.provider.mjs +2 -2
- package/es/collection-manager/templates/sql.d.ts +1 -1
- package/es/collection-manager/templates/view.d.ts +1 -1
- package/es/data-source/collection-field-interface/CollectionFieldInterface.d.ts +1 -0
- package/es/data-source/collection-field-interface/CollectionFieldInterface.mjs +18 -0
- package/es/data-source/collection-field-interface/CollectionFieldInterfaceManager.d.ts +8 -1
- package/es/data-source/collection-field-interface/CollectionFieldInterfaceManager.mjs +20 -0
- package/es/data-source/commonsSettingsItem/fieldComponent.mjs +3 -1
- package/es/data-source/data-source/DataSource.d.ts +1 -1
- package/es/filter-provider/utils.mjs +6 -0
- package/es/i18n/i18n.mjs +7 -12
- package/es/modules/actions/delete/deleteActionSettings.mjs +10 -0
- package/es/modules/blocks/data-blocks/form/FilterItemCustomSettings.mjs +1 -1
- package/es/modules/blocks/data-blocks/form/fieldSettingsFormItem.mjs +9 -4
- package/es/modules/blocks/data-blocks/table/hooks/useTableBlockProps.mjs +2 -2
- package/es/modules/blocks/data-blocks/table/tableBlockSettings.mjs +4 -0
- package/es/modules/blocks/data-blocks/table/tableColumnSettings.mjs +44 -0
- package/es/modules/blocks/filter-blocks/collapse/filterCollapseItemFieldSettings.mjs +4 -0
- package/es/modules/blocks/filter-blocks/form/filterFormItemFieldSettings.mjs +9 -0
- package/es/modules/fields/component/SubTable/secondLevelSelect.d.ts +11 -0
- package/es/modules/fields/component/SubTable/secondLevelSelect.mjs +102 -0
- package/es/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.d.ts +79 -41
- package/es/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.mjs +103 -100
- package/es/powered-by/index.mjs +4 -7
- package/es/schema-component/antd/action/Action.Designer.mjs +38 -3
- package/es/schema-component/antd/action/Action.Modal.mjs +0 -1
- package/es/schema-component/antd/action/Action.mjs +1 -3
- package/es/schema-component/antd/association-field/SubTabs/InternalCollapse.mjs +2 -1
- package/es/schema-component/antd/checkbox/Checkbox.mjs +6 -4
- package/es/schema-component/antd/index.d.ts +1 -0
- package/es/schema-component/antd/index.mjs +1 -0
- package/es/schema-component/antd/media-card/MediaCard.d.ts +11 -0
- package/es/schema-component/antd/media-card/MediaCard.mjs +35 -0
- package/es/schema-component/antd/media-card/index.d.ts +1 -0
- package/es/schema-component/antd/media-card/index.mjs +1 -0
- package/es/schema-component/antd/media-card/style.d.ts +3 -0
- package/es/schema-component/antd/media-card/style.mjs +25 -0
- package/es/schema-component/antd/page/Page.mjs +34 -24
- package/es/schema-component/antd/password/utils.d.ts +1 -1
- package/es/schema-component/common/dnd-context/index.mjs +1 -7
- package/es/schema-component/common/sortable-item/DragHandlePageTab.d.ts +1 -0
- package/es/schema-component/common/sortable-item/DragHandlePageTab.mjs +71 -0
- package/es/schema-component/common/sortable-item/DragHandlePageTab.style.d.ts +3 -0
- package/es/schema-component/common/sortable-item/DragHandlePageTab.style.mjs +25 -0
- package/es/schema-items/GeneralSettings.mjs +5 -0
- package/es/schema-settings/EditCustomDefaultValue.mjs +1 -1
- package/es/schema-settings/SchemaSettings.mjs +1 -1
- package/es/schema-settings/SchemaSettingsDefaultValue.mjs +2 -0
- package/es/schema-settings/utils/createModalSettingsItem.d.ts +26 -0
- package/es/schema-settings/utils/createModalSettingsItem.mjs +46 -0
- package/es/schema-settings/utils/createSelectSettingsItem.d.ts +25 -0
- package/es/schema-settings/utils/createSelectSettingsItem.mjs +40 -0
- package/es/schema-settings/utils/createSwitchSettingsItem.d.ts +21 -0
- package/es/schema-settings/utils/createSwitchSettingsItem.mjs +38 -0
- package/es/schema-settings/utils/createTextSettingsItem.d.ts +9 -0
- package/es/schema-settings/utils/createTextSettingsItem.mjs +21 -0
- package/es/schema-settings/utils/index.d.ts +4 -0
- package/es/schema-settings/utils/index.mjs +4 -0
- package/es/schema-settings/utils/util.d.ts +12 -0
- package/es/schema-settings/utils/util.mjs +24 -0
- package/es/user/CurrentUserProvider.mjs +6 -3
- package/lib/api-client/APIClient.js +93 -49
- package/lib/application/Application.js +11 -0
- package/lib/application/CustomRouterContextProvider.js +276 -0
- package/lib/application/RouterManager.js +49 -15
- package/lib/application/schema-initializer/hooks/index.js +2 -2
- package/lib/block-provider/hooks/index.js +76 -58
- package/lib/built-in/context-menu/ContextMenu.provider.js +6 -6
- package/lib/built-in/context-menu/ContextMenuItemsProps.js +6 -6
- package/lib/built-in/context-menu/index.js +1 -1
- package/lib/built-in/index.js +5 -0
- package/lib/built-in/page-style/PageStyle.provider.js +2 -2
- package/lib/data-source/collection-field-interface/CollectionFieldInterface.js +18 -0
- package/lib/data-source/collection-field-interface/CollectionFieldInterfaceManager.js +20 -0
- package/lib/data-source/commonsSettingsItem/fieldComponent.js +3 -1
- package/lib/filter-provider/utils.js +6 -0
- package/lib/i18n/i18n.js +7 -12
- package/lib/locale/en_US.js +1 -0
- package/lib/locale/zh-CN.js +10 -1
- package/lib/modules/actions/delete/deleteActionSettings.js +10 -0
- package/lib/modules/blocks/data-blocks/form/FilterItemCustomSettings.js +1 -1
- package/lib/modules/blocks/data-blocks/form/fieldSettingsFormItem.js +9 -4
- package/lib/modules/blocks/data-blocks/table/hooks/useTableBlockProps.js +2 -2
- package/lib/modules/blocks/data-blocks/table/tableBlockSettings.js +4 -0
- package/lib/modules/blocks/data-blocks/table/tableColumnSettings.js +44 -0
- package/lib/modules/blocks/filter-blocks/collapse/filterCollapseItemFieldSettings.js +4 -0
- package/lib/modules/blocks/filter-blocks/form/filterFormItemFieldSettings.js +9 -0
- package/lib/modules/fields/component/SubTable/secondLevelSelect.js +136 -0
- package/lib/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.js +104 -103
- package/lib/powered-by/index.js +4 -7
- package/lib/schema-component/antd/action/Action.Designer.js +38 -3
- package/lib/schema-component/antd/action/Action.Modal.js +0 -1
- package/lib/schema-component/antd/action/Action.js +1 -3
- package/lib/schema-component/antd/association-field/SubTabs/InternalCollapse.js +2 -1
- package/lib/schema-component/antd/checkbox/Checkbox.js +6 -4
- package/lib/schema-component/antd/index.js +18 -4
- package/lib/schema-component/antd/media-card/MediaCard.js +69 -0
- package/lib/schema-component/antd/media-card/index.js +65 -0
- package/lib/schema-component/antd/media-card/style.js +59 -0
- package/lib/schema-component/antd/page/Page.js +34 -24
- package/lib/schema-component/common/dnd-context/index.js +1 -7
- package/lib/schema-component/common/sortable-item/DragHandlePageTab.js +105 -0
- package/lib/schema-component/common/sortable-item/DragHandlePageTab.style.js +59 -0
- package/lib/schema-items/GeneralSettings.js +5 -0
- package/lib/schema-settings/EditCustomDefaultValue.js +1 -1
- package/lib/schema-settings/SchemaSettings.js +1 -1
- package/lib/schema-settings/SchemaSettingsDefaultValue.js +2 -0
- package/lib/schema-settings/utils/createModalSettingsItem.js +94 -0
- package/lib/schema-settings/utils/createSelectSettingsItem.js +88 -0
- package/lib/schema-settings/utils/createSwitchSettingsItem.js +86 -0
- package/lib/schema-settings/utils/createTextSettingsItem.js +55 -0
- package/lib/schema-settings/utils/index.js +92 -0
- package/lib/schema-settings/utils/util.js +74 -0
- package/lib/user/CurrentUserProvider.js +6 -3
- package/package.json +7 -7
|
@@ -2,7 +2,9 @@ import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtim
|
|
|
2
2
|
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
3
3
|
import * as __WEBPACK_EXTERNAL_MODULE_lodash__ from "lodash";
|
|
4
4
|
import * as __WEBPACK_EXTERNAL_MODULE_react_router_dom__ from "react-router-dom";
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__variables_VariablesProvider_mjs__ from "../variables/VariablesProvider.mjs";
|
|
5
6
|
import * as __WEBPACK_EXTERNAL_MODULE__components_index_mjs__ from "./components/index.mjs";
|
|
7
|
+
import * as __WEBPACK_EXTERNAL_MODULE__CustomRouterContextProvider_mjs__ from "./CustomRouterContextProvider.mjs";
|
|
6
8
|
function _define_property(obj, key, value) {
|
|
7
9
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
8
10
|
value: value,
|
|
@@ -14,6 +16,15 @@ function _define_property(obj, key, value) {
|
|
|
14
16
|
return obj;
|
|
15
17
|
}
|
|
16
18
|
class RouterManager {
|
|
19
|
+
get basename() {
|
|
20
|
+
return this.router.basename;
|
|
21
|
+
}
|
|
22
|
+
get state() {
|
|
23
|
+
return this.router.state;
|
|
24
|
+
}
|
|
25
|
+
get navigate() {
|
|
26
|
+
return this.router.navigate;
|
|
27
|
+
}
|
|
17
28
|
getRoutesTree() {
|
|
18
29
|
const routes = {};
|
|
19
30
|
for (const [name, route] of Object.entries(this.routes))(0, __WEBPACK_EXTERNAL_MODULE_lodash__.set)(routes, name.split('.').join('.children.'), {
|
|
@@ -49,26 +60,46 @@ class RouterManager {
|
|
|
49
60
|
setBasename(basename) {
|
|
50
61
|
this.options.basename = basename;
|
|
51
62
|
}
|
|
52
|
-
getRouterComponent() {
|
|
63
|
+
getRouterComponent(children) {
|
|
53
64
|
const { type = 'browser', ...opts } = this.options;
|
|
54
|
-
const
|
|
55
|
-
hash: __WEBPACK_EXTERNAL_MODULE_react_router_dom__.
|
|
56
|
-
browser: __WEBPACK_EXTERNAL_MODULE_react_router_dom__.
|
|
57
|
-
memory: __WEBPACK_EXTERNAL_MODULE_react_router_dom__.
|
|
65
|
+
const routerCreators = {
|
|
66
|
+
hash: __WEBPACK_EXTERNAL_MODULE_react_router_dom__.createHashRouter,
|
|
67
|
+
browser: __WEBPACK_EXTERNAL_MODULE_react_router_dom__.createBrowserRouter,
|
|
68
|
+
memory: __WEBPACK_EXTERNAL_MODULE_react_router_dom__.createMemoryRouter
|
|
69
|
+
};
|
|
70
|
+
const routes = this.getRoutesTree();
|
|
71
|
+
const BaseLayoutContext = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.createContext)(null);
|
|
72
|
+
const Provider = ()=>{
|
|
73
|
+
const BaseLayout = (0, __WEBPACK_EXTERNAL_MODULE_react__.useContext)(BaseLayoutContext);
|
|
74
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__CustomRouterContextProvider_mjs__.CustomRouterContextProvider, {
|
|
75
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(BaseLayout, {
|
|
76
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsxs)(__WEBPACK_EXTERNAL_MODULE__variables_VariablesProvider_mjs__["default"], {
|
|
77
|
+
children: [
|
|
78
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE_react_router_dom__.Outlet, {}),
|
|
79
|
+
children
|
|
80
|
+
]
|
|
81
|
+
})
|
|
82
|
+
})
|
|
83
|
+
});
|
|
58
84
|
};
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
const element = (0, __WEBPACK_EXTERNAL_MODULE_react_router_dom__.useRoutes)(routes);
|
|
63
|
-
return element;
|
|
85
|
+
const ErrorElement = ()=>{
|
|
86
|
+
const error = (0, __WEBPACK_EXTERNAL_MODULE_react_router_dom__.useRouteError)();
|
|
87
|
+
throw error;
|
|
64
88
|
};
|
|
89
|
+
this.router = routerCreators[type]([
|
|
90
|
+
{
|
|
91
|
+
element: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(Provider, {}),
|
|
92
|
+
errorElement: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(ErrorElement, {}),
|
|
93
|
+
children: routes
|
|
94
|
+
}
|
|
95
|
+
], opts);
|
|
65
96
|
const RenderRouter = (param)=>{
|
|
66
97
|
let { BaseLayout = __WEBPACK_EXTERNAL_MODULE__components_index_mjs__.BlankComponent } = param;
|
|
67
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(
|
|
71
|
-
|
|
98
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(BaseLayoutContext.Provider, {
|
|
99
|
+
value: BaseLayout,
|
|
100
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__components_index_mjs__.RouterContextCleaner, {
|
|
101
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE_react_router_dom__.RouterProvider, {
|
|
102
|
+
router: this.router
|
|
72
103
|
})
|
|
73
104
|
})
|
|
74
105
|
});
|
|
@@ -91,8 +122,10 @@ class RouterManager {
|
|
|
91
122
|
_define_property(this, "routes", {});
|
|
92
123
|
_define_property(this, "options", void 0);
|
|
93
124
|
_define_property(this, "app", void 0);
|
|
125
|
+
_define_property(this, "router", void 0);
|
|
94
126
|
this.options = options;
|
|
95
127
|
this.app = app;
|
|
128
|
+
this.routes = options.routes || {};
|
|
96
129
|
}
|
|
97
130
|
}
|
|
98
131
|
function createRouterManager(options, app) {
|
|
@@ -12,5 +12,5 @@ export declare const useSchemaInitializer: () => {
|
|
|
12
12
|
visible: boolean;
|
|
13
13
|
setVisible: (v: boolean) => void;
|
|
14
14
|
};
|
|
15
|
-
export declare const SchemaInitializerItemContext: React.Context<Omit<SchemaInitializerItemType, "type" | "component" | "
|
|
15
|
+
export declare const SchemaInitializerItemContext: React.Context<Omit<SchemaInitializerItemType, "type" | "component" | "sort" | "componentProps" | "Component" | "useVisible" | "useChildren" | "hideIfNoChildren">>;
|
|
16
16
|
export declare const useSchemaInitializerItem: <T = any>() => T;
|
|
@@ -17,6 +17,8 @@ export declare const useInsertSchema: () => (ss: any) => void;
|
|
|
17
17
|
export declare const useCancelActionProps: () => {
|
|
18
18
|
onClick(): Promise<void>;
|
|
19
19
|
};
|
|
20
|
+
export declare function getAfterWorkflows(triggerWorkflows: any[]): string | undefined;
|
|
21
|
+
export declare function getBeforeWorkflows(triggerWorkflows: any[]): string | undefined;
|
|
20
22
|
export declare const useCreateActionProps: () => {
|
|
21
23
|
onClick(): Promise<void>;
|
|
22
24
|
};
|
|
@@ -196,6 +196,20 @@ const useJumpDetails = ()=>{
|
|
|
196
196
|
})));
|
|
197
197
|
};
|
|
198
198
|
};
|
|
199
|
+
function getAfterWorkflows(triggerWorkflows) {
|
|
200
|
+
if (!(null == triggerWorkflows ? void 0 : triggerWorkflows.length)) return;
|
|
201
|
+
return triggerWorkflows.filter((row)=>row && 'before' !== row.order).map((row)=>[
|
|
202
|
+
row.workflowKey,
|
|
203
|
+
row.context
|
|
204
|
+
].join('!')).join(',');
|
|
205
|
+
}
|
|
206
|
+
function getBeforeWorkflows(triggerWorkflows) {
|
|
207
|
+
if (!(null == triggerWorkflows ? void 0 : triggerWorkflows.length)) return;
|
|
208
|
+
return triggerWorkflows.filter((row)=>row && 'before' === row.order).map((row)=>[
|
|
209
|
+
row.workflowKey,
|
|
210
|
+
row.context
|
|
211
|
+
].join('!')).join(',');
|
|
212
|
+
}
|
|
199
213
|
const useCreateActionProps = ()=>{
|
|
200
214
|
var _actionField_componentProps_filterKeys;
|
|
201
215
|
const record = (0, __WEBPACK_EXTERNAL_MODULE__index_mjs__.useCollectionRecord)();
|
|
@@ -225,10 +239,8 @@ const useCreateActionProps = ()=>{
|
|
|
225
239
|
const data = await resource[action]({
|
|
226
240
|
values: await collectValues(),
|
|
227
241
|
filterKeys: filterKeys,
|
|
228
|
-
triggerWorkflows: (
|
|
229
|
-
|
|
230
|
-
row.context
|
|
231
|
-
].filter(Boolean).join('!')).join(',') : void 0,
|
|
242
|
+
triggerWorkflows: getAfterWorkflows(triggerWorkflows),
|
|
243
|
+
beforeWorkflows: getBeforeWorkflows(triggerWorkflows),
|
|
232
244
|
updateAssociationValues
|
|
233
245
|
});
|
|
234
246
|
actionField.data.loading = false;
|
|
@@ -336,10 +348,8 @@ const useAssociationCreateActionProps = ()=>{
|
|
|
336
348
|
...assignedValues
|
|
337
349
|
},
|
|
338
350
|
filterKeys: filterKeys,
|
|
339
|
-
triggerWorkflows: (
|
|
340
|
-
|
|
341
|
-
row.context
|
|
342
|
-
].filter(Boolean).join('!')).join(',') : void 0
|
|
351
|
+
triggerWorkflows: getAfterWorkflows(triggerWorkflows),
|
|
352
|
+
beforeWorkflows: getBeforeWorkflows(triggerWorkflows)
|
|
343
353
|
});
|
|
344
354
|
actionField.data.loading = false;
|
|
345
355
|
actionField.data.data = data;
|
|
@@ -514,10 +524,8 @@ const useCustomizeUpdateActionProps = ()=>{
|
|
|
514
524
|
values: {
|
|
515
525
|
...assignedValues
|
|
516
526
|
},
|
|
517
|
-
triggerWorkflows: (
|
|
518
|
-
|
|
519
|
-
row.context
|
|
520
|
-
].filter(Boolean).join('!')).join(',') : void 0
|
|
527
|
+
triggerWorkflows: getAfterWorkflows(triggerWorkflows),
|
|
528
|
+
beforeWorkflows: getBeforeWorkflows(triggerWorkflows)
|
|
521
529
|
});
|
|
522
530
|
null == service || null === (_service_refresh = service.refresh) || void 0 === _service_refresh || _service_refresh.call(service);
|
|
523
531
|
if (!(resource instanceof __WEBPACK_EXTERNAL_MODULE__TableFieldProvider_mjs__.TableFieldResource)) {
|
|
@@ -707,10 +715,8 @@ const useUpdateActionProps = ()=>{
|
|
|
707
715
|
values: isDeltaChanged ? filterValues(rawValues) : rawValues,
|
|
708
716
|
...data,
|
|
709
717
|
updateAssociationValues,
|
|
710
|
-
triggerWorkflows: (
|
|
711
|
-
|
|
712
|
-
row.context
|
|
713
|
-
].filter(Boolean).join('!')).join(',') : void 0
|
|
718
|
+
triggerWorkflows: getAfterWorkflows(triggerWorkflows),
|
|
719
|
+
beforeWorkflows: getBeforeWorkflows(triggerWorkflows)
|
|
714
720
|
});
|
|
715
721
|
actionField.data.loading = false;
|
|
716
722
|
null == __parent || null === (__parent_service = __parent.service) || void 0 === __parent_service || null === (__parent_service_refresh = __parent_service.refresh) || void 0 === __parent_service_refresh || __parent_service_refresh.call(__parent_service);
|
|
@@ -752,10 +758,8 @@ const useDestroyActionProps = ()=>{
|
|
|
752
758
|
const { triggerWorkflows } = null !== (_actionSchema_xactionsettings = null == actionSchema ? void 0 : actionSchema['x-action-settings']) && void 0 !== _actionSchema_xactionsettings ? _actionSchema_xactionsettings : {};
|
|
753
759
|
await resource.destroy({
|
|
754
760
|
filterByTk,
|
|
755
|
-
triggerWorkflows: (
|
|
756
|
-
|
|
757
|
-
row.context
|
|
758
|
-
].filter(Boolean).join('!')).join(',') : void 0,
|
|
761
|
+
triggerWorkflows: getAfterWorkflows(triggerWorkflows),
|
|
762
|
+
beforeWorkflows: getBeforeWorkflows(triggerWorkflows),
|
|
759
763
|
...data
|
|
760
764
|
});
|
|
761
765
|
const { count = 0, page = 0, pageSize = 0 } = (null == service ? void 0 : null === (_service_data = service.data) || void 0 === _service_data ? void 0 : _service_data.meta) || {};
|
|
@@ -1225,4 +1229,4 @@ async function resetFormCorrectly(form) {
|
|
|
1225
1229
|
});
|
|
1226
1230
|
await form.reset();
|
|
1227
1231
|
}
|
|
1228
|
-
export { findFilterTargets, getAssociationPath, getFormValues, updateFilterTargets, useAssociationCreateActionProps, useAssociationFilterBlockProps, useAssociationFilterProps, useAssociationNames, useBulkDestroyActionProps, useCancelActionProps, useCollectValuesToSubmit, useCreateActionProps, useCustomizeRequestActionProps, useCustomizeUpdateActionProps, useDestroyActionProps, useDetailPrintActionProps, useDetailsPaginationProps, useDisassociateActionProps, useFilterBlockActionProps, useInsertSchema, useOptionalFieldList, useRefreshActionProps, useRemoveActionProps, useResetBlockActionProps, useUpdateActionProps };
|
|
1232
|
+
export { findFilterTargets, getAfterWorkflows, getAssociationPath, getBeforeWorkflows, getFormValues, updateFilterTargets, useAssociationCreateActionProps, useAssociationFilterBlockProps, useAssociationFilterProps, useAssociationNames, useBulkDestroyActionProps, useCancelActionProps, useCollectValuesToSubmit, useCreateActionProps, useCustomizeRequestActionProps, useCustomizeUpdateActionProps, useDestroyActionProps, useDetailPrintActionProps, useDetailsPaginationProps, useDisassociateActionProps, useFilterBlockActionProps, useInsertSchema, useOptionalFieldList, useRefreshActionProps, useRemoveActionProps, useResetBlockActionProps, useUpdateActionProps };
|
|
@@ -8,7 +8,7 @@ import * as __WEBPACK_EXTERNAL_MODULE__schema_component_index_mjs__ from "../../
|
|
|
8
8
|
import * as __WEBPACK_EXTERNAL_MODULE__pinned_list_index_mjs__ from "../pinned-list/index.mjs";
|
|
9
9
|
import * as __WEBPACK_EXTERNAL_MODULE__useContextMenu_mjs__ from "./useContextMenu.mjs";
|
|
10
10
|
const STORAGE_KEYS = {
|
|
11
|
-
|
|
11
|
+
SHOW_SCROLL_AREA: 'show-scroll-area',
|
|
12
12
|
CONTEXT_MENU_ENABLED: 'context-menu-enabled'
|
|
13
13
|
};
|
|
14
14
|
const ContextMenuProvider = (param)=>{
|
|
@@ -16,7 +16,7 @@ const ContextMenuProvider = (param)=>{
|
|
|
16
16
|
const [enable, setEnable] = (0, __WEBPACK_EXTERNAL_MODULE_ahooks__.useLocalStorageState)(STORAGE_KEYS.CONTEXT_MENU_ENABLED, {
|
|
17
17
|
defaultValue: true
|
|
18
18
|
});
|
|
19
|
-
const [
|
|
19
|
+
const [showScrollArea, setShowScrollArea] = (0, __WEBPACK_EXTERNAL_MODULE_ahooks__.useLocalStorageState)(STORAGE_KEYS.SHOW_SCROLL_AREA, {
|
|
20
20
|
defaultValue: false
|
|
21
21
|
});
|
|
22
22
|
const contextItems = (0, __WEBPACK_EXTERNAL_MODULE__application_index_mjs__.useApp)().pluginContextMenu.get();
|
|
@@ -30,8 +30,8 @@ const ContextMenuProvider = (param)=>{
|
|
|
30
30
|
const { actionProps, title, icon } = item.useLoadMethod({
|
|
31
31
|
enable,
|
|
32
32
|
setEnable,
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
showScrollArea,
|
|
34
|
+
setShowScrollArea,
|
|
35
35
|
position
|
|
36
36
|
});
|
|
37
37
|
items.push({
|
|
@@ -45,8 +45,8 @@ const ContextMenuProvider = (param)=>{
|
|
|
45
45
|
value: {
|
|
46
46
|
contextMenuEnabled: enable,
|
|
47
47
|
setContextMenuEnable: setEnable,
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
showScrollArea,
|
|
49
|
+
setShowScrollArea,
|
|
50
50
|
position
|
|
51
51
|
},
|
|
52
52
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd__.Dropdown, {
|
|
@@ -31,12 +31,12 @@ export declare const disableRightMenu: {
|
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
|
-
export declare const
|
|
34
|
+
export declare const showScrollArea: {
|
|
35
35
|
name: string;
|
|
36
36
|
sort: number;
|
|
37
|
-
useLoadMethod: ({
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
useLoadMethod: ({ showScrollArea, setShowScrollArea }: {
|
|
38
|
+
showScrollArea: any;
|
|
39
|
+
setShowScrollArea: any;
|
|
40
40
|
}) => {
|
|
41
41
|
title: string;
|
|
42
42
|
actionProps: {
|
|
@@ -49,17 +49,17 @@ const disableRightMenu = {
|
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
-
const
|
|
53
|
-
name: '
|
|
52
|
+
const ContextMenuItemsProps_rslib_entry_showScrollArea = {
|
|
53
|
+
name: 'showScrollArea',
|
|
54
54
|
sort: 3,
|
|
55
55
|
useLoadMethod: (param)=>{
|
|
56
|
-
let {
|
|
56
|
+
let { showScrollArea, setShowScrollArea } = param;
|
|
57
57
|
const { t } = (0, __WEBPACK_EXTERNAL_MODULE_react_i18next__.useTranslation)();
|
|
58
58
|
return {
|
|
59
|
-
title:
|
|
59
|
+
title: showScrollArea ? t('Hidden scroll area') : t('Show scroll area'),
|
|
60
60
|
actionProps: {
|
|
61
61
|
onClick: ()=>{
|
|
62
|
-
|
|
62
|
+
setShowScrollArea(!showScrollArea);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
};
|
|
@@ -143,4 +143,4 @@ const removeNode = (param)=>{
|
|
|
143
143
|
const autoPage = document.querySelector('.autoPage' + classId);
|
|
144
144
|
if (autoPage) autoPage.parentNode.removeChild(autoPage);
|
|
145
145
|
};
|
|
146
|
-
export { designerMode, disableRightMenu, fullScreen,
|
|
146
|
+
export { designerMode, disableRightMenu, fullScreen, ContextMenuItemsProps_rslib_entry_showScrollArea as showScrollArea };
|
|
@@ -11,7 +11,7 @@ class PluginContextMenu extends __WEBPACK_EXTERNAL_MODULE__application_Plugin_mj
|
|
|
11
11
|
this.app.pluginContextMenu.add(__WEBPACK_EXTERNAL_MODULE__ContextMenuItemsProps_mjs__.designerMode.name, __WEBPACK_EXTERNAL_MODULE__ContextMenuItemsProps_mjs__.designerMode);
|
|
12
12
|
this.app.pluginContextMenu.add(__WEBPACK_EXTERNAL_MODULE__ContextMenuItemsProps_mjs__.fullScreen.name, __WEBPACK_EXTERNAL_MODULE__ContextMenuItemsProps_mjs__.fullScreen);
|
|
13
13
|
this.app.pluginContextMenu.add(__WEBPACK_EXTERNAL_MODULE__ContextMenuItemsProps_mjs__.disableRightMenu.name, __WEBPACK_EXTERNAL_MODULE__ContextMenuItemsProps_mjs__.disableRightMenu);
|
|
14
|
-
this.app.pluginContextMenu.add(__WEBPACK_EXTERNAL_MODULE__ContextMenuItemsProps_mjs__.
|
|
14
|
+
this.app.pluginContextMenu.add(__WEBPACK_EXTERNAL_MODULE__ContextMenuItemsProps_mjs__.showScrollArea.name, __WEBPACK_EXTERNAL_MODULE__ContextMenuItemsProps_mjs__.showScrollArea);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
var __webpack_exports__ContextMenuContext = __WEBPACK_EXTERNAL_MODULE__useContextMenu_mjs__.ContextMenuContext;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export interface ContextMenuContextProps {
|
|
2
2
|
contextMenuEnabled: boolean;
|
|
3
3
|
setContextMenuEnable: (enabled: boolean) => void;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
showScrollArea: boolean;
|
|
5
|
+
setShowScrollArea: (isShow: boolean) => void;
|
|
6
6
|
position: any;
|
|
7
7
|
setPosition: (any: any) => void;
|
|
8
8
|
}
|
package/es/built-in/index.mjs
CHANGED
|
@@ -314,6 +314,11 @@ class BuiltInPlugin extends __WEBPACK_EXTERNAL_MODULE__application_Plugin_mjs__.
|
|
|
314
314
|
icon: 'BlockOutlined',
|
|
315
315
|
sort: -30
|
|
316
316
|
});
|
|
317
|
+
this.app.systemSettingsManager.add('security', {
|
|
318
|
+
title: this.t('Security'),
|
|
319
|
+
icon: 'SafetyOutlined',
|
|
320
|
+
sort: -20
|
|
321
|
+
});
|
|
317
322
|
this.app.systemSettingsManager.add('system-services', {
|
|
318
323
|
title: this.t('System Services'),
|
|
319
324
|
icon: 'CloudServerOutlined',
|
|
@@ -7,7 +7,7 @@ const PageStyleContext = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.cre
|
|
|
7
7
|
});
|
|
8
8
|
const PageStyleProvider = (param)=>{
|
|
9
9
|
let { children } = param;
|
|
10
|
-
var _currentUser_data_data_systemSettings;
|
|
10
|
+
var _currentUser_data_data_systemSettings, _currentUser_data_data, _currentUser_data;
|
|
11
11
|
const currentUser = (0, __WEBPACK_EXTERNAL_MODULE__user_index_mjs__.useCurrentUserContext)();
|
|
12
12
|
const tabItem = (0, __WEBPACK_EXTERNAL_MODULE__useTabSettings_mjs__.useTabSettings)();
|
|
13
13
|
const [items, setItems] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)([]);
|
|
@@ -22,7 +22,7 @@ const PageStyleProvider = (param)=>{
|
|
|
22
22
|
]);
|
|
23
23
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(PageStyleContext.Provider, {
|
|
24
24
|
value: {
|
|
25
|
-
style: (null === (
|
|
25
|
+
style: (null == currentUser ? void 0 : null === (_currentUser_data = currentUser.data) || void 0 === _currentUser_data ? void 0 : null === (_currentUser_data_data = _currentUser_data.data) || void 0 === _currentUser_data_data ? void 0 : null === (_currentUser_data_data_systemSettings = _currentUser_data_data.systemSettings) || void 0 === _currentUser_data_data_systemSettings ? void 0 : _currentUser_data_data_systemSettings.pageStyle) || 'classical',
|
|
26
26
|
items,
|
|
27
27
|
setItems
|
|
28
28
|
},
|
|
@@ -48,4 +48,5 @@ export declare abstract class CollectionFieldInterface {
|
|
|
48
48
|
validateSchema?(fieldSchema: ISchema): Record<string, ISchema>;
|
|
49
49
|
usePathOptions?(field: CollectionFieldOptions): any;
|
|
50
50
|
schemaInitialize?(schema: ISchema, data: any): void;
|
|
51
|
+
addComponentOption(componentOption: CollectionFieldInterfaceComponentOption): void;
|
|
51
52
|
}
|
|
@@ -9,6 +9,24 @@ function _define_property(obj, key, value) {
|
|
|
9
9
|
return obj;
|
|
10
10
|
}
|
|
11
11
|
class CollectionFieldInterface {
|
|
12
|
+
addComponentOption(componentOption) {
|
|
13
|
+
if (!this.componentOptions) {
|
|
14
|
+
var _this_default_uiSchema, _this_default, _this_default_uiSchema1, _this_default1;
|
|
15
|
+
this.componentOptions = [];
|
|
16
|
+
const xComponent = null === (_this_default = this.default) || void 0 === _this_default ? void 0 : null === (_this_default_uiSchema = _this_default.uiSchema) || void 0 === _this_default_uiSchema ? void 0 : _this_default_uiSchema['x-component'];
|
|
17
|
+
const componentProps = null === (_this_default1 = this.default) || void 0 === _this_default1 ? void 0 : null === (_this_default_uiSchema1 = _this_default1.uiSchema) || void 0 === _this_default_uiSchema1 ? void 0 : _this_default_uiSchema1['x-component-props'];
|
|
18
|
+
if (xComponent) this.componentOptions = [
|
|
19
|
+
{
|
|
20
|
+
label: xComponent.split('.').pop(),
|
|
21
|
+
value: xComponent,
|
|
22
|
+
useProps () {
|
|
23
|
+
return componentProps || {};
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
];
|
|
27
|
+
}
|
|
28
|
+
this.componentOptions.push(componentOption);
|
|
29
|
+
}
|
|
12
30
|
constructor(collectionFieldInterfaceManager){
|
|
13
31
|
_define_property(this, "collectionFieldInterfaceManager", void 0);
|
|
14
32
|
_define_property(this, "name", void 0);
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { DataSourceManager } from '../data-source';
|
|
2
|
-
import type { CollectionFieldInterface, CollectionFieldInterfaceFactory } from './CollectionFieldInterface';
|
|
2
|
+
import type { CollectionFieldInterface, CollectionFieldInterfaceComponentOption, CollectionFieldInterfaceFactory } from './CollectionFieldInterface';
|
|
3
|
+
interface ActionType {
|
|
4
|
+
type: 'addComponentOption';
|
|
5
|
+
data: any;
|
|
6
|
+
}
|
|
3
7
|
export declare class CollectionFieldInterfaceManager {
|
|
4
8
|
dataSourceManager: DataSourceManager;
|
|
5
9
|
protected collectionFieldInterfaceInstances: Record<string, CollectionFieldInterface>;
|
|
@@ -7,6 +11,7 @@ export declare class CollectionFieldInterfaceManager {
|
|
|
7
11
|
label: string;
|
|
8
12
|
order?: number;
|
|
9
13
|
}>;
|
|
14
|
+
protected actionList: Record<string, ActionType[]>;
|
|
10
15
|
constructor(fieldInterfaceClasses: CollectionFieldInterfaceFactory[], fieldInterfaceGroups: Record<string, {
|
|
11
16
|
label: string;
|
|
12
17
|
order?: number;
|
|
@@ -26,4 +31,6 @@ export declare class CollectionFieldInterfaceManager {
|
|
|
26
31
|
label: string;
|
|
27
32
|
order?: number;
|
|
28
33
|
};
|
|
34
|
+
addFieldInterfaceComponentOption(interfaceName: string, componentOption: CollectionFieldInterfaceComponentOption): void;
|
|
29
35
|
}
|
|
36
|
+
export {};
|
|
@@ -14,6 +14,12 @@ class CollectionFieldInterfaceManager {
|
|
|
14
14
|
const newCollectionFieldInterfaces = fieldInterfaceClasses.reduce((acc, Interface)=>{
|
|
15
15
|
const instance = new Interface(this);
|
|
16
16
|
acc[instance.name] = instance;
|
|
17
|
+
if (Array.isArray(this.actionList[instance.name])) {
|
|
18
|
+
this.actionList[instance.name].forEach((item)=>{
|
|
19
|
+
instance[item.type](item.data);
|
|
20
|
+
});
|
|
21
|
+
this.actionList[instance.name] = void 0;
|
|
22
|
+
}
|
|
17
23
|
return acc;
|
|
18
24
|
}, {});
|
|
19
25
|
Object.assign(this.collectionFieldInterfaceInstances, newCollectionFieldInterfaces);
|
|
@@ -45,13 +51,27 @@ class CollectionFieldInterfaceManager {
|
|
|
45
51
|
getFieldInterfaceGroup(name) {
|
|
46
52
|
return this.collectionFieldGroups[name];
|
|
47
53
|
}
|
|
54
|
+
addFieldInterfaceComponentOption(interfaceName, componentOption) {
|
|
55
|
+
const fieldInterface = this.getFieldInterface(interfaceName);
|
|
56
|
+
if (!fieldInterface) {
|
|
57
|
+
if (!this.actionList[interfaceName]) this.actionList[interfaceName] = [];
|
|
58
|
+
this.actionList[interfaceName].push({
|
|
59
|
+
type: 'addComponentOption',
|
|
60
|
+
data: componentOption
|
|
61
|
+
});
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
fieldInterface.addComponentOption(componentOption);
|
|
65
|
+
}
|
|
48
66
|
constructor(fieldInterfaceClasses, fieldInterfaceGroups, dataSourceManager){
|
|
49
67
|
_define_property(this, "dataSourceManager", void 0);
|
|
50
68
|
_define_property(this, "collectionFieldInterfaceInstances", void 0);
|
|
51
69
|
_define_property(this, "collectionFieldGroups", void 0);
|
|
70
|
+
_define_property(this, "actionList", void 0);
|
|
52
71
|
this.dataSourceManager = dataSourceManager;
|
|
53
72
|
this.collectionFieldInterfaceInstances = {};
|
|
54
73
|
this.collectionFieldGroups = {};
|
|
74
|
+
this.actionList = {};
|
|
55
75
|
this.addFieldInterfaces(fieldInterfaceClasses);
|
|
56
76
|
this.addFieldInterfaceGroups(fieldInterfaceGroups);
|
|
57
77
|
}
|
|
@@ -42,14 +42,16 @@ const fieldComponentSettingsItem = {
|
|
|
42
42
|
component,
|
|
43
43
|
...(null == componentOptions ? void 0 : null === (_componentOptions_useProps = componentOptions.useProps) || void 0 === _componentOptions_useProps ? void 0 : _componentOptions_useProps.call(componentOptions)) || {}
|
|
44
44
|
};
|
|
45
|
-
__WEBPACK_EXTERNAL_MODULE_lodash__["default"].set(fieldSchema, 'x-component-props', componentProps);
|
|
46
45
|
field.componentProps = componentProps;
|
|
46
|
+
field.component = component;
|
|
47
|
+
__WEBPACK_EXTERNAL_MODULE_lodash__["default"].set(fieldSchema, 'x-component-props', componentProps);
|
|
47
48
|
dn.emit('patch', {
|
|
48
49
|
schema: {
|
|
49
50
|
['x-uid']: fieldSchema['x-uid'],
|
|
50
51
|
'x-component-props': componentProps
|
|
51
52
|
}
|
|
52
53
|
});
|
|
54
|
+
dn.refresh();
|
|
53
55
|
}
|
|
54
56
|
};
|
|
55
57
|
}
|
|
@@ -22,7 +22,7 @@ export declare abstract class DataSource {
|
|
|
22
22
|
get app(): import("../..").Application;
|
|
23
23
|
get key(): string;
|
|
24
24
|
get displayName(): string;
|
|
25
|
-
get status(): "
|
|
25
|
+
get status(): "loaded" | "loading-failed" | "loading" | "reloading";
|
|
26
26
|
get errorMessage(): string;
|
|
27
27
|
get collections(): import("..").Collection[];
|
|
28
28
|
getOptions(): DataSourceOptions;
|
|
@@ -90,6 +90,12 @@ const transformToFilter = (values, fieldSchema, getCollectionJoinField, collecti
|
|
|
90
90
|
$isFalsy: true
|
|
91
91
|
}
|
|
92
92
|
};
|
|
93
|
+
} else if ('$dateBetween' === operators[key]) {
|
|
94
|
+
if (Array.isArray(value)) for(const index in value){
|
|
95
|
+
if (!!value[index]) {
|
|
96
|
+
if ('string' != typeof value[index] && !(value[index] instanceof Date)) value[index] = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_utils_client__.dayjs)(value[index]).toISOString();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
93
99
|
}
|
|
94
100
|
return {
|
|
95
101
|
[key]: {
|
package/es/i18n/i18n.mjs
CHANGED
|
@@ -10,16 +10,11 @@ const resources = {};
|
|
|
10
10
|
Object.keys(__WEBPACK_EXTERNAL_MODULE__locale_index_mjs__["default"]).forEach((lang)=>{
|
|
11
11
|
resources[lang] = __WEBPACK_EXTERNAL_MODULE__locale_index_mjs__["default"][lang].resources;
|
|
12
12
|
});
|
|
13
|
-
if ('undefined' != typeof localStorage) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
});
|
|
21
|
-
i18n.on('languageChanged', (lng)=>{
|
|
22
|
-
localStorage.setItem('TACHYBASE_LOCALE', lng);
|
|
23
|
-
});
|
|
24
|
-
}
|
|
13
|
+
if ('undefined' != typeof localStorage) i18n.use(__WEBPACK_EXTERNAL_MODULE_react_i18next__.initReactI18next).init({
|
|
14
|
+
lng: localStorage.getItem('TACHYBASE_LOCALE') || 'en-US',
|
|
15
|
+
defaultNS: 'core',
|
|
16
|
+
resources: {},
|
|
17
|
+
keySeparator: false,
|
|
18
|
+
nsSeparator: false
|
|
19
|
+
});
|
|
25
20
|
export { i18n, tval };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE__tachybase_schema__ from "@tachybase/schema";
|
|
1
2
|
import * as __WEBPACK_EXTERNAL_MODULE__application_index_mjs__ from "../../../application/index.mjs";
|
|
2
3
|
import * as __WEBPACK_EXTERNAL_MODULE__application_schema_settings_SchemaSettings_mjs__ from "../../../application/schema-settings/SchemaSettings.mjs";
|
|
3
4
|
import * as __WEBPACK_EXTERNAL_MODULE__collection_manager_index_mjs__ from "../../../collection-manager/index.mjs";
|
|
@@ -30,6 +31,15 @@ const deleteActionSettings = new __WEBPACK_EXTERNAL_MODULE__application_schema_s
|
|
|
30
31
|
name: 'secondConFirm',
|
|
31
32
|
Component: __WEBPACK_EXTERNAL_MODULE__schema_component_antd_action_Action_Designer_mjs__.SecondConFirm
|
|
32
33
|
},
|
|
34
|
+
{
|
|
35
|
+
name: 'workflowConfig',
|
|
36
|
+
Component: __WEBPACK_EXTERNAL_MODULE__schema_component_antd_action_Action_Designer_mjs__.WorkflowConfig,
|
|
37
|
+
useVisible () {
|
|
38
|
+
var _fieldSchema_xactionsettings;
|
|
39
|
+
const fieldSchema = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.useFieldSchema)();
|
|
40
|
+
return (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.isValid)(null == fieldSchema ? void 0 : null === (_fieldSchema_xactionsettings = fieldSchema['x-action-settings']) || void 0 === _fieldSchema_xactionsettings ? void 0 : _fieldSchema_xactionsettings.triggerWorkflows);
|
|
41
|
+
}
|
|
42
|
+
},
|
|
33
43
|
{
|
|
34
44
|
name: 'delete',
|
|
35
45
|
type: 'remove'
|
|
@@ -250,7 +250,7 @@ const FilterItemCustomSettings = new __WEBPACK_EXTERNAL_MODULE__application_sche
|
|
|
250
250
|
}
|
|
251
251
|
},
|
|
252
252
|
onSubmit (param) {
|
|
253
|
-
let { default: { value } } = param;
|
|
253
|
+
let { default: { value = null } } = param;
|
|
254
254
|
field.setValue(value);
|
|
255
255
|
fieldSchema['default'] = value;
|
|
256
256
|
fieldSchema['x-component-props']['defaultValue'] = value;
|
|
@@ -12,9 +12,7 @@ import * as __WEBPACK_EXTERNAL_MODULE__schema_component_index_mjs__ from "../../
|
|
|
12
12
|
import * as __WEBPACK_EXTERNAL_MODULE__schema_component_antd_form_item_FormItem_Settings_mjs__ from "../../../../schema-component/antd/form-item/FormItem.Settings.mjs";
|
|
13
13
|
import * as __WEBPACK_EXTERNAL_MODULE__schema_component_antd_form_v2_utils_mjs__ from "../../../../schema-component/antd/form-v2/utils.mjs";
|
|
14
14
|
import * as __WEBPACK_EXTERNAL_MODULE__schema_settings_index_mjs__ from "../../../../schema-settings/index.mjs";
|
|
15
|
-
import * as __WEBPACK_EXTERNAL_MODULE__schema_settings_hooks_useIsAllowToSetDefaultValue_mjs__ from "../../../../schema-settings/hooks/useIsAllowToSetDefaultValue.mjs";
|
|
16
15
|
import * as __WEBPACK_EXTERNAL_MODULE__schema_settings_LinkageRules_type_mjs__ from "../../../../schema-settings/LinkageRules/type.mjs";
|
|
17
|
-
import * as __WEBPACK_EXTERNAL_MODULE__schema_settings_SchemaSettingsDefaultValue_mjs__ from "../../../../schema-settings/SchemaSettingsDefaultValue.mjs";
|
|
18
16
|
const fieldSettingsFormItem = new __WEBPACK_EXTERNAL_MODULE__application_schema_settings_SchemaSettings_mjs__.SchemaSettings({
|
|
19
17
|
name: 'fieldSettings:FormItem',
|
|
20
18
|
items: [
|
|
@@ -217,10 +215,10 @@ const fieldSettingsFormItem = new __WEBPACK_EXTERNAL_MODULE__application_schema_
|
|
|
217
215
|
{
|
|
218
216
|
name: 'setDefaultValue',
|
|
219
217
|
useVisible () {
|
|
220
|
-
const { isAllowToSetDefaultValue } = (0,
|
|
218
|
+
const { isAllowToSetDefaultValue } = (0, __WEBPACK_EXTERNAL_MODULE__schema_settings_index_mjs__.useIsAllowToSetDefaultValue)();
|
|
221
219
|
return isAllowToSetDefaultValue();
|
|
222
220
|
},
|
|
223
|
-
Component:
|
|
221
|
+
Component: __WEBPACK_EXTERNAL_MODULE__schema_settings_index_mjs__.SchemaSettingsDefaultValue
|
|
224
222
|
},
|
|
225
223
|
{
|
|
226
224
|
name: 'layoutDirection',
|
|
@@ -478,6 +476,13 @@ const fieldSettingsFormItem = new __WEBPACK_EXTERNAL_MODULE__application_schema_
|
|
|
478
476
|
const validateSchema = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_index_mjs__.useValidateSchema)();
|
|
479
477
|
return form && !isFormReadPretty && validateSchema;
|
|
480
478
|
}
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
...__WEBPACK_EXTERNAL_MODULE__data_source_index_mjs__.fieldComponentSettingsItem
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
name: 'editDefaultValue',
|
|
485
|
+
Component: __WEBPACK_EXTERNAL_MODULE__schema_settings_index_mjs__.SchemaSettingsDefaultValue
|
|
481
486
|
}
|
|
482
487
|
];
|
|
483
488
|
}
|
|
@@ -7,11 +7,11 @@ import * as __WEBPACK_EXTERNAL_MODULE__filter_provider_FilterProvider_mjs__ from
|
|
|
7
7
|
import * as __WEBPACK_EXTERNAL_MODULE__filter_provider_utils_mjs__ from "../../../../../filter-provider/utils.mjs";
|
|
8
8
|
import * as __WEBPACK_EXTERNAL_MODULE__schema_component_index_mjs__ from "../../../../../schema-component/index.mjs";
|
|
9
9
|
const useTableBlockProps = ()=>{
|
|
10
|
-
var _fieldSchema_parent_xdecoratorprops, _fieldSchema_parent, _ctx_service, _ctx_service1, _ctx_field_data, _ctx_field, _ctx_service2, _ctx_service3, _fieldSchema_xcomponentprops;
|
|
10
|
+
var _fieldSchema_parent_xdecoratorprops, _fieldSchema_parent, _fieldSchema_parent_xdecoratorprops1, _fieldSchema_parent1, _ctx_service, _ctx_service1, _ctx_field_data, _ctx_field, _ctx_service2, _ctx_service3, _fieldSchema_xcomponentprops;
|
|
11
11
|
const field = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.useField)();
|
|
12
12
|
const fieldSchema = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.useFieldSchema)();
|
|
13
13
|
const ctx = (0, __WEBPACK_EXTERNAL_MODULE__block_provider_TableBlockProvider_mjs__.useTableBlockContext)();
|
|
14
|
-
const globalSort = null === (_fieldSchema_parent = fieldSchema.parent) || void 0 === _fieldSchema_parent ? void 0 : null === (_fieldSchema_parent_xdecoratorprops = _fieldSchema_parent['x-decorator-props']) || void 0 === _fieldSchema_parent_xdecoratorprops ? void 0 : _fieldSchema_parent_xdecoratorprops['dragSortBy'];
|
|
14
|
+
const globalSort = (null === (_fieldSchema_parent = fieldSchema.parent) || void 0 === _fieldSchema_parent ? void 0 : null === (_fieldSchema_parent_xdecoratorprops = _fieldSchema_parent['x-decorator-props']) || void 0 === _fieldSchema_parent_xdecoratorprops ? void 0 : _fieldSchema_parent_xdecoratorprops['dragSort']) === true ? null === (_fieldSchema_parent1 = fieldSchema.parent) || void 0 === _fieldSchema_parent1 ? void 0 : null === (_fieldSchema_parent_xdecoratorprops1 = _fieldSchema_parent1['x-decorator-props']) || void 0 === _fieldSchema_parent_xdecoratorprops1 ? void 0 : _fieldSchema_parent_xdecoratorprops1['dragSortBy'] : void 0;
|
|
15
15
|
const { getDataBlocks } = (0, __WEBPACK_EXTERNAL_MODULE__filter_provider_FilterProvider_mjs__.useFilterBlock)();
|
|
16
16
|
const isLoading = null == ctx ? void 0 : null === (_ctx_service = ctx.service) || void 0 === _ctx_service ? void 0 : _ctx_service.loading;
|
|
17
17
|
null == ctx || null === (_ctx_service1 = ctx.service) || void 0 === _ctx_service1 || _ctx_service1.params;
|