├── .eslintignore
├── src
├── client
│ ├── modules
│ │ ├── common
│ │ │ ├── modal
│ │ │ │ ├── modal.css
│ │ │ │ ├── modal.js
│ │ │ │ └── modal.html
│ │ │ ├── notfound
│ │ │ │ ├── notfound.css
│ │ │ │ ├── notfound.js
│ │ │ │ └── notfound.html
│ │ │ ├── datapicker
│ │ │ │ ├── datapicker.css
│ │ │ │ └── datapicker.html
│ │ │ ├── savemodal
│ │ │ │ ├── savemodal.css
│ │ │ │ ├── savemodal.js
│ │ │ │ └── savemodal.html
│ │ │ ├── welcomemat
│ │ │ │ ├── welcomemat.css
│ │ │ │ ├── welcomemat.js
│ │ │ │ └── welcomemat.html
│ │ │ ├── schemapicker
│ │ │ │ ├── schemapicker.css
│ │ │ │ └── schemapicker.html
│ │ │ ├── welcomemattile
│ │ │ │ ├── welcomemattile.css
│ │ │ │ ├── welcomemattile.js
│ │ │ │ └── welcomemattile.html
│ │ │ ├── activity
│ │ │ │ ├── testdata
│ │ │ │ │ ├── requestCulture.json
│ │ │ │ │ ├── requestExpressionBuilderAttributes.json
│ │ │ │ │ ├── requestEntryEventDefinitionKey.json
│ │ │ │ │ ├── requestEngineSettings.json
│ │ │ │ │ ├── requestActivityPermissions.json
│ │ │ │ │ ├── requestEndpoints.json
│ │ │ │ │ ├── requestInteractionDefaults.json
│ │ │ │ │ ├── requestTokens.json
│ │ │ │ │ ├── requestSchema.json
│ │ │ │ │ ├── requestTriggerEventDefinition.json
│ │ │ │ │ ├── ready.json
│ │ │ │ │ └── requestDataSources.json
│ │ │ │ ├── activity.css
│ │ │ │ ├── activity.html
│ │ │ │ ├── testHarness.js
│ │ │ │ └── activity.js
│ │ │ ├── illustrationdesert
│ │ │ │ ├── illustrationDesert.css
│ │ │ │ ├── illustrationdesert.css
│ │ │ │ ├── illustrationDesert.js
│ │ │ │ └── illustrationdesert.js
│ │ │ ├── alert
│ │ │ │ ├── alert.css
│ │ │ │ ├── alert.js
│ │ │ │ └── alert.html
│ │ │ ├── toast
│ │ │ │ ├── toast.css
│ │ │ │ ├── toast.html
│ │ │ │ └── toast.js
│ │ │ ├── splitview
│ │ │ │ ├── splitview.css
│ │ │ │ ├── splitview.js
│ │ │ │ └── splitview.html
│ │ │ └── utils
│ │ │ │ └── utils.js
│ │ ├── datatools
│ │ │ ├── datatable
│ │ │ │ ├── datatable.css
│ │ │ │ ├── dataTable.js
│ │ │ │ └── dataTable.html
│ │ │ ├── savemodal
│ │ │ │ ├── savemodal.css
│ │ │ │ ├── savemodal.html
│ │ │ │ └── savemodal.js
│ │ │ ├── dataassessor
│ │ │ │ ├── dataassessor.css
│ │ │ │ └── dataassessor.html
│ │ │ ├── filterpanel
│ │ │ │ ├── filterpanel.css
│ │ │ │ ├── filterPanel.html
│ │ │ │ ├── filterpanel.html
│ │ │ │ ├── filterPanel.js
│ │ │ │ └── filterpanel.js
│ │ │ ├── dataviewer
│ │ │ │ ├── dataviewer.css
│ │ │ │ └── dataviewer.html
│ │ │ ├── fieldoptions
│ │ │ │ ├── fieldoptions.css
│ │ │ │ ├── fieldoptions.js
│ │ │ │ └── fieldoptions.html
│ │ │ └── app
│ │ │ │ ├── app.css
│ │ │ │ ├── app.js
│ │ │ │ └── app.html
│ │ ├── platformevent
│ │ │ └── activity
│ │ │ │ ├── activity.css
│ │ │ │ └── activity.html
│ │ ├── salesforcenotification
│ │ │ └── activity
│ │ │ │ ├── activity.css
│ │ │ │ └── activity.html
│ │ ├── jsconfig.json
│ │ ├── lightningcustom
│ │ │ ├── primitiveIcon
│ │ │ │ ├── primitiveIcon.html
│ │ │ │ ├── primitiveIcon.css
│ │ │ │ └── fetch.js
│ │ │ ├── iconUtils
│ │ │ │ ├── iconUtils.js-meta.xml
│ │ │ │ ├── isIframeInEdge.js
│ │ │ │ ├── fetchSvg.js
│ │ │ │ ├── supportsSvg.js
│ │ │ │ ├── iconUtils.js
│ │ │ │ └── polyfill.js
│ │ │ ├── tree
│ │ │ │ ├── tree.js-meta.xml
│ │ │ │ ├── tree.html
│ │ │ │ ├── treeNode.js
│ │ │ │ └── treeDataGenerator.js
│ │ │ ├── treeItem
│ │ │ │ ├── treeItem.js-meta.xml
│ │ │ │ └── __tests__
│ │ │ │ │ ├── __snapshots__
│ │ │ │ │ └── treeItem.spec.js.snap
│ │ │ │ │ └── treeItem.spec.js
│ │ │ └── utilsPrivate
│ │ │ │ ├── assert.js
│ │ │ │ ├── classListMutation.js
│ │ │ │ ├── scroll.js
│ │ │ │ ├── guid.js
│ │ │ │ ├── smartSetAttribute.js
│ │ │ │ ├── browser.js
│ │ │ │ ├── observers.js
│ │ │ │ ├── videoUtils.js
│ │ │ │ ├── phonify.js
│ │ │ │ ├── normalize.js
│ │ │ │ ├── keyboard.js
│ │ │ │ ├── utility.js
│ │ │ │ ├── eventEmitter.js
│ │ │ │ ├── aria.js
│ │ │ │ ├── linkify.js
│ │ │ │ └── linkUtils.js
│ │ └── salesforceconfig
│ │ │ └── app
│ │ │ ├── app.css
│ │ │ ├── __tests__
│ │ │ └── app.test.js
│ │ │ ├── app.js
│ │ │ └── app.html
│ ├── assets
│ │ ├── lwc.png
│ │ ├── favicon.ico
│ │ ├── GitHub_Logo.png
│ │ ├── notification.png
│ │ ├── Linkedin_Logo.png
│ │ ├── platformeventsicon.png
│ │ ├── ACC_GT_Dimensional_Purple_RGB_pos.png
│ │ └── ACC_GT_Dimensional_Purple_RGB_pos.svg
│ ├── dataTools.js
│ ├── salesforceconfig.js
│ ├── platformeventactivity.js
│ ├── salesforcenotification.js
│ ├── index.js
│ └── index.html
└── server
│ ├── sfmc
│ ├── sfmc-api.js
│ ├── content.js
│ └── data.js
│ ├── utils
│ ├── logger.js
│ └── jwt.js
│ ├── resources
│ └── ISO_639-1.json
│ ├── salesforceconfig
│ └── salesforceconfig-api.js
│ ├── dataTools
│ └── dataTools-api.js
│ ├── api.js
│ ├── platformevent
│ └── platformevent-api.js
│ ├── sfdc
│ └── index.js
│ └── salesforcenotification
│ └── salesforcenotification-api.js
├── .prettierignore
├── .prettierrc
├── certificates
└── buildCert.bat
├── .gitignore
├── test.js
├── example.env
├── .eslintrc.json
├── app.json
├── CONTRIBUTING.md
├── .github
└── workflows
│ └── codeql-analysis.yml
├── package.json
└── webpack.config.js
/.eslintignore:
--------------------------------------------------------------------------------
1 | dist/
--------------------------------------------------------------------------------
/src/client/modules/common/modal/modal.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/client/modules/common/notfound/notfound.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/client/modules/common/datapicker/datapicker.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/client/modules/common/savemodal/savemodal.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/client/modules/common/welcomemat/welcomemat.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/client/modules/datatools/datatable/datatable.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/client/modules/datatools/savemodal/savemodal.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/client/modules/common/schemapicker/schemapicker.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/client/modules/datatools/dataassessor/dataassessor.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/client/modules/datatools/filterpanel/filterpanel.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/client/modules/platformevent/activity/activity.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/client/modules/common/welcomemattile/welcomemattile.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/client/modules/salesforcenotification/activity/activity.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/client/modules/common/activity/testdata/requestCulture.json:
--------------------------------------------------------------------------------
1 | { "culture": "en-NZ" }
2 |
--------------------------------------------------------------------------------
/src/client/modules/common/activity/testdata/requestExpressionBuilderAttributes.json:
--------------------------------------------------------------------------------
1 | []
2 |
--------------------------------------------------------------------------------
/src/client/assets/lwc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Accenture/sfmc-customapp/HEAD/src/client/assets/lwc.png
--------------------------------------------------------------------------------
/src/client/modules/datatools/dataviewer/dataviewer.css:
--------------------------------------------------------------------------------
1 | .scrollinwindow {
2 | overflow-y: scroll;
3 | }
4 |
--------------------------------------------------------------------------------
/src/client/assets/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Accenture/sfmc-customapp/HEAD/src/client/assets/favicon.ico
--------------------------------------------------------------------------------
/src/client/modules/common/illustrationdesert/illustrationDesert.css:
--------------------------------------------------------------------------------
1 | div {
2 | background-color: white;
3 | }
4 |
--------------------------------------------------------------------------------
/src/client/modules/common/illustrationdesert/illustrationdesert.css:
--------------------------------------------------------------------------------
1 | div {
2 | background-color: white;
3 | }
4 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | # Default dist folder
2 | dist/
3 |
4 | # Default resources folder
5 | src/client/assets
6 | src/client/slds
--------------------------------------------------------------------------------
/src/client/assets/GitHub_Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Accenture/sfmc-customapp/HEAD/src/client/assets/GitHub_Logo.png
--------------------------------------------------------------------------------
/src/client/assets/notification.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Accenture/sfmc-customapp/HEAD/src/client/assets/notification.png
--------------------------------------------------------------------------------
/src/client/assets/Linkedin_Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Accenture/sfmc-customapp/HEAD/src/client/assets/Linkedin_Logo.png
--------------------------------------------------------------------------------
/src/client/modules/common/alert/alert.css:
--------------------------------------------------------------------------------
1 | .overlay {
2 | z-index: 999;
3 | position: fixed;
4 | width: 100%;
5 | }
6 |
--------------------------------------------------------------------------------
/src/client/modules/common/toast/toast.css:
--------------------------------------------------------------------------------
1 | .overlay {
2 | z-index: 999;
3 | position: fixed;
4 | width: 100%;
5 | }
6 |
--------------------------------------------------------------------------------
/src/client/assets/platformeventsicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Accenture/sfmc-customapp/HEAD/src/client/assets/platformeventsicon.png
--------------------------------------------------------------------------------
/src/client/modules/common/notfound/notfound.js:
--------------------------------------------------------------------------------
1 | import { LightningElement } from 'lwc';
2 |
3 | export default class NotFound extends LightningElement {}
4 |
--------------------------------------------------------------------------------
/src/client/modules/common/welcomemat/welcomemat.js:
--------------------------------------------------------------------------------
1 | import { LightningElement } from 'lwc';
2 |
3 | export default class WelcomeMat extends LightningElement {}
4 |
--------------------------------------------------------------------------------
/src/client/modules/common/activity/testdata/requestEntryEventDefinitionKey.json:
--------------------------------------------------------------------------------
1 | { "entryEventDefinitionKey": "DEAudience-eabac269-8abc-2a8b-aebb-56d0728fdfb3" }
2 |
--------------------------------------------------------------------------------
/src/client/assets/ACC_GT_Dimensional_Purple_RGB_pos.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Accenture/sfmc-customapp/HEAD/src/client/assets/ACC_GT_Dimensional_Purple_RGB_pos.png
--------------------------------------------------------------------------------
/src/client/modules/common/activity/testdata/requestEngineSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "journeyPauseEnabled": true,
3 | "queueVersion": 1,
4 | "preventPathOptimizerHoldback": false
5 | }
6 |
--------------------------------------------------------------------------------
/src/client/modules/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "experimentalDecorators": true
4 | },
5 | "typeAcquisition": {
6 | "include": ["jest"]
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/src/client/modules/common/activity/testdata/requestActivityPermissions.json:
--------------------------------------------------------------------------------
1 | {
2 | "view": true,
3 | "edit": true,
4 | "failedViewPermissions": [],
5 | "failedEditPermissions": []
6 | }
7 |
--------------------------------------------------------------------------------
/src/client/modules/datatools/datatable/dataTable.js:
--------------------------------------------------------------------------------
1 | import { LightningElement, api } from 'lwc';
2 |
3 | export default class DataTable extends LightningElement {
4 | @api fields;
5 | @api rows;
6 | }
7 |
--------------------------------------------------------------------------------
/src/client/modules/lightningcustom/primitiveIcon/primitiveIcon.html:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/src/client/modules/lightningcustom/iconUtils/iconUtils.js-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | true
4 |
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "trailingComma": "none",
3 | "singleQuote": true,
4 | "tabWidth": 4,
5 | "overrides": [
6 | {
7 | "files": "**/*.html",
8 | "options": { "parser": "lwc" }
9 | }
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/src/client/modules/common/schemapicker/schemapicker.html:
--------------------------------------------------------------------------------
1 |
2 | SchemaPicker
3 |
8 |
9 |
--------------------------------------------------------------------------------
/src/client/modules/lightningcustom/tree/tree.js-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | false
4 | 46.0
5 |
--------------------------------------------------------------------------------
/src/client/modules/datatools/fieldoptions/fieldoptions.css:
--------------------------------------------------------------------------------
1 | .app {
2 | position: fixed;
3 | padding: 0;
4 | margin: 0;
5 |
6 | top: 0;
7 | left: 0;
8 |
9 | width: 100%;
10 | height: 100%;
11 | background: rgba(255, 255, 255, 0.5);
12 | }
13 |
--------------------------------------------------------------------------------
/src/client/modules/lightningcustom/treeItem/treeItem.js-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | false
4 | 46.0
5 |
--------------------------------------------------------------------------------
/src/client/modules/lightningcustom/utilsPrivate/assert.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable no-undef */
2 | export function assert(condition, message) {
3 | if (process.env.NODE_ENV !== 'production') {
4 | if (!condition) {
5 | throw new Error(message);
6 | }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/src/client/modules/datatools/app/app.css:
--------------------------------------------------------------------------------
1 | .logoplaceholder {
2 | width: 20%;
3 | }
4 | .app {
5 | position: z;
6 | padding: 0;
7 | margin: 0;
8 |
9 | top: 0;
10 | left: 0;
11 |
12 | width: 100%;
13 | height: 100%;
14 | background: rgba(255, 255, 255, 0.5);
15 | }
16 |
--------------------------------------------------------------------------------
/src/client/dataTools.js:
--------------------------------------------------------------------------------
1 | import '@lwc/synthetic-shadow';
2 | import { createElement } from 'lwc';
3 | import Home from 'datatools/app';
4 |
5 | const app = createElement('custom-element', { is: Home });
6 | // eslint-disable-next-line @lwc/lwc/no-document-query
7 | document.querySelector('#main').appendChild(app);
8 |
--------------------------------------------------------------------------------
/src/client/salesforceconfig.js:
--------------------------------------------------------------------------------
1 | import '@lwc/synthetic-shadow';
2 | import { createElement } from 'lwc';
3 | import lwcapp from 'salesforceconfig/app';
4 | const app = createElement('custom-element', { is: lwcapp });
5 | // eslint-disable-next-line @lwc/lwc/no-document-query
6 | document.querySelector('#main').appendChild(app);
7 |
--------------------------------------------------------------------------------
/src/client/platformeventactivity.js:
--------------------------------------------------------------------------------
1 | import '@lwc/synthetic-shadow';
2 | import { createElement } from 'lwc';
3 | import lwcapp from 'platformevent/activity';
4 |
5 | const app = createElement('custom-element', { is: lwcapp });
6 | // eslint-disable-next-line @lwc/lwc/no-document-query
7 | document.querySelector('#main').appendChild(app);
8 |
--------------------------------------------------------------------------------
/src/client/salesforcenotification.js:
--------------------------------------------------------------------------------
1 | import '@lwc/synthetic-shadow';
2 | import { createElement } from 'lwc';
3 | import lwcapp from 'salesforcenotification/activity';
4 |
5 | const app = createElement('custom-element', { is: lwcapp });
6 | // eslint-disable-next-line @lwc/lwc/no-document-query
7 | document.querySelector('#main').appendChild(app);
8 |
--------------------------------------------------------------------------------
/src/client/modules/common/activity/testdata/requestEndpoints.json:
--------------------------------------------------------------------------------
1 | {
2 | "restHost": "rest.s7.exacttarget.com",
3 | "stackKey": "S7",
4 | "stackHost": "mc.s7.exacttarget.com",
5 | "ssoUrl": "https://mc.s7.exacttarget.com/cloud/tools/SSO.aspx?env=default&legacy=1&sk=S7",
6 | "fuelapiRestHost": "https://www-mc-s7.exacttargetapis.com/"
7 | }
8 |
--------------------------------------------------------------------------------
/certificates/buildCert.bat:
--------------------------------------------------------------------------------
1 | ECHO Building certificates for HTTPS
2 | openssl genrsa -out private.key 4096
3 | openssl req -new -sha256 -out private.csr -key private.key -config openssl.conf
4 | openssl x509 -req -days 365 -in private.csr -signkey private.key -out private.crt -extensions v3_ca -extfile openssl.conf
5 | openssl x509 -in private.crt -out private.pem -outform PEM
--------------------------------------------------------------------------------
/src/client/index.js:
--------------------------------------------------------------------------------
1 | //webpack requires index.js to build with HtmlWebpackPlugin
2 | import '@lwc/synthetic-shadow';
3 | import { createElement } from 'lwc';
4 | import NotFound from 'common/notfound';
5 |
6 | const app = createElement('custom-element', { is: NotFound });
7 | // eslint-disable-next-line @lwc/lwc/no-document-query
8 | document.querySelector('#main').appendChild(app);
9 |
--------------------------------------------------------------------------------
/src/client/modules/common/activity/activity.css:
--------------------------------------------------------------------------------
1 | /* footer {
2 | background: rgb(216, 237, 255);
3 | } */
4 | .activitycontainer {
5 | background: white;
6 | }
7 |
8 | .activityfooter {
9 | height: 50px;
10 | }
11 | .activityheader {
12 | height: 45px;
13 | }
14 | .activitycontent {
15 | height: calc(100vh - 50px - 45px);
16 | overflow-y: auto;
17 | }
18 |
--------------------------------------------------------------------------------
/src/client/modules/salesforceconfig/app/app.css:
--------------------------------------------------------------------------------
1 | /* footer {
2 | background: rgb(216, 237, 255);
3 | } */
4 | .activitycontainer {
5 | height: 100vh;
6 | background: white;
7 | }
8 |
9 | .activityfooter {
10 | height: 8vh;
11 | }
12 | .activityheader {
13 | height: 5vh;
14 | }
15 | .activitycontent {
16 | height: 85vh;
17 | overflow-y: scroll;
18 | }
19 |
--------------------------------------------------------------------------------
/src/client/modules/common/notfound/notfound.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Ooops, this page doesnt exist :(
6 |
8 |
10 |
--------------------------------------------------------------------------------
/src/client/modules/lightningcustom/primitiveIcon/primitiveIcon.css:
--------------------------------------------------------------------------------
1 | /*
2 | "Temporary" fix for Edge SVG quirk. We can remove this when it is fixed either
3 | at the SLDS level or at the browser level.
4 | https://git.soma.salesforce.com/aura/lightning-global/issues/1349
5 |
6 | Also prevents IE11 from gacking during some interactions
7 | */
8 | _:-ms-lang(x), svg {
9 | pointer-events: none;
10 | }
11 |
--------------------------------------------------------------------------------
/src/client/modules/common/datapicker/datapicker.html:
--------------------------------------------------------------------------------
1 |
2 |
8 |
13 |
14 |
--------------------------------------------------------------------------------
/src/client/modules/lightningcustom/utilsPrivate/classListMutation.js:
--------------------------------------------------------------------------------
1 | export function classListMutation(classList, config) {
2 | Object.keys(config).forEach((key) => {
3 | if (typeof key === 'string' && key.length) {
4 | if (config[key]) {
5 | classList.add(key);
6 | } else {
7 | classList.remove(key);
8 | }
9 | }
10 | });
11 | }
12 |
--------------------------------------------------------------------------------
/src/client/modules/lightningcustom/utilsPrivate/scroll.js:
--------------------------------------------------------------------------------
1 | export function raf(fn) {
2 | let ticking = false;
3 | return function (event) {
4 | if (!ticking) {
5 | // eslint-disable-next-line @lwc/lwc/no-async-operation
6 | requestAnimationFrame(() => {
7 | fn.call(this, event);
8 | ticking = false;
9 | });
10 | }
11 | ticking = true;
12 | };
13 | }
14 |
--------------------------------------------------------------------------------
/src/client/modules/common/activity/testdata/requestInteractionDefaults.json:
--------------------------------------------------------------------------------
1 | {
2 | "email": [
3 | "{{Event.DEAudience-eabac269-8abc-2a8b-aebb-56d0728fdfb3.\"Email\"}}"
4 | ],
5 | "mobileNumber": [],
6 | "transactionKeys": null,
7 | "properties": {
8 | "analyticsTracking": {
9 | "enabled": true,
10 | "analyticsType": "google",
11 | "urlDomainsToTrack": []
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/client/modules/common/activity/testdata/requestTokens.json:
--------------------------------------------------------------------------------
1 | {
2 | "token": "0Wn8fhoj-mmrCC-BN0QELX57zY9162esGaQHolyJgkZniRRr-s7I4jWIJPlotzKUEPx2OEYagK0k3qeIOVxYiTVzbPL-YWMmZ_5xspbBXshelof9ayN94wTaR3O9mHTBY2DOAt3g8QhvCHk1WAMwYQiCWOioprFPAurAcjj_1F2mA40jrbrufpvEUjFO8W3wEAW0vcWCYmVVEugcdevN3hPDrXyE1w53pSANi5tmQqj0_zd95U7cdWufdu65Wut8K9B7aPGG2y-_GfgXleXNtjQ",
3 | "fuel2token": "7QV8UtIxjeKaYNQ9JvNRXN7K",
4 | "expires": 1607881541441,
5 | "stackKey": "S7"
6 | }
7 |
--------------------------------------------------------------------------------
/src/client/modules/lightningcustom/iconUtils/isIframeInEdge.js:
--------------------------------------------------------------------------------
1 | // Taken from https://github.com/jonathantneal/svg4everybody/pull/139
2 | // Remove this iframe-in-edge check once the following is resolved https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8323875/
3 | const isEdgeUA = /\bEdge\/.(\d+)\b/.test(navigator.userAgent);
4 | const inIframe = window.top !== window.self;
5 | const isIframeInEdge = isEdgeUA && inIframe;
6 |
7 | export default isIframeInEdge;
8 |
--------------------------------------------------------------------------------
/src/client/modules/common/illustrationdesert/illustrationDesert.js:
--------------------------------------------------------------------------------
1 | import { LightningElement, api } from 'lwc';
2 |
3 | export default class Illustration extends LightningElement {
4 | @api type;
5 | privateSize = 'slds-illustration_small';
6 | @api
7 | set size(value) {
8 | this.privateSize =
9 | value === 'large'
10 | ? 'slds-illustration slds-illustration_large'
11 | : 'slds-illustration slds-illustration_small';
12 | }
13 | get size() {
14 | return this.privateSize;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/client/modules/common/illustrationdesert/illustrationdesert.js:
--------------------------------------------------------------------------------
1 | import { LightningElement, api } from 'lwc';
2 |
3 | export default class Illustration extends LightningElement {
4 | @api type;
5 | privateSize = 'slds-illustration_small';
6 | @api
7 | set size(value) {
8 | this.privateSize =
9 | value === 'large'
10 | ? 'slds-illustration slds-illustration_large'
11 | : 'slds-illustration slds-illustration_small';
12 | }
13 | get size() {
14 | return this.privateSize;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/client/modules/common/savemodal/savemodal.js:
--------------------------------------------------------------------------------
1 | import { LightningElement, api } from 'lwc';
2 |
3 | export default class Modal extends LightningElement {
4 | @api title;
5 | handleClose() {
6 | this.dispatchEvent(
7 | new CustomEvent('close', {
8 | bubbles: true,
9 | composed: true
10 | })
11 | );
12 | }
13 | handleSave() {
14 | this.dispatchEvent(
15 | new CustomEvent('save', {
16 | bubbles: true,
17 | composed: true
18 | })
19 | );
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Log files
2 | logs
3 | *.log
4 | *-debug.log
5 | *-error.log
6 |
7 | # Standard lib folder
8 | /lib
9 |
10 | # Standard dist folder
11 | /dist
12 |
13 | # Tooling files
14 | node_modules
15 |
16 | # Temp directory
17 | /tmp
18 |
19 | # Jest coverage folder
20 | /coverage
21 |
22 | # MacOS system files
23 | .DS_Store
24 |
25 | # Windows system files
26 | Thumbs.db
27 | ehthumbs.db
28 | [Dd]esktop.ini
29 | $RECYCLE.BIN/
30 |
31 | # Certificate Keys
32 | certificates/private.csr
33 | certificates/private.crt
34 | certificates/private.key
35 | certificates/private.pem
36 |
37 | # dev credentials
38 | .env
--------------------------------------------------------------------------------
/src/client/modules/common/splitview/splitview.css:
--------------------------------------------------------------------------------
1 | .app {
2 | position: fixed;
3 | padding: 0;
4 | margin: 0;
5 |
6 | top: 0;
7 | left: 0;
8 |
9 | width: 100%;
10 | height: 100%;
11 | background: rgba(255, 255, 255, 0.5);
12 | }
13 |
14 | .toggle-button {
15 | height: 100%;
16 | width: 0.75rem;
17 | background: white;
18 | border-radius: 0;
19 | border: 1px solid #dddbda;
20 | }
21 |
22 | .panel {
23 | width: 33vh;
24 | }
25 |
26 | .mainmax {
27 | width: calc(100vw - 0.75rem);
28 | }
29 | .mainmin {
30 | width: calc(100vw - 33vh - 0.75rem);
31 | }
32 |
--------------------------------------------------------------------------------
/src/client/modules/common/welcomemattile/welcomemattile.js:
--------------------------------------------------------------------------------
1 | import { LightningElement, api } from 'lwc';
2 |
3 | export default class WelcomeMatTile extends LightningElement {
4 | @api title;
5 | @api name;
6 | @api description;
7 | @api iconName;
8 |
9 | handleClick(e) {
10 | e.stopPropagation();
11 | e.preventDefault();
12 | this.dispatchEvent(
13 | new CustomEvent('click', {
14 | bubbles: true,
15 | composed: true,
16 | detail: { name: this.name, action: 'selectApp' }
17 | })
18 | );
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/client/modules/common/modal/modal.js:
--------------------------------------------------------------------------------
1 | import { LightningElement, api } from 'lwc';
2 |
3 | export default class Modal extends LightningElement {
4 | @api title;
5 | @api canclose = false;
6 | handleClose() {
7 | this.dispatchEvent(
8 | new CustomEvent('close', {
9 | bubbles: true,
10 | composed: true
11 | })
12 | );
13 | }
14 | handleSave() {
15 | this.dispatchEvent(
16 | new CustomEvent('save', {
17 | bubbles: true,
18 | composed: true
19 | })
20 | );
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/test.js:
--------------------------------------------------------------------------------
1 | require('dotenv').config();
2 | const Redis = require('ioredis');
3 |
4 | // const redisClient = new Redis(
5 | // 'redis://:p2c876e39fbd74d3f63a9e2c557ab2fdd0820bf3beb31d0ed687fd3f90367e5f7@ec2-100-25-126-248.compute-1.amazonaws.com:27999'
6 | // );
7 | console.log(process.env.REDIS_URL);
8 | const redisClient = new Redis(process.env.REDIS_URL);
9 |
10 | async function run() {
11 | try {
12 | const res = await redisClient.set('foo', 'bar'); // returns promise which resolves to string, "OK"
13 | console.log(res);
14 | } catch (ex) {
15 | console.error('CATCH', ex);
16 | }
17 | }
18 | run();
19 |
--------------------------------------------------------------------------------
/src/client/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SFMC LWC
6 |
11 |
12 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/example.env:
--------------------------------------------------------------------------------
1 | SFMC_AUTHURL=https://mc7t1g5l24q50klr8c1gqkvj63d1.auth.marketingcloudapis.com/
2 | SFMC_CLIENTID=kf9p94gkyplazy8lfllwgido
3 | SFMC_CLIENTSECRET=OTi6pOeQkttkaNDzDQVVhgpU
4 | SFMC_JWT=7fNgBrwLrBcAMT1yikyYZcQ5ASFWxh59DrDtZG00MAoK9chBcFS4_pE22GZf-7z00zu6shQ54m3JQnh3yoYUR04ryZhst7gIHNINTZ9_cWH6iIPz28PdwF0yrWodZlbJGWVChjPJHit0zRB3NrYn5Nx4lDJES70rXYZXbfkgVO5Vvc8JGF4XWcklUdvOMRcM3kB7gmHEmV16LuIIqwvvC7e2W7jWHkYfvuQlsxpvxZHwd9eHWR3PcjGAqb1HOw2
5 | SECRET_TOKEN=keyboardcat
6 | PORT=3002
7 | NODE_ENV=development
8 | LOG_LEVEL=silly
9 | REDIS_URL=redis://:p2c876e39fbd74d3f63a9e2c557ab2fdd0820bf3beb31d0ed687fd3f90367e5f7@ec2-100-25-126-248.compute-1.amazonaws.com:27999
--------------------------------------------------------------------------------
/src/client/modules/common/utils/utils.js:
--------------------------------------------------------------------------------
1 | export function getCookieByName(name) {
2 | try {
3 | return document.cookie
4 | .split(';')
5 | .find((row) => row.startsWith(name))
6 | .split('=')[1];
7 | } catch (ex) {
8 | this.dispatchEvent(
9 | new CustomEvent('error', {
10 | bubbles: true,
11 | composed: true,
12 | detail: {
13 | type: 'error',
14 | message: 'Issues with the session, try refreshing the page'
15 | }
16 | })
17 | );
18 | this.isLoading = false;
19 | throw ex;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "plugins": [
3 | "inclusive-language"
4 | ],
5 | "extends": [
6 | "@salesforce/eslint-config-lwc/recommended"
7 | ],
8 | "rules": {
9 | "@lwc/lwc/no-async-operation": "warn",
10 | "@lwc/lwc/no-inner-html": "warn",
11 | "@lwc/lwc/no-document-query": "warn",
12 | "inclusive-language/use-inclusive-words": "error"
13 | },
14 | "overrides": [
15 | {
16 | "files": [
17 | "src/server/**",
18 | "webpack.config.js",
19 | "lwc-services.config.js"
20 | ],
21 | "env": {
22 | "node": true
23 | }
24 | }
25 | ]
26 | }
--------------------------------------------------------------------------------
/src/server/sfmc/sfmc-api.js:
--------------------------------------------------------------------------------
1 | const express = require('express');
2 | const logger = require('../utils/logger');
3 | const core = require('./core.js');
4 | const csurf = require('csurf')();
5 |
6 | const router = express.Router({ strict: true });
7 |
8 | router.get('/auth/response', core.authenicate);
9 |
10 | // used to proxy requests directly to SFMC Rest API
11 | router.use('rest/*', csurf, core.checkAuth, async (req, res) => {
12 | try {
13 | logger.info('proxy router');
14 | const proxyres = await core.restproxy(req);
15 |
16 | res.status(proxyres.status).json(proxyres.data);
17 | } catch (ex) {
18 | res.status(500).json(ex.message);
19 | }
20 | });
21 |
22 | module.exports = router;
23 |
--------------------------------------------------------------------------------
/src/client/modules/lightningcustom/utilsPrivate/guid.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Utility function to generate an unique guid.
3 | * used on state objects to provide a performance aid when iterating
4 | * through the items and marking them for render
5 | * @returns {String} an unique string ID
6 | */
7 | export function guid() {
8 | function s4() {
9 | return Math.floor((1 + Math.random()) * 0x10000)
10 | .toString(16)
11 | .substring(1);
12 | }
13 |
14 | return (
15 | s4() +
16 | s4() +
17 | '-' +
18 | s4() +
19 | '-' +
20 | s4() +
21 | '-' +
22 | s4() +
23 | '-' +
24 | s4() +
25 | s4() +
26 | s4()
27 | );
28 | }
29 |
--------------------------------------------------------------------------------
/src/client/modules/lightningcustom/iconUtils/fetchSvg.js:
--------------------------------------------------------------------------------
1 | // Taken from https://git.soma.salesforce.com/aura/lightning-global/blob/999dc35f948246181510df6e56f45ad4955032c2/src/main/components/lightning/SVGLibrary/stamper.js#L38-L60
2 | export default function fetchSvg(url) {
3 | return new Promise((resolve, reject) => {
4 | const xhr = new XMLHttpRequest();
5 | xhr.open('GET', url);
6 | xhr.send();
7 | xhr.onreadystatechange = () => {
8 | if (xhr.readyState === 4) {
9 | if (xhr.status === 200) {
10 | resolve(xhr.responseText);
11 | } else {
12 | reject(xhr);
13 | }
14 | }
15 | };
16 | });
17 | }
18 |
--------------------------------------------------------------------------------
/src/server/utils/logger.js:
--------------------------------------------------------------------------------
1 | const winston = require('winston');
2 | /*
3 | levels
4 | error: 0,
5 | warn: 1,
6 | info: 2,
7 | http: 3,
8 | verbose: 4,
9 | debug: 5,
10 | silly: 6
11 | */
12 |
13 | const logger = winston.createLogger({
14 | format: winston.format.json(),
15 | defaultMeta: { service: 'sfmc-lwcactivity' },
16 | transports: [
17 | new winston.transports.Console({
18 | level: process.env.LOG_LEVEL || 'info',
19 | handleExceptions: true,
20 | format: winston.format.combine(
21 | winston.format.colorize(),
22 | winston.format.simple()
23 | )
24 | })
25 | ]
26 | });
27 |
28 | module.exports = logger;
29 |
--------------------------------------------------------------------------------
/src/client/modules/lightningcustom/utilsPrivate/smartSetAttribute.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Set an attribute on an element, if it's a normal element
3 | * it will use setAttribute, if it's an LWC component
4 | * it will use the public property
5 | *
6 | * @param {HTMLElement} element The element to act on
7 | * @param {String} attribute the attribute to set
8 | * @param {Any} value the value to set
9 | */
10 | export function smartSetAttribute(element, attribute, value) {
11 | if (element.tagName.match(/^LIGHTNING/i)) {
12 | attribute = attribute.replace(/-\w/g, (m) => m[1].toUpperCase());
13 | element[attribute] = value ? value : null;
14 | } else if (value) {
15 | element.setAttribute(attribute, value);
16 | } else {
17 | element.removeAttribute(attribute);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/server/utils/jwt.js:
--------------------------------------------------------------------------------
1 | const logger = require('./logger');
2 | const jwt = require('jsonwebtoken');
3 | module.exports = {
4 | decode: (req, res, next) => {
5 | if (!req.body) {
6 | res.status(500).send('Body was empty');
7 | }
8 | if (!process.env.SFMC_JWT) {
9 | res.status(500).send('JWT Signature not found to decode');
10 | }
11 | try {
12 | req.body = jwt.verify(
13 | req.body.toString('utf8'),
14 | process.env.SFMC_JWT,
15 | {
16 | algorithm: 'HS256'
17 | }
18 | );
19 | return next();
20 | } catch (ex) {
21 | logger.error('req.body', req.body);
22 | res.status(401).send('JWT was not correctly signed');
23 | }
24 | }
25 | };
26 |
--------------------------------------------------------------------------------
/src/client/modules/common/splitview/splitview.js:
--------------------------------------------------------------------------------
1 | import { LightningElement, track } from 'lwc';
2 | import { classSet } from 'lightning/utils';
3 | export default class SplitView extends LightningElement {
4 | @track isPanelClosed = false;
5 | get computedMainClass() {
6 | let classes = classSet('panel slds-split-view_container');
7 | if (this.isPanelClosed) {
8 | classes.add('mainmax');
9 | } else {
10 | classes.add('mainmin');
11 | }
12 |
13 | return classes.toString();
14 | }
15 |
16 | togglePanel() {
17 | this.isPanelClosed = !this.isPanelClosed;
18 | }
19 | handleOpenPanel() {
20 | this.isPanelClosed = false;
21 | }
22 | handleClosePanel() {
23 | console.log('closing pannel');
24 | this.isPanelClosed = true;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/client/modules/lightningcustom/tree/tree.html:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
10 |
11 |
12 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/src/client/modules/datatools/savemodal/savemodal.html:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
15 |
16 |
17 | Errors:
18 |
19 |
20 | - {error.statusMessage}
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/src/client/modules/lightningcustom/iconUtils/supportsSvg.js:
--------------------------------------------------------------------------------
1 | import isIframeInEdge from './isIframeInEdge';
2 |
3 | // Taken from https://git.soma.salesforce.com/aura/lightning-global/blob/999dc35f948246181510df6e56f45ad4955032c2/src/main/components/lightning/SVGLibrary/stamper.js#L89-L98
4 | // Which looks like it was inspired by https://github.com/jonathantneal/svg4everybody/blob/377d27208fcad3671ed466e9511556cb9c8b5bd8/lib/svg4everybody.js#L92-L107
5 | // Modify at your own risk!
6 | const newerIEUA = /\bTrident\/[567]\b|\bMSIE (?:9|10)\.0\b/;
7 | const webkitUA = /\bAppleWebKit\/(\d+)\b/;
8 | const olderEdgeUA = /\bEdge\/12\.(\d+)\b/;
9 | const isIE =
10 | newerIEUA.test(navigator.userAgent) ||
11 | (navigator.userAgent.match(olderEdgeUA) || [])[1] < 10547 ||
12 | (navigator.userAgent.match(webkitUA) || [])[1] < 537;
13 |
14 | const supportsSvg = !isIE && !isIframeInEdge;
15 |
16 | export default supportsSvg;
17 |
--------------------------------------------------------------------------------
/src/client/modules/common/welcomemat/welcomemat.html:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
10 |
11 |
12 |
13 |
14 |
15 |
18 |
19 |
21 |
22 |
--------------------------------------------------------------------------------
/src/client/modules/common/activity/testdata/requestSchema.json:
--------------------------------------------------------------------------------
1 | {
2 | "schema": [
3 | {
4 | "key": "Event.DEAudience-eabac269-8abc-2a8b-aebb-56d0728fdfb3.ContactKey",
5 | "type": "Text",
6 | "length": 50,
7 | "default": "secondValye",
8 | "isNullable": null,
9 | "isPrimaryKey": true
10 | },
11 | {
12 | "key": "Event.DEAudience-eabac269-8abc-2a8b-aebb-56d0728fdfb3.Email",
13 | "type": "EmailAddress",
14 | "length": 254,
15 | "default": null,
16 | "isNullable": true,
17 | "isPrimaryKey": null
18 | },
19 | {
20 | "key": "Event.DEAudience-eabac269-8abc-2a8b-aebb-56d0728fdfb3.restrictedvalue",
21 | "type": "Text",
22 | "length": 50,
23 | "default": "happy",
24 | "isNullable": true,
25 | "isPrimaryKey": null
26 | }
27 | ]
28 | }
29 |
--------------------------------------------------------------------------------
/src/client/modules/common/alert/alert.js:
--------------------------------------------------------------------------------
1 | import { LightningElement, api, track } from 'lwc';
2 |
3 | export default class Alert extends LightningElement {
4 | visible = false;
5 | @track privateAlert = {};
6 | @api
7 | get alertPayload() {
8 | return this.privateAlert;
9 | }
10 |
11 | set alertPayload(alertPayload) {
12 | console.log('alert message', JSON.stringify(alertPayload));
13 | if (
14 | alertPayload &&
15 | alertPayload.type &&
16 | alertPayload !== this.privateAlert
17 | ) {
18 | this.privateAlert = alertPayload;
19 | this.visible = true;
20 | }
21 | }
22 |
23 | handleDismiss() {
24 | console.log('dismissed');
25 | this.visible = false;
26 | this.privateAlert = {};
27 | }
28 |
29 | handleShow() {
30 | this.visible = true;
31 | }
32 | logSomething(e) {
33 | console.log('logsomething', e);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/client/modules/lightningcustom/utilsPrivate/browser.js:
--------------------------------------------------------------------------------
1 | export const isIE11 = isIE11Test(navigator);
2 | export const isChrome = isChromeTest(navigator);
3 | export const isSafari = isSafariTest(navigator);
4 |
5 | // The following functions are for tests only
6 | export function isIE11Test(navigator) {
7 | // https://stackoverflow.com/questions/17447373/how-can-i-target-only-internet-explorer-11-with-javascript
8 | return /Trident.*rv[ :]*11\./.test(navigator.userAgent);
9 | }
10 |
11 | export function isChromeTest(navigator) {
12 | // https://stackoverflow.com/questions/4565112/javascript-how-to-find-out-if-the-user-browser-is-chrome
13 | return (
14 | /Chrome/.test(navigator.userAgent) &&
15 | /Google Inc/.test(navigator.vendor)
16 | );
17 | }
18 |
19 | export function isSafariTest(navigator) {
20 | // via https://stackoverflow.com/questions/49872111/detect-safari-and-stop-script
21 | return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
22 | }
23 |
--------------------------------------------------------------------------------
/src/client/modules/lightningcustom/utilsPrivate/observers.js:
--------------------------------------------------------------------------------
1 | // hide panel on scroll
2 | const POSITION_CHANGE_THRESHOLD = 5;
3 | export function observePosition(
4 | target,
5 | threshold = POSITION_CHANGE_THRESHOLD,
6 | originalRect,
7 | callback
8 | ) {
9 | // retrieve current bounding client rect of target element
10 | const newBoundingRect = target.getBoundingClientRect();
11 | const newLeft = newBoundingRect.left;
12 | const newTop = newBoundingRect.top;
13 |
14 | // old bounding rect values
15 | const oldLeft = originalRect.left;
16 | const oldTop = originalRect.top;
17 |
18 | // if we have a position change (horizontal or vertical) equal or greater to the threshold then execute the callback
19 | const horizontalShiftDelta = Math.abs(newLeft - oldLeft);
20 | const verticalShiftDelta = Math.abs(newTop - oldTop);
21 |
22 | if (horizontalShiftDelta >= threshold || verticalShiftDelta >= threshold) {
23 | callback();
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/client/modules/common/toast/toast.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
{variant}
6 |
8 |
9 |
{message}
10 |
11 |
12 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/client/modules/datatools/app/app.js:
--------------------------------------------------------------------------------
1 | import { LightningElement, track } from 'lwc';
2 |
3 | export default class App extends LightningElement {
4 | @track currentapp;
5 | @track alert = {};
6 |
7 | get isdataassessor() {
8 | return this.currentapp === 'dataassessor';
9 | }
10 | get isdataviewer() {
11 | return this.currentapp === 'dataviewer';
12 | }
13 |
14 | get isNone() {
15 | return this.currentapp == null;
16 | }
17 |
18 | showAlert(e) {
19 | if (e.detail.type) {
20 | this.alert = e.detail;
21 | } else {
22 | this.alert = {
23 | type: 'error',
24 | message: e.detail.message || JSON.stringify(e.detail.errors)
25 | };
26 | }
27 | }
28 |
29 | selectApp(e) {
30 | if (e.detail && e.detail.name) {
31 | this.currentapp = e.detail.name;
32 | } else {
33 | this.currentapp = null;
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/client/assets/ACC_GT_Dimensional_Purple_RGB_pos.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
20 |
--------------------------------------------------------------------------------
/src/client/modules/common/alert/alert.html:
--------------------------------------------------------------------------------
1 |
7 |
{privateAlert.type}
8 |
15 |
{privateAlert.message}
16 |
17 | Refresh
18 |
19 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/src/client/modules/common/welcomemattile/welcomemattile.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
18 |
19 |
20 |
{title}
21 |
22 | {description}
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/src/client/modules/lightningcustom/utilsPrivate/videoUtils.js:
--------------------------------------------------------------------------------
1 | const ALLOWED_DOMAINS = new Set([
2 | 'www.youtube.com',
3 | 'player.vimeo.com',
4 | 'play.vidyard.com',
5 | 'players.brightcove.net',
6 | 'bcove.video',
7 | 'player.cloudinary.com',
8 | 'fast.wistia.net',
9 | 'i1.adis.ws',
10 | 's1.adis.ws',
11 | 'scormanywhere.secure.force.com',
12 | 'appiniummastertrial.secure.force.com'
13 | ]);
14 |
15 | export function hasOnlyAllowedVideoIframes(htmlString) {
16 | if (htmlString && htmlString.indexOf('