@ng-atomic/common 5.13.0 → 5.15.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.
Files changed (86) hide show
  1. package/esm2020/models/action.mjs +7 -2
  2. package/esm2020/pipes/actions/actions.pipe.mjs +19 -0
  3. package/esm2020/pipes/actions/index.mjs +2 -0
  4. package/esm2020/pipes/actions/ng-atomic-common-pipes-actions.mjs +5 -0
  5. package/esm2020/pipes/data-accessor/data-accessor.pipe.mjs +1 -1
  6. package/esm2020/pipes/pagination/index.mjs +1 -2
  7. package/esm2020/pipes/pagination/pagination.module.mjs +4 -8
  8. package/esm2020/pipes/pagination/pagination.pipe.mjs +8 -4
  9. package/esm2020/pipes/select-id/select-id.pipe.mjs +2 -2
  10. package/esm2020/services/form/pagination/index.mjs +2 -0
  11. package/esm2020/services/form/pagination/ng-atomic-common-services-form-pagination.mjs +5 -0
  12. package/esm2020/services/form/pagination/pagination.service.mjs +24 -0
  13. package/esm2020/services/form/sort/index.mjs +2 -0
  14. package/esm2020/services/form/sort/ng-atomic-common-services-form-sort.mjs +5 -0
  15. package/esm2020/services/form/sort/sort.service.mjs +33 -0
  16. package/esm2020/services/loading/loading.service.mjs +3 -2
  17. package/esm2020/services/query-resolver/query-resolver.service.mjs +13 -5
  18. package/esm2020/stores/component-store/component-store.mjs +36 -0
  19. package/esm2020/stores/component-store/index.mjs +2 -0
  20. package/esm2020/stores/component-store/ng-atomic-common-stores-component-store.mjs +5 -0
  21. package/esm2020/utils/diff/diff.mjs +7 -0
  22. package/esm2020/utils/diff/index.mjs +2 -0
  23. package/esm2020/utils/index.mjs +2 -1
  24. package/fesm2015/ng-atomic-common-models.mjs +9 -0
  25. package/fesm2015/ng-atomic-common-models.mjs.map +1 -1
  26. package/fesm2015/ng-atomic-common-pipes-actions.mjs +26 -0
  27. package/fesm2015/ng-atomic-common-pipes-actions.mjs.map +1 -0
  28. package/fesm2015/ng-atomic-common-pipes-data-accessor.mjs.map +1 -1
  29. package/fesm2015/ng-atomic-common-pipes-pagination.mjs +7 -11
  30. package/fesm2015/ng-atomic-common-pipes-pagination.mjs.map +1 -1
  31. package/fesm2015/ng-atomic-common-pipes-select-id.mjs +1 -1
  32. package/fesm2015/ng-atomic-common-pipes-select-id.mjs.map +1 -1
  33. package/fesm2015/ng-atomic-common-services-form-pagination.mjs +31 -0
  34. package/fesm2015/ng-atomic-common-services-form-pagination.mjs.map +1 -0
  35. package/fesm2015/ng-atomic-common-services-form-sort.mjs +39 -0
  36. package/fesm2015/ng-atomic-common-services-form-sort.mjs.map +1 -0
  37. package/fesm2015/ng-atomic-common-services-loading.mjs +2 -1
  38. package/fesm2015/ng-atomic-common-services-loading.mjs.map +1 -1
  39. package/fesm2015/ng-atomic-common-services-query-resolver.mjs +13 -5
  40. package/fesm2015/ng-atomic-common-services-query-resolver.mjs.map +1 -1
  41. package/fesm2015/ng-atomic-common-stores-component-store.mjs +44 -0
  42. package/fesm2015/ng-atomic-common-stores-component-store.mjs.map +1 -0
  43. package/fesm2015/ng-atomic-common-utils.mjs +8 -1
  44. package/fesm2015/ng-atomic-common-utils.mjs.map +1 -1
  45. package/fesm2020/ng-atomic-common-models.mjs +9 -0
  46. package/fesm2020/ng-atomic-common-models.mjs.map +1 -1
  47. package/fesm2020/ng-atomic-common-pipes-actions.mjs +26 -0
  48. package/fesm2020/ng-atomic-common-pipes-actions.mjs.map +1 -0
  49. package/fesm2020/ng-atomic-common-pipes-data-accessor.mjs.map +1 -1
  50. package/fesm2020/ng-atomic-common-pipes-pagination.mjs +7 -11
  51. package/fesm2020/ng-atomic-common-pipes-pagination.mjs.map +1 -1
  52. package/fesm2020/ng-atomic-common-pipes-select-id.mjs +1 -1
  53. package/fesm2020/ng-atomic-common-pipes-select-id.mjs.map +1 -1
  54. package/fesm2020/ng-atomic-common-services-form-pagination.mjs +31 -0
  55. package/fesm2020/ng-atomic-common-services-form-pagination.mjs.map +1 -0
  56. package/fesm2020/ng-atomic-common-services-form-sort.mjs +39 -0
  57. package/fesm2020/ng-atomic-common-services-form-sort.mjs.map +1 -0
  58. package/fesm2020/ng-atomic-common-services-loading.mjs +2 -1
  59. package/fesm2020/ng-atomic-common-services-loading.mjs.map +1 -1
  60. package/fesm2020/ng-atomic-common-services-query-resolver.mjs +12 -4
  61. package/fesm2020/ng-atomic-common-services-query-resolver.mjs.map +1 -1
  62. package/fesm2020/ng-atomic-common-stores-component-store.mjs +43 -0
  63. package/fesm2020/ng-atomic-common-stores-component-store.mjs.map +1 -0
  64. package/fesm2020/ng-atomic-common-utils.mjs +8 -1
  65. package/fesm2020/ng-atomic-common-utils.mjs.map +1 -1
  66. package/models/action.d.ts +1 -0
  67. package/package.json +38 -2
  68. package/pipes/actions/actions.pipe.d.ts +6 -0
  69. package/pipes/actions/index.d.ts +1 -0
  70. package/pipes/data-accessor/data-accessor.pipe.d.ts +2 -2
  71. package/pipes/pagination/index.d.ts +0 -1
  72. package/pipes/pagination/pagination.module.d.ts +1 -2
  73. package/pipes/pagination/pagination.pipe.d.ts +15 -7
  74. package/services/form/pagination/index.d.ts +1 -0
  75. package/services/form/pagination/pagination.service.d.ts +16 -0
  76. package/services/form/sort/index.d.ts +1 -0
  77. package/services/form/sort/sort.service.d.ts +17 -0
  78. package/services/loading/loading.service.d.ts +1 -1
  79. package/services/query-resolver/query-resolver.service.d.ts +4 -3
  80. package/stores/component-store/component-store.d.ts +15 -0
  81. package/stores/component-store/index.d.ts +1 -0
  82. package/utils/diff/diff.d.ts +5 -0
  83. package/utils/diff/index.d.ts +1 -0
  84. package/utils/index.d.ts +1 -0
  85. package/esm2020/pipes/pagination/pagination.transformer.mjs +0 -5
  86. package/pipes/pagination/pagination.transformer.d.ts +0 -9
