@leanix/components 0.2.107 → 0.2.111
Sign up to get free protection for your applications and to get access to all the features.
- package/bundles/leanix-components.umd.js +174 -24
- package/bundles/leanix-components.umd.js.map +1 -1
- package/esm2015/index.js +2 -0
- package/esm2015/index.js.map +1 -1
- package/esm2015/lib/core-ui/components/button/button.component.js +11 -17
- package/esm2015/lib/core-ui/components/button/button.component.js.map +1 -1
- package/esm2015/lib/core-ui/components/collapsible/collapsible.component.js +1 -1
- package/esm2015/lib/core-ui/components/collapsible/collapsible.component.js.map +1 -1
- package/esm2015/lib/forms-ui/components/drag-and-drop-list/drag-and-drop-list-item/drag-and-drop-list-item.component.js +1 -1
- package/esm2015/lib/forms-ui/components/error-message/error-message.component.js +29 -0
- package/esm2015/lib/forms-ui/components/error-message/error-message.component.js.map +1 -0
- package/esm2015/lib/forms-ui/components/sorting-dropdown-trigger/sorting-dropdown-trigger.component.js +1 -1
- package/esm2015/lib/forms-ui/directives/form-error.directive.js +101 -0
- package/esm2015/lib/forms-ui/directives/form-error.directive.js.map +1 -0
- package/esm2015/lib/forms-ui/forms-ui.module.js +14 -4
- package/esm2015/lib/forms-ui/forms-ui.module.js.map +1 -1
- package/fesm2015/leanix-components.js +148 -25
- package/fesm2015/leanix-components.js.map +1 -1
- package/index.d.ts +2 -0
- package/lib/core-ui/components/button/button.component.d.ts +3 -4
- package/lib/forms-ui/components/error-message/error-message.component.d.ts +10 -0
- package/lib/forms-ui/directives/form-error.directive.d.ts +34 -0
- package/lib/forms-ui/forms-ui.module.d.ts +11 -9
- package/package.json +1 -1
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as i2 from '@angular/common';
|
2
2
|
import { CommonModule, formatDate } from '@angular/common';
|
3
3
|
import * as i0 from '@angular/core';
|
4
|
-
import { Component, Input, HostBinding,
|
4
|
+
import { Component, Input, HostBinding, ChangeDetectionStrategy, EventEmitter, Output, HostListener, Directive, Pipe, SecurityContext, ContentChildren, Injectable, InjectionToken, Optional, Inject, NgModule, ViewChildren, ViewChild, ContentChild, forwardRef, TemplateRef, Self } from '@angular/core';
|
5
5
|
import * as i3$3 from '@angular/cdk/portal';
|
6
6
|
import { ComponentPortal, CdkPortal, PortalModule } from '@angular/cdk/portal';
|
7
7
|
import * as i1 from '@angular/cdk/overlay';
|
@@ -113,25 +113,23 @@ class ButtonComponent {
|
|
113
113
|
this.selected = false;
|
114
114
|
this.square = false;
|
115
115
|
this.circle = false;
|
116
|
+
this.disabled = false;
|
116
117
|
this.showSpinner = false;
|
117
|
-
this.noOutline = false;
|
118
|
-
}
|
119
|
-
disableOutline() {
|
120
|
-
this.noOutline = true;
|
121
118
|
}
|
122
|
-
|
123
|
-
this.
|
119
|
+
get isDisabled() {
|
120
|
+
return this.disabled || this.showSpinner;
|
124
121
|
}
|
125
122
|
}
|
126
123
|
ButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.4", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
127
|
-
ButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.4", type: ButtonComponent, selector: "button[lx-button]", inputs: { size: "size", color: "color", mode: "mode", pressed: "pressed", selected: "selected", square: "square", circle: "circle", showSpinner: "showSpinner" }, host: { listeners: { "click": "disableOutline()", "keyup.tab": "enableOutline()" }, properties: { "attr.size": "this.size", "attr.color": "this.color", "attr.mode": "this.mode", "class.pressed": "this.pressed", "class.selected": "this.selected", "class.square": "this.square", "class.circle": "this.circle", "class.loading": "this.showSpinner", "class.noOutline": "this.noOutline" } }, ngImport: i0, template: "<lx-tiny-spinner *ngIf=\"showSpinner\"></lx-tiny-spinner>\n<ng-content></ng-content>\n", styles: [":root{--lx-color-danger:#f96464;--lx-color-grey80:#c2c9d6;--lx-color-grey90:#e1e5eb}@-webkit-keyframes spinOnceFadeInKeyFrames{0%{opacity:0;transform:rotate(0deg)}to{opacity:1;transform:rotate(-180deg)}}@keyframes spinOnceFadeInKeyFrames{0%{opacity:0;transform:rotate(0deg)}to{opacity:1;transform:rotate(-180deg)}}@-webkit-keyframes spinOnceFadeOutKeyFrames{0%{opacity:1;transform:rotate(-180deg)}to{opacity:0;transform:rotate(0deg)}}@keyframes spinOnceFadeOutKeyFrames{0%{opacity:1;transform:rotate(-180deg)}to{opacity:0;transform:rotate(0deg)}}@-webkit-keyframes slideUpKeyFrames{0%{transform:translateY(10px);opacity:0}20%{transform:translateY(10px);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes slideUpKeyFrames{0%{transform:translateY(10px);opacity:0}20%{transform:translateY(10px);opacity:0}to{transform:translateY(0);opacity:1}}@-webkit-keyframes subtleScaleUpKeyFrames{0%{transform:scale(.95);opacity:0}to{transform:scale(1);opacity:1}}@keyframes subtleScaleUpKeyFrames{0%{transform:scale(.95);opacity:0}to{transform:scale(1);opacity:1}}:host{border-radius:3px;font-weight:400;cursor:pointer;transition:color,background-color,border-color .18s;transition-delay:0s;transition-timing-function:ease}:host[disabled]{opacity:.5;cursor:default}:host[color=default] lx-tiny-spinner{color:#2a303d}:host[color=default][mode=solid]{color:#2a303d;background-color:#f0f2f5;border:1px solid #f0f2f5}:host[color=default][mode=solid]:focus:not([disabled]),:host[color=default][mode=solid]:hover:not([disabled]){color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=default][mode=solid]:active:not([disabled]){color:#2a303d;background-color:#c2c9d6;border:1px solid #c2c9d6}:host[color=default][mode=solid].pressed{background-color:#c2c9d6!important;border-color:#c2c9d6!important}:host[color=default][mode=solid].selected{color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=default][mode=outline]{color:#2a303d;background-color:transparent;border:1px solid #e1e5eb}:host[color=default][mode=outline]:focus:not([disabled]),:host[color=default][mode=outline]:hover:not([disabled]){color:#2a303d;background-color:#f0f2f5;border:1px solid #f0f2f5}:host[color=default][mode=outline]:active:not([disabled]){color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=default][mode=ghost]{color:#2a303d;background-color:transparent;border:1px solid transparent}:host[color=default][mode=ghost]:focus:not([disabled]),:host[color=default][mode=ghost]:hover:not([disabled]){color:#2a303d;background-color:transparent;border:1px solid #e1e5eb}:host[color=default][mode=ghost]:active:not([disabled]){color:#2a303d;background-color:#f0f2f5;border:1px solid #f0f2f5}:host[color=default][mode=link]{color:#2a303d;background-color:transparent;border:1px solid transparent;padding:0}:host[color=default][mode=link]:active:not([disabled]),:host[color=default][mode=link]:focus:not([disabled]),:host[color=default][mode=link]:hover:not([disabled]){color:#2a303d;background-color:transparent;border:1px solid transparent;text-decoration:underline}:host[color=light] lx-tiny-spinner{color:#2a303d}:host[color=light][mode=solid]{color:#2a303d;background-color:#fff;border:1px solid #e1e5eb}:host[color=light][mode=solid]:focus:not([disabled]),:host[color=light][mode=solid]:hover:not([disabled]){color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=light][mode=solid]:active:not([disabled]){color:#2a303d;background-color:#c2c9d6;border:1px solid #c2c9d6}:host[color=light][mode=solid].pressed{background-color:#c2c9d6!important;border-color:#c2c9d6!important}:host[color=light][mode=solid].selected{color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=light][mode=outline]{color:#2a303d;background-color:transparent;border:1px solid #e1e5eb}:host[color=light][mode=outline]:focus:not([disabled]),:host[color=light][mode=outline]:hover:not([disabled]){color:#2a303d;background-color:#fff;border:1px solid #fff}:host[color=light][mode=outline]:active:not([disabled]){color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=light][mode=ghost]{color:#2a303d;background-color:transparent;border:1px solid transparent}:host[color=light][mode=ghost]:focus:not([disabled]),:host[color=light][mode=ghost]:hover:not([disabled]){color:#2a303d;background-color:transparent;border:1px solid #e1e5eb}:host[color=light][mode=ghost]:active:not([disabled]){color:#2a303d;background-color:#fff;border:1px solid #fff}:host[color=light][mode=link]{color:#2a303d;background-color:transparent;border:1px solid transparent;padding:0}:host[color=light][mode=link]:active:not([disabled]),:host[color=light][mode=link]:focus:not([disabled]),:host[color=light][mode=link]:hover:not([disabled]){color:#2a303d;background-color:transparent;border:1px solid transparent;text-decoration:underline}:host[color=primary] lx-tiny-spinner{color:var(--lx-primarybutton-fontcolor)}:host[color=primary][mode=solid]{color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolor);border:1px solid var(--lx-primarybutton-backgroundcolor)}:host[color=primary][mode=solid]:focus:not([disabled]),:host[color=primary][mode=solid]:hover:not([disabled]){color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolorhover);border:1px solid var(--lx-primarybutton-backgroundcolorhover)}:host[color=primary][mode=solid]:active:not([disabled]){color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcoloractive);border:1px solid var(--lx-primarybutton-backgroundcoloractive)}:host[color=primary][mode=solid].pressed{background-color:var(--lx-primarybutton-backgroundcoloractive)!important;border-color:var(--lx-primarybutton-backgroundcoloractive)!important}:host[color=primary][mode=solid].selected{color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolorhover);border:1px solid var(--lx-primarybutton-backgroundcolorhover)}:host[color=primary][mode=outline]{color:var(--lx-primarybutton-backgroundcolor);background-color:transparent;border:1px solid var(--lx-primarybutton-backgroundcolor)}:host[color=primary][mode=outline]:focus:not([disabled]),:host[color=primary][mode=outline]:hover:not([disabled]){color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolor);border:1px solid var(--lx-primarybutton-backgroundcolor)}:host[color=primary][mode=outline]:active:not([disabled]){color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolorhover);border:1px solid var(--lx-primarybutton-backgroundcolorhover)}:host[color=primary][mode=ghost]{color:var(--lx-primarybutton-backgroundcolor);background-color:transparent;border:1px solid transparent}:host[color=primary][mode=ghost]:focus:not([disabled]),:host[color=primary][mode=ghost]:hover:not([disabled]){color:var(--lx-primarybutton-backgroundcolor);background-color:transparent;border:1px solid var(--lx-primarybutton-backgroundcolor)}:host[color=primary][mode=ghost]:active:not([disabled]){color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolor);border:1px solid var(--lx-primarybutton-backgroundcolor)}:host[color=primary][mode=link]{color:var(--lx-primarybutton-backgroundcolor);background-color:transparent;border:1px solid transparent;padding:0}:host[color=primary][mode=link]:active:not([disabled]),:host[color=primary][mode=link]:focus:not([disabled]),:host[color=primary][mode=link]:hover:not([disabled]){color:var(--lx-primarybutton-backgroundcolor);background-color:transparent;border:1px solid transparent;text-decoration:underline}:host[color=danger] lx-tiny-spinner{color:#fff}:host[color=danger][mode=solid]{color:#fff;background-color:#f96464;border:1px solid #f96464}:host[color=danger][mode=solid]:focus:not([disabled]),:host[color=danger][mode=solid]:hover:not([disabled]){color:#fff;background-color:#f73232;border:1px solid #f73232}:host[color=danger][mode=solid]:active:not([disabled]){color:#fff;background-color:#eb0909;border:1px solid #eb0909}:host[color=danger][mode=solid].pressed{background-color:#eb0909!important;border-color:#eb0909!important}:host[color=danger][mode=solid].selected{color:#fff;background-color:#f73232;border:1px solid #f73232}:host[color=danger][mode=outline]{color:#f96464;background-color:transparent;border:1px solid #f96464}:host[color=danger][mode=outline]:focus:not([disabled]),:host[color=danger][mode=outline]:hover:not([disabled]){color:#fff;background-color:#f96464;border:1px solid #f96464}:host[color=danger][mode=outline]:active:not([disabled]){color:#fff;background-color:#f73232;border:1px solid #f73232}:host[color=danger][mode=ghost]{color:#f96464;background-color:transparent;border:1px solid transparent}:host[color=danger][mode=ghost]:focus:not([disabled]),:host[color=danger][mode=ghost]:hover:not([disabled]){color:#f96464;background-color:transparent;border:1px solid #f96464}:host[color=danger][mode=ghost]:active:not([disabled]){color:#fff;background-color:#f96464;border:1px solid #f96464}:host[color=danger][mode=link]{color:#f96464;background-color:transparent;border:1px solid transparent;padding:0}:host[color=danger][mode=link]:active:not([disabled]),:host[color=danger][mode=link]:focus:not([disabled]),:host[color=danger][mode=link]:hover:not([disabled]){color:#f96464;background-color:transparent;border:1px solid transparent;text-decoration:underline}:host[color=success] lx-tiny-spinner{color:#fff}:host[color=success][mode=solid]{color:#fff;background-color:#33cc58;border:1px solid #33cc58}:host[color=success][mode=solid]:focus:not([disabled]),:host[color=success][mode=solid]:hover:not([disabled]){color:#fff;background-color:#2bad4b;border:1px solid #2bad4b}:host[color=success][mode=solid]:active:not([disabled]){color:#fff;background-color:#248f3e;border:1px solid #248f3e}:host[color=success][mode=solid].pressed{background-color:#248f3e!important;border-color:#248f3e!important}:host[color=success][mode=solid].selected{color:#fff;background-color:#2bad4b;border:1px solid #2bad4b}:host[color=success][mode=outline]{color:#33cc58;background-color:transparent;border:1px solid #33cc58}:host[color=success][mode=outline]:focus:not([disabled]),:host[color=success][mode=outline]:hover:not([disabled]){color:#fff;background-color:#33cc58;border:1px solid #33cc58}:host[color=success][mode=outline]:active:not([disabled]){color:#fff;background-color:#2bad4b;border:1px solid #2bad4b}:host[color=success][mode=ghost]{color:#33cc58;background-color:transparent;border:1px solid transparent}:host[color=success][mode=ghost]:focus:not([disabled]),:host[color=success][mode=ghost]:hover:not([disabled]){color:#33cc58;background-color:transparent;border:1px solid #33cc58}:host[color=success][mode=ghost]:active:not([disabled]){color:#fff;background-color:#33cc58;border:1px solid #33cc58}:host[color=success][mode=link]{color:#33cc58;background-color:transparent;border:1px solid transparent;padding:0}:host[color=success][mode=link]:active:not([disabled]),:host[color=success][mode=link]:focus:not([disabled]),:host[color=success][mode=link]:hover:not([disabled]){color:#33cc58;background-color:transparent;border:1px solid transparent;text-decoration:underline}:host.noOutline{outline:0}:host[size=small]{height:20px;line-height:12px;padding:3px 7px;font-size:11px;min-width:20px}:host[size=small].square{width:20px;text-align:center;padding:0}:host[size=small].circle{border-radius:10px;min-width:20px;padding:0 3px}:host[size=medium]{height:24px;line-height:16px;padding:3px 7px;font-size:12px;min-width:24px}:host[size=medium].square{width:24px;text-align:center;padding:0}:host[size=medium].circle{border-radius:11px;min-width:24px;padding:0 3px}:host[size=large]{height:32px;line-height:16px;padding:7px 11px;font-size:12px;min-width:32px}:host[size=large].square{width:32px;text-align:center;padding:0}:host[size=large].circle{border-radius:15px;min-width:32px;padding:0 7px}:host[size=auto]{height:auto;line-height:normal;padding:0;font-size:inherit;min-width:auto}:host[size=auto].square{width:auto;text-align:center;padding:0}:host[size=auto].circle{border-radius:unset;min-width:auto;padding:0}:host.loading{position:relative;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:.5;color:transparent!important}:host.loading lx-tiny-spinner{position:absolute;left:calc(50% - (1em / 2))}"], components: [{ type: TinySpinnerComponent, selector: "lx-tiny-spinner" }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
124
|
+
ButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.4", type: ButtonComponent, selector: "button[lx-button]", inputs: { size: "size", color: "color", mode: "mode", pressed: "pressed", selected: "selected", square: "square", circle: "circle", disabled: "disabled", showSpinner: "showSpinner" }, host: { properties: { "attr.size": "this.size", "attr.color": "this.color", "attr.mode": "this.mode", "class.pressed": "this.pressed", "class.selected": "this.selected", "class.square": "this.square", "class.circle": "this.circle", "class.loading": "this.showSpinner", "disabled": "this.isDisabled" } }, ngImport: i0, template: "<lx-tiny-spinner *ngIf=\"showSpinner\"></lx-tiny-spinner>\n<ng-content></ng-content>\n", styles: [":host{border-radius:3px;font-weight:400;cursor:pointer;transition:color,background-color,border-color .18s;transition-delay:0s;transition-timing-function:ease}:host[disabled]{opacity:.5;cursor:default}:host[color=default] lx-tiny-spinner{color:#2a303d}:host[color=default][mode=solid]{color:#2a303d;background-color:#f0f2f5;border:1px solid #f0f2f5}:host[color=default][mode=solid]:focus:not([disabled]),:host[color=default][mode=solid]:hover:not([disabled]){color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=default][mode=solid]:active:not([disabled]){color:#2a303d;background-color:#c2c9d6;border:1px solid #c2c9d6}:host[color=default][mode=solid].pressed{background-color:#c2c9d6!important;border-color:#c2c9d6!important}:host[color=default][mode=solid].selected{color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=default][mode=outline]{color:#2a303d;background-color:transparent;border:1px solid #e1e5eb}:host[color=default][mode=outline]:focus:not([disabled]),:host[color=default][mode=outline]:hover:not([disabled]){color:#2a303d;background-color:#f0f2f5;border:1px solid #f0f2f5}:host[color=default][mode=outline]:active:not([disabled]){color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=default][mode=ghost]{color:#2a303d;background-color:transparent;border:1px solid transparent}:host[color=default][mode=ghost]:focus:not([disabled]),:host[color=default][mode=ghost]:hover:not([disabled]){color:#2a303d;background-color:transparent;border:1px solid #e1e5eb}:host[color=default][mode=ghost]:active:not([disabled]){color:#2a303d;background-color:#f0f2f5;border:1px solid #f0f2f5}:host[color=default][mode=link]{color:#2a303d;background-color:transparent;border:1px solid transparent;padding:0}:host[color=default][mode=link]:active:not([disabled]),:host[color=default][mode=link]:focus:not([disabled]),:host[color=default][mode=link]:hover:not([disabled]){color:#2a303d;background-color:transparent;border:1px solid transparent;text-decoration:underline}:host[color=light] lx-tiny-spinner{color:#2a303d}:host[color=light][mode=solid]{color:#2a303d;background-color:#fff;border:1px solid #e1e5eb}:host[color=light][mode=solid]:focus:not([disabled]),:host[color=light][mode=solid]:hover:not([disabled]){color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=light][mode=solid]:active:not([disabled]){color:#2a303d;background-color:#c2c9d6;border:1px solid #c2c9d6}:host[color=light][mode=solid].pressed{background-color:#c2c9d6!important;border-color:#c2c9d6!important}:host[color=light][mode=solid].selected{color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=light][mode=outline]{color:#2a303d;background-color:transparent;border:1px solid #e1e5eb}:host[color=light][mode=outline]:focus:not([disabled]),:host[color=light][mode=outline]:hover:not([disabled]){color:#2a303d;background-color:#fff;border:1px solid #fff}:host[color=light][mode=outline]:active:not([disabled]){color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=light][mode=ghost]{color:#2a303d;background-color:transparent;border:1px solid transparent}:host[color=light][mode=ghost]:focus:not([disabled]),:host[color=light][mode=ghost]:hover:not([disabled]){color:#2a303d;background-color:transparent;border:1px solid #e1e5eb}:host[color=light][mode=ghost]:active:not([disabled]){color:#2a303d;background-color:#fff;border:1px solid #fff}:host[color=light][mode=link]{color:#2a303d;background-color:transparent;border:1px solid transparent;padding:0}:host[color=light][mode=link]:active:not([disabled]),:host[color=light][mode=link]:focus:not([disabled]),:host[color=light][mode=link]:hover:not([disabled]){color:#2a303d;background-color:transparent;border:1px solid transparent;text-decoration:underline}:host[color=primary] lx-tiny-spinner{color:var(--lx-primarybutton-fontcolor)}:host[color=primary][mode=solid]{color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolor);border:1px solid var(--lx-primarybutton-backgroundcolor)}:host[color=primary][mode=solid]:focus:not([disabled]),:host[color=primary][mode=solid]:hover:not([disabled]){color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolorhover);border:1px solid var(--lx-primarybutton-backgroundcolorhover)}:host[color=primary][mode=solid]:active:not([disabled]){color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcoloractive);border:1px solid var(--lx-primarybutton-backgroundcoloractive)}:host[color=primary][mode=solid].pressed{background-color:var(--lx-primarybutton-backgroundcoloractive)!important;border-color:var(--lx-primarybutton-backgroundcoloractive)!important}:host[color=primary][mode=solid].selected{color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolorhover);border:1px solid var(--lx-primarybutton-backgroundcolorhover)}:host[color=primary][mode=outline]{color:var(--lx-primarybutton-backgroundcolor);background-color:transparent;border:1px solid var(--lx-primarybutton-backgroundcolor)}:host[color=primary][mode=outline]:focus:not([disabled]),:host[color=primary][mode=outline]:hover:not([disabled]){color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolor);border:1px solid var(--lx-primarybutton-backgroundcolor)}:host[color=primary][mode=outline]:active:not([disabled]){color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolorhover);border:1px solid var(--lx-primarybutton-backgroundcolorhover)}:host[color=primary][mode=ghost]{color:var(--lx-primarybutton-backgroundcolor);background-color:transparent;border:1px solid transparent}:host[color=primary][mode=ghost]:focus:not([disabled]),:host[color=primary][mode=ghost]:hover:not([disabled]){color:var(--lx-primarybutton-backgroundcolor);background-color:transparent;border:1px solid var(--lx-primarybutton-backgroundcolor)}:host[color=primary][mode=ghost]:active:not([disabled]){color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolor);border:1px solid var(--lx-primarybutton-backgroundcolor)}:host[color=primary][mode=link]{color:var(--lx-primarybutton-backgroundcolor);background-color:transparent;border:1px solid transparent;padding:0}:host[color=primary][mode=link]:active:not([disabled]),:host[color=primary][mode=link]:focus:not([disabled]),:host[color=primary][mode=link]:hover:not([disabled]){color:var(--lx-primarybutton-backgroundcolor);background-color:transparent;border:1px solid transparent;text-decoration:underline}:host[color=danger] lx-tiny-spinner{color:#fff}:host[color=danger][mode=solid]{color:#fff;background-color:#f96464;border:1px solid #f96464}:host[color=danger][mode=solid]:focus:not([disabled]),:host[color=danger][mode=solid]:hover:not([disabled]){color:#fff;background-color:#f61a1a;border:1px solid #f61a1a}:host[color=danger][mode=solid]:active:not([disabled]){color:#fff;background-color:#bd0707;border:1px solid #bd0707}:host[color=danger][mode=solid].pressed{background-color:#bd0707!important;border-color:#bd0707!important}:host[color=danger][mode=solid].selected{color:#fff;background-color:#f61a1a;border:1px solid #f61a1a}:host[color=danger][mode=outline]{color:#f96464;background-color:transparent;border:1px solid #f96464}:host[color=danger][mode=outline]:focus:not([disabled]),:host[color=danger][mode=outline]:hover:not([disabled]){color:#fff;background-color:#f96464;border:1px solid #f96464}:host[color=danger][mode=outline]:active:not([disabled]){color:#fff;background-color:#f61a1a;border:1px solid #f61a1a}:host[color=danger][mode=ghost]{color:#f96464;background-color:transparent;border:1px solid transparent}:host[color=danger][mode=ghost]:focus:not([disabled]),:host[color=danger][mode=ghost]:hover:not([disabled]){color:#f96464;background-color:transparent;border:1px solid #f96464}:host[color=danger][mode=ghost]:active:not([disabled]){color:#fff;background-color:#f96464;border:1px solid #f96464}:host[color=danger][mode=link]{color:#f96464;background-color:transparent;border:1px solid transparent;padding:0}:host[color=danger][mode=link]:active:not([disabled]),:host[color=danger][mode=link]:focus:not([disabled]),:host[color=danger][mode=link]:hover:not([disabled]){color:#f96464;background-color:transparent;border:1px solid transparent;text-decoration:underline}:host[color=success] lx-tiny-spinner{color:#fff}:host[color=success][mode=solid]{color:#fff;background-color:#33cc58;border:1px solid #33cc58}:host[color=success][mode=solid]:focus:not([disabled]),:host[color=success][mode=solid]:hover:not([disabled]){color:#fff;background-color:#248f3e;border:1px solid #248f3e}:host[color=success][mode=solid]:active:not([disabled]){color:#fff;background-color:#145223;border:1px solid #145223}:host[color=success][mode=solid].pressed{background-color:#145223!important;border-color:#145223!important}:host[color=success][mode=solid].selected{color:#fff;background-color:#248f3e;border:1px solid #248f3e}:host[color=success][mode=outline]{color:#33cc58;background-color:transparent;border:1px solid #33cc58}:host[color=success][mode=outline]:focus:not([disabled]),:host[color=success][mode=outline]:hover:not([disabled]){color:#fff;background-color:#33cc58;border:1px solid #33cc58}:host[color=success][mode=outline]:active:not([disabled]){color:#fff;background-color:#248f3e;border:1px solid #248f3e}:host[color=success][mode=ghost]{color:#33cc58;background-color:transparent;border:1px solid transparent}:host[color=success][mode=ghost]:focus:not([disabled]),:host[color=success][mode=ghost]:hover:not([disabled]){color:#33cc58;background-color:transparent;border:1px solid #33cc58}:host[color=success][mode=ghost]:active:not([disabled]){color:#fff;background-color:#33cc58;border:1px solid #33cc58}:host[color=success][mode=link]{color:#33cc58;background-color:transparent;border:1px solid transparent;padding:0}:host[color=success][mode=link]:active:not([disabled]),:host[color=success][mode=link]:focus:not([disabled]),:host[color=success][mode=link]:hover:not([disabled]){color:#33cc58;background-color:transparent;border:1px solid transparent;text-decoration:underline}:host[size=small]{height:20px;line-height:12px;padding:3px 7px;font-size:11px;min-width:20px}:host[size=small].square{width:20px;text-align:center;padding:0}:host[size=small].circle{border-radius:10px;min-width:20px;padding:0 3px}:host[size=medium]{height:24px;line-height:16px;padding:3px 7px;font-size:12px;min-width:24px}:host[size=medium].square{width:24px;text-align:center;padding:0}:host[size=medium].circle{border-radius:11px;min-width:24px;padding:0 3px}:host[size=large]{height:32px;line-height:16px;padding:7px 11px;font-size:12px;min-width:32px}:host[size=large].square{width:32px;text-align:center;padding:0}:host[size=large].circle{border-radius:15px;min-width:32px;padding:0 7px}:host[size=auto]{height:auto;line-height:normal;padding:0;font-size:inherit;min-width:auto}:host[size=auto].square{width:auto;text-align:center;padding:0}:host[size=auto].circle{border-radius:unset;min-width:auto;padding:0}:host.loading{position:relative;opacity:.5;color:transparent!important}:host.loading lx-tiny-spinner{position:absolute;left:calc(50% - (1em / 2))}"], components: [{ type: TinySpinnerComponent, selector: "lx-tiny-spinner" }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
128
125
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.4", ngImport: i0, type: ButtonComponent, decorators: [{
|
129
126
|
type: Component,
|
130
127
|
args: [{
|
131
128
|
// eslint-disable-next-line @angular-eslint/component-selector
|
132
129
|
selector: 'button[lx-button]',
|
133
130
|
templateUrl: 'button.component.html',
|
134
|
-
styleUrls: ['button.component.
|
131
|
+
styleUrls: ['button.component.scss'],
|
132
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
135
133
|
}]
|
136
134
|
}], propDecorators: { size: [{
|
137
135
|
type: Input
|
@@ -168,20 +166,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.4", ngImpor
|
|
168
166
|
}, {
|
169
167
|
type: HostBinding,
|
170
168
|
args: ['class.circle']
|
169
|
+
}], disabled: [{
|
170
|
+
type: Input
|
171
171
|
}], showSpinner: [{
|
172
172
|
type: Input
|
173
173
|
}, {
|
174
174
|
type: HostBinding,
|
175
175
|
args: ['class.loading']
|
176
|
-
}],
|
176
|
+
}], isDisabled: [{
|
177
177
|
type: HostBinding,
|
178
|
-
args: ['
|
179
|
-
}], disableOutline: [{
|
180
|
-
type: HostListener,
|
181
|
-
args: ['click']
|
182
|
-
}], enableOutline: [{
|
183
|
-
type: HostListener,
|
184
|
-
args: ['keyup.tab']
|
178
|
+
args: ['disabled']
|
185
179
|
}] } });
|
186
180
|
|
187
181
|
class CardComponent {
|
@@ -230,7 +224,7 @@ class CollapsibleComponent {
|
|
230
224
|
}
|
231
225
|
}
|
232
226
|
CollapsibleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.4", ngImport: i0, type: CollapsibleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
233
|
-
CollapsibleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.4", type: CollapsibleComponent, selector: "lx-collapsible", inputs: { disableSectionToggle: "disableSectionToggle", hideSectionToggle: "hideSectionToggle", toggleSize: "toggleSize", toggleTitle: "toggleTitle", collapsed: "collapsed" }, outputs: { collapsedChange: "collapsedChange" }, host: { listeners: { "click": "onClick($event)" }, properties: { "class.notClickable": "this.notClickable" } }, ngImport: i0, template: "<button\n *ngIf=\"!hideSectionToggle\"\n lx-button\n mode=\"link\"\n [title]=\"toggleTitle\"\n [size]=\"toggleSize\"\n class=\"sectionToggle\"\n type=\"button\"\n [
|
227
|
+
CollapsibleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.4", type: CollapsibleComponent, selector: "lx-collapsible", inputs: { disableSectionToggle: "disableSectionToggle", hideSectionToggle: "hideSectionToggle", toggleSize: "toggleSize", toggleTitle: "toggleTitle", collapsed: "collapsed" }, outputs: { collapsedChange: "collapsedChange" }, host: { listeners: { "click": "onClick($event)" }, properties: { "class.notClickable": "this.notClickable" } }, ngImport: i0, template: "<button\n *ngIf=\"!hideSectionToggle\"\n lx-button\n mode=\"link\"\n [title]=\"toggleTitle\"\n [size]=\"toggleSize\"\n class=\"sectionToggle\"\n type=\"button\"\n [disabled]=\"disableSectionToggle\"\n [square]=\"true\"\n (click)=\"onToggleSection($event)\"\n>\n <i class=\"far fa-angle-down\" [class.collapsed]=\"collapsed\"></i>\n</button>\n<div class=\"collapsible-title\">\n <ng-content></ng-content>\n</div>\n", styles: [":root{--lx-color-danger:#f96464;--lx-color-grey80:#c2c9d6;--lx-color-grey90:#e1e5eb}:host{position:relative;cursor:pointer;display:flex;border-bottom:1px solid #e1e5eb;padding-bottom:2px;margin-bottom:4px}:host.notClickable{cursor:default}.sectionToggle{font-size:16px;width:32px}.sectionToggle .fa-angle-down{transition:transform .2s linear}.sectionToggle .fa-angle-down.collapsed{transform:rotate(-90deg)}.collapsible-title{align-self:center;width:100%}:host(.align-left) .sectionToggle{text-align:left;width:24px}"], components: [{ type: ButtonComponent, selector: "button[lx-button]", inputs: ["size", "color", "mode", "pressed", "selected", "square", "circle", "disabled", "showSpinner"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
234
228
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.4", ngImport: i0, type: CollapsibleComponent, decorators: [{
|
235
229
|
type: Component,
|
236
230
|
args: [{
|
@@ -2995,7 +2989,7 @@ class DragAndDropListItemComponent {
|
|
2995
2989
|
}
|
2996
2990
|
}
|
2997
2991
|
DragAndDropListItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.4", ngImport: i0, type: DragAndDropListItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
2998
|
-
DragAndDropListItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.4", type: DragAndDropListItemComponent, selector: "lx-drag-and-drop-list-item", inputs: { item: "item", draggable: "draggable", actions: "actions" }, outputs: { action: "action" }, host: { properties: { "class.draggingDisabled": "this.draggingDisabled" } }, ngImport: i0, template: "<ng-container *ngIf=\"!actions; else itemWithActions\">\n <span [attr.title]=\"item\" class=\"itemWrapperForTruncation truncate\">{{ item }}</span>\n <i *ngIf=\"draggable\" class=\"far fa-bars\"></i>\n</ng-container>\n<ng-template #itemWithActions>\n <div class=\"drag-item-wrappper\">\n <i *ngIf=\"draggable\" class=\"far fa-bars drag-handle\"></i>\n <span [attr.title]=\"item\" class=\"itemWrapperForTruncation truncate\">{{ item }}</span>\n </div>\n <div class=\"action-buttons-wrapper\">\n <button\n lx-button\n *ngFor=\"let act of actions; trackBy: trackByAction\"\n (click)=\"action.emit({ actionId: act.id, item: item })\"\n [title]=\"act.label\"\n mode=\"ghost\"\n size=\"auto\"\n class=\"action-button\"\n [class.show-on-hover-button]=\"act.showOnlyOnHover ? true : false\"\n >\n <i class=\"far {{ act.icon }} actionIcon\"></i>\n </button>\n </div>\n</ng-template>\n", styles: [":root{--lx-color-danger:#f96464;--lx-color-grey80:#c2c9d6;--lx-color-grey90:#e1e5eb}:host{padding:8px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;background:#fff}:host.draggingDisabled{background:#eaedf1}:host:hover .show-on-hover-button{opacity:1}.truncate{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drag-handle{padding-right:4px}.actionIcon{padding:0 2px}.drag-item-wrappper{display:flex;min-width:0;align-items:baseline}.action-buttons-wrapper{display:flex;flex-direction:row;flex-wrap:nowrap}.show-on-hover-button{opacity:0}.show-on-hover-button:focus{opacity:1}.action-button{width:20px}"], components: [{ type: ButtonComponent, selector: "button[lx-button]", inputs: ["size", "color", "mode", "pressed", "selected", "square", "circle", "showSpinner"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
2992
|
+
DragAndDropListItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.4", type: DragAndDropListItemComponent, selector: "lx-drag-and-drop-list-item", inputs: { item: "item", draggable: "draggable", actions: "actions" }, outputs: { action: "action" }, host: { properties: { "class.draggingDisabled": "this.draggingDisabled" } }, ngImport: i0, template: "<ng-container *ngIf=\"!actions; else itemWithActions\">\n <span [attr.title]=\"item\" class=\"itemWrapperForTruncation truncate\">{{ item }}</span>\n <i *ngIf=\"draggable\" class=\"far fa-bars\"></i>\n</ng-container>\n<ng-template #itemWithActions>\n <div class=\"drag-item-wrappper\">\n <i *ngIf=\"draggable\" class=\"far fa-bars drag-handle\"></i>\n <span [attr.title]=\"item\" class=\"itemWrapperForTruncation truncate\">{{ item }}</span>\n </div>\n <div class=\"action-buttons-wrapper\">\n <button\n lx-button\n *ngFor=\"let act of actions; trackBy: trackByAction\"\n (click)=\"action.emit({ actionId: act.id, item: item })\"\n [title]=\"act.label\"\n mode=\"ghost\"\n size=\"auto\"\n class=\"action-button\"\n [class.show-on-hover-button]=\"act.showOnlyOnHover ? true : false\"\n >\n <i class=\"far {{ act.icon }} actionIcon\"></i>\n </button>\n </div>\n</ng-template>\n", styles: [":root{--lx-color-danger:#f96464;--lx-color-grey80:#c2c9d6;--lx-color-grey90:#e1e5eb}:host{padding:8px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;background:#fff}:host.draggingDisabled{background:#eaedf1}:host:hover .show-on-hover-button{opacity:1}.truncate{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drag-handle{padding-right:4px}.actionIcon{padding:0 2px}.drag-item-wrappper{display:flex;min-width:0;align-items:baseline}.action-buttons-wrapper{display:flex;flex-direction:row;flex-wrap:nowrap}.show-on-hover-button{opacity:0}.show-on-hover-button:focus{opacity:1}.action-button{width:20px}"], components: [{ type: ButtonComponent, selector: "button[lx-button]", inputs: ["size", "color", "mode", "pressed", "selected", "square", "circle", "disabled", "showSpinner"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
2999
2993
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.4", ngImport: i0, type: DragAndDropListItemComponent, decorators: [{
|
3000
2994
|
type: Component,
|
3001
2995
|
args: [{
|
@@ -3091,6 +3085,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.4", ngImpor
|
|
3091
3085
|
args: ['itemTemplate']
|
3092
3086
|
}] } });
|
3093
3087
|
|
3088
|
+
class ErrorMessageComponent {
|
3089
|
+
constructor(cd) {
|
3090
|
+
this.cd = cd;
|
3091
|
+
}
|
3092
|
+
set key(value) {
|
3093
|
+
if (value !== this._key) {
|
3094
|
+
this._key = value;
|
3095
|
+
this.cd.detectChanges();
|
3096
|
+
}
|
3097
|
+
}
|
3098
|
+
}
|
3099
|
+
ErrorMessageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.4", ngImport: i0, type: ErrorMessageComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
3100
|
+
ErrorMessageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.4", type: ErrorMessageComponent, selector: "lx-error-message", inputs: { key: "key" }, ngImport: i0, template: `<div class="error" *ngIf="_key">{{ _key | translate }}</div>`, isInline: true, styles: [".error{color:#f96464;padding:4px}"], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i1$2.TranslatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
3101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.4", ngImport: i0, type: ErrorMessageComponent, decorators: [{
|
3102
|
+
type: Component,
|
3103
|
+
args: [{
|
3104
|
+
selector: 'lx-error-message',
|
3105
|
+
template: `<div class="error" *ngIf="_key">{{ _key | translate }}</div>`,
|
3106
|
+
styleUrls: ['./error-message.component.scss'],
|
3107
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
3108
|
+
}]
|
3109
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { key: [{
|
3110
|
+
type: Input
|
3111
|
+
}] } });
|
3112
|
+
|
3094
3113
|
class FormErrorComponent {
|
3095
3114
|
constructor() {
|
3096
3115
|
this.translationKeys = [];
|
@@ -4897,7 +4916,7 @@ class SortingDropdownTriggerComponent {
|
|
4897
4916
|
}
|
4898
4917
|
}
|
4899
4918
|
SortingDropdownTriggerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.4", ngImport: i0, type: SortingDropdownTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
4900
|
-
SortingDropdownTriggerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.4", type: SortingDropdownTriggerComponent, selector: "lx-sorting-dropdown-trigger", inputs: { label: "label", currentSortingLabel: "currentSortingLabel", disabled: "disabled" }, ngImport: i0, template: "<button lx-button mode=\"link\" [disabled]=\"disabled\">\n {{ label ? label + ': ' : '' }}{{ currentSortingLabel }}<i class=\"far fa-angle-down lx-margin-left\"></i>\n</button>\n", styles: [""], components: [{ type: ButtonComponent, selector: "button[lx-button]", inputs: ["size", "color", "mode", "pressed", "selected", "square", "circle", "showSpinner"] }] });
|
4919
|
+
SortingDropdownTriggerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.4", type: SortingDropdownTriggerComponent, selector: "lx-sorting-dropdown-trigger", inputs: { label: "label", currentSortingLabel: "currentSortingLabel", disabled: "disabled" }, ngImport: i0, template: "<button lx-button mode=\"link\" [disabled]=\"disabled\">\n {{ label ? label + ': ' : '' }}{{ currentSortingLabel }}<i class=\"far fa-angle-down lx-margin-left\"></i>\n</button>\n", styles: [""], components: [{ type: ButtonComponent, selector: "button[lx-button]", inputs: ["size", "color", "mode", "pressed", "selected", "square", "circle", "disabled", "showSpinner"] }] });
|
4901
4920
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.4", ngImport: i0, type: SortingDropdownTriggerComponent, decorators: [{
|
4902
4921
|
type: Component,
|
4903
4922
|
args: [{
|
@@ -4960,6 +4979,102 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.4", ngImpor
|
|
4960
4979
|
type: Output
|
4961
4980
|
}] } });
|
4962
4981
|
|
4982
|
+
const FORM_CONTROL_ERROR_NAMESPACE = new InjectionToken('FORM_CONTROL_ERROR_NAMESPACE');
|
4983
|
+
const FORM_CONTROL_ERROR_DISPLAY_STRATEGY = new InjectionToken('FORM_CONTROL_ERROR_DISPLAY_STRATEGY');
|
4984
|
+
const provideFormControlErrorNamespace = (namespace) => ({
|
4985
|
+
provide: FORM_CONTROL_ERROR_NAMESPACE,
|
4986
|
+
useValue: namespace
|
4987
|
+
});
|
4988
|
+
const provideFormControlErrorDisplayStrategy = (fn) => ({
|
4989
|
+
provide: FORM_CONTROL_ERROR_DISPLAY_STRATEGY,
|
4990
|
+
useValue: fn
|
4991
|
+
});
|
4992
|
+
class FormErrorDirective {
|
4993
|
+
constructor(viewContainer, componentFactoryResolver, ngControl, namespace, strategy) {
|
4994
|
+
this.viewContainer = viewContainer;
|
4995
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
4996
|
+
this.ngControl = ngControl;
|
4997
|
+
this.namespace = namespace;
|
4998
|
+
this.strategy = strategy;
|
4999
|
+
}
|
5000
|
+
get control() {
|
5001
|
+
var _a;
|
5002
|
+
return ((_a = this.ngControl) === null || _a === void 0 ? void 0 : _a.control) || this.ctrl;
|
5003
|
+
}
|
5004
|
+
get name() {
|
5005
|
+
var _a;
|
5006
|
+
return ((_a = this.ngControl) === null || _a === void 0 ? void 0 : _a.name) || this.controlName;
|
5007
|
+
}
|
5008
|
+
ngOnInit() {
|
5009
|
+
const control = this.control;
|
5010
|
+
if (isAbstractControl(control)) {
|
5011
|
+
this.subscritpion = control.valueChanges
|
5012
|
+
.pipe(startWith(control.value), map(() => (this.strategy ? this.strategy(control) : true)))
|
5013
|
+
.subscribe((display) => {
|
5014
|
+
const { errors } = control;
|
5015
|
+
if (errors && display) {
|
5016
|
+
const firstErrorKey = Object.keys(errors)[0];
|
5017
|
+
const translationKey = this.buildTranslationKey(firstErrorKey);
|
5018
|
+
this.setError(translationKey);
|
5019
|
+
}
|
5020
|
+
else if (this.ref) {
|
5021
|
+
this.setError();
|
5022
|
+
}
|
5023
|
+
});
|
5024
|
+
}
|
5025
|
+
}
|
5026
|
+
buildTranslationKey(errorKey) {
|
5027
|
+
if (this.control) {
|
5028
|
+
return `${this.namespace || 'form'}.errors.${this.name ? `${this.name}.` : ''}${errorKey}`;
|
5029
|
+
}
|
5030
|
+
else {
|
5031
|
+
return '';
|
5032
|
+
}
|
5033
|
+
}
|
5034
|
+
setError(key) {
|
5035
|
+
if (!this.ref) {
|
5036
|
+
const factory = this.componentFactoryResolver.resolveComponentFactory(ErrorMessageComponent);
|
5037
|
+
this.ref = this.viewContainer.createComponent(factory);
|
5038
|
+
}
|
5039
|
+
this.ref.instance.key = key;
|
5040
|
+
}
|
5041
|
+
ngOnDestroy() {
|
5042
|
+
if (this.subscritpion) {
|
5043
|
+
this.subscritpion.unsubscribe();
|
5044
|
+
}
|
5045
|
+
}
|
5046
|
+
}
|
5047
|
+
FormErrorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.4", ngImport: i0, type: FormErrorDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.ComponentFactoryResolver }, { token: i3$1.NgControl, optional: true, self: true }, { token: FORM_CONTROL_ERROR_NAMESPACE, optional: true }, { token: FORM_CONTROL_ERROR_DISPLAY_STRATEGY, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
5048
|
+
FormErrorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.1.4", type: FormErrorDirective, selector: "[lxFormError]", inputs: { ctrl: ["lxFormError", "ctrl"], controlName: "controlName" }, ngImport: i0 });
|
5049
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.4", ngImport: i0, type: FormErrorDirective, decorators: [{
|
5050
|
+
type: Directive,
|
5051
|
+
args: [{
|
5052
|
+
selector: '[lxFormError]'
|
5053
|
+
}]
|
5054
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.ComponentFactoryResolver }, { type: i3$1.NgControl, decorators: [{
|
5055
|
+
type: Optional
|
5056
|
+
}, {
|
5057
|
+
type: Self
|
5058
|
+
}] }, { type: undefined, decorators: [{
|
5059
|
+
type: Optional
|
5060
|
+
}, {
|
5061
|
+
type: Inject,
|
5062
|
+
args: [FORM_CONTROL_ERROR_NAMESPACE]
|
5063
|
+
}] }, { type: undefined, decorators: [{
|
5064
|
+
type: Optional
|
5065
|
+
}, {
|
5066
|
+
type: Inject,
|
5067
|
+
args: [FORM_CONTROL_ERROR_DISPLAY_STRATEGY]
|
5068
|
+
}] }]; }, propDecorators: { ctrl: [{
|
5069
|
+
type: Input,
|
5070
|
+
args: ['lxFormError']
|
5071
|
+
}], controlName: [{
|
5072
|
+
type: Input
|
5073
|
+
}] } });
|
5074
|
+
function isAbstractControl(ctrl) {
|
5075
|
+
return !!ctrl;
|
5076
|
+
}
|
5077
|
+
|
4963
5078
|
class FilterSelectionPipe {
|
4964
5079
|
transform(items, selection, itemKey) {
|
4965
5080
|
const isArray = Array.isArray(selection);
|
@@ -5108,7 +5223,9 @@ LxFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
|
|
5108
5223
|
SortingDropdownComponent,
|
5109
5224
|
SortingDropdownTriggerComponent,
|
5110
5225
|
InputComponent,
|
5111
|
-
FormatNumberPipe
|
5226
|
+
FormatNumberPipe,
|
5227
|
+
FormErrorDirective,
|
5228
|
+
ErrorMessageComponent], imports: [CommonModule,
|
5112
5229
|
DragDropModule,
|
5113
5230
|
FormsModule,
|
5114
5231
|
ReactiveFormsModule, i1$2.TranslateModule, DatepickerModule,
|
@@ -5148,7 +5265,9 @@ LxFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
|
|
5148
5265
|
SliderToggleComponent,
|
5149
5266
|
SortingDropdownComponent,
|
5150
5267
|
SortingDropdownTriggerComponent,
|
5151
|
-
FormatNumberPipe
|
5268
|
+
FormatNumberPipe,
|
5269
|
+
FormErrorDirective,
|
5270
|
+
ErrorMessageComponent] });
|
5152
5271
|
LxFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.4", ngImport: i0, type: LxFormsModule, imports: [[
|
5153
5272
|
CommonModule,
|
5154
5273
|
DragDropModule,
|
@@ -5199,7 +5318,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.4", ngImpor
|
|
5199
5318
|
SortingDropdownComponent,
|
5200
5319
|
SortingDropdownTriggerComponent,
|
5201
5320
|
InputComponent,
|
5202
|
-
FormatNumberPipe
|
5321
|
+
FormatNumberPipe,
|
5322
|
+
FormErrorDirective,
|
5323
|
+
ErrorMessageComponent
|
5203
5324
|
],
|
5204
5325
|
imports: [
|
5205
5326
|
CommonModule,
|
@@ -5247,7 +5368,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.4", ngImpor
|
|
5247
5368
|
SliderToggleComponent,
|
5248
5369
|
SortingDropdownComponent,
|
5249
5370
|
SortingDropdownTriggerComponent,
|
5250
|
-
FormatNumberPipe
|
5371
|
+
FormatNumberPipe,
|
5372
|
+
FormErrorDirective,
|
5373
|
+
ErrorMessageComponent
|
5251
5374
|
]
|
5252
5375
|
}]
|
5253
5376
|
}] });
|
@@ -6032,5 +6155,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.4", ngImpor
|
|
6032
6155
|
* Generated bundle index. Do not edit.
|
6033
6156
|
*/
|
6034
6157
|
|
6035
|
-
export { ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP, AfterViewInitDirective, AutocloseDirective, AutofocusDirective, BACKSPACE, BadgeComponent, BaseSelectDirective, BasicDropdownComponent, BasicDropdownItemComponent, BrPipe, ButtonComponent, ButtonGroupComponent, CURRENCY_SYMBOL_MAP, CardComponent, CdkOptionsDropdownComponent, CdkOptionsSubDropdownComponent, CollapsibleComponent, ColoredLabelComponent, ContrastColorPipe, CurrencyInputComponent, CurrencySymbolComponent, CustomDatePipe, DATE_FN_LOCALE, DATE_FORMATS, DateInputComponent, DragAndDropListComponent, DragAndDropListItemComponent, ENTER, ESCAPE, EllipsisComponent, FilterSelectionPipe, FilterTermPipe, FormErrorComponent, FormatNumberPipe, GLOBAL_TRANSLATION_OPTIONS, HighlightRangePipe, HighlightTermPipe, HtmlDirective, IconComponent, IconScaleComponent, KeyboardActionSourceDirective, KeyboardSelectAction, KeyboardSelectDirective, LOCALE_FN, LxCoreUiModule, LxFormsModule, LxIsUuidPipe, LxModalModule, LxPopoverUiModule, LxTabUiModule, LxTimeAgo, LxTooltipModule, LxTranslatePipe, MODAL_CLOSE, MarkInvalidDirective, MarkdownPipe, ModalComponent, ModalFooterComponent, ModalHeaderComponent, MultiSelectComponent, NbspPipe, OptionComponent, OptionGroupComponent, OptionGroupDropdownComponent, OptionsDropdownComponent, OptionsSubDropdownComponent, PickerComponent, PickerOptionComponent, PickerTriggerDirective, PillItemComponent, PillListComponent, PopoverClickDirective, PopoverComponent, PopoverContentDirective, PopoverHoverDirective, Required, ResponsiveInputComponent, SPACE, SelectDropdownDirective, SelectableItemDirective, SelectedOptionDirective, SingleSelectComponent, SliderToggleComponent, SortPipe, Sorting, SortingDropdownComponent, SortingDropdownTriggerComponent, SpinnerComponent, TAB, TabComponent, TabGroupComponent, TableComponent, TableHeaderComponent, TinySpinnerComponent, TooltipComponent, TooltipDirective, TranslationAfterPipe, TranslationBeforePipe, TranslationBetweenPipe, UnescapeCurlyBracesPipe, ValidateDateInForeseeableFuture, getContrastColor, getTranslationParts, isValidHexColor, isValidX, isValidY, shorthandHexHandle };
|
6158
|
+
export { ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP, AfterViewInitDirective, AutocloseDirective, AutofocusDirective, BACKSPACE, BadgeComponent, BaseSelectDirective, BasicDropdownComponent, BasicDropdownItemComponent, BrPipe, ButtonComponent, ButtonGroupComponent, CURRENCY_SYMBOL_MAP, CardComponent, CdkOptionsDropdownComponent, CdkOptionsSubDropdownComponent, CollapsibleComponent, ColoredLabelComponent, ContrastColorPipe, CurrencyInputComponent, CurrencySymbolComponent, CustomDatePipe, DATE_FN_LOCALE, DATE_FORMATS, DateInputComponent, DragAndDropListComponent, DragAndDropListItemComponent, ENTER, ESCAPE, EllipsisComponent, ErrorMessageComponent, FORM_CONTROL_ERROR_DISPLAY_STRATEGY, FORM_CONTROL_ERROR_NAMESPACE, FilterSelectionPipe, FilterTermPipe, FormErrorComponent, FormErrorDirective, FormatNumberPipe, GLOBAL_TRANSLATION_OPTIONS, HighlightRangePipe, HighlightTermPipe, HtmlDirective, IconComponent, IconScaleComponent, KeyboardActionSourceDirective, KeyboardSelectAction, KeyboardSelectDirective, LOCALE_FN, LxCoreUiModule, LxFormsModule, LxIsUuidPipe, LxModalModule, LxPopoverUiModule, LxTabUiModule, LxTimeAgo, LxTooltipModule, LxTranslatePipe, MODAL_CLOSE, MarkInvalidDirective, MarkdownPipe, ModalComponent, ModalFooterComponent, ModalHeaderComponent, MultiSelectComponent, NbspPipe, OptionComponent, OptionGroupComponent, OptionGroupDropdownComponent, OptionsDropdownComponent, OptionsSubDropdownComponent, PickerComponent, PickerOptionComponent, PickerTriggerDirective, PillItemComponent, PillListComponent, PopoverClickDirective, PopoverComponent, PopoverContentDirective, PopoverHoverDirective, Required, ResponsiveInputComponent, SPACE, SelectDropdownDirective, SelectableItemDirective, SelectedOptionDirective, SingleSelectComponent, SliderToggleComponent, SortPipe, Sorting, SortingDropdownComponent, SortingDropdownTriggerComponent, SpinnerComponent, TAB, TabComponent, TabGroupComponent, TableComponent, TableHeaderComponent, TinySpinnerComponent, TooltipComponent, TooltipDirective, TranslationAfterPipe, TranslationBeforePipe, TranslationBetweenPipe, UnescapeCurlyBracesPipe, ValidateDateInForeseeableFuture, getContrastColor, getTranslationParts, isValidHexColor, isValidX, isValidY, provideFormControlErrorDisplayStrategy, provideFormControlErrorNamespace, shorthandHexHandle };
|
6036
6159
|
//# sourceMappingURL=leanix-components.js.map
|