smoothly 0.1.67 → 0.1.71
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/{Trigger-ea33b682.js → Trigger-74bd1ee8.js} +16 -0
- package/dist/cjs/{generate-5e7cd3f7.js → generate-7f7f7d99.js} +3 -2
- package/dist/cjs/{index-896ac706.js → index-7c9d0102.js} +806 -638
- package/dist/cjs/{index-2a5f8661.js → index-c973259c.js} +16 -0
- package/dist/cjs/{index-b8688617.js → index-e37f73fe.js} +89 -19
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/smoothly-accordion_43.cjs.entry.js +917 -694
- package/dist/cjs/smoothly-calendar.cjs.entry.js +7 -7
- package/dist/cjs/smoothly-dialog.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-display-amount.cjs.entry.js +2 -4
- package/dist/cjs/smoothly-display-demo.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-display.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-frame.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-input-date-range.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-input-date.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-input-month.cjs.entry.js +11 -11
- package/dist/cjs/smoothly-input.cjs.entry.js +2 -2
- package/dist/cjs/smoothly-picker.cjs.entry.js +12 -17
- package/dist/cjs/smoothly-select.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-table-header.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-trigger-sink.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-trigger-source.cjs.entry.js +1 -1
- package/dist/collection/components/calendar/generate.js +2 -1
- package/dist/collection/components/calendar/index.js +4 -4
- package/dist/collection/components/calendar/style.css +29 -11
- package/dist/collection/components/display-amount/index.js +1 -3
- package/dist/collection/components/input/index.js +1 -1
- package/dist/collection/components/input-month/index.js +8 -8
- package/dist/collection/components/input-month/style.css +0 -6
- package/dist/collection/components/picker/index.js +12 -17
- package/dist/collection/components/select/index.js +1 -1
- package/dist/collection/components/table/header/index.js +1 -1
- package/dist/custom-elements/index.js +943 -695
- package/dist/esm/{Trigger-c637fedf.js → Trigger-d7b181ec.js} +16 -0
- package/dist/esm/{generate-fc812e0f.js → generate-7090dc14.js} +3 -2
- package/dist/{smoothly/index-a7e44b28.js → esm/index-01fedb5b.js} +806 -638
- package/dist/esm/{index-046ba252.js → index-13251390.js} +89 -19
- package/dist/{smoothly/index-71e3ce99.js → esm/index-531e2f06.js} +16 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/smoothly-accordion_43.entry.js +917 -694
- package/dist/esm/smoothly-calendar.entry.js +7 -7
- package/dist/esm/smoothly-dialog.entry.js +1 -1
- package/dist/esm/smoothly-display-amount.entry.js +2 -4
- package/dist/esm/smoothly-display-demo.entry.js +1 -1
- package/dist/esm/smoothly-display.entry.js +1 -1
- package/dist/esm/smoothly-frame.entry.js +1 -1
- package/dist/esm/smoothly-input-date-range.entry.js +1 -1
- package/dist/esm/smoothly-input-date.entry.js +1 -1
- package/dist/esm/smoothly-input-month.entry.js +11 -11
- package/dist/esm/smoothly-input.entry.js +2 -2
- package/dist/esm/smoothly-picker.entry.js +12 -17
- package/dist/esm/smoothly-select.entry.js +1 -1
- package/dist/esm/smoothly-table-header.entry.js +1 -1
- package/dist/esm/smoothly-trigger-sink.entry.js +1 -1
- package/dist/esm/smoothly-trigger-source.entry.js +1 -1
- package/dist/smoothly/{generate-fc812e0f.js → generate-7090dc14.js} +3 -2
- package/dist/{esm/index-a7e44b28.js → smoothly/index-01fedb5b.js} +806 -638
- package/dist/smoothly/{index-046ba252.js → index-13251390.js} +89 -19
- package/dist/{esm/index-71e3ce99.js → smoothly/index-531e2f06.js} +16 -0
- package/dist/smoothly/index.esm.js +1 -1
- package/dist/smoothly/p-2cda1784.js +1 -0
- package/dist/smoothly/{p-24d838b1.entry.js → p-89fe12b0.entry.js} +1 -1
- package/dist/smoothly/p-c107b623.entry.js +1 -0
- package/dist/smoothly/{p-77f6d4bf.entry.js → p-e79800d9.entry.js} +1 -1
- package/dist/smoothly/smoothly-calendar.entry.js +7 -7
- package/dist/smoothly/smoothly-dialog.entry.js +1 -1
- package/dist/smoothly/smoothly-display-amount.entry.js +2 -4
- package/dist/smoothly/smoothly-display-demo.entry.js +1 -1
- package/dist/smoothly/smoothly-display.entry.js +1 -1
- package/dist/smoothly/smoothly-frame.entry.js +1 -1
- package/dist/smoothly/smoothly-input-date-range.entry.js +1 -1
- package/dist/smoothly/smoothly-input-date.entry.js +1 -1
- package/dist/smoothly/smoothly-input-month.entry.js +11 -11
- package/dist/smoothly/smoothly-input.entry.js +2 -2
- package/dist/smoothly/smoothly-picker.entry.js +12 -17
- package/dist/smoothly/smoothly-select.entry.js +1 -1
- package/dist/smoothly/smoothly-table-header.entry.js +1 -1
- package/dist/smoothly/smoothly-trigger-sink.entry.js +1 -1
- package/dist/smoothly/smoothly-trigger-source.entry.js +1 -1
- package/dist/types/components/input-month/index.d.ts +1 -1
- package/package.json +5 -5
- package/dist/smoothly/p-08ef34d4.js +0 -1
- package/dist/smoothly/p-bee6330e.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,c as t,h as o,a as r}from"./p-0906d4b2.js";import{M as e,T as i}from"./p-
|
|
1
|
+
import{r as s,c as t,h as o,a as r}from"./p-0906d4b2.js";import{M as e,T as i}from"./p-2cda1784.js";const n=class{constructor(o){s(this,o),this.trigger=t(this,"trigger",7),this.message=t(this,"message",7)}componentDidLoad(){e.listen(this.listen,((s,t)=>{i.is(t)?this.trigger.emit(t):this.message.emit({destination:s,content:t})}),window)}render(){return o("slot",null)}get element(){return r(this)}};n.style=".sc-smoothly-trigger-source-h{display:block}[hidden].sc-smoothly-trigger-source-h{display:none}";export{n as smoothly_trigger_source}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, i as createEvent, h, j as getElement } from './index-0dd5f791.js';
|
|
2
|
-
import { d as dist } from './index-
|
|
3
|
-
import { w as weekdays, m as month } from './generate-
|
|
2
|
+
import { d as dist } from './index-13251390.js';
|
|
3
|
+
import { w as weekdays, m as month } from './generate-7090dc14.js';
|
|
4
4
|
import './_commonjsHelpers-8fe71198.js';
|
|
5
5
|
|
|
6
|
-
const styleCss = ".sc-smoothly-calendar-h{display:block}.sc-smoothly-calendar-h>smoothly-input-month.sc-smoothly-calendar{width:calc(100% - 1em);padding
|
|
6
|
+
const styleCss = ".sc-smoothly-calendar-h{display:block;--other-month-opacity:0.5}.sc-smoothly-calendar-h>smoothly-input-month.sc-smoothly-calendar{width:calc(100% - 1em);padding:0.5em 0.5em 0 0.5em}th.sc-smoothly-calendar,td.sc-smoothly-calendar{text-align:center;padding:0.5em;min-width:2em;background-color:rgb(var(--smoothly-default-shade));cursor:pointer;user-select:none}td.currentMonth.sc-smoothly-calendar{color:rgb(var(--smoothly-default-contrast))}td.sc-smoothly-calendar:not(.currentMonth){color:rgba(var(--smoothly-default-contrast), var(--other-month-opacity))}td.sc-smoothly-calendar:nth-child(6):not(.currentMonth).selected,td.sc-smoothly-calendar:nth-child(6):not(.currentMonth).dateRange,td.sc-smoothly-calendar:nth-child(7):not(.currentMonth).selected,td.sc-smoothly-calendar:nth-child(7):not(.currentMonth).dateRange{color:rgba(var(--smoothly-default-contrast))}td.sc-smoothly-calendar:nth-child(6),td.sc-smoothly-calendar:nth-child(7){color:rgb(var(--smoothly-danger-tint))}td.sc-smoothly-calendar:nth-child(6):not(.currentMonth),td.sc-smoothly-calendar:nth-child(7):not(.currentMonth){color:rgba(var(--smoothly-danger-tint), var(--other-month-opacity))}td.sc-smoothly-calendar:not(.selected):hover{color:rgb(var(--smoothly-primary-contrast));background:rgb(var(--smoothly-primary-tint))}td.selected.sc-smoothly-calendar{color:rgb(var(--smoothly-primary-contrast));background:rgb(var(--smoothly-primary-color))}td.sc-smoothly-calendar:not(.selected,.dateRange).sc-smoothly-calendar:not(:hover).today{background:rgb(var(--smoothly-dark-tint));color:rgb(var(--smoothly-dark-contrast))}td.dateRange.sc-smoothly-calendar{color:rgb(var(--smoothly-primary-contrast));background:rgb(var(--smoothly-primary-tint))}";
|
|
7
7
|
|
|
8
8
|
const Calendar = class {
|
|
9
9
|
constructor(hostRef) {
|
|
@@ -28,7 +28,7 @@ const Calendar = class {
|
|
|
28
28
|
event.stopPropagation();
|
|
29
29
|
} }),
|
|
30
30
|
h("table", null, h("thead", null, h("tr", null, weekdays().map(day => (h("th", null, day))))), month((_b = this.month) !== null && _b !== void 0 ? _b : this.value).map(week => (h("tr", null, week.map(date => {
|
|
31
|
-
var _a, _b;
|
|
31
|
+
var _a, _b, _c;
|
|
32
32
|
return (h("td", { tabindex: 1, onClick: () => {
|
|
33
33
|
this.valueChanged.emit((this.value = date));
|
|
34
34
|
this.clickCounter += 1;
|
|
@@ -41,9 +41,9 @@ const Calendar = class {
|
|
|
41
41
|
this.start = date;
|
|
42
42
|
}
|
|
43
43
|
}, class: (date == this.value ? ["selected"] : [])
|
|
44
|
-
.concat(...(date == dist.Date.now() ? ["today"] : []),
|
|
45
|
-
? dist.Date.parse(date) >= dist.Date.parse((
|
|
46
|
-
dist.Date.parse(date) <= dist.Date.parse((
|
|
44
|
+
.concat(...(date == dist.Date.now() ? ["today"] : []), dist.Date.firstOfMonth((_a = this.month) !== null && _a !== void 0 ? _a : this.value) == dist.Date.firstOfMonth(date) ? ["currentMonth"] : [], this.doubleInput
|
|
45
|
+
? dist.Date.parse(date) >= dist.Date.parse((_b = this.start) !== null && _b !== void 0 ? _b : "") &&
|
|
46
|
+
dist.Date.parse(date) <= dist.Date.parse((_c = this.end) !== null && _c !== void 0 ? _c : "")
|
|
47
47
|
? ["dateRange"]
|
|
48
48
|
: []
|
|
49
49
|
: "")
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, k as Host } from './index-0dd5f791.js';
|
|
2
|
-
import { T as Trigger } from './index-
|
|
2
|
+
import { T as Trigger } from './index-531e2f06.js';
|
|
3
3
|
|
|
4
4
|
const styleCss = ".sc-smoothly-dialog-h{display:block;position:fixed;left:0;top:0;width:100%;height:100%;z-index:1;background:rgba(var(--smoothly-default-color), var(--smoothly-semitransparent)) !important}[hidden].sc-smoothly-dialog-h{display:none}.sc-smoothly-dialog-h>header.sc-smoothly-dialog{border-top-left-radius:8px;border-top-right-radius:8px;margin-top:2em;color:rgb(var(--smoothly-primary-contrast));background:rgb(var(--smoothly-primary-color));border-color:rgb(var(--smoothly-primary-color))}.sc-smoothly-dialog-h:not([header]) header.sc-smoothly-dialog{border:none}.sc-smoothly-dialog-h>*.sc-smoothly-dialog{position:relative;color:rgb(var(--smoothly-default-contrast));background-color:rgb(var(--smoothly-default-color));border-color:rgb(var(--smoothly-color));border-width:1px;border-style:solid;max-width:40em;width:calc(100vw - 4em - 2px);max-height:calc(100vh - 6em - 2px);height:auto;margin-left:auto;margin-right:auto;border-collapse:collapse}.sc-smoothly-dialog-h>main.sc-smoothly-dialog{border-bottom-left-radius:8px;border-bottom-right-radius:8px;margin-bottom:2em;border:1px solid rgb(var(--smoothly-default-contrast));box-sizing:border-box;overflow:hidden}.sc-smoothly-dialog-h:not([header]) main.sc-smoothly-dialog{border-radius:8px}.sc-smoothly-dialog-h>*.sc-smoothly-dialog>smoothly-trigger.sc-smoothly-dialog{position:absolute;right:-2em;top:-2em;z-index:1;border-color:transparent}.sc-smoothly-dialog-h>*.sc-smoothly-dialog>smoothly-trigger.sc-smoothly-dialog:hover{border-color:transparent}.sc-smoothly-dialog-h smoothly-icon.sc-smoothly-dialog{background-color:rgb(var(--smoothly-color));border-radius:50%}.sc-smoothly-dialog-h>*.sc-smoothly-dialog>*.sc-smoothly-dialog{margin:10px}";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance } from './index-0dd5f791.js';
|
|
2
|
-
import { d as dist } from './index-
|
|
2
|
+
import { d as dist } from './index-13251390.js';
|
|
3
3
|
import './_commonjsHelpers-8fe71198.js';
|
|
4
4
|
|
|
5
5
|
const styleCss = ".sc-smoothly-display-amount-h{display:block}[hidden].sc-smoothly-display-amount-h{display:none}";
|
|
@@ -11,9 +11,7 @@ const SmoothlyDisplayAmount = class {
|
|
|
11
11
|
format(amount) {
|
|
12
12
|
const digitsPerGroup = 3;
|
|
13
13
|
const defaultDecimals = 2;
|
|
14
|
-
const maxDecimals = (dist.Currency.decimalDigits(this.currency)
|
|
15
|
-
? dist.Currency.decimalDigits(this.currency)
|
|
16
|
-
: defaultDecimals);
|
|
14
|
+
const maxDecimals = (dist.Currency.decimalDigits(this.currency) ? dist.Currency.decimalDigits(this.currency) : defaultDecimals);
|
|
17
15
|
let beforeSeparator = amount.length;
|
|
18
16
|
let separator;
|
|
19
17
|
let result = amount;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-0dd5f791.js';
|
|
2
|
-
import { d as dist } from './index-
|
|
2
|
+
import { d as dist } from './index-01fedb5b.js';
|
|
3
3
|
import './_commonjsHelpers-8fe71198.js';
|
|
4
4
|
|
|
5
5
|
const styleCss = ".sc-smoothly-display-h{display:block}[hidden].sc-smoothly-display-h{display:none}";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, i as createEvent, h, j as getElement } from './index-0dd5f791.js';
|
|
2
|
-
import { M as Message, T as Trigger } from './index-
|
|
2
|
+
import { M as Message, T as Trigger } from './index-531e2f06.js';
|
|
3
3
|
|
|
4
4
|
const styleCss = ".sc-smoothly-frame-h{display:block;width:100%;height:100%}[hidden].sc-smoothly-frame-h{display:none}.sc-smoothly-frame-h>iframe.sc-smoothly-frame{border:none;padding:none;margin:none}";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, i as createEvent, h } from './index-0dd5f791.js';
|
|
2
|
-
import { d as dist } from './index-
|
|
2
|
+
import { d as dist } from './index-13251390.js';
|
|
3
3
|
import './_commonjsHelpers-8fe71198.js';
|
|
4
4
|
|
|
5
5
|
const styleCss = ".sc-smoothly-input-date-range-h{position:relative;display:block}.sc-smoothly-input-date-range-h>nav.sc-smoothly-input-date-range{position:absolute;z-index:10;top:3.5em;background-color:rgb(var(--smoothly-default-shade));max-width:22em}.sc-smoothly-input-date-range-h>div.sc-smoothly-input-date-range{position:fixed;width:100vw;height:100vh;z-index:2}.sc-smoothly-input-date-range-h>nav.sc-smoothly-input-date-range>.arrow.sc-smoothly-input-date-range{position:absolute;z-index:9;transform:translate(10em, -.55em) rotate(45deg);width:1em;height:1em;background-color:rgb(var(--smoothly-default-shade))}.sc-smoothly-input-date-range-h>section.sc-smoothly-input-date-range{display:flex;flex-direction:row;align-items:center}.sc-smoothly-input-date-range-h>smoothly-input.sc-smoothly-input-date-range{padding:0}";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, i as createEvent, h } from './index-0dd5f791.js';
|
|
2
|
-
import { d as dist } from './index-
|
|
2
|
+
import { d as dist } from './index-13251390.js';
|
|
3
3
|
import './_commonjsHelpers-8fe71198.js';
|
|
4
4
|
|
|
5
5
|
const styleCss = ".sc-smoothly-input-date-h{position:relative}nav.sc-smoothly-input-date{position:absolute;z-index:10;top:3.5em;background-color:rgb(var(--smoothly-default-shade));max-width:22em}.sc-smoothly-input-date-h>div.sc-smoothly-input-date{position:fixed;width:100vw;height:100vh;z-index:2}.sc-smoothly-input-date-h>nav.sc-smoothly-input-date>.arrow.sc-smoothly-input-date{position:absolute;z-index:9;transform:translate(2em, -.55em) rotate(45deg);width:1em;height:1em;background-color:rgb(var(--smoothly-default-shade))}";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, i as createEvent, h } from './index-0dd5f791.js';
|
|
2
|
-
import { d as dist } from './index-
|
|
3
|
-
import { y as years, a as months } from './generate-
|
|
2
|
+
import { d as dist } from './index-13251390.js';
|
|
3
|
+
import { y as years, a as months } from './generate-7090dc14.js';
|
|
4
4
|
import './_commonjsHelpers-8fe71198.js';
|
|
5
5
|
|
|
6
|
-
const styleCss = ".sc-smoothly-input-month-h{display:flex;justify-content:space-between;font-size:large}
|
|
6
|
+
const styleCss = ".sc-smoothly-input-month-h{display:flex;justify-content:space-between;font-size:large}smoothly-icon.sc-smoothly-input-month{font-size:smaller}";
|
|
7
7
|
|
|
8
8
|
const MonthSelector = class {
|
|
9
9
|
constructor(hostRef) {
|
|
@@ -13,21 +13,21 @@ const MonthSelector = class {
|
|
|
13
13
|
onValueChanged(next) {
|
|
14
14
|
this.valueChanged.emit(next);
|
|
15
15
|
}
|
|
16
|
+
adjustMonth(delta) {
|
|
17
|
+
var _a;
|
|
18
|
+
const date = dist.Date.parse((_a = this.value) !== null && _a !== void 0 ? _a : dist.Date.now());
|
|
19
|
+
date.setMonth(date.getMonth() + delta);
|
|
20
|
+
this.value = dist.Date.create(date);
|
|
21
|
+
}
|
|
16
22
|
render() {
|
|
17
23
|
var _a, _b;
|
|
18
24
|
return [
|
|
19
|
-
h("
|
|
25
|
+
h("div", { onClick: () => this.adjustMonth(-1) }, h("smoothly-icon", { name: "chevron-back-outline", size: "small" })),
|
|
20
26
|
h("smoothly-selector", { onSelected: (e) => (this.value = e.detail) }, years((_a = this.value) !== null && _a !== void 0 ? _a : dist.Date.now()).map(year => (h("smoothly-item", { value: year.date, selected: year.selected }, year.name)))),
|
|
21
27
|
h("smoothly-selector", { onSelected: (e) => (this.value = e.detail) }, months((_b = this.value) !== null && _b !== void 0 ? _b : dist.Date.now()).map(month => (h("smoothly-item", { value: month.date, selected: month.selected }, month.name)))),
|
|
22
|
-
h("
|
|
28
|
+
h("div", { onClick: () => this.adjustMonth(1) }, h("smoothly-icon", { name: "chevron-forward-outline", size: "small" })),
|
|
23
29
|
];
|
|
24
30
|
}
|
|
25
|
-
adjustMonth(delta) {
|
|
26
|
-
var _a;
|
|
27
|
-
const date = dist.Date.parse((_a = this.value) !== null && _a !== void 0 ? _a : dist.Date.now());
|
|
28
|
-
date.setMonth(date.getMonth() + delta);
|
|
29
|
-
this.value = dist.Date.create(date);
|
|
30
|
-
}
|
|
31
31
|
static get watchers() { return {
|
|
32
32
|
"value": ["onValueChanged"]
|
|
33
33
|
}; }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, i as createEvent, h, k as Host } from './index-0dd5f791.js';
|
|
2
|
-
import { d as dist } from './index-
|
|
2
|
+
import { d as dist } from './index-01fedb5b.js';
|
|
3
3
|
import './_commonjsHelpers-8fe71198.js';
|
|
4
4
|
|
|
5
5
|
const styleCss = ".sc-smoothly-input-h{display:block;position:relative}[hidden].sc-smoothly-input-h{display:none}label.sc-smoothly-input{position:absolute;left:0.4em;top:0.6em;color:rgb(var(--smoothly-text-tint));opacity:0.8;user-select:none;cursor:inherit;transition:font-size 0.1s;transition-timing-function:ease}input.sc-smoothly-input{padding:1em 0.2em 0.2em 0.2em;width:calc(100% - 0.4em);background:none;border:0;z-index:1;position:relative;font-size:1rem;font-family:var(--smoothly-font-family)}smoothly-icon.sc-smoothly-input{display:none;position:absolute;right:0.2em;top:0.6em}input.sc-smoothly-input:invalid+smoothly-icon.sc-smoothly-input{display:block}.has-value.sc-smoothly-input-h>label.sc-smoothly-input{top:0.3em;top:0.4em;font-size:60%;z-index:0}.sc-smoothly-input-h:focus-within>label.sc-smoothly-input{top:0.3em;top:0.4em;font-size:60%;z-index:0}input.sc-smoothly-input:focus{outline:none}input.sc-smoothly-input:-webkit-autofill,input.sc-smoothly-input:-webkit-autofill:hover,input.sc-smoothly-input:-webkit-autofill:focus,input.sc-smoothly-input:-webkit-autofill:active{box-shadow:0 0 0 30px unset inset !important;-webkit-box-shadow:0 0 0 30px unset inset !important}input.sc-smoothly-input:-webkit-autofill{-webkit-text-fill-color:unset !important}input.sc-smoothly-input:-internal-autofill-previewed,input.sc-smoothly-input:-internal-autofill-selected,textarea.sc-smoothly-input:-internal-autofill-previewed,textarea.sc-smoothly-input:-internal-autofill-selected,select.sc-smoothly-input:-internal-autofill-previewed,select.sc-smoothly-input:-internal-autofill-selected{background-color:none !important;background-image:none !important;color:unset !important}";
|
|
@@ -84,7 +84,7 @@ const SmoothlyInput = class {
|
|
|
84
84
|
end: backend.selectionEnd != undefined ? backend.selectionEnd : backend.value.length,
|
|
85
85
|
direction: backend.selectionDirection ? backend.selectionDirection : "none",
|
|
86
86
|
} });
|
|
87
|
-
if ((!(event.ctrlKey && event.key == "v") && event.key.length == 1) ||
|
|
87
|
+
if ((!((event.ctrlKey || event.metaKey) && event.key == "v") && event.key.length == 1) ||
|
|
88
88
|
event.key == "ArrowLeft" ||
|
|
89
89
|
event.key == "ArrowRight" ||
|
|
90
90
|
event.key == "Delete" ||
|
|
@@ -36,14 +36,11 @@ const SmoothlyPicker = class {
|
|
|
36
36
|
: this.select(option);
|
|
37
37
|
}
|
|
38
38
|
clearSelection() {
|
|
39
|
-
var _a;
|
|
40
39
|
this.selections = [];
|
|
41
40
|
this.inputElement.focus();
|
|
42
41
|
this.keepFocusOnReRender = true;
|
|
43
|
-
(_a = this.options) === null || _a === void 0 ? void 0 : _a.forEach(option => (option.description = ""));
|
|
44
42
|
}
|
|
45
43
|
unselect(selection) {
|
|
46
|
-
var _a;
|
|
47
44
|
const index = this.selections.map(selection => selection.value).indexOf(selection.value);
|
|
48
45
|
if (index != -1) {
|
|
49
46
|
this.selections = [
|
|
@@ -52,12 +49,8 @@ const SmoothlyPicker = class {
|
|
|
52
49
|
];
|
|
53
50
|
this.keepFocusOnReRender = true;
|
|
54
51
|
}
|
|
55
|
-
const optionIndex = (_a = this.options) === null || _a === void 0 ? void 0 : _a.map(s => s.value).indexOf(selection.value);
|
|
56
|
-
if (optionIndex != -1)
|
|
57
|
-
this.options[optionIndex].description = "";
|
|
58
52
|
}
|
|
59
53
|
select(selection) {
|
|
60
|
-
var _a;
|
|
61
54
|
const isNewSelection = this.selections.reduce((acc, current) => acc && current.value != selection.value, true);
|
|
62
55
|
if (isNewSelection)
|
|
63
56
|
this.selections = this.multiple ? [...this.selections, selection] : [selection];
|
|
@@ -65,8 +58,6 @@ const SmoothlyPicker = class {
|
|
|
65
58
|
this.filterOptions();
|
|
66
59
|
this.keepFocusOnReRender = true;
|
|
67
60
|
this.isOpen = this.multiple;
|
|
68
|
-
(_a = this.options) === null || _a === void 0 ? void 0 : _a.forEach(option => (option.description =
|
|
69
|
-
option.value == selection.value ? this.getCheckHtml() : this.multiple ? option.description : ""));
|
|
70
61
|
}
|
|
71
62
|
toggleHighlighted() {
|
|
72
63
|
var _a;
|
|
@@ -126,14 +117,18 @@ const SmoothlyPicker = class {
|
|
|
126
117
|
"--max-height": (_a = this.maxHeight) !== null && _a !== void 0 ? _a : "inherit",
|
|
127
118
|
"--label-display": this.labelSetting == "hide" ? "none" : "absolute",
|
|
128
119
|
};
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
120
|
+
this.options.forEach(o => {
|
|
121
|
+
o.description = this.selections.map(s => s.value).includes(o.value) ? this.getCheckHtml() : "";
|
|
122
|
+
});
|
|
123
|
+
const options = [
|
|
124
|
+
{
|
|
125
|
+
value: "select-none",
|
|
126
|
+
name: this.selectNoneName,
|
|
127
|
+
description: this.selections.length == 0 ? this.getCheckHtml() : "",
|
|
128
|
+
},
|
|
129
|
+
...((_b = this.options) !== null && _b !== void 0 ? _b : []),
|
|
130
|
+
];
|
|
131
|
+
return (h(Host, { style: cssVariables, "has-selection": this.selections.length > 0, "is-open": this.isOpen ? "" : undefined, onMouseDown: (e) => e.preventDefault(), onClick: () => this.onClick() }, h("div", null, h("label", null, this.label), h("input", { type: "text", ref: (el) => (this.inputElement = el ? el : this.inputElement), onFocus: () => this.highlightDefault(), onBlur: () => this.onBlur(), placeholder: this.selections.map(selection => selection.name).join(", "), onKeyDown: e => this.onKeyDown(e), onInput: (e) => this.onInput(e) })), h("smoothly-menu-options", { style: { width: "100%" }, optionStyle: Object.assign({ padding: "0 1em", height: "2.5em" }, this.optionStyle), order: false, emptyMenuLabel: this.emptyMenuLabel, "max-menu-height": this.maxMenuHeight, ref: (el) => (this.menuElement = el !== null && el !== void 0 ? el : this.menuElement), onClick: e => e.stopPropagation(), resetHighlightOnOptionsChange: false, options: options })));
|
|
137
132
|
}
|
|
138
133
|
get element() { return getElement(this); }
|
|
139
134
|
static get watchers() { return {
|
|
@@ -9,7 +9,7 @@ const SmoothlySelect = class {
|
|
|
9
9
|
}
|
|
10
10
|
optionSelected() {
|
|
11
11
|
if (this.selectElement)
|
|
12
|
-
this.selectionChanged.emit({ identifier: this.identifier, value: this.value = this.selectElement.value });
|
|
12
|
+
this.selectionChanged.emit({ identifier: this.identifier, value: (this.value = this.selectElement.value) });
|
|
13
13
|
}
|
|
14
14
|
componentDidLoad() {
|
|
15
15
|
var _a;
|
|
@@ -10,7 +10,7 @@ const TableHeader = class {
|
|
|
10
10
|
onClick(event) {
|
|
11
11
|
this.sort.emit({
|
|
12
12
|
property: this.name,
|
|
13
|
-
direction: this.sortDirection = this.sortDirection == "ascending" ? "descending" : "ascending",
|
|
13
|
+
direction: (this.sortDirection = this.sortDirection == "ascending" ? "descending" : "ascending"),
|
|
14
14
|
});
|
|
15
15
|
console.log("sort", this.name, this.sortDirection);
|
|
16
16
|
event.preventDefault();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-0dd5f791.js';
|
|
2
|
-
import { T as Trigger, M as Message } from './index-
|
|
2
|
+
import { T as Trigger, M as Message } from './index-531e2f06.js';
|
|
3
3
|
|
|
4
4
|
const styleCss = ".sc-smoothly-trigger-sink-h{display:block}[hidden].sc-smoothly-trigger-sink-h{display:none}";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, i as createEvent, h, j as getElement } from './index-0dd5f791.js';
|
|
2
|
-
import { M as Message, T as Trigger } from './index-
|
|
2
|
+
import { M as Message, T as Trigger } from './index-531e2f06.js';
|
|
3
3
|
|
|
4
4
|
const styleCss = ".sc-smoothly-trigger-source-h{display:block}[hidden].sc-smoothly-trigger-source-h{display:none}";
|
|
5
5
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "smoothly",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.71",
|
|
4
4
|
"description": "Web component library written in Stencil.",
|
|
5
5
|
"author": "PayFunc",
|
|
6
6
|
"license": "MIT",
|
|
@@ -62,11 +62,11 @@
|
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"authly": "0.2.4",
|
|
65
|
-
"isoly": "0.0.
|
|
65
|
+
"isoly": "0.0.34",
|
|
66
66
|
"langly": "0.0.11",
|
|
67
67
|
"normalize.css": "^8.0.1",
|
|
68
68
|
"stencil-router-v2": "^0.6.0",
|
|
69
|
-
"tidily": "0.0.
|
|
69
|
+
"tidily": "0.0.44"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@stencil/core": "^2.5.2",
|
|
@@ -77,13 +77,13 @@
|
|
|
77
77
|
"@typescript-eslint/eslint-plugin": "^4.23.0",
|
|
78
78
|
"@typescript-eslint/parser": "^4.23.0",
|
|
79
79
|
"eslint": "^7.26.0",
|
|
80
|
-
"eslint-plugin-prettierx": "github:
|
|
80
|
+
"eslint-plugin-prettierx": "github:robinnedergard/eslint-plugin-prettierx#master",
|
|
81
81
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
|
82
82
|
"jest": "26.6.3",
|
|
83
83
|
"jest-cli": "26.6.3",
|
|
84
84
|
"prettier": "^1.19.1",
|
|
85
85
|
"prettier-stylelint": "^0.4.2",
|
|
86
|
-
"prettierx": "github:
|
|
86
|
+
"prettierx": "github:robinnedergard/prettierx#newline-before-clause-sync",
|
|
87
87
|
"puppeteer": "9.1.1",
|
|
88
88
|
"stylelint-prettier": "^1.2.0",
|
|
89
89
|
"stylelint-scss": "^3.19.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
class n{constructor(){this.encoding="utf-8"}encode(n){return Uint8Array.from(unescape(encodeURIComponent(n)).split(""),(n=>n.charCodeAt(0)))}}const t={standard:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",url:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function r(r,e="standard",i=""){"string"==typeof r&&(r=(new n).encode(r));const o=t[e],c=[];for(let n=0;n<r.length;n+=3){const t=r[n],e=n+1<r.length?r[n+1]:0,i=n+2<r.length?r[n+2]:0;c.push(o[t>>>2]),c.push(o[(3&t)<<4|e>>>4]),c.push(o[(15&e)<<2|i>>>6]),c.push(o[63&i])}const s=Math.ceil(r.length/3*4);return c.join("").substr(0,s)+i.repeat(c.length-s)}function e(n,r="standard"){for(;n.endsWith("=")&&n.length>0;)n=n.substr(0,n.length-1);const e=t[r],i=n.split("").map((n=>e.indexOf(n))),o=new Uint8Array(Math.floor(i.length/4*3));for(let n=0;n<o.length;n+=3){const t=i.shift()||0,r=i.shift()||0,e=i.shift()||0,c=i.shift()||0;o[n]=t<<2|r>>>4,o[n+1]=(15&r)<<4|e>>>2,o[n+2]=(3&e)<<6|c}return o}const i="undefined"!=typeof window?window.crypto||window.msCrypto:self.crypto||self.msCrypto;var o,c;!function(n){n.is=function(n){return"object"==typeof n&&(null==n.key||"string"==typeof n.key)&&"string"==typeof n.value&&"string"==typeof n.salt},n.stringify=function(n){return n.key=n.key&&4!=n.key.length?n.key.slice(-2):n.key,[n.key,n.salt,n.value].join(".")},n.parse=function(t){const r=t.split("."),e={key:r[0],salt:r[1],value:r[2]};return n.is(e)?e:void 0}}(o||(o={})),function(n){function t(n){return r(n,"url")}n.is=function(n,t){return"string"==typeof n&&(null==t||n.length==t)&&Array.from(n).every((n=>n>="0"&&n<="9"||n>="A"&&n<="Z"||n>="a"&&n<="z"||"-"==n||"_"==n))},n.fromBinary=t,n.toBinary=function(n){return e(n,"url")},n.generate=function(n){return t(i.getRandomValues(new Uint8Array(n/4*3)))},n.fromHexadecimal=function(n){n.length%2==1&&(n+="0");const r=new Uint8Array(n.length/2);for(let t=0;t<r.length;t++)r[t]=16*Number.parseInt(n[2*t],16)+Number.parseInt(n[2*t+1],16);return t(r)},n.toHexadecimal=function(n,t){const r=e(n,"url");let i=[];for(const n of r)i.push(Math.floor(n/16).toString(16),(n%16).toString(16));return t&&(i=i.slice(0,t)),i.join("")},n.length=[4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128],(n.Length||(n.Length={})).is=function(n){return"number"==typeof n&&n>=4&&n<=128&&(252&n)==n}}(c||(c={}));var s,u,f,a=function(n,t,r,e){return new(r||(r=Promise))((function(i,o){function c(n){try{u(e.next(n))}catch(n){o(n)}}function s(n){try{u(e.throw(n))}catch(n){o(n)}}function u(n){var t;n.done?i(n.value):(t=n.value,t instanceof r?t:new r((function(n){n(t)}))).then(c,s)}u((e=e.apply(n,t||[])).next())}))};!function(n){n.is=function(n){return"string"==typeof n||"object"==typeof n&&"string"==typeof n.hash&&"string"==typeof n.salt},n.hash=function(n,t,e){return a(this,void 0,void 0,(function*(){return e||(e=r(i.getRandomValues(new Uint8Array(64)))),{hash:yield n.sign(e+t),salt:e}}))},n.verify=function(t,r,e){return a(this,void 0,void 0,(function*(){return(yield n.hash(t,e,r.salt)).hash==r.hash}))},(n.Hashed||(n.Hashed={})).is=function(n){return"object"==typeof n&&"string"==typeof n.hash&&"string"==typeof n.salt}}(s||(s={})),function(n){n.generate=function(n){return i.getRandomValues(n)}}(u||(u={})),(f||(f={})).is=function(n){return"HMAC"==n||"RSA"==n||"ECDSA"==n||"RSA-PSS"==n};class S{sign(t){return e=this,i=void 0,c=function*(){return"string"==typeof t?r(yield this.signBinary((new n).encode(t)),"url"):this.signBinary(t)},new((o=void 0)||(o=Promise))((function(n,t){function r(n){try{u(c.next(n))}catch(n){t(n)}}function s(n){try{u(c.throw(n))}catch(n){t(n)}}function u(t){var e;t.done?n(t.value):(e=t.value,e instanceof o?e:new o((function(n){n(e)}))).then(r,s)}u((c=c.apply(e,i||[])).next())}));var e,i,o,c}verify(t,r){return"string"==typeof r&&(r=e(r,"url")),this.verifyBinary("string"==typeof t?(new n).encode(t):t,r)}}var y,h=function(n,t,r,e){return new(r||(r=Promise))((function(i,o){function c(n){try{u(e.next(n))}catch(n){o(n)}}function s(n){try{u(e.throw(n))}catch(n){o(n)}}function u(n){var t;n.done?i(n.value):(t=n.value,t instanceof r?t:new r((function(n){n(t)}))).then(c,s)}u((e=e.apply(n,t||[])).next())}))};class A extends S{constructor(n,t,r){super(),this.hash=n,t&&("string"==typeof t&&(t=e(t)),this.publicKey=i.subtle.importKey("spki",t,{name:"ECDSA",namedCurve:"P-512"==n.replace("SHA","P")?"P-521":n.replace("SHA","P")},!1,["verify"])),r&&("string"==typeof r&&(r=e(r)),this.privateKey=i.subtle.importKey("pkcs8",r,{name:"ECDSA",namedCurve:"P-512"==n.replace("SHA","P")?"P-521":n.replace("SHA","P")},!0,["sign","verify"]))}signBinary(n){return h(this,void 0,void 0,(function*(){return new Uint8Array(yield i.subtle.sign({name:"ECDSA",hash:{name:this.hash}},yield this.privateKey,n))}))}verifyBinary(n,t){return h(this,void 0,void 0,(function*(){return i.subtle.verify({name:"ECDSA",hash:{name:this.hash}},yield this.publicKey,t,n)}))}}!function(n){n.is=function(n){return"SHA-1"==n||"SHA-256"==n||"SHA-384"==n||"SHA-512"==n}}(y||(y={}));class l extends S{verifyBinary(n,t){return e=this,i=void 0,c=function*(){return r(yield this.signBinary(n),"url")==r(t,"url")},new((o=void 0)||(o=Promise))((function(n,t){function r(n){try{u(c.next(n))}catch(n){t(n)}}function s(n){try{u(c.throw(n))}catch(n){t(n)}}function u(t){var e;t.done?n(t.value):(e=t.value,e instanceof o?e:new o((function(n){n(e)}))).then(r,s)}u((c=c.apply(e,i||[])).next())}));var e,i,o,c}}class d extends l{constructor(n,t){super(),this.hash=n,"string"==typeof t&&(t=e(t,"url")),this.key=i.subtle.importKey("raw",t,{name:"HMAC",hash:{name:n}},!1,["sign","verify"])}signBinary(n){return t=this,r=void 0,o=function*(){return new Uint8Array(yield i.subtle.sign("HMAC",yield this.key,n))},new((e=void 0)||(e=Promise))((function(n,i){function c(n){try{u(o.next(n))}catch(n){i(n)}}function s(n){try{u(o.throw(n))}catch(n){i(n)}}function u(t){var r;t.done?n(t.value):(r=t.value,r instanceof e?r:new e((function(n){n(r)}))).then(c,s)}u((o=o.apply(t,r||[])).next())}));var t,r,e,o}}class v extends l{signBinary(n){return Promise.resolve(new Uint8Array(0))}}var p=function(n,t,r,e){return new(r||(r=Promise))((function(i,o){function c(n){try{u(e.next(n))}catch(n){o(n)}}function s(n){try{u(e.throw(n))}catch(n){o(n)}}function u(n){var t;n.done?i(n.value):(t=n.value,t instanceof r?t:new r((function(n){n(t)}))).then(c,s)}u((e=e.apply(n,t||[])).next())}))};class w extends S{constructor(n,t,r){super(),this.hash=n,t&&("string"==typeof t&&(t=e(t)),this.publicKey=i.subtle.importKey("spki",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:n}},!1,["verify"])),r&&("string"==typeof r&&(r=e(r)),this.privateKey=i.subtle.importKey("pkcs8",r,{name:"RSASSA-PKCS1-v1_5",hash:{name:n}},!0,["sign"]))}signBinary(n){return p(this,void 0,void 0,(function*(){return new Uint8Array(yield i.subtle.sign("RSASSA-PKCS1-v1_5",yield this.privateKey,n))}))}verifyBinary(n,t){return p(this,void 0,void 0,(function*(){return i.subtle.verify("RSASSA-PKCS1-v1_5",yield this.publicKey,t,n)}))}}var g,P,H,m,R,b,E,k,C,U=function(n,t,r,e){return new(r||(r=Promise))((function(i,o){function c(n){try{u(e.next(n))}catch(n){o(n)}}function s(n){try{u(e.throw(n))}catch(n){o(n)}}function u(n){var t;n.done?i(n.value):(t=n.value,t instanceof r?t:new r((function(n){n(t)}))).then(c,s)}u((e=e.apply(n,t||[])).next())}))};class j extends S{constructor(n,t,r){super(),this.hash=n,t&&("string"==typeof t&&(t=e(t)),this.publicKey=i.subtle.importKey("spki",t,{name:"RSA-PSS",hash:{name:n}},!1,["verify"])),r&&("string"==typeof r&&(r=e(r)),this.privateKey=i.subtle.importKey("pkcs8",r,{name:"RSA-PSS",hash:{name:n}},!0,["sign","verify"]))}signBinary(n){return U(this,void 0,void 0,(function*(){return new Uint8Array(yield i.subtle.sign({name:"RSA-PSS",saltLength:128},yield this.privateKey,n))}))}verifyBinary(n,t){return U(this,void 0,void 0,(function*(){return i.subtle.verify({name:"RSA-PSS",saltLength:128},yield this.publicKey,t,n)}))}}!function(n){!function(n){n.is=f.is}(n.Algorithm||(n.Algorithm={})),(n.Hash||(n.Hash={})).is=y.is,n.create=function(n,t,...r){let e;switch(n){case"HMAC":null!=t&&(e=new d(t,r[0]));break;case"RSA":null!=t&&(e=new w(t,r[0],r[1]));break;case"RSA-PSS":null!=t&&(e=new j(t,r[0],r[1]));break;case"ECDSA":null!=t&&(e=new A(t,r[0],r[1]));break;case"None":e=new v}return e}}(g||(g={})),Uint8Array.__proto__.from||(Uint8Array.__proto__.from=function(n,t,r){const e=Uint8Array.__proto__;if("function"!=typeof this)throw new TypeError("# is not a constructor");if(this.__proto__!==e)throw new TypeError("this is not a typed array.");if("function"!=typeof(t=t||(n=>n)))throw new TypeError("specified argument is not a function");if(!(n=Object(n)).length)return new this(0);let i=[];for(const n of i)i.push(n);i=i.map(t,r);const o=new this(i.length);for(let n=0;n<o.length;n++)o[n]=i[n];return o}),function(n){n.is=function(n){return"object"==typeof n&&Object.entries(n).every((n=>"function"==typeof n))}}(P||(P={})),function(n){n.is=function(n){return Array.isArray(n)&&n.every((n=>"string"==typeof n))}}(H||(H={})),function(n){n.is=function(n){return"object"==typeof n&&Object.entries(n).every((n=>"string"==typeof n[1]))}}(m||(m={})),function(n){n.is=function(n){return H.is(n)||P.is(n)||m.is(n)},(n.Converter||(n.Converter={})).is=P.is,(n.Crypto||(n.Crypto={})).is=H.is,(n.Renamer||(n.Renamer={})).is=m.is}(R||(R={})),function(n){n.is=function(n){return"object"==typeof n&&"function"==typeof n.apply&&"function"==typeof n.reverse},n.create=function(n){return{apply:n.apply?n.apply:n=>n,reverse:n.reverse?n.reverse:n=>n}}}(b||(b={})),function(n){n.is=function(n){return"RS256"==n||"RS384"==n||"RS512"==n||"ES256"==n||"ES384"==n||"ES512"==n||"PS256"==n||"PS384"==n||"PS512"==n}}(E||(E={})),function(n){n.is=function(n){return"HS256"==n||"HS384"==n||"HS512"==n}}(k||(k={})),function(n){n.is=function(n){return"none"==n||k.is(n)||E.is(n)},function(n){n.is=k.is}(n.Symmetric||(n.Symmetric={})),(n.Asymmetric||(n.Asymmetric={})).is=E.is}(C||(C={}));var M;class B{constructor(n,t){this.name=n,this.signer=t}sign(n){return t=this,r=void 0,i=function*(){return this.signer.sign(n)},new((e=void 0)||(e=Promise))((function(n,o){function c(n){try{u(i.next(n))}catch(n){o(n)}}function s(n){try{u(i.throw(n))}catch(n){o(n)}}function u(t){var r;t.done?n(t.value):(r=t.value,r instanceof e?r:new e((function(n){n(r)}))).then(c,s)}u((i=i.apply(t,r||[])).next())}));var t,r,e,i}verify(n,t){return this.signer.verify(n,t)}static create(n,...t){let r;switch(n){case"ES256":r=g.create("ECDSA","SHA-256",t[0],t[1]);break;case"ES384":r=g.create("ECDSA","SHA-384",t[0],t[1]);break;case"ES512":r=g.create("ECDSA","SHA-512",t[0],t[1]);break;case"PS256":r=g.create("RSA-PSS","SHA-256",t[0],t[1]);break;case"PS384":r=g.create("RSA-PSS","SHA-384",t[0],t[1]);break;case"PS512":r=g.create("RSA-PSS","SHA-512",t[0],t[1]);break;case"HS256":r=g.create("HMAC","SHA-256",t[0]);break;case"HS384":r=g.create("HMAC","SHA-384",t[0]);break;case"HS512":r=g.create("HMAC","SHA-512",t[0]);break;case"RS256":r=g.create("RSA","SHA-256",t[0],t[1]);break;case"RS384":r=g.create("RSA","SHA-384",t[0],t[1]);break;case"RS512":r=g.create("RSA","SHA-512",t[0],t[1]);break;case"none":r=g.create("None")}return r&&new B(n,r)}static none(){return B.create("none")}static HS256(n){return B.create("HS256",n)}static HS384(n){return B.create("HS384",n)}static HS512(n){return B.create("HS512",n)}static RS256(n,t){return B.create("RS256",n,t)}static RS384(n,t){return B.create("RS384",n,t)}static RS512(n,t){return B.create("RS512",n,t)}static ES256(n,t){return B.create("ES256",n,t)}static ES384(n,t){return B.create("ES384",n,t)}static ES512(n,t){return B.create("ES512",n,t)}static PS256(n,t){return B.create("PS256",n,t)}static PS384(n,t){return B.create("PS384",n,t)}static PS512(n,t){return B.create("PS512",n,t)}}!function(n){var t;(t=n.Name||(n.Name={})).is=C.is,function(n){n.is=C.Symmetric.is}(t.Symmetric||(t.Symmetric={})),function(n){n.is=C.Asymmetric.is}(t.Asymmetric||(t.Asymmetric={}))}(B||(B={})),function(n){n.is=function(n){return"string"==typeof n&&/^[A-Za-z0-9-_=]+\.[A-Za-z0-9-_=]+\.?[A-Za-z0-9-_.+/=]*$/.test(n)}}(M||(M={}));class D{static is(n){return"object"==typeof n&&"string"==typeof n.destination&&null!=n.content}static send(n,t,r){if(D.is(n)&&null==r){(r=t)||(r=window);const e=n.destination.split("#",2);r.postMessage(n={destination:e[1],content:n.content},e[0])}else"string"!=typeof r&&(r||(r=window),"string"==typeof n&&D.send({destination:n,content:t},r))}static listen(n,t,r){const e=n.split("#",2);let i="";2==e.length&&(n=e[0],i=e[1]),(r||window).addEventListener("message",(r=>{const e=r.data;!D.is(e)||"*"!=n&&r.origin!=n||""!=i&&e.destination!=i||t(e.destination,e.content)}))}}class x{static is(n){return"object"==typeof n&&"string"==typeof n.name}}export{c as I,D as M,x as T}
|