@komaci/common-shared 244.1.3 → 244.1.5
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.
|
@@ -275,6 +275,7 @@
|
|
|
275
275
|
"builder_industries_serviceprocess",
|
|
276
276
|
"builder_industries_utilizationmanagement",
|
|
277
277
|
"builder_industries_visit",
|
|
278
|
+
"builder_interaction_externalservices",
|
|
278
279
|
"builder_payments",
|
|
279
280
|
"builder_platform_interaction",
|
|
280
281
|
"builder_platform_process",
|
|
@@ -438,6 +439,7 @@
|
|
|
438
439
|
"devopsimpkg9",
|
|
439
440
|
"discoveryframework",
|
|
440
441
|
"dmvr",
|
|
442
|
+
"documentreader",
|
|
441
443
|
"dxp",
|
|
442
444
|
"dxp_action",
|
|
443
445
|
"dxp_base",
|
|
@@ -475,6 +477,7 @@
|
|
|
475
477
|
"es_property_editors",
|
|
476
478
|
"escBuilder",
|
|
477
479
|
"et4ae5",
|
|
480
|
+
"eu_program",
|
|
478
481
|
"eventbus",
|
|
479
482
|
"exp_builder",
|
|
480
483
|
"experience",
|
|
@@ -531,6 +534,7 @@
|
|
|
531
534
|
"fsc7gs0",
|
|
532
535
|
"fsc8gs0",
|
|
533
536
|
"fsc9gs0",
|
|
537
|
+
"fsc_onboarding_flows",
|
|
534
538
|
"fsc_rb",
|
|
535
539
|
"fsccomplaintmanagement",
|
|
536
540
|
"fscmainstgpu",
|
|
@@ -671,6 +675,7 @@
|
|
|
671
675
|
"mcontent_content_translate",
|
|
672
676
|
"mcontent_editor",
|
|
673
677
|
"mcontent_interaction_builder",
|
|
678
|
+
"mcontent_shared",
|
|
674
679
|
"mcontent_workspace",
|
|
675
680
|
"mfa_assistant",
|
|
676
681
|
"mlplatform",
|
|
@@ -688,6 +693,7 @@
|
|
|
688
693
|
"omnichannel_messaging",
|
|
689
694
|
"omnichannel_voice",
|
|
690
695
|
"omnistudiocore",
|
|
696
|
+
"onboarding_templates",
|
|
691
697
|
"onlinesales",
|
|
692
698
|
"opencti",
|
|
693
699
|
"openctitest",
|
|
@@ -747,6 +753,7 @@
|
|
|
747
753
|
"runtime_declarative_card",
|
|
748
754
|
"runtime_einstein_campaign",
|
|
749
755
|
"runtime_einstein_discovery",
|
|
756
|
+
"runtime_enablement_coaching",
|
|
750
757
|
"runtime_essential_checkout",
|
|
751
758
|
"runtime_growth_intelligence",
|
|
752
759
|
"runtime_hcc_performanceassistant",
|
|
@@ -768,6 +775,7 @@
|
|
|
768
775
|
"runtime_industries_clm",
|
|
769
776
|
"runtime_industries_clm_addin",
|
|
770
777
|
"runtime_industries_components",
|
|
778
|
+
"runtime_industries_context",
|
|
771
779
|
"runtime_industries_cpq",
|
|
772
780
|
"runtime_industries_documentreader",
|
|
773
781
|
"runtime_industries_epc",
|
|
@@ -791,6 +799,7 @@
|
|
|
791
799
|
"runtime_industries_publicsector",
|
|
792
800
|
"runtime_industries_recurrence",
|
|
793
801
|
"runtime_industries_recurrence_impl",
|
|
802
|
+
"runtime_industries_referral_management",
|
|
794
803
|
"runtime_industries_referralscoring",
|
|
795
804
|
"runtime_industries_retailexecution",
|
|
796
805
|
"runtime_industries_serviceprocess",
|
|
@@ -822,6 +831,7 @@
|
|
|
822
831
|
"runtime_platform_optimizer",
|
|
823
832
|
"runtime_platform_prefcenter",
|
|
824
833
|
"runtime_platform_privacy_analytics",
|
|
834
|
+
"runtime_platform_salesforcehub",
|
|
825
835
|
"runtime_platform_sfdx",
|
|
826
836
|
"runtime_platform_unified_notifications",
|
|
827
837
|
"runtime_platformservices_condBuilder",
|
|
@@ -880,6 +890,7 @@
|
|
|
880
890
|
"runtime_service_omnichannel",
|
|
881
891
|
"runtime_service_predictions",
|
|
882
892
|
"runtime_service_scs",
|
|
893
|
+
"runtime_service_servicecatalog",
|
|
883
894
|
"runtime_service_swarming",
|
|
884
895
|
"runtime_service_trials",
|
|
885
896
|
"runtime_service_trials_test",
|
|
@@ -940,6 +951,7 @@
|
|
|
940
951
|
"setup_industries_clm_addin",
|
|
941
952
|
"setup_industries_common",
|
|
942
953
|
"setup_industries_comprehend",
|
|
954
|
+
"setup_industries_context",
|
|
943
955
|
"setup_industries_cpq",
|
|
944
956
|
"setup_industries_dataprocessingengine",
|
|
945
957
|
"setup_industries_decisiontable",
|
|
@@ -117,7 +117,10 @@ export declare const doesAdgExist: (index: number, doc: KomaciDocument) => boole
|
|
|
117
117
|
* @param composition the composition to look at
|
|
118
118
|
* @param cb the function to run on every new composition. returning true here will end traversal for that subtree
|
|
119
119
|
*/
|
|
120
|
-
export declare function traverseComposition(composition: Composition,
|
|
120
|
+
export declare function traverseComposition(composition: Composition, callbacks: {
|
|
121
|
+
pretraversal?: (Composition: Composition, iterationContext: string[], parent?: Composition) => boolean;
|
|
122
|
+
posttraversal?: (Composition: Composition, iterationContext: string[], parent?: Composition) => void;
|
|
123
|
+
}, iteratorContext?: string[], parent?: Composition): void;
|
|
121
124
|
/**
|
|
122
125
|
* Recursively probe a composition and it's children for usages of properties.
|
|
123
126
|
* @param composition Current composition
|
|
@@ -357,19 +357,24 @@ function updatePropertyIfExists(value, properties, key) {
|
|
|
357
357
|
* @param composition the composition to look at
|
|
358
358
|
* @param cb the function to run on every new composition. returning true here will end traversal for that subtree
|
|
359
359
|
*/
|
|
360
|
-
function traverseComposition(composition,
|
|
361
|
-
const found =
|
|
360
|
+
function traverseComposition(composition, callbacks, iteratorContext = [], parent) {
|
|
361
|
+
const found = callbacks.pretraversal
|
|
362
|
+
? callbacks.pretraversal(composition, iteratorContext, parent)
|
|
363
|
+
: false;
|
|
362
364
|
if (!found && composition && composition.compositions) {
|
|
363
365
|
for (const value of composition.compositions) {
|
|
364
366
|
if (isCompositionAnIteration(composition)) {
|
|
365
367
|
iteratorContext.unshift(composition.iterator);
|
|
366
368
|
}
|
|
367
|
-
traverseComposition(value,
|
|
369
|
+
traverseComposition(value, callbacks, iteratorContext, composition);
|
|
368
370
|
if (isCompositionAnIteration(composition)) {
|
|
369
371
|
iteratorContext.shift();
|
|
370
372
|
}
|
|
371
373
|
}
|
|
372
374
|
}
|
|
375
|
+
if (callbacks.posttraversal) {
|
|
376
|
+
callbacks.posttraversal(composition, iteratorContext, parent);
|
|
377
|
+
}
|
|
373
378
|
}
|
|
374
379
|
exports.traverseComposition = traverseComposition;
|
|
375
380
|
/**
|
package/build/moduleMetadata.js
CHANGED
|
@@ -21,7 +21,6 @@ const initModuleMetadataObject = () => ({
|
|
|
21
21
|
adgs: new Map(),
|
|
22
22
|
exports: {},
|
|
23
23
|
templateKomaciDocMap: {},
|
|
24
|
-
hasRenderFunction: false,
|
|
25
24
|
staticMetadataId: '',
|
|
26
25
|
});
|
|
27
26
|
exports.initModuleMetadataObject = initModuleMetadataObject;
|
|
@@ -504,43 +503,64 @@ const addTemplateUsageForAdg = (doc, adgIndex, moduleMetadata) => {
|
|
|
504
503
|
const composition = doc.compositions[doc.exports.default.value];
|
|
505
504
|
adg.compositions = [composition];
|
|
506
505
|
adg.compositionRootIndex = doc.exports.default.value;
|
|
507
|
-
(0, komaciDocumentIntrospection_1.traverseComposition)(composition,
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
506
|
+
(0, komaciDocumentIntrospection_1.traverseComposition)(composition, {
|
|
507
|
+
pretraversal: (comp, iterationContext, parent) => {
|
|
508
|
+
(0, komaciDocumentIntrospection_1.updatePropertiesForComposition)(comp, adg.properties, adg.propertiesUsedInTemplate, iterationContext);
|
|
509
|
+
if (comp && comp.isActive) {
|
|
510
|
+
adg.requiredCompositionFactoryFunctions.add(types_1.IdKeys.CONDITION_FUNC);
|
|
511
|
+
}
|
|
512
|
+
if (parent &&
|
|
513
|
+
(0, komaciDocumentIntrospection_1.isCompositionAComposedAdg)(parent) &&
|
|
514
|
+
((0, komaciDocumentIntrospection_1.isCompositionAComposedAdg)(comp) ||
|
|
515
|
+
(0, komaciDocumentIntrospection_1.isCompositionAContainer)(comp) ||
|
|
516
|
+
(0, komaciDocumentIntrospection_1.isCompositionASlot)(comp) ||
|
|
517
|
+
(0, komaciDocumentIntrospection_1.isCompositionAnIteration)(comp)) &&
|
|
518
|
+
!comp.slot) {
|
|
519
|
+
comp.slot = '';
|
|
520
|
+
}
|
|
521
|
+
if ((0, komaciDocumentIntrospection_1.isCompositionAComposedAdg)(comp)) {
|
|
522
|
+
adg.requiredCompositionFactoryFunctions.add(types_1.IdKeys.COMPOSED_GRAPH_FUNC);
|
|
523
|
+
if (comp.input.type === 'ImportReference') {
|
|
524
|
+
const visitedImportForTemplate = comp.input.value.startsWith(`t`);
|
|
525
|
+
const importName = moduleMetadata.importIndexReference.get(visitedImportForTemplate
|
|
526
|
+
? comp.input.value
|
|
527
|
+
: `t${adgIndex}-${comp.input.value}`);
|
|
528
|
+
const importInfo = importName
|
|
529
|
+
? moduleMetadata.importsByName.get(importName)
|
|
530
|
+
: undefined;
|
|
531
|
+
if (importInfo) {
|
|
532
|
+
importInfo.usedInPriming = true;
|
|
533
|
+
}
|
|
534
|
+
//changing the comp node to be what t is referencing
|
|
535
|
+
if (!visitedImportForTemplate) {
|
|
536
|
+
comp.input.value = `t${adgIndex}-${comp.input.value}`;
|
|
537
|
+
}
|
|
528
538
|
}
|
|
529
539
|
}
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
540
|
+
else if ((0, komaciDocumentIntrospection_1.isCompositionASlot)(comp)) {
|
|
541
|
+
adg.requiredCompositionFactoryFunctions.add(types_1.IdKeys.SLOT_FUNC);
|
|
542
|
+
}
|
|
543
|
+
else if ((0, komaciDocumentIntrospection_1.isCompositionAnIteration)(comp)) {
|
|
544
|
+
adg.requiredCompositionFactoryFunctions.add(types_1.IdKeys.ITERATION_FUNC);
|
|
545
|
+
}
|
|
546
|
+
else if ((0, komaciDocumentIntrospection_1.isCompositionAnImage)(comp)) {
|
|
547
|
+
adg.requiredCompositionFactoryFunctions.add(types_1.IdKeys.IMG_FUNC);
|
|
548
|
+
}
|
|
549
|
+
else if ((0, komaciDocumentIntrospection_1.isCompositionAContainer)(comp) && (comp.key || comp.slot)) {
|
|
550
|
+
adg.requiredCompositionFactoryFunctions.add(types_1.IdKeys.ELEMENT_FUNC);
|
|
551
|
+
}
|
|
552
|
+
return false;
|
|
553
|
+
},
|
|
554
|
+
posttraversal: (comp, iterationContext, parent) => {
|
|
555
|
+
// if the current composition is supposed to be slotted but its a child of a "processing" node i.e. conditional or iteration, set the slot on the parent
|
|
556
|
+
if (comp.slot &&
|
|
557
|
+
parent &&
|
|
558
|
+
(((0, komaciDocumentIntrospection_1.isCompositionAContainer)(parent) && parent.isActive) ||
|
|
559
|
+
(0, komaciDocumentIntrospection_1.isCompositionAnIteration)(parent))) {
|
|
560
|
+
parent.slot = comp.slot;
|
|
561
|
+
comp.slot = undefined;
|
|
562
|
+
}
|
|
563
|
+
},
|
|
544
564
|
});
|
|
545
565
|
}
|
|
546
566
|
}
|
package/build/types.d.ts
CHANGED
|
@@ -35,7 +35,8 @@ export declare enum IdKeys {
|
|
|
35
35
|
REDUCER_FUNC_ID = "REDUCER_FUNC_ID",
|
|
36
36
|
IMG_SRC = "IMG_SRC",
|
|
37
37
|
IMG_FUNC = "IMG_FUNC",
|
|
38
|
-
HOISTED_RENDER_FUNC_ID = "HOISTED_RENDER_FUNC_ID"
|
|
38
|
+
HOISTED_RENDER_FUNC_ID = "HOISTED_RENDER_FUNC_ID",
|
|
39
|
+
CONDITION_FUNC = "CONDITION_FUNC"
|
|
39
40
|
}
|
|
40
41
|
/**
|
|
41
42
|
* @typedef AstContext is an object that holds meta data information about the ast.
|
|
@@ -286,8 +287,9 @@ export declare type ModuleMetadata = {
|
|
|
286
287
|
templateKomaciDocMap: {
|
|
287
288
|
[fName: string]: KomaciDocument;
|
|
288
289
|
};
|
|
289
|
-
|
|
290
|
+
renderFunction?: HoistedFunctionMetadata;
|
|
290
291
|
staticMetadataId: string;
|
|
292
|
+
includePropsMetadata?: boolean;
|
|
291
293
|
moduleType?: ModuleTypes.BUNDLE_MODULE | ModuleTypes.SCRIPT_ONLY | ModuleTypes.TEMPLATE_ONLY;
|
|
292
294
|
};
|
|
293
295
|
export declare type ImportBinding = {
|
package/build/types.js
CHANGED
|
@@ -37,6 +37,7 @@ var IdKeys;
|
|
|
37
37
|
IdKeys["IMG_SRC"] = "IMG_SRC";
|
|
38
38
|
IdKeys["IMG_FUNC"] = "IMG_FUNC";
|
|
39
39
|
IdKeys["HOISTED_RENDER_FUNC_ID"] = "HOISTED_RENDER_FUNC_ID";
|
|
40
|
+
IdKeys["CONDITION_FUNC"] = "CONDITION_FUNC";
|
|
40
41
|
})(IdKeys = exports.IdKeys || (exports.IdKeys = {}));
|
|
41
42
|
/**
|
|
42
43
|
* Possbile types of properties we can encounter in a LWC
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@komaci/common-shared",
|
|
3
|
-
"version": "244.1.
|
|
3
|
+
"version": "244.1.5",
|
|
4
4
|
"description": "Assets that are shared across Komaci commonjs packages",
|
|
5
5
|
"homepage": "https://komaci.dev/",
|
|
6
6
|
"repository": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"build/komaci-mapping.json"
|
|
30
30
|
],
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@komaci/types": "244.1.
|
|
32
|
+
"@komaci/types": "244.1.5"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@babel/core": "^7.9.0",
|