@eui/core 16.1.1 → 17.0.0-next.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.
- package/docs/classes/UpdateUserRightsAction.html +3 -3
- package/docs/dependencies.html +2 -2
- package/docs/injectables/CoreAppEffects.html +12 -10
- package/docs/injectables/{UxDynamicMenuService.html → EuiDynamicMenuService.html} +10 -10
- package/docs/injectables/EuiPermissionService.html +4 -4
- package/docs/injectables/{UxTimezoneService.html → EuiTimezoneService.html} +5 -5
- package/docs/injectables/UxAppShellService.html +123 -1207
- package/docs/interfaces/{TimeZone.html → EuiTimeZone.html} +3 -3
- package/docs/interfaces/UIState.html +8 -8
- package/docs/js/menu-wc.js +9 -9
- package/docs/js/search/search_index.js +2 -2
- package/docs/miscellaneous/variables.html +705 -705
- package/esm2022/lib/services/dynamic-menu/dynamic-menu.service.mjs +66 -0
- package/esm2022/lib/services/errors/http-error-handler-callback-functions.mjs +5 -4
- package/esm2022/lib/services/eui-timezone.service.mjs +716 -0
- package/esm2022/lib/services/i18n/i18n.service.mjs +5 -5
- package/esm2022/lib/services/index.mjs +3 -3
- package/esm2022/lib/services/permission/permission.service.mjs +2 -2
- package/esm2022/lib/services/store/actions/user.actions.mjs +1 -1
- package/esm2022/lib/services/store/effects/app.effects.mjs +13 -3
- package/esm2022/lib/services/ux-app-shell.service.mjs +3 -149
- package/esm2022/lib/services/ux-error-feedback/ux-error-feedback.service.mjs +26 -17
- package/fesm2022/eui-core.mjs +63 -189
- package/fesm2022/eui-core.mjs.map +1 -1
- package/lib/services/dynamic-menu/dynamic-menu.service.d.ts +15 -0
- package/lib/services/dynamic-menu/dynamic-menu.service.d.ts.map +1 -0
- package/lib/services/errors/http-error-handler-callback-functions.d.ts.map +1 -1
- package/lib/services/{ux-timezone.service.d.ts → eui-timezone.service.d.ts} +9 -9
- package/lib/services/eui-timezone.service.d.ts.map +1 -0
- package/lib/services/index.d.ts +2 -2
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/permission/permission.service.d.ts +7 -7
- package/lib/services/permission/permission.service.d.ts.map +1 -1
- package/lib/services/store/actions/user.actions.d.ts +3 -3
- package/lib/services/store/actions/user.actions.d.ts.map +1 -1
- package/lib/services/store/effects/app.effects.d.ts.map +1 -1
- package/lib/services/ux-app-shell.service.d.ts +8 -31
- package/lib/services/ux-app-shell.service.d.ts.map +1 -1
- package/lib/services/ux-error-feedback/ux-error-feedback.service.d.ts.map +1 -1
- package/package.json +2 -2
- package/esm2022/lib/services/ux-dynamic-menu/ux-dynamic-menu.service.mjs +0 -66
- package/esm2022/lib/services/ux-timezone.service.mjs +0 -717
- package/lib/services/ux-dynamic-menu/ux-dynamic-menu.service.d.ts +0 -15
- package/lib/services/ux-dynamic-menu/ux-dynamic-menu.service.d.ts.map +0 -1
- package/lib/services/ux-timezone.service.d.ts.map +0 -1
package/fesm2022/eui-core.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i1 from '@eui/base';
|
|
2
|
-
import { LogLevel, ConsoleAppender, Logger, LoggerMock, mergeAll, getI18nLoaderConfig, EuiLazyService, getI18nServiceConfigFromBase, getI18nState, getLastAddedModule, getBrowserDefaultLanguage,
|
|
2
|
+
import { LogLevel, ConsoleAppender, Logger, LoggerMock, mergeAll, getI18nLoaderConfig, EuiLazyService, getI18nServiceConfigFromBase, getI18nState, getLastAddedModule, getBrowserDefaultLanguage, EuiEuLanguages, getActiveLang, initialAppState, initialUserState, initialNotificationsState, initialI18nState, initialLocaleState, xhr, getApiQueue, getApiQueueItem, EuiService, getUserRights, getUserState, UxPublishErrorFeedbackEvent, UxClearErrorFeedbackEvent, getLocaleServiceConfigFromBase, getLocaleState, transformToUxHttpResponse } from '@eui/base';
|
|
3
3
|
export * from '@eui/base';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
5
|
import { InjectionToken, Injectable, Inject, Injector, NgModule, Optional, APP_INITIALIZER, EventEmitter, PLATFORM_ID, SkipSelf, ErrorHandler, LOCALE_ID } from '@angular/core';
|
|
@@ -962,7 +962,7 @@ class I18nService extends EuiLazyService {
|
|
|
962
962
|
preparedDefaultLanguage() {
|
|
963
963
|
const browserPref = getBrowserDefaultLanguage();
|
|
964
964
|
// If user has browser preferred lang, and that language is part of the languages array
|
|
965
|
-
if (browserPref && this.config.languages &&
|
|
965
|
+
if (browserPref && this.config.languages && EuiEuLanguages.getLanguageCodes(this.config.languages).includes(browserPref)) {
|
|
966
966
|
return browserPref;
|
|
967
967
|
}
|
|
968
968
|
return this.config.defaultLanguage;
|
|
@@ -976,9 +976,9 @@ class I18nService extends EuiLazyService {
|
|
|
976
976
|
this.config = Object.assign({}, DEFAULT_I18N_SERVICE_CONFIG, this.config);
|
|
977
977
|
// configure the translate config service
|
|
978
978
|
if (this.config.languages) {
|
|
979
|
-
this.translateService.addLangs(
|
|
979
|
+
this.translateService.addLangs(EuiEuLanguages.getLanguageCodes(this.config.languages));
|
|
980
980
|
if (this.logService) {
|
|
981
|
-
this.logService.info(`I18n accepted languages set to ${
|
|
981
|
+
this.logService.info(`I18n accepted languages set to ${EuiEuLanguages.getLanguageCodes(this.config.languages)}`);
|
|
982
982
|
}
|
|
983
983
|
}
|
|
984
984
|
// set the current language, causing to load translations
|
|
@@ -1136,7 +1136,7 @@ const initialState = {
|
|
|
1136
1136
|
isBlockDocumentActive: false,
|
|
1137
1137
|
deviceInfo: null,
|
|
1138
1138
|
activeLanguage: 'en',
|
|
1139
|
-
languages:
|
|
1139
|
+
languages: EuiEuLanguages.getLanguages(),
|
|
1140
1140
|
appMetadata: null,
|
|
1141
1141
|
hasModalActive: false,
|
|
1142
1142
|
isDimmerActive: false,
|
|
@@ -1234,14 +1234,6 @@ class UxAppShellService {
|
|
|
1234
1234
|
this.router = router;
|
|
1235
1235
|
this.storeService = storeService;
|
|
1236
1236
|
this.i18nService = i18nService;
|
|
1237
|
-
this.growlMessages = [];
|
|
1238
|
-
this.isGrowlSticky = false;
|
|
1239
|
-
this.isCloseAllSticky = false;
|
|
1240
|
-
this.growlLife = 3000;
|
|
1241
|
-
this.growlPosition = 'bottom-right';
|
|
1242
|
-
this.growlCallback = null;
|
|
1243
|
-
this.activeModals = [];
|
|
1244
|
-
this.openModalId = new BehaviorSubject('');
|
|
1245
1237
|
this.cssVars = [];
|
|
1246
1238
|
let stateWithConfig = initialState;
|
|
1247
1239
|
const languages = config?.i18n?.i18nService?.languages || initialState.languages;
|
|
@@ -1495,144 +1487,6 @@ class UxAppShellService {
|
|
|
1495
1487
|
this._setCssVarValue('--eui-app-vh', `${vh}px`);
|
|
1496
1488
|
this._setCssVarValue('--eui-app-vw', `${vw}px`);
|
|
1497
1489
|
}
|
|
1498
|
-
/**
|
|
1499
|
-
* displays a growl UxMessage item, isSticky
|
|
1500
|
-
*/
|
|
1501
|
-
growl(msg, isSticky, isMultiple, life, position, callback) {
|
|
1502
|
-
if (msg.severity !== 'info' && msg.severity !== 'warning' && msg.severity !== 'success' && msg.severity !== 'danger') {
|
|
1503
|
-
throw new Error('UxAppShellService.growl() ERROR : message severity must be either : success, warning, info, danger');
|
|
1504
|
-
}
|
|
1505
|
-
else {
|
|
1506
|
-
if (isMultiple === undefined || !isMultiple) {
|
|
1507
|
-
this.growlMessages = [];
|
|
1508
|
-
}
|
|
1509
|
-
this.growlMessages = this.growlMessages.concat(msg);
|
|
1510
|
-
msg.life = life || msg.life;
|
|
1511
|
-
msg.sticky = isSticky || msg.sticky;
|
|
1512
|
-
if (life === undefined || isNaN(life)) {
|
|
1513
|
-
if (msg.severity === 'danger') {
|
|
1514
|
-
isSticky = true;
|
|
1515
|
-
}
|
|
1516
|
-
else {
|
|
1517
|
-
this.growlLife = 3000;
|
|
1518
|
-
}
|
|
1519
|
-
}
|
|
1520
|
-
else {
|
|
1521
|
-
this.growlLife = life;
|
|
1522
|
-
}
|
|
1523
|
-
if (isSticky) {
|
|
1524
|
-
this.isGrowlSticky = isSticky;
|
|
1525
|
-
}
|
|
1526
|
-
else {
|
|
1527
|
-
this.isGrowlSticky = false;
|
|
1528
|
-
}
|
|
1529
|
-
if (position) {
|
|
1530
|
-
this.growlPosition = position;
|
|
1531
|
-
}
|
|
1532
|
-
if (callback) {
|
|
1533
|
-
this.growlCallback = callback;
|
|
1534
|
-
}
|
|
1535
|
-
else {
|
|
1536
|
-
this.growlCallback = () => { };
|
|
1537
|
-
}
|
|
1538
|
-
}
|
|
1539
|
-
}
|
|
1540
|
-
clearGrowl() {
|
|
1541
|
-
this.growlMessages = [];
|
|
1542
|
-
}
|
|
1543
|
-
growlSuccess(msg, position) {
|
|
1544
|
-
this.growl({ severity: 'success', summary: 'SUCCESS', detail: msg }, false, false, undefined, position);
|
|
1545
|
-
}
|
|
1546
|
-
growlError(msg, position) {
|
|
1547
|
-
this.growl({ severity: 'danger', summary: 'ERROR', detail: msg }, false, false, undefined, position);
|
|
1548
|
-
}
|
|
1549
|
-
// date helpers
|
|
1550
|
-
growlWarning(msg, position) {
|
|
1551
|
-
this.growl({ severity: 'warning', summary: 'WARNING', detail: msg }, false, false, undefined, position);
|
|
1552
|
-
}
|
|
1553
|
-
growlInfo(msg, position) {
|
|
1554
|
-
this.growl({ severity: 'info', summary: 'INFO', detail: msg }, false, false, undefined, position);
|
|
1555
|
-
}
|
|
1556
|
-
openModal(modalId) {
|
|
1557
|
-
document.body.classList.add('modal-open');
|
|
1558
|
-
if (!modalId) {
|
|
1559
|
-
modalId = 'single_modal';
|
|
1560
|
-
}
|
|
1561
|
-
this.activeModals.push({
|
|
1562
|
-
id: modalId,
|
|
1563
|
-
isOpen: true,
|
|
1564
|
-
});
|
|
1565
|
-
setTimeout(() => {
|
|
1566
|
-
const el = document.getElementById(modalId + '-close-button');
|
|
1567
|
-
if (el) {
|
|
1568
|
-
el.focus();
|
|
1569
|
-
}
|
|
1570
|
-
}, 100);
|
|
1571
|
-
}
|
|
1572
|
-
openMessageBox(messageBoxId) {
|
|
1573
|
-
if (!messageBoxId) {
|
|
1574
|
-
messageBoxId = 'messagebox_modal';
|
|
1575
|
-
}
|
|
1576
|
-
this.openModal(messageBoxId);
|
|
1577
|
-
}
|
|
1578
|
-
closeMessageBox(messageBoxId) {
|
|
1579
|
-
if (!messageBoxId) {
|
|
1580
|
-
messageBoxId = 'messagebox_modal';
|
|
1581
|
-
}
|
|
1582
|
-
this.closeModal(messageBoxId);
|
|
1583
|
-
}
|
|
1584
|
-
isModalOpen(modalId) {
|
|
1585
|
-
if (!modalId) {
|
|
1586
|
-
modalId = 'single_modal';
|
|
1587
|
-
}
|
|
1588
|
-
if (this.activeModals.length) {
|
|
1589
|
-
let modalIndex = this.findModalIndex(modalId);
|
|
1590
|
-
if (modalIndex !== -1) {
|
|
1591
|
-
return this.activeModals[modalIndex].isOpen;
|
|
1592
|
-
}
|
|
1593
|
-
}
|
|
1594
|
-
return false;
|
|
1595
|
-
}
|
|
1596
|
-
// Positions helpers
|
|
1597
|
-
closeModal(modalId) {
|
|
1598
|
-
if (!modalId) {
|
|
1599
|
-
modalId = 'single_modal';
|
|
1600
|
-
}
|
|
1601
|
-
/**
|
|
1602
|
-
* Make sure we find the modal before splicing the activeModals array
|
|
1603
|
-
*/
|
|
1604
|
-
const index = this.findModalIndex(modalId);
|
|
1605
|
-
if (index >= 0) {
|
|
1606
|
-
this.activeModals.splice(index, 1);
|
|
1607
|
-
}
|
|
1608
|
-
if (this.activeModals && this.activeModals.length <= 0) {
|
|
1609
|
-
document.body.classList.remove('modal-open');
|
|
1610
|
-
}
|
|
1611
|
-
else {
|
|
1612
|
-
// If there is still another (parent) modal dialog open, ensure it is focused upon to be able to close is with the ESC key:
|
|
1613
|
-
const lastModalId = this.activeModals[this.activeModals.length - 1].id;
|
|
1614
|
-
if (lastModalId) {
|
|
1615
|
-
setTimeout(() => {
|
|
1616
|
-
const el = document.getElementById(lastModalId + '-close-button');
|
|
1617
|
-
if (el) {
|
|
1618
|
-
el.focus();
|
|
1619
|
-
}
|
|
1620
|
-
}, 100);
|
|
1621
|
-
}
|
|
1622
|
-
}
|
|
1623
|
-
}
|
|
1624
|
-
findModalIndex(modalId) {
|
|
1625
|
-
let index = -1;
|
|
1626
|
-
if (this.activeModals.length) {
|
|
1627
|
-
for (let i = 0; i < this.activeModals.length; i++) {
|
|
1628
|
-
if (this.activeModals[i].id === modalId) {
|
|
1629
|
-
index = i;
|
|
1630
|
-
break;
|
|
1631
|
-
}
|
|
1632
|
-
}
|
|
1633
|
-
}
|
|
1634
|
-
return index;
|
|
1635
|
-
}
|
|
1636
1490
|
// ---------------
|
|
1637
1491
|
// private getters
|
|
1638
1492
|
// ---------------
|
|
@@ -1793,12 +1647,22 @@ class CoreAppEffects {
|
|
|
1793
1647
|
if (isFeatureEnabled) {
|
|
1794
1648
|
if (connected) {
|
|
1795
1649
|
this.translateService.get('eui.CONNECTED').subscribe((translation) => {
|
|
1796
|
-
|
|
1650
|
+
// TODO v17 - should be subscribed from the eui-app to display growl
|
|
1651
|
+
// this.asService.growl(
|
|
1652
|
+
// { severity: 'success', summary: 'MESSAGE', detail: translation, life: lifespan },
|
|
1653
|
+
// lifespan < 1,
|
|
1654
|
+
// false
|
|
1655
|
+
// );
|
|
1797
1656
|
});
|
|
1798
1657
|
}
|
|
1799
1658
|
else {
|
|
1800
1659
|
this.translateService.get('eui.NOTCONNECTED').subscribe((translation) => {
|
|
1801
|
-
|
|
1660
|
+
// TODO v17 - should be subscribed from the eui-app to display growl
|
|
1661
|
+
// this.asService.growl(
|
|
1662
|
+
// { severity: 'danger', summary: 'ERROR', detail: translation, life: lifespan },
|
|
1663
|
+
// lifespan < 1,
|
|
1664
|
+
// false
|
|
1665
|
+
// );
|
|
1802
1666
|
});
|
|
1803
1667
|
}
|
|
1804
1668
|
}
|
|
@@ -2284,6 +2148,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
|
2284
2148
|
args: [HTTP_ERROR_HANDLER_CONFIG_TOKEN]
|
|
2285
2149
|
}] }, { type: i0.Injector }, { type: i2$1.Router }]; } });
|
|
2286
2150
|
|
|
2151
|
+
// import { UxAppShellService } from '../ux-app-shell.service';
|
|
2287
2152
|
function AlertHttpErrorCallbackFn(error) {
|
|
2288
2153
|
alert(error.statusText);
|
|
2289
2154
|
}
|
|
@@ -2295,8 +2160,9 @@ function LogHttpErrorCallbackFn(error, injector) {
|
|
|
2295
2160
|
logService.error('HttpError', error);
|
|
2296
2161
|
}
|
|
2297
2162
|
function GrowlHttpErrorCallbackFn(error, injector) {
|
|
2298
|
-
|
|
2299
|
-
asService.
|
|
2163
|
+
// TODO v17 should not display growl from here but from where it's called
|
|
2164
|
+
// const asService = injector.get(UxAppShellService);
|
|
2165
|
+
// asService.growlError(error.statusText);
|
|
2300
2166
|
}
|
|
2301
2167
|
|
|
2302
2168
|
class ApiQueueService {
|
|
@@ -2748,7 +2614,7 @@ class EuiPermissionService extends EuiService {
|
|
|
2748
2614
|
}
|
|
2749
2615
|
/**
|
|
2750
2616
|
* checks whether a user have all rights passed as an argument
|
|
2751
|
-
* @param rights an array of
|
|
2617
|
+
* @param rights an array of EuiUserRight
|
|
2752
2618
|
*/
|
|
2753
2619
|
haveAllRights(rights) {
|
|
2754
2620
|
if (!isDefined(rights)) {
|
|
@@ -2768,7 +2634,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
|
2768
2634
|
type: Optional
|
|
2769
2635
|
}] }, { type: StoreService }]; } });
|
|
2770
2636
|
|
|
2771
|
-
class
|
|
2637
|
+
class EuiDynamicMenuService {
|
|
2772
2638
|
// TODO: it should be moved euiservice, or it should be static
|
|
2773
2639
|
// TODO: can we moved that service inside the module of the component that's using it?
|
|
2774
2640
|
constructor(uxPermission, store) {
|
|
@@ -2784,10 +2650,10 @@ class UxDynamicMenuService {
|
|
|
2784
2650
|
getMenuLinks() {
|
|
2785
2651
|
return this.menuLinks;
|
|
2786
2652
|
}
|
|
2787
|
-
|
|
2653
|
+
filterEuiMenuItemsWithRights(links) {
|
|
2788
2654
|
return links.filter((link) => {
|
|
2789
2655
|
if (link.hasChildren) {
|
|
2790
|
-
link.children = this.
|
|
2656
|
+
link.children = this.filterEuiMenuItemsWithRights(link.children);
|
|
2791
2657
|
}
|
|
2792
2658
|
// First check if the user is denied access:
|
|
2793
2659
|
if (link.deniedRightId) {
|
|
@@ -2819,10 +2685,10 @@ class UxDynamicMenuService {
|
|
|
2819
2685
|
return true;
|
|
2820
2686
|
});
|
|
2821
2687
|
}
|
|
2822
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type:
|
|
2823
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type:
|
|
2688
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: EuiDynamicMenuService, deps: [{ token: EuiPermissionService }, { token: StoreService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2689
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: EuiDynamicMenuService, providedIn: 'root' }); }
|
|
2824
2690
|
}
|
|
2825
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type:
|
|
2691
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: EuiDynamicMenuService, decorators: [{
|
|
2826
2692
|
type: Injectable,
|
|
2827
2693
|
args: [{
|
|
2828
2694
|
providedIn: 'root',
|
|
@@ -2865,21 +2731,30 @@ class UxErrorFeedbackService {
|
|
|
2865
2731
|
* Growl errors
|
|
2866
2732
|
*/
|
|
2867
2733
|
growlError(err) {
|
|
2868
|
-
|
|
2869
|
-
const
|
|
2870
|
-
const
|
|
2871
|
-
const
|
|
2872
|
-
const
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2734
|
+
// TODO v17 - should not display growl from here, but where it's called
|
|
2735
|
+
// const feedBacks = err.uxHttpErrorOutput.getFeedBacks();
|
|
2736
|
+
// const isGrowlSticky = false;
|
|
2737
|
+
// const isGrowlMultiple = true;
|
|
2738
|
+
// const growlLife = 10000;
|
|
2739
|
+
// const position = 'bottom-right';
|
|
2740
|
+
// feedBacks.forEach((feedback: UxErrorFeedback) =>
|
|
2741
|
+
// this.translateService
|
|
2742
|
+
// .get(feedback.msgId)
|
|
2743
|
+
// .pipe(take(1))
|
|
2744
|
+
// .subscribe((translate) => {
|
|
2745
|
+
// this.asService.growl(
|
|
2746
|
+
// {
|
|
2747
|
+
// severity: feedback.severity || 'danger',
|
|
2748
|
+
// summary: 'ERROR',
|
|
2749
|
+
// detail: translate,
|
|
2750
|
+
// },
|
|
2751
|
+
// isGrowlSticky,
|
|
2752
|
+
// isGrowlMultiple,
|
|
2753
|
+
// growlLife,
|
|
2754
|
+
// position
|
|
2755
|
+
// );
|
|
2756
|
+
// })
|
|
2757
|
+
// );
|
|
2883
2758
|
}
|
|
2884
2759
|
clearError(id, groupId) {
|
|
2885
2760
|
this.errors.next(new UxClearErrorFeedbackEvent(id, groupId));
|
|
@@ -2996,7 +2871,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
|
2996
2871
|
}], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.Injector }, { type: i0.ApplicationRef }]; } });
|
|
2997
2872
|
|
|
2998
2873
|
/* eslint-disable */
|
|
2999
|
-
const
|
|
2874
|
+
const EUI_COUNTRIES = {
|
|
3000
2875
|
AF: 'Afghanistan',
|
|
3001
2876
|
AX: 'Aland Islands',
|
|
3002
2877
|
AL: 'Albania',
|
|
@@ -3245,7 +3120,7 @@ const UX_COUNTRIES = {
|
|
|
3245
3120
|
ZM: 'Zambia',
|
|
3246
3121
|
ZW: 'Zimbabwe',
|
|
3247
3122
|
};
|
|
3248
|
-
const
|
|
3123
|
+
const EUI_TIMEZONES = [
|
|
3249
3124
|
{ name: 'Europe/Andorra', desc: 'Andorra - Andorra (GMT+02:00)' },
|
|
3250
3125
|
{ name: 'Asia/Dubai', desc: 'United Arab Emirates - Dubai (GMT+04:00)' },
|
|
3251
3126
|
{ name: 'Asia/Kabul', desc: 'Afghanistan - Kabul (GMT+04:30)' },
|
|
@@ -3679,34 +3554,33 @@ const UX_TIMEZONES = [
|
|
|
3679
3554
|
{ name: 'Africa/Lusaka', desc: 'Zambia - Lusaka (GMT+02:00)' },
|
|
3680
3555
|
{ name: 'Africa/Harare', desc: 'Zimbabwe - Harare (GMT+02:00)' },
|
|
3681
3556
|
];
|
|
3682
|
-
|
|
3683
|
-
class UxTimezoneService {
|
|
3557
|
+
class EuiTimezoneService {
|
|
3684
3558
|
/**
|
|
3685
3559
|
* Convert country ISO code to country name (in english)
|
|
3686
3560
|
*/
|
|
3687
3561
|
iso2country(iso) {
|
|
3688
|
-
return
|
|
3562
|
+
return EUI_COUNTRIES[iso] ? EUI_COUNTRIES[iso] : iso;
|
|
3689
3563
|
}
|
|
3690
3564
|
/**
|
|
3691
3565
|
* Gets the list of ISO-codes for all countries
|
|
3692
3566
|
*/
|
|
3693
3567
|
getCountries() {
|
|
3694
3568
|
const res = [];
|
|
3695
|
-
for (const prop of Object.keys(
|
|
3569
|
+
for (const prop of Object.keys(EUI_COUNTRIES)) {
|
|
3696
3570
|
res.push(prop);
|
|
3697
3571
|
}
|
|
3698
3572
|
return res;
|
|
3699
3573
|
}
|
|
3700
3574
|
getTimezones() {
|
|
3701
|
-
return
|
|
3575
|
+
return EUI_TIMEZONES;
|
|
3702
3576
|
}
|
|
3703
3577
|
getTimezone(tz) {
|
|
3704
|
-
return
|
|
3578
|
+
return EUI_TIMEZONES.find((item) => item.name === tz);
|
|
3705
3579
|
}
|
|
3706
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type:
|
|
3707
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type:
|
|
3580
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: EuiTimezoneService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3581
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: EuiTimezoneService }); }
|
|
3708
3582
|
}
|
|
3709
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type:
|
|
3583
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: EuiTimezoneService, decorators: [{
|
|
3710
3584
|
type: Injectable
|
|
3711
3585
|
}] });
|
|
3712
3586
|
|
|
@@ -4711,5 +4585,5 @@ class OpenIdConnectServiceMock extends OpenIdConnectService {
|
|
|
4711
4585
|
* Generated bundle index. Do not edit.
|
|
4712
4586
|
*/
|
|
4713
4587
|
|
|
4714
|
-
export { ActivatedRouteAction, AddApiQueueItemAction, AddAppLoadedConfigModulesAction, AddLangParamInterceptor, AlertHttpErrorCallbackFn, ApiQueueService, ApiQueueServiceMock, AsyncStorageService, AsyncStorageServiceMock, BASE_LOGGER_NAME_TOKEN, BASE_NAME_TOKEN, BrowserStorageType, CONFIG_TOKEN, CORE_ROOT_GUARD, CachePreventionInterceptor, ConsoleHttpErrorCallbackFn, CoreAppActionTypes, CoreAppEffects, CoreI18nActionTypes, CoreLocaleActionTypes, CoreModule, CoreModuleEffects, CoreNotificationsActionTypes, CoreUserActionTypes, CorsSecurityInterceptor, CsrfPreventionInterceptor, DYNAMIC_COMPONENT_CONFIG, EUI_CONFIG_TOKEN, EmptyApiQueueAction, ErrorSubClass, EuLoginSessionTimeoutHandlingInterceptor, EuiCoreRootGuardClass, EuiError, EuiPermissionService, GLOBAL_CONFIG_TOKEN, GlobalErrorHandler, GrowlHttpErrorCallbackFn, HTTP_ERROR_HANDLER_CONFIG_TOKEN, HttpErrorHandlerInterceptor, I18nLoader, I18nResourceImpl, I18nService, I18nServiceMock, InitStoreAction, LANG_PARAM_KEY, LOCALE_ID_MAPPER, LOCAL_FORAGE_SERVICE_CONFIG_TOKEN, LOG_APPENDERS_TOKEN, LOG_LEVEL_TOKEN, LocalForageService, LocalStorageService, LocaleService, LocaleServiceMock, LogHttpErrorCallbackFn, LogModule, LogService, LogServiceMock, MODULE_CONFIG_TOKEN, MODULE_NAME_TOKEN, OpenIdConnectInterceptor, OpenIdConnectService, OpenIdConnectServiceMock, ROOT_LOG_CONFIG_TOKEN, RemoveApiQueueItemAction, SHOW_CONNECTION_STATUS_TOKEN, SessionStorageService, StorageService, StorageServiceMock, StoreService, StoreServiceMock,
|
|
4588
|
+
export { ActivatedRouteAction, AddApiQueueItemAction, AddAppLoadedConfigModulesAction, AddLangParamInterceptor, AlertHttpErrorCallbackFn, ApiQueueService, ApiQueueServiceMock, AsyncStorageService, AsyncStorageServiceMock, BASE_LOGGER_NAME_TOKEN, BASE_NAME_TOKEN, BrowserStorageType, CONFIG_TOKEN, CORE_ROOT_GUARD, CachePreventionInterceptor, ConsoleHttpErrorCallbackFn, CoreAppActionTypes, CoreAppEffects, CoreI18nActionTypes, CoreLocaleActionTypes, CoreModule, CoreModuleEffects, CoreNotificationsActionTypes, CoreUserActionTypes, CorsSecurityInterceptor, CsrfPreventionInterceptor, DYNAMIC_COMPONENT_CONFIG, EUI_CONFIG_TOKEN, EUI_COUNTRIES, EUI_TIMEZONES, EmptyApiQueueAction, ErrorSubClass, EuLoginSessionTimeoutHandlingInterceptor, EuiCoreRootGuardClass, EuiDynamicMenuService, EuiError, EuiPermissionService, EuiTimezoneService, GLOBAL_CONFIG_TOKEN, GlobalErrorHandler, GrowlHttpErrorCallbackFn, HTTP_ERROR_HANDLER_CONFIG_TOKEN, HttpErrorHandlerInterceptor, I18nLoader, I18nResourceImpl, I18nService, I18nServiceMock, InitStoreAction, LANG_PARAM_KEY, LOCALE_ID_MAPPER, LOCAL_FORAGE_SERVICE_CONFIG_TOKEN, LOG_APPENDERS_TOKEN, LOG_LEVEL_TOKEN, LocalForageService, LocalStorageService, LocaleService, LocaleServiceMock, LogHttpErrorCallbackFn, LogModule, LogService, LogServiceMock, MODULE_CONFIG_TOKEN, MODULE_NAME_TOKEN, OpenIdConnectInterceptor, OpenIdConnectService, OpenIdConnectServiceMock, ROOT_LOG_CONFIG_TOKEN, RemoveApiQueueItemAction, SHOW_CONNECTION_STATUS_TOKEN, SessionStorageService, StorageService, StorageServiceMock, StoreService, StoreServiceMock, UX_ERROR_MAPPING_HANDLER_TOKEN, UpdateAppConnectionAction, UpdateAppStatusAction, UpdateAppVersionAction, UpdateCurrentModuleAction, UpdateI18nStateAction, UpdateLocaleStateAction, UpdateNotificationsListAction, UpdateUserDashboardAction, UpdateUserDetailsAction, UpdateUserPreferencesAction, UpdateUserRightsAction, UpdateUserStateAction, UserService, UserServiceMock, UxAppShellService, UxDynamicComponentService, UxErrorFeedbackService, UxErrorManager, UxRequestErrorModelInterceptor, closestMatchingParent, consumeEvent, corI18nReducers, coreAppReducers, coreLocaleReducers, coreNotificationsReducers, coreUserReducers, createEuiCoreRootGuard, diffDays, diffDaysFromToday, errorCodes, euiCoreRootGuardClass, formatNumber, getGlobalConfig, getHttpErrorHandlingConfig, getModuleConfig, getRootLogConfig, getShowConnectionStatus, getViewElement, handleError, isDefined, loadEuiDynamicEnvironmentConfig, loadState, localForage, localStorageSync, markControlsTouched, markFormGroupTouched, mergeAppHandlerConfigToAppConfig, mergeAppJsonConfigToAppConfig, offset, position, preInitApp, prepareEuiAppConfigToken, coreReducers as reducers, sessionStorageSync, translateConfig, uniqueId, validateEmail, withUxErrorManager };
|
|
4715
4589
|
//# sourceMappingURL=eui-core.mjs.map
|