@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
|
@@ -21,27 +21,19 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'ix-icons';
|
|
24
|
-
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,
|
|
24
|
+
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 };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
|
-
Stencil Client Platform v4.
|
|
27
|
+
Stencil Client Platform v4.21.0 | 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
|
|
40
34
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
41
35
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
42
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
43
|
-
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
44
|
-
};
|
|
36
|
+
var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
45
37
|
var registerHost = (hostElement, cmpMeta) => {
|
|
46
38
|
const hostRef = {
|
|
47
39
|
$flags$: 0,
|
|
@@ -54,8 +46,7 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
54
46
|
hostElement["s-p"] = [];
|
|
55
47
|
hostElement["s-rc"] = [];
|
|
56
48
|
}
|
|
57
|
-
|
|
58
|
-
return ref;
|
|
49
|
+
return hostRefs.set(hostElement, hostRef);
|
|
59
50
|
};
|
|
60
51
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
61
52
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -92,22 +83,16 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
92
83
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
93
84
|
/* webpackMode: "lazy" */
|
|
94
85
|
`./${bundleId}.entry.js${""}`
|
|
95
|
-
)); }).then(
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
cmpModules.set(bundleId, importedModule);
|
|
99
|
-
}
|
|
100
|
-
return importedModule[exportName];
|
|
101
|
-
},
|
|
102
|
-
(e) => {
|
|
103
|
-
consoleError(e, hostRef.$hostElement$);
|
|
86
|
+
)); }).then((importedModule) => {
|
|
87
|
+
{
|
|
88
|
+
cmpModules.set(bundleId, importedModule);
|
|
104
89
|
}
|
|
105
|
-
|
|
90
|
+
return importedModule[exportName];
|
|
91
|
+
}, consoleError);
|
|
106
92
|
};
|
|
107
93
|
|
|
108
94
|
// src/client/client-style.ts
|
|
109
95
|
var styles = /* @__PURE__ */ new Map();
|
|
110
|
-
var HYDRATED_STYLE_ID = "sty-id";
|
|
111
96
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
112
97
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
113
98
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -172,6 +157,14 @@ var getAssetPath = (path) => {
|
|
|
172
157
|
return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
|
|
173
158
|
};
|
|
174
159
|
var setAssetPath = (path) => plt.$resourcesUrl$ = path;
|
|
160
|
+
|
|
161
|
+
// src/utils/constants.ts
|
|
162
|
+
var EMPTY_OBJ = {};
|
|
163
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
164
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
165
|
+
|
|
166
|
+
// src/utils/helpers.ts
|
|
167
|
+
var isDef = (v) => v != null;
|
|
175
168
|
var isComplexType = (o) => {
|
|
176
169
|
o = typeof o;
|
|
177
170
|
return o === "object" || o === "function";
|
|
@@ -357,7 +350,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
357
350
|
}
|
|
358
351
|
if (!appliedStyles.has(scopeId2)) {
|
|
359
352
|
{
|
|
360
|
-
styleElm =
|
|
353
|
+
styleElm = doc.createElement("style");
|
|
361
354
|
styleElm.innerHTML = style;
|
|
362
355
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
363
356
|
if (nonce != null) {
|
|
@@ -366,24 +359,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
366
359
|
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
367
360
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
368
361
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
369
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling :
|
|
370
|
-
styleContainerNode.insertBefore(
|
|
371
|
-
styleElm,
|
|
372
|
-
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
373
|
-
);
|
|
362
|
+
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : document.querySelector("style");
|
|
363
|
+
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
|
374
364
|
} else if ("host" in styleContainerNode) {
|
|
375
|
-
|
|
376
|
-
const stylesheet = new CSSStyleSheet();
|
|
377
|
-
stylesheet.replaceSync(style);
|
|
378
|
-
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
379
|
-
} else {
|
|
380
|
-
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
381
|
-
if (existingStyleContainer) {
|
|
382
|
-
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
383
|
-
} else {
|
|
384
|
-
styleContainerNode.prepend(styleElm);
|
|
385
|
-
}
|
|
386
|
-
}
|
|
365
|
+
styleContainerNode.prepend(styleElm);
|
|
387
366
|
} else {
|
|
388
367
|
styleContainerNode.append(styleElm);
|
|
389
368
|
}
|
|
@@ -420,18 +399,16 @@ var attachStyles = (hostRef) => {
|
|
|
420
399
|
endAttachStyles();
|
|
421
400
|
};
|
|
422
401
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
423
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags
|
|
402
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
424
403
|
if (oldValue !== newValue) {
|
|
425
404
|
let isProp = isMemberInElement(elm, memberName);
|
|
426
405
|
memberName.toLowerCase();
|
|
427
406
|
if (memberName === "class") {
|
|
428
407
|
const classList = elm.classList;
|
|
429
408
|
const oldClasses = parseClassList(oldValue);
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
434
|
-
}
|
|
409
|
+
const newClasses = parseClassList(newValue);
|
|
410
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
411
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
435
412
|
} else if (memberName === "style") {
|
|
436
413
|
{
|
|
437
414
|
for (const prop in oldValue) {
|
|
@@ -468,7 +445,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
468
445
|
elm.setAttribute(memberName, n);
|
|
469
446
|
}
|
|
470
447
|
}
|
|
471
|
-
} else
|
|
448
|
+
} else {
|
|
472
449
|
elm[memberName] = newValue;
|
|
473
450
|
}
|
|
474
451
|
} catch (e) {
|
|
@@ -490,42 +467,22 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
490
467
|
}
|
|
491
468
|
};
|
|
492
469
|
var parseClassListRegex = /\s/;
|
|
493
|
-
var parseClassList = (value) =>
|
|
494
|
-
if (typeof value === "object" && value && "baseVal" in value) {
|
|
495
|
-
value = value.baseVal;
|
|
496
|
-
}
|
|
497
|
-
if (!value || typeof value !== "string") {
|
|
498
|
-
return [];
|
|
499
|
-
}
|
|
500
|
-
return value.split(parseClassListRegex);
|
|
501
|
-
};
|
|
470
|
+
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
|
502
471
|
|
|
503
472
|
// src/runtime/vdom/update-element.ts
|
|
504
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2
|
|
473
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
505
474
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
506
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
507
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
475
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
476
|
+
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
508
477
|
{
|
|
509
478
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
510
479
|
if (!(memberName in newVnodeAttrs)) {
|
|
511
|
-
setAccessor(
|
|
512
|
-
elm,
|
|
513
|
-
memberName,
|
|
514
|
-
oldVnodeAttrs[memberName],
|
|
515
|
-
void 0,
|
|
516
|
-
isSvgMode2,
|
|
517
|
-
newVnode.$flags$);
|
|
480
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
518
481
|
}
|
|
519
482
|
}
|
|
520
483
|
}
|
|
521
484
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
522
|
-
setAccessor(
|
|
523
|
-
elm,
|
|
524
|
-
memberName,
|
|
525
|
-
oldVnodeAttrs[memberName],
|
|
526
|
-
newVnodeAttrs[memberName],
|
|
527
|
-
isSvgMode2,
|
|
528
|
-
newVnode.$flags$);
|
|
485
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
529
486
|
}
|
|
530
487
|
};
|
|
531
488
|
function sortedAttrNames(attrNames) {
|
|
@@ -537,10 +494,13 @@ function sortedAttrNames(attrNames) {
|
|
|
537
494
|
attrNames
|
|
538
495
|
);
|
|
539
496
|
}
|
|
497
|
+
|
|
498
|
+
// src/runtime/vdom/vdom-render.ts
|
|
499
|
+
var scopeId;
|
|
540
500
|
var hostTagName;
|
|
541
501
|
var useNativeShadowDom = false;
|
|
542
502
|
var isSvgMode = false;
|
|
543
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
503
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
544
504
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
545
505
|
let i2 = 0;
|
|
546
506
|
let elm;
|
|
@@ -559,6 +519,11 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
559
519
|
{
|
|
560
520
|
updateElement(null, newVNode2, isSvgMode);
|
|
561
521
|
}
|
|
522
|
+
const rootNode = elm.getRootNode();
|
|
523
|
+
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
524
|
+
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
525
|
+
elm.classList.add(elm["s-si"] = scopeId);
|
|
526
|
+
}
|
|
562
527
|
if (newVNode2.$children$) {
|
|
563
528
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
564
529
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -694,9 +659,6 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
694
659
|
if (!isInitialRender) {
|
|
695
660
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
696
661
|
}
|
|
697
|
-
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
698
|
-
leftVNode.$key$ = rightVNode.$key$;
|
|
699
|
-
}
|
|
700
662
|
return true;
|
|
701
663
|
}
|
|
702
664
|
return false;
|
|
@@ -731,9 +693,8 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
731
693
|
}
|
|
732
694
|
};
|
|
733
695
|
var insertBefore = (parent, newNode, reference) => {
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
}
|
|
696
|
+
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
697
|
+
return inserted;
|
|
737
698
|
};
|
|
738
699
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
739
700
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -752,6 +713,9 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
752
713
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
753
714
|
hostRef.$vnode$ = rootVnode;
|
|
754
715
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
716
|
+
{
|
|
717
|
+
scopeId = hostElm["s-sc"];
|
|
718
|
+
}
|
|
755
719
|
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
756
720
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
757
721
|
};
|
|
@@ -759,14 +723,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
759
723
|
// src/runtime/update-component.ts
|
|
760
724
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
761
725
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
762
|
-
|
|
763
|
-
new Promise(
|
|
764
|
-
(r) => hostRef.$onRenderResolve$ = () => {
|
|
765
|
-
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
766
|
-
r();
|
|
767
|
-
}
|
|
768
|
-
)
|
|
769
|
-
);
|
|
726
|
+
ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
|
|
770
727
|
}
|
|
771
728
|
};
|
|
772
729
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -793,7 +750,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
793
750
|
let maybePromise;
|
|
794
751
|
if (isInitialLoad) {
|
|
795
752
|
{
|
|
796
|
-
maybePromise = safeCall(instance, "componentWillLoad"
|
|
753
|
+
maybePromise = safeCall(instance, "componentWillLoad");
|
|
797
754
|
}
|
|
798
755
|
}
|
|
799
756
|
endSchedule();
|
|
@@ -892,12 +849,12 @@ var appDidLoad = (who) => {
|
|
|
892
849
|
}
|
|
893
850
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
894
851
|
};
|
|
895
|
-
var safeCall = (instance, method, arg
|
|
852
|
+
var safeCall = (instance, method, arg) => {
|
|
896
853
|
if (instance && instance[method]) {
|
|
897
854
|
try {
|
|
898
855
|
return instance[method](arg);
|
|
899
856
|
} catch (e) {
|
|
900
|
-
consoleError(e
|
|
857
|
+
consoleError(e);
|
|
901
858
|
}
|
|
902
859
|
}
|
|
903
860
|
return void 0;
|
|
@@ -956,68 +913,15 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
956
913
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
957
914
|
members.map(([memberName, [memberFlags]]) => {
|
|
958
915
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
959
|
-
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
960
|
-
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
961
|
-
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
962
|
-
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
963
|
-
Object.defineProperty(prototype, memberName, {
|
|
964
|
-
get() {
|
|
965
|
-
{
|
|
966
|
-
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
967
|
-
return getValue(this, memberName);
|
|
968
|
-
}
|
|
969
|
-
const ref = getHostRef(this);
|
|
970
|
-
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
971
|
-
if (!instance) return;
|
|
972
|
-
return instance[memberName];
|
|
973
|
-
}
|
|
974
|
-
},
|
|
975
|
-
configurable: true,
|
|
976
|
-
enumerable: true
|
|
977
|
-
});
|
|
978
|
-
}
|
|
979
916
|
Object.defineProperty(prototype, memberName, {
|
|
917
|
+
get() {
|
|
918
|
+
return getValue(this, memberName);
|
|
919
|
+
},
|
|
980
920
|
set(newValue) {
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
newValue = ref.$instanceValues$.get(memberName);
|
|
986
|
-
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
987
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
988
|
-
}
|
|
989
|
-
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
990
|
-
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
991
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
992
|
-
return;
|
|
993
|
-
}
|
|
994
|
-
{
|
|
995
|
-
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
996
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
997
|
-
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
998
|
-
ref.$onReadyPromise$.then(() => {
|
|
999
|
-
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1000
|
-
ref.$lazyInstance$[memberName] = newValue;
|
|
1001
|
-
}
|
|
1002
|
-
});
|
|
1003
|
-
}
|
|
1004
|
-
return;
|
|
1005
|
-
}
|
|
1006
|
-
const setterSetVal = () => {
|
|
1007
|
-
const currentValue = ref.$lazyInstance$[memberName];
|
|
1008
|
-
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1009
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
1010
|
-
}
|
|
1011
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1012
|
-
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1013
|
-
};
|
|
1014
|
-
if (ref.$lazyInstance$) {
|
|
1015
|
-
setterSetVal();
|
|
1016
|
-
} else {
|
|
1017
|
-
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1018
|
-
}
|
|
1019
|
-
}
|
|
1020
|
-
}
|
|
921
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
922
|
+
},
|
|
923
|
+
configurable: true,
|
|
924
|
+
enumerable: true
|
|
1021
925
|
});
|
|
1022
926
|
}
|
|
1023
927
|
});
|
|
@@ -1027,7 +931,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1027
931
|
plt.jmp(() => {
|
|
1028
932
|
var _a2;
|
|
1029
933
|
const propName = attrNameToPropName.get(attrName);
|
|
1030
|
-
if (this.hasOwnProperty(propName)
|
|
934
|
+
if (this.hasOwnProperty(propName)) {
|
|
1031
935
|
newValue = this[propName];
|
|
1032
936
|
delete this[propName];
|
|
1033
937
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1047,11 +951,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1047
951
|
}
|
|
1048
952
|
return;
|
|
1049
953
|
}
|
|
1050
|
-
|
|
1051
|
-
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1052
|
-
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1053
|
-
this[propName] = newValue;
|
|
1054
|
-
}
|
|
954
|
+
this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1055
955
|
});
|
|
1056
956
|
};
|
|
1057
957
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1074,8 +974,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1074
974
|
let Cstr;
|
|
1075
975
|
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1076
976
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1077
|
-
|
|
1078
|
-
|
|
977
|
+
const bundleId = cmpMeta.$lazyBundleId$;
|
|
978
|
+
if (bundleId) {
|
|
979
|
+
const CstrImport = loadModule(cmpMeta);
|
|
1079
980
|
if (CstrImport && "then" in CstrImport) {
|
|
1080
981
|
const endLoad = uniqueTime();
|
|
1081
982
|
Cstr = await CstrImport;
|
|
@@ -1100,7 +1001,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1100
1001
|
try {
|
|
1101
1002
|
new Cstr(hostRef);
|
|
1102
1003
|
} catch (e) {
|
|
1103
|
-
consoleError(e
|
|
1004
|
+
consoleError(e);
|
|
1104
1005
|
}
|
|
1105
1006
|
{
|
|
1106
1007
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1109,6 +1010,10 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1109
1010
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1110
1011
|
}
|
|
1111
1012
|
endNewInstance();
|
|
1013
|
+
} else {
|
|
1014
|
+
Cstr = elm.constructor;
|
|
1015
|
+
const cmpTag = elm.localName;
|
|
1016
|
+
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
1112
1017
|
}
|
|
1113
1018
|
if (Cstr && Cstr.style) {
|
|
1114
1019
|
let style;
|
|
@@ -1131,7 +1036,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1131
1036
|
schedule();
|
|
1132
1037
|
}
|
|
1133
1038
|
};
|
|
1134
|
-
var fireConnectedCallback = (instance
|
|
1039
|
+
var fireConnectedCallback = (instance) => {
|
|
1135
1040
|
};
|
|
1136
1041
|
|
|
1137
1042
|
// src/runtime/connected-callback.ts
|
|
@@ -1171,7 +1076,7 @@ var connectedCallback = (elm) => {
|
|
|
1171
1076
|
endConnected();
|
|
1172
1077
|
}
|
|
1173
1078
|
};
|
|
1174
|
-
var disconnectInstance = (instance
|
|
1079
|
+
var disconnectInstance = (instance) => {
|
|
1175
1080
|
};
|
|
1176
1081
|
var disconnectedCallback = async (elm) => {
|
|
1177
1082
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1180,12 +1085,6 @@ var disconnectedCallback = async (elm) => {
|
|
|
1180
1085
|
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
1181
1086
|
}
|
|
1182
1087
|
}
|
|
1183
|
-
if (rootAppliedStyles.has(elm)) {
|
|
1184
|
-
rootAppliedStyles.delete(elm);
|
|
1185
|
-
}
|
|
1186
|
-
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1187
|
-
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1188
|
-
}
|
|
1189
1088
|
};
|
|
1190
1089
|
|
|
1191
1090
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1263,13 +1162,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1263
1162
|
}
|
|
1264
1163
|
disconnectedCallback() {
|
|
1265
1164
|
plt.jmp(() => disconnectedCallback(this));
|
|
1266
|
-
plt.raf(() => {
|
|
1267
|
-
var _a3;
|
|
1268
|
-
const hostRef = getHostRef(this);
|
|
1269
|
-
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1270
|
-
delete hostRef.$vnode$.$elm$;
|
|
1271
|
-
}
|
|
1272
|
-
});
|
|
1273
1165
|
}
|
|
1274
1166
|
componentOnReady() {
|
|
1275
1167
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1325,4 +1217,4 @@ exports.registerInstance = registerInstance;
|
|
|
1325
1217
|
exports.setAssetPath = setAssetPath;
|
|
1326
1218
|
exports.setNonce = setNonce;
|
|
1327
1219
|
|
|
1328
|
-
//# sourceMappingURL=index-
|
|
1220
|
+
//# sourceMappingURL=index-ea94711c.js.map
|