@paperless/core 1.42.5 → 1.44.0

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.
Files changed (96) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/build/index.esm.js +1 -1
  3. package/dist/build/index.esm.js.map +1 -1
  4. package/dist/build/p-15f63841.js +2 -0
  5. package/dist/build/p-15f63841.js.map +1 -0
  6. package/dist/build/p-cc1dbf8c.entry.js +2 -0
  7. package/dist/build/p-cc1dbf8c.entry.js.map +1 -0
  8. package/dist/build/{p-1079ffc6.entry.js → p-e7826192.entry.js} +2 -2
  9. package/dist/build/p-e7826192.entry.js.map +1 -0
  10. package/dist/build/p-f9cb528d.entry.js +2 -0
  11. package/dist/build/p-f9cb528d.entry.js.map +1 -0
  12. package/dist/build/paperless.esm.js +1 -1
  13. package/dist/build/paperless.esm.js.map +1 -1
  14. package/dist/cjs/index-1fde8b14.js +4 -0
  15. package/dist/cjs/index.cjs.js +12 -52
  16. package/dist/cjs/index.cjs.js.map +1 -1
  17. package/dist/cjs/loader.cjs.js +1 -1
  18. package/dist/cjs/p-floating-menu-container_8.cjs.entry.js +21 -8
  19. package/dist/cjs/p-floating-menu-container_8.cjs.entry.js.map +1 -1
  20. package/dist/cjs/p-table-row-action.cjs.entry.js +27 -0
  21. package/dist/cjs/p-table-row-action.cjs.entry.js.map +1 -0
  22. package/dist/cjs/p-table.cjs.entry.js +101 -38
  23. package/dist/cjs/p-table.cjs.entry.js.map +1 -1
  24. package/dist/cjs/paperless.cjs.js +1 -1
  25. package/dist/cjs/screens-84f01214.js +56 -0
  26. package/dist/cjs/screens-84f01214.js.map +1 -0
  27. package/dist/collection/collection-manifest.json +1 -0
  28. package/dist/collection/components/atoms/floating-menu-item/floating-menu-item.component.css +1 -1
  29. package/dist/collection/components/atoms/floating-menu-item/floating-menu-item.component.js +19 -0
  30. package/dist/collection/components/atoms/floating-menu-item/floating-menu-item.component.js.map +1 -1
  31. package/dist/collection/components/helpers/table-row-action/table-row-action.component.js +201 -0
  32. package/dist/collection/components/helpers/table-row-action/table-row-action.component.js.map +1 -0
  33. package/dist/collection/components/molecules/table-cell/table-cell.component.css +1 -1
  34. package/dist/collection/components/molecules/table-cell/table-cell.component.js +37 -7
  35. package/dist/collection/components/molecules/table-cell/table-cell.component.js.map +1 -1
  36. package/dist/collection/components/molecules/table-row/table-row.component.js +1 -1
  37. package/dist/collection/components/molecules/table-row/table-row.component.js.map +1 -1
  38. package/dist/collection/components/organisms/table/table.component.css +1 -1
  39. package/dist/collection/components/organisms/table/table.component.js +116 -38
  40. package/dist/collection/components/organisms/table/table.component.js.map +1 -1
  41. package/dist/components/floating-menu-item.component.js +4 -2
  42. package/dist/components/floating-menu-item.component.js.map +1 -1
  43. package/dist/components/index.js +3 -42
  44. package/dist/components/index.js.map +1 -1
  45. package/dist/components/p-table-row-action.d.ts +11 -0
  46. package/dist/components/p-table-row-action.js +50 -0
  47. package/dist/components/p-table-row-action.js.map +1 -0
  48. package/dist/components/p-table.js +111 -41
  49. package/dist/components/p-table.js.map +1 -1
  50. package/dist/components/screens.js +44 -0
  51. package/dist/components/screens.js.map +1 -0
  52. package/dist/components/table-cell.component.js +19 -6
  53. package/dist/components/table-cell.component.js.map +1 -1
  54. package/dist/components/table-row.component.js +1 -1
  55. package/dist/components/table-row.component.js.map +1 -1
  56. package/dist/esm/index-7b917f6b.js +4 -0
  57. package/dist/esm/index.js +3 -42
  58. package/dist/esm/index.js.map +1 -1
  59. package/dist/esm/loader.js +1 -1
  60. package/dist/esm/p-floating-menu-container_8.entry.js +21 -8
  61. package/dist/esm/p-floating-menu-container_8.entry.js.map +1 -1
  62. package/dist/esm/p-table-row-action.entry.js +23 -0
  63. package/dist/esm/p-table-row-action.entry.js.map +1 -0
  64. package/dist/esm/p-table.entry.js +101 -38
  65. package/dist/esm/p-table.entry.js.map +1 -1
  66. package/dist/esm/paperless.js +1 -1
  67. package/dist/esm/screens-64bd8af0.js +44 -0
  68. package/dist/esm/screens-64bd8af0.js.map +1 -0
  69. package/dist/index.html +1 -1
  70. package/dist/paperless/index.esm.js +1 -1
  71. package/dist/paperless/index.esm.js.map +1 -1
  72. package/dist/paperless/p-15f63841.js +2 -0
  73. package/dist/paperless/p-15f63841.js.map +1 -0
  74. package/dist/paperless/p-cc1dbf8c.entry.js +2 -0
  75. package/dist/paperless/p-cc1dbf8c.entry.js.map +1 -0
  76. package/dist/paperless/{p-1079ffc6.entry.js → p-e7826192.entry.js} +2 -2
  77. package/dist/paperless/p-e7826192.entry.js.map +1 -0
  78. package/dist/paperless/p-f9cb528d.entry.js +2 -0
  79. package/dist/paperless/p-f9cb528d.entry.js.map +1 -0
  80. package/dist/paperless/paperless.esm.js +1 -1
  81. package/dist/paperless/paperless.esm.js.map +1 -1
  82. package/dist/sw.js +1 -1
  83. package/dist/sw.js.map +1 -1
  84. package/dist/types/components/atoms/floating-menu-item/floating-menu-item.component.d.ts +4 -0
  85. package/dist/types/components/helpers/table-row-action/table-row-action.component.d.ts +47 -0
  86. package/dist/types/components/molecules/table-cell/table-cell.component.d.ts +6 -1
  87. package/dist/types/components/organisms/table/table.component.d.ts +6 -1
  88. package/dist/types/components.d.ts +107 -4
  89. package/hydrate/index.js +200 -50
  90. package/package.json +1 -1
  91. package/dist/build/p-1079ffc6.entry.js.map +0 -1
  92. package/dist/build/p-a9ebacc8.entry.js +0 -2
  93. package/dist/build/p-a9ebacc8.entry.js.map +0 -1
  94. package/dist/paperless/p-1079ffc6.entry.js.map +0 -1
  95. package/dist/paperless/p-a9ebacc8.entry.js +0 -2
  96. package/dist/paperless/p-a9ebacc8.entry.js.map +0 -1
