smoothly 0.1.68 → 0.1.72
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/{generate-5e7cd3f7.js → generate-7f7f7d99.js} +3 -2
- package/dist/cjs/{index-896ac706.js → index-7c9d0102.js} +806 -638
- package/dist/cjs/{index-b8688617.js → index-e37f73fe.js} +89 -19
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{smoothly-accordion_43.cjs.entry.js → smoothly-accordion_44.cjs.entry.js} +1000 -737
- package/dist/cjs/smoothly-calendar.cjs.entry.js +7 -7
- package/dist/cjs/smoothly-display-amount.cjs.entry.js +2 -4
- package/dist/cjs/smoothly-display.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-select.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-table-demo.cjs.entry.js +4 -1
- package/dist/cjs/smoothly-table-header.cjs.entry.js +1 -1
- package/dist/cjs/smoothly-table-row.cjs.entry.js +21 -2
- package/dist/cjs/smoothly.cjs.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/select/index.js +1 -1
- package/dist/collection/components/table/demo/index.js +45 -24
- package/dist/collection/components/table/exandable/row/style.css +1 -0
- package/dist/collection/components/table/header/index.js +1 -1
- package/dist/collection/components/table/row/index.js +94 -3
- package/dist/collection/components/table/row/style.css +3 -0
- package/dist/custom-elements/index.js +941 -682
- 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/esm/loader.js +1 -1
- package/dist/esm/{smoothly-accordion_43.entry.js → smoothly-accordion_44.entry.js} +1000 -738
- package/dist/esm/smoothly-calendar.entry.js +7 -7
- package/dist/esm/smoothly-display-amount.entry.js +2 -4
- package/dist/esm/smoothly-display.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-select.entry.js +1 -1
- package/dist/esm/smoothly-table-demo.entry.js +4 -1
- package/dist/esm/smoothly-table-header.entry.js +1 -1
- package/dist/esm/smoothly-table-row.entry.js +22 -3
- package/dist/esm/smoothly.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/smoothly/p-485244c2.entry.js +1 -0
- package/dist/smoothly/smoothly-calendar.entry.js +7 -7
- package/dist/smoothly/smoothly-display-amount.entry.js +2 -4
- package/dist/smoothly/smoothly-display.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-select.entry.js +1 -1
- package/dist/smoothly/smoothly-table-demo.entry.js +4 -1
- package/dist/smoothly/smoothly-table-header.entry.js +1 -1
- package/dist/smoothly/smoothly-table-row.entry.js +22 -3
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/dist/types/components/input-month/index.d.ts +1 -1
- package/dist/types/components/table/demo/index.d.ts +1 -1
- package/dist/types/components/table/row/index.d.ts +10 -0
- package/dist/types/components.d.ts +5 -0
- package/package.json +5 -5
- package/dist/smoothly/p-07627dfe.entry.js +0 -1
- package/dist/smoothly/p-f2ed989e.entry.js +0 -1
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b7e6a72c.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
7
|
-
const generate = require('./generate-
|
|
6
|
+
const index$1 = require('./index-e37f73fe.js');
|
|
7
|
+
const generate = require('./generate-7f7f7d99.js');
|
|
8
8
|
require('./_commonjsHelpers-10109b76.js');
|
|
9
9
|
|
|
10
|
-
const styleCss = ".sc-smoothly-calendar-h{display:block}.sc-smoothly-calendar-h>smoothly-input-month.sc-smoothly-calendar{width:calc(100% - 1em);padding
|
|
10
|
+
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))}";
|
|
11
11
|
|
|
12
12
|
const Calendar = class {
|
|
13
13
|
constructor(hostRef) {
|
|
@@ -32,7 +32,7 @@ const Calendar = class {
|
|
|
32
32
|
event.stopPropagation();
|
|
33
33
|
} }),
|
|
34
34
|
index.h("table", null, index.h("thead", null, index.h("tr", null, generate.weekdays().map(day => (index.h("th", null, day))))), generate.month((_b = this.month) !== null && _b !== void 0 ? _b : this.value).map(week => (index.h("tr", null, week.map(date => {
|
|
35
|
-
var _a, _b;
|
|
35
|
+
var _a, _b, _c;
|
|
36
36
|
return (index.h("td", { tabindex: 1, onClick: () => {
|
|
37
37
|
this.valueChanged.emit((this.value = date));
|
|
38
38
|
this.clickCounter += 1;
|
|
@@ -45,9 +45,9 @@ const Calendar = class {
|
|
|
45
45
|
this.start = date;
|
|
46
46
|
}
|
|
47
47
|
}, class: (date == this.value ? ["selected"] : [])
|
|
48
|
-
.concat(...(date == index$1.dist.Date.now() ? ["today"] : []),
|
|
49
|
-
? index$1.dist.Date.parse(date) >= index$1.dist.Date.parse((
|
|
50
|
-
index$1.dist.Date.parse(date) <= index$1.dist.Date.parse((
|
|
48
|
+
.concat(...(date == index$1.dist.Date.now() ? ["today"] : []), index$1.dist.Date.firstOfMonth((_a = this.month) !== null && _a !== void 0 ? _a : this.value) == index$1.dist.Date.firstOfMonth(date) ? ["currentMonth"] : [], this.doubleInput
|
|
49
|
+
? index$1.dist.Date.parse(date) >= index$1.dist.Date.parse((_b = this.start) !== null && _b !== void 0 ? _b : "") &&
|
|
50
|
+
index$1.dist.Date.parse(date) <= index$1.dist.Date.parse((_c = this.end) !== null && _c !== void 0 ? _c : "")
|
|
51
51
|
? ["dateRange"]
|
|
52
52
|
: []
|
|
53
53
|
: "")
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b7e6a72c.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
6
|
+
const index$1 = require('./index-e37f73fe.js');
|
|
7
7
|
require('./_commonjsHelpers-10109b76.js');
|
|
8
8
|
|
|
9
9
|
const styleCss = ".sc-smoothly-display-amount-h{display:block}[hidden].sc-smoothly-display-amount-h{display:none}";
|
|
@@ -15,9 +15,7 @@ const SmoothlyDisplayAmount = class {
|
|
|
15
15
|
format(amount) {
|
|
16
16
|
const digitsPerGroup = 3;
|
|
17
17
|
const defaultDecimals = 2;
|
|
18
|
-
const maxDecimals = (index$1.dist.Currency.decimalDigits(this.currency)
|
|
19
|
-
? index$1.dist.Currency.decimalDigits(this.currency)
|
|
20
|
-
: defaultDecimals);
|
|
18
|
+
const maxDecimals = (index$1.dist.Currency.decimalDigits(this.currency) ? index$1.dist.Currency.decimalDigits(this.currency) : defaultDecimals);
|
|
21
19
|
let beforeSeparator = amount.length;
|
|
22
20
|
let separator;
|
|
23
21
|
let result = amount;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b7e6a72c.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
6
|
+
const index$1 = require('./index-7c9d0102.js');
|
|
7
7
|
require('./_commonjsHelpers-10109b76.js');
|
|
8
8
|
|
|
9
9
|
const styleCss = ".sc-smoothly-display-h{display:block}[hidden].sc-smoothly-display-h{display:none}";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b7e6a72c.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
6
|
+
const index$1 = require('./index-e37f73fe.js');
|
|
7
7
|
require('./_commonjsHelpers-10109b76.js');
|
|
8
8
|
|
|
9
9
|
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}";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b7e6a72c.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
6
|
+
const index$1 = require('./index-e37f73fe.js');
|
|
7
7
|
require('./_commonjsHelpers-10109b76.js');
|
|
8
8
|
|
|
9
9
|
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))}";
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b7e6a72c.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
7
|
-
const generate = require('./generate-
|
|
6
|
+
const index$1 = require('./index-e37f73fe.js');
|
|
7
|
+
const generate = require('./generate-7f7f7d99.js');
|
|
8
8
|
require('./_commonjsHelpers-10109b76.js');
|
|
9
9
|
|
|
10
|
-
const styleCss = ".sc-smoothly-input-month-h{display:flex;justify-content:space-between;font-size:large}
|
|
10
|
+
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}";
|
|
11
11
|
|
|
12
12
|
const MonthSelector = class {
|
|
13
13
|
constructor(hostRef) {
|
|
@@ -17,21 +17,21 @@ const MonthSelector = class {
|
|
|
17
17
|
onValueChanged(next) {
|
|
18
18
|
this.valueChanged.emit(next);
|
|
19
19
|
}
|
|
20
|
+
adjustMonth(delta) {
|
|
21
|
+
var _a;
|
|
22
|
+
const date = index$1.dist.Date.parse((_a = this.value) !== null && _a !== void 0 ? _a : index$1.dist.Date.now());
|
|
23
|
+
date.setMonth(date.getMonth() + delta);
|
|
24
|
+
this.value = index$1.dist.Date.create(date);
|
|
25
|
+
}
|
|
20
26
|
render() {
|
|
21
27
|
var _a, _b;
|
|
22
28
|
return [
|
|
23
|
-
index.h("
|
|
29
|
+
index.h("div", { onClick: () => this.adjustMonth(-1) }, index.h("smoothly-icon", { name: "chevron-back-outline", size: "small" })),
|
|
24
30
|
index.h("smoothly-selector", { onSelected: (e) => (this.value = e.detail) }, generate.years((_a = this.value) !== null && _a !== void 0 ? _a : index$1.dist.Date.now()).map(year => (index.h("smoothly-item", { value: year.date, selected: year.selected }, year.name)))),
|
|
25
31
|
index.h("smoothly-selector", { onSelected: (e) => (this.value = e.detail) }, generate.months((_b = this.value) !== null && _b !== void 0 ? _b : index$1.dist.Date.now()).map(month => (index.h("smoothly-item", { value: month.date, selected: month.selected }, month.name)))),
|
|
26
|
-
index.h("
|
|
32
|
+
index.h("div", { onClick: () => this.adjustMonth(1) }, index.h("smoothly-icon", { name: "chevron-forward-outline", size: "small" })),
|
|
27
33
|
];
|
|
28
34
|
}
|
|
29
|
-
adjustMonth(delta) {
|
|
30
|
-
var _a;
|
|
31
|
-
const date = index$1.dist.Date.parse((_a = this.value) !== null && _a !== void 0 ? _a : index$1.dist.Date.now());
|
|
32
|
-
date.setMonth(date.getMonth() + delta);
|
|
33
|
-
this.value = index$1.dist.Date.create(date);
|
|
34
|
-
}
|
|
35
35
|
static get watchers() { return {
|
|
36
36
|
"value": ["onValueChanged"]
|
|
37
37
|
}; }
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b7e6a72c.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
6
|
+
const index$1 = require('./index-7c9d0102.js');
|
|
7
7
|
require('./_commonjsHelpers-10109b76.js');
|
|
8
8
|
|
|
9
9
|
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}";
|
|
@@ -88,7 +88,7 @@ const SmoothlyInput = class {
|
|
|
88
88
|
end: backend.selectionEnd != undefined ? backend.selectionEnd : backend.value.length,
|
|
89
89
|
direction: backend.selectionDirection ? backend.selectionDirection : "none",
|
|
90
90
|
} });
|
|
91
|
-
if ((!(event.ctrlKey && event.key == "v") && event.key.length == 1) ||
|
|
91
|
+
if ((!((event.ctrlKey || event.metaKey) && event.key == "v") && event.key.length == 1) ||
|
|
92
92
|
event.key == "ArrowLeft" ||
|
|
93
93
|
event.key == "ArrowRight" ||
|
|
94
94
|
event.key == "Delete" ||
|
|
@@ -13,7 +13,7 @@ const SmoothlySelect = class {
|
|
|
13
13
|
}
|
|
14
14
|
optionSelected() {
|
|
15
15
|
if (this.selectElement)
|
|
16
|
-
this.selectionChanged.emit({ identifier: this.identifier, value: this.value = this.selectElement.value });
|
|
16
|
+
this.selectionChanged.emit({ identifier: this.identifier, value: (this.value = this.selectElement.value) });
|
|
17
17
|
}
|
|
18
18
|
componentDidLoad() {
|
|
19
19
|
var _a;
|
|
@@ -11,7 +11,10 @@ const TableDemo = class {
|
|
|
11
11
|
index.registerInstance(this, hostRef);
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
return
|
|
14
|
+
return [
|
|
15
|
+
index.h("smoothly-table", null, index.h("smoothly-table-row", null, index.h("smoothly-table-header", null, "Header A"), index.h("smoothly-table-header", null, "Header B"), index.h("smoothly-table-header", null, "Header C")), index.h("smoothly-table-expandable-row", null, index.h("smoothly-table-expandable-cell", null, "Value 1A", index.h("div", { slot: "detail" }, "1A details")), index.h("smoothly-table-expandable-cell", null, index.h("smoothly-display", { type: "price", value: 20, currency: "EUR" }), index.h("div", { slot: "detail" }, "Budget details.")), index.h("smoothly-table-expandable-cell", null, index.h("smoothly-display", { type: "price", value: 18, currency: "EUR" }), index.h("div", { slot: "detail" }, "Cost details."))), index.h("smoothly-table-expandable-row", null, index.h("smoothly-table-expandable-cell", null, "Value 1A", index.h("div", { slot: "detail" }, "2A details")), index.h("smoothly-table-expandable-cell", null, index.h("smoothly-display", { type: "price", value: 30, currency: "EUR" }), index.h("div", { slot: "detail" }, "Budget details.")), index.h("smoothly-table-expandable-cell", null, index.h("smoothly-display", { type: "price", value: 38, currency: "EUR" }), index.h("div", { slot: "detail" }, "Cost details.")))),
|
|
16
|
+
index.h("smoothly-table", null, index.h("smoothly-table-row", null, index.h("smoothly-table-header", null, "Header D"), index.h("smoothly-table-header", null, "Header E"), index.h("smoothly-table-header", null, "Header F")), index.h("smoothly-table-row", null, index.h("smoothly-table-cell", null, "Value 1A"), index.h("smoothly-table-cell", null, index.h("smoothly-display", { type: "price", value: 20, currency: "EUR" })), index.h("smoothly-table-cell", null, index.h("smoothly-display", { type: "price", value: 18, currency: "EUR" })), index.h("div", { slot: "detail" }, "Cost details.")), index.h("smoothly-table-row", null, index.h("smoothly-table-cell", null, "Value 1A"), index.h("smoothly-table-cell", null, index.h("smoothly-display", { type: "price", value: 20, currency: "EUR" })), index.h("smoothly-table-cell", null, index.h("smoothly-display", { type: "price", value: 18, currency: "EUR" })), index.h("div", { slot: "detail" }, "Cost details."))),
|
|
17
|
+
];
|
|
15
18
|
}
|
|
16
19
|
};
|
|
17
20
|
TableDemo.style = styleCss;
|
|
@@ -14,7 +14,7 @@ const TableHeader = class {
|
|
|
14
14
|
onClick(event) {
|
|
15
15
|
this.sort.emit({
|
|
16
16
|
property: this.name,
|
|
17
|
-
direction: this.sortDirection = this.sortDirection == "ascending" ? "descending" : "ascending",
|
|
17
|
+
direction: (this.sortDirection = this.sortDirection == "ascending" ? "descending" : "ascending"),
|
|
18
18
|
});
|
|
19
19
|
console.log("sort", this.name, this.sortDirection);
|
|
20
20
|
event.preventDefault();
|
|
@@ -4,15 +4,34 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b7e6a72c.js');
|
|
6
6
|
|
|
7
|
-
const styleCss = ".sc-smoothly-table-row-h{display:table-row;border:1px solid rgb(var(--smoothly-dark-color), 0.5);cursor:pointer}.sc-smoothly-table-row-h:nth-child(even){background-color:rgb(var(--smoothly-default-color))}.sc-smoothly-table-row-h:hover{background-color:rgb(var(--smoothly-default-color))}";
|
|
7
|
+
const styleCss = ".sc-smoothly-table-row-h{display:table-row;border:1px solid rgb(var(--smoothly-dark-color), 0.5);cursor:pointer}.sc-smoothly-table-row-h:nth-child(even){background-color:rgb(var(--smoothly-default-color))}.sc-smoothly-table-row-h:hover{background-color:rgb(var(--smoothly-default-color))}.hide.sc-smoothly-table-row{display:none}";
|
|
8
8
|
|
|
9
9
|
const TableRow = class {
|
|
10
10
|
constructor(hostRef) {
|
|
11
11
|
index.registerInstance(this, hostRef);
|
|
12
|
+
this.expansionOpen = index.createEvent(this, "expansionOpen", 7);
|
|
13
|
+
this.align = "left";
|
|
14
|
+
}
|
|
15
|
+
openChanged(value) {
|
|
16
|
+
if (this.expansionElement)
|
|
17
|
+
this.element.after(this.expansionElement);
|
|
18
|
+
}
|
|
19
|
+
onClick(e) {
|
|
20
|
+
this.open = !this.open;
|
|
21
|
+
e.stopPropagation();
|
|
22
|
+
}
|
|
23
|
+
componentDidRender() {
|
|
24
|
+
this.expansionOpen.emit(this.expansionElement);
|
|
25
|
+
if (this.expansionElement && this.open)
|
|
26
|
+
this.element.after(this.expansionElement);
|
|
12
27
|
}
|
|
13
28
|
render() {
|
|
14
|
-
return (index.h(index.Host,
|
|
29
|
+
return (index.h(index.Host, { style: { textAlign: this.align } }, index.h("slot", null), index.h("tr", { ref: e => (this.expansionElement = e) }, index.h("td", { colSpan: 500, class: !this.open ? "hide" : "" }, index.h("slot", { name: "detail" })))));
|
|
15
30
|
}
|
|
31
|
+
get element() { return index.getElement(this); }
|
|
32
|
+
static get watchers() { return {
|
|
33
|
+
"open": ["openChanged"]
|
|
34
|
+
}; }
|
|
16
35
|
};
|
|
17
36
|
TableRow.style = styleCss;
|
|
18
37
|
|
package/dist/cjs/smoothly.cjs.js
CHANGED
|
@@ -120,5 +120,5 @@ const patchCloneNodeFix = (HTMLElementPrototype) => {
|
|
|
120
120
|
|
|
121
121
|
patchBrowser().then(options => {
|
|
122
122
|
appGlobals.globalScripts();
|
|
123
|
-
return index.bootstrapLazy([["smoothly-app-demo.cjs",[[0,"smoothly-app-demo",{"baseUrl":[1,"base-url"]}]]],["smoothly-radio-group.cjs",[[4,"smoothly-radio-group",{"orientation":[513]}]]],["smoothly-reorder.cjs",[[0,"smoothly-reorder"]]],["smoothly-
|
|
123
|
+
return index.bootstrapLazy([["smoothly-app-demo.cjs",[[0,"smoothly-app-demo",{"baseUrl":[1,"base-url"]}]]],["smoothly-radio-group.cjs",[[4,"smoothly-radio-group",{"orientation":[513]}]]],["smoothly-reorder.cjs",[[0,"smoothly-reorder"]]],["smoothly-trigger-sink.cjs",[[6,"smoothly-trigger-sink",{"context":[16],"destination":[1],"filter":[1]},[[0,"trigger","TriggerListener"]]]]],["smoothly-trigger-source.cjs",[[6,"smoothly-trigger-source",{"listen":[1]}]]],["smoothly-input-demo.cjs",[[0,"smoothly-input-demo"]]],["smoothly-select-demo.cjs",[[2,"smoothly-select-demo",null,[[0,"selectionChanged","handleSelectionChanged"]]]]],["smoothly-table-demo.cjs",[[2,"smoothly-table-demo"]]],["smoothly-display-demo.cjs",[[0,"smoothly-display-demo"]]],["smoothly-app.cjs",[[4,"smoothly-app",{"color":[1]}]]],["smoothly-dialog-demo.cjs",[[0,"smoothly-dialog-demo"]]],["smoothly-icon-demo.cjs",[[2,"smoothly-icon-demo"]]],["smoothly-room.cjs",[[4,"smoothly-room",{"label":[1],"icon":[1],"path":[1],"to":[1]}]]],["smoothly-input-date-range.cjs",[[2,"smoothly-input-date-range",{"value":[1025],"start":[1025],"end":[1025],"open":[1028]},[[0,"startChanged","onStartChanged"],[0,"endChanged","onEndChanged"]]]]],["smoothly-notifier.cjs",[[6,"smoothly-notifier",{"notices":[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]]]],["smoothly-picker.cjs",[[1,"smoothly-picker",{"maxMenuHeight":[1,"max-menu-height"],"maxHeight":[1,"max-height"],"emptyMenuLabel":[1025,"empty-menu-label"],"multiple":[516],"optionStyle":[8,"option-style"],"options":[16],"labelSetting":[513,"label-setting"],"label":[513],"selections":[1040],"selectNoneName":[1025,"select-none-name"],"isOpen":[32]},[[0,"optionSelect","optionSelectHander"]]]]],["smoothly-dialog.cjs",[[6,"smoothly-dialog",{"color":[513],"open":[1540],"closable":[516],"header":[513]},[[0,"trigger","TriggerListener"]]]]],["smoothly-checkbox.cjs",[[2,"smoothly-checkbox",{"selectAll":[4,"select-all"],"selected":[1540],"disabled":[1540],"t":[32]}]]],["smoothly-submit.cjs",[[6,"smoothly-submit",{"processing":[1540],"color":[513],"expand":[513],"fill":[513],"disabled":[516],"prevent":[4],"submit":[64]},[[0,"click","handleSubmit"]]]]],["smoothly-tuple.cjs",[[0,"smoothly-tuple",{"tuple":[16]}]]],["smoothly-urlencoded.cjs",[[0,"smoothly-urlencoded",{"data":[1]}]]],["smoothly-accordion.cjs",[[6,"smoothly-accordion",{"value":[1025]},[[0,"smoothlyOpen","handleOpenClose"],[0,"smoothlyClose","handleOpenClose"],[0,"smoothlyAccordionItemDidLoad","onAccordionItemDidLoad"],[0,"smoothlyAccordionItemDidUnload","onAccordionItemDidUnload"]]]]],["smoothly-accordion-item.cjs",[[6,"smoothly-accordion-item",{"name":[1],"brand":[1],"open":[1540]}]]],["smoothly-display-amount.cjs",[[2,"smoothly-display-amount",{"amount":[8],"currency":[1]}]]],["smoothly-frame.cjs",[[2,"smoothly-frame",{"url":[1],"name":[1],"origin":[1],"send":[64]}]]],["smoothly-popup.cjs",[[6,"smoothly-popup",{"visible":[1540],"direction":[1537],"cssVariables":[32]}]]],["smoothly-radio.cjs",[[6,"smoothly-radio",{"name":[1],"value":[1],"checked":[1540],"tabIndex":[2,"tab-index"]}]]],["smoothly-select.cjs",[[6,"smoothly-select",{"identifier":[1],"background":[513],"value":[1025]}]]],["smoothly-table.cjs",[[6,"smoothly-table",null,[[0,"sort","onSort"]]]]],["smoothly-table-cell.cjs",[[6,"smoothly-table-cell"]]],["smoothly-table-expandable-cell.cjs",[[6,"smoothly-table-expandable-cell",{"align":[1],"open":[1540],"beginOpen":[32]},[[0,"click","onClick"]]]]],["smoothly-table-expandable-row.cjs",[[6,"smoothly-table-expandable-row",null,[[0,"expansionLoaded","onExpansionLoaded"],[0,"expansionOpen","onDetailsLoaded"]]]]],["smoothly-table-header.cjs",[[6,"smoothly-table-header",{"name":[1],"sortDirection":[1025,"sort-direction"]},[[0,"click","onClick"]]]]],["smoothly-table-row.cjs",[[6,"smoothly-table-row",{"align":[1],"open":[1540],"beginOpen":[32]},[[0,"click","onClick"]]]]],["smoothly-icon.cjs",[[2,"smoothly-icon",{"color":[513],"fill":[513],"name":[1],"size":[513],"toolTip":[1,"tool-tip"],"document":[32]}]]],["smoothly-selector.cjs",[[6,"smoothly-selector",{"opened":[32],"selectedElement":[32],"missing":[32],"filter":[32]},[[0,"click","onClick"],[0,"itemSelected","onItemSelected"],[0,"keydown","onKeyDown"]]]]],["smoothly-input-date.cjs",[[6,"smoothly-input-date",{"value":[1025],"open":[1028]}]]],["smoothly-notification.cjs",[[2,"smoothly-notification",{"notice":[16],"tick":[32]},[[0,"trigger","onTrigger"]]]]],["smoothly-menu-options.cjs",[[1,"smoothly-menu-options",{"emptyMenuLabel":[1025,"empty-menu-label"],"maxMenuHeight":[1,"max-menu-height"],"order":[4],"optionStyle":[8,"option-style"],"options":[1040],"resetHighlightOnOptionsChange":[1028,"reset-highlight-on-options-change"],"filteredOptions":[32],"highlightIndex":[32],"moveHighlight":[64],"setHighlight":[64],"getHighlighted":[64],"filterOptions":[64]},[[0,"optionHover","optionHoverHandler"]]]]],["smoothly-display.cjs",[[2,"smoothly-display",{"type":[1],"value":[8],"currency":[1],"country":[1]}]]],["smoothly-display-date-time.cjs",[[2,"smoothly-display-date-time",{"datetime":[1]}]]],["smoothly-spinner.cjs",[[2,"smoothly-spinner",{"active":[516]}]]],["smoothly-option.cjs",[[1,"smoothly-option",{"aliases":[513],"dataHighlight":[1540,"data-highlight"],"name":[1537],"value":[1537]}]]],["smoothly-item.cjs",[[6,"smoothly-item",{"value":[8],"selected":[1540],"filter":[64]},[[0,"click","onClick"]]]]],["smoothly-input-month.cjs",[[2,"smoothly-input-month",{"value":[1025]}]]],["smoothly-calendar.cjs",[[2,"smoothly-calendar",{"month":[1025],"value":[1025],"start":[1025],"end":[1025],"doubleInput":[516,"double-input"]}]]],["smoothly-input.cjs",[[6,"smoothly-input",{"name":[513],"value":[1032],"type":[513],"required":[1540],"minLength":[1026,"min-length"],"maxLength":[1026,"max-length"],"autocomplete":[1028],"pattern":[1040],"placeholder":[1025],"disabled":[1028],"currency":[513],"setKeepFocusOnReRender":[64],"setSelectionRange":[64]}]]],["smoothly-trigger.cjs",[[6,"smoothly-trigger",{"color":[513],"expand":[513],"fill":[513],"disabled":[516],"type":[513],"name":[1],"value":[8]},[[0,"click","onClick"]]]]]], options);
|
|
124
124
|
});
|
|
@@ -23,7 +23,7 @@ export class Calendar {
|
|
|
23
23
|
h("thead", null,
|
|
24
24
|
h("tr", null, generate.weekdays().map(day => (h("th", null, day))))),
|
|
25
25
|
generate.month((_b = this.month) !== null && _b !== void 0 ? _b : this.value).map(week => (h("tr", null, week.map(date => {
|
|
26
|
-
var _a, _b;
|
|
26
|
+
var _a, _b, _c;
|
|
27
27
|
return (h("td", { tabindex: 1, onClick: () => {
|
|
28
28
|
this.valueChanged.emit((this.value = date));
|
|
29
29
|
this.clickCounter += 1;
|
|
@@ -36,9 +36,9 @@ export class Calendar {
|
|
|
36
36
|
this.start = date;
|
|
37
37
|
}
|
|
38
38
|
}, class: (date == this.value ? ["selected"] : [])
|
|
39
|
-
.concat(...(date == Date.now() ? ["today"] : []),
|
|
40
|
-
? Date.parse(date) >= Date.parse((
|
|
41
|
-
Date.parse(date) <= Date.parse((
|
|
39
|
+
.concat(...(date == Date.now() ? ["today"] : []), Date.firstOfMonth((_a = this.month) !== null && _a !== void 0 ? _a : this.value) == Date.firstOfMonth(date) ? ["currentMonth"] : [], this.doubleInput
|
|
40
|
+
? Date.parse(date) >= Date.parse((_b = this.start) !== null && _b !== void 0 ? _b : "") &&
|
|
41
|
+
Date.parse(date) <= Date.parse((_c = this.end) !== null && _c !== void 0 ? _c : "")
|
|
42
42
|
? ["dateRange"]
|
|
43
43
|
: []
|
|
44
44
|
: "")
|
|
@@ -1,35 +1,53 @@
|
|
|
1
1
|
:host {
|
|
2
|
-
|
|
2
|
+
display: block;
|
|
3
|
+
--other-month-opacity: 0.5;
|
|
3
4
|
}
|
|
4
5
|
:host > smoothly-input-month {
|
|
5
6
|
width: calc(100% - 1em);
|
|
6
|
-
padding: .5em .5em 0 .5em;
|
|
7
|
+
padding: 0.5em 0.5em 0 0.5em;
|
|
7
8
|
}
|
|
8
9
|
th,
|
|
9
10
|
td {
|
|
10
11
|
text-align: center;
|
|
11
|
-
padding: .5em;
|
|
12
|
+
padding: 0.5em;
|
|
12
13
|
min-width: 2em;
|
|
13
14
|
background-color: rgb(var(--smoothly-default-shade));
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
user-select: none;
|
|
17
|
+
}
|
|
18
|
+
td.currentMonth {
|
|
19
|
+
color: rgb(var(--smoothly-default-contrast));
|
|
20
|
+
}
|
|
21
|
+
td:not(.currentMonth) {
|
|
22
|
+
color: rgba(var(--smoothly-default-contrast), var(--other-month-opacity));
|
|
23
|
+
}
|
|
24
|
+
td:nth-child(6):not(.currentMonth).selected,
|
|
25
|
+
td:nth-child(6):not(.currentMonth).dateRange,
|
|
26
|
+
td:nth-child(7):not(.currentMonth).selected,
|
|
27
|
+
td:nth-child(7):not(.currentMonth).dateRange {
|
|
28
|
+
color: rgba(var(--smoothly-default-contrast));
|
|
14
29
|
}
|
|
15
|
-
|
|
16
30
|
td:nth-child(6),
|
|
17
31
|
td:nth-child(7) {
|
|
18
|
-
|
|
32
|
+
color: rgb(var(--smoothly-danger-tint));
|
|
33
|
+
}
|
|
34
|
+
td:nth-child(6):not(.currentMonth),
|
|
35
|
+
td:nth-child(7):not(.currentMonth) {
|
|
36
|
+
color: rgba(var(--smoothly-danger-tint), var(--other-month-opacity));
|
|
19
37
|
}
|
|
20
38
|
td:not(.selected):hover {
|
|
21
|
-
|
|
22
|
-
|
|
39
|
+
color: rgb(var(--smoothly-primary-contrast));
|
|
40
|
+
background: rgb(var(--smoothly-primary-tint));
|
|
23
41
|
}
|
|
24
42
|
td.selected {
|
|
25
|
-
|
|
26
|
-
|
|
43
|
+
color: rgb(var(--smoothly-primary-contrast));
|
|
44
|
+
background: rgb(var(--smoothly-primary-color));
|
|
27
45
|
}
|
|
28
46
|
td:not(.selected,.dateRange):not(:hover).today {
|
|
29
|
-
|
|
47
|
+
background: rgb(var(--smoothly-dark-tint));
|
|
30
48
|
color: rgb(var(--smoothly-dark-contrast));
|
|
31
49
|
}
|
|
32
50
|
td.dateRange {
|
|
33
51
|
color: rgb(var(--smoothly-primary-contrast));
|
|
34
|
-
|
|
52
|
+
background: rgb(var(--smoothly-primary-tint));
|
|
35
53
|
}
|
|
@@ -4,9 +4,7 @@ export class SmoothlyDisplayAmount {
|
|
|
4
4
|
format(amount) {
|
|
5
5
|
const digitsPerGroup = 3;
|
|
6
6
|
const defaultDecimals = 2;
|
|
7
|
-
const maxDecimals = (Currency.decimalDigits(this.currency)
|
|
8
|
-
? Currency.decimalDigits(this.currency)
|
|
9
|
-
: defaultDecimals);
|
|
7
|
+
const maxDecimals = (Currency.decimalDigits(this.currency) ? Currency.decimalDigits(this.currency) : defaultDecimals);
|
|
10
8
|
let beforeSeparator = amount.length;
|
|
11
9
|
let separator;
|
|
12
10
|
let result = amount;
|
|
@@ -78,7 +78,7 @@ export class SmoothlyInput {
|
|
|
78
78
|
end: backend.selectionEnd != undefined ? backend.selectionEnd : backend.value.length,
|
|
79
79
|
direction: backend.selectionDirection ? backend.selectionDirection : "none",
|
|
80
80
|
} });
|
|
81
|
-
if ((!(event.ctrlKey && event.key == "v") && event.key.length == 1) ||
|
|
81
|
+
if ((!((event.ctrlKey || event.metaKey) && event.key == "v") && event.key.length == 1) ||
|
|
82
82
|
event.key == "ArrowLeft" ||
|
|
83
83
|
event.key == "ArrowRight" ||
|
|
84
84
|
event.key == "Delete" ||
|
|
@@ -5,23 +5,23 @@ export class MonthSelector {
|
|
|
5
5
|
onValueChanged(next) {
|
|
6
6
|
this.valueChanged.emit(next);
|
|
7
7
|
}
|
|
8
|
+
adjustMonth(delta) {
|
|
9
|
+
var _a;
|
|
10
|
+
const date = Date.parse((_a = this.value) !== null && _a !== void 0 ? _a : Date.now());
|
|
11
|
+
date.setMonth(date.getMonth() + delta);
|
|
12
|
+
this.value = Date.create(date);
|
|
13
|
+
}
|
|
8
14
|
render() {
|
|
9
15
|
var _a, _b;
|
|
10
16
|
return [
|
|
11
|
-
h("
|
|
17
|
+
h("div", { onClick: () => this.adjustMonth(-1) },
|
|
12
18
|
h("smoothly-icon", { name: "chevron-back-outline", size: "small" })),
|
|
13
19
|
h("smoothly-selector", { onSelected: (e) => (this.value = e.detail) }, generate.years((_a = this.value) !== null && _a !== void 0 ? _a : Date.now()).map(year => (h("smoothly-item", { value: year.date, selected: year.selected }, year.name)))),
|
|
14
20
|
h("smoothly-selector", { onSelected: (e) => (this.value = e.detail) }, generate.months((_b = this.value) !== null && _b !== void 0 ? _b : Date.now()).map(month => (h("smoothly-item", { value: month.date, selected: month.selected }, month.name)))),
|
|
15
|
-
h("
|
|
21
|
+
h("div", { onClick: () => this.adjustMonth(1) },
|
|
16
22
|
h("smoothly-icon", { name: "chevron-forward-outline", size: "small" })),
|
|
17
23
|
];
|
|
18
24
|
}
|
|
19
|
-
adjustMonth(delta) {
|
|
20
|
-
var _a;
|
|
21
|
-
const date = Date.parse((_a = this.value) !== null && _a !== void 0 ? _a : Date.now());
|
|
22
|
-
date.setMonth(date.getMonth() + delta);
|
|
23
|
-
this.value = Date.create(date);
|
|
24
|
-
}
|
|
25
25
|
static get is() { return "smoothly-input-month"; }
|
|
26
26
|
static get encapsulation() { return "scoped"; }
|
|
27
27
|
static get originalStyleUrls() { return {
|
|
@@ -2,7 +2,7 @@ import { Component, Event, h, Prop } from "@stencil/core";
|
|
|
2
2
|
export class SmoothlySelect {
|
|
3
3
|
optionSelected() {
|
|
4
4
|
if (this.selectElement)
|
|
5
|
-
this.selectionChanged.emit({ identifier: this.identifier, value: this.value = this.selectElement.value });
|
|
5
|
+
this.selectionChanged.emit({ identifier: this.identifier, value: (this.value = this.selectElement.value) });
|
|
6
6
|
}
|
|
7
7
|
componentDidLoad() {
|
|
8
8
|
var _a;
|
|
@@ -1,31 +1,52 @@
|
|
|
1
1
|
import { Component, h } from "@stencil/core";
|
|
2
2
|
export class TableDemo {
|
|
3
3
|
render() {
|
|
4
|
-
return
|
|
5
|
-
h("smoothly-table
|
|
6
|
-
h("smoothly-table-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
h("smoothly-table-expandable-
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
h("smoothly-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
h("smoothly-
|
|
4
|
+
return [
|
|
5
|
+
h("smoothly-table", null,
|
|
6
|
+
h("smoothly-table-row", null,
|
|
7
|
+
h("smoothly-table-header", null, "Header A"),
|
|
8
|
+
h("smoothly-table-header", null, "Header B"),
|
|
9
|
+
h("smoothly-table-header", null, "Header C")),
|
|
10
|
+
h("smoothly-table-expandable-row", null,
|
|
11
|
+
h("smoothly-table-expandable-cell", null,
|
|
12
|
+
"Value 1A",
|
|
13
|
+
h("div", { slot: "detail" }, "1A details")),
|
|
14
|
+
h("smoothly-table-expandable-cell", null,
|
|
15
|
+
h("smoothly-display", { type: "price", value: 20, currency: "EUR" }),
|
|
16
|
+
h("div", { slot: "detail" }, "Budget details.")),
|
|
17
|
+
h("smoothly-table-expandable-cell", null,
|
|
18
|
+
h("smoothly-display", { type: "price", value: 18, currency: "EUR" }),
|
|
19
|
+
h("div", { slot: "detail" }, "Cost details."))),
|
|
20
|
+
h("smoothly-table-expandable-row", null,
|
|
21
|
+
h("smoothly-table-expandable-cell", null,
|
|
22
|
+
"Value 1A",
|
|
23
|
+
h("div", { slot: "detail" }, "2A details")),
|
|
24
|
+
h("smoothly-table-expandable-cell", null,
|
|
25
|
+
h("smoothly-display", { type: "price", value: 30, currency: "EUR" }),
|
|
26
|
+
h("div", { slot: "detail" }, "Budget details.")),
|
|
27
|
+
h("smoothly-table-expandable-cell", null,
|
|
28
|
+
h("smoothly-display", { type: "price", value: 38, currency: "EUR" }),
|
|
29
|
+
h("div", { slot: "detail" }, "Cost details.")))),
|
|
30
|
+
h("smoothly-table", null,
|
|
31
|
+
h("smoothly-table-row", null,
|
|
32
|
+
h("smoothly-table-header", null, "Header D"),
|
|
33
|
+
h("smoothly-table-header", null, "Header E"),
|
|
34
|
+
h("smoothly-table-header", null, "Header F")),
|
|
35
|
+
h("smoothly-table-row", null,
|
|
36
|
+
h("smoothly-table-cell", null, "Value 1A"),
|
|
37
|
+
h("smoothly-table-cell", null,
|
|
38
|
+
h("smoothly-display", { type: "price", value: 20, currency: "EUR" })),
|
|
39
|
+
h("smoothly-table-cell", null,
|
|
40
|
+
h("smoothly-display", { type: "price", value: 18, currency: "EUR" })),
|
|
41
|
+
h("div", { slot: "detail" }, "Cost details.")),
|
|
42
|
+
h("smoothly-table-row", null,
|
|
43
|
+
h("smoothly-table-cell", null, "Value 1A"),
|
|
44
|
+
h("smoothly-table-cell", null,
|
|
45
|
+
h("smoothly-display", { type: "price", value: 20, currency: "EUR" })),
|
|
46
|
+
h("smoothly-table-cell", null,
|
|
47
|
+
h("smoothly-display", { type: "price", value: 18, currency: "EUR" })),
|
|
18
48
|
h("div", { slot: "detail" }, "Cost details."))),
|
|
19
|
-
|
|
20
|
-
h("smoothly-table-expandable-cell", null,
|
|
21
|
-
"Value 1A",
|
|
22
|
-
h("div", { slot: "detail" }, "2A details")),
|
|
23
|
-
h("smoothly-table-expandable-cell", null,
|
|
24
|
-
h("smoothly-display", { type: "price", value: 30, currency: "EUR" }),
|
|
25
|
-
h("div", { slot: "detail" }, "Budget details.")),
|
|
26
|
-
h("smoothly-table-expandable-cell", null,
|
|
27
|
-
h("smoothly-display", { type: "price", value: 38, currency: "EUR" }),
|
|
28
|
-
h("div", { slot: "detail" }, "Cost details.")))));
|
|
49
|
+
];
|
|
29
50
|
}
|
|
30
51
|
static get is() { return "smoothly-table-demo"; }
|
|
31
52
|
static get encapsulation() { return "scoped"; }
|
|
@@ -3,7 +3,7 @@ export class TableHeader {
|
|
|
3
3
|
onClick(event) {
|
|
4
4
|
this.sort.emit({
|
|
5
5
|
property: this.name,
|
|
6
|
-
direction: this.sortDirection = this.sortDirection == "ascending" ? "descending" : "ascending",
|
|
6
|
+
direction: (this.sortDirection = this.sortDirection == "ascending" ? "descending" : "ascending"),
|
|
7
7
|
});
|
|
8
8
|
console.log("sort", this.name, this.sortDirection);
|
|
9
9
|
event.preventDefault();
|