@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
@@ -0,0 +1,59 @@
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 position: sticky;\n top: 0;\n z-index: 1000;\n background: #fff;\n padding: 16px 24px;\n border-bottom: 1px solid #f0f0f0;\n\n .nav-title {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 12px;\n font-size: 16px;\n color: #000;\n cursor: pointer;\n }\n "
41
+ ]);
42
+ _templateObject = function() {
43
+ return data;
44
+ };
45
+ return data;
46
+ }
47
+ const useStyles = (0, external_antd_style_namespaceObject.createStyles)((param)=>{
48
+ let { css } = param;
49
+ return {
50
+ 'page-nav-bar': css(_templateObject())
51
+ };
52
+ });
53
+ exports.useStyles = __webpack_exports__.useStyles;
54
+ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
55
+ "useStyles"
56
+ ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
57
+ Object.defineProperty(exports, '__esModule', {
58
+ value: true
59
+ });
@@ -54,6 +54,9 @@ 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;
57
60
  case 'collection':
58
61
  result.collection = value;
59
62
  break;
@@ -105,7 +105,7 @@ var __webpack_exports__ = {};
105
105
  (0, schema_namespaceObject.setValidateLanguage)(null == data ? void 0 : null == (_data_data2 = data.data) ? void 0 : _data_data2.lang);
106
106
  (0, external_loadConstrueLocale_js_namespaceObject.loadConstrueLocale)(null == data ? void 0 : data.data);
107
107
  const dayjsLang = index_js_namespaceObject.dayjsLocale[null == data ? void 0 : null == (_data_data3 = data.data) ? void 0 : _data_data3.lang] || 'en';
108
- await import("dayjs/locale/".concat(dayjsLang));
108
+ await import("dayjs/locale/".concat(dayjsLang, ".js"));
109
109
  external_dayjs_default().locale(dayjsLang);
110
110
  const updateLocale = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "dayjs/plugin/updateLocale"));
111
111
  external_dayjs_default().extend(updateLocale.default);
@@ -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
- require("react");
30
+ const external_PageStyle_provider_js_namespaceObject = require("./PageStyle.provider.js");
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 'tab' === pageStyle ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_TabHeader_js_namespaceObject.TabHeader, {}) : null;
35
+ return pageStyle === external_PageStyle_provider_js_namespaceObject.PageStyle.TAB_STYLE ? /*#__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,6 +24,7 @@ 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,
27
28
  PageStyleContext: ()=>PageStyleContext,
28
29
  PageStyleProvider: ()=>PageStyleProvider
29
30
  });
@@ -31,8 +32,13 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
31
32
  const external_react_namespaceObject = require("react");
32
33
  const index_js_namespaceObject = require("../../user/index.js");
33
34
  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
+ }({});
34
40
  const PageStyleContext = /*#__PURE__*/ (0, external_react_namespaceObject.createContext)({
35
- style: 'classical'
41
+ pageStyle: "classical"
36
42
  });
37
43
  const PageStyleProvider = (param)=>{
38
44
  let { children } = param;
@@ -51,16 +57,18 @@ const PageStyleProvider = (param)=>{
51
57
  ]);
52
58
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PageStyleContext.Provider, {
53
59
  value: {
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',
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",
55
61
  items,
56
62
  setItems
57
63
  },
58
64
  children: children
59
65
  });
60
66
  };
67
+ exports.PageStyle = __webpack_exports__.PageStyle;
61
68
  exports.PageStyleContext = __webpack_exports__.PageStyleContext;
62
69
  exports.PageStyleProvider = __webpack_exports__.PageStyleProvider;
63
70
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
71
+ "PageStyle",
64
72
  "PageStyleContext",
65
73
  "PageStyleProvider"
66
74
  ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
@@ -32,6 +32,7 @@ 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");
35
36
  const index_js_namespaceObject = require("../document-title/index.js");
36
37
  const external_PageStyle_provider_js_namespaceObject = require("./PageStyle.provider.js");
37
38
  const external_usePageStyle_js_namespaceObject = require("./usePageStyle.js");
@@ -60,20 +61,21 @@ const TabContentInternal = (param)=>{
60
61
  }, item.key));
61
62
  };
