@tectra-ng/utils 0.0.0-stage → 0.2.1

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 (147) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +41 -2
  3. package/auto-focus/README.md +19 -0
  4. package/breakpoint/README.md +23 -0
  5. package/clipboard/README.md +37 -0
  6. package/clock/README.md +21 -0
  7. package/currency/README.md +17 -0
  8. package/date/README.md +46 -0
  9. package/debounce-input/README.md +31 -0
  10. package/drag-scroll/README.md +25 -0
  11. package/fesm2022/tectra-ng-utils-auto-focus.mjs +100 -0
  12. package/fesm2022/tectra-ng-utils-auto-focus.mjs.map +1 -0
  13. package/fesm2022/tectra-ng-utils-breakpoint.mjs +54 -0
  14. package/fesm2022/tectra-ng-utils-breakpoint.mjs.map +1 -0
  15. package/fesm2022/tectra-ng-utils-clipboard.mjs +225 -0
  16. package/fesm2022/tectra-ng-utils-clipboard.mjs.map +1 -0
  17. package/fesm2022/tectra-ng-utils-clock.mjs +59 -0
  18. package/fesm2022/tectra-ng-utils-clock.mjs.map +1 -0
  19. package/fesm2022/tectra-ng-utils-currency.mjs +63 -0
  20. package/fesm2022/tectra-ng-utils-currency.mjs.map +1 -0
  21. package/fesm2022/tectra-ng-utils-date.mjs +200 -0
  22. package/fesm2022/tectra-ng-utils-date.mjs.map +1 -0
  23. package/fesm2022/tectra-ng-utils-debounce-input.mjs +156 -0
  24. package/fesm2022/tectra-ng-utils-debounce-input.mjs.map +1 -0
  25. package/fesm2022/tectra-ng-utils-drag-scroll.mjs +199 -0
  26. package/fesm2022/tectra-ng-utils-drag-scroll.mjs.map +1 -0
  27. package/fesm2022/tectra-ng-utils-file.mjs +78 -0
  28. package/fesm2022/tectra-ng-utils-file.mjs.map +1 -0
  29. package/fesm2022/tectra-ng-utils-filter-state.mjs +238 -0
  30. package/fesm2022/tectra-ng-utils-filter-state.mjs.map +1 -0
  31. package/fesm2022/tectra-ng-utils-filter.mjs +88 -0
  32. package/fesm2022/tectra-ng-utils-filter.mjs.map +1 -0
  33. package/fesm2022/tectra-ng-utils-form-changes.mjs +70 -0
  34. package/fesm2022/tectra-ng-utils-form-changes.mjs.map +1 -0
  35. package/fesm2022/tectra-ng-utils-form-validation.mjs +162 -0
  36. package/fesm2022/tectra-ng-utils-form-validation.mjs.map +1 -0
  37. package/fesm2022/tectra-ng-utils-go-back.mjs +117 -0
  38. package/fesm2022/tectra-ng-utils-go-back.mjs.map +1 -0
  39. package/fesm2022/tectra-ng-utils-http.mjs +189 -0
  40. package/fesm2022/tectra-ng-utils-http.mjs.map +1 -0
  41. package/fesm2022/tectra-ng-utils-in-view.mjs +297 -0
  42. package/fesm2022/tectra-ng-utils-in-view.mjs.map +1 -0
  43. package/fesm2022/tectra-ng-utils-plural.mjs +98 -0
  44. package/fesm2022/tectra-ng-utils-plural.mjs.map +1 -0
  45. package/fesm2022/tectra-ng-utils-polling.mjs +109 -0
  46. package/fesm2022/tectra-ng-utils-polling.mjs.map +1 -0
  47. package/fesm2022/tectra-ng-utils-random.mjs +20 -0
  48. package/fesm2022/tectra-ng-utils-random.mjs.map +1 -0
  49. package/fesm2022/tectra-ng-utils-relative-time.mjs +87 -0
  50. package/fesm2022/tectra-ng-utils-relative-time.mjs.map +1 -0
  51. package/fesm2022/tectra-ng-utils-scroll-end.mjs +136 -0
  52. package/fesm2022/tectra-ng-utils-scroll-end.mjs.map +1 -0
  53. package/fesm2022/tectra-ng-utils-selection.mjs +52 -0
  54. package/fesm2022/tectra-ng-utils-selection.mjs.map +1 -0
  55. package/fesm2022/tectra-ng-utils-stop-propagation.mjs +92 -0
  56. package/fesm2022/tectra-ng-utils-stop-propagation.mjs.map +1 -0
  57. package/fesm2022/tectra-ng-utils-stream.mjs +30 -0
  58. package/fesm2022/tectra-ng-utils-stream.mjs.map +1 -0
  59. package/fesm2022/tectra-ng-utils-style-class.mjs +350 -0
  60. package/fesm2022/tectra-ng-utils-style-class.mjs.map +1 -0
  61. package/fesm2022/tectra-ng-utils-text.mjs +173 -0
  62. package/fesm2022/tectra-ng-utils-text.mjs.map +1 -0
  63. package/fesm2022/tectra-ng-utils-title.mjs +99 -0
  64. package/fesm2022/tectra-ng-utils-title.mjs.map +1 -0
  65. package/fesm2022/tectra-ng-utils-validators.mjs +232 -0
  66. package/fesm2022/tectra-ng-utils-validators.mjs.map +1 -0
  67. package/fesm2022/tectra-ng-utils.mjs +4 -0
  68. package/fesm2022/tectra-ng-utils.mjs.map +1 -0
  69. package/file/README.md +19 -0
  70. package/filter/README.md +22 -0
  71. package/filter-state/README.md +36 -0
  72. package/form-changes/README.md +26 -0
  73. package/form-validation/README.md +40 -0
  74. package/go-back/README.md +28 -0
  75. package/http/README.md +34 -0
  76. package/in-view/README.md +34 -0
  77. package/package.json +181 -3
  78. package/plural/README.md +21 -0
  79. package/polling/README.md +34 -0
  80. package/random/README.md +10 -0
  81. package/relative-time/README.md +29 -0
  82. package/scroll-end/README.md +25 -0
  83. package/selection/README.md +24 -0
  84. package/stop-propagation/README.md +15 -0
  85. package/stream/README.md +14 -0
  86. package/style-class/README.md +34 -0
  87. package/text/README.md +25 -0
  88. package/title/README.md +26 -0
  89. package/types/tectra-ng-utils-auto-focus.d.ts +22 -0
  90. package/types/tectra-ng-utils-auto-focus.d.ts.map +1 -0
  91. package/types/tectra-ng-utils-breakpoint.d.ts +15 -0
  92. package/types/tectra-ng-utils-breakpoint.d.ts.map +1 -0
  93. package/types/tectra-ng-utils-clipboard.d.ts +48 -0
  94. package/types/tectra-ng-utils-clipboard.d.ts.map +1 -0
  95. package/types/tectra-ng-utils-clock.d.ts +18 -0
  96. package/types/tectra-ng-utils-clock.d.ts.map +1 -0
  97. package/types/tectra-ng-utils-currency.d.ts +11 -0
  98. package/types/tectra-ng-utils-currency.d.ts.map +1 -0
  99. package/types/tectra-ng-utils-date.d.ts +65 -0
  100. package/types/tectra-ng-utils-date.d.ts.map +1 -0
  101. package/types/tectra-ng-utils-debounce-input.d.ts +38 -0
  102. package/types/tectra-ng-utils-debounce-input.d.ts.map +1 -0
  103. package/types/tectra-ng-utils-drag-scroll.d.ts +41 -0
  104. package/types/tectra-ng-utils-drag-scroll.d.ts.map +1 -0
  105. package/types/tectra-ng-utils-file.d.ts +18 -0
  106. package/types/tectra-ng-utils-file.d.ts.map +1 -0
  107. package/types/tectra-ng-utils-filter-state.d.ts +55 -0
  108. package/types/tectra-ng-utils-filter-state.d.ts.map +1 -0
  109. package/types/tectra-ng-utils-filter.d.ts +21 -0
  110. package/types/tectra-ng-utils-filter.d.ts.map +1 -0
  111. package/types/tectra-ng-utils-form-changes.d.ts +22 -0
  112. package/types/tectra-ng-utils-form-changes.d.ts.map +1 -0
  113. package/types/tectra-ng-utils-form-validation.d.ts +45 -0
  114. package/types/tectra-ng-utils-form-validation.d.ts.map +1 -0
  115. package/types/tectra-ng-utils-go-back.d.ts +25 -0
  116. package/types/tectra-ng-utils-go-back.d.ts.map +1 -0
  117. package/types/tectra-ng-utils-http.d.ts +47 -0
  118. package/types/tectra-ng-utils-http.d.ts.map +1 -0
  119. package/types/tectra-ng-utils-in-view.d.ts +80 -0
  120. package/types/tectra-ng-utils-in-view.d.ts.map +1 -0
  121. package/types/tectra-ng-utils-plural.d.ts +21 -0
  122. package/types/tectra-ng-utils-plural.d.ts.map +1 -0
  123. package/types/tectra-ng-utils-polling.d.ts +61 -0
  124. package/types/tectra-ng-utils-polling.d.ts.map +1 -0
  125. package/types/tectra-ng-utils-random.d.ts +4 -0
  126. package/types/tectra-ng-utils-random.d.ts.map +1 -0
  127. package/types/tectra-ng-utils-relative-time.d.ts +22 -0
  128. package/types/tectra-ng-utils-relative-time.d.ts.map +1 -0
  129. package/types/tectra-ng-utils-scroll-end.d.ts +38 -0
  130. package/types/tectra-ng-utils-scroll-end.d.ts.map +1 -0
  131. package/types/tectra-ng-utils-selection.d.ts +21 -0
  132. package/types/tectra-ng-utils-selection.d.ts.map +1 -0
  133. package/types/tectra-ng-utils-stop-propagation.d.ts +22 -0
  134. package/types/tectra-ng-utils-stop-propagation.d.ts.map +1 -0
  135. package/types/tectra-ng-utils-stream.d.ts +3 -0
  136. package/types/tectra-ng-utils-stream.d.ts.map +1 -0
  137. package/types/tectra-ng-utils-style-class.d.ts +91 -0
  138. package/types/tectra-ng-utils-style-class.d.ts.map +1 -0
  139. package/types/tectra-ng-utils-text.d.ts +26 -0
  140. package/types/tectra-ng-utils-text.d.ts.map +1 -0
  141. package/types/tectra-ng-utils-title.d.ts +31 -0
  142. package/types/tectra-ng-utils-title.d.ts.map +1 -0
  143. package/types/tectra-ng-utils-validators.d.ts +67 -0
  144. package/types/tectra-ng-utils-validators.d.ts.map +1 -0
  145. package/types/tectra-ng-utils.d.ts +2 -0
  146. package/types/tectra-ng-utils.d.ts.map +1 -0
  147. package/validators/README.md +42 -0
