inviton-powerduck 0.0.171 → 0.0.173

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,5 +1,6 @@
1
1
  import type { Temporal } from '@js-temporal/polyfill';
2
2
  import type { IWebApiClient, WebClientApiMethod } from '../../common/IWebClient';
3
+ import type { DropdownButtonItemArgs } from '../dropdown-button/dropdown-button-item';
3
4
  import type { DaterangeChangedArgs } from '../input/daterange-picker';
4
5
  import type { ColFilterModalShowResponse } from './filter-modal';
5
6
  import Mark from 'mark.js';
@@ -75,7 +76,7 @@ interface DataTableArgs {
75
76
  sortComplete?: (args: DataTableOnSortedArgs) => void;
76
77
  mobileModeRowIcon?: string;
77
78
  mobileModeShouldAutoCollapse?: boolean;
78
- massOperationOptions?: typeof DropdownButtonItem.prototype[];
79
+ massOperationOptions?: MassOperationItem[];
79
80
  handleInitialFilter?: boolean;
80
81
  timezoneGmtOffset?: number;
81
82
  timezoneDstOffset?: number;
@@ -98,6 +99,10 @@ export interface DataTablePostBackData {
98
99
  Sort: DataTableSortDefinition;
99
100
  }
100
101
 
102
+ export interface MassOperationItem extends DropdownButtonItemArgs {
103
+
104
+ }
105
+
101
106
  interface DataTableFilterDefinition {
102
107
  FullText: string;
103
108
  FilterItems: DataTablePostBackFilterItem[];
@@ -413,7 +418,7 @@ class DataTableComponent extends TsxComponent<DataTableArgs> implements DataTabl
413
418
  @Prop() mobileModeRowIcon!: string;
414
419
  @Prop() mobileModeShouldAutoCollapse!: boolean;
415
420
  @Prop() handleInitialFilter!: boolean;
416
- @Prop() massOperationOptions!: typeof DropdownButtonItem.prototype[];
421
+ @Prop() massOperationOptions!: MassOperationItem[];
417
422
  @Prop() checkboxesVisible!: boolean;
418
423
  @Prop() checkboxesTitle!: string;
419
424
  @Prop() checkboxButtonsVisible!: boolean;
@@ -1884,7 +1889,7 @@ class DataTableComponent extends TsxComponent<DataTableArgs> implements DataTabl
1884
1889
  return null;
1885
1890
  }
1886
1891
 
1887
- getMassOperationItems(): typeof DropdownButtonItem.prototype[] {
1892
+ getMassOperationItems(): MassOperationItem[] {
1888
1893
  return this.massOperationOptions || [];
1889
1894
  }
1890
1895
 
@@ -2051,7 +2056,21 @@ class DataTableComponent extends TsxComponent<DataTableArgs> implements DataTabl
2051
2056
  <div class="dt-pagination-length dt-massop-btn-wrap">
2052
2057
  <DropdownButton text="Hromadne operacie" layout={ButtonLayout.Secondary}>
2053
2058
  {this.getMassOperationItems().map(mi =>
2054
- (mi as any).isSeparator != true ? <DropdownButtonItem icon={mi.icon} text={mi.text} clicked={mi.clicked} /> : <div class="dropdown-divider" />)}
2059
+ (mi as any).isSeparator != true
2060
+ ? (
2061
+ <DropdownButtonItem
2062
+ icon={mi.icon}
2063
+ img={mi.img}
2064
+ text={mi.text}
2065
+ href={mi.href}
2066
+ disabled={mi.disabled}
2067
+ hrefBlank={mi.hrefBlank}
2068
+ clicked={mi.clicked}
2069
+ isSelected={mi.isSelected}
2070
+ emptySpace={mi.emptySpace}
2071
+ />
2072
+ )
2073
+ : <div class="dropdown-divider" />)}
2055
2074
 
2056
2075
  <DropdownButtonItem icon="icon icon-close" text={PowerduckState.getResourceValue('cancel')} clicked={() => this.toggleCheckboxes(false)} />
2057
2076
  </DropdownButton>
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable */
2
- import { globalState } from '@powerduck/app/global-state';
2
+ import { globalState } from '../../../app/global-state';
3
3
  import PowerduckState from '../../../app/powerduck-state';
4
4
  import { PortalUtils } from '../../../common/utils/utils';
5
5
 
@@ -32,6 +32,7 @@ export interface DaterangePickerArgsCustomCellRenderDay {
32
32
  }
33
33
 
34
34
  interface DaterangePickerArgs extends FormItemWrapperArgs {
35
+ disabled?: boolean;
35
36
  value?: DaterangeChangedArgs;
36
37
  placeholder?: string;
37
38
  format?: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "inviton-powerduck",
3
3
  "type": "module",
4
- "version": "0.0.171",
4
+ "version": "0.0.173",
5
5
  "files": [
6
6
  "app/",
7
7
  "common/",