@everymatrix/general-news-notification 1.52.6 → 1.53.10
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/{general-news-notification-3e467546.js → general-news-notification-1a344ad0.js} +32 -14
- package/dist/cjs/general-news-notification.cjs.entry.js +2 -2
- package/dist/cjs/general-news-notification.cjs.js +2 -2
- package/dist/cjs/{index-889e271c.js → index-cd9fee24.js} +164 -67
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/general-news-notification/general-news-notification.js +49 -13
- package/dist/esm/{general-news-notification-3db68ce9.js → general-news-notification-affaba15.js} +32 -14
- package/dist/esm/general-news-notification.entry.js +2 -2
- package/dist/esm/general-news-notification.js +3 -3
- package/dist/esm/{index-e9994984.js → index-900726ec.js} +164 -67
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +2 -2
- package/dist/general-news-notification/general-news-notification.esm.js +1 -1
- package/dist/general-news-notification/index.esm.js +1 -1
- package/dist/general-news-notification/p-49f09fbf.js +2 -0
- package/dist/general-news-notification/p-cab41211.js +1 -0
- package/dist/general-news-notification/p-e6fecffd.entry.js +1 -0
- package/package.json +1 -1
- package/dist/general-news-notification/p-51c5e725.js +0 -2
- package/dist/general-news-notification/p-bb80c541.js +0 -1
- package/dist/general-news-notification/p-f176153a.entry.js +0 -1
package/dist/cjs/{general-news-notification-3e467546.js → general-news-notification-1a344ad0.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-cd9fee24.js');
|
|
4
4
|
|
|
5
5
|
const getDevice = () => {
|
|
6
6
|
let userAgent = window.navigator.userAgent;
|
|
@@ -71,6 +71,37 @@ const GeneralNewsNotificationStyle0 = generalNewsNotificationCss;
|
|
|
71
71
|
const GeneralNewsNotification = class {
|
|
72
72
|
constructor(hostRef) {
|
|
73
73
|
index.registerInstance(this, hostRef);
|
|
74
|
+
/**
|
|
75
|
+
* Animation types
|
|
76
|
+
*/
|
|
77
|
+
this.animationType = 'static';
|
|
78
|
+
/**
|
|
79
|
+
* Default speed of the scroll animation in seconds
|
|
80
|
+
*/
|
|
81
|
+
this.speed = 30;
|
|
82
|
+
/**
|
|
83
|
+
* Option to minimize
|
|
84
|
+
*/
|
|
85
|
+
this.canMinimize = false;
|
|
86
|
+
/**
|
|
87
|
+
* Option to close the notification
|
|
88
|
+
*/
|
|
89
|
+
this.canClose = false;
|
|
90
|
+
/**
|
|
91
|
+
* Client custom styling via string
|
|
92
|
+
*/
|
|
93
|
+
this.clientStyling = '';
|
|
94
|
+
/**
|
|
95
|
+
* Client custom styling via url content
|
|
96
|
+
*/
|
|
97
|
+
this.clientStylingUrl = '';
|
|
98
|
+
/**
|
|
99
|
+
* The translationurl
|
|
100
|
+
*/
|
|
101
|
+
this.translationUrl = '';
|
|
102
|
+
this.isMinimized = false;
|
|
103
|
+
this.isClosed = false;
|
|
104
|
+
this.isLoading = true;
|
|
74
105
|
this.componentDidLoad = () => {
|
|
75
106
|
// start custom styling area
|
|
76
107
|
if (this.stylingContainer) {
|
|
@@ -138,19 +169,6 @@ const GeneralNewsNotification = class {
|
|
|
138
169
|
this.closeNotification = () => {
|
|
139
170
|
this.isClosed = true;
|
|
140
171
|
};
|
|
141
|
-
this.cmsEndpoint = undefined;
|
|
142
|
-
this.language = undefined;
|
|
143
|
-
this.animationType = 'static';
|
|
144
|
-
this.speed = 30;
|
|
145
|
-
this.canMinimize = false;
|
|
146
|
-
this.canClose = false;
|
|
147
|
-
this.clientStyling = '';
|
|
148
|
-
this.clientStylingUrl = '';
|
|
149
|
-
this.translationUrl = '';
|
|
150
|
-
this.message = undefined;
|
|
151
|
-
this.isMinimized = false;
|
|
152
|
-
this.isClosed = false;
|
|
153
|
-
this.isLoading = true;
|
|
154
172
|
}
|
|
155
173
|
watchEndpoint(newValue, oldValue) {
|
|
156
174
|
if (newValue && newValue != oldValue && this.cmsEndpoint && this.language) {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const generalNewsNotification = require('./general-news-notification-
|
|
6
|
-
require('./index-
|
|
5
|
+
const generalNewsNotification = require('./general-news-notification-1a344ad0.js');
|
|
6
|
+
require('./index-cd9fee24.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-cd9fee24.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
|
-
Stencil Client Patch Browser v4.
|
|
9
|
+
Stencil Client Patch Browser v4.25.1 | MIT Licensed | https://stenciljs.com
|
|
10
10
|
*/
|
|
11
11
|
var patchBrowser = () => {
|
|
12
12
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('general-news-notification.cjs.js', document.baseURI).href));
|
|
@@ -21,19 +21,27 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'general-news-notification';
|
|
24
|
-
const BUILD = /* general-news-notification */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
24
|
+
const BUILD = /* general-news-notification */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
|
-
Stencil Client Platform v4.
|
|
27
|
+
Stencil Client Platform v4.25.1 | MIT Licensed | https://stenciljs.com
|
|
28
28
|
*/
|
|
29
29
|
var __defProp = Object.defineProperty;
|
|
30
30
|
var __export = (target, all) => {
|
|
31
31
|
for (var name in all)
|
|
32
32
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
33
33
|
};
|
|
34
|
+
|
|
35
|
+
// src/utils/constants.ts
|
|
36
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
37
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
38
|
+
|
|
39
|
+
// src/client/client-host-ref.ts
|
|
34
40
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
35
41
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
36
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
42
|
+
var registerInstance = (lazyInstance, hostRef) => {
|
|
43
|
+
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
44
|
+
};
|
|
37
45
|
var registerHost = (hostElement, cmpMeta) => {
|
|
38
46
|
const hostRef = {
|
|
39
47
|
$flags$: 0,
|
|
@@ -46,7 +54,8 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
46
54
|
hostElement["s-p"] = [];
|
|
47
55
|
hostElement["s-rc"] = [];
|
|
48
56
|
}
|
|
49
|
-
|
|
57
|
+
const ref = hostRefs.set(hostElement, hostRef);
|
|
58
|
+
return ref;
|
|
50
59
|
};
|
|
51
60
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
52
61
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -83,16 +92,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
83
92
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
84
93
|
/* webpackMode: "lazy" */
|
|
85
94
|
`./${bundleId}.entry.js${""}`
|
|
86
|
-
)); }).then(
|
|
87
|
-
{
|
|
88
|
-
|
|
95
|
+
)); }).then(
|
|
96
|
+
(importedModule) => {
|
|
97
|
+
{
|
|
98
|
+
cmpModules.set(bundleId, importedModule);
|
|
99
|
+
}
|
|
100
|
+
return importedModule[exportName];
|
|
101
|
+
},
|
|
102
|
+
(e) => {
|
|
103
|
+
consoleError(e, hostRef.$hostElement$);
|
|
89
104
|
}
|
|
90
|
-
|
|
91
|
-
}, consoleError);
|
|
105
|
+
);
|
|
92
106
|
};
|
|
93
107
|
|
|
94
108
|
// src/client/client-style.ts
|
|
95
109
|
var styles = /* @__PURE__ */ new Map();
|
|
110
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
96
111
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
97
112
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
98
113
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -150,14 +165,6 @@ var flush = () => {
|
|
|
150
165
|
};
|
|
151
166
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
152
167
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
153
|
-
|
|
154
|
-
// src/utils/constants.ts
|
|
155
|
-
var EMPTY_OBJ = {};
|
|
156
|
-
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
157
|
-
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
158
|
-
|
|
159
|
-
// src/utils/helpers.ts
|
|
160
|
-
var isDef = (v) => v != null;
|
|
161
168
|
var isComplexType = (o) => {
|
|
162
169
|
o = typeof o;
|
|
163
170
|
return o === "object" || o === "function";
|
|
@@ -335,7 +342,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
335
342
|
}
|
|
336
343
|
if (!appliedStyles.has(scopeId2)) {
|
|
337
344
|
{
|
|
338
|
-
styleElm = doc.createElement("style");
|
|
345
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
|
|
339
346
|
styleElm.innerHTML = style;
|
|
340
347
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
341
348
|
if (nonce != null) {
|
|
@@ -345,7 +352,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
345
352
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
346
353
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
347
354
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
348
|
-
styleContainerNode.insertBefore(
|
|
355
|
+
styleContainerNode.insertBefore(
|
|
356
|
+
styleElm,
|
|
357
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
358
|
+
);
|
|
349
359
|
} else if ("host" in styleContainerNode) {
|
|
350
360
|
if (supportsConstructableStylesheets) {
|
|
351
361
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -395,16 +405,18 @@ var attachStyles = (hostRef) => {
|
|
|
395
405
|
endAttachStyles();
|
|
396
406
|
};
|
|
397
407
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
398
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
408
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
399
409
|
if (oldValue !== newValue) {
|
|
400
410
|
let isProp = isMemberInElement(elm, memberName);
|
|
401
411
|
let ln = memberName.toLowerCase();
|
|
402
412
|
if (memberName === "class") {
|
|
403
413
|
const classList = elm.classList;
|
|
404
414
|
const oldClasses = parseClassList(oldValue);
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
415
|
+
let newClasses = parseClassList(newValue);
|
|
416
|
+
{
|
|
417
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
418
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
419
|
+
}
|
|
408
420
|
} else if (memberName === "style") {
|
|
409
421
|
{
|
|
410
422
|
for (const prop in oldValue) {
|
|
@@ -463,7 +475,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
463
475
|
elm.setAttribute(memberName, n);
|
|
464
476
|
}
|
|
465
477
|
}
|
|
466
|
-
} else {
|
|
478
|
+
} else if (elm[memberName] !== newValue) {
|
|
467
479
|
elm[memberName] = newValue;
|
|
468
480
|
}
|
|
469
481
|
} catch (e) {
|
|
@@ -485,24 +497,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
485
497
|
}
|
|
486
498
|
};
|
|
487
499
|
var parseClassListRegex = /\s/;
|
|
488
|
-
var parseClassList = (value) =>
|
|
500
|
+
var parseClassList = (value) => {
|
|
501
|
+
if (typeof value === "object" && value && "baseVal" in value) {
|
|
502
|
+
value = value.baseVal;
|
|
503
|
+
}
|
|
504
|
+
if (!value || typeof value !== "string") {
|
|
505
|
+
return [];
|
|
506
|
+
}
|
|
507
|
+
return value.split(parseClassListRegex);
|
|
508
|
+
};
|
|
489
509
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
490
510
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
491
511
|
|
|
492
512
|
// src/runtime/vdom/update-element.ts
|
|
493
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
513
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
494
514
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
495
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
496
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
515
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
516
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
497
517
|
{
|
|
498
518
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
499
519
|
if (!(memberName in newVnodeAttrs)) {
|
|
500
|
-
setAccessor(
|
|
520
|
+
setAccessor(
|
|
521
|
+
elm,
|
|
522
|
+
memberName,
|
|
523
|
+
oldVnodeAttrs[memberName],
|
|
524
|
+
void 0,
|
|
525
|
+
isSvgMode2,
|
|
526
|
+
newVnode.$flags$);
|
|
501
527
|
}
|
|
502
528
|
}
|
|
503
529
|
}
|
|
504
530
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
505
|
-
setAccessor(
|
|
531
|
+
setAccessor(
|
|
532
|
+
elm,
|
|
533
|
+
memberName,
|
|
534
|
+
oldVnodeAttrs[memberName],
|
|
535
|
+
newVnodeAttrs[memberName],
|
|
536
|
+
isSvgMode2,
|
|
537
|
+
newVnode.$flags$);
|
|
506
538
|
}
|
|
507
539
|
};
|
|
508
540
|
function sortedAttrNames(attrNames) {
|
|
@@ -514,13 +546,10 @@ function sortedAttrNames(attrNames) {
|
|
|
514
546
|
attrNames
|
|
515
547
|
);
|
|
516
548
|
}
|
|
517
|
-
|
|
518
|
-
// src/runtime/vdom/vdom-render.ts
|
|
519
|
-
var scopeId;
|
|
520
549
|
var hostTagName;
|
|
521
550
|
var useNativeShadowDom = false;
|
|
522
551
|
var isSvgMode = false;
|
|
523
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex
|
|
552
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
524
553
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
525
554
|
let i2 = 0;
|
|
526
555
|
let elm;
|
|
@@ -541,11 +570,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
541
570
|
{
|
|
542
571
|
updateElement(null, newVNode2, isSvgMode);
|
|
543
572
|
}
|
|
544
|
-
const rootNode = elm.getRootNode();
|
|
545
|
-
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
546
|
-
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
547
|
-
elm.classList.add(elm["s-si"] = scopeId);
|
|
548
|
-
}
|
|
549
573
|
if (newVNode2.$children$) {
|
|
550
574
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
551
575
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -657,6 +681,9 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
657
681
|
};
|
|
658
682
|
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
659
683
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
684
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
685
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
686
|
+
}
|
|
660
687
|
return true;
|
|
661
688
|
}
|
|
662
689
|
return false;
|
|
@@ -703,8 +730,9 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
703
730
|
}
|
|
704
731
|
};
|
|
705
732
|
var insertBefore = (parent, newNode, reference) => {
|
|
706
|
-
|
|
707
|
-
|
|
733
|
+
{
|
|
734
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
735
|
+
}
|
|
708
736
|
};
|
|
709
737
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
710
738
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -723,9 +751,6 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
723
751
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
724
752
|
hostRef.$vnode$ = rootVnode;
|
|
725
753
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
726
|
-
{
|
|
727
|
-
scopeId = hostElm["s-sc"];
|
|
728
|
-
}
|
|
729
754
|
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
730
755
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
731
756
|
};
|
|
@@ -733,7 +758,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
733
758
|
// src/runtime/update-component.ts
|
|
734
759
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
735
760
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
736
|
-
ancestorComponent["s-p"].push(
|
|
761
|
+
const index = ancestorComponent["s-p"].push(
|
|
762
|
+
new Promise(
|
|
763
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
764
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
765
|
+
r();
|
|
766
|
+
}
|
|
767
|
+
)
|
|
768
|
+
);
|
|
737
769
|
}
|
|
738
770
|
};
|
|
739
771
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -760,7 +792,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
760
792
|
let maybePromise;
|
|
761
793
|
if (isInitialLoad) {
|
|
762
794
|
{
|
|
763
|
-
maybePromise = safeCall(instance, "componentWillLoad");
|
|
795
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
764
796
|
}
|
|
765
797
|
}
|
|
766
798
|
endSchedule();
|
|
@@ -859,12 +891,12 @@ var appDidLoad = (who) => {
|
|
|
859
891
|
}
|
|
860
892
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
861
893
|
};
|
|
862
|
-
var safeCall = (instance, method, arg) => {
|
|
894
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
863
895
|
if (instance && instance[method]) {
|
|
864
896
|
try {
|
|
865
897
|
return instance[method](arg);
|
|
866
898
|
} catch (e) {
|
|
867
|
-
consoleError(e);
|
|
899
|
+
consoleError(e, elm);
|
|
868
900
|
}
|
|
869
901
|
}
|
|
870
902
|
return void 0;
|
|
@@ -923,15 +955,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
923
955
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
924
956
|
members.map(([memberName, [memberFlags]]) => {
|
|
925
957
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
958
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
959
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
960
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
961
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
962
|
+
Object.defineProperty(prototype, memberName, {
|
|
963
|
+
get() {
|
|
964
|
+
{
|
|
965
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
966
|
+
return getValue(this, memberName);
|
|
967
|
+
}
|
|
968
|
+
const ref = getHostRef(this);
|
|
969
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
970
|
+
if (!instance) return;
|
|
971
|
+
return instance[memberName];
|
|
972
|
+
}
|
|
973
|
+
},
|
|
974
|
+
configurable: true,
|
|
975
|
+
enumerable: true
|
|
976
|
+
});
|
|
977
|
+
}
|
|
926
978
|
Object.defineProperty(prototype, memberName, {
|
|
927
|
-
get() {
|
|
928
|
-
return getValue(this, memberName);
|
|
929
|
-
},
|
|
930
979
|
set(newValue) {
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
980
|
+
const ref = getHostRef(this);
|
|
981
|
+
if (origSetter) {
|
|
982
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
983
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
984
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
985
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
986
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
987
|
+
}
|
|
988
|
+
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
989
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
990
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
991
|
+
return;
|
|
992
|
+
}
|
|
993
|
+
{
|
|
994
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
995
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
996
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
997
|
+
ref.$onReadyPromise$.then(() => {
|
|
998
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
999
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
1000
|
+
}
|
|
1001
|
+
});
|
|
1002
|
+
}
|
|
1003
|
+
return;
|
|
1004
|
+
}
|
|
1005
|
+
const setterSetVal = () => {
|
|
1006
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
1007
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1008
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1009
|
+
}
|
|
1010
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1011
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1012
|
+
};
|
|
1013
|
+
if (ref.$lazyInstance$) {
|
|
1014
|
+
setterSetVal();
|
|
1015
|
+
} else {
|
|
1016
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
935
1020
|
});
|
|
936
1021
|
}
|
|
937
1022
|
});
|
|
@@ -941,7 +1026,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
941
1026
|
plt.jmp(() => {
|
|
942
1027
|
var _a2;
|
|
943
1028
|
const propName = attrNameToPropName.get(attrName);
|
|
944
|
-
if (this.hasOwnProperty(propName)) {
|
|
1029
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
945
1030
|
newValue = this[propName];
|
|
946
1031
|
delete this[propName];
|
|
947
1032
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -961,7 +1046,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
961
1046
|
}
|
|
962
1047
|
return;
|
|
963
1048
|
}
|
|
964
|
-
|
|
1049
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1050
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1051
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1052
|
+
this[propName] = newValue;
|
|
1053
|
+
}
|
|
965
1054
|
});
|
|
966
1055
|
};
|
|
967
1056
|
Cstr.observedAttributes = Array.from(
|
|
@@ -984,9 +1073,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
984
1073
|
let Cstr;
|
|
985
1074
|
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
986
1075
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
const CstrImport = loadModule(cmpMeta);
|
|
1076
|
+
{
|
|
1077
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
990
1078
|
if (CstrImport && "then" in CstrImport) {
|
|
991
1079
|
const endLoad = uniqueTime();
|
|
992
1080
|
Cstr = await CstrImport;
|
|
@@ -1011,7 +1099,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1011
1099
|
try {
|
|
1012
1100
|
new Cstr(hostRef);
|
|
1013
1101
|
} catch (e) {
|
|
1014
|
-
consoleError(e);
|
|
1102
|
+
consoleError(e, elm);
|
|
1015
1103
|
}
|
|
1016
1104
|
{
|
|
1017
1105
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1020,10 +1108,6 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1020
1108
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1021
1109
|
}
|
|
1022
1110
|
endNewInstance();
|
|
1023
|
-
} else {
|
|
1024
|
-
Cstr = elm.constructor;
|
|
1025
|
-
const cmpTag = elm.localName;
|
|
1026
|
-
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
1027
1111
|
}
|
|
1028
1112
|
if (Cstr && Cstr.style) {
|
|
1029
1113
|
let style;
|
|
@@ -1046,7 +1130,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1046
1130
|
schedule();
|
|
1047
1131
|
}
|
|
1048
1132
|
};
|
|
1049
|
-
var fireConnectedCallback = (instance) => {
|
|
1133
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1050
1134
|
};
|
|
1051
1135
|
|
|
1052
1136
|
// src/runtime/connected-callback.ts
|
|
@@ -1086,7 +1170,7 @@ var connectedCallback = (elm) => {
|
|
|
1086
1170
|
endConnected();
|
|
1087
1171
|
}
|
|
1088
1172
|
};
|
|
1089
|
-
var disconnectInstance = (instance) => {
|
|
1173
|
+
var disconnectInstance = (instance, elm) => {
|
|
1090
1174
|
};
|
|
1091
1175
|
var disconnectedCallback = async (elm) => {
|
|
1092
1176
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1095,6 +1179,12 @@ var disconnectedCallback = async (elm) => {
|
|
|
1095
1179
|
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
1096
1180
|
}
|
|
1097
1181
|
}
|
|
1182
|
+
if (rootAppliedStyles.has(elm)) {
|
|
1183
|
+
rootAppliedStyles.delete(elm);
|
|
1184
|
+
}
|
|
1185
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1186
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1187
|
+
}
|
|
1098
1188
|
};
|
|
1099
1189
|
|
|
1100
1190
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1172,6 +1262,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1172
1262
|
}
|
|
1173
1263
|
disconnectedCallback() {
|
|
1174
1264
|
plt.jmp(() => disconnectedCallback(this));
|
|
1265
|
+
plt.raf(() => {
|
|
1266
|
+
var _a3;
|
|
1267
|
+
const hostRef = getHostRef(this);
|
|
1268
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1269
|
+
delete hostRef.$vnode$.$elm$;
|
|
1270
|
+
}
|
|
1271
|
+
});
|
|
1175
1272
|
}
|
|
1176
1273
|
componentOnReady() {
|
|
1177
1274
|
return getHostRef(this).$onReadyPromise$;
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const generalNewsNotification = require('./general-news-notification-
|
|
6
|
-
require('./index-
|
|
5
|
+
const generalNewsNotification = require('./general-news-notification-1a344ad0.js');
|
|
6
|
+
require('./index-cd9fee24.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-cd9fee24.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|