@tachybase/client 1.3.19 → 1.3.21

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 (135) hide show
  1. package/es/application/Application.mjs +1 -9
  2. package/es/application/components/index.d.ts +0 -2
  3. package/es/application/components/index.mjs +0 -2
  4. package/es/application/schema-initializer/context/index.d.ts +1 -1
  5. package/es/application/utils/globalDeps.mjs +1 -1
  6. package/es/block-provider/hooks/index.mjs +1 -1
  7. package/es/built-in/index.d.ts +2 -1
  8. package/es/built-in/index.mjs +3 -2
  9. package/es/collection-manager/Configuration/components/Summary.mjs +3 -3
  10. package/es/collection-manager/collectionPlugin.mjs +36 -0
  11. package/es/collection-manager/interfaces/url.d.ts +4 -0
  12. package/es/collection-manager/interfaces/url.mjs +10 -1
  13. package/es/collection-manager/templates/sql.d.ts +3 -3
  14. package/es/collection-manager/templates/view.d.ts +3 -3
  15. package/es/data-source/collection-field-interface/CollectionFieldInterface.mjs +1 -15
  16. package/es/flag-provider/FlagProvider.d.ts +1 -0
  17. package/es/flag-provider/hooks/useFlag.mjs +1 -1
  18. package/es/modules/blocks/data-blocks/form/fieldSettingsFormItem.mjs +1 -4
  19. package/es/modules/blocks/data-blocks/table/hooks/useTableBlockProps.mjs +14 -2
  20. package/es/modules/blocks/data-blocks/table/tableColumnSettings.mjs +1 -3
  21. package/es/modules/blocks/filter-blocks/collapse/filterCollapseItemFieldSettings.mjs +0 -4
  22. package/es/modules/blocks/filter-blocks/form/filterFormItemFieldSettings.mjs +0 -4
  23. package/es/modules/fields/component/CustomTitle/customTitleComponentFieldSettings.mjs +95 -5
  24. package/es/modules/fields/component/InputPreview/inputPreviewComponentFieldSettings.d.ts +2 -0
  25. package/es/modules/fields/component/InputPreview/inputPreviewComponentFieldSettings.mjs +99 -0
  26. package/es/modules/fields/component/MultipleSelect/multipleSelectComponentFieldSettings.d.ts +2 -0
  27. package/es/modules/fields/component/MultipleSelect/multipleSelectComponentFieldSettings.mjs +64 -0
  28. package/es/modules/fields/component/Radio/radioComponentFieldSettings.mjs +15 -2
  29. package/es/modules/fields/component/Select/selectComponentFieldSettings.mjs +26 -7
  30. package/es/schema-component/antd/association-field/InternalViewer.mjs +4 -58
  31. package/es/schema-component/antd/association-field/hooks.d.ts +4 -0
  32. package/es/schema-component/antd/association-field/hooks.mjs +52 -1
  33. package/es/schema-component/antd/color-select/ColorSelect.mjs +3 -3
  34. package/es/schema-component/antd/date-picker/util.d.ts +13 -0
  35. package/es/schema-component/antd/date-picker/util.mjs +14 -1
  36. package/es/schema-component/antd/input/Input.mjs +2 -1
  37. package/es/schema-component/antd/input/ReadPretty.d.ts +1 -0
  38. package/es/schema-component/antd/input/ReadPretty.mjs +29 -1
  39. package/es/schema-component/antd/markdown/Markdown.mjs +4 -4
  40. package/es/schema-component/antd/page/Page.Settings.mjs +0 -33
  41. package/es/schema-component/antd/page/Page.mjs +46 -95
  42. package/es/schema-component/antd/page/hooks/index.d.ts +1 -1
  43. package/es/schema-component/antd/page/hooks/index.mjs +1 -1
  44. package/es/schema-component/antd/page/index.d.ts +1 -0
  45. package/es/schema-component/antd/page/index.mjs +1 -0
  46. package/es/schema-component/antd/page/pageExtendComponentProvider.d.ts +3 -0
  47. package/es/schema-component/antd/page/pageExtendComponentProvider.mjs +9 -0
  48. package/es/schema-component/antd/page/style.d.ts +0 -5
  49. package/es/schema-component/antd/page/style.mjs +1 -45
  50. package/es/schema-component/antd/password/utils.d.ts +1 -1
  51. package/es/schema-component/antd/select/FormulaSelect.mjs +16 -4
  52. package/es/schema-component/antd/select/ReadPretty.mjs +16 -3
  53. package/es/schema-component/antd/select/Select.mjs +6 -1
  54. package/es/schema-component/hooks/useFieldModeOptions.mjs +13 -10
  55. package/es/schema-settings/EditFormulaTitleField.mjs +19 -1
  56. package/es/schema-settings/SchemaSettingsDefaultValue.mjs +3 -2
  57. package/es/schema-settings/SchemaSettingsPlugin.mjs +4 -0
  58. package/es/schema-settings/VariableInput/hooks/index.d.ts +1 -0
  59. package/es/schema-settings/VariableInput/hooks/index.mjs +1 -0
  60. package/es/schema-settings/VariableInput/hooks/useExactDateVariable.d.ts +93 -0
  61. package/es/schema-settings/VariableInput/hooks/useExactDateVariable.mjs +75 -0
  62. package/es/schema-settings/VariableInput/hooks/useVariableOptions.mjs +11 -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/Application.js +0 -8
  68. package/lib/application/components/index.js +0 -18
  69. package/lib/block-provider/hooks/index.js +5 -5
  70. package/lib/built-in/acl/Configuration/MenuItemsProvider.js +2 -2
  71. package/lib/built-in/attachment-preview/previewers/file-sheet.js +2 -2
  72. package/lib/built-in/index.js +30 -4
  73. package/lib/built-in/pm/index.js +1 -1
  74. package/lib/collection-manager/Configuration/components/Summary.js +3 -3
  75. package/lib/collection-manager/collectionPlugin.js +36 -0
  76. package/lib/collection-manager/index.js +17 -17
  77. package/lib/collection-manager/interfaces/url.js +10 -1
  78. package/lib/data-source/collection-field-interface/CollectionFieldInterface.js +1 -15
  79. package/lib/flag-provider/hooks/useFlag.js +1 -1
  80. package/lib/icon/Icon.js +2 -2
  81. package/lib/locale/zh-CN.js +6 -0
  82. package/lib/modules/blocks/data-blocks/form/fieldSettingsFormItem.js +0 -3
  83. package/lib/modules/blocks/data-blocks/table/hooks/useTableBlockProps.js +14 -2
  84. package/lib/modules/blocks/data-blocks/table/tableColumnSettings.js +1 -3
  85. package/lib/modules/blocks/filter-blocks/collapse/filterCollapseItemFieldSettings.js +0 -4
  86. package/lib/modules/blocks/filter-blocks/form/filterFormItemFieldSettings.js +0 -4
  87. package/lib/modules/fields/component/CustomTitle/customTitleComponentFieldSettings.js +93 -3
  88. package/lib/modules/fields/component/InputPreview/inputPreviewComponentFieldSettings.js +133 -0
  89. package/lib/modules/fields/component/MultipleSelect/multipleSelectComponentFieldSettings.js +98 -0
  90. package/lib/modules/fields/component/Radio/radioComponentFieldSettings.js +16 -3
  91. package/lib/modules/fields/component/Select/selectComponentFieldSettings.js +23 -4
  92. package/lib/schema-component/antd/action/Action.Container.js +2 -2
  93. package/lib/schema-component/antd/action/Action.Modal.js +2 -2
  94. package/lib/schema-component/antd/action/Action.Sheet.js +2 -2
  95. package/lib/schema-component/antd/association-field/InternalViewer.js +1 -55
  96. package/lib/schema-component/antd/association-field/hooks.js +54 -0
  97. package/lib/schema-component/antd/color-select/ColorSelect.js +4 -4
  98. package/lib/schema-component/antd/date-picker/util.js +16 -0
  99. package/lib/schema-component/antd/form-tab/index.js +2 -2
  100. package/lib/schema-component/antd/form-v2/index.js +2 -2
  101. package/lib/schema-component/antd/input/Input.js +2 -1
  102. package/lib/schema-component/antd/input/ReadPretty.js +28 -0
  103. package/lib/schema-component/antd/markdown/Markdown.js +5 -5
  104. package/lib/schema-component/antd/page/Page.Settings.js +0 -33
  105. package/lib/schema-component/antd/page/Page.js +41 -90
  106. package/lib/schema-component/antd/page/hooks/index.js +5 -5
  107. package/lib/schema-component/antd/page/index.js +9 -0
  108. package/lib/{application/components/ShareSchemaComponent.js → schema-component/antd/page/pageExtendComponentProvider.js} +15 -10
  109. package/lib/schema-component/antd/page/style.js +2 -49
  110. package/lib/schema-component/antd/scroll-area/ScrollArea.js +2 -2
  111. package/lib/schema-component/antd/select/FormulaSelect.js +16 -4
  112. package/lib/schema-component/antd/select/ReadPretty.js +15 -2
  113. package/lib/schema-component/antd/select/Select.js +6 -1
  114. package/lib/schema-component/antd/table-v2/index.js +3 -3
  115. package/lib/schema-component/antd/upload/shared.js +4 -4
  116. package/lib/schema-component/hooks/useFieldModeOptions.js +13 -10
  117. package/lib/schema-settings/EditFormulaTitleField.js +19 -1
  118. package/lib/schema-settings/SchemaSettingsDefaultValue.js +3 -2
  119. package/lib/schema-settings/SchemaSettingsPlugin.js +4 -0
  120. package/lib/schema-settings/VariableInput/hooks/index.js +9 -0
  121. package/lib/schema-settings/VariableInput/hooks/useExactDateVariable.js +112 -0
  122. package/lib/schema-settings/VariableInput/hooks/useVariableOptions.js +11 -1
  123. package/lib/user/ChangePassword.js +118 -5
  124. package/lib/user/index.js +24 -4
  125. package/lib/variables/VariablesProvider.js +2 -2
  126. package/lib/variables/hooks/useBuiltinVariables.js +7 -1
  127. package/package.json +10 -10
  128. package/es/application/components/SharePage.d.ts +0 -4
  129. package/es/application/components/SharePage.mjs +0 -113
  130. package/es/application/components/ShareSchemaComponent.d.ts +0 -1
  131. package/es/application/components/ShareSchemaComponent.mjs +0 -10
  132. package/es/schema-component/antd/page/hooks/useShareActions.d.ts +0 -7
  133. package/es/schema-component/antd/page/hooks/useShareActions.mjs +0 -242
  134. package/lib/application/components/SharePage.js +0 -156
  135. package/lib/schema-component/antd/page/hooks/useShareActions.js +0 -286
