@komaci/common-shared 240.1.5 → 242.1.1

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.
@@ -0,0 +1,3 @@
1
+ import { WireAdaptersMapping } from './types';
2
+ export declare const wireAdaptersMap: WireAdaptersMapping;
3
+ //# sourceMappingURL=adaptersMapping.d.ts.map
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.wireAdaptersMap = void 0;
27
+ const wireAdapterImport = __importStar(require("./komaci-mapping.json"));
28
+ exports.wireAdaptersMap = wireAdapterImport;
29
+ //# sourceMappingURL=adaptersMapping.js.map
@@ -0,0 +1,6 @@
1
+ export declare const allowlistAdapters: {
2
+ [key: string]: string[];
3
+ };
4
+ export declare const allowlistResourceNamesStartsWith: string[];
5
+ export declare const allowlistResourceNamesExact: string[];
6
+ //# sourceMappingURL=allowlistAdapters.d.ts.map
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.allowlistResourceNamesExact = exports.allowlistResourceNamesStartsWith = exports.allowlistAdapters = void 0;
4
+ exports.allowlistAdapters = {
5
+ 'lightning/navigation': ['CurrentPageReference'],
6
+ }; // these must match the resourceName and one or more of the wire adapter names (export names), exactly
7
+ // these can have any wire adapter name (export name)
8
+ exports.allowlistResourceNamesStartsWith = ['@salesforce/apex']; // resourceName can start with
9
+ exports.allowlistResourceNamesExact = ['laf/transformWire']; // resourceName must exactly match this
10
+ //# sourceMappingURL=allowlistAdapters.js.map
@@ -1,3 +1,10 @@
1
+ export declare const isLocalHtmlImportReference: RegExp;
2
+ /**
3
+ * Determine whether the resource name is in a supported namespace
4
+ * @param resourceName the resource name of the Import, as a string
5
+ * @returns boolean true if the resource name is in a supported namespace
6
+ */
7
+ export declare function isSupportedNamespace(resourceName: string): boolean;
1
8
  /**
2
9
  * Returns true if the given namespace is an internal namespace. Note,
3
10
  * case is ignored. e.g., if "flexipage" is defined as a supported namespace, then
@@ -3,11 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.checkLibraryPathWithRegex = exports.isLibraryValid = exports.getNamespaceFromImport = exports.isNamespaceInternal = void 0;
6
+ exports.checkLibraryPathWithRegex = exports.isLibraryValid = exports.getNamespaceFromImport = exports.isNamespaceInternal = exports.isSupportedNamespace = exports.isLocalHtmlImportReference = void 0;
7
7
  const internal_namespaces_json_1 = __importDefault(require("./internal-namespaces.json"));
8
8
  const hardCodedNamespaces = ['lightning', 'laf', 'one', 'force', 'lst', '@salesforce'];
9
9
  const internalButNotSupported = ['komaci', 'lwc', 'aura', 'lwr'];
10
10
  const allowlistNamespaces = [...hardCodedNamespaces, ...internal_namespaces_json_1.default].filter((ns) => !internalButNotSupported.includes(ns.toLowerCase()));
11
+ exports.isLocalHtmlImportReference = /^.\/.*html$/;
11
12
  const allowListLibrariesRegex = [
12
13
  /^force\/shared$/,
13
14
  /^laf\/transformWire$/,
@@ -19,7 +20,32 @@ const allowListLibrariesRegex = [
19
20
  /^laf\/batchingPortable$/,
20
21
  /^lightning\/navigation$/,
21
22
  /^lightning\/base.*$/,
23
+ exports.isLocalHtmlImportReference,
22
24
  ];
25
+ /**
26
+ * Determine whether the resource name is in a supported namespace
27
+ * @param resourceName the resource name of the Import, as a string
28
+ * @returns boolean true if the resource name is in a supported namespace
29
+ */
30
+ function isSupportedNamespace(resourceName) {
31
+ //checking to see if we are importing a template from a local html file.
32
+ if (exports.isLocalHtmlImportReference.test(resourceName)) {
33
+ return true;
34
+ }
35
+ // check for relative, null, or empty namespaces (which are not allowed)
36
+ // Ex: undefined, '', './app_const1', './parent.html'
37
+ if (resourceName.startsWith('./')) {
38
+ return false;
39
+ }
40
+ // imports where parent class is for a relative import.
41
+ // Ex: import { Foo } from './foo';
42
+ if (resourceName.startsWith('@salesforce/komaci/.')) {
43
+ return false;
44
+ }
45
+ return (isNamespaceInternal(getNamespaceFromImport(resourceName)) &&
46
+ isLibraryValid(resourceName));
47
+ }
48
+ exports.isSupportedNamespace = isSupportedNamespace;
23
49
  /**
24
50
  * Returns true if the given namespace is an internal namespace. Note,
25
51
  * case is ignored. e.g., if "flexipage" is defined as a supported namespace, then
package/build/index.d.ts CHANGED
@@ -4,4 +4,7 @@ export * from './types';
4
4
  export * from './allowlistNamespaces';
5
5
  export * from './komaciDocumentIntrospection';
6
6
  export * from './allowListGlobals';
7
+ export * from './moduleMetadata';
8
+ export * from './allowlistAdapters';
9
+ export * from './wires';
7
10
  //# sourceMappingURL=index.d.ts.map
package/build/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -16,4 +20,7 @@ __exportStar(require("./types"), exports);
16
20
  __exportStar(require("./allowlistNamespaces"), exports);
17
21
  __exportStar(require("./komaciDocumentIntrospection"), exports);
18
22
  __exportStar(require("./allowListGlobals"), exports);
23
+ __exportStar(require("./moduleMetadata"), exports);
24
+ __exportStar(require("./allowlistAdapters"), exports);
25
+ __exportStar(require("./wires"), exports);
19
26
  //# sourceMappingURL=index.js.map
@@ -662,6 +662,7 @@
662
662
  "private_industries_common",
663
663
  "process_home",
664
664
  "process_migration",
665
+ "publicsector_exp_flows",
665
666
  "randa",
666
667
  "record_flexipage",
667
668
  "records",
@@ -707,12 +708,14 @@
707
708
  "runtime_industries_arcgraph",
708
709
  "runtime_industries_assessment",
709
710
  "runtime_industries_churn_ED",
711
+ "runtime_industries_clause_library",
710
712
  "runtime_industries_clm",
711
713
  "runtime_industries_components",
712
714
  "runtime_industries_documentreader",
713
715
  "runtime_industries_epc",
714
716
  "runtime_industries_eri",
715
717
  "runtime_industries_fsc",
718
+ "runtime_industries_gdf",
716
719
  "runtime_industries_healthcare",
717
720
  "runtime_industries_insurance",
718
721
  "runtime_industries_interaction_decisionmatrix",
@@ -871,6 +874,7 @@
871
874
  "setup_industries_mfgprogram",
872
875
  "setup_industries_objectdetection",
873
876
  "setup_industries_referralscoring",
877
+ "setup_industries_scoringframework",
874
878
  "setup_industries_smartselling",
875
879
  "setup_industries_smarttags",
876
880
  "setup_industries_tpm",
@@ -0,0 +1,288 @@
1
+ {
2
+ "lightning/uiRecordActionsApi": {
3
+ "getRecordActions": {
4
+ "prime": {
5
+ "importPath": "lightning/unstable_uiRecordActionsApi",
6
+ "identifier": "unstable_getRecordActions_imperative"
7
+ }
8
+ },
9
+ "getRelatedListsActions": {
10
+ "prime": {
11
+ "importPath": "lightning/unstable_uiRecordActionsApi",
12
+ "identifier": "unstable_getRelatedListsActions_imperative"
13
+ }
14
+ },
15
+ "getRelatedListActions": {
16
+ "prime": {
17
+ "importPath": "lightning/unstable_uiRecordActionsApi",
18
+ "identifier": "unstable_getRelatedListActions_imperative"
19
+ },
20
+ "batch": {
21
+ "prime": {
22
+ "importPath": "lightning/unstable_uiRecordActionsApi",
23
+ "identifier": "unstable_getRelatedListsActions_imperative"
24
+ },
25
+ "reducer": {
26
+ "importPath": "laf/batchingPortable",
27
+ "identifier": "RelatedListActionsBatchReducer"
28
+ }
29
+ }
30
+ }
31
+ },
32
+ "lightning/uiLayoutApi": {
33
+ "getLayout": {
34
+ "prime": {
35
+ "importPath": "lightning/unstable_uiLayoutApi",
36
+ "identifier": "unstable_getLayout_imperative"
37
+ }
38
+ },
39
+ "getLayoutUserState": {
40
+ "prime": {
41
+ "importPath": "lightning/unstable_uiLayoutApi",
42
+ "identifier": "unstable_getLayoutUserState_imperative"
43
+ }
44
+ }
45
+ },
46
+ "lightning/uiListsApi": {
47
+ "getListInfoByName": {
48
+ "prime": {
49
+ "importPath": "lightning/unstable_uiListsApi",
50
+ "identifier": "unstable_getListInfoByName_imperative"
51
+ }
52
+ }
53
+ },
54
+ "lightning/uiAppsApi": {
55
+ "getNavItems": {
56
+ "prime": {
57
+ "importPath": "lightning/unstable_uiAppsApi",
58
+ "identifier": "unstable_getNavItems_imperative"
59
+ }
60
+ }
61
+ },
62
+ "lightning/uiObjectInfoApi": {
63
+ "getObjectInfos": {
64
+ "prime": {
65
+ "importPath": "lightning/unstable_uiObjectInfoApi",
66
+ "identifier": "unstable_getObjectInfos_imperative"
67
+ },
68
+ "batch": {
69
+ "prime": {
70
+ "importPath": "lightning/unstable_uiObjectInfoApi",
71
+ "identifier": "unstable_getObjectInfos_imperative"
72
+ },
73
+ "reducer": {
74
+ "importPath": "laf/batchingPortable",
75
+ "identifier": "ObjectInfosBatchReducer"
76
+ }
77
+ }
78
+ },
79
+ "getObjectInfo": {
80
+ "prime": {
81
+ "importPath": "lightning/unstable_uiObjectInfoApi",
82
+ "identifier": "unstable_getObjectInfo_imperative"
83
+ },
84
+ "batch": {
85
+ "prime": {
86
+ "importPath": "lightning/unstable_uiObjectInfoApi",
87
+ "identifier": "unstable_getObjectInfos_imperative"
88
+ },
89
+ "reducer": {
90
+ "importPath": "laf/batchingPortable",
91
+ "identifier": "ObjectInfoBatchReducer"
92
+ }
93
+ }
94
+ },
95
+ "getPicklistValuesByRecordType": {
96
+ "prime": {
97
+ "importPath": "lightning/unstable_uiObjectInfoApi",
98
+ "identifier": "unstable_getPicklistValuesByRecordType_imperative"
99
+ }
100
+ },
101
+ "getPicklistValues": {
102
+ "prime": {
103
+ "importPath": "lightning/unstable_uiObjectInfoApi",
104
+ "identifier": "unstable_getPicklistValues_imperative"
105
+ }
106
+ }
107
+ },
108
+ "lightning/uiRecordAvatarApi": {
109
+ "getRecordAvatars": {
110
+ "prime": {
111
+ "importPath": "lightning/unstable_uiRecordAvatarApi",
112
+ "identifier": "unstable_getRecordAvatars_imperative"
113
+ },
114
+ "batch": {
115
+ "prime": {
116
+ "importPath": "lightning/unstable_uiRecordAvatarApi",
117
+ "identifier": "unstable_getRecordAvatars_imperative"
118
+ },
119
+ "reducer": {
120
+ "importPath": "laf/batchingPortable",
121
+ "identifier": "RecordAvatarBatchReducer"
122
+ }
123
+ }
124
+ }
125
+ },
126
+ "lightning/uiRecordApi": {
127
+ "getRecordCreateDefaults": {
128
+ "prime": {
129
+ "importPath": "lightning/unstable_uiRecordApi",
130
+ "identifier": "unstable_getRecordCreateDefaults_imperative"
131
+ }
132
+ },
133
+ "getRecordUi": {
134
+ "prime": {
135
+ "importPath": "lightning/unstable_uiRecordApi",
136
+ "identifier": "unstable_getRecordUi_imperative"
137
+ }
138
+ },
139
+ "getRecords": {
140
+ "prime": {
141
+ "importPath": "lightning/unstable_uiRecordApi",
142
+ "identifier": "unstable_getRecords_imperative"
143
+ }
144
+ },
145
+ "getRecord": {
146
+ "prime": {
147
+ "importPath": "lightning/unstable_uiRecordApi",
148
+ "identifier": "unstable_getRecord_imperative"
149
+ },
150
+ "batch": {
151
+ "prime": {
152
+ "importPath": "lightning/unstable_uiRecordApi",
153
+ "identifier": "unstable_getRecords_imperative"
154
+ },
155
+ "reducer": {
156
+ "importPath": "laf/batchingPortable",
157
+ "identifier": "GetRecordBatchReducer"
158
+ }
159
+ }
160
+ }
161
+ },
162
+ "lightning/uiRelatedListApi": {
163
+ "getRelatedListsCount": {
164
+ "prime": {
165
+ "importPath": "lightning/unstable_uiRelatedListApi",
166
+ "identifier": "unstable_getRelatedListsCount_imperative"
167
+ }
168
+ },
169
+ "getRelatedListCount": {
170
+ "prime": {
171
+ "importPath": "lightning/unstable_uiRelatedListApi",
172
+ "identifier": "unstable_getRelatedListCount_imperative"
173
+ }
174
+ },
175
+ "getRelatedListInfoBatch": {
176
+ "prime": {
177
+ "importPath": "lightning/unstable_uiRelatedListApi",
178
+ "identifier": "unstable_getRelatedListInfoBatch_imperative"
179
+ }
180
+ },
181
+ "getRelatedListsInfo": {
182
+ "prime": {
183
+ "importPath": "lightning/unstable_uiRelatedListApi",
184
+ "identifier": "unstable_getRelatedListsInfo_imperative"
185
+ }
186
+ },
187
+ "getRelatedListInfo": {
188
+ "prime": {
189
+ "importPath": "lightning/unstable_uiRelatedListApi",
190
+ "identifier": "unstable_getRelatedListInfo_imperative"
191
+ },
192
+ "batch": {
193
+ "prime": {
194
+ "importPath": "lightning/unstable_uiRelatedListApi",
195
+ "identifier": "unstable_getRelatedListInfoBatch_imperative"
196
+ },
197
+ "reducer": {
198
+ "importPath": "laf/batchingPortable",
199
+ "identifier": "RelatedListInfoBatchReducer"
200
+ }
201
+ }
202
+ },
203
+ "getRelatedListRecordsBatch": {
204
+ "prime": {
205
+ "importPath": "lightning/unstable_uiRelatedListApi",
206
+ "identifier": "unstable_getRelatedListRecordsBatch_imperative"
207
+ }
208
+ },
209
+ "getRelatedListRecords": {
210
+ "prime": {
211
+ "importPath": "lightning/unstable_uiRelatedListApi",
212
+ "identifier": "unstable_getRelatedListRecords_imperative"
213
+ },
214
+ "batch": {
215
+ "prime": {
216
+ "importPath": "lightning/unstable_uiRelatedListApi",
217
+ "identifier": "unstable_getRelatedListRecordsBatch_imperative"
218
+ },
219
+ "reducer": {
220
+ "importPath": "laf/batchingPortable",
221
+ "identifier": "RelatedListRecordsBatchReducer"
222
+ }
223
+ }
224
+ }
225
+ },
226
+ "lightning/unstable_uiRelatedListApi": {
227
+ "unstable_getRelatedListInfoBatch": {
228
+ "prime": {
229
+ "importPath": "lightning/unstable_uiRelatedListApi",
230
+ "identifier": "unstable_getRelatedListInfoBatch_imperative"
231
+ }
232
+ },
233
+ "unstable_getRelatedListRecordsBatch": {
234
+ "prime": {
235
+ "importPath": "lightning/unstable_uiRelatedListApi",
236
+ "identifier": "unstable_getRelatedListRecordsBatch_imperative"
237
+ }
238
+ }
239
+ },
240
+ "lightning/uiSearchApi": {
241
+ "getSearchFilterOptions": {
242
+ "prime": {
243
+ "importPath": "lightning/unstable_uiSearchApi",
244
+ "identifier": "unstable_getSearchFilterOptions_imperative"
245
+ }
246
+ },
247
+ "getSearchResults": {
248
+ "prime": {
249
+ "importPath": "lightning/unstable_uiSearchApi",
250
+ "identifier": "unstable_getSearchResults_imperative"
251
+ }
252
+ },
253
+ "getKeywordSearchResults": {
254
+ "prime": {
255
+ "importPath": "lightning/unstable_uiSearchApi",
256
+ "identifier": "unstable_getKeywordSearchResults_imperative"
257
+ }
258
+ }
259
+ },
260
+ "lightning/unstable_uiSearchApi": {
261
+ "unstable_getSearchFilterOptions": {
262
+ "prime": {
263
+ "importPath": "lightning/unstable_uiSearchApi",
264
+ "identifier": "unstable_getSearchFilterOptions_imperative"
265
+ }
266
+ },
267
+ "unstable_getSearchResults": {
268
+ "prime": {
269
+ "importPath": "lightning/unstable_uiSearchApi",
270
+ "identifier": "unstable_getSearchResults_imperative"
271
+ }
272
+ },
273
+ "unstable_getKeywordSearchResults": {
274
+ "prime": {
275
+ "importPath": "lightning/unstable_uiSearchApi",
276
+ "identifier": "unstable_getKeywordSearchResults_imperative"
277
+ }
278
+ }
279
+ },
280
+ "lightning/unstable_uiGraphQLApi": {
281
+ "graphQL": {
282
+ "prime": {
283
+ "importPath": "lightning/unstable_uiGraphQLApi",
284
+ "identifier": "unstable_graphQL_imperative"
285
+ }
286
+ }
287
+ }
288
+ }
@@ -1,11 +1,23 @@
1
- import { ClassPropertyContext, ClassPropertyContexts, ImportPropertyContext, InputTraversalCallback, PropertyTypes, WirePropertyContext } from './types';
2
- import { FunctionType, FunctionReference, KomaciDocument, Property, Import, Adg, Value, Composition, ComposedAdg, Iteration, Binding, Image, PrimitiveValue } from '@komaci/types';
1
+ import { AdgMetadata, ClassPropertyContext, ClassPropertyContexts, ImportPropertyContext, InputTraversalCallback, ModuleMetadata, PropertyTypes, Visited } from './types';
2
+ import { FunctionType, FunctionReference, KomaciDocument, Property, Import, Adg, Value, Container, Composition, ComposedAdg, Iteration, Binding, Image, PrimitiveValue, PropertyReference } from '@komaci/types';
3
3
  /**
4
4
  * Check if the composition is an Iteration
5
5
  * @param composition composition obj to check
6
6
  * @returns if composition is an Iteration
7
7
  */
