@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.
Files changed (101) hide show
  1. package/es/application/Application.d.ts +3 -0
  2. package/es/application/Application.mjs +8 -0
  3. package/es/application/hooks/index.d.ts +1 -0
  4. package/es/application/hooks/index.mjs +1 -0
  5. package/es/application/hooks/useGlobalVariable.d.ts +1 -0
  6. package/es/application/hooks/useGlobalVariable.mjs +18 -0
  7. package/es/application/schema-settings/hooks/index.d.ts +1 -1
  8. package/es/application/schema-settings/hooks/index.mjs +6 -8
  9. package/es/block-provider/hooks/index.mjs +4 -1
  10. package/es/built-in/index.mjs +3 -0
  11. package/es/built-in/locale/LocalePlugin.mjs +5 -1
  12. package/es/built-in/system-settings/SystemSettingsProvider.d.ts +2 -3
  13. package/es/built-in/system-settings/SystemSettingsProvider.mjs +4 -3
  14. package/es/built-in/system-settings/SystemSettingsShortcut.mjs +11 -8
  15. package/es/collection-manager/Configuration/AddCollectionAction.mjs +12 -2
  16. package/es/collection-manager/Configuration/ImportXlsx/ImportXlsxMetaAction.d.ts +2 -0
  17. package/es/collection-manager/Configuration/ImportXlsx/ImportXlsxMetaAction.mjs +255 -0
  18. package/es/collection-manager/Configuration/ImportXlsx/XlsxCollectionSchema.d.ts +89 -0
  19. package/es/collection-manager/Configuration/ImportXlsx/XlsxCollectionSchema.mjs +96 -0
  20. package/es/collection-manager/Configuration/ImportXlsx/XlsxEditFieldAction.d.ts +3 -0
  21. package/es/collection-manager/Configuration/ImportXlsx/XlsxEditFieldAction.mjs +47 -0
  22. package/es/collection-manager/Configuration/ImportXlsx/setUpdateXlsxCollectionField.d.ts +3 -0
  23. package/es/collection-manager/Configuration/ImportXlsx/setUpdateXlsxCollectionField.mjs +44 -0
  24. package/es/collection-manager/Configuration/ImportXlsx/xlsxFieldsConfigure.d.ts +1 -0
  25. package/es/collection-manager/Configuration/ImportXlsx/xlsxFieldsConfigure.mjs +380 -0
  26. package/es/collection-manager/Configuration/ImportXlsx/xlsxFormValueContextProvider.d.ts +8 -0
  27. package/es/collection-manager/Configuration/ImportXlsx/xlsxFormValueContextProvider.mjs +4 -0
  28. package/es/collection-manager/Configuration/ImportXlsx/xlsxImportAction.d.ts +1 -0
  29. package/es/collection-manager/Configuration/ImportXlsx/xlsxImportAction.mjs +187 -0
  30. package/es/collection-manager/Configuration/ImportXlsx/xlsxPreviewTable.d.ts +1 -0
  31. package/es/collection-manager/Configuration/ImportXlsx/xlsxPreviewTable.mjs +30 -0
  32. package/es/collection-manager/collectionPlugin.mjs +3 -1
  33. package/es/collection-manager/templates/import.mjs +1 -1
  34. package/es/collection-manager/templates/xlsx.d.ts +11 -0
  35. package/es/collection-manager/templates/xlsx.mjs +19 -0
  36. package/es/modules/blocks/data-blocks/table/hooks/useTableBlockProps.mjs +4 -2
  37. package/es/modules/fields/component/Radio/radioComponentFieldSettings.mjs +0 -4
  38. package/es/schema-component/antd/action/Action.Designer.mjs +5 -2
  39. package/es/schema-component/antd/action/Action.Modal.mjs +20 -31
  40. package/es/schema-component/antd/action/Action.Modal.style.d.ts +4 -0
  41. package/es/schema-component/antd/action/Action.Modal.style.mjs +35 -0
  42. package/es/schema-component/antd/action/utils.d.ts +1 -1
  43. package/es/schema-component/antd/action/utils.mjs +70 -70
  44. package/es/schema-component/antd/checkbox/Checkbox.mjs +6 -1
  45. package/es/schema-component/antd/page/Page.d.ts +1 -5
  46. package/es/schema-component/antd/page/Page.mjs +227 -146
  47. package/es/schema-component/antd/page/Page.style.d.ts +5 -0
  48. package/es/schema-component/antd/page/Page.style.mjs +45 -0
  49. package/es/schema-component/antd/page/PageDesigner.d.ts +3 -0
  50. package/es/schema-component/antd/page/PageDesigner.mjs +28 -0
  51. package/es/schema-component/antd/page/PageTabDesigner.d.ts +0 -3
  52. package/es/schema-component/antd/page/PageTabDesigner.mjs +3 -50
  53. package/es/schema-component/antd/page/style.d.ts +1 -1
  54. package/es/schema-component/antd/page/style.mjs +3 -13
  55. package/es/schema-component/antd/password/Password.d.ts +1 -1
  56. package/es/schema-component/antd/scroll-area/ScrollArea.d.ts +1 -1
  57. package/es/schema-component/antd/scroll-area/ScrollArea.mjs +2 -1
  58. package/es/schema-component/antd/variable/TextArea.mjs +1 -1
  59. package/es/schema-component/antd/variable/TextAreaWithGlobalScope.d.ts +13 -0
  60. package/es/schema-component/antd/variable/TextAreaWithGlobalScope.mjs +59 -0
  61. package/es/schema-component/antd/variable/index.d.ts +1 -0
  62. package/es/schema-component/antd/variable/index.mjs +3 -0
  63. package/lib/application/Application.js +8 -0
  64. package/lib/application/hooks/index.js +9 -0
  65. package/lib/application/hooks/useGlobalVariable.js +52 -0
  66. package/lib/application/schema-settings/hooks/index.js +6 -8
  67. package/lib/block-provider/hooks/index.js +6 -3
  68. package/lib/built-in/index.js +3 -0
  69. package/lib/built-in/locale/LocalePlugin.js +5 -1
  70. package/lib/built-in/system-settings/SystemSettingsProvider.js +4 -3
  71. package/lib/built-in/system-settings/SystemSettingsShortcut.js +11 -8
  72. package/lib/collection-manager/Configuration/AddCollectionAction.js +12 -2
  73. package/lib/collection-manager/Configuration/ImportXlsx/ImportXlsxMetaAction.js +304 -0
  74. package/lib/collection-manager/Configuration/ImportXlsx/XlsxCollectionSchema.js +130 -0
  75. package/lib/collection-manager/Configuration/ImportXlsx/XlsxEditFieldAction.js +81 -0
  76. package/lib/collection-manager/Configuration/ImportXlsx/setUpdateXlsxCollectionField.js +78 -0
  77. package/lib/collection-manager/Configuration/ImportXlsx/xlsxFieldsConfigure.js +414 -0
  78. package/lib/collection-manager/Configuration/ImportXlsx/xlsxFormValueContextProvider.js +53 -0
  79. package/lib/collection-manager/Configuration/ImportXlsx/xlsxImportAction.js +235 -0
  80. package/lib/collection-manager/Configuration/ImportXlsx/xlsxPreviewTable.js +64 -0
  81. package/lib/collection-manager/collectionPlugin.js +3 -1
  82. package/lib/collection-manager/templates/import.js +1 -1
  83. package/lib/collection-manager/templates/xlsx.js +53 -0
  84. package/lib/locale/zh-CN.js +4 -1
  85. package/lib/modules/blocks/data-blocks/table/hooks/useTableBlockProps.js +4 -2
  86. package/lib/modules/fields/component/Radio/radioComponentFieldSettings.js +0 -4
  87. package/lib/schema-component/antd/action/Action.Designer.js +5 -2
  88. package/lib/schema-component/antd/action/Action.Modal.js +20 -31
  89. package/lib/schema-component/antd/action/Action.Modal.style.js +69 -0
  90. package/lib/schema-component/antd/action/utils.js +70 -70
  91. package/lib/schema-component/antd/checkbox/Checkbox.js +6 -1
  92. package/lib/schema-component/antd/page/Page.js +227 -146
  93. package/lib/schema-component/antd/page/Page.style.js +79 -0
  94. package/lib/schema-component/antd/page/PageDesigner.js +62 -0
  95. package/lib/schema-component/antd/page/PageTabDesigner.js +2 -50
  96. package/lib/schema-component/antd/page/style.js +3 -13
  97. package/lib/schema-component/antd/scroll-area/ScrollArea.js +2 -1
  98. package/lib/schema-component/antd/variable/TextArea.js +1 -1
  99. package/lib/schema-component/antd/variable/TextAreaWithGlobalScope.js +94 -0
  100. package/lib/schema-component/antd/variable/index.js +13 -1
  101. package/package.json +7 -7