@@ -0,0 +1,65 @@
1
+ import * as i0 from "@angular/core";
2
+ import { InjectionToken, PipeTransform, Provider } from "@angular/core";
3
+ export type TxDateInput = Date | string | number | null | undefined;
4
+ export interface TxDateFormatConfig {
5
+ format: string;
6
+ empty: string;
7
+ locale: string;
8
+ timezone: string | undefined;
9
+ }
10
+ export interface TxIsoRange {
11
+ start: string;
12
+ end: string;
13
+ }
14
+ export declare const TX_DATE_FORMAT_DEFAULTS: TxDateFormatConfig;
15
+ export declare const TX_DATE_FORMAT_CONFIG: InjectionToken<TxDateFormatConfig>;
16
+ export declare function provideTxDateFormat(config: Partial<TxDateFormatConfig>): Provider;
17
+ export declare const MS_IN_SECOND = 1000;
18
+ export declare const SECONDS_IN_MINUTE = 60;
19
+ export declare const MINUTES_IN_HOUR = 60;
20
+ export declare const HOURS_IN_DAY = 24;
21
+ export declare const DAYS_IN_WEEK = 7;
22
+ export declare const MONTHS_IN_YEAR = 12;
23
+ export declare const SECONDS_IN_HOUR: number;
24
+ export declare const SECONDS_IN_DAY: number;
25
+ export declare const MS_IN_MINUTE: number;
26
+ export declare const MS_IN_HOUR: number;
27
+ export declare const MS_IN_DAY: number;
28
+ export declare const MS_IN_WEEK: number;
29
+ export declare const TX_DATE_FORMATS: {
30
+ readonly dateTime: "dd.MM.yy HH:mm";
31
+ readonly date: "dd.MM.yyyy";
32
+ readonly time: "HH:mm:ss";
33
+ readonly timeShort: "HH:mm";
34
+ readonly isoDay: "yyyy-MM-dd";
35
+ readonly isoMonth: "yyyy-MM";
36
+ readonly day: "dd";
37
+ readonly dayMonth: "dd.MM";
38
+ };
39
+ export declare function toDate(value: TxDateInput): Date | null;
40
+ export declare function isValidDate(value: TxDateInput): boolean;
41
+ export declare function startOfDay(value: Date | string | number): Date;
42
+ export declare function middleOfDay(value: Date | string | number): Date;
43
+ export declare function endOfDay(value: Date | string | number): Date;
44
+ export declare function addDays(value: Date | string | number, days: number): Date;
45
+ export declare function addMonths(value: Date | string | number, months: number): Date;
46
+ export declare function addYears(value: Date | string | number, years: number): Date;
47
+ export declare function startOfWeek(value: Date | string | number, firstDayOfWeek?: number): Date;
48
+ export declare function calendarDaysBetween(from: Date | string | number, to: Date | string | number): number;
49
+ export declare function isSameDay(a: TxDateInput, b: TxDateInput): boolean;
50
+ export declare function toIsoDay(value: Date | string | number): string;
51
+ export declare function toIsoString(value: TxDateInput): string | undefined;
52
+ export declare function toIsoRange(range: readonly TxDateInput[] | null | undefined): TxIsoRange | null;
53
+ export declare function isExpiringWithin(value: TxDateInput, periodMs?: number, now?: Date | number): boolean;
54
+ export declare class TxDatePipe implements PipeTransform {
55
+ private readonly config;
56
+ transform(value: TxDateInput, format?: string, timezone?: string, locale?: string): string;
57
+ static ɵfac: i0.ɵɵFactoryDeclaration<TxDatePipe, never>;
58
+ static ɵpipe: i0.ɵɵPipeDeclaration<TxDatePipe, "txDate", true>;
59
+ }
60
+ export declare class TxDateRangePipe implements PipeTransform {
61
+ transform(range: readonly TxDateInput[] | null | undefined): TxIsoRange | null;
62
+ static ɵfac: i0.ɵɵFactoryDeclaration<TxDateRangePipe, never>;
63
+ static ɵpipe: i0.ɵɵPipeDeclaration<TxDateRangePipe, "txDateRange", true>;
64
+ }
65
+ //# sourceMappingURL=tectra-ng-utils-date.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tectra-ng-utils-date.d.ts","names":[],"sources":["../../../../packages/utils/date/src/date.types.ts","../../../../packages/utils/date/src/date.config.ts","../../../../packages/utils/date/src/date.constants.ts","../../../../packages/utils/date/src/date.functions.ts","../../../../packages/utils/date/src/date.pipe.ts"],"mappings":";;YAAY,cAAc;iBAET;EACf;EACA;EACA;EACA;;iBAGe;EACf;EACA;;qBCRW,yBAAyB;qBAOzB,uBAAqB,eAAA;wBAKlB,oBAAoB,QAAQ,QAAQ,sBAAsB;qBCf7D;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBAEA;;;;;;;;;;wBCRG,OAAO,OAAO,cAAc;wBAQ5B,YAAY,OAAO;wBAQnB,WAAW,OAAO,yBAAyB;wBAM3C,YAAY,OAAO,yBAAyB;wBAM5C,SAAS,OAAO,yBAAyB;wBAMzC,QAAQ,OAAO,wBAAwB,eAAe;wBAMtD,UAAU,OAAO,wBAAwB,iBAAiB;wBAU1D,SAAS,OAAO,wBAAwB,gBAAgB;wBAIxD,YAAY,OAAO,wBAAwB,0BAAqB;wBAMhE,oBAAoB,MAAM,wBAAwB,IAAI;wBAQtD,UAAU,GAAG,aAAa,GAAG;wBAM7B,SAAS,OAAO;wBAOhB,YAAY,OAAO;wBAOnB,WAAW,gBAAgB,mCAAmC;wBAS9D,iBAAiB,OAAO,aAAa,mBAAuB,MAAK;qBC/FpE,sBAAsB;mBAChB;EAEjB,UAAU,OAAO,aAAa,iBAAiB,mBAAmB;SAHvD,MAAA,GAAA,qBAAA;SAAA,OAAA,GAAA,kBAAA;;qBAiBA,2BAA2B;EACtC,UAAU,gBAAgB,mCAAmC;SADlD,MAAA,GAAA,qBAAA;SAAA,OAAA,GAAA,kBAAA"}
@@ -0,0 +1,38 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class TxDebounceInput {
3
+ readonly debounceTime: import("@angular/core").InputSignalWithTransform<number, unknown>;
4
+ readonly distinct: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
5
+ readonly minLength: import("@angular/core").InputSignalWithTransform<number, unknown>;
6
+ readonly debounceInput: import("@angular/core").OutputEmitterRef<Event>;
7
+ readonly debounceValue: import("@angular/core").OutputEmitterRef<string>;
8
+ private timeout;
9
+ private pending;
10
+ private lastValue;
11
+ constructor();
12
+ schedule(event: Event): void;
13
+ flush(event?: Event): void;
14
+ cancel(): void;
15
+ private emit;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<TxDebounceInput, never>;
17
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TxDebounceInput, "[txDebounceInput]", ["txDebounceInput"], {
18
+ "debounceTime": {
19
+ "alias": "debounceTime";
20
+ "required": false;
21
+ "isSignal": true;
22
+ };
23
+ "distinct": {
24
+ "alias": "distinct";
25
+ "required": false;
26
+ "isSignal": true;
27
+ };
28
+ "minLength": {
29
+ "alias": "minLength";
30
+ "required": false;
31
+ "isSignal": true;
32
+ };
33
+ }, {
34
+ "debounceInput": "debounceInput";
35
+ "debounceValue": "debounceValue";
36
+ }, never, never, true, never>;
37
+ }
38
+ //# sourceMappingURL=tectra-ng-utils-debounce-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tectra-ng-utils-debounce-input.d.ts","names":[],"sources":["../../../../packages/utils/debounce-input/src/debounce-input.directive.ts"],"mappings":";qBAUa;WACF,sCAAY;WACZ,kCAAQ;WACR,mCAAS;WAET,uCAAa,iBAAA;WACb,uCAAa;UAEd;UACA;UACA;;EAMR,SAAS,OAAO;EAMhB,MAAM,QAAQ;EAQd;UAQQ;SAtCG,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAe;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;;IAAA;IAAA"}
@@ -0,0 +1,41 @@
1
+ import * as i0 from "@angular/core";
2
+ export interface TxDragPanDelta {
3
+ dx: number;
4
+ dy: number;
5
+ }
6
+ export declare class TxDragScroll {
7
+ private readonly host;
8
+ readonly panMode: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
9
+ readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
10
+ readonly panMove: import("@angular/core").OutputEmitterRef<TxDragPanDelta>;
11
+ readonly dragStart: import("@angular/core").OutputEmitterRef<void>;
12
+ readonly dragEnd: import("@angular/core").OutputEmitterRef<void>;
13
+ readonly isDragging: import("@angular/core").WritableSignal<boolean>;
14
+ private pointerId;
15
+ private start;
16
+ private last;
17
+ private moved;
18
+ private readonly swallowClick;
19
+ constructor();
20
+ protected onPointerDown(event: PointerEvent): void;
21
+ protected onPointerMove(event: PointerEvent): void;
22
+ protected onPointerUp(event: PointerEvent): void;
23
+ static ɵfac: i0.ɵɵFactoryDeclaration<TxDragScroll, never>;
24
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TxDragScroll, "[txDragScroll]", ["txDragScroll"], {
25
+ "panMode": {
26
+ "alias": "panMode";
27
+ "required": false;
28
+ "isSignal": true;
29
+ };
30
+ "disabled": {
31
+ "alias": "disabled";
32
+ "required": false;
33
+ "isSignal": true;
34
+ };
35
+ }, {
36
+ "panMove": "panMove";
37
+ "dragStart": "dragStart";
38
+ "dragEnd": "dragEnd";
39
+ }, never, never, true, never>;
40
+ }
41
+ //# sourceMappingURL=tectra-ng-utils-drag-scroll.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tectra-ng-utils-drag-scroll.d.ts","names":[],"sources":["../../../../packages/utils/drag-scroll/src/drag-scroll.directive.ts"],"mappings":";iBAEiB;EACf;EACA;;qBAoBW;mBACM;WAER,iCAAO;WACP,kCAAQ;WAER,iCAAO,iBAAA;WACP,mCAAS;WACT,iCAAO;WAEP,oCAAU;UAEX;UACA;UACA;UACA;mBACS;;YAaP,cAAc,OAAO;YAUrB,cAAc,OAAO;YAwBrB,YAAY,OAAO;SA/DlB,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAY;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;;IAAA;IAAA;IAAA"}
@@ -0,0 +1,18 @@
1
+ import * as i0 from "@angular/core";
2
+ import { PipeTransform } from "@angular/core";
3
+ export interface TxFileSizeOptions {
4
+ decimals?: number;
5
+ base?: 1000 | 1024;
6
+ locale?: string;
7
+ empty?: string;
8
+ }
9
+ export declare function formatFileSize(bytes: number | null | undefined, options?: TxFileSizeOptions): string;
10
+ export declare function downloadBlob(blob: Blob, filename?: string, document?: Document | undefined): void;
11
+ export declare function downloadFile(url: string, filename?: string, document?: Document | undefined): void;
12
+ export declare class TxFileSizePipe implements PipeTransform {
13
+ private readonly localeService;
14
+ transform(bytes: number | null | undefined, options?: TxFileSizeOptions): string;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<TxFileSizePipe, never>;
16
+ static ɵpipe: i0.ɵɵPipeDeclaration<TxFileSizePipe, "txFileSize", true>;
17
+ }
18
+ //# sourceMappingURL=tectra-ng-utils-file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tectra-ng-utils-file.d.ts","names":[],"sources":["../../../../packages/utils/file/src/file.ts"],"mappings":";;iBAGiB;EACf;EACA;EACA;EACA;;wBAKc,eAAe,kCAAkC,UAAS;wBAW1D,aAAa,MAAM,MAAM,mBAAmB,WAAU;wBAUtD,aAAa,aAAa,mBAAmB,WAAU;qBAe1D,0BAA0B;mBACpB;EAEjB,UAAU,kCAAkC,UAAS;SAH1C,MAAA,GAAA,qBAAA;SAAA,OAAA,GAAA,kBAAA"}
@@ -0,0 +1,55 @@
1
+ import * as i0 from "@angular/core";
2
+ import { Signal } from "@angular/core";
3
+ import { Params } from "@angular/router";
4
+ export type TxStorageKind = 'local' | 'session' | 'memory';
5
+ export interface TxFilterStateOptions<T extends object> {
6
+ key: string;
7
+ initial: T;
8
+ url?: boolean;
9
+ storage?: TxStorageKind | false;
10
+ }
11
+ export interface TxFilterState<T extends object> {
12
+ readonly value: Signal<T>;
13
+ readonly isInitial: Signal<boolean>;
14
+ readonly changed: Signal<(keyof T)[]>;
15
+ set(filters: T): void;
16
+ patch(filters: Partial<T>): void;
17
+ reset(): void;
18
+ }
19
+ export declare function txFilterState<T extends object>(options: TxFilterStateOptions<T>): TxFilterState<T>;
20
+ export declare abstract class TxSaveFilters<T> {
21
+ private readonly filterStorage;
22
+ protected abstract localStorageKey: string;
23
+ protected storeFilters(filters: T): void;
24
+ protected getStoredFilters(): T | null;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<TxSaveFilters<any>, never>;
26
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
27
+ }
28
+ export declare abstract class TxUrlFilters<T extends object> extends TxSaveFilters<T> {
29
+ private readonly urlSync;
30
+ protected abstract initialFilters(): T;
31
+ protected applyUrlFilters?(filters: T): void;
32
+ protected storeFilters(filters: T): void;
33
+ protected getStoredFilters(): T | null;
34
+ static ɵfac: i0.ɵɵFactoryDeclaration<TxUrlFilters<any>, never>;
35
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
36
+ }
37
+ export declare class TxMemoryStorage implements Storage {
38
+ private readonly items;
39
+ constructor(source?: Storage);
40
+ get length(): number;
41
+ clear(): void;
42
+ getItem(key: string): string | null;
43
+ key(index: number): string | null;
44
+ removeItem(key: string): void;
45
+ setItem(key: string, value: string): void;
46
+ }
47
+ export declare function injectStorage(kind?: TxStorageKind): Storage;
48
+ export declare function readJson<T>(storage: Storage, key: string): T | null;
49
+ export declare function writeJson(storage: Storage, key: string, value: unknown): void;
50
+ export declare function isSameValue(a: unknown, b: unknown): boolean;
51
+ export declare function encodeUrlFilterValue(value: unknown): string;
52
+ export declare function decodeUrlFilterValue(value: string): unknown;
53
+ export declare function filtersToQueryParams<T extends object>(filters: T, initial: T): Params;
54
+ export declare function queryParamsToFilters<T extends object>(params: Params, initial: T): T | null;
55
+ //# sourceMappingURL=tectra-ng-utils-filter-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tectra-ng-utils-filter-state.d.ts","names":[],"sources":["../../../../packages/utils/filter-state/src/filter-state.types.ts","../../../../packages/utils/filter-state/src/filter-state.ts","../../../../packages/utils/filter-state/src/filter-state.base.ts","../../../../packages/utils/filter-state/src/storage.ts","../../../../packages/utils/filter-state/src/url-filters.functions.ts"],"mappings":";;;YAEY;iBAEK,qBAAqB;EACpC;EACA,SAAS;EACT;EACA,UAAU;;iBAGK,cAAc;WACpB,OAAO,OAAO;WACd,WAAW;WACX,SAAS,cAAc;EAChC,IAAI,SAAS;EACb,MAAM,SAAS,QAAQ;EACvB;;wBCVc,cAAc,kBAAkB,SAAS,qBAAqB,KAAK,cAAc;8BCD3E,cAAc;mBACjB;qBAEE;YAET,aAAa,SAAS;YAItB,oBAAoB;SATV,MAAA,GAAA,qBAAA;;;8BAeA,aAAa,0BAA0B,cAAc;mBACxD;qBAEE,kBAAkB;YAE3B,iBAAiB,SAAS;YAEjB,aAAa,SAAS;YAKtB,oBAAoB;SAZnB,MAAA,GAAA,qBAAA;;;qBCjBT,2BAA2B;mBACrB;EAEL,YAAA,SAAS;MAYjB;EAIJ;EAIA,QAAQ;EAIR,IAAI;EAIJ,WAAW;EAIX,QAAQ,aAAa;;wBAUP,cAAc,OAAM,gBAA0B;wBAiB9C,SAAS,GAAG,SAAS,SAAS,cAAc;wBAY5C,UAAU,SAAS,SAAS,aAAa;wBC5EzC,YAAY,YAAY;wBAgBxB,qBAAqB;wBAOrB,qBAAqB;wBAIrB,qBAAqB,kBAAkB,SAAS,GAAG,SAAS,IAAI;wBAOhE,qBAAqB,kBAAkB,QAAQ,QAAQ,SAAS,IAAI"}
@@ -0,0 +1,21 @@
1
+ import * as i0 from "@angular/core";
2
+ import { PipeTransform } from "@angular/core";
3
+ import { TxFilterMatchMode, resolveField } from "@tectra-ng/ui/table";
4
+ export type TxMatchFunction = (value: unknown, filter: unknown, locale?: string) => boolean;
5
+ export type TxFilterFields<T> = readonly string[] | ((item: T) => readonly unknown[]);
6
+ export declare function normalizeSearch(value: unknown, locale?: string): string;
7
+ export declare function filterBySearch<T>(items: readonly T[], query: string | null | undefined, fields: TxFilterFields<T>, locale?: string): T[];
8
+ export declare function matches(value: unknown, filter: unknown, matchMode?: TxFilterMatchMode | TxMatchFunction, locale?: string): boolean;
9
+ export declare function filterBy<T>(items: readonly T[], filter: unknown, fields: TxFilterFields<T>, matchMode?: TxFilterMatchMode | TxMatchFunction, locale?: string): T[];
10
+ export declare class TxSearchPipe implements PipeTransform {
11
+ transform<T>(items: readonly T[] | null | undefined, query: string | null | undefined, fields: TxFilterFields<T>): T[];
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<TxSearchPipe, never>;
13
+ static ɵpipe: i0.ɵɵPipeDeclaration<TxSearchPipe, "txSearch", true>;
14
+ }
15
+ export declare class TxFilterByPipe implements PipeTransform {
16
+ transform<T>(items: readonly T[] | null | undefined, filter: unknown, fields: TxFilterFields<T>, matchMode?: TxFilterMatchMode | TxMatchFunction): T[];
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<TxFilterByPipe, never>;
18
+ static ɵpipe: i0.ɵɵPipeDeclaration<TxFilterByPipe, "txFilterBy", true>;
19
+ }
20
+ export { resolveField };
21
+ //# sourceMappingURL=tectra-ng-utils-filter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tectra-ng-utils-filter.d.ts","names":[],"sources":["../../../../packages/utils/filter/src/filter.ts"],"mappings":";;;YAGY,mBAAmB,gBAAgB,iBAAiB;YACpD,eAAe,2BAA2B,MAAM;wBAI5C,gBAAgB,gBAAgB;wBAYhC,eAAe,GAAG,gBAAgB,KAAK,kCAAkC,QAAQ,eAAe,IAAI,kBAAkB;wBAYtH,QAAQ,gBAAgB,iBAAiB,YAAW,oBAAoB,iBAA8B;wBAItG,SAAS,GAAG,gBAAgB,KAAK,iBAAiB,QAAQ,eAAe,IAAI,YAAW,oBAAoB,iBAA8B,kBAAkB;qBAK/J,wBAAwB;EACnC,UAAU,GAAG,gBAAgB,wBAAwB,kCAAkC,QAAQ,eAAe,KAAK;SADxG,MAAA,GAAA,qBAAA;SAAA,OAAA,GAAA,kBAAA;;qBAOA,0BAA0B;EACrC,UAAU,GAAG,gBAAgB,wBAAwB,iBAAiB,QAAQ,eAAe,IAAI,YAAW,oBAAoB,kBAA+B;SADpJ,MAAA,GAAA,qBAAA;SAAA,OAAA,GAAA,kBAAA"}
@@ -0,0 +1,22 @@
1
+ import * as i0 from "@angular/core";
2
+ import { Signal } from "@angular/core";
3
+ import { AbstractControl } from "@angular/forms";
4
+ export declare function deepEqual(a: unknown, b: unknown): boolean;
5
+ export declare class TxFormChangeTracker {
6
+ private initial;
7
+ private tracking;
8
+ initFormTracking(form: AbstractControl): void;
9
+ hasFormChanges(form: AbstractControl): boolean;
10
+ updateInitialFormState(form: AbstractControl): void;
11
+ resetFormToInitial(form: AbstractControl): void;
12
+ resetFormTracking(): void;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<TxFormChangeTracker, never>;
14
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
15
+ }
16
+ export interface TxFormChanges {
17
+ readonly changed: Signal<boolean>;
18
+ commit(): void;
19
+ revert(): void;
20
+ }
21
+ export declare function trackFormChanges(form: AbstractControl): TxFormChanges;
22
+ //# sourceMappingURL=tectra-ng-utils-form-changes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tectra-ng-utils-form-changes.d.ts","names":[],"sources":["../../../../packages/utils/form-changes/src/form-changes.ts"],"mappings":";;;wBAKgB,UAAU,YAAY;qBAuBzB;UACH;UACA;EAER,iBAAiB,MAAM;EAKvB,eAAe,MAAM;EAIrB,uBAAuB,MAAM;EAI7B,mBAAmB,MAAM;EAMzB;SAvBW,MAAA,GAAA,qBAAA;;;iBA6BI;WACN,SAAS;EAClB;EACA;;wBAGc,iBAAiB,MAAM,kBAAkB"}
@@ -0,0 +1,45 @@
1
+ import { AbstractControl } from "@angular/forms";
2
+ import * as i0 from "@angular/core";
3
+ export declare function markAllTouched(control: AbstractControl): void;
4
+ export declare function firstInvalidElement(scope: ParentNode): HTMLElement | null;
5
+ export declare function focusTarget(element: HTMLElement): HTMLElement;
6
+ export interface TxScrollToInvalidOptions {
7
+ scope?: ParentNode;
8
+ focus?: boolean;
9
+ block?: ScrollLogicalPosition;
10
+ }
11
+ export declare class TxFormValidation {
12
+ private readonly document;
13
+ private readonly isBrowser;
14
+ private readonly host;
15
+ scrollToFirstInvalid(form: AbstractControl, options?: TxScrollToInvalidOptions): boolean;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<TxFormValidation, never>;
17
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
18
+ }
19
+ export declare class TxScrollToInvalid {
20
+ private readonly container;
21
+ private readonly validation;
22
+ private readonly host;
23
+ readonly focus: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
24
+ readonly block: import("@angular/core").InputSignal<ScrollLogicalPosition>;
25
+ readonly invalidSubmit: import("@angular/core").OutputEmitterRef<void>;
26
+ readonly validSubmit: import("@angular/core").OutputEmitterRef<void>;
27
+ check(): void;
28
+ static ɵfac: i0.ɵɵFactoryDeclaration<TxScrollToInvalid, never>;
29
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TxScrollToInvalid, "form[txScrollToInvalid]", never, {
30
+ "focus": {
31
+ "alias": "focus";
32
+ "required": false;
33
+ "isSignal": true;
34
+ };
35
+ "block": {
36
+ "alias": "block";
37
+ "required": false;
38
+ "isSignal": true;
39
+ };
40
+ }, {
41
+ "invalidSubmit": "invalidSubmit";
42
+ "validSubmit": "validSubmit";
43
+ }, never, never, true, never>;
44
+ }
45
+ //# sourceMappingURL=tectra-ng-utils-form-validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tectra-ng-utils-form-validation.d.ts","names":[],"sources":["../../../../packages/utils/form-validation/src/form-validation.functions.ts","../../../../packages/utils/form-validation/src/form-validation.service.ts","../../../../packages/utils/form-validation/src/scroll-to-invalid.directive.ts"],"mappings":";;wBAIgB,eAAe,SAAS;wBAQxB,oBAAoB,OAAO,aAAa;wBAKxC,YAAY,SAAS,cAAc;iBCZlC;EACf,QAAQ;EACR;EACA,QAAQ;;qBAIG;mBACM;mBACA;mBACA;EAEjB,qBAAqB,MAAM,iBAAiB,UAAS;SAL1C,MAAA,GAAA,qBAAA;;;qBCJA;mBACM;mBACA;mBACA;WAER,+BAAK;WACL,+BAAK,YAAA;WAEL,uCAAa;WACb,qCAAW;EAEpB;SAXW,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAiB;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;;IAAA;IAAA"}
@@ -0,0 +1,25 @@
1
+ import { UrlTree } from "@angular/router";
2
+ import * as i0 from "@angular/core";
3
+ export declare class TxGoBack {
4
+ private readonly location;
5
+ private readonly router;
6
+ private readonly element;
7
+ readonly fallback: import("@angular/core").InputSignal<string | UrlTree | readonly unknown[]>;
8
+ readonly navigated: import("@angular/core").OutputEmitterRef<"back" | "fallback">;
9
+ protected readonly needsRole: boolean;
10
+ canGoBack(): boolean;
11
+ back(): void;
12
+ protected onClick(event: Event): void;
13
+ protected onKey(event: Event): void;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<TxGoBack, never>;
15
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TxGoBack, "[txGoBack]", ["txGoBack"], {
16
+ "fallback": {
17
+ "alias": "txGoBack";
18
+ "required": false;
19
+ "isSignal": true;
20
+ };
21
+ }, {
22
+ "navigated": "navigated";
23
+ }, never, never, true, never>;
24
+ }
25
+ //# sourceMappingURL=tectra-ng-utils-go-back.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tectra-ng-utils-go-back.d.ts","names":[],"sources":["../../../../packages/utils/go-back/src/go-back.directive.ts"],"mappings":";;qBAiBa;mBACM;mBACA;mBACA;WAER,kCAAQ,qBAAA;WAER,mCAAS;qBAEC;EAEnB;EAKA;YAWU,QAAQ,OAAO;YAKf,MAAM,OAAO;SAhCZ,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAQ;MAAA;MAAA;MAAA;;;IAAA"}
@@ -0,0 +1,47 @@
1
+ import { HttpErrorResponse, HttpParams } from "@angular/common/http";
2
+ import { MonoTypeOperatorFunction } from "rxjs";
3
+ import * as i0 from "@angular/core";
4
+ import { PipeTransform } from "@angular/core";
5
+ export declare function buildHttpParams(query: object): HttpParams;
6
+ export interface TxHttpRetryOptions {
7
+ count?: number;
8
+ baseDelayMs?: number;
9
+ maxDelayMs?: number;
10
+ statuses?: readonly number[];
11
+ }
12
+ export interface TxHttpRetryDelay {
13
+ error: HttpErrorResponse;
14
+ attempt: number;
15
+ baseDelayMs: number;
16
+ maxDelayMs: number;
17
+ }
18
+ export type TxHttpStatusGroup = 'ok' | 'redirect' | 'clientError' | 'serverError' | 'warning' | 'noResponse' | 'unknown';
19
+ export type TxHttpStatusTone = 'success' | 'info' | 'warn' | 'danger' | 'secondary';
20
+ export declare const TX_HTTP_RETRY_COUNT = 5;
21
+ export declare const TX_HTTP_RETRY_BASE_DELAY_MS = 2000;
22
+ export declare const TX_HTTP_RETRY_MAX_DELAY_MS = 30000;
23
+ export declare const TX_HTTP_RETRY_FACTOR = 2;
24
+ export declare const TX_HTTP_NETWORK_ERROR_STATUS = 0;
25
+ export declare const TX_HTTP_RETRYABLE_STATUSES: readonly number[];
26
+ export declare function parseRetryAfter(value: string | null | undefined, now?: number): number | null;
27
+ export declare function httpRetryDelay(data: TxHttpRetryDelay): number | null;
28
+ export declare function retryHttpReads<T>(options?: TxHttpRetryOptions): MonoTypeOperatorFunction<T>;
29
+ export declare function httpStatusGroup(status: number | null | undefined, warnCodes?: readonly number[]): TxHttpStatusGroup;
30
+ export declare function httpStatusTone(status: number | null | undefined, warnCodes?: readonly number[]): TxHttpStatusTone;
31
+ export declare class TxHttpStatusTonePipe implements PipeTransform {
32
+ transform(status: number | null | undefined, warnCodes?: readonly number[]): TxHttpStatusTone;
33
+ static ɵfac: i0.ɵɵFactoryDeclaration<TxHttpStatusTonePipe, never>;
34
+ static ɵpipe: i0.ɵɵPipeDeclaration<TxHttpStatusTonePipe, "txHttpStatusTone", true>;
35
+ }
36
+ export declare class TxHttpStatusGroupPipe implements PipeTransform {
37
+ transform(status: number | null | undefined, warnCodes?: readonly number[]): TxHttpStatusGroup;
38
+ static ɵfac: i0.ɵɵFactoryDeclaration<TxHttpStatusGroupPipe, never>;
39
+ static ɵpipe: i0.ɵɵPipeDeclaration<TxHttpStatusGroupPipe, "txHttpStatusGroup", true>;
40
+ }
41
+ export declare class TxHttpStatusLabelPipe implements PipeTransform {
42
+ private readonly locale;
43
+ transform(status: number | null | undefined, warnCodes?: readonly number[]): string;
44
+ static ɵfac: i0.ɵɵFactoryDeclaration<TxHttpStatusLabelPipe, never>;
45
+ static ɵpipe: i0.ɵɵPipeDeclaration<TxHttpStatusLabelPipe, "txHttpStatusLabel", true>;
46
+ }
47
+ //# sourceMappingURL=tectra-ng-utils-http.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tectra-ng-utils-http.d.ts","names":[],"sources":["../../../../packages/utils/http/src/http-params.functions.ts","../../../../packages/utils/http/src/http.types.ts","../../../../packages/utils/http/src/http-retry.functions.ts","../../../../packages/utils/http/src/http-status.ts"],"mappings":";;;;wBAWgB,gBAAgB,gBAAgB;iBCT/B;EACf;EACA;EACA;EACA;;iBAGe;EACf,OAAO;EACP;EACA;EACA;;YAGU;YAEA;qBCdC;qBACA;qBACA;qBACA;qBACA;qBACA;wBAQG,gBAAgB,kCAAkC;wBAalD,eAAe,MAAM;wBAQrB,eAAe,GAAG,UAAS,qBAA0B,yBAAyB;wBCb9E,gBAAgB,mCAAmC,gCAAoC;wBAmBvF,eAAe,mCAAmC,gCAAoC;qBAKzF,gCAAgC;EAC3C,UAAU,mCAAmC,gCAAoC;SADtE,MAAA,GAAA,qBAAA;SAAA,OAAA,GAAA,kBAAA;;qBAOA,iCAAiC;EAC5C,UAAU,mCAAmC,gCAAoC;SADtE,MAAA,GAAA,qBAAA;SAAA,OAAA,GAAA,kBAAA;;qBAOA,iCAAiC;mBAC3B;EAEjB,UAAU,mCAAmC;SAHlC,MAAA,GAAA,qBAAA;SAAA,OAAA,GAAA,kBAAA"}
@@ -0,0 +1,80 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class TxInView {
3
+ private readonly element;
4
+ private readonly renderer;
5
+ private readonly view;
6
+ readonly threshold: import("@angular/core").InputSignalWithTransform<number, unknown>;
7
+ readonly rootMargin: import("@angular/core").InputSignal<string>;
8
+ readonly once: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
9
+ readonly enterClass: import("@angular/core").InputSignal<string | undefined>;
10
+ readonly leaveClass: import("@angular/core").InputSignal<string | undefined>;
11
+ readonly entered: import("@angular/core").OutputEmitterRef<void>;
12
+ readonly left: import("@angular/core").OutputEmitterRef<void>;
13
+ readonly isInView: import("@angular/core").WritableSignal<boolean>;
14
+ constructor();
15
+ private update;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<TxInView, never>;
17
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TxInView, "[txInView]", ["txInView"], {
18
+ "threshold": {
19
+ "alias": "threshold";
20
+ "required": false;
21
+ "isSignal": true;
22
+ };
23
+ "rootMargin": {
24
+ "alias": "rootMargin";
25
+ "required": false;
26
+ "isSignal": true;
27
+ };
28
+ "once": {
29
+ "alias": "once";
30
+ "required": false;
31
+ "isSignal": true;
32
+ };
33
+ "enterClass": {
34
+ "alias": "enterClass";
35
+ "required": false;
36
+ "isSignal": true;
37
+ };
38
+ "leaveClass": {
39
+ "alias": "leaveClass";
40
+ "required": false;
41
+ "isSignal": true;
42
+ };
43
+ }, {
44
+ "entered": "entered";
45
+ "left": "left";
46
+ }, never, never, true, never>;
47
+ }
48
+ export interface TxVisibleOnScrollItem {
49
+ id: string;
50
+ ignore?: boolean;
51
+ }
52
+ export declare class TxVisibleOnScroll {
53
+ private readonly host;
54
+ private readonly view;
55
+ private readonly emitted;
56
+ private readonly ids;
57
+ private observer;
58
+ readonly items: import("@angular/core").InputSignal<readonly TxVisibleOnScrollItem[]>;
59
+ readonly visibleRatio: import("@angular/core").InputSignalWithTransform<number, unknown>;
60
+ readonly itemVisible: import("@angular/core").OutputEmitterRef<string>;
61
+ constructor();
62
+ private sync;
63
+ private check;
64
+ static ɵfac: i0.ɵɵFactoryDeclaration<TxVisibleOnScroll, never>;
65
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TxVisibleOnScroll, "[txVisibleOnScroll]", ["txVisibleOnScroll"], {
66
+ "items": {
67
+ "alias": "txVisibleOnScroll";
68
+ "required": false;
69
+ "isSignal": true;
70
+ };
71
+ "visibleRatio": {
72
+ "alias": "visibleRatio";
73
+ "required": false;
74
+ "isSignal": true;
75
+ };
76
+ }, {
77
+ "itemVisible": "itemVisible";
78
+ }, never, never, true, never>;
79
+ }
80
+ //# sourceMappingURL=tectra-ng-utils-in-view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tectra-ng-utils-in-view.d.ts","names":[],"sources":["../../../../packages/utils/in-view/src/in-view.directive.ts","../../../../packages/utils/in-view/src/visible-on-scroll.directive.ts"],"mappings":";qBAUa;mBACM;mBACA;mBACA;WAER,mCAAS;WACT,oCAAU;WACV,8BAAI;WACJ,oCAAU;WACV,oCAAU;WAEV,iCAAO;WACP,8BAAI;WAEJ,kCAAQ;;UA4BT;SA1CG,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAQ;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;;IAAA;IAAA;;;iBCPJ;EACf;EACA;;qBAOW;mBACM;mBACA;mBACA;mBACA;UACT;WAEC,+BAAK,qBAAA;WACL,sCAAY;WAEZ,qCAAW;;UAOZ;UAmBA;SApCG,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAiB;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;;IAAA"}
@@ -0,0 +1,21 @@
1
+ import * as i0 from "@angular/core";
2
+ import { PipeTransform } from "@angular/core";
3
+ export type TxPluralForm = 'one' | 'few' | 'many';
4
+ export type TxPluralCategory = Intl.LDMLPluralRule;
5
+ export type TxPluralForms = Partial<Record<TxPluralCategory | `=${number}`, string>>;
6
+ export declare function pluralCategory(count: number, locale?: string): TxPluralCategory;
7
+ export declare function pluralForm(count: number, locale?: string): TxPluralForm;
8
+ export declare function plural(count: number, forms: string | TxPluralForms, locale?: string): string;
9
+ export declare class TxPluralFormPipe implements PipeTransform {
10
+ private readonly localeService;
11
+ transform(count: number | null | undefined, locale?: string): TxPluralForm;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<TxPluralFormPipe, never>;
13
+ static ɵpipe: i0.ɵɵPipeDeclaration<TxPluralFormPipe, "txPluralForm", true>;
14
+ }
15
+ export declare class TxPluralPipe implements PipeTransform {
16
+ private readonly localeService;
17
+ transform(count: number | null | undefined, forms: string | TxPluralForms, locale?: string): string;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<TxPluralPipe, never>;
19
+ static ɵpipe: i0.ɵɵPipeDeclaration<TxPluralPipe, "txPlural", true>;
20
+ }
21
+ //# sourceMappingURL=tectra-ng-utils-plural.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tectra-ng-utils-plural.d.ts","names":[],"sources":["../../../../packages/utils/plural/src/plural.types.ts","../../../../packages/utils/plural/src/plural.functions.ts","../../../../packages/utils/plural/src/plural.pipe.ts"],"mappings":";;YAAY;YAEA,mBAAmB,KAAK;YAExB,gBAAgB,QAAQ,OAAO;wBCU3B,eAAe,eAAe,kBAAmB;wBAIjD,WAAW,eAAe,kBAAmB;wBAK7C,OAAO,eAAe,gBAAgB,eAAe;qBCjBxD,4BAA4B;mBACtB;EAEjB,UAAU,kCAAkC,kBAAkB;SAHnD,MAAA,GAAA,qBAAA;SAAA,OAAA,GAAA,kBAAA;;qBASA,wBAAwB;mBAClB;EAEjB,UAAU,kCAAkC,gBAAgB,eAAe;SAHhE,MAAA,GAAA,qBAAA;SAAA,OAAA,GAAA,kBAAA"}
@@ -0,0 +1,61 @@
1
+ import { Observable } from "rxjs";
2
+ import { TxHttpRetryOptions } from "@tectra-ng/utils/http";
3
+ export interface TxPollBackoff {
4
+ startMs: number;
5
+ factor: number;
6
+ maxMs: number;
7
+ }
8
+ export type TxPollDelay = number | TxPollBackoff;
9
+ export interface TxPollOptions<T> {
10
+ isActive: (value: T) => boolean;
11
+ delay?: TxPollDelay;
12
+ maxAttempts?: number;
13
+ retry?: TxHttpRetryOptions | false;
14
+ skipErrors?: boolean;
15
+ pauseWhenHidden?: boolean;
16
+ }
17
+ export interface TxPollConfig<T> extends TxPollOptions<T> {
18
+ request: (attempt: number) => Observable<T>;
19
+ initial?: T;
20
+ }
21
+ export interface TxPollerRequest<TParams> {
22
+ params: TParams;
23
+ attempt: number;
24
+ }
25
+ export interface TxPollerConfig<TParams, T> extends TxPollOptions<T> {
26
+ request: (data: TxPollerRequest<TParams>) => Observable<T>;
27
+ }
28
+ export interface TxPollingError {
29
+ status: number;
30
+ message: string | null;
31
+ }
32
+ export interface TxRefreshEveryConfig<T> {
33
+ request: () => Observable<T>;
34
+ delay: number;
35
+ when?: () => boolean;
36
+ immediate?: boolean;
37
+ pauseWhenHidden?: boolean;
38
+ skipErrors?: boolean;
39
+ }
40
+ export declare const TX_POLL_DEFAULT_DELAY: TxPollBackoff;
41
+ export declare const TX_POLL_SLOW_DELAY: TxPollBackoff;
42
+ export declare function pollDelay(delay: TxPollDelay, attempt: number): number;
43
+ export declare function isPageHidden(): boolean;
44
+ export declare function waitUntilVisible(): Observable<void>;
45
+ export declare function toPollingError(error: unknown): TxPollingError;
46
+ export declare function poll<T>(config: TxPollConfig<T>): Observable<T>;
47
+ export declare function refreshEvery<T>(config: TxRefreshEveryConfig<T>): Observable<T>;
48
+ export declare class TxPoller<TParams, T> {
49
+ private readonly config;
50
+ private readonly restarts;
51
+ private readonly stops;
52
+ readonly isLoading: import("@angular/core").WritableSignal<boolean>;
53
+ readonly isPolling: import("@angular/core").WritableSignal<boolean>;
54
+ readonly error: import("@angular/core").WritableSignal<TxPollingError | null>;
55
+ constructor(config: TxPollerConfig<TParams, T>);
56
+ watch(params: TParams): Observable<T>;
57
+ restart(): void;
58
+ stop(): void;
59
+ private cycle;
60
+ }
61
+ //# sourceMappingURL=tectra-ng-utils-polling.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tectra-ng-utils-polling.d.ts","names":[],"sources":["../../../../packages/utils/polling/src/polling.types.ts","../../../../packages/utils/polling/src/poll.ts","../../../../packages/utils/polling/src/poller.ts"],"mappings":";;iBAGiB;EACf;EACA;EACA;;YAGU,uBAAuB;iBAElB,cAAc;EAC7B,WAAW,OAAO;EAClB,QAAQ;EACR;EACA,QAAQ;EACR;EACA;;iBAGe,aAAa,WAAW,cAAc;EACrD,UAAU,oBAAoB,WAAW;EACzC,UAAU;;iBAGK,gBAAgB;EAC/B,QAAQ;EACR;;iBAGe,eAAe,SAAS,WAAW,cAAc;EAChE,UAAU,MAAM,gBAAgB,aAAa,WAAW;;iBAGzC;EACf;EACA;;iBAGe,qBAAqB;EACpC,eAAe,WAAW;EAC1B;EACA;EACA;EACA;EACA;;qBCxCW,uBAAuB;qBACvB,oBAAoB;wBASjB,UAAU,OAAO,aAAa;wBAI9B;wBAIA,oBAAoB;wBAYpB,eAAe,iBAAiB;wBAQhC,KAAK,GAAG,QAAQ,aAAa,KAAK,WAAW;wBAsB7C,aAAa,GAAG,QAAQ,qBAAqB,KAAK,WAAW;qBC5DhE,SAAS,SAAS;mBAQA;mBAPZ;mBACA;WAER,mCAAS;WACT,mCAAS;WACT,+BAAK,eAAA;EAEe,YAAA,QAAQ,eAAe,SAAS;EAE7D,MAAM,QAAQ,UAAU,WAAW;EASnC;EAIA;UAKQ"}
@@ -0,0 +1,4 @@
1
+ export declare function pickRandom<T>(items: readonly T[] | null | undefined, random?: () => number): T | null;
2
+ export declare function pickRandomN<T>(items: readonly T[] | null | undefined, count: number, random?: () => number): T[];
3
+ export declare function shuffle<T>(items: readonly T[], random?: () => number): T[];
4
+ //# sourceMappingURL=tectra-ng-utils-random.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tectra-ng-utils-random.d.ts","names":[],"sources":["../../../../packages/utils/random/src/random.ts"],"mappings":"AAAA,wBAAgB,WAAW,GAAG,gBAAgB,wBAAwB,wBAAqC;wBAO3F,YAAY,GAAG,gBAAgB,wBAAwB,eAAe,wBAAqC;wBAa3G,QAAQ,GAAG,gBAAgB,KAAK,wBAAqC"}
@@ -0,0 +1,22 @@
1
+ import * as i0 from "@angular/core";
2
+ import { PipeTransform } from "@angular/core";
3
+ import { TxDateInput } from "@tectra-ng/utils/date";
4
+ export type TxRelativeTimeGranularity = 'time' | 'day';
5
+ export interface TxRelativeTimeOptions {
6
+ locale?: string;
7
+ now?: Date | number;
8
+ granularity?: TxRelativeTimeGranularity;
9
+ largestUnit?: 'day' | 'month' | 'year';
10
+ numeric?: 'auto' | 'always';
11
+ style?: 'long' | 'short' | 'narrow';
12
+ }
13
+ export declare function relativeTime(value: TxDateInput, options?: TxRelativeTimeOptions): string;
14
+ export declare class TxRelativeTimePipe implements PipeTransform {
15
+ private readonly localeService;
16
+ private lastKey;
17
+ private lastText;
18
+ transform(value: TxDateInput, options?: TxRelativeTimeOptions): string;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<TxRelativeTimePipe, never>;
20
+ static ɵpipe: i0.ɵɵPipeDeclaration<TxRelativeTimePipe, "txRelativeTime", true>;
21
+ }
22
+ //# sourceMappingURL=tectra-ng-utils-relative-time.d.ts.map