@sumaris-net/ngx-components 18.22.18 → 18.22.20

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sumaris-net/ngx-components",
3
3
  "description": "SUMARiS Angular components",
4
- "version": "18.22.18",
4
+ "version": "18.22.20",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -218,12 +218,33 @@ export declare abstract class AppAsyncTable<T extends IEntity<T, ID>, F = any, I
218
218
  confirmAndAdd(event?: Event, row?: AsyncTableElement<T>, opts?: {
219
219
  focusColumn?: string;
220
220
  }): Promise<boolean>;
221
+ /**
222
+ * Same as confirmAndUp(), but using the next focused row. Should be call by the action column components
223
+ * @param event
224
+ * @param row
225
+ * @param opts
226
+ */
221
227
  confirmAndBackward(event?: Event, row?: AsyncTableElement<T>, opts?: {
222
228
  focusColumn?: string;
223
- }): Promise<boolean>;
229
+ } & WaitForOptions): Promise<boolean>;
224
230
  confirmAndForward(event: Event | undefined, row?: AsyncTableElement<T>, opts?: {
225
231
  focusColumn?: string;
226
232
  }): Promise<boolean>;
233
+ /**
234
+ * Confirms the current row and moves the focus to the upper row.
235
+ * Typical usage is inside a <input type="number">, with `(keyup.arrowUp)="confirmAndUp(event, row, {focusColumn: columnName})"`
236
+ * Same as confirmAndBackward, but on the current row.
237
+ *
238
+ *
239
+ * @param {Event} [event] - The event associated with the confirmation and update action.
240
+ * @param {AsyncTableElement} [row] - The current row object.
241
+ * @param {Object} [opts] - Options.
242
+ * @param {string} [opts.focusColumn] - The column to focus on the upper row; defaults to the current focus column
243
+ * @return {Promise<boolean>} A promise that resolves to a boolean indicating the success of the navigation.
244
+ */
245
+ confirmAndUp(event?: Event, row?: AsyncTableElement<T>, opts?: {
246
+ focusColumn?: string;
247
+ } & WaitForOptions): Promise<boolean>;
227
248
  /**
228
249
  * Confirm the creation of the given row, or if not specified the currently edited row
229
250
  *
@@ -390,7 +411,7 @@ export declare abstract class AppAsyncTable<T extends IEntity<T, ID>, F = any, I
390
411
  */
391
412
  protected initPermanentSelection(): void;
392
413
  private listenSortAndPaginationEvents;
393
- private editRowById;
414
+ private editOrAddRowById;
394
415
  private setLoading;
395
416
  private deleteNewRow;
396
417
  private deleteExistingRow;
@@ -395,7 +395,7 @@ export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = n
395
395
  */
396
396
  protected initPermanentSelection(): void;
397
397
  private listenSortAndPaginationEvents;
398
- private editRowById;
398
+ private editOrAddRowById;
399
399
  private setLoading;
400
400
  private deleteNewRow;
401
401
  private deleteExistingRow;
@@ -112,5 +112,5 @@ export declare function mergeLoadResult<T>(res1: LoadResult<T>, res2: LoadResult
112
112
  * an array, it is converted into a LoadResult object with the data property
113
113
  * containing the array. If the input is already a LoadResult, it is returned as is.
114
114
  */
115
- export declare function toLoadResult<T>(res: T[] | LoadResult<T>): LoadResult<T> | T[];
115
+ export declare function toLoadResult<T>(res: T[] | LoadResult<T>): LoadResult<T>;
116
116
  export declare function isEntityService<T, ID>(service: any): service is IEntityService<T, ID>;
@@ -2,7 +2,7 @@
2
2
  "name": "ngx-sumaris-components",
3
3
  "short_name": "ngx-sumaris-components",
4
4
  "manifest_version": 1,
5
- "version": "18.22.18",
5
+ "version": "18.22.20",
6
6
  "default_locale": "fr",
7
7
  "description": "Angular components for building beautiful and responsive Apps",
8
8
  "icons": [{