@osovitny/anatoly 3.19.12 → 3.19.14
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.
- package/fesm2022/osovitny-anatoly.mjs +20 -13
- package/fesm2022/osovitny-anatoly.mjs.map +1 -1
- package/lib/core/converts/dateConvert.d.ts +2 -1
- package/lib/iam/iam-pages.routes.d.ts +1 -1
- package/lib/ui/components/dropdownlists/timezone/timezone.dropdownlist.d.ts +2 -1
- package/lib/ui/components/index.d.ts +1 -1
- package/package.json +2 -2
|
@@ -6,6 +6,7 @@ import * as i1 from '@angular/common/http';
|
|
|
6
6
|
import { HttpResponse, HttpClient, HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
|
|
7
7
|
import * as i1$1 from '@angular/common';
|
|
8
8
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
9
|
+
import { format, formatDistance, formatDistanceToNow } from 'date-fns';
|
|
9
10
|
import js_beautify from 'js-beautify';
|
|
10
11
|
import * as i1$2 from '@angular/router';
|
|
11
12
|
import { NavigationEnd, NavigationStart, NavigationCancel, NavigationError, RouterModule } from '@angular/router';
|
|
@@ -13,7 +14,6 @@ import { v4 } from 'uuid';
|
|
|
13
14
|
import * as i4 from '@azure/msal-angular';
|
|
14
15
|
import { MSAL_GUARD_CONFIG, MsalGuard, MsalInterceptor, MSAL_INTERCEPTOR_CONFIG, MSAL_INSTANCE, MsalService, MsalBroadcastService, MsalModule } from '@azure/msal-angular';
|
|
15
16
|
import { BrowserUtils, EventType, InteractionStatus, InteractionType, InteractionRequiredAuthError, PromptValue, PublicClientApplication, LogLevel } from '@azure/msal-browser';
|
|
16
|
-
import { format, formatDistance, formatDistanceToNow } from 'date-fns';
|
|
17
17
|
import { enUS } from 'date-fns/locale/en-US';
|
|
18
18
|
import * as i1$3 from '@ngx-translate/core';
|
|
19
19
|
import { TranslateModule, TranslateLoader, TranslateService } from '@ngx-translate/core';
|
|
@@ -1260,19 +1260,23 @@ function isValidTimezoneIANAString(timeZoneString) {
|
|
|
1260
1260
|
</file>
|
|
1261
1261
|
*/
|
|
1262
1262
|
class DateConvert {
|
|
1263
|
-
static toDate(
|
|
1264
|
-
const argStr = Object.prototype.toString.call(
|
|
1265
|
-
if (
|
|
1266
|
-
return
|
|
1263
|
+
static toDate(date) {
|
|
1264
|
+
const argStr = Object.prototype.toString.call(date);
|
|
1265
|
+
if (date instanceof Date || (typeof date === "object" && argStr === "[object Date]")) {
|
|
1266
|
+
return date;
|
|
1267
1267
|
}
|
|
1268
|
-
else if (typeof
|
|
1269
|
-
typeof
|
|
1270
|
-
return new Date(
|
|
1268
|
+
else if (typeof date === "number" || argStr === "[object Number]" ||
|
|
1269
|
+
typeof date === "string" || argStr === "[object String]") {
|
|
1270
|
+
return new Date(date);
|
|
1271
1271
|
}
|
|
1272
1272
|
else {
|
|
1273
1273
|
return new Date(NaN);
|
|
1274
1274
|
}
|
|
1275
1275
|
}
|
|
1276
|
+
static toFormattedDate(date, formatStr = 'yyyy-MM-dd HH:mm:ss') {
|
|
1277
|
+
const parsedDate = this.toDate(date);
|
|
1278
|
+
return format(parsedDate, formatStr);
|
|
1279
|
+
}
|
|
1276
1280
|
static utcToLocal(dirtyDate) {
|
|
1277
1281
|
if (typeof dirtyDate === 'string') {
|
|
1278
1282
|
if (dirtyDate.indexOf("T") > -1) {
|
|
@@ -7451,7 +7455,7 @@ function TimezoneDropdownlist_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
7451
7455
|
i0.ɵɵadvance();
|
|
7452
7456
|
i0.ɵɵproperty("ngIf", ctx_r1.isTitleVisible);
|
|
7453
7457
|
i0.ɵɵadvance();
|
|
7454
|
-
i0.ɵɵproperty("formControlName", ctx_r1.controlName);
|
|
7458
|
+
i0.ɵɵproperty("formControlName", ctx_r1.controlName)("disabled", ctx_r1.disabled);
|
|
7455
7459
|
i0.ɵɵadvance();
|
|
7456
7460
|
i0.ɵɵproperty("ngForOf", ctx_r1.items);
|
|
7457
7461
|
} }
|
|
@@ -7460,6 +7464,7 @@ class TimezoneDropdownlist extends EditComponentBase {
|
|
|
7460
7464
|
super();
|
|
7461
7465
|
this.api = api;
|
|
7462
7466
|
this.appContext = appContext;
|
|
7467
|
+
this.disabled = false;
|
|
7463
7468
|
this.title = 'Timezone';
|
|
7464
7469
|
}
|
|
7465
7470
|
ngOnInit() {
|
|
@@ -7494,8 +7499,8 @@ class TimezoneDropdownlist extends EditComponentBase {
|
|
|
7494
7499
|
}
|
|
7495
7500
|
}
|
|
7496
7501
|
static { this.ɵfac = function TimezoneDropdownlist_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TimezoneDropdownlist)(i0.ɵɵdirectiveInject(CoreApiService), i0.ɵɵdirectiveInject(AppContextService)); }; }
|
|
7497
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TimezoneDropdownlist, selectors: [["anatoly-timezone-dropdownlist"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [[4, "ngIf"], [3, "formGroup", 4, "ngIf"], [3, "formGroup"], ["class", "col-form-label", 4, "ngIf"], [1, "form-select", 3, "formControlName"], [3, "value", 4, "ngFor", "ngForOf"], [1, "col-form-label"], [3, "value"]], template: function TimezoneDropdownlist_Template(rf, ctx) { if (rf & 1) {
|
|
7498
|
-
i0.ɵɵtemplate(0, TimezoneDropdownlist_div_0_Template, 1, 0, "div", 0)(1, TimezoneDropdownlist_div_1_Template, 4,
|
|
7502
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TimezoneDropdownlist, selectors: [["anatoly-timezone-dropdownlist"]], inputs: { disabled: "disabled" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [[4, "ngIf"], [3, "formGroup", 4, "ngIf"], [3, "formGroup"], ["class", "col-form-label", 4, "ngIf"], [1, "form-select", 3, "formControlName", "disabled"], [3, "value", 4, "ngFor", "ngForOf"], [1, "col-form-label"], [3, "value"]], template: function TimezoneDropdownlist_Template(rf, ctx) { if (rf & 1) {
|
|
7503
|
+
i0.ɵɵtemplate(0, TimezoneDropdownlist_div_0_Template, 1, 0, "div", 0)(1, TimezoneDropdownlist_div_1_Template, 4, 5, "div", 1);
|
|
7499
7504
|
} if (rf & 2) {
|
|
7500
7505
|
i0.ɵɵproperty("ngIf", ctx.isNgModelBased);
|
|
7501
7506
|
i0.ɵɵadvance();
|
|
@@ -7504,8 +7509,10 @@ class TimezoneDropdownlist extends EditComponentBase {
|
|
|
7504
7509
|
}
|
|
7505
7510
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TimezoneDropdownlist, [{
|
|
7506
7511
|
type: Component,
|
|
7507
|
-
args: [{ selector: 'anatoly-timezone-dropdownlist', standalone: false, template: "<div *ngIf='isNgModelBased'>\r\n</div>\r\n\r\n<div *ngIf='!isNgModelBased' [formGroup]='formGroup'>\r\n <label *ngIf='isTitleVisible' class='col-form-label'>Timezone</label>\r\n <select [formControlName]='controlName' class='form-select'>\r\n <option *ngFor='let item of items' [value]='item.code'>\r\n ({{ item.offset }}) {{ item.name }}\r\n </option>\r\n </select>\r\n</div>\r\n" }]
|
|
7508
|
-
}], () => [{ type: CoreApiService }, { type: AppContextService }],
|
|
7512
|
+
args: [{ selector: 'anatoly-timezone-dropdownlist', standalone: false, template: "<div *ngIf='isNgModelBased'>\r\n</div>\r\n\r\n<div *ngIf='!isNgModelBased' [formGroup]='formGroup'>\r\n <label *ngIf='isTitleVisible' class='col-form-label'>Timezone</label>\r\n <select [formControlName]='controlName' class='form-select' [disabled]='disabled'>\r\n <option *ngFor='let item of items' [value]='item.code'>\r\n ({{ item.offset }}) {{ item.name }}\r\n </option>\r\n </select>\r\n</div>\r\n" }]
|
|
7513
|
+
}], () => [{ type: CoreApiService }, { type: AppContextService }], { disabled: [{
|
|
7514
|
+
type: Input
|
|
7515
|
+
}] }); })();
|
|
7509
7516
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TimezoneDropdownlist, { className: "TimezoneDropdownlist", filePath: "lib/ui/components/dropdownlists/timezone/timezone.dropdownlist.ts", lineNumber: 30 }); })();
|
|
7510
7517
|
|
|
7511
7518
|
/*
|