@adobe/exc-app 0.2.46 → 1.0.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/RuntimeConfiguration.d.ts +4 -0
- package/appapi.d.ts +1 -1
- package/appapi.js +1 -1
- package/appapi.js.map +1 -1
- package/build/preBuild.js +14 -0
- package/capabilityapi.d.ts +4 -2
- package/capabilityapi.js +4 -2
- package/capabilityapi.js.map +1 -1
- package/docs/README.md +1 -0
- package/docs/enums/appapi.appids.md +21 -7
- package/docs/enums/capabilityapi.capabilityids.md +28 -0
- package/docs/enums/capabilityapi.capabilitynames.md +28 -0
- package/docs/enums/network.routing.md +21 -1
- package/docs/interfaces/ims.activeproductcontext.md +13 -0
- package/docs/interfaces/ims.imsprofile.md +130 -0
- package/docs/interfaces/ims.productcontext.md +141 -0
- package/docs/interfaces/ims.projectedproductcontext.md +21 -0
- package/docs/interfaces/network.queryrequest.md +20 -0
- package/docs/interfaces/root.poller.md +56 -0
- package/docs/interfaces/root.pollerhandle.md +21 -0
- package/docs/interfaces/root.pollingconfiguration.md +28 -0
- package/docs/interfaces/root.runtimeconfiguration.md +10 -1
- package/docs/interfaces/root.useractivityemitter.md +110 -0
- package/docs/interfaces/root.useractivitymonitor.md +151 -0
- package/docs/interfaces/user.userapi.md +1 -1
- package/docs/modules/ims.md +14 -0
- package/docs/modules/network.md +7 -0
- package/docs/modules/root.md +5 -0
- package/docs/modules/settings.md +8 -57
- package/docs/modules/user.md +14 -0
- package/index.js +7 -0
- package/index.js.map +1 -1
- package/internal.d.ts +9 -0
- package/internal.js +3 -0
- package/internal.js.map +1 -1
- package/network.d.ts +17 -1
- package/network.js +11 -0
- package/network.js.map +1 -1
- package/package.json +6 -7
- package/src/Global.d.ts +3 -1
- package/src/Global.js.map +1 -1
- package/tests/index.test.js +5 -0
- package/tests/index.test.js.map +1 -1
- package/tests/version.test.d.ts +1 -0
- package/tests/version.test.js +23 -0
- package/tests/version.test.js.map +1 -0
- package/{settings/SettingsLevel.ts → version.d.ts} +2 -20
- package/{metrics/Level.ts → version.js} +6 -20
- package/version.js.map +1 -0
- package/RuntimeConfiguration.ts +0 -272
- package/appapi.ts +0 -140
- package/capabilityapi.ts +0 -162
- package/coverage/lcov-report/block-navigation.js +0 -79
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sorter.js +0 -170
- package/helpcenter.ts +0 -253
- package/ims/ImsProfile.ts +0 -57
- package/index.ts +0 -76
- package/internal.ts +0 -102
- package/metrics/Analytics.ts +0 -55
- package/metrics/Application.ts +0 -24
- package/metrics/Configuration.ts +0 -33
- package/metrics/Events.ts +0 -28
- package/metrics/History.ts +0 -36
- package/metrics/Metric.ts +0 -52
- package/metrics/Metrics.ts +0 -129
- package/metrics/RecordType.ts +0 -139
- package/metrics/User.ts +0 -30
- package/metrics.ts +0 -94
- package/network.ts +0 -554
- package/nps.ts +0 -83
- package/orgswitcher.ts +0 -109
- package/page.ts +0 -497
- package/permissions.ts +0 -103
- package/pulse.ts +0 -198
- package/session.ts +0 -116
- package/settings.ts +0 -147
- package/shell.ts +0 -107
- package/sidebar.ts +0 -208
- package/sidenav.ts +0 -287
- package/src/EventEmitter.ts +0 -44
- package/src/Global.ts +0 -109
- package/src/Runtime.ts +0 -23
- package/tests/MockRuntime.ts +0 -28
- package/tests/appapi.test.ts +0 -78
- package/tests/capabilityapi.test.ts +0 -55
- package/tests/helpCenter.test.ts +0 -80
- package/tests/index.test.ts +0 -50
- package/tests/metrics.test.ts +0 -34
- package/tests/nps.test.ts +0 -37
- package/tests/page.test.ts +0 -110
- package/tests/permissions.test.ts +0 -96
- package/tests/pulse.test.ts +0 -37
- package/tests/shell.test.ts +0 -89
- package/tests/sidenav.test.ts +0 -91
- package/tests/topbar.test.ts +0 -85
- package/tests/user.test.ts +0 -129
- package/tests/userprofile.test.ts +0 -31
- package/topbar.ts +0 -288
- package/user.ts +0 -235
- package/userprofile.ts +0 -93
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
var addSorting = (function() {
|
|
3
|
-
'use strict';
|
|
4
|
-
var cols,
|
|
5
|
-
currentSort = {
|
|
6
|
-
index: 0,
|
|
7
|
-
desc: false
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
// returns the summary table element
|
|
11
|
-
function getTable() {
|
|
12
|
-
return document.querySelector('.coverage-summary');
|
|
13
|
-
}
|
|
14
|
-
// returns the thead element of the summary table
|
|
15
|
-
function getTableHeader() {
|
|
16
|
-
return getTable().querySelector('thead tr');
|
|
17
|
-
}
|
|
18
|
-
// returns the tbody element of the summary table
|
|
19
|
-
function getTableBody() {
|
|
20
|
-
return getTable().querySelector('tbody');
|
|
21
|
-
}
|
|
22
|
-
// returns the th element for nth column
|
|
23
|
-
function getNthColumn(n) {
|
|
24
|
-
return getTableHeader().querySelectorAll('th')[n];
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// loads all columns
|
|
28
|
-
function loadColumns() {
|
|
29
|
-
var colNodes = getTableHeader().querySelectorAll('th'),
|
|
30
|
-
colNode,
|
|
31
|
-
cols = [],
|
|
32
|
-
col,
|
|
33
|
-
i;
|
|
34
|
-
|
|
35
|
-
for (i = 0; i < colNodes.length; i += 1) {
|
|
36
|
-
colNode = colNodes[i];
|
|
37
|
-
col = {
|
|
38
|
-
key: colNode.getAttribute('data-col'),
|
|
39
|
-
sortable: !colNode.getAttribute('data-nosort'),
|
|
40
|
-
type: colNode.getAttribute('data-type') || 'string'
|
|
41
|
-
};
|
|
42
|
-
cols.push(col);
|
|
43
|
-
if (col.sortable) {
|
|
44
|
-
col.defaultDescSort = col.type === 'number';
|
|
45
|
-
colNode.innerHTML =
|
|
46
|
-
colNode.innerHTML + '<span class="sorter"></span>';
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
return cols;
|
|
50
|
-
}
|
|
51
|
-
// attaches a data attribute to every tr element with an object
|
|
52
|
-
// of data values keyed by column name
|
|
53
|
-
function loadRowData(tableRow) {
|
|
54
|
-
var tableCols = tableRow.querySelectorAll('td'),
|
|
55
|
-
colNode,
|
|
56
|
-
col,
|
|
57
|
-
data = {},
|
|
58
|
-
i,
|
|
59
|
-
val;
|
|
60
|
-
for (i = 0; i < tableCols.length; i += 1) {
|
|
61
|
-
colNode = tableCols[i];
|
|
62
|
-
col = cols[i];
|
|
63
|
-
val = colNode.getAttribute('data-value');
|
|
64
|
-
if (col.type === 'number') {
|
|
65
|
-
val = Number(val);
|
|
66
|
-
}
|
|
67
|
-
data[col.key] = val;
|
|
68
|
-
}
|
|
69
|
-
return data;
|
|
70
|
-
}
|
|
71
|
-
// loads all row data
|
|
72
|
-
function loadData() {
|
|
73
|
-
var rows = getTableBody().querySelectorAll('tr'),
|
|
74
|
-
i;
|
|
75
|
-
|
|
76
|
-
for (i = 0; i < rows.length; i += 1) {
|
|
77
|
-
rows[i].data = loadRowData(rows[i]);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
// sorts the table using the data for the ith column
|
|
81
|
-
function sortByIndex(index, desc) {
|
|
82
|
-
var key = cols[index].key,
|
|
83
|
-
sorter = function(a, b) {
|
|
84
|
-
a = a.data[key];
|
|
85
|
-
b = b.data[key];
|
|
86
|
-
return a < b ? -1 : a > b ? 1 : 0;
|
|
87
|
-
},
|
|
88
|
-
finalSorter = sorter,
|
|
89
|
-
tableBody = document.querySelector('.coverage-summary tbody'),
|
|
90
|
-
rowNodes = tableBody.querySelectorAll('tr'),
|
|
91
|
-
rows = [],
|
|
92
|
-
i;
|
|
93
|
-
|
|
94
|
-
if (desc) {
|
|
95
|
-
finalSorter = function(a, b) {
|
|
96
|
-
return -1 * sorter(a, b);
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
for (i = 0; i < rowNodes.length; i += 1) {
|
|
101
|
-
rows.push(rowNodes[i]);
|
|
102
|
-
tableBody.removeChild(rowNodes[i]);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
rows.sort(finalSorter);
|
|
106
|
-
|
|
107
|
-
for (i = 0; i < rows.length; i += 1) {
|
|
108
|
-
tableBody.appendChild(rows[i]);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
// removes sort indicators for current column being sorted
|
|
112
|
-
function removeSortIndicators() {
|
|
113
|
-
var col = getNthColumn(currentSort.index),
|
|
114
|
-
cls = col.className;
|
|
115
|
-
|
|
116
|
-
cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, '');
|
|
117
|
-
col.className = cls;
|
|
118
|
-
}
|
|
119
|
-
// adds sort indicators for current column being sorted
|
|
120
|
-
function addSortIndicators() {
|
|
121
|
-
getNthColumn(currentSort.index).className += currentSort.desc
|
|
122
|
-
? ' sorted-desc'
|
|
123
|
-
: ' sorted';
|
|
124
|
-
}
|
|
125
|
-
// adds event listeners for all sorter widgets
|
|
126
|
-
function enableUI() {
|
|
127
|
-
var i,
|
|
128
|
-
el,
|
|
129
|
-
ithSorter = function ithSorter(i) {
|
|
130
|
-
var col = cols[i];
|
|
131
|
-
|
|
132
|
-
return function() {
|
|
133
|
-
var desc = col.defaultDescSort;
|
|
134
|
-
|
|
135
|
-
if (currentSort.index === i) {
|
|
136
|
-
desc = !currentSort.desc;
|
|
137
|
-
}
|
|
138
|
-
sortByIndex(i, desc);
|
|
139
|
-
removeSortIndicators();
|
|
140
|
-
currentSort.index = i;
|
|
141
|
-
currentSort.desc = desc;
|
|
142
|
-
addSortIndicators();
|
|
143
|
-
};
|
|
144
|
-
};
|
|
145
|
-
for (i = 0; i < cols.length; i += 1) {
|
|
146
|
-
if (cols[i].sortable) {
|
|
147
|
-
// add the click event handler on the th so users
|
|
148
|
-
// dont have to click on those tiny arrows
|
|
149
|
-
el = getNthColumn(i).querySelector('.sorter').parentElement;
|
|
150
|
-
if (el.addEventListener) {
|
|
151
|
-
el.addEventListener('click', ithSorter(i));
|
|
152
|
-
} else {
|
|
153
|
-
el.attachEvent('onclick', ithSorter(i));
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
// adds sorting functionality to the UI
|
|
159
|
-
return function() {
|
|
160
|
-
if (!getTable()) {
|
|
161
|
-
return;
|
|
162
|
-
}
|
|
163
|
-
cols = loadColumns();
|
|
164
|
-
loadData();
|
|
165
|
-
addSortIndicators();
|
|
166
|
-
enableUI();
|
|
167
|
-
};
|
|
168
|
-
})();
|
|
169
|
-
|
|
170
|
-
window.addEventListener('load', addSorting);
|
package/helpcenter.ts
DELETED
|
@@ -1,253 +0,0 @@
|
|
|
1
|
-
/*************************************************************************
|
|
2
|
-
* Copyright 2020 Adobe
|
|
3
|
-
* All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* NOTICE: Adobe permits you to use, modify, and distribute this file in
|
|
6
|
-
* accordance with the terms of the Adobe license agreement accompanying
|
|
7
|
-
* it. If you have received this file from a source other than Adobe,
|
|
8
|
-
* then your use, modification, or distribution of it requires the prior
|
|
9
|
-
* written permission of Adobe.
|
|
10
|
-
**************************************************************************/
|
|
11
|
-
/**
|
|
12
|
-
* APIs that let solutions interact with Help Center.
|
|
13
|
-
*
|
|
14
|
-
* ***Import:***
|
|
15
|
-
*
|
|
16
|
-
* ```typescript
|
|
17
|
-
* import helpCenter from '@adobe/exc-app/helpcenter';
|
|
18
|
-
* ```
|
|
19
|
-
*
|
|
20
|
-
* ***Default export:***
|
|
21
|
-
*
|
|
22
|
-
* [HelpCenterApi](../interfaces/helpcenter.helpcenterapi.md#interface-helpcenterapi)
|
|
23
|
-
*
|
|
24
|
-
* ***Usage:***
|
|
25
|
-
*
|
|
26
|
-
* ```typescript
|
|
27
|
-
* import helpCenter from '@adobe/exc-app/helpcenter';
|
|
28
|
-
*
|
|
29
|
-
* helpCenter.config = {
|
|
30
|
-
* resources: [
|
|
31
|
-
* {
|
|
32
|
-
* href: 'https://marketing.adobe.com/resources/help/en_US/home/index.html',
|
|
33
|
-
* label: 'Help Home'
|
|
34
|
-
* }
|
|
35
|
-
* ]
|
|
36
|
-
* };
|
|
37
|
-
* ```
|
|
38
|
-
* @packageDocumentation
|
|
39
|
-
* @module helpCenter
|
|
40
|
-
*/
|
|
41
|
-
import {connect} from './src/Global';
|
|
42
|
-
|
|
43
|
-
export interface HelpCenterConfig {
|
|
44
|
-
/**
|
|
45
|
-
* Adds help links to the *featured* section of the help center.
|
|
46
|
-
*/
|
|
47
|
-
featured?: Array<{
|
|
48
|
-
/**
|
|
49
|
-
* URL for the link to go to.
|
|
50
|
-
*/
|
|
51
|
-
href: string;
|
|
52
|
-
/**
|
|
53
|
-
* Title for the link.
|
|
54
|
-
*/
|
|
55
|
-
label: string;
|
|
56
|
-
/**
|
|
57
|
-
* Pattern to define path(s) the link can navigate to. The value is not regex but a Path-to-RegExp form.
|
|
58
|
-
*/
|
|
59
|
-
path: string | Array<string>;
|
|
60
|
-
}>;
|
|
61
|
-
/**
|
|
62
|
-
* Customizes *for you* section of the help center.
|
|
63
|
-
*/
|
|
64
|
-
recommendations?: {
|
|
65
|
-
/**
|
|
66
|
-
* Used to disable feature. It is enabled by default.
|
|
67
|
-
*/
|
|
68
|
-
enabled: boolean;
|
|
69
|
-
/**
|
|
70
|
-
* Help center populates "For You" content by conducting a search against Experience League based on a list of terms supplied.
|
|
71
|
-
*/
|
|
72
|
-
terms: Array<{
|
|
73
|
-
/**
|
|
74
|
-
* Pattern to define path(s) the link can navigate to. Please note that the most general ones should come last.
|
|
75
|
-
*/
|
|
76
|
-
path: string;
|
|
77
|
-
/**
|
|
78
|
-
* Specific term used in searching.
|
|
79
|
-
*/
|
|
80
|
-
term: string;
|
|
81
|
-
}>;
|
|
82
|
-
};
|
|
83
|
-
/**
|
|
84
|
-
* Overrides default links present in *resources* section. Product owners are advised to supply custom resources links to ensure greater relevance.
|
|
85
|
-
*/
|
|
86
|
-
resources?: Array<{
|
|
87
|
-
/**
|
|
88
|
-
* URL of the link.
|
|
89
|
-
*/
|
|
90
|
-
href: string;
|
|
91
|
-
/**
|
|
92
|
-
* Title for the link.
|
|
93
|
-
*/
|
|
94
|
-
label: string;
|
|
95
|
-
}>;
|
|
96
|
-
/**
|
|
97
|
-
* If the solution wants to simulate "Frequently asked questions", it can provide them as an array of strings. These appear as the user starts typing in the Search field.
|
|
98
|
-
*/
|
|
99
|
-
questions?: Array<string>;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export interface HelpCenterOpenConfig {
|
|
103
|
-
/**
|
|
104
|
-
* Configuration for Help Center fields when opened.
|
|
105
|
-
*/
|
|
106
|
-
config?: {
|
|
107
|
-
/**
|
|
108
|
-
* String that prepopulates the subject field in the Help center feedback section.
|
|
109
|
-
*/
|
|
110
|
-
subject: string;
|
|
111
|
-
/**
|
|
112
|
-
* Type of feedback. Only CONTEXTUAL_FEEDBACK_SUBMISSION is supported, meaning that the Help Center feedback tab will be opened.
|
|
113
|
-
*/
|
|
114
|
-
type: 'CONTEXTUAL_FEEDBACK_SUBMISSION';
|
|
115
|
-
};
|
|
116
|
-
/**
|
|
117
|
-
* Selected Help Center Tab.
|
|
118
|
-
*/
|
|
119
|
-
selectedTab: 'feedback' | 'support';
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export interface HelpCenterButtonConfig {
|
|
123
|
-
/**
|
|
124
|
-
* Callback function to be automatically executed on click.
|
|
125
|
-
*/
|
|
126
|
-
callback?: (value?: any) => void;
|
|
127
|
-
/**
|
|
128
|
-
* ID of the string to use for handling callback.
|
|
129
|
-
*/
|
|
130
|
-
id?: string;
|
|
131
|
-
/**
|
|
132
|
-
* Text of the button.
|
|
133
|
-
*/
|
|
134
|
-
label: string;
|
|
135
|
-
/**
|
|
136
|
-
* Scope of the button. Options are:
|
|
137
|
-
* 1. helpCenter: Shows as a button in the support section.
|
|
138
|
-
* 2. helpCenterResource: Shows at the bottom of the resources section.
|
|
139
|
-
*/
|
|
140
|
-
scope?: string;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
export interface HelpCenterApiProperties {
|
|
144
|
-
/**
|
|
145
|
-
* Gets or sets the configuration for Help Center.
|
|
146
|
-
*
|
|
147
|
-
* ```typescript
|
|
148
|
-
* helpCenter.config = {
|
|
149
|
-
* featured: [
|
|
150
|
-
* {
|
|
151
|
-
* href: 'https://helpx.adobe.com/support/experience-cloud.html',
|
|
152
|
-
* label: 'Adobe Experience Cloud Learn & Support',
|
|
153
|
-
* path: '/:orgId?/home'
|
|
154
|
-
* },
|
|
155
|
-
* {
|
|
156
|
-
* href: 'https://helpx.adobe.com/support/target.html',
|
|
157
|
-
* label: 'Adobe Target'
|
|
158
|
-
* }
|
|
159
|
-
* ],
|
|
160
|
-
* recommendations: {
|
|
161
|
-
* enabled: true,
|
|
162
|
-
* terms: [
|
|
163
|
-
* {
|
|
164
|
-
* path: '/:orgId?/analytics/home/(.*)?',
|
|
165
|
-
* term: 'get started'
|
|
166
|
-
* },
|
|
167
|
-
* {
|
|
168
|
-
* path: '/:orgId?/analytics/create',
|
|
169
|
-
* term: 'create new'
|
|
170
|
-
* }
|
|
171
|
-
* ]
|
|
172
|
-
* },
|
|
173
|
-
* resources: [
|
|
174
|
-
* {
|
|
175
|
-
* href: 'https://marketing.adobe.com/resources/help/en_US/home/index.html',
|
|
176
|
-
* label: 'Help Home'
|
|
177
|
-
* }
|
|
178
|
-
* ]
|
|
179
|
-
* };
|
|
180
|
-
* ```
|
|
181
|
-
*/
|
|
182
|
-
config: HelpCenterConfig;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* Defines helpCenter-level APIs available to solutions.
|
|
187
|
-
*/
|
|
188
|
-
export interface HelpCenterApi extends HelpCenterApiProperties {
|
|
189
|
-
/**
|
|
190
|
-
* Method to open the help center from within the iframe.
|
|
191
|
-
*
|
|
192
|
-
* ```typescript
|
|
193
|
-
* helpCenter.open({
|
|
194
|
-
* config: {
|
|
195
|
-
* subject: 'Analytics'
|
|
196
|
-
* type: 'CONTEXTUAL_FEEDBACK_SUBMISSION'
|
|
197
|
-
* },
|
|
198
|
-
* selectedTab: 'feedback'
|
|
199
|
-
* });
|
|
200
|
-
* ```
|
|
201
|
-
*/
|
|
202
|
-
open(config?: HelpCenterOpenConfig): void;
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* Method to close the help center from within the iframe.
|
|
206
|
-
*
|
|
207
|
-
* ```typescript
|
|
208
|
-
* helpCenter.close();
|
|
209
|
-
* ```
|
|
210
|
-
*/
|
|
211
|
-
close(): void;
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* Adds a custom button to the help center and enacts a callback onclick.
|
|
215
|
-
* The button will be present under the support tab in help center.
|
|
216
|
-
* The help center button may be reset by entering a null parameter.
|
|
217
|
-
*
|
|
218
|
-
* ```typescript
|
|
219
|
-
* helpCenter.setButton({
|
|
220
|
-
* callback: () => {},
|
|
221
|
-
* label: 'Create Support Ticket'
|
|
222
|
-
* });
|
|
223
|
-
* ```
|
|
224
|
-
*/
|
|
225
|
-
setButton(config: HelpCenterButtonConfig | HelpCenterButtonConfig[] | null): void;
|
|
226
|
-
|
|
227
|
-
/**
|
|
228
|
-
* Adds 1-many custom buttons to the help center and enacts a callback onclick.
|
|
229
|
-
* Depending on the scope (helpCenter or helpCenterResource), the buttons will
|
|
230
|
-
* be present under the support tab (helpCenter) or at the button of the
|
|
231
|
-
* resources section on the main tab (helpCenterResource) in help center.
|
|
232
|
-
* The help center button may be reset by entering a null parameter.
|
|
233
|
-
*
|
|
234
|
-
* ```typescript
|
|
235
|
-
* helpCenter.setButtons([{
|
|
236
|
-
* callback: () => {},
|
|
237
|
-
* id: 'support',
|
|
238
|
-
* label: 'Create Support Ticket',
|
|
239
|
-
* scope: 'helpCenter'
|
|
240
|
-
* }]);
|
|
241
|
-
* ```
|
|
242
|
-
*/
|
|
243
|
-
setButtons(buttons: HelpCenterButtonConfig[] | null): void;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
const helpCenter = connect('helpCenter', [
|
|
247
|
-
['setButton', true],
|
|
248
|
-
['setButtons', true],
|
|
249
|
-
['config'],
|
|
250
|
-
['open', true]
|
|
251
|
-
]);
|
|
252
|
-
|
|
253
|
-
export default helpCenter;
|
package/ims/ImsProfile.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/*************************************************************************
|
|
2
|
-
* Copyright 2021 Adobe
|
|
3
|
-
* All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* NOTICE: Adobe permits you to use, modify, and distribute this file in
|
|
6
|
-
* accordance with the terms of the Adobe license agreement accompanying
|
|
7
|
-
* it. If you have received this file from a source other than Adobe,
|
|
8
|
-
* then your use, modification, or distribution of it requires the prior
|
|
9
|
-
* written permission of Adobe.
|
|
10
|
-
**************************************************************************/
|
|
11
|
-
|
|
12
|
-
export interface ProductContext {
|
|
13
|
-
createDts: number;
|
|
14
|
-
geo?: string;
|
|
15
|
-
global_company_id?: string; // dma_analytics
|
|
16
|
-
groupid: string;
|
|
17
|
-
ident: string;
|
|
18
|
-
label: string;
|
|
19
|
-
login_company?: string;
|
|
20
|
-
migration_status?: string;
|
|
21
|
-
modDts: number;
|
|
22
|
-
offer_id?: string;
|
|
23
|
-
owningEntity: string;
|
|
24
|
-
serviceCode: string;
|
|
25
|
-
serviceLevel: string;
|
|
26
|
-
statusCode: string;
|
|
27
|
-
tenant_id?: string; // dma_tartan
|
|
28
|
-
[key: string]: any;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface ActiveProductContext {
|
|
32
|
-
[serviceCode: string]: ProductContext;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export interface ProjectedProductContext {
|
|
36
|
-
prodCtx: ProductContext
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export interface ImsProfile {
|
|
40
|
-
account_type: string;
|
|
41
|
-
authId: string;
|
|
42
|
-
avatar?: string;
|
|
43
|
-
avatarSrc?: string;
|
|
44
|
-
countryCode: string;
|
|
45
|
-
displayName: string;
|
|
46
|
-
email: string;
|
|
47
|
-
emailVerified: boolean;
|
|
48
|
-
first_name: string;
|
|
49
|
-
job_function: string;
|
|
50
|
-
last_name: string;
|
|
51
|
-
name: string;
|
|
52
|
-
preferred_languages: string[];
|
|
53
|
-
projectedProductContext: ProjectedProductContext[];
|
|
54
|
-
session: string;
|
|
55
|
-
userId: string;
|
|
56
|
-
[key: string]: any;
|
|
57
|
-
}
|
package/index.ts
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/*************************************************************************
|
|
2
|
-
* Copyright 2020 Adobe
|
|
3
|
-
* All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* NOTICE: Adobe permits you to use, modify, and distribute this file in
|
|
6
|
-
* accordance with the terms of the Adobe license agreement accompanying
|
|
7
|
-
* it. If you have received this file from a source other than Adobe,
|
|
8
|
-
* then your use, modification, or distribution of it requires the prior
|
|
9
|
-
* written permission of Adobe.
|
|
10
|
-
**************************************************************************/
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* API used to integrate as solution web application with the unified shell of the Adobe Experience
|
|
14
|
-
* Cloud.
|
|
15
|
-
* @packageDocumentation
|
|
16
|
-
* @preferred
|
|
17
|
-
*/
|
|
18
|
-
import Global, {getImpl} from './src/Global';
|
|
19
|
-
import Runtime from './src/Runtime';
|
|
20
|
-
export type {RuntimeConfiguration} from './RuntimeConfiguration';
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Get the runtime object which contains all unified-shell APIs.
|
|
24
|
-
*
|
|
25
|
-
* ***Example:***
|
|
26
|
-
*
|
|
27
|
-
* ```typescript
|
|
28
|
-
* import React from 'react';
|
|
29
|
-
* import ReactDOM from 'react-dom';
|
|
30
|
-
* import excApp from '@adobe/exc-app';
|
|
31
|
-
*
|
|
32
|
-
* export class MyComponent extends React.Component {
|
|
33
|
-
* constructor(props) {
|
|
34
|
-
* this.runtime = excApp();
|
|
35
|
-
* }
|
|
36
|
-
* }
|
|
37
|
-
* ```
|
|
38
|
-
* @returns The runtime object.
|
|
39
|
-
*/
|
|
40
|
-
export default function runtime(): Runtime {
|
|
41
|
-
// Pass through first argument for backwards compatibility
|
|
42
|
-
return getImpl('default')(arguments[0]); // eslint-disable-line prefer-rest-params
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Initializes a solution web application by invoking the bootstrap callback
|
|
47
|
-
* once the runtime is ready.
|
|
48
|
-
* 1. if the module is already defined, start to bootstrap
|
|
49
|
-
* 2. otherwise define the global callback that will be called when runtime is ready.
|
|
50
|
-
*
|
|
51
|
-
* ***Example:***
|
|
52
|
-
*
|
|
53
|
-
* ```typescript
|
|
54
|
-
* import React from 'react';
|
|
55
|
-
* import ReactDOM from 'react-dom';
|
|
56
|
-
* import runtime, {init} from '@adobe/exc-app';
|
|
57
|
-
*
|
|
58
|
-
* init(() => {
|
|
59
|
-
* ReactDOM.render(<MainComponent runtime={runtime()} />, document.querySelector('#main'));
|
|
60
|
-
* });
|
|
61
|
-
* ```
|
|
62
|
-
* @param bootstrap Callback used to bootstrap a solution. The runtime object is passed in as a
|
|
63
|
-
* parameter to this callback.
|
|
64
|
-
*/
|
|
65
|
-
export function init(bootstrap: (runtime: Runtime) => void): void {
|
|
66
|
-
const callback = (): void => {
|
|
67
|
-
bootstrap(runtime());
|
|
68
|
-
};
|
|
69
|
-
if (Global['exc-module-runtime']) {
|
|
70
|
-
callback();
|
|
71
|
-
} else {
|
|
72
|
-
Global.EXC_MR_READY = callback;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export type {Runtime};
|
package/internal.ts
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
/*************************************************************************
|
|
2
|
-
* Copyright 2020 Adobe
|
|
3
|
-
* All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* NOTICE: Adobe permits you to use, modify, and distribute this file in
|
|
6
|
-
* accordance with the terms of the Adobe license agreement accompanying
|
|
7
|
-
* it. If you have received this file from a source other than Adobe,
|
|
8
|
-
* then your use, modification, or distribution of it requires the prior
|
|
9
|
-
* written permission of Adobe.
|
|
10
|
-
**************************************************************************/
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Internal APIs, meant to be used by Unified Shell only.
|
|
14
|
-
* @ignore
|
|
15
|
-
*/
|
|
16
|
-
import {Application} from './metrics/Application';
|
|
17
|
-
import EventEmitter from './src/EventEmitter';
|
|
18
|
-
import {getImpl, Modules} from './src/Global';
|
|
19
|
-
import MetricsConfiguration from './metrics/Configuration';
|
|
20
|
-
import {Configuration as NetworkConfiguration} from './network';
|
|
21
|
-
import User from './metrics/User';
|
|
22
|
-
|
|
23
|
-
export type {Modules};
|
|
24
|
-
|
|
25
|
-
export interface Poller {
|
|
26
|
-
activeFrequency: number;
|
|
27
|
-
hiddenFrequency?: number;
|
|
28
|
-
name: string;
|
|
29
|
-
inactiveFrequency: number;
|
|
30
|
-
immediate: boolean;
|
|
31
|
-
pollFn: () => Promise<void>;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface PollerHandle {
|
|
35
|
-
handle: string;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export interface UserActivityEmitter extends EventEmitter {
|
|
39
|
-
activityEvents: string[];
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface PollingConfiguration {
|
|
43
|
-
inactivityTimeoutSec?: number;
|
|
44
|
-
pollWhileInactive?: boolean;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @ignore
|
|
49
|
-
*/
|
|
50
|
-
export interface InternalApi {
|
|
51
|
-
addPoller(poller: Poller): Promise<PollerHandle>
|
|
52
|
-
clearUser(version?: string): void
|
|
53
|
-
configureMetrics(config?: MetricsConfiguration): Promise<MetricsConfiguration>;
|
|
54
|
-
configureNetwork(config: NetworkConfiguration): void;
|
|
55
|
-
configurePolling(config: PollingConfiguration): Promise<void>;
|
|
56
|
-
flush(): Promise<number>;
|
|
57
|
-
registerActivityEmitter(emitter: UserActivityEmitter): Promise<void>;
|
|
58
|
-
removePoller(handle: PollerHandle): Promise<void>;
|
|
59
|
-
setApplication(app: Application): void;
|
|
60
|
-
setFilter(filterFunction: <T>(record: T) => Promise<T>): void;
|
|
61
|
-
setUser(user: User, version?: string): void;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* @ignore
|
|
66
|
-
*/
|
|
67
|
-
export class Internal {
|
|
68
|
-
public static addPoller(poller: Poller): Promise<PollerHandle> {
|
|
69
|
-
return getImpl('internal').addPoller(poller);
|
|
70
|
-
}
|
|
71
|
-
public static configureMetrics(config?: MetricsConfiguration): Promise<MetricsConfiguration> {
|
|
72
|
-
return getImpl('internal').configureMetrics(config);
|
|
73
|
-
}
|
|
74
|
-
public static configureNetwork(config: NetworkConfiguration): void {
|
|
75
|
-
return getImpl('internal').configureNetwork(config);
|
|
76
|
-
}
|
|
77
|
-
public static configurePolling(config: PollingConfiguration): Promise<void> {
|
|
78
|
-
return getImpl('internal').configurePolling(config);
|
|
79
|
-
}
|
|
80
|
-
public static flush(): Promise<number> {
|
|
81
|
-
return getImpl('internal').flush();
|
|
82
|
-
}
|
|
83
|
-
public static registerActivityEmitter(emitter: UserActivityEmitter): Promise<void> {
|
|
84
|
-
return getImpl('internal').registerActivityEmitter(emitter);
|
|
85
|
-
}
|
|
86
|
-
public static removePoller(handle: PollerHandle): Promise<void> {
|
|
87
|
-
return getImpl('internal').removePoller(handle);
|
|
88
|
-
}
|
|
89
|
-
public static setApplication(app: Application): void {
|
|
90
|
-
return getImpl('internal').setApplication(app);
|
|
91
|
-
}
|
|
92
|
-
public static setFilter(filterFunction: <T>(record: T) => Promise<T>): void {
|
|
93
|
-
return getImpl('internal').setFilter(filterFunction);
|
|
94
|
-
}
|
|
95
|
-
public static setUser(user: User, version?: string): void {
|
|
96
|
-
return getImpl('internal').setUser(user, version);
|
|
97
|
-
}
|
|
98
|
-
public static clearUser(version?: string): void {
|
|
99
|
-
return getImpl('internal').clearUser(version);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|