@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.js
CHANGED
|
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var directoryNodes_exports = {};
|
|
22
22
|
__export(directoryNodes_exports, {
|
|
23
23
|
generateTreeOfContent: () => generateTreeOfContent,
|
|
24
|
+
generateTreeOfContentWithOptions: () => generateTreeOfContentWithOptions,
|
|
24
25
|
getChildrenInfo: () => getChildrenInfo,
|
|
25
26
|
getLastLabel: () => getLastLabel,
|
|
26
27
|
getRootNode: () => getRootNode
|
|
@@ -38,6 +39,7 @@ var AdministrativeMetadataModelFields = {
|
|
|
38
39
|
descriptions: "descriptions",
|
|
39
40
|
synonyms: "synonyms",
|
|
40
41
|
packages: "packages",
|
|
42
|
+
hasInformationUnits: "hasInformationUnits",
|
|
41
43
|
links: "links"
|
|
42
44
|
};
|
|
43
45
|
var AdministrativeMetadataModelFieldsAll = Object.values(AdministrativeMetadataModelFields);
|
|
@@ -52,6 +54,24 @@ var AuthStateModelFields = {
|
|
|
52
54
|
roles: "roles"
|
|
53
55
|
};
|
|
54
56
|
var AuthStateModelFieldsAll = Object.values(AuthStateModelFields);
|
|
57
|
+
var CategoryModelFields = {
|
|
58
|
+
id: "id",
|
|
59
|
+
shortId: "shortId",
|
|
60
|
+
score: "score",
|
|
61
|
+
class: "class",
|
|
62
|
+
labels: "labels",
|
|
63
|
+
comments: "comments",
|
|
64
|
+
descriptions: "descriptions",
|
|
65
|
+
synonyms: "synonyms",
|
|
66
|
+
packages: "packages",
|
|
67
|
+
hasInformationUnits: "hasInformationUnits",
|
|
68
|
+
links: "links",
|
|
69
|
+
parents: "parents",
|
|
70
|
+
ancestors: "ancestors",
|
|
71
|
+
ancestorsOrSelf: "ancestorsOrSelf",
|
|
72
|
+
categories: "categories"
|
|
73
|
+
};
|
|
74
|
+
var CategoryModelFieldsAll = Object.values(CategoryModelFields);
|
|
55
75
|
var ComponentModelFields = {
|
|
56
76
|
id: "id",
|
|
57
77
|
shortId: "shortId",
|
|
@@ -62,6 +82,7 @@ var ComponentModelFields = {
|
|
|
62
82
|
descriptions: "descriptions",
|
|
63
83
|
synonyms: "synonyms",
|
|
64
84
|
packages: "packages",
|
|
85
|
+
hasInformationUnits: "hasInformationUnits",
|
|
65
86
|
links: "links",
|
|
66
87
|
productGraphic: "productGraphic",
|
|
67
88
|
titles: "titles",
|
|
@@ -85,6 +106,7 @@ var ContentLifeCycleStatusModelFields = {
|
|
|
85
106
|
descriptions: "descriptions",
|
|
86
107
|
synonyms: "synonyms",
|
|
87
108
|
packages: "packages",
|
|
109
|
+
hasInformationUnits: "hasInformationUnits",
|
|
88
110
|
links: "links",
|
|
89
111
|
dateOfEffect: "dateOfEffect",
|
|
90
112
|
dateOfExpiry: "dateOfExpiry",
|
|
@@ -104,6 +126,7 @@ var ContentLifeCycleStatusValueModelFields = {
|
|
|
104
126
|
descriptions: "descriptions",
|
|
105
127
|
synonyms: "synonyms",
|
|
106
128
|
packages: "packages",
|
|
129
|
+
hasInformationUnits: "hasInformationUnits",
|
|
107
130
|
links: "links"
|
|
108
131
|
};
|
|
109
132
|
var ContentLifeCycleStatusValueModelFieldsAll = Object.values(ContentLifeCycleStatusValueModelFields);
|
|
@@ -117,6 +140,7 @@ var DirectoryNodeModelFields = {
|
|
|
117
140
|
descriptions: "descriptions",
|
|
118
141
|
synonyms: "synonyms",
|
|
119
142
|
packages: "packages",
|
|
143
|
+
hasInformationUnits: "hasInformationUnits",
|
|
120
144
|
links: "links",
|
|
121
145
|
structureType: "structureType",
|
|
122
146
|
parents: "parents",
|
|
@@ -136,6 +160,7 @@ var DirectoryNodeTypeModelFields = {
|
|
|
136
160
|
descriptions: "descriptions",
|
|
137
161
|
synonyms: "synonyms",
|
|
138
162
|
packages: "packages",
|
|
163
|
+
hasInformationUnits: "hasInformationUnits",
|
|
139
164
|
links: "links"
|
|
140
165
|
};
|
|
141
166
|
var DirectoryNodeTypeModelFieldsAll = Object.values(DirectoryNodeTypeModelFields);
|
|
@@ -149,6 +174,7 @@ var DocumentModelFields = {
|
|
|
149
174
|
descriptions: "descriptions",
|
|
150
175
|
synonyms: "synonyms",
|
|
151
176
|
packages: "packages",
|
|
177
|
+
hasInformationUnits: "hasInformationUnits",
|
|
152
178
|
links: "links",
|
|
153
179
|
revision: "revision",
|
|
154
180
|
created: "created",
|
|
@@ -190,6 +216,7 @@ var DocumentTypeModelFields = {
|
|
|
190
216
|
descriptions: "descriptions",
|
|
191
217
|
synonyms: "synonyms",
|
|
192
218
|
packages: "packages",
|
|
219
|
+
hasInformationUnits: "hasInformationUnits",
|
|
193
220
|
links: "links"
|
|
194
221
|
};
|
|
195
222
|
var DocumentTypeModelFieldsAll = Object.values(DocumentTypeModelFields);
|
|
@@ -203,6 +230,7 @@ var DocumentationMetadataModelFields = {
|
|
|
203
230
|
descriptions: "descriptions",
|
|
204
231
|
synonyms: "synonyms",
|
|
205
232
|
packages: "packages",
|
|
233
|
+
hasInformationUnits: "hasInformationUnits",
|
|
206
234
|
links: "links"
|
|
207
235
|
};
|
|
208
236
|
var DocumentationMetadataModelFieldsAll = Object.values(DocumentationMetadataModelFields);
|
|
@@ -215,7 +243,8 @@ var DomainEntityModelFields = {
|
|
|
215
243
|
comments: "comments",
|
|
216
244
|
descriptions: "descriptions",
|
|
217
245
|
synonyms: "synonyms",
|
|
218
|
-
packages: "packages"
|
|
246
|
+
packages: "packages",
|
|
247
|
+
hasInformationUnits: "hasInformationUnits"
|
|
219
248
|
};
|
|
220
249
|
var DomainEntityModelFieldsAll = Object.values(DomainEntityModelFields);
|
|
221
250
|
var EventModelFields = {
|
|
@@ -228,6 +257,7 @@ var EventModelFields = {
|
|
|
228
257
|
descriptions: "descriptions",
|
|
229
258
|
synonyms: "synonyms",
|
|
230
259
|
packages: "packages",
|
|
260
|
+
hasInformationUnits: "hasInformationUnits",
|
|
231
261
|
links: "links",
|
|
232
262
|
eventCode: "eventCode",
|
|
233
263
|
eventType: "eventType"
|
|
@@ -243,6 +273,7 @@ var ExternalProductGraphicModelFields = {
|
|
|
243
273
|
descriptions: "descriptions",
|
|
244
274
|
synonyms: "synonyms",
|
|
245
275
|
packages: "packages",
|
|
276
|
+
hasInformationUnits: "hasInformationUnits",
|
|
246
277
|
links: "links",
|
|
247
278
|
revision: "revision",
|
|
248
279
|
created: "created",
|
|
@@ -295,6 +326,7 @@ var FragmentModelFields = {
|
|
|
295
326
|
descriptions: "descriptions",
|
|
296
327
|
synonyms: "synonyms",
|
|
297
328
|
packages: "packages",
|
|
329
|
+
hasInformationUnits: "hasInformationUnits",
|
|
298
330
|
links: "links",
|
|
299
331
|
revision: "revision",
|
|
300
332
|
created: "created",
|
|
@@ -336,6 +368,7 @@ var FunctionalMetadataModelFields = {
|
|
|
336
368
|
descriptions: "descriptions",
|
|
337
369
|
synonyms: "synonyms",
|
|
338
370
|
packages: "packages",
|
|
371
|
+
hasInformationUnits: "hasInformationUnits",
|
|
339
372
|
links: "links"
|
|
340
373
|
};
|
|
341
374
|
var FunctionalMetadataModelFieldsAll = Object.values(FunctionalMetadataModelFields);
|
|
@@ -349,6 +382,7 @@ var IdentityDomainModelFields = {
|
|
|
349
382
|
descriptions: "descriptions",
|
|
350
383
|
synonyms: "synonyms",
|
|
351
384
|
packages: "packages",
|
|
385
|
+
hasInformationUnits: "hasInformationUnits",
|
|
352
386
|
links: "links",
|
|
353
387
|
parties: "parties"
|
|
354
388
|
};
|
|
@@ -363,6 +397,7 @@ var IdentityModelFields = {
|
|
|
363
397
|
descriptions: "descriptions",
|
|
364
398
|
synonyms: "synonyms",
|
|
365
399
|
packages: "packages",
|
|
400
|
+
hasInformationUnits: "hasInformationUnits",
|
|
366
401
|
links: "links",
|
|
367
402
|
identifier: "identifier",
|
|
368
403
|
identityDomain: "identityDomain"
|
|
@@ -378,6 +413,7 @@ var InformationObjectModelFields = {
|
|
|
378
413
|
descriptions: "descriptions",
|
|
379
414
|
synonyms: "synonyms",
|
|
380
415
|
packages: "packages",
|
|
416
|
+
hasInformationUnits: "hasInformationUnits",
|
|
381
417
|
links: "links",
|
|
382
418
|
identities: "identities"
|
|
383
419
|
};
|
|
@@ -392,6 +428,7 @@ var InformationSubjectCollectionModelFields = {
|
|
|
392
428
|
descriptions: "descriptions",
|
|
393
429
|
synonyms: "synonyms",
|
|
394
430
|
packages: "packages",
|
|
431
|
+
hasInformationUnits: "hasInformationUnits",
|
|
395
432
|
links: "links"
|
|
396
433
|
};
|
|
397
434
|
var InformationSubjectCollectionModelFieldsAll = Object.values(InformationSubjectCollectionModelFields);
|
|
@@ -405,6 +442,7 @@ var InformationSubjectConformityModelFields = {
|
|
|
405
442
|
descriptions: "descriptions",
|
|
406
443
|
synonyms: "synonyms",
|
|
407
444
|
packages: "packages",
|
|
445
|
+
hasInformationUnits: "hasInformationUnits",
|
|
408
446
|
links: "links"
|
|
409
447
|
};
|
|
410
448
|
var InformationSubjectConformityModelFieldsAll = Object.values(InformationSubjectConformityModelFields);
|
|
@@ -418,6 +456,7 @@ var InformationSubjectFormalityModelFields = {
|
|
|
418
456
|
descriptions: "descriptions",
|
|
419
457
|
synonyms: "synonyms",
|
|
420
458
|
packages: "packages",
|
|
459
|
+
hasInformationUnits: "hasInformationUnits",
|
|
421
460
|
links: "links"
|
|
422
461
|
};
|
|
423
462
|
var InformationSubjectFormalityModelFieldsAll = Object.values(InformationSubjectFormalityModelFields);
|
|
@@ -431,6 +470,7 @@ var InformationSubjectFunctionalityModelFields = {
|
|
|
431
470
|
descriptions: "descriptions",
|
|
432
471
|
synonyms: "synonyms",
|
|
433
472
|
packages: "packages",
|
|
473
|
+
hasInformationUnits: "hasInformationUnits",
|
|
434
474
|
links: "links"
|
|
435
475
|
};
|
|
436
476
|
var InformationSubjectFunctionalityModelFieldsAll = Object.values(InformationSubjectFunctionalityModelFields);
|
|
@@ -444,6 +484,7 @@ var InformationSubjectModelFields = {
|
|
|
444
484
|
descriptions: "descriptions",
|
|
445
485
|
synonyms: "synonyms",
|
|
446
486
|
packages: "packages",
|
|
487
|
+
hasInformationUnits: "hasInformationUnits",
|
|
447
488
|
links: "links"
|
|
448
489
|
};
|
|
449
490
|
var InformationSubjectModelFieldsAll = Object.values(InformationSubjectModelFields);
|
|
@@ -457,6 +498,7 @@ var InformationSubjectProcessModelFields = {
|
|
|
457
498
|
descriptions: "descriptions",
|
|
458
499
|
synonyms: "synonyms",
|
|
459
500
|
packages: "packages",
|
|
501
|
+
hasInformationUnits: "hasInformationUnits",
|
|
460
502
|
links: "links"
|
|
461
503
|
};
|
|
462
504
|
var InformationSubjectProcessModelFieldsAll = Object.values(InformationSubjectProcessModelFields);
|
|
@@ -470,6 +512,7 @@ var InformationSubjectSafetyModelFields = {
|
|
|
470
512
|
descriptions: "descriptions",
|
|
471
513
|
synonyms: "synonyms",
|
|
472
514
|
packages: "packages",
|
|
515
|
+
hasInformationUnits: "hasInformationUnits",
|
|
473
516
|
links: "links"
|
|
474
517
|
};
|
|
475
518
|
var InformationSubjectSafetyModelFieldsAll = Object.values(InformationSubjectSafetyModelFields);
|
|
@@ -483,6 +526,7 @@ var InformationSubjectSafetyWarningMessageModelFields = {
|
|
|
483
526
|
descriptions: "descriptions",
|
|
484
527
|
synonyms: "synonyms",
|
|
485
528
|
packages: "packages",
|
|
529
|
+
hasInformationUnits: "hasInformationUnits",
|
|
486
530
|
links: "links"
|
|
487
531
|
};
|
|
488
532
|
var InformationSubjectSafetyWarningMessageModelFieldsAll = Object.values(InformationSubjectSafetyWarningMessageModelFields);
|
|
@@ -496,6 +540,7 @@ var InformationSubjectTechnicalDataModelFields = {
|
|
|
496
540
|
descriptions: "descriptions",
|
|
497
541
|
synonyms: "synonyms",
|
|
498
542
|
packages: "packages",
|
|
543
|
+
hasInformationUnits: "hasInformationUnits",
|
|
499
544
|
links: "links"
|
|
500
545
|
};
|
|
501
546
|
var InformationSubjectTechnicalDataModelFieldsAll = Object.values(InformationSubjectTechnicalDataModelFields);
|
|
@@ -509,6 +554,7 @@ var InformationSubjectTechnicalOverviewModelFields = {
|
|
|
509
554
|
descriptions: "descriptions",
|
|
510
555
|
synonyms: "synonyms",
|
|
511
556
|
packages: "packages",
|
|
557
|
+
hasInformationUnits: "hasInformationUnits",
|
|
512
558
|
links: "links"
|
|
513
559
|
};
|
|
514
560
|
var InformationSubjectTechnicalOverviewModelFieldsAll = Object.values(InformationSubjectTechnicalOverviewModelFields);
|
|
@@ -522,6 +568,7 @@ var InformationTypeModelFields = {
|
|
|
522
568
|
descriptions: "descriptions",
|
|
523
569
|
synonyms: "synonyms",
|
|
524
570
|
packages: "packages",
|
|
571
|
+
hasInformationUnits: "hasInformationUnits",
|
|
525
572
|
links: "links"
|
|
526
573
|
};
|
|
527
574
|
var InformationTypeModelFieldsAll = Object.values(InformationTypeModelFields);
|
|
@@ -535,6 +582,7 @@ var InformationUnitModelFields = {
|
|
|
535
582
|
descriptions: "descriptions",
|
|
536
583
|
synonyms: "synonyms",
|
|
537
584
|
packages: "packages",
|
|
585
|
+
hasInformationUnits: "hasInformationUnits",
|
|
538
586
|
links: "links",
|
|
539
587
|
revision: "revision",
|
|
540
588
|
created: "created",
|
|
@@ -575,7 +623,8 @@ var OwlClassModelFields = {
|
|
|
575
623
|
comments: "comments",
|
|
576
624
|
descriptions: "descriptions",
|
|
577
625
|
synonyms: "synonyms",
|
|
578
|
-
packages: "packages"
|
|
626
|
+
packages: "packages",
|
|
627
|
+
hasInformationUnits: "hasInformationUnits"
|
|
579
628
|
};
|
|
580
629
|
var OwlClassModelFieldsAll = Object.values(OwlClassModelFields);
|
|
581
630
|
var PackageModelFields = {
|
|
@@ -588,6 +637,7 @@ var PackageModelFields = {
|
|
|
588
637
|
descriptions: "descriptions",
|
|
589
638
|
synonyms: "synonyms",
|
|
590
639
|
packages: "packages",
|
|
640
|
+
hasInformationUnits: "hasInformationUnits",
|
|
591
641
|
links: "links",
|
|
592
642
|
revision: "revision",
|
|
593
643
|
created: "created",
|
|
@@ -632,6 +682,7 @@ var PartyModelFields = {
|
|
|
632
682
|
descriptions: "descriptions",
|
|
633
683
|
synonyms: "synonyms",
|
|
634
684
|
packages: "packages",
|
|
685
|
+
hasInformationUnits: "hasInformationUnits",
|
|
635
686
|
links: "links",
|
|
636
687
|
partyRole: "partyRole",
|
|
637
688
|
vcard: "vcard"
|
|
@@ -647,6 +698,7 @@ var PartyRoleModelFields = {
|
|
|
647
698
|
descriptions: "descriptions",
|
|
648
699
|
synonyms: "synonyms",
|
|
649
700
|
packages: "packages",
|
|
701
|
+
hasInformationUnits: "hasInformationUnits",
|
|
650
702
|
links: "links"
|
|
651
703
|
};
|
|
652
704
|
var PartyRoleModelFieldsAll = Object.values(PartyRoleModelFields);
|
|
@@ -660,6 +712,7 @@ var PlanningDownTimeModelFields = {
|
|
|
660
712
|
descriptions: "descriptions",
|
|
661
713
|
synonyms: "synonyms",
|
|
662
714
|
packages: "packages",
|
|
715
|
+
hasInformationUnits: "hasInformationUnits",
|
|
663
716
|
links: "links",
|
|
664
717
|
duration: "duration"
|
|
665
718
|
};
|
|
@@ -674,6 +727,7 @@ var PlanningMaintenanceIntervalModelFields = {
|
|
|
674
727
|
descriptions: "descriptions",
|
|
675
728
|
synonyms: "synonyms",
|
|
676
729
|
packages: "packages",
|
|
730
|
+
hasInformationUnits: "hasInformationUnits",
|
|
677
731
|
links: "links",
|
|
678
732
|
duration: "duration",
|
|
679
733
|
frequency: "frequency"
|
|
@@ -689,6 +743,7 @@ var PlanningSetupTimeModelFields = {
|
|
|
689
743
|
descriptions: "descriptions",
|
|
690
744
|
synonyms: "synonyms",
|
|
691
745
|
packages: "packages",
|
|
746
|
+
hasInformationUnits: "hasInformationUnits",
|
|
692
747
|
links: "links",
|
|
693
748
|
duration: "duration"
|
|
694
749
|
};
|
|
@@ -703,6 +758,7 @@ var PlanningTimeModelFields = {
|
|
|
703
758
|
descriptions: "descriptions",
|
|
704
759
|
synonyms: "synonyms",
|
|
705
760
|
packages: "packages",
|
|
761
|
+
hasInformationUnits: "hasInformationUnits",
|
|
706
762
|
links: "links",
|
|
707
763
|
duration: "duration"
|
|
708
764
|
};
|
|
@@ -717,6 +773,7 @@ var PlanningWorkingTimeModelFields = {
|
|
|
717
773
|
descriptions: "descriptions",
|
|
718
774
|
synonyms: "synonyms",
|
|
719
775
|
packages: "packages",
|
|
776
|
+
hasInformationUnits: "hasInformationUnits",
|
|
720
777
|
links: "links",
|
|
721
778
|
duration: "duration"
|
|
722
779
|
};
|
|
@@ -731,6 +788,7 @@ var ProductFeatureModelFields = {
|
|
|
731
788
|
descriptions: "descriptions",
|
|
732
789
|
synonyms: "synonyms",
|
|
733
790
|
packages: "packages",
|
|
791
|
+
hasInformationUnits: "hasInformationUnits",
|
|
734
792
|
links: "links"
|
|
735
793
|
};
|
|
736
794
|
var ProductFeatureModelFieldsAll = Object.values(ProductFeatureModelFields);
|
|
@@ -744,6 +802,7 @@ var ProductFunctionModelFields = {
|
|
|
744
802
|
descriptions: "descriptions",
|
|
745
803
|
synonyms: "synonyms",
|
|
746
804
|
packages: "packages",
|
|
805
|
+
hasInformationUnits: "hasInformationUnits",
|
|
747
806
|
links: "links"
|
|
748
807
|
};
|
|
749
808
|
var ProductFunctionModelFieldsAll = Object.values(ProductFunctionModelFields);
|
|
@@ -757,6 +816,7 @@ var ProductLcpAfterUseModelFields = {
|
|
|
757
816
|
descriptions: "descriptions",
|
|
758
817
|
synonyms: "synonyms",
|
|
759
818
|
packages: "packages",
|
|
819
|
+
hasInformationUnits: "hasInformationUnits",
|
|
760
820
|
links: "links"
|
|
761
821
|
};
|
|
762
822
|
var ProductLcpAfterUseModelFieldsAll = Object.values(ProductLcpAfterUseModelFields);
|
|
@@ -770,6 +830,7 @@ var ProductLcpDesignAndRealizationModelFields = {
|
|
|
770
830
|
descriptions: "descriptions",
|
|
771
831
|
synonyms: "synonyms",
|
|
772
832
|
packages: "packages",
|
|
833
|
+
hasInformationUnits: "hasInformationUnits",
|
|
773
834
|
links: "links"
|
|
774
835
|
};
|
|
775
836
|
var ProductLcpDesignAndRealizationModelFieldsAll = Object.values(ProductLcpDesignAndRealizationModelFields);
|
|
@@ -783,6 +844,7 @@ var ProductLcpPuttingToUseModelFields = {
|
|
|
783
844
|
descriptions: "descriptions",
|
|
784
845
|
synonyms: "synonyms",
|
|
785
846
|
packages: "packages",
|
|
847
|
+
hasInformationUnits: "hasInformationUnits",
|
|
786
848
|
links: "links"
|
|
787
849
|
};
|
|
788
850
|
var ProductLcpPuttingToUseModelFieldsAll = Object.values(ProductLcpPuttingToUseModelFields);
|
|
@@ -796,6 +858,7 @@ var ProductLcpUseModelFields = {
|
|
|
796
858
|
descriptions: "descriptions",
|
|
797
859
|
synonyms: "synonyms",
|
|
798
860
|
packages: "packages",
|
|
861
|
+
hasInformationUnits: "hasInformationUnits",
|
|
799
862
|
links: "links"
|
|
800
863
|
};
|
|
801
864
|
var ProductLcpUseModelFieldsAll = Object.values(ProductLcpUseModelFields);
|
|
@@ -809,6 +872,7 @@ var ProductLifeCyclePhaseModelFields = {
|
|
|
809
872
|
descriptions: "descriptions",
|
|
810
873
|
synonyms: "synonyms",
|
|
811
874
|
packages: "packages",
|
|
875
|
+
hasInformationUnits: "hasInformationUnits",
|
|
812
876
|
links: "links"
|
|
813
877
|
};
|
|
814
878
|
var ProductLifeCyclePhaseModelFieldsAll = Object.values(ProductLifeCyclePhaseModelFields);
|
|
@@ -822,6 +886,7 @@ var ProductMetadataModelFields = {
|
|
|
822
886
|
descriptions: "descriptions",
|
|
823
887
|
synonyms: "synonyms",
|
|
824
888
|
packages: "packages",
|
|
889
|
+
hasInformationUnits: "hasInformationUnits",
|
|
825
890
|
links: "links"
|
|
826
891
|
};
|
|
827
892
|
var ProductMetadataModelFieldsAll = Object.values(ProductMetadataModelFields);
|
|
@@ -835,6 +900,7 @@ var ProductPropertyModelFields = {
|
|
|
835
900
|
descriptions: "descriptions",
|
|
836
901
|
synonyms: "synonyms",
|
|
837
902
|
packages: "packages",
|
|
903
|
+
hasInformationUnits: "hasInformationUnits",
|
|
838
904
|
links: "links"
|
|
839
905
|
};
|
|
840
906
|
var ProductPropertyModelFieldsAll = Object.values(ProductPropertyModelFields);
|
|
@@ -848,6 +914,7 @@ var ProductVariantModelFields = {
|
|
|
848
914
|
descriptions: "descriptions",
|
|
849
915
|
synonyms: "synonyms",
|
|
850
916
|
packages: "packages",
|
|
917
|
+
hasInformationUnits: "hasInformationUnits",
|
|
851
918
|
links: "links",
|
|
852
919
|
identities: "identities",
|
|
853
920
|
parties: "parties"
|
|
@@ -863,6 +930,7 @@ var QualificationModelFields = {
|
|
|
863
930
|
descriptions: "descriptions",
|
|
864
931
|
synonyms: "synonyms",
|
|
865
932
|
packages: "packages",
|
|
933
|
+
hasInformationUnits: "hasInformationUnits",
|
|
866
934
|
links: "links"
|
|
867
935
|
};
|
|
868
936
|
var QualificationModelFieldsAll = Object.values(QualificationModelFields);
|
|
@@ -876,6 +944,7 @@ var QualificationRoleModelFields = {
|
|
|
876
944
|
descriptions: "descriptions",
|
|
877
945
|
synonyms: "synonyms",
|
|
878
946
|
packages: "packages",
|
|
947
|
+
hasInformationUnits: "hasInformationUnits",
|
|
879
948
|
links: "links"
|
|
880
949
|
};
|
|
881
950
|
var QualificationRoleModelFieldsAll = Object.values(QualificationRoleModelFields);
|
|
@@ -889,6 +958,7 @@ var QualificationSkillLevelModelFields = {
|
|
|
889
958
|
descriptions: "descriptions",
|
|
890
959
|
synonyms: "synonyms",
|
|
891
960
|
packages: "packages",
|
|
961
|
+
hasInformationUnits: "hasInformationUnits",
|
|
892
962
|
links: "links"
|
|
893
963
|
};
|
|
894
964
|
var QualificationSkillLevelModelFieldsAll = Object.values(QualificationSkillLevelModelFields);
|
|
@@ -902,6 +972,7 @@ var RenditionModelFields = {
|
|
|
902
972
|
descriptions: "descriptions",
|
|
903
973
|
synonyms: "synonyms",
|
|
904
974
|
packages: "packages",
|
|
975
|
+
hasInformationUnits: "hasInformationUnits",
|
|
905
976
|
links: "links",
|
|
906
977
|
source: "source",
|
|
907
978
|
format: "format",
|
|
@@ -919,7 +990,8 @@ var RenditionSelectorModelFields = {
|
|
|
919
990
|
comments: "comments",
|
|
920
991
|
descriptions: "descriptions",
|
|
921
992
|
synonyms: "synonyms",
|
|
922
|
-
packages: "packages"
|
|
993
|
+
packages: "packages",
|
|
994
|
+
hasInformationUnits: "hasInformationUnits"
|
|
923
995
|
};
|
|
924
996
|
var RenditionSelectorModelFieldsAll = Object.values(RenditionSelectorModelFields);
|
|
925
997
|
var SupplyConsumableModelFields = {
|
|
@@ -932,6 +1004,7 @@ var SupplyConsumableModelFields = {
|
|
|
932
1004
|
descriptions: "descriptions",
|
|
933
1005
|
synonyms: "synonyms",
|
|
934
1006
|
packages: "packages",
|
|
1007
|
+
hasInformationUnits: "hasInformationUnits",
|
|
935
1008
|
links: "links"
|
|
936
1009
|
};
|
|
937
1010
|
var SupplyConsumableModelFieldsAll = Object.values(SupplyConsumableModelFields);
|
|
@@ -945,6 +1018,7 @@ var SupplyHardwareToolModelFields = {
|
|
|
945
1018
|
descriptions: "descriptions",
|
|
946
1019
|
synonyms: "synonyms",
|
|
947
1020
|
packages: "packages",
|
|
1021
|
+
hasInformationUnits: "hasInformationUnits",
|
|
948
1022
|
links: "links"
|
|
949
1023
|
};
|
|
950
1024
|
var SupplyHardwareToolModelFieldsAll = Object.values(SupplyHardwareToolModelFields);
|
|
@@ -958,6 +1032,7 @@ var SupplyLubricantModelFields = {
|
|
|
958
1032
|
descriptions: "descriptions",
|
|
959
1033
|
synonyms: "synonyms",
|
|
960
1034
|
packages: "packages",
|
|
1035
|
+
hasInformationUnits: "hasInformationUnits",
|
|
961
1036
|
links: "links"
|
|
962
1037
|
};
|
|
963
1038
|
var SupplyLubricantModelFieldsAll = Object.values(SupplyLubricantModelFields);
|
|
@@ -971,6 +1046,7 @@ var SupplyModelFields = {
|
|
|
971
1046
|
descriptions: "descriptions",
|
|
972
1047
|
synonyms: "synonyms",
|
|
973
1048
|
packages: "packages",
|
|
1049
|
+
hasInformationUnits: "hasInformationUnits",
|
|
974
1050
|
links: "links"
|
|
975
1051
|
};
|
|
976
1052
|
var SupplyModelFieldsAll = Object.values(SupplyModelFields);
|
|
@@ -984,6 +1060,7 @@ var SupplyOperatingModelFields = {
|
|
|
984
1060
|
descriptions: "descriptions",
|
|
985
1061
|
synonyms: "synonyms",
|
|
986
1062
|
packages: "packages",
|
|
1063
|
+
hasInformationUnits: "hasInformationUnits",
|
|
987
1064
|
links: "links"
|
|
988
1065
|
};
|
|
989
1066
|
var SupplyOperatingModelFieldsAll = Object.values(SupplyOperatingModelFields);
|
|
@@ -997,6 +1074,7 @@ var SupplySparePartModelFields = {
|
|
|
997
1074
|
descriptions: "descriptions",
|
|
998
1075
|
synonyms: "synonyms",
|
|
999
1076
|
packages: "packages",
|
|
1077
|
+
hasInformationUnits: "hasInformationUnits",
|
|
1000
1078
|
links: "links"
|
|
1001
1079
|
};
|
|
1002
1080
|
var SupplySparePartModelFieldsAll = Object.values(SupplySparePartModelFields);
|
|
@@ -1010,6 +1088,7 @@ var TopicModelFields = {
|
|
|
1010
1088
|
descriptions: "descriptions",
|
|
1011
1089
|
synonyms: "synonyms",
|
|
1012
1090
|
packages: "packages",
|
|
1091
|
+
hasInformationUnits: "hasInformationUnits",
|
|
1013
1092
|
links: "links",
|
|
1014
1093
|
revision: "revision",
|
|
1015
1094
|
created: "created",
|
|
@@ -1051,6 +1130,7 @@ var TopicTypeConceptModelFields = {
|
|
|
1051
1130
|
descriptions: "descriptions",
|
|
1052
1131
|
synonyms: "synonyms",
|
|
1053
1132
|
packages: "packages",
|
|
1133
|
+
hasInformationUnits: "hasInformationUnits",
|
|
1054
1134
|
links: "links"
|
|
1055
1135
|
};
|
|
1056
1136
|
var TopicTypeConceptModelFieldsAll = Object.values(TopicTypeConceptModelFields);
|
|
@@ -1064,6 +1144,7 @@ var TopicTypeFormModelFields = {
|
|
|
1064
1144
|
descriptions: "descriptions",
|
|
1065
1145
|
synonyms: "synonyms",
|
|
1066
1146
|
packages: "packages",
|
|
1147
|
+
hasInformationUnits: "hasInformationUnits",
|
|
1067
1148
|
links: "links"
|
|
1068
1149
|
};
|
|
1069
1150
|
var TopicTypeFormModelFieldsAll = Object.values(TopicTypeFormModelFields);
|
|
@@ -1077,6 +1158,7 @@ var TopicTypeLearningModelFields = {
|
|
|
1077
1158
|
descriptions: "descriptions",
|
|
1078
1159
|
synonyms: "synonyms",
|
|
1079
1160
|
packages: "packages",
|
|
1161
|
+
hasInformationUnits: "hasInformationUnits",
|
|
1080
1162
|
links: "links"
|
|
1081
1163
|
};
|
|
1082
1164
|
var TopicTypeLearningModelFieldsAll = Object.values(TopicTypeLearningModelFields);
|
|
@@ -1090,6 +1172,7 @@ var TopicTypeModelFields = {
|
|
|
1090
1172
|
descriptions: "descriptions",
|
|
1091
1173
|
synonyms: "synonyms",
|
|
1092
1174
|
packages: "packages",
|
|
1175
|
+
hasInformationUnits: "hasInformationUnits",
|
|
1093
1176
|
links: "links"
|
|
1094
1177
|
};
|
|
1095
1178
|
var TopicTypeModelFieldsAll = Object.values(TopicTypeModelFields);
|
|
@@ -1103,6 +1186,7 @@ var TopicTypeReferenceModelFields = {
|
|
|
1103
1186
|
descriptions: "descriptions",
|
|
1104
1187
|
synonyms: "synonyms",
|
|
1105
1188
|
packages: "packages",
|
|
1189
|
+
hasInformationUnits: "hasInformationUnits",
|
|
1106
1190
|
links: "links"
|
|
1107
1191
|
};
|
|
1108
1192
|
var TopicTypeReferenceModelFieldsAll = Object.values(TopicTypeReferenceModelFields);
|
|
@@ -1116,6 +1200,7 @@ var TopicTypeTaskModelFields = {
|
|
|
1116
1200
|
descriptions: "descriptions",
|
|
1117
1201
|
synonyms: "synonyms",
|
|
1118
1202
|
packages: "packages",
|
|
1203
|
+
hasInformationUnits: "hasInformationUnits",
|
|
1119
1204
|
links: "links"
|
|
1120
1205
|
};
|
|
1121
1206
|
var TopicTypeTaskModelFieldsAll = Object.values(TopicTypeTaskModelFields);
|
|
@@ -1129,6 +1214,7 @@ var TopicTypeTroubleShootingModelFields = {
|
|
|
1129
1214
|
descriptions: "descriptions",
|
|
1130
1215
|
synonyms: "synonyms",
|
|
1131
1216
|
packages: "packages",
|
|
1217
|
+
hasInformationUnits: "hasInformationUnits",
|
|
1132
1218
|
links: "links"
|
|
1133
1219
|
};
|
|
1134
1220
|
var TopicTypeTroubleShootingModelFieldsAll = Object.values(TopicTypeTroubleShootingModelFields);
|
|
@@ -1142,6 +1228,7 @@ var VCardCalendarModelFields = {
|
|
|
1142
1228
|
descriptions: "descriptions",
|
|
1143
1229
|
synonyms: "synonyms",
|
|
1144
1230
|
packages: "packages",
|
|
1231
|
+
hasInformationUnits: "hasInformationUnits",
|
|
1145
1232
|
source: "source"
|
|
1146
1233
|
};
|
|
1147
1234
|
var VCardCalendarModelFieldsAll = Object.values(VCardCalendarModelFields);
|
|
@@ -1155,6 +1242,7 @@ var VCardGroupModelFields = {
|
|
|
1155
1242
|
descriptions: "descriptions",
|
|
1156
1243
|
synonyms: "synonyms",
|
|
1157
1244
|
packages: "packages",
|
|
1245
|
+
hasInformationUnits: "hasInformationUnits",
|
|
1158
1246
|
links: "links",
|
|
1159
1247
|
fullName: "fullName",
|
|
1160
1248
|
photos: "photos",
|
|
@@ -1176,6 +1264,7 @@ var VCardImageModelFields = {
|
|
|
1176
1264
|
descriptions: "descriptions",
|
|
1177
1265
|
synonyms: "synonyms",
|
|
1178
1266
|
packages: "packages",
|
|
1267
|
+
hasInformationUnits: "hasInformationUnits",
|
|
1179
1268
|
classes: "classes",
|
|
1180
1269
|
value: "value",
|
|
1181
1270
|
source: "source"
|
|
@@ -1191,6 +1280,7 @@ var VCardIndividualModelFields = {
|
|
|
1191
1280
|
descriptions: "descriptions",
|
|
1192
1281
|
synonyms: "synonyms",
|
|
1193
1282
|
packages: "packages",
|
|
1283
|
+
hasInformationUnits: "hasInformationUnits",
|
|
1194
1284
|
links: "links",
|
|
1195
1285
|
fullName: "fullName",
|
|
1196
1286
|
photos: "photos",
|
|
@@ -1209,6 +1299,7 @@ var VCardInfoModelFields = {
|
|
|
1209
1299
|
shortId: "shortId",
|
|
1210
1300
|
score: "score",
|
|
1211
1301
|
classes: "classes",
|
|
1302
|
+
types: "types",
|
|
1212
1303
|
value: "value",
|
|
1213
1304
|
countryName: "countryName",
|
|
1214
1305
|
locality: "locality",
|
|
@@ -1226,6 +1317,7 @@ var VCardLocationModelFields = {
|
|
|
1226
1317
|
descriptions: "descriptions",
|
|
1227
1318
|
synonyms: "synonyms",
|
|
1228
1319
|
packages: "packages",
|
|
1320
|
+
hasInformationUnits: "hasInformationUnits",
|
|
1229
1321
|
links: "links",
|
|
1230
1322
|
fullName: "fullName",
|
|
1231
1323
|
photos: "photos",
|
|
@@ -1247,6 +1339,7 @@ var VCardModelFields = {
|
|
|
1247
1339
|
descriptions: "descriptions",
|
|
1248
1340
|
synonyms: "synonyms",
|
|
1249
1341
|
packages: "packages",
|
|
1342
|
+
hasInformationUnits: "hasInformationUnits",
|
|
1250
1343
|
links: "links",
|
|
1251
1344
|
fullName: "fullName",
|
|
1252
1345
|
photos: "photos",
|
|
@@ -1267,6 +1360,7 @@ var VCardOrganizationModelFields = {
|
|
|
1267
1360
|
descriptions: "descriptions",
|
|
1268
1361
|
synonyms: "synonyms",
|
|
1269
1362
|
packages: "packages",
|
|
1363
|
+
hasInformationUnits: "hasInformationUnits",
|
|
1270
1364
|
links: "links",
|
|
1271
1365
|
fullName: "fullName",
|
|
1272
1366
|
photos: "photos",
|
|
@@ -1285,46 +1379,122 @@ var VCardOrganizationModelFieldsAll = Object.values(VCardOrganizationModelFields
|
|
|
1285
1379
|
// ../constants/src/index.ts
|
|
1286
1380
|
var DEFAULT_COOKIE_LIMIT = 30 * 24 * 60 * 60 * 1e3;
|
|
1287
1381
|
|
|
1288
|
-
// src/
|
|
1382
|
+
// src/metadata.ts
|
|
1289
1383
|
var getTitle = (titles, labels) => {
|
|
1290
|
-
let title = "NO TITLE";
|
|
1291
1384
|
if (titles) {
|
|
1292
|
-
|
|
1293
|
-
} else if (labels) {
|
|
1294
|
-
title = labels[0]?.value;
|
|
1385
|
+
return titles[0]?.value;
|
|
1295
1386
|
}
|
|
1296
|
-
|
|
1387
|
+
if (labels) {
|
|
1388
|
+
return labels[0]?.value;
|
|
1389
|
+
}
|
|
1390
|
+
return "NO TITLE";
|
|
1391
|
+
};
|
|
1392
|
+
|
|
1393
|
+
// ../services/src/base-server-request.ts
|
|
1394
|
+
var import_requests = require("@c-rex/core/requests");
|
|
1395
|
+
|
|
1396
|
+
// ../services/src/server-request-context.ts
|
|
1397
|
+
var import_node_async_hooks = require("async_hooks");
|
|
1398
|
+
var requestContextStorage = new import_node_async_hooks.AsyncLocalStorage();
|
|
1399
|
+
var getServerRequestContext = () => {
|
|
1400
|
+
return requestContextStorage.getStore();
|
|
1401
|
+
};
|
|
1402
|
+
|
|
1403
|
+
// ../services/src/base-server-request.ts
|
|
1404
|
+
var baseServerRequest = async (endpoint, query) => {
|
|
1405
|
+
const api = new import_requests.CrexApi();
|
|
1406
|
+
const requestContext = getServerRequestContext();
|
|
1407
|
+
const response = await api.execute({
|
|
1408
|
+
url: endpoint,
|
|
1409
|
+
method: "GET",
|
|
1410
|
+
params: query,
|
|
1411
|
+
skipCookieTokenLookup: requestContext?.skipCookieTokenLookup,
|
|
1412
|
+
authToken: requestContext?.authToken
|
|
1413
|
+
});
|
|
1414
|
+
return response;
|
|
1415
|
+
};
|
|
1416
|
+
|
|
1417
|
+
// ../services/src/generated/server-requests.ts
|
|
1418
|
+
var directoryNodesGetByIdServer = async (params, query) => {
|
|
1419
|
+
return baseServerRequest(`DirectoryNodes/${encodeURIComponent(String(params.id))}`, query);
|
|
1297
1420
|
};
|
|
1298
1421
|
|
|
1299
1422
|
// src/directoryNodes.ts
|
|
1300
|
-
var
|
|
1423
|
+
var TREE_DIRECTORY_NODE_FIELDS_WITH_LINKS = [
|
|
1424
|
+
"shortId",
|
|
1425
|
+
"labels",
|
|
1426
|
+
"parents",
|
|
1427
|
+
"childNodes",
|
|
1428
|
+
"informationUnits"
|
|
1429
|
+
];
|
|
1430
|
+
var TREE_DIRECTORY_NODE_FIELDS_NO_LINKS = [
|
|
1431
|
+
"shortId",
|
|
1432
|
+
"labels",
|
|
1433
|
+
"parents",
|
|
1434
|
+
"childNodes"
|
|
1435
|
+
];
|
|
1436
|
+
var ROOT_DIRECTORY_NODE_FIELDS = [
|
|
1437
|
+
"shortId",
|
|
1438
|
+
"ancestors",
|
|
1439
|
+
"labels",
|
|
1440
|
+
"informationUnits"
|
|
1441
|
+
];
|
|
1442
|
+
var createDirectoryNodeFetcher = (query) => {
|
|
1443
|
+
const cache = /* @__PURE__ */ new Map();
|
|
1444
|
+
return async (id) => {
|
|
1445
|
+
if (!id) return void 0;
|
|
1446
|
+
const normalizedId = id.trim();
|
|
1447
|
+
if (!normalizedId) return void 0;
|
|
1448
|
+
if (!cache.has(normalizedId)) {
|
|
1449
|
+
cache.set(
|
|
1450
|
+
normalizedId,
|
|
1451
|
+
directoryNodesGetByIdServer({ id: normalizedId }, query).catch((err) => {
|
|
1452
|
+
console.error("Error fetching DirectoryNode", normalizedId, err);
|
|
1453
|
+
return void 0;
|
|
1454
|
+
})
|
|
1455
|
+
);
|
|
1456
|
+
}
|
|
1457
|
+
return cache.get(normalizedId);
|
|
1458
|
+
};
|
|
1459
|
+
};
|
|
1301
1460
|
var generateTreeOfContent = async (directoryNodes) => {
|
|
1461
|
+
return generateTreeOfContentWithOptions(directoryNodes, { includeLinkIds: true });
|
|
1462
|
+
};
|
|
1463
|
+
var generateTreeOfContentWithOptions = async (directoryNodes, options) => {
|
|
1302
1464
|
if (!directoryNodes?.length || !directoryNodes[0]?.shortId) return [];
|
|
1303
|
-
|
|
1304
|
-
|
|
1465
|
+
const includeLinkIds = options?.includeLinkIds !== false;
|
|
1466
|
+
const fetchNode = createDirectoryNodeFetcher({
|
|
1467
|
+
Fields: includeLinkIds ? TREE_DIRECTORY_NODE_FIELDS_WITH_LINKS : TREE_DIRECTORY_NODE_FIELDS_NO_LINKS
|
|
1468
|
+
});
|
|
1469
|
+
let response = await fetchNode(directoryNodes[0].shortId);
|
|
1470
|
+
if (!response) return [];
|
|
1471
|
+
if (!response.labels?.[0]) return [];
|
|
1472
|
+
if (includeLinkIds && !response.informationUnits?.[0]) return [];
|
|
1305
1473
|
let children = [];
|
|
1306
1474
|
if (response.childNodes) {
|
|
1307
|
-
children = await
|
|
1475
|
+
children = await getChildrenInfoInternal(response.childNodes, fetchNode, includeLinkIds);
|
|
1308
1476
|
}
|
|
1309
1477
|
let prevItem = {
|
|
1310
1478
|
active: true,
|
|
1311
|
-
label: getTitle(null, directoryNodes[0].labels),
|
|
1479
|
+
label: response.labels?.[0]?.value || getTitle(null, directoryNodes[0].labels),
|
|
1312
1480
|
id: directoryNodes[0].shortId,
|
|
1313
|
-
linkId: response.informationUnits[0]
|
|
1481
|
+
linkId: includeLinkIds ? response.informationUnits?.[0]?.shortId : void 0,
|
|
1314
1482
|
children
|
|
1315
1483
|
};
|
|
1316
1484
|
let result = [prevItem];
|
|
1317
1485
|
while (response.parents?.[0]) {
|
|
1318
|
-
|
|
1486
|
+
const parentResponse = await fetchNode(response.parents[0].shortId);
|
|
1487
|
+
if (!parentResponse) break;
|
|
1488
|
+
response = parentResponse;
|
|
1319
1489
|
let childItems = [];
|
|
1320
1490
|
if (response.childNodes) {
|
|
1321
|
-
childItems = await
|
|
1491
|
+
childItems = await getChildrenInfoInternal(response.childNodes || [], fetchNode, includeLinkIds);
|
|
1322
1492
|
}
|
|
1323
1493
|
const index = childItems.findIndex((i) => i.id === prevItem.id);
|
|
1324
1494
|
if (index !== -1) {
|
|
1325
1495
|
childItems[index] = prevItem;
|
|
1326
1496
|
}
|
|
1327
|
-
if (!response.labels?.[0] || !response.informationUnits?.[0]) {
|
|
1497
|
+
if (!response.labels?.[0] || includeLinkIds && !response.informationUnits?.[0]) {
|
|
1328
1498
|
result = childItems;
|
|
1329
1499
|
break;
|
|
1330
1500
|
}
|
|
@@ -1333,7 +1503,7 @@ var generateTreeOfContent = async (directoryNodes) => {
|
|
|
1333
1503
|
active: true,
|
|
1334
1504
|
label: response.labels[0].value,
|
|
1335
1505
|
id: response.shortId,
|
|
1336
|
-
linkId: response.informationUnits[0]
|
|
1506
|
+
linkId: includeLinkIds ? response.informationUnits?.[0]?.shortId : void 0,
|
|
1337
1507
|
children: childItems
|
|
1338
1508
|
};
|
|
1339
1509
|
result = [prevItem];
|
|
@@ -1342,12 +1512,37 @@ var generateTreeOfContent = async (directoryNodes) => {
|
|
|
1342
1512
|
};
|
|
1343
1513
|
var getChildrenInfo = async (childNodes) => {
|
|
1344
1514
|
if (!childNodes?.length) return [];
|
|
1515
|
+
const fetchNode = createDirectoryNodeFetcher({ Fields: TREE_DIRECTORY_NODE_FIELDS_WITH_LINKS });
|
|
1516
|
+
return getChildrenInfoInternal(childNodes, fetchNode, true);
|
|
1517
|
+
};
|
|
1518
|
+
var getChildrenInfoInternal = async (childNodes, fetchNode, includeLinkIds) => {
|
|
1519
|
+
if (!includeLinkIds) {
|
|
1520
|
+
const directChildren = childNodes.filter((node) => Boolean(node?.shortId)).map((node) => ({
|
|
1521
|
+
active: false,
|
|
1522
|
+
label: node.labels?.[0]?.value || getTitle(null, node.labels) || node.shortId,
|
|
1523
|
+
id: node.shortId,
|
|
1524
|
+
linkId: void 0,
|
|
1525
|
+
children: []
|
|
1526
|
+
}));
|
|
1527
|
+
const missingLabelIds = childNodes.filter((node) => Boolean(node?.shortId) && !node.labels?.[0]).map((node) => node.shortId);
|
|
1528
|
+
if (missingLabelIds.length === 0) {
|
|
1529
|
+
return directChildren;
|
|
1530
|
+
}
|
|
1531
|
+
const fetchedMissing = await Promise.all(missingLabelIds.map((id) => fetchNode(id)));
|
|
1532
|
+
const missingLabelMap = /* @__PURE__ */ new Map();
|
|
1533
|
+
fetchedMissing.forEach((node) => {
|
|
1534
|
+
if (!node?.shortId) return;
|
|
1535
|
+
const label = node.labels?.[0]?.value || node.shortId;
|
|
1536
|
+
missingLabelMap.set(node.shortId, label);
|
|
1537
|
+
});
|
|
1538
|
+
return directChildren.map((item) => ({
|
|
1539
|
+
...item,
|
|
1540
|
+
label: item.label || missingLabelMap.get(item.id) || item.id
|
|
1541
|
+
}));
|
|
1542
|
+
}
|
|
1345
1543
|
const responses = await Promise.all(
|
|
1346
1544
|
childNodes.map(
|
|
1347
|
-
(n) => (
|
|
1348
|
-
console.error("Erro em", n.shortId, err);
|
|
1349
|
-
return void 0;
|
|
1350
|
-
})
|
|
1545
|
+
(n) => fetchNode(n.shortId)
|
|
1351
1546
|
)
|
|
1352
1547
|
);
|
|
1353
1548
|
const finalArray = [];
|
|
@@ -1355,11 +1550,10 @@ var getChildrenInfo = async (childNodes) => {
|
|
|
1355
1550
|
validNodes.forEach((resp, index) => {
|
|
1356
1551
|
const node = validNodes[index];
|
|
1357
1552
|
if (node && node.labels && node.labels[0]) {
|
|
1358
|
-
const shortId = resp.informationUnits?.[0]?.shortId;
|
|
1359
1553
|
const treeItem = {
|
|
1360
1554
|
active: false,
|
|
1361
1555
|
label: node.labels?.[0].value,
|
|
1362
|
-
linkId: shortId,
|
|
1556
|
+
linkId: includeLinkIds ? resp.informationUnits?.[0]?.shortId ?? void 0 : void 0,
|
|
1363
1557
|
id: node.shortId,
|
|
1364
1558
|
children: []
|
|
1365
1559
|
};
|
|
@@ -1371,8 +1565,10 @@ var getChildrenInfo = async (childNodes) => {
|
|
|
1371
1565
|
var getRootNode = async (directoryNodes) => {
|
|
1372
1566
|
if (directoryNodes.length === 0 || !directoryNodes[0]) return null;
|
|
1373
1567
|
if (!directoryNodes[0].shortId) return null;
|
|
1568
|
+
const fetchNode = createDirectoryNodeFetcher({ Fields: ROOT_DIRECTORY_NODE_FIELDS });
|
|
1374
1569
|
let id = directoryNodes[0].shortId;
|
|
1375
|
-
let response = await (
|
|
1570
|
+
let response = await fetchNode(id);
|
|
1571
|
+
if (!response) return null;
|
|
1376
1572
|
if (!response.ancestors || response.ancestors.length === 0) {
|
|
1377
1573
|
return response;
|
|
1378
1574
|
}
|
|
@@ -1385,7 +1581,8 @@ var getRootNode = async (directoryNodes) => {
|
|
|
1385
1581
|
if (response.ancestors[0][lastIndex] == void 0) return null;
|
|
1386
1582
|
if (!response.ancestors[0][lastIndex].shortId) return null;
|
|
1387
1583
|
id = response.ancestors[0][lastIndex].shortId;
|
|
1388
|
-
response = await (
|
|
1584
|
+
response = await fetchNode(id);
|
|
1585
|
+
if (!response) return null;
|
|
1389
1586
|
return response;
|
|
1390
1587
|
};
|
|
1391
1588
|
var getLastLabel = (tree) => {
|
|
@@ -1400,6 +1597,7 @@ var getLastLabel = (tree) => {
|
|
|
1400
1597
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1401
1598
|
0 && (module.exports = {
|
|
1402
1599
|
generateTreeOfContent,
|
|
1600
|
+
generateTreeOfContentWithOptions,
|
|
1403
1601
|
getChildrenInfo,
|
|
1404
1602
|
getLastLabel,
|
|
1405
1603
|
getRootNode
|