@pine-ds/icons 9.11.0 → 9.12.0
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/components/index.js +1 -1
- package/components/pds-icon.js +5 -3
- package/components/pds-icon.js.map +1 -1
- package/dist/cheatsheet.html +3 -3
- package/dist/cjs/app-globals-V2Kpy_OQ.js.map +1 -1
- package/dist/cjs/{index-vqovWm2E.js → index-1SOIMLKQ.js} +3 -3
- package/dist/cjs/{index-vqovWm2E.js.map → index-1SOIMLKQ.js.map} +1 -1
- package/dist/cjs/{index-Rab0J0J-.js → index-C2yOCYcM.js} +262 -120
- package/dist/cjs/index-C2yOCYcM.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -4
- package/dist/cjs/loader.cjs.js +2 -4
- package/dist/cjs/pds-icon.cjs.entry.js +2 -4
- package/dist/cjs/pds-icons.cjs.js +3 -5
- package/dist/cjs/pds-icons.cjs.js.map +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/pds-icon/pds-icon.js +11 -11
- package/dist/docs.json +9 -4
- package/dist/esm/app-globals-DQuL1Twl.js.map +1 -1
- package/dist/esm/{index-DageRZ16.js → index-Bbt-SSYo.js} +3 -3
- package/dist/esm/{index-DageRZ16.js.map → index-Bbt-SSYo.js.map} +1 -1
- package/dist/esm/{index-BtVkVfWm.js → index-BnTKVLFw.js} +262 -120
- package/dist/esm/index-BnTKVLFw.js.map +1 -0
- package/dist/esm/index.js +2 -4
- package/dist/esm/loader.js +3 -5
- package/dist/esm/pds-icon.entry.js +2 -4
- package/dist/esm/pds-icons.js +4 -6
- package/dist/esm/pds-icons.js.map +1 -1
- package/dist/pds-icons/index.esm.js +1 -1
- package/dist/pds-icons/{p-5ea9f963.entry.js → p-1ade35d9.entry.js} +2 -2
- package/dist/pds-icons/p-1ade35d9.entry.js.map +1 -0
- package/dist/pds-icons/p-BnTKVLFw.js +3 -0
- package/dist/pds-icons/p-BnTKVLFw.js.map +1 -0
- package/dist/pds-icons/{p-6DkR999u.js → p-CdP7eq1f.js} +2 -2
- package/dist/pds-icons/{p-6DkR999u.js.map → p-CdP7eq1f.js.map} +1 -1
- package/dist/pds-icons/p-DQuL1Twl.js.map +1 -1
- package/dist/pds-icons/pds-icons.esm.js +1 -1
- package/dist/pds-icons/pds-icons.esm.js.map +1 -1
- package/dist/pds-icons.json +1 -1
- package/dist/pds-icons.symbols.svg +1 -1
- package/dist/types/components.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +83 -8
- package/icons/index.d.ts +1 -1
- package/icons/index.js +1 -1
- package/icons/index.mjs +1 -1
- package/icons/package.json +1 -1
- package/package.json +2 -2
- package/dist/cjs/index-Rab0J0J-.js.map +0 -1
- package/dist/cjs/pds-icon.cjs.entry.js.map +0 -1
- package/dist/esm/index-BtVkVfWm.js.map +0 -1
- package/dist/pds-icons/p-5ea9f963.entry.js.map +0 -1
- package/dist/pds-icons/p-BtVkVfWm.js +0 -3
- package/dist/pds-icons/p-BtVkVfWm.js.map +0 -1
|
@@ -1,14 +1,46 @@
|
|
|
1
1
|
const NAMESPACE = 'pds-icons';
|
|
2
|
-
const BUILD = /* pds-icons */ { hydratedSelectorName: "hydrated", lazyLoad: true, updatable: true};
|
|
2
|
+
const BUILD = /* pds-icons */ { hydratedSelectorName: "hydrated", lazyLoad: true, propChangeCallback: true, state: true, updatable: true};
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Platform v4.
|
|
5
|
+
Stencil Client Platform v4.38.3 | 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
|
+
var reWireGetterSetter = (instance, hostRef) => {
|
|
13
|
+
var _a;
|
|
14
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
15
|
+
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
16
|
+
members.map(([memberName, [memberFlags]]) => {
|
|
17
|
+
if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
|
|
18
|
+
const ogValue = instance[memberName];
|
|
19
|
+
const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName) || Object.getOwnPropertyDescriptor(instance, memberName);
|
|
20
|
+
if (ogDescriptor) {
|
|
21
|
+
Object.defineProperty(instance, memberName, {
|
|
22
|
+
get() {
|
|
23
|
+
return ogDescriptor.get.call(this);
|
|
24
|
+
},
|
|
25
|
+
set(newValue) {
|
|
26
|
+
ogDescriptor.set.call(this, newValue);
|
|
27
|
+
},
|
|
28
|
+
configurable: true,
|
|
29
|
+
enumerable: true
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
instance[memberName] = hostRef.$instanceValues$.has(memberName) ? hostRef.$instanceValues$.get(memberName) : ogValue;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
function getPropertyDescriptor(obj, memberName) {
|
|
37
|
+
while (obj) {
|
|
38
|
+
const desc = Object.getOwnPropertyDescriptor(obj, memberName);
|
|
39
|
+
if (desc == null ? void 0 : desc.get) return desc;
|
|
40
|
+
obj = Object.getPrototypeOf(obj);
|
|
41
|
+
}
|
|
42
|
+
return void 0;
|
|
43
|
+
}
|
|
12
44
|
|
|
13
45
|
// src/client/client-host-ref.ts
|
|
14
46
|
var getHostRef = (ref) => {
|
|
@@ -18,21 +50,29 @@ var getHostRef = (ref) => {
|
|
|
18
50
|
return void 0;
|
|
19
51
|
};
|
|
20
52
|
var registerInstance = (lazyInstance, hostRef) => {
|
|
53
|
+
if (!hostRef) return;
|
|
21
54
|
lazyInstance.__stencil__getHostRef = () => hostRef;
|
|
22
55
|
hostRef.$lazyInstance$ = lazyInstance;
|
|
56
|
+
if (hostRef.$cmpMeta$.$flags$ & 512 /* hasModernPropertyDecls */ && (BUILD.state)) {
|
|
57
|
+
reWireGetterSetter(lazyInstance, hostRef);
|
|
58
|
+
}
|
|
23
59
|
};
|
|
24
60
|
var registerHost = (hostElement, cmpMeta) => {
|
|
25
61
|
const hostRef = {
|
|
26
62
|
$flags$: 0,
|
|
27
63
|
$hostElement$: hostElement,
|
|
28
64
|
$cmpMeta$: cmpMeta,
|
|
29
|
-
$instanceValues$: /* @__PURE__ */ new Map()
|
|
65
|
+
$instanceValues$: /* @__PURE__ */ new Map(),
|
|
66
|
+
$serializerValues$: /* @__PURE__ */ new Map()
|
|
30
67
|
};
|
|
31
68
|
{
|
|
32
69
|
hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
|
|
33
70
|
hostElement["s-p"] = [];
|
|
34
71
|
hostElement["s-rc"] = [];
|
|
35
72
|
}
|
|
73
|
+
{
|
|
74
|
+
hostRef.$fetchedCbList$ = [];
|
|
75
|
+
}
|
|
36
76
|
const ref = hostRef;
|
|
37
77
|
hostElement.__stencil__getHostRef = () => ref;
|
|
38
78
|
return ref;
|
|
@@ -74,7 +114,6 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
74
114
|
|
|
75
115
|
// src/client/client-style.ts
|
|
76
116
|
var styles = /* @__PURE__ */ new Map();
|
|
77
|
-
var HYDRATED_STYLE_ID = "sty-id";
|
|
78
117
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
79
118
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
80
119
|
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
@@ -97,6 +136,7 @@ var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
|
|
|
97
136
|
}
|
|
98
137
|
return false;
|
|
99
138
|
})() ;
|
|
139
|
+
var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @__PURE__ */ (() => !!win.document && Object.getOwnPropertyDescriptor(win.document.adoptedStyleSheets, "length").writable)() : false;
|
|
100
140
|
var queuePending = false;
|
|
101
141
|
var queueDomReads = [];
|
|
102
142
|
var queueDomWrites = [];
|
|
@@ -143,6 +183,11 @@ function queryNonceMetaTagContent(doc) {
|
|
|
143
183
|
return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
|
|
144
184
|
}
|
|
145
185
|
|
|
186
|
+
// src/utils/regular-expression.ts
|
|
187
|
+
var escapeRegExpSpecialCharacters = (text) => {
|
|
188
|
+
return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
189
|
+
};
|
|
190
|
+
|
|
146
191
|
// src/utils/result.ts
|
|
147
192
|
var result_exports = {};
|
|
148
193
|
__export(result_exports, {
|
|
@@ -191,6 +236,26 @@ var unwrapErr = (result) => {
|
|
|
191
236
|
throw result.value;
|
|
192
237
|
}
|
|
193
238
|
};
|
|
239
|
+
|
|
240
|
+
// src/utils/style.ts
|
|
241
|
+
function createStyleSheetIfNeededAndSupported(styles2) {
|
|
242
|
+
return void 0;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// src/utils/shadow-root.ts
|
|
246
|
+
var globalStyleSheet;
|
|
247
|
+
function createShadowRoot(cmpMeta) {
|
|
248
|
+
var _a;
|
|
249
|
+
const shadowRoot = this.attachShadow({ mode: "open" });
|
|
250
|
+
if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported()) != null ? _a : null;
|
|
251
|
+
if (globalStyleSheet) {
|
|
252
|
+
if (supportsMutableAdoptedStyleSheets) {
|
|
253
|
+
shadowRoot.adoptedStyleSheets.push(globalStyleSheet);
|
|
254
|
+
} else {
|
|
255
|
+
shadowRoot.adoptedStyleSheets = [...shadowRoot.adoptedStyleSheets, globalStyleSheet];
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
194
259
|
var createTime = (fnName, tagName = "") => {
|
|
195
260
|
{
|
|
196
261
|
return () => {
|
|
@@ -205,88 +270,6 @@ var uniqueTime = (key, measureText) => {
|
|
|
205
270
|
};
|
|
206
271
|
}
|
|
207
272
|
};
|
|
208
|
-
var h = (nodeName, vnodeData, ...children) => {
|
|
209
|
-
let child = null;
|
|
210
|
-
let key = null;
|
|
211
|
-
let simple = false;
|
|
212
|
-
let lastSimple = false;
|
|
213
|
-
const vNodeChildren = [];
|
|
214
|
-
const walk = (c) => {
|
|
215
|
-
for (let i2 = 0; i2 < c.length; i2++) {
|
|
216
|
-
child = c[i2];
|
|
217
|
-
if (Array.isArray(child)) {
|
|
218
|
-
walk(child);
|
|
219
|
-
} else if (child != null && typeof child !== "boolean") {
|
|
220
|
-
if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
|
|
221
|
-
child = String(child);
|
|
222
|
-
}
|
|
223
|
-
if (simple && lastSimple) {
|
|
224
|
-
vNodeChildren[vNodeChildren.length - 1].$text$ += child;
|
|
225
|
-
} else {
|
|
226
|
-
vNodeChildren.push(simple ? newVNode(null, child) : child);
|
|
227
|
-
}
|
|
228
|
-
lastSimple = simple;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
};
|
|
232
|
-
walk(children);
|
|
233
|
-
if (vnodeData) {
|
|
234
|
-
if (vnodeData.key) {
|
|
235
|
-
key = vnodeData.key;
|
|
236
|
-
}
|
|
237
|
-
{
|
|
238
|
-
const classData = vnodeData.className || vnodeData.class;
|
|
239
|
-
if (classData) {
|
|
240
|
-
vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
const vnode = newVNode(nodeName, null);
|
|
245
|
-
vnode.$attrs$ = vnodeData;
|
|
246
|
-
if (vNodeChildren.length > 0) {
|
|
247
|
-
vnode.$children$ = vNodeChildren;
|
|
248
|
-
}
|
|
249
|
-
{
|
|
250
|
-
vnode.$key$ = key;
|
|
251
|
-
}
|
|
252
|
-
return vnode;
|
|
253
|
-
};
|
|
254
|
-
var newVNode = (tag, text) => {
|
|
255
|
-
const vnode = {
|
|
256
|
-
$flags$: 0,
|
|
257
|
-
$tag$: tag,
|
|
258
|
-
$text$: text,
|
|
259
|
-
$elm$: null,
|
|
260
|
-
$children$: null
|
|
261
|
-
};
|
|
262
|
-
{
|
|
263
|
-
vnode.$attrs$ = null;
|
|
264
|
-
}
|
|
265
|
-
{
|
|
266
|
-
vnode.$key$ = null;
|
|
267
|
-
}
|
|
268
|
-
return vnode;
|
|
269
|
-
};
|
|
270
|
-
var Host = {};
|
|
271
|
-
var isHost = (node) => node && node.$tag$ === Host;
|
|
272
|
-
var parsePropertyValue = (propValue, propType) => {
|
|
273
|
-
if (propValue != null && !isComplexType(propValue)) {
|
|
274
|
-
if (propType & 4 /* Boolean */) {
|
|
275
|
-
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
276
|
-
}
|
|
277
|
-
if (propType & 1 /* String */) {
|
|
278
|
-
return String(propValue);
|
|
279
|
-
}
|
|
280
|
-
return propValue;
|
|
281
|
-
}
|
|
282
|
-
return propValue;
|
|
283
|
-
};
|
|
284
|
-
var getElement = (ref) => getHostRef(ref).$hostElement$ ;
|
|
285
|
-
var emitEvent = (elm, name, opts) => {
|
|
286
|
-
const ev = plt.ce(name, opts);
|
|
287
|
-
elm.dispatchEvent(ev);
|
|
288
|
-
return ev;
|
|
289
|
-
};
|
|
290
273
|
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
291
274
|
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
292
275
|
let style = styles.get(scopeId2);
|
|
@@ -320,7 +303,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
320
303
|
}
|
|
321
304
|
if (!appliedStyles.has(scopeId2)) {
|
|
322
305
|
{
|
|
323
|
-
styleElm =
|
|
306
|
+
styleElm = win.document.createElement("style");
|
|
324
307
|
styleElm.innerHTML = style;
|
|
325
308
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
326
309
|
if (nonce != null) {
|
|
@@ -338,7 +321,11 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
338
321
|
if (supportsConstructableStylesheets) {
|
|
339
322
|
const stylesheet = new CSSStyleSheet();
|
|
340
323
|
stylesheet.replaceSync(style);
|
|
341
|
-
|
|
324
|
+
if (supportsMutableAdoptedStyleSheets) {
|
|
325
|
+
styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
|
|
326
|
+
} else {
|
|
327
|
+
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
328
|
+
}
|
|
342
329
|
} else {
|
|
343
330
|
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
344
331
|
if (existingStyleContainer) {
|
|
@@ -363,7 +350,11 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
363
350
|
}
|
|
364
351
|
}
|
|
365
352
|
} else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
366
|
-
|
|
353
|
+
if (supportsMutableAdoptedStyleSheets) {
|
|
354
|
+
styleContainerNode.adoptedStyleSheets.push(style);
|
|
355
|
+
} else {
|
|
356
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
357
|
+
}
|
|
367
358
|
}
|
|
368
359
|
}
|
|
369
360
|
return scopeId2;
|
|
@@ -376,13 +367,112 @@ var attachStyles = (hostRef) => {
|
|
|
376
367
|
const scopeId2 = addStyle(
|
|
377
368
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
378
369
|
cmpMeta);
|
|
379
|
-
if (
|
|
370
|
+
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
380
371
|
elm["s-sc"] = scopeId2;
|
|
381
372
|
elm.classList.add(scopeId2 + "-h");
|
|
382
373
|
}
|
|
383
374
|
endAttachStyles();
|
|
384
375
|
};
|
|
385
376
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
377
|
+
var h = (nodeName, vnodeData, ...children) => {
|
|
378
|
+
let child = null;
|
|
379
|
+
let key = null;
|
|
380
|
+
let simple = false;
|
|
381
|
+
let lastSimple = false;
|
|
382
|
+
const vNodeChildren = [];
|
|
383
|
+
const walk = (c) => {
|
|
384
|
+
for (let i2 = 0; i2 < c.length; i2++) {
|
|
385
|
+
child = c[i2];
|
|
386
|
+
if (Array.isArray(child)) {
|
|
387
|
+
walk(child);
|
|
388
|
+
} else if (child != null && typeof child !== "boolean") {
|
|
389
|
+
if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
|
|
390
|
+
child = String(child);
|
|
391
|
+
}
|
|
392
|
+
if (simple && lastSimple) {
|
|
393
|
+
vNodeChildren[vNodeChildren.length - 1].$text$ += child;
|
|
394
|
+
} else {
|
|
395
|
+
vNodeChildren.push(simple ? newVNode(null, child) : child);
|
|
396
|
+
}
|
|
397
|
+
lastSimple = simple;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
};
|
|
401
|
+
walk(children);
|
|
402
|
+
if (vnodeData) {
|
|
403
|
+
if (vnodeData.key) {
|
|
404
|
+
key = vnodeData.key;
|
|
405
|
+
}
|
|
406
|
+
{
|
|
407
|
+
const classData = vnodeData.className || vnodeData.class;
|
|
408
|
+
if (classData) {
|
|
409
|
+
vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
const vnode = newVNode(nodeName, null);
|
|
414
|
+
vnode.$attrs$ = vnodeData;
|
|
415
|
+
if (vNodeChildren.length > 0) {
|
|
416
|
+
vnode.$children$ = vNodeChildren;
|
|
417
|
+
}
|
|
418
|
+
{
|
|
419
|
+
vnode.$key$ = key;
|
|
420
|
+
}
|
|
421
|
+
return vnode;
|
|
422
|
+
};
|
|
423
|
+
var newVNode = (tag, text) => {
|
|
424
|
+
const vnode = {
|
|
425
|
+
$flags$: 0,
|
|
426
|
+
$tag$: tag,
|
|
427
|
+
$text$: text,
|
|
428
|
+
$elm$: null,
|
|
429
|
+
$children$: null
|
|
430
|
+
};
|
|
431
|
+
{
|
|
432
|
+
vnode.$attrs$ = null;
|
|
433
|
+
}
|
|
434
|
+
{
|
|
435
|
+
vnode.$key$ = null;
|
|
436
|
+
}
|
|
437
|
+
return vnode;
|
|
438
|
+
};
|
|
439
|
+
var Host = {};
|
|
440
|
+
var isHost = (node) => node && node.$tag$ === Host;
|
|
441
|
+
var createSupportsRuleRe = (selector) => {
|
|
442
|
+
const safeSelector2 = escapeRegExpSpecialCharacters(selector);
|
|
443
|
+
return new RegExp(
|
|
444
|
+
// First capture group: match any context before the selector that's not inside @supports selector()
|
|
445
|
+
// Using negative lookahead to avoid matching inside @supports selector(...) condition
|
|
446
|
+
`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${safeSelector2}))(${safeSelector2}\\b)`,
|
|
447
|
+
"g"
|
|
448
|
+
);
|
|
449
|
+
};
|
|
450
|
+
createSupportsRuleRe("::slotted");
|
|
451
|
+
createSupportsRuleRe(":host");
|
|
452
|
+
createSupportsRuleRe(":host-context");
|
|
453
|
+
var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
454
|
+
if (propValue != null && !isComplexType(propValue)) {
|
|
455
|
+
if (propType & 4 /* Boolean */) {
|
|
456
|
+
{
|
|
457
|
+
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
if (propType & 1 /* String */) {
|
|
461
|
+
return String(propValue);
|
|
462
|
+
}
|
|
463
|
+
return propValue;
|
|
464
|
+
}
|
|
465
|
+
return propValue;
|
|
466
|
+
};
|
|
467
|
+
var getElement = (ref) => {
|
|
468
|
+
var _a;
|
|
469
|
+
return (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ ;
|
|
470
|
+
};
|
|
471
|
+
var emitEvent = (elm, name, opts) => {
|
|
472
|
+
const ev = plt.ce(name, opts);
|
|
473
|
+
elm.dispatchEvent(ev);
|
|
474
|
+
return ev;
|
|
475
|
+
};
|
|
386
476
|
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
387
477
|
if (oldValue === newValue) {
|
|
388
478
|
return;
|
|
@@ -714,7 +804,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
714
804
|
!isInitialRender && BUILD.updatable && oldChildren !== null
|
|
715
805
|
) {
|
|
716
806
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
717
|
-
}
|
|
807
|
+
} else ;
|
|
718
808
|
} else if (oldVNode.$text$ !== text) {
|
|
719
809
|
elm.data = text;
|
|
720
810
|
}
|
|
@@ -734,13 +824,16 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
734
824
|
const hostElm = hostRef.$hostElement$;
|
|
735
825
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
736
826
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
737
|
-
const
|
|
827
|
+
const isHostElement = isHost(renderFnResults);
|
|
828
|
+
const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
|
|
738
829
|
hostTagName = hostElm.tagName;
|
|
739
830
|
if (cmpMeta.$attrsToReflect$) {
|
|
740
831
|
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
741
|
-
cmpMeta.$attrsToReflect$.
|
|
742
|
-
|
|
743
|
-
|
|
832
|
+
cmpMeta.$attrsToReflect$.forEach(([propName, attribute]) => {
|
|
833
|
+
{
|
|
834
|
+
rootVnode.$attrs$[attribute] = hostElm[propName];
|
|
835
|
+
}
|
|
836
|
+
});
|
|
744
837
|
}
|
|
745
838
|
if (isInitialLoad && rootVnode.$attrs$) {
|
|
746
839
|
for (const key of Object.keys(rootVnode.$attrs$)) {
|
|
@@ -779,6 +872,12 @@ var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
|
779
872
|
}
|
|
780
873
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
|
781
874
|
const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
|
|
875
|
+
if (isInitialLoad) {
|
|
876
|
+
queueMicrotask(() => {
|
|
877
|
+
dispatch();
|
|
878
|
+
});
|
|
879
|
+
return;
|
|
880
|
+
}
|
|
782
881
|
return writeTask(dispatch) ;
|
|
783
882
|
};
|
|
784
883
|
var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
@@ -792,6 +891,11 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
792
891
|
}
|
|
793
892
|
let maybePromise;
|
|
794
893
|
if (isInitialLoad) {
|
|
894
|
+
{
|
|
895
|
+
if (hostRef.$fetchedCbList$.length) {
|
|
896
|
+
hostRef.$fetchedCbList$.forEach((cb) => cb(elm));
|
|
897
|
+
}
|
|
898
|
+
}
|
|
795
899
|
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
796
900
|
} else {
|
|
797
901
|
maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
|
|
@@ -913,6 +1017,9 @@ var addHydratedFlag = (elm) => {
|
|
|
913
1017
|
var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
914
1018
|
var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
915
1019
|
const hostRef = getHostRef(ref);
|
|
1020
|
+
if (!hostRef) {
|
|
1021
|
+
return;
|
|
1022
|
+
}
|
|
916
1023
|
if (!hostRef) {
|
|
917
1024
|
throw new Error(
|
|
918
1025
|
`Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
|
|
@@ -922,7 +1029,9 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
922
1029
|
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
923
1030
|
const flags = hostRef.$flags$;
|
|
924
1031
|
const instance = hostRef.$lazyInstance$ ;
|
|
925
|
-
newVal = parsePropertyValue(
|
|
1032
|
+
newVal = parsePropertyValue(
|
|
1033
|
+
newVal,
|
|
1034
|
+
cmpMeta.$members$[propName][0]);
|
|
926
1035
|
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
927
1036
|
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
928
1037
|
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
|
|
@@ -956,9 +1065,17 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
956
1065
|
var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
957
1066
|
var _a, _b;
|
|
958
1067
|
const prototype = Cstr.prototype;
|
|
959
|
-
if (cmpMeta.$members$ ||
|
|
960
|
-
|
|
961
|
-
cmpMeta.$watchers$
|
|
1068
|
+
if (cmpMeta.$members$ || BUILD.propChangeCallback) {
|
|
1069
|
+
{
|
|
1070
|
+
if (Cstr.watchers && !cmpMeta.$watchers$) {
|
|
1071
|
+
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1072
|
+
}
|
|
1073
|
+
if (Cstr.deserializers && !cmpMeta.$deserializers$) {
|
|
1074
|
+
cmpMeta.$deserializers$ = Cstr.deserializers;
|
|
1075
|
+
}
|
|
1076
|
+
if (Cstr.serializers && !cmpMeta.$serializers$) {
|
|
1077
|
+
cmpMeta.$serializers$ = Cstr.serializers;
|
|
1078
|
+
}
|
|
962
1079
|
}
|
|
963
1080
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
964
1081
|
members.map(([memberName, [memberFlags]]) => {
|
|
@@ -986,14 +1103,19 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
986
1103
|
Object.defineProperty(prototype, memberName, {
|
|
987
1104
|
set(newValue) {
|
|
988
1105
|
const ref = getHostRef(this);
|
|
1106
|
+
if (!ref) {
|
|
1107
|
+
return;
|
|
1108
|
+
}
|
|
989
1109
|
if (origSetter) {
|
|
990
1110
|
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
991
1111
|
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
992
1112
|
newValue = ref.$instanceValues$.get(memberName);
|
|
993
|
-
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
994
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
995
1113
|
}
|
|
996
|
-
origSetter.apply(this, [
|
|
1114
|
+
origSetter.apply(this, [
|
|
1115
|
+
parsePropertyValue(
|
|
1116
|
+
newValue,
|
|
1117
|
+
memberFlags)
|
|
1118
|
+
]);
|
|
997
1119
|
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
998
1120
|
setValue(this, memberName, newValue, cmpMeta);
|
|
999
1121
|
return;
|
|
@@ -1002,7 +1124,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1002
1124
|
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1003
1125
|
setValue(this, memberName, newValue, cmpMeta);
|
|
1004
1126
|
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1005
|
-
ref.$
|
|
1127
|
+
ref.$fetchedCbList$.push(() => {
|
|
1006
1128
|
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1007
1129
|
ref.$lazyInstance$[memberName] = newValue;
|
|
1008
1130
|
}
|
|
@@ -1015,13 +1137,17 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1015
1137
|
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1016
1138
|
ref.$instanceValues$.set(memberName, currentValue);
|
|
1017
1139
|
}
|
|
1018
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(
|
|
1140
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(
|
|
1141
|
+
newValue,
|
|
1142
|
+
memberFlags);
|
|
1019
1143
|
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1020
1144
|
};
|
|
1021
1145
|
if (ref.$lazyInstance$) {
|
|
1022
1146
|
setterSetVal();
|
|
1023
1147
|
} else {
|
|
1024
|
-
ref.$
|
|
1148
|
+
ref.$fetchedCbList$.push(() => {
|
|
1149
|
+
setterSetVal();
|
|
1150
|
+
});
|
|
1025
1151
|
}
|
|
1026
1152
|
}
|
|
1027
1153
|
}
|
|
@@ -1034,16 +1160,17 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1034
1160
|
plt.jmp(() => {
|
|
1035
1161
|
var _a2;
|
|
1036
1162
|
const propName = attrNameToPropName.get(attrName);
|
|
1163
|
+
const hostRef = getHostRef(this);
|
|
1037
1164
|
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
1038
1165
|
newValue = this[propName];
|
|
1039
1166
|
delete this[propName];
|
|
1040
|
-
}
|
|
1167
|
+
}
|
|
1168
|
+
if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
1041
1169
|
this[propName] == newValue) {
|
|
1042
1170
|
return;
|
|
1043
1171
|
} else if (propName == null) {
|
|
1044
|
-
const hostRef = getHostRef(this);
|
|
1045
1172
|
const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
|
|
1046
|
-
if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
|
|
1173
|
+
if (hostRef && flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
|
|
1047
1174
|
const instance = hostRef.$lazyInstance$ ;
|
|
1048
1175
|
const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
|
|
1049
1176
|
entry == null ? void 0 : entry.forEach((callbackName) => {
|
|
@@ -1054,9 +1181,12 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1054
1181
|
}
|
|
1055
1182
|
return;
|
|
1056
1183
|
}
|
|
1184
|
+
const propFlags = members.find(([m]) => m === propName);
|
|
1185
|
+
if (propFlags && propFlags[1][0] & 4 /* Boolean */) {
|
|
1186
|
+
newValue = newValue === null || newValue === "false" ? false : true;
|
|
1187
|
+
}
|
|
1057
1188
|
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1058
|
-
|
|
1059
|
-
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1189
|
+
if (newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1060
1190
|
this[propName] = newValue;
|
|
1061
1191
|
}
|
|
1062
1192
|
});
|
|
@@ -1064,7 +1194,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1064
1194
|
Cstr.observedAttributes = Array.from(
|
|
1065
1195
|
/* @__PURE__ */ new Set([
|
|
1066
1196
|
...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
|
|
1067
|
-
...members.filter(([_, m]) => m[0] &
|
|
1197
|
+
...members.filter(([_, m]) => m[0] & 31 /* HasAttribute */).map(([propName, m]) => {
|
|
1068
1198
|
var _a2;
|
|
1069
1199
|
const attrName = m[1] || propName;
|
|
1070
1200
|
attrNameToPropName.set(attrName, propName);
|
|
@@ -1101,6 +1231,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1101
1231
|
if (!Cstr.isProxied) {
|
|
1102
1232
|
{
|
|
1103
1233
|
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1234
|
+
cmpMeta.$serializers$ = Cstr.serializers;
|
|
1235
|
+
cmpMeta.$deserializers$ = Cstr.deserializers;
|
|
1104
1236
|
}
|
|
1105
1237
|
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
1106
1238
|
Cstr.isProxied = true;
|
|
@@ -1158,6 +1290,9 @@ var fireConnectedCallback = (instance, elm) => {
|
|
|
1158
1290
|
var connectedCallback = (elm) => {
|
|
1159
1291
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1160
1292
|
const hostRef = getHostRef(elm);
|
|
1293
|
+
if (!hostRef) {
|
|
1294
|
+
return;
|
|
1295
|
+
}
|
|
1161
1296
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
1162
1297
|
const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
|
|
1163
1298
|
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
@@ -1173,7 +1308,7 @@ var connectedCallback = (elm) => {
|
|
|
1173
1308
|
}
|
|
1174
1309
|
if (cmpMeta.$members$) {
|
|
1175
1310
|
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
|
1176
|
-
if (memberFlags & 31 /* Prop */ && elm.
|
|
1311
|
+
if (memberFlags & 31 /* Prop */ && memberName in elm && elm[memberName] !== Object.prototype[memberName]) {
|
|
1177
1312
|
const value = elm[memberName];
|
|
1178
1313
|
delete elm[memberName];
|
|
1179
1314
|
elm[memberName] = value;
|
|
@@ -1237,7 +1372,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1237
1372
|
let hasSlotRelocation = false;
|
|
1238
1373
|
lazyBundles.map((lazyBundle) => {
|
|
1239
1374
|
lazyBundle[1].map((compactMeta) => {
|
|
1240
|
-
var _a2;
|
|
1375
|
+
var _a2, _b, _c;
|
|
1241
1376
|
const cmpMeta = {
|
|
1242
1377
|
$flags$: compactMeta[0],
|
|
1243
1378
|
$tagName$: compactMeta[1],
|
|
@@ -1255,6 +1390,8 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1255
1390
|
}
|
|
1256
1391
|
{
|
|
1257
1392
|
cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
|
|
1393
|
+
cmpMeta.$serializers$ = (_b = compactMeta[5]) != null ? _b : {};
|
|
1394
|
+
cmpMeta.$deserializers$ = (_c = compactMeta[6]) != null ? _c : {};
|
|
1258
1395
|
}
|
|
1259
1396
|
const tagName = cmpMeta.$tagName$;
|
|
1260
1397
|
const HostElement = class extends HTMLElement {
|
|
@@ -1267,9 +1404,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1267
1404
|
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1268
1405
|
{
|
|
1269
1406
|
if (!self.shadowRoot) {
|
|
1270
|
-
|
|
1271
|
-
self.attachShadow({ mode: "open" });
|
|
1272
|
-
}
|
|
1407
|
+
createShadowRoot.call(self, cmpMeta);
|
|
1273
1408
|
} else {
|
|
1274
1409
|
if (self.shadowRoot.mode !== "open") {
|
|
1275
1410
|
throw new Error(
|
|
@@ -1281,7 +1416,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1281
1416
|
}
|
|
1282
1417
|
}
|
|
1283
1418
|
connectedCallback() {
|
|
1284
|
-
getHostRef(this);
|
|
1419
|
+
const hostRef = getHostRef(this);
|
|
1420
|
+
if (!hostRef) {
|
|
1421
|
+
return;
|
|
1422
|
+
}
|
|
1285
1423
|
if (!this.hasRegisteredEventListeners) {
|
|
1286
1424
|
this.hasRegisteredEventListeners = true;
|
|
1287
1425
|
}
|
|
@@ -1300,6 +1438,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1300
1438
|
plt.raf(() => {
|
|
1301
1439
|
var _a3;
|
|
1302
1440
|
const hostRef = getHostRef(this);
|
|
1441
|
+
if (!hostRef) {
|
|
1442
|
+
return;
|
|
1443
|
+
}
|
|
1303
1444
|
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1304
1445
|
if (i2 > -1) {
|
|
1305
1446
|
deferredConnectedCallbacks.splice(i2, 1);
|
|
@@ -1310,7 +1451,8 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1310
1451
|
});
|
|
1311
1452
|
}
|
|
1312
1453
|
componentOnReady() {
|
|
1313
|
-
|
|
1454
|
+
var _a3;
|
|
1455
|
+
return (_a3 = getHostRef(this)) == null ? void 0 : _a3.$onReadyPromise$;
|
|
1314
1456
|
}
|
|
1315
1457
|
};
|
|
1316
1458
|
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
@@ -1354,6 +1496,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1354
1496
|
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
1355
1497
|
|
|
1356
1498
|
export { Host as H, bootstrapLazy as b, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
1357
|
-
//# sourceMappingURL=index-
|
|
1499
|
+
//# sourceMappingURL=index-BnTKVLFw.js.map
|
|
1358
1500
|
|
|
1359
|
-
//# sourceMappingURL=index-
|
|
1501
|
+
//# sourceMappingURL=index-BnTKVLFw.js.map
|