@tachybase/client 1.3.24 → 1.4.0
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.mjs +21 -4
- package/es/application/components/AppComponent.mjs +3 -1
- package/es/application/utils/globalDeps.mjs +1 -0
- package/es/built-in/acl/ACLProvider.mjs +3 -1
- package/es/built-in/index.mjs +2 -2
- package/es/built-in/pm/PluginManager.mjs +51 -8
- package/es/built-in/system-version/SystemVersion.provider.mjs +52 -5
- package/es/collection-manager/Configuration/AddFieldAction.mjs +1 -1
- package/es/collection-manager/Configuration/ImportXlsx/xlsxFieldsConfigure.mjs +0 -1
- package/es/common/appInfo/CurrentAppInfoProvider.d.ts +4 -1
- package/es/modules/blocks/data-blocks/table/hooks/useTableBlockProps.mjs +2 -1
- package/es/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.d.ts +9 -0
- package/es/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.mjs +35 -2
- package/es/schema-component/antd/action/Action.Area.mjs +2 -2
- package/es/schema-component/antd/action/Action.Area.style.d.ts +1 -0
- package/es/schema-component/antd/action/Action.Area.style.mjs +12 -1
- package/es/schema-component/antd/action/types.d.ts +1 -0
- package/es/schema-component/antd/association-field/InternalNester.mjs +2 -2
- package/es/schema-component/antd/association-field/InternalSubTable.mjs +2 -2
- package/es/schema-component/antd/association-field/SubTable.mjs +24 -3
- package/es/schema-component/antd/association-field/hooks.mjs +6 -2
- package/es/schema-component/antd/icon-picker/IconFilterInput.mjs +3 -2
- package/es/schema-component/antd/icon-picker/index.d.ts +2 -0
- package/es/schema-component/antd/icon-picker/index.mjs +2 -0
- package/es/schema-component/antd/menu/Menu.mjs +1 -1
- package/es/schema-component/antd/page/Page.mjs +1 -1
- package/es/schema-component/antd/page/Page.style.mjs +3 -3
- package/es/schema-component/antd/page/components/AddTabForm.d.ts +1 -0
- package/es/schema-component/antd/page/components/AddTabForm.mjs +35 -0
- package/es/schema-component/antd/table-v2/Table.mjs +3 -2
- package/es/schema-component/antd/table-v2/Table.styles.mjs +1 -1
- package/es/schema-component/common/sortable-item/DragHandlePageTab.mjs +11 -46
- package/es/schema-component/common/sortable-item/DragHandlePageTab.style.mjs +1 -1
- package/es/schema-component/hooks/useDesignable.d.ts +5 -5
- package/es/schema-component/hooks/useDesignable.mjs +18 -18
- package/es/user/CurrentUser.mjs +11 -3
- package/lib/api-client/APIClient.js +21 -4
- package/lib/application/components/AppComponent.js +3 -1
- package/lib/application/utils/globalDeps.js +2 -1
- package/lib/block-provider/hooks/index.js +2 -2
- package/lib/built-in/acl/ACLProvider.js +3 -1
- package/lib/built-in/index.js +11 -11
- package/lib/built-in/pm/PluginManager.js +51 -8
- package/lib/built-in/system-version/SystemVersion.provider.js +52 -5
- package/lib/collection-manager/Configuration/AddFieldAction.js +1 -1
- package/lib/collection-manager/Configuration/ImportXlsx/xlsxFieldsConfigure.js +0 -1
- package/lib/locale/en_US.js +9 -0
- package/lib/locale/es_ES.js +4 -0
- package/lib/locale/fr_FR.js +4 -0
- package/lib/locale/ja_JP.js +4 -0
- package/lib/locale/ko_KR.js +4 -0
- package/lib/locale/pt_BR.js +4 -0
- package/lib/locale/ru_RU.js +4 -0
- package/lib/locale/tr_TR.js +4 -0
- package/lib/locale/uk_UA.js +4 -0
- package/lib/locale/zh-CN.js +10 -1
- package/lib/locale/zh-TW.js +4 -0
- package/lib/modules/blocks/data-blocks/table/hooks/useTableBlockProps.js +2 -1
- package/lib/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.js +39 -3
- package/lib/schema-component/antd/action/Action.Area.js +2 -2
- package/lib/schema-component/antd/action/Action.Area.style.js +12 -1
- package/lib/schema-component/antd/association-field/InternalNester.js +2 -2
- package/lib/schema-component/antd/association-field/InternalSubTable.js +2 -2
- package/lib/schema-component/antd/association-field/SubTable.js +22 -1
- package/lib/schema-component/antd/association-field/hooks.js +6 -2
- package/lib/schema-component/antd/icon-picker/IconFilterInput.js +3 -2
- package/lib/schema-component/antd/icon-picker/index.js +18 -0
- package/lib/schema-component/antd/menu/Menu.js +1 -1
- package/lib/schema-component/antd/page/Page.js +1 -1
- package/lib/schema-component/antd/page/Page.style.js +3 -3
- package/lib/schema-component/antd/page/components/AddTabForm.js +69 -0
- package/lib/schema-component/antd/table-v2/Table.js +3 -2
- package/lib/schema-component/antd/table-v2/Table.styles.js +1 -1
- package/lib/schema-component/common/sortable-item/DragHandlePageTab.js +10 -45
- package/lib/schema-component/common/sortable-item/DragHandlePageTab.style.js +1 -1
- package/lib/schema-component/hooks/useDesignable.js +18 -18
- package/lib/user/CurrentUser.js +11 -3
- package/package.json +7 -7
|
@@ -308,17 +308,17 @@ class Designable {
|
|
|
308
308
|
if (this.model) update(this.model);
|
|
309
309
|
if (this.query) this.query.take(update);
|
|
310
310
|
}
|
|
311
|
-
insertAdjacent(position, schema) {
|
|
311
|
+
async insertAdjacent(position, schema) {
|
|
312
312
|
let options = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
|
|
313
313
|
switch(position){
|
|
314
314
|
case 'beforeBegin':
|
|
315
|
-
return this.insertBeforeBegin(schema, options);
|
|
315
|
+
return await this.insertBeforeBegin(schema, options);
|
|
316
316
|
case 'afterBegin':
|
|
317
|
-
return this.insertAfterBegin(schema, options);
|
|
317
|
+
return await this.insertAfterBegin(schema, options);
|
|
318
318
|
case 'beforeEnd':
|
|
319
|
-
return this.insertBeforeEnd(schema, options);
|
|
319
|
+
return await this.insertBeforeEnd(schema, options);
|
|
320
320
|
case 'afterEnd':
|
|
321
|
-
return this.insertAfterEnd(schema, options);
|
|
321
|
+
return await this.insertAfterEnd(schema, options);
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
324
|
recursiveRemoveIfNoChildren(schema, options) {
|
|
@@ -337,7 +337,7 @@ class Designable {
|
|
|
337
337
|
}
|
|
338
338
|
return removed;
|
|
339
339
|
}
|
|
340
|
-
remove(schema) {
|
|
340
|
+
async remove(schema) {
|
|
341
341
|
let options = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
|
|
342
342
|
const { breakRemoveOn, removeParentsIfNoChildren } = options;
|
|
343
343
|
const s = schema || this.current;
|
|
@@ -348,7 +348,7 @@ class Designable {
|
|
|
348
348
|
});
|
|
349
349
|
if (parent) removed = parent;
|
|
350
350
|
}
|
|
351
|
-
return this.emit('remove', {
|
|
351
|
+
return await this.emit('remove', {
|
|
352
352
|
removed
|
|
353
353
|
});
|
|
354
354
|
}
|
|
@@ -365,7 +365,7 @@ class Designable {
|
|
|
365
365
|
}
|
|
366
366
|
return removed;
|
|
367
367
|
}
|
|
368
|
-
insertBeforeBeginOrAfterEnd(schema) {
|
|
368
|
+
async insertBeforeBeginOrAfterEnd(schema) {
|
|
369
369
|
let options = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
|
|
370
370
|
if (!schema_namespaceObject.Schema.isSchemaInstance(this.current)) return;
|
|
371
371
|
if (!schema_namespaceObject.Schema.isSchemaInstance(schema)) return;
|
|
@@ -376,9 +376,9 @@ class Designable {
|
|
|
376
376
|
if (this.current.name === key) toIndex = index;
|
|
377
377
|
if (schema.name === key) fromIndex = index;
|
|
378
378
|
});
|
|
379
|
-
return fromIndex > toIndex ? this.insertBeforeBegin(schema, options) : this.insertAfterEnd(schema, options);
|
|
379
|
+
return fromIndex > toIndex ? await this.insertBeforeBegin(schema, options) : await this.insertAfterEnd(schema, options);
|
|
380
380
|
}
|
|
381
|
-
insertBeforeBegin(schema) {
|
|
381
|
+
async insertBeforeBegin(schema) {
|
|
382
382
|
let options = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
|
|
383
383
|
if (!schema_namespaceObject.Schema.isSchemaInstance(this.current)) return;
|
|
384
384
|
const opts = {
|
|
@@ -419,7 +419,7 @@ class Designable {
|
|
|
419
419
|
s.parent = this.current.parent;
|
|
420
420
|
this.current.parent.setProperties(properties);
|
|
421
421
|
const [schema1, schema2] = splitWrapSchema(s, schema);
|
|
422
|
-
this.emit('insertAdjacent', {
|
|
422
|
+
await this.emit('insertAdjacent', {
|
|
423
423
|
position: 'beforeBegin',
|
|
424
424
|
schema: schema2,
|
|
425
425
|
wrapped,
|
|
@@ -427,7 +427,7 @@ class Designable {
|
|
|
427
427
|
...opts
|
|
428
428
|
});
|
|
429
429
|
}
|
|
430
|
-
insertAfterBegin(schema) {
|
|
430
|
+
async insertAfterBegin(schema) {
|
|
431
431
|
let options = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
|
|
432
432
|
if (!schema_namespaceObject.Schema.isSchemaInstance(this.current)) return;
|
|
433
433
|
const opts = {
|
|
@@ -459,7 +459,7 @@ class Designable {
|
|
|
459
459
|
s.parent = this.current;
|
|
460
460
|
this.current.setProperties(properties);
|
|
461
461
|
const [schema1, schema2] = splitWrapSchema(s, schema);
|
|
462
|
-
this.emit('insertAdjacent', {
|
|
462
|
+
await this.emit('insertAdjacent', {
|
|
463
463
|
position: 'afterBegin',
|
|
464
464
|
schema: schema2,
|
|
465
465
|
wrap: schema1,
|
|
@@ -467,7 +467,7 @@ class Designable {
|
|
|
467
467
|
...opts
|
|
468
468
|
});
|
|
469
469
|
}
|
|
470
|
-
insertBeforeEnd(schema) {
|
|
470
|
+
async insertBeforeEnd(schema) {
|
|
471
471
|
let options = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
|
|
472
472
|
if (!schema_namespaceObject.Schema.isSchemaInstance(this.current)) return;
|
|
473
473
|
delete schema['x-index'];
|
|
@@ -476,7 +476,7 @@ class Designable {
|
|
|
476
476
|
};
|
|
477
477
|
const { wrap = defaultWrap, breakRemoveOn, removeParentsIfNoChildren } = options;
|
|
478
478
|
if (schema_namespaceObject.Schema.isSchemaInstance(schema)) {
|
|
479
|
-
if (this.parentsIn(schema)) return void this.emit('error', {
|
|
479
|
+
if (this.parentsIn(schema)) return void await this.emit('error', {
|
|
480
480
|
code: 'parent_is_not_allowed',
|
|
481
481
|
schema
|
|
482
482
|
});
|
|
@@ -490,7 +490,7 @@ class Designable {
|
|
|
490
490
|
const s = this.current.addProperty(wrapped.name || (0, schema_namespaceObject.uid)(), wrapped);
|
|
491
491
|
s.parent = this.current;
|
|
492
492
|
const [schema1, schema2] = splitWrapSchema(s, schema);
|
|
493
|
-
return this.emit('insertAdjacent', {
|
|
493
|
+
return await this.emit('insertAdjacent', {
|
|
494
494
|
position: 'beforeEnd',
|
|
495
495
|
schema: schema2,
|
|
496
496
|
wrap: schema1,
|
|
@@ -498,7 +498,7 @@ class Designable {
|
|
|
498
498
|
...opts
|
|
499
499
|
});
|
|
500
500
|
}
|
|
501
|
-
insertAfterEnd(schema) {
|
|
501
|
+
async insertAfterEnd(schema) {
|
|
502
502
|
let options = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
|
|
503
503
|
if (!schema_namespaceObject.Schema.isSchemaInstance(this.current)) return;
|
|
504
504
|
const opts = {
|
|
@@ -540,7 +540,7 @@ class Designable {
|
|
|
540
540
|
s['x-index'] = newOrder;
|
|
541
541
|
this.current.parent.setProperties(properties);
|
|
542
542
|
const [schema1, schema2] = splitWrapSchema(s, schema);
|
|
543
|
-
this.emit('insertAdjacent', {
|
|
543
|
+
await this.emit('insertAdjacent', {
|
|
544
544
|
position: 'afterEnd',
|
|
545
545
|
schema: schema2,
|
|
546
546
|
wrap: schema1,
|
package/lib/user/CurrentUser.js
CHANGED
|
@@ -30,8 +30,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
30
30
|
});
|
|
31
31
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
32
32
|
const external_react_namespaceObject = require("react");
|
|
33
|
-
const icons_namespaceObject = require("@ant-design/icons");
|
|
34
33
|
const client_namespaceObject = require("@tego/client");
|
|
34
|
+
const icons_namespaceObject = require("@ant-design/icons");
|
|
35
35
|
const external_antd_namespaceObject = require("antd");
|
|
36
36
|
const external_antd_style_namespaceObject = require("antd-style");
|
|
37
37
|
const external_react_i18next_namespaceObject = require("react-i18next");
|
|
@@ -187,8 +187,16 @@ const SettingsMenu = (props)=>{
|
|
|
187
187
|
key: 'signout',
|
|
188
188
|
label: t('Sign out'),
|
|
189
189
|
onClick: async ()=>{
|
|
190
|
-
|
|
191
|
-
|
|
190
|
+
try {
|
|
191
|
+
var _loginMethods_data;
|
|
192
|
+
const loginMethods = await api.resource('authenticators').publicList();
|
|
193
|
+
const methods = (null == loginMethods ? void 0 : null == (_loginMethods_data = loginMethods.data) ? void 0 : _loginMethods_data.data) || [];
|
|
194
|
+
await api.auth.signOut();
|
|
195
|
+
if (1 === methods.length && 'mainApp' === methods[0].authType) window.location.href = '/';
|
|
196
|
+
else navigate("/signin?redirect=".concat(encodeURIComponent(redirectUrl)));
|
|
197
|
+
} catch (err) {
|
|
198
|
+
console.error('Sign out error:', err);
|
|
199
|
+
}
|
|
192
200
|
}
|
|
193
201
|
}
|
|
194
202
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tachybase/client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"@ant-design/icons": "^5.6.1",
|
|
12
12
|
"@ant-design/pro-components": "2.8.9",
|
|
13
13
|
"@ant-design/pro-layout": "^7.21.2",
|
|
14
|
-
"@ctrl/tinycolor": "^
|
|
14
|
+
"@ctrl/tinycolor": "^4.2.0",
|
|
15
15
|
"@dnd-kit/accessibility": "^3.1.1",
|
|
16
16
|
"@dnd-kit/core": "^6.3.1",
|
|
17
17
|
"@dnd-kit/modifiers": "^7.0.0",
|
|
@@ -21,16 +21,16 @@
|
|
|
21
21
|
"@floating-ui/react": "0.26.28",
|
|
22
22
|
"@js-preview/excel": "^1.7.14",
|
|
23
23
|
"@lottiefiles/dotlottie-react": "^0.9.3",
|
|
24
|
-
"@tachybase/schema": "
|
|
25
|
-
"@tego/client": "
|
|
24
|
+
"@tachybase/schema": "*",
|
|
25
|
+
"@tego/client": "*",
|
|
26
26
|
"ahooks": "^3.9.0",
|
|
27
27
|
"antd": "5.22.5",
|
|
28
28
|
"antd-style": "3.7.1",
|
|
29
|
-
"axios": "1.
|
|
29
|
+
"axios": "1.13.0",
|
|
30
30
|
"axios-mock-adapter": "^1.22.0",
|
|
31
31
|
"classnames": "^2.5.1",
|
|
32
32
|
"click-to-react-component": "1.1.2",
|
|
33
|
-
"cronstrue": "^2.
|
|
33
|
+
"cronstrue": "^3.2.0",
|
|
34
34
|
"d3-format": "^3.1.0",
|
|
35
35
|
"dayjs": "1.11.13",
|
|
36
36
|
"deepmerge": "^4.3.1",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"react-error-boundary": "^6.0.0",
|
|
51
51
|
"react-helmet": "^6.1.0",
|
|
52
52
|
"react-hotkeys-hook": "^5.1.0",
|
|
53
|
-
"react-i18next": "
|
|
53
|
+
"react-i18next": "16.2.1",
|
|
54
54
|
"react-intersection-observer": "^9.14.0",
|
|
55
55
|
"react-js-cron": "^3.2.0",
|
|
56
56
|
"react-pdf": "^10.0.1",
|