62
63
  const TabContent = ()=>{
64
+ const { t } = (0, external_index_js_namespaceObject.useTranslation)();
63
65
  const { title, setTitle } = (0, index_js_namespaceObject.useDocumentTitle)();
64
66
  const location = (0, external_react_router_dom_namespaceObject.useLocation)();
65
67
  const { items, setItems } = (0, external_react_namespaceObject.useContext)(external_PageStyle_provider_js_namespaceObject.PageStyleContext);
66
68
  const targetKey = location.pathname;
67
69
  const outlet = (0, external_react_router_dom_namespaceObject.useOutlet)();
68
70
  (0, external_react_namespaceObject.useEffect)(()=>{
69
- if (targetKey && title) {
71
+ if (targetKey) {
70
72
  const targetItem = items.find((value)=>value.key === targetKey);
71
- if (targetItem) setTitle(targetItem.label);
73
+ if (targetItem) setTitle(null == targetItem ? void 0 : targetItem.label);
72
74
  else setItems([
73
75
  ...items,
74
76
  {
75
77
  key: targetKey,
76
- label: title,
78
+ label: title || t('Unnamed'),
77
79
  children: outlet
78
80
  }
79
81
  ]);
@@ -90,7 +92,7 @@ const TabContent = ()=>{
90
92
  const CustomAdminContent = ()=>{
91
93
  const params = (0, external_react_router_dom_namespaceObject.useParams)();
92
94
  const pageStyle = (0, external_usePageStyle_js_namespaceObject.usePageStyle)();
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, {});
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, {});
94
96
  };
95
97
  exports.CustomAdminContent = __webpack_exports__.CustomAdminContent;
96
98
  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).style;
31
+ const usePageStyle = ()=>(0, external_react_namespaceObject.useContext)(external_PageStyle_provider_js_namespaceObject.PageStyleContext).pageStyle;
32
32
  exports.usePageStyle = __webpack_exports__.usePageStyle;
33
33
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
34
34
  "usePageStyle"
@@ -35,9 +35,10 @@ 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");
38
39
  const useTabSettings = ()=>({
39
- key: 'tab',
40
- eventKey: 'tab',
40
+ key: external_PageStyle_provider_js_namespaceObject.PageStyle.TAB_STYLE,
41
+ eventKey: external_PageStyle_provider_js_namespaceObject.PageStyle.TAB_STYLE,
41
42
  label: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Label, {})
42
43
  });
43
44
  function Label() {
@@ -47,15 +48,15 @@ function Label() {
47
48
  const currentUser = (0, external_user_index_js_namespaceObject.useCurrentUserContext)();
48
49
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_common_index_js_namespaceObject.SelectWithTitle, {
49
50
  title: t('Page style'),
50
- defaultValue: (null == (_currentUser_data_data_systemSettings = currentUser.data.data.systemSettings) ? void 0 : _currentUser_data_data_systemSettings.pageStyle) || 'classical',
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,
51
52
  options: [
52
53
  {
53
54
  label: t('classical'),
54
- value: 'classical'
55
+ value: external_PageStyle_provider_js_namespaceObject.PageStyle.CLASSICAL
55
56
  },
56
57
  {
57
58
  label: t('tabs'),
58
- value: 'tab'
59
+ value: external_PageStyle_provider_js_namespaceObject.PageStyle.TAB_STYLE
59
60
  }
60
61
  ],
61
62
  onChange: updateUserPageStyle
@@ -71,7 +72,7 @@ function useUpdatePageStyleSettings() {
71
72
  await api.resource('users').updateProfile({
72
73
  values: {
73
74
  systemSettings: {
74
- ...currentUser.data.data.systemSettings || {},
75
+ ...currentUser.data.data.systemSettings,
75
76
  pageStyle
76
77
  }
77
78
  }
@@ -80,7 +81,7 @@ function useUpdatePageStyleSettings() {
80
81
  data: {
81
82
  ...currentUser.data.data,
82
83
  systemSettings: {
83
- ...currentUser.data.data.systemSettings || {},
84
+ ...currentUser.data.data.systemSettings,
84
85
  pageStyle
85
86
  }
86
87
  }
@@ -103,7 +103,7 @@ function QuickAccessPopupActionSchemaInitializerItem(props) {
103
103
  icon: values.icon,
104
104
  iconColor: values.iconColor,
105
105
  refreshDataBlockRequest: false,
106
- openMode: 'drawer'
106
+ openMode: external_schema_component_index_js_namespaceObject.OpenMode.DRAWER_MODE
107
107
  },
108
108
  properties: {
109
109
  drawer: {
@@ -823,6 +823,7 @@ module.exports = {
823
823
  "UI editor": "UI editor",
824
824
  Unconnected: "Unconnected",
825
825
  Unique: "Unique",
826
+ Unnamed: "Unnamed",
826
827
  "Unsaved changes": "Unsaved changes",
827
828
  Untitled: "Untitled",
828
829
  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
- require("react");
30
+ const index_js_namespaceObject = require("../../../schema-component/index.js");
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: 'drawer',
42
+ openMode: index_js_namespaceObject.OpenMode.DRAWER_MODE,
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");
31
30
  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: 'drawer',
44
+ openMode: external_schema_component_index_js_namespaceObject.OpenMode.DRAWER_MODE,
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");
31
30
  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: 'drawer',
42
+ openMode: external_schema_component_index_js_namespaceObject.OpenMode.DRAWER_MODE,
43
43
  icon: 'PlusOutlined'
44
44
  },
45
45
  properties: {
@@ -29,6 +29,7 @@ __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");
32
33
  const ActionInitializer_js_namespaceObject = require("../../../schema-initializer/items/ActionInitializer.js");
33
34
  const AssociateActionInitializer = ()=>{
34
35
  const schema = {
@@ -41,7 +42,7 @@ const AssociateActionInitializer = ()=>{
41
42
  'x-component': 'Action',
42
43
  'x-component-props': {
43
44
  actionType: 'associations',
44
- openMode: 'drawer',
45
+ openMode: external_schema_component_index_js_namespaceObject.OpenMode.DRAWER_MODE,
45
46
  type: 'primary',
46
47
  icon: 'PlusOutlined'
47
48
  },
@@ -42,7 +42,10 @@ 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
- }, []);
45
+ }, [
46
+ field.value,
47
+ props.defaultCheckedKeys
48
+ ]);
46
49
  const [checkedKeys, setCheckedKeys] = (0, external_react_namespaceObject.useState)(props.defaultCheckedKeys || []);
47
50
  const onCheck = (checkedKeys)=>{
48
51
  setCheckedKeys(checkedKeys);
@@ -180,7 +183,7 @@ const createSubmitActionSettings = new SchemaSettings_js_namespaceObject.SchemaS
180
183
  useVisible () {
181
184
  const { fieldSchema } = (0, external_schema_component_index_js_namespaceObject.useActionContext)();
182
185
  const openMode = (0, Action_Designer_js_namespaceObject.findSchema)(fieldSchema);
183
- return !openMode || 'page' === openMode;
186
+ return !openMode || openMode === external_schema_component_index_js_namespaceObject.OpenMode.PAGE;
184
187
  },
185
188
  useComponentProps () {
186
189
  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");
31
30
  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: 'drawer'
42
+ openMode: external_schema_component_index_js_namespaceObject.OpenMode.DRAWER_MODE
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
- require("react");
30
+ const index_js_namespaceObject = require("../../../schema-component/index.js");
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: 'drawer',
41
+ openMode: index_js_namespaceObject.OpenMode.DRAWER_MODE,
42
42
  icon: 'EditOutlined'
43
43
  },
44
44
  properties: {
@@ -27,7 +27,7 @@ __webpack_require__.d(__webpack_exports__, {
27
27
  ViewActionInitializer: ()=>ViewActionInitializer
28
28
  });
29
29
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
- require("react");
30
+ const index_js_namespaceObject = require("../../../schema-component/index.js");
31
31
  const ActionInitializer_js_namespaceObject = require("../../../schema-initializer/items/ActionInitializer.js");
32
32
  const ViewActionInitializer = (props)=>{
33
33
  const schema = {
@@ -38,7 +38,7 @@ const ViewActionInitializer = (props)=>{
38
38
  'x-settings': 'actionSettings:view',
39
39
  'x-component': 'Action',
40
40
  'x-component-props': {
41
- openMode: 'drawer'
41
+ openMode: index_js_namespaceObject.OpenMode.DRAWER_MODE
42
42
  },
43
43
  properties: {
44
44
  drawer: {
@@ -154,7 +154,7 @@ const drawerSubTableComponentFieldSettings = new SchemaSettings_js_namespaceObje
154
154
  value: 'large'
155
155
  }
156
156
  ],
157
- value: null != (_fieldSchema_xcomponentprops_openSize = null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops['openSize']) ? _fieldSchema_xcomponentprops_openSize : (null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops1 = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops1['openMode']) == 'modal' ? 'large' : 'middle',
157
+ value: null != (_fieldSchema_xcomponentprops_openSize = null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops['openSize']) ? _fieldSchema_xcomponentprops_openSize : (null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops1 = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops1['openMode']) === external_schema_component_index_js_namespaceObject.OpenMode.MODAL ? 'large' : 'middle',
158
158
  onChange: (value)=>{
159
159
  field.componentProps.openSize = value;
160
160
  fieldSchema['x-component-props'] = {
@@ -194,7 +194,7 @@ const recordPickerComponentFieldSettings = new SchemaSettings_js_namespaceObject
194
194
  value: 'large'
195
195
  }
196
196
  ],
197
- value: null != (_fieldSchema_xcomponentprops_openSize = null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops['openSize']) ? _fieldSchema_xcomponentprops_openSize : (null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops1 = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops1['openMode']) == 'modal' ? 'large' : 'middle',
197
+ value: null != (_fieldSchema_xcomponentprops_openSize = null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops['openSize']) ? _fieldSchema_xcomponentprops_openSize : (null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops1 = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops1['openMode']) === external_schema_component_index_js_namespaceObject.OpenMode.MODAL ? 'large' : 'middle',
198
198
  onChange: (value)=>{
199
199
  field.componentProps.openSize = value;
200
200
  fieldSchema['x-component-props'] = {
@@ -238,7 +238,7 @@ const quickCreate = {
238
238
  'x-component': 'Action',
239
239
  'x-decorator': 'ACLActionProvider',
240
240
  'x-component-props': {
241
- openMode: 'drawer',
241
+ openMode: external_schema_component_index_js_namespaceObject.OpenMode.DRAWER_MODE,
242
242
  type: 'default',
243
243
  component: 'CreateRecordAction'
244
244
  }
@@ -28,27 +28,48 @@ __webpack_require__.d(__webpack_exports__, {
28
28
  ActionContainer: ()=>ActionContainer
29
29
  });
30
30
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
31
- require("react");
32
31
  const schema_namespaceObject = require("@tachybase/schema");
33
32
  const external_index_js_namespaceObject = require("./index.js");
33
+ const index_js_namespaceObject = require("../../../block-provider/index.js");
34
+ const PageStyle_provider_js_namespaceObject = require("../../../built-in/page-style/PageStyle.provider.js");
35
+ const usePageStyle_js_namespaceObject = require("../../../built-in/page-style/usePageStyle.js");
34
36
  const external_Action_Drawer_js_namespaceObject = require("./Action.Drawer.js");
35
37
  const external_Action_Modal_js_namespaceObject = require("./Action.Modal.js");
36
38
  const external_Action_Page_js_namespaceObject = require("./Action.Page.js");
37
39
  const external_Action_Sheet_js_namespaceObject = require("./Action.Sheet.js");
38
40
  const ActionContainer = (0, schema_namespaceObject.observer)((props)=>{
39
41
  const { openMode } = (0, external_index_js_namespaceObject.useActionContext)();
40
- if ('drawer' === openMode) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_Action_Drawer_js_namespaceObject.ActionDrawer, {
42
+ const isMobile = (0, index_js_namespaceObject.useIsMobile)();
43
+ const pageStyle = (0, usePageStyle_js_namespaceObject.usePageStyle)();
44
+ if (openMode === external_index_js_namespaceObject.OpenMode.DRAWER_MODE) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_Action_Drawer_js_namespaceObject.ActionDrawer, {
41
45
  footerNodeName: 'Action.Container.Footer',
42
46
  ...props
43
47
  });
44
- if ('modal' === openMode) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_Action_Modal_js_namespaceObject.ActionModal, {
48
+ if (openMode === external_index_js_namespaceObject.OpenMode.MODAL) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_Action_Modal_js_namespaceObject.ActionModal, {
45
49
  footerNodeName: 'Action.Container.Footer',
46
50
  ...props
47
51
  });
48
- if ('sheet' === openMode) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_Action_Sheet_js_namespaceObject.ActionSheet, {
52
+ if (openMode === external_index_js_namespaceObject.OpenMode.SHEET) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_Action_Sheet_js_namespaceObject.ActionSheet, {
49
53
  footerNodeName: 'Action.Container.Footer',
50
54
  ...props
51
55
  });
56
+ if (openMode === external_index_js_namespaceObject.OpenMode.PAGE) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_Action_Page_js_namespaceObject.ActionPage, {
57
+ footerNodeName: 'Action.Container.Footer',
58
+ ...props
59
+ });
60
+ if (!openMode || [
61
+ external_index_js_namespaceObject.OpenMode.DEFAULT,
62
+ external_index_js_namespaceObject.OpenMode.DRAWER
63
+ ].includes(openMode)) {
64
+ if (isMobile || pageStyle === PageStyle_provider_js_namespaceObject.PageStyle.TAB_STYLE) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_Action_Page_js_namespaceObject.ActionPage, {
65
+ footerNodeName: 'Action.Container.Footer',
66
+ ...props
67
+ });
68
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_Action_Drawer_js_namespaceObject.ActionDrawer, {
69
+ footerNodeName: 'Action.Container.Footer',
70
+ ...props
71
+ });
72
+ }
52
73
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_Action_Page_js_namespaceObject.ActionPage, {
53
74
  footerNodeName: 'Action.Container.Footer',
54
75
  ...props
@@ -251,7 +251,7 @@ function AfterSuccess() {
251
251
  const schema = {
252
252
  ...(0, external_utils_js_namespaceObject.afterSuccessSchema)(t)
253
253
  };
254
- if ((!openMode || 'page' === openMode) && component.includes('Form') || !component.includes('Form')) delete schema.properties.popupClose;
254
+ if ((!openMode || openMode === external_index_js_namespaceObject.OpenMode.PAGE) && component.includes('Form') || !component.includes('Form')) delete schema.properties.popupClose;
255
255
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(SchemaSettings_js_namespaceObject.SchemaSettingsModalItem, {
256
256
  title: t('After successful submission'),
257
257
  initialValues: null == fieldSchema ? void 0 : null == (_fieldSchema_xactionsettings = fieldSchema['x-action-settings']) ? void 0 : _fieldSchema_xactionsettings['onSuccess'],
@@ -639,7 +639,18 @@ const SetFilterScope = (props)=>{
639
639
  }
640
640
  }
641
641
  }
642
- }), []);
642
+ }), [
643
+ fieldSchema,
644
+ gridSchema,
645
+ t,
646
+ type,
647
+ collectionName,
648
+ form,
649
+ variables,
650
+ localVariables,
651
+ record,
652
+ formBlockType
653
+ ]);
643
654
  const { getTemplateById } = (0, external_schema_templates_index_js_namespaceObject.useSchemaTemplateManager)();
644
655
  const { dn } = (0, external_index_js_namespaceObject.useDesignable)();
645
656
  const onSubmit = (0, external_react_namespaceObject.useCallback)((v)=>{
@@ -65,8 +65,8 @@ const ActionPage = (0, schema_namespaceObject.observer)((props)=>{
65
65
  const { containerRefKey, visible, setVisible } = (0, external_index_js_namespaceObject.useActionContext)();
66
66
  const containerRef = useScope(containerRefKey);
67
67
  const { styles } = useStyles();
68
- const schema = (0, schema_namespaceObject.useFieldSchema)();
69
68
  const field = (0, schema_namespaceObject.useField)();
69
+ const schema = (0, schema_namespaceObject.useFieldSchema)();
70
70
  const footerSchema = schema.reduceProperties((buf, s)=>{
71
71
  if (s['x-component'] === footerNodeName) return s;
72
72
  return buf;