@zeedhi/common 1.43.1 → 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.
@@ -4476,6 +4476,8 @@ class Column extends Component {
4476
4476
  this.componentProps = {};
4477
4477
  /** column style property */
4478
4478
  this.style = {};
4479
+ /** Type of XLS */
4480
+ this.xlsType = '';
4479
4481
  /* Stores lookup data to prevent unnecessary requests */
4480
4482
  this.lookupData = {};
4481
4483
  /* Stores lookup data count (only to be reactive and force column update) */
@@ -4518,6 +4520,7 @@ class Column extends Component {
4518
4520
  this.loading = this.getInitValue('loading', props.loading, this.loading);
4519
4521
  this.style = this.getInitValue('style', props.style, this.style);
4520
4522
  this.componentProps = this.getInitValue('componentProps', props.componentProps, this.componentProps);
4523
+ this.xlsType = this.getInitValue('xlsType', props.xlsType, this.xlsType);
4521
4524
  this.conditions = this.getInitValue('conditions', props.conditions, this.conditions);
4522
4525
  this.createConditions();
4523
4526
  this.createActionConditions();
@@ -7392,6 +7395,8 @@ class Menu extends ComponentRender {
7392
7395
  this.filteredMenuItems = [];
7393
7396
  /** Search value */
7394
7397
  this.searchValue = '';
7398
+ /** Store the current item focused */
7399
+ this.currentItem = null;
7395
7400
  this.app = this.getInitValue('app', props.app, this.app);
7396
7401
  this.clipped = this.getInitValue('clipped', props.clipped, this.clipped);
7397
7402
  this.fixed = this.getInitValue('fixed', props.fixed, this.fixed);
@@ -7671,6 +7676,15 @@ class MenuLink extends ComponentRender {
7671
7676
  if (preventDefault) {
7672
7677
  event.preventDefault();
7673
7678
  }
7679
+ this.setFocus();
7680
+ }
7681
+ /**
7682
+ * Event triggered when this item is focus
7683
+ */
7684
+ focus() {
7685
+ if (this.parentMenu) {
7686
+ this.parentMenu.currentItem = this;
7687
+ }
7674
7688
  }
7675
7689
  /**
7676
7690
  * @returns item is selected or not
@@ -7738,6 +7752,26 @@ class MenuGroup extends ComponentRender {
7738
7752
  close() {
7739
7753
  this.opened = false;
7740
7754
  }
7755
+ /**
7756
+ * Event triggered when this item is clicked
7757
+ */
7758
+ click(event) {
7759
+ let preventDefault = false;
7760
+ preventDefault = this.callEvent('click', { event, component: this });
7761
+ if (preventDefault) {
7762
+ event.preventDefault();
7763
+ }
7764
+ this.setFocus();
7765
+ }
7766
+ /**
7767
+ * Event triggered when this item is focus
7768
+ */
7769
+ focus(event) {
7770
+ this.callEvent('focus', { event, component: this });
7771
+ if (this.parentMenu) {
7772
+ this.parentMenu.currentItem = this;
7773
+ }
7774
+ }
7741
7775
  }
7742
7776
 
7743
7777
  /**
@@ -7815,10 +7849,20 @@ class Modal extends Component {
7815
7849
  * If true the modal won't close when overlay is clicked
7816
7850
  */
7817
7851
  this.persistent = false;
7852
+ /**
7853
+ * Allows modal to be dragged around in the screen
7854
+ */
7855
+ this.draggable = false;
7856
+ /**
7857
+ * Css selector of the drag handle
7858
+ */
7859
+ this.dragHandle = '';
7818
7860
  this.title = this.getInitValue('title', props.title, this.title);
7819
7861
  this.fullscreen = this.getInitValue('fullscreen', props.fullscreen, this.fullscreen);
7820
7862
  this.grid = this.getInitValue('grid', props.grid, this.grid);
7821
7863
  this.persistent = this.getInitValue('persistent', props.persistent, this.persistent);
7864
+ this.draggable = this.getInitValue('draggable', props.draggable, this.draggable);
7865
+ this.dragHandle = this.getInitValue('dragHandle', props.dragHandle, this.dragHandle);
7822
7866
  this.isVisible = false;
7823
7867
  this.createAccessors();
7824
7868
  }
@@ -9260,8 +9304,13 @@ class SelectTreeMultiple extends SelectTree {
9260
9304
  */
9261
9305
  this.selectedNodes = [];
9262
9306
  this.selectValue = [];
9307
+ /**
9308
+ * Changes the behavior of checked nodes that will be displayed in the array of values
9309
+ */
9310
+ this.valueConsistsOf = 'LEAF_PRIORITY';
9263
9311
  this.flat = this.getInitValue('flat', props.flat, this.flat);
9264
9312
  this.limit = this.getInitValue('limit', props.limit, this.limit);
9313
+ this.valueConsistsOf = this.getInitValue('valueConsistsOf', props.valueConsistsOf, this.valueConsistsOf);
9265
9314
  this.createAccessors();
9266
9315
  }
9267
9316
  /**
@@ -11035,7 +11084,7 @@ Icons.mdiIcons = {
11035
11084
  tableColumns: 'mdi-table-headers-eye',
11036
11085
  unfold: 'mdi-unfold-more-horizontal',
11037
11086
  warning: 'mdi-exclamation',
11038
- zoom: 'mdi-magnify-scan',
11087
+ zoom: 'mdi-magnify',
11039
11088
  zoomIn: 'mdi-plus-circle-outline',
11040
11089
  zoomPanning: 'mdi-hand-back-right-outline',
11041
11090
  zoomOut: 'mdi-minus-circle-outline',
@@ -11415,6 +11464,7 @@ class BaseReport {
11415
11464
  sequence: index,
11416
11465
  format: this.getFormatOfColumn(col),
11417
11466
  size: `${size}%`,
11467
+ xlsType: col.xlsType,
11418
11468
  };
11419
11469
  return Object.assign(Object.assign({}, result), { [col.name]: row });
11420
11470
  }, {});
@@ -4483,6 +4483,8 @@
4483
4483
  this.componentProps = {};
4484
4484
  /** column style property */
4485
4485
  this.style = {};
4486
+ /** Type of XLS */
4487
+ this.xlsType = '';
4486
4488
  /* Stores lookup data to prevent unnecessary requests */
4487
4489
  this.lookupData = {};
4488
4490
  /* Stores lookup data count (only to be reactive and force column update) */
@@ -4525,6 +4527,7 @@
4525
4527
  this.loading = this.getInitValue('loading', props.loading, this.loading);
4526
4528
  this.style = this.getInitValue('style', props.style, this.style);
4527
4529
  this.componentProps = this.getInitValue('componentProps', props.componentProps, this.componentProps);
4530
+ this.xlsType = this.getInitValue('xlsType', props.xlsType, this.xlsType);
4528
4531
  this.conditions = this.getInitValue('conditions', props.conditions, this.conditions);
4529
4532
  this.createConditions();
4530
4533
  this.createActionConditions();
@@ -7399,6 +7402,8 @@
7399
7402
  this.filteredMenuItems = [];
7400
7403
  /** Search value */
7401
7404
  this.searchValue = '';
7405
+ /** Store the current item focused */
7406
+ this.currentItem = null;
7402
7407
  this.app = this.getInitValue('app', props.app, this.app);
7403
7408
  this.clipped = this.getInitValue('clipped', props.clipped, this.clipped);
7404
7409
  this.fixed = this.getInitValue('fixed', props.fixed, this.fixed);
@@ -7678,6 +7683,15 @@
7678
7683
  if (preventDefault) {
7679
7684
  event.preventDefault();
7680
7685
  }
7686
+ this.setFocus();
7687
+ }
7688
+ /**
7689
+ * Event triggered when this item is focus
7690
+ */
7691
+ focus() {
7692
+ if (this.parentMenu) {
7693
+ this.parentMenu.currentItem = this;
7694
+ }
7681
7695
  }
