@komaci/common-shared 244.1.7 → 244.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -45,6 +45,18 @@
45
45
  "Cooper",
46
46
  "CustomMetadata",
47
47
  "DDCProspector",
48
+ "DEVOPSIMPKG51",
49
+ "DEVOPSIMPKG52",
50
+ "DEVOPSIMPKG53",
51
+ "DEVOPSIMPKG54",
52
+ "DEVOPSIMPKG55",
53
+ "DEVOPSIMPKG56",
54
+ "DEVOPSIMPKG57",
55
+ "DEVOPSIMPKG58",
56
+ "DEVOPSIMPKG59",
57
+ "DEVOPSIMPKG60",
58
+ "DEVOPSIMPKG61",
59
+ "DEVOPSIMPKG62",
48
60
  "DataDotCom",
49
61
  "DataProtection",
50
62
  "DataService",
@@ -138,6 +150,7 @@
138
150
  "ProcessUIMgnt",
139
151
  "ProcessUIRule",
140
152
  "ProductSecurity",
153
+ "ProgramManagement",
141
154
  "ProgramMgmt",
142
155
  "QuickAction",
143
156
  "QuotesTrusted",
@@ -454,6 +467,7 @@
454
467
  "dxp_page_layout",
455
468
  "dxp_records",
456
469
  "dxp_search",
470
+ "dxp_service",
457
471
  "dxp_styling",
458
472
  "dxp_util",
459
473
  "dynamic",
@@ -716,6 +730,7 @@
716
730
  "process_home",
717
731
  "process_migration",
718
732
  "program_mgmt_omnistudio",
733
+ "pss_bm_data_mapper_flows",
719
734
  "pss_referral_flows",
720
735
  "pss_service_excellence_flows",
721
736
  "publicsector_disb_flows",
@@ -780,6 +795,7 @@
780
795
  "runtime_industries_documentreader",
781
796
  "runtime_industries_epc",
782
797
  "runtime_industries_eri",
798
+ "runtime_industries_frops",
783
799
  "runtime_industries_fsc",
784
800
  "runtime_industries_fundraising",
785
801
  "runtime_industries_fundraisingops",
@@ -831,6 +847,7 @@
831
847
  "runtime_platform_optimizer",
832
848
  "runtime_platform_prefcenter",
833
849
  "runtime_platform_privacy_analytics",
850
+ "runtime_platform_privacycenter",
834
851
  "runtime_platform_salesforcehub",
835
852
  "runtime_platform_sfdx",
836
853
  "runtime_platform_unified_notifications",
@@ -1019,6 +1036,7 @@
1019
1036
  "setup_service_experience",
1020
1037
  "setup_service_fieldservice",
1021
1038
  "setup_service_flowobjectlinking",
1039
+ "setup_service_folmessaging",
1022
1040
  "setup_service_folvoice",
1023
1041
  "setup_service_intents",
1024
1042
  "setup_service_livemessage",
