@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.
- package/es/application/Application.mjs +1 -9
- package/es/application/components/index.d.ts +0 -2
- package/es/application/components/index.mjs +0 -2
- package/es/application/schema-initializer/context/index.d.ts +1 -1
- package/es/application/utils/globalDeps.mjs +1 -1
- package/es/block-provider/hooks/index.mjs +1 -1
- package/es/built-in/index.d.ts +2 -1
- package/es/built-in/index.mjs +3 -2
- package/es/collection-manager/Configuration/components/Summary.mjs +3 -3
- package/es/collection-manager/collectionPlugin.mjs +36 -0
- package/es/collection-manager/interfaces/url.d.ts +4 -0
- package/es/collection-manager/interfaces/url.mjs +10 -1
- package/es/collection-manager/templates/sql.d.ts +3 -3
- package/es/collection-manager/templates/view.d.ts +3 -3
- package/es/data-source/collection-field-interface/CollectionFieldInterface.mjs +1 -15
- package/es/flag-provider/FlagProvider.d.ts +1 -0
- package/es/flag-provider/hooks/useFlag.mjs +1 -1
- package/es/modules/blocks/data-blocks/form/fieldSettingsFormItem.mjs +1 -4
- package/es/modules/blocks/data-blocks/table/hooks/useTableBlockProps.mjs +14 -2
- package/es/modules/blocks/data-blocks/table/tableColumnSettings.mjs +1 -3
- package/es/modules/blocks/filter-blocks/collapse/filterCollapseItemFieldSettings.mjs +0 -4
- package/es/modules/blocks/filter-blocks/form/filterFormItemFieldSettings.mjs +0 -4
- package/es/modules/fields/component/CustomTitle/customTitleComponentFieldSettings.mjs +95 -5
- package/es/modules/fields/component/InputPreview/inputPreviewComponentFieldSettings.d.ts +2 -0
- package/es/modules/fields/component/InputPreview/inputPreviewComponentFieldSettings.mjs +99 -0
- package/es/modules/fields/component/MultipleSelect/multipleSelectComponentFieldSettings.d.ts +2 -0
- package/es/modules/fields/component/MultipleSelect/multipleSelectComponentFieldSettings.mjs +64 -0
- package/es/modules/fields/component/Radio/radioComponentFieldSettings.mjs +15 -2
- package/es/modules/fields/component/Select/selectComponentFieldSettings.mjs +26 -7
- package/es/schema-component/antd/association-field/InternalViewer.mjs +4 -58
- package/es/schema-component/antd/association-field/hooks.d.ts +4 -0
- package/es/schema-component/antd/association-field/hooks.mjs +52 -1
- package/es/schema-component/antd/color-select/ColorSelect.mjs +3 -3
- package/es/schema-component/antd/date-picker/util.d.ts +13 -0
- package/es/schema-component/antd/date-picker/util.mjs +14 -1
- package/es/schema-component/antd/input/Input.mjs +2 -1
- package/es/schema-component/antd/input/ReadPretty.d.ts +1 -0
- package/es/schema-component/antd/input/ReadPretty.mjs +29 -1
- package/es/schema-component/antd/markdown/Markdown.mjs +4 -4
- package/es/schema-component/antd/page/Page.Settings.mjs +0 -33
- package/es/schema-component/antd/page/Page.mjs +46 -95
- package/es/schema-component/antd/page/hooks/index.d.ts +1 -1
- package/es/schema-component/antd/page/hooks/index.mjs +1 -1
- package/es/schema-component/antd/page/index.d.ts +1 -0
- package/es/schema-component/antd/page/index.mjs +1 -0
- package/es/schema-component/antd/page/pageExtendComponentProvider.d.ts +3 -0
- package/es/schema-component/antd/page/pageExtendComponentProvider.mjs +9 -0
- package/es/schema-component/antd/page/style.d.ts +0 -5
- package/es/schema-component/antd/page/style.mjs +1 -45
- package/es/schema-component/antd/password/utils.d.ts +1 -1
- package/es/schema-component/antd/select/FormulaSelect.mjs +16 -4
- package/es/schema-component/antd/select/ReadPretty.mjs +16 -3
- package/es/schema-component/antd/select/Select.mjs +6 -1
- package/es/schema-component/hooks/useFieldModeOptions.mjs +13 -10
- package/es/schema-settings/EditFormulaTitleField.mjs +19 -1
- package/es/schema-settings/SchemaSettingsDefaultValue.mjs +3 -2
- package/es/schema-settings/SchemaSettingsPlugin.mjs +4 -0
- package/es/schema-settings/VariableInput/hooks/index.d.ts +1 -0
- package/es/schema-settings/VariableInput/hooks/index.mjs +1 -0
- package/es/schema-settings/VariableInput/hooks/useExactDateVariable.d.ts +93 -0
- package/es/schema-settings/VariableInput/hooks/useExactDateVariable.mjs +75 -0
- package/es/schema-settings/VariableInput/hooks/useVariableOptions.mjs +11 -1
- package/es/user/ChangePassword.mjs +109 -6
- package/es/user/index.d.ts +1 -0
- package/es/user/index.mjs +2 -0
- package/es/variables/hooks/useBuiltinVariables.mjs +8 -2
- package/lib/application/Application.js +0 -8
- package/lib/application/components/index.js +0 -18
- package/lib/block-provider/hooks/index.js +5 -5
- package/lib/built-in/acl/Configuration/MenuItemsProvider.js +2 -2
- package/lib/built-in/attachment-preview/previewers/file-sheet.js +2 -2
- package/lib/built-in/index.js +30 -4
- package/lib/built-in/pm/index.js +1 -1
- package/lib/collection-manager/Configuration/components/Summary.js +3 -3
- package/lib/collection-manager/collectionPlugin.js +36 -0
- package/lib/collection-manager/index.js +17 -17
- package/lib/collection-manager/interfaces/url.js +10 -1
- package/lib/data-source/collection-field-interface/CollectionFieldInterface.js +1 -15
- package/lib/flag-provider/hooks/useFlag.js +1 -1
- package/lib/icon/Icon.js +2 -2
- package/lib/locale/zh-CN.js +6 -0
- package/lib/modules/blocks/data-blocks/form/fieldSettingsFormItem.js +0 -3
- package/lib/modules/blocks/data-blocks/table/hooks/useTableBlockProps.js +14 -2
- package/lib/modules/blocks/data-blocks/table/tableColumnSettings.js +1 -3
- package/lib/modules/blocks/filter-blocks/collapse/filterCollapseItemFieldSettings.js +0 -4
- package/lib/modules/blocks/filter-blocks/form/filterFormItemFieldSettings.js +0 -4
- package/lib/modules/fields/component/CustomTitle/customTitleComponentFieldSettings.js +93 -3
- package/lib/modules/fields/component/InputPreview/inputPreviewComponentFieldSettings.js +133 -0
- package/lib/modules/fields/component/MultipleSelect/multipleSelectComponentFieldSettings.js +98 -0
- package/lib/modules/fields/component/Radio/radioComponentFieldSettings.js +16 -3
- package/lib/modules/fields/component/Select/selectComponentFieldSettings.js +23 -4
- package/lib/schema-component/antd/action/Action.Container.js +2 -2
- package/lib/schema-component/antd/action/Action.Modal.js +2 -2
- package/lib/schema-component/antd/action/Action.Sheet.js +2 -2
- package/lib/schema-component/antd/association-field/InternalViewer.js +1 -55
- package/lib/schema-component/antd/association-field/hooks.js +54 -0
- package/lib/schema-component/antd/color-select/ColorSelect.js +4 -4
- package/lib/schema-component/antd/date-picker/util.js +16 -0
- package/lib/schema-component/antd/form-tab/index.js +2 -2
- package/lib/schema-component/antd/form-v2/index.js +2 -2
- package/lib/schema-component/antd/input/Input.js +2 -1
- package/lib/schema-component/antd/input/ReadPretty.js +28 -0
- package/lib/schema-component/antd/markdown/Markdown.js +5 -5
- package/lib/schema-component/antd/page/Page.Settings.js +0 -33
- package/lib/schema-component/antd/page/Page.js +41 -90
- package/lib/schema-component/antd/page/hooks/index.js +5 -5
- package/lib/schema-component/antd/page/index.js +9 -0
- package/lib/{application/components/ShareSchemaComponent.js → schema-component/antd/page/pageExtendComponentProvider.js} +15 -10
- package/lib/schema-component/antd/page/style.js +2 -49
- package/lib/schema-component/antd/scroll-area/ScrollArea.js +2 -2
- package/lib/schema-component/antd/select/FormulaSelect.js +16 -4
- package/lib/schema-component/antd/select/ReadPretty.js +15 -2
- package/lib/schema-component/antd/select/Select.js +6 -1
- package/lib/schema-component/antd/table-v2/index.js +3 -3
- package/lib/schema-component/antd/upload/shared.js +4 -4
- package/lib/schema-component/hooks/useFieldModeOptions.js +13 -10
- package/lib/schema-settings/EditFormulaTitleField.js +19 -1
- package/lib/schema-settings/SchemaSettingsDefaultValue.js +3 -2
- package/lib/schema-settings/SchemaSettingsPlugin.js +4 -0
- package/lib/schema-settings/VariableInput/hooks/index.js +9 -0
- package/lib/schema-settings/VariableInput/hooks/useExactDateVariable.js +112 -0
- package/lib/schema-settings/VariableInput/hooks/useVariableOptions.js +11 -1
- package/lib/user/ChangePassword.js +118 -5
- package/lib/user/index.js +24 -4
- package/lib/variables/VariablesProvider.js +2 -2
- package/lib/variables/hooks/useBuiltinVariables.js +7 -1
- package/package.json +10 -10
- package/es/application/components/SharePage.d.ts +0 -4
- package/es/application/components/SharePage.mjs +0 -113
- package/es/application/components/ShareSchemaComponent.d.ts +0 -1
- package/es/application/components/ShareSchemaComponent.mjs +0 -10
- package/es/schema-component/antd/page/hooks/useShareActions.d.ts +0 -7
- package/es/schema-component/antd/page/hooks/useShareActions.mjs +0 -242
- package/lib/application/components/SharePage.js +0 -156
- package/lib/schema-component/antd/page/hooks/useShareActions.js +0 -286
|
@@ -24,7 +24,7 @@ var __webpack_require__ = {};
|
|
|
24
24
|
var __webpack_exports__ = {};
|
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
default: ()=>
|
|
27
|
+
default: ()=>Summary
|
|
28
28
|
});
|
|
29
29
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
30
|
const external_react_namespaceObject = require("react");
|
|
@@ -32,7 +32,7 @@ const schema_namespaceObject = require("@tachybase/schema");
|
|
|
32
32
|
const external_antd_namespaceObject = require("antd");
|
|
33
33
|
const external_antd_style_namespaceObject = require("antd-style");
|
|
34
34
|
const index_js_namespaceObject = require("../../../schema-component/index.js");
|
|
35
|
-
const
|
|
35
|
+
const Summary_Summary = (0, schema_namespaceObject.observer)((props)=>{
|
|
36
36
|
const { schema, label } = props;
|
|
37
37
|
const compile = (0, index_js_namespaceObject.useCompile)();
|
|
38
38
|
const token = (0, external_antd_style_namespaceObject.useAntdToken)();
|
|
@@ -85,7 +85,7 @@ const Summary = (0, schema_namespaceObject.observer)((props)=>{
|
|
|
85
85
|
}, {
|
|
86
86
|
displayName: 'Summary'
|
|
87
87
|
});
|
|
88
|
-
const
|
|
88
|
+
const Summary = Summary_Summary;
|
|
89
89
|
exports["default"] = __webpack_exports__["default"];
|
|
90
90
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
91
91
|
"default"
|
|
@@ -70,6 +70,42 @@ class CollectionPlugin extends Plugin_js_namespaceObject.Plugin {
|
|
|
70
70
|
key: DataSourceManager_js_namespaceObject.DEFAULT_DATA_SOURCE_KEY,
|
|
71
71
|
displayName: DataSourceManager_js_namespaceObject.DEFAULT_DATA_SOURCE_TITLE
|
|
72
72
|
});
|
|
73
|
+
this.app.dataSourceManager.collectionFieldInterfaceManager.addFieldInterfaceComponentOption('m2o', {
|
|
74
|
+
label: '{{t("CustomTitle")}}',
|
|
75
|
+
value: 'CustomTitle'
|
|
76
|
+
});
|
|
77
|
+
this.app.dataSourceManager.collectionFieldInterfaceManager.addFieldInterfaceComponentOption('m2m', {
|
|
78
|
+
label: '{{t("CustomTitle")}}',
|
|
79
|
+
value: 'CustomTitle'
|
|
80
|
+
});
|
|
81
|
+
this.app.dataSourceManager.collectionFieldInterfaceManager.addFieldInterfaceComponentOption('o2m', {
|
|
82
|
+
label: '{{t("CustomTitle")}}',
|
|
83
|
+
value: 'CustomTitle'
|
|
84
|
+
});
|
|
85
|
+
this.app.dataSourceManager.collectionFieldInterfaceManager.addFieldInterfaceComponentOption('o2o', {
|
|
86
|
+
label: '{{t("CustomTitle")}}',
|
|
87
|
+
value: 'CustomTitle'
|
|
88
|
+
});
|
|
89
|
+
this.app.dataSourceManager.collectionFieldInterfaceManager.addFieldInterfaceComponentOption('obo', {
|
|
90
|
+
label: '{{t("CustomTitle")}}',
|
|
91
|
+
value: 'CustomTitle'
|
|
92
|
+
});
|
|
93
|
+
this.app.dataSourceManager.collectionFieldInterfaceManager.addFieldInterfaceComponentOption('select', {
|
|
94
|
+
label: '{{t("CustomTitle")}}',
|
|
95
|
+
value: 'CustomTitle'
|
|
96
|
+
});
|
|
97
|
+
this.app.dataSourceManager.collectionFieldInterfaceManager.addFieldInterfaceComponentOption('checkbox', {
|
|
98
|
+
label: '{{t("CustomTitle")}}',
|
|
99
|
+
value: 'CustomTitle'
|
|
100
|
+
});
|
|
101
|
+
this.app.dataSourceManager.collectionFieldInterfaceManager.addFieldInterfaceComponentOption('radioGroup', {
|
|
102
|
+
label: '{{t("CustomTitle")}}',
|
|
103
|
+
value: 'CustomTitle'
|
|
104
|
+
});
|
|
105
|
+
this.app.dataSourceManager.collectionFieldInterfaceManager.addFieldInterfaceComponentOption('multipleSelect', {
|
|
106
|
+
label: '{{t("CustomTitle")}}',
|
|
107
|
+
value: 'CustomTitle'
|
|
108
|
+
});
|
|
73
109
|
}
|
|
74
110
|
addFieldInterfaceGroups() {
|
|
75
111
|
this.dataSourceManager.addFieldInterfaceGroups({
|
|
@@ -120,12 +120,12 @@ var __webpack_exports__ = {};
|
|
|
120
120
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
121
121
|
for(var __WEBPACK_IMPORT_KEY__ in _CollectionManagerProvider__WEBPACK_IMPORTED_MODULE_1__)if ([
|
|
122
122
|
"interfacesProperties",
|
|
123
|
-
"default",
|
|
124
123
|
"useCollectionFilterOptions",
|
|
125
124
|
"useFieldInterfaceOptions",
|
|
126
125
|
"useLinkageCollectionFilterOptions",
|
|
127
126
|
"useSortFields",
|
|
128
127
|
"isDeleteButtonDisabled",
|
|
128
|
+
"default",
|
|
129
129
|
"getConfigurableProperties",
|
|
130
130
|
"useCancelAction",
|
|
131
131
|
"useCollectionFieldsOptions"
|
|
@@ -137,12 +137,12 @@ var __webpack_exports__ = {};
|
|
|
137
137
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
138
138
|
for(var __WEBPACK_IMPORT_KEY__ in _CollectionManagerSchemaComponentProvider__WEBPACK_IMPORTED_MODULE_2__)if ([
|
|
139
139
|
"interfacesProperties",
|
|
140
|
-
"default",
|
|
141
140
|
"useCollectionFilterOptions",
|
|
142
141
|
"useFieldInterfaceOptions",
|
|
143
142
|
"useLinkageCollectionFilterOptions",
|
|
144
143
|
"useSortFields",
|
|
145
144
|
"isDeleteButtonDisabled",
|
|
145
|
+
"default",
|
|
146
146
|
"getConfigurableProperties",
|
|
147
147
|
"useCancelAction",
|
|
148
148
|
"useCollectionFieldsOptions"
|
|
@@ -154,12 +154,12 @@ var __webpack_exports__ = {};
|
|
|
154
154
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
155
155
|
for(var __WEBPACK_IMPORT_KEY__ in _CollectionProvider_deprecated__WEBPACK_IMPORTED_MODULE_3__)if ([
|
|
156
156
|
"interfacesProperties",
|
|
157
|
-
"default",
|
|
158
157
|
"useCollectionFilterOptions",
|
|
159
158
|
"useFieldInterfaceOptions",
|
|
160
159
|
"useLinkageCollectionFilterOptions",
|
|
161
160
|
"useSortFields",
|
|
162
161
|
"isDeleteButtonDisabled",
|
|
162
|
+
"default",
|
|
163
163
|
"getConfigurableProperties",
|
|
164
164
|
"useCancelAction",
|
|
165
165
|
"useCollectionFieldsOptions"
|
|
@@ -171,12 +171,12 @@ var __webpack_exports__ = {};
|
|
|
171
171
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
172
172
|
for(var __WEBPACK_IMPORT_KEY__ in _Configuration__WEBPACK_IMPORTED_MODULE_4__)if ([
|
|
173
173
|
"interfacesProperties",
|
|
174
|
-
"default",
|
|
175
174
|
"useCollectionFilterOptions",
|
|
176
175
|
"useFieldInterfaceOptions",
|
|
177
176
|
"useLinkageCollectionFilterOptions",
|
|
178
177
|
"useSortFields",
|
|
179
178
|
"isDeleteButtonDisabled",
|
|
179
|
+
"default",
|
|
180
180
|
"getConfigurableProperties",
|
|
181
181
|
"useCancelAction",
|
|
182
182
|
"useCollectionFieldsOptions"
|
|
@@ -189,12 +189,12 @@ var __webpack_exports__ = {};
|
|
|
189
189
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
190
190
|
for(var __WEBPACK_IMPORT_KEY__ in _context__WEBPACK_IMPORTED_MODULE_6__)if ([
|
|
191
191
|
"interfacesProperties",
|
|
192
|
-
"default",
|
|
193
192
|
"useCollectionFilterOptions",
|
|
194
193
|
"useFieldInterfaceOptions",
|
|
195
194
|
"useLinkageCollectionFilterOptions",
|
|
196
195
|
"useSortFields",
|
|
197
196
|
"isDeleteButtonDisabled",
|
|
197
|
+
"default",
|
|
198
198
|
"getConfigurableProperties",
|
|
199
199
|
"useCancelAction",
|
|
200
200
|
"useCollectionFieldsOptions"
|
|
@@ -206,12 +206,12 @@ var __webpack_exports__ = {};
|
|
|
206
206
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
207
207
|
for(var __WEBPACK_IMPORT_KEY__ in _hooks__WEBPACK_IMPORTED_MODULE_7__)if ([
|
|
208
208
|
"interfacesProperties",
|
|
209
|
-
"default",
|
|
210
209
|
"useCollectionFilterOptions",
|
|
211
210
|
"useFieldInterfaceOptions",
|
|
212
211
|
"useLinkageCollectionFilterOptions",
|
|
213
212
|
"useSortFields",
|
|
214
213
|
"isDeleteButtonDisabled",
|
|
214
|
+
"default",
|
|
215
215
|
"getConfigurableProperties",
|
|
216
216
|
"useCancelAction",
|
|
217
217
|
"useCollectionFieldsOptions"
|
|
@@ -224,12 +224,12 @@ var __webpack_exports__ = {};
|
|
|
224
224
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
225
225
|
for(var __WEBPACK_IMPORT_KEY__ in _interfaces_types__WEBPACK_IMPORTED_MODULE_9__)if ([
|
|
226
226
|
"interfacesProperties",
|
|
227
|
-
"default",
|
|
228
227
|
"useCollectionFilterOptions",
|
|
229
228
|
"useFieldInterfaceOptions",
|
|
230
229
|
"useLinkageCollectionFilterOptions",
|
|
231
230
|
"useSortFields",
|
|
232
231
|
"isDeleteButtonDisabled",
|
|
232
|
+
"default",
|
|
233
233
|
"getConfigurableProperties",
|
|
234
234
|
"useCancelAction",
|
|
235
235
|
"useCollectionFieldsOptions"
|
|
@@ -241,12 +241,12 @@ var __webpack_exports__ = {};
|
|
|
241
241
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
242
242
|
for(var __WEBPACK_IMPORT_KEY__ in _ResourceActionProvider__WEBPACK_IMPORTED_MODULE_10__)if ([
|
|
243
243
|
"interfacesProperties",
|
|
244
|
-
"default",
|
|
245
244
|
"useCollectionFilterOptions",
|
|
246
245
|
"useFieldInterfaceOptions",
|
|
247
246
|
"useLinkageCollectionFilterOptions",
|
|
248
247
|
"useSortFields",
|
|
249
248
|
"isDeleteButtonDisabled",
|
|
249
|
+
"default",
|
|
250
250
|
"getConfigurableProperties",
|
|
251
251
|
"useCancelAction",
|
|
252
252
|
"useCollectionFieldsOptions"
|
|
@@ -259,12 +259,12 @@ var __webpack_exports__ = {};
|
|
|
259
259
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
260
260
|
for(var __WEBPACK_IMPORT_KEY__ in _templates_types__WEBPACK_IMPORTED_MODULE_12__)if ([
|
|
261
261
|
"interfacesProperties",
|
|
262
|
-
"default",
|
|
263
262
|
"useCollectionFilterOptions",
|
|
264
263
|
"useFieldInterfaceOptions",
|
|
265
264
|
"useLinkageCollectionFilterOptions",
|
|
266
265
|
"useSortFields",
|
|
267
266
|
"isDeleteButtonDisabled",
|
|
267
|
+
"default",
|
|
268
268
|
"getConfigurableProperties",
|
|
269
269
|
"useCancelAction",
|
|
270
270
|
"useCollectionFieldsOptions"
|
|
@@ -276,12 +276,12 @@ var __webpack_exports__ = {};
|
|
|
276
276
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
277
277
|
for(var __WEBPACK_IMPORT_KEY__ in _types__WEBPACK_IMPORTED_MODULE_13__)if ([
|
|
278
278
|
"interfacesProperties",
|
|
279
|
-
"default",
|
|
280
279
|
"useCollectionFilterOptions",
|
|
281
280
|
"useFieldInterfaceOptions",
|
|
282
281
|
"useLinkageCollectionFilterOptions",
|
|
283
282
|
"useSortFields",
|
|
284
283
|
"isDeleteButtonDisabled",
|
|
284
|
+
"default",
|
|
285
285
|
"getConfigurableProperties",
|
|
286
286
|
"useCancelAction",
|
|
287
287
|
"useCollectionFieldsOptions"
|
|
@@ -293,12 +293,12 @@ var __webpack_exports__ = {};
|
|
|
293
293
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
294
294
|
for(var __WEBPACK_IMPORT_KEY__ in _interfaces__WEBPACK_IMPORTED_MODULE_14__)if ([
|
|
295
295
|
"interfacesProperties",
|
|
296
|
-
"default",
|
|
297
296
|
"useCollectionFilterOptions",
|
|
298
297
|
"useFieldInterfaceOptions",
|
|
299
298
|
"useLinkageCollectionFilterOptions",
|
|
300
299
|
"useSortFields",
|
|
301
300
|
"isDeleteButtonDisabled",
|
|
301
|
+
"default",
|
|
302
302
|
"getConfigurableProperties",
|
|
303
303
|
"useCancelAction",
|
|
304
304
|
"useCollectionFieldsOptions"
|
|
@@ -309,12 +309,12 @@ var __webpack_exports__ = {};
|
|
|
309
309
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
310
310
|
for(var __WEBPACK_IMPORT_KEY__ in _interfaces_properties__WEBPACK_IMPORTED_MODULE_8__)if ([
|
|
311
311
|
"interfacesProperties",
|
|
312
|
-
"default",
|
|
313
312
|
"useCollectionFilterOptions",
|
|
314
313
|
"useFieldInterfaceOptions",
|
|
315
314
|
"useLinkageCollectionFilterOptions",
|
|
316
315
|
"useSortFields",
|
|
317
316
|
"isDeleteButtonDisabled",
|
|
317
|
+
"default",
|
|
318
318
|
"getConfigurableProperties",
|
|
319
319
|
"useCancelAction",
|
|
320
320
|
"useCollectionFieldsOptions"
|
|
@@ -326,12 +326,12 @@ var __webpack_exports__ = {};
|
|
|
326
326
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
327
327
|
for(var __WEBPACK_IMPORT_KEY__ in _collectionPlugin__WEBPACK_IMPORTED_MODULE_15__)if ([
|
|
328
328
|
"interfacesProperties",
|
|
329
|
-
"default",
|
|
330
329
|
"useCollectionFilterOptions",
|
|
331
330
|
"useFieldInterfaceOptions",
|
|
332
331
|
"useLinkageCollectionFilterOptions",
|
|
333
332
|
"useSortFields",
|
|
334
333
|
"isDeleteButtonDisabled",
|
|
334
|
+
"default",
|
|
335
335
|
"getConfigurableProperties",
|
|
336
336
|
"useCancelAction",
|
|
337
337
|
"useCollectionFieldsOptions"
|
|
@@ -343,12 +343,12 @@ var __webpack_exports__ = {};
|
|
|
343
343
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
344
344
|
for(var __WEBPACK_IMPORT_KEY__ in _mixins_InheritanceCollectionMixin__WEBPACK_IMPORTED_MODULE_16__)if ([
|
|
345
345
|
"interfacesProperties",
|
|
346
|
-
"default",
|
|
347
346
|
"useCollectionFilterOptions",
|
|
348
347
|
"useFieldInterfaceOptions",
|
|
349
348
|
"useLinkageCollectionFilterOptions",
|
|
350
349
|
"useSortFields",
|
|
351
350
|
"isDeleteButtonDisabled",
|
|
351
|
+
"default",
|
|
352
352
|
"getConfigurableProperties",
|
|
353
353
|
"useCancelAction",
|
|
354
354
|
"useCollectionFieldsOptions"
|
|
@@ -360,12 +360,12 @@ var __webpack_exports__ = {};
|
|
|
360
360
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
361
361
|
for(var __WEBPACK_IMPORT_KEY__ in _sub_table__WEBPACK_IMPORTED_MODULE_17__)if ([
|
|
362
362
|
"interfacesProperties",
|
|
363
|
-
"default",
|
|
364
363
|
"useCollectionFilterOptions",
|
|
365
364
|
"useFieldInterfaceOptions",
|
|
366
365
|
"useLinkageCollectionFilterOptions",
|
|
367
366
|
"useSortFields",
|
|
368
367
|
"isDeleteButtonDisabled",
|
|
368
|
+
"default",
|
|
369
369
|
"getConfigurableProperties",
|
|
370
370
|
"useCancelAction",
|
|
371
371
|
"useCollectionFieldsOptions"
|
|
@@ -377,12 +377,12 @@ var __webpack_exports__ = {};
|
|
|
377
377
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
378
378
|
for(var __WEBPACK_IMPORT_KEY__ in _CollectionHistoryProvider__WEBPACK_IMPORTED_MODULE_18__)if ([
|
|
379
379
|
"interfacesProperties",
|
|
380
|
-
"default",
|
|
381
380
|
"useCollectionFilterOptions",
|
|
382
381
|
"useFieldInterfaceOptions",
|
|
383
382
|
"useLinkageCollectionFilterOptions",
|
|
384
383
|
"useSortFields",
|
|
385
384
|
"isDeleteButtonDisabled",
|
|
385
|
+
"default",
|
|
386
386
|
"getConfigurableProperties",
|
|
387
387
|
"useCancelAction",
|
|
388
388
|
"useCollectionFieldsOptions"
|
|
@@ -394,12 +394,12 @@ var __webpack_exports__ = {};
|
|
|
394
394
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
395
395
|
for(var __WEBPACK_IMPORT_KEY__ in _utils__WEBPACK_IMPORTED_MODULE_19__)if ([
|
|
396
396
|
"interfacesProperties",
|
|
397
|
-
"default",
|
|
398
397
|
"useCollectionFilterOptions",
|
|
399
398
|
"useFieldInterfaceOptions",
|
|
400
399
|
"useLinkageCollectionFilterOptions",
|
|
401
400
|
"useSortFields",
|
|
402
401
|
"isDeleteButtonDisabled",
|
|
402
|
+
"default",
|
|
403
403
|
"getConfigurableProperties",
|
|
404
404
|
"useCancelAction",
|
|
405
405
|
"useCollectionFieldsOptions"
|
|
@@ -49,7 +49,16 @@ class UrlFieldInterface extends CollectionFieldInterface_js_namespaceObject.Coll
|
|
|
49
49
|
type: 'string',
|
|
50
50
|
'x-component': 'Input.URL'
|
|
51
51
|
}
|
|
52
|
-
}), _define_property(this, "
|
|
52
|
+
}), _define_property(this, "componentOptions", [
|
|
53
|
+
{
|
|
54
|
+
label: 'URL',
|
|
55
|
+
value: 'Input.URL'
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
label: 'Preview',
|
|
59
|
+
value: 'Input.Preview'
|
|
60
|
+
}
|
|
61
|
+
]), _define_property(this, "availableTypes", [
|
|
53
62
|
'string',
|
|
54
63
|
'text'
|
|
55
64
|
]), _define_property(this, "properties", {
|
|
@@ -38,21 +38,7 @@ function _define_property(obj, key, value) {
|
|
|
38
38
|
}
|
|
39
39
|
class CollectionFieldInterface {
|
|
40
40
|
addComponentOption(componentOption) {
|
|
41
|
-
if (!this.componentOptions)
|
|
42
|
-
var _this_default_uiSchema, _this_default, _this_default_uiSchema1, _this_default1;
|
|
43
|
-
this.componentOptions = [];
|
|
44
|
-
const xComponent = null == (_this_default = this.default) ? void 0 : null == (_this_default_uiSchema = _this_default.uiSchema) ? void 0 : _this_default_uiSchema['x-component'];
|
|
45
|
-
const componentProps = null == (_this_default1 = this.default) ? void 0 : null == (_this_default_uiSchema1 = _this_default1.uiSchema) ? void 0 : _this_default_uiSchema1['x-component-props'];
|
|
46
|
-
if (xComponent) this.componentOptions = [
|
|
47
|
-
{
|
|
48
|
-
label: xComponent.split('.').pop(),
|
|
49
|
-
value: xComponent,
|
|
50
|
-
useProps () {
|
|
51
|
-
return componentProps || {};
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
];
|
|
55
|
-
}
|
|
41
|
+
if (!this.componentOptions) this.componentOptions = [];
|
|
56
42
|
this.componentOptions.push(componentOption);
|
|
57
43
|
}
|
|
58
44
|
constructor(collectionFieldInterfaceManager){
|
|
@@ -28,7 +28,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
28
28
|
});
|
|
29
29
|
const external_react_namespaceObject = require("react");
|
|
30
30
|
const external_FlagProvider_js_namespaceObject = require("../FlagProvider.js");
|
|
31
|
-
const useFlag = ()=>(0, external_react_namespaceObject.useContext)(external_FlagProvider_js_namespaceObject.FlagContext);
|
|
31
|
+
const useFlag = ()=>(0, external_react_namespaceObject.useContext)(external_FlagProvider_js_namespaceObject.FlagContext) || {};
|
|
32
32
|
exports.useFlag = __webpack_exports__.useFlag;
|
|
33
33
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
34
34
|
"useFlag"
|
package/lib/icon/Icon.js
CHANGED
|
@@ -33,12 +33,12 @@ var __webpack_require__ = {};
|
|
|
33
33
|
var __webpack_exports__ = {};
|
|
34
34
|
__webpack_require__.r(__webpack_exports__);
|
|
35
35
|
__webpack_require__.d(__webpack_exports__, {
|
|
36
|
+
hasIcon: ()=>hasIcon,
|
|
36
37
|
default: ()=>icon_Icon,
|
|
37
38
|
icons: ()=>Icon_icons,
|
|
38
|
-
registerIcons: ()=>registerIcons,
|
|
39
39
|
Icon: ()=>Icon,
|
|
40
40
|
registerIcon: ()=>registerIcon,
|
|
41
|
-
|
|
41
|
+
registerIcons: ()=>registerIcons
|
|
42
42
|
});
|
|
43
43
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
44
44
|
require("react");
|
package/lib/locale/zh-CN.js
CHANGED
|
@@ -257,6 +257,7 @@ module.exports = {
|
|
|
257
257
|
"Custom option label": "\u81EA\u5B9A\u4E49\u9009\u9879\u6807\u7B7E",
|
|
258
258
|
"Custom request": "\u81EA\u5B9A\u4E49\u8BF7\u6C42",
|
|
259
259
|
"Custom title": "\u81EA\u5B9A\u4E49\u6807\u9898",
|
|
260
|
+
CustomTitle: "\u81EA\u5B9A\u4E49\u6807\u9898",
|
|
260
261
|
Customize: "\u81EA\u5B9A\u4E49",
|
|
261
262
|
Cyan: "\u660E\u9752",
|
|
262
263
|
DESC: "\u964D\u5E8F",
|
|
@@ -701,6 +702,7 @@ module.exports = {
|
|
|
701
702
|
"Please confirm the SQL statement first": "\u8BF7\u5148\u786E\u8BA4 SQL \u8BED\u53E5",
|
|
702
703
|
"Please enter search content": "\u8BF7\u8F93\u5165\u67E5\u8BE2\u5185\u5BB9",
|
|
703
704
|
"Please fill in the iframe URL": "\u8BF7\u586B\u5199\u5D4C\u5165\u7684\u5730\u5740",
|
|
705
|
+
"Please fill in your mobile phone number in your personal information first": "\u8BF7\u5148\u5728\u4E2A\u4EBA\u8D44\u6599\u586B\u5199\u624B\u673A\u53F7",
|
|
704
706
|
"Please select": "\u8BF7\u9009\u62E9",
|
|
705
707
|
"Please select content": "\u8BF7\u9009\u62E9\u5185\u5BB9",
|
|
706
708
|
"Please select the records to be updated": "\u8BF7\u9009\u62E9\u8981\u66F4\u65B0\u7684\u8BB0\u5F55",
|
|
@@ -835,6 +837,7 @@ module.exports = {
|
|
|
835
837
|
Selector: "\u9009\u62E9\u5668",
|
|
836
838
|
"Selector mode": "\u9009\u62E9\u5668\u6A21\u5F0F",
|
|
837
839
|
"Send code": "\u53D1\u9001\u9A8C\u8BC1\u7801",
|
|
840
|
+
"Send verification code to phone: {{phoneNumber}}": "\u5C06\u53D1\u9001\u9A8C\u8BC1\u7801\u7ED9\u624B\u673A:{{phoneNumber}}",
|
|
838
841
|
Separator: "\u5206\u9694\u7B26",
|
|
839
842
|
"Set Quick Add Parent Tabs": "\u8BBE\u7F6E\u5FEB\u901F\u6DFB\u52A0\u7236\u7EA7\u9009\u9879",
|
|
840
843
|
"Set Quick Add Tabs": "\u8BBE\u7F6E\u5FEB\u901F\u6DFB\u52A0\u9009\u9879",
|
|
@@ -998,7 +1001,9 @@ module.exports = {
|
|
|
998
1001
|
Upload: "\u4E0A\u4F20",
|
|
999
1002
|
"Upload new version": "\u4E0A\u4F20\u65B0\u7248",
|
|
1000
1003
|
"Upload plugin": "\u4E0A\u4F20\u63D2\u4EF6",
|
|
1004
|
+
"Use old password": "\u65E7\u5BC6\u7801\u9A8C\u8BC1",
|
|
1001
1005
|
"Use the same time zone (GMT) for all users": "\u6240\u6709\u7528\u6237\u4F7F\u7528\u540C\u4E00\u65F6\u533A (\u683C\u6797\u5C3C\u6CBB\u6807\u51C6\u65F6\u95F4)",
|
|
1006
|
+
"Use verification code": "\u9A8C\u8BC1\u7801\u9A8C\u8BC1",
|
|
1002
1007
|
"Used for drag and drop sorting scenarios, supporting grouping sorting": "\u7528\u4E8E\u62D6\u62FD\u6392\u5E8F\u573A\u666F\uFF0C\u652F\u6301\u5206\u7EC4\u6392\u5E8F",
|
|
1003
1008
|
User: "\u7528\u6237",
|
|
1004
1009
|
"User settings": "\u4E2A\u4EBA\u8BBE\u7F6E",
|
|
@@ -1009,6 +1014,7 @@ module.exports = {
|
|
|
1009
1014
|
Value: "\u5B57\u6BB5\u503C",
|
|
1010
1015
|
Values: "\u503C",
|
|
1011
1016
|
"Verification code": "\u9A8C\u8BC1\u7801",
|
|
1017
|
+
"Verify method": "\u9A8C\u8BC1\u65B9\u5F0F",
|
|
1012
1018
|
Version: "\u7248\u672C",
|
|
1013
1019
|
"Version range": "\u7248\u672C\u8303\u56F4",
|
|
1014
1020
|
View: "\u67E5\u770B",
|
|
@@ -510,9 +510,6 @@ const fieldSettingsFormItem = new SchemaSettings_js_namespaceObject.SchemaSettin
|
|
|
510
510
|
const validateSchema = (0, external_schema_component_index_js_namespaceObject.useValidateSchema)();
|
|
511
511
|
return form && !isFormReadPretty && validateSchema;
|
|
512
512
|
}
|
|
513
|
-
},
|
|
514
|
-
{
|
|
515
|
-
...external_data_source_index_js_namespaceObject.fieldComponentSettingsItem
|
|
516
513
|
}
|
|
517
514
|
];
|
|
518
515
|
}
|
|
@@ -157,14 +157,26 @@ const useTableBlockProps = ()=>{
|
|
|
157
157
|
let [key, value] = param;
|
|
158
158
|
if (key.includes(ctx.rowKey) && selectedRow.includes(value)) delete items[key];
|
|
159
159
|
});
|
|
160
|
-
const
|
|
160
|
+
const mergeList = [
|
|
161
161
|
...Object.values(storedFilter).map((filter)=>(0, external_schema_component_index_js_namespaceObject.removeNullCondition)(filter)),
|
|
162
162
|
external_flat_default().unflatten(items),
|
|
163
163
|
block.defaultFilter,
|
|
164
164
|
prevMergedFilter
|
|
165
|
-
]
|
|
165
|
+
];
|
|
166
|
+
const mergedFilter = (0, utils_js_namespaceObject.mergeFilter)(mergeList);
|
|
166
167
|
const currFilter = (0, index_js_namespaceObject.filterByCleanedFields)(mergedFilter);
|
|
167
168
|
prevMergedFilter = currFilter;
|
|
169
|
+
dataBlocks.forEach((item)=>{
|
|
170
|
+
const targetsUidList = targets.map((targetItem)=>targetItem.uid);
|
|
171
|
+
if (targetsUidList.includes(item.uid) && !item.associatedFields.find((assItem)=>assItem.name === target.field || target.field.includes(assItem.name))) {
|
|
172
|
+
const prevFlatItems = external_flat_default()(prevMergedFilter);
|
|
173
|
+
Object.entries(prevFlatItems).forEach((param)=>{
|
|
174
|
+
let [key, prevItem] = param;
|
|
175
|
+
if (key.split('.').includes(target.field)) delete prevFlatItems[key];
|
|
176
|
+
});
|
|
177
|
+
prevMergedFilter = external_flat_default().unflatten(prevFlatItems);
|
|
178
|
+
}
|
|
179
|
+
});
|
|
168
180
|
return block.doFilter({
|
|
169
181
|
...param,
|
|
170
182
|
page: 1,
|
|
@@ -32,7 +32,6 @@ const index_js_namespaceObject = require("../../../../application/index.js");
|
|
|
32
32
|
const SchemaSettings_js_namespaceObject = require("../../../../application/schema-settings/SchemaSettings.js");
|
|
33
33
|
const external_collection_manager_index_js_namespaceObject = require("../../../../collection-manager/index.js");
|
|
34
34
|
const CollectionProvider_js_namespaceObject = require("../../../../data-source/collection/CollectionProvider.js");
|
|
35
|
-
const fieldComponent_js_namespaceObject = require("../../../../data-source/commonsSettingsItem/fieldComponent.js");
|
|
36
35
|
const external_schema_component_index_js_namespaceObject = require("../../../../schema-component/index.js");
|
|
37
36
|
const hooks_js_namespaceObject = require("../../../../schema-component/antd/association-field/hooks.js");
|
|
38
37
|
const Table_Column_Decorator_js_namespaceObject = require("../../../../schema-component/antd/table-v2/Table.Column.Decorator.js");
|
|
@@ -358,8 +357,7 @@ const tableColumnSettings = new SchemaSettings_js_namespaceObject.SchemaSettings
|
|
|
358
357
|
}
|
|
359
358
|
};
|
|
360
359
|
}
|
|
361
|
-
}
|
|
362
|
-
fieldComponent_js_namespaceObject.fieldComponentSettingsItem
|
|
360
|
+
}
|
|
363
361
|
]
|
|
364
362
|
},
|
|
365
363
|
{
|
|
@@ -42,7 +42,6 @@ const external_react_i18next_namespaceObject = require("react-i18next");
|
|
|
42
42
|
const SchemaSettings_js_namespaceObject = require("../../../../application/schema-settings/SchemaSettings.js");
|
|
43
43
|
const index_js_namespaceObject = require("../../../../block-provider/index.js");
|
|
44
44
|
const external_collection_manager_index_js_namespaceObject = require("../../../../collection-manager/index.js");
|
|
45
|
-
const external_data_source_index_js_namespaceObject = require("../../../../data-source/index.js");
|
|
46
45
|
const external_schema_component_index_js_namespaceObject = require("../../../../schema-component/index.js");
|
|
47
46
|
const external_schema_settings_index_js_namespaceObject = require("../../../../schema-settings/index.js");
|
|
48
47
|
const SchemaSettingsDataScope_js_namespaceObject = require("../../../../schema-settings/SchemaSettingsDataScope.js");
|
|
@@ -222,9 +221,6 @@ const filterCollapseItemFieldSettings = new SchemaSettings_js_namespaceObject.Sc
|
|
|
222
221
|
onChange: onTitleFieldChange
|
|
223
222
|
};
|
|
224
223
|
}
|
|
225
|
-
},
|
|
226
|
-
{
|
|
227
|
-
...external_data_source_index_js_namespaceObject.fieldComponentSettingsItem
|
|
228
224
|
}
|
|
229
225
|
];
|
|
230
226
|
}
|
|
@@ -44,7 +44,6 @@ const index_js_namespaceObject = require("../../../../application/index.js");
|
|
|
44
44
|
const SchemaSettings_js_namespaceObject = require("../../../../application/schema-settings/SchemaSettings.js");
|
|
45
45
|
const external_collection_manager_index_js_namespaceObject = require("../../../../collection-manager/index.js");
|
|
46
46
|
const useFieldComponentName_js_namespaceObject = require("../../../../common/useFieldComponentName.js");
|
|
47
|
-
const external_data_source_index_js_namespaceObject = require("../../../../data-source/index.js");
|
|
48
47
|
const external_schema_component_index_js_namespaceObject = require("../../../../schema-component/index.js");
|
|
49
48
|
const external_schema_settings_index_js_namespaceObject = require("../../../../schema-settings/index.js");
|
|
50
49
|
const filterFormItemFieldSettings = new SchemaSettings_js_namespaceObject.SchemaSettings({
|
|
@@ -349,9 +348,6 @@ const filterFormItemFieldSettings = new SchemaSettings_js_namespaceObject.Schema
|
|
|
349
348
|
name: 'operator',
|
|
350
349
|
Component: external_schema_component_index_js_namespaceObject.EditOperator
|
|
351
350
|
},
|
|
352
|
-
{
|
|
353
|
-
...external_data_source_index_js_namespaceObject.fieldComponentSettingsItem
|
|
354
|
-
},
|
|
355
351
|
{
|
|
356
352
|
name: 'editDefaultValue',
|
|
357
353
|
Component: external_schema_settings_index_js_namespaceObject.SchemaSettingsDefaultValue
|
|
@@ -26,7 +26,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
27
|
CustomTitleComponentFieldSettings: ()=>CustomTitleComponentFieldSettings
|
|
28
28
|
});
|
|
29
|
+
const schema_namespaceObject = require("@tachybase/schema");
|
|
30
|
+
const external_react_i18next_namespaceObject = require("react-i18next");
|
|
29
31
|
const SchemaSettings_js_namespaceObject = require("../../../../application/schema-settings/SchemaSettings.js");
|
|
32
|
+
const useFieldComponentName_js_namespaceObject = require("../../../../common/useFieldComponentName.js");
|
|
33
|
+
const index_js_namespaceObject = require("../../../../data-source/index.js");
|
|
34
|
+
const external_schema_component_index_js_namespaceObject = require("../../../../schema-component/index.js");
|
|
35
|
+
const util_js_namespaceObject = require("../../../../schema-component/antd/association-field/util.js");
|
|
30
36
|
const FormItem_Settings_js_namespaceObject = require("../../../../schema-component/antd/form-item/FormItem.Settings.js");
|
|
31
37
|
const Table_Column_Decorator_js_namespaceObject = require("../../../../schema-component/antd/table-v2/Table.Column.Decorator.js");
|
|
32
38
|
const useIsShowMultipleSwitch_js_namespaceObject = require("../../../../schema-settings/hooks/useIsShowMultipleSwitch.js");
|
|
@@ -35,12 +41,96 @@ const CustomTitleComponentFieldSettings = new SchemaSettings_js_namespaceObject.
|
|
|
35
41
|
name: 'fieldSettings:component:CustomTitle',
|
|
36
42
|
items: [
|
|
37
43
|
{
|
|
38
|
-
|
|
39
|
-
|
|
44
|
+
name: 'fieldComponent',
|
|
45
|
+
type: 'select',
|
|
46
|
+
useComponentProps () {
|
|
47
|
+
var _collectionInterface_componentOptions_filter, _collectionInterface_componentOptions;
|
|
48
|
+
const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
|
|
49
|
+
const field = (0, schema_namespaceObject.useField)();
|
|
50
|
+
const collectionFieldCurrent = (0, index_js_namespaceObject.useCollectionField)();
|
|
51
|
+
const { fieldSchema: tableColumnSchema, collectionField } = (0, Table_Column_Decorator_js_namespaceObject.useColumnSchema)();
|
|
52
|
+
const schema = (0, schema_namespaceObject.useFieldSchema)();
|
|
53
|
+
const fieldSchema = tableColumnSchema || schema;
|
|
54
|
+
const fieldModeOptions = (0, external_schema_component_index_js_namespaceObject.useFieldModeOptions)({
|
|
55
|
+
fieldSchema: tableColumnSchema,
|
|
56
|
+
collectionField
|
|
57
|
+
});
|
|
58
|
+
const isAddNewForm = (0, external_schema_component_index_js_namespaceObject.useIsAddNewForm)();
|
|
59
|
+
const fieldMode = (0, useFieldComponentName_js_namespaceObject.useFieldComponentName)();
|
|
60
|
+
const { dn } = (0, external_schema_component_index_js_namespaceObject.useDesignable)();
|
|
61
|
+
const isSelect = [
|
|
62
|
+
'select',
|
|
63
|
+
'multipleSelect'
|
|
64
|
+
].includes(null == collectionFieldCurrent ? void 0 : collectionFieldCurrent.interface);
|
|
65
|
+
const optionsMuiltipleSelect = [
|
|
66
|
+
{
|
|
67
|
+
label: t('Select'),
|
|
68
|
+
value: 'Select'
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
label: t('Radio group'),
|
|
72
|
+
value: 'Radio group'
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
label: t('Custom Title'),
|
|
76
|
+
value: 'CustomTitle'
|
|
77
|
+
}
|
|
78
|
+
];
|
|
79
|
+
if ((null == collectionFieldCurrent ? void 0 : collectionFieldCurrent.interface) === 'multipleSelect') {
|
|
80
|
+
const index = optionsMuiltipleSelect.findIndex((item)=>{
|
|
81
|
+
if ('Select' === item.value) item.value = 'multiple';
|
|
82
|
+
return 'Radio group' === item.value;
|
|
83
|
+
});
|
|
84
|
+
optionsMuiltipleSelect.splice(index, 1);
|
|
85
|
+
}
|
|
86
|
+
const dm = (0, index_js_namespaceObject.useDataSourceManager)();
|
|
87
|
+
const collectionInterface = dm.collectionFieldInterfaceManager.getFieldInterface(null == collectionField ? void 0 : collectionField.interface);
|
|
88
|
+
const compile = (0, external_schema_component_index_js_namespaceObject.useCompile)();
|
|
89
|
+
const componentOptions = isSelect ? optionsMuiltipleSelect : fieldModeOptions;
|
|
90
|
+
null == collectionInterface || null == (_collectionInterface_componentOptions = collectionInterface.componentOptions) || null == (_collectionInterface_componentOptions_filter = _collectionInterface_componentOptions.filter((item)=>!item.useVisible || item.useVisible())) || _collectionInterface_componentOptions_filter.forEach((item)=>{
|
|
91
|
+
if (!(null == componentOptions ? void 0 : componentOptions.find((modeItem)=>modeItem.value === item.value))) null == componentOptions || componentOptions.push({
|
|
92
|
+
label: compile(item.label),
|
|
93
|
+
value: item.value
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
return {
|
|
97
|
+
title: t('Field component'),
|
|
98
|
+
options: componentOptions,
|
|
99
|
+
value: fieldMode,
|
|
100
|
+
onChange (mode) {
|
|
101
|
+
const schema = {
|
|
102
|
+
['x-uid']: fieldSchema['x-uid']
|
|
103
|
+
};
|
|
104
|
+
fieldSchema['x-component-props'] = fieldSchema['x-component-props'] || {};
|
|
105
|
+
fieldSchema['x-component-props']['mode'] = mode;
|
|
106
|
+
schema['x-component-props'] = fieldSchema['x-component-props'];
|
|
107
|
+
field.componentProps = field.componentProps || {};
|
|
108
|
+
field.componentProps.mode = mode;
|
|
109
|
+
if ((0, util_js_namespaceObject.isSubMode)(fieldSchema) && isAddNewForm) {
|
|
110
|
+
var _field_setInitialValue, _field_setValue;
|
|
111
|
+
schema.default = null;
|
|
112
|
+
fieldSchema.default = null;
|
|
113
|
+
null == field || null == (_field_setInitialValue = field.setInitialValue) || _field_setInitialValue.call(field, null);
|
|
114
|
+
null == field || null == (_field_setValue = field.setValue) || _field_setValue.call(field, null);
|
|
115
|
+
}
|
|
116
|
+
dn.emit('patch', {
|
|
117
|
+
schema
|
|
118
|
+
});
|
|
119
|
+
dn.refresh();
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
},
|
|
123
|
+
useVisible () {
|
|
124
|
+
const fieldMode = (0, useFieldComponentName_js_namespaceObject.useFieldComponentName)();
|
|
125
|
+
return 'CustomTitle' === fieldMode;
|
|
126
|
+
}
|
|
40
127
|
},
|
|
41
128
|
{
|
|
42
129
|
...selectComponentFieldSettings_js_namespaceObject.CustomTitle,
|
|
43
|
-
useVisible
|
|
130
|
+
useVisible () {
|
|
131
|
+
const fieldMode = (0, useFieldComponentName_js_namespaceObject.useFieldComponentName)();
|
|
132
|
+
return 'CustomTitle' === fieldMode;
|
|
133
|
+
}
|
|
44
134
|
},
|
|
45
135
|
{
|
|
46
136
|
...selectComponentFieldSettings_js_namespaceObject.setTheDataScope,
|