@tachybase/client 0.23.48 → 0.23.58
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.d.ts +3 -0
- package/es/application/Application.mjs +8 -0
- package/es/application/hooks/index.d.ts +1 -0
- package/es/application/hooks/index.mjs +1 -0
- package/es/application/hooks/useGlobalVariable.d.ts +1 -0
- package/es/application/hooks/useGlobalVariable.mjs +18 -0
- package/es/application/schema-settings/hooks/index.d.ts +1 -1
- package/es/application/schema-settings/hooks/index.mjs +6 -8
- package/es/block-provider/hooks/index.mjs +4 -1
- package/es/built-in/index.mjs +3 -0
- package/es/built-in/locale/LocalePlugin.mjs +5 -1
- package/es/built-in/system-settings/SystemSettingsProvider.d.ts +2 -3
- package/es/built-in/system-settings/SystemSettingsProvider.mjs +4 -3
- package/es/built-in/system-settings/SystemSettingsShortcut.mjs +11 -8
- package/es/collection-manager/Configuration/AddCollectionAction.mjs +12 -2
- package/es/collection-manager/Configuration/ImportXlsx/ImportXlsxMetaAction.d.ts +2 -0
- package/es/collection-manager/Configuration/ImportXlsx/ImportXlsxMetaAction.mjs +255 -0
- package/es/collection-manager/Configuration/ImportXlsx/XlsxCollectionSchema.d.ts +89 -0
- package/es/collection-manager/Configuration/ImportXlsx/XlsxCollectionSchema.mjs +96 -0
- package/es/collection-manager/Configuration/ImportXlsx/XlsxEditFieldAction.d.ts +3 -0
- package/es/collection-manager/Configuration/ImportXlsx/XlsxEditFieldAction.mjs +47 -0
- package/es/collection-manager/Configuration/ImportXlsx/setUpdateXlsxCollectionField.d.ts +3 -0
- package/es/collection-manager/Configuration/ImportXlsx/setUpdateXlsxCollectionField.mjs +44 -0
- package/es/collection-manager/Configuration/ImportXlsx/xlsxFieldsConfigure.d.ts +1 -0
- package/es/collection-manager/Configuration/ImportXlsx/xlsxFieldsConfigure.mjs +380 -0
- package/es/collection-manager/Configuration/ImportXlsx/xlsxFormValueContextProvider.d.ts +8 -0
- package/es/collection-manager/Configuration/ImportXlsx/xlsxFormValueContextProvider.mjs +4 -0
- package/es/collection-manager/Configuration/ImportXlsx/xlsxImportAction.d.ts +1 -0
- package/es/collection-manager/Configuration/ImportXlsx/xlsxImportAction.mjs +187 -0
- package/es/collection-manager/Configuration/ImportXlsx/xlsxPreviewTable.d.ts +1 -0
- package/es/collection-manager/Configuration/ImportXlsx/xlsxPreviewTable.mjs +30 -0
- package/es/collection-manager/collectionPlugin.mjs +3 -1
- package/es/collection-manager/templates/import.mjs +1 -1
- package/es/collection-manager/templates/xlsx.d.ts +11 -0
- package/es/collection-manager/templates/xlsx.mjs +19 -0
- package/es/modules/blocks/data-blocks/table/hooks/useTableBlockProps.mjs +4 -2
- package/es/modules/fields/component/Radio/radioComponentFieldSettings.mjs +0 -4
- package/es/schema-component/antd/action/Action.Designer.mjs +5 -2
- package/es/schema-component/antd/action/Action.Modal.mjs +20 -31
- package/es/schema-component/antd/action/Action.Modal.style.d.ts +4 -0
- package/es/schema-component/antd/action/Action.Modal.style.mjs +35 -0
- package/es/schema-component/antd/action/utils.d.ts +1 -1
- package/es/schema-component/antd/action/utils.mjs +70 -70
- package/es/schema-component/antd/checkbox/Checkbox.mjs +6 -1
- package/es/schema-component/antd/page/Page.d.ts +1 -5
- package/es/schema-component/antd/page/Page.mjs +227 -146
- package/es/schema-component/antd/page/Page.style.d.ts +5 -0
- package/es/schema-component/antd/page/Page.style.mjs +45 -0
- package/es/schema-component/antd/page/PageDesigner.d.ts +3 -0
- package/es/schema-component/antd/page/PageDesigner.mjs +28 -0
- package/es/schema-component/antd/page/PageTabDesigner.d.ts +0 -3
- package/es/schema-component/antd/page/PageTabDesigner.mjs +3 -50
- package/es/schema-component/antd/page/style.d.ts +1 -1
- package/es/schema-component/antd/page/style.mjs +3 -13
- package/es/schema-component/antd/password/Password.d.ts +1 -1
- package/es/schema-component/antd/scroll-area/ScrollArea.d.ts +1 -1
- package/es/schema-component/antd/scroll-area/ScrollArea.mjs +2 -1
- package/es/schema-component/antd/variable/TextArea.mjs +1 -1
- package/es/schema-component/antd/variable/TextAreaWithGlobalScope.d.ts +13 -0
- package/es/schema-component/antd/variable/TextAreaWithGlobalScope.mjs +59 -0
- package/es/schema-component/antd/variable/index.d.ts +1 -0
- package/es/schema-component/antd/variable/index.mjs +3 -0
- package/lib/application/Application.js +8 -0
- package/lib/application/hooks/index.js +9 -0
- package/lib/application/hooks/useGlobalVariable.js +52 -0
- package/lib/application/schema-settings/hooks/index.js +6 -8
- package/lib/block-provider/hooks/index.js +6 -3
- package/lib/built-in/index.js +3 -0
- package/lib/built-in/locale/LocalePlugin.js +5 -1
- package/lib/built-in/system-settings/SystemSettingsProvider.js +4 -3
- package/lib/built-in/system-settings/SystemSettingsShortcut.js +11 -8
- package/lib/collection-manager/Configuration/AddCollectionAction.js +12 -2
- package/lib/collection-manager/Configuration/ImportXlsx/ImportXlsxMetaAction.js +304 -0
- package/lib/collection-manager/Configuration/ImportXlsx/XlsxCollectionSchema.js +130 -0
- package/lib/collection-manager/Configuration/ImportXlsx/XlsxEditFieldAction.js +81 -0
- package/lib/collection-manager/Configuration/ImportXlsx/setUpdateXlsxCollectionField.js +78 -0
- package/lib/collection-manager/Configuration/ImportXlsx/xlsxFieldsConfigure.js +414 -0
- package/lib/collection-manager/Configuration/ImportXlsx/xlsxFormValueContextProvider.js +53 -0
- package/lib/collection-manager/Configuration/ImportXlsx/xlsxImportAction.js +235 -0
- package/lib/collection-manager/Configuration/ImportXlsx/xlsxPreviewTable.js +64 -0
- package/lib/collection-manager/collectionPlugin.js +3 -1
- package/lib/collection-manager/templates/import.js +1 -1
- package/lib/collection-manager/templates/xlsx.js +53 -0
- package/lib/locale/zh-CN.js +4 -1
- package/lib/modules/blocks/data-blocks/table/hooks/useTableBlockProps.js +4 -2
- package/lib/modules/fields/component/Radio/radioComponentFieldSettings.js +0 -4
- package/lib/schema-component/antd/action/Action.Designer.js +5 -2
- package/lib/schema-component/antd/action/Action.Modal.js +20 -31
- package/lib/schema-component/antd/action/Action.Modal.style.js +69 -0
- package/lib/schema-component/antd/action/utils.js +70 -70
- package/lib/schema-component/antd/checkbox/Checkbox.js +6 -1
- package/lib/schema-component/antd/page/Page.js +227 -146
- package/lib/schema-component/antd/page/Page.style.js +79 -0
- package/lib/schema-component/antd/page/PageDesigner.js +62 -0
- package/lib/schema-component/antd/page/PageTabDesigner.js +2 -50
- package/lib/schema-component/antd/page/style.js +3 -13
- package/lib/schema-component/antd/scroll-area/ScrollArea.js +2 -1
- package/lib/schema-component/antd/variable/TextArea.js +1 -1
- package/lib/schema-component/antd/variable/TextAreaWithGlobalScope.js +94 -0
- package/lib/schema-component/antd/variable/index.js +13 -1
- package/package.json +7 -7
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__tachybase_components__ from "@tachybase/components";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__tachybase_schema__ from "@tachybase/schema";
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE_lodash__ from "lodash";
|
|
6
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react_i18next__ from "react-i18next";
|
|
7
|
+
import * as __WEBPACK_EXTERNAL_MODULE__api_client_index_mjs__ from "../../../api-client/index.mjs";
|
|
8
|
+
import * as __WEBPACK_EXTERNAL_MODULE__record_provider_index_mjs__ from "../../../record-provider/index.mjs";
|
|
9
|
+
import * as __WEBPACK_EXTERNAL_MODULE__schema_component_index_mjs__ from "../../../schema-component/index.mjs";
|
|
10
|
+
import * as __WEBPACK_EXTERNAL_MODULE__action_hooks_mjs__ from "../../action-hooks.mjs";
|
|
11
|
+
import * as __WEBPACK_EXTERNAL_MODULE__hooks_index_mjs__ from "../../hooks/index.mjs";
|
|
12
|
+
import * as __WEBPACK_EXTERNAL_MODULE__hooks_useDialect_mjs__ from "../../hooks/useDialect.mjs";
|
|
13
|
+
import * as __WEBPACK_EXTERNAL_MODULE__components_index_mjs__ from "../components/index.mjs";
|
|
14
|
+
import * as __WEBPACK_EXTERNAL_MODULE__setUpdateXlsxCollectionField_mjs__ from "./setUpdateXlsxCollectionField.mjs";
|
|
15
|
+
const XlsxEditFieldAction = (props)=>{
|
|
16
|
+
const { scope, getContainer, record, parentItem: parentRecord, children, handleUiSchemaChange, ...otherProps } = props;
|
|
17
|
+
const { getInterface, collections, getCollection } = (0, __WEBPACK_EXTERNAL_MODULE__hooks_index_mjs__.useCollectionManager_deprecated)();
|
|
18
|
+
const [visible, setVisible] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(false);
|
|
19
|
+
const [schema, setSchema] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)({});
|
|
20
|
+
(0, __WEBPACK_EXTERNAL_MODULE__api_client_index_mjs__.useAPIClient)();
|
|
21
|
+
const { t } = (0, __WEBPACK_EXTERNAL_MODULE_react_i18next__.useTranslation)();
|
|
22
|
+
const compile = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_index_mjs__.useCompile)();
|
|
23
|
+
const [data, setData] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)({
|
|
24
|
+
record
|
|
25
|
+
});
|
|
26
|
+
const { isDialect } = (0, __WEBPACK_EXTERNAL_MODULE__hooks_useDialect_mjs__["default"])();
|
|
27
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__record_provider_index_mjs__.RecordProvider, {
|
|
28
|
+
record: record,
|
|
29
|
+
parent: parentRecord,
|
|
30
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsxs)(__WEBPACK_EXTERNAL_MODULE__schema_component_index_mjs__.ActionContextProvider, {
|
|
31
|
+
value: {
|
|
32
|
+
visible,
|
|
33
|
+
setVisible
|
|
34
|
+
},
|
|
35
|
+
children: [
|
|
36
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("a", {
|
|
37
|
+
...otherProps,
|
|
38
|
+
onClick: async ()=>{
|
|
39
|
+
setData(record);
|
|
40
|
+
const interfaceConf = getInterface(record.interface);
|
|
41
|
+
const defaultValues = (0, __WEBPACK_EXTERNAL_MODULE_lodash__.cloneDeep)(record) || {};
|
|
42
|
+
if (!(null == defaultValues ? void 0 : defaultValues.reverseField)) {
|
|
43
|
+
var _interfaceConf_default;
|
|
44
|
+
defaultValues.autoCreateReverseField = false;
|
|
45
|
+
defaultValues.reverseField = null == interfaceConf ? void 0 : null === (_interfaceConf_default = interfaceConf.default) || void 0 === _interfaceConf_default ? void 0 : _interfaceConf_default.reverseField;
|
|
46
|
+
(0, __WEBPACK_EXTERNAL_MODULE_lodash__.set)(defaultValues.reverseField, 'name', record.name);
|
|
47
|
+
(0, __WEBPACK_EXTERNAL_MODULE_lodash__.set)(defaultValues, 'uiSchema.title', record.uiSchema.title);
|
|
48
|
+
}
|
|
49
|
+
const schema = getSchema({
|
|
50
|
+
...interfaceConf,
|
|
51
|
+
default: defaultValues
|
|
52
|
+
}, record, compile, getContainer);
|
|
53
|
+
setSchema(schema);
|
|
54
|
+
setVisible(true);
|
|
55
|
+
},
|
|
56
|
+
children: children || t('Edit')
|
|
57
|
+
}),
|
|
58
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__schema_component_index_mjs__.SchemaComponent, {
|
|
59
|
+
schema: schema,
|
|
60
|
+
components: {
|
|
61
|
+
...__WEBPACK_EXTERNAL_MODULE__components_index_mjs__,
|
|
62
|
+
ArrayTable: __WEBPACK_EXTERNAL_MODULE__tachybase_components__.ArrayTable
|
|
63
|
+
},
|
|
64
|
+
scope: {
|
|
65
|
+
getContainer,
|
|
66
|
+
useCancelAction: __WEBPACK_EXTERNAL_MODULE__action_hooks_mjs__.useCancelAction,
|
|
67
|
+
showReverseFieldConfig: !(null == data ? void 0 : data.reverseField),
|
|
68
|
+
isDialect,
|
|
69
|
+
setUpdateXlsxCollectionField: __WEBPACK_EXTERNAL_MODULE__setUpdateXlsxCollectionField_mjs__.setUpdateXlsxCollectionField,
|
|
70
|
+
disabledJSONB: true,
|
|
71
|
+
createMainOnly: true,
|
|
72
|
+
...scope
|
|
73
|
+
}
|
|
74
|
+
})
|
|
75
|
+
]
|
|
76
|
+
})
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
const getSchema = (schema, record, compile, getContainer)=>{
|
|
80
|
+
if (!schema) return;
|
|
81
|
+
const properties = (0, __WEBPACK_EXTERNAL_MODULE_lodash__.cloneDeep)(schema.properties);
|
|
82
|
+
if (null == properties ? void 0 : properties.name) properties.name['x-disabled'] = true;
|
|
83
|
+
if (true === schema.hasDefaultValue) {
|
|
84
|
+
properties['defaultValue'] = (0, __WEBPACK_EXTERNAL_MODULE_lodash__.cloneDeep)(schema.default) || {};
|
|
85
|
+
properties.defaultValue.required = false;
|
|
86
|
+
properties['defaultValue']['title'] = compile('{{ t("Default value") }}');
|
|
87
|
+
properties['defaultValue']['x-decorator'] = 'FormItem';
|
|
88
|
+
properties['defaultValue']['x-reactions'] = [
|
|
89
|
+
{
|
|
90
|
+
dependencies: [
|
|
91
|
+
'uiSchema.x-component-props.gmt',
|
|
92
|
+
'uiSchema.x-component-props.showTime',
|
|
93
|
+
'uiSchema.x-component-props.dateFormat',
|
|
94
|
+
'uiSchema.x-component-props.timeFormat'
|
|
95
|
+
],
|
|
96
|
+
fulfill: {
|
|
97
|
+
state: {
|
|
98
|
+
componentProps: {
|
|
99
|
+
gmt: '{{$deps[0]}}',
|
|
100
|
+
showTime: '{{$deps[1]}}',
|
|
101
|
+
dateFormat: '{{$deps[2]}}',
|
|
102
|
+
timeFormat: '{{$deps[3]}}'
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
dependencies: [
|
|
109
|
+
'primaryKey',
|
|
110
|
+
'unique',
|
|
111
|
+
'autoIncrement'
|
|
112
|
+
],
|
|
113
|
+
when: '{{$deps[0]||$deps[1]||$deps[2]}}',
|
|
114
|
+
fulfill: {
|
|
115
|
+
state: {
|
|
116
|
+
hidden: true,
|
|
117
|
+
value: void 0
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
otherwise: {
|
|
121
|
+
state: {
|
|
122
|
+
hidden: false
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
];
|
|
127
|
+
}
|
|
128
|
+
return {
|
|
129
|
+
type: 'object',
|
|
130
|
+
properties: {
|
|
131
|
+
[(0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.uid)()]: {
|
|
132
|
+
type: 'void',
|
|
133
|
+
'x-component': 'Action.Drawer',
|
|
134
|
+
'x-component-props': {
|
|
135
|
+
getContainer: getContainer
|
|
136
|
+
},
|
|
137
|
+
'x-decorator': 'Form',
|
|
138
|
+
'x-decorator-props': {
|
|
139
|
+
useValues (options) {
|
|
140
|
+
return (0, __WEBPACK_EXTERNAL_MODULE__api_client_index_mjs__.useRequest)(()=>Promise.resolve({
|
|
141
|
+
data: (0, __WEBPACK_EXTERNAL_MODULE_lodash__.cloneDeep)((0, __WEBPACK_EXTERNAL_MODULE_lodash__.omit)(schema.default, [
|
|
142
|
+
'uiSchema.rawTitle'
|
|
143
|
+
]))
|
|
144
|
+
}), options);
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
title: "".concat(compile(record.uiSchema.title), " - ").concat(compile('{{ t("Edit field") }}')),
|
|
148
|
+
properties: {
|
|
149
|
+
summary: {
|
|
150
|
+
type: 'void',
|
|
151
|
+
'x-component': 'FieldSummary',
|
|
152
|
+
'x-component-props': {
|
|
153
|
+
schemaKey: schema.name
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
...properties,
|
|
157
|
+
description: {
|
|
158
|
+
type: 'string',
|
|
159
|
+
title: '{{t("Description")}}',
|
|
160
|
+
'x-decorator': 'FormItem',
|
|
161
|
+
'x-component': 'Input.TextArea'
|
|
162
|
+
},
|
|
163
|
+
footer: {
|
|
164
|
+
type: 'void',
|
|
165
|
+
'x-component': 'Action.Drawer.Footer',
|
|
166
|
+
properties: {
|
|
167
|
+
action1: {
|
|
168
|
+
title: '{{ t("Cancel") }}',
|
|
169
|
+
'x-component': 'Action',
|
|
170
|
+
'x-use-component-props': 'useCancelActionProps'
|
|
171
|
+
},
|
|
172
|
+
action2: {
|
|
173
|
+
title: '{{ t("Submit") }}',
|
|
174
|
+
'x-component': 'Action',
|
|
175
|
+
'x-component-props': {
|
|
176
|
+
type: 'primary'
|
|
177
|
+
},
|
|
178
|
+
'x-use-component-props': 'setUpdateXlsxCollectionField'
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
export { XlsxEditFieldAction };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const xlsxPreviewTable: import("react").MemoExoticComponent<import("@tachybase/schema").ReactFC<Omit<any, "ref">>>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE__tachybase_schema__ from "@tachybase/schema";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE_antd__ from "antd";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react_i18next__ from "react-i18next";
|
|
5
|
+
const xlsxPreviewTable = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.observer)((props)=>{
|
|
6
|
+
const { filedata } = props;
|
|
7
|
+
const { t } = (0, __WEBPACK_EXTERNAL_MODULE_react_i18next__.useTranslation)();
|
|
8
|
+
const previewTablecolumns = filedata.fields.map((field)=>({
|
|
9
|
+
title: field.uiSchema.title,
|
|
10
|
+
dataIndex: field.name,
|
|
11
|
+
key: field.name,
|
|
12
|
+
render: (text)=>text,
|
|
13
|
+
width: 200
|
|
14
|
+
}));
|
|
15
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd__.Table, {
|
|
16
|
+
bordered: true,
|
|
17
|
+
size: "small",
|
|
18
|
+
columns: previewTablecolumns,
|
|
19
|
+
dataSource: filedata.data,
|
|
20
|
+
scroll: {
|
|
21
|
+
y: 300,
|
|
22
|
+
x: 'max-content'
|
|
23
|
+
},
|
|
24
|
+
pagination: false,
|
|
25
|
+
rowKey: "name"
|
|
26
|
+
});
|
|
27
|
+
}, {
|
|
28
|
+
displayName: 'PreviewTable'
|
|
29
|
+
});
|
|
30
|
+
export { xlsxPreviewTable };
|
|
@@ -4,6 +4,7 @@ import * as __WEBPACK_EXTERNAL_MODULE__data_source_data_source_DataSourceManager
|
|
|
4
4
|
import * as __WEBPACK_EXTERNAL_MODULE__interfaces_index_mjs__ from "./interfaces/index.mjs";
|
|
5
5
|
import * as __WEBPACK_EXTERNAL_MODULE__mixins_InheritanceCollectionMixin_mjs__ from "./mixins/InheritanceCollectionMixin.mjs";
|
|
6
6
|
import * as __WEBPACK_EXTERNAL_MODULE__templates_index_mjs__ from "./templates/index.mjs";
|
|
7
|
+
import * as __WEBPACK_EXTERNAL_MODULE__templates_xlsx_mjs__ from "./templates/xlsx.mjs";
|
|
7
8
|
class MainDataSource extends __WEBPACK_EXTERNAL_MODULE__data_source_data_source_DataSource_mjs__.DataSource {
|
|
8
9
|
async getDataSource() {
|
|
9
10
|
var _service_data;
|
|
@@ -122,7 +123,8 @@ class CollectionPlugin extends __WEBPACK_EXTERNAL_MODULE__application_Plugin_mjs
|
|
|
122
123
|
__WEBPACK_EXTERNAL_MODULE__templates_index_mjs__.SqlCollectionTemplate,
|
|
123
124
|
__WEBPACK_EXTERNAL_MODULE__templates_index_mjs__.TreeCollectionTemplate,
|
|
124
125
|
__WEBPACK_EXTERNAL_MODULE__templates_index_mjs__.ViewCollectionTemplate,
|
|
125
|
-
__WEBPACK_EXTERNAL_MODULE__templates_index_mjs__.ImportCollectionTemplate
|
|
126
|
+
__WEBPACK_EXTERNAL_MODULE__templates_index_mjs__.ImportCollectionTemplate,
|
|
127
|
+
__WEBPACK_EXTERNAL_MODULE__templates_xlsx_mjs__.ImportXlsxTemplate
|
|
126
128
|
]);
|
|
127
129
|
}
|
|
128
130
|
}
|
|
@@ -11,7 +11,7 @@ function _define_property(obj, key, value) {
|
|
|
11
11
|
}
|
|
12
12
|
class ImportCollectionTemplate extends __WEBPACK_EXTERNAL_MODULE__data_source_collection_template_CollectionTemplate_mjs__.CollectionTemplate {
|
|
13
13
|
constructor(...args){
|
|
14
|
-
super(...args), _define_property(this, "name", 'import'), _define_property(this, "title", '{{t("Import collection")}}'), _define_property(this, "order", 5), _define_property(this, "color", 'blue'), _define_property(this, "divider", true), _define_property(this, "default", {
|
|
14
|
+
super(...args), _define_property(this, "name", 'import'), _define_property(this, "title", '{{t("Import json collection")}}'), _define_property(this, "order", 5), _define_property(this, "color", 'blue'), _define_property(this, "divider", true), _define_property(this, "default", {
|
|
15
15
|
fields: []
|
|
16
16
|
});
|
|
17
17
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CollectionTemplate } from '../../data-source/collection-template/CollectionTemplate';
|
|
2
|
+
export declare class ImportXlsxTemplate extends CollectionTemplate {
|
|
3
|
+
name: string;
|
|
4
|
+
title: string;
|
|
5
|
+
order: number;
|
|
6
|
+
color: string;
|
|
7
|
+
divider: boolean;
|
|
8
|
+
default: {
|
|
9
|
+
fields: any[];
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE__data_source_collection_template_CollectionTemplate_mjs__ from "../../data-source/collection-template/CollectionTemplate.mjs";
|
|
2
|
+
function _define_property(obj, key, value) {
|
|
3
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
4
|
+
value: value,
|
|
5
|
+
enumerable: true,
|
|
6
|
+
configurable: true,
|
|
7
|
+
writable: true
|
|
8
|
+
});
|
|
9
|
+
else obj[key] = value;
|
|
10
|
+
return obj;
|
|
11
|
+
}
|
|
12
|
+
class ImportXlsxTemplate extends __WEBPACK_EXTERNAL_MODULE__data_source_collection_template_CollectionTemplate_mjs__.CollectionTemplate {
|
|
13
|
+
constructor(...args){
|
|
14
|
+
super(...args), _define_property(this, "name", 'importXlsx'), _define_property(this, "title", '{{t("Import xlsx collection")}}'), _define_property(this, "order", 6), _define_property(this, "color", 'blue'), _define_property(this, "divider", false), _define_property(this, "default", {
|
|
15
|
+
fields: []
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export { ImportXlsxTemplate };
|
|
@@ -63,7 +63,7 @@ const useTableBlockProps = ()=>{
|
|
|
63
63
|
},
|
|
64
64
|
onChange (param, filters, sorter) {
|
|
65
65
|
let { current, pageSize } = param;
|
|
66
|
-
var _fieldSchema_parent_xdecoratorprops_params, _fieldSchema_parent_xdecoratorprops, _fieldSchema_parent,
|
|
66
|
+
var _fieldSchema_parent_xdecoratorprops_params, _fieldSchema_parent_xdecoratorprops, _fieldSchema_parent, _ctx_service_params_;
|
|
67
67
|
const parentSort = 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 : null === (_fieldSchema_parent_xdecoratorprops_params = _fieldSchema_parent_xdecoratorprops['params']) || void 0 === _fieldSchema_parent_xdecoratorprops_params ? void 0 : _fieldSchema_parent_xdecoratorprops_params.sort;
|
|
68
68
|
const sortParams = ctx.params.sort || [];
|
|
69
69
|
const parentSortReal = [
|
|
@@ -78,10 +78,12 @@ const useTableBlockProps = ()=>{
|
|
|
78
78
|
"-".concat(sorter.field)
|
|
79
79
|
] : parentSortReal;
|
|
80
80
|
ctx.service.run({
|
|
81
|
-
...
|
|
81
|
+
...ctx.service.params[0],
|
|
82
82
|
page: current,
|
|
83
83
|
pageSize,
|
|
84
84
|
sort
|
|
85
|
+
}, {
|
|
86
|
+
filters: null === (_ctx_service_params_ = ctx.service.params[1]) || void 0 === _ctx_service_params_ ? void 0 : _ctx_service_params_.filters
|
|
85
87
|
});
|
|
86
88
|
},
|
|
87
89
|
onClickRow (record, setSelectedRow, selectedRow) {
|
|
@@ -24,10 +24,6 @@ const radioComponentFieldSettings = new __WEBPACK_EXTERNAL_MODULE__application_s
|
|
|
24
24
|
{
|
|
25
25
|
label: t('Radio group'),
|
|
26
26
|
value: 'Radio group'
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
label: t('Select'),
|
|
30
|
-
value: 'Select'
|
|
31
27
|
}
|
|
32
28
|
];
|
|
33
29
|
const { dn } = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_index_mjs__.useDesignable)();
|
|
@@ -204,7 +204,7 @@ function AfterSuccess() {
|
|
|
204
204
|
const openMode = findSchema(ctx.fieldSchema);
|
|
205
205
|
const component = fieldSchema.parent.parent['x-component'];
|
|
206
206
|
const schema = {
|
|
207
|
-
...__WEBPACK_EXTERNAL_MODULE__utils_mjs__.afterSuccessSchema
|
|
207
|
+
...(0, __WEBPACK_EXTERNAL_MODULE__utils_mjs__.afterSuccessSchema)(t)
|
|
208
208
|
};
|
|
209
209
|
if ((!openMode || 'page' === openMode) && component.includes('Form') || !component.includes('Form')) delete schema.properties.popupClose;
|
|
210
210
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__schema_settings_SchemaSettings_mjs__.SchemaSettingsModalItem, {
|
|
@@ -312,7 +312,10 @@ function WorkflowSelectComponent(param) {
|
|
|
312
312
|
'config.collection': noCollection ? void 0 : workflowCollection,
|
|
313
313
|
sync: void 0 === props.filterSync ? void 0 : props.filterSync,
|
|
314
314
|
key: void 0 === props.filterKey ? void 0 : props.filterKey
|
|
315
|
-
}
|
|
315
|
+
},
|
|
316
|
+
sort: [
|
|
317
|
+
'-updatedAt'
|
|
318
|
+
]
|
|
316
319
|
}
|
|
317
320
|
},
|
|
318
321
|
optionFilter: optionFilter,
|
|
@@ -4,9 +4,9 @@ import * as __WEBPACK_EXTERNAL_MODULE__tachybase_schema__ from "@tachybase/schem
|
|
|
4
4
|
import * as __WEBPACK_EXTERNAL_MODULE__ant_design_icons__ from "@ant-design/icons";
|
|
5
5
|
import * as __WEBPACK_EXTERNAL_MODULE__emotion_css__ from "@emotion/css";
|
|
6
6
|
import * as __WEBPACK_EXTERNAL_MODULE_antd__ from "antd";
|
|
7
|
-
import * as __WEBPACK_EXTERNAL_MODULE_antd_style__ from "antd-style";
|
|
8
7
|
import * as __WEBPACK_EXTERNAL_MODULE_classnames__ from "classnames";
|
|
9
8
|
import * as __WEBPACK_EXTERNAL_MODULE__index_mjs__ from "./index.mjs";
|
|
9
|
+
import * as __WEBPACK_EXTERNAL_MODULE__Action_Modal_style_mjs__ from "./Action.Modal.style.mjs";
|
|
10
10
|
import "./hooks/useSetAriaLabelForModal.mjs";
|
|
11
11
|
function _tagged_template_literal(strings, raw) {
|
|
12
12
|
if (!raw) raw = strings.slice(0);
|
|
@@ -18,7 +18,7 @@ function _tagged_template_literal(strings, raw) {
|
|
|
18
18
|
}
|
|
19
19
|
function _templateObject() {
|
|
20
20
|
const data = _tagged_template_literal([
|
|
21
|
-
"\n
|
|
21
|
+
"\n background: none;\n border: none;\n "
|
|
22
22
|
]);
|
|
23
23
|
_templateObject = function() {
|
|
24
24
|
return data;
|
|
@@ -26,29 +26,14 @@ function _templateObject() {
|
|
|
26
26
|
return data;
|
|
27
27
|
}
|
|
28
28
|
function _templateObject1() {
|
|
29
|
-
const data = _tagged_template_literal([
|
|
30
|
-
"\n background: none;\n border: none;\n "
|
|
31
|
-
]);
|
|
32
|
-
_templateObject1 = function() {
|
|
33
|
-
return data;
|
|
34
|
-
};
|
|
35
|
-
return data;
|
|
36
|
-
}
|
|
37
|
-
function _templateObject2() {
|
|
38
29
|
const data = _tagged_template_literal([
|
|
39
30
|
"\n background: none;\n border: none;\n "
|
|
40
31
|
]);
|
|
41
|
-
|
|
32
|
+
_templateObject1 = function() {
|
|
42
33
|
return data;
|
|
43
34
|
};
|
|
44
35
|
return data;
|
|
45
36
|
}
|
|
46
|
-
const useStyles = (0, __WEBPACK_EXTERNAL_MODULE_antd_style__.createStyles)((param)=>{
|
|
47
|
-
let { css } = param;
|
|
48
|
-
return {
|
|
49
|
-
container: css(_templateObject())
|
|
50
|
-
};
|
|
51
|
-
});
|
|
52
37
|
const openSizeWidthMap = new Map([
|
|
53
38
|
[
|
|
54
39
|
'small',
|
|
@@ -65,7 +50,7 @@ const openSizeWidthMap = new Map([
|
|
|
65
50
|
]);
|
|
66
51
|
const ActionModal = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.observer)((props)=>{
|
|
67
52
|
const { footerNodeName = 'Action.Modal.Footer', width, ...others } = props;
|
|
68
|
-
const { styles } = useStyles();
|
|
53
|
+
const { styles } = (0, __WEBPACK_EXTERNAL_MODULE__Action_Modal_style_mjs__.useStyles)();
|
|
69
54
|
const { visible, setVisible, openSize = 'middle', modalProps } = (0, __WEBPACK_EXTERNAL_MODULE__index_mjs__.useActionContext)();
|
|
70
55
|
const actualWidth = null != width ? width : openSizeWidthMap.get(openSize);
|
|
71
56
|
const schema = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.useFieldSchema)();
|
|
@@ -74,7 +59,13 @@ const ActionModal = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.observer)(
|
|
|
74
59
|
if (s['x-component'] === footerNodeName) return s;
|
|
75
60
|
return buf;
|
|
76
61
|
});
|
|
62
|
+
console.log('%c Line:41 🍧 styles.container', 'font-size:18px;color:#e41a6a;background:#7f2b82', styles.container);
|
|
77
63
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd__.Modal, {
|
|
64
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE_classnames__["default"])(others.className, null == modalProps ? void 0 : modalProps.className, styles.container, 'amplifier-block'),
|
|
65
|
+
style: {
|
|
66
|
+
...null == modalProps ? void 0 : modalProps.style,
|
|
67
|
+
...null == others ? void 0 : others.style
|
|
68
|
+
},
|
|
78
69
|
width: actualWidth,
|
|
79
70
|
title: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsxs)("div", {
|
|
80
71
|
style: {
|
|
@@ -93,7 +84,7 @@ const ActionModal = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.observer)(
|
|
|
93
84
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd__.Button, {
|
|
94
85
|
type: "text",
|
|
95
86
|
icon: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__ant_design_icons__.CloseOutlined, {}),
|
|
96
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__emotion_css__.css)(
|
|
87
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__emotion_css__.css)(_templateObject()),
|
|
97
88
|
onClick: ()=>setVisible(false, true)
|
|
98
89
|
})
|
|
99
90
|
]
|
|
@@ -102,25 +93,23 @@ const ActionModal = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.observer)(
|
|
|
102
93
|
}),
|
|
103
94
|
...others,
|
|
104
95
|
...modalProps,
|
|
105
|
-
style: {
|
|
106
|
-
...null == modalProps ? void 0 : modalProps.style,
|
|
107
|
-
...null == others ? void 0 : others.style
|
|
108
|
-
},
|
|
109
96
|
destroyOnClose: true,
|
|
110
97
|
open: visible,
|
|
111
98
|
closable: false,
|
|
112
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE_classnames__["default"])(others.className, null == modalProps ? void 0 : modalProps.className, styles.container, 'amplifier-block'),
|
|
113
99
|
footer: !!footerSchema && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__tachybase_schema__.RecursionField, {
|
|
114
100
|
basePath: field.address,
|
|
115
101
|
schema: schema,
|
|
116
102
|
onlyRenderProperties: true,
|
|
117
103
|
filterProperties: (s)=>s['x-component'] === footerNodeName
|
|
118
104
|
}),
|
|
119
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
105
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("div", {
|
|
106
|
+
className: styles.modalClassName,
|
|
107
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__tachybase_schema__.RecursionField, {
|
|
108
|
+
basePath: field.address,
|
|
109
|
+
schema: schema,
|
|
110
|
+
onlyRenderProperties: true,
|
|
111
|
+
filterProperties: (s)=>s['x-component'] !== footerNodeName
|
|
112
|
+
})
|
|
124
113
|
})
|
|
125
114
|
});
|
|
126
115
|
}, {
|
|
@@ -144,7 +133,7 @@ const Amplifier = ()=>{
|
|
|
144
133
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd__.Button, {
|
|
145
134
|
icon: isAmplifier ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__ant_design_icons__.FullscreenExitOutlined, {}) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__ant_design_icons__.FullscreenOutlined, {}),
|
|
146
135
|
type: "text",
|
|
147
|
-
className: (0, __WEBPACK_EXTERNAL_MODULE__emotion_css__.css)(
|
|
136
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__emotion_css__.css)(_templateObject1()),
|
|
148
137
|
onClick: (e)=>{
|
|
149
138
|
const element = e.target.closest('.ant-modal-content');
|
|
150
139
|
const modal = document.querySelector('.ant-modal');
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_antd_style__ from "antd-style";
|
|
2
|
+
function _tagged_template_literal(strings, raw) {
|
|
3
|
+
if (!raw) raw = strings.slice(0);
|
|
4
|
+
return Object.freeze(Object.defineProperties(strings, {
|
|
5
|
+
raw: {
|
|
6
|
+
value: Object.freeze(raw)
|
|
7
|
+
}
|
|
8
|
+
}));
|
|
9
|
+
}
|
|
10
|
+
function _templateObject() {
|
|
11
|
+
const data = _tagged_template_literal([
|
|
12
|
+
"\n &.tb-action-popup {\n .ant-modal-header {\n // TODO: theme variables\n margin-top: -20px;\n margin-left: -24px;\n margin-right: -24px;\n padding-top: 20px;\n padding-left: 24px;\n padding-right: 24px;\n padding-bottom: 20px;\n }\n .ant-modal-content {\n background: var(--tb-box-bg);\n }\n }\n "
|
|
13
|
+
]);
|
|
14
|
+
_templateObject = function() {
|
|
15
|
+
return data;
|
|
16
|
+
};
|
|
17
|
+
return data;
|
|
18
|
+
}
|
|
19
|
+
function _templateObject1() {
|
|
20
|
+
const data = _tagged_template_literal([
|
|
21
|
+
"\n max-height: 80vh;\n overflow: hidden;\n .ant-tabs-content-holder {\n height: 70vh;\n overflow-y: scroll;\n overflow-x: hidden;\n }\n "
|
|
22
|
+
]);
|
|
23
|
+
_templateObject1 = function() {
|
|
24
|
+
return data;
|
|
25
|
+
};
|
|
26
|
+
return data;
|
|
27
|
+
}
|
|
28
|
+
const useStyles = (0, __WEBPACK_EXTERNAL_MODULE_antd_style__.createStyles)((param)=>{
|
|
29
|
+
let { css } = param;
|
|
30
|
+
return {
|
|
31
|
+
container: css(_templateObject()),
|
|
32
|
+
modalClassName: css(_templateObject1())
|
|
33
|
+
};
|
|
34
|
+
});
|
|
35
|
+
export { useStyles };
|
|
@@ -8,4 +8,4 @@ export declare const linkageAction: ({ operator, field, condition, variables, lo
|
|
|
8
8
|
variables: VariablesContextType;
|
|
9
9
|
localVariables: VariableOption[];
|
|
10
10
|
}) => Promise<any>;
|
|
11
|
-
export declare const afterSuccessSchema: ISchema;
|
|
11
|
+
export declare const afterSuccessSchema: (t: any) => ISchema;
|