@tachybase/client 1.3.18 → 1.3.20

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 (148) 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/collection-manager/Configuration/components/Summary.mjs +3 -3
  18. package/es/flag-provider/FlagProvider.d.ts +1 -0
  19. package/es/flag-provider/hooks/useFlag.mjs +1 -1
  20. package/es/modules/actions/add-child/CreateChildInitializer.mjs +2 -2
  21. package/es/modules/actions/add-new/CreateActionInitializer.mjs +2 -2
  22. package/es/modules/actions/add-record/CustomizeAddRecordActionInitializer.mjs +2 -2
  23. package/es/modules/actions/associate/AssociateActionInitializer.mjs +1 -2
  24. package/es/modules/actions/submit/createSubmitActionSettings.mjs +3 -6
  25. package/es/modules/actions/view-edit-popup/PopupActionInitializer.mjs +2 -2
  26. package/es/modules/actions/view-edit-popup/UpdateActionInitializer.mjs +2 -2
  27. package/es/modules/actions/view-edit-popup/ViewActionInitializer.mjs +2 -2
  28. package/es/modules/fields/component/DrawerSubTable/drawerSubTableComponentFieldSettings.mjs +2 -2
  29. package/es/modules/fields/component/Picker/recordPickerComponentFieldSettings.mjs +2 -2
  30. package/es/modules/fields/component/Select/selectComponentFieldSettings.mjs +2 -2
  31. package/es/schema-component/antd/action/Action.Container.mjs +5 -26
  32. package/es/schema-component/antd/action/Action.Designer.mjs +3 -14
  33. package/es/schema-component/antd/action/Action.Page.mjs +1 -1
  34. package/es/schema-component/antd/action/Action.mjs +11 -56
  35. package/es/schema-component/antd/action/context.d.ts +1 -9
  36. package/es/schema-component/antd/action/context.mjs +1 -10
  37. package/es/schema-component/antd/action/hooks.d.ts +1 -2
  38. package/es/schema-component/antd/action/hooks.mjs +2 -2
  39. package/es/schema-component/antd/association-field/FileManager.mjs +2 -2
  40. package/es/schema-component/antd/association-field/InternalDrawerSubTable.mjs +2 -2
  41. package/es/schema-component/antd/association-field/InternalPicker.mjs +2 -2
  42. package/es/schema-component/antd/association-field/InternalTag.mjs +2 -2
  43. package/es/schema-component/antd/association-field/InternalViewer.mjs +2 -2
  44. package/es/schema-component/antd/association-field/SubTable.mjs +2 -2
  45. package/es/schema-component/antd/color-select/ColorSelect.mjs +3 -3
  46. package/es/schema-component/antd/date-picker/util.d.ts +13 -0
  47. package/es/schema-component/antd/date-picker/util.mjs +14 -1
  48. package/es/schema-component/antd/form-item/FormItem.Settings.mjs +2 -3
  49. package/es/schema-component/antd/markdown/Markdown.mjs +4 -4
  50. package/es/schema-component/antd/page/Page.mjs +22 -27
  51. package/es/schema-component/antd/password/utils.d.ts +1 -1
  52. package/es/schema-component/antd/record-picker/InputRecordPicker.mjs +2 -2
  53. package/es/schema-component/antd/record-picker/ReadPrettyRecordPicker.mjs +2 -2
  54. package/es/schema-initializer/items/SelectActionInitializer.mjs +2 -2
  55. package/es/schema-items/OpenModeSchemaItems.mjs +16 -37
  56. package/es/schema-settings/SchemaSettingsDefaultValue.mjs +3 -2
  57. package/es/schema-settings/VariableInput/hooks/index.d.ts +1 -0
  58. package/es/schema-settings/VariableInput/hooks/index.mjs +1 -0
  59. package/es/schema-settings/VariableInput/hooks/useExactDateVariable.d.ts +93 -0
  60. package/es/schema-settings/VariableInput/hooks/useExactDateVariable.mjs +75 -0
  61. package/es/schema-settings/VariableInput/hooks/useVariableOptions.mjs +11 -1
  62. package/es/schema-templates/schemas/uiSchemaTemplates.mjs +1 -1
  63. package/es/user/ChangePassword.mjs +109 -6
  64. package/es/user/index.d.ts +1 -0
  65. package/es/user/index.mjs +2 -0
  66. package/es/variables/hooks/useBuiltinVariables.mjs +8 -2
  67. package/lib/application/CustomRouterContextProvider.js +1 -2
  68. package/lib/application/components/AppComponent.js +1 -3
  69. package/lib/block-provider/hooks/index.js +7 -7
  70. package/lib/built-in/acl/Configuration/MenuItemsProvider.js +2 -2
  71. package/lib/built-in/acl/Configuration/schemas/scopes.js +3 -4
  72. package/lib/built-in/attachment-preview/previewers/file-sheet.js +2 -2
  73. package/lib/built-in/dynamic-page/DynamicPage.js +14 -31
  74. package/lib/built-in/dynamic-page/utils.js +0 -3
  75. package/lib/built-in/page-style/CustomAdminHeader.js +2 -2
  76. package/lib/built-in/page-style/PageStyle.provider.js +2 -10
  77. package/lib/built-in/page-style/TabContent.js +4 -6
  78. package/lib/built-in/page-style/usePageStyle.js +1 -1
  79. package/lib/built-in/page-style/useTabSettings.js +7 -8
  80. package/lib/built-in/pm/index.js +1 -1
  81. package/lib/built-in/quick-access/PopupActionSchemaInitializerItem.js +1 -1
  82. package/lib/collection-manager/Configuration/components/Summary.js +3 -3
  83. package/lib/collection-manager/index.js +17 -17
  84. package/lib/flag-provider/hooks/useFlag.js +1 -1
  85. package/lib/icon/Icon.js +2 -2
  86. package/lib/locale/en_US.js +0 -1
  87. package/lib/locale/zh-CN.js +5 -0
  88. package/lib/modules/actions/add-child/CreateChildInitializer.js +2 -2
  89. package/lib/modules/actions/add-new/CreateActionInitializer.js +2 -2
  90. package/lib/modules/actions/add-record/CustomizeAddRecordActionInitializer.js +2 -2
  91. package/lib/modules/actions/associate/AssociateActionInitializer.js +1 -2
  92. package/lib/modules/actions/submit/createSubmitActionSettings.js +2 -5
  93. package/lib/modules/actions/view-edit-popup/PopupActionInitializer.js +2 -2
  94. package/lib/modules/actions/view-edit-popup/UpdateActionInitializer.js +2 -2
  95. package/lib/modules/actions/view-edit-popup/ViewActionInitializer.js +2 -2
  96. package/lib/modules/fields/component/DrawerSubTable/drawerSubTableComponentFieldSettings.js +1 -1
  97. package/lib/modules/fields/component/Picker/recordPickerComponentFieldSettings.js +1 -1
  98. package/lib/modules/fields/component/Select/selectComponentFieldSettings.js +1 -1
  99. package/lib/schema-component/antd/action/Action.Container.js +6 -27
  100. package/lib/schema-component/antd/action/Action.Designer.js +2 -13
  101. package/lib/schema-component/antd/action/Action.Modal.js +2 -2
  102. package/lib/schema-component/antd/action/Action.Page.js +1 -1
  103. package/lib/schema-component/antd/action/Action.Sheet.js +2 -2
  104. package/lib/schema-component/antd/action/Action.js +10 -55
  105. package/lib/schema-component/antd/action/context.js +1 -13
  106. package/lib/schema-component/antd/action/hooks.js +1 -1
  107. package/lib/schema-component/antd/association-field/FileManager.js +1 -1
  108. package/lib/schema-component/antd/association-field/InternalDrawerSubTable.js +1 -1
  109. package/lib/schema-component/antd/association-field/InternalPicker.js +1 -1
  110. package/lib/schema-component/antd/association-field/InternalTag.js +1 -1
  111. package/lib/schema-component/antd/association-field/InternalViewer.js +1 -1
  112. package/lib/schema-component/antd/association-field/SubTable.js +1 -1
  113. package/lib/schema-component/antd/color-select/ColorSelect.js +4 -4
  114. package/lib/schema-component/antd/date-picker/util.js +16 -0
  115. package/lib/schema-component/antd/form-item/FormItem.Settings.js +2 -3
  116. package/lib/schema-component/antd/form-tab/index.js +2 -2
  117. package/lib/schema-component/antd/form-v2/index.js +2 -2
  118. package/lib/schema-component/antd/markdown/Markdown.js +5 -5
  119. package/lib/schema-component/antd/page/Page.js +21 -26
  120. package/lib/schema-component/antd/record-picker/InputRecordPicker.js +1 -1
  121. package/lib/schema-component/antd/record-picker/ReadPrettyRecordPicker.js +1 -1
  122. package/lib/schema-component/antd/scroll-area/ScrollArea.js +2 -2
  123. package/lib/schema-component/antd/table-v2/index.js +3 -3
  124. package/lib/schema-component/antd/upload/shared.js +4 -4
  125. package/lib/schema-initializer/items/SelectActionInitializer.js +2 -2
  126. package/lib/schema-items/OpenModeSchemaItems.js +15 -36
  127. package/lib/schema-settings/SchemaSettingsDefaultValue.js +3 -2
  128. package/lib/schema-settings/VariableInput/hooks/index.js +9 -0
  129. package/lib/schema-settings/VariableInput/hooks/useExactDateVariable.js +112 -0
  130. package/lib/schema-settings/VariableInput/hooks/useVariableOptions.js +11 -1
  131. package/lib/schema-templates/schemas/uiSchemaTemplates.js +1 -1
  132. package/lib/user/ChangePassword.js +118 -5
  133. package/lib/user/index.js +24 -4
  134. package/lib/variables/VariablesProvider.js +2 -2
  135. package/lib/variables/hooks/useBuiltinVariables.js +7 -1
  136. package/package.json +10 -10
  137. package/es/built-in/dynamic-page/DynamicPage.context.d.ts +0 -0
  138. package/es/built-in/dynamic-page/DynamicPage.context.mjs +0 -0
  139. package/es/built-in/dynamic-page/DynamicPage.style.d.ts +0 -3
  140. package/es/built-in/dynamic-page/DynamicPage.style.mjs +0 -26
  141. package/es/built-in/dynamic-page/PageNavBar.d.ts +0 -3
  142. package/es/built-in/dynamic-page/PageNavBar.mjs +0 -47
  143. package/es/built-in/dynamic-page/PageNavBar.style.d.ts +0 -3
  144. package/es/built-in/dynamic-page/PageNavBar.style.mjs +0 -25
  145. package/lib/built-in/dynamic-page/DynamicPage.context.js +0 -5
  146. package/lib/built-in/dynamic-page/DynamicPage.style.js +0 -60
  147. package/lib/built-in/dynamic-page/PageNavBar.js +0 -81
  148. package/lib/built-in/dynamic-page/PageNavBar.style.js +0 -59
