@tachybase/client 1.3.18 → 1.3.19

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.
Files changed (104) hide show
  1. package/es/application/CustomRouterContextProvider.mjs +1 -2
  2. package/es/application/components/AppComponent.mjs +1 -3
  3. package/es/block-provider/hooks/index.mjs +1 -1
  4. package/es/built-in/acl/Configuration/schemas/scopes.mjs +4 -5
  5. package/es/built-in/dynamic-page/DynamicPage.mjs +16 -33
  6. package/es/built-in/dynamic-page/utils.d.ts +1 -2
  7. package/es/built-in/dynamic-page/utils.mjs +0 -3
  8. package/es/built-in/page-style/CustomAdminHeader.mjs +2 -2
  9. package/es/built-in/page-style/PageStyle.provider.d.ts +2 -7
  10. package/es/built-in/page-style/PageStyle.provider.mjs +3 -8
  11. package/es/built-in/page-style/TabContent.mjs +5 -7
  12. package/es/built-in/page-style/usePageStyle.d.ts +1 -1
  13. package/es/built-in/page-style/usePageStyle.mjs +1 -1
  14. package/es/built-in/page-style/useTabSettings.d.ts +3 -4
  15. package/es/built-in/page-style/useTabSettings.mjs +7 -8
  16. package/es/built-in/quick-access/PopupActionSchemaInitializerItem.mjs +2 -2
  17. package/es/modules/actions/add-child/CreateChildInitializer.mjs +2 -2
  18. package/es/modules/actions/add-new/CreateActionInitializer.mjs +2 -2
  19. package/es/modules/actions/add-record/CustomizeAddRecordActionInitializer.mjs +2 -2
  20. package/es/modules/actions/associate/AssociateActionInitializer.mjs +1 -2
  21. package/es/modules/actions/submit/createSubmitActionSettings.mjs +3 -6
  22. package/es/modules/actions/view-edit-popup/PopupActionInitializer.mjs +2 -2
  23. package/es/modules/actions/view-edit-popup/UpdateActionInitializer.mjs +2 -2
  24. package/es/modules/actions/view-edit-popup/ViewActionInitializer.mjs +2 -2
  25. package/es/modules/fields/component/DrawerSubTable/drawerSubTableComponentFieldSettings.mjs +2 -2
  26. package/es/modules/fields/component/Picker/recordPickerComponentFieldSettings.mjs +2 -2
  27. package/es/modules/fields/component/Select/selectComponentFieldSettings.mjs +2 -2
  28. package/es/schema-component/antd/action/Action.Container.mjs +5 -26
  29. package/es/schema-component/antd/action/Action.Designer.mjs +3 -14
  30. package/es/schema-component/antd/action/Action.Page.mjs +1 -1
  31. package/es/schema-component/antd/action/Action.mjs +11 -56
  32. package/es/schema-component/antd/action/context.d.ts +1 -9
  33. package/es/schema-component/antd/action/context.mjs +1 -10
  34. package/es/schema-component/antd/action/hooks.d.ts +1 -2
  35. package/es/schema-component/antd/action/hooks.mjs +2 -2
  36. package/es/schema-component/antd/association-field/FileManager.mjs +2 -2
  37. package/es/schema-component/antd/association-field/InternalDrawerSubTable.mjs +2 -2
  38. package/es/schema-component/antd/association-field/InternalPicker.mjs +2 -2
  39. package/es/schema-component/antd/association-field/InternalTag.mjs +2 -2
  40. package/es/schema-component/antd/association-field/InternalViewer.mjs +2 -2
  41. package/es/schema-component/antd/association-field/SubTable.mjs +2 -2
  42. package/es/schema-component/antd/form-item/FormItem.Settings.mjs +2 -3
  43. package/es/schema-component/antd/page/Page.mjs +22 -27
  44. package/es/schema-component/antd/record-picker/InputRecordPicker.mjs +2 -2
  45. package/es/schema-component/antd/record-picker/ReadPrettyRecordPicker.mjs +2 -2
  46. package/es/schema-initializer/items/SelectActionInitializer.mjs +2 -2
  47. package/es/schema-items/OpenModeSchemaItems.mjs +16 -37
  48. package/es/schema-templates/schemas/uiSchemaTemplates.mjs +1 -1
  49. package/lib/application/CustomRouterContextProvider.js +1 -2
  50. package/lib/application/components/AppComponent.js +1 -3
  51. package/lib/block-provider/hooks/index.js +3 -3
  52. package/lib/built-in/acl/Configuration/schemas/scopes.js +3 -4
  53. package/lib/built-in/dynamic-page/DynamicPage.js +14 -31
  54. package/lib/built-in/dynamic-page/utils.js +0 -3
  55. package/lib/built-in/page-style/CustomAdminHeader.js +2 -2
  56. package/lib/built-in/page-style/PageStyle.provider.js +2 -10
  57. package/lib/built-in/page-style/TabContent.js +4 -6
  58. package/lib/built-in/page-style/usePageStyle.js +1 -1
  59. package/lib/built-in/page-style/useTabSettings.js +7 -8
  60. package/lib/built-in/quick-access/PopupActionSchemaInitializerItem.js +1 -1
  61. package/lib/locale/en_US.js +0 -1
  62. package/lib/modules/actions/add-child/CreateChildInitializer.js +2 -2
  63. package/lib/modules/actions/add-new/CreateActionInitializer.js +2 -2
  64. package/lib/modules/actions/add-record/CustomizeAddRecordActionInitializer.js +2 -2
  65. package/lib/modules/actions/associate/AssociateActionInitializer.js +1 -2
  66. package/lib/modules/actions/submit/createSubmitActionSettings.js +2 -5
  67. package/lib/modules/actions/view-edit-popup/PopupActionInitializer.js +2 -2
  68. package/lib/modules/actions/view-edit-popup/UpdateActionInitializer.js +2 -2
  69. package/lib/modules/actions/view-edit-popup/ViewActionInitializer.js +2 -2
  70. package/lib/modules/fields/component/DrawerSubTable/drawerSubTableComponentFieldSettings.js +1 -1
  71. package/lib/modules/fields/component/Picker/recordPickerComponentFieldSettings.js +1 -1
  72. package/lib/modules/fields/component/Select/selectComponentFieldSettings.js +1 -1
  73. package/lib/schema-component/antd/action/Action.Container.js +4 -25
  74. package/lib/schema-component/antd/action/Action.Designer.js +2 -13
  75. package/lib/schema-component/antd/action/Action.Page.js +1 -1
  76. package/lib/schema-component/antd/action/Action.js +10 -55
  77. package/lib/schema-component/antd/action/context.js +1 -13
  78. package/lib/schema-component/antd/action/hooks.js +1 -1
  79. package/lib/schema-component/antd/association-field/FileManager.js +1 -1
  80. package/lib/schema-component/antd/association-field/InternalDrawerSubTable.js +1 -1
  81. package/lib/schema-component/antd/association-field/InternalPicker.js +1 -1
  82. package/lib/schema-component/antd/association-field/InternalTag.js +1 -1
  83. package/lib/schema-component/antd/association-field/InternalViewer.js +1 -1
  84. package/lib/schema-component/antd/association-field/SubTable.js +1 -1
  85. package/lib/schema-component/antd/form-item/FormItem.Settings.js +2 -3
  86. package/lib/schema-component/antd/page/Page.js +21 -26
  87. package/lib/schema-component/antd/record-picker/InputRecordPicker.js +1 -1
  88. package/lib/schema-component/antd/record-picker/ReadPrettyRecordPicker.js +1 -1
  89. package/lib/schema-initializer/items/SelectActionInitializer.js +2 -2
  90. package/lib/schema-items/OpenModeSchemaItems.js +15 -36
  91. package/lib/schema-templates/schemas/uiSchemaTemplates.js +1 -1
  92. package/package.json +7 -7
  93. package/es/built-in/dynamic-page/DynamicPage.context.d.ts +0 -0
  94. package/es/built-in/dynamic-page/DynamicPage.context.mjs +0 -0
  95. package/es/built-in/dynamic-page/DynamicPage.style.d.ts +0 -3
  96. package/es/built-in/dynamic-page/DynamicPage.style.mjs +0 -26
  97. package/es/built-in/dynamic-page/PageNavBar.d.ts +0 -3
  98. package/es/built-in/dynamic-page/PageNavBar.mjs +0 -47
  99. package/es/built-in/dynamic-page/PageNavBar.style.d.ts +0 -3
  100. package/es/built-in/dynamic-page/PageNavBar.style.mjs +0 -25
  101. package/lib/built-in/dynamic-page/DynamicPage.context.js +0 -5
  102. package/lib/built-in/dynamic-page/DynamicPage.style.js +0 -60
  103. package/lib/built-in/dynamic-page/PageNavBar.js +0 -81
  104. package/lib/built-in/dynamic-page/PageNavBar.style.js +0 -59
