@adobe/exc-app 1.0.15 → 1.0.16

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.
@@ -213,6 +213,10 @@ export interface RuntimeConfiguration {
213
213
  * Map of Adobe Io region specific endpoints.
214
214
  */
215
215
  ioRegionSpecificMap?: Record<string, string>;
216
+ /**
217
+ * Last recorded recent timestamp
218
+ */
219
+ lastRecentTs: number;
216
220
  /**
217
221
  * User Locale
218
222
  */
package/metrics.d.ts CHANGED
@@ -19,8 +19,10 @@ export interface MetricsApi {
19
19
  /**
20
20
  * Creates a metrics instance for the specified component to log entries and events.
21
21
  * @param name The name of the component.
22
+ * @param {any} args Optional arguments that will be written into the
23
+ * metricsState context bag on the recorded metrics.
22
24
  */
23
- create(name: string): Readonly<Metrics>;
25
+ create(name: string, ...args: any): Readonly<Metrics>;
24
26
  }
25
27
  declare const api: MetricsApi;
26
28
  export default api;
package/metrics.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"metrics.js","sourceRoot":"","sources":["metrics.ts"],"names":[],"mappings":";AAAA;;;;;;;;;4EAS4E;;;AAE5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,yCAAqC;AACrC,6CAAwC;AA0BtC,uFA1BM,eAAM,OA0BN;AAzBR,2CAAsC;AA0BpC,sFA1BM,aAAK,OA0BN;AAXP,MAAM,GAAG,GAAG,IAAA,gBAAO,EAAC,SAAS,EAAE;IAC7B,CAAC,QAAQ,EAAE,IAAI,CAAC;CACjB,CAAe,CAAC;AAEjB,kBAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"metrics.js","sourceRoot":"","sources":["metrics.ts"],"names":[],"mappings":";AAAA;;;;;;;;;4EAS4E;;;AAE5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,yCAAqC;AACrC,6CAAwC;AA4BtC,uFA5BM,eAAM,OA4BN;AA3BR,2CAAsC;AA4BpC,sFA5BM,aAAK,OA4BN;AAXP,MAAM,GAAG,GAAG,IAAA,gBAAO,EAAC,SAAS,EAAE;IAC7B,CAAC,QAAQ,EAAE,IAAI,CAAC;CACjB,CAAe,CAAC;AAEjB,kBAAe,GAAG,CAAC"}
package/modules.d.ts ADDED
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Single module metadata.
3
+ */
4
+ export interface ModuleMetadata {
5
+ /**
6
+ * The current live version of this module.
7
+ */
8
+ liveVersion: string;
9
+ }
10
+ /**
11
+ * Module metadata list
12
+ */
13
+ export interface ModulesList {
14
+ /**
15
+ * Module metadata or undefined if the module requested does not exist.
16
+ */
17
+ [name: string]: ModuleMetadata | undefined;
18
+ }
19
+ /**
20
+ * APIs for exposing SPAs/Modules metadata.
21
+ */
22
+ export interface ModulesApi {
23
+ /**
24
+ * API to fetch metadata for a single, multiple or all modules.
25
+ * @param module - Module(s) to request metadata for. If not provided, all modules metadata will be returned.
26
+ */
27
+ get(module?: string | string[]): Promise<ModulesList>;
28
+ }
29
+ declare const modules: ModulesApi;
30
+ export default modules;
package/modules.js ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /*************************************************************************
4
+ * Copyright 2022 Adobe
5
+ * All Rights Reserved.
6
+ *
7
+ * NOTICE: Adobe permits you to use, modify, and distribute this file in
8
+ * accordance with the terms of the Adobe license agreement accompanying
9
+ * it. If you have received this file from a source other than Adobe,
10
+ * then your use, modification, or distribution of it requires the prior
11
+ * written permission of Adobe.
12
+ **************************************************************************/
13
+ const Global_1 = require("./src/Global");
14
+ const modules = {
15
+ get: (module = '*') => (0, Global_1.getImpl)('modules')().get(module)
16
+ };
17
+ exports.default = modules;
18
+ //# sourceMappingURL=modules.js.map
package/modules.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modules.js","sourceRoot":"","sources":["modules.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;4EAS4E;AAC5E,yCAAqC;AAiCrC,MAAM,OAAO,GAAe;IAC1B,GAAG,EAAE,CAAC,MAAM,GAAG,GAAG,EAAE,EAAE,CAAC,IAAA,gBAAO,EAAC,SAAS,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC;CACxD,CAAC;AAEF,kBAAe,OAAO,CAAC"}
package/network.d.ts CHANGED
@@ -125,16 +125,14 @@ export interface Configuration {
125
125
  * appId from solution route config
126
126
  */
127
127
  appId: string;
128
- /**
129
- * Get Authentication token
130
- */
131
- getTokenInfo: () => Promise<{
132
- token: string;
133
- }>;
134
128
  /**
135
129
  * IMS Client ID
136
130
  */
137
131
  imsClientId: string;
132
+ /**
133
+ * IMS Token
134
+ */
135
+ imsToken: string;
138
136
  /**
139
137
  * metricsAppId from solution route config
140
138
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/exc-app",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "main": "index.js",
5
5
  "source": "index.ts",
6
6
  "scripts": {
package/sidenav.d.ts CHANGED
@@ -38,13 +38,14 @@
38
38
  * {
39
39
  * heading: 'DOCUMENTS',
40
40
  * items: [
41
- * {children: [{id: 'child1', name: 'Child 1'}, {id: 'child2', name: 'Child 2'}], id: '2', name: 'Item 2'}
41
+ * {id: '2', name: 'Item 2'}
42
42
  * ]
43
43
  * }
44
44
  * ],
45
45
  * settings: {
46
+ * id: 'mySideNav',
46
47
  * typeToSelect: true,
47
- * variant: 'multiLevel'
48
+ * variant: 'default'
48
49
  * }
49
50
  * };
50
51
  *
@@ -84,19 +85,21 @@
84
85
  * @module sidenav
85
86
  */
86
87
  import EventEmitter from './src/EventEmitter';
87
- export interface NavItem {
88
+ export interface NavHeading {
88
89
  /**
89
- * Whether the path is absolute or relative to the base path.
90
+ * Display name of the nav category heading.
90
91
  */
91
- absolutePath?: boolean;
92
+ heading: string[];
92
93
  /**
93
- * Nested children Sidenav nav items
94
+ * A list of NavItems that go under the nav category heading.
94
95
  */
95
- children?: NavItem[];
96
+ items: NavItem[];
97
+ }
98
+ export interface NavItem {
96
99
  /**
97
- * Whether or not to expand children by default.
100
+ * Whether the path is absolute or relative to the base path.
98
101
  */
99
- defaultExpanded?: boolean;
102
+ absolutePath?: boolean;
100
103
  /**
101
104
  * Whether or not to disable the nav item.
102
105
  */
@@ -112,7 +115,7 @@ export interface NavItem {
112
115
  /**
113
116
  * Where to open external URL e.g., '_self' or '_blank' for same tab or new tab.
114
117
  */
115
- target: string;
118
+ target?: string;
116
119
  /**
117
120
  * A string url the user is taken to when this item is clicked.
118
121
  */
@@ -136,7 +139,7 @@ export interface NavConfig {
136
139
  /**
137
140
  * List of nav item objects.
138
141
  */
139
- menu: NavItem[];
142
+ menu: (NavItem | NavHeading)[];
140
143
  /**
141
144
  * Extra Sidenav nav options and configurations.
142
145
  */
@@ -172,27 +175,26 @@ export interface SidenavApi extends EventEmitter<SidenavInfoEvent> {
172
175
  * {
173
176
  * heading: 'DOCUMENTS',
174
177
  * items: [
175
- * {children: [{id: 'child1', name: 'Child 1'}, {id: 'child2', name: 'Child 2'}], id: '2', name: 'Item 2'}
178
+ * {id: '2', name: 'Item 2'}
176
179
  * ]
177
180
  * }
178
181
  * ],
179
182
  * settings: {
183
+ * id: 'mySideNav',
180
184
  * typeToSelect: true,
181
- * variant: 'multiLevel'
185
+ * variant: 'default'
182
186
  * }
183
187
  * };
184
188
  * ```
185
189
  *
186
190
  * Options:
187
- * * menu: List of nav items and headers and their nested (children) nav items to add to the Sidenav nav. There are two types:
191
+ * * menu: List of nav items and headers and their nav items and headings to add to the Sidenav nav. There are two types:
188
192
  * * Heading Nav Item
189
193
  * * heading: The heading name. This string needs to be translated using the locale shell provides.
190
194
  * * items: The list of nav items that belong under the heading. Each nav items should have the below properties
191
195
  * * Regular Nav Item
192
196
  * * id: Unique id and value of the nav item.
193
197
  * * name: The nav item's label and display name. This string needs to be translated using the locale shell provides.
194
- * * children: (optional) List of children nav item objects nested under the current nav item.
195
- * * defaultExpanded: (optional) Whether or not this item's children are expanded and shown by default.
196
198
  * * disabled: (optional) Whether or not this item is disabled.
197
199
  * * target: (optional) Where to open external URL e.g., '_self' or '_blank' for same tab or new tab.
198
200
  * * url: A string url the user is taken to when this item is clicked.
@@ -200,7 +202,7 @@ export interface SidenavApi extends EventEmitter<SidenavInfoEvent> {
200
202
  * * settings: Optional object of additional settings for the Sidenav nav.
201
203
  * * id: Unique id and value of the sidenav nav.
202
204
  * * typeToSelect: Whether to enable typing to select an item.
203
- * * variant: Can be one of two values: default or multiLevel. If there is nested children, use multiLevel.
205
+ * * variant: Can be one of two values: default or multiLevel. Currently, we only support default.
204
206
  */
205
207
  config?: NavConfig;
206
208
  /**
package/sidenav.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"sidenav.js","sourceRoot":"","sources":["sidenav.ts"],"names":[],"mappings":";AAAA;;;;;;;;;4EAS4E;;AA+E5E,yCAAqC;AA4JrC,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,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;QACpB,OAAO,IAAA,gBAAO,EAAC,SAAS,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACh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AO,IAAA,gBAAO,EAAC,SAAS,CAAC,EAAE,CAAC,OAAO,CAAC;IACtC,CAAC;IACD,GAAG,EAAE,CAAC,KAAc,EAAE,EAAE;QACtB,IAAA,gBAAO,EAAC,SAAS,CAAC,EAAE,CAAC,OAAO,GAAG,KAAK,CAAC;IACvC,CAAC;CACF,CAAC,CAAC;AAEH,kBAAe,OAAO,CAAC"}
package/src/Global.d.ts CHANGED
@@ -20,6 +20,7 @@ import { FeatureFlagsApi } from '../featureflags';
20
20
  import { HelpCenterApi } from '../helpcenter';
21
21
  import { InternalApi } from '../internal';
22
22
  import { MetricsApi } from '../metrics';
23
+ import { ModulesApi } from '../modules';
23
24
  import { NetworkApi } from '../network';
24
25
  import { Nps } from '../nps';
25
26
  import { OrgSwitcherApi } from '../orgswitcher';
@@ -45,6 +46,7 @@ export interface Modules {
45
46
  readonly helpCenter: HelpCenterApi;
46
47
  readonly internal: InternalApi;
47
48
  readonly metrics: MetricsApi;
49
+ readonly modules: () => ModulesApi;
48
50
  readonly network: NetworkApi;
49
51
  readonly nps: Nps;
50
52
  readonly orgSwitcher: OrgSwitcherApi;
package/src/Global.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Global.js","sourceRoot":"","sources":["Global.ts"],"names":[],"mappings":";AAAA;;;;;;;;;4EAS4E;;;AAgE5E;;;;;GAKG;AACH,SAAgB,OAAO,CAA0B,UAAa;IAC5D,MAAM,GAAG,GAAI,MAAiB,CAAC,oBAAoB,CAAC,CAAC;IACrD,IAAI,CAAC,GAAG,EAAE;QACR,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;KACvD;IACD,OAAO,GAAG,CAAC,UAAU,CAAC,CAAC;AACzB,CAAC;AAND,0BAMC;AAED;;;;;;GAMG;AACH,SAAgB,OAAO,CAA0B,OAAU,EAAE,UAA0C;IACrG,MAAM,GAAG,GAAG,EAAgB,CAAC;IAC7B,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QAC3B,M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C/B,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE;YACd,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,IAAW,EAAE,EAAE;gBACrC,OAAQ,OAAO,CAAC,OAAO,CAAC,CAAC,WAAW,CAAS,CAAC,GAAG,IAAI,CAAC,CAAC;YACzD,CAAC,CAAQ,CAAC;SACX;aAAM;YACL,MAAM,CAAC,cAAc,CAAC,GAAG,EAAE,WAAW,EAAE;gBACtC,GAAG,EAAE,GAAG,EAAE;oBACR,OAAO,OAAO,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,CAAC;gBACvC,CAAC;gBACD,GAAG,EAAE,KAAK,CAAC,EAAE;oBACX,OAAO,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC;gBACxC,CAAC;aACF,CAAC,CAAC;SACJ;IACH,CAAC,CAAC,CAAC;IACH,OAAO,GAAG,CAAC;AACb,CAAC;AApBD,0BAoBC;AAED,kBAAgB,MAAiB,CAAC"}
package/version.d.ts CHANGED
@@ -8,5 +8,5 @@
8
8
  * then your use, modification, or distribution of it requires the prior
9
9
  * written permission of Adobe.
10
10
  **************************************************************************/
11
- declare const EXC_APP_VERSION = "1.0.15";
11
+ declare const EXC_APP_VERSION = "1.0.16";
12
12
  export default EXC_APP_VERSION;
package/version.js CHANGED
@@ -10,6 +10,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  * then your use, modification, or distribution of it requires the prior
11
11
  * written permission of Adobe.
12
12
  **************************************************************************/
13
- const EXC_APP_VERSION = '1.0.15';
13
+ const EXC_APP_VERSION = '1.0.16';
14
14
  exports.default = EXC_APP_VERSION;
15
15
  //# sourceMappingURL=version.js.map