8
8
  export declare function isCompositionAnIteration(composition: Composition): composition is Iteration;
9
+ /**
10
+ * Check if the composition is a Slot
11
+ * @param composition composition obj to check
12
+ * @returns if composition is a Slot
13
+ */
14
+ export declare function isCompositionASlot(composition: Composition): composition is Container;
15
+ /**
16
+ * Check if the composition is an Iteration
17
+ * @param composition composition obj to check
18
+ * @returns if composition is an Iteration
19
+ */
20
+ export declare function isCompositionAContainer(composition: Composition): composition is Container;
9
21
  /**
10
22
  * Check if the composition is a ComposedAdg
11
23
  * @param composition composition obj to check
@@ -36,6 +48,12 @@ export declare function isSrcABinding(src: Binding | PrimitiveValue): src is Bin
36
48
  * @returns if it is a function reference
37
49
  */
38
50
  export declare function isFunctionReference(node: Property['input']): node is FunctionReference;
51
+ /**
52
+ * Check if input is a property reference
53
+ * @param node input to check
54
+ * @returns if it is a property reference
55
+ */
56
+ export declare function isValueProperty(node: Value): node is PropertyReference;
39
57
  /**
40
58
  * Confirm if a function object is of a specfic type
41
59
  * @param type The type to validate against
@@ -69,9 +87,17 @@ export declare function stripChildReferenceFromValue(value: string): string;
69
87
  *
70
88
  * @param component The component ADG to process
71
89
  * @param doc The full komaci doc we are looking in
90
+ * @param moduleMetadata Data structure of metadata about the component we are analyzing
72
91
  * @returns The inflated properties map
73
92
  */
