coer-elements 1.0.16 → 1.1.1
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 +1899 -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 +10 -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 -34
- 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 +40 -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/index.ts +0 -8
- package/interfaces/index.ts +0 -47
- package/styles/coer.scss +0 -95
- package/tsconfig.json +0 -29
@@ -0,0 +1,84 @@
|
|
1
|
+
import * as i0 from '@angular/core';
|
2
|
+
import { input, Directive, output, NgModule } from '@angular/core';
|
3
|
+
|
4
|
+
class CoerRefDirective {
|
5
|
+
constructor(template) {
|
6
|
+
this.template = template;
|
7
|
+
//Inputs
|
8
|
+
this.coerRef = input('');
|
9
|
+
this.title = input('');
|
10
|
+
this.icon = input('');
|
11
|
+
this.isDisabled = input(false);
|
12
|
+
this.show = input(true);
|
13
|
+
this.tooltip = input('');
|
14
|
+
}
|
15
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerRefDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
16
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.1", type: CoerRefDirective, isStandalone: false, selector: "[coerRef]", inputs: { coerRef: { classPropertyName: "coerRef", publicName: "coerRef", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, show: { classPropertyName: "show", publicName: "show", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
17
|
+
}
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerRefDirective, decorators: [{
|
19
|
+
type: Directive,
|
20
|
+
args: [{
|
21
|
+
selector: '[coerRef]',
|
22
|
+
standalone: false
|
23
|
+
}]
|
24
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
25
|
+
|
26
|
+
class LifeCycleDirective {
|
27
|
+
constructor(element) {
|
28
|
+
this.element = element;
|
29
|
+
//Outputs
|
30
|
+
this.OnChanges = output();
|
31
|
+
this.onInit = output();
|
32
|
+
this.afterViewInit = output();
|
33
|
+
this.onDestroy = output();
|
34
|
+
}
|
35
|
+
ngOnChanges(changes) {
|
36
|
+
this.OnChanges.emit(changes);
|
37
|
+
}
|
38
|
+
ngOnInit() {
|
39
|
+
this.onInit.emit(this.element.nativeElement);
|
40
|
+
}
|
41
|
+
ngAfterViewInit() {
|
42
|
+
this.afterViewInit.emit(this.element.nativeElement);
|
43
|
+
}
|
44
|
+
ngOnDestroy() {
|
45
|
+
this.onDestroy.emit(this.element.nativeElement);
|
46
|
+
}
|
47
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: LifeCycleDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
48
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.1", type: LifeCycleDirective, isStandalone: false, selector: "[lifecycle]", outputs: { OnChanges: "OnChanges", onInit: "onInit", afterViewInit: "afterViewInit", onDestroy: "onDestroy" }, usesOnChanges: true, ngImport: i0 }); }
|
49
|
+
}
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: LifeCycleDirective, decorators: [{
|
51
|
+
type: Directive,
|
52
|
+
args: [{
|
53
|
+
selector: '[lifecycle]',
|
54
|
+
standalone: false
|
55
|
+
}]
|
56
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }] });
|
57
|
+
|
58
|
+
class DirectivesModule {
|
59
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: DirectivesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
60
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.1", ngImport: i0, type: DirectivesModule, declarations: [CoerRefDirective,
|
61
|
+
LifeCycleDirective], exports: [CoerRefDirective,
|
62
|
+
LifeCycleDirective] }); }
|
63
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: DirectivesModule }); }
|
64
|
+
}
|
65
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: DirectivesModule, decorators: [{
|
66
|
+
type: NgModule,
|
67
|
+
args: [{
|
68
|
+
declarations: [
|
69
|
+
CoerRefDirective,
|
70
|
+
LifeCycleDirective,
|
71
|
+
],
|
72
|
+
exports: [
|
73
|
+
CoerRefDirective,
|
74
|
+
LifeCycleDirective
|
75
|
+
]
|
76
|
+
}]
|
77
|
+
}] });
|
78
|
+
|
79
|
+
/**
|
80
|
+
* Generated bundle index. Do not edit.
|
81
|
+
*/
|
82
|
+
|
83
|
+
export { CoerRefDirective, DirectivesModule, LifeCycleDirective };
|
84
|
+
//# sourceMappingURL=coer-elements-directives.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"coer-elements-directives.mjs","sources":["../../../projects/coer-elements/directives/lib/coer-ref.directive.ts","../../../projects/coer-elements/directives/lib/life-cycle.directive.ts","../../../projects/coer-elements/directives/lib/directives.module.ts","../../../projects/coer-elements/directives/coer-elements-directives.ts"],"sourcesContent":["import { Directive, input, TemplateRef } from \"@angular/core\";\r\n\r\n@Directive({\r\n selector: '[coerRef]',\r\n standalone: false\r\n})\r\nexport class CoerRefDirective {\r\n\r\n //Inputs\r\n public coerRef = input<string>('');\r\n public title = input<string>('');\r\n public icon = input<string>('');\r\n public isDisabled = input<boolean>(false);\r\n public show = input<boolean>(true);\r\n public tooltip = input<string>('');\r\n\r\n constructor(public template: TemplateRef<any>) {}\r\n}","import { Directive, OnDestroy, output, OnInit, ElementRef, AfterViewInit, OnChanges, SimpleChanges } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[lifecycle]', \r\n standalone: false\r\n})\r\nexport class LifeCycleDirective implements OnChanges, OnInit, AfterViewInit, OnDestroy {\r\n\r\n //Outputs\r\n public OnChanges = output<SimpleChanges>();\r\n public onInit = output<HTMLElement>();\r\n public afterViewInit = output<HTMLElement>();\r\n public onDestroy = output<HTMLElement>();\r\n\r\n constructor(private element: ElementRef) { }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n this.OnChanges.emit(changes);\r\n }\r\n\r\n ngOnInit() {\r\n this.onInit.emit(this.element.nativeElement);\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.afterViewInit.emit(this.element.nativeElement);\r\n }\r\n\r\n ngOnDestroy() {\r\n this.onDestroy.emit(this.element.nativeElement);\r\n }\r\n}","import { NgModule } from '@angular/core';\r\nimport { CoerRefDirective } from './coer-ref.directive';\r\nimport { LifeCycleDirective } from './life-cycle.directive';\r\n\r\n@NgModule({\r\n declarations: [\r\n CoerRefDirective,\r\n LifeCycleDirective,\r\n ],\r\n exports: [\r\n CoerRefDirective,\r\n LifeCycleDirective\r\n ]\r\n})\r\nexport class DirectivesModule { }","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAMa,gBAAgB,CAAA;AAUzB,IAAA,WAAA,CAAmB,QAA0B,EAAA;QAA1B,IAAQ,CAAA,QAAA,GAAR,QAAQ;;AAPpB,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAS,EAAE,CAAC;AAC3B,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,EAAE,CAAC;AACzB,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAS,EAAE,CAAC;AACxB,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAU,KAAK,CAAC;AAClC,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAU,IAAI,CAAC;AAC3B,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAS,EAAE,CAAC;;8GARzB,gBAAgB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,WAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAA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AA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,iBARrB,gBAAgB;AAChB,YAAA,kBAAkB,aAGlB,gBAAgB;YAChB,kBAAkB,CAAA,EAAA,CAAA,CAAA;+GAGb,gBAAgB,EAAA,CAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAV5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE;wBACV,gBAAgB;wBAChB,kBAAkB;AACrB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,gBAAgB;wBAChB;AACH;AACJ,iBAAA;;;ACbD;;AAEG;;;;"}
|
@@ -0,0 +1,68 @@
|
|
1
|
+
import { Tools } from 'coer-elements/tools';
|
2
|
+
|
3
|
+
//import { Tools } from "coer-elements/tools";
|
4
|
+
//
|
5
|
+
//declare global {
|
6
|
+
// interface Object {
|
7
|
+
//
|
8
|
+
// /** Avoid Null value */
|
9
|
+
// AvoidNull<T>(type: 'string' | 'number' | 'boolean' | null): T;
|
10
|
+
//
|
11
|
+
// /** Get properties of an object */
|
12
|
+
// GetPropertyList(): string[];
|
13
|
+
//
|
14
|
+
// /** Break reference of a object or array */
|
15
|
+
// BreakReference<T>(object: T): T;
|
16
|
+
// }
|
17
|
+
//}
|
18
|
+
//
|
19
|
+
//Object.prototype.AvoidNull = function<T>(type: 'string' | 'number' | 'boolean' | null = null): T {
|
20
|
+
// return Tools.AvoidNull<T>(this as T, type);
|
21
|
+
//}
|
22
|
+
//
|
23
|
+
//Object.prototype.GetPropertyList = function(): string[] {
|
24
|
+
// return Tools.GetPropertyList(this);
|
25
|
+
//}
|
26
|
+
//
|
27
|
+
//Object.prototype.BreakReference = function<T>(): T {
|
28
|
+
// return Tools.BreakReference<T>(this as T);
|
29
|
+
//}
|
30
|
+
|
31
|
+
String.prototype.removeAccents = function () {
|
32
|
+
return Tools.RemoveAccents(this.toString());
|
33
|
+
};
|
34
|
+
String.prototype.cleanUpBlanks = function () {
|
35
|
+
return Tools.CleanUpBlanks(this.toString());
|
36
|
+
};
|
37
|
+
String.prototype.firstCharToLower = function () {
|
38
|
+
return Tools.FirstCharToLower(this.toString());
|
39
|
+
};
|
40
|
+
String.prototype.firstCharToUpper = function () {
|
41
|
+
return Tools.FirstCharToUpper(this.toString());
|
42
|
+
};
|
43
|
+
String.prototype.isOnlyWhiteSpace = function () {
|
44
|
+
return Tools.IsOnlyWhiteSpace(this);
|
45
|
+
};
|
46
|
+
String.prototype.isNotOnlyWhiteSpace = function () {
|
47
|
+
return Tools.IsNotOnlyWhiteSpace(this);
|
48
|
+
};
|
49
|
+
String.prototype.equals = function (value, sensitive = false, removeWhiteSpaces = false) {
|
50
|
+
if (Tools.IsNotNull(value) && typeof value === 'string') {
|
51
|
+
let _this = this;
|
52
|
+
if (!sensitive) {
|
53
|
+
_this = _this.toUpperCase();
|
54
|
+
value = value.toUpperCase();
|
55
|
+
}
|
56
|
+
if (removeWhiteSpaces) {
|
57
|
+
_this = _this.replaceAll(' ', '');
|
58
|
+
value = value.replaceAll(' ', '');
|
59
|
+
}
|
60
|
+
return _this === value;
|
61
|
+
}
|
62
|
+
return false;
|
63
|
+
};
|
64
|
+
|
65
|
+
/**
|
66
|
+
* Generated bundle index. Do not edit.
|
67
|
+
*/
|
68
|
+
//# sourceMappingURL=coer-elements-extensions.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"coer-elements-extensions.mjs","sources":["../../../projects/coer-elements/extensions/lib/object.extension.ts","../../../projects/coer-elements/extensions/lib/string.extension.ts","../../../projects/coer-elements/extensions/coer-elements-extensions.ts"],"sourcesContent":["//import { Tools } from \"coer-elements/tools\";\r\n//\r\n//declare global {\r\n// interface Object {\r\n// \r\n// /** Avoid Null value */\r\n// AvoidNull<T>(type: 'string' | 'number' | 'boolean' | null): T; \r\n//\r\n// /** Get properties of an object */\r\n// GetPropertyList(): string[];\r\n//\r\n// /** Break reference of a object or array */\r\n// BreakReference<T>(object: T): T;\r\n// }\r\n//}\r\n//\r\n//Object.prototype.AvoidNull = function<T>(type: 'string' | 'number' | 'boolean' | null = null): T {\r\n// return Tools.AvoidNull<T>(this as T, type);\r\n//}\r\n//\r\n//Object.prototype.GetPropertyList = function(): string[] {\r\n// return Tools.GetPropertyList(this);\r\n//}\r\n//\r\n//Object.prototype.BreakReference = function<T>(): T {\r\n// return Tools.BreakReference<T>(this as T);\r\n//}\r\n\r\nexport {};","import { Tools } from \"coer-elements/tools\";\r\n\r\ndeclare global {\r\n interface String {\r\n\r\n /** */\r\n removeAccents(): string;\r\n\r\n /** Clean extra whitespaces */\r\n cleanUpBlanks(): string;\r\n\r\n /** Set First Char To Lower */\r\n firstCharToLower(): string;\r\n\r\n /** Set First Char To Upper */\r\n firstCharToUpper(): string;\r\n\r\n /** Returns true if the value is null or undefined or contains only whitespace, false otherwise */\r\n isOnlyWhiteSpace(): boolean;\r\n\r\n /** Returns true if has string value and is not only whitespace, false otherwise */\r\n isNotOnlyWhiteSpace(): boolean;\r\n\r\n /** Returns true if value is equals */\r\n equals(value: string, sensitive: boolean, removeWhiteSpaces: boolean): boolean;\r\n }\r\n}\r\n\r\n\r\nString.prototype.removeAccents = function(): string {\r\n return Tools.RemoveAccents(this.toString());\r\n};\r\n\r\n \r\nString.prototype.cleanUpBlanks = function(): string {\r\n return Tools.CleanUpBlanks(this.toString());\r\n}; \r\n\r\n\r\nString.prototype.firstCharToLower = function(): string {\r\n return Tools.FirstCharToLower(this.toString());\r\n}; \r\n\r\n\r\nString.prototype.firstCharToUpper = function(): string {\r\n return Tools.FirstCharToUpper(this.toString());\r\n}; \r\n\r\n\r\nString.prototype.isOnlyWhiteSpace = function(): boolean {\r\n return Tools.IsOnlyWhiteSpace(this);\r\n}\r\n\r\nString.prototype.isNotOnlyWhiteSpace = function(): boolean {\r\n return Tools.IsNotOnlyWhiteSpace(this);\r\n}\r\n\r\nString.prototype.equals = function(value: string, sensitive: boolean = false, removeWhiteSpaces: boolean = false): boolean { \r\n if (Tools.IsNotNull(value) && typeof value === 'string') { \r\n let _this = this;\r\n\r\n if (!sensitive) {\r\n _this = _this.toUpperCase();\r\n value = value.toUpperCase(); \r\n }\r\n\r\n if (removeWhiteSpaces) {\r\n _this = _this.replaceAll(' ', '');\r\n value = value.replaceAll(' ', ''); \r\n }\r\n\r\n return _this === value;\r\n } \r\n\r\n return false; \r\n}\r\n\r\nexport {};","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACGA,MAAM,CAAC,SAAS,CAAC,aAAa,GAAG,YAAA;IAC7B,OAAO,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;AAC/C,CAAC;AAGD,MAAM,CAAC,SAAS,CAAC,aAAa,GAAG,YAAA;IAC7B,OAAO,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;AAC/C,CAAC;AAGD,MAAM,CAAC,SAAS,CAAC,gBAAgB,GAAG,YAAA;IAChC,OAAO,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;AAClD,CAAC;AAGD,MAAM,CAAC,SAAS,CAAC,gBAAgB,GAAG,YAAA;IAChC,OAAO,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;AAClD,CAAC;AAGD,MAAM,CAAC,SAAS,CAAC,gBAAgB,GAAG,YAAA;AAChC,IAAA,OAAO,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC;AACvC,CAAC;AAED,MAAM,CAAC,SAAS,CAAC,mBAAmB,GAAG,YAAA;AACnC,IAAA,OAAO,KAAK,CAAC,mBAAmB,CAAC,IAAI,CAAC;AAC1C,CAAC;AAED,MAAM,CAAC,SAAS,CAAC,MAAM,GAAG,UAAS,KAAa,EAAE,SAAqB,GAAA,KAAK,EAAE,iBAAA,GAA6B,KAAK,EAAA;AAC5G,IAAA,IAAI,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QACrD,IAAI,KAAK,GAAG,IAAI;QAEhB,IAAI,CAAC,SAAS,EAAE;AACZ,YAAA,KAAK,GAAG,KAAK,CAAC,WAAW,EAAE;AAC3B,YAAA,KAAK,GAAG,KAAK,CAAC,WAAW,EAAE;;QAG/B,IAAI,iBAAiB,EAAE;YACnB,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,EAAE,CAAC;YACjC,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,EAAE,CAAC;;QAGrC,OAAO,KAAK,KAAK,KAAK;;AAG1B,IAAA,OAAO,KAAK;AAChB,CAAC;;AC3ED;;AAEG"}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { User, Tools, CoerAlert, Menu } from 'coer-elements/tools';
|
2
|
+
import { inject } from '@angular/core';
|
3
|
+
|
4
|
+
const loginGuard = () => {
|
5
|
+
return User.LogIn();
|
6
|
+
};
|
7
|
+
|
8
|
+
const pageGuard = (route, state) => {
|
9
|
+
const module = Tools.AvoidNull(route.data.module);
|
10
|
+
const submodule = Tools.AvoidNull(route.data.submodule);
|
11
|
+
const page = Tools.AvoidNull(route.data.page);
|
12
|
+
if (Tools.IsOnlyWhiteSpace(page)) {
|
13
|
+
console.log(`[Page] Metadata for route ${state.url} is missing`);
|
14
|
+
inject(CoerAlert).Warning('Metadata is missing', 'Guard', 'fa-solid fa-file-shield');
|
15
|
+
return false;
|
16
|
+
}
|
17
|
+
//Has access?
|
18
|
+
return Menu.GetMenuAccess().some(access => Tools.RemoveAccents(Tools.AvoidNull(access?.module, 'string').toUpperCase()) === Tools.RemoveAccents(module.toUpperCase())
|
19
|
+
&& Tools.RemoveAccents(Tools.AvoidNull(access?.submodule, 'string').toUpperCase()) === Tools.RemoveAccents(submodule.toUpperCase())
|
20
|
+
&& Tools.RemoveAccents(Tools.AvoidNull(access?.page, 'string').toUpperCase()) === Tools.RemoveAccents(page.toUpperCase()));
|
21
|
+
};
|
22
|
+
|
23
|
+
/**
|
24
|
+
* Generated bundle index. Do not edit.
|
25
|
+
*/
|
26
|
+
|
27
|
+
export { loginGuard, pageGuard };
|
28
|
+
//# sourceMappingURL=coer-elements-guards.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"coer-elements-guards.mjs","sources":["../../../projects/coer-elements/guards/lib/login.guard.ts","../../../projects/coer-elements/guards/lib/page.guard.ts","../../../projects/coer-elements/guards/coer-elements-guards.ts"],"sourcesContent":["import { CanActivateFn } from '@angular/router';\r\nimport { User } from 'coer-elements/tools';\r\n\r\nexport const loginGuard: CanActivateFn = () => { \r\n return User.LogIn();\r\n};","import { inject } from '@angular/core';\r\nimport { CanActivateFn } from '@angular/router';\r\nimport { CoerAlert, Menu, Tools } from 'coer-elements/tools'; \r\n\r\nexport const pageGuard: CanActivateFn = (route: any, state: any) => { \r\n \r\n const module = Tools.AvoidNull<string>(route.data.module);\r\n const submodule = Tools.AvoidNull<string>(route.data.submodule);\r\n const page = Tools.AvoidNull<string>(route.data.page); \r\n \r\n if (Tools.IsOnlyWhiteSpace(page)) { \r\n console.log(`[Page] Metadata for route ${state.url} is missing`);\r\n inject(CoerAlert).Warning('Metadata is missing', 'Guard', 'fa-solid fa-file-shield');\r\n return false;\r\n }\r\n\r\n //Has access? \r\n return Menu.GetMenuAccess().some(access => \r\n Tools.RemoveAccents(Tools.AvoidNull<string>(access?.module, 'string').toUpperCase()) === Tools.RemoveAccents(module.toUpperCase())\r\n && Tools.RemoveAccents(Tools.AvoidNull<string>(access?.submodule, 'string').toUpperCase()) === Tools.RemoveAccents(submodule.toUpperCase())\r\n && Tools.RemoveAccents(Tools.AvoidNull<string>(access?.page, 'string').toUpperCase()) === Tools.RemoveAccents(page.toUpperCase())\r\n );\r\n}; ","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAGO,MAAM,UAAU,GAAkB,MAAK;AAC5C,IAAA,OAAO,IAAI,CAAC,KAAK,EAAE;AACrB;;MCDa,SAAS,GAAkB,CAAC,KAAU,EAAE,KAAU,KAAI;AAEjE,IAAA,MAAM,MAAM,GAAM,KAAK,CAAC,SAAS,CAAS,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC;AAC5D,IAAA,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAS,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC;AAC/D,IAAA,MAAM,IAAI,GAAQ,KAAK,CAAC,SAAS,CAAS,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;AAE1D,IAAA,IAAI,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE;QAChC,OAAO,CAAC,GAAG,CAAC,CAAA,0BAAA,EAA6B,KAAK,CAAC,GAAG,CAAa,WAAA,CAAA,CAAC;AAChE,QAAA,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,qBAAqB,EAAE,OAAO,EAAE,yBAAyB,CAAC;AACpF,QAAA,OAAO,KAAK;;;AAId,IAAA,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC,IAAI,CAAC,MAAM,IACrC,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,SAAS,CAAS,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC,KAAK,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,WAAW,EAAE;WAC9H,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,SAAS,CAAS,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC,KAAK,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,WAAW,EAAE;AACvI,WAAA,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,SAAS,CAAS,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC,KAAK,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAClI;AACH;;ACtBA;;AAEG;;;;"}
|
@@ -0,0 +1,64 @@
|
|
1
|
+
import { provideHttpClient, withInterceptorsFromDi, HTTP_INTERCEPTORS } from '@angular/common/http';
|
2
|
+
import * as i0 from '@angular/core';
|
3
|
+
import { Injectable } from '@angular/core';
|
4
|
+
import { DateTime, User, Tools } from 'coer-elements/tools';
|
5
|
+
import { throwError } from 'rxjs';
|
6
|
+
import { catchError } from 'rxjs/operators';
|
7
|
+
|
8
|
+
class UTC_OFFSET_INTERCEPTOR {
|
9
|
+
intercept(request, next) {
|
10
|
+
const headers = request.headers.set('utc-offset', `${DateTime.GetOffset() / 60}`);
|
11
|
+
return next.handle(request.clone({ headers })).pipe(catchError((httpError) => {
|
12
|
+
console.error(httpError);
|
13
|
+
return throwError(() => httpError);
|
14
|
+
}));
|
15
|
+
}
|
16
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: UTC_OFFSET_INTERCEPTOR, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
17
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: UTC_OFFSET_INTERCEPTOR, providedIn: 'root' }); }
|
18
|
+
}
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: UTC_OFFSET_INTERCEPTOR, decorators: [{
|
20
|
+
type: Injectable,
|
21
|
+
args: [{
|
22
|
+
providedIn: 'root'
|
23
|
+
}]
|
24
|
+
}] });
|
25
|
+
|
26
|
+
class USER_INTERCEPTOR {
|
27
|
+
intercept(request, next) {
|
28
|
+
const user = User.Get();
|
29
|
+
let headers = request.headers;
|
30
|
+
if (Tools.IsNotNull(user)) {
|
31
|
+
if (Tools.IsNotNull(user?.user)) {
|
32
|
+
headers = headers.set('clien-user', user.user);
|
33
|
+
}
|
34
|
+
if (Tools.IsNotNull(user?.jwt)) {
|
35
|
+
headers = headers.set('Authorization', `Bearer ${user.jwt}`);
|
36
|
+
}
|
37
|
+
}
|
38
|
+
return next.handle(request.clone({ headers })).pipe(catchError((httpError) => {
|
39
|
+
console.error(httpError);
|
40
|
+
return throwError(() => httpError);
|
41
|
+
}));
|
42
|
+
}
|
43
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: USER_INTERCEPTOR, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
44
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: USER_INTERCEPTOR, providedIn: 'root' }); }
|
45
|
+
}
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: USER_INTERCEPTOR, decorators: [{
|
47
|
+
type: Injectable,
|
48
|
+
args: [{
|
49
|
+
providedIn: 'root'
|
50
|
+
}]
|
51
|
+
}] });
|
52
|
+
|
53
|
+
const INTERCEPTORS = [
|
54
|
+
provideHttpClient(withInterceptorsFromDi()),
|
55
|
+
{ provide: HTTP_INTERCEPTORS, useClass: UTC_OFFSET_INTERCEPTOR, multi: true },
|
56
|
+
{ provide: HTTP_INTERCEPTORS, useClass: USER_INTERCEPTOR, multi: true }
|
57
|
+
];
|
58
|
+
|
59
|
+
/**
|
60
|
+
* Generated bundle index. Do not edit.
|
61
|
+
*/
|
62
|
+
|
63
|
+
export { INTERCEPTORS };
|
64
|
+
//# sourceMappingURL=coer-elements-interceptors.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"coer-elements-interceptors.mjs","sources":["../../../projects/coer-elements/interceptors/lib/utc-offset.interceptor.ts","../../../projects/coer-elements/interceptors/lib/user.interceptor.ts","../../../projects/coer-elements/interceptors/public-api.ts","../../../projects/coer-elements/interceptors/coer-elements-interceptors.ts"],"sourcesContent":["import { HttpErrorResponse, HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { DateTime } from 'coer-elements/tools';\r\nimport { Observable, throwError } from 'rxjs';\r\nimport { catchError } from 'rxjs/operators';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class UTC_OFFSET_INTERCEPTOR implements HttpInterceptor {\r\n\r\n intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\r\n\r\n const headers = request.headers.set('utc-offset', `${DateTime.GetOffset() / 60}`); \r\n\r\n return next.handle(request.clone({ headers })).pipe(\r\n catchError((httpError: HttpErrorResponse) => {\r\n console.error(httpError);\r\n return throwError(() => httpError);\r\n })\r\n );\r\n }\r\n}","import { HttpErrorResponse, HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { Tools, User } from 'coer-elements/tools';\r\nimport { Observable, throwError } from 'rxjs';\r\nimport { catchError } from 'rxjs/operators';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class USER_INTERCEPTOR implements HttpInterceptor {\r\n\r\n intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\r\n\r\n const user = User.Get<any>();\r\n let headers = request.headers;\r\n\r\n if (Tools.IsNotNull(user)) {\r\n if (Tools.IsNotNull(user?.user)) {\r\n headers = headers.set('clien-user', user.user); \r\n\r\n }\r\n\r\n if (Tools.IsNotNull(user?.jwt)) {\r\n headers = headers.set('Authorization', `Bearer ${user.jwt}`);\r\n }\r\n }\r\n\r\n return next.handle(request.clone({ headers })).pipe(\r\n catchError((httpError: HttpErrorResponse) => {\r\n console.error(httpError);\r\n return throwError(() => httpError);\r\n })\r\n );\r\n }\r\n}","import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';\r\nimport { UTC_OFFSET_INTERCEPTOR } from './lib/utc-offset.interceptor';\r\nimport { USER_INTERCEPTOR } from './lib/user.interceptor';\r\n\r\nexport const INTERCEPTORS: any[] = [\r\n provideHttpClient(withInterceptorsFromDi()),\r\n { provide: HTTP_INTERCEPTORS, useClass: UTC_OFFSET_INTERCEPTOR, multi: true },\r\n { provide: HTTP_INTERCEPTORS, useClass: USER_INTERCEPTOR, multi: true }\r\n];","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MASa,sBAAsB,CAAA;IAE/B,SAAS,CAAC,OAAyB,EAAE,IAAiB,EAAA;AAElD,QAAA,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,CAAG,EAAA,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE,CAAA,CAAE,CAAC;QAEjF,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,CAC/C,UAAU,CAAC,CAAC,SAA4B,KAAI;AACxC,YAAA,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC;AACxB,YAAA,OAAO,UAAU,CAAC,MAAM,SAAS,CAAC;SACrC,CAAC,CACL;;8GAXI,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAA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,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cAFb,MAAM,EAAA,CAAA,CAAA;;2FAET,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE;AACf,iBAAA;;;ACJY,MAAA,YAAY,GAAU;IAC/B,iBAAiB,CAAC,sBAAsB,EAAE,CAAC;IAC3C,EAAE,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,sBAAsB,EAAE,KAAK,EAAE,IAAI,EAAE;IAC7E,EAAE,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAE,IAAI;;;ACPzE;;AAEG;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"coer-elements-interfaces.mjs","sources":["../../../projects/coer-elements/interfaces/public-api.ts","../../../projects/coer-elements/interfaces/coer-elements-interfaces.ts"],"sourcesContent":["//coer-filebox\r\nexport * from './lib/coer-filebox/file-image.interface';\r\nexport * from './lib/coer-filebox/file.interface';\r\n\r\n//coer-grid\r\nexport * from './lib/coer-grid/grid-button-by-row.interface';\r\nexport * from './lib/coer-grid/grid-checkbox.interface';\r\nexport * from './lib/coer-grid/grid-coer-numberbox.interface';\r\nexport * from './lib/coer-grid/grid-coer-selectbox.interface';\r\nexport * from './lib/coer-grid/grid-coer-switch.interface';\r\nexport * from './lib/coer-grid/grid-coer-textbox.interface';\r\nexport * from './lib/coer-grid/grid-column.interface';\r\nexport * from './lib/coer-grid/grid-data-source.interface';\r\nexport * from './lib/coer-grid/grid-header-button.interface';\r\nexport * from './lib/coer-grid/grid-header-export-button.interface';\r\nexport * from './lib/coer-grid/grid-header.interface';\r\nexport * from './lib/coer-grid/grid-import.interface';\r\nexport * from './lib/coer-grid/grid-input-checkbox.interface';\r\nexport * from './lib/coer-grid/grid-input-switch-change.interface';\r\nexport * from './lib/coer-grid/grid-input-textbox.interface';\r\nexport * from './lib/coer-grid/grid-item.interface';\r\nexport * from './lib/coer-grid/grid-keyup-enter.interface';\r\nexport * from './lib/coer-grid/grid-length.interface';\r\nexport * from './lib/coer-grid/grid-search.interface';\r\nexport * from './lib/coer-grid/grid-sort.interface';\r\n\r\n//coer-menu\r\nexport * from './lib/coer-menu/menu-access.interface';\r\nexport * from './lib/coer-menu/menu-option-selected.interface';\r\nexport * from './lib/coer-menu/menu-selected.interface';\r\nexport * from './lib/coer-menu/menu.interface';\r\n\r\n//page-title\r\nexport * from './lib/page-title/breadcrumb.interface';\r\nexport * from './lib/page-title/go-back.interface';\r\nexport * from './lib/page-title/information.interface';\r\n\r\n//service\r\nexport * from './lib/service/http-request.interface';\r\nexport * from './lib/service/http-response.interface';\r\nexport * from './lib/service/patch.interface';\r\n\r\nexport * from './lib/app-source.interface';\r\nexport * from './lib/box-button.interface';\r\nexport * from './lib/bulk-load.interface';\r\nexport * from './lib/coer-ref.interface';\r\nexport * from './lib/image.interface';\r\nexport * from './lib/login-response.interface';\r\nexport * from './lib/login.interface';\r\nexport * from './lib/screen-size.interface';\r\nexport * from './lib/toolbar-menu.interface';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;;ACAA;;AAEG"}
|