@salesforcedevs/arch-components 1.20.17-alpha11 → 1.20.17-alpha13
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/lwc.config.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"modules": [
|
|
3
|
-
{ "dir": "src/modules" }
|
|
3
|
+
{ "dir": "src/modules" },
|
|
4
|
+
{ "npm": "@salesforcedevs/dw-components" },
|
|
5
|
+
{ "npm": "@salesforcedevs/docs-components" },
|
|
6
|
+
{ "npm": "@salesforcedevs/dx-components" }
|
|
4
7
|
],
|
|
5
|
-
"expose": [
|
|
6
|
-
"arch/context"
|
|
7
|
-
]
|
|
8
|
+
"expose": ["dx/alert"]
|
|
8
9
|
}
|
|
9
|
-
|
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/arch-components",
|
|
3
|
-
"version": "1.20.17-
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.20.17-alpha13",
|
|
4
|
+
"description": "DX Lightning web components",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"main": "index.js",
|
|
7
6
|
"engines": {
|
|
8
7
|
"node": "20.x"
|
|
9
8
|
},
|
|
@@ -11,50 +10,39 @@
|
|
|
11
10
|
"access": "public"
|
|
12
11
|
},
|
|
13
12
|
"dependencies": {
|
|
14
|
-
"@
|
|
15
|
-
"@
|
|
16
|
-
"@
|
|
17
|
-
"@
|
|
18
|
-
"@
|
|
19
|
-
"@
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"lwr": "0.11.15",
|
|
47
|
-
"node-cron": "^3.0.3",
|
|
48
|
-
"node-fetch": "^3.3.2",
|
|
49
|
-
"perfect-express-sanitizer": "^2.0.2",
|
|
50
|
-
"promisify": "^0.0.3",
|
|
51
|
-
"rss": "^1.2.2",
|
|
52
|
-
"rss-to-json": "^2.1.1",
|
|
53
|
-
"sass": "^1.72.0",
|
|
54
|
-
"sharp": "^0.29.3",
|
|
55
|
-
"sitemap": "^7.1.1"
|
|
13
|
+
"@coveo/headless": "3.22.2",
|
|
14
|
+
"@floating-ui/dom": "1.5.1",
|
|
15
|
+
"@optimizely/optimizely-sdk": "5.3.0",
|
|
16
|
+
"@shikijs/colorized-brackets": "^3.12.2",
|
|
17
|
+
"@types/throttle-debounce": "5.0.2",
|
|
18
|
+
"@vimeo/player": "2.22.0",
|
|
19
|
+
"classnames": "2.5.1",
|
|
20
|
+
"composed-offset-position": "0.0.4",
|
|
21
|
+
"coveo-search-ui": "2.10113.0",
|
|
22
|
+
"debounce": "1.2.1",
|
|
23
|
+
"js-cookie": "3.0.5",
|
|
24
|
+
"lodash.defaults": "4.2.0",
|
|
25
|
+
"lodash.get": "4.4.2",
|
|
26
|
+
"lodash.kebabcase": "4.1.1",
|
|
27
|
+
"memoize-one": "6.0.0",
|
|
28
|
+
"microtip": "0.2.2",
|
|
29
|
+
"shiki": "^3.12.2",
|
|
30
|
+
"throttle-debounce": "5.0.0",
|
|
31
|
+
"uuid": "9.0.1"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/classnames": "2.3.1",
|
|
35
|
+
"@types/debounce": "1.2.4",
|
|
36
|
+
"@types/js-cookie": "3.0.6",
|
|
37
|
+
"@types/lodash.defaults": "4.2.9",
|
|
38
|
+
"@types/lodash.get": "4.4.9",
|
|
39
|
+
"@types/lodash.kebabcase": "4.1.9",
|
|
40
|
+
"@types/luxon": "3.4.2",
|
|
41
|
+
"@types/uuid": "8.3.4",
|
|
42
|
+
"@types/vimeo__player": "2.18.3",
|
|
43
|
+
"eventsourcemock": "2.0.0",
|
|
44
|
+
"luxon": "3.4.4"
|
|
56
45
|
},
|
|
57
|
-
"devDependencies": {},
|
|
58
46
|
"volta": {
|
|
59
47
|
"node": "20.19.0",
|
|
60
48
|
"yarn": "1.22.19"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<template></template>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { WireAdapter } from 'lwc';
|
|
2
|
+
|
|
3
|
+
export type EffectAdapterConfig<T> = {};
|
|
4
|
+
|
|
5
|
+
export class EffectAdapter<T>
|
|
6
|
+
implements
|
|
7
|
+
WireAdapter<EffectAdapterConfig<T>, EffectAdapterConfig<T>, void>
|
|
8
|
+
{
|
|
9
|
+
constructor(private setValue: (value: EffectAdapterConfig<T>) => void) {}
|
|
10
|
+
|
|
11
|
+
connect() {}
|
|
12
|
+
|
|
13
|
+
disconnect() {}
|
|
14
|
+
|
|
15
|
+
update(config: EffectAdapterConfig<T>) {
|
|
16
|
+
this.setValue(config);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file
|
|
3
|
+
* This element copies the innerHTML of the host (Light DOM)
|
|
4
|
+
* to the innerHTML of the element (Shadow DOM) returned by
|
|
5
|
+
* contentElement() (which must use the lwc:dom="manual" directive).
|
|
6
|
+
*/
|
|
7
|
+
import { LightningElement } from 'lwc';
|
|
8
|
+
|
|
9
|
+
export class ReflectedElement extends LightningElement {
|
|
10
|
+
private observer!: MutationObserver;
|
|
11
|
+
private didSetContent = false;
|
|
12
|
+
|
|
13
|
+
get contentElement(): Element {
|
|
14
|
+
throw new Error('Not Implemented');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
connectedCallback() {
|
|
18
|
+
this.observer = new MutationObserver((e) => {
|
|
19
|
+
this.setContent();
|
|
20
|
+
});
|
|
21
|
+
this.observer.observe(this.template.host, {
|
|
22
|
+
characterData: true,
|
|
23
|
+
childList: true,
|
|
24
|
+
subtree: true
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
disconnectedCallback() {
|
|
29
|
+
this.observer.disconnect();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
innerHTMLSetCallback() {}
|
|
33
|
+
|
|
34
|
+
renderedCallback() {
|
|
35
|
+
if (!this.didSetContent) {
|
|
36
|
+
this.didSetContent = true;
|
|
37
|
+
this.setContent();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
transformHTML(html: string): string {
|
|
42
|
+
return html;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
private setContent() {
|
|
46
|
+
const element = this.contentElement;
|
|
47
|
+
element.innerHTML = this.transformHTML(this.template.host.innerHTML);
|
|
48
|
+
this.innerHTMLSetCallback();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export function assignedSlotNames(template: {
|
|
2
|
+
querySelectorAll(selector: string): NodeList;
|
|
3
|
+
}) {
|
|
4
|
+
let slots = Array.from(
|
|
5
|
+
template.querySelectorAll('slot')
|
|
6
|
+
) as HTMLSlotElement[];
|
|
7
|
+
return slots
|
|
8
|
+
.filter(isSlotAssigned)
|
|
9
|
+
.map((slot) => slot.getAttribute('name') || 'default');
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function isSlotAssigned(slot: HTMLSlotElement): boolean {
|
|
13
|
+
let [element] = slot.assignedElements();
|
|
14
|
+
if (element) {
|
|
15
|
+
if (element.tagName === 'SLOT')
|
|
16
|
+
return isSlotAssigned(element as HTMLSlotElement);
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
return slot.children.length > 0;
|
|
20
|
+
}
|