@acorex/core 17.0.11 → 17.0.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,16 @@
1
+ import { AXFormatOptions, AXFormatter } from '@acorex/core/format';
2
+ import * as i0 from "@angular/core";
3
+ export interface AXTimeDurationFormatterOptions extends AXFormatOptions {
4
+ format: string;
5
+ }
6
+ declare module '@acorex/core/format' {
7
+ interface AXFormatOptionsMap {
8
+ duration: AXTimeDurationFormatterOptions;
9
+ }
10
+ }
11
+ export declare class AXTimeDurationFormatter implements AXFormatter {
12
+ get name(): string;
13
+ format(value: number, options?: AXTimeDurationFormatterOptions): string;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXTimeDurationFormatter, never>;
15
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXTimeDurationFormatter>;
16
+ }
@@ -1,15 +1,16 @@
1
1
  import { AXFormatModule } from '@acorex/core/format';
2
2
  import { NgModule } from '@angular/core';
3
+ import { AXDateTimePipe } from './datetime.pipe';
3
4
  import { AXDateTimeFormatter } from './formatters/datetime-formatter';
5
+ import { AXTimeDurationFormatter } from './formatters/time-duration-formatter';
4
6
  import { AXTimeLeftFormatter } from './formatters/timeleft-formatter';
5
- import { AXDateTimePipe } from './datetime.pipe';
6
7
  import * as i0 from "@angular/core";
7
8
  import * as i1 from "@acorex/core/format";
8
9
  export class AXDateTimeModule {
9
10
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXDateTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
10
11
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.2", ngImport: i0, type: AXDateTimeModule, declarations: [AXDateTimePipe], imports: [i1.AXFormatModule], exports: [AXDateTimePipe] }); }
11
12
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXDateTimeModule, imports: [AXFormatModule.forChild({
12
- formatters: [AXDateTimeFormatter, AXTimeLeftFormatter],
13
+ formatters: [AXDateTimeFormatter, AXTimeLeftFormatter, AXTimeDurationFormatter],
13
14
  })] }); }
14
15
  }
15
16
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXDateTimeModule, decorators: [{
@@ -17,11 +18,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImpor
17
18
  args: [{
18
19
  imports: [
19
20
  AXFormatModule.forChild({
20
- formatters: [AXDateTimeFormatter, AXTimeLeftFormatter],
21
+ formatters: [AXDateTimeFormatter, AXTimeLeftFormatter, AXTimeDurationFormatter],
21
22
  }),
22
23
  ],
23
24
  exports: [AXDateTimePipe],
24
25
  declarations: [AXDateTimePipe],
25
26
  }]
26
27
  }] });
27
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZXRpbWUubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb3JlL2RhdGUtdGltZS9zcmMvbGliL2RhdGV0aW1lLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDckQsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUN0RSxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUN0RSxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0saUJBQWlCLENBQUM7OztBQVdqRCxNQUFNLE9BQU8sZ0JBQWdCOzhHQUFoQixnQkFBZ0I7K0dBQWhCLGdCQUFnQixpQkFGWixjQUFjLDJDQURuQixjQUFjO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+29,4 @@ export class AXDateTimeFormatter {
29
29
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXDateTimeFormatter, decorators: [{
30
30
  type: Injectable
31
31
  }] });
