smoothly 0.1.77 → 0.1.81
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/dist/cjs/{App-eff713bd.js → App-ffc56e72.js} +1 -1
- package/dist/cjs/{Notice-e43922ea.js → Notice-9120d311.js} +1 -1
- package/dist/cjs/{css-shim-e3f30f9a.js → css-shim-88cc6900.js} +1 -1
- package/dist/cjs/{dom-c8b6d1a7.js → dom-95afd968.js} +1 -1
- package/dist/cjs/{generate-7f7f7d99.js → generate-14aca5d2.js} +1 -1
- package/dist/cjs/{index-b7e6a72c.js → index-138c41c2.js} +342 -147
- package/dist/cjs/{index-5537d93a.js → index-41a36ce2.js} +154 -88
- package/dist/cjs/{index-7c9d0102.js → index-42db74b3.js} +2 -2
- package/dist/cjs/{index-c973259c.js → index-de5d1ee1.js} +10 -7
- package/dist/cjs/{index-e37f73fe.js → index-fc82954f.js} +311 -12
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{shadow-css-6cbb23a9.js → shadow-css-71d0f821.js} +12 -6
- package/dist/cjs/smoothly-accordion-item.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-accordion.cjs.entry.js +2 -2
- package/dist/cjs/{smoothly-accordion_46.cjs.entry.js → smoothly-accordion_47.cjs.entry.js} +7965 -2493
- package/dist/cjs/smoothly-app-demo.cjs.entry.js +3 -3
- package/dist/cjs/smoothly-app.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-calendar.cjs.entry.js +4 -4
- package/dist/cjs/smoothly-checkbox.cjs.entry.js +5707 -504
- package/dist/cjs/smoothly-dialog-demo.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-dialog.cjs.entry.js +3 -3
- package/dist/cjs/smoothly-display-amount.cjs.entry.js +3 -3
- package/dist/cjs/smoothly-display-date-time.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-display-demo.cjs.entry.js +4 -4
- package/dist/cjs/smoothly-display.cjs.entry.js +3 -3
- package/dist/cjs/smoothly-frame.cjs.entry.js +3 -3
- package/dist/cjs/smoothly-icon-demo.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-icon.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-input-date-range.cjs.entry.js +3 -3
- package/dist/cjs/smoothly-input-date.cjs.entry.js +3 -3
- package/dist/cjs/smoothly-input-demo.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-input-month.cjs.entry.js +4 -4
- package/dist/cjs/smoothly-input.cjs.entry.js +19 -12
- package/dist/cjs/smoothly-item.cjs.entry.js +6 -2
- package/dist/cjs/smoothly-menu-options.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-notification.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-notifier.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-option.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-picker.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-popup.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-quiet.cjs.entry.js +19 -0
- package/dist/cjs/smoothly-radio-group.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-radio.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-reorder.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-room.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-select-demo.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-select.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-selector.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-spinner.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-submit.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-tab-switch.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-tab.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-table-cell.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-table-demo.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-table-expandable-cell.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-table-expandable-row.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-table-header.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-table-row.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-table.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-trigger-sink.cjs.entry.js +3 -3
- package/dist/cjs/smoothly-trigger-source.cjs.entry.js +3 -3
- package/dist/cjs/smoothly-trigger.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-tuple.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-urlencoded.cjs.entry.js +2 -2
- package/dist/cjs/smoothly.cjs.js +10 -7
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/display-demo/index.js +4 -1
- package/dist/collection/components/input/index.js +16 -9
- package/dist/collection/components/item/index.js +4 -0
- package/dist/collection/components/quiet/index.js +34 -0
- package/dist/collection/components/quiet/style.css +3 -0
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +8186 -2655
- package/dist/{smoothly/App-bf78807d.js → esm/App-c5f6000f.js} +1 -1
- package/dist/esm/{Notice-966edc54.js → Notice-d87d90f7.js} +1 -1
- package/dist/esm/{css-shim-003e9264.js → css-shim-c64026cd.js} +1 -1
- package/dist/esm/{dom-1b195079.js → dom-a712b575.js} +1 -1
- package/dist/esm/{generate-7090dc14.js → generate-be25a8d1.js} +1 -1
- package/dist/esm/{index-0dd5f791.js → index-02a70ac1.js} +342 -147
- package/dist/{smoothly/index-01fedb5b.js → esm/index-36a04e8c.js} +2 -2
- package/dist/esm/{index-531e2f06.js → index-68492ed9.js} +10 -7
- package/dist/{smoothly/index-13251390.js → esm/index-a28d88cf.js} +311 -12
- package/dist/esm/{index-9d550804.js → index-dcb2b612.js} +154 -88
- package/dist/esm/index.js +3 -3
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{shadow-css-c1ad5fdc.js → shadow-css-1e16431b.js} +12 -6
- package/dist/esm/smoothly-accordion-item.entry.js +2 -2
- package/dist/esm/smoothly-accordion.entry.js +2 -2
- package/dist/esm/{smoothly-accordion_46.entry.js → smoothly-accordion_47.entry.js} +7965 -2494
- package/dist/esm/smoothly-app-demo.entry.js +3 -3
- package/dist/esm/smoothly-app.entry.js +2 -2
- package/dist/esm/smoothly-calendar.entry.js +4 -4
- package/dist/esm/smoothly-checkbox.entry.js +5703 -500
- package/dist/esm/smoothly-dialog-demo.entry.js +2 -2
- package/dist/esm/smoothly-dialog.entry.js +3 -3
- package/dist/esm/smoothly-display-amount.entry.js +3 -3
- package/dist/esm/smoothly-display-date-time.entry.js +2 -2
- package/dist/esm/smoothly-display-demo.entry.js +4 -4
- package/dist/esm/smoothly-display.entry.js +3 -3
- package/dist/esm/smoothly-frame.entry.js +3 -3
- package/dist/esm/smoothly-icon-demo.entry.js +2 -2
- package/dist/esm/smoothly-icon.entry.js +2 -2
- package/dist/esm/smoothly-input-date-range.entry.js +3 -3
- package/dist/esm/smoothly-input-date.entry.js +3 -3
- package/dist/esm/smoothly-input-demo.entry.js +2 -2
- package/dist/esm/smoothly-input-month.entry.js +4 -4
- package/dist/esm/smoothly-input.entry.js +19 -12
- package/dist/esm/smoothly-item.entry.js +6 -2
- package/dist/esm/smoothly-menu-options.entry.js +2 -2
- package/dist/esm/smoothly-notification.entry.js +2 -2
- package/dist/esm/smoothly-notifier.entry.js +2 -2
- package/dist/esm/smoothly-option.entry.js +2 -2
- package/dist/esm/smoothly-picker.entry.js +2 -2
- package/dist/esm/smoothly-popup.entry.js +2 -2
- package/dist/esm/smoothly-quiet.entry.js +15 -0
- package/dist/esm/smoothly-radio-group.entry.js +2 -2
- package/dist/esm/smoothly-radio.entry.js +2 -2
- package/dist/esm/smoothly-reorder.entry.js +2 -2
- package/dist/esm/smoothly-room.entry.js +2 -2
- package/dist/esm/smoothly-select-demo.entry.js +2 -2
- package/dist/esm/smoothly-select.entry.js +2 -2
- package/dist/esm/smoothly-selector.entry.js +2 -2
- package/dist/esm/smoothly-spinner.entry.js +2 -2
- package/dist/esm/smoothly-submit.entry.js +2 -2
- package/dist/esm/smoothly-tab-switch.entry.js +2 -2
- package/dist/esm/smoothly-tab.entry.js +2 -2
- package/dist/esm/smoothly-table-cell.entry.js +2 -2
- package/dist/esm/smoothly-table-demo.entry.js +2 -2
- package/dist/esm/smoothly-table-expandable-cell.entry.js +2 -2
- package/dist/esm/smoothly-table-expandable-row.entry.js +2 -2
- package/dist/esm/smoothly-table-header.entry.js +2 -2
- package/dist/esm/smoothly-table-row.entry.js +2 -2
- package/dist/esm/smoothly-table.entry.js +2 -2
- package/dist/esm/smoothly-trigger-sink.entry.js +3 -3
- package/dist/esm/smoothly-trigger-source.entry.js +3 -3
- package/dist/esm/smoothly-trigger.entry.js +2 -2
- package/dist/esm/smoothly-tuple.entry.js +2 -2
- package/dist/esm/smoothly-urlencoded.entry.js +2 -2
- package/dist/esm/smoothly.js +10 -7
- package/dist/{esm/App-bf78807d.js → smoothly/App-c5f6000f.js} +1 -1
- package/dist/smoothly/{css-shim-003e9264.js → css-shim-c64026cd.js} +1 -1
- package/dist/smoothly/{dom-1b195079.js → dom-a712b575.js} +1 -1
- package/dist/smoothly/{generate-7090dc14.js → generate-be25a8d1.js} +1 -1
- package/dist/smoothly/{index-0dd5f791.js → index-02a70ac1.js} +342 -147
- package/dist/{esm/index-01fedb5b.js → smoothly/index-36a04e8c.js} +2 -2
- package/dist/smoothly/{index-531e2f06.js → index-68492ed9.js} +10 -7
- package/dist/{esm/index-13251390.js → smoothly/index-a28d88cf.js} +311 -12
- package/dist/smoothly/index.esm.js +3 -3
- package/dist/smoothly/{p-0906d4b2.js → p-074a0448.js} +1 -1
- package/dist/smoothly/p-09d633f8.entry.js +1 -0
- package/dist/smoothly/p-0c1e9588.entry.js +1 -0
- package/dist/smoothly/p-1a81597b.entry.js +1 -0
- package/dist/smoothly/{p-7f5dd95f.js → p-1e768876.js} +1 -1
- package/dist/smoothly/p-9fa3ab06.entry.js +1 -0
- package/dist/smoothly/p-c9d01e9b.entry.js +1 -0
- package/dist/smoothly/{shadow-css-c1ad5fdc.js → shadow-css-1e16431b.js} +12 -6
- package/dist/smoothly/smoothly-accordion-item.entry.js +2 -2
- package/dist/smoothly/smoothly-accordion.entry.js +2 -2
- package/dist/smoothly/smoothly-app-demo.entry.js +3 -3
- package/dist/smoothly/smoothly-app.entry.js +2 -2
- package/dist/smoothly/smoothly-calendar.entry.js +4 -4
- package/dist/smoothly/smoothly-checkbox.entry.js +5703 -500
- package/dist/smoothly/smoothly-dialog-demo.entry.js +2 -2
- package/dist/smoothly/smoothly-dialog.entry.js +3 -3
- package/dist/smoothly/smoothly-display-amount.entry.js +3 -3
- package/dist/smoothly/smoothly-display-date-time.entry.js +2 -2
- package/dist/smoothly/smoothly-display-demo.entry.js +4 -4
- package/dist/smoothly/smoothly-display.entry.js +3 -3
- package/dist/smoothly/smoothly-frame.entry.js +3 -3
- package/dist/smoothly/smoothly-icon-demo.entry.js +2 -2
- package/dist/smoothly/smoothly-icon.entry.js +2 -2
- package/dist/smoothly/smoothly-input-date-range.entry.js +3 -3
- package/dist/smoothly/smoothly-input-date.entry.js +3 -3
- package/dist/smoothly/smoothly-input-demo.entry.js +2 -2
- package/dist/smoothly/smoothly-input-month.entry.js +4 -4
- package/dist/smoothly/smoothly-input.entry.js +19 -12
- package/dist/smoothly/smoothly-item.entry.js +6 -2
- package/dist/smoothly/smoothly-menu-options.entry.js +2 -2
- package/dist/smoothly/smoothly-notification.entry.js +2 -2
- package/dist/smoothly/smoothly-notifier.entry.js +2 -2
- package/dist/smoothly/smoothly-option.entry.js +2 -2
- package/dist/smoothly/smoothly-picker.entry.js +2 -2
- package/dist/smoothly/smoothly-popup.entry.js +2 -2
- package/dist/smoothly/smoothly-quiet.entry.js +15 -0
- package/dist/smoothly/smoothly-radio-group.entry.js +2 -2
- package/dist/smoothly/smoothly-radio.entry.js +2 -2
- package/dist/smoothly/smoothly-reorder.entry.js +2 -2
- package/dist/smoothly/smoothly-room.entry.js +2 -2
- package/dist/smoothly/smoothly-select-demo.entry.js +2 -2
- package/dist/smoothly/smoothly-select.entry.js +2 -2
- package/dist/smoothly/smoothly-selector.entry.js +2 -2
- package/dist/smoothly/smoothly-spinner.entry.js +2 -2
- package/dist/smoothly/smoothly-submit.entry.js +2 -2
- package/dist/smoothly/smoothly-tab-switch.entry.js +2 -2
- package/dist/smoothly/smoothly-tab.entry.js +2 -2
- package/dist/smoothly/smoothly-table-cell.entry.js +2 -2
- package/dist/smoothly/smoothly-table-demo.entry.js +2 -2
- package/dist/smoothly/smoothly-table-expandable-cell.entry.js +2 -2
- package/dist/smoothly/smoothly-table-expandable-row.entry.js +2 -2
- package/dist/smoothly/smoothly-table-header.entry.js +2 -2
- package/dist/smoothly/smoothly-table-row.entry.js +2 -2
- package/dist/smoothly/smoothly-table.entry.js +2 -2
- package/dist/smoothly/smoothly-trigger-sink.entry.js +3 -3
- package/dist/smoothly/smoothly-trigger-source.entry.js +3 -3
- package/dist/smoothly/smoothly-trigger.entry.js +2 -2
- package/dist/smoothly/smoothly-tuple.entry.js +2 -2
- package/dist/smoothly/smoothly-urlencoded.entry.js +2 -2
- package/dist/smoothly/smoothly.esm.js +10 -7
- package/dist/types/components/item/index.d.ts +1 -0
- package/dist/types/components/quiet/index.d.ts +4 -0
- package/dist/types/components.d.ts +15 -0
- package/dist/types/stencil-public-runtime.d.ts +183 -182
- package/loader/index.d.ts +0 -1
- package/package.json +89 -90
- package/dist/smoothly/p-22bce579.entry.js +0 -1
- package/dist/smoothly/p-41528fcb.entry.js +0 -1
- package/dist/smoothly/p-89fe12b0.entry.js +0 -1
- package/dist/smoothly/p-e3d91e7a.entry.js +0 -1
- package/dist/smoothly/p-e79800d9.entry.js +0 -1
|
@@ -36,8 +36,8 @@ const doc = win.document || { head: {} };
|
|
|
36
36
|
const plt = {
|
|
37
37
|
$flags$: 0,
|
|
38
38
|
$resourcesUrl$: '',
|
|
39
|
-
jmp: h => h(),
|
|
40
|
-
raf: h => requestAnimationFrame(h),
|
|
39
|
+
jmp: (h) => h(),
|
|
40
|
+
raf: (h) => requestAnimationFrame(h),
|
|
41
41
|
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
42
42
|
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
43
43
|
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
|
@@ -46,7 +46,7 @@ const promiseResolve = (v) => Promise.resolve(v);
|
|
|
46
46
|
const supportsConstructibleStylesheets = /*@__PURE__*/ (() => {
|
|
47
47
|
try {
|
|
48
48
|
new CSSStyleSheet();
|
|
49
|
-
return typeof
|
|
49
|
+
return typeof new CSSStyleSheet().replace === 'function';
|
|
50
50
|
}
|
|
51
51
|
catch (e) { }
|
|
52
52
|
return false;
|
|
@@ -240,7 +240,7 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
240
240
|
typeof classData !== 'object'
|
|
241
241
|
? classData
|
|
242
242
|
: Object.keys(classData)
|
|
243
|
-
.filter(k => classData[k])
|
|
243
|
+
.filter((k) => classData[k])
|
|
244
244
|
.join(' ');
|
|
245
245
|
}
|
|
246
246
|
}
|
|
@@ -329,8 +329,8 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
329
329
|
const classList = elm.classList;
|
|
330
330
|
const oldClasses = parseClassList(oldValue);
|
|
331
331
|
const newClasses = parseClassList(newValue);
|
|
332
|
-
classList.remove(...oldClasses.filter(c => c && !newClasses.includes(c)));
|
|
333
|
-
classList.add(...newClasses.filter(c => c && !oldClasses.includes(c)));
|
|
332
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
333
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
334
334
|
}
|
|
335
335
|
else if (memberName === 'style') {
|
|
336
336
|
// update style attribute, css properties and values
|
|
@@ -365,7 +365,9 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
365
365
|
newValue(elm);
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
|
-
else if ((!isProp ) &&
|
|
368
|
+
else if ((!isProp ) &&
|
|
369
|
+
memberName[0] === 'o' &&
|
|
370
|
+
memberName[1] === 'n') {
|
|
369
371
|
// Event Handlers
|
|
370
372
|
// so if the member name starts with "on" and the 3rd characters is
|
|
371
373
|
// a capital letter, and it's not already a member on the element,
|
|
@@ -412,7 +414,6 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
412
414
|
// Workaround for Safari, moving the <input> caret when re-assigning the same valued
|
|
413
415
|
if (memberName === 'list') {
|
|
414
416
|
isProp = false;
|
|
415
|
-
// tslint:disable-next-line: triple-equals
|
|
416
417
|
}
|
|
417
418
|
else if (oldValue == null || elm[memberName] != n) {
|
|
418
419
|
elm[memberName] = n;
|
|
@@ -466,7 +467,9 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
466
467
|
// if the element passed in is a shadow root, which is a document fragment
|
|
467
468
|
// then we want to be adding attrs/props to the shadow root's "host" element
|
|
468
469
|
// if it's not a shadow root, then we add attrs/props to the same element
|
|
469
|
-
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
|
|
470
|
+
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
|
|
471
|
+
? newVnode.$elm$.host
|
|
472
|
+
: newVnode.$elm$;
|
|
470
473
|
const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
|
|
471
474
|
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
472
475
|
{
|
|
@@ -510,14 +513,17 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
510
513
|
}
|
|
511
514
|
else if (newVNode.$flags$ & 1 /* isSlotReference */) {
|
|
512
515
|
// create a slot reference node
|
|
513
|
-
elm = newVNode.$elm$ =
|
|
516
|
+
elm = newVNode.$elm$ =
|
|
517
|
+
doc.createTextNode('');
|
|
514
518
|
}
|
|
515
519
|
else {
|
|
516
520
|
if (!isSvgMode) {
|
|
517
521
|
isSvgMode = newVNode.$tag$ === 'svg';
|
|
518
522
|
}
|
|
519
523
|
// create element
|
|
520
|
-
elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* isSlotFallback */
|
|
524
|
+
elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* isSlotFallback */
|
|
525
|
+
? 'slot-fb'
|
|
526
|
+
: newVNode.$tag$)
|
|
521
527
|
);
|
|
522
528
|
if (isSvgMode && newVNode.$tag$ === 'foreignObject') {
|
|
523
529
|
isSvgMode = false;
|
|
@@ -884,7 +890,7 @@ const relocateSlotContent = (elm) => {
|
|
|
884
890
|
// that is suppose to always represent the original content location
|
|
885
891
|
if (isNodeLocatedInSlot(node, slotNameAttr)) {
|
|
886
892
|
// it's possible we've already decided to relocate this node
|
|
887
|
-
relocateNodeData = relocateNodes.find(r => r.$nodeToRelocate$ === node);
|
|
893
|
+
relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
888
894
|
// made some changes to slots
|
|
889
895
|
// let's make sure we also double check
|
|
890
896
|
// fallbacks are correctly hidden or shown
|
|
@@ -903,9 +909,9 @@ const relocateSlotContent = (elm) => {
|
|
|
903
909
|
});
|
|
904
910
|
}
|
|
905
911
|
if (node['s-sr']) {
|
|
906
|
-
relocateNodes.map(relocateNode => {
|
|
912
|
+
relocateNodes.map((relocateNode) => {
|
|
907
913
|
if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node['s-sn'])) {
|
|
908
|
-
relocateNodeData = relocateNodes.find(r => r.$nodeToRelocate$ === node);
|
|
914
|
+
relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
909
915
|
if (relocateNodeData && !relocateNode.$slotRefNode$) {
|
|
910
916
|
relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
|
|
911
917
|
}
|
|
@@ -913,7 +919,7 @@ const relocateSlotContent = (elm) => {
|
|
|
913
919
|
});
|
|
914
920
|
}
|
|
915
921
|
}
|
|
916
|
-
else if (!relocateNodes.some(r => r.$nodeToRelocate$ === node)) {
|
|
922
|
+
else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
|
|
917
923
|
// so far this element does not have a slot home, not setting slotRefNode on purpose
|
|
918
924
|
// if we never find a home for this element then we'll need to hide it
|
|
919
925
|
relocateNodes.push({
|
|
@@ -993,7 +999,8 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
993
999
|
if (!nodeToRelocate['s-ol']) {
|
|
994
1000
|
// add a reference node marking this node's original location
|
|
995
1001
|
// keep a reference to this node for later lookups
|
|
996
|
-
orgLocationNode =
|
|
1002
|
+
orgLocationNode =
|
|
1003
|
+
doc.createTextNode('');
|
|
997
1004
|
orgLocationNode['s-nr'] = nodeToRelocate;
|
|
998
1005
|
nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
|
|
999
1006
|
}
|
|
@@ -1017,7 +1024,8 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
1017
1024
|
}
|
|
1018
1025
|
}
|
|
1019
1026
|
}
|
|
1020
|
-
if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
|
|
1027
|
+
if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
|
|
1028
|
+
nodeToRelocate.nextSibling !== insertBeforeNode) {
|
|
1021
1029
|
// we've checked that it's worth while to relocate
|
|
1022
1030
|
// since that the node to relocate
|
|
1023
1031
|
// has a different next sibling or parent relocated
|
|
@@ -1063,6 +1071,13 @@ const createEvent = (ref, name, flags) => {
|
|
|
1063
1071
|
},
|
|
1064
1072
|
};
|
|
1065
1073
|
};
|
|
1074
|
+
/**
|
|
1075
|
+
* Helper function to create & dispatch a custom Event on a provided target
|
|
1076
|
+
* @param elm the target of the Event
|
|
1077
|
+
* @param name the name to give the custom Event
|
|
1078
|
+
* @param opts options for configuring a custom Event
|
|
1079
|
+
* @returns the custom Event
|
|
1080
|
+
*/
|
|
1066
1081
|
const emitEvent = (elm, name, opts) => {
|
|
1067
1082
|
const ev = plt.ce(name, opts);
|
|
1068
1083
|
elm.dispatchEvent(ev);
|
|
@@ -1070,7 +1085,7 @@ const emitEvent = (elm, name, opts) => {
|
|
|
1070
1085
|
};
|
|
1071
1086
|
const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1072
1087
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
|
|
1073
|
-
ancestorComponent['s-p'].push(new Promise(r => (hostRef.$onRenderResolve$ = r)));
|
|
1088
|
+
ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
|
|
1074
1089
|
}
|
|
1075
1090
|
};
|
|
1076
1091
|
const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -1124,7 +1139,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1124
1139
|
// ok, so turns out there are some child host elements
|
|
1125
1140
|
// waiting on this parent element to load
|
|
1126
1141
|
// let's fire off all update callbacks waiting
|
|
1127
|
-
rc.map(cb => cb());
|
|
1142
|
+
rc.map((cb) => cb());
|
|
1128
1143
|
elm['s-rc'] = undefined;
|
|
1129
1144
|
}
|
|
1130
1145
|
endRender();
|
|
@@ -1222,7 +1237,8 @@ const forceUpdate = (ref) => {
|
|
|
1222
1237
|
{
|
|
1223
1238
|
const hostRef = getHostRef(ref);
|
|
1224
1239
|
const isConnected = hostRef.$hostElement$.isConnected;
|
|
1225
|
-
if (isConnected &&
|
|
1240
|
+
if (isConnected &&
|
|
1241
|
+
(hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
1226
1242
|
scheduleUpdate(hostRef, false);
|
|
1227
1243
|
}
|
|
1228
1244
|
// Returns "true" when the forced update was successfully scheduled
|
|
@@ -1251,7 +1267,8 @@ const safeCall = (instance, method, arg) => {
|
|
|
1251
1267
|
const then = (promise, thenFn) => {
|
|
1252
1268
|
return promise && promise.then ? promise.then(thenFn) : thenFn();
|
|
1253
1269
|
};
|
|
1254
|
-
const addHydratedFlag = (elm) =>
|
|
1270
|
+
const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
1271
|
+
;
|
|
1255
1272
|
const parsePropertyValue = (propValue, propType) => {
|
|
1256
1273
|
// ensure this value is of the correct prop type
|
|
1257
1274
|
if (propValue != null && !isComplexType(propValue)) {
|
|
@@ -1295,7 +1312,7 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1295
1312
|
const watchMethods = cmpMeta.$watchers$[propName];
|
|
1296
1313
|
if (watchMethods) {
|
|
1297
1314
|
// this instance is watching for when this property changed
|
|
1298
|
-
watchMethods.map(watchMethodName => {
|
|
1315
|
+
watchMethods.map((watchMethodName) => {
|
|
1299
1316
|
try {
|
|
1300
1317
|
// fire off each of the watch methods that are watching this property
|
|
1301
1318
|
instance[watchMethodName](newVal, oldVal, propName);
|
|
@@ -1325,7 +1342,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1325
1342
|
const members = Object.entries(cmpMeta.$members$);
|
|
1326
1343
|
const prototype = Cstr.prototype;
|
|
1327
1344
|
members.map(([memberName, [memberFlags]]) => {
|
|
1328
|
-
if ((memberFlags & 31 /* Prop */ ||
|
|
1345
|
+
if ((memberFlags & 31 /* Prop */ ||
|
|
1346
|
+
((flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {
|
|
1329
1347
|
// proxyComponent - prop
|
|
1330
1348
|
Object.defineProperty(prototype, memberName, {
|
|
1331
1349
|
get() {
|
|
@@ -1340,7 +1358,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1340
1358
|
enumerable: true,
|
|
1341
1359
|
});
|
|
1342
1360
|
}
|
|
1343
|
-
else if (flags & 1 /* isElementConstructor */ &&
|
|
1361
|
+
else if (flags & 1 /* isElementConstructor */ &&
|
|
1362
|
+
memberFlags & 64 /* Method */) {
|
|
1344
1363
|
// proxyComponent - method
|
|
1345
1364
|
Object.defineProperty(prototype, memberName, {
|
|
1346
1365
|
value(...args) {
|
|
@@ -1355,6 +1374,51 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1355
1374
|
prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
|
|
1356
1375
|
plt.jmp(() => {
|
|
1357
1376
|
const propName = attrNameToPropName.get(attrName);
|
|
1377
|
+
// In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
|
|
1378
|
+
// in the case where an attribute was set inline.
|
|
1379
|
+
// ```html
|
|
1380
|
+
// <my-component some-attribute="some-value"></my-component>
|
|
1381
|
+
// ```
|
|
1382
|
+
//
|
|
1383
|
+
// There is an edge case where a developer sets the attribute inline on a custom element and then
|
|
1384
|
+
// programmatically changes it before it has been upgraded as shown below:
|
|
1385
|
+
//
|
|
1386
|
+
// ```html
|
|
1387
|
+
// <!-- this component has _not_ been upgraded yet -->
|
|
1388
|
+
// <my-component id="test" some-attribute="some-value"></my-component>
|
|
1389
|
+
// <script>
|
|
1390
|
+
// // grab non-upgraded component
|
|
1391
|
+
// el = document.querySelector("#test");
|
|
1392
|
+
// el.someAttribute = "another-value";
|
|
1393
|
+
// // upgrade component
|
|
1394
|
+
// customElements.define('my-component', MyComponent);
|
|
1395
|
+
// </script>
|
|
1396
|
+
// ```
|
|
1397
|
+
// In this case if we do not unshadow here and use the value of the shadowing property, attributeChangedCallback
|
|
1398
|
+
// will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
|
|
1399
|
+
// to the value that was set inline i.e. "some-value" from above example. When
|
|
1400
|
+
// the connectedCallback attempts to unshadow it will use "some-value" as the initial value rather than "another-value"
|
|
1401
|
+
//
|
|
1402
|
+
// The case where the attribute was NOT set inline but was not set programmatically shall be handled/unshadowed
|
|
1403
|
+
// by connectedCallback as this attributeChangedCallback will not fire.
|
|
1404
|
+
//
|
|
1405
|
+
// https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
|
|
1406
|
+
//
|
|
1407
|
+
// TODO(STENCIL-16) we should think about whether or not we actually want to be reflecting the attributes to
|
|
1408
|
+
// properties here given that this goes against best practices outlined here
|
|
1409
|
+
// https://developers.google.com/web/fundamentals/web-components/best-practices#avoid-reentrancy
|
|
1410
|
+
if (this.hasOwnProperty(propName)) {
|
|
1411
|
+
newValue = this[propName];
|
|
1412
|
+
delete this[propName];
|
|
1413
|
+
}
|
|
1414
|
+
else if (prototype.hasOwnProperty(propName) &&
|
|
1415
|
+
typeof this[propName] === 'number' &&
|
|
1416
|
+
this[propName] == newValue) {
|
|
1417
|
+
// if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native
|
|
1418
|
+
// APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in
|
|
1419
|
+
// `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
|
|
1420
|
+
return;
|
|
1421
|
+
}
|
|
1358
1422
|
this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
|
|
1359
1423
|
});
|
|
1360
1424
|
};
|
|
@@ -1391,7 +1455,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1391
1455
|
endLoad();
|
|
1392
1456
|
}
|
|
1393
1457
|
if (!Cstr.isProxied) {
|
|
1394
|
-
// we'
|
|
1458
|
+
// we've never proxied this Constructor before
|
|
1395
1459
|
// let's add the getters/setters to its prototype before
|
|
1396
1460
|
// the first time we create an instance of the implementation
|
|
1397
1461
|
{
|
|
@@ -1440,7 +1504,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1440
1504
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1441
1505
|
const schedule = () => scheduleUpdate(hostRef, true);
|
|
1442
1506
|
if (ancestorComponent && ancestorComponent['s-rc']) {
|
|
1443
|
-
// this is the
|
|
1507
|
+
// this is the initial load and this component it has an ancestor component
|
|
1444
1508
|
// but the ancestor component has NOT fired its will update lifecycle yet
|
|
1445
1509
|
// so let's just cool our jets and wait for the ancestor to continue first
|
|
1446
1510
|
// this will get fired off when the ancestor component
|
|
@@ -1525,7 +1589,7 @@ const disconnectedCallback = (elm) => {
|
|
|
1525
1589
|
const instance = hostRef.$lazyInstance$ ;
|
|
1526
1590
|
{
|
|
1527
1591
|
if (hostRef.$rmListeners$) {
|
|
1528
|
-
hostRef.$rmListeners$.map(rmListener => rmListener());
|
|
1592
|
+
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
1529
1593
|
hostRef.$rmListeners$ = undefined;
|
|
1530
1594
|
}
|
|
1531
1595
|
}
|
|
@@ -1547,71 +1611,73 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1547
1611
|
let isBootstrapping = true;
|
|
1548
1612
|
Object.assign(plt, options);
|
|
1549
1613
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
|
|
1550
|
-
lazyBundles.map(lazyBundle =>
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1614
|
+
lazyBundles.map((lazyBundle) => {
|
|
1615
|
+
lazyBundle[1].map((compactMeta) => {
|
|
1616
|
+
const cmpMeta = {
|
|
1617
|
+
$flags$: compactMeta[0],
|
|
1618
|
+
$tagName$: compactMeta[1],
|
|
1619
|
+
$members$: compactMeta[2],
|
|
1620
|
+
$listeners$: compactMeta[3],
|
|
1621
|
+
};
|
|
1622
|
+
{
|
|
1623
|
+
cmpMeta.$members$ = compactMeta[2];
|
|
1624
|
+
}
|
|
1625
|
+
{
|
|
1626
|
+
cmpMeta.$listeners$ = compactMeta[3];
|
|
1627
|
+
}
|
|
1628
|
+
{
|
|
1629
|
+
cmpMeta.$attrsToReflect$ = [];
|
|
1630
|
+
}
|
|
1631
|
+
{
|
|
1632
|
+
cmpMeta.$watchers$ = {};
|
|
1633
|
+
}
|
|
1634
|
+
const tagName = cmpMeta.$tagName$;
|
|
1635
|
+
const HostElement = class extends HTMLElement {
|
|
1636
|
+
// StencilLazyHost
|
|
1637
|
+
constructor(self) {
|
|
1638
|
+
// @ts-ignore
|
|
1639
|
+
super(self);
|
|
1640
|
+
self = this;
|
|
1641
|
+
registerHost(self, cmpMeta);
|
|
1642
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1643
|
+
// this component is using shadow dom
|
|
1644
|
+
// and this browser supports shadow dom
|
|
1645
|
+
// add the read-only property "shadowRoot" to the host element
|
|
1646
|
+
// adding the shadow root build conditionals to minimize runtime
|
|
1583
1647
|
{
|
|
1584
|
-
|
|
1648
|
+
{
|
|
1649
|
+
self.attachShadow({ mode: 'open' });
|
|
1650
|
+
}
|
|
1585
1651
|
}
|
|
1586
1652
|
}
|
|
1587
1653
|
}
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1654
|
+
connectedCallback() {
|
|
1655
|
+
if (appLoadFallback) {
|
|
1656
|
+
clearTimeout(appLoadFallback);
|
|
1657
|
+
appLoadFallback = null;
|
|
1658
|
+
}
|
|
1659
|
+
if (isBootstrapping) {
|
|
1660
|
+
// connectedCallback will be processed once all components have been registered
|
|
1661
|
+
deferredConnectedCallbacks.push(this);
|
|
1662
|
+
}
|
|
1663
|
+
else {
|
|
1664
|
+
plt.jmp(() => connectedCallback(this));
|
|
1665
|
+
}
|
|
1593
1666
|
}
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
deferredConnectedCallbacks.push(this);
|
|
1667
|
+
disconnectedCallback() {
|
|
1668
|
+
plt.jmp(() => disconnectedCallback(this));
|
|
1597
1669
|
}
|
|
1598
|
-
|
|
1599
|
-
|
|
1670
|
+
componentOnReady() {
|
|
1671
|
+
return getHostRef(this).$onReadyPromise$;
|
|
1600
1672
|
}
|
|
1673
|
+
};
|
|
1674
|
+
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
1675
|
+
if (!exclude.includes(tagName) && !customElements.get(tagName)) {
|
|
1676
|
+
cmpTags.push(tagName);
|
|
1677
|
+
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
|
|
1601
1678
|
}
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
}
|
|
1605
|
-
componentOnReady() {
|
|
1606
|
-
return getHostRef(this).$onReadyPromise$;
|
|
1607
|
-
}
|
|
1608
|
-
};
|
|
1609
|
-
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
1610
|
-
if (!exclude.includes(tagName) && !customElements.get(tagName)) {
|
|
1611
|
-
cmpTags.push(tagName);
|
|
1612
|
-
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
|
|
1613
|
-
}
|
|
1614
|
-
}));
|
|
1679
|
+
});
|
|
1680
|
+
});
|
|
1615
1681
|
{
|
|
1616
1682
|
visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
|
|
1617
1683
|
visibilityStyle.setAttribute('data-styles', '');
|
|
@@ -1620,7 +1686,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1620
1686
|
// Process deferred connectedCallbacks now all components have been registered
|
|
1621
1687
|
isBootstrapping = false;
|
|
1622
1688
|
if (deferredConnectedCallbacks.length) {
|
|
1623
|
-
deferredConnectedCallbacks.map(host => host.connectedCallback());
|
|
1689
|
+
deferredConnectedCallbacks.map((host) => host.connectedCallback());
|
|
1624
1690
|
}
|
|
1625
1691
|
else {
|
|
1626
1692
|
{
|
|
@@ -1641,10 +1707,10 @@ const registerHost = (elm, cmpMeta) => {
|
|
|
1641
1707
|
$instanceValues$: new Map(),
|
|
1642
1708
|
};
|
|
1643
1709
|
{
|
|
1644
|
-
hostRef.$onInstancePromise$ = new Promise(r => (hostRef.$onInstanceResolve$ = r));
|
|
1710
|
+
hostRef.$onInstancePromise$ = new Promise((r) => (hostRef.$onInstanceResolve$ = r));
|
|
1645
1711
|
}
|
|
1646
1712
|
{
|
|
1647
|
-
hostRef.$onReadyPromise$ = new Promise(r => (hostRef.$onReadyResolve$ = r));
|
|
1713
|
+
hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
|
|
1648
1714
|
elm['s-p'] = [];
|
|
1649
1715
|
elm['s-rc'] = [];
|
|
1650
1716
|
}
|
|
@@ -1666,7 +1732,7 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1666
1732
|
/* webpackInclude: /\.entry\.js$/ */
|
|
1667
1733
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
1668
1734
|
/* webpackMode: "lazy" */
|
|
1669
|
-
`./${bundleId}.entry.js${''}`)); }).then(importedModule => {
|
|
1735
|
+
`./${bundleId}.entry.js${''}`)); }).then((importedModule) => {
|
|
1670
1736
|
{
|
|
1671
1737
|
cmpModules.set(bundleId, importedModule);
|
|
1672
1738
|
}
|
|
@@ -212,9 +212,9 @@ var Action;
|
|
|
212
212
|
var _a, _b;
|
|
213
213
|
let result = State_1.State.copy(formatter.unformat(StateEditor_1.StateEditor.copy(state)));
|
|
214
214
|
if (action) {
|
|
215
|
-
if (action.ctrlKey) {
|
|
215
|
+
if (action.ctrlKey || action.metaKey) {
|
|
216
216
|
if (action.key == "a")
|
|
217
|
-
select(
|
|
217
|
+
select(result, 0, result.value.length, "forward");
|
|
218
218
|
else if (["ArrowLeft", "ArrowRight"].includes(action.key) && ((_a = state) === null || _a === void 0 ? void 0 : _a.type) != "password")
|
|
219
219
|
result = ctrlArrow(formatter, state, action);
|
|
220
220
|
else if (["Delete", "Backspace"].includes(action.key) && ((_b = state) === null || _b === void 0 ? void 0 : _b.type) != "password")
|
|
@@ -80,13 +80,16 @@ class Algorithm$2 {
|
|
|
80
80
|
return __awaiter$d(this, void 0, void 0, function* () {
|
|
81
81
|
const iv = salt ? decode$1(salt, "url") : crypto.getRandomValues(new Uint8Array(16));
|
|
82
82
|
return {
|
|
83
|
+
key: this.name,
|
|
83
84
|
salt: salt || encode$1(iv, "url"),
|
|
84
85
|
value: encode$1(new Uint8Array(yield crypto.subtle.encrypt({ name: (yield this.key).algorithm.name, iv }, yield this.key, new TextEncoder().encode(data))), "url"),
|
|
85
86
|
};
|
|
86
87
|
});
|
|
87
88
|
}
|
|
88
|
-
decrypt(encrypted) {
|
|
89
|
+
decrypt(encrypted, salt) {
|
|
89
90
|
return __awaiter$d(this, void 0, void 0, function* () {
|
|
91
|
+
if (typeof encrypted == "string")
|
|
92
|
+
encrypted = { value: encrypted, salt: salt !== null && salt !== void 0 ? salt : "" };
|
|
90
93
|
return new TextDecoder().decode(new Uint8Array(yield crypto.subtle.decrypt({ name: (yield this.key).algorithm.name, iv: decode$1(encrypted.salt, "url") }, yield this.key, decode$1(encrypted.value, "url"))));
|
|
91
94
|
});
|
|
92
95
|
}
|
|
@@ -1079,7 +1082,7 @@ class Issuer extends Actor {
|
|
|
1079
1082
|
return __awaiter$1(this, void 0, void 0, function* () {
|
|
1080
1083
|
payload = Object.assign(Object.assign({}, this.payload), payload);
|
|
1081
1084
|
if (issuedAt)
|
|
1082
|
-
payload.iat = typeof issuedAt == "number" ? issuedAt : issuedAt.getTime();
|
|
1085
|
+
payload.iat = typeof issuedAt == "number" ? issuedAt : issuedAt.getTime() / 1000;
|
|
1083
1086
|
const transformed = yield this.transformers.reduce((p, c) => __awaiter$1(this, void 0, void 0, function* () { return c.apply(yield p); }), Promise.resolve(payload));
|
|
1084
1087
|
const data = transformed &&
|
|
1085
1088
|
`${encode$1(new TextEncoder().encode(JSON.stringify(this.header)), "url")}.${encode$1(new TextEncoder().encode(JSON.stringify(transformed)), "url")}`;
|
|
@@ -1091,7 +1094,7 @@ class Issuer extends Actor {
|
|
|
1091
1094
|
? Math.floor(Date.now() / 1000)
|
|
1092
1095
|
: typeof Issuer.defaultIssuedAt == "number"
|
|
1093
1096
|
? Issuer.defaultIssuedAt
|
|
1094
|
-
: Math.floor(Issuer.defaultIssuedAt.getTime());
|
|
1097
|
+
: Math.floor(Issuer.defaultIssuedAt.getTime() / 1000);
|
|
1095
1098
|
}
|
|
1096
1099
|
static create(issuer, algorithm) {
|
|
1097
1100
|
return (algorithm && new Issuer(issuer, algorithm)) || undefined;
|
|
@@ -1155,10 +1158,6 @@ class Verifier extends Actor {
|
|
|
1155
1158
|
result = undefined;
|
|
1156
1159
|
}
|
|
1157
1160
|
result = result && this.verifyAudience(result.aud, audience) ? result : undefined;
|
|
1158
|
-
if (result) {
|
|
1159
|
-
result.token = token;
|
|
1160
|
-
result = yield this.transformers.reduceRight((p, c) => __awaiter(this, void 0, void 0, function* () { return c.reverse(yield p); }), Promise.resolve(result));
|
|
1161
|
-
}
|
|
1162
1161
|
if (result) {
|
|
1163
1162
|
const now = Math.floor(Date.now() / 1000);
|
|
1164
1163
|
if ((result === null || result === void 0 ? void 0 : result.iat) && result.iat > 1000000000000)
|
|
@@ -1170,6 +1169,10 @@ class Verifier extends Actor {
|
|
|
1170
1169
|
? result
|
|
1171
1170
|
: undefined;
|
|
1172
1171
|
}
|
|
1172
|
+
if (result) {
|
|
1173
|
+
result.token = token;
|
|
1174
|
+
result = yield this.transformers.reduceRight((p, c) => __awaiter(this, void 0, void 0, function* () { return c.reverse(yield p); }), Promise.resolve(result));
|
|
1175
|
+
}
|
|
1173
1176
|
}
|
|
1174
1177
|
}
|
|
1175
1178
|
return result;
|