@filip.mazev/blocks-core 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -0
- package/fesm2022/filip.mazev-blocks-core.mjs +389 -0
- package/fesm2022/filip.mazev-blocks-core.mjs.map +1 -0
- package/package.json +31 -0
- package/src/lib/styles/_index.scss +5 -0
- package/src/lib/styles/_mixins.scss +20 -0
- package/src/lib/styles/_theme-provider.scss +23 -0
- package/src/lib/styles/_variables.scss +40 -0
- package/src/lib/styles/themes/_default-theme.scss +113 -0
- package/src/lib/styles/themes/_orange-company-theme.scss +112 -0
- package/types/filip.mazev-blocks-core.d.ts +146 -0
package/README.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# UiServices
|
|
2
|
+
|
|
3
|
+
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.2.0.
|
|
4
|
+
|
|
5
|
+
## Code scaffolding
|
|
6
|
+
|
|
7
|
+
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
ng generate component component-name
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
ng generate --help
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Building
|
|
20
|
+
|
|
21
|
+
To build the library, run:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
ng build blocks-core
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
|
|
28
|
+
|
|
29
|
+
### Publishing the Library
|
|
30
|
+
|
|
31
|
+
Once the project is built, you can publish your library by following these steps:
|
|
32
|
+
|
|
33
|
+
1. Navigate to the `dist` directory:
|
|
34
|
+
```bash
|
|
35
|
+
cd dist/blocks-core
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
2. Run the `npm publish` command to publish your library to the npm registry:
|
|
39
|
+
```bash
|
|
40
|
+
npm publish
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Running unit tests
|
|
44
|
+
|
|
45
|
+
To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
ng test
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Running end-to-end tests
|
|
52
|
+
|
|
53
|
+
For end-to-end (e2e) testing, run:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
ng e2e
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
|
|
60
|
+
|
|
61
|
+
## Additional Resources
|
|
62
|
+
|
|
63
|
+
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
|
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, inject } from '@angular/core';
|
|
3
|
+
import { BehaviorSubject, ReplaySubject } from 'rxjs';
|
|
4
|
+
|
|
5
|
+
var DesktopOS;
|
|
6
|
+
(function (DesktopOS) {
|
|
7
|
+
DesktopOS["Linux"] = "linux";
|
|
8
|
+
DesktopOS["MacOS"] = "mac_os";
|
|
9
|
+
DesktopOS["Unix"] = "unix";
|
|
10
|
+
DesktopOS["Unknown"] = "unknown";
|
|
11
|
+
DesktopOS["Windows"] = "windows";
|
|
12
|
+
})(DesktopOS || (DesktopOS = {}));
|
|
13
|
+
|
|
14
|
+
var MobileOS;
|
|
15
|
+
(function (MobileOS) {
|
|
16
|
+
MobileOS["Android"] = "android";
|
|
17
|
+
MobileOS["iOS"] = "ios";
|
|
18
|
+
MobileOS["Unknown"] = "unknown";
|
|
19
|
+
MobileOS["WindowsPhone"] = "Windows Phone";
|
|
20
|
+
})(MobileOS || (MobileOS = {}));
|
|
21
|
+
|
|
22
|
+
class DeviceTypeService {
|
|
23
|
+
userAgent = navigator.userAgent || navigator.vendor || window.opera || undefined;
|
|
24
|
+
isDesktopDevice = !this.isMobileDevice() && !this.isTabletDevice();
|
|
25
|
+
isMobileDevice() {
|
|
26
|
+
const regexs = [/(Android)(.+)(Mobile)/i, /BlackBerry/i, /iPhone|iPod/i, /Opera Mini/i, /IEMobile/i];
|
|
27
|
+
return regexs.some(b => this.userAgent.match(b) !== null);
|
|
28
|
+
}
|
|
29
|
+
isTabletDevice() {
|
|
30
|
+
const regex = /(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/;
|
|
31
|
+
return regex.test(this.userAgent.toLowerCase());
|
|
32
|
+
}
|
|
33
|
+
getMobileOS() {
|
|
34
|
+
if (this.isMobileDevice()) {
|
|
35
|
+
if (/windows phone/i.test(this.userAgent))
|
|
36
|
+
return MobileOS.WindowsPhone;
|
|
37
|
+
else if (/android/i.test(this.userAgent))
|
|
38
|
+
return MobileOS.Android;
|
|
39
|
+
else if (/iPad|iPhone|iPod/.test(this.userAgent) && !window.MSStream)
|
|
40
|
+
return MobileOS.iOS;
|
|
41
|
+
return MobileOS.Unknown;
|
|
42
|
+
}
|
|
43
|
+
else
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
46
|
+
getDesktopOS() {
|
|
47
|
+
if (this.isDesktopDevice) {
|
|
48
|
+
if (this.userAgent.indexOf('Win') !== -1)
|
|
49
|
+
return DesktopOS.Windows;
|
|
50
|
+
else if (this.userAgent.indexOf('Mac') !== -1)
|
|
51
|
+
return DesktopOS.MacOS;
|
|
52
|
+
else if (this.userAgent.indexOf('X11') !== -1)
|
|
53
|
+
return DesktopOS.Unix;
|
|
54
|
+
else if (this.userAgent.indexOf('Linux') !== -1)
|
|
55
|
+
return DesktopOS.Linux;
|
|
56
|
+
return DesktopOS.Unknown;
|
|
57
|
+
}
|
|
58
|
+
else
|
|
59
|
+
return undefined;
|
|
60
|
+
}
|
|
61
|
+
getDeviceOS() {
|
|
62
|
+
return this.getMobileOS() ?? this.getDesktopOS();
|
|
63
|
+
}
|
|
64
|
+
supportedScreenOrientation = (screen?.orientation || {}).type ?? screen.mozOrientation ?? screen.msOrientation;
|
|
65
|
+
safariScreenOrientation = !screen?.orientation && matchMedia('(orientation: portrait)').matches ? 'portrait-primary' : 'landscape-primary';
|
|
66
|
+
initialScreenOrientation = this.supportedScreenOrientation ?? this.safariScreenOrientation ?? 'portrait-primary';
|
|
67
|
+
screenOrientation = this.initialScreenOrientation;
|
|
68
|
+
constructor() {
|
|
69
|
+
if (screen.orientation) {
|
|
70
|
+
screen.orientation.addEventListener('change', (ev) => (this.screenOrientation = (ev.target ?? {}).type));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
isLandscapeOrientation() {
|
|
74
|
+
return ['landscape-primary', 'landscape-secondary'].includes(this.screenOrientation);
|
|
75
|
+
}
|
|
76
|
+
isPortraitOrientation() {
|
|
77
|
+
return ['portrait-primary', 'portrait-secondary'].includes(this.screenOrientation);
|
|
78
|
+
}
|
|
79
|
+
getDeviceState() {
|
|
80
|
+
const isDesktop = this.isDesktopDevice;
|
|
81
|
+
const isMobile = this.isMobileDevice();
|
|
82
|
+
const isTablet = this.isTabletDevice();
|
|
83
|
+
const mobileOS = this.getMobileOS();
|
|
84
|
+
const isAndroidDevice = this.getDeviceOS() === MobileOS.Android;
|
|
85
|
+
const isAppleDevice = this.getDeviceOS() === MobileOS.iOS || this.getDeviceOS() === DesktopOS.MacOS;
|
|
86
|
+
const isUnknownMobileDevice = this.getDeviceOS() === MobileOS.Unknown;
|
|
87
|
+
const desktopOS = this.getDesktopOS();
|
|
88
|
+
const isWindowsDesktop = this.getDeviceOS() === DesktopOS.Windows;
|
|
89
|
+
const isLinuxOrUnixDesktop = this.getDeviceOS() === DesktopOS.Linux || this.getDeviceOS() === DesktopOS.Unix;
|
|
90
|
+
return {
|
|
91
|
+
isDesktop,
|
|
92
|
+
desktopOS,
|
|
93
|
+
isWindowsDesktop,
|
|
94
|
+
isLinuxOrUnixDesktop,
|
|
95
|
+
isMobile,
|
|
96
|
+
mobileOS,
|
|
97
|
+
isAndroidDevice,
|
|
98
|
+
isAppleDevice,
|
|
99
|
+
isUnknownMobileDevice,
|
|
100
|
+
isTablet,
|
|
101
|
+
isLandscapeOrientation: () => this.isLandscapeOrientation(),
|
|
102
|
+
isPortraitOrientation: () => this.isPortraitOrientation()
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: DeviceTypeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
106
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: DeviceTypeService, providedIn: 'root' });
|
|
107
|
+
}
|
|
108
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: DeviceTypeService, decorators: [{
|
|
109
|
+
type: Injectable,
|
|
110
|
+
args: [{
|
|
111
|
+
providedIn: 'root'
|
|
112
|
+
}]
|
|
113
|
+
}], ctorParameters: () => [] });
|
|
114
|
+
|
|
115
|
+
class WindowDimensionsService {
|
|
116
|
+
windowDimensionsSubject = new BehaviorSubject(this.getWindowDimensions());
|
|
117
|
+
constructor() {
|
|
118
|
+
this.handleResize();
|
|
119
|
+
window.addEventListener('resize', this.handleResize.bind(this));
|
|
120
|
+
}
|
|
121
|
+
getWindowDimensions() {
|
|
122
|
+
return {
|
|
123
|
+
width: window.innerWidth,
|
|
124
|
+
height: window.innerHeight,
|
|
125
|
+
threshold_xs: 360,
|
|
126
|
+
threshold_sm: 640,
|
|
127
|
+
threshold_md: 768,
|
|
128
|
+
threshold_lg: 1024,
|
|
129
|
+
threshold_xl: 1280,
|
|
130
|
+
threshold_2xl: 1536,
|
|
131
|
+
threshold_3xl: 1920,
|
|
132
|
+
threshold_4xl: 2560,
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
handleResize() {
|
|
136
|
+
this.windowDimensionsSubject.next(this.getWindowDimensions());
|
|
137
|
+
}
|
|
138
|
+
getWindowDimensions$() {
|
|
139
|
+
return this.windowDimensionsSubject.asObservable();
|
|
140
|
+
}
|
|
141
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: WindowDimensionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
142
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: WindowDimensionsService, providedIn: 'root' });
|
|
143
|
+
}
|
|
144
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: WindowDimensionsService, decorators: [{
|
|
145
|
+
type: Injectable,
|
|
146
|
+
args: [{
|
|
147
|
+
providedIn: 'root',
|
|
148
|
+
}]
|
|
149
|
+
}], ctorParameters: () => [] });
|
|
150
|
+
|
|
151
|
+
const SCROLL_LOCK_INSTANCE_IDENTIFIER = 'scroll_lock_instance_';
|
|
152
|
+
|
|
153
|
+
class ScrollLockService {
|
|
154
|
+
deviceTypeService = inject(DeviceTypeService);
|
|
155
|
+
windowDimensionSerivce = inject(WindowDimensionsService);
|
|
156
|
+
instanceId;
|
|
157
|
+
configurationInstances = new Map();
|
|
158
|
+
windowDimensions = {};
|
|
159
|
+
constructor() {
|
|
160
|
+
this.instanceId = SCROLL_LOCK_INSTANCE_IDENTIFIER + Math.random().toString(36).substring(2, 9);
|
|
161
|
+
this.windowDimensionSerivce.getWindowDimensions$().subscribe((dimensions) => {
|
|
162
|
+
this.windowDimensions = dimensions;
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
ngOnDestroy() {
|
|
166
|
+
this.enableScroll();
|
|
167
|
+
}
|
|
168
|
+
disableScroll(config) {
|
|
169
|
+
document.body.style.setProperty('overflow', 'hidden', 'important');
|
|
170
|
+
const documentWidth = document.documentElement.clientWidth;
|
|
171
|
+
const windowWidth = window.innerWidth;
|
|
172
|
+
const scrollBarWidth = windowWidth - documentWidth;
|
|
173
|
+
document.body.style.paddingRight = scrollBarWidth + 'px';
|
|
174
|
+
document.body.style.setProperty('padding-right', scrollBarWidth + 'px', 'important');
|
|
175
|
+
if (config.handleTouchInput !== false) {
|
|
176
|
+
document.body.style.setProperty('touch-action', 'none', 'important');
|
|
177
|
+
}
|
|
178
|
+
this.configurationInstances.set(this.instanceId, config);
|
|
179
|
+
if (config.mainContainer !== undefined && config.mainContainer.parentElement !== null) {
|
|
180
|
+
let currentNode = config.mainContainer.parentElement;
|
|
181
|
+
while (currentNode !== null) {
|
|
182
|
+
currentNode.style.setProperty('overflow', 'hidden', 'important');
|
|
183
|
+
if (config.handleTouchInput !== false) {
|
|
184
|
+
currentNode.addEventListener('touchmove', (event) => this.handleTouchMove(event), { passive: false });
|
|
185
|
+
currentNode.style.setProperty('touch-action', 'none', 'important');
|
|
186
|
+
}
|
|
187
|
+
currentNode = currentNode.parentElement;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
setTimeout(() => {
|
|
191
|
+
if (config.handleTouchInput !== false) {
|
|
192
|
+
document.body.addEventListener('touchmove', (event) => this.handleTouchMove(event), { passive: false });
|
|
193
|
+
}
|
|
194
|
+
if (config.handleExtremeOverflow !== false) {
|
|
195
|
+
const options = { passive: false };
|
|
196
|
+
window.addEventListener('wheel', this.preventDefault, options);
|
|
197
|
+
window.addEventListener('mousewheel', this.preventDefault, options);
|
|
198
|
+
window.addEventListener('scroll', this.preventDefault, options);
|
|
199
|
+
window.addEventListener('DOMMouseScroll', this.preventDefault, options);
|
|
200
|
+
}
|
|
201
|
+
}, (config.animationDuration ?? 0) + 10);
|
|
202
|
+
}
|
|
203
|
+
enableScroll(extreme_overflow) {
|
|
204
|
+
document.body.style.removeProperty('overflow');
|
|
205
|
+
document.body.style.removeProperty('padding-right');
|
|
206
|
+
let currentConfiguration = this.configurationInstances.get(this.instanceId);
|
|
207
|
+
if (currentConfiguration && currentConfiguration.handleTouchInput !== false) {
|
|
208
|
+
document.body.removeEventListener('touchmove', this.handleTouchMove);
|
|
209
|
+
document.body.style.removeProperty('touch-action');
|
|
210
|
+
}
|
|
211
|
+
if (currentConfiguration !== undefined && currentConfiguration.mainContainer !== undefined && currentConfiguration.mainContainer.parentElement !== null) {
|
|
212
|
+
let currentNode = currentConfiguration.mainContainer.parentElement;
|
|
213
|
+
while (currentNode !== null) {
|
|
214
|
+
currentNode.style.removeProperty('overflow');
|
|
215
|
+
if (currentConfiguration.handleTouchInput !== false) {
|
|
216
|
+
currentNode.removeEventListener('touchmove', this.preventDefault);
|
|
217
|
+
currentNode.style.removeProperty('touch-action');
|
|
218
|
+
}
|
|
219
|
+
currentNode = currentNode.parentElement;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
this.configurationInstances.delete(this.instanceId);
|
|
223
|
+
if (extreme_overflow !== false) {
|
|
224
|
+
window.removeEventListener('wheel', this.preventDefault);
|
|
225
|
+
window.removeEventListener('mousewheel', this.preventDefault);
|
|
226
|
+
window.removeEventListener('scroll', this.preventDefault);
|
|
227
|
+
window.removeEventListener('DOMMouseScroll', this.preventDefault);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
handleTouchMove(event) {
|
|
231
|
+
const targetNode = event.target;
|
|
232
|
+
const currentConfiguration = this.configurationInstances.get(this.instanceId);
|
|
233
|
+
if (!this.isAllowedToScroll(targetNode) && (currentConfiguration === null || currentConfiguration?.handleTouchInput !== false)) {
|
|
234
|
+
if (currentConfiguration === null || currentConfiguration?.mobileOnlyTouchPrevention !== true ||
|
|
235
|
+
(currentConfiguration?.mobileOnlyTouchPrevention === true && ((!this.deviceTypeService.getDeviceState().isMobile || !this.deviceTypeService.getDeviceState().isTablet)
|
|
236
|
+
&& (this.windowDimensions.width < this.windowDimensions.threshold_sm)))) {
|
|
237
|
+
event.preventDefault();
|
|
238
|
+
event.stopPropagation();
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
isAllowedToScroll(targetNode) {
|
|
243
|
+
const currentConfiguration = this.configurationInstances.get(this.instanceId);
|
|
244
|
+
if (!currentConfiguration?.allowTouchInputOn || currentConfiguration.allowTouchInputOn.length === 0) {
|
|
245
|
+
return true;
|
|
246
|
+
}
|
|
247
|
+
if (currentConfiguration.allowTouchInputOn.length === undefined) {
|
|
248
|
+
return currentConfiguration.allowTouchInputOn.contains(targetNode);
|
|
249
|
+
}
|
|
250
|
+
for (const element of currentConfiguration.allowTouchInputOn) {
|
|
251
|
+
if (element.contains(targetNode)) {
|
|
252
|
+
return true;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
return false;
|
|
256
|
+
}
|
|
257
|
+
preventDefault(event) {
|
|
258
|
+
event.preventDefault();
|
|
259
|
+
event.stopPropagation();
|
|
260
|
+
}
|
|
261
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: ScrollLockService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
262
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: ScrollLockService, providedIn: 'root' });
|
|
263
|
+
}
|
|
264
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: ScrollLockService, decorators: [{
|
|
265
|
+
type: Injectable,
|
|
266
|
+
args: [{
|
|
267
|
+
providedIn: 'root'
|
|
268
|
+
}]
|
|
269
|
+
}], ctorParameters: () => [] });
|
|
270
|
+
|
|
271
|
+
const ITEM_COPY_DEFAULT_SUFFIX = "Copy";
|
|
272
|
+
|
|
273
|
+
class TextFormattingService {
|
|
274
|
+
constructor() { }
|
|
275
|
+
generateNameCopy(originalName, existingNames = undefined, copySuffix = ITEM_COPY_DEFAULT_SUFFIX) {
|
|
276
|
+
const existingNamesToLower = existingNames?.map(item => item.toLowerCase()) ?? [];
|
|
277
|
+
let newName = `${originalName} (Copy)`;
|
|
278
|
+
let copyIndex = 2;
|
|
279
|
+
while (existingNamesToLower.includes(newName.toLowerCase())) {
|
|
280
|
+
newName = `${originalName} (${copySuffix} ${copyIndex++})`;
|
|
281
|
+
}
|
|
282
|
+
return newName;
|
|
283
|
+
}
|
|
284
|
+
formattedDateString(date) {
|
|
285
|
+
if (!date)
|
|
286
|
+
return undefined;
|
|
287
|
+
const dateObj = (date instanceof Date) ? date : new Date(date);
|
|
288
|
+
return dateObj.toLocaleDateString(undefined, {
|
|
289
|
+
year: 'numeric',
|
|
290
|
+
month: 'short',
|
|
291
|
+
day: 'numeric',
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: TextFormattingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
295
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: TextFormattingService, providedIn: 'root' });
|
|
296
|
+
}
|
|
297
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: TextFormattingService, decorators: [{
|
|
298
|
+
type: Injectable,
|
|
299
|
+
args: [{
|
|
300
|
+
providedIn: 'root'
|
|
301
|
+
}]
|
|
302
|
+
}], ctorParameters: () => [] });
|
|
303
|
+
|
|
304
|
+
class UiActionsService {
|
|
305
|
+
downloadFile(data, filename, mimeType) {
|
|
306
|
+
const blob = new Blob([data], { type: mimeType });
|
|
307
|
+
const url = window.URL.createObjectURL(blob);
|
|
308
|
+
const a = document.createElement('a');
|
|
309
|
+
a.href = url;
|
|
310
|
+
a.download = filename;
|
|
311
|
+
document.body.appendChild(a);
|
|
312
|
+
a.click();
|
|
313
|
+
document.body.removeChild(a);
|
|
314
|
+
window.URL.revokeObjectURL(url);
|
|
315
|
+
}
|
|
316
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiActionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
317
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiActionsService, providedIn: 'root' });
|
|
318
|
+
}
|
|
319
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: UiActionsService, decorators: [{
|
|
320
|
+
type: Injectable,
|
|
321
|
+
args: [{
|
|
322
|
+
providedIn: 'root'
|
|
323
|
+
}]
|
|
324
|
+
}] });
|
|
325
|
+
|
|
326
|
+
class ThemingService {
|
|
327
|
+
mediaQueryList;
|
|
328
|
+
mediaQueryListener;
|
|
329
|
+
applicationThemeSubject = new ReplaySubject(1);
|
|
330
|
+
systemThemeSubject = new BehaviorSubject(this.detectSystemTheme());
|
|
331
|
+
constructor() {
|
|
332
|
+
this.mediaQueryList = window.matchMedia('(prefers-color-scheme: dark)');
|
|
333
|
+
this.createSubscription();
|
|
334
|
+
}
|
|
335
|
+
ngOnDestroy() {
|
|
336
|
+
if (this.mediaQueryListener) {
|
|
337
|
+
this.mediaQueryList.removeEventListener('change', this.mediaQueryListener);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
createSubscription() {
|
|
341
|
+
this.handleSystemThemeChange(this.mediaQueryList);
|
|
342
|
+
this.mediaQueryListener = (event) => this.handleSystemThemeChange(event);
|
|
343
|
+
this.mediaQueryList.addEventListener('change', this.mediaQueryListener);
|
|
344
|
+
}
|
|
345
|
+
handleSystemThemeChange(eventOrList) {
|
|
346
|
+
const isDark = eventOrList.matches;
|
|
347
|
+
const theme = isDark ? 'dark' : 'light';
|
|
348
|
+
this.systemThemeSubject.next(theme);
|
|
349
|
+
}
|
|
350
|
+
detectSystemTheme() {
|
|
351
|
+
const isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
352
|
+
return isDarkMode ? 'dark' : 'light';
|
|
353
|
+
}
|
|
354
|
+
getApplicationTheme$() {
|
|
355
|
+
return this.applicationThemeSubject.asObservable();
|
|
356
|
+
}
|
|
357
|
+
getSystemTheme$() {
|
|
358
|
+
return this.systemThemeSubject.asObservable();
|
|
359
|
+
}
|
|
360
|
+
getSystemTheme() {
|
|
361
|
+
return this.systemThemeSubject.value;
|
|
362
|
+
}
|
|
363
|
+
setApplicationTheme(theme) {
|
|
364
|
+
this.applicationThemeSubject.next(theme);
|
|
365
|
+
}
|
|
366
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: ThemingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
367
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: ThemingService, providedIn: 'root' });
|
|
368
|
+
}
|
|
369
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: ThemingService, decorators: [{
|
|
370
|
+
type: Injectable,
|
|
371
|
+
args: [{
|
|
372
|
+
providedIn: 'root'
|
|
373
|
+
}]
|
|
374
|
+
}], ctorParameters: () => [] });
|
|
375
|
+
|
|
376
|
+
function uuidv4() {
|
|
377
|
+
return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => (+c ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (+c / 4)))).toString(16));
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/*
|
|
381
|
+
* Public API Surface of blocks-core
|
|
382
|
+
*/
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Generated bundle index. Do not edit.
|
|
386
|
+
*/
|
|
387
|
+
|
|
388
|
+
export { DesktopOS, DeviceTypeService, ITEM_COPY_DEFAULT_SUFFIX, MobileOS, ScrollLockService, TextFormattingService, ThemingService, UiActionsService, WindowDimensionsService, uuidv4 };
|
|
389
|
+
//# sourceMappingURL=filip.mazev-blocks-core.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filip.mazev-blocks-core.mjs","sources":["../../../projects/blocks-core/src/lib/enums/desktop-os.enum.ts","../../../projects/blocks-core/src/lib/enums/mobile-os.enum.ts","../../../projects/blocks-core/src/lib/services/device-type.service.ts","../../../projects/blocks-core/src/lib/services/window-dimension.service.ts","../../../projects/blocks-core/src/lib/constants/scroll-lock.constants.ts","../../../projects/blocks-core/src/lib/services/scroll-lock.service.ts","../../../projects/blocks-core/src/lib/constants/ui-services-common.consants.ts","../../../projects/blocks-core/src/lib/services/text-formatting.service.ts","../../../projects/blocks-core/src/lib/services/ui-actions.service.ts","../../../projects/blocks-core/src/lib/services/theming.service.ts","../../../projects/blocks-core/src/lib/helpers/uui4.ts","../../../projects/blocks-core/src/public-api.ts","../../../projects/blocks-core/src/filip.mazev-blocks-core.ts"],"sourcesContent":["export enum DesktopOS {\n Linux = 'linux',\n MacOS = 'mac_os',\n Unix = 'unix',\n Unknown = 'unknown',\n Windows = 'windows'\n}","export enum MobileOS {\n Android = 'android',\n iOS = 'ios',\n Unknown = 'unknown',\n WindowsPhone = 'Windows Phone'\n}","import { Injectable } from '@angular/core';\nimport { DesktopOS } from '../enums/desktop-os.enum';\nimport { MobileOS } from '../enums/mobile-os.enum';\nimport { DeviceState } from '../interfaces/device-state.interface';\nimport { DeviceOS, DeviceOrientationType } from '../types/device.types';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DeviceTypeService {\n private userAgent: string = navigator.userAgent || navigator.vendor || (window as any).opera || undefined;\n private isDesktopDevice: boolean = !this.isMobileDevice() && !this.isTabletDevice();\n\n private isMobileDevice(): boolean {\n const regexs = [/(Android)(.+)(Mobile)/i, /BlackBerry/i, /iPhone|iPod/i, /Opera Mini/i, /IEMobile/i];\n return regexs.some(b => this.userAgent.match(b) !== null);\n }\n\n private isTabletDevice(): boolean {\n const regex = /(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/;\n return regex.test(this.userAgent.toLowerCase());\n }\n\n private getMobileOS(): MobileOS | undefined {\n if (this.isMobileDevice()) {\n if (/windows phone/i.test(this.userAgent)) return MobileOS.WindowsPhone;\n else if (/android/i.test(this.userAgent)) return MobileOS.Android;\n else if (/iPad|iPhone|iPod/.test(this.userAgent) && !(window as any).MSStream) return MobileOS.iOS;\n\n return MobileOS.Unknown;\n } else return undefined;\n }\n\n private getDesktopOS(): DesktopOS | undefined {\n if (this.isDesktopDevice) {\n if (this.userAgent.indexOf('Win') !== -1) return DesktopOS.Windows;\n else if (this.userAgent.indexOf('Mac') !== -1) return DesktopOS.MacOS;\n else if (this.userAgent.indexOf('X11') !== -1) return DesktopOS.Unix;\n else if (this.userAgent.indexOf('Linux') !== -1) return DesktopOS.Linux;\n\n return DesktopOS.Unknown;\n } else return undefined;\n }\n\n private getDeviceOS(): DeviceOS | undefined {\n return this.getMobileOS() ?? this.getDesktopOS();\n }\n\n private supportedScreenOrientation = (screen?.orientation || {}).type ?? (screen as any).mozOrientation ?? (screen as any).msOrientation;\n private safariScreenOrientation: DeviceOrientationType = !screen?.orientation && matchMedia('(orientation: portrait)').matches ? 'portrait-primary' : 'landscape-primary';\n private initialScreenOrientation: DeviceOrientationType = this.supportedScreenOrientation ?? this.safariScreenOrientation ?? 'portrait-primary';\n private screenOrientation: DeviceOrientationType = this.initialScreenOrientation;\n constructor() {\n if (screen.orientation) {\n screen.orientation.addEventListener(\n 'change',\n (ev: Event) => (this.screenOrientation = (ev.target ?? ({} as any)).type as OrientationType)\n );\n }\n }\n\n public isLandscapeOrientation(): boolean {\n return ['landscape-primary', 'landscape-secondary'].includes(this.screenOrientation);\n }\n\n public isPortraitOrientation(): boolean {\n return ['portrait-primary', 'portrait-secondary'].includes(this.screenOrientation);\n }\n\n public getDeviceState(): DeviceState {\n const isDesktop = this.isDesktopDevice;\n const isMobile = this.isMobileDevice();\n const isTablet = this.isTabletDevice();\n const mobileOS: MobileOS | undefined = this.getMobileOS();\n const isAndroidDevice = this.getDeviceOS() === MobileOS.Android;\n const isAppleDevice = this.getDeviceOS() === MobileOS.iOS || this.getDeviceOS() === DesktopOS.MacOS;\n const isUnknownMobileDevice = this.getDeviceOS() === MobileOS.Unknown;\n const desktopOS: DesktopOS | undefined = this.getDesktopOS();\n const isWindowsDesktop = this.getDeviceOS() === DesktopOS.Windows;\n const isLinuxOrUnixDesktop = this.getDeviceOS() === DesktopOS.Linux || this.getDeviceOS() === DesktopOS.Unix;\n\n return {\n isDesktop,\n desktopOS,\n isWindowsDesktop,\n isLinuxOrUnixDesktop,\n isMobile,\n mobileOS,\n isAndroidDevice,\n isAppleDevice,\n isUnknownMobileDevice,\n isTablet,\n isLandscapeOrientation: () => this.isLandscapeOrientation(),\n isPortraitOrientation: () => this.isPortraitOrientation()\n };\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { WindowDimensions } from '../interfaces/window-dimensions.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class WindowDimensionsService {\n private windowDimensionsSubject = new BehaviorSubject<WindowDimensions>(\n this.getWindowDimensions()\n );\n constructor() {\n this.handleResize();\n window.addEventListener('resize', this.handleResize.bind(this));\n }\n\n public getWindowDimensions(): WindowDimensions {\n return {\n width: window.innerWidth,\n height: window.innerHeight,\n threshold_xs: 360,\n threshold_sm: 640,\n threshold_md: 768,\n threshold_lg: 1024,\n threshold_xl: 1280,\n threshold_2xl: 1536,\n threshold_3xl: 1920,\n threshold_4xl: 2560,\n };\n }\n\n private handleResize(): void {\n this.windowDimensionsSubject.next(this.getWindowDimensions());\n }\n\n public getWindowDimensions$(): Observable<WindowDimensions> {\n return this.windowDimensionsSubject.asObservable();\n }\n}\n","export const SCROLL_LOCK_INSTANCE_IDENTIFIER = 'scroll_lock_instance_';","import { Injectable, inject } from '@angular/core';\nimport { DeviceTypeService } from './device-type.service';\nimport { WindowDimensionsService } from './window-dimension.service';\nimport { IScrollLockConfig } from '../interfaces/scroll-lock-config.interface';\nimport { WindowDimensions } from '../interfaces/window-dimensions.interface';\nimport { SCROLL_LOCK_INSTANCE_IDENTIFIER } from '../constants/scroll-lock.constants';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ScrollLockService {\n private deviceTypeService = inject(DeviceTypeService);\n private windowDimensionSerivce = inject(WindowDimensionsService);\n\n private instanceId: string;\n\n private configurationInstances: Map<string, IScrollLockConfig> = new Map<string, IScrollLockConfig>();\n private windowDimensions: WindowDimensions = {} as WindowDimensions;\n\n constructor() {\n this.instanceId = SCROLL_LOCK_INSTANCE_IDENTIFIER + Math.random().toString(36).substring(2, 9);\n this.windowDimensionSerivce.getWindowDimensions$().subscribe((dimensions) => {\n this.windowDimensions = dimensions;\n });\n }\n\n public ngOnDestroy(): void {\n this.enableScroll();\n }\n\n public disableScroll(config: IScrollLockConfig): void {\n document.body.style.setProperty('overflow', 'hidden', 'important');\n\n const documentWidth = document.documentElement.clientWidth;\n const windowWidth = window.innerWidth;\n const scrollBarWidth = windowWidth - documentWidth;\n document.body.style.paddingRight = scrollBarWidth + 'px';\n document.body.style.setProperty('padding-right', scrollBarWidth + 'px', 'important');\n\n if (config.handleTouchInput !== false) { document.body.style.setProperty('touch-action', 'none', 'important'); }\n\n this.configurationInstances.set(this.instanceId, config);\n\n if (config.mainContainer !== undefined && config.mainContainer.parentElement !== null) {\n let currentNode = config.mainContainer.parentElement as HTMLElement | null;\n while (currentNode !== null) {\n currentNode.style.setProperty('overflow', 'hidden', 'important');\n\n if (config.handleTouchInput !== false) {\n currentNode.addEventListener('touchmove', (event) => this.handleTouchMove(event), { passive: false });\n currentNode.style.setProperty('touch-action', 'none', 'important');\n }\n\n currentNode = currentNode.parentElement;\n }\n }\n\n setTimeout(() => {\n if (config.handleTouchInput !== false) {\n document.body.addEventListener('touchmove', (event) => this.handleTouchMove(event), { passive: false });\n }\n\n if (config.handleExtremeOverflow !== false) {\n const options = { passive: false };\n\n window.addEventListener('wheel', this.preventDefault, options);\n window.addEventListener('mousewheel', this.preventDefault, options);\n window.addEventListener('scroll', this.preventDefault, options);\n window.addEventListener('DOMMouseScroll', this.preventDefault, options);\n }\n }, (config.animationDuration ?? 0) + 10);\n }\n\n public enableScroll(extreme_overflow?: boolean): void {\n document.body.style.removeProperty('overflow');\n document.body.style.removeProperty('padding-right');\n\n let currentConfiguration = this.configurationInstances.get(this.instanceId);\n\n if (currentConfiguration && currentConfiguration.handleTouchInput !== false) {\n document.body.removeEventListener('touchmove', this.handleTouchMove);\n document.body.style.removeProperty('touch-action');\n }\n\n if (currentConfiguration !== undefined && currentConfiguration.mainContainer !== undefined && currentConfiguration.mainContainer.parentElement !== null) {\n let currentNode = currentConfiguration.mainContainer.parentElement as HTMLElement | null;\n while (currentNode !== null) {\n currentNode.style.removeProperty('overflow');\n\n if (currentConfiguration.handleTouchInput !== false) {\n currentNode.removeEventListener('touchmove', this.preventDefault);\n currentNode.style.removeProperty('touch-action');\n }\n\n currentNode = currentNode.parentElement;\n }\n }\n\n this.configurationInstances.delete(this.instanceId);\n\n if (extreme_overflow !== false) {\n window.removeEventListener('wheel', this.preventDefault);\n window.removeEventListener('mousewheel', this.preventDefault);\n window.removeEventListener('scroll', this.preventDefault);\n window.removeEventListener('DOMMouseScroll', this.preventDefault);\n }\n }\n\n private handleTouchMove(event: Event): void {\n const targetNode = event.target as Node;\n const currentConfiguration = this.configurationInstances.get(this.instanceId);\n\n if (!this.isAllowedToScroll(targetNode) && (currentConfiguration === null || currentConfiguration?.handleTouchInput !== false)) {\n if (currentConfiguration === null || currentConfiguration?.mobileOnlyTouchPrevention !== true ||\n (currentConfiguration?.mobileOnlyTouchPrevention === true && ((!this.deviceTypeService.getDeviceState().isMobile || !this.deviceTypeService.getDeviceState().isTablet)\n && (this.windowDimensions.width < this.windowDimensions.threshold_sm)))) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n }\n\n private isAllowedToScroll(targetNode: Node): boolean {\n const currentConfiguration = this.configurationInstances.get(this.instanceId);\n\n if (!currentConfiguration?.allowTouchInputOn || currentConfiguration.allowTouchInputOn.length === 0) { return true; }\n\n if (currentConfiguration.allowTouchInputOn.length === undefined) {\n return (currentConfiguration.allowTouchInputOn as unknown as Element).contains(targetNode);\n }\n\n for (const element of currentConfiguration.allowTouchInputOn) {\n if (element.contains(targetNode)) {\n return true;\n }\n }\n\n return false;\n }\n\n private preventDefault(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n }\n}\n","export const ITEM_COPY_DEFAULT_SUFFIX = \"Copy\";","import { Injectable } from \"@angular/core\";\nimport { ITEM_COPY_DEFAULT_SUFFIX } from \"../constants/ui-services-common.consants\";\n\n@Injectable({\n providedIn: 'root'\n})\nexport class TextFormattingService {\n\n constructor() { }\n\n public generateNameCopy(originalName: string, existingNames: string[] | undefined = undefined, copySuffix: string = ITEM_COPY_DEFAULT_SUFFIX): string {\n const existingNamesToLower = existingNames?.map(item => item.toLowerCase()) ?? [];\n\n let newName = `${originalName} (Copy)`;\n let copyIndex = 2;\n\n while (existingNamesToLower.includes(newName.toLowerCase())) {\n newName = `${originalName} (${copySuffix} ${copyIndex++})`;\n }\n\n return newName;\n }\n\n public formattedDateString(date: Date | string | undefined | null): string | undefined {\n if (!date) return undefined;\n\n const dateObj = (date instanceof Date) ? date : new Date(date);\n return dateObj.toLocaleDateString(undefined, {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n });\n }\n}","import { Injectable } from \"@angular/core\";\n\n@Injectable({\n providedIn: 'root'\n})\nexport class UiActionsService {\n\n public downloadFile(data: Blob, filename: string, mimeType: string): void {\n const blob = new Blob([data], { type: mimeType });\n const url = window.URL.createObjectURL(blob);\n const a = document.createElement('a');\n a.href = url;\n a.download = filename;\n document.body.appendChild(a);\n a.click();\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }\n}","import { Injectable, OnDestroy } from '@angular/core';\nimport { BehaviorSubject, Observable, ReplaySubject } from 'rxjs';\nimport { DeviceTheme } from '../types/device.types';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ThemingService implements OnDestroy {\n private readonly mediaQueryList: MediaQueryList;\n private mediaQueryListener?: (event: MediaQueryListEvent) => void;\n\n private applicationThemeSubject = new ReplaySubject<DeviceTheme>(1);\n private systemThemeSubject = new BehaviorSubject<DeviceTheme>(this.detectSystemTheme());\n \n constructor() {\n this.mediaQueryList = window.matchMedia('(prefers-color-scheme: dark)');\n this.createSubscription();\n }\n\n public ngOnDestroy(): void {\n if (this.mediaQueryListener) {\n this.mediaQueryList.removeEventListener('change', this.mediaQueryListener);\n }\n }\n\n private createSubscription(): void {\n this.handleSystemThemeChange(this.mediaQueryList);\n this.mediaQueryListener = (event: MediaQueryListEvent) => this.handleSystemThemeChange(event);\n this.mediaQueryList.addEventListener('change', this.mediaQueryListener);\n }\n\n private handleSystemThemeChange(eventOrList: MediaQueryList | MediaQueryListEvent) {\n const isDark = eventOrList.matches;\n const theme: DeviceTheme = isDark ? 'dark' : 'light';\n this.systemThemeSubject.next(theme);\n }\n\n private detectSystemTheme(): DeviceTheme {\n const isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches;\n return isDarkMode ? 'dark' : 'light';\n }\n\n public getApplicationTheme$(): Observable<DeviceTheme> {\n return this.applicationThemeSubject.asObservable();\n }\n\n public getSystemTheme$(): Observable<DeviceTheme> {\n return this.systemThemeSubject.asObservable();\n }\n\n public getSystemTheme(): DeviceTheme {\n return this.systemThemeSubject.value;\n }\n\n public setApplicationTheme(theme: DeviceTheme): void {\n this.applicationThemeSubject.next(theme);\n }\n}","export function uuidv4() {\n return \"10000000-1000-4000-8000-100000000000\".replace(/[018]/g, (c) => (+c ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (+c / 4)))).toString(16));\n}\n","/*\n * Public API Surface of blocks-core\n */\n\nexport * from './lib/services/device-type.service';\nexport * from './lib/services/scroll-lock.service';\nexport * from './lib/services/text-formatting.service';\nexport * from './lib/services/ui-actions.service';\nexport * from './lib/services/window-dimension.service';\nexport * from './lib/services/theming.service';\n\nexport * from './lib/constants/ui-services-common.consants';\n\nexport * from './lib/enums/desktop-os.enum';\nexport * from './lib/enums/mobile-os.enum';\n\nexport * from './lib/interfaces/device-state.interface';\nexport * from './lib/interfaces/scroll-lock-config.interface';\nexport * from './lib/interfaces/window-dimensions.interface';\n\nexport * from './lib/types/device.types';\n\nexport * from './lib/helpers/uui4';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;IAAY;AAAZ,CAAA,UAAY,SAAS,EAAA;AACjB,IAAA,SAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,SAAA,CAAA,OAAA,CAAA,GAAA,QAAgB;AAChB,IAAA,SAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,SAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,SAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACvB,CAAC,EANW,SAAS,KAAT,SAAS,GAAA,EAAA,CAAA,CAAA;;ICAT;AAAZ,CAAA,UAAY,QAAQ,EAAA;AAChB,IAAA,QAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,QAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACX,IAAA,QAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,QAAA,CAAA,cAAA,CAAA,GAAA,eAA8B;AAClC,CAAC,EALW,QAAQ,KAAR,QAAQ,GAAA,EAAA,CAAA,CAAA;;MCSP,iBAAiB,CAAA;AACpB,IAAA,SAAS,GAAW,SAAS,CAAC,SAAS,IAAI,SAAS,CAAC,MAAM,IAAK,MAAc,CAAC,KAAK,IAAI,SAAS;AACjG,IAAA,eAAe,GAAY,CAAC,I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D;IAEO,eAAe,GAAA;AACpB,QAAA,OAAO,IAAI,CAAC,kBAAkB,CAAC,YAAY,EAAE;IAC/C;IAEO,cAAc,GAAA;AACnB,QAAA,OAAO,IAAI,CAAC,kBAAkB,CAAC,KAAK;IACtC;AAEO,IAAA,mBAAmB,CAAC,KAAkB,EAAA;AAC3C,QAAA,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,KAAK,CAAC;IAC1C;uGAjDW,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAd,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,cAFb,MAAM,EAAA,CAAA;;2FAEP,cAAc,EAAA,UAAA,EAAA,CAAA;kBAH1B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;SCNe,MAAM,GAAA;IAClB,OAAO,sCAAsC,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,eAAe,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC;AACjK;;ACFA;;AAEG;;ACFH;;AAEG;;;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@filip.mazev/blocks-core",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"exports": {
|
|
5
|
+
"./mixins": "./lib/styles/_mixins.scss",
|
|
6
|
+
"./variables": "./lib/styles/_variables.scss",
|
|
7
|
+
"./theme-provider": "./lib/styles/_theme-provider.scss",
|
|
8
|
+
"./default-theme": "./lib/styles/themes/_default-theme.scss",
|
|
9
|
+
"./orange-company-theme": "./lib/styles/themes/_orange-company-theme.scss",
|
|
10
|
+
"./index": "./lib/styles/_index.scss",
|
|
11
|
+
"./package.json": {
|
|
12
|
+
"default": "./package.json"
|
|
13
|
+
},
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./types/filip.mazev-blocks-core.d.ts",
|
|
16
|
+
"default": "./fesm2022/filip.mazev-blocks-core.mjs"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"style": "src/lib/styles/_index.scss",
|
|
20
|
+
"sass": "src/lib/styles/_index.scss",
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"@angular/common": "^21.1.1",
|
|
23
|
+
"@angular/core": "^21.1.1"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"tslib": "^2.3.0"
|
|
27
|
+
},
|
|
28
|
+
"sideEffects": false,
|
|
29
|
+
"module": "fesm2022/filip.mazev-blocks-core.mjs",
|
|
30
|
+
"typings": "types/filip.mazev-blocks-core.d.ts"
|
|
31
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@use 'variables' as *;
|
|
3
|
+
|
|
4
|
+
@mixin respond-up($size) {
|
|
5
|
+
@media (min-width: map.get($breakpoints, $size)) {
|
|
6
|
+
@content;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@mixin respond-down($size) {
|
|
11
|
+
@media (max-width: map.get($breakpoints, $size)) {
|
|
12
|
+
@content;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@mixin respond-between($min, $max) {
|
|
17
|
+
@media (min-width: map.get($breakpoints, $min)) and (max-width: map.get($breakpoints, $max)) {
|
|
18
|
+
@content;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
@mixin core-theme($config) {
|
|
4
|
+
@each $key, $value in $config {
|
|
5
|
+
--fm-#{$key}: #{$value};
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@if map.has-key($config, 'canvas') {
|
|
9
|
+
--fm-bg-canvas: #{map.get($config, 'canvas')};
|
|
10
|
+
}
|
|
11
|
+
@if map.has-key($config, 'surface') {
|
|
12
|
+
--fm-bg-surface: #{map.get($config, 'surface')};
|
|
13
|
+
}
|
|
14
|
+
@if map.has-key($config, 'element') {
|
|
15
|
+
--fm-bg-element: #{map.get($config, 'element')};
|
|
16
|
+
}
|
|
17
|
+
@if map.has-key($config, 'text') {
|
|
18
|
+
--fm-text-main: #{map.get($config, 'text')};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
$surface: map.get($config, 'surface');
|
|
22
|
+
--fm-contrast-main: #{if($surface == #ffffff or $surface == #f9fafb, #000, #fff)};
|
|
23
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
$gray-palette: (
|
|
2
|
+
50: #fafafa,
|
|
3
|
+
100: #f5f5f5,
|
|
4
|
+
200: #e5e5e5,
|
|
5
|
+
300: #d4d4d4,
|
|
6
|
+
400: #a3a3a3,
|
|
7
|
+
500: #737373,
|
|
8
|
+
600: #525252,
|
|
9
|
+
700: #404040,
|
|
10
|
+
800: #262626,
|
|
11
|
+
900: #171717
|
|
12
|
+
) !default;
|
|
13
|
+
|
|
14
|
+
$warning-palette: (
|
|
15
|
+
50: #fffbeb,
|
|
16
|
+
500: #f59e0b,
|
|
17
|
+
900: #78350f,
|
|
18
|
+
A400: #ffc400
|
|
19
|
+
) !default;
|
|
20
|
+
|
|
21
|
+
$error-palette: (
|
|
22
|
+
50: #fef2f2,
|
|
23
|
+
400: #f87171,
|
|
24
|
+
500: #ef4444,
|
|
25
|
+
900: #7f1d1d
|
|
26
|
+
) !default;
|
|
27
|
+
|
|
28
|
+
$breakpoints: (
|
|
29
|
+
xs: 360px,
|
|
30
|
+
|
|
31
|
+
sm: 640px,
|
|
32
|
+
md: 768px,
|
|
33
|
+
|
|
34
|
+
lg: 1024px,
|
|
35
|
+
xl: 1280px,
|
|
36
|
+
|
|
37
|
+
2xl: 1536px,
|
|
38
|
+
3xl: 1920px,
|
|
39
|
+
4xl: 2560px
|
|
40
|
+
) !default;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
@use '../variables' as *;
|
|
2
|
+
|
|
3
|
+
$default-light-theme-config: (
|
|
4
|
+
// General
|
|
5
|
+
'primary': map-get($gray-palette, 800),
|
|
6
|
+
'secondary': map-get($gray-palette, 100),
|
|
7
|
+
'alt': map-get($gray-palette, 900),
|
|
8
|
+
'accent': map-get($warning-palette, 500),
|
|
9
|
+
'accent-alt': map-get($warning-palette, 900),
|
|
10
|
+
'accent-tertiary': map-get($warning-palette, A400),
|
|
11
|
+
|
|
12
|
+
// Text
|
|
13
|
+
'text-primary': map-get($gray-palette, 900),
|
|
14
|
+
'text-secondary': map-get($gray-palette, 600),
|
|
15
|
+
'text-tertiary': map-get($gray-palette, 500),
|
|
16
|
+
'text-accent': map-get($warning-palette, 900),
|
|
17
|
+
'text-accent-alt': map-get($gray-palette, 50),
|
|
18
|
+
'text-grayscale': map-get($gray-palette, 900),
|
|
19
|
+
'menu-item-text': map-get($gray-palette, 800),
|
|
20
|
+
'text-warn': map-get($warning-palette, 900),
|
|
21
|
+
'text-confirm': #084720,
|
|
22
|
+
|
|
23
|
+
// UI Elements
|
|
24
|
+
'bg-menu-item-hover': map-get($gray-palette, 200),
|
|
25
|
+
'border': map-get($gray-palette, 200),
|
|
26
|
+
'border-grayscale-light': map-get($gray-palette, 100),
|
|
27
|
+
'warn': map-get($warning-palette, 500),
|
|
28
|
+
'error': map-get($error-palette, 500),
|
|
29
|
+
'info': #3b82f6,
|
|
30
|
+
|
|
31
|
+
// Buttons
|
|
32
|
+
'button-primary': map-get($gray-palette, 800),
|
|
33
|
+
'button-confirm': #40ca73,
|
|
34
|
+
'button-warn': map-get($error-palette, 500),
|
|
35
|
+
'button-grayscale': map-get($gray-palette, 200),
|
|
36
|
+
|
|
37
|
+
// Feedback
|
|
38
|
+
'snackbar-error': map-get($error-palette, 50),
|
|
39
|
+
'snackbar-success': #f0fdf4,
|
|
40
|
+
'snackbar-warn': map-get($warning-palette, 50),
|
|
41
|
+
|
|
42
|
+
// Scrollbar & Sliders
|
|
43
|
+
'scroll-bg': map-get($gray-palette, 100),
|
|
44
|
+
'scroll-thumb': map-get($gray-palette, 400),
|
|
45
|
+
'scroll-thumb-highlighted': map-get($gray-palette, 600),
|
|
46
|
+
'slider-track': map-get($gray-palette, 200),
|
|
47
|
+
'slider-thumb': map-get($gray-palette, 800),
|
|
48
|
+
'slider-thumb-hover': map-get($gray-palette, 900),
|
|
49
|
+
|
|
50
|
+
'canvas': map-get($gray-palette, 50),
|
|
51
|
+
'surface': #ffffff,
|
|
52
|
+
'element': map-get($gray-palette, 100),
|
|
53
|
+
'text': map-get($gray-palette, 900),
|
|
54
|
+
'status-warn': map-get($warning-palette, 500),
|
|
55
|
+
'status-error': map-get($error-palette, 500),
|
|
56
|
+
'error-subtle': map-get($error-palette, 50)
|
|
57
|
+
) !default;
|
|
58
|
+
|
|
59
|
+
$default-dark-theme-config: (
|
|
60
|
+
// General
|
|
61
|
+
'primary': map-get($gray-palette, 50),
|
|
62
|
+
'secondary': map-get($gray-palette, 800),
|
|
63
|
+
'alt': map-get($gray-palette, 50),
|
|
64
|
+
'accent': map-get($warning-palette, 500),
|
|
65
|
+
'accent-alt': map-get($warning-palette, A400),
|
|
66
|
+
'accent-tertiary': map-get($warning-palette, 50),
|
|
67
|
+
|
|
68
|
+
// Text
|
|
69
|
+
'text-primary': map-get($gray-palette, 50),
|
|
70
|
+
'text-secondary': map-get($gray-palette, 400),
|
|
71
|
+
'text-tertiary': map-get($gray-palette, 500),
|
|
72
|
+
'text-accent': map-get($warning-palette, 500),
|
|
73
|
+
'text-accent-alt': map-get($gray-palette, 900),
|
|
74
|
+
'text-grayscale': map-get($gray-palette, 50),
|
|
75
|
+
'menu-item-text': map-get($gray-palette, 200),
|
|
76
|
+
'text-warn': map-get($warning-palette, 500),
|
|
77
|
+
'text-confirm': #4eee89,
|
|
78
|
+
|
|
79
|
+
// UI Elements
|
|
80
|
+
'bg-menu-item-hover': map-get($gray-palette, 700),
|
|
81
|
+
'border': map-get($gray-palette, 700),
|
|
82
|
+
'border-grayscale-light': map-get($gray-palette, 800),
|
|
83
|
+
'warn': map-get($warning-palette, 500),
|
|
84
|
+
'error': map-get($error-palette, 400),
|
|
85
|
+
'info': #60a5fa,
|
|
86
|
+
|
|
87
|
+
// Buttons
|
|
88
|
+
'button-primary': map-get($gray-palette, 50),
|
|
89
|
+
'button-confirm': #0f7033,
|
|
90
|
+
'button-warn': map-get($error-palette, 500),
|
|
91
|
+
'button-grayscale': map-get($gray-palette, 700),
|
|
92
|
+
|
|
93
|
+
// Feedback
|
|
94
|
+
'snackbar-error': #450a0a,
|
|
95
|
+
'snackbar-success': #052e16,
|
|
96
|
+
'snackbar-warn': #451a03,
|
|
97
|
+
|
|
98
|
+
// Scrollbar & Sliders
|
|
99
|
+
'scroll-bg': map-get($gray-palette, 800),
|
|
100
|
+
'scroll-thumb': map-get($gray-palette, 600),
|
|
101
|
+
'scroll-thumb-highlighted': map-get($gray-palette, 400),
|
|
102
|
+
'slider-track': map-get($gray-palette, 700),
|
|
103
|
+
'slider-thumb': map-get($gray-palette, 50),
|
|
104
|
+
'slider-thumb-hover': #ffffff,
|
|
105
|
+
|
|
106
|
+
'canvas': map-get($gray-palette, 900),
|
|
107
|
+
'surface': #1e1e1e,
|
|
108
|
+
'element': map-get($gray-palette, 800),
|
|
109
|
+
'text': map-get($gray-palette, 50),
|
|
110
|
+
'status-warn': map-get($warning-palette, 400),
|
|
111
|
+
'status-error': map-get($error-palette, 400),
|
|
112
|
+
'error-subtle': rgba(239, 68, 68, 0.15)
|
|
113
|
+
) !default;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
@use '../variables' as *;
|
|
2
|
+
|
|
3
|
+
$orange-company-light-theme-config: (
|
|
4
|
+
// General
|
|
5
|
+
'primary': #FFF7ED,
|
|
6
|
+
'secondary': #f7f7f7,
|
|
7
|
+
'alt': #0c0c0c,
|
|
8
|
+
'accent': #FFB86A,
|
|
9
|
+
'accent-alt': #FF6900,
|
|
10
|
+
'accent-tertiary': #CA3500,
|
|
11
|
+
|
|
12
|
+
// Text
|
|
13
|
+
'text-primary': #484848,
|
|
14
|
+
'text-secondary': #9F2D00,
|
|
15
|
+
'text-tertiary': #CA3500,
|
|
16
|
+
'text-accent': #FF8904,
|
|
17
|
+
'text-accent-alt': #f3f3f3,
|
|
18
|
+
'text-grayscale': #111111,
|
|
19
|
+
'menu-item-text': #151515,
|
|
20
|
+
'text-warn': #FB2C36,
|
|
21
|
+
'text-confirm': #00C950,
|
|
22
|
+
|
|
23
|
+
// UI Elements
|
|
24
|
+
'bg-menu-item-hover': #FFD6A7,
|
|
25
|
+
'border': #d5d5d5,
|
|
26
|
+
'border-grayscale-light': #e1e1e1,
|
|
27
|
+
'warn': #ffcc54,
|
|
28
|
+
'error': #FF4C4F,
|
|
29
|
+
'info': #4da6ff,
|
|
30
|
+
|
|
31
|
+
// Buttons
|
|
32
|
+
'button-primary': #FF690099,
|
|
33
|
+
'button-confirm': #00C95070,
|
|
34
|
+
'button-warn': #FB2C3660,
|
|
35
|
+
'button-grayscale': #d0d0d0b3,
|
|
36
|
+
|
|
37
|
+
// Feedback
|
|
38
|
+
'snackbar-error': #ffa9aa,
|
|
39
|
+
'snackbar-success': #a2ff99,
|
|
40
|
+
'snackbar-warn': #ffdc9b,
|
|
41
|
+
|
|
42
|
+
// Scrollbar & Sliders
|
|
43
|
+
'scroll-bg': #FFEDD4,
|
|
44
|
+
'scroll-thumb': linear-gradient(278deg, #FFB86A -10.44%, #FF8904 100%),
|
|
45
|
+
'scroll-thumb-highlighted': linear-gradient(278deg, #FF8904 -10.44%, #CA3500 100%),
|
|
46
|
+
'slider-track': #f4f4f4,
|
|
47
|
+
'slider-thumb': #FF6900,
|
|
48
|
+
'slider-thumb-hover': #FF8900,
|
|
49
|
+
|
|
50
|
+
'canvas': #ffffff,
|
|
51
|
+
'surface': #ffffff,
|
|
52
|
+
'element': #f7f7f7,
|
|
53
|
+
'text': #484848,
|
|
54
|
+
'status-warn': map-get($warning-palette, 500),
|
|
55
|
+
'status-error': map-get($error-palette, 500),
|
|
56
|
+
'error-subtle': map-get($error-palette, 50)
|
|
57
|
+
) !default;
|
|
58
|
+
|
|
59
|
+
$orange-company-dark-theme-config: (
|
|
60
|
+
// General
|
|
61
|
+
'primary': #231812,
|
|
62
|
+
'secondary': #1a1a1a,
|
|
63
|
+
'alt': #FFF7ED,
|
|
64
|
+
'accent': #CA3500,
|
|
65
|
+
'accent-alt': #FF6900,
|
|
66
|
+
'accent-tertiary': #FF8904,
|
|
67
|
+
|
|
68
|
+
// Text
|
|
69
|
+
'text-primary': #ffffff,
|
|
70
|
+
'text-secondary': #FFD6A7,
|
|
71
|
+
'text-tertiary': #FFB86A,
|
|
72
|
+
'text-accent': #FF8904,
|
|
73
|
+
'text-accent-alt': #131313,
|
|
74
|
+
'text-grayscale': #e1e1e1,
|
|
75
|
+
'menu-item-text': #e7e7e7,
|
|
76
|
+
'text-warn': #FB2C36,
|
|
77
|
+
'text-confirm': #00C950,
|
|
78
|
+
|
|
79
|
+
// UI Elements
|
|
80
|
+
'bg-menu-item-hover': #CA3500,
|
|
81
|
+
'border': #282828,
|
|
82
|
+
'border-grayscale-light': #3b3b3b39,
|
|
83
|
+
'warn': #ffcc54,
|
|
84
|
+
'error': #FF4C4F,
|
|
85
|
+
'info': #4da6ff,
|
|
86
|
+
|
|
87
|
+
// Buttons
|
|
88
|
+
'button-primary': #FF690099,
|
|
89
|
+
'button-confirm': #00C95070,
|
|
90
|
+
'button-warn': #FB2C3660,
|
|
91
|
+
'button-grayscale': #2e2e2eb1,
|
|
92
|
+
|
|
93
|
+
// Feedback
|
|
94
|
+
'snackbar-error': #8e1416,
|
|
95
|
+
'snackbar-success': #2e7d32,
|
|
96
|
+
'snackbar-warn': #b27a1c,
|
|
97
|
+
|
|
98
|
+
// Scroll & Sliders
|
|
99
|
+
'scroll-bg': #712000,
|
|
100
|
+
'scroll-thumb': linear-gradient(278deg, #CA3500 -10.44%, #FF6900 100%),
|
|
101
|
+
'scroll-thumb-highlighted': linear-gradient(278deg, #FF6900 -10.44%, #FF8904 100%),
|
|
102
|
+
'slider-track': #333333,
|
|
103
|
+
'slider-thumb': #FF8904,
|
|
104
|
+
'slider-thumb-hover': #FF6900,
|
|
105
|
+
|
|
106
|
+
'canvas': #000000,
|
|
107
|
+
'surface': #0d0d0d,
|
|
108
|
+
'text': #ffffff,
|
|
109
|
+
'status-warn': map-get($warning-palette, 400),
|
|
110
|
+
'status-error': map-get($error-palette, 400),
|
|
111
|
+
'error-subtle': rgba(239, 68, 68, 0.15)
|
|
112
|
+
) !default;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { OnDestroy } from '@angular/core';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
|
|
5
|
+
declare enum DesktopOS {
|
|
6
|
+
Linux = "linux",
|
|
7
|
+
MacOS = "mac_os",
|
|
8
|
+
Unix = "unix",
|
|
9
|
+
Unknown = "unknown",
|
|
10
|
+
Windows = "windows"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare enum MobileOS {
|
|
14
|
+
Android = "android",
|
|
15
|
+
iOS = "ios",
|
|
16
|
+
Unknown = "unknown",
|
|
17
|
+
WindowsPhone = "Windows Phone"
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
interface DeviceState {
|
|
21
|
+
isDesktop: boolean;
|
|
22
|
+
desktopOS: DesktopOS | undefined;
|
|
23
|
+
isWindowsDesktop: boolean;
|
|
24
|
+
isLinuxOrUnixDesktop: boolean;
|
|
25
|
+
isMobile: boolean;
|
|
26
|
+
mobileOS: MobileOS | undefined;
|
|
27
|
+
isAndroidDevice: boolean;
|
|
28
|
+
isAppleDevice: boolean;
|
|
29
|
+
isUnknownMobileDevice: boolean;
|
|
30
|
+
isTablet: boolean;
|
|
31
|
+
isLandscapeOrientation: () => boolean;
|
|
32
|
+
isPortraitOrientation: () => boolean;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
declare class DeviceTypeService {
|
|
36
|
+
private userAgent;
|
|
37
|
+
private isDesktopDevice;
|
|
38
|
+
private isMobileDevice;
|
|
39
|
+
private isTabletDevice;
|
|
40
|
+
private getMobileOS;
|
|
41
|
+
private getDesktopOS;
|
|
42
|
+
private getDeviceOS;
|
|
43
|
+
private supportedScreenOrientation;
|
|
44
|
+
private safariScreenOrientation;
|
|
45
|
+
private initialScreenOrientation;
|
|
46
|
+
private screenOrientation;
|
|
47
|
+
constructor();
|
|
48
|
+
isLandscapeOrientation(): boolean;
|
|
49
|
+
isPortraitOrientation(): boolean;
|
|
50
|
+
getDeviceState(): DeviceState;
|
|
51
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DeviceTypeService, never>;
|
|
52
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DeviceTypeService>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
interface IScrollLockConfig {
|
|
56
|
+
allowTouchInputOn?: Element[];
|
|
57
|
+
mainContainer?: HTMLElement;
|
|
58
|
+
handleExtremeOverflow?: boolean;
|
|
59
|
+
animationDuration?: number;
|
|
60
|
+
handleTouchInput?: boolean;
|
|
61
|
+
mobileOnlyTouchPrevention?: boolean;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
declare class ScrollLockService {
|
|
65
|
+
private deviceTypeService;
|
|
66
|
+
private windowDimensionSerivce;
|
|
67
|
+
private instanceId;
|
|
68
|
+
private configurationInstances;
|
|
69
|
+
private windowDimensions;
|
|
70
|
+
constructor();
|
|
71
|
+
ngOnDestroy(): void;
|
|
72
|
+
disableScroll(config: IScrollLockConfig): void;
|
|
73
|
+
enableScroll(extreme_overflow?: boolean): void;
|
|
74
|
+
private handleTouchMove;
|
|
75
|
+
private isAllowedToScroll;
|
|
76
|
+
private preventDefault;
|
|
77
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScrollLockService, never>;
|
|
78
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ScrollLockService>;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
declare class TextFormattingService {
|
|
82
|
+
constructor();
|
|
83
|
+
generateNameCopy(originalName: string, existingNames?: string[] | undefined, copySuffix?: string): string;
|
|
84
|
+
formattedDateString(date: Date | string | undefined | null): string | undefined;
|
|
85
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TextFormattingService, never>;
|
|
86
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TextFormattingService>;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
declare class UiActionsService {
|
|
90
|
+
downloadFile(data: Blob, filename: string, mimeType: string): void;
|
|
91
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UiActionsService, never>;
|
|
92
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<UiActionsService>;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
interface WindowDimensions {
|
|
96
|
+
[x: string]: any;
|
|
97
|
+
width: number;
|
|
98
|
+
height: number;
|
|
99
|
+
threshold_xs: number;
|
|
100
|
+
threshold_sm: number;
|
|
101
|
+
threshold_md: number;
|
|
102
|
+
threshold_lg: number;
|
|
103
|
+
threshold_xl: number;
|
|
104
|
+
threshold_2xl: number;
|
|
105
|
+
threshold_3xl: number;
|
|
106
|
+
threshold_4xl: number;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
declare class WindowDimensionsService {
|
|
110
|
+
private windowDimensionsSubject;
|
|
111
|
+
constructor();
|
|
112
|
+
getWindowDimensions(): WindowDimensions;
|
|
113
|
+
private handleResize;
|
|
114
|
+
getWindowDimensions$(): Observable<WindowDimensions>;
|
|
115
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WindowDimensionsService, never>;
|
|
116
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<WindowDimensionsService>;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
type DeviceTheme = "light" | "dark";
|
|
120
|
+
type DeviceOS = DesktopOS | MobileOS;
|
|
121
|
+
type DeviceOrientationType = 'portrait-primary' | 'landscape-primary' | 'portrait-secondary' | 'landscape-secondary';
|
|
122
|
+
|
|
123
|
+
declare class ThemingService implements OnDestroy {
|
|
124
|
+
private readonly mediaQueryList;
|
|
125
|
+
private mediaQueryListener?;
|
|
126
|
+
private applicationThemeSubject;
|
|
127
|
+
private systemThemeSubject;
|
|
128
|
+
constructor();
|
|
129
|
+
ngOnDestroy(): void;
|
|
130
|
+
private createSubscription;
|
|
131
|
+
private handleSystemThemeChange;
|
|
132
|
+
private detectSystemTheme;
|
|
133
|
+
getApplicationTheme$(): Observable<DeviceTheme>;
|
|
134
|
+
getSystemTheme$(): Observable<DeviceTheme>;
|
|
135
|
+
getSystemTheme(): DeviceTheme;
|
|
136
|
+
setApplicationTheme(theme: DeviceTheme): void;
|
|
137
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ThemingService, never>;
|
|
138
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ThemingService>;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
declare const ITEM_COPY_DEFAULT_SUFFIX = "Copy";
|
|
142
|
+
|
|
143
|
+
declare function uuidv4(): string;
|
|
144
|
+
|
|
145
|
+
export { DesktopOS, DeviceTypeService, ITEM_COPY_DEFAULT_SUFFIX, MobileOS, ScrollLockService, TextFormattingService, ThemingService, UiActionsService, WindowDimensionsService, uuidv4 };
|
|
146
|
+
export type { DeviceOS, DeviceOrientationType, DeviceState, DeviceTheme, IScrollLockConfig, WindowDimensions };
|