32
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZXRpbWUtZm9ybWF0dGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb3JlL2RhdGUtdGltZS9zcmMvbGliL2Zvcm1hdHRlcnMvZGF0ZXRpbWUtZm9ybWF0dGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ25ELE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLHFCQUFxQixDQUFDOztBQWV4RCxNQUFNLE9BQU8sbUJBQW1CO0lBRGhDO1FBRVUsb0JBQWUsR0FBRyxNQUFNLENBQUMsaUJBQWlCLENBQUMsQ0FBQztLQTBCckQ7SUF4QkMsSUFBSSxJQUFJO1FBQ04sT0FBTyxVQUFVLENBQUM7SUFDcEIsQ0FBQztJQUVELE1BQU0sQ0FDSixLQUFjLEVBQ2QsT0FBNkM7UUFFN0MsTUFBTSxnQkFBZ0IsR0FDcEIsT0FBTyxPQUFPLElBQUksUUFBUTtZQUN4QixDQUFDLENBQUM7Z0JBQ0UsTUFBTSxFQUFFLE9BQU8sQ0FBQyxNQUFNLElBQUksTUFBTTtnQkFDaEMsTUFBTSxFQUFFLE9BQU8sQ0FBQyxNQUFNO2dCQUN0QixRQUFRLEVBQUUsT0FBTyxDQUFDLFFBQVEsSUFBSSxJQUFJLENBQUMsZUFBZSxDQUFDLFFBQVEsQ0FBQyxJQUFJLEVBQUU7YUFDbkU7WUFDSCxDQUFDLENBQUM7Z0JBQ0U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EFYQ2FsZW5kYXJTZXJ2aWNlKTtcblxuICBnZXQgbmFtZSgpOiBzdHJpbmcge1xuICAgIHJldHVybiAnZGF0ZXRpbWUnO1xuICB9XG5cbiAgZm9ybWF0KFxuICAgIHZhbHVlOiB1bmtub3duLFxuICAgIG9wdGlvbnM/OiBBWERhdGVUaW1lRm9ybWF0dGVyT3B0aW9ucyB8IHN0cmluZ1xuICApOiBzdHJpbmcge1xuICAgIGNvbnN0IGVmZmVjdGl2ZU9wdGlvbnMgPVxuICAgICAgdHlwZW9mIG9wdGlvbnMgPT0gJ29iamVjdCdcbiAgICAgICAgPyB7XG4gICAgICAgICAgZm9ybWF0OiBvcHRpb25zLmZvcm1hdCA/PyAnZGF0ZScsXG4gICAgICAgICAgbG9jYWxlOiBvcHRpb25zLmxvY2FsZSxcbiAgICAgICAgICBjYWxlbmRhcjogb3B0aW9ucy5jYWxlbmRhciA/PyB0aGlzLmNhbGVuZGFyU2VydmljZS5jYWxlbmRhci5uYW1lKCksXG4gICAgICAgIH1cbiAgICAgICAgOiB7XG4gICAgICAgICAgZm9ybWF0OiBvcHRpb25zLFxuICAgICAgICAgIGNhbGVuZGFyOiB0aGlzLmNhbGVuZGFyU2VydmljZS5jYWxlbmRhci5uYW1lKCksXG4gICAgICAgIH07XG5cbiAgICByZXR1cm4gdGhpcy5jYWxlbmRhclNlcnZpY2VcbiAgICAgIC5jcmVhdGUodmFsdWUgYXMgRGF0ZSwgZWZmZWN0aXZlT3B0aW9ucy5jYWxlbmRhciBhcyBzdHJpbmcpXG4gICAgICAuZm9ybWF0KGVmZmVjdGl2ZU9wdGlvbnMuZm9ybWF0LCB7IGxvY2FsZTogZWZmZWN0aXZlT3B0aW9ucy5sb2NhbGUgfSk7XG4gIH1cbn1cbiJdfQ==
@@ -0,0 +1,52 @@
1
+ import { Injectable } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export class AXTimeDurationFormatter {
4
+ get name() {
5
+ return 'time-duration';
6
+ }
7
+ format(value, options) {
8
+ const milliseconds = Number(value);
9
+ if (milliseconds === null || isNaN(milliseconds)) {
10
+ return '...';
11
+ }
12
+ // Convert milliseconds to various units
13
+ const totalMilliseconds = milliseconds % 1000;
14
+ const totalSeconds = Math.floor(milliseconds / 1000);
15
+ const seconds = totalSeconds % 60;
16
+ const totalMinutes = Math.floor(totalSeconds / 60);
17
+ const minutes = totalMinutes % 60;
18
+ const totalHours = Math.floor(totalMinutes / 60);
19
+ // Helper function for zero-padding
20
+ const pad = (num, length = 2) => num.toString().padStart(length, '0');
21
+ // Default format if none provided
22
+ const format = options?.format || (totalHours >= 0 ? 'HH:mm:ss' : 'mm:ss');
23
+ const formattedTime = [];
24
+ // Parse format and build the time string accordingly
25
+ if (format.includes('HH') || format.includes('H')) {
26
+ formattedTime.push(pad(totalHours));
27
+ }
28
+ if (format.includes('mm')) {
29
+ formattedTime.push(pad(minutes));
30
+ }
31
+ else if (format.includes('m')) {
32
+ formattedTime.push(minutes.toString());
33
+ }
34
+ if (format.includes('ss')) {
35
+ formattedTime.push(pad(seconds));
36
+ }
37
+ else if (format.includes('s')) {
38
+ formattedTime.push(seconds.toString());
39
+ }
40
+ if (format.includes('ms') || format.includes('MS')) {
41
+ formattedTime.push(pad(totalMilliseconds, 3));
42
+ }
43
+ // Join the parts according to the format
44
+ return formattedTime.join(format.includes('ms') || format.includes('MS') ? ':' : ':');
45
+ }
46
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXTimeDurationFormatter, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
47
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXTimeDurationFormatter }); }
48
+ }
49
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXTimeDurationFormatter, decorators: [{
50
+ type: Injectable
51
+ }] });
52
+ //# sourceMappingURL=data:application/json;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1ZGVzKCdNUycpKSB7XG4gICAgICBmb3JtYXR0ZWRUaW1lLnB1c2gocGFkKHRvdGFsTWlsbGlzZWNvbmRzLCAzKSk7XG4gICAgfVxuXG4gICAgLy8gSm9pbiB0aGUgcGFydHMgYWNjb3JkaW5nIHRvIHRoZSBmb3JtYXRcbiAgICByZXR1cm4gZm9ybWF0dGVkVGltZS5qb2luKGZvcm1hdC5pbmNsdWRlcygnbXMnKSB8fCBmb3JtYXQuaW5jbHVkZXMoJ01TJykgPyAnOicgOiAnOicpO1xuICB9XG59XG4iXX0=
@@ -88,4 +88,4 @@ export class AXTimeLeftFormatter {
88
88
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXTimeLeftFormatter, decorators: [{
89
89
  type: Injectable
90
90
  }] });