7682
7696
  /**
7683
7697
  * @returns item is selected or not
@@ -7745,6 +7759,26 @@
7745
7759
  close() {
7746
7760
  this.opened = false;
7747
7761
  }
7762
+ /**
7763
+ * Event triggered when this item is clicked
7764
+ */
7765
+ click(event) {
7766
+ let preventDefault = false;
7767
+ preventDefault = this.callEvent('click', { event, component: this });
7768
+ if (preventDefault) {
7769
+ event.preventDefault();
7770
+ }
7771
+ this.setFocus();
7772
+ }
7773
+ /**
7774
+ * Event triggered when this item is focus
7775
+ */
7776
+ focus(event) {
7777
+ this.callEvent('focus', { event, component: this });
7778
+ if (this.parentMenu) {
7779
+ this.parentMenu.currentItem = this;
7780
+ }
7781
+ }
7748
7782
  }
7749
7783
 
7750
7784
  /**
@@ -7822,10 +7856,20 @@
7822
7856
  * If true the modal won't close when overlay is clicked
7823
7857
  */
7824
7858
  this.persistent = false;
7859
+ /**
7860
+ * Allows modal to be dragged around in the screen
7861
+ */
7862
+ this.draggable = false;
7863
+ /**
7864
+ * Css selector of the drag handle
7865
+ */
7866
+ this.dragHandle = '';
7825
7867
  this.title = this.getInitValue('title', props.title, this.title);