@@ -117,10 +117,7 @@ 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, 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;
120
+ export declare function traverseComposition(composition: Composition, cb: (Composition: Composition, iterationContext: string[]) => boolean, iteratorContext?: string[]): void;
124
121
  /**
125
122
  * Recursively probe a composition and it's children for usages of properties.
126
123
  * @param composition Current composition
@@ -357,24 +357,19 @@ 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, callbacks, iteratorContext = [], parent) {
361
- const found = callbacks.pretraversal
362
- ? callbacks.pretraversal(composition, iteratorContext, parent)
363
- : false;
360
+ function traverseComposition(composition, cb, iteratorContext = []) {
361
+ const found = cb(composition, iteratorContext);
364
362
  if (!found && composition && composition.compositions) {
365
363
  for (const value of composition.compositions) {
366
364
  if (isCompositionAnIteration(composition)) {
367
365
  iteratorContext.unshift(composition.iterator);
368
366
  }
369
- traverseComposition(value, callbacks, iteratorContext, composition);
367
+ traverseComposition(value, cb, iteratorContext);
370
368
  if (isCompositionAnIteration(composition)) {
371
369
  iteratorContext.shift();
372
370
  }
373
371
  }
374
372
  }
375
- if (callbacks.posttraversal) {
376
- callbacks.posttraversal(composition, iteratorContext, parent);
377
- }
378
373
  }
379
374
  exports.traverseComposition = traverseComposition;
380
375
  /**
@@ -21,6 +21,7 @@ const initModuleMetadataObject = () => ({
21
21
  adgs: new Map(),
22
22
  exports: {},
23
23
  templateKomaciDocMap: {},
24
+ hasRenderFunction: false,
24
25
  staticMetadataId: '',
25
26
  });
26
27
  exports.initModuleMetadataObject = initModuleMetadataObject;
@@ -503,64 +504,43 @@ const addTemplateUsageForAdg = (doc, adgIndex, moduleMetadata) => {
503
504
  const composition = doc.compositions[doc.exports.default.value];
504
505
  adg.compositions = [composition];
505
506
  adg.compositionRootIndex = doc.exports.default.value;
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
- }
507
+ (0, komaciDocumentIntrospection_1.traverseComposition)(composition, (comp, iterationContext) => {
508
+ (0, komaciDocumentIntrospection_1.updatePropertiesForComposition)(comp, adg.properties, adg.propertiesUsedInTemplate, iterationContext);
509
+ if (comp && comp.isActive) {
510
+ adg.requiredCompositionFactoryFunctions.add(types_1.IdKeys.UNRESOLVED_FUNC);
511
+ }
512
+ if ((0, komaciDocumentIntrospection_1.isCompositionAComposedAdg)(comp)) {
513
+ adg.requiredCompositionFactoryFunctions.add(types_1.IdKeys.COMPOSED_GRAPH_FUNC);
514
+ if (comp.input.type === 'ImportReference') {
515
+ const visitedImportForTemplate = comp.input.value.startsWith(`t`);
516
+ const importName = moduleMetadata.importIndexReference.get(visitedImportForTemplate
517
+ ? comp.input.value
518
+ : `t${adgIndex}-${comp.input.value}`);
519
+ const importInfo = importName
520
+ ? moduleMetadata.importsByName.get(importName)
521
+ : undefined;
522
+ if (importInfo) {
523
+ importInfo.usedInPriming = true;
524
+ }
525
+ //changing the comp node to be what t is referencing
526
+ if (!visitedImportForTemplate) {
527
+ comp.input.value = `t${adgIndex}-${comp.input.value}`;
538
528
  }
539
529
  }
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
- },
530
+ }
531
+ else if ((0, komaciDocumentIntrospection_1.isCompositionASlot)(comp)) {
532
+ adg.requiredCompositionFactoryFunctions.add(types_1.IdKeys.SLOT_FUNC);
533
+ }
534
+ else if ((0, komaciDocumentIntrospection_1.isCompositionAnIteration)(comp)) {
535
+ adg.requiredCompositionFactoryFunctions.add(types_1.IdKeys.ITERATION_FUNC);
536
+ }
537
+ else if ((0, komaciDocumentIntrospection_1.isCompositionAnImage)(comp)) {
538
+ adg.requiredCompositionFactoryFunctions.add(types_1.IdKeys.IMG_FUNC);
539
+ }
540
+ else if ((0, komaciDocumentIntrospection_1.isCompositionAContainer)(comp) && (comp.key || comp.slot)) {
541
+ adg.requiredCompositionFactoryFunctions.add(types_1.IdKeys.ELEMENT_FUNC);
542
+ }
543
+ return false;
564
544
  });
565
545
  }
566
546
  }
package/build/types.d.ts CHANGED
@@ -35,8 +35,7 @@ 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",
39
- CONDITION_FUNC = "CONDITION_FUNC"
38
+ HOISTED_RENDER_FUNC_ID = "HOISTED_RENDER_FUNC_ID"
40
39
  }
41
40
  /**
42
41
  * @typedef AstContext is an object that holds meta data information about the ast.
@@ -287,7 +286,7 @@ export declare type ModuleMetadata = {
287
286
  templateKomaciDocMap: {
288
287
  [fName: string]: KomaciDocument;
289
288
  };
290
- renderFunction?: HoistedFunctionMetadata;
289
+ hasRenderFunction: boolean;
291
290
  staticMetadataId: string;
292
291
  includePropsMetadata?: boolean;
293
292
  moduleType?: ModuleTypes.BUNDLE_MODULE | ModuleTypes.SCRIPT_ONLY | ModuleTypes.TEMPLATE_ONLY;
package/build/types.js CHANGED
@@ -37,7 +37,6 @@ 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";
41
40
  })(IdKeys = exports.IdKeys || (exports.IdKeys = {}));
42
41
  /**
43
42
  * 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.7",
3
+ "version": "244.2.0",
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.7"
32
+ "@komaci/types": "244.2.0"
33
33
  },
34
34
  "dependencies": {
35
35
  "@babel/core": "^7.9.0",