91
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGltZWxlZnQtZm9ybWF0dGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb3JlL2RhdGUtdGltZS9zcmMvbGliL2Zvcm1hdHRlcnMvdGltZWxlZnQtZm9ybWF0dGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0MsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLFdBQVcsQ0FBQzs7QUFjbEMsTUFBTSxPQUFPLG1CQUFtQjtJQUM5QixJQUFJLElBQUk7UUFDTixPQUFPLFVBQVUsQ0FBQztJQUNwQixDQUFDO0lBRUQsTUFBTSxDQUFDLEtBQXNCLEVBQUUsT0FBb0M7UUFDakUsTUFBTSxZQUFZLEdBQUcsTUFBTSxDQUFDLEtBQUssQ0FBQyxDQUFDO1FBQ25DLElBQUksWUFBWSxLQUFLLElBQUksSUFBSSxLQUFLLENBQUMs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3VuZChkdXJhdGlvbkluU2Vjb25kcyAvICgzNjAwICogMjQgKiAzNjUpKX0geWVhciR7ZHVyYXRpb25JblNlY29uZHMgPj0gNjAgKiA2MCAqIDI0ICogNzMwID8gJ3MnIDogJyd9IGxlZnRgO1xuICAgICAgY2FzZSAneXknOlxuICAgICAgY2FzZSAnWVknOlxuICAgICAgY2FzZSAneXl5eSc6XG4gICAgICBjYXNlICdZWVlZJzpcbiAgICAgICAgaWYgKGR1cmF0aW9uSW5TZWNvbmRzIDwgNjAgKiA2MCAqIDI0ICogNTQ3KSByZXR1cm4gJzAxIHllYXIgbGVmdCc7XG4gICAgICAgIHJldHVybiBgJHtwYWQoTWF0aC5yb3VuZChkdXJhdGlvbkluU2Vjb25kcyAvICgzNjAwICogMjQgKiAzNjUpKSl9IHllYXJzIGxlZnRgO1xuICAgICAgZGVmYXVsdDpcbiAgICAgICAgcmV0dXJuICdJbnZhbGlkIGZvcm1hdCc7XG4gICAgfVxuICB9XG59XG4iXX0=
@@ -1,5 +1,5 @@
1
1
  import { Injectable, inject } from '@angular/core';
2
- import { BehaviorSubject, catchError, finalize, firstValueFrom, forkJoin, map, of, shareReplay, startWith, switchMap, take, tap, } from 'rxjs';
2
+ import { BehaviorSubject, catchError, finalize, firstValueFrom, forkJoin, lastValueFrom, map, of, shareReplay, startWith, switchMap, take, tap, } from 'rxjs';
3
3
  import { AX_TRANSLATION_LOADER } from './translation.loader';
4
4
  import { set as lodashSet, get as lodashGet } from 'lodash-es';
5
5
  import { AX_TRANSLATION_CONFIG } from './translation.config';
