@paperless/core 0.0.3-alpha.4 → 0.1.0-alpha.2
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 +75 -0
- package/README.md +14 -10
- package/dist/assets/icons/arrow.svg +2 -2
- package/dist/assets/icons/attachment.svg +2 -2
- package/dist/assets/icons/bread.svg +2 -2
- package/dist/assets/icons/calendar.svg +2 -2
- package/dist/assets/icons/car.svg +2 -2
- package/dist/assets/icons/checkmark.svg +2 -2
- package/dist/assets/icons/chevron.svg +2 -2
- package/dist/assets/icons/clock.svg +2 -2
- package/dist/assets/icons/cogs.svg +2 -2
- package/dist/assets/icons/comment.svg +2 -2
- package/dist/assets/icons/document.svg +2 -2
- package/dist/assets/icons/download.svg +2 -2
- package/dist/assets/icons/envelope.svg +2 -2
- package/dist/assets/icons/explanation.svg +2 -2
- package/dist/assets/icons/eye.svg +2 -2
- package/dist/assets/icons/filter.svg +2 -2
- package/dist/assets/icons/grid.svg +2 -2
- package/dist/assets/icons/headset.svg +2 -2
- package/dist/assets/icons/list.svg +2 -2
- package/dist/assets/icons/location.svg +2 -2
- package/dist/assets/icons/megaphone.svg +2 -2
- package/dist/assets/icons/minus.svg +2 -2
- package/dist/assets/icons/negative.svg +2 -2
- package/dist/assets/icons/pagination.svg +2 -2
- package/dist/assets/icons/payment.svg +2 -2
- package/dist/assets/icons/pencil.svg +2 -2
- package/dist/assets/icons/person.svg +2 -2
- package/dist/assets/icons/plus.svg +2 -2
- package/dist/assets/icons/question.svg +2 -2
- package/dist/assets/icons/receipt.svg +2 -2
- package/dist/assets/icons/report.svg +2 -2
- package/dist/assets/icons/search.svg +2 -2
- package/dist/assets/icons/settings.svg +2 -2
- package/dist/assets/icons/sick.svg +2 -2
- package/dist/assets/icons/tachometer.svg +2 -2
- package/dist/assets/icons/tool.svg +2 -2
- package/dist/assets/icons/trash.svg +2 -2
- package/dist/assets/icons/turn.svg +2 -2
- package/dist/assets/icons/upload.svg +2 -2
- package/dist/assets/icons/warning.svg +2 -2
- package/dist/build/p-1d13a9d2.entry.js +1 -0
- package/dist/build/p-208c1f28.entry.js +1 -0
- package/dist/build/p-98d07776.js +2 -0
- package/dist/build/p-bbd1d3df.entry.js +1 -0
- package/dist/build/p-cd525dcc.entry.js +1 -0
- package/dist/build/p-feec8ec1.entry.js +1 -0
- package/dist/build/paperless.css +21 -10
- package/dist/build/paperless.esm.js +1 -1
- package/dist/cjs/{index-e3e940d8.js → index-5b30cb95.js} +158 -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-loader.cjs.entry.js +57 -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 +2 -2
- package/dist/collection/assets/icons/attachment.svg +2 -2
- package/dist/collection/assets/icons/bread.svg +2 -2
- package/dist/collection/assets/icons/calendar.svg +2 -2
- package/dist/collection/assets/icons/car.svg +2 -2
- package/dist/collection/assets/icons/checkmark.svg +2 -2
- package/dist/collection/assets/icons/chevron.svg +2 -2
- package/dist/collection/assets/icons/clock.svg +2 -2
- package/dist/collection/assets/icons/cogs.svg +2 -2
- package/dist/collection/assets/icons/comment.svg +2 -2
- package/dist/collection/assets/icons/document.svg +2 -2
- package/dist/collection/assets/icons/download.svg +2 -2
- package/dist/collection/assets/icons/envelope.svg +2 -2
- package/dist/collection/assets/icons/explanation.svg +2 -2
- package/dist/collection/assets/icons/eye.svg +2 -2
- package/dist/collection/assets/icons/filter.svg +2 -2
- package/dist/collection/assets/icons/grid.svg +2 -2
- package/dist/collection/assets/icons/headset.svg +2 -2
- package/dist/collection/assets/icons/list.svg +2 -2
- package/dist/collection/assets/icons/location.svg +2 -2
- package/dist/collection/assets/icons/megaphone.svg +2 -2
- package/dist/collection/assets/icons/minus.svg +2 -2
- package/dist/collection/assets/icons/negative.svg +2 -2
- package/dist/collection/assets/icons/pagination.svg +2 -2
- package/dist/collection/assets/icons/payment.svg +2 -2
- package/dist/collection/assets/icons/pencil.svg +2 -2
- package/dist/collection/assets/icons/person.svg +2 -2
- package/dist/collection/assets/icons/plus.svg +2 -2
- package/dist/collection/assets/icons/question.svg +2 -2
- package/dist/collection/assets/icons/receipt.svg +2 -2
- package/dist/collection/assets/icons/report.svg +2 -2
- package/dist/collection/assets/icons/search.svg +2 -2
- package/dist/collection/assets/icons/settings.svg +2 -2
- package/dist/collection/assets/icons/sick.svg +2 -2
- package/dist/collection/assets/icons/tachometer.svg +2 -2
- package/dist/collection/assets/icons/tool.svg +2 -2
- package/dist/collection/assets/icons/trash.svg +2 -2
- package/dist/collection/assets/icons/turn.svg +2 -2
- package/dist/collection/assets/icons/upload.svg +2 -2
- package/dist/collection/assets/icons/warning.svg +2 -2
- package/dist/collection/collection-manifest.json +5 -1
- package/dist/collection/components/{button → atoms/button}/button.component.css +0 -0
- package/dist/collection/components/{button → atoms/button}/button.component.js +6 -5
- package/dist/collection/components/atoms/icon/icon.component.js +112 -0
- package/dist/collection/components/atoms/illustration/illustration.component.js +39 -0
- package/dist/collection/components/atoms/loader/loader.component.css +26 -0
- package/dist/collection/components/atoms/loader/loader.component.js +153 -0
- package/dist/collection/components/atoms/tooltip/tooltip.component.css +34 -0
- package/dist/collection/components/atoms/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/rotate.js +8 -0
- package/dist/collection/tailwind/scale.js +3 -0
- package/dist/collection/tailwind.config.js +9 -0
- package/dist/collection/utils/icons.js +82 -0
- package/dist/collection/utils/illustrations.js +18 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +4 -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-loader.d.ts +11 -0
- package/dist/components/p-loader.js +77 -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-111a6307.js} +157 -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-loader.entry.js +53 -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-1d13a9d2.entry.js +1 -0
- package/dist/paperless/p-208c1f28.entry.js +1 -0
- package/dist/paperless/p-98d07776.js +2 -0
- package/dist/paperless/p-bbd1d3df.entry.js +1 -0
- package/dist/paperless/p-cd525dcc.entry.js +1 -0
- package/dist/paperless/p-feec8ec1.entry.js +1 -0
- package/dist/paperless/paperless.css +26928 -13
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/sw.js +136 -23
- package/dist/tailwind.config.js +9 -0
- package/dist/types/components/{button → atoms/button}/button.component.d.ts +1 -1
- package/dist/types/components/atoms/icon/icon.component.d.ts +23 -0
- package/dist/types/components/atoms/illustration/illustration.component.d.ts +9 -0
- package/dist/types/components/atoms/loader/loader.component.d.ts +30 -0
- package/dist/types/components/atoms/tooltip/tooltip.component.d.ts +28 -0
- package/dist/types/components.d.ts +162 -2
- package/dist/types/utils/icons.d.ts +43 -0
- package/dist/types/utils/illustrations.d.ts +11 -0
- package/package.json +8 -3
- 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
|
@@ -24,6 +24,7 @@ const NAMESPACE = 'paperless';
|
|
|
24
24
|
|
|
25
25
|
let scopeId;
|
|
26
26
|
let hostTagName;
|
|
27
|
+
let isSvgMode = false;
|
|
27
28
|
let queuePending = false;
|
|
28
29
|
const win = typeof window !== 'undefined' ? window : {};
|
|
29
30
|
const doc = win.document || { head: {} };
|
|
@@ -46,6 +47,35 @@ const supportsConstructibleStylesheets = /*@__PURE__*/ (() => {
|
|
|
46
47
|
return false;
|
|
47
48
|
})()
|
|
48
49
|
;
|
|
50
|
+
const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
51
|
+
if (listeners) {
|
|
52
|
+
listeners.map(([flags, name, method]) => {
|
|
53
|
+
const target = elm;
|
|
54
|
+
const handler = hostListenerProxy(hostRef, method);
|
|
55
|
+
const opts = hostListenerOpts(flags);
|
|
56
|
+
plt.ael(target, name, handler, opts);
|
|
57
|
+
(hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
const hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
62
|
+
try {
|
|
63
|
+
{
|
|
64
|
+
if (hostRef.$flags$ & 256 /* isListenReady */) {
|
|
65
|
+
// instance is ready, let's call it's member method for this event
|
|
66
|
+
hostRef.$lazyInstance$[methodName](ev);
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
(hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
catch (e) {
|
|
74
|
+
consoleError(e);
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
// prettier-ignore
|
|
78
|
+
const hostListenerOpts = (flags) => (flags & 2 /* Capture */) !== 0;
|
|
49
79
|
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
50
80
|
const createTime = (fnName, tagName = '') => {
|
|
51
81
|
{
|
|
@@ -224,6 +254,7 @@ const isHost = (node) => node && node.$tag$ === Host;
|
|
|
224
254
|
*/
|
|
225
255
|
const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
226
256
|
if (oldValue !== newValue) {
|
|
257
|
+
let isProp = isMemberInElement(elm, memberName);
|
|
227
258
|
memberName.toLowerCase();
|
|
228
259
|
if (memberName === 'class') {
|
|
229
260
|
const classList = elm.classList;
|
|
@@ -232,6 +263,47 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
232
263
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
233
264
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
234
265
|
}
|
|
266
|
+
else if (memberName === 'ref') {
|
|
267
|
+
// minifier will clean this up
|
|
268
|
+
if (newValue) {
|
|
269
|
+
newValue(elm);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
else {
|
|
273
|
+
// Set property if it exists and it's not a SVG
|
|
274
|
+
const isComplex = isComplexType(newValue);
|
|
275
|
+
if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
|
|
276
|
+
try {
|
|
277
|
+
if (!elm.tagName.includes('-')) {
|
|
278
|
+
const n = newValue == null ? '' : newValue;
|
|
279
|
+
// Workaround for Safari, moving the <input> caret when re-assigning the same valued
|
|
280
|
+
if (memberName === 'list') {
|
|
281
|
+
isProp = false;
|
|
282
|
+
}
|
|
283
|
+
else if (oldValue == null || elm[memberName] != n) {
|
|
284
|
+
elm[memberName] = n;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
else {
|
|
288
|
+
elm[memberName] = newValue;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
catch (e) { }
|
|
292
|
+
}
|
|
293
|
+
if (newValue == null || newValue === false) {
|
|
294
|
+
if (newValue !== false || elm.getAttribute(memberName) === '') {
|
|
295
|
+
{
|
|
296
|
+
elm.removeAttribute(memberName);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
301
|
+
newValue = newValue === true ? '' : newValue;
|
|
302
|
+
{
|
|
303
|
+
elm.setAttribute(memberName, newValue);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
235
307
|
}
|
|
236
308
|
};
|
|
237
309
|
const parseClassListRegex = /\s/;
|
|
@@ -249,13 +321,13 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
249
321
|
// remove attributes no longer present on the vnode by setting them to undefined
|
|
250
322
|
for (memberName in oldVnodeAttrs) {
|
|
251
323
|
if (!(memberName in newVnodeAttrs)) {
|
|
252
|
-
setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined);
|
|
324
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);
|
|
253
325
|
}
|
|
254
326
|
}
|
|
255
327
|
}
|
|
256
328
|
// add new & update changed attributes
|
|
257
329
|
for (memberName in newVnodeAttrs) {
|
|
258
|
-
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName]);
|
|
330
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
|
|
259
331
|
}
|
|
260
332
|
};
|
|
261
333
|
const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
@@ -264,12 +336,16 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
264
336
|
let i = 0;
|
|
265
337
|
let elm;
|
|
266
338
|
let childNode;
|
|
267
|
-
{
|
|
339
|
+
if (newVNode.$text$ !== null) {
|
|
340
|
+
// create text node
|
|
341
|
+
elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
|
|
342
|
+
}
|
|
343
|
+
else {
|
|
268
344
|
// create element
|
|
269
345
|
elm = newVNode.$elm$ = (doc.createElement(newVNode.$tag$));
|
|
270
346
|
// add css classes, attrs, props, listeners, etc.
|
|
271
347
|
{
|
|
272
|
-
updateElement(null, newVNode);
|
|
348
|
+
updateElement(null, newVNode, isSvgMode);
|
|
273
349
|
}
|
|
274
350
|
if (isDef(scopeId) && elm['s-si'] !== scopeId) {
|
|
275
351
|
// if there is a scopeId and this is the initial render
|
|
@@ -310,6 +386,7 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
310
386
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
311
387
|
if ((vnode = vnodes[startIdx])) {
|
|
312
388
|
elm = vnode.$elm$;
|
|
389
|
+
callNodeRefs(vnode);
|
|
313
390
|
// remove the vnode's element from the dom
|
|
314
391
|
elm.remove();
|
|
315
392
|
}
|
|
@@ -394,7 +471,8 @@ const patch = (oldVNode, newVNode) => {
|
|
|
394
471
|
const oldChildren = oldVNode.$children$;
|
|
395
472
|
const newChildren = newVNode.$children$;
|
|
396
473
|
const tag = newVNode.$tag$;
|
|
397
|
-
|
|
474
|
+
const text = newVNode.$text$;
|
|
475
|
+
if (text === null) {
|
|
398
476
|
// element node
|
|
399
477
|
{
|
|
400
478
|
if (tag === 'slot')
|
|
@@ -403,7 +481,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
403
481
|
// either this is the first render of an element OR it's an update
|
|
404
482
|
// AND we already know it's possible it could have changed
|
|
405
483
|
// this updates the element's css classes, attrs, props, listeners, etc.
|
|
406
|
-
updateElement(oldVNode, newVNode);
|
|
484
|
+
updateElement(oldVNode, newVNode, isSvgMode);
|
|
407
485
|
}
|
|
408
486
|
}
|
|
409
487
|
if (oldChildren !== null && newChildren !== null) {
|
|
@@ -411,6 +489,11 @@ const patch = (oldVNode, newVNode) => {
|
|
|
411
489
|
updateChildren(elm, oldChildren, newVNode, newChildren);
|
|
412
490
|
}
|
|
413
491
|
else if (newChildren !== null) {
|
|
492
|
+
// no old child vnodes, but there are new child vnodes to add
|
|
493
|
+
if (oldVNode.$text$ !== null) {
|
|
494
|
+
// the old vnode was text, so be sure to clear it out
|
|
495
|
+
elm.textContent = '';
|
|
496
|
+
}
|
|
414
497
|
// add the new vnode children
|
|
415
498
|
addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
|
|
416
499
|
}
|
|
@@ -419,6 +502,17 @@ const patch = (oldVNode, newVNode) => {
|
|
|
419
502
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
420
503
|
}
|
|
421
504
|
}
|
|
505
|
+
else if (oldVNode.$text$ !== text) {
|
|
506
|
+
// update the text content for the text only vnode
|
|
507
|
+
// and also only if the text is different than before
|
|
508
|
+
elm.data = text;
|
|
509
|
+
}
|
|
510
|
+
};
|
|
511
|
+
const callNodeRefs = (vNode) => {
|
|
512
|
+
{
|
|
513
|
+
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
514
|
+
vNode.$children$ && vNode.$children$.map(callNodeRefs);
|
|
515
|
+
}
|
|
422
516
|
};
|
|
423
517
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
424
518
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -435,6 +529,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
435
529
|
// synchronous patch
|
|
436
530
|
patch(oldVNode, rootVnode);
|
|
437
531
|
};
|
|
532
|
+
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
438
533
|
/**
|
|
439
534
|
* Helper function to create & dispatch a custom Event on a provided target
|
|
440
535
|
* @param elm the target of the Event
|
|
@@ -471,6 +566,18 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
471
566
|
const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
|
|
472
567
|
const instance = hostRef.$lazyInstance$ ;
|
|
473
568
|
let promise;
|
|
569
|
+
if (isInitialLoad) {
|
|
570
|
+
{
|
|
571
|
+
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
572
|
+
if (hostRef.$queuedListeners$) {
|
|
573
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
574
|
+
hostRef.$queuedListeners$ = null;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
{
|
|
579
|
+
promise = then(promise, () => safeCall(instance, 'componentWillRender'));
|
|
580
|
+
}
|
|
474
581
|
endSchedule();
|
|
475
582
|
return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
476
583
|
};
|
|
@@ -580,6 +687,17 @@ const appDidLoad = (who) => {
|
|
|
580
687
|
}
|
|
581
688
|
nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
|
|
582
689
|
};
|
|
690
|
+
const safeCall = (instance, method, arg) => {
|
|
691
|
+
if (instance && instance[method]) {
|
|
692
|
+
try {
|
|
693
|
+
return instance[method](arg);
|
|
694
|
+
}
|
|
695
|
+
catch (e) {
|
|
696
|
+
consoleError(e);
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
return undefined;
|
|
700
|
+
};
|
|
583
701
|
const then = (promise, thenFn) => {
|
|
584
702
|
return promise && promise.then ? promise.then(thenFn) : thenFn();
|
|
585
703
|
};
|
|
@@ -611,6 +729,15 @@ const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
|
611
729
|
const parsePropertyValue = (propValue, propType) => {
|
|
612
730
|
// ensure this value is of the correct prop type
|
|
613
731
|
if (propValue != null && !isComplexType(propValue)) {
|
|
732
|
+
if (propType & 4 /* Boolean */) {
|
|
733
|
+
// per the HTML spec, any string value means it is a boolean true value
|
|
734
|
+
// but we'll cheat here and say that the string "false" is the boolean false
|
|
735
|
+
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
736
|
+
}
|
|
737
|
+
if (propType & 2 /* Number */) {
|
|
738
|
+
// force it to be a number
|
|
739
|
+
return parseFloat(propValue);
|
|
740
|
+
}
|
|
614
741
|
if (propType & 1 /* String */) {
|
|
615
742
|
// could have been passed as a number or boolean
|
|
616
743
|
// but we still want it as a string
|
|
@@ -640,6 +767,11 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
640
767
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
641
768
|
if (instance) {
|
|
642
769
|
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
770
|
+
if (instance.componentShouldUpdate) {
|
|
771
|
+
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
772
|
+
return;
|
|
773
|
+
}
|
|
774
|
+
}
|
|
643
775
|
// looks like this value actually changed, so we've got work to do!
|
|
644
776
|
// but only if we've already rendered, otherwise just chill out
|
|
645
777
|
// queue that we need to do an update, but don't worry about queuing
|
|
@@ -845,12 +977,24 @@ const connectedCallback = (elm) => {
|
|
|
845
977
|
initializeComponent(elm, hostRef, cmpMeta);
|
|
846
978
|
}
|
|
847
979
|
}
|
|
980
|
+
else {
|
|
981
|
+
// not the first time this has connected
|
|
982
|
+
// reattach any event listeners to the host
|
|
983
|
+
// since they would have been removed when disconnected
|
|
984
|
+
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
985
|
+
}
|
|
848
986
|
endConnected();
|
|
849
987
|
}
|
|
850
988
|
};
|
|
851
989
|
const disconnectedCallback = (elm) => {
|
|
852
990
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
853
|
-
getHostRef(elm);
|
|
991
|
+
const hostRef = getHostRef(elm);
|
|
992
|
+
{
|
|
993
|
+
if (hostRef.$rmListeners$) {
|
|
994
|
+
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
995
|
+
hostRef.$rmListeners$ = undefined;
|
|
996
|
+
}
|
|
997
|
+
}
|
|
854
998
|
}
|
|
855
999
|
};
|
|
856
1000
|
const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
@@ -877,6 +1021,9 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
877
1021
|
{
|
|
878
1022
|
cmpMeta.$members$ = compactMeta[2];
|
|
879
1023
|
}
|
|
1024
|
+
{
|
|
1025
|
+
cmpMeta.$listeners$ = compactMeta[3];
|
|
1026
|
+
}
|
|
880
1027
|
const tagName = cmpMeta.$tagName$;
|
|
881
1028
|
const HostElement = class extends HTMLElement {
|
|
882
1029
|
// StencilLazyHost
|
|
@@ -957,8 +1104,10 @@ const registerHost = (elm, cmpMeta) => {
|
|
|
957
1104
|
elm['s-p'] = [];
|
|
958
1105
|
elm['s-rc'] = [];
|
|
959
1106
|
}
|
|
1107
|
+
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
960
1108
|
return hostRefs.set(elm, hostRef);
|
|
961
1109
|
};
|
|
1110
|
+
const isMemberInElement = (elm, memberName) => memberName in elm;
|
|
962
1111
|
const consoleError = (e, el) => (0, console.error)(e, el);
|
|
963
1112
|
const cmpModules = /*@__PURE__*/ new Map();
|
|
964
1113
|
const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
@@ -1026,7 +1175,9 @@ const flush = () => {
|
|
|
1026
1175
|
const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
1027
1176
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1028
1177
|
|
|
1178
|
+
exports.Host = Host;
|
|
1029
1179
|
exports.bootstrapLazy = bootstrapLazy;
|
|
1180
|
+
exports.getElement = getElement;
|
|
1030
1181
|
exports.h = h;
|
|
1031
1182
|
exports.promiseResolve = promiseResolve;
|
|
1032
1183
|
exports.registerInstance = registerInstance;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-5b30cb95.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
Stencil Client Patch Esm v2.17.0 | MIT Licensed | https://stenciljs.com
|
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["p-button.cjs",[[1,"p-button",{"variant":[1]}]]]], options);
|
|
17
|
+
return index.bootstrapLazy([["p-button.cjs",[[1,"p-button",{"variant":[1]}]]],["p-icon.cjs",[[0,"p-icon",{"variant":[1],"size":[1],"rotate":[2],"flip":[1]}]]],["p-illustration.cjs",[[0,"p-illustration",{"variant":[1]}]]],["p-loader.cjs",[[1,"p-loader",{"show":[4],"variant":[1],"color":[1],"modalTitle":[1,"modal-title"],"modalDescription":[1,"modal-description"]}]]],["p-tooltip.cjs",[[1,"p-tooltip",{"content":[8],"placement":[1],"forceShow":[4,"force-show"]},[[1,"mouseenter","_show"],[0,"focus","_show"],[1,"mouseleave","_hide"],[0,"blur","_hide"]]]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-5b30cb95.js');
|
|
6
6
|
|
|
7
|
-
const buttonComponentCss = "/*! tailwindcss v3.1.4 | MIT License | https://tailwindcss.com*/*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;border:0 solid;box-sizing:border-box}:after,:before{--tw-content:\"\"}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::-webkit-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.rounded{border-radius:.25rem}.border{border-width:1px}.font-semibold{font-weight:600}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.outline{outline-style:solid}:host>button{--tw-text-opacity:1;--tw-bg-opacity:1;background-color:rgb(82 138 250/var(--tw-bg-opacity));border:0;border-radius:.25rem;color:rgb(255 255 255/var(--tw-text-opacity));font-weight:600;outline:0}.static{position:static}";
|
|
7
|
+
const buttonComponentCss = "/*! tailwindcss v3.1.4 | MIT License | https://tailwindcss.com*/*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;border:0 solid;box-sizing:border-box}:after,:before{--tw-content:\"\"}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::-webkit-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.rounded{border-radius:.25rem!important}.border{border-width:1px!important}.font-semibold{font-weight:600!important}.text-white{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity))!important}.outline{outline-style:solid!important}:host>button{--tw-text-opacity:1;--tw-bg-opacity:1;background-color:rgb(82 138 250/var(--tw-bg-opacity));border:0;border-radius:.25rem;color:rgb(255 255 255/var(--tw-text-opacity));font-weight:600;outline:0}.static{position:static!important}";
|
|
8
8
|
|
|
9
9
|
const Button = class {
|
|
10
10
|
constructor(hostRef) {
|
|
11
11
|
index.registerInstance(this, hostRef);
|
|
12
12
|
/**
|
|
13
|
-
* The
|
|
13
|
+
* The variant of the button
|
|
14
14
|
*/
|
|
15
15
|
this.variant = 'primary';
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
|
-
return (index.h("button", { class: `variant-${this.variant}` }, index.h("slot", null)));
|
|
18
|
+
return (index.h(index.Host, null, index.h("button", { class: `variant-${this.variant}` }, index.h("slot", null))));
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
Button.style = buttonComponentCss;
|