@zeedhi/common 1.74.0 → 1.76.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.
@@ -8160,7 +8160,12 @@ class MasterDetail extends ComponentRender {
8160
8160
  * Master detail relationships configuration
8161
8161
  */
8162
8162
  this.config = {};
8163
+ /**
8164
+ * Defines whether the relationship will be created on mounted
8165
+ */
8166
+ this.lazyRelate = false;
8163
8167
  this.config = this.getInitValue('config', props.config, this.config);
8168
+ this.lazyRelate = this.getInitValue('lazyRelate', props.lazyRelate, this.lazyRelate);
8164
8169
  }
8165
8170
  createRelationship(master, details = []) {
8166
8171
  if (master.datasource && details.length) {
@@ -8215,7 +8220,8 @@ class MasterDetail extends ComponentRender {
8215
8220
  }
8216
8221
  onMounted(element) {
8217
8222
  super.onMounted(element);
8218
- this.createRelationships();
8223
+ if (!this.lazyRelate)
8224
+ this.createRelationships();
8219
8225
  }
8220
8226
  }
8221
8227
 
@@ -8797,12 +8803,17 @@ class Modal extends Component {
8797
8803
  * Css selector of the drag handle
8798
8804
  */
8799
8805
  this.dragHandle = '';
8806
+ /**
8807
+ * Set if esc keydown event should to stop propagation
8808
+ */
8809
+ this.escKeydownStop = true;
8800
8810
  this.title = this.getInitValue('title', props.title, this.title);
8801
8811
  this.fullscreen = this.getInitValue('fullscreen', props.fullscreen, this.fullscreen);
8802
8812
  this.grid = this.getInitValue('grid', props.grid, this.grid);
8803
8813
  this.persistent = this.getInitValue('persistent', props.persistent, this.persistent);
8804
8814
  this.draggable = this.getInitValue('draggable', props.draggable, this.draggable);
8805
8815
  this.dragHandle = this.getInitValue('dragHandle', props.dragHandle, this.dragHandle);
8816
+ this.escKeydownStop = this.getInitValue('escKeydownStop', props.escKeydownStop, this.escKeydownStop);
8806
8817
  this.isVisible = false;
8807
8818
  this.createAccessors();
8808
8819
  }
@@ -8167,7 +8167,12 @@
8167
8167
  * Master detail relationships configuration
8168
8168
  */
8169
8169
  this.config = {};
8170
+ /**
8171
+ * Defines whether the relationship will be created on mounted
8172
+ */
8173
+ this.lazyRelate = false;
8170
8174
  this.config = this.getInitValue('config', props.config, this.config);
8175
+ this.lazyRelate = this.getInitValue('lazyRelate', props.lazyRelate, this.lazyRelate);
8171
8176
  }
8172
8177
  createRelationship(master, details = []) {
8173
8178
  if (master.datasource && details.length) {
@@ -8222,7 +8227,8 @@
8222
8227
  }
8223
8228
  onMounted(element) {
8224
8229
  super.onMounted(element);
8225
- this.createRelationships();
8230
+ if (!this.lazyRelate)
8231
+ this.createRelationships();
8226
8232
  }
8227
8233
  }
8228
8234
 
@@ -8804,12 +8810,17 @@
8804
8810
  * Css selector of the drag handle
8805
8811
  */
8806
8812
  this.dragHandle = '';
8813
+ /**
8814
+ * Set if esc keydown event should to stop propagation
8815
+ */
8816
+ this.escKeydownStop = true;
8807
8817
  this.title = this.getInitValue('title', props.title, this.title);
8808
8818
  this.fullscreen = this.getInitValue('fullscreen', props.fullscreen, this.fullscreen);
8809
8819
  this.grid = this.getInitValue('grid', props.grid, this.grid);
8810
8820
  this.persistent = this.getInitValue('persistent', props.persistent, this.persistent);
8811
8821
  this.draggable = this.getInitValue('draggable', props.draggable, this.draggable);
8812
8822
  this.dragHandle = this.getInitValue('dragHandle', props.dragHandle, this.dragHandle);
