@komaci/common-shared 244.0.0 → 244.1.2
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/build/internal-namespaces.json +12 -0
- package/build/moduleMetadata.js +2 -0
- package/build/types.d.ts +9 -0
- package/build/types.js +7 -1
- package/build/utils.d.ts +7 -0
- package/build/utils.js +14 -1
- package/package.json +5 -3
|
@@ -334,6 +334,7 @@
|
|
|
334
334
|
"commerce_unified_checkout",
|
|
335
335
|
"commerce_unified_coupons",
|
|
336
336
|
"commerce_unified_promotions",
|
|
337
|
+
"commerce_wishlist",
|
|
337
338
|
"commercecart",
|
|
338
339
|
"commercepayments",
|
|
339
340
|
"commercepricing",
|
|
@@ -444,6 +445,7 @@
|
|
|
444
445
|
"dxp_flow",
|
|
445
446
|
"dxp_flowruntime",
|
|
446
447
|
"dxp_form",
|
|
448
|
+
"dxp_icon",
|
|
447
449
|
"dxp_layout",
|
|
448
450
|
"dxp_page_layout",
|
|
449
451
|
"dxp_records",
|
|
@@ -538,6 +540,7 @@
|
|
|
538
540
|
"ftest_sfdc_checkout",
|
|
539
541
|
"functest_platform_lwr",
|
|
540
542
|
"functions",
|
|
543
|
+
"group_industries_publicsector",
|
|
541
544
|
"guardrails",
|
|
542
545
|
"guardrailstest",
|
|
543
546
|
"hammer",
|
|
@@ -666,6 +669,7 @@
|
|
|
666
669
|
"mcontent_interaction_builder",
|
|
667
670
|
"mcontent_workspace",
|
|
668
671
|
"mfa_assistant",
|
|
672
|
+
"mlplatform",
|
|
669
673
|
"mobileBuilder",
|
|
670
674
|
"mobile_setup",
|
|
671
675
|
"mulesoft_citizen",
|
|
@@ -698,9 +702,12 @@
|
|
|
698
702
|
"pref_center",
|
|
699
703
|
"privacy_center",
|
|
700
704
|
"private_industries_common",
|
|
705
|
+
"prm_slack",
|
|
701
706
|
"process_home",
|
|
702
707
|
"process_migration",
|
|
703
708
|
"program_mgmt_omnistudio",
|
|
709
|
+
"pss_referral_flows",
|
|
710
|
+
"pss_service_excellence_flows",
|
|
704
711
|
"publicsector_disb_flows",
|
|
705
712
|
"publicsectrsltn",
|
|
706
713
|
"randa",
|
|
@@ -717,6 +724,7 @@
|
|
|
717
724
|
"runtime_associationengine",
|
|
718
725
|
"runtime_automated_actions",
|
|
719
726
|
"runtime_branch_management",
|
|
727
|
+
"runtime_calendar",
|
|
720
728
|
"runtime_cdp",
|
|
721
729
|
"runtime_commerce_adj",
|
|
722
730
|
"runtime_commerce_entitlements",
|
|
@@ -768,6 +776,7 @@
|
|
|
768
776
|
"runtime_industries_omnistudio",
|
|
769
777
|
"runtime_industries_orderforecasting",
|
|
770
778
|
"runtime_industries_ordermanagement",
|
|
779
|
+
"runtime_industries_pricing",
|
|
771
780
|
"runtime_industries_program_mgmt",
|
|
772
781
|
"runtime_industries_publicsector",
|
|
773
782
|
"runtime_industries_recurrence",
|
|
@@ -928,6 +937,7 @@
|
|
|
928
937
|
"setup_industries_mfg_service",
|
|
929
938
|
"setup_industries_mfgprogram",
|
|
930
939
|
"setup_industries_objectdetection",
|
|
940
|
+
"setup_industries_pricing",
|
|
931
941
|
"setup_industries_referralscoring",
|
|
932
942
|
"setup_industries_rfm",
|
|
933
943
|
"setup_industries_scoringframework",
|
|
@@ -1147,6 +1157,8 @@
|
|
|
1147
1157
|
"walkthrough",
|
|
1148
1158
|
"waveapps",
|
|
1149
1159
|
"wavetemplate",
|
|
1160
|
+
"web3",
|
|
1161
|
+
"web3test",
|
|
1150
1162
|
"webstore",
|
|
1151
1163
|
"wfm",
|
|
1152
1164
|
"wfm_adherence",
|
package/build/moduleMetadata.js
CHANGED
|
@@ -22,6 +22,7 @@ const initModuleMetadataObject = () => ({
|
|
|
22
22
|
exports: {},
|
|
23
23
|
templateKomaciDocMap: {},
|
|
24
24
|
hasRenderFunction: false,
|
|
25
|
+
staticMetadataId: '',
|
|
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
|
@@ -202,6 +202,11 @@ export declare enum FunctionTypes {
|
|
|
202
202
|
RENDER_FUNCTION = "RenderFunction",
|
|
203
203
|
ERROR = "ErrorFunction"
|
|
204
204
|
}
|
|
205
|
+
export declare enum ModuleTypes {
|
|
206
|
+
BUNDLE_MODULE = "Bundle",
|
|
207
|
+
SCRIPT_ONLY = "ScriptOnly",
|
|
208
|
+
TEMPLATE_ONLY = "TemplateOnly"
|
|
209
|
+
}
|
|
205
210
|
/**
|
|
206
211
|
* Basic information needed by all function nodes
|
|
207
212
|
*/
|
|
@@ -262,6 +267,8 @@ export declare type AdgMetadata = {
|
|
|
262
267
|
parentReference?: Adg['parentClass'];
|
|
263
268
|
/** to juggle weirdness with old getter support we can set this flag to avoid doing some extra processing on initial metadata collection */
|
|
264
269
|
hasSourceFile: boolean;
|
|
270
|
+
/**If there is a template, get the index of the root component */
|
|
271
|
+
compositionRootIndex?: number;
|
|
265
272
|
};
|
|
266
273
|
/**
|
|
267
274
|
* Complete structure of Metadata needed to compose a resolvable module
|
|
@@ -278,6 +285,8 @@ export declare type ModuleMetadata = {
|
|
|
278
285
|
[fName: string]: KomaciDocument;
|
|
279
286
|
};
|
|
280
287
|
hasRenderFunction: boolean;
|
|
288
|
+
staticMetadataId: string;
|
|
289
|
+
moduleType?: ModuleTypes.BUNDLE_MODULE | ModuleTypes.SCRIPT_ONLY | ModuleTypes.TEMPLATE_ONLY;
|
|
281
290
|
};
|
|
282
291
|
export declare type ImportBinding = {
|
|
283
292
|
importPath: string;
|
package/build/types.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FunctionTypes = exports.UNSUPPORTED_FUNCTION = exports.PropertyTypes = exports.IdKeys = exports.PROPS = exports.CONTEXT = exports.ERROR_PREFIX = void 0;
|
|
3
|
+
exports.ModuleTypes = exports.FunctionTypes = exports.UNSUPPORTED_FUNCTION = exports.PropertyTypes = exports.IdKeys = exports.PROPS = exports.CONTEXT = exports.ERROR_PREFIX = void 0;
|
|
4
4
|
exports.ERROR_PREFIX = '[komaci] ';
|
|
5
5
|
exports.CONTEXT = 'ctx';
|
|
6
6
|
exports.PROPS = 'props';
|
|
@@ -68,4 +68,10 @@ var FunctionTypes;
|
|
|
68
68
|
FunctionTypes["RENDER_FUNCTION"] = "RenderFunction";
|
|
69
69
|
FunctionTypes["ERROR"] = "ErrorFunction";
|
|
70
70
|
})(FunctionTypes = exports.FunctionTypes || (exports.FunctionTypes = {}));
|
|
71
|
+
var ModuleTypes;
|
|
72
|
+
(function (ModuleTypes) {
|
|
73
|
+
ModuleTypes["BUNDLE_MODULE"] = "Bundle";
|
|
74
|
+
ModuleTypes["SCRIPT_ONLY"] = "ScriptOnly";
|
|
75
|
+
ModuleTypes["TEMPLATE_ONLY"] = "TemplateOnly";
|
|
76
|
+
})(ModuleTypes = exports.ModuleTypes || (exports.ModuleTypes = {}));
|
|
71
77
|
//# sourceMappingURL=types.js.map
|
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.
|
|
3
|
+
"version": "244.1.2",
|
|
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.
|
|
32
|
+
"@komaci/types": "244.1.2"
|
|
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
|
}
|