@@ -0,0 +1,235 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.n = function(module) {
5
+ var getter = module && module.__esModule ? function() {
6
+ return module['default'];
7
+ } : function() {
8
+ return module;
9
+ };
10
+ __webpack_require__.d(getter, {
11
+ a: getter
12
+ });
13
+ return getter;
14
+ };
15
+ })();
16
+ (()=>{
17
+ __webpack_require__.d = function(exports1, definition) {
18
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
19
+ enumerable: true,
20
+ get: definition[key]
21
+ });
22
+ };
23
+ })();
24
+ (()=>{
25
+ __webpack_require__.o = function(obj, prop) {
26
+ return Object.prototype.hasOwnProperty.call(obj, prop);
27
+ };
28
+ })();
29
+ (()=>{
30
+ __webpack_require__.r = function(exports1) {
31
+ if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
32
+ value: 'Module'
33
+ });
34
+ Object.defineProperty(exports1, '__esModule', {
35
+ value: true
36
+ });
37
+ };
38
+ })();
39
+ var __webpack_exports__ = {};
40
+ __webpack_require__.r(__webpack_exports__);
41
+ __webpack_require__.d(__webpack_exports__, {
42
+ XlsxEditFieldAction: ()=>XlsxEditFieldAction
43
+ });
44
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
45
+ const external_react_namespaceObject = require("react");
46
+ const components_namespaceObject = require("@tachybase/components");
47
+ const schema_namespaceObject = require("@tachybase/schema");
48
+ const external_lodash_namespaceObject = require("lodash");
49
+ const external_react_i18next_namespaceObject = require("react-i18next");
50
+ const index_js_namespaceObject = require("../../../api-client/index.js");
51
+ const external_record_provider_index_js_namespaceObject = require("../../../record-provider/index.js");
52
+ const external_schema_component_index_js_namespaceObject = require("../../../schema-component/index.js");
53
+ const external_action_hooks_js_namespaceObject = require("../../action-hooks.js");
54
+ const external_hooks_index_js_namespaceObject = require("../../hooks/index.js");
55
+ const useDialect_js_namespaceObject = require("../../hooks/useDialect.js");
56
+ var useDialect_js_default = /*#__PURE__*/ __webpack_require__.n(useDialect_js_namespaceObject);
57
+ const external_components_index_js_namespaceObject = require("../components/index.js");
58
+ const external_setUpdateXlsxCollectionField_js_namespaceObject = require("./setUpdateXlsxCollectionField.js");
59
+ const XlsxEditFieldAction = (props)=>{
60
+ const { scope, getContainer, record, parentItem: parentRecord, children, handleUiSchemaChange, ...otherProps } = props;
61
+ const { getInterface, collections, getCollection } = (0, external_hooks_index_js_namespaceObject.useCollectionManager_deprecated)();
62
+ const [visible, setVisible] = (0, external_react_namespaceObject.useState)(false);
63
+ const [schema, setSchema] = (0, external_react_namespaceObject.useState)({});
64
+ (0, index_js_namespaceObject.useAPIClient)();
65
+ const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
66
+ const compile = (0, external_schema_component_index_js_namespaceObject.useCompile)();
67
+ const [data, setData] = (0, external_react_namespaceObject.useState)({
68
+ record
69
+ });
70
+ const { isDialect } = useDialect_js_default()();
71
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_record_provider_index_js_namespaceObject.RecordProvider, {
72
+ record: record,
73
+ parent: parentRecord,
74
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_schema_component_index_js_namespaceObject.ActionContextProvider, {
75
+ value: {
76
+ visible,
77
+ setVisible
78
+ },
79
+ children: [
80
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("a", {
81
+ ...otherProps,
82
+ onClick: async ()=>{
83
+ setData(record);
84
+ const interfaceConf = getInterface(record.interface);
85
+ const defaultValues = (0, external_lodash_namespaceObject.cloneDeep)(record) || {};
86
+ if (!(null == defaultValues ? void 0 : defaultValues.reverseField)) {
87
+ var _interfaceConf_default;
88
+ defaultValues.autoCreateReverseField = false;
89
+ defaultValues.reverseField = null == interfaceConf ? void 0 : null === (_interfaceConf_default = interfaceConf.default) || void 0 === _interfaceConf_default ? void 0 : _interfaceConf_default.reverseField;
90
+ (0, external_lodash_namespaceObject.set)(defaultValues.reverseField, 'name', record.name);
91
+ (0, external_lodash_namespaceObject.set)(defaultValues, 'uiSchema.title', record.uiSchema.title);
92
+ }
93
+ const schema = getSchema({
94
+ ...interfaceConf,
95
+ default: defaultValues
96
+ }, record, compile, getContainer);
97
+ setSchema(schema);
98
+ setVisible(true);
99
+ },
100
+ children: children || t('Edit')
101
+ }),
102
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_schema_component_index_js_namespaceObject.SchemaComponent, {
103
+ schema: schema,
104
+ components: {
105
+ ...external_components_index_js_namespaceObject,
106
+ ArrayTable: components_namespaceObject.ArrayTable
107
+ },
108
+ scope: {
109
+ getContainer,
110
+ useCancelAction: external_action_hooks_js_namespaceObject.useCancelAction,
111
+ showReverseFieldConfig: !(null == data ? void 0 : data.reverseField),
112
+ isDialect,
113
+ setUpdateXlsxCollectionField: external_setUpdateXlsxCollectionField_js_namespaceObject.setUpdateXlsxCollectionField,
114
+ disabledJSONB: true,
115
+ createMainOnly: true,
116
+ ...scope
117
+ }
118
+ })
119
+ ]
120
+ })
121
+ });
122
+ };
123
+ const getSchema = (schema, record, compile, getContainer)=>{
124
+ if (!schema) return;
125
+ const properties = (0, external_lodash_namespaceObject.cloneDeep)(schema.properties);
126
+ if (null == properties ? void 0 : properties.name) properties.name['x-disabled'] = true;
127
+ if (true === schema.hasDefaultValue) {
128
+ properties['defaultValue'] = (0, external_lodash_namespaceObject.cloneDeep)(schema.default) || {};
129
+ properties.defaultValue.required = false;
130
+ properties['defaultValue']['title'] = compile('{{ t("Default value") }}');
131
+ properties['defaultValue']['x-decorator'] = 'FormItem';
132
+ properties['defaultValue']['x-reactions'] = [
133
+ {
134
+ dependencies: [
135
+ 'uiSchema.x-component-props.gmt',
136
+ 'uiSchema.x-component-props.showTime',
137
+ 'uiSchema.x-component-props.dateFormat',
138
+ 'uiSchema.x-component-props.timeFormat'
139
+ ],
140
+ fulfill: {
141
+ state: {
142
+ componentProps: {
143
+ gmt: '{{$deps[0]}}',
144
+ showTime: '{{$deps[1]}}',
145
+ dateFormat: '{{$deps[2]}}',
146
+ timeFormat: '{{$deps[3]}}'
147
+ }
148
+ }
149
+ }
150
+ },
151
+ {
152
+ dependencies: [
153
+ 'primaryKey',
154
+ 'unique',
155
+ 'autoIncrement'
156
+ ],
157
+ when: '{{$deps[0]||$deps[1]||$deps[2]}}',
158
+ fulfill: {
159
+ state: {
160
+ hidden: true,
161
+ value: void 0
162
+ }
163
+ },
164
+ otherwise: {
165
+ state: {
166
+ hidden: false
167
+ }
168
+ }
169
+ }
170
+ ];
171
+ }
172
+ return {
173
+ type: 'object',
174
+ properties: {
175
+ [(0, schema_namespaceObject.uid)()]: {
176
+ type: 'void',
177
+ 'x-component': 'Action.Drawer',
178
+ 'x-component-props': {
179
+ getContainer: getContainer
180
+ },
181
+ 'x-decorator': 'Form',
182
+ 'x-decorator-props': {
183
+ useValues (options) {
184
+ return (0, index_js_namespaceObject.useRequest)(()=>Promise.resolve({
185
+ data: (0, external_lodash_namespaceObject.cloneDeep)((0, external_lodash_namespaceObject.omit)(schema.default, [
186
+ 'uiSchema.rawTitle'
187
+ ]))
188
+ }), options);
189
+ }
190
+ },
191
+ title: "".concat(compile(record.uiSchema.title), " - ").concat(compile('{{ t("Edit field") }}')),
192
+ properties: {
193
+ summary: {
194
+ type: 'void',
195
+ 'x-component': 'FieldSummary',
196
+ 'x-component-props': {
197
+ schemaKey: schema.name
198
+ }
199
+ },
200
+ ...properties,
201
+ description: {
202
+ type: 'string',
203
+ title: '{{t("Description")}}',
204
+ 'x-decorator': 'FormItem',
205
+ 'x-component': 'Input.TextArea'
206
+ },
207
+ footer: {
208
+ type: 'void',
209
+ 'x-component': 'Action.Drawer.Footer',
210
+ properties: {
211
+ action1: {
212
+ title: '{{ t("Cancel") }}',
213
+ 'x-component': 'Action',
214
+ 'x-use-component-props': 'useCancelActionProps'
215
+ },
216
+ action2: {
217
+ title: '{{ t("Submit") }}',
218
+ 'x-component': 'Action',
219
+ 'x-component-props': {
220
+ type: 'primary'
221
+ },
222
+ 'x-use-component-props': 'setUpdateXlsxCollectionField'
223
+ }
224
+ }
225
+ }
226
+ }
227
+ }
228
+ }
229
+ };
230
+ };
231
+ var __webpack_export_target__ = exports;
232
+ for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
233
+ if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
234
+ value: true
235
+ });
@@ -0,0 +1,64 @@
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
+ xlsxPreviewTable: ()=>xlsxPreviewTable
30
+ });
31
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
32
+ const schema_namespaceObject = require("@tachybase/schema");
33
+ const external_antd_namespaceObject = require("antd");
34
+ const external_react_i18next_namespaceObject = require("react-i18next");
35
+ const xlsxPreviewTable = (0, schema_namespaceObject.observer)((props)=>{
36
+ const { filedata } = props;
37
+ const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
38
+ const previewTablecolumns = filedata.fields.map((field)=>({
39
+ title: field.uiSchema.title,
40
+ dataIndex: field.name,
41
+ key: field.name,
42
+ render: (text)=>text,
43
+ width: 200
44
+ }));
45
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Table, {
46
+ bordered: true,
47
+ size: "small",
48
+ columns: previewTablecolumns,
49
+ dataSource: filedata.data,
50
+ scroll: {
51
+ y: 300,
52
+ x: 'max-content'
53
+ },
54
+ pagination: false,
55
+ rowKey: "name"
56
+ });
57
+ }, {
58
+ displayName: 'PreviewTable'
59
+ });
60
+ var __webpack_export_target__ = exports;
61
+ for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
62
+ if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
63
+ value: true
64
+ });
@@ -34,6 +34,7 @@ const DataSourceManager_js_namespaceObject = require("../data-source/data-source
34
34
  const index_js_namespaceObject = require("./interfaces/index.js");
35
35
  const InheritanceCollectionMixin_js_namespaceObject = require("./mixins/InheritanceCollectionMixin.js");
36
36
  const external_templates_index_js_namespaceObject = require("./templates/index.js");
37
+ const xlsx_js_namespaceObject = require("./templates/xlsx.js");
37
38
  class MainDataSource extends DataSource_js_namespaceObject.DataSource {
38
39
  async getDataSource() {
39
40
  var _service_data;
@@ -152,7 +153,8 @@ class CollectionPlugin extends Plugin_js_namespaceObject.Plugin {
152
153
  external_templates_index_js_namespaceObject.SqlCollectionTemplate,
153
154
  external_templates_index_js_namespaceObject.TreeCollectionTemplate,
154
155
  external_templates_index_js_namespaceObject.ViewCollectionTemplate,
155
- external_templates_index_js_namespaceObject.ImportCollectionTemplate
156
+ external_templates_index_js_namespaceObject.ImportCollectionTemplate,
157
+ xlsx_js_namespaceObject.ImportXlsxTemplate
156
158
  ]);
157
159
  }
158
160
  }
