@vality/matez 19.0.1-pr-423-667df70.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 (231) hide show
  1. package/README.md +8 -0
  2. package/fesm2022/vality-matez.mjs +3741 -0
  3. package/fesm2022/vality-matez.mjs.map +1 -0
  4. package/index.d.ts +1 -0
  5. package/lib/components/actions/actions.component.d.ts +5 -0
  6. package/lib/components/actions/actions.module.d.ts +7 -0
  7. package/lib/components/actions/index.d.ts +2 -0
  8. package/lib/components/confirm-dialog/confirm-dialog.component.d.ts +16 -0
  9. package/lib/components/confirm-dialog/confirm-dialog.module.d.ts +14 -0
  10. package/lib/components/confirm-dialog/index.d.ts +2 -0
  11. package/lib/components/content-loading/content-loading.component.d.ts +8 -0
  12. package/lib/components/content-loading/index.d.ts +1 -0
  13. package/lib/components/date-range-field/date-range-field.component.d.ts +16 -0
  14. package/lib/components/date-range-field/date-range-field.module.d.ts +13 -0
  15. package/lib/components/date-range-field/index.d.ts +5 -0
  16. package/lib/components/date-range-field/types/date-range.d.ts +4 -0
  17. package/lib/components/date-range-field/utils/create-date-range-to-today.d.ts +2 -0
  18. package/lib/components/date-range-field/utils/is-equal-date-range.d.ts +2 -0
  19. package/lib/components/datetime-field/datetime-field.component.d.ts +19 -0
  20. package/lib/components/datetime-field/datetime-field.module.d.ts +11 -0
  21. package/lib/components/datetime-field/index.d.ts +2 -0
  22. package/lib/components/dialog/components/dialog-actions/dialog-actions.component.d.ts +5 -0
  23. package/lib/components/dialog/dialog.component.d.ts +28 -0
  24. package/lib/components/dialog/dialog.module.d.ts +16 -0
  25. package/lib/components/dialog/index.d.ts +8 -0
  26. package/lib/components/dialog/services/dialog.service.d.ts +23 -0
  27. package/lib/components/dialog/tokens.d.ts +8 -0
  28. package/lib/components/dialog/types/dialog-response-status.d.ts +5 -0
  29. package/lib/components/dialog/types/dialog-response.d.ts +6 -0
  30. package/lib/components/dialog/utils/dialog-superclass.d.ts +13 -0
  31. package/lib/components/error-page/error-page-routing.module.d.ts +7 -0
  32. package/lib/components/error-page/error-page.component.d.ts +5 -0
  33. package/lib/components/error-page/error-page.module.d.ts +9 -0
  34. package/lib/components/error-page/index.d.ts +2 -0
  35. package/lib/components/file-upload/file-upload.component.d.ts +14 -0
  36. package/lib/components/file-upload/file-upload.module.d.ts +9 -0
  37. package/lib/components/file-upload/index.d.ts +3 -0
  38. package/lib/components/file-upload/utils/load-file-content.d.ts +3 -0
  39. package/lib/components/filters/components/filters-dialog/filters-dialog.component.d.ts +10 -0
  40. package/lib/components/filters/components/main-filters/main-filters.directive.d.ts +8 -0
  41. package/lib/components/filters/components/more-filters-button/more-filters-button.component.d.ts +7 -0
  42. package/lib/components/filters/components/other-filters/other-filters.directive.d.ts +8 -0
  43. package/lib/components/filters/filters.component.d.ts +29 -0
  44. package/lib/components/filters/filters.module.d.ts +19 -0
  45. package/lib/components/filters/index.d.ts +5 -0
  46. package/lib/components/index.d.ts +18 -0
  47. package/lib/components/input-field/index.d.ts +2 -0
  48. package/lib/components/input-field/input-field.component.d.ts +14 -0
  49. package/lib/components/input-field/input-field.module.d.ts +12 -0
  50. package/lib/components/list-field/index.d.ts +2 -0
  51. package/lib/components/list-field/list-field.component.d.ts +12 -0
  52. package/lib/components/list-field/list-field.module.d.ts +10 -0
  53. package/lib/components/nav/index.d.ts +1 -0
  54. package/lib/components/nav/nav.component.d.ts +16 -0
  55. package/lib/components/number-range-field/index.d.ts +2 -0
  56. package/lib/components/number-range-field/number-range-field.component.d.ts +18 -0
  57. package/lib/components/number-range-field/number-range-field.module.d.ts +9 -0
  58. package/lib/components/progress/index.d.ts +3 -0
  59. package/lib/components/progress/progress.component.d.ts +9 -0
  60. package/lib/components/progress/progress.module.d.ts +9 -0
  61. package/lib/components/progress/utils/get-progress-by-count.d.ts +1 -0
  62. package/lib/components/select-autocomplete/autocomplete-field/autocomplete-field.component.d.ts +23 -0
  63. package/lib/components/select-autocomplete/autocomplete-field/autocomplete-field.module.d.ts +13 -0
  64. package/lib/components/select-autocomplete/autocomplete-field/index.d.ts +2 -0
  65. package/lib/components/select-autocomplete/index.d.ts +3 -0
  66. package/lib/components/select-autocomplete/select-field/index.d.ts +2 -0
  67. package/lib/components/select-autocomplete/select-field/select-field.component.d.ts +26 -0
  68. package/lib/components/select-autocomplete/select-field/select-field.module.d.ts +12 -0
  69. package/lib/components/select-autocomplete/types/index.d.ts +1 -0
  70. package/lib/components/select-autocomplete/types/option.d.ts +6 -0
  71. package/lib/components/select-autocomplete/utils/find-option-by-value.d.ts +2 -0
  72. package/lib/components/select-autocomplete/utils/get-hint-text.d.ts +5 -0
  73. package/lib/components/select-autocomplete/utils/index.d.ts +2 -0
  74. package/lib/components/select-autocomplete/utils/search-options.d.ts +3 -0
  75. package/lib/components/switch-button/index.d.ts +2 -0
  76. package/lib/components/switch-button/switch-button.component.d.ts +24 -0
  77. package/lib/components/switch-button/switch-button.module.d.ts +11 -0
  78. package/lib/components/table/components/base-column.component.d.ts +17 -0
  79. package/lib/components/table/components/customize/customize.component.d.ts +17 -0
  80. package/lib/components/table/components/dnd-column.component.d.ts +7 -0
  81. package/lib/components/table/components/infinity-scroll.directive.d.ts +12 -0
  82. package/lib/components/table/components/no-records.component.d.ts +7 -0
  83. package/lib/components/table/components/select-column.component.d.ts +21 -0
  84. package/lib/components/table/components/table-actions.component.d.ts +5 -0
  85. package/lib/components/table/components/table-info-bar/table-info-bar.component.d.ts +33 -0
  86. package/lib/components/table/components/table-inputs.component.d.ts +5 -0
  87. package/lib/components/table/components/table-progress-bar.component.d.ts +6 -0
  88. package/lib/components/table/consts.d.ts +8 -0
  89. package/lib/components/table/index.d.ts +10 -0
  90. package/lib/components/table/presets/create-menu-column.d.ts +6 -0
  91. package/lib/components/table/presets/index.d.ts +1 -0
  92. package/lib/components/table/table.component.d.ts +81 -0
  93. package/lib/components/table/table.module.d.ts +34 -0
  94. package/lib/components/table/tree-data/index.d.ts +2 -0
  95. package/lib/components/table/tree-data/tree-data-item-to-inline-data-item.d.ts +10 -0
  96. package/lib/components/table/tree-data/tree-data.d.ts +10 -0
  97. package/lib/components/table/types/column2.d.ts +34 -0
  98. package/lib/components/table/types/drag-drop.d.ts +10 -0
  99. package/lib/components/table/types/index.d.ts +3 -0
  100. package/lib/components/table/types/update-options.d.ts +3 -0
  101. package/lib/components/table/utils/cached-head-map.d.ts +2 -0
  102. package/lib/components/table/utils/correct-priorities.d.ts +5 -0
  103. package/lib/components/table/utils/create-column.d.ts +6 -0
  104. package/lib/components/table/utils/create-intersection-observer.d.ts +2 -0
  105. package/lib/components/table/utils/create-unique-column-def.d.ts +1 -0
  106. package/lib/components/table/utils/filter-sort.d.ts +14 -0
  107. package/lib/components/table/utils/normalize-string.d.ts +2 -0
  108. package/lib/components/table/utils/table-data-source.d.ts +31 -0
  109. package/lib/components/table/utils/table-to-csv-object.d.ts +3 -0
  110. package/lib/components/table/utils/to-columns-data.d.ts +26 -0
  111. package/lib/components/tag/index.d.ts +2 -0
  112. package/lib/components/tag/tag.component.d.ts +10 -0
  113. package/lib/components/tag/tag.module.d.ts +10 -0
  114. package/lib/components/value/components/menu-value.component.d.ts +15 -0
  115. package/lib/components/value/components/value-list.component.d.ts +7 -0
  116. package/lib/components/value/index.d.ts +3 -0
  117. package/lib/components/value/types/base-type.d.ts +19 -0
  118. package/lib/components/value/types/value.d.ts +9 -0
  119. package/lib/components/value/utils/currency-amount-value-to-string.d.ts +8 -0
  120. package/lib/components/value/utils/datetime-value-to-string.d.ts +4 -0
  121. package/lib/components/value/utils/unknown-to-string.d.ts +1 -0
  122. package/lib/components/value/utils/value-to-string.d.ts +2 -0
  123. package/lib/components/value/value.component.d.ts +27 -0
  124. package/lib/directives/highlight.directive.d.ts +15 -0
  125. package/lib/directives/index.d.ts +2 -0
  126. package/lib/directives/tooltip.directive.d.ts +1 -0
  127. package/lib/index.d.ts +6 -0
  128. package/lib/pipes/amount-currency.pipe.d.ts +10 -0
  129. package/lib/pipes/enum-key-values.pipe.d.ts +10 -0
  130. package/lib/pipes/enum-key.pipe.d.ts +8 -0
  131. package/lib/pipes/enum-keys.pipe.d.ts +7 -0
  132. package/lib/pipes/humanized-duration.pipe.d.ts +13 -0
  133. package/lib/pipes/index.d.ts +8 -0
  134. package/lib/pipes/inline-json.pipe.d.ts +7 -0
  135. package/lib/pipes/pipes.module.d.ts +14 -0
  136. package/lib/pipes/select.pipe.d.ts +12 -0
  137. package/lib/services/config/config.service.d.ts +12 -0
  138. package/lib/services/config/index.d.ts +1 -0
  139. package/lib/services/fetch-superclass/fetch-superclass.d.ts +39 -0
  140. package/lib/services/fetch-superclass/index.d.ts +1 -0
  141. package/lib/services/index.d.ts +5 -0
  142. package/lib/services/log/index.d.ts +2 -0
  143. package/lib/services/log/log-error.d.ts +12 -0
  144. package/lib/services/log/log.module.d.ts +7 -0
  145. package/lib/services/log/notify-log.service.d.ts +17 -0
  146. package/lib/services/log/types/operation.d.ts +1 -0
  147. package/lib/services/query-params/index.d.ts +4 -0
  148. package/lib/services/query-params/query-params.module.d.ts +6 -0
  149. package/lib/services/query-params/query-params.service.d.ts +37 -0
  150. package/lib/services/query-params/types/serializer.d.ts +6 -0
  151. package/lib/services/query-params/utils/date-query-params-serializers.d.ts +2 -0
  152. package/lib/services/query-params/utils/deserialize-query-param.d.ts +2 -0
  153. package/lib/services/query-params/utils/index.d.ts +2 -0
  154. package/lib/services/query-params/utils/query-params-serializers.d.ts +3 -0
  155. package/lib/services/query-params/utils/serialize-query-param.d.ts +2 -0
  156. package/lib/services/url.service.d.ts +12 -0
  157. package/lib/styles/index.d.ts +1 -0
  158. package/lib/styles/types/color.d.ts +4 -0
  159. package/lib/types/progressable.d.ts +3 -0
  160. package/lib/utils/async/async-transform.d.ts +20 -0
  161. package/lib/utils/async/get-possibly-async-observable.d.ts +3 -0
  162. package/lib/utils/async/index.d.ts +3 -0
  163. package/lib/utils/async/is-async.d.ts +4 -0
  164. package/lib/utils/clean/clean.d.ts +2 -0
  165. package/lib/utils/clean/index.d.ts +1 -0
  166. package/lib/utils/compare/compare-different-types.d.ts +4 -0
  167. package/lib/utils/compare/index.d.ts +1 -0
  168. package/lib/utils/component/component-changes.d.ts +8 -0
  169. package/lib/utils/component/index.d.ts +1 -0
  170. package/lib/utils/csv/create-csv.d.ts +1 -0
  171. package/lib/utils/csv/index.d.ts +1 -0
  172. package/lib/utils/currency/format-currency.d.ts +1 -0
  173. package/lib/utils/currency/get-currency-exponent.d.ts +1 -0
  174. package/lib/utils/currency/index.d.ts +4 -0
  175. package/lib/utils/currency/to-major.d.ts +2 -0
  176. package/lib/utils/currency/to-minor.d.ts +2 -0
  177. package/lib/utils/date/get-no-time-zone-iso-string.d.ts +2 -0
  178. package/lib/utils/date/index.d.ts +1 -0
  179. package/lib/utils/decorators/debounce-time.d.ts +1 -0
  180. package/lib/utils/decorators/index.d.ts +1 -0
  181. package/lib/utils/empty/index.d.ts +3 -0
  182. package/lib/utils/empty/is-empty-primitive.d.ts +1 -0
  183. package/lib/utils/empty/is-empty.d.ts +1 -0
  184. package/lib/utils/empty/types/nil.d.ts +1 -0
  185. package/lib/utils/enum/get-enum-keys.d.ts +10 -0
  186. package/lib/utils/enum/index.d.ts +2 -0
  187. package/lib/utils/enum/types/enum.d.ts +2 -0
  188. package/lib/utils/enum/types/union-enum.d.ts +2 -0
  189. package/lib/utils/file/download-file.d.ts +8 -0
  190. package/lib/utils/file/index.d.ts +1 -0
  191. package/lib/utils/form/create-controls.d.ts +4 -0
  192. package/lib/utils/form/form-wrappers/abstract-control-superclass.d.ts +17 -0
  193. package/lib/utils/form/form-wrappers/form-component-superclass.directive.d.ts +14 -0
  194. package/lib/utils/form/form-wrappers/form-control-superclass.directive.d.ts +8 -0
  195. package/lib/utils/form/form-wrappers/form-group-superclass.directive.d.ts +11 -0
  196. package/lib/utils/form/form-wrappers/index.d.ts +5 -0
  197. package/lib/utils/form/form-wrappers/utils/create-control-providers.d.ts +2 -0
  198. package/lib/utils/form/form-wrappers/utils/get-errors-tree.d.ts +6 -0
  199. package/lib/utils/form/form-wrappers/utils/provide-validators.d.ts +2 -0
  200. package/lib/utils/form/form-wrappers/utils/provide-value-accessor.d.ts +2 -0
  201. package/lib/utils/form/get-valid-value-changes.d.ts +3 -0
  202. package/lib/utils/form/get-value-changes.d.ts +3 -0
  203. package/lib/utils/form/get-value.d.ts +2 -0
  204. package/lib/utils/form/has-controls.d.ts +2 -0
  205. package/lib/utils/form/index.d.ts +8 -0
  206. package/lib/utils/form/set-disabled.d.ts +2 -0
  207. package/lib/utils/form/types/form-group-by-value.d.ts +4 -0
  208. package/lib/utils/import/get-import-value.d.ts +2 -0
  209. package/lib/utils/import/index.d.ts +1 -0
  210. package/lib/utils/index.d.ts +18 -0
  211. package/lib/utils/json/index.d.ts +1 -0
  212. package/lib/utils/json/inline-json.d.ts +1 -0
  213. package/lib/utils/object/count-changed.d.ts +3 -0
  214. package/lib/utils/object/count-props.d.ts +1 -0
  215. package/lib/utils/object/index.d.ts +3 -0
  216. package/lib/utils/object/select.d.ts +3 -0
  217. package/lib/utils/operators/async-start-with.d.ts +2 -0
  218. package/lib/utils/operators/debounce-time-with-first.d.ts +2 -0
  219. package/lib/utils/operators/fork-join-to-result.d.ts +20 -0
  220. package/lib/utils/operators/get-observable.d.ts +3 -0
  221. package/lib/utils/operators/handle-error.d.ts +3 -0
  222. package/lib/utils/operators/in-progress-from.d.ts +2 -0
  223. package/lib/utils/operators/index.d.ts +8 -0
  224. package/lib/utils/operators/pass-error.d.ts +2 -0
  225. package/lib/utils/operators/progress-to.d.ts +2 -0
  226. package/lib/utils/operators/switch-combine-with.d.ts +6 -0
  227. package/lib/utils/string/index.d.ts +1 -0
  228. package/lib/utils/string/split-by-separators.d.ts +1 -0
  229. package/lib/utils/transform-attribute/array-attribute.d.ts +3 -0
  230. package/lib/utils/transform-attribute/index.d.ts +1 -0
  231. package/package.json +44 -0
