@nuralyui/table 0.0.1
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/components/hy-table-actions.d.ts +11 -0
- package/components/hy-table-actions.d.ts.map +1 -0
- package/components/hy-table-actions.js +40 -0
- package/components/hy-table-actions.js.map +1 -0
- package/components/hy-table-content.d.ts +25 -0
- package/components/hy-table-content.d.ts.map +1 -0
- package/components/hy-table-content.js +168 -0
- package/components/hy-table-content.js.map +1 -0
- package/components/hy-table-filter.d.ts +11 -0
- package/components/hy-table-filter.d.ts.map +1 -0
- package/components/hy-table-filter.js +59 -0
- package/components/hy-table-filter.js.map +1 -0
- package/components/hy-table-pagination.d.ts +21 -0
- package/components/hy-table-pagination.d.ts.map +1 -0
- package/components/hy-table-pagination.js +111 -0
- package/components/hy-table-pagination.js.map +1 -0
- package/components/table-actions.style.d.ts +2 -0
- package/components/table-actions.style.d.ts.map +1 -0
- package/components/table-actions.style.js +31 -0
- package/components/table-actions.style.js.map +1 -0
- package/components/table-actions.variables.d.ts +2 -0
- package/components/table-actions.variables.d.ts.map +1 -0
- package/components/table-actions.variables.js +13 -0
- package/components/table-actions.variables.js.map +1 -0
- package/components/table-content.style.d.ts +2 -0
- package/components/table-content.style.d.ts.map +1 -0
- package/components/table-content.style.js +77 -0
- package/components/table-content.style.js.map +1 -0
- package/components/table-content.variables.d.ts +2 -0
- package/components/table-content.variables.d.ts.map +1 -0
- package/components/table-content.variables.js +29 -0
- package/components/table-content.variables.js.map +1 -0
- package/components/table-filter.style.d.ts +2 -0
- package/components/table-filter.style.d.ts.map +1 -0
- package/components/table-filter.style.js +39 -0
- package/components/table-filter.style.js.map +1 -0
- package/components/table-filter.variables.d.ts +2 -0
- package/components/table-filter.variables.d.ts.map +1 -0
- package/components/table-filter.variables.js +17 -0
- package/components/table-filter.variables.js.map +1 -0
- package/components/table-pagination.style.d.ts +2 -0
- package/components/table-pagination.style.d.ts.map +1 -0
- package/components/table-pagination.style.js +102 -0
- package/components/table-pagination.style.js.map +1 -0
- package/components/table-pagination.variables.d.ts +2 -0
- package/components/table-pagination.variables.d.ts.map +1 -0
- package/components/table-pagination.variables.js +17 -0
- package/components/table-pagination.variables.js.map +1 -0
- package/demo/table-demo.d.ts +17 -0
- package/demo/table-demo.d.ts.map +1 -0
- package/demo/table-demo.js +166 -0
- package/demo/table-demo.js.map +1 -0
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -0
- package/index.js +2 -0
- package/index.js.map +1 -0
- package/package.json +15 -0
- package/table.component.d.ts +39 -0
- package/table.component.d.ts.map +1 -0
- package/table.component.js +245 -0
- package/table.component.js.map +1 -0
- package/table.style.d.ts +3 -0
- package/table.style.d.ts.map +1 -0
- package/table.style.js +14 -0
- package/table.style.js.map +1 -0
- package/table.types.d.ts +29 -0
- package/table.types.d.ts.map +1 -0
- package/table.types.js +25 -0
- package/table.types.js.map +1 -0
- package/test/hy-table-actions_test.d.ts +2 -0
- package/test/hy-table-actions_test.d.ts.map +1 -0
- package/test/hy-table-actions_test.js +32 -0
- package/test/hy-table-actions_test.js.map +1 -0
- package/test/hy-table-content_test.d.ts +2 -0
- package/test/hy-table-content_test.d.ts.map +1 -0
- package/test/hy-table-content_test.js +168 -0
- package/test/hy-table-content_test.js.map +1 -0
- package/test/hy-table-filter_test.d.ts +2 -0
- package/test/hy-table-filter_test.d.ts.map +1 -0
- package/test/hy-table-filter_test.js +80 -0
- package/test/hy-table-filter_test.js.map +1 -0
- package/test/hy-table-pagination_test.d.ts +2 -0
- package/test/hy-table-pagination_test.d.ts.map +1 -0
- package/test/hy-table-pagination_test.js +114 -0
- package/test/hy-table-pagination_test.js.map +1 -0
- package/test/hy-table_test.d.ts +2 -0
- package/test/hy-table_test.d.ts.map +1 -0
- package/test/hy-table_test.js +145 -0
- package/test/hy-table_test.js.map +1 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import '../../button/hy-button.component.js';
|
|
3
|
+
import { Sizes } from '../table.types.js';
|
|
4
|
+
export declare class HyTableActions extends LitElement {
|
|
5
|
+
selectedItems: number;
|
|
6
|
+
size: Sizes;
|
|
7
|
+
_onCancelSelection(): void;
|
|
8
|
+
render(): import("lit").TemplateResult<1>;
|
|
9
|
+
static styles: import("lit").CSSResult[];
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=hy-table-actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hy-table-actions.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/hy-table-actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAO,MAAM,KAAK,CAAC;AAGrC,OAAO,qCAAqC,CAAC;AAC7C,OAAO,EAAC,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAExC,qBACa,cAAe,SAAQ,UAAU;IAChC,aAAa,EAAG,MAAM,CAAC;IACK,IAAI,EAAE,KAAK,CAAgB;IAEnE,kBAAkB;IAGT,MAAM;IAQf,OAAgB,MAAM,4BAAU;CACjC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { LitElement, html } from 'lit';
|
|
8
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
9
|
+
import { styles } from './table-actions.style.js';
|
|
10
|
+
import '../../button/hy-button.component.js';
|
|
11
|
+
import { Sizes } from '../table.types.js';
|
|
12
|
+
let HyTableActions = class HyTableActions extends LitElement {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.size = Sizes.Normal;
|
|
16
|
+
}
|
|
17
|
+
_onCancelSelection() {
|
|
18
|
+
this.dispatchEvent(new CustomEvent('cancel-selection'));
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
return html `
|
|
22
|
+
<div class="actions-container">
|
|
23
|
+
<span>${this.selectedItems} selected</span>
|
|
24
|
+
<button @click=${this._onCancelSelection}>Cancel</button>
|
|
25
|
+
</div>
|
|
26
|
+
`;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
HyTableActions.styles = styles;
|
|
30
|
+
__decorate([
|
|
31
|
+
property()
|
|
32
|
+
], HyTableActions.prototype, "selectedItems", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
property({ type: Sizes, reflect: true })
|
|
35
|
+
], HyTableActions.prototype, "size", void 0);
|
|
36
|
+
HyTableActions = __decorate([
|
|
37
|
+
customElement('hy-table-actions')
|
|
38
|
+
], HyTableActions);
|
|
39
|
+
export { HyTableActions };
|
|
40
|
+
//# sourceMappingURL=hy-table-actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hy-table-actions.js","sourceRoot":"","sources":["../../../../src/components/table/components/hy-table-actions.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,KAAK,CAAC;AACrC,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAC,MAAM,EAAC,MAAM,0BAA0B,CAAC;AAChD,OAAO,qCAAqC,CAAC;AAC7C,OAAO,EAAC,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAGxC,IAAa,cAAc,GAA3B,MAAa,cAAe,SAAQ,UAAU;IAA9C;;QAE0C,SAAI,GAAU,KAAK,CAAC,MAAM,CAAC;IAcrE,CAAC;IAZC,kBAAkB;QAChB,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAC1D,CAAC;IACQ,MAAM;QACb,OAAO,IAAI,CAAA;;gBAEC,IAAI,CAAC,aAAa;yBACT,IAAI,CAAC,kBAAkB;;KAE3C,CAAC;IACJ,CAAC;CAEF,CAAA;AADiB,qBAAM,GAAG,MAAO,CAAA;AAdpB;IAAX,QAAQ,EAAE;qDAAwB;AACK;IAAvC,QAAQ,CAAC,EAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;4CAA4B;AAFxD,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CAgB1B;SAhBY,cAAc","sourcesContent":["import {LitElement, html} from 'lit';\nimport {customElement, property} from 'lit/decorators.js';\nimport {styles} from './table-actions.style.js';\nimport '../../button/hy-button.component.js';\nimport {Sizes} from '../table.types.js';\n\n@customElement('hy-table-actions')\nexport class HyTableActions extends LitElement {\n @property() selectedItems!: number;\n @property({type: Sizes, reflect: true}) size: Sizes = Sizes.Normal;\n\n _onCancelSelection() {\n this.dispatchEvent(new CustomEvent('cancel-selection'));\n }\n override render() {\n return html`\n <div class=\"actions-container\">\n <span>${this.selectedItems} selected</span>\n <button @click=${this._onCancelSelection}>Cancel</button>\n </div>\n `;\n }\n static override styles = styles;\n}\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { LitElement, PropertyValueMap } from 'lit';
|
|
2
|
+
import { SelectionMode, Sizes, SortAttribute } from '../table.types.js';
|
|
3
|
+
export declare class HyTableContent extends LitElement {
|
|
4
|
+
headers: [];
|
|
5
|
+
rows: [];
|
|
6
|
+
size: Sizes;
|
|
7
|
+
expandable: string | undefined;
|
|
8
|
+
selectionMode: SelectionMode | undefined;
|
|
9
|
+
selectedItems: boolean[];
|
|
10
|
+
currentPage: number;
|
|
11
|
+
itemPerPage: number;
|
|
12
|
+
sortAttribute: SortAttribute;
|
|
13
|
+
expand: boolean[];
|
|
14
|
+
globalCheck: HTMLInputElement;
|
|
15
|
+
willUpdate(changedProperties: Map<string, this>): void;
|
|
16
|
+
updated(_changedProperties: PropertyValueMap<this> | Map<PropertyKey, unknown>): void;
|
|
17
|
+
_showExpandedContent(index: number): void;
|
|
18
|
+
_onCheckAll(): void;
|
|
19
|
+
_onCheckOne(checkOneEvent: Event, index: number): void;
|
|
20
|
+
_onSelectOne(index: number): void;
|
|
21
|
+
_onUpdateSortOrder(index: number): void;
|
|
22
|
+
render(): import("lit").TemplateResult<1>;
|
|
23
|
+
static styles: import("lit").CSSResult[];
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=hy-table-content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hy-table-content.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/hy-table-content.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,gBAAgB,EAAgB,MAAM,KAAK,CAAC;AAMhE,OAAO,EAAU,aAAa,EAAE,KAAK,EAAE,aAAa,EAAY,MAAM,mBAAmB,CAAC;AAE1F,qBACa,cAAe,SAAQ,UAAU;IACnB,OAAO,EAAG,EAAE,CAAC;IACb,IAAI,EAAG,EAAE,CAAC;IACK,IAAI,EAAG,KAAK,CAAC;IAC3B,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7C,aAAa,EAAE,aAAa,GAAG,SAAS,CAAC;IACzC,aAAa,EAAE,OAAO,EAAE,CAAM;IAC9B,WAAW,EAAG,MAAM,CAAC;IACrB,WAAW,EAAG,MAAM,CAAC;IACrB,aAAa,EAAG,aAAa,CAAC;IACjC,MAAM,EAAE,OAAO,EAAE,CAAM;IAEhC,WAAW,EAAG,gBAAgB,CAAC;IAEtB,UAAU,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC;IAK/C,OAAO,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC,GAAG,IAAI;IAe9F,oBAAoB,CAAC,KAAK,EAAE,MAAM;IAKlC,WAAW;IAUX,WAAW,CAAC,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM;IAK/C,YAAY,CAAC,KAAK,EAAE,MAAM;IAI1B,kBAAkB,CAAC,KAAK,EAAE,MAAM;IAIvB,MAAM;IAmFf,OAAgB,MAAM,4BAAU;CACjC"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { LitElement, html, nothing } from 'lit';
|
|
8
|
+
import { customElement, property, query, state } from 'lit/decorators.js';
|
|
9
|
+
import { styles } from './table-content.style.js';
|
|
10
|
+
import { repeat } from 'lit/directives/repeat.js';
|
|
11
|
+
import { choose } from 'lit/directives/choose.js';
|
|
12
|
+
import { SelectionMode, Sizes, SortOrder } from '../table.types.js';
|
|
13
|
+
let HyTableContent = class HyTableContent extends LitElement {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.selectedItems = [];
|
|
17
|
+
this.expand = [];
|
|
18
|
+
}
|
|
19
|
+
willUpdate(changedProperties) {
|
|
20
|
+
if (changedProperties.has('rows')) {
|
|
21
|
+
this.expand = Array(this.rows.length).fill(false);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
updated(_changedProperties) {
|
|
25
|
+
if (this.globalCheck && _changedProperties.has('selectedItems')) {
|
|
26
|
+
if (this.selectedItems.every((isSelected) => isSelected)) {
|
|
27
|
+
this.globalCheck.checked = true;
|
|
28
|
+
this.globalCheck.setAttribute('data-indeterminate', 'false');
|
|
29
|
+
}
|
|
30
|
+
else if (this.selectedItems.some((isSelected) => isSelected)) {
|
|
31
|
+
this.globalCheck.checked = false;
|
|
32
|
+
this.globalCheck.setAttribute('data-indeterminate', 'true');
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
this.globalCheck.checked = false;
|
|
36
|
+
this.globalCheck.setAttribute('data-indeterminate', 'false');
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
_showExpandedContent(index) {
|
|
41
|
+
this.expand[index] = !this.expand[index];
|
|
42
|
+
this.requestUpdate();
|
|
43
|
+
}
|
|
44
|
+
_onCheckAll() {
|
|
45
|
+
this.dispatchEvent(new CustomEvent('check-all', {
|
|
46
|
+
detail: { isEveryItemChecked: this.selectedItems.every((isSelected) => isSelected) },
|
|
47
|
+
composed: true,
|
|
48
|
+
bubbles: true,
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
51
|
+
_onCheckOne(checkOneEvent, index) {
|
|
52
|
+
const checked = checkOneEvent.target.checked;
|
|
53
|
+
this.dispatchEvent(new CustomEvent('check-one', { detail: { value: checked, index }, composed: true, bubbles: true }));
|
|
54
|
+
}
|
|
55
|
+
_onSelectOne(index) {
|
|
56
|
+
this.dispatchEvent(new CustomEvent('select-one', { detail: { index } }));
|
|
57
|
+
}
|
|
58
|
+
_onUpdateSortOrder(index) {
|
|
59
|
+
this.dispatchEvent(new CustomEvent('update-sort', { detail: { index }, bubbles: true, composed: true }));
|
|
60
|
+
}
|
|
61
|
+
render() {
|
|
62
|
+
return html ` <table>
|
|
63
|
+
<tr>
|
|
64
|
+
${this.expandable || this.selectionMode
|
|
65
|
+
? html `<th>
|
|
66
|
+
${this.selectionMode == SelectionMode.Multiple
|
|
67
|
+
? html `<input id="global-check" type="checkbox" @change=${this._onCheckAll} />`
|
|
68
|
+
: nothing}
|
|
69
|
+
</th>`
|
|
70
|
+
: nothing}
|
|
71
|
+
${repeat(this.headers, (header, index) => html `
|
|
72
|
+
${this.expandable != header.key
|
|
73
|
+
? html `<th @click=${() => this._onUpdateSortOrder(index)}>
|
|
74
|
+
<span
|
|
75
|
+
>${header.name}${index == this.sortAttribute.index
|
|
76
|
+
? choose(this.sortAttribute.order, [
|
|
77
|
+
[SortOrder.Default, () => html `<hy-icon name="arrows-v"></hy-icon>`],
|
|
78
|
+
[SortOrder.Ascending, () => html `<hy-icon name="long-arrow-up"></hy-icon>`],
|
|
79
|
+
[SortOrder.Descending, () => html `<hy-icon name="long-arrow-down"></hy-icon>`],
|
|
80
|
+
])
|
|
81
|
+
: html `<hy-icon name="arrows-v"></hy-icon>`}
|
|
82
|
+
</span>
|
|
83
|
+
</th>`
|
|
84
|
+
: nothing}
|
|
85
|
+
`)}
|
|
86
|
+
</tr>
|
|
87
|
+
${repeat(this.rows, (row, index) => html `
|
|
88
|
+
<tr>
|
|
89
|
+
${this.expandable && !this.selectionMode
|
|
90
|
+
? html `
|
|
91
|
+
<td @click=${() => this._showExpandedContent(index)} class="expand-icon">
|
|
92
|
+
<hy-icon name="${this.expand[index] ? 'angle-up' : 'angle-down'}"></hy-icon>
|
|
93
|
+
</td>
|
|
94
|
+
`
|
|
95
|
+
: this.selectionMode
|
|
96
|
+
? choose(this.selectionMode, [
|
|
97
|
+
[
|
|
98
|
+
SelectionMode.Multiple,
|
|
99
|
+
() => html `<td>
|
|
100
|
+
<input
|
|
101
|
+
type="checkbox"
|
|
102
|
+
@change=${(checkOneEvent) => this._onCheckOne(checkOneEvent, index)}
|
|
103
|
+
.checked=${this.selectedItems[index + (this.currentPage - 1) * this.itemPerPage]}
|
|
104
|
+
/>
|
|
105
|
+
</td> `,
|
|
106
|
+
],
|
|
107
|
+
[
|
|
108
|
+
SelectionMode.Single,
|
|
109
|
+
() => html ` <td>
|
|
110
|
+
<input
|
|
111
|
+
type="radio"
|
|
112
|
+
name="item"
|
|
113
|
+
@change=${() => this._onSelectOne(index)}
|
|
114
|
+
.checked=${this.selectedItems[index + (this.currentPage - 1) * this.itemPerPage]}
|
|
115
|
+
/>
|
|
116
|
+
</td>`,
|
|
117
|
+
],
|
|
118
|
+
])
|
|
119
|
+
: nothing}
|
|
120
|
+
${repeat(this.headers, (header) => html ` ${this.expandable != header.key ? html `<td>${row[header.key]}</td>` : nothing} `)}
|
|
121
|
+
|
|
122
|
+
<tr style="display:${this.expand[index] ? 'table-row' : 'none'};">
|
|
123
|
+
<td colspan=${this.headers.length}> ${this.expandable}: ${row[this.expandable]}</td>
|
|
124
|
+
</tr>
|
|
125
|
+
</tr>
|
|
126
|
+
`)}
|
|
127
|
+
</table>`;
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
HyTableContent.styles = styles;
|
|
131
|
+
__decorate([
|
|
132
|
+
property({ type: Array })
|
|
133
|
+
], HyTableContent.prototype, "headers", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
property({ type: Array })
|
|
136
|
+
], HyTableContent.prototype, "rows", void 0);
|
|
137
|
+
__decorate([
|
|
138
|
+
property({ type: Sizes, reflect: true })
|
|
139
|
+
], HyTableContent.prototype, "size", void 0);
|
|
140
|
+
__decorate([
|
|
141
|
+
property({ type: String })
|
|
142
|
+
], HyTableContent.prototype, "expandable", void 0);
|
|
143
|
+
__decorate([
|
|
144
|
+
property()
|
|
145
|
+
], HyTableContent.prototype, "selectionMode", void 0);
|
|
146
|
+
__decorate([
|
|
147
|
+
property()
|
|
148
|
+
], HyTableContent.prototype, "selectedItems", void 0);
|
|
149
|
+
__decorate([
|
|
150
|
+
property()
|
|
151
|
+
], HyTableContent.prototype, "currentPage", void 0);
|
|
152
|
+
__decorate([
|
|
153
|
+
property()
|
|
154
|
+
], HyTableContent.prototype, "itemPerPage", void 0);
|
|
155
|
+
__decorate([
|
|
156
|
+
property()
|
|
157
|
+
], HyTableContent.prototype, "sortAttribute", void 0);
|
|
158
|
+
__decorate([
|
|
159
|
+
state()
|
|
160
|
+
], HyTableContent.prototype, "expand", void 0);
|
|
161
|
+
__decorate([
|
|
162
|
+
query('#global-check')
|
|
163
|
+
], HyTableContent.prototype, "globalCheck", void 0);
|
|
164
|
+
HyTableContent = __decorate([
|
|
165
|
+
customElement('hy-table-content')
|
|
166
|
+
], HyTableContent);
|
|
167
|
+
export { HyTableContent };
|
|
168
|
+
//# sourceMappingURL=hy-table-content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hy-table-content.js","sourceRoot":"","sources":["../../../../src/components/table/components/hy-table-content.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,UAAU,EAAoB,IAAI,EAAE,OAAO,EAAC,MAAM,KAAK,CAAC;AAChE,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAC,MAAM,EAAC,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAC,MAAM,EAAC,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAC,MAAM,EAAC,MAAM,0BAA0B,CAAC;AAEhD,OAAO,EAAU,aAAa,EAAE,KAAK,EAAiB,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAG1F,IAAa,cAAc,GAA3B,MAAa,cAAe,SAAQ,UAAU;IAA9C;;QAMc,kBAAa,GAAc,EAAE,CAAC;QAIjC,WAAM,GAAc,EAAE,CAAC;IAwIlC,CAAC;IApIU,UAAU,CAAC,iBAAoC;QACtD,IAAI,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;YACjC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACnD;IACH,CAAC;IACQ,OAAO,CAAC,kBAAsE;QACrF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AZpB,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CAkJ1B;SAlJY,cAAc","sourcesContent":["import {LitElement, PropertyValueMap, html, nothing} from 'lit';\nimport {customElement, property, query, state} from 'lit/decorators.js';\nimport {styles} from './table-content.style.js';\nimport {repeat} from 'lit/directives/repeat.js';\nimport {choose} from 'lit/directives/choose.js';\n\nimport {IHeader, SelectionMode, Sizes, SortAttribute, SortOrder} from '../table.types.js';\n\n@customElement('hy-table-content')\nexport class HyTableContent extends LitElement {\n @property({type: Array}) headers!: [];\n @property({type: Array}) rows!: [];\n @property({type: Sizes, reflect: true}) size!: Sizes;\n @property({type: String}) expandable: string | undefined;\n @property() selectionMode: SelectionMode | undefined;\n @property() selectedItems: boolean[] = [];\n @property() currentPage!: number;\n @property() itemPerPage!: number;\n @property() sortAttribute!: SortAttribute;\n @state() expand: boolean[] = [];\n @query('#global-check')\n globalCheck!: HTMLInputElement;\n\n override willUpdate(changedProperties: Map<string, this>) {\n if (changedProperties.has('rows')) {\n this.expand = Array(this.rows.length).fill(false);\n }\n }\n override updated(_changedProperties: PropertyValueMap<this> | Map<PropertyKey, unknown>): void {\n if (this.globalCheck && _changedProperties.has('selectedItems')) {\n if (this.selectedItems.every((isSelected) => isSelected)) {\n this.globalCheck.checked = true;\n this.globalCheck.setAttribute('data-indeterminate', 'false');\n } else if (this.selectedItems.some((isSelected) => isSelected)) {\n this.globalCheck.checked = false;\n this.globalCheck.setAttribute('data-indeterminate', 'true');\n } else {\n this.globalCheck.checked = false;\n this.globalCheck.setAttribute('data-indeterminate', 'false');\n }\n }\n }\n\n _showExpandedContent(index: number) {\n this.expand[index] = !this.expand[index];\n this.requestUpdate();\n }\n\n _onCheckAll() {\n this.dispatchEvent(\n new CustomEvent('check-all', {\n detail: {isEveryItemChecked: this.selectedItems.every((isSelected) => isSelected)},\n composed: true,\n bubbles: true,\n })\n );\n }\n\n _onCheckOne(checkOneEvent: Event, index: number) {\n const checked = (checkOneEvent.target as HTMLInputElement).checked;\n this.dispatchEvent(new CustomEvent('check-one', {detail: {value: checked, index}, composed: true, bubbles: true}));\n }\n\n _onSelectOne(index: number) {\n this.dispatchEvent(new CustomEvent('select-one', {detail: {index}}));\n }\n\n _onUpdateSortOrder(index: number) {\n this.dispatchEvent(new CustomEvent('update-sort', {detail: {index}, bubbles: true, composed: true}));\n }\n\n override render() {\n return html` <table>\n <tr>\n ${this.expandable || this.selectionMode\n ? html`<th>\n ${this.selectionMode == SelectionMode.Multiple\n ? html`<input id=\"global-check\" type=\"checkbox\" @change=${this._onCheckAll} />`\n : nothing}\n </th>`\n : nothing}\n ${repeat(\n this.headers,\n (header: IHeader, index) =>\n html`\n ${this.expandable != header.key\n ? html`<th @click=${() => this._onUpdateSortOrder(index)}>\n <span\n >${header.name}${index == this.sortAttribute.index\n ? choose(this.sortAttribute.order, [\n [SortOrder.Default, () => html`<hy-icon name=\"arrows-v\"></hy-icon>`],\n [SortOrder.Ascending, () => html`<hy-icon name=\"long-arrow-up\"></hy-icon>`],\n [SortOrder.Descending, () => html`<hy-icon name=\"long-arrow-down\"></hy-icon>`],\n ])\n : html`<hy-icon name=\"arrows-v\"></hy-icon>`}\n </span>\n </th>`\n : nothing}\n `\n )}\n </tr>\n ${repeat(\n this.rows,\n (row, index) => html`\n <tr>\n ${\n this.expandable && !this.selectionMode\n ? html`\n <td @click=${() => this._showExpandedContent(index)} class=\"expand-icon\">\n <hy-icon name=\"${this.expand[index] ? 'angle-up' : 'angle-down'}\"></hy-icon>\n </td>\n `\n : this.selectionMode\n ? choose(this.selectionMode, [\n [\n SelectionMode.Multiple,\n () =>\n html`<td>\n <input\n type=\"checkbox\"\n @change=${(checkOneEvent: Event) => this._onCheckOne(checkOneEvent, index)}\n .checked=${this.selectedItems[index + (this.currentPage - 1) * this.itemPerPage]}\n />\n </td> `,\n ],\n [\n SelectionMode.Single,\n () => html` <td>\n <input\n type=\"radio\"\n name=\"item\"\n @change=${() => this._onSelectOne(index)}\n .checked=${this.selectedItems[index + (this.currentPage - 1) * this.itemPerPage]}\n />\n </td>`,\n ],\n ])\n : nothing\n }\n ${repeat(\n this.headers,\n (header: IHeader) =>\n html` ${this.expandable != header.key ? html`<td>${row[header.key]}</td>` : nothing} `\n )}\n\n <tr style=\"display:${this.expand[index] ? 'table-row' : 'none'};\">\n <td colspan=${this.headers.length}> ${this.expandable}: ${row[this.expandable!]}</td>\n </tr>\n </tr>\n `\n )}\n </table>`;\n }\n\n static override styles = styles;\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class HyTableFilter extends LitElement {
|
|
3
|
+
showInput: boolean;
|
|
4
|
+
value: string;
|
|
5
|
+
updated(): void;
|
|
6
|
+
_handleInput(): void;
|
|
7
|
+
_onChange(inputChangeEvent: Event): void;
|
|
8
|
+
render(): import("lit").TemplateResult<1>;
|
|
9
|
+
static styles: import("lit").CSSResult[];
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=hy-table-filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hy-table-filter.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/hy-table-filter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAgB,MAAM,KAAK,CAAC;AAK9C,qBACa,aAAc,SAAQ,UAAU;IAE3C,SAAS,UAAS;IAGlB,KAAK,SAAgB;IAEZ,OAAO;IAMhB,YAAY;IAIZ,SAAS,CAAC,gBAAgB,EAAE,KAAK;IAIxB,MAAM;IAiBf,OAAgB,MAAM,4BAAU;CACjC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { LitElement, html, nothing } from 'lit';
|
|
8
|
+
import { customElement, property, state } from 'lit/decorators.js';
|
|
9
|
+
import { styles } from './table-filter.style.js';
|
|
10
|
+
import { EMPTY_STRING } from '../table.types.js';
|
|
11
|
+
let HyTableFilter = class HyTableFilter extends LitElement {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.showInput = false;
|
|
15
|
+
this.value = EMPTY_STRING;
|
|
16
|
+
}
|
|
17
|
+
updated() {
|
|
18
|
+
var _a, _b;
|
|
19
|
+
if (this.showInput) {
|
|
20
|
+
(_b = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('input')) === null || _b === void 0 ? void 0 : _b.focus();
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
_handleInput() {
|
|
24
|
+
this.showInput = !this.showInput;
|
|
25
|
+
}
|
|
26
|
+
_onChange(inputChangeEvent) {
|
|
27
|
+
this.value = inputChangeEvent.target.value;
|
|
28
|
+
this.dispatchEvent(new CustomEvent('value-change', { detail: { value: this.value }, bubbles: true, composed: true }));
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
return html `
|
|
32
|
+
<div class="filter-container">
|
|
33
|
+
${this.showInput
|
|
34
|
+
? html ` <hy-icon name="search" class="search-icon"></hy-icon>
|
|
35
|
+
<input
|
|
36
|
+
type="text"
|
|
37
|
+
placeholder="search"
|
|
38
|
+
@blur=${!this.value.trim() ? this._handleInput : nothing}
|
|
39
|
+
@input=${this._onChange}
|
|
40
|
+
/>`
|
|
41
|
+
: html `<div class="icon-container" @click=${this._handleInput}>
|
|
42
|
+
<hy-icon name="search"></hy-icon>
|
|
43
|
+
</div> `}
|
|
44
|
+
</div>
|
|
45
|
+
`;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
HyTableFilter.styles = styles;
|
|
49
|
+
__decorate([
|
|
50
|
+
property({ reflect: true, type: Boolean })
|
|
51
|
+
], HyTableFilter.prototype, "showInput", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
state()
|
|
54
|
+
], HyTableFilter.prototype, "value", void 0);
|
|
55
|
+
HyTableFilter = __decorate([
|
|
56
|
+
customElement('hy-table-filter')
|
|
57
|
+
], HyTableFilter);
|
|
58
|
+
export { HyTableFilter };
|
|
59
|
+
//# sourceMappingURL=hy-table-filter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hy-table-filter.js","sourceRoot":"","sources":["../../../../src/components/table/components/hy-table-filter.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,UAAU,EAAE,IAAI,EAAE,OAAO,EAAC,MAAM,KAAK,CAAC;AAC9C,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAC,MAAM,EAAC,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAC,YAAY,EAAC,MAAM,mBAAmB,CAAC;AAG/C,IAAa,aAAa,GAA1B,MAAa,aAAc,SAAQ,UAAU;IAA7C;;QAEE,cAAS,GAAG,KAAK,CAAC;QAGlB,UAAK,GAAG,YAAY,CAAC;IAkCvB,CAAC;IAhCU,OAAO;;QACd,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,MAAA,MAAA,IAAI,CAAC,UAAU,0CAAE,aAAa,CAAC,OAAO,CAAC,0CAAE,KAAK,EAAE,CAAC;SAClD;IACH,CAAC;IAED,YAAY;QACV,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC;IACnC,CAAC;IAED,SAAS,CAAC,gBAAuB;QAC/B,IAAI,CAAC,KAAK,GAAI,gBAAgB,CAAC,MAA2B,CAAC,KAAK,CAAC;QACjE,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,cAAc,EAAE,EAAC,MAAM,EAAE,EAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC,CAAC,CAAC;IACpH,CAAC;IACQ,MAAM;QACb,OAAO,IAAI,CAAA;;UAEL,IAAI,CAAC,SAAS;YACd,CAAC,CAAC,IAAI,CAAA;;;;wBAIQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,OAAO;yBAC/C,IAAI,CAAC,SAAS;iBACtB;YACP,CAAC,CAAC,IAAI,CAAA,sCAAsC,IAAI,CAAC,YAAY;;oBAEnD;;KAEf,CAAC;IACJ,CAAC;CAEF,CAAA;AADiB,oBAAM,GAAG,MAAO,CAAA;AApChC;IADC,QAAQ,CAAC,EAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAC,CAAC;gDACvB;AAGlB;IADC,KAAK,EAAE;4CACa;AALV,aAAa;IADzB,aAAa,CAAC,iBAAiB,CAAC;GACpB,aAAa,CAuCzB;SAvCY,aAAa","sourcesContent":["import {LitElement, html, nothing} from 'lit';\nimport {customElement, property, state} from 'lit/decorators.js';\nimport {styles} from './table-filter.style.js';\nimport {EMPTY_STRING} from '../table.types.js';\n\n@customElement('hy-table-filter')\nexport class HyTableFilter extends LitElement {\n @property({reflect: true, type: Boolean})\n showInput = false;\n\n @state()\n value = EMPTY_STRING;\n\n override updated() {\n if (this.showInput) {\n this.shadowRoot?.querySelector('input')?.focus();\n }\n }\n\n _handleInput() {\n this.showInput = !this.showInput;\n }\n\n _onChange(inputChangeEvent: Event) {\n this.value = (inputChangeEvent.target as HTMLInputElement).value;\n this.dispatchEvent(new CustomEvent('value-change', {detail: {value: this.value}, bubbles: true, composed: true}));\n }\n override render() {\n return html`\n <div class=\"filter-container\">\n ${this.showInput\n ? html` <hy-icon name=\"search\" class=\"search-icon\"></hy-icon>\n <input\n type=\"text\"\n placeholder=\"search\"\n @blur=${!this.value.trim() ? this._handleInput : nothing}\n @input=${this._onChange}\n />`\n : html`<div class=\"icon-container\" @click=${this._handleInput}>\n <hy-icon name=\"search\"></hy-icon>\n </div> `}\n </div>\n `;\n }\n static override styles = styles;\n}\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { LitElement, PropertyValueMap } from 'lit';
|
|
2
|
+
import { Sizes } from '../table.types.js';
|
|
3
|
+
export declare class HyTablePagination extends LitElement {
|
|
4
|
+
numberOfItems: number;
|
|
5
|
+
itemPerPage: number[];
|
|
6
|
+
selectedItemPerPage: number;
|
|
7
|
+
currentPage: number;
|
|
8
|
+
size: Sizes;
|
|
9
|
+
numberOfPages: number;
|
|
10
|
+
fromItem: number;
|
|
11
|
+
toItem: number;
|
|
12
|
+
enableNext: boolean;
|
|
13
|
+
enablePrevious: boolean;
|
|
14
|
+
willUpdate(_changedProperties: PropertyValueMap<this>): void;
|
|
15
|
+
_handleItemPerPageChange(itemPerPageEvent: Event): void;
|
|
16
|
+
_nextPage(): void;
|
|
17
|
+
_previousPage(): void;
|
|
18
|
+
render(): import("lit").TemplateResult<1>;
|
|
19
|
+
static styles: import("lit").CSSResult[];
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=hy-table-pagination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hy-table-pagination.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/hy-table-pagination.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,gBAAgB,EAAgB,MAAM,KAAK,CAAC;AAIhE,OAAO,EAAC,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAExC,qBACa,iBAAkB,SAAQ,UAAU;IAE/C,aAAa,EAAG,MAAM,CAAC;IAEvB,WAAW,EAAG,MAAM,EAAE,CAAC;IAEvB,mBAAmB,EAAG,MAAM,CAAC;IAE7B,WAAW,EAAG,MAAM,CAAC;IACmB,IAAI,EAAG,KAAK,CAAC;IAGrD,aAAa,EAAG,MAAM,CAAC;IAEvB,QAAQ,EAAG,MAAM,CAAC;IAElB,MAAM,EAAG,MAAM,CAAC;IAEhB,UAAU,UAAQ;IAElB,cAAc,UAAQ;IAEb,UAAU,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAAG,IAAI;IAYrE,wBAAwB,CAAC,gBAAgB,EAAE,KAAK;IAKhD,SAAS;IAIT,aAAa;IAKJ,MAAM;IAkCf,OAAgB,MAAM,4BAAU;CACjC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { LitElement, html, nothing } from 'lit';
|
|
8
|
+
import { customElement, property, state } from 'lit/decorators.js';
|
|
9
|
+
import { styles } from './table-pagination.style.js';
|
|
10
|
+
import { repeat } from 'lit/directives/repeat.js';
|
|
11
|
+
import { Sizes } from '../table.types.js';
|
|
12
|
+
let HyTablePagination = class HyTablePagination extends LitElement {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.enableNext = true;
|
|
16
|
+
this.enablePrevious = true;
|
|
17
|
+
}
|
|
18
|
+
willUpdate(_changedProperties) {
|
|
19
|
+
this.numberOfPages = Math.ceil(this.numberOfItems / this.selectedItemPerPage);
|
|
20
|
+
this.fromItem =
|
|
21
|
+
this.currentPage > 0 ? this.currentPage * this.selectedItemPerPage - this.selectedItemPerPage + 1 : 0;
|
|
22
|
+
this.toItem =
|
|
23
|
+
this.currentPage * this.selectedItemPerPage <= this.numberOfItems
|
|
24
|
+
? this.currentPage * this.selectedItemPerPage
|
|
25
|
+
: this.numberOfItems;
|
|
26
|
+
this.enableNext = this.toItem < this.numberOfItems;
|
|
27
|
+
this.enablePrevious = this.fromItem > 1;
|
|
28
|
+
}
|
|
29
|
+
_handleItemPerPageChange(itemPerPageEvent) {
|
|
30
|
+
this.selectedItemPerPage = +itemPerPageEvent.target.value;
|
|
31
|
+
this.dispatchEvent(new CustomEvent('item-per-page', { detail: { selectedItemPerPage: this.selectedItemPerPage } }));
|
|
32
|
+
}
|
|
33
|
+
_nextPage() {
|
|
34
|
+
this.currentPage++;
|
|
35
|
+
this.dispatchEvent(new CustomEvent('update-page', { detail: { page: this.currentPage } }));
|
|
36
|
+
}
|
|
37
|
+
_previousPage() {
|
|
38
|
+
this.currentPage--;
|
|
39
|
+
this.dispatchEvent(new CustomEvent('update-page', { detail: { page: this.currentPage } }));
|
|
40
|
+
}
|
|
41
|
+
render() {
|
|
42
|
+
return html `
|
|
43
|
+
<div class="pagination-container">
|
|
44
|
+
<div class="left-content">
|
|
45
|
+
<span class="select-details">
|
|
46
|
+
Items per page:
|
|
47
|
+
<select @change=${this._handleItemPerPageChange}>
|
|
48
|
+
${repeat(this.itemPerPage, (item) => html ` <option value=${item}>${item}</option> `)}
|
|
49
|
+
</select>
|
|
50
|
+
</span>
|
|
51
|
+
<span class="items-details"> ${this.fromItem} - ${this.toItem} of ${this.numberOfItems} items</span>
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<div class="right-content">
|
|
55
|
+
<span class="page-details"> ${this.currentPage} of ${this.numberOfPages} pages </span>
|
|
56
|
+
<span class="icon-container">
|
|
57
|
+
<hy-icon
|
|
58
|
+
class="left-arrow"
|
|
59
|
+
data-enabled=${this.enablePrevious}
|
|
60
|
+
name="caret-left"
|
|
61
|
+
@click=${this.enablePrevious ? this._previousPage : nothing}
|
|
62
|
+
></hy-icon>
|
|
63
|
+
|
|
64
|
+
<hy-icon
|
|
65
|
+
class="right-arrow"
|
|
66
|
+
data-enabled=${this.enableNext}
|
|
67
|
+
name="caret-right"
|
|
68
|
+
@click=${this.enableNext ? this._nextPage : nothing}
|
|
69
|
+
></hy-icon>
|
|
70
|
+
</span>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
`;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
HyTablePagination.styles = styles;
|
|
77
|
+
__decorate([
|
|
78
|
+
property()
|
|
79
|
+
], HyTablePagination.prototype, "numberOfItems", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
property()
|
|
82
|
+
], HyTablePagination.prototype, "itemPerPage", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
property()
|
|
85
|
+
], HyTablePagination.prototype, "selectedItemPerPage", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
property()
|
|
88
|
+
], HyTablePagination.prototype, "currentPage", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
property({ type: Sizes, reflect: true })
|
|
91
|
+
], HyTablePagination.prototype, "size", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
state()
|
|
94
|
+
], HyTablePagination.prototype, "numberOfPages", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
state()
|
|
97
|
+
], HyTablePagination.prototype, "fromItem", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
state()
|
|
100
|
+
], HyTablePagination.prototype, "toItem", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
state()
|
|
103
|
+
], HyTablePagination.prototype, "enableNext", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
state()
|
|
106
|
+
], HyTablePagination.prototype, "enablePrevious", void 0);
|
|
107
|
+
HyTablePagination = __decorate([
|
|
108
|
+
customElement('hy-table-pagination')
|
|
109
|
+
], HyTablePagination);
|
|
110
|
+
export { HyTablePagination };
|
|
111
|
+
//# sourceMappingURL=hy-table-pagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hy-table-pagination.js","sourceRoot":"","sources":["../../../../src/components/table/components/hy-table-pagination.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,UAAU,EAAoB,IAAI,EAAE,OAAO,EAAC,MAAM,KAAK,CAAC;AAChE,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAC,MAAM,EAAC,MAAM,6BAA6B,CAAC;AACnD,OAAO,EAAC,MAAM,EAAC,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAC,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAGxC,IAAa,iBAAiB,GAA9B,MAAa,iBAAkB,SAAQ,UAAU;IAAjD;;QAkBE,eAAU,GAAG,IAAI,CAAC;QAElB,mBAAc,GAAG,IAAI,CAAC;IA+DxB,CAAC;IA7DU,UAAU,CAAC,kBAA0C;QAC5D,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,mBAAmB,CAAC,CAAC;QAC9E,IAAI,CAAC,QAAQ;YACX,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACxG,IAAI,CAAC,MAAM;YACT,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,mBAAmB,IAAI,IAAI,CAAC,aAAa;gBAC/D,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,mBAAmB;gBAC7C,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC;QACzB,I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CAAC,aAAa,CAAC,CAAC,CAAC,OAAO;;;;;6BAK5C,IAAI,CAAC,UAAU;;uBAErB,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO;;;;;KAK5D,CAAC;IACJ,CAAC;CAEF,CAAA;AADiB,wBAAM,GAAG,MAAO,CAAA;AAhFhC;IADC,QAAQ,EAAE;wDACY;AAEvB;IADC,QAAQ,EAAE;sDACY;AAEvB;IADC,QAAQ,EAAE;8DACkB;AAE7B;IADC,QAAQ,EAAE;sDACU;AACmB;IAAvC,QAAQ,CAAC,EAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;+CAAc;AAGrD;IADC,KAAK,EAAE;wDACe;AAEvB;IADC,KAAK,EAAE;mDACU;AAElB;IADC,KAAK,EAAE;iDACQ;AAEhB;IADC,KAAK,EAAE;qDACU;AAElB;IADC,KAAK,EAAE;yDACc;AApBX,iBAAiB;IAD7B,aAAa,CAAC,qBAAqB,CAAC;GACxB,iBAAiB,CAmF7B;SAnFY,iBAAiB","sourcesContent":["import {LitElement, PropertyValueMap, html, nothing} from 'lit';\nimport {customElement, property, state} from 'lit/decorators.js';\nimport {styles} from './table-pagination.style.js';\nimport {repeat} from 'lit/directives/repeat.js';\nimport {Sizes} from '../table.types.js';\n\n@customElement('hy-table-pagination')\nexport class HyTablePagination extends LitElement {\n @property()\n numberOfItems!: number;\n @property()\n itemPerPage!: number[];\n @property()\n selectedItemPerPage!: number;\n @property()\n currentPage!: number;\n @property({type: Sizes, reflect: true}) size!: Sizes;\n\n @state()\n numberOfPages!: number;\n @state()\n fromItem!: number;\n @state()\n toItem!: number;\n @state()\n enableNext = true;\n @state()\n enablePrevious = true;\n\n override willUpdate(_changedProperties: PropertyValueMap<this>): void {\n this.numberOfPages = Math.ceil(this.numberOfItems / this.selectedItemPerPage);\n this.fromItem =\n this.currentPage > 0 ? this.currentPage * this.selectedItemPerPage - this.selectedItemPerPage + 1 : 0;\n this.toItem =\n this.currentPage * this.selectedItemPerPage <= this.numberOfItems\n ? this.currentPage * this.selectedItemPerPage\n : this.numberOfItems;\n this.enableNext = this.toItem < this.numberOfItems;\n this.enablePrevious = this.fromItem > 1;\n }\n\n _handleItemPerPageChange(itemPerPageEvent: Event) {\n this.selectedItemPerPage = +(itemPerPageEvent.target as HTMLSelectElement).value;\n this.dispatchEvent(new CustomEvent('item-per-page', {detail: {selectedItemPerPage: this.selectedItemPerPage}}));\n }\n\n _nextPage() {\n this.currentPage++;\n this.dispatchEvent(new CustomEvent('update-page', {detail: {page: this.currentPage}}));\n }\n _previousPage() {\n this.currentPage--;\n this.dispatchEvent(new CustomEvent('update-page', {detail: {page: this.currentPage}}));\n }\n\n override render() {\n return html`\n <div class=\"pagination-container\">\n <div class=\"left-content\">\n <span class=\"select-details\">\n Items per page:\n <select @change=${this._handleItemPerPageChange}>\n ${repeat(this.itemPerPage, (item) => html` <option value=${item}>${item}</option> `)}\n </select>\n </span>\n <span class=\"items-details\"> ${this.fromItem} - ${this.toItem} of ${this.numberOfItems} items</span>\n </div>\n\n <div class=\"right-content\">\n <span class=\"page-details\"> ${this.currentPage} of ${this.numberOfPages} pages </span>\n <span class=\"icon-container\">\n <hy-icon\n class=\"left-arrow\"\n data-enabled=${this.enablePrevious}\n name=\"caret-left\"\n @click=${this.enablePrevious ? this._previousPage : nothing}\n ></hy-icon>\n\n <hy-icon\n class=\"right-arrow\"\n data-enabled=${this.enableNext}\n name=\"caret-right\"\n @click=${this.enableNext ? this._nextPage : nothing}\n ></hy-icon>\n </span>\n </div>\n </div>\n `;\n }\n static override styles = styles;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-actions.style.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/table-actions.style.ts"],"names":[],"mappings":"AA+BA,eAAO,MAAM,MAAM,2BAAsC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
import { styleVariables } from './table-actions.variables.js';
|
|
3
|
+
const tableActionsStyle = css `
|
|
4
|
+
.actions-container {
|
|
5
|
+
background-color: var(--hybrid-actions-background-color);
|
|
6
|
+
padding: 10px;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
display: flex;
|
|
9
|
+
justify-content: space-between;
|
|
10
|
+
color: var(--hybrid-actions-text-color);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.actions-container button {
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
border: none;
|
|
16
|
+
color: var(--hybrid-actions-text-color);
|
|
17
|
+
background-color: var(--hybrid-actions-background-color);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.actions-container {
|
|
21
|
+
padding: 10px;
|
|
22
|
+
}
|
|
23
|
+
:host([size='small']) .actions-container {
|
|
24
|
+
padding: 5px;
|
|
25
|
+
}
|
|
26
|
+
:host([size='large']) .actions-container {
|
|
27
|
+
padding: 15px;
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
30
|
+
export const styles = [tableActionsStyle, styleVariables];
|
|
31
|
+
//# sourceMappingURL=table-actions.style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-actions.style.js","sourceRoot":"","sources":["../../../../src/components/table/components/table-actions.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,OAAO,EAAC,cAAc,EAAC,MAAM,8BAA8B,CAAC;AAE5D,MAAM,iBAAiB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;CA0B5B,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,iBAAiB,EAAE,cAAc,CAAC,CAAC","sourcesContent":["import {css} from 'lit';\nimport {styleVariables} from './table-actions.variables.js';\n\nconst tableActionsStyle = css`\n .actions-container {\n background-color: var(--hybrid-actions-background-color);\n padding: 10px;\n box-sizing: border-box;\n display: flex;\n justify-content: space-between;\n color: var(--hybrid-actions-text-color);\n }\n\n .actions-container button {\n cursor: pointer;\n border: none;\n color: var(--hybrid-actions-text-color);\n background-color: var(--hybrid-actions-background-color);\n }\n\n .actions-container {\n padding: 10px;\n }\n :host([size='small']) .actions-container {\n padding: 5px;\n }\n :host([size='large']) .actions-container {\n padding: 15px;\n }\n`;\n\nexport const styles = [tableActionsStyle, styleVariables];\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-actions.variables.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/table-actions.variables.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,yBAU1B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const styleVariables = css `
|
|
3
|
+
:host {
|
|
4
|
+
--hybrid-actions-text-color: #ffffff;
|
|
5
|
+
--hybrid-actions-background-color: #0f62fe;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@media (prefers-color-scheme: dark) {
|
|
9
|
+
:host {
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
`;
|
|
13
|
+
//# sourceMappingURL=table-actions.variables.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-actions.variables.js","sourceRoot":"","sources":["../../../../src/components/table/components/table-actions.variables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAA;;;;;;;;;;CAUhC,CAAC","sourcesContent":["import {css} from 'lit';\n\nexport const styleVariables = css`\n :host {\n --hybrid-actions-text-color: #ffffff;\n --hybrid-actions-background-color: #0f62fe;\n }\n\n @media (prefers-color-scheme: dark) {\n :host {\n }\n }\n`;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-content.style.d.ts","sourceRoot":"","sources":["../../../../src/components/table/components/table-content.style.ts"],"names":[],"mappings":"AA6EA,eAAO,MAAM,MAAM,2BAAsC,CAAC"}
|