@filip.mazev/blocks-core 0.0.18 → 0.0.20
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,16 +1,361 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, inject, NgZone, PLATFORM_ID, signal, computed } from '@angular/core';
|
|
3
|
+
import { isPlatformBrowser } from '@angular/common';
|
|
4
|
+
import { fromEvent } from 'rxjs';
|
|
5
|
+
import { debounceTime, map, distinctUntilChanged } from 'rxjs/operators';
|
|
6
|
+
import { toObservable } from '@angular/core/rxjs-interop';
|
|
7
|
+
|
|
8
|
+
var DesktopOS;
|
|
9
|
+
(function (DesktopOS) {
|
|
10
|
+
DesktopOS["Linux"] = "linux";
|
|
11
|
+
DesktopOS["MacOS"] = "mac_os";
|
|
12
|
+
DesktopOS["Unix"] = "unix";
|
|
13
|
+
DesktopOS["Unknown"] = "unknown";
|
|
14
|
+
DesktopOS["Windows"] = "windows";
|
|
15
|
+
})(DesktopOS || (DesktopOS = {}));
|
|
16
|
+
|
|
17
|
+
var MobileOS;
|
|
18
|
+
(function (MobileOS) {
|
|
19
|
+
MobileOS["Android"] = "android";
|
|
20
|
+
MobileOS["iOS"] = "ios";
|
|
21
|
+
MobileOS["Unknown"] = "unknown";
|
|
22
|
+
MobileOS["WindowsPhone"] = "Windows Phone";
|
|
23
|
+
})(MobileOS || (MobileOS = {}));
|
|
24
|
+
|
|
25
|
+
class DeviceTypeService {
|
|
26
|
+
userAgent = navigator.userAgent || navigator.vendor || window.opera || undefined;
|
|
27
|
+
isDesktopDevice = !this.isMobileDevice() && !this.isTabletDevice();
|
|
28
|
+
supportedScreenOrientation = (screen?.orientation || {}).type ?? screen.mozOrientation ?? screen.msOrientation;
|
|
29
|
+
safariScreenOrientation = !screen?.orientation && matchMedia('(orientation: portrait)').matches ? 'portrait-primary' : 'landscape-primary';
|
|
30
|
+
initialScreenOrientation = this.supportedScreenOrientation ?? this.safariScreenOrientation ?? 'portrait-primary';
|
|
31
|
+
screenOrientation = this.initialScreenOrientation;
|
|
32
|
+
constructor() {
|
|
33
|
+
if (screen.orientation) {
|
|
34
|
+
screen.orientation.addEventListener('change', (ev) => (this.screenOrientation = (ev.target ?? {}).type));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
isMobileDevice() {
|
|
38
|
+
const regexs = [/(Android)(.+)(Mobile)/i, /BlackBerry/i, /iPhone|iPod/i, /Opera Mini/i, /IEMobile/i];
|
|
39
|
+
return regexs.some(b => this.userAgent.match(b) !== null);
|
|
40
|
+
}
|
|
41
|
+
isTabletDevice() {
|
|
42
|
+
const regex = /(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/;
|
|
43
|
+
return regex.test(this.userAgent.toLowerCase());
|
|
44
|
+
}
|
|
45
|
+
isLandscapeOrientation() {
|
|
46
|
+
return ['landscape-primary', 'landscape-secondary'].includes(this.screenOrientation);
|
|
47
|
+
}
|
|
48
|
+
isPortraitOrientation() {
|
|
49
|
+
return ['portrait-primary', 'portrait-secondary'].includes(this.screenOrientation);
|
|
50
|
+
}
|
|
51
|
+
getMobileOS() {
|
|
52
|
+
if (this.isMobileDevice()) {
|
|
53
|
+
if (/windows phone/i.test(this.userAgent))
|
|
54
|
+
return MobileOS.WindowsPhone;
|
|
55
|
+
else if (/android/i.test(this.userAgent))
|
|
56
|
+
return MobileOS.Android;
|
|
57
|
+
else if (/iPad|iPhone|iPod/.test(this.userAgent) && !window.MSStream)
|
|
58
|
+
return MobileOS.iOS;
|
|
59
|
+
return MobileOS.Unknown;
|
|
60
|
+
}
|
|
61
|
+
else
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
getDesktopOS() {
|
|
65
|
+
if (this.isDesktopDevice) {
|
|
66
|
+
if (this.userAgent.indexOf('Win') !== -1)
|
|
67
|
+
return DesktopOS.Windows;
|
|
68
|
+
else if (this.userAgent.indexOf('Mac') !== -1)
|
|
69
|
+
return DesktopOS.MacOS;
|
|
70
|
+
else if (this.userAgent.indexOf('X11') !== -1)
|
|
71
|
+
return DesktopOS.Unix;
|
|
72
|
+
else if (this.userAgent.indexOf('Linux') !== -1)
|
|
73
|
+
return DesktopOS.Linux;
|
|
74
|
+
return DesktopOS.Unknown;
|
|
75
|
+
}
|
|
76
|
+
else
|
|
77
|
+
return undefined;
|
|
78
|
+
}
|
|
79
|
+
getDeviceOS() {
|
|
80
|
+
return this.getMobileOS() ?? this.getDesktopOS();
|
|
81
|
+
}
|
|
82
|
+
getDeviceState() {
|
|
83
|
+
const isDesktop = this.isDesktopDevice;
|
|
84
|
+
const isMobile = this.isMobileDevice();
|
|
85
|
+
const isTablet = this.isTabletDevice();
|
|
86
|
+
const mobileOS = this.getMobileOS();
|
|
87
|
+
const isAndroidDevice = this.getDeviceOS() === MobileOS.Android;
|
|
88
|
+
const isAppleDevice = this.getDeviceOS() === MobileOS.iOS || this.getDeviceOS() === DesktopOS.MacOS;
|
|
89
|
+
const isUnknownMobileDevice = this.getDeviceOS() === MobileOS.Unknown;
|
|
90
|
+
const desktopOS = this.getDesktopOS();
|
|
91
|
+
const isWindowsDesktop = this.getDeviceOS() === DesktopOS.Windows;
|
|
92
|
+
const isLinuxOrUnixDesktop = this.getDeviceOS() === DesktopOS.Linux || this.getDeviceOS() === DesktopOS.Unix;
|
|
93
|
+
return {
|
|
94
|
+
isDesktop,
|
|
95
|
+
desktopOS,
|
|
96
|
+
isWindowsDesktop,
|
|
97
|
+
isLinuxOrUnixDesktop,
|
|
98
|
+
isMobile,
|
|
99
|
+
mobileOS,
|
|
100
|
+
isAndroidDevice,
|
|
101
|
+
isAppleDevice,
|
|
102
|
+
isUnknownMobileDevice,
|
|
103
|
+
isTablet,
|
|
104
|
+
isLandscapeOrientation: () => this.isLandscapeOrientation(),
|
|
105
|
+
isPortraitOrientation: () => this.isPortraitOrientation()
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: DeviceTypeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
109
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: DeviceTypeService, providedIn: 'root' });
|
|
110
|
+
}
|
|
111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: DeviceTypeService, decorators: [{
|
|
112
|
+
type: Injectable,
|
|
113
|
+
args: [{
|
|
114
|
+
providedIn: 'root'
|
|
115
|
+
}]
|
|
116
|
+
}], ctorParameters: () => [] });
|
|
117
|
+
|
|
118
|
+
const BREAKPOINTS = {
|
|
119
|
+
xs: 360,
|
|
120
|
+
sm: 640,
|
|
121
|
+
md: 768,
|
|
122
|
+
lg: 1024,
|
|
123
|
+
xl: 1280,
|
|
124
|
+
'2xl': 1536,
|
|
125
|
+
'3xl': 1920,
|
|
126
|
+
'4xl': 2560,
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
class WindowDimensionsService {
|
|
130
|
+
ngZone = inject(NgZone);
|
|
131
|
+
platformId = inject(PLATFORM_ID);
|
|
132
|
+
isBrowser = isPlatformBrowser(this.platformId);
|
|
133
|
+
_dimensions = signal(this.getCurrentDimensions(), ...(ngDevMode ? [{ debugName: "_dimensions" }] : []));
|
|
134
|
+
dimensions = this._dimensions.asReadonly();
|
|
135
|
+
isMobile = computed(() => this.dimensions().width < BREAKPOINTS.md, ...(ngDevMode ? [{ debugName: "isMobile" }] : []));
|
|
136
|
+
isTablet = computed(() => this.dimensions().width >= BREAKPOINTS.md && this.dimensions().width < BREAKPOINTS.lg, ...(ngDevMode ? [{ debugName: "isTablet" }] : []));
|
|
137
|
+
isDesktop = computed(() => this.dimensions().width >= BREAKPOINTS.lg, ...(ngDevMode ? [{ debugName: "isDesktop" }] : []));
|
|
138
|
+
breakpoints = BREAKPOINTS;
|
|
139
|
+
constructor() {
|
|
140
|
+
this.initResizeListener();
|
|
141
|
+
}
|
|
142
|
+
getCurrentDimensions() {
|
|
143
|
+
if (!this.isBrowser) {
|
|
144
|
+
return { width: 0, height: 0 };
|
|
145
|
+
}
|
|
146
|
+
return {
|
|
147
|
+
width: window.innerWidth,
|
|
148
|
+
height: window.innerHeight,
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
initResizeListener() {
|
|
152
|
+
if (!this.isBrowser)
|
|
153
|
+
return;
|
|
154
|
+
this.ngZone.runOutsideAngular(() => {
|
|
155
|
+
fromEvent(window, 'resize')
|
|
156
|
+
.pipe(debounceTime(150), map(() => this.getCurrentDimensions()), distinctUntilChanged((prev, curr) => prev.width === curr.width && prev.height === curr.height))
|
|
157
|
+
.subscribe((dims) => {
|
|
158
|
+
this.ngZone.run(() => {
|
|
159
|
+
this._dimensions.set(dims);
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: WindowDimensionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
165
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: WindowDimensionsService, providedIn: 'root' });
|
|
166
|
+
}
|
|
167
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: WindowDimensionsService, decorators: [{
|
|
168
|
+
type: Injectable,
|
|
169
|
+
args: [{
|
|
170
|
+
providedIn: 'root',
|
|
171
|
+
}]
|
|
172
|
+
}], ctorParameters: () => [] });
|
|
173
|
+
|
|
174
|
+
class ScrollLockService {
|
|
175
|
+
deviceTypeService = inject(DeviceTypeService);
|
|
176
|
+
windowDimensionsService = inject(WindowDimensionsService);
|
|
177
|
+
activeLocks = new Map();
|
|
178
|
+
_isScrollDisabled = signal(false, ...(ngDevMode ? [{ debugName: "_isScrollDisabled" }] : []));
|
|
179
|
+
isScrollDisabled = this._isScrollDisabled.asReadonly();
|
|
180
|
+
previousBodyPadding = null;
|
|
181
|
+
activeConfig = computed(() => {
|
|
182
|
+
if (this.activeLocks.size === 0)
|
|
183
|
+
return null;
|
|
184
|
+
const keys = Array.from(this.activeLocks.keys());
|
|
185
|
+
const lastKey = keys[keys.length - 1];
|
|
186
|
+
return this.activeLocks.get(lastKey) ?? null;
|
|
187
|
+
}, ...(ngDevMode ? [{ debugName: "activeConfig" }] : []));
|
|
188
|
+
windowDimensions = this.windowDimensionsService.dimensions;
|
|
189
|
+
boundHandleTouchMove = this.handleTouchMove.bind(this);
|
|
190
|
+
boundPreventDefault = this.preventDefault.bind(this);
|
|
191
|
+
constructor() { }
|
|
192
|
+
ngOnDestroy() {
|
|
193
|
+
this.activeLocks.clear();
|
|
194
|
+
this.updateStateAndCleanup();
|
|
195
|
+
}
|
|
196
|
+
disableScroll(usageId, config) {
|
|
197
|
+
const wasAlreadyDisabled = this._isScrollDisabled();
|
|
198
|
+
this.activeLocks.set(usageId, config);
|
|
199
|
+
this._isScrollDisabled.set(true);
|
|
200
|
+
if (wasAlreadyDisabled) {
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
const documentWidth = document.documentElement.clientWidth;
|
|
204
|
+
const windowWidth = window.innerWidth;
|
|
205
|
+
const scrollBarWidth = windowWidth - documentWidth;
|
|
206
|
+
if (scrollBarWidth > 0) {
|
|
207
|
+
this.previousBodyPadding = document.body.style.paddingRight;
|
|
208
|
+
const computedBodyPadding = parseInt(window.getComputedStyle(document.body).paddingRight, 10) || 0;
|
|
209
|
+
const newPadding = computedBodyPadding + scrollBarWidth;
|
|
210
|
+
document.body.style.setProperty('padding-right', `${newPadding}px`, 'important');
|
|
211
|
+
}
|
|
212
|
+
document.body.style.setProperty('overflow', 'hidden', 'important');
|
|
213
|
+
if (config.handleTouchInput !== false) {
|
|
214
|
+
document.body.style.setProperty('touch-action', 'none', 'important');
|
|
215
|
+
}
|
|
216
|
+
setTimeout(() => {
|
|
217
|
+
if (!this._isScrollDisabled())
|
|
218
|
+
return;
|
|
219
|
+
if (config.handleTouchInput === true) {
|
|
220
|
+
document.body.addEventListener('touchmove', this.boundHandleTouchMove, { passive: false });
|
|
221
|
+
}
|
|
222
|
+
if (config.handleExtremeOverflow === true) {
|
|
223
|
+
const options = { passive: false };
|
|
224
|
+
window.addEventListener('wheel', this.boundPreventDefault, options);
|
|
225
|
+
window.addEventListener('mousewheel', this.boundPreventDefault, options);
|
|
226
|
+
window.addEventListener('scroll', this.boundPreventDefault, options);
|
|
227
|
+
window.addEventListener('DOMMouseScroll', this.boundPreventDefault, options);
|
|
228
|
+
}
|
|
229
|
+
}, (config.animationDuration ?? 0) + 10);
|
|
230
|
+
}
|
|
231
|
+
enableScroll(usageId, extreme_overflow) {
|
|
232
|
+
if (!this.activeLocks.has(usageId)) {
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
this.activeLocks.delete(usageId);
|
|
236
|
+
if (this.activeLocks.size > 0) {
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
this.updateStateAndCleanup(extreme_overflow);
|
|
240
|
+
}
|
|
241
|
+
updateStateAndCleanup(extreme_overflow) {
|
|
242
|
+
this._isScrollDisabled.set(false);
|
|
243
|
+
document.body.style.removeProperty('overflow');
|
|
244
|
+
if (this.previousBodyPadding !== null) {
|
|
245
|
+
if (this.previousBodyPadding) {
|
|
246
|
+
document.body.style.setProperty('padding-right', this.previousBodyPadding);
|
|
247
|
+
}
|
|
248
|
+
else {
|
|
249
|
+
document.body.style.removeProperty('padding-right');
|
|
250
|
+
}
|
|
251
|
+
this.previousBodyPadding = null;
|
|
252
|
+
}
|
|
253
|
+
document.body.removeEventListener('touchmove', this.boundHandleTouchMove);
|
|
254
|
+
document.body.style.removeProperty('touch-action');
|
|
255
|
+
if (extreme_overflow !== false) {
|
|
256
|
+
window.removeEventListener('wheel', this.boundPreventDefault);
|
|
257
|
+
window.removeEventListener('mousewheel', this.boundPreventDefault);
|
|
258
|
+
window.removeEventListener('scroll', this.boundPreventDefault);
|
|
259
|
+
window.removeEventListener('DOMMouseScroll', this.boundPreventDefault);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
handleTouchMove(event) {
|
|
263
|
+
const targetNode = event.target;
|
|
264
|
+
const currentConfiguration = this.activeConfig();
|
|
265
|
+
if (!this.isAllowedToScroll(targetNode) && (currentConfiguration === null || currentConfiguration?.handleTouchInput !== false)) {
|
|
266
|
+
if (currentConfiguration === null || currentConfiguration?.mobileOnlyTouchPrevention !== true ||
|
|
267
|
+
(currentConfiguration?.mobileOnlyTouchPrevention === true && ((!this.deviceTypeService.getDeviceState().isMobile || !this.deviceTypeService.getDeviceState().isTablet)
|
|
268
|
+
&& (this.windowDimensions().width < this.windowDimensionsService.breakpoints.sm)))) {
|
|
269
|
+
event.preventDefault();
|
|
270
|
+
event.stopPropagation();
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
isAllowedToScroll(targetNode) {
|
|
275
|
+
const currentConfiguration = this.activeConfig();
|
|
276
|
+
if (!currentConfiguration?.allowTouchInputOn || currentConfiguration.allowTouchInputOn.length === 0) {
|
|
277
|
+
return true;
|
|
278
|
+
}
|
|
279
|
+
if (currentConfiguration.allowTouchInputOn.length === undefined) {
|
|
280
|
+
return currentConfiguration.allowTouchInputOn.contains(targetNode);
|
|
281
|
+
}
|
|
282
|
+
for (const element of currentConfiguration.allowTouchInputOn) {
|
|
283
|
+
if (element.contains(targetNode)) {
|
|
284
|
+
return true;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
return false;
|
|
288
|
+
}
|
|
289
|
+
preventDefault(event) {
|
|
290
|
+
event.preventDefault();
|
|
291
|
+
event.stopPropagation();
|
|
292
|
+
}
|
|
293
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ScrollLockService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
294
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ScrollLockService, providedIn: 'root' });
|
|
295
|
+
}
|
|
296
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ScrollLockService, decorators: [{
|
|
297
|
+
type: Injectable,
|
|
298
|
+
args: [{
|
|
299
|
+
providedIn: 'root'
|
|
300
|
+
}]
|
|
301
|
+
}], ctorParameters: () => [] });
|
|
302
|
+
|
|
303
|
+
class ThemingService {
|
|
304
|
+
platformId = inject(PLATFORM_ID);
|
|
305
|
+
isBrowser = isPlatformBrowser(this.platformId);
|
|
306
|
+
_systemTheme = signal(this.detectInitialSystemTheme(), ...(ngDevMode ? [{ debugName: "_systemTheme" }] : []));
|
|
307
|
+
_applicationTheme = signal(null, ...(ngDevMode ? [{ debugName: "_applicationTheme" }] : []));
|
|
308
|
+
systemTheme = this._systemTheme.asReadonly();
|
|
309
|
+
applicationTheme = this._applicationTheme.asReadonly();
|
|
310
|
+
activeTheme = computed(() => this.applicationTheme() ?? this.systemTheme(), ...(ngDevMode ? [{ debugName: "activeTheme" }] : []));
|
|
311
|
+
mediaQueryList;
|
|
312
|
+
mediaQueryListener;
|
|
313
|
+
constructor() {
|
|
314
|
+
if (this.isBrowser) {
|
|
315
|
+
this.initSystemThemeListener();
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
ngOnDestroy() {
|
|
319
|
+
if (this.mediaQueryList && this.mediaQueryListener) {
|
|
320
|
+
this.mediaQueryList.removeEventListener('change', this.mediaQueryListener);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
setApplicationTheme(theme) {
|
|
324
|
+
this._applicationTheme.set(theme);
|
|
325
|
+
}
|
|
326
|
+
getSystemTheme$() {
|
|
327
|
+
return toObservable(this._systemTheme);
|
|
328
|
+
}
|
|
329
|
+
getApplicationTheme$() {
|
|
330
|
+
return toObservable(this._applicationTheme);
|
|
331
|
+
}
|
|
332
|
+
detectInitialSystemTheme() {
|
|
333
|
+
if (!this.isBrowser)
|
|
334
|
+
return 'light';
|
|
335
|
+
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
|
336
|
+
}
|
|
337
|
+
initSystemThemeListener() {
|
|
338
|
+
this.mediaQueryList = window.matchMedia('(prefers-color-scheme: dark)');
|
|
339
|
+
this.mediaQueryListener = (event) => {
|
|
340
|
+
this._systemTheme.set(event.matches ? 'dark' : 'light');
|
|
341
|
+
};
|
|
342
|
+
this.mediaQueryList.addEventListener('change', this.mediaQueryListener);
|
|
343
|
+
}
|
|
344
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ThemingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
345
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ThemingService, providedIn: 'root' });
|
|
346
|
+
}
|
|
347
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ThemingService, decorators: [{
|
|
348
|
+
type: Injectable,
|
|
349
|
+
args: [{
|
|
350
|
+
providedIn: 'root'
|
|
351
|
+
}]
|
|
352
|
+
}], ctorParameters: () => [] });
|
|
353
|
+
|
|
354
|
+
const SCROLL_LOCK_INSTANCE_IDENTIFIER = 'scroll_lock_instance_';
|
|
355
|
+
|
|
356
|
+
function uuidv4() {
|
|
357
|
+
return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => (+c ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (+c / 4)))).toString(16));
|
|
358
|
+
}
|
|
14
359
|
|
|
15
360
|
/*
|
|
16
361
|
* Public API Surface of blocks-core
|
|
@@ -19,4 +364,6 @@ export * from '@core/utils/uui4';
|
|
|
19
364
|
/**
|
|
20
365
|
* Generated bundle index. Do not edit.
|
|
21
366
|
*/
|
|
367
|
+
|
|
368
|
+
export { BREAKPOINTS, DesktopOS, DeviceTypeService, MobileOS, SCROLL_LOCK_INSTANCE_IDENTIFIER, ScrollLockService, ThemingService, WindowDimensionsService, uuidv4 };
|
|
22
369
|
//# sourceMappingURL=filip.mazev-blocks-core.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filip.mazev-blocks-core.mjs","sources":["../../../projects/blocks-core/src/public-api.ts","../../../projects/blocks-core/src/filip.mazev-blocks-core.ts"],"sourcesContent":["/*\n * Public API Surface of blocks-core\n */\n\nexport * from '@core/services/device-type.service';\nexport * from '@core/services/scroll-lock.service';\nexport * from '@core/services/window-dimension.service';\nexport * from '@core/services/theming.service';\n\nexport * from '@core/enums/desktop-os.enum';\nexport * from '@core/enums/mobile-os.enum';\n\nexport * from '@core/interfaces/device-state.interface';\nexport * from '@core/interfaces/scroll-lock-config.interface';\nexport * from '@core/interfaces/window-dimensions.interface';\n\nexport * from '@core/constants/window-dimension.constants';\nexport * from '@core/constants/scroll-lock.constants';\n\nexport * from '@core/types/device.types';\n\nexport * from '@core/utils/uui4';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;;AAEG;;ACFH;;AAEG"}
|
|
1
|
+
{"version":3,"file":"filip.mazev-blocks-core.mjs","sources":["../../../projects/blocks-core/src/lib/enums/desktop-os.enum.ts","../../../projects/blocks-core/src/lib/enums/mobile-os.enum.ts","../../../projects/blocks-core/src/lib/services/device-type.service.ts","../../../projects/blocks-core/src/lib/constants/window-dimension.constants.ts","../../../projects/blocks-core/src/lib/services/window-dimension.service.ts","../../../projects/blocks-core/src/lib/services/scroll-lock.service.ts","../../../projects/blocks-core/src/lib/services/theming.service.ts","../../../projects/blocks-core/src/lib/constants/scroll-lock.constants.ts","../../../projects/blocks-core/src/lib/helpers/uui4.ts","../../../projects/blocks-core/src/public-api.ts","../../../projects/blocks-core/src/filip.mazev-blocks-core.ts"],"sourcesContent":["export enum DesktopOS {\n Linux = 'linux',\n MacOS = 'mac_os',\n Unix = 'unix',\n Unknown = 'unknown',\n Windows = 'windows'\n}","export enum MobileOS {\n Android = 'android',\n iOS = 'ios',\n Unknown = 'unknown',\n WindowsPhone = 'Windows Phone'\n}","import { Injectable } from '@angular/core';\nimport { DesktopOS } from '../enums/desktop-os.enum';\nimport { MobileOS } from '../enums/mobile-os.enum';\nimport { DeviceState } from '../interfaces/device-state.interface';\nimport { DeviceOS, DeviceOrientationType } from '../types/device.types';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DeviceTypeService {\n private userAgent: string = navigator.userAgent || navigator.vendor || (window as any).opera || undefined;\n private isDesktopDevice: boolean = !this.isMobileDevice() && !this.isTabletDevice();\n\n private supportedScreenOrientation = (screen?.orientation || {}).type ?? (screen as any).mozOrientation ?? (screen as any).msOrientation;\n private safariScreenOrientation: DeviceOrientationType = !screen?.orientation && matchMedia('(orientation: portrait)').matches ? 'portrait-primary' : 'landscape-primary';\n private initialScreenOrientation: DeviceOrientationType = this.supportedScreenOrientation ?? this.safariScreenOrientation ?? 'portrait-primary';\n private screenOrientation: DeviceOrientationType = this.initialScreenOrientation;\n \n constructor() {\n if (screen.orientation) {\n screen.orientation.addEventListener(\n 'change',\n (ev: Event) => (this.screenOrientation = (ev.target ?? ({} as any)).type as OrientationType)\n );\n }\n }\n\n private isMobileDevice(): boolean {\n const regexs = [/(Android)(.+)(Mobile)/i, /BlackBerry/i, /iPhone|iPod/i, /Opera Mini/i, /IEMobile/i];\n return regexs.some(b => this.userAgent.match(b) !== null);\n }\n\n private isTabletDevice(): boolean {\n const regex = /(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/;\n return regex.test(this.userAgent.toLowerCase());\n }\n\n public isLandscapeOrientation(): boolean {\n return ['landscape-primary', 'landscape-secondary'].includes(this.screenOrientation);\n }\n\n public isPortraitOrientation(): boolean {\n return ['portrait-primary', 'portrait-secondary'].includes(this.screenOrientation);\n }\n\n private getMobileOS(): MobileOS | undefined {\n if (this.isMobileDevice()) {\n if (/windows phone/i.test(this.userAgent)) return MobileOS.WindowsPhone;\n else if (/android/i.test(this.userAgent)) return MobileOS.Android;\n else if (/iPad|iPhone|iPod/.test(this.userAgent) && !(window as any).MSStream) return MobileOS.iOS;\n\n return MobileOS.Unknown;\n } else return undefined;\n }\n\n private getDesktopOS(): DesktopOS | undefined {\n if (this.isDesktopDevice) {\n if (this.userAgent.indexOf('Win') !== -1) return DesktopOS.Windows;\n else if (this.userAgent.indexOf('Mac') !== -1) return DesktopOS.MacOS;\n else if (this.userAgent.indexOf('X11') !== -1) return DesktopOS.Unix;\n else if (this.userAgent.indexOf('Linux') !== -1) return DesktopOS.Linux;\n\n return DesktopOS.Unknown;\n } else return undefined;\n }\n\n private getDeviceOS(): DeviceOS | undefined {\n return this.getMobileOS() ?? this.getDesktopOS();\n }\n\n public getDeviceState(): DeviceState {\n const isDesktop = this.isDesktopDevice;\n const isMobile = this.isMobileDevice();\n const isTablet = this.isTabletDevice();\n const mobileOS: MobileOS | undefined = this.getMobileOS();\n const isAndroidDevice = this.getDeviceOS() === MobileOS.Android;\n const isAppleDevice = this.getDeviceOS() === MobileOS.iOS || this.getDeviceOS() === DesktopOS.MacOS;\n const isUnknownMobileDevice = this.getDeviceOS() === MobileOS.Unknown;\n const desktopOS: DesktopOS | undefined = this.getDesktopOS();\n const isWindowsDesktop = this.getDeviceOS() === DesktopOS.Windows;\n const isLinuxOrUnixDesktop = this.getDeviceOS() === DesktopOS.Linux || this.getDeviceOS() === DesktopOS.Unix;\n\n return {\n isDesktop,\n desktopOS,\n isWindowsDesktop,\n isLinuxOrUnixDesktop,\n isMobile,\n mobileOS,\n isAndroidDevice,\n isAppleDevice,\n isUnknownMobileDevice,\n isTablet,\n isLandscapeOrientation: () => this.isLandscapeOrientation(),\n isPortraitOrientation: () => this.isPortraitOrientation()\n };\n }\n}\n","export const BREAKPOINTS = {\n xs: 360,\n sm: 640,\n md: 768,\n lg: 1024,\n xl: 1280,\n '2xl': 1536,\n '3xl': 1920,\n '4xl': 2560,\n} as const;","import { Injectable, inject, NgZone, PLATFORM_ID, signal, computed } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { fromEvent } from 'rxjs';\nimport { debounceTime, distinctUntilChanged, map } from 'rxjs/operators';\nimport { BREAKPOINTS } from '../constants/window-dimension.constants';\nimport { WindowDimensions } from '../interfaces/window-dimensions.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class WindowDimensionsService {\n private readonly ngZone = inject(NgZone);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly isBrowser = isPlatformBrowser(this.platformId);\n\n private readonly _dimensions = signal<WindowDimensions>(this.getCurrentDimensions());\n\n public readonly dimensions = this._dimensions.asReadonly();\n\n public readonly isMobile = computed(() => this.dimensions().width < BREAKPOINTS.md);\n public readonly isTablet = computed(() => this.dimensions().width >= BREAKPOINTS.md && this.dimensions().width < BREAKPOINTS.lg);\n public readonly isDesktop = computed(() => this.dimensions().width >= BREAKPOINTS.lg);\n\n public readonly breakpoints = BREAKPOINTS;\n\n constructor() {\n this.initResizeListener();\n }\n\n private getCurrentDimensions(): WindowDimensions {\n if (!this.isBrowser) {\n return { width: 0, height: 0 };\n }\n return {\n width: window.innerWidth,\n height: window.innerHeight,\n };\n }\n\n private initResizeListener(): void {\n if (!this.isBrowser) return;\n\n this.ngZone.runOutsideAngular(() => {\n fromEvent(window, 'resize')\n .pipe(\n debounceTime(150),\n map(() => this.getCurrentDimensions()),\n distinctUntilChanged((prev, curr) => \n prev.width === curr.width && prev.height === curr.height\n )\n )\n .subscribe((dims) => {\n this.ngZone.run(() => {\n this._dimensions.set(dims);\n });\n });\n });\n }\n}","import { Injectable, OnDestroy, inject, signal, computed } from '@angular/core';\nimport { DeviceTypeService } from './device-type.service';\nimport { WindowDimensionsService } from './window-dimension.service';\nimport { IScrollLockConfig } from '../interfaces/scroll-lock-config.interface';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ScrollLockService implements OnDestroy {\n private deviceTypeService = inject(DeviceTypeService);\n private windowDimensionsService = inject(WindowDimensionsService);\n\n private activeLocks = new Map<string, IScrollLockConfig>();\n\n private _isScrollDisabled = signal<boolean>(false);\n public readonly isScrollDisabled = this._isScrollDisabled.asReadonly();\n\n private previousBodyPadding: string | null = null;\n\n private activeConfig = computed(() => {\n if (this.activeLocks.size === 0) return null;\n const keys = Array.from(this.activeLocks.keys());\n const lastKey = keys[keys.length - 1];\n return this.activeLocks.get(lastKey) ?? null;\n });\n\n private windowDimensions = this.windowDimensionsService.dimensions;\n\n private boundHandleTouchMove = this.handleTouchMove.bind(this);\n private boundPreventDefault = this.preventDefault.bind(this);\n\n constructor() { }\n\n public ngOnDestroy(): void {\n this.activeLocks.clear();\n this.updateStateAndCleanup();\n }\n\n public disableScroll(usageId: string, config: IScrollLockConfig): void {\n const wasAlreadyDisabled = this._isScrollDisabled();\n\n this.activeLocks.set(usageId, config);\n this._isScrollDisabled.set(true);\n\n if (wasAlreadyDisabled) {\n return;\n }\n\n const documentWidth = document.documentElement.clientWidth;\n const windowWidth = window.innerWidth;\n const scrollBarWidth = windowWidth - documentWidth;\n\n if (scrollBarWidth > 0) {\n this.previousBodyPadding = document.body.style.paddingRight;\n\n const computedBodyPadding = parseInt(window.getComputedStyle(document.body).paddingRight, 10) || 0;\n const newPadding = computedBodyPadding + scrollBarWidth;\n\n document.body.style.setProperty('padding-right', `${newPadding}px`, 'important');\n }\n\n document.body.style.setProperty('overflow', 'hidden', 'important');\n\n if (config.handleTouchInput !== false) {\n document.body.style.setProperty('touch-action', 'none', 'important');\n }\n\n setTimeout(() => {\n if (!this._isScrollDisabled()) return;\n\n if (config.handleTouchInput === true) {\n document.body.addEventListener('touchmove', this.boundHandleTouchMove, { passive: false });\n }\n\n if (config.handleExtremeOverflow === true) {\n const options = { passive: false };\n window.addEventListener('wheel', this.boundPreventDefault, options);\n window.addEventListener('mousewheel', this.boundPreventDefault, options);\n window.addEventListener('scroll', this.boundPreventDefault, options);\n window.addEventListener('DOMMouseScroll', this.boundPreventDefault, options);\n }\n }, (config.animationDuration ?? 0) + 10);\n }\n\n public enableScroll(usageId: string, extreme_overflow?: boolean): void {\n if (!this.activeLocks.has(usageId)) {\n return;\n }\n\n this.activeLocks.delete(usageId);\n\n if (this.activeLocks.size > 0) {\n return;\n }\n\n this.updateStateAndCleanup(extreme_overflow);\n }\n\n private updateStateAndCleanup(extreme_overflow?: boolean): void {\n this._isScrollDisabled.set(false);\n\n document.body.style.removeProperty('overflow');\n\n if (this.previousBodyPadding !== null) {\n if (this.previousBodyPadding) {\n document.body.style.setProperty('padding-right', this.previousBodyPadding);\n } else {\n document.body.style.removeProperty('padding-right');\n }\n this.previousBodyPadding = null;\n }\n\n document.body.removeEventListener('touchmove', this.boundHandleTouchMove);\n document.body.style.removeProperty('touch-action');\n\n if (extreme_overflow !== false) {\n window.removeEventListener('wheel', this.boundPreventDefault);\n window.removeEventListener('mousewheel', this.boundPreventDefault);\n window.removeEventListener('scroll', this.boundPreventDefault);\n window.removeEventListener('DOMMouseScroll', this.boundPreventDefault);\n }\n }\n\n private handleTouchMove(event: Event): void {\n const targetNode = event.target as Node;\n const currentConfiguration = this.activeConfig();\n\n if (!this.isAllowedToScroll(targetNode) && (currentConfiguration === null || currentConfiguration?.handleTouchInput !== false)) {\n if (currentConfiguration === null || currentConfiguration?.mobileOnlyTouchPrevention !== true ||\n (currentConfiguration?.mobileOnlyTouchPrevention === true && ((!this.deviceTypeService.getDeviceState().isMobile || !this.deviceTypeService.getDeviceState().isTablet)\n && (this.windowDimensions().width < this.windowDimensionsService.breakpoints.sm)))) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n }\n\n private isAllowedToScroll(targetNode: Node): boolean {\n const currentConfiguration = this.activeConfig();\n\n if (!currentConfiguration?.allowTouchInputOn || currentConfiguration.allowTouchInputOn.length === 0) { return true; }\n\n if (currentConfiguration.allowTouchInputOn.length === undefined) {\n return (currentConfiguration.allowTouchInputOn as unknown as Element).contains(targetNode);\n }\n\n for (const element of currentConfiguration.allowTouchInputOn) {\n if (element.contains(targetNode)) {\n return true;\n }\n }\n\n return false;\n }\n\n private preventDefault(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n }\n}","import { Injectable, OnDestroy, inject, signal, PLATFORM_ID, computed } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { DeviceTheme } from '../types/device.types';\nimport { toObservable } from '@angular/core/rxjs-interop';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ThemingService implements OnDestroy {\n private readonly platformId = inject(PLATFORM_ID);\n private readonly isBrowser = isPlatformBrowser(this.platformId);\n\n private readonly _systemTheme = signal<DeviceTheme>(this.detectInitialSystemTheme());\n \n private readonly _applicationTheme = signal<DeviceTheme | null>(null);\n\n public readonly systemTheme = this._systemTheme.asReadonly();\n public readonly applicationTheme = this._applicationTheme.asReadonly();\n \n public readonly activeTheme = computed(() => this.applicationTheme() ?? this.systemTheme());\n\n private mediaQueryList?: MediaQueryList;\n private mediaQueryListener?: (event: MediaQueryListEvent) => void;\n\n constructor() {\n if (this.isBrowser) {\n this.initSystemThemeListener();\n }\n }\n\n public ngOnDestroy(): void {\n if (this.mediaQueryList && this.mediaQueryListener) {\n this.mediaQueryList.removeEventListener('change', this.mediaQueryListener);\n }\n }\n\n public setApplicationTheme(theme: DeviceTheme): void {\n this._applicationTheme.set(theme);\n }\n\n public getSystemTheme$() {\n return toObservable(this._systemTheme);\n }\n\n public getApplicationTheme$() {\n return toObservable(this._applicationTheme);\n }\n\n private detectInitialSystemTheme(): DeviceTheme {\n if (!this.isBrowser) return 'light'; \n return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n }\n\n private initSystemThemeListener(): void {\n this.mediaQueryList = window.matchMedia('(prefers-color-scheme: dark)');\n \n this.mediaQueryListener = (event: MediaQueryListEvent) => {\n this._systemTheme.set(event.matches ? 'dark' : 'light');\n };\n\n this.mediaQueryList.addEventListener('change', this.mediaQueryListener);\n }\n}","export const SCROLL_LOCK_INSTANCE_IDENTIFIER = 'scroll_lock_instance_';","export function uuidv4() {\n return \"10000000-1000-4000-8000-100000000000\".replace(/[018]/g, (c) => (+c ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (+c / 4)))).toString(16));\n}","/*\n * Public API Surface of blocks-core\n */\n\nexport * from './lib/services/device-type.service';\nexport * from './lib/services/scroll-lock.service';\nexport * from './lib/services/window-dimension.service';\nexport * from './lib/services/theming.service';\n\nexport * from './lib/enums/desktop-os.enum';\nexport * from './lib/enums/mobile-os.enum';\n\nexport * from './lib/interfaces/device-state.interface';\nexport * from './lib/interfaces/scroll-lock-config.interface';\nexport * from './lib/interfaces/window-dimensions.interface';\n\nexport * from './lib/constants/window-dimension.constants';\nexport * from './lib/constants/scroll-lock.constants';\n\nexport * from './lib/types/device.types';\n\nexport * from './lib/helpers/uui4';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;IAAY;AAAZ,CAAA,UAAY,SAAS,EAAA;AACjB,IAAA,SAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,SAAA,CAAA,OAAA,CAAA,GAAA,QAAgB;AAChB,IAAA,SAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,SAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,SAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACvB,CAAC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AA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,cAFb,MAAM,EAAA,CAAA;;2FAEP,cAAc,EAAA,UAAA,EAAA,CAAA;kBAH1B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACPM,MAAM,+BAA+B,GAAG;;SCA/B,MAAM,GAAA;IAClB,OAAO,sCAAsC,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,eAAe,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC;AACjK;;ACFA;;AAEG;;ACFH;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,158 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { OnDestroy } from '@angular/core';
|
|
3
|
+
import * as rxjs from 'rxjs';
|
|
4
|
+
|
|
5
|
+
declare enum DesktopOS {
|
|
6
|
+
Linux = "linux",
|
|
7
|
+
MacOS = "mac_os",
|
|
8
|
+
Unix = "unix",
|
|
9
|
+
Unknown = "unknown",
|
|
10
|
+
Windows = "windows"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare enum MobileOS {
|
|
14
|
+
Android = "android",
|
|
15
|
+
iOS = "ios",
|
|
16
|
+
Unknown = "unknown",
|
|
17
|
+
WindowsPhone = "Windows Phone"
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
interface DeviceState {
|
|
21
|
+
isDesktop: boolean;
|
|
22
|
+
desktopOS: DesktopOS | undefined;
|
|
23
|
+
isWindowsDesktop: boolean;
|
|
24
|
+
isLinuxOrUnixDesktop: boolean;
|
|
25
|
+
isMobile: boolean;
|
|
26
|
+
mobileOS: MobileOS | undefined;
|
|
27
|
+
isAndroidDevice: boolean;
|
|
28
|
+
isAppleDevice: boolean;
|
|
29
|
+
isUnknownMobileDevice: boolean;
|
|
30
|
+
isTablet: boolean;
|
|
31
|
+
isLandscapeOrientation: () => boolean;
|
|
32
|
+
isPortraitOrientation: () => boolean;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
declare class DeviceTypeService {
|
|
36
|
+
private userAgent;
|
|
37
|
+
private isDesktopDevice;
|
|
38
|
+
private supportedScreenOrientation;
|
|
39
|
+
private safariScreenOrientation;
|
|
40
|
+
private initialScreenOrientation;
|
|
41
|
+
private screenOrientation;
|
|
42
|
+
constructor();
|
|
43
|
+
private isMobileDevice;
|
|
44
|
+
private isTabletDevice;
|
|
45
|
+
isLandscapeOrientation(): boolean;
|
|
46
|
+
isPortraitOrientation(): boolean;
|
|
47
|
+
private getMobileOS;
|
|
48
|
+
private getDesktopOS;
|
|
49
|
+
private getDeviceOS;
|
|
50
|
+
getDeviceState(): DeviceState;
|
|
51
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DeviceTypeService, never>;
|
|
52
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<DeviceTypeService>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
interface IScrollLockConfig {
|
|
56
|
+
allowTouchInputOn?: Element[];
|
|
57
|
+
handleExtremeOverflow?: boolean;
|
|
58
|
+
animationDuration?: number;
|
|
59
|
+
handleTouchInput?: boolean;
|
|
60
|
+
mobileOnlyTouchPrevention?: boolean;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
declare class ScrollLockService implements OnDestroy {
|
|
64
|
+
private deviceTypeService;
|
|
65
|
+
private windowDimensionsService;
|
|
66
|
+
private activeLocks;
|
|
67
|
+
private _isScrollDisabled;
|
|
68
|
+
readonly isScrollDisabled: _angular_core.Signal<boolean>;
|
|
69
|
+
private previousBodyPadding;
|
|
70
|
+
private activeConfig;
|
|
71
|
+
private windowDimensions;
|
|
72
|
+
private boundHandleTouchMove;
|
|
73
|
+
private boundPreventDefault;
|
|
74
|
+
constructor();
|
|
75
|
+
ngOnDestroy(): void;
|
|
76
|
+
disableScroll(usageId: string, config: IScrollLockConfig): void;
|
|
77
|
+
enableScroll(usageId: string, extreme_overflow?: boolean): void;
|
|
78
|
+
private updateStateAndCleanup;
|
|
79
|
+
private handleTouchMove;
|
|
80
|
+
private isAllowedToScroll;
|
|
81
|
+
private preventDefault;
|
|
82
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ScrollLockService, never>;
|
|
83
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ScrollLockService>;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
interface WindowDimensions {
|
|
87
|
+
width: number;
|
|
88
|
+
height: number;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
declare class WindowDimensionsService {
|
|
92
|
+
private readonly ngZone;
|
|
93
|
+
private readonly platformId;
|
|
94
|
+
private readonly isBrowser;
|
|
95
|
+
private readonly _dimensions;
|
|
96
|
+
readonly dimensions: _angular_core.Signal<WindowDimensions>;
|
|
97
|
+
readonly isMobile: _angular_core.Signal<boolean>;
|
|
98
|
+
readonly isTablet: _angular_core.Signal<boolean>;
|
|
99
|
+
readonly isDesktop: _angular_core.Signal<boolean>;
|
|
100
|
+
readonly breakpoints: {
|
|
101
|
+
readonly xs: 360;
|
|
102
|
+
readonly sm: 640;
|
|
103
|
+
readonly md: 768;
|
|
104
|
+
readonly lg: 1024;
|
|
105
|
+
readonly xl: 1280;
|
|
106
|
+
readonly '2xl': 1536;
|
|
107
|
+
readonly '3xl': 1920;
|
|
108
|
+
readonly '4xl': 2560;
|
|
109
|
+
};
|
|
110
|
+
constructor();
|
|
111
|
+
private getCurrentDimensions;
|
|
112
|
+
private initResizeListener;
|
|
113
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WindowDimensionsService, never>;
|
|
114
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<WindowDimensionsService>;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
type DeviceTheme = "light" | "dark";
|
|
118
|
+
type DeviceOS = DesktopOS | MobileOS;
|
|
119
|
+
type DeviceOrientationType = 'portrait-primary' | 'landscape-primary' | 'portrait-secondary' | 'landscape-secondary';
|
|
120
|
+
|
|
121
|
+
declare class ThemingService implements OnDestroy {
|
|
122
|
+
private readonly platformId;
|
|
123
|
+
private readonly isBrowser;
|
|
124
|
+
private readonly _systemTheme;
|
|
125
|
+
private readonly _applicationTheme;
|
|
126
|
+
readonly systemTheme: _angular_core.Signal<DeviceTheme>;
|
|
127
|
+
readonly applicationTheme: _angular_core.Signal<DeviceTheme | null>;
|
|
128
|
+
readonly activeTheme: _angular_core.Signal<DeviceTheme>;
|
|
129
|
+
private mediaQueryList?;
|
|
130
|
+
private mediaQueryListener?;
|
|
131
|
+
constructor();
|
|
132
|
+
ngOnDestroy(): void;
|
|
133
|
+
setApplicationTheme(theme: DeviceTheme): void;
|
|
134
|
+
getSystemTheme$(): rxjs.Observable<DeviceTheme>;
|
|
135
|
+
getApplicationTheme$(): rxjs.Observable<DeviceTheme | null>;
|
|
136
|
+
private detectInitialSystemTheme;
|
|
137
|
+
private initSystemThemeListener;
|
|
138
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ThemingService, never>;
|
|
139
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ThemingService>;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
declare const BREAKPOINTS: {
|
|
143
|
+
readonly xs: 360;
|
|
144
|
+
readonly sm: 640;
|
|
145
|
+
readonly md: 768;
|
|
146
|
+
readonly lg: 1024;
|
|
147
|
+
readonly xl: 1280;
|
|
148
|
+
readonly '2xl': 1536;
|
|
149
|
+
readonly '3xl': 1920;
|
|
150
|
+
readonly '4xl': 2560;
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
declare const SCROLL_LOCK_INSTANCE_IDENTIFIER = "scroll_lock_instance_";
|
|
154
|
+
|
|
155
|
+
declare function uuidv4(): string;
|
|
156
|
+
|
|
157
|
+
export { BREAKPOINTS, DesktopOS, DeviceTypeService, MobileOS, SCROLL_LOCK_INSTANCE_IDENTIFIER, ScrollLockService, ThemingService, WindowDimensionsService, uuidv4 };
|
|
158
|
+
export type { DeviceOS, DeviceOrientationType, DeviceState, DeviceTheme, IScrollLockConfig, WindowDimensions };
|