@komaci/common-shared 244.0.0 → 244.1.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.
@@ -444,6 +444,7 @@
444
444
  "dxp_flow",
445
445
  "dxp_flowruntime",
446
446
  "dxp_form",
447
+ "dxp_icon",
447
448
  "dxp_layout",
448
449
  "dxp_page_layout",
449
450
  "dxp_records",
@@ -538,6 +539,7 @@
538
539
  "ftest_sfdc_checkout",
539
540
  "functest_platform_lwr",
540
541
  "functions",
542
+ "group_industries_publicsector",
541
543
  "guardrails",
542
544
  "guardrailstest",
543
545
  "hammer",
@@ -666,6 +668,7 @@
666
668
  "mcontent_interaction_builder",
667
669
  "mcontent_workspace",
668
670
  "mfa_assistant",
671
+ "mlplatform",
669
672
  "mobileBuilder",
670
673
  "mobile_setup",
671
674
  "mulesoft_citizen",
@@ -701,6 +704,8 @@
701
704
  "process_home",
702
705
  "process_migration",
703
706
  "program_mgmt_omnistudio",
707
+ "pss_referral_flows",
708
+ "pss_service_excellence_flows",
704
709
  "publicsector_disb_flows",
705
710
  "publicsectrsltn",
706
711
  "randa",
@@ -717,6 +722,7 @@
717
722
  "runtime_associationengine",
718
723
  "runtime_automated_actions",
719
724
  "runtime_branch_management",
725
+ "runtime_calendar",
720
726
  "runtime_cdp",
721
727
  "runtime_commerce_adj",
722
728
  "runtime_commerce_entitlements",
@@ -768,6 +774,7 @@
768
774
  "runtime_industries_omnistudio",
769
775
  "runtime_industries_orderforecasting",
770
776
  "runtime_industries_ordermanagement",
777
+ "runtime_industries_pricing",
771
778
  "runtime_industries_program_mgmt",
772
779
  "runtime_industries_publicsector",
773
780
  "runtime_industries_recurrence",
@@ -928,6 +935,7 @@
928
935
  "setup_industries_mfg_service",
929
936
  "setup_industries_mfgprogram",
930
937
  "setup_industries_objectdetection",
938
+ "setup_industries_pricing",
931
939
  "setup_industries_referralscoring",
932
940
  "setup_industries_rfm",
933
941
  "setup_industries_scoringframework",
@@ -1147,6 +1155,8 @@
1147
1155
  "walkthrough",
1148
1156
  "waveapps",
1149
1157
  "wavetemplate",
1158
+ "web3",
1159
+ "web3test",
1150
1160
  "webstore",
1151
1161
  "wfm",
1152
1162
  "wfm_adherence",
@@ -22,6 +22,7 @@ const initModuleMetadataObject = () => ({
22
22
  exports: {},
23
23
  templateKomaciDocMap: {},
24
24
  hasRenderFunction: false,
25
+ defaultComponentId: '',
25
26
  });
26
27
  exports.initModuleMetadataObject = initModuleMetadataObject;
27
28
  /**
@@ -443,6 +444,7 @@ const addTemplateUsageForAdg = (doc, adgIndex, moduleMetadata) => {
443
444
  doc.compositions?.[doc.exports.default.value]) {
444
445
  const composition = doc.compositions[doc.exports.default.value];
445
446
  adg.compositions = [composition];
447
+ adg.compositionRootIndex = doc.exports.default.value;
446
448
  (0, komaciDocumentIntrospection_1.traverseComposition)(composition, (comp, iterationContext) => {
447
449
  (0, komaciDocumentIntrospection_1.updatePropertiesForComposition)(comp, adg.properties, adg.propertiesUsedInTemplate, iterationContext);
448
450
  if (comp && comp.isActive) {
package/build/types.d.ts CHANGED
@@ -262,6 +262,8 @@ export declare type AdgMetadata = {
262
262
  parentReference?: Adg['parentClass'];
263
263
  /** to juggle weirdness with old getter support we can set this flag to avoid doing some extra processing on initial metadata collection */
264
264
  hasSourceFile: boolean;
265
+ /**If there is a template, get the index of the root component */
266
+ compositionRootIndex?: number;
265
267
  };
266
268
  /**
267
269
  * Complete structure of Metadata needed to compose a resolvable module
@@ -278,6 +280,7 @@ export declare type ModuleMetadata = {
278
280
  [fName: string]: KomaciDocument;
279
281
  };
280
282
  hasRenderFunction: boolean;
283
+ defaultComponentId: string;
281
284
  };
282
285
  export declare type ImportBinding = {
283
286
  importPath: string;
package/build/utils.d.ts CHANGED
@@ -158,4 +158,11 @@ export declare function addPropertyFunction(adg: Adg, propertyName: string, func
158
158
  * @returns the full file name separated into segments.
159
159
  */
