weg-shared-layout 0.0.3 → 0.0.5
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/dist/types/components/weg-footer/weg-footer.d.ts +32 -47
- package/dist/types/components.d.ts +5 -79
- package/dist/weg-shared-layout/index-C8BdwtPR.js +4625 -0
- package/dist/weg-shared-layout/index-C8BdwtPR.js.map +1 -0
- package/dist/weg-shared-layout/index.esm.js +14 -1
- package/dist/weg-shared-layout/index.esm.js.map +1 -0
- package/dist/weg-shared-layout/my-component.entry.js +34 -0
- package/dist/weg-shared-layout/my-component.entry.js.map +1 -0
- package/dist/{cjs/index.cjs.js → weg-shared-layout/utils-DhW431pq.js} +4 -3
- package/dist/weg-shared-layout/utils-DhW431pq.js.map +1 -0
- package/dist/{esm/my-component_2.entry.js → weg-shared-layout/weg-footer.entry.js} +62 -138
- package/dist/weg-shared-layout/weg-footer.entry.js.map +1 -0
- package/dist/weg-shared-layout/weg-shared-layout.esm.js +50 -1
- package/dist/weg-shared-layout/weg-shared-layout.esm.js.map +1 -0
- package/package.json +5 -3
- package/readme.md +95 -95
- package/src/assets/dummy-data.json +20 -0
- package/dist/cjs/app-globals-V2Kpy_OQ.js +0 -5
- package/dist/cjs/index-CmiaQ_Dj.js +0 -1612
- package/dist/cjs/loader.cjs.js +0 -13
- package/dist/cjs/my-component_2.cjs.entry.js +0 -249
- package/dist/cjs/weg-shared-layout.cjs.js +0 -25
- package/dist/collection/collection-manifest.json +0 -14
- package/dist/collection/components/my-component/my-component.cmp.test.js +0 -27
- package/dist/collection/components/my-component/my-component.css +0 -3
- package/dist/collection/components/my-component/my-component.js +0 -95
- package/dist/collection/components/weg-footer/icons/instagram.svg +0 -5
- package/dist/collection/components/weg-footer/icons/linkedin.svg +0 -3
- package/dist/collection/components/weg-footer/icons/tiktok.svg +0 -3
- package/dist/collection/components/weg-footer/icons/youtube.svg +0 -4
- package/dist/collection/components/weg-footer/weg-footer.css +0 -236
- package/dist/collection/components/weg-footer/weg-footer.js +0 -412
- package/dist/collection/index.js +0 -10
- package/dist/collection/utils/utils.js +0 -3
- package/dist/collection/utils/utils.unit.test.js +0 -16
- package/dist/components/index.js +0 -1
- package/dist/components/my-component.js +0 -1
- package/dist/components/p-BTQYW5OR.js +0 -1
- package/dist/components/weg-footer.js +0 -1
- package/dist/esm/app-globals-DQuL1Twl.js +0 -3
- package/dist/esm/index-QiJxC4Ow.js +0 -1606
- package/dist/esm/index.js +0 -5
- package/dist/esm/loader.js +0 -11
- package/dist/esm/weg-shared-layout.js +0 -21
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/weg-shared-layout/p-67d9c345.entry.js +0 -1
- package/dist/weg-shared-layout/p-DQuL1Twl.js +0 -1
- package/dist/weg-shared-layout/p-QiJxC4Ow.js +0 -2
|
@@ -1,56 +1,41 @@
|
|
|
1
|
-
type
|
|
1
|
+
type LayoutData = {
|
|
2
|
+
header?: unknown;
|
|
3
|
+
footer?: Partial<{
|
|
4
|
+
social: unknown;
|
|
5
|
+
standardLinks: unknown;
|
|
6
|
+
credits: unknown;
|
|
7
|
+
copyright: unknown;
|
|
8
|
+
}>;
|
|
9
|
+
};
|
|
2
10
|
export declare class WegFooter {
|
|
3
11
|
/**
|
|
4
|
-
*
|
|
5
|
-
* `additional` matches the "multiple link sets" footer.
|
|
6
|
-
*/
|
|
7
|
-
variant: FooterVariant;
|
|
8
|
-
companyName: string;
|
|
9
|
-
companyNumber: string;
|
|
10
|
-
/**
|
|
11
|
-
* Optional URL to a JSON file for social links.
|
|
12
|
-
* If provided, this takes precedence over `socialLinks`.
|
|
13
|
-
*/
|
|
14
|
-
socialLinksSrc?: string;
|
|
15
|
-
/**
|
|
16
|
-
* Social links as a JSON string (for HTML usage).
|
|
17
|
-
* Example:
|
|
18
|
-
* `[{"platform":"LinkedIn","href":"https://..."},{"platform":"X","href":"https://..."}]`
|
|
12
|
+
* Layout data, supplied by the host application.
|
|
19
13
|
*
|
|
20
|
-
*
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*/
|
|
37
|
-
additionalGroupsSrc?: string;
|
|
38
|
-
/**
|
|
39
|
-
* Additional footer groups as a JSON string.
|
|
40
|
-
* Example: `[{"id":"set-1","links":[{"label":"Services","href":"/services"}]}]`
|
|
14
|
+
* In JS / framework templates, pass the object directly (e.g. Angular
|
|
15
|
+
* `[data]="layoutData"`, vanilla `el.data = layoutData`).
|
|
16
|
+
*
|
|
17
|
+
* In plain HTML, pass the same JSON as a string attribute.
|
|
18
|
+
*
|
|
19
|
+
* Expected shape:
|
|
20
|
+
* ```json
|
|
21
|
+
* {
|
|
22
|
+
* "footer": {
|
|
23
|
+
* "social": [{ "platform": "LinkedIn", "href": "https://..." }],
|
|
24
|
+
* "standardLinks": [{ "label": "About Us", "href": "/about" }],
|
|
25
|
+
* "credits": "...",
|
|
26
|
+
* "copyright": "..."
|
|
27
|
+
* }
|
|
28
|
+
* }
|
|
29
|
+
* ```
|
|
41
30
|
*/
|
|
42
|
-
|
|
43
|
-
private
|
|
44
|
-
private
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
private loadLinksFromProps;
|
|
48
|
-
componentWillLoad(): Promise<void>;
|
|
49
|
-
protected watchLinks(): Promise<void>;
|
|
31
|
+
data?: LayoutData | string;
|
|
32
|
+
private resolved;
|
|
33
|
+
private resolve;
|
|
34
|
+
componentWillLoad(): void;
|
|
35
|
+
protected watchData(): void;
|
|
50
36
|
private renderLegalText;
|
|
51
37
|
private renderSocialLinks;
|
|
52
|
-
private
|
|
53
|
-
private renderAdditional;
|
|
38
|
+
private renderStandardLinks;
|
|
54
39
|
render(): any;
|
|
55
40
|
}
|
|
56
41
|
export {};
|
|
@@ -22,42 +22,9 @@ export namespace Components {
|
|
|
22
22
|
}
|
|
23
23
|
interface WegFooter {
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* Layout data, supplied by the host application. In JS / framework templates, pass the object directly (e.g. Angular `[data]="layoutData"`, vanilla `el.data = layoutData`). In plain HTML, pass the same JSON as a string attribute. Expected shape: ```json { "footer": { "social": [{ "platform": "LinkedIn", "href": "https://..." }], "standardLinks": [{ "label": "About Us", "href": "/about" }], "credits": "...", "copyright": "..." } } ```
|
|
26
26
|
*/
|
|
27
|
-
"
|
|
28
|
-
/**
|
|
29
|
-
* Optional URL to a JSON file for additional groups. If provided, this takes precedence over `additionalGroups`.
|
|
30
|
-
*/
|
|
31
|
-
"additionalGroupsSrc"?: string;
|
|
32
|
-
/**
|
|
33
|
-
* @default 'WEG'
|
|
34
|
-
*/
|
|
35
|
-
"companyName": string;
|
|
36
|
-
/**
|
|
37
|
-
* @default ''
|
|
38
|
-
*/
|
|
39
|
-
"companyNumber": string;
|
|
40
|
-
/**
|
|
41
|
-
* Social links as a JSON string (for HTML usage). Example: `[{"platform":"LinkedIn","href":"https://..."},{"platform":"X","href":"https://..."}]` Icons render only for items with a non-empty `href`.
|
|
42
|
-
*/
|
|
43
|
-
"socialLinks"?: string;
|
|
44
|
-
/**
|
|
45
|
-
* Optional URL to a JSON file for social links. If provided, this takes precedence over `socialLinks`.
|
|
46
|
-
*/
|
|
47
|
-
"socialLinksSrc"?: string;
|
|
48
|
-
/**
|
|
49
|
-
* Standard footer links as a JSON string. Example: `[{"label":"Privacy Policy","href":"/privacy"}]`
|
|
50
|
-
*/
|
|
51
|
-
"standardLinks"?: string;
|
|
52
|
-
/**
|
|
53
|
-
* Optional URL to a JSON file for standard links. If provided, this takes precedence over `standardLinks`.
|
|
54
|
-
*/
|
|
55
|
-
"standardLinksSrc"?: string;
|
|
56
|
-
/**
|
|
57
|
-
* `standard` matches the "single group of links" footer. `additional` matches the "multiple link sets" footer.
|
|
58
|
-
* @default 'standard'
|
|
59
|
-
*/
|
|
60
|
-
"variant": FooterVariant;
|
|
27
|
+
"data"?: LayoutData | string;
|
|
61
28
|
}
|
|
62
29
|
}
|
|
63
30
|
declare global {
|
|
@@ -95,42 +62,9 @@ declare namespace LocalJSX {
|
|
|
95
62
|
}
|
|
96
63
|
interface WegFooter {
|
|
97
64
|
/**
|
|
98
|
-
*
|
|
99
|
-
*/
|
|
100
|
-
"additionalGroups"?: string;
|
|
101
|
-
/**
|
|
102
|
-
* Optional URL to a JSON file for additional groups. If provided, this takes precedence over `additionalGroups`.
|
|
103
|
-
*/
|
|
104
|
-
"additionalGroupsSrc"?: string;
|
|
105
|
-
/**
|
|
106
|
-
* @default 'WEG'
|
|
107
|
-
*/
|
|
108
|
-
"companyName"?: string;
|
|
109
|
-
/**
|
|
110
|
-
* @default ''
|
|
111
|
-
*/
|
|
112
|
-
"companyNumber"?: string;
|
|
113
|
-
/**
|
|
114
|
-
* Social links as a JSON string (for HTML usage). Example: `[{"platform":"LinkedIn","href":"https://..."},{"platform":"X","href":"https://..."}]` Icons render only for items with a non-empty `href`.
|
|
115
|
-
*/
|
|
116
|
-
"socialLinks"?: string;
|
|
117
|
-
/**
|
|
118
|
-
* Optional URL to a JSON file for social links. If provided, this takes precedence over `socialLinks`.
|
|
119
|
-
*/
|
|
120
|
-
"socialLinksSrc"?: string;
|
|
121
|
-
/**
|
|
122
|
-
* Standard footer links as a JSON string. Example: `[{"label":"Privacy Policy","href":"/privacy"}]`
|
|
123
|
-
*/
|
|
124
|
-
"standardLinks"?: string;
|
|
125
|
-
/**
|
|
126
|
-
* Optional URL to a JSON file for standard links. If provided, this takes precedence over `standardLinks`.
|
|
127
|
-
*/
|
|
128
|
-
"standardLinksSrc"?: string;
|
|
129
|
-
/**
|
|
130
|
-
* `standard` matches the "single group of links" footer. `additional` matches the "multiple link sets" footer.
|
|
131
|
-
* @default 'standard'
|
|
65
|
+
* Layout data, supplied by the host application. In JS / framework templates, pass the object directly (e.g. Angular `[data]="layoutData"`, vanilla `el.data = layoutData`). In plain HTML, pass the same JSON as a string attribute. Expected shape: ```json { "footer": { "social": [{ "platform": "LinkedIn", "href": "https://..." }], "standardLinks": [{ "label": "About Us", "href": "/about" }], "credits": "...", "copyright": "..." } } ```
|
|
132
66
|
*/
|
|
133
|
-
"
|
|
67
|
+
"data"?: LayoutData | string;
|
|
134
68
|
}
|
|
135
69
|
|
|
136
70
|
interface MyComponentAttributes {
|
|
@@ -139,15 +73,7 @@ declare namespace LocalJSX {
|
|
|
139
73
|
"last": string;
|
|
140
74
|
}
|
|
141
75
|
interface WegFooterAttributes {
|
|
142
|
-
"
|
|
143
|
-
"companyName": string;
|
|
144
|
-
"companyNumber": string;
|
|
145
|
-
"socialLinksSrc": string;
|
|
146
|
-
"socialLinks": string;
|
|
147
|
-
"standardLinksSrc": string;
|
|
148
|
-
"standardLinks": string;
|
|
149
|
-
"additionalGroupsSrc": string;
|
|
150
|
-
"additionalGroups": string;
|
|
76
|
+
"data": LayoutData | string;
|
|
151
77
|
}
|
|
152
78
|
|
|
153
79
|
interface IntrinsicElements {
|