@zeedhi/common 1.110.1 → 1.111.1

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.
@@ -3990,7 +3990,6 @@ class Date$1 extends TextInput {
3990
3990
  this.parserFn = FormatterParserProvider.getParser('ZdDate');
3991
3991
  this.previousHint = '';
3992
3992
  this.previousPersistentHint = false;
3993
- this.lastChangeValue = null;
3994
3993
  this.allowedDates = this.getInitValue('allowedDates', props.allowedDates, this.allowedDates);
3995
3994
  this.appendIcon = this.getInitValue('appendIcon', props.appendIcon, 'calendar');
3996
3995
  this.autocomplete = this.getInitValue('autocomplete', props.autocomplete, this.autocomplete);
@@ -6820,6 +6819,10 @@ class GridEditable extends Grid {
6820
6819
  };
6821
6820
  this.viewEnterEdit = null;
6822
6821
  this.showCancelColumn = false;
6822
+ /**
6823
+ * Define se o evento rowClick deve ser chamado ao clicar em uma célula editável
6824
+ */
6825
+ this.preventRowClickOnEditing = true;
6823
6826
  this.newRowIdentifier = '__added_row';
6824
6827
  this.positionIdentifier = '__position';
6825
6828
  this.pageIdentifier = '__page';
@@ -6829,6 +6832,7 @@ class GridEditable extends Grid {
6829
6832
  this.editingNewRows = this.getInitValue('editingNewRows', props.editingNewRows, this.editingNewRows);
6830
6833
  this.singleEdit = this.getInitValue('singleEdit', props.singleEdit, this.singleEdit);
6831
6834
  this.showCancelColumn = this.getInitValue('showCancelColumn', props.showCancelColumn, this.showCancelColumn);
6835
+ this.preventRowClickOnEditing = this.getInitValue('preventRowClickOnEditing', props.preventRowClickOnEditing, this.preventRowClickOnEditing);
6832
6836
  this.createAccessors();
6833
6837
  this.addCancelColumn();
6834
6838
  this.registerDatasourceCallback();
@@ -6957,7 +6961,7 @@ class GridEditable extends Grid {
6957
6961
  */
6958
6962
  cellClick(row, column, event, element, canEdit = true) {
6959
6963
  if (column.editable && canEdit) {
6960
- this.preventRowClick = true;
6964
+ this.preventRowClick = (this.preventRowClickOnEditing !== false);
6961
6965
  this.datasource.currentRow = row;
6962
6966
  this.inlineEdit(row, column, event, element);
6963
6967
  return;
@@ -7088,6 +7092,15 @@ class GridEditable extends Grid {
7088
7092
  component, event, element, row, column,
7089
7093
  });
7090
7094
  }
7095
+ }, click: ({ event, element, component }) => {
7096
+ if (this.preventRowClickOnEditing === false) {
7097
+ this.rowClick(row, event, element);
7098
+ }
7099
+ if (compEvents.click) {
7100
+ compEvents.click({
7101
+ component, event, element,
7102
+ });
7103
+ }
7091
7104
  } });
7092
7105
  this.updateOriginalRow(key, row);
7093
7106
  return Object.assign(Object.assign({}, componentProps), { name: compName, parent: this, align: column.align, showLabel: false, showHelper: false, dense: true, value: colValue, events: newEvents, autofill: false, allowDuplicate: true, autoRegister: false });
@@ -3997,7 +3997,6 @@
3997
3997
  this.parserFn = core.FormatterParserProvider.getParser('ZdDate');
3998
3998
  this.previousHint = '';
3999
3999
  this.previousPersistentHint = false;
4000
- this.lastChangeValue = null;
4001
4000
  this.allowedDates = this.getInitValue('allowedDates', props.allowedDates, this.allowedDates);
4002
4001
  this.appendIcon = this.getInitValue('appendIcon', props.appendIcon, 'calendar');
4003
4002
  this.autocomplete = this.getInitValue('autocomplete', props.autocomplete, this.autocomplete);
@@ -6827,6 +6826,10 @@
6827
6826
  };
6828
6827
  this.viewEnterEdit = null;
6829
6828
  this.showCancelColumn = false;
6829
+ /**
6830
+ * Define se o evento rowClick deve ser chamado ao clicar em uma célula editável
6831
+ */
6832
+ this.preventRowClickOnEditing = true;
6830
6833
  this.newRowIdentifier = '__added_row';