160
160
  export declare function getFilepathSegments(fullFilename: string): string[];
161
+ /**
162
+ * Helper function to create a component id for a provided namespace and name.
163
+ * To create the component id we will turn the file name from camel case to kebab case and then prepend the component namespace.
164
+ * @param namespace the name sapce the component is from.
165
+ * @param name the filename
166
+ */
167
+ export declare function getComponentId(namespace: string, name: string): string;
161
168
  //# sourceMappingURL=utils.d.ts.map
package/build/utils.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getFilepathSegments = exports.addPropertyFunction = exports.updateKomaciDocumentWithValidTemplatedStrings = exports.updateKomaciDocumentWithValidGetters = exports.isDeclaredInAst = exports.isExpressionThisOrAlias = exports.getThisAliasDeclaredInFunction = exports.isPropertyNodeUsed = exports.isGetterNodeUsed = exports.isPropertyUsed = exports.getClassMethodName = exports.getVariablesDeclaredInFunction = exports.isExternalModule = exports.getAstContextObject = exports.getAllClassMethods = exports.getAllModuleVaraibles = exports.getAllModuleFunctions = exports.getFromIdentifierOrStringLiteral = exports.collectImportUsage = exports.getMemberVarsFromGetter = exports.implicitConsumptionMetadata = exports.getPropertyMetadataFromAst = exports.TEMPLATED_STRING_FUNCTION = exports.GETTER_FUNCTION = exports.ONE_NS = exports.FORCE_NS = exports.LIGHTNING_NS = void 0;
3
+ exports.getComponentId = exports.getFilepathSegments = exports.addPropertyFunction = exports.updateKomaciDocumentWithValidTemplatedStrings = exports.updateKomaciDocumentWithValidGetters = exports.isDeclaredInAst = exports.isExpressionThisOrAlias = exports.getThisAliasDeclaredInFunction = exports.isPropertyNodeUsed = exports.isGetterNodeUsed = exports.isPropertyUsed = exports.getClassMethodName = exports.getVariablesDeclaredInFunction = exports.isExternalModule = exports.getAstContextObject = exports.getAllClassMethods = exports.getAllModuleVaraibles = exports.getAllModuleFunctions = exports.getFromIdentifierOrStringLiteral = exports.collectImportUsage = exports.getMemberVarsFromGetter = exports.implicitConsumptionMetadata = exports.getPropertyMetadataFromAst = exports.TEMPLATED_STRING_FUNCTION = exports.GETTER_FUNCTION = exports.ONE_NS = exports.FORCE_NS = exports.LIGHTNING_NS = void 0;
4
4
  const core_1 = require("@babel/core");
5
5
  const types_1 = require("./types");
6
6
  const allowlistNamespaces_1 = require("./allowlistNamespaces");
@@ -510,4 +510,17 @@ function getFilepathSegments(fullFilename) {
510
510
  return segments;
511
511
  }
512
512
  exports.getFilepathSegments = getFilepathSegments;
513
+ /**
514
+ * Helper function to create a component id for a provided namespace and name.
515
+ * To create the component id we will turn the file name from camel case to kebab case and then prepend the component namespace.
516
+ * @param namespace the name sapce the component is from.
517
+ * @param name the filename
518
+ */
519
+ function getComponentId(namespace, name) {
520
+ return (namespace + '-' + name.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, '$1-$2'))
521
+ .replace(/ /g, '-')
522
+ .trim()
523
+ .toLocaleLowerCase();
524
+ }
525
+ exports.getComponentId = getComponentId;
513
526
  //# sourceMappingURL=utils.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@komaci/common-shared",
3
- "version": "244.0.0",
3
+ "version": "244.1.0",
4
4
  "description": "Assets that are shared across Komaci commonjs packages",
5
5
  "homepage": "https://komaci.dev/",
6
6
  "repository": {
@@ -29,10 +29,12 @@
29
29
  "build/komaci-mapping.json"
30
30
  ],
31
31
  "devDependencies": {
32
- "@komaci/types": "244.0.0"
32
+ "@komaci/types": "244.1.0"
33
33
  },
34
34
  "dependencies": {
35
35
  "@babel/core": "^7.9.0",
36
- "@babel/generator": "^7.9.0"
36
+ "@babel/generator": "^7.9.0",
37
+ "@babel/parser": "^7.9.0",
38
+ "@babel/types": "^7.9.0"
37
39
  }
38
40
  }