74
- export declare function initializePropertiesMap(component: Adg, doc: KomaciDocument, properties: ClassPropertyContexts): ClassPropertyContexts;
93
+ export declare function initializePropertiesMap(adgProperties: Record<string, Property> | undefined, adgFunctions: Visited<FunctionType>[] | undefined, adgIndex: number, doc: KomaciDocument, moduleMetadata: ModuleMetadata, properties?: ClassPropertyContexts): ClassPropertyContexts;
94
+ /**
95
+ * run over functions not associated with a property and make sure we collect info about the good ones
96
+ * @param functions list of functions for a given adg
97
+ * @param adg metadata about the given adg
98
+ * @param moduleMetadata general module metadata
99
+ */
100
+ export declare function processFreestandingFunctions(functions: Visited<FunctionType>[] | undefined, adg: AdgMetadata, moduleMetadata: ModuleMetadata): void;
75
101
  /**
76
102
  * Traverse the input of a Function object (as definged in a Komaci Document) generically. When we get to a specific value
77
103
  * in the tree, we run the provided callback. The callback can return `true` if we should stop
@@ -84,29 +110,20 @@ export declare function initializePropertiesMap(component: Adg, doc: KomaciDocum
84
110
  * @returns If we have stopped traversal down this path
85
111
  */