@@ -1,13 +1,10 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
- import { useMemo } from "react";
2
+ import "react";
3
3
  import { useField, useFieldSchema } from "@tachybase/schema";
4
4
  import { Select } from "antd";
5
5
  import { useTranslation } from "react-i18next";
6
6
  import { SchemaInitializerItem, SchemaInitializerSelect } from "../application/index.mjs";
7
- import { useIsMobile } from "../block-provider/index.mjs";
8
- import { PageStyle } from "../built-in/page-style/PageStyle.provider.mjs";
9
- import { usePageStyle } from "../built-in/page-style/usePageStyle.mjs";
10
- import { OpenMode, useDesignable } from "../schema-component/index.mjs";
7
+ import { useDesignable } from "../schema-component/index.mjs";
11
8
  import { SchemaSettingsSelectItem } from "../schema-settings/index.mjs";
12
9
  const SchemaInitializerOpenModeSchemaItems = (options)=>{
13
10
  var _fieldSchema_xcomponentprops, _fieldSchema_xcomponentprops1, _fieldSchema_xcomponentprops2;
@@ -16,16 +13,7 @@ const SchemaInitializerOpenModeSchemaItems = (options)=>{
16
13
  const field = useField();
17
14
  const { t } = useTranslation();
18
15
  const { dn } = useDesignable();
19
- const isMobile = useIsMobile();
20
- const pageStyle = usePageStyle();
21
- const defaultOpenMode = useMemo(()=>{
22
- if (isMobile || pageStyle === PageStyle.TAB_STYLE) return OpenMode.PAGE;
23
- return OpenMode.DRAWER_MODE;
24
- }, [
25
- isMobile,
26
- pageStyle
27
- ]);
28
- const openModeValue = (null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops['openMode']) || defaultOpenMode;
16
+ const openModeValue = (null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops['openMode']) || 'drawer';
29
17
  var _fieldSchema_xcomponentprops_openSize;
30
18
  return /*#__PURE__*/ jsxs(Fragment, {
31
19
  children: [
@@ -34,11 +22,11 @@ const SchemaInitializerOpenModeSchemaItems = (options)=>{
34
22
  options: [
35
23
  {
36
24
  label: t('Drawer'),
37
- value: OpenMode.DRAWER_MODE
25
+ value: 'drawer'
38
26
  },
39
27
  {
40
28
  label: t('Dialog'),
41
- value: OpenMode.MODAL
29
+ value: 'modal'
42
30
  }
43
31
  ],
44
32
  value: openModeValue,
@@ -58,8 +46,8 @@ const SchemaInitializerOpenModeSchemaItems = (options)=>{
58
46
  }
59
47
  }) : null,
60
48
  openSize && [
61
- OpenMode.MODAL,
62
- OpenMode.DRAWER_MODE
49
+ 'modal',
50
+ 'drawer'
63
51
  ].includes(openModeValue) ? /*#__PURE__*/ jsx(SchemaInitializerItem, {
64
52
  children: /*#__PURE__*/ jsxs("div", {
65
53
  style: {
@@ -86,7 +74,7 @@ const SchemaInitializerOpenModeSchemaItems = (options)=>{
86
74
  value: 'large'
87
75
  }
88
76
  ],
89
- value: null != (_fieldSchema_xcomponentprops_openSize = null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops1 = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops1['openSize']) ? _fieldSchema_xcomponentprops_openSize : (null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops2 = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops2['openMode']) === OpenMode.MODAL ? 'large' : 'middle',
77
+ value: null != (_fieldSchema_xcomponentprops_openSize = null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops1 = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops1['openSize']) ? _fieldSchema_xcomponentprops_openSize : (null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops2 = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops2['openMode']) == 'modal' ? 'large' : 'middle',
90
78
  onChange: (value)=>{
91
79
  field.componentProps.openSize = value;
92
80
  const schema = {
@@ -118,16 +106,7 @@ const SchemaSettingOpenModeSchemaItems = (options)=>{
118
106
  const field = useField();
119
107
  const { t } = useTranslation();
120
108
  const { dn } = useDesignable();
121
- const pageStyle = usePageStyle();
122
- const isMobile = useIsMobile();
123
- const defaultOpenMode = useMemo(()=>{
124
- if (isMobile || pageStyle === PageStyle.TAB_STYLE) return OpenMode.PAGE;
125
- return OpenMode.DRAWER_MODE;
126
- }, [
127
- isMobile,
128
- pageStyle
129
- ]);
130
- const openModeValue = (null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops['openMode']) || defaultOpenMode;
109
+ const openModeValue = (null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops['openMode']) || 'drawer';
131
110
  var _fieldSchema_xcomponentprops_openSize;
132
111
  return /*#__PURE__*/ jsxs(Fragment, {
133
112
  children: [
@@ -136,19 +115,19 @@ const SchemaSettingOpenModeSchemaItems = (options)=>{
136
115
  options: [
137
116
  {
138
117
  label: t('Drawer'),
139
- value: OpenMode.DRAWER_MODE
118
+ value: 'drawer'
140
119
  },
141
120
  {
142
121
  label: t('Dialog'),
143
- value: OpenMode.MODAL
122
+ value: 'modal'
144
123
  },
145
124
  {
146
125
  label: t('Sheet'),
147
- value: OpenMode.SHEET
126
+ value: 'sheet'
148
127
  },
149
128
  {
150
129
  label: t('Page'),
151
- value: OpenMode.PAGE
130
+ value: 'page'
152
131
  }
153
132
  ],
154
133
  value: openModeValue,
@@ -168,8 +147,8 @@ const SchemaSettingOpenModeSchemaItems = (options)=>{
168
147
  }
169
148
  }) : null,
170
149
  openSize && [
171
- OpenMode.MODAL,
172
- OpenMode.DRAWER_MODE
150
+ 'modal',
151
+ 'drawer'
173
152
  ].includes(openModeValue) ? /*#__PURE__*/ jsx(SchemaSettingsSelectItem, {
174
153
  title: t('Popup size'),
175
154
  options: [
@@ -186,7 +165,7 @@ const SchemaSettingOpenModeSchemaItems = (options)=>{
186
165
  value: 'large'
187
166
  }
188
167
  ],
189
- value: null != (_fieldSchema_xcomponentprops_openSize = null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops1 = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops1['openSize']) ? _fieldSchema_xcomponentprops_openSize : (null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops2 = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops2['openMode']) === OpenMode.MODAL ? 'large' : 'middle',
168
+ value: null != (_fieldSchema_xcomponentprops_openSize = null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops1 = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops1['openSize']) ? _fieldSchema_xcomponentprops_openSize : (null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops2 = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops2['openMode']) == 'modal' ? 'large' : 'middle',
190
169
  onChange: (value)=>{
191
170
  field.componentProps.openSize = value;
192
171
  const schema = {
@@ -108,7 +108,7 @@ const uiSchemaTemplatesSchema = {
108
108
  'x-action': 'update',
109
109
  'x-component': 'Action.Link',
110
110
  'x-component-props': {
111
- openMode: 'drawer-mode',
111
+ openMode: 'drawer',
112
112
  icon: 'EditOutlined'
113
113
  },
114
114
  properties: {
@@ -59,7 +59,6 @@ var external_react_default = /*#__PURE__*/ __webpack_require__.n(external_react_
59
59
  const external_lodash_namespaceObject = require("lodash");
60
60
  var external_lodash_default = /*#__PURE__*/ __webpack_require__.n(external_lodash_namespaceObject);
61
61
  const external_react_router_dom_namespaceObject = require("react-router-dom");
62
- const index_js_namespaceObject = require("../schema-component/index.js");
63
62
  const NavigateNoUpdateContext = /*#__PURE__*/ external_react_default().createContext(null);
64
63
  NavigateNoUpdateContext.displayName = 'NavigateNoUpdateContext';
65
64
  const LocationNoUpdateContext = /*#__PURE__*/ external_react_default().createContext(null);
@@ -95,7 +94,7 @@ const IsSubPageClosedByPageMenuProvider = (param)=>{
95
94
  const [fieldSchema, setFieldSchema] = (0, external_react_namespaceObject.useState)(null);
96
95
  const isSubPageClosedByPageMenu = (0, external_react_namespaceObject.useCallback)(()=>{
97
96
  var _fieldSchema_xcomponentprops, _prevParamsRef_current_;
98
- const result = external_lodash_default().isEmpty(params['*']) && (null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops.openMode) === index_js_namespaceObject.OpenMode.PAGE && !!(null == (_prevParamsRef_current_ = prevParamsRef.current['*']) ? void 0 : _prevParamsRef_current_.includes(fieldSchema['x-uid']));
97
+ const result = external_lodash_default().isEmpty(params['*']) && (null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops.openMode) === 'page' && !!(null == (_prevParamsRef_current_ = prevParamsRef.current['*']) ? void 0 : _prevParamsRef_current_.includes(fieldSchema['x-uid']));
99
98
  prevParamsRef.current = params;
100
99
  return result;
101
100
  }, [
@@ -74,9 +74,7 @@ const AppComponent = (0, schema_namespaceObject.observer)((props)=>{
74
74
  app.renderComponent('AppMain')
75
75
  ]
76
76
  }),
77
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_click_to_react_component_namespaceObject.ClickToComponent, {
78
- editor: process.env.REACT_APP_CLICK_TO_COMPONENT_EDITOR || 'vscode'
79
- })
77
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_click_to_react_component_namespaceObject.ClickToComponent, {})
80
78
  ]
81
79
  });
82
80
  }, {
@@ -15,7 +15,7 @@ var __webpack_modules__ = {
15
15
  "../../filter-provider/utils": function(module) {
16
16
  module.exports = require("../../filter-provider/utils.js");
17
17
  },
18
- "../../": function(module) {
18
+ "../..": function(module) {
19
19
  module.exports = require("../../index.js");
20
20
  },
21
21
  "../../record-provider": function(module) {
@@ -182,7 +182,7 @@ var __webpack_exports__ = {};
182
182
  var react_i18next__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("react-i18next");
183
183
  var react_router_dom__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("react-router-dom");
184
184
  var react_to_print__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("react-to-print");
185
- var ___WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("../../");
185
+ var ___WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("../..");
186
186
  var _api_client__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("../../api-client");
187
187
  var _built_in_dynamic_page_utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("../../built-in/dynamic-page/utils");
188
188
  var _collection_manager__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("../../collection-manager");
@@ -525,7 +525,7 @@ var __webpack_exports__ = {};
525
525
  if (s['x-component'] === pageDetailsViewer) return s;
526
526
  return buf;
527
527
  });
528
- if (targetSchema) navigate("./sub/".concat(targetSchema['x-uid'], "/").concat(_built_in_dynamic_page_utils__WEBPACK_IMPORTED_MODULE_13__.PathHandler.getInstance().toWildcardPath({
528
+ if (targetSchema) navigate("../".concat(targetSchema['x-uid'], "/").concat(_built_in_dynamic_page_utils__WEBPACK_IMPORTED_MODULE_13__.PathHandler.getInstance().toWildcardPath({
529
529
  collection: collection.name,
530
530
  filterByTk
531
531
  })));
@@ -56,8 +56,7 @@ const useFormBlockProps = ()=>{
56
56
  resourceName: name
57
57
  });
58
58
  }, [
59
- name,
60
- ctx.form
59
+ name
61
60
  ]);
62
61
  return {
63
62
  form: ctx.form
@@ -134,7 +133,7 @@ const scopesSchema = {
134
133
  'x-component': 'Action',
135
134
  'x-component-props': {
136
135
  icon: 'PlusOutlined',
137
- openMode: external_schema_component_index_js_namespaceObject.OpenMode.DRAWER_MODE,
136
+ openMode: 'drawer',
138
137
  type: 'primary'
139
138
  },
140
139
  properties: {
@@ -258,7 +257,7 @@ const scopesSchema = {
258
257
  'x-decorator': 'ACLActionProvider',
259
258
  'x-component': 'Action.Link',
260
259
  'x-component-props': {
261
- openMode: external_schema_component_index_js_namespaceObject.OpenMode.DRAWER_MODE,
260
+ openMode: 'drawer',
262
261
  icon: 'EditOutlined'
263
262
  },
264
263
  properties: {
@@ -27,56 +27,39 @@ __webpack_require__.d(__webpack_exports__, {
27
27
  DynamicPage: ()=>DynamicPage
28
28
  });
29
29
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
- const external_antd_namespaceObject = require("antd");
30
+ require("react");
31
31
  const external_react_router_dom_namespaceObject = require("react-router-dom");
32
32
  const external_index_js_namespaceObject = require("../index.js");
33
33
  const index_js_namespaceObject = require("../../data-source/index.js");
34
34
  const external_record_provider_index_js_namespaceObject = require("../../record-provider/index.js");
35
35
  const external_schema_component_index_js_namespaceObject = require("../../schema-component/index.js");
36
- const external_DynamicPage_style_js_namespaceObject = require("./DynamicPage.style.js");
37
- const external_PageNavBar_js_namespaceObject = require("./PageNavBar.js");
38
36
  const external_utils_js_namespaceObject = require("./utils.js");
39
37
  const DynamicPage = ()=>{
40
- const { styles } = (0, external_DynamicPage_style_js_namespaceObject.useStyles)();
41
38
  const params = (0, external_react_router_dom_namespaceObject.useParams)();
42
- const pathParams = external_utils_js_namespaceObject.PathHandler.getInstance().parse(params['*'], params.name);
43
- if (!pathParams) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_schema_component_index_js_namespaceObject.RemoteSchemaComponent, {
39
+ if (!params['*']) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_schema_component_index_js_namespaceObject.RemoteSchemaComponent, {
44
40
  uid: params.name,
45
41
  onlyRenderProperties: true
46
42
  });
47
- if (!pathParams.sub || !pathParams.collection || !pathParams.filterByTk || !pathParams.schemaId) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_index_js_namespaceObject.AppNotFound, {});
48
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
49
- className: styles['dynamic-page'],
50
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_namespaceObject.DataBlockProvider, {
43
+ {
44
+ const path = external_utils_js_namespaceObject.PathHandler.getInstance().parse(params['*'], params.name);
45
+ if (!path) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_index_js_namespaceObject.AppNotFound, {});
46
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_namespaceObject.DataBlockProvider, {
51
47
  params: {
52
- filterByTk: pathParams.filterByTk
48
+ filterByTk: path.filterByTk
53
49
  },
54
50
  action: "get",
55
- collection: pathParams.collection,
51
+ collection: path.collection,
56
52
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_record_provider_index_js_namespaceObject.RecordContext_deprecated.Provider, {
57
53
  value: {
58
- id: pathParams.filterByTk
54
+ id: path.filterByTk
59
55
  },
60
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_record_provider_index_js_namespaceObject.RecordProvider, {
61
- record: {
62
- id: pathParams.filterByTk
63
- },
64
- children: [
65
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_PageNavBar_js_namespaceObject.PageNavBar, {
66
- uid: pathParams.sub
67
- }),
68
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Card, {
69
- className: "page-content",
70
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_schema_component_index_js_namespaceObject.RemoteSchemaComponent, {
71
- uid: pathParams.sub,
72
- onlyRenderProperties: true
73
- })
74
- })
75
- ]
56
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_schema_component_index_js_namespaceObject.RemoteSchemaComponent, {
57
+ uid: params.name,
58
+ onlyRenderProperties: true
76
59
  })
77
60
  })
78
- })
79
- });
61
+ });
62
+ }
80
63
  };
81
64
  exports.DynamicPage = __webpack_exports__.DynamicPage;
82
65
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
@@ -54,9 +54,6 @@ class PathHandler {
54
54
  if (!value) continue;
55
55
  let validKey = true;
56
56
  switch(key){
57
- case 'sub':
58
- result.sub = value;
59
- break;
60
57
  case 'collection':
61
58
  result.collection = value;
62
59
  break;
@@ -27,12 +27,12 @@ __webpack_require__.d(__webpack_exports__, {
27
27
  CustomAdminHeader: ()=>CustomAdminHeader
28
28
  });
29
29
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
- const external_PageStyle_provider_js_namespaceObject = require("./PageStyle.provider.js");
30
+ require("react");
31
31
  const external_TabHeader_js_namespaceObject = require("./TabHeader.js");
32
32
  const external_usePageStyle_js_namespaceObject = require("./usePageStyle.js");
33
33
  const CustomAdminHeader = ()=>{
34
34
  const pageStyle = (0, external_usePageStyle_js_namespaceObject.usePageStyle)();
35
- return pageStyle === external_PageStyle_provider_js_namespaceObject.PageStyle.TAB_STYLE ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_TabHeader_js_namespaceObject.TabHeader, {}) : null;
35
+ return 'tab' === pageStyle ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_TabHeader_js_namespaceObject.TabHeader, {}) : null;
36
36
  };
37
37
  exports.CustomAdminHeader = __webpack_exports__.CustomAdminHeader;
38
38
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
@@ -24,7 +24,6 @@ var __webpack_require__ = {};
24
24
  var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
- PageStyle: ()=>PageStyle_provider_PageStyle,
28
27
  PageStyleContext: ()=>PageStyleContext,
29
28
  PageStyleProvider: ()=>PageStyleProvider
30
29
  });
@@ -32,13 +31,8 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
32
31
  const external_react_namespaceObject = require("react");
33
32
  const index_js_namespaceObject = require("../../user/index.js");
34
33
  const external_useTabSettings_js_namespaceObject = require("./useTabSettings.js");
35
- var PageStyle_provider_PageStyle = /*#__PURE__*/ function(PageStyle) {
36
- PageStyle["CLASSICAL"] = "classical";
37
- PageStyle["TAB_STYLE"] = "tab-style";
38
- return PageStyle;
39
- }({});
40
34
  const PageStyleContext = /*#__PURE__*/ (0, external_react_namespaceObject.createContext)({
41
- pageStyle: "classical"
35
+ style: 'classical'
42
36
  });
43
37
  const PageStyleProvider = (param)=>{
44
38
  let { children } = param;
@@ -57,18 +51,16 @@ const PageStyleProvider = (param)=>{
57
51
  ]);
58
52
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PageStyleContext.Provider, {
59
53
  value: {
60
- pageStyle: (null == currentUser ? void 0 : null == (_currentUser_data = currentUser.data) ? void 0 : null == (_currentUser_data_data = _currentUser_data.data) ? void 0 : null == (_currentUser_data_data_systemSettings = _currentUser_data_data.systemSettings) ? void 0 : _currentUser_data_data_systemSettings.pageStyle) || "classical",
54
+ style: (null == currentUser ? void 0 : null == (_currentUser_data = currentUser.data) ? void 0 : null == (_currentUser_data_data = _currentUser_data.data) ? void 0 : null == (_currentUser_data_data_systemSettings = _currentUser_data_data.systemSettings) ? void 0 : _currentUser_data_data_systemSettings.pageStyle) || 'classical',
61
55
  items,
62
56
  setItems
63
57
  },
64
58
  children: children
65
59
  });
66
60
  };
67
- exports.PageStyle = __webpack_exports__.PageStyle;
68
61
  exports.PageStyleContext = __webpack_exports__.PageStyleContext;
69
62
  exports.PageStyleProvider = __webpack_exports__.PageStyleProvider;
70
63
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
71
- "PageStyle",
72
64
  "PageStyleContext",
73
65
  "PageStyleProvider"
74
66
  ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
@@ -32,7 +32,6 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
32
32
  const external_react_namespaceObject = require("react");
33
33
  const css_namespaceObject = require("@emotion/css");
34
34
  const external_react_router_dom_namespaceObject = require("react-router-dom");
35
- const external_index_js_namespaceObject = require("../../index.js");
36
35
  const index_js_namespaceObject = require("../document-title/index.js");
37
36
  const external_PageStyle_provider_js_namespaceObject = require("./PageStyle.provider.js");
38
37
  const external_usePageStyle_js_namespaceObject = require("./usePageStyle.js");
@@ -61,21 +60,20 @@ const TabContentInternal = (param)=>{
61
60
  }, item.key));
62
61
  };
63
62
  const TabContent = ()=>{
64
- const { t } = (0, external_index_js_namespaceObject.useTranslation)();
65
63
  const { title, setTitle } = (0, index_js_namespaceObject.useDocumentTitle)();
66
64
  const location = (0, external_react_router_dom_namespaceObject.useLocation)();
67
65
  const { items, setItems } = (0, external_react_namespaceObject.useContext)(external_PageStyle_provider_js_namespaceObject.PageStyleContext);
68
66
  const targetKey = location.pathname;
69
67
  const outlet = (0, external_react_router_dom_namespaceObject.useOutlet)();
70
68
  (0, external_react_namespaceObject.useEffect)(()=>{
71
- if (targetKey) {
69
+ if (targetKey && title) {
72
70
  const targetItem = items.find((value)=>value.key === targetKey);
73
- if (targetItem) setTitle(null == targetItem ? void 0 : targetItem.label);
71
+ if (targetItem) setTitle(targetItem.label);
74
72
  else setItems([
75
73
  ...items,
76
74
  {
77
75
  key: targetKey,
78
- label: title || t('Unnamed'),
76
+ label: title,
79
77
  children: outlet
80
78
  }
81
79
  ]);
@@ -92,7 +90,7 @@ const TabContent = ()=>{
92
90
  const CustomAdminContent = ()=>{
93
91
  const params = (0, external_react_router_dom_namespaceObject.useParams)();
94
92
  const pageStyle = (0, external_usePageStyle_js_namespaceObject.usePageStyle)();
95
- return params.name && pageStyle === external_PageStyle_provider_js_namespaceObject.PageStyle.TAB_STYLE ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TabContent, {}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_react_router_dom_namespaceObject.Outlet, {});
93
+ return params.name && 'tab' === pageStyle ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TabContent, {}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_react_router_dom_namespaceObject.Outlet, {});
96
94
  };
97
95
  exports.CustomAdminContent = __webpack_exports__.CustomAdminContent;
98
96
  exports.TabContent = __webpack_exports__.TabContent;
@@ -28,7 +28,7 @@ __webpack_require__.d(__webpack_exports__, {
28
28
  });
29
29
  const external_react_namespaceObject = require("react");
30
30
  const external_PageStyle_provider_js_namespaceObject = require("./PageStyle.provider.js");
31
- const usePageStyle = ()=>(0, external_react_namespaceObject.useContext)(external_PageStyle_provider_js_namespaceObject.PageStyleContext).pageStyle;
31
+ const usePageStyle = ()=>(0, external_react_namespaceObject.useContext)(external_PageStyle_provider_js_namespaceObject.PageStyleContext).style;
32
32
  exports.usePageStyle = __webpack_exports__.usePageStyle;
33
33
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
34
34
  "usePageStyle"
@@ -35,10 +35,9 @@ const external_react_i18next_namespaceObject = require("react-i18next");
35
35
  const index_js_namespaceObject = require("../../api-client/index.js");
36
36
  const external_common_index_js_namespaceObject = require("../../common/index.js");
37
37
  const external_user_index_js_namespaceObject = require("../../user/index.js");
38
- const external_PageStyle_provider_js_namespaceObject = require("./PageStyle.provider.js");
39
38
  const useTabSettings = ()=>({
40
- key: external_PageStyle_provider_js_namespaceObject.PageStyle.TAB_STYLE,
41
- eventKey: external_PageStyle_provider_js_namespaceObject.PageStyle.TAB_STYLE,
39
+ key: 'tab',
40
+ eventKey: 'tab',
42
41
  label: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Label, {})
43
42
  });
44
43
  function Label() {
@@ -48,15 +47,15 @@ function Label() {
48
47
  const currentUser = (0, external_user_index_js_namespaceObject.useCurrentUserContext)();
49
48
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_common_index_js_namespaceObject.SelectWithTitle, {
50
49
  title: t('Page style'),
51
- defaultValue: (null == (_currentUser_data_data_systemSettings = currentUser.data.data.systemSettings) ? void 0 : _currentUser_data_data_systemSettings.pageStyle) || external_PageStyle_provider_js_namespaceObject.PageStyle.CLASSICAL,
50
+ defaultValue: (null == (_currentUser_data_data_systemSettings = currentUser.data.data.systemSettings) ? void 0 : _currentUser_data_data_systemSettings.pageStyle) || 'classical',
52
51
  options: [
53
52
  {
54
53
  label: t('classical'),
55
- value: external_PageStyle_provider_js_namespaceObject.PageStyle.CLASSICAL
54
+ value: 'classical'
56
55
  },
57
56
  {
58
57
  label: t('tabs'),
59
- value: external_PageStyle_provider_js_namespaceObject.PageStyle.TAB_STYLE
58
+ value: 'tab'
60
59
  }
61
60
  ],
62
61
  onChange: updateUserPageStyle
@@ -72,7 +71,7 @@ function useUpdatePageStyleSettings() {
72
71
  await api.resource('users').updateProfile({
73
72
  values: {
74
73
  systemSettings: {
75
- ...currentUser.data.data.systemSettings,
74
+ ...currentUser.data.data.systemSettings || {},
76
75
  pageStyle
77
76
  }
78
77
  }
@@ -81,7 +80,7 @@ function useUpdatePageStyleSettings() {
81
80
  data: {
82
81
  ...currentUser.data.data,
83
82
  systemSettings: {
84
- ...currentUser.data.data.systemSettings,
83
+ ...currentUser.data.data.systemSettings || {},
85
84
  pageStyle
86
85
  }
87
86
  }
@@ -103,7 +103,7 @@ function QuickAccessPopupActionSchemaInitializerItem(props) {
103
103
  icon: values.icon,
104
104
  iconColor: values.iconColor,
105
105
  refreshDataBlockRequest: false,
106
- openMode: external_schema_component_index_js_namespaceObject.OpenMode.DRAWER_MODE
106
+ openMode: 'drawer'
107
107
  },
108
108
  properties: {
109
109
  drawer: {
@@ -823,7 +823,6 @@ module.exports = {
823
823
  "UI editor": "UI editor",
824
824
  Unconnected: "Unconnected",
825
825
  Unique: "Unique",
826
- Unnamed: "Unnamed",
827
826
  "Unsaved changes": "Unsaved changes",
828
827
  Untitled: "Untitled",
829
828
  Update: "Update",
@@ -27,7 +27,7 @@ __webpack_require__.d(__webpack_exports__, {
27
27
  CreateChildInitializer: ()=>CreateChildInitializer
28
28
  });
29
29
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
- const index_js_namespaceObject = require("../../../schema-component/index.js");
30
+ require("react");
31
31
  const ActionInitializer_js_namespaceObject = require("../../../schema-initializer/items/ActionInitializer.js");
32
32
  const CreateChildInitializer = (props)=>{
33
33
  const schema = {
@@ -39,7 +39,7 @@ const CreateChildInitializer = (props)=>{
39
39
  'x-component': 'Action',
40
40
  'x-visible': '{{treeTable}}',
41
41
  'x-component-props': {
42
- openMode: index_js_namespaceObject.OpenMode.DRAWER_MODE,
42
+ openMode: 'drawer',
43
43
  type: 'link',
44
44
  addChild: true,
45
45
  style: {
@@ -27,8 +27,8 @@ __webpack_require__.d(__webpack_exports__, {
27
27
  CreateActionInitializer: ()=>CreateActionInitializer
28
28
  });
29
29
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
+ require("react");
30
31
  const index_js_namespaceObject = require("../../../application/index.js");
31
- const external_schema_component_index_js_namespaceObject = require("../../../schema-component/index.js");
32
32
  const ActionInitializer_js_namespaceObject = require("../../../schema-initializer/items/ActionInitializer.js");
33
33
  const CreateActionInitializer = ()=>{
34
34
  const schema = {
@@ -41,7 +41,7 @@ const CreateActionInitializer = ()=>{
41
41
  'x-component': 'Action',
42
42
  'x-decorator': 'ACLActionProvider',
43
43
  'x-component-props': {
44
- openMode: external_schema_component_index_js_namespaceObject.OpenMode.DRAWER_MODE,
44
+ openMode: 'drawer',
45
45
  type: 'primary',
46
46
  component: 'CreateRecordAction',
47
47
  icon: 'PlusOutlined'
@@ -27,8 +27,8 @@ __webpack_require__.d(__webpack_exports__, {
27
27
  CustomizeAddRecordActionInitializer: ()=>CustomizeAddRecordActionInitializer
28
28
  });
29
29
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
+ require("react");
30
31
  const index_js_namespaceObject = require("../../../application/index.js");
31
- const external_schema_component_index_js_namespaceObject = require("../../../schema-component/index.js");
32
32
  const BlockInitializer_js_namespaceObject = require("../../../schema-initializer/items/BlockInitializer.js");
33
33
  const CustomizeAddRecordActionInitializer = ()=>{
34
34
  const schema = {
@@ -39,7 +39,7 @@ const CustomizeAddRecordActionInitializer = ()=>{
39
39
  'x-component': 'Action',
40
40
  'x-action': 'customize:create',
41
41
  'x-component-props': {
42
- openMode: external_schema_component_index_js_namespaceObject.OpenMode.DRAWER_MODE,
42
+ openMode: 'drawer',
43
43
  icon: 'PlusOutlined'
44
44
  },
45
45
  properties: {
@@ -29,7 +29,6 @@ __webpack_require__.d(__webpack_exports__, {
29
29
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
30
  require("react");
31
31
  const index_js_namespaceObject = require("../../../application/index.js");
32
- const external_schema_component_index_js_namespaceObject = require("../../../schema-component/index.js");
33
32
  const ActionInitializer_js_namespaceObject = require("../../../schema-initializer/items/ActionInitializer.js");
34
33
  const AssociateActionInitializer = ()=>{
35
34
  const schema = {
@@ -42,7 +41,7 @@ const AssociateActionInitializer = ()=>{
42
41
  'x-component': 'Action',
43
42
  'x-component-props': {
44
43
  actionType: 'associations',
45
- openMode: external_schema_component_index_js_namespaceObject.OpenMode.DRAWER_MODE,
44
+ openMode: 'drawer',
46
45
  type: 'primary',
47
46
  icon: 'PlusOutlined'
48
47
  },
@@ -42,10 +42,7 @@ const external_schema_settings_SchemaSettings_js_namespaceObject = require("../.
42
42
  const Tree = (0, schema_namespaceObject.connect)(external_antd_namespaceObject.Tree, (0, schema_namespaceObject.mapProps)((props, field)=>{
43
43
  (0, external_react_namespaceObject.useEffect)(()=>{
44
44
  field.value = props.defaultCheckedKeys || [];
45
- }, [
46
- field.value,
47
- props.defaultCheckedKeys
48
- ]);
45
+ }, []);
49
46
  const [checkedKeys, setCheckedKeys] = (0, external_react_namespaceObject.useState)(props.defaultCheckedKeys || []);
50
47
  const onCheck = (checkedKeys)=>{
51
48
  setCheckedKeys(checkedKeys);
@@ -183,7 +180,7 @@ const createSubmitActionSettings = new SchemaSettings_js_namespaceObject.SchemaS
183
180
  useVisible () {
184
181
  const { fieldSchema } = (0, external_schema_component_index_js_namespaceObject.useActionContext)();
185
182
  const openMode = (0, Action_Designer_js_namespaceObject.findSchema)(fieldSchema);
186
- return !openMode || openMode === external_schema_component_index_js_namespaceObject.OpenMode.PAGE;
183
+ return !openMode || 'page' === openMode;
187
184
  },
188
185
  useComponentProps () {
189
186
  var _fieldSchema_xactionsettings;
@@ -27,8 +27,8 @@ __webpack_require__.d(__webpack_exports__, {
27
27
  PopupActionInitializer: ()=>PopupActionInitializer
28
28
  });
29
29
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
+ require("react");
30
31
  const index_js_namespaceObject = require("../../../application/index.js");
31
- const external_schema_component_index_js_namespaceObject = require("../../../schema-component/index.js");
32
32
  const items_index_js_namespaceObject = require("../../../schema-initializer/items/index.js");
33
33
  const PopupActionInitializer = (props)=>{
34
34
  const schema = {
@@ -39,7 +39,7 @@ const PopupActionInitializer = (props)=>{
39
39
  'x-settings': 'actionSettings:popup',
40
40
  'x-component': (null == props ? void 0 : props['x-component']) || 'Action.Link',
41
41
  'x-component-props': {
42
- openMode: external_schema_component_index_js_namespaceObject.OpenMode.DRAWER_MODE
42
+ openMode: 'drawer'
43
43
  },
44
44
  properties: {
45
45
  drawer: {
@@ -27,7 +27,7 @@ __webpack_require__.d(__webpack_exports__, {
27
27
  UpdateActionInitializer: ()=>UpdateActionInitializer
28
28
  });
29
29
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
- const index_js_namespaceObject = require("../../../schema-component/index.js");
30
+ require("react");
31
31
  const ActionInitializer_js_namespaceObject = require("../../../schema-initializer/items/ActionInitializer.js");
32
32
  const UpdateActionInitializer = (props)=>{
33
33
  const schema = {
@@ -38,7 +38,7 @@ const UpdateActionInitializer = (props)=>{
38
38
  'x-settings': 'actionSettings:edit',
39
39
  'x-component': 'Action',
40
40
  'x-component-props': {
41
- openMode: index_js_namespaceObject.OpenMode.DRAWER_MODE,
41
+ openMode: 'drawer',
42
42
  icon: 'EditOutlined'
43
43
  },
44
44
  properties: {