@c-rex/utils 0.1.20 → 0.1.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.
- package/dist/cookies.js +96 -3
- package/dist/cookies.js.map +1 -1
- package/dist/cookies.mjs +96 -3
- package/dist/cookies.mjs.map +1 -1
- package/dist/directoryNodes.d.mts +192 -1
- package/dist/directoryNodes.d.ts +192 -1
- package/dist/directoryNodes.js +225 -27
- package/dist/directoryNodes.js.map +1 -1
- package/dist/directoryNodes.mjs +224 -27
- package/dist/directoryNodes.mjs.map +1 -1
- package/dist/index.d.mts +24 -3
- package/dist/index.d.ts +24 -3
- package/dist/index.js +251 -36
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +233 -36
- package/dist/index.mjs.map +1 -1
- package/package.json +62 -60
package/dist/directoryNodes.mjs
CHANGED
|
@@ -9,6 +9,7 @@ var AdministrativeMetadataModelFields = {
|
|
|
9
9
|
descriptions: "descriptions",
|
|
10
10
|
synonyms: "synonyms",
|
|
11
11
|
packages: "packages",
|
|
12
|
+
hasInformationUnits: "hasInformationUnits",
|
|
12
13
|
links: "links"
|
|
13
14
|
};
|
|
14
15
|
var AdministrativeMetadataModelFieldsAll = Object.values(AdministrativeMetadataModelFields);
|
|
@@ -23,6 +24,24 @@ var AuthStateModelFields = {
|
|
|
23
24
|
roles: "roles"
|
|
24
25
|
};
|
|
25
26
|
var AuthStateModelFieldsAll = Object.values(AuthStateModelFields);
|
|
27
|
+
var CategoryModelFields = {
|
|
28
|
+
id: "id",
|
|
29
|
+
shortId: "shortId",
|
|
30
|
+
score: "score",
|
|
31
|
+
class: "class",
|
|
32
|
+
labels: "labels",
|
|
33
|
+
comments: "comments",
|
|
34
|
+
descriptions: "descriptions",
|
|
35
|
+
synonyms: "synonyms",
|
|
36
|
+
packages: "packages",
|
|
37
|
+
hasInformationUnits: "hasInformationUnits",
|
|
38
|
+
links: "links",
|
|
39
|
+
parents: "parents",
|
|
40
|
+
ancestors: "ancestors",
|
|
41
|
+
ancestorsOrSelf: "ancestorsOrSelf",
|
|
42
|
+
categories: "categories"
|
|
43
|
+
};
|
|
44
|
+
var CategoryModelFieldsAll = Object.values(CategoryModelFields);
|
|
26
45
|
var ComponentModelFields = {
|
|
27
46
|
id: "id",
|
|
28
47
|
shortId: "shortId",
|
|
@@ -33,6 +52,7 @@ var ComponentModelFields = {
|
|
|
33
52
|
descriptions: "descriptions",
|
|
34
53
|
synonyms: "synonyms",
|
|
35
54
|
packages: "packages",
|
|
55
|
+
hasInformationUnits: "hasInformationUnits",
|
|
36
56
|
links: "links",
|
|
37
57
|
productGraphic: "productGraphic",
|
|
38
58
|
titles: "titles",
|
|
@@ -56,6 +76,7 @@ var ContentLifeCycleStatusModelFields = {
|
|
|
56
76
|
descriptions: "descriptions",
|
|
57
77
|
synonyms: "synonyms",
|
|
58
78
|
packages: "packages",
|
|
79
|
+
hasInformationUnits: "hasInformationUnits",
|
|
59
80
|
links: "links",
|
|
60
81
|
dateOfEffect: "dateOfEffect",
|
|
61
82
|
dateOfExpiry: "dateOfExpiry",
|
|
@@ -75,6 +96,7 @@ var ContentLifeCycleStatusValueModelFields = {
|
|
|
75
96
|
descriptions: "descriptions",
|
|
76
97
|
synonyms: "synonyms",
|
|
77
98
|
packages: "packages",
|
|
99
|
+
hasInformationUnits: "hasInformationUnits",
|
|
78
100
|
links: "links"
|
|
79
101
|
};
|
|
80
102
|
var ContentLifeCycleStatusValueModelFieldsAll = Object.values(ContentLifeCycleStatusValueModelFields);
|
|
@@ -88,6 +110,7 @@ var DirectoryNodeModelFields = {
|
|
|
88
110
|
descriptions: "descriptions",
|
|
89
111
|
synonyms: "synonyms",
|
|
90
112
|
packages: "packages",
|
|
113
|
+
hasInformationUnits: "hasInformationUnits",
|
|
91
114
|
links: "links",
|
|
92
115
|
structureType: "structureType",
|
|
93
116
|
parents: "parents",
|
|
@@ -107,6 +130,7 @@ var DirectoryNodeTypeModelFields = {
|
|
|
107
130
|
descriptions: "descriptions",
|
|
108
131
|
synonyms: "synonyms",
|
|
109
132
|
packages: "packages",
|
|
133
|
+
hasInformationUnits: "hasInformationUnits",
|
|
110
134
|
links: "links"
|
|
111
135
|
};
|
|
112
136
|
var DirectoryNodeTypeModelFieldsAll = Object.values(DirectoryNodeTypeModelFields);
|
|
@@ -120,6 +144,7 @@ var DocumentModelFields = {
|
|
|
120
144
|
descriptions: "descriptions",
|
|
121
145
|
synonyms: "synonyms",
|
|
122
146
|
packages: "packages",
|
|
147
|
+
hasInformationUnits: "hasInformationUnits",
|
|
123
148
|
links: "links",
|
|
124
149
|
revision: "revision",
|
|
125
150
|
created: "created",
|
|
@@ -161,6 +186,7 @@ var DocumentTypeModelFields = {
|
|
|
161
186
|
descriptions: "descriptions",
|
|
162
187
|
synonyms: "synonyms",
|
|
163
188
|
packages: "packages",
|
|
189
|
+
hasInformationUnits: "hasInformationUnits",
|
|
164
190
|
links: "links"
|
|
165
191
|
};
|
|
166
192
|
var DocumentTypeModelFieldsAll = Object.values(DocumentTypeModelFields);
|
|
@@ -174,6 +200,7 @@ var DocumentationMetadataModelFields = {
|
|
|
174
200
|
descriptions: "descriptions",
|
|
175
201
|
synonyms: "synonyms",
|
|
176
202
|
packages: "packages",
|
|
203
|
+
hasInformationUnits: "hasInformationUnits",
|
|
177
204
|
links: "links"
|
|
178
205
|
};
|
|
179
206
|
var DocumentationMetadataModelFieldsAll = Object.values(DocumentationMetadataModelFields);
|
|
@@ -186,7 +213,8 @@ var DomainEntityModelFields = {
|
|
|
186
213
|
comments: "comments",
|
|
187
214
|
descriptions: "descriptions",
|
|
188
215
|
synonyms: "synonyms",
|
|
189
|
-
packages: "packages"
|
|
216
|
+
packages: "packages",
|
|
217
|
+
hasInformationUnits: "hasInformationUnits"
|
|
190
218
|
};
|
|
191
219
|
var DomainEntityModelFieldsAll = Object.values(DomainEntityModelFields);
|
|
192
220
|
var EventModelFields = {
|
|
@@ -199,6 +227,7 @@ var EventModelFields = {
|
|
|
199
227
|
descriptions: "descriptions",
|
|
200
228
|
synonyms: "synonyms",
|
|
201
229
|
packages: "packages",
|
|
230
|
+
hasInformationUnits: "hasInformationUnits",
|
|
202
231
|
links: "links",
|
|
203
232
|
eventCode: "eventCode",
|
|
204
233
|
eventType: "eventType"
|
|
@@ -214,6 +243,7 @@ var ExternalProductGraphicModelFields = {
|
|
|
214
243
|
descriptions: "descriptions",
|
|
215
244
|
synonyms: "synonyms",
|
|
216
245
|
packages: "packages",
|
|
246
|
+
hasInformationUnits: "hasInformationUnits",
|
|
217
247
|
links: "links",
|
|
218
248
|
revision: "revision",
|
|
219
249
|
created: "created",
|
|
@@ -266,6 +296,7 @@ var FragmentModelFields = {
|
|
|
266
296
|
descriptions: "descriptions",
|
|
267
297
|
synonyms: "synonyms",
|
|
268
298
|
packages: "packages",
|
|
299
|
+
hasInformationUnits: "hasInformationUnits",
|
|
269
300
|
links: "links",
|
|
270
301
|
revision: "revision",
|
|
271
302
|
created: "created",
|
|
@@ -307,6 +338,7 @@ var FunctionalMetadataModelFields = {
|
|
|
307
338
|
descriptions: "descriptions",
|
|
308
339
|
synonyms: "synonyms",
|
|
309
340
|
packages: "packages",
|
|
341
|
+
hasInformationUnits: "hasInformationUnits",
|
|
310
342
|
links: "links"
|
|
311
343
|
};
|
|
312
344
|
var FunctionalMetadataModelFieldsAll = Object.values(FunctionalMetadataModelFields);
|
|
@@ -320,6 +352,7 @@ var IdentityDomainModelFields = {
|
|
|
320
352
|
descriptions: "descriptions",
|
|
321
353
|
synonyms: "synonyms",
|
|
322
354
|
packages: "packages",
|
|
355
|
+
hasInformationUnits: "hasInformationUnits",
|
|
323
356
|
links: "links",
|
|
324
357
|
parties: "parties"
|
|
325
358
|
};
|
|
@@ -334,6 +367,7 @@ var IdentityModelFields = {
|
|
|
334
367
|
descriptions: "descriptions",
|
|
335
368
|
synonyms: "synonyms",
|
|
336
369
|
packages: "packages",
|
|
370
|
+
hasInformationUnits: "hasInformationUnits",
|
|
337
371
|
links: "links",
|
|
338
372
|
identifier: "identifier",
|
|
339
373
|
identityDomain: "identityDomain"
|
|
@@ -349,6 +383,7 @@ var InformationObjectModelFields = {
|
|
|
349
383
|
descriptions: "descriptions",
|
|
350
384
|
synonyms: "synonyms",
|
|
351
385
|
packages: "packages",
|
|
386
|
+
hasInformationUnits: "hasInformationUnits",
|
|
352
387
|
links: "links",
|
|
353
388
|
identities: "identities"
|
|
354
389
|
};
|
|
@@ -363,6 +398,7 @@ var InformationSubjectCollectionModelFields = {
|
|
|
363
398
|
descriptions: "descriptions",
|
|
364
399
|
synonyms: "synonyms",
|
|
365
400
|
packages: "packages",
|
|
401
|
+
hasInformationUnits: "hasInformationUnits",
|
|
366
402
|
links: "links"
|
|
367
403
|
};
|
|
368
404
|
var InformationSubjectCollectionModelFieldsAll = Object.values(InformationSubjectCollectionModelFields);
|
|
@@ -376,6 +412,7 @@ var InformationSubjectConformityModelFields = {
|
|
|
376
412
|
descriptions: "descriptions",
|
|
377
413
|
synonyms: "synonyms",
|
|
378
414
|
packages: "packages",
|
|
415
|
+
hasInformationUnits: "hasInformationUnits",
|
|
379
416
|
links: "links"
|
|
380
417
|
};
|
|
381
418
|
var InformationSubjectConformityModelFieldsAll = Object.values(InformationSubjectConformityModelFields);
|
|
@@ -389,6 +426,7 @@ var InformationSubjectFormalityModelFields = {
|
|
|
389
426
|
descriptions: "descriptions",
|
|
390
427
|
synonyms: "synonyms",
|
|
391
428
|
packages: "packages",
|
|
429
|
+
hasInformationUnits: "hasInformationUnits",
|
|
392
430
|
links: "links"
|
|
393
431
|
};
|
|
394
432
|
var InformationSubjectFormalityModelFieldsAll = Object.values(InformationSubjectFormalityModelFields);
|
|
@@ -402,6 +440,7 @@ var InformationSubjectFunctionalityModelFields = {
|
|
|
402
440
|
descriptions: "descriptions",
|
|
403
441
|
synonyms: "synonyms",
|
|
404
442
|
packages: "packages",
|
|
443
|
+
hasInformationUnits: "hasInformationUnits",
|
|
405
444
|
links: "links"
|
|
406
445
|
};
|
|
407
446
|
var InformationSubjectFunctionalityModelFieldsAll = Object.values(InformationSubjectFunctionalityModelFields);
|
|
@@ -415,6 +454,7 @@ var InformationSubjectModelFields = {
|
|
|
415
454
|
descriptions: "descriptions",
|
|
416
455
|
synonyms: "synonyms",
|
|
417
456
|
packages: "packages",
|
|
457
|
+
hasInformationUnits: "hasInformationUnits",
|
|
418
458
|
links: "links"
|
|
419
459
|
};
|
|
420
460
|
var InformationSubjectModelFieldsAll = Object.values(InformationSubjectModelFields);
|
|
@@ -428,6 +468,7 @@ var InformationSubjectProcessModelFields = {
|
|
|
428
468
|
descriptions: "descriptions",
|
|
429
469
|
synonyms: "synonyms",
|
|
430
470
|
packages: "packages",
|
|
471
|
+
hasInformationUnits: "hasInformationUnits",
|
|
431
472
|
links: "links"
|
|
432
473
|
};
|
|
433
474
|
var InformationSubjectProcessModelFieldsAll = Object.values(InformationSubjectProcessModelFields);
|
|
@@ -441,6 +482,7 @@ var InformationSubjectSafetyModelFields = {
|
|
|
441
482
|
descriptions: "descriptions",
|
|
442
483
|
synonyms: "synonyms",
|
|
443
484
|
packages: "packages",
|
|
485
|
+
hasInformationUnits: "hasInformationUnits",
|
|
444
486
|
links: "links"
|
|
445
487
|
};
|
|
446
488
|
var InformationSubjectSafetyModelFieldsAll = Object.values(InformationSubjectSafetyModelFields);
|
|
@@ -454,6 +496,7 @@ var InformationSubjectSafetyWarningMessageModelFields = {
|
|
|
454
496
|
descriptions: "descriptions",
|
|
455
497
|
synonyms: "synonyms",
|
|
456
498
|
packages: "packages",
|
|
499
|
+
hasInformationUnits: "hasInformationUnits",
|
|
457
500
|
links: "links"
|
|
458
501
|
};
|
|
459
502
|
var InformationSubjectSafetyWarningMessageModelFieldsAll = Object.values(InformationSubjectSafetyWarningMessageModelFields);
|
|
@@ -467,6 +510,7 @@ var InformationSubjectTechnicalDataModelFields = {
|
|
|
467
510
|
descriptions: "descriptions",
|
|
468
511
|
synonyms: "synonyms",
|
|
469
512
|
packages: "packages",
|
|
513
|
+
hasInformationUnits: "hasInformationUnits",
|
|
470
514
|
links: "links"
|
|
471
515
|
};
|
|
472
516
|
var InformationSubjectTechnicalDataModelFieldsAll = Object.values(InformationSubjectTechnicalDataModelFields);
|
|
@@ -480,6 +524,7 @@ var InformationSubjectTechnicalOverviewModelFields = {
|
|
|
480
524
|
descriptions: "descriptions",
|
|
481
525
|
synonyms: "synonyms",
|
|
482
526
|
packages: "packages",
|
|
527
|
+
hasInformationUnits: "hasInformationUnits",
|
|
483
528
|
links: "links"
|
|
484
529
|
};
|
|
485
530
|
var InformationSubjectTechnicalOverviewModelFieldsAll = Object.values(InformationSubjectTechnicalOverviewModelFields);
|
|
@@ -493,6 +538,7 @@ var InformationTypeModelFields = {
|
|
|
493
538
|
descriptions: "descriptions",
|
|
494
539
|
synonyms: "synonyms",
|
|
495
540
|
packages: "packages",
|
|
541
|
+
hasInformationUnits: "hasInformationUnits",
|
|
496
542
|
links: "links"
|
|
497
543
|
};
|
|
498
544
|
var InformationTypeModelFieldsAll = Object.values(InformationTypeModelFields);
|
|
@@ -506,6 +552,7 @@ var InformationUnitModelFields = {
|
|
|
506
552
|
descriptions: "descriptions",
|
|
507
553
|
synonyms: "synonyms",
|
|
508
554
|
packages: "packages",
|
|
555
|
+
hasInformationUnits: "hasInformationUnits",
|
|
509
556
|
links: "links",
|
|
510
557
|
revision: "revision",
|
|
511
558
|
created: "created",
|
|
@@ -546,7 +593,8 @@ var OwlClassModelFields = {
|
|
|
546
593
|
comments: "comments",
|
|
547
594
|
descriptions: "descriptions",
|
|
548
595
|
synonyms: "synonyms",
|
|
549
|
-
packages: "packages"
|
|
596
|
+
packages: "packages",
|
|
597
|
+
hasInformationUnits: "hasInformationUnits"
|
|
550
598
|
};
|
|
551
599
|
var OwlClassModelFieldsAll = Object.values(OwlClassModelFields);
|
|
552
600
|
var PackageModelFields = {
|
|
@@ -559,6 +607,7 @@ var PackageModelFields = {
|
|
|
559
607
|
descriptions: "descriptions",
|
|
560
608
|
synonyms: "synonyms",
|
|
561
609
|
packages: "packages",
|
|
610
|
+
hasInformationUnits: "hasInformationUnits",
|
|
562
611
|
links: "links",
|
|
563
612
|
revision: "revision",
|
|
564
613
|
created: "created",
|
|
@@ -603,6 +652,7 @@ var PartyModelFields = {
|
|
|
603
652
|
descriptions: "descriptions",
|
|
604
653
|
synonyms: "synonyms",
|
|
605
654
|
packages: "packages",
|
|
655
|
+
hasInformationUnits: "hasInformationUnits",
|
|
606
656
|
links: "links",
|
|
607
657
|
partyRole: "partyRole",
|
|
608
658
|
vcard: "vcard"
|
|
@@ -618,6 +668,7 @@ var PartyRoleModelFields = {
|
|
|
618
668
|
descriptions: "descriptions",
|
|
619
669
|
synonyms: "synonyms",
|
|
620
670
|
packages: "packages",
|
|
671
|
+
hasInformationUnits: "hasInformationUnits",
|
|
621
672
|
links: "links"
|
|
622
673
|
};
|
|
623
674
|
var PartyRoleModelFieldsAll = Object.values(PartyRoleModelFields);
|
|
@@ -631,6 +682,7 @@ var PlanningDownTimeModelFields = {
|
|
|
631
682
|
descriptions: "descriptions",
|
|
632
683
|
synonyms: "synonyms",
|
|
633
684
|
packages: "packages",
|
|
685
|
+
hasInformationUnits: "hasInformationUnits",
|
|
634
686
|
links: "links",
|
|
635
687
|
duration: "duration"
|
|
636
688
|
};
|
|
@@ -645,6 +697,7 @@ var PlanningMaintenanceIntervalModelFields = {
|
|
|
645
697
|
descriptions: "descriptions",
|
|
646
698
|
synonyms: "synonyms",
|
|
647
699
|
packages: "packages",
|
|
700
|
+
hasInformationUnits: "hasInformationUnits",
|
|
648
701
|
links: "links",
|
|
649
702
|
duration: "duration",
|
|
650
703
|
frequency: "frequency"
|
|
@@ -660,6 +713,7 @@ var PlanningSetupTimeModelFields = {
|
|
|
660
713
|
descriptions: "descriptions",
|
|
661
714
|
synonyms: "synonyms",
|
|
662
715
|
packages: "packages",
|
|
716
|
+
hasInformationUnits: "hasInformationUnits",
|
|
663
717
|
links: "links",
|
|
664
718
|
duration: "duration"
|
|
665
719
|
};
|
|
@@ -674,6 +728,7 @@ var PlanningTimeModelFields = {
|
|
|
674
728
|
descriptions: "descriptions",
|
|
675
729
|
synonyms: "synonyms",
|
|
676
730
|
packages: "packages",
|
|
731
|
+
hasInformationUnits: "hasInformationUnits",
|
|
677
732
|
links: "links",
|
|
678
733
|
duration: "duration"
|
|
679
734
|
};
|
|
@@ -688,6 +743,7 @@ var PlanningWorkingTimeModelFields = {
|
|
|
688
743
|
descriptions: "descriptions",
|
|
689
744
|
synonyms: "synonyms",
|
|
690
745
|
packages: "packages",
|
|
746
|
+
hasInformationUnits: "hasInformationUnits",
|
|
691
747
|
links: "links",
|
|
692
748
|
duration: "duration"
|
|
693
749
|
};
|
|
@@ -702,6 +758,7 @@ var ProductFeatureModelFields = {
|
|
|
702
758
|
descriptions: "descriptions",
|
|
703
759
|
synonyms: "synonyms",
|
|
704
760
|
packages: "packages",
|
|
761
|
+
hasInformationUnits: "hasInformationUnits",
|
|
705
762
|
links: "links"
|
|
706
763
|
};
|
|
707
764
|
var ProductFeatureModelFieldsAll = Object.values(ProductFeatureModelFields);
|
|
@@ -715,6 +772,7 @@ var ProductFunctionModelFields = {
|
|
|
715
772
|
descriptions: "descriptions",
|
|
716
773
|
synonyms: "synonyms",
|
|
717
774
|
packages: "packages",
|
|
775
|
+
hasInformationUnits: "hasInformationUnits",
|
|
718
776
|
links: "links"
|
|
719
777
|
};
|
|
720
778
|
var ProductFunctionModelFieldsAll = Object.values(ProductFunctionModelFields);
|
|
@@ -728,6 +786,7 @@ var ProductLcpAfterUseModelFields = {
|
|
|
728
786
|
descriptions: "descriptions",
|
|
729
787
|
synonyms: "synonyms",
|
|
730
788
|
packages: "packages",
|
|
789
|
+
hasInformationUnits: "hasInformationUnits",
|
|
731
790
|
links: "links"
|
|
732
791
|
};
|
|
733
792
|
var ProductLcpAfterUseModelFieldsAll = Object.values(ProductLcpAfterUseModelFields);
|
|
@@ -741,6 +800,7 @@ var ProductLcpDesignAndRealizationModelFields = {
|
|
|
741
800
|
descriptions: "descriptions",
|
|
742
801
|
synonyms: "synonyms",
|
|
743
802
|
packages: "packages",
|
|
803
|
+
hasInformationUnits: "hasInformationUnits",
|
|
744
804
|
links: "links"
|
|
745
805
|
};
|
|
746
806
|
var ProductLcpDesignAndRealizationModelFieldsAll = Object.values(ProductLcpDesignAndRealizationModelFields);
|
|
@@ -754,6 +814,7 @@ var ProductLcpPuttingToUseModelFields = {
|
|
|
754
814
|
descriptions: "descriptions",
|
|
755
815
|
synonyms: "synonyms",
|
|
756
816
|
packages: "packages",
|
|
817
|
+
hasInformationUnits: "hasInformationUnits",
|
|
757
818
|
links: "links"
|
|
758
819
|
};
|
|
759
820
|
var ProductLcpPuttingToUseModelFieldsAll = Object.values(ProductLcpPuttingToUseModelFields);
|
|
@@ -767,6 +828,7 @@ var ProductLcpUseModelFields = {
|
|
|
767
828
|
descriptions: "descriptions",
|
|
768
829
|
synonyms: "synonyms",
|
|
769
830
|
packages: "packages",
|
|
831
|
+
hasInformationUnits: "hasInformationUnits",
|
|
770
832
|
links: "links"
|
|
771
833
|
};
|
|
772
834
|
var ProductLcpUseModelFieldsAll = Object.values(ProductLcpUseModelFields);
|
|
@@ -780,6 +842,7 @@ var ProductLifeCyclePhaseModelFields = {
|
|
|
780
842
|
descriptions: "descriptions",
|
|
781
843
|
synonyms: "synonyms",
|
|
782
844
|
packages: "packages",
|
|
845
|
+
hasInformationUnits: "hasInformationUnits",
|
|
783
846
|
links: "links"
|
|
784
847
|
};
|
|
785
848
|
var ProductLifeCyclePhaseModelFieldsAll = Object.values(ProductLifeCyclePhaseModelFields);
|
|
@@ -793,6 +856,7 @@ var ProductMetadataModelFields = {
|
|
|
793
856
|
descriptions: "descriptions",
|
|
794
857
|
synonyms: "synonyms",
|
|
795
858
|
packages: "packages",
|
|
859
|
+
hasInformationUnits: "hasInformationUnits",
|
|
796
860
|
links: "links"
|
|
797
861
|
};
|
|
798
862
|
var ProductMetadataModelFieldsAll = Object.values(ProductMetadataModelFields);
|
|
@@ -806,6 +870,7 @@ var ProductPropertyModelFields = {
|
|
|
806
870
|
descriptions: "descriptions",
|
|
807
871
|
synonyms: "synonyms",
|
|
808
872
|
packages: "packages",
|
|
873
|
+
hasInformationUnits: "hasInformationUnits",
|
|
809
874
|
links: "links"
|
|
810
875
|
};
|
|
811
876
|
var ProductPropertyModelFieldsAll = Object.values(ProductPropertyModelFields);
|
|
@@ -819,6 +884,7 @@ var ProductVariantModelFields = {
|
|
|
819
884
|
descriptions: "descriptions",
|
|
820
885
|
synonyms: "synonyms",
|
|
821
886
|
packages: "packages",
|
|
887
|
+
hasInformationUnits: "hasInformationUnits",
|
|
822
888
|
links: "links",
|
|
823
889
|
identities: "identities",
|
|
824
890
|
parties: "parties"
|
|
@@ -834,6 +900,7 @@ var QualificationModelFields = {
|
|
|
834
900
|
descriptions: "descriptions",
|
|
835
901
|
synonyms: "synonyms",
|
|
836
902
|
packages: "packages",
|
|
903
|
+
hasInformationUnits: "hasInformationUnits",
|
|
837
904
|
links: "links"
|
|
838
905
|
};
|
|
839
906
|
var QualificationModelFieldsAll = Object.values(QualificationModelFields);
|
|
@@ -847,6 +914,7 @@ var QualificationRoleModelFields = {
|
|
|
847
914
|
descriptions: "descriptions",
|
|
848
915
|
synonyms: "synonyms",
|
|
849
916
|
packages: "packages",
|
|
917
|
+
hasInformationUnits: "hasInformationUnits",
|
|
850
918
|
links: "links"
|
|
851
919
|
};
|
|
852
920
|
var QualificationRoleModelFieldsAll = Object.values(QualificationRoleModelFields);
|
|
@@ -860,6 +928,7 @@ var QualificationSkillLevelModelFields = {
|
|
|
860
928
|
descriptions: "descriptions",
|
|
861
929
|
synonyms: "synonyms",
|
|
862
930
|
packages: "packages",
|
|
931
|
+
hasInformationUnits: "hasInformationUnits",
|
|
863
932
|
links: "links"
|
|
864
933
|
};
|
|
865
934
|
var QualificationSkillLevelModelFieldsAll = Object.values(QualificationSkillLevelModelFields);
|
|
@@ -873,6 +942,7 @@ var RenditionModelFields = {
|
|
|
873
942
|
descriptions: "descriptions",
|
|
874
943
|
synonyms: "synonyms",
|
|
875
944
|
packages: "packages",
|
|
945
|
+
hasInformationUnits: "hasInformationUnits",
|
|
876
946
|
links: "links",
|
|
877
947
|
source: "source",
|
|
878
948
|
format: "format",
|
|
@@ -890,7 +960,8 @@ var RenditionSelectorModelFields = {
|
|
|
890
960
|
comments: "comments",
|
|
891
961
|
descriptions: "descriptions",
|
|
892
962
|
synonyms: "synonyms",
|
|
893
|
-
packages: "packages"
|
|
963
|
+
packages: "packages",
|
|
964
|
+
hasInformationUnits: "hasInformationUnits"
|
|
894
965
|
};
|
|
895
966
|
var RenditionSelectorModelFieldsAll = Object.values(RenditionSelectorModelFields);
|
|
896
967
|
var SupplyConsumableModelFields = {
|
|
@@ -903,6 +974,7 @@ var SupplyConsumableModelFields = {
|
|
|
903
974
|
descriptions: "descriptions",
|
|
904
975
|
synonyms: "synonyms",
|
|
905
976
|
packages: "packages",
|
|
977
|
+
hasInformationUnits: "hasInformationUnits",
|
|
906
978
|
links: "links"
|
|
907
979
|
};
|
|
908
980
|
var SupplyConsumableModelFieldsAll = Object.values(SupplyConsumableModelFields);
|
|
@@ -916,6 +988,7 @@ var SupplyHardwareToolModelFields = {
|
|
|
916
988
|
descriptions: "descriptions",
|
|
917
989
|
synonyms: "synonyms",
|
|
918
990
|
packages: "packages",
|
|
991
|
+
hasInformationUnits: "hasInformationUnits",
|
|
919
992
|
links: "links"
|
|
920
993
|
};
|
|
921
994
|
var SupplyHardwareToolModelFieldsAll = Object.values(SupplyHardwareToolModelFields);
|
|
@@ -929,6 +1002,7 @@ var SupplyLubricantModelFields = {
|
|
|
929
1002
|
descriptions: "descriptions",
|
|
930
1003
|
synonyms: "synonyms",
|
|
931
1004
|
packages: "packages",
|
|
1005
|
+
hasInformationUnits: "hasInformationUnits",
|
|
932
1006
|
links: "links"
|
|
933
1007
|
};
|
|
934
1008
|
var SupplyLubricantModelFieldsAll = Object.values(SupplyLubricantModelFields);
|
|
@@ -942,6 +1016,7 @@ var SupplyModelFields = {
|
|
|
942
1016
|
descriptions: "descriptions",
|
|
943
1017
|
synonyms: "synonyms",
|
|
944
1018
|
packages: "packages",
|
|
1019
|
+
hasInformationUnits: "hasInformationUnits",
|
|
945
1020
|
links: "links"
|
|
946
1021
|
};
|
|
947
1022
|
var SupplyModelFieldsAll = Object.values(SupplyModelFields);
|
|
@@ -955,6 +1030,7 @@ var SupplyOperatingModelFields = {
|
|
|
955
1030
|
descriptions: "descriptions",
|
|
956
1031
|
synonyms: "synonyms",
|
|
957
1032
|
packages: "packages",
|
|
1033
|
+
hasInformationUnits: "hasInformationUnits",
|
|
958
1034
|
links: "links"
|
|
959
1035
|
};
|
|
960
1036
|
var SupplyOperatingModelFieldsAll = Object.values(SupplyOperatingModelFields);
|
|
@@ -968,6 +1044,7 @@ var SupplySparePartModelFields = {
|
|
|
968
1044
|
descriptions: "descriptions",
|
|
969
1045
|
synonyms: "synonyms",
|
|
970
1046
|
packages: "packages",
|
|
1047
|
+
hasInformationUnits: "hasInformationUnits",
|
|
971
1048
|
links: "links"
|
|
972
1049
|
};
|
|
973
1050
|
var SupplySparePartModelFieldsAll = Object.values(SupplySparePartModelFields);
|
|
@@ -981,6 +1058,7 @@ var TopicModelFields = {
|
|
|
981
1058
|
descriptions: "descriptions",
|
|
982
1059
|
synonyms: "synonyms",
|
|
983
1060
|
packages: "packages",
|
|
1061
|
+
hasInformationUnits: "hasInformationUnits",
|
|
984
1062
|
links: "links",
|
|
985
1063
|
revision: "revision",
|
|
986
1064
|
created: "created",
|
|
@@ -1022,6 +1100,7 @@ var TopicTypeConceptModelFields = {
|
|
|
1022
1100
|
descriptions: "descriptions",
|
|
1023
1101
|
synonyms: "synonyms",
|
|
1024
1102
|
packages: "packages",
|
|
1103
|
+
hasInformationUnits: "hasInformationUnits",
|
|
1025
1104
|
links: "links"
|
|
1026
1105
|
};
|
|
1027
1106
|
var TopicTypeConceptModelFieldsAll = Object.values(TopicTypeConceptModelFields);
|
|
@@ -1035,6 +1114,7 @@ var TopicTypeFormModelFields = {
|
|
|
1035
1114
|
descriptions: "descriptions",
|
|
1036
1115
|
synonyms: "synonyms",
|
|
1037
1116
|
packages: "packages",
|
|
1117
|
+
hasInformationUnits: "hasInformationUnits",
|
|
1038
1118
|
links: "links"
|
|
1039
1119
|
};
|
|
1040
1120
|
var TopicTypeFormModelFieldsAll = Object.values(TopicTypeFormModelFields);
|
|
@@ -1048,6 +1128,7 @@ var TopicTypeLearningModelFields = {
|
|
|
1048
1128
|
descriptions: "descriptions",
|
|
1049
1129
|
synonyms: "synonyms",
|
|
1050
1130
|
packages: "packages",
|
|
1131
|
+
hasInformationUnits: "hasInformationUnits",
|
|
1051
1132
|
links: "links"
|
|
1052
1133
|
};
|
|
1053
1134
|
var TopicTypeLearningModelFieldsAll = Object.values(TopicTypeLearningModelFields);
|
|
@@ -1061,6 +1142,7 @@ var TopicTypeModelFields = {
|
|
|
1061
1142
|
descriptions: "descriptions",
|
|
1062
1143
|
synonyms: "synonyms",
|
|
1063
1144
|
packages: "packages",
|
|
1145
|
+
hasInformationUnits: "hasInformationUnits",
|
|
1064
1146
|
links: "links"
|
|
1065
1147
|
};
|
|
1066
1148
|
var TopicTypeModelFieldsAll = Object.values(TopicTypeModelFields);
|
|
@@ -1074,6 +1156,7 @@ var TopicTypeReferenceModelFields = {
|
|
|
1074
1156
|
descriptions: "descriptions",
|
|
1075
1157
|
synonyms: "synonyms",
|
|
1076
1158
|
packages: "packages",
|
|
1159
|
+
hasInformationUnits: "hasInformationUnits",
|
|
1077
1160
|
links: "links"
|
|
1078
1161
|
};
|
|
1079
1162
|
var TopicTypeReferenceModelFieldsAll = Object.values(TopicTypeReferenceModelFields);
|
|
@@ -1087,6 +1170,7 @@ var TopicTypeTaskModelFields = {
|
|
|
1087
1170
|
descriptions: "descriptions",
|
|
1088
1171
|
synonyms: "synonyms",
|
|
1089
1172
|
packages: "packages",
|
|
1173
|
+
hasInformationUnits: "hasInformationUnits",
|
|
1090
1174
|
links: "links"
|
|
1091
1175
|
};
|
|
1092
1176
|
var TopicTypeTaskModelFieldsAll = Object.values(TopicTypeTaskModelFields);
|
|
@@ -1100,6 +1184,7 @@ var TopicTypeTroubleShootingModelFields = {
|
|
|
1100
1184
|
descriptions: "descriptions",
|
|
1101
1185
|
synonyms: "synonyms",
|
|
1102
1186
|
packages: "packages",
|
|
1187
|
+
hasInformationUnits: "hasInformationUnits",
|
|
1103
1188
|
links: "links"
|
|
1104
1189
|
};
|
|
1105
1190
|
var TopicTypeTroubleShootingModelFieldsAll = Object.values(TopicTypeTroubleShootingModelFields);
|
|
@@ -1113,6 +1198,7 @@ var VCardCalendarModelFields = {
|
|
|
1113
1198
|
descriptions: "descriptions",
|
|
1114
1199
|
synonyms: "synonyms",
|
|
1115
1200
|
packages: "packages",
|
|
1201
|
+
hasInformationUnits: "hasInformationUnits",
|
|
1116
1202
|
source: "source"
|
|
1117
1203
|
};
|
|
1118
1204
|
var VCardCalendarModelFieldsAll = Object.values(VCardCalendarModelFields);
|
|
@@ -1126,6 +1212,7 @@ var VCardGroupModelFields = {
|
|
|
1126
1212
|
descriptions: "descriptions",
|
|
1127
1213
|
synonyms: "synonyms",
|
|
1128
1214
|
packages: "packages",
|
|
1215
|
+
hasInformationUnits: "hasInformationUnits",
|
|
1129
1216
|
links: "links",
|
|
1130
1217
|
fullName: "fullName",
|
|
1131
1218
|
photos: "photos",
|
|
@@ -1147,6 +1234,7 @@ var VCardImageModelFields = {
|
|
|
1147
1234
|
descriptions: "descriptions",
|
|
1148
1235
|
synonyms: "synonyms",
|
|
1149
1236
|
packages: "packages",
|
|
1237
|
+
hasInformationUnits: "hasInformationUnits",
|
|
1150
1238
|
classes: "classes",
|
|
1151
1239
|
value: "value",
|
|
1152
1240
|
source: "source"
|
|
@@ -1162,6 +1250,7 @@ var VCardIndividualModelFields = {
|
|
|
1162
1250
|
descriptions: "descriptions",
|
|
1163
1251
|
synonyms: "synonyms",
|
|
1164
1252
|
packages: "packages",
|
|
1253
|
+
hasInformationUnits: "hasInformationUnits",
|
|
1165
1254
|
links: "links",
|
|
1166
1255
|
fullName: "fullName",
|
|
1167
1256
|
photos: "photos",
|
|
@@ -1180,6 +1269,7 @@ var VCardInfoModelFields = {
|
|
|
1180
1269
|
shortId: "shortId",
|
|
1181
1270
|
score: "score",
|
|
1182
1271
|
classes: "classes",
|
|
1272
|
+
types: "types",
|
|
1183
1273
|
value: "value",
|
|
1184
1274
|
countryName: "countryName",
|
|
1185
1275
|
locality: "locality",
|
|
@@ -1197,6 +1287,7 @@ var VCardLocationModelFields = {
|
|
|
1197
1287
|
descriptions: "descriptions",
|
|
1198
1288
|
synonyms: "synonyms",
|
|
1199
1289
|
packages: "packages",
|
|
1290
|
+
hasInformationUnits: "hasInformationUnits",
|
|
1200
1291
|
links: "links",
|
|
1201
1292
|
fullName: "fullName",
|
|
1202
1293
|
photos: "photos",
|
|
@@ -1218,6 +1309,7 @@ var VCardModelFields = {
|
|
|
1218
1309
|
descriptions: "descriptions",
|
|
1219
1310
|
synonyms: "synonyms",
|
|
1220
1311
|
packages: "packages",
|
|
1312
|
+
hasInformationUnits: "hasInformationUnits",
|
|
1221
1313
|
links: "links",
|
|
1222
1314
|
fullName: "fullName",
|
|
1223
1315
|
photos: "photos",
|
|
@@ -1238,6 +1330,7 @@ var VCardOrganizationModelFields = {
|
|
|
1238
1330
|
descriptions: "descriptions",
|
|
1239
1331
|
synonyms: "synonyms",
|
|
1240
1332
|
packages: "packages",
|
|
1333
|
+
hasInformationUnits: "hasInformationUnits",
|
|
1241
1334
|
links: "links",
|
|
1242
1335
|
fullName: "fullName",
|
|
1243
1336
|
photos: "photos",
|
|
@@ -1256,46 +1349,122 @@ var VCardOrganizationModelFieldsAll = Object.values(VCardOrganizationModelFields
|
|
|
1256
1349
|
// ../constants/src/index.ts
|
|
1257
1350
|
var DEFAULT_COOKIE_LIMIT = 30 * 24 * 60 * 60 * 1e3;
|
|
1258
1351
|
|
|
1259
|
-
// src/
|
|
1352
|
+
// src/metadata.ts
|
|
1260
1353
|
var getTitle = (titles, labels) => {
|
|
1261
|
-
let title = "NO TITLE";
|
|
1262
1354
|
if (titles) {
|
|
1263
|
-
|
|
1264
|
-
} else if (labels) {
|
|
1265
|
-
title = labels[0]?.value;
|
|
1355
|
+
return titles[0]?.value;
|
|
1266
1356
|
}
|
|
1267
|
-
|
|
1357
|
+
if (labels) {
|
|
1358
|
+
return labels[0]?.value;
|
|
1359
|
+
}
|
|
1360
|
+
return "NO TITLE";
|
|
1361
|
+
};
|
|
1362
|
+
|
|
1363
|
+
// ../services/src/base-server-request.ts
|
|
1364
|
+
import { CrexApi } from "@c-rex/core/requests";
|
|
1365
|
+
|
|
1366
|
+
// ../services/src/server-request-context.ts
|
|
1367
|
+
import { AsyncLocalStorage } from "async_hooks";
|
|
1368
|
+
var requestContextStorage = new AsyncLocalStorage();
|
|
1369
|
+
var getServerRequestContext = () => {
|
|
1370
|
+
return requestContextStorage.getStore();
|
|
1371
|
+
};
|
|
1372
|
+
|
|
1373
|
+
// ../services/src/base-server-request.ts
|
|
1374
|
+
var baseServerRequest = async (endpoint, query) => {
|
|
1375
|
+
const api = new CrexApi();
|
|
1376
|
+
const requestContext = getServerRequestContext();
|
|
1377
|
+
const response = await api.execute({
|
|
1378
|
+
url: endpoint,
|
|
1379
|
+
method: "GET",
|
|
1380
|
+
params: query,
|
|
1381
|
+
skipCookieTokenLookup: requestContext?.skipCookieTokenLookup,
|
|
1382
|
+
authToken: requestContext?.authToken
|
|
1383
|
+
});
|
|
1384
|
+
return response;
|
|
1385
|
+
};
|
|
1386
|
+
|
|
1387
|
+
// ../services/src/generated/server-requests.ts
|
|
1388
|
+
var directoryNodesGetByIdServer = async (params, query) => {
|
|
1389
|
+
return baseServerRequest(`DirectoryNodes/${encodeURIComponent(String(params.id))}`, query);
|
|
1268
1390
|
};
|
|
1269
1391
|
|
|
1270
1392
|
// src/directoryNodes.ts
|
|
1271
|
-
|
|
1393
|
+
var TREE_DIRECTORY_NODE_FIELDS_WITH_LINKS = [
|
|
1394
|
+
"shortId",
|
|
1395
|
+
"labels",
|
|
1396
|
+
"parents",
|
|
1397
|
+
"childNodes",
|
|
1398
|
+
"informationUnits"
|
|
1399
|
+
];
|
|
1400
|
+
var TREE_DIRECTORY_NODE_FIELDS_NO_LINKS = [
|
|
1401
|
+
"shortId",
|
|
1402
|
+
"labels",
|
|
1403
|
+
"parents",
|
|
1404
|
+
"childNodes"
|
|
1405
|
+
];
|
|
1406
|
+
var ROOT_DIRECTORY_NODE_FIELDS = [
|
|
1407
|
+
"shortId",
|
|
1408
|
+
"ancestors",
|
|
1409
|
+
"labels",
|
|
1410
|
+
"informationUnits"
|
|
1411
|
+
];
|
|
1412
|
+
var createDirectoryNodeFetcher = (query) => {
|
|
1413
|
+
const cache = /* @__PURE__ */ new Map();
|
|
1414
|
+
return async (id) => {
|
|
1415
|
+
if (!id) return void 0;
|
|
1416
|
+
const normalizedId = id.trim();
|
|
1417
|
+
if (!normalizedId) return void 0;
|
|
1418
|
+
if (!cache.has(normalizedId)) {
|
|
1419
|
+
cache.set(
|
|
1420
|
+
normalizedId,
|
|
1421
|
+
directoryNodesGetByIdServer({ id: normalizedId }, query).catch((err) => {
|
|
1422
|
+
console.error("Error fetching DirectoryNode", normalizedId, err);
|
|
1423
|
+
return void 0;
|
|
1424
|
+
})
|
|
1425
|
+
);
|
|
1426
|
+
}
|
|
1427
|
+
return cache.get(normalizedId);
|
|
1428
|
+
};
|
|
1429
|
+
};
|
|
1272
1430
|
var generateTreeOfContent = async (directoryNodes) => {
|
|
1431
|
+
return generateTreeOfContentWithOptions(directoryNodes, { includeLinkIds: true });
|
|
1432
|
+
};
|
|
1433
|
+
var generateTreeOfContentWithOptions = async (directoryNodes, options) => {
|
|
1273
1434
|
if (!directoryNodes?.length || !directoryNodes[0]?.shortId) return [];
|
|
1274
|
-
|
|
1275
|
-
|
|
1435
|
+
const includeLinkIds = options?.includeLinkIds !== false;
|
|
1436
|
+
const fetchNode = createDirectoryNodeFetcher({
|
|
1437
|
+
Fields: includeLinkIds ? TREE_DIRECTORY_NODE_FIELDS_WITH_LINKS : TREE_DIRECTORY_NODE_FIELDS_NO_LINKS
|
|
1438
|
+
});
|
|
1439
|
+
let response = await fetchNode(directoryNodes[0].shortId);
|
|
1440
|
+
if (!response) return [];
|
|
1441
|
+
if (!response.labels?.[0]) return [];
|
|
1442
|
+
if (includeLinkIds && !response.informationUnits?.[0]) return [];
|
|
1276
1443
|
let children = [];
|
|
1277
1444
|
if (response.childNodes) {
|
|
1278
|
-
children = await
|
|
1445
|
+
children = await getChildrenInfoInternal(response.childNodes, fetchNode, includeLinkIds);
|
|
1279
1446
|
}
|
|
1280
1447
|
let prevItem = {
|
|
1281
1448
|
active: true,
|
|
1282
|
-
label: getTitle(null, directoryNodes[0].labels),
|
|
1449
|
+
label: response.labels?.[0]?.value || getTitle(null, directoryNodes[0].labels),
|
|
1283
1450
|
id: directoryNodes[0].shortId,
|
|
1284
|
-
linkId: response.informationUnits[0]
|
|
1451
|
+
linkId: includeLinkIds ? response.informationUnits?.[0]?.shortId : void 0,
|
|
1285
1452
|
children
|
|
1286
1453
|
};
|
|
1287
1454
|
let result = [prevItem];
|
|
1288
1455
|
while (response.parents?.[0]) {
|
|
1289
|
-
|
|
1456
|
+
const parentResponse = await fetchNode(response.parents[0].shortId);
|
|
1457
|
+
if (!parentResponse) break;
|
|
1458
|
+
response = parentResponse;
|
|
1290
1459
|
let childItems = [];
|
|
1291
1460
|
if (response.childNodes) {
|
|
1292
|
-
childItems = await
|
|
1461
|
+
childItems = await getChildrenInfoInternal(response.childNodes || [], fetchNode, includeLinkIds);
|
|
1293
1462
|
}
|
|
1294
1463
|
const index = childItems.findIndex((i) => i.id === prevItem.id);
|
|
1295
1464
|
if (index !== -1) {
|
|
1296
1465
|
childItems[index] = prevItem;
|
|
1297
1466
|
}
|
|
1298
|
-
if (!response.labels?.[0] || !response.informationUnits?.[0]) {
|
|
1467
|
+
if (!response.labels?.[0] || includeLinkIds && !response.informationUnits?.[0]) {
|
|
1299
1468
|
result = childItems;
|
|
1300
1469
|
break;
|
|
1301
1470
|
}
|
|
@@ -1304,7 +1473,7 @@ var generateTreeOfContent = async (directoryNodes) => {
|
|
|
1304
1473
|
active: true,
|
|
1305
1474
|
label: response.labels[0].value,
|
|
1306
1475
|
id: response.shortId,
|
|
1307
|
-
linkId: response.informationUnits[0]
|
|
1476
|
+
linkId: includeLinkIds ? response.informationUnits?.[0]?.shortId : void 0,
|
|
1308
1477
|
children: childItems
|
|
1309
1478
|
};
|
|
1310
1479
|
result = [prevItem];
|
|
@@ -1313,12 +1482,37 @@ var generateTreeOfContent = async (directoryNodes) => {
|
|
|
1313
1482
|
};
|
|
1314
1483
|
var getChildrenInfo = async (childNodes) => {
|
|
1315
1484
|
if (!childNodes?.length) return [];
|
|
1485
|
+
const fetchNode = createDirectoryNodeFetcher({ Fields: TREE_DIRECTORY_NODE_FIELDS_WITH_LINKS });
|
|
1486
|
+
return getChildrenInfoInternal(childNodes, fetchNode, true);
|
|
1487
|
+
};
|
|
1488
|
+
var getChildrenInfoInternal = async (childNodes, fetchNode, includeLinkIds) => {
|
|
1489
|
+
if (!includeLinkIds) {
|
|
1490
|
+
const directChildren = childNodes.filter((node) => Boolean(node?.shortId)).map((node) => ({
|
|
1491
|
+
active: false,
|
|
1492
|
+
label: node.labels?.[0]?.value || getTitle(null, node.labels) || node.shortId,
|
|
1493
|
+
id: node.shortId,
|
|
1494
|
+
linkId: void 0,
|
|
1495
|
+
children: []
|
|
1496
|
+
}));
|
|
1497
|
+
const missingLabelIds = childNodes.filter((node) => Boolean(node?.shortId) && !node.labels?.[0]).map((node) => node.shortId);
|
|
1498
|
+
if (missingLabelIds.length === 0) {
|
|
1499
|
+
return directChildren;
|
|
1500
|
+
}
|
|
1501
|
+
const fetchedMissing = await Promise.all(missingLabelIds.map((id) => fetchNode(id)));
|
|
1502
|
+
const missingLabelMap = /* @__PURE__ */ new Map();
|
|
1503
|
+
fetchedMissing.forEach((node) => {
|
|
1504
|
+
if (!node?.shortId) return;
|
|
1505
|
+
const label = node.labels?.[0]?.value || node.shortId;
|
|
1506
|
+
missingLabelMap.set(node.shortId, label);
|
|
1507
|
+
});
|
|
1508
|
+
return directChildren.map((item) => ({
|
|
1509
|
+
...item,
|
|
1510
|
+
label: item.label || missingLabelMap.get(item.id) || item.id
|
|
1511
|
+
}));
|
|
1512
|
+
}
|
|
1316
1513
|
const responses = await Promise.all(
|
|
1317
1514
|
childNodes.map(
|
|
1318
|
-
(n) =>
|
|
1319
|
-
console.error("Erro em", n.shortId, err);
|
|
1320
|
-
return void 0;
|
|
1321
|
-
})
|
|
1515
|
+
(n) => fetchNode(n.shortId)
|
|
1322
1516
|
)
|
|
1323
1517
|
);
|
|
1324
1518
|
const finalArray = [];
|
|
@@ -1326,11 +1520,10 @@ var getChildrenInfo = async (childNodes) => {
|
|
|
1326
1520
|
validNodes.forEach((resp, index) => {
|
|
1327
1521
|
const node = validNodes[index];
|
|
1328
1522
|
if (node && node.labels && node.labels[0]) {
|
|
1329
|
-
const shortId = resp.informationUnits?.[0]?.shortId;
|
|
1330
1523
|
const treeItem = {
|
|
1331
1524
|
active: false,
|
|
1332
1525
|
label: node.labels?.[0].value,
|
|
1333
|
-
linkId: shortId,
|
|
1526
|
+
linkId: includeLinkIds ? resp.informationUnits?.[0]?.shortId ?? void 0 : void 0,
|
|
1334
1527
|
id: node.shortId,
|
|
1335
1528
|
children: []
|
|
1336
1529
|
};
|
|
@@ -1342,8 +1535,10 @@ var getChildrenInfo = async (childNodes) => {
|
|
|
1342
1535
|
var getRootNode = async (directoryNodes) => {
|
|
1343
1536
|
if (directoryNodes.length === 0 || !directoryNodes[0]) return null;
|
|
1344
1537
|
if (!directoryNodes[0].shortId) return null;
|
|
1538
|
+
const fetchNode = createDirectoryNodeFetcher({ Fields: ROOT_DIRECTORY_NODE_FIELDS });
|
|
1345
1539
|
let id = directoryNodes[0].shortId;
|
|
1346
|
-
let response = await
|
|
1540
|
+
let response = await fetchNode(id);
|
|
1541
|
+
if (!response) return null;
|
|
1347
1542
|
if (!response.ancestors || response.ancestors.length === 0) {
|
|
1348
1543
|
return response;
|
|
1349
1544
|
}
|
|
@@ -1356,7 +1551,8 @@ var getRootNode = async (directoryNodes) => {
|
|
|
1356
1551
|
if (response.ancestors[0][lastIndex] == void 0) return null;
|
|
1357
1552
|
if (!response.ancestors[0][lastIndex].shortId) return null;
|
|
1358
1553
|
id = response.ancestors[0][lastIndex].shortId;
|
|
1359
|
-
response = await
|
|
1554
|
+
response = await fetchNode(id);
|
|
1555
|
+
if (!response) return null;
|
|
1360
1556
|
return response;
|
|
1361
1557
|
};
|
|
1362
1558
|
var getLastLabel = (tree) => {
|
|
@@ -1370,6 +1566,7 @@ var getLastLabel = (tree) => {
|
|
|
1370
1566
|
};
|
|
1371
1567
|
export {
|
|
1372
1568
|
generateTreeOfContent,
|
|
1569
|
+
generateTreeOfContentWithOptions,
|
|
1373
1570
|
getChildrenInfo,
|
|
1374
1571
|
getLastLabel,
|
|
1375
1572
|
getRootNode
|