@everymatrix/general-footer-template 1.53.0 → 1.53.11
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/cjs/custom-clock.cjs.entry.js +18 -6
- package/dist/cjs/custom-content-section.cjs.entry.js +81 -33
- package/dist/cjs/general-footer-template.cjs.entry.js +42 -18
- package/dist/cjs/general-footer-template.cjs.js +2 -2
- package/dist/cjs/image-list.cjs.entry.js +9 -4
- package/dist/cjs/{index-465b4ca9.js → index-bd066c40.js} +188 -92
- package/dist/cjs/link-section-list.cjs.entry.js +7 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/custom-clock/custom-clock.js +25 -5
- package/dist/collection/components/custom-content-section/custom-content-section.js +14 -2
- package/dist/collection/components/general-footer-template/general-footer-template.js +71 -17
- package/dist/collection/components/image-list/image-list.js +14 -3
- package/dist/collection/components/link-section-list/link-section-list.js +16 -3
- package/dist/esm/custom-clock.entry.js +18 -6
- package/dist/esm/custom-content-section.entry.js +81 -33
- package/dist/esm/general-footer-template.entry.js +42 -18
- package/dist/esm/general-footer-template.js +3 -3
- package/dist/esm/image-list.entry.js +9 -4
- package/dist/esm/{index-9775f5ee.js → index-f9286439.js} +188 -92
- package/dist/esm/link-section-list.entry.js +7 -4
- package/dist/esm/loader.js +2 -2
- package/dist/general-footer-template/general-footer-template.esm.js +1 -1
- package/dist/general-footer-template/p-9db940d5.entry.js +1 -0
- package/dist/general-footer-template/{p-65805523.entry.js → p-a1261e98.entry.js} +1 -1
- package/dist/general-footer-template/p-bf402206.entry.js +1 -0
- package/dist/general-footer-template/p-c032aa40.entry.js +1 -0
- package/dist/general-footer-template/p-f798fd15.js +2 -0
- package/dist/general-footer-template/{p-6fe03737.entry.js → p-faca7e12.entry.js} +2 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-footer-template/.stencil/packages/stencil/general-footer-template/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-footer-template/.stencil/packages/stencil/general-footer-template/stencil.config.dev.d.ts +2 -0
- package/package.json +1 -1
- package/dist/general-footer-template/p-2fce3c9f.js +0 -2
- package/dist/general-footer-template/p-8a165606.entry.js +0 -1
- package/dist/general-footer-template/p-db5af7af.entry.js +0 -1
- package/dist/general-footer-template/p-e19d7226.entry.js +0 -1
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-footer-template/.stencil/packages/stencil/general-footer-template/stencil.config.d.ts +0 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-footer-template/.stencil/packages/stencil/general-footer-template/stencil.config.dev.d.ts +0 -2
|
@@ -2,9 +2,13 @@ import { h } from "@stencil/core";
|
|
|
2
2
|
import sanitizeHtml from "sanitize-html";
|
|
3
3
|
export class CustomContentSection {
|
|
4
4
|
constructor() {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* If this is true it will emit an event at the moment the content with url its clicked
|
|
7
|
+
*/
|
|
7
8
|
this.navigateViaEvent = false;
|
|
9
|
+
/**
|
|
10
|
+
* Post Message event to be sent on navigation via Event
|
|
11
|
+
*/
|
|
8
12
|
this.postMessageEvent = '';
|
|
9
13
|
}
|
|
10
14
|
render() {
|
|
@@ -44,6 +48,8 @@ export class CustomContentSection {
|
|
|
44
48
|
"tags": [],
|
|
45
49
|
"text": "custom HTML content to be rendered"
|
|
46
50
|
},
|
|
51
|
+
"getter": false,
|
|
52
|
+
"setter": false,
|
|
47
53
|
"attribute": "custom-content",
|
|
48
54
|
"reflect": false
|
|
49
55
|
},
|
|
@@ -61,6 +67,8 @@ export class CustomContentSection {
|
|
|
61
67
|
"tags": [],
|
|
62
68
|
"text": "the links content to be displayed, including titles, url, open target"
|
|
63
69
|
},
|
|
70
|
+
"getter": false,
|
|
71
|
+
"setter": false,
|
|
64
72
|
"attribute": "repeater-content",
|
|
65
73
|
"reflect": false
|
|
66
74
|
},
|
|
@@ -78,6 +86,8 @@ export class CustomContentSection {
|
|
|
78
86
|
"tags": [],
|
|
79
87
|
"text": "If this is true it will emit an event at the moment the content with url its clicked"
|
|
80
88
|
},
|
|
89
|
+
"getter": false,
|
|
90
|
+
"setter": false,
|
|
81
91
|
"attribute": "navigate-via-event",
|
|
82
92
|
"reflect": true,
|
|
83
93
|
"defaultValue": "false"
|
|
@@ -96,6 +106,8 @@ export class CustomContentSection {
|
|
|
96
106
|
"tags": [],
|
|
97
107
|
"text": "Post Message event to be sent on navigation via Event"
|
|
98
108
|
},
|
|
109
|
+
"getter": false,
|
|
110
|
+
"setter": false,
|
|
99
111
|
"attribute": "post-message-event",
|
|
100
112
|
"reflect": true,
|
|
101
113
|
"defaultValue": "''"
|
|
@@ -2,6 +2,47 @@ import { h } from "@stencil/core";
|
|
|
2
2
|
import { componentRules, normalizeRepeaterContent, getDevicePlatform } from "../../utils/utils";
|
|
3
3
|
export class GeneralFooterTemplate {
|
|
4
4
|
constructor() {
|
|
5
|
+
/**
|
|
6
|
+
* Environment segregation
|
|
7
|
+
*/
|
|
8
|
+
this.env = 'stage';
|
|
9
|
+
/**
|
|
10
|
+
* User roles
|
|
11
|
+
*/
|
|
12
|
+
this.userRoles = 'everyone';
|
|
13
|
+
/**
|
|
14
|
+
* If this is true it will emit an event at the moment the content with url its clicked
|
|
15
|
+
*/
|
|
16
|
+
this.navigateViaEvent = 'false';
|
|
17
|
+
/**
|
|
18
|
+
* Post Message event to be sent on navigation via Event
|
|
19
|
+
*/
|
|
20
|
+
this.postMessageEvent = 'NavigateTo';
|
|
21
|
+
/**
|
|
22
|
+
* custom styling by string content
|
|
23
|
+
*/
|
|
24
|
+
this.clientStyling = '';
|
|
25
|
+
/**
|
|
26
|
+
* custom styling by href
|
|
27
|
+
*/
|
|
28
|
+
this.clientStylingUrl = '';
|
|
29
|
+
/**
|
|
30
|
+
* custom translation by href
|
|
31
|
+
*/
|
|
32
|
+
this.translationUrl = '';
|
|
33
|
+
/**
|
|
34
|
+
* clockformat
|
|
35
|
+
*/
|
|
36
|
+
this.clockFormat = 'HH:MM:ss';
|
|
37
|
+
/**
|
|
38
|
+
* configurable time zone
|
|
39
|
+
*/
|
|
40
|
+
this.timeZone = '';
|
|
41
|
+
/**
|
|
42
|
+
* wether or not styling appends should be disallowed
|
|
43
|
+
*/
|
|
44
|
+
this.hasErrors = false;
|
|
45
|
+
this.stylingAppends = false;
|
|
5
46
|
this.platform = getDevicePlatform();
|
|
6
47
|
/**
|
|
7
48
|
* Host element
|
|
@@ -25,23 +66,6 @@ export class GeneralFooterTemplate {
|
|
|
25
66
|
console.log('error ', err);
|
|
26
67
|
});
|
|
27
68
|
};
|
|
28
|
-
this.language = undefined;
|
|
29
|
-
this.sections = undefined;
|
|
30
|
-
this.endpoint = undefined;
|
|
31
|
-
this.env = 'stage';
|
|
32
|
-
this.userRoles = 'everyone';
|
|
33
|
-
this.userid = undefined;
|
|
34
|
-
this.session = undefined;
|
|
35
|
-
this.baseUrl = undefined;
|
|
36
|
-
this.navigateViaEvent = 'false';
|
|
37
|
-
this.postMessageEvent = 'NavigateTo';
|
|
38
|
-
this.clientStyling = '';
|
|
39
|
-
this.clientStylingUrl = '';
|
|
40
|
-
this.translationUrl = '';
|
|
41
|
-
this.clockFormat = 'HH:MM:ss';
|
|
42
|
-
this.timeZone = '';
|
|
43
|
-
this.hasErrors = false;
|
|
44
|
-
this.stylingAppends = false;
|
|
45
69
|
}
|
|
46
70
|
validateMandatoryFields() {
|
|
47
71
|
this.MANDATORY_FIELDS.forEach((field) => {
|
|
@@ -122,6 +146,8 @@ export class GeneralFooterTemplate {
|
|
|
122
146
|
"tags": [],
|
|
123
147
|
"text": "the language of the footer"
|
|
124
148
|
},
|
|
149
|
+
"getter": false,
|
|
150
|
+
"setter": false,
|
|
125
151
|
"attribute": "language",
|
|
126
152
|
"reflect": true
|
|
127
153
|
},
|
|
@@ -139,6 +165,8 @@ export class GeneralFooterTemplate {
|
|
|
139
165
|
"tags": [],
|
|
140
166
|
"text": "which sections should be included in the footer (some have defined attributes)"
|
|
141
167
|
},
|
|
168
|
+
"getter": false,
|
|
169
|
+
"setter": false,
|
|
142
170
|
"attribute": "sections",
|
|
143
171
|
"reflect": true
|
|
144
172
|
},
|
|
@@ -156,6 +184,8 @@ export class GeneralFooterTemplate {
|
|
|
156
184
|
"tags": [],
|
|
157
185
|
"text": "endpoint for data retrieval"
|
|
158
186
|
},
|
|
187
|
+
"getter": false,
|
|
188
|
+
"setter": false,
|
|
159
189
|
"attribute": "endpoint",
|
|
160
190
|
"reflect": true
|
|
161
191
|
},
|
|
@@ -173,6 +203,8 @@ export class GeneralFooterTemplate {
|
|
|
173
203
|
"tags": [],
|
|
174
204
|
"text": "Environment segregation"
|
|
175
205
|
},
|
|
206
|
+
"getter": false,
|
|
207
|
+
"setter": false,
|
|
176
208
|
"attribute": "env",
|
|
177
209
|
"reflect": true,
|
|
178
210
|
"defaultValue": "'stage'"
|
|
@@ -191,6 +223,8 @@ export class GeneralFooterTemplate {
|
|
|
191
223
|
"tags": [],
|
|
192
224
|
"text": "User roles"
|
|
193
225
|
},
|
|
226
|
+
"getter": false,
|
|
227
|
+
"setter": false,
|
|
194
228
|
"attribute": "user-roles",
|
|
195
229
|
"reflect": true,
|
|
196
230
|
"defaultValue": "'everyone'"
|
|
@@ -209,6 +243,8 @@ export class GeneralFooterTemplate {
|
|
|
209
243
|
"tags": [],
|
|
210
244
|
"text": "the id of the current userid, to be used in order to determine login status (relevant for certain components ex. \"panic button\")"
|
|
211
245
|
},
|
|
246
|
+
"getter": false,
|
|
247
|
+
"setter": false,
|
|
212
248
|
"attribute": "userid",
|
|
213
249
|
"reflect": true
|
|
214
250
|
},
|
|
@@ -226,6 +262,8 @@ export class GeneralFooterTemplate {
|
|
|
226
262
|
"tags": [],
|
|
227
263
|
"text": "the current session, to be used in order to determine login status (relevant for certain components ex. \"panic button\")"
|
|
228
264
|
},
|
|
265
|
+
"getter": false,
|
|
266
|
+
"setter": false,
|
|
229
267
|
"attribute": "session",
|
|
230
268
|
"reflect": true
|
|
231
269
|
},
|
|
@@ -243,6 +281,8 @@ export class GeneralFooterTemplate {
|
|
|
243
281
|
"tags": [],
|
|
244
282
|
"text": "If this is present, then the footer will attach the baseurl inside src for all HelperLinks present in the footer (so it will be baseurl + helper_link) - This is needed when the footer is integrated inside an iframe it can\u2019t take the parent host to create the right anchors."
|
|
245
283
|
},
|
|
284
|
+
"getter": false,
|
|
285
|
+
"setter": false,
|
|
246
286
|
"attribute": "base-url",
|
|
247
287
|
"reflect": true
|
|
248
288
|
},
|
|
@@ -260,6 +300,8 @@ export class GeneralFooterTemplate {
|
|
|
260
300
|
"tags": [],
|
|
261
301
|
"text": "If this is true it will emit an event at the moment the content with url its clicked"
|
|
262
302
|
},
|
|
303
|
+
"getter": false,
|
|
304
|
+
"setter": false,
|
|
263
305
|
"attribute": "navigate-via-event",
|
|
264
306
|
"reflect": true,
|
|
265
307
|
"defaultValue": "'false'"
|
|
@@ -278,6 +320,8 @@ export class GeneralFooterTemplate {
|
|
|
278
320
|
"tags": [],
|
|
279
321
|
"text": "Post Message event to be sent on navigation via Event"
|
|
280
322
|
},
|
|
323
|
+
"getter": false,
|
|
324
|
+
"setter": false,
|
|
281
325
|
"attribute": "post-message-event",
|
|
282
326
|
"reflect": true,
|
|
283
327
|
"defaultValue": "'NavigateTo'"
|
|
@@ -296,6 +340,8 @@ export class GeneralFooterTemplate {
|
|
|
296
340
|
"tags": [],
|
|
297
341
|
"text": "custom styling by string content"
|
|
298
342
|
},
|
|
343
|
+
"getter": false,
|
|
344
|
+
"setter": false,
|
|
299
345
|
"attribute": "client-styling",
|
|
300
346
|
"reflect": true,
|
|
301
347
|
"defaultValue": "''"
|
|
@@ -314,6 +360,8 @@ export class GeneralFooterTemplate {
|
|
|
314
360
|
"tags": [],
|
|
315
361
|
"text": "custom styling by href"
|
|
316
362
|
},
|
|
363
|
+
"getter": false,
|
|
364
|
+
"setter": false,
|
|
317
365
|
"attribute": "client-styling-url",
|
|
318
366
|
"reflect": true,
|
|
319
367
|
"defaultValue": "''"
|
|
@@ -332,6 +380,8 @@ export class GeneralFooterTemplate {
|
|
|
332
380
|
"tags": [],
|
|
333
381
|
"text": "custom translation by href"
|
|
334
382
|
},
|
|
383
|
+
"getter": false,
|
|
384
|
+
"setter": false,
|
|
335
385
|
"attribute": "translation-url",
|
|
336
386
|
"reflect": true,
|
|
337
387
|
"defaultValue": "''"
|
|
@@ -350,6 +400,8 @@ export class GeneralFooterTemplate {
|
|
|
350
400
|
"tags": [],
|
|
351
401
|
"text": "clockformat"
|
|
352
402
|
},
|
|
403
|
+
"getter": false,
|
|
404
|
+
"setter": false,
|
|
353
405
|
"attribute": "clock-format",
|
|
354
406
|
"reflect": true,
|
|
355
407
|
"defaultValue": "'HH:MM:ss'"
|
|
@@ -368,6 +420,8 @@ export class GeneralFooterTemplate {
|
|
|
368
420
|
"tags": [],
|
|
369
421
|
"text": "configurable time zone"
|
|
370
422
|
},
|
|
423
|
+
"getter": false,
|
|
424
|
+
"setter": false,
|
|
371
425
|
"attribute": "time-zone",
|
|
372
426
|
"reflect": true,
|
|
373
427
|
"defaultValue": "''"
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
export class ImageList {
|
|
3
3
|
constructor() {
|
|
4
|
+
/**
|
|
5
|
+
* If this is true it will emit an event at the moment the content with url its clicked
|
|
6
|
+
*/
|
|
7
|
+
this.navigateViaEvent = false;
|
|
8
|
+
/**
|
|
9
|
+
* Post Message event to be sent on navigation via event
|
|
10
|
+
*/
|
|
11
|
+
this.postMessageEvent = '';
|
|
4
12
|
this.navigateLink = (url, target, externalLink) => {
|
|
5
13
|
window.postMessage({ type: this.postMessageEvent, path: url, url, target, externalLink }, window.location.href);
|
|
6
14
|
};
|
|
7
|
-
this.repeaterContent = undefined;
|
|
8
|
-
this.navigateViaEvent = false;
|
|
9
|
-
this.postMessageEvent = '';
|
|
10
15
|
}
|
|
11
16
|
render() {
|
|
12
17
|
var _a, _b, _c;
|
|
@@ -42,6 +47,8 @@ export class ImageList {
|
|
|
42
47
|
"tags": [],
|
|
43
48
|
"text": "the links content to be displayed, including titles, url, open target"
|
|
44
49
|
},
|
|
50
|
+
"getter": false,
|
|
51
|
+
"setter": false,
|
|
45
52
|
"attribute": "repeater-content",
|
|
46
53
|
"reflect": false
|
|
47
54
|
},
|
|
@@ -59,6 +66,8 @@ export class ImageList {
|
|
|
59
66
|
"tags": [],
|
|
60
67
|
"text": "If this is true it will emit an event at the moment the content with url its clicked"
|
|
61
68
|
},
|
|
69
|
+
"getter": false,
|
|
70
|
+
"setter": false,
|
|
62
71
|
"attribute": "navigate-via-event",
|
|
63
72
|
"reflect": false,
|
|
64
73
|
"defaultValue": "false"
|
|
@@ -77,6 +86,8 @@ export class ImageList {
|
|
|
77
86
|
"tags": [],
|
|
78
87
|
"text": "Post Message event to be sent on navigation via event"
|
|
79
88
|
},
|
|
89
|
+
"getter": false,
|
|
90
|
+
"setter": false,
|
|
80
91
|
"attribute": "post-message-event",
|
|
81
92
|
"reflect": true,
|
|
82
93
|
"defaultValue": "''"
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
export class LinkSectionList {
|
|
3
3
|
constructor() {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
/**
|
|
5
|
+
* If this is true it will emit an event at the moment the content with url its clicked
|
|
6
|
+
*/
|
|
7
7
|
this.navigateViaEvent = false;
|
|
8
|
+
/**
|
|
9
|
+
* Post Message event to be sent on navigation via event
|
|
10
|
+
*/
|
|
8
11
|
this.postMessageEvent = '';
|
|
9
12
|
}
|
|
10
13
|
navigateLink(link) {
|
|
@@ -74,6 +77,8 @@ export class LinkSectionList {
|
|
|
74
77
|
"tags": [],
|
|
75
78
|
"text": "the links content to be displayed, including titles, url, open target"
|
|
76
79
|
},
|
|
80
|
+
"getter": false,
|
|
81
|
+
"setter": false,
|
|
77
82
|
"attribute": "repeater-content",
|
|
78
83
|
"reflect": false
|
|
79
84
|
},
|
|
@@ -91,6 +96,8 @@ export class LinkSectionList {
|
|
|
91
96
|
"tags": [],
|
|
92
97
|
"text": "If this is present, then the footer will attach the baseurl inside src for all HelperLinks present in the footer (so it will be baseurl + helper_link) - This is needed when the footer is integrated inside an iframe it can\u2019t take the parent host to create the right anchors."
|
|
93
98
|
},
|
|
99
|
+
"getter": false,
|
|
100
|
+
"setter": false,
|
|
94
101
|
"attribute": "base-url",
|
|
95
102
|
"reflect": true
|
|
96
103
|
},
|
|
@@ -108,6 +115,8 @@ export class LinkSectionList {
|
|
|
108
115
|
"tags": [],
|
|
109
116
|
"text": "the language of the footer"
|
|
110
117
|
},
|
|
118
|
+
"getter": false,
|
|
119
|
+
"setter": false,
|
|
111
120
|
"attribute": "language",
|
|
112
121
|
"reflect": true
|
|
113
122
|
},
|
|
@@ -125,6 +134,8 @@ export class LinkSectionList {
|
|
|
125
134
|
"tags": [],
|
|
126
135
|
"text": "If this is true it will emit an event at the moment the content with url its clicked"
|
|
127
136
|
},
|
|
137
|
+
"getter": false,
|
|
138
|
+
"setter": false,
|
|
128
139
|
"attribute": "navigate-via-event",
|
|
129
140
|
"reflect": false,
|
|
130
141
|
"defaultValue": "false"
|
|
@@ -143,6 +154,8 @@ export class LinkSectionList {
|
|
|
143
154
|
"tags": [],
|
|
144
155
|
"text": "Post Message event to be sent on navigation via event"
|
|
145
156
|
},
|
|
157
|
+
"getter": false,
|
|
158
|
+
"setter": false,
|
|
146
159
|
"attribute": "post-message-event",
|
|
147
160
|
"reflect": true,
|
|
148
161
|
"defaultValue": "''"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-f9286439.js';
|
|
2
2
|
import { c as commonjsGlobal } from './_commonjsHelpers-57e89916.js';
|
|
3
3
|
|
|
4
4
|
const DEFAULT_LANGUAGE = 'en';
|
|
@@ -74,6 +74,23 @@ const CustomClockStyle0 = customClockCss;
|
|
|
74
74
|
const CustomClock = class {
|
|
75
75
|
constructor(hostRef) {
|
|
76
76
|
registerInstance(this, hostRef);
|
|
77
|
+
/**
|
|
78
|
+
* clockformat
|
|
79
|
+
*/
|
|
80
|
+
this.clockFormat = 'HH:mm:ss';
|
|
81
|
+
/**
|
|
82
|
+
* configurable time zone
|
|
83
|
+
*/
|
|
84
|
+
this.timeZone = '';
|
|
85
|
+
/**
|
|
86
|
+
* custom translation by href
|
|
87
|
+
*/
|
|
88
|
+
this.translationUrl = '';
|
|
89
|
+
/**
|
|
90
|
+
* language
|
|
91
|
+
*/
|
|
92
|
+
this.language = 'en';
|
|
93
|
+
this.timeString = '';
|
|
77
94
|
this.startClock = () => {
|
|
78
95
|
this.intervalId = setInterval(() => {
|
|
79
96
|
if (this.timeZone.length > 0) {
|
|
@@ -86,11 +103,6 @@ const CustomClock = class {
|
|
|
86
103
|
}
|
|
87
104
|
}, 1000);
|
|
88
105
|
};
|
|
89
|
-
this.clockFormat = 'HH:mm:ss';
|
|
90
|
-
this.timeZone = '';
|
|
91
|
-
this.translationUrl = '';
|
|
92
|
-
this.language = 'en';
|
|
93
|
-
this.timeString = '';
|
|
94
106
|
}
|
|
95
107
|
handleNewTranslations() {
|
|
96
108
|
getTranslations(this.translationUrl);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-f9286439.js';
|
|
2
2
|
import { c as commonjsGlobal, g as getAugmentedNamespace } from './_commonjsHelpers-57e89916.js';
|
|
3
3
|
|
|
4
4
|
var decode = {};
|
|
@@ -3327,7 +3327,7 @@ function filter$1(test, node, recurse = true, limit = Infinity) {
|
|
|
3327
3327
|
function find(test, nodes, recurse, limit) {
|
|
3328
3328
|
const result = [];
|
|
3329
3329
|
/** Stack of the arrays we are looking at. */
|
|
3330
|
-
const nodeStack = [nodes];
|
|
3330
|
+
const nodeStack = [Array.isArray(nodes) ? nodes : [nodes]];
|
|
3331
3331
|
/** Stack of the indices within the arrays. */
|
|
3332
3332
|
const indexStack = [0];
|
|
3333
3333
|
for (;;) {
|
|
@@ -3381,20 +3381,19 @@ function findOneChild(test, nodes) {
|
|
|
3381
3381
|
* @returns The first node that passes `test`.
|
|
3382
3382
|
*/
|
|
3383
3383
|
function findOne(test, nodes, recurse = true) {
|
|
3384
|
-
|
|
3385
|
-
for (let i = 0; i <
|
|
3386
|
-
const node =
|
|
3387
|
-
if (
|
|
3388
|
-
|
|
3389
|
-
}
|
|
3390
|
-
else if (test(node)) {
|
|
3391
|
-
elem = node;
|
|
3384
|
+
const searchedNodes = Array.isArray(nodes) ? nodes : [nodes];
|
|
3385
|
+
for (let i = 0; i < searchedNodes.length; i++) {
|
|
3386
|
+
const node = searchedNodes[i];
|
|
3387
|
+
if (isTag(node) && test(node)) {
|
|
3388
|
+
return node;
|
|
3392
3389
|
}
|
|
3393
|
-
|
|
3394
|
-
|
|
3390
|
+
if (recurse && hasChildren(node) && node.children.length > 0) {
|
|
3391
|
+
const found = findOne(test, node.children, true);
|
|
3392
|
+
if (found)
|
|
3393
|
+
return found;
|
|
3395
3394
|
}
|
|
3396
3395
|
}
|
|
3397
|
-
return
|
|
3396
|
+
return null;
|
|
3398
3397
|
}
|
|
3399
3398
|
/**
|
|
3400
3399
|
* Checks if a tree of nodes contains at least one node passing a test.
|
|
@@ -3405,8 +3404,8 @@ function findOne(test, nodes, recurse = true) {
|
|
|
3405
3404
|
* @returns Whether a tree of nodes contains at least one node passing the test.
|
|
3406
3405
|
*/
|
|
3407
3406
|
function existsOne(test, nodes) {
|
|
3408
|
-
return nodes.some((
|
|
3409
|
-
(
|
|
3407
|
+
return (Array.isArray(nodes) ? nodes : [nodes]).some((node) => (isTag(node) && test(node)) ||
|
|
3408
|
+
(hasChildren(node) && existsOne(test, node.children)));
|
|
3410
3409
|
}
|
|
3411
3410
|
/**
|
|
3412
3411
|
* Search an array of nodes and their children for elements passing a test function.
|
|
@@ -3420,7 +3419,7 @@ function existsOne(test, nodes) {
|
|
|
3420
3419
|
*/
|
|
3421
3420
|
function findAll(test, nodes) {
|
|
3422
3421
|
const result = [];
|
|
3423
|
-
const nodeStack = [nodes];
|
|
3422
|
+
const nodeStack = [Array.isArray(nodes) ? nodes : [nodes]];
|
|
3424
3423
|
const indexStack = [0];
|
|
3425
3424
|
for (;;) {
|
|
3426
3425
|
if (indexStack[0] >= nodeStack[0].length) {
|
|
@@ -3434,11 +3433,9 @@ function findAll(test, nodes) {
|
|
|
3434
3433
|
continue;
|
|
3435
3434
|
}
|
|
3436
3435
|
const elem = nodeStack[0][indexStack[0]++];
|
|
3437
|
-
if (
|
|
3438
|
-
continue;
|
|
3439
|
-
if (test(elem))
|
|
3436
|
+
if (isTag(elem) && test(elem))
|
|
3440
3437
|
result.push(elem);
|
|
3441
|
-
if (elem.children.length > 0) {
|
|
3438
|
+
if (hasChildren(elem) && elem.children.length > 0) {
|
|
3442
3439
|
indexStack.unshift(0);
|
|
3443
3440
|
nodeStack.unshift(elem.children);
|
|
3444
3441
|
}
|
|
@@ -3568,6 +3565,19 @@ function getElementById(id, nodes, recurse = true) {
|
|
|
3568
3565
|
function getElementsByTagName(tagName, nodes, recurse = true, limit = Infinity) {
|
|
3569
3566
|
return filter$1(Checks["tag_name"](tagName), nodes, recurse, limit);
|
|
3570
3567
|
}
|
|
3568
|
+
/**
|
|
3569
|
+
* Returns all nodes with the supplied `className`.
|
|
3570
|
+
*
|
|
3571
|
+
* @category Legacy Query Functions
|
|
3572
|
+
* @param className Class name to search for.
|
|
3573
|
+
* @param nodes Nodes to search through.
|
|
3574
|
+
* @param recurse Also consider child nodes.
|
|
3575
|
+
* @param limit Maximum number of nodes to return.
|
|
3576
|
+
* @returns All nodes with the supplied `className`.
|
|
3577
|
+
*/
|
|
3578
|
+
function getElementsByClassName(className, nodes, recurse = true, limit = Infinity) {
|
|
3579
|
+
return filter$1(getAttribCheck("class", className), nodes, recurse, limit);
|
|
3580
|
+
}
|
|
3571
3581
|
/**
|
|
3572
3582
|
* Returns all nodes with the supplied `type`.
|
|
3573
3583
|
*
|
|
@@ -3935,6 +3945,7 @@ const index = /*#__PURE__*/Object.freeze({
|
|
|
3935
3945
|
getElements: getElements,
|
|
3936
3946
|
getElementById: getElementById,
|
|
3937
3947
|
getElementsByTagName: getElementsByTagName,
|
|
3948
|
+
getElementsByClassName: getElementsByClassName,
|
|
3938
3949
|
getElementsByTagType: getElementsByTagType,
|
|
3939
3950
|
removeSubsets: removeSubsets,
|
|
3940
3951
|
get DocumentPosition () { return DocumentPosition; },
|
|
@@ -5245,9 +5256,12 @@ class Node$4 {
|
|
|
5245
5256
|
if (opts.index) {
|
|
5246
5257
|
pos = this.positionInside(opts.index);
|
|
5247
5258
|
} else if (opts.word) {
|
|
5248
|
-
let
|
|
5249
|
-
|
|
5250
|
-
|
|
5259
|
+
let inputString = ('document' in this.source.input)
|
|
5260
|
+
? this.source.input.document
|
|
5261
|
+
: this.source.input.css;
|
|
5262
|
+
let stringRepresentation = inputString.slice(
|
|
5263
|
+
sourceOffset(inputString, this.source.start),
|
|
5264
|
+
sourceOffset(inputString, this.source.end)
|
|
5251
5265
|
);
|
|
5252
5266
|
let index = stringRepresentation.indexOf(opts.word);
|
|
5253
5267
|
if (index !== -1) pos = this.positionInside(index);
|
|
@@ -5258,11 +5272,14 @@ class Node$4 {
|
|
|
5258
5272
|
positionInside(index) {
|
|
5259
5273
|
let column = this.source.start.column;
|
|
5260
5274
|
let line = this.source.start.line;
|
|
5261
|
-
let
|
|
5275
|
+
let inputString = ('document' in this.source.input)
|
|
5276
|
+
? this.source.input.document
|
|
5277
|
+
: this.source.input.css;
|
|
5278
|
+
let offset = sourceOffset(inputString, this.source.start);
|
|
5262
5279
|
let end = offset + index;
|
|
5263
5280
|
|
|
5264
5281
|
for (let i = offset; i < end; i++) {
|
|
5265
|
-
if (
|
|
5282
|
+
if (inputString[i] === '\n') {
|
|
5266
5283
|
column = 1;
|
|
5267
5284
|
line += 1;
|
|
5268
5285
|
} else {
|
|
@@ -5295,9 +5312,12 @@ class Node$4 {
|
|
|
5295
5312
|
};
|
|
5296
5313
|
|
|
5297
5314
|
if (opts.word) {
|
|
5298
|
-
let
|
|
5299
|
-
|
|
5300
|
-
|
|
5315
|
+
let inputString = ('document' in this.source.input)
|
|
5316
|
+
? this.source.input.document
|
|
5317
|
+
: this.source.input.css;
|
|
5318
|
+
let stringRepresentation = inputString.slice(
|
|
5319
|
+
sourceOffset(inputString, this.source.start),
|
|
5320
|
+
sourceOffset(inputString, this.source.end)
|
|
5301
5321
|
);
|
|
5302
5322
|
let index = stringRepresentation.indexOf(opts.word);
|
|
5303
5323
|
if (index !== -1) {
|
|
@@ -5996,22 +6016,34 @@ Document$3.registerProcessor = dependant => {
|
|
|
5996
6016
|
var document = Document$3;
|
|
5997
6017
|
Document$3.default = Document$3;
|
|
5998
6018
|
|
|
6019
|
+
// This alphabet uses `A-Za-z0-9_-` symbols.
|
|
6020
|
+
// The order of characters is optimized for better gzip and brotli compression.
|
|
6021
|
+
// References to the same file (works both for gzip and brotli):
|
|
6022
|
+
// `'use`, `andom`, and `rict'`
|
|
6023
|
+
// References to the brotli default dictionary:
|
|
6024
|
+
// `-26T`, `1983`, `40px`, `75px`, `bush`, `jack`, `mind`, `very`, and `wolf`
|
|
5999
6025
|
let urlAlphabet =
|
|
6000
6026
|
'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
|
|
6027
|
+
|
|
6001
6028
|
let customAlphabet = (alphabet, defaultSize = 21) => {
|
|
6002
6029
|
return (size = defaultSize) => {
|
|
6003
6030
|
let id = '';
|
|
6004
|
-
|
|
6031
|
+
// A compact alternative for `for (var i = 0; i < step; i++)`.
|
|
6032
|
+
let i = size | 0;
|
|
6005
6033
|
while (i--) {
|
|
6034
|
+
// `| 0` is more compact and faster than `Math.floor()`.
|
|
6006
6035
|
id += alphabet[(Math.random() * alphabet.length) | 0];
|
|
6007
6036
|
}
|
|
6008
6037
|
return id
|
|
6009
6038
|
}
|
|
6010
6039
|
};
|
|
6040
|
+
|
|
6011
6041
|
let nanoid$1 = (size = 21) => {
|
|
6012
6042
|
let id = '';
|
|
6013
|
-
|
|
6043
|
+
// A compact alternative for `for (var i = 0; i < step; i++)`.
|
|
6044
|
+
let i = size | 0;
|
|
6014
6045
|
while (i--) {
|
|
6046
|
+
// `| 0` is more compact and faster than `Math.floor()`.
|
|
6015
6047
|
id += urlAlphabet[(Math.random() * 64) | 0];
|
|
6016
6048
|
}
|
|
6017
6049
|
return id
|
|
@@ -6201,6 +6233,9 @@ class Input$4 {
|
|
|
6201
6233
|
this.hasBOM = false;
|
|
6202
6234
|
}
|
|
6203
6235
|
|
|
6236
|
+
this.document = this.css;
|
|
6237
|
+
if (opts.document) this.document = opts.document.toString();
|
|
6238
|
+
|
|
6204
6239
|
if (opts.from) {
|
|
6205
6240
|
if (
|
|
6206
6241
|
!pathAvailable$1 ||
|
|
@@ -8600,7 +8635,7 @@ let Root$1 = root;
|
|
|
8600
8635
|
|
|
8601
8636
|
class Processor$1 {
|
|
8602
8637
|
constructor(plugins = []) {
|
|
8603
|
-
this.version = '8.
|
|
8638
|
+
this.version = '8.5.1';
|
|
8604
8639
|
this.plugins = this.normalize(plugins);
|
|
8605
8640
|
}
|
|
8606
8641
|
|
|
@@ -9027,6 +9062,15 @@ function sanitizeHtml(html, options, _recursing) {
|
|
|
9027
9062
|
if (skip) {
|
|
9028
9063
|
if (options.disallowedTagsMode === 'discard' || options.disallowedTagsMode === 'completelyDiscard') {
|
|
9029
9064
|
// We want the contents but not this tag
|
|
9065
|
+
if (frame.innerText && !hasText) {
|
|
9066
|
+
const escaped = escapeHtml(frame.innerText);
|
|
9067
|
+
if (options.textFilter) {
|
|
9068
|
+
result += options.textFilter(escaped, name);
|
|
9069
|
+
} else {
|
|
9070
|
+
result += escapeHtml(frame.innerText);
|
|
9071
|
+
}
|
|
9072
|
+
addedText = true;
|
|
9073
|
+
}
|
|
9030
9074
|
return;
|
|
9031
9075
|
}
|
|
9032
9076
|
tempResult = result;
|
|
@@ -9679,9 +9723,13 @@ const CustomContentSectionStyle0 = customContentSectionCss;
|
|
|
9679
9723
|
const CustomContentSection = class {
|
|
9680
9724
|
constructor(hostRef) {
|
|
9681
9725
|
registerInstance(this, hostRef);
|
|
9682
|
-
|
|
9683
|
-
|
|
9726
|
+
/**
|
|
9727
|
+
* If this is true it will emit an event at the moment the content with url its clicked
|
|
9728
|
+
*/
|
|
9684
9729
|
this.navigateViaEvent = false;
|
|
9730
|
+
/**
|
|
9731
|
+
* Post Message event to be sent on navigation via Event
|
|
9732
|
+
*/
|
|
9685
9733
|
this.postMessageEvent = '';
|
|
9686
9734
|
}
|
|
9687
9735
|
render() {
|