@paperless/core 2.0.1-beta.114 → 2.0.1-beta.116
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 +22 -0
- package/dist/build/index.esm.js +1 -1
- package/dist/build/index.esm.js.map +1 -1
- package/dist/build/{p-7046dc66.entry.js → p-05db72d0.entry.js} +2 -2
- package/dist/build/{p-5c3167c8.entry.js → p-26a3990a.entry.js} +2 -2
- package/dist/build/{p-76a4f70e.entry.js → p-2edd87f3.entry.js} +2 -2
- package/dist/{paperless/p-cc379751.entry.js → build/p-43d3357f.entry.js} +2 -2
- package/dist/build/p-474a16ab.entry.js +2 -0
- package/dist/{paperless/p-66adc33a.entry.js → build/p-53009290.entry.js} +2 -2
- package/dist/build/{p-0da54170.entry.js → p-55a41995.entry.js} +2 -2
- package/dist/{paperless/p-91ea22cd.entry.js → build/p-87981fef.entry.js} +2 -2
- package/dist/{paperless/p-cac630d2.entry.js → build/p-8981247d.entry.js} +2 -2
- package/dist/{paperless/p-730bcacd.entry.js → build/p-8a5dcfac.entry.js} +2 -2
- package/dist/build/p-8ca737d7.entry.js +2 -0
- package/dist/{paperless/p-e9db1b2d.entry.js.map → build/p-8ca737d7.entry.js.map} +1 -1
- package/dist/build/p-8f7a37d9.entry.js +2 -0
- package/dist/build/p-8f7a37d9.entry.js.map +1 -0
- package/dist/build/{p-bfda8061.entry.js → p-965962ce.entry.js} +2 -2
- package/dist/build/p-B3sNjfzc.js +2 -0
- package/dist/build/p-B3sNjfzc.js.map +1 -0
- package/dist/build/p-DdQ-S2l7.js +2 -0
- package/dist/build/p-DdQ-S2l7.js.map +1 -0
- package/dist/build/p-a02a5085.js +2 -0
- package/dist/build/{p-79b42a23.entry.js → p-adb1ad27.entry.js} +2 -2
- package/dist/build/{p-912ce588.entry.js → p-aec29ee9.entry.js} +2 -2
- package/dist/build/p-attachment.entry.esm.js.map +1 -1
- package/dist/build/{p-0c257fa2.entry.js → p-cc3307b8.entry.js} +2 -2
- package/dist/build/{p-29d452d0.entry.js → p-cfd2e444.entry.js} +2 -2
- package/dist/build/{p-7658fd89.entry.js → p-e2054751.entry.js} +2 -2
- package/dist/build/p-table.entry.esm.js.map +1 -1
- package/dist/build/paperless.esm.js +1 -1
- package/dist/cjs/constants-DDb_wCc1.js +16 -0
- package/dist/cjs/constants-DDb_wCc1.js.map +1 -0
- package/dist/cjs/index.cjs.js +11 -10
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/p-attachment.cjs.entry.js +88 -10
- package/dist/cjs/p-attachment.cjs.entry.js.map +1 -1
- package/dist/cjs/p-attachment.entry.cjs.js.map +1 -1
- package/dist/cjs/p-button-group.cjs.entry.js +1 -1
- package/dist/cjs/p-calendar.cjs.entry.js +1 -1
- package/dist/cjs/p-checkbox_4.cjs.entry.js +4 -4
- package/dist/cjs/p-content-slider.cjs.entry.js +2 -2
- package/dist/cjs/p-datepicker.cjs.entry.js +2 -2
- package/dist/cjs/p-empty-state_9.cjs.entry.js +8 -8
- package/dist/cjs/p-field_2.cjs.entry.js +3 -3
- package/dist/cjs/p-label.cjs.entry.js +3 -3
- package/dist/cjs/p-listing.cjs.entry.js +1 -1
- package/dist/cjs/p-navbar.cjs.entry.js +1 -1
- package/dist/cjs/p-navigation-item.cjs.entry.js +2 -2
- package/dist/cjs/p-navigation-section.cjs.entry.js +1 -1
- package/dist/cjs/p-pagination_3.cjs.entry.js +4 -4
- package/dist/cjs/p-select.cjs.entry.js +1 -1
- package/dist/cjs/p-stepper.cjs.entry.js +1 -1
- package/dist/cjs/p-table.cjs.entry.js +4 -3
- package/dist/cjs/p-table.cjs.entry.js.map +1 -1
- package/dist/cjs/p-table.entry.cjs.js.map +1 -1
- package/dist/cjs/p-toast.cjs.entry.js +1 -1
- package/dist/cjs/paperless.cjs.js +1 -1
- package/dist/cjs/{screens-D_ByWDz6.js → screens-h1MTJhCu.js} +2 -13
- package/dist/cjs/screens-h1MTJhCu.js.map +1 -0
- package/dist/collection/components/molecules/attachment/attachment.component.css +1 -1
- package/dist/collection/components/molecules/attachment/attachment.component.js +175 -14
- package/dist/collection/components/molecules/attachment/attachment.component.js.map +1 -1
- package/dist/collection/components/molecules/button-group/button-group.component.js +1 -1
- package/dist/collection/components/molecules/calendar/calendar.component.js +1 -1
- package/dist/collection/components/molecules/content-slider/content-slider.component.js +2 -2
- package/dist/collection/components/molecules/datepicker/datepicker.component.js +2 -2
- package/dist/collection/components/molecules/dropdown/dropdown.component.js +4 -4
- package/dist/collection/components/molecules/empty-state/empty-state.component.js +2 -2
- package/dist/collection/components/molecules/field/field/field.component.js +3 -3
- package/dist/collection/components/molecules/label/label.component.js +3 -3
- package/dist/collection/components/molecules/navigation/item/navigation-item.component.js +2 -2
- package/dist/collection/components/molecules/navigation/section/navigation-section.component.js +1 -1
- package/dist/collection/components/molecules/pagination/pages/pagination-pages.component.js +1 -1
- package/dist/collection/components/molecules/pagination/pagination/pagination.component.js +3 -3
- package/dist/collection/components/molecules/select/select.component.js +1 -1
- package/dist/collection/components/molecules/table/cell/table-cell.component.js +1 -1
- package/dist/collection/components/molecules/table/footer/table-footer.component.js +2 -2
- package/dist/collection/components/molecules/table/row/table-row.component.js +3 -3
- package/dist/collection/components/molecules/toast/toast.component.js +1 -1
- package/dist/collection/components/organisms/listing/listing.component.js +1 -1
- package/dist/collection/components/organisms/navbar/navbar.component.js +1 -1
- package/dist/collection/components/organisms/stepper/stepper.component.js +1 -1
- package/dist/components/index.js +3 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/{p-LsrP-Unv.js → p-B3sNjfzc.js} +3 -13
- package/dist/components/p-B3sNjfzc.js.map +1 -0
- package/dist/components/{p-Cr5nmZn3.js → p-BFXs5OQx.js} +3 -3
- package/dist/components/{p-Cr5nmZn3.js.map → p-BFXs5OQx.js.map} +1 -1
- package/dist/components/{p-BSAVV_6x.js → p-Bb8uyInh.js} +5 -5
- package/dist/components/{p-BSAVV_6x.js.map → p-Bb8uyInh.js.map} +1 -1
- package/dist/components/{p-BPXS3EM8.js → p-BtG4QBr6.js} +3 -3
- package/dist/components/{p-BPXS3EM8.js.map → p-BtG4QBr6.js.map} +1 -1
- package/dist/components/{p-CgHBpaJ2.js → p-Bw6TWc-_.js} +8 -8
- package/dist/components/{p-CgHBpaJ2.js.map → p-Bw6TWc-_.js.map} +1 -1
- package/dist/components/{p-Cp8IEnaB.js → p-C5yz-mQE.js} +3 -3
- package/dist/components/{p-Cp8IEnaB.js.map → p-C5yz-mQE.js.map} +1 -1
- package/dist/components/{p-DwUkFgs3.js → p-CBxUj1bt.js} +3 -3
- package/dist/components/{p-DwUkFgs3.js.map → p-CBxUj1bt.js.map} +1 -1
- package/dist/components/{p-Hj0dtQOu.js → p-Cw7TZ18X.js} +4 -4
- package/dist/components/{p-Hj0dtQOu.js.map → p-Cw7TZ18X.js.map} +1 -1
- package/dist/components/{p-HLwIOGJt.js → p-DaFVCsxX.js} +3 -3
- package/dist/components/{p-HLwIOGJt.js.map → p-DaFVCsxX.js.map} +1 -1
- package/dist/components/p-DdQ-S2l7.js +14 -0
- package/dist/components/p-DdQ-S2l7.js.map +1 -0
- package/dist/components/{p-b3Miuuib.js → p-Dn38WwJ_.js} +8 -8
- package/dist/components/{p-b3Miuuib.js.map → p-Dn38WwJ_.js.map} +1 -1
- package/dist/components/{p-BnyZAlkn.js → p-ExfyVPT0.js} +5 -5
- package/dist/components/{p-BnyZAlkn.js.map → p-ExfyVPT0.js.map} +1 -1
- package/dist/components/{p-BP1aeBcW.js → p-YYQ927T-.js} +6 -6
- package/dist/components/{p-BP1aeBcW.js.map → p-YYQ927T-.js.map} +1 -1
- package/dist/components/p-attachment.js +93 -11
- package/dist/components/p-attachment.js.map +1 -1
- package/dist/components/p-button-group.js +1 -1
- package/dist/components/p-calendar.js +1 -1
- package/dist/components/p-content-slider.js +2 -2
- package/dist/components/p-datepicker.js +5 -5
- package/dist/components/p-dropdown.js +1 -1
- package/dist/components/p-empty-state.js +1 -1
- package/dist/components/p-field.js +1 -1
- package/dist/components/p-label.js +3 -3
- package/dist/components/p-listing.js +1 -1
- package/dist/components/p-navbar.js +1 -1
- package/dist/components/p-navigation-item.js +2 -2
- package/dist/components/p-navigation-section.js +1 -1
- package/dist/components/p-pagination-pages.js +1 -1
- package/dist/components/p-pagination-size.js +1 -1
- package/dist/components/p-pagination.js +1 -1
- package/dist/components/p-profile.js +1 -1
- package/dist/components/p-select.js +3 -3
- package/dist/components/p-stepper.js +1 -1
- package/dist/components/p-table-cell.js +1 -1
- package/dist/components/p-table-footer.js +1 -1
- package/dist/components/p-table-header.js +1 -1
- package/dist/components/p-table-row.js +1 -1
- package/dist/components/p-table.js +12 -11
- package/dist/components/p-table.js.map +1 -1
- package/dist/components/p-toast.js +1 -1
- package/dist/esm/constants-DdQ-S2l7.js +14 -0
- package/dist/esm/constants-DdQ-S2l7.js.map +1 -0
- package/dist/esm/index.js +3 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/p-attachment.entry.js +89 -11
- package/dist/esm/p-attachment.entry.js.map +1 -1
- package/dist/esm/p-button-group.entry.js +1 -1
- package/dist/esm/p-calendar.entry.js +1 -1
- package/dist/esm/p-checkbox_4.entry.js +4 -4
- package/dist/esm/p-content-slider.entry.js +2 -2
- package/dist/esm/p-datepicker.entry.js +2 -2
- package/dist/esm/p-empty-state_9.entry.js +8 -8
- package/dist/esm/p-field_2.entry.js +3 -3
- package/dist/esm/p-label.entry.js +3 -3
- package/dist/esm/p-listing.entry.js +1 -1
- package/dist/esm/p-navbar.entry.js +1 -1
- package/dist/esm/p-navigation-item.entry.js +2 -2
- package/dist/esm/p-navigation-section.entry.js +1 -1
- package/dist/esm/p-pagination_3.entry.js +4 -4
- package/dist/esm/p-select.entry.js +1 -1
- package/dist/esm/p-stepper.entry.js +1 -1
- package/dist/esm/p-table.entry.js +2 -1
- package/dist/esm/p-table.entry.js.map +1 -1
- package/dist/esm/p-toast.entry.js +1 -1
- package/dist/esm/paperless.js +1 -1
- package/dist/esm/{screens-LsrP-Unv.js → screens-B3sNjfzc.js} +3 -13
- package/dist/esm/screens-B3sNjfzc.js.map +1 -0
- package/dist/index.html +1 -1
- package/dist/paperless/index.esm.js +1 -1
- package/dist/paperless/index.esm.js.map +1 -1
- package/dist/paperless/{p-7046dc66.entry.js → p-05db72d0.entry.js} +2 -2
- package/dist/paperless/{p-5c3167c8.entry.js → p-26a3990a.entry.js} +2 -2
- package/dist/paperless/{p-76a4f70e.entry.js → p-2edd87f3.entry.js} +2 -2
- package/dist/{build/p-cc379751.entry.js → paperless/p-43d3357f.entry.js} +2 -2
- package/dist/paperless/p-474a16ab.entry.js +2 -0
- package/dist/{build/p-66adc33a.entry.js → paperless/p-53009290.entry.js} +2 -2
- package/dist/paperless/{p-0da54170.entry.js → p-55a41995.entry.js} +2 -2
- package/dist/{build/p-91ea22cd.entry.js → paperless/p-87981fef.entry.js} +2 -2
- package/dist/{build/p-cac630d2.entry.js → paperless/p-8981247d.entry.js} +2 -2
- package/dist/{build/p-730bcacd.entry.js → paperless/p-8a5dcfac.entry.js} +2 -2
- package/dist/paperless/p-8ca737d7.entry.js +2 -0
- package/dist/{build/p-e9db1b2d.entry.js.map → paperless/p-8ca737d7.entry.js.map} +1 -1
- package/dist/paperless/p-8f7a37d9.entry.js +2 -0
- package/dist/paperless/p-8f7a37d9.entry.js.map +1 -0
- package/dist/paperless/{p-bfda8061.entry.js → p-965962ce.entry.js} +2 -2
- package/dist/paperless/p-B3sNjfzc.js +2 -0
- package/dist/paperless/p-B3sNjfzc.js.map +1 -0
- package/dist/paperless/p-DdQ-S2l7.js +2 -0
- package/dist/paperless/p-DdQ-S2l7.js.map +1 -0
- package/dist/paperless/{p-79b42a23.entry.js → p-adb1ad27.entry.js} +2 -2
- package/dist/paperless/{p-912ce588.entry.js → p-aec29ee9.entry.js} +2 -2
- package/dist/paperless/p-attachment.entry.esm.js.map +1 -1
- package/dist/paperless/{p-0c257fa2.entry.js → p-cc3307b8.entry.js} +2 -2
- package/dist/paperless/{p-29d452d0.entry.js → p-cfd2e444.entry.js} +2 -2
- package/dist/paperless/{p-7658fd89.entry.js → p-e2054751.entry.js} +2 -2
- package/dist/paperless/p-table.entry.esm.js.map +1 -1
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist/types/components/molecules/attachment/attachment.component.d.ts +27 -1
- package/dist/types/components.d.ts +42 -2
- package/package.json +1 -1
- package/dist/build/p-0cf505a8.entry.js +0 -2
- package/dist/build/p-8577755d.entry.js +0 -2
- package/dist/build/p-8577755d.entry.js.map +0 -1
- package/dist/build/p-LsrP-Unv.js +0 -2
- package/dist/build/p-LsrP-Unv.js.map +0 -1
- package/dist/build/p-ab23f388.js +0 -2
- package/dist/build/p-e9db1b2d.entry.js +0 -2
- package/dist/cjs/screens-D_ByWDz6.js.map +0 -1
- package/dist/components/p-LsrP-Unv.js.map +0 -1
- package/dist/esm/screens-LsrP-Unv.js.map +0 -1
- package/dist/paperless/p-0cf505a8.entry.js +0 -2
- package/dist/paperless/p-8577755d.entry.js +0 -2
- package/dist/paperless/p-8577755d.entry.js.map +0 -1
- package/dist/paperless/p-LsrP-Unv.js +0 -2
- package/dist/paperless/p-LsrP-Unv.js.map +0 -1
- package/dist/paperless/p-e9db1b2d.entry.js +0 -2
- /package/dist/build/{p-7046dc66.entry.js.map → p-05db72d0.entry.js.map} +0 -0
- /package/dist/build/{p-5c3167c8.entry.js.map → p-26a3990a.entry.js.map} +0 -0
- /package/dist/build/{p-76a4f70e.entry.js.map → p-2edd87f3.entry.js.map} +0 -0
- /package/dist/build/{p-cc379751.entry.js.map → p-43d3357f.entry.js.map} +0 -0
- /package/dist/build/{p-0cf505a8.entry.js.map → p-474a16ab.entry.js.map} +0 -0
- /package/dist/build/{p-66adc33a.entry.js.map → p-53009290.entry.js.map} +0 -0
- /package/dist/build/{p-0da54170.entry.js.map → p-55a41995.entry.js.map} +0 -0
- /package/dist/build/{p-91ea22cd.entry.js.map → p-87981fef.entry.js.map} +0 -0
- /package/dist/build/{p-cac630d2.entry.js.map → p-8981247d.entry.js.map} +0 -0
- /package/dist/build/{p-730bcacd.entry.js.map → p-8a5dcfac.entry.js.map} +0 -0
- /package/dist/build/{p-bfda8061.entry.js.map → p-965962ce.entry.js.map} +0 -0
- /package/dist/build/{p-79b42a23.entry.js.map → p-adb1ad27.entry.js.map} +0 -0
- /package/dist/build/{p-912ce588.entry.js.map → p-aec29ee9.entry.js.map} +0 -0
- /package/dist/build/{p-0c257fa2.entry.js.map → p-cc3307b8.entry.js.map} +0 -0
- /package/dist/build/{p-29d452d0.entry.js.map → p-cfd2e444.entry.js.map} +0 -0
- /package/dist/build/{p-7658fd89.entry.js.map → p-e2054751.entry.js.map} +0 -0
- /package/dist/paperless/{p-7046dc66.entry.js.map → p-05db72d0.entry.js.map} +0 -0
- /package/dist/paperless/{p-5c3167c8.entry.js.map → p-26a3990a.entry.js.map} +0 -0
- /package/dist/paperless/{p-76a4f70e.entry.js.map → p-2edd87f3.entry.js.map} +0 -0
- /package/dist/paperless/{p-cc379751.entry.js.map → p-43d3357f.entry.js.map} +0 -0
- /package/dist/paperless/{p-0cf505a8.entry.js.map → p-474a16ab.entry.js.map} +0 -0
- /package/dist/paperless/{p-66adc33a.entry.js.map → p-53009290.entry.js.map} +0 -0
- /package/dist/paperless/{p-0da54170.entry.js.map → p-55a41995.entry.js.map} +0 -0
- /package/dist/paperless/{p-91ea22cd.entry.js.map → p-87981fef.entry.js.map} +0 -0
- /package/dist/paperless/{p-cac630d2.entry.js.map → p-8981247d.entry.js.map} +0 -0
- /package/dist/paperless/{p-730bcacd.entry.js.map → p-8a5dcfac.entry.js.map} +0 -0
- /package/dist/paperless/{p-bfda8061.entry.js.map → p-965962ce.entry.js.map} +0 -0
- /package/dist/paperless/{p-79b42a23.entry.js.map → p-adb1ad27.entry.js.map} +0 -0
- /package/dist/paperless/{p-912ce588.entry.js.map → p-aec29ee9.entry.js.map} +0 -0
- /package/dist/paperless/{p-0c257fa2.entry.js.map → p-cc3307b8.entry.js.map} +0 -0
- /package/dist/paperless/{p-29d452d0.entry.js.map → p-cfd2e444.entry.js.map} +0 -0
- /package/dist/paperless/{p-7658fd89.entry.js.map → p-e2054751.entry.js.map} +0 -0
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
2
|
export declare class Attachment {
|
|
3
|
+
/**
|
|
4
|
+
* Wether to enable the camera button on mobile
|
|
5
|
+
*/
|
|
6
|
+
enableCameraOnMobile: boolean;
|
|
3
7
|
/**
|
|
4
8
|
* The value of the attachment (usually the file name)
|
|
5
9
|
*/
|
|
6
10
|
value: string;
|
|
11
|
+
/**
|
|
12
|
+
* The fileID to use to track the file
|
|
13
|
+
*/
|
|
14
|
+
fileId: string;
|
|
15
|
+
/**
|
|
16
|
+
* The type of files to accept
|
|
17
|
+
*/
|
|
18
|
+
accept: string[] | string;
|
|
7
19
|
/**
|
|
8
20
|
* The label of the attachment
|
|
9
21
|
*/
|
|
@@ -24,6 +36,10 @@ export declare class Attachment {
|
|
|
24
36
|
* The placeholder of the attachment
|
|
25
37
|
*/
|
|
26
38
|
placeholder: string;
|
|
39
|
+
/**
|
|
40
|
+
* The text for the camera tooltip
|
|
41
|
+
*/
|
|
42
|
+
cameraTooltip: string;
|
|
27
43
|
/**
|
|
28
44
|
* The text for the download tooltip
|
|
29
45
|
*/
|
|
@@ -47,7 +63,11 @@ export declare class Attachment {
|
|
|
47
63
|
/**
|
|
48
64
|
* Event when upload is pressed
|
|
49
65
|
*/
|
|
50
|
-
upload: EventEmitter<
|
|
66
|
+
upload: EventEmitter<{
|
|
67
|
+
file: File;
|
|
68
|
+
fileId: string;
|
|
69
|
+
result: string;
|
|
70
|
+
}>;
|
|
51
71
|
/**
|
|
52
72
|
* Event when download is pressed
|
|
53
73
|
*/
|
|
@@ -56,5 +76,11 @@ export declare class Attachment {
|
|
|
56
76
|
* Event when delete is pressed
|
|
57
77
|
*/
|
|
58
78
|
delete: EventEmitter<void>;
|
|
79
|
+
private _fileRef;
|
|
80
|
+
private _cameraFileRef;
|
|
59
81
|
render(): any;
|
|
82
|
+
private _uploadClick;
|
|
83
|
+
private _cameraClick;
|
|
84
|
+
private _onFileChange;
|
|
85
|
+
private _onLoad;
|
|
60
86
|
}
|
|
@@ -67,6 +67,14 @@ export namespace Components {
|
|
|
67
67
|
"openable": boolean;
|
|
68
68
|
}
|
|
69
69
|
interface PAttachment {
|
|
70
|
+
/**
|
|
71
|
+
* The type of files to accept
|
|
72
|
+
*/
|
|
73
|
+
"accept": string[] | string;
|
|
74
|
+
/**
|
|
75
|
+
* The text for the camera tooltip
|
|
76
|
+
*/
|
|
77
|
+
"cameraTooltip": string;
|
|
70
78
|
/**
|
|
71
79
|
* The text for the delete tooltip
|
|
72
80
|
*/
|
|
@@ -75,10 +83,18 @@ export namespace Components {
|
|
|
75
83
|
* The text for the download tooltip
|
|
76
84
|
*/
|
|
77
85
|
"downloadTooltip": string;
|
|
86
|
+
/**
|
|
87
|
+
* Wether to enable the camera button on mobile
|
|
88
|
+
*/
|
|
89
|
+
"enableCameraOnMobile": boolean;
|
|
78
90
|
/**
|
|
79
91
|
* The error to show
|
|
80
92
|
*/
|
|
81
93
|
"error": string;
|
|
94
|
+
/**
|
|
95
|
+
* The fileID to use to track the file
|
|
96
|
+
*/
|
|
97
|
+
"fileId": string;
|
|
82
98
|
/**
|
|
83
99
|
* The helper of the attachment
|
|
84
100
|
*/
|
|
@@ -2144,7 +2160,11 @@ declare global {
|
|
|
2144
2160
|
new (): HTMLPAccordionElement;
|
|
2145
2161
|
};
|
|
2146
2162
|
interface HTMLPAttachmentElementEventMap {
|
|
2147
|
-
"upload":
|
|
2163
|
+
"upload": {
|
|
2164
|
+
file: File;
|
|
2165
|
+
fileId: string;
|
|
2166
|
+
result: string;
|
|
2167
|
+
};
|
|
2148
2168
|
"download": void;
|
|
2149
2169
|
"delete": void;
|
|
2150
2170
|
}
|
|
@@ -3083,6 +3103,14 @@ declare namespace LocalJSX {
|
|
|
3083
3103
|
"openable"?: boolean;
|
|
3084
3104
|
}
|
|
3085
3105
|
interface PAttachment {
|
|
3106
|
+
/**
|
|
3107
|
+
* The type of files to accept
|
|
3108
|
+
*/
|
|
3109
|
+
"accept"?: string[] | string;
|
|
3110
|
+
/**
|
|
3111
|
+
* The text for the camera tooltip
|
|
3112
|
+
*/
|
|
3113
|
+
"cameraTooltip"?: string;
|
|
3086
3114
|
/**
|
|
3087
3115
|
* The text for the delete tooltip
|
|
3088
3116
|
*/
|
|
@@ -3091,10 +3119,18 @@ declare namespace LocalJSX {
|
|
|
3091
3119
|
* The text for the download tooltip
|
|
3092
3120
|
*/
|
|
3093
3121
|
"downloadTooltip"?: string;
|
|
3122
|
+
/**
|
|
3123
|
+
* Wether to enable the camera button on mobile
|
|
3124
|
+
*/
|
|
3125
|
+
"enableCameraOnMobile"?: boolean;
|
|
3094
3126
|
/**
|
|
3095
3127
|
* The error to show
|
|
3096
3128
|
*/
|
|
3097
3129
|
"error"?: string;
|
|
3130
|
+
/**
|
|
3131
|
+
* The fileID to use to track the file
|
|
3132
|
+
*/
|
|
3133
|
+
"fileId"?: string;
|
|
3098
3134
|
/**
|
|
3099
3135
|
* The helper of the attachment
|
|
3100
3136
|
*/
|
|
@@ -3122,7 +3158,11 @@ declare namespace LocalJSX {
|
|
|
3122
3158
|
/**
|
|
3123
3159
|
* Event when upload is pressed
|
|
3124
3160
|
*/
|
|
3125
|
-
"onUpload"?: (event: PAttachmentCustomEvent<
|
|
3161
|
+
"onUpload"?: (event: PAttachmentCustomEvent<{
|
|
3162
|
+
file: File;
|
|
3163
|
+
fileId: string;
|
|
3164
|
+
result: string;
|
|
3165
|
+
}>) => void;
|
|
3126
3166
|
/**
|
|
3127
3167
|
* The placeholder of the attachment
|
|
3128
3168
|
*/
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as a,h as e,H as t}from"./p-DhGo7hbh.js";const o="*{box-sizing:border-box}.static{position:static!important}.flex{display:flex!important}.flex-col{flex-direction:column!important}.gap-2{gap:.5rem!important}";const i=class{constructor(e){a(this,e)}header;render(){return e(t,{key:"68ba63147ae0373907edc00994d1b66e2699a0e4",class:"flex flex-col gap-2"},this.header?.length>0&&e("p-navigation-title",{key:"3d48dfca4f662a48361ba040bc89938e1dbbc9a1"},this.header),e("div",{key:"553931d84d46ee1e0166da11113a65567b5a8260",class:"flex flex-col"},e("slot",{key:"a58592bb75ae21f269e2305138ed4585416262ba"})))}};i.style=o;export{i as p_navigation_section};
|
|
2
|
-
//# sourceMappingURL=p-0cf505a8.entry.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as a}from"./p-DhGo7hbh.js";import{c as r}from"./p-CBWjHURv.js";import{c as i}from"./p-CT54OXR2.js";import"./p-ChV9xqsO.js";const o=".block{display:block!important}*{box-sizing:border-box}:host{display:block;width:100%}.static{position:static!important}.flex{display:flex!important}.hidden{display:none!important}.h-8{height:2rem!important}.w-full{width:100%!important}.min-w-0{min-width:0!important}.flex-1{flex:1 1 0%!important}.items-start{align-items:flex-start!important}.items-center{align-items:center!important}.justify-start{justify-content:flex-start!important}.gap-2{gap:.5rem!important}.overflow-hidden{overflow:hidden!important}.text-ellipsis{text-overflow:ellipsis!important}.whitespace-nowrap{white-space:nowrap!important}.rounded-lg{border-radius:.5rem!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-black-teal-100{--tw-border-opacity:1!important;border-color:rgb(205 212 211/var(--tw-border-opacity,1))!important}.border-negative-red{--tw-border-opacity:1!important;border-color:rgb(230 30 30/var(--tw-border-opacity,1))!important}.bg-white-600{--tw-bg-opacity:1!important;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-black-teal-200{--tw-text-opacity:1!important;color:rgb(154 170 167/var(--tw-text-opacity,1))!important}.text-black-teal-300{--tw-text-opacity:1!important;color:rgb(104 127 124/var(--tw-text-opacity,1))!important}.text-negative-red{--tw-text-opacity:1!important;color:rgb(230 30 30/var(--tw-text-opacity,1))!important}.empty\\:hidden:empty{display:none!important}.peer:empty~.peer-empty\\:block{display:block!important}";const d=r(["flex flex-1 items-center justify-start gap-2","h-8 min-w-0 px-2 rounded-lg","border border-solid bg-white-600"],{variants:{error:{false:"bg-white-600 border-black-teal-100 text-black-teal-200",true:"border-negative-red"}}});const p=class{constructor(a){t(this,a);this.upload=e(this,"upload",3);this.download=e(this,"download",3);this.delete=e(this,"delete",3)}value;label;helper;required=true;mode="read";placeholder="Upload a file...";downloadTooltip="Download";uploadTooltip="Upload";deleteTooltip="Delete";loading=false;error;upload;download;delete;render(){let t=a("p-icon",{key:"dec3ba45123c5d6ce59da6a1f96c9b9a3a3876ed",class:"text-black-teal-300",variant:"attachment"});if(this.loading){t=a("p-loader",{key:"02cccf7922f00303b3077e588170b3aae7f6f27f"})}if(this.error){t=a("p-icon",{key:"db46c29fcf10ed6c2689bf33b6e4bf4a2cc82fca",variant:"warning",class:"text-negative-red"})}const e="min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-sm";return a("p-field-container",{key:"692a34d32a0c898597a023af15a3c1eb41cbcf9f",variant:"write",label:this.label,helper:this.helper,error:this.error,required:this.required,forceShowTooltip:!!this.error?.length},a("div",{key:"e571150e73494149c716d6a80dbf1263b887b609",slot:"content",class:"flex items-start gap-2 w-full"},a("div",{key:"a7f187728379b71a2adc7c6c26aacf0830a43ba1",class:d({error:!!this.error?.length})},t,a("span",{key:"afb1e39187468e6594941c08ad3fc4416dd33335",class:i(e,"peer empty:hidden")},this.value),a("span",{key:"e134aceb211439def13e0990ce0c30eea90411e3",class:i(e,"hidden peer-empty:block")},this.placeholder)),a("p-tooltip",{key:"7a162119958bf4324dbdc8492f041c05024ff2b8",content:this.mode==="read"?this.downloadTooltip:this.value?.length?this.deleteTooltip:this.uploadTooltip},a("p-button",{key:"0e07189d0275b197d3c73a3d78d0723aaa6b8bb9",slot:"trigger",variant:"secondary",iconOnly:true,icon:this.mode==="read"?"download":this.value?.length?"trash":"upload",disabled:this.loading,loading:this.loading,onOnClick:()=>(this.mode==="read"?this.download:this.value?.length?this.delete:this.upload).emit()}))))}};p.style=o;export{p as p_attachment};
|
|
2
|
-
//# sourceMappingURL=p-8577755d.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["attachmentComponentCss","attachment","cva","variants","error","false","true","Attachment","value","label","helper","required","mode","placeholder","downloadTooltip","uploadTooltip","deleteTooltip","loading","upload","download","delete","render","prefix","h","key","class","variant","this","baseText","forceShowTooltip","length","slot","cn","content","iconOnly","icon","disabled","onOnClick","emit"],"sources":["src/components/molecules/attachment/attachment.component.css?tag=p-attachment&encapsulation=shadow","src/components/molecules/attachment/attachment.component.tsx"],"sourcesContent":[":host {\n\t@apply block w-full;\n}\n","import { Component, Event, EventEmitter, h, Prop } from '@stencil/core';\nimport { cn } from '../../../utils';\nimport { cva } from 'class-variance-authority';\n\nconst attachment = cva([\n\t\t'flex flex-1 items-center justify-start gap-2',\n\t\t'h-8 min-w-0 px-2 rounded-lg',\n\t\t'border border-solid bg-white-600'\n\t], {\n\t\tvariants: {\n\t\t\terror: {\n\t\t\t\tfalse: 'bg-white-600 border-black-teal-100 text-black-teal-200',\n\t\t\t\ttrue: 'border-negative-red',\n\t\t\t}\n\t\t}\n\t})\n\n@Component({\n\ttag: 'p-attachment',\n\tstyleUrl: 'attachment.component.css',\n\tshadow: true,\n})\nexport class Attachment {\n\t/**\n\t * The value of the attachment (usually the file name)\n\t */\n\t@Prop() value: string;\n\n\t/**\n\t * The label of the attachment\n\t */\n\t@Prop() label: string | HTMLSlotElement;\n\n\t/**\n\t * The helper of the attachment\n\t */\n\t@Prop() helper: string | HTMLSlotElement;\n\n\t/**\n\t * Wether the attachment is required\n\t */\n\t@Prop({ reflect: true }) required = true;\n\n\n\t/**\n\t * The variant of the attachment\n\t */\n\t@Prop() mode: 'read' | 'write' = 'read';\n\n\t/**\n\t * The placeholder of the attachment\n\t */\n\t@Prop() placeholder: string = 'Upload a file...';\n\n\t/**\n\t * The text for the download tooltip\n\t */\n\t@Prop() downloadTooltip: string = 'Download';\n\n\t/**\n\t * The text for the upload tooltip\n\t */\n\t@Prop() uploadTooltip: string = 'Upload';\n\n\t/**\n\t * The text for the delete tooltip\n\t */\n\t@Prop() deleteTooltip: string = 'Delete';\n\n\t/**\n\t * Wether the attachment is loading\n\t */\n\t@Prop() loading = false;\n\n\t/**\n\t * The error to show\n\t */\n\t@Prop() error: string;\n\n\t/**\n\t * Event when upload is pressed\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tupload: EventEmitter<void>;\n\n\t/**\n\t * Event when download is pressed\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tdownload: EventEmitter<void>;\n\n\t/**\n\t * Event when delete is pressed\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tdelete: EventEmitter<void>;\n\n\trender() {\n\t\tlet prefix = <p-icon class=\"text-black-teal-300\" variant='attachment' />;\n\n\t\tif (this.loading) {\n\t\t\tprefix = <p-loader />;\n\t\t}\n\n\t\tif (this.error) {\n\t\t\tprefix = (\n\t\t\t\t<p-icon\n\t\t\t\t\tvariant='warning'\n\t\t\t\t\tclass='text-negative-red'\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\tconst baseText = 'min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-sm'\n\t\treturn (\n\t\t\t<p-field-container variant=\"write\" label={this.label} helper={this.helper} error={this.error} required={this.required} forceShowTooltip={!!this.error?.length}>\n\t\t\t\t<div slot=\"content\" class='flex items-start gap-2 w-full'>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={attachment({\n\t\t\t\t\t\t\terror: !!this.error?.length\n\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t{prefix}\n\n\t\t\t\t\t\t<span class={cn(baseText, 'peer empty:hidden')}>\n\t\t\t\t\t\t\t{this.value}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span class={cn(baseText, 'hidden peer-empty:block')}>\n\t\t\t\t\t\t\t{this.placeholder}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<p-tooltip content={this.mode === 'read' ? this.downloadTooltip : this.value?.length ? this.deleteTooltip : this.uploadTooltip}>\n\t\t\t\t\t\t<p-button\n\t\t\t\t\t\t\tslot=\"trigger\"\n\t\t\t\t\t\t\tvariant='secondary'\n\t\t\t\t\t\t\ticonOnly={true}\n\t\t\t\t\t\t\ticon={this.mode === 'read' ? 'download' : this.value?.length ? 'trash' : 'upload'}\n\t\t\t\t\t\t\tdisabled={this.loading}\n\t\t\t\t\t\t\tloading={this.loading}\n\t\t\t\t\t\t\tonOnClick={() =>\n\t\t\t\t\t\t\t\t(this.mode === 'read' ? this.download : this.value?.length ? this.delete : this.upload).emit()\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</p-tooltip>\n\t\t\t\t</div>\n\t\t\t</p-field-container>\n\t\t);\n\t}\n}\n"],"mappings":"kJAAA,MAAMA,EAAyB,gmDCI/B,MAAMC,EAAaC,EAAI,CACrB,+CACA,8BACA,oCACE,CACFC,SAAU,CACTC,MAAO,CACNC,MAAO,yDACPC,KAAM,0B,MAUGC,EAAU,M,0HAIdC,MAKAC,MAKAC,OAKiBC,SAAW,KAM5BC,KAAyB,OAKzBC,YAAsB,mBAKtBC,gBAA0B,WAK1BC,cAAwB,SAKxBC,cAAwB,SAKxBC,QAAU,MAKVb,MAQRc,OAQAC,SAQAC,OAEA,MAAAC,GACC,IAAIC,EAASC,EAAA,UAAAC,IAAA,2CAAQC,MAAM,sBAAsBC,QAAQ,eAEzD,GAAIC,KAAKV,QAAS,CACjBK,EAASC,EAAA,YAAAC,IAAA,4C,CAGV,GAAIG,KAAKvB,MAAO,CACfkB,EACCC,EACC,UAAAC,IAAA,2CAAAE,QAAQ,UACRD,MAAM,qB,CAKT,MAAMG,EAAW,0EACjB,OACCL,EAAmB,qBAAAC,IAAA,2CAAAE,QAAQ,QAAQjB,MAAOkB,KAAKlB,MAAOC,OAAQiB,KAAKjB,OAAQN,MAAOuB,KAAKvB,MAAOO,SAAUgB,KAAKhB,SAAWkB,mBAAoBF,KAAKvB,OAAO0B,QACvJP,EAAA,OAAAC,IAAA,2CAAKO,KAAK,UAAUN,MAAM,iCACzBF,EACC,OAAAC,IAAA,2CAAAC,MAAOxB,EAAW,CACjBG,QAASuB,KAAKvB,OAAO0B,UAGrBR,EAEDC,EAAA,QAAAC,IAAA,2CAAMC,MAAOO,EAAGJ,EAAU,sBACxBD,KAAKnB,OAEPe,EAAA,QAAAC,IAAA,2CAAMC,MAAOO,EAAGJ,EAAU,4BACxBD,KAAKd,cAIRU,EAAA,aAAAC,IAAA,2CAAWS,QAASN,KAAKf,OAAS,OAASe,KAAKb,gBAAkBa,KAAKnB,OAAOsB,OAASH,KAAKX,cAAgBW,KAAKZ,eAChHQ,EACC,YAAAC,IAAA,2CAAAO,KAAK,UACLL,QAAQ,YACRQ,SAAU,KACVC,KAAMR,KAAKf,OAAS,OAAS,WAAae,KAAKnB,OAAOsB,OAAS,QAAU,SACzEM,SAAUT,KAAKV,QACfA,QAASU,KAAKV,QACdoB,UAAW,KACTV,KAAKf,OAAS,OAASe,KAAKR,SAAWQ,KAAKnB,OAAOsB,OAASH,KAAKP,OAASO,KAAKT,QAAQoB,W","ignoreList":[]}
|
package/dist/build/p-LsrP-Unv.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const t=["default","tablet","desktop-xs","desktop-sm","desktop","desktop-lg","desktop-xl"];var s={tablet:"40rem","desktop-xs":"64rem","desktop-sm":"80rem",desktop:"85.375rem","desktop-lg":"90rem","desktop-xl":"120rem","layout-1280":"80rem","layout-1440":"90rem","layout-1536":"96rem","layout-1680":"105rem","layout-1920":"120rem","layout-2560":"160rem"};const e=t=>s[t];const o=t=>{const s=e(t);return parseInt(s.replace("rem",""),10)};const a=t=>{const s=o(t);return s*16};const r=t=>{const s=a(t);return window.innerWidth>s};const n=t=>{const s=a(t);return window.innerWidth<s};const c=(t,s)=>r(t)&&n(s);const d=()=>!!window.matchMedia("(pointer: coarse)").matches;const l=()=>d()||n("tablet");const m=()=>c("tablet","desktop-xs");const p=()=>r("desktop-xs");export{o as a,a as b,n as c,c as d,d as e,l as f,e as g,m as h,r as i,p as j,s,t};
|
|
2
|
-
//# sourceMappingURL=p-LsrP-Unv.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"p-LsrP-Unv.js","sources":["src/types/constants.ts","src/tailwind/theme/screens.ts","src/utils/screens.ts"],"sourcesContent":["import { TableColumnSizes } from './table';\n\nexport const tableColumSizesOptions = [\n\t'default',\n\t'tablet',\n\t'desktop-xs',\n\t'desktop-sm',\n\t'desktop',\n\t'desktop-lg',\n\t'desktop-xl',\n] as (keyof TableColumnSizes)[];\n","export default {\n\ttablet: '40rem', // 640 px\n\t'desktop-xs': '64rem', // 1024 px\n\t'desktop-sm': '80rem', // 1360 px\n\tdesktop: '85.375rem', // 1366\n\t'desktop-lg': '90rem', // 1440\n\t'desktop-xl': '120rem', // 1920\n\n\t// layout sizes\n\t'layout-1280': '80rem',\n\t'layout-1440': '90rem',\n\t'layout-1536': '96rem',\n\t'layout-1680': '105rem',\n\t'layout-1920': '120rem',\n\t'layout-2560': '160rem',\n};\n","import screens from '../tailwind/theme/screens';\n\nexport type ScreenSize = keyof typeof screens;\n\nexport const getScreenSize = (size: ScreenSize) => screens[size];\n\nexport const getScreenSizeInRem = (size: ScreenSize) => {\n\tconst screen = getScreenSize(size);\n\treturn parseInt(screen.replace('rem', ''), 10);\n};\n\nexport const getScreenSizeInPixels = (size: ScreenSize) => {\n\tconst rem = getScreenSizeInRem(size);\n\treturn rem * 16;\n};\n\nexport const isBiggerThanScreen = (size: ScreenSize) => {\n\tconst pixels = getScreenSizeInPixels(size);\n\treturn window.innerWidth > pixels;\n};\n\nexport const isSmallerThanScreen = (size: ScreenSize) => {\n\tconst pixels = getScreenSizeInPixels(size);\n\treturn window.innerWidth < pixels;\n};\n\nexport const isBetweenScreens = (\n\tsmallSize: ScreenSize,\n\tbigSize: ScreenSize\n) => {\n\treturn isBiggerThanScreen(smallSize) && isSmallerThanScreen(bigSize);\n};\n\nexport const isTouchDevice = () =>\n\t!!window.matchMedia('(pointer: coarse)').matches;\nexport const isMobile = () => isTouchDevice() || isSmallerThanScreen('tablet');\nexport const isTablet = () => isBetweenScreens('tablet', 'desktop-xs');\nexport const isDesktop = () => isBiggerThanScreen('desktop-xs');\n"],"names":[],"mappings":"AAEa,MAAA,sBAAsB,GAAG;IACrC,SAAS;IACT,QAAQ;IACR,YAAY;IACZ,YAAY;IACZ,SAAS;IACT,YAAY;IACZ,YAAY;;;ACTb,cAAe;IACd,MAAM,EAAE,OAAO;IACf,YAAY,EAAE,OAAO;IACrB,YAAY,EAAE,OAAO;IACrB,OAAO,EAAE,WAAW;IACpB,YAAY,EAAE,OAAO;IACrB,YAAY,EAAE,QAAQ;;AAGtB,IAAA,aAAa,EAAE,OAAO;AACtB,IAAA,aAAa,EAAE,OAAO;AACtB,IAAA,aAAa,EAAE,OAAO;AACtB,IAAA,aAAa,EAAE,QAAQ;AACvB,IAAA,aAAa,EAAE,QAAQ;AACvB,IAAA,aAAa,EAAE,QAAQ;CACvB;;ACXM,MAAM,aAAa,GAAG,CAAC,IAAgB,KAAK,OAAO,CAAC,IAAI;AAElD,MAAA,kBAAkB,GAAG,CAAC,IAAgB,KAAI;AACtD,IAAA,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,CAAC;AAClC,IAAA,OAAO,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;AAC/C;AAEa,MAAA,qBAAqB,GAAG,CAAC,IAAgB,KAAI;AACzD,IAAA,MAAM,GAAG,GAAG,kBAAkB,CAAC,IAAI,CAAC;IACpC,OAAO,GAAG,GAAG,EAAE;AAChB;AAEa,MAAA,kBAAkB,GAAG,CAAC,IAAgB,KAAI;AACtD,IAAA,MAAM,MAAM,GAAG,qBAAqB,CAAC,IAAI,CAAC;AAC1C,IAAA,OAAO,MAAM,CAAC,UAAU,GAAG,MAAM;AAClC;AAEa,MAAA,mBAAmB,GAAG,CAAC,IAAgB,KAAI;AACvD,IAAA,MAAM,MAAM,GAAG,qBAAqB,CAAC,IAAI,CAAC;AAC1C,IAAA,OAAO,MAAM,CAAC,UAAU,GAAG,MAAM;AAClC;MAEa,gBAAgB,GAAG,CAC/B,SAAqB,EACrB,OAAmB,KAChB;IACH,OAAO,kBAAkB,CAAC,SAAS,CAAC,IAAI,mBAAmB,CAAC,OAAO,CAAC;AACrE;AAEa,MAAA,aAAa,GAAG,MAC5B,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;AACnC,MAAM,QAAQ,GAAG,MAAM,aAAa,EAAE,IAAI,mBAAmB,CAAC,QAAQ;AACtE,MAAM,QAAQ,GAAG,MAAM,gBAAgB,CAAC,QAAQ,EAAE,YAAY;AACxD,MAAA,SAAS,GAAG,MAAM,kBAAkB,CAAC,YAAY;;;;"}
|
package/dist/build/p-ab23f388.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{p as e,b as a}from"./p-DhGo7hbh.js";export{s as setNonce}from"./p-DhGo7hbh.js";import{g as t}from"./p-DQuL1Twl.js";var o=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};o().then((async e=>{await t();return a(JSON.parse('[["p-4e95f16d",[[4,"p-button",{"label":[1],"as":[1],"variant":[1],"active":[4],"underline":[4],"href":[1],"target":[1],"size":[1],"type":[1],"loading":[4],"chevron":[8],"chevronPosition":[1,"chevron-position"],"disabled":[4],"icon":[1],"iconOnly":[4,"icon-only"],"iconPosition":[1,"icon-position"],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"],"inheritText":[4,"inherit-text"],"buttonGroupPosition":[1,"button-group-position"],"class":[1]},[[2,"click","handleClick"]]],[1,"p-loader",{"show":[4],"variant":[1],"color":[1],"modalTitle":[1,"modal-title"],"modalDescription":[1,"modal-description"]}],[1,"p-icon",{"variant":[1],"size":[1],"rotate":[2],"flip":[1]}]]],["p-e9db1b2d",[[4,"p-table",{"items":[1],"loading":[4],"headerLoading":[4,"header-loading"],"footerLoading":[4,"footer-loading"],"amountOfLoadingRows":[2,"amount-of-loading-rows"],"enableRowSelection":[4,"enable-row-selection"],"rowSelectionLimit":[2,"row-selection-limit"],"enableRowClick":[4,"enable-row-click"],"selectedRows":[16,"selected-rows"],"enableFloatingMenu":[4,"enable-floating-menu"],"floatingMenuAmountSelectedTemplate":[16,"floating-menu-amount-selected-template"],"selectionKey":[1,"selection-key"],"canSelectKey":[1,"can-select-key"],"enableHeader":[4,"enable-header"],"quickFilters":[16,"quick-filters"],"activeQuickFilterIdentifier":[1,"active-quick-filter-identifier"],"enableSearch":[4,"enable-search"],"query":[1025],"enableFilter":[4,"enable-filter"],"enableFilterDesktop":[4,"enable-filter-desktop"],"selectedFiltersAmount":[2,"selected-filters-amount"],"filterButtonTemplate":[16,"filter-button-template"],"enableAction":[4,"enable-action"],"actionButtonLoading":[4,"action-button-loading"],"actionButtonEnabled":[4,"action-button-enabled"],"actionButtonIcon":[1,"action-button-icon"],"actionButtonText":[1,"action-button-text"],"actionButtonTemplate":[16,"action-button-template"],"enableFooter":[4,"enable-footer"],"enablePaginationSize":[4,"enable-pagination-size"],"enablePaginationPages":[4,"enable-pagination-pages"],"enableExport":[4,"enable-export"],"page":[1538],"total":[2],"pageSize":[2,"page-size"],"pageSizeOptions":[16,"page-size-options"],"hideOnSinglePage":[4,"hide-on-single-page"],"emptyStateHeader":[16,"empty-state-header"],"emptyStateContent":[16,"empty-state-content"],"emptyStateAction":[16,"empty-state-action"],"enableEmptyStateAction":[4,"enable-empty-state-action"],"emptyStateFilteredHeader":[16,"empty-state-filtered-header"],"emptyStateFilteredContent":[16,"empty-state-filtered-content"],"shadow":[4],"_locales":[32],"_columns":[32],"_items":[32],"_enableRowSelection":[32],"_rowSelectionLimit":[32],"_rowActionsFloating":[32],"_rowActionsRow":[32],"_footerHidden":[32]},[[16,"localeChanged","_setLocales"],[16,"tableDefinitionChanged","onTableDefinitionUpdated"],[4,"keydown","keyDown"],[4,"keyup","keyUp"],[4,"visibilitychange","visibilityChange"],[9,"resize","_setRowSelectionData"]],{"items":["_parseItems"],"enableRowSelection":["_setRowSelectionData"],"rowSelectionLimit":["_setRowSelectionData"],"selectedRows":["_setRowSelectionData"]}]]],["p-29d452d0",[[65,"p-select",{"items":[1],"multi":[516],"usePortal":[4,"use-portal"],"strategy":[1],"icon":[1],"query":[1],"placeholder":[1],"autocompletePlaceholder":[1,"autocomplete-placeholder"],"value":[8],"displayKey":[1,"display-key"],"dropdownDisplayKey":[1,"dropdown-display-key"],"selectionDisplayKey":[1,"selection-display-key"],"valueKey":[1,"value-key"],"avatarKey":[1,"avatar-key"],"iconKey":[1,"icon-key"],"showIconInSelectedItem":[1,"show-icon-in-selected-item"],"classKey":[1,"class-key"],"applyClassOnSelectedItem":[1,"apply-class-on-selected-item"],"avatarLettersKey":[1,"avatar-letters-key"],"identifierKey":[1,"identifier-key"],"queryKey":[1,"query-key"],"autoSelectFirst":[4,"auto-select-first"],"showChevron":[4,"show-chevron"],"maxDisplayedItems":[2,"max-displayed-items"],"enableAutocomplete":[4,"enable-autocomplete"],"asyncFilter":[4,"async-filter"],"loading":[4],"enableSelectAll":[4,"enable-select-all"],"selectAllText":[1,"select-all-text"],"selectAllIcon":[1,"select-all-icon"],"size":[1],"prefix":[1],"label":[1],"helper":[1],"required":[516],"error":[513],"disabled":[516],"showAddItem":[4,"show-add-item"],"addItemText":[1,"add-item-text"],"emptyStateText":[1,"empty-state-text"],"_showDropdown":[32],"_selectedItem":[32],"_allSelected":[32],"_amountHidden":[32]},[[6,"click","documentClickHandler"]],{"value":["_valueChange"],"items":["itemChanges"],"_showDropdown":["_showDropdownChanges"],"multi":["multiChanges"]}]]],["p-cc379751",[[64,"p-datepicker",{"placeholder":[1],"value":[1],"preselectToday":[4,"preselect-today"],"enableNativePicker":[4,"enable-native-picker"],"disabledDates":[1,"disabled-dates"],"minDate":[1,"min-date"],"maxDate":[1,"max-date"],"disableWeekends":[4,"disable-weekends"],"mode":[1],"format":[1],"hideIconWhenFilled":[4,"hide-icon-when-filled"],"size":[1],"prefix":[1],"label":[1],"loading":[4],"helper":[1],"required":[516],"error":[513],"disabled":[516],"strategy":[1],"placement":[513],"_showDropdown":[32],"_value":[32],"_minDate":[32],"_maxDate":[32],"_disabledDates":[32],"_isMobileBrowser":[32]},[[6,"click","documentClickHandler"]],{"value":["parseValue"],"minDate":["parseMinDate"],"maxDate":["parseMaxDate"],"disabledDates":["parseDisabledDates"]}]]],["p-00e39694",[[1,"p-modal",{"size":[1],"header":[1],"show":[4],"applyBlur":[4,"apply-blur"],"showClose":[4,"show-close"],"showMobileFooter":[4,"show-mobile-footer"],"backdropClickClose":[4,"backdrop-click-close"],"scrollLock":[4,"scroll-lock"],"_closing":[32]},[[8,"closeModal","handleCloseModal"]]]]],["p-9c277029",[[1,"p-drawer",{"header":[1],"show":[4],"applyBlur":[4,"apply-blur"],"showClose":[4,"show-close"],"backdropClickClose":[4,"backdrop-click-close"],"canClose":[4,"can-close"],"scrollLock":[4,"scroll-lock"],"_closing":[32]},[[8,"closeDrawer","handleCloseDrawer"],[8,"forceCloseDrawer","handleForceCloseDrawer"]]]]],["p-8577755d",[[1,"p-attachment",{"value":[1],"label":[1],"helper":[1],"required":[516],"mode":[1],"placeholder":[1],"downloadTooltip":[1,"download-tooltip"],"uploadTooltip":[1,"upload-tooltip"],"deleteTooltip":[1,"delete-tooltip"],"loading":[4],"error":[1]}]]],["p-856f3266",[[1,"p-profile",{"dropdownLocation":[1,"dropdown-location"],"_dropdownOpen":[32],"_hasDropdownSlot":[32]},[[0,"slotchange","slotchange"]]]]],["p-7658fd89",[[1,"p-navbar",{"_show":[32]},[[8,"closeNavbar","handleCloseNavbar"],[8,"openNavbar","handleOpenNavbar"]]]]],["p-f1f14a3f",[[1,"p-card-header",{"variant":[1],"header":[1],"icon":[1],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"]}]]],["p-76a4f70e",[[4,"p-navigation-item",{"icon":[1],"active":[4],"loading":[4],"as":[1],"counter":[8],"href":[1],"target":[1],"class":[1]}]]],["p-0c257fa2",[[1,"p-toast",{"variant":[1],"header":[1],"content":[1],"enableAction":[4,"enable-action"],"actionIcon":[1,"action-icon"],"actionIconFlip":[1,"action-icon-flip"],"actionIconRotate":[2,"action-icon-rotate"]}]]],["p-c1041af9",[[1,"p-accordion",{"header":[1],"open":[4],"closeable":[4],"openable":[4]}]]],["p-30f6e463",[[1,"p-cropper",{"variant":[513],"value":[8],"returnType":[1,"return-type"],"_loaded":[32],"_currentScale":[32]},[[9,"resize","onResize"]]]]],["p-d0968c28",[[1,"p-info-panel",{"variant":[1],"header":[1],"content":[1],"closeable":[4]}]]],["p-5c3167c8",[[1,"p-label",{"variant":[513],"iconOnly":[516,"icon-only"],"icon":[513],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"],"keepMobileContent":[516,"keep-mobile-content"]}]]],["p-7046dc66",[[1,"p-listing"]]],["p-abd13a2a",[[1,"p-listing-item",{"icon":[1]}]]],["p-0cf505a8",[[4,"p-navigation-section",{"header":[1]}]]],["p-912ce588",[[1,"p-stepper",{"activeStep":[2,"active-step"],"enableAutoStatus":[4,"enable-auto-status"],"direction":[1],"align":[1],"contentPosition":[1,"content-position"]},null,{"align":["_onAlignChange"],"direction":["_onDirectionChange"],"activeStep":["_onActiveStepChange"]}]]],["p-08cff47b",[[1,"p-tab-container"]]],["p-5451207c",[[4,"p-avatar-group",{"extra":[2]}]]],["p-0da54170",[[1,"p-button-group",{"size":[1]},[[0,"slotchange","slotchange"]]]]],["p-1a544806",[[1,"p-card-body"]]],["p-128f3811",[[1,"p-card-container",{"active":[4],"hoverable":[4],"shadow":[4]}]]],["p-79b42a23",[[1,"p-content-slider",{"hideMobileIndicator":[4,"hide-mobile-indicator"],"disableDrag":[4,"disable-drag"],"disableAutoCenter":[4,"disable-auto-center"],"disableIndicatorClick":[4,"disable-indicator-click"],"_visibleIndex":[32],"_outerHeight":[32],"_totalWidth":[32],"_dragging":[32]},[[9,"mouseup","mouseUpHandler"],[9,"touchend","mouseUpHandler"],[9,"resize","resizeHandler"]]]]],["p-01a2b5af",[[1,"p-iban-icon",{"iban":[513],"variant":[513]}]]],["p-0fe51ad0",[[0,"p-illustration-deprecated",{"variant":[1]}]]],["p-9409dfd7",[[1,"p-layout",{"variant":[1]}]]],["p-3d341a83",[[68,"p-radio",{"value":[1],"disabled":[516],"required":[516],"id":[513],"name":[513],"checked":[516],"_nonce":[32]}]]],["p-58f9ac89",[[1,"p-stepper-item",{"number":[2],"align":[1],"contentPosition":[1,"content-position"],"finished":[4],"active":[4]}]]],["p-5ee4e9c7",[[1,"p-tab-item",{"active":[4]}]]],["p-4c81bb03",[[0,"p-table-column",{"path":[1537],"type":[1537],"name":[1537],"useSlot":[1540,"use-slot"],"hasCheckbox":[1540,"has-checkbox"],"align":[1537],"parsedSizes":[1040,"parsed-sizes"],"sizes":[1032]}]]],["p-37bdbb19",[[0,"p-table-row-action",{"type":[1537],"icon":[1],"iconOnly":[4,"icon-only"],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"],"label":[1],"action":[16],"disabled":[4],"loading":[4],"showFunction":[16,"show-function"]}]]],["p-a5f29193",[[1,"p-toast-container",{"placement":[1]}]]],["p-22e7fde5",[[68,"p-toggle",{"checked":[4],"disabled":[516],"required":[516],"id":[513],"name":[513],"_nonce":[32]}]]],["p-66adc33a",[[0,"p-calendar",{"variant":[1],"value":[1],"preselectToday":[4,"preselect-today"],"disabledDates":[1,"disabled-dates"],"minDate":[1,"min-date"],"maxDate":[1,"max-date"],"disableWeekends":[4,"disable-weekends"],"mode":[1],"_view":[32],"_viewDate":[32],"_value":[32],"_minDate":[32],"_maxDate":[32],"_disabledDates":[32]},null,{"value":["_parseValue"],"minDate":["_parseMinDate"],"maxDate":["_parseMaxDate"],"disabledDates":["_parseDisabledDates"]}]]],["p-8249382f",[[0,"p-avatar",{"size":[513],"defaultImage":[1,"default-image"],"src":[1],"letters":[1],"_src":[32],"_failed":[32]},null,{"src":["onSrchChange"]}]]],["p-868f9ee9",[[1,"p-listing-line"]]],["p-7ddf5875",[[1,"p-navigation-title"]]],["p-0c0ebb15",[[1,"p-stepper-line",{"active":[516],"direction":[513]}]]],["p-a5bc8b63",[[0,"p-illustration",{"variant":[1]}]]],["p-a48262c6",[[1,"p-drawer-header",{"showClose":[4,"show-close"]}],[1,"p-drawer-body"],[1,"p-drawer-container",{"closing":[4]}]]],["p-5fa74e2e",[[1,"p-backdrop",{"variant":[1],"applyBlur":[4,"apply-blur"],"closing":[4],"scrollLock":[4,"scroll-lock"],"class":[1]},[[2,"click","handleClick"]]]]],["p-d18ee52f",[[1,"p-modal-header",{"showClose":[4,"show-close"]}],[1,"p-modal-footer"],[1,"p-modal-body",{"roundedBottom":[4,"rounded-bottom"],"roundedTop":[4,"rounded-top"]}],[1,"p-modal-container",{"size":[1],"closing":[4]}]]],["p-52149e0e",[[4,"p-pagination-pages-item",{"variant":[1],"active":[4],"hover":[4],"disabled":[4]}]]],["p-1778732a",[[0,"p-smile",{"variant":[1]}]]],["p-6c5f6d8a",[[4,"p-segment-item",{"variant":[1],"active":[4],"iconOnly":[4,"icon-only"],"icon":[1],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"]}],[4,"p-segment-container"],[4,"p-badge"]]],["p-ae64bdf2",[[4,"p-divider",{"variant":[513]}]]],["p-eef52967",[[4,"p-portal"]]],["p-730bcacd",[[1,"p-dropdown-menu-item",{"active":[4],"checkbox":[4],"variant":[1],"enableHover":[4,"enable-hover"],"disabled":[4],"icon":[1],"iconWave":[4,"icon-wave"],"useContainer":[4,"use-container"]}],[68,"p-checkbox",{"checked":[4],"indeterminate":[4],"disabled":[516],"required":[516],"id":[513],"name":[513],"_nonce":[32]}],[1,"p-dropdown",{"variant":[1],"placement":[513],"offset":[2],"strategy":[1],"show":[4],"usePortal":[4,"use-portal"],"calculateWidth":[4,"calculate-width"],"applyMaxWidth":[4,"apply-max-width"],"applyFullWidth":[4,"apply-full-width"],"allowOverflow":[4,"allow-overflow"],"scrollable":[8],"insideClick":[4,"inside-click"],"disableTriggerClick":[4,"disable-trigger-click"],"applyChevron":[4,"apply-chevron"],"chevronPosition":[1,"chevron-position"],"chevronDirection":[1,"chevron-direction"]},[[6,"click","documentClickHandler"]],{"show":["onShowChange"]}],[1,"p-dropdown-menu-container",{"variant":[1],"maxWidth":[4,"max-width"],"class":[1],"fullWidth":[4,"full-width"],"allowOverflow":[4,"allow-overflow"],"scrollable":[8]}]]],["p-cac630d2",[[0,"p-pagination",{"hideOnSinglePage":[4,"hide-on-single-page"],"enablePaginationSize":[4,"enable-pagination-size"],"enablePaginationPages":[4,"enable-pagination-pages"],"page":[1538],"total":[2],"pageSize":[2,"page-size"],"pageSizeOptions":[16,"page-size-options"],"_hasPaginationPages":[32]}],[1,"p-pagination-size",{"size":[1538],"sizeOptions":[16,"size-options"],"itemTemplate":[16,"item-template"],"hidden":[4],"dropdownIsOpen":[32],"_locales":[32]},[[16,"localeChanged","_setLocales"]]],[0,"p-pagination-pages",{"page":[1538],"pageSize":[2,"page-size"],"hideOnSinglePage":[4,"hide-on-single-page"],"total":[2]},null,{"page":["pageChangeHandler"],"pageSize":["pageChangeHandler"],"total":["pageChangeHandler"]}]]],["p-c7139e78",[[1,"p-helper",{"strategy":[1],"placement":[1]}],[1,"p-tooltip",{"variant":[1],"content":[8],"placement":[1],"offset":[2],"strategy":[1],"enableUserInput":[4,"enable-user-input"],"show":[4],"usePortal":[4,"use-portal"],"canManuallyClose":[4,"can-manually-close"]},[[2,"click","clickHandler"],[6,"click","documentClickHandler"],[1,"mouseenter","mouseEnterHandler"],[0,"focus","mouseEnterHandler"],[1,"mouseleave","mouseLeaveHandler"],[0,"blur","mouseLeaveHandler"]],{"show":["onShowChange"]}]]],["p-91ea22cd",[[65,"p-field",{"variant":[1],"id":[1],"size":[1],"type":[1],"properties":[8],"prefix":[1],"suffix":[1],"icon":[1],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"],"iconPosition":[1,"icon-position"],"value":[1],"label":[1],"loading":[4],"placeholder":[1],"helper":[1],"required":[516],"autofocus":[516],"error":[513],"errorPlacement":[1,"error-placement"],"disabled":[516],"focused":[516],"forceShowTooltip":[516,"force-show-tooltip"],"selectAllOnFocus":[516,"select-all-on-focus"],"focusMethod":[1,"focus-method"],"optionalTemplate":[16,"optional-template"],"_focused":[32],"_nonce":[32]},[[0,"focusin","handleFocusIn"],[0,"focusout","handleFocusOut"],[2,"keyup","handleKeyup"]]],[1,"p-field-container",{"id":[1],"label":[1],"loading":[4],"loadingSize":[1,"loading-size"],"variant":[1],"helper":[1],"required":[516],"error":[513],"errorPlacement":[1,"error-placement"],"forceShowTooltip":[516,"force-show-tooltip"],"optionalTemplate":[16,"optional-template"],"_locales":[32]},[[16,"localeChanged","_setLocales"]]]]],["p-bfda8061",[[1,"p-table-header",{"quickFilters":[16,"quick-filters"],"activeQuickFilterIdentifier":[1,"active-quick-filter-identifier"],"loading":[4],"enableSearch":[4,"enable-search"],"itemsSelectedAmount":[2,"items-selected-amount"],"query":[1025],"enableFilter":[4,"enable-filter"],"enableExport":[4,"enable-export"],"enableFilterDesktop":[4,"enable-filter-desktop"],"selectedFiltersAmount":[2,"selected-filters-amount"],"filterButtonTemplate":[16,"filter-button-template"],"enableAction":[4,"enable-action"],"actionLoading":[4,"action-loading"],"actionIcon":[1,"action-icon"],"actionText":[1,"action-text"],"canUseAction":[1028,"can-use-action"],"actionButtonTemplate":[16,"action-button-template"],"_locales":[32]},[[16,"localeChanged","_setLocales"]]],[1,"p-table-footer",{"enablePaginationSize":[4,"enable-pagination-size"],"enablePaginationPages":[4,"enable-pagination-pages"],"loading":[4],"page":[1538],"total":[2],"pageSize":[2,"page-size"],"pageSizeOptions":[16,"page-size-options"],"hideOnSinglePage":[4,"hide-on-single-page"],"_isPinned":[32],"_hasPaginationPages":[32]},[[9,"scroll","onScroll"]]],[1,"p-empty-state",{"illustration":[8],"header":[1],"content":[1],"enableAction":[4,"enable-action"],"actionText":[1,"action-text"],"actionVariant":[1,"action-variant"],"actionIcon":[1,"action-icon"],"actionLoading":[4,"action-loading"]}],[1,"p-floating-menu-container",{"usedInTable":[4,"used-in-table"],"enableAmountSelected":[4,"enable-amount-selected"],"amount":[2],"enableClose":[4,"enable-close"],"amountSelectedTemplate":[16,"amount-selected-template"],"_locales":[32]},[[16,"localeChanged","_setLocales"]]],[4,"p-floating-menu-item",{"hover":[4],"disabled":[4],"loading":[4],"icon":[1],"iconPosition":[1,"icon-position"],"iconFlip":[1,"icon-flip"],"iconRotate":[2,"icon-rotate"]}],[4,"p-table-cell",{"variant":[1],"index":[2],"rowIndex":[2,"row-index"],"definition":[16],"item":[8],"value":[8],"checkbox":[8],"template":[16]}],[1,"p-table-row",{"variant":[1],"enableHover":[4,"enable-hover"]}],[4,"p-table-container"],[1,"p-table-row-actions-container"]]]]'),e)}));
|
|
2
|
-
//# sourceMappingURL=paperless.esm.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,g as i,h as s,H as n}from"./p-DhGo7hbh.js";import{f as o,t as a}from"./p-LsrP-Unv.js";import{f as r,g as h}from"./p-DiJj8rmO.js";import{f as l}from"./p-C0cmbLHm.js";import{c}from"./p-CT54OXR2.js";import{d as u,a as f}from"./p-DOp5eUxu.js";import"./p-CBWjHURv.js";import"./p-ChV9xqsO.js";const d="*{box-sizing:border-box}.static{position:static!important}.fixed{position:fixed!important}.z-0{z-index:0!important}.my-16{margin-bottom:4rem!important;margin-top:4rem!important}.mb-8{margin-bottom:2rem!important}.flex{display:flex!important}.table{display:table!important}.hidden{display:none!important}.h-6{height:1.5rem!important}.w-6{width:1.5rem!important}.flex-1{flex:1 1 0%!important}.flex-shrink-0{flex-shrink:0!important}.resize{resize:both!important}.flex-col{flex-direction:column!important}.self-center{align-self:center!important}.rounded{border-radius:.25rem!important}.opacity-0{opacity:0!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}";const p=class{constructor(i){t(this,i);this.selectedRowsChange=e(this,"selectedRowsChange",3);this.rowClick=e(this,"rowClick",3);this.rowSelected=e(this,"rowSelected",3);this.rowDeselected=e(this,"rowDeselected",3);this.hasRendered=e(this,"hasRendered",3);this.quickFilter=e(this,"quickFilter",3);this.queryChange=e(this,"queryChange",3);this.filter=e(this,"filter",3);this.action=e(this,"action",3);this.pageChange=e(this,"pageChange",3);this.pageSizeChange=e(this,"pageSizeChange",3);this.export=e(this,"export",3);this.emptyStateActionClick=e(this,"emptyStateActionClick",3)}items;loading=false;headerLoading=false;footerLoading=false;amountOfLoadingRows=6;enableRowSelection=true;rowSelectionLimit;enableRowClick=true;selectedRows=[];enableFloatingMenu=true;floatingMenuAmountSelectedTemplate=t=>r((t===1?this._locales.floating_menu?.amount_selected:this._locales.floating_menu?.amount_selected_plural)?.replace("{{amount}}",t));selectedRowsChange;selectionKey;canSelectKey;rowClick;rowSelected;rowDeselected;hasRendered;enableHeader=true;quickFilters=[];activeQuickFilterIdentifier;enableSearch=true;query;enableFilter=true;enableFilterDesktop=true;selectedFiltersAmount;filterButtonTemplate;enableAction=false;actionButtonLoading=false;actionButtonEnabled=false;actionButtonIcon="pencil";actionButtonText;actionButtonTemplate;quickFilter;queryChange;filter;action;enableFooter=true;enablePaginationSize=true;enablePaginationPages=true;enableExport=true;page=1;total;pageChange;pageSize=u;pageSizeOptions=f;pageSizeChange;export;hideOnSinglePage=true;emptyStateHeader=()=>r(this._locales.empty_state?.no_filter.header);emptyStateContent=()=>r(this._locales.empty_state?.no_filter.content);emptyStateAction=()=>r(this._locales.empty_state?.no_filter.action);enableEmptyStateAction=true;emptyStateFilteredHeader=()=>r(this._locales.empty_state.filtered.header);emptyStateFilteredContent=()=>r(this._locales.empty_state.filtered.content);emptyStateActionClick;shadow=true;get _el(){return i(this)}_locales={};_columns=[];_items=[];_enableRowSelection=this.enableRowSelection;_rowSelectionLimit;_rowActionsFloatingAll=[];_rowActionsFloating=[];_rowActionsRow=[];_footerHidden=false;_ctrlDown=false;_hasCustomFilterSlot=false;_hasCustomActionsSlot=false;_floatingMenuShown=false;_resizeTimeout;componentWillLoad(){this._hasCustomFilterSlot=!!this._el.querySelector(':scope > [slot="custom-filter"]');this._hasCustomActionsSlot=!!this._el.querySelector(':scope > [slot="custom-actions"]');this._setRowSelectionData();this._setLocales();this._parseItems(this.items);this._generateColumns()}componentDidRender(){this.hasRendered.emit()}render(){return s(n,{key:"aff2178e8b10a013ad81a1531e0f8328d0a450f8",class:"z-0 flex flex-col"},s("p-table-container",{key:"964e4a949fbd872c56896182256297cfba9282e3"},this.enableHeader&&s("p-table-header",{key:"38dabb784a7bd800e5bda13ee20e2a39301d6101",class:"mb-8",quickFilters:this.quickFilters,activeQuickFilterIdentifier:this.activeQuickFilterIdentifier,onQuickFilter:({detail:t})=>this.quickFilter.emit(t),enableSearch:this.enableSearch,query:this.query,onQueryChange:({detail:t})=>this.queryChange.emit(t),enableFilter:this.enableFilter,enableFilterDesktop:this.enableFilterDesktop,selectedFiltersAmount:this.selectedFiltersAmount,filterButtonTemplate:this.filterButtonTemplate,onFilter:()=>this.filter.emit(),enableAction:this.enableAction,actionIcon:this.actionButtonIcon,actionText:this.actionButtonText,actionLoading:this.actionButtonLoading,canUseAction:this.actionButtonEnabled,actionButtonTemplate:this.actionButtonTemplate,onAction:()=>this.action.emit(),itemsSelectedAmount:this.selectedRows?.length,enableExport:this.enableExport,onExport:()=>this.export.emit(),loading:this.headerLoading},this._hasCustomFilterSlot&&s("slot",{key:"103f6b3de27b2701d1db6cc8893eb30e5be6b982",name:"custom-filter",slot:"custom-filter"}),this._hasCustomActionsSlot&&s("slot",{key:"12f0a5e6f9616366994a5b4e0723b2bd8de85597",name:"custom-actions",slot:"custom-actions"})),this._getHeader(),s("div",{key:"a611b876f701edfaf6edcc2ccb3e86190a017252",class:"flex flex-1 flex-col"},this._getRows()),this.enableFloatingMenu&&this._enableRowSelection?s("p-floating-menu-container",{usedInTable:true,class:l({hasFooter:this.enableFooter&&!this._footerHidden,active:!!this.selectedRows?.length,shown:this._floatingMenuShown}),amountSelectedTemplate:this.floatingMenuAmountSelectedTemplate,amount:this.selectedRows?.length,enableAmountSelected:!!this._rowActionsFloating?.length,onClose:()=>this._selectAllChange(null,false)},this._rowActionsFloating?.length&&this._rowActionsFloating.map((t=>s("p-floating-menu-item",{slot:"floating-menu-item",disabled:t.disabled,loading:t.loading,icon:t.icon,iconRotate:t.iconRotate,iconFlip:t.iconFlip,onClick:()=>!t.disabled&&!t.loading&&!!t.action&&t.type==="single"?t.action(this.selectedRows[0],false):t.action(this.selectedRows,true)},t.label)))):"",this.enableFooter&&s("p-table-footer",{key:"b9a6f34b4a447bcd60905d42db1583cb47806361",hideOnSinglePage:this.hideOnSinglePage,enablePaginationSize:this.enablePaginationSize,pageSize:this.pageSize,pageSizeOptions:this.pageSizeOptions,onPageSizeChange:({detail:t})=>this.pageSizeChange.emit(t),enablePaginationPages:this.enablePaginationPages,page:this.page,total:this.total,onPageChange:({detail:t})=>this.pageChange.emit(t),loading:this.footerLoading,onHiddenChange:({detail:t})=>this._footerHidden=t})))}async _setLocales(){this._locales=await h(this._el)}onTableDefinitionUpdated(){this._generateColumns()}keyDown({key:t}){if(t!=="Control"||this._ctrlDown===true){return}this._ctrlDown=true}keyUp({key:t}){if(t!=="Control"||this._ctrlDown===false){return}this._ctrlDown=false}visibilityChange(){if(document.visibilityState!=="hidden"||this._ctrlDown===false){return}this._ctrlDown=false}_parseItems(t){if(!t){this._items=[];return}if(Array.isArray(t)){this._items=t;return}this._items=JSON.parse(t)}_setRowSelectionData(){if(this._resizeTimeout){clearTimeout(this._resizeTimeout)}this._resizeTimeout=setTimeout((()=>{const t=o();const e=Array.from(this._el.querySelectorAll(":scope > p-table-row-action"));this._rowActionsRow=e.filter((t=>t.type==="both"||t.type==="single"));this._rowActionsFloatingAll=e.filter((e=>this.enableRowSelection&&(e.type==="both"||e.type==="multi")||t&&e.type==="single")).map((t=>{if(t.type==="single"){t.disabled=this.selectedRows?.length>1}return t}));let i=this.rowSelectionLimit;if(t&&this._rowActionsFloatingAll?.length&&(i!==undefined&&this.enableRowSelection||!this.enableRowSelection)){i=1}this._rowSelectionLimit=i;let s=this.enableRowSelection;if(t&&this._rowActionsFloatingAll?.length&&!s){s=true}this._enableRowSelection=s;if(this._floatingMenuShown){this._showFloatingMenu()}}),200)}_generateColumns(){const t=this._el.querySelectorAll("p-table-column");let e=Array.from(t);e=this._parseDefinitions(e);this._columns=e}_getHeader(){return s("p-table-row",{variant:"header"},this._columns.map(((t,e)=>s("p-table-cell",{definition:t,value:t.name,variant:"header",checkbox:e===0||t.hasCheckbox?this._getCheckbox(null,this.loading?"loading":"header"):null,index:e}))))}_getRows(){if(this.loading){return Array.from({length:this.amountOfLoadingRows},((t,e)=>s("p-table-row",{enableHover:this._enableRowSelection||this.enableRowClick},this._getLoadingColumns(e))))}if(!this._items.length){return this._getEmptyState()}return this._items.map(((t,e)=>s("p-table-row",{enableHover:this._enableRowSelection||this.enableRowClick,onClick:t=>this._rowClick(t,e)},this._getRowColumns(t,e),this._getActions(t))))}_getActions(t){const e=this._rowActionsRow.filter((e=>e.showFunction?e.showFunction(t):true));if(e?.length&&!o()){return s("p-table-row-actions-container",{slot:"actions"},e.map((e=>s("p-tooltip",{strategy:"fixed",content:e.label},s("p-button",{"data-is-action":true,variant:"secondary",slot:"trigger",icon:e.icon,iconRotate:e.iconRotate,iconFlip:e.iconFlip,iconOnly:true,size:"sm",onClick:()=>typeof e.action==="function"&&e.action?.(t,false)})))))}return null}_getRowColumns(t,e){return this._columns.map(((i,n)=>s("p-table-cell",{definition:i,item:t,checkbox:n===0||i.hasCheckbox?this._getCheckbox(e):null,index:n,rowIndex:e})))}_getLoadingColumns(t){return this._columns.map(((e,i)=>s("p-table-cell",{definition:e,variant:"loading",checkbox:i===0||e.hasCheckbox?this._getCheckbox(t,"loading"):null,index:i,rowIndex:t})))}_getCheckbox(t,e="default"){if(!this._enableRowSelection||!this.selectionKey&&!this._rowActionsFloating?.length){return}if(e==="loading"){return s("p-loader",{variant:"ghost",class:"h-6 w-6 rounded"})}if(e==="header"){return s("p-checkbox",{class:c({"opacity-0":this._rowSelectionLimit!==undefined}),checked:this._selectionContainsAll(),indeterminate:this._selectionIndeterminate(),disabled:this._rowSelectionLimit!==undefined,onCheckedChange:t=>this._selectAllChange(t)})}const i=this._items[t];const n=this._selectionContains(t);return s("p-checkbox",{class:"flex-shrink-0",disabled:this.canSelectKey&&!i[this.canSelectKey]||this._rowSelectionLimit!==undefined&&!n&&this.selectedRows.length===this._rowSelectionLimit,checked:n,onCheckedChange:e=>this._checkboxChange(e,t)})}_getEmptyState(){if(this.query?.length||this.selectedFiltersAmount){return s("p-empty-state",{class:"my-16 self-center",illustration:"search",header:this.emptyStateFilteredHeader(),content:this.emptyStateFilteredContent()})}return s("p-empty-state",{class:"my-16 self-center",illustration:"table",header:this.emptyStateHeader(),content:this.emptyStateContent(),enableAction:this.enableEmptyStateAction,actionIcon:"plus",actionText:this.emptyStateAction()})}_selectAllChange(t,e){if(!this._enableRowSelection){return}const i=t?.detail??e??false;const s=e===undefined?i:e;if(s){const t=[];for(let e=0;e<this._items.length;e++){const i=this._items[e];if(this.canSelectKey&&!i[this.canSelectKey]){continue}if(this._selectionContains(e)){continue}t.push(i);this.rowSelected.emit(i);if(this._rowSelectionLimit!==undefined&&this.selectedRows.length+t.length===this._rowSelectionLimit){break}}this.selectedRows=[...this.selectedRows,...t];this.selectedRowsChange.emit(this.selectedRows);if(this.enableFloatingMenu&&!this._floatingMenuShown){this._showFloatingMenu()}return}for(let t=0;t<this.selectedRows.length;t++){const e=this.selectedRows[t];const i=this._items.find((i=>this._getSelectionValue(i,t)===this._getSelectionValue(e,t)));if(!i){continue}this.rowDeselected.emit(i)}this.selectedRows=[];this.selectedRowsChange.emit(this.selectedRows)}_checkboxChange({detail:t,target:e},i){if(!this._enableRowSelection){return}if(t&&this._rowSelectionLimit!==undefined&&this.selectedRows.length>=this._rowSelectionLimit){e.checked=false;return}const s=this._items[i];if(this.canSelectKey&&!s[this.canSelectKey]){e.checked=false;return}if(t){this.selectedRows=[...this.selectedRows,{...s,index:i}];this.selectedRowsChange.emit(this.selectedRows);this.rowSelected.emit(s);if(this.enableFloatingMenu&&!this._floatingMenuShown){this._showFloatingMenu()}return}const n=this._selectionContains(i,true);const o=[...this.selectedRows];o.splice(n,1);this.selectedRows=o;this.selectedRowsChange.emit(this.selectedRows);this.rowDeselected.emit(s)}_getSelectionValue(t,e){return this.selectionKey?t?.[this.selectionKey]||e:e}_selectionContains(t,e=false){const i=this.selectedRows.findIndex((e=>e.index===t));return!e?i>=0:i}_selectionContainsAll(){let t=true;if(!this._items?.length){return false}if(this._rowSelectionLimit!==undefined&&this.selectedRows.length===this._rowSelectionLimit){return true}for(let e=0;e<this._items?.length;e++){const i=this._selectionContains(e);if(!i){t=false;break}}return t}_selectionIndeterminate(){if(!this._items?.length||!this.selectedRows?.length){return false}if(this._rowSelectionLimit!==undefined&&this.selectedRows.length===this._rowSelectionLimit){return false}let t=0;for(let e=0;e<this._items?.length;e++){const i=this._selectionContains(e);if(i){t++}}return t>0&&t!==this._items.length}_rowClick(t,e){const i=t.target;if(i.tagName.toLowerCase()==="input"||i.type==="checkbox"){return}const s=this._findRow(t.target);const n=this._findRowAction(t.target);if(n){return}if(this.enableRowClick){const t=this._items[e];this.rowClick.emit({item:t,ctrlDown:this._ctrlDown});return}if(!this._enableRowSelection){return}const o=s?.querySelector('input[type="checkbox"]');if(!o){return}o.checked=!o.checked;this._checkboxChange(o,e)}_findRow(t){if(!t){return t}if(t?.tagName?.toLowerCase()==="p-table-row"){return t}return this._findRow(t?.parentElement)}_findRowAction(t){if(!t){return null}if(t.getAttribute("data-is-action")!==null&&t.getAttribute("data-is-action")!=="false"){return t}if(t?.tagName?.toLowerCase()==="p-table-row"){return null}return this._findRowAction(t?.parentElement)}_showFloatingMenu(){let t=this._rowActionsFloatingAll;if(this.rowSelectionLimit===1&&t.findIndex((t=>(t.type==="single"||t.type==="both")&&t.showFunction))>=0){t=t.filter((t=>t.type==="multi"||!t.showFunction||t.showFunction(this.selectedRows[0])))}this._rowActionsFloating=t;this._floatingMenuShown=true}_parseDefinitions(t){return t.map((t=>{t=this._parseDefinitionSizes(t);return t}))}_parseDefinitionSizes(t){const e=t;let i={default:"full"};if(typeof t.sizes==="string"&&!["auto","hidden","full"].includes(t.sizes)){t.sizes=JSON.parse(t.sizes)}for(const[t,s]of a.entries()){if(e.sizes==="auto"||e.sizes==="hidden"||e.sizes==="full"||typeof e.sizes==="number"){i[s]=e.sizes==="auto"?"full":e.sizes;continue}i[s]=e.sizes[s]??i[a[t-1]]}t.parsedSizes=i;return t}static get watchers(){return{items:["_parseItems"],enableRowSelection:["_setRowSelectionData"],rowSelectionLimit:["_setRowSelectionData"],selectedRows:["_setRowSelectionData"]}}};p.style=d;export{p as p_table};
|
|
2
|
-
//# sourceMappingURL=p-e9db1b2d.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"screens-D_ByWDz6.js","sources":["src/types/constants.ts","src/tailwind/theme/screens.ts","src/utils/screens.ts"],"sourcesContent":["import { TableColumnSizes } from './table';\n\nexport const tableColumSizesOptions = [\n\t'default',\n\t'tablet',\n\t'desktop-xs',\n\t'desktop-sm',\n\t'desktop',\n\t'desktop-lg',\n\t'desktop-xl',\n] as (keyof TableColumnSizes)[];\n","export default {\n\ttablet: '40rem', // 640 px\n\t'desktop-xs': '64rem', // 1024 px\n\t'desktop-sm': '80rem', // 1360 px\n\tdesktop: '85.375rem', // 1366\n\t'desktop-lg': '90rem', // 1440\n\t'desktop-xl': '120rem', // 1920\n\n\t// layout sizes\n\t'layout-1280': '80rem',\n\t'layout-1440': '90rem',\n\t'layout-1536': '96rem',\n\t'layout-1680': '105rem',\n\t'layout-1920': '120rem',\n\t'layout-2560': '160rem',\n};\n","import screens from '../tailwind/theme/screens';\n\nexport type ScreenSize = keyof typeof screens;\n\nexport const getScreenSize = (size: ScreenSize) => screens[size];\n\nexport const getScreenSizeInRem = (size: ScreenSize) => {\n\tconst screen = getScreenSize(size);\n\treturn parseInt(screen.replace('rem', ''), 10);\n};\n\nexport const getScreenSizeInPixels = (size: ScreenSize) => {\n\tconst rem = getScreenSizeInRem(size);\n\treturn rem * 16;\n};\n\nexport const isBiggerThanScreen = (size: ScreenSize) => {\n\tconst pixels = getScreenSizeInPixels(size);\n\treturn window.innerWidth > pixels;\n};\n\nexport const isSmallerThanScreen = (size: ScreenSize) => {\n\tconst pixels = getScreenSizeInPixels(size);\n\treturn window.innerWidth < pixels;\n};\n\nexport const isBetweenScreens = (\n\tsmallSize: ScreenSize,\n\tbigSize: ScreenSize\n) => {\n\treturn isBiggerThanScreen(smallSize) && isSmallerThanScreen(bigSize);\n};\n\nexport const isTouchDevice = () =>\n\t!!window.matchMedia('(pointer: coarse)').matches;\nexport const isMobile = () => isTouchDevice() || isSmallerThanScreen('tablet');\nexport const isTablet = () => isBetweenScreens('tablet', 'desktop-xs');\nexport const isDesktop = () => isBiggerThanScreen('desktop-xs');\n"],"names":[],"mappings":";;AAEa,MAAA,sBAAsB,GAAG;IACrC,SAAS;IACT,QAAQ;IACR,YAAY;IACZ,YAAY;IACZ,SAAS;IACT,YAAY;IACZ,YAAY;;;ACTb,cAAe;IACd,MAAM,EAAE,OAAO;IACf,YAAY,EAAE,OAAO;IACrB,YAAY,EAAE,OAAO;IACrB,OAAO,EAAE,WAAW;IACpB,YAAY,EAAE,OAAO;IACrB,YAAY,EAAE,QAAQ;;AAGtB,IAAA,aAAa,EAAE,OAAO;AACtB,IAAA,aAAa,EAAE,OAAO;AACtB,IAAA,aAAa,EAAE,OAAO;AACtB,IAAA,aAAa,EAAE,QAAQ;AACvB,IAAA,aAAa,EAAE,QAAQ;AACvB,IAAA,aAAa,EAAE,QAAQ;CACvB;;ACXM,MAAM,aAAa,GAAG,CAAC,IAAgB,KAAK,OAAO,CAAC,IAAI;AAElD,MAAA,kBAAkB,GAAG,CAAC,IAAgB,KAAI;AACtD,IAAA,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,CAAC;AAClC,IAAA,OAAO,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;AAC/C;AAEa,MAAA,qBAAqB,GAAG,CAAC,IAAgB,KAAI;AACzD,IAAA,MAAM,GAAG,GAAG,kBAAkB,CAAC,IAAI,CAAC;IACpC,OAAO,GAAG,GAAG,EAAE;AAChB;AAEa,MAAA,kBAAkB,GAAG,CAAC,IAAgB,KAAI;AACtD,IAAA,MAAM,MAAM,GAAG,qBAAqB,CAAC,IAAI,CAAC;AAC1C,IAAA,OAAO,MAAM,CAAC,UAAU,GAAG,MAAM;AAClC;AAEa,MAAA,mBAAmB,GAAG,CAAC,IAAgB,KAAI;AACvD,IAAA,MAAM,MAAM,GAAG,qBAAqB,CAAC,IAAI,CAAC;AAC1C,IAAA,OAAO,MAAM,CAAC,UAAU,GAAG,MAAM;AAClC;MAEa,gBAAgB,GAAG,CAC/B,SAAqB,EACrB,OAAmB,KAChB;IACH,OAAO,kBAAkB,CAAC,SAAS,CAAC,IAAI,mBAAmB,CAAC,OAAO,CAAC;AACrE;AAEa,MAAA,aAAa,GAAG,MAC5B,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;AACnC,MAAM,QAAQ,GAAG,MAAM,aAAa,EAAE,IAAI,mBAAmB,CAAC,QAAQ;AACtE,MAAM,QAAQ,GAAG,MAAM,gBAAgB,CAAC,QAAQ,EAAE,YAAY;AACxD,MAAA,SAAS,GAAG,MAAM,kBAAkB,CAAC,YAAY;;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"p-LsrP-Unv.js","mappings":"AAEa,MAAA,sBAAsB,GAAG;IACrC,SAAS;IACT,QAAQ;IACR,YAAY;IACZ,YAAY;IACZ,SAAS;IACT,YAAY;IACZ,YAAY;;;ACTb,cAAe;IACd,MAAM,EAAE,OAAO;IACf,YAAY,EAAE,OAAO;IACrB,YAAY,EAAE,OAAO;IACrB,OAAO,EAAE,WAAW;IACpB,YAAY,EAAE,OAAO;IACrB,YAAY,EAAE,QAAQ;;AAGtB,IAAA,aAAa,EAAE,OAAO;AACtB,IAAA,aAAa,EAAE,OAAO;AACtB,IAAA,aAAa,EAAE,OAAO;AACtB,IAAA,aAAa,EAAE,QAAQ;AACvB,IAAA,aAAa,EAAE,QAAQ;AACvB,IAAA,aAAa,EAAE,QAAQ;CACvB;;ACXM,MAAM,aAAa,GAAG,CAAC,IAAgB,KAAK,OAAO,CAAC,IAAI;AAElD,MAAA,kBAAkB,GAAG,CAAC,IAAgB,KAAI;AACtD,IAAA,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,CAAC;AAClC,IAAA,OAAO,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;AAC/C;AAEa,MAAA,qBAAqB,GAAG,CAAC,IAAgB,KAAI;AACzD,IAAA,MAAM,GAAG,GAAG,kBAAkB,CAAC,IAAI,CAAC;IACpC,OAAO,GAAG,GAAG,EAAE;AAChB;AAEa,MAAA,kBAAkB,GAAG,CAAC,IAAgB,KAAI;AACtD,IAAA,MAAM,MAAM,GAAG,qBAAqB,CAAC,IAAI,CAAC;AAC1C,IAAA,OAAO,MAAM,CAAC,UAAU,GAAG,MAAM;AAClC;AAEa,MAAA,mBAAmB,GAAG,CAAC,IAAgB,KAAI;AACvD,IAAA,MAAM,MAAM,GAAG,qBAAqB,CAAC,IAAI,CAAC;AAC1C,IAAA,OAAO,MAAM,CAAC,UAAU,GAAG,MAAM;AAClC;MAEa,gBAAgB,GAAG,CAC/B,SAAqB,EACrB,OAAmB,KAChB;IACH,OAAO,kBAAkB,CAAC,SAAS,CAAC,IAAI,mBAAmB,CAAC,OAAO,CAAC;AACrE;AAEa,MAAA,aAAa,GAAG,MAC5B,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;AACnC,MAAM,QAAQ,GAAG,MAAM,aAAa,EAAE,IAAI,mBAAmB,CAAC,QAAQ;AACtE,MAAM,QAAQ,GAAG,MAAM,gBAAgB,CAAC,QAAQ,EAAE,YAAY;AACxD,MAAA,SAAS,GAAG,MAAM,kBAAkB,CAAC,YAAY;;;;","names":[],"sources":["src/types/constants.ts","src/tailwind/theme/screens.ts","src/utils/screens.ts"],"sourcesContent":["import { TableColumnSizes } from './table';\n\nexport const tableColumSizesOptions = [\n\t'default',\n\t'tablet',\n\t'desktop-xs',\n\t'desktop-sm',\n\t'desktop',\n\t'desktop-lg',\n\t'desktop-xl',\n] as (keyof TableColumnSizes)[];\n","export default {\n\ttablet: '40rem', // 640 px\n\t'desktop-xs': '64rem', // 1024 px\n\t'desktop-sm': '80rem', // 1360 px\n\tdesktop: '85.375rem', // 1366\n\t'desktop-lg': '90rem', // 1440\n\t'desktop-xl': '120rem', // 1920\n\n\t// layout sizes\n\t'layout-1280': '80rem',\n\t'layout-1440': '90rem',\n\t'layout-1536': '96rem',\n\t'layout-1680': '105rem',\n\t'layout-1920': '120rem',\n\t'layout-2560': '160rem',\n};\n","import screens from '../tailwind/theme/screens';\n\nexport type ScreenSize = keyof typeof screens;\n\nexport const getScreenSize = (size: ScreenSize) => screens[size];\n\nexport const getScreenSizeInRem = (size: ScreenSize) => {\n\tconst screen = getScreenSize(size);\n\treturn parseInt(screen.replace('rem', ''), 10);\n};\n\nexport const getScreenSizeInPixels = (size: ScreenSize) => {\n\tconst rem = getScreenSizeInRem(size);\n\treturn rem * 16;\n};\n\nexport const isBiggerThanScreen = (size: ScreenSize) => {\n\tconst pixels = getScreenSizeInPixels(size);\n\treturn window.innerWidth > pixels;\n};\n\nexport const isSmallerThanScreen = (size: ScreenSize) => {\n\tconst pixels = getScreenSizeInPixels(size);\n\treturn window.innerWidth < pixels;\n};\n\nexport const isBetweenScreens = (\n\tsmallSize: ScreenSize,\n\tbigSize: ScreenSize\n) => {\n\treturn isBiggerThanScreen(smallSize) && isSmallerThanScreen(bigSize);\n};\n\nexport const isTouchDevice = () =>\n\t!!window.matchMedia('(pointer: coarse)').matches;\nexport const isMobile = () => isTouchDevice() || isSmallerThanScreen('tablet');\nexport const isTablet = () => isBetweenScreens('tablet', 'desktop-xs');\nexport const isDesktop = () => isBiggerThanScreen('desktop-xs');\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"screens-LsrP-Unv.js","sources":["src/types/constants.ts","src/tailwind/theme/screens.ts","src/utils/screens.ts"],"sourcesContent":["import { TableColumnSizes } from './table';\n\nexport const tableColumSizesOptions = [\n\t'default',\n\t'tablet',\n\t'desktop-xs',\n\t'desktop-sm',\n\t'desktop',\n\t'desktop-lg',\n\t'desktop-xl',\n] as (keyof TableColumnSizes)[];\n","export default {\n\ttablet: '40rem', // 640 px\n\t'desktop-xs': '64rem', // 1024 px\n\t'desktop-sm': '80rem', // 1360 px\n\tdesktop: '85.375rem', // 1366\n\t'desktop-lg': '90rem', // 1440\n\t'desktop-xl': '120rem', // 1920\n\n\t// layout sizes\n\t'layout-1280': '80rem',\n\t'layout-1440': '90rem',\n\t'layout-1536': '96rem',\n\t'layout-1680': '105rem',\n\t'layout-1920': '120rem',\n\t'layout-2560': '160rem',\n};\n","import screens from '../tailwind/theme/screens';\n\nexport type ScreenSize = keyof typeof screens;\n\nexport const getScreenSize = (size: ScreenSize) => screens[size];\n\nexport const getScreenSizeInRem = (size: ScreenSize) => {\n\tconst screen = getScreenSize(size);\n\treturn parseInt(screen.replace('rem', ''), 10);\n};\n\nexport const getScreenSizeInPixels = (size: ScreenSize) => {\n\tconst rem = getScreenSizeInRem(size);\n\treturn rem * 16;\n};\n\nexport const isBiggerThanScreen = (size: ScreenSize) => {\n\tconst pixels = getScreenSizeInPixels(size);\n\treturn window.innerWidth > pixels;\n};\n\nexport const isSmallerThanScreen = (size: ScreenSize) => {\n\tconst pixels = getScreenSizeInPixels(size);\n\treturn window.innerWidth < pixels;\n};\n\nexport const isBetweenScreens = (\n\tsmallSize: ScreenSize,\n\tbigSize: ScreenSize\n) => {\n\treturn isBiggerThanScreen(smallSize) && isSmallerThanScreen(bigSize);\n};\n\nexport const isTouchDevice = () =>\n\t!!window.matchMedia('(pointer: coarse)').matches;\nexport const isMobile = () => isTouchDevice() || isSmallerThanScreen('tablet');\nexport const isTablet = () => isBetweenScreens('tablet', 'desktop-xs');\nexport const isDesktop = () => isBiggerThanScreen('desktop-xs');\n"],"names":[],"mappings":"AAEa,MAAA,sBAAsB,GAAG;IACrC,SAAS;IACT,QAAQ;IACR,YAAY;IACZ,YAAY;IACZ,SAAS;IACT,YAAY;IACZ,YAAY;;;ACTb,cAAe;IACd,MAAM,EAAE,OAAO;IACf,YAAY,EAAE,OAAO;IACrB,YAAY,EAAE,OAAO;IACrB,OAAO,EAAE,WAAW;IACpB,YAAY,EAAE,OAAO;IACrB,YAAY,EAAE,QAAQ;;AAGtB,IAAA,aAAa,EAAE,OAAO;AACtB,IAAA,aAAa,EAAE,OAAO;AACtB,IAAA,aAAa,EAAE,OAAO;AACtB,IAAA,aAAa,EAAE,QAAQ;AACvB,IAAA,aAAa,EAAE,QAAQ;AACvB,IAAA,aAAa,EAAE,QAAQ;CACvB;;ACXM,MAAM,aAAa,GAAG,CAAC,IAAgB,KAAK,OAAO,CAAC,IAAI;AAElD,MAAA,kBAAkB,GAAG,CAAC,IAAgB,KAAI;AACtD,IAAA,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,CAAC;AAClC,IAAA,OAAO,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;AAC/C;AAEa,MAAA,qBAAqB,GAAG,CAAC,IAAgB,KAAI;AACzD,IAAA,MAAM,GAAG,GAAG,kBAAkB,CAAC,IAAI,CAAC;IACpC,OAAO,GAAG,GAAG,EAAE;AAChB;AAEa,MAAA,kBAAkB,GAAG,CAAC,IAAgB,KAAI;AACtD,IAAA,MAAM,MAAM,GAAG,qBAAqB,CAAC,IAAI,CAAC;AAC1C,IAAA,OAAO,MAAM,CAAC,UAAU,GAAG,MAAM;AAClC;AAEa,MAAA,mBAAmB,GAAG,CAAC,IAAgB,KAAI;AACvD,IAAA,MAAM,MAAM,GAAG,qBAAqB,CAAC,IAAI,CAAC;AAC1C,IAAA,OAAO,MAAM,CAAC,UAAU,GAAG,MAAM;AAClC;MAEa,gBAAgB,GAAG,CAC/B,SAAqB,EACrB,OAAmB,KAChB;IACH,OAAO,kBAAkB,CAAC,SAAS,CAAC,IAAI,mBAAmB,CAAC,OAAO,CAAC;AACrE;AAEa,MAAA,aAAa,GAAG,MAC5B,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;AACnC,MAAM,QAAQ,GAAG,MAAM,aAAa,EAAE,IAAI,mBAAmB,CAAC,QAAQ;AACtE,MAAM,QAAQ,GAAG,MAAM,gBAAgB,CAAC,QAAQ,EAAE,YAAY;AACxD,MAAA,SAAS,GAAG,MAAM,kBAAkB,CAAC,YAAY;;;;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as a,h as e,H as t}from"./p-DhGo7hbh.js";const o="*{box-sizing:border-box}.static{position:static!important}.flex{display:flex!important}.flex-col{flex-direction:column!important}.gap-2{gap:.5rem!important}";const i=class{constructor(e){a(this,e)}header;render(){return e(t,{key:"68ba63147ae0373907edc00994d1b66e2699a0e4",class:"flex flex-col gap-2"},this.header?.length>0&&e("p-navigation-title",{key:"3d48dfca4f662a48361ba040bc89938e1dbbc9a1"},this.header),e("div",{key:"553931d84d46ee1e0166da11113a65567b5a8260",class:"flex flex-col"},e("slot",{key:"a58592bb75ae21f269e2305138ed4585416262ba"})))}};i.style=o;export{i as p_navigation_section};
|
|
2
|
-
//# sourceMappingURL=p-0cf505a8.entry.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as a}from"./p-DhGo7hbh.js";import{c as r}from"./p-CBWjHURv.js";import{c as i}from"./p-CT54OXR2.js";import"./p-ChV9xqsO.js";const o=".block{display:block!important}*{box-sizing:border-box}:host{display:block;width:100%}.static{position:static!important}.flex{display:flex!important}.hidden{display:none!important}.h-8{height:2rem!important}.w-full{width:100%!important}.min-w-0{min-width:0!important}.flex-1{flex:1 1 0%!important}.items-start{align-items:flex-start!important}.items-center{align-items:center!important}.justify-start{justify-content:flex-start!important}.gap-2{gap:.5rem!important}.overflow-hidden{overflow:hidden!important}.text-ellipsis{text-overflow:ellipsis!important}.whitespace-nowrap{white-space:nowrap!important}.rounded-lg{border-radius:.5rem!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-black-teal-100{--tw-border-opacity:1!important;border-color:rgb(205 212 211/var(--tw-border-opacity,1))!important}.border-negative-red{--tw-border-opacity:1!important;border-color:rgb(230 30 30/var(--tw-border-opacity,1))!important}.bg-white-600{--tw-bg-opacity:1!important;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-black-teal-200{--tw-text-opacity:1!important;color:rgb(154 170 167/var(--tw-text-opacity,1))!important}.text-black-teal-300{--tw-text-opacity:1!important;color:rgb(104 127 124/var(--tw-text-opacity,1))!important}.text-negative-red{--tw-text-opacity:1!important;color:rgb(230 30 30/var(--tw-text-opacity,1))!important}.empty\\:hidden:empty{display:none!important}.peer:empty~.peer-empty\\:block{display:block!important}";const d=r(["flex flex-1 items-center justify-start gap-2","h-8 min-w-0 px-2 rounded-lg","border border-solid bg-white-600"],{variants:{error:{false:"bg-white-600 border-black-teal-100 text-black-teal-200",true:"border-negative-red"}}});const p=class{constructor(a){t(this,a);this.upload=e(this,"upload",3);this.download=e(this,"download",3);this.delete=e(this,"delete",3)}value;label;helper;required=true;mode="read";placeholder="Upload a file...";downloadTooltip="Download";uploadTooltip="Upload";deleteTooltip="Delete";loading=false;error;upload;download;delete;render(){let t=a("p-icon",{key:"dec3ba45123c5d6ce59da6a1f96c9b9a3a3876ed",class:"text-black-teal-300",variant:"attachment"});if(this.loading){t=a("p-loader",{key:"02cccf7922f00303b3077e588170b3aae7f6f27f"})}if(this.error){t=a("p-icon",{key:"db46c29fcf10ed6c2689bf33b6e4bf4a2cc82fca",variant:"warning",class:"text-negative-red"})}const e="min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-sm";return a("p-field-container",{key:"692a34d32a0c898597a023af15a3c1eb41cbcf9f",variant:"write",label:this.label,helper:this.helper,error:this.error,required:this.required,forceShowTooltip:!!this.error?.length},a("div",{key:"e571150e73494149c716d6a80dbf1263b887b609",slot:"content",class:"flex items-start gap-2 w-full"},a("div",{key:"a7f187728379b71a2adc7c6c26aacf0830a43ba1",class:d({error:!!this.error?.length})},t,a("span",{key:"afb1e39187468e6594941c08ad3fc4416dd33335",class:i(e,"peer empty:hidden")},this.value),a("span",{key:"e134aceb211439def13e0990ce0c30eea90411e3",class:i(e,"hidden peer-empty:block")},this.placeholder)),a("p-tooltip",{key:"7a162119958bf4324dbdc8492f041c05024ff2b8",content:this.mode==="read"?this.downloadTooltip:this.value?.length?this.deleteTooltip:this.uploadTooltip},a("p-button",{key:"0e07189d0275b197d3c73a3d78d0723aaa6b8bb9",slot:"trigger",variant:"secondary",iconOnly:true,icon:this.mode==="read"?"download":this.value?.length?"trash":"upload",disabled:this.loading,loading:this.loading,onOnClick:()=>(this.mode==="read"?this.download:this.value?.length?this.delete:this.upload).emit()}))))}};p.style=o;export{p as p_attachment};
|
|
2
|
-
//# sourceMappingURL=p-8577755d.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["attachmentComponentCss","attachment","cva","variants","error","false","true","Attachment","value","label","helper","required","mode","placeholder","downloadTooltip","uploadTooltip","deleteTooltip","loading","upload","download","delete","render","prefix","h","key","class","variant","this","baseText","forceShowTooltip","length","slot","cn","content","iconOnly","icon","disabled","onOnClick","emit"],"sources":["src/components/molecules/attachment/attachment.component.css?tag=p-attachment&encapsulation=shadow","src/components/molecules/attachment/attachment.component.tsx"],"sourcesContent":[":host {\n\t@apply block w-full;\n}\n","import { Component, Event, EventEmitter, h, Prop } from '@stencil/core';\nimport { cn } from '../../../utils';\nimport { cva } from 'class-variance-authority';\n\nconst attachment = cva([\n\t\t'flex flex-1 items-center justify-start gap-2',\n\t\t'h-8 min-w-0 px-2 rounded-lg',\n\t\t'border border-solid bg-white-600'\n\t], {\n\t\tvariants: {\n\t\t\terror: {\n\t\t\t\tfalse: 'bg-white-600 border-black-teal-100 text-black-teal-200',\n\t\t\t\ttrue: 'border-negative-red',\n\t\t\t}\n\t\t}\n\t})\n\n@Component({\n\ttag: 'p-attachment',\n\tstyleUrl: 'attachment.component.css',\n\tshadow: true,\n})\nexport class Attachment {\n\t/**\n\t * The value of the attachment (usually the file name)\n\t */\n\t@Prop() value: string;\n\n\t/**\n\t * The label of the attachment\n\t */\n\t@Prop() label: string | HTMLSlotElement;\n\n\t/**\n\t * The helper of the attachment\n\t */\n\t@Prop() helper: string | HTMLSlotElement;\n\n\t/**\n\t * Wether the attachment is required\n\t */\n\t@Prop({ reflect: true }) required = true;\n\n\n\t/**\n\t * The variant of the attachment\n\t */\n\t@Prop() mode: 'read' | 'write' = 'read';\n\n\t/**\n\t * The placeholder of the attachment\n\t */\n\t@Prop() placeholder: string = 'Upload a file...';\n\n\t/**\n\t * The text for the download tooltip\n\t */\n\t@Prop() downloadTooltip: string = 'Download';\n\n\t/**\n\t * The text for the upload tooltip\n\t */\n\t@Prop() uploadTooltip: string = 'Upload';\n\n\t/**\n\t * The text for the delete tooltip\n\t */\n\t@Prop() deleteTooltip: string = 'Delete';\n\n\t/**\n\t * Wether the attachment is loading\n\t */\n\t@Prop() loading = false;\n\n\t/**\n\t * The error to show\n\t */\n\t@Prop() error: string;\n\n\t/**\n\t * Event when upload is pressed\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tupload: EventEmitter<void>;\n\n\t/**\n\t * Event when download is pressed\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tdownload: EventEmitter<void>;\n\n\t/**\n\t * Event when delete is pressed\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tdelete: EventEmitter<void>;\n\n\trender() {\n\t\tlet prefix = <p-icon class=\"text-black-teal-300\" variant='attachment' />;\n\n\t\tif (this.loading) {\n\t\t\tprefix = <p-loader />;\n\t\t}\n\n\t\tif (this.error) {\n\t\t\tprefix = (\n\t\t\t\t<p-icon\n\t\t\t\t\tvariant='warning'\n\t\t\t\t\tclass='text-negative-red'\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\tconst baseText = 'min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-sm'\n\t\treturn (\n\t\t\t<p-field-container variant=\"write\" label={this.label} helper={this.helper} error={this.error} required={this.required} forceShowTooltip={!!this.error?.length}>\n\t\t\t\t<div slot=\"content\" class='flex items-start gap-2 w-full'>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={attachment({\n\t\t\t\t\t\t\terror: !!this.error?.length\n\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t{prefix}\n\n\t\t\t\t\t\t<span class={cn(baseText, 'peer empty:hidden')}>\n\t\t\t\t\t\t\t{this.value}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span class={cn(baseText, 'hidden peer-empty:block')}>\n\t\t\t\t\t\t\t{this.placeholder}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<p-tooltip content={this.mode === 'read' ? this.downloadTooltip : this.value?.length ? this.deleteTooltip : this.uploadTooltip}>\n\t\t\t\t\t\t<p-button\n\t\t\t\t\t\t\tslot=\"trigger\"\n\t\t\t\t\t\t\tvariant='secondary'\n\t\t\t\t\t\t\ticonOnly={true}\n\t\t\t\t\t\t\ticon={this.mode === 'read' ? 'download' : this.value?.length ? 'trash' : 'upload'}\n\t\t\t\t\t\t\tdisabled={this.loading}\n\t\t\t\t\t\t\tloading={this.loading}\n\t\t\t\t\t\t\tonOnClick={() =>\n\t\t\t\t\t\t\t\t(this.mode === 'read' ? this.download : this.value?.length ? this.delete : this.upload).emit()\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</p-tooltip>\n\t\t\t\t</div>\n\t\t\t</p-field-container>\n\t\t);\n\t}\n}\n"],"mappings":"kJAAA,MAAMA,EAAyB,gmDCI/B,MAAMC,EAAaC,EAAI,CACrB,+CACA,8BACA,oCACE,CACFC,SAAU,CACTC,MAAO,CACNC,MAAO,yDACPC,KAAM,0B,MAUGC,EAAU,M,0HAIdC,MAKAC,MAKAC,OAKiBC,SAAW,KAM5BC,KAAyB,OAKzBC,YAAsB,mBAKtBC,gBAA0B,WAK1BC,cAAwB,SAKxBC,cAAwB,SAKxBC,QAAU,MAKVb,MAQRc,OAQAC,SAQAC,OAEA,MAAAC,GACC,IAAIC,EAASC,EAAA,UAAAC,IAAA,2CAAQC,MAAM,sBAAsBC,QAAQ,eAEzD,GAAIC,KAAKV,QAAS,CACjBK,EAASC,EAAA,YAAAC,IAAA,4C,CAGV,GAAIG,KAAKvB,MAAO,CACfkB,EACCC,EACC,UAAAC,IAAA,2CAAAE,QAAQ,UACRD,MAAM,qB,CAKT,MAAMG,EAAW,0EACjB,OACCL,EAAmB,qBAAAC,IAAA,2CAAAE,QAAQ,QAAQjB,MAAOkB,KAAKlB,MAAOC,OAAQiB,KAAKjB,OAAQN,MAAOuB,KAAKvB,MAAOO,SAAUgB,KAAKhB,SAAWkB,mBAAoBF,KAAKvB,OAAO0B,QACvJP,EAAA,OAAAC,IAAA,2CAAKO,KAAK,UAAUN,MAAM,iCACzBF,EACC,OAAAC,IAAA,2CAAAC,MAAOxB,EAAW,CACjBG,QAASuB,KAAKvB,OAAO0B,UAGrBR,EAEDC,EAAA,QAAAC,IAAA,2CAAMC,MAAOO,EAAGJ,EAAU,sBACxBD,KAAKnB,OAEPe,EAAA,QAAAC,IAAA,2CAAMC,MAAOO,EAAGJ,EAAU,4BACxBD,KAAKd,cAIRU,EAAA,aAAAC,IAAA,2CAAWS,QAASN,KAAKf,OAAS,OAASe,KAAKb,gBAAkBa,KAAKnB,OAAOsB,OAASH,KAAKX,cAAgBW,KAAKZ,eAChHQ,EACC,YAAAC,IAAA,2CAAAO,KAAK,UACLL,QAAQ,YACRQ,SAAU,KACVC,KAAMR,KAAKf,OAAS,OAAS,WAAae,KAAKnB,OAAOsB,OAAS,QAAU,SACzEM,SAAUT,KAAKV,QACfA,QAASU,KAAKV,QACdoB,UAAW,KACTV,KAAKf,OAAS,OAASe,KAAKR,SAAWQ,KAAKnB,OAAOsB,OAASH,KAAKP,OAASO,KAAKT,QAAQoB,W","ignoreList":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const t=["default","tablet","desktop-xs","desktop-sm","desktop","desktop-lg","desktop-xl"];var s={tablet:"40rem","desktop-xs":"64rem","desktop-sm":"80rem",desktop:"85.375rem","desktop-lg":"90rem","desktop-xl":"120rem","layout-1280":"80rem","layout-1440":"90rem","layout-1536":"96rem","layout-1680":"105rem","layout-1920":"120rem","layout-2560":"160rem"};const e=t=>s[t];const o=t=>{const s=e(t);return parseInt(s.replace("rem",""),10)};const a=t=>{const s=o(t);return s*16};const r=t=>{const s=a(t);return window.innerWidth>s};const n=t=>{const s=a(t);return window.innerWidth<s};const c=(t,s)=>r(t)&&n(s);const d=()=>!!window.matchMedia("(pointer: coarse)").matches;const l=()=>d()||n("tablet");const m=()=>c("tablet","desktop-xs");const p=()=>r("desktop-xs");export{o as a,a as b,n as c,c as d,d as e,l as f,e as g,m as h,r as i,p as j,s,t};
|
|
2
|
-
//# sourceMappingURL=p-LsrP-Unv.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"p-LsrP-Unv.js","sources":["src/types/constants.ts","src/tailwind/theme/screens.ts","src/utils/screens.ts"],"sourcesContent":["import { TableColumnSizes } from './table';\n\nexport const tableColumSizesOptions = [\n\t'default',\n\t'tablet',\n\t'desktop-xs',\n\t'desktop-sm',\n\t'desktop',\n\t'desktop-lg',\n\t'desktop-xl',\n] as (keyof TableColumnSizes)[];\n","export default {\n\ttablet: '40rem', // 640 px\n\t'desktop-xs': '64rem', // 1024 px\n\t'desktop-sm': '80rem', // 1360 px\n\tdesktop: '85.375rem', // 1366\n\t'desktop-lg': '90rem', // 1440\n\t'desktop-xl': '120rem', // 1920\n\n\t// layout sizes\n\t'layout-1280': '80rem',\n\t'layout-1440': '90rem',\n\t'layout-1536': '96rem',\n\t'layout-1680': '105rem',\n\t'layout-1920': '120rem',\n\t'layout-2560': '160rem',\n};\n","import screens from '../tailwind/theme/screens';\n\nexport type ScreenSize = keyof typeof screens;\n\nexport const getScreenSize = (size: ScreenSize) => screens[size];\n\nexport const getScreenSizeInRem = (size: ScreenSize) => {\n\tconst screen = getScreenSize(size);\n\treturn parseInt(screen.replace('rem', ''), 10);\n};\n\nexport const getScreenSizeInPixels = (size: ScreenSize) => {\n\tconst rem = getScreenSizeInRem(size);\n\treturn rem * 16;\n};\n\nexport const isBiggerThanScreen = (size: ScreenSize) => {\n\tconst pixels = getScreenSizeInPixels(size);\n\treturn window.innerWidth > pixels;\n};\n\nexport const isSmallerThanScreen = (size: ScreenSize) => {\n\tconst pixels = getScreenSizeInPixels(size);\n\treturn window.innerWidth < pixels;\n};\n\nexport const isBetweenScreens = (\n\tsmallSize: ScreenSize,\n\tbigSize: ScreenSize\n) => {\n\treturn isBiggerThanScreen(smallSize) && isSmallerThanScreen(bigSize);\n};\n\nexport const isTouchDevice = () =>\n\t!!window.matchMedia('(pointer: coarse)').matches;\nexport const isMobile = () => isTouchDevice() || isSmallerThanScreen('tablet');\nexport const isTablet = () => isBetweenScreens('tablet', 'desktop-xs');\nexport const isDesktop = () => isBiggerThanScreen('desktop-xs');\n"],"names":[],"mappings":"AAEa,MAAA,sBAAsB,GAAG;IACrC,SAAS;IACT,QAAQ;IACR,YAAY;IACZ,YAAY;IACZ,SAAS;IACT,YAAY;IACZ,YAAY;;;ACTb,cAAe;IACd,MAAM,EAAE,OAAO;IACf,YAAY,EAAE,OAAO;IACrB,YAAY,EAAE,OAAO;IACrB,OAAO,EAAE,WAAW;IACpB,YAAY,EAAE,OAAO;IACrB,YAAY,EAAE,QAAQ;;AAGtB,IAAA,aAAa,EAAE,OAAO;AACtB,IAAA,aAAa,EAAE,OAAO;AACtB,IAAA,aAAa,EAAE,OAAO;AACtB,IAAA,aAAa,EAAE,QAAQ;AACvB,IAAA,aAAa,EAAE,QAAQ;AACvB,IAAA,aAAa,EAAE,QAAQ;CACvB;;ACXM,MAAM,aAAa,GAAG,CAAC,IAAgB,KAAK,OAAO,CAAC,IAAI;AAElD,MAAA,kBAAkB,GAAG,CAAC,IAAgB,KAAI;AACtD,IAAA,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,CAAC;AAClC,IAAA,OAAO,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;AAC/C;AAEa,MAAA,qBAAqB,GAAG,CAAC,IAAgB,KAAI;AACzD,IAAA,MAAM,GAAG,GAAG,kBAAkB,CAAC,IAAI,CAAC;IACpC,OAAO,GAAG,GAAG,EAAE;AAChB;AAEa,MAAA,kBAAkB,GAAG,CAAC,IAAgB,KAAI;AACtD,IAAA,MAAM,MAAM,GAAG,qBAAqB,CAAC,IAAI,CAAC;AAC1C,IAAA,OAAO,MAAM,CAAC,UAAU,GAAG,MAAM;AAClC;AAEa,MAAA,mBAAmB,GAAG,CAAC,IAAgB,KAAI;AACvD,IAAA,MAAM,MAAM,GAAG,qBAAqB,CAAC,IAAI,CAAC;AAC1C,IAAA,OAAO,MAAM,CAAC,UAAU,GAAG,MAAM;AAClC;MAEa,gBAAgB,GAAG,CAC/B,SAAqB,EACrB,OAAmB,KAChB;IACH,OAAO,kBAAkB,CAAC,SAAS,CAAC,IAAI,mBAAmB,CAAC,OAAO,CAAC;AACrE;AAEa,MAAA,aAAa,GAAG,MAC5B,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;AACnC,MAAM,QAAQ,GAAG,MAAM,aAAa,EAAE,IAAI,mBAAmB,CAAC,QAAQ;AACtE,MAAM,QAAQ,GAAG,MAAM,gBAAgB,CAAC,QAAQ,EAAE,YAAY;AACxD,MAAA,SAAS,GAAG,MAAM,kBAAkB,CAAC,YAAY;;;;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,g as i,h as s,H as n}from"./p-DhGo7hbh.js";import{f as o,t as a}from"./p-LsrP-Unv.js";import{f as r,g as h}from"./p-DiJj8rmO.js";import{f as l}from"./p-C0cmbLHm.js";import{c}from"./p-CT54OXR2.js";import{d as u,a as f}from"./p-DOp5eUxu.js";import"./p-CBWjHURv.js";import"./p-ChV9xqsO.js";const d="*{box-sizing:border-box}.static{position:static!important}.fixed{position:fixed!important}.z-0{z-index:0!important}.my-16{margin-bottom:4rem!important;margin-top:4rem!important}.mb-8{margin-bottom:2rem!important}.flex{display:flex!important}.table{display:table!important}.hidden{display:none!important}.h-6{height:1.5rem!important}.w-6{width:1.5rem!important}.flex-1{flex:1 1 0%!important}.flex-shrink-0{flex-shrink:0!important}.resize{resize:both!important}.flex-col{flex-direction:column!important}.self-center{align-self:center!important}.rounded{border-radius:.25rem!important}.opacity-0{opacity:0!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}";const p=class{constructor(i){t(this,i);this.selectedRowsChange=e(this,"selectedRowsChange",3);this.rowClick=e(this,"rowClick",3);this.rowSelected=e(this,"rowSelected",3);this.rowDeselected=e(this,"rowDeselected",3);this.hasRendered=e(this,"hasRendered",3);this.quickFilter=e(this,"quickFilter",3);this.queryChange=e(this,"queryChange",3);this.filter=e(this,"filter",3);this.action=e(this,"action",3);this.pageChange=e(this,"pageChange",3);this.pageSizeChange=e(this,"pageSizeChange",3);this.export=e(this,"export",3);this.emptyStateActionClick=e(this,"emptyStateActionClick",3)}items;loading=false;headerLoading=false;footerLoading=false;amountOfLoadingRows=6;enableRowSelection=true;rowSelectionLimit;enableRowClick=true;selectedRows=[];enableFloatingMenu=true;floatingMenuAmountSelectedTemplate=t=>r((t===1?this._locales.floating_menu?.amount_selected:this._locales.floating_menu?.amount_selected_plural)?.replace("{{amount}}",t));selectedRowsChange;selectionKey;canSelectKey;rowClick;rowSelected;rowDeselected;hasRendered;enableHeader=true;quickFilters=[];activeQuickFilterIdentifier;enableSearch=true;query;enableFilter=true;enableFilterDesktop=true;selectedFiltersAmount;filterButtonTemplate;enableAction=false;actionButtonLoading=false;actionButtonEnabled=false;actionButtonIcon="pencil";actionButtonText;actionButtonTemplate;quickFilter;queryChange;filter;action;enableFooter=true;enablePaginationSize=true;enablePaginationPages=true;enableExport=true;page=1;total;pageChange;pageSize=u;pageSizeOptions=f;pageSizeChange;export;hideOnSinglePage=true;emptyStateHeader=()=>r(this._locales.empty_state?.no_filter.header);emptyStateContent=()=>r(this._locales.empty_state?.no_filter.content);emptyStateAction=()=>r(this._locales.empty_state?.no_filter.action);enableEmptyStateAction=true;emptyStateFilteredHeader=()=>r(this._locales.empty_state.filtered.header);emptyStateFilteredContent=()=>r(this._locales.empty_state.filtered.content);emptyStateActionClick;shadow=true;get _el(){return i(this)}_locales={};_columns=[];_items=[];_enableRowSelection=this.enableRowSelection;_rowSelectionLimit;_rowActionsFloatingAll=[];_rowActionsFloating=[];_rowActionsRow=[];_footerHidden=false;_ctrlDown=false;_hasCustomFilterSlot=false;_hasCustomActionsSlot=false;_floatingMenuShown=false;_resizeTimeout;componentWillLoad(){this._hasCustomFilterSlot=!!this._el.querySelector(':scope > [slot="custom-filter"]');this._hasCustomActionsSlot=!!this._el.querySelector(':scope > [slot="custom-actions"]');this._setRowSelectionData();this._setLocales();this._parseItems(this.items);this._generateColumns()}componentDidRender(){this.hasRendered.emit()}render(){return s(n,{key:"aff2178e8b10a013ad81a1531e0f8328d0a450f8",class:"z-0 flex flex-col"},s("p-table-container",{key:"964e4a949fbd872c56896182256297cfba9282e3"},this.enableHeader&&s("p-table-header",{key:"38dabb784a7bd800e5bda13ee20e2a39301d6101",class:"mb-8",quickFilters:this.quickFilters,activeQuickFilterIdentifier:this.activeQuickFilterIdentifier,onQuickFilter:({detail:t})=>this.quickFilter.emit(t),enableSearch:this.enableSearch,query:this.query,onQueryChange:({detail:t})=>this.queryChange.emit(t),enableFilter:this.enableFilter,enableFilterDesktop:this.enableFilterDesktop,selectedFiltersAmount:this.selectedFiltersAmount,filterButtonTemplate:this.filterButtonTemplate,onFilter:()=>this.filter.emit(),enableAction:this.enableAction,actionIcon:this.actionButtonIcon,actionText:this.actionButtonText,actionLoading:this.actionButtonLoading,canUseAction:this.actionButtonEnabled,actionButtonTemplate:this.actionButtonTemplate,onAction:()=>this.action.emit(),itemsSelectedAmount:this.selectedRows?.length,enableExport:this.enableExport,onExport:()=>this.export.emit(),loading:this.headerLoading},this._hasCustomFilterSlot&&s("slot",{key:"103f6b3de27b2701d1db6cc8893eb30e5be6b982",name:"custom-filter",slot:"custom-filter"}),this._hasCustomActionsSlot&&s("slot",{key:"12f0a5e6f9616366994a5b4e0723b2bd8de85597",name:"custom-actions",slot:"custom-actions"})),this._getHeader(),s("div",{key:"a611b876f701edfaf6edcc2ccb3e86190a017252",class:"flex flex-1 flex-col"},this._getRows()),this.enableFloatingMenu&&this._enableRowSelection?s("p-floating-menu-container",{usedInTable:true,class:l({hasFooter:this.enableFooter&&!this._footerHidden,active:!!this.selectedRows?.length,shown:this._floatingMenuShown}),amountSelectedTemplate:this.floatingMenuAmountSelectedTemplate,amount:this.selectedRows?.length,enableAmountSelected:!!this._rowActionsFloating?.length,onClose:()=>this._selectAllChange(null,false)},this._rowActionsFloating?.length&&this._rowActionsFloating.map((t=>s("p-floating-menu-item",{slot:"floating-menu-item",disabled:t.disabled,loading:t.loading,icon:t.icon,iconRotate:t.iconRotate,iconFlip:t.iconFlip,onClick:()=>!t.disabled&&!t.loading&&!!t.action&&t.type==="single"?t.action(this.selectedRows[0],false):t.action(this.selectedRows,true)},t.label)))):"",this.enableFooter&&s("p-table-footer",{key:"b9a6f34b4a447bcd60905d42db1583cb47806361",hideOnSinglePage:this.hideOnSinglePage,enablePaginationSize:this.enablePaginationSize,pageSize:this.pageSize,pageSizeOptions:this.pageSizeOptions,onPageSizeChange:({detail:t})=>this.pageSizeChange.emit(t),enablePaginationPages:this.enablePaginationPages,page:this.page,total:this.total,onPageChange:({detail:t})=>this.pageChange.emit(t),loading:this.footerLoading,onHiddenChange:({detail:t})=>this._footerHidden=t})))}async _setLocales(){this._locales=await h(this._el)}onTableDefinitionUpdated(){this._generateColumns()}keyDown({key:t}){if(t!=="Control"||this._ctrlDown===true){return}this._ctrlDown=true}keyUp({key:t}){if(t!=="Control"||this._ctrlDown===false){return}this._ctrlDown=false}visibilityChange(){if(document.visibilityState!=="hidden"||this._ctrlDown===false){return}this._ctrlDown=false}_parseItems(t){if(!t){this._items=[];return}if(Array.isArray(t)){this._items=t;return}this._items=JSON.parse(t)}_setRowSelectionData(){if(this._resizeTimeout){clearTimeout(this._resizeTimeout)}this._resizeTimeout=setTimeout((()=>{const t=o();const e=Array.from(this._el.querySelectorAll(":scope > p-table-row-action"));this._rowActionsRow=e.filter((t=>t.type==="both"||t.type==="single"));this._rowActionsFloatingAll=e.filter((e=>this.enableRowSelection&&(e.type==="both"||e.type==="multi")||t&&e.type==="single")).map((t=>{if(t.type==="single"){t.disabled=this.selectedRows?.length>1}return t}));let i=this.rowSelectionLimit;if(t&&this._rowActionsFloatingAll?.length&&(i!==undefined&&this.enableRowSelection||!this.enableRowSelection)){i=1}this._rowSelectionLimit=i;let s=this.enableRowSelection;if(t&&this._rowActionsFloatingAll?.length&&!s){s=true}this._enableRowSelection=s;if(this._floatingMenuShown){this._showFloatingMenu()}}),200)}_generateColumns(){const t=this._el.querySelectorAll("p-table-column");let e=Array.from(t);e=this._parseDefinitions(e);this._columns=e}_getHeader(){return s("p-table-row",{variant:"header"},this._columns.map(((t,e)=>s("p-table-cell",{definition:t,value:t.name,variant:"header",checkbox:e===0||t.hasCheckbox?this._getCheckbox(null,this.loading?"loading":"header"):null,index:e}))))}_getRows(){if(this.loading){return Array.from({length:this.amountOfLoadingRows},((t,e)=>s("p-table-row",{enableHover:this._enableRowSelection||this.enableRowClick},this._getLoadingColumns(e))))}if(!this._items.length){return this._getEmptyState()}return this._items.map(((t,e)=>s("p-table-row",{enableHover:this._enableRowSelection||this.enableRowClick,onClick:t=>this._rowClick(t,e)},this._getRowColumns(t,e),this._getActions(t))))}_getActions(t){const e=this._rowActionsRow.filter((e=>e.showFunction?e.showFunction(t):true));if(e?.length&&!o()){return s("p-table-row-actions-container",{slot:"actions"},e.map((e=>s("p-tooltip",{strategy:"fixed",content:e.label},s("p-button",{"data-is-action":true,variant:"secondary",slot:"trigger",icon:e.icon,iconRotate:e.iconRotate,iconFlip:e.iconFlip,iconOnly:true,size:"sm",onClick:()=>typeof e.action==="function"&&e.action?.(t,false)})))))}return null}_getRowColumns(t,e){return this._columns.map(((i,n)=>s("p-table-cell",{definition:i,item:t,checkbox:n===0||i.hasCheckbox?this._getCheckbox(e):null,index:n,rowIndex:e})))}_getLoadingColumns(t){return this._columns.map(((e,i)=>s("p-table-cell",{definition:e,variant:"loading",checkbox:i===0||e.hasCheckbox?this._getCheckbox(t,"loading"):null,index:i,rowIndex:t})))}_getCheckbox(t,e="default"){if(!this._enableRowSelection||!this.selectionKey&&!this._rowActionsFloating?.length){return}if(e==="loading"){return s("p-loader",{variant:"ghost",class:"h-6 w-6 rounded"})}if(e==="header"){return s("p-checkbox",{class:c({"opacity-0":this._rowSelectionLimit!==undefined}),checked:this._selectionContainsAll(),indeterminate:this._selectionIndeterminate(),disabled:this._rowSelectionLimit!==undefined,onCheckedChange:t=>this._selectAllChange(t)})}const i=this._items[t];const n=this._selectionContains(t);return s("p-checkbox",{class:"flex-shrink-0",disabled:this.canSelectKey&&!i[this.canSelectKey]||this._rowSelectionLimit!==undefined&&!n&&this.selectedRows.length===this._rowSelectionLimit,checked:n,onCheckedChange:e=>this._checkboxChange(e,t)})}_getEmptyState(){if(this.query?.length||this.selectedFiltersAmount){return s("p-empty-state",{class:"my-16 self-center",illustration:"search",header:this.emptyStateFilteredHeader(),content:this.emptyStateFilteredContent()})}return s("p-empty-state",{class:"my-16 self-center",illustration:"table",header:this.emptyStateHeader(),content:this.emptyStateContent(),enableAction:this.enableEmptyStateAction,actionIcon:"plus",actionText:this.emptyStateAction()})}_selectAllChange(t,e){if(!this._enableRowSelection){return}const i=t?.detail??e??false;const s=e===undefined?i:e;if(s){const t=[];for(let e=0;e<this._items.length;e++){const i=this._items[e];if(this.canSelectKey&&!i[this.canSelectKey]){continue}if(this._selectionContains(e)){continue}t.push(i);this.rowSelected.emit(i);if(this._rowSelectionLimit!==undefined&&this.selectedRows.length+t.length===this._rowSelectionLimit){break}}this.selectedRows=[...this.selectedRows,...t];this.selectedRowsChange.emit(this.selectedRows);if(this.enableFloatingMenu&&!this._floatingMenuShown){this._showFloatingMenu()}return}for(let t=0;t<this.selectedRows.length;t++){const e=this.selectedRows[t];const i=this._items.find((i=>this._getSelectionValue(i,t)===this._getSelectionValue(e,t)));if(!i){continue}this.rowDeselected.emit(i)}this.selectedRows=[];this.selectedRowsChange.emit(this.selectedRows)}_checkboxChange({detail:t,target:e},i){if(!this._enableRowSelection){return}if(t&&this._rowSelectionLimit!==undefined&&this.selectedRows.length>=this._rowSelectionLimit){e.checked=false;return}const s=this._items[i];if(this.canSelectKey&&!s[this.canSelectKey]){e.checked=false;return}if(t){this.selectedRows=[...this.selectedRows,{...s,index:i}];this.selectedRowsChange.emit(this.selectedRows);this.rowSelected.emit(s);if(this.enableFloatingMenu&&!this._floatingMenuShown){this._showFloatingMenu()}return}const n=this._selectionContains(i,true);const o=[...this.selectedRows];o.splice(n,1);this.selectedRows=o;this.selectedRowsChange.emit(this.selectedRows);this.rowDeselected.emit(s)}_getSelectionValue(t,e){return this.selectionKey?t?.[this.selectionKey]||e:e}_selectionContains(t,e=false){const i=this.selectedRows.findIndex((e=>e.index===t));return!e?i>=0:i}_selectionContainsAll(){let t=true;if(!this._items?.length){return false}if(this._rowSelectionLimit!==undefined&&this.selectedRows.length===this._rowSelectionLimit){return true}for(let e=0;e<this._items?.length;e++){const i=this._selectionContains(e);if(!i){t=false;break}}return t}_selectionIndeterminate(){if(!this._items?.length||!this.selectedRows?.length){return false}if(this._rowSelectionLimit!==undefined&&this.selectedRows.length===this._rowSelectionLimit){return false}let t=0;for(let e=0;e<this._items?.length;e++){const i=this._selectionContains(e);if(i){t++}}return t>0&&t!==this._items.length}_rowClick(t,e){const i=t.target;if(i.tagName.toLowerCase()==="input"||i.type==="checkbox"){return}const s=this._findRow(t.target);const n=this._findRowAction(t.target);if(n){return}if(this.enableRowClick){const t=this._items[e];this.rowClick.emit({item:t,ctrlDown:this._ctrlDown});return}if(!this._enableRowSelection){return}const o=s?.querySelector('input[type="checkbox"]');if(!o){return}o.checked=!o.checked;this._checkboxChange(o,e)}_findRow(t){if(!t){return t}if(t?.tagName?.toLowerCase()==="p-table-row"){return t}return this._findRow(t?.parentElement)}_findRowAction(t){if(!t){return null}if(t.getAttribute("data-is-action")!==null&&t.getAttribute("data-is-action")!=="false"){return t}if(t?.tagName?.toLowerCase()==="p-table-row"){return null}return this._findRowAction(t?.parentElement)}_showFloatingMenu(){let t=this._rowActionsFloatingAll;if(this.rowSelectionLimit===1&&t.findIndex((t=>(t.type==="single"||t.type==="both")&&t.showFunction))>=0){t=t.filter((t=>t.type==="multi"||!t.showFunction||t.showFunction(this.selectedRows[0])))}this._rowActionsFloating=t;this._floatingMenuShown=true}_parseDefinitions(t){return t.map((t=>{t=this._parseDefinitionSizes(t);return t}))}_parseDefinitionSizes(t){const e=t;let i={default:"full"};if(typeof t.sizes==="string"&&!["auto","hidden","full"].includes(t.sizes)){t.sizes=JSON.parse(t.sizes)}for(const[t,s]of a.entries()){if(e.sizes==="auto"||e.sizes==="hidden"||e.sizes==="full"||typeof e.sizes==="number"){i[s]=e.sizes==="auto"?"full":e.sizes;continue}i[s]=e.sizes[s]??i[a[t-1]]}t.parsedSizes=i;return t}static get watchers(){return{items:["_parseItems"],enableRowSelection:["_setRowSelectionData"],rowSelectionLimit:["_setRowSelectionData"],selectedRows:["_setRowSelectionData"]}}};p.style=d;export{p as p_table};
|
|
2
|
-
//# sourceMappingURL=p-e9db1b2d.entry.js.map
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|