@@ -9,7 +9,7 @@ export declare class LoadingService {
9
9
  setKey(key: string): void;
10
10
  removeKey(key: string): void;
11
11
  start(callback: (done: any) => void, key?: string): void;
12
- await(callback: (...args: any[]) => Promise<void>): Promise<void>;
12
+ await<T = any>(callback: (...args: any[]) => Promise<T>): Promise<T>;
13
13
  static ɵfac: i0.ɵɵFactoryDeclaration<LoadingService, never>;
14
14
  static ɵprov: i0.ɵɵInjectableDeclaration<LoadingService>;
15
15
  }
@@ -2,8 +2,9 @@ import { SmartExpTransformer } from '@ng-atomic/common/utils';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class QueryResolverService {
4
4
  private transformer?;
5
- constructor(transformer?: SmartExpTransformer);
6
- resolve<T>(items: T[], queryString: string, dlm?: Record<string, string>): T[];
7
- static ɵfac: i0.ɵɵFactoryDeclaration<QueryResolverService, [{ optional: true; }]>;
5
+ private map?;
6
+ constructor(transformer?: SmartExpTransformer, map?: Record<string, string>);
7
+ resolve<T>(items: T[], query: string, map?: Record<string, string>): T[];
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<QueryResolverService, [{ optional: true; }, { optional: true; }]>;
8
9
  static ɵprov: i0.ɵɵInjectableDeclaration<QueryResolverService>;
9
10
  }
