@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
|
@@ -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,18 @@ 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
|
+
}
|
|
556
|
+
{
|
|
557
|
+
promise = then(promise, () => safeCall(instance, 'componentWillRender'));
|
|
558
|
+
}
|
|
452
559
|
endSchedule();
|
|
453
560
|
return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
454
561
|
};
|
|
@@ -558,6 +665,17 @@ const appDidLoad = (who) => {
|
|
|
558
665
|
}
|
|
559
666
|
nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
|
|
560
667
|
};
|
|
668
|
+
const safeCall = (instance, method, arg) => {
|
|
669
|
+
if (instance && instance[method]) {
|
|
670
|
+
try {
|
|
671
|
+
return instance[method](arg);
|
|
672
|
+
}
|
|
673
|
+
catch (e) {
|
|
674
|
+
consoleError(e);
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
return undefined;
|
|
678
|
+
};
|
|
561
679
|
const then = (promise, thenFn) => {
|
|
562
680
|
return promise && promise.then ? promise.then(thenFn) : thenFn();
|
|
563
681
|
};
|
|
@@ -589,6 +707,15 @@ const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
|
589
707
|
const parsePropertyValue = (propValue, propType) => {
|
|
590
708
|
// ensure this value is of the correct prop type
|
|
591
709
|
if (propValue != null && !isComplexType(propValue)) {
|
|
710
|
+
if (propType & 4 /* Boolean */) {
|
|
711
|
+
// per the HTML spec, any string value means it is a boolean true value
|
|
712
|
+
// but we'll cheat here and say that the string "false" is the boolean false
|
|
713
|
+
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
714
|
+
}
|
|
715
|
+
if (propType & 2 /* Number */) {
|
|
716
|
+
// force it to be a number
|
|
717
|
+
return parseFloat(propValue);
|
|
718
|
+
}
|
|
592
719
|
if (propType & 1 /* String */) {
|
|
593
720
|
// could have been passed as a number or boolean
|
|
594
721
|
// but we still want it as a string
|
|
@@ -618,6 +745,11 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
618
745
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
619
746
|
if (instance) {
|
|
620
747
|
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
748
|
+
if (instance.componentShouldUpdate) {
|
|
749
|
+
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
750
|
+
return;
|
|
751
|
+
}
|
|
752
|
+
}
|
|
621
753
|
// looks like this value actually changed, so we've got work to do!
|
|
622
754
|
// but only if we've already rendered, otherwise just chill out
|
|
623
755
|
// queue that we need to do an update, but don't worry about queuing
|
|
@@ -823,12 +955,24 @@ const connectedCallback = (elm) => {
|
|
|
823
955
|
initializeComponent(elm, hostRef, cmpMeta);
|
|
824
956
|
}
|
|
825
957
|
}
|
|
958
|
+
else {
|
|
959
|
+
// not the first time this has connected
|
|
960
|
+
// reattach any event listeners to the host
|
|
961
|
+
// since they would have been removed when disconnected
|
|
962
|
+
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
963
|
+
}
|
|
826
964
|
endConnected();
|
|
827
965
|
}
|
|
828
966
|
};
|
|
829
967
|
const disconnectedCallback = (elm) => {
|
|
830
968
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
831
|
-
getHostRef(elm);
|
|
969
|
+
const hostRef = getHostRef(elm);
|
|
970
|
+
{
|
|
971
|
+
if (hostRef.$rmListeners$) {
|
|
972
|
+
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
973
|
+
hostRef.$rmListeners$ = undefined;
|
|
974
|
+
}
|
|
975
|
+
}
|
|
832
976
|
}
|
|
833
977
|
};
|
|
834
978
|
const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
@@ -855,6 +999,9 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
855
999
|
{
|
|
856
1000
|
cmpMeta.$members$ = compactMeta[2];
|
|
857
1001
|
}
|
|
1002
|
+
{
|
|
1003
|
+
cmpMeta.$listeners$ = compactMeta[3];
|
|
1004
|
+
}
|
|
858
1005
|
const tagName = cmpMeta.$tagName$;
|
|
859
1006
|
const HostElement = class extends HTMLElement {
|
|
860
1007
|
// StencilLazyHost
|
|
@@ -935,8 +1082,10 @@ const registerHost = (elm, cmpMeta) => {
|
|
|
935
1082
|
elm['s-p'] = [];
|
|
936
1083
|
elm['s-rc'] = [];
|
|
937
1084
|
}
|
|
1085
|
+
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
938
1086
|
return hostRefs.set(elm, hostRef);
|
|
939
1087
|
};
|
|
1088
|
+
const isMemberInElement = (elm, memberName) => memberName in elm;
|
|
940
1089
|
const consoleError = (e, el) => (0, console.error)(e, el);
|
|
941
1090
|
const cmpModules = /*@__PURE__*/ new Map();
|
|
942
1091
|
const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
@@ -1004,4 +1153,4 @@ const flush = () => {
|
|
|
1004
1153
|
const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
1005
1154
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1006
1155
|
|
|
1007
|
-
export { bootstrapLazy as b, h, promiseResolve as p, registerInstance as r };
|
|
1156
|
+
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-111a6307.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-loader",[[1,"p-loader",{"show":[4],"variant":[1],"color":[1],"modalTitle":[1,"modal-title"],"modalDescription":[1,"modal-description"]}]]],["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
|
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-111a6307.js';
|
|
2
2
|
|
|
3
|
-
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}";
|
|
3
|
+
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}";
|
|
4
4
|
|
|
5
5
|
const Button = class {
|
|
6
6
|
constructor(hostRef) {
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
8
|
/**
|
|
9
|
-
* The
|
|
9
|
+
* The variant of the button
|
|
10
10
|
*/
|
|
11
11
|
this.variant = 'primary';
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
return (h("button", { class: `variant-${this.variant}` }, h("slot", null)));
|
|
14
|
+
return (h(Host, null, h("button", { class: `variant-${this.variant}` }, h("slot", null))));
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
17
|
Button.style = buttonComponentCss;
|