@@ -0,0 +1,47 @@
1
+ import { IconFlipOptions, IconVariant, RotateOptions } from '../../../components';
2
+ export type TableRowActionFunc = {
3
+ (item: any, multi: false): void;
4
+ (item: any[], multi: true): void;
5
+ };
6
+ export declare class TableRowAction {
7
+ /**
8
+ * The type of action
9
+ * mutli = Only multi select action
10
+ * single = Only an action on the row
11
+ * both = Action on both locations
12
+ */
13
+ type: 'both' | 'single' | 'multi';
14
+ /**
15
+ * Icon to show on the button
16
+ */
17
+ icon: IconVariant;
18
+ /**
19
+ * Wether the button is icon only
20
+ */
21
+ iconOnly: boolean;
22
+ /**
23
+ * Icon flip
24
+ */
25
+ iconFlip: IconFlipOptions;
26
+ /**
27
+ * Icon rotate
28
+ */
29
+ iconRotate: RotateOptions;
30
+ /**
31
+ * Label of the action
32
+ */
33
+ label: string;
34
+ /**
35
+ * The action to trigger when used
36
+ */
37
+ action: TableRowActionFunc;
38
+ /**
39
+ * Wether the action is disabled
40
+ */
41
+ disabled: boolean;
42
+ /**
43
+ * Wether the action is loading
44
+ */
45
+ loading: boolean;
46
+ render(): void;
47
+ }
@@ -4,7 +4,7 @@ export declare class TableCell {
4
4
  /**
5
5
  * The variant of the column
6
6
  */
7
- variant: 'default' | 'loading' | 'header';
7
+ variant: 'default' | 'loading' | 'header' | 'actions';
8
8
  /**
9
9
  * The index of the column
10
10
  */
@@ -25,6 +25,10 @@ export declare class TableCell {
25
25
  * The value of the column
26
26
  */
27
27
  value: any;
28
+ /**
29
+ * Wether the table has actions
30
+ */
31
+ tableHasActions: boolean;
28
32
  /**
29
33
  * The checkbox to show
30
34
  */
@@ -37,6 +41,7 @@ export declare class TableCell {
37
41
  value: string;
38
42
  };
39
43
  render(): any;
44
+ private _getContent;
40
45
  private _getColumnClasses;
41
46
  private _getSizes;
42
47
  }
@@ -223,10 +223,14 @@ export declare class Table {
223
223
  private _locales;
224
224
  private _columns;
225
225
  private _items;
226
+ private _enableRowSelection;
227
+ private _rowSelectionLimit;
228
+ private _rowActionsFloating;
229
+ private _rowActionsRow;
226
230
  private _ctrlDown;
227
231
  private _hasCustomFilterSlot;
228
- private _hasFloatingMenuItems;
229
232
  private _floatingMenuShown;
233
+ private _resizeTimeout;
230
234
  componentWillLoad(): void;
231
235
  componentDidRender(): void;
232
236
  render(): any;
@@ -240,6 +244,7 @@ export declare class Table {
240
244
  }): void;
241
245
  visibilityChange(): void;
242
246
  private _parseItems;
247
+ private _setRowSelectionData;
243
248
  private _generateColumns;
244
249
  private _getHeader;
245
250
  private _getRows;
@@ -15,10 +15,11 @@ import { Observable } from "rxjs";
15
15
  import { templateFunc } from "./components/molecules/page-size-select/page-size-select.component";
16
16
  import { amountSelectedTemplateFunc, templateFunc as templateFunc1 } from "./components/organisms/table/table.component";
17
17
  import { QuickFilter, RowClickEvent, TableColumnSizes } from "./types/table";
18
- import { IconVariant as IconVariant2 } from "./components";
18
+ import { IconFlipOptions as IconFlipOptions2, IconVariant as IconVariant2, RotateOptions as RotateOptions2 } from "./components";
19
19
  import { buttonTemplateFunc } from "./components/molecules/table-header/table-header.component";
20
20
  import { TableColumn } from "./components/helpers/table-column/table-column.component";
21
21
  import { buttonTemplateFunc as buttonTemplateFunc1, templateFunc as templateFunc2 } from "./components/molecules/table-header/table-header.component";
22
+ import { TableRowActionFunc } from "./components/helpers/table-row-action/table-row-action.component";
22
23
  export { IconFlipOptions, IconVariant } from "./components/atoms/icon/icon.component";
23
24
  export { RotateOptions, TextSizeOptions } from "./types/tailwind";
24
25
  export { Placement, Strategy } from "@floating-ui/dom";
@@ -29,10 +30,11 @@ export { Observable } from "rxjs";
29
30
  export { templateFunc } from "./components/molecules/page-size-select/page-size-select.component";
30
31
  export { amountSelectedTemplateFunc, templateFunc as templateFunc1 } from "./components/organisms/table/table.component";
31
32
  export { QuickFilter, RowClickEvent, TableColumnSizes } from "./types/table";
32
- export { IconVariant as IconVariant2 } from "./components";
33
+ export { IconFlipOptions as IconFlipOptions2, IconVariant as IconVariant2, RotateOptions as RotateOptions2 } from "./components";
33
34
  export { buttonTemplateFunc } from "./components/molecules/table-header/table-header.component";
34
35
  export { TableColumn } from "./components/helpers/table-column/table-column.component";
35
36
  export { buttonTemplateFunc as buttonTemplateFunc1, templateFunc as templateFunc2 } from "./components/molecules/table-header/table-header.component";
37
+ export { TableRowActionFunc } from "./components/helpers/table-row-action/table-row-action.component";
36
38
  export namespace Components {
37
39
  interface PAccordion {
38
40
  /**
@@ -502,6 +504,10 @@ export namespace Components {
502
504
  "usedInTable": boolean;
503
505
  }
504
506
  interface PFloatingMenuItem {
507
+ /**
508
+ * Wether the item is disabled
509
+ */
510
+ "disabled": boolean;
505
511
  /**
506
512
  * Wether it should have a hover effect
507
513
  */
@@ -1302,6 +1308,10 @@ export namespace Components {
1302
1308
  * The index of the row
1303
1309
  */
1304
1310
  "rowIndex": number;
1311
+ /**
1312
+ * Wether the table has actions
1313
+ */
1314
+ "tableHasActions": boolean;
1305
1315
  /**
1306
1316
  * The template to show
1307
1317
  */
@@ -1313,7 +1323,7 @@ export namespace Components {
1313
1323
  /**
1314
1324
  * The variant of the column
1315
1325
  */
1316
- "variant": 'default' | 'loading' | 'header';
1326
+ "variant": 'default' | 'loading' | 'header' | 'actions';
1317
1327
  }
1318
1328
  interface PTableColumn {
1319
1329
  /**
@@ -1466,6 +1476,44 @@ export namespace Components {
1466
1476
  */
1467
1477
  "variant": 'default' | 'header';
1468
1478
  }
1479
+ interface PTableRowAction {
1480
+ /**
1481
+ * The action to trigger when used
1482
+ */
1483
+ "action": TableRowActionFunc;
1484
+ /**
1485
+ * Wether the action is disabled
1486
+ */
1487
+ "disabled": boolean;
1488
+ /**
1489
+ * Icon to show on the button
1490
+ */
1491
+ "icon": IconVariant2;
1492
+ /**
1493
+ * Icon flip
1494
+ */
1495
+ "iconFlip": IconFlipOptions2;
1496
+ /**
1497
+ * Wether the button is icon only
1498
+ */
1499
+ "iconOnly": boolean;
1500
+ /**
1501
+ * Icon rotate
1502
+ */
1503
+ "iconRotate": RotateOptions2;
1504
+ /**
1505
+ * Label of the action
1506
+ */
1507
+ "label": string;
1508
+ /**
1509
+ * Wether the action is loading
1510
+ */
1511
+ "loading": boolean;
1512
+ /**
1513
+ * The type of action mutli = Only multi select action single = Only an action on the row both = Action on both locations
1514
+ */
1515
+ "type": 'both' | 'single' | 'multi';
1516
+ }
1469
1517
  interface PToast {
1470
1518
  /**
1471
1519
  * Icon to show on the button
@@ -1988,6 +2036,12 @@ declare global {
1988
2036
  prototype: HTMLPTableRowElement;
1989
2037
  new (): HTMLPTableRowElement;
1990
2038
  };
2039
+ interface HTMLPTableRowActionElement extends Components.PTableRowAction, HTMLStencilElement {
2040
+ }
2041
+ var HTMLPTableRowActionElement: {
2042
+ prototype: HTMLPTableRowActionElement;
2043
+ new (): HTMLPTableRowActionElement;
2044
+ };
1991
2045
  interface HTMLPToastElement extends Components.PToast, HTMLStencilElement {
1992
2046
  }
1993
2047
  var HTMLPToastElement: {
@@ -2068,6 +2122,7 @@ declare global {
2068
2122
  "p-table-footer": HTMLPTableFooterElement;
2069
2123
  "p-table-header": HTMLPTableHeaderElement;
2070
2124
  "p-table-row": HTMLPTableRowElement;
2125
+ "p-table-row-action": HTMLPTableRowActionElement;
2071
2126
  "p-toast": HTMLPToastElement;
2072
2127
  "p-toast-container": HTMLPToastContainerElement;
2073
2128
  "p-tooltip": HTMLPTooltipElement;
@@ -2593,6 +2648,10 @@ declare namespace LocalJSX {
2593
2648
  "usedInTable"?: boolean;
2594
2649
  }
2595
2650
  interface PFloatingMenuItem {
2651
+ /**
2652
+ * Wether the item is disabled
2653
+ */
2654
+ "disabled"?: boolean;
2596
2655
  /**
2597
2656
  * Wether it should have a hover effect
2598
2657
  */
@@ -3485,6 +3544,10 @@ declare namespace LocalJSX {
3485
3544
  * The index of the row
3486
3545
  */
3487
3546
  "rowIndex"?: number;
3547
+ /**
3548
+ * Wether the table has actions
3549
+ */
3550
+ "tableHasActions"?: boolean;
3488
3551
  /**
3489
3552
  * The template to show
3490
3553
  */
@@ -3496,7 +3559,7 @@ declare namespace LocalJSX {
3496
3559
  /**
3497
3560
  * The variant of the column
3498
3561
  */
3499
- "variant"?: 'default' | 'loading' | 'header';
3562
+ "variant"?: 'default' | 'loading' | 'header' | 'actions';
3500
3563
  }
3501
3564
  interface PTableColumn {
3502
3565
  /**
@@ -3681,6 +3744,44 @@ declare namespace LocalJSX {
3681
3744
  */
3682
3745
  "variant"?: 'default' | 'header';
3683
3746
  }
3747
+ interface PTableRowAction {
3748
+ /**
3749
+ * The action to trigger when used
3750
+ */
3751
+ "action"?: TableRowActionFunc;
3752
+ /**
3753
+ * Wether the action is disabled
3754
+ */
3755
+ "disabled"?: boolean;
3756
+ /**
3757
+ * Icon to show on the button
3758
+ */
3759
+ "icon"?: IconVariant2;
3760
+ /**
3761
+ * Icon flip
3762
+ */
3763
+ "iconFlip"?: IconFlipOptions2;
3764
+ /**
3765
+ * Wether the button is icon only
3766
+ */
3767
+ "iconOnly"?: boolean;
3768
+ /**
3769
+ * Icon rotate
3770
+ */
3771
+ "iconRotate"?: RotateOptions2;
3772
+ /**
3773
+ * Label of the action
3774
+ */
3775
+ "label"?: string;
3776
+ /**
3777
+ * Wether the action is loading
3778
+ */
3779
+ "loading"?: boolean;
3780
+ /**
3781
+ * The type of action mutli = Only multi select action single = Only an action on the row both = Action on both locations
3782
+ */
3783
+ "type"?: 'both' | 'single' | 'multi';
3784
+ }
3684
3785
  interface PToast {
3685
3786
  /**
3686
3787
  * Icon to show on the button
@@ -3821,6 +3922,7 @@ declare namespace LocalJSX {
3821
3922
  "p-table-footer": PTableFooter;
3822
3923
  "p-table-header": PTableHeader;
3823
3924
  "p-table-row": PTableRow;
3925
+ "p-table-row-action": PTableRowAction;
3824
3926
  "p-toast": PToast;
3825
3927
  "p-toast-container": PToastContainer;
3826
3928
  "p-tooltip": PTooltip;
@@ -3891,6 +3993,7 @@ declare module "@stencil/core" {
3891
3993
  "p-table-footer": LocalJSX.PTableFooter & JSXBase.HTMLAttributes<HTMLPTableFooterElement>;
3892
3994
  "p-table-header": LocalJSX.PTableHeader & JSXBase.HTMLAttributes<HTMLPTableHeaderElement>;
3893
3995
  "p-table-row": LocalJSX.PTableRow & JSXBase.HTMLAttributes<HTMLPTableRowElement>;
3996
+ "p-table-row-action": LocalJSX.PTableRowAction & JSXBase.HTMLAttributes<HTMLPTableRowActionElement>;
3894
3997
  "p-toast": LocalJSX.PToast & JSXBase.HTMLAttributes<HTMLPToastElement>;
3895
3998
  "p-toast-container": LocalJSX.PToastContainer & JSXBase.HTMLAttributes<HTMLPToastContainerElement>;
3896
3999
  "p-tooltip": LocalJSX.PTooltip & JSXBase.HTMLAttributes<HTMLPTooltipElement>;