@@ -0,0 +1,93 @@
1
+ import { Schema } from '@tachybase/schema';
2
+ interface Props {
3
+ operator?: {
4
+ value: string;
5
+ };
6
+ schema?: any;
7
+ /**
8
+ * 不需要禁用选项,一般会在表达式中使用
9
+ */
10
+ noDisabled?: boolean;
11
+ /** 消费变量值的字段 */
12
+ targetFieldSchema?: Schema;
13
+ dateOnly?: boolean;
14
+ utc?: boolean;
15
+ }
16
+ /**
17
+ * 变量:`日期变量`的上下文
18
+ * @returns
19
+ */
20
+ export declare const useExactDateVariableContext: () => {
21
+ exactDateTimeCtx: {
22
+ nowUtc: () => string;
23
+ nowLocal: () => string;
24
+ todayUtc: () => string;
25
+ todayLocal: () => string;
26
+ todayDate: () => string;
27
+ yesterdayUtc: () => string;
28
+ yesterdayLocal: () => string;
29
+ yesterdayDate: () => string;
30
+ tomorrowUtc: () => string;
31
+ tomorrowLocal: () => string;
32
+ tomorrowDate: () => string;
33
+ };
34
+ };
35
+ /**
36
+ * 变量:`日期时刻变量`,主要用于赋值的场景
37
+ * @param param0
38
+ * @returns
39
+ */
40
+ export declare const useExactDateVariable: ({ schema, targetFieldSchema }?: Props) => {
41
+ exactDateTimeSettings: {
42
+ label: string;
43
+ value: string;
44
+ key: string;
45
+ children: {
46
+ key: string;
47
+ value: string;
48
+ label: string;
49
+ operators: ({
50
+ label: string;
51
+ value: string;
52
+ selected: boolean;
53
+ schema?: undefined;
54
+ noValue?: undefined;
55
+ } | {
56
+ label: string;
57
+ value: string;
58
+ selected?: undefined;
59
+ schema?: undefined;
60
+ noValue?: undefined;
61
+ } | {
62
+ label: string;
63
+ value: string;
64
+ schema: {
65
+ 'x-component': string;
66
+ };
67
+ selected?: undefined;
68
+ noValue?: undefined;
69
+ } | {
70
+ label: string;
71
+ value: string;
72
+ noValue: boolean;
73
+ selected?: undefined;
74
+ schema?: undefined;
75
+ })[];
76
+ }[];
77
+ };
78
+ exactDateTimeCtx: {
79
+ nowUtc: () => string;
80
+ nowLocal: () => string;
81
+ todayUtc: () => string;
82
+ todayLocal: () => string;
83
+ todayDate: () => string;
84
+ yesterdayUtc: () => string;
85
+ yesterdayLocal: () => string;
86
+ yesterdayDate: () => string;
87
+ tomorrowUtc: () => string;
88
+ tomorrowLocal: () => string;
89
+ tomorrowDate: () => string;
90
+ };
91
+ shouldDisplayExactDate: boolean;
92
+ };
93
+ export {};
@@ -0,0 +1,75 @@
1
+ import { useMemo } from "react";
2
+ import { useTranslation } from "react-i18next";
3
+ import { datetime } from "../../../collection-manager/interfaces/properties/operators.mjs";
4
+ import { useFlag } from "../../../flag-provider/index.mjs";
5
+ import { getDateExact } from "../../../schema-component/antd/date-picker/util.mjs";
6
+ const useExactDateVariableContext = ()=>{
7
+ const exactDateTimeCtx = useMemo(()=>getDateExact(), []);
8
+ return {
9
+ exactDateTimeCtx
10
+ };
11
+ };
12
+ const useExactDateVariable = function() {
13
+ let { schema, targetFieldSchema } = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
14
+ var _collectionField_uiSchema;
15
+ const { collectionField } = useFlag();
16
+ const { dateOnly, utc, accuracy, picker } = (null == collectionField ? void 0 : null == (_collectionField_uiSchema = collectionField.uiSchema) ? void 0 : _collectionField_uiSchema['x-component-props']) || {};
17
+ const { t } = useTranslation();
18
+ const exactDateTimeSettings = useMemo(()=>{
19
+ const getDateKeys = (key)=>{
20
+ if (!picker) {
21
+ if ('now' === key) return 'nowLocal';
22
+ if ('today' === key) return 'todayDate';
23
+ if ('yesterday' === key) return 'yesterdayDate';
24
+ if ('tomorrow' === key) return 'tomorrowDate';
25
+ }
26
+ if (dateOnly) {
27
+ if ('now' === key) return null;
28
+ return "".concat(key, "Date");
29
+ }
30
+ return "".concat(key).concat(utc || accuracy ? 'Utc' : 'Local');
31
+ };
32
+ const dateOptions = [
33
+ {
34
+ key: 'now',
35
+ value: getDateKeys('now'),
36
+ label: t('Now'),
37
+ operators: datetime
38
+ },
39
+ {
40
+ key: 'today',
41
+ value: getDateKeys('today'),
42
+ label: t('Today'),
43
+ operators: datetime
44
+ },
45
+ {
46
+ key: 'yesterday',
47
+ value: getDateKeys('yesterday'),
48
+ label: t('Yesterday'),
49
+ operators: datetime
50
+ },
51
+ {
52
+ key: 'tomorrow',
53
+ value: getDateKeys('tomorrow'),
54
+ label: t('Tomorrow'),
55
+ operators: datetime
56
+ }
57
+ ].filter((v)=>v.value);
58
+ return {
59
+ label: t('Date variables'),
60
+ value: '$nExactDate',
61
+ key: '$nExactDate',
62
+ children: dateOptions
63
+ };
64
+ }, [
65
+ null == schema ? void 0 : schema['x-component'],
66
+ targetFieldSchema
67
+ ]);
68
+ const { exactDateTimeCtx } = useExactDateVariableContext();
69
+ return {
70
+ exactDateTimeSettings,
71
+ exactDateTimeCtx,
72
+ shouldDisplayExactDate: !!collectionField
73
+ };
74
+ };
75
+ export { useExactDateVariable, useExactDateVariableContext };
@@ -1,6 +1,7 @@
1
1
  import { useMemo } from "react";
