@paperless/core 0.0.3-alpha.3 → 0.1.0-alpha.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/CHANGELOG.md +67 -0
- package/README.md +14 -10
- package/dist/assets/icons/arrow.svg +1 -1
- package/dist/assets/icons/attachment.svg +1 -1
- package/dist/assets/icons/bread.svg +1 -1
- package/dist/assets/icons/calendar.svg +1 -1
- package/dist/assets/icons/car.svg +1 -1
- package/dist/assets/icons/checkmark.svg +1 -1
- package/dist/assets/icons/chevron.svg +1 -1
- package/dist/assets/icons/clock.svg +1 -1
- package/dist/assets/icons/cogs.svg +1 -1
- package/dist/assets/icons/comment.svg +1 -1
- package/dist/assets/icons/document.svg +1 -1
- package/dist/assets/icons/download.svg +1 -1
- package/dist/assets/icons/envelope.svg +1 -1
- package/dist/assets/icons/explanation.svg +1 -1
- package/dist/assets/icons/eye.svg +1 -1
- package/dist/assets/icons/filter.svg +1 -1
- package/dist/assets/icons/grid.svg +1 -1
- package/dist/assets/icons/headset.svg +1 -1
- package/dist/assets/icons/list.svg +1 -1
- package/dist/assets/icons/location.svg +1 -1
- package/dist/assets/icons/megaphone.svg +1 -1
- package/dist/assets/icons/minus.svg +1 -1
- package/dist/assets/icons/negative.svg +1 -1
- package/dist/assets/icons/pagination.svg +1 -1
- package/dist/assets/icons/payment.svg +1 -1
- package/dist/assets/icons/pencil.svg +1 -1
- package/dist/assets/icons/person.svg +1 -1
- package/dist/assets/icons/plus.svg +1 -1
- package/dist/assets/icons/question.svg +1 -1
- package/dist/assets/icons/receipt.svg +1 -1
- package/dist/assets/icons/report.svg +1 -1
- package/dist/assets/icons/search.svg +1 -1
- package/dist/assets/icons/settings.svg +1 -1
- package/dist/assets/icons/sick.svg +1 -1
- package/dist/assets/icons/tachometer.svg +1 -1
- package/dist/assets/icons/tool.svg +1 -1
- package/dist/assets/icons/trash.svg +1 -1
- package/dist/assets/icons/turn.svg +1 -1
- package/dist/assets/icons/upload.svg +1 -1
- package/dist/assets/icons/warning.svg +1 -1
- package/dist/build/p-3318b73b.entry.js +1 -0
- package/dist/build/p-6f9229a6.js +2 -0
- package/dist/build/p-711630fb.entry.js +1 -0
- package/dist/build/p-98d636b6.entry.js +1 -0
- package/dist/build/p-c3d80205.entry.js +1 -0
- package/dist/build/paperless.css +22 -12
- package/dist/build/paperless.esm.js +1 -1
- package/dist/cjs/{index-e3e940d8.js → index-6758a39e.js} +155 -7
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/p-button.cjs.entry.js +4 -4
- package/dist/cjs/p-icon.cjs.entry.js +802 -0
- package/dist/cjs/p-illustration.cjs.entry.js +1426 -0
- package/dist/cjs/p-tooltip.cjs.entry.js +1873 -0
- package/dist/cjs/paperless.cjs.js +2 -2
- package/dist/collection/assets/icons/arrow.svg +1 -1
- package/dist/collection/assets/icons/attachment.svg +1 -1
- package/dist/collection/assets/icons/bread.svg +1 -1
- package/dist/collection/assets/icons/calendar.svg +1 -1
- package/dist/collection/assets/icons/car.svg +1 -1
- package/dist/collection/assets/icons/checkmark.svg +1 -1
- package/dist/collection/assets/icons/chevron.svg +1 -1
- package/dist/collection/assets/icons/clock.svg +1 -1
- package/dist/collection/assets/icons/cogs.svg +1 -1
- package/dist/collection/assets/icons/comment.svg +1 -1
- package/dist/collection/assets/icons/document.svg +1 -1
- package/dist/collection/assets/icons/download.svg +1 -1
- package/dist/collection/assets/icons/envelope.svg +1 -1
- package/dist/collection/assets/icons/explanation.svg +1 -1
- package/dist/collection/assets/icons/eye.svg +1 -1
- package/dist/collection/assets/icons/filter.svg +1 -1
- package/dist/collection/assets/icons/grid.svg +1 -1
- package/dist/collection/assets/icons/headset.svg +1 -1
- package/dist/collection/assets/icons/list.svg +1 -1
- package/dist/collection/assets/icons/location.svg +1 -1
- package/dist/collection/assets/icons/megaphone.svg +1 -1
- package/dist/collection/assets/icons/minus.svg +1 -1
- package/dist/collection/assets/icons/negative.svg +1 -1
- package/dist/collection/assets/icons/pagination.svg +1 -1
- package/dist/collection/assets/icons/payment.svg +1 -1
- package/dist/collection/assets/icons/pencil.svg +1 -1
- package/dist/collection/assets/icons/person.svg +1 -1
- package/dist/collection/assets/icons/plus.svg +1 -1
- package/dist/collection/assets/icons/question.svg +1 -1
- package/dist/collection/assets/icons/receipt.svg +1 -1
- package/dist/collection/assets/icons/report.svg +1 -1
- package/dist/collection/assets/icons/search.svg +1 -1
- package/dist/collection/assets/icons/settings.svg +1 -1
- package/dist/collection/assets/icons/sick.svg +1 -1
- package/dist/collection/assets/icons/tachometer.svg +1 -1
- package/dist/collection/assets/icons/tool.svg +1 -1
- package/dist/collection/assets/icons/trash.svg +1 -1
- package/dist/collection/assets/icons/turn.svg +1 -1
- package/dist/collection/assets/icons/upload.svg +1 -1
- package/dist/collection/assets/icons/warning.svg +1 -1
- package/dist/collection/collection-manifest.json +4 -1
- package/dist/collection/components/button/button.component.js +6 -5
- package/dist/collection/components/icon/icon.component.js +108 -0
- package/dist/collection/components/illustration/illustration.component.js +39 -0
- package/dist/collection/components/tooltip/tooltip.component.css +34 -0
- package/dist/collection/components/tooltip/tooltip.component.js +174 -0
- package/dist/collection/tailwind/border-radius.js +1 -0
- package/dist/collection/tailwind/grid.js +6 -0
- package/dist/collection/tailwind.config.js +10 -0
- package/dist/collection/utils/icons.js +82 -0
- package/dist/collection/utils/illustrations.js +18 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +3 -0
- package/dist/components/p-button.js +4 -4
- package/dist/components/p-icon.d.ts +11 -0
- package/dist/components/p-icon.js +820 -0
- package/dist/components/p-illustration.d.ts +11 -0
- package/dist/components/p-illustration.js +1441 -0
- package/dist/components/p-tooltip.d.ts +11 -0
- package/dist/components/p-tooltip.js +1891 -0
- package/dist/esm/{index-100a5ae6.js → index-e4d80e41.js} +154 -8
- package/dist/esm/loader.js +2 -2
- package/dist/esm/p-button.entry.js +4 -4
- package/dist/esm/p-icon.entry.js +798 -0
- package/dist/esm/p-illustration.entry.js +1422 -0
- package/dist/esm/p-tooltip.entry.js +1869 -0
- package/dist/esm/paperless.js +2 -2
- package/dist/index.html +1 -1
- package/dist/paperless/p-3318b73b.entry.js +1 -0
- package/dist/paperless/p-6f9229a6.js +2 -0
- package/dist/paperless/p-711630fb.entry.js +1 -0
- package/dist/paperless/p-98d636b6.entry.js +1 -0
- package/dist/paperless/p-c3d80205.entry.js +1 -0
- package/dist/paperless/paperless.css +23382 -13
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/sw.js +100 -21
- package/dist/tailwind.config.js +10 -0
- package/dist/types/components/button/button.component.d.ts +1 -1
- package/dist/types/components/icon/icon.component.d.ts +22 -0
- package/dist/types/components/illustration/illustration.component.d.ts +9 -0
- package/dist/types/components/tooltip/tooltip.component.d.ts +28 -0
- package/dist/types/components.d.ts +108 -2
- package/dist/types/utils/icons.d.ts +43 -0
- package/dist/types/utils/illustrations.d.ts +11 -0
- package/package.json +6 -2
- package/dist/build/p-54459ae1.js +0 -2
- package/dist/build/p-c66e9743.entry.js +0 -1
- package/dist/paperless/p-54459ae1.js +0 -2
- package/dist/paperless/p-c66e9743.entry.js +0 -1
|
@@ -2,6 +2,7 @@ const NAMESPACE = 'paperless';
|
|
|
2
2
|
|
|
3
3
|
let scopeId;
|
|
4
4
|
let hostTagName;
|
|
5
|
+
let isSvgMode = false;
|
|
5
6
|
let queuePending = false;
|
|
6
7
|
const win = typeof window !== 'undefined' ? window : {};
|
|
7
8
|
const doc = win.document || { head: {} };
|
|
@@ -24,6 +25,35 @@ const supportsConstructibleStylesheets = /*@__PURE__*/ (() => {
|
|
|
24
25
|
return false;
|
|
25
26
|
})()
|
|
26
27
|
;
|
|
28
|
+
const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
29
|
+
if (listeners) {
|
|
30
|
+
listeners.map(([flags, name, method]) => {
|
|
31
|
+
const target = elm;
|
|
32
|
+
const handler = hostListenerProxy(hostRef, method);
|
|
33
|
+
const opts = hostListenerOpts(flags);
|
|
34
|
+
plt.ael(target, name, handler, opts);
|
|
35
|
+
(hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
const hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
40
|
+
try {
|
|
41
|
+
{
|
|
42
|
+
if (hostRef.$flags$ & 256 /* isListenReady */) {
|
|
43
|
+
// instance is ready, let's call it's member method for this event
|
|
44
|
+
hostRef.$lazyInstance$[methodName](ev);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
(hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
catch (e) {
|
|
52
|
+
consoleError(e);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
// prettier-ignore
|
|
56
|
+
const hostListenerOpts = (flags) => (flags & 2 /* Capture */) !== 0;
|
|
27
57
|
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
28
58
|
const createTime = (fnName, tagName = '') => {
|
|
29
59
|
{
|
|
@@ -202,6 +232,7 @@ const isHost = (node) => node && node.$tag$ === Host;
|
|
|
202
232
|
*/
|
|
203
233
|
const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
204
234
|
if (oldValue !== newValue) {
|
|
235
|
+
let isProp = isMemberInElement(elm, memberName);
|
|
205
236
|
memberName.toLowerCase();
|
|
206
237
|
if (memberName === 'class') {
|
|
207
238
|
const classList = elm.classList;
|
|
@@ -210,6 +241,47 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
210
241
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
211
242
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
212
243
|
}
|
|
244
|
+
else if (memberName === 'ref') {
|
|
245
|
+
// minifier will clean this up
|
|
246
|
+
if (newValue) {
|
|
247
|
+
newValue(elm);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
else {
|
|
251
|
+
// Set property if it exists and it's not a SVG
|
|
252
|
+
const isComplex = isComplexType(newValue);
|
|
253
|
+
if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
|
|
254
|
+
try {
|
|
255
|
+
if (!elm.tagName.includes('-')) {
|
|
256
|
+
const n = newValue == null ? '' : newValue;
|
|
257
|
+
// Workaround for Safari, moving the <input> caret when re-assigning the same valued
|
|
258
|
+
if (memberName === 'list') {
|
|
259
|
+
isProp = false;
|
|
260
|
+
}
|
|
261
|
+
else if (oldValue == null || elm[memberName] != n) {
|
|
262
|
+
elm[memberName] = n;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
else {
|
|
266
|
+
elm[memberName] = newValue;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
catch (e) { }
|
|
270
|
+
}
|
|
271
|
+
if (newValue == null || newValue === false) {
|
|
272
|
+
if (newValue !== false || elm.getAttribute(memberName) === '') {
|
|
273
|
+
{
|
|
274
|
+
elm.removeAttribute(memberName);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
279
|
+
newValue = newValue === true ? '' : newValue;
|
|
280
|
+
{
|
|
281
|
+
elm.setAttribute(memberName, newValue);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
213
285
|
}
|
|
214
286
|
};
|
|
215
287
|
const parseClassListRegex = /\s/;
|
|
@@ -227,13 +299,13 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
227
299
|
// remove attributes no longer present on the vnode by setting them to undefined
|
|
228
300
|
for (memberName in oldVnodeAttrs) {
|
|
229
301
|
if (!(memberName in newVnodeAttrs)) {
|
|
230
|
-
setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined);
|
|
302
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);
|
|
231
303
|
}
|
|
232
304
|
}
|
|
233
305
|
}
|
|
234
306
|
// add new & update changed attributes
|
|
235
307
|
for (memberName in newVnodeAttrs) {
|
|
236
|
-
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName]);
|
|
308
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
|
|
237
309
|
}
|
|
238
310
|
};
|
|
239
311
|
const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
@@ -242,12 +314,16 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
242
314
|
let i = 0;
|
|
243
315
|
let elm;
|
|
244
316
|
let childNode;
|
|
245
|
-
{
|
|
317
|
+
if (newVNode.$text$ !== null) {
|
|
318
|
+
// create text node
|
|
319
|
+
elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
|
|
320
|
+
}
|
|
321
|
+
else {
|
|
246
322
|
// create element
|
|
247
323
|
elm = newVNode.$elm$ = (doc.createElement(newVNode.$tag$));
|
|
248
324
|
// add css classes, attrs, props, listeners, etc.
|
|
249
325
|
{
|
|
250
|
-
updateElement(null, newVNode);
|
|
326
|
+
updateElement(null, newVNode, isSvgMode);
|
|
251
327
|
}
|
|
252
328
|
if (isDef(scopeId) && elm['s-si'] !== scopeId) {
|
|
253
329
|
// if there is a scopeId and this is the initial render
|
|
@@ -288,6 +364,7 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
288
364
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
289
365
|
if ((vnode = vnodes[startIdx])) {
|
|
290
366
|
elm = vnode.$elm$;
|
|
367
|
+
callNodeRefs(vnode);
|
|
291
368
|
// remove the vnode's element from the dom
|
|
292
369
|
elm.remove();
|
|
293
370
|
}
|
|
@@ -372,7 +449,8 @@ const patch = (oldVNode, newVNode) => {
|
|
|
372
449
|
const oldChildren = oldVNode.$children$;
|
|
373
450
|
const newChildren = newVNode.$children$;
|
|
374
451
|
const tag = newVNode.$tag$;
|
|
375
|
-
|
|
452
|
+
const text = newVNode.$text$;
|
|
453
|
+
if (text === null) {
|
|
376
454
|
// element node
|
|
377
455
|
{
|
|
378
456
|
if (tag === 'slot')
|
|
@@ -381,7 +459,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
381
459
|
// either this is the first render of an element OR it's an update
|
|
382
460
|
// AND we already know it's possible it could have changed
|
|
383
461
|
// this updates the element's css classes, attrs, props, listeners, etc.
|
|
384
|
-
updateElement(oldVNode, newVNode);
|
|
462
|
+
updateElement(oldVNode, newVNode, isSvgMode);
|
|
385
463
|
}
|
|
386
464
|
}
|
|
387
465
|
if (oldChildren !== null && newChildren !== null) {
|
|
@@ -389,6 +467,11 @@ const patch = (oldVNode, newVNode) => {
|
|
|
389
467
|
updateChildren(elm, oldChildren, newVNode, newChildren);
|
|
390
468
|
}
|
|
391
469
|
else if (newChildren !== null) {
|
|
470
|
+
// no old child vnodes, but there are new child vnodes to add
|
|
471
|
+
if (oldVNode.$text$ !== null) {
|
|
472
|
+
// the old vnode was text, so be sure to clear it out
|
|
473
|
+
elm.textContent = '';
|
|
474
|
+
}
|
|
392
475
|
// add the new vnode children
|
|
393
476
|
addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
|
|
394
477
|
}
|
|
@@ -397,6 +480,17 @@ const patch = (oldVNode, newVNode) => {
|
|
|
397
480
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
398
481
|
}
|
|
399
482
|
}
|
|
483
|
+
else if (oldVNode.$text$ !== text) {
|
|
484
|
+
// update the text content for the text only vnode
|
|
485
|
+
// and also only if the text is different than before
|
|
486
|
+
elm.data = text;
|
|
487
|
+
}
|
|
488
|
+
};
|
|
489
|
+
const callNodeRefs = (vNode) => {
|
|
490
|
+
{
|
|
491
|
+
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
492
|
+
vNode.$children$ && vNode.$children$.map(callNodeRefs);
|
|
493
|
+
}
|
|
400
494
|
};
|
|
401
495
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
402
496
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -413,6 +507,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
413
507
|
// synchronous patch
|
|
414
508
|
patch(oldVNode, rootVnode);
|
|
415
509
|
};
|
|
510
|
+
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
416
511
|
/**
|
|
417
512
|
* Helper function to create & dispatch a custom Event on a provided target
|
|
418
513
|
* @param elm the target of the Event
|
|
@@ -449,6 +544,15 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
449
544
|
const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
|
|
450
545
|
const instance = hostRef.$lazyInstance$ ;
|
|
451
546
|
let promise;
|
|
547
|
+
if (isInitialLoad) {
|
|
548
|
+
{
|
|
549
|
+
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
550
|
+
if (hostRef.$queuedListeners$) {
|
|
551
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
552
|
+
hostRef.$queuedListeners$ = null;
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
452
556
|
endSchedule();
|
|
453
557
|
return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
454
558
|
};
|
|
@@ -558,6 +662,17 @@ const appDidLoad = (who) => {
|
|
|
558
662
|
}
|
|
559
663
|
nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
|
|
560
664
|
};
|
|
665
|
+
const safeCall = (instance, method, arg) => {
|
|
666
|
+
if (instance && instance[method]) {
|
|
667
|
+
try {
|
|
668
|
+
return instance[method](arg);
|
|
669
|
+
}
|
|
670
|
+
catch (e) {
|
|
671
|
+
consoleError(e);
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
return undefined;
|
|
675
|
+
};
|
|
561
676
|
const then = (promise, thenFn) => {
|
|
562
677
|
return promise && promise.then ? promise.then(thenFn) : thenFn();
|
|
563
678
|
};
|
|
@@ -589,6 +704,15 @@ const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
|
589
704
|
const parsePropertyValue = (propValue, propType) => {
|
|
590
705
|
// ensure this value is of the correct prop type
|
|
591
706
|
if (propValue != null && !isComplexType(propValue)) {
|
|
707
|
+
if (propType & 4 /* Boolean */) {
|
|
708
|
+
// per the HTML spec, any string value means it is a boolean true value
|
|
709
|
+
// but we'll cheat here and say that the string "false" is the boolean false
|
|
710
|
+
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
711
|
+
}
|
|
712
|
+
if (propType & 2 /* Number */) {
|
|
713
|
+
// force it to be a number
|
|
714
|
+
return parseFloat(propValue);
|
|
715
|
+
}
|
|
592
716
|
if (propType & 1 /* String */) {
|
|
593
717
|
// could have been passed as a number or boolean
|
|
594
718
|
// but we still want it as a string
|
|
@@ -618,6 +742,11 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
618
742
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
619
743
|
if (instance) {
|
|
620
744
|
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
745
|
+
if (instance.componentShouldUpdate) {
|
|
746
|
+
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
747
|
+
return;
|
|
748
|
+
}
|
|
749
|
+
}
|
|
621
750
|
// looks like this value actually changed, so we've got work to do!
|
|
622
751
|
// but only if we've already rendered, otherwise just chill out
|
|
623
752
|
// queue that we need to do an update, but don't worry about queuing
|
|
@@ -823,12 +952,24 @@ const connectedCallback = (elm) => {
|
|
|
823
952
|
initializeComponent(elm, hostRef, cmpMeta);
|
|
824
953
|
}
|
|
825
954
|
}
|
|
955
|
+
else {
|
|
956
|
+
// not the first time this has connected
|
|
957
|
+
// reattach any event listeners to the host
|
|
958
|
+
// since they would have been removed when disconnected
|
|
959
|
+
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
960
|
+
}
|
|
826
961
|
endConnected();
|
|
827
962
|
}
|
|
828
963
|
};
|
|
829
964
|
const disconnectedCallback = (elm) => {
|
|
830
965
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
831
|
-
getHostRef(elm);
|
|
966
|
+
const hostRef = getHostRef(elm);
|
|
967
|
+
{
|
|
968
|
+
if (hostRef.$rmListeners$) {
|
|
969
|
+
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
970
|
+
hostRef.$rmListeners$ = undefined;
|
|
971
|
+
}
|
|
972
|
+
}
|
|
832
973
|
}
|
|
833
974
|
};
|
|
834
975
|
const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
@@ -855,6 +996,9 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
855
996
|
{
|
|
856
997
|
cmpMeta.$members$ = compactMeta[2];
|
|
857
998
|
}
|
|
999
|
+
{
|
|
1000
|
+
cmpMeta.$listeners$ = compactMeta[3];
|
|
1001
|
+
}
|
|
858
1002
|
const tagName = cmpMeta.$tagName$;
|
|
859
1003
|
const HostElement = class extends HTMLElement {
|
|
860
1004
|
// StencilLazyHost
|
|
@@ -935,8 +1079,10 @@ const registerHost = (elm, cmpMeta) => {
|
|
|
935
1079
|
elm['s-p'] = [];
|
|
936
1080
|
elm['s-rc'] = [];
|
|
937
1081
|
}
|
|
1082
|
+
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
938
1083
|
return hostRefs.set(elm, hostRef);
|
|
939
1084
|
};
|
|
1085
|
+
const isMemberInElement = (elm, memberName) => memberName in elm;
|
|
940
1086
|
const consoleError = (e, el) => (0, console.error)(e, el);
|
|
941
1087
|
const cmpModules = /*@__PURE__*/ new Map();
|
|
942
1088
|
const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
@@ -1004,4 +1150,4 @@ const flush = () => {
|
|
|
1004
1150
|
const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
1005
1151
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1006
1152
|
|
|
1007
|
-
export { bootstrapLazy as b, h, promiseResolve as p, registerInstance as r };
|
|
1153
|
+
export { Host as H, bootstrapLazy as b, getElement as g, h, promiseResolve as p, registerInstance as r };
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-e4d80e41.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
Stencil Client Patch Esm v2.17.0 | MIT Licensed | https://stenciljs.com
|
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["p-button",[[1,"p-button",{"variant":[1]}]]]], options);
|
|
13
|
+
return bootstrapLazy([["p-button",[[1,"p-button",{"variant":[1]}]]],["p-icon",[[0,"p-icon",{"variant":[1],"size":[1],"rotate":[2],"flip":[1]}]]],["p-illustration",[[0,"p-illustration",{"variant":[1]}]]],["p-tooltip",[[1,"p-tooltip",{"content":[8],"placement":[1],"forceShow":[4,"force-show"]},[[1,"mouseenter","_show"],[0,"focus","_show"],[1,"mouseleave","_hide"],[0,"blur","_hide"]]]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|