@paperless/core 3.24.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.
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.24.0",
3
+ "version": "3.25.0",
4
4
  "description": "Stencil Component Starter",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs.js",