coer-elements 0.0.23 → 0.0.25

Sign up to get free protection for your applications and to get access to all the features.
Files changed (181) hide show
  1. package/components/index.d.ts +5 -0
  2. package/components/lib/coer-button/coer-button.component.d.ts +44 -0
  3. package/components/lib/coer-checkbox/coer-checkbox.component.d.ts +28 -0
  4. package/components/lib/coer-filebox/coer-filebox.component.d.ts +33 -0
  5. package/components/lib/coer-form/coer-form.component.d.ts +33 -0
  6. package/components/lib/coer-grid/coer-grid.component.d.ts +53 -0
  7. package/components/lib/coer-grid/coer-grid.extension.d.ts +103 -0
  8. package/components/lib/coer-grid/coer-grid.templates.d.ts +9 -0
  9. package/components/lib/coer-modal/coer-modal.component.d.ts +38 -0
  10. package/components/lib/coer-numberbox/coer-numberbox.component.d.ts +55 -0
  11. package/components/lib/coer-page-title/coer-page-title.component.d.ts +12 -0
  12. package/components/lib/coer-selectbox/coer-selectbox.component.d.ts +75 -0
  13. package/components/lib/coer-switch/coer-switch.component.d.ts +31 -0
  14. package/components/lib/coer-tab/coer-tab.component.d.ts +35 -0
  15. package/components/lib/coer-textarea/coer-textarea.component.d.ts +51 -0
  16. package/components/lib/coer-textbox/coer-textbox.component.d.ts +57 -0
  17. package/components/lib/components.module.d.ts +30 -0
  18. package/components/public-api.d.ts +15 -0
  19. package/directives/index.d.ts +5 -0
  20. package/directives/lib/coer-ref.directive.d.ts +14 -0
  21. package/directives/lib/directives.module.d.ts +8 -0
  22. package/directives/lib/life-cycle.directive.d.ts +16 -0
  23. package/directives/public-api.d.ts +3 -0
  24. package/esm2022/components/coer-elements-components.mjs +5 -0
  25. package/esm2022/components/lib/coer-button/coer-button.component.mjs +133 -0
  26. package/esm2022/components/lib/coer-checkbox/coer-checkbox.component.mjs +83 -0
  27. package/esm2022/components/lib/coer-filebox/coer-filebox.component.mjs +102 -0
  28. package/esm2022/components/lib/coer-form/coer-form.component.mjs +101 -0
  29. package/esm2022/components/lib/coer-grid/coer-grid.component.mjs +512 -0
  30. package/esm2022/components/lib/coer-grid/coer-grid.extension.mjs +408 -0
  31. package/esm2022/components/lib/coer-grid/coer-grid.templates.mjs +30 -0
  32. package/esm2022/components/lib/coer-modal/coer-modal.component.mjs +107 -0
  33. package/esm2022/components/lib/coer-numberbox/coer-numberbox.component.mjs +258 -0
  34. package/esm2022/components/lib/coer-page-title/coer-page-title.component.mjs +44 -0
  35. package/esm2022/components/lib/coer-selectbox/coer-selectbox.component.mjs +338 -0
  36. package/esm2022/components/lib/coer-switch/coer-switch.component.mjs +93 -0
  37. package/esm2022/components/lib/coer-tab/coer-tab.component.mjs +116 -0
  38. package/esm2022/components/lib/coer-textarea/coer-textarea.component.mjs +156 -0
  39. package/esm2022/components/lib/coer-textbox/coer-textbox.component.mjs +195 -0
  40. package/esm2022/components/lib/components.module.mjs +129 -0
  41. package/esm2022/components/public-api.mjs +16 -0
  42. package/esm2022/directives/coer-elements-directives.mjs +5 -0
  43. package/esm2022/directives/lib/coer-ref.directive.mjs +23 -0
  44. package/esm2022/directives/lib/directives.module.mjs +25 -0
  45. package/esm2022/directives/lib/life-cycle.directive.mjs +33 -0
  46. package/esm2022/directives/public-api.mjs +4 -0
  47. package/esm2022/interfaces/coer-elements-interfaces.mjs +5 -0
  48. package/esm2022/interfaces/lib/app-source.interface.mjs +2 -0
  49. package/esm2022/interfaces/lib/coer-filebox/file-image.interface.mjs +2 -0
  50. package/esm2022/interfaces/lib/coer-filebox/file.interface.mjs +2 -0
  51. package/esm2022/interfaces/lib/coer-grid/grid-button-by-row.interface.mjs +2 -0
  52. package/esm2022/interfaces/lib/coer-grid/grid-checkbox.interface.mjs +2 -0
  53. package/esm2022/interfaces/lib/coer-grid/grid-coer-numberbox.interface.mjs +2 -0
  54. package/esm2022/interfaces/lib/coer-grid/grid-coer-selectbox.interface.mjs +2 -0
  55. package/esm2022/interfaces/lib/coer-grid/grid-coer-switch.interface.mjs +2 -0
  56. package/esm2022/interfaces/lib/coer-grid/grid-coer-textbox.interface.mjs +2 -0
  57. package/esm2022/interfaces/lib/coer-grid/grid-column.interface.mjs +2 -0
  58. package/esm2022/interfaces/lib/coer-grid/grid-data-source.interface.mjs +2 -0
  59. package/esm2022/interfaces/lib/coer-grid/grid-header-button.interface.mjs +2 -0
  60. package/esm2022/interfaces/lib/coer-grid/grid-header-export-button.interface.mjs +2 -0
  61. package/esm2022/interfaces/lib/coer-grid/grid-header.interface.mjs +2 -0
  62. package/esm2022/interfaces/lib/coer-grid/grid-import.interface.mjs +2 -0
  63. package/esm2022/interfaces/lib/coer-grid/grid-input-checkbox.interface.mjs +2 -0
  64. package/esm2022/interfaces/lib/coer-grid/grid-input-switch-change.interface.mjs +2 -0
  65. package/esm2022/interfaces/lib/coer-grid/grid-input-textbox.interface.mjs +2 -0
  66. package/esm2022/interfaces/lib/coer-grid/grid-item.interface.mjs +2 -0
  67. package/esm2022/interfaces/lib/coer-grid/grid-keyup-enter.interface.mjs +2 -0
  68. package/esm2022/interfaces/lib/coer-grid/grid-length.interface.mjs +2 -0
  69. package/esm2022/interfaces/lib/coer-grid/grid-search.interface.mjs +2 -0
  70. package/esm2022/interfaces/lib/coer-grid/grid-sort.interface.mjs +2 -0
  71. package/esm2022/interfaces/lib/coer-menu/menu-option-selected.interface.mjs +2 -0
  72. package/esm2022/interfaces/lib/coer-menu/menu-selected.interface.mjs +2 -0
  73. package/esm2022/interfaces/lib/coer-menu/menu.interface.mjs +2 -0
  74. package/esm2022/interfaces/lib/coer-ref.interface.mjs +2 -0
  75. package/esm2022/interfaces/lib/page-title/breadcrumb.interface.mjs +2 -0
  76. package/esm2022/interfaces/lib/page-title/go-back.interface.mjs +2 -0
  77. package/esm2022/interfaces/lib/screen-size.interface.mjs +2 -0
  78. package/esm2022/interfaces/lib/service/http-request.interface.mjs +2 -0
  79. package/esm2022/interfaces/lib/service/http-response.interface.mjs +2 -0
  80. package/esm2022/interfaces/lib/service/patch.interface.mjs +2 -0
  81. package/esm2022/interfaces/public-api.mjs +39 -0
  82. package/esm2022/pipes/coer-elements-pipes.mjs +5 -0
  83. package/esm2022/pipes/lib/html.pipe.mjs +18 -0
  84. package/esm2022/pipes/lib/no-image.pipe.mjs +23 -0
  85. package/esm2022/pipes/lib/numeric-format.pipe.mjs +15 -0
  86. package/esm2022/pipes/lib/pipes.module.mjs +31 -0
  87. package/esm2022/pipes/public-api.mjs +5 -0
  88. package/esm2022/signals/coer-elements-signals.mjs +5 -0
  89. package/esm2022/signals/lib/breakpoint.signal.mjs +4 -0
  90. package/esm2022/signals/lib/is-loading.signal.mjs +3 -0
  91. package/esm2022/signals/lib/is-menu-open.signal.mjs +3 -0
  92. package/esm2022/signals/lib/is-modal-open.signal.mjs +3 -0
  93. package/esm2022/signals/lib/menu.signal.mjs +3 -0
  94. package/esm2022/signals/public-api.mjs +6 -0
  95. package/esm2022/tools/coer-elements-tools.mjs +5 -0
  96. package/esm2022/tools/lib/breadcrumbs.class.mjs +63 -0
  97. package/esm2022/tools/lib/coer-alert/coer-alert.component.mjs +228 -0
  98. package/esm2022/tools/lib/control-value.class.mjs +46 -0
  99. package/esm2022/tools/lib/date-time.class.mjs +29 -0
  100. package/esm2022/tools/lib/files.class.mjs +91 -0
  101. package/esm2022/tools/lib/menu.class.mjs +23 -0
  102. package/esm2022/tools/lib/page.class.mjs +156 -0
  103. package/esm2022/tools/lib/screen.class.mjs +51 -0
  104. package/esm2022/tools/lib/service.class.mjs +247 -0
  105. package/esm2022/tools/lib/source.class.mjs +80 -0
  106. package/esm2022/tools/lib/tools.mjs +220 -0
  107. package/esm2022/tools/public-api.mjs +12 -0
  108. package/fesm2022/coer-elements-components.mjs +2718 -0
  109. package/fesm2022/coer-elements-components.mjs.map +1 -0
  110. package/fesm2022/coer-elements-directives.mjs +82 -0
  111. package/fesm2022/coer-elements-directives.mjs.map +1 -0
  112. package/fesm2022/coer-elements-interfaces.mjs +6 -0
  113. package/fesm2022/coer-elements-interfaces.mjs.map +1 -0
  114. package/fesm2022/coer-elements-pipes.mjs +83 -0
  115. package/fesm2022/coer-elements-pipes.mjs.map +1 -0
  116. package/fesm2022/coer-elements-signals.mjs +19 -0
  117. package/fesm2022/coer-elements-signals.mjs.map +1 -0
  118. package/fesm2022/coer-elements-tools.mjs +1223 -0
  119. package/fesm2022/coer-elements-tools.mjs.map +1 -0
  120. package/interfaces/index.d.ts +5 -0
  121. package/interfaces/lib/app-source.interface.d.ts +4 -0
  122. package/interfaces/lib/coer-filebox/file-image.interface.d.ts +14 -0
  123. package/interfaces/lib/coer-filebox/file.interface.d.ts +5 -0
  124. package/interfaces/lib/coer-grid/grid-button-by-row.interface.d.ts +6 -0
  125. package/interfaces/lib/coer-grid/grid-checkbox.interface.d.ts +5 -0
  126. package/interfaces/lib/coer-grid/grid-coer-numberbox.interface.d.ts +12 -0
  127. package/interfaces/lib/coer-grid/grid-coer-selectbox.interface.d.ts +9 -0
  128. package/interfaces/lib/coer-grid/grid-coer-switch.interface.d.ts +6 -0
  129. package/interfaces/lib/coer-grid/grid-coer-textbox.interface.d.ts +11 -0
  130. package/interfaces/lib/coer-grid/grid-column.interface.d.ts +22 -0
  131. package/interfaces/lib/coer-grid/grid-data-source.interface.d.ts +6 -0
  132. package/interfaces/lib/coer-grid/grid-header-button.interface.d.ts +8 -0
  133. package/interfaces/lib/coer-grid/grid-header-export-button.interface.d.ts +10 -0
  134. package/interfaces/lib/coer-grid/grid-header.interface.d.ts +5 -0
  135. package/interfaces/lib/coer-grid/grid-import.interface.d.ts +4 -0
  136. package/interfaces/lib/coer-grid/grid-input-checkbox.interface.d.ts +5 -0
  137. package/interfaces/lib/coer-grid/grid-input-switch-change.interface.d.ts +5 -0
  138. package/interfaces/lib/coer-grid/grid-input-textbox.interface.d.ts +5 -0
  139. package/interfaces/lib/coer-grid/grid-item.interface.d.ts +5 -0
  140. package/interfaces/lib/coer-grid/grid-keyup-enter.interface.d.ts +6 -0
  141. package/interfaces/lib/coer-grid/grid-length.interface.d.ts +5 -0
  142. package/interfaces/lib/coer-grid/grid-search.interface.d.ts +4 -0
  143. package/interfaces/lib/coer-grid/grid-sort.interface.d.ts +5 -0
  144. package/interfaces/lib/coer-menu/menu-option-selected.interface.d.ts +9 -0
  145. package/interfaces/lib/coer-menu/menu-selected.interface.d.ts +10 -0
  146. package/interfaces/lib/coer-menu/menu.interface.d.ts +6 -0
  147. package/interfaces/lib/coer-ref.interface.d.ts +10 -0
  148. package/interfaces/lib/page-title/breadcrumb.interface.d.ts +6 -0
  149. package/interfaces/lib/page-title/go-back.interface.d.ts +6 -0
  150. package/interfaces/lib/screen-size.interface.d.ts +5 -0
  151. package/interfaces/lib/service/http-request.interface.d.ts +10 -0
  152. package/interfaces/lib/service/http-response.interface.d.ts +6 -0
  153. package/interfaces/lib/service/patch.interface.d.ts +5 -0
  154. package/interfaces/public-api.d.ts +33 -0
  155. package/package.json +37 -1
  156. package/pipes/index.d.ts +5 -0
  157. package/pipes/lib/html.pipe.d.ts +10 -0
  158. package/pipes/lib/no-image.pipe.d.ts +7 -0
  159. package/pipes/lib/numeric-format.pipe.d.ts +7 -0
  160. package/pipes/lib/pipes.module.d.ts +9 -0
  161. package/pipes/public-api.d.ts +4 -0
  162. package/signals/index.d.ts +5 -0
  163. package/signals/lib/breakpoint.signal.d.ts +1 -0
  164. package/signals/lib/is-loading.signal.d.ts +1 -0
  165. package/signals/lib/is-menu-open.signal.d.ts +1 -0
  166. package/signals/lib/is-modal-open.signal.d.ts +1 -0
  167. package/signals/lib/menu.signal.d.ts +2 -0
  168. package/signals/public-api.d.ts +5 -0
  169. package/tools/index.d.ts +5 -0
  170. package/tools/lib/breadcrumbs.class.d.ts +18 -0
  171. package/tools/lib/coer-alert/coer-alert.component.d.ts +23 -0
  172. package/tools/lib/control-value.class.d.ts +25 -0
  173. package/tools/lib/date-time.class.d.ts +13 -0
  174. package/tools/lib/files.class.d.ts +16 -0
  175. package/tools/lib/menu.class.d.ts +8 -0
  176. package/tools/lib/page.class.d.ts +60 -0
  177. package/tools/lib/screen.class.d.ts +13 -0
  178. package/tools/lib/service.class.d.ts +39 -0
  179. package/tools/lib/source.class.d.ts +20 -0
  180. package/tools/lib/tools.d.ts +34 -0
  181. package/tools/public-api.d.ts +11 -0
