eservices-core 1.0.403 → 1.0.404

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.
@@ -31,7 +31,7 @@ export default class Table extends List {
31
31
  */
32
32
  rowIndex: number;
33
33
  changes: ITableChanges;
34
- changed: boolean;
34
+ get changed(): number;
35
35
  save: () => any;
36
36
  constructor(params: ITableConfig);
37
37
  /**
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * eservices-core v1.0.403
2
+ * eservices-core v1.0.404
3
3
  * (c) 2022 ESERVICES
4
4
  */
5
5
  'use strict';
@@ -3851,9 +3851,11 @@ class Table$1 extends List {
3851
3851
  edit: {},
3852
3852
  remove: []
3853
3853
  };
3854
- this.changed = false;
3855
3854
  this.save = () => { };
3856
3855
  }
3856
+ get changed() {
3857
+ return Object.keys(this.changes.new).length || Object.keys(this.changes.edit).length || this.changes.remove.length;
3858
+ }
3857
3859
  /**
3858
3860
  * @description Создание новой записи.
3859
3861
  */
@@ -3969,7 +3971,8 @@ function useTableRequest(table, options) {
3969
3971
  return dataService.getList(table.name, {
3970
3972
  fields: options === null || options === void 0 ? void 0 : options.fields
3971
3973
  })
3972
- .then(arr => table.array = arr);
3974
+ .then(arr => table.array = arr)
3975
+ .then(() => table.emit(jenesiusVueForm.Form.EVENT_READ, table.array));
3973
3976
  };
3974
3977
  table.save = () => {
3975
3978
  const ENTITY_NAME = table.name;
@@ -3986,6 +3989,7 @@ function useTableRequest(table, options) {
3986
3989
  table.changes.remove.forEach((row) => __awaiter(this, void 0, void 0, function* () {
3987
3990
  yield dataService.removeById(ENTITY_NAME, getId(row));
3988
3991
  }));
3992
+ table.emit(jenesiusVueForm.Form.EVENT_SAVE);
3989
3993
  };
3990
3994
  }
3991
3995
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eservices-core",
3
- "version": "1.0.403",
3
+ "version": "1.0.404",
4
4
  "description": "Core library",
5
5
  "author": "",
6
6
  "scripts": {