@tachybase/client 0.23.20 → 0.23.22
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.
|
@@ -283,7 +283,7 @@ const useFormItemInitializerFields = (options)=>{
|
|
|
283
283
|
},
|
|
284
284
|
schema
|
|
285
285
|
};
|
|
286
|
-
if ('Kanban'
|
|
286
|
+
if ('Kanban' === block) resultItem['find'] = (schema, key, action)=>{
|
|
287
287
|
const s = findSchema(schema, 'x-component', block);
|
|
288
288
|
return findSchema(s, key, action);
|
|
289
289
|
};
|
|
@@ -418,10 +418,14 @@ const useAssociatedFormItemInitializerFields = (options)=>{
|
|
|
418
418
|
});
|
|
419
419
|
return groups;
|
|
420
420
|
};
|
|
421
|
-
const getItem = (field, schemaName, collectionName, getCollectionFields, processedCollections)=>{
|
|
421
|
+
const getItem = (field, schemaName, collectionName, getCollectionFields, processedCollections, level)=>{
|
|
422
|
+
if (level >= 3) return null;
|
|
422
423
|
if ([
|
|
423
424
|
'm2o',
|
|
424
|
-
'obo'
|
|
425
|
+
'obo',
|
|
426
|
+
'oho',
|
|
427
|
+
'o2m',
|
|
428
|
+
'm2m'
|
|
425
429
|
].includes(field.interface)) {
|
|
426
430
|
var _field_uiSchema, _field_uiSchema1;
|
|
427
431
|
if (processedCollections.includes(field.target)) return null;
|
|
@@ -430,12 +434,15 @@ const getItem = (field, schemaName, collectionName, getCollectionFields, process
|
|
|
430
434
|
subFields.forEach((subField)=>{
|
|
431
435
|
if ([
|
|
432
436
|
'm2o',
|
|
433
|
-
'obo'
|
|
437
|
+
'obo',
|
|
438
|
+
'oho',
|
|
439
|
+
'o2m',
|
|
440
|
+
'm2m'
|
|
434
441
|
].includes(subField.interface)) options.push(getResultSchema("".concat(schemaName, ".").concat(subField.name), subField, collectionName));
|
|
435
442
|
options.push(getItem(subField, "".concat(schemaName, ".").concat(subField.name), collectionName, getCollectionFields, [
|
|
436
443
|
...processedCollections,
|
|
437
444
|
field.target
|
|
438
|
-
]));
|
|
445
|
+
], level + 1));
|
|
439
446
|
});
|
|
440
447
|
return {
|
|
441
448
|
type: 'subMenu',
|
|
@@ -478,9 +485,12 @@ const useFilterAssociatedFormItemInitializerFields = ()=>{
|
|
|
478
485
|
const { getCollectionFields } = (0, __WEBPACK_EXTERNAL_MODULE__collection_manager_index_mjs__.useCollectionManager_deprecated)();
|
|
479
486
|
const interfaces = [
|
|
480
487
|
'm2o',
|
|
481
|
-
'obo'
|
|
488
|
+
'obo',
|
|
489
|
+
'oho',
|
|
490
|
+
'o2m',
|
|
491
|
+
'm2m'
|
|
482
492
|
];
|
|
483
|
-
const groups = null == fields ? void 0 : null === (_fields_filter = fields.filter((field)=>interfaces.includes(field.interface))) || void 0 === _fields_filter ? void 0 : _fields_filter.map((field)=>getItem(field, field.name, name, getCollectionFields, []));
|
|
493
|
+
const groups = null == fields ? void 0 : null === (_fields_filter = fields.filter((field)=>interfaces.includes(field.interface))) || void 0 === _fields_filter ? void 0 : _fields_filter.map((field)=>getItem(field, field.name, name, getCollectionFields, [], 0));
|
|
484
494
|
return groups;
|
|
485
495
|
};
|
|
486
496
|
const useInheritsFormItemInitializerFields = (options)=>{
|
|
@@ -349,7 +349,7 @@ const useFormItemInitializerFields = (options)=>{
|
|
|
349
349
|
},
|
|
350
350
|
schema
|
|
351
351
|
};
|
|
352
|
-
if ('Kanban'
|
|
352
|
+
if ('Kanban' === block) resultItem['find'] = (schema, key, action)=>{
|
|
353
353
|
const s = findSchema(schema, 'x-component', block);
|
|
354
354
|
return findSchema(s, key, action);
|
|
355
355
|
};
|
|
@@ -484,10 +484,14 @@ const useAssociatedFormItemInitializerFields = (options)=>{
|
|
|
484
484
|
});
|
|
485
485
|
return groups;
|
|
486
486
|
};
|
|
487
|
-
const getItem = (field, schemaName, collectionName, getCollectionFields, processedCollections)=>{
|
|
487
|
+
const getItem = (field, schemaName, collectionName, getCollectionFields, processedCollections, level)=>{
|
|
488
|
+
if (level >= 3) return null;
|
|
488
489
|
if ([
|
|
489
490
|
'm2o',
|
|
490
|
-
'obo'
|
|
491
|
+
'obo',
|
|
492
|
+
'oho',
|
|
493
|
+
'o2m',
|
|
494
|
+
'm2m'
|
|
491
495
|
].includes(field.interface)) {
|
|
492
496
|
var _field_uiSchema, _field_uiSchema1;
|
|
493
497
|
if (processedCollections.includes(field.target)) return null;
|
|
@@ -496,12 +500,15 @@ const getItem = (field, schemaName, collectionName, getCollectionFields, process
|
|
|
496
500
|
subFields.forEach((subField)=>{
|
|
497
501
|
if ([
|
|
498
502
|
'm2o',
|
|
499
|
-
'obo'
|
|
503
|
+
'obo',
|
|
504
|
+
'oho',
|
|
505
|
+
'o2m',
|
|
506
|
+
'm2m'
|
|
500
507
|
].includes(subField.interface)) options.push(getResultSchema("".concat(schemaName, ".").concat(subField.name), subField, collectionName));
|
|
501
508
|
options.push(getItem(subField, "".concat(schemaName, ".").concat(subField.name), collectionName, getCollectionFields, [
|
|
502
509
|
...processedCollections,
|
|
503
510
|
field.target
|
|
504
|
-
]));
|
|
511
|
+
], level + 1));
|
|
505
512
|
});
|
|
506
513
|
return {
|
|
507
514
|
type: 'subMenu',
|
|
@@ -544,9 +551,12 @@ const useFilterAssociatedFormItemInitializerFields = ()=>{
|
|
|
544
551
|
const { getCollectionFields } = (0, index_js_namespaceObject.useCollectionManager_deprecated)();
|
|
545
552
|
const interfaces = [
|
|
546
553
|
'm2o',
|
|
547
|
-
'obo'
|
|
554
|
+
'obo',
|
|
555
|
+
'oho',
|
|
556
|
+
'o2m',
|
|
557
|
+
'm2m'
|
|
548
558
|
];
|
|
549
|
-
const groups = null == fields ? void 0 : null === (_fields_filter = fields.filter((field)=>interfaces.includes(field.interface))) || void 0 === _fields_filter ? void 0 : _fields_filter.map((field)=>getItem(field, field.name, name, getCollectionFields, []));
|
|
559
|
+
const groups = null == fields ? void 0 : null === (_fields_filter = fields.filter((field)=>interfaces.includes(field.interface))) || void 0 === _fields_filter ? void 0 : _fields_filter.map((field)=>getItem(field, field.name, name, getCollectionFields, [], 0));
|
|
550
560
|
return groups;
|
|
551
561
|
};
|
|
552
562
|
const useInheritsFormItemInitializerFields = (options)=>{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tachybase/client",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.22",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -63,12 +63,12 @@
|
|
|
63
63
|
"react-zoom-pan-pinch": "^3.6.1",
|
|
64
64
|
"sanitize-html": "2.14.0",
|
|
65
65
|
"use-deep-compare-effect": "^1.8.1",
|
|
66
|
-
"@tachybase/
|
|
67
|
-
"@tachybase/
|
|
68
|
-
"@tachybase/
|
|
69
|
-
"@tachybase/
|
|
70
|
-
"@tachybase/
|
|
71
|
-
"@tachybase/
|
|
66
|
+
"@tachybase/components": "0.23.22",
|
|
67
|
+
"@tachybase/schema": "0.23.22",
|
|
68
|
+
"@tachybase/requirejs": "0.23.22",
|
|
69
|
+
"@tachybase/sdk": "0.23.22",
|
|
70
|
+
"@tachybase/utils": "0.23.22",
|
|
71
|
+
"@tachybase/evaluators": "0.23.22"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@testing-library/react": "^14.3.1",
|