@@ -76,6 +76,9 @@ export class AXTranslationService {
76
76
  });
77
77
  }
78
78
  }
79
+ isLangAvailable(lang, scope = null) {
80
+ return !this.translationCache[lang] && (!scope || !this.translationCache[lang][scope]);
81
+ }
79
82
  load(key, options = {}) {
80
83
  const { lang = this.getActiveLang(), scope = this.config.defaultScope } = options;
81
84
  // Function to fetch translation
@@ -152,12 +155,16 @@ export class AXTranslationService {
152
155
  const { lang = this.getActiveLang(), scope = this.config.defaultScope } = options || {};
153
156
  // Check if the translation for the active language is available
154
157
  let translation = lodashGet(this.translationCache, `${lang}.${scope}.${key}`);
158
+ //
159
+ const loadLang = () => lastValueFrom(this.getOrLoadTranslations(lang, scope));
155
160
  // If not available, check lastActiveLang
156
161
  if (!translation && this.lastActiveLang) {
162
+ loadLang();
157
163
  translation = lodashGet(this.translationCache, `${this.lastActiveLang}.${scope}.${key}`);
158
164
  }
159
165
  // If still not available, use the default language
160
166
  if (!translation) {
167
+ loadLang();
161
168
  translation = lodashGet(this.translationCache, `${this.getDefaultLang()}.${scope}.${key}`);
162
169
  }
163
170
  // Perform parameter replacement
@@ -170,4 +177,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImpor
170
177
  type: Injectable,
171
178
  args: [{ providedIn: 'root' }]
172
179
  }], ctorParameters: () => [] });