@@ -50,11 +50,8 @@ const external_react_router_dom_namespaceObject = require("react-router-dom");
50
50
  const external_index_js_namespaceObject = require("../../index.js");
51
51
  const index_js_namespaceObject = require("../../../application/index.js");
52
52
  const withDynamicSchemaProps_js_namespaceObject = require("../../../application/hoc/withDynamicSchemaProps.js");
53
- const external_block_provider_index_js_namespaceObject = require("../../../block-provider/index.js");
54
53
  const acl_index_js_namespaceObject = require("../../../built-in/acl/index.js");
55
54
  const utils_js_namespaceObject = require("../../../built-in/dynamic-page/utils.js");
56
- const PageStyle_provider_js_namespaceObject = require("../../../built-in/page-style/PageStyle.provider.js");
57
- const usePageStyle_js_namespaceObject = require("../../../built-in/page-style/usePageStyle.js");
58
55
  const external_data_source_index_js_namespaceObject = require("../../../data-source/index.js");
59
56
  const external_icon_index_js_namespaceObject = require("../../../icon/index.js");
60
57
  const external_record_provider_index_js_namespaceObject = require("../../../record-provider/index.js");
@@ -99,9 +96,7 @@ const Action = (0, withDynamicSchemaProps_js_namespaceObject.withDynamicSchemaPr
99
96
  const openMode = null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops['openMode'];
100
97
  const openSize = null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops1 = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops1['openSize'];
101
98
  const disabled = form.disabled || field.disabled || (null == (_field_data = field.data) ? void 0 : _field_data.disabled) || propsDisabled;
102
- const linkageRules = (0, external_react_namespaceObject.useMemo)(()=>(null == fieldSchema ? void 0 : fieldSchema['x-linkage-rules']) || [], [
103
- fieldSchema
104
- ]);
99
+ const linkageRules = (null == fieldSchema ? void 0 : fieldSchema['x-linkage-rules']) || [];
105
100
  const { designable } = (0, external_index_js_namespaceObject.useDesignable)();
106
101
  const tarComponent = (0, external_hooks_index_js_namespaceObject.useComponent)(component) || component;
107
102
  const { modal } = external_antd_namespaceObject.App.useApp();
@@ -114,23 +109,6 @@ const Action = (0, withDynamicSchemaProps_js_namespaceObject.withDynamicSchemaPr
114
109
  const { getAriaLabel } = (0, useGetAriaLabelOfAction_js_namespaceObject.useGetAriaLabelOfAction)(title);
115
110
  let actionTitle = title || compile(fieldSchema.title);
116
111
  actionTitle = external_lodash_default().isString(actionTitle) ? t(actionTitle) : actionTitle;
117
- const collectionKey = null == collection ? void 0 : collection.getPrimaryKey();
118
- const pageStyle = (0, usePageStyle_js_namespaceObject.usePageStyle)();
119
- const isMobile = (0, external_block_provider_index_js_namespaceObject.useIsMobile)();
120
- const isPageMode = (0, external_react_namespaceObject.useMemo)(()=>{
121
- if (null == pageMode ? void 0 : pageMode.enable) return true;
122
- if (openMode === external_context_js_namespaceObject.OpenMode.PAGE) return true;
123
- if (!openMode || [
124
- external_context_js_namespaceObject.OpenMode.DEFAULT,
125
- external_context_js_namespaceObject.OpenMode.DRAWER
126
- ].includes(openMode)) return isMobile || pageStyle === PageStyle_provider_js_namespaceObject.PageStyle.TAB_STYLE;
127
- return false;
128
- }, [
129
- null == pageMode ? void 0 : pageMode.enable,
130
- openMode,
131
- isMobile,
132
- pageStyle
133
- ]);
134
112
  (0, external_react_namespaceObject.useEffect)(()=>{
135
113
  field.stateOfLinkageRules = {};
136
114
  linkageRules.filter((k)=>!k.disabled).forEach((v)=>{
@@ -152,30 +130,6 @@ const Action = (0, withDynamicSchemaProps_js_namespaceObject.withDynamicSchemaPr
152
130
  record,
153
131
  variables
154
132
  ]);
155
- const openModal = (0, external_react_namespaceObject.useCallback)(()=>{
156
- setVisible(true);
157
- }, []);
158
- const openPage = (0, external_react_namespaceObject.useCallback)(()=>{
159
- const containerSchema = fieldSchema.reduceProperties((buf, s)=>'Action.Container' === s['x-component'] ? s : buf);
160
- const target = utils_js_namespaceObject.PathHandler.getInstance().toWildcardPath({
161
- collection: collection.name,
162
- filterByTk: record[collectionKey]
163
- });
164
- const findMPageSchema = (schema)=>{
165
- if (!schema) return;
166
- if ('MPage' === schema['x-component']) return schema['x-uid'];
167
- return findMPageSchema(null == schema ? void 0 : schema.parent);
168
- };
169
- const MPageUID = findMPageSchema(fieldSchema);
170
- const finalPath = isMobile ? "./".concat(MPageUID, "/sub/").concat(containerSchema['x-uid'], "/").concat(target) : "./sub/".concat(containerSchema['x-uid'], "/").concat(target);
171
- navigate(finalPath);
172
- }, [
173
- fieldSchema,
174
- record,
175
- collectionKey,
176
- null == collection ? void 0 : collection.name,
177
- navigate
178
- ]);
179
133
  const handleButtonClick = (0, external_react_namespaceObject.useCallback)((e)=>{
180
134
  if ((0, client_namespaceObject.isPortalInBody)(e.target)) return;
181
135
  e.preventDefault();
@@ -183,8 +137,14 @@ const Action = (0, withDynamicSchemaProps_js_namespaceObject.withDynamicSchemaPr
183
137
  if (!disabled && aclCtx) {
184
138
  const onOk = ()=>{
185
139
  null == onClick || onClick(e);
186
- if (isPageMode) openPage();
187
- else openModal();
140
+ const containerSchema = fieldSchema.reduceProperties((buf, s)=>'Action.Container' === s['x-component'] ? s : buf);
141
+ if ((null == pageMode ? void 0 : pageMode.enable) && containerSchema) {
142
+ const target = utils_js_namespaceObject.PathHandler.getInstance().toWildcardPath({
143
+ collection: collection.name,
144
+ filterByTk: record[collection.getPrimaryKey()]
145
+ });
146
+ navigate('../' + containerSchema['x-uid'] + '/' + target);
147
+ } else setVisible(true);
188
148
  run();
189
149
  };
190
150
  if (null == confirm ? void 0 : confirm.content) modal.confirm({
@@ -203,12 +163,7 @@ const Action = (0, withDynamicSchemaProps_js_namespaceObject.withDynamicSchemaPr
203
163
  disabled,
204
164
  modal,
205
165
  onClick,
206
- run,
207
- isPageMode,
208
- openPage,
209
- openModal,
210
- actionTitle,
211
- t
166
+ run
212
167
  ]);
213
168
  const buttonStyle = (0, external_react_namespaceObject.useMemo)(()=>{
214
169
  var _field_data;
@@ -25,7 +25,6 @@ var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
27
  ActionContextProvider: ()=>ActionContextProvider,
28
- OpenMode: ()=>context_OpenMode,
29
28
  ActionContext: ()=>ActionContext
30
29
  });
31
30
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
@@ -44,22 +43,11 @@ const ActionContextProvider = (props)=>{
44
43
  children: props.children
45
44
  });
46
45
  };
47
- var context_OpenMode = /*#__PURE__*/ function(OpenMode) {
48
- OpenMode["DEFAULT"] = "default";
49
- OpenMode["DRAWER"] = "drawer";
50
- OpenMode["MODAL"] = "modal";
51
- OpenMode["PAGE"] = "page";
52
- OpenMode["SHEET"] = "sheet";
53
- OpenMode["DRAWER_MODE"] = "drawer-mode";
54
- return OpenMode;
55
- }({});
56
46
  exports.ActionContext = __webpack_exports__.ActionContext;
57
47
  exports.ActionContextProvider = __webpack_exports__.ActionContextProvider;
58
- exports.OpenMode = __webpack_exports__.OpenMode;
59
48
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
60
49
  "ActionContext",
61
- "ActionContextProvider",
62
- "OpenMode"
50
+ "ActionContextProvider"
63
51
  ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
64
52
  Object.defineProperty(exports, '__esModule', {
65
53
  value: true
@@ -46,7 +46,7 @@ const useActionContext = ()=>{
46
46
  ...ctx,
47
47
  setVisible (visible) {
48
48
  let confirm = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : false;
49
- if ((null == ctx ? void 0 : ctx.openMode) !== external_context_js_namespaceObject.OpenMode.PAGE) if (visible) {
49
+ if ((null == ctx ? void 0 : ctx.openMode) !== 'page') if (visible) {
50
50
  var _ctx_setVisible1;
51
51
  null == ctx || null == (_ctx_setVisible1 = ctx.setVisible) || _ctx_setVisible1.call(ctx, visible);
52
52
  } else if (confirm && ctx.formValueChanged) modal.confirm({
@@ -188,7 +188,7 @@ const InternalFileManager = (props)=>{
188
188
  }),
189
189
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_action_index_js_namespaceObject.ActionContextProvider, {
190
190
  value: {
191
- openMode: external_action_index_js_namespaceObject.OpenMode.DEFAULT,
191
+ openMode: 'drawer',
192
192
  visible: visibleSelector,
193
193
  setVisible: setVisibleSelector,
194
194
  modalProps: {
@@ -87,7 +87,7 @@ const InternaDrawerSubTable = (0, schema_namespaceObject.observer)((props)=>{
87
87
  ...ctx,
88
88
  visible,
89
89
  setVisible,
90
- openMode: context_js_namespaceObject.OpenMode.DEFAULT
90
+ openMode: 'drawer'
91
91
  },
92
92
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Drawer, {
93
93
  title: t(null == options ? void 0 : null == (_options_uiSchema = options.uiSchema) ? void 0 : _options_uiSchema.rawTitle),
@@ -229,7 +229,7 @@ const InternalPicker = (0, schema_namespaceObject.observer)((props)=>{
229
229
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_action_index_js_namespaceObject.ActionContextProvider, {
230
230
  value: {
231
231
  openSize: (null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops['openSize']) || openSize,
232
- openMode: external_action_index_js_namespaceObject.OpenMode.DEFAULT,
232
+ openMode: 'drawer',
233
233
  visible: visibleSelector,
234
234
  setVisible: setVisibleSelector
235
235
  },
@@ -145,7 +145,7 @@ const ReadPrettyInternalTag = (0, schema_namespaceObject.observer)((props)=>{
145
145
  value: {
146
146
  visible,
147
147
  setVisible,
148
- openMode: external_action_index_js_namespaceObject.OpenMode.DEFAULT,
148
+ openMode: 'drawer',
149
149
  snapshot: (null == collectionField ? void 0 : collectionField.interface) === 'snapshot'
150
150
  },
151
151
  children: renderRecordProvider()
@@ -160,7 +160,7 @@ const ReadPrettyInternalViewer = (0, schema_namespaceObject.observer)((props)=>{
160
160
  value: {
161
161
  visible,
162
162
  setVisible,
163
- openMode: external_action_index_js_namespaceObject.OpenMode.DEFAULT,
163
+ openMode: 'drawer',
164
164
  snapshot: (null == collectionField ? void 0 : collectionField.interface) === 'snapshot',
165
165
  fieldSchema: fieldSchema
166
166
  },
@@ -267,7 +267,7 @@ const SubTable = (0, schema_namespaceObject.observer)((props)=>{
267
267
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_action_index_js_namespaceObject.ActionContextProvider, {
268
268
  value: {
269
269
  openSize,
270
- openMode: external_action_index_js_namespaceObject.OpenMode.DEFAULT,
270
+ openMode: 'drawer',
271
271
  visible: visibleSelector,
272
272
  setVisible: setVisibleSelector
273
273
  },
@@ -24,8 +24,8 @@ var __webpack_require__ = {};
24
24
  var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
- ColorSelect: ()=>ColorSelect,
28
- default: ()=>color_select_ColorSelect
27
+ ColorSelect: ()=>ColorSelect_ColorSelect,
28
+ default: ()=>ColorSelect
29
29
  });
30
30
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
31
31
  require("react");
@@ -47,7 +47,7 @@ const colors = {
47
47
  purple: '{{t("Purple")}}',
48
48
  default: '{{t("Default")}}'
49
49
  };
50
- const ColorSelect = (0, schema_namespaceObject.connect)((props)=>{
50
+ const ColorSelect_ColorSelect = (0, schema_namespaceObject.connect)((props)=>{
51
51
  const compile = (0, useCompile_js_namespaceObject.useCompile)();
52
52
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Select, {
53
53
  ...props,
@@ -73,7 +73,7 @@ const ColorSelect = (0, schema_namespaceObject.connect)((props)=>{
73
73
  children: compile(colors[value] || colors.default)
74
74
  });
75
75
  }));
76
- const color_select_ColorSelect = ColorSelect;
76
+ const ColorSelect = ColorSelect_ColorSelect;
77
77
  exports.ColorSelect = __webpack_exports__.ColorSelect;
78
78
  exports["default"] = __webpack_exports__["default"];
79
79
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
@@ -27,6 +27,7 @@ __webpack_require__.d(__webpack_exports__, {
27
27
  mapRangePicker: ()=>mapRangePicker,
28
28
  moment2str: ()=>moment2str,
29
29
  mapDatePicker: ()=>mapDatePicker,
30
+ getDateExact: ()=>getDateExact,
30
31
  getDateRanges: ()=>getDateRanges
31
32
  });
32
33
  const client_namespaceObject = require("@tachybase/utils/client");
@@ -207,11 +208,26 @@ const getDateRanges = ()=>({
207
208
  getEnd(90, 'days')
208
209
  ]
209
210
  });
211
+ const getDateExact = ()=>({
212
+ nowUtc: ()=>(0, client_namespaceObject.dayjs)().toISOString(),
213
+ nowLocal: ()=>(0, client_namespaceObject.dayjs)().format('YYYY-MM-DD HH:mm:ss'),
214
+ todayUtc: ()=>(0, client_namespaceObject.dayjs)().startOf('day').utc().toISOString(),
215
+ todayLocal: ()=>(0, client_namespaceObject.dayjs)().startOf('day').format('YYYY-MM-DD HH:mm:ss'),
216
+ todayDate: ()=>(0, client_namespaceObject.dayjs)().format('YYYY-MM-DD'),
217
+ yesterdayUtc: ()=>(0, client_namespaceObject.dayjs)().subtract(1, 'day').startOf('day').utc().toISOString(),
218
+ yesterdayLocal: ()=>(0, client_namespaceObject.dayjs)().subtract(1, 'day').startOf('day').format('YYYY-MM-DD HH:mm:ss'),
219
+ yesterdayDate: ()=>(0, client_namespaceObject.dayjs)().subtract(1, 'day').format('YYYY-MM-DD'),
220
+ tomorrowUtc: ()=>(0, client_namespaceObject.dayjs)().add(1, 'day').startOf('day').utc().toISOString(),
221
+ tomorrowLocal: ()=>(0, client_namespaceObject.dayjs)().add(1, 'day').startOf('day').format('YYYY-MM-DD HH:mm:ss'),
222
+ tomorrowDate: ()=>(0, client_namespaceObject.dayjs)().add(1, 'day').format('YYYY-MM-DD')
223
+ });
224
+ exports.getDateExact = __webpack_exports__.getDateExact;
210
225
  exports.getDateRanges = __webpack_exports__.getDateRanges;
211
226
  exports.mapDatePicker = __webpack_exports__.mapDatePicker;
212
227
  exports.mapRangePicker = __webpack_exports__.mapRangePicker;
213
228
  exports.moment2str = __webpack_exports__.moment2str;
214
229
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
230
+ "getDateExact",
215
231
  "getDateRanges",
216
232
  "mapDatePicker",
217
233
  "mapRangePicker",
@@ -72,7 +72,6 @@ const SchemaSettingsSortingRule_js_namespaceObject = require("../../../schema-se
72
72
  const VariableInput_js_namespaceObject = require("../../../schema-settings/VariableInput/VariableInput.js");
73
73
  const external_variables_index_js_namespaceObject = require("../../../variables/index.js");
74
74
  const external_hooks_index_js_namespaceObject = require("../../hooks/index.js");
75
- const external_action_index_js_namespaceObject = require("../action/index.js");
76
75
  const util_js_namespaceObject = require("../association-field/util.js");
77
76
  const external_filter_index_js_namespaceObject = require("../filter/index.js");
78
77
  const utils_js_namespaceObject = require("../form-v2/utils.js");
@@ -782,7 +781,7 @@ const formItemSettings = new index_js_namespaceObject.SchemaSettings({
782
781
  'x-component': 'Action',
783
782
  'x-decorator': 'ACLActionProvider',
784
783
  'x-component-props': {
785
- openMode: external_action_index_js_namespaceObject.OpenMode.DRAWER_MODE,
784
+ openMode: 'drawer',
786
785
  type: 'default',
787
786
  component: 'CreateRecordAction'
788
787
  }
@@ -853,7 +852,7 @@ const formItemSettings = new index_js_namespaceObject.SchemaSettings({
853
852
  'x-component': 'Action',
854
853
  'x-decorator': 'ACLActionProvider',
855
854
  'x-component-props': {
856
- openMode: external_action_index_js_namespaceObject.OpenMode.DRAWER_MODE,
855
+ openMode: 'drawer',
857
856
  type: 'default',
858
857
  component: 'CreateRecordAction'
859
858
  }
@@ -33,8 +33,8 @@ var __webpack_require__ = {};
33
33
  var __webpack_exports__ = {};
34
34
  __webpack_require__.r(__webpack_exports__);
35
35
  __webpack_require__.d(__webpack_exports__, {
36
- default: ()=>form_tab,
37
- FormTab: ()=>FormTab
36
+ FormTab: ()=>FormTab,
37
+ default: ()=>form_tab
38
38
  });
39
39
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
40
40
  const external_react_namespaceObject = require("react");
@@ -75,8 +75,8 @@ var __webpack_exports__ = {};
75
75
  var __WEBPACK_REEXPORT_OBJECT__ = {};
76
76
  for(var __WEBPACK_IMPORT_KEY__ in _Form_Settings__WEBPACK_IMPORTED_MODULE_4__)if ([
77
77
  "fetchTemplateData",
78
- "default",
79
78
  "FormV2",
79
+ "default",
80
80
  "DetailsDesigner"
81
81
  ].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
82
82
  return _Form_Settings__WEBPACK_IMPORTED_MODULE_4__[key];
@@ -86,8 +86,8 @@ var __webpack_exports__ = {};
86
86
  var __WEBPACK_REEXPORT_OBJECT__ = {};
87
87
  for(var __WEBPACK_IMPORT_KEY__ in _FormField__WEBPACK_IMPORTED_MODULE_5__)if ([
88
88
  "fetchTemplateData",
89
- "default",
90
89
  "FormV2",
90
+ "default",
91
91
  "DetailsDesigner"
92
92
  ].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
93
93
  return _FormField__WEBPACK_IMPORTED_MODULE_5__[key];
@@ -24,8 +24,8 @@ var __webpack_require__ = {};
24
24
  var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
- Markdown: ()=>Markdown,
28
- default: ()=>markdown_Markdown,
27
+ Markdown: ()=>Markdown_Markdown,
28
+ default: ()=>Markdown,
29
29
  MarkdownReadPretty: ()=>MarkdownReadPretty
30
30
  });
31
31
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
@@ -38,7 +38,7 @@ const external_input_index_js_namespaceObject = require("../input/index.js");
38
38
  const external_Markdown_Void_js_namespaceObject = require("./Markdown.Void.js");
39
39
  const external_style_js_namespaceObject = require("./style.js");
40
40
  const external_util_js_namespaceObject = require("./util.js");
41
- const Markdown = (0, schema_namespaceObject.connect)(external_antd_namespaceObject.Input.TextArea, (0, schema_namespaceObject.mapProps)((props, field)=>({
41
+ const Markdown_Markdown = (0, schema_namespaceObject.connect)(external_antd_namespaceObject.Input.TextArea, (0, schema_namespaceObject.mapProps)((props, field)=>({
42
42
  autoSize: {
43
43
  maxRows: 10,
44
44
  minRows: 3
@@ -71,8 +71,8 @@ const MarkdownReadPretty = (props)=>{
71
71
  value: value
72
72
  }));
73
73
  };
74
- Markdown.Void = external_Markdown_Void_js_namespaceObject.MarkdownVoid;
75
- const markdown_Markdown = Markdown;
74
+ Markdown_Markdown.Void = external_Markdown_Void_js_namespaceObject.MarkdownVoid;
75
+ const Markdown = Markdown_Markdown;
76
76
  exports.Markdown = __webpack_exports__.Markdown;
77
77
  exports.MarkdownReadPretty = __webpack_exports__.MarkdownReadPretty;
78
78
  exports["default"] = __webpack_exports__["default"];
@@ -72,7 +72,7 @@ const external_PageDesigner_js_namespaceObject = require("./PageDesigner.js");
72
72
  const external_PageTabDesigner_js_namespaceObject = require("./PageTabDesigner.js");
73
73
  const external_style_js_namespaceObject = require("./style.js");
74
74
  const Page = (props)=>{
75
- var _fieldSchema_xcomponentprops, _fieldSchema_xcomponentprops1, _fieldSchema_xcomponentprops2, _match_params;
75
+ var _fieldSchema_xcomponentprops, _fieldSchema_xcomponentprops1, _fieldSchema_xcomponentprops2;
76
76
  const { children, ...others } = props;
77
77
  const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
78
78
  const { title, setTitle } = (0, document_title_index_js_namespaceObject.useDocumentTitle)();
@@ -80,26 +80,12 @@ const Page = (props)=>{
80
80
  const disablePageHeader = null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops.disablePageHeader;
81
81
  const enablePageTabs = null == (_fieldSchema_xcomponentprops1 = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops1.enablePageTabs;
82
82
  const enableSharePage = null == (_fieldSchema_xcomponentprops2 = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops2.enableSharePage;
83
+ const [searchParams, setSearchParams] = (0, external_react_router_dom_namespaceObject.useSearchParams)();
83
84
  const [loading, setLoading] = (0, external_react_namespaceObject.useState)(false);
84
- const navigate = (0, external_react_router_dom_namespaceObject.useNavigate)();
85
- const location = (0, external_react_router_dom_namespaceObject.useLocation)();
86
- const match = (0, external_react_router_dom_namespaceObject.useMatch)('/:entry/:entryId/page-tab/:pageTabId/*');
87
- const pageTabActiveKey = (0, external_react_namespaceObject.useMemo)(()=>{
88
- var _match_params;
89
- return (null == match ? void 0 : null == (_match_params = match.params) ? void 0 : _match_params.pageTabId) || Object.keys(fieldSchema.properties || {}).shift();
90
- }, [
91
- null == match ? void 0 : null == (_match_params = match.params) ? void 0 : _match_params.pageTabId,
92
- fieldSchema.properties
85
+ const activeKey = (0, external_react_namespaceObject.useMemo)(()=>searchParams.get('tab') || Object.keys(fieldSchema.properties || {}).shift(), [
86
+ fieldSchema.properties,
87
+ searchParams
93
88
  ]);
94
- const setPageTabUrl = (pageTabId)=>{
95
- const currentPath = location.pathname;
96
- const newPath = currentPath.replace(/\/page-tab\/[^/]*/, "/page-tab/".concat(pageTabId));
97
- newPath.includes('/page-tab/') ? navigate(newPath, {
98
- replace: true
99
- }) : navigate("".concat(currentPath, "/page-tab/").concat(pageTabId), {
100
- replace: true
101
- });
102
- };
103
89
  const [height, setHeight] = (0, external_react_namespaceObject.useState)(0);
104
90
  const aclStyles = (0, style_js_namespaceObject.useStyles)();
105
91
  const { wrapSSR, hashId, componentCls } = (0, external_style_js_namespaceObject.getStyles)();
@@ -119,21 +105,21 @@ const Page = (props)=>{
119
105
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PageHeader, {
120
106
  disablePageHeader: disablePageHeader,
121
107
  enablePageTabs: enablePageTabs,
122
- activeKey: pageTabActiveKey,
108
+ activeKey: activeKey,
123
109
  title: title,
124
110
  fieldSchema: fieldSchema,
125
111
  parentProps: others,
126
112
  setHeight: setHeight,
127
113
  setLoading: setLoading,
128
114
  enableSharePage: enableSharePage,
129
- setPageTabUrl: setPageTabUrl
115
+ setSearchParams: setSearchParams
130
116
  }),
131
117
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PageContentComponent, {
132
118
  loading: loading,
133
119
  disablePageHeader: disablePageHeader,
134
120
  enablePageTabs: enablePageTabs,
135
121
  fieldSchema: fieldSchema,
136
- activeKey: pageTabActiveKey,
122
+ activeKey: activeKey,
137
123
  height: height,
138
124
  children: children
139
125
  })
@@ -143,7 +129,7 @@ const Page = (props)=>{
143
129
  };
144
130
  const PageHeader = (props)=>{
145
131
  var _fieldSchema_xcomponentprops;
146
- const { disablePageHeader, enablePageTabs, setHeight, activeKey, setLoading, setPageTabUrl, fieldSchema, title, parentProps, enableSharePage } = props;
132
+ const { disablePageHeader, enablePageTabs, setHeight, activeKey, setLoading, setSearchParams, fieldSchema, title, parentProps, enableSharePage } = props;
147
133
  const { theme } = (0, theme_index_js_namespaceObject.useGlobalTheme)();
148
134
  const options = (0, external_react_namespaceObject.useContext)(schema_namespaceObject.SchemaOptionsContext);
149
135
  const compile = (0, external_hooks_index_js_namespaceObject.useCompile)();
@@ -186,7 +172,7 @@ const PageHeader = (props)=>{
186
172
  footer: enablePageTabs && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TabComponent, {
187
173
  activeKey: activeKey,
188
174
  setLoading: setLoading,
189
- setPageTabUrl: setPageTabUrl,
175
+ setSearchParams: setSearchParams,
190
176
  showScrollArea: showScrollArea,
191
177
  options: options,
192
178
  theme: theme,
@@ -272,7 +258,7 @@ const HeaderExtra = (param)=>{
272
258
  });
273
259
  };
274
260
  const TabComponent = (props)=>{
275
- const { activeKey, setLoading, setPageTabUrl, showScrollArea, options, theme, items } = props;
261
+ const { activeKey, setLoading, setSearchParams, showScrollArea, options, theme, items } = props;
276
262
  const { styles } = (0, external_Page_style_js_namespaceObject.useStyles)();
277
263
  const [hasMounted, setHasMounted] = (0, external_react_namespaceObject.useState)(false);
278
264
  const sensors = (0, core_namespaceObject.useSensors)((0, core_namespaceObject.useSensor)(core_namespaceObject.PointerSensor, {
@@ -281,7 +267,16 @@ const TabComponent = (props)=>{
281
267
  }
282
268
  }));
283
269
  const handleTabClick = (activeKey)=>{
284
- setPageTabUrl(activeKey);
270
+ setLoading(true);
271
+ setSearchParams([
272
+ [
273
+ 'tab',
274
+ activeKey
275
+ ]
276
+ ]);
277
+ setTimeout(()=>{
278
+ setLoading(false);
279
+ }, 50);
285
280
  };
286
281
  (0, external_react_namespaceObject.useEffect)(()=>{
287
282
  setTimeout(()=>{
@@ -252,7 +252,7 @@ const Drawer = (param)=>{
252
252
  allowNull: true,
253
253
  name: null == collectionField ? void 0 : collectionField.target,
254
254
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_action_index_js_namespaceObject.ActionContextProvider, {
255
- openMode: external_action_index_js_namespaceObject.OpenMode.DEFAULT,
255
+ openMode: "drawer",
256
256
  visible: visible,
257
257
  setVisible: setVisible,
258
258
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_core_index_js_namespaceObject.FormProvider, {
@@ -133,7 +133,7 @@ const ReadPrettyRecordPicker = (0, schema_namespaceObject.observer)((props)=>{
133
133
  value: {
134
134
  visible,
135
135
  setVisible,
136
- openMode: external_action_index_js_namespaceObject.OpenMode.DEFAULT,
136
+ openMode: 'drawer',
137
137
  snapshot: 'snapshot' === collectionField.interface
138
138
  },
139
139
  children: renderRecordProvider()
@@ -24,8 +24,8 @@ var __webpack_require__ = {};
24
24
  var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
- default: ()=>scroll_area_ScrollArea,
28
- ScrollArea: ()=>ScrollArea
27
+ ScrollArea: ()=>ScrollArea,
28
+ default: ()=>scroll_area_ScrollArea
29
29
  });
30
30
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
31
31
  const external_react_namespaceObject = require("react");
@@ -92,8 +92,8 @@ var __webpack_exports__ = {};
92
92
  var _TableBlockDesigner__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("./TableBlockDesigner");
93
93
  var __WEBPACK_REEXPORT_OBJECT__ = {};
94
94
  for(var __WEBPACK_IMPORT_KEY__ in _TableBlockDesigner__WEBPACK_IMPORTED_MODULE_8__)if ([
95
- "useColumnSchema",
96
95
  "TableV2",
96
+ "useColumnSchema",
97
97
  "default"
98
98
  ].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
99
99
  return _TableBlockDesigner__WEBPACK_IMPORTED_MODULE_8__[key];
@@ -102,8 +102,8 @@ var __webpack_exports__ = {};
102
102
  var _TableField__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("./TableField");
103
103
  var __WEBPACK_REEXPORT_OBJECT__ = {};
104
104
  for(var __WEBPACK_IMPORT_KEY__ in _TableField__WEBPACK_IMPORTED_MODULE_9__)if ([
105
- "useColumnSchema",
106
105
  "TableV2",
106
+ "useColumnSchema",
107
107
  "default"
108
108
  ].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
109
109
  return _TableField__WEBPACK_IMPORTED_MODULE_9__[key];
@@ -112,8 +112,8 @@ var __webpack_exports__ = {};
112
112
  var _TableSelectorDesigner__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("./TableSelectorDesigner");
113
113
  var __WEBPACK_REEXPORT_OBJECT__ = {};
114
114
  for(var __WEBPACK_IMPORT_KEY__ in _TableSelectorDesigner__WEBPACK_IMPORTED_MODULE_10__)if ([
115
- "useColumnSchema",
116
115
  "TableV2",
116
+ "useColumnSchema",
117
117
  "default"
118
118
  ].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
119
119
  return _TableSelectorDesigner__WEBPACK_IMPORTED_MODULE_10__[key];
@@ -28,12 +28,10 @@ __webpack_require__.d(__webpack_exports__, {
28
28
  getImageByUrl: ()=>getImageByUrl,
29
29
  testOpts: ()=>testOpts,
30
30
  isPdf: ()=>isPdf,
31
- toValue: ()=>toValue,
32
31
  getState: ()=>getState,
33
- isImage: ()=>isImage,
34
32
  useValidator: ()=>useValidator,
33
+ isImage: ()=>isImage,
35
34
  toItem: ()=>toItem,
36
- useUploadValidator: ()=>useUploadValidator,
37
35
  getURL: ()=>getURL,
38
36
  normalizeFileList: ()=>normalizeFileList,
39
37
  getErrorMessage: ()=>getErrorMessage,
@@ -41,7 +39,9 @@ __webpack_require__.d(__webpack_exports__, {
41
39
  toArr: ()=>toArr,
42
40
  toImages: ()=>toImages,
43
41
  toMap: ()=>toMap,
44
- useUploadProps: ()=>useUploadProps
42
+ useUploadValidator: ()=>useUploadValidator,
43
+ useUploadProps: ()=>useUploadProps,
44
+ toValue: ()=>toValue
45
45
  });
46
46
  const external_react_namespaceObject = require("react");
47
47
  const schema_namespaceObject = require("@tachybase/schema");
@@ -27,7 +27,7 @@ __webpack_require__.d(__webpack_exports__, {
27
27
  SelectActionInitializer: ()=>SelectActionInitializer
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 external_ActionInitializer_js_namespaceObject = require("./ActionInitializer.js");
32
32
  const SelectActionInitializer = (props)=>{
33
33
  const schema = {
@@ -37,7 +37,7 @@ const SelectActionInitializer = (props)=>{
37
37
  'x-designer': 'Action.Designer',
38
38
  'x-component': 'Action',
39
39
  'x-component-props': {
40
- openMode: index_js_namespaceObject.OpenMode.DRAWER_MODE
40
+ openMode: 'drawer'
41
41
  },
42
42
  properties: {
43
43
  drawer: {