@filip.mazev/blocks-core 0.0.4 → 0.0.6

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/README.md CHANGED
@@ -60,6 +60,7 @@ Usage:
60
60
  @include respond-down(sm) {
61
61
  display: none;
62
62
  }
63
+ }
63
64
  ```
64
65
 
65
66
  ## Core Services
@@ -70,12 +71,16 @@ Bridges the gap between CSS media queries and TypeScript logic. It provides reac
70
71
 
71
72
  ```typescript
72
73
  export class MyComponent {
73
- constructor(private windowService: WindowDimensionsService) {
74
- // Reactive stream
75
- this.windowService.getWindowDimensions$().subscribe(dims => {
76
- if (dims.width < dims.threshold_sm) {
77
- console.log('Mobile View');
78
- }
74
+ protected windowDimensionsService = inject(WindowDimensionsService);
75
+
76
+ protected windowDimensions = this.windowDimensionsService.dimensions;
77
+ protected breakpoints = this.windowDimensionsService.breakpoints;
78
+
79
+ constructor() {
80
+ effect(() => {
81
+ const width = this.windowDimensions().width;
82
+ const isOnSmallScreen = width < this.breakpoints.sm;
83
+ // handle logic for small screen for example
79
84
  });
80
85
  }
81
86
  }
@@ -122,17 +127,6 @@ this.scrollLockService.disableScroll({
122
127
  this.scrollLockService.enableScroll();
123
128
  ```
124
129
 
125
- ### `UiActionsService`
126
-
127
- Common UI utility methods.
128
-
129
- ### `TextFormattingService`
130
-
131
- Helper methods for string manipulation, such as:
132
-
133
- * `generateNameCopy`: Generates unique names for duplicated items (e.g., "Item (Copy)", "Item (Copy 2)").
134
- * `formattedDateString`: Converts Date objects or strings into a standardized locale date string.
135
-
136
130
  ## Installation
137
131
 
138
132
  To use Blocks Core, install the package and ensure the SCSS partials are accessible to your build pipeline.
@@ -1,6 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, inject } from '@angular/core';
3
- import { BehaviorSubject, ReplaySubject } from 'rxjs';
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';
4
7
 
5
8
  var DesktopOS;
6
9
  (function (DesktopOS) {
@@ -22,6 +25,15 @@ var MobileOS;
22
25
  class DeviceTypeService {
23
26
  userAgent = navigator.userAgent || navigator.vendor || window.opera || undefined;
24
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
+ }
25
37
  isMobileDevice() {
26
38
  const regexs = [/(Android)(.+)(Mobile)/i, /BlackBerry/i, /iPhone|iPod/i, /Opera Mini/i, /IEMobile/i];
27
39
  return regexs.some(b => this.userAgent.match(b) !== null);
@@ -30,6 +42,12 @@ class DeviceTypeService {
30
42
  const regex = /(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/;
31
43
  return regex.test(this.userAgent.toLowerCase());
32
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
+ }
33
51
  getMobileOS() {
34
52
  if (this.isMobileDevice()) {
35
53
  if (/windows phone/i.test(this.userAgent))
@@ -61,21 +79,6 @@ class DeviceTypeService {
61
79
  getDeviceOS() {
62
80
  return this.getMobileOS() ?? this.getDesktopOS();
63
81
  }
64
- supportedScreenOrientation = (screen?.orientation || {}).type ?? screen.mozOrientation ?? screen.msOrientation;
65
- safariScreenOrientation = !screen?.orientation && matchMedia('(orientation: portrait)').matches ? 'portrait-primary' : 'landscape-primary';
66
- initialScreenOrientation = this.supportedScreenOrientation ?? this.safariScreenOrientation ?? 'portrait-primary';
67
- screenOrientation = this.initialScreenOrientation;
68
- constructor() {
69
- if (screen.orientation) {
70
- screen.orientation.addEventListener('change', (ev) => (this.screenOrientation = (ev.target ?? {}).type));
71
- }
72
- }
73
- isLandscapeOrientation() {
74
- return ['landscape-primary', 'landscape-secondary'].includes(this.screenOrientation);
75
- }
76
- isPortraitOrientation() {
77
- return ['portrait-primary', 'portrait-secondary'].includes(this.screenOrientation);
78
- }
79
82
  getDeviceState() {
80
83
  const isDesktop = this.isDesktopDevice;
81
84
  const isMobile = this.isMobileDevice();
@@ -112,31 +115,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
112
115
  }]
113
116
  }], ctorParameters: () => [] });
114
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
+
115
129
  class WindowDimensionsService {
116
- windowDimensionsSubject = new BehaviorSubject(this.getWindowDimensions());
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;
117
139
  constructor() {
118
- this.handleResize();
119
- window.addEventListener('resize', this.handleResize.bind(this));
140
+ this.initResizeListener();
120
141
  }
121
- getWindowDimensions() {
142
+ getCurrentDimensions() {
143
+ if (!this.isBrowser) {
144
+ return { width: 0, height: 0 };
145
+ }
122
146
  return {
123
147
  width: window.innerWidth,
124
148
  height: window.innerHeight,
125
- threshold_xs: 360,
126
- threshold_sm: 640,
127
- threshold_md: 768,
128
- threshold_lg: 1024,
129
- threshold_xl: 1280,
130
- threshold_2xl: 1536,
131
- threshold_3xl: 1920,
132
- threshold_4xl: 2560,
133
149
  };
134
150
  }
135
- handleResize() {
136
- this.windowDimensionsSubject.next(this.getWindowDimensions());
137
- }
138
- getWindowDimensions$() {
139
- return this.windowDimensionsSubject.asObservable();
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
+ });
140
163
  }
141
164
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: WindowDimensionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
142
165
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: WindowDimensionsService, providedIn: 'root' });
@@ -152,15 +175,12 @@ const SCROLL_LOCK_INSTANCE_IDENTIFIER = 'scroll_lock_instance_';
152
175
 
153
176
  class ScrollLockService {
154
177
  deviceTypeService = inject(DeviceTypeService);
155
- windowDimensionSerivce = inject(WindowDimensionsService);
178
+ windowDimensionsService = inject(WindowDimensionsService);
156
179
  instanceId;
157
180
  configurationInstances = new Map();
158
- windowDimensions = {};
181
+ windowDimensions = this.windowDimensionsService.dimensions;
159
182
  constructor() {
160
- this.instanceId = SCROLL_LOCK_INSTANCE_IDENTIFIER + Math.random().toString(36).substring(2, 9);
161
- this.windowDimensionSerivce.getWindowDimensions$().subscribe((dimensions) => {
162
- this.windowDimensions = dimensions;
163
- });
183
+ this.instanceId = SCROLL_LOCK_INSTANCE_IDENTIFIER + uuidv4();
164
184
  }
165
185
  ngOnDestroy() {
166
186
  this.enableScroll();
@@ -233,7 +253,7 @@ class ScrollLockService {
233
253
  if (!this.isAllowedToScroll(targetNode) && (currentConfiguration === null || currentConfiguration?.handleTouchInput !== false)) {
234
254
  if (currentConfiguration === null || currentConfiguration?.mobileOnlyTouchPrevention !== true ||
235
255
  (currentConfiguration?.mobileOnlyTouchPrevention === true && ((!this.deviceTypeService.getDeviceState().isMobile || !this.deviceTypeService.getDeviceState().isTablet)
236
- && (this.windowDimensions.width < this.windowDimensions.threshold_sm)))) {
256
+ && (this.windowDimensions().width < this.windowDimensionsService.breakpoints.sm)))) {
237
257
  event.preventDefault();
238
258
  event.stopPropagation();
239
259
  }
@@ -268,100 +288,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
268
288
  }]
269
289
  }], ctorParameters: () => [] });
270
290
 
271
- const ITEM_COPY_DEFAULT_SUFFIX = "Copy";
272
-
273
- class TextFormattingService {
274
- constructor() { }
275
- generateNameCopy(originalName, existingNames = undefined, copySuffix = ITEM_COPY_DEFAULT_SUFFIX) {
276
- const existingNamesToLower = existingNames?.map(item => item.toLowerCase()) ?? [];
277
- let newName = `${originalName} (Copy)`;
278
- let copyIndex = 2;
279
- while (existingNamesToLower.includes(newName.toLowerCase())) {
280
- newName = `${originalName} (${copySuffix} ${copyIndex++})`;
281
- }
282
- return newName;
283
- }
284
- formattedDateString(date) {
285
- if (!date)
286
- return undefined;
287
- const dateObj = (date instanceof Date) ? date : new Date(date);
288
- return dateObj.toLocaleDateString(undefined, {
289
- year: 'numeric',
290
- month: 'short',
291
- day: 'numeric',
292
- });
293
- }
294
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: TextFormattingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
295
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: TextFormattingService, providedIn: 'root' });
296
- }
297
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: TextFormattingService, decorators: [{
298
- type: Injectable,
299
- args: [{
300
- providedIn: 'root'
301
- }]
302
- }], ctorParameters: () => [] });
303
-
304
- class UiActionsService {
305
- downloadFile(data, filename, mimeType) {
306
- const blob = new Blob([data], { type: mimeType });
307
- const url = window.URL.createObjectURL(blob);
308
- const a = document.createElement('a');
309
- a.href = url;
310
- a.download = filename;
311
- document.body.appendChild(a);
312
- a.click();
313
- document.body.removeChild(a);
314
- window.URL.revokeObjectURL(url);
315
- }
316
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiActionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
317
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiActionsService, providedIn: 'root' });
318
- }
319
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiActionsService, decorators: [{
320
- type: Injectable,
321
- args: [{
322
- providedIn: 'root'
323
- }]
324
- }] });
325
-
326
291
  class ThemingService {
292
+ platformId = inject(PLATFORM_ID);
293
+ isBrowser = isPlatformBrowser(this.platformId);
294
+ _systemTheme = signal(this.detectInitialSystemTheme(), ...(ngDevMode ? [{ debugName: "_systemTheme" }] : []));
295
+ _applicationTheme = signal(null, ...(ngDevMode ? [{ debugName: "_applicationTheme" }] : []));
296
+ systemTheme = this._systemTheme.asReadonly();
297
+ applicationTheme = this._applicationTheme.asReadonly();
298
+ activeTheme = computed(() => this.applicationTheme() ?? this.systemTheme(), ...(ngDevMode ? [{ debugName: "activeTheme" }] : []));
327
299
  mediaQueryList;
328
300
  mediaQueryListener;
329
- applicationThemeSubject = new ReplaySubject(1);
330
- systemThemeSubject = new BehaviorSubject(this.detectSystemTheme());
331
301
  constructor() {
332
- this.mediaQueryList = window.matchMedia('(prefers-color-scheme: dark)');
333
- this.createSubscription();
302
+ if (this.isBrowser) {
303
+ this.initSystemThemeListener();
304
+ }
334
305
  }
335
306
  ngOnDestroy() {
336
- if (this.mediaQueryListener) {
307
+ if (this.mediaQueryList && this.mediaQueryListener) {
337
308
  this.mediaQueryList.removeEventListener('change', this.mediaQueryListener);
338
309
  }
339
310
  }
340
- createSubscription() {
341
- this.handleSystemThemeChange(this.mediaQueryList);
342
- this.mediaQueryListener = (event) => this.handleSystemThemeChange(event);
343
- this.mediaQueryList.addEventListener('change', this.mediaQueryListener);
344
- }
345
- handleSystemThemeChange(eventOrList) {
346
- const isDark = eventOrList.matches;
347
- const theme = isDark ? 'dark' : 'light';
348
- this.systemThemeSubject.next(theme);
311
+ setApplicationTheme(theme) {
312
+ this._applicationTheme.set(theme);
349
313
  }
350
- detectSystemTheme() {
351
- const isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches;
352
- return isDarkMode ? 'dark' : 'light';
314
+ getSystemTheme$() {
315
+ return toObservable(this._systemTheme);
353
316
  }
354
317
  getApplicationTheme$() {
355
- return this.applicationThemeSubject.asObservable();
356
- }
357
- getSystemTheme$() {
358
- return this.systemThemeSubject.asObservable();
318
+ return toObservable(this._applicationTheme);
359
319
  }
360
- getSystemTheme() {
361
- return this.systemThemeSubject.value;
320
+ detectInitialSystemTheme() {
321
+ if (!this.isBrowser)
322
+ return 'light';
323
+ return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
362
324
  }
363
- setApplicationTheme(theme) {
364
- this.applicationThemeSubject.next(theme);
325
+ initSystemThemeListener() {
326
+ this.mediaQueryList = window.matchMedia('(prefers-color-scheme: dark)');
327
+ this.mediaQueryListener = (event) => {
328
+ this._systemTheme.set(event.matches ? 'dark' : 'light');
329
+ };
330
+ this.mediaQueryList.addEventListener('change', this.mediaQueryListener);
365
331
  }
366
332
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: ThemingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
367
333
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: ThemingService, providedIn: 'root' });
@@ -385,5 +351,5 @@ function uuidv4() {
385
351
  * Generated bundle index. Do not edit.
386
352
  */
387
353
 
388
- export { DesktopOS, DeviceTypeService, ITEM_COPY_DEFAULT_SUFFIX, MobileOS, ScrollLockService, TextFormattingService, ThemingService, UiActionsService, WindowDimensionsService, uuidv4 };
354
+ export { DesktopOS, DeviceTypeService, MobileOS, ScrollLockService, ThemingService, WindowDimensionsService, uuidv4 };
389
355
  //# sourceMappingURL=filip.mazev-blocks-core.mjs.map
@@ -1 +1 @@
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/services/window-dimension.service.ts","../../../projects/blocks-core/src/lib/constants/scroll-lock.constants.ts","../../../projects/blocks-core/src/lib/services/scroll-lock.service.ts","../../../projects/blocks-core/src/lib/constants/ui-services-common.consants.ts","../../../projects/blocks-core/src/lib/services/text-formatting.service.ts","../../../projects/blocks-core/src/lib/services/ui-actions.service.ts","../../../projects/blocks-core/src/lib/services/theming.service.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 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 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 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 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 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 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","import { Injectable } from '@angular/core';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { WindowDimensions } from '../interfaces/window-dimensions.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class WindowDimensionsService {\n private windowDimensionsSubject = new BehaviorSubject<WindowDimensions>(\n this.getWindowDimensions()\n );\n constructor() {\n this.handleResize();\n window.addEventListener('resize', this.handleResize.bind(this));\n }\n\n public getWindowDimensions(): WindowDimensions {\n return {\n width: window.innerWidth,\n height: window.innerHeight,\n threshold_xs: 360,\n threshold_sm: 640,\n threshold_md: 768,\n threshold_lg: 1024,\n threshold_xl: 1280,\n threshold_2xl: 1536,\n threshold_3xl: 1920,\n threshold_4xl: 2560,\n };\n }\n\n private handleResize(): void {\n this.windowDimensionsSubject.next(this.getWindowDimensions());\n }\n\n public getWindowDimensions$(): Observable<WindowDimensions> {\n return this.windowDimensionsSubject.asObservable();\n }\n}\n","export const SCROLL_LOCK_INSTANCE_IDENTIFIER = 'scroll_lock_instance_';","import { Injectable, inject } from '@angular/core';\nimport { DeviceTypeService } from './device-type.service';\nimport { WindowDimensionsService } from './window-dimension.service';\nimport { IScrollLockConfig } from '../interfaces/scroll-lock-config.interface';\nimport { WindowDimensions } from '../interfaces/window-dimensions.interface';\nimport { SCROLL_LOCK_INSTANCE_IDENTIFIER } from '../constants/scroll-lock.constants';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ScrollLockService {\n private deviceTypeService = inject(DeviceTypeService);\n private windowDimensionSerivce = inject(WindowDimensionsService);\n\n private instanceId: string;\n\n private configurationInstances: Map<string, IScrollLockConfig> = new Map<string, IScrollLockConfig>();\n private windowDimensions: WindowDimensions = {} as WindowDimensions;\n\n constructor() {\n this.instanceId = SCROLL_LOCK_INSTANCE_IDENTIFIER + Math.random().toString(36).substring(2, 9);\n this.windowDimensionSerivce.getWindowDimensions$().subscribe((dimensions) => {\n this.windowDimensions = dimensions;\n });\n }\n\n public ngOnDestroy(): void {\n this.enableScroll();\n }\n\n public disableScroll(config: IScrollLockConfig): void {\n document.body.style.setProperty('overflow', 'hidden', 'important');\n\n const documentWidth = document.documentElement.clientWidth;\n const windowWidth = window.innerWidth;\n const scrollBarWidth = windowWidth - documentWidth;\n document.body.style.paddingRight = scrollBarWidth + 'px';\n document.body.style.setProperty('padding-right', scrollBarWidth + 'px', 'important');\n\n if (config.handleTouchInput !== false) { document.body.style.setProperty('touch-action', 'none', 'important'); }\n\n this.configurationInstances.set(this.instanceId, config);\n\n if (config.mainContainer !== undefined && config.mainContainer.parentElement !== null) {\n let currentNode = config.mainContainer.parentElement as HTMLElement | null;\n while (currentNode !== null) {\n currentNode.style.setProperty('overflow', 'hidden', 'important');\n\n if (config.handleTouchInput !== false) {\n currentNode.addEventListener('touchmove', (event) => this.handleTouchMove(event), { passive: false });\n currentNode.style.setProperty('touch-action', 'none', 'important');\n }\n\n currentNode = currentNode.parentElement;\n }\n }\n\n setTimeout(() => {\n if (config.handleTouchInput !== false) {\n document.body.addEventListener('touchmove', (event) => this.handleTouchMove(event), { passive: false });\n }\n\n if (config.handleExtremeOverflow !== false) {\n const options = { passive: false };\n\n window.addEventListener('wheel', this.preventDefault, options);\n window.addEventListener('mousewheel', this.preventDefault, options);\n window.addEventListener('scroll', this.preventDefault, options);\n window.addEventListener('DOMMouseScroll', this.preventDefault, options);\n }\n }, (config.animationDuration ?? 0) + 10);\n }\n\n public enableScroll(extreme_overflow?: boolean): void {\n document.body.style.removeProperty('overflow');\n document.body.style.removeProperty('padding-right');\n\n let currentConfiguration = this.configurationInstances.get(this.instanceId);\n\n if (currentConfiguration && currentConfiguration.handleTouchInput !== false) {\n document.body.removeEventListener('touchmove', this.handleTouchMove);\n document.body.style.removeProperty('touch-action');\n }\n\n if (currentConfiguration !== undefined && currentConfiguration.mainContainer !== undefined && currentConfiguration.mainContainer.parentElement !== null) {\n let currentNode = currentConfiguration.mainContainer.parentElement as HTMLElement | null;\n while (currentNode !== null) {\n currentNode.style.removeProperty('overflow');\n\n if (currentConfiguration.handleTouchInput !== false) {\n currentNode.removeEventListener('touchmove', this.preventDefault);\n currentNode.style.removeProperty('touch-action');\n }\n\n currentNode = currentNode.parentElement;\n }\n }\n\n this.configurationInstances.delete(this.instanceId);\n\n if (extreme_overflow !== false) {\n window.removeEventListener('wheel', this.preventDefault);\n window.removeEventListener('mousewheel', this.preventDefault);\n window.removeEventListener('scroll', this.preventDefault);\n window.removeEventListener('DOMMouseScroll', this.preventDefault);\n }\n }\n\n private handleTouchMove(event: Event): void {\n const targetNode = event.target as Node;\n const currentConfiguration = this.configurationInstances.get(this.instanceId);\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.windowDimensions.threshold_sm)))) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n }\n\n private isAllowedToScroll(targetNode: Node): boolean {\n const currentConfiguration = this.configurationInstances.get(this.instanceId);\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}\n","export const ITEM_COPY_DEFAULT_SUFFIX = \"Copy\";","import { Injectable } from \"@angular/core\";\nimport { ITEM_COPY_DEFAULT_SUFFIX } from \"../constants/ui-services-common.consants\";\n\n@Injectable({\n providedIn: 'root'\n})\nexport class TextFormattingService {\n\n constructor() { }\n\n public generateNameCopy(originalName: string, existingNames: string[] | undefined = undefined, copySuffix: string = ITEM_COPY_DEFAULT_SUFFIX): string {\n const existingNamesToLower = existingNames?.map(item => item.toLowerCase()) ?? [];\n\n let newName = `${originalName} (Copy)`;\n let copyIndex = 2;\n\n while (existingNamesToLower.includes(newName.toLowerCase())) {\n newName = `${originalName} (${copySuffix} ${copyIndex++})`;\n }\n\n return newName;\n }\n\n public formattedDateString(date: Date | string | undefined | null): string | undefined {\n if (!date) return undefined;\n\n const dateObj = (date instanceof Date) ? date : new Date(date);\n return dateObj.toLocaleDateString(undefined, {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n });\n }\n}","import { Injectable } from \"@angular/core\";\n\n@Injectable({\n providedIn: 'root'\n})\nexport class UiActionsService {\n\n public downloadFile(data: Blob, filename: string, mimeType: string): void {\n const blob = new Blob([data], { type: mimeType });\n const url = window.URL.createObjectURL(blob);\n const a = document.createElement('a');\n a.href = url;\n a.download = filename;\n document.body.appendChild(a);\n a.click();\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }\n}","import { Injectable, OnDestroy } from '@angular/core';\nimport { BehaviorSubject, Observable, ReplaySubject } from 'rxjs';\nimport { DeviceTheme } from '../types/device.types';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ThemingService implements OnDestroy {\n private readonly mediaQueryList: MediaQueryList;\n private mediaQueryListener?: (event: MediaQueryListEvent) => void;\n\n private applicationThemeSubject = new ReplaySubject<DeviceTheme>(1);\n private systemThemeSubject = new BehaviorSubject<DeviceTheme>(this.detectSystemTheme());\n \n constructor() {\n this.mediaQueryList = window.matchMedia('(prefers-color-scheme: dark)');\n this.createSubscription();\n }\n\n public ngOnDestroy(): void {\n if (this.mediaQueryListener) {\n this.mediaQueryList.removeEventListener('change', this.mediaQueryListener);\n }\n }\n\n private createSubscription(): void {\n this.handleSystemThemeChange(this.mediaQueryList);\n this.mediaQueryListener = (event: MediaQueryListEvent) => this.handleSystemThemeChange(event);\n this.mediaQueryList.addEventListener('change', this.mediaQueryListener);\n }\n\n private handleSystemThemeChange(eventOrList: MediaQueryList | MediaQueryListEvent) {\n const isDark = eventOrList.matches;\n const theme: DeviceTheme = isDark ? 'dark' : 'light';\n this.systemThemeSubject.next(theme);\n }\n\n private detectSystemTheme(): DeviceTheme {\n const isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches;\n return isDarkMode ? 'dark' : 'light';\n }\n\n public getApplicationTheme$(): Observable<DeviceTheme> {\n return this.applicationThemeSubject.asObservable();\n }\n\n public getSystemTheme$(): Observable<DeviceTheme> {\n return this.systemThemeSubject.asObservable();\n }\n\n public getSystemTheme(): DeviceTheme {\n return this.systemThemeSubject.value;\n }\n\n public setApplicationTheme(theme: DeviceTheme): void {\n this.applicationThemeSubject.next(theme);\n }\n}","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","/*\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/text-formatting.service';\nexport * from './lib/services/ui-actions.service';\nexport * from './lib/services/window-dimension.service';\nexport * from './lib/services/theming.service';\n\nexport * from './lib/constants/ui-services-common.consants';\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/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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1B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;SCNe,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;;;;"}
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/constants/scroll-lock.constants.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/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}","export const SCROLL_LOCK_INSTANCE_IDENTIFIER = 'scroll_lock_instance_';","import { Injectable, OnDestroy, inject } from '@angular/core';\nimport { DeviceTypeService } from './device-type.service';\nimport { WindowDimensionsService } from './window-dimension.service';\nimport { IScrollLockConfig } from '../interfaces/scroll-lock-config.interface';\nimport { SCROLL_LOCK_INSTANCE_IDENTIFIER } from '../constants/scroll-lock.constants';\nimport { uuidv4 } from '../../public-api';\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 instanceId: string;\n\n private configurationInstances: Map<string, IScrollLockConfig> = new Map<string, IScrollLockConfig>();\n private windowDimensions = this.windowDimensionsService.dimensions;\n\n constructor() {\n this.instanceId = SCROLL_LOCK_INSTANCE_IDENTIFIER + uuidv4();\n }\n\n public ngOnDestroy(): void {\n this.enableScroll();\n }\n\n public disableScroll(config: IScrollLockConfig): void {\n document.body.style.setProperty('overflow', 'hidden', 'important');\n\n const documentWidth = document.documentElement.clientWidth;\n const windowWidth = window.innerWidth;\n const scrollBarWidth = windowWidth - documentWidth;\n \n document.body.style.paddingRight = scrollBarWidth + 'px';\n document.body.style.setProperty('padding-right', scrollBarWidth + 'px', 'important');\n\n if (config.handleTouchInput !== false) { document.body.style.setProperty('touch-action', 'none', 'important'); }\n\n this.configurationInstances.set(this.instanceId, config);\n\n if (config.mainContainer !== undefined && config.mainContainer.parentElement !== null) {\n let currentNode = config.mainContainer.parentElement as HTMLElement | null;\n while (currentNode !== null) {\n currentNode.style.setProperty('overflow', 'hidden', 'important');\n\n if (config.handleTouchInput !== false) {\n currentNode.addEventListener('touchmove', (event) => this.handleTouchMove(event), { passive: false });\n currentNode.style.setProperty('touch-action', 'none', 'important');\n }\n\n currentNode = currentNode.parentElement;\n }\n }\n\n setTimeout(() => {\n if (config.handleTouchInput !== false) {\n document.body.addEventListener('touchmove', (event) => this.handleTouchMove(event), { passive: false });\n }\n\n if (config.handleExtremeOverflow !== false) {\n const options = { passive: false };\n\n window.addEventListener('wheel', this.preventDefault, options);\n window.addEventListener('mousewheel', this.preventDefault, options);\n window.addEventListener('scroll', this.preventDefault, options);\n window.addEventListener('DOMMouseScroll', this.preventDefault, options);\n }\n }, (config.animationDuration ?? 0) + 10);\n }\n\n public enableScroll(extreme_overflow?: boolean): void {\n document.body.style.removeProperty('overflow');\n document.body.style.removeProperty('padding-right');\n\n let currentConfiguration = this.configurationInstances.get(this.instanceId);\n\n if (currentConfiguration && currentConfiguration.handleTouchInput !== false) {\n document.body.removeEventListener('touchmove', this.handleTouchMove);\n document.body.style.removeProperty('touch-action');\n }\n\n if (currentConfiguration !== undefined && currentConfiguration.mainContainer !== undefined && currentConfiguration.mainContainer.parentElement !== null) {\n let currentNode = currentConfiguration.mainContainer.parentElement as HTMLElement | null;\n while (currentNode !== null) {\n currentNode.style.removeProperty('overflow');\n\n if (currentConfiguration.handleTouchInput !== false) {\n currentNode.removeEventListener('touchmove', this.preventDefault);\n currentNode.style.removeProperty('touch-action');\n }\n\n currentNode = currentNode.parentElement;\n }\n }\n\n this.configurationInstances.delete(this.instanceId);\n\n if (extreme_overflow !== false) {\n window.removeEventListener('wheel', this.preventDefault);\n window.removeEventListener('mousewheel', this.preventDefault);\n window.removeEventListener('scroll', this.preventDefault);\n window.removeEventListener('DOMMouseScroll', this.preventDefault);\n }\n }\n\n private handleTouchMove(event: Event): void {\n const targetNode = event.target as Node;\n const currentConfiguration = this.configurationInstances.get(this.instanceId);\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.configurationInstances.get(this.instanceId);\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}\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 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/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,EANW,SAAS,KAAT,SAAS,GAAA,EAAA,CAAA,CAAA;;ICAT;AAAZ,CAAA,UAAY,QAAQ,EAAA;AAChB,IAAA,QAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,QAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACX,IAAA,QAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,QAAA,CAAA,cAAA,CAAA,GAAA,eAA8B;AAClC,CAAC,EALW,QAAQ,KAAR,QAAQ,GAAA,EAAA,CAAA,CAAA;;MCSP,iBAAiB,CAAA;AACpB,IAAA,SAAS,GAAW,SAAS,CAAC,SAAS,IAAI,SAAS,CAAC,MAAM,IAAK,MAAc,CAAC,KAAK,IAAI,SAAS;AACjG,IAAA,eAAe,GAAY,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;AAE3E,IAAA,0BAA0B,GAAG,CAAC,MAAM,EAAE,WAAW,IAAI,EAAE,EAAE,IAAI,IAAK,MAAc,CAAC,cAAc,IAAK,MAAc,CAAC,aAAa;IAChI,uBAAuB,GAA0B,CAAC,MAAM,EAAE,WAAW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AA,CAAC;QAED,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,kBAAkB,CAAC;IACzE;uGArDW,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAd,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,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;;;SCPe,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,6 +1,6 @@
1
1
  {
2
2
  "name": "@filip.mazev/blocks-core",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "exports": {
5
5
  "./mixins": "./lib/styles/_mixins.scss",
6
6
  "./variables": "./lib/styles/_variables.scss",
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { OnDestroy } from '@angular/core';
3
- import { Observable } from 'rxjs';
3
+ import * as rxjs from 'rxjs';
4
4
 
5
5
  declare enum DesktopOS {
6
6
  Linux = "linux",
@@ -35,18 +35,18 @@ interface DeviceState {
35
35
  declare class DeviceTypeService {
36
36
  private userAgent;
37
37
  private isDesktopDevice;
38
- private isMobileDevice;
39
- private isTabletDevice;
40
- private getMobileOS;
41
- private getDesktopOS;
42
- private getDeviceOS;
43
38
  private supportedScreenOrientation;
44
39
  private safariScreenOrientation;
45
40
  private initialScreenOrientation;
46
41
  private screenOrientation;
47
42
  constructor();
43
+ private isMobileDevice;
44
+ private isTabletDevice;
48
45
  isLandscapeOrientation(): boolean;
49
46
  isPortraitOrientation(): boolean;
47
+ private getMobileOS;
48
+ private getDesktopOS;
49
+ private getDeviceOS;
50
50
  getDeviceState(): DeviceState;
51
51
  static ɵfac: i0.ɵɵFactoryDeclaration<DeviceTypeService, never>;
52
52
  static ɵprov: i0.ɵɵInjectableDeclaration<DeviceTypeService>;
@@ -61,9 +61,9 @@ interface IScrollLockConfig {
61
61
  mobileOnlyTouchPrevention?: boolean;
62
62
  }
63
63
 
64
- declare class ScrollLockService {
64
+ declare class ScrollLockService implements OnDestroy {
65
65
  private deviceTypeService;
66
- private windowDimensionSerivce;
66
+ private windowDimensionsService;
67
67
  private instanceId;
68
68
  private configurationInstances;
69
69
  private windowDimensions;
@@ -78,40 +78,33 @@ declare class ScrollLockService {
78
78
  static ɵprov: i0.ɵɵInjectableDeclaration<ScrollLockService>;
79
79
  }
80
80
 
81
- declare class TextFormattingService {
82
- constructor();
83
- generateNameCopy(originalName: string, existingNames?: string[] | undefined, copySuffix?: string): string;
84
- formattedDateString(date: Date | string | undefined | null): string | undefined;
85
- static ɵfac: i0.ɵɵFactoryDeclaration<TextFormattingService, never>;
86
- static ɵprov: i0.ɵɵInjectableDeclaration<TextFormattingService>;
87
- }
88
-
89
- declare class UiActionsService {
90
- downloadFile(data: Blob, filename: string, mimeType: string): void;
91
- static ɵfac: i0.ɵɵFactoryDeclaration<UiActionsService, never>;
92
- static ɵprov: i0.ɵɵInjectableDeclaration<UiActionsService>;
93
- }
94
-
95
81
  interface WindowDimensions {
96
- [x: string]: any;
97
82
  width: number;
98
83
  height: number;
99
- threshold_xs: number;
100
- threshold_sm: number;
101
- threshold_md: number;
102
- threshold_lg: number;
103
- threshold_xl: number;
104
- threshold_2xl: number;
105
- threshold_3xl: number;
106
- threshold_4xl: number;
107
84
  }
108
85
 
109
86
  declare class WindowDimensionsService {
110
- private windowDimensionsSubject;
87
+ private readonly ngZone;
88
+ private readonly platformId;
89
+ private readonly isBrowser;
90
+ private readonly _dimensions;
91
+ readonly dimensions: i0.Signal<WindowDimensions>;
92
+ readonly isMobile: i0.Signal<boolean>;
93
+ readonly isTablet: i0.Signal<boolean>;
94
+ readonly isDesktop: i0.Signal<boolean>;
95
+ readonly breakpoints: {
96
+ readonly xs: 360;
97
+ readonly sm: 640;
98
+ readonly md: 768;
99
+ readonly lg: 1024;
100
+ readonly xl: 1280;
101
+ readonly '2xl': 1536;
102
+ readonly '3xl': 1920;
103
+ readonly '4xl': 2560;
104
+ };
111
105
  constructor();
112
- getWindowDimensions(): WindowDimensions;
113
- private handleResize;
114
- getWindowDimensions$(): Observable<WindowDimensions>;
106
+ private getCurrentDimensions;
107
+ private initResizeListener;
115
108
  static ɵfac: i0.ɵɵFactoryDeclaration<WindowDimensionsService, never>;
116
109
  static ɵprov: i0.ɵɵInjectableDeclaration<WindowDimensionsService>;
117
110
  }
@@ -121,26 +114,27 @@ type DeviceOS = DesktopOS | MobileOS;
121
114
  type DeviceOrientationType = 'portrait-primary' | 'landscape-primary' | 'portrait-secondary' | 'landscape-secondary';
122
115
 
123
116
  declare class ThemingService implements OnDestroy {
124
- private readonly mediaQueryList;
117
+ private readonly platformId;
118
+ private readonly isBrowser;
119
+ private readonly _systemTheme;
120
+ private readonly _applicationTheme;
121
+ readonly systemTheme: i0.Signal<DeviceTheme>;
122
+ readonly applicationTheme: i0.Signal<DeviceTheme | null>;
123
+ readonly activeTheme: i0.Signal<DeviceTheme>;
124
+ private mediaQueryList?;
125
125
  private mediaQueryListener?;
126
- private applicationThemeSubject;
127
- private systemThemeSubject;
128
126
  constructor();
129
127
  ngOnDestroy(): void;
130
- private createSubscription;
131
- private handleSystemThemeChange;
132
- private detectSystemTheme;
133
- getApplicationTheme$(): Observable<DeviceTheme>;
134
- getSystemTheme$(): Observable<DeviceTheme>;
135
- getSystemTheme(): DeviceTheme;
136
128
  setApplicationTheme(theme: DeviceTheme): void;
129
+ getSystemTheme$(): rxjs.Observable<DeviceTheme>;
130
+ getApplicationTheme$(): rxjs.Observable<DeviceTheme | null>;
131
+ private detectInitialSystemTheme;
132
+ private initSystemThemeListener;
137
133
  static ɵfac: i0.ɵɵFactoryDeclaration<ThemingService, never>;
138
134
  static ɵprov: i0.ɵɵInjectableDeclaration<ThemingService>;
139
135
  }
140
136
 
141
- declare const ITEM_COPY_DEFAULT_SUFFIX = "Copy";
142
-
143
137
  declare function uuidv4(): string;
144
138
 
145
- export { DesktopOS, DeviceTypeService, ITEM_COPY_DEFAULT_SUFFIX, MobileOS, ScrollLockService, TextFormattingService, ThemingService, UiActionsService, WindowDimensionsService, uuidv4 };
139
+ export { DesktopOS, DeviceTypeService, MobileOS, ScrollLockService, ThemingService, WindowDimensionsService, uuidv4 };
146
140
  export type { DeviceOS, DeviceOrientationType, DeviceState, DeviceTheme, IScrollLockConfig, WindowDimensions };