@adobe/exc-app 1.2.10 → 1.3.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.
- package/.eslintrc.js +18 -3
- package/RuntimeConfiguration.d.ts +16 -0
- package/appapi.d.ts +4 -0
- package/appapi.js +4 -0
- package/appapi.js.map +1 -1
- package/build/preBuild.js +3 -1
- package/cache.js +1 -1
- package/cache.js.map +1 -1
- package/capabilityapi.d.ts +4 -0
- package/capabilityapi.js +4 -0
- package/capabilityapi.js.map +1 -1
- package/docs/interfaces/network.graphqlquery.md +4 -4
- package/docs/interfaces/network.networkapi.md +7 -7
- package/docs/interfaces/network.querydefinition.md +4 -4
- package/docs/interfaces/network.queryrequest.md +3 -3
- package/docs/interfaces/topbar.topbarapi.md +10 -2
- package/docs/interfaces/topbar.topbarapiproperties.md +26 -3
- package/docs/modules/network.md +10 -10
- package/featureflags.d.ts +20 -3
- package/featureflags.js +13 -0
- package/featureflags.js.map +1 -1
- package/metrics/Configuration.d.ts +1 -1
- package/network.d.ts +65 -30
- package/network.js +12 -8
- package/network.js.map +1 -1
- package/package.json +10 -9
- package/page.d.ts +10 -0
- package/page.js +12 -1
- package/page.js.map +1 -1
- package/sidenav.d.ts +8 -0
- package/sidenav.js.map +1 -1
- package/tests/appapi.test.js +4 -4
- package/tests/appapi.test.js.map +1 -1
- package/tests/capabilityapi.test.js +6 -6
- package/tests/capabilityapi.test.js.map +1 -1
- package/tests/featureflags.test.js +18 -0
- package/tests/featureflags.test.js.map +1 -1
- package/tests/network.test.js +10 -0
- package/tests/network.test.js.map +1 -1
- package/topbar.d.ts +46 -2
- package/topbar.js +19 -0
- package/topbar.js.map +1 -1
- package/user.d.ts +3 -1
- package/user.js.map +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
package/network.d.ts
CHANGED
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
* const queryResponse = await query({
|
|
35
35
|
* data: {
|
|
36
36
|
* query: `
|
|
37
|
-
* query
|
|
38
|
-
*
|
|
37
|
+
* query PPSQuery($userId: String!, $apiKey: String!) {
|
|
38
|
+
* getPPSProfile(userId: $userId, apiKey: $apiKey) {
|
|
39
39
|
* images
|
|
40
40
|
* }
|
|
41
41
|
* }`,
|
|
@@ -44,14 +44,14 @@
|
|
|
44
44
|
* userId: '123@AdobeID'
|
|
45
45
|
* }
|
|
46
46
|
* },
|
|
47
|
-
* operationName: '
|
|
47
|
+
* operationName: 'PPSAvatar'
|
|
48
48
|
* });
|
|
49
49
|
*
|
|
50
50
|
* ```
|
|
51
51
|
* @packageDocumentation
|
|
52
52
|
* @module network
|
|
53
53
|
*/
|
|
54
|
-
import type { ApolloClient, ApolloLink,
|
|
54
|
+
import type { ApolloClient, ApolloClientOptions, ApolloLink, HttpLink, InMemoryCacheConfig, NormalizedCacheObject } from '@apollo/client';
|
|
55
55
|
import { CacheEntry } from './cache';
|
|
56
56
|
import type { gql } from 'graphql-tag';
|
|
57
57
|
/**
|
|
@@ -69,6 +69,11 @@ export interface FetchOptions {
|
|
|
69
69
|
*/
|
|
70
70
|
maxRetries?: number;
|
|
71
71
|
metadata?: DefaultMetaData;
|
|
72
|
+
/**
|
|
73
|
+
* Add a unique request UUID (x-request-id header)
|
|
74
|
+
* Set this to the request ID to be used, or 'auto' for generating one automatically.
|
|
75
|
+
*/
|
|
76
|
+
requestId?: string;
|
|
72
77
|
/**
|
|
73
78
|
* HTTP Status Codes which will prompt a retry. If not provided only network failures
|
|
74
79
|
* will prompt a retry.
|
|
@@ -181,16 +186,16 @@ export interface GraphQLQuery {
|
|
|
181
186
|
*
|
|
182
187
|
* ```typescript
|
|
183
188
|
* {query: `
|
|
184
|
-
* query
|
|
185
|
-
*
|
|
189
|
+
* query PPSQuery($userId: String!, $apiKey: String!) {
|
|
190
|
+
* getPPSProfile(userId: $userId, apiKey: $apiKey) {
|
|
186
191
|
* images
|
|
187
192
|
* }
|
|
188
193
|
* }`
|
|
189
194
|
* };
|
|
190
195
|
*
|
|
191
196
|
* {query: `
|
|
192
|
-
* query
|
|
193
|
-
*
|
|
197
|
+
* query PPSQuery {
|
|
198
|
+
* getPPSProfile(userId: "123@AdobeID", apiKey: "test-app") {
|
|
194
199
|
* images
|
|
195
200
|
* }
|
|
196
201
|
* }`
|
|
@@ -213,6 +218,20 @@ export interface GraphQLQuery {
|
|
|
213
218
|
*/
|
|
214
219
|
variables?: Record<string, any>;
|
|
215
220
|
}
|
|
221
|
+
export interface ExtendedGraphQLQuery extends GraphQLQuery {
|
|
222
|
+
extensions?: {
|
|
223
|
+
clientContext?: {
|
|
224
|
+
applicationId?: string;
|
|
225
|
+
deviceId?: string;
|
|
226
|
+
groupId?: string;
|
|
227
|
+
historyId?: string;
|
|
228
|
+
instanceId?: string;
|
|
229
|
+
sessionId?: string;
|
|
230
|
+
userId?: string;
|
|
231
|
+
windowId?: string;
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
}
|
|
216
235
|
/**
|
|
217
236
|
* SPA's can pass in the metadata to override the default values
|
|
218
237
|
*/
|
|
@@ -280,8 +299,8 @@ export interface QueryRequest {
|
|
|
280
299
|
* ```typescript
|
|
281
300
|
* {data: {
|
|
282
301
|
* query: `
|
|
283
|
-
* query
|
|
284
|
-
*
|
|
302
|
+
* query PPSQuery($userId: String!, $apiKey: String!) {
|
|
303
|
+
* getPPSProfile(userId: $userId, apiKey: $apiKey) {
|
|
285
304
|
* images
|
|
286
305
|
* }
|
|
287
306
|
* }`,
|
|
@@ -298,6 +317,10 @@ export interface QueryRequest {
|
|
|
298
317
|
* Use for external GraphQL endpoint only.
|
|
299
318
|
*/
|
|
300
319
|
endpoint?: string;
|
|
320
|
+
/**
|
|
321
|
+
* GQL Extensions.
|
|
322
|
+
*/
|
|
323
|
+
extensions?: Record<string, any>;
|
|
301
324
|
/**
|
|
302
325
|
* Number indicating how many fetch attempts should be made using exponential backoff.
|
|
303
326
|
*/
|
|
@@ -315,7 +338,7 @@ export interface QueryRequest {
|
|
|
315
338
|
* ***Example:***
|
|
316
339
|
*
|
|
317
340
|
* ```typescript
|
|
318
|
-
* {operationName: '
|
|
341
|
+
* {operationName: 'PPSAvatar'}
|
|
319
342
|
* ```
|
|
320
343
|
*/
|
|
321
344
|
operationName?: string;
|
|
@@ -395,7 +418,7 @@ export declare enum FetchScope {
|
|
|
395
418
|
* `{method: 'GET'}`
|
|
396
419
|
*/
|
|
397
420
|
export type FetchInit = RequestInit & FetchOptions;
|
|
398
|
-
export interface
|
|
421
|
+
export interface ApolloClientLegacyOptions {
|
|
399
422
|
cacheOptions?: InMemoryCacheConfig;
|
|
400
423
|
connectToDevTools?: boolean;
|
|
401
424
|
endpoint?: string;
|
|
@@ -403,6 +426,16 @@ export interface ApolloClientOptions {
|
|
|
403
426
|
routing?: ROUTING;
|
|
404
427
|
xql?: boolean;
|
|
405
428
|
}
|
|
429
|
+
export interface CreateApolloClientOptions<TCacheShape> extends ApolloClientOptions<TCacheShape> {
|
|
430
|
+
endpoint?: string;
|
|
431
|
+
routing?: ROUTING;
|
|
432
|
+
xql?: boolean;
|
|
433
|
+
}
|
|
434
|
+
export interface ApolloClientV3Classes {
|
|
435
|
+
ApolloClient: typeof ApolloClient;
|
|
436
|
+
ApolloLink: typeof ApolloLink;
|
|
437
|
+
HttpLink: typeof HttpLink;
|
|
438
|
+
}
|
|
406
439
|
export interface NetworkApi {
|
|
407
440
|
/**
|
|
408
441
|
* Provides an interface for fetching resources powered by the global 'fetch' API.
|
|
@@ -449,23 +482,23 @@ export interface NetworkApi {
|
|
|
449
482
|
* ***Example:***
|
|
450
483
|
*
|
|
451
484
|
* ```typescript
|
|
452
|
-
* const
|
|
453
|
-
* query
|
|
454
|
-
*
|
|
485
|
+
* const PPS_QUERY = `
|
|
486
|
+
* query PPSQuery($userId: String!, $apiKey: String!) {
|
|
487
|
+
* getPPSProfile(userId: $userId, apiKey: $apiKey) {
|
|
455
488
|
* images
|
|
456
489
|
* }
|
|
457
490
|
* }`;
|
|
458
491
|
*
|
|
459
492
|
* // queries the respective resource via GraphQL and returns HTTP Response {ok: true, status: 200, ...}
|
|
460
|
-
* query({data: {query:
|
|
493
|
+
* query({data: {query: PPS_QUERY, variables: {
|
|
461
494
|
* userId: '123@AdobeID',
|
|
462
495
|
* apiKey: 'test-app',
|
|
463
|
-
* }}, operationName: '
|
|
496
|
+
* }}, operationName: 'PPSAvatar'});
|
|
464
497
|
*
|
|
465
498
|
* // queries the respective resource via GraphQL and returns HTTP Response {ok: true, status: 200, ...}
|
|
466
499
|
* query({data: {query: `
|
|
467
|
-
* query
|
|
468
|
-
*
|
|
500
|
+
* query PPSQuery {
|
|
501
|
+
* getPPSProfile(userId: "123@AdobeID", apiKey: "test-app") {
|
|
469
502
|
* images
|
|
470
503
|
* }
|
|
471
504
|
* }`
|
|
@@ -496,10 +529,11 @@ export interface NetworkApi {
|
|
|
496
529
|
* @returns GraphQL query response
|
|
497
530
|
*
|
|
498
531
|
*/
|
|
499
|
-
getApolloClient(options?:
|
|
500
|
-
apolloClient: ApolloClient<
|
|
532
|
+
getApolloClient(options?: ApolloClientLegacyOptions): Promise<{
|
|
533
|
+
apolloClient: ApolloClient<NormalizedCacheObject>;
|
|
501
534
|
gql: typeof gql;
|
|
502
535
|
}>;
|
|
536
|
+
createApolloClient<TCacheShape>(apolloClientProvided: ApolloClientV3Classes, options?: CreateApolloClientOptions<TCacheShape>): Promise<ApolloClient<TCacheShape>>;
|
|
503
537
|
}
|
|
504
538
|
/**
|
|
505
539
|
* Provides an interface for fetching resources powered by the global 'fetch' API.
|
|
@@ -545,23 +579,23 @@ export declare function getPrefetched<T>(key: string, options?: PrefetchOptions)
|
|
|
545
579
|
* ***Example:***
|
|
546
580
|
*
|
|
547
581
|
* ```typescript
|
|
548
|
-
* const
|
|
549
|
-
* query
|
|
550
|
-
*
|
|
582
|
+
* const PPS_QUERY = `
|
|
583
|
+
* query PPSQuery($userId: String!, $apiKey: String!) {
|
|
584
|
+
* getPPSProfile(userId: $userId, apiKey: $apiKey) {
|
|
551
585
|
* images
|
|
552
586
|
* }
|
|
553
587
|
* }`;
|
|
554
588
|
*
|
|
555
589
|
* // queries the respective resource via GraphQL and returns HTTP Response {ok: true, status: 200, ...}
|
|
556
|
-
* query({data: {query:
|
|
590
|
+
* query({data: {query: PPS_QUERY, variables: {
|
|
557
591
|
* userId: '123@AdobeID',
|
|
558
592
|
* apiKey: 'test-app',
|
|
559
|
-
* }}, operationName: '
|
|
593
|
+
* }}, operationName: 'PPSAvatar'});
|
|
560
594
|
*
|
|
561
595
|
* // queries the respective resource via GraphQL and returns HTTP Response {ok: true, status: 200, ...}
|
|
562
596
|
* query({data: {query: `
|
|
563
|
-
* query
|
|
564
|
-
*
|
|
597
|
+
* query PPSQuery {
|
|
598
|
+
* getPPSProfile(userId: "123@AdobeID", apiKey: "test-app") {
|
|
565
599
|
* images
|
|
566
600
|
* }
|
|
567
601
|
* }`
|
|
@@ -591,8 +625,9 @@ export declare function query(input: QueryRequest): Promise<Response>;
|
|
|
591
625
|
* @returns GraphQL query response
|
|
592
626
|
*
|
|
593
627
|
*/
|
|
594
|
-
export declare function getApolloClient(options?:
|
|
595
|
-
apolloClient: ApolloClient<
|
|
628
|
+
export declare function getApolloClient(options?: ApolloClientLegacyOptions): Promise<{
|
|
629
|
+
apolloClient: ApolloClient<NormalizedCacheObject>;
|
|
596
630
|
gql: typeof gql;
|
|
597
631
|
}>;
|
|
632
|
+
export declare function createApolloClient<TCacheShape>(apolloClientProvided: ApolloClientV3Classes, options?: CreateApolloClientOptions<TCacheShape>): Promise<ApolloClient<TCacheShape>>;
|
|
598
633
|
export {};
|
package/network.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* written permission of Adobe.
|
|
11
11
|
**************************************************************************/
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.getApolloClient = exports.query = exports.getPrefetched = exports.fetch = exports.FetchScope = exports.ROUTING = exports.DEFAULT_STATUS_CODES_TO_RETRY = void 0;
|
|
13
|
+
exports.createApolloClient = exports.getApolloClient = exports.query = exports.getPrefetched = exports.fetch = exports.FetchScope = exports.ROUTING = exports.DEFAULT_STATUS_CODES_TO_RETRY = void 0;
|
|
14
14
|
const Global_1 = require("./src/Global");
|
|
15
15
|
/**
|
|
16
16
|
* Default status codes which imply a transient error and can be retried.
|
|
@@ -123,23 +123,23 @@ exports.getPrefetched = getPrefetched;
|
|
|
123
123
|
* ***Example:***
|
|
124
124
|
*
|
|
125
125
|
* ```typescript
|
|
126
|
-
* const
|
|
127
|
-
* query
|
|
128
|
-
*
|
|
126
|
+
* const PPS_QUERY = `
|
|
127
|
+
* query PPSQuery($userId: String!, $apiKey: String!) {
|
|
128
|
+
* getPPSProfile(userId: $userId, apiKey: $apiKey) {
|
|
129
129
|
* images
|
|
130
130
|
* }
|
|
131
131
|
* }`;
|
|
132
132
|
*
|
|
133
133
|
* // queries the respective resource via GraphQL and returns HTTP Response {ok: true, status: 200, ...}
|
|
134
|
-
* query({data: {query:
|
|
134
|
+
* query({data: {query: PPS_QUERY, variables: {
|
|
135
135
|
* userId: '123@AdobeID',
|
|
136
136
|
* apiKey: 'test-app',
|
|
137
|
-
* }}, operationName: '
|
|
137
|
+
* }}, operationName: 'PPSAvatar'});
|
|
138
138
|
*
|
|
139
139
|
* // queries the respective resource via GraphQL and returns HTTP Response {ok: true, status: 200, ...}
|
|
140
140
|
* query({data: {query: `
|
|
141
|
-
* query
|
|
142
|
-
*
|
|
141
|
+
* query PPSQuery {
|
|
142
|
+
* getPPSProfile(userId: "123@AdobeID", apiKey: "test-app") {
|
|
143
143
|
* images
|
|
144
144
|
* }
|
|
145
145
|
* }`
|
|
@@ -176,4 +176,8 @@ function getApolloClient(options) {
|
|
|
176
176
|
return (0, Global_1.getImpl)('network').getApolloClient(options);
|
|
177
177
|
}
|
|
178
178
|
exports.getApolloClient = getApolloClient;
|
|
179
|
+
function createApolloClient(apolloClientProvided, options) {
|
|
180
|
+
return (0, Global_1.getImpl)('network').createApolloClient(apolloClientProvided, options);
|
|
181
|
+
}
|
|
182
|
+
exports.createApolloClient = createApolloClient;
|
|
179
183
|
//# sourceMappingURL=network.js.map
|
package/network.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network.js","sourceRoot":"","sources":["network.ts"],"names":[],"mappings":";AAAA;;;;;;;;;4EAS4E;;;
|
|
1
|
+
{"version":3,"file":"network.js","sourceRoot":"","sources":["network.ts"],"names":[],"mappings":";AAAA;;;;;;;;;4EAS4E;;;AAuD5E,yCAAqC;AAGrC;;GAEG;AACU,QAAA,6BAA6B,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAsNlE,IAAY,OAaX;AAbD,WAAY,OAAO;IACjB;;OAEG;IACH,+DAAiB,CAAA;IACjB;;OAEG;IACH,2CAAO,CAAA;IACP;;OAEG;IACH,yEAAsB,CAAA;AACxB,CAAC,EAbW,OAAO,GAAP,eAAO,KAAP,eAAO,QAalB;AA6FD;;GAEG;AACH,IAAY,UAqCX;AArCD,WAAY,UAAU;IACpB;;;OAGG;IACH,2BAAa,CAAA;IACb;;;;OAIG;IACH,2BAAa,CAAA;IACb;;;;;OAKG;IACH,yBAAW,CAAA;IACX;;;;;;OAMG;IACH,iCAAmB,CAAA;IACnB;;;;;;;;OAQG;IACH,2CAA6B,CAAA;AAC/B,CAAC,EArCW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAqCrB;AA8ID;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,SAAgB,KAAK,CAAC,KAAkB,EAAE,IAAgB;IACxD,OAAO,IAAA,gBAAO,EAAC,SAAS,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AAC/C,CAAC;AAFD,sBAEC;AAED;;;;;;;;;GASG;AACH,SAAgB,aAAa,CAAI,GAAW,EAAE,OAAyB;IACrE,OAAO,IAAA,gBAAO,EAAC,SAAS,CAAC,CAAC,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AACxD,CAAC;AAFD,sCAEC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,SAAgB,KAAK,CAAC,KAAmB;IACvC,OAAO,IAAA,gBAAO,EAAC,SAAS,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AACzC,CAAC;AAFD,sBAEC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAgB,eAAe,CAC7B,OAAmC;IAKnC,OAAO,IAAA,gBAAO,EAAC,SAAS,CAAC,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;AACrD,CAAC;AAPD,0CAOC;AAED,SAAgB,kBAAkB,CAChC,oBAA2C,EAC3C,OAAgD;IAEhD,OAAO,IAAA,gBAAO,EAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;AAC9E,CAAC;AALD,gDAKC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/exc-app",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"source": "index.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -24,19 +24,20 @@
|
|
|
24
24
|
"publishConfig": {
|
|
25
25
|
"registry": "https://registry.npmjs.com/"
|
|
26
26
|
},
|
|
27
|
-
"
|
|
28
|
-
"@apollo/client": "3.
|
|
29
|
-
"graphql": "
|
|
30
|
-
"graphql-tag": "2.12.6"
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"@apollo/client": "^3.8.9",
|
|
29
|
+
"graphql-tag": "^2.12.6"
|
|
31
30
|
},
|
|
32
31
|
"devDependencies": {
|
|
32
|
+
"@apollo/client": "3.8.9",
|
|
33
33
|
"cross-env": "7.0.3",
|
|
34
|
-
"eslint": "8.
|
|
34
|
+
"eslint": "8.54.0",
|
|
35
35
|
"eslint-plugin-header": "3.1.1",
|
|
36
|
-
"eslint-plugin-jsdoc": "
|
|
37
|
-
"eslint-plugin-prettier": "4.
|
|
38
|
-
"eslint-plugin-rulesdir": "0.2.
|
|
36
|
+
"eslint-plugin-jsdoc": "46.9.0",
|
|
37
|
+
"eslint-plugin-prettier": "4.2.1",
|
|
38
|
+
"eslint-plugin-rulesdir": "0.2.2",
|
|
39
39
|
"glob": "8.0.3",
|
|
40
|
+
"graphql-tag": "2.12.6",
|
|
40
41
|
"jest": "26.6.3",
|
|
41
42
|
"typedoc": "0.19.2",
|
|
42
43
|
"typedoc-plugin-external-module-name": "4.0.6",
|
package/page.d.ts
CHANGED
|
@@ -221,6 +221,16 @@ export declare enum ObservableType {
|
|
|
221
221
|
MODAL = "MODAL",
|
|
222
222
|
POPOVER = "POPOVER"
|
|
223
223
|
}
|
|
224
|
+
/**
|
|
225
|
+
* Solution's release type in the product lifecycle
|
|
226
|
+
*/
|
|
227
|
+
export declare enum RELEASE_TYPE {
|
|
228
|
+
POC = "poc",
|
|
229
|
+
DEV = "dev",
|
|
230
|
+
ALPHA = "alpha",
|
|
231
|
+
BETA = "beta",
|
|
232
|
+
GA = "ga"
|
|
233
|
+
}
|
|
224
234
|
/**
|
|
225
235
|
* @deprecated Solution's list of multiple subdomains
|
|
226
236
|
*/
|
package/page.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* written permission of Adobe.
|
|
11
11
|
**************************************************************************/
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.THUNDERBIRD = exports.SRC_DOC = exports.ObservableType = void 0;
|
|
13
|
+
exports.THUNDERBIRD = exports.SRC_DOC = exports.RELEASE_TYPE = exports.ObservableType = void 0;
|
|
14
14
|
/**
|
|
15
15
|
* APIs that let solutions interact with the main page and personalize it, e.g. setting the title,
|
|
16
16
|
* favicon, refreshing the solution iframe, etc.
|
|
@@ -55,6 +55,17 @@ var ObservableType;
|
|
|
55
55
|
ObservableType["MODAL"] = "MODAL";
|
|
56
56
|
ObservableType["POPOVER"] = "POPOVER";
|
|
57
57
|
})(ObservableType = exports.ObservableType || (exports.ObservableType = {}));
|
|
58
|
+
/**
|
|
59
|
+
* Solution's release type in the product lifecycle
|
|
60
|
+
*/
|
|
61
|
+
var RELEASE_TYPE;
|
|
62
|
+
(function (RELEASE_TYPE) {
|
|
63
|
+
RELEASE_TYPE["POC"] = "poc";
|
|
64
|
+
RELEASE_TYPE["DEV"] = "dev";
|
|
65
|
+
RELEASE_TYPE["ALPHA"] = "alpha";
|
|
66
|
+
RELEASE_TYPE["BETA"] = "beta";
|
|
67
|
+
RELEASE_TYPE["GA"] = "ga";
|
|
68
|
+
})(RELEASE_TYPE = exports.RELEASE_TYPE || (exports.RELEASE_TYPE = {}));
|
|
58
69
|
/**
|
|
59
70
|
* @deprecated Solution's list of multiple subdomains
|
|
60
71
|
*/
|
package/page.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.js","sourceRoot":"","sources":["page.ts"],"names":[],"mappings":";AAAA;;;;;;;;;4EAS4E;;;AAE5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,yCAAqC;AA+NrC,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,qCAAmB,CAAA;AACrB,CAAC,EAHW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAGzB;AAED;;GAEG;AACH,IAAY,OAIX;AAJD,WAAY,OAAO;IACjB,6CAAQ,CAAA;IACR,qCAAI,CAAA;IACJ,6CAAQ,CAAA,CAAA,6DAA6D;AACvE,CAAC,EAJW,OAAO,GAAP,eAAO,KAAP,eAAO,QAIlB;AAED,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,2CAAG,CAAA;IACH,mDAAO,CAAA;IACP,iEAAc,CAAA;AAChB,CAAC,EAJW,WAAW,GAAX,mBAAW,KAAX,mBAAW,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/sidenav.d.ts
CHANGED
|
@@ -100,10 +100,18 @@ export interface NavItem {
|
|
|
100
100
|
* Whether the path is absolute or relative to the base path.
|
|
101
101
|
*/
|
|
102
102
|
absolutePath?: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Nested nav items.
|
|
105
|
+
*/
|
|
106
|
+
children?: NavItem[];
|
|
103
107
|
/**
|
|
104
108
|
* Whether or not to disable the nav item.
|
|
105
109
|
*/
|
|
106
110
|
disabled?: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* A string icon (from @react/react-spectrum/Icon) to be shown on the left side of the nav item.
|
|
113
|
+
*/
|
|
114
|
+
icon?: string;
|
|
107
115
|
/**
|
|
108
116
|
* ID of the Sidenav nav item.
|
|
109
117
|
*/
|
package/sidenav.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidenav.js","sourceRoot":"","sources":["sidenav.ts"],"names":[],"mappings":";AAAA;;;;;;;;;4EAS4E;;AAgF5E,yCAAqC;
|
|
1
|
+
{"version":3,"file":"sidenav.js","sourceRoot":"","sources":["sidenav.ts"],"names":[],"mappings":";AAAA;;;;;;;;;4EAS4E;;AAgF5E,yCAAqC;AAiMrC,MAAM,OAAO,GAAG;IACd,IAAI,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;QAClB,OAAO,IAAA,gBAAO,EAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC9C,CAAC;IACD,GAAG,EAAE,MAAM,CAAC,EAAE;QACZ,OAAO,IAAA,gBAAO,EAAC,SAAS,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;IACD,GAAG,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;QACrB,OAAO,IAAA,gBAAO,EAAC,SAAS,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACjD,CAAC;IACD,EAAE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;AAEH,kBAAe,OAAO,CAAC"}
|
package/tests/appapi.test.js
CHANGED
|
@@ -60,7 +60,7 @@ describe('appapi', () => {
|
|
|
60
60
|
description: 'Collect, organize, analyze and report on everything your customers do',
|
|
61
61
|
enabled: false,
|
|
62
62
|
functionalIconReact: 'DataAnalytics',
|
|
63
|
-
functionalIconUrl: 'https://
|
|
63
|
+
functionalIconUrl: 'https://cdn.experience-stage.adobe.net/assets/BrandIcons.33cbb3cf.svg#DataAnalytics',
|
|
64
64
|
href: 'https://analytics-discovery-qe.adobe.net/1.0/loginRedirect?allow_project_redirect=1&IMS=1',
|
|
65
65
|
iconUrl: '',
|
|
66
66
|
learnMoreLink: 'http://www.adobe.com/marketing-cloud/web-analytics.html',
|
|
@@ -77,7 +77,7 @@ describe('appapi', () => {
|
|
|
77
77
|
description: 'Use experimentation, testing and machine learning automation to deliver the best content to each visitor',
|
|
78
78
|
enabled: false,
|
|
79
79
|
functionalIconReact: 'ContentProfile',
|
|
80
|
-
functionalIconUrl: 'https://
|
|
80
|
+
functionalIconUrl: 'https://cdn.experience-stage.adobe.net/assets/BrandIcons.33cbb3cf.svg#ContentProfile',
|
|
81
81
|
href: 'https://experience-stage.adobe.com/#/target',
|
|
82
82
|
iconUrl: '',
|
|
83
83
|
learnMoreLink: 'https://www.adobe.com/marketing/target.html',
|
|
@@ -98,11 +98,11 @@ describe('appapi', () => {
|
|
|
98
98
|
const target = yield appapi_1.default.get(appapi_1.AppIds.TARGET);
|
|
99
99
|
expect(analytics.appId).toBe('analytics');
|
|
100
100
|
expect(analytics.enabled).toBe(false);
|
|
101
|
-
expect(analytics.functionalIconUrl).toBe('https://
|
|
101
|
+
expect(analytics.functionalIconUrl).toBe('https://cdn.experience-stage.adobe.net/assets/BrandIcons.33cbb3cf.svg#DataAnalytics');
|
|
102
102
|
expect(analytics.href).toBe('https://analytics-discovery-qe.adobe.net/1.0/loginRedirect?allow_project_redirect=1&IMS=1');
|
|
103
103
|
expect(target.appId).toBe('target');
|
|
104
104
|
expect(target.enabled).toBe(false);
|
|
105
|
-
expect(target.functionalIconUrl).toBe('https://
|
|
105
|
+
expect(target.functionalIconUrl).toBe('https://cdn.experience-stage.adobe.net/assets/BrandIcons.33cbb3cf.svg#ContentProfile');
|
|
106
106
|
expect(target.href).toBe('https://experience-stage.adobe.com/#/target');
|
|
107
107
|
}));
|
|
108
108
|
});
|
package/tests/appapi.test.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appapi.test.js","sourceRoot":"","sources":["appapi.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;4EAS4E;AAC5E,oDAAyC;AACzC,2DAA8C;AAE9C,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;IACtB,UAAU,CAAC,GAAG,EAAE;QACb,gBAAM,CAAC,oBAAoB,CAAa,GAAG;YAC1C,MAAM,EAAE,GAAG,EAAE;gBACX,OAAO;oBACL,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE;wBACZ,IAAI,IAAI,KAAK,WAAW,EAAE;4BACxB,OAAO;gCACL,cAAc,EAAE,aAAa;gCAC7B,KAAK,EAAE,WAAW;gCAClB,WAAW,EAAE,uEAAuE;gCACpF,OAAO,EAAE,KAAK;gCACd,mBAAmB,EAAE,eAAe;gCACpC,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"appapi.test.js","sourceRoot":"","sources":["appapi.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;4EAS4E;AAC5E,oDAAyC;AACzC,2DAA8C;AAE9C,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;IACtB,UAAU,CAAC,GAAG,EAAE;QACb,gBAAM,CAAC,oBAAoB,CAAa,GAAG;YAC1C,MAAM,EAAE,GAAG,EAAE;gBACX,OAAO;oBACL,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE;wBAC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SAAS,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACtC,MAAM,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,qFAAqF,CAAC,CAAC;QAChI,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,2FAA2F,CAAC,CAAC;QAEzH,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACpC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACnC,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,sFAAsF,CAAC,CAAC;QAC9H,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,6CAA6C,CAAC,CAAC;IAC1E,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -56,13 +56,13 @@ describe('capabilityapi', () => {
|
|
|
56
56
|
if (type === 'home' || type === 'Home') {
|
|
57
57
|
return {
|
|
58
58
|
capabilityId: 'home',
|
|
59
|
-
iconUrl: 'https://
|
|
59
|
+
iconUrl: 'https://cdn.experience-stage.adobe.net/assets/CapabilityIcons.33cbb3cf.svg#Home'
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
if (type === 'assets' || type === 'Assets') {
|
|
63
63
|
return {
|
|
64
64
|
capabilityId: 'assets',
|
|
65
|
-
iconUrl: 'https://
|
|
65
|
+
iconUrl: 'https://cdn.experience-stage.adobe.net/assets/CapabilityIcons.33cbb3cf.svg#Assets'
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
return {};
|
|
@@ -78,12 +78,12 @@ describe('capabilityapi', () => {
|
|
|
78
78
|
const assetsByName = yield capabilityapi_1.default.get(capabilityapi_1.CapabilityNames.ASSETS);
|
|
79
79
|
expect(homeById.capabilityId).toBe('home');
|
|
80
80
|
expect(homeByName.capabilityId).toBe('home');
|
|
81
|
-
expect(homeById.iconUrl).toBe('https://
|
|
82
|
-
expect(homeByName.iconUrl).toBe('https://
|
|
81
|
+
expect(homeById.iconUrl).toBe('https://cdn.experience-stage.adobe.net/assets/CapabilityIcons.33cbb3cf.svg#Home');
|
|
82
|
+
expect(homeByName.iconUrl).toBe('https://cdn.experience-stage.adobe.net/assets/CapabilityIcons.33cbb3cf.svg#Home');
|
|
83
83
|
expect(assetsById.capabilityId).toBe('assets');
|
|
84
84
|
expect(assetsByName.capabilityId).toBe('assets');
|
|
85
|
-
expect(assetsById.iconUrl).toBe('https://
|
|
86
|
-
expect(assetsByName.iconUrl).toBe('https://
|
|
85
|
+
expect(assetsById.iconUrl).toBe('https://cdn.experience-stage.adobe.net/assets/CapabilityIcons.33cbb3cf.svg#Assets');
|
|
86
|
+
expect(assetsByName.iconUrl).toBe('https://cdn.experience-stage.adobe.net/assets/CapabilityIcons.33cbb3cf.svg#Assets');
|
|
87
87
|
}));
|
|
88
88
|
});
|
|
89
89
|
//# sourceMappingURL=capabilityapi.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilityapi.test.js","sourceRoot":"","sources":["capabilityapi.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;4EAS4E;AAC5E,kEAA+E;AAC/E,2DAA8C;AAE9C,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,UAAU,CAAC,GAAG,EAAE;QACb,gBAAM,CAAC,oBAAoB,CAAa,GAAG;YAC1C,aAAa,EAAE,GAAG,EAAE;gBAClB,OAAO;oBACL,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE;wBACZ,IAAI,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,MAAM,EAAE;4BACtC,OAAO;gCACL,YAAY,EAAE,MAAM;gCACpB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"capabil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AC,UAAU,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC7C,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,iFAAiF,CAAC,CAAC;QACjH,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,iFAAiF,CAAC,CAAC;QAEnH,MAAM,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC/C,MAAM,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACjD,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,mFAAmF,CAAC,CAAC;QACrH,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,mFAAmF,CAAC,CAAC;IACzH,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -49,5 +49,23 @@ describe('featureflags.ts', () => {
|
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
}));
|
|
52
|
+
it('calls runtime feature flags service with sandbox context options', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
53
|
+
const sandbox = { name: 'cjm-mr' };
|
|
54
|
+
getSpy.mockImplementationOnce(() => Promise.resolve({
|
|
55
|
+
cjm: {
|
|
56
|
+
flagA: 'true',
|
|
57
|
+
flagB: 'false'
|
|
58
|
+
}
|
|
59
|
+
}));
|
|
60
|
+
const flags = yield featureflags_1.default.get({ projectIds: ['cjm'], sandbox });
|
|
61
|
+
expect(getSpy).toBeCalledTimes(1);
|
|
62
|
+
expect(getSpy).toBeCalledWith({ projectIds: ['cjm'], sandbox });
|
|
63
|
+
expect(flags).toEqual({
|
|
64
|
+
cjm: {
|
|
65
|
+
flagA: 'true',
|
|
66
|
+
flagB: 'false'
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}));
|
|
52
70
|
});
|
|
53
71
|
//# sourceMappingURL=featureflags.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"featureflags.test.js","sourceRoot":"","sources":["featureflags.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;4EAS4E;AAC5E,mEAIyB;AACzB,2DAA8C;AAE9C,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC/B,IAAI,MAAW,CAAC;IAEhB,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,gBAAgB,GAAG,EAAC,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,EAAoB,CAAC;QAC5D,gBAAM,CAAC,oBAAoB,CAAa,GAAG,EAAC,YAAY,EAAE,GAAG,EAAE,CAAC,gBAAgB,EAAY,CAAC;QAC9F,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;IAEtC,EAAE,CAAC,qCAAqC,EAAE,GAAS,EAAE;QACnD,MAAM,CAAC,sBAAsB,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAuB;YACxE,GAAG,EAAE;gBACH,KAAK,EAAE,MAAM;gBACb,KAAK,EAAE,OAAO;aACf;SACF,CAAC,CAAC,CAAC;QAEJ,MAAM,KAAK,GAAG,MAAM,sBAAe,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QACjD,MAAM,CAAC,MAAM,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;QAClC,MAAM,CAAC,MAAM,CAAC,CAAC,cAAc,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QACvC,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;YACpB,GAAG,EAAE;gBACH,KAAK,EAAE,MAAM;gBACb,KAAK,EAAE,OAAO;aACf;SACF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f;SACF,CAAC,CAAC;IACL,CAAC,CAAA,CAAC,CAAC;IAEH,EAAE,CAAC,kEAAkE,EAAE,GAAS,EAAE;QAChF,MAAM,OAAO,GAAG,EAAC,IAAI,EAAE,QAAQ,EAAC,CAAC;QACjC,MAAM,CAAC,sBAAsB,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAuB;YACxE,GAAG,EAAE;gBACH,KAAK,EAAE,MAAM;gBACb,KAAK,EAAE,OAAO;aACf;SACF,CAAC,CAAC,CAAC;QAEJ,MAAM,KAAK,GAAG,MAAM,sBAAe,CAAC,GAAG,CAAC,EAAC,UAAU,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,EAAC,CAAC,CAAC;QACxE,MAAM,CAAC,MAAM,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;QAClC,MAAM,CAAC,MAAM,CAAC,CAAC,cAAc,CAAC,EAAC,UAAU,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,EAAC,CAAC,CAAC;QAC9D,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;YACpB,GAAG,EAAE;gBACH,KAAK,EAAE,MAAM;gBACb,KAAK,EAAE,OAAO;aACf;SACF,CAAC,CAAC;IACL,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/tests/network.test.js
CHANGED
|
@@ -25,11 +25,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
25
25
|
const network_1 = require("../network");
|
|
26
26
|
const Global_1 = __importDefault(require("../src/Global"));
|
|
27
27
|
describe('network.ts', () => {
|
|
28
|
+
const createApolloClientMock = jest.fn();
|
|
28
29
|
const fetchMock = jest.fn();
|
|
29
30
|
const getPrefetchedMock = jest.fn();
|
|
30
31
|
const queryMock = jest.fn();
|
|
31
32
|
const getApolloClientMock = jest.fn();
|
|
32
33
|
const networkMock = {
|
|
34
|
+
createApolloClient: createApolloClientMock,
|
|
33
35
|
fetch: fetchMock,
|
|
34
36
|
getApolloClient: getApolloClientMock,
|
|
35
37
|
getPrefetched: getPrefetchedMock,
|
|
@@ -73,5 +75,13 @@ describe('network.ts', () => {
|
|
|
73
75
|
expect(getApolloClientMock).toHaveBeenCalledTimes(1);
|
|
74
76
|
expect(getApolloClientMock).toHaveBeenCalledWith({ xql: true });
|
|
75
77
|
}));
|
|
78
|
+
test('createApolloClient', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
79
|
+
const res = { status: 'ok' };
|
|
80
|
+
createApolloClientMock.mockResolvedValue(res);
|
|
81
|
+
const client = yield createApolloClientMock({}, { xql: true });
|
|
82
|
+
expect(client).toEqual(res);
|
|
83
|
+
expect(createApolloClientMock).toHaveBeenCalledTimes(1);
|
|
84
|
+
expect(createApolloClientMock).toHaveBeenCalledWith({}, { xql: true });
|
|
85
|
+
}));
|
|
76
86
|
});
|
|
77
87
|
//# sourceMappingURL=network.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network.test.js","sourceRoot":"","sources":["network.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;4EAS4E;AAC5E,wCAAoF;AACpF,2DAA8C;AAE9C,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC1B,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;IAC5B,MAAM,iBAAiB,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;IACpC,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;IAC5B,MAAM,mBAAmB,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;IAEtC,MAAM,WAAW,GAAG;QAClB,KAAK,EAAE,SAAS;QAChB,eAAe,EAAE,mBAAmB;QACpC,aAAa,EAAE,iBAAiB;QAChC,KAAK,EAAE,SAAS;KACH,CAAC;IAEhB,SAAS,CAAC,GAAG,EAAE;QACZ,gBAAM,CAAC,oBAAoB,CAAa,GAAG;YAC1C,OAAO,EAAE,WAAW;SACV,CAA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EAAC,GAAG,EAAE,IAAI,EAAC,CAAC,CAAC;QAClD,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC5B,MAAM,CAAC,mBAAmB,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;QACrD,MAAM,CAAC,mBAAmB,CAAC,CAAC,oBAAoB,CAAC,EAAC,GAAG,EAAE,IAAI,EAAC,CAAC,CAAC;IAChE,CAAC,CAAA,CAAC,CAAC;IAEH,IAAI,CAAC,oBAAoB,EAAE,GAAS,EAAE;QACpC,MAAM,GAAG,GAAG,EAAC,MAAM,EAAE,IAAI,EAAC,CAAC;QAC3B,sBAAsB,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC;QAC9C,MAAM,MAAM,GAAG,MAAM,sBAAsB,CAAC,EAAS,EAAE,EAAC,GAAG,EAAE,IAAI,EAAC,CAAC,CAAC;QACpE,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC5B,MAAM,CAAC,sBAAsB,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;QACxD,MAAM,CAAC,sBAAsB,CAAC,CAAC,oBAAoB,CAAC,EAAE,EAAE,EAAC,GAAG,EAAE,IAAI,EAAC,CAAC,CAAC;IACvE,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/topbar.d.ts
CHANGED
|
@@ -115,17 +115,61 @@ export interface Callback {
|
|
|
115
115
|
export interface CoachMarkCallback {
|
|
116
116
|
(value?: number): void;
|
|
117
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* This descriptor defines the custom environment labels where the type must be
|
|
120
|
+
* CustomLabelType.ENVIRONMENT and the value will be whatever string you want to
|
|
121
|
+
* display. This is exclusively used with the customEnvLabel api.
|
|
122
|
+
*/
|
|
123
|
+
interface CustomEnvironmentDesc {
|
|
124
|
+
type: CustomLabelType.ENVIRONMENT;
|
|
125
|
+
value: string;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* This descriptor defines a custom release label where the type must be
|
|
129
|
+
* CustomLabelType.RELEASE and the value must be one of the predetermined enum
|
|
130
|
+
* values. This is exclusively used with the customEnvLabel api.
|
|
131
|
+
*/
|
|
132
|
+
interface CustomReleaseDesc {
|
|
133
|
+
type: CustomLabelType.RELEASE;
|
|
134
|
+
value: CustomRelease;
|
|
135
|
+
}
|
|
136
|
+
export type CustomLabelDesc = CustomEnvironmentDesc | CustomReleaseDesc;
|
|
137
|
+
export declare enum CustomLabelType {
|
|
138
|
+
/**
|
|
139
|
+
* The default label type.
|
|
140
|
+
*/
|
|
141
|
+
ENVIRONMENT = "ENVIRONMENT",
|
|
142
|
+
/**
|
|
143
|
+
* Renders as a release badge. Can only render one badge and only for solutions in GA release.
|
|
144
|
+
*/
|
|
145
|
+
RELEASE = "RELEASE"
|
|
146
|
+
}
|
|
147
|
+
export declare enum CustomRelease {
|
|
148
|
+
/**
|
|
149
|
+
* "Trial" release badge. Can only be shown if your solution is already in GA.
|
|
150
|
+
*/
|
|
151
|
+
TRIAL = "TRIAL"
|
|
152
|
+
}
|
|
153
|
+
export type CustomLabelCollection = string | Array<string | CustomLabelDesc> | null;
|
|
118
154
|
export interface TopbarApiProperties {
|
|
119
155
|
/**
|
|
120
|
-
* Gets or sets a custom environment label in the shell.
|
|
156
|
+
* Gets or sets a custom environment label in the shell. Values can be a simple string or
|
|
157
|
+
* a `CustomLabelDesc` with `type` and `value` keys. The default label `type` is 'ENVIRONMENT'.
|
|
158
|
+
* Specifying a `CustomRelease` option as the `value` is required when `type` is
|
|
159
|
+
* `CustomLabelType.RELEASE`. Only one CustomLabelType.RELEASE type can be rendered in the header
|
|
160
|
+
* and only for solutions that are in GA release.
|
|
121
161
|
*
|
|
122
162
|
* ***Example:***
|
|
163
|
+
* import {CustomLabelType, CustomRelease} from '@adobe/exc-app/topbar';
|
|
123
164
|
*
|
|
124
165
|
* ```typescript
|
|
125
166
|
* topbar.customEnvLabel = 'Beta';
|
|
167
|
+
* topbar.customEnvLabel = ['Beta', 'Test'];
|
|
168
|
+
* topbar.custonEnvLabel = [{type: CustomLabelType.ENVIRONMENT, value: 'Test'}];
|
|
169
|
+
* topbar.customEnvLabel = ['Beta', {type: CustomLabelType.RELEASE, value: CustomRelease.TRIAL}];
|
|
126
170
|
* ```
|
|
127
171
|
*/
|
|
128
|
-
customEnvLabel:
|
|
172
|
+
customEnvLabel: CustomLabelCollection;
|
|
129
173
|
/**
|
|
130
174
|
* Configuration for solution name and hero. All values aside from
|
|
131
175
|
* path can only be used by third party applications. All other solutions will use
|