173
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNsYXRpb24uc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29yZS90cmFuc2xhdGlvbi9zcmMvbGliL3RyYW5zbGF0aW9uLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDbkQsT0FBTyxFQUNMLGVBQWUsRUFFZixVQUFVLEVBQ1YsUUFBUSxFQUNSLGNBQWMsRUFDZCxRQUFRLEVBQ1IsR0FBRyxFQUNILEVBQUUsRUFDRixXQUFXLEVBQ1gsU0FBUyxFQUNULFNBQVMsRUFDVCxJQUFJLEVBQ0osR0FBRyxHQUNKLE1BQU0sTUFBTSxDQUFDO0FBTWQsT0FBTyxFQUFFLHFCQUFxQixFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFD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@dynamic
2
2
  export class AXHtmlUtil {
3
3
  static focusElement(element) {
4
- const list = [
5
- 'button',
6
- 'input',
7
- '[href]',
8
- 'select',
9
- 'textarea',
10
- '[tabindex]',
11
- ].map((c) => c + ':not([tabindex="-1"])');
4
+ const list = ['button', 'input', '[href]', 'select', 'textarea', '[tabindex]'].map((c) => c + ':not([tabindex="-1"])');
12
5
  const focusable = element.querySelector(list.join(', '));
13
6
  if (focusable) {
14
7
  focusable.focus();
@@ -17,14 +10,7 @@ export class AXHtmlUtil {
17
10
  return null;
18
11
  }
19
12
  static blurElement(element) {
20
- const list = [
21
- 'button',
22
- 'input',
23
- '[href]',
24
- 'select',
25
- 'textarea',
26
- '[tabindex]',
27
- ].map((c) => c + ':not([tabindex="-1"])');
13
+ const list = ['button', 'input', '[href]', 'select', 'textarea', '[tabindex]'].map((c) => c + ':not([tabindex="-1"])');
28
14
  const focusable = element.querySelector(list.join(', '));
29
15
  if (focusable) {
30
16
  focusable.blur();
@@ -35,5 +21,9 @@ export class AXHtmlUtil {
35
21
  static hasFocus(element) {
36
22
  return element.matches(':focus-within') || element.matches(':focus');
37
23
  }
24
+ static isRtl(element) {
25
+ const rtl = element.classList.contains('ax-rtl') || window.getComputedStyle(element, null).getPropertyValue('direction') === 'rtl';
26
+ return rtl;
27
+ }
38
28
  }
39
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHRtbC11dGlsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb3JlL3V0aWxzL3NyYy9saWIvaHRtbC11dGlsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLFdBQVc7QUFDWCxNQUFNLE9BQU8sVUFBVTtJQUNyQixNQUFNLENBQUMsWUFBWSxDQUFDLE9BQW9CO1FBQ3RDLE1BQU0sSUFBSSxHQUFHO1lBQ1gsUUFBUTtZQUNSLE9BQU87WUFD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b2N1cy13aXRoaW4nKSB8fCBlbGVtZW50Lm1hdGNoZXMoJzpmb2N1cycpO1xuICB9XG5cbiAgc3RhdGljIGlzUnRsKGVsZW1lbnQ6IEhUTUxFbGVtZW50KSB7XG4gICAgY29uc3QgcnRsID0gZWxlbWVudC5jbGFzc0xpc3QuY29udGFpbnMoJ2F4LXJ0bCcpIHx8IHdpbmRvdy5nZXRDb21wdXRlZFN0eWxlKGVsZW1lbnQsIG51bGwpLmdldFByb3BlcnR5VmFsdWUoJ2RpcmVjdGlvbicpID09PSAncnRsJztcbiAgICByZXR1cm4gcnRsO1xuICB9XG59XG4iXX0=
@@ -1277,11 +1277,61 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImpor
1277
1277
  args: [{ name: 'axDate' }]
1278
1278
  }] });
1279
1279
 
1280
+ class AXTimeDurationFormatter {
1281
+ get name() {
1282
+ return 'time-duration';
1283
+ }
1284
+ format(value, options) {
1285
+ const milliseconds = Number(value);
1286
+ if (milliseconds === null || isNaN(milliseconds)) {
1287
+ return '...';
1288
+ }
1289
+ // Convert milliseconds to various units
1290
+ const totalMilliseconds = milliseconds % 1000;
1291
+ const totalSeconds = Math.floor(milliseconds / 1000);
1292
+ const seconds = totalSeconds % 60;
1293
+ const totalMinutes = Math.floor(totalSeconds / 60);
1294
+ const minutes = totalMinutes % 60;
1295
+ const totalHours = Math.floor(totalMinutes / 60);
1296
+ // Helper function for zero-padding
1297
+ const pad = (num, length = 2) => num.toString().padStart(length, '0');
1298
+ // Default format if none provided
1299
+ const format = options?.format || (totalHours >= 0 ? 'HH:mm:ss' : 'mm:ss');
1300
+ const formattedTime = [];
1301
+ // Parse format and build the time string accordingly
1302
+ if (format.includes('HH') || format.includes('H')) {
1303
+ formattedTime.push(pad(totalHours));
1304
+ }
1305
+ if (format.includes('mm')) {
1306
+ formattedTime.push(pad(minutes));
1307
+ }
1308
+ else if (format.includes('m')) {
1309
+ formattedTime.push(minutes.toString());
1310
+ }
1311
+ if (format.includes('ss')) {
1312
+ formattedTime.push(pad(seconds));
1313
+ }
1314
+ else if (format.includes('s')) {
1315
+ formattedTime.push(seconds.toString());
1316
+ }
1317
+ if (format.includes('ms') || format.includes('MS')) {
1318
+ formattedTime.push(pad(totalMilliseconds, 3));
1319
+ }
1320
+ // Join the parts according to the format
1321
+ return formattedTime.join(format.includes('ms') || format.includes('MS') ? ':' : ':');
1322
+ }
1323
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXTimeDurationFormatter, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1324
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXTimeDurationFormatter }); }
1325
+ }
1326
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXTimeDurationFormatter, decorators: [{
1327
+ type: Injectable
1328
+ }] });
1329
+
1280
1330
  class AXDateTimeModule {
1281
1331
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXDateTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1282
1332
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.2", ngImport: i0, type: AXDateTimeModule, declarations: [AXDateTimePipe], imports: [i1.AXFormatModule], exports: [AXDateTimePipe] }); }
1283
1333
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXDateTimeModule, imports: [AXFormatModule.forChild({
1284
- formatters: [AXDateTimeFormatter, AXTimeLeftFormatter],
1334
+ formatters: [AXDateTimeFormatter, AXTimeLeftFormatter, AXTimeDurationFormatter],
1285
1335
  })] }); }
1286
1336
  }
1287
1337
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXDateTimeModule, decorators: [{
@@ -1289,7 +1339,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImpor
1289
1339
  args: [{
1290
1340
  imports: [
1291
1341
  AXFormatModule.forChild({
1292
- formatters: [AXDateTimeFormatter, AXTimeLeftFormatter],
1342
+ formatters: [AXDateTimeFormatter, AXTimeLeftFormatter, AXTimeDurationFormatter],
1293
1343
  }),
1294
1344
  ],
1295
1345
  exports: [AXDateTimePipe],