@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,133 @@
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
+ inputPreviewComponentFieldSettings: ()=>inputPreviewComponentFieldSettings
28
+ });
29
+ const schema_namespaceObject = require("@tachybase/schema");
30
+ const external_react_i18next_namespaceObject = require("react-i18next");
31
+ const SchemaSettings_js_namespaceObject = require("../../../../application/schema-settings/SchemaSettings.js");
32
+ const index_js_namespaceObject = require("../../../../schema-component/index.js");
33
+ const createSettingsItem = (config)=>({
34
+ name: config.name,
35
+ type: 'select',
36
+ useComponentProps () {
37
+ var _fieldSchema_xcomponentprops;
38
+ const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
39
+ const field = (0, schema_namespaceObject.useField)();
40
+ const schema = (0, schema_namespaceObject.useFieldSchema)();
41
+ const { fieldSchema: tableColumnSchema } = (0, index_js_namespaceObject.useColumnSchema)();
42
+ const fieldSchema = tableColumnSchema || schema;
43
+ const { dn } = (0, index_js_namespaceObject.useDesignable)();
44
+ return {
45
+ title: t(config.title),
46
+ options: config.options(t),
47
+ value: (null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops[config.name]) || config.defaultValue,
48
+ onChange (value) {
49
+ const schema = {
50
+ ['x-uid']: fieldSchema['x-uid']
51
+ };
52
+ fieldSchema['x-component-props'] = fieldSchema['x-component-props'] || {};
53
+ fieldSchema['x-component-props'][config.name] = value;
54
+ schema['x-component-props'] = fieldSchema['x-component-props'];
55
+ field.componentProps = field.componentProps || {};
56
+ field.componentProps[config.name] = value;
57
+ dn.emit('patch', {
58
+ schema
59
+ });
60
+ }
61
+ };
62
+ }
63
+ });
64
+ const getSizeOptions = (t)=>[
65
+ {
66
+ value: 'small',
67
+ label: t('Small')
68
+ },
69
+ {
70
+ value: 'middle',
71
+ label: t('Middle')
72
+ },
73
+ {
74
+ value: 'large',
75
+ label: t('Large')
76
+ },
77
+ {
78
+ value: 'oversized',
79
+ label: t('Oversized')
80
+ },
81
+ {
82
+ value: 'auto',
83
+ label: t('Auto')
84
+ }
85
+ ];
86
+ const getObjectFitOptions = (t)=>[
87
+ {
88
+ value: 'cover',
89
+ label: t('Cover')
90
+ },
91
+ {
92
+ value: 'fill',
93
+ label: t('Fill')
94
+ },
95
+ {
96
+ value: 'contain',
97
+ label: t('Contain')
98
+ },
99
+ {
100
+ value: 'scale-down',
101
+ label: t('Scale Down')
102
+ },
103
+ {
104
+ value: 'none',
105
+ label: t('None')
106
+ }
107
+ ];
108
+ const size = createSettingsItem({
109
+ name: 'size',
110
+ title: 'Size',
111
+ options: getSizeOptions,
112
+ defaultValue: 'small'
113
+ });
114
+ const objectFit = createSettingsItem({
115
+ name: 'objectFit',
116
+ title: 'Object Fit',
117
+ options: getObjectFitOptions,
118
+ defaultValue: 'cover'
119
+ });
120
+ const inputPreviewComponentFieldSettings = new SchemaSettings_js_namespaceObject.SchemaSettings({
121
+ name: 'fieldSettings:component:Input.Preview',
122
+ items: [
123
+ size,
124
+ objectFit
125
+ ]
126
+ });
127
+ exports.inputPreviewComponentFieldSettings = __webpack_exports__.inputPreviewComponentFieldSettings;
128
+ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
129
+ "inputPreviewComponentFieldSettings"
130
+ ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
131
+ Object.defineProperty(exports, '__esModule', {
132
+ value: true
133
+ });
@@ -0,0 +1,98 @@
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
+ multipleComponentFieldSettings: ()=>multipleComponentFieldSettings
28
+ });
29
+ const schema_namespaceObject = require("@tachybase/schema");
30
+ const external_react_i18next_namespaceObject = require("react-i18next");
31
+ const SchemaSettings_js_namespaceObject = require("../../../../application/schema-settings/SchemaSettings.js");
32
+ const index_js_namespaceObject = require("../../../../collection-manager/index.js");
33
+ const external_data_source_index_js_namespaceObject = require("../../../../data-source/index.js");
34
+ const external_schema_component_index_js_namespaceObject = require("../../../../schema-component/index.js");
35
+ const Table_Column_Decorator_js_namespaceObject = require("../../../../schema-component/antd/table-v2/Table.Column.Decorator.js");
36
+ const multipleComponentFieldSettings = new SchemaSettings_js_namespaceObject.SchemaSettings({
37
+ name: 'fieldSettings:component:multiple',
38
+ items: [
39
+ {
40
+ name: 'fieldComponent',
41
+ type: 'select',
42
+ useComponentProps () {
43
+ var _collectionInterface_componentOptions_filter, _collectionInterface_componentOptions, _fieldSchema_xcomponentprops;
44
+ const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
45
+ const field = (0, schema_namespaceObject.useField)();
46
+ const { fieldSchema: tableColumnSchema } = (0, Table_Column_Decorator_js_namespaceObject.useColumnSchema)();
47
+ const { getCollectionJoinField } = (0, index_js_namespaceObject.useCollectionManager_deprecated)();
48
+ const dm = (0, external_data_source_index_js_namespaceObject.useDataSourceManager)();
49
+ const schema = (0, schema_namespaceObject.useFieldSchema)();
50
+ const fieldSchema = tableColumnSchema || schema;
51
+ const collectionField = getCollectionJoinField(fieldSchema['x-collection-field']);
52
+ const collectionInterface = dm.collectionFieldInterfaceManager.getFieldInterface(null == collectionField ? void 0 : collectionField.interface);
53
+ const compile = (0, external_schema_component_index_js_namespaceObject.useCompile)();
54
+ const fieldModeOptions = [
55
+ {
56
+ label: t('Select'),
57
+ value: 'multiple'
58
+ }
59
+ ];
60
+ null == collectionInterface || null == (_collectionInterface_componentOptions = collectionInterface.componentOptions) || null == (_collectionInterface_componentOptions_filter = _collectionInterface_componentOptions.filter((item)=>!item.useVisible || item.useVisible())) || _collectionInterface_componentOptions_filter.forEach((item)=>{
61
+ if (!(null == fieldModeOptions ? void 0 : fieldModeOptions.find((modeItem)=>modeItem.value === item.value))) null == fieldModeOptions || fieldModeOptions.push({
62
+ label: compile(item.label),
63
+ value: item.value
64
+ });
65
+ });
66
+ const { dn } = (0, external_schema_component_index_js_namespaceObject.useDesignable)();
67
+ return {
68
+ title: t('Field component'),
69
+ options: fieldModeOptions,
70
+ value: (null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops.mode) || 'multiple',
71
+ onChange (mode) {
72
+ const schema = {
73
+ ['x-uid']: fieldSchema['x-uid']
74
+ };
75
+ fieldSchema['x-component-props'] = fieldSchema['x-component-props'] || {};
76
+ fieldSchema['x-component-props']['mode'] = mode;
77
+ fieldSchema['x-component-props']['multiple'] = true;
78
+ schema['x-component-props'] = fieldSchema['x-component-props'];
79
+ field.componentProps = field.componentProps || {};
80
+ field.componentProps.mode = mode;
81
+ field.componentProps.multiple = true;
82
+ dn.emit('patch', {
83
+ schema
84
+ });
85
+ dn.refresh();
86
+ }
87
+ };
88
+ }
89
+ }
90
+ ]
91
+ });
92
+ exports.multipleComponentFieldSettings = __webpack_exports__.multipleComponentFieldSettings;
93
+ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
94
+ "multipleComponentFieldSettings"
95
+ ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
96
+ Object.defineProperty(exports, '__esModule', {
97
+ value: true
98
+ });
@@ -29,7 +29,9 @@ __webpack_require__.d(__webpack_exports__, {
29
29
  const schema_namespaceObject = require("@tachybase/schema");
30
30
  const external_react_i18next_namespaceObject = require("react-i18next");
31
31
  const SchemaSettings_js_namespaceObject = require("../../../../application/schema-settings/SchemaSettings.js");
32
- const index_js_namespaceObject = require("../../../../schema-component/index.js");
32
+ const index_js_namespaceObject = require("../../../../collection-manager/index.js");
33
+ const external_data_source_index_js_namespaceObject = require("../../../../data-source/index.js");
34
+ const external_schema_component_index_js_namespaceObject = require("../../../../schema-component/index.js");
33
35
  const Table_Column_Decorator_js_namespaceObject = require("../../../../schema-component/antd/table-v2/Table.Column.Decorator.js");
34
36
  const radioComponentFieldSettings = new SchemaSettings_js_namespaceObject.SchemaSettings({
35
37
  name: 'fieldSettings:component:Radio group',
@@ -38,7 +40,7 @@ const radioComponentFieldSettings = new SchemaSettings_js_namespaceObject.Schema
38
40
  name: 'fieldComponent',
39
41
  type: 'select',
40
42
  useComponentProps () {
41
- var _fieldSchema_xcomponentprops;
43
+ var _collectionInterface_componentOptions_filter, _collectionInterface_componentOptions, _fieldSchema_xcomponentprops;
42
44
  const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
43
45
  const field = (0, schema_namespaceObject.useField)();
44
46
  const { fieldSchema: tableColumnSchema } = (0, Table_Column_Decorator_js_namespaceObject.useColumnSchema)();
@@ -54,7 +56,18 @@ const radioComponentFieldSettings = new SchemaSettings_js_namespaceObject.Schema
54
56
  value: 'Radio group'
55
57
  }
56
58
  ];
57
- const { dn } = (0, index_js_namespaceObject.useDesignable)();
59
+ const dm = (0, external_data_source_index_js_namespaceObject.useDataSourceManager)();
60
+ const { getCollectionJoinField } = (0, index_js_namespaceObject.useCollectionManager_deprecated)();
61
+ const collectionField = getCollectionJoinField(fieldSchema['x-collection-field']);
62
+ const collectionInterface = dm.collectionFieldInterfaceManager.getFieldInterface(null == collectionField ? void 0 : collectionField.interface);
63
+ const compile = (0, external_schema_component_index_js_namespaceObject.useCompile)();
64
+ const { dn } = (0, external_schema_component_index_js_namespaceObject.useDesignable)();
65
+ null == collectionInterface || null == (_collectionInterface_componentOptions = collectionInterface.componentOptions) || null == (_collectionInterface_componentOptions_filter = _collectionInterface_componentOptions.filter((item)=>!item.useVisible || item.useVisible())) || _collectionInterface_componentOptions_filter.forEach((item)=>{
66
+ if (!(null == fieldModeOptions ? void 0 : fieldModeOptions.find((modeItem)=>modeItem.value === item.value))) null == fieldModeOptions || fieldModeOptions.push({
67
+ label: compile(item.label),
68
+ value: item.value
69
+ });
70
+ });
58
71
  return {
59
72
  title: t('Field component'),
60
73
  options: fieldModeOptions,
@@ -317,6 +317,7 @@ const fieldComponent = {
317
317
  name: 'fieldComponent',
318
318
  type: 'select',
319
319
  useComponentProps () {
320
+ var _collectionInterface_componentOptions_filter, _collectionInterface_componentOptions;
320
321
  const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
321
322
  const field = (0, schema_namespaceObject.useField)();
322
323
  const collectionFieldCurrent = (0, external_data_source_index_js_namespaceObject.useCollectionField)();
@@ -331,7 +332,8 @@ const fieldComponent = {
331
332
  const fieldMode = (0, useFieldComponentName_js_namespaceObject.useFieldComponentName)();
332
333
  const { dn } = (0, external_schema_component_index_js_namespaceObject.useDesignable)();
333
334
  const isMuiltipleSelect = [
334
- 'select'
335
+ 'select',
336
+ 'multipleSelect'
335
337
  ].includes(null == collectionFieldCurrent ? void 0 : collectionFieldCurrent.interface);
336
338
  const optionsMuiltipleSelect = [
337
339
  {
@@ -343,9 +345,27 @@ const fieldComponent = {
343
345
  value: 'Radio group'
344
346
  }
345
347
  ];
348
+ if ((null == collectionFieldCurrent ? void 0 : collectionFieldCurrent.interface) === 'multipleSelect') {
349
+ const index = optionsMuiltipleSelect.findIndex((item)=>'Radio group' === item.value);
350
+ optionsMuiltipleSelect.splice(index, 1);
351
+ }
352
+ const dm = (0, external_data_source_index_js_namespaceObject.useDataSourceManager)();
353
+ const collectionInterface = dm.collectionFieldInterfaceManager.getFieldInterface(null == collectionFieldCurrent ? void 0 : collectionFieldCurrent.interface);
354
+ const compile = (0, external_schema_component_index_js_namespaceObject.useCompile)();
355
+ if (fieldSchema['x-component-props']['multiple']) {
356
+ const index = fieldModeOptions.findIndex((item)=>'Radio group' === item.value);
357
+ fieldModeOptions.splice(index, 1);
358
+ }
359
+ const componentOptions = isMuiltipleSelect ? optionsMuiltipleSelect : fieldModeOptions;
360
+ null == collectionInterface || null == (_collectionInterface_componentOptions = collectionInterface.componentOptions) || null == (_collectionInterface_componentOptions_filter = _collectionInterface_componentOptions.filter((item)=>!item.useVisible || item.useVisible())) || _collectionInterface_componentOptions_filter.forEach((item)=>{
361
+ if (!(null == componentOptions ? void 0 : componentOptions.find((modeItem)=>modeItem.value === item.value))) null == componentOptions || componentOptions.push({
362
+ label: compile(item.label),
363
+ value: item.value
364
+ });
365
+ });
346
366
  return {
347
367
  title: t('Field component'),
348
- options: isMuiltipleSelect ? optionsMuiltipleSelect : fieldModeOptions,
368
+ options: componentOptions,
349
369
  value: fieldMode,
350
370
  onChange (mode) {
351
371
  const schema = {
@@ -436,8 +456,7 @@ const selectComponentFieldSettings = new SchemaSettings_js_namespaceObject.Schem
436
456
  name: 'fieldSettings:component:Select',
437
457
  items: [
438
458
  {
439
- ...fieldComponent,
440
- useVisible: FormItem_Settings_js_namespaceObject.useIsMuiltipleAble
459
+ ...fieldComponent
441
460
  },
442
461
  {
443
462
  ...setTheDataScope,
@@ -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: ()=>Action_Container,
28
- ActionContainer: ()=>ActionContainer
27
+ ActionContainer: ()=>ActionContainer,
28
+ default: ()=>Action_Container
29
29
  });
30
30
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
31
31
  require("react");
@@ -34,8 +34,8 @@ var __webpack_exports__ = {};
34
34
  __webpack_require__.r(__webpack_exports__);
35
35
  __webpack_require__.d(__webpack_exports__, {
36
36
  Amplifier: ()=>Amplifier,
37
- default: ()=>Action_Modal,
38
- ActionModal: ()=>ActionModal
37
+ ActionModal: ()=>ActionModal,
38
+ default: ()=>Action_Modal
39
39
  });
40
40
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
41
41
  const external_react_namespaceObject = require("react");
@@ -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: ()=>Action_Sheet,
37
- ActionSheet: ()=>ActionSheet
36
+ ActionSheet: ()=>ActionSheet,
37
+ default: ()=>Action_Sheet
38
38
  });
39
39
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
40
40
  require("react");
@@ -80,7 +80,7 @@ const ReadPrettyInternalViewer = (0, schema_namespaceObject.observer)((props)=>{
80
80
  const isTreeCollection = (null == targetCollection ? void 0 : targetCollection.template) === 'tree';
81
81
  const ellipsisWithTooltipRef = (0, external_react_namespaceObject.useRef)();
82
82
  const getLabelUiSchema = (0, external_util_js_namespaceObject.useLabelUiSchemaV2)();
83
- const { formulaRecord, fieldNames } = customTitle(recordCtx, fieldSchema, defFieldNames);
83
+ const { formulaRecord, fieldNames } = (0, external_hooks_js_namespaceObject.useCustomTitle)(recordCtx, fieldSchema, defFieldNames);
84
84
  const renderRecords = ()=>(0, schema_namespaceObject.toArr)(formulaRecord[fieldSchema['name']] || props.value).map((record, index, arr)=>{
85
85
  var _getCollection_options, _getCollection, _targetCollection_fieldsMap_, _targetCollection_fieldsMap, _getCollection_options1, _getCollection1, _targetCollection_fieldsMap_1, _targetCollection_fieldsMap1;
86
86
  const value = null == record ? void 0 : record[(null == fieldNames ? void 0 : fieldNames.label) || 'label'];
@@ -173,60 +173,6 @@ const ReadPrettyInternalViewer = (0, schema_namespaceObject.observer)((props)=>{
173
173
  }, {
174
174
  displayName: 'ReadPrettyInternalViewer'
175
175
  });
176
- const customTitle = (record, schema, fieldNames)=>{
177
- var _schema_xcomponentprops, _schema_xcomponentprops_fieldNames, _schema_xcomponentprops1;
178
- if ((null == (_schema_xcomponentprops = schema['x-component-props']) ? void 0 : _schema_xcomponentprops.mode) === 'CustomTitle' && (null == (_schema_xcomponentprops1 = schema['x-component-props']) ? void 0 : null == (_schema_xcomponentprops_fieldNames = _schema_xcomponentprops1.fieldNames) ? void 0 : _schema_xcomponentprops_fieldNames.formula)) {
179
- var _schema_xcomponentprops_fieldNames1, _schema_xcomponentprops2;
180
- const regex = /{{(.*?)}}/g;
181
- const valueOject = {};
182
- let outputStr = '';
183
- let match;
184
- const formula = null == (_schema_xcomponentprops2 = schema['x-component-props']) ? void 0 : null == (_schema_xcomponentprops_fieldNames1 = _schema_xcomponentprops2.fieldNames) ? void 0 : _schema_xcomponentprops_fieldNames1.formula;
185
- while(match = regex.exec(formula))if (match[1].includes('.')) {
186
- const fieldList = [
187
- schema.name
188
- ];
189
- fieldList.push(...match[1].split('.'));
190
- const result = {
191
- currRecord: record,
192
- value: ''
193
- };
194
- fieldList.forEach((value, index)=>{
195
- var _result_currRecord;
196
- if (fieldList.length - 1 !== index) {
197
- var _result_currRecord1;
198
- result.currRecord = null == (_result_currRecord1 = result.currRecord) ? void 0 : _result_currRecord1[value];
199
- return;
200
- }
201
- result.value = null == (_result_currRecord = result.currRecord) ? void 0 : _result_currRecord[value];
202
- });
203
- var _result_value;
204
- valueOject[match[1]] = null != (_result_value = result.value) ? _result_value : '';
205
- } else {
206
- var _record_schema_name;
207
- valueOject[match[1]] = (null == (_record_schema_name = record[schema['name']]) ? void 0 : _record_schema_name[match[1]]) || '';
208
- }
209
- outputStr = replacePlaceholders(formula, valueOject);
210
- record[schema['name']] = {
211
- ...record[schema['name']],
212
- customLabel: outputStr
213
- };
214
- return {
215
- formulaRecord: record,
216
- fieldNames: {
217
- ...fieldNames,
218
- label: 'customLabel'
219
- }
220
- };
221
- }
222
- return {
223
- formulaRecord: record,
224
- fieldNames
225
- };
226
- };
227
- const replacePlaceholders = (inputStr, values)=>inputStr.replace(/{{(.*?)}}/g, function(match, placeholder) {
228
- return Object.prototype.hasOwnProperty.call(values, placeholder) ? values[placeholder] : match;
229
- });
230
176
  exports.ReadPrettyInternalViewer = __webpack_exports__.ReadPrettyInternalViewer;
231
177
  exports.isObject = __webpack_exports__.isObject;
232
178
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
@@ -34,6 +34,7 @@ var __webpack_exports__ = {};
34
34
  __webpack_require__.r(__webpack_exports__);
35
35
  __webpack_require__.d(__webpack_exports__, {
36
36
  useAssociationFieldContext: ()=>useAssociationFieldContext,
37
+ useCustomTitle: ()=>useCustomTitle,
37
38
  default: ()=>useServiceOptions,
38
39
  SubFormProvider: ()=>SubFormProvider,
39
40
  useSubFormValue: ()=>useSubFormValue,
@@ -191,9 +192,61 @@ const useSubFormValue = ()=>{
191
192
  collection
192
193
  };
193
194
  };
195
+ const useCustomTitle = (record, schema, fieldNames)=>{
196
+ var _schema_xcomponentprops, _schema_xcomponentprops_fieldNames, _schema_xcomponentprops1;
197
+ if ((null == (_schema_xcomponentprops = schema['x-component-props']) ? void 0 : _schema_xcomponentprops.mode) === 'CustomTitle' && (null == (_schema_xcomponentprops1 = schema['x-component-props']) ? void 0 : null == (_schema_xcomponentprops_fieldNames = _schema_xcomponentprops1.fieldNames) ? void 0 : _schema_xcomponentprops_fieldNames.formula)) {
198
+ if (Array.isArray(record[schema['name']])) record[schema['name']].forEach((recordItem)=>{
199
+ recordItem['customLabel'] = getCustomLabel(recordItem, schema);
200
+ });
201
+ else record[schema['name']]['customLabel'] = getCustomLabel(record[schema['name']], schema);
202
+ return {
203
+ formulaRecord: record,
204
+ fieldNames: {
205
+ ...fieldNames,
206
+ label: 'customLabel'
207
+ }
208
+ };
209
+ }
210
+ return {
211
+ formulaRecord: record,
212
+ fieldNames
213
+ };
214
+ };
215
+ const getCustomLabel = (record, schema)=>{
216
+ var _schema_xcomponentprops_fieldNames, _schema_xcomponentprops;
217
+ const regex = /{{(.*?)}}/g;
218
+ const valueOject = {};
219
+ let outputStr = '';
220
+ let match;
221
+ const formula = null == (_schema_xcomponentprops = schema['x-component-props']) ? void 0 : null == (_schema_xcomponentprops_fieldNames = _schema_xcomponentprops.fieldNames) ? void 0 : _schema_xcomponentprops_fieldNames.formula;
222
+ while(match = regex.exec(formula))if (match[1].includes('.')) {
223
+ const fieldList = match[1].split('.');
224
+ const result = {
225
+ currRecord: record,
226
+ value: ''
227
+ };
228
+ fieldList.forEach((value, index)=>{
229
+ var _result_currRecord;
230
+ if (fieldList.length - 1 !== index) {
231
+ var _result_currRecord1;
232
+ result.currRecord = null == (_result_currRecord1 = result.currRecord) ? void 0 : _result_currRecord1[value];
233
+ return;
234
+ }
235
+ result.value = null == (_result_currRecord = result.currRecord) ? void 0 : _result_currRecord[value];
236
+ });
237
+ var _result_value;
238
+ valueOject[match[1]] = null != (_result_value = result.value) ? _result_value : '';
239
+ } else valueOject[match[1]] = record[match[1]] || '';
240
+ outputStr = replacePlaceholders(formula, valueOject);
241
+ return outputStr;
242
+ };
243
+ const replacePlaceholders = (inputStr, values)=>inputStr.replace(/{{(.*?)}}/g, function(match, placeholder) {
244
+ return Object.prototype.hasOwnProperty.call(values, placeholder) ? values[placeholder] : match;
245
+ });
194
246
  exports.SubFormProvider = __webpack_exports__.SubFormProvider;
195
247
  exports["default"] = __webpack_exports__["default"];
196
248
  exports.useAssociationFieldContext = __webpack_exports__.useAssociationFieldContext;
249
+ exports.useCustomTitle = __webpack_exports__.useCustomTitle;
197
250
  exports.useFieldNames = __webpack_exports__.useFieldNames;
198
251
  exports.useInsertSchema = __webpack_exports__.useInsertSchema;
199
252
  exports.useSubFormValue = __webpack_exports__.useSubFormValue;
@@ -201,6 +254,7 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
201
254
  "SubFormProvider",
202
255
  "default",
203
256
  "useAssociationFieldContext",
257
+ "useCustomTitle",
204
258
  "useFieldNames",
205
259
  "useInsertSchema",
206
260
  "useSubFormValue"
@@ -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",
@@ -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];
@@ -50,7 +50,8 @@ const Input = Object.assign((0, schema_namespaceObject.connect)(external_antd_na
50
50
  })), (0, schema_namespaceObject.mapReadPretty)(external_ReadPretty_js_namespaceObject.ReadPretty.TextArea)),
51
51
  URL: (0, schema_namespaceObject.connect)(external_antd_namespaceObject.Input, (0, schema_namespaceObject.mapReadPretty)(external_ReadPretty_js_namespaceObject.ReadPretty.URL)),
52
52
  JSON: (0, schema_namespaceObject.connect)(external_Json_js_namespaceObject.Json, (0, schema_namespaceObject.mapReadPretty)(external_ReadPretty_js_namespaceObject.ReadPretty.JSON)),
53
- ReadPretty: external_ReadPretty_js_namespaceObject.ReadPretty.Input
53
+ ReadPretty: external_ReadPretty_js_namespaceObject.ReadPretty.Input,
54
+ Preview: external_ReadPretty_js_namespaceObject.ReadPretty.Preview
54
55
  });
55
56
  const input_Input = Input;
56
57
  exports.Input = __webpack_exports__.Input;