@paperless/core 0.1.0-alpha.365 → 0.1.0-alpha.367
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/CHANGELOG.md +20 -0
- package/dist/build/{p-2bc6b026.entry.js → p-c8027593.entry.js} +2 -2
- package/dist/build/p-c8027593.entry.js.map +1 -0
- package/dist/{paperless/p-bdaeb7c7.entry.js → build/p-cd96ed9e.entry.js} +2 -2
- package/dist/build/p-cd96ed9e.entry.js.map +1 -0
- package/dist/build/paperless.esm.js +1 -1
- package/dist/build/paperless.esm.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/p-illustration_6.cjs.entry.js +13 -9
- package/dist/cjs/p-illustration_6.cjs.entry.js.map +1 -1
- package/dist/cjs/p-table.cjs.entry.js +7 -4
- package/dist/cjs/p-table.cjs.entry.js.map +1 -1
- package/dist/cjs/paperless.cjs.js +1 -1
- package/dist/collection/components/atoms/button/button.component.css +1 -1
- package/dist/collection/components/atoms/divider/divider.component.css +1 -1
- package/dist/collection/components/atoms/dropdown-menu-container/dropdown-menu-container.component.css +1 -1
- package/dist/collection/components/atoms/dropdown-menu-item/dropdown-menu-item.component.css +1 -1
- package/dist/collection/components/atoms/helper/helper.component.css +1 -1
- package/dist/collection/components/atoms/icon/icon.component.css +1 -1
- package/dist/collection/components/atoms/label/label.component.css +1 -1
- package/dist/collection/components/atoms/loader/loader.component.css +1 -1
- package/dist/collection/components/atoms/pagination-item/pagination-item.component.css +1 -1
- package/dist/collection/components/atoms/segment-container/segment-container.component.css +1 -1
- package/dist/collection/components/atoms/segment-item/segment-item.component.css +1 -1
- package/dist/collection/components/atoms/table-container/table-container.component.css +1 -1
- package/dist/collection/components/atoms/tooltip/tooltip.component.css +1 -1
- package/dist/collection/components/molecules/attachment/attachment.component.css +1 -1
- package/dist/collection/components/molecules/calendar/calendar.component.css +1 -1
- package/dist/collection/components/molecules/datepicker/datepicker.component.css +1 -1
- package/dist/collection/components/molecules/dropdown/dropdown.component.css +1 -1
- package/dist/collection/components/molecules/input-group/input-group.component.css +1 -1
- package/dist/collection/components/molecules/pagination/pagination.component.css +1 -1
- package/dist/collection/components/molecules/profile/profile.component.css +1 -1
- package/dist/collection/components/molecules/select/select.component.css +1 -1
- package/dist/collection/components/molecules/table-cell/table-cell.component.css +1 -1
- package/dist/collection/components/molecules/table-footer/table-footer.component.css +1 -1
- package/dist/collection/components/molecules/table-header/table-header.component.css +1 -1
- package/dist/collection/components/molecules/table-header/table-header.component.js +53 -9
- package/dist/collection/components/molecules/table-header/table-header.component.js.map +1 -1
- package/dist/collection/components/molecules/table-row/table-row.component.css +1 -1
- package/dist/collection/components/organisms/table/table.component.css +1 -1
- package/dist/collection/components/organisms/table/table.component.js +65 -4
- package/dist/collection/components/organisms/table/table.component.js.map +1 -1
- package/dist/components/p-table.js +10 -4
- package/dist/components/p-table.js.map +1 -1
- package/dist/components/table-header.component.js +15 -9
- package/dist/components/table-header.component.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/p-illustration_6.entry.js +13 -9
- package/dist/esm/p-illustration_6.entry.js.map +1 -1
- package/dist/esm/p-table.entry.js +7 -4
- package/dist/esm/p-table.entry.js.map +1 -1
- package/dist/esm/paperless.js +1 -1
- package/dist/index.html +1 -1
- package/dist/paperless/{p-2bc6b026.entry.js → p-c8027593.entry.js} +2 -2
- package/dist/paperless/p-c8027593.entry.js.map +1 -0
- package/dist/{build/p-bdaeb7c7.entry.js → paperless/p-cd96ed9e.entry.js} +2 -2
- package/dist/paperless/p-cd96ed9e.entry.js.map +1 -0
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/paperless/paperless.esm.js.map +1 -1
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist/types/components/molecules/table-header/table-header.component.d.ts +9 -0
- package/dist/types/components/organisms/table/table.component.d.ts +13 -0
- package/dist/types/components.d.ts +42 -0
- package/hydrate/index.js +42 -30
- package/package.json +2 -2
- package/dist/build/p-2bc6b026.entry.js.map +0 -1
- package/dist/build/p-bdaeb7c7.entry.js.map +0 -1
- package/dist/paperless/p-2bc6b026.entry.js.map +0 -1
- package/dist/paperless/p-bdaeb7c7.entry.js.map +0 -1
|
@@ -4,11 +4,13 @@ import { formatTranslation, getLocaleComponentStrings, } from '../../../utils/lo
|
|
|
4
4
|
export class TableHeader {
|
|
5
5
|
constructor() {
|
|
6
6
|
this._defaultFilterButtonTemplate = () => formatTranslation(this._locales.filter);
|
|
7
|
-
this._defaultEditButtonTemplate = (amount) =>
|
|
8
|
-
? this.
|
|
9
|
-
: amount ===
|
|
10
|
-
? this._locales.
|
|
11
|
-
:
|
|
7
|
+
this._defaultEditButtonTemplate = (amount) => this.editText
|
|
8
|
+
? this.editText
|
|
9
|
+
: formatTranslation(amount === 0
|
|
10
|
+
? this._locales.edit
|
|
11
|
+
: amount === 1
|
|
12
|
+
? this._locales.edit_single
|
|
13
|
+
: this._locales.edit_plural, { amount });
|
|
12
14
|
this._queryObserver = new Subject();
|
|
13
15
|
this.quickFilters = [];
|
|
14
16
|
this.activeQuickFilterIdentifier = undefined;
|
|
@@ -20,6 +22,8 @@ export class TableHeader {
|
|
|
20
22
|
this.selectedFiltersAmount = undefined;
|
|
21
23
|
this.filterButtonTemplate = this._defaultFilterButtonTemplate;
|
|
22
24
|
this.enableEdit = true;
|
|
25
|
+
this.editIcon = 'pencil';
|
|
26
|
+
this.editText = undefined;
|
|
23
27
|
this.canEdit = false;
|
|
24
28
|
this.editButtonTemplate = this._defaultEditButtonTemplate;
|
|
25
29
|
this._locales = {};
|
|
@@ -36,20 +40,20 @@ export class TableHeader {
|
|
|
36
40
|
const activeQuickFilter = this.quickFilters.find((f) => f.identifier === this.activeQuickFilterIdentifier);
|
|
37
41
|
const mobileTotal = (this.selectedFiltersAmount || 0) +
|
|
38
42
|
((activeQuickFilter === null || activeQuickFilter === void 0 ? void 0 : activeQuickFilter.default) ? 0 : 1);
|
|
39
|
-
return (h(Host, { class: "p-table-header" }, this.loading && (h("p-loader", { variant: "ghost", class: "hidden
|
|
43
|
+
return (h(Host, { class: "p-table-header" }, this.loading && (h("p-loader", { variant: "ghost", class: "hidden h-8 w-3/4 rounded desktop-xs:flex" })), !this.loading && this.quickFilters.length > 0 && (h("p-segment-container", { class: "hidden desktop-xs:flex" }, this.quickFilters.map((item) => (h("p-segment-item", { active: item.identifier ===
|
|
40
44
|
this.activeQuickFilterIdentifier, onClick: () => this.quickFilter.emit(item) }, typeof item.text === 'string'
|
|
41
45
|
? item.text
|
|
42
|
-
: item.text(), ' ', (item === null || item === void 0 ? void 0 : item.count) >= 0 ? `(${item.count})` : ''))))), h("div", { class: "flex flex-col
|
|
46
|
+
: item.text(), ' ', (item === null || item === void 0 ? void 0 : item.count) >= 0 ? `(${item.count})` : ''))))), h("div", { class: "flex flex-col justify-end gap-4 justify-self-end desktop-xs:flex-row" }, this.enableSearch && (h("p-input-group", { icon: "search", size: "small" }, h("input", { type: "text", slot: "input", placeholder: "Zoeken...", value: this.query, onInput: (ev) => this._queryObserver.next(ev.target.value) }))), this.enableFilter && (h("p-button", { icon: "filter", variant: "secondary", size: "small", class: "w-full desktop-xs:w-auto", onClick: () => this.filter.emit() }, this.filterButtonTemplate
|
|
43
47
|
? this.filterButtonTemplate()
|
|
44
48
|
: this._defaultFilterButtonTemplate(), this.selectedFiltersAmount &&
|
|
45
49
|
this._getLabel(this.selectedFiltersAmount), mobileTotal > 0 &&
|
|
46
|
-
this._getLabel(mobileTotal, 'mobile'))), this.enableEdit && this._buttonTemplate()), this.enableEdit && this.canEdit && (h("div", { class: "fixed bottom-0 left-0 w-full
|
|
50
|
+
this._getLabel(mobileTotal, 'mobile'))), this.enableEdit && this._buttonTemplate()), this.enableEdit && this.canEdit && (h("div", { class: "fixed bottom-0 left-0 block w-full border border-solid border-transparent border-t-mystic-dark bg-white p-4 desktop-xs:hidden" }, this._buttonTemplate(true)))));
|
|
47
51
|
}
|
|
48
52
|
async _setLocales() {
|
|
49
53
|
this._locales = await getLocaleComponentStrings(this._el);
|
|
50
54
|
}
|
|
51
55
|
_buttonTemplate(mobile = false) {
|
|
52
|
-
return (h("p-button", { class: mobile ? 'w-full' : 'hidden desktop-xs:flex', icon:
|
|
56
|
+
return (h("p-button", { class: mobile ? 'w-full' : 'hidden desktop-xs:flex', icon: this.editIcon, size: "small", disabled: !this.canEdit, onClick: () => this.edit.emit() }, this.editButtonTemplate
|
|
53
57
|
? this.editButtonTemplate(mobile ? this.itemsSelectedAmount : 0)
|
|
54
58
|
: this._defaultEditButtonTemplate(mobile ? this.itemsSelectedAmount : 0)));
|
|
55
59
|
}
|
|
@@ -255,6 +259,46 @@ export class TableHeader {
|
|
|
255
259
|
"reflect": false,
|
|
256
260
|
"defaultValue": "true"
|
|
257
261
|
},
|
|
262
|
+
"editIcon": {
|
|
263
|
+
"type": "string",
|
|
264
|
+
"mutable": false,
|
|
265
|
+
"complexType": {
|
|
266
|
+
"original": "IconVariant",
|
|
267
|
+
"resolved": "\"arrow\" | \"attachment\" | \"bread\" | \"calendar\" | \"camera\" | \"car\" | \"checklist\" | \"checkmark\" | \"chevron\" | \"clock\" | \"cogs\" | \"comment\" | \"document\" | \"download\" | \"envelope\" | \"explanation\" | \"eye\" | \"filter\" | \"folder\" | \"grid\" | \"headset\" | \"integration\" | \"list\" | \"location\" | \"megaphone\" | \"menu\" | \"minus\" | \"more\" | \"negative\" | \"notification\" | \"pagination\" | \"payment\" | \"pencil\" | \"person\" | \"plus\" | \"question\" | \"reload\" | \"receipt\" | \"report\" | \"search\" | \"settings\" | \"sick\" | \"signout\" | \"switch\" | \"tachometer\" | \"task\" | \"template\" | \"tool\" | \"trash\" | \"turn\" | \"upload\" | \"warning\"",
|
|
268
|
+
"references": {
|
|
269
|
+
"IconVariant": {
|
|
270
|
+
"location": "import",
|
|
271
|
+
"path": "../../../components"
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
"required": false,
|
|
276
|
+
"optional": false,
|
|
277
|
+
"docs": {
|
|
278
|
+
"tags": [],
|
|
279
|
+
"text": "The edit button icon"
|
|
280
|
+
},
|
|
281
|
+
"attribute": "edit-icon",
|
|
282
|
+
"reflect": false,
|
|
283
|
+
"defaultValue": "'pencil'"
|
|
284
|
+
},
|
|
285
|
+
"editText": {
|
|
286
|
+
"type": "string",
|
|
287
|
+
"mutable": false,
|
|
288
|
+
"complexType": {
|
|
289
|
+
"original": "string",
|
|
290
|
+
"resolved": "string",
|
|
291
|
+
"references": {}
|
|
292
|
+
},
|
|
293
|
+
"required": false,
|
|
294
|
+
"optional": false,
|
|
295
|
+
"docs": {
|
|
296
|
+
"tags": [],
|
|
297
|
+
"text": "The edit button text if changed"
|
|
298
|
+
},
|
|
299
|
+
"attribute": "edit-text",
|
|
300
|
+
"reflect": false
|
|
301
|
+
},
|
|
258
302
|
"canEdit": {
|
|
259
303
|
"type": "boolean",
|
|
260
304
|
"mutable": true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-header.component.js","sourceRoot":"","sources":["../../../../src/components/molecules/table-header/table-header.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,OAAO,EACP,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAEnE,OAAO,EACH,iBAAiB,EACjB,yBAAyB,GAC5B,MAAM,6BAA6B,CAAC;AAUrC,MAAM,OAAO,WAAW;;IACZ,iCAA4B,GAAiB,GAAG,EAAE,CACtD,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACpC,+BAA0B,GAAuB,CAAC,MAAc,EAAE,EAAE,CACxE,iBAAiB,CACb,MAAM,KAAK,CAAC;MACR,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI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CACH,eACI,IAAI,EAAC,OAAO,EACZ,OAAO,EAAC,UAAU,EAClB,QAAQ,EAAC,MAAM,EACf,KAAK,EAAE,QACH,OAAO,KAAK,SAAS;QACjB,CAAC,CAAC,wBAAwB;QAC1B,CAAC,CAAC,wBACV,EAAE,IAED,MAAM,CACD,CACb,CAAC;EACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n State,\n} from '@stencil/core';\nimport { debounceTime, distinctUntilChanged, Subject } from 'rxjs';\nimport { QuickFilter } from '../../../types/table';\nimport {\n formatTranslation,\n getLocaleComponentStrings,\n} from '../../../utils/localization';\n\nexport type templateFunc = () => string;\nexport type buttonTemplateFunc = (amount: number) => string;\n\n@Component({\n tag: 'p-table-header',\n styleUrl: 'table-header.component.scss',\n shadow: true,\n})\nexport class TableHeader {\n private _defaultFilterButtonTemplate: templateFunc = () =>\n formatTranslation(this._locales.filter);\n private _defaultEditButtonTemplate: buttonTemplateFunc = (amount: number) =>\n formatTranslation(\n amount === 0\n ? this._locales.edit\n : amount === 1\n ? this._locales.edit_single\n : this._locales.edit_plural,\n { amount }\n );\n\n /**\n * Quick filters to show\n */\n @Prop() quickFilters: QuickFilter[] = [];\n\n /**\n * Active quick filter identifier\n */\n @Prop() activeQuickFilterIdentifier: string;\n\n /**\n * Wether we want to show loading state\n */\n @Prop() loading: boolean = false;\n\n /**\n * Wether to show the search input\n */\n @Prop() enableSearch: boolean = true;\n\n /**\n * The amount of items that are selected\n */\n @Prop() itemsSelectedAmount: number = 0;\n\n /**\n * The query to show in the search bar\n */\n @Prop({ mutable: true }) query: string;\n\n /**\n * Wether to show the filter button\n */\n @Prop() enableFilter: boolean = true;\n\n /**\n * The amount of filters being selected\n */\n @Prop() selectedFiltersAmount: number;\n\n /**\n * The template for the filter button text\n */\n @Prop() filterButtonTemplate: templateFunc =\n this._defaultFilterButtonTemplate;\n\n /**\n * Wether to show the edit button\n */\n @Prop() enableEdit: boolean = true;\n\n /**\n * Wether to enable the edit button\n */\n @Prop({ mutable: true }) canEdit: boolean = false;\n\n /**\n * The template for the edit button text\n */\n @Prop() editButtonTemplate: buttonTemplateFunc =\n this._defaultEditButtonTemplate;\n\n /**\n * Event when one of the quick filters is clicked\n */\n @Event() quickFilter: EventEmitter<QuickFilter>;\n\n /**\n * Event when the query changes\n */\n @Event() queryChange: EventEmitter<string>;\n\n /**\n * Event when the filter button is clicked\n */\n @Event() filter: EventEmitter<null>;\n\n /**\n * Event when the edit button is clicked\n */\n @Event() edit: EventEmitter<null>;\n\n /**\n * The host element\n */\n @Element() private _el: HTMLElement;\n\n /**\n * Locales used for this component\n */\n @State() private _locales: any = {};\n\n private _queryObserver = new Subject<string>();\n\n componentWillLoad() {\n this._setLocales();\n }\n\n componentDidLoad() {\n this._queryObserver\n .pipe(debounceTime(300), distinctUntilChanged())\n .subscribe((value) => this.queryChange.emit(value));\n }\n\n render() {\n const activeQuickFilter = this.quickFilters.find(\n (f) => f.identifier === this.activeQuickFilterIdentifier\n );\n const mobileTotal =\n (this.selectedFiltersAmount || 0) +\n (activeQuickFilter?.default ? 0 : 1);\n\n return (\n <Host class=\"p-table-header\">\n {this.loading && (\n <p-loader\n variant=\"ghost\"\n class=\"hidden desktop-xs:flex rounded w-3/4 h-8\"\n ></p-loader>\n )}\n\n {!this.loading && this.quickFilters.length > 0 && (\n <p-segment-container class=\"hidden desktop-xs:flex\">\n {this.quickFilters.map((item) => (\n <p-segment-item\n active={\n item.identifier ===\n this.activeQuickFilterIdentifier\n }\n onClick={() => this.quickFilter.emit(item)}\n >\n {typeof item.text === 'string'\n ? item.text\n : item.text()}{' '}\n {item?.count >= 0 ? `(${item.count})` : ''}\n </p-segment-item>\n ))}\n </p-segment-container>\n )}\n\n <div class=\"flex flex-col desktop-xs:flex-row gap-4 justify-end justify-self-end\">\n {this.enableSearch && (\n <p-input-group icon=\"search\" size=\"small\">\n <input\n type=\"text\"\n slot=\"input\"\n placeholder=\"Zoeken...\"\n value={this.query}\n onInput={(ev) =>\n this._queryObserver.next(\n (ev.target as HTMLInputElement).value\n )\n }\n />\n </p-input-group>\n )}\n\n {this.enableFilter && (\n <p-button\n icon=\"filter\"\n variant=\"secondary\"\n size=\"small\"\n class=\"w-full desktop-xs:w-auto\"\n onClick={() => this.filter.emit()}\n >\n {this.filterButtonTemplate\n ? this.filterButtonTemplate()\n : this._defaultFilterButtonTemplate()}\n {this.selectedFiltersAmount &&\n this._getLabel(this.selectedFiltersAmount)}\n {mobileTotal > 0 &&\n this._getLabel(mobileTotal, 'mobile')}\n </p-button>\n )}\n\n {this.enableEdit && this._buttonTemplate()}\n </div>\n\n {this.enableEdit && this.canEdit && (\n <div class=\"fixed bottom-0 left-0 w-full p-4 bg-white border border-solid border-transparent border-t-mystic-dark block desktop-xs:hidden\">\n {this._buttonTemplate(true)}\n </div>\n )}\n </Host>\n );\n }\n\n @Listen('localeChanged', { target: 'body' })\n private async _setLocales(): Promise<void> {\n this._locales = await getLocaleComponentStrings(this._el);\n }\n\n private _buttonTemplate(mobile = false) {\n return (\n <p-button\n class={mobile ? 'w-full' : 'hidden desktop-xs:flex'}\n icon=\"pencil\"\n size=\"small\"\n disabled={!this.canEdit}\n onClick={() => this.edit.emit()}\n >\n {this.editButtonTemplate\n ? this.editButtonTemplate(\n mobile ? this.itemsSelectedAmount : 0\n )\n : this._defaultEditButtonTemplate(\n mobile ? this.itemsSelectedAmount : 0\n )}\n </p-button>\n );\n }\n\n private _getLabel(amount, variant: 'mobile' | 'default' = 'default') {\n return (\n <p-label\n size=\"small\"\n variant=\"negative\"\n behavior=\"text\"\n class={`ml-1 ${\n variant === 'default'\n ? 'hidden desktop-xs:flex'\n : 'flex desktop-xs:hidden'\n }`}\n >\n {amount}\n </p-label>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"table-header.component.js","sourceRoot":"","sources":["../../../../src/components/molecules/table-header/table-header.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,OAAO,EACP,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAGnE,OAAO,EACH,iBAAiB,EACjB,yBAAyB,GAC5B,MAAM,6BAA6B,CAAC;AAUrC,MAAM,OAAO,WAAW;;IACZ,iCAA4B,GAAiB,GAAG,EAAE,CACtD,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACpC,+BAA0B,GAAuB,CAAC,MAAc,EAAE,EAAE,CACxE,IAAI,CAAC,QAAQ;MACT,CAAC,CAAC,IAAI,CAAC,QAAQ;MACf,CAAC,CAAC,iBAAiB,CACb,MAAM,KAAK,CAAC;QACR,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI;QACpB,CAAC,CAAC,MAAM,KAAK,CAAC;UACd,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW;UAC3B,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,EAC/B,EAAE,MAAM,EAAE,CACb,CAAC;IAwGJ,mBAAc,GAAG,IAAI,OAAO,EAAU,CAAC;wBAnGT,EAAE;;mBAUb,KAAK;wBAKA,IAAI;+BAKE,CAAC;;wBAUP,IA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n State,\n} from '@stencil/core';\nimport { debounceTime, distinctUntilChanged, Subject } from 'rxjs';\nimport { IconVariant } from '../../../components';\nimport { QuickFilter } from '../../../types/table';\nimport {\n formatTranslation,\n getLocaleComponentStrings,\n} from '../../../utils/localization';\n\nexport type templateFunc = () => string;\nexport type buttonTemplateFunc = (amount: number) => string;\n\n@Component({\n tag: 'p-table-header',\n styleUrl: 'table-header.component.scss',\n shadow: true,\n})\nexport class TableHeader {\n private _defaultFilterButtonTemplate: templateFunc = () =>\n formatTranslation(this._locales.filter);\n private _defaultEditButtonTemplate: buttonTemplateFunc = (amount: number) =>\n this.editText\n ? this.editText\n : formatTranslation(\n amount === 0\n ? this._locales.edit\n : amount === 1\n ? this._locales.edit_single\n : this._locales.edit_plural,\n { amount }\n );\n\n /**\n * Quick filters to show\n */\n @Prop() quickFilters: QuickFilter[] = [];\n\n /**\n * Active quick filter identifier\n */\n @Prop() activeQuickFilterIdentifier: string;\n\n /**\n * Wether we want to show loading state\n */\n @Prop() loading: boolean = false;\n\n /**\n * Wether to show the search input\n */\n @Prop() enableSearch: boolean = true;\n\n /**\n * The amount of items that are selected\n */\n @Prop() itemsSelectedAmount: number = 0;\n\n /**\n * The query to show in the search bar\n */\n @Prop({ mutable: true }) query: string;\n\n /**\n * Wether to show the filter button\n */\n @Prop() enableFilter: boolean = true;\n\n /**\n * The amount of filters being selected\n */\n @Prop() selectedFiltersAmount: number;\n\n /**\n * The template for the filter button text\n */\n @Prop() filterButtonTemplate: templateFunc =\n this._defaultFilterButtonTemplate;\n\n /**\n * Wether to show the edit button\n */\n @Prop() enableEdit: boolean = true;\n\n /**\n * The edit button icon\n */\n @Prop() editIcon: IconVariant = 'pencil';\n\n /**\n * The edit button text if changed\n */\n @Prop() editText: string;\n\n /**\n * Wether to enable the edit button\n */\n @Prop({ mutable: true }) canEdit: boolean = false;\n\n /**\n * The template for the edit button text\n */\n @Prop() editButtonTemplate: buttonTemplateFunc =\n this._defaultEditButtonTemplate;\n\n /**\n * Event when one of the quick filters is clicked\n */\n @Event() quickFilter: EventEmitter<QuickFilter>;\n\n /**\n * Event when the query changes\n */\n @Event() queryChange: EventEmitter<string>;\n\n /**\n * Event when the filter button is clicked\n */\n @Event() filter: EventEmitter<null>;\n\n /**\n * Event when the edit button is clicked\n */\n @Event() edit: EventEmitter<null>;\n\n /**\n * The host element\n */\n @Element() private _el: HTMLElement;\n\n /**\n * Locales used for this component\n */\n @State() private _locales: any = {};\n\n private _queryObserver = new Subject<string>();\n\n componentWillLoad() {\n this._setLocales();\n }\n\n componentDidLoad() {\n this._queryObserver\n .pipe(debounceTime(300), distinctUntilChanged())\n .subscribe((value) => this.queryChange.emit(value));\n }\n\n render() {\n const activeQuickFilter = this.quickFilters.find(\n (f) => f.identifier === this.activeQuickFilterIdentifier\n );\n const mobileTotal =\n (this.selectedFiltersAmount || 0) +\n (activeQuickFilter?.default ? 0 : 1);\n\n return (\n <Host class=\"p-table-header\">\n {this.loading && (\n <p-loader\n variant=\"ghost\"\n class=\"hidden h-8 w-3/4 rounded desktop-xs:flex\"\n ></p-loader>\n )}\n\n {!this.loading && this.quickFilters.length > 0 && (\n <p-segment-container class=\"hidden desktop-xs:flex\">\n {this.quickFilters.map((item) => (\n <p-segment-item\n active={\n item.identifier ===\n this.activeQuickFilterIdentifier\n }\n onClick={() => this.quickFilter.emit(item)}\n >\n {typeof item.text === 'string'\n ? item.text\n : item.text()}{' '}\n {item?.count >= 0 ? `(${item.count})` : ''}\n </p-segment-item>\n ))}\n </p-segment-container>\n )}\n\n <div class=\"flex flex-col justify-end gap-4 justify-self-end desktop-xs:flex-row\">\n {this.enableSearch && (\n <p-input-group icon=\"search\" size=\"small\">\n <input\n type=\"text\"\n slot=\"input\"\n placeholder=\"Zoeken...\"\n value={this.query}\n onInput={(ev) =>\n this._queryObserver.next(\n (ev.target as HTMLInputElement).value\n )\n }\n />\n </p-input-group>\n )}\n\n {this.enableFilter && (\n <p-button\n icon=\"filter\"\n variant=\"secondary\"\n size=\"small\"\n class=\"w-full desktop-xs:w-auto\"\n onClick={() => this.filter.emit()}\n >\n {this.filterButtonTemplate\n ? this.filterButtonTemplate()\n : this._defaultFilterButtonTemplate()}\n {this.selectedFiltersAmount &&\n this._getLabel(this.selectedFiltersAmount)}\n {mobileTotal > 0 &&\n this._getLabel(mobileTotal, 'mobile')}\n </p-button>\n )}\n\n {this.enableEdit && this._buttonTemplate()}\n </div>\n\n {this.enableEdit && this.canEdit && (\n <div class=\"fixed bottom-0 left-0 block w-full border border-solid border-transparent border-t-mystic-dark bg-white p-4 desktop-xs:hidden\">\n {this._buttonTemplate(true)}\n </div>\n )}\n </Host>\n );\n }\n\n @Listen('localeChanged', { target: 'body' })\n private async _setLocales(): Promise<void> {\n this._locales = await getLocaleComponentStrings(this._el);\n }\n\n private _buttonTemplate(mobile = false) {\n return (\n <p-button\n class={mobile ? 'w-full' : 'hidden desktop-xs:flex'}\n icon={this.editIcon}\n size=\"small\"\n disabled={!this.canEdit}\n onClick={() => this.edit.emit()}\n >\n {this.editButtonTemplate\n ? this.editButtonTemplate(\n mobile ? this.itemsSelectedAmount : 0\n )\n : this._defaultEditButtonTemplate(\n mobile ? this.itemsSelectedAmount : 0\n )}\n </p-button>\n );\n }\n\n private _getLabel(amount, variant: 'mobile' | 'default' = 'default') {\n return (\n <p-label\n size=\"small\"\n variant=\"negative\"\n behavior=\"text\"\n class={`ml-1 ${\n variant === 'default'\n ? 'hidden desktop-xs:flex'\n : 'flex desktop-xs:hidden'\n }`}\n >\n {amount}\n </p-label>\n );\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.flex{display:flex!important}.w-full{width:100%!important}.flex-nowrap{flex-wrap:nowrap!important}.items-center{align-items:center!important}.justify-between{justify-content:space-between!important}.gap-4{gap:1rem!important}.border-x-0{border-left-width:0!important;border-right-width:0!important}.border-y{border-bottom-width:1px!important;border-top-width:1px!important}.border-solid{border-style:solid!important}.border-y-mystic-dark{--tw-border-opacity:1!important;border-bottom-color:rgb(218 230 240/var(--tw-border-opacity))!important;border-top-color:rgb(218 230 240/var(--tw-border-opacity))!important}.bg-indigo-light{--tw-bg-opacity:1!important;background-color:rgb(241 246 255/var(--tw-bg-opacity))!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.font-semibold{font-weight:600!important}.uppercase{text-transform:uppercase!important}*{box-sizing:border-box}:host{--tw-text-opacity:1;color:rgb(128 130 158/var(--tw-text-opacity));display:flex;flex-direction:column;font-size:.875rem;line-height:1.25rem;padding-left:1.5rem;padding-right:1.5rem;width:100%}:host .content{align-items:center;display:flex;flex-wrap:nowrap;gap:1rem;justify-content:space-between;padding-bottom:1.5rem;padding-top:1.5rem;width:100%}:host(.variant-header){--tw-bg-opacity:1;--tw-text-opacity:1;--tw-border-opacity:1!important;background-color:rgb(252 253 254/var(--tw-bg-opacity));border-bottom:1px solid rgb(218 230 240/var(--tw-border-opacity))!important;border-left-style:solid!important;border-left-width:0!important;border-right-style:solid!important;border-right-width:0!important;border-top:1px solid rgb(218 230 240/var(--tw-border-opacity))!important;color:rgb(152 154 183/var(--tw-text-opacity));font-size:.75rem;font-weight:600;line-height:1rem;text-transform:uppercase}:host(.variant-header) .content{padding-bottom:.5rem;padding-top:.5rem}:host(.enable-hover:hover){--tw-bg-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity));cursor:pointer}.static{position:static!important}.mb-14{margin-bottom:3.5rem!important}.mb-6{margin-bottom:1.5rem!important}.table{display:table!important}.hidden{display:none!important}.h-6{height:1.5rem!important}.w-6{width:1.5rem!important}.max-w-\[20rem\]{max-width:20rem!important}.cursor-pointer{cursor:pointer!important}.flex-col{flex-direction:column!important}.self-center{align-self:center!important}.rounded{border-radius:.25rem!important}.py-24{padding-bottom:6rem!important;padding-top:6rem!important}.text-center{text-align:center!important}.text-storm-medium{--tw-text-opacity:1!important;color:rgb(128 130 158/var(--tw-text-opacity))!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.table-cell{display:table-cell!important}.w-1\/12{width:8.333333%!important}.w-10\/12{width:83.333333%!important}.w-11\/12{width:91.666667%!important}.w-2\/12{width:16.666667%!important}.w-3\/12{width:25%!important}.w-4\/12{width:33.333333%!important}.w-5\/12{width:41.666667%!important}.w-6\/12{width:50%!important}.w-7\/12{width:58.333333%!important}.w-8\/12{width:66.666667%!important}.w-9\/12{width:75%!important}.w-auto{width:auto!important}.flex-1{flex:1 1 0%!important}.justify-start{justify-content:flex-start!important}.justify-end{justify-content:flex-end!important}.justify-center{justify-content:center!important}.text-storm-dark{--tw-text-opacity:1!important;color:rgb(39 40 56/var(--tw-text-opacity))!important}@media (min-width:40rem){.tablet\:w-1\/12{width:8.333333%!important}.tablet\:w-10\/12{width:83.333333%!important}.tablet\:w-11\/12{width:91.666667%!important}.tablet\:w-2\/12{width:16.666667%!important}.tablet\:w-3\/12{width:25%!important}.tablet\:w-4\/12{width:33.333333%!important}.tablet\:w-5\/12{width:41.666667%!important}.tablet\:w-6\/12{width:50%!important}.tablet\:w-7\/12{width:58.333333%!important}.tablet\:w-8\/12{width:66.666667%!important}.tablet\:w-9\/12{width:75%!important}}@media (min-width:64rem){.desktop-xs\:w-1\/12{width:8.333333%!important}.desktop-xs\:w-10\/12{width:83.333333%!important}.desktop-xs\:w-11\/12{width:91.666667%!important}.desktop-xs\:w-2\/12{width:16.666667%!important}.desktop-xs\:w-3\/12{width:25%!important}.desktop-xs\:w-4\/12{width:33.333333%!important}.desktop-xs\:w-5\/12{width:41.666667%!important}.desktop-xs\:w-6\/12{width:50%!important}.desktop-xs\:w-7\/12{width:58.333333%!important}.desktop-xs\:w-8\/12{width:66.666667%!important}.desktop-xs\:w-9\/12{width:75%!important}}@media (min-width:80rem){.desktop-sm\:w-1\/12{width:8.333333%!important}.desktop-sm\:w-10\/12{width:83.333333%!important}.desktop-sm\:w-11\/12{width:91.666667%!important}.desktop-sm\:w-2\/12{width:16.666667%!important}.desktop-sm\:w-3\/12{width:25%!important}.desktop-sm\:w-4\/12{width:33.333333%!important}.desktop-sm\:w-5\/12{width:41.666667%!important}.desktop-sm\:w-6\/12{width:50%!important}.desktop-sm\:w-7\/12{width:58.333333%!important}.desktop-sm\:w-8\/12{width:66.666667%!important}.desktop-sm\:w-9\/12{width:75%!important}}@media (min-width:85.375rem){.desktop\:w-1\/12{width:8.333333%!important}.desktop\:w-10\/12{width:83.333333%!important}.desktop\:w-11\/12{width:91.666667%!important}.desktop\:w-2\/12{width:16.666667%!important}.desktop\:w-3\/12{width:25%!important}.desktop\:w-4\/12{width:33.333333%!important}.desktop\:w-5\/12{width:41.666667%!important}.desktop\:w-6\/12{width:50%!important}.desktop\:w-7\/12{width:58.333333%!important}.desktop\:w-8\/12{width:66.666667%!important}.desktop\:w-9\/12{width:75%!important}}@media (min-width:90rem){.desktop-lg\:w-1\/12{width:8.333333%!important}.desktop-lg\:w-10\/12{width:83.333333%!important}.desktop-lg\:w-11\/12{width:91.666667%!important}.desktop-lg\:w-2\/12{width:16.666667%!important}.desktop-lg\:w-3\/12{width:25%!important}.desktop-lg\:w-4\/12{width:33.333333%!important}.desktop-lg\:w-5\/12{width:41.666667%!important}.desktop-lg\:w-6\/12{width:50%!important}.desktop-lg\:w-7\/12{width:58.333333%!important}.desktop-lg\:w-8\/12{width:66.666667%!important}.desktop-lg\:w-9\/12{width:75%!important}}@media (min-width:120rem){.desktop-xl\:w-1\/12{width:8.333333%!important}.desktop-xl\:w-10\/12{width:83.333333%!important}.desktop-xl\:w-11\/12{width:91.666667%!important}.desktop-xl\:w-2\/12{width:16.666667%!important}.desktop-xl\:w-3\/12{width:25%!important}.desktop-xl\:w-4\/12{width:33.333333%!important}.desktop-xl\:w-5\/12{width:41.666667%!important}.desktop-xl\:w-6\/12{width:50%!important}.desktop-xl\:w-7\/12{width:58.333333%!important}.desktop-xl\:w-8\/12{width:66.666667%!important}.desktop-xl\:w-9\/12{width:75%!important}}.h-8{height:2rem!important}@media (min-width:64rem){.desktop-xs\:flex{display:flex!important}}.fixed{position:fixed!important}.bottom-0{bottom:0!important}.left-0{left:0!important}.ml-1{margin-left:.25rem!important}.block{display:block!important}.w-3\/4{width:75%!important}.justify-self-end{justify-self:end!important}.border{border-width:1px!important}.border-transparent{border-color:transparent!important}.border-t-mystic-dark{--tw-border-opacity:1!important;border-top-color:rgb(218 230 240/var(--tw-border-opacity))!important}.bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.p-4{padding:1rem!important}@media (min-width:64rem){.desktop-xs\:hidden{display:none!important}.desktop-xs\:w-auto{width:auto!important}.desktop-xs\:flex-row{flex-direction:row!important}}.m-0{margin:0!important}.table-row{display:table-row!important}.visible{visibility:visible!important}.absolute{position:absolute!important}.blur{--tw-blur:blur(8px)!important;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.-rotate-0{--tw-rotate:-0deg!important}.-rotate-0,.-rotate-135{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-135{--tw-rotate:-135deg!important}.-rotate-180{--tw-rotate:-180deg!important}.-rotate-180,.-rotate-225{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-225{--tw-rotate:-225deg!important}.-rotate-25{--tw-rotate:-25deg!important}.-rotate-25,.-rotate-270{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-270{--tw-rotate:-270deg!important}.-rotate-315{--tw-rotate:-315deg!important}.-rotate-315,.-rotate-45{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-45{--tw-rotate:-45deg!important}.-rotate-90{--tw-rotate:-90deg!important}.-rotate-90,.rotate-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-0{--tw-rotate:0deg!important}.rotate-135{--tw-rotate:135deg!important}.rotate-135,.rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-180{--tw-rotate:180deg!important}.rotate-225{--tw-rotate:225deg!important}.rotate-225,.rotate-25{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-25{--tw-rotate:25deg!important}.rotate-270{--tw-rotate:270deg!important}.rotate-270,.rotate-315{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-315{--tw-rotate:315deg!important}.rotate-45{--tw-rotate:45deg!important}.rotate-45,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-90{--tw-rotate:90deg!important}.scale-x-flip{--tw-scale-x:-1!important}.scale-x-flip,.scale-y-flip{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.scale-y-flip{--tw-scale-y:-1!important}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.text-2xl{font-size:1.5rem!important;line-height:2rem!important}.text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.text-4xl{font-size:2.25rem!important;line-height:2.5rem!important}.text-5xl{font-size:3rem!important}.text-5xl,.text-6xl{line-height:1!important}.text-6xl{font-size:3.75rem!important}.text-base{font-size:1rem!important;line-height:1.5rem!important}.text-lg{font-size:1.125rem!important}.text-lg,.text-xl{line-height:1.75rem!important}.text-xl{font-size:1.25rem!important}.text-xxs{font-size:.6875rem!important}.text-negative{--tw-text-opacity:1!important;color:rgb(185 30 40/var(--tw-text-opacity))!important}.text-negative-light{--tw-text-opacity:1!important;color:rgb(255 204 211/var(--tw-text-opacity))!important}.hover\:text-negative:hover{--tw-text-opacity:1!important;color:rgb(185 30 40/var(--tw-text-opacity))!important}.ml-2{margin-left:.5rem!important}.items-end{align-items:flex-end!important}.rounded-bl-none{border-bottom-left-radius:0!important}.rounded-br-none{border-bottom-right-radius:0!important}.rounded-tl-none{border-top-left-radius:0!important}.rounded-tr-none{border-top-right-radius:0!important}.border-l-0{border-left-width:0!important}.border-r-0{border-right-width:0!important}.pl-0{padding-left:0!important}.pr-0{padding-right:0!important}.inline{display:inline!important}
|
|
1
|
+
.flex{display:flex!important}.w-full{width:100%!important}.flex-nowrap{flex-wrap:nowrap!important}.items-center{align-items:center!important}.justify-between{justify-content:space-between!important}.gap-4{gap:1rem!important}.border-x-0{border-left-width:0!important;border-right-width:0!important}.border-y{border-bottom-width:1px!important;border-top-width:1px!important}.border-solid{border-style:solid!important}.border-y-mystic-dark{--tw-border-opacity:1!important;border-bottom-color:rgb(218 230 240/var(--tw-border-opacity))!important;border-top-color:rgb(218 230 240/var(--tw-border-opacity))!important}.bg-indigo-light{--tw-bg-opacity:1!important;background-color:rgb(241 246 255/var(--tw-bg-opacity))!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.font-semibold{font-weight:600!important}.uppercase{text-transform:uppercase!important}*{box-sizing:border-box}:host{--tw-text-opacity:1;color:rgb(128 130 158/var(--tw-text-opacity));display:flex;flex-direction:column;font-size:.875rem;line-height:1.25rem;padding-left:1.5rem;padding-right:1.5rem;width:100%}:host .content{align-items:center;display:flex;flex-wrap:nowrap;gap:1rem;justify-content:space-between;padding-bottom:1.5rem;padding-top:1.5rem;width:100%}:host(.variant-header){--tw-bg-opacity:1;--tw-text-opacity:1;--tw-border-opacity:1!important;background-color:rgb(252 253 254/var(--tw-bg-opacity));border-bottom:1px solid rgb(218 230 240/var(--tw-border-opacity))!important;border-left-style:solid!important;border-left-width:0!important;border-right-style:solid!important;border-right-width:0!important;border-top:1px solid rgb(218 230 240/var(--tw-border-opacity))!important;color:rgb(152 154 183/var(--tw-text-opacity));font-size:.75rem;font-weight:600;line-height:1rem;text-transform:uppercase}:host(.variant-header) .content{padding-bottom:.5rem;padding-top:.5rem}:host(.enable-hover:hover){--tw-bg-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity));cursor:pointer}.static{position:static!important}.mb-14{margin-bottom:3.5rem!important}.mb-6{margin-bottom:1.5rem!important}.table{display:table!important}.hidden{display:none!important}.h-6{height:1.5rem!important}.w-6{width:1.5rem!important}.max-w-\[20rem\]{max-width:20rem!important}.cursor-pointer{cursor:pointer!important}.flex-col{flex-direction:column!important}.self-center{align-self:center!important}.rounded{border-radius:.25rem!important}.py-24{padding-bottom:6rem!important;padding-top:6rem!important}.text-center{text-align:center!important}.text-storm-medium{--tw-text-opacity:1!important;color:rgb(128 130 158/var(--tw-text-opacity))!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.table-cell{display:table-cell!important}.w-1\/12{width:8.333333%!important}.w-10\/12{width:83.333333%!important}.w-11\/12{width:91.666667%!important}.w-2\/12{width:16.666667%!important}.w-3\/12{width:25%!important}.w-4\/12{width:33.333333%!important}.w-5\/12{width:41.666667%!important}.w-6\/12{width:50%!important}.w-7\/12{width:58.333333%!important}.w-8\/12{width:66.666667%!important}.w-9\/12{width:75%!important}.w-auto{width:auto!important}.flex-1{flex:1 1 0%!important}.justify-start{justify-content:flex-start!important}.justify-end{justify-content:flex-end!important}.justify-center{justify-content:center!important}.text-storm-dark{--tw-text-opacity:1!important;color:rgb(39 40 56/var(--tw-text-opacity))!important}@media (min-width:40rem){.tablet\:w-1\/12{width:8.333333%!important}.tablet\:w-10\/12{width:83.333333%!important}.tablet\:w-11\/12{width:91.666667%!important}.tablet\:w-2\/12{width:16.666667%!important}.tablet\:w-3\/12{width:25%!important}.tablet\:w-4\/12{width:33.333333%!important}.tablet\:w-5\/12{width:41.666667%!important}.tablet\:w-6\/12{width:50%!important}.tablet\:w-7\/12{width:58.333333%!important}.tablet\:w-8\/12{width:66.666667%!important}.tablet\:w-9\/12{width:75%!important}}@media (min-width:64rem){.desktop-xs\:w-1\/12{width:8.333333%!important}.desktop-xs\:w-10\/12{width:83.333333%!important}.desktop-xs\:w-11\/12{width:91.666667%!important}.desktop-xs\:w-2\/12{width:16.666667%!important}.desktop-xs\:w-3\/12{width:25%!important}.desktop-xs\:w-4\/12{width:33.333333%!important}.desktop-xs\:w-5\/12{width:41.666667%!important}.desktop-xs\:w-6\/12{width:50%!important}.desktop-xs\:w-7\/12{width:58.333333%!important}.desktop-xs\:w-8\/12{width:66.666667%!important}.desktop-xs\:w-9\/12{width:75%!important}}@media (min-width:80rem){.desktop-sm\:w-1\/12{width:8.333333%!important}.desktop-sm\:w-10\/12{width:83.333333%!important}.desktop-sm\:w-11\/12{width:91.666667%!important}.desktop-sm\:w-2\/12{width:16.666667%!important}.desktop-sm\:w-3\/12{width:25%!important}.desktop-sm\:w-4\/12{width:33.333333%!important}.desktop-sm\:w-5\/12{width:41.666667%!important}.desktop-sm\:w-6\/12{width:50%!important}.desktop-sm\:w-7\/12{width:58.333333%!important}.desktop-sm\:w-8\/12{width:66.666667%!important}.desktop-sm\:w-9\/12{width:75%!important}}@media (min-width:85.375rem){.desktop\:w-1\/12{width:8.333333%!important}.desktop\:w-10\/12{width:83.333333%!important}.desktop\:w-11\/12{width:91.666667%!important}.desktop\:w-2\/12{width:16.666667%!important}.desktop\:w-3\/12{width:25%!important}.desktop\:w-4\/12{width:33.333333%!important}.desktop\:w-5\/12{width:41.666667%!important}.desktop\:w-6\/12{width:50%!important}.desktop\:w-7\/12{width:58.333333%!important}.desktop\:w-8\/12{width:66.666667%!important}.desktop\:w-9\/12{width:75%!important}}@media (min-width:90rem){.desktop-lg\:w-1\/12{width:8.333333%!important}.desktop-lg\:w-10\/12{width:83.333333%!important}.desktop-lg\:w-11\/12{width:91.666667%!important}.desktop-lg\:w-2\/12{width:16.666667%!important}.desktop-lg\:w-3\/12{width:25%!important}.desktop-lg\:w-4\/12{width:33.333333%!important}.desktop-lg\:w-5\/12{width:41.666667%!important}.desktop-lg\:w-6\/12{width:50%!important}.desktop-lg\:w-7\/12{width:58.333333%!important}.desktop-lg\:w-8\/12{width:66.666667%!important}.desktop-lg\:w-9\/12{width:75%!important}}@media (min-width:120rem){.desktop-xl\:w-1\/12{width:8.333333%!important}.desktop-xl\:w-10\/12{width:83.333333%!important}.desktop-xl\:w-11\/12{width:91.666667%!important}.desktop-xl\:w-2\/12{width:16.666667%!important}.desktop-xl\:w-3\/12{width:25%!important}.desktop-xl\:w-4\/12{width:33.333333%!important}.desktop-xl\:w-5\/12{width:41.666667%!important}.desktop-xl\:w-6\/12{width:50%!important}.desktop-xl\:w-7\/12{width:58.333333%!important}.desktop-xl\:w-8\/12{width:66.666667%!important}.desktop-xl\:w-9\/12{width:75%!important}}.h-8{height:2rem!important}@media (min-width:64rem){.desktop-xs\:flex{display:flex!important}}.fixed{position:fixed!important}.bottom-0{bottom:0!important}.left-0{left:0!important}.ml-1{margin-left:.25rem!important}.block{display:block!important}.w-3\/4{width:75%!important}.justify-self-end{justify-self:end!important}.border{border-width:1px!important}.border-transparent{border-color:transparent!important}.border-t-mystic-dark{--tw-border-opacity:1!important;border-top-color:rgb(218 230 240/var(--tw-border-opacity))!important}.bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.p-4{padding:1rem!important}@media (min-width:64rem){.desktop-xs\:hidden{display:none!important}.desktop-xs\:w-auto{width:auto!important}.desktop-xs\:flex-row{flex-direction:row!important}}.m-0{margin:0!important}.table-row{display:table-row!important}.visible{visibility:visible!important}.absolute{position:absolute!important}.blur{--tw-blur:blur(8px)!important;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.ml-2{margin-left:.5rem!important}.items-end{align-items:flex-end!important}.rounded-bl-none{border-bottom-left-radius:0!important}.rounded-br-none{border-bottom-right-radius:0!important}.rounded-tl-none{border-top-left-radius:0!important}.rounded-tr-none{border-top-right-radius:0!important}.border-l-0{border-left-width:0!important}.border-r-0{border-right-width:0!important}.pl-0{padding-left:0!important}.pr-0{padding-right:0!important}.text-negative{--tw-text-opacity:1!important;color:rgb(185 30 40/var(--tw-text-opacity))!important}.-rotate-0{--tw-rotate:-0deg!important}.-rotate-0,.-rotate-135{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-135{--tw-rotate:-135deg!important}.-rotate-180{--tw-rotate:-180deg!important}.-rotate-180,.-rotate-225{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-225{--tw-rotate:-225deg!important}.-rotate-25{--tw-rotate:-25deg!important}.-rotate-25,.-rotate-270{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-270{--tw-rotate:-270deg!important}.-rotate-315{--tw-rotate:-315deg!important}.-rotate-315,.-rotate-45{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-45{--tw-rotate:-45deg!important}.-rotate-90{--tw-rotate:-90deg!important}.-rotate-90,.rotate-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-0{--tw-rotate:0deg!important}.rotate-135{--tw-rotate:135deg!important}.rotate-135,.rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-180{--tw-rotate:180deg!important}.rotate-225{--tw-rotate:225deg!important}.rotate-225,.rotate-25{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-25{--tw-rotate:25deg!important}.rotate-270{--tw-rotate:270deg!important}.rotate-270,.rotate-315{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-315{--tw-rotate:315deg!important}.rotate-45{--tw-rotate:45deg!important}.rotate-45,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-90{--tw-rotate:90deg!important}.scale-x-flip{--tw-scale-x:-1!important}.scale-x-flip,.scale-y-flip{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.scale-y-flip{--tw-scale-y:-1!important}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.text-2xl{font-size:1.5rem!important;line-height:2rem!important}.text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.text-4xl{font-size:2.25rem!important;line-height:2.5rem!important}.text-5xl{font-size:3rem!important}.text-5xl,.text-6xl{line-height:1!important}.text-6xl{font-size:3.75rem!important}.text-base{font-size:1rem!important;line-height:1.5rem!important}.text-lg{font-size:1.125rem!important}.text-lg,.text-xl{line-height:1.75rem!important}.text-xl{font-size:1.25rem!important}.text-xxs{font-size:.6875rem!important}.text-negative-light{--tw-text-opacity:1!important;color:rgb(255 204 211/var(--tw-text-opacity))!important}.hover\:text-negative:hover{--tw-text-opacity:1!important;color:rgb(185 30 40/var(--tw-text-opacity))!important}.inline{display:inline!important}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.flex{display:flex!important}*{box-sizing:border-box}p-table{display:flex;flex-direction:column}.static{position:static!important}.mb-14{margin-bottom:3.5rem!important}.mb-6{margin-bottom:1.5rem!important}.table{display:table!important}.hidden{display:none!important}.h-6{height:1.5rem!important}.w-6{width:1.5rem!important}.max-w-\[20rem\]{max-width:20rem!important}.cursor-pointer{cursor:pointer!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.self-center{align-self:center!important}.rounded{border-radius:.25rem!important}.py-24{padding-bottom:6rem!important;padding-top:6rem!important}.text-center{text-align:center!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.font-semibold{font-weight:600!important}.text-storm-medium{--tw-text-opacity:1!important;color:rgb(128 130 158/var(--tw-text-opacity))!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.table-cell{display:table-cell!important}.w-1\/12{width:8.333333%!important}.w-10\/12{width:83.333333%!important}.w-11\/12{width:91.666667%!important}.w-2\/12{width:16.666667%!important}.w-3\/12{width:25%!important}.w-4\/12{width:33.333333%!important}.w-5\/12{width:41.666667%!important}.w-6\/12{width:50%!important}.w-7\/12{width:58.333333%!important}.w-8\/12{width:66.666667%!important}.w-9\/12{width:75%!important}.w-auto{width:auto!important}.w-full{width:100%!important}.flex-1{flex:1 1 0%!important}.justify-start{justify-content:flex-start!important}.justify-end{justify-content:flex-end!important}.justify-center{justify-content:center!important}.text-storm-dark{--tw-text-opacity:1!important;color:rgb(39 40 56/var(--tw-text-opacity))!important}@media (min-width:40rem){.tablet\:w-1\/12{width:8.333333%!important}.tablet\:w-10\/12{width:83.333333%!important}.tablet\:w-11\/12{width:91.666667%!important}.tablet\:w-2\/12{width:16.666667%!important}.tablet\:w-3\/12{width:25%!important}.tablet\:w-4\/12{width:33.333333%!important}.tablet\:w-5\/12{width:41.666667%!important}.tablet\:w-6\/12{width:50%!important}.tablet\:w-7\/12{width:58.333333%!important}.tablet\:w-8\/12{width:66.666667%!important}.tablet\:w-9\/12{width:75%!important}}@media (min-width:64rem){.desktop-xs\:w-1\/12{width:8.333333%!important}.desktop-xs\:w-10\/12{width:83.333333%!important}.desktop-xs\:w-11\/12{width:91.666667%!important}.desktop-xs\:w-2\/12{width:16.666667%!important}.desktop-xs\:w-3\/12{width:25%!important}.desktop-xs\:w-4\/12{width:33.333333%!important}.desktop-xs\:w-5\/12{width:41.666667%!important}.desktop-xs\:w-6\/12{width:50%!important}.desktop-xs\:w-7\/12{width:58.333333%!important}.desktop-xs\:w-8\/12{width:66.666667%!important}.desktop-xs\:w-9\/12{width:75%!important}}@media (min-width:80rem){.desktop-sm\:w-1\/12{width:8.333333%!important}.desktop-sm\:w-10\/12{width:83.333333%!important}.desktop-sm\:w-11\/12{width:91.666667%!important}.desktop-sm\:w-2\/12{width:16.666667%!important}.desktop-sm\:w-3\/12{width:25%!important}.desktop-sm\:w-4\/12{width:33.333333%!important}.desktop-sm\:w-5\/12{width:41.666667%!important}.desktop-sm\:w-6\/12{width:50%!important}.desktop-sm\:w-7\/12{width:58.333333%!important}.desktop-sm\:w-8\/12{width:66.666667%!important}.desktop-sm\:w-9\/12{width:75%!important}}@media (min-width:85.375rem){.desktop\:w-1\/12{width:8.333333%!important}.desktop\:w-10\/12{width:83.333333%!important}.desktop\:w-11\/12{width:91.666667%!important}.desktop\:w-2\/12{width:16.666667%!important}.desktop\:w-3\/12{width:25%!important}.desktop\:w-4\/12{width:33.333333%!important}.desktop\:w-5\/12{width:41.666667%!important}.desktop\:w-6\/12{width:50%!important}.desktop\:w-7\/12{width:58.333333%!important}.desktop\:w-8\/12{width:66.666667%!important}.desktop\:w-9\/12{width:75%!important}}@media (min-width:90rem){.desktop-lg\:w-1\/12{width:8.333333%!important}.desktop-lg\:w-10\/12{width:83.333333%!important}.desktop-lg\:w-11\/12{width:91.666667%!important}.desktop-lg\:w-2\/12{width:16.666667%!important}.desktop-lg\:w-3\/12{width:25%!important}.desktop-lg\:w-4\/12{width:33.333333%!important}.desktop-lg\:w-5\/12{width:41.666667%!important}.desktop-lg\:w-6\/12{width:50%!important}.desktop-lg\:w-7\/12{width:58.333333%!important}.desktop-lg\:w-8\/12{width:66.666667%!important}.desktop-lg\:w-9\/12{width:75%!important}}@media (min-width:120rem){.desktop-xl\:w-1\/12{width:8.333333%!important}.desktop-xl\:w-10\/12{width:83.333333%!important}.desktop-xl\:w-11\/12{width:91.666667%!important}.desktop-xl\:w-2\/12{width:16.666667%!important}.desktop-xl\:w-3\/12{width:25%!important}.desktop-xl\:w-4\/12{width:33.333333%!important}.desktop-xl\:w-5\/12{width:41.666667%!important}.desktop-xl\:w-6\/12{width:50%!important}.desktop-xl\:w-7\/12{width:58.333333%!important}.desktop-xl\:w-8\/12{width:66.666667%!important}.desktop-xl\:w-9\/12{width:75%!important}}.h-8{height:2rem!important}@media (min-width:64rem){.desktop-xs\:flex{display:flex!important}}.fixed{position:fixed!important}.bottom-0{bottom:0!important}.left-0{left:0!important}.ml-1{margin-left:.25rem!important}.block{display:block!important}.w-3\/4{width:75%!important}.gap-4{gap:1rem!important}.justify-self-end{justify-self:end!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-transparent{border-color:transparent!important}.border-t-mystic-dark{--tw-border-opacity:1!important;border-top-color:rgb(218 230 240/var(--tw-border-opacity))!important}.bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.p-4{padding:1rem!important}@media (min-width:64rem){.desktop-xs\:hidden{display:none!important}.desktop-xs\:w-auto{width:auto!important}.desktop-xs\:flex-row{flex-direction:row!important}}.m-0{margin:0!important}.table-row{display:table-row!important}.visible{visibility:visible!important}.absolute{position:absolute!important}.blur{--tw-blur:blur(8px)!important;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.-rotate-0{--tw-rotate:-0deg!important}.-rotate-0,.-rotate-135{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-135{--tw-rotate:-135deg!important}.-rotate-180{--tw-rotate:-180deg!important}.-rotate-180,.-rotate-225{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-225{--tw-rotate:-225deg!important}.-rotate-25{--tw-rotate:-25deg!important}.-rotate-25,.-rotate-270{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-270{--tw-rotate:-270deg!important}.-rotate-315{--tw-rotate:-315deg!important}.-rotate-315,.-rotate-45{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-45{--tw-rotate:-45deg!important}.-rotate-90{--tw-rotate:-90deg!important}.-rotate-90,.rotate-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-0{--tw-rotate:0deg!important}.rotate-135{--tw-rotate:135deg!important}.rotate-135,.rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-180{--tw-rotate:180deg!important}.rotate-225{--tw-rotate:225deg!important}.rotate-225,.rotate-25{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-25{--tw-rotate:25deg!important}.rotate-270{--tw-rotate:270deg!important}.rotate-270,.rotate-315{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-315{--tw-rotate:315deg!important}.rotate-45{--tw-rotate:45deg!important}.rotate-45,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-90{--tw-rotate:90deg!important}.scale-x-flip{--tw-scale-x:-1!important}.scale-x-flip,.scale-y-flip{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.scale-y-flip{--tw-scale-y:-1!important}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.text-2xl{font-size:1.5rem!important;line-height:2rem!important}.text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.text-4xl{font-size:2.25rem!important;line-height:2.5rem!important}.text-5xl{font-size:3rem!important}.text-5xl,.text-6xl{line-height:1!important}.text-6xl{font-size:3.75rem!important}.text-base{font-size:1rem!important;line-height:1.5rem!important}.text-lg{font-size:1.125rem!important}.text-lg,.text-xl{line-height:1.75rem!important}.text-xl{font-size:1.25rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.text-xxs{font-size:.6875rem!important}.text-negative{--tw-text-opacity:1!important;color:rgb(185 30 40/var(--tw-text-opacity))!important}.text-negative-light{--tw-text-opacity:1!important;color:rgb(255 204 211/var(--tw-text-opacity))!important}.hover\:text-negative:hover{--tw-text-opacity:1!important;color:rgb(185 30 40/var(--tw-text-opacity))!important}.ml-2{margin-left:.5rem!important}.items-end{align-items:flex-end!important}.justify-between{justify-content:space-between!important}.rounded-bl-none{border-bottom-left-radius:0!important}.rounded-br-none{border-bottom-right-radius:0!important}.rounded-tl-none{border-top-left-radius:0!important}.rounded-tr-none{border-top-right-radius:0!important}.border-l-0{border-left-width:0!important}.border-r-0{border-right-width:0!important}.pl-0{padding-left:0!important}.pr-0{padding-right:0!important}.inline{display:inline!important}
|
|
1
|
+
.flex{display:flex!important}*{box-sizing:border-box}p-table{display:flex;flex-direction:column}.static{position:static!important}.mb-14{margin-bottom:3.5rem!important}.mb-6{margin-bottom:1.5rem!important}.table{display:table!important}.hidden{display:none!important}.h-6{height:1.5rem!important}.w-6{width:1.5rem!important}.max-w-\[20rem\]{max-width:20rem!important}.cursor-pointer{cursor:pointer!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.self-center{align-self:center!important}.rounded{border-radius:.25rem!important}.py-24{padding-bottom:6rem!important;padding-top:6rem!important}.text-center{text-align:center!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.font-semibold{font-weight:600!important}.text-storm-medium{--tw-text-opacity:1!important;color:rgb(128 130 158/var(--tw-text-opacity))!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.table-cell{display:table-cell!important}.w-1\/12{width:8.333333%!important}.w-10\/12{width:83.333333%!important}.w-11\/12{width:91.666667%!important}.w-2\/12{width:16.666667%!important}.w-3\/12{width:25%!important}.w-4\/12{width:33.333333%!important}.w-5\/12{width:41.666667%!important}.w-6\/12{width:50%!important}.w-7\/12{width:58.333333%!important}.w-8\/12{width:66.666667%!important}.w-9\/12{width:75%!important}.w-auto{width:auto!important}.w-full{width:100%!important}.flex-1{flex:1 1 0%!important}.justify-start{justify-content:flex-start!important}.justify-end{justify-content:flex-end!important}.justify-center{justify-content:center!important}.text-storm-dark{--tw-text-opacity:1!important;color:rgb(39 40 56/var(--tw-text-opacity))!important}@media (min-width:40rem){.tablet\:w-1\/12{width:8.333333%!important}.tablet\:w-10\/12{width:83.333333%!important}.tablet\:w-11\/12{width:91.666667%!important}.tablet\:w-2\/12{width:16.666667%!important}.tablet\:w-3\/12{width:25%!important}.tablet\:w-4\/12{width:33.333333%!important}.tablet\:w-5\/12{width:41.666667%!important}.tablet\:w-6\/12{width:50%!important}.tablet\:w-7\/12{width:58.333333%!important}.tablet\:w-8\/12{width:66.666667%!important}.tablet\:w-9\/12{width:75%!important}}@media (min-width:64rem){.desktop-xs\:w-1\/12{width:8.333333%!important}.desktop-xs\:w-10\/12{width:83.333333%!important}.desktop-xs\:w-11\/12{width:91.666667%!important}.desktop-xs\:w-2\/12{width:16.666667%!important}.desktop-xs\:w-3\/12{width:25%!important}.desktop-xs\:w-4\/12{width:33.333333%!important}.desktop-xs\:w-5\/12{width:41.666667%!important}.desktop-xs\:w-6\/12{width:50%!important}.desktop-xs\:w-7\/12{width:58.333333%!important}.desktop-xs\:w-8\/12{width:66.666667%!important}.desktop-xs\:w-9\/12{width:75%!important}}@media (min-width:80rem){.desktop-sm\:w-1\/12{width:8.333333%!important}.desktop-sm\:w-10\/12{width:83.333333%!important}.desktop-sm\:w-11\/12{width:91.666667%!important}.desktop-sm\:w-2\/12{width:16.666667%!important}.desktop-sm\:w-3\/12{width:25%!important}.desktop-sm\:w-4\/12{width:33.333333%!important}.desktop-sm\:w-5\/12{width:41.666667%!important}.desktop-sm\:w-6\/12{width:50%!important}.desktop-sm\:w-7\/12{width:58.333333%!important}.desktop-sm\:w-8\/12{width:66.666667%!important}.desktop-sm\:w-9\/12{width:75%!important}}@media (min-width:85.375rem){.desktop\:w-1\/12{width:8.333333%!important}.desktop\:w-10\/12{width:83.333333%!important}.desktop\:w-11\/12{width:91.666667%!important}.desktop\:w-2\/12{width:16.666667%!important}.desktop\:w-3\/12{width:25%!important}.desktop\:w-4\/12{width:33.333333%!important}.desktop\:w-5\/12{width:41.666667%!important}.desktop\:w-6\/12{width:50%!important}.desktop\:w-7\/12{width:58.333333%!important}.desktop\:w-8\/12{width:66.666667%!important}.desktop\:w-9\/12{width:75%!important}}@media (min-width:90rem){.desktop-lg\:w-1\/12{width:8.333333%!important}.desktop-lg\:w-10\/12{width:83.333333%!important}.desktop-lg\:w-11\/12{width:91.666667%!important}.desktop-lg\:w-2\/12{width:16.666667%!important}.desktop-lg\:w-3\/12{width:25%!important}.desktop-lg\:w-4\/12{width:33.333333%!important}.desktop-lg\:w-5\/12{width:41.666667%!important}.desktop-lg\:w-6\/12{width:50%!important}.desktop-lg\:w-7\/12{width:58.333333%!important}.desktop-lg\:w-8\/12{width:66.666667%!important}.desktop-lg\:w-9\/12{width:75%!important}}@media (min-width:120rem){.desktop-xl\:w-1\/12{width:8.333333%!important}.desktop-xl\:w-10\/12{width:83.333333%!important}.desktop-xl\:w-11\/12{width:91.666667%!important}.desktop-xl\:w-2\/12{width:16.666667%!important}.desktop-xl\:w-3\/12{width:25%!important}.desktop-xl\:w-4\/12{width:33.333333%!important}.desktop-xl\:w-5\/12{width:41.666667%!important}.desktop-xl\:w-6\/12{width:50%!important}.desktop-xl\:w-7\/12{width:58.333333%!important}.desktop-xl\:w-8\/12{width:66.666667%!important}.desktop-xl\:w-9\/12{width:75%!important}}.h-8{height:2rem!important}@media (min-width:64rem){.desktop-xs\:flex{display:flex!important}}.fixed{position:fixed!important}.bottom-0{bottom:0!important}.left-0{left:0!important}.ml-1{margin-left:.25rem!important}.block{display:block!important}.w-3\/4{width:75%!important}.gap-4{gap:1rem!important}.justify-self-end{justify-self:end!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-transparent{border-color:transparent!important}.border-t-mystic-dark{--tw-border-opacity:1!important;border-top-color:rgb(218 230 240/var(--tw-border-opacity))!important}.bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.p-4{padding:1rem!important}@media (min-width:64rem){.desktop-xs\:hidden{display:none!important}.desktop-xs\:w-auto{width:auto!important}.desktop-xs\:flex-row{flex-direction:row!important}}.m-0{margin:0!important}.table-row{display:table-row!important}.visible{visibility:visible!important}.absolute{position:absolute!important}.blur{--tw-blur:blur(8px)!important;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.ml-2{margin-left:.5rem!important}.items-end{align-items:flex-end!important}.justify-between{justify-content:space-between!important}.rounded-bl-none{border-bottom-left-radius:0!important}.rounded-br-none{border-bottom-right-radius:0!important}.rounded-tl-none{border-top-left-radius:0!important}.rounded-tr-none{border-top-right-radius:0!important}.border-l-0{border-left-width:0!important}.border-r-0{border-right-width:0!important}.pl-0{padding-left:0!important}.pr-0{padding-right:0!important}.text-negative{--tw-text-opacity:1!important;color:rgb(185 30 40/var(--tw-text-opacity))!important}.-rotate-0{--tw-rotate:-0deg!important}.-rotate-0,.-rotate-135{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-135{--tw-rotate:-135deg!important}.-rotate-180{--tw-rotate:-180deg!important}.-rotate-180,.-rotate-225{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-225{--tw-rotate:-225deg!important}.-rotate-25{--tw-rotate:-25deg!important}.-rotate-25,.-rotate-270{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-270{--tw-rotate:-270deg!important}.-rotate-315{--tw-rotate:-315deg!important}.-rotate-315,.-rotate-45{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-45{--tw-rotate:-45deg!important}.-rotate-90{--tw-rotate:-90deg!important}.-rotate-90,.rotate-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-0{--tw-rotate:0deg!important}.rotate-135{--tw-rotate:135deg!important}.rotate-135,.rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-180{--tw-rotate:180deg!important}.rotate-225{--tw-rotate:225deg!important}.rotate-225,.rotate-25{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-25{--tw-rotate:25deg!important}.rotate-270{--tw-rotate:270deg!important}.rotate-270,.rotate-315{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-315{--tw-rotate:315deg!important}.rotate-45{--tw-rotate:45deg!important}.rotate-45,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-90{--tw-rotate:90deg!important}.scale-x-flip{--tw-scale-x:-1!important}.scale-x-flip,.scale-y-flip{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.scale-y-flip{--tw-scale-y:-1!important}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.text-2xl{font-size:1.5rem!important;line-height:2rem!important}.text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.text-4xl{font-size:2.25rem!important;line-height:2.5rem!important}.text-5xl{font-size:3rem!important}.text-5xl,.text-6xl{line-height:1!important}.text-6xl{font-size:3.75rem!important}.text-base{font-size:1rem!important;line-height:1.5rem!important}.text-lg{font-size:1.125rem!important}.text-lg,.text-xl{line-height:1.75rem!important}.text-xl{font-size:1.25rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.text-xxs{font-size:.6875rem!important}.text-negative-light{--tw-text-opacity:1!important;color:rgb(255 204 211/var(--tw-text-opacity))!important}.hover\:text-negative:hover{--tw-text-opacity:1!important;color:rgb(185 30 40/var(--tw-text-opacity))!important}.inline{display:inline!important}
|
|
@@ -22,6 +22,8 @@ export class Table {
|
|
|
22
22
|
this.selectedFiltersAmount = undefined;
|
|
23
23
|
this.filterButtonTemplate = undefined;
|
|
24
24
|
this.enableEdit = true;
|
|
25
|
+
this.editButtonIcon = 'pencil';
|
|
26
|
+
this.editButtonText = undefined;
|
|
25
27
|
this.editButtonTemplate = undefined;
|
|
26
28
|
this.enablePageSize = true;
|
|
27
29
|
this.enablePagination = true;
|
|
@@ -34,6 +36,7 @@ export class Table {
|
|
|
34
36
|
this.emptyStateHeader = () => { var _a; return formatTranslation((_a = this._locales.empty_state) === null || _a === void 0 ? void 0 : _a.no_filter.header); };
|
|
35
37
|
this.emptyStateContent = () => { var _a; return formatTranslation((_a = this._locales.empty_state) === null || _a === void 0 ? void 0 : _a.no_filter.content); };
|
|
36
38
|
this.emptyStateAction = () => { var _a; return formatTranslation((_a = this._locales.empty_state) === null || _a === void 0 ? void 0 : _a.no_filter.action); };
|
|
39
|
+
this.enableEmptyStateAction = true;
|
|
37
40
|
this.emptyStateFilteredHeader = () => formatTranslation(this._locales.empty_state.filtered.header);
|
|
38
41
|
this.emptyStateFilteredContent = () => formatTranslation(this._locales.empty_state.filtered.content);
|
|
39
42
|
this._locales = {};
|
|
@@ -58,7 +61,7 @@ export class Table {
|
|
|
58
61
|
// filter button
|
|
59
62
|
enableFilter: this.enableFilter, selectedFiltersAmount: this.selectedFiltersAmount, filterButtonTemplate: this.filterButtonTemplate, onFilter: () => this.filter.emit(),
|
|
60
63
|
// edit button
|
|
61
|
-
enableEdit: this.enableEdit, canEdit: !!((_a = this.selectedRows) === null || _a === void 0 ? void 0 : _a.length), editButtonTemplate: this.editButtonTemplate, onEdit: () => this.edit.emit(), itemsSelectedAmount: (_b = this.selectedRows) === null || _b === void 0 ? void 0 : _b.length,
|
|
64
|
+
enableEdit: this.enableEdit, editIcon: this.editButtonIcon, editText: this.editButtonText, canEdit: !!((_a = this.selectedRows) === null || _a === void 0 ? void 0 : _a.length), editButtonTemplate: this.editButtonTemplate, onEdit: () => this.edit.emit(), itemsSelectedAmount: (_b = this.selectedRows) === null || _b === void 0 ? void 0 : _b.length,
|
|
62
65
|
//loading
|
|
63
66
|
loading: this.headerLoading
|
|
64
67
|
}), this._getHeader(), h("div", { class: "flex flex-col" }, this._getRows()), h("p-table-footer", {
|
|
@@ -142,7 +145,7 @@ export class Table {
|
|
|
142
145
|
return;
|
|
143
146
|
}
|
|
144
147
|
if (variant === 'loading') {
|
|
145
|
-
return h("p-loader", { variant: "ghost", class: "
|
|
148
|
+
return h("p-loader", { variant: "ghost", class: "h-6 w-6 rounded" });
|
|
146
149
|
}
|
|
147
150
|
if (variant === 'header') {
|
|
148
151
|
return (h("input", { class: "p-input", type: "checkbox", onChange: (ev) => this._selectAllChange(ev), checked: this._selectionContainsAll(), indeterminate: this._selectionIndeterminate() }));
|
|
@@ -153,9 +156,9 @@ export class Table {
|
|
|
153
156
|
_getEmptyState() {
|
|
154
157
|
var _a;
|
|
155
158
|
if (((_a = this.query) === null || _a === void 0 ? void 0 : _a.length) || this.selectedFiltersAmount) {
|
|
156
|
-
return (h("div", { class: "flex flex-col items-center
|
|
159
|
+
return (h("div", { class: "flex max-w-[20rem] flex-col items-center self-center py-24 text-center" }, h("p-illustration", { variant: "empty-state-search", class: "mb-6" }), h("p", { class: "text-storm-default font-semibold" }, this.emptyStateFilteredHeader()), h("p", { class: "mb-14 text-sm text-storm-medium" }, this.emptyStateFilteredContent())));
|
|
157
160
|
}
|
|
158
|
-
return (h("div", { class: "flex flex-col items-center
|
|
161
|
+
return (h("div", { class: "flex max-w-[20rem] flex-col items-center self-center py-24 text-center" }, h("p-illustration", { variant: "empty-state-overview", class: "mb-6 cursor-pointer", onClick: () => this.emptyStateActionClick.emit(null) }), h("p", { class: "text-storm-default font-semibold" }, this.emptyStateHeader()), h("p", { class: "mb-6 text-sm text-storm-medium" }, this.emptyStateContent()), this.enableEmptyStateAction && (h("p-button", { variant: "secondary", icon: "plus", size: "small", onClick: () => this.emptyStateActionClick.emit(null) }, this.emptyStateAction()))));
|
|
159
162
|
}
|
|
160
163
|
_selectAllChange($event) {
|
|
161
164
|
if (!this.enableRowSelection) {
|
|
@@ -644,6 +647,46 @@ export class Table {
|
|
|
644
647
|
"reflect": false,
|
|
645
648
|
"defaultValue": "true"
|
|
646
649
|
},
|
|
650
|
+
"editButtonIcon": {
|
|
651
|
+
"type": "string",
|
|
652
|
+
"mutable": false,
|
|
653
|
+
"complexType": {
|
|
654
|
+
"original": "IconVariant",
|
|
655
|
+
"resolved": "\"arrow\" | \"attachment\" | \"bread\" | \"calendar\" | \"camera\" | \"car\" | \"checklist\" | \"checkmark\" | \"chevron\" | \"clock\" | \"cogs\" | \"comment\" | \"document\" | \"download\" | \"envelope\" | \"explanation\" | \"eye\" | \"filter\" | \"folder\" | \"grid\" | \"headset\" | \"integration\" | \"list\" | \"location\" | \"megaphone\" | \"menu\" | \"minus\" | \"more\" | \"negative\" | \"notification\" | \"pagination\" | \"payment\" | \"pencil\" | \"person\" | \"plus\" | \"question\" | \"reload\" | \"receipt\" | \"report\" | \"search\" | \"settings\" | \"sick\" | \"signout\" | \"switch\" | \"tachometer\" | \"task\" | \"template\" | \"tool\" | \"trash\" | \"turn\" | \"upload\" | \"warning\"",
|
|
656
|
+
"references": {
|
|
657
|
+
"IconVariant": {
|
|
658
|
+
"location": "import",
|
|
659
|
+
"path": "../../../components"
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
},
|
|
663
|
+
"required": false,
|
|
664
|
+
"optional": false,
|
|
665
|
+
"docs": {
|
|
666
|
+
"tags": [],
|
|
667
|
+
"text": "The edit button icon"
|
|
668
|
+
},
|
|
669
|
+
"attribute": "edit-button-icon",
|
|
670
|
+
"reflect": false,
|
|
671
|
+
"defaultValue": "'pencil'"
|
|
672
|
+
},
|
|
673
|
+
"editButtonText": {
|
|
674
|
+
"type": "string",
|
|
675
|
+
"mutable": false,
|
|
676
|
+
"complexType": {
|
|
677
|
+
"original": "string",
|
|
678
|
+
"resolved": "string",
|
|
679
|
+
"references": {}
|
|
680
|
+
},
|
|
681
|
+
"required": false,
|
|
682
|
+
"optional": false,
|
|
683
|
+
"docs": {
|
|
684
|
+
"tags": [],
|
|
685
|
+
"text": "The edit button text if changed"
|
|
686
|
+
},
|
|
687
|
+
"attribute": "edit-button-text",
|
|
688
|
+
"reflect": false
|
|
689
|
+
},
|
|
647
690
|
"editButtonTemplate": {
|
|
648
691
|
"type": "unknown",
|
|
649
692
|
"mutable": false,
|
|
@@ -868,6 +911,24 @@ export class Table {
|
|
|
868
911
|
},
|
|
869
912
|
"defaultValue": "() =>\n formatTranslation(this._locales.empty_state?.no_filter.action)"
|
|
870
913
|
},
|
|
914
|
+
"enableEmptyStateAction": {
|
|
915
|
+
"type": "boolean",
|
|
916
|
+
"mutable": false,
|
|
917
|
+
"complexType": {
|
|
918
|
+
"original": "boolean",
|
|
919
|
+
"resolved": "boolean",
|
|
920
|
+
"references": {}
|
|
921
|
+
},
|
|
922
|
+
"required": false,
|
|
923
|
+
"optional": false,
|
|
924
|
+
"docs": {
|
|
925
|
+
"tags": [],
|
|
926
|
+
"text": "Wether to enable empty state action"
|
|
927
|
+
},
|
|
928
|
+
"attribute": "enable-empty-state-action",
|
|
929
|
+
"reflect": false,
|
|
930
|
+
"defaultValue": "true"
|
|
931
|
+
},
|
|
871
932
|
"emptyStateFilteredHeader": {
|
|
872
933
|
"type": "unknown",
|
|
873
934
|
"mutable": false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.component.js","sourceRoot":"","sources":["../../../../src/components/organisms/table/table.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,OAAO,EACP,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,KAAK,GACR,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAE9E,OAAO,EACH,WAAW,EACX,kBAAkB,GACrB,MAAM,4CAA4C,CAAC;AASpD,MAAM,OAAO,KAAK;;IAyON,cAAS,GAAG,KAAK,CAAC;;mBAhOC,KAAK;yBAKC,KAAK;yBAKL,KAAK;+BAKA,CAAC;8BAKD,IAAI;0BAKR,IAAI;wBAKR,EAAE;;;wBAyCM,EAAE;;wBAUR,IAAI;;wBAUJ,IAAI;;;sBAeN,IAAI;;0BAgCA,IAAI;4BAKF,IAAI;wBAKR,IAAI;gBAKmB,CAAC;;oBAe7B,WAAW;2BAKF,kBAAkB;4BAelB,IAAI;4BAIC,GAAG,EAAE,WAC1C,OAAA,iBAAiB,CAAC,MAAA,IAAI,CAAC,QAAQ,CAAC,WAAW,0CAAE,SAAS,CAAC,MAAM,CAAC,CAAA,EAAA;6BACxB,GAAG,EAAE,WAC3C,OAAA,iBAAiB,CAAC,MAAA,IAAI,CAAC,QAAQ,CAAC,WAAW,0CAAE,SAAS,CAAC,OAAO,CAAC,CAAA,EAAA;4BAC1B,GAAG,EAAE,WAC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listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport { QuickFilter, RowClickEvent } from '../../../types/table';\nimport { formatTranslation, getLocaleComponentStrings } from '../../../utils';\nimport { TableColumn } from '../../helpers/table-column/table-column.component';\nimport {\n defaultSize,\n defaultSizeOptions,\n} from '../../molecules/page-size-select/constants';\nimport { buttonTemplateFunc } from '../../molecules/table-header/table-header.component';\n\nexport type templateFunc = () => string;\n\n@Component({\n tag: 'p-table',\n styleUrl: 'table.component.scss',\n})\nexport class Table {\n /**\n * The items to be fed to the table\n */\n @Prop() items: string;\n\n /**\n * Wether data is loading\n */\n @Prop() loading: boolean = false;\n\n /**\n * Wether the header should show loading state\n */\n @Prop() headerLoading: boolean = false;\n\n /**\n * Wether the footer should show loading state\n */\n @Prop() footerLoading: boolean = false;\n\n /**\n * The amount of loading rows to show\n */\n @Prop() amountOfLoadingRows: number = 6;\n\n /**\n * Wether to enable selection\n */\n @Prop() enableRowSelection: boolean = true;\n\n /**\n * Wether to enable row clicking\n */\n @Prop() enableRowClick: boolean = true;\n\n /**\n * The current selection of items\n */\n @Prop() selectedRows: any[] = [];\n\n /**\n * Event whenever the current selection changes\n */\n @Event() selectedRowsChange: EventEmitter<any>;\n\n /**\n * The key to determine if a row is selected\n */\n @Prop() selectionKey: string;\n\n /**\n * A key to determine if a row can be selected\n */\n @Prop() canSelectKey: string;\n\n /**\n * Event whenever a row is clicked\n */\n @Event() rowClick: EventEmitter<RowClickEvent>;\n\n /**\n * Event whenever a row is selected\n */\n @Event() rowSelected: EventEmitter<any>;\n\n /**\n * Event whenever a row is deselected\n */\n @Event() rowDeselected: EventEmitter<any>;\n\n /**\n * Event when the table has rendered\n */\n @Event() hasRendered: EventEmitter<number>;\n\n /** START HEADER */\n /**\n * Quick filters to show\n */\n @Prop() quickFilters: QuickFilter[] = [];\n\n /**\n * Active quick filter identifier\n */\n @Prop() activeQuickFilterIdentifier: string;\n\n /**\n * Wether to show the search input\n */\n @Prop() enableSearch: boolean = true;\n\n /**\n * The query to show in the search bar\n */\n @Prop({ mutable: true }) query: string;\n\n /**\n * Wether to show the filter button\n */\n @Prop() enableFilter: boolean = true;\n\n /**\n * The amount of filters being selected\n */\n @Prop() selectedFiltersAmount: number;\n\n /**\n * The template for the filter button text\n */\n @Prop() filterButtonTemplate: templateFunc;\n\n /**\n * Wether to show the edit button\n */\n @Prop() enableEdit: boolean = true;\n\n /**\n * The template for the edit button text\n */\n @Prop() editButtonTemplate: buttonTemplateFunc;\n\n /**\n * Event when one of the quick filters is clicked\n */\n @Event() quickFilter: EventEmitter<QuickFilter>;\n\n /**\n * Event when the query changes\n */\n @Event() queryChange: EventEmitter<string>;\n\n /**\n * Event when the filter button is clicked\n */\n @Event() filter: EventEmitter<null>;\n\n /**\n * Event when the edit button is clicked\n */\n @Event() edit: EventEmitter<null>;\n\n /** START FOOTER */\n\n /**\n * Wether to enable page size select\n */\n @Prop() enablePageSize: boolean = true;\n\n /**\n * Wether to enable pagination\n */\n @Prop() enablePagination: boolean = true;\n\n /**\n * Wether to enable export\n */\n @Prop() enableExport: boolean = true;\n\n /**\n * The current page\n */\n @Prop({ mutable: true, reflect: true }) page: number = 1;\n\n /**\n * The total amount of items\n */\n @Prop() total!: number;\n\n /**\n * Event whenever the page changes\n */\n @Event() pageChange: EventEmitter<number>;\n\n /**\n * The amount of items per page\n */\n @Prop() pageSize: number = defaultSize;\n\n /**\n * The options for the page size\n */\n @Prop() pageSizeOptions: number[] = defaultSizeOptions;\n\n /**\n * Event whenever the page changes\n */\n @Event() pageSizeChange: EventEmitter<number>;\n\n /**\n * Event whenever the page changes\n */\n @Event() export: EventEmitter<number>;\n\n /**\n * Wether to hide when there is only 1 page available\n */\n @Prop() hideOnSinglePage: boolean = true;\n\n /* Empty state start */\n\n @Prop() emptyStateHeader: templateFunc = () =>\n formatTranslation(this._locales.empty_state?.no_filter.header);\n @Prop() emptyStateContent: templateFunc = () =>\n formatTranslation(this._locales.empty_state?.no_filter.content);\n @Prop() emptyStateAction: templateFunc = () =>\n formatTranslation(this._locales.empty_state?.no_filter.action);\n\n @Prop() emptyStateFilteredHeader: templateFunc = () =>\n formatTranslation(this._locales.empty_state.filtered.header);\n @Prop() emptyStateFilteredContent: templateFunc = () =>\n formatTranslation(this._locales.empty_state.filtered.content);\n\n /**\n * Event whenever the empty state is clicked\n */\n @Event() emptyStateActionClick: EventEmitter<null>;\n\n /* Empty state end */\n\n /**\n * The host element\n */\n @Element() private _el: HTMLElement;\n\n /**\n * Locales used for this component\n */\n @State() private _locales: any = {};\n\n @State() private _columns: any[] = [];\n @State() private _items: any[] = [];\n\n private _ctrlDown = false;\n\n componentWillLoad() {\n this._setLocales();\n this._parseItems(this.items);\n this._generateColumns();\n }\n\n componentDidRender() {\n this.hasRendered.emit();\n }\n\n render() {\n return (\n <Host class=\"p-table\">\n <p-table-container>\n <p-table-header\n // quick filters\n quickFilters={this.quickFilters}\n activeQuickFilterIdentifier={\n this.activeQuickFilterIdentifier\n }\n onQuickFilter={({ detail }) =>\n this.quickFilter.emit(detail)\n }\n // search\n enableSearch={this.enableSearch}\n query={this.query}\n onQueryChange={({ detail }) =>\n this.queryChange.emit(detail)\n }\n // filter button\n enableFilter={this.enableFilter}\n selectedFiltersAmount={this.selectedFiltersAmount}\n filterButtonTemplate={this.filterButtonTemplate}\n onFilter={() => this.filter.emit()}\n // edit button\n enableEdit={this.enableEdit}\n canEdit={!!this.selectedRows?.length}\n editButtonTemplate={this.editButtonTemplate}\n onEdit={() => this.edit.emit()}\n itemsSelectedAmount={this.selectedRows?.length}\n //loading\n loading={this.headerLoading}\n ></p-table-header>\n\n {this._getHeader()}\n <div class=\"flex flex-col\">{this._getRows()}</div>\n\n <p-table-footer\n // overall\n hideOnSinglePage={this.hideOnSinglePage}\n // page size select\n enablePageSize={this.enablePageSize}\n pageSize={this.pageSize}\n pageSizeOptions={this.pageSizeOptions}\n onPageSizeChange={({ detail }) =>\n this.pageSizeChange.emit(detail)\n }\n // pagination\n enablePagination={this.enablePagination}\n page={this.page}\n total={this.total}\n onPageChange={({ detail }) =>\n this.pageChange.emit(detail)\n }\n // export\n enableExport={this.enableExport}\n onExport={() => this.export.emit()}\n //loading\n loading={this.footerLoading}\n ></p-table-footer>\n </p-table-container>\n </Host>\n );\n }\n\n @Listen('localeChanged', { target: 'body' })\n private async _setLocales(): Promise<void> {\n this._locales = await getLocaleComponentStrings(this._el);\n }\n\n @Listen('tableDefinitionChanged', { target: 'body' })\n onTableDefinitionUpdated() {\n this._generateColumns();\n }\n\n @Listen('keydown', { target: 'document' })\n keyDown({ key }) {\n if (key !== 'Control' || this._ctrlDown === true) {\n return;\n }\n\n this._ctrlDown = true;\n }\n\n @Listen('keyup', { target: 'document' })\n keyUp({ key }) {\n if (key !== 'Control' || this._ctrlDown === false) {\n return;\n }\n\n this._ctrlDown = false;\n }\n\n @Listen('visibilitychange', { target: 'document' })\n visibilityChange() {\n if (document.visibilityState !== 'hidden' || this._ctrlDown === false) {\n return;\n }\n\n this._ctrlDown = false;\n }\n\n @Watch('items')\n private _parseItems(items: string) {\n if (!items) {\n this._items = [];\n return;\n }\n\n if (Array.isArray(items)) {\n this._items = items;\n return;\n }\n\n this._items = JSON.parse(items);\n }\n\n private _generateColumns() {\n const definitions = this._el.querySelectorAll('p-table-column');\n this._columns = Array.from(definitions);\n }\n\n private _getHeader() {\n return (\n <p-table-row variant=\"header\">\n {this._columns.map((col: TableColumn, index) => (\n <p-table-cell\n definition={col}\n value={col.name}\n variant=\"header\"\n checkbox={this._getCheckbox(index, null, 'header')}\n index={index}\n ></p-table-cell>\n ))}\n </p-table-row>\n );\n }\n\n private _getRows() {\n if (this.loading) {\n return Array.from(\n {\n length: this.amountOfLoadingRows,\n },\n (_, i) => (\n <p-table-row\n enableHover={\n this.enableRowSelection || this.enableRowClick\n }\n >\n {this._getLoadingColumns(i)}\n </p-table-row>\n )\n );\n }\n\n if (!this._items.length) {\n return this._getEmptyState();\n }\n\n return this._items.map((item, index) => (\n <p-table-row\n enableHover={this.enableRowSelection || this.enableRowClick}\n onClick={(ev) => this._rowClick(ev, index)}\n >\n {this._getRowColumns(item, index)}\n </p-table-row>\n ));\n }\n\n private _getRowColumns(item, index) {\n return this._columns.map((col: TableColumn, colIndex) => {\n return (\n <p-table-cell\n definition={col}\n item={item}\n checkbox={this._getCheckbox(colIndex, index)}\n index={colIndex}\n rowIndex={index}\n ></p-table-cell>\n );\n });\n }\n\n private _getLoadingColumns(index) {\n return this._columns.map((col: TableColumn, colIndex) => {\n return (\n <p-table-cell\n definition={col}\n variant=\"loading\"\n checkbox={this._getCheckbox(colIndex, index, 'loading')}\n index={colIndex}\n rowIndex={index}\n ></p-table-cell>\n );\n });\n }\n\n private _getCheckbox(\n index,\n rowIndex,\n variant: 'header' | 'default' | 'loading' = 'default'\n ) {\n if (!this.enableRowSelection || !this.selectionKey || index !== 0) {\n return;\n }\n\n if (variant === 'loading') {\n return <p-loader variant=\"ghost\" class=\"rounded w-6 h-6\" />;\n }\n\n if (variant === 'header') {\n return (\n <input\n class=\"p-input\"\n type=\"checkbox\"\n onChange={(ev) => this._selectAllChange(ev)}\n checked={this._selectionContainsAll()}\n indeterminate={this._selectionIndeterminate()}\n />\n );\n }\n\n const item = this._items[rowIndex];\n\n return (\n <input\n class=\"p-input\"\n type=\"checkbox\"\n onChange={(ev) => this._checkboxChange(ev?.target, rowIndex)}\n disabled={this.canSelectKey && !item[this.canSelectKey]}\n checked={this._selectionContains(item, rowIndex)}\n />\n );\n }\n\n private _getEmptyState() {\n if (this.query?.length || this.selectedFiltersAmount) {\n return (\n <div class=\"flex flex-col items-center text-center py-24 max-w-[20rem] self-center\">\n <p-illustration variant=\"empty-state-search\" class=\"mb-6\" />\n <p class=\"font-semibold text-storm-default\">\n {this.emptyStateFilteredHeader()}\n </p>\n <p class=\"text-sm text-storm-medium mb-14\">\n {this.emptyStateFilteredContent()}\n </p>\n </div>\n );\n }\n\n return (\n <div class=\"flex flex-col items-center text-center py-24 max-w-[20rem] self-center\">\n <p-illustration\n variant=\"empty-state-overview\"\n class=\"cursor-pointer mb-6\"\n onClick={() => this.emptyStateActionClick.emit(null)}\n />\n <p class=\"font-semibold text-storm-default\">\n {this.emptyStateHeader()}\n </p>\n <p class=\"text-sm text-storm-medium mb-6\">\n {this.emptyStateContent()}\n </p>\n <p-button\n variant=\"secondary\"\n icon=\"plus\"\n size=\"small\"\n onClick={() => this.emptyStateActionClick.emit(null)}\n >\n {this.emptyStateAction()}\n </p-button>\n </div>\n );\n }\n\n private _selectAllChange($event: any) {\n if (!this.enableRowSelection) {\n return;\n }\n\n const value = this._getCheckedValue($event.target);\n if (value) {\n const toAdd = [];\n for (let i = 0; i < this._items.length; i++) {\n const row = this._items[i];\n if (this.canSelectKey && !row[this.canSelectKey]) {\n continue;\n }\n\n if (this._selectionContains(row, i)) {\n continue;\n }\n\n toAdd.push(row);\n this.rowSelected.emit(row);\n }\n\n this.selectedRows = [...this.selectedRows, ...toAdd];\n this.selectedRowsChange.emit(this.selectedRows);\n return;\n }\n\n for (let i = 0; i < this.selectedRows.length; i++) {\n const value = this.selectedRows[i];\n const row = this._items.find(\n (d) =>\n this._getSelectionValue(d, i) ===\n this._getSelectionValue(value, i)\n );\n\n if (!row) {\n continue;\n }\n\n this.rowDeselected.emit(row);\n }\n\n this.selectedRows = [];\n this.selectedRowsChange.emit(this.selectedRows);\n }\n\n private _checkboxChange(target: any, index: number) {\n if (!this.enableRowSelection) {\n return;\n }\n\n const row = this._items[index];\n\n if (this.canSelectKey && !row[this.canSelectKey]) {\n target.checked = false;\n return;\n }\n\n const value = this._getCheckedValue(target);\n if (value) {\n this.selectedRows = [...this.selectedRows, row];\n this.selectedRowsChange.emit(this.selectedRows);\n this.rowSelected.emit(row);\n return;\n }\n\n const indexOfToRemove = this._selectionContains(row, index, true);\n\n // we need to do this, because splice does not trigger the selection setter.\n const selection = [...this.selectedRows];\n selection.splice(indexOfToRemove, 1);\n this.selectedRows = selection;\n this.selectedRowsChange.emit(this.selectedRows);\n this.rowDeselected.emit(row);\n }\n\n private _getCheckedValue(target: any) {\n return target?.checked;\n }\n\n private _getSelectionValue(row: any, index: number) {\n return this.selectionKey ? row?.[this.selectionKey] || index : index;\n }\n\n private _selectionContains(row, index, returnIndex = false): any {\n const returnValue = this.selectedRows.findIndex(\n (item) =>\n this._getSelectionValue(row, index) ===\n this._getSelectionValue(item, index)\n );\n return !returnIndex ? returnValue >= 0 : returnValue;\n }\n\n private _selectionContainsAll() {\n let returnValue = true;\n if (!this._items?.length) {\n return false;\n }\n\n for (let i = 0; i < this._items?.length; i++) {\n const item = this._items[i];\n const contains = this._selectionContains(item, i);\n\n if (!contains) {\n returnValue = false;\n break;\n }\n }\n\n return returnValue;\n }\n\n private _selectionIndeterminate() {\n if (!this._items?.length || !this.selectedRows?.length) {\n return false;\n }\n\n let containsCount = 0;\n for (let i = 0; i < this._items?.length; i++) {\n const item = this._items[i];\n const contains = this._selectionContains(item, i);\n\n if (contains) {\n containsCount++;\n }\n }\n\n return containsCount > 0 && containsCount !== this._items.length;\n }\n\n private _rowClick($event, index) {\n const target = $event.target;\n\n if (\n target.tagName.toLowerCase() === 'input' ||\n target.type === 'checkbox'\n ) {\n return;\n }\n\n const row = this._findRow($event.target);\n\n if (this.enableRowClick) {\n const action = this._findRowAction($event.target);\n\n if (action) {\n return;\n }\n\n const item = this._items[index];\n this.rowClick.emit({\n item,\n ctrlDown: this._ctrlDown,\n });\n return;\n }\n\n if (!this.enableRowSelection) {\n return;\n }\n\n const checkbox = row?.querySelector('input[type=\"checkbox\"]');\n\n if (!checkbox) {\n return;\n }\n\n checkbox.checked = !checkbox.checked;\n this._checkboxChange(checkbox, index);\n }\n\n private _findRow(el: HTMLElement) {\n if (!el) {\n return el;\n }\n\n if (el?.tagName?.toLowerCase() === 'p-table-row') {\n return el;\n }\n\n return this._findRow(el?.parentElement);\n }\n\n private _findRowAction(el: HTMLElement) {\n if (!el) {\n return null;\n }\n\n if (\n el.getAttribute('data-is-action') !== null &&\n el.getAttribute('data-is-action') !== 'false'\n ) {\n return el;\n }\n\n if (el?.tagName?.toLowerCase() === 'p-table-row') {\n return null;\n }\n\n return this._findRowAction(el?.parentElement);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"table.component.js","sourceRoot":"","sources":["../../../../src/components/organisms/table/table.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,OAAO,EACP,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,KAAK,GACR,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAE9E,OAAO,EACH,WAAW,EACX,kBAAkB,GACrB,MAAM,4CAA4C,CAAC;AASpD,MAAM,OAAO,KAAK;;IAsPN,cAAS,GAAG,KAAK,CAAC;;mBA7OC,KAAK;yBAKC,KAAK;yBAKL,KAAK;+BAKA,CAAC;8BAKD,IAAI;0BAKR,IAAI;wBAKR,EAAE;;;wBAyCM,EAAE;;wBAUR,IAAI;;wBAUJ,IAAI;;;sBAeN,IAAI;0BAKI,QAAQ;;;0BAqCZ,IAAI;4BAKF,IAAI;wBAKR,IAAI;gBAKmB,CAAC;;oBAe7B,WAAW;2BAKF,kBAAkB;4BAelB,IAAI;4BAGC,GAAG,EAAE,WAC1C,OAAA,iBAAiB,CAAC,MAAA,IAAI,CAAC,QAAQ,CAAC,WAAW,0CAAE,SAAS,CAAC,MAAM,CAAC,CAAA,EAAA;6BACxB,GAAG,EAAE,WAC3C,OAAA,iBAAiB,CAAC,MAAA,IAAI,CAAC,QAAQ,CAAC,WAAW,0CAAE,SAAS,CAAC,OAAO,CAAC,CAAA,EAAA;4BAC1B,GAAG,EAAE,WAC1C,OAAA,iBAAiB,CAAC,MAAA,IAAI,CAAC,QAAQ,CAAC,WAAW,0CAAE,SAAS,CAAC,MAAM,CAAC,CAAA,EAAA;kCAIxB,IAAI;oCAEG,GAAG,EAAE,CAClD,iBAAi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["import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport { IconVariant } from '../../../components';\nimport { QuickFilter, RowClickEvent } from '../../../types/table';\nimport { formatTranslation, getLocaleComponentStrings } from '../../../utils';\nimport { TableColumn } from '../../helpers/table-column/table-column.component';\nimport {\n defaultSize,\n defaultSizeOptions,\n} from '../../molecules/page-size-select/constants';\nimport { buttonTemplateFunc } from '../../molecules/table-header/table-header.component';\n\nexport type templateFunc = () => string;\n\n@Component({\n tag: 'p-table',\n styleUrl: 'table.component.scss',\n})\nexport class Table {\n /**\n * The items to be fed to the table\n */\n @Prop() items: string;\n\n /**\n * Wether data is loading\n */\n @Prop() loading: boolean = false;\n\n /**\n * Wether the header should show loading state\n */\n @Prop() headerLoading: boolean = false;\n\n /**\n * Wether the footer should show loading state\n */\n @Prop() footerLoading: boolean = false;\n\n /**\n * The amount of loading rows to show\n */\n @Prop() amountOfLoadingRows: number = 6;\n\n /**\n * Wether to enable selection\n */\n @Prop() enableRowSelection: boolean = true;\n\n /**\n * Wether to enable row clicking\n */\n @Prop() enableRowClick: boolean = true;\n\n /**\n * The current selection of items\n */\n @Prop() selectedRows: any[] = [];\n\n /**\n * Event whenever the current selection changes\n */\n @Event() selectedRowsChange: EventEmitter<any>;\n\n /**\n * The key to determine if a row is selected\n */\n @Prop() selectionKey: string;\n\n /**\n * A key to determine if a row can be selected\n */\n @Prop() canSelectKey: string;\n\n /**\n * Event whenever a row is clicked\n */\n @Event() rowClick: EventEmitter<RowClickEvent>;\n\n /**\n * Event whenever a row is selected\n */\n @Event() rowSelected: EventEmitter<any>;\n\n /**\n * Event whenever a row is deselected\n */\n @Event() rowDeselected: EventEmitter<any>;\n\n /**\n * Event when the table has rendered\n */\n @Event() hasRendered: EventEmitter<number>;\n\n /** START HEADER */\n /**\n * Quick filters to show\n */\n @Prop() quickFilters: QuickFilter[] = [];\n\n /**\n * Active quick filter identifier\n */\n @Prop() activeQuickFilterIdentifier: string;\n\n /**\n * Wether to show the search input\n */\n @Prop() enableSearch: boolean = true;\n\n /**\n * The query to show in the search bar\n */\n @Prop({ mutable: true }) query: string;\n\n /**\n * Wether to show the filter button\n */\n @Prop() enableFilter: boolean = true;\n\n /**\n * The amount of filters being selected\n */\n @Prop() selectedFiltersAmount: number;\n\n /**\n * The template for the filter button text\n */\n @Prop() filterButtonTemplate: templateFunc;\n\n /**\n * Wether to show the edit button\n */\n @Prop() enableEdit: boolean = true;\n\n /**\n * The edit button icon\n */\n @Prop() editButtonIcon: IconVariant = 'pencil';\n\n /**\n * The edit button text if changed\n */\n @Prop() editButtonText: string;\n\n /**\n * The template for the edit button text\n */\n @Prop() editButtonTemplate: buttonTemplateFunc;\n\n /**\n * Event when one of the quick filters is clicked\n */\n @Event() quickFilter: EventEmitter<QuickFilter>;\n\n /**\n * Event when the query changes\n */\n @Event() queryChange: EventEmitter<string>;\n\n /**\n * Event when the filter button is clicked\n */\n @Event() filter: EventEmitter<null>;\n\n /**\n * Event when the edit button is clicked\n */\n @Event() edit: EventEmitter<null>;\n\n /** START FOOTER */\n\n /**\n * Wether to enable page size select\n */\n @Prop() enablePageSize: boolean = true;\n\n /**\n * Wether to enable pagination\n */\n @Prop() enablePagination: boolean = true;\n\n /**\n * Wether to enable export\n */\n @Prop() enableExport: boolean = true;\n\n /**\n * The current page\n */\n @Prop({ mutable: true, reflect: true }) page: number = 1;\n\n /**\n * The total amount of items\n */\n @Prop() total!: number;\n\n /**\n * Event whenever the page changes\n */\n @Event() pageChange: EventEmitter<number>;\n\n /**\n * The amount of items per page\n */\n @Prop() pageSize: number = defaultSize;\n\n /**\n * The options for the page size\n */\n @Prop() pageSizeOptions: number[] = defaultSizeOptions;\n\n /**\n * Event whenever the page changes\n */\n @Event() pageSizeChange: EventEmitter<number>;\n\n /**\n * Event whenever the page changes\n */\n @Event() export: EventEmitter<number>;\n\n /**\n * Wether to hide when there is only 1 page available\n */\n @Prop() hideOnSinglePage: boolean = true;\n\n /* Empty state start */\n @Prop() emptyStateHeader: templateFunc = () =>\n formatTranslation(this._locales.empty_state?.no_filter.header);\n @Prop() emptyStateContent: templateFunc = () =>\n formatTranslation(this._locales.empty_state?.no_filter.content);\n @Prop() emptyStateAction: templateFunc = () =>\n formatTranslation(this._locales.empty_state?.no_filter.action);\n /**\n * Wether to enable empty state action\n */\n @Prop() enableEmptyStateAction: boolean = true;\n\n @Prop() emptyStateFilteredHeader: templateFunc = () =>\n formatTranslation(this._locales.empty_state.filtered.header);\n @Prop() emptyStateFilteredContent: templateFunc = () =>\n formatTranslation(this._locales.empty_state.filtered.content);\n\n /**\n * Event whenever the empty state is clicked\n */\n @Event() emptyStateActionClick: EventEmitter<null>;\n\n /* Empty state end */\n\n /**\n * The host element\n */\n @Element() private _el: HTMLElement;\n\n /**\n * Locales used for this component\n */\n @State() private _locales: any = {};\n\n @State() private _columns: any[] = [];\n @State() private _items: any[] = [];\n\n private _ctrlDown = false;\n\n componentWillLoad() {\n this._setLocales();\n this._parseItems(this.items);\n this._generateColumns();\n }\n\n componentDidRender() {\n this.hasRendered.emit();\n }\n\n render() {\n return (\n <Host class=\"p-table\">\n <p-table-container>\n <p-table-header\n // quick filters\n quickFilters={this.quickFilters}\n activeQuickFilterIdentifier={\n this.activeQuickFilterIdentifier\n }\n onQuickFilter={({ detail }) =>\n this.quickFilter.emit(detail)\n }\n // search\n enableSearch={this.enableSearch}\n query={this.query}\n onQueryChange={({ detail }) =>\n this.queryChange.emit(detail)\n }\n // filter button\n enableFilter={this.enableFilter}\n selectedFiltersAmount={this.selectedFiltersAmount}\n filterButtonTemplate={this.filterButtonTemplate}\n onFilter={() => this.filter.emit()}\n // edit button\n enableEdit={this.enableEdit}\n editIcon={this.editButtonIcon}\n editText={this.editButtonText}\n canEdit={!!this.selectedRows?.length}\n editButtonTemplate={this.editButtonTemplate}\n onEdit={() => this.edit.emit()}\n itemsSelectedAmount={this.selectedRows?.length}\n //loading\n loading={this.headerLoading}\n ></p-table-header>\n\n {this._getHeader()}\n <div class=\"flex flex-col\">{this._getRows()}</div>\n\n <p-table-footer\n // overall\n hideOnSinglePage={this.hideOnSinglePage}\n // page size select\n enablePageSize={this.enablePageSize}\n pageSize={this.pageSize}\n pageSizeOptions={this.pageSizeOptions}\n onPageSizeChange={({ detail }) =>\n this.pageSizeChange.emit(detail)\n }\n // pagination\n enablePagination={this.enablePagination}\n page={this.page}\n total={this.total}\n onPageChange={({ detail }) =>\n this.pageChange.emit(detail)\n }\n // export\n enableExport={this.enableExport}\n onExport={() => this.export.emit()}\n //loading\n loading={this.footerLoading}\n ></p-table-footer>\n </p-table-container>\n </Host>\n );\n }\n\n @Listen('localeChanged', { target: 'body' })\n private async _setLocales(): Promise<void> {\n this._locales = await getLocaleComponentStrings(this._el);\n }\n\n @Listen('tableDefinitionChanged', { target: 'body' })\n onTableDefinitionUpdated() {\n this._generateColumns();\n }\n\n @Listen('keydown', { target: 'document' })\n keyDown({ key }) {\n if (key !== 'Control' || this._ctrlDown === true) {\n return;\n }\n\n this._ctrlDown = true;\n }\n\n @Listen('keyup', { target: 'document' })\n keyUp({ key }) {\n if (key !== 'Control' || this._ctrlDown === false) {\n return;\n }\n\n this._ctrlDown = false;\n }\n\n @Listen('visibilitychange', { target: 'document' })\n visibilityChange() {\n if (document.visibilityState !== 'hidden' || this._ctrlDown === false) {\n return;\n }\n\n this._ctrlDown = false;\n }\n\n @Watch('items')\n private _parseItems(items: string) {\n if (!items) {\n this._items = [];\n return;\n }\n\n if (Array.isArray(items)) {\n this._items = items;\n return;\n }\n\n this._items = JSON.parse(items);\n }\n\n private _generateColumns() {\n const definitions = this._el.querySelectorAll('p-table-column');\n this._columns = Array.from(definitions);\n }\n\n private _getHeader() {\n return (\n <p-table-row variant=\"header\">\n {this._columns.map((col: TableColumn, index) => (\n <p-table-cell\n definition={col}\n value={col.name}\n variant=\"header\"\n checkbox={this._getCheckbox(index, null, 'header')}\n index={index}\n ></p-table-cell>\n ))}\n </p-table-row>\n );\n }\n\n private _getRows() {\n if (this.loading) {\n return Array.from(\n {\n length: this.amountOfLoadingRows,\n },\n (_, i) => (\n <p-table-row\n enableHover={\n this.enableRowSelection || this.enableRowClick\n }\n >\n {this._getLoadingColumns(i)}\n </p-table-row>\n )\n );\n }\n\n if (!this._items.length) {\n return this._getEmptyState();\n }\n\n return this._items.map((item, index) => (\n <p-table-row\n enableHover={this.enableRowSelection || this.enableRowClick}\n onClick={(ev) => this._rowClick(ev, index)}\n >\n {this._getRowColumns(item, index)}\n </p-table-row>\n ));\n }\n\n private _getRowColumns(item, index) {\n return this._columns.map((col: TableColumn, colIndex) => {\n return (\n <p-table-cell\n definition={col}\n item={item}\n checkbox={this._getCheckbox(colIndex, index)}\n index={colIndex}\n rowIndex={index}\n ></p-table-cell>\n );\n });\n }\n\n private _getLoadingColumns(index) {\n return this._columns.map((col: TableColumn, colIndex) => {\n return (\n <p-table-cell\n definition={col}\n variant=\"loading\"\n checkbox={this._getCheckbox(colIndex, index, 'loading')}\n index={colIndex}\n rowIndex={index}\n ></p-table-cell>\n );\n });\n }\n\n private _getCheckbox(\n index,\n rowIndex,\n variant: 'header' | 'default' | 'loading' = 'default'\n ) {\n if (!this.enableRowSelection || !this.selectionKey || index !== 0) {\n return;\n }\n\n if (variant === 'loading') {\n return <p-loader variant=\"ghost\" class=\"h-6 w-6 rounded\" />;\n }\n\n if (variant === 'header') {\n return (\n <input\n class=\"p-input\"\n type=\"checkbox\"\n onChange={(ev) => this._selectAllChange(ev)}\n checked={this._selectionContainsAll()}\n indeterminate={this._selectionIndeterminate()}\n />\n );\n }\n\n const item = this._items[rowIndex];\n\n return (\n <input\n class=\"p-input\"\n type=\"checkbox\"\n onChange={(ev) => this._checkboxChange(ev?.target, rowIndex)}\n disabled={this.canSelectKey && !item[this.canSelectKey]}\n checked={this._selectionContains(item, rowIndex)}\n />\n );\n }\n\n private _getEmptyState() {\n if (this.query?.length || this.selectedFiltersAmount) {\n return (\n <div class=\"flex max-w-[20rem] flex-col items-center self-center py-24 text-center\">\n <p-illustration variant=\"empty-state-search\" class=\"mb-6\" />\n <p class=\"text-storm-default font-semibold\">\n {this.emptyStateFilteredHeader()}\n </p>\n <p class=\"mb-14 text-sm text-storm-medium\">\n {this.emptyStateFilteredContent()}\n </p>\n </div>\n );\n }\n\n return (\n <div class=\"flex max-w-[20rem] flex-col items-center self-center py-24 text-center\">\n <p-illustration\n variant=\"empty-state-overview\"\n class=\"mb-6 cursor-pointer\"\n onClick={() => this.emptyStateActionClick.emit(null)}\n />\n <p class=\"text-storm-default font-semibold\">\n {this.emptyStateHeader()}\n </p>\n <p class=\"mb-6 text-sm text-storm-medium\">\n {this.emptyStateContent()}\n </p>\n {this.enableEmptyStateAction && (\n <p-button\n variant=\"secondary\"\n icon=\"plus\"\n size=\"small\"\n onClick={() => this.emptyStateActionClick.emit(null)}\n >\n {this.emptyStateAction()}\n </p-button>\n )}\n </div>\n );\n }\n\n private _selectAllChange($event: any) {\n if (!this.enableRowSelection) {\n return;\n }\n\n const value = this._getCheckedValue($event.target);\n if (value) {\n const toAdd = [];\n for (let i = 0; i < this._items.length; i++) {\n const row = this._items[i];\n if (this.canSelectKey && !row[this.canSelectKey]) {\n continue;\n }\n\n if (this._selectionContains(row, i)) {\n continue;\n }\n\n toAdd.push(row);\n this.rowSelected.emit(row);\n }\n\n this.selectedRows = [...this.selectedRows, ...toAdd];\n this.selectedRowsChange.emit(this.selectedRows);\n return;\n }\n\n for (let i = 0; i < this.selectedRows.length; i++) {\n const value = this.selectedRows[i];\n const row = this._items.find(\n (d) =>\n this._getSelectionValue(d, i) ===\n this._getSelectionValue(value, i)\n );\n\n if (!row) {\n continue;\n }\n\n this.rowDeselected.emit(row);\n }\n\n this.selectedRows = [];\n this.selectedRowsChange.emit(this.selectedRows);\n }\n\n private _checkboxChange(target: any, index: number) {\n if (!this.enableRowSelection) {\n return;\n }\n\n const row = this._items[index];\n\n if (this.canSelectKey && !row[this.canSelectKey]) {\n target.checked = false;\n return;\n }\n\n const value = this._getCheckedValue(target);\n if (value) {\n this.selectedRows = [...this.selectedRows, row];\n this.selectedRowsChange.emit(this.selectedRows);\n this.rowSelected.emit(row);\n return;\n }\n\n const indexOfToRemove = this._selectionContains(row, index, true);\n\n // we need to do this, because splice does not trigger the selection setter.\n const selection = [...this.selectedRows];\n selection.splice(indexOfToRemove, 1);\n this.selectedRows = selection;\n this.selectedRowsChange.emit(this.selectedRows);\n this.rowDeselected.emit(row);\n }\n\n private _getCheckedValue(target: any) {\n return target?.checked;\n }\n\n private _getSelectionValue(row: any, index: number) {\n return this.selectionKey ? row?.[this.selectionKey] || index : index;\n }\n\n private _selectionContains(row, index, returnIndex = false): any {\n const returnValue = this.selectedRows.findIndex(\n (item) =>\n this._getSelectionValue(row, index) ===\n this._getSelectionValue(item, index)\n );\n return !returnIndex ? returnValue >= 0 : returnValue;\n }\n\n private _selectionContainsAll() {\n let returnValue = true;\n if (!this._items?.length) {\n return false;\n }\n\n for (let i = 0; i < this._items?.length; i++) {\n const item = this._items[i];\n const contains = this._selectionContains(item, i);\n\n if (!contains) {\n returnValue = false;\n break;\n }\n }\n\n return returnValue;\n }\n\n private _selectionIndeterminate() {\n if (!this._items?.length || !this.selectedRows?.length) {\n return false;\n }\n\n let containsCount = 0;\n for (let i = 0; i < this._items?.length; i++) {\n const item = this._items[i];\n const contains = this._selectionContains(item, i);\n\n if (contains) {\n containsCount++;\n }\n }\n\n return containsCount > 0 && containsCount !== this._items.length;\n }\n\n private _rowClick($event, index) {\n const target = $event.target;\n\n if (\n target.tagName.toLowerCase() === 'input' ||\n target.type === 'checkbox'\n ) {\n return;\n }\n\n const row = this._findRow($event.target);\n\n if (this.enableRowClick) {\n const action = this._findRowAction($event.target);\n\n if (action) {\n return;\n }\n\n const item = this._items[index];\n this.rowClick.emit({\n item,\n ctrlDown: this._ctrlDown,\n });\n return;\n }\n\n if (!this.enableRowSelection) {\n return;\n }\n\n const checkbox = row?.querySelector('input[type=\"checkbox\"]');\n\n if (!checkbox) {\n return;\n }\n\n checkbox.checked = !checkbox.checked;\n this._checkboxChange(checkbox, index);\n }\n\n private _findRow(el: HTMLElement) {\n if (!el) {\n return el;\n }\n\n if (el?.tagName?.toLowerCase() === 'p-table-row') {\n return el;\n }\n\n return this._findRow(el?.parentElement);\n }\n\n private _findRowAction(el: HTMLElement) {\n if (!el) {\n return null;\n }\n\n if (\n el.getAttribute('data-is-action') !== null &&\n el.getAttribute('data-is-action') !== 'false'\n ) {\n return el;\n }\n\n if (el?.tagName?.toLowerCase() === 'p-table-row') {\n return null;\n }\n\n return this._findRowAction(el?.parentElement);\n }\n}\n"]}
|