ngx-ode-ui 4.8.0-feat-explorer.2 → 4.8.0-objectstorage.4

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.
@@ -7,7 +7,7 @@ import { NG_VALUE_ACCESSOR, NgModel, FormsModule } from '@angular/forms';
7
7
  import Flatpickr from 'flatpickr';
8
8
  import French from 'flatpickr/dist/l10n/fr.js';
9
9
  import * as i1 from '@angular/common';
10
- import { CommonModule, DatePipe } from '@angular/common';
10
+ import { CommonModule, getLocaleId, DatePipe } from '@angular/common';
11
11
  import * as i2$1 from 'ngx-ode-sijil';
12
12
  import { NgxOdeSijilModule } from 'ngx-ode-sijil';
13
13
  import * as i2$2 from 'ngx-infinite-scroll';
@@ -2290,7 +2290,7 @@ WizardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versio
2290
2290
  </nav>
2291
2291
  </section>
2292
2292
  </div>
2293
- `, isInline: true, styles: [".wizard{display:flex}.wizard-menu{background:#5b6472;flex:0 0 240px}.wizard-menu ul{padding:10px 30px}.wizard-menu ul li{color:#eaedf2;list-style-type:none;padding:5px 0}.wizard-menu ul li.active,.wizard-menu ul li.finish{font-weight:700;color:#fff}.wizard-menu ul li.finish{color:green}.wizard-menu__title{font-weight:700;font-size:1.2em;color:#fff;padding:25px 0 0 10px}.wizard-content{background:#fff;flex:auto}.wizard-content-nav{text-align:right}.wizard-content-nav__button{margin:10px 0}.wizard-content-nav__button--next{margin-right:16px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.S5lComponent, selector: "s5l", inputs: ["s5l-params", "s5l-lang"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
2293
+ `, isInline: true, styles: [".wizard{display:flex;overflow:auto}.wizard-menu{background:#5b6472;flex:0 0 240px}.wizard-menu ul{padding:10px 30px}.wizard-menu ul li{color:#eaedf2;list-style-type:none;padding:5px 0}.wizard-menu ul li.active,.wizard-menu ul li.finish{font-weight:700;color:#fff}.wizard-menu ul li.finish{color:green}.wizard-menu__title{font-weight:700;font-size:1.2em;color:#fff;padding:25px 0 0 10px}.wizard-content{background:#fff;flex:auto;overflow:auto}.wizard-content-nav{text-align:right}.wizard-content-nav__button{margin:10px 0}.wizard-content-nav__button--next{margin-right:16px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.S5lComponent, selector: "s5l", inputs: ["s5l-params", "s5l-lang"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
2294
2294
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: WizardComponent, decorators: [{
2295
2295
  type: Component,
2296
2296
  args: [{ selector: 'ode-wizard', template: `
@@ -2328,7 +2328,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImpor
2328
2328
  </nav>
2329
2329
  </section>
2330
2330
  </div>
2331
- `, styles: [".wizard{display:flex}.wizard-menu{background:#5b6472;flex:0 0 240px}.wizard-menu ul{padding:10px 30px}.wizard-menu ul li{color:#eaedf2;list-style-type:none;padding:5px 0}.wizard-menu ul li.active,.wizard-menu ul li.finish{font-weight:700;color:#fff}.wizard-menu ul li.finish{color:green}.wizard-menu__title{font-weight:700;font-size:1.2em;color:#fff;padding:25px 0 0 10px}.wizard-content{background:#fff;flex:auto}.wizard-content-nav{text-align:right}.wizard-content-nav__button{margin:10px 0}.wizard-content-nav__button--next{margin-right:16px}\n"] }]
2331
+ `, styles: [".wizard{display:flex;overflow:auto}.wizard-menu{background:#5b6472;flex:0 0 240px}.wizard-menu ul{padding:10px 30px}.wizard-menu ul li{color:#eaedf2;list-style-type:none;padding:5px 0}.wizard-menu ul li.active,.wizard-menu ul li.finish{font-weight:700;color:#fff}.wizard-menu ul li.finish{color:green}.wizard-menu__title{font-weight:700;font-size:1.2em;color:#fff;padding:25px 0 0 10px}.wizard-content{background:#fff;flex:auto;overflow:auto}.wizard-content-nav{text-align:right}.wizard-content-nav__button{margin:10px 0}.wizard-content-nav__button--next{margin-right:16px}\n"] }]
2332
2332
  }], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { cancel: [{
2333
2333
  type: Output
2334
2334
  }], previousStep: [{
@@ -2645,8 +2645,21 @@ class LocalizedDatePipe {
2645
2645
  constructor(bundlesService) {
2646
2646
  this.bundlesService = bundlesService;
2647
2647
  }
2648
- transform(value, pattern = 'mediumDate') {
2649
- const datePipe = new DatePipe(this.bundlesService.currentLanguage);
2648
+ transform(value, pattern = "mediumDate") {
2649
+ let targetLanguage = this.bundlesService.currentLanguage || "en";
2650
+ try {
2651
+ // If targetLanguage and angular current locale are different, fall back angular locale to "en"
2652
+ if (getLocaleId(targetLanguage) !== targetLanguage) {
2653
+ targetLanguage = "en";
2654
+ }
2655
+ }
2656
+ catch (e) {
2657
+ // getLocaleId(targetLanguage) can throw an error when locale is not recognized
2658
+ // In such a case, fall back to "en"
2659
+ targetLanguage = "en";
2660
+ }
2661
+ // Use angular locale formatting for localized dates
2662
+ const datePipe = new DatePipe(targetLanguage);
2650
2663
  return datePipe.transform(value, pattern);
2651
2664
  }
2652
2665
  }