coer-elements 1.0.18 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +63 -1
- package/components/index.d.ts +5 -0
- package/components/lib/coer-accordion/coer-accordion.component.d.ts +32 -0
- package/components/lib/coer-button/coer-button.component.d.ts +46 -0
- package/components/lib/coer-checkbox/coer-checkbox.component.d.ts +29 -0
- package/components/lib/coer-datebox/coer-datebox.component.d.ts +58 -0
- package/components/lib/coer-dropdown/coer-dropdown.component.d.ts +69 -0
- package/components/lib/coer-filebox/coer-filebox.component.d.ts +36 -0
- package/components/lib/coer-form/coer-form.component.d.ts +36 -0
- package/components/lib/coer-grid/coer-grid.component.d.ts +53 -0
- package/components/lib/coer-grid/coer-grid.extension.d.ts +111 -0
- package/components/lib/coer-list/coer-list.component.d.ts +57 -0
- package/components/lib/coer-modal/coer-modal.component.d.ts +38 -0
- package/components/lib/coer-numberbox/coer-numberbox.component.d.ts +56 -0
- package/components/lib/coer-page-title/coer-page-title.component.d.ts +14 -0
- package/components/lib/coer-selectbox/coer-selectbox.component.d.ts +79 -0
- package/components/lib/coer-sidenav/coer-menu-option/coer-menu-option.component.d.ts +22 -0
- package/components/lib/coer-sidenav/coer-sidenav.component.d.ts +49 -0
- package/components/lib/coer-sidenav/coer-toolbar/coer-toolbar.component.d.ts +32 -0
- package/components/lib/coer-sidenav/coer-tree-accordion/coer-tree-accordion.component.d.ts +43 -0
- package/components/lib/coer-switch/coer-switch.component.d.ts +32 -0
- package/components/lib/coer-tab/coer-tab.component.d.ts +36 -0
- package/components/lib/coer-textarea/coer-textarea.component.d.ts +52 -0
- package/components/lib/coer-textbox/coer-textbox.component.d.ts +66 -0
- package/components/lib/components.module.d.ts +46 -0
- package/components/public-api.d.ts +21 -0
- package/directives/index.d.ts +5 -0
- package/directives/lib/coer-ref.directive.d.ts +14 -0
- package/directives/lib/directives.module.d.ts +8 -0
- package/directives/lib/life-cycle.directive.d.ts +16 -0
- package/directives/public-api.d.ts +3 -0
- package/extensions/index.d.ts +5 -0
- package/extensions/lib/object.extension.d.ts +1 -0
- package/extensions/lib/string.extension.d.ts +19 -0
- package/extensions/public-api.d.ts +2 -0
- package/fesm2022/coer-elements-components.mjs +4040 -0
- package/fesm2022/coer-elements-components.mjs.map +1 -0
- package/fesm2022/coer-elements-directives.mjs +84 -0
- package/fesm2022/coer-elements-directives.mjs.map +1 -0
- package/fesm2022/coer-elements-extensions.mjs +68 -0
- package/fesm2022/coer-elements-extensions.mjs.map +1 -0
- package/fesm2022/coer-elements-guards.mjs +28 -0
- package/fesm2022/coer-elements-guards.mjs.map +1 -0
- package/fesm2022/coer-elements-interceptors.mjs +64 -0
- package/fesm2022/coer-elements-interceptors.mjs.map +1 -0
- package/fesm2022/coer-elements-interfaces.mjs +6 -0
- package/fesm2022/coer-elements-interfaces.mjs.map +1 -0
- package/fesm2022/coer-elements-pages.mjs +441 -0
- package/fesm2022/coer-elements-pages.mjs.map +1 -0
- package/fesm2022/coer-elements-pipes.mjs +87 -0
- package/fesm2022/coer-elements-pipes.mjs.map +1 -0
- package/fesm2022/coer-elements-signals.mjs +35 -0
- package/fesm2022/coer-elements-signals.mjs.map +1 -0
- package/fesm2022/coer-elements-tools.mjs +1960 -0
- package/fesm2022/coer-elements-tools.mjs.map +1 -0
- package/fesm2022/coer-elements.mjs +68 -0
- package/fesm2022/coer-elements.mjs.map +1 -0
- package/guards/index.d.ts +5 -0
- package/guards/lib/login.guard.d.ts +2 -0
- package/guards/lib/page.guard.d.ts +2 -0
- package/guards/public-api.d.ts +2 -0
- package/images/loading.gif +0 -0
- package/images/no-image.png +0 -0
- package/images/no-user.png +0 -0
- package/index.d.ts +12 -0
- package/interceptors/index.d.ts +5 -0
- package/interceptors/lib/user.interceptor.d.ts +8 -0
- package/interceptors/lib/utc-offset.interceptor.d.ts +8 -0
- package/interceptors/public-api.d.ts +1 -0
- package/interfaces/index.d.ts +5 -0
- package/interfaces/lib/app-source.interface.d.ts +4 -0
- package/interfaces/lib/box-button.interface.d.ts +6 -0
- package/interfaces/lib/bulk-load.interface.d.ts +5 -0
- package/interfaces/lib/coer-filebox/file-image.interface.d.ts +14 -0
- package/interfaces/lib/coer-filebox/file.interface.d.ts +5 -0
- package/interfaces/lib/coer-grid/grid-button-by-row.interface.d.ts +6 -0
- package/interfaces/lib/coer-grid/grid-checkbox.interface.d.ts +5 -0
- package/interfaces/lib/coer-grid/grid-coer-numberbox.interface.d.ts +12 -0
- package/interfaces/lib/coer-grid/grid-coer-selectbox.interface.d.ts +9 -0
- package/interfaces/lib/coer-grid/grid-coer-switch.interface.d.ts +6 -0
- package/interfaces/lib/coer-grid/grid-coer-textbox.interface.d.ts +11 -0
- package/interfaces/lib/coer-grid/grid-column.interface.d.ts +24 -0
- package/interfaces/lib/coer-grid/grid-data-source.interface.d.ts +6 -0
- package/interfaces/lib/coer-grid/grid-header-button.interface.d.ts +8 -0
- package/interfaces/lib/coer-grid/grid-header-export-button.interface.d.ts +10 -0
- package/interfaces/lib/coer-grid/grid-header.interface.d.ts +5 -0
- package/interfaces/lib/coer-grid/grid-import.interface.d.ts +4 -0
- package/interfaces/lib/coer-grid/grid-input-checkbox.interface.d.ts +5 -0
- package/interfaces/lib/coer-grid/grid-input-switch-change.interface.d.ts +5 -0
- package/interfaces/lib/coer-grid/grid-input-textbox.interface.d.ts +5 -0
- package/interfaces/lib/coer-grid/grid-item.interface.d.ts +5 -0
- package/interfaces/lib/coer-grid/grid-keyup-enter.interface.d.ts +6 -0
- package/interfaces/lib/coer-grid/grid-length.interface.d.ts +5 -0
- package/interfaces/lib/coer-grid/grid-search.interface.d.ts +5 -0
- package/interfaces/lib/coer-grid/grid-sort.interface.d.ts +5 -0
- package/interfaces/lib/coer-menu/menu-access.interface.d.ts +7 -0
- package/interfaces/lib/coer-menu/menu-option-selected.interface.d.ts +9 -0
- package/interfaces/lib/coer-menu/menu-selected.interface.d.ts +10 -0
- package/interfaces/lib/coer-menu/menu.interface.d.ts +10 -0
- package/interfaces/lib/coer-ref.interface.d.ts +10 -0
- package/interfaces/lib/image.interface.d.ts +11 -0
- package/interfaces/lib/login-response.interface.d.ts +10 -0
- package/interfaces/lib/login.interface.d.ts +4 -0
- package/interfaces/lib/page-title/breadcrumb.interface.d.ts +6 -0
- package/interfaces/lib/page-title/go-back.interface.d.ts +6 -0
- package/interfaces/lib/page-title/information.interface.d.ts +4 -0
- package/interfaces/lib/screen-size.interface.d.ts +5 -0
- package/interfaces/lib/service/http-request.interface.d.ts +12 -0
- package/interfaces/lib/service/http-response.interface.d.ts +6 -0
- package/interfaces/lib/service/patch.interface.d.ts +5 -0
- package/interfaces/lib/toolbar-menu.interface.d.ts +5 -0
- package/interfaces/public-api.d.ts +41 -0
- package/package.json +67 -38
- package/pages/index.d.ts +5 -0
- package/pages/lib/coer-loading/loading.component.d.ts +5 -0
- package/pages/lib/coer-menu/coer-menu.component.d.ts +12 -0
- package/pages/lib/coer-system/coer-system.component.d.ts +64 -0
- package/pages/lib/coer-system/login/login.component.d.ts +31 -0
- package/pages/lib/home/home.component.d.ts +7 -0
- package/pages/lib/pages.module.d.ts +18 -0
- package/pages/public-api.d.ts +5 -0
- package/pipes/index.d.ts +5 -0
- package/pipes/lib/html.pipe.d.ts +10 -0
- package/pipes/lib/no-image.pipe.d.ts +7 -0
- package/pipes/lib/numeric-format.pipe.d.ts +7 -0
- package/pipes/lib/pipes.module.d.ts +9 -0
- package/pipes/public-api.d.ts +4 -0
- package/signals/index.d.ts +5 -0
- package/signals/lib/breakpoint.signal.d.ts +1 -0
- package/signals/lib/is-loading.signal.d.ts +1 -0
- package/signals/lib/is-menu-open.signal.d.ts +1 -0
- package/signals/lib/is-modal-open.signal.d.ts +1 -0
- package/signals/lib/menu-selected.signal.d.ts +2 -0
- package/signals/lib/navigation.signal.d.ts +2 -0
- package/signals/public-api.d.ts +6 -0
- package/styles/angular-material.scss +20 -0
- package/styles/animations.scss +11 -0
- package/styles/bootstrap.scss +1 -14
- package/styles/coer-elements.css +2054 -0
- package/styles/colors.scss +90 -49
- package/styles/containers.scss +44 -0
- package/styles/cursores.scss +19 -0
- package/styles/index.scss +58 -0
- package/styles/layout.scss +49 -0
- package/styles/position.scss +7 -0
- package/styles/scroll-bar.scss +20 -0
- package/tools/index.d.ts +5 -0
- package/tools/lib/breadcrumbs.class.d.ts +18 -0
- package/tools/lib/coer-alert/coer-alert.component.d.ts +23 -0
- package/tools/lib/coer-grid.templates.d.ts +11 -0
- package/tools/lib/colors.class.d.ts +21 -0
- package/tools/lib/control-value.class.d.ts +25 -0
- package/tools/lib/date-time.class.d.ts +21 -0
- package/tools/lib/elements-html.class.d.ts +8 -0
- package/tools/lib/files.class.d.ts +16 -0
- package/tools/lib/filters.class.d.ts +11 -0
- package/tools/lib/menu.class.d.ts +9 -0
- package/tools/lib/page.class.d.ts +83 -0
- package/tools/lib/screen.class.d.ts +13 -0
- package/tools/lib/section.class.d.ts +33 -0
- package/tools/lib/service.class.d.ts +42 -0
- package/tools/lib/source.class.d.ts +20 -0
- package/tools/lib/tools.d.ts +42 -0
- package/tools/lib/user.class.d.ts +11 -0
- package/tools/public-api.d.ts +17 -0
- package/Signals/index.ts +0 -7
- package/Tools/Breadcrumbs.class.ts +0 -84
- package/Tools/ControlValue.ts +0 -63
- package/Tools/DateTime.class.ts +0 -27
- package/Tools/Files.class.ts +0 -119
- package/Tools/Page.class.ts +0 -197
- package/Tools/Screen.class.ts +0 -50
- package/Tools/Source.class.ts +0 -107
- package/Tools/Tools.ts +0 -212
- package/components/coer-alert/coer-alert.component.html +0 -56
- package/components/coer-alert/coer-alert.component.scss +0 -100
- package/components/coer-alert/coer-alert.component.ts +0 -249
- package/components/index.ts +0 -96
- package/dist_browser/Tools/Breadcrumbs.class.js +0 -66
- package/dist_browser/Tools/ControlValue.js +0 -49
- package/dist_browser/Tools/DateTime.class.js +0 -25
- package/dist_browser/Tools/Files.class.js +0 -99
- package/dist_browser/Tools/Page.class.js +0 -213
- package/dist_browser/Tools/Screen.class.js +0 -68
- package/dist_browser/Tools/Source.class.js +0 -83
- package/dist_browser/Tools/Tools.js +0 -227
- package/dist_browser/components/coer-alert/coer-alert.component.js +0 -314
- package/dist_browser/index.js +0 -8
- package/dist_node/Tools/Breadcrumbs.class.js +0 -69
- package/dist_node/Tools/ControlValue.js +0 -53
- package/dist_node/Tools/DateTime.class.js +0 -28
- package/dist_node/Tools/Files.class.js +0 -102
- package/dist_node/Tools/Page.class.js +0 -216
- package/dist_node/Tools/Screen.class.js +0 -71
- package/dist_node/Tools/Source.class.js +0 -86
- package/dist_node/Tools/Tools.js +0 -230
- package/dist_node/components/coer-alert/coer-alert.component.js +0 -317
- package/dist_node/index.js +0 -24
- package/dist_node/interfaces/index.js +0 -2
- package/index.ts +0 -8
- package/interfaces/index.ts +0 -47
- package/styles/coer.scss +0 -95
- package/tsconfig.json +0 -29
@@ -1,213 +0,0 @@
|
|
1
|
-
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
2
|
-
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
3
|
-
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
4
|
-
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
5
|
-
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
6
|
-
var _, done = false;
|
7
|
-
for (var i = decorators.length - 1; i >= 0; i--) {
|
8
|
-
var context = {};
|
9
|
-
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
10
|
-
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
11
|
-
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
12
|
-
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
13
|
-
if (kind === "accessor") {
|
14
|
-
if (result === void 0) continue;
|
15
|
-
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
16
|
-
if (_ = accept(result.get)) descriptor.get = _;
|
17
|
-
if (_ = accept(result.set)) descriptor.set = _;
|
18
|
-
if (_ = accept(result.init)) initializers.unshift(_);
|
19
|
-
}
|
20
|
-
else if (_ = accept(result)) {
|
21
|
-
if (kind === "field") initializers.unshift(_);
|
22
|
-
else descriptor[key] = _;
|
23
|
-
}
|
24
|
-
}
|
25
|
-
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
26
|
-
done = true;
|
27
|
-
};
|
28
|
-
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
29
|
-
var useValue = arguments.length > 2;
|
30
|
-
for (var i = 0; i < initializers.length; i++) {
|
31
|
-
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
32
|
-
}
|
33
|
-
return useValue ? value : void 0;
|
34
|
-
};
|
35
|
-
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
|
36
|
-
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
37
|
-
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
38
|
-
};
|
39
|
-
import { Component, inject } from '@angular/core';
|
40
|
-
import { Breadcrumbs } from "./Breadcrumbs.class";
|
41
|
-
import { Source } from './Source.class';
|
42
|
-
import { CoerAlert } from '../components/coer-alert/coer-alert.component';
|
43
|
-
import { ActivatedRoute, Router } from '@angular/router';
|
44
|
-
import { Tools } from './Tools';
|
45
|
-
var Page = function () {
|
46
|
-
var _classDecorators = [Component({ template: '' })];
|
47
|
-
var _classDescriptor;
|
48
|
-
var _classExtraInitializers = [];
|
49
|
-
var _classThis;
|
50
|
-
var Page = _classThis = /** @class */ (function () {
|
51
|
-
function Page_1(page) {
|
52
|
-
//Injection
|
53
|
-
this.alert = inject(CoerAlert);
|
54
|
-
this.router = inject(Router);
|
55
|
-
this.activatedRoute = inject(ActivatedRoute);
|
56
|
-
/** */
|
57
|
-
this.isUpdate = false;
|
58
|
-
/** */
|
59
|
-
this.isLoading = false;
|
60
|
-
/** */
|
61
|
-
this.isReady = false;
|
62
|
-
/** */
|
63
|
-
this.enableAnimations = false;
|
64
|
-
/** */
|
65
|
-
this.breadcrumbs = [];
|
66
|
-
/** */
|
67
|
-
this.pageResponse = null;
|
68
|
-
/** */
|
69
|
-
this.goBack = { show: false };
|
70
|
-
//Private Variables
|
71
|
-
this._page = '';
|
72
|
-
this._source = null;
|
73
|
-
this._preventDestroy = false;
|
74
|
-
/** */
|
75
|
-
this.GoBack = function (path) { return (function () {
|
76
|
-
if (path)
|
77
|
-
Breadcrumbs.Remove(path);
|
78
|
-
else
|
79
|
-
Breadcrumbs.RemoveLast();
|
80
|
-
}); };
|
81
|
-
/** Returns true if the value is null or undefined, false otherwise */
|
82
|
-
this.IsNotNull = Tools.IsNotNull;
|
83
|
-
/** Returns true if the value is null or undefined, false otherwise */
|
84
|
-
this.IsNull = Tools.IsNull;
|
85
|
-
/** Returns true if the value is null or undefined or contains only whitespace, false otherwise */
|
86
|
-
this.IsOnlyWhiteSpace = Tools.IsOnlyWhiteSpace;
|
87
|
-
this.SetPageName(page);
|
88
|
-
this.SetSource();
|
89
|
-
this.GetSource();
|
90
|
-
this.GetNavigation();
|
91
|
-
this.SetGoBack();
|
92
|
-
this.GetPageResponse();
|
93
|
-
}
|
94
|
-
Page_1.prototype.ngAfterViewInit = function () {
|
95
|
-
var _this = this;
|
96
|
-
this.routeParams = this.activatedRoute.snapshot.params;
|
97
|
-
this.queryParams = this.activatedRoute.snapshot.queryParams;
|
98
|
-
setTimeout(function () {
|
99
|
-
_this.isReady = true;
|
100
|
-
_this.RunPage();
|
101
|
-
setTimeout(function () { _this.enableAnimations = true; }, 1000);
|
102
|
-
});
|
103
|
-
};
|
104
|
-
Page_1.prototype.ngOnDestroy = function () {
|
105
|
-
if (!this._preventDestroy)
|
106
|
-
Source.ClearPageResponse();
|
107
|
-
};
|
108
|
-
/** Main method. Starts after ngAfterViewInit() */
|
109
|
-
Page_1.prototype.RunPage = function () { };
|
110
|
-
;
|
111
|
-
/** Rename the last breadcrumb and update the url id */
|
112
|
-
Page_1.prototype.SetPageName = function (name, id) {
|
113
|
-
if (id === void 0) { id = null; }
|
114
|
-
this._page = name;
|
115
|
-
var path = this.router.url;
|
116
|
-
if (path.includes('?'))
|
117
|
-
path = path.split('?')[0];
|
118
|
-
if (id) {
|
119
|
-
var PATH_ARRAY = path.split('/');
|
120
|
-
var PATH_ID = Tools.BreakReference(PATH_ARRAY).pop();
|
121
|
-
if (PATH_ID) {
|
122
|
-
PATH_ARRAY[PATH_ARRAY.length - 1] = String(id);
|
123
|
-
path = PATH_ARRAY.join('/');
|
124
|
-
}
|
125
|
-
}
|
126
|
-
if (this.breadcrumbs.length > 0) {
|
127
|
-
this.breadcrumbs[this.breadcrumbs.length - 1].page = name;
|
128
|
-
this.breadcrumbs[this.breadcrumbs.length - 1].path = path;
|
129
|
-
Breadcrumbs.SetLast(name, path);
|
130
|
-
}
|
131
|
-
this.router.navigateByUrl(path);
|
132
|
-
};
|
133
|
-
/** */
|
134
|
-
Page_1.prototype.SetSource = function () {
|
135
|
-
Source.Set(this._page);
|
136
|
-
};
|
137
|
-
/** */
|
138
|
-
Page_1.prototype.GetSource = function () {
|
139
|
-
this._source = Source.Get();
|
140
|
-
};
|
141
|
-
/** */
|
142
|
-
Page_1.prototype.GetPageResponse = function () {
|
143
|
-
this.pageResponse = Source.GetPageResponse();
|
144
|
-
};
|
145
|
-
/** */
|
146
|
-
Page_1.prototype.GetNavigation = function () {
|
147
|
-
var _this = this;
|
148
|
-
if (this._source) {
|
149
|
-
this.breadcrumbs = Breadcrumbs.Get().map(function (item) { return Object.assign({
|
150
|
-
page: item.page,
|
151
|
-
path: item.path,
|
152
|
-
click: _this.GoBack(item.path)
|
153
|
-
}); });
|
154
|
-
}
|
155
|
-
else
|
156
|
-
this.breadcrumbs = [{ page: this._page }];
|
157
|
-
};
|
158
|
-
/** */
|
159
|
-
Page_1.prototype.SetGoBack = function () {
|
160
|
-
if (this._source) {
|
161
|
-
this.goBack = {
|
162
|
-
show: true,
|
163
|
-
path: this._source.path,
|
164
|
-
click: this.GoBack()
|
165
|
-
};
|
166
|
-
}
|
167
|
-
};
|
168
|
-
/** Navigate to previous page */
|
169
|
-
Page_1.prototype.GoToSource = function (pageResponse) {
|
170
|
-
var _this = this;
|
171
|
-
if (pageResponse === void 0) { pageResponse = null; }
|
172
|
-
if (this._source) {
|
173
|
-
Breadcrumbs.RemoveLast();
|
174
|
-
this.SetPageResponse(pageResponse);
|
175
|
-
Tools.Sleep().then(function (_) { return _this.router.navigateByUrl(_this._source.path); });
|
176
|
-
}
|
177
|
-
};
|
178
|
-
;
|
179
|
-
/** */
|
180
|
-
Page_1.prototype.SetPageResponse = function (pageResponse) {
|
181
|
-
if (pageResponse === void 0) { pageResponse = null; }
|
182
|
-
if (Tools.IsNotNull(pageResponse)) {
|
183
|
-
this._preventDestroy = true;
|
184
|
-
Source.SetPageResponse(pageResponse);
|
185
|
-
}
|
186
|
-
};
|
187
|
-
;
|
188
|
-
/** */
|
189
|
-
Page_1.prototype.ReloadPage = function () {
|
190
|
-
Breadcrumbs.RemoveLast();
|
191
|
-
Tools.Sleep().then(function (_) { return window.location.reload(); });
|
192
|
-
};
|
193
|
-
/** */
|
194
|
-
Page_1.prototype.Log = function (value, log) {
|
195
|
-
if (log === void 0) { log = null; }
|
196
|
-
if (Tools.IsNotNull(log))
|
197
|
-
console.log({ log: log, value: value });
|
198
|
-
else
|
199
|
-
console.log(value);
|
200
|
-
};
|
201
|
-
return Page_1;
|
202
|
-
}());
|
203
|
-
__setFunctionName(_classThis, "Page");
|
204
|
-
(function () {
|
205
|
-
var _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
206
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
207
|
-
Page = _classThis = _classDescriptor.value;
|
208
|
-
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
209
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
210
|
-
})();
|
211
|
-
return Page = _classThis;
|
212
|
-
}();
|
213
|
-
export { Page };
|
@@ -1,68 +0,0 @@
|
|
1
|
-
import { Observable } from "rxjs";
|
2
|
-
var Screen = /** @class */ (function () {
|
3
|
-
function Screen() {
|
4
|
-
}
|
5
|
-
Object.defineProperty(Screen, "WINDOW_WIDTH", {
|
6
|
-
get: function () {
|
7
|
-
return window.innerWidth;
|
8
|
-
},
|
9
|
-
enumerable: false,
|
10
|
-
configurable: true
|
11
|
-
});
|
12
|
-
Object.defineProperty(Screen, "WINDOW_HEIGHT", {
|
13
|
-
get: function () {
|
14
|
-
return window.innerHeight;
|
15
|
-
},
|
16
|
-
enumerable: false,
|
17
|
-
configurable: true
|
18
|
-
});
|
19
|
-
Object.defineProperty(Screen, "DEVICE_WIDTH", {
|
20
|
-
get: function () {
|
21
|
-
return window.screen.width;
|
22
|
-
},
|
23
|
-
enumerable: false,
|
24
|
-
configurable: true
|
25
|
-
});
|
26
|
-
Object.defineProperty(Screen, "DEVICE_HEIGHT", {
|
27
|
-
get: function () {
|
28
|
-
return window.screen.height;
|
29
|
-
},
|
30
|
-
enumerable: false,
|
31
|
-
configurable: true
|
32
|
-
});
|
33
|
-
Object.defineProperty(Screen, "BREAKPOINT", {
|
34
|
-
get: function () {
|
35
|
-
if (window.innerWidth < 576)
|
36
|
-
return 'xs';
|
37
|
-
else if (window.innerWidth >= 576 && window.innerWidth < 768)
|
38
|
-
return 'sm';
|
39
|
-
else if (window.innerWidth >= 768 && window.innerWidth < 992)
|
40
|
-
return 'md';
|
41
|
-
else if (window.innerWidth >= 992 && window.innerWidth < 1200)
|
42
|
-
return 'lg';
|
43
|
-
else if (window.innerWidth >= 1200 && window.innerWidth < 1400)
|
44
|
-
return 'xl';
|
45
|
-
else
|
46
|
-
return 'xxl';
|
47
|
-
},
|
48
|
-
enumerable: false,
|
49
|
-
configurable: true
|
50
|
-
});
|
51
|
-
var _a;
|
52
|
-
_a = Screen;
|
53
|
-
/** */
|
54
|
-
Screen.Resize = new Observable(function (subscriber) {
|
55
|
-
window.addEventListener("load", function () {
|
56
|
-
window.dispatchEvent(new Event('resize'));
|
57
|
-
});
|
58
|
-
window.onresize = function () {
|
59
|
-
subscriber.next({
|
60
|
-
width: window.innerWidth,
|
61
|
-
height: window.innerHeight,
|
62
|
-
breakpoin: _a.BREAKPOINT
|
63
|
-
});
|
64
|
-
};
|
65
|
-
});
|
66
|
-
return Screen;
|
67
|
-
}());
|
68
|
-
export { Screen };
|
@@ -1,83 +0,0 @@
|
|
1
|
-
import { Breadcrumbs } from "./Breadcrumbs.class";
|
2
|
-
import { Router } from '@angular/router';
|
3
|
-
import { inject } from "@angular/core";
|
4
|
-
import { Tools } from './Tools';
|
5
|
-
var Source = /** @class */ (function () {
|
6
|
-
function Source() {
|
7
|
-
}
|
8
|
-
/** */
|
9
|
-
Source.Set = function (page) {
|
10
|
-
var ROUTER = inject(Router);
|
11
|
-
var path = ROUTER.url;
|
12
|
-
if (path.includes('?'))
|
13
|
-
path = path.split('?')[0];
|
14
|
-
Breadcrumbs.Add(page, path);
|
15
|
-
var breadcrumbs = Breadcrumbs.Get();
|
16
|
-
if (breadcrumbs.length >= 2) {
|
17
|
-
breadcrumbs.pop();
|
18
|
-
var breadcrumb = breadcrumbs.pop();
|
19
|
-
this.Save({ page: breadcrumb.page, path: breadcrumb.path });
|
20
|
-
}
|
21
|
-
else
|
22
|
-
this.Save(null);
|
23
|
-
};
|
24
|
-
/** */
|
25
|
-
Source.Save = function (source) {
|
26
|
-
var storage = sessionStorage.getItem(this.storage);
|
27
|
-
if (storage)
|
28
|
-
storage = JSON.parse(storage);
|
29
|
-
storage = Object.assign({}, storage, { source: source });
|
30
|
-
sessionStorage.setItem(this.storage, JSON.stringify(storage));
|
31
|
-
};
|
32
|
-
/** */
|
33
|
-
Source.Get = function () {
|
34
|
-
var storage = sessionStorage.getItem(this.storage);
|
35
|
-
if (storage) {
|
36
|
-
storage = JSON.parse(storage);
|
37
|
-
if (storage.hasOwnProperty('source')) {
|
38
|
-
return storage.source;
|
39
|
-
}
|
40
|
-
}
|
41
|
-
return null;
|
42
|
-
};
|
43
|
-
/** */
|
44
|
-
Source.GetRoot = function () {
|
45
|
-
var breadcrumbs = Breadcrumbs.Get();
|
46
|
-
return (breadcrumbs.length > 0) ? breadcrumbs.shift() : null;
|
47
|
-
};
|
48
|
-
/** */
|
49
|
-
Source.SetPageResponse = function (pageResponse) {
|
50
|
-
var storage = sessionStorage.getItem(this.storage);
|
51
|
-
storage = JSON.parse(storage);
|
52
|
-
storage = Object.assign({}, storage, { pageResponse: pageResponse });
|
53
|
-
sessionStorage.setItem(this.storage, JSON.stringify(storage));
|
54
|
-
};
|
55
|
-
/** */
|
56
|
-
Source.GetPageResponse = function () {
|
57
|
-
var storage = sessionStorage.getItem(this.storage);
|
58
|
-
if (storage) {
|
59
|
-
storage = JSON.parse(storage);
|
60
|
-
if (storage.hasOwnProperty('pageResponse')) {
|
61
|
-
return Tools.BreakReference(storage.pageResponse);
|
62
|
-
}
|
63
|
-
}
|
64
|
-
return null;
|
65
|
-
};
|
66
|
-
/** */
|
67
|
-
Source.ClearPageResponse = function () {
|
68
|
-
var storage = sessionStorage.getItem(this.storage);
|
69
|
-
storage = JSON.parse(storage);
|
70
|
-
if (storage.hasOwnProperty('pageResponse')) {
|
71
|
-
delete storage.pageResponse;
|
72
|
-
}
|
73
|
-
storage = Object.assign({}, storage);
|
74
|
-
sessionStorage.setItem(this.storage, JSON.stringify(storage));
|
75
|
-
};
|
76
|
-
/** Clear Source */
|
77
|
-
Source.Reset = function () {
|
78
|
-
sessionStorage.removeItem(this.storage);
|
79
|
-
};
|
80
|
-
Source.storage = 'COER-System';
|
81
|
-
return Source;
|
82
|
-
}());
|
83
|
-
export { Source };
|
@@ -1,227 +0,0 @@
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
2
|
-
__assign = Object.assign || function(t) {
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
-
s = arguments[i];
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
-
t[p] = s[p];
|
7
|
-
}
|
8
|
-
return t;
|
9
|
-
};
|
10
|
-
return __assign.apply(this, arguments);
|
11
|
-
};
|
12
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
13
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
14
|
-
if (ar || !(i in from)) {
|
15
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
16
|
-
ar[i] = from[i];
|
17
|
-
}
|
18
|
-
}
|
19
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
20
|
-
};
|
21
|
-
import { Guid } from "guid-typescript";
|
22
|
-
import { signal } from "@angular/core";
|
23
|
-
var reference_signal = signal({});
|
24
|
-
export var Tools = {
|
25
|
-
/** Generate a Guid */
|
26
|
-
GetGuid: function (seed) {
|
27
|
-
if (seed === void 0) { seed = 'coer-system'; }
|
28
|
-
return "".concat(seed, "-").concat(Guid.create().toString());
|
29
|
-
},
|
30
|
-
/** Returns true if the value is null or undefined, false otherwise */
|
31
|
-
IsNull: function (value) {
|
32
|
-
if (value === undefined)
|
33
|
-
return true;
|
34
|
-
if (value === null)
|
35
|
-
return true;
|
36
|
-
return false;
|
37
|
-
},
|
38
|
-
/** Returns true if the value is not null or undefined, false otherwise */
|
39
|
-
IsNotNull: function (value) {
|
40
|
-
if (value === undefined)
|
41
|
-
return false;
|
42
|
-
if (value === null)
|
43
|
-
return false;
|
44
|
-
return true;
|
45
|
-
},
|
46
|
-
/** Returns true if the value is null or undefined or contains only whitespace, false otherwise */
|
47
|
-
IsOnlyWhiteSpace: function (value) {
|
48
|
-
if (value === undefined)
|
49
|
-
return true;
|
50
|
-
if (value === null)
|
51
|
-
return true;
|
52
|
-
if (value.toString().trim() === '')
|
53
|
-
return true;
|
54
|
-
return false;
|
55
|
-
},
|
56
|
-
/** Break reference of a object or array */
|
57
|
-
BreakReference: function (object) {
|
58
|
-
if (object === undefined)
|
59
|
-
return undefined;
|
60
|
-
if (object === null)
|
61
|
-
return null;
|
62
|
-
var OBJECT = JSON.parse(JSON.stringify(object));
|
63
|
-
return (Array.isArray(OBJECT)) ? __spreadArray([], OBJECT, true) : __assign({}, OBJECT);
|
64
|
-
},
|
65
|
-
/** Clean extra whitespaces */
|
66
|
-
CleanUpBlanks: function (text) {
|
67
|
-
if (Tools.IsNull(text))
|
68
|
-
return '';
|
69
|
-
var worlds = String(text).split(' ');
|
70
|
-
worlds = worlds.filter(function (x) { return x.length > 0; });
|
71
|
-
return worlds.join(' ');
|
72
|
-
},
|
73
|
-
/** Get properties of an object */
|
74
|
-
GetObjectProperties: function (obj) {
|
75
|
-
var properties = [];
|
76
|
-
if (Tools.IsNull(obj))
|
77
|
-
return properties;
|
78
|
-
for (var property in obj)
|
79
|
-
properties.push(String(property));
|
80
|
-
return properties;
|
81
|
-
},
|
82
|
-
/**
|
83
|
-
* Set an index and merge more arrays of the same type
|
84
|
-
* @returns A new array
|
85
|
-
* */
|
86
|
-
SetIndex: function (array) {
|
87
|
-
var args = [];
|
88
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
89
|
-
args[_i - 1] = arguments[_i];
|
90
|
-
}
|
91
|
-
var index = 0;
|
92
|
-
for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {
|
93
|
-
var arg = args_1[_a];
|
94
|
-
array = Tools.BreakReference(array).concat(Tools.BreakReference(arg));
|
95
|
-
}
|
96
|
-
return Tools.BreakReference(array).map(function (item) { return Object.assign({ index: index++ }, item); });
|
97
|
-
},
|
98
|
-
/** Set First Char To Lower */
|
99
|
-
FirstCharToLower: function (text) {
|
100
|
-
if (Tools.IsNull(text))
|
101
|
-
return '';
|
102
|
-
var textArray = [];
|
103
|
-
for (var i = 0; i < text.length; i++) {
|
104
|
-
if (i === 0)
|
105
|
-
textArray.push(text[i].toLowerCase());
|
106
|
-
else
|
107
|
-
textArray.push(text[i]);
|
108
|
-
}
|
109
|
-
return textArray.join('');
|
110
|
-
},
|
111
|
-
/** Set First Char To Upper */
|
112
|
-
FirstCharToUpper: function (text) {
|
113
|
-
if (Tools.IsNull(text))
|
114
|
-
return '';
|
115
|
-
var textArray = [];
|
116
|
-
for (var i = 0; i < text.length; i++) {
|
117
|
-
if (i === 0)
|
118
|
-
textArray.push(text[i].toUpperCase());
|
119
|
-
else
|
120
|
-
textArray.push(text[i]);
|
121
|
-
}
|
122
|
-
return textArray.join('');
|
123
|
-
},
|
124
|
-
/** Sort an array in ascending order by property */
|
125
|
-
SortBy: function (array, property, propertyType) {
|
126
|
-
if (propertyType === void 0) { propertyType = 'string'; }
|
127
|
-
switch (propertyType) {
|
128
|
-
case 'string': {
|
129
|
-
return array.sort(function (x, y) {
|
130
|
-
if (String(x[property]).toUpperCase().trim() < String(y[property]).toUpperCase().trim())
|
131
|
-
return -1;
|
132
|
-
else if (String(x[property]).toUpperCase().trim() > String(y[property]).toUpperCase().trim())
|
133
|
-
return 1;
|
134
|
-
else
|
135
|
-
return 0;
|
136
|
-
});
|
137
|
-
}
|
138
|
-
case 'number': {
|
139
|
-
return array.sort(function (x, y) { return Number(x[property] - Number(y[property])); });
|
140
|
-
}
|
141
|
-
}
|
142
|
-
},
|
143
|
-
/** Sort an array in descending order by property */
|
144
|
-
SortByDesc: function (array, property, propertyType) {
|
145
|
-
if (propertyType === void 0) { propertyType = 'string'; }
|
146
|
-
switch (propertyType) {
|
147
|
-
case 'string': {
|
148
|
-
return array.sort(function (x, y) {
|
149
|
-
if (String(x[property]).toUpperCase().trim() < String(y[property]).toUpperCase().trim())
|
150
|
-
return 1;
|
151
|
-
else if (String(x[property]).toUpperCase().trim() > String(y[property]).toUpperCase().trim())
|
152
|
-
return -1;
|
153
|
-
else
|
154
|
-
return 0;
|
155
|
-
});
|
156
|
-
}
|
157
|
-
case 'number': {
|
158
|
-
return array.sort(function (x, y) { return Number(Number(y[property])) - x[property]; });
|
159
|
-
}
|
160
|
-
}
|
161
|
-
},
|
162
|
-
/** Return a string with forman numeric */
|
163
|
-
GetNumericFormat: function (value, decimals) {
|
164
|
-
if (decimals === void 0) { decimals = 0; }
|
165
|
-
if (value == undefined
|
166
|
-
|| value == null
|
167
|
-
|| value.toString().trim() == ''
|
168
|
-
|| isNaN(Number(value))) {
|
169
|
-
return '0';
|
170
|
-
}
|
171
|
-
var valueInteger = '';
|
172
|
-
var valueDecimal = '';
|
173
|
-
value = value.toString().replaceAll(' ', '');
|
174
|
-
if (value.includes('.') || (decimals > 0)) {
|
175
|
-
valueInteger = value.includes('.') ? value.split('.')[0] : value;
|
176
|
-
if (decimals > 0) {
|
177
|
-
var PADDING = decimals - valueDecimal.length;
|
178
|
-
valueDecimal = value.includes('.') ? value.split('.')[1] : '';
|
179
|
-
for (var i = 0; i < PADDING; i++)
|
180
|
-
valueDecimal += '0';
|
181
|
-
valueDecimal = valueDecimal.substring(0, decimals);
|
182
|
-
valueDecimal = ".".concat(valueDecimal);
|
183
|
-
}
|
184
|
-
}
|
185
|
-
else {
|
186
|
-
valueInteger = value;
|
187
|
-
}
|
188
|
-
var counter = 0;
|
189
|
-
var VALUE_INTEGER_ARRAY = [];
|
190
|
-
for (var _i = 0, _a = valueInteger.split('').reverse(); _i < _a.length; _i++) {
|
191
|
-
var char = _a[_i];
|
192
|
-
if (counter == 3) {
|
193
|
-
VALUE_INTEGER_ARRAY.push(',');
|
194
|
-
counter = 0;
|
195
|
-
}
|
196
|
-
VALUE_INTEGER_ARRAY.push(char);
|
197
|
-
++counter;
|
198
|
-
}
|
199
|
-
valueInteger = VALUE_INTEGER_ARRAY.reverse().join('');
|
200
|
-
return "".concat(valueInteger).concat(valueDecimal);
|
201
|
-
},
|
202
|
-
/** Wait the time indicated */
|
203
|
-
Sleep: function (milliseconds, reference) {
|
204
|
-
if (milliseconds === void 0) { milliseconds = 0; }
|
205
|
-
if (reference === void 0) { reference = null; }
|
206
|
-
if (Tools.IsNull(reference)) {
|
207
|
-
return new Promise(function (Resolve) { return setTimeout(Resolve, milliseconds); });
|
208
|
-
}
|
209
|
-
else
|
210
|
-
return new Promise(function (Resolve) {
|
211
|
-
var _a;
|
212
|
-
reference = reference.replaceAll(' ', '_').toLowerCase();
|
213
|
-
if (reference_signal().hasOwnProperty(reference)) {
|
214
|
-
clearInterval(reference_signal()[reference]);
|
215
|
-
}
|
216
|
-
reference_signal.set(Object.assign(reference_signal(), (_a = {},
|
217
|
-
_a[reference] = setTimeout(function () {
|
218
|
-
Resolve();
|
219
|
-
clearInterval(reference_signal()[reference]);
|
220
|
-
var _reference = __assign({}, reference_signal());
|
221
|
-
delete _reference[reference];
|
222
|
-
reference_signal.set(__assign({}, _reference));
|
223
|
-
}, milliseconds),
|
224
|
-
_a)));
|
225
|
-
});
|
226
|
-
}
|
227
|
-
};
|