6831
6834
  this.positionIdentifier = '__position';
6832
6835
  this.pageIdentifier = '__page';
@@ -6836,6 +6839,7 @@
6836
6839
  this.editingNewRows = this.getInitValue('editingNewRows', props.editingNewRows, this.editingNewRows);
6837
6840
  this.singleEdit = this.getInitValue('singleEdit', props.singleEdit, this.singleEdit);
6838
6841
  this.showCancelColumn = this.getInitValue('showCancelColumn', props.showCancelColumn, this.showCancelColumn);
6842
+ this.preventRowClickOnEditing = this.getInitValue('preventRowClickOnEditing', props.preventRowClickOnEditing, this.preventRowClickOnEditing);
6839
6843
  this.createAccessors();
6840
6844
  this.addCancelColumn();
6841
6845
  this.registerDatasourceCallback();
@@ -6964,7 +6968,7 @@
6964
6968
  */
6965
6969
  cellClick(row, column, event, element, canEdit = true) {
6966
6970
  if (column.editable && canEdit) {
6967
- this.preventRowClick = true;
6971
+ this.preventRowClick = (this.preventRowClickOnEditing !== false);
6968
6972
  this.datasource.currentRow = row;
6969
6973
  this.inlineEdit(row, column, event, element);
6970
6974
  return;
@@ -7095,6 +7099,15 @@
7095
7099
  component, event, element, row, column,
7096
7100
  });
7097
7101
  }
7102
+ }, click: ({ event, element, component }) => {
7103
+ if (this.preventRowClickOnEditing === false) {
7104
+ this.rowClick(row, event, element);
7105
+ }
7106
+ if (compEvents.click) {
7107
+ compEvents.click({
7108
+ component, event, element,
7109
+ });
7110
+ }
7098
7111
  } });
7099
7112
  this.updateOriginalRow(key, row);
7100
7113
  return Object.assign(Object.assign({}, componentProps), { name: compName, parent: this, align: column.align, showLabel: false, showHelper: false, dense: true, value: colValue, events: newEvents, autofill: false, allowDuplicate: true, autoRegister: false });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeedhi/common",
3
- "version": "1.110.1",
3
+ "version": "1.111.1",
4
4
  "description": "Zeedhi Common",
5
5
  "author": "Zeedhi <zeedhi@teknisa.com>",
6
6
  "license": "ISC",
@@ -43,5 +43,5 @@
43
43
  "lodash.times": "4.3.*",
44
44
  "mockdate": "3.0.*"
45
45
  },
46
- "gitHead": "ac0fe6048d9740ec10cb7be41a9235c631dc9a63"
46
+ "gitHead": "f51dc8f1f97a36c8ce1ff53b37c57157ecfc0e0e"
47
47
  }
@@ -149,7 +149,7 @@ export declare class Date extends TextInput implements IDate {
149
149
  private previousHint;
150
150
  private previousPersistentHint;
151
151
  updateHelperHint(): void;
152
- private lastChangeValue;
152
+ private lastChangeValue?;
153
153
  changeEvent(event?: Event, element?: any): void;
154
154
  change(event?: Event, element?: any, callEvent?: boolean): void;
155
155
  }
@@ -48,6 +48,10 @@ export declare class GridEditable extends Grid implements IGridEditable {
48
48
  protected viewEnterEdit: ((rowKey: string, columnName: string) => void) | null;
49
49
  setViewEnterEdit(viewEnterEdit: (rowKey: string, columnName: string) => void): void;
50
50
  showCancelColumn: boolean;
51
+ /**
52
+ * Define se o evento rowClick deve ser chamado ao clicar em uma célula editável
53
+ */
54
+ preventRowClickOnEditing: boolean;
51
55
  constructor(props: IGridEditable);
52
56
  onMounted(element: any): void;
53
57
  onBeforeDestroy(): void;
@@ -0,0 +1,12 @@
1
+ export interface IJSONObject {
2
+ path: string;
3
+ }
4
+ export declare class JsonCacheService {
5
+ /**
6
+ * jsons collection
7
+ */
8
+ static jsonCollection: IJSONObject[];
9
+ static saveJSONCache(jsonCollection: IJSONObject[]): Promise<void>;
10
+ static getJSONCache(path: string): any;
11
+ static clearJSONCache(jsonCollection: IJSONObject[]): void;
12
+ }