7826
7868
  this.fullscreen = this.getInitValue('fullscreen', props.fullscreen, this.fullscreen);
7827
7869
  this.grid = this.getInitValue('grid', props.grid, this.grid);
7828
7870
  this.persistent = this.getInitValue('persistent', props.persistent, this.persistent);
7871
+ this.draggable = this.getInitValue('draggable', props.draggable, this.draggable);
7872
+ this.dragHandle = this.getInitValue('dragHandle', props.dragHandle, this.dragHandle);
7829
7873
  this.isVisible = false;
7830
7874
  this.createAccessors();
7831
7875
  }
@@ -9267,8 +9311,13 @@
9267
9311
  */
9268
9312
  this.selectedNodes = [];
9269
9313
  this.selectValue = [];
9314
+ /**
9315
+ * Changes the behavior of checked nodes that will be displayed in the array of values
9316
+ */
9317
+ this.valueConsistsOf = 'LEAF_PRIORITY';
9270
9318
  this.flat = this.getInitValue('flat', props.flat, this.flat);
9271
9319
  this.limit = this.getInitValue('limit', props.limit, this.limit);
9320
+ this.valueConsistsOf = this.getInitValue('valueConsistsOf', props.valueConsistsOf, this.valueConsistsOf);
9272
9321
  this.createAccessors();
9273
9322
  }
9274
9323
  /**
@@ -11042,7 +11091,7 @@
11042
11091
  tableColumns: 'mdi-table-headers-eye',
11043
11092
  unfold: 'mdi-unfold-more-horizontal',
11044
11093
  warning: 'mdi-exclamation',
11045
- zoom: 'mdi-magnify-scan',
11094
+ zoom: 'mdi-magnify',
11046
11095
  zoomIn: 'mdi-plus-circle-outline',
11047
11096
  zoomPanning: 'mdi-hand-back-right-outline',
11048
11097
  zoomOut: 'mdi-minus-circle-outline',
@@ -11422,6 +11471,7 @@
11422
11471
  sequence: index,
11423
11472
  format: this.getFormatOfColumn(col),
11424
11473
  size: `${size}%`,
11474
+ xlsType: col.xlsType,
11425
11475
  };
11426
11476
  return Object.assign(Object.assign({}, result), { [col.name]: row });
11427
11477
  }, {});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeedhi/common",
3
- "version": "1.43.1",
3
+ "version": "1.44.0",
4
4
  "description": "Zeedhi Common",
5
5
  "author": "Zeedhi <zeedhi@teknisa.com>",
6
6
  "license": "ISC",
@@ -37,5 +37,5 @@
37
37
  "lodash.times": "^4.3.2",
38
38
  "mockdate": "^3.0.2"
39
39
  },
40
- "gitHead": "dea0dcc3bb44548e97613b82580964acdc07411d"
40
+ "gitHead": "cfe94f85ab62e7e30d7bb09ea8178edf2b75fd59"
41
41
  }
@@ -16,6 +16,8 @@ export declare class Column extends Component implements IColumn {
16
16
  componentProps: any;
17
17
  /** column style property */
