@acorex/core 18.1.0 → 18.1.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Injectable } from '@angular/core';
|
1
|
+
import { Injectable, afterNextRender } from '@angular/core';
|
2
2
|
import { BehaviorSubject, Subject, fromEvent } from 'rxjs';
|
3
3
|
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
|
4
4
|
import * as i0 from "@angular/core";
|
@@ -55,9 +55,7 @@ export const testUserAgent = (win, expr) => expr.test(win.navigator.userAgent);
|
|
55
55
|
export const isBrowser = new Function('try {return this===window;}catch(e){ return false;}');
|
56
56
|
export const isServer = new Function('try {return this===global;}catch(e){return false;}');
|
57
57
|
const matchMedia = (win, query) => {
|
58
|
-
|
59
|
-
return win.matchMedia(query).matches;
|
60
|
-
return false;
|
58
|
+
return win.matchMedia(query).matches;
|
61
59
|
};
|
62
60
|
const isSMScreen = (win) => matchMedia(win, '(max-width: 578px)');
|
63
61
|
const isMDScreen = (win) => matchMedia(win, '(max-width: 768px)');
|
@@ -125,40 +123,36 @@ export class AXPlatform {
|
|
125
123
|
this.themeMode$.next('dark');
|
126
124
|
}
|
127
125
|
switchSystemMode() {
|
128
|
-
if (
|
129
|
-
|
130
|
-
|
131
|
-
_html.classList.add('ax-dark');
|
132
|
-
}
|
133
|
-
else {
|
134
|
-
const _html = document.getElementsByTagName('html')[0];
|
135
|
-
_html.classList.remove('ax-dark');
|
136
|
-
}
|
137
|
-
localStorage.setItem('AX_THEME_MODE', 'system');
|
138
|
-
this.themeMode$.next('system');
|
126
|
+
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
127
|
+
const _html = document.getElementsByTagName('html')[0];
|
128
|
+
_html.classList.add('ax-dark');
|
139
129
|
}
|
130
|
+
else {
|
131
|
+
const _html = document.getElementsByTagName('html')[0];
|
132
|
+
_html.classList.remove('ax-dark');
|
133
|
+
}
|
134
|
+
localStorage.setItem('AX_THEME_MODE', 'system');
|
135
|
+
this.themeMode$.next('system');
|
140
136
|
}
|
141
137
|
autoDetectThemeMode() {
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
return this.switchSystemMode();
|
151
|
-
}
|
138
|
+
const mode = localStorage.getItem('AX_THEME_MODE') || 'system';
|
139
|
+
switch (mode) {
|
140
|
+
case 'light':
|
141
|
+
return this.switchLightMode();
|
142
|
+
case 'dark':
|
143
|
+
return this.switchDarkMode();
|
144
|
+
case 'system':
|
145
|
+
return this.switchSystemMode();
|
152
146
|
}
|
153
147
|
}
|
154
148
|
_setFullHeightRatio() {
|
155
|
-
|
156
|
-
|
149
|
+
if (isBrowser()) {
|
150
|
+
try {
|
157
151
|
document.querySelector(':root')?.style.setProperty('--ax-vh', window.innerHeight / 100 + 'px');
|
158
152
|
}
|
159
|
-
|
160
|
-
|
161
|
-
|
153
|
+
catch (error) {
|
154
|
+
console.error(error);
|
155
|
+
}
|
162
156
|
}
|
163
157
|
}
|
164
158
|
autoSystemModeDetection(event) {
|
@@ -179,7 +173,7 @@ export class AXPlatform {
|
|
179
173
|
this.click = new Subject();
|
180
174
|
this.scroll = new Subject();
|
181
175
|
this.themeMode$ = new BehaviorSubject('system');
|
182
|
-
|
176
|
+
afterNextRender(() => {
|
183
177
|
fromEvent(window, 'resize')
|
184
178
|
.pipe(debounceTime(100))
|
185
179
|
.pipe(distinctUntilChanged())
|
@@ -209,7 +203,7 @@ export class AXPlatform {
|
|
209
203
|
source: this,
|
210
204
|
});
|
211
205
|
}, true);
|
212
|
-
}
|
206
|
+
});
|
213
207
|
// init functions
|
214
208
|
this._setFullHeightRatio();
|
215
209
|
}
|
@@ -222,4 +216,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
|
|
222
216
|
providedIn: 'root',
|
223
217
|
}]
|
224
218
|
}], ctorParameters: () => [] });
|
225
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW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luZG93LCAncmVzaXplJylcbiAgICAgICAgLnBpcGUoZGVib3VuY2VUaW1lKDEwMCkpXG4gICAgICAgIC5waXBlKGRpc3RpbmN0VW50aWxDaGFuZ2VkKCkpXG4gICAgICAgIC5zdWJzY3JpYmUoKGUpID0+IHtcbiAgICAgICAgICB0aGlzLnJlc2l6ZS5uZXh0KHtcbiAgICAgICAgICAgIG5hdGl2ZUV2ZW50OiBlLFxuICAgICAgICAgICAgc291cmNlOiB0aGlzLFxuICAgICAgICAgIH0pO1xuICAgICAgICAgIC8vXG4gICAgICAgICAgdGhpcy5fc2V0RnVsbEhlaWdodFJhdGlvKCk7XG4gICAgICAgIH0pO1xuICAgICAgaWYgKHdpbmRvdz8ubWF0Y2hNZWRpYSgnKHByZWZlcnMtY29sb3Itc2NoZW1lOiBkYXJrKScpLm1hdGNoZXMpIHtcbiAgICAgICAgd2luZG93Py5tYXRjaE1lZGlhKCcocHJlZmVycy1jb2xvci1zY2hlbWU6IGRhcmspJyk/LmFkZEV2ZW50TGlzdGVuZXIoJ2NoYW5nZScsIChldmVudCkgPT4ge1xuICAgICAgICAgIC8vIERldGVjdCBTeXN0ZW0gY29sb3IgbW9kZVxuICAgICAgICAgIHRoaXMuYXV0b1N5c3RlbU1vZGVEZXRlY3Rpb24oZXZlbnQpO1xuICAgICAgICB9KTtcbiAgICAgIH1cbiAgICAgIGRvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIoXG4gICAgICAgICdjbGljaycsXG4gICAgICAgIChlKSA9PiB7XG4gICAgICAgICAgdGhpcy5jbGljay5uZXh0KHtcbiAgICAgICAgICAgIG5hdGl2ZUV2ZW50OiBlLFxuICAgICAgICAgICAgc291cmNlOiB0aGlzLFxuICAgICAgICAgIH0pO1xuICAgICAgICB9LFxuICAgICAgICB0cnVlLFxuICAgICAgKTtcblxuICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcihcbiAgICAgICAgJ3Njcm9sbCcsXG4gICAgICAgIChlKSA9Pi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50Pih3aW5kb3csICdyZXNpemUnKVxuICAgICAgICAucGlwZShkZWJvdW5jZVRpbWUoMTAwKSlcbiAgICAgICAgLnBpcGUoZGlzdGluY3RVbnRpbENoYW5nZWQoKSlcbiAgICAgICAgLnN1YnNjcmliZSgoZSkgPT4ge1xuICAgICAgICAgIHRoaXMucmVzaXplLm5leHQoe1xuICAgICAgICAgICAgbmF0aXZlRXZlbnQ6IGUsXG4gICAgICAgICAgICBzb3VyY2U6IHRoaXMsXG4gICAgICAgICAgfSk7XG4gICAgICAgICAgLy9cbiAgICAgICAgICB0aGlzLl9zZXRGdWxsSGVpZ2h0UmF0aW8oKTtcbiAgICAgICAgfSk7XG4gICAgICBpZiAod2luZG93Py5tYXRjaE1lZGlhKCcocHJlZmVycy1jb2xvci1zY2hlbWU6IGRhcmspJykubWF0Y2hlcykge1xuICAgICAgICB3aW5kb3c/Lm1hdGNoTWVkaWEoJyhwcmVmZXJzLWNvbG9yLXNjaGVtZTogZGFyayknKT8uYWRkRXZlbnRMaXN0ZW5lcignY2hhbmdlJywgKGV2ZW50KSA9PiB7XG4gICAgICAgICAgLy8gRGV0ZWN0IFN5c3RlbSBjb2xvciBtb2RlXG4gICAgICAgICAgdGhpcy5hdXRvU3lzdGVtTW9kZURldGVjdGlvbihldmVudCk7XG4gICAgICAgIH0pO1xuICAgICAgfVxuICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcihcbiAgICAgICAgJ2NsaWNrJyxcbiAgICAgICAgKGUpID0+IHtcbiAgICAgICAgICB0aGlzLmNsaWNrLm5leHQoe1xuICAgICAgICAgICAgbmF0aXZlRXZlbnQ6IGUsXG4gICAgICAgICAgICBzb3VyY2U6IHRoaXMsXG4gICAgICAgICAgfSk7XG4gICAgICAgIH0sXG4gICAgICAgIHRydWUsXG4gICAgICApO1xuXG4gICAgICBkb2N1bWVudC5hZGRFdmVudExpc3RlbmVyKFxuICAgICAgICAnc2Nyb2xsJyxcbiAgICAgICAgKGUpID0+IHtcbiAgICAgICAgICB0aGlzLnNjcm9sbC5uZXh0KHtcbiAgICAgICAgICAgIG5hdGl2ZUV2ZW50OiBlLFxuICAgICAgICAgICAgc291cmNlOiB0aGlzLFxuICAgICAgICAgIH0pO1xuICAgICAgICB9LFxuICAgICAgICB0cnVlLFxuICAgICAgKTtcbiAgICB9KTtcblxuICAgIC8vIGluaXQgZnVuY3Rpb25zXG4gICAgdGhpcy5fc2V0RnVsbEhlaWdodFJhdGlvKCk7XG4gIH1cbn1cbiJdfQ==
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { Injectable } from '@angular/core';
|
2
|
+
import { afterNextRender, Injectable } from '@angular/core';
|
3
3
|
import { Subject, BehaviorSubject, fromEvent } from 'rxjs';
|
4
4
|
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
|
5
5
|
|
@@ -56,9 +56,7 @@ const testUserAgent = (win, expr) => expr.test(win.navigator.userAgent);
|
|
56
56
|
const isBrowser = new Function('try {return this===window;}catch(e){ return false;}');
|
57
57
|
const isServer = new Function('try {return this===global;}catch(e){return false;}');
|
58
58
|
const matchMedia = (win, query) => {
|
59
|
-
|
60
|
-
return win.matchMedia(query).matches;
|
61
|
-
return false;
|
59
|
+
return win.matchMedia(query).matches;
|
62
60
|
};
|
63
61
|
const isSMScreen = (win) => matchMedia(win, '(max-width: 578px)');
|
64
62
|
const isMDScreen = (win) => matchMedia(win, '(max-width: 768px)');
|
@@ -126,40 +124,36 @@ class AXPlatform {
|
|
126
124
|
this.themeMode$.next('dark');
|
127
125
|
}
|
128
126
|
switchSystemMode() {
|
129
|
-
if (
|
130
|
-
|
131
|
-
|
132
|
-
_html.classList.add('ax-dark');
|
133
|
-
}
|
134
|
-
else {
|
135
|
-
const _html = document.getElementsByTagName('html')[0];
|
136
|
-
_html.classList.remove('ax-dark');
|
137
|
-
}
|
138
|
-
localStorage.setItem('AX_THEME_MODE', 'system');
|
139
|
-
this.themeMode$.next('system');
|
127
|
+
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
128
|
+
const _html = document.getElementsByTagName('html')[0];
|
129
|
+
_html.classList.add('ax-dark');
|
140
130
|
}
|
131
|
+
else {
|
132
|
+
const _html = document.getElementsByTagName('html')[0];
|
133
|
+
_html.classList.remove('ax-dark');
|
134
|
+
}
|
135
|
+
localStorage.setItem('AX_THEME_MODE', 'system');
|
136
|
+
this.themeMode$.next('system');
|
141
137
|
}
|
142
138
|
autoDetectThemeMode() {
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
return this.switchSystemMode();
|
152
|
-
}
|
139
|
+
const mode = localStorage.getItem('AX_THEME_MODE') || 'system';
|
140
|
+
switch (mode) {
|
141
|
+
case 'light':
|
142
|
+
return this.switchLightMode();
|
143
|
+
case 'dark':
|
144
|
+
return this.switchDarkMode();
|
145
|
+
case 'system':
|
146
|
+
return this.switchSystemMode();
|
153
147
|
}
|
154
148
|
}
|
155
149
|
_setFullHeightRatio() {
|
156
|
-
|
157
|
-
|
150
|
+
if (isBrowser()) {
|
151
|
+
try {
|
158
152
|
document.querySelector(':root')?.style.setProperty('--ax-vh', window.innerHeight / 100 + 'px');
|
159
153
|
}
|
160
|
-
|
161
|
-
|
162
|
-
|
154
|
+
catch (error) {
|
155
|
+
console.error(error);
|
156
|
+
}
|
163
157
|
}
|
164
158
|
}
|
165
159
|
autoSystemModeDetection(event) {
|
@@ -180,7 +174,7 @@ class AXPlatform {
|
|
180
174
|
this.click = new Subject();
|
181
175
|
this.scroll = new Subject();
|
182
176
|
this.themeMode$ = new BehaviorSubject('system');
|
183
|
-
|
177
|
+
afterNextRender(() => {
|
184
178
|
fromEvent(window, 'resize')
|
185
179
|
.pipe(debounceTime(100))
|
186
180
|
.pipe(distinctUntilChanged())
|
@@ -210,7 +204,7 @@ class AXPlatform {
|
|
210
204
|
source: this,
|
211
205
|
});
|
212
206
|
}, true);
|
213
|
-
}
|
207
|
+
});
|
214
208
|
// init functions
|
215
209
|
this._setFullHeightRatio();
|
216
210
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-core-platform.mjs","sources":["../../../../libs/core/platform/src/lib/platform.service.ts","../../../../libs/core/platform/src/acorex-core-platform.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { BehaviorSubject, Subject, fromEvent } from 'rxjs';\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\n\nexport type AXThemeMode = 'light' | 'dark' | 'system';\nexport type AXPlatforms = 'Android' | 'Desktop' | 'iOS' | 'Mobile';\nexport type AXBrowsers = 'Chrome' | 'Safari' | 'Edge' | 'Firefox' | 'Opera' | 'MSIE';\nexport type AXTechnologies = 'PWA' | 'Hybrid' | 'Electron';\n\nexport type AXScreenSizes = 'SM' | 'MD' | 'LG' | 'XL' | '2XL' | '3XL' | '4XL' | '5XL';\n\nconst isChrome = (win: Window): boolean => testUserAgent(win, /Chrome/i);\n\nconst isFirefox = (win: Window): boolean => testUserAgent(win, /Firefox/i);\n\nconst isEdge = (win: Window): boolean => testUserAgent(win, /Edge/i);\n\nconst isSafari = (win: Window): boolean => testUserAgent(win, /Safari/i);\n\nconst isOpera = (win: Window): boolean => testUserAgent(win, /Opera/i) || testUserAgent(win, /OPR/i);\n\nconst isMSIE = (win: Window): boolean => testUserAgent(win, /MSIE/i) || testUserAgent(win, /Trident/i);\n\nconst isMobileWeb = (win: Window): boolean => isMobile(win) && !isHybrid(win);\n\nconst isIpad = (win: Window) => {\n // iOS 12 and below\n if (testUserAgent(win, /iPad/i)) {\n return true;\n }\n\n // iOS 13+\n if (testUserAgent(win, /Macintosh/i) && isMobile(win)) {\n return true;\n }\n\n return false;\n};\n\nconst isIphone = (win: Window) => testUserAgent(win, /iPhone/i);\n\nconst isIOS = (win: Window) => testUserAgent(win, /iPhone|iPod/i) || isIpad(win);\n\nconst isAndroid = (win: Window) => testUserAgent(win, /android|sink/i);\n\nconst isAndroidTablet = (win: Window) => {\n return isAndroid(win) && !testUserAgent(win, /mobile/i);\n};\n\nconst isPhablet = (win: Window) => {\n const width = win.innerWidth;\n const height = win.innerHeight;\n const smallest = Math.min(width, height);\n const largest = Math.max(width, height);\n\n return smallest > 390 && smallest < 520 && largest > 620 && largest < 800;\n};\n\nconst isTablet = (win: Window) => {\n const width = win.innerWidth;\n const height = win.innerHeight;\n const smallest = Math.min(width, height);\n const largest = Math.max(width, height);\n\n return isIpad(win) || isAndroidTablet(win) || (smallest > 460 && smallest < 820 && largest > 780 && largest < 1400);\n};\n\nconst isMobile = (win: Window) => matchMedia(win, '(any-pointer:coarse)');\nconst isTouch = (win: Window) => matchMedia(win, '(any-pointer:coarse)');\n\nconst isDesktop = (win: Window) => !isMobile(win);\n\nconst isHybrid = (win: Window) => isCordova(win) || isCapacitorNative(win);\n\nconst isCordova = (win: any): boolean => !!(win['cordova'] || win['phonegap'] || win['PhoneGap']);\n\nconst isCapacitorNative = (win: any): boolean => {\n const capacitor = win['Capacitor'];\n return !!(capacitor && capacitor.isNative);\n};\n\nconst isElectron = (win: Window): boolean => testUserAgent(win, /electron/i);\n\nconst isPWA = (win: Window): boolean => !!(win.matchMedia('(display-mode: standalone)').matches || (win.navigator as any).standalone);\n\nexport const testUserAgent = (win: Window, expr: RegExp) => expr.test(win.navigator.userAgent);\n\nexport const isBrowser = new Function('try {return this===window;}catch(e){ return false;}');\nexport const isServer = new Function('try {return this===global;}catch(e){return false;}');\n\nconst matchMedia = (win: Window, query: string): boolean => {\n if (isBrowser()) return win.matchMedia(query).matches;\n return false;\n};\n\nconst isSMScreen = (win: Window) => matchMedia(win, '(max-width: 578px)');\nconst isMDScreen = (win: Window) => matchMedia(win, '(max-width: 768px)');\nconst isLGScreen = (win: Window) => matchMedia(win, '(max-width: 992px)');\nconst isXLScreen = (win: Window) => matchMedia(win, '(max-width: 1200px)');\nconst is2XLScreen = (win: Window) => matchMedia(win, '(max-width: 1440px)');\nconst is3XLScreen = (win: Window) => matchMedia(win, '(max-width: 1920px)');\nconst is4XLScreen = (win: Window) => matchMedia(win, '(max-width: 2560px)');\n\nconst PLATFORMS_MAP: any = {\n Android: isAndroid,\n iOS: isIOS,\n Desktop: isDesktop,\n Mobile: isMobile,\n Touch: isTouch,\n Chrome: isChrome,\n Firefox: isFirefox,\n Safari: isSafari,\n Edge: isEdge,\n Opera: isOpera,\n Hybrid: isHybrid,\n PWA: isPWA,\n Electron: isElectron,\n SM: isSMScreen,\n MD: isMDScreen,\n LG: isLGScreen,\n XL: isXLScreen,\n '2XL': is2XLScreen,\n '3XL': is3XLScreen,\n '4XL': is4XLScreen,\n};\n\nexport class AXPlatformEvent<T extends Event = Event> {\n nativeEvent!: T;\n source!: AXPlatform;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXPlatform {\n resize: Subject<AXPlatformEvent> = new Subject<AXPlatformEvent>();\n click: Subject<AXPlatformEvent> = new Subject<AXPlatformEvent>();\n scroll: Subject<AXPlatformEvent> = new Subject<AXPlatformEvent>();\n themeMode$: BehaviorSubject<AXThemeMode> = new BehaviorSubject<AXThemeMode>('system');\n isRtl(): boolean {\n return document.dir == 'rtl' || document.body.dir == 'rtl' || document.body.style.direction == 'rtl';\n }\n\n isLandscape(): boolean {\n return window.innerHeight < window.innerWidth;\n }\n\n isPortrate(): boolean {\n return !this.isLandscape();\n }\n\n is(name: AXPlatforms | AXBrowsers | AXTechnologies | AXScreenSizes): boolean {\n if (isBrowser()) {\n return PLATFORMS_MAP[name](window) || false;\n } else {\n return false;\n }\n }\n\n get screenSize(): AXScreenSizes {\n return (['SM', 'MD', 'LG', 'XL', '2XL', '3XL', '4XL'].find((name) => PLATFORMS_MAP[name](window) == true) || '5XL') as AXScreenSizes;\n }\n\n switchLightMode() {\n const _html = document.getElementsByTagName('html')[0];\n _html.classList.remove('ax-dark');\n localStorage.setItem('AX_THEME_MODE', 'light');\n this.themeMode$.next('light');\n return 'light';\n }\n\n switchDarkMode() {\n const _html = document.getElementsByTagName('html')[0];\n _html.classList.add('ax-dark');\n localStorage.setItem('AX_THEME_MODE', 'dark');\n this.themeMode$.next('dark');\n }\n\n switchSystemMode() {\n if (isBrowser()) {\n if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {\n const _html = document.getElementsByTagName('html')[0];\n _html.classList.add('ax-dark');\n } else {\n const _html = document.getElementsByTagName('html')[0];\n _html.classList.remove('ax-dark');\n }\n localStorage.setItem('AX_THEME_MODE', 'system');\n this.themeMode$.next('system');\n }\n }\n\n autoDetectThemeMode() {\n if (isBrowser()) {\n const mode = localStorage.getItem('AX_THEME_MODE') || 'system';\n switch (mode) {\n case 'light':\n return this.switchLightMode();\n\n case 'dark':\n return this.switchDarkMode();\n\n case 'system':\n return this.switchSystemMode();\n }\n }\n }\n\n private _setFullHeightRatio() {\n try {\n if (isBrowser()) {\n document.querySelector<HTMLElement>(':root')?.style.setProperty('--ax-vh', window.innerHeight / 100 + 'px');\n }\n } catch (error) {\n console.error(error);\n }\n }\n\n private autoSystemModeDetection(event) {\n if (this.themeMode$.getValue() === 'system') {\n const themeMode = event.matches ? 'dark' : 'light';\n\n if (themeMode === 'dark') {\n const _html = document.getElementsByTagName('html')[0];\n _html.classList.add('ax-dark');\n } else {\n const _html = document.getElementsByTagName('html')[0];\n _html.classList.remove('ax-dark');\n }\n }\n }\n\n constructor() {\n if (isBrowser()) {\n fromEvent<UIEvent>(window, 'resize')\n .pipe(debounceTime(100))\n .pipe(distinctUntilChanged())\n .subscribe((e) => {\n this.resize.next({\n nativeEvent: e,\n source: this,\n });\n //\n this._setFullHeightRatio();\n });\n if (window?.matchMedia('(prefers-color-scheme: dark)').matches) {\n window?.matchMedia('(prefers-color-scheme: dark)')?.addEventListener('change', (event) => {\n // Detect System color mode\n this.autoSystemModeDetection(event);\n });\n }\n document.addEventListener(\n 'click',\n (e) => {\n this.click.next({\n nativeEvent: e,\n source: this,\n });\n },\n true,\n );\n\n document.addEventListener(\n 'scroll',\n (e) => {\n this.scroll.next({\n nativeEvent: e,\n source: this,\n });\n },\n true,\n );\n }\n\n // init functions\n this._setFullHeightRatio();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAWA,MAAM,QAAQ,GAAG,CAAC,GAAW,KAAc,aAAa,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;AAEzE,MAAM,SAAS,GAAG,CAAC,GAAW,KAAc,aAAa,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;AAE3E,MAAM,MAAM,GAAG,CAAC,GAAW,KAAc,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AAErE,MAAM,QAAQ,GAAG,CAAC,GAAW,KAAc,aAAa,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;AAEzE,MAAM,OAAO,GAAG,CAAC,GAAW,KAAc,aAAa,CAAC,GAAG,EAAE,QAAQ,CAAC,IAAI,aAAa,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;AAErG,MAAM,MAAM,GAAG,CAAC,GAAW,KAAc,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC,IAAI,aAAa,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;AAEvG,MAAM,WAAW,GAAG,CAAC,GAAW,KAAc,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AAE9E,MAAM,MAAM,GAAG,CAAC,GAAW,KAAI;;AAE7B,IAAA,IAAI,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC,EAAE;AAC/B,QAAA,OAAO,IAAI,CAAC;KACb;;AAGD,IAAA,IAAI,aAAa,CAAC,GAAG,EAAE,YAAY,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,EAAE;AACrD,QAAA,OAAO,IAAI,CAAC;KACb;AAED,IAAA,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,GAAW,KAAK,aA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I,CAAC,MAAM,CAAC,IAAI,CAAC;AACf,oBAAA,WAAW,EAAE,CAAC;AACd,oBAAA,MAAM,EAAE,IAAI;AACb,iBAAA,CAAC,CAAC;aACJ,EACD,IAAI,CACL,CAAC;SACH;;QAGD,IAAI,CAAC,mBAAmB,EAAE,CAAC;KAC5B;8GA9IU,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAV,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAU,cAFT,MAAM,EAAA,CAAA,CAAA,EAAA;;2FAEP,UAAU,EAAA,UAAA,EAAA,CAAA;kBAHtB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;ACrID;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-core-platform.mjs","sources":["../../../../libs/core/platform/src/lib/platform.service.ts","../../../../libs/core/platform/src/acorex-core-platform.ts"],"sourcesContent":["import { Injectable, afterNextRender } from '@angular/core';\nimport { BehaviorSubject, Subject, fromEvent } from 'rxjs';\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\n\nexport type AXThemeMode = 'light' | 'dark' | 'system';\nexport type AXPlatforms = 'Android' | 'Desktop' | 'iOS' | 'Mobile';\nexport type AXBrowsers = 'Chrome' | 'Safari' | 'Edge' | 'Firefox' | 'Opera' | 'MSIE';\nexport type AXTechnologies = 'PWA' | 'Hybrid' | 'Electron';\n\nexport type AXScreenSizes = 'SM' | 'MD' | 'LG' | 'XL' | '2XL' | '3XL' | '4XL' | '5XL';\n\nconst isChrome = (win: Window): boolean => testUserAgent(win, /Chrome/i);\n\nconst isFirefox = (win: Window): boolean => testUserAgent(win, /Firefox/i);\n\nconst isEdge = (win: Window): boolean => testUserAgent(win, /Edge/i);\n\nconst isSafari = (win: Window): boolean => testUserAgent(win, /Safari/i);\n\nconst isOpera = (win: Window): boolean => testUserAgent(win, /Opera/i) || testUserAgent(win, /OPR/i);\n\nconst isMSIE = (win: Window): boolean => testUserAgent(win, /MSIE/i) || testUserAgent(win, /Trident/i);\n\nconst isMobileWeb = (win: Window): boolean => isMobile(win) && !isHybrid(win);\n\nconst isIpad = (win: Window) => {\n // iOS 12 and below\n if (testUserAgent(win, /iPad/i)) {\n return true;\n }\n\n // iOS 13+\n if (testUserAgent(win, /Macintosh/i) && isMobile(win)) {\n return true;\n }\n\n return false;\n};\n\nconst isIphone = (win: Window) => testUserAgent(win, /iPhone/i);\n\nconst isIOS = (win: Window) => testUserAgent(win, /iPhone|iPod/i) || isIpad(win);\n\nconst isAndroid = (win: Window) => testUserAgent(win, /android|sink/i);\n\nconst isAndroidTablet = (win: Window) => {\n return isAndroid(win) && !testUserAgent(win, /mobile/i);\n};\n\nconst isPhablet = (win: Window) => {\n const width = win.innerWidth;\n const height = win.innerHeight;\n const smallest = Math.min(width, height);\n const largest = Math.max(width, height);\n\n return smallest > 390 && smallest < 520 && largest > 620 && largest < 800;\n};\n\nconst isTablet = (win: Window) => {\n const width = win.innerWidth;\n const height = win.innerHeight;\n const smallest = Math.min(width, height);\n const largest = Math.max(width, height);\n\n return isIpad(win) || isAndroidTablet(win) || (smallest > 460 && smallest < 820 && largest > 780 && largest < 1400);\n};\n\nconst isMobile = (win: Window) => matchMedia(win, '(any-pointer:coarse)');\nconst isTouch = (win: Window) => matchMedia(win, '(any-pointer:coarse)');\n\nconst isDesktop = (win: Window) => !isMobile(win);\n\nconst isHybrid = (win: Window) => isCordova(win) || isCapacitorNative(win);\n\nconst isCordova = (win: any): boolean => !!(win['cordova'] || win['phonegap'] || win['PhoneGap']);\n\nconst isCapacitorNative = (win: any): boolean => {\n const capacitor = win['Capacitor'];\n return !!(capacitor && capacitor.isNative);\n};\n\nconst isElectron = (win: Window): boolean => testUserAgent(win, /electron/i);\n\nconst isPWA = (win: Window): boolean => !!(win.matchMedia('(display-mode: standalone)').matches || (win.navigator as any).standalone);\n\nexport const testUserAgent = (win: Window, expr: RegExp) => expr.test(win.navigator.userAgent);\n\nexport const isBrowser = new Function('try {return this===window;}catch(e){ return false;}');\nexport const isServer = new Function('try {return this===global;}catch(e){return false;}');\n\nconst matchMedia = (win: Window, query: string): boolean => {\n return win.matchMedia(query).matches;\n};\n\nconst isSMScreen = (win: Window) => matchMedia(win, '(max-width: 578px)');\nconst isMDScreen = (win: Window) => matchMedia(win, '(max-width: 768px)');\nconst isLGScreen = (win: Window) => matchMedia(win, '(max-width: 992px)');\nconst isXLScreen = (win: Window) => matchMedia(win, '(max-width: 1200px)');\nconst is2XLScreen = (win: Window) => matchMedia(win, '(max-width: 1440px)');\nconst is3XLScreen = (win: Window) => matchMedia(win, '(max-width: 1920px)');\nconst is4XLScreen = (win: Window) => matchMedia(win, '(max-width: 2560px)');\n\nconst PLATFORMS_MAP: any = {\n Android: isAndroid,\n iOS: isIOS,\n Desktop: isDesktop,\n Mobile: isMobile,\n Touch: isTouch,\n Chrome: isChrome,\n Firefox: isFirefox,\n Safari: isSafari,\n Edge: isEdge,\n Opera: isOpera,\n Hybrid: isHybrid,\n PWA: isPWA,\n Electron: isElectron,\n SM: isSMScreen,\n MD: isMDScreen,\n LG: isLGScreen,\n XL: isXLScreen,\n '2XL': is2XLScreen,\n '3XL': is3XLScreen,\n '4XL': is4XLScreen,\n};\n\nexport class AXPlatformEvent<T extends Event = Event> {\n nativeEvent!: T;\n source!: AXPlatform;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXPlatform {\n resize: Subject<AXPlatformEvent> = new Subject<AXPlatformEvent>();\n click: Subject<AXPlatformEvent> = new Subject<AXPlatformEvent>();\n scroll: Subject<AXPlatformEvent> = new Subject<AXPlatformEvent>();\n themeMode$: BehaviorSubject<AXThemeMode> = new BehaviorSubject<AXThemeMode>('system');\n isRtl(): boolean {\n return document.dir == 'rtl' || document.body.dir == 'rtl' || document.body.style.direction == 'rtl';\n }\n\n isLandscape(): boolean {\n return window.innerHeight < window.innerWidth;\n }\n\n isPortrate(): boolean {\n return !this.isLandscape();\n }\n\n is(name: AXPlatforms | AXBrowsers | AXTechnologies | AXScreenSizes): boolean {\n if (isBrowser()) {\n return PLATFORMS_MAP[name](window) || false;\n } else {\n return false;\n }\n }\n\n get screenSize(): AXScreenSizes {\n return (['SM', 'MD', 'LG', 'XL', '2XL', '3XL', '4XL'].find((name) => PLATFORMS_MAP[name](window) == true) || '5XL') as AXScreenSizes;\n }\n\n switchLightMode() {\n const _html = document.getElementsByTagName('html')[0];\n _html.classList.remove('ax-dark');\n localStorage.setItem('AX_THEME_MODE', 'light');\n this.themeMode$.next('light');\n return 'light';\n }\n\n switchDarkMode() {\n const _html = document.getElementsByTagName('html')[0];\n _html.classList.add('ax-dark');\n localStorage.setItem('AX_THEME_MODE', 'dark');\n this.themeMode$.next('dark');\n }\n\n switchSystemMode() {\n if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {\n const _html = document.getElementsByTagName('html')[0];\n _html.classList.add('ax-dark');\n } else {\n const _html = document.getElementsByTagName('html')[0];\n _html.classList.remove('ax-dark');\n }\n localStorage.setItem('AX_THEME_MODE', 'system');\n this.themeMode$.next('system');\n }\n\n autoDetectThemeMode() {\n const mode = localStorage.getItem('AX_THEME_MODE') || 'system';\n switch (mode) {\n case 'light':\n return this.switchLightMode();\n\n case 'dark':\n return this.switchDarkMode();\n\n case 'system':\n return this.switchSystemMode();\n }\n }\n\n private _setFullHeightRatio() {\n if (isBrowser()) {\n try {\n document.querySelector<HTMLElement>(':root')?.style.setProperty('--ax-vh', window.innerHeight / 100 + 'px');\n } catch (error) {\n console.error(error);\n }\n }\n }\n\n private autoSystemModeDetection(event) {\n if (this.themeMode$.getValue() === 'system') {\n const themeMode = event.matches ? 'dark' : 'light';\n\n if (themeMode === 'dark') {\n const _html = document.getElementsByTagName('html')[0];\n _html.classList.add('ax-dark');\n } else {\n const _html = document.getElementsByTagName('html')[0];\n _html.classList.remove('ax-dark');\n }\n }\n }\n\n constructor() {\n afterNextRender(() => {\n fromEvent<UIEvent>(window, 'resize')\n .pipe(debounceTime(100))\n .pipe(distinctUntilChanged())\n .subscribe((e) => {\n this.resize.next({\n nativeEvent: e,\n source: this,\n });\n //\n this._setFullHeightRatio();\n });\n if (window?.matchMedia('(prefers-color-scheme: dark)').matches) {\n window?.matchMedia('(prefers-color-scheme: dark)')?.addEventListener('change', (event) => {\n // Detect System color mode\n this.autoSystemModeDetection(event);\n });\n }\n document.addEventListener(\n 'click',\n (e) => {\n this.click.next({\n nativeEvent: e,\n source: this,\n });\n },\n true,\n );\n\n document.addEventListener(\n 'scroll',\n (e) => {\n this.scroll.next({\n nativeEvent: e,\n source: this,\n });\n },\n true,\n );\n });\n\n // init functions\n this._setFullHeightRatio();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAWA,MAAM,QAAQ,GAAG,CAAC,GAAW,KAAc,aAAa,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;AAEzE,MAAM,SAAS,GAAG,CAAC,GAAW,KAAc,aAAa,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;AAE3E,MAAM,MAAM,GAAG,CAAC,GAAW,KAAc,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AAErE,MAAM,QAAQ,GAAG,CAAC,GAAW,KAAc,aAAa,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;AAEzE,MAAM,OAAO,GAAG,CAAC,GAAW,KAAc,aAAa,CAAC,GAAG,EAAE,QAAQ,CAAC,IAAI,aAAa,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;AAErG,MAAM,MAAM,GAAG,CAAC,GAAW,KAAc,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC,IAAI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