2
2
  import { useBlockCollection } from "./useBlockCollection.mjs";
3
3
  import { useDatetimeVariable } from "./useDateVariable.mjs";
4
+ import { useExactDateVariable } from "./useExactDateVariable.mjs";
4
5
  import { useFilterVariable } from "./useFilterVariable.mjs";
5
6
  import { useCurrentFormVariable } from "./useFormVariable.mjs";
6
7
  import { useCurrentObjectVariable } from "./useIterationVariable.mjs";
@@ -32,6 +33,12 @@ const useVariableOptions = (param)=>{
32
33
  schema: uiSchema,
33
34
  noDisabled
34
35
  });
36
+ const { exactDateTimeSettings, shouldDisplayExactDate } = useExactDateVariable({
37
+ operator,
38
+ schema: uiSchema,
39
+ noDisabled: true,
40
+ targetFieldSchema
41
+ });
35
42
  const { currentFormSettings, shouldDisplayCurrentForm } = useCurrentFormVariable({
36
43
  schema: uiSchema,
37
44
  collectionField,
@@ -74,7 +81,8 @@ const useVariableOptions = (param)=>{
74
81
  return useMemo(()=>[
75
82
  currentUserSettings,
76
83
  currentRoleSettings,
77
- datetimeSettings,
84
+ !shouldDisplayExactDate && datetimeSettings,
85
+ shouldDisplayExactDate && exactDateTimeSettings,
78
86
  shouldDisplayCurrentForm && currentFormSettings,
79
87
  shouldDisplayCurrentObject && currentObjectSettings,
80
88
  shouldDisplayCurrentRecord && currentRecordSettings,
@@ -85,6 +93,8 @@ const useVariableOptions = (param)=>{
85
93
  currentUserSettings,
86
94
  currentRoleSettings,
87
95
  datetimeSettings,
96
+ exactDateTimeSettings,
97
+ shouldDisplayExactDate,
88
98
  shouldDisplayCurrentForm,
89
99
  currentFormSettings,
90
100
  shouldDisplayCurrentObject,
@@ -2,8 +2,9 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useContext, useMemo, useState } from "react";
3
3
  import { uid, useForm } from "@tachybase/schema";
4
4
  import { useTranslation } from "react-i18next";
5
- import { ActionContextProvider, DropdownVisibleContext, SchemaComponent, useActionContext, useCurrentUserContext } from "../index.mjs";
5
+ import { ActionContextProvider, DropdownVisibleContext, SchemaComponent, useActionContext, useApp, useCurrentUserContext } from "../index.mjs";
6
6
  import { useAPIClient } from "../api-client/index.mjs";
7
+ import VerificationCode from "./VerificationCode.mjs";
7
8
  const useCloseAction = ()=>{
8
9
  const { setVisible } = useActionContext();
9
10
  const form = useForm();
@@ -49,13 +50,101 @@ const schema = {
49
50
  type: 'void',
50
51
  title: '{{t("Change password")}}',
51
52
  properties: {
53
+ verifyMethod: {
54
+ type: 'string',
55
+ required: true,
56
+ title: '{{t("Verify method")}}',
57
+ enum: [
58
+ {
59
+ label: '{{t("Use old password")}}',
60
+ value: 'password'
61
+ },
62
+ {
63
+ label: '{{t("Use verification code")}}',
64
+ value: 'code'
65
+ }
66
+ ],
67
+ 'x-component': 'Radio.Group',
68
+ 'x-decorator': 'FormItem',
69
+ 'x-reactions': [
70
+ {
71
+ dependencies: [
72
+ '.phoneExist',
73
+ '.oldPasswordExist'
74
+ ],
75
+ fulfill: {
76
+ state: {
77
+ hidden: '{{ !($deps[0] && $deps[1] && smsVerifyEnabled) }}',
78
+ value: '{{ undefined }}'
79
+ }
80
+ }
81
+ }
82
+ ]
83
+ },
84
+ phoneExist: {
85
+ type: 'boolean',
86
+ default: '{{ !!phoneNumber }}',
87
+ 'x-hidden': true
88
+ },
89
+ phone: {
90
+ type: 'string',
91
+ title: '{{t("Phone")}}',
92
+ default: '{{ phoneNumber }}',
93
+ 'x-component': 'Input',
94
+ 'x-validator': 'phone',
95
+ 'x-decorator': 'FormItem',
96
+ 'x-hidden': true
97
+ },
98
+ code: {
99
+ type: 'string',
100
+ title: '{{t("Verification code")}}',
101
+ description: "{{codeDescription}}",
102
+ 'x-component': 'VerificationCode',
103
+ 'x-component-props': {
104
+ actionType: 'auth:changePassword',
105
+ targetFieldName: 'phone'
106
+ },
107
+ required: true,
108
+ 'x-decorator': 'FormItem',
109
+ 'x-reactions': [
110
+ {
111
+ dependencies: [
112
+ '.verifyMethod',
113
+ '.phoneExist',
114
+ '.phone'
115
+ ],
116
+ fulfill: {
117
+ state: {
118
+ hidden: "{{ \n !$deps[1] || \n !smsVerifyEnabled ||\n ($deps[0] !== 'code' && $deps[0] !== undefined) // \u6709 verifyMethod \u4F46\u672A\u9009 code\n }}"
119
+ }
120
+ }
121
+ }
122
+ ]
123
+ },
124
+ oldPasswordExist: {
125
+ type: 'boolean',
126
+ default: '{{ oldPassword }}',
127
+ 'x-hidden': true
128
+ },
52
129
  oldPassword: {
53
130
  type: 'string',
54
131
  title: '{{t("Old password")}}',
55
132
  required: true,
56
133
  'x-component': 'Password',
57
134
  'x-decorator': 'FormItem',
58
- 'x-hidden': '{{ hideOldPassword }}'
135
+ 'x-reactions': [
136
+ {
137
+ dependencies: [
138
+ '.verifyMethod',
139
+ '.oldPasswordExist'
140
+ ],
141
+ fulfill: {
142
+ state: {
143
+ hidden: "{{ \n !$deps[1] || \n (smsVerifyEnabled && $deps[0] !== 'password' && $deps[0] !== undefined)\n }}"
144
+ }
145
+ }
146
+ }
147
+ ]
59
148
  },
60
149
  newPassword: {
61
150
  type: 'string',
@@ -129,12 +218,20 @@ const schema = {
129
218
  }
130
219
  };
131
220
  const useChangePassword = ()=>{
132
- var _currentUser_data_data, _currentUser_data;
221
+ var _currentUser_data_data, _currentUser_data, _currentUser_data_data1, _currentUser_data1;
133
222
  const ctx = useContext(DropdownVisibleContext);
134
223
  const [visible, setVisible] = useState(false);
135
224
  const { t } = useTranslation();
225
+ const pm = useApp().pluginManager;
226
+ const otp = pm.get('@tachybase/plugin-otp');
227
+ const sms = pm.get('@tachybase/plugin-auth-sms');
228
+ const smsVerifyEnabled = !!otp && !!sms;
136
229
  const currentUser = useCurrentUserContext();
137
- const hideOldPassword = (null == currentUser ? void 0 : null == (_currentUser_data = currentUser.data) ? void 0 : null == (_currentUser_data_data = _currentUser_data.data) ? void 0 : _currentUser_data_data.password) === null;
230
+ const oldPassword = (null == currentUser ? void 0 : null == (_currentUser_data = currentUser.data) ? void 0 : null == (_currentUser_data_data = _currentUser_data.data) ? void 0 : _currentUser_data_data.password) !== null;
231
+ const phoneNumber = null == currentUser ? void 0 : null == (_currentUser_data1 = currentUser.data) ? void 0 : null == (_currentUser_data_data1 = _currentUser_data1.data) ? void 0 : _currentUser_data_data1.phone;
232
+ const codeDescription = phoneNumber ? t('Send verification code to phone: {{phoneNumber}}', {
233
+ phoneNumber
234
+ }) : t('Please fill in your mobile phone number in your personal information first');
138
235
  return useMemo(()=>({
139
236
  key: 'password',
140
237
  eventKey: 'ChangePassword',
@@ -156,7 +253,13 @@ const useChangePassword = ()=>{
156
253
  scope: {
157
254
  useCloseAction,
158
255
  useSaveCurrentUserValues,
159
- hideOldPassword
256
+ oldPassword,
257
+ codeDescription,
258
+ phoneNumber,
259
+ smsVerifyEnabled
260
+ },
261
+ components: {
262
+ VerificationCode: VerificationCode
160
263
  },
161
264
  schema: schema
162
265
  })
@@ -166,7 +269,7 @@ const useChangePassword = ()=>{
166
269
  })
167
270
  }), [
168
271
  visible,
169
- hideOldPassword
272
+ oldPassword
170
273
  ]);
171
274
  };
172
275
  export { useChangePassword };
@@ -1,3 +1,4 @@
1
1
  export * from './CurrentUser';
2
2
  export * from './CurrentUserProvider';
3
3
  export * from './CurrentUserSettingsMenuProvider';
4
+ export { default as VerificationCode } from './VerificationCode';
package/es/user/index.mjs CHANGED
@@ -1,3 +1,5 @@
1
+ import VerificationCode from "./VerificationCode.mjs";
1
2
  export * from "./CurrentUser.mjs";
2
3
  export * from "./CurrentUserProvider.mjs";
3
4
  export * from "./CurrentUserSettingsMenuProvider.mjs";
5
+ export { VerificationCode };
@@ -1,11 +1,12 @@
1
1
  import { useMemo } from "react";
2
2
  import { dayjs } from "@tachybase/utils/client";
3
- import { useCurrentUserVariable, useDatetimeVariable } from "../../schema-settings/index.mjs";
3
+ import { useCurrentUserVariable, useDatetimeVariable, useExactDateVariable } from "../../schema-settings/index.mjs";
4
4
  import { useCurrentRoleVariable } from "../../schema-settings/VariableInput/hooks/useRoleVariable.mjs";
5
5
  const useBuiltInVariables = ()=>{
6
6
  const { currentUserCtx } = useCurrentUserVariable();
7
7
  const { currentRoleCtx } = useCurrentRoleVariable();
8
8
  const { datetimeCtx } = useDatetimeVariable();
9
+ const { exactDateTimeCtx } = useExactDateVariable();
9
10
  const builtinVariables = useMemo(()=>[
10
11
  {
11
12
  name: '$user',
@@ -30,6 +31,10 @@ const useBuiltInVariables = ()=>{
30
31
  name: '$date',
31
32
  ctx: datetimeCtx
32
33
  },
34
+ {
35
+ name: '$nExactDate',
36
+ ctx: exactDateTimeCtx
37
+ },
33
38
  {
34
39
  name: '$system',
35
40
  ctx: {
@@ -41,7 +46,8 @@ const useBuiltInVariables = ()=>{
41
46
  ctx: ()=>dayjs().toISOString()
42
47
  }
43
48
  ], [
44
- currentUserCtx
49
+ currentUserCtx,
50
+ exactDateTimeCtx
45
51
  ]);
46
52
  return {
47
53
  builtinVariables
@@ -125,14 +125,6 @@ class Application {
125
125
  path: '*',
126
126
  Component: this.components['AppNotFound']
127
127
  });
128
- this.router.add('share', {
129
- path: '/share',
130
- Component: external_components_index_js_namespaceObject.SharePage
131
- });
132
- this.router.add('share.page', {
133
- path: '/share/:name',
134
- Component: external_components_index_js_namespaceObject.ShareSchemaComponent
135
- });
136
128
  this.router.add('share.notAuthorized', {
137
129
  path: '/share/not-authorized',
138
130
  element: null
@@ -9,12 +9,6 @@ var __webpack_modules__ = {
9
9
  "./RouterContextCleaner": function(module) {
10
10
  module.exports = require("./RouterContextCleaner.js");
11
11
  },
12
- "./SharePage": function(module) {
13
- module.exports = require("./SharePage.js");
14
- },
15
- "./ShareSchemaComponent": function(module) {
16
- module.exports = require("./ShareSchemaComponent.js");
17
- },
18
12
  "./defaultComponents": function(module) {
19
13
  module.exports = require("./defaultComponents.js");
20
14
  }
@@ -86,18 +80,6 @@ var __webpack_exports__ = {};
86
80
  return _RouterContextCleaner__WEBPACK_IMPORTED_MODULE_3__[key];
87
81
  }).bind(0, __WEBPACK_IMPORT_KEY__);
88
82
  __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
89
- var _SharePage__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("./SharePage");
90
- var __WEBPACK_REEXPORT_OBJECT__ = {};
91
- for(var __WEBPACK_IMPORT_KEY__ in _SharePage__WEBPACK_IMPORTED_MODULE_4__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
92
- return _SharePage__WEBPACK_IMPORTED_MODULE_4__[key];
93
- }).bind(0, __WEBPACK_IMPORT_KEY__);
94
- __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
95
- var _ShareSchemaComponent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("./ShareSchemaComponent");
96
- var __WEBPACK_REEXPORT_OBJECT__ = {};
97
- for(var __WEBPACK_IMPORT_KEY__ in _ShareSchemaComponent__WEBPACK_IMPORTED_MODULE_5__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
98
- return _ShareSchemaComponent__WEBPACK_IMPORTED_MODULE_5__[key];
99
- }).bind(0, __WEBPACK_IMPORT_KEY__);
100
- __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
101
83
  })();
102
84
  for(var __webpack_i__ in __webpack_exports__)exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
103
85
  Object.defineProperty(exports, '__esModule', {
@@ -214,6 +214,7 @@ var __webpack_exports__ = {};
214
214
  "useInsertSchema",
215
215
  "getAssociationPath",
216
216
  "useAssociationNames",
217
+ "default",
217
218
  "getBeforeWorkflows",
218
219
  "useCustomizeRequestActionProps",
219
220
  "getFormValues",
@@ -225,7 +226,6 @@ var __webpack_exports__ = {};
225
226
  "useAssociationCreateActionProps",
226
227
  "useRefreshActionProps",
227
228
  "useUpdateActionProps",
228
- "default",
229
229
  "useResetBlockActionProps",
230
230
  "useDestroyActionProps",
231
231
  "useOptionalFieldList",
@@ -250,6 +250,7 @@ var __webpack_exports__ = {};
250
250
  "useInsertSchema",
251
251
  "getAssociationPath",
252
252
  "useAssociationNames",
253
+ "default",
253
254
  "getBeforeWorkflows",
254
255
  "useCustomizeRequestActionProps",
255
256
  "getFormValues",
@@ -261,7 +262,6 @@ var __webpack_exports__ = {};
261
262
  "useAssociationCreateActionProps",
262
263
  "useRefreshActionProps",
263
264
  "useUpdateActionProps",
264
- "default",
265
265
  "useResetBlockActionProps",
266
266
  "useDestroyActionProps",
267
267
  "useOptionalFieldList",
@@ -286,6 +286,7 @@ var __webpack_exports__ = {};
286
286
  "useInsertSchema",
287
287
  "getAssociationPath",
288
288
  "useAssociationNames",
289
+ "default",
289
290
  "getBeforeWorkflows",
290
291
  "useCustomizeRequestActionProps",
291
292
  "getFormValues",
@@ -297,7 +298,6 @@ var __webpack_exports__ = {};
297
298
  "useAssociationCreateActionProps",
298
299
  "useRefreshActionProps",
299
300
  "useUpdateActionProps",
300
- "default",
301
301
  "useResetBlockActionProps",
302
302
  "useDestroyActionProps",
303
303
  "useOptionalFieldList",
@@ -322,6 +322,7 @@ var __webpack_exports__ = {};
322
322
  "useInsertSchema",
323
323
  "getAssociationPath",
324
324
  "useAssociationNames",
325
+ "default",
325
326
  "getBeforeWorkflows",
326
327
  "useCustomizeRequestActionProps",
327
328
  "getFormValues",
@@ -333,7 +334,6 @@ var __webpack_exports__ = {};
333
334
  "useAssociationCreateActionProps",
334
335
  "useRefreshActionProps",
335
336
  "useUpdateActionProps",
336
- "default",
337
337
  "useResetBlockActionProps",
338
338
  "useDestroyActionProps",
339
339
  "useOptionalFieldList",
@@ -1439,7 +1439,7 @@ var __webpack_exports__ = {};
1439
1439
  appends.add(append);
1440
1440
  });
1441
1441
  }
1442
- if (null == (_s_xcomponentprops1 = s['x-component-props']) ? void 0 : null == (_s_xcomponentprops_fieldNames = _s_xcomponentprops1.fieldNames) ? void 0 : _s_xcomponentprops_fieldNames.formula) {
1442
+ if ((null == (_s_xcomponentprops1 = s['x-component-props']) ? void 0 : null == (_s_xcomponentprops_fieldNames = _s_xcomponentprops1.fieldNames) ? void 0 : _s_xcomponentprops_fieldNames.formula) && isAssociationField) {
1443
1443
  var _s_xcomponentprops_fieldNames1, _s_xcomponentprops4;
1444
1444
  appends.add(s['name']);
1445
1445
  const regex = /{{(.*?)}}/g;
@@ -25,8 +25,8 @@ var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
27
  MenuItemsProvider: ()=>MenuItemsProvider,
28
- toItems: ()=>toItems,
29
- useMenuItems: ()=>useMenuItems
28
+ useMenuItems: ()=>useMenuItems,
29
+ toItems: ()=>toItems
30
30
  });
31
31
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
32
32
  const external_react_namespaceObject = require("react");
@@ -33,9 +33,9 @@ var __webpack_require__ = {};
33
33
  var __webpack_exports__ = {};
34
34
  __webpack_require__.r(__webpack_exports__);
35
35
  __webpack_require__.d(__webpack_exports__, {
36
- fileXLS: ()=>fileXLS,
37
36
  fileXLSX: ()=>fileXLSX,
38
- fileCSV: ()=>fileCSV
37
+ fileCSV: ()=>fileCSV,
38
+ fileXLS: ()=>fileXLS
39
39
  });
40
40
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
41
41
  const external_react_namespaceObject = require("react");
@@ -78,6 +78,9 @@ var __webpack_modules__ = {
78
78
  "./pinned-list/PluginPinnedList": function(module) {
79
79
  module.exports = require("./pinned-list/PluginPinnedList.js");
80
80
  },
81
+ "./pinned-list": function(module) {
82
+ module.exports = require("./pinned-list/index.js");
83
+ },
81
84
  "./pm": function(module) {
82
85
  module.exports = require("./pm/index.js");
83
86
  },
@@ -173,8 +176,10 @@ var __webpack_exports__ = {};
173
176
  __webpack_require__.d(__webpack_exports__, {
174
177
  AdminLayout: ()=>_admin_layout__WEBPACK_IMPORTED_MODULE_40__.AdminLayout,
175
178
  AdminProvider: ()=>_admin_layout__WEBPACK_IMPORTED_MODULE_40__.AdminProvider,
179
+ AdminTabs: ()=>_admin_layout__WEBPACK_IMPORTED_MODULE_40__.AdminTabs,
176
180
  AppNotFound: ()=>AppNotFound,
177
181
  BuiltInPlugin: ()=>BuiltInPlugin,
182
+ MenuEditor: ()=>_admin_layout__WEBPACK_IMPORTED_MODULE_40__.MenuEditor,
178
183
  NoticeArea: ()=>_admin_layout__WEBPACK_IMPORTED_MODULE_40__.NoticeArea
179
184
  });
180
185
  var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("react/jsx-runtime");
@@ -218,17 +223,34 @@ var __webpack_exports__ = {};
218
223
  var _system_version__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__("./system-version");
219
224
  var _user_settings__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__("./user-settings");
220
225
  var _admin_layout__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__("./admin-layout");
221
- var _context_menu_useContextMenu__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__("./context-menu/useContextMenu");
226
+ var _pinned_list__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__("./pinned-list");
222
227
  var __WEBPACK_REEXPORT_OBJECT__ = {};
223
- for(var __WEBPACK_IMPORT_KEY__ in _context_menu_useContextMenu__WEBPACK_IMPORTED_MODULE_41__)if ([
228
+ for(var __WEBPACK_IMPORT_KEY__ in _pinned_list__WEBPACK_IMPORTED_MODULE_41__)if ([
229
+ "default",
230
+ "AdminTabs",
231
+ "MenuEditor",
232
+ "NoticeArea",
224
233
  "BuiltInPlugin",
225
234
  "AppNotFound",
226
- "default",
227
235
  "AdminProvider",
236
+ "AdminLayout"
237
+ ].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
238
+ return _pinned_list__WEBPACK_IMPORTED_MODULE_41__[key];
239
+ }).bind(0, __WEBPACK_IMPORT_KEY__);
240
+ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
241
+ var _context_menu_useContextMenu__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__("./context-menu/useContextMenu");
242
+ var __WEBPACK_REEXPORT_OBJECT__ = {};
243
+ for(var __WEBPACK_IMPORT_KEY__ in _context_menu_useContextMenu__WEBPACK_IMPORTED_MODULE_42__)if ([
244
+ "default",
245
+ "AdminTabs",
246
+ "MenuEditor",
228
247
  "NoticeArea",
248
+ "BuiltInPlugin",
249
+ "AppNotFound",
250
+ "AdminProvider",
229
251
  "AdminLayout"
230
252
  ].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
231
- return _context_menu_useContextMenu__WEBPACK_IMPORTED_MODULE_41__[key];
253
+ return _context_menu_useContextMenu__WEBPACK_IMPORTED_MODULE_42__[key];
232
254
  }).bind(0, __WEBPACK_IMPORT_KEY__);
233
255
  __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
234
256
  function _tagged_template_literal(strings, raw) {
@@ -689,14 +711,18 @@ var __webpack_exports__ = {};
689
711
  })();
690
712
  exports.AdminLayout = __webpack_exports__.AdminLayout;
691
713
  exports.AdminProvider = __webpack_exports__.AdminProvider;
714
+ exports.AdminTabs = __webpack_exports__.AdminTabs;
692
715
  exports.AppNotFound = __webpack_exports__.AppNotFound;
693
716
  exports.BuiltInPlugin = __webpack_exports__.BuiltInPlugin;
717
+ exports.MenuEditor = __webpack_exports__.MenuEditor;
694
718
  exports.NoticeArea = __webpack_exports__.NoticeArea;
695
719
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
696
720
  "AdminLayout",
697
721
  "AdminProvider",
722
+ "AdminTabs",
698
723
  "AppNotFound",
699
724
  "BuiltInPlugin",
725
+ "MenuEditor",
700
726
  "NoticeArea"
701
727
  ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
702
728
  Object.defineProperty(exports, '__esModule', {
@@ -24,9 +24,9 @@ var __webpack_require__ = {};
24
24
  var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
- default: ()=>pm,
28
27
  PMPlugin: ()=>PMPlugin,
29
28
  SettingsCenterDropdown: ()=>SettingsCenterDropdown_js_namespaceObject.SettingsCenterDropdown,
29
+ default: ()=>pm,
30
30
  PluginManager: ()=>external_PluginManager_js_namespaceObject.PluginManager,
31
31
  AdminSettingsLayout: ()=>AdminSettings_js_namespaceObject.AdminSettingsLayout,
32
32
  SettingsCenterContext: ()=>AdminSettings_js_namespaceObject.SettingsCenterContext