@@ -0,0 +1 @@
1
+ export declare function createUniqueColumnDef(name?: unknown): string;
@@ -0,0 +1,14 @@
1
+ import { Sort } from '@angular/material/sort';
2
+ import { Observable } from 'rxjs';
3
+ import { NormColumn } from '../types';
4
+ import { ColumnData, DisplayedData, DisplayedDataItem } from '../utils/to-columns-data';
5
+ export type FilterSearchData<T extends object, C extends object> = Map<DisplayedDataItem<T, C>, {
6
+ byColumns: string[][];
7
+ byRow: string;
8
+ }>;
9
+ export declare function columnsDataToFilterSearchData<T extends object, C extends object>(src$: Observable<Map<DisplayedDataItem<T, C>, ColumnData>>): Observable<Map<DisplayedDataItem<T, C>, {
10
+ byColumns: string[][];
11
+ byRow: string;
12
+ }>>;
13
+ export declare function filterData<T extends object, C extends object>(data: FilterSearchData<T, C>, search: string): DisplayedDataItem<T, C>[];
14
+ export declare function sortData<T extends object, C extends object>(source: DisplayedData<T, C>, data: FilterSearchData<T, C>, columns: NormColumn<T, C>[], sort: Sort): DisplayedData<T, C>;
@@ -0,0 +1,2 @@
1
+ export declare const SPACES: RegExp;
2
+ export declare function normalizeString(str: string): string;
@@ -0,0 +1,31 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { MatPaginator, PageEvent } from '@angular/material/paginator';
3
+ import { MatTableDataSource } from '@angular/material/table';
4
+ import { BehaviorSubject, Observable } from 'rxjs';
5
+ import { TreeData, TreeInlineData, TreeInlineDataItem } from '../tree-data';
6
+ export declare class TableDataSource<T extends object, C extends object = never> extends MatTableDataSource<T | TreeInlineDataItem<T, C>, OnePageTableDataSourcePaginator & MatPaginator> {
7
+ isTreeData$: BehaviorSubject<boolean>;
8
+ sourceData$: BehaviorSubject<TreeData<T, C> | T[]>;
9
+ data$: Observable<T[] | TreeInlineData<T, C>>;
10
+ get paginator(): OnePageTableDataSourcePaginator & MatPaginator;
11
+ private __paginator;
12
+ constructor();
13
+ setData(data: T[]): void;
14
+ setTreeData(data: TreeData<T, C>): void;
15
+ }
16
+ declare class OnePageTableDataSourcePaginator implements Partial<MatPaginator> {
17
+ pageIndex: number;
18
+ pageSize: number;
19
+ page: EventEmitter<PageEvent>;
20
+ initialized: BehaviorSubject<undefined>;
21
+ get length(): number;
22
+ set length(_length: number);
23
+ get displayedPages(): number;
24
+ private partSize;
25
+ constructor(partSize?: number);
26
+ setSize(partSize?: number): void;
27
+ reload(): void;
28
+ more(): void;
29
+ private update;
30
+ }
31
+ export {};
@@ -0,0 +1,3 @@
1
+ import { Value } from '../../value';
2
+ import { ColumnData, DisplayedDataItem } from '../utils/to-columns-data';
3
+ export declare function tableToCsvObject<T extends object, C extends object>(cols: Value[], displayedData: Map<DisplayedDataItem<T, C>, ColumnData>): string[][];
@@ -0,0 +1,26 @@
1
+ import { Observable } from 'rxjs';
2
+ import { Overwrite } from 'utility-types';
3
+ import { Value } from '../../value';
4
+ import { TreeInlineData, TreeInlineDataItem } from '../tree-data';
5
+ import { NormColumn } from '../types';
6
+ export type DisplayedDataItem<T extends object, C extends object> = TreeInlineDataItem<T, C> | T;
7
+ export type DisplayedData<T extends object, C extends object> = TreeInlineData<T, C> | T[];
8
+ export type ColumnDataItem = {
9
+ value: Value | null;
10
+ lazyValue?: Observable<Value>;
11
+ isChild?: boolean;
12
+ isNextChild?: boolean;
13
+ };
14
+ export type ColumnData = ColumnDataItem[];
15
+ type ScanColumnDataItem = Overwrite<ColumnDataItem, {
16
+ value: Observable<Value | null>;
17
+ }>;
18
+ type ScanColumnData<T extends object, C extends object> = Map<NormColumn<T, C>, ScanColumnDataItem>;
19
+ type ColumnDataMap<T extends object, C extends object> = Map<DisplayedDataItem<T, C>, ScanColumnData<T, C>>;
20
+ export declare function toObservableColumnsData<T extends object, C extends object>(src$: Observable<{
21
+ isTree: boolean;
22
+ data: DisplayedData<T, C>;
23
+ cols: NormColumn<T, C>[];
24
+ }>): Observable<ColumnDataMap<T, C>>;
25
+ export declare function toColumnsData<T extends object, C extends object>(src$: Observable<ColumnDataMap<T, C>>): Observable<Map<DisplayedDataItem<T, C>, ColumnData>>;
26
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './tag.module';
2
+ export * from './tag.component';
@@ -0,0 +1,10 @@
1
+ import { Color } from '../../styles';
2
+ import * as i0 from "@angular/core";
3
+ export declare class TagComponent {
4
+ hostClass: boolean;
5
+ color?: Color;
6
+ icon: import("@angular/core").InputSignal<string | undefined>;
7
+ progress: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<TagComponent, never>;
9
+ static ɵcmp: i0.ɵɵComponentDeclaration<TagComponent, "v-tag", never, { "color": { "alias": "color"; "required": false; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "progress": { "alias": "progress"; "required": false; "isSignal": true; }; }, {}, never, ["*"], false, never>;
10
+ }
@@ -0,0 +1,10 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./tag.component";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/material/chips";
5
+ import * as i4 from "@angular/material/icon";
6
+ export declare class TagModule {
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<TagModule, never>;
8
+ static ɵmod: i0.ɵɵNgModuleDeclaration<TagModule, [typeof i1.TagComponent], [typeof i2.CommonModule, typeof i3.MatChipsModule, typeof i4.MatIconModule], [typeof i1.TagComponent]>;
9
+ static ɵinj: i0.ɵɵInjectorDeclaration<TagModule>;
10
+ }
@@ -0,0 +1,15 @@
1
+ import { TypedParamsValue } from '../types/base-type';
2
+ import * as i0 from "@angular/core";
3
+ export interface MenuItem {
4
+ label: string;
5
+ click?: (event: MouseEvent) => void;
6
+ disabled?: boolean;
7
+ }
8
+ export type MenuValue = TypedParamsValue<'menu', {
9
+ items: MenuItem[];
10
+ }>;
11
+ export declare class MenuValueComponent {
12
+ value: import("@angular/core").InputSignal<MenuValue>;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<MenuValueComponent, never>;
14
+ static ɵcmp: i0.ɵɵComponentDeclaration<MenuValueComponent, "v-menu-value", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
15
+ }
@@ -0,0 +1,7 @@
1
+ import { Value } from '../types/value';
2
+ import * as i0 from "@angular/core";
3
+ export declare class ValueListComponent {
4
+ list: import("@angular/core").InputSignal<Value[] | null | undefined>;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<ValueListComponent, never>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<ValueListComponent, "v-value-list", never, { "list": { "alias": "list"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
7
+ }
@@ -0,0 +1,3 @@
1
+ export * from './value.component';
2
+ export * from './components/value-list.component';
3
+ export * from './types/value';
@@ -0,0 +1,19 @@
1
+ import { TemplateRef } from '@angular/core';
2
+ import { Router } from '@angular/router';
3
+ import { Color } from '../../../styles';
4
+ export type BaseValue<V = unknown> = {
5
+ value?: V;
6
+ description?: string | number | boolean;
7
+ tooltip?: string;
8
+ color?: Color;
9
+ click?: (event: MouseEvent) => void;
10
+ link?: (event: MouseEvent) => string | Parameters<Router['navigate']>;
11
+ template?: TemplateRef<unknown>;
12
+ inProgress?: boolean;
13
+ };
14
+ export type TypedValue<T, V = unknown> = BaseValue<V> & {
15
+ type: T;
16
+ };
17
+ export type TypedParamsValue<T, P extends object, V = unknown> = TypedValue<T, V> & {
18
+ params: P;
19
+ };
@@ -0,0 +1,9 @@
1
+ import { MenuValue } from '../components/menu-value.component';
2
+ import { CurrencyAmountValue } from '../utils/currency-amount-value-to-string';
3
+ import { DatetimeValue } from '../utils/datetime-value-to-string';
4
+ import { BaseValue } from './base-type';
5
+ type TypedBaseValue = BaseValue & {
6
+ type?: never;
7
+ };
8
+ export type Value = TypedBaseValue | DatetimeValue | MenuValue | CurrencyAmountValue;
9
+ export {};
@@ -0,0 +1,8 @@
1
+ import { formatCurrency } from '../../../utils';
2
+ import { TypedParamsValue } from '../types/base-type';
3
+ export type CurrencyAmountValue = TypedParamsValue<'currency', {
4
+ code: string;
5
+ exponent?: number;
6
+ major?: boolean;
7
+ }, Parameters<typeof formatCurrency>[0]>;
8
+ export declare function currencyAmountValueToString(value: CurrencyAmountValue): string;
@@ -0,0 +1,4 @@
1
+ import { formatDate } from '@angular/common';
2
+ import { TypedValue } from '../types/base-type';
3
+ export type DatetimeValue = TypedValue<'datetime', Parameters<typeof formatDate>[0]>;
4
+ export declare function datetimeValueToString(value: DatetimeValue): string;
@@ -0,0 +1 @@
1
+ export declare function unknownToString(value: unknown): string;
@@ -0,0 +1,2 @@
1
+ import { Value } from '../types/value';
2
+ export declare function valueToString(value?: Value | null): string;
@@ -0,0 +1,27 @@
1
+ import { Injector } from '@angular/core';
2
+ import { Router } from '@angular/router';
3
+ import { Observable } from 'rxjs';
4
+ import { Nil } from '../../utils';
5
+ import { Value } from './types/value';
6
+ import * as i0 from "@angular/core";
7
+ export declare class ValueComponent {
8
+ private injector;
9
+ private router;
10
+ value: import("@angular/core").InputSignal<Nil | Value>;
11
+ lazyValue: import("@angular/core").InputSignal<Nil | Observable<Value>>;
12
+ lazyVisible: import("@angular/core").ModelSignal<boolean>;
13
+ progress: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
14
+ inline: boolean;
15
+ emptySymbol: string;
16
+ highlight?: string | null;
17
+ value$: Observable<Nil | Value>;
18
+ valueText$: Observable<string>;
19
+ inProgress$: Observable<boolean>;
20
+ constructor(injector: Injector, router: Router);
21
+ makeLazyVisible(): void;
22
+ click(event: MouseEvent): void;
23
+ static ɵfac: i0.ɵɵFactoryDeclaration<ValueComponent, never>;
24
+ static ɵcmp: i0.ɵɵComponentDeclaration<ValueComponent, "v-value", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "lazyValue": { "alias": "lazyValue"; "required": false; "isSignal": true; }; "lazyVisible": { "alias": "lazyVisible"; "required": false; "isSignal": true; }; "progress": { "alias": "progress"; "required": false; "isSignal": true; }; "inline": { "alias": "inline"; "required": false; }; "emptySymbol": { "alias": "emptySymbol"; "required": false; }; "highlight": { "alias": "highlight"; "required": false; }; }, { "lazyVisible": "lazyVisibleChange"; }, never, never, true, never>;
25
+ static ngAcceptInputType_inline: unknown;
26
+ static ngAcceptInputType_emptySymbol: unknown;
27
+ }
@@ -0,0 +1,15 @@
1
+ import { DestroyRef, ElementRef, Injector, OnInit, Renderer2 } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class HighlightDirective implements OnInit {
4
+ private el;
5
+ private renderer;
6
+ private dr;
7
+ private injector;
8
+ vHighlightText: import("@angular/core").InputSignalWithTransform<string, unknown>;
9
+ vHighlightSearch: import("@angular/core").InputSignalWithTransform<string, unknown>;
10
+ constructor(el: ElementRef, renderer: Renderer2, dr: DestroyRef, injector: Injector);
11
+ ngOnInit(): void;
12
+ private escapeHtml;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<HighlightDirective, never>;
14
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HighlightDirective, "[vHighlight]", never, { "vHighlightText": { "alias": "vHighlightText"; "required": false; "isSignal": true; }; "vHighlightSearch": { "alias": "vHighlightSearch"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
15
+ }
@@ -0,0 +1,2 @@
1
+ export * from './tooltip.directive';
2
+ export * from './highlight.directive';
@@ -0,0 +1 @@
1
+ export { MtxTooltip as Tooltip } from '@ng-matero/extensions/tooltip';
package/lib/index.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ export * from './components';
2
+ export * from './directives';
3
+ export * from './services';
4
+ export * from './pipes';
5
+ export * from './utils';
6
+ export * from './styles';
@@ -0,0 +1,10 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class AmountCurrencyPipe implements PipeTransform {
4
+ private _locale;
5
+ private _defaultCurrencyCode;
6
+ constructor(_locale: string, _defaultCurrencyCode?: string);
7
+ transform(amount: unknown, currencyCode?: string, format?: 'short' | 'long', exponent?: number, isMajor?: boolean): unknown;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<AmountCurrencyPipe, never>;
9
+ static ɵpipe: i0.ɵɵPipeDeclaration<AmountCurrencyPipe, "amountCurrency", true>;
10
+ }
@@ -0,0 +1,10 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class EnumKeyValuesPipe implements PipeTransform {
4
+ transform<E extends Record<PropertyKey, unknown>>(value: E): {
5
+ key: keyof E;
6
+ value: import("utility-types").ValuesType<E>;
7
+ }[];
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<EnumKeyValuesPipe, never>;
9
+ static ɵpipe: i0.ɵɵPipeDeclaration<EnumKeyValuesPipe, "enumKeyValues", true>;
10
+ }
@@ -0,0 +1,8 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { ValuesType } from 'utility-types';
3
+ import * as i0 from "@angular/core";
4
+ export declare class EnumKeyPipe implements PipeTransform {
5
+ transform<E extends Record<PropertyKey, unknown>>(value: ValuesType<E>, enumObj: E): "" | keyof E;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<EnumKeyPipe, never>;
7
+ static ɵpipe: i0.ɵɵPipeDeclaration<EnumKeyPipe, "enumKey", true>;
8
+ }
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class EnumKeysPipe implements PipeTransform {
4
+ transform<E extends Record<PropertyKey, unknown>>(value: E): (keyof E)[];
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<EnumKeysPipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<EnumKeysPipe, "enumKeys", true>;
7
+ }
@@ -0,0 +1,13 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { AsyncTransform, AsyncTransformParameters } from '../utils';
3
+ import * as i0 from "@angular/core";
4
+ export type HumanizedDurationValue = ConstructorParameters<DateConstructor>[0];
5
+ export interface HumanizedDurationConfig {
6
+ hasAgoEnding?: boolean;
7
+ }
8
+ export declare class HumanizedDurationPipe extends AsyncTransform<HumanizedDurationValue, [HumanizedDurationConfig]> implements PipeTransform {
9
+ protected result$: import("rxjs").Observable<string>;
10
+ transform(...params: AsyncTransformParameters<HumanizedDurationValue, [HumanizedDurationConfig]>): string | null;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<HumanizedDurationPipe, never>;
12
+ static ɵpipe: i0.ɵɵPipeDeclaration<HumanizedDurationPipe, "humanizedDuration", true>;
13
+ }
@@ -0,0 +1,8 @@
1
+ export * from './pipes.module';
2
+ export * from './inline-json.pipe';
3
+ export * from './enum-key.pipe';
4
+ export * from './enum-keys.pipe';
5
+ export * from './enum-key-values.pipe';
6
+ export * from './amount-currency.pipe';
7
+ export * from './select.pipe';
8
+ export * from './humanized-duration.pipe';
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class InlineJsonPipe implements PipeTransform {
4
+ transform(value: unknown, maxReadableLever?: number | false): string;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<InlineJsonPipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<InlineJsonPipe, "inlineJson", false>;
7
+ }
@@ -0,0 +1,14 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./inline-json.pipe";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "./enum-key.pipe";
5
+ import * as i4 from "./enum-keys.pipe";
6
+ import * as i5 from "./enum-key-values.pipe";
7
+ import * as i6 from "./amount-currency.pipe";
8
+ import * as i7 from "./select.pipe";
9
+ import * as i8 from "./humanized-duration.pipe";
10
+ export declare class PipesModule {
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<PipesModule, never>;
12
+ static ɵmod: i0.ɵɵNgModuleDeclaration<PipesModule, [typeof i1.InlineJsonPipe], [typeof i2.CommonModule, typeof i3.EnumKeyPipe, typeof i4.EnumKeysPipe, typeof i5.EnumKeyValuesPipe, typeof i6.AmountCurrencyPipe, typeof i7.VSelectPipe, typeof i8.HumanizedDurationPipe], [typeof i1.InlineJsonPipe, typeof i3.EnumKeyPipe, typeof i4.EnumKeysPipe, typeof i5.EnumKeyValuesPipe, typeof i6.AmountCurrencyPipe, typeof i7.VSelectPipe, typeof i8.HumanizedDurationPipe]>;
13
+ static ɵinj: i0.ɵɵInjectorDeclaration<PipesModule>;
14
+ }
@@ -0,0 +1,12 @@
1
+ import { ChangeDetectorRef, OnDestroy, PipeTransform } from '@angular/core';
2
+ import { SelectFn } from '../utils';
3
+ import * as i0 from "@angular/core";
4
+ export declare class VSelectPipe<TObject extends object, TResult, TParams extends Array<unknown> = []> implements PipeTransform, OnDestroy {
5
+ private ref;
6
+ private asyncPipe?;
7
+ constructor(ref: ChangeDetectorRef);
8
+ transform(obj: TObject, selectFn: SelectFn<TObject, TResult, TParams>, defaultValue?: TResult, rest?: TParams[]): TResult | null;
9
+ ngOnDestroy(): void;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<VSelectPipe<any, any, any>, never>;
11
+ static ɵpipe: i0.ɵɵPipeDeclaration<VSelectPipe<any, any, any>, "vSelect", true>;
12
+ }
@@ -0,0 +1,12 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import * as i0 from "@angular/core";
3
+ export declare class ConfigServiceSuperclass<T> {
4
+ private http;
5
+ config: T;
6
+ constructor(http: HttpClient);
7
+ init({ configUrl }: {
8
+ configUrl: string;
9
+ }): Promise<void>;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<ConfigServiceSuperclass<any>, never>;
11
+ static ɵprov: i0.ɵɵInjectableDeclaration<ConfigServiceSuperclass<any>>;
12
+ }
@@ -0,0 +1 @@
1
+ export * from './config.service';
@@ -0,0 +1,39 @@
1
+ import { Observable } from 'rxjs';
2
+ export interface Action<TParams> {
3
+ type: 'load' | 'reload' | 'more' | 'init';
4
+ params?: TParams;
5
+ size?: number;
6
+ }
7
+ export interface FetchResult<TResultItem, TContinuationToken = string> {
8
+ result: TResultItem[];
9
+ continuationToken?: TContinuationToken;
10
+ }
11
+ export interface FetchOptions<TContinuationToken = string> {
12
+ size: number;
13
+ continuationToken?: TContinuationToken;
14
+ }
15
+ export interface LoadOptions {
16
+ size?: number;
17
+ }
18
+ export interface Accumulator<TResultItem, TParams, TContinuationToken> {
19
+ result: TResultItem[];
20
+ size: number;
21
+ params?: TParams;
22
+ continuationToken?: TContinuationToken;
23
+ }
24
+ export declare abstract class FetchSuperclass<TResultItem, TParams = void, TContinuationToken = string> {
25
+ result$: Observable<TResultItem[]>;
26
+ hasMore$: Observable<boolean>;
27
+ isLoading$: Observable<boolean>;
28
+ private fetch$;
29
+ private progress$;
30
+ private state$;
31
+ private skipPrevious$;
32
+ load(params: TParams, options?: LoadOptions): void;
33
+ reload(options?: LoadOptions): void;
34
+ more(): void;
35
+ protected abstract fetch(params: TParams, options: FetchOptions<TContinuationToken>): Observable<FetchResult<TResultItem, TContinuationToken>>;
36
+ }
37
+ export declare abstract class SingleFetchSuperclass<TResultItem, TParams = void> extends FetchSuperclass<TResultItem, TParams, never> {
38
+ more: () => never;
39
+ }
@@ -0,0 +1 @@
1
+ export * from './fetch-superclass';
@@ -0,0 +1,5 @@
1
+ export * from './config';
2
+ export * from './log';
3
+ export * from './fetch-superclass';
4
+ export * from './query-params';
5
+ export * from './url.service';
@@ -0,0 +1,2 @@
1
+ export * from './log.module';
2
+ export * from './notify-log.service';
@@ -0,0 +1,12 @@
1
+ export declare const DEFAULT_ERROR_NAME = "Unknown error";
2
+ export declare class LogError {
3
+ source: Record<PropertyKey, unknown>;
4
+ get name(): string;
5
+ get message(): string;
6
+ get cause(): unknown;
7
+ get details(): {
8
+ [k: string]: unknown;
9
+ };
10
+ constructor(error: unknown);
11
+ getLogMessage(message?: string): string;
12
+ }
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "@angular/material/snack-bar";
3
+ export declare class LogModule {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<LogModule, never>;
5
+ static ɵmod: i0.ɵɵNgModuleDeclaration<LogModule, never, [typeof i1.MatSnackBarModule], never>;
6
+ static ɵinj: i0.ɵɵInjectorDeclaration<LogModule>;
7
+ }
@@ -0,0 +1,17 @@
1
+ import { MatSnackBar } from '@angular/material/snack-bar';
2
+ import { PossiblyAsync } from '../../utils';
3
+ import { Operation } from './types/operation';
4
+ import * as i0 from "@angular/core";
5
+ export declare class NotifyLogService {
6
+ private snackBar;
7
+ constructor(snackBar: MatSnackBar);
8
+ success: (message?: PossiblyAsync<string>) => void;
9
+ error: (errors: unknown | unknown[], message?: PossiblyAsync<string>) => void;
10
+ createErrorOperation(operation: Operation, objectName: string): (err: unknown) => void;
11
+ successOperation(operation: Operation, objectName: string): void;
12
+ errorOperation(errors: unknown | unknown[], operation: Operation, objectName: string): void;
13
+ private notify;
14
+ private subscribeWithTimeout;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<NotifyLogService, never>;
16
+ static ɵprov: i0.ɵɵInjectableDeclaration<NotifyLogService>;
17
+ }
@@ -0,0 +1 @@
1
+ export type Operation = 'create' | 'receive' | 'update' | 'delete';
@@ -0,0 +1,4 @@
1
+ export * from './query-params.service';
2
+ export * from './query-params.module';
3
+ export * from './utils';
4
+ export * from './types/serializer';
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class QueryParamsModule {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<QueryParamsModule, never>;
4
+ static ɵmod: i0.ɵɵNgModuleDeclaration<QueryParamsModule, never, never, never>;
5
+ static ɵinj: i0.ɵɵInjectorDeclaration<QueryParamsModule>;
6
+ }
@@ -0,0 +1,37 @@
1
+ import { ActivatedRoute, Router } from '@angular/router';
2
+ import { Observable } from 'rxjs';
3
+ import { Serializer } from './types/serializer';
4
+ import * as i0 from "@angular/core";
5
+ interface SerializeOptions {
6
+ filter?: (param: unknown, key: string) => boolean;
7
+ }
8
+ interface BaseQueryParams<T extends object> {
9
+ params$: Observable<Partial<T>>;
10
+ params: Partial<T>;
11
+ set: (params: T, options?: SerializeOptions) => Promise<boolean>;
12
+ patch: (params: Partial<T>, options?: SerializeOptions) => Promise<boolean>;
13
+ }
14
+ export interface QueryParamsNamespace<T extends object> extends BaseQueryParams<T> {
15
+ destroy: () => void;
16
+ }
17
+ export declare class QueryParamsService<P extends object = NonNullable<unknown>> implements BaseQueryParams<P> {
18
+ private router;
19
+ private route;
20
+ private readonly serializers?;
21
+ params$: Observable<P>;
22
+ get params(): P;
23
+ private sourceParams$;
24
+ constructor(router: Router, route: ActivatedRoute, serializers?: Serializer[] | undefined);
25
+ set(params: P, options?: SerializeOptions): Promise<boolean>;
26
+ patch(params: Partial<P>, options?: SerializeOptions): Promise<boolean>;
27
+ createNamespace<TNamespaceParams extends object>(ns: string): QueryParamsNamespace<TNamespaceParams>;
28
+ private setParams;
29
+ private getSourceParams;
30
+ private serialize;
31
+ private deserialize;
32
+ private serializeNamespace;
33
+ private deserializeNamespace;
34
+ static ɵfac: i0.ɵɵFactoryDeclaration<QueryParamsService<any>, [null, null, { optional: true; }]>;
35
+ static ɵprov: i0.ɵɵInjectableDeclaration<QueryParamsService<any>>;
36
+ }
37
+ export {};
@@ -0,0 +1,6 @@
1
+ export type Serializer<T = unknown> = {
2
+ id: string;
3
+ serialize: (v: T) => string;
4
+ deserialize: (v: string) => T;
5
+ recognize: (v: T) => boolean;
6
+ };
@@ -0,0 +1,2 @@
1
+ import { Serializer } from '../types/serializer';
2
+ export declare const DATE_QUERY_PARAMS_SERIALIZERS: Serializer[];
@@ -0,0 +1,2 @@
1
+ import { Serializer } from '../types/serializer';
2
+ export declare function deserializeQueryParam<P>(value: string, serializers?: Serializer[]): P;
@@ -0,0 +1,2 @@
1
+ export * from './date-query-params-serializers';
2
+ export * from './query-params-serializers';
@@ -0,0 +1,3 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ import { Serializer } from '../types/serializer';
3
+ export declare const QUERY_PARAMS_SERIALIZERS: InjectionToken<Serializer[]>;
@@ -0,0 +1,2 @@
1
+ import { Serializer } from '../types/serializer';
2
+ export declare function serializeQueryParam(value: unknown, serializers?: Serializer[]): string;
@@ -0,0 +1,12 @@
1
+ import { Router } from '@angular/router';
2
+ import * as i0 from "@angular/core";
3
+ export declare class UrlService {
4
+ private router;
5
+ url$: import("rxjs").Observable<string>;
6
+ path$: import("rxjs").Observable<string[]>;
7
+ get url(): string;
8
+ get path(): string[];
9
+ constructor(router: Router);
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<UrlService, never>;
11
+ static ɵprov: i0.ɵɵInjectableDeclaration<UrlService>;
12
+ }
@@ -0,0 +1 @@
1
+ export * from './types/color';
@@ -0,0 +1,4 @@
1
+ import { ThemePalette as MatThemePalette } from '@angular/material/core';
2
+ export type ThemePalette = MatThemePalette;
3
+ export type StatusPalette = 'success' | 'pending' | 'neutral';
4
+ export type Color = ThemePalette | StatusPalette;
@@ -0,0 +1,3 @@
1
+ export interface Progressable {
2
+ progress?: boolean | number | null | string;
3
+ }
@@ -0,0 +1,20 @@
1
+ import { OnDestroy } from '@angular/core';
2
+ import { Observable } from 'rxjs';
3
+ import { PossiblyAsync } from './is-async';
4
+ import * as i0 from "@angular/core";
5
+ export type AsyncTransformParameters<TValue = unknown, TParams extends unknown[] = []> = [
6
+ PossiblyAsync<TValue>,
7
+ ...TParams
8
+ ];
9
+ export declare abstract class AsyncTransform<TValue = unknown, TParams extends unknown[] = [], TResult = string | null> implements OnDestroy {
10
+ protected abstract result$: Observable<TResult>;
11
+ protected params$: Observable<[TValue, ...TParams]>;
12
+ private asyncPipe;
13
+ private cdr;
14
+ private args$;
15
+ constructor();
16
+ ngOnDestroy(): void;
17
+ protected asyncTransform(args: AsyncTransformParameters<TValue, TParams>): TResult | null;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<AsyncTransform<any, any, any>, never>;
19
+ static ɵprov: i0.ɵɵInjectableDeclaration<AsyncTransform<any, any, any>>;
20
+ }