86
112
  export declare function traverseInput(input: Value | Value[], cb: InputTraversalCallback, key?: string): boolean;
87
- export declare function traverseParentAdgs(component: Adg, doc: KomaciDocument, cb: (component: Adg) => void): void;
113
+ export declare function traverseParentAdgs(component: Adg | undefined, komaciDocIndex: number, doc: KomaciDocument, moduleMetadata: ModuleMetadata, cb: (component: Adg, komaciDocIndex: number) => void): void;
114
+ export declare const doesAdgExist: (index: number, doc: KomaciDocument) => boolean;
88
115
  /**
89
- * Traverse the Komaci Document for a script file and collect property usages.
90
- *
91
- * This function:
92
- * 1. prepares the properties object with initial values
93
- * 2. collects usages of properties from wire functions
94
- * @param doc Komaci Script Doc to traverse
95
- * @returns contextual information about properties
116
+ * Traverse through a composition looking for something
117
+ * @param composition the composition to look at
118
+ * @param cb the function to run on every new composition. returning true here will end traversal for that subtree
96
119
  */
97
- export declare function collectPropertyMetadataFromScriptDoc(doc: KomaciDocument): ClassPropertyContexts;
120
+ export declare function traverseComposition(composition: Composition, cb: (Composition: Composition, iterationContext: string[]) => boolean, iteratorContext?: string[]): void;
98
121
  /**
99
122
  * Recursively probe a composition and it's children for usages of properties.
100
123
  * @param composition Current composition
101
124
  * @param properties The map of properties to update
102
125
  */
