@tachybase/client 1.3.17 → 1.3.18

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 (111) hide show
  1. package/es/application/CustomRouterContextProvider.mjs +2 -1
  2. package/es/application/components/AppComponent.mjs +3 -1
  3. package/es/application/schema-initializer/hooks/index.d.ts +1 -1
  4. package/es/application/schema-initializer/hooks/index.mjs +2 -2
  5. package/es/block-provider/hooks/index.mjs +1 -1
  6. package/es/built-in/acl/Configuration/schemas/scopes.mjs +5 -4
  7. package/es/built-in/dynamic-page/DynamicPage.context.d.ts +0 -0
  8. package/es/built-in/dynamic-page/DynamicPage.context.mjs +0 -0
  9. package/es/built-in/dynamic-page/DynamicPage.mjs +33 -16
  10. package/es/built-in/dynamic-page/DynamicPage.style.d.ts +3 -0
  11. package/es/built-in/dynamic-page/DynamicPage.style.mjs +26 -0
  12. package/es/built-in/dynamic-page/PageNavBar.d.ts +3 -0
  13. package/es/built-in/dynamic-page/PageNavBar.mjs +47 -0
  14. package/es/built-in/dynamic-page/PageNavBar.style.d.ts +3 -0
  15. package/es/built-in/dynamic-page/PageNavBar.style.mjs +25 -0
  16. package/es/built-in/dynamic-page/utils.d.ts +2 -1
  17. package/es/built-in/dynamic-page/utils.mjs +3 -0
  18. package/es/built-in/locale/LocalePlugin.mjs +1 -1
  19. package/es/built-in/page-style/CustomAdminHeader.mjs +2 -2
  20. package/es/built-in/page-style/PageStyle.provider.d.ts +7 -2
  21. package/es/built-in/page-style/PageStyle.provider.mjs +8 -3
  22. package/es/built-in/page-style/TabContent.mjs +7 -5
  23. package/es/built-in/page-style/usePageStyle.d.ts +1 -1
  24. package/es/built-in/page-style/usePageStyle.mjs +1 -1
  25. package/es/built-in/page-style/useTabSettings.d.ts +4 -3
  26. package/es/built-in/page-style/useTabSettings.mjs +8 -7
  27. package/es/built-in/quick-access/PopupActionSchemaInitializerItem.mjs +2 -2
  28. package/es/modules/actions/add-child/CreateChildInitializer.mjs +2 -2
  29. package/es/modules/actions/add-new/CreateActionInitializer.mjs +2 -2
  30. package/es/modules/actions/add-record/CustomizeAddRecordActionInitializer.mjs +2 -2
  31. package/es/modules/actions/associate/AssociateActionInitializer.mjs +2 -1
  32. package/es/modules/actions/submit/createSubmitActionSettings.mjs +6 -3
  33. package/es/modules/actions/view-edit-popup/PopupActionInitializer.mjs +2 -2
  34. package/es/modules/actions/view-edit-popup/UpdateActionInitializer.mjs +2 -2
  35. package/es/modules/actions/view-edit-popup/ViewActionInitializer.mjs +2 -2
  36. package/es/modules/fields/component/DrawerSubTable/drawerSubTableComponentFieldSettings.mjs +2 -2
  37. package/es/modules/fields/component/Picker/recordPickerComponentFieldSettings.mjs +2 -2
  38. package/es/modules/fields/component/Select/selectComponentFieldSettings.mjs +2 -2
  39. package/es/schema-component/antd/action/Action.Container.mjs +26 -5
  40. package/es/schema-component/antd/action/Action.Designer.mjs +14 -3
  41. package/es/schema-component/antd/action/Action.Page.mjs +1 -1
  42. package/es/schema-component/antd/action/Action.mjs +56 -11
  43. package/es/schema-component/antd/action/context.d.ts +9 -1
  44. package/es/schema-component/antd/action/context.mjs +10 -1
  45. package/es/schema-component/antd/action/hooks.d.ts +2 -1
  46. package/es/schema-component/antd/action/hooks.mjs +2 -2
  47. package/es/schema-component/antd/association-field/FileManager.mjs +2 -2
  48. package/es/schema-component/antd/association-field/InternalDrawerSubTable.mjs +2 -2
  49. package/es/schema-component/antd/association-field/InternalPicker.mjs +2 -2
  50. package/es/schema-component/antd/association-field/InternalTag.mjs +2 -2
  51. package/es/schema-component/antd/association-field/InternalViewer.mjs +2 -2
  52. package/es/schema-component/antd/association-field/SubTable.mjs +2 -2
  53. package/es/schema-component/antd/form-item/FormItem.Settings.mjs +3 -2
  54. package/es/schema-component/antd/page/Page.mjs +27 -22
  55. package/es/schema-component/antd/record-picker/InputRecordPicker.mjs +2 -2
  56. package/es/schema-component/antd/record-picker/ReadPrettyRecordPicker.mjs +2 -2
  57. package/es/schema-initializer/items/SelectActionInitializer.mjs +2 -2
  58. package/es/schema-items/OpenModeSchemaItems.mjs +37 -16
  59. package/es/schema-templates/schemas/uiSchemaTemplates.mjs +1 -1
  60. package/es/user/ChangePassword.mjs +19 -4
  61. package/lib/application/CustomRouterContextProvider.js +2 -1
  62. package/lib/application/components/AppComponent.js +3 -1
  63. package/lib/application/schema-initializer/hooks/index.js +152 -193
  64. package/lib/block-provider/hooks/index.js +3 -3
  65. package/lib/built-in/acl/Configuration/schemas/scopes.js +4 -3
  66. package/lib/built-in/dynamic-page/DynamicPage.context.js +5 -0
  67. package/lib/built-in/dynamic-page/DynamicPage.js +31 -14
  68. package/lib/built-in/dynamic-page/DynamicPage.style.js +60 -0
  69. package/lib/built-in/dynamic-page/PageNavBar.js +81 -0
  70. package/lib/built-in/dynamic-page/PageNavBar.style.js +59 -0
  71. package/lib/built-in/dynamic-page/utils.js +3 -0
  72. package/lib/built-in/locale/LocalePlugin.js +1 -1
  73. package/lib/built-in/page-style/CustomAdminHeader.js +2 -2
  74. package/lib/built-in/page-style/PageStyle.provider.js +10 -2
  75. package/lib/built-in/page-style/TabContent.js +6 -4
  76. package/lib/built-in/page-style/usePageStyle.js +1 -1
  77. package/lib/built-in/page-style/useTabSettings.js +8 -7
  78. package/lib/built-in/quick-access/PopupActionSchemaInitializerItem.js +1 -1
  79. package/lib/locale/en_US.js +1 -0
  80. package/lib/modules/actions/add-child/CreateChildInitializer.js +2 -2
  81. package/lib/modules/actions/add-new/CreateActionInitializer.js +2 -2
  82. package/lib/modules/actions/add-record/CustomizeAddRecordActionInitializer.js +2 -2
  83. package/lib/modules/actions/associate/AssociateActionInitializer.js +2 -1
  84. package/lib/modules/actions/submit/createSubmitActionSettings.js +5 -2
  85. package/lib/modules/actions/view-edit-popup/PopupActionInitializer.js +2 -2
  86. package/lib/modules/actions/view-edit-popup/UpdateActionInitializer.js +2 -2
  87. package/lib/modules/actions/view-edit-popup/ViewActionInitializer.js +2 -2
  88. package/lib/modules/fields/component/DrawerSubTable/drawerSubTableComponentFieldSettings.js +1 -1
  89. package/lib/modules/fields/component/Picker/recordPickerComponentFieldSettings.js +1 -1
  90. package/lib/modules/fields/component/Select/selectComponentFieldSettings.js +1 -1
  91. package/lib/schema-component/antd/action/Action.Container.js +25 -4
  92. package/lib/schema-component/antd/action/Action.Designer.js +13 -2
  93. package/lib/schema-component/antd/action/Action.Page.js +1 -1
  94. package/lib/schema-component/antd/action/Action.js +55 -10
  95. package/lib/schema-component/antd/action/context.js +13 -1
  96. package/lib/schema-component/antd/action/hooks.js +1 -1
  97. package/lib/schema-component/antd/association-field/FileManager.js +1 -1
  98. package/lib/schema-component/antd/association-field/InternalDrawerSubTable.js +1 -1
  99. package/lib/schema-component/antd/association-field/InternalPicker.js +1 -1
  100. package/lib/schema-component/antd/association-field/InternalTag.js +1 -1
  101. package/lib/schema-component/antd/association-field/InternalViewer.js +1 -1
  102. package/lib/schema-component/antd/association-field/SubTable.js +1 -1
  103. package/lib/schema-component/antd/form-item/FormItem.Settings.js +3 -2
  104. package/lib/schema-component/antd/page/Page.js +26 -21
  105. package/lib/schema-component/antd/record-picker/InputRecordPicker.js +1 -1
  106. package/lib/schema-component/antd/record-picker/ReadPrettyRecordPicker.js +1 -1
  107. package/lib/schema-initializer/items/SelectActionInitializer.js +2 -2
  108. package/lib/schema-items/OpenModeSchemaItems.js +36 -15
  109. package/lib/schema-templates/schemas/uiSchemaTemplates.js +1 -1
  110. package/lib/user/ChangePassword.js +18 -3
  111. package/package.json +10 -11
