coer-elements 0.0.10 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- package/components/index.d.ts +1 -0
- package/components/lib/coer-button/coer-button.component.d.ts +44 -0
- package/components/lib/components.module.d.ts +6 -4
- package/esm2022/components/index.mjs +2 -1
- package/esm2022/components/lib/coer-button/coer-button.component.mjs +133 -0
- package/esm2022/components/lib/components.module.mjs +15 -9
- package/esm2022/interfaces/index.mjs +7 -0
- package/esm2022/interfaces/lib/app-source.interface.mjs +2 -0
- package/esm2022/interfaces/lib/breadcrumb.interface.mjs +2 -0
- package/esm2022/interfaces/lib/coer-ref.interface.mjs +2 -0
- package/esm2022/interfaces/lib/go-back.interface.mjs +2 -0
- package/esm2022/interfaces/lib/patch.interface.mjs +2 -0
- package/esm2022/interfaces/lib/screen-size.interface.mjs +2 -0
- package/esm2022/public_api.mjs +2 -1
- package/esm2022/signals/index.mjs +4 -0
- package/esm2022/signals/lib/breakpoint.signal.mjs +4 -0
- package/esm2022/signals/lib/is-loading.signal.mjs +3 -0
- package/esm2022/signals/lib/is-modal-open.signal.mjs +3 -0
- package/esm2022/tools/index.mjs +9 -2
- package/esm2022/tools/lib/breadcrumbs.class.mjs +63 -0
- package/esm2022/tools/lib/control-value.class.mjs +46 -0
- package/esm2022/tools/lib/date-time.class.mjs +22 -0
- package/esm2022/tools/lib/files.class.mjs +91 -0
- package/esm2022/tools/lib/generi-tools.mjs +199 -0
- package/esm2022/tools/lib/page.class.mjs +156 -0
- package/esm2022/tools/lib/screen.class.mjs +43 -0
- package/esm2022/tools/lib/source.class.mjs +80 -0
- package/fesm2022/coer-elements.mjs +836 -54
- package/fesm2022/coer-elements.mjs.map +1 -1
- package/interfaces/index.d.ts +6 -0
- package/interfaces/lib/app-source.interface.d.ts +4 -0
- package/interfaces/lib/breadcrumb.interface.d.ts +6 -0
- package/interfaces/lib/coer-ref.interface.d.ts +10 -0
- package/interfaces/lib/go-back.interface.d.ts +6 -0
- package/interfaces/lib/patch.interface.d.ts +5 -0
- package/interfaces/lib/screen-size.interface.d.ts +5 -0
- package/package.json +1 -1
- package/public_api.d.ts +1 -0
- package/signals/index.d.ts +3 -0
- package/signals/lib/breakpoint.signal.d.ts +1 -0
- package/signals/lib/is-loading.signal.d.ts +1 -0
- package/signals/lib/is-modal-open.signal.d.ts +1 -0
- package/src/interfaces/index.ts +6 -0
- package/src/interfaces/lib/app-source.interface.ts +4 -0
- package/src/interfaces/lib/breadcrumb.interface.ts +6 -0
- package/src/interfaces/lib/coer-ref.interface.ts +11 -0
- package/src/interfaces/lib/go-back.interface.ts +6 -0
- package/src/interfaces/lib/patch.interface.ts +5 -0
- package/src/interfaces/lib/screen-size.interface.ts +5 -0
- package/tools/index.d.ts +8 -1
- package/tools/lib/breadcrumbs.class.d.ts +18 -0
- package/tools/lib/date-time.class.d.ts +11 -0
- package/tools/lib/files.class.d.ts +16 -0
- package/tools/lib/generi-tools.d.ts +32 -0
- package/tools/lib/page.class.d.ts +60 -0
- package/tools/lib/screen.class.d.ts +11 -0
- package/tools/lib/source.class.d.ts +20 -0
- package/esm2022/tools/lib/controlValue.mjs +0 -46
- /package/tools/lib/{controlValue.d.ts → control-value.class.d.ts} +0 -0
@@ -0,0 +1,43 @@
|
|
1
|
+
import { Observable } from "rxjs";
|
2
|
+
export class Screen {
|
3
|
+
static get WINDOW_WIDTH() {
|
4
|
+
return window.innerWidth;
|
5
|
+
}
|
6
|
+
static get WINDOW_HEIGHT() {
|
7
|
+
return window.innerHeight;
|
8
|
+
}
|
9
|
+
static get DEVICE_WIDTH() {
|
10
|
+
return window.screen.width;
|
11
|
+
}
|
12
|
+
static get DEVICE_HEIGHT() {
|
13
|
+
return window.screen.height;
|
14
|
+
}
|
15
|
+
static get BREAKPOINT() {
|
16
|
+
if (window.innerWidth < 576)
|
17
|
+
return 'xs';
|
18
|
+
else if (window.innerWidth >= 576 && window.innerWidth < 768)
|
19
|
+
return 'sm';
|
20
|
+
else if (window.innerWidth >= 768 && window.innerWidth < 992)
|
21
|
+
return 'md';
|
22
|
+
else if (window.innerWidth >= 992 && window.innerWidth < 1200)
|
23
|
+
return 'lg';
|
24
|
+
else if (window.innerWidth >= 1200 && window.innerWidth < 1400)
|
25
|
+
return 'xl';
|
26
|
+
else
|
27
|
+
return 'xxl';
|
28
|
+
}
|
29
|
+
/** */
|
30
|
+
static { this.Resize = new Observable(subscriber => {
|
31
|
+
window.addEventListener("load", () => {
|
32
|
+
window.dispatchEvent(new Event('resize'));
|
33
|
+
});
|
34
|
+
window.onresize = () => {
|
35
|
+
subscriber.next({
|
36
|
+
width: this.WINDOW_WIDTH,
|
37
|
+
height: this.WINDOW_HEIGHT,
|
38
|
+
breakpoin: this.BREAKPOINT
|
39
|
+
});
|
40
|
+
};
|
41
|
+
}); }
|
42
|
+
}
|
43
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2NyZWVuLmNsYXNzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY29lci1lbGVtZW50cy9zcmMvdG9vbHMvbGliL3NjcmVlbi5jbGFzcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBR2xDLE1BQU0sT0FBTyxNQUFNO0lBRVIsTUFBTSxLQUFLLFlBQVk7UUFDMUIsT0FBTyxNQUFNLENBQUMsVUFBVSxDQUFDO0lBQzdCLENBQUM7SUFHTSxNQUFNLEtBQUssYUFBYTtRQUMzQixPQUFPLE1BQU0sQ0FBQyxXQUFXLENBQUM7SUFDOUIsQ0FBQztJQUdNLE1BQU0sS0FBSyxZQUFZO1FBQzFCLE9BQU8sTUFBTSxDQUFDLE1BQU0sQ0FBQyxLQUFLLENBQUM7SUFDL0IsQ0FBQztJQUdNLE1BQU0sS0FBSyxhQUFhO1FBQzNCLE9BQU8sTUFBTSxDQUFDLE1BQU0sQ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|
|
1
|
+
import { inject } from "@angular/core";
|
2
|
+
import { Router } from '@angular/router';
|
3
|
+
import { Breadcrumbs } from "./breadcrumbs.class";
|
4
|
+
import { Tools } from './generi-tools';
|
5
|
+
export class Source {
|
6
|
+
static { this.storage = 'COER-System'; }
|
7
|
+
/** */
|
8
|
+
static Set(page) {
|
9
|
+
const ROUTER = inject(Router);
|
10
|
+
let path = ROUTER.url;
|
11
|
+
if (path.includes('?'))
|
12
|
+
path = path.split('?')[0];
|
13
|
+
Breadcrumbs.Add(page, path);
|
14
|
+
const breadcrumbs = Breadcrumbs.Get();
|
15
|
+
if (breadcrumbs.length >= 2) {
|
16
|
+
breadcrumbs.pop();
|
17
|
+
const breadcrumb = breadcrumbs.pop();
|
18
|
+
this.Save({ page: breadcrumb.page, path: breadcrumb.path });
|
19
|
+
}
|
20
|
+
else
|
21
|
+
this.Save(null);
|
22
|
+
}
|
23
|
+
/** */
|
24
|
+
static Save(source) {
|
25
|
+
let storage = sessionStorage.getItem(this.storage);
|
26
|
+
if (storage)
|
27
|
+
storage = JSON.parse(storage);
|
28
|
+
storage = Object.assign({}, storage, { source });
|
29
|
+
sessionStorage.setItem(this.storage, JSON.stringify(storage));
|
30
|
+
}
|
31
|
+
/** */
|
32
|
+
static Get() {
|
33
|
+
let storage = sessionStorage.getItem(this.storage);
|
34
|
+
if (storage) {
|
35
|
+
storage = JSON.parse(storage);
|
36
|
+
if (storage.hasOwnProperty('source')) {
|
37
|
+
return storage.source;
|
38
|
+
}
|
39
|
+
}
|
40
|
+
return null;
|
41
|
+
}
|
42
|
+
/** */
|
43
|
+
static GetRoot() {
|
44
|
+
const breadcrumbs = Breadcrumbs.Get();
|
45
|
+
return (breadcrumbs.length > 0) ? breadcrumbs.shift() : null;
|
46
|
+
}
|
47
|
+
/** */
|
48
|
+
static SetPageResponse(pageResponse) {
|
49
|
+
let storage = sessionStorage.getItem(this.storage);
|
50
|
+
storage = JSON.parse(storage);
|
51
|
+
storage = Object.assign({}, storage, { pageResponse });
|
52
|
+
sessionStorage.setItem(this.storage, JSON.stringify(storage));
|
53
|
+
}
|
54
|
+
/** */
|
55
|
+
static GetPageResponse() {
|
56
|
+
let storage = sessionStorage.getItem(this.storage);
|
57
|
+
if (storage) {
|
58
|
+
storage = JSON.parse(storage);
|
59
|
+
if (storage.hasOwnProperty('pageResponse')) {
|
60
|
+
return Tools.BreakReference(storage.pageResponse);
|
61
|
+
}
|
62
|
+
}
|
63
|
+
return null;
|
64
|
+
}
|
65
|
+
/** */
|
66
|
+
static ClearPageResponse() {
|
67
|
+
let storage = sessionStorage.getItem(this.storage);
|
68
|
+
storage = JSON.parse(storage);
|
69
|
+
if (storage.hasOwnProperty('pageResponse')) {
|
70
|
+
delete storage.pageResponse;
|
71
|
+
}
|
72
|
+
storage = Object.assign({}, storage);
|
73
|
+
sessionStorage.setItem(this.storage, JSON.stringify(storage));
|
74
|
+
}
|
75
|
+
/** */
|
76
|
+
static Reset() {
|
77
|
+
sessionStorage.removeItem(this.storage);
|
78
|
+
}
|
79
|
+
}
|
80
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic291cmNlLmNsYXNzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY29lci1lbGVtZW50cy9zcmMvdG9vbHMvbGliL3NvdXJjZS5jbGFzcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3ZDLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUV6QyxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDbEQsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBRXZDLE1BQU0sT0FBTyxNQUFNO2FBRVMsWU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