@tachybase/client 0.23.58 → 1.0.6
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/api-client/APIClient.d.ts +5 -2
- package/es/api-client/APIClient.mjs +93 -49
- package/es/api-client/hooks/useRequest.d.ts +2 -0
- package/es/application/Application.d.ts +3 -0
- package/es/application/Application.mjs +11 -0
- package/es/application/CustomRouterContextProvider.d.ts +54 -0
- package/es/application/CustomRouterContextProvider.mjs +209 -0
- package/es/application/RouterManager.d.ts +8 -3
- package/es/application/RouterManager.mjs +48 -15
- package/es/application/schema-initializer/context/index.d.ts +1 -1
- package/es/block-provider/hooks/index.d.ts +2 -0
- package/es/block-provider/hooks/index.mjs +25 -21
- package/es/built-in/context-menu/ContextMenu.provider.mjs +6 -6
- package/es/built-in/context-menu/ContextMenuItemsProps.d.ts +4 -4
- package/es/built-in/context-menu/ContextMenuItemsProps.mjs +6 -6
- package/es/built-in/context-menu/index.mjs +1 -1
- package/es/built-in/context-menu/useContextMenu.d.ts +2 -2
- package/es/built-in/index.mjs +5 -0
- package/es/built-in/page-style/PageStyle.provider.mjs +2 -2
- package/es/collection-manager/templates/sql.d.ts +1 -1
- package/es/collection-manager/templates/view.d.ts +1 -1
- package/es/data-source/collection-field-interface/CollectionFieldInterface.d.ts +1 -0
- package/es/data-source/collection-field-interface/CollectionFieldInterface.mjs +18 -0
- package/es/data-source/collection-field-interface/CollectionFieldInterfaceManager.d.ts +8 -1
- package/es/data-source/collection-field-interface/CollectionFieldInterfaceManager.mjs +20 -0
- package/es/data-source/commonsSettingsItem/fieldComponent.mjs +3 -1
- package/es/data-source/data-source/DataSource.d.ts +1 -1
- package/es/filter-provider/utils.mjs +6 -0
- package/es/i18n/i18n.mjs +7 -12
- package/es/modules/actions/delete/deleteActionSettings.mjs +10 -0
- package/es/modules/blocks/data-blocks/form/FilterItemCustomSettings.mjs +1 -1
- package/es/modules/blocks/data-blocks/form/fieldSettingsFormItem.mjs +9 -4
- package/es/modules/blocks/data-blocks/table/hooks/useTableBlockProps.mjs +2 -2
- package/es/modules/blocks/data-blocks/table/tableBlockSettings.mjs +4 -0
- package/es/modules/blocks/data-blocks/table/tableColumnSettings.mjs +44 -0
- package/es/modules/blocks/filter-blocks/collapse/filterCollapseItemFieldSettings.mjs +4 -0
- package/es/modules/blocks/filter-blocks/form/filterFormItemFieldSettings.mjs +9 -0
- package/es/modules/fields/component/SubTable/secondLevelSelect.d.ts +11 -0
- package/es/modules/fields/component/SubTable/secondLevelSelect.mjs +102 -0
- package/es/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.d.ts +79 -41
- package/es/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.mjs +103 -100
- package/es/powered-by/index.mjs +4 -7
- package/es/schema-component/antd/action/Action.Designer.mjs +38 -3
- package/es/schema-component/antd/action/Action.Modal.mjs +0 -1
- package/es/schema-component/antd/action/Action.mjs +1 -3
- package/es/schema-component/antd/association-field/SubTabs/InternalCollapse.mjs +2 -1
- package/es/schema-component/antd/checkbox/Checkbox.mjs +6 -4
- package/es/schema-component/antd/index.d.ts +1 -0
- package/es/schema-component/antd/index.mjs +1 -0
- package/es/schema-component/antd/media-card/MediaCard.d.ts +11 -0
- package/es/schema-component/antd/media-card/MediaCard.mjs +35 -0
- package/es/schema-component/antd/media-card/index.d.ts +1 -0
- package/es/schema-component/antd/media-card/index.mjs +1 -0
- package/es/schema-component/antd/media-card/style.d.ts +3 -0
- package/es/schema-component/antd/media-card/style.mjs +25 -0
- package/es/schema-component/antd/page/Page.mjs +34 -24
- package/es/schema-component/antd/password/utils.d.ts +1 -1
- package/es/schema-component/common/dnd-context/index.mjs +1 -7
- package/es/schema-component/common/sortable-item/DragHandlePageTab.d.ts +1 -0
- package/es/schema-component/common/sortable-item/DragHandlePageTab.mjs +71 -0
- package/es/schema-component/common/sortable-item/DragHandlePageTab.style.d.ts +3 -0
- package/es/schema-component/common/sortable-item/DragHandlePageTab.style.mjs +25 -0
- package/es/schema-items/GeneralSettings.mjs +5 -0
- package/es/schema-settings/EditCustomDefaultValue.mjs +1 -1
- package/es/schema-settings/SchemaSettings.mjs +1 -1
- package/es/schema-settings/SchemaSettingsDefaultValue.mjs +2 -0
- package/es/schema-settings/utils/createModalSettingsItem.d.ts +26 -0
- package/es/schema-settings/utils/createModalSettingsItem.mjs +46 -0
- package/es/schema-settings/utils/createSelectSettingsItem.d.ts +25 -0
- package/es/schema-settings/utils/createSelectSettingsItem.mjs +40 -0
- package/es/schema-settings/utils/createSwitchSettingsItem.d.ts +21 -0
- package/es/schema-settings/utils/createSwitchSettingsItem.mjs +38 -0
- package/es/schema-settings/utils/createTextSettingsItem.d.ts +9 -0
- package/es/schema-settings/utils/createTextSettingsItem.mjs +21 -0
- package/es/schema-settings/utils/index.d.ts +4 -0
- package/es/schema-settings/utils/index.mjs +4 -0
- package/es/schema-settings/utils/util.d.ts +12 -0
- package/es/schema-settings/utils/util.mjs +24 -0
- package/es/user/CurrentUserProvider.mjs +6 -3
- package/lib/api-client/APIClient.js +93 -49
- package/lib/application/Application.js +11 -0
- package/lib/application/CustomRouterContextProvider.js +276 -0
- package/lib/application/RouterManager.js +49 -15
- package/lib/application/schema-initializer/hooks/index.js +2 -2
- package/lib/block-provider/hooks/index.js +76 -58
- package/lib/built-in/context-menu/ContextMenu.provider.js +6 -6
- package/lib/built-in/context-menu/ContextMenuItemsProps.js +6 -6
- package/lib/built-in/context-menu/index.js +1 -1
- package/lib/built-in/index.js +5 -0
- package/lib/built-in/page-style/PageStyle.provider.js +2 -2
- package/lib/data-source/collection-field-interface/CollectionFieldInterface.js +18 -0
- package/lib/data-source/collection-field-interface/CollectionFieldInterfaceManager.js +20 -0
- package/lib/data-source/commonsSettingsItem/fieldComponent.js +3 -1
- package/lib/filter-provider/utils.js +6 -0
- package/lib/i18n/i18n.js +7 -12
- package/lib/locale/en_US.js +1 -0
- package/lib/locale/zh-CN.js +10 -1
- package/lib/modules/actions/delete/deleteActionSettings.js +10 -0
- package/lib/modules/blocks/data-blocks/form/FilterItemCustomSettings.js +1 -1
- package/lib/modules/blocks/data-blocks/form/fieldSettingsFormItem.js +9 -4
- package/lib/modules/blocks/data-blocks/table/hooks/useTableBlockProps.js +2 -2
- package/lib/modules/blocks/data-blocks/table/tableBlockSettings.js +4 -0
- package/lib/modules/blocks/data-blocks/table/tableColumnSettings.js +44 -0
- package/lib/modules/blocks/filter-blocks/collapse/filterCollapseItemFieldSettings.js +4 -0
- package/lib/modules/blocks/filter-blocks/form/filterFormItemFieldSettings.js +9 -0
- package/lib/modules/fields/component/SubTable/secondLevelSelect.js +136 -0
- package/lib/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.js +104 -103
- package/lib/powered-by/index.js +4 -7
- package/lib/schema-component/antd/action/Action.Designer.js +38 -3
- package/lib/schema-component/antd/action/Action.Modal.js +0 -1
- package/lib/schema-component/antd/action/Action.js +1 -3
- package/lib/schema-component/antd/association-field/SubTabs/InternalCollapse.js +2 -1
- package/lib/schema-component/antd/checkbox/Checkbox.js +6 -4
- package/lib/schema-component/antd/index.js +18 -4
- package/lib/schema-component/antd/media-card/MediaCard.js +69 -0
- package/lib/schema-component/antd/media-card/index.js +65 -0
- package/lib/schema-component/antd/media-card/style.js +59 -0
- package/lib/schema-component/antd/page/Page.js +34 -24
- package/lib/schema-component/common/dnd-context/index.js +1 -7
- package/lib/schema-component/common/sortable-item/DragHandlePageTab.js +105 -0
- package/lib/schema-component/common/sortable-item/DragHandlePageTab.style.js +59 -0
- package/lib/schema-items/GeneralSettings.js +5 -0
- package/lib/schema-settings/EditCustomDefaultValue.js +1 -1
- package/lib/schema-settings/SchemaSettings.js +1 -1
- package/lib/schema-settings/SchemaSettingsDefaultValue.js +2 -0
- package/lib/schema-settings/utils/createModalSettingsItem.js +94 -0
- package/lib/schema-settings/utils/createSelectSettingsItem.js +88 -0
- package/lib/schema-settings/utils/createSwitchSettingsItem.js +86 -0
- package/lib/schema-settings/utils/createTextSettingsItem.js +55 -0
- package/lib/schema-settings/utils/index.js +92 -0
- package/lib/schema-settings/utils/util.js +74 -0
- package/lib/user/CurrentUserProvider.js +6 -3
- package/package.json +7 -7
|
@@ -56,9 +56,7 @@ const external_schema_component_index_js_namespaceObject = require("../../../../
|
|
|
56
56
|
const FormItem_Settings_js_namespaceObject = require("../../../../schema-component/antd/form-item/FormItem.Settings.js");
|
|
57
57
|
const utils_js_namespaceObject = require("../../../../schema-component/antd/form-v2/utils.js");
|
|
58
58
|
const external_schema_settings_index_js_namespaceObject = require("../../../../schema-settings/index.js");
|
|
59
|
-
const useIsAllowToSetDefaultValue_js_namespaceObject = require("../../../../schema-settings/hooks/useIsAllowToSetDefaultValue.js");
|
|
60
59
|
const type_js_namespaceObject = require("../../../../schema-settings/LinkageRules/type.js");
|
|
61
|
-
const SchemaSettingsDefaultValue_js_namespaceObject = require("../../../../schema-settings/SchemaSettingsDefaultValue.js");
|
|
62
60
|
const fieldSettingsFormItem = new SchemaSettings_js_namespaceObject.SchemaSettings({
|
|
63
61
|
name: 'fieldSettings:FormItem',
|
|
64
62
|
items: [
|
|
@@ -261,10 +259,10 @@ const fieldSettingsFormItem = new SchemaSettings_js_namespaceObject.SchemaSettin
|
|
|
261
259
|
{
|
|
262
260
|
name: 'setDefaultValue',
|
|
263
261
|
useVisible () {
|
|
264
|
-
const { isAllowToSetDefaultValue } = (0,
|
|
262
|
+
const { isAllowToSetDefaultValue } = (0, external_schema_settings_index_js_namespaceObject.useIsAllowToSetDefaultValue)();
|
|
265
263
|
return isAllowToSetDefaultValue();
|
|
266
264
|
},
|
|
267
|
-
Component:
|
|
265
|
+
Component: external_schema_settings_index_js_namespaceObject.SchemaSettingsDefaultValue
|
|
268
266
|
},
|
|
269
267
|
{
|
|
270
268
|
name: 'layoutDirection',
|
|
@@ -522,6 +520,13 @@ const fieldSettingsFormItem = new SchemaSettings_js_namespaceObject.SchemaSettin
|
|
|
522
520
|
const validateSchema = (0, external_schema_component_index_js_namespaceObject.useValidateSchema)();
|
|
523
521
|
return form && !isFormReadPretty && validateSchema;
|
|
524
522
|
}
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
...external_data_source_index_js_namespaceObject.fieldComponentSettingsItem
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
name: 'editDefaultValue',
|
|
529
|
+
Component: external_schema_settings_index_js_namespaceObject.SchemaSettingsDefaultValue
|
|
525
530
|
}
|
|
526
531
|
];
|
|
527
532
|
}
|
|
@@ -51,11 +51,11 @@ const FilterProvider_js_namespaceObject = require("../../../../../filter-provide
|
|
|
51
51
|
const utils_js_namespaceObject = require("../../../../../filter-provider/utils.js");
|
|
52
52
|
const external_schema_component_index_js_namespaceObject = require("../../../../../schema-component/index.js");
|
|
53
53
|
const useTableBlockProps = ()=>{
|
|
54
|
-
var _fieldSchema_parent_xdecoratorprops, _fieldSchema_parent, _ctx_service, _ctx_service1, _ctx_field_data, _ctx_field, _ctx_service2, _ctx_service3, _fieldSchema_xcomponentprops;
|
|
54
|
+
var _fieldSchema_parent_xdecoratorprops, _fieldSchema_parent, _fieldSchema_parent_xdecoratorprops1, _fieldSchema_parent1, _ctx_service, _ctx_service1, _ctx_field_data, _ctx_field, _ctx_service2, _ctx_service3, _fieldSchema_xcomponentprops;
|
|
55
55
|
const field = (0, schema_namespaceObject.useField)();
|
|
56
56
|
const fieldSchema = (0, schema_namespaceObject.useFieldSchema)();
|
|
57
57
|
const ctx = (0, TableBlockProvider_js_namespaceObject.useTableBlockContext)();
|
|
58
|
-
const globalSort = null === (_fieldSchema_parent = fieldSchema.parent) || void 0 === _fieldSchema_parent ? void 0 : null === (_fieldSchema_parent_xdecoratorprops = _fieldSchema_parent['x-decorator-props']) || void 0 === _fieldSchema_parent_xdecoratorprops ? void 0 : _fieldSchema_parent_xdecoratorprops['dragSortBy'];
|
|
58
|
+
const globalSort = (null === (_fieldSchema_parent = fieldSchema.parent) || void 0 === _fieldSchema_parent ? void 0 : null === (_fieldSchema_parent_xdecoratorprops = _fieldSchema_parent['x-decorator-props']) || void 0 === _fieldSchema_parent_xdecoratorprops ? void 0 : _fieldSchema_parent_xdecoratorprops['dragSort']) === true ? null === (_fieldSchema_parent1 = fieldSchema.parent) || void 0 === _fieldSchema_parent1 ? void 0 : null === (_fieldSchema_parent_xdecoratorprops1 = _fieldSchema_parent1['x-decorator-props']) || void 0 === _fieldSchema_parent_xdecoratorprops1 ? void 0 : _fieldSchema_parent_xdecoratorprops1['dragSortBy'] : void 0;
|
|
59
59
|
const { getDataBlocks } = (0, FilterProvider_js_namespaceObject.useFilterBlock)();
|
|
60
60
|
const isLoading = null == ctx ? void 0 : null === (_ctx_service = ctx.service) || void 0 === _ctx_service ? void 0 : _ctx_service.loading;
|
|
61
61
|
null == ctx || null === (_ctx_service1 = ctx.service) || void 0 === _ctx_service1 || _ctx_service1.params;
|
|
@@ -121,6 +121,10 @@ const tableBlockSettings = new SchemaSettings_js_namespaceObject.SchemaSettings(
|
|
|
121
121
|
const sortBy = null == data ? void 0 : null === (_data_data = data.data) || void 0 === _data_data ? void 0 : null === (_data_data_ = _data_data[0]) || void 0 === _data_data_ ? void 0 : _data_data_.sortBy;
|
|
122
122
|
fieldSchema['x-decorator-props'].dragSortBy = sortBy;
|
|
123
123
|
}
|
|
124
|
+
if (!dragSort) {
|
|
125
|
+
fieldSchema['x-decorator-props'].dragSortBy = null;
|
|
126
|
+
field.decoratorProps.dragSortBy = null;
|
|
127
|
+
}
|
|
124
128
|
field.decoratorProps.dragSort = dragSort;
|
|
125
129
|
fieldSchema['x-decorator-props'].dragSort = dragSort;
|
|
126
130
|
service.run({
|
|
@@ -138,6 +138,50 @@ const tableColumnSettings = new SchemaSettings_js_namespaceObject.SchemaSettings
|
|
|
138
138
|
};
|
|
139
139
|
}
|
|
140
140
|
},
|
|
141
|
+
{
|
|
142
|
+
name: 'columnAlign',
|
|
143
|
+
type: 'select',
|
|
144
|
+
useComponentProps () {
|
|
145
|
+
var _fieldSchema_xcomponentprops;
|
|
146
|
+
const fieldSchema = (0, schema_namespaceObject.useFieldSchema)();
|
|
147
|
+
const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
|
|
148
|
+
const field = (0, schema_namespaceObject.useField)();
|
|
149
|
+
const { dn } = (0, external_schema_component_index_js_namespaceObject.useDesignable)();
|
|
150
|
+
return {
|
|
151
|
+
key: 'align',
|
|
152
|
+
title: t('Align'),
|
|
153
|
+
options: [
|
|
154
|
+
{
|
|
155
|
+
label: t('Left'),
|
|
156
|
+
value: 'left'
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
label: t('Center'),
|
|
160
|
+
value: 'center'
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
label: t('Right'),
|
|
164
|
+
value: 'right'
|
|
165
|
+
}
|
|
166
|
+
],
|
|
167
|
+
value: (null === (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) || void 0 === _fieldSchema_xcomponentprops ? void 0 : _fieldSchema_xcomponentprops.align) || 'left',
|
|
168
|
+
onChange: (align)=>{
|
|
169
|
+
const props = fieldSchema['x-component-props'] || {};
|
|
170
|
+
props['align'] = align;
|
|
171
|
+
const schema = {
|
|
172
|
+
['x-uid']: fieldSchema['x-uid']
|
|
173
|
+
};
|
|
174
|
+
schema['x-component-props'] = props;
|
|
175
|
+
fieldSchema['x-component-props'] = props;
|
|
176
|
+
field.componentProps.align = align;
|
|
177
|
+
dn.emit('patch', {
|
|
178
|
+
schema
|
|
179
|
+
});
|
|
180
|
+
dn.refresh();
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
},
|
|
141
185
|
{
|
|
142
186
|
name: 'sortable',
|
|
143
187
|
type: 'switch',
|
|
@@ -48,6 +48,7 @@ const external_react_i18next_namespaceObject = require("react-i18next");
|
|
|
48
48
|
const SchemaSettings_js_namespaceObject = require("../../../../application/schema-settings/SchemaSettings.js");
|
|
49
49
|
const index_js_namespaceObject = require("../../../../block-provider/index.js");
|
|
50
50
|
const external_collection_manager_index_js_namespaceObject = require("../../../../collection-manager/index.js");
|
|
51
|
+
const external_data_source_index_js_namespaceObject = require("../../../../data-source/index.js");
|
|
51
52
|
const external_schema_component_index_js_namespaceObject = require("../../../../schema-component/index.js");
|
|
52
53
|
const external_schema_settings_index_js_namespaceObject = require("../../../../schema-settings/index.js");
|
|
53
54
|
const SchemaSettingsDataScope_js_namespaceObject = require("../../../../schema-settings/SchemaSettingsDataScope.js");
|
|
@@ -227,6 +228,9 @@ const filterCollapseItemFieldSettings = new SchemaSettings_js_namespaceObject.Sc
|
|
|
227
228
|
onChange: onTitleFieldChange
|
|
228
229
|
};
|
|
229
230
|
}
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
...external_data_source_index_js_namespaceObject.fieldComponentSettingsItem
|
|
230
234
|
}
|
|
231
235
|
];
|
|
232
236
|
}
|
|
@@ -50,7 +50,9 @@ const index_js_namespaceObject = require("../../../../application/index.js");
|
|
|
50
50
|
const SchemaSettings_js_namespaceObject = require("../../../../application/schema-settings/SchemaSettings.js");
|
|
51
51
|
const external_collection_manager_index_js_namespaceObject = require("../../../../collection-manager/index.js");
|
|
52
52
|
const useFieldComponentName_js_namespaceObject = require("../../../../common/useFieldComponentName.js");
|
|
53
|
+
const external_data_source_index_js_namespaceObject = require("../../../../data-source/index.js");
|
|
53
54
|
const external_schema_component_index_js_namespaceObject = require("../../../../schema-component/index.js");
|
|
55
|
+
const external_schema_settings_index_js_namespaceObject = require("../../../../schema-settings/index.js");
|
|
54
56
|
const filterFormItemFieldSettings = new SchemaSettings_js_namespaceObject.SchemaSettings({
|
|
55
57
|
name: 'fieldSettings:FilterFormItem',
|
|
56
58
|
items: [
|
|
@@ -352,6 +354,13 @@ const filterFormItemFieldSettings = new SchemaSettings_js_namespaceObject.Schema
|
|
|
352
354
|
{
|
|
353
355
|
name: 'operator',
|
|
354
356
|
Component: external_schema_component_index_js_namespaceObject.EditOperator
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
...external_data_source_index_js_namespaceObject.fieldComponentSettingsItem
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
name: 'editDefaultValue',
|
|
363
|
+
Component: external_schema_settings_index_js_namespaceObject.SchemaSettingsDefaultValue
|
|
355
364
|
}
|
|
356
365
|
];
|
|
357
366
|
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = function(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 = function(obj, prop) {
|
|
13
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
(()=>{
|
|
17
|
+
__webpack_require__.r = function(exports1) {
|
|
18
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
19
|
+
value: 'Module'
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
22
|
+
value: true
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
})();
|
|
26
|
+
var __webpack_exports__ = {};
|
|
27
|
+
__webpack_require__.r(__webpack_exports__);
|
|
28
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
29
|
+
SecondLevelSelect: ()=>SecondLevelSelect
|
|
30
|
+
});
|
|
31
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
32
|
+
const external_react_namespaceObject = require("react");
|
|
33
|
+
const schema_namespaceObject = require("@tachybase/schema");
|
|
34
|
+
const icons_namespaceObject = require("@ant-design/icons");
|
|
35
|
+
const external_antd_namespaceObject = require("antd");
|
|
36
|
+
const external_react_i18next_namespaceObject = require("react-i18next");
|
|
37
|
+
const index_js_namespaceObject = require("../../../../data-source/index.js");
|
|
38
|
+
const external_schema_component_index_js_namespaceObject = require("../../../../schema-component/index.js");
|
|
39
|
+
const ReadPretty_js_namespaceObject = require("../../../../schema-component/antd/select/ReadPretty.js");
|
|
40
|
+
const filterOption = (input, option)=>{
|
|
41
|
+
var _option_label;
|
|
42
|
+
return (null !== (_option_label = null == option ? void 0 : option.label) && void 0 !== _option_label ? _option_label : '').toLowerCase().includes((input || '').toLowerCase());
|
|
43
|
+
};
|
|
44
|
+
const SecondLevelSelect = (0, schema_namespaceObject.connect)((props)=>{
|
|
45
|
+
const { objectValue, loading, value, rawOptions, defaultValue, firstLevelValue, collectionField, ...others } = props;
|
|
46
|
+
const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
|
|
47
|
+
const compile = (0, external_schema_component_index_js_namespaceObject.useCompile)();
|
|
48
|
+
const cm = (0, index_js_namespaceObject.useCollectionManager)();
|
|
49
|
+
let mode = props.multiple ? 'multiple' : props.mode;
|
|
50
|
+
if (mode && ![
|
|
51
|
+
'multiple',
|
|
52
|
+
'tags'
|
|
53
|
+
].includes(mode)) mode = void 0;
|
|
54
|
+
const toValue = (v)=>{
|
|
55
|
+
if ([
|
|
56
|
+
'tags',
|
|
57
|
+
'multiple'
|
|
58
|
+
].includes(props.mode) || props.multiple) {
|
|
59
|
+
if (v) return (0, schema_namespaceObject.toArr)(v);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
return v;
|
|
63
|
+
};
|
|
64
|
+
const Parentoptions = cm.getCollectionFields("".concat(collectionField, ".").concat(firstLevelValue));
|
|
65
|
+
const fieldParentTabsOptions = Parentoptions.map((item)=>{
|
|
66
|
+
if ('m2o' === item.interface) return {
|
|
67
|
+
...item,
|
|
68
|
+
label: compile(item.uiSchema.title),
|
|
69
|
+
value: item.name
|
|
70
|
+
};
|
|
71
|
+
}).filter(Boolean);
|
|
72
|
+
fieldParentTabsOptions.unshift({
|
|
73
|
+
label: t('none'),
|
|
74
|
+
value: 'none'
|
|
75
|
+
});
|
|
76
|
+
const matchedOption = fieldParentTabsOptions.find((option)=>option.value === value);
|
|
77
|
+
const newValue = matchedOption ? value : 'none';
|
|
78
|
+
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
79
|
+
if (!matchedOption) {
|
|
80
|
+
var _props_onChange;
|
|
81
|
+
null === (_props_onChange = props.onChange) || void 0 === _props_onChange || _props_onChange.call(props, 'none');
|
|
82
|
+
}
|
|
83
|
+
}, [
|
|
84
|
+
value,
|
|
85
|
+
fieldParentTabsOptions
|
|
86
|
+
]);
|
|
87
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Select, {
|
|
88
|
+
role: "button",
|
|
89
|
+
"data-testid": "select-".concat(mode || 'single'),
|
|
90
|
+
showSearch: true,
|
|
91
|
+
filterOption: filterOption,
|
|
92
|
+
allowClear: {
|
|
93
|
+
clearIcon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.CloseCircleFilled, {
|
|
94
|
+
role: "button",
|
|
95
|
+
"aria-label": "icon-close-select"
|
|
96
|
+
})
|
|
97
|
+
},
|
|
98
|
+
popupMatchSelectWidth: false,
|
|
99
|
+
notFoundContent: loading ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Spin, {}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Empty, {
|
|
100
|
+
image: external_antd_namespaceObject.Empty.PRESENTED_IMAGE_SIMPLE
|
|
101
|
+
}),
|
|
102
|
+
value: toValue(newValue),
|
|
103
|
+
defaultValue: toValue(defaultValue),
|
|
104
|
+
tagRender: (props)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Tag, {
|
|
105
|
+
role: "button",
|
|
106
|
+
"aria-label": props.label,
|
|
107
|
+
closeIcon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.CloseOutlined, {
|
|
108
|
+
role: "button",
|
|
109
|
+
"aria-label": "icon-close-tag"
|
|
110
|
+
}),
|
|
111
|
+
...props,
|
|
112
|
+
children: props.label
|
|
113
|
+
}),
|
|
114
|
+
options: fieldParentTabsOptions,
|
|
115
|
+
...others,
|
|
116
|
+
onChange: (changed)=>{
|
|
117
|
+
var _props_onChange;
|
|
118
|
+
null === (_props_onChange = props.onChange) || void 0 === _props_onChange || _props_onChange.call(props, void 0 === changed ? null : changed);
|
|
119
|
+
},
|
|
120
|
+
mode: mode
|
|
121
|
+
});
|
|
122
|
+
}, (0, schema_namespaceObject.mapProps)({
|
|
123
|
+
dataSource: 'options'
|
|
124
|
+
}, (props, field)=>({
|
|
125
|
+
...props,
|
|
126
|
+
fieldNames: {
|
|
127
|
+
...external_schema_component_index_js_namespaceObject.defaultFieldNames,
|
|
128
|
+
...props.fieldNames
|
|
129
|
+
},
|
|
130
|
+
suffixIcon: (null == field ? void 0 : field['loading']) || (null == field ? void 0 : field['validating']) ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.LoadingOutlined, {}) : props.suffixIcon
|
|
131
|
+
})), (0, schema_namespaceObject.mapReadPretty)(ReadPretty_js_namespaceObject.ReadPretty));
|
|
132
|
+
var __webpack_export_target__ = exports;
|
|
133
|
+
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
134
|
+
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
135
|
+
value: true
|
|
136
|
+
});
|
|
@@ -26,13 +26,12 @@ var __webpack_require__ = {};
|
|
|
26
26
|
var __webpack_exports__ = {};
|
|
27
27
|
__webpack_require__.r(__webpack_exports__);
|
|
28
28
|
__webpack_require__.d(__webpack_exports__, {
|
|
29
|
-
setQuickAddTabs: ()=>setQuickAddTabs,
|
|
30
29
|
subTablePopoverComponentFieldSettings: ()=>subTablePopoverComponentFieldSettings,
|
|
31
30
|
allowAddNewData: ()=>allowAddNewData,
|
|
32
|
-
|
|
33
|
-
setDefaultSortingRules: ()=>setDefaultSortingRules
|
|
34
|
-
setQuickAddParentTabs: ()=>setQuickAddParentTabs
|
|
31
|
+
clickToSelect: ()=>clickToSelect,
|
|
32
|
+
setDefaultSortingRules: ()=>setDefaultSortingRules
|
|
35
33
|
});
|
|
34
|
+
const external_react_namespaceObject = require("react");
|
|
36
35
|
const components_namespaceObject = require("@tachybase/components");
|
|
37
36
|
const schema_namespaceObject = require("@tachybase/schema");
|
|
38
37
|
const external_react_i18next_namespaceObject = require("react-i18next");
|
|
@@ -43,6 +42,7 @@ const external_data_source_index_js_namespaceObject = require("../../../../data-
|
|
|
43
42
|
const external_schema_component_index_js_namespaceObject = require("../../../../schema-component/index.js");
|
|
44
43
|
const util_js_namespaceObject = require("../../../../schema-component/antd/association-field/util.js");
|
|
45
44
|
const form_item_index_js_namespaceObject = require("../../../../schema-component/antd/form-item/index.js");
|
|
45
|
+
const external_secondLevelSelect_js_namespaceObject = require("./secondLevelSelect.js");
|
|
46
46
|
const fieldComponent = {
|
|
47
47
|
name: 'fieldComponent',
|
|
48
48
|
type: 'select',
|
|
@@ -268,51 +268,24 @@ const allowAddNewData = {
|
|
|
268
268
|
};
|
|
269
269
|
}
|
|
270
270
|
};
|
|
271
|
-
const
|
|
272
|
-
name: '
|
|
273
|
-
type: '
|
|
271
|
+
const clickToSelect = {
|
|
272
|
+
name: 'clicktoselect',
|
|
273
|
+
type: 'modal',
|
|
274
274
|
useVisible () {
|
|
275
275
|
const readPretty = (0, form_item_index_js_namespaceObject.useIsFieldReadPretty)();
|
|
276
276
|
const isAssociationField = (0, form_item_index_js_namespaceObject.useIsAssociationField)();
|
|
277
277
|
return !readPretty && isAssociationField;
|
|
278
278
|
},
|
|
279
279
|
useComponentProps () {
|
|
280
|
-
var _fieldSchema_xcomponentprops;
|
|
280
|
+
var _fieldSchema_xcomponentprops_quickAddField, _fieldSchema_xcomponentprops_quickAddParentCollection, _fieldSchema_xcomponentprops, _fieldSchema_xcomponentprops1;
|
|
281
281
|
const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
|
|
282
282
|
const field = (0, schema_namespaceObject.useField)();
|
|
283
283
|
const fieldSchema = (0, schema_namespaceObject.useFieldSchema)();
|
|
284
284
|
const { dn, refresh } = (0, external_schema_component_index_js_namespaceObject.useDesignable)();
|
|
285
|
-
return {
|
|
286
|
-
title: t('Is Quick Add Tabs'),
|
|
287
|
-
checked: (null === (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) || void 0 === _fieldSchema_xcomponentprops ? void 0 : _fieldSchema_xcomponentprops.isQuickAdd) || false,
|
|
288
|
-
onChange (value) {
|
|
289
|
-
const schema = {
|
|
290
|
-
['x-uid']: fieldSchema['x-uid']
|
|
291
|
-
};
|
|
292
|
-
field.componentProps['isQuickAdd'] = value;
|
|
293
|
-
fieldSchema['x-component-props'] = fieldSchema['x-component-props'] || {};
|
|
294
|
-
fieldSchema['x-component-props']['isQuickAdd'] = value;
|
|
295
|
-
schema['x-component-props'] = fieldSchema['x-component-props'];
|
|
296
|
-
dn.emit('patch', {
|
|
297
|
-
schema
|
|
298
|
-
});
|
|
299
|
-
refresh();
|
|
300
|
-
}
|
|
301
|
-
};
|
|
302
|
-
}
|
|
303
|
-
};
|
|
304
|
-
const setQuickAddTabs = {
|
|
305
|
-
name: 'setquickaddtabs',
|
|
306
|
-
type: 'select',
|
|
307
|
-
useComponentProps () {
|
|
308
|
-
const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
|
|
309
|
-
const field = (0, schema_namespaceObject.useField)();
|
|
310
285
|
const compile = (0, external_schema_component_index_js_namespaceObject.useCompile)();
|
|
311
|
-
const fieldSchema = (0, schema_namespaceObject.useFieldSchema)();
|
|
312
286
|
const cm = (0, external_data_source_index_js_namespaceObject.useCollectionManager)();
|
|
287
|
+
const [firstLevelValue, setFirstLevelValue] = (0, external_react_namespaceObject.useState)((null === (_fieldSchema_xcomponentprops_quickAddField = fieldSchema['x-component-props']['quickAddField']) || void 0 === _fieldSchema_xcomponentprops_quickAddField ? void 0 : _fieldSchema_xcomponentprops_quickAddField.value) || 'none');
|
|
313
288
|
const options = cm.getCollection(fieldSchema['x-collection-field']);
|
|
314
|
-
const defVal = fieldSchema['x-component-props']['quickAddField'] || 'none';
|
|
315
|
-
const { dn } = (0, external_schema_component_index_js_namespaceObject.useDesignable)();
|
|
316
289
|
const isAddNewForm = (0, external_schema_component_index_js_namespaceObject.useIsAddNewForm)();
|
|
317
290
|
const fieldTabsOptions = options.fields.map((item)=>{
|
|
318
291
|
if ('m2o' === item.interface || 'select' === item.interface) {
|
|
@@ -328,84 +301,117 @@ const setQuickAddTabs = {
|
|
|
328
301
|
label: 'none',
|
|
329
302
|
value: 'none'
|
|
330
303
|
});
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
options: fieldTabsOptions,
|
|
334
|
-
value: defVal,
|
|
335
|
-
onChange (mode) {
|
|
336
|
-
const schema = {
|
|
337
|
-
['x-uid']: fieldSchema['x-uid']
|
|
338
|
-
};
|
|
339
|
-
fieldSchema['x-component-props'] = fieldSchema['x-component-props'] || {};
|
|
340
|
-
fieldSchema['x-component-props']['quickAddField'] = {
|
|
341
|
-
fieldInterface: fieldTabsOptions.find((item)=>item.value === mode)['interface'] || 'none',
|
|
342
|
-
value: mode
|
|
343
|
-
};
|
|
344
|
-
schema['x-component-props'] = fieldSchema['x-component-props'];
|
|
345
|
-
field.componentProps = field.componentProps || {};
|
|
346
|
-
field.componentProps['quickAddField'] = fieldSchema['x-component-props']['quickAddField'];
|
|
347
|
-
if ((0, util_js_namespaceObject.isSubMode)(fieldSchema) && isAddNewForm) {
|
|
348
|
-
schema.default = null;
|
|
349
|
-
fieldSchema.default = null;
|
|
350
|
-
field.setInitialValue(null);
|
|
351
|
-
field.setValue(null);
|
|
352
|
-
}
|
|
353
|
-
dn.emit('patch', {
|
|
354
|
-
schema
|
|
355
|
-
});
|
|
356
|
-
dn.refresh();
|
|
357
|
-
}
|
|
358
|
-
};
|
|
359
|
-
},
|
|
360
|
-
useVisible () {
|
|
361
|
-
const fieldSchema = (0, schema_namespaceObject.useFieldSchema)();
|
|
362
|
-
return fieldSchema['x-component-props']['isQuickAdd'];
|
|
363
|
-
}
|
|
364
|
-
};
|
|
365
|
-
const setQuickAddParentTabs = {
|
|
366
|
-
name: 'setquickaddparenttabs',
|
|
367
|
-
type: 'select',
|
|
368
|
-
useComponentProps () {
|
|
369
|
-
var _fieldSchema_xcomponentprops, _fieldSchema_xcomponentprops_quickAddParentCollection, _fieldSchema_xcomponentprops1;
|
|
370
|
-
const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
|
|
371
|
-
const field = (0, schema_namespaceObject.useField)();
|
|
372
|
-
const compile = (0, external_schema_component_index_js_namespaceObject.useCompile)();
|
|
373
|
-
const fieldSchema = (0, schema_namespaceObject.useFieldSchema)();
|
|
374
|
-
const cm = (0, external_data_source_index_js_namespaceObject.useCollectionManager)();
|
|
375
|
-
const { value: quickField } = (null === (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) || void 0 === _fieldSchema_xcomponentprops ? void 0 : _fieldSchema_xcomponentprops['quickAddField']) || {};
|
|
376
|
-
const options = cm.getCollectionFields("".concat(fieldSchema['x-collection-field'], ".").concat(quickField));
|
|
377
|
-
const { dn } = (0, external_schema_component_index_js_namespaceObject.useDesignable)();
|
|
378
|
-
const isAddNewForm = (0, external_schema_component_index_js_namespaceObject.useIsAddNewForm)();
|
|
379
|
-
const fieldTabsOptions = options.map((item)=>{
|
|
304
|
+
const Parentoptions = cm.getCollectionFields("".concat(fieldSchema['x-collection-field'], ".").concat(firstLevelValue));
|
|
305
|
+
const fieldParentTabsOptions = Parentoptions.map((item)=>{
|
|
380
306
|
if ('m2o' === item.interface) return {
|
|
381
307
|
...item,
|
|
382
308
|
label: compile(item.uiSchema.title),
|
|
383
309
|
value: item.name
|
|
384
310
|
};
|
|
385
311
|
}).filter(Boolean);
|
|
386
|
-
|
|
312
|
+
fieldParentTabsOptions.unshift({
|
|
387
313
|
label: t('none'),
|
|
388
314
|
value: 'none'
|
|
389
315
|
});
|
|
390
|
-
const
|
|
316
|
+
const defParentVal = (null === (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) || void 0 === _fieldSchema_xcomponentprops ? void 0 : null === (_fieldSchema_xcomponentprops_quickAddParentCollection = _fieldSchema_xcomponentprops['quickAddParentCollection']) || void 0 === _fieldSchema_xcomponentprops_quickAddParentCollection ? void 0 : _fieldSchema_xcomponentprops_quickAddParentCollection.value) || 'none';
|
|
317
|
+
const schema = {
|
|
318
|
+
type: 'object',
|
|
319
|
+
title: t('Click to select'),
|
|
320
|
+
properties: {
|
|
321
|
+
isquickaddtabs: {
|
|
322
|
+
title: t('Enable quick create'),
|
|
323
|
+
type: 'boolean',
|
|
324
|
+
default: (null === (_fieldSchema_xcomponentprops1 = fieldSchema['x-component-props']) || void 0 === _fieldSchema_xcomponentprops1 ? void 0 : _fieldSchema_xcomponentprops1.isQuickAdd) || false,
|
|
325
|
+
'x-decorator': 'FormItem',
|
|
326
|
+
'x-component': 'Switch',
|
|
327
|
+
'x-component-props': {}
|
|
328
|
+
},
|
|
329
|
+
firstLevelselection: {
|
|
330
|
+
title: t('Set Quick Add Tabs'),
|
|
331
|
+
default: firstLevelValue,
|
|
332
|
+
'x-decorator': 'FormItem',
|
|
333
|
+
'x-component': 'Select',
|
|
334
|
+
enum: fieldTabsOptions,
|
|
335
|
+
'x-reactions': [
|
|
336
|
+
{
|
|
337
|
+
dependencies: [
|
|
338
|
+
'isquickaddtabs'
|
|
339
|
+
],
|
|
340
|
+
fulfill: {
|
|
341
|
+
state: {
|
|
342
|
+
visible: '{{$deps[0] === true}}'
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
],
|
|
347
|
+
'x-component-props': {
|
|
348
|
+
onChange (value) {
|
|
349
|
+
setFirstLevelValue(value);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
secondLevelselection: {
|
|
354
|
+
title: t('Set Quick Add Parent Tabs'),
|
|
355
|
+
default: defParentVal,
|
|
356
|
+
'x-decorator': 'FormItem',
|
|
357
|
+
'x-component': 'SecondLevelSelect',
|
|
358
|
+
'x-reactions': [
|
|
359
|
+
{
|
|
360
|
+
dependencies: [
|
|
361
|
+
'firstLevelselection',
|
|
362
|
+
'isquickaddtabs'
|
|
363
|
+
],
|
|
364
|
+
fulfill: {
|
|
365
|
+
state: {
|
|
366
|
+
visible: '{{$deps[0] !== "none" && $deps[1] === true}}'
|
|
367
|
+
},
|
|
368
|
+
schema: {
|
|
369
|
+
'x-component-props': {
|
|
370
|
+
firstLevelValue: '{{$deps[0]}}',
|
|
371
|
+
collectionField: fieldSchema['x-collection-field']
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
]
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
};
|
|
391
380
|
return {
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
381
|
+
components: {
|
|
382
|
+
Switch: components_namespaceObject.Switch,
|
|
383
|
+
SecondLevelSelect: external_secondLevelSelect_js_namespaceObject.SecondLevelSelect
|
|
384
|
+
},
|
|
385
|
+
title: t('Quick create'),
|
|
386
|
+
schema,
|
|
387
|
+
onSubmit: async (param)=>{
|
|
388
|
+
let { isquickaddtabs, firstLevelselection, secondLevelselection } = param;
|
|
389
|
+
var _fieldTabsOptions_find;
|
|
396
390
|
const schema = {
|
|
397
391
|
['x-uid']: fieldSchema['x-uid']
|
|
398
392
|
};
|
|
393
|
+
field.componentProps['isQuickAdd'] = isquickaddtabs;
|
|
394
|
+
fieldSchema['x-component-props'] = fieldSchema['x-component-props'] || {};
|
|
395
|
+
fieldSchema['x-component-props']['isQuickAdd'] = isquickaddtabs;
|
|
396
|
+
schema['x-component-props'] = fieldSchema['x-component-props'];
|
|
397
|
+
fieldSchema['x-component-props'] = fieldSchema['x-component-props'] || {};
|
|
398
|
+
fieldSchema['x-component-props']['quickAddField'] = {
|
|
399
|
+
fieldInterface: (null === (_fieldTabsOptions_find = fieldTabsOptions.find((item)=>item.value === firstLevelselection)) || void 0 === _fieldTabsOptions_find ? void 0 : _fieldTabsOptions_find['interface']) || 'none',
|
|
400
|
+
value: firstLevelselection
|
|
401
|
+
};
|
|
402
|
+
schema['x-component-props'] = fieldSchema['x-component-props'];
|
|
403
|
+
field.componentProps = field.componentProps || {};
|
|
404
|
+
field.componentProps['quickAddField'] = fieldSchema['x-component-props']['quickAddField'];
|
|
399
405
|
fieldSchema['x-component-props'] = fieldSchema['x-component-props'] || {};
|
|
400
406
|
fieldSchema['x-component-props']['quickAddParentCollection'] = {
|
|
401
|
-
collectionField: "".concat(fieldSchema['x-collection-field'], ".").concat(
|
|
402
|
-
value:
|
|
407
|
+
collectionField: "".concat(fieldSchema['x-collection-field'], ".").concat(firstLevelselection, ".").concat(secondLevelselection),
|
|
408
|
+
value: secondLevelselection
|
|
403
409
|
};
|
|
404
410
|
schema['x-component-props'] = fieldSchema['x-component-props'];
|
|
405
411
|
field.componentProps = field.componentProps || {};
|
|
406
412
|
field.componentProps['quickAddParentCollection'] = {
|
|
407
|
-
collectionField: "".concat(fieldSchema['x-collection-field'], ".").concat(
|
|
408
|
-
value:
|
|
413
|
+
collectionField: "".concat(fieldSchema['x-collection-field'], ".").concat(firstLevelselection, ".").concat(secondLevelselection),
|
|
414
|
+
value: secondLevelselection
|
|
409
415
|
};
|
|
410
416
|
if ((0, util_js_namespaceObject.isSubMode)(fieldSchema) && isAddNewForm) {
|
|
411
417
|
schema.default = null;
|
|
@@ -414,15 +420,12 @@ const setQuickAddParentTabs = {
|
|
|
414
420
|
field.setValue(null);
|
|
415
421
|
}
|
|
416
422
|
dn.emit('patch', {
|
|
417
|
-
schema
|
|
423
|
+
schema: schema
|
|
418
424
|
});
|
|
425
|
+
refresh();
|
|
419
426
|
dn.refresh();
|
|
420
427
|
}
|
|
421
428
|
};
|
|
422
|
-
},
|
|
423
|
-
useVisible () {
|
|
424
|
-
const fieldSchema = (0, schema_namespaceObject.useFieldSchema)();
|
|
425
|
-
return fieldSchema['x-component-props']['isQuickAdd'] && fieldSchema['x-component-props']['quickAddField'] && 'none' !== fieldSchema['x-component-props']['quickAddField'];
|
|
426
429
|
}
|
|
427
430
|
};
|
|
428
431
|
const subTablePopoverComponentFieldSettings = new SchemaSettings_js_namespaceObject.SchemaSettings({
|
|
@@ -432,9 +435,7 @@ const subTablePopoverComponentFieldSettings = new SchemaSettings_js_namespaceObj
|
|
|
432
435
|
allowAddNewData,
|
|
433
436
|
allowSelectExistingRecord,
|
|
434
437
|
setDefaultSortingRules,
|
|
435
|
-
|
|
436
|
-
setQuickAddTabs,
|
|
437
|
-
setQuickAddParentTabs
|
|
438
|
+
clickToSelect
|
|
438
439
|
]
|
|
439
440
|
});
|
|
440
441
|
var __webpack_export_target__ = exports;
|
package/lib/powered-by/index.js
CHANGED
|
@@ -29,7 +29,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29
29
|
PoweredBy: ()=>PoweredBy
|
|
30
30
|
});
|
|
31
31
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
32
|
-
require("react");
|
|
32
|
+
const external_react_i18next_namespaceObject = require("react-i18next");
|
|
33
33
|
const index_js_namespaceObject = require("../style/index.js");
|
|
34
34
|
function _tagged_template_literal(strings, raw) {
|
|
35
35
|
if (!raw) raw = strings.slice(0);
|
|
@@ -61,13 +61,10 @@ const PoweredBy = ()=>{
|
|
|
61
61
|
const { styles } = useStyles();
|
|
62
62
|
const date = new Date();
|
|
63
63
|
const year = date.getFullYear();
|
|
64
|
-
|
|
64
|
+
const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
|
|
65
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
65
66
|
className: styles.powerBy,
|
|
66
|
-
children:
|
|
67
|
-
"\xa92023-",
|
|
68
|
-
year,
|
|
69
|
-
" TachyBase Team"
|
|
70
|
-
]
|
|
67
|
+
children: "\xa92023-".concat(year, " ").concat(t('TachyBase Team'))
|
|
71
68
|
});
|
|
72
69
|
};
|
|
73
70
|
var __webpack_export_target__ = exports;
|