smoothly 0.1.66 → 0.1.70
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-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 +120 -54
- 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 +1 -1
- package/dist/cjs/smoothly-display-demo.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 +1 -1
- package/dist/cjs/smoothly-picker.cjs.entry.js +12 -17
- package/dist/cjs/smoothly-table-expandable-cell.cjs.entry.js +2 -2
- 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/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/table/exandable/cell/index.js +3 -2
- package/dist/collection/components/table/exandable/cell/style.css +1 -1
- package/dist/custom-elements/index.js +136 -54
- package/dist/esm/{Trigger-c637fedf.js → Trigger-d7b181ec.js} +16 -0
- package/dist/esm/{generate-fc812e0f.js → generate-7090dc14.js} +3 -2
- 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 +120 -54
- 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 +1 -1
- package/dist/esm/smoothly-display-demo.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 +1 -1
- package/dist/esm/smoothly-picker.entry.js +12 -17
- package/dist/esm/smoothly-table-expandable-cell.entry.js +2 -2
- 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/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-2e35abfc.entry.js +1 -0
- package/dist/smoothly/{p-24d838b1.entry.js → p-89fe12b0.entry.js} +1 -1
- 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 +1 -1
- package/dist/smoothly/smoothly-display-demo.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 +1 -1
- package/dist/smoothly/smoothly-picker.entry.js +12 -17
- package/dist/smoothly/smoothly-table-expandable-cell.entry.js +2 -2
- 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 +2 -2
- package/dist/smoothly/p-08ef34d4.js +0 -1
- package/dist/smoothly/p-8ff541af.entry.js +0 -1
|
@@ -851,6 +851,22 @@ var Identifier;
|
|
|
851
851
|
Array.from(value).every(c => (c >= "0" && c <= "9") || (c >= "A" && c <= "Z") || (c >= "a" && c <= "z") || c == "-" || c == "_"));
|
|
852
852
|
}
|
|
853
853
|
Identifier.is = is;
|
|
854
|
+
function fromUint24(value) {
|
|
855
|
+
return fromHexadecimal(value.toString(16).padStart(6, "0"));
|
|
856
|
+
}
|
|
857
|
+
Identifier.fromUint24 = fromUint24;
|
|
858
|
+
function toUint24(identifier) {
|
|
859
|
+
return Number.parseInt(toHexadecimal(identifier, 6), 16);
|
|
860
|
+
}
|
|
861
|
+
Identifier.toUint24 = toUint24;
|
|
862
|
+
function fromUint48(value) {
|
|
863
|
+
return fromHexadecimal(value.toString(16).padStart(12, "0"));
|
|
864
|
+
}
|
|
865
|
+
Identifier.fromUint48 = fromUint48;
|
|
866
|
+
function toUint48(identifier) {
|
|
867
|
+
return Number.parseInt(toHexadecimal(identifier, 12), 16);
|
|
868
|
+
}
|
|
869
|
+
Identifier.toUint48 = toUint48;
|
|
854
870
|
function fromBinary(identifier) {
|
|
855
871
|
return encode$1(identifier, "url");
|
|
856
872
|
}
|
|
@@ -18986,28 +19002,28 @@ const CurrencyCode$2 = /*@__PURE__*/getDefaultExportFromCjs(CurrencyCode_1$2);
|
|
|
18986
19002
|
var _Date$2 = createCommonjsModule(function (module, exports) {
|
|
18987
19003
|
"use strict";
|
|
18988
19004
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18989
|
-
exports.
|
|
18990
|
-
var
|
|
18991
|
-
(function (
|
|
19005
|
+
exports.Date = void 0;
|
|
19006
|
+
var Date;
|
|
19007
|
+
(function (Date) {
|
|
18992
19008
|
function is(value) {
|
|
18993
19009
|
return (typeof value == "string" && /^(\d{4}-[01]\d-[0-3]\d)|(\d{4}-[01]\d-[0-3]\d)|(\d{4}-[01]\d-[0-3]\d)$/.test(value));
|
|
18994
19010
|
}
|
|
18995
|
-
|
|
19011
|
+
Date.is = is;
|
|
18996
19012
|
function parse(value, time) {
|
|
18997
|
-
return new Date(value + (time !== null && time !== void 0 ? time : "T12:00:00.000Z"));
|
|
19013
|
+
return new globalThis.Date(value + (time !== null && time !== void 0 ? time : "T12:00:00.000Z"));
|
|
18998
19014
|
}
|
|
18999
|
-
|
|
19015
|
+
Date.parse = parse;
|
|
19000
19016
|
function create(value) {
|
|
19001
19017
|
return value.toISOString().substring(0, 10);
|
|
19002
19018
|
}
|
|
19003
|
-
|
|
19019
|
+
Date.create = create;
|
|
19004
19020
|
function now() {
|
|
19005
|
-
return create(new Date());
|
|
19021
|
+
return create(new globalThis.Date());
|
|
19006
19022
|
}
|
|
19007
|
-
|
|
19023
|
+
Date.now = now;
|
|
19008
19024
|
function localize(value, locale) {
|
|
19009
|
-
|
|
19010
|
-
|
|
19025
|
+
return (is(value) ? parse(value) : value)
|
|
19026
|
+
.toLocaleString(locale ? locale : Intl.DateTimeFormat().resolvedOptions().locale, {
|
|
19011
19027
|
year: "numeric",
|
|
19012
19028
|
month: "2-digit",
|
|
19013
19029
|
day: "2-digit",
|
|
@@ -19015,11 +19031,82 @@ var IsoDate;
|
|
|
19015
19031
|
minute: "2-digit",
|
|
19016
19032
|
second: "2-digit",
|
|
19017
19033
|
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
19018
|
-
}
|
|
19019
|
-
|
|
19034
|
+
})
|
|
19035
|
+
.substring(0, 10);
|
|
19020
19036
|
}
|
|
19021
|
-
|
|
19022
|
-
|
|
19037
|
+
Date.localize = localize;
|
|
19038
|
+
function next(date, days = 1) {
|
|
19039
|
+
let result;
|
|
19040
|
+
if (typeof days == "number") {
|
|
19041
|
+
const r = parse(date);
|
|
19042
|
+
r.setDate(r.getDate() + days);
|
|
19043
|
+
result = Date.create(r);
|
|
19044
|
+
}
|
|
19045
|
+
else {
|
|
19046
|
+
result = date;
|
|
19047
|
+
if (days.years)
|
|
19048
|
+
result = nextYear(result, days.years);
|
|
19049
|
+
if (days.months)
|
|
19050
|
+
result = nextMonth(result, days.months);
|
|
19051
|
+
if (days.days)
|
|
19052
|
+
result = next(result, days.days);
|
|
19053
|
+
}
|
|
19054
|
+
return result;
|
|
19055
|
+
}
|
|
19056
|
+
Date.next = next;
|
|
19057
|
+
function previous(date, days = 1) {
|
|
19058
|
+
let result;
|
|
19059
|
+
if (typeof days == "number") {
|
|
19060
|
+
const r = parse(date);
|
|
19061
|
+
r.setDate(r.getDate() - days);
|
|
19062
|
+
result = Date.create(r);
|
|
19063
|
+
}
|
|
19064
|
+
else {
|
|
19065
|
+
result = date;
|
|
19066
|
+
if (days.years)
|
|
19067
|
+
result = previousYear(result, days.years);
|
|
19068
|
+
if (days.months)
|
|
19069
|
+
result = previousMonth(result, days.months);
|
|
19070
|
+
if (days.days)
|
|
19071
|
+
result = previous(result, days.days);
|
|
19072
|
+
}
|
|
19073
|
+
return result;
|
|
19074
|
+
}
|
|
19075
|
+
Date.previous = previous;
|
|
19076
|
+
function nextMonth(date, months = 1) {
|
|
19077
|
+
const result = parse(date);
|
|
19078
|
+
result.setMonth(result.getMonth() + months);
|
|
19079
|
+
return Date.create(result);
|
|
19080
|
+
}
|
|
19081
|
+
Date.nextMonth = nextMonth;
|
|
19082
|
+
function previousMonth(date, months = 1) {
|
|
19083
|
+
return nextMonth(date, -months);
|
|
19084
|
+
}
|
|
19085
|
+
Date.previousMonth = previousMonth;
|
|
19086
|
+
function nextYear(date, years = 1) {
|
|
19087
|
+
const result = parse(date);
|
|
19088
|
+
result.setFullYear(result.getFullYear() + years);
|
|
19089
|
+
return Date.create(result);
|
|
19090
|
+
}
|
|
19091
|
+
Date.nextYear = nextYear;
|
|
19092
|
+
function previousYear(date, years = 1) {
|
|
19093
|
+
return nextYear(date, -years);
|
|
19094
|
+
}
|
|
19095
|
+
Date.previousYear = previousYear;
|
|
19096
|
+
function firstOfMonth(date) {
|
|
19097
|
+
const result = parse(date);
|
|
19098
|
+
result.setDate(1);
|
|
19099
|
+
return Date.create(result);
|
|
19100
|
+
}
|
|
19101
|
+
Date.firstOfMonth = firstOfMonth;
|
|
19102
|
+
function lastOfMonth(date) {
|
|
19103
|
+
const result = parse(date);
|
|
19104
|
+
result.setMonth(result.getMonth() + 1);
|
|
19105
|
+
result.setDate(-1);
|
|
19106
|
+
return Date.create(result);
|
|
19107
|
+
}
|
|
19108
|
+
Date.lastOfMonth = lastOfMonth;
|
|
19109
|
+
})(Date = exports.Date || (exports.Date = {}));
|
|
19023
19110
|
//# sourceMappingURL=Date.js.map
|
|
19024
19111
|
});
|
|
19025
19112
|
|
|
@@ -19050,7 +19137,7 @@ var DateTime;
|
|
|
19050
19137
|
DateTime.now = now;
|
|
19051
19138
|
function localize(value, locale) {
|
|
19052
19139
|
const localeString = locale ? locale : Intl.DateTimeFormat().resolvedOptions().locale;
|
|
19053
|
-
|
|
19140
|
+
return (is(value) ? parse(value) : value).toLocaleString(localeString, {
|
|
19054
19141
|
year: "numeric",
|
|
19055
19142
|
month: "2-digit",
|
|
19056
19143
|
day: "2-digit",
|
|
@@ -19058,8 +19145,7 @@ var DateTime;
|
|
|
19058
19145
|
minute: "2-digit",
|
|
19059
19146
|
second: "2-digit",
|
|
19060
19147
|
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
19061
|
-
};
|
|
19062
|
-
return (is(value) ? parse(value) : value).toLocaleString(localeString, localeOptions);
|
|
19148
|
+
});
|
|
19063
19149
|
}
|
|
19064
19150
|
DateTime.localize = localize;
|
|
19065
19151
|
})(DateTime = exports.DateTime || (exports.DateTime = {}));
|
|
@@ -20834,7 +20920,7 @@ Object.defineProperty(exports, "Currency", { enumerable: true, get: function ()
|
|
|
20834
20920
|
|
|
20835
20921
|
Object.defineProperty(exports, "CurrencyCode", { enumerable: true, get: function () { return CurrencyCode_1$2.CurrencyCode; } });
|
|
20836
20922
|
|
|
20837
|
-
Object.defineProperty(exports, "Date", { enumerable: true, get: function () { return _Date$2.
|
|
20923
|
+
Object.defineProperty(exports, "Date", { enumerable: true, get: function () { return _Date$2.Date; } });
|
|
20838
20924
|
|
|
20839
20925
|
Object.defineProperty(exports, "DateTime", { enumerable: true, get: function () { return DateTime_1$2.DateTime; } });
|
|
20840
20926
|
|
|
@@ -20860,7 +20946,8 @@ function month(date) {
|
|
|
20860
20946
|
d.setDate(day++);
|
|
20861
20947
|
r.push(dist$4.Date.create(d));
|
|
20862
20948
|
}
|
|
20863
|
-
|
|
20949
|
+
if (row < 5 || dist$4.Date.firstOfMonth(r[0]) == dist$4.Date.firstOfMonth(date))
|
|
20950
|
+
result.push(r);
|
|
20864
20951
|
}
|
|
20865
20952
|
return result;
|
|
20866
20953
|
}
|
|
@@ -20905,7 +20992,7 @@ function years(current) {
|
|
|
20905
20992
|
return result;
|
|
20906
20993
|
}
|
|
20907
20994
|
|
|
20908
|
-
const styleCss$B = ".sc-smoothly-calendar-h{display:block}.sc-smoothly-calendar-h>smoothly-input-month.sc-smoothly-calendar{width:calc(100% - 1em);padding
|
|
20995
|
+
const styleCss$B = ".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))}";
|
|
20909
20996
|
|
|
20910
20997
|
const Calendar = class extends HTMLElement {
|
|
20911
20998
|
constructor() {
|
|
@@ -20931,7 +21018,7 @@ const Calendar = class extends HTMLElement {
|
|
|
20931
21018
|
event.stopPropagation();
|
|
20932
21019
|
} }),
|
|
20933
21020
|
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 => {
|
|
20934
|
-
var _a, _b;
|
|
21021
|
+
var _a, _b, _c;
|
|
20935
21022
|
return (h("td", { tabindex: 1, onClick: () => {
|
|
20936
21023
|
this.valueChanged.emit((this.value = date));
|
|
20937
21024
|
this.clickCounter += 1;
|
|
@@ -20944,9 +21031,9 @@ const Calendar = class extends HTMLElement {
|
|
|
20944
21031
|
this.start = date;
|
|
20945
21032
|
}
|
|
20946
21033
|
}, class: (date == this.value ? ["selected"] : [])
|
|
20947
|
-
.concat(...(date == dist$4.Date.now() ? ["today"] : []),
|
|
20948
|
-
? dist$4.Date.parse(date) >= dist$4.Date.parse((
|
|
20949
|
-
dist$4.Date.parse(date) <= dist$4.Date.parse((
|
|
21034
|
+
.concat(...(date == dist$4.Date.now() ? ["today"] : []), dist$4.Date.firstOfMonth((_a = this.month) !== null && _a !== void 0 ? _a : this.value) == dist$4.Date.firstOfMonth(date) ? ["currentMonth"] : [], this.doubleInput
|
|
21035
|
+
? dist$4.Date.parse(date) >= dist$4.Date.parse((_b = this.start) !== null && _b !== void 0 ? _b : "") &&
|
|
21036
|
+
dist$4.Date.parse(date) <= dist$4.Date.parse((_c = this.end) !== null && _c !== void 0 ? _c : "")
|
|
20950
21037
|
? ["dateRange"]
|
|
20951
21038
|
: []
|
|
20952
21039
|
: "")
|
|
@@ -54991,7 +55078,7 @@ const SmoothlyInput$1 = class extends HTMLElement {
|
|
|
54991
55078
|
end: backend.selectionEnd != undefined ? backend.selectionEnd : backend.value.length,
|
|
54992
55079
|
direction: backend.selectionDirection ? backend.selectionDirection : "none",
|
|
54993
55080
|
} });
|
|
54994
|
-
if ((!(event.ctrlKey && event.key == "v") && event.key.length == 1) ||
|
|
55081
|
+
if ((!((event.ctrlKey || event.metaKey) && event.key == "v") && event.key.length == 1) ||
|
|
54995
55082
|
event.key == "ArrowLeft" ||
|
|
54996
55083
|
event.key == "ArrowRight" ||
|
|
54997
55084
|
event.key == "Delete" ||
|
|
@@ -55133,7 +55220,7 @@ const SmoothlyInputDemo$1 = class extends HTMLElement {
|
|
|
55133
55220
|
}
|
|
55134
55221
|
};
|
|
55135
55222
|
|
|
55136
|
-
const styleCss$p = ".sc-smoothly-input-month-h{display:flex;justify-content:space-between;font-size:large}
|
|
55223
|
+
const styleCss$p = ".sc-smoothly-input-month-h{display:flex;justify-content:space-between;font-size:large}smoothly-icon.sc-smoothly-input-month{font-size:smaller}";
|
|
55137
55224
|
|
|
55138
55225
|
const MonthSelector = class extends HTMLElement {
|
|
55139
55226
|
constructor() {
|
|
@@ -55144,21 +55231,21 @@ const MonthSelector = class extends HTMLElement {
|
|
|
55144
55231
|
onValueChanged(next) {
|
|
55145
55232
|
this.valueChanged.emit(next);
|
|
55146
55233
|
}
|
|
55234
|
+
adjustMonth(delta) {
|
|
55235
|
+
var _a;
|
|
55236
|
+
const date = dist$4.Date.parse((_a = this.value) !== null && _a !== void 0 ? _a : dist$4.Date.now());
|
|
55237
|
+
date.setMonth(date.getMonth() + delta);
|
|
55238
|
+
this.value = dist$4.Date.create(date);
|
|
55239
|
+
}
|
|
55147
55240
|
render() {
|
|
55148
55241
|
var _a, _b;
|
|
55149
55242
|
return [
|
|
55150
|
-
h("
|
|
55243
|
+
h("div", { onClick: () => this.adjustMonth(-1) }, h("smoothly-icon", { name: "chevron-back-outline", size: "small" })),
|
|
55151
55244
|
h("smoothly-selector", { onSelected: (e) => (this.value = e.detail) }, years((_a = this.value) !== null && _a !== void 0 ? _a : dist$4.Date.now()).map(year => (h("smoothly-item", { value: year.date, selected: year.selected }, year.name)))),
|
|
55152
55245
|
h("smoothly-selector", { onSelected: (e) => (this.value = e.detail) }, months((_b = this.value) !== null && _b !== void 0 ? _b : dist$4.Date.now()).map(month => (h("smoothly-item", { value: month.date, selected: month.selected }, month.name)))),
|
|
55153
|
-
h("
|
|
55246
|
+
h("div", { onClick: () => this.adjustMonth(1) }, h("smoothly-icon", { name: "chevron-forward-outline", size: "small" })),
|
|
55154
55247
|
];
|
|
55155
55248
|
}
|
|
55156
|
-
adjustMonth(delta) {
|
|
55157
|
-
var _a;
|
|
55158
|
-
const date = dist$4.Date.parse((_a = this.value) !== null && _a !== void 0 ? _a : dist$4.Date.now());
|
|
55159
|
-
date.setMonth(date.getMonth() + delta);
|
|
55160
|
-
this.value = dist$4.Date.create(date);
|
|
55161
|
-
}
|
|
55162
55249
|
static get watchers() { return {
|
|
55163
55250
|
"value": ["onValueChanged"]
|
|
55164
55251
|
}; }
|
|
@@ -55454,14 +55541,11 @@ const SmoothlyPicker$1 = class extends HTMLElement {
|
|
|
55454
55541
|
: this.select(option);
|
|
55455
55542
|
}
|
|
55456
55543
|
clearSelection() {
|
|
55457
|
-
var _a;
|
|
55458
55544
|
this.selections = [];
|
|
55459
55545
|
this.inputElement.focus();
|
|
55460
55546
|
this.keepFocusOnReRender = true;
|
|
55461
|
-
(_a = this.options) === null || _a === void 0 ? void 0 : _a.forEach(option => (option.description = ""));
|
|
55462
55547
|
}
|
|
55463
55548
|
unselect(selection) {
|
|
55464
|
-
var _a;
|
|
55465
55549
|
const index = this.selections.map(selection => selection.value).indexOf(selection.value);
|
|
55466
55550
|
if (index != -1) {
|
|
55467
55551
|
this.selections = [
|
|
@@ -55470,12 +55554,8 @@ const SmoothlyPicker$1 = class extends HTMLElement {
|
|
|
55470
55554
|
];
|
|
55471
55555
|
this.keepFocusOnReRender = true;
|
|
55472
55556
|
}
|
|
55473
|
-
const optionIndex = (_a = this.options) === null || _a === void 0 ? void 0 : _a.map(s => s.value).indexOf(selection.value);
|
|
55474
|
-
if (optionIndex != -1)
|
|
55475
|
-
this.options[optionIndex].description = "";
|
|
55476
55557
|
}
|
|
55477
55558
|
select(selection) {
|
|
55478
|
-
var _a;
|
|
55479
55559
|
const isNewSelection = this.selections.reduce((acc, current) => acc && current.value != selection.value, true);
|
|
55480
55560
|
if (isNewSelection)
|
|
55481
55561
|
this.selections = this.multiple ? [...this.selections, selection] : [selection];
|
|
@@ -55483,8 +55563,6 @@ const SmoothlyPicker$1 = class extends HTMLElement {
|
|
|
55483
55563
|
this.filterOptions();
|
|
55484
55564
|
this.keepFocusOnReRender = true;
|
|
55485
55565
|
this.isOpen = this.multiple;
|
|
55486
|
-
(_a = this.options) === null || _a === void 0 ? void 0 : _a.forEach(option => (option.description =
|
|
55487
|
-
option.value == selection.value ? this.getCheckHtml() : this.multiple ? option.description : ""));
|
|
55488
55566
|
}
|
|
55489
55567
|
toggleHighlighted() {
|
|
55490
55568
|
var _a;
|
|
@@ -55544,14 +55622,18 @@ const SmoothlyPicker$1 = class extends HTMLElement {
|
|
|
55544
55622
|
"--max-height": (_a = this.maxHeight) !== null && _a !== void 0 ? _a : "inherit",
|
|
55545
55623
|
"--label-display": this.labelSetting == "hide" ? "none" : "absolute",
|
|
55546
55624
|
};
|
|
55547
|
-
|
|
55548
|
-
|
|
55549
|
-
|
|
55550
|
-
|
|
55551
|
-
|
|
55552
|
-
|
|
55553
|
-
|
|
55554
|
-
|
|
55625
|
+
this.options.forEach(o => {
|
|
55626
|
+
o.description = this.selections.map(s => s.value).includes(o.value) ? this.getCheckHtml() : "";
|
|
55627
|
+
});
|
|
55628
|
+
const options = [
|
|
55629
|
+
{
|
|
55630
|
+
value: "select-none",
|
|
55631
|
+
name: this.selectNoneName,
|
|
55632
|
+
description: this.selections.length == 0 ? this.getCheckHtml() : "",
|
|
55633
|
+
},
|
|
55634
|
+
...((_b = this.options) !== null && _b !== void 0 ? _b : []),
|
|
55635
|
+
];
|
|
55636
|
+
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 })));
|
|
55555
55637
|
}
|
|
55556
55638
|
get element() { return this; }
|
|
55557
55639
|
static get watchers() { return {
|
|
@@ -56056,7 +56138,7 @@ const TableDemo = class extends HTMLElement {
|
|
|
56056
56138
|
static get style() { return styleCss$7; }
|
|
56057
56139
|
};
|
|
56058
56140
|
|
|
56059
|
-
const styleCss$6 = ".sc-smoothly-table-expandable-cell-h{display:table-cell;padding:0.5em}.
|
|
56141
|
+
const styleCss$6 = ".sc-smoothly-table-expandable-cell-h{display:table-cell;padding:0.5em}.hide.sc-smoothly-table-expandable-cell{display:none}";
|
|
56060
56142
|
|
|
56061
56143
|
const TableExpandableCell = class extends HTMLElement {
|
|
56062
56144
|
constructor() {
|
|
@@ -56086,7 +56168,7 @@ const TableExpandableCell = class extends HTMLElement {
|
|
|
56086
56168
|
}
|
|
56087
56169
|
}
|
|
56088
56170
|
render() {
|
|
56089
|
-
return (h(Host, { style: { textAlign: this.align } }, h("slot", null), h("tr", { ref: e => (this.expansionElement = e) },
|
|
56171
|
+
return (h(Host, { style: { textAlign: this.align } }, h("slot", null), h("tr", { ref: e => (this.expansionElement = e) }, h("td", { colSpan: 500, class: !this.open ? "hide" : "" }, h("slot", { name: "detail" })))));
|
|
56090
56172
|
}
|
|
56091
56173
|
get element() { return this; }
|
|
56092
56174
|
static get watchers() { return {
|
|
@@ -80,6 +80,22 @@ var Identifier;
|
|
|
80
80
|
Array.from(value).every(c => (c >= "0" && c <= "9") || (c >= "A" && c <= "Z") || (c >= "a" && c <= "z") || c == "-" || c == "_"));
|
|
81
81
|
}
|
|
82
82
|
Identifier.is = is;
|
|
83
|
+
function fromUint24(value) {
|
|
84
|
+
return fromHexadecimal(value.toString(16).padStart(6, "0"));
|
|
85
|
+
}
|
|
86
|
+
Identifier.fromUint24 = fromUint24;
|
|
87
|
+
function toUint24(identifier) {
|
|
88
|
+
return Number.parseInt(toHexadecimal(identifier, 6), 16);
|
|
89
|
+
}
|
|
90
|
+
Identifier.toUint24 = toUint24;
|
|
91
|
+
function fromUint48(value) {
|
|
92
|
+
return fromHexadecimal(value.toString(16).padStart(12, "0"));
|
|
93
|
+
}
|
|
94
|
+
Identifier.fromUint48 = fromUint48;
|
|
95
|
+
function toUint48(identifier) {
|
|
96
|
+
return Number.parseInt(toHexadecimal(identifier, 12), 16);
|
|
97
|
+
}
|
|
98
|
+
Identifier.toUint48 = toUint48;
|
|
83
99
|
function fromBinary(identifier) {
|
|
84
100
|
return encode(identifier, "url");
|
|
85
101
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as dist } from './index-
|
|
1
|
+
import { d as dist } from './index-13251390.js';
|
|
2
2
|
|
|
3
3
|
function month(date) {
|
|
4
4
|
const d = new Date(date);
|
|
@@ -12,7 +12,8 @@ function month(date) {
|
|
|
12
12
|
d.setDate(day++);
|
|
13
13
|
r.push(dist.Date.create(d));
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
if (row < 5 || dist.Date.firstOfMonth(r[0]) == dist.Date.firstOfMonth(date))
|
|
16
|
+
result.push(r);
|
|
16
17
|
}
|
|
17
18
|
return result;
|
|
18
19
|
}
|
|
@@ -16568,28 +16568,28 @@ const CurrencyCode = /*@__PURE__*/getDefaultExportFromCjs(CurrencyCode_1);
|
|
|
16568
16568
|
var _Date = createCommonjsModule(function (module, exports) {
|
|
16569
16569
|
"use strict";
|
|
16570
16570
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16571
|
-
exports.
|
|
16572
|
-
var
|
|
16573
|
-
(function (
|
|
16571
|
+
exports.Date = void 0;
|
|
16572
|
+
var Date;
|
|
16573
|
+
(function (Date) {
|
|
16574
16574
|
function is(value) {
|
|
16575
16575
|
return (typeof value == "string" && /^(\d{4}-[01]\d-[0-3]\d)|(\d{4}-[01]\d-[0-3]\d)|(\d{4}-[01]\d-[0-3]\d)$/.test(value));
|
|
16576
16576
|
}
|
|
16577
|
-
|
|
16577
|
+
Date.is = is;
|
|
16578
16578
|
function parse(value, time) {
|
|
16579
|
-
return new Date(value + (time !== null && time !== void 0 ? time : "T12:00:00.000Z"));
|
|
16579
|
+
return new globalThis.Date(value + (time !== null && time !== void 0 ? time : "T12:00:00.000Z"));
|
|
16580
16580
|
}
|
|
16581
|
-
|
|
16581
|
+
Date.parse = parse;
|
|
16582
16582
|
function create(value) {
|
|
16583
16583
|
return value.toISOString().substring(0, 10);
|
|
16584
16584
|
}
|
|
16585
|
-
|
|
16585
|
+
Date.create = create;
|
|
16586
16586
|
function now() {
|
|
16587
|
-
return create(new Date());
|
|
16587
|
+
return create(new globalThis.Date());
|
|
16588
16588
|
}
|
|
16589
|
-
|
|
16589
|
+
Date.now = now;
|
|
16590
16590
|
function localize(value, locale) {
|
|
16591
|
-
|
|
16592
|
-
|
|
16591
|
+
return (is(value) ? parse(value) : value)
|
|
16592
|
+
.toLocaleString(locale ? locale : Intl.DateTimeFormat().resolvedOptions().locale, {
|
|
16593
16593
|
year: "numeric",
|
|
16594
16594
|
month: "2-digit",
|
|
16595
16595
|
day: "2-digit",
|
|
@@ -16597,11 +16597,82 @@ var IsoDate;
|
|
|
16597
16597
|
minute: "2-digit",
|
|
16598
16598
|
second: "2-digit",
|
|
16599
16599
|
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
16600
|
-
}
|
|
16601
|
-
|
|
16600
|
+
})
|
|
16601
|
+
.substring(0, 10);
|
|
16602
|
+
}
|
|
16603
|
+
Date.localize = localize;
|
|
16604
|
+
function next(date, days = 1) {
|
|
16605
|
+
let result;
|
|
16606
|
+
if (typeof days == "number") {
|
|
16607
|
+
const r = parse(date);
|
|
16608
|
+
r.setDate(r.getDate() + days);
|
|
16609
|
+
result = Date.create(r);
|
|
16610
|
+
}
|
|
16611
|
+
else {
|
|
16612
|
+
result = date;
|
|
16613
|
+
if (days.years)
|
|
16614
|
+
result = nextYear(result, days.years);
|
|
16615
|
+
if (days.months)
|
|
16616
|
+
result = nextMonth(result, days.months);
|
|
16617
|
+
if (days.days)
|
|
16618
|
+
result = next(result, days.days);
|
|
16619
|
+
}
|
|
16620
|
+
return result;
|
|
16621
|
+
}
|
|
16622
|
+
Date.next = next;
|
|
16623
|
+
function previous(date, days = 1) {
|
|
16624
|
+
let result;
|
|
16625
|
+
if (typeof days == "number") {
|
|
16626
|
+
const r = parse(date);
|
|
16627
|
+
r.setDate(r.getDate() - days);
|
|
16628
|
+
result = Date.create(r);
|
|
16629
|
+
}
|
|
16630
|
+
else {
|
|
16631
|
+
result = date;
|
|
16632
|
+
if (days.years)
|
|
16633
|
+
result = previousYear(result, days.years);
|
|
16634
|
+
if (days.months)
|
|
16635
|
+
result = previousMonth(result, days.months);
|
|
16636
|
+
if (days.days)
|
|
16637
|
+
result = previous(result, days.days);
|
|
16638
|
+
}
|
|
16639
|
+
return result;
|
|
16640
|
+
}
|
|
16641
|
+
Date.previous = previous;
|
|
16642
|
+
function nextMonth(date, months = 1) {
|
|
16643
|
+
const result = parse(date);
|
|
16644
|
+
result.setMonth(result.getMonth() + months);
|
|
16645
|
+
return Date.create(result);
|
|
16646
|
+
}
|
|
16647
|
+
Date.nextMonth = nextMonth;
|
|
16648
|
+
function previousMonth(date, months = 1) {
|
|
16649
|
+
return nextMonth(date, -months);
|
|
16650
|
+
}
|
|
16651
|
+
Date.previousMonth = previousMonth;
|
|
16652
|
+
function nextYear(date, years = 1) {
|
|
16653
|
+
const result = parse(date);
|
|
16654
|
+
result.setFullYear(result.getFullYear() + years);
|
|
16655
|
+
return Date.create(result);
|
|
16656
|
+
}
|
|
16657
|
+
Date.nextYear = nextYear;
|
|
16658
|
+
function previousYear(date, years = 1) {
|
|
16659
|
+
return nextYear(date, -years);
|
|
16660
|
+
}
|
|
16661
|
+
Date.previousYear = previousYear;
|
|
16662
|
+
function firstOfMonth(date) {
|
|
16663
|
+
const result = parse(date);
|
|
16664
|
+
result.setDate(1);
|
|
16665
|
+
return Date.create(result);
|
|
16666
|
+
}
|
|
16667
|
+
Date.firstOfMonth = firstOfMonth;
|
|
16668
|
+
function lastOfMonth(date) {
|
|
16669
|
+
const result = parse(date);
|
|
16670
|
+
result.setMonth(result.getMonth() + 1);
|
|
16671
|
+
result.setDate(-1);
|
|
16672
|
+
return Date.create(result);
|
|
16602
16673
|
}
|
|
16603
|
-
|
|
16604
|
-
})(
|
|
16674
|
+
Date.lastOfMonth = lastOfMonth;
|
|
16675
|
+
})(Date = exports.Date || (exports.Date = {}));
|
|
16605
16676
|
//# sourceMappingURL=Date.js.map
|
|
16606
16677
|
});
|
|
16607
16678
|
|
|
@@ -16632,7 +16703,7 @@ var DateTime;
|
|
|
16632
16703
|
DateTime.now = now;
|
|
16633
16704
|
function localize(value, locale) {
|
|
16634
16705
|
const localeString = locale ? locale : Intl.DateTimeFormat().resolvedOptions().locale;
|
|
16635
|
-
|
|
16706
|
+
return (is(value) ? parse(value) : value).toLocaleString(localeString, {
|
|
16636
16707
|
year: "numeric",
|
|
16637
16708
|
month: "2-digit",
|
|
16638
16709
|
day: "2-digit",
|
|
@@ -16640,8 +16711,7 @@ var DateTime;
|
|
|
16640
16711
|
minute: "2-digit",
|
|
16641
16712
|
second: "2-digit",
|
|
16642
16713
|
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
16643
|
-
};
|
|
16644
|
-
return (is(value) ? parse(value) : value).toLocaleString(localeString, localeOptions);
|
|
16714
|
+
});
|
|
16645
16715
|
}
|
|
16646
16716
|
DateTime.localize = localize;
|
|
16647
16717
|
})(DateTime = exports.DateTime || (exports.DateTime = {}));
|
|
@@ -18416,7 +18486,7 @@ Object.defineProperty(exports, "Currency", { enumerable: true, get: function ()
|
|
|
18416
18486
|
|
|
18417
18487
|
Object.defineProperty(exports, "CurrencyCode", { enumerable: true, get: function () { return CurrencyCode_1.CurrencyCode; } });
|
|
18418
18488
|
|
|
18419
|
-
Object.defineProperty(exports, "Date", { enumerable: true, get: function () { return _Date.
|
|
18489
|
+
Object.defineProperty(exports, "Date", { enumerable: true, get: function () { return _Date.Date; } });
|
|
18420
18490
|
|
|
18421
18491
|
Object.defineProperty(exports, "DateTime", { enumerable: true, get: function () { return DateTime_1.DateTime; } });
|
|
18422
18492
|
|
|
@@ -206,6 +206,22 @@ var Identifier;
|
|
|
206
206
|
Array.from(value).every(c => (c >= "0" && c <= "9") || (c >= "A" && c <= "Z") || (c >= "a" && c <= "z") || c == "-" || c == "_"));
|
|
207
207
|
}
|
|
208
208
|
Identifier.is = is;
|
|
209
|
+
function fromUint24(value) {
|
|
210
|
+
return fromHexadecimal(value.toString(16).padStart(6, "0"));
|
|
211
|
+
}
|
|
212
|
+
Identifier.fromUint24 = fromUint24;
|
|
213
|
+
function toUint24(identifier) {
|
|
214
|
+
return Number.parseInt(toHexadecimal(identifier, 6), 16);
|
|
215
|
+
}
|
|
216
|
+
Identifier.toUint24 = toUint24;
|
|
217
|
+
function fromUint48(value) {
|
|
218
|
+
return fromHexadecimal(value.toString(16).padStart(12, "0"));
|
|
219
|
+
}
|
|
220
|
+
Identifier.fromUint48 = fromUint48;
|
|
221
|
+
function toUint48(identifier) {
|
|
222
|
+
return Number.parseInt(toHexadecimal(identifier, 12), 16);
|
|
223
|
+
}
|
|
224
|
+
Identifier.toUint48 = toUint48;
|
|
209
225
|
function fromBinary(identifier) {
|
|
210
226
|
return encode$1(identifier, "url");
|
|
211
227
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { A as App } from './App-bf78807d.js';
|
|
2
|
-
export { C as ClientIdentifier, M as Message, N as Notice, T as Trigger } from './index-
|
|
2
|
+
export { C as ClientIdentifier, M as Message, N as Notice, T as Trigger } from './index-531e2f06.js';
|
|
3
3
|
import './index-0dd5f791.js';
|
|
4
4
|
|
|
5
5
|
const colorNames = {
|