@siemens/ix-icons 0.0.0-pr-69-20250205144920 → 0.0.0-v3-preview-20250130095430
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/README.md +17 -46
- package/components/icon.js +252 -0
- package/components/icon.js.map +1 -0
- package/components/index.js +2 -1
- package/components/index.js.map +1 -1
- package/components/ix-icon.js +1 -1
- package/dist/cjs/{icon-319056c0.js → icon-2c9dc943.js} +56 -62
- package/dist/cjs/icon-2c9dc943.js.map +1 -0
- package/dist/cjs/{index-f6043fa9.js → index-ea94711c.js} +70 -178
- package/dist/cjs/index-ea94711c.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/ix-icon.cjs.entry.js +2 -2
- package/dist/cjs/ix-icons.cjs.js +2 -2
- package/dist/cjs/ix-icons.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/icon/icon.js +19 -31
- package/dist/collection/components/icon/icon.js.map +1 -1
- package/dist/collection/components/icon/icons.js +1258 -0
- package/dist/collection/components/icon/icons.js.map +1 -0
- package/dist/collection/components/icon/resolveIcon.js +43 -26
- package/dist/collection/components/icon/resolveIcon.js.map +1 -1
- package/dist/esm/{icon-fc868c56.js → icon-e3f6595d.js} +56 -62
- package/dist/esm/icon-e3f6595d.js.map +1 -0
- package/dist/esm/{index-051cb4f1.js → index-050dd9d6.js} +70 -178
- package/dist/esm/index-050dd9d6.js.map +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/ix-icon.entry.js +2 -2
- package/dist/esm/ix-icons.js +3 -3
- package/dist/esm/ix-icons.js.map +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/ix-icons/index.esm.js +1 -1
- package/dist/ix-icons/ix-icons.esm.js +1 -1
- package/dist/ix-icons/ix-icons.esm.js.map +1 -1
- package/dist/ix-icons/p-0194ffaa.js +3 -0
- package/dist/ix-icons/p-0194ffaa.js.map +1 -0
- package/dist/ix-icons/p-196f504a.js +2 -0
- package/dist/ix-icons/p-196f504a.js.map +1 -0
- package/dist/ix-icons/p-45457b43.entry.js +2 -0
- package/dist/types/components/icon/icon.d.ts +2 -5
- package/dist/types/components/icon/icons.d.ts +1256 -0
- package/dist/types/components/icon/meta-tag.d.ts +1 -1
- package/dist/types/components/icon/resolveIcon.d.ts +2 -1
- package/dist/types/components.d.ts +2 -8
- package/dist/types/stencil-public-runtime.d.ts +0 -6
- package/icons/package.json +1 -1
- package/package.json +2 -2
- package/components/p-187634d0.js +0 -1363
- package/components/p-187634d0.js.map +0 -1
- package/dist/cjs/icon-319056c0.js.map +0 -1
- package/dist/cjs/index-f6043fa9.js.map +0 -1
- package/dist/collection/components/icon/parser.js +0 -22
- package/dist/collection/components/icon/parser.js.map +0 -1
- package/dist/esm/icon-fc868c56.js.map +0 -1
- package/dist/esm/index-051cb4f1.js.map +0 -1
- package/dist/ix-icons/p-423803cb.js +0 -2
- package/dist/ix-icons/p-423803cb.js.map +0 -1
- package/dist/ix-icons/p-48b5ebf2.js +0 -3
- package/dist/ix-icons/p-48b5ebf2.js.map +0 -1
- package/dist/ix-icons/p-ca4fc358.entry.js +0 -2
- package/dist/sample.json +0 -1259
- package/dist/types/components/icon/parser.d.ts +0 -2
- /package/dist/ix-icons/{p-ca4fc358.entry.js.map → p-45457b43.entry.js.map} +0 -0
|
@@ -1,25 +1,17 @@
|
|
|
1
1
|
const NAMESPACE = 'ix-icons';
|
|
2
|
-
const BUILD = /* ix-icons */ { 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,
|
|
2
|
+
const BUILD = /* ix-icons */ { 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: false, 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: true, vdomListener: false, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: true, vdomText: false, vdomXlink: false, watchCallback: true };
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Platform v4.
|
|
5
|
+
Stencil Client Platform v4.21.0 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
var __defProp = Object.defineProperty;
|
|
8
8
|
var __export = (target, all) => {
|
|
9
9
|
for (var name in all)
|
|
10
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
// src/utils/constants.ts
|
|
14
|
-
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
15
|
-
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
16
|
-
|
|
17
|
-
// src/client/client-host-ref.ts
|
|
18
12
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
19
13
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
20
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
21
|
-
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
22
|
-
};
|
|
14
|
+
var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
23
15
|
var registerHost = (hostElement, cmpMeta) => {
|
|
24
16
|
const hostRef = {
|
|
25
17
|
$flags$: 0,
|
|
@@ -32,8 +24,7 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
32
24
|
hostElement["s-p"] = [];
|
|
33
25
|
hostElement["s-rc"] = [];
|
|
34
26
|
}
|
|
35
|
-
|
|
36
|
-
return ref;
|
|
27
|
+
return hostRefs.set(hostElement, hostRef);
|
|
37
28
|
};
|
|
38
29
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
39
30
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -70,22 +61,16 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
70
61
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
71
62
|
/* webpackMode: "lazy" */
|
|
72
63
|
`./${bundleId}.entry.js${""}`
|
|
73
|
-
).then(
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
cmpModules.set(bundleId, importedModule);
|
|
77
|
-
}
|
|
78
|
-
return importedModule[exportName];
|
|
79
|
-
},
|
|
80
|
-
(e) => {
|
|
81
|
-
consoleError(e, hostRef.$hostElement$);
|
|
64
|
+
).then((importedModule) => {
|
|
65
|
+
{
|
|
66
|
+
cmpModules.set(bundleId, importedModule);
|
|
82
67
|
}
|
|
83
|
-
|
|
68
|
+
return importedModule[exportName];
|
|
69
|
+
}, consoleError);
|
|
84
70
|
};
|
|
85
71
|
|
|
86
72
|
// src/client/client-style.ts
|
|
87
73
|
var styles = /* @__PURE__ */ new Map();
|
|
88
|
-
var HYDRATED_STYLE_ID = "sty-id";
|
|
89
74
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
90
75
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
91
76
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -150,6 +135,14 @@ var getAssetPath = (path) => {
|
|
|
150
135
|
return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
|
|
151
136
|
};
|
|
152
137
|
var setAssetPath = (path) => plt.$resourcesUrl$ = path;
|
|
138
|
+
|
|
139
|
+
// src/utils/constants.ts
|
|
140
|
+
var EMPTY_OBJ = {};
|
|
141
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
142
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
143
|
+
|
|
144
|
+
// src/utils/helpers.ts
|
|
145
|
+
var isDef = (v) => v != null;
|
|
153
146
|
var isComplexType = (o) => {
|
|
154
147
|
o = typeof o;
|
|
155
148
|
return o === "object" || o === "function";
|
|
@@ -335,7 +328,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
335
328
|
}
|
|
336
329
|
if (!appliedStyles.has(scopeId2)) {
|
|
337
330
|
{
|
|
338
|
-
styleElm =
|
|
331
|
+
styleElm = doc.createElement("style");
|
|
339
332
|
styleElm.innerHTML = style;
|
|
340
333
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
341
334
|
if (nonce != null) {
|
|
@@ -344,24 +337,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
344
337
|
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
345
338
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
346
339
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
347
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling :
|
|
348
|
-
styleContainerNode.insertBefore(
|
|
349
|
-
styleElm,
|
|
350
|
-
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
351
|
-
);
|
|
340
|
+
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : document.querySelector("style");
|
|
341
|
+
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
|
352
342
|
} else if ("host" in styleContainerNode) {
|
|
353
|
-
|
|
354
|
-
const stylesheet = new CSSStyleSheet();
|
|
355
|
-
stylesheet.replaceSync(style);
|
|
356
|
-
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
357
|
-
} else {
|
|
358
|
-
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
359
|
-
if (existingStyleContainer) {
|
|
360
|
-
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
361
|
-
} else {
|
|
362
|
-
styleContainerNode.prepend(styleElm);
|
|
363
|
-
}
|
|
364
|
-
}
|
|
343
|
+
styleContainerNode.prepend(styleElm);
|
|
365
344
|
} else {
|
|
366
345
|
styleContainerNode.append(styleElm);
|
|
367
346
|
}
|
|
@@ -398,18 +377,16 @@ var attachStyles = (hostRef) => {
|
|
|
398
377
|
endAttachStyles();
|
|
399
378
|
};
|
|
400
379
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
401
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags
|
|
380
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
402
381
|
if (oldValue !== newValue) {
|
|
403
382
|
let isProp = isMemberInElement(elm, memberName);
|
|
404
383
|
memberName.toLowerCase();
|
|
405
384
|
if (memberName === "class") {
|
|
406
385
|
const classList = elm.classList;
|
|
407
386
|
const oldClasses = parseClassList(oldValue);
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
412
|
-
}
|
|
387
|
+
const newClasses = parseClassList(newValue);
|
|
388
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
389
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
413
390
|
} else if (memberName === "style") {
|
|
414
391
|
{
|
|
415
392
|
for (const prop in oldValue) {
|
|
@@ -446,7 +423,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
446
423
|
elm.setAttribute(memberName, n);
|
|
447
424
|
}
|
|
448
425
|
}
|
|
449
|
-
} else
|
|
426
|
+
} else {
|
|
450
427
|
elm[memberName] = newValue;
|
|
451
428
|
}
|
|
452
429
|
} catch (e) {
|
|
@@ -468,42 +445,22 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
468
445
|
}
|
|
469
446
|
};
|
|
470
447
|
var parseClassListRegex = /\s/;
|
|
471
|
-
var parseClassList = (value) =>
|
|
472
|
-
if (typeof value === "object" && value && "baseVal" in value) {
|
|
473
|
-
value = value.baseVal;
|
|
474
|
-
}
|
|
475
|
-
if (!value || typeof value !== "string") {
|
|
476
|
-
return [];
|
|
477
|
-
}
|
|
478
|
-
return value.split(parseClassListRegex);
|
|
479
|
-
};
|
|
448
|
+
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
|
480
449
|
|
|
481
450
|
// src/runtime/vdom/update-element.ts
|
|
482
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2
|
|
451
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
483
452
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
484
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
485
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
453
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
454
|
+
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
486
455
|
{
|
|
487
456
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
488
457
|
if (!(memberName in newVnodeAttrs)) {
|
|
489
|
-
setAccessor(
|
|
490
|
-
elm,
|
|
491
|
-
memberName,
|
|
492
|
-
oldVnodeAttrs[memberName],
|
|
493
|
-
void 0,
|
|
494
|
-
isSvgMode2,
|
|
495
|
-
newVnode.$flags$);
|
|
458
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
496
459
|
}
|
|
497
460
|
}
|
|
498
461
|
}
|
|
499
462
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
500
|
-
setAccessor(
|
|
501
|
-
elm,
|
|
502
|
-
memberName,
|
|
503
|
-
oldVnodeAttrs[memberName],
|
|
504
|
-
newVnodeAttrs[memberName],
|
|
505
|
-
isSvgMode2,
|
|
506
|
-
newVnode.$flags$);
|
|
463
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
507
464
|
}
|
|
508
465
|
};
|
|
509
466
|
function sortedAttrNames(attrNames) {
|
|
@@ -515,10 +472,13 @@ function sortedAttrNames(attrNames) {
|
|
|
515
472
|
attrNames
|
|
516
473
|
);
|
|
517
474
|
}
|
|
475
|
+
|
|
476
|
+
// src/runtime/vdom/vdom-render.ts
|
|
477
|
+
var scopeId;
|
|
518
478
|
var hostTagName;
|
|
519
479
|
var useNativeShadowDom = false;
|
|
520
480
|
var isSvgMode = false;
|
|
521
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
481
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
522
482
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
523
483
|
let i2 = 0;
|
|
524
484
|
let elm;
|
|
@@ -537,6 +497,11 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
537
497
|
{
|
|
538
498
|
updateElement(null, newVNode2, isSvgMode);
|
|
539
499
|
}
|
|
500
|
+
const rootNode = elm.getRootNode();
|
|
501
|
+
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
502
|
+
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
503
|
+
elm.classList.add(elm["s-si"] = scopeId);
|
|
504
|
+
}
|
|
540
505
|
if (newVNode2.$children$) {
|
|
541
506
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
542
507
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -672,9 +637,6 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
672
637
|
if (!isInitialRender) {
|
|
673
638
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
674
639
|
}
|
|
675
|
-
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
676
|
-
leftVNode.$key$ = rightVNode.$key$;
|
|
677
|
-
}
|
|
678
640
|
return true;
|
|
679
641
|
}
|
|
680
642
|
return false;
|
|
@@ -709,9 +671,8 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
709
671
|
}
|
|
710
672
|
};
|
|
711
673
|
var insertBefore = (parent, newNode, reference) => {
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
}
|
|
674
|
+
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
675
|
+
return inserted;
|
|
715
676
|
};
|
|
716
677
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
717
678
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -730,6 +691,9 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
730
691
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
731
692
|
hostRef.$vnode$ = rootVnode;
|
|
732
693
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
694
|
+
{
|
|
695
|
+
scopeId = hostElm["s-sc"];
|
|
696
|
+
}
|
|
733
697
|
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
734
698
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
735
699
|
};
|
|
@@ -737,14 +701,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
737
701
|
// src/runtime/update-component.ts
|
|
738
702
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
739
703
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
740
|
-
|
|
741
|
-
new Promise(
|
|
742
|
-
(r) => hostRef.$onRenderResolve$ = () => {
|
|
743
|
-
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
744
|
-
r();
|
|
745
|
-
}
|
|
746
|
-
)
|
|
747
|
-
);
|
|
704
|
+
ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
|
|
748
705
|
}
|
|
749
706
|
};
|
|
750
707
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -771,7 +728,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
771
728
|
let maybePromise;
|
|
772
729
|
if (isInitialLoad) {
|
|
773
730
|
{
|
|
774
|
-
maybePromise = safeCall(instance, "componentWillLoad"
|
|
731
|
+
maybePromise = safeCall(instance, "componentWillLoad");
|
|
775
732
|
}
|
|
776
733
|
}
|
|
777
734
|
endSchedule();
|
|
@@ -870,12 +827,12 @@ var appDidLoad = (who) => {
|
|
|
870
827
|
}
|
|
871
828
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
872
829
|
};
|
|
873
|
-
var safeCall = (instance, method, arg
|
|
830
|
+
var safeCall = (instance, method, arg) => {
|
|
874
831
|
if (instance && instance[method]) {
|
|
875
832
|
try {
|
|
876
833
|
return instance[method](arg);
|
|
877
834
|
} catch (e) {
|
|
878
|
-
consoleError(e
|
|
835
|
+
consoleError(e);
|
|
879
836
|
}
|
|
880
837
|
}
|
|
881
838
|
return void 0;
|
|
@@ -934,68 +891,15 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
934
891
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
935
892
|
members.map(([memberName, [memberFlags]]) => {
|
|
936
893
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
937
|
-
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
938
|
-
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
939
|
-
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
940
|
-
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
941
|
-
Object.defineProperty(prototype, memberName, {
|
|
942
|
-
get() {
|
|
943
|
-
{
|
|
944
|
-
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
945
|
-
return getValue(this, memberName);
|
|
946
|
-
}
|
|
947
|
-
const ref = getHostRef(this);
|
|
948
|
-
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
949
|
-
if (!instance) return;
|
|
950
|
-
return instance[memberName];
|
|
951
|
-
}
|
|
952
|
-
},
|
|
953
|
-
configurable: true,
|
|
954
|
-
enumerable: true
|
|
955
|
-
});
|
|
956
|
-
}
|
|
957
894
|
Object.defineProperty(prototype, memberName, {
|
|
895
|
+
get() {
|
|
896
|
+
return getValue(this, memberName);
|
|
897
|
+
},
|
|
958
898
|
set(newValue) {
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
newValue = ref.$instanceValues$.get(memberName);
|
|
964
|
-
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
965
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
966
|
-
}
|
|
967
|
-
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
968
|
-
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
969
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
970
|
-
return;
|
|
971
|
-
}
|
|
972
|
-
{
|
|
973
|
-
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
974
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
975
|
-
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
976
|
-
ref.$onReadyPromise$.then(() => {
|
|
977
|
-
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
978
|
-
ref.$lazyInstance$[memberName] = newValue;
|
|
979
|
-
}
|
|
980
|
-
});
|
|
981
|
-
}
|
|
982
|
-
return;
|
|
983
|
-
}
|
|
984
|
-
const setterSetVal = () => {
|
|
985
|
-
const currentValue = ref.$lazyInstance$[memberName];
|
|
986
|
-
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
987
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
988
|
-
}
|
|
989
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
990
|
-
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
991
|
-
};
|
|
992
|
-
if (ref.$lazyInstance$) {
|
|
993
|
-
setterSetVal();
|
|
994
|
-
} else {
|
|
995
|
-
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
996
|
-
}
|
|
997
|
-
}
|
|
998
|
-
}
|
|
899
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
900
|
+
},
|
|
901
|
+
configurable: true,
|
|
902
|
+
enumerable: true
|
|
999
903
|
});
|
|
1000
904
|
}
|
|
1001
905
|
});
|
|
@@ -1005,7 +909,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1005
909
|
plt.jmp(() => {
|
|
1006
910
|
var _a2;
|
|
1007
911
|
const propName = attrNameToPropName.get(attrName);
|
|
1008
|
-
if (this.hasOwnProperty(propName)
|
|
912
|
+
if (this.hasOwnProperty(propName)) {
|
|
1009
913
|
newValue = this[propName];
|
|
1010
914
|
delete this[propName];
|
|
1011
915
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1025,11 +929,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1025
929
|
}
|
|
1026
930
|
return;
|
|
1027
931
|
}
|
|
1028
|
-
|
|
1029
|
-
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1030
|
-
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1031
|
-
this[propName] = newValue;
|
|
1032
|
-
}
|
|
932
|
+
this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1033
933
|
});
|
|
1034
934
|
};
|
|
1035
935
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1052,8 +952,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1052
952
|
let Cstr;
|
|
1053
953
|
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1054
954
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1055
|
-
|
|
1056
|
-
|
|
955
|
+
const bundleId = cmpMeta.$lazyBundleId$;
|
|
956
|
+
if (bundleId) {
|
|
957
|
+
const CstrImport = loadModule(cmpMeta);
|
|
1057
958
|
if (CstrImport && "then" in CstrImport) {
|
|
1058
959
|
const endLoad = uniqueTime();
|
|
1059
960
|
Cstr = await CstrImport;
|
|
@@ -1078,7 +979,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1078
979
|
try {
|
|
1079
980
|
new Cstr(hostRef);
|
|
1080
981
|
} catch (e) {
|
|
1081
|
-
consoleError(e
|
|
982
|
+
consoleError(e);
|
|
1082
983
|
}
|
|
1083
984
|
{
|
|
1084
985
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1087,6 +988,10 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1087
988
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1088
989
|
}
|
|
1089
990
|
endNewInstance();
|
|
991
|
+
} else {
|
|
992
|
+
Cstr = elm.constructor;
|
|
993
|
+
const cmpTag = elm.localName;
|
|
994
|
+
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
1090
995
|
}
|
|
1091
996
|
if (Cstr && Cstr.style) {
|
|
1092
997
|
let style;
|
|
@@ -1109,7 +1014,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1109
1014
|
schedule();
|
|
1110
1015
|
}
|
|
1111
1016
|
};
|
|
1112
|
-
var fireConnectedCallback = (instance
|
|
1017
|
+
var fireConnectedCallback = (instance) => {
|
|
1113
1018
|
};
|
|
1114
1019
|
|
|
1115
1020
|
// src/runtime/connected-callback.ts
|
|
@@ -1149,7 +1054,7 @@ var connectedCallback = (elm) => {
|
|
|
1149
1054
|
endConnected();
|
|
1150
1055
|
}
|
|
1151
1056
|
};
|
|
1152
|
-
var disconnectInstance = (instance
|
|
1057
|
+
var disconnectInstance = (instance) => {
|
|
1153
1058
|
};
|
|
1154
1059
|
var disconnectedCallback = async (elm) => {
|
|
1155
1060
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1158,12 +1063,6 @@ var disconnectedCallback = async (elm) => {
|
|
|
1158
1063
|
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
1159
1064
|
}
|
|
1160
1065
|
}
|
|
1161
|
-
if (rootAppliedStyles.has(elm)) {
|
|
1162
|
-
rootAppliedStyles.delete(elm);
|
|
1163
|
-
}
|
|
1164
|
-
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1165
|
-
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1166
|
-
}
|
|
1167
1066
|
};
|
|
1168
1067
|
|
|
1169
1068
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1241,13 +1140,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1241
1140
|
}
|
|
1242
1141
|
disconnectedCallback() {
|
|
1243
1142
|
plt.jmp(() => disconnectedCallback(this));
|
|
1244
|
-
plt.raf(() => {
|
|
1245
|
-
var _a3;
|
|
1246
|
-
const hostRef = getHostRef(this);
|
|
1247
|
-
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1248
|
-
delete hostRef.$vnode$.$elm$;
|
|
1249
|
-
}
|
|
1250
|
-
});
|
|
1251
1143
|
}
|
|
1252
1144
|
componentOnReady() {
|
|
1253
1145
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1295,4 +1187,4 @@ var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
|
1295
1187
|
|
|
1296
1188
|
export { Host as H, setAssetPath as a, bootstrapLazy as b, getElement as c, getAssetPath as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
1297
1189
|
|
|
1298
|
-
//# sourceMappingURL=index-
|
|
1190
|
+
//# sourceMappingURL=index-050dd9d6.js.map
|