@paperless/core 3.23.0 → 3.25.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.
@@ -1,9 +1,9 @@
1
1
  import { IconVariant } from '../../../types';
2
- export interface StepperStepItemObj {
2
+ export interface StepperStepItem {
3
3
  icon?: IconVariant;
4
4
  content: string;
5
- active: boolean;
6
- finished: boolean;
5
+ active?: boolean;
6
+ finished?: boolean;
7
7
  }
8
8
  export declare class Stepper {
9
9
  /**
@@ -13,7 +13,7 @@ export declare class Stepper {
13
13
  /**
14
14
  * The steps but as a property, can also be used via slot
15
15
  */
16
- steps: string | string[] | StepperStepItemObj[];
16
+ steps: string | string[] | StepperStepItem[];
17
17
  /**
18
18
  * The currently active step
19
19
  */
@@ -22,7 +22,7 @@ import { LabelVariant as LabelVariant1 } from "./components/molecules/label/labe
22
22
  import { Observable } from "rxjs";
23
23
  import { templateFunc as templateFunc2 } from "./components/molecules/pagination/pages/pagination-pages.component";
24
24
  import { templateFunc as templateFunc3 } from "./components/molecules/pagination/size/pagination-size.component";
25
- import { StepperStepItemObj } from "./components/organisms/stepper/stepper.component";
25
+ import { StepperStepItem } from "./components/organisms/stepper/stepper.component";
26
26
  import { amountSelectedTemplateFunc as amountSelectedTemplateFunc1, templateFunc as templateFunc4 } from "./components/organisms/table/table.component";
27
27
  import { QuickFilter, RowClickEvent, TableColumnSizes } from "./types/table";
28
28
  import { buttonTemplateFunc } from "./components/molecules/table/header/table-header.component";
@@ -46,7 +46,7 @@ export { LabelVariant as LabelVariant1 } from "./components/molecules/label/labe
46
46
  export { Observable } from "rxjs";
47
47
  export { templateFunc as templateFunc2 } from "./components/molecules/pagination/pages/pagination-pages.component";
48
48
  export { templateFunc as templateFunc3 } from "./components/molecules/pagination/size/pagination-size.component";
49
- export { StepperStepItemObj } from "./components/organisms/stepper/stepper.component";
49
+ export { StepperStepItem } from "./components/organisms/stepper/stepper.component";
50
50
  export { amountSelectedTemplateFunc as amountSelectedTemplateFunc1, templateFunc as templateFunc4 } from "./components/organisms/table/table.component";
51
51
  export { QuickFilter, RowClickEvent, TableColumnSizes } from "./types/table";
52
52
  export { buttonTemplateFunc } from "./components/molecules/table/header/table-header.component";
@@ -1943,7 +1943,7 @@ export namespace Components {
1943
1943
  /**
1944
1944
  * The steps but as a property, can also be used via slot
1945
1945
  */
1946
- "steps": string | string[] | StepperStepItemObj[];
1946
+ "steps": string | string[] | StepperStepItem[];
1947
1947
  /**
1948
1948
  * The variant of the item
1949
1949
  * @default 'default'
@@ -5922,7 +5922,7 @@ declare namespace LocalJSX {
5922
5922
  /**
5923
5923
  * The steps but as a property, can also be used via slot
5924
5924
  */
5925
- "steps"?: string | string[] | StepperStepItemObj[];
5925
+ "steps"?: string | string[] | StepperStepItem[];
5926
5926
  /**
5927
5927
  * The variant of the item
5928
5928
  * @default 'default'
package/hydrate/index.js CHANGED
@@ -101168,10 +101168,12 @@ class Table {
101168
101168
  if (this._items.length === 0) {
101169
101169
  return this._getEmptyState();
101170
101170
  }
101171
- return this._items.map((item, index) => (hAsync("p-table-row", { checked: this._selectionContains(index), enableHover: this._enableRowSelection || this.enableRowClick, isLast: index === this._items.length - 1, onClick: ev => this._rowClick(ev, index) }, this._getRowColumns(item, index), this._getActions(item, index))));
101171
+ return this._items.map((item, index) => {
101172
+ const actions = this._rowActionsRow.filter(a => a.showFunction ? a.showFunction(item) : true);
101173
+ return (hAsync("p-table-row", { checked: this._selectionContains(index), enableHover: this._enableRowSelection || this.enableRowClick || !!actions?.length, isLast: index === this._items.length - 1, onClick: ev => this._rowClick(ev, index) }, this._getRowColumns(item, index), this._getActions(item, index, actions)));
101174
+ });
101172
101175
  }
101173
- _getActions(item, index) {
101174
- const actions = this._rowActionsRow.filter(a => a.showFunction ? a.showFunction(item) : true);
101176
+ _getActions(item, index, actions) {
101175
101177
  if (actions?.length && !isMobile()) {
101176
101178
  return (hAsync("p-table-row-actions-container", { checked: this._selectionContains(index), slot: 'actions' }, actions.map(a => (hAsync("p-tooltip", { content: a.label, strategy: 'fixed' }, hAsync("p-button", { icon: a.icon, iconFlip: a.iconFlip, iconOnly: true, iconRotate: a.iconRotate, size: 'sm', slot: 'trigger', variant: 'secondary', "data-is-action": true, onClick: () => typeof a.action === 'function' && a.action?.(item, false) }))))));
101177
101179
  }
package/hydrate/index.mjs CHANGED
@@ -101166,10 +101166,12 @@ class Table {
101166
101166
  if (this._items.length === 0) {
101167
101167
  return this._getEmptyState();
101168
101168
  }
101169
- return this._items.map((item, index) => (hAsync("p-table-row", { checked: this._selectionContains(index), enableHover: this._enableRowSelection || this.enableRowClick, isLast: index === this._items.length - 1, onClick: ev => this._rowClick(ev, index) }, this._getRowColumns(item, index), this._getActions(item, index))));
101169
+ return this._items.map((item, index) => {
101170
+ const actions = this._rowActionsRow.filter(a => a.showFunction ? a.showFunction(item) : true);
101171
+ return (hAsync("p-table-row", { checked: this._selectionContains(index), enableHover: this._enableRowSelection || this.enableRowClick || !!actions?.length, isLast: index === this._items.length - 1, onClick: ev => this._rowClick(ev, index) }, this._getRowColumns(item, index), this._getActions(item, index, actions)));
101172
+ });
101170
101173
  }
101171
- _getActions(item, index) {
101172
- const actions = this._rowActionsRow.filter(a => a.showFunction ? a.showFunction(item) : true);
101174
+ _getActions(item, index, actions) {
101173
101175
  if (actions?.length && !isMobile()) {
101174
101176
  return (hAsync("p-table-row-actions-container", { checked: this._selectionContains(index), slot: 'actions' }, actions.map(a => (hAsync("p-tooltip", { content: a.label, strategy: 'fixed' }, hAsync("p-button", { icon: a.icon, iconFlip: a.iconFlip, iconOnly: true, iconRotate: a.iconRotate, size: 'sm', slot: 'trigger', variant: 'secondary', "data-is-action": true, onClick: () => typeof a.action === 'function' && a.action?.(item, false) }))))));
101175
101177
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paperless/core",
3
- "version": "3.23.0",
3
+ "version": "3.25.0",
4
4
  "description": "Stencil Component Starter",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs.js",