@@ -0,0 +1,15 @@
1
+ import { Action } from "@ng-atomic/common/models";
2
+ import * as i0 from "@angular/core";
3
+ export declare class NgAtomicComponentStore {
4
+ protected _effectMap: Map<string, string>;
5
+ dispatch(action: Action): void;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgAtomicComponentStore, never>;
7
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgAtomicComponentStore, never, never, {}, {}, never, never, true, never>;
8
+ }
9
+ export declare class NgAtomicComponent {
10
+ protected _effectMap: Map<string, string>;
11
+ dispatch(action: Action): void;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgAtomicComponent, never>;
13
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgAtomicComponent, never, never, {}, {}, never, never, true, never>;
14
+ }
15
+ export declare function Effect(id: string): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
@@ -0,0 +1 @@
1
+ export * from './component-store';
@@ -0,0 +1,5 @@
1
+ import { SelectionModel } from "@angular/cdk/collections";
2
+ export declare function diff<T = any>(initial: SelectionModel<T>, current: SelectionModel<T>): {
3
+ selectedIds: T[];
4
+ unselectedIds: T[];
5
+ };
@@ -0,0 +1 @@
1
+ export * from './diff';
package/utils/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from './comma';
2
2
  export * from './compare-by-id';
3
3
  export * from './date-utils';
4
+ export * from './diff';
4
5
  export * from './mat-dayjs-date';
5
6
  export * from './smart-exp-transformer';
6
7
  export * from './to-object';
@@ -1,5 +0,0 @@
1
- import { smartSortByTransformer } from '@ng-atomic/common/pipes/smart-sort-by';
2
- export function paginationTransformer(items, page) {
3
- return smartSortByTransformer(items, page.key, page.order).slice(page.start, page.end);
4
- }
5
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFnaW5hdGlvbi50cmFuc2Zvcm1lci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL0BuZy1hdG9taWMvY29tbW9uL3NyYy9waXBlcy9wYWdpbmF0aW9uL3BhZ2luYXRpb24udHJhbnNmb3JtZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLHNCQUFzQixFQUFFLE1BQU0sdUNBQXVDLENBQUM7QUFXL0UsTUFBTSxVQUFVLHFCQUFxQixDQUFJLEtBQVUsRUFBRSxJQUFVO0lBQzdELE9BQU8sc0JBQXNCLENBQUMsS0FBSyxFQUFFLElBQUksQ0FBQyxHQUFHLEVBQUUsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsS0FBSyxFQUFFLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUN6RixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgc21hcnRTb3J0QnlUcmFuc2Zvcm1lciB9IGZyb20gJ0BuZy1hdG9taWMvY29tbW9uL3BpcGVzL3NtYXJ0LXNvcnQtYnknO1xuXG5pbnRlcmZhY2UgUGFnZSB7XG4gIHN0YXJ0OiBudW1iZXI7XG4gIGVuZDogbnVtYmVyO1xuICBrZXk6IHN0cmluZztcbiAgb3JkZXI6ICdhc2MnIHwgJ2Rlc2MnO1xufVxuXG5leHBvcnQgdHlwZSBQYWdpbmF0aW9uVHJhbnNmb3JtZXI8RT4gPSAoaXRlbXM6IEVbXSwgcGFnZTogUGFnZSkgPT4gRVtdO1xuXG5leHBvcnQgZnVuY3Rpb24gcGFnaW5hdGlvblRyYW5zZm9ybWVyPEU+KGl0ZW1zOiBFW10sIHBhZ2U6IFBhZ2UpOiBFW10ge1xuICByZXR1cm4gc21hcnRTb3J0QnlUcmFuc2Zvcm1lcihpdGVtcywgcGFnZS5rZXksIHBhZ2Uub3JkZXIpLnNsaWNlKHBhZ2Uuc3RhcnQsIHBhZ2UuZW5kKTtcbn1cbiJdfQ==
@@ -1,9 +0,0 @@
1
- interface Page {
2
- start: number;
3
- end: number;
4
- key: string;
5
- order: 'asc' | 'desc';
6
- }
7
- export type PaginationTransformer<E> = (items: E[], page: Page) => E[];
8
- export declare function paginationTransformer<E>(items: E[], page: Page): E[];
9
- export {};