@@ -1,37 +1,5 @@
1
1
  "use strict";
2
- var __webpack_modules__ = {
3
- "../../../schema-component": function(module) {
4
- module.exports = require("../../../schema-component/index.js");
5
- },
6
- "../../hooks": function(module) {
7
- module.exports = require("../../hooks/index.js");
8
- },
9
- "../components/SchemaInitializerButton": function(module) {
10
- module.exports = require("../components/SchemaInitializerButton.js");
11
- },
12
- "../components": function(module) {
13
- module.exports = require("../components/index.js");
14
- },
15
- "../hoc": function(module) {
16
- module.exports = require("../hoc/index.js");
17
- },
18
- "./useAriaAttributeOfMenuItem": function(module) {
19
- module.exports = require("./useAriaAttributeOfMenuItem.js");
20
- },
21
- react: function(module) {
22
- module.exports = require("react");
23
- }
24
- };
25
- var __webpack_module_cache__ = {};
26
- function __webpack_require__(moduleId) {
27
- var cachedModule = __webpack_module_cache__[moduleId];
28
- if (void 0 !== cachedModule) return cachedModule.exports;
29
- var module = __webpack_module_cache__[moduleId] = {
30
- exports: {}
31
- };
32
- __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
33
- return module.exports;
34
- }
2
+ var __webpack_require__ = {};
35
3
  (()=>{
36
4
  __webpack_require__.n = (module)=>{
37
5
  var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
@@ -63,181 +31,172 @@ function __webpack_require__(moduleId) {
63
31
  };
64
32
  })();
65
33
  var __webpack_exports__ = {};
66
- (()=>{
67
- __webpack_require__.r(__webpack_exports__);
68
- __webpack_require__.d(__webpack_exports__, {
69
- useGetSchemaInitializerMenuItems: ()=>useGetSchemaInitializerMenuItems,
70
- useSchemaInitializerMenuItems: ()=>useSchemaInitializerMenuItems,
71
- useSchemaInitializerRender: ()=>useSchemaInitializerRender
72
- });
73
- var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("react");
74
- var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/ __webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
75
- var _schema_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../../schema-component");
76
- var _hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../hooks");
77
- var _components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../components");
78
- var _components_SchemaInitializerButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../components/SchemaInitializerButton");
79
- var _hoc__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../hoc");
80
- var _useAriaAttributeOfMenuItem__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("./useAriaAttributeOfMenuItem");
81
- var __WEBPACK_REEXPORT_OBJECT__ = {};
82
- for(var __WEBPACK_IMPORT_KEY__ in _useAriaAttributeOfMenuItem__WEBPACK_IMPORTED_MODULE_6__)if ([
83
- "useGetSchemaInitializerMenuItems",
84
- "useSchemaInitializerRender",
85
- "useSchemaInitializerMenuItems",
86
- "default"
87
- ].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
88
- return _useAriaAttributeOfMenuItem__WEBPACK_IMPORTED_MODULE_6__[key];
89
- }).bind(0, __WEBPACK_IMPORT_KEY__);
90
- __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
91
- function useSchemaInitializerMenuItems(items, name, onClick) {
92
- const getMenuItems = useGetSchemaInitializerMenuItems(onClick);
93
- return (0, react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(()=>getMenuItems(items, name), [
94
- getMenuItems,
95
- items,
96
- name
97
- ]);
98
- }
99
- function useGetSchemaInitializerMenuItems(onClick) {
100
- const compile = (0, _schema_component__WEBPACK_IMPORTED_MODULE_1__.useCompile)();
101
- const getMenuItems = (0, react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((items, parentKey)=>{
102
- if (!(null == items ? void 0 : items.length)) return [];
103
- return items.map((item, indexA)=>{
104
- const ItemComponent = item.component || item.Component;
105
- let element;
106
- const compiledTitle = item.title || item.label ? compile(item.title || item.label) : void 0;
107
- if (ItemComponent) {
108
- element = /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components__WEBPACK_IMPORTED_MODULE_3__.SchemaInitializerChild, {
109
- ...item,
110
- title: compiledTitle
111
- });
112
- if (!element) return;
113
- }
114
- if ('divider' === item.type) return {
115
- type: 'divider',
116
- key: item.key || "divider-".concat(indexA)
117
- };
118
- if ('item' === item.type && ItemComponent) {
119
- if (!item.key) item.key = "".concat(compiledTitle, "-").concat(indexA);
120
- return item.associationField ? {
121
- key: item.key,
122
- label: element,
123
- associationField: item.associationField
124
- } : {
125
- key: item.key,
126
- label: element
127
- };
128
- }
129
- if ('itemGroup' === item.type) {
130
- const label = 'string' == typeof compiledTitle ? compiledTitle : item.title;
131
- const key = item.key || "".concat(parentKey, "-item-group-").concat(indexA);
132
- return {
133
- type: 'group',
134
- key,
135
- label,
136
- children: (null == item ? void 0 : item.children.length) ? getMenuItems(item.children, key) : []
137
- };
138
- }
139
- if ('subMenu' === item.type) {
140
- const label = compiledTitle;
141
- const key = item.key || item.name || "".concat(parentKey, "-sub-menu-").concat(indexA);
142
- return {
143
- key,
144
- label,
145
- children: (null == item ? void 0 : item.children.length) ? getMenuItems(item.children, key) : []
146
- };
147
- }
148
- if (item.isMenuType) {
149
- const { isMenuType, ...menuData } = item;
150
- return menuData;
151
- }
152
- const label = element || compiledTitle || item.label;
153
- const key = item.key || "".concat(parentKey, "-").concat(compiledTitle, "-").concat(indexA);
154
- const handleClick = (info)=>{
155
- info.domEvent.stopPropagation();
156
- if (info.key !== key) return;
157
- if (item.onClick) item.onClick({
158
- ...info,
159
- item
160
- });
161
- else null == onClick || onClick({
162
- ...info,
163
- item
164
- });
165
- };
34
+ __webpack_require__.r(__webpack_exports__);
35
+ __webpack_require__.d(__webpack_exports__, {
36
+ useGetSchemaInitializerMenuItems: ()=>useGetSchemaInitializerMenuItems,
37
+ useSchemaInitializerRender: ()=>useSchemaInitializerRender,
38
+ useSchemaInitializerMenuItems: ()=>useSchemaInitializerMenuItems,
39
+ useAriaAttributeOfMenuItem: ()=>external_useAriaAttributeOfMenuItem_js_namespaceObject.useAriaAttributeOfMenuItem
40
+ });
41
+ const external_react_namespaceObject = require("react");
42
+ var external_react_default = /*#__PURE__*/ __webpack_require__.n(external_react_namespaceObject);
43
+ const index_js_namespaceObject = require("../../../schema-component/index.js");
44
+ const external_hooks_index_js_namespaceObject = require("../../hooks/index.js");
45
+ const external_components_index_js_namespaceObject = require("../components/index.js");
46
+ const SchemaInitializerButton_js_namespaceObject = require("../components/SchemaInitializerButton.js");
47
+ const external_hoc_index_js_namespaceObject = require("../hoc/index.js");
48
+ const external_useAriaAttributeOfMenuItem_js_namespaceObject = require("./useAriaAttributeOfMenuItem.js");
49
+ function useSchemaInitializerMenuItems(items, name, onClick) {
50
+ const getMenuItems = useGetSchemaInitializerMenuItems(onClick);
51
+ return (0, external_react_namespaceObject.useMemo)(()=>getMenuItems(items, name), [
52
+ getMenuItems,
53
+ items,
54
+ name
55
+ ]);
56
+ }
57
+ function useGetSchemaInitializerMenuItems(onClick) {
58
+ const compile = (0, index_js_namespaceObject.useCompile)();
59
+ const getMenuItems = (0, external_react_namespaceObject.useCallback)((items, parentKey)=>{
60
+ if (!(null == items ? void 0 : items.length)) return [];
61
+ return items.map((item, indexA)=>{
62
+ const ItemComponent = item.component || item.Component;
63
+ let element;
64
+ const compiledTitle = item.title || item.label ? compile(item.title || item.label) : void 0;
65
+ if (ItemComponent) {
66
+ element = /*#__PURE__*/ external_react_default().createElement(external_components_index_js_namespaceObject.SchemaInitializerChild, {
67
+ ...item,
68
+ title: compiledTitle
69
+ });
70
+ if (!element) return;
71
+ }
72
+ if ('divider' === item.type) return {
73
+ type: 'divider',
74
+ key: item.key || "divider-".concat(indexA)
75
+ };
76
+ if ('item' === item.type && ItemComponent) {
77
+ if (!item.key) item.key = "".concat(compiledTitle, "-").concat(indexA);
166
78
  return item.associationField ? {
79
+ key: item.key,
80
+ label: element,
81
+ associationField: item.associationField
82
+ } : {
83
+ key: item.key,
84
+ label: element
85
+ };
86
+ }
87
+ if ('itemGroup' === item.type) {
88
+ const label = 'string' == typeof compiledTitle ? compiledTitle : item.title;
89
+ const key = item.key || "".concat(parentKey, "-item-group-").concat(indexA);
90
+ return {
91
+ type: 'group',
167
92
  key,
168
93
  label,
169
- associationField: item.associationField,
170
- onClick: handleClick
171
- } : {
94
+ children: (null == item ? void 0 : item.children.length) ? getMenuItems(item.children, key) : []
95
+ };
96
+ }
97
+ if ('subMenu' === item.type) {
98
+ const label = compiledTitle;
99
+ const key = item.key || item.name || "".concat(parentKey, "-sub-menu-").concat(indexA);
100
+ return {
172
101
  key,
173
102
  label,
174
- onClick: handleClick
103
+ children: (null == item ? void 0 : item.children.length) ? getMenuItems(item.children, key) : []
175
104
  };
176
- });
177
- }, [
178
- compile,
179
- onClick
180
- ]);
181
- return getMenuItems;
182
- }
183
- const InitializerComponent = /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_0___default().memo((options)=>{
184
- const Component = options.Component || _components_SchemaInitializerButton__WEBPACK_IMPORTED_MODULE_4__.SchemaInitializerButton;
185
- const ItemsComponent = options.ItemsComponent || _components__WEBPACK_IMPORTED_MODULE_3__.SchemaInitializerItems;
186
- const itemsComponentProps = {
187
- ...options.itemsComponentProps,
188
- options,
189
- items: options.items,
190
- style: options.itemsComponentStyle
105
+ }
106
+ if (item.isMenuType) {
107
+ const { isMenuType, ...menuData } = item;
108
+ return menuData;
109
+ }
110
+ const label = element || compiledTitle || item.label;
111
+ const key = item.key || "".concat(parentKey, "-").concat(compiledTitle, "-").concat(indexA);
112
+ const handleClick = (info)=>{
113
+ info.domEvent.stopPropagation();
114
+ if (info.key !== key) return;
115
+ if (item.onClick) item.onClick({
116
+ ...info,
117
+ item
118
+ });
119
+ else null == onClick || onClick({
120
+ ...info,
121
+ item
122
+ });
123
+ };
124
+ return item.associationField ? {
125
+ key,
126
+ label,
127
+ associationField: item.associationField,
128
+ onClick: handleClick
129
+ } : {
130
+ key,
131
+ label,
132
+ onClick: handleClick
133
+ };
134
+ });
135
+ }, [
136
+ compile,
137
+ onClick
138
+ ]);
139
+ return getMenuItems;
140
+ }
141
+ const InitializerComponent = /*#__PURE__*/ external_react_default().memo((options)=>{
142
+ const Component = options.Component || SchemaInitializerButton_js_namespaceObject.SchemaInitializerButton;
143
+ const ItemsComponent = options.ItemsComponent || external_components_index_js_namespaceObject.SchemaInitializerItems;
144
+ const itemsComponentProps = {
145
+ ...options.itemsComponentProps,
146
+ options,
147
+ items: options.items,
148
+ style: options.itemsComponentStyle
149
+ };
150
+ const C = (0, external_react_namespaceObject.useMemo)(()=>(0, external_hoc_index_js_namespaceObject.withInitializer)(Component), [
151
+ Component
152
+ ]);
153
+ return /*#__PURE__*/ external_react_default().createElement(C, options, /*#__PURE__*/ external_react_default().createElement(ItemsComponent, itemsComponentProps));
154
+ });
155
+ InitializerComponent.displayName = 'InitializerComponent';
156
+ function useSchemaInitializerRender(name, options) {
157
+ const app = (0, external_hooks_index_js_namespaceObject.useApp)();
158
+ const renderCache = external_react_default().useRef({});
159
+ const initializer = (0, external_react_namespaceObject.useMemo)(()=>app.schemaInitializerManager.get(name), [
160
+ app.schemaInitializerManager,
161
+ name
162
+ ]);
163
+ const res = (0, external_react_namespaceObject.useMemo)(()=>{
164
+ if (!name) return {
165
+ exists: false,
166
+ render: ()=>null
191
167
  };
192
- const C = (0, react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(()=>(0, _hoc__WEBPACK_IMPORTED_MODULE_5__.withInitializer)(Component), [
193
- Component
194
- ]);
195
- return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(C, options, /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ItemsComponent, itemsComponentProps));
196
- });
197
- InitializerComponent.displayName = 'InitializerComponent';
198
- function useSchemaInitializerRender(name, options) {
199
- const app = (0, _hooks__WEBPACK_IMPORTED_MODULE_2__.useApp)();
200
- const renderCache = react__WEBPACK_IMPORTED_MODULE_0___default().useRef({});
201
- const initializer = (0, react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(()=>app.schemaInitializerManager.get(name), [
202
- app.schemaInitializerManager,
203
- name
204
- ]);
205
- const res = (0, react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(()=>{
206
- if (!name) return {
168
+ if (!initializer) {
169
+ console.error('[tachybase]: SchemaInitializer "'.concat(name, '" not found'));
170
+ return {
207
171
  exists: false,
208
172
  render: ()=>null
209
173
  };
210
- if (!initializer) {
211
- console.error('[tachybase]: SchemaInitializer "'.concat(name, '" not found'));
212
- return {
213
- exists: false,
214
- render: ()=>null
215
- };
174
+ }
175
+ return {
176
+ exists: true,
177
+ render: (props)=>{
178
+ const key = JSON.stringify(props) || '{}';
179
+ if (renderCache.current[key]) return renderCache.current[key];
180
+ return renderCache.current[key] = /*#__PURE__*/ external_react_default().createElement(InitializerComponent, {
181
+ ...initializer.options,
182
+ ...options,
183
+ ...props
184
+ });
216
185
  }
217
- return {
218
- exists: true,
219
- render: (props)=>{
220
- const key = JSON.stringify(props) || '{}';
221
- if (renderCache.current[key]) return renderCache.current[key];
222
- return renderCache.current[key] = /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(InitializerComponent, {
223
- ...initializer.options,
224
- ...options,
225
- ...props
226
- });
227
- }
228
- };
229
- }, [
230
- initializer,
231
- name,
232
- options
233
- ]);
234
- return res;
235
- }
236
- })();
186
+ };
187
+ }, [
188
+ initializer,
189
+ name,
190
+ options
191
+ ]);
192
+ return res;
193
+ }
194
+ exports.useAriaAttributeOfMenuItem = __webpack_exports__.useAriaAttributeOfMenuItem;
237
195
  exports.useGetSchemaInitializerMenuItems = __webpack_exports__.useGetSchemaInitializerMenuItems;
238
196
  exports.useSchemaInitializerMenuItems = __webpack_exports__.useSchemaInitializerMenuItems;
239
197
  exports.useSchemaInitializerRender = __webpack_exports__.useSchemaInitializerRender;
240
198
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
199
+ "useAriaAttributeOfMenuItem",
241
200
  "useGetSchemaInitializerMenuItems",
242
201
  "useSchemaInitializerMenuItems",
243
202
  "useSchemaInitializerRender"
@@ -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("../".concat(targetSchema['x-uid'], "/").concat(_built_in_dynamic_page_utils__WEBPACK_IMPORTED_MODULE_13__.PathHandler.getInstance().toWildcardPath({
528
+ if (targetSchema) navigate("./sub/".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,7 +56,8 @@ const useFormBlockProps = ()=>{
56
56
  resourceName: name
57
57
  });
58
58
  }, [
59
- name
59
+ name,
60
+ ctx.form
60
61
  ]);
61
62
  return {
62
63
  form: ctx.form
@@ -133,7 +134,7 @@ const scopesSchema = {
133
134
  'x-component': 'Action',
134
135
  'x-component-props': {
135
136
  icon: 'PlusOutlined',
136
- openMode: 'drawer',
137
+ openMode: external_schema_component_index_js_namespaceObject.OpenMode.DRAWER_MODE,
137
138
  type: 'primary'
138
139
  },
139
140
  properties: {
@@ -257,7 +258,7 @@ const scopesSchema = {
257
258
  'x-decorator': 'ACLActionProvider',
258
259
  'x-component': 'Action.Link',
259
260
  'x-component-props': {
260
- openMode: 'drawer',
261
+ openMode: external_schema_component_index_js_namespaceObject.OpenMode.DRAWER_MODE,
261
262
  icon: 'EditOutlined'
262
263
  },
263
264
  properties: {
@@ -0,0 +1,5 @@
1
+ var __webpack_exports__ = {};
2
+ for(var __webpack_i__ in __webpack_exports__)exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
3
+ Object.defineProperty(exports, '__esModule', {
4
+ value: true
5
+ });
@@ -27,39 +27,56 @@ __webpack_require__.d(__webpack_exports__, {
27
27
  DynamicPage: ()=>DynamicPage
28
28
  });
29
29
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
- require("react");
30
+ const external_antd_namespaceObject = require("antd");
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");
36
38
  const external_utils_js_namespaceObject = require("./utils.js");
37
39
  const DynamicPage = ()=>{
40
+ const { styles } = (0, external_DynamicPage_style_js_namespaceObject.useStyles)();
38
41
  const params = (0, external_react_router_dom_namespaceObject.useParams)();
39
- if (!params['*']) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_schema_component_index_js_namespaceObject.RemoteSchemaComponent, {
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, {
40
44
  uid: params.name,
41
45
  onlyRenderProperties: true
42
46
  });
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, {
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, {
47
51
  params: {
48
- filterByTk: path.filterByTk
52
+ filterByTk: pathParams.filterByTk
49
53
  },
50
54
  action: "get",
51
- collection: path.collection,
55
+ collection: pathParams.collection,
52
56
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_record_provider_index_js_namespaceObject.RecordContext_deprecated.Provider, {
53
57
  value: {
54
- id: path.filterByTk
58
+ id: pathParams.filterByTk
55
59
  },
56
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_schema_component_index_js_namespaceObject.RemoteSchemaComponent, {
57
- uid: params.name,
58
- onlyRenderProperties: true
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
+ ]
59
76
  })
60
77
  })
61
- });
62
- }
78
+ })
79
+ });
63
80
  };
64
81
  exports.DynamicPage = __webpack_exports__.DynamicPage;
65
82
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (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 = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
+ })();
14
+ (()=>{
15
+ __webpack_require__.r = (exports1)=>{
16
+ if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
+ value: 'Module'
18
+ });
19
+ Object.defineProperty(exports1, '__esModule', {
20
+ value: true
21
+ });
22
+ };
23
+ })();
24
+ var __webpack_exports__ = {};
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ useStyles: ()=>useStyles
28
+ });
29
+ const external_antd_style_namespaceObject = require("antd-style");
30
+ function _tagged_template_literal(strings, raw) {
31
+ if (!raw) raw = strings.slice(0);
32
+ return Object.freeze(Object.defineProperties(strings, {
33
+ raw: {
34
+ value: Object.freeze(raw)
35
+ }
36
+ }));
37
+ }
38
+ function _templateObject() {
39
+ const data = _tagged_template_literal([
40
+ "\n display: flex;\n flex-direction: column;\n /* height: 100vh; */\n .page-content {\n /* height: 90%; */\n margin: ",
41
+ "px;\n overflow: hidden;\n\n .ant-card-body {\n position: relative;\n height: 90vh;\n overflow: hidden;\n .ant-formily-layout {\n height: 100%;\n .ant-tb-grid {\n height: 70vh;\n overflow-x: hidden;\n overflow-y: scroll;\n margin-bottom: 200px;\n }\n }\n }\n }\n "
42
+ ]);
43
+ _templateObject = function() {
44
+ return data;
45
+ };
46
+ return data;
47
+ }
48
+ const useStyles = (0, external_antd_style_namespaceObject.createStyles)((param)=>{
49
+ let { css, token } = param;
50
+ return {
51
+ 'dynamic-page': css(_templateObject(), token.paddingContentHorizontal)
52
+ };
53
+ });
54
+ exports.useStyles = __webpack_exports__.useStyles;
55
+ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
56
+ "useStyles"
57
+ ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
58
+ Object.defineProperty(exports, '__esModule', {
59
+ value: true
60
+ });
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (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 = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
+ })();
14
+ (()=>{
15
+ __webpack_require__.r = (exports1)=>{
16
+ if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
+ value: 'Module'
18
+ });
19
+ Object.defineProperty(exports1, '__esModule', {
20
+ value: true
21
+ });
22
+ };
23
+ })();
24
+ var __webpack_exports__ = {};
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ PageNavBar: ()=>PageNavBar
28
+ });
29
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
+ const external_react_namespaceObject = require("react");
31
+ const icons_namespaceObject = require("@ant-design/icons");
32
+ const external_antd_namespaceObject = require("antd");
33
+ const external_react_router_dom_namespaceObject = require("react-router-dom");
34
+ const index_js_namespaceObject = require("../../api-client/index.js");
35
+ const external_schema_component_index_js_namespaceObject = require("../../schema-component/index.js");
36
+ const external_document_title_index_js_namespaceObject = require("../document-title/index.js");
37
+ const external_PageNavBar_style_js_namespaceObject = require("./PageNavBar.style.js");
38
+ const { Title } = external_antd_namespaceObject.Typography;
39
+ const PageNavBar = (param)=>{
40
+ let { uid } = param;
41
+ var _data_data;
42
+ const compile = (0, external_schema_component_index_js_namespaceObject.useCompile)();
43
+ const navigate = (0, external_react_router_dom_namespaceObject.useNavigate)();
44
+ const { data } = (0, index_js_namespaceObject.useRequest)({
45
+ url: "/uiSchemas:getJsonSchema/".concat(uid)
46
+ });
47
+ const currentTitle = null == data ? void 0 : null == (_data_data = data.data) ? void 0 : _data_data.title;
48
+ const { styles } = (0, external_PageNavBar_style_js_namespaceObject.useStyles)();
49
+ const { title: documentTitle } = (0, external_document_title_index_js_namespaceObject.useDocumentTitle)();
50
+ const title = (0, external_react_namespaceObject.useMemo)(()=>compile(currentTitle || documentTitle), [
51
+ currentTitle,
52
+ documentTitle
53
+ ]);
54
+ const handleBack = ()=>{
55
+ navigate(-1);
56
+ };
57
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
58
+ className: styles['page-nav-bar'],
59
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
60
+ className: "nav-title",
61
+ onClick: handleBack,
62
+ children: [
63
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.ArrowLeftOutlined, {}),
64
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Title, {
65
+ level: 4,
66
+ style: {
67
+ margin: 0
68
+ },
69
+ children: title
70
+ })
71
+ ]
72
+ })
73
+ });
74
+ };
75
+ exports.PageNavBar = __webpack_exports__.PageNavBar;
76
+ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
77
+ "PageNavBar"
78
+ ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
79
+ Object.defineProperty(exports, '__esModule', {
80
+ value: true
81
+ });