103
- export declare function updatePropertiesForComposition(composition: Composition, properties: ClassPropertyContexts): void;
104
- /**
105
- * Collect usages of properties from compositions in a Komaci Template Document
106
- * @param doc Komaci Document
107
- * @param properties The current map of properties, this is just updating them.
108
- */
109
- export declare function updatePropertyMetadataFromTemplateDoc(doc: KomaciDocument, properties: ClassPropertyContexts): void;
126
+ export declare function updatePropertiesForComposition(composition: Composition, properties: ClassPropertyContexts, propertiesUsedInTemplate: Set<string>, iterationContext: string[]): void;
110
127
  /**
111
128
  * Updates used properties to record whether they were used in Priming.
112
129
  * @param prop the name of the getter under consideration
@@ -115,6 +132,14 @@ export declare function updatePropertyMetadataFromTemplateDoc(doc: KomaciDocumen
115
132
  * @param type The property type so we can make sure the metadata has the right value
116
133
  */
117
134
  export declare function updatePropertyUsage(prop: string, identifiers: string[], properties: ClassPropertyContexts, type: PropertyTypes): void;
118
- export declare function isPropertyAWire(property: ClassPropertyContext): property is WirePropertyContext;
119
135
  export declare function isPropertyFromImport(property: ClassPropertyContext): property is ImportPropertyContext;
136
+ /**
137
+ * Convers an import in a Komaci template doc to a component identifier.
138
+ * Example:
139
+ * From: @salesforce/komaci/c__child1__child1.js
140
+ * To: c-child1
141
+ * @param {string} resourceName the import path
142
+ * @returns {string} a string representing the component id generated from the import resource name
143
+ */
144
+ export declare function importToComponentId(resourceName: string): string;
120
145
  //# sourceMappingURL=komaciDocumentIntrospection.d.ts.map