aio-class 2.1.3 → 2.1.5

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.
Files changed (2) hide show
  1. package/index.d.ts +7 -7
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -182,7 +182,7 @@ export type I_EntityMap<T> = {
182
182
  getId: (row: T) => I_id;
183
183
  setId: (row: T) => T;
184
184
  };
185
- type I_rowResult<T> = {
185
+ export type I_EntityRowDetail<T> = {
186
186
  row: T;
187
187
  parentRows: T[];
188
188
  parentRow: T | false;
@@ -232,8 +232,8 @@ export declare class EntityClass<T> {
232
232
  setId: (row: T) => T;
233
233
  getChilds: (row: T) => T[];
234
234
  setChilds: (row: T, childs: T[] | undefined) => T;
235
- getRowDetailById: (data: T[], rowId: I_id) => false | I_rowResult<T>;
236
- getFilteredTree: (data: T[], filter: (row: T, detail: I_rowResult<T>) => boolean | undefined) => T[];
235
+ getRowDetailById: (data: T[], rowId: I_id) => false | I_EntityRowDetail<T>;
236
+ getFilteredTree: (data: T[], filter: (row: T, detail: I_EntityRowDetail<T>) => boolean | undefined) => T[];
237
237
  getSortedTree: (rows: T[], sorts: I_sort<T>[]) => T[];
238
238
  addRow: (data: T[], row: T, p: {
239
239
  parentId?: I_id;
@@ -250,10 +250,10 @@ export declare class EntityClass<T> {
250
250
  reOrderByDir: (data: T[], rowId: I_id, dir: 1 | -1) => T[];
251
251
  moveTo: (data: T[], fromIds: I_id[], toId: I_id) => T[];
252
252
  editByTraverse: (rows: T[], callback: (row: T) => T | false) => T[];
253
- traverse: (rows: T[], callback: (row: T, detail: I_rowResult<T>) => false | undefined) => void;
253
+ traverse: (rows: T[], callback: (row: T, detail: I_EntityRowDetail<T>) => false | undefined) => void;
254
254
  };
255
255
  dataActions: {
256
- getRowDetailById: (rowId: any) => false | I_rowResult<T>;
256
+ getRowDetailById: (rowId: any) => false | I_EntityRowDetail<T>;
257
257
  addRow: (row: T, p: {
258
258
  parentId?: I_id;
259
259
  index?: number;
@@ -270,8 +270,8 @@ export declare class EntityClass<T> {
270
270
  moveTo: (fromIds: I_id[], toId: I_id) => T[];
271
271
  editByTraverse: (callback: (row: T) => T | false) => T[];
272
272
  getSortedTree: (sorts: I_sort<T>[]) => T[];
273
- getFilteredTree: (filter: (row: T, detail: I_rowResult<T>) => boolean | undefined) => T[];
274
- traverse: (callback: (row: T, detail: I_rowResult<T>) => false | undefined) => void;
273
+ getFilteredTree: (filter: (row: T, detail: I_EntityRowDetail<T>) => boolean | undefined) => T[];
274
+ traverse: (callback: (row: T, detail: I_EntityRowDetail<T>) => false | undefined) => void;
275
275
  };
276
276
  }
277
277
  type I_color = any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aio-class",
3
- "version": "2.1.3",
3
+ "version": "2.1.5",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/mohammadFeiz/aio-class#readme",
6
6
  "bugs": {