sfdx-browserforce-plugin 5.2.0-next.5 → 6.0.0-next.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/lib/browserforce-command.js +4 -1
- package/lib/browserforce-command.js.map +1 -1
- package/lib/browserforce.d.ts +0 -1
- package/lib/browserforce.js +88 -23
- package/lib/browserforce.js.map +1 -1
- package/lib/plugins/activity-settings/index.js +93 -20
- package/lib/plugins/activity-settings/index.js.map +1 -1
- package/lib/plugins/company-information/index.js +104 -31
- package/lib/plugins/company-information/index.js.map +1 -1
- package/lib/plugins/customer-portal/available-custom-objects/index.js +166 -71
- package/lib/plugins/customer-portal/available-custom-objects/index.js.map +1 -1
- package/lib/plugins/customer-portal/enabled/index.js +73 -10
- package/lib/plugins/customer-portal/enabled/index.js.map +1 -1
- package/lib/plugins/customer-portal/portals/index.js +196 -101
- package/lib/plugins/customer-portal/portals/index.js.map +1 -1
- package/lib/plugins/density-settings/index.js +95 -21
- package/lib/plugins/density-settings/index.js.map +1 -1
- package/lib/plugins/email-deliverability/index.js +94 -21
- package/lib/plugins/email-deliverability/index.js.map +1 -1
- package/lib/plugins/high-velocity-sales-settings/index.js +67 -2
- package/lib/plugins/high-velocity-sales-settings/index.js.map +1 -1
- package/lib/plugins/high-velocity-sales-settings/page.js +0 -1
- package/lib/plugins/high-velocity-sales-settings/page.js.map +1 -1
- package/lib/plugins/history-tracking/index.js +162 -83
- package/lib/plugins/history-tracking/index.js.map +1 -1
- package/lib/plugins/home-page-layouts/index.js +129 -57
- package/lib/plugins/home-page-layouts/index.js.map +1 -1
- package/lib/plugins/lightning-experience-settings/index.js +85 -12
- package/lib/plugins/lightning-experience-settings/index.js.map +1 -1
- package/lib/plugins/linkedin-sales-navigator-settings/index.js +84 -6
- package/lib/plugins/linkedin-sales-navigator-settings/index.js.map +1 -1
- package/lib/plugins/linkedin-sales-navigator-settings/page.js +0 -2
- package/lib/plugins/linkedin-sales-navigator-settings/page.js.map +1 -1
- package/lib/plugins/omni-channel-settings/index.js +88 -13
- package/lib/plugins/omni-channel-settings/index.js.map +1 -1
- package/lib/plugins/opportunity-splits/index.js +103 -18
- package/lib/plugins/opportunity-splits/index.js.map +1 -1
- package/lib/plugins/permission-sets/service-presence-status/index.js +124 -51
- package/lib/plugins/permission-sets/service-presence-status/index.js.map +1 -1
- package/lib/plugins/picklists/field-dependencies/index.js +86 -4
- package/lib/plugins/picklists/field-dependencies/index.js.map +1 -1
- package/lib/plugins/picklists/field-dependencies/pages.js +0 -1
- package/lib/plugins/picklists/field-dependencies/pages.js.map +1 -1
- package/lib/plugins/picklists/index.js +128 -55
- package/lib/plugins/picklists/index.js.map +1 -1
- package/lib/plugins/record-types/index.js +73 -10
- package/lib/plugins/record-types/index.js.map +1 -1
- package/lib/plugins/record-types/pages.js +0 -1
- package/lib/plugins/record-types/pages.js.map +1 -1
- package/lib/plugins/relate-contact-to-multiple-accounts/index.js +102 -28
- package/lib/plugins/relate-contact-to-multiple-accounts/index.js.map +1 -1
- package/lib/plugins/reports-and-dashboards/folder-sharing/index.js +107 -35
- package/lib/plugins/reports-and-dashboards/folder-sharing/index.js.map +1 -1
- package/lib/plugins/salesforce-cpq-config/index.js +249 -165
- package/lib/plugins/salesforce-cpq-config/index.js.map +1 -1
- package/lib/plugins/salesforce-to-salesforce/index.js +93 -20
- package/lib/plugins/salesforce-to-salesforce/index.js.map +1 -1
- package/lib/plugins/security/authentication-configuration/index.js +121 -49
- package/lib/plugins/security/authentication-configuration/index.js.map +1 -1
- package/lib/plugins/security/certificate-and-key-management/index.js +142 -57
- package/lib/plugins/security/certificate-and-key-management/index.js.map +1 -1
- package/lib/plugins/service-channels/capacity/index.js +173 -102
- package/lib/plugins/service-channels/capacity/index.js.map +1 -1
- package/lib/plugins/slack/index.js +101 -27
- package/lib/plugins/slack/index.js.map +1 -1
- package/lib/plugins/user-access-policies/index.js +96 -24
- package/lib/plugins/user-access-policies/index.js.map +1 -1
- package/lib/plugins/user-access-policies/page.js +0 -6
- package/lib/plugins/user-access-policies/page.js.map +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
|
@@ -1,24 +1,87 @@
|
|
|
1
|
+
var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
|
|
2
|
+
if (value !== null && value !== void 0) {
|
|
3
|
+
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
|
4
|
+
var dispose, inner;
|
|
5
|
+
if (async) {
|
|
6
|
+
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
7
|
+
dispose = value[Symbol.asyncDispose];
|
|
8
|
+
}
|
|
9
|
+
if (dispose === void 0) {
|
|
10
|
+
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
11
|
+
dispose = value[Symbol.dispose];
|
|
12
|
+
if (async) inner = dispose;
|
|
13
|
+
}
|
|
14
|
+
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
|
15
|
+
if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
|
|
16
|
+
env.stack.push({ value: value, dispose: dispose, async: async });
|
|
17
|
+
}
|
|
18
|
+
else if (async) {
|
|
19
|
+
env.stack.push({ async: true });
|
|
20
|
+
}
|
|
21
|
+
return value;
|
|
22
|
+
};
|
|
23
|
+
var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) {
|
|
24
|
+
return function (env) {
|
|
25
|
+
function fail(e) {
|
|
26
|
+
env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
27
|
+
env.hasError = true;
|
|
28
|
+
}
|
|
29
|
+
var r, s = 0;
|
|
30
|
+
function next() {
|
|
31
|
+
while (r = env.stack.pop()) {
|
|
32
|
+
try {
|
|
33
|
+
if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
|
|
34
|
+
if (r.dispose) {
|
|
35
|
+
var result = r.dispose.call(r.value);
|
|
36
|
+
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
|
|
37
|
+
}
|
|
38
|
+
else s |= 1;
|
|
39
|
+
}
|
|
40
|
+
catch (e) {
|
|
41
|
+
fail(e);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
|
|
45
|
+
if (env.hasError) throw env.error;
|
|
46
|
+
}
|
|
47
|
+
return next();
|
|
48
|
+
};
|
|
49
|
+
})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
50
|
+
var e = new Error(message);
|
|
51
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
52
|
+
});
|
|
1
53
|
import { waitForPageErrors } from '../../browserforce.js';
|
|
2
54
|
import { BrowserforcePlugin } from '../../plugin.js';
|
|
3
|
-
const BASE_PATH =
|
|
55
|
+
const BASE_PATH = `setup/ui/assignhomelayoutedit.jsp?retURL=${encodeURIComponent('/setup/forcecomHomepage.apexp')}`;
|
|
4
56
|
const BASE_SELECTOR = 'table.detailList';
|
|
5
57
|
const SAVE_BUTTON_SELECTOR = 'input[name="save"]';
|
|
6
58
|
export class HomePageLayouts extends BrowserforcePlugin {
|
|
7
59
|
async retrieve() {
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
.locator('table.detailList tbody tr td
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
60
|
+
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
61
|
+
try {
|
|
62
|
+
const page = __addDisposableResource(env_1, await this.browserforce.openPage(BASE_PATH), true);
|
|
63
|
+
await page.locator(BASE_SELECTOR).waitFor();
|
|
64
|
+
const profiles = (await page.locator('table.detailList tbody tr td label').allTextContents()).map((label) => label.replace(/^\*/, '')); // removing * from assistiveText
|
|
65
|
+
const layouts = (await page
|
|
66
|
+
.locator('table.detailList tbody tr td select option:checked')
|
|
67
|
+
.allTextContents()).map((layout) => (layout === 'Home Page Default' ? '' : layout)); // value is "default" instead of an id
|
|
68
|
+
const homePageLayoutAssignments = profiles.map((profile, i) => ({
|
|
69
|
+
profile,
|
|
70
|
+
layout: layouts[i],
|
|
71
|
+
}));
|
|
72
|
+
return {
|
|
73
|
+
homePageLayoutAssignments,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
catch (e_1) {
|
|
77
|
+
env_1.error = e_1;
|
|
78
|
+
env_1.hasError = true;
|
|
79
|
+
}
|
|
80
|
+
finally {
|
|
81
|
+
const result_1 = __disposeResources(env_1);
|
|
82
|
+
if (result_1)
|
|
83
|
+
await result_1;
|
|
84
|
+
}
|
|
22
85
|
}
|
|
23
86
|
diff(source, target) {
|
|
24
87
|
target.homePageLayoutAssignments.sort(compareAssignment);
|
|
@@ -29,50 +92,59 @@ export class HomePageLayouts extends BrowserforcePlugin {
|
|
|
29
92
|
return super.diff(source, target);
|
|
30
93
|
}
|
|
31
94
|
async apply(config) {
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
95
|
+
const env_2 = { stack: [], error: void 0, hasError: false };
|
|
96
|
+
try {
|
|
97
|
+
const profilesList = config.homePageLayoutAssignments
|
|
98
|
+
.map((assignment) => {
|
|
99
|
+
return `'${assignment.profile}'`;
|
|
100
|
+
})
|
|
101
|
+
.join(',');
|
|
102
|
+
const layoutsList = config.homePageLayoutAssignments
|
|
103
|
+
.map((assignment) => {
|
|
104
|
+
return `'${assignment.layout}'`;
|
|
105
|
+
})
|
|
106
|
+
.join(',');
|
|
107
|
+
const profiles = await this.org
|
|
108
|
+
.getConnection()
|
|
109
|
+
.tooling.query(`SELECT Id, Name FROM Profile WHERE Name IN (${profilesList})`);
|
|
110
|
+
const homePageLayouts = await this.org
|
|
111
|
+
.getConnection()
|
|
112
|
+
.tooling.query(`SELECT Id, Name FROM HomePageLayout WHERE Name IN (${layoutsList})`);
|
|
113
|
+
const page = __addDisposableResource(env_2, await this.browserforce.openPage(BASE_PATH), true);
|
|
114
|
+
await page.locator(BASE_SELECTOR).waitFor();
|
|
115
|
+
for (const assignment of config.homePageLayoutAssignments) {
|
|
116
|
+
const homePageLayoutName = assignment.layout;
|
|
117
|
+
const profile = profiles.records.find((p) => p.Name === assignment.profile);
|
|
118
|
+
if (!profile) {
|
|
119
|
+
throw new Error(`could not find profile '${assignment.profile}'`);
|
|
120
|
+
}
|
|
121
|
+
let homePageLayout = homePageLayouts.records.find((l) => l.Name === homePageLayoutName);
|
|
122
|
+
if (homePageLayoutName === '') {
|
|
123
|
+
homePageLayout = { Id: 'default', Name: 'default' };
|
|
124
|
+
}
|
|
125
|
+
if (homePageLayout === undefined) {
|
|
126
|
+
throw new Error(`Could not find home page layout "${homePageLayoutName}" in list of home page layouts: ${homePageLayouts.records.map((l) => l.Name)}`);
|
|
127
|
+
}
|
|
128
|
+
const profileSelector = `select[id='${profile.Id.substring(0, 15)}']`;
|
|
129
|
+
await page
|
|
130
|
+
.locator(profileSelector)
|
|
131
|
+
.selectOption(homePageLayout.Id.substring(0, 15));
|
|
60
132
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
133
|
+
await page.locator(SAVE_BUTTON_SELECTOR).first().click();
|
|
134
|
+
await Promise.race([
|
|
135
|
+
page.waitForURL((url) => url.pathname === '/setup/forcecomHomepage.apexp'),
|
|
136
|
+
waitForPageErrors(page),
|
|
137
|
+
]);
|
|
138
|
+
}
|
|
139
|
+
catch (e_2) {
|
|
140
|
+
env_2.error = e_2;
|
|
141
|
+
env_2.hasError = true;
|
|
142
|
+
}
|
|
143
|
+
finally {
|
|
144
|
+
const result_2 = __disposeResources(env_2);
|
|
145
|
+
if (result_2)
|
|
146
|
+
await result_2;
|
|
69
147
|
}
|
|
70
|
-
await page.locator(SAVE_BUTTON_SELECTOR).first().click();
|
|
71
|
-
await Promise.race([
|
|
72
|
-
page.waitForURL((url) => url.pathname !== `/${BASE_PATH}`),
|
|
73
|
-
waitForPageErrors(page),
|
|
74
|
-
]);
|
|
75
|
-
await page.close();
|
|
76
148
|
}
|
|
77
149
|
}
|
|
78
150
|
function compareAssignment(a, b) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/home-page-layouts/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,SAAS,GAAG,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/home-page-layouts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,SAAS,GAAG,4CAA4C,kBAAkB,CAAC,+BAA+B,CAAC,EAAE,CAAC;AAEpH,MAAM,aAAa,GAAG,kBAAkB,CAAC;AACzC,MAAM,oBAAoB,GAAG,oBAAoB,CAAC;AAmBlD,MAAM,OAAO,eAAgB,SAAQ,kBAAkB;IAC9C,KAAK,CAAC,QAAQ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ACxB,CAA2B,EAC3B,CAA2B;IAE3B,OAAO,GAAG,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,aAAa,CAC7C,GAAG,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,EAAE,EAC1B,IAAI,EACJ,EAAE,OAAO,EAAE,IAAI,EAAE,CAClB,CAAC;AACJ,CAAC"}
|
|
@@ -1,3 +1,55 @@
|
|
|
1
|
+
var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
|
|
2
|
+
if (value !== null && value !== void 0) {
|
|
3
|
+
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
|
4
|
+
var dispose, inner;
|
|
5
|
+
if (async) {
|
|
6
|
+
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
7
|
+
dispose = value[Symbol.asyncDispose];
|
|
8
|
+
}
|
|
9
|
+
if (dispose === void 0) {
|
|
10
|
+
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
11
|
+
dispose = value[Symbol.dispose];
|
|
12
|
+
if (async) inner = dispose;
|
|
13
|
+
}
|
|
14
|
+
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
|
15
|
+
if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
|
|
16
|
+
env.stack.push({ value: value, dispose: dispose, async: async });
|
|
17
|
+
}
|
|
18
|
+
else if (async) {
|
|
19
|
+
env.stack.push({ async: true });
|
|
20
|
+
}
|
|
21
|
+
return value;
|
|
22
|
+
};
|
|
23
|
+
var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) {
|
|
24
|
+
return function (env) {
|
|
25
|
+
function fail(e) {
|
|
26
|
+
env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
27
|
+
env.hasError = true;
|
|
28
|
+
}
|
|
29
|
+
var r, s = 0;
|
|
30
|
+
function next() {
|
|
31
|
+
while (r = env.stack.pop()) {
|
|
32
|
+
try {
|
|
33
|
+
if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
|
|
34
|
+
if (r.dispose) {
|
|
35
|
+
var result = r.dispose.call(r.value);
|
|
36
|
+
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
|
|
37
|
+
}
|
|
38
|
+
else s |= 1;
|
|
39
|
+
}
|
|
40
|
+
catch (e) {
|
|
41
|
+
fail(e);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
|
|
45
|
+
if (env.hasError) throw env.error;
|
|
46
|
+
}
|
|
47
|
+
return next();
|
|
48
|
+
};
|
|
49
|
+
})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
50
|
+
var e = new Error(message);
|
|
51
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
52
|
+
});
|
|
1
53
|
import { BrowserforcePlugin } from '../../plugin.js';
|
|
2
54
|
const BASE_PATH = 'lightning/setup/ThemingAndBranding/home';
|
|
3
55
|
// Spring 25 changed "lightning-datatable" to "one-theme-datatable"
|
|
@@ -6,19 +58,41 @@ const DEVELOPER_NAMES_SELECTOR = `${THEME_ROW_SELECTOR} > td:nth-child(2) > ligh
|
|
|
6
58
|
const STATES_SELECTOR = `${THEME_ROW_SELECTOR} > td:nth-child(6) > lightning-primitive-cell-factory`;
|
|
7
59
|
export class LightningExperienceSettings extends BrowserforcePlugin {
|
|
8
60
|
async retrieve() {
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
61
|
+
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
62
|
+
try {
|
|
63
|
+
const page = __addDisposableResource(env_1, await this.browserforce.openPage(BASE_PATH), true);
|
|
64
|
+
const themes = await this.getThemeData(page);
|
|
65
|
+
const activeTheme = themes.find((theme) => theme.isActive);
|
|
66
|
+
const response = {
|
|
67
|
+
activeThemeName: activeTheme.developerName,
|
|
68
|
+
};
|
|
69
|
+
return response;
|
|
70
|
+
}
|
|
71
|
+
catch (e_1) {
|
|
72
|
+
env_1.error = e_1;
|
|
73
|
+
env_1.hasError = true;
|
|
74
|
+
}
|
|
75
|
+
finally {
|
|
76
|
+
const result_1 = __disposeResources(env_1);
|
|
77
|
+
if (result_1)
|
|
78
|
+
await result_1;
|
|
79
|
+
}
|
|
17
80
|
}
|
|
18
81
|
async apply(config) {
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
82
|
+
const env_2 = { stack: [], error: void 0, hasError: false };
|
|
83
|
+
try {
|
|
84
|
+
const page = __addDisposableResource(env_2, await this.browserforce.openPage(BASE_PATH), true);
|
|
85
|
+
await this.setActiveTheme(page, config.activeThemeName);
|
|
86
|
+
}
|
|
87
|
+
catch (e_2) {
|
|
88
|
+
env_2.error = e_2;
|
|
89
|
+
env_2.hasError = true;
|
|
90
|
+
}
|
|
91
|
+
finally {
|
|
92
|
+
const result_2 = __disposeResources(env_2);
|
|
93
|
+
if (result_2)
|
|
94
|
+
await result_2;
|
|
95
|
+
}
|
|
22
96
|
}
|
|
23
97
|
async getThemeData(page) {
|
|
24
98
|
await page.locator(THEME_ROW_SELECTOR).first().waitFor();
|
|
@@ -46,7 +120,6 @@ export class LightningExperienceSettings extends BrowserforcePlugin {
|
|
|
46
120
|
const data = await this.getThemeData(page);
|
|
47
121
|
const theme = data.find((theme) => theme.developerName === themeDeveloperName);
|
|
48
122
|
if (!theme) {
|
|
49
|
-
await page.close();
|
|
50
123
|
throw new Error(`Could not find theme "${themeDeveloperName}" in list of themes: ${data.map((d) => d.developerName)}`);
|
|
51
124
|
}
|
|
52
125
|
const newActiveThemeRowLocator = theme.rowLocator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/lightning-experience-settings/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,SAAS,GAAG,yCAAyC,CAAC;AAE5D,mEAAmE;AACnE,MAAM,kBAAkB,GAAG,oCAAoC,CAAC;AAChE,MAAM,wBAAwB,GAAG,GAAG,kBAAkB,qFAAqF,CAAC;AAC5I,MAAM,eAAe,GAAG,GAAG,kBAAkB,uDAAuD,CAAC;AAYrG,MAAM,OAAO,2BAA4B,SAAQ,kBAAkB;IAC1D,KAAK,CAAC,QAAQ
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/lightning-experience-settings/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,SAAS,GAAG,yCAAyC,CAAC;AAE5D,mEAAmE;AACnE,MAAM,kBAAkB,GAAG,oCAAoC,CAAC;AAChE,MAAM,wBAAwB,GAAG,GAAG,kBAAkB,qFAAqF,CAAC;AAC5I,MAAM,eAAe,GAAG,GAAG,kBAAkB,uDAAuD,CAAC;AAYrG,MAAM,OAAO,2BAA4B,SAAQ,kBAAkB;IAC1D,KAAK,CAAC,QAAQ;;;YACnB,MAAY,IAAI,kCAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAA,CAAC;YAC/D,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YAC7C,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;YAC3D,MAAM,QAAQ,GAAG;gBACf,eAAe,EAAE,WAAY,CAAC,aAAa;aAC5C,CAAC;YACF,OAAO,QAAQ,CAAC;;;;;;;;;;;KACjB;IAEM,K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B;oBACvB,iFAAiF;oBACjF,eAAe;oBACf,iBAAiB;oBACjB,IAAI;yBACD,OAAO,CAAC,mDAAmD,CAAC;yBAC5D,KAAK,EAAE;iBACX,CAAC;aACH,CAAC;YACF,gBAAgB,CAAC,KAAK,EAAE;SACzB,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,15 +1,93 @@
|
|
|
1
|
+
var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
|
|
2
|
+
if (value !== null && value !== void 0) {
|
|
3
|
+
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
|
4
|
+
var dispose, inner;
|
|
5
|
+
if (async) {
|
|
6
|
+
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
7
|
+
dispose = value[Symbol.asyncDispose];
|
|
8
|
+
}
|
|
9
|
+
if (dispose === void 0) {
|
|
10
|
+
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
11
|
+
dispose = value[Symbol.dispose];
|
|
12
|
+
if (async) inner = dispose;
|
|
13
|
+
}
|
|
14
|
+
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
|
15
|
+
if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
|
|
16
|
+
env.stack.push({ value: value, dispose: dispose, async: async });
|
|
17
|
+
}
|
|
18
|
+
else if (async) {
|
|
19
|
+
env.stack.push({ async: true });
|
|
20
|
+
}
|
|
21
|
+
return value;
|
|
22
|
+
};
|
|
23
|
+
var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) {
|
|
24
|
+
return function (env) {
|
|
25
|
+
function fail(e) {
|
|
26
|
+
env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
27
|
+
env.hasError = true;
|
|
28
|
+
}
|
|
29
|
+
var r, s = 0;
|
|
30
|
+
function next() {
|
|
31
|
+
while (r = env.stack.pop()) {
|
|
32
|
+
try {
|
|
33
|
+
if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
|
|
34
|
+
if (r.dispose) {
|
|
35
|
+
var result = r.dispose.call(r.value);
|
|
36
|
+
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
|
|
37
|
+
}
|
|
38
|
+
else s |= 1;
|
|
39
|
+
}
|
|
40
|
+
catch (e) {
|
|
41
|
+
fail(e);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
|
|
45
|
+
if (env.hasError) throw env.error;
|
|
46
|
+
}
|
|
47
|
+
return next();
|
|
48
|
+
};
|
|
49
|
+
})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
50
|
+
var e = new Error(message);
|
|
51
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
52
|
+
});
|
|
1
53
|
import { BrowserforcePlugin } from '../../plugin.js';
|
|
2
54
|
import { LinkedInSalesNavigatorPage } from './page.js';
|
|
3
55
|
export class LinkedInSalesNavigatorSettings extends BrowserforcePlugin {
|
|
4
56
|
async retrieve(definition) {
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
57
|
+
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
58
|
+
try {
|
|
59
|
+
const result = { enabled: false };
|
|
60
|
+
const page = __addDisposableResource(env_1, await this.browserforce.openPage(LinkedInSalesNavigatorPage.getUrl()), true);
|
|
61
|
+
const linkedIn = new LinkedInSalesNavigatorPage(page);
|
|
62
|
+
result.enabled = await linkedIn.getStatus();
|
|
63
|
+
return result;
|
|
64
|
+
}
|
|
65
|
+
catch (e_1) {
|
|
66
|
+
env_1.error = e_1;
|
|
67
|
+
env_1.hasError = true;
|
|
68
|
+
}
|
|
69
|
+
finally {
|
|
70
|
+
const result_1 = __disposeResources(env_1);
|
|
71
|
+
if (result_1)
|
|
72
|
+
await result_1;
|
|
73
|
+
}
|
|
9
74
|
}
|
|
10
75
|
async apply(config) {
|
|
11
|
-
const
|
|
12
|
-
|
|
76
|
+
const env_2 = { stack: [], error: void 0, hasError: false };
|
|
77
|
+
try {
|
|
78
|
+
const page = __addDisposableResource(env_2, await this.browserforce.openPage(LinkedInSalesNavigatorPage.getUrl()), true);
|
|
79
|
+
const linkedIn = new LinkedInSalesNavigatorPage(page);
|
|
80
|
+
await linkedIn.setStatus(config.enabled);
|
|
81
|
+
}
|
|
82
|
+
catch (e_2) {
|
|
83
|
+
env_2.error = e_2;
|
|
84
|
+
env_2.hasError = true;
|
|
85
|
+
}
|
|
86
|
+
finally {
|
|
87
|
+
const result_2 = __disposeResources(env_2);
|
|
88
|
+
if (result_2)
|
|
89
|
+
await result_2;
|
|
90
|
+
}
|
|
13
91
|
}
|
|
14
92
|
}
|
|
15
93
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/linkedin-sales-navigator-settings/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AAMvD,MAAM,OAAO,8BAA+B,SAAQ,kBAAkB;IAC7D,KAAK,CAAC,QAAQ,CAAC,UAAmB
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/linkedin-sales-navigator-settings/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AAMvD,MAAM,OAAO,8BAA+B,SAAQ,kBAAkB;IAC7D,KAAK,CAAC,QAAQ,CAAC,UAAmB;;;YACvC,MAAM,MAAM,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;YAClC,MAAY,IAAI,kCAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,0BAA0B,CAAC,MAAM,EAAE,CAAC,OAAA,CAAC;YACzF,MAAM,QAAQ,GAAG,IAAI,0BAA0B,CAAC,IAAI,CAAC,CAAC;YACtD,MAAM,CAAC,OAAO,GAAG,MAAM,QAAQ,CAAC,SAAS,EAAE,CAAC;YAC5C,OAAO,MAAM,CAAC;;;;;;;;;;;KACf;IAEM,KAAK,CAAC,KAAK,CAAC,MAAc;;;YAC/B,MAAY,IAAI,kCAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,0BAA0B,CAAC,MAAM,EAAE,CAAC,OAAA,CAAC;YACzF,MAAM,QAAQ,GAAG,IAAI,0BAA0B,CAAC,IAAI,CAAC,CAAC;YACtD,MAAM,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;;;;;;;;;;;KAC1C;CACF"}
|
|
@@ -14,7 +14,6 @@ export class LinkedInSalesNavigatorPage {
|
|
|
14
14
|
}
|
|
15
15
|
async getStatus() {
|
|
16
16
|
const isEnabled = await this.page.locator(ENABLE_TOGGLE).isChecked();
|
|
17
|
-
await this.page.close();
|
|
18
17
|
return isEnabled;
|
|
19
18
|
}
|
|
20
19
|
async setStatus(enable) {
|
|
@@ -34,7 +33,6 @@ export class LinkedInSalesNavigatorPage {
|
|
|
34
33
|
}
|
|
35
34
|
})(),
|
|
36
35
|
]);
|
|
37
|
-
await this.page.close();
|
|
38
36
|
}
|
|
39
37
|
}
|
|
40
38
|
//# sourceMappingURL=page.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../../src/plugins/linkedin-sales-navigator-settings/page.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,MAAM,aAAa,GACjB,mGAAmG,CAAC;AAEtG,2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,IAAI,CAAC,eAAe,CAAC,uCAAuC,CAAC;gBAClE,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC;aAC7B,CAAC;YACF,CAAC,KAAK,IAAI,EAAE;gBACV,IAAI,MAAM,EAAE,CAAC;oBACX,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,KAAK,EAAE,CAAC;oBAC/C,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,KAAK,EAAE,CAAC;oBAClD,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,KAAK,EAAE,CAAC;gBACjD,CAAC;qBAAM,CAAC;oBACN,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,KAAK,EAAE,CAAC;gBACjD,CAAC;YACH,CAAC,CAAC,EAAE;SACL,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,24 +1,99 @@
|
|
|
1
|
+
var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
|
|
2
|
+
if (value !== null && value !== void 0) {
|
|
3
|
+
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
|
4
|
+
var dispose, inner;
|
|
5
|
+
if (async) {
|
|
6
|
+
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
7
|
+
dispose = value[Symbol.asyncDispose];
|
|
8
|
+
}
|
|
9
|
+
if (dispose === void 0) {
|
|
10
|
+
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
11
|
+
dispose = value[Symbol.dispose];
|
|
12
|
+
if (async) inner = dispose;
|
|
13
|
+
}
|
|
14
|
+
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
|
15
|
+
if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
|
|
16
|
+
env.stack.push({ value: value, dispose: dispose, async: async });
|
|
17
|
+
}
|
|
18
|
+
else if (async) {
|
|
19
|
+
env.stack.push({ async: true });
|
|
20
|
+
}
|
|
21
|
+
return value;
|
|
22
|
+
};
|
|
23
|
+
var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) {
|
|
24
|
+
return function (env) {
|
|
25
|
+
function fail(e) {
|
|
26
|
+
env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
27
|
+
env.hasError = true;
|
|
28
|
+
}
|
|
29
|
+
var r, s = 0;
|
|
30
|
+
function next() {
|
|
31
|
+
while (r = env.stack.pop()) {
|
|
32
|
+
try {
|
|
33
|
+
if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
|
|
34
|
+
if (r.dispose) {
|
|
35
|
+
var result = r.dispose.call(r.value);
|
|
36
|
+
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
|
|
37
|
+
}
|
|
38
|
+
else s |= 1;
|
|
39
|
+
}
|
|
40
|
+
catch (e) {
|
|
41
|
+
fail(e);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
|
|
45
|
+
if (env.hasError) throw env.error;
|
|
46
|
+
}
|
|
47
|
+
return next();
|
|
48
|
+
};
|
|
49
|
+
})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
50
|
+
var e = new Error(message);
|
|
51
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
52
|
+
});
|
|
1
53
|
import { BrowserforcePlugin } from '../../plugin.js';
|
|
2
54
|
const BASE_PATH = 'omnichannel/settings.apexp';
|
|
3
55
|
const SAVE_BUTTON_SELECTOR = 'input[id$=":save"]';
|
|
4
56
|
const STATUS_CAPACITY_TOGGLE_SELECTOR = 'input[id$=":toggleOmniStatusCapModelPref"]';
|
|
5
57
|
export class OmniChannelSettings extends BrowserforcePlugin {
|
|
6
58
|
async retrieve(definition) {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
.
|
|
10
|
-
|
|
11
|
-
|
|
59
|
+
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
60
|
+
try {
|
|
61
|
+
const page = __addDisposableResource(env_1, await this.browserforce.openPage(BASE_PATH), true);
|
|
62
|
+
const enableStatusBasedCapacityModel = await page
|
|
63
|
+
.locator(STATUS_CAPACITY_TOGGLE_SELECTOR)
|
|
64
|
+
.isChecked();
|
|
65
|
+
return { enableStatusBasedCapacityModel };
|
|
66
|
+
}
|
|
67
|
+
catch (e_1) {
|
|
68
|
+
env_1.error = e_1;
|
|
69
|
+
env_1.hasError = true;
|
|
70
|
+
}
|
|
71
|
+
finally {
|
|
72
|
+
const result_1 = __disposeResources(env_1);
|
|
73
|
+
if (result_1)
|
|
74
|
+
await result_1;
|
|
75
|
+
}
|
|
12
76
|
}
|
|
13
77
|
async apply(config) {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
78
|
+
const env_2 = { stack: [], error: void 0, hasError: false };
|
|
79
|
+
try {
|
|
80
|
+
const page = __addDisposableResource(env_2, await this.browserforce.openPage(BASE_PATH), true);
|
|
81
|
+
await page.locator(STATUS_CAPACITY_TOGGLE_SELECTOR).click();
|
|
82
|
+
await page.locator(SAVE_BUTTON_SELECTOR).click();
|
|
83
|
+
// omnichannel/settings.apexp
|
|
84
|
+
// ->
|
|
85
|
+
// omnichannel/settings.apexp?setupid=OmniChannelSettings
|
|
86
|
+
await page.waitForURL((url) => url.searchParams.has('setupid', 'OmniChannelSettings'));
|
|
87
|
+
}
|
|
88
|
+
catch (e_2) {
|
|
89
|
+
env_2.error = e_2;
|
|
90
|
+
env_2.hasError = true;
|
|
91
|
+
}
|
|
92
|
+
finally {
|
|
93
|
+
const result_2 = __disposeResources(env_2);
|
|
94
|
+
if (result_2)
|
|
95
|
+
await result_2;
|
|
96
|
+
}
|
|
22
97
|
}
|
|
23
98
|
}
|
|
24
99
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/omni-channel-settings/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,SAAS,GAAG,4BAA4B,CAAC;AAE/C,MAAM,oBAAoB,GAAG,oBAAoB,CAAC;AAClD,MAAM,+BAA+B,GACnC,4CAA4C,CAAC;AAM/C,MAAM,OAAO,mBAAoB,SAAQ,kBAAkB;IAClD,KAAK,CAAC,QAAQ,CAAC,UAAmB
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/omni-channel-settings/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,SAAS,GAAG,4BAA4B,CAAC;AAE/C,MAAM,oBAAoB,GAAG,oBAAoB,CAAC;AAClD,MAAM,+BAA+B,GACnC,4CAA4C,CAAC;AAM/C,MAAM,OAAO,mBAAoB,SAAQ,kBAAkB;IAClD,KAAK,CAAC,QAAQ,CAAC,UAAmB;;;YACvC,MAAY,IAAI,kCAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAA,CAAC;YAC/D,MAAM,8BAA8B,GAAG,MAAM,IAAI;iBAC9C,OAAO,CAAC,+BAA+B,CAAC;iBACxC,SAAS,EAAE,CAAC;YACf,OAAO,EAAE,8BAA8B,EAAE,CAAC;;;;;;;;;;;KAC3C;IAEM,KAAK,CAAC,KAAK,CAAC,MAAc;;;YAC/B,MAAY,IAAI,kCAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAA,CAAC;YAC/D,MAAM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