@@ -41,7 +41,7 @@ function _define_property(obj, key, value) {
41
41
  }
42
42
  class ImportCollectionTemplate extends CollectionTemplate_js_namespaceObject.CollectionTemplate {
43
43
  constructor(...args){
44
- 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", {
44
+ 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", {
45
45
  fields: []
46
46
  });
47
47
  }
@@ -0,0 +1,53 @@
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
+ ImportXlsxTemplate: ()=>ImportXlsxTemplate
30
+ });
31
+ const CollectionTemplate_js_namespaceObject = require("../../data-source/collection-template/CollectionTemplate.js");
32
+ function _define_property(obj, key, value) {
33
+ if (key in obj) Object.defineProperty(obj, key, {
34
+ value: value,
35
+ enumerable: true,
36
+ configurable: true,
37
+ writable: true
38
+ });
39
+ else obj[key] = value;
40
+ return obj;
41
+ }
42
+ class ImportXlsxTemplate extends CollectionTemplate_js_namespaceObject.CollectionTemplate {
43
+ constructor(...args){
44
+ 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", {
45
+ fields: []
46
+ });
47
+ }
48
+ }
49
+ var __webpack_export_target__ = exports;
50
+ for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
51
+ if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
52
+ value: true
53
+ });
@@ -212,6 +212,7 @@ module.exports = {
212
212
  Constant: "\u5E38\u91CF",
213
213
  "Constant value": "\u9759\u6001\u503C",
214
214
  "Convert reference to duplicate": "\u6A21\u677F\u5F15\u7528\u8F6C\u4E3A\u590D\u5236",
215
+ "Converted to": "\u8F6C\u6362\u6210",
215
216
  "Copy into the form and continue to fill in": "\u590D\u5236\u5230\u8868\u5355\u5E76\u7EE7\u7EED\u586B\u5199",
216
217
  Create: "\u4EC5\u65B0\u589E",
217
218
  "Create an account": "\u6CE8\u518C\u8D26\u53F7",
@@ -413,7 +414,7 @@ module.exports = {
413
414
  "Field collection": "\u9009\u62E9\u6570\u636E",
414
415
  "Field component": "\u5B57\u6BB5\u7EC4\u4EF6",
415
416
  "Field display name": "\u5B57\u6BB5\u540D\u79F0",
416
- "Field interface": "\u5B57\u6BB5\u7C7B\u578B",
417
+ "Field interface": "UI\u7C7B\u578B",
417
418
  "Field mode": "\u5B57\u6BB5\u7EC4\u4EF6",
418
419
  "Field name": "\u5B57\u6BB5\u6807\u8BC6",
419
420
  "Field permission": "\u5B57\u6BB5\u6743\u9650",
@@ -482,6 +483,8 @@ module.exports = {
482
483
  ImageSearch: "\u56FE\u7247\u641C\u7D22",
483
484
  Import: "\u5BFC\u5165",
484
485
  "Import collection": "\u5BFC\u5165\u6570\u636E\u8868",
486
+ "Import json collection": "\u5BFC\u5165json\u6570\u636E\u8868",
487
+ "Import xlsx collection": "\u5BFC\u5165xlsx\u6570\u636E\u8868",
485
488
  "Importable fields": "\u53EF\u5BFC\u5165\u5B57\u6BB5",
486
489
  "In configuration": "\u914D\u7F6E\u4E2D",
487
490
  Index: "\u7D22\u5F15",
@@ -107,7 +107,7 @@ const useTableBlockProps = ()=>{
107
107
  },
108
108
  onChange (param, filters, sorter) {
109
109
  let { current, pageSize } = param;
110
- var _fieldSchema_parent_xdecoratorprops_params, _fieldSchema_parent_xdecoratorprops, _fieldSchema_parent, _ctx_service_params;
110
+ var _fieldSchema_parent_xdecoratorprops_params, _fieldSchema_parent_xdecoratorprops, _fieldSchema_parent, _ctx_service_params_;
111
111
  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;
112
112
  const sortParams = ctx.params.sort || [];
113
113
  const parentSortReal = [
@@ -122,10 +122,12 @@ const useTableBlockProps = ()=>{
122
122
  "-".concat(sorter.field)
123
123
  ] : parentSortReal;
124
124
  ctx.service.run({
125
- ...null === (_ctx_service_params = ctx.service.params) || void 0 === _ctx_service_params ? void 0 : _ctx_service_params[0],
125
+ ...ctx.service.params[0],
126
126
  page: current,
127
127
  pageSize,
128
128
  sort
129
+ }, {
130
+ filters: null === (_ctx_service_params_ = ctx.service.params[1]) || void 0 === _ctx_service_params_ ? void 0 : _ctx_service_params_.filters
129
131
  });
130
132
  },
131
133
  onClickRow (record, setSelectedRow, selectedRow) {
@@ -54,10 +54,6 @@ const radioComponentFieldSettings = new SchemaSettings_js_namespaceObject.Schema
54
54
  {
55
55
  label: t('Radio group'),
56
56
  value: 'Radio group'
57
- },
58
- {
59
- label: t('Select'),
60
- value: 'Select'
61
57
  }
62
58
  ];
63
59
  const { dn } = (0, index_js_namespaceObject.useDesignable)();
@@ -251,7 +251,7 @@ function AfterSuccess() {
251
251
  const openMode = findSchema(ctx.fieldSchema);
252
252
  const component = fieldSchema.parent.parent['x-component'];
253
253
  const schema = {
254
- ...external_utils_js_namespaceObject.afterSuccessSchema
254
+ ...(0, external_utils_js_namespaceObject.afterSuccessSchema)(t)
255
255
  };
256
256
  if ((!openMode || 'page' === openMode) && component.includes('Form') || !component.includes('Form')) delete schema.properties.popupClose;
257
257
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(SchemaSettings_js_namespaceObject.SchemaSettingsModalItem, {
@@ -359,7 +359,10 @@ function WorkflowSelectComponent(param) {
359
359
  'config.collection': noCollection ? void 0 : workflowCollection,
360
360
  sync: void 0 === props.filterSync ? void 0 : props.filterSync,
361
361
  key: void 0 === props.filterKey ? void 0 : props.filterKey
362
- }
362
+ },
363
+ sort: [
364
+ '-updatedAt'
365
+ ]
363
366
  }
364
367
  },
365
368
  optionFilter: optionFilter,
@@ -49,10 +49,10 @@ const schema_namespaceObject = require("@tachybase/schema");
49
49
  const icons_namespaceObject = require("@ant-design/icons");
50
50
  const css_namespaceObject = require("@emotion/css");
51
51
  const external_antd_namespaceObject = require("antd");
52
- const external_antd_style_namespaceObject = require("antd-style");
53
52
  const external_classnames_namespaceObject = require("classnames");
54
53
  var external_classnames_default = /*#__PURE__*/ __webpack_require__.n(external_classnames_namespaceObject);
55
54
  const external_index_js_namespaceObject = require("./index.js");
55
+ const external_Action_Modal_style_js_namespaceObject = require("./Action.Modal.style.js");
56
56
  require("./hooks/useSetAriaLabelForModal.js");
57
57
  function _tagged_template_literal(strings, raw) {
58
58
  if (!raw) raw = strings.slice(0);
@@ -64,7 +64,7 @@ function _tagged_template_literal(strings, raw) {
64
64
  }
65
65
  function _templateObject() {
66
66
  const data = _tagged_template_literal([
67
- "\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 "
67
+ "\n background: none;\n border: none;\n "
68
68
  ]);
69
69
  _templateObject = function() {
70
70
  return data;
@@ -72,29 +72,14 @@ function _templateObject() {
72
72
  return data;
73
73
  }
74
74
  function _templateObject1() {
75
- const data = _tagged_template_literal([
76
- "\n background: none;\n border: none;\n "
77
- ]);
78
- _templateObject1 = function() {
79
- return data;
80
- };
81
- return data;
82
- }
83
- function _templateObject2() {
84
75
  const data = _tagged_template_literal([
85
76
  "\n background: none;\n border: none;\n "
86
77
  ]);
87
- _templateObject2 = function() {
78
+ _templateObject1 = function() {
88
79
  return data;
89
80
  };
90
81
  return data;
91
82
  }
92
- const useStyles = (0, external_antd_style_namespaceObject.createStyles)((param)=>{
93
- let { css } = param;
94
- return {
95
- container: css(_templateObject())
96
- };
97
- });
98
83
  const openSizeWidthMap = new Map([
99
84
  [
100
85
  'small',
@@ -111,7 +96,7 @@ const openSizeWidthMap = new Map([
111
96
  ]);
112
97
  const ActionModal = (0, schema_namespaceObject.observer)((props)=>{
113
98
  const { footerNodeName = 'Action.Modal.Footer', width, ...others } = props;
114
- const { styles } = useStyles();
99
+ const { styles } = (0, external_Action_Modal_style_js_namespaceObject.useStyles)();
115
100
  const { visible, setVisible, openSize = 'middle', modalProps } = (0, external_index_js_namespaceObject.useActionContext)();
116
101
  const actualWidth = null != width ? width : openSizeWidthMap.get(openSize);
117
102
  const schema = (0, schema_namespaceObject.useFieldSchema)();
@@ -120,7 +105,13 @@ const ActionModal = (0, schema_namespaceObject.observer)((props)=>{
120
105
  if (s['x-component'] === footerNodeName) return s;
121
106
  return buf;
122
107
  });
108
+ console.log('%c Line:41 🍧 styles.container', 'font-size:18px;color:#e41a6a;background:#7f2b82', styles.container);
123
109
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Modal, {
110
+ className: external_classnames_default()(others.className, null == modalProps ? void 0 : modalProps.className, styles.container, 'amplifier-block'),
111
+ style: {
112
+ ...null == modalProps ? void 0 : modalProps.style,
113
+ ...null == others ? void 0 : others.style
114
+ },
124
115
  width: actualWidth,
125
116
  title: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
126
117
  style: {
@@ -139,7 +130,7 @@ const ActionModal = (0, schema_namespaceObject.observer)((props)=>{
139
130
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Button, {
140
131
  type: "text",
141
132
  icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.CloseOutlined, {}),
142
- className: (0, css_namespaceObject.css)(_templateObject1()),
133
+ className: (0, css_namespaceObject.css)(_templateObject()),
143
134
  onClick: ()=>setVisible(false, true)
144
135
  })
145
136
  ]
@@ -148,25 +139,23 @@ const ActionModal = (0, schema_namespaceObject.observer)((props)=>{
148
139
  }),
149
140
  ...others,
150
141
  ...modalProps,
151
- style: {
152
- ...null == modalProps ? void 0 : modalProps.style,
153
- ...null == others ? void 0 : others.style
154
- },
155
142
  destroyOnClose: true,
156
143
  open: visible,
157
144
  closable: false,
158
- className: external_classnames_default()(others.className, null == modalProps ? void 0 : modalProps.className, styles.container, 'amplifier-block'),
159
145
  footer: !!footerSchema && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(schema_namespaceObject.RecursionField, {
160
146
  basePath: field.address,
161
147
  schema: schema,
162
148
  onlyRenderProperties: true,
163
149
  filterProperties: (s)=>s['x-component'] === footerNodeName
164
150
  }),
165
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(schema_namespaceObject.RecursionField, {
166
- basePath: field.address,
167
- schema: schema,
168
- onlyRenderProperties: true,
169
- filterProperties: (s)=>s['x-component'] !== footerNodeName
151
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
152
+ className: styles.modalClassName,
153
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(schema_namespaceObject.RecursionField, {
154
+ basePath: field.address,
155
+ schema: schema,
156
+ onlyRenderProperties: true,
157
+ filterProperties: (s)=>s['x-component'] !== footerNodeName
158
+ })
170
159
  })
171
160
  });
172
161
  }, {
@@ -190,7 +179,7 @@ const Amplifier = ()=>{
190
179
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Button, {
191
180
  icon: isAmplifier ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.FullscreenExitOutlined, {}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.FullscreenOutlined, {}),
192
181
  type: "text",
193
- className: (0, css_namespaceObject.css)(_templateObject2()),
182
+ className: (0, css_namespaceObject.css)(_templateObject1()),
194
183
  onClick: (e)=>{
195
184
  const element = e.target.closest('.ant-modal-content');
196
185
  const modal = document.querySelector('.ant-modal');
@@ -0,0 +1,69 @@
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
+ useStyles: ()=>useStyles
30
+ });
31
+ const external_antd_style_namespaceObject = require("antd-style");
32
+ function _tagged_template_literal(strings, raw) {
33
+ if (!raw) raw = strings.slice(0);
34
+ return Object.freeze(Object.defineProperties(strings, {
35
+ raw: {
36
+ value: Object.freeze(raw)
37
+ }
38
+ }));
39
+ }
40
+ function _templateObject() {
41
+ const data = _tagged_template_literal([
42
+ "\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 "
43
+ ]);
44
+ _templateObject = function() {
45
+ return data;
46
+ };
47
+ return data;
48
+ }
49
+ function _templateObject1() {
50
+ const data = _tagged_template_literal([
51
+ "\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 "
52
+ ]);
53
+ _templateObject1 = function() {
54
+ return data;
55
+ };
56
+ return data;
57
+ }
58
+ const useStyles = (0, external_antd_style_namespaceObject.createStyles)((param)=>{
59
+ let { css } = param;
60
+ return {
61
+ container: css(_templateObject()),
62
+ modalClassName: css(_templateObject1())
63
+ };
64
+ });
65
+ var __webpack_export_target__ = exports;
66
+ for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
67
+ if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
68
+ value: true
69
+ });