@salesforce/lds-adapters-community-navigation-menu 1.100.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/LICENSE.txt +82 -0
- package/dist/es/es2018/community-navigation-menu.js +447 -0
- package/dist/types/src/generated/adapters/adapter-utils.d.ts +66 -0
- package/dist/types/src/generated/adapters/getCommunityNavigationMenu.d.ts +33 -0
- package/dist/types/src/generated/artifacts/main.d.ts +1 -0
- package/dist/types/src/generated/artifacts/sfdc.d.ts +3 -0
- package/dist/types/src/generated/resources/getConnectCommunitiesNavigationMenuNavigationMenuItemsByCommunityId.d.ts +24 -0
- package/dist/types/src/generated/types/NavigationMenuItemCollectionRepresentation.d.ts +30 -0
- package/dist/types/src/generated/types/NavigationMenuItemRepresentation.d.ts +44 -0
- package/dist/types/src/generated/types/type-utils.d.ts +39 -0
- package/dist/umd/es2018/community-navigation-menu.js +455 -0
- package/dist/umd/es5/community-navigation-menu.js +457 -0
- package/package.json +52 -0
- package/sfdc/index.d.ts +1 -0
- package/sfdc/index.js +479 -0
- package/src/raml/api.raml +114 -0
- package/src/raml/luvio.raml +17 -0
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
Terms of Use
|
|
2
|
+
|
|
3
|
+
Copyright 2022 Salesforce, Inc. All rights reserved.
|
|
4
|
+
|
|
5
|
+
These Terms of Use govern the download, installation, and/or use of this
|
|
6
|
+
software provided by Salesforce, Inc. ("Salesforce") (the "Software"), were
|
|
7
|
+
last updated on April 15, 2022, and constitute a legally binding
|
|
8
|
+
agreement between you and Salesforce. If you do not agree to these Terms of
|
|
9
|
+
Use, do not install or use the Software.
|
|
10
|
+
|
|
11
|
+
Salesforce grants you a worldwide, non-exclusive, no-charge, royalty-free
|
|
12
|
+
copyright license to reproduce, prepare derivative works of, publicly
|
|
13
|
+
display, publicly perform, sublicense, and distribute the Software and
|
|
14
|
+
derivative works subject to these Terms. These Terms shall be included in
|
|
15
|
+
all copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
Subject to the limited rights expressly granted hereunder, Salesforce
|
|
18
|
+
reserves all rights, title, and interest in and to all intellectual
|
|
19
|
+
property subsisting in the Software. No rights are granted to you hereunder
|
|
20
|
+
other than as expressly set forth herein. Users residing in countries on
|
|
21
|
+
the United States Office of Foreign Assets Control sanction list, or which
|
|
22
|
+
are otherwise subject to a US export embargo, may not use the Software.
|
|
23
|
+
|
|
24
|
+
Implementation of the Software may require development work, for which you
|
|
25
|
+
are responsible. The Software may contain bugs, errors and
|
|
26
|
+
incompatibilities and is made available on an AS IS basis without support,
|
|
27
|
+
updates, or service level commitments.
|
|
28
|
+
|
|
29
|
+
Salesforce reserves the right at any time to modify, suspend, or
|
|
30
|
+
discontinue, the Software (or any part thereof) with or without notice. You
|
|
31
|
+
agree that Salesforce shall not be liable to you or to any third party for
|
|
32
|
+
any modification, suspension, or discontinuance.
|
|
33
|
+
|
|
34
|
+
You agree to defend Salesforce against any claim, demand, suit or
|
|
35
|
+
proceeding made or brought against Salesforce by a third party arising out
|
|
36
|
+
of or accruing from (a) your use of the Software, and (b) any application
|
|
37
|
+
you develop with the Software that infringes any copyright, trademark,
|
|
38
|
+
trade secret, trade dress, patent, or other intellectual property right of
|
|
39
|
+
any person or defames any person or violates their rights of publicity or
|
|
40
|
+
privacy (each a "Claim Against Salesforce"), and will indemnify Salesforce
|
|
41
|
+
from any damages, attorney fees, and costs finally awarded against
|
|
42
|
+
Salesforce as a result of, or for any amounts paid by Salesforce under a
|
|
43
|
+
settlement approved by you in writing of, a Claim Against Salesforce,
|
|
44
|
+
provided Salesforce (x) promptly gives you written notice of the Claim
|
|
45
|
+
Against Salesforce, (y) gives you sole control of the defense and
|
|
46
|
+
settlement of the Claim Against Salesforce (except that you may not settle
|
|
47
|
+
any Claim Against Salesforce unless it unconditionally releases Salesforce
|
|
48
|
+
of all liability), and (z) gives you all reasonable assistance, at your
|
|
49
|
+
expense.
|
|
50
|
+
|
|
51
|
+
WITHOUT LIMITING THE GENERALITY OF THE FOREGOING, THE SOFTWARE IS NOT
|
|
52
|
+
SUPPORTED AND IS PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
53
|
+
IMPLIED. IN NO EVENT SHALL SALESFORCE HAVE ANY LIABILITY FOR ANY DAMAGES,
|
|
54
|
+
INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, SPECIAL, INCIDENTAL,
|
|
55
|
+
PUNITIVE, OR CONSEQUENTIAL DAMAGES, OR DAMAGES BASED ON LOST PROFITS, DATA,
|
|
56
|
+
OR USE, IN CONNECTION WITH THE SOFTWARE, HOWEVER CAUSED AND WHETHER IN
|
|
57
|
+
CONTRACT, TORT, OR UNDER ANY OTHER THEORY OF LIABILITY, WHETHER OR NOT YOU
|
|
58
|
+
HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
59
|
+
|
|
60
|
+
These Terms of Use shall be governed exclusively by the internal laws of
|
|
61
|
+
the State of California, without regard to its conflicts of laws
|
|
62
|
+
rules. Each party hereby consents to the exclusive jurisdiction of the
|
|
63
|
+
state and federal courts located in San Francisco County, California to
|
|
64
|
+
adjudicate any dispute arising out of or relating to these Terms of Use and
|
|
65
|
+
the download, installation, and/or use of the Software. Except as expressly
|
|
66
|
+
stated herein, these Terms of Use constitute the entire agreement between
|
|
67
|
+
the parties, and supersede all prior and contemporaneous agreements,
|
|
68
|
+
proposals, or representations, written or oral, concerning their subject
|
|
69
|
+
matter. No modification, amendment, or waiver of any provision of these
|
|
70
|
+
Terms of Use shall be effective unless it is by an update to these Terms of
|
|
71
|
+
Use that Salesforce makes available, or is in writing and signed by the
|
|
72
|
+
party against whom the modification, amendment, or waiver is to be
|
|
73
|
+
asserted.
|
|
74
|
+
|
|
75
|
+
Data Privacy: Salesforce may collect, process, and store device,
|
|
76
|
+
system, and other information related to your use of the Software. This
|
|
77
|
+
information includes, but is not limited to, IP address, user metrics, and
|
|
78
|
+
other data ("Usage Data"). Salesforce may use Usage Data for analytics,
|
|
79
|
+
product development, and marketing purposes. You acknowledge that files
|
|
80
|
+
generated in conjunction with the Software may contain sensitive or
|
|
81
|
+
confidential data, and you are solely responsible for anonymizing and
|
|
82
|
+
protecting such data.
|
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2022, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { serializeStructuredKey, StoreKeyMap } from '@luvio/engine';
|
|
8
|
+
|
|
9
|
+
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
|
+
const { keys: ObjectKeys$1, freeze: ObjectFreeze$1, create: ObjectCreate$1 } = Object;
|
|
11
|
+
const { isArray: ArrayIsArray$1 } = Array;
|
|
12
|
+
/**
|
|
13
|
+
* Validates an adapter config is well-formed.
|
|
14
|
+
* @param config The config to validate.
|
|
15
|
+
* @param adapter The adapter validation configuration.
|
|
16
|
+
* @param oneOf The keys the config must contain at least one of.
|
|
17
|
+
* @throws A TypeError if config doesn't satisfy the adapter's config validation.
|
|
18
|
+
*/
|
|
19
|
+
function validateConfig(config, adapter, oneOf) {
|
|
20
|
+
const { displayName } = adapter;
|
|
21
|
+
const { required, optional, unsupported } = adapter.parameters;
|
|
22
|
+
if (config === undefined ||
|
|
23
|
+
required.every(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
|
|
24
|
+
throw new TypeError(`adapter ${displayName} configuration must specify ${required.sort().join(', ')}`);
|
|
25
|
+
}
|
|
26
|
+
if (oneOf && oneOf.some(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
|
|
27
|
+
throw new TypeError(`adapter ${displayName} configuration must specify one of ${oneOf.sort().join(', ')}`);
|
|
28
|
+
}
|
|
29
|
+
if (unsupported !== undefined &&
|
|
30
|
+
unsupported.some(req => ObjectPrototypeHasOwnProperty.call(config, req))) {
|
|
31
|
+
throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
|
|
32
|
+
}
|
|
33
|
+
const supported = required.concat(optional);
|
|
34
|
+
if (ObjectKeys$1(config).some(key => !supported.includes(key))) {
|
|
35
|
+
throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function untrustedIsObject(untrusted) {
|
|
39
|
+
return typeof untrusted === 'object' && untrusted !== null && ArrayIsArray$1(untrusted) === false;
|
|
40
|
+
}
|
|
41
|
+
function areRequiredParametersPresent(config, configPropertyNames) {
|
|
42
|
+
return configPropertyNames.parameters.required.every(req => req in config);
|
|
43
|
+
}
|
|
44
|
+
const snapshotRefreshOptions = {
|
|
45
|
+
overrides: {
|
|
46
|
+
headers: {
|
|
47
|
+
'Cache-Control': 'no-cache',
|
|
48
|
+
},
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const keyPrefix = 'CommunityNavigation';
|
|
52
|
+
|
|
53
|
+
const { freeze: ObjectFreeze, keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
|
|
54
|
+
const { isArray: ArrayIsArray } = Array;
|
|
55
|
+
const { stringify: JSONStringify } = JSON;
|
|
56
|
+
function createLink(ref) {
|
|
57
|
+
return {
|
|
58
|
+
__ref: serializeStructuredKey(ref),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function validate$1(obj, path = 'NavigationMenuItemRepresentation') {
|
|
63
|
+
const v_error = (() => {
|
|
64
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
65
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
66
|
+
}
|
|
67
|
+
const obj_actionType = obj.actionType;
|
|
68
|
+
const path_actionType = path + '.actionType';
|
|
69
|
+
if (typeof obj_actionType !== 'string') {
|
|
70
|
+
return new TypeError('Expected "string" but received "' + typeof obj_actionType + '" (at "' + path_actionType + '")');
|
|
71
|
+
}
|
|
72
|
+
const obj_actionValue = obj.actionValue;
|
|
73
|
+
const path_actionValue = path + '.actionValue';
|
|
74
|
+
let obj_actionValue_union0 = null;
|
|
75
|
+
const obj_actionValue_union0_error = (() => {
|
|
76
|
+
if (typeof obj_actionValue !== 'string') {
|
|
77
|
+
return new TypeError('Expected "string" but received "' + typeof obj_actionValue + '" (at "' + path_actionValue + '")');
|
|
78
|
+
}
|
|
79
|
+
})();
|
|
80
|
+
if (obj_actionValue_union0_error != null) {
|
|
81
|
+
obj_actionValue_union0 = obj_actionValue_union0_error.message;
|
|
82
|
+
}
|
|
83
|
+
let obj_actionValue_union1 = null;
|
|
84
|
+
const obj_actionValue_union1_error = (() => {
|
|
85
|
+
if (obj_actionValue !== null) {
|
|
86
|
+
return new TypeError('Expected "null" but received "' + typeof obj_actionValue + '" (at "' + path_actionValue + '")');
|
|
87
|
+
}
|
|
88
|
+
})();
|
|
89
|
+
if (obj_actionValue_union1_error != null) {
|
|
90
|
+
obj_actionValue_union1 = obj_actionValue_union1_error.message;
|
|
91
|
+
}
|
|
92
|
+
if (obj_actionValue_union0 && obj_actionValue_union1) {
|
|
93
|
+
let message = 'Object doesn\'t match union (at "' + path_actionValue + '")';
|
|
94
|
+
message += '\n' + obj_actionValue_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
95
|
+
message += '\n' + obj_actionValue_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
96
|
+
return new TypeError(message);
|
|
97
|
+
}
|
|
98
|
+
const obj_imageUrl = obj.imageUrl;
|
|
99
|
+
const path_imageUrl = path + '.imageUrl';
|
|
100
|
+
let obj_imageUrl_union0 = null;
|
|
101
|
+
const obj_imageUrl_union0_error = (() => {
|
|
102
|
+
if (typeof obj_imageUrl !== 'string') {
|
|
103
|
+
return new TypeError('Expected "string" but received "' + typeof obj_imageUrl + '" (at "' + path_imageUrl + '")');
|
|
104
|
+
}
|
|
105
|
+
})();
|
|
106
|
+
if (obj_imageUrl_union0_error != null) {
|
|
107
|
+
obj_imageUrl_union0 = obj_imageUrl_union0_error.message;
|
|
108
|
+
}
|
|
109
|
+
let obj_imageUrl_union1 = null;
|
|
110
|
+
const obj_imageUrl_union1_error = (() => {
|
|
111
|
+
if (obj_imageUrl !== null) {
|
|
112
|
+
return new TypeError('Expected "null" but received "' + typeof obj_imageUrl + '" (at "' + path_imageUrl + '")');
|
|
113
|
+
}
|
|
114
|
+
})();
|
|
115
|
+
if (obj_imageUrl_union1_error != null) {
|
|
116
|
+
obj_imageUrl_union1 = obj_imageUrl_union1_error.message;
|
|
117
|
+
}
|
|
118
|
+
if (obj_imageUrl_union0 && obj_imageUrl_union1) {
|
|
119
|
+
let message = 'Object doesn\'t match union (at "' + path_imageUrl + '")';
|
|
120
|
+
message += '\n' + obj_imageUrl_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
121
|
+
message += '\n' + obj_imageUrl_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
122
|
+
return new TypeError(message);
|
|
123
|
+
}
|
|
124
|
+
const obj_label = obj.label;
|
|
125
|
+
const path_label = path + '.label';
|
|
126
|
+
if (typeof obj_label !== 'string') {
|
|
127
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
128
|
+
}
|
|
129
|
+
const obj_subMenu = obj.subMenu;
|
|
130
|
+
const path_subMenu = path + '.subMenu';
|
|
131
|
+
if (!ArrayIsArray(obj_subMenu)) {
|
|
132
|
+
return new TypeError('Expected "array" but received "' + typeof obj_subMenu + '" (at "' + path_subMenu + '")');
|
|
133
|
+
}
|
|
134
|
+
for (let i = 0; i < obj_subMenu.length; i++) {
|
|
135
|
+
const obj_subMenu_item = obj_subMenu[i];
|
|
136
|
+
const path_subMenu_item = path_subMenu + '[' + i + ']';
|
|
137
|
+
const referencepath_subMenu_itemValidationError = validate$1(obj_subMenu_item, path_subMenu_item);
|
|
138
|
+
if (referencepath_subMenu_itemValidationError !== null) {
|
|
139
|
+
let message = 'Object doesn\'t match NavigationMenuItemRepresentation (at "' + path_subMenu_item + '")\n';
|
|
140
|
+
message += referencepath_subMenu_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
141
|
+
return new TypeError(message);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
const obj_target = obj.target;
|
|
145
|
+
const path_target = path + '.target';
|
|
146
|
+
if (typeof obj_target !== 'string') {
|
|
147
|
+
return new TypeError('Expected "string" but received "' + typeof obj_target + '" (at "' + path_target + '")');
|
|
148
|
+
}
|
|
149
|
+
})();
|
|
150
|
+
return v_error === undefined ? null : v_error;
|
|
151
|
+
}
|
|
152
|
+
function deepFreeze$1(input) {
|
|
153
|
+
const input_subMenu = input.subMenu;
|
|
154
|
+
for (let i = 0; i < input_subMenu.length; i++) {
|
|
155
|
+
const input_subMenu_item = input_subMenu[i];
|
|
156
|
+
deepFreeze$1(input_subMenu_item);
|
|
157
|
+
}
|
|
158
|
+
ObjectFreeze(input_subMenu);
|
|
159
|
+
ObjectFreeze(input);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
const VERSION = "2c44fa1cf5686d4e00960baa7b9e6a1f";
|
|
163
|
+
function validate(obj, path = 'NavigationMenuItemCollectionRepresentation') {
|
|
164
|
+
const v_error = (() => {
|
|
165
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
166
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
167
|
+
}
|
|
168
|
+
const obj_menuItems = obj.menuItems;
|
|
169
|
+
const path_menuItems = path + '.menuItems';
|
|
170
|
+
if (!ArrayIsArray(obj_menuItems)) {
|
|
171
|
+
return new TypeError('Expected "array" but received "' + typeof obj_menuItems + '" (at "' + path_menuItems + '")');
|
|
172
|
+
}
|
|
173
|
+
for (let i = 0; i < obj_menuItems.length; i++) {
|
|
174
|
+
const obj_menuItems_item = obj_menuItems[i];
|
|
175
|
+
const path_menuItems_item = path_menuItems + '[' + i + ']';
|
|
176
|
+
const referencepath_menuItems_itemValidationError = validate$1(obj_menuItems_item, path_menuItems_item);
|
|
177
|
+
if (referencepath_menuItems_itemValidationError !== null) {
|
|
178
|
+
let message = 'Object doesn\'t match NavigationMenuItemRepresentation (at "' + path_menuItems_item + '")\n';
|
|
179
|
+
message += referencepath_menuItems_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
180
|
+
return new TypeError(message);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
})();
|
|
184
|
+
return v_error === undefined ? null : v_error;
|
|
185
|
+
}
|
|
186
|
+
const RepresentationType = 'NavigationMenuItemCollectionRepresentation';
|
|
187
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
188
|
+
return input;
|
|
189
|
+
}
|
|
190
|
+
const select$1 = function NavigationMenuItemCollectionRepresentationSelect() {
|
|
191
|
+
return {
|
|
192
|
+
kind: 'Fragment',
|
|
193
|
+
version: VERSION,
|
|
194
|
+
private: [],
|
|
195
|
+
opaque: true
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
function equals(existing, incoming) {
|
|
199
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
200
|
+
return false;
|
|
201
|
+
}
|
|
202
|
+
return true;
|
|
203
|
+
}
|
|
204
|
+
function deepFreeze(input) {
|
|
205
|
+
const input_menuItems = input.menuItems;
|
|
206
|
+
for (let i = 0; i < input_menuItems.length; i++) {
|
|
207
|
+
const input_menuItems_item = input_menuItems[i];
|
|
208
|
+
deepFreeze$1(input_menuItems_item);
|
|
209
|
+
}
|
|
210
|
+
ObjectFreeze(input_menuItems);
|
|
211
|
+
ObjectFreeze(input);
|
|
212
|
+
}
|
|
213
|
+
const ingest = function NavigationMenuItemCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
214
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
215
|
+
const validateError = validate(input);
|
|
216
|
+
if (validateError !== null) {
|
|
217
|
+
throw validateError;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
const key = path.fullPath;
|
|
221
|
+
const existingRecord = store.readEntry(key);
|
|
222
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
|
|
223
|
+
let incomingRecord = normalize(input, store.readEntry(key), {
|
|
224
|
+
fullPath: key,
|
|
225
|
+
parent: path.parent,
|
|
226
|
+
propertyName: path.propertyName,
|
|
227
|
+
ttl: ttlToUse
|
|
228
|
+
});
|
|
229
|
+
deepFreeze(input);
|
|
230
|
+
if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
|
|
231
|
+
luvio.storePublish(key, incomingRecord);
|
|
232
|
+
}
|
|
233
|
+
if (ttlToUse !== undefined) {
|
|
234
|
+
const storeMetadataParams = {
|
|
235
|
+
ttl: ttlToUse,
|
|
236
|
+
namespace: "CommunityNavigation",
|
|
237
|
+
version: VERSION,
|
|
238
|
+
representationName: RepresentationType,
|
|
239
|
+
};
|
|
240
|
+
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
241
|
+
}
|
|
242
|
+
return createLink(key);
|
|
243
|
+
};
|
|
244
|
+
function getTypeCacheKeys(luvio, input, fullPathFactory) {
|
|
245
|
+
const rootKeySet = new StoreKeyMap();
|
|
246
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
247
|
+
const rootKey = fullPathFactory();
|
|
248
|
+
rootKeySet.set(rootKey, {
|
|
249
|
+
namespace: keyPrefix,
|
|
250
|
+
representationName: RepresentationType,
|
|
251
|
+
mergeable: false
|
|
252
|
+
});
|
|
253
|
+
return rootKeySet;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
function select(luvio, params) {
|
|
257
|
+
return select$1();
|
|
258
|
+
}
|
|
259
|
+
function keyBuilder$1(luvio, params) {
|
|
260
|
+
return keyPrefix + '::NavigationMenuItemCollectionRepresentation:(' + 'addHomeMenuItem:' + params.queryParams.addHomeMenuItem + ',' + 'effectiveAccountId:' + params.queryParams.effectiveAccountId + ',' + 'includeImageUrl:' + params.queryParams.includeImageUrl + ',' + 'menuItemTypesToSkip:' + params.queryParams.menuItemTypesToSkip + ',' + 'navigationLinkSetDeveloperName:' + params.queryParams.navigationLinkSetDeveloperName + ',' + 'navigationLinkSetId:' + params.queryParams.navigationLinkSetId + ',' + 'publishStatus:' + params.queryParams.publishStatus + ',' + 'communityId:' + params.urlParams.communityId + ')';
|
|
261
|
+
}
|
|
262
|
+
function getResponseCacheKeys(luvio, resourceParams, response) {
|
|
263
|
+
return getTypeCacheKeys(luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
264
|
+
}
|
|
265
|
+
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
266
|
+
const { body } = response;
|
|
267
|
+
const key = keyBuilder$1(luvio, resourceParams);
|
|
268
|
+
luvio.storeIngest(key, ingest, body);
|
|
269
|
+
const snapshot = luvio.storeLookup({
|
|
270
|
+
recordId: key,
|
|
271
|
+
node: select(),
|
|
272
|
+
variables: {},
|
|
273
|
+
}, snapshotRefresh);
|
|
274
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
275
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
276
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
return snapshot;
|
|
280
|
+
}
|
|
281
|
+
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
282
|
+
const key = keyBuilder$1(luvio, params);
|
|
283
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
284
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
285
|
+
return errorSnapshot;
|
|
286
|
+
}
|
|
287
|
+
function createResourceRequest(config) {
|
|
288
|
+
const headers = {};
|
|
289
|
+
return {
|
|
290
|
+
baseUri: '/services/data/v58.0',
|
|
291
|
+
basePath: '/connect/communities/' + config.urlParams.communityId + '/navigation-menu/navigation-menu-items',
|
|
292
|
+
method: 'get',
|
|
293
|
+
body: null,
|
|
294
|
+
urlParams: config.urlParams,
|
|
295
|
+
queryParams: config.queryParams,
|
|
296
|
+
headers,
|
|
297
|
+
priority: 'normal',
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
const getCommunityNavigationMenu_ConfigPropertyNames = {
|
|
302
|
+
displayName: 'getCommunityNavigationMenu',
|
|
303
|
+
parameters: {
|
|
304
|
+
required: ['communityId'],
|
|
305
|
+
optional: ['addHomeMenuItem', 'effectiveAccountId', 'includeImageUrl', 'menuItemTypesToSkip', 'navigationLinkSetDeveloperName', 'navigationLinkSetId', 'publishStatus']
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
function createResourceParams(config) {
|
|
309
|
+
const resourceParams = {
|
|
310
|
+
urlParams: {
|
|
311
|
+
communityId: config.communityId
|
|
312
|
+
},
|
|
313
|
+
queryParams: {
|
|
314
|
+
addHomeMenuItem: config.addHomeMenuItem, effectiveAccountId: config.effectiveAccountId, includeImageUrl: config.includeImageUrl, menuItemTypesToSkip: config.menuItemTypesToSkip, navigationLinkSetDeveloperName: config.navigationLinkSetDeveloperName, navigationLinkSetId: config.navigationLinkSetId, publishStatus: config.publishStatus
|
|
315
|
+
}
|
|
316
|
+
};
|
|
317
|
+
return resourceParams;
|
|
318
|
+
}
|
|
319
|
+
function keyBuilder(luvio, config) {
|
|
320
|
+
const resourceParams = createResourceParams(config);
|
|
321
|
+
return keyBuilder$1(luvio, resourceParams);
|
|
322
|
+
}
|
|
323
|
+
function typeCheckConfig(untrustedConfig) {
|
|
324
|
+
const config = {};
|
|
325
|
+
const untrustedConfig_communityId = untrustedConfig.communityId;
|
|
326
|
+
if (typeof untrustedConfig_communityId === 'string') {
|
|
327
|
+
config.communityId = untrustedConfig_communityId;
|
|
328
|
+
}
|
|
329
|
+
const untrustedConfig_addHomeMenuItem = untrustedConfig.addHomeMenuItem;
|
|
330
|
+
if (typeof untrustedConfig_addHomeMenuItem === 'boolean') {
|
|
331
|
+
config.addHomeMenuItem = untrustedConfig_addHomeMenuItem;
|
|
332
|
+
}
|
|
333
|
+
const untrustedConfig_effectiveAccountId = untrustedConfig.effectiveAccountId;
|
|
334
|
+
if (typeof untrustedConfig_effectiveAccountId === 'string') {
|
|
335
|
+
config.effectiveAccountId = untrustedConfig_effectiveAccountId;
|
|
336
|
+
}
|
|
337
|
+
const untrustedConfig_includeImageUrl = untrustedConfig.includeImageUrl;
|
|
338
|
+
if (typeof untrustedConfig_includeImageUrl === 'boolean') {
|
|
339
|
+
config.includeImageUrl = untrustedConfig_includeImageUrl;
|
|
340
|
+
}
|
|
341
|
+
const untrustedConfig_menuItemTypesToSkip = untrustedConfig.menuItemTypesToSkip;
|
|
342
|
+
if (ArrayIsArray$1(untrustedConfig_menuItemTypesToSkip)) {
|
|
343
|
+
const untrustedConfig_menuItemTypesToSkip_array = [];
|
|
344
|
+
for (let i = 0, arrayLength = untrustedConfig_menuItemTypesToSkip.length; i < arrayLength; i++) {
|
|
345
|
+
const untrustedConfig_menuItemTypesToSkip_item = untrustedConfig_menuItemTypesToSkip[i];
|
|
346
|
+
if (typeof untrustedConfig_menuItemTypesToSkip_item === 'string') {
|
|
347
|
+
untrustedConfig_menuItemTypesToSkip_array.push(untrustedConfig_menuItemTypesToSkip_item);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
config.menuItemTypesToSkip = untrustedConfig_menuItemTypesToSkip_array;
|
|
351
|
+
}
|
|
352
|
+
const untrustedConfig_navigationLinkSetDeveloperName = untrustedConfig.navigationLinkSetDeveloperName;
|
|
353
|
+
if (typeof untrustedConfig_navigationLinkSetDeveloperName === 'string') {
|
|
354
|
+
config.navigationLinkSetDeveloperName = untrustedConfig_navigationLinkSetDeveloperName;
|
|
355
|
+
}
|
|
356
|
+
const untrustedConfig_navigationLinkSetId = untrustedConfig.navigationLinkSetId;
|
|
357
|
+
if (typeof untrustedConfig_navigationLinkSetId === 'string') {
|
|
358
|
+
config.navigationLinkSetId = untrustedConfig_navigationLinkSetId;
|
|
359
|
+
}
|
|
360
|
+
const untrustedConfig_publishStatus = untrustedConfig.publishStatus;
|
|
361
|
+
if (typeof untrustedConfig_publishStatus === 'string') {
|
|
362
|
+
config.publishStatus = untrustedConfig_publishStatus;
|
|
363
|
+
}
|
|
364
|
+
return config;
|
|
365
|
+
}
|
|
366
|
+
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
367
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
368
|
+
return null;
|
|
369
|
+
}
|
|
370
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
371
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
372
|
+
}
|
|
373
|
+
const config = typeCheckConfig(untrustedConfig);
|
|
374
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
375
|
+
return null;
|
|
376
|
+
}
|
|
377
|
+
return config;
|
|
378
|
+
}
|
|
379
|
+
function adapterFragment(luvio, config) {
|
|
380
|
+
createResourceParams(config);
|
|
381
|
+
return select();
|
|
382
|
+
}
|
|
383
|
+
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
384
|
+
const snapshot = ingestSuccess(luvio, resourceParams, response, {
|
|
385
|
+
config,
|
|
386
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
387
|
+
});
|
|
388
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
389
|
+
}
|
|
390
|
+
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
391
|
+
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
392
|
+
config,
|
|
393
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
394
|
+
});
|
|
395
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
396
|
+
}
|
|
397
|
+
function buildNetworkSnapshot(luvio, config, options) {
|
|
398
|
+
const resourceParams = createResourceParams(config);
|
|
399
|
+
const request = createResourceRequest(resourceParams);
|
|
400
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
401
|
+
.then((response) => {
|
|
402
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => getResponseCacheKeys(luvio, resourceParams, response.body));
|
|
403
|
+
}, (response) => {
|
|
404
|
+
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
408
|
+
const { luvio, config } = context;
|
|
409
|
+
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
410
|
+
const dispatchOptions = {
|
|
411
|
+
resourceRequestContext: {
|
|
412
|
+
requestCorrelator,
|
|
413
|
+
luvioRequestMethod: undefined,
|
|
414
|
+
},
|
|
415
|
+
eventObservers
|
|
416
|
+
};
|
|
417
|
+
if (networkPriority !== 'normal') {
|
|
418
|
+
dispatchOptions.overrides = {
|
|
419
|
+
priority: networkPriority
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
return buildNetworkSnapshot(luvio, config, dispatchOptions);
|
|
423
|
+
}
|
|
424
|
+
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
425
|
+
const { luvio, config } = context;
|
|
426
|
+
const selector = {
|
|
427
|
+
recordId: keyBuilder(luvio, config),
|
|
428
|
+
node: adapterFragment(luvio, config),
|
|
429
|
+
variables: {},
|
|
430
|
+
};
|
|
431
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
432
|
+
config,
|
|
433
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
434
|
+
});
|
|
435
|
+
return cacheSnapshot;
|
|
436
|
+
}
|
|
437
|
+
const getCommunityNavigationMenuAdapterFactory = (luvio) => function CommunityNavigation__getCommunityNavigationMenu(untrustedConfig, requestContext) {
|
|
438
|
+
const config = validateAdapterConfig(untrustedConfig, getCommunityNavigationMenu_ConfigPropertyNames);
|
|
439
|
+
// Invalid or incomplete config
|
|
440
|
+
if (config === null) {
|
|
441
|
+
return null;
|
|
442
|
+
}
|
|
443
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
444
|
+
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
445
|
+
};
|
|
446
|
+
|
|
447
|
+
export { getCommunityNavigationMenuAdapterFactory };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Adapter as $64$luvio_engine_Adapter, Snapshot as $64$luvio_engine_Snapshot, UnfulfilledSnapshot as $64$luvio_engine_UnfulfilledSnapshot } from '@luvio/engine';
|
|
2
|
+
export declare const ObjectPrototypeHasOwnProperty: (v: PropertyKey) => boolean;
|
|
3
|
+
declare const ObjectKeys: {
|
|
4
|
+
(o: object): string[];
|
|
5
|
+
(o: {}): string[];
|
|
6
|
+
}, ObjectFreeze: {
|
|
7
|
+
<T extends Function>(f: T): T;
|
|
8
|
+
<T_1 extends {
|
|
9
|
+
[idx: string]: object | U | null | undefined;
|
|
10
|
+
}, U extends string | number | bigint | boolean | symbol>(o: T_1): Readonly<T_1>;
|
|
11
|
+
<T_2>(o: T_2): Readonly<T_2>;
|
|
12
|
+
}, ObjectCreate: {
|
|
13
|
+
(o: object | null): any;
|
|
14
|
+
(o: object | null, properties: PropertyDescriptorMap & ThisType<any>): any;
|
|
15
|
+
};
|
|
16
|
+
export { ObjectFreeze, ObjectCreate, ObjectKeys };
|
|
17
|
+
export declare const ArrayIsArray: (arg: any) => arg is any[];
|
|
18
|
+
export declare const ArrayPrototypePush: (...items: any[]) => number;
|
|
19
|
+
export interface AdapterValidationConfig {
|
|
20
|
+
displayName: string;
|
|
21
|
+
parameters: {
|
|
22
|
+
required: string[];
|
|
23
|
+
optional: string[];
|
|
24
|
+
unsupported?: string[];
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Validates an adapter config is well-formed.
|
|
29
|
+
* @param config The config to validate.
|
|
30
|
+
* @param adapter The adapter validation configuration.
|
|
31
|
+
* @param oneOf The keys the config must contain at least one of.
|
|
32
|
+
* @throws A TypeError if config doesn't satisfy the adapter's config validation.
|
|
33
|
+
*/
|
|
34
|
+
export declare function validateConfig<T>(config: Untrusted<T>, adapter: AdapterValidationConfig, oneOf?: string[]): void;
|
|
35
|
+
export declare function untrustedIsObject<Base>(untrusted: unknown): untrusted is Untrusted<Base>;
|
|
36
|
+
export type UncoercedConfiguration<Base, Options extends {
|
|
37
|
+
[key in keyof Base]?: any;
|
|
38
|
+
}> = {
|
|
39
|
+
[Key in keyof Base]?: Base[Key] | Options[Key];
|
|
40
|
+
};
|
|
41
|
+
export type Untrusted<Base> = Partial<Base>;
|
|
42
|
+
export declare function areRequiredParametersPresent<T>(config: any, configPropertyNames: AdapterValidationConfig): config is T;
|
|
43
|
+
export declare function refreshable<C, D, R>(adapter: $64$luvio_engine_Adapter<C, D>, resolve: (config: unknown) => Promise<$64$luvio_engine_Snapshot<R>>): $64$luvio_engine_Adapter<C, D>;
|
|
44
|
+
export declare const SNAPSHOT_STATE_FULFILLED = "Fulfilled";
|
|
45
|
+
export declare const SNAPSHOT_STATE_UNFULFILLED = "Unfulfilled";
|
|
46
|
+
export declare const snapshotRefreshOptions: {
|
|
47
|
+
overrides: {
|
|
48
|
+
headers: {
|
|
49
|
+
'Cache-Control': string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* A deterministic JSON stringify implementation. Heavily adapted from https://github.com/epoberezkin/fast-json-stable-stringify.
|
|
55
|
+
* This is needed because insertion order for JSON.stringify(object) affects output:
|
|
56
|
+
* JSON.stringify({a: 1, b: 2})
|
|
57
|
+
* "{"a":1,"b":2}"
|
|
58
|
+
* JSON.stringify({b: 2, a: 1})
|
|
59
|
+
* "{"b":2,"a":1}"
|
|
60
|
+
* @param data Data to be JSON-stringified.
|
|
61
|
+
* @returns JSON.stringified value with consistent ordering of keys.
|
|
62
|
+
*/
|
|
63
|
+
export declare function stableJSONStringify(node: any): string | undefined;
|
|
64
|
+
export declare function getFetchResponseStatusText(status: number): string;
|
|
65
|
+
export declare function isUnfulfilledSnapshot<T, U>(snapshot: $64$luvio_engine_Snapshot<T, U>): snapshot is $64$luvio_engine_UnfulfilledSnapshot<T, U>;
|
|
66
|
+
export declare const keyPrefix = "CommunityNavigation";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig, Untrusted as adapter$45$utils_Untrusted } from './adapter-utils';
|
|
2
|
+
import { ResourceRequestConfig as resources_getConnectCommunitiesNavigationMenuNavigationMenuItemsByCommunityId_ResourceRequestConfig } from '../resources/getConnectCommunitiesNavigationMenuNavigationMenuItemsByCommunityId';
|
|
3
|
+
import { Luvio as $64$luvio_engine_Luvio, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Fragment as $64$luvio_engine_Fragment, Snapshot as $64$luvio_engine_Snapshot, FetchResponse as $64$luvio_engine_FetchResponse, ErrorResponse as $64$luvio_engine_ErrorResponse, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, CoercedAdapterRequestContext as $64$luvio_engine_CoercedAdapterRequestContext, StoreLookup as $64$luvio_engine_StoreLookup, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
|
|
4
|
+
import { NavigationMenuItemCollectionRepresentation as types_NavigationMenuItemCollectionRepresentation_NavigationMenuItemCollectionRepresentation } from '../types/NavigationMenuItemCollectionRepresentation';
|
|
5
|
+
export declare const adapterName = "getCommunityNavigationMenu";
|
|
6
|
+
export declare const getCommunityNavigationMenu_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
|
|
7
|
+
export interface GetCommunityNavigationMenuConfig {
|
|
8
|
+
communityId: string;
|
|
9
|
+
addHomeMenuItem?: boolean;
|
|
10
|
+
effectiveAccountId?: string;
|
|
11
|
+
includeImageUrl?: boolean;
|
|
12
|
+
menuItemTypesToSkip?: Array<string>;
|
|
13
|
+
navigationLinkSetDeveloperName?: string;
|
|
14
|
+
navigationLinkSetId?: string;
|
|
15
|
+
publishStatus?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function createResourceParams(config: GetCommunityNavigationMenuConfig): resources_getConnectCommunitiesNavigationMenuNavigationMenuItemsByCommunityId_ResourceRequestConfig;
|
|
18
|
+
export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, config: GetCommunityNavigationMenuConfig): string;
|
|
19
|
+
export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, config: GetCommunityNavigationMenuConfig): $64$luvio_engine_NormalizedKeyMetadata;
|
|
20
|
+
export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<GetCommunityNavigationMenuConfig>): adapter$45$utils_Untrusted<GetCommunityNavigationMenuConfig>;
|
|
21
|
+
export declare function validateAdapterConfig(untrustedConfig: unknown, configPropertyNames: adapter$45$utils_AdapterValidationConfig): GetCommunityNavigationMenuConfig | null;
|
|
22
|
+
export declare function adapterFragment(luvio: $64$luvio_engine_Luvio, config: GetCommunityNavigationMenuConfig): $64$luvio_engine_Fragment;
|
|
23
|
+
export declare function buildCachedSnapshot(luvio: $64$luvio_engine_Luvio, config: GetCommunityNavigationMenuConfig): $64$luvio_engine_Snapshot<types_NavigationMenuItemCollectionRepresentation_NavigationMenuItemCollectionRepresentation, any>;
|
|
24
|
+
export declare function onFetchResponseSuccess(luvio: $64$luvio_engine_Luvio, config: GetCommunityNavigationMenuConfig, resourceParams: resources_getConnectCommunitiesNavigationMenuNavigationMenuItemsByCommunityId_ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_NavigationMenuItemCollectionRepresentation_NavigationMenuItemCollectionRepresentation>): Promise<import("@luvio/engine").PendingSnapshot<types_NavigationMenuItemCollectionRepresentation_NavigationMenuItemCollectionRepresentation, any> | import("@luvio/engine").FulfilledSnapshot<types_NavigationMenuItemCollectionRepresentation_NavigationMenuItemCollectionRepresentation, {}> | import("@luvio/engine").StaleSnapshot<types_NavigationMenuItemCollectionRepresentation_NavigationMenuItemCollectionRepresentation, {}>>;
|
|
25
|
+
export declare function onFetchResponseError(luvio: $64$luvio_engine_Luvio, config: GetCommunityNavigationMenuConfig, resourceParams: resources_getConnectCommunitiesNavigationMenuNavigationMenuItemsByCommunityId_ResourceRequestConfig, response: $64$luvio_engine_ErrorResponse): Promise<import("@luvio/engine").ErrorSnapshot>;
|
|
26
|
+
export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: GetCommunityNavigationMenuConfig, options?: $64$luvio_engine_DispatchResourceRequestContext): Promise<$64$luvio_engine_Snapshot<types_NavigationMenuItemCollectionRepresentation_NavigationMenuItemCollectionRepresentation, any>>;
|
|
27
|
+
export type BuildSnapshotContext = {
|
|
28
|
+
luvio: $64$luvio_engine_Luvio;
|
|
29
|
+
config: GetCommunityNavigationMenuConfig;
|
|
30
|
+
};
|
|
31
|
+
export declare function buildNetworkSnapshotCachePolicy(context: BuildSnapshotContext, coercedAdapterRequestContext: $64$luvio_engine_CoercedAdapterRequestContext): Promise<$64$luvio_engine_Snapshot<types_NavigationMenuItemCollectionRepresentation_NavigationMenuItemCollectionRepresentation, any>>;
|
|
32
|
+
export declare function buildCachedSnapshotCachePolicy(context: BuildSnapshotContext, storeLookup: $64$luvio_engine_StoreLookup<types_NavigationMenuItemCollectionRepresentation_NavigationMenuItemCollectionRepresentation>): $64$luvio_engine_Snapshot<types_NavigationMenuItemCollectionRepresentation_NavigationMenuItemCollectionRepresentation, any>;
|
|
33
|
+
export declare const getCommunityNavigationMenuAdapterFactory: $64$luvio_engine_AdapterFactory<GetCommunityNavigationMenuConfig, types_NavigationMenuItemCollectionRepresentation_NavigationMenuItemCollectionRepresentation>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getCommunityNavigationMenuAdapterFactory } from '../adapters/getCommunityNavigationMenu';
|