@acorex/core 18.14.1-next.5 → 18.15.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,9 @@
1
- import { Injectable } from '@angular/core';
1
+ import { DOCUMENT } from '@angular/common';
2
+ import { inject, Injectable } from '@angular/core';
2
3
  import * as i0 from "@angular/core";
3
4
  export class AXFileService {
4
5
  constructor() {
6
+ this.document = inject(DOCUMENT);
5
7
  this.blobToBase64 = (blob) => {
6
8
  if (blob instanceof Blob) {
7
9
  return new Promise((resolve, reject) => {
@@ -21,16 +23,16 @@ export class AXFileService {
21
23
  choose(options) {
22
24
  return new Promise((resolve, reject) => {
23
25
  options = Object.assign({ multiple: false }, options);
24
- const input = document.createElement('input');
26
+ const input = this.document.createElement('input');
25
27
  input.style.display = 'none';
26
- document.body.appendChild(input);
28
+ this.document.body.appendChild(input);
27
29
  input.type = 'file';
28
30
  input.accept = options.accept || '';
29
31
  input.multiple = options.multiple || false;
30
32
  //
31
33
  const onError = (e) => {
32
34
  reject(e);
33
- document.body.removeChild(input);
35
+ this.document.body.removeChild(input);
34
36
  input.remove();
35
37
  input.removeEventListener('change', onChange);
36
38
  input.removeEventListener('error', onError);
@@ -38,7 +40,7 @@ export class AXFileService {
38
40
  //
39
41
  const onChange = () => {
40
42
  resolve(Array.from(input.files || []));
41
- document.body.removeChild(input);
43
+ this.document.body.removeChild(input);
42
44
  input.remove();
43
45
  input.removeEventListener('change', onChange);
44
46
  input.removeEventListener('error', onError);
@@ -71,4 +73,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
71
73
  providedIn: 'root',
72
74
  }]
73
75
  }] });
74
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsZS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb3JlL2ZpbGUvc3JjL2xpYi9maWxlLnNlcnZpY2UudHMiXSw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c2Uge1xuICAgICAgcmV0dXJuIFByb21pc2UucmVqZWN0KCdpbnB1dCBpcyBub3QgYmxvYicpO1xuICAgIH1cbiAgfTtcblxuICBwdWJsaWMgZ2V0U2l6ZShmaWxlOiBGaWxlIHwgQmxvYiB8IHN0cmluZykge1xuICAgIGlmICh0aGlzLmlzQmFzZTY0KGZpbGUgYXMgc3RyaW5nKSkge1xuICAgICAgcmV0dXJuIHRoaXMuZ2V0QmFzZTY0U2l6ZShmaWxlIGFzIHN0cmluZyk7XG4gICAgfVxuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIHB1YmxpYyBpc0Jhc2U2NChiYXNlNjQ6IHN0cmluZykge1xuICAgIGNvbnN0IHJlZ3ggPSAvW146XVxcdytcXC9bXFx3LStcXGQuXSsoPz07fCwpLztcbiAgICByZXR1cm4gcmVneC50ZXN0KGJhc2U2NCk7XG4gIH1cblxuICBwdWJsaWMgZ2V0QmFzZTY0U2l6ZShiYXNlNjQ6IHN0cmluZykge1xuICAgIHJldHVybiBhdG9iKGJhc2U2NC5zdWJzdHJpbmcoYmFzZTY0LmluZGV4T2YoJywnKSArIDEpKS5sZW5ndGg7XG4gIH1cbn1cbiJdfQ==
@@ -1,6 +1,10 @@
1
- import { Injectable } from '@angular/core';
1
+ import { DOCUMENT } from '@angular/common';
2
+ import { inject, Injectable } from '@angular/core';
2
3
  import * as i0 from "@angular/core";
3
4
  export class AXImageService {
5
+ constructor() {
6
+ this.document = inject(DOCUMENT);
7
+ }
4
8
  async resize(options) {
5
9
  options = Object.assign({ type: 'image/png', quality: 1 }, options);
6
10
  let image;
@@ -14,7 +18,7 @@ export class AXImageService {
14
18
  image = options.source;
15
19
  }
16
20
  // Resize the image
17
- const canvas = document.createElement('canvas');
21
+ const canvas = this.document.createElement('canvas');
18
22
  let width = image.width;
19
23
  let height = image.height;
20
24
  if (width > height) {
@@ -40,4 +44,4 @@ export class AXImageService {
40
44
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXImageService, decorators: [{
41
45
  type: Injectable
42
46
  }] });
43
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW1hZ2Uuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29yZS9pbWFnZS9zcmMvbGliL2ltYWdlLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQzs7QUFHM0MsTUFBTSxPQUFPLGNBQWM7SUFDekIsS0FBSyxDQUFDLE1BQU0sQ0FBQyxPQUtaO1FBQ0MsT0FBTyxHQUFHLE1BQU0sQ0FBQyxNQUFNLENBQUMsRUFBRSxJQUFJLEVBQUUsV0FBVyxFQUFFLE9BQU8sRUFBRSxDQUFDLEVBQUUsRUFBRSxPQUFPLENBQUMsQ0FBQztRQUVwRSxJQUFJLEtBQXVCLENBQUM7UUFDNUIsSUFBSSxPQUFPLENBQUMsTUFBTSxZQUFZLElBQUksRUFBRSxDQUFDO1lBQ25DLE1BQU0sQ0FBQyxHQUFHLElBQUksS0FBSyxFQUFFLENBQUM7WUFDdEIsQ0FBQyxDQUFDLEdBQUcsR0FBRyxHQUFHLENBQUMsZUFBZSxDQUFDLE9BQU8sQ0FBQyxNQUFNLENBQUMsQ0FBQztZQUM1QyxNQUFNLElBQUksT0FBTyxDQUFRLENBQUMsR0FBRyxFQUFFLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0FBQyxNQUFNLEdBQUcsR0FBRyxDQUFDLENBQUMsQ0FBQztZQUNwRCxLQUFLLEdBQUcsQ0FBQyxDQUFDO1FBQ1osQ0FBQzthQUFNLENBQUM7WUFDTixLQUFLLEdBQUcsT0FBTyxDQUFDLE1BQU0sQ0FBQztRQUN6QixDQUFDO1FBRUQsbUJBQW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WdlLndpZHRoO1xuICAgIGxldCBoZWlnaHQgPSBpbWFnZS5oZWlnaHQ7XG4gICAgaWYgKHdpZHRoID4gaGVpZ2h0KSB7XG4gICAgICBpZiAod2lkdGggPiBvcHRpb25zLm1heFNpemUpIHtcbiAgICAgICAgaGVpZ2h0ICo9IG9wdGlvbnMubWF4U2l6ZSAvIHdpZHRoO1xuICAgICAgICB3aWR0aCA9IG9wdGlvbnMubWF4U2l6ZTtcbiAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgaWYgKGhlaWdodCA+IG9wdGlvbnMubWF4U2l6ZSkge1xuICAgICAgICB3aWR0aCAqPSBvcHRpb25zLm1heFNpemUgLyBoZWlnaHQ7XG4gICAgICAgIGhlaWdodCA9IG9wdGlvbnMubWF4U2l6ZTtcbiAgICAgIH1cbiAgICB9XG4gICAgY2FudmFzLndpZHRoID0gd2lkdGg7XG4gICAgY2FudmFzLmhlaWdodCA9IGhlaWdodDtcbiAgICBjYW52YXMuZ2V0Q29udGV4dCgnMmQnKS5kcmF3SW1hZ2UoaW1hZ2UsIDAsIDAsIHdpZHRoLCBoZWlnaHQpO1xuICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSkgPT4gY2FudmFzLnRvQmxvYihyZXNvbHZlLCBvcHRpb25zLnR5cGUsIG9wdGlvbnMucXVhbGl0eSkpO1xuICB9XG59XG4iXX0=
@@ -1,5 +1,6 @@
1
- import { Injectable, signal } from '@angular/core';
2
- import { BehaviorSubject, Subject, fromEvent } from 'rxjs';
1
+ import { DOCUMENT } from '@angular/common';
2
+ import { inject, Injectable, signal } from '@angular/core';
3
+ import { BehaviorSubject, fromEvent, Subject } from 'rxjs';
3
4
  import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
4
5
  import * as i0 from "@angular/core";
5
6
  const isChrome = (win) => testUserAgent(win, /Chrome/i);
@@ -59,11 +60,11 @@ export const isServer = new Function('try {return this===global;}catch(e){return
59
60
  const matchMedia = (win, query) => {
60
61
  return win.matchMedia(query).matches;
61
62
  };
62
- const isSMScreen = (win) => matchMedia(win, '(max-width: 578px)');
63
+ const isSMScreen = (win) => matchMedia(win, '(max-width: 640px)');
63
64
  const isMDScreen = (win) => matchMedia(win, '(max-width: 768px)');
64
- const isLGScreen = (win) => matchMedia(win, '(max-width: 992px)');
65
- const isXLScreen = (win) => matchMedia(win, '(max-width: 1200px)');
66
- const is2XLScreen = (win) => matchMedia(win, '(max-width: 1440px)');
65
+ const isLGScreen = (win) => matchMedia(win, '(max-width: 1024px)');
66
+ const isXLScreen = (win) => matchMedia(win, '(max-width: 1280px)');
67
+ const is2XLScreen = (win) => matchMedia(win, '(max-width: 1536px)');
67
68
  const is3XLScreen = (win) => matchMedia(win, '(max-width: 1920px)');
68
69
  const is4XLScreen = (win) => matchMedia(win, '(max-width: 2560px)');
69
70
  const PLATFORMS_MAP = {
@@ -92,10 +93,12 @@ export class AXPlatformEvent {
92
93
  }
93
94
  export class AXPlatform {
94
95
  isDark() {
95
- return document.documentElement.classList.contains('ax-dark');
96
+ return this.document.documentElement.classList.contains('ax-dark');
96
97
  }
97
98
  isRtl() {
98
- return document.dir == 'rtl' || document.body.dir == 'rtl' || document.body.style.direction == 'rtl';
99
+ return (this.document.dir == 'rtl' ||
100
+ this.document.body.dir == 'rtl' ||
101
+ this.document.body.style.direction == 'rtl');
99
102
  }
100
103
  isLandscape() {
101
104
  return window.innerHeight < window.innerWidth;
@@ -115,13 +118,13 @@ export class AXPlatform {
115
118
  return (['SM', 'MD', 'LG', 'XL', '2XL', '3XL', '4XL'].find((name) => PLATFORMS_MAP[name](window) == true) || '5XL');
116
119
  }
117
120
  switchLightMode() {
118
- const _html = document.getElementsByTagName('html')[0];
121
+ const _html = this.document.getElementsByTagName('html')[0];
119
122
  _html.classList.remove('ax-dark');
120
123
  this.#setSystemTheme('light');
121
124
  return 'light';
122
125
  }
123
126
  switchDarkMode() {
124
- const _html = document.getElementsByTagName('html')[0];
127
+ const _html = this.document.getElementsByTagName('html')[0];
125
128
  _html.classList.add('ax-dark');
126
129
  this.#setSystemTheme('dark');
127
130
  return 'dark';
@@ -129,12 +132,12 @@ export class AXPlatform {
129
132
  switchSystemMode() {
130
133
  if (isBrowser()) {
131
134
  if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
132
- const _html = document.getElementsByTagName('html')[0];
135
+ const _html = this.document.getElementsByTagName('html')[0];
133
136
  _html.classList.add('ax-dark');
134
137
  this.#setSystemTheme('system-dark');
135
138
  }
136
139
  else {
137
- const _html = document.getElementsByTagName('html')[0];
140
+ const _html = this.document.getElementsByTagName('html')[0];
138
141
  _html.classList.remove('ax-dark');
139
142
  this.#setSystemTheme('system-light');
140
143
  }
@@ -159,7 +162,7 @@ export class AXPlatform {
159
162
  setFullHeightRatio() {
160
163
  if (isBrowser()) {
161
164
  try {
162
- document
165
+ this.document
163
166
  .querySelector(':root')
164
167
  ?.style.setProperty('--ax-vh', window.innerHeight / 100 + 'px');
165
168
  }
@@ -172,11 +175,11 @@ export class AXPlatform {
172
175
  if (this.themeMode() === 'system') {
173
176
  const themeMode = event.matches ? 'dark' : 'light';
174
177
  if (themeMode === 'dark') {
175
- const _html = document.getElementsByTagName('html')[0];
178
+ const _html = this.document.getElementsByTagName('html')[0];
176
179
  _html.classList.add('ax-dark');
177
180
  }
178
181
  else {
179
- const _html = document.getElementsByTagName('html')[0];
182
+ const _html = this.document.getElementsByTagName('html')[0];
180
183
  _html.classList.remove('ax-dark');
181
184
  }
182
185
  }
@@ -188,6 +191,7 @@ export class AXPlatform {
188
191
  this.scroll = new Subject();
189
192
  this.themeMode$ = new BehaviorSubject('system');
190
193
  this.themeMode = signal('system');
194
+ this.document = inject(DOCUMENT);
191
195
  if (isBrowser()) {
192
196
  this.detectDarkMode();
193
197
  this.detectOnResize();
@@ -220,7 +224,7 @@ export class AXPlatform {
220
224
  });
221
225
  }
222
226
  detectClickEvent() {
223
- document.addEventListener('click', (e) => {
227
+ this.document.addEventListener('click', (e) => {
224
228
  this.click.next({
225
229
  nativeEvent: e,
226
230
  source: this,
@@ -228,7 +232,7 @@ export class AXPlatform {
228
232
  }, true);
229
233
  }
230
234
  detectScrollEvent() {
231
- document.addEventListener('scroll', (e) => {
235
+ this.document.addEventListener('scroll', (e) => {
232
236
  this.scroll.next({
233
237
  nativeEvent: e,
234
238
  source: this,
@@ -240,12 +244,12 @@ export class AXPlatform {
240
244
  mutations.forEach((mutation) => {
241
245
  // Detect Direction Change
242
246
  if (mutation.attributeName === 'dir') {
243
- const dir = document.documentElement.getAttribute('dir');
247
+ const dir = this.document.documentElement.getAttribute('dir');
244
248
  this.directionChange.next({ source: this, nativeEvent: null, data: dir });
245
249
  }
246
250
  });
247
251
  });
248
- observer.observe(document.documentElement, {
252
+ observer.observe(this.document.documentElement, {
249
253
  attributes: true,
250
254
  childList: false,
251
255
  characterData: false,
@@ -260,4 +264,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
260
264
  providedIn: 'root',
261
265
  }]
262
266
  }], ctorParameters: () => [] });
263
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGxhdGZvcm0uc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29yZS9wbGF0Zm9ybS9zcmMvbGliL3BsYXRmb3JtLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDbkQsT0FBTyxFQUFFLGVBQWUsRUFBRSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBQzNELE9BQU8sRUFBRSxZQUFZLEVBQUUsb0JBQW9CLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQzs7QUFTcEUsTUFBTSxRQUFR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ICAgICAgY2hhcmFjdGVyRGF0YTogZmFsc2UsXG4gICAgfSk7XG4gIH1cbn1cbiJdfQ==
@@ -3,7 +3,10 @@ export class AXDrawingUtil {
3
3
  static collision(a, b) {
4
4
  const ac = a.getBoundingClientRect();
5
5
  const bc = b.getBoundingClientRect();
6
- if (ac.left < bc.left + bc.width && ac.left + ac.width > bc.left && ac.top < bc.top + bc.height && ac.top + ac.height > bc.top) {
6
+ if (ac.left < bc.left + bc.width &&
7
+ ac.left + ac.width > bc.left &&
8
+ ac.top < bc.top + bc.height &&
9
+ ac.top + ac.height > bc.top) {
7
10
  return true;
8
11
  }
9
12
  else {
@@ -20,10 +23,10 @@ export class AXDrawingUtil {
20
23
  });
21
24
  }
22
25
  static isInRecPoint(pos, rec) {
23
- return pos.x >= rec.left && pos.x <= rec.left + rec.width && pos.y >= rec.top && pos.y <= rec.top + rec.height;
26
+ return (pos.x >= rec.left && pos.x <= rec.left + rec.width && pos.y >= rec.top && pos.y <= rec.top + rec.height);
24
27
  }
25
28
  static convertRemToPixels(rem) {
26
29
  return rem * parseFloat(getComputedStyle(document.documentElement).fontSize);
27
30
  }
28
31
  }
29
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHJhd2luZy11dGlsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb3JlL3V0aWxzL3NyYy9saWIvZHJhd2luZy11dGlsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWFBLFdBQVc7QUFDWCxNQUFNLE9BQU8sYUFBYTtJQUN4QixNQUFNLENBQUMsU0FBUyxDQUFDLENBQWMsRUFBRSxDQUFjO1FBQzdDLE1BQU0sRUFBRSxHQUFHLENBQUMsQ0FBQyxxQkFBcUIsRUFBRSxDQUFDO1FBQ3JDLE1BQU0sRUFBRSxHQUFHLENBQUMsQ0FBQyxxQkFBcUIsRUFBRSxDQUFDO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MudG9wICsgcmVjLmhlaWdodFxuICAgICk7XG4gIH1cblxuICBzdGF0aWMgY29udmVydFJlbVRvUGl4ZWxzKHJlbTogbnVtYmVyKTogbnVtYmVyIHtcbiAgICByZXR1cm4gcmVtICogcGFyc2VGbG9hdChnZXRDb21wdXRlZFN0eWxlKGRvY3VtZW50LmRvY3VtZW50RWxlbWVudCkuZm9udFNpemUpO1xuICB9XG59XG4iXX0=
@@ -1,10 +1,12 @@
1
- import { Directive, ElementRef, HostListener, Input, NgZone, Renderer2 } from '@angular/core';
1
+ import { DOCUMENT } from '@angular/common';
2
+ import { Directive, ElementRef, HostListener, inject, Input, NgZone, Renderer2 } from '@angular/core';
2
3
  import * as i0 from "@angular/core";
3
4
  export class AXResizableDirective {
4
5
  constructor(el, renderer, zone) {
5
6
  this.el = el;
6
7
  this.renderer = renderer;
7
8
  this.zone = zone;
9
+ this.document = inject(DOCUMENT);
8
10
  this.minWidth = 100; // Minimum width for the resizable element
9
11
  this.isResizing = false;
10
12
  this.createResizeHandle(); // Initialize the resize handle
@@ -36,7 +38,7 @@ export class AXResizableDirective {
36
38
  if (event.clientX >= handleRect.left && event.clientX <= handleRect.right) {
37
39
  this.zone.runOutsideAngular(() => {
38
40
  this.isResizing = true;
39
- document.body.style.cursor = 'ew-resize'; // Change cursor to resize mode
41
+ this.document.body.style.cursor = 'ew-resize'; // Change cursor to resize mode
40
42
  // Change resize handle color to blue when resizing starts
41
43
  this.renderer.setStyle(this.resizeHandle, 'background-color', '#007bff');
42
44
  event.preventDefault();
@@ -50,7 +52,7 @@ export class AXResizableDirective {
50
52
  const rect = this.el.nativeElement.getBoundingClientRect();
51
53
  let newWidth;
52
54
  // Resize logic (LTR or RTL support)
53
- if (document.documentElement.dir === 'rtl') {
55
+ if (this.document.documentElement.dir === 'rtl') {
54
56
  newWidth = rect.right - event.clientX;
55
57
  }
56
58
  else {
@@ -68,7 +70,7 @@ export class AXResizableDirective {
68
70
  this.zone.runOutsideAngular(() => {
69
71
  if (this.isResizing) {
70
72
  this.isResizing = false;
71
- document.body.style.cursor = 'default'; // Reset the cursor
73
+ this.document.body.style.cursor = 'default'; // Reset the cursor
72
74
  // Reset the resize handle color to default when resizing ends
73
75
  this.renderer.setStyle(this.resizeHandle, 'background-color', 'rgba(0, 0, 0, 0.2)');
74
76
  }
@@ -114,4 +116,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
114
116
  type: HostListener,
115
117
  args: ['mouseleave', ['$event']]
116
118
  }] } });
117
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzaXplLmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29yZS91dGlscy9zcmMvbGliL3Jlc2l6ZS5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxVQUFVLEVBQUUsWUFBWSxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsU0FBUyxFQUFFLE1BQU0sZUFBZSxDQUFDOztBQUs5RixNQUFNLE9BQU8sb0JBQW9CO0lBSy9CLFlBQ1UsRUFBYyxFQUNkLFFBQW1CLEVBQ25CLElBQVk7UUFGWixPQUFFLEdBQUYsRUFBRSxDQUFZO1FBQ2QsYUFBUSxHQUFSLFFBQVEsQ0FBVztRQUNuQixTQUFJLEdBQUosSUFBSSxDQUFRO1FBUGIsYUFBUSxHQUFHLEdBQUcsQ0FBQyxDQUFDLDBDQUEwQztRQUMzRCxlQUFVLEdBQUcsS0FBSyxDQUFDO1FBUXpCLElBQUksQ0FBQyxrQkFBa0IsRUFBRSxDQUFDLENBQUMsK0JBQStCO0lBQzVELENBQUM7SUFFRCwyREFBMkQ7SUFDbkQsa0JBQWtCO1FBQ3hCLDJGQUEyRjtRQUMzRixJQUFJLENBQUMsU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YXVsdCBiYWNrZ3JvdW5kIGNvbG9yXG4gICAgfVxuICB9XG59XG4iXX0=
@@ -1,7 +1,8 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, NgModule } from '@angular/core';
2
+ import { Injectable, NgModule, inject } from '@angular/core';
3
3
  import * as i1 from '@acorex/core/format';
4
4
  import { AXFormatModule } from '@acorex/core/format';
5
+ import { DOCUMENT } from '@angular/common';
5
6
 
6
7
  class AXFileSizeFormatter {
7
8
  get name() {
@@ -42,6 +43,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
42
43
 
43
44
  class AXFileService {
44
45
  constructor() {
46
+ this.document = inject(DOCUMENT);
45
47
  this.blobToBase64 = (blob) => {
46
48
  if (blob instanceof Blob) {
47
49
  return new Promise((resolve, reject) => {
@@ -61,16 +63,16 @@ class AXFileService {
61
63
  choose(options) {
62
64
  return new Promise((resolve, reject) => {
63
65
  options = Object.assign({ multiple: false }, options);
64
- const input = document.createElement('input');
66
+ const input = this.document.createElement('input');
65
67
  input.style.display = 'none';
66
- document.body.appendChild(input);
68
+ this.document.body.appendChild(input);
67
69
  input.type = 'file';
68
70
  input.accept = options.accept || '';
69
71
  input.multiple = options.multiple || false;
70
72
  //
71
73
  const onError = (e) => {
72
74
  reject(e);
73
- document.body.removeChild(input);
75
+ this.document.body.removeChild(input);
74
76
  input.remove();
75
77
  input.removeEventListener('change', onChange);
76
78
  input.removeEventListener('error', onError);
@@ -78,7 +80,7 @@ class AXFileService {
78
80
  //
79
81
  const onChange = () => {
80
82
  resolve(Array.from(input.files || []));
81
- document.body.removeChild(input);
83
+ this.document.body.removeChild(input);
82
84
  input.remove();
83
85
  input.removeEventListener('change', onChange);
84
86
  input.removeEventListener('error', onError);
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-core-file.mjs","sources":["../../../../libs/core/file/src/lib/file-size-formatter.ts","../../../../libs/core/file/src/lib/file.module.ts","../../../../libs/core/file/src/lib/file.service.ts","../../../../libs/core/file/src/acorex-core-file.ts"],"sourcesContent":["import { AXFormatOptions, AXFormatter } from '@acorex/core/format';\nimport { Injectable } from '@angular/core';\n\nexport interface AXFileSizeFormatterOptions extends AXFormatOptions {\n format: string;\n}\n\ndeclare module '@acorex/core/format' {\n interface AXFormatOptionsMap {\n filesize: AXFileSizeFormatterOptions;\n }\n}\n\n@Injectable()\nexport class AXFileSizeFormatter implements AXFormatter {\n get name(): string {\n return 'filesize';\n }\n\n format(value: number): string {\n const size = Number(value);\n\n if (size === 0) return '0 Bytes';\n if (Number.isNaN(size)) return 'Unknown';\n\n const k = 1024;\n const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n const i = Math.floor(Math.log(size) / Math.log(k));\n\n return parseFloat((size / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];\n }\n}\n","import { AXFormatModule } from '@acorex/core/format';\nimport { NgModule } from '@angular/core';\nimport { AXFileSizeFormatter } from './file-size-formatter';\n\n@NgModule({\n imports: [AXFormatModule.forChild({ formatters: [AXFileSizeFormatter] })],\n exports: [],\n declarations: [],\n providers: [AXFileSizeFormatter],\n})\nexport class AXFileModule {}\n","import { Injectable } from '@angular/core';\n\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXFileService {\n\n public choose(options?: { accept?: string; multiple?: boolean }): Promise<File[]> {\n return new Promise<File[]>((resolve, reject) => {\n options = Object.assign({ multiple: false }, options);\n const input: HTMLInputElement = document.createElement('input');\n input.style.display = 'none';\n document.body.appendChild(input);\n input.type = 'file';\n input.accept = options.accept || '';\n input.multiple = options.multiple || false;\n //\n const onError = (e) => {\n reject(e);\n document.body.removeChild(input);\n input.remove();\n input.removeEventListener('change', onChange);\n input.removeEventListener('error', onError);\n };\n //\n const onChange = () => {\n resolve(Array.from(input.files || []));\n document.body.removeChild(input);\n input.remove();\n input.removeEventListener('change', onChange);\n input.removeEventListener('error', onError);\n };\n //\n input.addEventListener('change', onChange);\n input.addEventListener('error', onError);\n input.click();\n });\n }\n\n public blobToBase64 = (blob: Blob) => {\n if (blob instanceof Blob) {\n return new Promise<string>((resolve, reject) => {\n const reader = new FileReader();\n reader.onerror = reject;\n reader.onload = () => {\n resolve(reader.result as string);\n };\n reader.readAsDataURL(blob);\n });\n } else {\n return Promise.reject('input is not blob');\n }\n };\n\n public getSize(file: File | Blob | string) {\n if (this.isBase64(file as string)) {\n return this.getBase64Size(file as string);\n }\n return false;\n }\n\n public isBase64(base64: string) {\n const regx = /[^:]\\w+\\/[\\w-+\\d.]+(?=;|,)/;\n return regx.test(base64);\n }\n\n public getBase64Size(base64: string) {\n return atob(base64.substring(base64.indexOf(',') + 1)).length;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAca,mBAAmB,CAAA;AAC9B,IAAA,IAAI,IAAI,GAAA;AACN,QAAA,OAAO,UAAU;;AAGnB,IAAA,MAAM,CAAC,KAAa,EAAA;AAClB,QAAA,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC;QAE1B,IAAI,IAAI,KAAK,CAAC;AAAE,YAAA,OAAO,SAAS;AAChC,QAAA,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;AAAE,YAAA,OAAO,SAAS;QAExC,MAAM,CAAC,GAAG,IAAI;QACd,MAAM,KAAK,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;QACvE,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAElD,OAAO,UAAU,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,GAA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EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,cAFZ,MAAM,EAAA,CAAA,CAAA;;2FAEP,aAAa,EAAA,UAAA,EAAA,CAAA;kBAHzB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACLD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-core-file.mjs","sources":["../../../../libs/core/file/src/lib/file-size-formatter.ts","../../../../libs/core/file/src/lib/file.module.ts","../../../../libs/core/file/src/lib/file.service.ts","../../../../libs/core/file/src/acorex-core-file.ts"],"sourcesContent":["import { AXFormatOptions, AXFormatter } from '@acorex/core/format';\nimport { Injectable } from '@angular/core';\n\nexport interface AXFileSizeFormatterOptions extends AXFormatOptions {\n format: string;\n}\n\ndeclare module '@acorex/core/format' {\n interface AXFormatOptionsMap {\n filesize: AXFileSizeFormatterOptions;\n }\n}\n\n@Injectable()\nexport class AXFileSizeFormatter implements AXFormatter {\n get name(): string {\n return 'filesize';\n }\n\n format(value: number): string {\n const size = Number(value);\n\n if (size === 0) return '0 Bytes';\n if (Number.isNaN(size)) return 'Unknown';\n\n const k = 1024;\n const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n const i = Math.floor(Math.log(size) / Math.log(k));\n\n return parseFloat((size / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];\n }\n}\n","import { AXFormatModule } from '@acorex/core/format';\nimport { NgModule } from '@angular/core';\nimport { AXFileSizeFormatter } from './file-size-formatter';\n\n@NgModule({\n imports: [AXFormatModule.forChild({ formatters: [AXFileSizeFormatter] })],\n exports: [],\n declarations: [],\n providers: [AXFileSizeFormatter],\n})\nexport class AXFileModule {}\n","import { DOCUMENT } from '@angular/common';\nimport { inject, Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXFileService {\n private document = inject(DOCUMENT);\n\n public choose(options?: { accept?: string; multiple?: boolean }): Promise<File[]> {\n return new Promise<File[]>((resolve, reject) => {\n options = Object.assign({ multiple: false }, options);\n const input: HTMLInputElement = this.document.createElement('input');\n input.style.display = 'none';\n this.document.body.appendChild(input);\n input.type = 'file';\n input.accept = options.accept || '';\n input.multiple = options.multiple || false;\n //\n const onError = (e) => {\n reject(e);\n this.document.body.removeChild(input);\n input.remove();\n input.removeEventListener('change', onChange);\n input.removeEventListener('error', onError);\n };\n //\n const onChange = () => {\n resolve(Array.from(input.files || []));\n this.document.body.removeChild(input);\n input.remove();\n input.removeEventListener('change', onChange);\n input.removeEventListener('error', onError);\n };\n //\n input.addEventListener('change', onChange);\n input.addEventListener('error', onError);\n input.click();\n });\n }\n\n public blobToBase64 = (blob: Blob) => {\n if (blob instanceof Blob) {\n return new Promise<string>((resolve, reject) => {\n const reader = new FileReader();\n reader.onerror = reject;\n reader.onload = () => {\n resolve(reader.result as string);\n };\n reader.readAsDataURL(blob);\n });\n } else {\n return Promise.reject('input is not blob');\n }\n };\n\n public getSize(file: File | Blob | string) {\n if (this.isBase64(file as string)) {\n return this.getBase64Size(file as string);\n }\n return false;\n }\n\n public isBase64(base64: string) {\n const regx = /[^:]\\w+\\/[\\w-+\\d.]+(?=;|,)/;\n return regx.test(base64);\n }\n\n public getBase64Size(base64: string) {\n return atob(base64.substring(base64.indexOf(',') + 1)).length;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAca,mBAAmB,CAAA;AAC9B,IAAA,IAAI,IAAI,GAAA;AACN,QAAA,OAAO,UAAU;;AAGnB,IAAA,MAAM,CAAC,KAAa,EAAA;AAClB,QAAA,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC;QAE1B,IAAI,IAAI,KAAK,CAAC;AAAE,YAAA,OAAO,SAAS;AAChC,QAAA,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;AAAE,YAAA,OAAO,SAA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c,CAAC;;AAE3C,QAAA,OAAO,KAAK;;AAGP,IAAA,QAAQ,CAAC,MAAc,EAAA;QAC5B,MAAM,IAAI,GAAG,4BAA4B;AACzC,QAAA,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;;AAGnB,IAAA,aAAa,CAAC,MAAc,EAAA;AACjC,QAAA,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM;;8GA/DpD,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAb,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,cAFZ,MAAM,EAAA,CAAA,CAAA;;2FAEP,aAAa,EAAA,UAAA,EAAA,CAAA;kBAHzB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACLD;;AAEG;;;;"}
@@ -1,7 +1,11 @@
1
+ import { DOCUMENT } from '@angular/common';
1
2
  import * as i0 from '@angular/core';
2
- import { Injectable } from '@angular/core';
3
+ import { inject, Injectable } from '@angular/core';
3
4
 
4
5
  class AXImageService {
6
+ constructor() {
7
+ this.document = inject(DOCUMENT);
8
+ }
5
9
  async resize(options) {
6
10
  options = Object.assign({ type: 'image/png', quality: 1 }, options);
7
11
  let image;
@@ -15,7 +19,7 @@ class AXImageService {
15
19
  image = options.source;
16
20
  }
17
21
  // Resize the image
18
- const canvas = document.createElement('canvas');
22
+ const canvas = this.document.createElement('canvas');
19
23
  let width = image.width;
20
24
  let height = image.height;
21
25
  if (width > height) {
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-core-image.mjs","sources":["../../../../libs/core/image/src/lib/image.service.ts","../../../../libs/core/image/src/acorex-core-image.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable()\nexport class AXImageService {\n async resize(options: {\n maxSize: number;\n source: HTMLImageElement | File;\n type?: 'image/png' | 'image/jpeg' | 'image/webp';\n quality?: number;\n }): Promise<Blob> {\n options = Object.assign({ type: 'image/png', quality: 1 }, options);\n\n let image: HTMLImageElement;\n if (options.source instanceof File) {\n const a = new Image();\n a.src = URL.createObjectURL(options.source);\n await new Promise<Event>((res) => (a.onload = res));\n image = a;\n } else {\n image = options.source;\n }\n\n // Resize the image\n const canvas: any = document.createElement('canvas');\n let width = image.width;\n let height = image.height;\n if (width > height) {\n if (width > options.maxSize) {\n height *= options.maxSize / width;\n width = options.maxSize;\n }\n } else {\n if (height > options.maxSize) {\n width *= options.maxSize / height;\n height = options.maxSize;\n }\n }\n canvas.width = width;\n canvas.height = height;\n canvas.getContext('2d').drawImage(image, 0, 0, width, height);\n return new Promise((resolve) => canvas.toBlob(resolve, options.type, options.quality));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAGa,cAAc,CAAA;IACzB,MAAM,MAAM,CAAC,OAKZ,EAAA;AACC,QAAA,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC;AAEnE,QAAA,IAAI,KAAuB;AAC3B,QAAA,IAAI,OAAO,CAAC,MAAM,YAAY,IAAI,EAAE;AAClC,YAAA,MAAM,CAAC,GAAG,IAAI,KAAK,EAAE;YACrB,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC;AAC3C,YAAA,MAAM,IAAI,OAAO,CAAQ,CAAC,GAAG,MAAM,CAAC,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC;YACnD,KAAK,GAAG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"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport { inject, Injectable } from '@angular/core';\n\n@Injectable()\nexport class AXImageService {\n private document = inject(DOCUMENT);\n async resize(options: {\n maxSize: number;\n source: HTMLImageElement | File;\n type?: 'image/png' | 'image/jpeg' | 'image/webp';\n quality?: number;\n }): Promise<Blob> {\n options = Object.assign({ type: 'image/png', quality: 1 }, options);\n\n let image: HTMLImageElement;\n if (options.source instanceof File) {\n const a = new Image();\n a.src = URL.createObjectURL(options.source);\n await new Promise<Event>((res) => (a.onload = res));\n image = a;\n } else {\n image = options.source;\n }\n\n // Resize the image\n const canvas: any = this.document.createElement('canvas');\n let width = image.width;\n let height = image.height;\n if (width > height) {\n if (width > options.maxSize) {\n height *= options.maxSize / width;\n width = options.maxSize;\n }\n } else {\n if (height > options.maxSize) {\n width *= options.maxSize / height;\n height = options.maxSize;\n }\n }\n canvas.width = width;\n canvas.height = height;\n canvas.getContext('2d').drawImage(image, 0, 0, width, height);\n return new Promise((resolve) => canvas.toBlob(resolve, options.type, options.quality));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAIa,cAAc,CAAA;AAD3B,IAAA,WAAA,GAAA;AAEU,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAuCpC;IAtCC,MAAM,MAAM,CAAC,OAKZ,EAAA;AACC,QAAA,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC;AAEnE,QAAA,IAAI,KAAuB;AAC3B,QAAA,IAAI,OAAO,CAAC,MAAM,YAAY,IAAI,EAAE;AAClC,YAAA,MAAM,CAAC,GAAG,IAAI,KAAK,EAAE;YACrB,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC;AAC3C,YAAA,MAAM,IAAI,OAAO,CAA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@@ -1,5 +1,6 @@
1
+ import { DOCUMENT } from '@angular/common';
1
2
  import * as i0 from '@angular/core';
2
- import { signal, Injectable } from '@angular/core';
3
+ import { signal, inject, Injectable } from '@angular/core';
3
4
  import { Subject, BehaviorSubject, fromEvent } from 'rxjs';
4
5
  import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
5
6
 
@@ -60,11 +61,11 @@ const isServer = new Function('try {return this===global;}catch(e){return false;
60
61
  const matchMedia = (win, query) => {
61
62
  return win.matchMedia(query).matches;
62
63
  };
63
- const isSMScreen = (win) => matchMedia(win, '(max-width: 578px)');
64
+ const isSMScreen = (win) => matchMedia(win, '(max-width: 640px)');
64
65
  const isMDScreen = (win) => matchMedia(win, '(max-width: 768px)');
65
- const isLGScreen = (win) => matchMedia(win, '(max-width: 992px)');
66
- const isXLScreen = (win) => matchMedia(win, '(max-width: 1200px)');
67
- const is2XLScreen = (win) => matchMedia(win, '(max-width: 1440px)');
66
+ const isLGScreen = (win) => matchMedia(win, '(max-width: 1024px)');
67
+ const isXLScreen = (win) => matchMedia(win, '(max-width: 1280px)');
68
+ const is2XLScreen = (win) => matchMedia(win, '(max-width: 1536px)');
68
69
  const is3XLScreen = (win) => matchMedia(win, '(max-width: 1920px)');
69
70
  const is4XLScreen = (win) => matchMedia(win, '(max-width: 2560px)');
70
71
  const PLATFORMS_MAP = {
@@ -93,10 +94,12 @@ class AXPlatformEvent {
93
94
  }
94
95
  class AXPlatform {
95
96
  isDark() {
96
- return document.documentElement.classList.contains('ax-dark');
97
+ return this.document.documentElement.classList.contains('ax-dark');
97
98
  }
98
99
  isRtl() {
99
- return document.dir == 'rtl' || document.body.dir == 'rtl' || document.body.style.direction == 'rtl';
100
+ return (this.document.dir == 'rtl' ||
101
+ this.document.body.dir == 'rtl' ||
102
+ this.document.body.style.direction == 'rtl');
100
103
  }
101
104
  isLandscape() {
102
105
  return window.innerHeight < window.innerWidth;
@@ -116,13 +119,13 @@ class AXPlatform {
116
119
  return (['SM', 'MD', 'LG', 'XL', '2XL', '3XL', '4XL'].find((name) => PLATFORMS_MAP[name](window) == true) || '5XL');
117
120
  }
118
121
  switchLightMode() {
119
- const _html = document.getElementsByTagName('html')[0];
122
+ const _html = this.document.getElementsByTagName('html')[0];
120
123
  _html.classList.remove('ax-dark');
121
124
  this.#setSystemTheme('light');
122
125
  return 'light';
123
126
  }
124
127
  switchDarkMode() {
125
- const _html = document.getElementsByTagName('html')[0];
128
+ const _html = this.document.getElementsByTagName('html')[0];
126
129
  _html.classList.add('ax-dark');
127
130
  this.#setSystemTheme('dark');
128
131
  return 'dark';
@@ -130,12 +133,12 @@ class AXPlatform {
130
133
  switchSystemMode() {
131
134
  if (isBrowser()) {
132
135
  if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
133
- const _html = document.getElementsByTagName('html')[0];
136
+ const _html = this.document.getElementsByTagName('html')[0];
134
137
  _html.classList.add('ax-dark');
135
138
  this.#setSystemTheme('system-dark');
136
139
  }
137
140
  else {
138
- const _html = document.getElementsByTagName('html')[0];
141
+ const _html = this.document.getElementsByTagName('html')[0];
139
142
  _html.classList.remove('ax-dark');
140
143
  this.#setSystemTheme('system-light');
141
144
  }
@@ -160,7 +163,7 @@ class AXPlatform {
160
163
  setFullHeightRatio() {
161
164
  if (isBrowser()) {
162
165
  try {
163
- document
166
+ this.document
164
167
  .querySelector(':root')
165
168
  ?.style.setProperty('--ax-vh', window.innerHeight / 100 + 'px');
166
169
  }
@@ -173,11 +176,11 @@ class AXPlatform {
173
176
  if (this.themeMode() === 'system') {
174
177
  const themeMode = event.matches ? 'dark' : 'light';
175
178
  if (themeMode === 'dark') {
176
- const _html = document.getElementsByTagName('html')[0];
179
+ const _html = this.document.getElementsByTagName('html')[0];
177
180
  _html.classList.add('ax-dark');
178
181
  }
179
182
  else {
180
- const _html = document.getElementsByTagName('html')[0];
183
+ const _html = this.document.getElementsByTagName('html')[0];
181
184
  _html.classList.remove('ax-dark');
182
185
  }
183
186
  }
@@ -189,6 +192,7 @@ class AXPlatform {
189
192
  this.scroll = new Subject();
190
193
  this.themeMode$ = new BehaviorSubject('system');
191
194
  this.themeMode = signal('system');
195
+ this.document = inject(DOCUMENT);
192
196
  if (isBrowser()) {
193
197
  this.detectDarkMode();
194
198
  this.detectOnResize();
@@ -221,7 +225,7 @@ class AXPlatform {
221
225
  });
222
226
  }
223
227
  detectClickEvent() {
224
- document.addEventListener('click', (e) => {
228
+ this.document.addEventListener('click', (e) => {
225
229
  this.click.next({
226
230
  nativeEvent: e,
227
231
  source: this,
@@ -229,7 +233,7 @@ class AXPlatform {
229
233
  }, true);
230
234
  }
231
235
  detectScrollEvent() {
232
- document.addEventListener('scroll', (e) => {
236
+ this.document.addEventListener('scroll', (e) => {
233
237
  this.scroll.next({
234
238
  nativeEvent: e,
235
239
  source: this,
@@ -241,12 +245,12 @@ class AXPlatform {
241
245
  mutations.forEach((mutation) => {
242
246
  // Detect Direction Change
243
247
  if (mutation.attributeName === 'dir') {
244
- const dir = document.documentElement.getAttribute('dir');
248
+ const dir = this.document.documentElement.getAttribute('dir');
245
249
  this.directionChange.next({ source: this, nativeEvent: null, data: dir });
246
250
  }
247
251
  });
248
252
  });
249
- observer.observe(document.documentElement, {
253
+ observer.observe(this.document.documentElement, {
250
254
  attributes: true,
251
255
  childList: false,
252
256
  characterData: false,
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-core-platform.mjs","sources":["../../../../libs/core/platform/src/lib/platform.service.ts","../../../../libs/core/platform/src/acorex-core-platform.ts"],"sourcesContent":["import { Injectable, signal } from '@angular/core';\nimport { BehaviorSubject, Subject, fromEvent } from 'rxjs';\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\n\nexport type AXThemeMode = 'light' | 'dark' | 'system' | 'system-dark' | 'system-light';\nexport type AXPlatforms = 'Android' | 'Desktop' | 'iOS' | 'Mobile';\nexport type AXBrowsers = 'Chrome' | 'Safari' | 'Edge' | 'Firefox' | 'Opera' | 'MSIE';\nexport type AXTechnologies = 'PWA' | 'Hybrid' | 'Electron';\n\nexport type AXScreenSizes = 'SM' | 'MD' | 'LG' | 'XL' | '2XL' | '3XL' | '4XL' | '5XL';\n\nconst isChrome = (win: Window): boolean => testUserAgent(win, /Chrome/i);\n\nconst isFirefox = (win: Window): boolean => testUserAgent(win, /Firefox/i);\n\nconst isEdge = (win: Window): boolean => testUserAgent(win, /Edge/i);\n\nconst isSafari = (win: Window): boolean => testUserAgent(win, /Safari/i);\n\nconst isOpera = (win: Window): boolean => testUserAgent(win, /Opera/i) || testUserAgent(win, /OPR/i);\n\nconst isMSIE = (win: Window): boolean => testUserAgent(win, /MSIE/i) || testUserAgent(win, /Trident/i);\n\nconst isMobileWeb = (win: Window): boolean => isMobile(win) && !isHybrid(win);\n\nconst isIpad = (win: Window) => {\n // iOS 12 and below\n if (testUserAgent(win, /iPad/i)) {\n return true;\n }\n\n // iOS 13+\n if (testUserAgent(win, /Macintosh/i) && isMobile(win)) {\n return true;\n }\n\n return false;\n};\n\nconst isIphone = (win: Window) => testUserAgent(win, /iPhone/i);\n\nconst isIOS = (win: Window) => testUserAgent(win, /iPhone|iPod/i) || isIpad(win);\n\nconst isAndroid = (win: Window) => testUserAgent(win, /android|sink/i);\n\nconst isAndroidTablet = (win: Window) => {\n return isAndroid(win) && !testUserAgent(win, /mobile/i);\n};\n\nconst isPhablet = (win: Window) => {\n const width = win.innerWidth;\n const height = win.innerHeight;\n const smallest = Math.min(width, height);\n const largest = Math.max(width, height);\n\n return smallest > 390 && smallest < 520 && largest > 620 && largest < 800;\n};\n\nconst isTablet = (win: Window) => {\n const width = win.innerWidth;\n const height = win.innerHeight;\n const smallest = Math.min(width, height);\n const largest = Math.max(width, height);\n\n return (\n isIpad(win) ||\n isAndroidTablet(win) ||\n (smallest > 460 && smallest < 820 && largest > 780 && largest < 1400)\n );\n};\n\nconst isMobile = (win: Window) => matchMedia(win, '(any-pointer:coarse)');\nconst isTouch = (win: Window) => matchMedia(win, '(any-pointer:coarse)');\n\nconst isDesktop = (win: Window) => !isMobile(win);\n\nconst isHybrid = (win: Window) => isCordova(win) || isCapacitorNative(win);\n\nconst isCordova = (win: any): boolean => !!(win['cordova'] || win['phonegap'] || win['PhoneGap']);\n\nconst isCapacitorNative = (win: any): boolean => {\n const capacitor = win['Capacitor'];\n return !!(capacitor && capacitor.isNative);\n};\n\nconst isElectron = (win: Window): boolean => testUserAgent(win, /electron/i);\n\nconst isPWA = (win: Window): boolean =>\n !!(win.matchMedia('(display-mode: standalone)').matches || (win.navigator as any).standalone);\n\nexport const testUserAgent = (win: Window, expr: RegExp) => expr.test(win.navigator.userAgent);\n\nexport const isBrowser = new Function('try {return this===window;}catch(e){ return false;}');\nexport const isServer = new Function('try {return this===global;}catch(e){return false;}');\n\nconst matchMedia = (win: Window, query: string): boolean => {\n return win.matchMedia(query).matches;\n};\n\nconst isSMScreen = (win: Window) => matchMedia(win, '(max-width: 578px)');\nconst isMDScreen = (win: Window) => matchMedia(win, '(max-width: 768px)');\nconst isLGScreen = (win: Window) => matchMedia(win, '(max-width: 992px)');\nconst isXLScreen = (win: Window) => matchMedia(win, '(max-width: 1200px)');\nconst is2XLScreen = (win: Window) => matchMedia(win, '(max-width: 1440px)');\nconst is3XLScreen = (win: Window) => matchMedia(win, '(max-width: 1920px)');\nconst is4XLScreen = (win: Window) => matchMedia(win, '(max-width: 2560px)');\n\nconst PLATFORMS_MAP: any = {\n Android: isAndroid,\n iOS: isIOS,\n Desktop: isDesktop,\n Mobile: isMobile,\n Touch: isTouch,\n Chrome: isChrome,\n Firefox: isFirefox,\n Safari: isSafari,\n Edge: isEdge,\n Opera: isOpera,\n Hybrid: isHybrid,\n PWA: isPWA,\n Electron: isElectron,\n SM: isSMScreen,\n MD: isMDScreen,\n LG: isLGScreen,\n XL: isXLScreen,\n '2XL': is2XLScreen,\n '3XL': is3XLScreen,\n '4XL': is4XLScreen,\n};\n\nexport class AXPlatformEvent<T extends Event = Event> {\n nativeEvent!: T;\n source!: AXPlatform;\n data?: any;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXPlatform {\n resize: Subject<AXPlatformEvent> = new Subject<AXPlatformEvent>();\n directionChange: Subject<AXPlatformEvent> = new Subject<AXPlatformEvent>();\n click: Subject<AXPlatformEvent> = new Subject<AXPlatformEvent>();\n scroll: Subject<AXPlatformEvent> = new Subject<AXPlatformEvent>();\n themeMode$: BehaviorSubject<AXThemeMode> = new BehaviorSubject<AXThemeMode>('system');\n themeMode = signal<AXThemeMode>('system');\n\n isDark(): boolean {\n return document.documentElement.classList.contains('ax-dark');\n }\n\n isRtl(): boolean {\n return document.dir == 'rtl' || document.body.dir == 'rtl' || document.body.style.direction == 'rtl';\n }\n\n isLandscape(): boolean {\n return window.innerHeight < window.innerWidth;\n }\n\n isPortrate(): boolean {\n return !this.isLandscape();\n }\n\n is(name: AXPlatforms | AXBrowsers | AXTechnologies | AXScreenSizes): boolean {\n if (isBrowser()) {\n return PLATFORMS_MAP[name](window) || false;\n } else {\n return false;\n }\n }\n\n get screenSize(): AXScreenSizes {\n return (['SM', 'MD', 'LG', 'XL', '2XL', '3XL', '4XL'].find(\n (name) => PLATFORMS_MAP[name](window) == true,\n ) || '5XL') as AXScreenSizes;\n }\n\n switchLightMode() {\n const _html = document.getElementsByTagName('html')[0];\n _html.classList.remove('ax-dark');\n this.#setSystemTheme('light');\n return 'light';\n }\n\n switchDarkMode() {\n const _html = document.getElementsByTagName('html')[0];\n _html.classList.add('ax-dark');\n this.#setSystemTheme('dark');\n return 'dark';\n }\n\n switchSystemMode() {\n if (isBrowser()) {\n if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {\n const _html = document.getElementsByTagName('html')[0];\n _html.classList.add('ax-dark');\n this.#setSystemTheme('system-dark');\n } else {\n const _html = document.getElementsByTagName('html')[0];\n _html.classList.remove('ax-dark');\n this.#setSystemTheme('system-light');\n }\n }\n }\n\n #setSystemTheme(themeMode: AXThemeMode) {\n this.themeMode$.next(themeMode);\n localStorage.setItem('AX_THEME_MODE', themeMode);\n this.themeMode.set(themeMode);\n }\n\n autoDetectThemeMode() {\n const mode = localStorage.getItem('AX_THEME_MODE') || 'system';\n switch (mode) {\n case 'light':\n return this.switchLightMode();\n\n case 'dark':\n return this.switchDarkMode();\n\n case 'system':\n return this.switchSystemMode();\n }\n }\n\n private setFullHeightRatio() {\n if (isBrowser()) {\n try {\n document\n .querySelector<HTMLElement>(':root')\n ?.style.setProperty('--ax-vh', window.innerHeight / 100 + 'px');\n } catch (error) {\n console.error(error);\n }\n }\n }\n\n private autoSystemModeDetection(event) {\n if (this.themeMode() === 'system') {\n const themeMode = event.matches ? 'dark' : 'light';\n\n if (themeMode === 'dark') {\n const _html = document.getElementsByTagName('html')[0];\n _html.classList.add('ax-dark');\n } else {\n const _html = document.getElementsByTagName('html')[0];\n _html.classList.remove('ax-dark');\n }\n }\n }\n\n constructor() {\n if (isBrowser()) {\n this.detectDarkMode();\n this.detectOnResize();\n this.detectClickEvent();\n this.detectScrollEvent();\n this.setFullHeightRatio();\n this.detectDocumentDirectionChange();\n }\n }\n\n private detectDarkMode() {\n // fromEvent(UIEvent)(window,'')\n if (window?.matchMedia('(prefers-color-scheme: dark)').matches) {\n window?.matchMedia('(prefers-color-scheme: dark)')?.addEventListener('change', (event) => {\n // Detect System color mode\n this.autoSystemModeDetection(event);\n });\n }\n }\n\n private detectOnResize() {\n fromEvent<UIEvent>(window, 'resize')\n .pipe(debounceTime(100))\n .pipe(distinctUntilChanged())\n .subscribe((e) => {\n this.resize.next({\n nativeEvent: e,\n source: this,\n });\n //\n this.setFullHeightRatio();\n });\n }\n\n private detectClickEvent() {\n document.addEventListener(\n 'click',\n (e) => {\n this.click.next({\n nativeEvent: e,\n source: this,\n });\n },\n true,\n );\n }\n\n private detectScrollEvent() {\n document.addEventListener(\n 'scroll',\n (e) => {\n this.scroll.next({\n nativeEvent: e,\n source: this,\n });\n },\n true,\n );\n }\n\n private detectDocumentDirectionChange() {\n const observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n // Detect Direction Change\n if (mutation.attributeName === 'dir') {\n const dir = document.documentElement.getAttribute('dir');\n this.directionChange.next({ source: this, nativeEvent: null, data: dir });\n }\n });\n });\n observer.observe(document.documentElement, {\n attributes: true,\n childList: false,\n characterData: false,\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAWA,MAAM,QAAQ,GAAG,CAAC,GAAW,KAAc,aAAa,CAAC,GAAG,EAAE,SAAS,CAAC;AAExE,MAAM,SAAS,GAAG,CAAC,GAAW,KAAc,aAAa,CAAC,GAAG,EAAE,UAAU,CAAC;AAE1E,MAAM,MAAM,GAAG,CAAC,GAAW,KAAc,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC;AAEpE,MAAM,QAAQ,GAAG,CAAC,GAAW,KAAc,aAAa,CAAC,GAAG,EAAE,SAAS,CAAC;AAExE,MAAM,OAAO,GAAG,CAAC,GAAW,KAAc,aAAa,CAAC,GAAG,EAAE,QAAQ,CAAC,IAAI,aAAa,CAAC,GAAG,EAAE,MAAM,CAAC;AAEpG,MAAM,MAAM,GAAG,CAAC,GAAW,KAAc,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC,IAAI,aAAa,CAAC,GAAG,EAAE,UAAU,CAAC;AAEtG,MAAM,WAAW,GAAG,CAAC,GAAW,KAAc,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;AAE7E,MAAM,MAAM,GAAG,CAAC,GAAW,KAAI;;AAE7B,IAAA,IAAI,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC,EAAE;AAC/B,QAAA,OAAO,IAAI;;;AAIb,IAAA,IAAI,aAAa,CAAC,GAAG,EAAE,YAAY,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,EAAE;AACrD,QAAA,OAAO,IAAI;;AAGb,IAAA,OAAO,KAAK;AACd,CAAC;AAED,MAAM,QAAQ,GAAG,CAA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,GAAA;QACnC,MAAM,QAAQ,GAAG,IAAI,gBAAgB,CAAC,CAAC,SAAS,KAAI;AAClD,YAAA,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,KAAI;;AAE7B,gBAAA,IAAI,QAAQ,CAAC,aAAa,KAAK,KAAK,EAAE;oBACpC,MAAM,GAAG,GAAG,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC,KAAK,CAAC;AACxD,oBAAA,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;;AAE7E,aAAC,CAAC;AACJ,SAAC,CAAC;AACF,QAAA,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,EAAE;AACzC,YAAA,UAAU,EAAE,IAAI;AAChB,YAAA,SAAS,EAAE,KAAK;AAChB,YAAA,aAAa,EAAE,KAAK;AACrB,SAAA,CAAC;;8GA3LO,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAV,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAU,cAFT,MAAM,EAAA,CAAA,CAAA;;2FAEP,UAAU,EAAA,UAAA,EAAA,CAAA;kBAHtB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;AC1ID;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-core-platform.mjs","sources":["../../../../libs/core/platform/src/lib/platform.service.ts","../../../../libs/core/platform/src/acorex-core-platform.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport { inject, Injectable, signal } from '@angular/core';\nimport { BehaviorSubject, fromEvent, Subject } from 'rxjs';\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\n\nexport type AXThemeMode = 'light' | 'dark' | 'system' | 'system-dark' | 'system-light';\nexport type AXPlatforms = 'Android' | 'Desktop' | 'iOS' | 'Mobile';\nexport type AXBrowsers = 'Chrome' | 'Safari' | 'Edge' | 'Firefox' | 'Opera' | 'MSIE';\nexport type AXTechnologies = 'PWA' | 'Hybrid' | 'Electron';\n\nexport type AXScreenSizes = 'SM' | 'MD' | 'LG' | 'XL' | '2XL' | '3XL' | '4XL' | '5XL';\n\nconst isChrome = (win: Window): boolean => testUserAgent(win, /Chrome/i);\n\nconst isFirefox = (win: Window): boolean => testUserAgent(win, /Firefox/i);\n\nconst isEdge = (win: Window): boolean => testUserAgent(win, /Edge/i);\n\nconst isSafari = (win: Window): boolean => testUserAgent(win, /Safari/i);\n\nconst isOpera = (win: Window): boolean => testUserAgent(win, /Opera/i) || testUserAgent(win, /OPR/i);\n\nconst isMSIE = (win: Window): boolean => testUserAgent(win, /MSIE/i) || testUserAgent(win, /Trident/i);\n\nconst isMobileWeb = (win: Window): boolean => isMobile(win) && !isHybrid(win);\n\nconst isIpad = (win: Window) => {\n // iOS 12 and below\n if (testUserAgent(win, /iPad/i)) {\n return true;\n }\n\n // iOS 13+\n if (testUserAgent(win, /Macintosh/i) && isMobile(win)) {\n return true;\n }\n\n return false;\n};\n\nconst isIphone = (win: Window) => testUserAgent(win, /iPhone/i);\n\nconst isIOS = (win: Window) => testUserAgent(win, /iPhone|iPod/i) || isIpad(win);\n\nconst isAndroid = (win: Window) => testUserAgent(win, /android|sink/i);\n\nconst isAndroidTablet = (win: Window) => {\n return isAndroid(win) && !testUserAgent(win, /mobile/i);\n};\n\nconst isPhablet = (win: Window) => {\n const width = win.innerWidth;\n const height = win.innerHeight;\n const smallest = Math.min(width, height);\n const largest = Math.max(width, height);\n\n return smallest > 390 && smallest < 520 && largest > 620 && largest < 800;\n};\n\nconst isTablet = (win: Window) => {\n const width = win.innerWidth;\n const height = win.innerHeight;\n const smallest = Math.min(width, height);\n const largest = Math.max(width, height);\n\n return (\n isIpad(win) ||\n isAndroidTablet(win) ||\n (smallest > 460 && smallest < 820 && largest > 780 && largest < 1400)\n );\n};\n\nconst isMobile = (win: Window) => matchMedia(win, '(any-pointer:coarse)');\nconst isTouch = (win: Window) => matchMedia(win, '(any-pointer:coarse)');\n\nconst isDesktop = (win: Window) => !isMobile(win);\n\nconst isHybrid = (win: Window) => isCordova(win) || isCapacitorNative(win);\n\nconst isCordova = (win: any): boolean => !!(win['cordova'] || win['phonegap'] || win['PhoneGap']);\n\nconst isCapacitorNative = (win: any): boolean => {\n const capacitor = win['Capacitor'];\n return !!(capacitor && capacitor.isNative);\n};\n\nconst isElectron = (win: Window): boolean => testUserAgent(win, /electron/i);\n\nconst isPWA = (win: Window): boolean =>\n !!(win.matchMedia('(display-mode: standalone)').matches || (win.navigator as any).standalone);\n\nexport const testUserAgent = (win: Window, expr: RegExp) => expr.test(win.navigator.userAgent);\n\nexport const isBrowser = new Function('try {return this===window;}catch(e){ return false;}');\nexport const isServer = new Function('try {return this===global;}catch(e){return false;}');\n\nconst matchMedia = (win: Window, query: string): boolean => {\n return win.matchMedia(query).matches;\n};\n\nconst isSMScreen = (win: Window) => matchMedia(win, '(max-width: 640px)');\nconst isMDScreen = (win: Window) => matchMedia(win, '(max-width: 768px)');\nconst isLGScreen = (win: Window) => matchMedia(win, '(max-width: 1024px)');\nconst isXLScreen = (win: Window) => matchMedia(win, '(max-width: 1280px)');\nconst is2XLScreen = (win: Window) => matchMedia(win, '(max-width: 1536px)');\nconst is3XLScreen = (win: Window) => matchMedia(win, '(max-width: 1920px)');\nconst is4XLScreen = (win: Window) => matchMedia(win, '(max-width: 2560px)');\n\nconst PLATFORMS_MAP: any = {\n Android: isAndroid,\n iOS: isIOS,\n Desktop: isDesktop,\n Mobile: isMobile,\n Touch: isTouch,\n Chrome: isChrome,\n Firefox: isFirefox,\n Safari: isSafari,\n Edge: isEdge,\n Opera: isOpera,\n Hybrid: isHybrid,\n PWA: isPWA,\n Electron: isElectron,\n SM: isSMScreen,\n MD: isMDScreen,\n LG: isLGScreen,\n XL: isXLScreen,\n '2XL': is2XLScreen,\n '3XL': is3XLScreen,\n '4XL': is4XLScreen,\n};\n\nexport class AXPlatformEvent<T extends Event = Event> {\n nativeEvent!: T;\n source!: AXPlatform;\n data?: any;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXPlatform {\n resize: Subject<AXPlatformEvent> = new Subject<AXPlatformEvent>();\n directionChange: Subject<AXPlatformEvent> = new Subject<AXPlatformEvent>();\n click: Subject<AXPlatformEvent> = new Subject<AXPlatformEvent>();\n scroll: Subject<AXPlatformEvent> = new Subject<AXPlatformEvent>();\n themeMode$: BehaviorSubject<AXThemeMode> = new BehaviorSubject<AXThemeMode>('system');\n themeMode = signal<AXThemeMode>('system');\n private document = inject(DOCUMENT);\n\n isDark(): boolean {\n return this.document.documentElement.classList.contains('ax-dark');\n }\n\n isRtl(): boolean {\n return (\n this.document.dir == 'rtl' ||\n this.document.body.dir == 'rtl' ||\n this.document.body.style.direction == 'rtl'\n );\n }\n\n isLandscape(): boolean {\n return window.innerHeight < window.innerWidth;\n }\n\n isPortrate(): boolean {\n return !this.isLandscape();\n }\n\n is(name: AXPlatforms | AXBrowsers | AXTechnologies | AXScreenSizes): boolean {\n if (isBrowser()) {\n return PLATFORMS_MAP[name](window) || false;\n } else {\n return false;\n }\n }\n\n get screenSize(): AXScreenSizes {\n return (['SM', 'MD', 'LG', 'XL', '2XL', '3XL', '4XL'].find(\n (name) => PLATFORMS_MAP[name](window) == true,\n ) || '5XL') as AXScreenSizes;\n }\n\n switchLightMode() {\n const _html = this.document.getElementsByTagName('html')[0];\n _html.classList.remove('ax-dark');\n this.#setSystemTheme('light');\n return 'light';\n }\n\n switchDarkMode() {\n const _html = this.document.getElementsByTagName('html')[0];\n _html.classList.add('ax-dark');\n this.#setSystemTheme('dark');\n return 'dark';\n }\n\n switchSystemMode() {\n if (isBrowser()) {\n if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {\n const _html = this.document.getElementsByTagName('html')[0];\n _html.classList.add('ax-dark');\n this.#setSystemTheme('system-dark');\n } else {\n const _html = this.document.getElementsByTagName('html')[0];\n _html.classList.remove('ax-dark');\n this.#setSystemTheme('system-light');\n }\n }\n }\n\n #setSystemTheme(themeMode: AXThemeMode) {\n this.themeMode$.next(themeMode);\n localStorage.setItem('AX_THEME_MODE', themeMode);\n this.themeMode.set(themeMode);\n }\n\n autoDetectThemeMode() {\n const mode = localStorage.getItem('AX_THEME_MODE') || 'system';\n switch (mode) {\n case 'light':\n return this.switchLightMode();\n\n case 'dark':\n return this.switchDarkMode();\n\n case 'system':\n return this.switchSystemMode();\n }\n }\n\n private setFullHeightRatio() {\n if (isBrowser()) {\n try {\n this.document\n .querySelector<HTMLElement>(':root')\n ?.style.setProperty('--ax-vh', window.innerHeight / 100 + 'px');\n } catch (error) {\n console.error(error);\n }\n }\n }\n\n private autoSystemModeDetection(event) {\n if (this.themeMode() === 'system') {\n const themeMode = event.matches ? 'dark' : 'light';\n\n if (themeMode === 'dark') {\n const _html = this.document.getElementsByTagName('html')[0];\n _html.classList.add('ax-dark');\n } else {\n const _html = this.document.getElementsByTagName('html')[0];\n _html.classList.remove('ax-dark');\n }\n }\n }\n\n constructor() {\n if (isBrowser()) {\n this.detectDarkMode();\n this.detectOnResize();\n this.detectClickEvent();\n this.detectScrollEvent();\n this.setFullHeightRatio();\n this.detectDocumentDirectionChange();\n }\n }\n\n private detectDarkMode() {\n // fromEvent(UIEvent)(window,'')\n if (window?.matchMedia('(prefers-color-scheme: dark)').matches) {\n window?.matchMedia('(prefers-color-scheme: dark)')?.addEventListener('change', (event) => {\n // Detect System color mode\n this.autoSystemModeDetection(event);\n });\n }\n }\n\n private detectOnResize() {\n fromEvent<UIEvent>(window, 'resize')\n .pipe(debounceTime(100))\n .pipe(distinctUntilChanged())\n .subscribe((e) => {\n this.resize.next({\n nativeEvent: e,\n source: this,\n });\n //\n this.setFullHeightRatio();\n });\n }\n\n private detectClickEvent() {\n this.document.addEventListener(\n 'click',\n (e) => {\n this.click.next({\n nativeEvent: e,\n source: this,\n });\n },\n true,\n );\n }\n\n private detectScrollEvent() {\n this.document.addEventListener(\n 'scroll',\n (e) => {\n this.scroll.next({\n nativeEvent: e,\n source: this,\n });\n },\n true,\n );\n }\n\n private detectDocumentDirectionChange() {\n const observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n // Detect Direction Change\n if (mutation.attributeName === 'dir') {\n const dir = this.document.documentElement.getAttribute('dir');\n this.directionChange.next({ source: this, nativeEvent: null, data: dir });\n }\n });\n });\n observer.observe(this.document.documentElement, {\n attributes: true,\n childList: false,\n characterData: false,\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAYA,MAAM,QAAQ,GAAG,CAAC,GAAW,KAAc,aAAa,CAAC,GAAG,EAAE,SAAS,CAAC;AAExE,MAAM,SAAS,GAAG,CAAC,GAAW,KAAc,aAAa,CAAC,GAAG,EAAE,UAAU,CAAC;AAE1E,MAAM,MAAM,GAAG,CAAC,GAAW,KAAc,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC;AAEpE,MAAM,QAAQ,GAAG,CAAC,GAAW,KAAc,aAAa,CAAC,GAAG,EAAE,SAAS,CAAC;AAExE,MAAM,OAAO,GAAG,CAAC,GAAW,KAAc,aAAa,CAAC,GAAG,EAAE,QAAQ,CAAC,IAAI,aAAa,CAAC,GAAG,EAAE,MAAM,CAAC;AAEpG,MAAM,MAAM,GAAG,CAAC,GAAW,KAAc,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC,IAAI,aAAa,CAAC,GAAG,EAAE,UAAU,CAAC;AAEtG,MAAM,WAAW,GAAG,CAAC,GAAW,KAAc,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CA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;;8GAhMO,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAV,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAU,cAFT,MAAM,EAAA,CAAA,CAAA;;2FAEP,UAAU,EAAA,UAAA,EAAA,CAAA;kBAHtB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;AC3ID;;AAEG;;;;"}
@@ -1,10 +1,10 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Directive, Input, HostListener, NgModule } from '@angular/core';
2
+ import { Injectable, inject, Directive, Input, HostListener, NgModule } from '@angular/core';
3
3
  import { Subject, takeUntil } from 'rxjs';
4
4
  import tinycolor from 'tinycolor2';
5
5
  import tinygradient from 'tinygradient-es';
6
6
  import { isBrowser } from '@acorex/core/platform';
7
- import { CommonModule } from '@angular/common';
7
+ import { DOCUMENT, CommonModule } from '@angular/common';
8
8
 
9
9
  function AXAutoUnsubscriber() {
10
10
  return function (constructor) {
@@ -178,7 +178,10 @@ class AXDrawingUtil {
178
178
  static collision(a, b) {
179
179
  const ac = a.getBoundingClientRect();
180
180
  const bc = b.getBoundingClientRect();
181
- if (ac.left < bc.left + bc.width && ac.left + ac.width > bc.left && ac.top < bc.top + bc.height && ac.top + ac.height > bc.top) {
181
+ if (ac.left < bc.left + bc.width &&
182
+ ac.left + ac.width > bc.left &&
183
+ ac.top < bc.top + bc.height &&
184
+ ac.top + ac.height > bc.top) {
182
185
  return true;
183
186
  }
184
187
  else {
@@ -195,7 +198,7 @@ class AXDrawingUtil {
195
198
  });
196
199
  }
197
200
  static isInRecPoint(pos, rec) {
198
- return pos.x >= rec.left && pos.x <= rec.left + rec.width && pos.y >= rec.top && pos.y <= rec.top + rec.height;
201
+ return (pos.x >= rec.left && pos.x <= rec.left + rec.width && pos.y >= rec.top && pos.y <= rec.top + rec.height);
199
202
  }
200
203
  static convertRemToPixels(rem) {
201
204
  return rem * parseFloat(getComputedStyle(document.documentElement).fontSize);
@@ -260,6 +263,7 @@ class AXResizableDirective {
260
263
  this.el = el;
261
264
  this.renderer = renderer;
262
265
  this.zone = zone;
266
+ this.document = inject(DOCUMENT);
263
267
  this.minWidth = 100; // Minimum width for the resizable element
264
268
  this.isResizing = false;
265
269
  this.createResizeHandle(); // Initialize the resize handle
@@ -291,7 +295,7 @@ class AXResizableDirective {
291
295
  if (event.clientX >= handleRect.left && event.clientX <= handleRect.right) {
292
296
  this.zone.runOutsideAngular(() => {
293
297
  this.isResizing = true;
294
- document.body.style.cursor = 'ew-resize'; // Change cursor to resize mode
298
+ this.document.body.style.cursor = 'ew-resize'; // Change cursor to resize mode
295
299
  // Change resize handle color to blue when resizing starts
296
300
  this.renderer.setStyle(this.resizeHandle, 'background-color', '#007bff');
297
301
  event.preventDefault();
@@ -305,7 +309,7 @@ class AXResizableDirective {
305
309
  const rect = this.el.nativeElement.getBoundingClientRect();
306
310
  let newWidth;
307
311
  // Resize logic (LTR or RTL support)
308
- if (document.documentElement.dir === 'rtl') {
312
+ if (this.document.documentElement.dir === 'rtl') {
309
313
  newWidth = rect.right - event.clientX;
310
314
  }
311
315
  else {
@@ -323,7 +327,7 @@ class AXResizableDirective {
323
327
  this.zone.runOutsideAngular(() => {
324
328
  if (this.isResizing) {
325
329
  this.isResizing = false;
326
- document.body.style.cursor = 'default'; // Reset the cursor
330
+ this.document.body.style.cursor = 'default'; // Reset the cursor
327
331
  // Reset the resize handle color to default when resizing ends
328
332
  this.renderer.setStyle(this.resizeHandle, 'background-color', 'rgba(0, 0, 0, 0.2)');
329
333
  }
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-core-utils.mjs","sources":["../../../../libs/core/utils/src/lib/auto-unsubscribe.ts","../../../../libs/core/utils/src/lib/color-util.ts","../../../../libs/core/utils/src/lib/drawing-util.ts","../../../../libs/core/utils/src/lib/html-util.ts","../../../../libs/core/utils/src/lib/resize.directive.ts","../../../../libs/core/utils/src/lib/string-util.ts","../../../../libs/core/utils/src/lib/utils.module.ts","../../../../libs/core/utils/src/acorex-core-utils.ts"],"sourcesContent":["import { Injectable, OnDestroy } from '@angular/core';\nimport { Observable, Subject, takeUntil } from 'rxjs';\n\nexport function AXAutoUnsubscriber() {\n return function (constructor) {\n const orig = constructor.prototype.ngOnDestroy;\n constructor.prototype.ngOnDestroy = function () {\n for (const prop in this) {\n const property = this[prop];\n if (typeof property.subscribe === 'function') {\n property.unsubscribe();\n }\n }\n orig.apply();\n };\n };\n}\n\n@Injectable()\nexport class AXUnsubscriber implements OnDestroy {\n private readonly _destroy$ = new Subject<void>();\n\n public readonly takeUntilDestroy = <T>(origin: Observable<T> | Subject<T>): Observable<T> | Subject<T> =>\n origin.pipe(takeUntil(this._destroy$));\n\n public unsubscribe(): void {\n this._destroy$.next();\n this._destroy$.complete();\n }\n\n public ngOnDestroy(): void {\n this.unsubscribe();\n }\n}\n","export type AXColorMode = 'rgba' | 'hex' | 'hsla' | 'hsva' | null;\n\nimport tinycolor, { ColorInput } from 'tinycolor2';\nimport tinygradient, { Instance } from 'tinygradient-es';\n\nexport type AXColorFormat = ColorInput;\n\nexport class AXColorUtil {\n static to(color: AXColorFormat, mode: AXColorMode): AXColorFormat {\n const _color = tinycolor(color);\n switch (mode) {\n case 'rgba':\n return _color.toRgb();\n case 'hsla':\n return _color.toHsl();\n case 'hsva':\n return _color.toHsv();\n default:\n return _color.toHex();\n }\n }\n\n static toString(color: AXColorFormat, mode: AXColorMode = null): string {\n const _color = tinycolor(color);\n switch (mode) {\n case 'rgba':\n return _color.toRgbString();\n case 'hsla':\n return _color.toHslString();\n case 'hsva':\n return _color.toHsvString();\n\n case 'hex': {\n const rgba = _color.toRgb();\n return rgba.a != 1 ? _color.toHex8String() : _color.toHexString();\n }\n default: {\n if (typeof color == 'string') {\n if (color.toLowerCase().startsWith('#')) return this.toString(color, 'hex');\n else return this.toString(color, 'rgba');\n } else {\n return this.toString(color, 'rgba');\n }\n }\n }\n }\n\n static isValid(color: AXColorFormat): boolean {\n const _color = tinycolor(color);\n return _color.isValid();\n }\n\n static mix(baseColor: AXColorFormat, hex: AXColorFormat, percentage: number): string {\n return tinycolor.mix(baseColor, hex, percentage).toString('rgb');\n }\n\n static multiply(color1: AXColorFormat, color2: AXColorFormat): string {\n const rgb1 = tinycolor(color1).toRgb();\n const rgb2 = tinycolor(color2).toRgb();\n rgb1.b = Math.floor((rgb1.b * rgb2.b) / 255);\n rgb1.g = Math.floor((rgb1.g * rgb2.g) / 255);\n rgb1.r = Math.floor((rgb1.r * rgb2.r) / 255);\n return tinycolor('rgb ' + rgb1.r + ' ' + rgb1.g + ' ' + rgb1.b).toString('rgb');\n }\n\n static contrastToWhite(color: AXColorFormat): number {\n return tinycolor.readability('#fff', color);\n }\n\n static lighten(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).lighten(percentage);\n }\n\n static darken(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).darken(percentage);\n }\n\n static brighten(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).brighten(percentage);\n }\n\n static saturate(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).saturate(percentage);\n }\n\n static desaturate(hex: AXColorFormat) {\n return tinycolor(hex).getLuminance();\n }\n\n static equal(color1: AXColorFormat, color2: AXColorFormat): boolean {\n return tinycolor.equals(color1, color2);\n }\n\n static gradient(values: unknown[] | { color: unknown; pos: number }[]): Instance {\n return tinygradient([...values]);\n }\n\n static getLuminance(hex: AXColorFormat) {\n return tinycolor(hex).getLuminance();\n }\n\n static xyToRgb(vX, vY): string {\n vY = vY || 0.00000000001;\n const Y = 1;\n const X = (Y / vY) * vX;\n const Z = (Y / vY) * (1 - vX - vY);\n\n // Convert to RGB using Wide RGB D65 conversion.\n let rgb = [\n X * 1.656492 - Y * 0.354851 - Z * 0.255038,\n -X * 0.707196 + Y * 1.655397 + Z * 0.036152,\n X * 0.051713 - Y * 0.121364 + Z * 1.01153,\n ];\n\n // Apply reverse gamma correction.\n rgb = rgb.map((x) => (x <= 0.0031308 ? 12.92 * x : (1.0 + 0.055) * Math.pow(x, 1.0 / 2.4) - 0.055));\n\n // Bring all negative components to zero.\n rgb = rgb.map((x) => Math.max(0, x));\n\n // If one component is greater than 1, weight components by that value.\n const max = Math.max(...rgb);\n if (max > 1) {\n rgb = rgb.map((x) => x / max);\n }\n\n rgb = rgb.map((x) => Math.round(x * 255));\n\n return 'rgb(' + rgb.join(',') + ')';\n }\n\n static colorStringToHex(color) {\n // Check if the input is an RGBA color string\n const rgbaMatch = color.match(/^rgba?\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*([\\d.]+))?\\s*\\)$/i);\n if (rgbaMatch) {\n let [_, r, g, b, a] = rgbaMatch;\n r = parseInt(r, 10);\n g = parseInt(g, 10);\n b = parseInt(b, 10);\n a = a ? parseFloat(a) : 1;\n\n // Convert RGB to hex\n let hexColor = `#${((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1)}`;\n\n // Include alpha if present\n if (a < 1) {\n const alphaHex = Math.round(a * 255)\n .toString(16)\n .padStart(2, '0');\n hexColor += alphaHex;\n }\n\n return hexColor;\n }\n\n // Check if the input is a hex color string\n const hexMatch = color.match(/^#([0-9a-fA-F]{3}){1,2}$/);\n if (hexMatch) {\n return color;\n }\n\n throw new Error('Invalid color format');\n }\n}\n","export interface AXPoint {\n x: number;\n y: number;\n}\n\nexport interface AXBoundingClientRect {\n left?: number;\n top?: number;\n width?: number;\n height?: number;\n bottom?: number;\n right?: number;\n}\n// @dynamic\nexport class AXDrawingUtil {\n static collision(a: HTMLElement, b: HTMLElement): boolean {\n const ac = a.getBoundingClientRect();\n const bc = b.getBoundingClientRect();\n\n if (ac.left < bc.left + bc.width && ac.left + ac.width > bc.left && ac.top < bc.top + bc.height && ac.top + ac.height > bc.top) {\n return true;\n } else {\n return false;\n }\n }\n\n static isInElementBound(pos: AXPoint, element: HTMLElement): boolean {\n const elBound = element.getBoundingClientRect();\n return AXDrawingUtil.isInRecPoint(pos, {\n left: elBound.x,\n width: elBound.width,\n top: elBound.y,\n height: elBound.height,\n });\n }\n\n static isInRecPoint(pos: AXPoint, rec: AXBoundingClientRect | any): boolean {\n return pos.x >= rec.left && pos.x <= rec.left + rec.width && pos.y >= rec.top && pos.y <= rec.top + rec.height;\n }\n\n static convertRemToPixels(rem: number): number {\n return rem * parseFloat(getComputedStyle(document.documentElement).fontSize);\n }\n}\n","import { isBrowser } from '@acorex/core/platform';\n\n// @dynamic\nexport class AXHtmlUtil {\n\n static focusElement(element: HTMLElement): HTMLElement {\n const list = ['button', 'input', '[href]', 'select', 'textarea', '[tabindex]'].map((c) => c + ':not([tabindex=\"-1\"])');\n const focusable = element.querySelector<HTMLElement>(list.join(', '));\n if (focusable) {\n focusable.focus();\n return focusable;\n }\n return null;\n }\n\n static blurElement(element: HTMLElement): HTMLElement {\n const list = ['button', 'input', '[href]', 'select', 'textarea', '[tabindex]'].map((c) => c + ':not([tabindex=\"-1\"])');\n const focusable = element.querySelector<HTMLElement>(list.join(', '));\n if (focusable) {\n focusable.blur();\n return focusable;\n }\n return null;\n }\n\n static hasFocus(element: HTMLElement) {\n return element.matches(':focus-within') || element.matches(':focus');\n }\n\n static isRtl(element: HTMLElement) {\n if (isBrowser()) {\n const rtl = element.classList.contains('ax-rtl') || window.getComputedStyle(element, null).getPropertyValue('direction') === 'rtl';\n return rtl;\n }\n\n return false;\n }\n\n /**\n * Helper function to check if an element is scrollable\n */\n static isScrollable(element: HTMLElement): boolean {\n const overflowY = window.getComputedStyle(element).overflowY;\n return (overflowY === 'auto' || overflowY === 'scroll') && element.scrollHeight > element.clientHeight;\n }\n\n /**\n * Utility function to find scrollable parent elements\n */\n static getScrollableParents(element: HTMLElement): HTMLElement[] {\n const parents: HTMLElement[] = [];\n let currentElement: HTMLElement | null = element;\n\n while (currentElement) {\n if (AXHtmlUtil.isScrollable(currentElement)) {\n parents.push(currentElement);\n }\n currentElement = currentElement.parentElement;\n }\n\n return parents;\n }\n}\n","import { Directive, ElementRef, HostListener, Input, NgZone, Renderer2 } from '@angular/core';\n\n@Directive({\n selector: '[axResizable]', // Apply this directive on any element like <div axResizable></div>\n})\nexport class AXResizableDirective {\n @Input() minWidth = 100; // Minimum width for the resizable element\n private isResizing = false;\n private resizeHandle: HTMLElement;\n\n constructor(\n private el: ElementRef,\n private renderer: Renderer2,\n private zone: NgZone,\n ) {\n this.createResizeHandle(); // Initialize the resize handle\n }\n\n // Create the resize handle element and apply inline styles\n private createResizeHandle(): void {\n // Apply position relative to the container to allow the absolute positioning of the handle\n this.renderer.setStyle(this.el.nativeElement, 'position', 'relative');\n\n // Create the resize handle dynamically\n this.resizeHandle = this.renderer.createElement('div');\n this.renderer.addClass(this.resizeHandle, 'resize-handle');\n this.renderer.appendChild(this.el.nativeElement, this.resizeHandle);\n\n // Apply inline styles for the resize handle\n this.renderer.setStyle(this.resizeHandle, 'width', '6px'); // Resize handle width\n this.renderer.setStyle(this.resizeHandle, 'background-color', 'rgba(0, 0, 0, 0.2)');\n this.renderer.setStyle(this.resizeHandle, 'position', 'absolute');\n this.renderer.setStyle(this.resizeHandle, 'top', '0');\n this.renderer.setStyle(this.resizeHandle, 'right', '0');\n this.renderer.setStyle(this.resizeHandle, 'bottom', '0');\n this.renderer.setStyle(this.resizeHandle, 'cursor', 'ew-resize'); // Horizontal resize cursor\n this.renderer.setStyle(this.resizeHandle, 'z-index', '10');\n this.renderer.setStyle(this.resizeHandle, 'transition', 'background-color 0.2s ease');\n this.renderer.setStyle(this.resizeHandle, 'border-radius', '4px');\n }\n\n // Mouse down event: Start resizing\n @HostListener('mousedown', ['$event'])\n onMouseDown(event: MouseEvent): void {\n // Only allow resizing when clicking on the handle\n const handleRect = this.resizeHandle.getBoundingClientRect();\n if (event.clientX >= handleRect.left && event.clientX <= handleRect.right) {\n this.zone.runOutsideAngular(() => {\n this.isResizing = true;\n document.body.style.cursor = 'ew-resize'; // Change cursor to resize mode\n // Change resize handle color to blue when resizing starts\n this.renderer.setStyle(this.resizeHandle, 'background-color', '#007bff');\n event.preventDefault();\n });\n }\n }\n\n // Mouse move event: Resize the element\n @HostListener('document:mousemove', ['$event'])\n onMouseMove(event: MouseEvent): void {\n this.zone.runOutsideAngular(() => {\n if (this.isResizing) {\n const rect = this.el.nativeElement.getBoundingClientRect();\n let newWidth: number;\n\n // Resize logic (LTR or RTL support)\n if (document.documentElement.dir === 'rtl') {\n newWidth = rect.right - event.clientX;\n } else {\n newWidth = event.clientX - rect.left;\n }\n\n // Ensure the width does not go below the minimum width\n if (newWidth > this.minWidth) {\n this.renderer.setStyle(this.el.nativeElement, 'width', `${newWidth}px`);\n }\n }\n });\n }\n\n // Mouse up event: End resizing\n @HostListener('document:mouseup')\n onMouseUp(): void {\n this.zone.runOutsideAngular(() => {\n if (this.isResizing) {\n this.isResizing = false;\n document.body.style.cursor = 'default'; // Reset the cursor\n // Reset the resize handle color to default when resizing ends\n this.renderer.setStyle(this.resizeHandle, 'background-color', 'rgba(0, 0, 0, 0.2)');\n }\n });\n }\n\n // Mouse enter event to change the background color (hover effect)\n @HostListener('mouseenter', ['$event'])\n onMouseEnter(): void {\n // Only change color to blue if not resizing\n if (!this.isResizing) {\n this.renderer.setStyle(this.resizeHandle, 'background-color', '#007bff'); // Blue color on hover\n }\n }\n\n // Mouse leave event to reset the background color\n @HostListener('mouseleave', ['$event'])\n onMouseLeave(): void {\n // Only reset to default color if not resizing\n if (!this.isResizing) {\n this.renderer.setStyle(this.resizeHandle, 'background-color', 'rgba(0, 0, 0, 0.2)'); // Default background color\n }\n }\n}\n","// @dynamic\nexport class AXStringUtil {\n static getWordBoundsAtPosition(str: string, position: number): { start: number; end: number } {\n const isSpace = (c) => /[^a-zA-Z0-9]+/i.test(c);\n let start = position - 1;\n\n while (start >= 0 && !isSpace(str[start])) {\n start -= 1;\n }\n start = Math.max(0, start + 1);\n const leftSideString: any = str.slice(start).match(/[a-zA-Z0-9]+/i);\n start += leftSideString.index;\n let end = start + leftSideString[0].length;\n return {\n start,\n end,\n };\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXResizableDirective } from './resize.directive';\n\n@NgModule({\n declarations: [AXResizableDirective],\n imports: [CommonModule],\n exports: [AXResizableDirective],\n})\nexport class UtilsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;SAGgB,kBAAkB,GAAA;AAChC,IAAA,OAAO,UAAU,WAAW,EAAA;AAC1B,QAAA,MAAM,IAAI,GAAG,WAAW,CAAC,SAAS,CAAC,WAAW;AAC9C,QAAA,WAAW,CAAC,SAAS,CAAC,WAAW,GAAG,YAAA;AAClC,YAAA,KAAK,MAAM,IAAI,IAAI,IAAI,EAAE;AACvB,gBAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC;AAC3B,gBAAA,IAAI,OAAO,QAAQ,CAAC,SAAS,KAAK,UAAU,EAAE;oBAC5C,QAAQ,CAAC,WAAW,EAAE;;;YAG1B,IAAI,CAAC,KAAK,EAAE;AACd,SAAC;AACH,KAAC;AACH;MAGa,cAAc,CAAA;AAD3B,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,OAAO,EAAQ;AAEhC,QAAA,IAAA,CAAA,gBAAgB,GAAG,CAAI,MAAkC,KACvE,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAUzC;IARQ,WAAW,GAAA;AAChB,QAAA,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE;AACrB,QAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE;;IAGpB,WAAW,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AA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,EAJP,YAAA,EAAA,CAAA,oBAAoB,CACzB,EAAA,OAAA,EAAA,CAAA,YAAY,aACZ,oBAAoB,CAAA,EAAA,CAAA,CAAA;AAEnB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,YAHZ,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAGX,WAAW,EAAA,UAAA,EAAA,CAAA;kBALvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,oBAAoB,CAAC;oBACpC,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,oBAAoB,CAAC;AAChC,iBAAA;;;ACRD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-core-utils.mjs","sources":["../../../../libs/core/utils/src/lib/auto-unsubscribe.ts","../../../../libs/core/utils/src/lib/color-util.ts","../../../../libs/core/utils/src/lib/drawing-util.ts","../../../../libs/core/utils/src/lib/html-util.ts","../../../../libs/core/utils/src/lib/resize.directive.ts","../../../../libs/core/utils/src/lib/string-util.ts","../../../../libs/core/utils/src/lib/utils.module.ts","../../../../libs/core/utils/src/acorex-core-utils.ts"],"sourcesContent":["import { Injectable, OnDestroy } from '@angular/core';\nimport { Observable, Subject, takeUntil } from 'rxjs';\n\nexport function AXAutoUnsubscriber() {\n return function (constructor) {\n const orig = constructor.prototype.ngOnDestroy;\n constructor.prototype.ngOnDestroy = function () {\n for (const prop in this) {\n const property = this[prop];\n if (typeof property.subscribe === 'function') {\n property.unsubscribe();\n }\n }\n orig.apply();\n };\n };\n}\n\n@Injectable()\nexport class AXUnsubscriber implements OnDestroy {\n private readonly _destroy$ = new Subject<void>();\n\n public readonly takeUntilDestroy = <T>(origin: Observable<T> | Subject<T>): Observable<T> | Subject<T> =>\n origin.pipe(takeUntil(this._destroy$));\n\n public unsubscribe(): void {\n this._destroy$.next();\n this._destroy$.complete();\n }\n\n public ngOnDestroy(): void {\n this.unsubscribe();\n }\n}\n","export type AXColorMode = 'rgba' | 'hex' | 'hsla' | 'hsva' | null;\n\nimport tinycolor, { ColorInput } from 'tinycolor2';\nimport tinygradient, { Instance } from 'tinygradient-es';\n\nexport type AXColorFormat = ColorInput;\n\nexport class AXColorUtil {\n static to(color: AXColorFormat, mode: AXColorMode): AXColorFormat {\n const _color = tinycolor(color);\n switch (mode) {\n case 'rgba':\n return _color.toRgb();\n case 'hsla':\n return _color.toHsl();\n case 'hsva':\n return _color.toHsv();\n default:\n return _color.toHex();\n }\n }\n\n static toString(color: AXColorFormat, mode: AXColorMode = null): string {\n const _color = tinycolor(color);\n switch (mode) {\n case 'rgba':\n return _color.toRgbString();\n case 'hsla':\n return _color.toHslString();\n case 'hsva':\n return _color.toHsvString();\n\n case 'hex': {\n const rgba = _color.toRgb();\n return rgba.a != 1 ? _color.toHex8String() : _color.toHexString();\n }\n default: {\n if (typeof color == 'string') {\n if (color.toLowerCase().startsWith('#')) return this.toString(color, 'hex');\n else return this.toString(color, 'rgba');\n } else {\n return this.toString(color, 'rgba');\n }\n }\n }\n }\n\n static isValid(color: AXColorFormat): boolean {\n const _color = tinycolor(color);\n return _color.isValid();\n }\n\n static mix(baseColor: AXColorFormat, hex: AXColorFormat, percentage: number): string {\n return tinycolor.mix(baseColor, hex, percentage).toString('rgb');\n }\n\n static multiply(color1: AXColorFormat, color2: AXColorFormat): string {\n const rgb1 = tinycolor(color1).toRgb();\n const rgb2 = tinycolor(color2).toRgb();\n rgb1.b = Math.floor((rgb1.b * rgb2.b) / 255);\n rgb1.g = Math.floor((rgb1.g * rgb2.g) / 255);\n rgb1.r = Math.floor((rgb1.r * rgb2.r) / 255);\n return tinycolor('rgb ' + rgb1.r + ' ' + rgb1.g + ' ' + rgb1.b).toString('rgb');\n }\n\n static contrastToWhite(color: AXColorFormat): number {\n return tinycolor.readability('#fff', color);\n }\n\n static lighten(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).lighten(percentage);\n }\n\n static darken(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).darken(percentage);\n }\n\n static brighten(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).brighten(percentage);\n }\n\n static saturate(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).saturate(percentage);\n }\n\n static desaturate(hex: AXColorFormat) {\n return tinycolor(hex).getLuminance();\n }\n\n static equal(color1: AXColorFormat, color2: AXColorFormat): boolean {\n return tinycolor.equals(color1, color2);\n }\n\n static gradient(values: unknown[] | { color: unknown; pos: number }[]): Instance {\n return tinygradient([...values]);\n }\n\n static getLuminance(hex: AXColorFormat) {\n return tinycolor(hex).getLuminance();\n }\n\n static xyToRgb(vX, vY): string {\n vY = vY || 0.00000000001;\n const Y = 1;\n const X = (Y / vY) * vX;\n const Z = (Y / vY) * (1 - vX - vY);\n\n // Convert to RGB using Wide RGB D65 conversion.\n let rgb = [\n X * 1.656492 - Y * 0.354851 - Z * 0.255038,\n -X * 0.707196 + Y * 1.655397 + Z * 0.036152,\n X * 0.051713 - Y * 0.121364 + Z * 1.01153,\n ];\n\n // Apply reverse gamma correction.\n rgb = rgb.map((x) => (x <= 0.0031308 ? 12.92 * x : (1.0 + 0.055) * Math.pow(x, 1.0 / 2.4) - 0.055));\n\n // Bring all negative components to zero.\n rgb = rgb.map((x) => Math.max(0, x));\n\n // If one component is greater than 1, weight components by that value.\n const max = Math.max(...rgb);\n if (max > 1) {\n rgb = rgb.map((x) => x / max);\n }\n\n rgb = rgb.map((x) => Math.round(x * 255));\n\n return 'rgb(' + rgb.join(',') + ')';\n }\n\n static colorStringToHex(color) {\n // Check if the input is an RGBA color string\n const rgbaMatch = color.match(/^rgba?\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*([\\d.]+))?\\s*\\)$/i);\n if (rgbaMatch) {\n let [_, r, g, b, a] = rgbaMatch;\n r = parseInt(r, 10);\n g = parseInt(g, 10);\n b = parseInt(b, 10);\n a = a ? parseFloat(a) : 1;\n\n // Convert RGB to hex\n let hexColor = `#${((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1)}`;\n\n // Include alpha if present\n if (a < 1) {\n const alphaHex = Math.round(a * 255)\n .toString(16)\n .padStart(2, '0');\n hexColor += alphaHex;\n }\n\n return hexColor;\n }\n\n // Check if the input is a hex color string\n const hexMatch = color.match(/^#([0-9a-fA-F]{3}){1,2}$/);\n if (hexMatch) {\n return color;\n }\n\n throw new Error('Invalid color format');\n }\n}\n","export interface AXPoint {\n x: number;\n y: number;\n}\n\nexport interface AXBoundingClientRect {\n left?: number;\n top?: number;\n width?: number;\n height?: number;\n bottom?: number;\n right?: number;\n}\n// @dynamic\nexport class AXDrawingUtil {\n static collision(a: HTMLElement, b: HTMLElement): boolean {\n const ac = a.getBoundingClientRect();\n const bc = b.getBoundingClientRect();\n\n if (\n ac.left < bc.left + bc.width &&\n ac.left + ac.width > bc.left &&\n ac.top < bc.top + bc.height &&\n ac.top + ac.height > bc.top\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n static isInElementBound(pos: AXPoint, element: HTMLElement): boolean {\n const elBound = element.getBoundingClientRect();\n return AXDrawingUtil.isInRecPoint(pos, {\n left: elBound.x,\n width: elBound.width,\n top: elBound.y,\n height: elBound.height,\n });\n }\n\n static isInRecPoint(pos: AXPoint, rec: AXBoundingClientRect | any): boolean {\n return (\n pos.x >= rec.left && pos.x <= rec.left + rec.width && pos.y >= rec.top && pos.y <= rec.top + rec.height\n );\n }\n\n static convertRemToPixels(rem: number): number {\n return rem * parseFloat(getComputedStyle(document.documentElement).fontSize);\n }\n}\n","import { isBrowser } from '@acorex/core/platform';\n\n// @dynamic\nexport class AXHtmlUtil {\n\n static focusElement(element: HTMLElement): HTMLElement {\n const list = ['button', 'input', '[href]', 'select', 'textarea', '[tabindex]'].map((c) => c + ':not([tabindex=\"-1\"])');\n const focusable = element.querySelector<HTMLElement>(list.join(', '));\n if (focusable) {\n focusable.focus();\n return focusable;\n }\n return null;\n }\n\n static blurElement(element: HTMLElement): HTMLElement {\n const list = ['button', 'input', '[href]', 'select', 'textarea', '[tabindex]'].map((c) => c + ':not([tabindex=\"-1\"])');\n const focusable = element.querySelector<HTMLElement>(list.join(', '));\n if (focusable) {\n focusable.blur();\n return focusable;\n }\n return null;\n }\n\n static hasFocus(element: HTMLElement) {\n return element.matches(':focus-within') || element.matches(':focus');\n }\n\n static isRtl(element: HTMLElement) {\n if (isBrowser()) {\n const rtl = element.classList.contains('ax-rtl') || window.getComputedStyle(element, null).getPropertyValue('direction') === 'rtl';\n return rtl;\n }\n\n return false;\n }\n\n /**\n * Helper function to check if an element is scrollable\n */\n static isScrollable(element: HTMLElement): boolean {\n const overflowY = window.getComputedStyle(element).overflowY;\n return (overflowY === 'auto' || overflowY === 'scroll') && element.scrollHeight > element.clientHeight;\n }\n\n /**\n * Utility function to find scrollable parent elements\n */\n static getScrollableParents(element: HTMLElement): HTMLElement[] {\n const parents: HTMLElement[] = [];\n let currentElement: HTMLElement | null = element;\n\n while (currentElement) {\n if (AXHtmlUtil.isScrollable(currentElement)) {\n parents.push(currentElement);\n }\n currentElement = currentElement.parentElement;\n }\n\n return parents;\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport { Directive, ElementRef, HostListener, inject, Input, NgZone, Renderer2 } from '@angular/core';\n\n@Directive({\n selector: '[axResizable]', // Apply this directive on any element like <div axResizable></div>\n})\nexport class AXResizableDirective {\n private document = inject(DOCUMENT);\n @Input() minWidth = 100; // Minimum width for the resizable element\n private isResizing = false;\n private resizeHandle: HTMLElement;\n\n constructor(\n private el: ElementRef,\n private renderer: Renderer2,\n private zone: NgZone,\n ) {\n this.createResizeHandle(); // Initialize the resize handle\n }\n\n // Create the resize handle element and apply inline styles\n private createResizeHandle(): void {\n // Apply position relative to the container to allow the absolute positioning of the handle\n this.renderer.setStyle(this.el.nativeElement, 'position', 'relative');\n\n // Create the resize handle dynamically\n this.resizeHandle = this.renderer.createElement('div');\n this.renderer.addClass(this.resizeHandle, 'resize-handle');\n this.renderer.appendChild(this.el.nativeElement, this.resizeHandle);\n\n // Apply inline styles for the resize handle\n this.renderer.setStyle(this.resizeHandle, 'width', '6px'); // Resize handle width\n this.renderer.setStyle(this.resizeHandle, 'background-color', 'rgba(0, 0, 0, 0.2)');\n this.renderer.setStyle(this.resizeHandle, 'position', 'absolute');\n this.renderer.setStyle(this.resizeHandle, 'top', '0');\n this.renderer.setStyle(this.resizeHandle, 'right', '0');\n this.renderer.setStyle(this.resizeHandle, 'bottom', '0');\n this.renderer.setStyle(this.resizeHandle, 'cursor', 'ew-resize'); // Horizontal resize cursor\n this.renderer.setStyle(this.resizeHandle, 'z-index', '10');\n this.renderer.setStyle(this.resizeHandle, 'transition', 'background-color 0.2s ease');\n this.renderer.setStyle(this.resizeHandle, 'border-radius', '4px');\n }\n\n // Mouse down event: Start resizing\n @HostListener('mousedown', ['$event'])\n onMouseDown(event: MouseEvent): void {\n // Only allow resizing when clicking on the handle\n const handleRect = this.resizeHandle.getBoundingClientRect();\n if (event.clientX >= handleRect.left && event.clientX <= handleRect.right) {\n this.zone.runOutsideAngular(() => {\n this.isResizing = true;\n this.document.body.style.cursor = 'ew-resize'; // Change cursor to resize mode\n // Change resize handle color to blue when resizing starts\n this.renderer.setStyle(this.resizeHandle, 'background-color', '#007bff');\n event.preventDefault();\n });\n }\n }\n\n // Mouse move event: Resize the element\n @HostListener('document:mousemove', ['$event'])\n onMouseMove(event: MouseEvent): void {\n this.zone.runOutsideAngular(() => {\n if (this.isResizing) {\n const rect = this.el.nativeElement.getBoundingClientRect();\n let newWidth: number;\n\n // Resize logic (LTR or RTL support)\n if (this.document.documentElement.dir === 'rtl') {\n newWidth = rect.right - event.clientX;\n } else {\n newWidth = event.clientX - rect.left;\n }\n\n // Ensure the width does not go below the minimum width\n if (newWidth > this.minWidth) {\n this.renderer.setStyle(this.el.nativeElement, 'width', `${newWidth}px`);\n }\n }\n });\n }\n\n // Mouse up event: End resizing\n @HostListener('document:mouseup')\n onMouseUp(): void {\n this.zone.runOutsideAngular(() => {\n if (this.isResizing) {\n this.isResizing = false;\n this.document.body.style.cursor = 'default'; // Reset the cursor\n // Reset the resize handle color to default when resizing ends\n this.renderer.setStyle(this.resizeHandle, 'background-color', 'rgba(0, 0, 0, 0.2)');\n }\n });\n }\n\n // Mouse enter event to change the background color (hover effect)\n @HostListener('mouseenter', ['$event'])\n onMouseEnter(): void {\n // Only change color to blue if not resizing\n if (!this.isResizing) {\n this.renderer.setStyle(this.resizeHandle, 'background-color', '#007bff'); // Blue color on hover\n }\n }\n\n // Mouse leave event to reset the background color\n @HostListener('mouseleave', ['$event'])\n onMouseLeave(): void {\n // Only reset to default color if not resizing\n if (!this.isResizing) {\n this.renderer.setStyle(this.resizeHandle, 'background-color', 'rgba(0, 0, 0, 0.2)'); // Default background color\n }\n }\n}\n","// @dynamic\nexport class AXStringUtil {\n static getWordBoundsAtPosition(str: string, position: number): { start: number; end: number } {\n const isSpace = (c) => /[^a-zA-Z0-9]+/i.test(c);\n let start = position - 1;\n\n while (start >= 0 && !isSpace(str[start])) {\n start -= 1;\n }\n start = Math.max(0, start + 1);\n const leftSideString: any = str.slice(start).match(/[a-zA-Z0-9]+/i);\n start += leftSideString.index;\n let end = start + leftSideString[0].length;\n return {\n start,\n end,\n };\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXResizableDirective } from './resize.directive';\n\n@NgModule({\n declarations: [AXResizableDirective],\n imports: [CommonModule],\n exports: [AXResizableDirective],\n})\nexport class UtilsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"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AAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,YAHZ,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAGX,WAAW,EAAA,UAAA,EAAA,CAAA;kBALvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,oBAAoB,CAAC;oBACpC,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,oBAAoB,CAAC;AAChC,iBAAA;;;ACRD;;AAEG;;;;"}
@@ -1,5 +1,6 @@
1
1
  import * as i0 from "@angular/core";
2
2
  export declare class AXFileService {
3
+ private document;
3
4
  choose(options?: {
4
5
  accept?: string;
5
6
  multiple?: boolean;
@@ -1,5 +1,6 @@
1
1
  import * as i0 from "@angular/core";
2
2
  export declare class AXImageService {
3
+ private document;
3
4
  resize(options: {
4
5
  maxSize: number;
5
6
  source: HTMLImageElement | File;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acorex/core",
3
- "version": "18.14.1-next.5",
3
+ "version": "18.15.1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=18.2.0",
6
6
  "@angular/core": ">=18.2.0",
@@ -21,6 +21,7 @@ export declare class AXPlatform {
21
21
  scroll: Subject<AXPlatformEvent>;
22
22
  themeMode$: BehaviorSubject<AXThemeMode>;
23
23
  themeMode: import("@angular/core").WritableSignal<AXThemeMode>;
24
+ private document;
24
25
  isDark(): boolean;
25
26
  isRtl(): boolean;
26
27
  isLandscape(): boolean;
@@ -4,6 +4,7 @@ export declare class AXResizableDirective {
4
4
  private el;
5
5
  private renderer;
6
6
  private zone;
7
+ private document;
7
8
  minWidth: number;
8
9
  private isResizing;
9
10
  private resizeHandle;