@@ -0,0 +1,156 @@
1
+ import { ActivatedRoute, Router } from '@angular/router';
2
+ import { Component, Inject, inject } from '@angular/core';
3
+ import { CoerAlert } from './coer-alert/coer-alert.component';
4
+ import { Breadcrumbs } from './breadcrumbs.class';
5
+ import { Source } from './source.class';
6
+ import { Tools } from './tools';
7
+ import * as i0 from "@angular/core";
8
+ export class Page {
9
+ constructor(page) {
10
+ //Injection
11
+ this.alert = inject(CoerAlert);
12
+ this.router = inject(Router);
13
+ this.activatedRoute = inject(ActivatedRoute);
14
+ /** */
15
+ this.isUpdate = false;
16
+ /** */
17
+ this.isLoading = false;
18
+ /** */
19
+ this.isReadyPage = false;
20
+ /** */
21
+ this.enableAnimations = false;
22
+ /** */
23
+ this.breadcrumbs = [];
24
+ /** */
25
+ this.pageResponse = null;
26
+ /** */
27
+ this.goBack = { show: false };
28
+ //Private Variables
29
+ this._page = '';
30
+ this._source = null;
31
+ this._preventDestroy = false;
32
+ /** */
33
+ this.GoBack = (path) => (() => {
34
+ if (path)
35
+ Breadcrumbs.Remove(path);
36
+ else
37
+ Breadcrumbs.RemoveLast();
38
+ });
39
+ this.SetPageName(page);
40
+ this.SetSource();
41
+ this.GetSource();
42
+ this.GetNavigation();
43
+ this.SetGoBack();
44
+ this.GetPageResponse();
45
+ }
46
+ ngAfterViewInit() {
47
+ this.routeParams = this.activatedRoute.snapshot.params;
48
+ this.queryParams = this.activatedRoute.snapshot.queryParams;
49
+ setTimeout(() => {
50
+ this.isReadyPage = true;
51
+ this.RunPage();
52
+ setTimeout(() => { this.enableAnimations = true; }, 1000);
53
+ });
54
+ }
55
+ ngOnDestroy() {
56
+ if (!this._preventDestroy)
57
+ Source.ClearPageResponse();
58
+ }
59
+ /** Main method. Starts after ngAfterViewInit() */
60
+ RunPage() { }
61
+ ;
62
+ /** Rename the last breadcrumb and update the url id */
63
+ SetPageName(name, id = null) {
64
+ this._page = name;
65
+ let path = this.router.url;
66
+ if (path.includes('?'))
67
+ path = path.split('?')[0];
68
+ if (id) {
69
+ const PATH_ARRAY = path.split('/');
70
+ const PATH_ID = Tools.BreakReference(PATH_ARRAY).pop();
71
+ if (PATH_ID) {
72
+ PATH_ARRAY[PATH_ARRAY.length - 1] = String(id);
73
+ path = PATH_ARRAY.join('/');
74
+ }
75
+ }
76
+ if (this.breadcrumbs.length > 0) {
77
+ this.breadcrumbs[this.breadcrumbs.length - 1].page = name;
78
+ this.breadcrumbs[this.breadcrumbs.length - 1].path = path;
79
+ Breadcrumbs.SetLast(name, path);
80
+ }
81
+ this.router.navigateByUrl(path);
82
+ }
83
+ /** */
84
+ SetSource() {
85
+ Source.Set(this._page);
86
+ }
87
+ /** */
88
+ GetSource() {
89
+ this._source = Source.Get();
90
+ }
91
+ /** */
92
+ GetPageResponse() {
93
+ this.pageResponse = Source.GetPageResponse();
94
+ }
95
+ /** */
96
+ GetNavigation() {
97
+ if (this._source) {
98
+ this.breadcrumbs = Breadcrumbs.Get().map(item => Object.assign({
99
+ page: item.page,
100
+ path: item.path,
101
+ click: this.GoBack(item.path)
102
+ }));
103
+ }
104
+ else
105
+ this.breadcrumbs = [{ page: this._page }];
106
+ }
107
+ /** */
108
+ SetGoBack() {
109
+ if (this._source) {
110
+ this.goBack = {
111
+ show: true,
112
+ path: this._source.path,
113
+ click: this.GoBack()
114
+ };
115
+ }
116
+ }
117
+ /** Navigate to previous page */
118
+ GoToSource(pageResponse = null) {
119
+ if (this._source) {
120
+ Breadcrumbs.RemoveLast();
121
+ this.SetPageResponse(pageResponse);
122
+ Tools.Sleep().then(_ => this.router.navigateByUrl(this._source.path));
123
+ }
124
+ }
125
+ ;
126
+ /** */
127
+ SetPageResponse(pageResponse = null) {
128
+ if (Tools.IsNotNull(pageResponse)) {
129
+ this._preventDestroy = true;
130
+ Source.SetPageResponse(pageResponse);
131
+ }
132
+ }
133
+ ;
134
+ /** */
135
+ ReloadPage() {
136
+ Breadcrumbs.RemoveLast();
137
+ setTimeout(() => window.location.reload());
138
+ }
139
+ /** */
140
+ Log(value, log = null) {
141
+ if (Tools.IsNotNull(log))
142
+ console.log({ log, value });
143
+ else
144
+ console.log(value);
145
+ }
146
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: Page, deps: [{ token: String }], target: i0.ɵɵFactoryTarget.Component }); }
147
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: Page, selector: "ng-component", ngImport: i0, template: '', isInline: true }); }
148
+ }
149
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: Page, decorators: [{
150
+ type: Component,
151
+ args: [{ template: '' }]
152
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
153
+ type: Inject,
154
+ args: [String]
155
+ }] }] });
156
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFnZS5jbGFzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvZXItZWxlbWVudHMvdG9vbHMvbGliL3BhZ2UuY2xhc3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUN6RCxPQUFPLEVBQWlCLFNBQVMsRUFBRSxNQUFNLEVBQUUsTUFBTSxFQUFhLE1BQU0sZUFBZSxDQUFDO0FBRXBGLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxtQ0FBbUMsQ0FBQztBQUM5RCxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDbEQsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQ3h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xyXG4gICAgICAgICAgICB9KSk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBlbHNlIHRoaXMuYnJlYWRjcnVtYnMgPSBbeyBwYWdlOiB0aGlzLl9wYWdlIH1dO1xyXG4gICAgfVxyXG5cclxuXHJcbiAgICAvKiogKi9cclxuICAgIHByaXZhdGUgU2V0R29CYWNrKCk6IHZvaWQge1xyXG4gICAgICAgIGlmICh0aGlzLl9zb3VyY2UpIHtcclxuICAgICAgICAgICAgdGhpcy5nb0JhY2sgPSB7XHJcbiAgICAgICAgICAgICAgICBzaG93OiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgcGF0aDogdGhpcy5fc291cmNlLnBhdGgsXHJcbiAgICAgICAgICAgICAgICBjbGljazogdGhpcy5Hb0JhY2soKVxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcblxyXG4gICAgLyoqICovXHJcbiAgICBwcml2YXRlIEdvQmFjayA9IChwYXRoPzogc3RyaW5nKSA9PiAoKCkgPT4ge1xyXG4gICAgICAgIGlmIChwYXRoKSBCcmVhZGNydW1icy5SZW1vdmUocGF0aCk7XHJcbiAgICAgICAgZWxzZSBCcmVhZGNydW1icy5SZW1vdmVMYXN0KCk7XHJcbiAgICB9KTtcclxuXHJcblxyXG4gICAgLyoqIE5hdmlnYXRlIHRvIHByZXZpb3VzIHBhZ2UgKi9cclxuICAgIHByb3RlY3RlZCBHb1RvU291cmNlPFQ+KHBhZ2VSZXNwb25zZTogVCB8IG51bGwgPSBudWxsKTogdm9pZCB7XHJcbiAgICAgICAgaWYodGhpcy5fc291cmNlKSB7XHJcbiAgICAgICAgICAgIEJyZWFkY3J1bWJzLlJlbW92ZUxhc3QoKTtcclxuICAgICAgICAgICAgdGhpcy5TZXRQYWdlUmVzcG9uc2UocGFnZVJlc3BvbnNlKTtcclxuICAgICAgICAgICAgVG9vbHMuU2xlZXAoKS50aGVuKF8gPT4gdGhpcy5yb3V0ZXIubmF2aWdhdGVCeVVybCh0aGlzLl9zb3VyY2UhLnBhdGgpKTtcclxuICAgICAgICB9XHJcbiAgICB9O1xyXG5cclxuXHJcbiAgICAvKiogKi9cclxuICAgIHByb3RlY3RlZCBTZXRQYWdlUmVzcG9uc2U8VD4ocGFnZVJlc3BvbnNlOiBUIHwgbnVsbCA9IG51bGwpOiB2b2lkIHtcclxuICAgICAgICBpZiAoVG9vbHMuSXNOb3ROdWxsKHBhZ2VSZXNwb25zZSkpIHtcclxuICAgICAgICAgICAgdGhpcy5fcHJldmVudERlc3Ryb3kgPSB0cnVlO1xyXG4gICAgICAgICAgICBTb3VyY2UuU2V0UGFnZVJlc3BvbnNlKHBhZ2VSZXNwb25zZSk7XHJcbiAgICAgICAgfVxyXG4gICAgfTtcclxuXHJcblxyXG4gICAgLyoqICovXHJcbiAgICBwcm90ZWN0ZWQgUmVsb2FkUGFnZSgpOiB2b2lkIHtcclxuICAgICAgICBCcmVhZGNydW1icy5SZW1vdmVMYXN0KCk7XHJcbiAgICAgICAgc2V0VGltZW91dCgoKSA9PiB3aW5kb3cubG9jYXRpb24ucmVsb2FkKCkpO1xyXG4gICAgfVxyXG5cclxuXHJcbiAgICAvKiogKi9cclxuICAgIHByb3RlY3RlZCBMb2codmFsdWU6IGFueSwgbG9nOiBzdHJpbmcgfCBudWxsID0gbnVsbCk6IHZvaWQge1xyXG4gICAgICAgIGlmIChUb29scy5Jc05vdE51bGwobG9nKSkgY29uc29sZS5sb2coeyBsb2csIHZhbHVlIH0pO1xyXG4gICAgICAgIGVsc2UgY29uc29sZS5sb2codmFsdWUpO1xyXG4gICAgfVxyXG59Il19
@@ -0,0 +1,51 @@
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
+ static { this.BackButtonBrowser = new Observable(subscriber => {
44
+ window.addEventListener('popstate', popStateEvent => {
45
+ if (popStateEvent.state && popStateEvent.target) {
46
+ subscriber.next(popStateEvent.target.location.href);
47
+ }
48
+ });
49
+ }); }
50
+ }
51
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2NyZWVuLmNsYXNzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY29lci1lbGVtZW50cy90b29scy9saWIvc2NyZWVuLmNsYXNzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxNQUFNLENBQUM7QUFFbEMsTUFBTSxPQUFPLE1BQU07SUFFUixNQUFNLEtBQUssWUFBWTtRQUMxQixPQUFPLE1BQU0sQ0FBQyxVQUFVLENBQUM7SUFDN0IsQ0FBQztJQUdNLE1BQU0sS0FBSyxhQUFhO1FBQzNCLE9BQU8sTUFBTSxDQUFDLFd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ICBwdWJsaWMgc3RhdGljIFJlc2l6ZSA9IG5ldyBPYnNlcnZhYmxlPElTY3JlZW5TaXplPihzdWJzY3JpYmVyID0+IHtcclxuICAgICAgICB3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lcihcImxvYWRcIiwgKCkgPT4ge1xyXG4gICAgICAgICAgICB3aW5kb3cuZGlzcGF0Y2hFdmVudChuZXcgRXZlbnQoJ3Jlc2l6ZScpKTtcclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgd2luZG93Lm9ucmVzaXplID0gKCkgPT4ge1xyXG4gICAgICAgICAgICBzdWJzY3JpYmVyLm5leHQoe1xyXG4gICAgICAgICAgICAgICAgd2lkdGg6IHRoaXMuV0lORE9XX1dJRFRILFxyXG4gICAgICAgICAgICAgICAgaGVpZ2h0OiB0aGlzLldJTkRPV19IRUlHSFQsXHJcbiAgICAgICAgICAgICAgICBicmVha3BvaW46IHRoaXMuQlJFQUtQT0lOVFxyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9XHJcbiAgICB9KTtcclxuXHJcblxyXG4gICAgLyoqICovXHJcbiAgICBwdWJsaWMgc3RhdGljIEJhY2tCdXR0b25Ccm93c2VyID0gbmV3IE9ic2VydmFibGU8c3RyaW5nPihzdWJzY3JpYmVyID0+IHtcclxuICAgICAgICB3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lcigncG9wc3RhdGUnLCBwb3BTdGF0ZUV2ZW50ID0+IHtcclxuICAgICAgICAgICAgaWYgKHBvcFN0YXRlRXZlbnQuc3RhdGUgJiYgcG9wU3RhdGVFdmVudC50YXJnZXQpIHtcclxuICAgICAgICAgICAgICAgIHN1YnNjcmliZXIubmV4dCgocG9wU3RhdGVFdmVudC50YXJnZXQgYXMgYW55KS5sb2NhdGlvbi5ocmVmKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgfSk7XHJcbn0iXX0=
@@ -0,0 +1,247 @@
1
+ import { inject } from "@angular/core";
2
+ import { HttpClient, HttpRequest } from "@angular/common/http";
3
+ import { CoerAlert } from "./coer-alert/coer-alert.component";
4
+ import { Tools } from "./tools";
5
+ export class Service {
6
+ constructor() {
7
+ //Injections
8
+ this.alert = inject(CoerAlert);
9
+ this.http = inject(HttpClient);
10
+ this.httpCode = {
11
+ Ok: 200,
12
+ Created: 201,
13
+ NoContent: 204,
14
+ BadRequest: 400,
15
+ Unauthorize: 401,
16
+ NotFound: 404,
17
+ NotAllowed: 405,
18
+ NotAcceptable: 406,
19
+ Conflict: 409,
20
+ PayloadTooLarge: 413,
21
+ InnerError: 500
22
+ };
23
+ }
24
+ /** */
25
+ ReleaseSubscription(subscription) {
26
+ if (subscription && !subscription.closed)
27
+ subscription.unsubscribe();
28
+ }
29
+ /** HTTP GET */
30
+ HTTP_GET(request) {
31
+ return new Promise(Resolve => {
32
+ this.ReleaseSubscription(this._GET$);
33
+ this._GET$ = this.http.request(new HttpRequest("GET", request.url, { params: request.queryParams, headers: request.headers })).subscribe({
34
+ next: (response) => {
35
+ if (response.type > 0) {
36
+ Resolve({
37
+ body: Tools.BreakReference(response.body),
38
+ status: response.status,
39
+ message: response.statusText,
40
+ ok: true
41
+ });
42
+ }
43
+ },
44
+ error: (httpError) => {
45
+ this.ReleaseSubscription(this._GET$);
46
+ //this.AlertError(httpError, request.alertError);
47
+ Resolve({
48
+ body: {},
49
+ status: httpError.status,
50
+ message: httpError.error?.message || httpError.error,
51
+ ok: false
52
+ });
53
+ },
54
+ complete: () => {
55
+ this.ReleaseSubscription(this._GET$);
56
+ if (Tools.IsNotOnlyWhiteSpace(request.alertSuccess)) {
57
+ ////this.alert.Success(request.alertSuccess);
58
+ }
59
+ }
60
+ });
61
+ });
62
+ }
63
+ /** HTTP POST */
64
+ HTTP_POST(request) {
65
+ return new Promise(Resolve => {
66
+ this.ReleaseSubscription(this._POST$);
67
+ this._POST$ = this.http.request(new HttpRequest("POST", request.url, request.body, { params: request.queryParams, headers: request.headers })).subscribe({
68
+ next: (response) => {
69
+ if (response.type > 0) {
70
+ Resolve({
71
+ body: Tools.BreakReference(response.body),
72
+ status: response.status,
73
+ message: response.statusText,
74
+ ok: true
75
+ });
76
+ }
77
+ },
78
+ error: (httpError) => {
79
+ this.ReleaseSubscription(this._POST$);
80
+ //this.AlertError(httpError, request.alertError);
81
+ Resolve({
82
+ body: {},
83
+ status: httpError.status,
84
+ message: httpError.error?.message || httpError.error,
85
+ ok: false
86
+ });
87
+ },
88
+ complete: () => {
89
+ this.ReleaseSubscription(this._POST$);
90
+ if (Tools.IsNotOnlyWhiteSpace(request.alertSuccess)) {
91
+ //this.alert.Success(request.alertSuccess);
92
+ }
93
+ }
94
+ });
95
+ });
96
+ }
97
+ /** HTTP PUT */
98
+ HTTP_PUT(request) {
99
+ return new Promise(Resolve => {
100
+ this.ReleaseSubscription(this._PUT$);
101
+ this._PUT$ = this.http.request(new HttpRequest("PUT", request.url, request.body, { params: request.queryParams, headers: request.headers })).subscribe({
102
+ next: (response) => {
103
+ if (response.type > 0) {
104
+ Resolve({
105
+ body: {},
106
+ status: response.status,
107
+ message: response.statusText,
108
+ ok: true
109
+ });
110
+ }
111
+ },
112
+ error: (httpError) => {
113
+ this.ReleaseSubscription(this._PUT$);
114
+ //this.AlertError(httpError, request.alertError);
115
+ Resolve({
116
+ body: {},
117
+ status: httpError.status,
118
+ message: httpError.error?.message || httpError.error,
119
+ ok: false
120
+ });
121
+ },
122
+ complete: () => {
123
+ this.ReleaseSubscription(this._PUT$);
124
+ if (Tools.IsNotOnlyWhiteSpace(request.alertSuccess)) {
125
+ //this.alert.Success(request.alertSuccess, 'Updated', 'fa-solid fa-arrows-rotate fa-spin');
126
+ }
127
+ }
128
+ });
129
+ });
130
+ }
131
+ /** HTTP PATCH */
132
+ HTTP_PATCH(request) {
133
+ return new Promise(Resolve => {
134
+ this.ReleaseSubscription(this._PATCH$);
135
+ this._PATCH$ = this.http.request(new HttpRequest("PATCH", request.url, request.body, { params: request.queryParams, headers: request.headers })).subscribe({
136
+ next: (response) => {
137
+ if (response.type > 0) {
138
+ Resolve({
139
+ body: {},
140
+ status: response.status,
141
+ message: response.statusText,
142
+ ok: true
143
+ });
144
+ }
145
+ },
146
+ error: (httpError) => {
147
+ this.ReleaseSubscription(this._PATCH$);
148
+ //this.AlertError(httpError, request.alertError);
149
+ Resolve({
150
+ body: {},
151
+ status: httpError.status,
152
+ message: httpError.error?.message || httpError.error,
153
+ ok: false
154
+ });
155
+ },
156
+ complete: () => {
157
+ this.ReleaseSubscription(this._PATCH$);
158
+ if (Tools.IsNotOnlyWhiteSpace(request.alertSuccess)) {
159
+ //this.alert.Success(request.alertSuccess, 'Updated', 'fa-solid fa-arrows-rotate fa-spin');
160
+ }
161
+ }
162
+ });
163
+ });
164
+ }
165
+ /** HTTP DELETE */
166
+ HTTP_DELETE(request) {
167
+ return new Promise(Resolve => {
168
+ this.ReleaseSubscription(this._DELETE$);
169
+ this._DELETE$ = this.http.request(new HttpRequest("DELETE", request.url, { params: request.queryParams, headers: request.headers })).subscribe({
170
+ next: (response) => {
171
+ if (response.type > 0) {
172
+ Resolve({
173
+ body: {},
174
+ status: response.status,
175
+ message: response.statusText,
176
+ ok: true
177
+ });
178
+ }
179
+ },
180
+ error: (httpError) => {
181
+ this.ReleaseSubscription(this._DELETE$);
182
+ //this.AlertError(httpError, request.alertError);
183
+ Resolve({
184
+ body: {},
185
+ status: httpError.status,
186
+ message: httpError.error?.message || httpError.error,
187
+ ok: false
188
+ });
189
+ },
190
+ complete: () => {
191
+ this.ReleaseSubscription(this._DELETE$);
192
+ if (Tools.IsNotOnlyWhiteSpace(request.alertSuccess)) {
193
+ //this.alert.Success(request.alertSuccess, 'Deleted', 'fa-regular fa-trash-can');
194
+ }
195
+ }
196
+ });
197
+ });
198
+ }
199
+ /** */
200
+ AlertError(httpError, message) {
201
+ if (httpError.status >= 500) {
202
+ if (Tools.IsNotOnlyWhiteSpace(message)) {
203
+ //this.alert.Error('', message, 'fa-solid fa-bug', null);
204
+ }
205
+ }
206
+ else if (httpError.status < 500) {
207
+ switch (httpError.status) {
208
+ case 400: {
209
+ //this.alert.Warning(httpError.error?.message || httpError.error, 'Bad Request', 'fa-regular fa-face-grin-beam-sweat fa-lg');
210
+ break;
211
+ }
212
+ case 401: {
213
+ //this.alert.Warning(httpError.error?.message || httpError.error, 'Unauthorize', 'fa-regular fa-face-rolling-eyes fa-lg');
214
+ break;
215
+ }
216
+ case 404: {
217
+ //this.alert.Warning(httpError.error?.message || httpError.error, 'Not Found', 'fa-regular fa-face-meh fa-lg');
218
+ break;
219
+ }
220
+ case 405: {
221
+ //this.alert.Warning(httpError.error?.message || httpError.error, 'Not Allowed', 'fa-regular fa-face-grimace fa-lg');
222
+ break;
223
+ }
224
+ case 406: {
225
+ //this.alert.Warning(httpError.error?.message || httpError.error, 'Not Acceptable', 'fa-regular fa-face-frown-open fa-lg');
226
+ break;
227
+ }
228
+ case 409: {
229
+ //this.alert.Warning(httpError.error?.message || httpError.error, 'Conflict', 'fa-regular fa-face-dizzy fa-lg');
230
+ break;
231
+ }
232
+ case 413: {
233
+ //this.alert.Warning(httpError.error?.message || httpError.error, 'Too Large', 'fa-regular fa-face-flushed fa-lg');
234
+ break;
235
+ }
236
+ default: {
237
+ if (httpError.status <= 0) {
238
+ //this.alert.Warning('Without Connection', 'WEB API DOWN', 'fa-solid fa-plug-circle-xmark fa-lg', null);
239
+ }
240
+ else //this.alert.Warning(httpError.error?.message || httpError.error);
241
+ break;
242
+ }
243
+ }
244
+ }
245
+ }
246
+ }
247
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS5jbGFzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvZXItZWxlbWVudHMvdG9vbHMvbGliL3NlcnZpY2UuY2xhc3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQU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CwgeyBwYXJhbXM6IHJlcXVlc3QucXVlcnlQYXJhbXMsIGhlYWRlcnM6IHJlcXVlc3QuaGVhZGVycyB9KSkuc3Vic2NyaWJlKHtcclxuICAgICAgICAgICAgICAgIG5leHQ6IChyZXNwb25zZTogSHR0cEV2ZW50PFQ+IHwgYW55KSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLnR5cGUgPiAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFJlc29sdmUoe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9keTogVG9vbHMuQnJlYWtSZWZlcmVuY2U8VD4ocmVzcG9uc2UuYm9keSksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXM6IHJlc3BvbnNlLnN0YXR1cyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2U6IHJlc3BvbnNlLnN0YXR1c1RleHQsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvazogdHJ1ZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9LFxyXG5cclxuICAgICAgICAgICAgICAgIGVycm9yOiAoaHR0cEVycm9yOiBIdHRwRXJyb3JSZXNwb25zZSkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuUmVsZWFzZVN1YnNjcmlwdGlvbih0aGlzLl9HRVQkKTtcclxuICAgICAgICAgICAgICAgICAgICAvL3RoaXMuQWxlcnRFcnJvcihodHRwRXJyb3IsIHJlcXVlc3QuYWxlcnRFcnJvcik7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIFJlc29sdmUoe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBib2R5OiB7fSBhcyBhbnksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXR1czogaHR0cEVycm9yLnN0YXR1cyxcclxuICAgICAgICA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XMsIGhlYWRlcnM6IHJlcXVlc3QuaGVhZGVycyB9KSkuc3Vic2NyaWJlKHtcclxuICAgICAgICAgICAgICAgIG5leHQ6IChyZXNwb25zZTogSHR0cEV2ZW50PFQ+IHwgYW55KSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLnR5cGUgPiAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIFJlc29sdmUoe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9keTogVG9vbHMuQnJlYWtSZWZlcmVuY2U8VD4ocmVzcG9uc2UuYm9keSksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXM6IHJlc3BvbnNlLnN0YXR1cyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2U6IHJlc3BvbnNlLnN0YXR1c1RleHQsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvazogdHJ1ZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9LFxyXG5cclxuICAgICAgICAgICAgICAgIGVycm9yOiAoaHR0cEVycm9yOiBIdHRwRXJyb3JSZXNwb25zZSkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuUmVsZWFzZVN1YnNjcmlwdGlvbih0aGlzLl9QT1NUJCk7XHJcbiAgICAgICAgICAgICAgICAgICAgLy90aGlzLkFsZXJ0RXJyb3IoaHR0cEVycm9yLCByZXF1ZXN0LmFsZXJ0RXJyb3IpO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBSZXNvbHZlKHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgYm9keToge30gYXMgYW55LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXM6IGh0dHBFcnJvci5zdGF0dXMsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2U6IGh0dH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cnMgfSkpLnN1YnNjcmliZSh7XHJcbiAgICAgICAgICAgICAgICBuZXh0OiAocmVzcG9uc2U6IEh0dHBFdmVudDxUPiB8IGFueSkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZS50eXBlID4gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBSZXNvbHZlKHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvZHk6IHt9IGFzIGFueSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXR1czogcmVzcG9uc2Uuc3RhdHVzLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZTogcmVzcG9uc2Uuc3RhdHVzVGV4dCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9rOiB0cnVlXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0sXHJcblxyXG4gICAgICAgICAgICAgICAgZXJyb3I6IChodHRwRXJyb3I6IEh0dHBFcnJvclJlc3BvbnNlKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5SZWxlYXNlU3Vic2NyaXB0aW9uKHRoaXMuX1BVVCQpO1xyXG4gICAgICAgICAgICAgICAgICAgIC8vdGhpcy5BbGVydEVycm9yKGh0dHBFcnJvciwgcmVxdWVzdC5hbGVydEVycm9yKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgUmVzb2x2ZSh7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvZHk6IHt9IGFzIGFueSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOiBodHRwRXJyb3Iuc3RhdHVzLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlOiBodHRwRXJyb3IuZXJyb3I/Lm1lc3NhZ2UgfHwgaHR0cEVycm9yLmVycm9yLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBvazogZmFsc2VcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIH0sXHJcblxyXG4gICAgICAgICAgICAgICAgY29tcGxldGU6ICgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLlJlbGVhc2VTdWJzY3JpcHRpb24odGhpcy5fUFVUJCk7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChUb29scy5Jc05vdE9ubHlXaGl0ZVNwYWNlKHJlcXVlc3QuYWxlcnRTdWNjZXNzKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAvL3RoaXMuYWxlcnQuU3VjY2VzcyhyZXF1ZXN0LmFsZXJ0U3VjY2VzcywgJ1VwZGF0ZWQnLCAnZmEtc29saWQgZmEtYXJyb3dzLXJvdGF0ZSBmYS1zcGluJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcblxyXG4gICAgLyoqIEhUVFAgUEFUQ0ggKi9cclxuICAgIHByb3RlY3RlZCBIVFRQX1BBVENIPFQ+KHJlcXVlc3Q6IElIdHRwUmVxdWVzdDxUPikge1xyXG4gICAgICAgIHJldHVybiBuZXcgUHJvbWlzZTxJSHR0cFJlc3BvbnNlPHZvaWQ+PihSZXNvbHZlID0+IHtcclxuICAgICAgICAgICAgdGhpcy5SZWxlYXNlU3Vic2NyaXB0aW9uKHRoaXMuX1BBVENIJCk7XHJcblxyXG4gICAgICAgICAgICB0aGlzLl9QQVRDSCQgPSB0aGlzLmh0dHAucmVxdWVzdDxUPihuZXcgSHR0cFJlcXVlc3QoXCJQQVRDSFwiLCByZXF1ZXN0LnVybCwgcmVxdWVzdC5ib2R5LCB7IHBhcmFtczogcmVxdWVzdC5xdWVyeVBhcmFtcywgaGVhZGVyczogcmVxdWVzdC5oZWFkZXJzIH0pKS5zdWJzY3JpYmUoe1xyXG4gICAgICAgICAgICAgICAgbmV4dDogKHJlc3BvbnNlOiBIdHRwRXZlbnQ8VD4gfCBhbnkpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAocmVzcG9uc2UudHlwZSA+IDApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgUmVzb2x2ZSh7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib2R5OiB7fSBhcyBhbnksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXM6IHJlc3BvbnNlLnN0YXR1cyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2U6IHJlc3BvbnNlLnN0YXR1c1RleHQsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvazogdHJ1ZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9LFxyXG5cclxuICAgICAgICAgICAgICAgIGVycm9yOiAoaHR0cEVycm9yOiBIdHRwRXJyb3JSZXNwb25zZSkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuUmVsZWFzZVN1YnNjcmlwdGlvbih0aGlzLl9QQVRDSCQpO1xyXG4gICAgICAgICAgICAgICAgICAgIC8vdGhpcy5BbGVydEVycm9yKGh0dHBFcnJvciwgcmVxdWVzdC5hbGVydEVycm9yKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgUmVzb2x2ZSh7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvZHk6IHt9IGFzIGFueSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOiBodHRwRXJyb3Iuc3RhdHVzLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlOiBodHRwRXJyb3IuZXJyb3I/Lm1lc3NhZ2UgfHwgaHR0cEVycm9yLmVycm9yLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBvazogZmFs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ICAgICBuZXh0OiAocmVzcG9uc2U6IEh0dHBFdmVudDxUPiB8IGFueSkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZS50eXBlID4gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBSZXNvbHZlKHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvZHk6IHt9IGFzIGFueSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXR1czogcmVzcG9uc2Uuc3RhdHVzLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZTogcmVzcG9uc2Uuc3RhdHVzVGV4dCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9rOiB0cnVlXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0sXHJcblxyXG4gICAgICAgICAgICAgICAgZXJyb3I6IChodHRwRXJyb3I6IEh0dHBFcnJvclJlc3BvbnNlKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5SZWxlYXNlU3Vic2NyaXB0aW9uKHRoaXMuX0RFTEVURSQpO1xyXG4gICAgICAgICAgICAgICAgICAgIC8vdGhpcy5BbGVydEVycm9yKGh0dHBFcnJvciwgcmVxdWVzdC5hbGVydEVycm9yKTtcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgUmVzb2x2ZSh7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvZHk6IHt9IGFzIGFueSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgc3RhdHVzOiBodHRwRXJyb3Iuc3RhdHVzLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlOiBodHRwRXJyb3IuZXJyb3I/Lm1lc3NhZ2UgfHwgaHR0cEVycm9yLmVycm9yLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBvazogZmFsc2VcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIH0sXHJcblxyXG4gICAgICAgICAgICAgICAgY29tcGxldGU6ICgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLlJlbGVhc2VTdWJzY3JpcHRpb24odGhpcy5fREVMRVRFJCk7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKFRvb2xzLklzTm90T25seVdoaXRlU3BhY2UocmVxdWVzdC5hbGVydFN1Y2Nlc3MpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vdGhpcy5hbGVydC5TdWNjZXNzKHJlcXVlc3QuYWxlcnRTdWNjZXNzLCAnRGVsZXRlZCcsICdmYS1yZWd1bGFyIGZhLXRyYXNoLWNhbicpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG5cclxuICAgIC8qKiAqL1xyXG4gICAgcHJpdmF0ZSBBbGVydEVycm9yKGh0dHBFcnJvcjogSHR0cEVycm9yUmVzcG9uc2UsIG1lc3NhZ2U/OiBzdHJpbmcpOiB2b2lkIHtcclxuICAgICAgICBpZiAoaHR0cEVycm9yLnN0YXR1cyA+PSA1MDApIHtcclxuICAgICAgICAgICAgaWYgKFRvb2xzLklzTm90T25seVdoaXRlU3BhY2UobWVzc2FnZSkpIHtcclxuICAgICAgICAgICAgICAgIC8vdGhpcy5hbGVydC5FcnJvcignJywgbWVzc2FnZSwgJ2ZhLXNvbGlkIGZhLWJ1ZycsIG51bGwpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBlbHNlIGlmIChodHRwRXJyb3Iuc3RhdHVzIDwgNTAwKSB7XHJcbiAgICAgICAgICAgIHN3aXRjaChodHRwRXJyb3Iuc3RhdHVzKSB7XHJcbiAgICAgICAgICAgICAgICBjYXNlIDQwMDoge1xyXG4gICAgICAgICAgICAgICAgICAgIC8vdGhpcy5hbGVydC5XYXJuaW5nKGh0dHBFcnJvci5lcnJvcj8ubWVzc2FnZSB8fCBodHRwRXJyb3IuZXJyb3IsICdCYWQgUmVxdWVzdCcsICdmYS1yZWd1bGFyIGZhLWZhY2UtZ3Jpbi1iZWFtLXN3ZWF0IGZhLWxnJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgY2FzZSA0MDE6IHtcclxuICAgICAgICAgICAgICAgICAgICAvL3RoaXMuYWxlcnQuV2FybmluZyhodHRwRXJyb3IuZXJyb3I/Lm1lc3NhZ2UgfHwgaHR0cEVycm9yLmVycm9yLCAnVW5hdXRob3JpemUnLCAnZmEtcmVndWxhciBmYS1mYWNlLXJvbGxpbmctZXllcyBmYS1sZycpO1xyXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIGNhc2UgNDA0OiB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy90aGlzLmFsZXJ0Lldhcm5pbmcoaHR0cEVycm9yLmVycm9yPy5tZXNzYWdlIHx8IGh0dHBFcnJvci5lcnJvciwgJ05vdCBGb3VuZCcsICdmYS1yZWd1bGFyIGZhLWZhY2UtbWVoIGZhLWxnJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgY2FzZSA0MDU6IHtcclxuICAgICAgICAgICAgICAgICAgICAvL3RoaXMuYWxlcnQuV2FybmluZyhodHRwRXJyb3IuZXJyb3I/Lm1lc3NhZ2UgfHwgaHR0cEVycm9yLmVycm9yLCAnTm90IEFsbG93ZWQnLCAnZmEtcmVndWxhciBmYS1mYWNlLWdyaW1hY2UgZmEtbGcnKTtcclxuICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICBjYXNlIDQwNjoge1xyXG4gICAgICAgICAgICAgICAgICAgIC8vdGhpcy5hbGVydC5XYXJuaW5nKGh0dHBFcnJvci5lcnJvcj8ubWVzc2FnZSB8fCBodHRwRXJyb3IuZXJyb3IsICdOb3QgQWNjZXB0YWJsZScsICdmYS1yZWd1bGFyIGZhLWZhY2UtZnJvd24tb3BlbiBmYS1sZycpO1xyXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIGNhc2UgNDA5OiB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy90aGlzLmFsZXJ0Lldhcm5pbmcoaHR0cEVycm9yLmVycm9yPy5tZXNzYWdlIHx8IGh0dHBFcnJvci5lcnJvciwgJ0NvbmZsaWN0JywgJ2ZhLXJlZ3VsYXIgZmEtZmFjZS1kaXp6eSBmYS1sZycpO1xyXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIGNhc2UgNDEzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy90aGlzLmFsZXJ0Lldhcm5pbmcoaHR0cEVycm9yLmVycm9yPy5tZXNzYWdlIHx8IGh0dHBFcnJvci5lcnJvciwgJ1RvbyBMYXJnZScsICdmYS1yZWd1bGFyIGZhLWZhY2UtZmx1c2hlZCBmYS1sZycpO1xyXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoaHR0cEVycm9yLnN0YXR1cyA8PSAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vdGhpcy5hbGVydC5XYXJuaW5nKCdXaXRob3V0IENvbm5lY3Rpb24nLCAnV0VCIEFQSSBET1dOJywgJ2ZhLXNvbGlkIGZhLXBsdWctY2lyY2xlLXhtYXJrIGZhLWxnJywgbnVsbCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgICAgICBlbHNlIC8vdGhpcy5hbGVydC5XYXJuaW5nKGh0dHBFcnJvci5lcnJvcj8ubWVzc2FnZSB8fCBodHRwRXJyb3IuZXJyb3IpO1xyXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG59Il19
@@ -0,0 +1,80 @@
1
+ import { inject } from "@angular/core";
2
+ import { Router } from '@angular/router';
3
+ import { Breadcrumbs } from "./breadcrumbs.class";
4
+ import { Tools } from "./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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic291cmNlLmNsYXNzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY29lci1lbGVtZW50cy90b29scy9saWIvc291cmNlLmNsYXNzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDdkMsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBRXpDLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQUNsRCxPQUFPLEVBQUUsS0FBSyxFQUFFLE1BQU0sU0FBUyxDQUFDO0FBRWhDLE1BQU0sT0FBTy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