coer-elements 2.0.26 → 2.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/lib/coer-accordion/coer-accordion.component.d.ts +4 -3
- package/components/lib/coer-button/coer-button.component.d.ts +11 -15
- package/components/lib/coer-checkbox/coer-checkbox.component.d.ts +10 -8
- package/components/lib/coer-datebox/coer-datebox.component.d.ts +16 -17
- package/components/lib/coer-dropdown/coer-dropdown.component.d.ts +10 -12
- package/components/lib/coer-filebox/coer-filebox-image/coer-filebox-image.component.d.ts +46 -0
- package/components/lib/coer-filebox/coer-filebox.component.d.ts +3 -24
- package/components/lib/coer-form/coer-form.component.d.ts +2 -1
- package/components/lib/coer-grid/coer-grid.extension.d.ts +13 -13
- package/components/lib/coer-list/coer-list.component.d.ts +2 -5
- package/components/lib/coer-modal/coer-modal.component.d.ts +8 -8
- package/components/lib/coer-numberbox/coer-numberbox.component.d.ts +16 -12
- package/components/lib/coer-page-title/coer-page-title.component.d.ts +9 -8
- package/components/lib/coer-secretbox/coer-secretbox.component.d.ts +13 -13
- package/components/lib/coer-selectbox/coer-selectbox.component.d.ts +17 -19
- package/components/lib/coer-sidenav/coer-menu-option/coer-menu-option.component.d.ts +15 -14
- package/components/lib/coer-sidenav/coer-sidenav.component.d.ts +16 -16
- package/components/lib/coer-sidenav/coer-toolbar/coer-toolbar.component.d.ts +6 -6
- package/components/lib/coer-sidenav/coer-tree-accordion/coer-tree-accordion.component.d.ts +22 -23
- package/components/lib/coer-switch/coer-switch.component.d.ts +10 -11
- package/components/lib/coer-tab/coer-tab.component.d.ts +15 -13
- package/components/lib/coer-textarea/coer-textarea.component.d.ts +5 -6
- package/components/lib/coer-textbox/coer-textbox.component.d.ts +15 -13
- package/components/lib/components.module.d.ts +39 -37
- package/extensions/lib/string.extension.d.ts +3 -1
- package/fesm2022/coer-elements-components.mjs +900 -945
- package/fesm2022/coer-elements-components.mjs.map +1 -1
- package/fesm2022/coer-elements-extensions.mjs +5 -2
- package/fesm2022/coer-elements-extensions.mjs.map +1 -1
- package/fesm2022/coer-elements-pages.mjs +10 -24
- package/fesm2022/coer-elements-pages.mjs.map +1 -1
- package/fesm2022/coer-elements-signals.mjs +3 -1
- package/fesm2022/coer-elements-signals.mjs.map +1 -1
- package/fesm2022/coer-elements-tools.mjs +14 -12
- package/fesm2022/coer-elements-tools.mjs.map +1 -1
- package/fesm2022/coer-elements.mjs +1 -2
- package/fesm2022/coer-elements.mjs.map +1 -1
- package/index.d.ts +1 -1
- package/interfaces/lib/screen-size.interface.d.ts +1 -1
- package/package.json +1 -1
- package/pages/lib/pages.module.d.ts +7 -8
- package/pages/public-api.d.ts +0 -1
- package/signals/lib/breakpoint.signal.d.ts +1 -1
- package/styles/coer-elements.css +1 -1
- package/styles/containers.scss +26 -10
- package/styles/displays.scss +23 -0
- package/styles/fonts.scss +14 -13
- package/styles/icons/icons-fill.scss +48 -3
- package/styles/icons/icons-regular.scss +50 -2
- package/styles/icons/icons.scss +3 -23
- package/styles/index.scss +47 -58
- package/styles/layout-flex-wrap.scss +18 -0
- package/styles/margins.scss +18 -1
- package/svg/fill/calendar-check.fill.svg +4 -0
- package/svg/fill/calendar-days.fill.svg +4 -0
- package/svg/fill/card.fill.svg +4 -0
- package/svg/fill/caret-down.fill.svg +4 -0
- package/svg/fill/caret-left.fill.svg +4 -0
- package/svg/fill/caret-right.fill.svg +4 -0
- package/svg/fill/caret-up.fill.svg +4 -0
- package/svg/fill/circle-info.fill.svg +4 -0
- package/svg/fill/colors.fill.svg +4 -0
- package/svg/fill/directive.fill.svg +31 -0
- package/svg/fill/disk-floppy.fill.svg +4 -0
- package/svg/fill/eye-slash.fill.svg +4 -0
- package/svg/fill/eye.fill.svg +4 -0
- package/svg/fill/file-arrow-down.fill.svg +4 -0
- package/svg/fill/file-arrow-up.fill.svg +4 -0
- package/svg/fill/file-csv.fill.svg +4 -0
- package/svg/fill/file-invoice-dollar.fill.svg +4 -0
- package/svg/fill/file-invoice-lines.fill.svg +4 -0
- package/svg/fill/file-invoice.fill.svg +4 -0
- package/svg/fill/file-laptop.fill.svg +4 -0
- package/svg/fill/file-xls.fill.svg +25 -0
- package/svg/fill/file.fill.svg +4 -0
- package/svg/fill/filter.fill.svg +4 -0
- package/svg/fill/image.fill.svg +4 -0
- package/svg/fill/images.fill.svg +4 -0
- package/svg/fill/paint-roller.fill.svg +4 -0
- package/svg/fill/pen.fill.svg +4 -0
- package/svg/fill/pipe.fill.svg +23 -0
- package/svg/fill/plug.fill.svg +4 -0
- package/svg/fill/pointer.fill.svg +4 -0
- package/svg/fill/puzzle-piece.fill.svg +4 -0
- package/svg/fill/satellite-dish.fill.svg +4 -0
- package/svg/fill/satellite.fill.svg +4 -0
- package/svg/fill/share-square.fill.svg +4 -0
- package/svg/fill/share.fill.svg +4 -0
- package/svg/fill/shield-minus.fill.svg +11 -0
- package/svg/fill/sidenav.fill.svg +4 -0
- package/svg/fill/signal-post-2.fill.svg +4 -0
- package/svg/fill/signal-post.fill.svg +4 -0
- package/svg/fill/square-caret-down.fill.svg +4 -0
- package/svg/fill/square-caret-left.fill.svg +4 -0
- package/svg/fill/square-caret-right.fill.svg +4 -0
- package/svg/fill/square-caret-up.fill.svg +4 -0
- package/svg/fill/square-check.fill.svg +4 -0
- package/svg/fill/switch-on.fill.svg +1 -0
- package/svg/regular/a.svg +4 -0
- package/svg/regular/angle-down.svg +4 -0
- package/svg/regular/angle-left.svg +4 -0
- package/svg/regular/angle-right.svg +4 -0
- package/svg/regular/angle-up.svg +4 -0
- package/svg/regular/arrows-circle.svg +4 -0
- package/svg/regular/box-arrow-left.svg +5 -0
- package/svg/regular/box-arrow-right.svg +5 -0
- package/svg/regular/browser-window.svg +5 -0
- package/svg/regular/c.svg +4 -0
- package/svg/regular/calendar-check.svg +4 -0
- package/svg/regular/circle-info.svg +5 -0
- package/svg/regular/circle-notch.svg +4 -0
- package/svg/regular/directive.svg +38 -0
- package/svg/regular/expand.svg +4 -0
- package/svg/regular/file-arrow-down.svg +15 -0
- package/svg/regular/file-arrow-up.svg +16 -0
- package/svg/regular/file-csv.svg +25 -0
- package/svg/regular/file-xls.svg +24 -0
- package/svg/regular/file.svg +4 -0
- package/svg/regular/grid.svg +4 -0
- package/svg/regular/hash.svg +4 -0
- package/svg/regular/http.svg +85 -0
- package/svg/regular/i-min.svg +3 -0
- package/svg/regular/image.svg +4 -0
- package/svg/regular/images.svg +4 -0
- package/svg/regular/input-text.svg +5 -0
- package/svg/regular/j.svg +4 -0
- package/svg/regular/monitor.svg +4 -0
- package/svg/regular/p.svg +4 -0
- package/svg/regular/plug.svg +4 -0
- package/svg/regular/plus.svg +4 -0
- package/svg/regular/pointer.svg +4 -0
- package/svg/regular/rectangle-list.svg +4 -0
- package/svg/regular/s.svg +4 -0
- package/svg/regular/service.svg +4 -0
- package/svg/regular/shield-minus.svg +15 -0
- package/svg/regular/signal-post-2.svg +4 -0
- package/svg/regular/signal-post.svg +4 -0
- package/svg/regular/signal-stream.svg +19 -0
- package/svg/regular/square-check.svg +4 -0
- package/svg/regular/string.svg +4 -0
- package/svg/regular/switch-off.svg +4 -0
- package/svg/regular/tabs.svg +4 -0
- package/svg/regular/textarea.svg +4 -0
- package/svg/regular/x.svg +4 -0
- package/tools/lib/files.tools.d.ts +1 -1
- package/tools/lib/page.tools.d.ts +0 -2
- package/tools/lib/screen.tools.d.ts +1 -1
- package/tools/lib/strings.tools.d.ts +3 -1
- package/pages/lib/coer-loading/loading.component.d.ts +0 -5
- package/styles/icons/icons-fill-none.scss +0 -3
- package/styles/icons/icons-regular-none.scss +0 -3
- package/svg/fill/none/bell.fill.none.svg +0 -4
- package/svg/regular/none/bell.none.svg +0 -4
- /package/svg/{fill/dot.fill.svg → regular/dot.svg} +0 -0
@@ -1,12 +1,11 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { viewChild, input, output, Component, computed,
|
2
|
+
import { viewChild, input, output, Component, computed, effect, signal, ContentChildren, inject, viewChildren, Input, contentChildren, NgModule } from '@angular/core';
|
3
3
|
import * as i1 from '@angular/common';
|
4
4
|
import { CommonModule } from '@angular/common';
|
5
5
|
import * as i2$1 from '@angular/router';
|
6
6
|
import { Router, RouterModule } from '@angular/router';
|
7
7
|
import * as i2$2 from '@angular/forms';
|
8
8
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
9
|
-
import * as i3$3 from 'coer-elements/directives';
|
10
9
|
import { CoerRefDirective, DirectivesModule } from 'coer-elements/directives';
|
11
10
|
import * as i9 from 'coer-elements/pipes';
|
12
11
|
import { PipesModule } from 'coer-elements/pipes';
|
@@ -31,20 +30,23 @@ import { MatListModule } from '@angular/material/list';
|
|
31
30
|
import { provideNativeDateAdapter, MatNativeDateModule } from '@angular/material/core';
|
32
31
|
import * as i2$5 from '@angular/material/slide-toggle';
|
33
32
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
34
|
-
import * as
|
33
|
+
import * as i3$3 from '@angular/material/tabs';
|
35
34
|
import { MatTabsModule } from '@angular/material/tabs';
|
36
35
|
import { MatTimepickerModule } from '@angular/material/timepicker';
|
37
|
-
import * as i2$
|
36
|
+
import * as i2$9 from '@angular/material/toolbar';
|
38
37
|
import { MatToolbarModule } from '@angular/material/toolbar';
|
39
|
-
import
|
40
|
-
import {
|
41
|
-
import {
|
38
|
+
import * as i4 from '@angular/material/tooltip';
|
39
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
40
|
+
import { Tools, Strings, ControlValue, CONTROL_VALUE, Dates, Screen, HTMLElements, CoerAlert, Files, Numbers, Collections, Source, Menu, Breadcrumbs } from 'coer-elements/tools';
|
41
|
+
import { isModalOpenSIGNAL, menuSelectedSIGNAL, isMenuOpenSIGNAL, isLoadingSIGNAL, breakpointSIGNAL, navigationSIGNAL } from 'coer-elements/signals';
|
42
|
+
import { Modal } from 'bootstrap';
|
42
43
|
|
43
44
|
class CoerAccordion {
|
44
45
|
constructor() {
|
46
|
+
//Elements
|
47
|
+
this._expansionPanel = viewChild('coerAccordion');
|
45
48
|
//Variables
|
46
49
|
this._id = Tools.GetGuid('coer-accordion');
|
47
|
-
this._expansionPanel = viewChild('coerAccordion');
|
48
50
|
this._isDisabled = false;
|
49
51
|
//Inputs
|
50
52
|
this.id = input('');
|
@@ -60,6 +62,7 @@ class CoerAccordion {
|
|
60
62
|
//Generic Tools
|
61
63
|
this._IsNotOnlyWhiteSpace = Tools.IsNotOnlyWhiteSpace;
|
62
64
|
}
|
65
|
+
//AfterViewInit
|
63
66
|
ngAfterViewInit() {
|
64
67
|
Tools.Sleep().then(() => {
|
65
68
|
this._htmlElement = document.getElementById(this._id);
|
@@ -117,18 +120,17 @@ class CoerAccordion {
|
|
117
120
|
}
|
118
121
|
}
|
119
122
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerAccordion, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
120
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerAccordion, isStandalone: false, selector: "coer-accordion", inputs: { id: { classPropertyName: "id", publicName: "id", 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 }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, scrollOnOpen: { classPropertyName: "scrollOnOpen", publicName: "scrollOnOpen", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onOpen: "onOpen", onClose: "onClose" }, viewQueries: [{ propertyName: "_expansionPanel", first: true, predicate: ["coerAccordion"], descendants: true, isSignal: true }], ngImport: i0, template: "<mat-expansion-panel\r\n [id]=\"_id\" \r\n #coerAccordion \r\n title=\"\" \r\n class=\"coer-accordion\"\r\n [disabled]=\"_isDisabled\" \r\n [expanded]=\"expanded()\" \r\n (opened)=\"Open()\" \r\n (closed)=\"Close()\">\r\n \r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n @if(_IsNotOnlyWhiteSpace(icon())) {\r\n <i [class]=\"icon()\"></i>\r\n }\r\n <span>{{ title() }}</span>\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n\r\n <div [ngClass]=\"{ '
|
123
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerAccordion, isStandalone: false, selector: "coer-accordion", inputs: { id: { classPropertyName: "id", publicName: "id", 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 }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, scrollOnOpen: { classPropertyName: "scrollOnOpen", publicName: "scrollOnOpen", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onOpen: "onOpen", onClose: "onClose" }, viewQueries: [{ propertyName: "_expansionPanel", first: true, predicate: ["coerAccordion"], descendants: true, isSignal: true }], ngImport: i0, template: "<mat-expansion-panel\r\n [id]=\"_id\" \r\n #coerAccordion \r\n title=\"\" \r\n class=\"coer-accordion\"\r\n [disabled]=\"_isDisabled\" \r\n [expanded]=\"expanded()\" \r\n (opened)=\"Open()\" \r\n (closed)=\"Close()\">\r\n \r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n @if(_IsNotOnlyWhiteSpace(icon())) {\r\n <i [class]=\"icon()\"></i>\r\n }\r\n <span>{{ title() }}</span>\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n\r\n <div [ngClass]=\"{ 'collapsed': isCollapsed }\"\r\n [ngStyle]=\"{\r\n 'height': height(),\r\n 'min-height': minHeight()\r\n }\">\r\n <ng-content></ng-content>\r\n </div>\r\n</mat-expansion-panel>", styles: ["mat-expansion-panel.coer-accordion{overflow:visible!important}mat-expansion-panel.coer-accordion mat-expansion-panel-header{height:35px!important;background-color:var(--smoke)!important;padding-left:12px!important}mat-expansion-panel.coer-accordion mat-expansion-panel-header span{color:var(--black)!important;font-size:16px!important;white-space:nowrap!important}mat-expansion-panel.coer-accordion mat-expansion-panel-header mat-panel-title{display:flex;align-items:center;gap:5px}mat-expansion-panel.coer-accordion div.mat-expansion-panel-body{padding:0!important}mat-expansion-panel.coer-accordion .collapsed{display:none!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i2.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: i2.MatExpansionPanelTitle, selector: "mat-panel-title" }] }); }
|
121
124
|
}
|
122
125
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerAccordion, decorators: [{
|
123
126
|
type: Component,
|
124
|
-
args: [{ selector: 'coer-accordion', standalone: false, template: "<mat-expansion-panel\r\n [id]=\"_id\" \r\n #coerAccordion \r\n title=\"\" \r\n class=\"coer-accordion\"\r\n [disabled]=\"_isDisabled\" \r\n [expanded]=\"expanded()\" \r\n (opened)=\"Open()\" \r\n (closed)=\"Close()\">\r\n \r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n @if(_IsNotOnlyWhiteSpace(icon())) {\r\n <i [class]=\"icon()\"></i>\r\n }\r\n <span>{{ title() }}</span>\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n\r\n <div [ngClass]=\"{ '
|
127
|
+
args: [{ selector: 'coer-accordion', standalone: false, template: "<mat-expansion-panel\r\n [id]=\"_id\" \r\n #coerAccordion \r\n title=\"\" \r\n class=\"coer-accordion\"\r\n [disabled]=\"_isDisabled\" \r\n [expanded]=\"expanded()\" \r\n (opened)=\"Open()\" \r\n (closed)=\"Close()\">\r\n \r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n @if(_IsNotOnlyWhiteSpace(icon())) {\r\n <i [class]=\"icon()\"></i>\r\n }\r\n <span>{{ title() }}</span>\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n\r\n <div [ngClass]=\"{ 'collapsed': isCollapsed }\"\r\n [ngStyle]=\"{\r\n 'height': height(),\r\n 'min-height': minHeight()\r\n }\">\r\n <ng-content></ng-content>\r\n </div>\r\n</mat-expansion-panel>", styles: ["mat-expansion-panel.coer-accordion{overflow:visible!important}mat-expansion-panel.coer-accordion mat-expansion-panel-header{height:35px!important;background-color:var(--smoke)!important;padding-left:12px!important}mat-expansion-panel.coer-accordion mat-expansion-panel-header span{color:var(--black)!important;font-size:16px!important;white-space:nowrap!important}mat-expansion-panel.coer-accordion mat-expansion-panel-header mat-panel-title{display:flex;align-items:center;gap:5px}mat-expansion-panel.coer-accordion div.mat-expansion-panel-body{padding:0!important}mat-expansion-panel.coer-accordion .collapsed{display:none!important}\n"] }]
|
125
128
|
}] });
|
126
129
|
|
127
130
|
class CoerButton {
|
128
131
|
constructor() {
|
129
132
|
//Variables
|
130
133
|
this._id = Tools.GetGuid('coer-button');
|
131
|
-
this._tooltip = '';
|
132
134
|
//Inputs
|
133
135
|
this.id = input('');
|
134
136
|
this.color = input('default');
|
@@ -136,7 +138,6 @@ class CoerButton {
|
|
136
138
|
this.icon = input('');
|
137
139
|
this.iconPosition = input('left');
|
138
140
|
this.path = input([]);
|
139
|
-
this.animation = input(false);
|
140
141
|
this.isLoading = input(false);
|
141
142
|
this.isDisabled = input(false);
|
142
143
|
this.isReadonly = input(false);
|
@@ -150,79 +151,69 @@ class CoerButton {
|
|
150
151
|
this.marginRight = input('0px');
|
151
152
|
this.marginBottom = input('0px');
|
152
153
|
this.marginLeft = input('0px');
|
154
|
+
this.tooltip = input('');
|
153
155
|
this.tooltipPosition = input('left');
|
154
156
|
//Outputs
|
155
157
|
this.onClick = output();
|
156
158
|
//computed
|
159
|
+
this._tooltip = computed(() => {
|
160
|
+
return Tools.IsNotOnlyWhiteSpace(this.tooltip())
|
161
|
+
? Strings.CleanUpBlanks(this.tooltip()) : '';
|
162
|
+
});
|
163
|
+
//computed
|
164
|
+
this._tooltipPosition = computed(() => {
|
165
|
+
switch (this.tooltipPosition()) {
|
166
|
+
case 'top': return 'above';
|
167
|
+
case 'right': return 'right';
|
168
|
+
case 'bottom': return 'below';
|
169
|
+
default: return 'left';
|
170
|
+
}
|
171
|
+
});
|
172
|
+
//computed
|
157
173
|
this._isEnable = computed(() => {
|
158
174
|
return !this.isLoading() && !this.isDisabled() && !this.isInvisible() && !this.isReadonly();
|
159
175
|
});
|
160
176
|
//computed
|
161
177
|
this._icon = computed(() => {
|
178
|
+
const icon = Tools.IsNotNull(this.icon()) ? this.icon() : '';
|
162
179
|
switch (this.icon()) {
|
163
|
-
case 'new': return '
|
164
|
-
case 'save': return '
|
165
|
-
case 'cancel': return '
|
166
|
-
case 'import': return '
|
167
|
-
case '
|
168
|
-
case '
|
169
|
-
case 'delete': return '
|
170
|
-
case 'edit': return '
|
171
|
-
case 'go': return '
|
172
|
-
case 'back': return '
|
173
|
-
case 'pointer': return '
|
174
|
-
default: return this.icon();
|
180
|
+
case 'new': return 'icon-plus';
|
181
|
+
case 'save': return 'icon-disk-floppy icon-fill';
|
182
|
+
case 'cancel': return 'icon-x';
|
183
|
+
case 'import': return 'icon-file-arrow-up icon-fill';
|
184
|
+
case 'export': return 'icon-file-arrow-down icon-fill';
|
185
|
+
case 'excel': return 'icon-file-csv icon-fill';
|
186
|
+
case 'delete': return 'icon-trash-can icon-fill';
|
187
|
+
case 'edit': return 'icon-pen icon-fill';
|
188
|
+
case 'go': return 'icon-box-arrow-right';
|
189
|
+
case 'back': return 'icon-box-arrow-left';
|
190
|
+
case 'pointer': return 'icon-pointer icon-fill';
|
175
191
|
}
|
192
|
+
return ['icon', 'icon-outline', 'icon-no-border'].includes(this.type())
|
193
|
+
&& Tools.IsOnlyWhiteSpace(icon)
|
194
|
+
? 'icon-pointer icon-fill' : icon;
|
176
195
|
});
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
}
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
}
|
189
|
-
}
|
190
|
-
ngOnInit() {
|
191
|
-
this._SetToolTip();
|
192
|
-
this._SetEvents();
|
193
|
-
}
|
194
|
-
ngOnDestroy() {
|
195
|
-
if (this._tooltipElement) {
|
196
|
-
Tools.Sleep().then(() => this._tooltipElement.dispose());
|
197
|
-
}
|
198
|
-
}
|
199
|
-
/** */
|
200
|
-
_SetEvents() {
|
201
|
-
Tools.Sleep().then(() => {
|
202
|
-
this._element = document.getElementById(`${this._id}-inner-button`);
|
203
|
-
if (Tools.IsNotNull(this._element)) {
|
204
|
-
this._element.addEventListener('focus', () => {
|
205
|
-
if (!this._isEnable())
|
206
|
-
this.Blur();
|
207
|
-
});
|
208
|
-
}
|
196
|
+
//computed
|
197
|
+
this._buttonType = computed(() => {
|
198
|
+
const readonly = ['icon', 'icon-outline', 'icon-no-border'].includes(this.type())
|
199
|
+
? (this.isDisabled() || this.isLoading() ? 'readonly' : '')
|
200
|
+
: (this.isDisabled() ? 'readonly' : '');
|
201
|
+
return `
|
202
|
+
${this.color()}-${['filled', 'icon'].includes(this.type()) ? 'filled' : 'outline'}
|
203
|
+
${readonly}
|
204
|
+
${this.isLoading() ? 'cursor-wait' : ''}
|
205
|
+
${this.type() == 'icon-no-border' ? 'icon-no-border' : ''}
|
206
|
+
`.trim();
|
209
207
|
});
|
210
208
|
}
|
211
|
-
|
209
|
+
//AfterViewInit
|
210
|
+
ngAfterViewInit() {
|
212
211
|
Tools.Sleep().then(() => {
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
}
|
219
|
-
});
|
220
|
-
this._tooltipElement = new Tooltip(htmlElement, {
|
221
|
-
html: true,
|
222
|
-
title: this._tooltip,
|
223
|
-
placement: this.tooltipPosition
|
224
|
-
});
|
225
|
-
}
|
212
|
+
this._element = document.getElementById(`${this._id}-inner-button`);
|
213
|
+
this._element.addEventListener('focus', () => {
|
214
|
+
if (!this._isEnable())
|
215
|
+
this.Blur();
|
216
|
+
});
|
226
217
|
});
|
227
218
|
}
|
228
219
|
/** */
|
@@ -240,18 +231,16 @@ class CoerButton {
|
|
240
231
|
});
|
241
232
|
}
|
242
233
|
/** */
|
243
|
-
Blur() {
|
244
|
-
Tools.Sleep().then(() => this._element.blur());
|
234
|
+
Blur(timeout = 0) {
|
235
|
+
Tools.Sleep(timeout).then(() => this._element.blur());
|
245
236
|
}
|
246
237
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerButton, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
247
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerButton, isStandalone: false, selector: "coer-button", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconPosition: { classPropertyName: "iconPosition", publicName: "iconPosition", isSignal: true, isRequired: false, transformFunction: null }, path: { classPropertyName: "path", publicName: "path", isSignal: true, isRequired: false, transformFunction: null }, animation: { classPropertyName: "animation", publicName: "animation", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: true, isRequired: false, transformFunction: null }, isInvisible: { classPropertyName: "isInvisible", publicName: "isInvisible", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null }, marginTop: { classPropertyName: "marginTop", publicName: "marginTop", isSignal: true, isRequired: false, transformFunction: null }, marginRight: { classPropertyName: "marginRight", publicName: "marginRight", isSignal: true, isRequired: false, transformFunction: null }, marginBottom: { classPropertyName: "marginBottom", publicName: "marginBottom", isSignal: true, isRequired: false, transformFunction: null }, marginLeft: { classPropertyName: "marginLeft", publicName: "marginLeft", isSignal: true, isRequired: false, transformFunction: null }, tooltipPosition: { classPropertyName: "tooltipPosition", publicName: "tooltipPosition", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { onClick: "onClick" }, ngImport: i0, template: "<div [ngClass]=\"{ 'coer-button': true }\">\r\n <a [id]=\"_id + '-container'\"\r\n [routerLink]=\"(path().length > 0 && _isEnable()) ? path() : null\"\r\n [ngClass]=\"{ 'loading': isLoading(), 'animate__animated animate__zoomIn': true, 'animate__disabled': !animation(), 'invisible': isInvisible() || isReadonly() }\"\r\n [ngStyle]=\"{ 'margin-top': marginTop(), 'margin-right': marginRight(), 'margin-bottom': marginBottom(), 'margin-left': marginLeft() }\">\r\n \r\n @if(type() =='filled' || type() == 'outline') {\r\n <button mat-button\r\n [id]=\"_id + '-inner-button'\"\r\n type=\"button\"\r\n (click)=\"_Click()\"\r\n [ngClass]=\"{\r\n 'primary-filled' : (color() == 'primary' && type() =='filled'),\r\n 'secondary-filled' : (color() == 'secondary' && type() =='filled'),\r\n 'success-filled' : (color() == 'success' && type() =='filled'),\r\n 'warning-filled' : (color() == 'warning' && type() =='filled'),\r\n 'danger-filled' : (color() == 'danger' && type() =='filled'),\r\n 'navigation-filled' : (color() == 'navigation' && type() =='filled'),\r\n 'information-filled' : (color() == 'information' && type() =='filled'),\r\n 'dark-filled' : (color() == 'dark' && type() =='filled'),\r\n 'light-filled' : (color() == 'light' && type() =='filled'),\r\n 'primary-outline' : (color() == 'primary' && type() =='outline'),\r\n 'secondary-outline' : (color() == 'secondary' && type() =='outline'),\r\n 'success-outline' : (color() == 'success' && type() =='outline'),\r\n 'warning-outline' : (color() == 'warning' && type() =='outline'),\r\n 'danger-outline' : (color() == 'danger' && type() =='outline'),\r\n 'navigation-outline' : (color() == 'navigation' && type() =='outline'),\r\n 'information-outline': (color() == 'information' && type() =='outline'),\r\n 'dark-outline' : (color() == 'dark' && type() =='outline'),\r\n 'light-outline' : (color() == 'light' && type() =='outline'),\r\n 'readonly': isDisabled(),\r\n 'cursor-wait': isLoading()\r\n }\"\r\n [ngStyle]=\"{\r\n 'width' : width(),\r\n 'min-width' : minWidth(),\r\n 'max-width' : maxWidth(),\r\n 'height' : height(),\r\n 'min-height': minHeight()\r\n }\">\r\n <span class=\"slot\" *ngIf=\"!isLoading(); else loading\" >\r\n @if(iconPosition() == 'left') {\r\n <span>\r\n <i [class]=\"_icon()\"></i>\r\n </span>\r\n }\r\n\r\n <span [ngClass]=\"{ \r\n 'ms-2': (iconPosition() == 'left' && icon().length > 0), \r\n 'me-2': (iconPosition() == 'right' && icon().length > 0) \r\n }\">\r\n <ng-content></ng-content>\r\n </span>\r\n\r\n @if(iconPosition() == 'right') {\r\n <span>\r\n <i [class]=\"_icon()\"></i>\r\n </span> \r\n }\r\n </span>\r\n\r\n <ng-template #loading>\r\n <span class=\"slot fa-fade\">\r\n <span class=\"me-2\"> Loading </span>\r\n <i class=\"spinner-border\"></i>\r\n </span>\r\n </ng-template>\r\n </button>\r\n }\r\n\r\n @else {\r\n @if (type() == 'icon') {\r\n <button mat-icon-button\r\n [id]=\"_id + '-inner-button'\"\r\n type=\"button\"\r\n (click)=\"_Click()\"\r\n [ngClass]=\"{\r\n 'primary-filled' : (color() == 'primary'),\r\n 'secondary-filled' : (color() == 'secondary'),\r\n 'success-filled' : (color() == 'success'),\r\n 'warning-filled' : (color() == 'warning'),\r\n 'danger-filled' : (color() == 'danger'),\r\n 'navigation-filled' : (color() == 'navigation'),\r\n 'information-filled': (color() == 'information'),\r\n 'dark-filled' : (color() == 'dark'),\r\n 'light-filled' : (color() == 'light'),\r\n 'readonly' : (isDisabled() || isLoading()),\r\n 'cursor-wait' : isLoading()\r\n }\">\r\n <i [class]=\"_icon()\"></i>\r\n </button>\r\n }\r\n\r\n @else if (type() == 'icon-outline') {\r\n <button mat-icon-button\r\n [id]=\"_id + '-inner-button'\"\r\n type=\"button\"\r\n (click)=\"_Click()\"\r\n [ngClass]=\"{\r\n 'primary-outline' : (color() == 'primary'),\r\n 'secondary-outline' : (color() == 'secondary'),\r\n 'success-outline' : (color() == 'success'),\r\n 'warning-outline' : (color() == 'warning'),\r\n 'danger-outline' : (color() == 'danger'),\r\n 'navigation-outline' : (color() == 'navigation'),\r\n 'information-outline': (color() == 'information'),\r\n 'dark-outline' : (color() == 'dark'),\r\n 'light-outline' : (color() == 'light'),\r\n 'readonly' : (isDisabled() || isLoading()),\r\n 'cursor-wait' : isLoading()\r\n }\">\r\n <i [class]=\"_icon()\"></i>\r\n </button>\r\n }\r\n\r\n @else if (type() == 'icon-no-border') {\r\n <button mat-icon-button\r\n [id]=\"_id + '-inner-button'\"\r\n type=\"button\"\r\n (click)=\"_Click()\"\r\n [ngClass]=\"{\r\n 'primary-outline' : (color() == 'primary'),\r\n 'secondary-outline' : (color() == 'secondary'),\r\n 'success-outline' : (color() == 'success'),\r\n 'warning-outline' : (color() == 'warning'),\r\n 'danger-outline' : (color() == 'danger'),\r\n 'navigation-outline' : (color() == 'navigation'),\r\n 'information-outline': (color() == 'information'),\r\n 'dark-outline' : (color() == 'dark'),\r\n 'light-outline' : (color() == 'light'),\r\n 'readonly' : (isDisabled() || isLoading()),\r\n 'icon-no-border' : true\r\n }\">\r\n <i [class]=\"_icon()\"></i>\r\n </button>\r\n }\r\n }\r\n </a>\r\n</div>", styles: ["coer-button{display:contents!important}div.coer-button{display:contents!important}div.coer-button a{display:inline-block!important;height:fit-content!important;text-decoration:none!important}div.coer-button a.animate__disabled{animation-duration:0s!important}div.coer-button button{font-size:17px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;display:flex!important;align-items:center!important;justify-content:center!important}div.coer-button .slot{width:100px!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:visible!important}div.coer-button button.primary-filled{background-color:var(--primary-inner)!important;color:var(--white)!important}div.coer-button button.primary-outline{background-color:var(--white)!important;color:var(--primary-inner)!important;border:1px solid var(--primary-inner)!important}div.coer-button button.primary-filled:not(.readonly):focus,div.coer-button button.primary-outline:not(.readonly):focus{box-shadow:0 0 20px var(--primary-inner)!important}div.coer-button button.primary-filled:not(.readonly):hover,div.coer-button button.primary-filled:not(.readonly):focus,div.coer-button button.primary-outline:not(.readonly):hover,div.coer-button button.primary-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.secondary-filled{background-color:var(--secondary-inner)!important;color:var(--white)!important}div.coer-button button.secondary-outline{background-color:var(--white)!important;color:var(--secondary-inner)!important;border:1px solid var(--secondary-inner)!important}div.coer-button button.secondary-filled:not(.readonly):focus,div.coer-button button.secondary-outline:not(.readonly):focus{box-shadow:0 0 20px var(--secondary-inner)!important}div.coer-button button.secondary-filled:not(.readonly):hover,div.coer-button button.secondary-filled:not(.readonly):focus,div.coer-button button.secondary-outline:not(.readonly):hover,div.coer-button button.secondary-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.success-filled{background-color:var(--success-inner)!important;color:var(--white)!important}div.coer-button button.success-outline{background-color:var(--white)!important;color:var(--success-inner)!important;border:1px solid var(--success-inner)!important}div.coer-button button.success-filled:not(.readonly):focus,div.coer-button button.success-outline:not(.readonly):focus{box-shadow:0 0 20px var(--success-inner)!important}div.coer-button button.success-filled:not(.readonly):hover,div.coer-button button.success-filled:not(.readonly):focus,div.coer-button button.success-outline:not(.readonly):hover,div.coer-button button.success-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.warning-filled{background-color:var(--warning-inner)!important;color:var(--black)!important}div.coer-button button.warning-outline{background-color:var(--white)!important;color:var(--warning-inner)!important;border:1px solid var(--warning-inner)!important}div.coer-button button.warning-filled:not(.readonly):focus,div.coer-button button.warning-outline:not(.readonly):focus{box-shadow:0 0 20px var(--warning-inner)!important}div.coer-button button.warning-filled:not(.readonly):hover,div.coer-button button.warning-filled:not(.readonly):focus,div.coer-button button.warning-outline:not(.readonly):hover,div.coer-button button.warning-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.danger-filled{background-color:var(--danger-inner)!important;color:var(--white)!important}div.coer-button button.danger-outline{background-color:var(--white)!important;color:var(--danger-inner)!important;border:1px solid var(--danger-inner)!important}div.coer-button button.danger-filled:not(.readonly):focus,div.coer-button button.danger-outline:not(.readonly):focus{box-shadow:0 0 20px var(--danger-inner)!important}div.coer-button button.danger-filled:not(.readonly):hover,div.coer-button button.danger-filled:not(.readonly):focus,div.coer-button button.danger-outline:not(.readonly):hover,div.coer-button button.danger-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.navigation-filled{background-color:var(--navigation-inner)!important;color:var(--white)!important}div.coer-button button.navigation-outline{background-color:var(--white)!important;color:var(--navigation-inner)!important;border:1px solid var(--navigation-inner)!important}div.coer-button button.navigation-filled:not(.readonly):focus,div.coer-button button.navigation-outline:not(.readonly):focus{box-shadow:0 0 20px var(--navigation-inner)!important}div.coer-button button.navigation-filled:not(.readonly):hover,div.coer-button button.navigation-filled:not(.readonly):focus,div.coer-button button.navigation-outline:not(.readonly):hover,div.coer-button button.navigation-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.information-filled{background-color:var(--information-inner)!important;color:var(--white)!important}div.coer-button button.information-outline{background-color:var(--white)!important;color:var(--information-inner)!important;border:1px solid var(--information-inner)!important}div.coer-button button.information-filled:not(.readonly):focus,div.coer-button button.information-outline:not(.readonly):focus{box-shadow:0 0 20px var(--information-inner)!important}div.coer-button button.information-filled:not(.readonly):hover,div.coer-button button.information-filled:not(.readonly):focus,div.coer-button button.information-outline:not(.readonly):hover,div.coer-button button.information-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.dark-filled{background-color:var(--black)!important;color:var(--white)!important}div.coer-button button.dark-outline{background-color:var(--white)!important;color:var(--black)!important;border:1px solid var(--black)!important}div.coer-button button.dark-filled:not(.readonly):focus,div.coer-button button.dark-outline:not(.readonly):focus{box-shadow:0 0 20px var(--black)!important}div.coer-button button.dark-filled:not(.readonly):hover,div.coer-button button.dark-filled:not(.readonly):focus,div.coer-button button.dark-outline:not(.readonly):hover,div.coer-button button.dark-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.light-filled{background-color:var(--white)!important;color:var(--black)!important}div.coer-button button.light-outline{background-color:transparent!important;color:var(--white)!important;border:1px solid var(--white)!important}div.coer-button button.light-filled:not(.readonly):focus,div.coer-button button.light-outline:not(.readonly):focus{box-shadow:0 0 20px var(--white)!important}div.coer-button button.light-filled:not(.readonly):hover,div.coer-button button.light-filled:not(.readonly):focus,div.coer-button button.light-outline:not(.readonly):hover,div.coer-button button.light-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.mdc-icon-button.mat-mdc-icon-button{width:40px!important;height:40px!important;padding:0!important}div.coer-button button.mdc-icon-button.mat-mdc-icon-button.icon-no-border{width:25px!important;height:25px!important;background-color:transparent!important;border:none!important;overflow:visible!important}div.coer-button button.mdc-icon-button.mat-mdc-icon-button.icon-no-border *{font-size:medium!important}div.coer-button button.mdc-icon-button.mat-mdc-icon-button.icon-no-border i.bi-box-arrow-left,div.coer-button button.mdc-icon-button.mat-mdc-icon-button.icon-no-border i.bi-box-arrow-in-right{font-size:20px!important}div.coer-button button.readonly,div.coer-button button.readonly:hover,div.coer-button button.readonly:focus{background-color:#dfdede!important;border-color:#dfdede!important;color:var(--white)!important}div.coer-button coer-button[ishidden=true],div.coer-button coer-button[ng-reflect-invisible=true]{position:relative!important;top:10000vh;left:10000vw}div.coer-button a.loading{cursor:wait!important}div.coer-button i{display:flex!important;align-items:center!important;justify-content:center!important}div.coer-button i.spinner-border{width:15px!important;height:15px!important;font-size:16px!important}div.coer-button span{font-weight:700!important}div.coer-button .mat-mdc-button-touch-target{width:0px!important;height:0px!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }] }); }
|
238
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerButton, isStandalone: false, selector: "coer-button", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconPosition: { classPropertyName: "iconPosition", publicName: "iconPosition", isSignal: true, isRequired: false, transformFunction: null }, path: { classPropertyName: "path", publicName: "path", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: true, isRequired: false, transformFunction: null }, isInvisible: { classPropertyName: "isInvisible", publicName: "isInvisible", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null }, marginTop: { classPropertyName: "marginTop", publicName: "marginTop", isSignal: true, isRequired: false, transformFunction: null }, marginRight: { classPropertyName: "marginRight", publicName: "marginRight", isSignal: true, isRequired: false, transformFunction: null }, marginBottom: { classPropertyName: "marginBottom", publicName: "marginBottom", isSignal: true, isRequired: false, transformFunction: null }, marginLeft: { classPropertyName: "marginLeft", publicName: "marginLeft", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, tooltipPosition: { classPropertyName: "tooltipPosition", publicName: "tooltipPosition", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClick: "onClick" }, ngImport: i0, template: "<div [ngClass]=\"{ 'coer-button': true }\">\r\n <a [routerLink]=\"(path().length > 0 && _isEnable()) ? path() : null\"\r\n [matTooltip]=\"_tooltip()\"\r\n [matTooltipPosition]=\"_tooltipPosition()\"\r\n [matTooltipDisabled]=\"!_isEnable()\"\r\n [matTooltipHideDelay]=\"0\"\r\n [ngClass]=\"{ 'loading': isLoading() }\"\r\n [ngStyle]=\"{ \r\n 'visibility' : (isInvisible() || isReadonly() ? 'hidden' : 'visible'),\r\n 'margin-top' : marginTop(), \r\n 'margin-right' : marginRight(), \r\n 'margin-bottom': marginBottom(), \r\n 'margin-left' : marginLeft() \r\n }\">\r\n \r\n @if(type() =='filled' || type() == 'outline') {\r\n <button mat-button type=\"button\" \r\n [id]=\"_id + '-inner-button'\"\r\n (click)=\"_Click()\"\r\n [class]=\"_buttonType()\"\r\n [ngStyle]=\"{\r\n 'width' : width(),\r\n 'min-width' : minWidth(),\r\n 'max-width' : maxWidth(),\r\n 'height' : height(),\r\n 'min-height': minHeight()\r\n }\">\r\n\r\n @if(!isLoading()) {\r\n <span class=\"slot\">\r\n @if(iconPosition() == 'left') { \r\n <i [class]=\"_icon()\"></i> \r\n }\r\n \r\n <span [ngClass]=\"{ \r\n 'ms-2': (iconPosition() == 'left' && _icon().length > 0), \r\n 'me-2': (iconPosition() == 'right' && _icon().length > 0) \r\n }\">\r\n <ng-content>Click</ng-content>\r\n </span>\r\n \r\n @if(iconPosition() == 'right') {\r\n <i [class]=\"_icon()\"></i>\r\n }\r\n </span>\r\n }\r\n\r\n @else {\r\n <span class=\"slot animation-appear\">\r\n <span class=\"me-2\"> Loading </span>\r\n <i class=\"icon-circle-notch animation-spin\"></i>\r\n </span> \r\n }\r\n </button>\r\n }\r\n\r\n @else {\r\n <button mat-icon-button\r\n [id]=\"_id + '-inner-button'\"\r\n type=\"button\"\r\n (click)=\"_Click()\"\r\n [class]=\"_buttonType()\">\r\n <i [class]=\"_icon()\"></i>\r\n </button>\r\n }\r\n </a>\r\n</div>", styles: ["coer-button{display:contents!important}div.coer-button{display:contents!important}div.coer-button a{display:inline-block!important;height:fit-content!important;text-decoration:none!important;color:var(--black)}div.coer-button button{font-size:17px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;display:flex!important;align-items:center!important;justify-content:center!important}div.coer-button .slot{width:100px!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:visible!important}div.coer-button button.default-filled{color:var(--black)!important;background-color:transparent!important}div.coer-button button.default-outline{color:var(--black)!important;border:1px solid var(--black)!important;background-color:transparent!important}div.coer-button button.default-filled:not(.readonly):focus,div.coer-button button.default-outline:not(.readonly):focus{box-shadow:0 0 20px transparent!important}div.coer-button button.default-filled:not(.readonly):hover,div.coer-button button.default-filled:not(.readonly):focus,div.coer-button button.default-outline:not(.readonly):hover,div.coer-button button.default-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.primary-filled{color:var(--white)!important;background-color:var(--primary-inner)!important}div.coer-button button.primary-outline{color:var(--primary-inner)!important;border:1px solid var(--primary-inner)!important;background-color:transparent!important}div.coer-button button.primary-filled:not(.readonly):focus,div.coer-button button.primary-outline:not(.readonly):focus{box-shadow:0 0 20px var(--primary-inner)!important}div.coer-button button.primary-filled:not(.readonly):hover,div.coer-button button.primary-filled:not(.readonly):focus,div.coer-button button.primary-outline:not(.readonly):hover,div.coer-button button.primary-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.secondary-filled{color:var(--white)!important;background-color:var(--secondary-inner)!important}div.coer-button button.secondary-outline{color:var(--secondary-inner)!important;border:1px solid var(--secondary-inner)!important;background-color:transparent!important}div.coer-button button.secondary-filled:not(.readonly):focus,div.coer-button button.secondary-outline:not(.readonly):focus{box-shadow:0 0 20px var(--secondary-inner)!important}div.coer-button button.secondary-filled:not(.readonly):hover,div.coer-button button.secondary-filled:not(.readonly):focus,div.coer-button button.secondary-outline:not(.readonly):hover,div.coer-button button.secondary-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.success-filled{color:var(--white)!important;background-color:var(--success-inner)!important}div.coer-button button.success-outline{color:var(--success-inner)!important;border:1px solid var(--success-inner)!important;background-color:transparent!important}div.coer-button button.success-filled:not(.readonly):focus,div.coer-button button.success-outline:not(.readonly):focus{box-shadow:0 0 20px var(--success-inner)!important}div.coer-button button.success-filled:not(.readonly):hover,div.coer-button button.success-filled:not(.readonly):focus,div.coer-button button.success-outline:not(.readonly):hover,div.coer-button button.success-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.warning-filled{color:var(--black)!important;background-color:var(--warning-inner)!important}div.coer-button button.warning-outline{color:var(--warning-inner)!important;border:1px solid var(--warning-inner)!important;background-color:transparent!important}div.coer-button button.warning-filled:not(.readonly):focus,div.coer-button button.warning-outline:not(.readonly):focus{box-shadow:0 0 20px var(--warning-inner)!important}div.coer-button button.warning-filled:not(.readonly):hover,div.coer-button button.warning-filled:not(.readonly):focus,div.coer-button button.warning-outline:not(.readonly):hover,div.coer-button button.warning-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.danger-filled{color:var(--white)!important;background-color:var(--danger-inner)!important}div.coer-button button.danger-outline{color:var(--danger-inner)!important;border:1px solid var(--danger-inner)!important;background-color:transparent!important}div.coer-button button.danger-filled:not(.readonly):focus,div.coer-button button.danger-outline:not(.readonly):focus{box-shadow:0 0 20px var(--danger-inner)!important}div.coer-button button.danger-filled:not(.readonly):hover,div.coer-button button.danger-filled:not(.readonly):focus,div.coer-button button.danger-outline:not(.readonly):hover,div.coer-button button.danger-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.navigation-filled{color:var(--white)!important;background-color:var(--navigation-inner)!important}div.coer-button button.navigation-outline{color:var(--navigation-inner)!important;border:1px solid var(--navigation-inner)!important;background-color:transparent!important}div.coer-button button.navigation-filled:not(.readonly):focus,div.coer-button button.navigation-outline:not(.readonly):focus{box-shadow:0 0 20px var(--navigation-inner)!important}div.coer-button button.navigation-filled:not(.readonly):hover,div.coer-button button.navigation-filled:not(.readonly):focus,div.coer-button button.navigation-outline:not(.readonly):hover,div.coer-button button.navigation-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.information-filled{color:var(--white)!important;background-color:var(--information-inner)!important}div.coer-button button.information-outline{color:var(--information-inner)!important;border:1px solid var(--information-inner)!important;background-color:transparent!important}div.coer-button button.information-filled:not(.readonly):focus,div.coer-button button.information-outline:not(.readonly):focus{box-shadow:0 0 20px var(--information-inner)!important}div.coer-button button.information-filled:not(.readonly):hover,div.coer-button button.information-filled:not(.readonly):focus,div.coer-button button.information-outline:not(.readonly):hover,div.coer-button button.information-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.dark-filled{color:var(--white)!important;background-color:var(--black)!important}div.coer-button button.dark-outline{color:var(--black)!important;border:1px solid var(--black)!important;background-color:transparent!important}div.coer-button button.dark-filled:not(.readonly):focus,div.coer-button button.dark-outline:not(.readonly):focus{box-shadow:0 0 20px var(--black)!important}div.coer-button button.dark-filled:not(.readonly):hover,div.coer-button button.dark-filled:not(.readonly):focus,div.coer-button button.dark-outline:not(.readonly):hover,div.coer-button button.dark-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.light-filled{color:var(--black)!important;background-color:var(--white)!important}div.coer-button button.light-outline{color:var(--white)!important;border:1px solid var(--white)!important;background-color:transparent!important}div.coer-button button.light-filled:not(.readonly):focus,div.coer-button button.light-outline:not(.readonly):focus{box-shadow:0 0 20px var(--white)!important}div.coer-button button.light-filled:not(.readonly):hover,div.coer-button button.light-filled:not(.readonly):focus,div.coer-button button.light-outline:not(.readonly):hover,div.coer-button button.light-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.mdc-icon-button.mat-mdc-icon-button{width:40px!important;height:40px!important;padding:0!important}div.coer-button button.mdc-icon-button.mat-mdc-icon-button.icon-no-border{width:25px!important;height:25px!important;background-color:transparent!important;border:none!important;overflow:visible!important}div.coer-button button.mdc-icon-button.mat-mdc-icon-button.icon-no-border *{font-size:medium!important}div.coer-button button.mdc-icon-button.mat-mdc-icon-button.icon-no-border i.bi-box-arrow-left,div.coer-button button.mdc-icon-button.mat-mdc-icon-button.icon-no-border i.bi-box-arrow-in-right{font-size:20px!important}div.coer-button button.readonly,div.coer-button button.readonly:hover,div.coer-button button.readonly:focus{background-color:#dfdede!important;border-color:#dfdede!important;color:var(--white)!important}div.coer-button button.mdc-icon-button.mat-mdc-icon-button.icon-no-border.readonly{color:#dfdede!important}div.coer-button a.loading{cursor:wait!important}div.coer-button i{display:flex!important;align-items:center!important;justify-content:center!important}div.coer-button span{font-weight:700!important}div.coer-button .mat-mdc-button-touch-target{width:0px!important;height:0px!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] }); }
|
248
239
|
}
|
249
240
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerButton, decorators: [{
|
250
241
|
type: Component,
|
251
|
-
args: [{ selector: 'coer-button', standalone: false, template: "<div [ngClass]=\"{ 'coer-button': true }\">\r\n <a [id]=\"_id + '-container'\"\r\n [routerLink]=\"(path().length > 0 && _isEnable()) ? path() : null\"\r\n [ngClass]=\"{ 'loading': isLoading(), 'animate__animated animate__zoomIn': true, 'animate__disabled': !animation(), 'invisible': isInvisible() || isReadonly() }\"\r\n [ngStyle]=\"{ 'margin-top': marginTop(), 'margin-right': marginRight(), 'margin-bottom': marginBottom(), 'margin-left': marginLeft() }\">\r\n \r\n @if(type() =='filled' || type() == 'outline') {\r\n <button mat-button\r\n [id]=\"_id + '-inner-button'\"\r\n type=\"button\"\r\n (click)=\"_Click()\"\r\n [ngClass]=\"{\r\n 'primary-filled' : (color() == 'primary' && type() =='filled'),\r\n 'secondary-filled' : (color() == 'secondary' && type() =='filled'),\r\n 'success-filled' : (color() == 'success' && type() =='filled'),\r\n 'warning-filled' : (color() == 'warning' && type() =='filled'),\r\n 'danger-filled' : (color() == 'danger' && type() =='filled'),\r\n 'navigation-filled' : (color() == 'navigation' && type() =='filled'),\r\n 'information-filled' : (color() == 'information' && type() =='filled'),\r\n 'dark-filled' : (color() == 'dark' && type() =='filled'),\r\n 'light-filled' : (color() == 'light' && type() =='filled'),\r\n 'primary-outline' : (color() == 'primary' && type() =='outline'),\r\n 'secondary-outline' : (color() == 'secondary' && type() =='outline'),\r\n 'success-outline' : (color() == 'success' && type() =='outline'),\r\n 'warning-outline' : (color() == 'warning' && type() =='outline'),\r\n 'danger-outline' : (color() == 'danger' && type() =='outline'),\r\n 'navigation-outline' : (color() == 'navigation' && type() =='outline'),\r\n 'information-outline': (color() == 'information' && type() =='outline'),\r\n 'dark-outline' : (color() == 'dark' && type() =='outline'),\r\n 'light-outline' : (color() == 'light' && type() =='outline'),\r\n 'readonly': isDisabled(),\r\n 'cursor-wait': isLoading()\r\n }\"\r\n [ngStyle]=\"{\r\n 'width' : width(),\r\n 'min-width' : minWidth(),\r\n 'max-width' : maxWidth(),\r\n 'height' : height(),\r\n 'min-height': minHeight()\r\n }\">\r\n <span class=\"slot\" *ngIf=\"!isLoading(); else loading\" >\r\n @if(iconPosition() == 'left') {\r\n <span>\r\n <i [class]=\"_icon()\"></i>\r\n </span>\r\n }\r\n\r\n <span [ngClass]=\"{ \r\n 'ms-2': (iconPosition() == 'left' && icon().length > 0), \r\n 'me-2': (iconPosition() == 'right' && icon().length > 0) \r\n }\">\r\n <ng-content></ng-content>\r\n </span>\r\n\r\n @if(iconPosition() == 'right') {\r\n <span>\r\n <i [class]=\"_icon()\"></i>\r\n </span> \r\n }\r\n </span>\r\n\r\n <ng-template #loading>\r\n <span class=\"slot fa-fade\">\r\n <span class=\"me-2\"> Loading </span>\r\n <i class=\"spinner-border\"></i>\r\n </span>\r\n </ng-template>\r\n </button>\r\n }\r\n\r\n @else {\r\n @if (type() == 'icon') {\r\n <button mat-icon-button\r\n [id]=\"_id + '-inner-button'\"\r\n type=\"button\"\r\n (click)=\"_Click()\"\r\n [ngClass]=\"{\r\n 'primary-filled' : (color() == 'primary'),\r\n 'secondary-filled' : (color() == 'secondary'),\r\n 'success-filled' : (color() == 'success'),\r\n 'warning-filled' : (color() == 'warning'),\r\n 'danger-filled' : (color() == 'danger'),\r\n 'navigation-filled' : (color() == 'navigation'),\r\n 'information-filled': (color() == 'information'),\r\n 'dark-filled' : (color() == 'dark'),\r\n 'light-filled' : (color() == 'light'),\r\n 'readonly' : (isDisabled() || isLoading()),\r\n 'cursor-wait' : isLoading()\r\n }\">\r\n <i [class]=\"_icon()\"></i>\r\n </button>\r\n }\r\n\r\n @else if (type() == 'icon-outline') {\r\n <button mat-icon-button\r\n [id]=\"_id + '-inner-button'\"\r\n type=\"button\"\r\n (click)=\"_Click()\"\r\n [ngClass]=\"{\r\n 'primary-outline' : (color() == 'primary'),\r\n 'secondary-outline' : (color() == 'secondary'),\r\n 'success-outline' : (color() == 'success'),\r\n 'warning-outline' : (color() == 'warning'),\r\n 'danger-outline' : (color() == 'danger'),\r\n 'navigation-outline' : (color() == 'navigation'),\r\n 'information-outline': (color() == 'information'),\r\n 'dark-outline' : (color() == 'dark'),\r\n 'light-outline' : (color() == 'light'),\r\n 'readonly' : (isDisabled() || isLoading()),\r\n 'cursor-wait' : isLoading()\r\n }\">\r\n <i [class]=\"_icon()\"></i>\r\n </button>\r\n }\r\n\r\n @else if (type() == 'icon-no-border') {\r\n <button mat-icon-button\r\n [id]=\"_id + '-inner-button'\"\r\n type=\"button\"\r\n (click)=\"_Click()\"\r\n [ngClass]=\"{\r\n 'primary-outline' : (color() == 'primary'),\r\n 'secondary-outline' : (color() == 'secondary'),\r\n 'success-outline' : (color() == 'success'),\r\n 'warning-outline' : (color() == 'warning'),\r\n 'danger-outline' : (color() == 'danger'),\r\n 'navigation-outline' : (color() == 'navigation'),\r\n 'information-outline': (color() == 'information'),\r\n 'dark-outline' : (color() == 'dark'),\r\n 'light-outline' : (color() == 'light'),\r\n 'readonly' : (isDisabled() || isLoading()),\r\n 'icon-no-border' : true\r\n }\">\r\n <i [class]=\"_icon()\"></i>\r\n </button>\r\n }\r\n }\r\n </a>\r\n</div>", styles: ["coer-button{display:contents!important}div.coer-button{display:contents!important}div.coer-button a{display:inline-block!important;height:fit-content!important;text-decoration:none!important}div.coer-button a.animate__disabled{animation-duration:0s!important}div.coer-button button{font-size:17px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;display:flex!important;align-items:center!important;justify-content:center!important}div.coer-button .slot{width:100px!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:visible!important}div.coer-button button.primary-filled{background-color:var(--primary-inner)!important;color:var(--white)!important}div.coer-button button.primary-outline{background-color:var(--white)!important;color:var(--primary-inner)!important;border:1px solid var(--primary-inner)!important}div.coer-button button.primary-filled:not(.readonly):focus,div.coer-button button.primary-outline:not(.readonly):focus{box-shadow:0 0 20px var(--primary-inner)!important}div.coer-button button.primary-filled:not(.readonly):hover,div.coer-button button.primary-filled:not(.readonly):focus,div.coer-button button.primary-outline:not(.readonly):hover,div.coer-button button.primary-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.secondary-filled{background-color:var(--secondary-inner)!important;color:var(--white)!important}div.coer-button button.secondary-outline{background-color:var(--white)!important;color:var(--secondary-inner)!important;border:1px solid var(--secondary-inner)!important}div.coer-button button.secondary-filled:not(.readonly):focus,div.coer-button button.secondary-outline:not(.readonly):focus{box-shadow:0 0 20px var(--secondary-inner)!important}div.coer-button button.secondary-filled:not(.readonly):hover,div.coer-button button.secondary-filled:not(.readonly):focus,div.coer-button button.secondary-outline:not(.readonly):hover,div.coer-button button.secondary-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.success-filled{background-color:var(--success-inner)!important;color:var(--white)!important}div.coer-button button.success-outline{background-color:var(--white)!important;color:var(--success-inner)!important;border:1px solid var(--success-inner)!important}div.coer-button button.success-filled:not(.readonly):focus,div.coer-button button.success-outline:not(.readonly):focus{box-shadow:0 0 20px var(--success-inner)!important}div.coer-button button.success-filled:not(.readonly):hover,div.coer-button button.success-filled:not(.readonly):focus,div.coer-button button.success-outline:not(.readonly):hover,div.coer-button button.success-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.warning-filled{background-color:var(--warning-inner)!important;color:var(--black)!important}div.coer-button button.warning-outline{background-color:var(--white)!important;color:var(--warning-inner)!important;border:1px solid var(--warning-inner)!important}div.coer-button button.warning-filled:not(.readonly):focus,div.coer-button button.warning-outline:not(.readonly):focus{box-shadow:0 0 20px var(--warning-inner)!important}div.coer-button button.warning-filled:not(.readonly):hover,div.coer-button button.warning-filled:not(.readonly):focus,div.coer-button button.warning-outline:not(.readonly):hover,div.coer-button button.warning-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.danger-filled{background-color:var(--danger-inner)!important;color:var(--white)!important}div.coer-button button.danger-outline{background-color:var(--white)!important;color:var(--danger-inner)!important;border:1px solid var(--danger-inner)!important}div.coer-button button.danger-filled:not(.readonly):focus,div.coer-button button.danger-outline:not(.readonly):focus{box-shadow:0 0 20px var(--danger-inner)!important}div.coer-button button.danger-filled:not(.readonly):hover,div.coer-button button.danger-filled:not(.readonly):focus,div.coer-button button.danger-outline:not(.readonly):hover,div.coer-button button.danger-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.navigation-filled{background-color:var(--navigation-inner)!important;color:var(--white)!important}div.coer-button button.navigation-outline{background-color:var(--white)!important;color:var(--navigation-inner)!important;border:1px solid var(--navigation-inner)!important}div.coer-button button.navigation-filled:not(.readonly):focus,div.coer-button button.navigation-outline:not(.readonly):focus{box-shadow:0 0 20px var(--navigation-inner)!important}div.coer-button button.navigation-filled:not(.readonly):hover,div.coer-button button.navigation-filled:not(.readonly):focus,div.coer-button button.navigation-outline:not(.readonly):hover,div.coer-button button.navigation-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.information-filled{background-color:var(--information-inner)!important;color:var(--white)!important}div.coer-button button.information-outline{background-color:var(--white)!important;color:var(--information-inner)!important;border:1px solid var(--information-inner)!important}div.coer-button button.information-filled:not(.readonly):focus,div.coer-button button.information-outline:not(.readonly):focus{box-shadow:0 0 20px var(--information-inner)!important}div.coer-button button.information-filled:not(.readonly):hover,div.coer-button button.information-filled:not(.readonly):focus,div.coer-button button.information-outline:not(.readonly):hover,div.coer-button button.information-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.dark-filled{background-color:var(--black)!important;color:var(--white)!important}div.coer-button button.dark-outline{background-color:var(--white)!important;color:var(--black)!important;border:1px solid var(--black)!important}div.coer-button button.dark-filled:not(.readonly):focus,div.coer-button button.dark-outline:not(.readonly):focus{box-shadow:0 0 20px var(--black)!important}div.coer-button button.dark-filled:not(.readonly):hover,div.coer-button button.dark-filled:not(.readonly):focus,div.coer-button button.dark-outline:not(.readonly):hover,div.coer-button button.dark-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.light-filled{background-color:var(--white)!important;color:var(--black)!important}div.coer-button button.light-outline{background-color:transparent!important;color:var(--white)!important;border:1px solid var(--white)!important}div.coer-button button.light-filled:not(.readonly):focus,div.coer-button button.light-outline:not(.readonly):focus{box-shadow:0 0 20px var(--white)!important}div.coer-button button.light-filled:not(.readonly):hover,div.coer-button button.light-filled:not(.readonly):focus,div.coer-button button.light-outline:not(.readonly):hover,div.coer-button button.light-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.mdc-icon-button.mat-mdc-icon-button{width:40px!important;height:40px!important;padding:0!important}div.coer-button button.mdc-icon-button.mat-mdc-icon-button.icon-no-border{width:25px!important;height:25px!important;background-color:transparent!important;border:none!important;overflow:visible!important}div.coer-button button.mdc-icon-button.mat-mdc-icon-button.icon-no-border *{font-size:medium!important}div.coer-button button.mdc-icon-button.mat-mdc-icon-button.icon-no-border i.bi-box-arrow-left,div.coer-button button.mdc-icon-button.mat-mdc-icon-button.icon-no-border i.bi-box-arrow-in-right{font-size:20px!important}div.coer-button button.readonly,div.coer-button button.readonly:hover,div.coer-button button.readonly:focus{background-color:#dfdede!important;border-color:#dfdede!important;color:var(--white)!important}div.coer-button coer-button[ishidden=true],div.coer-button coer-button[ng-reflect-invisible=true]{position:relative!important;top:10000vh;left:10000vw}div.coer-button a.loading{cursor:wait!important}div.coer-button i{display:flex!important;align-items:center!important;justify-content:center!important}div.coer-button i.spinner-border{width:15px!important;height:15px!important;font-size:16px!important}div.coer-button span{font-weight:700!important}div.coer-button .mat-mdc-button-touch-target{width:0px!important;height:0px!important}\n"] }]
|
252
|
-
}]
|
253
|
-
type: Input
|
254
|
-
}] } });
|
242
|
+
args: [{ selector: 'coer-button', standalone: false, template: "<div [ngClass]=\"{ 'coer-button': true }\">\r\n <a [routerLink]=\"(path().length > 0 && _isEnable()) ? path() : null\"\r\n [matTooltip]=\"_tooltip()\"\r\n [matTooltipPosition]=\"_tooltipPosition()\"\r\n [matTooltipDisabled]=\"!_isEnable()\"\r\n [matTooltipHideDelay]=\"0\"\r\n [ngClass]=\"{ 'loading': isLoading() }\"\r\n [ngStyle]=\"{ \r\n 'visibility' : (isInvisible() || isReadonly() ? 'hidden' : 'visible'),\r\n 'margin-top' : marginTop(), \r\n 'margin-right' : marginRight(), \r\n 'margin-bottom': marginBottom(), \r\n 'margin-left' : marginLeft() \r\n }\">\r\n \r\n @if(type() =='filled' || type() == 'outline') {\r\n <button mat-button type=\"button\" \r\n [id]=\"_id + '-inner-button'\"\r\n (click)=\"_Click()\"\r\n [class]=\"_buttonType()\"\r\n [ngStyle]=\"{\r\n 'width' : width(),\r\n 'min-width' : minWidth(),\r\n 'max-width' : maxWidth(),\r\n 'height' : height(),\r\n 'min-height': minHeight()\r\n }\">\r\n\r\n @if(!isLoading()) {\r\n <span class=\"slot\">\r\n @if(iconPosition() == 'left') { \r\n <i [class]=\"_icon()\"></i> \r\n }\r\n \r\n <span [ngClass]=\"{ \r\n 'ms-2': (iconPosition() == 'left' && _icon().length > 0), \r\n 'me-2': (iconPosition() == 'right' && _icon().length > 0) \r\n }\">\r\n <ng-content>Click</ng-content>\r\n </span>\r\n \r\n @if(iconPosition() == 'right') {\r\n <i [class]=\"_icon()\"></i>\r\n }\r\n </span>\r\n }\r\n\r\n @else {\r\n <span class=\"slot animation-appear\">\r\n <span class=\"me-2\"> Loading </span>\r\n <i class=\"icon-circle-notch animation-spin\"></i>\r\n </span> \r\n }\r\n </button>\r\n }\r\n\r\n @else {\r\n <button mat-icon-button\r\n [id]=\"_id + '-inner-button'\"\r\n type=\"button\"\r\n (click)=\"_Click()\"\r\n [class]=\"_buttonType()\">\r\n <i [class]=\"_icon()\"></i>\r\n </button>\r\n }\r\n </a>\r\n</div>", styles: ["coer-button{display:contents!important}div.coer-button{display:contents!important}div.coer-button a{display:inline-block!important;height:fit-content!important;text-decoration:none!important;color:var(--black)}div.coer-button button{font-size:17px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;display:flex!important;align-items:center!important;justify-content:center!important}div.coer-button .slot{width:100px!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:visible!important}div.coer-button button.default-filled{color:var(--black)!important;background-color:transparent!important}div.coer-button button.default-outline{color:var(--black)!important;border:1px solid var(--black)!important;background-color:transparent!important}div.coer-button button.default-filled:not(.readonly):focus,div.coer-button button.default-outline:not(.readonly):focus{box-shadow:0 0 20px transparent!important}div.coer-button button.default-filled:not(.readonly):hover,div.coer-button button.default-filled:not(.readonly):focus,div.coer-button button.default-outline:not(.readonly):hover,div.coer-button button.default-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.primary-filled{color:var(--white)!important;background-color:var(--primary-inner)!important}div.coer-button button.primary-outline{color:var(--primary-inner)!important;border:1px solid var(--primary-inner)!important;background-color:transparent!important}div.coer-button button.primary-filled:not(.readonly):focus,div.coer-button button.primary-outline:not(.readonly):focus{box-shadow:0 0 20px var(--primary-inner)!important}div.coer-button button.primary-filled:not(.readonly):hover,div.coer-button button.primary-filled:not(.readonly):focus,div.coer-button button.primary-outline:not(.readonly):hover,div.coer-button button.primary-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.secondary-filled{color:var(--white)!important;background-color:var(--secondary-inner)!important}div.coer-button button.secondary-outline{color:var(--secondary-inner)!important;border:1px solid var(--secondary-inner)!important;background-color:transparent!important}div.coer-button button.secondary-filled:not(.readonly):focus,div.coer-button button.secondary-outline:not(.readonly):focus{box-shadow:0 0 20px var(--secondary-inner)!important}div.coer-button button.secondary-filled:not(.readonly):hover,div.coer-button button.secondary-filled:not(.readonly):focus,div.coer-button button.secondary-outline:not(.readonly):hover,div.coer-button button.secondary-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.success-filled{color:var(--white)!important;background-color:var(--success-inner)!important}div.coer-button button.success-outline{color:var(--success-inner)!important;border:1px solid var(--success-inner)!important;background-color:transparent!important}div.coer-button button.success-filled:not(.readonly):focus,div.coer-button button.success-outline:not(.readonly):focus{box-shadow:0 0 20px var(--success-inner)!important}div.coer-button button.success-filled:not(.readonly):hover,div.coer-button button.success-filled:not(.readonly):focus,div.coer-button button.success-outline:not(.readonly):hover,div.coer-button button.success-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.warning-filled{color:var(--black)!important;background-color:var(--warning-inner)!important}div.coer-button button.warning-outline{color:var(--warning-inner)!important;border:1px solid var(--warning-inner)!important;background-color:transparent!important}div.coer-button button.warning-filled:not(.readonly):focus,div.coer-button button.warning-outline:not(.readonly):focus{box-shadow:0 0 20px var(--warning-inner)!important}div.coer-button button.warning-filled:not(.readonly):hover,div.coer-button button.warning-filled:not(.readonly):focus,div.coer-button button.warning-outline:not(.readonly):hover,div.coer-button button.warning-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.danger-filled{color:var(--white)!important;background-color:var(--danger-inner)!important}div.coer-button button.danger-outline{color:var(--danger-inner)!important;border:1px solid var(--danger-inner)!important;background-color:transparent!important}div.coer-button button.danger-filled:not(.readonly):focus,div.coer-button button.danger-outline:not(.readonly):focus{box-shadow:0 0 20px var(--danger-inner)!important}div.coer-button button.danger-filled:not(.readonly):hover,div.coer-button button.danger-filled:not(.readonly):focus,div.coer-button button.danger-outline:not(.readonly):hover,div.coer-button button.danger-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.navigation-filled{color:var(--white)!important;background-color:var(--navigation-inner)!important}div.coer-button button.navigation-outline{color:var(--navigation-inner)!important;border:1px solid var(--navigation-inner)!important;background-color:transparent!important}div.coer-button button.navigation-filled:not(.readonly):focus,div.coer-button button.navigation-outline:not(.readonly):focus{box-shadow:0 0 20px var(--navigation-inner)!important}div.coer-button button.navigation-filled:not(.readonly):hover,div.coer-button button.navigation-filled:not(.readonly):focus,div.coer-button button.navigation-outline:not(.readonly):hover,div.coer-button button.navigation-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.information-filled{color:var(--white)!important;background-color:var(--information-inner)!important}div.coer-button button.information-outline{color:var(--information-inner)!important;border:1px solid var(--information-inner)!important;background-color:transparent!important}div.coer-button button.information-filled:not(.readonly):focus,div.coer-button button.information-outline:not(.readonly):focus{box-shadow:0 0 20px var(--information-inner)!important}div.coer-button button.information-filled:not(.readonly):hover,div.coer-button button.information-filled:not(.readonly):focus,div.coer-button button.information-outline:not(.readonly):hover,div.coer-button button.information-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.dark-filled{color:var(--white)!important;background-color:var(--black)!important}div.coer-button button.dark-outline{color:var(--black)!important;border:1px solid var(--black)!important;background-color:transparent!important}div.coer-button button.dark-filled:not(.readonly):focus,div.coer-button button.dark-outline:not(.readonly):focus{box-shadow:0 0 20px var(--black)!important}div.coer-button button.dark-filled:not(.readonly):hover,div.coer-button button.dark-filled:not(.readonly):focus,div.coer-button button.dark-outline:not(.readonly):hover,div.coer-button button.dark-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.light-filled{color:var(--black)!important;background-color:var(--white)!important}div.coer-button button.light-outline{color:var(--white)!important;border:1px solid var(--white)!important;background-color:transparent!important}div.coer-button button.light-filled:not(.readonly):focus,div.coer-button button.light-outline:not(.readonly):focus{box-shadow:0 0 20px var(--white)!important}div.coer-button button.light-filled:not(.readonly):hover,div.coer-button button.light-filled:not(.readonly):focus,div.coer-button button.light-outline:not(.readonly):hover,div.coer-button button.light-outline:not(.readonly):focus{filter:brightness(1.1)!important}div.coer-button button.mdc-icon-button.mat-mdc-icon-button{width:40px!important;height:40px!important;padding:0!important}div.coer-button button.mdc-icon-button.mat-mdc-icon-button.icon-no-border{width:25px!important;height:25px!important;background-color:transparent!important;border:none!important;overflow:visible!important}div.coer-button button.mdc-icon-button.mat-mdc-icon-button.icon-no-border *{font-size:medium!important}div.coer-button button.mdc-icon-button.mat-mdc-icon-button.icon-no-border i.bi-box-arrow-left,div.coer-button button.mdc-icon-button.mat-mdc-icon-button.icon-no-border i.bi-box-arrow-in-right{font-size:20px!important}div.coer-button button.readonly,div.coer-button button.readonly:hover,div.coer-button button.readonly:focus{background-color:#dfdede!important;border-color:#dfdede!important;color:var(--white)!important}div.coer-button button.mdc-icon-button.mat-mdc-icon-button.icon-no-border.readonly{color:#dfdede!important}div.coer-button a.loading{cursor:wait!important}div.coer-button i{display:flex!important;align-items:center!important;justify-content:center!important}div.coer-button span{font-weight:700!important}div.coer-button .mat-mdc-button-touch-target{width:0px!important;height:0px!important}\n"] }]
|
243
|
+
}] });
|
255
244
|
|
256
245
|
class CoerCard {
|
257
246
|
constructor() {
|
@@ -268,20 +257,22 @@ class CoerCard {
|
|
268
257
|
this.email = input('');
|
269
258
|
}
|
270
259
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerCard, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
271
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerCard, isStandalone: false, selector: "coer-card", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, phone: { classPropertyName: "phone", publicName: "phone", isSignal: true, isRequired: false, transformFunction: null }, email: { classPropertyName: "email", publicName: "email", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<figure class=\"coer-container width-min-content\">\r\n <div class=\"flex-wrap gap-0px\"> \r\n @if(IsNotOnlyWhiteSpace(name()) || IsNotOnlyWhiteSpace(title())) {\r\n <div class=\"flex-item-grow-300px flex-middle-left\">\r\n @if(IsNotOnlyWhiteSpace(icon())) {\r\n <i [class]=\"icon() + ' ' + 'font-size-39px'\"></i>\r\n }\r\n\r\n <div>\r\n @if(IsNotOnlyWhiteSpace(name())) {\r\n <p class=\"white-space-nowrap\"> {{ name() }} </p> \r\n }\r\n @if(title()) {\r\n <p class=\"white-space-nowrap\"> {{ title() }} </p>\r\n }\r\n </div>\r\n </div>\r\n }\r\n\r\n @if (IsNotOnlyWhiteSpace(phone()) || IsNotOnlyWhiteSpace(email())) {\r\n <div class=\"flex-item-100 padding-top-5px\"></div>\r\n \r\n <div class=\"flex-item-100 padding-top-5px border-solid-top-2px\">\r\n <p class=\"flex-middle-left gap-20px\">\r\n @if(IsNotOnlyWhiteSpace(phone())) {\r\n <span class=\"flex-middle-left gap-5px\">\r\n <i class=\"coer-icon-whatsapp\"></i>\r\n <span> {{ phone() }} </span>\r\n </span>\r\n }\r\n\r\n @if(IsNotOnlyWhiteSpace(email())) {\r\n <span class=\"flex-middle-left gap-5px\">\r\n <i class=\"coer-icon-envelope\"></i>\r\n <span> {{ email() }} </span>\r\n </span>\r\n }\r\n </p>\r\n </div> \r\n }\r\n </div> \r\n</figure>" }); }
|
260
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerCard, isStandalone: false, selector: "coer-card", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, phone: { classPropertyName: "phone", publicName: "phone", isSignal: true, isRequired: false, transformFunction: null }, email: { classPropertyName: "email", publicName: "email", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<figure class=\"coer-container xs-width-min-content\">\r\n <div class=\"flex-wrap gap-0px\"> \r\n @if(IsNotOnlyWhiteSpace(name()) || IsNotOnlyWhiteSpace(title())) {\r\n <div class=\"flex-item-grow-300px flex-middle-left\">\r\n @if(IsNotOnlyWhiteSpace(icon())) {\r\n <i [class]=\"icon() + ' ' + 'font-size-39px'\"></i>\r\n }\r\n\r\n <div>\r\n @if(IsNotOnlyWhiteSpace(name())) {\r\n <p class=\"white-space-nowrap\"> {{ name() }} </p> \r\n }\r\n @if(title()) {\r\n <p class=\"white-space-nowrap\"> {{ title() }} </p>\r\n }\r\n </div>\r\n </div>\r\n }\r\n\r\n @if (IsNotOnlyWhiteSpace(phone()) || IsNotOnlyWhiteSpace(email())) {\r\n <div class=\"flex-item-100 padding-top-5px\"></div>\r\n \r\n <div class=\"flex-item-100 padding-top-5px border-solid-top-2px\">\r\n <p class=\"flex-middle-left gap-20px\">\r\n @if(IsNotOnlyWhiteSpace(phone())) {\r\n <span class=\"flex-middle-left gap-5px\">\r\n <i class=\"coer-icon-whatsapp\"></i>\r\n <span> {{ phone() }} </span>\r\n </span>\r\n }\r\n\r\n @if(IsNotOnlyWhiteSpace(email())) {\r\n <span class=\"flex-middle-left gap-5px\">\r\n <i class=\"coer-icon-envelope\"></i>\r\n <span> {{ email() }} </span>\r\n </span>\r\n }\r\n </p>\r\n </div> \r\n }\r\n </div> \r\n</figure>" }); }
|
272
261
|
}
|
273
262
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerCard, decorators: [{
|
274
263
|
type: Component,
|
275
|
-
args: [{ selector: 'coer-card', standalone: false, template: "<figure class=\"coer-container width-min-content\">\r\n <div class=\"flex-wrap gap-0px\"> \r\n @if(IsNotOnlyWhiteSpace(name()) || IsNotOnlyWhiteSpace(title())) {\r\n <div class=\"flex-item-grow-300px flex-middle-left\">\r\n @if(IsNotOnlyWhiteSpace(icon())) {\r\n <i [class]=\"icon() + ' ' + 'font-size-39px'\"></i>\r\n }\r\n\r\n <div>\r\n @if(IsNotOnlyWhiteSpace(name())) {\r\n <p class=\"white-space-nowrap\"> {{ name() }} </p> \r\n }\r\n @if(title()) {\r\n <p class=\"white-space-nowrap\"> {{ title() }} </p>\r\n }\r\n </div>\r\n </div>\r\n }\r\n\r\n @if (IsNotOnlyWhiteSpace(phone()) || IsNotOnlyWhiteSpace(email())) {\r\n <div class=\"flex-item-100 padding-top-5px\"></div>\r\n \r\n <div class=\"flex-item-100 padding-top-5px border-solid-top-2px\">\r\n <p class=\"flex-middle-left gap-20px\">\r\n @if(IsNotOnlyWhiteSpace(phone())) {\r\n <span class=\"flex-middle-left gap-5px\">\r\n <i class=\"coer-icon-whatsapp\"></i>\r\n <span> {{ phone() }} </span>\r\n </span>\r\n }\r\n\r\n @if(IsNotOnlyWhiteSpace(email())) {\r\n <span class=\"flex-middle-left gap-5px\">\r\n <i class=\"coer-icon-envelope\"></i>\r\n <span> {{ email() }} </span>\r\n </span>\r\n }\r\n </p>\r\n </div> \r\n }\r\n </div> \r\n</figure>" }]
|
264
|
+
args: [{ selector: 'coer-card', standalone: false, template: "<figure class=\"coer-container xs-width-min-content\">\r\n <div class=\"flex-wrap gap-0px\"> \r\n @if(IsNotOnlyWhiteSpace(name()) || IsNotOnlyWhiteSpace(title())) {\r\n <div class=\"flex-item-grow-300px flex-middle-left\">\r\n @if(IsNotOnlyWhiteSpace(icon())) {\r\n <i [class]=\"icon() + ' ' + 'font-size-39px'\"></i>\r\n }\r\n\r\n <div>\r\n @if(IsNotOnlyWhiteSpace(name())) {\r\n <p class=\"white-space-nowrap\"> {{ name() }} </p> \r\n }\r\n @if(title()) {\r\n <p class=\"white-space-nowrap\"> {{ title() }} </p>\r\n }\r\n </div>\r\n </div>\r\n }\r\n\r\n @if (IsNotOnlyWhiteSpace(phone()) || IsNotOnlyWhiteSpace(email())) {\r\n <div class=\"flex-item-100 padding-top-5px\"></div>\r\n \r\n <div class=\"flex-item-100 padding-top-5px border-solid-top-2px\">\r\n <p class=\"flex-middle-left gap-20px\">\r\n @if(IsNotOnlyWhiteSpace(phone())) {\r\n <span class=\"flex-middle-left gap-5px\">\r\n <i class=\"coer-icon-whatsapp\"></i>\r\n <span> {{ phone() }} </span>\r\n </span>\r\n }\r\n\r\n @if(IsNotOnlyWhiteSpace(email())) {\r\n <span class=\"flex-middle-left gap-5px\">\r\n <i class=\"coer-icon-envelope\"></i>\r\n <span> {{ email() }} </span>\r\n </span>\r\n }\r\n </p>\r\n </div> \r\n }\r\n </div> \r\n</figure>" }]
|
276
265
|
}] });
|
277
266
|
|
278
267
|
class CoerCheckbox extends ControlValue {
|
268
|
+
//Constructor
|
279
269
|
constructor() {
|
280
|
-
super(
|
270
|
+
super();
|
281
271
|
//Variables
|
282
272
|
this._value = false;
|
283
273
|
this._id = Tools.GetGuid('coer-checkbox');
|
284
274
|
this._isLoading = true;
|
275
|
+
//Inputs
|
285
276
|
this.id = input('');
|
286
277
|
this.label = input('');
|
287
278
|
this.labelPosition = input('after');
|
@@ -290,26 +281,25 @@ class CoerCheckbox extends ControlValue {
|
|
290
281
|
this.isReadonly = input(false);
|
291
282
|
this.isInvisible = input(false);
|
292
283
|
this.ignoreDataBinding = input(false);
|
284
|
+
this.value = input(false);
|
293
285
|
//Outputs
|
294
286
|
this.onChange = output();
|
295
287
|
//computed
|
296
288
|
this._isEnable = computed(() => {
|
297
289
|
return !this.isLoading() && !this.isDisabled() && !this.isInvisible() && !this.isReadonly();
|
298
290
|
});
|
291
|
+
this._effect = effect(() => {
|
292
|
+
this.SetValue(Tools.IsNotNull(this.value()) ? this.value() : false);
|
293
|
+
});
|
299
294
|
}
|
300
|
-
//
|
301
|
-
set value(value) {
|
302
|
-
if (Tools.IsNull(value))
|
303
|
-
value = false;
|
304
|
-
this.SetValue(value);
|
305
|
-
}
|
306
|
-
//getter
|
307
|
-
get value() {
|
308
|
-
return this._value;
|
309
|
-
}
|
295
|
+
//AfterViewInit
|
310
296
|
ngAfterViewInit() {
|
311
297
|
Tools.Sleep().then(_ => this._isLoading = false);
|
312
298
|
}
|
299
|
+
//OnDestroy
|
300
|
+
ngOnDestroy() {
|
301
|
+
this._effect?.destroy();
|
302
|
+
}
|
313
303
|
//ControlValueAccessor
|
314
304
|
SetValue(value) {
|
315
305
|
if (Tools.IsNotNull(value)) {
|
@@ -343,29 +333,27 @@ class CoerCheckbox extends ControlValue {
|
|
343
333
|
this.SetValue(false);
|
344
334
|
}
|
345
335
|
}
|
346
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerCheckbox, deps:
|
347
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.1", type: CoerCheckbox, isStandalone: false, selector: "coer-checkbox", inputs: {
|
336
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerCheckbox, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
337
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.1", type: CoerCheckbox, isStandalone: false, selector: "coer-checkbox", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: true, isRequired: false, transformFunction: null }, isInvisible: { classPropertyName: "isInvisible", publicName: "isInvisible", isSignal: true, isRequired: false, transformFunction: null }, ignoreDataBinding: { classPropertyName: "ignoreDataBinding", publicName: "ignoreDataBinding", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onChange: "onChange" }, providers: [CONTROL_VALUE(CoerCheckbox)], usesInheritance: true, ngImport: i0, template: "<div [ngClass]=\"{ 'coer-checkbox': true, 'placeholder-glow': isLoading(), 'invisible': isInvisible() }\">\r\n <div [id]=\"_id\" [ngClass]=\"{ 'placeholder': isLoading() }\">\r\n <mat-checkbox\r\n [ngModel]=\"_value\"\r\n [indeterminate]=\"false\"\r\n [labelPosition]=\"labelPosition()\"\r\n [disabled]=\"!_isEnable()\"\r\n (change)=\"this.SetValue($event.checked)\"\r\n > {{ label() }} </mat-checkbox>\r\n </div>\r\n</div>", styles: ["div.coer-checkbox{display:inline-flex!important}div.coer-checkbox mat-checkbox div.mdc-form-field.mat-internal-form-field div.mdc-checkbox{padding:10px!important}div.coer-checkbox mat-checkbox div.mdc-form-field.mat-internal-form-field div.mdc-checkbox div.mdc-checkbox__background{background-color:var(--smoke)!important;border-radius:5px!important}div.coer-checkbox mat-checkbox div.mdc-form-field.mat-internal-form-field div.mdc-checkbox div.mdc-checkbox__ripple{width:30px!important;height:30px!important;top:5px!important;left:5px!important}div.coer-checkbox mat-checkbox div.mdc-form-field.mat-internal-form-field div.mdc-checkbox div.mat-ripple.mat-mdc-checkbox-ripple.mat-mdc-focus-indicator *{display:none!important}div.coer-checkbox mat-checkbox div.mdc-form-field.mat-internal-form-field label.mdc-label{padding-top:3px!important;padding-left:0!important}div.coer-checkbox mat-checkbox div.mdc-form-field.mat-internal-form-field label.mdc-label::selection{background-color:transparent!important}div.coer-checkbox mat-checkbox.mat-mdc-checkbox-checked div.mdc-form-field.mat-internal-form-field div.mdc-checkbox div.mdc-checkbox__background{background-color:var(--primary-inner)!important;border-color:var(--primary-inner)!important}coer-grid table tbody tr td.check-box mat-checkbox div.mdc-form-field.mat-internal-form-field div.mdc-checkbox,coer-grid table tbody tr td.check-box mat-checkbox.mat-mdc-checkbox-checked div.mdc-form-field.mat-internal-form-field div.mdc-checkbox{padding:0!important}coer-grid table tbody tr td.check-box mat-checkbox div.mdc-form-field.mat-internal-form-field div.mdc-checkbox div.mat-mdc-checkbox-touch-target,coer-grid table tbody tr td.check-box mat-checkbox.mat-mdc-checkbox-checked div.mdc-form-field.mat-internal-form-field div.mdc-checkbox div.mat-mdc-checkbox-touch-target{top:8px!important;width:39px!important;height:30px!important}coer-grid table tbody tr td.check-box mat-checkbox div.mdc-form-field.mat-internal-form-field div.mdc-checkbox input,coer-grid table tbody tr td.check-box mat-checkbox.mat-mdc-checkbox-checked div.mdc-form-field.mat-internal-form-field div.mdc-checkbox input{display:none!important}coer-grid table tbody tr td.check-box mat-checkbox div.mdc-form-field.mat-internal-form-field div.mdc-checkbox div.mdc-checkbox__ripple,coer-grid table tbody tr td.check-box mat-checkbox.mat-mdc-checkbox-checked div.mdc-form-field.mat-internal-form-field div.mdc-checkbox div.mdc-checkbox__ripple{top:-7px!important;left:-6px!important}coer-grid table tbody tr td.check-box mat-checkbox div.mdc-form-field.mat-internal-form-field div.mdc-checkbox div.mdc-checkbox__background,coer-grid table tbody tr td.check-box mat-checkbox.mat-mdc-checkbox-checked div.mdc-form-field.mat-internal-form-field div.mdc-checkbox div.mdc-checkbox__background{transform:translateY(-1px)!important;position:static!important}coer-grid table tbody tr td.check-box mat-checkbox div.mdc-form-field.mat-internal-form-field label.mdc-label,coer-grid table tbody tr td.check-box mat-checkbox.mat-mdc-checkbox-checked div.mdc-form-field.mat-internal-form-field label.mdc-label{display:none!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }] }); }
|
348
338
|
}
|
349
339
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerCheckbox, decorators: [{
|
350
340
|
type: Component,
|
351
341
|
args: [{ selector: 'coer-checkbox', providers: [CONTROL_VALUE(CoerCheckbox)], standalone: false, template: "<div [ngClass]=\"{ 'coer-checkbox': true, 'placeholder-glow': isLoading(), 'invisible': isInvisible() }\">\r\n <div [id]=\"_id\" [ngClass]=\"{ 'placeholder': isLoading() }\">\r\n <mat-checkbox\r\n [ngModel]=\"_value\"\r\n [indeterminate]=\"false\"\r\n [labelPosition]=\"labelPosition()\"\r\n [disabled]=\"!_isEnable()\"\r\n (change)=\"this.SetValue($event.checked)\"\r\n > {{ label() }} </mat-checkbox>\r\n </div>\r\n</div>", styles: ["div.coer-checkbox{display:inline-flex!important}div.coer-checkbox mat-checkbox div.mdc-form-field.mat-internal-form-field div.mdc-checkbox{padding:10px!important}div.coer-checkbox mat-checkbox div.mdc-form-field.mat-internal-form-field div.mdc-checkbox div.mdc-checkbox__background{background-color:var(--smoke)!important;border-radius:5px!important}div.coer-checkbox mat-checkbox div.mdc-form-field.mat-internal-form-field div.mdc-checkbox div.mdc-checkbox__ripple{width:30px!important;height:30px!important;top:5px!important;left:5px!important}div.coer-checkbox mat-checkbox div.mdc-form-field.mat-internal-form-field div.mdc-checkbox div.mat-ripple.mat-mdc-checkbox-ripple.mat-mdc-focus-indicator *{display:none!important}div.coer-checkbox mat-checkbox div.mdc-form-field.mat-internal-form-field label.mdc-label{padding-top:3px!important;padding-left:0!important}div.coer-checkbox mat-checkbox div.mdc-form-field.mat-internal-form-field label.mdc-label::selection{background-color:transparent!important}div.coer-checkbox mat-checkbox.mat-mdc-checkbox-checked div.mdc-form-field.mat-internal-form-field div.mdc-checkbox div.mdc-checkbox__background{background-color:var(--primary-inner)!important;border-color:var(--primary-inner)!important}coer-grid table tbody tr td.check-box mat-checkbox div.mdc-form-field.mat-internal-form-field div.mdc-checkbox,coer-grid table tbody tr td.check-box mat-checkbox.mat-mdc-checkbox-checked div.mdc-form-field.mat-internal-form-field div.mdc-checkbox{padding:0!important}coer-grid table tbody tr td.check-box mat-checkbox div.mdc-form-field.mat-internal-form-field div.mdc-checkbox div.mat-mdc-checkbox-touch-target,coer-grid table tbody tr td.check-box mat-checkbox.mat-mdc-checkbox-checked div.mdc-form-field.mat-internal-form-field div.mdc-checkbox div.mat-mdc-checkbox-touch-target{top:8px!important;width:39px!important;height:30px!important}coer-grid table tbody tr td.check-box mat-checkbox div.mdc-form-field.mat-internal-form-field div.mdc-checkbox input,coer-grid table tbody tr td.check-box mat-checkbox.mat-mdc-checkbox-checked div.mdc-form-field.mat-internal-form-field div.mdc-checkbox input{display:none!important}coer-grid table tbody tr td.check-box mat-checkbox div.mdc-form-field.mat-internal-form-field div.mdc-checkbox div.mdc-checkbox__ripple,coer-grid table tbody tr td.check-box mat-checkbox.mat-mdc-checkbox-checked div.mdc-form-field.mat-internal-form-field div.mdc-checkbox div.mdc-checkbox__ripple{top:-7px!important;left:-6px!important}coer-grid table tbody tr td.check-box mat-checkbox div.mdc-form-field.mat-internal-form-field div.mdc-checkbox div.mdc-checkbox__background,coer-grid table tbody tr td.check-box mat-checkbox.mat-mdc-checkbox-checked div.mdc-form-field.mat-internal-form-field div.mdc-checkbox div.mdc-checkbox__background{transform:translateY(-1px)!important;position:static!important}coer-grid table tbody tr td.check-box mat-checkbox div.mdc-form-field.mat-internal-form-field label.mdc-label,coer-grid table tbody tr td.check-box mat-checkbox.mat-mdc-checkbox-checked div.mdc-form-field.mat-internal-form-field label.mdc-label{display:none!important}\n"] }]
|
352
|
-
}],
|
353
|
-
type: Input
|
354
|
-
}] } });
|
342
|
+
}], ctorParameters: () => [] });
|
355
343
|
|
356
344
|
class CoerDateBox extends ControlValue {
|
345
|
+
//Constructor
|
357
346
|
constructor() {
|
358
|
-
super(
|
359
|
-
//Component Value
|
360
|
-
this._value = null;
|
361
|
-
this.matFormField = viewChild.required('matFormField');
|
362
|
-
this.coerTextBox = viewChild.required('coerTextBox');
|
347
|
+
super();
|
363
348
|
//Variables
|
349
|
+
this._value = null;
|
364
350
|
this._id = Tools.GetGuid('coer-datebox');
|
365
351
|
this._datepicker = viewChild('datepicker');
|
366
352
|
this._isLoadingEvent = signal(false);
|
367
353
|
this._isOpen = false;
|
354
|
+
//Inputs
|
368
355
|
this.id = input('');
|
356
|
+
this.value = input(null);
|
369
357
|
this.label = input('');
|
370
358
|
this.placeholder = input('');
|
371
359
|
this.textPosition = input('left');
|
@@ -399,21 +387,42 @@ class CoerDateBox extends ControlValue {
|
|
399
387
|
this._isEnable = computed(() => {
|
400
388
|
return !this.isDisabled() && !this.isLoading() && !this.isReadonly() && !this.isInvisible();
|
401
389
|
});
|
390
|
+
this._effect = effect(() => {
|
391
|
+
this.SetValue(Tools.IsNotNull(this.value()) ? this.value() : null);
|
392
|
+
});
|
402
393
|
}
|
403
|
-
//
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
394
|
+
//AfterViewInit
|
395
|
+
ngAfterViewInit() {
|
396
|
+
Tools.Sleep().then(() => {
|
397
|
+
//input
|
398
|
+
this._input = document.getElementById(this._id);
|
399
|
+
if (this._input) {
|
400
|
+
this._input.addEventListener('focus', () => this._Blur());
|
401
|
+
this._input.addEventListener('blur', () => this._Blur());
|
402
|
+
}
|
403
|
+
//container
|
404
|
+
this._container = document.getElementById(`${this._id}-container`);
|
405
|
+
if (this._container) {
|
406
|
+
this._container.addEventListener('click', (event) => {
|
407
|
+
event.stopPropagation();
|
408
|
+
event.preventDefault();
|
409
|
+
this.Open();
|
410
|
+
});
|
411
|
+
}
|
412
|
+
//pickerButton
|
413
|
+
this._pickerButton = document.querySelector(`#${this._id}-container .mat-mdc-form-field-icon-suffix button`);
|
414
|
+
if (this._pickerButton) {
|
415
|
+
this._pickerButton.addEventListener('click', (event) => {
|
416
|
+
event.stopPropagation();
|
417
|
+
event.preventDefault();
|
418
|
+
this.Open();
|
419
|
+
});
|
420
|
+
}
|
421
|
+
});
|
411
422
|
}
|
412
|
-
//
|
413
|
-
|
414
|
-
|
415
|
-
? Dates.GetFormatDB(this._value)
|
416
|
-
: null;
|
423
|
+
//OnDestroy
|
424
|
+
ngOnDestroy() {
|
425
|
+
this._effect?.destroy();
|
417
426
|
}
|
418
427
|
//getter
|
419
428
|
get isOpen() {
|
@@ -452,55 +461,27 @@ class CoerDateBox extends ControlValue {
|
|
452
461
|
}
|
453
462
|
}
|
454
463
|
/** */
|
455
|
-
|
456
|
-
Tools.Sleep().then(() => {
|
457
|
-
//input
|
458
|
-
this._input = document.getElementById(this._id);
|
459
|
-
if (this._input) {
|
460
|
-
this._input.addEventListener('focus', () => this._Blur());
|
461
|
-
this._input.addEventListener('blur', () => this._Blur());
|
462
|
-
}
|
463
|
-
//container
|
464
|
-
this._container = document.getElementById(`${this._id}-container`);
|
465
|
-
if (this._container) {
|
466
|
-
this._container.addEventListener('click', (event) => {
|
467
|
-
event.stopPropagation();
|
468
|
-
event.preventDefault();
|
469
|
-
this.Open();
|
470
|
-
});
|
471
|
-
}
|
472
|
-
//pickerButton
|
473
|
-
this._pickerButton = document.querySelector(`#${this._id}-container .mat-mdc-form-field-icon-suffix button`);
|
474
|
-
if (this._pickerButton) {
|
475
|
-
this._pickerButton.addEventListener('click', (event) => {
|
476
|
-
event.stopPropagation();
|
477
|
-
event.preventDefault();
|
478
|
-
this.Open();
|
479
|
-
});
|
480
|
-
}
|
481
|
-
});
|
482
|
-
}
|
483
|
-
/** */
|
484
|
-
async _Blur() {
|
464
|
+
_Blur() {
|
485
465
|
if (this._isLoadingEvent())
|
486
466
|
return;
|
487
467
|
else
|
488
468
|
this._isLoadingEvent.set(true);
|
489
469
|
this._isOpen = false;
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
470
|
+
Tools.Sleep().then(_ => {
|
471
|
+
if (this._input) {
|
472
|
+
this._input.blur();
|
473
|
+
Tools.Sleep().then(_ => {
|
474
|
+
const element = document.querySelector(`#${this._id}-container .mdc-line-ripple--active`);
|
475
|
+
if (element)
|
476
|
+
element.classList.remove('mdc-line-ripple--active');
|
477
|
+
});
|
478
|
+
}
|
479
|
+
this._isLoadingEvent.set(false);
|
480
|
+
});
|
500
481
|
}
|
501
482
|
/** */
|
502
483
|
Open() {
|
503
|
-
if (this._isEnable() &&
|
484
|
+
if (this._isEnable() && this.isClose) {
|
504
485
|
this._datepicker()?.open();
|
505
486
|
this._isOpen = true;
|
506
487
|
this.onOpen.emit();
|
@@ -520,29 +501,27 @@ class CoerDateBox extends ControlValue {
|
|
520
501
|
Unselect() {
|
521
502
|
this.SetValue(null);
|
522
503
|
}
|
523
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerDateBox, deps:
|
524
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerDateBox, isStandalone: false, selector: "coer-datebox", inputs: {
|
504
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerDateBox, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
505
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerDateBox, isStandalone: false, selector: "coer-datebox", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, textPosition: { classPropertyName: "textPosition", publicName: "textPosition", isSignal: true, isRequired: false, transformFunction: null }, isInvalid: { classPropertyName: "isInvalid", publicName: "isInvalid", isSignal: true, isRequired: false, transformFunction: null }, isValid: { classPropertyName: "isValid", publicName: "isValid", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: true, isRequired: false, transformFunction: null }, isInvisible: { classPropertyName: "isInvisible", publicName: "isInvisible", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, marginTop: { classPropertyName: "marginTop", publicName: "marginTop", isSignal: true, isRequired: false, transformFunction: null }, marginRight: { classPropertyName: "marginRight", publicName: "marginRight", isSignal: true, isRequired: false, transformFunction: null }, marginBottom: { classPropertyName: "marginBottom", publicName: "marginBottom", isSignal: true, isRequired: false, transformFunction: null }, marginLeft: { classPropertyName: "marginLeft", publicName: "marginLeft", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onOpen: "onOpen", onClose: "onClose", onChangeValue: "onChangeValue" }, providers: [
|
525
506
|
provideNativeDateAdapter(),
|
526
507
|
CONTROL_VALUE(CoerDateBox),
|
527
|
-
], viewQueries: [{ propertyName: "
|
508
|
+
], viewQueries: [{ propertyName: "_datepicker", first: true, predicate: ["datepicker"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"coer-date-box\">\r\n <mat-form-field\r\n [id]=\"_id + '-container'\"\r\n [floatLabel]=\"_floatLabel()\"\r\n [ngClass]=\"{\r\n 'readonly': isReadonly() && !isLoading(),\r\n 'd-none': isInvisible()\r\n }\"\r\n [style]=\"{\r\n 'width': width(),\r\n 'min-width': minWidth(),\r\n 'max-width': maxWidth(),\r\n 'margin-top': marginTop(),\r\n 'margin-right': marginRight(),\r\n 'margin-bottom': marginBottom(),\r\n 'margin-left': marginLeft(), \r\n }\">\r\n\r\n <mat-label> {{ label() }} </mat-label>\r\n \r\n <input #coerTextBox matInput \r\n [id]=\"_id\"\r\n [placeholder]=\"placeholder()\"\r\n [matDatepicker]=\"datepicker\" \r\n [disabled]=\"!_isEnable()\"\r\n [readonly]=\"true\"\r\n [value]=\"_value\"\r\n (dateChange)=\"SetValue(coerTextBox.value)\"\r\n [style]=\"{\r\n 'cursor' : isLoading() ? 'wait' : 'pointer',\r\n 'margin-top' : (_floatLabel() == 'auto') ? '15px' : '9px',\r\n 'padding-right': _paddingRight(),\r\n 'text-align' : textPosition()\r\n }\">\r\n \r\n <mat-datepicker #datepicker (closed)=\"Close()\"/>\r\n\r\n @if(!isLoading()) { \r\n <mat-datepicker-toggle \r\n matSuffix\r\n [for]=\"datepicker\" \r\n [disabled]=\"!_isEnable()\">\r\n <mat-icon matDatepickerToggleIcon>\r\n <i class=\"fa-solid fa-calendar-days\"></i>\r\n </mat-icon>\r\n </mat-datepicker-toggle>\r\n }\r\n\r\n @if(isLoading()) {\r\n <div class=\"placeholder-glow\">\r\n <span class=\"placeholder\"></span>\r\n </div>\r\n }\r\n\r\n @if(isInvalid() || isValid()) {\r\n <span ngClass=\"icon-container\">\r\n @if(isInvalid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-exclamation\"></i>\r\n }\r\n \r\n @else if(isValid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-check text-green\"></i>\r\n }\r\n </span>\r\n }\r\n </mat-form-field> \r\n\r\n @if(isInvisible()) {\r\n <mat-form-field class=\"invisible\">\r\n <input matInput [disabled]=\"true\"> \r\n </mat-form-field> \r\n }\r\n</div> ", styles: ["div.coer-date-box{display:flex;align-items:center}div.coer-date-box mat-form-field{position:relative!important}div.coer-date-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex{height:40px!important}div.coer-date-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{width:100%!important;height:40px!important;padding:0!important}div.coer-date-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label{overflow:visible!important;position:absolute!important;top:20px!important}div.coer-date-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label.mdc-floating-label--float-above mat-label{color:var(--primary-inner);font-weight:700;position:relative;left:-10px;top:2px}div.coer-date-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input{font-weight:400!important;font-size:17px!important;color:var(--black)!important}div.coer-date-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active,div.coer-date-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:before,div.coer-date-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:after{border-bottom-color:var(--primary-inner)!important}div.coer-date-box mat-form-field div.mat-mdc-form-field-subscript-wrapper.mat-mdc-form-field-bottom-align{height:0px!important}div.coer-date-box mat-form-field span.icon-container{position:absolute!important;top:1px!important;right:-14px!important;z-index:5!important;width:30px;height:40px;display:flex;align-items:center;justify-content:center}div.coer-date-box mat-form-field span.icon-container i{font-size:20px!important}div.coer-date-box mat-form-field span.icon-container i.fa-solid.fa-xmark,div.coer-date-box mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass{color:#caced1!important;cursor:pointer!important}div.coer-date-box mat-form-field span.icon-container i.fa-solid.fa-xmark:hover,div.coer-date-box mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass:hover{color:#6c757d!important}div.coer-date-box mat-form-field span.icon-container i.fa-solid.fa-circle-check{color:var(--green)!important}div.coer-date-box mat-form-field span.icon-container i.fa-solid.fa-circle-exclamation{color:var(--red)!important}div.coer-date-box mat-form-field span.placeholder{width:calc(100% + 32px)!important;height:40px!important;position:absolute!important;z-index:1!important;top:0!important;left:-16px!important;cursor:wait!important}div.coer-date-box mat-form-field .placeholder,div.coer-date-box mat-form-field .placeholder *,div.coer-date-box mat-form-field .placeholder-glow,div.coer-date-box mat-form-field .placeholder-glow *{cursor:wait!important}div.coer-date-box mat-form-field.readonly div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:#bbbbbb83!important}div.coer-date-box div.button-container{width:40px!important;height:40px!important;display:flex!important;align-items:center!important;justify-content:center!important;background-color:#e6e7e9!important}div.coer-date-box .mat-datepicker-toggle-active *{color:var(--primary-inner)!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:transparent!important;padding-left:9px!important;padding-right:9px!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple,coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple:before,coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple:after{border-bottom-color:transparent!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex{height:28px!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{height:28px!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input{margin-top:3px!important;font-size:14px!important}coer-grid table tbody tr td.coer-textbox mat-form-field span.icon-container{transform:translate(-5px,-6px)!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2$3.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i2$3.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i2$3.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: i2$3.MatDatepickerToggleIcon, selector: "[matDatepickerToggleIcon]" }, { kind: "component", type: i2$4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i3$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }] }); }
|
528
509
|
}
|
529
510
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerDateBox, decorators: [{
|
530
511
|
type: Component,
|
531
512
|
args: [{ selector: 'coer-datebox', providers: [
|
532
513
|
provideNativeDateAdapter(),
|
533
514
|
CONTROL_VALUE(CoerDateBox),
|
534
|
-
], standalone: false, template: "<div class=\"coer-date-box\">\r\n <mat-form-field\r\n [id]=\"_id + '-container'\"\r\n [floatLabel]=\"_floatLabel()\"\r\n [ngClass]=\"{\r\n 'readonly': isReadonly() && !isLoading(),\r\n 'd-none': isInvisible()\r\n }\"\r\n [style]=\"{\r\n 'width': width(),\r\n 'min-width': minWidth(),\r\n 'max-width': maxWidth(),\r\n 'margin-top': marginTop(),\r\n 'margin-right': marginRight(),\r\n 'margin-bottom': marginBottom(),\r\n 'margin-left': marginLeft(), \r\n }\">\r\n\r\n <mat-label> {{ label() }} </mat-label>\r\n \r\n <input #coerTextBox matInput \r\n [id]=\"_id\"\r\n [placeholder]=\"placeholder()\"\r\n [matDatepicker]=\"datepicker\" \r\n [disabled]=\"!_isEnable()\"\r\n [readonly]=\"true\"\r\n [value]=\"_value\"\r\n (dateChange)=\"SetValue(coerTextBox.value)\"\r\n [style]=\"{\r\n 'cursor': isLoading() ? 'wait' : 'pointer',\r\n 'margin-top': (_floatLabel() == 'auto') ? '15px' : '9px',\r\n 'padding-right': _paddingRight(),\r\n 'text-align': textPosition()\r\n }\">\r\n \r\n <mat-datepicker #datepicker (closed)=\"Close()\"/>\r\n\r\n @if(!isLoading()) { \r\n <mat-datepicker-toggle \r\n matSuffix\r\n [for]=\"datepicker\" \r\n [disabled]=\"!_isEnable()\">\r\n <mat-icon matDatepickerToggleIcon>\r\n <i class=\"fa-solid fa-calendar-days\"></i>\r\n </mat-icon>\r\n </mat-datepicker-toggle>\r\n }\r\n\r\n @if(isLoading()) {\r\n <div class=\"placeholder-glow\">\r\n <span class=\"placeholder\"></span>\r\n </div>\r\n }\r\n\r\n @if(isInvalid() || isValid()) {\r\n <span ngClass=\"icon-container\">\r\n @if(isInvalid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-exclamation\"></i>\r\n }\r\n \r\n @else if(isValid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-check text-green\"></i>\r\n }\r\n </span>\r\n }\r\n </mat-form-field> \r\n\r\n @if(isInvisible()) {\r\n <mat-form-field class=\"invisible\">\r\n <input matInput [disabled]=\"true\"> \r\n </mat-form-field> \r\n }\r\n</div> ", styles: ["div.coer-date-box{display:flex;align-items:center}div.coer-date-box mat-form-field{position:relative!important}div.coer-date-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex{height:40px!important}div.coer-date-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{width:100%!important;height:40px!important;padding:0!important}div.coer-date-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label{overflow:visible!important;position:absolute!important;top:20px!important}div.coer-date-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label.mdc-floating-label--float-above mat-label{color:var(--primary-inner);font-weight:700;position:relative;left:-10px;top:2px}div.coer-date-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input{font-weight:400!important;font-size:17px!important;color:var(--black)!important}div.coer-date-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active,div.coer-date-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:before,div.coer-date-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:after{border-bottom-color:var(--primary-inner)!important}div.coer-date-box mat-form-field div.mat-mdc-form-field-subscript-wrapper.mat-mdc-form-field-bottom-align{height:0px!important}div.coer-date-box mat-form-field span.icon-container{position:absolute!important;top:1px!important;right:-14px!important;z-index:5!important;width:30px;height:40px;display:flex;align-items:center;justify-content:center}div.coer-date-box mat-form-field span.icon-container i{font-size:20px!important}div.coer-date-box mat-form-field span.icon-container i.fa-solid.fa-xmark,div.coer-date-box mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass{color:#caced1!important;cursor:pointer!important}div.coer-date-box mat-form-field span.icon-container i.fa-solid.fa-xmark:hover,div.coer-date-box mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass:hover{color:#6c757d!important}div.coer-date-box mat-form-field span.icon-container i.fa-solid.fa-circle-check{color:var(--green)!important}div.coer-date-box mat-form-field span.icon-container i.fa-solid.fa-circle-exclamation{color:var(--red)!important}div.coer-date-box mat-form-field span.placeholder{width:calc(100% + 32px)!important;height:40px!important;position:absolute!important;z-index:1!important;top:0!important;left:-16px!important;cursor:wait!important}div.coer-date-box mat-form-field .placeholder,div.coer-date-box mat-form-field .placeholder *,div.coer-date-box mat-form-field .placeholder-glow,div.coer-date-box mat-form-field .placeholder-glow *{cursor:wait!important}div.coer-date-box mat-form-field.readonly div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:#bbbbbb83!important}div.coer-date-box div.button-container{width:40px!important;height:40px!important;display:flex!important;align-items:center!important;justify-content:center!important;background-color:#e6e7e9!important}div.coer-date-box .mat-datepicker-toggle-active *{color:var(--primary-inner)!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:transparent!important;padding-left:9px!important;padding-right:9px!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple,coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple:before,coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple:after{border-bottom-color:transparent!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex{height:28px!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{height:28px!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input{margin-top:3px!important;font-size:14px!important}coer-grid table tbody tr td.coer-textbox mat-form-field span.icon-container{transform:translate(-5px,-6px)!important}\n"] }]
|
535
|
-
}],
|
536
|
-
type: Input
|
537
|
-
}] } });
|
515
|
+
], standalone: false, template: "<div class=\"coer-date-box\">\r\n <mat-form-field\r\n [id]=\"_id + '-container'\"\r\n [floatLabel]=\"_floatLabel()\"\r\n [ngClass]=\"{\r\n 'readonly': isReadonly() && !isLoading(),\r\n 'd-none': isInvisible()\r\n }\"\r\n [style]=\"{\r\n 'width': width(),\r\n 'min-width': minWidth(),\r\n 'max-width': maxWidth(),\r\n 'margin-top': marginTop(),\r\n 'margin-right': marginRight(),\r\n 'margin-bottom': marginBottom(),\r\n 'margin-left': marginLeft(), \r\n }\">\r\n\r\n <mat-label> {{ label() }} </mat-label>\r\n \r\n <input #coerTextBox matInput \r\n [id]=\"_id\"\r\n [placeholder]=\"placeholder()\"\r\n [matDatepicker]=\"datepicker\" \r\n [disabled]=\"!_isEnable()\"\r\n [readonly]=\"true\"\r\n [value]=\"_value\"\r\n (dateChange)=\"SetValue(coerTextBox.value)\"\r\n [style]=\"{\r\n 'cursor' : isLoading() ? 'wait' : 'pointer',\r\n 'margin-top' : (_floatLabel() == 'auto') ? '15px' : '9px',\r\n 'padding-right': _paddingRight(),\r\n 'text-align' : textPosition()\r\n }\">\r\n \r\n <mat-datepicker #datepicker (closed)=\"Close()\"/>\r\n\r\n @if(!isLoading()) { \r\n <mat-datepicker-toggle \r\n matSuffix\r\n [for]=\"datepicker\" \r\n [disabled]=\"!_isEnable()\">\r\n <mat-icon matDatepickerToggleIcon>\r\n <i class=\"fa-solid fa-calendar-days\"></i>\r\n </mat-icon>\r\n </mat-datepicker-toggle>\r\n }\r\n\r\n @if(isLoading()) {\r\n <div class=\"placeholder-glow\">\r\n <span class=\"placeholder\"></span>\r\n </div>\r\n }\r\n\r\n @if(isInvalid() || isValid()) {\r\n <span ngClass=\"icon-container\">\r\n @if(isInvalid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-exclamation\"></i>\r\n }\r\n \r\n @else if(isValid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-check text-green\"></i>\r\n }\r\n </span>\r\n }\r\n </mat-form-field> \r\n\r\n @if(isInvisible()) {\r\n <mat-form-field class=\"invisible\">\r\n <input matInput [disabled]=\"true\"> \r\n </mat-form-field> \r\n }\r\n</div> ", styles: ["div.coer-date-box{display:flex;align-items:center}div.coer-date-box mat-form-field{position:relative!important}div.coer-date-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex{height:40px!important}div.coer-date-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{width:100%!important;height:40px!important;padding:0!important}div.coer-date-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label{overflow:visible!important;position:absolute!important;top:20px!important}div.coer-date-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label.mdc-floating-label--float-above mat-label{color:var(--primary-inner);font-weight:700;position:relative;left:-10px;top:2px}div.coer-date-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input{font-weight:400!important;font-size:17px!important;color:var(--black)!important}div.coer-date-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active,div.coer-date-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:before,div.coer-date-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:after{border-bottom-color:var(--primary-inner)!important}div.coer-date-box mat-form-field div.mat-mdc-form-field-subscript-wrapper.mat-mdc-form-field-bottom-align{height:0px!important}div.coer-date-box mat-form-field span.icon-container{position:absolute!important;top:1px!important;right:-14px!important;z-index:5!important;width:30px;height:40px;display:flex;align-items:center;justify-content:center}div.coer-date-box mat-form-field span.icon-container i{font-size:20px!important}div.coer-date-box mat-form-field span.icon-container i.fa-solid.fa-xmark,div.coer-date-box mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass{color:#caced1!important;cursor:pointer!important}div.coer-date-box mat-form-field span.icon-container i.fa-solid.fa-xmark:hover,div.coer-date-box mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass:hover{color:#6c757d!important}div.coer-date-box mat-form-field span.icon-container i.fa-solid.fa-circle-check{color:var(--green)!important}div.coer-date-box mat-form-field span.icon-container i.fa-solid.fa-circle-exclamation{color:var(--red)!important}div.coer-date-box mat-form-field span.placeholder{width:calc(100% + 32px)!important;height:40px!important;position:absolute!important;z-index:1!important;top:0!important;left:-16px!important;cursor:wait!important}div.coer-date-box mat-form-field .placeholder,div.coer-date-box mat-form-field .placeholder *,div.coer-date-box mat-form-field .placeholder-glow,div.coer-date-box mat-form-field .placeholder-glow *{cursor:wait!important}div.coer-date-box mat-form-field.readonly div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:#bbbbbb83!important}div.coer-date-box div.button-container{width:40px!important;height:40px!important;display:flex!important;align-items:center!important;justify-content:center!important;background-color:#e6e7e9!important}div.coer-date-box .mat-datepicker-toggle-active *{color:var(--primary-inner)!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:transparent!important;padding-left:9px!important;padding-right:9px!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple,coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple:before,coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple:after{border-bottom-color:transparent!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex{height:28px!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{height:28px!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input{margin-top:3px!important;font-size:14px!important}coer-grid table tbody tr td.coer-textbox mat-form-field span.icon-container{transform:translate(-5px,-6px)!important}\n"] }]
|
516
|
+
}], ctorParameters: () => [] });
|
538
517
|
|
539
518
|
class CoerModal {
|
540
519
|
constructor() {
|
541
520
|
//Variables
|
542
521
|
this._id = Tools.GetGuid('coer-modal');
|
543
|
-
this._isOpen = false;
|
544
522
|
this._isModalOpen = isModalOpenSIGNAL;
|
545
523
|
this._windowWidth = Screen.WINDOW_WIDTH;
|
524
|
+
this._isOpen = false;
|
546
525
|
//Inputs
|
547
526
|
this.id = input('');
|
548
527
|
this.title = input('');
|
@@ -551,6 +530,12 @@ class CoerModal {
|
|
551
530
|
this.width = input('small');
|
552
531
|
this.height = input('auto');
|
553
532
|
this.maxHeight = input('');
|
533
|
+
//Outputs
|
534
|
+
this.onOpen = output();
|
535
|
+
this.onClose = output();
|
536
|
+
//Generic Tools
|
537
|
+
this.IsNull = Tools.IsNull;
|
538
|
+
this.IsNotNull = Tools.IsNotNull;
|
554
539
|
//Computed
|
555
540
|
this._contentList = computed(() => Array.from(this.contentRef._results));
|
556
541
|
//Computed
|
@@ -578,12 +563,15 @@ class CoerModal {
|
|
578
563
|
return Tools.IsNotNull(this._header()) && this._header().icon().length > 0
|
579
564
|
? this._header().icon() : this.icon();
|
580
565
|
});
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
566
|
+
}
|
567
|
+
//AfterViewInit
|
568
|
+
ngAfterViewInit() {
|
569
|
+
Tools.Sleep().then(() => {
|
570
|
+
this._modal = new Modal(document.getElementById(this._id));
|
571
|
+
Screen.Resize.subscribe((response) => {
|
572
|
+
this._windowWidth = response.width;
|
573
|
+
});
|
574
|
+
});
|
587
575
|
}
|
588
576
|
//getter
|
589
577
|
get isOpen() {
|
@@ -602,13 +590,6 @@ class CoerModal {
|
|
602
590
|
default: return this.width();
|
603
591
|
}
|
604
592
|
}
|
605
|
-
async ngAfterViewInit() {
|
606
|
-
await Tools.Sleep();
|
607
|
-
this._modal = new Modal(document.getElementById(this._id));
|
608
|
-
Screen.Resize.subscribe((response) => {
|
609
|
-
this._windowWidth = response.width;
|
610
|
-
});
|
611
|
-
}
|
612
593
|
/** */
|
613
594
|
Open() {
|
614
595
|
this._modal.show();
|
@@ -629,32 +610,36 @@ class CoerModal {
|
|
629
610
|
}
|
630
611
|
}
|
631
612
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerModal, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
632
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerModal, isStandalone: false, selector: "coer-modal", inputs: { id: { classPropertyName: "id", publicName: "id", 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 }, showCloseButton: { classPropertyName: "showCloseButton", publicName: "showCloseButton", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onOpen: "onOpen", onClose: "onClose" }, queries: [{ propertyName: "contentRef", predicate: CoerRefDirective }], ngImport: i0, template: "<aside title='' [id]=\"_id\" class=\"modal fade\" data-bs-backdrop=\"static\" tabindex=\"-1\">\r\n <div class=\"modal-dialog modal-dialog-centered modal-dialog-scrollable\" [ngStyle]=\"{ 'max-width': _width }\">\r\n <div class=\"modal-content\">\r\n @if(IsNull(_header()) || (IsNotNull(_header()) && _header()?.show())) {\r\n <header class=\"modal-header\">\r\n <h6 class=\"modal-title\">\r\n <i [class]=\"_icon()\"></i>\r\n <span [ngClass]=\"{ 'ms-1': _icon().length > 0 }\"> {{ _title() }} </span>\r\n </h6>\r\n\r\n @if(showCloseButton()) {\r\n <button [id]=\"_id + '-button-close'\" type=\"button\" class=\"btn-close\" (click)=\"Close()\"></button>\r\n }\r\n </header>\r\n }\r\n\r\n <section class=\"modal-body\" [ngStyle]=\"{\r\n 'height': height(),\r\n 'max-height': maxHeight(),\r\n 'overflow': maxHeight() === '' ? 'visible' : 'auto'\r\n }\">\r\n @if(IsNotNull(_body()) && _body()?.show()) {\r\n <ng-container [ngTemplateOutlet]=\"_body()!.template\"></ng-container>\r\n }\r\n\r\n @else {\r\n <ng-content></ng-content>\r\n }\r\n </section>\r\n\r\n @if(IsNotNull(_footer())) {\r\n <footer class=\"modal-footer\">\r\n @if(_footer()?.show()) {\r\n <ng-container [ngTemplateOutlet]=\"_footer()!.template\"></ng-container>\r\n }\r\n </footer>\r\n }\r\n </div>\r\n </div>\r\n\r\n <div [ngClass]=\"{ 'backdrop': _isModalOpen() }\"></div>\r\n</aside>", styles: [".modal-dialog{margin:auto!important;height:100vh}.modal-header{padding:8px 16px!important}.modal-title{font-weight:700!important;font-size:17px!important}.modal-body{padding-top:16px!important;padding-bottom:0!important;min-width:60px!important}div.coer-filebox .modal-body{padding:0!important}.modal-footer{border:none!important;display:flex!important;align-items:flex-end!important;justify-content:flex-end!important;max-height:64px!important;min-height:64px!important;gap:10px!important}.btn-close:focus{box-shadow:none!important}div.modal-backdrop{z-index:0!important}aside.modal div.backdrop{width:100vw;height:100vh;position:fixed;top:0;left:0;background-color:#0000005b;z-index:1500}div.modal-content{z-index:1501;overflow:auto!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
|
613
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerModal, isStandalone: false, selector: "coer-modal", inputs: { id: { classPropertyName: "id", publicName: "id", 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 }, showCloseButton: { classPropertyName: "showCloseButton", publicName: "showCloseButton", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onOpen: "onOpen", onClose: "onClose" }, queries: [{ propertyName: "contentRef", predicate: CoerRefDirective }], ngImport: i0, template: "<aside title='' [id]=\"_id\" class=\"modal fade\" data-bs-backdrop=\"static\" tabindex=\"-1\">\r\n <div class=\"modal-dialog modal-dialog-centered modal-dialog-scrollable\" [ngStyle]=\"{ 'max-width': _width }\">\r\n <div class=\"modal-content\">\r\n @if(IsNull(_header()) || (IsNotNull(_header()) && _header()?.show())) {\r\n <header class=\"modal-header\">\r\n <h6 class=\"modal-title\">\r\n <i [class]=\"_icon()\"></i>\r\n <span [ngClass]=\"{ 'ms-1': _icon().length > 0 }\"> {{ _title() }} </span>\r\n </h6>\r\n\r\n @if(showCloseButton()) {\r\n <button [id]=\"_id + '-button-close'\" type=\"button\" class=\"btn-close\" (click)=\"Close()\"></button>\r\n }\r\n </header>\r\n }\r\n\r\n <section class=\"modal-body\" [ngStyle]=\"{\r\n 'height': height(),\r\n 'max-height': maxHeight(),\r\n 'overflow': maxHeight() === '' ? 'visible' : 'auto'\r\n }\">\r\n @if(IsNotNull(_body()) && _body()?.show()) {\r\n <ng-container [ngTemplateOutlet]=\"_body()!.template\"></ng-container>\r\n }\r\n\r\n @else {\r\n <ng-content></ng-content>\r\n }\r\n </section>\r\n\r\n @if(IsNotNull(_footer())) {\r\n <footer class=\"modal-footer\">\r\n @if(_footer()?.show()) {\r\n <ng-container [ngTemplateOutlet]=\"_footer()!.template\"></ng-container>\r\n }\r\n </footer>\r\n }\r\n </div>\r\n </div>\r\n\r\n <div [ngClass]=\"{ 'backdrop': _isModalOpen() }\"></div>\r\n</aside>", styles: [".modal-dialog{margin:auto!important;height:100vh}.modal-header{padding:8px 16px!important}.modal-title{font-weight:700!important;font-size:17px!important}.modal-body{padding-top:16px!important;padding-bottom:0!important;min-width:60px!important}div.coer-filebox .modal-body{padding:0!important}.modal-footer{border:none!important;display:flex!important;align-items:flex-end!important;justify-content:flex-end!important;max-height:64px!important;min-height:64px!important;gap:10px!important}.btn-close:focus{box-shadow:none!important}div.modal-backdrop{z-index:0!important}aside.modal div.backdrop{width:100vw;height:100vh;position:fixed;top:0;left:0;background-color:#0000005b;z-index:1500}div.modal-content{z-index:1501;overflow:auto!important;margin:15px!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
|
633
614
|
}
|
634
615
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerModal, decorators: [{
|
635
616
|
type: Component,
|
636
|
-
args: [{ selector: 'coer-modal', standalone: false, template: "<aside title='' [id]=\"_id\" class=\"modal fade\" data-bs-backdrop=\"static\" tabindex=\"-1\">\r\n <div class=\"modal-dialog modal-dialog-centered modal-dialog-scrollable\" [ngStyle]=\"{ 'max-width': _width }\">\r\n <div class=\"modal-content\">\r\n @if(IsNull(_header()) || (IsNotNull(_header()) && _header()?.show())) {\r\n <header class=\"modal-header\">\r\n <h6 class=\"modal-title\">\r\n <i [class]=\"_icon()\"></i>\r\n <span [ngClass]=\"{ 'ms-1': _icon().length > 0 }\"> {{ _title() }} </span>\r\n </h6>\r\n\r\n @if(showCloseButton()) {\r\n <button [id]=\"_id + '-button-close'\" type=\"button\" class=\"btn-close\" (click)=\"Close()\"></button>\r\n }\r\n </header>\r\n }\r\n\r\n <section class=\"modal-body\" [ngStyle]=\"{\r\n 'height': height(),\r\n 'max-height': maxHeight(),\r\n 'overflow': maxHeight() === '' ? 'visible' : 'auto'\r\n }\">\r\n @if(IsNotNull(_body()) && _body()?.show()) {\r\n <ng-container [ngTemplateOutlet]=\"_body()!.template\"></ng-container>\r\n }\r\n\r\n @else {\r\n <ng-content></ng-content>\r\n }\r\n </section>\r\n\r\n @if(IsNotNull(_footer())) {\r\n <footer class=\"modal-footer\">\r\n @if(_footer()?.show()) {\r\n <ng-container [ngTemplateOutlet]=\"_footer()!.template\"></ng-container>\r\n }\r\n </footer>\r\n }\r\n </div>\r\n </div>\r\n\r\n <div [ngClass]=\"{ 'backdrop': _isModalOpen() }\"></div>\r\n</aside>", styles: [".modal-dialog{margin:auto!important;height:100vh}.modal-header{padding:8px 16px!important}.modal-title{font-weight:700!important;font-size:17px!important}.modal-body{padding-top:16px!important;padding-bottom:0!important;min-width:60px!important}div.coer-filebox .modal-body{padding:0!important}.modal-footer{border:none!important;display:flex!important;align-items:flex-end!important;justify-content:flex-end!important;max-height:64px!important;min-height:64px!important;gap:10px!important}.btn-close:focus{box-shadow:none!important}div.modal-backdrop{z-index:0!important}aside.modal div.backdrop{width:100vw;height:100vh;position:fixed;top:0;left:0;background-color:#0000005b;z-index:1500}div.modal-content{z-index:1501;overflow:auto!important}\n"] }]
|
617
|
+
args: [{ selector: 'coer-modal', standalone: false, template: "<aside title='' [id]=\"_id\" class=\"modal fade\" data-bs-backdrop=\"static\" tabindex=\"-1\">\r\n <div class=\"modal-dialog modal-dialog-centered modal-dialog-scrollable\" [ngStyle]=\"{ 'max-width': _width }\">\r\n <div class=\"modal-content\">\r\n @if(IsNull(_header()) || (IsNotNull(_header()) && _header()?.show())) {\r\n <header class=\"modal-header\">\r\n <h6 class=\"modal-title\">\r\n <i [class]=\"_icon()\"></i>\r\n <span [ngClass]=\"{ 'ms-1': _icon().length > 0 }\"> {{ _title() }} </span>\r\n </h6>\r\n\r\n @if(showCloseButton()) {\r\n <button [id]=\"_id + '-button-close'\" type=\"button\" class=\"btn-close\" (click)=\"Close()\"></button>\r\n }\r\n </header>\r\n }\r\n\r\n <section class=\"modal-body\" [ngStyle]=\"{\r\n 'height': height(),\r\n 'max-height': maxHeight(),\r\n 'overflow': maxHeight() === '' ? 'visible' : 'auto'\r\n }\">\r\n @if(IsNotNull(_body()) && _body()?.show()) {\r\n <ng-container [ngTemplateOutlet]=\"_body()!.template\"></ng-container>\r\n }\r\n\r\n @else {\r\n <ng-content></ng-content>\r\n }\r\n </section>\r\n\r\n @if(IsNotNull(_footer())) {\r\n <footer class=\"modal-footer\">\r\n @if(_footer()?.show()) {\r\n <ng-container [ngTemplateOutlet]=\"_footer()!.template\"></ng-container>\r\n }\r\n </footer>\r\n }\r\n </div>\r\n </div>\r\n\r\n <div [ngClass]=\"{ 'backdrop': _isModalOpen() }\"></div>\r\n</aside>", styles: [".modal-dialog{margin:auto!important;height:100vh}.modal-header{padding:8px 16px!important}.modal-title{font-weight:700!important;font-size:17px!important}.modal-body{padding-top:16px!important;padding-bottom:0!important;min-width:60px!important}div.coer-filebox .modal-body{padding:0!important}.modal-footer{border:none!important;display:flex!important;align-items:flex-end!important;justify-content:flex-end!important;max-height:64px!important;min-height:64px!important;gap:10px!important}.btn-close:focus{box-shadow:none!important}div.modal-backdrop{z-index:0!important}aside.modal div.backdrop{width:100vw;height:100vh;position:fixed;top:0;left:0;background-color:#0000005b;z-index:1500}div.modal-content{z-index:1501;overflow:auto!important;margin:15px!important}\n"] }]
|
637
618
|
}], propDecorators: { contentRef: [{
|
638
619
|
type: ContentChildren,
|
639
620
|
args: [CoerRefDirective]
|
640
621
|
}] } });
|
641
622
|
|
642
|
-
class
|
623
|
+
class CoerFileboxImage {
|
624
|
+
//Constructor
|
643
625
|
constructor() {
|
644
626
|
//Injections
|
645
627
|
this.alert = inject(CoerAlert);
|
628
|
+
//Generic Tools
|
646
629
|
this.IsNull = Tools.IsNull;
|
647
630
|
this.IsNotNull = Tools.IsNotNull;
|
631
|
+
this.IsOnlyWhiteSpace = Tools.IsOnlyWhiteSpace;
|
648
632
|
this.IsNotOnlyWhiteSpace = Tools.IsNotOnlyWhiteSpace;
|
649
633
|
//Elements
|
650
|
-
this.
|
634
|
+
this._input = viewChild.required('input');
|
651
635
|
this._modal = viewChild.required('modal');
|
652
|
-
|
653
|
-
this.
|
654
|
-
this.
|
655
|
-
this.
|
636
|
+
this._accept = ['image/png', 'image/jpeg', 'image/gif', 'image/svg+xml'];
|
637
|
+
this._Extensions = ['png', 'jpeg', 'jpg', 'gif', 'svg'];
|
638
|
+
this._isLoadingInner = signal(false);
|
639
|
+
this._base64 = signal('');
|
640
|
+
this._image = signal(null);
|
656
641
|
//Inputs
|
657
|
-
this.
|
642
|
+
this.image = input(null);
|
658
643
|
this.multiple = input(false);
|
659
644
|
this.isLoading = input(false);
|
660
645
|
this.isDisabled = input(false);
|
@@ -664,65 +649,101 @@ class CoerFilebox {
|
|
664
649
|
this.onSelected = output();
|
665
650
|
this.onDeleteImage = output();
|
666
651
|
//computed
|
652
|
+
this._isLoading = computed(() => {
|
653
|
+
return this.isLoading()
|
654
|
+
|| this._isLoadingInner();
|
655
|
+
});
|
656
|
+
//computed
|
667
657
|
this._isEnable = computed(() => {
|
668
|
-
return !this.
|
658
|
+
return !this._isLoading()
|
659
|
+
&& !this.isDisabled()
|
660
|
+
&& !this.isInvisible();
|
669
661
|
});
|
670
|
-
|
671
|
-
this.
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
662
|
+
//computed
|
663
|
+
this._showTrashButton = computed(() => {
|
664
|
+
return !this.isReadonly()
|
665
|
+
&& this._isEnable()
|
666
|
+
&& this.IsNotNull(this._image())
|
667
|
+
&& this.IsNotNull(this._image().value)
|
668
|
+
&& this.IsNotOnlyWhiteSpace(this._base64())
|
669
|
+
&& (this.IsNull(this._image().allowDelete) || this._image().allowDelete);
|
670
|
+
});
|
671
|
+
//computed
|
672
|
+
this._showExpandButton = computed(() => {
|
673
|
+
return !this.isReadonly()
|
674
|
+
&& this._isEnable()
|
675
|
+
&& this.IsNotNull(this._image())
|
676
|
+
&& this.IsNotNull(this._image().value)
|
677
|
+
&& this.IsNotOnlyWhiteSpace(this._base64())
|
678
|
+
&& (this.IsNull(this._image().allowExpand) || this._image().allowExpand);
|
679
|
+
});
|
680
|
+
//computed
|
681
|
+
this._figureWidth = computed(() => {
|
682
|
+
return Tools.IsNotOnlyWhiteSpace(this._image()?.value)
|
683
|
+
&& !this._isLoading()
|
684
|
+
? 'fit-content' : '210px';
|
685
|
+
});
|
686
|
+
//computed
|
687
|
+
this._figureDashed = computed(() => {
|
688
|
+
return !this.isReadonly()
|
689
|
+
&& !this.isDisabled()
|
690
|
+
&& this.IsOnlyWhiteSpace(this._image()?.value);
|
691
|
+
});
|
692
|
+
this._effect = effect(() => {
|
693
|
+
if (Tools.IsNotNull(this.image())) {
|
694
|
+
this._image.set(Tools.IsNotNull(this.image()) ? this.image() : null);
|
695
|
+
if (Tools.IsNotNull(this.image())) {
|
696
|
+
if (this.image()?.value?.name) {
|
697
|
+
Files.ConvertToBase64(this.image()?.value).then(base64 => {
|
698
|
+
return this._base64.set(base64);
|
699
|
+
});
|
700
|
+
}
|
701
|
+
else
|
702
|
+
this._base64.set(this.image()?.value);
|
680
703
|
}
|
681
704
|
}
|
682
|
-
|
683
|
-
return null;
|
684
|
-
};
|
705
|
+
});
|
685
706
|
}
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
if (Tools.IsNotNull(value)) {
|
690
|
-
if (value?.value?.name) {
|
691
|
-
Files.ConvertToBase64(value?.value).then(base64 => {
|
692
|
-
return this._base64 = base64;
|
693
|
-
});
|
694
|
-
}
|
695
|
-
else
|
696
|
-
this._base64 = value?.value;
|
697
|
-
}
|
698
|
-
}
|
707
|
+
//OnDestroy
|
708
|
+
ngOnDestroy() {
|
709
|
+
this._effect?.destroy();
|
699
710
|
}
|
700
711
|
/** */
|
701
|
-
async
|
712
|
+
async _SelectImages(event) {
|
702
713
|
const selectedFiles = Array.from(event.target.files);
|
703
714
|
const files = [];
|
704
715
|
let extension = null;
|
705
716
|
for (const file of selectedFiles) {
|
706
|
-
extension =
|
707
|
-
if (this.
|
717
|
+
extension = Files.GetExtension(file) || '';
|
718
|
+
if (this._Extensions.includes(extension)) {
|
708
719
|
files.push({
|
709
720
|
file: file,
|
710
721
|
extension: extension,
|
711
722
|
base64: await Files.ConvertToBase64(file)
|
712
723
|
});
|
713
724
|
}
|
714
|
-
else
|
725
|
+
else {
|
715
726
|
this.alert.Warning(`<b>.${extension}</b> extension not allowed`, 'Files');
|
727
|
+
this._input().nativeElement.value = null;
|
728
|
+
this._isLoadingInner.set(false);
|
729
|
+
return;
|
730
|
+
}
|
716
731
|
}
|
717
732
|
//Response
|
718
|
-
this.
|
733
|
+
this._input().nativeElement.value = null;
|
734
|
+
this._isLoadingInner.set(false);
|
719
735
|
this.onSelected.emit([...files]);
|
720
736
|
}
|
721
737
|
/** */
|
738
|
+
_ClickImage(reference) {
|
739
|
+
this._isLoadingInner.set(true);
|
740
|
+
reference.click();
|
741
|
+
}
|
742
|
+
/** */
|
722
743
|
_DeleteImage(event) {
|
723
744
|
event.stopPropagation();
|
724
745
|
if (this._isEnable()) {
|
725
|
-
this.onDeleteImage.emit();
|
746
|
+
this.onDeleteImage.emit(this._image());
|
726
747
|
}
|
727
748
|
}
|
728
749
|
/** */
|
@@ -730,20 +751,40 @@ class CoerFilebox {
|
|
730
751
|
event.stopPropagation();
|
731
752
|
this._modal().Open();
|
732
753
|
}
|
754
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerFileboxImage, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
755
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerFileboxImage, isStandalone: false, selector: "coer-filebox-image", inputs: { image: { classPropertyName: "image", publicName: "image", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: true, isRequired: false, transformFunction: null }, isInvisible: { classPropertyName: "isInvisible", publicName: "isInvisible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSelected: "onSelected", onDeleteImage: "onDeleteImage" }, viewQueries: [{ propertyName: "_input", first: true, predicate: ["input"], descendants: true, isSignal: true }, { propertyName: "_modal", first: true, predicate: ["modal"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"coer-filebox-image\">\r\n <figure (click)=\"(_isEnable() && !isReadonly()) ? _ClickImage(input) : null\" \r\n [ngClass]=\"{ \r\n 'dashed': _figureDashed(),\r\n 'cursor-pointer': true \r\n }\"\r\n [ngStyle]=\"{\r\n 'margin-top' : _image()?.marginTop || '',\r\n 'margin-right' : _image()?.marginRight || '',\r\n 'margin-bottom': _image()?.marginBottom || '',\r\n 'margin-left' : _image()?.marginLeft || '',\r\n 'display' : isInvisible() ? 'none' : '',\r\n 'width' : _figureWidth()\r\n }\">\r\n \r\n @if(_isLoading()) {\r\n <div class=\"loading\">\r\n <i class=\"spinner-border\"></i>\r\n </div>\r\n \r\n <div class=\"placeholder-glow\">\r\n <span class=\"placeholder\"></span>\r\n </div>\r\n }\r\n \r\n <img [src]=\"_base64() | noImage\"\r\n [ngStyle]=\"{\r\n 'width' : _image()?.width || '',\r\n 'max-width' : _image()?.maxWidth || '',\r\n 'height' : _image()?.height || '',\r\n 'max-height': _image()?.maxHeight || '210px'\r\n }\">\r\n \r\n <input #input\r\n type=\"file\"\r\n [accept]=\"_accept\"\r\n (change)=\"_SelectImages($event)\"\r\n (cancel)=\"_isLoadingInner.set(false)\"\r\n [multiple]=\"multiple()\">\r\n \r\n @if(_showTrashButton() || _showExpandButton()) {\r\n <div class=\"icon-container\">\r\n @if(_showTrashButton()) {\r\n <i class=\"icon-trash-can icon-fill\" (click)=\"_DeleteImage($event)\"></i>\r\n }\r\n \r\n @if(_showExpandButton()) {\r\n <i class=\"icon-expand\" (click)=\"_ExpandImage($event)\"></i>\r\n }\r\n </div>\r\n }\r\n </figure>\r\n \r\n @if(isInvisible()) {\r\n <figure [ngStyle]=\"{\r\n 'margin-top' : _image()?.marginTop || '',\r\n 'margin-right' : _image()?.marginRight || '',\r\n 'margin-bottom': _image()?.marginBottom || '',\r\n 'margin-left' : _image()?.marginLeft || '',\r\n 'width' : _figureWidth()\r\n }\"> \r\n \r\n <img [ngStyle]=\"{\r\n 'width' : _image()?.width || '',\r\n 'max-width' : _image()?.maxWidth || '',\r\n 'height' : _image()?.height || '',\r\n 'max-height': _image()?.maxHeight || '210px',\r\n 'display' : 'none'\r\n }\">\r\n </figure>\r\n }\r\n \r\n <!-- Modal -->\r\n <coer-modal #modal [title]=\"_image()?.name || ''\" height=\"90vh\" width=\"full\">\r\n <div class=\"modal-image\" [ngStyle]=\"{ 'background-image': 'url(' + _base64() + ')' }\"></div>\r\n </coer-modal>\r\n</div>", styles: ["div.coer-filebox-image figure{position:relative;display:flex;align-items:center;justify-content:center;border-radius:3px;overflow:hidden;min-height:210px;z-index:1}div.coer-filebox-image figure div.loading{position:absolute;display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:25px;background-color:#bbbbbb83!important;flex-direction:column!important;gap:10px!important;cursor:default!important}div.coer-filebox-image figure div.loading i.spinner-border{color:var(--primary-inner)!important;width:70px!important;height:70px!important;font-size:20px!important;position:absolute!important}div.coer-filebox-image figure span.placeholder-glow span.placeholder{width:calc(100% + 32px)!important;height:100%!important;position:absolute!important;z-index:1!important;top:0!important;left:-16px!important;cursor:wait!important}div.coer-filebox-image figure img{min-width:100px!important;min-height:100px!important}div.coer-filebox-image figure div.icon-container{position:absolute;bottom:5px;right:5px;z-index:2;display:flex;align-items:center;justify-content:flex-end;gap:7px}div.coer-filebox-image figure div.icon-container i{color:var(--gray);font-size:20px}div.coer-filebox-image figure div.icon-container i:hover{zoom:1.1}div.coer-filebox-image .dashed{border:1px dashed var(--gray)!important;background-color:transparent!important}div.coer-filebox-image div.modal-image{width:100%;height:100%;border-bottom-left-radius:5px;border-bottom-right-radius:5px;background-size:contain;background-repeat:no-repeat;background-position:center}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: CoerModal, selector: "coer-modal", inputs: ["id", "title", "icon", "showCloseButton", "width", "height", "maxHeight"], outputs: ["onOpen", "onClose"] }, { kind: "pipe", type: i9.NoImagePipe, name: "noImage" }] }); }
|
756
|
+
}
|
757
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerFileboxImage, decorators: [{
|
758
|
+
type: Component,
|
759
|
+
args: [{ selector: 'coer-filebox-image', standalone: false, template: "<div class=\"coer-filebox-image\">\r\n <figure (click)=\"(_isEnable() && !isReadonly()) ? _ClickImage(input) : null\" \r\n [ngClass]=\"{ \r\n 'dashed': _figureDashed(),\r\n 'cursor-pointer': true \r\n }\"\r\n [ngStyle]=\"{\r\n 'margin-top' : _image()?.marginTop || '',\r\n 'margin-right' : _image()?.marginRight || '',\r\n 'margin-bottom': _image()?.marginBottom || '',\r\n 'margin-left' : _image()?.marginLeft || '',\r\n 'display' : isInvisible() ? 'none' : '',\r\n 'width' : _figureWidth()\r\n }\">\r\n \r\n @if(_isLoading()) {\r\n <div class=\"loading\">\r\n <i class=\"spinner-border\"></i>\r\n </div>\r\n \r\n <div class=\"placeholder-glow\">\r\n <span class=\"placeholder\"></span>\r\n </div>\r\n }\r\n \r\n <img [src]=\"_base64() | noImage\"\r\n [ngStyle]=\"{\r\n 'width' : _image()?.width || '',\r\n 'max-width' : _image()?.maxWidth || '',\r\n 'height' : _image()?.height || '',\r\n 'max-height': _image()?.maxHeight || '210px'\r\n }\">\r\n \r\n <input #input\r\n type=\"file\"\r\n [accept]=\"_accept\"\r\n (change)=\"_SelectImages($event)\"\r\n (cancel)=\"_isLoadingInner.set(false)\"\r\n [multiple]=\"multiple()\">\r\n \r\n @if(_showTrashButton() || _showExpandButton()) {\r\n <div class=\"icon-container\">\r\n @if(_showTrashButton()) {\r\n <i class=\"icon-trash-can icon-fill\" (click)=\"_DeleteImage($event)\"></i>\r\n }\r\n \r\n @if(_showExpandButton()) {\r\n <i class=\"icon-expand\" (click)=\"_ExpandImage($event)\"></i>\r\n }\r\n </div>\r\n }\r\n </figure>\r\n \r\n @if(isInvisible()) {\r\n <figure [ngStyle]=\"{\r\n 'margin-top' : _image()?.marginTop || '',\r\n 'margin-right' : _image()?.marginRight || '',\r\n 'margin-bottom': _image()?.marginBottom || '',\r\n 'margin-left' : _image()?.marginLeft || '',\r\n 'width' : _figureWidth()\r\n }\"> \r\n \r\n <img [ngStyle]=\"{\r\n 'width' : _image()?.width || '',\r\n 'max-width' : _image()?.maxWidth || '',\r\n 'height' : _image()?.height || '',\r\n 'max-height': _image()?.maxHeight || '210px',\r\n 'display' : 'none'\r\n }\">\r\n </figure>\r\n }\r\n \r\n <!-- Modal -->\r\n <coer-modal #modal [title]=\"_image()?.name || ''\" height=\"90vh\" width=\"full\">\r\n <div class=\"modal-image\" [ngStyle]=\"{ 'background-image': 'url(' + _base64() + ')' }\"></div>\r\n </coer-modal>\r\n</div>", styles: ["div.coer-filebox-image figure{position:relative;display:flex;align-items:center;justify-content:center;border-radius:3px;overflow:hidden;min-height:210px;z-index:1}div.coer-filebox-image figure div.loading{position:absolute;display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:25px;background-color:#bbbbbb83!important;flex-direction:column!important;gap:10px!important;cursor:default!important}div.coer-filebox-image figure div.loading i.spinner-border{color:var(--primary-inner)!important;width:70px!important;height:70px!important;font-size:20px!important;position:absolute!important}div.coer-filebox-image figure span.placeholder-glow span.placeholder{width:calc(100% + 32px)!important;height:100%!important;position:absolute!important;z-index:1!important;top:0!important;left:-16px!important;cursor:wait!important}div.coer-filebox-image figure img{min-width:100px!important;min-height:100px!important}div.coer-filebox-image figure div.icon-container{position:absolute;bottom:5px;right:5px;z-index:2;display:flex;align-items:center;justify-content:flex-end;gap:7px}div.coer-filebox-image figure div.icon-container i{color:var(--gray);font-size:20px}div.coer-filebox-image figure div.icon-container i:hover{zoom:1.1}div.coer-filebox-image .dashed{border:1px dashed var(--gray)!important;background-color:transparent!important}div.coer-filebox-image div.modal-image{width:100%;height:100%;border-bottom-left-radius:5px;border-bottom-right-radius:5px;background-size:contain;background-repeat:no-repeat;background-position:center}\n"] }]
|
760
|
+
}], ctorParameters: () => [] });
|
761
|
+
|
762
|
+
class CoerFilebox {
|
763
|
+
constructor() {
|
764
|
+
//Inputs
|
765
|
+
this.type = input('image');
|
766
|
+
this.image = input();
|
767
|
+
this.multiple = input(false);
|
768
|
+
this.isLoading = input(false);
|
769
|
+
this.isDisabled = input(false);
|
770
|
+
this.isReadonly = input(false);
|
771
|
+
this.isInvisible = input(false);
|
772
|
+
//Outputs
|
773
|
+
this.onSelected = output();
|
774
|
+
this.onDeleteImage = output();
|
775
|
+
}
|
733
776
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerFilebox, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
734
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerFilebox, isStandalone: false, selector: "coer-filebox", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null },
|
777
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerFilebox, isStandalone: false, selector: "coer-filebox", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, image: { classPropertyName: "image", publicName: "image", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: true, isRequired: false, transformFunction: null }, isInvisible: { classPropertyName: "isInvisible", publicName: "isInvisible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSelected: "onSelected", onDeleteImage: "onDeleteImage" }, ngImport: i0, template: "<div class=\"coer-filebox\">\r\n @if(type() === 'image') {\r\n <coer-filebox-image\r\n [image]=\"image()\"\r\n [multiple]=\"multiple()\"\r\n [isLoading]=\"isLoading()\"\r\n [isDisabled]=\"isDisabled()\"\r\n [isReadonly]=\"isReadonly()\"\r\n [isInvisible]=\"isInvisible()\"\r\n (onSelected)=\"onSelected.emit($event)\"\r\n (onDeleteImage)=\"onDeleteImage.emit($event)\"\r\n ></coer-filebox-image>\r\n }\r\n</div>", styles: ["div.coer-filebox{display:flex;justify-content:center;align-items:center}\n"], dependencies: [{ kind: "component", type: CoerFileboxImage, selector: "coer-filebox-image", inputs: ["image", "multiple", "isLoading", "isDisabled", "isReadonly", "isInvisible"], outputs: ["onSelected", "onDeleteImage"] }] }); }
|
735
778
|
}
|
736
779
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerFilebox, decorators: [{
|
737
780
|
type: Component,
|
738
|
-
args: [{ selector: 'coer-filebox', standalone: false, template: "<div class=\"coer-filebox\">\r\n @if(type()
|
739
|
-
}]
|
740
|
-
type: Input
|
741
|
-
}] } });
|
781
|
+
args: [{ selector: 'coer-filebox', standalone: false, template: "<div class=\"coer-filebox\">\r\n @if(type() === 'image') {\r\n <coer-filebox-image\r\n [image]=\"image()\"\r\n [multiple]=\"multiple()\"\r\n [isLoading]=\"isLoading()\"\r\n [isDisabled]=\"isDisabled()\"\r\n [isReadonly]=\"isReadonly()\"\r\n [isInvisible]=\"isInvisible()\"\r\n (onSelected)=\"onSelected.emit($event)\"\r\n (onDeleteImage)=\"onDeleteImage.emit($event)\"\r\n ></coer-filebox-image>\r\n }\r\n</div>", styles: ["div.coer-filebox{display:flex;justify-content:center;align-items:center}\n"] }]
|
782
|
+
}] });
|
742
783
|
|
743
784
|
class CoerForm {
|
744
785
|
constructor() {
|
745
786
|
//Injection
|
746
|
-
this.
|
787
|
+
this._alert = inject(CoerAlert);
|
747
788
|
//Inputs
|
748
789
|
this.formGroup = input.required();
|
749
790
|
this.isLoading = input(false);
|
@@ -770,7 +811,7 @@ class CoerForm {
|
|
770
811
|
this.formGroup().get(formControlName).setValue(value);
|
771
812
|
}
|
772
813
|
else {
|
773
|
-
this.
|
814
|
+
this._alert.Warning(`${formControlName} Control`, 'Not Found');
|
774
815
|
}
|
775
816
|
}
|
776
817
|
/** */
|
@@ -803,7 +844,7 @@ class CoerForm {
|
|
803
844
|
IsValid() {
|
804
845
|
this.TouchForm();
|
805
846
|
if (this.formGroup().invalid) {
|
806
|
-
this.
|
847
|
+
this._alert.Warning('Please complete the required fields', 'Instructions', 'fa-solid fa-list-check');
|
807
848
|
this.Focus();
|
808
849
|
}
|
809
850
|
return {
|
@@ -847,18 +888,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
847
888
|
}] });
|
848
889
|
|
849
890
|
class CoerNumberBox extends ControlValue {
|
891
|
+
//Constructor
|
850
892
|
constructor() {
|
851
|
-
super(
|
893
|
+
super();
|
852
894
|
//Injections
|
853
|
-
this.
|
854
|
-
//
|
855
|
-
this._value = '';
|
895
|
+
this._alert = inject(CoerAlert);
|
896
|
+
//Elements
|
856
897
|
this._coerNumberbox = viewChild.required('coerNumberbox');
|
857
898
|
//Variables
|
899
|
+
this._value = '';
|
858
900
|
this._id = Tools.GetGuid('coer-numberbox');
|
859
901
|
this._isLoadingEvent = signal(false);
|
902
|
+
this._externalButton = signal({ show: false });
|
860
903
|
this._hideCaret = false;
|
904
|
+
//Inputs
|
861
905
|
this.id = input('');
|
906
|
+
this.value = input(null);
|
862
907
|
this.label = input('');
|
863
908
|
this.placeholder = input('');
|
864
909
|
this.textPosition = input('right');
|
@@ -866,7 +911,7 @@ class CoerNumberBox extends ControlValue {
|
|
866
911
|
this.max = input(2147483647);
|
867
912
|
this.isInvalid = input(false);
|
868
913
|
this.isValid = input(false);
|
869
|
-
this.externalButton = { show: false };
|
914
|
+
this.externalButton = input({ show: false });
|
870
915
|
this.selectOnFocus = input(true);
|
871
916
|
this.decimals = input(0);
|
872
917
|
this.isLoading = input(false);
|
@@ -897,83 +942,86 @@ class CoerNumberBox extends ControlValue {
|
|
897
942
|
return this.isInvalid() || this.isValid()
|
898
943
|
? '18px' : '0px';
|
899
944
|
});
|
945
|
+
this._effectValue = effect(() => {
|
946
|
+
this.SetValue(Tools.IsNotNull(this.value()) ? this.value() : 0);
|
947
|
+
});
|
948
|
+
this._effectExternalButton = effect(() => {
|
949
|
+
this._externalButton.set(this.externalButton());
|
950
|
+
});
|
900
951
|
}
|
901
|
-
//
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
952
|
+
//AfterViewInit
|
953
|
+
ngAfterViewInit() {
|
954
|
+
Tools.Sleep().then(() => {
|
955
|
+
this._element = document.getElementById(this._id);
|
956
|
+
if (this._element) {
|
957
|
+
this._element.addEventListener('focus', () => {
|
958
|
+
if (!this._isEnable())
|
959
|
+
this.Blur();
|
960
|
+
else if (this.selectOnFocus())
|
961
|
+
this.Focus(true);
|
962
|
+
});
|
963
|
+
this._element.addEventListener('blur', () => this.Blur());
|
964
|
+
this._element.addEventListener('keyup', (event) => {
|
965
|
+
if (this._isEnable()) {
|
966
|
+
const { key } = event;
|
967
|
+
if (key === 'Enter') {
|
968
|
+
let value = this._coerNumberbox().nativeElement.value;
|
969
|
+
value = this._OnlyNumbers(value);
|
970
|
+
value = this._ValidateRangeValue(value);
|
971
|
+
this.onKeyupEnter.emit(value);
|
972
|
+
this.Blur();
|
973
|
+
}
|
974
|
+
if (key === 'ArrowUp') {
|
975
|
+
this._hideCaret = true;
|
976
|
+
this.SetValue(Number(this._value) + 1);
|
977
|
+
Tools.Sleep(500, 'ArrowUp').then(() => this._hideCaret = false);
|
978
|
+
}
|
979
|
+
if (key === 'ArrowDown') {
|
980
|
+
this._hideCaret = true;
|
981
|
+
this.SetValue(Number(this._value) - 1);
|
982
|
+
Tools.Sleep(500, 'ArrowDown').then(() => this._hideCaret = false);
|
983
|
+
}
|
984
|
+
}
|
985
|
+
});
|
986
|
+
this._element.addEventListener('input', () => {
|
987
|
+
Tools.Sleep().then(() => {
|
922
988
|
let value = this._coerNumberbox().nativeElement.value;
|
923
989
|
value = this._OnlyNumbers(value);
|
924
990
|
value = this._ValidateRangeValue(value);
|
925
|
-
this.
|
926
|
-
|
927
|
-
}
|
928
|
-
if (key === 'ArrowUp') {
|
929
|
-
this._hideCaret = true;
|
930
|
-
this.SetValue(Number(this._value) + 1);
|
931
|
-
Tools.Sleep(500, 'ArrowUp').then(() => this._hideCaret = false);
|
932
|
-
}
|
933
|
-
if (key === 'ArrowDown') {
|
934
|
-
this._hideCaret = true;
|
935
|
-
this.SetValue(Number(this._value) - 1);
|
936
|
-
Tools.Sleep(500, 'ArrowDown').then(() => this._hideCaret = false);
|
937
|
-
}
|
938
|
-
}
|
939
|
-
});
|
940
|
-
this._element.addEventListener('input', () => {
|
941
|
-
Tools.Sleep().then(() => {
|
942
|
-
let value = this._coerNumberbox().nativeElement.value;
|
943
|
-
value = this._OnlyNumbers(value);
|
944
|
-
value = this._ValidateRangeValue(value);
|
945
|
-
if (this._isEnable())
|
946
|
-
this.onInput.emit(value);
|
991
|
+
if (this._isEnable())
|
992
|
+
this.onInput.emit(value);
|
993
|
+
});
|
947
994
|
});
|
948
|
-
}
|
949
|
-
}
|
995
|
+
}
|
996
|
+
});
|
950
997
|
}
|
951
|
-
//
|
952
|
-
|
953
|
-
|
998
|
+
//OnDestroy
|
999
|
+
ngOnDestroy() {
|
1000
|
+
this._effectValue?.destroy();
|
1001
|
+
this._effectExternalButton?.destroy();
|
954
1002
|
}
|
955
1003
|
//getter
|
956
1004
|
get _showButtonLeft() {
|
957
|
-
return this.
|
958
|
-
&& Tools.IsNotNull(this.
|
959
|
-
&& this.
|
1005
|
+
return this._externalButton().show
|
1006
|
+
&& Tools.IsNotNull(this._externalButton()?.position)
|
1007
|
+
&& this._externalButton()?.position === 'left'
|
960
1008
|
&& !this.isInvisible();
|
961
1009
|
}
|
962
1010
|
//getter
|
963
1011
|
get _showButtonRight() {
|
964
|
-
return this.
|
965
|
-
&& ((Tools.IsNull(this.
|
1012
|
+
return this._externalButton().show
|
1013
|
+
&& ((Tools.IsNull(this._externalButton()?.position) || this._externalButton()?.position === 'right'))
|
966
1014
|
&& !this.isInvisible();
|
967
1015
|
}
|
968
1016
|
//getter
|
969
1017
|
get _buttonIcon() {
|
970
|
-
return Tools.IsNotOnlyWhiteSpace(this.
|
971
|
-
? this.
|
1018
|
+
return Tools.IsNotOnlyWhiteSpace(this._externalButton()?.icon)
|
1019
|
+
? this._externalButton().icon : 'pointer';
|
972
1020
|
}
|
973
1021
|
//getter
|
974
1022
|
get _isDisabledExternalButton() {
|
975
|
-
return Tools.IsNotNull(this.
|
976
|
-
? this.
|
1023
|
+
return Tools.IsNotNull(this._externalButton()?.isDisabled)
|
1024
|
+
? this._externalButton().isDisabled : false;
|
977
1025
|
}
|
978
1026
|
//ControlValueAccessor
|
979
1027
|
SetValue(value) {
|
@@ -1010,7 +1058,7 @@ class CoerNumberBox extends ControlValue {
|
|
1010
1058
|
return '-0.';
|
1011
1059
|
}
|
1012
1060
|
else if (Number(value) < this.min()) {
|
1013
|
-
this.
|
1061
|
+
this._alert.Warning(`Minimum ${this.min()}`, 'Out of range', 'fa-solid fa-hashtag');
|
1014
1062
|
valueString = '0';
|
1015
1063
|
}
|
1016
1064
|
}
|
@@ -1053,11 +1101,11 @@ class CoerNumberBox extends ControlValue {
|
|
1053
1101
|
return String(value);
|
1054
1102
|
}
|
1055
1103
|
if (Number(value) < this.min()) {
|
1056
|
-
this.
|
1104
|
+
this._alert.Warning(`Minimum ${this.min()}`, 'Out of range', 'fa-solid fa-hashtag');
|
1057
1105
|
value = this.min();
|
1058
1106
|
}
|
1059
1107
|
if (Number(value) > this.max()) {
|
1060
|
-
this.
|
1108
|
+
this._alert.Warning(`Cannot exceed ${this.max()}`, 'Out of range', 'fa-solid fa-hashtag');
|
1061
1109
|
value = this.max();
|
1062
1110
|
}
|
1063
1111
|
if (this.decimals() <= 0) {
|
@@ -1100,26 +1148,23 @@ class CoerNumberBox extends ControlValue {
|
|
1100
1148
|
}
|
1101
1149
|
});
|
1102
1150
|
}
|
1103
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerNumberBox, deps:
|
1104
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerNumberBox, isStandalone: false, selector: "coer-numberbox", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, textPosition: { classPropertyName: "textPosition", publicName: "textPosition", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, isInvalid: { classPropertyName: "isInvalid", publicName: "isInvalid", isSignal: true, isRequired: false, transformFunction: null }, isValid: { classPropertyName: "isValid", publicName: "isValid", isSignal: true, isRequired: false, transformFunction: null }, externalButton: { classPropertyName: "externalButton", publicName: "externalButton", isSignal: false, isRequired: false, transformFunction: null }, selectOnFocus: { classPropertyName: "selectOnFocus", publicName: "selectOnFocus", isSignal: true, isRequired: false, transformFunction: null }, decimals: { classPropertyName: "decimals", publicName: "decimals", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: true, isRequired: false, transformFunction: null }, isInvisible: { classPropertyName: "isInvisible", publicName: "isInvisible", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, marginTop: { classPropertyName: "marginTop", publicName: "marginTop", isSignal: true, isRequired: false, transformFunction: null }, marginRight: { classPropertyName: "marginRight", publicName: "marginRight", isSignal: true, isRequired: false, transformFunction: null }, marginBottom: { classPropertyName: "marginBottom", publicName: "marginBottom", isSignal: true, isRequired: false, transformFunction: null }, marginLeft: { classPropertyName: "marginLeft", publicName: "marginLeft", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onKeyupEnter: "onKeyupEnter", onInput: "onInput", onClickExternalButton: "onClickExternalButton" }, providers: [CONTROL_VALUE(CoerNumberBox)], viewQueries: [{ propertyName: "_coerNumberbox", first: true, predicate: ["coerNumberbox"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"coer-number-box\">\r\n @if(_showButtonLeft) {\r\n <div class=\"button-container\">\r\n <coer-button\r\n type=\"icon-no-border\"\r\n color=\"dark\"\r\n [icon]=\"_buttonIcon\" \r\n [isDisabled]=\"_isDisabledExternalButton\" \r\n (onClick)=\"_isEnable() ? onClickExternalButton.emit() : null\"\r\n ></coer-button>\r\n </div>\r\n }\r\n\r\n <mat-form-field\r\n [id]=\"_id + '-container'\"\r\n [floatLabel]=\"_floatLabel()\"\r\n [ngClass]=\"{\r\n 'readonly': isReadonly() && !isLoading(),\r\n 'd-none': isInvisible()\r\n }\"\r\n [style]=\"{\r\n 'width': width(),\r\n 'min-width': minWidth(),\r\n 'max-width': maxWidth(),\r\n 'margin-top': marginTop(),\r\n 'margin-right': marginRight(),\r\n 'margin-bottom': marginBottom(),\r\n 'margin-left': marginLeft()\r\n }\">\r\n <mat-label>{{ label() }}</mat-label>\r\n\r\n <input #coerNumberbox matInput\r\n [id]=\"_id\"\r\n type=\"text\"\r\n [placeholder]=\"placeholder()\"\r\n [disabled]=\"!_isEnable()\"\r\n [value]=\"_value\"\r\n (input)=\"SetValue(coerNumberbox.value)\"\r\n (blur)=\"SetTouched(true)\"\r\n [ngClass]=\"{ 'caret-none': _hideCaret }\"\r\n [style]=\"{\r\n 'cursor': isLoading() ? 'wait' : null,\r\n 'margin-top': (_floatLabel() == 'auto') ? '15px' : '9px',\r\n 'padding-right': _paddingRight(),\r\n 'text-align': textPosition()\r\n }\">\r\n\r\n @if(isLoading()) {\r\n <div class=\"placeholder-glow\">\r\n <span class=\"placeholder\"></span>\r\n </div>\r\n }\r\n\r\n <span ngClass=\"icon-container\">\r\n @if(isInvalid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-exclamation\"></i>\r\n }\r\n\r\n @else if(isValid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-check text-green\"></i>\r\n }\r\n </span>\r\n </mat-form-field>\r\n\r\n @if(isInvisible()) {\r\n <mat-form-field class=\"invisible\">\r\n <input matInput [disabled]=\"true\"> \r\n </mat-form-field> \r\n }\r\n\r\n @if(_showButtonRight) {\r\n <div class=\"button-container\">\r\n <coer-button\r\n type=\"icon-no-border\"\r\n color=\"dark\"\r\n [icon]=\"_buttonIcon\" \r\n [isDisabled]=\"_isDisabledExternalButton\" \r\n (onClick)=\"_isEnable() ? onClickExternalButton.emit() : null\"\r\n ></coer-button>\r\n </div>\r\n }\r\n</div>", styles: ["div.coer-number-box{display:flex;align-items:center}div.coer-number-box mat-form-field{position:relative!important}div.coer-number-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex{height:40px!important}div.coer-number-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{width:100%!important;height:40px!important;padding:0!important}div.coer-number-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label{overflow:visible!important;position:absolute!important;top:20px!important}div.coer-number-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label.mdc-floating-label--float-above mat-label{color:var(--primary-inner);font-weight:700;position:relative;left:-10px;top:2px}div.coer-number-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input{font-weight:400!important;font-size:17px!important;color:var(--black)!important}div.coer-number-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input.caret-none{caret-color:transparent!important}div.coer-number-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active,div.coer-number-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:before,div.coer-number-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:after{border-bottom-color:var(--primary-inner)!important}div.coer-number-box mat-form-field div.mat-mdc-form-field-subscript-wrapper.mat-mdc-form-field-bottom-align{height:0px!important}div.coer-number-box mat-form-field span.icon-container{position:absolute!important;top:1px!important;right:-14px!important;z-index:5!important;width:30px;height:40px;display:flex;align-items:center;justify-content:center}div.coer-number-box mat-form-field span.icon-container i{font-size:20px!important}div.coer-number-box mat-form-field span.icon-container i.fa-solid.fa-xmark,div.coer-number-box mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass{color:#caced1!important;cursor:pointer!important}div.coer-number-box mat-form-field span.icon-container i.fa-solid.fa-xmark:hover,div.coer-number-box mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass:hover{color:#6c757d!important}div.coer-number-box mat-form-field span.icon-container i.fa-solid.fa-circle-check{color:var(--green)!important}div.coer-number-box mat-form-field span.icon-container i.fa-solid.fa-circle-exclamation{color:var(--red)!important}div.coer-number-box mat-form-field span.placeholder{width:calc(100% + 32px)!important;height:40px!important;position:absolute!important;z-index:1!important;top:0!important;left:-16px!important}div.coer-number-box mat-form-field .placeholder,div.coer-number-box mat-form-field .placeholder *,div.coer-number-box mat-form-field .placeholder-glow,div.coer-number-box mat-form-field .placeholder-glow *{cursor:wait!important}div.coer-number-box mat-form-field.readonly div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:#bbbbbb83!important}div.coer-number-box div.button-container{width:40px!important;height:40px!important;display:flex!important;align-items:center!important;justify-content:center!important;background-color:#e6e7e9!important}coer-grid table tbody tr td.coer-numberbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:transparent!important;padding-left:9px!important;padding-right:9px!important}coer-grid table tbody tr td.coer-numberbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple,coer-grid table tbody tr td.coer-numberbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple:before,coer-grid table tbody tr td.coer-numberbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple:after{border-bottom-color:transparent!important}coer-grid table tbody tr td.coer-numberbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex{height:28px!important}coer-grid table tbody tr td.coer-numberbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{height:28px!important}coer-grid table tbody tr td.coer-numberbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input{margin-top:3px!important;font-size:14px!important}coer-grid table tbody tr td.coer-numberbox mat-form-field span.icon-container{transform:translate(-5px,-6px)!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2$4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: CoerButton, selector: "coer-button", inputs: ["id", "color", "type", "icon", "iconPosition", "path", "animation", "isLoading", "isDisabled", "isReadonly", "isInvisible", "width", "minWidth", "maxWidth", "height", "minHeight", "marginTop", "marginRight", "marginBottom", "marginLeft", "tooltipPosition", "tooltip"], outputs: ["onClick"] }] }); }
|
1151
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerNumberBox, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
1152
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerNumberBox, isStandalone: false, selector: "coer-numberbox", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, textPosition: { classPropertyName: "textPosition", publicName: "textPosition", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, isInvalid: { classPropertyName: "isInvalid", publicName: "isInvalid", isSignal: true, isRequired: false, transformFunction: null }, isValid: { classPropertyName: "isValid", publicName: "isValid", isSignal: true, isRequired: false, transformFunction: null }, externalButton: { classPropertyName: "externalButton", publicName: "externalButton", isSignal: true, isRequired: false, transformFunction: null }, selectOnFocus: { classPropertyName: "selectOnFocus", publicName: "selectOnFocus", isSignal: true, isRequired: false, transformFunction: null }, decimals: { classPropertyName: "decimals", publicName: "decimals", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: true, isRequired: false, transformFunction: null }, isInvisible: { classPropertyName: "isInvisible", publicName: "isInvisible", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, marginTop: { classPropertyName: "marginTop", publicName: "marginTop", isSignal: true, isRequired: false, transformFunction: null }, marginRight: { classPropertyName: "marginRight", publicName: "marginRight", isSignal: true, isRequired: false, transformFunction: null }, marginBottom: { classPropertyName: "marginBottom", publicName: "marginBottom", isSignal: true, isRequired: false, transformFunction: null }, marginLeft: { classPropertyName: "marginLeft", publicName: "marginLeft", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onKeyupEnter: "onKeyupEnter", onInput: "onInput", onClickExternalButton: "onClickExternalButton" }, providers: [CONTROL_VALUE(CoerNumberBox)], viewQueries: [{ propertyName: "_coerNumberbox", first: true, predicate: ["coerNumberbox"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"coer-number-box\">\r\n @if(_showButtonLeft) {\r\n <div class=\"button-container\">\r\n <coer-button\r\n type=\"icon-no-border\"\r\n color=\"dark\"\r\n [icon]=\"_buttonIcon\" \r\n [isDisabled]=\"_isDisabledExternalButton\" \r\n (onClick)=\"_isEnable() ? onClickExternalButton.emit() : null\"\r\n ></coer-button>\r\n </div>\r\n }\r\n\r\n <mat-form-field\r\n [id]=\"_id + '-container'\"\r\n [floatLabel]=\"_floatLabel()\"\r\n [ngClass]=\"{\r\n 'readonly': isReadonly() && !isLoading(),\r\n 'd-none': isInvisible()\r\n }\"\r\n [style]=\"{\r\n 'width': width(),\r\n 'min-width': minWidth(),\r\n 'max-width': maxWidth(),\r\n 'margin-top': marginTop(),\r\n 'margin-right': marginRight(),\r\n 'margin-bottom': marginBottom(),\r\n 'margin-left': marginLeft()\r\n }\">\r\n <mat-label>{{ label() }}</mat-label>\r\n\r\n <input #coerNumberbox matInput\r\n [id]=\"_id\"\r\n type=\"text\"\r\n [placeholder]=\"placeholder()\"\r\n [disabled]=\"!_isEnable()\"\r\n [value]=\"_value\"\r\n (input)=\"SetValue(coerNumberbox.value)\"\r\n (blur)=\"SetTouched(true)\"\r\n [ngClass]=\"{ 'caret-none': _hideCaret }\"\r\n [style]=\"{\r\n 'cursor': isLoading() ? 'wait' : null,\r\n 'margin-top': (_floatLabel() == 'auto') ? '15px' : '9px',\r\n 'padding-right': _paddingRight(),\r\n 'text-align': textPosition()\r\n }\">\r\n\r\n @if(isLoading()) {\r\n <div class=\"placeholder-glow\">\r\n <span class=\"placeholder\"></span>\r\n </div>\r\n }\r\n\r\n <span ngClass=\"icon-container\">\r\n @if(isInvalid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-exclamation\"></i>\r\n }\r\n\r\n @else if(isValid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-check text-green\"></i>\r\n }\r\n </span>\r\n </mat-form-field>\r\n\r\n @if(isInvisible()) {\r\n <mat-form-field class=\"invisible\">\r\n <input matInput [disabled]=\"true\"> \r\n </mat-form-field> \r\n }\r\n\r\n @if(_showButtonRight) {\r\n <div class=\"button-container\">\r\n <coer-button\r\n type=\"icon-no-border\"\r\n color=\"dark\"\r\n [icon]=\"_buttonIcon\" \r\n [isDisabled]=\"_isDisabledExternalButton\" \r\n (onClick)=\"_isEnable() ? onClickExternalButton.emit() : null\"\r\n ></coer-button>\r\n </div>\r\n }\r\n</div>", styles: ["div.coer-number-box{display:flex;align-items:center}div.coer-number-box mat-form-field{position:relative!important}div.coer-number-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex{height:40px!important}div.coer-number-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{width:100%!important;height:40px!important;padding:0!important}div.coer-number-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label{overflow:visible!important;position:absolute!important;top:20px!important}div.coer-number-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label.mdc-floating-label--float-above mat-label{color:var(--primary-inner);font-weight:700;position:relative;left:-10px;top:2px}div.coer-number-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input{font-weight:400!important;font-size:17px!important;color:var(--black)!important}div.coer-number-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input.caret-none{caret-color:transparent!important}div.coer-number-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active,div.coer-number-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:before,div.coer-number-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:after{border-bottom-color:var(--primary-inner)!important}div.coer-number-box mat-form-field div.mat-mdc-form-field-subscript-wrapper.mat-mdc-form-field-bottom-align{height:0px!important}div.coer-number-box mat-form-field span.icon-container{position:absolute!important;top:1px!important;right:-14px!important;z-index:5!important;width:30px;height:40px;display:flex;align-items:center;justify-content:center}div.coer-number-box mat-form-field span.icon-container i{font-size:20px!important}div.coer-number-box mat-form-field span.icon-container i.fa-solid.fa-xmark,div.coer-number-box mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass{color:#caced1!important;cursor:pointer!important}div.coer-number-box mat-form-field span.icon-container i.fa-solid.fa-xmark:hover,div.coer-number-box mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass:hover{color:#6c757d!important}div.coer-number-box mat-form-field span.icon-container i.fa-solid.fa-circle-check{color:var(--green)!important}div.coer-number-box mat-form-field span.icon-container i.fa-solid.fa-circle-exclamation{color:var(--red)!important}div.coer-number-box mat-form-field span.placeholder{width:calc(100% + 32px)!important;height:40px!important;position:absolute!important;z-index:1!important;top:0!important;left:-16px!important}div.coer-number-box mat-form-field .placeholder,div.coer-number-box mat-form-field .placeholder *,div.coer-number-box mat-form-field .placeholder-glow,div.coer-number-box mat-form-field .placeholder-glow *{cursor:wait!important}div.coer-number-box mat-form-field.readonly div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:#bbbbbb83!important}div.coer-number-box div.button-container{width:40px!important;height:40px!important;display:flex!important;align-items:center!important;justify-content:center!important;background-color:#e6e7e9!important}coer-grid table tbody tr td.coer-numberbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:transparent!important;padding-left:9px!important;padding-right:9px!important}coer-grid table tbody tr td.coer-numberbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple,coer-grid table tbody tr td.coer-numberbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple:before,coer-grid table tbody tr td.coer-numberbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple:after{border-bottom-color:transparent!important}coer-grid table tbody tr td.coer-numberbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex{height:28px!important}coer-grid table tbody tr td.coer-numberbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{height:28px!important}coer-grid table tbody tr td.coer-numberbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input{margin-top:3px!important;font-size:14px!important}coer-grid table tbody tr td.coer-numberbox mat-form-field span.icon-container{transform:translate(-5px,-6px)!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2$4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: CoerButton, selector: "coer-button", inputs: ["id", "color", "type", "icon", "iconPosition", "path", "isLoading", "isDisabled", "isReadonly", "isInvisible", "width", "minWidth", "maxWidth", "height", "minHeight", "marginTop", "marginRight", "marginBottom", "marginLeft", "tooltip", "tooltipPosition"], outputs: ["onClick"] }] }); }
|
1105
1153
|
}
|
1106
1154
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerNumberBox, decorators: [{
|
1107
1155
|
type: Component,
|
1108
1156
|
args: [{ selector: 'coer-numberbox', providers: [CONTROL_VALUE(CoerNumberBox)], standalone: false, template: "<div class=\"coer-number-box\">\r\n @if(_showButtonLeft) {\r\n <div class=\"button-container\">\r\n <coer-button\r\n type=\"icon-no-border\"\r\n color=\"dark\"\r\n [icon]=\"_buttonIcon\" \r\n [isDisabled]=\"_isDisabledExternalButton\" \r\n (onClick)=\"_isEnable() ? onClickExternalButton.emit() : null\"\r\n ></coer-button>\r\n </div>\r\n }\r\n\r\n <mat-form-field\r\n [id]=\"_id + '-container'\"\r\n [floatLabel]=\"_floatLabel()\"\r\n [ngClass]=\"{\r\n 'readonly': isReadonly() && !isLoading(),\r\n 'd-none': isInvisible()\r\n }\"\r\n [style]=\"{\r\n 'width': width(),\r\n 'min-width': minWidth(),\r\n 'max-width': maxWidth(),\r\n 'margin-top': marginTop(),\r\n 'margin-right': marginRight(),\r\n 'margin-bottom': marginBottom(),\r\n 'margin-left': marginLeft()\r\n }\">\r\n <mat-label>{{ label() }}</mat-label>\r\n\r\n <input #coerNumberbox matInput\r\n [id]=\"_id\"\r\n type=\"text\"\r\n [placeholder]=\"placeholder()\"\r\n [disabled]=\"!_isEnable()\"\r\n [value]=\"_value\"\r\n (input)=\"SetValue(coerNumberbox.value)\"\r\n (blur)=\"SetTouched(true)\"\r\n [ngClass]=\"{ 'caret-none': _hideCaret }\"\r\n [style]=\"{\r\n 'cursor': isLoading() ? 'wait' : null,\r\n 'margin-top': (_floatLabel() == 'auto') ? '15px' : '9px',\r\n 'padding-right': _paddingRight(),\r\n 'text-align': textPosition()\r\n }\">\r\n\r\n @if(isLoading()) {\r\n <div class=\"placeholder-glow\">\r\n <span class=\"placeholder\"></span>\r\n </div>\r\n }\r\n\r\n <span ngClass=\"icon-container\">\r\n @if(isInvalid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-exclamation\"></i>\r\n }\r\n\r\n @else if(isValid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-check text-green\"></i>\r\n }\r\n </span>\r\n </mat-form-field>\r\n\r\n @if(isInvisible()) {\r\n <mat-form-field class=\"invisible\">\r\n <input matInput [disabled]=\"true\"> \r\n </mat-form-field> \r\n }\r\n\r\n @if(_showButtonRight) {\r\n <div class=\"button-container\">\r\n <coer-button\r\n type=\"icon-no-border\"\r\n color=\"dark\"\r\n [icon]=\"_buttonIcon\" \r\n [isDisabled]=\"_isDisabledExternalButton\" \r\n (onClick)=\"_isEnable() ? onClickExternalButton.emit() : null\"\r\n ></coer-button>\r\n </div>\r\n }\r\n</div>", styles: ["div.coer-number-box{display:flex;align-items:center}div.coer-number-box mat-form-field{position:relative!important}div.coer-number-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex{height:40px!important}div.coer-number-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{width:100%!important;height:40px!important;padding:0!important}div.coer-number-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label{overflow:visible!important;position:absolute!important;top:20px!important}div.coer-number-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label.mdc-floating-label--float-above mat-label{color:var(--primary-inner);font-weight:700;position:relative;left:-10px;top:2px}div.coer-number-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input{font-weight:400!important;font-size:17px!important;color:var(--black)!important}div.coer-number-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input.caret-none{caret-color:transparent!important}div.coer-number-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active,div.coer-number-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:before,div.coer-number-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:after{border-bottom-color:var(--primary-inner)!important}div.coer-number-box mat-form-field div.mat-mdc-form-field-subscript-wrapper.mat-mdc-form-field-bottom-align{height:0px!important}div.coer-number-box mat-form-field span.icon-container{position:absolute!important;top:1px!important;right:-14px!important;z-index:5!important;width:30px;height:40px;display:flex;align-items:center;justify-content:center}div.coer-number-box mat-form-field span.icon-container i{font-size:20px!important}div.coer-number-box mat-form-field span.icon-container i.fa-solid.fa-xmark,div.coer-number-box mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass{color:#caced1!important;cursor:pointer!important}div.coer-number-box mat-form-field span.icon-container i.fa-solid.fa-xmark:hover,div.coer-number-box mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass:hover{color:#6c757d!important}div.coer-number-box mat-form-field span.icon-container i.fa-solid.fa-circle-check{color:var(--green)!important}div.coer-number-box mat-form-field span.icon-container i.fa-solid.fa-circle-exclamation{color:var(--red)!important}div.coer-number-box mat-form-field span.placeholder{width:calc(100% + 32px)!important;height:40px!important;position:absolute!important;z-index:1!important;top:0!important;left:-16px!important}div.coer-number-box mat-form-field .placeholder,div.coer-number-box mat-form-field .placeholder *,div.coer-number-box mat-form-field .placeholder-glow,div.coer-number-box mat-form-field .placeholder-glow *{cursor:wait!important}div.coer-number-box mat-form-field.readonly div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:#bbbbbb83!important}div.coer-number-box div.button-container{width:40px!important;height:40px!important;display:flex!important;align-items:center!important;justify-content:center!important;background-color:#e6e7e9!important}coer-grid table tbody tr td.coer-numberbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:transparent!important;padding-left:9px!important;padding-right:9px!important}coer-grid table tbody tr td.coer-numberbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple,coer-grid table tbody tr td.coer-numberbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple:before,coer-grid table tbody tr td.coer-numberbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple:after{border-bottom-color:transparent!important}coer-grid table tbody tr td.coer-numberbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex{height:28px!important}coer-grid table tbody tr td.coer-numberbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{height:28px!important}coer-grid table tbody tr td.coer-numberbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input{margin-top:3px!important;font-size:14px!important}coer-grid table tbody tr td.coer-numberbox mat-form-field span.icon-container{transform:translate(-5px,-6px)!important}\n"] }]
|
1109
|
-
}],
|
1110
|
-
type: Input
|
1111
|
-
}], externalButton: [{
|
1112
|
-
type: Input
|
1113
|
-
}] } });
|
1157
|
+
}], ctorParameters: () => [] });
|
1114
1158
|
|
1115
1159
|
class CoerSelectbox extends ControlValue {
|
1160
|
+
//Constructor
|
1116
1161
|
constructor() {
|
1117
|
-
super(
|
1118
|
-
//
|
1119
|
-
this.
|
1162
|
+
super();
|
1163
|
+
//Elements
|
1164
|
+
this._coerTextBox = viewChild.required('coerTextBox');
|
1120
1165
|
//Variables
|
1166
|
+
this._value = null;
|
1121
1167
|
this._scrollByRow = 40.8;
|
1122
|
-
this._coerTextBox = viewChild.required('coerTextBox');
|
1123
1168
|
this._id = Tools.GetGuid('coer-selectBox');
|
1124
1169
|
this._index = signal(-1);
|
1125
1170
|
this._search = signal('');
|
@@ -1128,7 +1173,9 @@ class CoerSelectbox extends ControlValue {
|
|
1128
1173
|
this._isOverMenu = signal(false);
|
1129
1174
|
this._isLoadingEvent = signal(false);
|
1130
1175
|
this._scroll = signal(0);
|
1176
|
+
//Inputs
|
1131
1177
|
this.id = input('');
|
1178
|
+
this.value = input(null);
|
1132
1179
|
this.label = input('');
|
1133
1180
|
this.placeholder = input('-- Select --');
|
1134
1181
|
this.isInvalid = input(false);
|
@@ -1172,28 +1219,130 @@ class CoerSelectbox extends ControlValue {
|
|
1172
1219
|
.splice(0, this.rowsByPage())
|
1173
1220
|
.map((item) => Object.assign(item, { indexRow: indexRow++ }));
|
1174
1221
|
});
|
1175
|
-
/** */
|
1176
|
-
this._GetIndexRow = (item) => {
|
1177
|
-
return item['indexRow'];
|
1178
|
-
};
|
1179
|
-
/** */
|
1180
|
-
this._GetDisplay = (item) => {
|
1181
|
-
return Tools.IsNotNull(item) ? item[this.displayProperty()] : '';
|
1182
|
-
};
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1222
|
+
/** */
|
1223
|
+
this._GetIndexRow = (item) => {
|
1224
|
+
return item['indexRow'];
|
1225
|
+
};
|
1226
|
+
/** */
|
1227
|
+
this._GetDisplay = (item) => {
|
1228
|
+
return Tools.IsNotNull(item) ? item[this.displayProperty()] : '';
|
1229
|
+
};
|
1230
|
+
this._effect = effect(() => {
|
1231
|
+
this.SetValue(Tools.IsNotNull(this.value()) ? this.value() : null);
|
1232
|
+
});
|
1233
|
+
}
|
1234
|
+
//AfterViewInit
|
1235
|
+
ngAfterViewInit() {
|
1236
|
+
Tools.Sleep().then(_ => {
|
1237
|
+
//Container
|
1238
|
+
this._container = document.getElementById(`${this._id}-container`);
|
1239
|
+
this._container.addEventListener('mouseenter', () => {
|
1240
|
+
this._isOverMenu.set(true);
|
1241
|
+
});
|
1242
|
+
this._container.addEventListener('mouseleave', () => {
|
1243
|
+
this._isOverMenu.set(false);
|
1244
|
+
});
|
1245
|
+
//DropDown
|
1246
|
+
this._dropDownMenu = document.getElementById(`${this._id}-dropdown-menu`);
|
1247
|
+
this._dropDownMenu.addEventListener('mouseenter', () => {
|
1248
|
+
this._isOverMenu.set(true);
|
1249
|
+
});
|
1250
|
+
this._dropDownMenu.addEventListener('mouseleave', () => {
|
1251
|
+
this._isOverMenu.set(false);
|
1252
|
+
});
|
1253
|
+
//TextBox
|
1254
|
+
this._textbox = document.getElementById(this._id);
|
1255
|
+
this._textbox.addEventListener('focus', () => {
|
1256
|
+
if (this._isEnable())
|
1257
|
+
this.Focus();
|
1258
|
+
else
|
1259
|
+
this.Blur();
|
1260
|
+
});
|
1261
|
+
this._textbox.addEventListener('keyup', (event) => {
|
1262
|
+
const { key } = event;
|
1263
|
+
if (['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(key)) {
|
1264
|
+
if (key === 'ArrowUp') {
|
1265
|
+
const firstIndex = (this._dataSource().length <= 0) ? -1 : 0;
|
1266
|
+
if ((this._index() - 1) >= firstIndex) {
|
1267
|
+
this._index.update(index => index - 1);
|
1268
|
+
if (this._index() >= 3)
|
1269
|
+
this._scroll.update(scroll => scroll -= this._scrollByRow);
|
1270
|
+
else
|
1271
|
+
this._scroll.set(0);
|
1272
|
+
this._dropDownMenu.scrollTo(0, this._scroll());
|
1273
|
+
}
|
1274
|
+
else {
|
1275
|
+
this._scroll.set(0);
|
1276
|
+
this._index.set(-1);
|
1277
|
+
this._textbox.focus();
|
1278
|
+
this._textbox.select();
|
1279
|
+
}
|
1280
|
+
this._dropDownMenu.scrollTo(0, this._scroll());
|
1281
|
+
}
|
1282
|
+
else if (key === 'ArrowDown') {
|
1283
|
+
const lastIndex = (this._dataSource().length - 1);
|
1284
|
+
if ((this._index() + 1) <= lastIndex) {
|
1285
|
+
this._index.update(index => index + 1);
|
1286
|
+
if (this._index() >= 3)
|
1287
|
+
this._scroll.update(scroll => scroll += this._scrollByRow);
|
1288
|
+
}
|
1289
|
+
this._dropDownMenu.scrollTo(0, this._scroll());
|
1290
|
+
}
|
1291
|
+
else if (['ArrowLeft', 'ArrowRight'].includes(key)) {
|
1292
|
+
if (Tools.IsNotNull(this._value) && !this._isDirty()) {
|
1293
|
+
this._scroll.set(0);
|
1294
|
+
this._dropDownMenu.scrollTo(0, this._scroll());
|
1295
|
+
this._Search(this._displayed);
|
1296
|
+
}
|
1297
|
+
this._isDirty.set(true);
|
1298
|
+
}
|
1299
|
+
}
|
1300
|
+
else {
|
1301
|
+
if (key == 'Delete' && this._search() == '') {
|
1302
|
+
this.Unselect();
|
1303
|
+
}
|
1304
|
+
this._isDirty.set(true);
|
1305
|
+
}
|
1306
|
+
});
|
1307
|
+
this._textbox.addEventListener('keydown', () => {
|
1308
|
+
if (!this._isOpen())
|
1309
|
+
this._Open();
|
1310
|
+
});
|
1311
|
+
this._textbox.addEventListener('mouseenter', () => {
|
1312
|
+
this._isOverMenu.set(true);
|
1313
|
+
});
|
1314
|
+
this._textbox.addEventListener('mouseleave', () => {
|
1315
|
+
this._isOverMenu.set(false);
|
1316
|
+
});
|
1317
|
+
this._textbox.addEventListener('paste', () => {
|
1318
|
+
Tools.Sleep().then(_ => {
|
1319
|
+
this._search.update(search => search = search.toString().trim());
|
1320
|
+
});
|
1321
|
+
});
|
1322
|
+
//Document
|
1323
|
+
document.addEventListener('click', () => {
|
1324
|
+
if (!this._isOverMenu())
|
1325
|
+
this.Blur();
|
1326
|
+
});
|
1327
|
+
document.addEventListener('keyup', (event) => {
|
1328
|
+
if (event.key === 'Enter') {
|
1329
|
+
if (this._index() >= 0) {
|
1330
|
+
if (Tools.IsNotNull(this._value) && this._search() == this._value[this.displayProperty()]) {
|
1331
|
+
this._isLoadingEvent.set(true);
|
1332
|
+
}
|
1333
|
+
const dataSource = Tools.BreakReference(this._dataSource());
|
1334
|
+
const _value = dataSource.find(x => x.indexRow == this._index());
|
1335
|
+
this._SelectItem(_value);
|
1336
|
+
this._isLoadingEvent.set(false);
|
1337
|
+
}
|
1338
|
+
this.Blur();
|
1339
|
+
}
|
1340
|
+
});
|
1341
|
+
});
|
1189
1342
|
}
|
1190
|
-
|
1191
|
-
|
1192
|
-
this.
|
1193
|
-
}
|
1194
|
-
//getter
|
1195
|
-
get value() {
|
1196
|
-
return this._value;
|
1343
|
+
//OnDestroy
|
1344
|
+
ngOnDestroy() {
|
1345
|
+
this._effect?.destroy();
|
1197
1346
|
}
|
1198
1347
|
//getter
|
1199
1348
|
get _displayed() {
|
@@ -1230,7 +1379,7 @@ class CoerSelectbox extends ControlValue {
|
|
1230
1379
|
return this.isInvalid() || this.isValid() || this._showCancel
|
1231
1380
|
? '55px' : '30px';
|
1232
1381
|
}
|
1233
|
-
|
1382
|
+
//ControlValueAccessor
|
1234
1383
|
SetValue(_value) {
|
1235
1384
|
if (_value === undefined)
|
1236
1385
|
_value = null;
|
@@ -1241,7 +1390,7 @@ class CoerSelectbox extends ControlValue {
|
|
1241
1390
|
this._value = _value;
|
1242
1391
|
this._search.set(this._GetDisplay(_value));
|
1243
1392
|
}
|
1244
|
-
|
1393
|
+
//ControlValueAccessor
|
1245
1394
|
writeValue(_value) {
|
1246
1395
|
if (_value === undefined)
|
1247
1396
|
_value = null;
|
@@ -1249,113 +1398,6 @@ class CoerSelectbox extends ControlValue {
|
|
1249
1398
|
this._search.set(this._GetDisplay(_value));
|
1250
1399
|
}
|
1251
1400
|
/** */
|
1252
|
-
_SetEvents() {
|
1253
|
-
//Container
|
1254
|
-
this._container = document.getElementById(`${this._id}-container`);
|
1255
|
-
this._container.addEventListener('mouseenter', () => {
|
1256
|
-
this._isOverMenu.set(true);
|
1257
|
-
});
|
1258
|
-
this._container.addEventListener('mouseleave', () => {
|
1259
|
-
this._isOverMenu.set(false);
|
1260
|
-
});
|
1261
|
-
//DropDown
|
1262
|
-
this._dropDownMenu = document.getElementById(`${this._id}-dropdown-menu`);
|
1263
|
-
this._dropDownMenu.addEventListener('mouseenter', () => {
|
1264
|
-
this._isOverMenu.set(true);
|
1265
|
-
});
|
1266
|
-
this._dropDownMenu.addEventListener('mouseleave', () => {
|
1267
|
-
this._isOverMenu.set(false);
|
1268
|
-
});
|
1269
|
-
//TextBox
|
1270
|
-
this._textbox = document.getElementById(this._id);
|
1271
|
-
this._textbox.addEventListener('focus', () => {
|
1272
|
-
if (this._isEnable())
|
1273
|
-
this.Focus();
|
1274
|
-
else
|
1275
|
-
this.Blur();
|
1276
|
-
});
|
1277
|
-
this._textbox.addEventListener('keyup', (event) => {
|
1278
|
-
const { key } = event;
|
1279
|
-
if (['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(key)) {
|
1280
|
-
if (key === 'ArrowUp') {
|
1281
|
-
const firstIndex = (this._dataSource().length <= 0) ? -1 : 0;
|
1282
|
-
if ((this._index() - 1) >= firstIndex) {
|
1283
|
-
this._index.update(index => index - 1);
|
1284
|
-
if (this._index() >= 3)
|
1285
|
-
this._scroll.update(scroll => scroll -= this._scrollByRow);
|
1286
|
-
else
|
1287
|
-
this._scroll.set(0);
|
1288
|
-
this._dropDownMenu.scrollTo(0, this._scroll());
|
1289
|
-
}
|
1290
|
-
else {
|
1291
|
-
this._scroll.set(0);
|
1292
|
-
this._index.set(-1);
|
1293
|
-
this._textbox.focus();
|
1294
|
-
this._textbox.select();
|
1295
|
-
}
|
1296
|
-
this._dropDownMenu.scrollTo(0, this._scroll());
|
1297
|
-
}
|
1298
|
-
else if (key === 'ArrowDown') {
|
1299
|
-
const lastIndex = (this._dataSource().length - 1);
|
1300
|
-
if ((this._index() + 1) <= lastIndex) {
|
1301
|
-
this._index.update(index => index + 1);
|
1302
|
-
if (this._index() >= 3)
|
1303
|
-
this._scroll.update(scroll => scroll += this._scrollByRow);
|
1304
|
-
}
|
1305
|
-
this._dropDownMenu.scrollTo(0, this._scroll());
|
1306
|
-
}
|
1307
|
-
else if (['ArrowLeft', 'ArrowRight'].includes(key)) {
|
1308
|
-
if (Tools.IsNotNull(this._value) && !this._isDirty()) {
|
1309
|
-
this._scroll.set(0);
|
1310
|
-
this._dropDownMenu.scrollTo(0, this._scroll());
|
1311
|
-
this._Search(this._displayed);
|
1312
|
-
}
|
1313
|
-
this._isDirty.set(true);
|
1314
|
-
}
|
1315
|
-
}
|
1316
|
-
else {
|
1317
|
-
if (key == 'Delete' && this._search() == '') {
|
1318
|
-
this.Unselect();
|
1319
|
-
}
|
1320
|
-
this._isDirty.set(true);
|
1321
|
-
}
|
1322
|
-
});
|
1323
|
-
this._textbox.addEventListener('keydown', (event) => {
|
1324
|
-
if (!this._isOpen())
|
1325
|
-
this._Open();
|
1326
|
-
});
|
1327
|
-
this._textbox.addEventListener('mouseenter', () => {
|
1328
|
-
this._isOverMenu.set(true);
|
1329
|
-
});
|
1330
|
-
this._textbox.addEventListener('mouseleave', () => {
|
1331
|
-
this._isOverMenu.set(false);
|
1332
|
-
});
|
1333
|
-
this._textbox.addEventListener('paste', () => {
|
1334
|
-
Tools.Sleep().then(_ => {
|
1335
|
-
this._search.update(search => search = search.toString().trim());
|
1336
|
-
});
|
1337
|
-
});
|
1338
|
-
//Document
|
1339
|
-
document.addEventListener('click', () => {
|
1340
|
-
if (!this._isOverMenu())
|
1341
|
-
this.Blur();
|
1342
|
-
});
|
1343
|
-
document.addEventListener('keyup', (event) => {
|
1344
|
-
if (event.key === 'Enter') {
|
1345
|
-
if (this._index() >= 0) {
|
1346
|
-
if (Tools.IsNotNull(this._value) && this._search() == this._value[this.displayProperty()]) {
|
1347
|
-
this._isLoadingEvent.set(true);
|
1348
|
-
}
|
1349
|
-
const dataSource = Tools.BreakReference(this._dataSource());
|
1350
|
-
const _value = dataSource.find(x => x.indexRow == this._index());
|
1351
|
-
this._SelectItem(_value);
|
1352
|
-
this._isLoadingEvent.set(false);
|
1353
|
-
}
|
1354
|
-
this.Blur();
|
1355
|
-
}
|
1356
|
-
});
|
1357
|
-
}
|
1358
|
-
/** */
|
1359
1401
|
_SelectItem(item) {
|
1360
1402
|
if (Tools.IsNotNull(item)) {
|
1361
1403
|
const _item = Tools.BreakReference(this.dataSource()[item.index]);
|
@@ -1447,29 +1489,29 @@ class CoerSelectbox extends ControlValue {
|
|
1447
1489
|
}
|
1448
1490
|
});
|
1449
1491
|
}
|
1450
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerSelectbox, deps:
|
1451
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerSelectbox, isStandalone: false, selector: "coer-selectbox", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, isInvalid: { classPropertyName: "isInvalid", publicName: "isInvalid", isSignal: true, isRequired: false, transformFunction: null }, isValid: { classPropertyName: "isValid", publicName: "isValid", isSignal: true, isRequired: false, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: false, transformFunction: null }, displayProperty: { classPropertyName: "displayProperty", publicName: "displayProperty", isSignal: true, isRequired: false, transformFunction: null }, rowsByPage: { classPropertyName: "rowsByPage", publicName: "rowsByPage", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: true, isRequired: false, transformFunction: null }, isInvisible: { classPropertyName: "isInvisible", publicName: "isInvisible", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, marginTop: { classPropertyName: "marginTop", publicName: "marginTop", isSignal: true, isRequired: false, transformFunction: null }, marginRight: { classPropertyName: "marginRight", publicName: "marginRight", isSignal: true, isRequired: false, transformFunction: null }, marginBottom: { classPropertyName: "marginBottom", publicName: "marginBottom", isSignal: true, isRequired: false, transformFunction: null }, marginLeft: { classPropertyName: "marginLeft", publicName: "marginLeft", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSelected: "onSelected", onUnselect: "onUnselect" }, providers: [CONTROL_VALUE(CoerSelectbox)], viewQueries: [{ propertyName: "_coerTextBox", first: true, predicate: ["coerTextBox"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"coer-select-box\">\r\n <mat-form-field\r\n [id]=\"_id + '-container'\" \r\n [floatLabel]=\"_floatLabel()\"\r\n [ngClass]=\"{\r\n 'readonly': isReadonly() && !isLoading()\r\n }\"\r\n [style]=\"{\r\n 'width': width(),\r\n 'min-width': minWidth(),\r\n 'max-width': maxWidth(),\r\n 'margin-top': marginTop(),\r\n 'margin-right': marginRight(),\r\n 'margin-bottom': marginBottom(),\r\n 'margin-left': marginLeft()\r\n }\">\r\n <mat-label>{{ label() }}</mat-label>\r\n\r\n <input #coerTextBox matInput\r\n [id]=\"_id\"\r\n type=\"text\"\r\n [value]=\"_search()\"\r\n [placeholder]=\"_placeholder\"\r\n [disabled]=\"!_isEnable()\"\r\n (input)=\"_Search(coerTextBox.value)\"\r\n (blur)=\"SetTouched(true)\"\r\n [style]=\"{\r\n 'cursor': isLoading() ? 'wait' : null,\r\n 'margin-top': (_floatLabel() == 'auto') ? '15px' : '9px',\r\n 'padding-right': _paddingRight\r\n }\">\r\n\r\n @if(isLoading()) {\r\n <div class=\"placeholder-glow\">\r\n <span class=\"placeholder\"></span>\r\n </div>\r\n }\r\n\r\n <span class=\"icon-container\" [style]=\"{ 'width': _widthIcons }\">\r\n @if(_showCancel && _isEnable() && !isLoading()) {\r\n <i class=\"fa-solid fa-xmark text-secondary\" (click)=\"Unselect()\"></i>\r\n }\r\n\r\n @else if(isInvalid() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-exclamation\"></i>\r\n }\r\n\r\n @else if(isValid() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-check text-green\"></i>\r\n }\r\n\r\n @if(_isOpen() && _isEnable() && !isLoading()) {\r\n <i class=\"fa-solid fa-caret-up cursor-pointer text-primary\" (click)=\"Blur()\"></i>\r\n }\r\n\r\n @else if(_isEnable() && !isLoading()) {\r\n <i class=\"fa-solid fa-caret-down cursor-pointer text-secondary\"></i>\r\n }\r\n </span>\r\n </mat-form-field>\r\n\r\n <!-- Options Container -->\r\n <div class=\"btn-group\">\r\n <ul [id]=\"_id + '-dropdown-menu'\" \r\n class=\"dropdown-menu\"\r\n [ngStyle]=\"{\r\n width: _dropDownWidth\r\n }\">\r\n @for(item of _dataSource(); track _GetIndexRow(item)) {\r\n <li (click)=\"_SelectItem(item)\">\r\n <div [id]=\"id + '-dropdown-option-' + _GetIndexRow(item)\"\r\n [ngClass]=\"{\r\n 'dropdown-item': true,\r\n 'cursor-pointer': true,\r\n 'dropdown-item-focus': _index() == _GetIndexRow(item)\r\n }\"\r\n >{{ _GetDisplay(item) }} </div>\r\n <hr class=\"dropdown-divider\">\r\n </li>\r\n }\r\n </ul>\r\n </div>\r\n</div>", styles: ["div.coer-select-box{position:relative!important}div.coer-select-box mat-form-field{position:relative!important}div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex{height:40px!important}div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{width:100%!important;height:40px!important;padding:0!important}div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label{overflow:visible!important;position:absolute!important;top:20px!important}div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label.mdc-floating-label--float-above mat-label{color:var(--primary-inner);font-weight:700;position:relative;left:-10px;top:2px}div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input{font-weight:400!important;font-size:17px!important;color:var(--black)!important}div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active,div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:before,div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:after{border-bottom-color:var(--primary-inner)!important}div.coer-select-box mat-form-field div.mat-mdc-form-field-subscript-wrapper.mat-mdc-form-field-bottom-align{height:0px!important}div.coer-select-box mat-form-field span.icon-container{position:absolute!important;top:1px!important;right:-14px!important;z-index:5!important;height:40px;display:flex;align-items:center;justify-content:center;gap:5px}div.coer-select-box mat-form-field span.icon-container i{font-size:20px!important}div.coer-select-box mat-form-field span.icon-container i.fa-solid.fa-xmark,div.coer-select-box mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass{color:#caced1!important;cursor:pointer!important}div.coer-select-box mat-form-field span.icon-container i.fa-solid.fa-xmark:hover,div.coer-select-box mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass:hover{color:#6c757d!important}div.coer-select-box mat-form-field span.icon-container i.fa-solid.fa-circle-check{color:var(--green)!important}div.coer-select-box mat-form-field span.icon-container i.fa-solid.fa-circle-exclamation{color:var(--red)!important}div.coer-select-box mat-form-field span.icon-container i.fa-solid.fa-xmark{font-size:22px!important;padding:2px!important}div.coer-select-box mat-form-field span.placeholder{width:calc(100% + 32px)!important;height:40px!important;position:absolute!important;z-index:1!important;top:0!important;left:-16px!important;cursor:wait!important}div.coer-select-box mat-form-field .placeholder,div.coer-select-box mat-form-field .placeholder *,div.coer-select-box mat-form-field .placeholder-glow,div.coer-select-box mat-form-field .placeholder-glow *{cursor:wait!important}div.coer-select-box .btn-group{position:absolute!important;top:40px;left:0!important;width:100%!important}div.coer-select-box ul.dropdown-menu{background-color:var(--white)!important;border-top-left-radius:0!important;border-top-right-radius:0!important;max-height:205px!important;overflow:auto!important;padding:0!important}div.coer-select-box .dropdown-divider{margin:0!important;background-color:var(--white)!important}div.coer-select-box ul.dropdown-menu li:not(.dropdown-item-focus):hover,div.coer-select-box ul.dropdown-menu li>div:not(.dropdown-item-focus):hover{color:var(--black)!important;background-color:#f1f6ff!important}div.coer-select-box ul.dropdown-menu li:last-child hr.dropdown-divider,div.coer-select-box ul.dropdown-menu li:last-child hr.dropdown-divider:hover{width:0px!important;border:none!important}div.coer-select-box ul.dropdown-menu li div{display:flex!important;align-items:center!important;height:40px!important}div.coer-select-box div.dropdown-item-focus{background-color:#cde1ff!important}div.coer-select-box mat-form-field.readonly div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:#bbbbbb83!important}coer-grid table tbody tr td.coer-selectbox div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:transparent!important;padding-left:9px!important;padding-right:9px!important}coer-grid table tbody tr td.coer-selectbox div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple,coer-grid table tbody tr td.coer-selectbox div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple:before,coer-grid table tbody tr td.coer-selectbox div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple:after{border-bottom-color:transparent!important}coer-grid table tbody tr td.coer-selectbox div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex{height:28px!important}coer-grid table tbody tr td.coer-selectbox div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{height:28px!important}coer-grid table tbody tr td.coer-selectbox div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input{margin-top:3px!important;font-size:14px!important}coer-grid table tbody tr td.coer-selectbox div.coer-select-box mat-form-field span.icon-container{transform:translate(-5px,-6px)!important}coer-grid table tbody tr td.coer-selectbox div.coer-select-box .btn-group{top:28px!important}aside.modal .modal-content ul.dropdown-menu{position:fixed!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2$4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }] }); }
|
1492
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerSelectbox, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
1493
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerSelectbox, isStandalone: false, selector: "coer-selectbox", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, isInvalid: { classPropertyName: "isInvalid", publicName: "isInvalid", isSignal: true, isRequired: false, transformFunction: null }, isValid: { classPropertyName: "isValid", publicName: "isValid", isSignal: true, isRequired: false, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: false, transformFunction: null }, displayProperty: { classPropertyName: "displayProperty", publicName: "displayProperty", isSignal: true, isRequired: false, transformFunction: null }, rowsByPage: { classPropertyName: "rowsByPage", publicName: "rowsByPage", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: true, isRequired: false, transformFunction: null }, isInvisible: { classPropertyName: "isInvisible", publicName: "isInvisible", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, marginTop: { classPropertyName: "marginTop", publicName: "marginTop", isSignal: true, isRequired: false, transformFunction: null }, marginRight: { classPropertyName: "marginRight", publicName: "marginRight", isSignal: true, isRequired: false, transformFunction: null }, marginBottom: { classPropertyName: "marginBottom", publicName: "marginBottom", isSignal: true, isRequired: false, transformFunction: null }, marginLeft: { classPropertyName: "marginLeft", publicName: "marginLeft", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSelected: "onSelected", onUnselect: "onUnselect" }, providers: [CONTROL_VALUE(CoerSelectbox)], viewQueries: [{ propertyName: "_coerTextBox", first: true, predicate: ["coerTextBox"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"coer-select-box\">\r\n <mat-form-field\r\n [id]=\"_id + '-container'\" \r\n [floatLabel]=\"_floatLabel()\"\r\n [ngClass]=\"{\r\n 'readonly': isReadonly() && !isLoading()\r\n }\"\r\n [style]=\"{\r\n 'width': width(),\r\n 'min-width': minWidth(),\r\n 'max-width': maxWidth(),\r\n 'margin-top': marginTop(),\r\n 'margin-right': marginRight(),\r\n 'margin-bottom': marginBottom(),\r\n 'margin-left': marginLeft()\r\n }\">\r\n <mat-label>{{ label() }}</mat-label>\r\n\r\n <input #coerTextBox matInput\r\n [id]=\"_id\"\r\n type=\"text\"\r\n [value]=\"_search()\"\r\n [placeholder]=\"_placeholder\"\r\n [disabled]=\"!_isEnable()\"\r\n (input)=\"_Search(coerTextBox.value)\"\r\n (blur)=\"SetTouched(true)\"\r\n [style]=\"{\r\n 'cursor': isLoading() ? 'wait' : null,\r\n 'margin-top': (_floatLabel() == 'auto') ? '15px' : '9px',\r\n 'padding-right': _paddingRight\r\n }\">\r\n\r\n @if(isLoading()) {\r\n <div class=\"placeholder-glow\">\r\n <span class=\"placeholder\"></span>\r\n </div>\r\n }\r\n\r\n <span class=\"icon-container\" [style]=\"{ 'width': _widthIcons }\">\r\n @if(_showCancel && _isEnable() && !isLoading()) {\r\n <i class=\"fa-solid fa-xmark text-secondary\" (click)=\"Unselect()\"></i>\r\n }\r\n\r\n @else if(isInvalid() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-exclamation\"></i>\r\n }\r\n\r\n @else if(isValid() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-check text-green\"></i>\r\n }\r\n\r\n @if(_isOpen() && _isEnable() && !isLoading()) {\r\n <i class=\"fa-solid fa-caret-up cursor-pointer text-primary\" (click)=\"Blur()\"></i>\r\n }\r\n\r\n @else if(_isEnable() && !isLoading()) {\r\n <i class=\"fa-solid fa-caret-down cursor-pointer text-secondary\"></i>\r\n }\r\n </span>\r\n </mat-form-field>\r\n\r\n <!-- Options Container -->\r\n <div class=\"btn-group\">\r\n <ul [id]=\"_id + '-dropdown-menu'\" \r\n class=\"dropdown-menu\"\r\n [ngStyle]=\"{\r\n width: _dropDownWidth\r\n }\">\r\n @for(item of _dataSource(); track _GetIndexRow(item)) {\r\n <li (click)=\"_SelectItem(item)\">\r\n <div [id]=\"id + '-dropdown-option-' + _GetIndexRow(item)\"\r\n [ngClass]=\"{\r\n 'dropdown-item': true,\r\n 'cursor-pointer': true,\r\n 'dropdown-item-focus': _index() == _GetIndexRow(item)\r\n }\"\r\n >{{ _GetDisplay(item) }} </div>\r\n <hr class=\"dropdown-divider\">\r\n </li>\r\n }\r\n </ul>\r\n </div>\r\n</div>", styles: ["div.coer-select-box{position:relative!important}div.coer-select-box mat-form-field{position:relative!important}div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex{height:40px!important}div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{width:100%!important;height:40px!important;padding:0!important}div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label{overflow:visible!important;position:absolute!important;top:20px!important}div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label.mdc-floating-label--float-above mat-label{color:var(--primary-inner);font-weight:700;position:relative;left:-10px;top:2px}div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input{font-weight:400!important;font-size:17px!important;color:var(--black)!important}div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active,div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:before,div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:after{border-bottom-color:var(--primary-inner)!important}div.coer-select-box mat-form-field div.mat-mdc-form-field-subscript-wrapper.mat-mdc-form-field-bottom-align{height:0px!important}div.coer-select-box mat-form-field span.icon-container{position:absolute!important;top:1px!important;right:-14px!important;z-index:5!important;height:40px;display:flex;align-items:center;justify-content:center;gap:5px}div.coer-select-box mat-form-field span.icon-container i{font-size:20px!important}div.coer-select-box mat-form-field span.icon-container i.fa-solid.fa-xmark,div.coer-select-box mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass{color:#caced1!important;cursor:pointer!important}div.coer-select-box mat-form-field span.icon-container i.fa-solid.fa-xmark:hover,div.coer-select-box mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass:hover{color:#6c757d!important}div.coer-select-box mat-form-field span.icon-container i.fa-solid.fa-circle-check{color:var(--green)!important}div.coer-select-box mat-form-field span.icon-container i.fa-solid.fa-circle-exclamation{color:var(--red)!important}div.coer-select-box mat-form-field span.icon-container i.fa-solid.fa-xmark{font-size:22px!important;padding:2px!important}div.coer-select-box mat-form-field span.placeholder{width:calc(100% + 32px)!important;height:40px!important;position:absolute!important;z-index:1!important;top:0!important;left:-16px!important;cursor:wait!important}div.coer-select-box mat-form-field .placeholder,div.coer-select-box mat-form-field .placeholder *,div.coer-select-box mat-form-field .placeholder-glow,div.coer-select-box mat-form-field .placeholder-glow *{cursor:wait!important}div.coer-select-box .btn-group{position:absolute!important;top:40px;left:0!important;width:100%!important}div.coer-select-box ul.dropdown-menu{background-color:var(--white)!important;border-top-left-radius:0!important;border-top-right-radius:0!important;max-height:205px!important;overflow:auto!important;padding:0!important}div.coer-select-box .dropdown-divider{margin:0!important;background-color:var(--white)!important}div.coer-select-box ul.dropdown-menu li:not(.dropdown-item-focus):hover,div.coer-select-box ul.dropdown-menu li>div:not(.dropdown-item-focus):hover{color:var(--black)!important;background-color:#f1f6ff!important}div.coer-select-box ul.dropdown-menu li:last-child hr.dropdown-divider,div.coer-select-box ul.dropdown-menu li:last-child hr.dropdown-divider:hover{width:0px!important;border:none!important}div.coer-select-box ul.dropdown-menu li div{display:flex!important;align-items:center!important;height:40px!important}div.coer-select-box div.dropdown-item-focus{background-color:#cde1ff!important}div.coer-select-box mat-form-field.readonly div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:#bbbbbb83!important}coer-grid table tbody tr td.coer-selectbox div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:transparent!important;padding-left:9px!important;padding-right:9px!important}coer-grid table tbody tr td.coer-selectbox div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple,coer-grid table tbody tr td.coer-selectbox div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple:before,coer-grid table tbody tr td.coer-selectbox div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple:after{border-bottom-color:transparent!important}coer-grid table tbody tr td.coer-selectbox div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex{height:28px!important}coer-grid table tbody tr td.coer-selectbox div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{height:28px!important}coer-grid table tbody tr td.coer-selectbox div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input{margin-top:3px!important;font-size:14px!important}coer-grid table tbody tr td.coer-selectbox div.coer-select-box mat-form-field span.icon-container{transform:translate(-5px,-6px)!important}coer-grid table tbody tr td.coer-selectbox div.coer-select-box .btn-group{top:28px!important}aside.modal .modal-content ul.dropdown-menu{position:fixed!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2$4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }] }); }
|
1452
1494
|
}
|
1453
1495
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerSelectbox, decorators: [{
|
1454
1496
|
type: Component,
|
1455
1497
|
args: [{ selector: 'coer-selectbox', providers: [CONTROL_VALUE(CoerSelectbox)], standalone: false, template: "<div class=\"coer-select-box\">\r\n <mat-form-field\r\n [id]=\"_id + '-container'\" \r\n [floatLabel]=\"_floatLabel()\"\r\n [ngClass]=\"{\r\n 'readonly': isReadonly() && !isLoading()\r\n }\"\r\n [style]=\"{\r\n 'width': width(),\r\n 'min-width': minWidth(),\r\n 'max-width': maxWidth(),\r\n 'margin-top': marginTop(),\r\n 'margin-right': marginRight(),\r\n 'margin-bottom': marginBottom(),\r\n 'margin-left': marginLeft()\r\n }\">\r\n <mat-label>{{ label() }}</mat-label>\r\n\r\n <input #coerTextBox matInput\r\n [id]=\"_id\"\r\n type=\"text\"\r\n [value]=\"_search()\"\r\n [placeholder]=\"_placeholder\"\r\n [disabled]=\"!_isEnable()\"\r\n (input)=\"_Search(coerTextBox.value)\"\r\n (blur)=\"SetTouched(true)\"\r\n [style]=\"{\r\n 'cursor': isLoading() ? 'wait' : null,\r\n 'margin-top': (_floatLabel() == 'auto') ? '15px' : '9px',\r\n 'padding-right': _paddingRight\r\n }\">\r\n\r\n @if(isLoading()) {\r\n <div class=\"placeholder-glow\">\r\n <span class=\"placeholder\"></span>\r\n </div>\r\n }\r\n\r\n <span class=\"icon-container\" [style]=\"{ 'width': _widthIcons }\">\r\n @if(_showCancel && _isEnable() && !isLoading()) {\r\n <i class=\"fa-solid fa-xmark text-secondary\" (click)=\"Unselect()\"></i>\r\n }\r\n\r\n @else if(isInvalid() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-exclamation\"></i>\r\n }\r\n\r\n @else if(isValid() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-check text-green\"></i>\r\n }\r\n\r\n @if(_isOpen() && _isEnable() && !isLoading()) {\r\n <i class=\"fa-solid fa-caret-up cursor-pointer text-primary\" (click)=\"Blur()\"></i>\r\n }\r\n\r\n @else if(_isEnable() && !isLoading()) {\r\n <i class=\"fa-solid fa-caret-down cursor-pointer text-secondary\"></i>\r\n }\r\n </span>\r\n </mat-form-field>\r\n\r\n <!-- Options Container -->\r\n <div class=\"btn-group\">\r\n <ul [id]=\"_id + '-dropdown-menu'\" \r\n class=\"dropdown-menu\"\r\n [ngStyle]=\"{\r\n width: _dropDownWidth\r\n }\">\r\n @for(item of _dataSource(); track _GetIndexRow(item)) {\r\n <li (click)=\"_SelectItem(item)\">\r\n <div [id]=\"id + '-dropdown-option-' + _GetIndexRow(item)\"\r\n [ngClass]=\"{\r\n 'dropdown-item': true,\r\n 'cursor-pointer': true,\r\n 'dropdown-item-focus': _index() == _GetIndexRow(item)\r\n }\"\r\n >{{ _GetDisplay(item) }} </div>\r\n <hr class=\"dropdown-divider\">\r\n </li>\r\n }\r\n </ul>\r\n </div>\r\n</div>", styles: ["div.coer-select-box{position:relative!important}div.coer-select-box mat-form-field{position:relative!important}div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex{height:40px!important}div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{width:100%!important;height:40px!important;padding:0!important}div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label{overflow:visible!important;position:absolute!important;top:20px!important}div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label.mdc-floating-label--float-above mat-label{color:var(--primary-inner);font-weight:700;position:relative;left:-10px;top:2px}div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input{font-weight:400!important;font-size:17px!important;color:var(--black)!important}div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active,div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:before,div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:after{border-bottom-color:var(--primary-inner)!important}div.coer-select-box mat-form-field div.mat-mdc-form-field-subscript-wrapper.mat-mdc-form-field-bottom-align{height:0px!important}div.coer-select-box mat-form-field span.icon-container{position:absolute!important;top:1px!important;right:-14px!important;z-index:5!important;height:40px;display:flex;align-items:center;justify-content:center;gap:5px}div.coer-select-box mat-form-field span.icon-container i{font-size:20px!important}div.coer-select-box mat-form-field span.icon-container i.fa-solid.fa-xmark,div.coer-select-box mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass{color:#caced1!important;cursor:pointer!important}div.coer-select-box mat-form-field span.icon-container i.fa-solid.fa-xmark:hover,div.coer-select-box mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass:hover{color:#6c757d!important}div.coer-select-box mat-form-field span.icon-container i.fa-solid.fa-circle-check{color:var(--green)!important}div.coer-select-box mat-form-field span.icon-container i.fa-solid.fa-circle-exclamation{color:var(--red)!important}div.coer-select-box mat-form-field span.icon-container i.fa-solid.fa-xmark{font-size:22px!important;padding:2px!important}div.coer-select-box mat-form-field span.placeholder{width:calc(100% + 32px)!important;height:40px!important;position:absolute!important;z-index:1!important;top:0!important;left:-16px!important;cursor:wait!important}div.coer-select-box mat-form-field .placeholder,div.coer-select-box mat-form-field .placeholder *,div.coer-select-box mat-form-field .placeholder-glow,div.coer-select-box mat-form-field .placeholder-glow *{cursor:wait!important}div.coer-select-box .btn-group{position:absolute!important;top:40px;left:0!important;width:100%!important}div.coer-select-box ul.dropdown-menu{background-color:var(--white)!important;border-top-left-radius:0!important;border-top-right-radius:0!important;max-height:205px!important;overflow:auto!important;padding:0!important}div.coer-select-box .dropdown-divider{margin:0!important;background-color:var(--white)!important}div.coer-select-box ul.dropdown-menu li:not(.dropdown-item-focus):hover,div.coer-select-box ul.dropdown-menu li>div:not(.dropdown-item-focus):hover{color:var(--black)!important;background-color:#f1f6ff!important}div.coer-select-box ul.dropdown-menu li:last-child hr.dropdown-divider,div.coer-select-box ul.dropdown-menu li:last-child hr.dropdown-divider:hover{width:0px!important;border:none!important}div.coer-select-box ul.dropdown-menu li div{display:flex!important;align-items:center!important;height:40px!important}div.coer-select-box div.dropdown-item-focus{background-color:#cde1ff!important}div.coer-select-box mat-form-field.readonly div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:#bbbbbb83!important}coer-grid table tbody tr td.coer-selectbox div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:transparent!important;padding-left:9px!important;padding-right:9px!important}coer-grid table tbody tr td.coer-selectbox div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple,coer-grid table tbody tr td.coer-selectbox div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple:before,coer-grid table tbody tr td.coer-selectbox div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple:after{border-bottom-color:transparent!important}coer-grid table tbody tr td.coer-selectbox div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex{height:28px!important}coer-grid table tbody tr td.coer-selectbox div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{height:28px!important}coer-grid table tbody tr td.coer-selectbox div.coer-select-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input{margin-top:3px!important;font-size:14px!important}coer-grid table tbody tr td.coer-selectbox div.coer-select-box mat-form-field span.icon-container{transform:translate(-5px,-6px)!important}coer-grid table tbody tr td.coer-selectbox div.coer-select-box .btn-group{top:28px!important}aside.modal .modal-content ul.dropdown-menu{position:fixed!important}\n"] }]
|
1456
|
-
}],
|
1457
|
-
type: Input
|
1458
|
-
}] } });
|
1498
|
+
}], ctorParameters: () => [] });
|
1459
1499
|
|
1460
1500
|
class CoerTextBox extends ControlValue {
|
1501
|
+
//Constructor
|
1461
1502
|
constructor() {
|
1462
|
-
super(
|
1503
|
+
super();
|
1463
1504
|
//Elements
|
1464
1505
|
this.matFormField = viewChild.required('matFormField');
|
1465
1506
|
this.coerTextBox = viewChild.required('coerTextBox');
|
1466
|
-
//Component Value
|
1467
|
-
this._value = '';
|
1468
1507
|
//Variables
|
1508
|
+
this._value = '';
|
1469
1509
|
this._id = Tools.GetGuid('coer-textBox');
|
1470
1510
|
this._isLoadingEvent = signal(false);
|
1511
|
+
this._externalButton = signal({ show: false });
|
1471
1512
|
//Inputs
|
1472
1513
|
this.id = input('');
|
1514
|
+
this.value = input('');
|
1473
1515
|
this.label = input('');
|
1474
1516
|
this.placeholder = input('');
|
1475
1517
|
this.textPosition = input('left');
|
@@ -1477,7 +1519,7 @@ class CoerTextBox extends ControlValue {
|
|
1477
1519
|
this.maxLength = input(50);
|
1478
1520
|
this.isInvalid = input(false);
|
1479
1521
|
this.isValid = input(false);
|
1480
|
-
this.externalButton = { show: false };
|
1522
|
+
this.externalButton = input({ show: false });
|
1481
1523
|
this.selectOnFocus = input(false);
|
1482
1524
|
this.showClearIcon = input(false);
|
1483
1525
|
this.showSearchIcon = input(false);
|
@@ -1511,59 +1553,15 @@ class CoerTextBox extends ControlValue {
|
|
1511
1553
|
return this.isInvalid() || this.isValid()
|
1512
1554
|
? '18px' : '0px';
|
1513
1555
|
});
|
1556
|
+
this._effectValue = effect(() => {
|
1557
|
+
this.SetValue(Tools.IsNotNull(this.value()) ? this.value() : '');
|
1558
|
+
});
|
1559
|
+
this._effectExternalButton = effect(() => {
|
1560
|
+
this._externalButton.set(this.externalButton());
|
1561
|
+
});
|
1514
1562
|
}
|
1515
|
-
|
1516
|
-
|
1517
|
-
value = '';
|
1518
|
-
this.SetValue(value);
|
1519
|
-
}
|
1520
|
-
ngOnInit() {
|
1521
|
-
this._SetEvents();
|
1522
|
-
}
|
1523
|
-
//getter
|
1524
|
-
get _showSearchIcon() {
|
1525
|
-
return this.showSearchIcon()
|
1526
|
-
&& !this._showClearIcon
|
1527
|
-
&& !this.isDisabled()
|
1528
|
-
&& !this.isLoading();
|
1529
|
-
}
|
1530
|
-
//getter
|
1531
|
-
get _showClearIcon() {
|
1532
|
-
return this.showClearIcon()
|
1533
|
-
&& !this.isDisabled()
|
1534
|
-
&& !this.isLoading()
|
1535
|
-
&& this._value != undefined
|
1536
|
-
&& String(this._value).length > 0;
|
1537
|
-
}
|
1538
|
-
//getter
|
1539
|
-
get _showButtonLeft() {
|
1540
|
-
return this.externalButton.show
|
1541
|
-
&& Tools.IsNotNull(this.externalButton?.position)
|
1542
|
-
&& this.externalButton?.position === 'left'
|
1543
|
-
&& !this.isInvisible();
|
1544
|
-
}
|
1545
|
-
//getter
|
1546
|
-
get _showButtonRight() {
|
1547
|
-
return this.externalButton.show
|
1548
|
-
&& ((Tools.IsNull(this.externalButton?.position) || this.externalButton?.position === 'right'))
|
1549
|
-
&& !this.isInvisible();
|
1550
|
-
}
|
1551
|
-
//getter
|
1552
|
-
get _buttonIcon() {
|
1553
|
-
return Tools.IsNotOnlyWhiteSpace(this.externalButton?.icon)
|
1554
|
-
? this.externalButton.icon : 'pointer';
|
1555
|
-
}
|
1556
|
-
//getter
|
1557
|
-
get _isDisabledExternalButton() {
|
1558
|
-
return Tools.IsNotNull(this.externalButton?.isDisabled)
|
1559
|
-
? this.externalButton.isDisabled : false;
|
1560
|
-
}
|
1561
|
-
//getter
|
1562
|
-
get value() {
|
1563
|
-
return Tools.IsNotNull(this._value) ? String(this._value) : '';
|
1564
|
-
}
|
1565
|
-
/** */
|
1566
|
-
_SetEvents() {
|
1563
|
+
//AfterViewInit
|
1564
|
+
ngAfterViewInit() {
|
1567
1565
|
Tools.Sleep().then(() => {
|
1568
1566
|
this.element = document.getElementById(this._id);
|
1569
1567
|
if (this.element) {
|
@@ -1599,6 +1597,49 @@ class CoerTextBox extends ControlValue {
|
|
1599
1597
|
}
|
1600
1598
|
});
|
1601
1599
|
}
|
1600
|
+
//OnDestroy
|
1601
|
+
ngOnDestroy() {
|
1602
|
+
this._effectValue?.destroy();
|
1603
|
+
this._effectExternalButton?.destroy();
|
1604
|
+
}
|
1605
|
+
//getter
|
1606
|
+
get _showSearchIcon() {
|
1607
|
+
return this.showSearchIcon()
|
1608
|
+
&& !this._showClearIcon
|
1609
|
+
&& !this.isDisabled()
|
1610
|
+
&& !this.isLoading();
|
1611
|
+
}
|
1612
|
+
//getter
|
1613
|
+
get _showClearIcon() {
|
1614
|
+
return this.showClearIcon()
|
1615
|
+
&& !this.isDisabled()
|
1616
|
+
&& !this.isLoading()
|
1617
|
+
&& this._value != undefined
|
1618
|
+
&& String(this._value).length > 0;
|
1619
|
+
}
|
1620
|
+
//getter
|
1621
|
+
get _showButtonLeft() {
|
1622
|
+
return this._externalButton().show
|
1623
|
+
&& Tools.IsNotNull(this._externalButton()?.position)
|
1624
|
+
&& this._externalButton()?.position === 'left'
|
1625
|
+
&& !this.isInvisible();
|
1626
|
+
}
|
1627
|
+
//getter
|
1628
|
+
get _showButtonRight() {
|
1629
|
+
return this._externalButton().show
|
1630
|
+
&& ((Tools.IsNull(this._externalButton()?.position) || this._externalButton()?.position === 'right'))
|
1631
|
+
&& !this.isInvisible();
|
1632
|
+
}
|
1633
|
+
//getter
|
1634
|
+
get _buttonIcon() {
|
1635
|
+
return Tools.IsNotOnlyWhiteSpace(this._externalButton()?.icon)
|
1636
|
+
? this._externalButton().icon : 'pointer';
|
1637
|
+
}
|
1638
|
+
//getter
|
1639
|
+
get _isDisabledExternalButton() {
|
1640
|
+
return Tools.IsNotNull(this._externalButton()?.isDisabled)
|
1641
|
+
? this._externalButton().isDisabled : false;
|
1642
|
+
}
|
1602
1643
|
/** */
|
1603
1644
|
Focus(select = false, delay = 0) {
|
1604
1645
|
if (this._isLoadingEvent())
|
@@ -1651,23 +1692,19 @@ class CoerTextBox extends ControlValue {
|
|
1651
1692
|
}
|
1652
1693
|
});
|
1653
1694
|
}
|
1654
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerTextBox, deps:
|
1655
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerTextBox, isStandalone: false, selector: "coer-textbox", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, textPosition: { classPropertyName: "textPosition", publicName: "textPosition", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, isInvalid: { classPropertyName: "isInvalid", publicName: "isInvalid", isSignal: true, isRequired: false, transformFunction: null }, isValid: { classPropertyName: "isValid", publicName: "isValid", isSignal: true, isRequired: false, transformFunction: null }, externalButton: { classPropertyName: "externalButton", publicName: "externalButton", isSignal: false, isRequired: false, transformFunction: null }, selectOnFocus: { classPropertyName: "selectOnFocus", publicName: "selectOnFocus", isSignal: true, isRequired: false, transformFunction: null }, showClearIcon: { classPropertyName: "showClearIcon", publicName: "showClearIcon", isSignal: true, isRequired: false, transformFunction: null }, showSearchIcon: { classPropertyName: "showSearchIcon", publicName: "showSearchIcon", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: true, isRequired: false, transformFunction: null }, isInvisible: { classPropertyName: "isInvisible", publicName: "isInvisible", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, marginTop: { classPropertyName: "marginTop", publicName: "marginTop", isSignal: true, isRequired: false, transformFunction: null }, marginRight: { classPropertyName: "marginRight", publicName: "marginRight", isSignal: true, isRequired: false, transformFunction: null }, marginBottom: { classPropertyName: "marginBottom", publicName: "marginBottom", isSignal: true, isRequired: false, transformFunction: null }, marginLeft: { classPropertyName: "marginLeft", publicName: "marginLeft", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { onKeyupEnter: "onKeyupEnter", onInput: "onInput", onClickClear: "onClickClear", onClickSearch: "onClickSearch", onClickExternalButton: "onClickExternalButton" }, providers: [CONTROL_VALUE(CoerTextBox)], viewQueries: [{ propertyName: "matFormField", first: true, predicate: ["matFormField"], descendants: true, isSignal: true }, { propertyName: "coerTextBox", first: true, predicate: ["coerTextBox"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"coer-text-box\">\r\n @if(_showButtonLeft) {\r\n <div class=\"button-container\">\r\n <coer-button\r\n type=\"icon-no-border\"\r\n color=\"dark\"\r\n [icon]=\"_buttonIcon\" \r\n [isDisabled]=\"_isDisabledExternalButton\" \r\n (onClick)=\"_isEnable() ? onClickExternalButton.emit() : null\"\r\n ></coer-button>\r\n </div>\r\n }\r\n\r\n <mat-form-field\r\n [id]=\"_id + '-container'\"\r\n [floatLabel]=\"_floatLabel()\"\r\n [ngClass]=\"{\r\n 'readonly': isReadonly() && !isLoading(),\r\n 'd-none': isInvisible()\r\n }\"\r\n [style]=\"{\r\n 'width': width(),\r\n 'min-width': minWidth(),\r\n 'max-width': maxWidth(),\r\n 'margin-top': marginTop(),\r\n 'margin-right': marginRight(),\r\n 'margin-bottom': marginBottom(),\r\n 'margin-left': marginLeft()\r\n }\">\r\n <mat-label>{{ label() }}</mat-label>\r\n\r\n <input #coerTextBox matInput\r\n [id]=\"_id\"\r\n type=\"text\"\r\n [placeholder]=\"placeholder()\"\r\n [minLength]=\"minLength()\"\r\n [maxLength]=\"maxLength()\"\r\n [disabled]=\"!_isEnable()\"\r\n [value]=\"_value\"\r\n (input)=\"SetValue(coerTextBox.value)\"\r\n (blur)=\"SetTouched(true)\"\r\n [style]=\"{\r\n 'cursor': isLoading() ? 'wait' : null,\r\n 'margin-top': (_floatLabel() == 'auto') ? '15px' : '9px',\r\n 'padding-right': _paddingRight(),\r\n 'text-align': textPosition()\r\n }\">\r\n\r\n @if(isLoading()) {\r\n <div class=\"placeholder-glow\">\r\n <span class=\"placeholder\"></span>\r\n </div>\r\n }\r\n\r\n <span ngClass=\"icon-container\">\r\n @if(_showSearchIcon) {\r\n <i class=\"fa-solid fa-magnifying-glass cursor-pointer\" (click)=\"_ClickSearch()\"></i>\r\n }\r\n\r\n @else if(_showClearIcon) {\r\n <i class=\"fa-solid fa-xmark cursor-pointer\" (click)=\"Clear(); this.onClickClear.emit();\"></i>\r\n }\r\n\r\n @else if(isInvalid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-exclamation\"></i>\r\n }\r\n\r\n @else if(isValid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-check text-green\"></i>\r\n }\r\n </span>\r\n </mat-form-field> \r\n\r\n @if(isInvisible()) {\r\n <mat-form-field class=\"invisible\">\r\n <input matInput [disabled]=\"true\"> \r\n </mat-form-field> \r\n }\r\n\r\n @if(_showButtonRight) {\r\n <div class=\"button-container\">\r\n <coer-button\r\n type=\"icon-no-border\"\r\n color=\"dark\"\r\n [icon]=\"_buttonIcon\" \r\n [isDisabled]=\"_isDisabledExternalButton\" \r\n (onClick)=\"_isEnable() ? onClickExternalButton.emit() : null\"\r\n ></coer-button>\r\n </div>\r\n }\r\n</div>", styles: ["div.coer-text-box{display:flex;align-items:center}div.coer-text-box mat-form-field{position:relative!important}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex{height:40px!important}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{width:100%!important;height:40px!important;padding:0!important}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label{overflow:visible!important;position:absolute!important;top:20px!important}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label.mdc-floating-label--float-above mat-label{color:var(--primary-inner);font-weight:700;position:relative;left:-10px;top:2px}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input{font-weight:400!important;font-size:17px!important;color:var(--black)!important}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active,div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:before,div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:after{border-bottom-color:var(--primary-inner)!important}div.coer-text-box mat-form-field div.mat-mdc-form-field-subscript-wrapper.mat-mdc-form-field-bottom-align{height:0px!important}div.coer-text-box mat-form-field span.icon-container{position:absolute!important;top:1px!important;right:-14px!important;z-index:5!important;width:30px;height:40px;display:flex;align-items:center;justify-content:center}div.coer-text-box mat-form-field span.icon-container i{font-size:20px!important}div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-xmark,div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass{color:#caced1!important;cursor:pointer!important}div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-xmark:hover,div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass:hover{color:#6c757d!important}div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-circle-check{color:var(--green)!important}div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-circle-exclamation{color:var(--red)!important}div.coer-text-box mat-form-field span.placeholder{width:calc(100% + 32px)!important;height:40px!important;position:absolute!important;z-index:1!important;top:0!important;left:-16px!important;cursor:wait!important}div.coer-text-box mat-form-field .placeholder,div.coer-text-box mat-form-field .placeholder *,div.coer-text-box mat-form-field .placeholder-glow,div.coer-text-box mat-form-field .placeholder-glow *{cursor:wait!important}div.coer-text-box mat-form-field.readonly div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:#bbbbbb83!important}div.coer-text-box div.button-container{width:40px!important;height:40px!important;display:flex!important;align-items:center!important;justify-content:center!important;background-color:#e6e7e9!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:transparent!important;padding-left:9px!important;padding-right:9px!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple,coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple:before,coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple:after{border-bottom-color:transparent!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex{height:28px!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{height:28px!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input{margin-top:3px!important;font-size:14px!important}coer-grid table tbody tr td.coer-textbox mat-form-field span.icon-container{transform:translate(-5px,-6px)!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2$4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: CoerButton, selector: "coer-button", inputs: ["id", "color", "type", "icon", "iconPosition", "path", "animation", "isLoading", "isDisabled", "isReadonly", "isInvisible", "width", "minWidth", "maxWidth", "height", "minHeight", "marginTop", "marginRight", "marginBottom", "marginLeft", "tooltipPosition", "tooltip"], outputs: ["onClick"] }] }); }
|
1695
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerTextBox, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
1696
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerTextBox, isStandalone: false, selector: "coer-textbox", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, textPosition: { classPropertyName: "textPosition", publicName: "textPosition", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, isInvalid: { classPropertyName: "isInvalid", publicName: "isInvalid", isSignal: true, isRequired: false, transformFunction: null }, isValid: { classPropertyName: "isValid", publicName: "isValid", isSignal: true, isRequired: false, transformFunction: null }, externalButton: { classPropertyName: "externalButton", publicName: "externalButton", isSignal: true, isRequired: false, transformFunction: null }, selectOnFocus: { classPropertyName: "selectOnFocus", publicName: "selectOnFocus", isSignal: true, isRequired: false, transformFunction: null }, showClearIcon: { classPropertyName: "showClearIcon", publicName: "showClearIcon", isSignal: true, isRequired: false, transformFunction: null }, showSearchIcon: { classPropertyName: "showSearchIcon", publicName: "showSearchIcon", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: true, isRequired: false, transformFunction: null }, isInvisible: { classPropertyName: "isInvisible", publicName: "isInvisible", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, marginTop: { classPropertyName: "marginTop", publicName: "marginTop", isSignal: true, isRequired: false, transformFunction: null }, marginRight: { classPropertyName: "marginRight", publicName: "marginRight", isSignal: true, isRequired: false, transformFunction: null }, marginBottom: { classPropertyName: "marginBottom", publicName: "marginBottom", isSignal: true, isRequired: false, transformFunction: null }, marginLeft: { classPropertyName: "marginLeft", publicName: "marginLeft", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onKeyupEnter: "onKeyupEnter", onInput: "onInput", onClickClear: "onClickClear", onClickSearch: "onClickSearch", onClickExternalButton: "onClickExternalButton" }, providers: [CONTROL_VALUE(CoerTextBox)], viewQueries: [{ propertyName: "matFormField", first: true, predicate: ["matFormField"], descendants: true, isSignal: true }, { propertyName: "coerTextBox", first: true, predicate: ["coerTextBox"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"coer-text-box\">\r\n @if(_showButtonLeft) {\r\n <div class=\"button-container\">\r\n <coer-button\r\n type=\"icon-no-border\"\r\n color=\"dark\"\r\n [icon]=\"_buttonIcon\" \r\n [isDisabled]=\"_isDisabledExternalButton\" \r\n (onClick)=\"_isEnable() ? onClickExternalButton.emit() : null\"\r\n ></coer-button>\r\n </div>\r\n }\r\n\r\n <mat-form-field\r\n [id]=\"_id + '-container'\"\r\n [floatLabel]=\"_floatLabel()\"\r\n [ngClass]=\"{\r\n 'readonly': isReadonly() && !isLoading(),\r\n 'd-none': isInvisible()\r\n }\"\r\n [style]=\"{\r\n 'width': width(),\r\n 'min-width': minWidth(),\r\n 'max-width': maxWidth(),\r\n 'margin-top': marginTop(),\r\n 'margin-right': marginRight(),\r\n 'margin-bottom': marginBottom(),\r\n 'margin-left': marginLeft()\r\n }\">\r\n <mat-label>{{ label() }}</mat-label>\r\n\r\n <input #coerTextBox matInput\r\n [id]=\"_id\"\r\n type=\"text\"\r\n [placeholder]=\"placeholder()\"\r\n [minLength]=\"minLength()\"\r\n [maxLength]=\"maxLength()\"\r\n [disabled]=\"!_isEnable()\"\r\n [value]=\"_value\"\r\n (input)=\"SetValue(coerTextBox.value)\"\r\n (blur)=\"SetTouched(true)\"\r\n [style]=\"{\r\n 'cursor': isLoading() ? 'wait' : null,\r\n 'margin-top': (_floatLabel() == 'auto') ? '15px' : '9px',\r\n 'padding-right': _paddingRight(),\r\n 'text-align': textPosition()\r\n }\">\r\n\r\n @if(isLoading()) {\r\n <div class=\"placeholder-glow\">\r\n <span class=\"placeholder\"></span>\r\n </div>\r\n }\r\n\r\n <span ngClass=\"icon-container\">\r\n @if(_showSearchIcon) {\r\n <i class=\"fa-solid fa-magnifying-glass cursor-pointer\" (click)=\"_ClickSearch()\"></i>\r\n }\r\n\r\n @else if(_showClearIcon) {\r\n <i class=\"fa-solid fa-xmark cursor-pointer\" (click)=\"Clear(); this.onClickClear.emit();\"></i>\r\n }\r\n\r\n @else if(isInvalid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-exclamation\"></i>\r\n }\r\n\r\n @else if(isValid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-check text-green\"></i>\r\n }\r\n </span>\r\n </mat-form-field> \r\n\r\n @if(isInvisible()) {\r\n <mat-form-field class=\"invisible\">\r\n <input matInput [disabled]=\"true\"> \r\n </mat-form-field> \r\n }\r\n\r\n @if(_showButtonRight) {\r\n <div class=\"button-container\">\r\n <coer-button\r\n type=\"icon-no-border\"\r\n color=\"dark\"\r\n [icon]=\"_buttonIcon\" \r\n [isDisabled]=\"_isDisabledExternalButton\" \r\n (onClick)=\"_isEnable() ? onClickExternalButton.emit() : null\"\r\n ></coer-button>\r\n </div>\r\n }\r\n</div>", styles: ["div.coer-text-box{display:flex;align-items:center}div.coer-text-box mat-form-field{position:relative!important}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex{height:40px!important}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{width:100%!important;height:40px!important;padding:0!important}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label{overflow:visible!important;position:absolute!important;top:20px!important}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label.mdc-floating-label--float-above mat-label{color:var(--primary-inner);font-weight:700;position:relative;left:-10px;top:2px}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input{font-weight:400!important;font-size:17px!important;color:var(--black)!important}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active,div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:before,div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:after{border-bottom-color:var(--primary-inner)!important}div.coer-text-box mat-form-field div.mat-mdc-form-field-subscript-wrapper.mat-mdc-form-field-bottom-align{height:0px!important}div.coer-text-box mat-form-field span.icon-container{position:absolute!important;top:1px!important;right:-14px!important;z-index:5!important;width:30px;height:40px;display:flex;align-items:center;justify-content:center}div.coer-text-box mat-form-field span.icon-container i{font-size:20px!important}div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-xmark,div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass{color:#caced1!important;cursor:pointer!important}div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-xmark:hover,div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass:hover{color:#6c757d!important}div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-circle-check{color:var(--green)!important}div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-circle-exclamation{color:var(--red)!important}div.coer-text-box mat-form-field span.placeholder{width:calc(100% + 32px)!important;height:40px!important;position:absolute!important;z-index:1!important;top:0!important;left:-16px!important;cursor:wait!important}div.coer-text-box mat-form-field .placeholder,div.coer-text-box mat-form-field .placeholder *,div.coer-text-box mat-form-field .placeholder-glow,div.coer-text-box mat-form-field .placeholder-glow *{cursor:wait!important}div.coer-text-box mat-form-field.readonly div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:#bbbbbb83!important}div.coer-text-box div.button-container{width:40px!important;height:40px!important;display:flex!important;align-items:center!important;justify-content:center!important;background-color:#e6e7e9!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:transparent!important;padding-left:9px!important;padding-right:9px!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple,coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple:before,coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple:after{border-bottom-color:transparent!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex{height:28px!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{height:28px!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input{margin-top:3px!important;font-size:14px!important}coer-grid table tbody tr td.coer-textbox mat-form-field span.icon-container{transform:translate(-5px,-6px)!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2$4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: CoerButton, selector: "coer-button", inputs: ["id", "color", "type", "icon", "iconPosition", "path", "isLoading", "isDisabled", "isReadonly", "isInvisible", "width", "minWidth", "maxWidth", "height", "minHeight", "marginTop", "marginRight", "marginBottom", "marginLeft", "tooltip", "tooltipPosition"], outputs: ["onClick"] }] }); }
|
1656
1697
|
}
|
1657
1698
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerTextBox, decorators: [{
|
1658
1699
|
type: Component,
|
1659
1700
|
args: [{ selector: 'coer-textbox', providers: [CONTROL_VALUE(CoerTextBox)], standalone: false, template: "<div class=\"coer-text-box\">\r\n @if(_showButtonLeft) {\r\n <div class=\"button-container\">\r\n <coer-button\r\n type=\"icon-no-border\"\r\n color=\"dark\"\r\n [icon]=\"_buttonIcon\" \r\n [isDisabled]=\"_isDisabledExternalButton\" \r\n (onClick)=\"_isEnable() ? onClickExternalButton.emit() : null\"\r\n ></coer-button>\r\n </div>\r\n }\r\n\r\n <mat-form-field\r\n [id]=\"_id + '-container'\"\r\n [floatLabel]=\"_floatLabel()\"\r\n [ngClass]=\"{\r\n 'readonly': isReadonly() && !isLoading(),\r\n 'd-none': isInvisible()\r\n }\"\r\n [style]=\"{\r\n 'width': width(),\r\n 'min-width': minWidth(),\r\n 'max-width': maxWidth(),\r\n 'margin-top': marginTop(),\r\n 'margin-right': marginRight(),\r\n 'margin-bottom': marginBottom(),\r\n 'margin-left': marginLeft()\r\n }\">\r\n <mat-label>{{ label() }}</mat-label>\r\n\r\n <input #coerTextBox matInput\r\n [id]=\"_id\"\r\n type=\"text\"\r\n [placeholder]=\"placeholder()\"\r\n [minLength]=\"minLength()\"\r\n [maxLength]=\"maxLength()\"\r\n [disabled]=\"!_isEnable()\"\r\n [value]=\"_value\"\r\n (input)=\"SetValue(coerTextBox.value)\"\r\n (blur)=\"SetTouched(true)\"\r\n [style]=\"{\r\n 'cursor': isLoading() ? 'wait' : null,\r\n 'margin-top': (_floatLabel() == 'auto') ? '15px' : '9px',\r\n 'padding-right': _paddingRight(),\r\n 'text-align': textPosition()\r\n }\">\r\n\r\n @if(isLoading()) {\r\n <div class=\"placeholder-glow\">\r\n <span class=\"placeholder\"></span>\r\n </div>\r\n }\r\n\r\n <span ngClass=\"icon-container\">\r\n @if(_showSearchIcon) {\r\n <i class=\"fa-solid fa-magnifying-glass cursor-pointer\" (click)=\"_ClickSearch()\"></i>\r\n }\r\n\r\n @else if(_showClearIcon) {\r\n <i class=\"fa-solid fa-xmark cursor-pointer\" (click)=\"Clear(); this.onClickClear.emit();\"></i>\r\n }\r\n\r\n @else if(isInvalid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-exclamation\"></i>\r\n }\r\n\r\n @else if(isValid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-check text-green\"></i>\r\n }\r\n </span>\r\n </mat-form-field> \r\n\r\n @if(isInvisible()) {\r\n <mat-form-field class=\"invisible\">\r\n <input matInput [disabled]=\"true\"> \r\n </mat-form-field> \r\n }\r\n\r\n @if(_showButtonRight) {\r\n <div class=\"button-container\">\r\n <coer-button\r\n type=\"icon-no-border\"\r\n color=\"dark\"\r\n [icon]=\"_buttonIcon\" \r\n [isDisabled]=\"_isDisabledExternalButton\" \r\n (onClick)=\"_isEnable() ? onClickExternalButton.emit() : null\"\r\n ></coer-button>\r\n </div>\r\n }\r\n</div>", styles: ["div.coer-text-box{display:flex;align-items:center}div.coer-text-box mat-form-field{position:relative!important}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex{height:40px!important}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{width:100%!important;height:40px!important;padding:0!important}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label{overflow:visible!important;position:absolute!important;top:20px!important}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label.mdc-floating-label--float-above mat-label{color:var(--primary-inner);font-weight:700;position:relative;left:-10px;top:2px}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input{font-weight:400!important;font-size:17px!important;color:var(--black)!important}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active,div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:before,div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:after{border-bottom-color:var(--primary-inner)!important}div.coer-text-box mat-form-field div.mat-mdc-form-field-subscript-wrapper.mat-mdc-form-field-bottom-align{height:0px!important}div.coer-text-box mat-form-field span.icon-container{position:absolute!important;top:1px!important;right:-14px!important;z-index:5!important;width:30px;height:40px;display:flex;align-items:center;justify-content:center}div.coer-text-box mat-form-field span.icon-container i{font-size:20px!important}div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-xmark,div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass{color:#caced1!important;cursor:pointer!important}div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-xmark:hover,div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass:hover{color:#6c757d!important}div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-circle-check{color:var(--green)!important}div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-circle-exclamation{color:var(--red)!important}div.coer-text-box mat-form-field span.placeholder{width:calc(100% + 32px)!important;height:40px!important;position:absolute!important;z-index:1!important;top:0!important;left:-16px!important;cursor:wait!important}div.coer-text-box mat-form-field .placeholder,div.coer-text-box mat-form-field .placeholder *,div.coer-text-box mat-form-field .placeholder-glow,div.coer-text-box mat-form-field .placeholder-glow *{cursor:wait!important}div.coer-text-box mat-form-field.readonly div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:#bbbbbb83!important}div.coer-text-box div.button-container{width:40px!important;height:40px!important;display:flex!important;align-items:center!important;justify-content:center!important;background-color:#e6e7e9!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:transparent!important;padding-left:9px!important;padding-right:9px!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple,coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple:before,coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple:after{border-bottom-color:transparent!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex{height:28px!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{height:28px!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input{margin-top:3px!important;font-size:14px!important}coer-grid table tbody tr td.coer-textbox mat-form-field span.icon-container{transform:translate(-5px,-6px)!important}\n"] }]
|
1660
|
-
}],
|
1661
|
-
type: Input
|
1662
|
-
}], value: [{
|
1663
|
-
type: Input
|
1664
|
-
}] } });
|
1701
|
+
}], ctorParameters: () => [] });
|
1665
1702
|
|
1666
1703
|
class CoerGridExtension extends ControlValue {
|
1667
1704
|
constructor() {
|
1668
1705
|
super(...arguments);
|
1669
1706
|
//Injections
|
1670
|
-
this.
|
1707
|
+
this._alert = inject(CoerAlert);
|
1671
1708
|
//Elements
|
1672
1709
|
this._inputFile = viewChild.required('inputFileRef');
|
1673
1710
|
this._inputSearch = viewChild.required('inputSearch');
|
@@ -1677,15 +1714,15 @@ class CoerGridExtension extends ControlValue {
|
|
1677
1714
|
this._coerCheckboxList = viewChildren(CoerCheckbox);
|
1678
1715
|
//Variables
|
1679
1716
|
this._value = [];
|
1717
|
+
this._id = Tools.GetGuid('coer-grid');
|
1680
1718
|
this._value_signal = signal([]);
|
1681
1719
|
this._gridSearch = signal('');
|
1682
1720
|
this._isLoading = signal(true);
|
1721
|
+
this._sort = signal({ columnName: '', direction: 'none', icon: '' });
|
1683
1722
|
this._isLoadingMessage = true;
|
1684
|
-
this._id = Tools.GetGuid('coer-grid');
|
1685
1723
|
this._expandedGroups = [];
|
1686
1724
|
this._enableAnimations = false;
|
1687
1725
|
this._indexFocus = signal(0);
|
1688
|
-
this._sort = signal({ columnName: '', direction: 'none', icon: '' });
|
1689
1726
|
//Generic Tools
|
1690
1727
|
this.GetNumericFormat = Numbers.GetNumericFormat;
|
1691
1728
|
this.GetElementWidth = HTMLElements.GetElementWidth;
|
@@ -1914,6 +1951,14 @@ class CoerGridExtension extends ControlValue {
|
|
1914
1951
|
return (this._isGrouped() ? !(this._expandedGroups.some(x => x == group.groupBy)) : false);
|
1915
1952
|
};
|
1916
1953
|
}
|
1954
|
+
//AfterViewInit
|
1955
|
+
ngAfterViewInit() {
|
1956
|
+
Tools.Sleep().then(_ => {
|
1957
|
+
this._enableAnimations = true;
|
1958
|
+
this._isLoading.set(false);
|
1959
|
+
this._isLoadingMessage = false;
|
1960
|
+
});
|
1961
|
+
}
|
1917
1962
|
//getter
|
1918
1963
|
get _height() {
|
1919
1964
|
let height = this.height();
|
@@ -1934,13 +1979,6 @@ class CoerGridExtension extends ControlValue {
|
|
1934
1979
|
get _onlyOneCheck() {
|
1935
1980
|
return Tools.IsNotNull(this.checkbox.onlyOneCheck) && this.checkbox.onlyOneCheck;
|
1936
1981
|
}
|
1937
|
-
ngAfterViewInit() {
|
1938
|
-
Tools.Sleep().then(() => {
|
1939
|
-
this._enableAnimations = true;
|
1940
|
-
this._isLoading.set(false);
|
1941
|
-
this._isLoadingMessage = false;
|
1942
|
-
});
|
1943
|
-
}
|
1944
1982
|
//ControlValueAccessor
|
1945
1983
|
SetValue(value) {
|
1946
1984
|
let indexRow = 0;
|
@@ -2151,65 +2189,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
2151
2189
|
}] } });
|
2152
2190
|
|
2153
2191
|
class CoerSwitch extends ControlValue {
|
2192
|
+
//Constructor
|
2154
2193
|
constructor() {
|
2155
|
-
super(
|
2194
|
+
super();
|
2156
2195
|
//Elements
|
2157
2196
|
this.coerSwitch = viewChild.required('coerSwitch');
|
2158
2197
|
//Variables
|
2159
2198
|
this._value = false;
|
2160
2199
|
this._id = Tools.GetGuid('coer-switch');
|
2161
|
-
|
2200
|
+
//Inputs
|
2162
2201
|
this.id = input('');
|
2202
|
+
this.value = input(null);
|
2163
2203
|
this.label = input('');
|
2164
2204
|
this.labelPosition = input('after');
|
2165
2205
|
this.isLoading = input(false);
|
2166
2206
|
this.isDisabled = input(false);
|
2167
2207
|
this.isReadonly = input(false);
|
2168
2208
|
this.isInvisible = input(false);
|
2209
|
+
this.tooltip = input('');
|
2169
2210
|
this.tooltipPosition = input('top');
|
2170
2211
|
//Outputs
|
2171
2212
|
this.onChange = output();
|
2172
|
-
//
|
2213
|
+
//computed
|
2214
|
+
this._tooltip = computed(() => {
|
2215
|
+
return Tools.IsNotOnlyWhiteSpace(this.tooltip())
|
2216
|
+
? Strings.CleanUpBlanks(this.tooltip()) : '';
|
2217
|
+
});
|
2218
|
+
//computed
|
2219
|
+
this._tooltipPosition = computed(() => {
|
2220
|
+
switch (this.tooltipPosition()) {
|
2221
|
+
case 'top': return 'above';
|
2222
|
+
case 'right': return 'right';
|
2223
|
+
case 'bottom': return 'below';
|
2224
|
+
default: return 'left';
|
2225
|
+
}
|
2226
|
+
});
|
2227
|
+
//computed
|
2173
2228
|
this._isEnable = computed(() => {
|
2174
2229
|
return !this.isLoading() && !this.isDisabled() && !this.isInvisible();
|
2175
2230
|
});
|
2176
|
-
|
2177
|
-
|
2178
|
-
set value(value) {
|
2179
|
-
if (Tools.IsNull(value))
|
2180
|
-
value = false;
|
2181
|
-
this.SetValue(value);
|
2182
|
-
}
|
2183
|
-
set tooltip(value) {
|
2184
|
-
this._tooltip = value;
|
2185
|
-
if (value && this._tooltipElement) {
|
2186
|
-
this._tooltipElement.setContent({ '.tooltip-inner': this._tooltip });
|
2187
|
-
}
|
2188
|
-
}
|
2189
|
-
ngOnInit() {
|
2190
|
-
Tools.Sleep().then(() => {
|
2191
|
-
const htmlElement = document.getElementById(this._id);
|
2192
|
-
if (htmlElement) {
|
2193
|
-
htmlElement.addEventListener('mouseleave', () => {
|
2194
|
-
if (this._tooltipElement)
|
2195
|
-
this._tooltipElement.hide();
|
2196
|
-
});
|
2197
|
-
this._tooltipElement = new Tooltip(htmlElement, {
|
2198
|
-
html: true,
|
2199
|
-
title: this._tooltip,
|
2200
|
-
placement: this.tooltipPosition()
|
2201
|
-
});
|
2202
|
-
}
|
2231
|
+
this._effect = effect(() => {
|
2232
|
+
this.SetValue(Tools.IsNotNull(this.value()) ? this.value() : false);
|
2203
2233
|
});
|
2204
2234
|
}
|
2235
|
+
//OnDestroy
|
2205
2236
|
ngOnDestroy() {
|
2206
|
-
|
2207
|
-
Tools.Sleep().then(() => this._tooltipElement.dispose());
|
2208
|
-
}
|
2209
|
-
}
|
2210
|
-
//getter
|
2211
|
-
get value() {
|
2212
|
-
return this._value;
|
2237
|
+
this._effect?.destroy();
|
2213
2238
|
}
|
2214
2239
|
/** */
|
2215
2240
|
Focus() {
|
@@ -2223,17 +2248,13 @@ class CoerSwitch extends ControlValue {
|
|
2223
2248
|
this.SetValue(value);
|
2224
2249
|
this.onChange.emit(value);
|
2225
2250
|
}
|
2226
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerSwitch, deps:
|
2227
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.0.1", type: CoerSwitch, isStandalone: false, selector: "coer-switch", inputs: {
|
2251
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerSwitch, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
2252
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.0.1", type: CoerSwitch, isStandalone: false, selector: "coer-switch", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: true, isRequired: false, transformFunction: null }, isInvisible: { classPropertyName: "isInvisible", publicName: "isInvisible", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, tooltipPosition: { classPropertyName: "tooltipPosition", publicName: "tooltipPosition", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onChange: "onChange" }, providers: [CONTROL_VALUE(CoerSwitch)], viewQueries: [{ propertyName: "coerSwitch", first: true, predicate: ["coerSwitch"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div [ngClass]=\"{ 'coer-switch': true, 'placeholder-glow': isLoading(), 'invisible': isInvisible() }\">\r\n <div [id]=\"_id\" \r\n [matTooltip]=\"_tooltip()\"\r\n [matTooltipPosition]=\"_tooltipPosition()\"\r\n [matTooltipDisabled]=\"!_isEnable()\"\r\n [matTooltipHideDelay]=\"0\"\r\n [ngClass]=\"{ 'placeholder': isLoading() }\">\r\n \r\n <mat-slide-toggle\r\n #coerSwitch\r\n [checked]=\"_value\"\r\n [disabled]=\"!_isEnable()\"\r\n [labelPosition]=\"labelPosition()\"\r\n (change)=\"_Change($event.checked)\"\r\n >{{ label() }}</mat-slide-toggle>\r\n </div>\r\n</div>", styles: ["div.coer-switch{height:40px;display:flex!important;align-items:center!important;position:relative!important}div.coer-switch mat-slide-toggle div.mdc-form-field.mat-internal-form-field button .mdc-switch__track:after{background-color:var(--primary-inner)!important;filter:opacity(.6)!important}div.coer-switch mat-slide-toggle div.mdc-form-field.mat-internal-form-field button .mdc-switch__handle-track .mdc-switch__ripple{width:30px!important;height:30px!important}div.coer-switch mat-slide-toggle div.mdc-form-field.mat-internal-form-field button.mdc-switch.mdc-switch--selected.mdc-switch--checked .mdc-switch__handle-track .mdc-switch__handle .mdc-switch__icons{background-color:var(--primary-inner)!important;border-radius:20px!important}div.coer-switch mat-slide-toggle div.mdc-form-field.mat-internal-form-field label,div.coer-switch mat-slide-toggle div.mdc-form-field.mat-internal-form-field label::selection{font-weight:400;background-color:transparent!important;font-size:17px!important}div.coer-switch .placeholder{display:flex!important;height:27px!important}div.coer-switch .placeholder,div.coer-switch .placeholder *,div.coer-switch .placeholder-glow,div.coer-switch .placeholder-glow *{cursor:wait!important}coer-grid div.coer-switch{height:20px!important;justify-content:center!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2$5.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] }); }
|
2228
2253
|
}
|
2229
2254
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerSwitch, decorators: [{
|
2230
2255
|
type: Component,
|
2231
|
-
args: [{ selector: 'coer-switch', providers: [CONTROL_VALUE(CoerSwitch)], standalone: false, template: "<div [ngClass]=\"{ 'coer-switch': true, 'placeholder-glow': isLoading(), 'invisible': isInvisible() }\">\r\n <div [id]=\"_id\" [ngClass]=\"{ 'placeholder': isLoading() }\">\r\n <mat-slide-toggle\r\n #coerSwitch\r\n [checked]=\"_value\"\r\n [disabled]=\"!_isEnable()\"\r\n [labelPosition]=\"labelPosition()\"\r\n (change)=\"_Change($event.checked)\"\r\n >{{ label() }}</mat-slide-toggle>\r\n </div>\r\n</div>", styles: ["div.coer-switch{height:40px;display:flex!important;align-items:center!important;position:relative!important}div.coer-switch mat-slide-toggle div.mdc-form-field.mat-internal-form-field button .mdc-switch__track:after{background-color:var(--primary-inner)!important;filter:opacity(.6)!important}div.coer-switch mat-slide-toggle div.mdc-form-field.mat-internal-form-field button .mdc-switch__handle-track .mdc-switch__ripple{width:30px!important;height:30px!important}div.coer-switch mat-slide-toggle div.mdc-form-field.mat-internal-form-field button.mdc-switch.mdc-switch--selected.mdc-switch--checked .mdc-switch__handle-track .mdc-switch__handle .mdc-switch__icons{background-color:var(--primary-inner)!important;border-radius:20px!important}div.coer-switch mat-slide-toggle div.mdc-form-field.mat-internal-form-field label,div.coer-switch mat-slide-toggle div.mdc-form-field.mat-internal-form-field label::selection{font-weight:400;background-color:transparent!important;font-size:17px!important}div.coer-switch .placeholder{display:flex!important;height:27px!important}div.coer-switch .placeholder,div.coer-switch .placeholder *,div.coer-switch .placeholder-glow,div.coer-switch .placeholder-glow *{cursor:wait!important}coer-grid div.coer-switch{height:20px!important;justify-content:center!important}\n"] }]
|
2232
|
-
}],
|
2233
|
-
type: Input
|
2234
|
-
}], tooltip: [{
|
2235
|
-
type: Input
|
2236
|
-
}] } });
|
2256
|
+
args: [{ selector: 'coer-switch', providers: [CONTROL_VALUE(CoerSwitch)], standalone: false, template: "<div [ngClass]=\"{ 'coer-switch': true, 'placeholder-glow': isLoading(), 'invisible': isInvisible() }\">\r\n <div [id]=\"_id\" \r\n [matTooltip]=\"_tooltip()\"\r\n [matTooltipPosition]=\"_tooltipPosition()\"\r\n [matTooltipDisabled]=\"!_isEnable()\"\r\n [matTooltipHideDelay]=\"0\"\r\n [ngClass]=\"{ 'placeholder': isLoading() }\">\r\n \r\n <mat-slide-toggle\r\n #coerSwitch\r\n [checked]=\"_value\"\r\n [disabled]=\"!_isEnable()\"\r\n [labelPosition]=\"labelPosition()\"\r\n (change)=\"_Change($event.checked)\"\r\n >{{ label() }}</mat-slide-toggle>\r\n </div>\r\n</div>", styles: ["div.coer-switch{height:40px;display:flex!important;align-items:center!important;position:relative!important}div.coer-switch mat-slide-toggle div.mdc-form-field.mat-internal-form-field button .mdc-switch__track:after{background-color:var(--primary-inner)!important;filter:opacity(.6)!important}div.coer-switch mat-slide-toggle div.mdc-form-field.mat-internal-form-field button .mdc-switch__handle-track .mdc-switch__ripple{width:30px!important;height:30px!important}div.coer-switch mat-slide-toggle div.mdc-form-field.mat-internal-form-field button.mdc-switch.mdc-switch--selected.mdc-switch--checked .mdc-switch__handle-track .mdc-switch__handle .mdc-switch__icons{background-color:var(--primary-inner)!important;border-radius:20px!important}div.coer-switch mat-slide-toggle div.mdc-form-field.mat-internal-form-field label,div.coer-switch mat-slide-toggle div.mdc-form-field.mat-internal-form-field label::selection{font-weight:400;background-color:transparent!important;font-size:17px!important}div.coer-switch .placeholder{display:flex!important;height:27px!important}div.coer-switch .placeholder,div.coer-switch .placeholder *,div.coer-switch .placeholder-glow,div.coer-switch .placeholder-glow *{cursor:wait!important}coer-grid div.coer-switch{height:20px!important;justify-content:center!important}\n"] }]
|
2257
|
+
}], ctorParameters: () => [] });
|
2237
2258
|
|
2238
2259
|
class CoerGrid extends CoerGridExtension {
|
2239
2260
|
constructor() {
|
@@ -2325,7 +2346,7 @@ class CoerGrid extends CoerGridExtension {
|
|
2325
2346
|
message += ` <b>${extension}</b>,`;
|
2326
2347
|
}
|
2327
2348
|
message = message.substring(0, message.length - 1);
|
2328
|
-
this.
|
2349
|
+
this._alert.Warning(message, 'Invalid File Type', 'bi bi-filetype-xlsx fa-lg');
|
2329
2350
|
this.onClickImport.emit({ data: [], file: null });
|
2330
2351
|
}
|
2331
2352
|
this._inputFile().nativeElement.value = null;
|
@@ -2772,18 +2793,17 @@ class CoerGrid extends CoerGridExtension {
|
|
2772
2793
|
}
|
2773
2794
|
}
|
2774
2795
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerGrid, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
2775
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerGrid, isStandalone: false, selector: "coer-grid", providers: [CONTROL_VALUE(CoerGrid)], usesInheritance: true, ngImport: i0, template: "<div class=\"coer-grid\" [ngStyle]=\"{ 'width': width(), 'min-Width': MinWidth(), 'max-Width': MaxWidth(), 'margin': margin() }\">\r\n <header [id]=\"_id + '-header'\" class=\"row\">\r\n <!-- Slot -->\r\n <ng-content></ng-content>\r\n\r\n <!-- Export Button -->\r\n @if(exportButton.show && gridLength().dataSource > 0) {\r\n <div class=\"col-auto\">\r\n <coer-button\r\n type=\"icon\"\r\n [color]=\"_ColorButton(exportButton)\"\r\n icon=\"excel\"\r\n [tooltip]=\"_isLoading() ? 'Loading' : (exportButton.tooltip || 'Export')\"\r\n [path]=\"(exportButton && exportButton.path) ? exportButton.path : []\"\r\n [isDisabled]=\"_isDisabled() || _isLoading() || (exportButton.isDisabled || false)\"\r\n [isLoading]=\"_isLoading()\"\r\n [animation]=\"_enableAnimations\"\r\n (onClick)=\"_Export(!exportButton.preventDefault)\"\r\n ></coer-button>\r\n </div>\r\n }\r\n\r\n <!-- Import Button -->\r\n @if(importButton.show && !isReadonly()) {\r\n <div class=\"col-auto\">\r\n <input type=\"file\" #inputFileRef [multiple]=\"false\" (change)=\"_Import($event)\">\r\n\r\n <coer-button\r\n type=\"icon\"\r\n color=\"primary\"\r\n [color]=\"_ColorButton(importButton)\"\r\n [tooltip]=\"importButton.tooltip || 'Import'\"\r\n [path]=\"(importButton && importButton.path) ? importButton.path : []\"\r\n [isDisabled]=\"importButton.isDisabled || false\"\r\n [animation]=\"_enableAnimations\"\r\n (onClick)=\"_Import()\"\r\n ></coer-button>\r\n </div>\r\n }\r\n\r\n <!-- Add Button -->\r\n @if(addButton.show && !isReadonly()) {\r\n <div class=\"col-auto\">\r\n <coer-button\r\n type=\"icon\"\r\n [color]=\"_ColorButton(addButton)\"\r\n icon=\"new\"\r\n [tooltip]=\"addButton.tooltip || 'New'\"\r\n [path]=\"(addButton && addButton.path) ? addButton.path : []\"\r\n [isDisabled]=\"addButton.isDisabled || false\"\r\n [animation]=\"_enableAnimations\"\r\n (onClick)=\"onClickAdd.emit()\"\r\n ></coer-button>\r\n </div>\r\n }\r\n\r\n <!-- Save Button -->\r\n @if(saveButton.show && !isReadonly()) {\r\n <div class=\"col-auto\">\r\n <coer-button\r\n type=\"icon\"\r\n [color]=\"_ColorButton(saveButton)\"\r\n icon=\"save\"\r\n [tooltip]=\"saveButton.tooltip || 'Save'\"\r\n [path]=\"(saveButton && saveButton.path) ? saveButton.path : []\"\r\n [isDisabled]=\"saveButton.isDisabled || false\"\r\n [animation]=\"_enableAnimations\"\r\n (onClick)=\"onClickSave.emit()\"\r\n ></coer-button>\r\n </div>\r\n }\r\n\r\n <!-- Search -->\r\n @if(search.show) {\r\n <div class=\"col-auto\">\r\n <coer-textbox\r\n #inputSearch\r\n [id]=\"_GetId(-1, -1, 'search')\"\r\n [ngModel]=\"_gridSearch()\"\r\n placeholder=\"Search\"\r\n [isDisabled]=\"_isDisabled() || _isLoading()\"\r\n [selectOnFocus]=\"true\"\r\n width=\"250px\"\r\n [showSearchIcon]=\"true\"\r\n [showClearIcon]=\"true\"\r\n (onInput)=\"_InputChange(-1, 'Search', $event, 'coer-textbox-search')\"\r\n (onClickClear)=\"_InputChange(-1, 'Search', '', 'coer-textbox-search')\"\r\n (onKeyupEnter)=\"_KeyupEnter(-1, { indexRow: -1 }, 'coer-textbox-search', $event);\"\r\n ></coer-textbox>\r\n </div>\r\n }\r\n </header>\r\n\r\n <section [ngClass]=\"{ 'grid-container': true, 'invisible': isInvisible() }\"> \r\n <div #innerContainer [ngStyle]=\"{ 'height': _height, 'min-height': minHeight(), 'max-height': maxHeight() }\"> \r\n @if(!_isDisabled() && gridLength().dataSource <= 0 && !isLoading()) {\r\n <div class=\"no-data\"> No Data </div>\r\n }\r\n \r\n @if(!isLoading()) {\r\n <table class=\"table table-sm table-responsive table-striped\">\r\n <thead>\r\n <tr>\r\n @if(checkbox.show && gridLength().dataSource > 0) {\r\n <!-- CheckBox Column -->\r\n <th scope=\"col\" class=\"check-box\">\r\n <div *ngIf=\"!_onlyOneCheck\" [ngClass]=\"{ 'invisible': _isLoadingMessage }\">\r\n <coer-checkbox\r\n [id]=\"_GetId(0, 0, 'checkboxAll')\"\r\n [ignoreDataBinding]=\"true\"\r\n [isDisabled]=\"_isDisabled() || _isLoading()\"\r\n (onChange)=\"_ClickCheck(_GetId(0, 0, 'checkboxAll'), $event, true)\"\r\n ></coer-checkbox>\r\n </div>\r\n </th>\r\n }\r\n \r\n <!-- Dynamic Grid Column -->\r\n @for(header of _gridColumns(); track header.indexColumn) {\r\n <th scope=\"col\" (dblclick)=\"Sort(header.columnName)\"\r\n [ngClass]=\"{\r\n 'no-selection': true,\r\n 'cursor-default': !enableSort() && !_isLoading(),\r\n 'cursor-pointer': enableSort() && !_isLoading(),\r\n 'cursor-wait': _isLoading()\r\n }\"\r\n [ngStyle]=\"{\r\n 'width': header.width,\r\n 'text-align': _GetAttribute(header.columnName, null, 'textAlign', 'defaul-cell')\r\n }\">\r\n <div class=\"no-selection d-flex align-items-center\">\r\n <span class=\"me-1\"> {{ _GetColumnName(header.columnName) }} </span>\r\n <i [class]=\"_GetShortIcon(header.columnName)\"></i> \r\n <i [class]=\"_GetSearchIcon(header.columnName)\"></i>\r\n </div>\r\n </th>\r\n }\r\n \r\n <!-- Delete Button Column -->\r\n @if(_ButtonByRow('showDeleteButton')) {\r\n <th scope=\"col\" class=\"action-button\"></th>\r\n }\r\n \r\n <!-- Edit Button Column -->\r\n @if(_ButtonByRow('showEditButton')) {\r\n <th scope=\"col\" class=\"action-button\"></th>\r\n }\r\n \r\n <!-- Edit Button Column -->\r\n @if(_ButtonByRow('showGoButton')) {\r\n <th scope=\"col\" class=\"action-button\"></th>\r\n }\r\n </tr>\r\n </thead>\r\n \r\n <!-- body -->\r\n @for(group of _gridDataSource(); track group.indexGroup) {\r\n <tbody>\r\n <!--<tr v-if=\"_isGrouped\">\r\n <td :colspan=\"_colspan\" class=\"group\">\r\n <MesAccordion\r\n :ref=\"`accordion${group.indexGroup}-${id}`\"\r\n :title=\"`${_CleanHeaderName(groupBy)} (${group.length}): ${group.groupBy}`\"\r\n :isLoading=\"_isLoading()\"\r\n @expanded=\"_ToogleAccordion(group.groupBy, true, group.indexGroup)\"\r\n @collapsed=\"_ToogleAccordion(group.groupBy, false, group.indexGroup)\"\r\n ></MesAccordion>\r\n </td>\r\n </tr>-->\r\n \r\n @for(row of group.rows; track row.indexRow) {\r\n <tr [id]=\"_GetId(row.indexRow, 0, 'row')\"\r\n [ngClass]=\"{ 'loading': isLoading(), 'd-none': _HideRow(group), 'row-focus': (row.indexRow == _indexFocus() && enableRowFocus()) }\"\r\n (click)=\"_indexFocus.set(row.indexRow)\">\r\n \r\n @if(checkbox.show) {\r\n <!-- CheckBox Column -->\r\n <td class=\"check-box\">\r\n <div [ngClass]=\"{ 'invisible': _isLoadingMessage }\">\r\n <coer-checkbox\r\n [id]=\"_GetId(row.indexRow, 0, 'checkbox')\"\r\n [ignoreDataBinding]=\"true\"\r\n [isDisabled]=\"_isDisabled() || _isLoading()\"\r\n (onChange)=\"_ClickCheck(_GetId(row.indexRow, 0, 'checkbox'), $event, false, row)\"\r\n ></coer-checkbox>\r\n </div>\r\n \r\n <div [ngClass]=\"{ 'invisible': !_isLoadingMessage, 'spinner-border-container': true }\">\r\n <i class=\"spinner-border\"></i>\r\n </div>\r\n </td>\r\n }\r\n \r\n <!-- Dynamic Column -->\r\n @for(header of _gridColumns(); track header.indexColumn) {\r\n @if(_IsCellType(header.columnName, row, 'template')) {\r\n <td class=\"template\"\r\n (click)=\"_isDisabled() ? null : onClickRow.emit(row)\"\r\n (dblclick)=\"_isDisabled() ? null : onDoubleClickRow.emit(row)\">\r\n <div [innerHTML]=\"_GetAttribute(header.columnName, row, 'template', 'defaul-cell') | html\" class=\"template\"></div>\r\n </td>\r\n }\r\n \r\n @else if(_IsCellType(header.columnName, row, 'coerTextbox')) {\r\n <!-- coer-textbox -->\r\n <td class=\"coer-textbox\">\r\n <coer-textbox\r\n [id]=\"_GetId(row.indexRow, header.indexColumn)\"\r\n [(ngModel)]=\"row[header.columnName]\"\r\n [isDisabled]=\"_GetAttribute(header.columnName, row, 'isDisabled', 'coerTextbox') || _isDisabled() || _isLoading()\"\r\n [isValid]=\"_GetAttribute(header.columnName, row, 'isValid', 'coerTextbox') || false\"\r\n [isInvalid]=\"_GetAttribute(header.columnName, row, 'isInvalid', 'coerTextbox') || false\"\r\n [selectOnFocus]=\"_GetAttribute(header.columnName, row, 'selectOnFocus', 'coerTextbox') || true\"\r\n [placeholder]=\"_GetAttribute(header.columnName, row, 'placeholder', 'coerTextbox') || ('Type ' + header.columnName + '...')\"\r\n [textPosition]=\"_GetAttribute(header.columnName, row, 'textPosition', 'coerTextbox') || 'left'\"\r\n [minLength]=\"_GetAttribute(header.columnName, row, 'minLength', 'coerTextbox') || 0\"\r\n [maxLength]=\"_GetAttribute(header.columnName, row, 'maxLength', 'coerTextbox') || 50\"\r\n (onInput)=\"_InputChange(row.indexRow, header.columnName, $event, 'coer-textbox')\"\r\n (onKeyupEnter)=\"_KeyupEnter(header.indexColumn, row, 'coer-textbox', $event)\"\r\n ></coer-textbox>\r\n </td>\r\n }\r\n \r\n \r\n @else if(_IsCellType(header.columnName, row, 'coerNumberbox')) {\r\n <!-- coer-numberbox -->\r\n <td class=\"coer-numberbox\">\r\n <coer-numberbox\r\n [id]=\"_GetId(row.indexRow, header.indexColumn)\"\r\n [(ngModel)]=\"row[header.columnName]\"\r\n [isDisabled]=\"_GetAttribute(header.columnName, row, 'isDisabled', 'coerNumberbox') || _isDisabled() || _isLoading()\"\r\n [isValid]=\"_GetAttribute(header.columnName, row, 'isValid', 'coerNumberbox') || false\"\r\n [isInvalid]=\"_GetAttribute(header.columnName, row, 'isInvalid', 'coerNumberbox') || false\"\r\n [selectOnFocus]=\"_GetAttribute(header.columnName, row, 'selectOnFocus', 'coerNumberbox') || true\"\r\n [placeholder]=\"_GetAttribute(header.columnName, row, 'placeholder', 'coerNumberbox') || ''\"\r\n [textPosition]=\"_GetAttribute(header.columnName, row, 'textPosition', 'coerNumberbox') || 'right'\"\r\n [min]=\"_GetAttribute(header.columnName, row, 'min', 'coerNumberbox') || 0\"\r\n [max]=\"_GetAttribute(header.columnName, row, 'max', 'coerNumberbox') || 2147483647\"\r\n [decimals]=\"_GetAttribute(header.columnName, row, 'decimals', 'coerNumberbox') || 0\"\r\n (onInput)=\"_InputChange(row.indexRow, header.columnName, $event, 'coer-numberbox')\"\r\n (onKeyupEnter)=\"_KeyupEnter(header.indexColumn, row, 'coer-numberbox', $event)\"\r\n ></coer-numberbox>\r\n </td>\r\n }\r\n \r\n \r\n @else if(_IsCellType(header.columnName, row, 'coerSelectbox')) {\r\n <!-- coer-numberbox -->\r\n <td class=\"coer-selectbox\">\r\n <coer-selectbox\r\n [id]=\"_GetId(row.indexRow, header.indexColumn)\"\r\n [(ngModel)]=\"row[header.columnName]\"\r\n [isDisabled]=\"_GetAttribute(header.columnName, row, 'isDisabled', 'coerSelectbox') || _isDisabled() || _isLoading()\"\r\n [isValid]=\"_GetAttribute(header.columnName, row, 'isValid', 'coerSelectbox') || false\"\r\n [isInvalid]=\"_GetAttribute(header.columnName, row, 'isInvalid', 'coerSelectbox') || false\"\r\n [dataSource]=\"_GetAttribute(header.columnName, row, 'dataSource', 'coerSelectbox') || []\"\r\n [placeholder]=\"_GetAttribute(header.columnName, row, 'placeholder', 'coerSelectbox') || '-- Select --'\"\r\n [displayProperty]=\"_GetAttribute(header.columnName, row, 'displayProperty', 'coerSelectbox') || 'name'\"\r\n (onSelected)=\"_InputChange(row.indexRow, header.columnName, $event, 'coer-selectbox'); _KeyupEnter(header.indexColumn, row, 'coer-selectbox', $event)\"\r\n ></coer-selectbox>\r\n </td>\r\n }\r\n \r\n \r\n @else if(_IsCellType(header.columnName, row, 'coerSwitch')) {\r\n <!-- coer-switch -->\r\n <td>\r\n <coer-switch\r\n [id]=\"_GetId(row.indexRow, header.indexColumn)\"\r\n [(ngModel)]=\"row[header.columnName]\"\r\n [isDisabled]=\"_GetAttribute(header.columnName, row, 'isDisabled', 'coerSwitch') || _isDisabled() || _isLoading()\"\r\n [tooltip]=\"_GetAttribute(header.columnName, row, 'tooltip', 'coerSwitch')\"\r\n [tooltipPosition]=\"_GetAttribute(header.columnName, row, 'tooltipPosition', 'coerSwitch') || 'left'\"\r\n [isInvisible]=\"_isDisabled()\"\r\n (onChange)=\"_InputChange(row.indexRow, header.columnName, $event, 'coer-switch')\"\r\n ></coer-switch>\r\n </td>\r\n }\r\n \r\n @else {\r\n <!-- Default Cell -->\r\n <td class=\"default-cell\"\r\n (click)=\"_ClickOnRow(row)\"\r\n (dblclick)=\"_isDisabled() ? null : onDoubleClickRow.emit(row)\"\r\n [ngStyle]=\"{\r\n 'text-align': _GetAttribute(header.columnName, row, 'textAlign', 'defaul-cell'),\r\n 'white-space': 'normal'\r\n }\">\r\n \r\n <div [id]=\"_GetId(row.indexRow, header.indexColumn)\"\r\n [ngClass]=\"{\r\n 'text-blue-bold': _IsCellColor(header.columnName, row, 'colorBlue'),\r\n 'text-green-bold': _IsCellColor(header.columnName, row, 'colorGreen'),\r\n 'text-yellow-bold': _IsCellColor(header.columnName, row, 'colorYellow'),\r\n 'text-red-bold': _IsCellColor(header.columnName, row, 'colorRed'),\r\n 'text-right-bold': _IsCellType(header.columnName, row, 'number')\r\n }\">\r\n \r\n @if(_IsCellType(header.columnName, row, 'number')) {\r\n <span> {{ GetNumericFormat(row[header.columnName]) }} </span>\r\n }\r\n \r\n @else if(_IsCellType(header.columnName, row, 'date')) {\r\n <span> {{ _GetDateFormat(row[header.columnName], _IsCellType(header.columnName, row, 'toLocalZone')) }} </span>\r\n }\r\n \r\n @else if(_IsCellType(header.columnName, row, 'date-time')) {\r\n <span> {{ _GetDateTimeFormat(row[header.columnName], _IsCellType(header.columnName, row, 'toLocalZone')) }} </span>\r\n }\r\n \r\n @else {\r\n <span> {{ _GetCellValue(row, header.columnName) }} </span>\r\n }\r\n </div>\r\n </td>\r\n }\r\n }\r\n \r\n <!-- Delete Button -->\r\n @if(_ButtonByRow('showDeleteButton')) {\r\n <td class=\"action-button\">\r\n @if(_ButtonByRow('showDeleteButton', row)) {\r\n <coer-button\r\n type=\"icon-no-border\"\r\n [color]=\"_ColorButtonByRow('deleteButtonColor')\"\r\n icon=\"delete\"\r\n [tooltip]=\"_GetTooltip('Delete', row)\"\r\n [isInvisible]=\"_isDisabled()\"\r\n [isReadonly]=\"isReadonly()\"\r\n [isDisabled]=\"_isLoading()\"\r\n (onClick)=\"onClickDeleteRow.emit(row)\"\r\n ></coer-button>\r\n }\r\n </td>\r\n }\r\n \r\n <!-- Edit Button -->\r\n @if(_ButtonByRow('showEditButton')) {\r\n <td class=\"action-button\">\r\n @if(_ButtonByRow('showEditButton', row)) {\r\n <coer-button\r\n type=\"icon-no-border\"\r\n [color]=\"_ColorButtonByRow('editButtonColor')\"\r\n icon=\"edit\"\r\n [tooltip]=\"_GetTooltip('Edit', row)\"\r\n [isInvisible]=\"_isDisabled()\"\r\n [isDisabled]=\"_isLoading()\"\r\n (onClick)=\"onClickEditRow.emit(row)\"\r\n ></coer-button>\r\n }\r\n </td>\r\n }\r\n \r\n <!-- GO Button -->\r\n @if(_ButtonByRow('showGoButton')) {\r\n <td class=\"action-button\">\r\n @if(_ButtonByRow('showGoButton', row)) {\r\n <coer-button\r\n type=\"icon-no-border\"\r\n [color]=\"_ColorButtonByRow('goButtonColor')\"\r\n icon=\"go\"\r\n [tooltip]=\"_GetTooltip('Go to', row, 'detail')\"\r\n [isInvisible]=\"_isDisabled()\"\r\n [isDisabled]=\"_isLoading()\"\r\n (onClick)=\"onClickGoRow.emit(row)\"\r\n ></coer-button>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </tbody>\r\n }\r\n </table>\r\n }\r\n\r\n @else {\r\n <!-- Grid Message -->\r\n <div class=\"loading\" [ngStyle]=\"{ \r\n 'width': '100%', \r\n 'height': '100%',\r\n 'bottom': showFooter() ? '35px' : '10px'\r\n }\">\r\n <i class=\"spinner-border\"></i>\r\n <span class=\"fa-fade\">Loading</span>\r\n </div> \r\n }\r\n </div>\r\n </section>\r\n\r\n @if(showFooter()) {\r\n <footer class=\"grid-footer\">\r\n <span>\r\n @if(_isLoadingMessage) {\r\n <span class=\"fa-fade\"> Loading </span>\r\n }\r\n\r\n @else if(gridLength().dataSourceSelected > 0) {\r\n <span>\r\n <i class=\"bi bi-check2-square ms-1\"></i>\r\n {{ gridLength().dataSourceSelected }}\r\n </span>\r\n }\r\n </span>\r\n\r\n <span class=\"me-1\"> {{ gridLength().dataSourceFiltered | numericFormat }} Rows </span>\r\n </footer>\r\n }\r\n</div>", styles: ["div.coer-grid header{align-items:flex-end;justify-content:flex-end;padding-right:8px;margin:0}div.coer-grid header>div{padding:0 0 10px 10px;display:flex;align-items:baseline}div.coer-grid header>div a{height:40px!important}div.coer-grid table{table-layout:auto;border-collapse:separate;border-spacing:1px 0px;margin:0;font-size:14px}div.coer-grid table thead tr th{position:sticky!important;z-index:100!important;top:0!important;background-color:var(--gray)!important;color:var(--smoke)!important;padding:5px!important;vertical-align:middle!important;overflow:hidden;text-overflow:ellipsis;word-wrap:break-word;min-width:50px!important;white-space:nowrap!important}div.coer-grid table tbody{border:0px!important}div.coer-grid table tbody tr:not(.row-focus):hover td{color:#000!important;background-color:#f1f6ff}div.coer-grid table tbody tr td{border:0px!important;padding:5px!important;vertical-align:middle!important;white-space:break-spaces;text-overflow:ellipsis;overflow:hidden;min-height:31px!important}div.coer-grid table tbody tr.row-focus td{background-color:#cde1ff}div.coer-grid table tbody tr td.coer-textbox,div.coer-grid table tbody tr td.coer-numberbox,div.coer-grid table tbody tr td.coer-selectbox{padding:0!important;overflow:visible!important}div.coer-grid table tbody tr td.default-cell{cursor:pointer!important}div.coer-grid table thead tr th.action-button,div.coer-grid table thead tr td.action-button,div.coer-grid table thead tr th.check-box,div.coer-grid table thead tr td.check-box,div.coer-grid table tbody tr th.action-button,div.coer-grid table tbody tr td.action-button,div.coer-grid table tbody tr th.check-box table tbody tr td.check-box{text-align:center!important;cursor:default!important;min-width:40px!important;max-width:40px!important;width:40px!important;padding:0!important}div.coer-grid footer.grid-footer{display:flex;align-items:center;justify-content:space-between;font-size:small;color:#999;padding-top:5px}div.coer-grid section.grid-container{position:relative;overflow:auto}div.coer-grid div.loading,div.coer-grid div.no-data{position:absolute;display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:25px;color:gray}div.coer-grid div.loading{background-color:#bbbbbb83!important;flex-direction:column!important;gap:10px!important;z-index:1}div.coer-grid div.loading span.fa-fade{position:relative!important;top:50px!important}div.coer-grid tr.loading{background-color:#bbbbbb83!important}div.coer-grid div.loading i.spinner-border{color:var(--primary-inner)!important;width:70px!important;height:70px!important;font-size:20px!important;position:absolute!important}div.coer-grid td.check-box div.spinner-border-container{position:absolute;transform:translate(7px,-19px)}div.coer-grid td.check-box div.spinner-border-container i.spinner-border{width:15px!important;height:15px!important;color:var(--primary-inner)!important}div.coer-grid table thead tr th.check-box>div,div.coer-grid table tbody tr td.check-box>div{display:flex;align-items:center;justify-content:center;cursor:default!important}div.coer-grid input.form-check-input{box-shadow:none!important;margin:0}div.coer-grid input[type=checkbox]{cursor:pointer!important}div.coer-grid td.group{padding:0!important;margin:0!important}div.coer-grid td.group>*{border-top:1px solid var(--gray)!important;border-bottom:1px solid var(--gray)!important;padding:0!important;margin:0!important}div.coer-grid .template,div.coer-grid .template div{white-space:nowrap!important;display:flex!important;align-items:center!important;cursor:pointer!important;gap:5px!important;width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: CoerButton, selector: "coer-button", inputs: ["id", "color", "type", "icon", "iconPosition", "path", "animation", "isLoading", "isDisabled", "isReadonly", "isInvisible", "width", "minWidth", "maxWidth", "height", "minHeight", "marginTop", "marginRight", "marginBottom", "marginLeft", "tooltipPosition", "tooltip"], outputs: ["onClick"] }, { kind: "component", type: CoerCheckbox, selector: "coer-checkbox", inputs: ["value", "id", "label", "labelPosition", "isLoading", "isDisabled", "isReadonly", "isInvisible", "ignoreDataBinding"], outputs: ["onChange"] }, { kind: "component", type: CoerNumberBox, selector: "coer-numberbox", inputs: ["value", "id", "label", "placeholder", "textPosition", "min", "max", "isInvalid", "isValid", "externalButton", "selectOnFocus", "decimals", "isLoading", "isDisabled", "isReadonly", "isInvisible", "width", "minWidth", "maxWidth", "marginTop", "marginRight", "marginBottom", "marginLeft"], outputs: ["onKeyupEnter", "onInput", "onClickExternalButton"] }, { kind: "component", type: CoerSelectbox, selector: "coer-selectbox", inputs: ["value", "id", "label", "placeholder", "isInvalid", "isValid", "dataSource", "displayProperty", "rowsByPage", "isLoading", "isDisabled", "isReadonly", "isInvisible", "width", "minWidth", "maxWidth", "marginTop", "marginRight", "marginBottom", "marginLeft"], outputs: ["onSelected", "onUnselect"] }, { kind: "component", type: CoerSwitch, selector: "coer-switch", inputs: ["value", "id", "label", "labelPosition", "isLoading", "isDisabled", "isReadonly", "isInvisible", "tooltipPosition", "tooltip"], outputs: ["onChange"] }, { kind: "component", type: CoerTextBox, selector: "coer-textbox", inputs: ["id", "label", "placeholder", "textPosition", "minLength", "maxLength", "isInvalid", "isValid", "externalButton", "selectOnFocus", "showClearIcon", "showSearchIcon", "isLoading", "isDisabled", "isReadonly", "isInvisible", "width", "minWidth", "maxWidth", "marginTop", "marginRight", "marginBottom", "marginLeft", "value"], outputs: ["onKeyupEnter", "onInput", "onClickClear", "onClickSearch", "onClickExternalButton"] }, { kind: "pipe", type: i9.HtmlPipe, name: "html" }, { kind: "pipe", type: i9.NumericFormatPipe, name: "numericFormat" }] }); }
|
2796
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerGrid, isStandalone: false, selector: "coer-grid", providers: [CONTROL_VALUE(CoerGrid)], usesInheritance: true, ngImport: i0, template: "<div class=\"coer-grid\" [ngStyle]=\"{ 'width': width(), 'min-Width': MinWidth(), 'max-Width': MaxWidth(), 'margin': margin() }\">\r\n <header [id]=\"_id + '-header'\" class=\"row\">\r\n <!-- Slot -->\r\n <ng-content></ng-content>\r\n\r\n <!-- Export Button -->\r\n @if(exportButton.show && gridLength().dataSource > 0) {\r\n <div class=\"col-auto\">\r\n <coer-button\r\n type=\"icon\"\r\n [color]=\"_ColorButton(exportButton)\"\r\n icon=\"excel\"\r\n [tooltip]=\"_isLoading() ? 'Loading' : (exportButton.tooltip || 'Export')\"\r\n [path]=\"(exportButton && exportButton.path) ? exportButton.path : []\"\r\n [isDisabled]=\"_isDisabled() || _isLoading() || (exportButton.isDisabled || false)\"\r\n [isLoading]=\"_isLoading()\" \r\n (onClick)=\"_Export(!exportButton.preventDefault)\"\r\n ></coer-button>\r\n </div>\r\n }\r\n\r\n <!-- Import Button -->\r\n @if(importButton.show && !isReadonly()) {\r\n <div class=\"col-auto\">\r\n <input type=\"file\" #inputFileRef [multiple]=\"false\" (change)=\"_Import($event)\">\r\n\r\n <coer-button\r\n type=\"icon\"\r\n color=\"primary\"\r\n [color]=\"_ColorButton(importButton)\"\r\n [tooltip]=\"importButton.tooltip || 'Import'\"\r\n [path]=\"(importButton && importButton.path) ? importButton.path : []\"\r\n [isDisabled]=\"importButton.isDisabled || false\" \r\n (onClick)=\"_Import()\"\r\n ></coer-button>\r\n </div>\r\n }\r\n\r\n <!-- Add Button -->\r\n @if(addButton.show && !isReadonly()) {\r\n <div class=\"col-auto\">\r\n <coer-button\r\n type=\"icon\"\r\n [color]=\"_ColorButton(addButton)\"\r\n icon=\"new\"\r\n [tooltip]=\"addButton.tooltip || 'New'\"\r\n [path]=\"(addButton && addButton.path) ? addButton.path : []\"\r\n [isDisabled]=\"addButton.isDisabled || false\" \r\n (onClick)=\"onClickAdd.emit()\"\r\n ></coer-button>\r\n </div>\r\n }\r\n\r\n <!-- Save Button -->\r\n @if(saveButton.show && !isReadonly()) {\r\n <div class=\"col-auto\">\r\n <coer-button\r\n type=\"icon\"\r\n [color]=\"_ColorButton(saveButton)\"\r\n icon=\"save\"\r\n [tooltip]=\"saveButton.tooltip || 'Save'\"\r\n [path]=\"(saveButton && saveButton.path) ? saveButton.path : []\"\r\n [isDisabled]=\"saveButton.isDisabled || false\" \r\n (onClick)=\"onClickSave.emit()\"\r\n ></coer-button>\r\n </div>\r\n }\r\n\r\n <!-- Search -->\r\n @if(search.show) {\r\n <div class=\"col-auto\">\r\n <coer-textbox\r\n #inputSearch\r\n [id]=\"_GetId(-1, -1, 'search')\"\r\n [ngModel]=\"_gridSearch()\"\r\n placeholder=\"Search\"\r\n [isDisabled]=\"_isDisabled() || _isLoading()\"\r\n [selectOnFocus]=\"true\"\r\n width=\"250px\"\r\n [showSearchIcon]=\"true\"\r\n [showClearIcon]=\"true\"\r\n (onInput)=\"_InputChange(-1, 'Search', $event, 'coer-textbox-search')\"\r\n (onClickClear)=\"_InputChange(-1, 'Search', '', 'coer-textbox-search')\"\r\n (onKeyupEnter)=\"_KeyupEnter(-1, { indexRow: -1 }, 'coer-textbox-search', $event);\"\r\n ></coer-textbox>\r\n </div>\r\n }\r\n </header>\r\n\r\n <section [ngClass]=\"{ 'grid-container': true, 'invisible': isInvisible() }\"> \r\n <div #innerContainer [ngStyle]=\"{ 'height': _height, 'min-height': minHeight(), 'max-height': maxHeight() }\"> \r\n @if(!_isDisabled() && gridLength().dataSource <= 0 && !isLoading()) {\r\n <div class=\"no-data\"> No Data </div>\r\n }\r\n \r\n @if(!isLoading()) {\r\n <table class=\"table table-sm table-responsive table-striped\">\r\n <thead>\r\n <tr>\r\n @if(checkbox.show && gridLength().dataSource > 0) {\r\n <!-- CheckBox Column -->\r\n <th scope=\"col\" class=\"check-box\">\r\n <div *ngIf=\"!_onlyOneCheck\" [ngClass]=\"{ 'invisible': _isLoadingMessage }\">\r\n <coer-checkbox\r\n [id]=\"_GetId(0, 0, 'checkboxAll')\"\r\n [ignoreDataBinding]=\"true\"\r\n [isDisabled]=\"_isDisabled() || _isLoading()\"\r\n (onChange)=\"_ClickCheck(_GetId(0, 0, 'checkboxAll'), $event, true)\"\r\n ></coer-checkbox>\r\n </div>\r\n </th>\r\n }\r\n \r\n <!-- Dynamic Grid Column -->\r\n @for(header of _gridColumns(); track header.indexColumn) {\r\n <th scope=\"col\" (dblclick)=\"Sort(header.columnName)\"\r\n [ngClass]=\"{\r\n 'no-selection': true,\r\n 'cursor-default': !enableSort() && !_isLoading(),\r\n 'cursor-pointer': enableSort() && !_isLoading(),\r\n 'cursor-wait': _isLoading()\r\n }\"\r\n [ngStyle]=\"{\r\n 'width': header.width,\r\n 'text-align': _GetAttribute(header.columnName, null, 'textAlign', 'defaul-cell')\r\n }\">\r\n <div class=\"no-selection d-flex align-items-center\">\r\n <span class=\"me-1\"> {{ _GetColumnName(header.columnName) }} </span>\r\n <i [class]=\"_GetShortIcon(header.columnName)\"></i> \r\n <i [class]=\"_GetSearchIcon(header.columnName)\"></i>\r\n </div>\r\n </th>\r\n }\r\n \r\n <!-- Delete Button Column -->\r\n @if(_ButtonByRow('showDeleteButton')) {\r\n <th scope=\"col\" class=\"action-button\"></th>\r\n }\r\n \r\n <!-- Edit Button Column -->\r\n @if(_ButtonByRow('showEditButton')) {\r\n <th scope=\"col\" class=\"action-button\"></th>\r\n }\r\n \r\n <!-- Edit Button Column -->\r\n @if(_ButtonByRow('showGoButton')) {\r\n <th scope=\"col\" class=\"action-button\"></th>\r\n }\r\n </tr>\r\n </thead>\r\n \r\n <!-- body -->\r\n @for(group of _gridDataSource(); track group.indexGroup) {\r\n <tbody>\r\n <!--<tr v-if=\"_isGrouped\">\r\n <td :colspan=\"_colspan\" class=\"group\">\r\n <MesAccordion\r\n :ref=\"`accordion${group.indexGroup}-${id}`\"\r\n :title=\"`${_CleanHeaderName(groupBy)} (${group.length}): ${group.groupBy}`\"\r\n :isLoading=\"_isLoading()\"\r\n @expanded=\"_ToogleAccordion(group.groupBy, true, group.indexGroup)\"\r\n @collapsed=\"_ToogleAccordion(group.groupBy, false, group.indexGroup)\"\r\n ></MesAccordion>\r\n </td>\r\n </tr>-->\r\n \r\n @for(row of group.rows; track row.indexRow) {\r\n <tr [id]=\"_GetId(row.indexRow, 0, 'row')\"\r\n [ngClass]=\"{ 'loading': isLoading(), 'd-none': _HideRow(group), 'row-focus': (row.indexRow == _indexFocus() && enableRowFocus()) }\"\r\n (click)=\"_indexFocus.set(row.indexRow)\">\r\n \r\n @if(checkbox.show) {\r\n <!-- CheckBox Column -->\r\n <td class=\"check-box\">\r\n <div [ngClass]=\"{ 'invisible': _isLoadingMessage }\">\r\n <coer-checkbox\r\n [id]=\"_GetId(row.indexRow, 0, 'checkbox')\"\r\n [ignoreDataBinding]=\"true\"\r\n [isDisabled]=\"_isDisabled() || _isLoading()\"\r\n (onChange)=\"_ClickCheck(_GetId(row.indexRow, 0, 'checkbox'), $event, false, row)\"\r\n ></coer-checkbox>\r\n </div>\r\n \r\n <div [ngClass]=\"{ 'invisible': !_isLoadingMessage, 'spinner-border-container': true }\">\r\n <i class=\"spinner-border\"></i>\r\n </div>\r\n </td>\r\n }\r\n \r\n <!-- Dynamic Column -->\r\n @for(header of _gridColumns(); track header.indexColumn) {\r\n @if(_IsCellType(header.columnName, row, 'template')) {\r\n <td class=\"template\"\r\n (click)=\"_isDisabled() ? null : onClickRow.emit(row)\"\r\n (dblclick)=\"_isDisabled() ? null : onDoubleClickRow.emit(row)\">\r\n <div [innerHTML]=\"_GetAttribute(header.columnName, row, 'template', 'defaul-cell') | html\" class=\"template\"></div>\r\n </td>\r\n }\r\n \r\n @else if(_IsCellType(header.columnName, row, 'coerTextbox')) {\r\n <!-- coer-textbox -->\r\n <td class=\"coer-textbox\">\r\n <coer-textbox\r\n [id]=\"_GetId(row.indexRow, header.indexColumn)\"\r\n [(ngModel)]=\"row[header.columnName]\"\r\n [isDisabled]=\"_GetAttribute(header.columnName, row, 'isDisabled', 'coerTextbox') || _isDisabled() || _isLoading()\"\r\n [isValid]=\"_GetAttribute(header.columnName, row, 'isValid', 'coerTextbox') || false\"\r\n [isInvalid]=\"_GetAttribute(header.columnName, row, 'isInvalid', 'coerTextbox') || false\"\r\n [selectOnFocus]=\"_GetAttribute(header.columnName, row, 'selectOnFocus', 'coerTextbox') || true\"\r\n [placeholder]=\"_GetAttribute(header.columnName, row, 'placeholder', 'coerTextbox') || ('Type ' + header.columnName + '...')\"\r\n [textPosition]=\"_GetAttribute(header.columnName, row, 'textPosition', 'coerTextbox') || 'left'\"\r\n [minLength]=\"_GetAttribute(header.columnName, row, 'minLength', 'coerTextbox') || 0\"\r\n [maxLength]=\"_GetAttribute(header.columnName, row, 'maxLength', 'coerTextbox') || 50\"\r\n (onInput)=\"_InputChange(row.indexRow, header.columnName, $event, 'coer-textbox')\"\r\n (onKeyupEnter)=\"_KeyupEnter(header.indexColumn, row, 'coer-textbox', $event)\"\r\n ></coer-textbox>\r\n </td>\r\n }\r\n \r\n \r\n @else if(_IsCellType(header.columnName, row, 'coerNumberbox')) {\r\n <!-- coer-numberbox -->\r\n <td class=\"coer-numberbox\">\r\n <coer-numberbox\r\n [id]=\"_GetId(row.indexRow, header.indexColumn)\"\r\n [(ngModel)]=\"row[header.columnName]\"\r\n [isDisabled]=\"_GetAttribute(header.columnName, row, 'isDisabled', 'coerNumberbox') || _isDisabled() || _isLoading()\"\r\n [isValid]=\"_GetAttribute(header.columnName, row, 'isValid', 'coerNumberbox') || false\"\r\n [isInvalid]=\"_GetAttribute(header.columnName, row, 'isInvalid', 'coerNumberbox') || false\"\r\n [selectOnFocus]=\"_GetAttribute(header.columnName, row, 'selectOnFocus', 'coerNumberbox') || true\"\r\n [placeholder]=\"_GetAttribute(header.columnName, row, 'placeholder', 'coerNumberbox') || ''\"\r\n [textPosition]=\"_GetAttribute(header.columnName, row, 'textPosition', 'coerNumberbox') || 'right'\"\r\n [min]=\"_GetAttribute(header.columnName, row, 'min', 'coerNumberbox') || 0\"\r\n [max]=\"_GetAttribute(header.columnName, row, 'max', 'coerNumberbox') || 2147483647\"\r\n [decimals]=\"_GetAttribute(header.columnName, row, 'decimals', 'coerNumberbox') || 0\"\r\n (onInput)=\"_InputChange(row.indexRow, header.columnName, $event, 'coer-numberbox')\"\r\n (onKeyupEnter)=\"_KeyupEnter(header.indexColumn, row, 'coer-numberbox', $event)\"\r\n ></coer-numberbox>\r\n </td>\r\n }\r\n \r\n \r\n @else if(_IsCellType(header.columnName, row, 'coerSelectbox')) {\r\n <!-- coer-numberbox -->\r\n <td class=\"coer-selectbox\">\r\n <coer-selectbox\r\n [id]=\"_GetId(row.indexRow, header.indexColumn)\"\r\n [(ngModel)]=\"row[header.columnName]\"\r\n [isDisabled]=\"_GetAttribute(header.columnName, row, 'isDisabled', 'coerSelectbox') || _isDisabled() || _isLoading()\"\r\n [isValid]=\"_GetAttribute(header.columnName, row, 'isValid', 'coerSelectbox') || false\"\r\n [isInvalid]=\"_GetAttribute(header.columnName, row, 'isInvalid', 'coerSelectbox') || false\"\r\n [dataSource]=\"_GetAttribute(header.columnName, row, 'dataSource', 'coerSelectbox') || []\"\r\n [placeholder]=\"_GetAttribute(header.columnName, row, 'placeholder', 'coerSelectbox') || '-- Select --'\"\r\n [displayProperty]=\"_GetAttribute(header.columnName, row, 'displayProperty', 'coerSelectbox') || 'name'\"\r\n (onSelected)=\"_InputChange(row.indexRow, header.columnName, $event, 'coer-selectbox'); _KeyupEnter(header.indexColumn, row, 'coer-selectbox', $event)\"\r\n ></coer-selectbox>\r\n </td>\r\n }\r\n \r\n \r\n @else if(_IsCellType(header.columnName, row, 'coerSwitch')) {\r\n <!-- coer-switch -->\r\n <td>\r\n <coer-switch\r\n [id]=\"_GetId(row.indexRow, header.indexColumn)\"\r\n [(ngModel)]=\"row[header.columnName]\"\r\n [isDisabled]=\"_GetAttribute(header.columnName, row, 'isDisabled', 'coerSwitch') || _isDisabled() || _isLoading()\"\r\n [tooltip]=\"_GetAttribute(header.columnName, row, 'tooltip', 'coerSwitch')\"\r\n [tooltipPosition]=\"_GetAttribute(header.columnName, row, 'tooltipPosition', 'coerSwitch') || 'left'\"\r\n [isInvisible]=\"_isDisabled()\"\r\n (onChange)=\"_InputChange(row.indexRow, header.columnName, $event, 'coer-switch')\"\r\n ></coer-switch>\r\n </td>\r\n }\r\n \r\n @else {\r\n <!-- Default Cell -->\r\n <td class=\"default-cell\"\r\n (click)=\"_ClickOnRow(row)\"\r\n (dblclick)=\"_isDisabled() ? null : onDoubleClickRow.emit(row)\"\r\n [ngStyle]=\"{\r\n 'text-align': _GetAttribute(header.columnName, row, 'textAlign', 'defaul-cell'),\r\n 'white-space': 'normal'\r\n }\">\r\n \r\n <div [id]=\"_GetId(row.indexRow, header.indexColumn)\"\r\n [ngClass]=\"{\r\n 'text-blue-bold': _IsCellColor(header.columnName, row, 'colorBlue'),\r\n 'text-green-bold': _IsCellColor(header.columnName, row, 'colorGreen'),\r\n 'text-yellow-bold': _IsCellColor(header.columnName, row, 'colorYellow'),\r\n 'text-red-bold': _IsCellColor(header.columnName, row, 'colorRed'),\r\n 'text-right-bold': _IsCellType(header.columnName, row, 'number')\r\n }\">\r\n \r\n @if(_IsCellType(header.columnName, row, 'number')) {\r\n <span> {{ GetNumericFormat(row[header.columnName]) }} </span>\r\n }\r\n \r\n @else if(_IsCellType(header.columnName, row, 'date')) {\r\n <span> {{ _GetDateFormat(row[header.columnName], _IsCellType(header.columnName, row, 'toLocalZone')) }} </span>\r\n }\r\n \r\n @else if(_IsCellType(header.columnName, row, 'date-time')) {\r\n <span> {{ _GetDateTimeFormat(row[header.columnName], _IsCellType(header.columnName, row, 'toLocalZone')) }} </span>\r\n }\r\n \r\n @else {\r\n <span> {{ _GetCellValue(row, header.columnName) }} </span>\r\n }\r\n </div>\r\n </td>\r\n }\r\n }\r\n \r\n <!-- Delete Button -->\r\n @if(_ButtonByRow('showDeleteButton')) {\r\n <td class=\"action-button\">\r\n @if(_ButtonByRow('showDeleteButton', row)) {\r\n <coer-button\r\n type=\"icon-no-border\"\r\n [color]=\"_ColorButtonByRow('deleteButtonColor')\"\r\n icon=\"delete\"\r\n [tooltip]=\"_GetTooltip('Delete', row)\"\r\n [isInvisible]=\"_isDisabled()\"\r\n [isReadonly]=\"isReadonly()\"\r\n [isDisabled]=\"_isLoading()\"\r\n (onClick)=\"onClickDeleteRow.emit(row)\"\r\n ></coer-button>\r\n }\r\n </td>\r\n }\r\n \r\n <!-- Edit Button -->\r\n @if(_ButtonByRow('showEditButton')) {\r\n <td class=\"action-button\">\r\n @if(_ButtonByRow('showEditButton', row)) {\r\n <coer-button\r\n type=\"icon-no-border\"\r\n [color]=\"_ColorButtonByRow('editButtonColor')\"\r\n icon=\"edit\"\r\n [tooltip]=\"_GetTooltip('Edit', row)\"\r\n [isInvisible]=\"_isDisabled()\"\r\n [isDisabled]=\"_isLoading()\"\r\n (onClick)=\"onClickEditRow.emit(row)\"\r\n ></coer-button>\r\n }\r\n </td>\r\n }\r\n \r\n <!-- GO Button -->\r\n @if(_ButtonByRow('showGoButton')) {\r\n <td class=\"action-button\">\r\n @if(_ButtonByRow('showGoButton', row)) {\r\n <coer-button\r\n type=\"icon-no-border\"\r\n [color]=\"_ColorButtonByRow('goButtonColor')\"\r\n icon=\"go\"\r\n [tooltip]=\"_GetTooltip('Go to', row, 'detail')\"\r\n [isInvisible]=\"_isDisabled()\"\r\n [isDisabled]=\"_isLoading()\"\r\n (onClick)=\"onClickGoRow.emit(row)\"\r\n ></coer-button>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </tbody>\r\n }\r\n </table>\r\n }\r\n\r\n @else {\r\n <!-- Grid Message -->\r\n <div class=\"loading\" [ngStyle]=\"{ \r\n 'width': '100%', \r\n 'height': '100%',\r\n 'bottom': showFooter() ? '35px' : '10px'\r\n }\">\r\n <i class=\"spinner-border\"></i>\r\n <span class=\"fa-fade\">Loading</span>\r\n </div> \r\n }\r\n </div>\r\n </section>\r\n\r\n @if(showFooter()) {\r\n <footer class=\"grid-footer\">\r\n <span>\r\n @if(_isLoadingMessage) {\r\n <span class=\"fa-fade\"> Loading </span>\r\n }\r\n\r\n @else if(gridLength().dataSourceSelected > 0) {\r\n <span>\r\n <i class=\"bi bi-check2-square ms-1\"></i>\r\n {{ gridLength().dataSourceSelected }}\r\n </span>\r\n }\r\n </span>\r\n\r\n <span class=\"me-1\"> {{ gridLength().dataSourceFiltered | numericFormat }} Rows </span>\r\n </footer>\r\n }\r\n</div>", styles: ["div.coer-grid header{align-items:flex-end;justify-content:flex-end;padding-right:8px;margin:0}div.coer-grid header>div{padding:0 0 10px 10px;display:flex;align-items:baseline}div.coer-grid header>div a{height:40px!important}div.coer-grid table{table-layout:auto;border-collapse:separate;border-spacing:1px 0px;margin:0;font-size:14px}div.coer-grid table thead tr th{position:sticky!important;z-index:100!important;top:0!important;background-color:var(--gray)!important;color:var(--smoke)!important;padding:5px!important;vertical-align:middle!important;overflow:hidden;text-overflow:ellipsis;word-wrap:break-word;min-width:50px!important;white-space:nowrap!important}div.coer-grid table tbody{border:0px!important}div.coer-grid table tbody tr:not(.row-focus):hover td{color:#000!important;background-color:#f1f6ff}div.coer-grid table tbody tr td{border:0px!important;padding:5px!important;vertical-align:middle!important;white-space:break-spaces;text-overflow:ellipsis;overflow:hidden;min-height:31px!important}div.coer-grid table tbody tr.row-focus td{background-color:#cde1ff}div.coer-grid table tbody tr td.coer-textbox,div.coer-grid table tbody tr td.coer-numberbox,div.coer-grid table tbody tr td.coer-selectbox{padding:0!important;overflow:visible!important}div.coer-grid table tbody tr td.default-cell{cursor:pointer!important}div.coer-grid table thead tr th.action-button,div.coer-grid table thead tr td.action-button,div.coer-grid table thead tr th.check-box,div.coer-grid table thead tr td.check-box,div.coer-grid table tbody tr th.action-button,div.coer-grid table tbody tr td.action-button,div.coer-grid table tbody tr th.check-box table tbody tr td.check-box{text-align:center!important;cursor:default!important;min-width:40px!important;max-width:40px!important;width:40px!important;padding:0!important}div.coer-grid footer.grid-footer{display:flex;align-items:center;justify-content:space-between;font-size:small;color:#999;padding-top:5px}div.coer-grid section.grid-container{position:relative;overflow:auto}div.coer-grid div.loading,div.coer-grid div.no-data{position:absolute;display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:25px;color:gray}div.coer-grid div.loading{background-color:#bbbbbb83!important;flex-direction:column!important;gap:10px!important;z-index:1}div.coer-grid div.loading span.fa-fade{position:relative!important;top:50px!important}div.coer-grid tr.loading{background-color:#bbbbbb83!important}div.coer-grid div.loading i.spinner-border{color:var(--primary-inner)!important;width:70px!important;height:70px!important;font-size:20px!important;position:absolute!important}div.coer-grid td.check-box div.spinner-border-container{position:absolute;transform:translate(7px,-19px)}div.coer-grid td.check-box div.spinner-border-container i.spinner-border{width:15px!important;height:15px!important;color:var(--primary-inner)!important}div.coer-grid table thead tr th.check-box>div,div.coer-grid table tbody tr td.check-box>div{display:flex;align-items:center;justify-content:center;cursor:default!important}div.coer-grid input.form-check-input{box-shadow:none!important;margin:0}div.coer-grid input[type=checkbox]{cursor:pointer!important}div.coer-grid td.group{padding:0!important;margin:0!important}div.coer-grid td.group>*{border-top:1px solid var(--gray)!important;border-bottom:1px solid var(--gray)!important;padding:0!important;margin:0!important}div.coer-grid .template,div.coer-grid .template div{white-space:nowrap!important;display:flex!important;align-items:center!important;cursor:pointer!important;gap:5px!important;width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: CoerButton, selector: "coer-button", inputs: ["id", "color", "type", "icon", "iconPosition", "path", "isLoading", "isDisabled", "isReadonly", "isInvisible", "width", "minWidth", "maxWidth", "height", "minHeight", "marginTop", "marginRight", "marginBottom", "marginLeft", "tooltip", "tooltipPosition"], outputs: ["onClick"] }, { kind: "component", type: CoerCheckbox, selector: "coer-checkbox", inputs: ["id", "label", "labelPosition", "isLoading", "isDisabled", "isReadonly", "isInvisible", "ignoreDataBinding", "value"], outputs: ["onChange"] }, { kind: "component", type: CoerNumberBox, selector: "coer-numberbox", inputs: ["id", "value", "label", "placeholder", "textPosition", "min", "max", "isInvalid", "isValid", "externalButton", "selectOnFocus", "decimals", "isLoading", "isDisabled", "isReadonly", "isInvisible", "width", "minWidth", "maxWidth", "marginTop", "marginRight", "marginBottom", "marginLeft"], outputs: ["onKeyupEnter", "onInput", "onClickExternalButton"] }, { kind: "component", type: CoerSelectbox, selector: "coer-selectbox", inputs: ["id", "value", "label", "placeholder", "isInvalid", "isValid", "dataSource", "displayProperty", "rowsByPage", "isLoading", "isDisabled", "isReadonly", "isInvisible", "width", "minWidth", "maxWidth", "marginTop", "marginRight", "marginBottom", "marginLeft"], outputs: ["onSelected", "onUnselect"] }, { kind: "component", type: CoerSwitch, selector: "coer-switch", inputs: ["id", "value", "label", "labelPosition", "isLoading", "isDisabled", "isReadonly", "isInvisible", "tooltip", "tooltipPosition"], outputs: ["onChange"] }, { kind: "component", type: CoerTextBox, selector: "coer-textbox", inputs: ["id", "value", "label", "placeholder", "textPosition", "minLength", "maxLength", "isInvalid", "isValid", "externalButton", "selectOnFocus", "showClearIcon", "showSearchIcon", "isLoading", "isDisabled", "isReadonly", "isInvisible", "width", "minWidth", "maxWidth", "marginTop", "marginRight", "marginBottom", "marginLeft"], outputs: ["onKeyupEnter", "onInput", "onClickClear", "onClickSearch", "onClickExternalButton"] }, { kind: "pipe", type: i9.HtmlPipe, name: "html" }, { kind: "pipe", type: i9.NumericFormatPipe, name: "numericFormat" }] }); }
|
2776
2797
|
}
|
2777
2798
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerGrid, decorators: [{
|
2778
2799
|
type: Component,
|
2779
|
-
args: [{ selector: 'coer-grid', providers: [CONTROL_VALUE(CoerGrid)], standalone: false, template: "<div class=\"coer-grid\" [ngStyle]=\"{ 'width': width(), 'min-Width': MinWidth(), 'max-Width': MaxWidth(), 'margin': margin() }\">\r\n <header [id]=\"_id + '-header'\" class=\"row\">\r\n <!-- Slot -->\r\n <ng-content></ng-content>\r\n\r\n <!-- Export Button -->\r\n @if(exportButton.show && gridLength().dataSource > 0) {\r\n <div class=\"col-auto\">\r\n <coer-button\r\n type=\"icon\"\r\n [color]=\"_ColorButton(exportButton)\"\r\n icon=\"excel\"\r\n [tooltip]=\"_isLoading() ? 'Loading' : (exportButton.tooltip || 'Export')\"\r\n [path]=\"(exportButton && exportButton.path) ? exportButton.path : []\"\r\n [isDisabled]=\"_isDisabled() || _isLoading() || (exportButton.isDisabled || false)\"\r\n [isLoading]=\"_isLoading()\"\r\n [animation]=\"_enableAnimations\"\r\n (onClick)=\"_Export(!exportButton.preventDefault)\"\r\n ></coer-button>\r\n </div>\r\n }\r\n\r\n <!-- Import Button -->\r\n @if(importButton.show && !isReadonly()) {\r\n <div class=\"col-auto\">\r\n <input type=\"file\" #inputFileRef [multiple]=\"false\" (change)=\"_Import($event)\">\r\n\r\n <coer-button\r\n type=\"icon\"\r\n color=\"primary\"\r\n [color]=\"_ColorButton(importButton)\"\r\n [tooltip]=\"importButton.tooltip || 'Import'\"\r\n [path]=\"(importButton && importButton.path) ? importButton.path : []\"\r\n [isDisabled]=\"importButton.isDisabled || false\"\r\n [animation]=\"_enableAnimations\"\r\n (onClick)=\"_Import()\"\r\n ></coer-button>\r\n </div>\r\n }\r\n\r\n <!-- Add Button -->\r\n @if(addButton.show && !isReadonly()) {\r\n <div class=\"col-auto\">\r\n <coer-button\r\n type=\"icon\"\r\n [color]=\"_ColorButton(addButton)\"\r\n icon=\"new\"\r\n [tooltip]=\"addButton.tooltip || 'New'\"\r\n [path]=\"(addButton && addButton.path) ? addButton.path : []\"\r\n [isDisabled]=\"addButton.isDisabled || false\"\r\n [animation]=\"_enableAnimations\"\r\n (onClick)=\"onClickAdd.emit()\"\r\n ></coer-button>\r\n </div>\r\n }\r\n\r\n <!-- Save Button -->\r\n @if(saveButton.show && !isReadonly()) {\r\n <div class=\"col-auto\">\r\n <coer-button\r\n type=\"icon\"\r\n [color]=\"_ColorButton(saveButton)\"\r\n icon=\"save\"\r\n [tooltip]=\"saveButton.tooltip || 'Save'\"\r\n [path]=\"(saveButton && saveButton.path) ? saveButton.path : []\"\r\n [isDisabled]=\"saveButton.isDisabled || false\"\r\n [animation]=\"_enableAnimations\"\r\n (onClick)=\"onClickSave.emit()\"\r\n ></coer-button>\r\n </div>\r\n }\r\n\r\n <!-- Search -->\r\n @if(search.show) {\r\n <div class=\"col-auto\">\r\n <coer-textbox\r\n #inputSearch\r\n [id]=\"_GetId(-1, -1, 'search')\"\r\n [ngModel]=\"_gridSearch()\"\r\n placeholder=\"Search\"\r\n [isDisabled]=\"_isDisabled() || _isLoading()\"\r\n [selectOnFocus]=\"true\"\r\n width=\"250px\"\r\n [showSearchIcon]=\"true\"\r\n [showClearIcon]=\"true\"\r\n (onInput)=\"_InputChange(-1, 'Search', $event, 'coer-textbox-search')\"\r\n (onClickClear)=\"_InputChange(-1, 'Search', '', 'coer-textbox-search')\"\r\n (onKeyupEnter)=\"_KeyupEnter(-1, { indexRow: -1 }, 'coer-textbox-search', $event);\"\r\n ></coer-textbox>\r\n </div>\r\n }\r\n </header>\r\n\r\n <section [ngClass]=\"{ 'grid-container': true, 'invisible': isInvisible() }\"> \r\n <div #innerContainer [ngStyle]=\"{ 'height': _height, 'min-height': minHeight(), 'max-height': maxHeight() }\"> \r\n @if(!_isDisabled() && gridLength().dataSource <= 0 && !isLoading()) {\r\n <div class=\"no-data\"> No Data </div>\r\n }\r\n \r\n @if(!isLoading()) {\r\n <table class=\"table table-sm table-responsive table-striped\">\r\n <thead>\r\n <tr>\r\n @if(checkbox.show && gridLength().dataSource > 0) {\r\n <!-- CheckBox Column -->\r\n <th scope=\"col\" class=\"check-box\">\r\n <div *ngIf=\"!_onlyOneCheck\" [ngClass]=\"{ 'invisible': _isLoadingMessage }\">\r\n <coer-checkbox\r\n [id]=\"_GetId(0, 0, 'checkboxAll')\"\r\n [ignoreDataBinding]=\"true\"\r\n [isDisabled]=\"_isDisabled() || _isLoading()\"\r\n (onChange)=\"_ClickCheck(_GetId(0, 0, 'checkboxAll'), $event, true)\"\r\n ></coer-checkbox>\r\n </div>\r\n </th>\r\n }\r\n \r\n <!-- Dynamic Grid Column -->\r\n @for(header of _gridColumns(); track header.indexColumn) {\r\n <th scope=\"col\" (dblclick)=\"Sort(header.columnName)\"\r\n [ngClass]=\"{\r\n 'no-selection': true,\r\n 'cursor-default': !enableSort() && !_isLoading(),\r\n 'cursor-pointer': enableSort() && !_isLoading(),\r\n 'cursor-wait': _isLoading()\r\n }\"\r\n [ngStyle]=\"{\r\n 'width': header.width,\r\n 'text-align': _GetAttribute(header.columnName, null, 'textAlign', 'defaul-cell')\r\n }\">\r\n <div class=\"no-selection d-flex align-items-center\">\r\n <span class=\"me-1\"> {{ _GetColumnName(header.columnName) }} </span>\r\n <i [class]=\"_GetShortIcon(header.columnName)\"></i> \r\n <i [class]=\"_GetSearchIcon(header.columnName)\"></i>\r\n </div>\r\n </th>\r\n }\r\n \r\n <!-- Delete Button Column -->\r\n @if(_ButtonByRow('showDeleteButton')) {\r\n <th scope=\"col\" class=\"action-button\"></th>\r\n }\r\n \r\n <!-- Edit Button Column -->\r\n @if(_ButtonByRow('showEditButton')) {\r\n <th scope=\"col\" class=\"action-button\"></th>\r\n }\r\n \r\n <!-- Edit Button Column -->\r\n @if(_ButtonByRow('showGoButton')) {\r\n <th scope=\"col\" class=\"action-button\"></th>\r\n }\r\n </tr>\r\n </thead>\r\n \r\n <!-- body -->\r\n @for(group of _gridDataSource(); track group.indexGroup) {\r\n <tbody>\r\n <!--<tr v-if=\"_isGrouped\">\r\n <td :colspan=\"_colspan\" class=\"group\">\r\n <MesAccordion\r\n :ref=\"`accordion${group.indexGroup}-${id}`\"\r\n :title=\"`${_CleanHeaderName(groupBy)} (${group.length}): ${group.groupBy}`\"\r\n :isLoading=\"_isLoading()\"\r\n @expanded=\"_ToogleAccordion(group.groupBy, true, group.indexGroup)\"\r\n @collapsed=\"_ToogleAccordion(group.groupBy, false, group.indexGroup)\"\r\n ></MesAccordion>\r\n </td>\r\n </tr>-->\r\n \r\n @for(row of group.rows; track row.indexRow) {\r\n <tr [id]=\"_GetId(row.indexRow, 0, 'row')\"\r\n [ngClass]=\"{ 'loading': isLoading(), 'd-none': _HideRow(group), 'row-focus': (row.indexRow == _indexFocus() && enableRowFocus()) }\"\r\n (click)=\"_indexFocus.set(row.indexRow)\">\r\n \r\n @if(checkbox.show) {\r\n <!-- CheckBox Column -->\r\n <td class=\"check-box\">\r\n <div [ngClass]=\"{ 'invisible': _isLoadingMessage }\">\r\n <coer-checkbox\r\n [id]=\"_GetId(row.indexRow, 0, 'checkbox')\"\r\n [ignoreDataBinding]=\"true\"\r\n [isDisabled]=\"_isDisabled() || _isLoading()\"\r\n (onChange)=\"_ClickCheck(_GetId(row.indexRow, 0, 'checkbox'), $event, false, row)\"\r\n ></coer-checkbox>\r\n </div>\r\n \r\n <div [ngClass]=\"{ 'invisible': !_isLoadingMessage, 'spinner-border-container': true }\">\r\n <i class=\"spinner-border\"></i>\r\n </div>\r\n </td>\r\n }\r\n \r\n <!-- Dynamic Column -->\r\n @for(header of _gridColumns(); track header.indexColumn) {\r\n @if(_IsCellType(header.columnName, row, 'template')) {\r\n <td class=\"template\"\r\n (click)=\"_isDisabled() ? null : onClickRow.emit(row)\"\r\n (dblclick)=\"_isDisabled() ? null : onDoubleClickRow.emit(row)\">\r\n <div [innerHTML]=\"_GetAttribute(header.columnName, row, 'template', 'defaul-cell') | html\" class=\"template\"></div>\r\n </td>\r\n }\r\n \r\n @else if(_IsCellType(header.columnName, row, 'coerTextbox')) {\r\n <!-- coer-textbox -->\r\n <td class=\"coer-textbox\">\r\n <coer-textbox\r\n [id]=\"_GetId(row.indexRow, header.indexColumn)\"\r\n [(ngModel)]=\"row[header.columnName]\"\r\n [isDisabled]=\"_GetAttribute(header.columnName, row, 'isDisabled', 'coerTextbox') || _isDisabled() || _isLoading()\"\r\n [isValid]=\"_GetAttribute(header.columnName, row, 'isValid', 'coerTextbox') || false\"\r\n [isInvalid]=\"_GetAttribute(header.columnName, row, 'isInvalid', 'coerTextbox') || false\"\r\n [selectOnFocus]=\"_GetAttribute(header.columnName, row, 'selectOnFocus', 'coerTextbox') || true\"\r\n [placeholder]=\"_GetAttribute(header.columnName, row, 'placeholder', 'coerTextbox') || ('Type ' + header.columnName + '...')\"\r\n [textPosition]=\"_GetAttribute(header.columnName, row, 'textPosition', 'coerTextbox') || 'left'\"\r\n [minLength]=\"_GetAttribute(header.columnName, row, 'minLength', 'coerTextbox') || 0\"\r\n [maxLength]=\"_GetAttribute(header.columnName, row, 'maxLength', 'coerTextbox') || 50\"\r\n (onInput)=\"_InputChange(row.indexRow, header.columnName, $event, 'coer-textbox')\"\r\n (onKeyupEnter)=\"_KeyupEnter(header.indexColumn, row, 'coer-textbox', $event)\"\r\n ></coer-textbox>\r\n </td>\r\n }\r\n \r\n \r\n @else if(_IsCellType(header.columnName, row, 'coerNumberbox')) {\r\n <!-- coer-numberbox -->\r\n <td class=\"coer-numberbox\">\r\n <coer-numberbox\r\n [id]=\"_GetId(row.indexRow, header.indexColumn)\"\r\n [(ngModel)]=\"row[header.columnName]\"\r\n [isDisabled]=\"_GetAttribute(header.columnName, row, 'isDisabled', 'coerNumberbox') || _isDisabled() || _isLoading()\"\r\n [isValid]=\"_GetAttribute(header.columnName, row, 'isValid', 'coerNumberbox') || false\"\r\n [isInvalid]=\"_GetAttribute(header.columnName, row, 'isInvalid', 'coerNumberbox') || false\"\r\n [selectOnFocus]=\"_GetAttribute(header.columnName, row, 'selectOnFocus', 'coerNumberbox') || true\"\r\n [placeholder]=\"_GetAttribute(header.columnName, row, 'placeholder', 'coerNumberbox') || ''\"\r\n [textPosition]=\"_GetAttribute(header.columnName, row, 'textPosition', 'coerNumberbox') || 'right'\"\r\n [min]=\"_GetAttribute(header.columnName, row, 'min', 'coerNumberbox') || 0\"\r\n [max]=\"_GetAttribute(header.columnName, row, 'max', 'coerNumberbox') || 2147483647\"\r\n [decimals]=\"_GetAttribute(header.columnName, row, 'decimals', 'coerNumberbox') || 0\"\r\n (onInput)=\"_InputChange(row.indexRow, header.columnName, $event, 'coer-numberbox')\"\r\n (onKeyupEnter)=\"_KeyupEnter(header.indexColumn, row, 'coer-numberbox', $event)\"\r\n ></coer-numberbox>\r\n </td>\r\n }\r\n \r\n \r\n @else if(_IsCellType(header.columnName, row, 'coerSelectbox')) {\r\n <!-- coer-numberbox -->\r\n <td class=\"coer-selectbox\">\r\n <coer-selectbox\r\n [id]=\"_GetId(row.indexRow, header.indexColumn)\"\r\n [(ngModel)]=\"row[header.columnName]\"\r\n [isDisabled]=\"_GetAttribute(header.columnName, row, 'isDisabled', 'coerSelectbox') || _isDisabled() || _isLoading()\"\r\n [isValid]=\"_GetAttribute(header.columnName, row, 'isValid', 'coerSelectbox') || false\"\r\n [isInvalid]=\"_GetAttribute(header.columnName, row, 'isInvalid', 'coerSelectbox') || false\"\r\n [dataSource]=\"_GetAttribute(header.columnName, row, 'dataSource', 'coerSelectbox') || []\"\r\n [placeholder]=\"_GetAttribute(header.columnName, row, 'placeholder', 'coerSelectbox') || '-- Select --'\"\r\n [displayProperty]=\"_GetAttribute(header.columnName, row, 'displayProperty', 'coerSelectbox') || 'name'\"\r\n (onSelected)=\"_InputChange(row.indexRow, header.columnName, $event, 'coer-selectbox'); _KeyupEnter(header.indexColumn, row, 'coer-selectbox', $event)\"\r\n ></coer-selectbox>\r\n </td>\r\n }\r\n \r\n \r\n @else if(_IsCellType(header.columnName, row, 'coerSwitch')) {\r\n <!-- coer-switch -->\r\n <td>\r\n <coer-switch\r\n [id]=\"_GetId(row.indexRow, header.indexColumn)\"\r\n [(ngModel)]=\"row[header.columnName]\"\r\n [isDisabled]=\"_GetAttribute(header.columnName, row, 'isDisabled', 'coerSwitch') || _isDisabled() || _isLoading()\"\r\n [tooltip]=\"_GetAttribute(header.columnName, row, 'tooltip', 'coerSwitch')\"\r\n [tooltipPosition]=\"_GetAttribute(header.columnName, row, 'tooltipPosition', 'coerSwitch') || 'left'\"\r\n [isInvisible]=\"_isDisabled()\"\r\n (onChange)=\"_InputChange(row.indexRow, header.columnName, $event, 'coer-switch')\"\r\n ></coer-switch>\r\n </td>\r\n }\r\n \r\n @else {\r\n <!-- Default Cell -->\r\n <td class=\"default-cell\"\r\n (click)=\"_ClickOnRow(row)\"\r\n (dblclick)=\"_isDisabled() ? null : onDoubleClickRow.emit(row)\"\r\n [ngStyle]=\"{\r\n 'text-align': _GetAttribute(header.columnName, row, 'textAlign', 'defaul-cell'),\r\n 'white-space': 'normal'\r\n }\">\r\n \r\n <div [id]=\"_GetId(row.indexRow, header.indexColumn)\"\r\n [ngClass]=\"{\r\n 'text-blue-bold': _IsCellColor(header.columnName, row, 'colorBlue'),\r\n 'text-green-bold': _IsCellColor(header.columnName, row, 'colorGreen'),\r\n 'text-yellow-bold': _IsCellColor(header.columnName, row, 'colorYellow'),\r\n 'text-red-bold': _IsCellColor(header.columnName, row, 'colorRed'),\r\n 'text-right-bold': _IsCellType(header.columnName, row, 'number')\r\n }\">\r\n \r\n @if(_IsCellType(header.columnName, row, 'number')) {\r\n <span> {{ GetNumericFormat(row[header.columnName]) }} </span>\r\n }\r\n \r\n @else if(_IsCellType(header.columnName, row, 'date')) {\r\n <span> {{ _GetDateFormat(row[header.columnName], _IsCellType(header.columnName, row, 'toLocalZone')) }} </span>\r\n }\r\n \r\n @else if(_IsCellType(header.columnName, row, 'date-time')) {\r\n <span> {{ _GetDateTimeFormat(row[header.columnName], _IsCellType(header.columnName, row, 'toLocalZone')) }} </span>\r\n }\r\n \r\n @else {\r\n <span> {{ _GetCellValue(row, header.columnName) }} </span>\r\n }\r\n </div>\r\n </td>\r\n }\r\n }\r\n \r\n <!-- Delete Button -->\r\n @if(_ButtonByRow('showDeleteButton')) {\r\n <td class=\"action-button\">\r\n @if(_ButtonByRow('showDeleteButton', row)) {\r\n <coer-button\r\n type=\"icon-no-border\"\r\n [color]=\"_ColorButtonByRow('deleteButtonColor')\"\r\n icon=\"delete\"\r\n [tooltip]=\"_GetTooltip('Delete', row)\"\r\n [isInvisible]=\"_isDisabled()\"\r\n [isReadonly]=\"isReadonly()\"\r\n [isDisabled]=\"_isLoading()\"\r\n (onClick)=\"onClickDeleteRow.emit(row)\"\r\n ></coer-button>\r\n }\r\n </td>\r\n }\r\n \r\n <!-- Edit Button -->\r\n @if(_ButtonByRow('showEditButton')) {\r\n <td class=\"action-button\">\r\n @if(_ButtonByRow('showEditButton', row)) {\r\n <coer-button\r\n type=\"icon-no-border\"\r\n [color]=\"_ColorButtonByRow('editButtonColor')\"\r\n icon=\"edit\"\r\n [tooltip]=\"_GetTooltip('Edit', row)\"\r\n [isInvisible]=\"_isDisabled()\"\r\n [isDisabled]=\"_isLoading()\"\r\n (onClick)=\"onClickEditRow.emit(row)\"\r\n ></coer-button>\r\n }\r\n </td>\r\n }\r\n \r\n <!-- GO Button -->\r\n @if(_ButtonByRow('showGoButton')) {\r\n <td class=\"action-button\">\r\n @if(_ButtonByRow('showGoButton', row)) {\r\n <coer-button\r\n type=\"icon-no-border\"\r\n [color]=\"_ColorButtonByRow('goButtonColor')\"\r\n icon=\"go\"\r\n [tooltip]=\"_GetTooltip('Go to', row, 'detail')\"\r\n [isInvisible]=\"_isDisabled()\"\r\n [isDisabled]=\"_isLoading()\"\r\n (onClick)=\"onClickGoRow.emit(row)\"\r\n ></coer-button>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </tbody>\r\n }\r\n </table>\r\n }\r\n\r\n @else {\r\n <!-- Grid Message -->\r\n <div class=\"loading\" [ngStyle]=\"{ \r\n 'width': '100%', \r\n 'height': '100%',\r\n 'bottom': showFooter() ? '35px' : '10px'\r\n }\">\r\n <i class=\"spinner-border\"></i>\r\n <span class=\"fa-fade\">Loading</span>\r\n </div> \r\n }\r\n </div>\r\n </section>\r\n\r\n @if(showFooter()) {\r\n <footer class=\"grid-footer\">\r\n <span>\r\n @if(_isLoadingMessage) {\r\n <span class=\"fa-fade\"> Loading </span>\r\n }\r\n\r\n @else if(gridLength().dataSourceSelected > 0) {\r\n <span>\r\n <i class=\"bi bi-check2-square ms-1\"></i>\r\n {{ gridLength().dataSourceSelected }}\r\n </span>\r\n }\r\n </span>\r\n\r\n <span class=\"me-1\"> {{ gridLength().dataSourceFiltered | numericFormat }} Rows </span>\r\n </footer>\r\n }\r\n</div>", styles: ["div.coer-grid header{align-items:flex-end;justify-content:flex-end;padding-right:8px;margin:0}div.coer-grid header>div{padding:0 0 10px 10px;display:flex;align-items:baseline}div.coer-grid header>div a{height:40px!important}div.coer-grid table{table-layout:auto;border-collapse:separate;border-spacing:1px 0px;margin:0;font-size:14px}div.coer-grid table thead tr th{position:sticky!important;z-index:100!important;top:0!important;background-color:var(--gray)!important;color:var(--smoke)!important;padding:5px!important;vertical-align:middle!important;overflow:hidden;text-overflow:ellipsis;word-wrap:break-word;min-width:50px!important;white-space:nowrap!important}div.coer-grid table tbody{border:0px!important}div.coer-grid table tbody tr:not(.row-focus):hover td{color:#000!important;background-color:#f1f6ff}div.coer-grid table tbody tr td{border:0px!important;padding:5px!important;vertical-align:middle!important;white-space:break-spaces;text-overflow:ellipsis;overflow:hidden;min-height:31px!important}div.coer-grid table tbody tr.row-focus td{background-color:#cde1ff}div.coer-grid table tbody tr td.coer-textbox,div.coer-grid table tbody tr td.coer-numberbox,div.coer-grid table tbody tr td.coer-selectbox{padding:0!important;overflow:visible!important}div.coer-grid table tbody tr td.default-cell{cursor:pointer!important}div.coer-grid table thead tr th.action-button,div.coer-grid table thead tr td.action-button,div.coer-grid table thead tr th.check-box,div.coer-grid table thead tr td.check-box,div.coer-grid table tbody tr th.action-button,div.coer-grid table tbody tr td.action-button,div.coer-grid table tbody tr th.check-box table tbody tr td.check-box{text-align:center!important;cursor:default!important;min-width:40px!important;max-width:40px!important;width:40px!important;padding:0!important}div.coer-grid footer.grid-footer{display:flex;align-items:center;justify-content:space-between;font-size:small;color:#999;padding-top:5px}div.coer-grid section.grid-container{position:relative;overflow:auto}div.coer-grid div.loading,div.coer-grid div.no-data{position:absolute;display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:25px;color:gray}div.coer-grid div.loading{background-color:#bbbbbb83!important;flex-direction:column!important;gap:10px!important;z-index:1}div.coer-grid div.loading span.fa-fade{position:relative!important;top:50px!important}div.coer-grid tr.loading{background-color:#bbbbbb83!important}div.coer-grid div.loading i.spinner-border{color:var(--primary-inner)!important;width:70px!important;height:70px!important;font-size:20px!important;position:absolute!important}div.coer-grid td.check-box div.spinner-border-container{position:absolute;transform:translate(7px,-19px)}div.coer-grid td.check-box div.spinner-border-container i.spinner-border{width:15px!important;height:15px!important;color:var(--primary-inner)!important}div.coer-grid table thead tr th.check-box>div,div.coer-grid table tbody tr td.check-box>div{display:flex;align-items:center;justify-content:center;cursor:default!important}div.coer-grid input.form-check-input{box-shadow:none!important;margin:0}div.coer-grid input[type=checkbox]{cursor:pointer!important}div.coer-grid td.group{padding:0!important;margin:0!important}div.coer-grid td.group>*{border-top:1px solid var(--gray)!important;border-bottom:1px solid var(--gray)!important;padding:0!important;margin:0!important}div.coer-grid .template,div.coer-grid .template div{white-space:nowrap!important;display:flex!important;align-items:center!important;cursor:pointer!important;gap:5px!important;width:100%}\n"] }]
|
2800
|
+
args: [{ selector: 'coer-grid', providers: [CONTROL_VALUE(CoerGrid)], standalone: false, template: "<div class=\"coer-grid\" [ngStyle]=\"{ 'width': width(), 'min-Width': MinWidth(), 'max-Width': MaxWidth(), 'margin': margin() }\">\r\n <header [id]=\"_id + '-header'\" class=\"row\">\r\n <!-- Slot -->\r\n <ng-content></ng-content>\r\n\r\n <!-- Export Button -->\r\n @if(exportButton.show && gridLength().dataSource > 0) {\r\n <div class=\"col-auto\">\r\n <coer-button\r\n type=\"icon\"\r\n [color]=\"_ColorButton(exportButton)\"\r\n icon=\"excel\"\r\n [tooltip]=\"_isLoading() ? 'Loading' : (exportButton.tooltip || 'Export')\"\r\n [path]=\"(exportButton && exportButton.path) ? exportButton.path : []\"\r\n [isDisabled]=\"_isDisabled() || _isLoading() || (exportButton.isDisabled || false)\"\r\n [isLoading]=\"_isLoading()\" \r\n (onClick)=\"_Export(!exportButton.preventDefault)\"\r\n ></coer-button>\r\n </div>\r\n }\r\n\r\n <!-- Import Button -->\r\n @if(importButton.show && !isReadonly()) {\r\n <div class=\"col-auto\">\r\n <input type=\"file\" #inputFileRef [multiple]=\"false\" (change)=\"_Import($event)\">\r\n\r\n <coer-button\r\n type=\"icon\"\r\n color=\"primary\"\r\n [color]=\"_ColorButton(importButton)\"\r\n [tooltip]=\"importButton.tooltip || 'Import'\"\r\n [path]=\"(importButton && importButton.path) ? importButton.path : []\"\r\n [isDisabled]=\"importButton.isDisabled || false\" \r\n (onClick)=\"_Import()\"\r\n ></coer-button>\r\n </div>\r\n }\r\n\r\n <!-- Add Button -->\r\n @if(addButton.show && !isReadonly()) {\r\n <div class=\"col-auto\">\r\n <coer-button\r\n type=\"icon\"\r\n [color]=\"_ColorButton(addButton)\"\r\n icon=\"new\"\r\n [tooltip]=\"addButton.tooltip || 'New'\"\r\n [path]=\"(addButton && addButton.path) ? addButton.path : []\"\r\n [isDisabled]=\"addButton.isDisabled || false\" \r\n (onClick)=\"onClickAdd.emit()\"\r\n ></coer-button>\r\n </div>\r\n }\r\n\r\n <!-- Save Button -->\r\n @if(saveButton.show && !isReadonly()) {\r\n <div class=\"col-auto\">\r\n <coer-button\r\n type=\"icon\"\r\n [color]=\"_ColorButton(saveButton)\"\r\n icon=\"save\"\r\n [tooltip]=\"saveButton.tooltip || 'Save'\"\r\n [path]=\"(saveButton && saveButton.path) ? saveButton.path : []\"\r\n [isDisabled]=\"saveButton.isDisabled || false\" \r\n (onClick)=\"onClickSave.emit()\"\r\n ></coer-button>\r\n </div>\r\n }\r\n\r\n <!-- Search -->\r\n @if(search.show) {\r\n <div class=\"col-auto\">\r\n <coer-textbox\r\n #inputSearch\r\n [id]=\"_GetId(-1, -1, 'search')\"\r\n [ngModel]=\"_gridSearch()\"\r\n placeholder=\"Search\"\r\n [isDisabled]=\"_isDisabled() || _isLoading()\"\r\n [selectOnFocus]=\"true\"\r\n width=\"250px\"\r\n [showSearchIcon]=\"true\"\r\n [showClearIcon]=\"true\"\r\n (onInput)=\"_InputChange(-1, 'Search', $event, 'coer-textbox-search')\"\r\n (onClickClear)=\"_InputChange(-1, 'Search', '', 'coer-textbox-search')\"\r\n (onKeyupEnter)=\"_KeyupEnter(-1, { indexRow: -1 }, 'coer-textbox-search', $event);\"\r\n ></coer-textbox>\r\n </div>\r\n }\r\n </header>\r\n\r\n <section [ngClass]=\"{ 'grid-container': true, 'invisible': isInvisible() }\"> \r\n <div #innerContainer [ngStyle]=\"{ 'height': _height, 'min-height': minHeight(), 'max-height': maxHeight() }\"> \r\n @if(!_isDisabled() && gridLength().dataSource <= 0 && !isLoading()) {\r\n <div class=\"no-data\"> No Data </div>\r\n }\r\n \r\n @if(!isLoading()) {\r\n <table class=\"table table-sm table-responsive table-striped\">\r\n <thead>\r\n <tr>\r\n @if(checkbox.show && gridLength().dataSource > 0) {\r\n <!-- CheckBox Column -->\r\n <th scope=\"col\" class=\"check-box\">\r\n <div *ngIf=\"!_onlyOneCheck\" [ngClass]=\"{ 'invisible': _isLoadingMessage }\">\r\n <coer-checkbox\r\n [id]=\"_GetId(0, 0, 'checkboxAll')\"\r\n [ignoreDataBinding]=\"true\"\r\n [isDisabled]=\"_isDisabled() || _isLoading()\"\r\n (onChange)=\"_ClickCheck(_GetId(0, 0, 'checkboxAll'), $event, true)\"\r\n ></coer-checkbox>\r\n </div>\r\n </th>\r\n }\r\n \r\n <!-- Dynamic Grid Column -->\r\n @for(header of _gridColumns(); track header.indexColumn) {\r\n <th scope=\"col\" (dblclick)=\"Sort(header.columnName)\"\r\n [ngClass]=\"{\r\n 'no-selection': true,\r\n 'cursor-default': !enableSort() && !_isLoading(),\r\n 'cursor-pointer': enableSort() && !_isLoading(),\r\n 'cursor-wait': _isLoading()\r\n }\"\r\n [ngStyle]=\"{\r\n 'width': header.width,\r\n 'text-align': _GetAttribute(header.columnName, null, 'textAlign', 'defaul-cell')\r\n }\">\r\n <div class=\"no-selection d-flex align-items-center\">\r\n <span class=\"me-1\"> {{ _GetColumnName(header.columnName) }} </span>\r\n <i [class]=\"_GetShortIcon(header.columnName)\"></i> \r\n <i [class]=\"_GetSearchIcon(header.columnName)\"></i>\r\n </div>\r\n </th>\r\n }\r\n \r\n <!-- Delete Button Column -->\r\n @if(_ButtonByRow('showDeleteButton')) {\r\n <th scope=\"col\" class=\"action-button\"></th>\r\n }\r\n \r\n <!-- Edit Button Column -->\r\n @if(_ButtonByRow('showEditButton')) {\r\n <th scope=\"col\" class=\"action-button\"></th>\r\n }\r\n \r\n <!-- Edit Button Column -->\r\n @if(_ButtonByRow('showGoButton')) {\r\n <th scope=\"col\" class=\"action-button\"></th>\r\n }\r\n </tr>\r\n </thead>\r\n \r\n <!-- body -->\r\n @for(group of _gridDataSource(); track group.indexGroup) {\r\n <tbody>\r\n <!--<tr v-if=\"_isGrouped\">\r\n <td :colspan=\"_colspan\" class=\"group\">\r\n <MesAccordion\r\n :ref=\"`accordion${group.indexGroup}-${id}`\"\r\n :title=\"`${_CleanHeaderName(groupBy)} (${group.length}): ${group.groupBy}`\"\r\n :isLoading=\"_isLoading()\"\r\n @expanded=\"_ToogleAccordion(group.groupBy, true, group.indexGroup)\"\r\n @collapsed=\"_ToogleAccordion(group.groupBy, false, group.indexGroup)\"\r\n ></MesAccordion>\r\n </td>\r\n </tr>-->\r\n \r\n @for(row of group.rows; track row.indexRow) {\r\n <tr [id]=\"_GetId(row.indexRow, 0, 'row')\"\r\n [ngClass]=\"{ 'loading': isLoading(), 'd-none': _HideRow(group), 'row-focus': (row.indexRow == _indexFocus() && enableRowFocus()) }\"\r\n (click)=\"_indexFocus.set(row.indexRow)\">\r\n \r\n @if(checkbox.show) {\r\n <!-- CheckBox Column -->\r\n <td class=\"check-box\">\r\n <div [ngClass]=\"{ 'invisible': _isLoadingMessage }\">\r\n <coer-checkbox\r\n [id]=\"_GetId(row.indexRow, 0, 'checkbox')\"\r\n [ignoreDataBinding]=\"true\"\r\n [isDisabled]=\"_isDisabled() || _isLoading()\"\r\n (onChange)=\"_ClickCheck(_GetId(row.indexRow, 0, 'checkbox'), $event, false, row)\"\r\n ></coer-checkbox>\r\n </div>\r\n \r\n <div [ngClass]=\"{ 'invisible': !_isLoadingMessage, 'spinner-border-container': true }\">\r\n <i class=\"spinner-border\"></i>\r\n </div>\r\n </td>\r\n }\r\n \r\n <!-- Dynamic Column -->\r\n @for(header of _gridColumns(); track header.indexColumn) {\r\n @if(_IsCellType(header.columnName, row, 'template')) {\r\n <td class=\"template\"\r\n (click)=\"_isDisabled() ? null : onClickRow.emit(row)\"\r\n (dblclick)=\"_isDisabled() ? null : onDoubleClickRow.emit(row)\">\r\n <div [innerHTML]=\"_GetAttribute(header.columnName, row, 'template', 'defaul-cell') | html\" class=\"template\"></div>\r\n </td>\r\n }\r\n \r\n @else if(_IsCellType(header.columnName, row, 'coerTextbox')) {\r\n <!-- coer-textbox -->\r\n <td class=\"coer-textbox\">\r\n <coer-textbox\r\n [id]=\"_GetId(row.indexRow, header.indexColumn)\"\r\n [(ngModel)]=\"row[header.columnName]\"\r\n [isDisabled]=\"_GetAttribute(header.columnName, row, 'isDisabled', 'coerTextbox') || _isDisabled() || _isLoading()\"\r\n [isValid]=\"_GetAttribute(header.columnName, row, 'isValid', 'coerTextbox') || false\"\r\n [isInvalid]=\"_GetAttribute(header.columnName, row, 'isInvalid', 'coerTextbox') || false\"\r\n [selectOnFocus]=\"_GetAttribute(header.columnName, row, 'selectOnFocus', 'coerTextbox') || true\"\r\n [placeholder]=\"_GetAttribute(header.columnName, row, 'placeholder', 'coerTextbox') || ('Type ' + header.columnName + '...')\"\r\n [textPosition]=\"_GetAttribute(header.columnName, row, 'textPosition', 'coerTextbox') || 'left'\"\r\n [minLength]=\"_GetAttribute(header.columnName, row, 'minLength', 'coerTextbox') || 0\"\r\n [maxLength]=\"_GetAttribute(header.columnName, row, 'maxLength', 'coerTextbox') || 50\"\r\n (onInput)=\"_InputChange(row.indexRow, header.columnName, $event, 'coer-textbox')\"\r\n (onKeyupEnter)=\"_KeyupEnter(header.indexColumn, row, 'coer-textbox', $event)\"\r\n ></coer-textbox>\r\n </td>\r\n }\r\n \r\n \r\n @else if(_IsCellType(header.columnName, row, 'coerNumberbox')) {\r\n <!-- coer-numberbox -->\r\n <td class=\"coer-numberbox\">\r\n <coer-numberbox\r\n [id]=\"_GetId(row.indexRow, header.indexColumn)\"\r\n [(ngModel)]=\"row[header.columnName]\"\r\n [isDisabled]=\"_GetAttribute(header.columnName, row, 'isDisabled', 'coerNumberbox') || _isDisabled() || _isLoading()\"\r\n [isValid]=\"_GetAttribute(header.columnName, row, 'isValid', 'coerNumberbox') || false\"\r\n [isInvalid]=\"_GetAttribute(header.columnName, row, 'isInvalid', 'coerNumberbox') || false\"\r\n [selectOnFocus]=\"_GetAttribute(header.columnName, row, 'selectOnFocus', 'coerNumberbox') || true\"\r\n [placeholder]=\"_GetAttribute(header.columnName, row, 'placeholder', 'coerNumberbox') || ''\"\r\n [textPosition]=\"_GetAttribute(header.columnName, row, 'textPosition', 'coerNumberbox') || 'right'\"\r\n [min]=\"_GetAttribute(header.columnName, row, 'min', 'coerNumberbox') || 0\"\r\n [max]=\"_GetAttribute(header.columnName, row, 'max', 'coerNumberbox') || 2147483647\"\r\n [decimals]=\"_GetAttribute(header.columnName, row, 'decimals', 'coerNumberbox') || 0\"\r\n (onInput)=\"_InputChange(row.indexRow, header.columnName, $event, 'coer-numberbox')\"\r\n (onKeyupEnter)=\"_KeyupEnter(header.indexColumn, row, 'coer-numberbox', $event)\"\r\n ></coer-numberbox>\r\n </td>\r\n }\r\n \r\n \r\n @else if(_IsCellType(header.columnName, row, 'coerSelectbox')) {\r\n <!-- coer-numberbox -->\r\n <td class=\"coer-selectbox\">\r\n <coer-selectbox\r\n [id]=\"_GetId(row.indexRow, header.indexColumn)\"\r\n [(ngModel)]=\"row[header.columnName]\"\r\n [isDisabled]=\"_GetAttribute(header.columnName, row, 'isDisabled', 'coerSelectbox') || _isDisabled() || _isLoading()\"\r\n [isValid]=\"_GetAttribute(header.columnName, row, 'isValid', 'coerSelectbox') || false\"\r\n [isInvalid]=\"_GetAttribute(header.columnName, row, 'isInvalid', 'coerSelectbox') || false\"\r\n [dataSource]=\"_GetAttribute(header.columnName, row, 'dataSource', 'coerSelectbox') || []\"\r\n [placeholder]=\"_GetAttribute(header.columnName, row, 'placeholder', 'coerSelectbox') || '-- Select --'\"\r\n [displayProperty]=\"_GetAttribute(header.columnName, row, 'displayProperty', 'coerSelectbox') || 'name'\"\r\n (onSelected)=\"_InputChange(row.indexRow, header.columnName, $event, 'coer-selectbox'); _KeyupEnter(header.indexColumn, row, 'coer-selectbox', $event)\"\r\n ></coer-selectbox>\r\n </td>\r\n }\r\n \r\n \r\n @else if(_IsCellType(header.columnName, row, 'coerSwitch')) {\r\n <!-- coer-switch -->\r\n <td>\r\n <coer-switch\r\n [id]=\"_GetId(row.indexRow, header.indexColumn)\"\r\n [(ngModel)]=\"row[header.columnName]\"\r\n [isDisabled]=\"_GetAttribute(header.columnName, row, 'isDisabled', 'coerSwitch') || _isDisabled() || _isLoading()\"\r\n [tooltip]=\"_GetAttribute(header.columnName, row, 'tooltip', 'coerSwitch')\"\r\n [tooltipPosition]=\"_GetAttribute(header.columnName, row, 'tooltipPosition', 'coerSwitch') || 'left'\"\r\n [isInvisible]=\"_isDisabled()\"\r\n (onChange)=\"_InputChange(row.indexRow, header.columnName, $event, 'coer-switch')\"\r\n ></coer-switch>\r\n </td>\r\n }\r\n \r\n @else {\r\n <!-- Default Cell -->\r\n <td class=\"default-cell\"\r\n (click)=\"_ClickOnRow(row)\"\r\n (dblclick)=\"_isDisabled() ? null : onDoubleClickRow.emit(row)\"\r\n [ngStyle]=\"{\r\n 'text-align': _GetAttribute(header.columnName, row, 'textAlign', 'defaul-cell'),\r\n 'white-space': 'normal'\r\n }\">\r\n \r\n <div [id]=\"_GetId(row.indexRow, header.indexColumn)\"\r\n [ngClass]=\"{\r\n 'text-blue-bold': _IsCellColor(header.columnName, row, 'colorBlue'),\r\n 'text-green-bold': _IsCellColor(header.columnName, row, 'colorGreen'),\r\n 'text-yellow-bold': _IsCellColor(header.columnName, row, 'colorYellow'),\r\n 'text-red-bold': _IsCellColor(header.columnName, row, 'colorRed'),\r\n 'text-right-bold': _IsCellType(header.columnName, row, 'number')\r\n }\">\r\n \r\n @if(_IsCellType(header.columnName, row, 'number')) {\r\n <span> {{ GetNumericFormat(row[header.columnName]) }} </span>\r\n }\r\n \r\n @else if(_IsCellType(header.columnName, row, 'date')) {\r\n <span> {{ _GetDateFormat(row[header.columnName], _IsCellType(header.columnName, row, 'toLocalZone')) }} </span>\r\n }\r\n \r\n @else if(_IsCellType(header.columnName, row, 'date-time')) {\r\n <span> {{ _GetDateTimeFormat(row[header.columnName], _IsCellType(header.columnName, row, 'toLocalZone')) }} </span>\r\n }\r\n \r\n @else {\r\n <span> {{ _GetCellValue(row, header.columnName) }} </span>\r\n }\r\n </div>\r\n </td>\r\n }\r\n }\r\n \r\n <!-- Delete Button -->\r\n @if(_ButtonByRow('showDeleteButton')) {\r\n <td class=\"action-button\">\r\n @if(_ButtonByRow('showDeleteButton', row)) {\r\n <coer-button\r\n type=\"icon-no-border\"\r\n [color]=\"_ColorButtonByRow('deleteButtonColor')\"\r\n icon=\"delete\"\r\n [tooltip]=\"_GetTooltip('Delete', row)\"\r\n [isInvisible]=\"_isDisabled()\"\r\n [isReadonly]=\"isReadonly()\"\r\n [isDisabled]=\"_isLoading()\"\r\n (onClick)=\"onClickDeleteRow.emit(row)\"\r\n ></coer-button>\r\n }\r\n </td>\r\n }\r\n \r\n <!-- Edit Button -->\r\n @if(_ButtonByRow('showEditButton')) {\r\n <td class=\"action-button\">\r\n @if(_ButtonByRow('showEditButton', row)) {\r\n <coer-button\r\n type=\"icon-no-border\"\r\n [color]=\"_ColorButtonByRow('editButtonColor')\"\r\n icon=\"edit\"\r\n [tooltip]=\"_GetTooltip('Edit', row)\"\r\n [isInvisible]=\"_isDisabled()\"\r\n [isDisabled]=\"_isLoading()\"\r\n (onClick)=\"onClickEditRow.emit(row)\"\r\n ></coer-button>\r\n }\r\n </td>\r\n }\r\n \r\n <!-- GO Button -->\r\n @if(_ButtonByRow('showGoButton')) {\r\n <td class=\"action-button\">\r\n @if(_ButtonByRow('showGoButton', row)) {\r\n <coer-button\r\n type=\"icon-no-border\"\r\n [color]=\"_ColorButtonByRow('goButtonColor')\"\r\n icon=\"go\"\r\n [tooltip]=\"_GetTooltip('Go to', row, 'detail')\"\r\n [isInvisible]=\"_isDisabled()\"\r\n [isDisabled]=\"_isLoading()\"\r\n (onClick)=\"onClickGoRow.emit(row)\"\r\n ></coer-button>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </tbody>\r\n }\r\n </table>\r\n }\r\n\r\n @else {\r\n <!-- Grid Message -->\r\n <div class=\"loading\" [ngStyle]=\"{ \r\n 'width': '100%', \r\n 'height': '100%',\r\n 'bottom': showFooter() ? '35px' : '10px'\r\n }\">\r\n <i class=\"spinner-border\"></i>\r\n <span class=\"fa-fade\">Loading</span>\r\n </div> \r\n }\r\n </div>\r\n </section>\r\n\r\n @if(showFooter()) {\r\n <footer class=\"grid-footer\">\r\n <span>\r\n @if(_isLoadingMessage) {\r\n <span class=\"fa-fade\"> Loading </span>\r\n }\r\n\r\n @else if(gridLength().dataSourceSelected > 0) {\r\n <span>\r\n <i class=\"bi bi-check2-square ms-1\"></i>\r\n {{ gridLength().dataSourceSelected }}\r\n </span>\r\n }\r\n </span>\r\n\r\n <span class=\"me-1\"> {{ gridLength().dataSourceFiltered | numericFormat }} Rows </span>\r\n </footer>\r\n }\r\n</div>", styles: ["div.coer-grid header{align-items:flex-end;justify-content:flex-end;padding-right:8px;margin:0}div.coer-grid header>div{padding:0 0 10px 10px;display:flex;align-items:baseline}div.coer-grid header>div a{height:40px!important}div.coer-grid table{table-layout:auto;border-collapse:separate;border-spacing:1px 0px;margin:0;font-size:14px}div.coer-grid table thead tr th{position:sticky!important;z-index:100!important;top:0!important;background-color:var(--gray)!important;color:var(--smoke)!important;padding:5px!important;vertical-align:middle!important;overflow:hidden;text-overflow:ellipsis;word-wrap:break-word;min-width:50px!important;white-space:nowrap!important}div.coer-grid table tbody{border:0px!important}div.coer-grid table tbody tr:not(.row-focus):hover td{color:#000!important;background-color:#f1f6ff}div.coer-grid table tbody tr td{border:0px!important;padding:5px!important;vertical-align:middle!important;white-space:break-spaces;text-overflow:ellipsis;overflow:hidden;min-height:31px!important}div.coer-grid table tbody tr.row-focus td{background-color:#cde1ff}div.coer-grid table tbody tr td.coer-textbox,div.coer-grid table tbody tr td.coer-numberbox,div.coer-grid table tbody tr td.coer-selectbox{padding:0!important;overflow:visible!important}div.coer-grid table tbody tr td.default-cell{cursor:pointer!important}div.coer-grid table thead tr th.action-button,div.coer-grid table thead tr td.action-button,div.coer-grid table thead tr th.check-box,div.coer-grid table thead tr td.check-box,div.coer-grid table tbody tr th.action-button,div.coer-grid table tbody tr td.action-button,div.coer-grid table tbody tr th.check-box table tbody tr td.check-box{text-align:center!important;cursor:default!important;min-width:40px!important;max-width:40px!important;width:40px!important;padding:0!important}div.coer-grid footer.grid-footer{display:flex;align-items:center;justify-content:space-between;font-size:small;color:#999;padding-top:5px}div.coer-grid section.grid-container{position:relative;overflow:auto}div.coer-grid div.loading,div.coer-grid div.no-data{position:absolute;display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:25px;color:gray}div.coer-grid div.loading{background-color:#bbbbbb83!important;flex-direction:column!important;gap:10px!important;z-index:1}div.coer-grid div.loading span.fa-fade{position:relative!important;top:50px!important}div.coer-grid tr.loading{background-color:#bbbbbb83!important}div.coer-grid div.loading i.spinner-border{color:var(--primary-inner)!important;width:70px!important;height:70px!important;font-size:20px!important;position:absolute!important}div.coer-grid td.check-box div.spinner-border-container{position:absolute;transform:translate(7px,-19px)}div.coer-grid td.check-box div.spinner-border-container i.spinner-border{width:15px!important;height:15px!important;color:var(--primary-inner)!important}div.coer-grid table thead tr th.check-box>div,div.coer-grid table tbody tr td.check-box>div{display:flex;align-items:center;justify-content:center;cursor:default!important}div.coer-grid input.form-check-input{box-shadow:none!important;margin:0}div.coer-grid input[type=checkbox]{cursor:pointer!important}div.coer-grid td.group{padding:0!important;margin:0!important}div.coer-grid td.group>*{border-top:1px solid var(--gray)!important;border-bottom:1px solid var(--gray)!important;padding:0!important;margin:0!important}div.coer-grid .template,div.coer-grid .template div{white-space:nowrap!important;display:flex!important;align-items:center!important;cursor:pointer!important;gap:5px!important;width:100%}\n"] }]
|
2780
2801
|
}] });
|
2781
2802
|
|
2782
2803
|
class CoerList {
|
2783
2804
|
constructor() {
|
2784
2805
|
//Variables
|
2785
2806
|
this._id = Tools.GetGuid('coer-List');
|
2786
|
-
this._enableAnimations = false;
|
2787
2807
|
//Inputs
|
2788
2808
|
this.dataSource = input([]);
|
2789
2809
|
this.propDisplay = input('name');
|
@@ -2874,11 +2894,6 @@ class CoerList {
|
|
2874
2894
|
}
|
2875
2895
|
return height;
|
2876
2896
|
}
|
2877
|
-
ngAfterViewInit() {
|
2878
|
-
Tools.Sleep().then(() => {
|
2879
|
-
this._enableAnimations = true;
|
2880
|
-
});
|
2881
|
-
}
|
2882
2897
|
/** */
|
2883
2898
|
_GetTemplate(item) {
|
2884
2899
|
return this.template()(item, item.index);
|
@@ -2894,11 +2909,11 @@ class CoerList {
|
|
2894
2909
|
this.onDrop.emit(item);
|
2895
2910
|
}
|
2896
2911
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerList, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
2897
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerList, isStandalone: false, selector: "coer-list", inputs: { dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: false, transformFunction: null }, propDisplay: { classPropertyName: "propDisplay", publicName: "propDisplay", isSignal: true, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, headerIcon: { classPropertyName: "headerIcon", publicName: "headerIcon", isSignal: true, isRequired: false, transformFunction: null }, showDeleteButtonByRow: { classPropertyName: "showDeleteButtonByRow", publicName: "showDeleteButtonByRow", isSignal: true, isRequired: false, transformFunction: null }, showGoButtonByRow: { classPropertyName: "showGoButtonByRow", publicName: "showGoButtonByRow", isSignal: true, isRequired: false, transformFunction: null }, showBackButton: { classPropertyName: "showBackButton", publicName: "showBackButton", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, isDraggable: { classPropertyName: "isDraggable", publicName: "isDraggable", isSignal: true, isRequired: false, transformFunction: null }, showSearch: { classPropertyName: "showSearch", publicName: "showSearch", isSignal: true, isRequired: false, transformFunction: null }, template: { classPropertyName: "template", publicName: "template", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, MinWidth: { classPropertyName: "MinWidth", publicName: "MinWidth", isSignal: true, isRequired: false, transformFunction: null }, MaxWidth: { classPropertyName: "MaxWidth", publicName: "MaxWidth", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, marginTop: { classPropertyName: "marginTop", publicName: "marginTop", isSignal: true, isRequired: false, transformFunction: null }, marginRight: { classPropertyName: "marginRight", publicName: "marginRight", isSignal: true, isRequired: false, transformFunction: null }, marginBottom: { classPropertyName: "marginBottom", publicName: "marginBottom", isSignal: true, isRequired: false, transformFunction: null }, marginLeft: { classPropertyName: "marginLeft", publicName: "marginLeft", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onDrop: "onDrop", onSort: "onSort", onClick: "onClick", onDoubleClick: "onDoubleClick", onClickDelete: "onClickDelete", onClickGo: "onClickGo", onClickBack: "onClickBack" }, ngImport: i0, template: "<div [id]=\"_id\" class=\"coer-list\" [ngStyle]=\"{ \r\n 'margin-top': marginTop(), \r\n 'margin-right': marginRight(), \r\n 'margin-bottom': marginBottom(), \r\n 'margin-left': marginLeft(), \r\n }\">\r\n\r\n @if(isLoading()) {\r\n <!-- Grid Message -->\r\n <div class=\"loading\">\r\n <i class=\"spinner-border\"></i>\r\n <span class=\"fa-fade\">Loading</span>\r\n </div>\r\n }\r\n\r\n @else if(dataSource().length <= 0) {\r\n <div class=\"no-data\"> No Data </div>\r\n }\r\n\r\n <header [id]=\"_id + '-header'\" class=\"row\"> \r\n @if(header().length > 0 || headerIcon().length > 0) {\r\n <div class=\"col-auto me-auto\">\r\n <h6>\r\n @if(headerIcon().length > 0) {\r\n <i [class]=\"headerIcon()\"></i> \r\n }\r\n\r\n @if(header().length > 0) {\r\n <span>{{ header() }}</span> \r\n }\r\n </h6> \r\n </div>\r\n }\r\n\r\n @if(_showBackButton()) {\r\n <div class=\"col-auto ps-2 pe-0\"> \r\n <coer-button\r\n type=\"icon-outline\"\r\n color=\"secondary\"\r\n icon=\"back\"\r\n tooltip=\"Back\"\r\n [animation]=\"_enableAnimations\"\r\n (onClick)=\"onClickBack.emit()\"\r\n ></coer-button> \r\n </div>\r\n }\r\n \r\n <!-- Search -->\r\n @if(showSearch() && dataSource().length > 0) {\r\n <div class=\"col-auto pe-0\">\r\n <coer-textbox\r\n #inputSearch \r\n placeholder=\"Search\"\r\n [isDisabled]=\"isLoading()\"\r\n [selectOnFocus]=\"true\"\r\n width=\"250px\"\r\n marginTop=\"5px\"\r\n marginBottom=\"5px\"\r\n [showSearchIcon]=\"true\"\r\n [showClearIcon]=\"true\"\r\n ></coer-textbox>\r\n </div>\r\n }\r\n </header>\r\n\r\n <div [ngStyle]=\"{ \r\n 'width': width(), \r\n 'min-Width': MinWidth(), \r\n 'max-Width': MaxWidth(), \r\n }\">\r\n <ul cdkDropList (cdkDropListDropped)=\"_Drop($event)\" class='list-group coer-list'\r\n [ngStyle]=\"{ \r\n 'height': _height, \r\n 'min-height': minHeight(), \r\n 'max-height': maxHeight(), \r\n 'd-none': dataSource().length <= 0 \r\n }\">\r\n \r\n @for (item of _dataSource(); track _GetIndexRow(item)) {\r\n <li cdkDrag \r\n class=\"list-group-item coer-list-box\" \r\n cdkDragBoundary=\"ul.coer-list\"\r\n (click)=\"onClick.emit(item)\" \r\n (dblclick)=\"onDoubleClick.emit(item)\">\r\n \r\n <div *cdkDragPlaceholder class=\"coer-list-placeholder cursor-grabbing\"></div>\r\n <div class=\"coer-list-content\"> \r\n @if(_hasTemplate()) {\r\n <div [innerHTML]=\"_GetTemplate(item) | html\" class=\"template\"></div>\r\n }\r\n \r\n @else {\r\n <div> {{ _GetDisplay(item) }} </div> \r\n } \r\n \r\n <div>\r\n @if(_showDeleteButtonByRow(item)) {\r\n <coer-button\r\n type=\"icon-no-border\"\r\n color=\"secondary\"\r\n icon=\"delete\" \r\n (onClick)=\"onClickDelete.emit(item)\"\r\n ></coer-button>\r\n } \r\n \r\n @if(_showGoButtonByRow(item)) {\r\n <coer-button\r\n type=\"icon-no-border\"\r\n color=\"secondary\"\r\n icon=\"go\" \r\n marginLeft=\"5px\" \r\n (onClick)=\"onClickGo.emit(item)\"\r\n ></coer-button>\r\n } \r\n \r\n <i cdkDragHandle [ngClass]=\"{ \r\n 'fa-solid fa-grip-vertical text-secondary ps-2': true,\r\n 'cursor-grab': true, \r\n 'cursor-grabbing': false, \r\n 'd-none': !_isDraggable()\r\n }\"></i> \r\n </div> \r\n </div> \r\n </li> \r\n } \r\n </ul>\r\n </div>\r\n</div>", styles: ["div.coer-list header{align-items:center;justify-content:flex-end;padding-right:10px;margin:0}div.coer-list header h6{display:flex;align-items:center;gap:10px;min-height:40px;max-height:40px;margin-top:5px;margin-bottom:5px}div.coer-list header>div{display:flex;align-items:baseline;position:relative;z-index:1}div.coer-list ul.coer-list{width:100%;border:solid 1px #ccc;display:block;background:var(--white);border-radius:4px;overflow:auto}div.coer-list li.coer-list-box{padding:10px;border-bottom:solid 1px #ccc;color:#000000de;display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;background:var(--white);font-size:14px}div.coer-list li.coer-list-box div.coer-list-content{width:100%;display:flex;align-items:center;justify-content:space-between}div.coer-list .cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}div.coer-list .cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}div.coer-list .coer-list-box:last-child{border:none}div.coer-list .coer-list.cdk-drop-list-dragging .coer-list-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}div.coer-list div.coer-list-placeholder{background:#ccc;border:dotted 3px #999;min-height:40px;transition:transform .25s cubic-bezier(0,0,.2,1)}div.coer-list div.cdk-drag-placeholder,div.coer-list ul.cdk-drop-list-dragging,div.coer-list ul.cdk-drop-list-dragging *{cursor:grabbing}div.coer-list div.loading,div.coer-list div.no-data{position:absolute;display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:25px;color:var(--gray);z-index:1}div.coer-list div.loading{background-color:#bbbbbb83!important;flex-direction:column!important;gap:10px!important}div.coer-list div.loading span.fa-fade{position:relative!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$6.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i2$6.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: i2$6.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { kind: "directive", type: i2$6.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "component", type: CoerButton, selector: "coer-button", inputs: ["id", "color", "type", "icon", "iconPosition", "path", "animation", "isLoading", "isDisabled", "isReadonly", "isInvisible", "width", "minWidth", "maxWidth", "height", "minHeight", "marginTop", "marginRight", "marginBottom", "marginLeft", "tooltipPosition", "tooltip"], outputs: ["onClick"] }, { kind: "component", type: CoerTextBox, selector: "coer-textbox", inputs: ["id", "label", "placeholder", "textPosition", "minLength", "maxLength", "isInvalid", "isValid", "externalButton", "selectOnFocus", "showClearIcon", "showSearchIcon", "isLoading", "isDisabled", "isReadonly", "isInvisible", "width", "minWidth", "maxWidth", "marginTop", "marginRight", "marginBottom", "marginLeft", "value"], outputs: ["onKeyupEnter", "onInput", "onClickClear", "onClickSearch", "onClickExternalButton"] }, { kind: "pipe", type: i9.HtmlPipe, name: "html" }] }); }
|
2912
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerList, isStandalone: false, selector: "coer-list", inputs: { dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: false, transformFunction: null }, propDisplay: { classPropertyName: "propDisplay", publicName: "propDisplay", isSignal: true, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, headerIcon: { classPropertyName: "headerIcon", publicName: "headerIcon", isSignal: true, isRequired: false, transformFunction: null }, showDeleteButtonByRow: { classPropertyName: "showDeleteButtonByRow", publicName: "showDeleteButtonByRow", isSignal: true, isRequired: false, transformFunction: null }, showGoButtonByRow: { classPropertyName: "showGoButtonByRow", publicName: "showGoButtonByRow", isSignal: true, isRequired: false, transformFunction: null }, showBackButton: { classPropertyName: "showBackButton", publicName: "showBackButton", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, isDraggable: { classPropertyName: "isDraggable", publicName: "isDraggable", isSignal: true, isRequired: false, transformFunction: null }, showSearch: { classPropertyName: "showSearch", publicName: "showSearch", isSignal: true, isRequired: false, transformFunction: null }, template: { classPropertyName: "template", publicName: "template", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, MinWidth: { classPropertyName: "MinWidth", publicName: "MinWidth", isSignal: true, isRequired: false, transformFunction: null }, MaxWidth: { classPropertyName: "MaxWidth", publicName: "MaxWidth", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, marginTop: { classPropertyName: "marginTop", publicName: "marginTop", isSignal: true, isRequired: false, transformFunction: null }, marginRight: { classPropertyName: "marginRight", publicName: "marginRight", isSignal: true, isRequired: false, transformFunction: null }, marginBottom: { classPropertyName: "marginBottom", publicName: "marginBottom", isSignal: true, isRequired: false, transformFunction: null }, marginLeft: { classPropertyName: "marginLeft", publicName: "marginLeft", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onDrop: "onDrop", onSort: "onSort", onClick: "onClick", onDoubleClick: "onDoubleClick", onClickDelete: "onClickDelete", onClickGo: "onClickGo", onClickBack: "onClickBack" }, ngImport: i0, template: "<div [id]=\"_id\" class=\"coer-list\" [ngStyle]=\"{ \r\n 'margin-top': marginTop(), \r\n 'margin-right': marginRight(), \r\n 'margin-bottom': marginBottom(), \r\n 'margin-left': marginLeft(), \r\n }\">\r\n\r\n @if(isLoading()) {\r\n <!-- Grid Message -->\r\n <div class=\"loading\">\r\n <i class=\"spinner-border\"></i>\r\n <span class=\"fa-fade\">Loading</span>\r\n </div>\r\n }\r\n\r\n @else if(dataSource().length <= 0) {\r\n <div class=\"no-data\"> No Data </div>\r\n }\r\n\r\n <header [id]=\"_id + '-header'\" class=\"row\"> \r\n @if(header().length > 0 || headerIcon().length > 0) {\r\n <div class=\"col-auto me-auto\">\r\n <h6>\r\n @if(headerIcon().length > 0) {\r\n <i [class]=\"headerIcon()\"></i> \r\n }\r\n\r\n @if(header().length > 0) {\r\n <span>{{ header() }}</span> \r\n }\r\n </h6> \r\n </div>\r\n }\r\n\r\n @if(_showBackButton()) {\r\n <div class=\"col-auto ps-2 pe-0\"> \r\n <coer-button\r\n type=\"icon-outline\"\r\n color=\"secondary\"\r\n icon=\"back\"\r\n tooltip=\"Back\" \r\n (onClick)=\"onClickBack.emit()\"\r\n ></coer-button> \r\n </div>\r\n }\r\n \r\n <!-- Search -->\r\n @if(showSearch() && dataSource().length > 0) {\r\n <div class=\"col-auto pe-0\">\r\n <coer-textbox\r\n #inputSearch \r\n placeholder=\"Search\"\r\n [isDisabled]=\"isLoading()\"\r\n [selectOnFocus]=\"true\"\r\n width=\"250px\"\r\n marginTop=\"5px\"\r\n marginBottom=\"5px\"\r\n [showSearchIcon]=\"true\"\r\n [showClearIcon]=\"true\"\r\n ></coer-textbox>\r\n </div>\r\n }\r\n </header>\r\n\r\n <div [ngStyle]=\"{ \r\n 'width': width(), \r\n 'min-Width': MinWidth(), \r\n 'max-Width': MaxWidth(), \r\n }\">\r\n <ul cdkDropList (cdkDropListDropped)=\"_Drop($event)\" class='list-group coer-list'\r\n [ngStyle]=\"{ \r\n 'height': _height, \r\n 'min-height': minHeight(), \r\n 'max-height': maxHeight(), \r\n 'd-none': dataSource().length <= 0 \r\n }\">\r\n \r\n @for (item of _dataSource(); track _GetIndexRow(item)) {\r\n <li cdkDrag \r\n class=\"list-group-item coer-list-box\" \r\n cdkDragBoundary=\"ul.coer-list\"\r\n (click)=\"onClick.emit(item)\" \r\n (dblclick)=\"onDoubleClick.emit(item)\">\r\n \r\n <div *cdkDragPlaceholder class=\"coer-list-placeholder cursor-grabbing\"></div>\r\n <div class=\"coer-list-content\"> \r\n @if(_hasTemplate()) {\r\n <div [innerHTML]=\"_GetTemplate(item) | html\" class=\"template\"></div>\r\n }\r\n \r\n @else {\r\n <div> {{ _GetDisplay(item) }} </div> \r\n } \r\n \r\n <div>\r\n @if(_showDeleteButtonByRow(item)) {\r\n <coer-button\r\n type=\"icon-no-border\"\r\n color=\"secondary\"\r\n icon=\"delete\" \r\n (onClick)=\"onClickDelete.emit(item)\"\r\n ></coer-button>\r\n } \r\n \r\n @if(_showGoButtonByRow(item)) {\r\n <coer-button\r\n type=\"icon-no-border\"\r\n color=\"secondary\"\r\n icon=\"go\" \r\n marginLeft=\"5px\" \r\n (onClick)=\"onClickGo.emit(item)\"\r\n ></coer-button>\r\n } \r\n \r\n <i cdkDragHandle [ngClass]=\"{ \r\n 'fa-solid fa-grip-vertical text-secondary ps-2': true,\r\n 'cursor-grab': true, \r\n 'cursor-grabbing': false, \r\n 'd-none': !_isDraggable()\r\n }\"></i> \r\n </div> \r\n </div> \r\n </li> \r\n } \r\n </ul>\r\n </div>\r\n</div>", styles: ["div.coer-list header{align-items:center;justify-content:flex-end;padding-right:10px;margin:0}div.coer-list header h6{display:flex;align-items:center;gap:10px;min-height:40px;max-height:40px;margin-top:5px;margin-bottom:5px}div.coer-list header>div{display:flex;align-items:baseline;position:relative;z-index:1}div.coer-list ul.coer-list{width:100%;border:solid 1px #ccc;display:block;background:var(--white);border-radius:4px;overflow:auto}div.coer-list li.coer-list-box{padding:10px;border-bottom:solid 1px #ccc;color:#000000de;display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;background:var(--white);font-size:14px}div.coer-list li.coer-list-box div.coer-list-content{width:100%;display:flex;align-items:center;justify-content:space-between}div.coer-list .cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}div.coer-list .cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}div.coer-list .coer-list-box:last-child{border:none}div.coer-list .coer-list.cdk-drop-list-dragging .coer-list-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}div.coer-list div.coer-list-placeholder{background:#ccc;border:dotted 3px #999;min-height:40px;transition:transform .25s cubic-bezier(0,0,.2,1)}div.coer-list div.cdk-drag-placeholder,div.coer-list ul.cdk-drop-list-dragging,div.coer-list ul.cdk-drop-list-dragging *{cursor:grabbing}div.coer-list div.loading,div.coer-list div.no-data{position:absolute;display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:25px;color:var(--gray);z-index:1}div.coer-list div.loading{background-color:#bbbbbb83!important;flex-direction:column!important;gap:10px!important}div.coer-list div.loading span.fa-fade{position:relative!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$6.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i2$6.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: i2$6.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { kind: "directive", type: i2$6.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "component", type: CoerButton, selector: "coer-button", inputs: ["id", "color", "type", "icon", "iconPosition", "path", "isLoading", "isDisabled", "isReadonly", "isInvisible", "width", "minWidth", "maxWidth", "height", "minHeight", "marginTop", "marginRight", "marginBottom", "marginLeft", "tooltip", "tooltipPosition"], outputs: ["onClick"] }, { kind: "component", type: CoerTextBox, selector: "coer-textbox", inputs: ["id", "value", "label", "placeholder", "textPosition", "minLength", "maxLength", "isInvalid", "isValid", "externalButton", "selectOnFocus", "showClearIcon", "showSearchIcon", "isLoading", "isDisabled", "isReadonly", "isInvisible", "width", "minWidth", "maxWidth", "marginTop", "marginRight", "marginBottom", "marginLeft"], outputs: ["onKeyupEnter", "onInput", "onClickClear", "onClickSearch", "onClickExternalButton"] }, { kind: "pipe", type: i9.HtmlPipe, name: "html" }] }); }
|
2898
2913
|
}
|
2899
2914
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerList, decorators: [{
|
2900
2915
|
type: Component,
|
2901
|
-
args: [{ selector: 'coer-list', standalone: false, template: "<div [id]=\"_id\" class=\"coer-list\" [ngStyle]=\"{ \r\n 'margin-top': marginTop(), \r\n 'margin-right': marginRight(), \r\n 'margin-bottom': marginBottom(), \r\n 'margin-left': marginLeft(), \r\n }\">\r\n\r\n @if(isLoading()) {\r\n <!-- Grid Message -->\r\n <div class=\"loading\">\r\n <i class=\"spinner-border\"></i>\r\n <span class=\"fa-fade\">Loading</span>\r\n </div>\r\n }\r\n\r\n @else if(dataSource().length <= 0) {\r\n <div class=\"no-data\"> No Data </div>\r\n }\r\n\r\n <header [id]=\"_id + '-header'\" class=\"row\"> \r\n @if(header().length > 0 || headerIcon().length > 0) {\r\n <div class=\"col-auto me-auto\">\r\n <h6>\r\n @if(headerIcon().length > 0) {\r\n <i [class]=\"headerIcon()\"></i> \r\n }\r\n\r\n @if(header().length > 0) {\r\n <span>{{ header() }}</span> \r\n }\r\n </h6> \r\n </div>\r\n }\r\n\r\n @if(_showBackButton()) {\r\n <div class=\"col-auto ps-2 pe-0\"> \r\n <coer-button\r\n type=\"icon-outline\"\r\n color=\"secondary\"\r\n icon=\"back\"\r\n tooltip=\"Back\"\r\n
|
2916
|
+
args: [{ selector: 'coer-list', standalone: false, template: "<div [id]=\"_id\" class=\"coer-list\" [ngStyle]=\"{ \r\n 'margin-top': marginTop(), \r\n 'margin-right': marginRight(), \r\n 'margin-bottom': marginBottom(), \r\n 'margin-left': marginLeft(), \r\n }\">\r\n\r\n @if(isLoading()) {\r\n <!-- Grid Message -->\r\n <div class=\"loading\">\r\n <i class=\"spinner-border\"></i>\r\n <span class=\"fa-fade\">Loading</span>\r\n </div>\r\n }\r\n\r\n @else if(dataSource().length <= 0) {\r\n <div class=\"no-data\"> No Data </div>\r\n }\r\n\r\n <header [id]=\"_id + '-header'\" class=\"row\"> \r\n @if(header().length > 0 || headerIcon().length > 0) {\r\n <div class=\"col-auto me-auto\">\r\n <h6>\r\n @if(headerIcon().length > 0) {\r\n <i [class]=\"headerIcon()\"></i> \r\n }\r\n\r\n @if(header().length > 0) {\r\n <span>{{ header() }}</span> \r\n }\r\n </h6> \r\n </div>\r\n }\r\n\r\n @if(_showBackButton()) {\r\n <div class=\"col-auto ps-2 pe-0\"> \r\n <coer-button\r\n type=\"icon-outline\"\r\n color=\"secondary\"\r\n icon=\"back\"\r\n tooltip=\"Back\" \r\n (onClick)=\"onClickBack.emit()\"\r\n ></coer-button> \r\n </div>\r\n }\r\n \r\n <!-- Search -->\r\n @if(showSearch() && dataSource().length > 0) {\r\n <div class=\"col-auto pe-0\">\r\n <coer-textbox\r\n #inputSearch \r\n placeholder=\"Search\"\r\n [isDisabled]=\"isLoading()\"\r\n [selectOnFocus]=\"true\"\r\n width=\"250px\"\r\n marginTop=\"5px\"\r\n marginBottom=\"5px\"\r\n [showSearchIcon]=\"true\"\r\n [showClearIcon]=\"true\"\r\n ></coer-textbox>\r\n </div>\r\n }\r\n </header>\r\n\r\n <div [ngStyle]=\"{ \r\n 'width': width(), \r\n 'min-Width': MinWidth(), \r\n 'max-Width': MaxWidth(), \r\n }\">\r\n <ul cdkDropList (cdkDropListDropped)=\"_Drop($event)\" class='list-group coer-list'\r\n [ngStyle]=\"{ \r\n 'height': _height, \r\n 'min-height': minHeight(), \r\n 'max-height': maxHeight(), \r\n 'd-none': dataSource().length <= 0 \r\n }\">\r\n \r\n @for (item of _dataSource(); track _GetIndexRow(item)) {\r\n <li cdkDrag \r\n class=\"list-group-item coer-list-box\" \r\n cdkDragBoundary=\"ul.coer-list\"\r\n (click)=\"onClick.emit(item)\" \r\n (dblclick)=\"onDoubleClick.emit(item)\">\r\n \r\n <div *cdkDragPlaceholder class=\"coer-list-placeholder cursor-grabbing\"></div>\r\n <div class=\"coer-list-content\"> \r\n @if(_hasTemplate()) {\r\n <div [innerHTML]=\"_GetTemplate(item) | html\" class=\"template\"></div>\r\n }\r\n \r\n @else {\r\n <div> {{ _GetDisplay(item) }} </div> \r\n } \r\n \r\n <div>\r\n @if(_showDeleteButtonByRow(item)) {\r\n <coer-button\r\n type=\"icon-no-border\"\r\n color=\"secondary\"\r\n icon=\"delete\" \r\n (onClick)=\"onClickDelete.emit(item)\"\r\n ></coer-button>\r\n } \r\n \r\n @if(_showGoButtonByRow(item)) {\r\n <coer-button\r\n type=\"icon-no-border\"\r\n color=\"secondary\"\r\n icon=\"go\" \r\n marginLeft=\"5px\" \r\n (onClick)=\"onClickGo.emit(item)\"\r\n ></coer-button>\r\n } \r\n \r\n <i cdkDragHandle [ngClass]=\"{ \r\n 'fa-solid fa-grip-vertical text-secondary ps-2': true,\r\n 'cursor-grab': true, \r\n 'cursor-grabbing': false, \r\n 'd-none': !_isDraggable()\r\n }\"></i> \r\n </div> \r\n </div> \r\n </li> \r\n } \r\n </ul>\r\n </div>\r\n</div>", styles: ["div.coer-list header{align-items:center;justify-content:flex-end;padding-right:10px;margin:0}div.coer-list header h6{display:flex;align-items:center;gap:10px;min-height:40px;max-height:40px;margin-top:5px;margin-bottom:5px}div.coer-list header>div{display:flex;align-items:baseline;position:relative;z-index:1}div.coer-list ul.coer-list{width:100%;border:solid 1px #ccc;display:block;background:var(--white);border-radius:4px;overflow:auto}div.coer-list li.coer-list-box{padding:10px;border-bottom:solid 1px #ccc;color:#000000de;display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;background:var(--white);font-size:14px}div.coer-list li.coer-list-box div.coer-list-content{width:100%;display:flex;align-items:center;justify-content:space-between}div.coer-list .cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}div.coer-list .cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}div.coer-list .coer-list-box:last-child{border:none}div.coer-list .coer-list.cdk-drop-list-dragging .coer-list-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}div.coer-list div.coer-list-placeholder{background:#ccc;border:dotted 3px #999;min-height:40px;transition:transform .25s cubic-bezier(0,0,.2,1)}div.coer-list div.cdk-drag-placeholder,div.coer-list ul.cdk-drop-list-dragging,div.coer-list ul.cdk-drop-list-dragging *{cursor:grabbing}div.coer-list div.loading,div.coer-list div.no-data{position:absolute;display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:25px;color:var(--gray);z-index:1}div.coer-list div.loading{background-color:#bbbbbb83!important;flex-direction:column!important;gap:10px!important}div.coer-list div.loading span.fa-fade{position:relative!important}\n"] }]
|
2902
2917
|
}] });
|
2903
2918
|
|
2904
2919
|
class CoerMenuOption {
|
@@ -2906,14 +2921,50 @@ class CoerMenuOption {
|
|
2906
2921
|
//Injects
|
2907
2922
|
this._router = inject(Router);
|
2908
2923
|
//Inputs
|
2909
|
-
this.level = 1;
|
2910
|
-
this.label = '';
|
2911
|
-
this.
|
2924
|
+
this.level = input(1);
|
2925
|
+
this.label = input('');
|
2926
|
+
this.icon = input();
|
2927
|
+
this.path = input();
|
2928
|
+
this.tree = input([]);
|
2912
2929
|
//Outputs
|
2913
|
-
this.clickMenuOption =
|
2930
|
+
this.clickMenuOption = output();
|
2931
|
+
//computed
|
2932
|
+
this._icon = computed(() => {
|
2933
|
+
return Tools.IsNotOnlyWhiteSpace(this.icon()) ? this.icon() : '';
|
2934
|
+
});
|
2935
|
+
//computed
|
2936
|
+
this._path = computed(() => {
|
2937
|
+
return Tools.IsNotOnlyWhiteSpace(this.path()) ? this.path() : '/home';
|
2938
|
+
});
|
2939
|
+
//computed
|
2940
|
+
this._tree = computed(() => {
|
2941
|
+
return [...this.tree()].concat({
|
2942
|
+
label: this.label(),
|
2943
|
+
icon: this._icon(),
|
2944
|
+
path: this._path()
|
2945
|
+
});
|
2946
|
+
});
|
2947
|
+
//computed
|
2948
|
+
this._marginLeft = computed(() => {
|
2949
|
+
return this.level() == 3
|
2950
|
+
? `${(this.level() - 1) * 10}px`
|
2951
|
+
: `${(this.level() - 1) * 20}px`;
|
2952
|
+
});
|
2953
|
+
//computed
|
2954
|
+
this._identityClass = computed(() => {
|
2955
|
+
let identity = '';
|
2956
|
+
for (let i = 0; i < this.tree().length; i++) {
|
2957
|
+
identity += `lv${i + 1}${this.tree()[i].label}-`;
|
2958
|
+
}
|
2959
|
+
identity += `lv${this.level()}${this.label()}`;
|
2960
|
+
if (identity.includes(' '))
|
2961
|
+
identity = identity.replaceAll(' ', '');
|
2962
|
+
return identity.toLowerCase();
|
2963
|
+
});
|
2914
2964
|
}
|
2965
|
+
//AfterContentInit
|
2915
2966
|
ngAfterContentInit() {
|
2916
|
-
|
2967
|
+
Tools.Sleep().then(async (_) => {
|
2917
2968
|
while (['', '/'].includes(this._router.url)) {
|
2918
2969
|
await Tools.Sleep(100);
|
2919
2970
|
}
|
@@ -2923,41 +2974,11 @@ class CoerMenuOption {
|
|
2923
2974
|
routerURL = this._router.url.split('?')[0];
|
2924
2975
|
queryParams = this._router.url.split('?')[1];
|
2925
2976
|
}
|
2926
|
-
if (routerURL == this.path) {
|
2977
|
+
if (routerURL == this.path()) {
|
2927
2978
|
this.ClickMenuOption(queryParams, false);
|
2928
2979
|
}
|
2929
2980
|
});
|
2930
2981
|
}
|
2931
|
-
get _icon() {
|
2932
|
-
return (Tools.IsNotOnlyWhiteSpace(this.icon) && this.icon.length > 0)
|
2933
|
-
? this.icon : '';
|
2934
|
-
}
|
2935
|
-
get _path() {
|
2936
|
-
return (Tools.IsNotOnlyWhiteSpace(this.path) && this.path.length > 0)
|
2937
|
-
? this.path : '/home';
|
2938
|
-
}
|
2939
|
-
get _tree() {
|
2940
|
-
return [...this.tree].concat({
|
2941
|
-
label: this.label,
|
2942
|
-
icon: this._icon,
|
2943
|
-
path: this._path
|
2944
|
-
});
|
2945
|
-
}
|
2946
|
-
get marginLeft() {
|
2947
|
-
return this.level == 3
|
2948
|
-
? `${(this.level - 1) * 10}px`
|
2949
|
-
: `${(this.level - 1) * 20}px`;
|
2950
|
-
}
|
2951
|
-
get identityClass() {
|
2952
|
-
let identity = '';
|
2953
|
-
for (let i = 0; i < this.tree.length; i++) {
|
2954
|
-
identity += `lv${i + 1}${this.tree[i].label}-`;
|
2955
|
-
}
|
2956
|
-
identity += `lv${this.level}${this.label}`;
|
2957
|
-
if (identity.includes(' '))
|
2958
|
-
identity = identity.replaceAll(' ', '');
|
2959
|
-
return identity.toLowerCase();
|
2960
|
-
}
|
2961
2982
|
/** */
|
2962
2983
|
ClickMenuOption(queryParams, resetSource = true) {
|
2963
2984
|
if (resetSource) {
|
@@ -2965,52 +2986,42 @@ class CoerMenuOption {
|
|
2965
2986
|
if (this._router.url.includes('?')) {
|
2966
2987
|
routerURL = this._router.url.split('?')[0];
|
2967
2988
|
}
|
2968
|
-
if (routerURL != this.path) {
|
2989
|
+
if (routerURL != this.path()) {
|
2969
2990
|
Source.Reset();
|
2970
2991
|
}
|
2971
2992
|
}
|
2972
2993
|
this.clickMenuOption.emit({
|
2973
|
-
level: this.level,
|
2974
|
-
label: this.label,
|
2975
|
-
path: this._path,
|
2976
|
-
icon: this._icon,
|
2977
|
-
tree:
|
2994
|
+
level: this.level(),
|
2995
|
+
label: this.label(),
|
2996
|
+
path: this._path(),
|
2997
|
+
icon: this._icon(),
|
2998
|
+
tree: this._tree(),
|
2978
2999
|
queryParams: queryParams
|
2979
3000
|
});
|
2980
3001
|
}
|
2981
3002
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerMenuOption, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
2982
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
3003
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.1", type: CoerMenuOption, isStandalone: false, selector: "coer-menu-option", inputs: { level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, path: { classPropertyName: "path", publicName: "path", isSignal: true, isRequired: false, transformFunction: null }, tree: { classPropertyName: "tree", publicName: "tree", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clickMenuOption: "clickMenuOption" }, ngImport: i0, template: "<mat-nav-list class=\"coer-menu-option\" (click)=\"ClickMenuOption('')\">\r\n <mat-list-item>\r\n <span [class]=\"'icon-container ' + _identityClass()\" [ngStyle]=\"{ 'margin-left': _marginLeft() }\">\r\n <i [class]=\"_icon()\"></i>\r\n </span>\r\n\r\n <span [class]=\"'label-container ' + _identityClass()\">\r\n {{ label() }}\r\n </span>\r\n </mat-list-item>\r\n</mat-nav-list>", styles: ["mat-nav-list.coer-menu-option{padding:0!important;height:48px!important}mat-nav-list.coer-menu-option div,mat-nav-list.coer-menu-option span{font-size:16px!important;font-family:sans-serif!important;font-weight:700}mat-nav-list.coer-menu-option mat-list-item{padding:0 35px 0 10px!important;display:inline-flex!important;height:48px!important;color:var(--sidenav-text-inner)}mat-nav-list.coer-menu-option mat-list-item span.mat-mdc-list-item-unscoped-content{display:flex!important;align-items:center!important}mat-nav-list.coer-menu-option mat-list-item span.mat-mdc-list-item-unscoped-content span.icon-container{display:inline-flex!important;align-items:center!important;justify-content:center!important;height:48px!important;min-width:20px!important;max-width:20px!important;color:var(--sidenav-text-inner)}mat-nav-list.coer-menu-option mat-list-item span.mat-mdc-list-item-unscoped-content span.icon-container i{min-height:16px!important;position:absolute!important}mat-nav-list.coer-menu-option mat-list-item span.label-container{justify-content:flex-start!important;display:inline-flex!important;height:auto!important;margin-left:10px!important;color:var(--sidenav-text-inner)}mat-nav-list.coer-menu-option mat-list-item span.icon-container.active-link,mat-nav-list.coer-menu-option mat-list-item span.label-container.active-link{color:var(--sidenav-active-inner)!important}mat-nav-list.coer-menu-option mat-list-item:hover,mat-nav-list.coer-menu-option mat-list-item.mdc-list-item:hover:before{background-color:color-mix(in srgb,var(--sidenav-inner),white 5%)!important}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2$7.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i2$7.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }] }); }
|
2983
3004
|
}
|
2984
3005
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerMenuOption, decorators: [{
|
2985
3006
|
type: Component,
|
2986
|
-
args: [{ selector: 'coer-menu-option', standalone: false, template: "<mat-nav-list class=\"coer-menu-option\" (click)=\"ClickMenuOption('')\">\r\n <mat-list-item>\r\n <span [class]=\"'icon-container ' +
|
2987
|
-
}]
|
2988
|
-
type: Input
|
2989
|
-
}], label: [{
|
2990
|
-
type: Input
|
2991
|
-
}], icon: [{
|
2992
|
-
type: Input
|
2993
|
-
}], path: [{
|
2994
|
-
type: Input
|
2995
|
-
}], tree: [{
|
2996
|
-
type: Input
|
2997
|
-
}], clickMenuOption: [{
|
2998
|
-
type: Output
|
2999
|
-
}] } });
|
3007
|
+
args: [{ selector: 'coer-menu-option', standalone: false, template: "<mat-nav-list class=\"coer-menu-option\" (click)=\"ClickMenuOption('')\">\r\n <mat-list-item>\r\n <span [class]=\"'icon-container ' + _identityClass()\" [ngStyle]=\"{ 'margin-left': _marginLeft() }\">\r\n <i [class]=\"_icon()\"></i>\r\n </span>\r\n\r\n <span [class]=\"'label-container ' + _identityClass()\">\r\n {{ label() }}\r\n </span>\r\n </mat-list-item>\r\n</mat-nav-list>", styles: ["mat-nav-list.coer-menu-option{padding:0!important;height:48px!important}mat-nav-list.coer-menu-option div,mat-nav-list.coer-menu-option span{font-size:16px!important;font-family:sans-serif!important;font-weight:700}mat-nav-list.coer-menu-option mat-list-item{padding:0 35px 0 10px!important;display:inline-flex!important;height:48px!important;color:var(--sidenav-text-inner)}mat-nav-list.coer-menu-option mat-list-item span.mat-mdc-list-item-unscoped-content{display:flex!important;align-items:center!important}mat-nav-list.coer-menu-option mat-list-item span.mat-mdc-list-item-unscoped-content span.icon-container{display:inline-flex!important;align-items:center!important;justify-content:center!important;height:48px!important;min-width:20px!important;max-width:20px!important;color:var(--sidenav-text-inner)}mat-nav-list.coer-menu-option mat-list-item span.mat-mdc-list-item-unscoped-content span.icon-container i{min-height:16px!important;position:absolute!important}mat-nav-list.coer-menu-option mat-list-item span.label-container{justify-content:flex-start!important;display:inline-flex!important;height:auto!important;margin-left:10px!important;color:var(--sidenav-text-inner)}mat-nav-list.coer-menu-option mat-list-item span.icon-container.active-link,mat-nav-list.coer-menu-option mat-list-item span.label-container.active-link{color:var(--sidenav-active-inner)!important}mat-nav-list.coer-menu-option mat-list-item:hover,mat-nav-list.coer-menu-option mat-list-item.mdc-list-item:hover:before{background-color:color-mix(in srgb,var(--sidenav-inner),white 5%)!important}\n"] }]
|
3008
|
+
}] });
|
3000
3009
|
|
3001
3010
|
class CoerSecretBox extends ControlValue {
|
3011
|
+
//Constructor
|
3002
3012
|
constructor() {
|
3003
|
-
super(
|
3004
|
-
//
|
3005
|
-
this._value = '';
|
3013
|
+
super();
|
3014
|
+
//Elements
|
3006
3015
|
this.matFormField = viewChild.required('matFormField');
|
3007
3016
|
this.coerTextBox = viewChild.required('coerTextBox');
|
3008
3017
|
//Variables
|
3018
|
+
this._value = '';
|
3009
3019
|
this._id = Tools.GetGuid('coer-textBox');
|
3010
3020
|
this._isLoadingEvent = signal(false);
|
3011
3021
|
this.passwordType = true;
|
3012
3022
|
//Inputs
|
3013
3023
|
this.id = input('');
|
3024
|
+
this.value = input(null);
|
3014
3025
|
this.label = input('');
|
3015
3026
|
this.placeholder = input('');
|
3016
3027
|
this.textPosition = input('left');
|
@@ -3056,34 +3067,12 @@ class CoerSecretBox extends ControlValue {
|
|
3056
3067
|
return '0px';
|
3057
3068
|
}
|
3058
3069
|
});
|
3070
|
+
this._effect = effect(() => {
|
3071
|
+
this.SetValue(Tools.IsNotNull(this.value()) ? this.value() : '');
|
3072
|
+
});
|
3059
3073
|
}
|
3060
|
-
|
3061
|
-
|
3062
|
-
value = '';
|
3063
|
-
this.SetValue(value);
|
3064
|
-
}
|
3065
|
-
ngOnInit() {
|
3066
|
-
this._SetEvents();
|
3067
|
-
}
|
3068
|
-
//getter
|
3069
|
-
get _showSecret() {
|
3070
|
-
return !this.showSecret()
|
3071
|
-
&& !this.isDisabled()
|
3072
|
-
&& !this.isLoading();
|
3073
|
-
}
|
3074
|
-
//getter
|
3075
|
-
get _passwordType() {
|
3076
|
-
return this.showSecret()
|
3077
|
-
|| this.passwordType
|
3078
|
-
|| this.isDisabled()
|
3079
|
-
|| this.isLoading();
|
3080
|
-
}
|
3081
|
-
//getter
|
3082
|
-
get value() {
|
3083
|
-
return String(this._value);
|
3084
|
-
}
|
3085
|
-
/** */
|
3086
|
-
_SetEvents() {
|
3074
|
+
//AfterViewInit
|
3075
|
+
ngAfterViewInit() {
|
3087
3076
|
Tools.Sleep().then(() => {
|
3088
3077
|
this.element = document.getElementById(this._id);
|
3089
3078
|
if (this.element) {
|
@@ -3119,6 +3108,23 @@ class CoerSecretBox extends ControlValue {
|
|
3119
3108
|
}
|
3120
3109
|
});
|
3121
3110
|
}
|
3111
|
+
//OnDestroy
|
3112
|
+
ngOnDestroy() {
|
3113
|
+
this._effect?.destroy();
|
3114
|
+
}
|
3115
|
+
//getter
|
3116
|
+
get _showSecret() {
|
3117
|
+
return !this.showSecret()
|
3118
|
+
&& !this.isDisabled()
|
3119
|
+
&& !this.isLoading();
|
3120
|
+
}
|
3121
|
+
//getter
|
3122
|
+
get _passwordType() {
|
3123
|
+
return this.showSecret()
|
3124
|
+
|| this.passwordType
|
3125
|
+
|| this.isDisabled()
|
3126
|
+
|| this.isLoading();
|
3127
|
+
}
|
3122
3128
|
/** */
|
3123
3129
|
Focus(select = false, delay = 0) {
|
3124
3130
|
if (this._isLoadingEvent())
|
@@ -3157,18 +3163,19 @@ class CoerSecretBox extends ControlValue {
|
|
3157
3163
|
this.SetValue('');
|
3158
3164
|
this.Focus(false, delay);
|
3159
3165
|
}
|
3160
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerSecretBox, deps:
|
3161
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerSecretBox, isStandalone: false, selector: "coer-secretbox", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, textPosition: { classPropertyName: "textPosition", publicName: "textPosition", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, isInvalid: { classPropertyName: "isInvalid", publicName: "isInvalid", isSignal: true, isRequired: false, transformFunction: null }, isValid: { classPropertyName: "isValid", publicName: "isValid", isSignal: true, isRequired: false, transformFunction: null }, showSecret: { classPropertyName: "showSecret", publicName: "showSecret", isSignal: true, isRequired: false, transformFunction: null }, selectOnFocus: { classPropertyName: "selectOnFocus", publicName: "selectOnFocus", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: true, isRequired: false, transformFunction: null }, isInvisible: { classPropertyName: "isInvisible", publicName: "isInvisible", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, marginTop: { classPropertyName: "marginTop", publicName: "marginTop", isSignal: true, isRequired: false, transformFunction: null }, marginRight: { classPropertyName: "marginRight", publicName: "marginRight", isSignal: true, isRequired: false, transformFunction: null }, marginBottom: { classPropertyName: "marginBottom", publicName: "marginBottom", isSignal: true, isRequired: false, transformFunction: null }, marginLeft: { classPropertyName: "marginLeft", publicName: "marginLeft", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { onKeyupEnter: "onKeyupEnter", onInput: "onInput", onClickClear: "onClickClear", onClickExternalButton: "onClickExternalButton" }, providers: [CONTROL_VALUE(CoerSecretBox)], viewQueries: [{ propertyName: "matFormField", first: true, predicate: ["matFormField"], descendants: true, isSignal: true }, { propertyName: "coerTextBox", first: true, predicate: ["coerTextBox"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"coer-text-box\">\r\n <mat-form-field\r\n [id]=\"_id + '-container'\"\r\n [floatLabel]=\"_floatLabel()\"\r\n [ngClass]=\"{\r\n 'readonly': isReadonly() && !isLoading(),\r\n 'd-none': isInvisible()\r\n }\"\r\n [style]=\"{\r\n 'width': width(),\r\n 'min-width': minWidth(),\r\n 'max-width': maxWidth(),\r\n 'margin-top': marginTop(),\r\n 'margin-right': marginRight(),\r\n 'margin-bottom': marginBottom(),\r\n 'margin-left': marginLeft()\r\n }\">\r\n <mat-label>{{ label() }}</mat-label>\r\n \r\n <input #coerTextBox matInput\r\n [id]=\"_id\"\r\n [type]=\"_passwordType ? 'password': 'text'\"\r\n [placeholder]=\"placeholder()\"\r\n [minLength]=\"minLength()\"\r\n [maxLength]=\"maxLength()\"\r\n [disabled]=\"!_isEnable()\"\r\n [value]=\"_value\"\r\n (input)=\"SetValue(coerTextBox.value)\"\r\n (blur)=\"SetTouched(true)\"\r\n [style]=\"{\r\n 'cursor': isLoading() ? 'wait' : null,\r\n 'margin-top': (_floatLabel() == 'auto') ? '15px' : '9px',\r\n 'padding-right': _paddingRight(),\r\n 'text-align': textPosition()\r\n }\">\r\n\r\n @if(isLoading()) {\r\n <div class=\"placeholder-glow\">\r\n <span class=\"placeholder\"></span>\r\n </div>\r\n }\r\n\r\n <span class=\"icon-container\"> \r\n @if(isInvalid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-exclamation\"></i>\r\n }\r\n\r\n @else if(isValid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-check text-green\"></i>\r\n }\r\n\r\n @if(_showSecret) {\r\n <i [ngClass]=\"{\r\n 'fa-solid cursor-pointer': true, \r\n 'fa-eye-slash': passwordType,\r\n 'fa-eye': !passwordType\r\n }\" \r\n [ngStyle]=\"{\r\n 'margin-right': isInvalid() || isValid() ? '25px' : '0px'\r\n }\"\r\n (click)=\"passwordType = !passwordType\"></i> \r\n }\r\n </span>\r\n </mat-form-field> \r\n\r\n @if(isInvisible()) {\r\n <mat-form-field class=\"invisible\">\r\n <input matInput [disabled]=\"true\"> \r\n </mat-form-field> \r\n } \r\n</div> ", styles: ["div.coer-text-box{display:flex;align-items:center}div.coer-text-box mat-form-field{position:relative!important}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex{height:40px!important}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{width:100%!important;height:40px!important;padding:0!important}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label{overflow:visible!important;position:absolute!important;top:20px!important}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label.mdc-floating-label--float-above mat-label{color:var(--primary-inner);font-weight:700;position:relative;left:-10px;top:2px}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input{font-weight:400!important;font-size:17px!important;color:var(--black)!important}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active,div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:before,div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:after{border-bottom-color:var(--primary-inner)!important}div.coer-text-box mat-form-field div.mat-mdc-form-field-subscript-wrapper.mat-mdc-form-field-bottom-align{height:0px!important}div.coer-text-box mat-form-field span.icon-container{position:absolute!important;top:1px!important;right:-14px!important;z-index:5!important;width:30px;height:40px;display:flex;align-items:center;justify-content:center;gap:5px}div.coer-text-box mat-form-field span.icon-container i{font-size:20px!important}div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-eye-slash,div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-eye{color:#caced1!important;cursor:pointer!important}div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-eye-slash:hover,div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-eye:hover{color:#6c757d!important}div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-circle-check{color:var(--green)!important}div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-circle-exclamation{color:var(--red)!important}div.coer-text-box mat-form-field span.placeholder{width:calc(100% + 32px)!important;height:40px!important;position:absolute!important;z-index:1!important;top:0!important;left:-16px!important;cursor:wait!important}div.coer-text-box mat-form-field .placeholder,div.coer-text-box mat-form-field .placeholder *,div.coer-text-box mat-form-field .placeholder-glow,div.coer-text-box mat-form-field .placeholder-glow *{cursor:wait!important}div.coer-text-box mat-form-field.readonly div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:#bbbbbb83!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:transparent!important;padding-left:9px!important;padding-right:9px!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple,coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple:before,coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple:after{border-bottom-color:transparent!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex{height:28px!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{height:28px!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input{margin-top:3px!important;font-size:14px!important}coer-grid table tbody tr td.coer-textbox mat-form-field span.icon-container{transform:translate(-5px,-6px)!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2$4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }] }); }
|
3166
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerSecretBox, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
3167
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerSecretBox, isStandalone: false, selector: "coer-secretbox", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, textPosition: { classPropertyName: "textPosition", publicName: "textPosition", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, isInvalid: { classPropertyName: "isInvalid", publicName: "isInvalid", isSignal: true, isRequired: false, transformFunction: null }, isValid: { classPropertyName: "isValid", publicName: "isValid", isSignal: true, isRequired: false, transformFunction: null }, showSecret: { classPropertyName: "showSecret", publicName: "showSecret", isSignal: true, isRequired: false, transformFunction: null }, selectOnFocus: { classPropertyName: "selectOnFocus", publicName: "selectOnFocus", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: true, isRequired: false, transformFunction: null }, isInvisible: { classPropertyName: "isInvisible", publicName: "isInvisible", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, marginTop: { classPropertyName: "marginTop", publicName: "marginTop", isSignal: true, isRequired: false, transformFunction: null }, marginRight: { classPropertyName: "marginRight", publicName: "marginRight", isSignal: true, isRequired: false, transformFunction: null }, marginBottom: { classPropertyName: "marginBottom", publicName: "marginBottom", isSignal: true, isRequired: false, transformFunction: null }, marginLeft: { classPropertyName: "marginLeft", publicName: "marginLeft", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onKeyupEnter: "onKeyupEnter", onInput: "onInput", onClickClear: "onClickClear", onClickExternalButton: "onClickExternalButton" }, providers: [CONTROL_VALUE(CoerSecretBox)], viewQueries: [{ propertyName: "matFormField", first: true, predicate: ["matFormField"], descendants: true, isSignal: true }, { propertyName: "coerTextBox", first: true, predicate: ["coerTextBox"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"coer-text-box\">\r\n <mat-form-field\r\n [id]=\"_id + '-container'\"\r\n [floatLabel]=\"_floatLabel()\"\r\n [ngClass]=\"{\r\n 'readonly': isReadonly() && !isLoading(),\r\n 'd-none': isInvisible()\r\n }\"\r\n [style]=\"{\r\n 'width': width(),\r\n 'min-width': minWidth(),\r\n 'max-width': maxWidth(),\r\n 'margin-top': marginTop(),\r\n 'margin-right': marginRight(),\r\n 'margin-bottom': marginBottom(),\r\n 'margin-left': marginLeft()\r\n }\">\r\n <mat-label>{{ label() }}</mat-label>\r\n \r\n <input #coerTextBox matInput\r\n [id]=\"_id\"\r\n [type]=\"_passwordType ? 'password': 'text'\"\r\n [placeholder]=\"placeholder()\"\r\n [minLength]=\"minLength()\"\r\n [maxLength]=\"maxLength()\"\r\n [disabled]=\"!_isEnable()\"\r\n [value]=\"_value\"\r\n (input)=\"SetValue(coerTextBox.value)\"\r\n (blur)=\"SetTouched(true)\"\r\n [style]=\"{\r\n 'cursor': isLoading() ? 'wait' : null,\r\n 'margin-top': (_floatLabel() == 'auto') ? '15px' : '9px',\r\n 'padding-right': _paddingRight(),\r\n 'text-align': textPosition()\r\n }\">\r\n\r\n @if(isLoading()) {\r\n <div class=\"placeholder-glow\">\r\n <span class=\"placeholder\"></span>\r\n </div>\r\n }\r\n\r\n <span class=\"icon-container\"> \r\n @if(isInvalid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-exclamation\"></i>\r\n }\r\n\r\n @else if(isValid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-check text-green\"></i>\r\n }\r\n\r\n @if(_showSecret) {\r\n <i [ngClass]=\"{\r\n 'fa-solid cursor-pointer': true, \r\n 'fa-eye-slash': passwordType,\r\n 'fa-eye': !passwordType\r\n }\" \r\n [ngStyle]=\"{\r\n 'margin-right': isInvalid() || isValid() ? '25px' : '0px'\r\n }\"\r\n (click)=\"passwordType = !passwordType\"></i> \r\n }\r\n </span>\r\n </mat-form-field> \r\n\r\n @if(isInvisible()) {\r\n <mat-form-field class=\"invisible\">\r\n <input matInput [disabled]=\"true\"> \r\n </mat-form-field> \r\n } \r\n</div> ", styles: ["div.coer-text-box{display:flex;align-items:center}div.coer-text-box mat-form-field{position:relative!important}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex{height:40px!important}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{width:100%!important;height:40px!important;padding:0!important}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label{overflow:visible!important;position:absolute!important;top:20px!important}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label.mdc-floating-label--float-above mat-label{color:var(--primary-inner);font-weight:700;position:relative;left:-10px;top:2px}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input{font-weight:400!important;font-size:17px!important;color:var(--black)!important}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active,div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:before,div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:after{border-bottom-color:var(--primary-inner)!important}div.coer-text-box mat-form-field div.mat-mdc-form-field-subscript-wrapper.mat-mdc-form-field-bottom-align{height:0px!important}div.coer-text-box mat-form-field span.icon-container{position:absolute!important;top:1px!important;right:-14px!important;z-index:5!important;width:30px;height:40px;display:flex;align-items:center;justify-content:center;gap:5px}div.coer-text-box mat-form-field span.icon-container i{font-size:20px!important}div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-eye-slash,div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-eye{color:#caced1!important;cursor:pointer!important}div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-eye-slash:hover,div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-eye:hover{color:#6c757d!important}div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-circle-check{color:var(--green)!important}div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-circle-exclamation{color:var(--red)!important}div.coer-text-box mat-form-field span.placeholder{width:calc(100% + 32px)!important;height:40px!important;position:absolute!important;z-index:1!important;top:0!important;left:-16px!important;cursor:wait!important}div.coer-text-box mat-form-field .placeholder,div.coer-text-box mat-form-field .placeholder *,div.coer-text-box mat-form-field .placeholder-glow,div.coer-text-box mat-form-field .placeholder-glow *{cursor:wait!important}div.coer-text-box mat-form-field.readonly div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:#bbbbbb83!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:transparent!important;padding-left:9px!important;padding-right:9px!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple,coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple:before,coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple:after{border-bottom-color:transparent!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex{height:28px!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{height:28px!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input{margin-top:3px!important;font-size:14px!important}coer-grid table tbody tr td.coer-textbox mat-form-field span.icon-container{transform:translate(-5px,-6px)!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2$4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }] }); }
|
3162
3168
|
}
|
3163
3169
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerSecretBox, decorators: [{
|
3164
3170
|
type: Component,
|
3165
3171
|
args: [{ selector: 'coer-secretbox', providers: [CONTROL_VALUE(CoerSecretBox)], standalone: false, template: "<div class=\"coer-text-box\">\r\n <mat-form-field\r\n [id]=\"_id + '-container'\"\r\n [floatLabel]=\"_floatLabel()\"\r\n [ngClass]=\"{\r\n 'readonly': isReadonly() && !isLoading(),\r\n 'd-none': isInvisible()\r\n }\"\r\n [style]=\"{\r\n 'width': width(),\r\n 'min-width': minWidth(),\r\n 'max-width': maxWidth(),\r\n 'margin-top': marginTop(),\r\n 'margin-right': marginRight(),\r\n 'margin-bottom': marginBottom(),\r\n 'margin-left': marginLeft()\r\n }\">\r\n <mat-label>{{ label() }}</mat-label>\r\n \r\n <input #coerTextBox matInput\r\n [id]=\"_id\"\r\n [type]=\"_passwordType ? 'password': 'text'\"\r\n [placeholder]=\"placeholder()\"\r\n [minLength]=\"minLength()\"\r\n [maxLength]=\"maxLength()\"\r\n [disabled]=\"!_isEnable()\"\r\n [value]=\"_value\"\r\n (input)=\"SetValue(coerTextBox.value)\"\r\n (blur)=\"SetTouched(true)\"\r\n [style]=\"{\r\n 'cursor': isLoading() ? 'wait' : null,\r\n 'margin-top': (_floatLabel() == 'auto') ? '15px' : '9px',\r\n 'padding-right': _paddingRight(),\r\n 'text-align': textPosition()\r\n }\">\r\n\r\n @if(isLoading()) {\r\n <div class=\"placeholder-glow\">\r\n <span class=\"placeholder\"></span>\r\n </div>\r\n }\r\n\r\n <span class=\"icon-container\"> \r\n @if(isInvalid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-exclamation\"></i>\r\n }\r\n\r\n @else if(isValid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-check text-green\"></i>\r\n }\r\n\r\n @if(_showSecret) {\r\n <i [ngClass]=\"{\r\n 'fa-solid cursor-pointer': true, \r\n 'fa-eye-slash': passwordType,\r\n 'fa-eye': !passwordType\r\n }\" \r\n [ngStyle]=\"{\r\n 'margin-right': isInvalid() || isValid() ? '25px' : '0px'\r\n }\"\r\n (click)=\"passwordType = !passwordType\"></i> \r\n }\r\n </span>\r\n </mat-form-field> \r\n\r\n @if(isInvisible()) {\r\n <mat-form-field class=\"invisible\">\r\n <input matInput [disabled]=\"true\"> \r\n </mat-form-field> \r\n } \r\n</div> ", styles: ["div.coer-text-box{display:flex;align-items:center}div.coer-text-box mat-form-field{position:relative!important}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex{height:40px!important}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{width:100%!important;height:40px!important;padding:0!important}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label{overflow:visible!important;position:absolute!important;top:20px!important}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label.mdc-floating-label--float-above mat-label{color:var(--primary-inner);font-weight:700;position:relative;left:-10px;top:2px}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input{font-weight:400!important;font-size:17px!important;color:var(--black)!important}div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active,div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:before,div.coer-text-box mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:after{border-bottom-color:var(--primary-inner)!important}div.coer-text-box mat-form-field div.mat-mdc-form-field-subscript-wrapper.mat-mdc-form-field-bottom-align{height:0px!important}div.coer-text-box mat-form-field span.icon-container{position:absolute!important;top:1px!important;right:-14px!important;z-index:5!important;width:30px;height:40px;display:flex;align-items:center;justify-content:center;gap:5px}div.coer-text-box mat-form-field span.icon-container i{font-size:20px!important}div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-eye-slash,div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-eye{color:#caced1!important;cursor:pointer!important}div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-eye-slash:hover,div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-eye:hover{color:#6c757d!important}div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-circle-check{color:var(--green)!important}div.coer-text-box mat-form-field span.icon-container i.fa-solid.fa-circle-exclamation{color:var(--red)!important}div.coer-text-box mat-form-field span.placeholder{width:calc(100% + 32px)!important;height:40px!important;position:absolute!important;z-index:1!important;top:0!important;left:-16px!important;cursor:wait!important}div.coer-text-box mat-form-field .placeholder,div.coer-text-box mat-form-field .placeholder *,div.coer-text-box mat-form-field .placeholder-glow,div.coer-text-box mat-form-field .placeholder-glow *{cursor:wait!important}div.coer-text-box mat-form-field.readonly div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:#bbbbbb83!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:transparent!important;padding-left:9px!important;padding-right:9px!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple,coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple:before,coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple:after{border-bottom-color:transparent!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex{height:28px!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{height:28px!important}coer-grid table tbody tr td.coer-textbox mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix input{margin-top:3px!important;font-size:14px!important}coer-grid table tbody tr td.coer-textbox mat-form-field span.icon-container{transform:translate(-5px,-6px)!important}\n"] }]
|
3166
|
-
}],
|
3167
|
-
type: Input
|
3168
|
-
}] } });
|
3172
|
+
}], ctorParameters: () => [] });
|
3169
3173
|
|
3170
3174
|
class CoerPageTitle {
|
3175
|
+
//Constructor
|
3171
3176
|
constructor() {
|
3177
|
+
//Variables
|
3178
|
+
this._iconRoot = 'icon-fill icon-house';
|
3172
3179
|
//Inputs
|
3173
3180
|
this.title = input(null);
|
3174
3181
|
this.showBreadcrumbs = input(true);
|
@@ -3177,83 +3184,86 @@ class CoerPageTitle {
|
|
3177
3184
|
this.information = input({ show: false });
|
3178
3185
|
//Outputs
|
3179
3186
|
this.onClickInformation = output();
|
3180
|
-
|
3181
|
-
|
3182
|
-
|
3187
|
+
//computed
|
3188
|
+
this._tooltip = computed(() => {
|
3189
|
+
return Tools.IsNotOnlyWhiteSpace(this.information()?.tooltip)
|
3190
|
+
? this.information().tooltip : 'Information';
|
3191
|
+
});
|
3183
3192
|
const MENU = Menu.GetSelectedOption();
|
3184
3193
|
if (MENU) {
|
3185
3194
|
const MENU_SELECTED = MENU.tree.shift();
|
3186
3195
|
if (MENU_SELECTED && MENU_SELECTED.icon) {
|
3187
|
-
|
3196
|
+
this._iconRoot = MENU_SELECTED.icon;
|
3188
3197
|
}
|
3189
3198
|
}
|
3190
|
-
return 'bi bi-house-door-fill';
|
3191
|
-
}
|
3192
|
-
//getter
|
3193
|
-
get _tooltip() {
|
3194
|
-
return Tools.IsNotNull(this.information())
|
3195
|
-
&& Tools.IsNotOnlyWhiteSpace(this.information()?.tooltip)
|
3196
|
-
? this.information().tooltip : 'Information';
|
3197
3199
|
}
|
3198
3200
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerPageTitle, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
3199
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerPageTitle, isStandalone: false, selector: "coer-page-title", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, showBreadcrumbs: { classPropertyName: "showBreadcrumbs", publicName: "showBreadcrumbs", isSignal: true, isRequired: false, transformFunction: null }, breadcrumbs: { classPropertyName: "breadcrumbs", publicName: "breadcrumbs", isSignal: true, isRequired: false, transformFunction: null }, goBack: { classPropertyName: "goBack", publicName: "goBack", isSignal: true, isRequired: false, transformFunction: null }, information: { classPropertyName: "information", publicName: "information", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClickInformation: "onClickInformation" }, ngImport: i0, template: "<header class=\"coer-page-title\" title=''>\r\n <h2>\r\n <span> {{ title() }} </span>\r\n\r\n <!-- Button Information -->\r\n @if(information().show) {\r\n <
|
3201
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerPageTitle, isStandalone: false, selector: "coer-page-title", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, showBreadcrumbs: { classPropertyName: "showBreadcrumbs", publicName: "showBreadcrumbs", isSignal: true, isRequired: false, transformFunction: null }, breadcrumbs: { classPropertyName: "breadcrumbs", publicName: "breadcrumbs", isSignal: true, isRequired: false, transformFunction: null }, goBack: { classPropertyName: "goBack", publicName: "goBack", isSignal: true, isRequired: false, transformFunction: null }, information: { classPropertyName: "information", publicName: "information", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClickInformation: "onClickInformation" }, ngImport: i0, template: "<header class=\"coer-page-title\" title=''>\r\n <h2>\r\n <span> {{ title() }} </span>\r\n\r\n <!-- Button Information -->\r\n @if(information().show) {\r\n <button mat-icon-button\r\n [matTooltip]=\"_tooltip()\"\r\n matTooltipPosition=\"before\"\r\n [matTooltipDisabled]=\"false\"\r\n [matTooltipHideDelay]=\"0\"\r\n type=\"button\"\r\n (click)=\"onClickInformation.emit()\">\r\n <i class=\"icon-circle-info\"></i>\r\n </button>\r\n }\r\n </h2>\r\n\r\n <!-- Navigation -->\r\n @if(showBreadcrumbs()) {\r\n <nav> \r\n <a class=\"breadcrumb-root\">\r\n <i [class]=\"_iconRoot\"></i>\r\n </a>\r\n \r\n <!-- Breadcrumbs -->\r\n <div class=\"breadcrumbs\"> \r\n <a *ngFor=\"let nav of breadcrumbs()\" [routerLink]='(nav.path && nav.path.length > 0) ? nav.path : null'\r\n [queryParams]='nav.queryParams'\r\n (click)=\"(nav.click) ? nav.click() : null\">\r\n {{ nav.page }}\r\n </a>\r\n </div>\r\n \r\n\r\n <!-- Go Back -->\r\n @if(goBack().show) {\r\n <a class=\"go-back\"\r\n [routerLink]=\"goBack().path\"\r\n [queryParams]='goBack().queryParams'\r\n (click)=\"(goBack().click) ? goBack().click!() : null\">\r\n Go back\r\n </a> \r\n }\r\n </nav>\r\n }\r\n</header> ", styles: ["header.coer-page-title{margin:15px 30px 0}header.coer-page-title h2{margin:0 0 10px;display:flex;align-items:center;justify-content:space-between;height:20px;font-size:20px}header.coer-page-title h2 span{font-size:20px!important}header.coer-page-title h2 button{font-size:17px!important;display:flex!important;align-items:center!important;justify-content:center!important;color:var(--breadcrumbs-inner)!important;background-color:transparent!important;padding:0!important;width:25px!important;height:25px!important;border:none!important}header.coer-page-title h2 button:focus{box-shadow:0 0 20px!important}header.coer-page-title nav{height:auto!important;min-height:25px!important;font-size:small!important;background-color:color-mix(in srgb,var(--gray),white 90%)!important;display:flex!important;align-items:center!important;justify-content:space-between!important}header.coer-page-title nav a{margin:0!important;display:flex!important;justify-content:center!important;padding:0 5px!important;text-decoration:none!important;color:var(--breadcrumbs-inner)!important;font-weight:400!important;font-size:14px!important;cursor:pointer!important}header.coer-page-title nav a.breadcrumb-root{padding-left:5px!important}header.coer-page-title nav div.breadcrumbs{display:flex!important;flex-wrap:wrap!important;align-items:center!important;flex-grow:1!important}header.coer-page-title nav div.breadcrumbs a:before{content:\"/\";width:10px}header.coer-page-title nav a.go-back{min-width:80px!important;justify-content:flex-end!important}header.coer-page-title ol::selection,header.coer-page-title a::selection{background-color:transparent!important}header.coer-page-title li{border:none}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] }); }
|
3200
3202
|
}
|
3201
3203
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerPageTitle, decorators: [{
|
3202
3204
|
type: Component,
|
3203
|
-
args: [{ selector: 'coer-page-title', standalone: false, template: "<header class=\"coer-page-title\" title=''>\r\n <h2>\r\n <span> {{ title() }} </span>\r\n\r\n <!-- Button Information -->\r\n @if(information().show) {\r\n <
|
3204
|
-
}] });
|
3205
|
+
args: [{ selector: 'coer-page-title', standalone: false, template: "<header class=\"coer-page-title\" title=''>\r\n <h2>\r\n <span> {{ title() }} </span>\r\n\r\n <!-- Button Information -->\r\n @if(information().show) {\r\n <button mat-icon-button\r\n [matTooltip]=\"_tooltip()\"\r\n matTooltipPosition=\"before\"\r\n [matTooltipDisabled]=\"false\"\r\n [matTooltipHideDelay]=\"0\"\r\n type=\"button\"\r\n (click)=\"onClickInformation.emit()\">\r\n <i class=\"icon-circle-info\"></i>\r\n </button>\r\n }\r\n </h2>\r\n\r\n <!-- Navigation -->\r\n @if(showBreadcrumbs()) {\r\n <nav> \r\n <a class=\"breadcrumb-root\">\r\n <i [class]=\"_iconRoot\"></i>\r\n </a>\r\n \r\n <!-- Breadcrumbs -->\r\n <div class=\"breadcrumbs\"> \r\n <a *ngFor=\"let nav of breadcrumbs()\" [routerLink]='(nav.path && nav.path.length > 0) ? nav.path : null'\r\n [queryParams]='nav.queryParams'\r\n (click)=\"(nav.click) ? nav.click() : null\">\r\n {{ nav.page }}\r\n </a>\r\n </div>\r\n \r\n\r\n <!-- Go Back -->\r\n @if(goBack().show) {\r\n <a class=\"go-back\"\r\n [routerLink]=\"goBack().path\"\r\n [queryParams]='goBack().queryParams'\r\n (click)=\"(goBack().click) ? goBack().click!() : null\">\r\n Go back\r\n </a> \r\n }\r\n </nav>\r\n }\r\n</header> ", styles: ["header.coer-page-title{margin:15px 30px 0}header.coer-page-title h2{margin:0 0 10px;display:flex;align-items:center;justify-content:space-between;height:20px;font-size:20px}header.coer-page-title h2 span{font-size:20px!important}header.coer-page-title h2 button{font-size:17px!important;display:flex!important;align-items:center!important;justify-content:center!important;color:var(--breadcrumbs-inner)!important;background-color:transparent!important;padding:0!important;width:25px!important;height:25px!important;border:none!important}header.coer-page-title h2 button:focus{box-shadow:0 0 20px!important}header.coer-page-title nav{height:auto!important;min-height:25px!important;font-size:small!important;background-color:color-mix(in srgb,var(--gray),white 90%)!important;display:flex!important;align-items:center!important;justify-content:space-between!important}header.coer-page-title nav a{margin:0!important;display:flex!important;justify-content:center!important;padding:0 5px!important;text-decoration:none!important;color:var(--breadcrumbs-inner)!important;font-weight:400!important;font-size:14px!important;cursor:pointer!important}header.coer-page-title nav a.breadcrumb-root{padding-left:5px!important}header.coer-page-title nav div.breadcrumbs{display:flex!important;flex-wrap:wrap!important;align-items:center!important;flex-grow:1!important}header.coer-page-title nav div.breadcrumbs a:before{content:\"/\";width:10px}header.coer-page-title nav a.go-back{min-width:80px!important;justify-content:flex-end!important}header.coer-page-title ol::selection,header.coer-page-title a::selection{background-color:transparent!important}header.coer-page-title li{border:none}\n"] }]
|
3206
|
+
}], ctorParameters: () => [] });
|
3205
3207
|
|
3206
3208
|
class CoerTreeAccordion {
|
3207
3209
|
constructor() {
|
3210
|
+
//Elements
|
3211
|
+
this.expansionPanel = viewChild.required('expansionPanel');
|
3212
|
+
this.menuList = viewChildren(CoerTreeAccordion);
|
3208
3213
|
//Variables
|
3209
3214
|
this.isExpanded = false;
|
3210
3215
|
this.isCollapsed = true;
|
3211
3216
|
//Inputs
|
3212
|
-
this.level = 1;
|
3213
|
-
this.
|
3214
|
-
this.
|
3217
|
+
this.level = input(1);
|
3218
|
+
this.item = input.required();
|
3219
|
+
this.tree = input([]);
|
3220
|
+
this.showTree = input(true);
|
3215
3221
|
//Outputs
|
3216
|
-
this.showGridMenu =
|
3217
|
-
this.clickMenuOption =
|
3218
|
-
this.clickMenu =
|
3222
|
+
this.showGridMenu = output();
|
3223
|
+
this.clickMenuOption = output();
|
3224
|
+
this.clickMenu = output();
|
3225
|
+
//computed
|
3226
|
+
this._tree = computed(() => {
|
3227
|
+
return [...this.tree()].concat([{ ...this.item() }]);
|
3228
|
+
});
|
3229
|
+
//computed
|
3230
|
+
this._icon = computed(() => {
|
3231
|
+
return this.item() && Tools.IsNotOnlyWhiteSpace(this.item()?.icon)
|
3232
|
+
? this.item().icon : 'coer-icon-bars';
|
3233
|
+
});
|
3234
|
+
//computed
|
3235
|
+
this._marginLeft = computed(() => {
|
3236
|
+
return `${(this.level() - 1) * 20}px`;
|
3237
|
+
});
|
3238
|
+
//computed
|
3239
|
+
this._identityClass = computed(() => {
|
3240
|
+
let identity = '';
|
3241
|
+
for (let i = 0; i < this.tree().length; i++) {
|
3242
|
+
identity += `lv${i + 1}${this.tree()[i].label}-`;
|
3243
|
+
}
|
3244
|
+
identity += `lv${this.level()}${this.item().label}`;
|
3245
|
+
if (identity.includes(' '))
|
3246
|
+
identity = identity.replaceAll(' ', '');
|
3247
|
+
return identity.toLowerCase();
|
3248
|
+
});
|
3219
3249
|
/** */
|
3220
|
-
this.
|
3221
|
-
return (this.isExpanded && this.level > 1)
|
3250
|
+
this._IsActive = (element) => {
|
3251
|
+
return (this.isExpanded && this.level() > 1)
|
3222
3252
|
|| (this.isCollapsed && element.classList.contains('active-link'));
|
3223
3253
|
};
|
3224
3254
|
/** */
|
3225
|
-
this.
|
3255
|
+
this._IsMenu = (item) => Tools.IsNotNull(item) && Tools.IsNotOnlyWhiteSpace(item?.items);
|
3226
3256
|
/** */
|
3227
|
-
this.
|
3257
|
+
this._IsGrid = (item) => Tools.IsNotNull(item) && Tools.IsNotOnlyWhiteSpace(item?.show) && item.show === 'GRID';
|
3228
3258
|
/** */
|
3229
|
-
this.
|
3230
|
-
}
|
3231
|
-
get _tree() {
|
3232
|
-
return [...this.tree].concat([{ ...this.item }]);
|
3233
|
-
}
|
3234
|
-
get _icon() {
|
3235
|
-
return (this.item && Tools.IsNotOnlyWhiteSpace(this.item?.icon) && this.item.icon.length > 0)
|
3236
|
-
? this.item.icon : 'coer-icon-bars';
|
3237
|
-
}
|
3238
|
-
get marginLeft() {
|
3239
|
-
return `${(this.level - 1) * 20}px`;
|
3240
|
-
}
|
3241
|
-
get identityClass() {
|
3242
|
-
let identity = '';
|
3243
|
-
for (let i = 0; i < this.tree.length; i++) {
|
3244
|
-
identity += `lv${i + 1}${this.tree[i].label}-`;
|
3245
|
-
}
|
3246
|
-
identity += `lv${this.level}${this.item.label}`;
|
3247
|
-
if (identity.includes(' '))
|
3248
|
-
identity = identity.replaceAll(' ', '');
|
3249
|
-
return identity.toLowerCase();
|
3259
|
+
this._GetGridIcon = (icon) => Tools.IsNotOnlyWhiteSpace(icon) ? icon : 'fa-solid fa-grip';
|
3250
3260
|
}
|
3251
3261
|
/** */
|
3252
3262
|
Close() {
|
3253
3263
|
if (this.isExpanded) {
|
3254
3264
|
this.isExpanded = false;
|
3255
3265
|
this.isCollapsed = true;
|
3256
|
-
this.expansionPanel.close();
|
3266
|
+
this.expansionPanel().close();
|
3257
3267
|
}
|
3258
3268
|
}
|
3259
3269
|
/** */
|
@@ -3261,12 +3271,12 @@ class CoerTreeAccordion {
|
|
3261
3271
|
if (this.isCollapsed) {
|
3262
3272
|
this.isExpanded = true;
|
3263
3273
|
this.isCollapsed = false;
|
3264
|
-
this.expansionPanel.open();
|
3274
|
+
this.expansionPanel().open();
|
3265
3275
|
}
|
3266
3276
|
}
|
3267
3277
|
/** */
|
3268
|
-
|
3269
|
-
if (this.showTree) {
|
3278
|
+
_Toggle() {
|
3279
|
+
if (this.showTree()) {
|
3270
3280
|
this.isExpanded = !this.isExpanded;
|
3271
3281
|
this.isCollapsed = !this.isCollapsed;
|
3272
3282
|
}
|
@@ -3276,19 +3286,19 @@ class CoerTreeAccordion {
|
|
3276
3286
|
Source.Reset();
|
3277
3287
|
}
|
3278
3288
|
this.clickMenu.emit({
|
3279
|
-
level: this.level,
|
3280
|
-
label: this.item.label,
|
3289
|
+
level: this.level(),
|
3290
|
+
label: this.item().label,
|
3281
3291
|
isExpanded: this.isExpanded,
|
3282
3292
|
isCollapsed: this.isCollapsed,
|
3283
|
-
items: this.item.items,
|
3284
|
-
icon: this._icon,
|
3285
|
-
tree: [...this._tree]
|
3293
|
+
items: this.item().items,
|
3294
|
+
icon: this._icon(),
|
3295
|
+
tree: [...this._tree()]
|
3286
3296
|
});
|
3287
3297
|
}
|
3288
3298
|
/** */
|
3289
|
-
|
3290
|
-
for (const menu of this.menuList
|
3291
|
-
if (menu.item.label != menuOption.tree[this.level].label) {
|
3299
|
+
_ClickMenuOption(menuOption, showGridMenu = false) {
|
3300
|
+
for (const menu of this.menuList()) {
|
3301
|
+
if (menu.item().label != menuOption.tree[this.level()].label) {
|
3292
3302
|
menu.Close();
|
3293
3303
|
}
|
3294
3304
|
}
|
@@ -3298,80 +3308,61 @@ class CoerTreeAccordion {
|
|
3298
3308
|
this.clickMenuOption.emit(menuOption);
|
3299
3309
|
}
|
3300
3310
|
/** */
|
3301
|
-
|
3302
|
-
for (const menuLv2 of this.menuList
|
3303
|
-
if (menuLv2.item.label != menu.label)
|
3311
|
+
_ClickMenu(menu) {
|
3312
|
+
for (const menuLv2 of this.menuList()) {
|
3313
|
+
if (menuLv2.item().label != menu.label)
|
3304
3314
|
menuLv2.Close();
|
3305
3315
|
}
|
3306
3316
|
this.clickMenu.emit(menu);
|
3307
3317
|
}
|
3308
3318
|
/** */
|
3309
|
-
|
3319
|
+
_ShowGridMenu(menuOption, menu) {
|
3310
3320
|
menuSelectedSIGNAL.set({
|
3311
|
-
level: this.level + 1,
|
3321
|
+
level: this.level() + 1,
|
3312
3322
|
label: menu.label,
|
3313
|
-
icon: this.
|
3323
|
+
icon: this._GetGridIcon(menu.label),
|
3314
3324
|
isExpanded: true,
|
3315
3325
|
isCollapsed: false,
|
3316
3326
|
items: menu.items,
|
3317
3327
|
tree: []
|
3318
3328
|
});
|
3319
|
-
this.
|
3329
|
+
this._ClickMenuOption(menuOption, true);
|
3320
3330
|
}
|
3321
3331
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerTreeAccordion, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
3322
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerTreeAccordion, isStandalone: false, selector: "coer-tree-accordion", inputs: { level: "level", item: "item", tree: "tree", showTree: "showTree" }, outputs: { showGridMenu: "showGridMenu", clickMenuOption: "clickMenuOption", clickMenu: "clickMenu" }, viewQueries: [{ propertyName: "expansionPanel", first: true, predicate: ["expansionPanel"], descendants: true }, { propertyName: "menuList", predicate: CoerTreeAccordion, descendants: true }], ngImport: i0, template: "<mat-accordion class=\"coer-tree-accordion\">\r\n <mat-expansion-panel #expansionPanel [class]=\"'coer-tree-accordion-' +
|
3332
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerTreeAccordion, isStandalone: false, selector: "coer-tree-accordion", inputs: { level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null }, tree: { classPropertyName: "tree", publicName: "tree", isSignal: true, isRequired: false, transformFunction: null }, showTree: { classPropertyName: "showTree", publicName: "showTree", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { showGridMenu: "showGridMenu", clickMenuOption: "clickMenuOption", clickMenu: "clickMenu" }, viewQueries: [{ propertyName: "expansionPanel", first: true, predicate: ["expansionPanel"], descendants: true, isSignal: true }, { propertyName: "menuList", predicate: CoerTreeAccordion, descendants: true, isSignal: true }], ngImport: i0, template: "<mat-accordion class=\"coer-tree-accordion\">\r\n <mat-expansion-panel #expansionPanel [class]=\"'coer-tree-accordion-' + _identityClass()\">\r\n\r\n <!-- Header -->\r\n <mat-expansion-panel-header (click)=\"_Toggle()\"\r\n [class]=\"_identityClass()\"\r\n [ngClass]=\"{\r\n 'background-navigation': (isExpanded && level() == 1),\r\n 'text-sidenav-active': _IsActive(iconContainer)\r\n }\">\r\n <mat-panel-description>\r\n <span #iconContainer\r\n [ngStyle]=\"{ 'margin-left': _marginLeft() }\"\r\n [class]=\"_identityClass()\"\r\n [ngClass]=\"{\r\n 'icon-container': true,\r\n 'text-sidenav-active': _IsActive(iconContainer)\r\n }\"> <i [class]=\"_icon()\"></i> </span>\r\n\r\n <span #labelContainer\r\n [class]=\"_identityClass()\"\r\n [ngClass]=\"{\r\n 'label-container': true,\r\n 'text-sidenav-active': _IsActive(labelContainer)\r\n }\"> {{ item().label }} </span>\r\n </mat-panel-description>\r\n </mat-expansion-panel-header>\r\n\r\n\r\n @if(showTree()) { \r\n <div *ngFor=\"let subItem of item().items\">\r\n @if(_IsMenu(subItem)) {\r\n <!-- Sub Menu -->\r\n @if(_IsGrid(subItem)) {\r\n <coer-menu-option\r\n [label]=\"subItem.label\"\r\n [icon]=\"_GetGridIcon(subItem!.icon)\"\r\n path='menu'\r\n [level]=\"level() + 1\"\r\n [tree]=\"_tree()\"\r\n (clickMenuOption)=\"_ShowGridMenu($event, subItem)\"\r\n ></coer-menu-option>\r\n }\r\n \r\n @else {\r\n <coer-tree-accordion\r\n [level]=\"level() + 1\"\r\n [item]=\"subItem\"\r\n [tree]=\"_tree()\"\r\n (clickMenuOption)=\"_ClickMenuOption($event)\"\r\n (clickMenu)=\"_ClickMenu($event)\"\r\n ></coer-tree-accordion> \r\n }\r\n }\r\n\r\n @else {\r\n <!-- Option Menu --> \r\n <coer-menu-option\r\n [label]=\"subItem.label\"\r\n [icon]=\"subItem?.icon\"\r\n [path]=\"subItem?.path\"\r\n [level]=\"level() + 1\"\r\n [tree]=\"_tree()\"\r\n (clickMenuOption)=\"_ClickMenuOption($event)\"\r\n ></coer-menu-option>\r\n } \r\n\r\n <div class=\"separator\"></div>\r\n </div>\r\n }\r\n </mat-expansion-panel>\r\n</mat-accordion>", styles: ["mat-accordion.coer-tree-accordion div,mat-accordion.coer-tree-accordion span{font-size:16px!important;font-family:sans-serif!important;font-weight:700}mat-accordion.coer-tree-accordion mat-expansion-panel{background-color:var(--sidenav-inner)!important;box-shadow:none!important;border-radius:0!important}mat-accordion.coer-tree-accordion mat-expansion-panel div.mat-expansion-panel-body{padding:0!important}mat-accordion.coer-tree-accordion mat-expansion-panel div.separator{border:.5px solid rgba(245,245,245,.041)!important}mat-accordion.coer-tree-accordion mat-expansion-panel span::selection{background-color:transparent!important}mat-accordion.coer-tree-accordion mat-expansion-panel mat-expansion-panel-header{padding:0 10px;height:48px!important}mat-accordion.coer-tree-accordion mat-expansion-panel mat-expansion-panel-header span.mat-content mat-panel-description{margin-right:0!important}mat-accordion.coer-tree-accordion mat-expansion-panel mat-expansion-panel-header span.mat-content mat-panel-description span.icon-container{height:48px!important;min-width:20px!important;max-width:20px!important;display:flex!important;align-items:center!important;justify-content:center!important;color:var(--sidenav-text-inner)}mat-accordion.coer-tree-accordion mat-expansion-panel mat-expansion-panel-header span.mat-content mat-panel-description span.label-container{height:48px!important;margin-left:10px!important;display:flex!important;align-items:center!important;color:var(--sidenav-text-inner)}mat-accordion.coer-tree-accordion mat-expansion-panel mat-expansion-panel-header span.mat-expansion-indicator{width:10px!important;margin-left:15px!important}mat-accordion.coer-tree-accordion mat-expansion-panel mat-expansion-panel-header span.mat-expansion-indicator:after{color:var(--sidenav-text-inner)!important}mat-accordion.coer-tree-accordion mat-expansion-panel mat-expansion-panel-header.text-sidenav-active span.mat-expansion-indicator:after{color:var(--sidenav-active-inner)!important}mat-accordion.coer-tree-accordion mat-expansion-panel mat-expansion-panel-header.cdk-focused{background-color:var(--sidenav-inner)!important}mat-accordion.coer-tree-accordion mat-expansion-panel mat-expansion-panel-header.mat-expanded{background-color:var(--sidenav-active-inner)!important}mat-accordion.coer-tree-accordion mat-expansion-panel mat-expansion-panel-header.background-navigation:hover{background-color:color-mix(in srgb,var(--sidenav-active-inner),white 5%)!important}mat-accordion.coer-tree-accordion mat-expansion-panel mat-expansion-panel mat-expansion-panel-header.mat-expanded{background-color:var(--sidenav-inner)!important}mat-accordion.coer-tree-accordion mat-expansion-panel mat-expansion-panel-header:not(.background-navigation):hover,mat-accordion.coer-tree-accordion mat-expansion-panel mat-expansion-panel mat-expansion-panel-header:not(.background-navigation):hover{background-color:color-mix(in srgb,var(--sidenav-inner),white 5%)!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.MatAccordion, selector: "mat-accordion", inputs: ["hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i2.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i2.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: i2.MatExpansionPanelDescription, selector: "mat-panel-description" }, { kind: "component", type: CoerMenuOption, selector: "coer-menu-option", inputs: ["level", "label", "icon", "path", "tree"], outputs: ["clickMenuOption"] }, { kind: "component", type: CoerTreeAccordion, selector: "coer-tree-accordion", inputs: ["level", "item", "tree", "showTree"], outputs: ["showGridMenu", "clickMenuOption", "clickMenu"] }] }); }
|
3323
3333
|
}
|
3324
3334
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerTreeAccordion, decorators: [{
|
3325
3335
|
type: Component,
|
3326
|
-
args: [{ selector: 'coer-tree-accordion', standalone: false, template: "<mat-accordion class=\"coer-tree-accordion\">\r\n <mat-expansion-panel #expansionPanel [class]=\"'coer-tree-accordion-' +
|
3327
|
-
}]
|
3328
|
-
type: ViewChild,
|
3329
|
-
args: ['expansionPanel']
|
3330
|
-
}], menuList: [{
|
3331
|
-
type: ViewChildren,
|
3332
|
-
args: [CoerTreeAccordion]
|
3333
|
-
}], level: [{
|
3334
|
-
type: Input
|
3335
|
-
}], item: [{
|
3336
|
-
type: Input
|
3337
|
-
}], tree: [{
|
3338
|
-
type: Input
|
3339
|
-
}], showTree: [{
|
3340
|
-
type: Input
|
3341
|
-
}], showGridMenu: [{
|
3342
|
-
type: Output
|
3343
|
-
}], clickMenuOption: [{
|
3344
|
-
type: Output
|
3345
|
-
}], clickMenu: [{
|
3346
|
-
type: Output
|
3347
|
-
}] } });
|
3336
|
+
args: [{ selector: 'coer-tree-accordion', standalone: false, template: "<mat-accordion class=\"coer-tree-accordion\">\r\n <mat-expansion-panel #expansionPanel [class]=\"'coer-tree-accordion-' + _identityClass()\">\r\n\r\n <!-- Header -->\r\n <mat-expansion-panel-header (click)=\"_Toggle()\"\r\n [class]=\"_identityClass()\"\r\n [ngClass]=\"{\r\n 'background-navigation': (isExpanded && level() == 1),\r\n 'text-sidenav-active': _IsActive(iconContainer)\r\n }\">\r\n <mat-panel-description>\r\n <span #iconContainer\r\n [ngStyle]=\"{ 'margin-left': _marginLeft() }\"\r\n [class]=\"_identityClass()\"\r\n [ngClass]=\"{\r\n 'icon-container': true,\r\n 'text-sidenav-active': _IsActive(iconContainer)\r\n }\"> <i [class]=\"_icon()\"></i> </span>\r\n\r\n <span #labelContainer\r\n [class]=\"_identityClass()\"\r\n [ngClass]=\"{\r\n 'label-container': true,\r\n 'text-sidenav-active': _IsActive(labelContainer)\r\n }\"> {{ item().label }} </span>\r\n </mat-panel-description>\r\n </mat-expansion-panel-header>\r\n\r\n\r\n @if(showTree()) { \r\n <div *ngFor=\"let subItem of item().items\">\r\n @if(_IsMenu(subItem)) {\r\n <!-- Sub Menu -->\r\n @if(_IsGrid(subItem)) {\r\n <coer-menu-option\r\n [label]=\"subItem.label\"\r\n [icon]=\"_GetGridIcon(subItem!.icon)\"\r\n path='menu'\r\n [level]=\"level() + 1\"\r\n [tree]=\"_tree()\"\r\n (clickMenuOption)=\"_ShowGridMenu($event, subItem)\"\r\n ></coer-menu-option>\r\n }\r\n \r\n @else {\r\n <coer-tree-accordion\r\n [level]=\"level() + 1\"\r\n [item]=\"subItem\"\r\n [tree]=\"_tree()\"\r\n (clickMenuOption)=\"_ClickMenuOption($event)\"\r\n (clickMenu)=\"_ClickMenu($event)\"\r\n ></coer-tree-accordion> \r\n }\r\n }\r\n\r\n @else {\r\n <!-- Option Menu --> \r\n <coer-menu-option\r\n [label]=\"subItem.label\"\r\n [icon]=\"subItem?.icon\"\r\n [path]=\"subItem?.path\"\r\n [level]=\"level() + 1\"\r\n [tree]=\"_tree()\"\r\n (clickMenuOption)=\"_ClickMenuOption($event)\"\r\n ></coer-menu-option>\r\n } \r\n\r\n <div class=\"separator\"></div>\r\n </div>\r\n }\r\n </mat-expansion-panel>\r\n</mat-accordion>", styles: ["mat-accordion.coer-tree-accordion div,mat-accordion.coer-tree-accordion span{font-size:16px!important;font-family:sans-serif!important;font-weight:700}mat-accordion.coer-tree-accordion mat-expansion-panel{background-color:var(--sidenav-inner)!important;box-shadow:none!important;border-radius:0!important}mat-accordion.coer-tree-accordion mat-expansion-panel div.mat-expansion-panel-body{padding:0!important}mat-accordion.coer-tree-accordion mat-expansion-panel div.separator{border:.5px solid rgba(245,245,245,.041)!important}mat-accordion.coer-tree-accordion mat-expansion-panel span::selection{background-color:transparent!important}mat-accordion.coer-tree-accordion mat-expansion-panel mat-expansion-panel-header{padding:0 10px;height:48px!important}mat-accordion.coer-tree-accordion mat-expansion-panel mat-expansion-panel-header span.mat-content mat-panel-description{margin-right:0!important}mat-accordion.coer-tree-accordion mat-expansion-panel mat-expansion-panel-header span.mat-content mat-panel-description span.icon-container{height:48px!important;min-width:20px!important;max-width:20px!important;display:flex!important;align-items:center!important;justify-content:center!important;color:var(--sidenav-text-inner)}mat-accordion.coer-tree-accordion mat-expansion-panel mat-expansion-panel-header span.mat-content mat-panel-description span.label-container{height:48px!important;margin-left:10px!important;display:flex!important;align-items:center!important;color:var(--sidenav-text-inner)}mat-accordion.coer-tree-accordion mat-expansion-panel mat-expansion-panel-header span.mat-expansion-indicator{width:10px!important;margin-left:15px!important}mat-accordion.coer-tree-accordion mat-expansion-panel mat-expansion-panel-header span.mat-expansion-indicator:after{color:var(--sidenav-text-inner)!important}mat-accordion.coer-tree-accordion mat-expansion-panel mat-expansion-panel-header.text-sidenav-active span.mat-expansion-indicator:after{color:var(--sidenav-active-inner)!important}mat-accordion.coer-tree-accordion mat-expansion-panel mat-expansion-panel-header.cdk-focused{background-color:var(--sidenav-inner)!important}mat-accordion.coer-tree-accordion mat-expansion-panel mat-expansion-panel-header.mat-expanded{background-color:var(--sidenav-active-inner)!important}mat-accordion.coer-tree-accordion mat-expansion-panel mat-expansion-panel-header.background-navigation:hover{background-color:color-mix(in srgb,var(--sidenav-active-inner),white 5%)!important}mat-accordion.coer-tree-accordion mat-expansion-panel mat-expansion-panel mat-expansion-panel-header.mat-expanded{background-color:var(--sidenav-inner)!important}mat-accordion.coer-tree-accordion mat-expansion-panel mat-expansion-panel-header:not(.background-navigation):hover,mat-accordion.coer-tree-accordion mat-expansion-panel mat-expansion-panel mat-expansion-panel-header:not(.background-navigation):hover{background-color:color-mix(in srgb,var(--sidenav-inner),white 5%)!important}\n"] }]
|
3337
|
+
}] });
|
3348
3338
|
|
3349
3339
|
class CoerSidenav {
|
3350
|
-
//
|
3351
|
-
get backdrop() {
|
3352
|
-
return ['xs', 'sm', 'md'].includes(breakpointSIGNAL());
|
3353
|
-
}
|
3354
|
-
//getter
|
3355
|
-
get mode() {
|
3356
|
-
return ['xs', 'sm', 'md'].includes(breakpointSIGNAL()) ? 'over' : 'push';
|
3357
|
-
}
|
3358
|
-
//getter
|
3359
|
-
get showAsideMenu() {
|
3360
|
-
return ['xl', 'xxl'].includes(breakpointSIGNAL()) && !this.isOpen();
|
3361
|
-
}
|
3340
|
+
//Constructor
|
3362
3341
|
constructor() {
|
3363
3342
|
//Injections
|
3364
3343
|
this._router = inject(Router);
|
3365
|
-
//signals
|
3366
|
-
this.isOpen = isMenuOpenSIGNAL;
|
3367
|
-
this._isModalOpen = isModalOpenSIGNAL;
|
3368
|
-
this._isLoading = isLoadingSIGNAL;
|
3369
3344
|
//Elements
|
3370
3345
|
this.sidenav = viewChild.required('matSidenav');
|
3371
3346
|
this.menuList = viewChildren(CoerTreeAccordion);
|
3347
|
+
//Variables
|
3348
|
+
this._isOpen = isMenuOpenSIGNAL;
|
3349
|
+
this._isModalOpen = isModalOpenSIGNAL;
|
3350
|
+
this._isLoading = isLoadingSIGNAL;
|
3372
3351
|
//Outputs
|
3373
3352
|
this.onMenuSelected = output();
|
3374
3353
|
//computed
|
3354
|
+
this._backdrop = computed(() => {
|
3355
|
+
return ['mv', 'xs', 'sm', 'md'].includes(breakpointSIGNAL());
|
3356
|
+
});
|
3357
|
+
//computed
|
3358
|
+
this._mode = computed(() => {
|
3359
|
+
return ['mv', 'xs', 'sm', 'md'].includes(breakpointSIGNAL()) ? 'over' : 'push';
|
3360
|
+
});
|
3361
|
+
//computed
|
3362
|
+
this._showAsideMenu = computed(() => {
|
3363
|
+
return ['xl', 'xxl'].includes(breakpointSIGNAL()) && !this._isOpen();
|
3364
|
+
});
|
3365
|
+
//computed
|
3375
3366
|
this._navigation = computed(() => {
|
3376
3367
|
let id = 0;
|
3377
3368
|
const navigation = navigationSIGNAL();
|
@@ -3387,47 +3378,45 @@ class CoerSidenav {
|
|
3387
3378
|
|| (this._IsMenu(item) ? (this._IsGrid(item) ? 'fa-solid fa-grip' : 'coer-icon-bars') : '');
|
3388
3379
|
};
|
3389
3380
|
/** */
|
3390
|
-
this.
|
3381
|
+
this._SetIdentityClass = (label) => {
|
3391
3382
|
let identity = `lv1${label}`;
|
3392
3383
|
if (identity.includes(' '))
|
3393
3384
|
identity = identity.replaceAll(' ', '');
|
3394
3385
|
return identity.toLowerCase();
|
3395
3386
|
};
|
3396
|
-
this.
|
3397
|
-
this.
|
3387
|
+
this._BackButtonBrowser();
|
3388
|
+
this._isOpen.set(false);
|
3398
3389
|
Screen.Resize.subscribe({
|
3399
3390
|
next: ({ breakpoint }) => {
|
3400
3391
|
breakpointSIGNAL.set(breakpoint);
|
3401
|
-
if (this.
|
3392
|
+
if (this._backdrop())
|
3402
3393
|
this.Close();
|
3403
3394
|
}
|
3404
3395
|
});
|
3405
3396
|
}
|
3406
3397
|
/** */
|
3407
|
-
|
3398
|
+
_NavigateTo(selectedOption) {
|
3408
3399
|
let url = `${selectedOption.path}`;
|
3409
3400
|
if (selectedOption.queryParams.length > 0)
|
3410
3401
|
url += `?${selectedOption.queryParams}`;
|
3411
|
-
|
3412
|
-
this._router.navigateByUrl(
|
3413
|
-
|
3414
|
-
|
3415
|
-
|
3416
|
-
|
3417
|
-
|
3418
|
-
|
3419
|
-
|
3420
|
-
|
3421
|
-
|
3422
|
-
menuLv2.Close();
|
3402
|
+
Tools.Sleep().then(_ => {
|
3403
|
+
this._router.navigateByUrl(url);
|
3404
|
+
//Set active link
|
3405
|
+
this.SetActiveLink(selectedOption);
|
3406
|
+
//Close Menu
|
3407
|
+
if (selectedOption.level == 1) {
|
3408
|
+
for (const menuLv1 of this.menuList()) {
|
3409
|
+
for (const menuLv2 of menuLv1.menuList()) {
|
3410
|
+
menuLv2.Close();
|
3411
|
+
}
|
3412
|
+
menuLv1.Close();
|
3423
3413
|
}
|
3424
|
-
menuLv1.Close();
|
3425
3414
|
}
|
3426
|
-
|
3427
|
-
|
3428
|
-
|
3429
|
-
|
3430
|
-
}
|
3415
|
+
//Close Sidenav
|
3416
|
+
if (this._mode() == 'over') {
|
3417
|
+
this.Close();
|
3418
|
+
}
|
3419
|
+
});
|
3431
3420
|
}
|
3432
3421
|
/** */
|
3433
3422
|
SetActiveLink(selectedOption) {
|
@@ -3447,7 +3436,7 @@ class CoerSidenav {
|
|
3447
3436
|
const levels = selectedOption.tree.length;
|
3448
3437
|
for (let i = 0; i < levels; i++) {
|
3449
3438
|
for (const element of collection) {
|
3450
|
-
const identityClass = this.
|
3439
|
+
const identityClass = this._GetIdentityClass(selectedOption.tree);
|
3451
3440
|
if (element.classList.contains(identityClass)) {
|
3452
3441
|
element.classList.add('active-link');
|
3453
3442
|
}
|
@@ -3459,15 +3448,15 @@ class CoerSidenav {
|
|
3459
3448
|
/** */
|
3460
3449
|
Open(event, item = null) {
|
3461
3450
|
event.stopPropagation();
|
3462
|
-
if (!this.
|
3463
|
-
this.
|
3451
|
+
if (!this._isOpen()) {
|
3452
|
+
this._isOpen.set(true);
|
3464
3453
|
this.sidenav().open();
|
3465
3454
|
}
|
3466
3455
|
}
|
3467
3456
|
/** */
|
3468
3457
|
Close() {
|
3469
|
-
if (this.
|
3470
|
-
this.
|
3458
|
+
if (this._isOpen()) {
|
3459
|
+
this._isOpen.set(false);
|
3471
3460
|
this.sidenav().close();
|
3472
3461
|
}
|
3473
3462
|
}
|
@@ -3476,11 +3465,11 @@ class CoerSidenav {
|
|
3476
3465
|
this.sidenav().toggle();
|
3477
3466
|
}
|
3478
3467
|
/** */
|
3479
|
-
|
3468
|
+
_MenuSelected(selectedMenu) {
|
3480
3469
|
if (selectedMenu.level == 1) {
|
3481
3470
|
for (const menuLv1 of this.menuList()) {
|
3482
|
-
if (menuLv1.item.label != selectedMenu.label) {
|
3483
|
-
for (const menuLv2 of menuLv1.menuList
|
3471
|
+
if (menuLv1.item().label != selectedMenu.label) {
|
3472
|
+
for (const menuLv2 of menuLv1.menuList()) {
|
3484
3473
|
menuLv2.Close();
|
3485
3474
|
}
|
3486
3475
|
menuLv1.Close();
|
@@ -3490,7 +3479,7 @@ class CoerSidenav {
|
|
3490
3479
|
this.onMenuSelected.emit(menuSelectedSIGNAL());
|
3491
3480
|
}
|
3492
3481
|
/** */
|
3493
|
-
|
3482
|
+
_ShowGridMenu(menuOption, menu) {
|
3494
3483
|
menuSelectedSIGNAL.set({
|
3495
3484
|
level: 1,
|
3496
3485
|
label: menu.label,
|
@@ -3500,10 +3489,10 @@ class CoerSidenav {
|
|
3500
3489
|
items: menu.items,
|
3501
3490
|
tree: []
|
3502
3491
|
});
|
3503
|
-
this.
|
3492
|
+
this._NavigateTo(menuOption);
|
3504
3493
|
}
|
3505
3494
|
/** */
|
3506
|
-
|
3495
|
+
_GetIdentityClass(tree) {
|
3507
3496
|
let identity = '';
|
3508
3497
|
for (let i = 0; i < tree.length; i++) {
|
3509
3498
|
identity += `lv${i + 1}${tree[i].label}-`;
|
@@ -3515,7 +3504,7 @@ class CoerSidenav {
|
|
3515
3504
|
return identity.toLowerCase();
|
3516
3505
|
}
|
3517
3506
|
/** */
|
3518
|
-
|
3507
|
+
_BackButtonBrowser() {
|
3519
3508
|
const QUERY_SELECTOR = 'coer-menu-option[ng-reflect-path="[path]"] mat-nav-list.coer-menu-option';
|
3520
3509
|
Screen.BackButtonBrowser.subscribe(toPath => {
|
3521
3510
|
if (toPath.includes('/#/'))
|
@@ -3550,25 +3539,28 @@ class CoerSidenav {
|
|
3550
3539
|
});
|
3551
3540
|
}
|
3552
3541
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerSidenav, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
3553
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerSidenav, isStandalone: false, selector: "coer-sidenav", outputs: { onMenuSelected: "onMenuSelected" }, viewQueries: [{ propertyName: "sidenav", first: true, predicate: ["matSidenav"], descendants: true, isSignal: true }, { propertyName: "menuList", predicate: CoerTreeAccordion, descendants: true, isSignal: true }], ngImport: i0, template: "<mat-drawer-container [hasBackdrop]=\"
|
3542
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerSidenav, isStandalone: false, selector: "coer-sidenav", outputs: { onMenuSelected: "onMenuSelected" }, viewQueries: [{ propertyName: "sidenav", first: true, predicate: ["matSidenav"], descendants: true, isSignal: true }, { propertyName: "menuList", predicate: CoerTreeAccordion, descendants: true, isSignal: true }], ngImport: i0, template: "<mat-drawer-container [hasBackdrop]=\"_backdrop()\">\r\n <mat-drawer\r\n #matSidenav\r\n [opened]=\"_isOpen()\"\r\n (opened)=\"_isOpen.set(true)\"\r\n (closed)=\"_isOpen.set(false)\"\r\n [mode]=\"_mode()\"\r\n [class]=\"_isModalOpen() ? 'z-index-1' : 'z-index-3'\">\r\n\r\n @if(!_isLoading()) {\r\n @if(_navigation().length > 0) {\r\n <div *ngFor=\"let item of _navigation()\">\r\n <!-- Menu -->\r\n <div *ngIf=\"_IsMenu(item); else OptionMenu\">\r\n @if(_IsGrid(item)) {\r\n <coer-menu-option\r\n [label]=\"item.label\"\r\n [icon]=\"_GetIcon(item)\"\r\n path=\"menu\"\r\n (clickMenuOption)=\"_ShowGridMenu($event, item)\"\r\n ></coer-menu-option>\r\n }\r\n\r\n @else {\r\n <coer-tree-accordion\r\n [item]=\"item\"\r\n (showGridMenu)=\"_NavigateTo($event)\"\r\n (clickMenuOption)=\"_NavigateTo($event)\"\r\n (clickMenu)=\"_MenuSelected($event)\"\r\n ></coer-tree-accordion>\r\n }\r\n </div>\r\n \r\n <!-- Option Menu -->\r\n <ng-template #OptionMenu>\r\n <coer-menu-option\r\n [label]=\"item.label\"\r\n [icon]=\"item?.icon\"\r\n [path]=\"item?.path\"\r\n (clickMenuOption)=\"_NavigateTo($event)\"\r\n ></coer-menu-option>\r\n </ng-template>\r\n \r\n <div class=\"separator\"></div>\r\n </div>\r\n }\r\n\r\n @else {\r\n <coer-menu-option label=\"Empty\"></coer-menu-option>\r\n }\r\n }\r\n\r\n @else {\r\n <coer-menu-option\r\n label=\"LOADING\"\r\n icon=\"icon-arrows-sync animation-spin\"\r\n ></coer-menu-option>\r\n }\r\n\r\n <div [ngClass]=\"{ 'backdrop': _isModalOpen() }\"></div>\r\n </mat-drawer>\r\n\r\n <!-- Main Screen -->\r\n <mat-drawer-content [ngClass]=\"{ 'margin-left-40px': (!_isOpen() && _showAsideMenu()) }\">\r\n <aside [ngClass]=\"{ 'side-nav': true, 'd-none': !_showAsideMenu() }\" (click)=\"Open($event)\">\r\n @if(_isLoading()) {\r\n <span class=\"icon-container\">\r\n <i class=\"icon-arrows-sync animation-spin\"></i>\r\n </span>\r\n }\r\n\r\n @else {\r\n @for (item of _navigation(); track item.id) {\r\n <div (click)=\"Open($event, item)\">\r\n <span [class]=\"'icon-container ' + _SetIdentityClass(item.label)\">\r\n <i [class]=\"_GetIcon(item)\"></i>\r\n </span>\r\n </div>\r\n } \r\n }\r\n\r\n <div [ngClass]=\"{ 'backdrop': _isModalOpen() }\"></div>\r\n </aside> \r\n <ng-content></ng-content>\r\n </mat-drawer-content>\r\n</mat-drawer-container>", styles: ["mat-drawer-container{height:calc(100vh - 45px)!important}mat-drawer-container .margin-left-40px{margin-left:40px!important}mat-drawer-container mat-drawer{width:auto;min-width:200px;background-color:var(--sidenav-inner)!important}mat-drawer-container mat-drawer div.mat-drawer-inner-container::-webkit-scrollbar{width:1px!important}mat-drawer-container mat-drawer div.mat-drawer-inner-container::-webkit-scrollbar-thumb{background-color:var(--secondary-inner)!important;border-radius:5px!important}mat-drawer-container mat-drawer div.mat-drawer-inner-container::-webkit-scrollbar-thumb:hover{background-color:var(--secondary-inner)!important}mat-drawer-container mat-drawer div.mat-drawer-inner-container::-webkit-scrollbar-thumb:active{background-color:var(--background-inner)!important}mat-drawer-container mat-drawer i{font-size:16px!important}mat-drawer-container mat-drawer div.separator{border:.5px solid rgba(245,245,245,.041)!important}mat-drawer-container mat-drawer-content{margin-right:0!important;background-color:var(--background-inner)!important}mat-drawer-container mat-drawer-content aside.side-nav{background-color:var(--sidenav-inner)!important;width:40px!important;position:fixed!important;left:0!important;top:45px!important;bottom:0!important;cursor:pointer!important}mat-drawer-container mat-drawer-content aside.side-nav span.icon-container{width:100%!important;height:49.6px!important;display:flex!important;align-items:center!important;justify-content:center!important;font-size:16px!important;border-bottom:1px solid rgba(245,245,245,.041)!important;color:var(--sidenav-text-inner)}mat-drawer-container mat-drawer-content aside.side-nav span.icon-container:hover{background-color:color-mix(in srgb,var(--sidenav-inner),white 5%)!important}mat-drawer-container mat-drawer-content aside.side-nav span.icon-container.active-link{color:var(--sidenav-active-inner)!important}mat-drawer-container div.backdrop{position:absolute!important;inset:0!important;background-color:#0000005b!important;z-index:1500!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$8.MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "component", type: i2$8.MatDrawerContent, selector: "mat-drawer-content" }, { kind: "component", type: i2$8.MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: CoerMenuOption, selector: "coer-menu-option", inputs: ["level", "label", "icon", "path", "tree"], outputs: ["clickMenuOption"] }, { kind: "component", type: CoerTreeAccordion, selector: "coer-tree-accordion", inputs: ["level", "item", "tree", "showTree"], outputs: ["showGridMenu", "clickMenuOption", "clickMenu"] }] }); }
|
3554
3543
|
}
|
3555
3544
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerSidenav, decorators: [{
|
3556
3545
|
type: Component,
|
3557
|
-
args: [{ selector: 'coer-sidenav', standalone: false, template: "<mat-drawer-container [hasBackdrop]=\"
|
3546
|
+
args: [{ selector: 'coer-sidenav', standalone: false, template: "<mat-drawer-container [hasBackdrop]=\"_backdrop()\">\r\n <mat-drawer\r\n #matSidenav\r\n [opened]=\"_isOpen()\"\r\n (opened)=\"_isOpen.set(true)\"\r\n (closed)=\"_isOpen.set(false)\"\r\n [mode]=\"_mode()\"\r\n [class]=\"_isModalOpen() ? 'z-index-1' : 'z-index-3'\">\r\n\r\n @if(!_isLoading()) {\r\n @if(_navigation().length > 0) {\r\n <div *ngFor=\"let item of _navigation()\">\r\n <!-- Menu -->\r\n <div *ngIf=\"_IsMenu(item); else OptionMenu\">\r\n @if(_IsGrid(item)) {\r\n <coer-menu-option\r\n [label]=\"item.label\"\r\n [icon]=\"_GetIcon(item)\"\r\n path=\"menu\"\r\n (clickMenuOption)=\"_ShowGridMenu($event, item)\"\r\n ></coer-menu-option>\r\n }\r\n\r\n @else {\r\n <coer-tree-accordion\r\n [item]=\"item\"\r\n (showGridMenu)=\"_NavigateTo($event)\"\r\n (clickMenuOption)=\"_NavigateTo($event)\"\r\n (clickMenu)=\"_MenuSelected($event)\"\r\n ></coer-tree-accordion>\r\n }\r\n </div>\r\n \r\n <!-- Option Menu -->\r\n <ng-template #OptionMenu>\r\n <coer-menu-option\r\n [label]=\"item.label\"\r\n [icon]=\"item?.icon\"\r\n [path]=\"item?.path\"\r\n (clickMenuOption)=\"_NavigateTo($event)\"\r\n ></coer-menu-option>\r\n </ng-template>\r\n \r\n <div class=\"separator\"></div>\r\n </div>\r\n }\r\n\r\n @else {\r\n <coer-menu-option label=\"Empty\"></coer-menu-option>\r\n }\r\n }\r\n\r\n @else {\r\n <coer-menu-option\r\n label=\"LOADING\"\r\n icon=\"icon-arrows-sync animation-spin\"\r\n ></coer-menu-option>\r\n }\r\n\r\n <div [ngClass]=\"{ 'backdrop': _isModalOpen() }\"></div>\r\n </mat-drawer>\r\n\r\n <!-- Main Screen -->\r\n <mat-drawer-content [ngClass]=\"{ 'margin-left-40px': (!_isOpen() && _showAsideMenu()) }\">\r\n <aside [ngClass]=\"{ 'side-nav': true, 'd-none': !_showAsideMenu() }\" (click)=\"Open($event)\">\r\n @if(_isLoading()) {\r\n <span class=\"icon-container\">\r\n <i class=\"icon-arrows-sync animation-spin\"></i>\r\n </span>\r\n }\r\n\r\n @else {\r\n @for (item of _navigation(); track item.id) {\r\n <div (click)=\"Open($event, item)\">\r\n <span [class]=\"'icon-container ' + _SetIdentityClass(item.label)\">\r\n <i [class]=\"_GetIcon(item)\"></i>\r\n </span>\r\n </div>\r\n } \r\n }\r\n\r\n <div [ngClass]=\"{ 'backdrop': _isModalOpen() }\"></div>\r\n </aside> \r\n <ng-content></ng-content>\r\n </mat-drawer-content>\r\n</mat-drawer-container>", styles: ["mat-drawer-container{height:calc(100vh - 45px)!important}mat-drawer-container .margin-left-40px{margin-left:40px!important}mat-drawer-container mat-drawer{width:auto;min-width:200px;background-color:var(--sidenav-inner)!important}mat-drawer-container mat-drawer div.mat-drawer-inner-container::-webkit-scrollbar{width:1px!important}mat-drawer-container mat-drawer div.mat-drawer-inner-container::-webkit-scrollbar-thumb{background-color:var(--secondary-inner)!important;border-radius:5px!important}mat-drawer-container mat-drawer div.mat-drawer-inner-container::-webkit-scrollbar-thumb:hover{background-color:var(--secondary-inner)!important}mat-drawer-container mat-drawer div.mat-drawer-inner-container::-webkit-scrollbar-thumb:active{background-color:var(--background-inner)!important}mat-drawer-container mat-drawer i{font-size:16px!important}mat-drawer-container mat-drawer div.separator{border:.5px solid rgba(245,245,245,.041)!important}mat-drawer-container mat-drawer-content{margin-right:0!important;background-color:var(--background-inner)!important}mat-drawer-container mat-drawer-content aside.side-nav{background-color:var(--sidenav-inner)!important;width:40px!important;position:fixed!important;left:0!important;top:45px!important;bottom:0!important;cursor:pointer!important}mat-drawer-container mat-drawer-content aside.side-nav span.icon-container{width:100%!important;height:49.6px!important;display:flex!important;align-items:center!important;justify-content:center!important;font-size:16px!important;border-bottom:1px solid rgba(245,245,245,.041)!important;color:var(--sidenav-text-inner)}mat-drawer-container mat-drawer-content aside.side-nav span.icon-container:hover{background-color:color-mix(in srgb,var(--sidenav-inner),white 5%)!important}mat-drawer-container mat-drawer-content aside.side-nav span.icon-container.active-link{color:var(--sidenav-active-inner)!important}mat-drawer-container div.backdrop{position:absolute!important;inset:0!important;background-color:#0000005b!important;z-index:1500!important}\n"] }]
|
3558
3547
|
}], ctorParameters: () => [] });
|
3559
3548
|
|
3560
3549
|
class CoerDropdown extends ControlValue {
|
3550
|
+
//Constructor
|
3561
3551
|
constructor() {
|
3562
|
-
super(
|
3563
|
-
//
|
3564
|
-
this._value = null;
|
3565
|
-
//Variables
|
3552
|
+
super();
|
3553
|
+
//Elements
|
3566
3554
|
this._coerTextBox = viewChild.required('coerTextBox');
|
3555
|
+
//Variables
|
3556
|
+
this._value = null;
|
3567
3557
|
this._id = Tools.GetGuid('coer-dropdown');
|
3568
3558
|
this._index = signal(-1);
|
3569
3559
|
this._isOpen = signal(false);
|
3570
3560
|
this._isOverMenu = signal(false);
|
3561
|
+
//Inputs
|
3571
3562
|
this.id = input('');
|
3563
|
+
this.value = input(null);
|
3572
3564
|
this.label = input('');
|
3573
3565
|
this.color = input('default');
|
3574
3566
|
this.type = input('filled');
|
@@ -3623,30 +3615,46 @@ class CoerDropdown extends ControlValue {
|
|
3623
3615
|
return item?.path;
|
3624
3616
|
if (Tools.IsNotOnlyWhiteSpace(item?.url))
|
3625
3617
|
return item?.url;
|
3618
|
+
if (Tools.IsNotOnlyWhiteSpace(item?.route))
|
3619
|
+
return item?.route;
|
3626
3620
|
if (Tools.IsNotOnlyWhiteSpace(item?.link))
|
3627
3621
|
return item?.link;
|
3628
3622
|
}
|
3629
3623
|
return null;
|
3630
3624
|
};
|
3625
|
+
this._effect = effect(() => {
|
3626
|
+
this.SetValue(Tools.IsNotNull(this.value()) ? this.value() : null);
|
3627
|
+
});
|
3631
3628
|
}
|
3632
|
-
//
|
3633
|
-
|
3634
|
-
|
3635
|
-
|
3636
|
-
|
3637
|
-
|
3638
|
-
|
3639
|
-
|
3640
|
-
|
3629
|
+
//AfterViewInit
|
3630
|
+
ngAfterViewInit() {
|
3631
|
+
Tools.Sleep().then(() => {
|
3632
|
+
//Container
|
3633
|
+
this._container = document.getElementById(`${this._id}-container`);
|
3634
|
+
this._container.addEventListener('mouseenter', () => {
|
3635
|
+
this._isOverMenu.set(true);
|
3636
|
+
});
|
3637
|
+
this._container.addEventListener('mouseleave', () => {
|
3638
|
+
this._isOverMenu.set(false);
|
3639
|
+
});
|
3640
|
+
//DropDown
|
3641
|
+
this._dropDownMenu = document.getElementById(`${this._id}-dropdown-menu`);
|
3642
|
+
this._dropDownMenu.addEventListener('mouseenter', () => {
|
3643
|
+
this._isOverMenu.set(true);
|
3644
|
+
});
|
3645
|
+
this._dropDownMenu.addEventListener('mouseleave', () => {
|
3646
|
+
this._isOverMenu.set(false);
|
3647
|
+
});
|
3648
|
+
//Document
|
3649
|
+
document.addEventListener('click', () => {
|
3650
|
+
if (!this._isOverMenu())
|
3651
|
+
this.Close();
|
3652
|
+
});
|
3653
|
+
});
|
3641
3654
|
}
|
3642
|
-
//
|
3643
|
-
|
3644
|
-
|
3645
|
-
if (Tools.IsNotNull(value?.index))
|
3646
|
-
delete value.index;
|
3647
|
-
if (Tools.IsNotNull(value?.indexRow))
|
3648
|
-
delete value.indexRow;
|
3649
|
-
return value;
|
3655
|
+
//OnDestroy
|
3656
|
+
ngOnDestroy() {
|
3657
|
+
this._effect?.destroy();
|
3650
3658
|
}
|
3651
3659
|
//getter
|
3652
3660
|
get _label() {
|
@@ -3664,7 +3672,7 @@ class CoerDropdown extends ControlValue {
|
|
3664
3672
|
&& Tools.IsNotOnlyWhiteSpace(this.value?.icon)
|
3665
3673
|
? this.value?.icon || '' : '';
|
3666
3674
|
}
|
3667
|
-
|
3675
|
+
//ControlValueAccessor
|
3668
3676
|
SetValue(_value) {
|
3669
3677
|
if (_value === undefined)
|
3670
3678
|
_value = null;
|
@@ -3675,39 +3683,13 @@ class CoerDropdown extends ControlValue {
|
|
3675
3683
|
this._UpdateValue(_value);
|
3676
3684
|
this._value = _value;
|
3677
3685
|
}
|
3678
|
-
|
3686
|
+
//ControlValueAccessor
|
3679
3687
|
writeValue(_value) {
|
3680
3688
|
if (_value === undefined)
|
3681
3689
|
_value = null;
|
3682
3690
|
this._value = _value;
|
3683
3691
|
}
|
3684
3692
|
/** */
|
3685
|
-
_SetEvents() {
|
3686
|
-
Tools.Sleep().then(() => {
|
3687
|
-
//Container
|
3688
|
-
this._container = document.getElementById(`${this._id}-container`);
|
3689
|
-
this._container.addEventListener('mouseenter', () => {
|
3690
|
-
this._isOverMenu.set(true);
|
3691
|
-
});
|
3692
|
-
this._container.addEventListener('mouseleave', () => {
|
3693
|
-
this._isOverMenu.set(false);
|
3694
|
-
});
|
3695
|
-
//DropDown
|
3696
|
-
this._dropDownMenu = document.getElementById(`${this._id}-dropdown-menu`);
|
3697
|
-
this._dropDownMenu.addEventListener('mouseenter', () => {
|
3698
|
-
this._isOverMenu.set(true);
|
3699
|
-
});
|
3700
|
-
this._dropDownMenu.addEventListener('mouseleave', () => {
|
3701
|
-
this._isOverMenu.set(false);
|
3702
|
-
});
|
3703
|
-
//Document
|
3704
|
-
document.addEventListener('click', () => {
|
3705
|
-
if (!this._isOverMenu())
|
3706
|
-
this.Close();
|
3707
|
-
});
|
3708
|
-
});
|
3709
|
-
}
|
3710
|
-
/** */
|
3711
3693
|
_SelectItem(item) {
|
3712
3694
|
if (Tools.IsNotNull(item) && this._isEnable()) {
|
3713
3695
|
const _item = Tools.BreakReference(this.dataSource()[item.index]);
|
@@ -3763,18 +3745,19 @@ class CoerDropdown extends ControlValue {
|
|
3763
3745
|
}
|
3764
3746
|
});
|
3765
3747
|
}
|
3766
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerDropdown, deps:
|
3767
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerDropdown, isStandalone: false, selector: "coer-dropdown", inputs: {
|
3748
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerDropdown, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
3749
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerDropdown, isStandalone: false, selector: "coer-dropdown", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: false, transformFunction: null }, propDisplay: { classPropertyName: "propDisplay", publicName: "propDisplay", isSignal: true, isRequired: false, transformFunction: null }, rowsByPage: { classPropertyName: "rowsByPage", publicName: "rowsByPage", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: true, isRequired: false, transformFunction: null }, isInvisible: { classPropertyName: "isInvisible", publicName: "isInvisible", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, marginTop: { classPropertyName: "marginTop", publicName: "marginTop", isSignal: true, isRequired: false, transformFunction: null }, marginRight: { classPropertyName: "marginRight", publicName: "marginRight", isSignal: true, isRequired: false, transformFunction: null }, marginBottom: { classPropertyName: "marginBottom", publicName: "marginBottom", isSignal: true, isRequired: false, transformFunction: null }, marginLeft: { classPropertyName: "marginLeft", publicName: "marginLeft", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, tooltipPosition: { classPropertyName: "tooltipPosition", publicName: "tooltipPosition", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSelected: "onSelected", onUnselect: "onUnselect" }, providers: [CONTROL_VALUE(CoerDropdown)], viewQueries: [{ propertyName: "_coerTextBox", first: true, predicate: ["coerTextBox"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"coer-dropdown\">\r\n <div [id]=\"_id + '-container'\">\r\n <div [ngClass]=\"{ 'd-none': isInvisible() }\">\r\n <coer-button\r\n [color]=\"color()\"\r\n [type]=\"type()\"\r\n [icon]=\"_icon\"\r\n [isLoading]=\"isLoading()\"\r\n [isDisabled]=\"isDisabled()\" \r\n [width]=\"width()\"\r\n [minWidth]=\"minWidth()\"\r\n [maxWidth]=\"maxWidth()\"\r\n [marginTop]=\"marginTop()\"\r\n [marginRight]=\"marginRight()\"\r\n [marginBottom]=\"marginBottom()\"\r\n [marginLeft]=\"marginLeft()\"\r\n [tooltip]=\"tooltip()\"\r\n [tooltipPosition]=\"tooltipPosition()\"\r\n (onClick)=\"_Toggle()\"\r\n > {{ _label }} </coer-button>\r\n </div>\r\n\r\n <div [ngClass]=\"{ 'd-none': !isInvisible(), 'invisible': true }\">\r\n <coer-button\r\n [width]=\"width()\"\r\n [minWidth]=\"minWidth()\"\r\n [maxWidth]=\"maxWidth()\"\r\n [marginTop]=\"marginTop()\"\r\n [marginRight]=\"marginRight()\"\r\n [marginBottom]=\"marginBottom()\"\r\n [marginLeft]=\"marginLeft()\"\r\n ></coer-button>\r\n </div>\r\n </div>\r\n\r\n <!-- Options Container -->\r\n <div class=\"btn-group\">\r\n <ul [id]=\"_id + '-dropdown-menu'\" \r\n class=\"dropdown-menu\"\r\n [ngStyle]=\"{\r\n width: width(),\r\n minWidth: minWidth()\r\n }\">\r\n\r\n @if(_dataSource().length <= 0) {\r\n <li class=\"no-options\">\r\n <div [id]=\"id + '-dropdown-option-' + -1\" class='dropdown-item cursor-pointer no-options'\r\n > -- No Options -- </div>\r\n </li>\r\n }\r\n\r\n @for(item of _dataSource(); track _GetIndexRow(item)) {\r\n <li (click)=\"_SelectItem(item)\">\r\n <a [routerLink]=\"_GetPath(item)\" class=\"text-decoration-none\">\r\n <div [id]=\"id + '-dropdown-option-' + _GetIndexRow(item)\"\r\n [ngClass]=\"{\r\n 'dropdown-item': true,\r\n 'cursor-pointer': true,\r\n 'gap-2': true,\r\n 'dropdown-item-focus': _index() == _GetIndexRow(item)\r\n }\"> \r\n\r\n @if (_GetIcon(item).length > 0) {\r\n <i [class]=\"_GetIcon(item)\"></i>\r\n }\r\n <span> {{ _GetDisplay(item) }} </span>\r\n </div>\r\n <hr class=\"dropdown-divider\">\r\n </a>\r\n </li>\r\n }\r\n </ul>\r\n </div>\r\n</div> ", styles: ["div.coer-dropdown{position:relative!important;width:fit-content!important;display:inline-block!important}div.coer-dropdown .btn-group{position:absolute!important;top:40px;left:0!important;width:100%!important}div.coer-dropdown ul.dropdown-menu{background-color:var(--white)!important;border-top-left-radius:0!important;border-top-right-radius:0!important;max-height:205px!important;width:100%;overflow:auto!important;padding:0!important}div.coer-dropdown .dropdown-divider{margin:0!important;background-color:var(--white)!important}div.coer-dropdown ul.dropdown-menu li:not(.no-options):hover,div.coer-dropdown ul.dropdown-menu li>div:not(.no-options):hover,div.coer-dropdown ul.dropdown-menu li:not(.dropdown-item-focus):hover,div.coer-dropdown ul.dropdown-menu li>div:not(.dropdown-item-focus):hover{color:var(--black)!important;background-color:#f1f6ff!important}div.coer-dropdown ul.dropdown-menu li:last-child hr.dropdown-divider,div.coer-dropdown ul.dropdown-menu li:last-child hr.dropdown-divider:hover{width:0px!important;border:none!important}div.coer-dropdown ul.dropdown-menu li div{display:flex!important;align-items:center!important;height:40px!important}div.coer-dropdown ul.dropdown-menu li.no-options *{color:#d3d3d3!important}div.coer-dropdown div.dropdown-item-focus{background-color:#cde1ff!important}div.coer-dropdown mat-form-field.readonly div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:#bbbbbb83!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: CoerButton, selector: "coer-button", inputs: ["id", "color", "type", "icon", "iconPosition", "path", "isLoading", "isDisabled", "isReadonly", "isInvisible", "width", "minWidth", "maxWidth", "height", "minHeight", "marginTop", "marginRight", "marginBottom", "marginLeft", "tooltip", "tooltipPosition"], outputs: ["onClick"] }] }); }
|
3768
3750
|
}
|
3769
3751
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerDropdown, decorators: [{
|
3770
3752
|
type: Component,
|
3771
3753
|
args: [{ selector: 'coer-dropdown', providers: [CONTROL_VALUE(CoerDropdown)], standalone: false, template: "<div class=\"coer-dropdown\">\r\n <div [id]=\"_id + '-container'\">\r\n <div [ngClass]=\"{ 'd-none': isInvisible() }\">\r\n <coer-button\r\n [color]=\"color()\"\r\n [type]=\"type()\"\r\n [icon]=\"_icon\"\r\n [isLoading]=\"isLoading()\"\r\n [isDisabled]=\"isDisabled()\" \r\n [width]=\"width()\"\r\n [minWidth]=\"minWidth()\"\r\n [maxWidth]=\"maxWidth()\"\r\n [marginTop]=\"marginTop()\"\r\n [marginRight]=\"marginRight()\"\r\n [marginBottom]=\"marginBottom()\"\r\n [marginLeft]=\"marginLeft()\"\r\n [tooltip]=\"tooltip()\"\r\n [tooltipPosition]=\"tooltipPosition()\"\r\n (onClick)=\"_Toggle()\"\r\n > {{ _label }} </coer-button>\r\n </div>\r\n\r\n <div [ngClass]=\"{ 'd-none': !isInvisible(), 'invisible': true }\">\r\n <coer-button\r\n [width]=\"width()\"\r\n [minWidth]=\"minWidth()\"\r\n [maxWidth]=\"maxWidth()\"\r\n [marginTop]=\"marginTop()\"\r\n [marginRight]=\"marginRight()\"\r\n [marginBottom]=\"marginBottom()\"\r\n [marginLeft]=\"marginLeft()\"\r\n ></coer-button>\r\n </div>\r\n </div>\r\n\r\n <!-- Options Container -->\r\n <div class=\"btn-group\">\r\n <ul [id]=\"_id + '-dropdown-menu'\" \r\n class=\"dropdown-menu\"\r\n [ngStyle]=\"{\r\n width: width(),\r\n minWidth: minWidth()\r\n }\">\r\n\r\n @if(_dataSource().length <= 0) {\r\n <li class=\"no-options\">\r\n <div [id]=\"id + '-dropdown-option-' + -1\" class='dropdown-item cursor-pointer no-options'\r\n > -- No Options -- </div>\r\n </li>\r\n }\r\n\r\n @for(item of _dataSource(); track _GetIndexRow(item)) {\r\n <li (click)=\"_SelectItem(item)\">\r\n <a [routerLink]=\"_GetPath(item)\" class=\"text-decoration-none\">\r\n <div [id]=\"id + '-dropdown-option-' + _GetIndexRow(item)\"\r\n [ngClass]=\"{\r\n 'dropdown-item': true,\r\n 'cursor-pointer': true,\r\n 'gap-2': true,\r\n 'dropdown-item-focus': _index() == _GetIndexRow(item)\r\n }\"> \r\n\r\n @if (_GetIcon(item).length > 0) {\r\n <i [class]=\"_GetIcon(item)\"></i>\r\n }\r\n <span> {{ _GetDisplay(item) }} </span>\r\n </div>\r\n <hr class=\"dropdown-divider\">\r\n </a>\r\n </li>\r\n }\r\n </ul>\r\n </div>\r\n</div> ", styles: ["div.coer-dropdown{position:relative!important;width:fit-content!important;display:inline-block!important}div.coer-dropdown .btn-group{position:absolute!important;top:40px;left:0!important;width:100%!important}div.coer-dropdown ul.dropdown-menu{background-color:var(--white)!important;border-top-left-radius:0!important;border-top-right-radius:0!important;max-height:205px!important;width:100%;overflow:auto!important;padding:0!important}div.coer-dropdown .dropdown-divider{margin:0!important;background-color:var(--white)!important}div.coer-dropdown ul.dropdown-menu li:not(.no-options):hover,div.coer-dropdown ul.dropdown-menu li>div:not(.no-options):hover,div.coer-dropdown ul.dropdown-menu li:not(.dropdown-item-focus):hover,div.coer-dropdown ul.dropdown-menu li>div:not(.dropdown-item-focus):hover{color:var(--black)!important;background-color:#f1f6ff!important}div.coer-dropdown ul.dropdown-menu li:last-child hr.dropdown-divider,div.coer-dropdown ul.dropdown-menu li:last-child hr.dropdown-divider:hover{width:0px!important;border:none!important}div.coer-dropdown ul.dropdown-menu li div{display:flex!important;align-items:center!important;height:40px!important}div.coer-dropdown ul.dropdown-menu li.no-options *{color:#d3d3d3!important}div.coer-dropdown div.dropdown-item-focus{background-color:#cde1ff!important}div.coer-dropdown mat-form-field.readonly div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:#bbbbbb83!important}\n"] }]
|
3772
|
-
}],
|
3773
|
-
type: Input
|
3774
|
-
}] } });
|
3754
|
+
}], ctorParameters: () => [] });
|
3775
3755
|
|
3776
3756
|
class CoerTab {
|
3757
|
+
//Constructor
|
3777
3758
|
constructor() {
|
3759
|
+
//Content
|
3760
|
+
this.contentRef = contentChildren(CoerRefDirective);
|
3778
3761
|
//Elements
|
3779
3762
|
this._matTabGroup = viewChild.required('matTabGroup');
|
3780
3763
|
//Variables
|
@@ -3785,109 +3768,78 @@ class CoerTab {
|
|
3785
3768
|
this.height = input('auto');
|
3786
3769
|
this.minHeight = input('300px');
|
3787
3770
|
this.maxHeight = input('auto');
|
3771
|
+
this.selectedIndex = input(0);
|
3772
|
+
this.alignTabs = input('start');
|
3773
|
+
this.stretchTabs = input(false);
|
3788
3774
|
//Outputs
|
3789
3775
|
this.onSelectedTab = output();
|
3790
3776
|
//getter
|
3777
|
+
this._contentList = computed(() => {
|
3778
|
+
return this.contentRef();
|
3779
|
+
});
|
3780
|
+
//computed
|
3791
3781
|
this.selectedTab = computed(() => {
|
3792
|
-
|
3793
|
-
return this._contentList[index];
|
3782
|
+
return this._contentList()[this._selectedIndex()];
|
3794
3783
|
});
|
3795
|
-
|
3796
|
-
|
3797
|
-
|
3798
|
-
|
3799
|
-
}
|
3800
|
-
|
3801
|
-
|
3802
|
-
|
3803
|
-
if (Tools.IsNotNull(value)) {
|
3804
|
-
this._htmlElement.removeAttribute('mat-align-tabs');
|
3805
|
-
Tools.Sleep().then(() => {
|
3806
|
-
this._htmlElement.setAttribute('mat-align-tabs', value);
|
3807
|
-
});
|
3784
|
+
/** */
|
3785
|
+
this._SetToolTip = (tab) => {
|
3786
|
+
return Tools.IsNotOnlyWhiteSpace(tab.tooltip())
|
3787
|
+
? Strings.CleanUpBlanks(tab.tooltip()) : '';
|
3788
|
+
};
|
3789
|
+
this._effectSelectedIndex = effect(() => {
|
3790
|
+
if (Tools.IsNotNull(this.selectedIndex())) {
|
3791
|
+
this._selectedIndex.set(this.selectedIndex());
|
3808
3792
|
}
|
3809
|
-
}
|
3810
|
-
|
3811
|
-
Tools.Sleep().then(() =>
|
3812
|
-
|
3813
|
-
|
3814
|
-
|
3815
|
-
|
3793
|
+
});
|
3794
|
+
this._effectAlignTabs = effect(() => {
|
3795
|
+
Tools.Sleep().then(() => {
|
3796
|
+
if (Tools.IsNotNull(this._htmlElement)) {
|
3797
|
+
if (Tools.IsNotNull(this.alignTabs())) {
|
3798
|
+
this._htmlElement.removeAttribute('mat-align-tabs');
|
3799
|
+
Tools.Sleep().then(() => {
|
3800
|
+
this._htmlElement.setAttribute('mat-align-tabs', this.alignTabs());
|
3801
|
+
});
|
3802
|
+
}
|
3803
|
+
}
|
3804
|
+
});
|
3805
|
+
});
|
3816
3806
|
}
|
3807
|
+
//AfterViewInit
|
3817
3808
|
ngAfterViewInit() {
|
3818
3809
|
this._htmlElement = this._matTabGroup()._elementRef.nativeElement;
|
3819
3810
|
}
|
3811
|
+
//OnDestroy
|
3820
3812
|
ngOnDestroy() {
|
3821
|
-
|
3822
|
-
|
3823
|
-
}
|
3813
|
+
this._effectSelectedIndex?.destroy();
|
3814
|
+
this._effectAlignTabs?.destroy();
|
3824
3815
|
}
|
3825
3816
|
/** */
|
3826
3817
|
_SelectedIndexChange(selectedIndex) {
|
3827
3818
|
this._selectedIndex.set(selectedIndex);
|
3828
|
-
this.onSelectedTab.emit(this._contentList[selectedIndex]);
|
3819
|
+
this.onSelectedTab.emit(this._contentList()[selectedIndex]);
|
3829
3820
|
}
|
3830
3821
|
/** */
|
3831
3822
|
_GetTitle(tab) {
|
3832
|
-
const ref = this._contentList.find(x => x.coerRef() == tab.coerRef());
|
3823
|
+
const ref = this._contentList().find(x => x.coerRef() == tab.coerRef());
|
3833
3824
|
return (ref.title().length > 0) ? ref.title() : ref.coerRef();
|
3834
3825
|
}
|
3835
3826
|
/** */
|
3836
3827
|
_GetIcon(tab) {
|
3837
|
-
return this._contentList.find(x => x.coerRef() == tab.coerRef()).icon();
|
3828
|
+
return this._contentList().find(x => x.coerRef() == tab.coerRef()).icon();
|
3838
3829
|
}
|
3839
3830
|
/** */
|
3840
3831
|
SelectTabBy(callback) {
|
3841
|
-
const index = this._contentList.findIndex(callback);
|
3832
|
+
const index = this._contentList().findIndex(callback);
|
3842
3833
|
if (index >= 0)
|
3843
3834
|
this._selectedIndex.set(index);
|
3844
3835
|
}
|
3845
|
-
/** */
|
3846
|
-
_SetToolTip(tab) {
|
3847
|
-
const id = `${this._id}-${tab.coerRef()}`;
|
3848
|
-
if (!this._tooltipList.some(x => x.id == id) && tab.tooltip().length > 0) {
|
3849
|
-
this._tooltipList.push({ id });
|
3850
|
-
Tools.Sleep().then(() => {
|
3851
|
-
const htmlElement = document.getElementById(id);
|
3852
|
-
if (htmlElement) {
|
3853
|
-
const tooltip = new Tooltip(htmlElement, {
|
3854
|
-
html: true,
|
3855
|
-
title: tab.tooltip(),
|
3856
|
-
placement: 'top'
|
3857
|
-
});
|
3858
|
-
htmlElement.addEventListener('mouseleave', () => {
|
3859
|
-
if (htmlElement)
|
3860
|
-
tooltip.hide();
|
3861
|
-
});
|
3862
|
-
const index = this._tooltipList.findIndex(x => x.id == id);
|
3863
|
-
if (index >= 0)
|
3864
|
-
this._tooltipList[index].tooltip = tooltip;
|
3865
|
-
}
|
3866
|
-
});
|
3867
|
-
}
|
3868
|
-
return id;
|
3869
|
-
}
|
3870
|
-
/** */
|
3871
|
-
_RemoveTooltip(element) {
|
3872
|
-
const id = element.getAttribute('id');
|
3873
|
-
const index = this._tooltipList.findIndex(x => x.id == id);
|
3874
|
-
if (index >= 0)
|
3875
|
-
this._tooltipList.splice(index, 1);
|
3876
|
-
}
|
3877
3836
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerTab, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
3878
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerTab, isStandalone: false, selector: "coer-tab", inputs: { height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, selectedIndex: { classPropertyName: "selectedIndex", publicName: "selectedIndex", isSignal:
|
3837
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerTab, isStandalone: false, selector: "coer-tab", inputs: { height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, selectedIndex: { classPropertyName: "selectedIndex", publicName: "selectedIndex", isSignal: true, isRequired: false, transformFunction: null }, alignTabs: { classPropertyName: "alignTabs", publicName: "alignTabs", isSignal: true, isRequired: false, transformFunction: null }, stretchTabs: { classPropertyName: "stretchTabs", publicName: "stretchTabs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSelectedTab: "onSelectedTab" }, queries: [{ propertyName: "contentRef", predicate: CoerRefDirective, isSignal: true }], viewQueries: [{ propertyName: "_matTabGroup", first: true, predicate: ["matTabGroup"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"coer-tab\">\r\n <mat-tab-group #matTabGroup\r\n [id]=\"_id\"\r\n [mat-stretch-tabs]=\"stretchTabs()\"\r\n [selectedIndex]=\"_selectedIndex()\"\r\n (selectedIndexChange)=\"_SelectedIndexChange($event)\">\r\n\r\n @for(tab of _contentList(); track tab.coerRef()) { \r\n @if(tab.show()) {\r\n <mat-tab [label]=\"tab.coerRef()\" [disabled]=\"tab.isDisabled()\">\r\n <ng-template mat-tab-label>\r\n <span class=\"tab\"\r\n [matTooltip]=\"_SetToolTip(tab)\"\r\n matTooltipPosition=\"above\"\r\n [matTooltipDisabled]=\"false\"\r\n [matTooltipHideDelay]=\"0\">\r\n <i [class]=\"_GetIcon(tab)\"></i>\r\n <span [class]=\"_GetIcon(tab).length > 0 ? 'ms-2' : ''\">\r\n {{ _GetTitle(tab) }}\r\n </span>\r\n </span>\r\n </ng-template>\r\n \r\n <div class=\"tab-content\"\r\n [ngStyle]=\"{\r\n 'height': height(),\r\n 'min-height': minHeight(),\r\n 'max-height': maxHeight()\r\n }\"> \r\n \r\n <ng-container [ngTemplateOutlet]=\"tab.template\"></ng-container>\r\n </div> \r\n </mat-tab>\r\n }\r\n }\r\n </mat-tab-group>\r\n</div> ", styles: ["div.coer-tab mat-tab-group mat-tab-header.mat-mdc-tab-header{background-color:#f5f5f562!important;border-bottom:1px solid var(--smoke)!important}div.coer-tab mat-tab-group mat-tab-header.mat-mdc-tab-header div.mat-mdc-tab-label-container div.mat-mdc-tab-list div.mat-mdc-tab-labels div.mdc-tab.mat-mdc-tab{padding:0!important;height:35px!important}div.coer-tab mat-tab-group mat-tab-header.mat-mdc-tab-header div.mat-mdc-tab-label-container div.mat-mdc-tab-list div.mat-mdc-tab-labels div.mdc-tab--active.mdc-tab-indicator--active *{color:var(--navigation-inner)!important;border-color:var(--navigation-inner)!important}div.coer-tab mat-tab-group mat-tab-header.mat-mdc-tab-header span.tab{padding:10px 20px!important}div.coer-tab mat-tab-group div.mat-mdc-tab-body-wrapper{overflow-x:hidden!important;overflow-y:visible!important}div.coer-tab mat-tab-group div.mat-mdc-tab-body-wrapper mat-tab-body{overflow-x:hidden!important;overflow-y:visible!important}div.coer-tab mat-tab-group div.mat-mdc-tab-body-wrapper mat-tab-body div.mat-mdc-tab-body-content{width:auto!important;overflow-x:auto!important;overflow-y:visible!important}div.coer-tab mat-tab-group div.mat-mdc-tab-body-wrapper mat-tab-body div.mat-mdc-tab-body-content div.tab-content{padding:5px}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i3$3.MatTabLabel, selector: "[mat-tab-label], [matTabLabel]" }, { kind: "component", type: i3$3.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "component", type: i3$3.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }] }); }
|
3879
3838
|
}
|
3880
3839
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerTab, decorators: [{
|
3881
3840
|
type: Component,
|
3882
|
-
args: [{ selector: 'coer-tab', standalone: false, template: "<div class=\"coer-tab\">\r\n <mat-tab-group #matTabGroup\r\n mat-stretch-tabs=\"
|
3883
|
-
}],
|
3884
|
-
type: ContentChildren,
|
3885
|
-
args: [CoerRefDirective]
|
3886
|
-
}], selectedIndex: [{
|
3887
|
-
type: Input
|
3888
|
-
}], alignTabs: [{
|
3889
|
-
type: Input
|
3890
|
-
}] } });
|
3841
|
+
args: [{ selector: 'coer-tab', standalone: false, template: "<div class=\"coer-tab\">\r\n <mat-tab-group #matTabGroup\r\n [id]=\"_id\"\r\n [mat-stretch-tabs]=\"stretchTabs()\"\r\n [selectedIndex]=\"_selectedIndex()\"\r\n (selectedIndexChange)=\"_SelectedIndexChange($event)\">\r\n\r\n @for(tab of _contentList(); track tab.coerRef()) { \r\n @if(tab.show()) {\r\n <mat-tab [label]=\"tab.coerRef()\" [disabled]=\"tab.isDisabled()\">\r\n <ng-template mat-tab-label>\r\n <span class=\"tab\"\r\n [matTooltip]=\"_SetToolTip(tab)\"\r\n matTooltipPosition=\"above\"\r\n [matTooltipDisabled]=\"false\"\r\n [matTooltipHideDelay]=\"0\">\r\n <i [class]=\"_GetIcon(tab)\"></i>\r\n <span [class]=\"_GetIcon(tab).length > 0 ? 'ms-2' : ''\">\r\n {{ _GetTitle(tab) }}\r\n </span>\r\n </span>\r\n </ng-template>\r\n \r\n <div class=\"tab-content\"\r\n [ngStyle]=\"{\r\n 'height': height(),\r\n 'min-height': minHeight(),\r\n 'max-height': maxHeight()\r\n }\"> \r\n \r\n <ng-container [ngTemplateOutlet]=\"tab.template\"></ng-container>\r\n </div> \r\n </mat-tab>\r\n }\r\n }\r\n </mat-tab-group>\r\n</div> ", styles: ["div.coer-tab mat-tab-group mat-tab-header.mat-mdc-tab-header{background-color:#f5f5f562!important;border-bottom:1px solid var(--smoke)!important}div.coer-tab mat-tab-group mat-tab-header.mat-mdc-tab-header div.mat-mdc-tab-label-container div.mat-mdc-tab-list div.mat-mdc-tab-labels div.mdc-tab.mat-mdc-tab{padding:0!important;height:35px!important}div.coer-tab mat-tab-group mat-tab-header.mat-mdc-tab-header div.mat-mdc-tab-label-container div.mat-mdc-tab-list div.mat-mdc-tab-labels div.mdc-tab--active.mdc-tab-indicator--active *{color:var(--navigation-inner)!important;border-color:var(--navigation-inner)!important}div.coer-tab mat-tab-group mat-tab-header.mat-mdc-tab-header span.tab{padding:10px 20px!important}div.coer-tab mat-tab-group div.mat-mdc-tab-body-wrapper{overflow-x:hidden!important;overflow-y:visible!important}div.coer-tab mat-tab-group div.mat-mdc-tab-body-wrapper mat-tab-body{overflow-x:hidden!important;overflow-y:visible!important}div.coer-tab mat-tab-group div.mat-mdc-tab-body-wrapper mat-tab-body div.mat-mdc-tab-body-content{width:auto!important;overflow-x:auto!important;overflow-y:visible!important}div.coer-tab mat-tab-group div.mat-mdc-tab-body-wrapper mat-tab-body div.mat-mdc-tab-body-content div.tab-content{padding:5px}\n"] }]
|
3842
|
+
}], ctorParameters: () => [] });
|
3891
3843
|
|
3892
3844
|
class CoerTextarea extends ControlValue {
|
3893
3845
|
constructor() {
|
@@ -3928,11 +3880,11 @@ class CoerTextarea extends ControlValue {
|
|
3928
3880
|
return !this.isDisabled() && !this.isLoading() && !this.isReadonly();
|
3929
3881
|
});
|
3930
3882
|
//computed
|
3931
|
-
this.
|
3883
|
+
this._floatLabel = computed(() => {
|
3932
3884
|
return this.label() == '' ? 'always' : 'auto';
|
3933
3885
|
});
|
3934
3886
|
//computed
|
3935
|
-
this.
|
3887
|
+
this._paddingRight = computed(() => {
|
3936
3888
|
return this.isInvalid() || this.isValid()
|
3937
3889
|
? '18px' : '0px';
|
3938
3890
|
});
|
@@ -3942,14 +3894,11 @@ class CoerTextarea extends ControlValue {
|
|
3942
3894
|
value = '';
|
3943
3895
|
this.SetValue(value);
|
3944
3896
|
}
|
3945
|
-
|
3897
|
+
//AfterViewInit
|
3898
|
+
ngAfterViewInit() {
|
3946
3899
|
this._SetEvents();
|
3947
3900
|
}
|
3948
3901
|
//getter
|
3949
|
-
get value() {
|
3950
|
-
return Tools.IsNotNull(this._value) ? String(this._value) : '';
|
3951
|
-
}
|
3952
|
-
//getter
|
3953
3902
|
get footer() {
|
3954
3903
|
return `${Tools.IsNotNull(this._value) ? String(this._value).length : '0'} / ${this.maxLength()}`;
|
3955
3904
|
}
|
@@ -4017,11 +3966,11 @@ class CoerTextarea extends ControlValue {
|
|
4017
3966
|
this.Focus(false, delay);
|
4018
3967
|
}
|
4019
3968
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerTextarea, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
4020
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerTextarea, isStandalone: false, selector: "coer-textarea", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, textPosition: { classPropertyName: "textPosition", publicName: "textPosition", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, isInvalid: { classPropertyName: "isInvalid", publicName: "isInvalid", isSignal: true, isRequired: false, transformFunction: null }, isValid: { classPropertyName: "isValid", publicName: "isValid", isSignal: true, isRequired: false, transformFunction: null }, resize: { classPropertyName: "resize", publicName: "resize", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: true, isRequired: false, transformFunction: null }, isInvisible: { classPropertyName: "isInvisible", publicName: "isInvisible", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, marginTop: { classPropertyName: "marginTop", publicName: "marginTop", isSignal: true, isRequired: false, transformFunction: null }, marginRight: { classPropertyName: "marginRight", publicName: "marginRight", isSignal: true, isRequired: false, transformFunction: null }, marginBottom: { classPropertyName: "marginBottom", publicName: "marginBottom", isSignal: true, isRequired: false, transformFunction: null }, marginLeft: { classPropertyName: "marginLeft", publicName: "marginLeft", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { onInput: "onInput" }, providers: [CONTROL_VALUE(CoerTextarea)], viewQueries: [{ propertyName: "_coerTextBox", first: true, predicate: ["coerTextArea"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"coer-textarea\">\r\n <mat-form-field\r\n [id]=\"_id + '-container'\"\r\n [floatLabel]=\"
|
3969
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerTextarea, isStandalone: false, selector: "coer-textarea", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, textPosition: { classPropertyName: "textPosition", publicName: "textPosition", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, isInvalid: { classPropertyName: "isInvalid", publicName: "isInvalid", isSignal: true, isRequired: false, transformFunction: null }, isValid: { classPropertyName: "isValid", publicName: "isValid", isSignal: true, isRequired: false, transformFunction: null }, resize: { classPropertyName: "resize", publicName: "resize", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: true, isRequired: false, transformFunction: null }, isInvisible: { classPropertyName: "isInvisible", publicName: "isInvisible", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, marginTop: { classPropertyName: "marginTop", publicName: "marginTop", isSignal: true, isRequired: false, transformFunction: null }, marginRight: { classPropertyName: "marginRight", publicName: "marginRight", isSignal: true, isRequired: false, transformFunction: null }, marginBottom: { classPropertyName: "marginBottom", publicName: "marginBottom", isSignal: true, isRequired: false, transformFunction: null }, marginLeft: { classPropertyName: "marginLeft", publicName: "marginLeft", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { onInput: "onInput" }, providers: [CONTROL_VALUE(CoerTextarea)], viewQueries: [{ propertyName: "_coerTextBox", first: true, predicate: ["coerTextArea"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"coer-textarea\">\r\n <mat-form-field\r\n [id]=\"_id + '-container'\"\r\n [floatLabel]=\"_floatLabel()\"\r\n [ngClass]=\"{\r\n 'readonly': isReadonly() && !isLoading()\r\n }\"\r\n [style]=\"{\r\n 'width': width(),\r\n 'min-width': minWidth(),\r\n 'max-width': maxWidth(),\r\n 'margin-top': marginTop(),\r\n 'margin-right': marginRight(),\r\n 'margin-bottom': marginBottom(),\r\n 'margin-left': marginLeft()\r\n }\">\r\n <mat-label>{{ label() }}</mat-label>\r\n\r\n <textarea #coerTextArea matInput\r\n [id]=\"_id\"\r\n type=\"text\"\r\n [placeholder]=\"placeholder()\"\r\n [minLength]=\"minLength()\"\r\n [maxLength]=\"maxLength()\"\r\n [disabled]=\"!_isEnable()\"\r\n [value]=\"_value\"\r\n (input)=\"SetValue(coerTextArea.value)\"\r\n (blur)=\"SetTouched(true)\"\r\n [style]=\"{\r\n 'cursor' : isLoading() ? 'wait' : 'default',\r\n 'margin-top' : (_floatLabel() == 'auto') ? '15px' : '9px',\r\n 'padding-right': _paddingRight(),\r\n 'text-align' : textPosition(),\r\n 'resize' : (!resize() || !_isEnable()) ? 'none' : '',\r\n 'height' : height()\r\n }\"></textarea>\r\n\r\n @if(isLoading()) {\r\n <div class=\"placeholder-glow\">\r\n <span class=\"placeholder\"></span>\r\n </div>\r\n }\r\n\r\n <span ngClass=\"icon-container\">\r\n @if(isInvalid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-exclamation\"></i>\r\n }\r\n\r\n @else if(isValid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-check text-green\"></i>\r\n }\r\n </span>\r\n </mat-form-field>\r\n\r\n @if(showFooter()) {\r\n <footer> {{ footer }} </footer>\r\n }\r\n</div>", styles: ["div.coer-textarea mat-form-field{position:relative!important}div.coer-textarea mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{width:100%!important;padding:0!important}div.coer-textarea mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label{overflow:visible!important;position:absolute!important;top:20px!important}div.coer-textarea mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label.mdc-floating-label--float-above mat-label{color:var(--primary-inner);font-weight:700;position:relative;left:-10px;top:2px}div.coer-textarea mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix textarea{font-weight:400!important;font-size:17px!important;color:var(--black)!important;min-height:80px}div.coer-textarea mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active,div.coer-textarea mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:before,div.coer-textarea mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:after{border-bottom-color:var(--primary-inner)!important}div.coer-textarea mat-form-field div.mat-mdc-form-field-subscript-wrapper.mat-mdc-form-field-bottom-align{height:0px!important}div.coer-textarea mat-form-field span.icon-container{position:absolute!important;top:1px!important;right:-14px!important;z-index:5!important;width:30px;height:40px;display:flex;align-items:center;justify-content:center}div.coer-textarea mat-form-field span.icon-container i{font-size:20px!important}div.coer-textarea mat-form-field span.icon-container i.fa-solid.fa-xmark,div.coer-textarea mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass{color:#caced1!important;cursor:pointer!important}div.coer-textarea mat-form-field span.icon-container i.fa-solid.fa-xmark:hover,div.coer-textarea mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass:hover{color:#6c757d!important}div.coer-textarea mat-form-field span.icon-container i.fa-solid.fa-circle-check{color:var(--green)!important}div.coer-textarea mat-form-field span.icon-container i.fa-solid.fa-circle-exclamation{color:var(--red)!important}div.coer-textarea mat-form-field span.placeholder{width:calc(100% + 32px)!important;height:100%!important;position:absolute!important;z-index:1!important;top:0!important;left:-16px!important;cursor:wait!important}div.coer-textarea mat-form-field .placeholder,div.coer-textarea mat-form-field .placeholder *,div.coer-textarea mat-form-field .placeholder-glow,div.coer-textarea mat-form-field .placeholder-glow *{cursor:wait!important}div.coer-textarea footer{padding-top:2px;text-align:right;font-size:10px;color:var(--gray)}div.coer-textarea mat-form-field.readonly div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:#bbbbbb83!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2$4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }] }); }
|
4021
3970
|
}
|
4022
3971
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerTextarea, decorators: [{
|
4023
3972
|
type: Component,
|
4024
|
-
args: [{ selector: 'coer-textarea', providers: [CONTROL_VALUE(CoerTextarea)], standalone: false, template: "<div class=\"coer-textarea\">\r\n <mat-form-field\r\n [id]=\"_id + '-container'\"\r\n [floatLabel]=\"
|
3973
|
+
args: [{ selector: 'coer-textarea', providers: [CONTROL_VALUE(CoerTextarea)], standalone: false, template: "<div class=\"coer-textarea\">\r\n <mat-form-field\r\n [id]=\"_id + '-container'\"\r\n [floatLabel]=\"_floatLabel()\"\r\n [ngClass]=\"{\r\n 'readonly': isReadonly() && !isLoading()\r\n }\"\r\n [style]=\"{\r\n 'width': width(),\r\n 'min-width': minWidth(),\r\n 'max-width': maxWidth(),\r\n 'margin-top': marginTop(),\r\n 'margin-right': marginRight(),\r\n 'margin-bottom': marginBottom(),\r\n 'margin-left': marginLeft()\r\n }\">\r\n <mat-label>{{ label() }}</mat-label>\r\n\r\n <textarea #coerTextArea matInput\r\n [id]=\"_id\"\r\n type=\"text\"\r\n [placeholder]=\"placeholder()\"\r\n [minLength]=\"minLength()\"\r\n [maxLength]=\"maxLength()\"\r\n [disabled]=\"!_isEnable()\"\r\n [value]=\"_value\"\r\n (input)=\"SetValue(coerTextArea.value)\"\r\n (blur)=\"SetTouched(true)\"\r\n [style]=\"{\r\n 'cursor' : isLoading() ? 'wait' : 'default',\r\n 'margin-top' : (_floatLabel() == 'auto') ? '15px' : '9px',\r\n 'padding-right': _paddingRight(),\r\n 'text-align' : textPosition(),\r\n 'resize' : (!resize() || !_isEnable()) ? 'none' : '',\r\n 'height' : height()\r\n }\"></textarea>\r\n\r\n @if(isLoading()) {\r\n <div class=\"placeholder-glow\">\r\n <span class=\"placeholder\"></span>\r\n </div>\r\n }\r\n\r\n <span ngClass=\"icon-container\">\r\n @if(isInvalid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-exclamation\"></i>\r\n }\r\n\r\n @else if(isValid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-check text-green\"></i>\r\n }\r\n </span>\r\n </mat-form-field>\r\n\r\n @if(showFooter()) {\r\n <footer> {{ footer }} </footer>\r\n }\r\n</div>", styles: ["div.coer-textarea mat-form-field{position:relative!important}div.coer-textarea mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{width:100%!important;padding:0!important}div.coer-textarea mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label{overflow:visible!important;position:absolute!important;top:20px!important}div.coer-textarea mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label.mdc-floating-label--float-above mat-label{color:var(--primary-inner);font-weight:700;position:relative;left:-10px;top:2px}div.coer-textarea mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix textarea{font-weight:400!important;font-size:17px!important;color:var(--black)!important;min-height:80px}div.coer-textarea mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active,div.coer-textarea mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:before,div.coer-textarea mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:after{border-bottom-color:var(--primary-inner)!important}div.coer-textarea mat-form-field div.mat-mdc-form-field-subscript-wrapper.mat-mdc-form-field-bottom-align{height:0px!important}div.coer-textarea mat-form-field span.icon-container{position:absolute!important;top:1px!important;right:-14px!important;z-index:5!important;width:30px;height:40px;display:flex;align-items:center;justify-content:center}div.coer-textarea mat-form-field span.icon-container i{font-size:20px!important}div.coer-textarea mat-form-field span.icon-container i.fa-solid.fa-xmark,div.coer-textarea mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass{color:#caced1!important;cursor:pointer!important}div.coer-textarea mat-form-field span.icon-container i.fa-solid.fa-xmark:hover,div.coer-textarea mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass:hover{color:#6c757d!important}div.coer-textarea mat-form-field span.icon-container i.fa-solid.fa-circle-check{color:var(--green)!important}div.coer-textarea mat-form-field span.icon-container i.fa-solid.fa-circle-exclamation{color:var(--red)!important}div.coer-textarea mat-form-field span.placeholder{width:calc(100% + 32px)!important;height:100%!important;position:absolute!important;z-index:1!important;top:0!important;left:-16px!important;cursor:wait!important}div.coer-textarea mat-form-field .placeholder,div.coer-textarea mat-form-field .placeholder *,div.coer-textarea mat-form-field .placeholder-glow,div.coer-textarea mat-form-field .placeholder-glow *{cursor:wait!important}div.coer-textarea footer{padding-top:2px;text-align:right;font-size:10px;color:var(--gray)}div.coer-textarea mat-form-field.readonly div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:#bbbbbb83!important}\n"] }]
|
4025
3974
|
}], propDecorators: { value: [{
|
4026
3975
|
type: Input
|
4027
3976
|
}] } });
|
@@ -4029,14 +3978,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
4029
3978
|
class CoerToolbar {
|
4030
3979
|
constructor() {
|
4031
3980
|
//variables
|
4032
|
-
this.
|
4033
|
-
this.
|
4034
|
-
this.
|
3981
|
+
this._isReadyPage = false;
|
3982
|
+
this._isLoading = false;
|
3983
|
+
this._awaitSignals = false;
|
4035
3984
|
this._isModalOpen = isModalOpenSIGNAL;
|
4036
3985
|
//appSettings
|
4037
|
-
this.
|
4038
|
-
this.
|
4039
|
-
this.
|
3986
|
+
this._appName = Tools.AvoidNull(appSettings?.appInfo?.name, 'string');
|
3987
|
+
this._appLogoPath = Tools.AvoidNull(appSettings?.appInfo?.logoPath, 'string');
|
3988
|
+
this._appLogoWidth = Tools.AvoidNull(appSettings?.appInfo?.logoWidth, 'string');
|
4040
3989
|
//Inputs
|
4041
3990
|
this.user = input(null);
|
4042
3991
|
this.image = input(null);
|
@@ -4081,25 +4030,26 @@ class CoerToolbar {
|
|
4081
4030
|
};
|
4082
4031
|
/** */
|
4083
4032
|
this.GetElementWidth = (element) => {
|
4084
|
-
return this.
|
4033
|
+
return this._isReadyPage
|
4085
4034
|
? HTMLElements.GetElementWidth(element, 48)
|
4086
4035
|
: '0px';
|
4087
4036
|
};
|
4088
4037
|
}
|
4038
|
+
//AfterViewInit
|
4089
4039
|
ngAfterViewInit() {
|
4090
|
-
Tools.Sleep(1000).then(() => this.
|
4040
|
+
Tools.Sleep(1000).then(() => this._isReadyPage = true);
|
4091
4041
|
}
|
4092
4042
|
/** */
|
4093
4043
|
ToogleSideNave() {
|
4094
|
-
this.
|
4044
|
+
this._isLoading = true;
|
4095
4045
|
this.onClickMenu.emit();
|
4096
4046
|
isMenuOpenSIGNAL.set(!isMenuOpenSIGNAL());
|
4097
|
-
Tools.Sleep(500, 'ToogleSideNave').then(() => this.
|
4047
|
+
Tools.Sleep(500, 'ToogleSideNave').then(() => this._isLoading = false);
|
4098
4048
|
}
|
4099
4049
|
//getter
|
4100
4050
|
get showLogo() {
|
4101
|
-
return (Tools.IsNull(appSettings?.appInfo?.showLogo) && this.
|
4102
|
-
|| (appSettings?.appInfo?.showLogo && this.
|
4051
|
+
return (Tools.IsNull(appSettings?.appInfo?.showLogo) && this._appLogoPath.length > 0)
|
4052
|
+
|| (appSettings?.appInfo?.showLogo && this._appLogoPath.length > 0);
|
4103
4053
|
}
|
4104
4054
|
//getter
|
4105
4055
|
get showUser() {
|
@@ -4112,11 +4062,11 @@ class CoerToolbar {
|
|
4112
4062
|
? '5px' : '0px';
|
4113
4063
|
}
|
4114
4064
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerToolbar, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
4115
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerToolbar, isStandalone: false, selector: "coer-toolbar", inputs: { user: { classPropertyName: "user", publicName: "user", isSignal: true, isRequired: false, transformFunction: null }, image: { classPropertyName: "image", publicName: "image", isSignal: true, isRequired: false, transformFunction: null }, menu: { classPropertyName: "menu", publicName: "menu", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClickMenu: "onClickMenu", onClickOption: "onClickOption" }, ngImport: i0, template: "<div id=\"coer-tool-bar\" [ngClass]=\"{ 'position-relative': _isModalOpen() }\">\r\n <mat-toolbar> \r\n @if(showLogo) {\r\n <div class=\"logo-image-container\" (click)=\"ToogleSideNave()\" [ngStyle]=\"{ 'width':
|
4065
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerToolbar, isStandalone: false, selector: "coer-toolbar", inputs: { user: { classPropertyName: "user", publicName: "user", isSignal: true, isRequired: false, transformFunction: null }, image: { classPropertyName: "image", publicName: "image", isSignal: true, isRequired: false, transformFunction: null }, menu: { classPropertyName: "menu", publicName: "menu", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClickMenu: "onClickMenu", onClickOption: "onClickOption" }, ngImport: i0, template: "<div id=\"coer-tool-bar\" [ngClass]=\"{ 'position-relative': _isModalOpen() }\">\r\n <mat-toolbar> \r\n @if(showLogo) {\r\n <div class=\"logo-image-container\" (click)=\"ToogleSideNave()\" [ngStyle]=\"{ 'width': _appLogoWidth }\">\r\n <div class=\"logo-image\" [ngStyle]=\"{ 'background-image': 'url(' + (_appLogoPath | noImage:'IMAGE') + ')' }\"></div>\r\n </div>\r\n }\r\n\r\n @else {\r\n <div class=\"button-container\">\r\n <coer-button\r\n type=\"icon-no-border\"\r\n icon=\"icon-bars\"\r\n color=\"navigation\"\r\n [isLoading]=\"_isLoading\"\r\n (onClick)=\"ToogleSideNave()\"\r\n ></coer-button>\r\n </div>\r\n\r\n <span class=\"app-name\"> {{ _appName }} </span> \r\n } \r\n\r\n <span class=\"fill-space\"></span> \r\n \r\n <div class=\"user-container\" (click)=\"dropdown.Open()\" [ngStyle]=\"{ \r\n 'padding-right': GetPadding('user-container'),\r\n 'display': showUser ? 'flex' : 'none'\r\n }\">\r\n \r\n <coer-dropdown\r\n #dropdown\r\n [dataSource]=\"menu()\" \r\n propDisplay=\"label\" \r\n width=\"auto\"\r\n [minWidth]=\"GetElementWidth(toolbarUserIdentity)\"\r\n maxWidth=\"auto\"\r\n (onSelected)=\"onClickOption.emit($event); dropdown.Unselect()\"\r\n ></coer-dropdown>\r\n\r\n <div class=\"user-image\" [ngStyle]=\"{ 'background-image': 'url(' + (image() | noImage:'USER') + ')' }\"></div>\r\n <div #toolbarUserIdentity id=\"toolbar-user-identity\" class=\"user-identity\" [ngStyle]=\"{ 'padding-left': GetPadding('user-identity') }\">\r\n \r\n @if(userName().length > 0) {\r\n <p> {{ userName() }} </p>\r\n }\r\n \r\n @if(userTitle().length > 0) {\r\n <p> {{ userTitle() }} </p>\r\n }\r\n </div> \r\n </div> \r\n \r\n @if(!showUser) {\r\n <span class=\"me-2\">\r\n <span class=\"fw-bold fa-fade\"> \r\n Loading <i class=\"fa-solid fa-sync fa-spin\"></i> \r\n </span> \r\n </span>\r\n }\r\n </mat-toolbar>\r\n\r\n <div class=\"shadow\"></div>\r\n</div>\r\n", styles: ["div#coer-tool-bar{z-index:1}div#coer-tool-bar mat-toolbar{height:45px!important;position:relative!important;z-index:10!important;padding:0!important;background-color:var(--toolbar-inner)!important;color:var(--toolbar-text-inner)!important}div#coer-tool-bar mat-toolbar span.app-name{height:40px!important;display:contents!important;max-width:45%}div#coer-tool-bar mat-toolbar div.logo-image-container{height:45px!important;min-width:100px}div#coer-tool-bar mat-toolbar div.logo-image-container div.logo-image{background-size:contain!important;background-repeat:no-repeat!important;background-position-y:bottom;width:100%!important;height:100%!important;cursor:pointer!important}div#coer-tool-bar mat-toolbar div.button-container{display:flex;align-items:center;justify-content:center;width:40px}div#coer-tool-bar mat-toolbar div.user-container{max-width:45%;display:flex;align-items:center;font-size:small!important;font-weight:700;height:0px!important;max-height:0px!important;padding-left:2px!important;margin-right:10px!important;border-radius:8px!important;cursor:pointer!important}div#coer-tool-bar mat-toolbar div.user-container div.user-image{min-width:35px!important;max-width:35px!important;min-height:35px!important;max-height:35px!important;border-radius:25px;background:transparent;background-size:cover;background-repeat:no-repeat;background-position:top}div#coer-tool-bar mat-toolbar div.user-container div.user-identity{height:40px!important;max-height:40px!important;min-width:70px!important;overflow:hidden!important;display:flex!important;flex-flow:column!important;justify-content:center!important}div#coer-tool-bar mat-toolbar div.user-container div.user-identity p{line-height:normal!important;overflow:hidden;text-overflow:ellipsis}div#coer-tool-bar mat-toolbar div.user-container div.user-identity p::selection{background-color:transparent!important}div#coer-tool-bar mat-toolbar div.user-container coer-dropdown{position:absolute;transform:translate(-3px)}div#coer-tool-bar mat-toolbar div.user-container coer-dropdown ul{right:0!important}div#coer-tool-bar mat-toolbar div.user-container:hover{transform:scale(1.03);box-shadow:0 0 15px -5px #000!important}div#coer-tool-bar div.shadow{box-shadow:1px -10px 20px #000!important;width:100vw;height:45px;position:absolute;top:0;z-index:8}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2$9.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "component", type: CoerButton, selector: "coer-button", inputs: ["id", "color", "type", "icon", "iconPosition", "path", "isLoading", "isDisabled", "isReadonly", "isInvisible", "width", "minWidth", "maxWidth", "height", "minHeight", "marginTop", "marginRight", "marginBottom", "marginLeft", "tooltip", "tooltipPosition"], outputs: ["onClick"] }, { kind: "component", type: CoerDropdown, selector: "coer-dropdown", inputs: ["id", "value", "label", "color", "type", "dataSource", "propDisplay", "rowsByPage", "isLoading", "isDisabled", "isReadonly", "isInvisible", "width", "minWidth", "maxWidth", "marginTop", "marginRight", "marginBottom", "marginLeft", "tooltip", "tooltipPosition"], outputs: ["onSelected", "onUnselect"] }, { kind: "pipe", type: i9.NoImagePipe, name: "noImage" }] }); }
|
4116
4066
|
}
|
4117
4067
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerToolbar, decorators: [{
|
4118
4068
|
type: Component,
|
4119
|
-
args: [{ selector: 'coer-toolbar', standalone: false, template: "<div id=\"coer-tool-bar\" [ngClass]=\"{ 'position-relative': _isModalOpen() }\">\r\n <mat-toolbar> \r\n @if(showLogo) {\r\n <div class=\"logo-image-container\" (click)=\"ToogleSideNave()\" [ngStyle]=\"{ 'width':
|
4069
|
+
args: [{ selector: 'coer-toolbar', standalone: false, template: "<div id=\"coer-tool-bar\" [ngClass]=\"{ 'position-relative': _isModalOpen() }\">\r\n <mat-toolbar> \r\n @if(showLogo) {\r\n <div class=\"logo-image-container\" (click)=\"ToogleSideNave()\" [ngStyle]=\"{ 'width': _appLogoWidth }\">\r\n <div class=\"logo-image\" [ngStyle]=\"{ 'background-image': 'url(' + (_appLogoPath | noImage:'IMAGE') + ')' }\"></div>\r\n </div>\r\n }\r\n\r\n @else {\r\n <div class=\"button-container\">\r\n <coer-button\r\n type=\"icon-no-border\"\r\n icon=\"icon-bars\"\r\n color=\"navigation\"\r\n [isLoading]=\"_isLoading\"\r\n (onClick)=\"ToogleSideNave()\"\r\n ></coer-button>\r\n </div>\r\n\r\n <span class=\"app-name\"> {{ _appName }} </span> \r\n } \r\n\r\n <span class=\"fill-space\"></span> \r\n \r\n <div class=\"user-container\" (click)=\"dropdown.Open()\" [ngStyle]=\"{ \r\n 'padding-right': GetPadding('user-container'),\r\n 'display': showUser ? 'flex' : 'none'\r\n }\">\r\n \r\n <coer-dropdown\r\n #dropdown\r\n [dataSource]=\"menu()\" \r\n propDisplay=\"label\" \r\n width=\"auto\"\r\n [minWidth]=\"GetElementWidth(toolbarUserIdentity)\"\r\n maxWidth=\"auto\"\r\n (onSelected)=\"onClickOption.emit($event); dropdown.Unselect()\"\r\n ></coer-dropdown>\r\n\r\n <div class=\"user-image\" [ngStyle]=\"{ 'background-image': 'url(' + (image() | noImage:'USER') + ')' }\"></div>\r\n <div #toolbarUserIdentity id=\"toolbar-user-identity\" class=\"user-identity\" [ngStyle]=\"{ 'padding-left': GetPadding('user-identity') }\">\r\n \r\n @if(userName().length > 0) {\r\n <p> {{ userName() }} </p>\r\n }\r\n \r\n @if(userTitle().length > 0) {\r\n <p> {{ userTitle() }} </p>\r\n }\r\n </div> \r\n </div> \r\n \r\n @if(!showUser) {\r\n <span class=\"me-2\">\r\n <span class=\"fw-bold fa-fade\"> \r\n Loading <i class=\"fa-solid fa-sync fa-spin\"></i> \r\n </span> \r\n </span>\r\n }\r\n </mat-toolbar>\r\n\r\n <div class=\"shadow\"></div>\r\n</div>\r\n", styles: ["div#coer-tool-bar{z-index:1}div#coer-tool-bar mat-toolbar{height:45px!important;position:relative!important;z-index:10!important;padding:0!important;background-color:var(--toolbar-inner)!important;color:var(--toolbar-text-inner)!important}div#coer-tool-bar mat-toolbar span.app-name{height:40px!important;display:contents!important;max-width:45%}div#coer-tool-bar mat-toolbar div.logo-image-container{height:45px!important;min-width:100px}div#coer-tool-bar mat-toolbar div.logo-image-container div.logo-image{background-size:contain!important;background-repeat:no-repeat!important;background-position-y:bottom;width:100%!important;height:100%!important;cursor:pointer!important}div#coer-tool-bar mat-toolbar div.button-container{display:flex;align-items:center;justify-content:center;width:40px}div#coer-tool-bar mat-toolbar div.user-container{max-width:45%;display:flex;align-items:center;font-size:small!important;font-weight:700;height:0px!important;max-height:0px!important;padding-left:2px!important;margin-right:10px!important;border-radius:8px!important;cursor:pointer!important}div#coer-tool-bar mat-toolbar div.user-container div.user-image{min-width:35px!important;max-width:35px!important;min-height:35px!important;max-height:35px!important;border-radius:25px;background:transparent;background-size:cover;background-repeat:no-repeat;background-position:top}div#coer-tool-bar mat-toolbar div.user-container div.user-identity{height:40px!important;max-height:40px!important;min-width:70px!important;overflow:hidden!important;display:flex!important;flex-flow:column!important;justify-content:center!important}div#coer-tool-bar mat-toolbar div.user-container div.user-identity p{line-height:normal!important;overflow:hidden;text-overflow:ellipsis}div#coer-tool-bar mat-toolbar div.user-container div.user-identity p::selection{background-color:transparent!important}div#coer-tool-bar mat-toolbar div.user-container coer-dropdown{position:absolute;transform:translate(-3px)}div#coer-tool-bar mat-toolbar div.user-container coer-dropdown ul{right:0!important}div#coer-tool-bar mat-toolbar div.user-container:hover{transform:scale(1.03);box-shadow:0 0 15px -5px #000!important}div#coer-tool-bar div.shadow{box-shadow:1px -10px 20px #000!important;width:100vw;height:45px;position:absolute;top:0;z-index:8}\n"] }]
|
4120
4070
|
}] });
|
4121
4071
|
|
4122
4072
|
class ComponentsModule {
|
@@ -4127,6 +4077,7 @@ class ComponentsModule {
|
|
4127
4077
|
CoerCheckbox,
|
4128
4078
|
CoerDateBox,
|
4129
4079
|
CoerFilebox,
|
4080
|
+
CoerFileboxImage,
|
4130
4081
|
CoerForm,
|
4131
4082
|
CoerGrid,
|
4132
4083
|
CoerList,
|
@@ -4165,6 +4116,7 @@ class ComponentsModule {
|
|
4165
4116
|
MatNativeDateModule,
|
4166
4117
|
MatSlideToggleModule,
|
4167
4118
|
MatToolbarModule,
|
4119
|
+
MatTooltipModule,
|
4168
4120
|
MatTabsModule,
|
4169
4121
|
DirectivesModule,
|
4170
4122
|
PipesModule], exports: [CoerAccordion,
|
@@ -4207,6 +4159,7 @@ class ComponentsModule {
|
|
4207
4159
|
MatNativeDateModule,
|
4208
4160
|
MatSlideToggleModule,
|
4209
4161
|
MatToolbarModule,
|
4162
|
+
MatTooltipModule,
|
4210
4163
|
MatTabsModule,
|
4211
4164
|
DirectivesModule,
|
4212
4165
|
PipesModule] }); }
|
@@ -4237,6 +4190,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
4237
4190
|
MatNativeDateModule,
|
4238
4191
|
MatSlideToggleModule,
|
4239
4192
|
MatToolbarModule,
|
4193
|
+
MatTooltipModule,
|
4240
4194
|
MatTabsModule,
|
4241
4195
|
DirectivesModule,
|
4242
4196
|
PipesModule
|
@@ -4248,6 +4202,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
4248
4202
|
CoerCheckbox,
|
4249
4203
|
CoerDateBox,
|
4250
4204
|
CoerFilebox,
|
4205
|
+
CoerFileboxImage,
|
4251
4206
|
CoerForm,
|
4252
4207
|
CoerGrid,
|
4253
4208
|
CoerList,
|