18
18
  style: IDictionary;
19
+ /** Type of XLS */
20
+ xlsType: string;
19
21
  protected lookupDatasource?: Datasource;
20
22
  lookupData: any;
21
23
  lookupDataCount: number;
@@ -22,6 +22,7 @@ export interface IColumn extends IComponent {
22
22
  conditions?: IDictionary;
23
23
  style?: IDictionary;
24
24
  events?: IIterableEvents;
25
+ xlsType?: string;
25
26
  }
26
27
  export interface IIterable extends IComponentRender {
27
28
  columns?: IColumn[];
@@ -50,4 +50,12 @@ export declare class MenuGroup extends ComponentRender implements IMenuGroup {
50
50
  * Close group
51
51
  */
52
52
  close(): void;
53
+ /**
54
+ * Event triggered when this item is clicked
55
+ */
56
+ click(event: Event): void;
57
+ /**
58
+ * Event triggered when this item is focus
59
+ */
60
+ focus(event: Event): void;
53
61
  }
@@ -39,6 +39,10 @@ export declare class MenuLink extends ComponentRender implements IMenuLink {
39
39
  * Event triggered when this item is clicked
40
40
  */
41
41
  click(event: Event): void;
42
+ /**
43
+ * Event triggered when this item is focus
44
+ */
45
+ focus(): void;
42
46
  /**
43
47
  * @returns item is selected or not
44
48
  */
@@ -111,6 +111,8 @@ export declare class Menu extends ComponentRender implements IMenu {
111
111
  private filteredMenuItems;
112
112
  /** Search value */
113
113
  private searchValue;
114
+ /** Store the current item focused */
115
+ currentItem: IMenuItem | null;
114
116
  /**
115
117
  * Creates a new Menu.
116
118
  * @param props Menu properties
@@ -18,6 +18,8 @@ export interface IModal extends IComponent {
18
18
  fullscreen?: boolean;
19
19
  grid?: IModalGrid;
20
20
  persistent?: boolean;
21
+ draggable?: boolean;
22
+ dragHandle?: string;
21
23
  }
22
24
  export interface IModalCloseButton extends IButton {
23
25
  modalName: string;
@@ -17,6 +17,14 @@ export declare class Modal extends Component implements IModal {
17
17
  * If true the modal won't close when overlay is clicked
18
18
  */
19
19
  persistent: boolean;
20
+ /**
21
+ * Allows modal to be dragged around in the screen
22
+ */
23
+ draggable: boolean;
24
+ /**
25
+ * Css selector of the drag handle
26
+ */
27
+ dragHandle?: string;
20
28
  /**
21
29
  * Creates a new modal
22
30
  * @param props Modal structure
@@ -12,6 +12,7 @@ export interface ISelectTreeMultiple extends ISelectTree {
12
12
  flat?: boolean;
13
13
  limit?: number;
14
14
  events?: ISelectTreeMultipleEvents;
15
+ valueConsistsOf?: string;
15
16
  }
16
17
  export interface ISelectTreeMultipleSelectedNodesEvent extends IEventParam<SelectTreeMultiple> {
17
18
  selectedNodes: ISelectTreeMultipleNode<IDictionary>[];
@@ -22,6 +22,10 @@ export declare class SelectTreeMultiple extends SelectTree implements ISelectTre
22
22
  */
23
23
  selectedNodes: ISelectTreeMultipleNode<IDictionary>[];
24
24
  selectValue: any[];
25
+ /**
26
+ * Changes the behavior of checked nodes that will be displayed in the array of values
27
+ */
28
+ valueConsistsOf: string;
25
29
  /**
26
30
  * Creates a new instance of Select Tree Multiple
27
31
  * @param props
@@ -13,6 +13,7 @@ export declare type MetadataColumn = IDictionary<{
13
13
  sequence: number;
14
14
  size: string;
15
15
  expression?: string;
16
+ xlsType?: string;
16
17
  }>;
17
18
  export declare type MetadataFilter = {
18
19
  label: string;