intelica-library-ui 0.1.120 → 0.1.121
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.
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
2
1
|
import * as i0 from '@angular/core';
|
|
3
2
|
import { inject, Injectable, signal, Pipe, Component, HostListener, Directive, EventEmitter, Output, Input, forwardRef, TemplateRef, ContentChild, ContentChildren, ViewChild, PLATFORM_ID, Inject } from '@angular/core';
|
|
4
|
-
import { BehaviorSubject, catchError, throwError, from, switchMap, Subject, Subscription } from 'rxjs';
|
|
5
3
|
import { getCookie, Cookies, setCookie } from 'typescript-cookie';
|
|
4
|
+
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
5
|
+
import { BehaviorSubject, catchError, throwError, from, switchMap, Subject, Subscription } from 'rxjs';
|
|
6
6
|
import Swal from 'sweetalert2';
|
|
7
7
|
import * as i1 from '@angular/common';
|
|
8
8
|
import { CommonModule, isPlatformBrowser } from '@angular/common';
|
|
@@ -42,26 +42,6 @@ import JSEncrypt from 'jsencrypt';
|
|
|
42
42
|
import Aura from '@primeng/themes/aura';
|
|
43
43
|
import { definePreset } from '@primeng/themes';
|
|
44
44
|
|
|
45
|
-
// import { CookieAttributes } from "typescript-cookie/dist/types";
|
|
46
|
-
const domain = window.location.hostname.split(".").slice(-2).join(".");
|
|
47
|
-
const secure = !domain.includes("localhost");
|
|
48
|
-
const CookieAttributesGeneral = { domain: domain, path: "/", secure: secure };
|
|
49
|
-
|
|
50
|
-
const Color = {
|
|
51
|
-
mastercard: "#ff7f00",
|
|
52
|
-
visa: "#17375E",
|
|
53
|
-
amex: "#348AD5",
|
|
54
|
-
orange: "#ff7f00",
|
|
55
|
-
orangeDark: "#CC4900",
|
|
56
|
-
blue: "#17375E",
|
|
57
|
-
gray: "#D3D3D3",
|
|
58
|
-
gray3: "#a6a5a1",
|
|
59
|
-
gray5: "#e9e9e9",
|
|
60
|
-
};
|
|
61
|
-
const getColor = (name) => {
|
|
62
|
-
return Color[name];
|
|
63
|
-
};
|
|
64
|
-
|
|
65
45
|
class ConfigService {
|
|
66
46
|
Http = inject(HttpClient);
|
|
67
47
|
environment;
|
|
@@ -94,6 +74,186 @@ function InitializeConfigService(confg) {
|
|
|
94
74
|
return () => confg.init();
|
|
95
75
|
}
|
|
96
76
|
|
|
77
|
+
class TermService {
|
|
78
|
+
_http = inject(HttpClient);
|
|
79
|
+
_config = inject(ConfigService);
|
|
80
|
+
GetTerms(languageCode, pageRoot) {
|
|
81
|
+
return this._http.get(`${this._config.environment?.configurationPath}/TermPage/GetPageTerm/${languageCode}/${pageRoot}`);
|
|
82
|
+
}
|
|
83
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TermService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
84
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TermService, providedIn: "root" });
|
|
85
|
+
}
|
|
86
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TermService, decorators: [{
|
|
87
|
+
type: Injectable,
|
|
88
|
+
args: [{ providedIn: "root" }]
|
|
89
|
+
}] });
|
|
90
|
+
|
|
91
|
+
class GlobalTermService {
|
|
92
|
+
terms = [];
|
|
93
|
+
languageCode = "";
|
|
94
|
+
TermsReady = signal(false);
|
|
95
|
+
PageRoot = "";
|
|
96
|
+
termService = inject(TermService);
|
|
97
|
+
Initialize(pageRoot) {
|
|
98
|
+
let languageCode = getCookie("language") ?? "EN";
|
|
99
|
+
this.PageRoot = pageRoot;
|
|
100
|
+
if (pageRoot == "") {
|
|
101
|
+
this.TermsReady.set(true);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
this.termService.GetTerms(languageCode, pageRoot).subscribe(response => {
|
|
105
|
+
this.terms = response;
|
|
106
|
+
this.TermsReady.set(true);
|
|
107
|
+
this.SetTerms();
|
|
108
|
+
this.languageCode = languageCode;
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
async SetTerms() {
|
|
112
|
+
while (true) {
|
|
113
|
+
await sleep$1(10);
|
|
114
|
+
if (document.querySelectorAll("[data-term]").length > 1)
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
let textsToChange = document.querySelectorAll("[data-term]");
|
|
118
|
+
textsToChange.forEach(async (element) => {
|
|
119
|
+
let dataValue = element.getAttribute("data-term");
|
|
120
|
+
let newText = this.terms.find(x => x.termName == dataValue)?.termValue ?? "";
|
|
121
|
+
element.innerHTML = newText;
|
|
122
|
+
element.setAttribute("placeholder", newText);
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: GlobalTermService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
126
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: GlobalTermService, providedIn: "root" });
|
|
127
|
+
}
|
|
128
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: GlobalTermService, decorators: [{
|
|
129
|
+
type: Injectable,
|
|
130
|
+
args: [{ providedIn: "root" }]
|
|
131
|
+
}] });
|
|
132
|
+
function sleep$1(ms) {
|
|
133
|
+
return new Promise(resolve => setTimeout(resolve, ms));
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// import GlobalTermService from "../services/globalTerm.service";
|
|
137
|
+
class TermPipe {
|
|
138
|
+
globalTermService = inject(GlobalTermService);
|
|
139
|
+
transform(termName, language, mode = 1) {
|
|
140
|
+
let term = this.globalTermService.terms.find(x => x.termName == termName)?.termValue ?? "-";
|
|
141
|
+
if (mode == 2)
|
|
142
|
+
term = term.substring(0, 1);
|
|
143
|
+
if (mode == 3)
|
|
144
|
+
term = term.toUpperCase();
|
|
145
|
+
return term;
|
|
146
|
+
}
|
|
147
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TermPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
148
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: TermPipe, isStandalone: true, name: "term" });
|
|
149
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TermPipe, providedIn: "root" });
|
|
150
|
+
}
|
|
151
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TermPipe, decorators: [{
|
|
152
|
+
type: Injectable,
|
|
153
|
+
args: [{ providedIn: "root" }]
|
|
154
|
+
}, {
|
|
155
|
+
type: Pipe,
|
|
156
|
+
args: [{ name: "term" }]
|
|
157
|
+
}] });
|
|
158
|
+
|
|
159
|
+
class FormatAmountPipe {
|
|
160
|
+
transform(value, shortFormat = false, decimalPlaces = 2) {
|
|
161
|
+
if (value === null || value === undefined) {
|
|
162
|
+
return "0";
|
|
163
|
+
}
|
|
164
|
+
const numericValue = typeof value === "string" ? parseFloat(value) : value;
|
|
165
|
+
if (isNaN(numericValue)) {
|
|
166
|
+
return "0";
|
|
167
|
+
}
|
|
168
|
+
let formattedValue;
|
|
169
|
+
if (shortFormat) {
|
|
170
|
+
formattedValue = this.getShortFormat(numericValue, decimalPlaces);
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
formattedValue = this.formatWithThousandSeparators(numericValue, decimalPlaces);
|
|
174
|
+
}
|
|
175
|
+
return formattedValue;
|
|
176
|
+
}
|
|
177
|
+
getShortFormat(value, decimalPlaces) {
|
|
178
|
+
const absValue = Math.abs(value);
|
|
179
|
+
const suffixes = [
|
|
180
|
+
{ limit: 1e12, suffix: "T" },
|
|
181
|
+
{ limit: 1e9, suffix: "B" },
|
|
182
|
+
{ limit: 1e6, suffix: "M" },
|
|
183
|
+
{ limit: 1e3, suffix: "K" },
|
|
184
|
+
];
|
|
185
|
+
for (const { limit, suffix } of suffixes) {
|
|
186
|
+
if (absValue >= limit) {
|
|
187
|
+
return (value / limit).toFixed(decimalPlaces) + suffix;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
return value.toFixed(decimalPlaces);
|
|
191
|
+
}
|
|
192
|
+
formatWithThousandSeparators(value, decimalPlaces) {
|
|
193
|
+
return new Intl.NumberFormat("en-US", {
|
|
194
|
+
minimumFractionDigits: decimalPlaces,
|
|
195
|
+
maximumFractionDigits: decimalPlaces,
|
|
196
|
+
}).format(value);
|
|
197
|
+
}
|
|
198
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: FormatAmountPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
199
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: FormatAmountPipe, isStandalone: true, name: "amount" });
|
|
200
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: FormatAmountPipe, providedIn: "root" });
|
|
201
|
+
}
|
|
202
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: FormatAmountPipe, decorators: [{
|
|
203
|
+
type: Injectable,
|
|
204
|
+
args: [{
|
|
205
|
+
providedIn: "root",
|
|
206
|
+
}]
|
|
207
|
+
}, {
|
|
208
|
+
type: Pipe,
|
|
209
|
+
args: [{
|
|
210
|
+
name: "amount",
|
|
211
|
+
}]
|
|
212
|
+
}] });
|
|
213
|
+
|
|
214
|
+
class TruncatePipe {
|
|
215
|
+
transform(value, size = 15, original = false) {
|
|
216
|
+
if (!value)
|
|
217
|
+
return value;
|
|
218
|
+
if (value.length <= size)
|
|
219
|
+
return value;
|
|
220
|
+
let truncateString = value.substring(0, size);
|
|
221
|
+
return !original ? `${truncateString}...` : truncateString.toUpperCase();
|
|
222
|
+
}
|
|
223
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TruncatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
224
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: TruncatePipe, isStandalone: true, name: "truncate" });
|
|
225
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TruncatePipe, providedIn: "root" });
|
|
226
|
+
}
|
|
227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TruncatePipe, decorators: [{
|
|
228
|
+
type: Injectable,
|
|
229
|
+
args: [{ providedIn: "root" }]
|
|
230
|
+
}, {
|
|
231
|
+
type: Pipe,
|
|
232
|
+
args: [{
|
|
233
|
+
name: "truncate",
|
|
234
|
+
}]
|
|
235
|
+
}] });
|
|
236
|
+
|
|
237
|
+
// import { CookieAttributes } from "typescript-cookie/dist/types";
|
|
238
|
+
const domain = window.location.hostname.split(".").slice(-2).join(".");
|
|
239
|
+
const secure = !domain.includes("localhost");
|
|
240
|
+
const CookieAttributesGeneral = { domain: domain, path: "/", secure: secure };
|
|
241
|
+
|
|
242
|
+
const Color = {
|
|
243
|
+
mastercard: "#ff7f00",
|
|
244
|
+
visa: "#17375E",
|
|
245
|
+
amex: "#348AD5",
|
|
246
|
+
orange: "#ff7f00",
|
|
247
|
+
orangeDark: "#CC4900",
|
|
248
|
+
blue: "#17375E",
|
|
249
|
+
gray: "#D3D3D3",
|
|
250
|
+
gray3: "#a6a5a1",
|
|
251
|
+
gray5: "#e9e9e9",
|
|
252
|
+
};
|
|
253
|
+
const getColor = (name) => {
|
|
254
|
+
return Color[name];
|
|
255
|
+
};
|
|
256
|
+
|
|
97
257
|
class FeatureFlagService {
|
|
98
258
|
_http = inject(HttpClient);
|
|
99
259
|
_configService = inject(ConfigService);
|
|
@@ -311,7 +471,7 @@ class PermissionsService {
|
|
|
311
471
|
constructor() { }
|
|
312
472
|
async canActivate(next, state) {
|
|
313
473
|
while (true) {
|
|
314
|
-
await sleep
|
|
474
|
+
await sleep(10);
|
|
315
475
|
if (document.querySelectorAll("[data-security]").length > 0)
|
|
316
476
|
break;
|
|
317
477
|
}
|
|
@@ -337,7 +497,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
337
497
|
providedIn: "root",
|
|
338
498
|
}]
|
|
339
499
|
}], ctorParameters: () => [] });
|
|
340
|
-
function sleep
|
|
500
|
+
function sleep(ms) {
|
|
341
501
|
return new Promise(resolve => setTimeout(resolve, ms));
|
|
342
502
|
}
|
|
343
503
|
const TermGuard = (next, state) => {
|
|
@@ -345,165 +505,34 @@ const TermGuard = (next, state) => {
|
|
|
345
505
|
return true;
|
|
346
506
|
};
|
|
347
507
|
|
|
348
|
-
class
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TermService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
355
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TermService, providedIn: "root" });
|
|
356
|
-
}
|
|
357
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TermService, decorators: [{
|
|
358
|
-
type: Injectable,
|
|
359
|
-
args: [{ providedIn: "root" }]
|
|
360
|
-
}] });
|
|
361
|
-
|
|
362
|
-
class GlobalTermService {
|
|
363
|
-
terms = [];
|
|
364
|
-
languageCode = "";
|
|
365
|
-
TermsReady = signal(false);
|
|
366
|
-
PageRoot = "";
|
|
367
|
-
termService = inject(TermService);
|
|
368
|
-
Initialize(pageRoot) {
|
|
369
|
-
let languageCode = getCookie("language") ?? "EN";
|
|
370
|
-
this.PageRoot = pageRoot;
|
|
371
|
-
if (pageRoot == "") {
|
|
372
|
-
this.TermsReady.set(true);
|
|
373
|
-
return;
|
|
374
|
-
}
|
|
375
|
-
this.termService.GetTerms(languageCode, pageRoot).subscribe(response => {
|
|
376
|
-
this.terms = response;
|
|
377
|
-
this.TermsReady.set(true);
|
|
378
|
-
this.SetTerms();
|
|
379
|
-
this.languageCode = languageCode;
|
|
380
|
-
});
|
|
508
|
+
class RouteGuardService {
|
|
509
|
+
HttpClient = inject(HttpClient);
|
|
510
|
+
ConfigService = inject(ConfigService);
|
|
511
|
+
constructor() { }
|
|
512
|
+
async canActivate(next, state) {
|
|
513
|
+
this.ChangeRoute(next.data["pageRoot"]);
|
|
381
514
|
}
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
let textsToChange = document.querySelectorAll("[data-term]");
|
|
389
|
-
textsToChange.forEach(async (element) => {
|
|
390
|
-
let dataValue = element.getAttribute("data-term");
|
|
391
|
-
let newText = this.terms.find(x => x.termName == dataValue)?.termValue ?? "";
|
|
392
|
-
element.innerHTML = newText;
|
|
393
|
-
element.setAttribute("placeholder", newText);
|
|
515
|
+
ChangeRoute(pageRoot) {
|
|
516
|
+
this.HttpClient.get(`${this.ConfigService.environment?.securityPath}/Menu/GetBreadcrumbs/${pageRoot}`).subscribe(response => {
|
|
517
|
+
let eventChangeRoute = new CustomEvent("ChangeRoute", {
|
|
518
|
+
detail: { Breadcrumbs: response },
|
|
519
|
+
});
|
|
520
|
+
window.dispatchEvent(eventChangeRoute);
|
|
394
521
|
});
|
|
395
522
|
}
|
|
396
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type:
|
|
397
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type:
|
|
523
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: RouteGuardService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
524
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: RouteGuardService, providedIn: "root" });
|
|
398
525
|
}
|
|
399
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type:
|
|
400
|
-
type: Injectable,
|
|
401
|
-
args: [{ providedIn: "root" }]
|
|
402
|
-
}] });
|
|
403
|
-
function sleep(ms) {
|
|
404
|
-
return new Promise(resolve => setTimeout(resolve, ms));
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
// import GlobalTermService from "../services/globalTerm.service";
|
|
408
|
-
class TermPipe {
|
|
409
|
-
globalTermService = inject(GlobalTermService);
|
|
410
|
-
transform(termName, language, mode = 1) {
|
|
411
|
-
let term = this.globalTermService.terms.find(x => x.termName == termName)?.termValue ?? "-";
|
|
412
|
-
if (mode == 2)
|
|
413
|
-
term = term.substring(0, 1);
|
|
414
|
-
if (mode == 3)
|
|
415
|
-
term = term.toUpperCase();
|
|
416
|
-
return term;
|
|
417
|
-
}
|
|
418
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TermPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
419
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: TermPipe, isStandalone: true, name: "term" });
|
|
420
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TermPipe, providedIn: "root" });
|
|
421
|
-
}
|
|
422
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TermPipe, decorators: [{
|
|
423
|
-
type: Injectable,
|
|
424
|
-
args: [{ providedIn: "root" }]
|
|
425
|
-
}, {
|
|
426
|
-
type: Pipe,
|
|
427
|
-
args: [{ name: "term" }]
|
|
428
|
-
}] });
|
|
429
|
-
|
|
430
|
-
class FormatAmountPipe {
|
|
431
|
-
transform(value, shortFormat = false, decimalPlaces = 2) {
|
|
432
|
-
if (value === null || value === undefined) {
|
|
433
|
-
return "0";
|
|
434
|
-
}
|
|
435
|
-
const numericValue = typeof value === "string" ? parseFloat(value) : value;
|
|
436
|
-
if (isNaN(numericValue)) {
|
|
437
|
-
return "0";
|
|
438
|
-
}
|
|
439
|
-
let formattedValue;
|
|
440
|
-
if (shortFormat) {
|
|
441
|
-
formattedValue = this.getShortFormat(numericValue, decimalPlaces);
|
|
442
|
-
}
|
|
443
|
-
else {
|
|
444
|
-
formattedValue = this.formatWithThousandSeparators(numericValue, decimalPlaces);
|
|
445
|
-
}
|
|
446
|
-
return formattedValue;
|
|
447
|
-
}
|
|
448
|
-
getShortFormat(value, decimalPlaces) {
|
|
449
|
-
const absValue = Math.abs(value);
|
|
450
|
-
const suffixes = [
|
|
451
|
-
{ limit: 1e12, suffix: "T" },
|
|
452
|
-
{ limit: 1e9, suffix: "B" },
|
|
453
|
-
{ limit: 1e6, suffix: "M" },
|
|
454
|
-
{ limit: 1e3, suffix: "K" },
|
|
455
|
-
];
|
|
456
|
-
for (const { limit, suffix } of suffixes) {
|
|
457
|
-
if (absValue >= limit) {
|
|
458
|
-
return (value / limit).toFixed(decimalPlaces) + suffix;
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
return value.toFixed(decimalPlaces);
|
|
462
|
-
}
|
|
463
|
-
formatWithThousandSeparators(value, decimalPlaces) {
|
|
464
|
-
return new Intl.NumberFormat("en-US", {
|
|
465
|
-
minimumFractionDigits: decimalPlaces,
|
|
466
|
-
maximumFractionDigits: decimalPlaces,
|
|
467
|
-
}).format(value);
|
|
468
|
-
}
|
|
469
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: FormatAmountPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
470
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: FormatAmountPipe, isStandalone: true, name: "amount" });
|
|
471
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: FormatAmountPipe, providedIn: "root" });
|
|
472
|
-
}
|
|
473
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: FormatAmountPipe, decorators: [{
|
|
526
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: RouteGuardService, decorators: [{
|
|
474
527
|
type: Injectable,
|
|
475
528
|
args: [{
|
|
476
529
|
providedIn: "root",
|
|
477
530
|
}]
|
|
478
|
-
},
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
}] });
|
|
484
|
-
|
|
485
|
-
class TruncatePipe {
|
|
486
|
-
transform(value, size = 15, original = false) {
|
|
487
|
-
if (!value)
|
|
488
|
-
return value;
|
|
489
|
-
if (value.length <= size)
|
|
490
|
-
return value;
|
|
491
|
-
let truncateString = value.substring(0, size);
|
|
492
|
-
return !original ? `${truncateString}...` : truncateString.toUpperCase();
|
|
493
|
-
}
|
|
494
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TruncatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
495
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: TruncatePipe, isStandalone: true, name: "truncate" });
|
|
496
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TruncatePipe, providedIn: "root" });
|
|
497
|
-
}
|
|
498
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TruncatePipe, decorators: [{
|
|
499
|
-
type: Injectable,
|
|
500
|
-
args: [{ providedIn: "root" }]
|
|
501
|
-
}, {
|
|
502
|
-
type: Pipe,
|
|
503
|
-
args: [{
|
|
504
|
-
name: "truncate",
|
|
505
|
-
}]
|
|
506
|
-
}] });
|
|
531
|
+
}], ctorParameters: () => [] });
|
|
532
|
+
const RouteGuard = (next, state) => {
|
|
533
|
+
inject(RouteGuardService).canActivate(next, state);
|
|
534
|
+
return true;
|
|
535
|
+
};
|
|
507
536
|
|
|
508
537
|
class SpinnerComponent {
|
|
509
538
|
spinerService = inject(SpinnerService);
|
|
@@ -6416,9 +6445,11 @@ const IntelicaTheme = definePreset(Aura, {
|
|
|
6416
6445
|
},
|
|
6417
6446
|
});
|
|
6418
6447
|
|
|
6448
|
+
//Pipes
|
|
6449
|
+
|
|
6419
6450
|
/**
|
|
6420
6451
|
* Generated bundle index. Do not edit.
|
|
6421
6452
|
*/
|
|
6422
6453
|
|
|
6423
|
-
export { ActionDirective, ActionsMenuComponent, ButtonSplitComponent, Color, ColumnComponent, ColumnGroupComponent, CompareByField, ConfigService, CookieAttributesGeneral, DataDirective, DynamicInputValidation, EchartComponent, EchartService, EmailInputValidation, ErrorInterceptor, FeatureFlagService, FormatAmountPipe, GlobalFeatureFlagService, GlobalTermService, HtmlToExcelService, InitializeConfigService, InputValidation, IntelicaTheme, ItemSplitDirective, LanguageService, ModalDialogComponent, MultiSelectComponent, OrderConstants, PaginatorComponent, Patterns, PopoverComponent, ProfileService, RecordPerPageComponent, RefreshTokenInterceptor, RowResumenComponent, SearchComponent, SharedService, SkeletonChartComponent, SkeletonComponent, SkeletonService, SkeletonTableComponent, SortingComponent, SpinnerComponent, SpinnerService, SweetAlertService, TableComponent, TemplateMenuComponent, TermGuard, TermPipe, TermService, TruncatePipe, decryptData, encryptData, getColor };
|
|
6454
|
+
export { ActionDirective, ActionsMenuComponent, ButtonSplitComponent, Color, ColumnComponent, ColumnGroupComponent, CompareByField, ConfigService, CookieAttributesGeneral, DataDirective, DynamicInputValidation, EchartComponent, EchartService, EmailInputValidation, ErrorInterceptor, FeatureFlagService, FormatAmountPipe, GlobalFeatureFlagService, GlobalTermService, HtmlToExcelService, InitializeConfigService, InputValidation, IntelicaTheme, ItemSplitDirective, LanguageService, ModalDialogComponent, MultiSelectComponent, OrderConstants, PaginatorComponent, Patterns, PopoverComponent, ProfileService, RecordPerPageComponent, RefreshTokenInterceptor, RouteGuard, RowResumenComponent, SearchComponent, SharedService, SkeletonChartComponent, SkeletonComponent, SkeletonService, SkeletonTableComponent, SortingComponent, SpinnerComponent, SpinnerService, SweetAlertService, TableComponent, TemplateMenuComponent, TermGuard, TermPipe, TermService, TruncatePipe, decryptData, encryptData, getColor };
|
|
6424
6455
|
//# sourceMappingURL=intelica-library-ui.mjs.map
|