8823
+ this.escKeydownStop = this.getInitValue('escKeydownStop', props.escKeydownStop, this.escKeydownStop);
8813
8824
  this.isVisible = false;
8814
8825
  this.createAccessors();
8815
8826
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeedhi/common",
3
- "version": "1.74.0",
3
+ "version": "1.76.0",
4
4
  "description": "Zeedhi Common",
5
5
  "author": "Zeedhi <zeedhi@teknisa.com>",
6
6
  "license": "ISC",
@@ -19,25 +19,25 @@
19
19
  "watch": "npm run build -- -w"
20
20
  },
21
21
  "dependencies": {
22
- "@zeedhi/autonumeric": "^4.6.0",
23
- "lodash.debounce": "^4.0.8",
24
- "lodash.get": "^4.4.2",
25
- "lodash.isundefined": "^3.0.1",
26
- "lodash.merge": "^4.6.2",
27
- "lodash.set": "^4.3.2"
22
+ "@zeedhi/autonumeric": "*",
23
+ "lodash.debounce": "4.0.*",
24
+ "lodash.get": "4.4.*",
25
+ "lodash.isundefined": "3.0.*",
26
+ "lodash.merge": "4.6.*",
27
+ "lodash.set": "4.3.*"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@zeedhi/core": "^1.0.0-alpha.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@types/lodash.debounce": "^4.0.6",
34
- "@types/lodash.get": "^4.4.6",
35
- "@types/lodash.isundefined": "^3.0.6",
36
- "@types/lodash.merge": "^4.6.6",
37
- "@types/lodash.set": "^4.3.6",
38
- "@types/lodash.times": "^4.3.6",
39
- "lodash.times": "^4.3.2",
40
- "mockdate": "^3.0.2"
33
+ "@types/lodash.debounce": "4.0.*",
34
+ "@types/lodash.get": "4.4.*",
35
+ "@types/lodash.isundefined": "3.0.*",
36
+ "@types/lodash.merge": "4.6.*",
37
+ "@types/lodash.set": "4.3.*",
38
+ "@types/lodash.times": "4.3.*",
39
+ "lodash.times": "4.3.*",
40
+ "mockdate": "3.0.*"
41
41
  },
42
- "gitHead": "de1877973b578c5dc1f58903864eb1ae803fda48"
42
+ "gitHead": "97e6762f3ab13109b093fa2ff33b6b554f9c5355"
43
43
  }
@@ -2,4 +2,5 @@ import { IDictionary } from '@zeedhi/core';
2
2
  import { IComponentRender } from '../zd-component/interfaces';
3
3
  export interface IMasterDetail extends IComponentRender {
4
4
  config?: IDictionary<any>;
5
+ lazyRelate?: boolean;
5
6
  }
@@ -9,12 +9,16 @@ export declare class MasterDetail extends ComponentRender implements IMasterDeta
9
9
  * Master detail relationships configuration
10
10
  */
11
11
  config: IDictionary<any>;
12
+ /**
13
+ * Defines whether the relationship will be created on mounted
14
+ */
15
+ lazyRelate: boolean;
12
16
  /**
13
17
  * Creates a new Master Detail.
14
18
  * @param props Master detail properties
15
19
  */
16
20
  constructor(props: IMasterDetail);
17
21
  private createRelationship;
18
- private createRelationships;
22
+ createRelationships(): void;
19
23
  onMounted(element: any): void;
20
24
  }
@@ -20,6 +20,7 @@ export interface IModal extends IComponent {
20
20
  persistent?: boolean;
21
21
  draggable?: boolean;
22
22
  dragHandle?: string;
23
+ escKeydownStop?: boolean;
23
24
  }
24
25
  export interface IModalCloseButton extends IButton {
25
26
  modalName: string;
@@ -25,6 +25,10 @@ export declare class Modal extends Component implements IModal {
25
25
  * Css selector of the drag handle
26
26
  */
27
27
  dragHandle?: string;
28
+ /**
29
+ * Set if esc keydown event should to stop propagation
30
+ */
31
+ escKeydownStop?: boolean;
28
32
  /**
29
33
  * Creates a new modal
30
34
  * @param props Modal structure