inviton-powerduck 0.0.205 → 0.0.207

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,3 +1,6 @@
1
+ /* eslint-disable node/handle-callback-err */
2
+ /* eslint-disable no-new */
3
+ /* eslint-disable ts/no-this-alias */
1
4
  import type { Temporal } from '@js-temporal/polyfill';
2
5
  import type { IWebApiClient, WebClientApiMethod } from '../../common/IWebClient';
3
6
  import type { DropdownButtonItemArgs } from '../dropdown-button/dropdown-button-item';
@@ -35,6 +38,7 @@ import ColVisModal from './col-vis-modal';
35
38
  import TableExportModal from './export-excel-modal';
36
39
  import ColFilterModal from './filter-modal';
37
40
  import loadingGif from './img/loading_16_16.gif';
41
+ import { DataTableConfig } from './ts/datatable-config';
38
42
  import ReorderProvider from './ts/reorder';
39
43
  import './css/datatable.css';
40
44
 
@@ -348,10 +352,6 @@ export class DataTableFilterItemCollection extends Array<DataTableFilterItem> {
348
352
  }
349
353
  }
350
354
 
351
- export class DataTableConfig {
352
- static filterMarking = true;
353
- }
354
-
355
355
  @Component
356
356
  class TableButtonComponent extends TsxComponent<TableButton> implements TableButton {
357
357
  @Prop() title!: string;
@@ -542,7 +542,6 @@ class DataTableComponent extends TsxComponent<DataTableArgs> implements DataTabl
542
542
 
543
543
  if (!this.initialized && !this.initDataLoaded) {
544
544
  this.initDataLoaded = true;
545
- const self = this;
546
545
  this.reloadDataPromise().then(() => {
547
546
  setTimeout(() => {
548
547
  this.initialized = true;
@@ -1813,7 +1812,7 @@ class DataTableComponent extends TsxComponent<DataTableArgs> implements DataTabl
1813
1812
  }
1814
1813
 
1815
1814
  getMobileBehavior(): DataTableMobileBehavior {
1816
- return this.currentMobileBehavior || DataTableMobileBehavior.MobileLayout;
1815
+ return this.currentMobileBehavior ?? DataTableConfig.defaultMobileBehavior;
1817
1816
  }
1818
1817
 
1819
1818
  getVisibleColumns(): TableColumn[] {
@@ -0,0 +1,4 @@
1
+ export class DataTableConfig {
2
+ static filterMarking = true;
3
+ static defaultMobileBehavior: 'mobile' | 'compact' | 'vertical' = 'mobile';
4
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "inviton-powerduck",
3
3
  "type": "module",
4
- "version": "0.0.205",
4
+ "version": "0.0.207",
5
5
  "files": [
6
6
  "app/",
7
7
  "common/",