@datarailsshared/datarailsshared 1.3.22 → 1.3.23
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/bundles/datarailsshared-datarailsshared.umd.js +209 -10
- package/bundles/datarailsshared-datarailsshared.umd.js.map +1 -1
- package/datarailsshared-datarailsshared-1.3.23.tgz +0 -0
- package/datarailsshared-datarailsshared.metadata.json +1 -1
- package/esm2015/lib/dr-inputs/dr-input/dr-input.component.js +4 -2
- package/esm2015/lib/dr-inputs/dr-inputs.module.js +3 -1
- package/esm2015/lib/dr-inputs/dr-toggle/dr-toggle.component.js +12 -4
- package/esm2015/lib/dr-inputs/radio-button/radio-button.component.js +14 -5
- package/esm2015/lib/dr-inputs/radio-button/radio-group.component.js +164 -0
- package/esm2015/public-api.js +2 -1
- package/fesm2015/datarailsshared-datarailsshared.js +188 -11
- package/fesm2015/datarailsshared-datarailsshared.js.map +1 -1
- package/lib/dr-inputs/dr-input/dr-input.component.d.ts +2 -0
- package/lib/dr-inputs/dr-toggle/dr-toggle.component.d.ts +5 -2
- package/lib/dr-inputs/radio-button/radio-button.component.d.ts +4 -1
- package/lib/dr-inputs/radio-button/radio-group.component.d.ts +39 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/datarailsshared-datarailsshared-1.3.22.tgz +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, Component, ViewEncapsulation, Input, Output, ChangeDetectionStrategy, ChangeDetectorRef, forwardRef, ElementRef, Renderer2, HostBinding, ContentChild, Pipe, TemplateRef, Directive, HostListener, ComponentFactoryResolver, ViewContainerRef,
|
|
2
|
+
import { EventEmitter, Component, ViewEncapsulation, Input, Output, ChangeDetectionStrategy, ChangeDetectorRef, forwardRef, ElementRef, Inject, PLATFORM_ID, ContentChildren, Renderer2, HostBinding, ContentChild, Pipe, TemplateRef, Directive, HostListener, ComponentFactoryResolver, ViewContainerRef, ViewChild, Optional, Injector, Injectable, NgModule } from '@angular/core';
|
|
3
3
|
import { FormControl, NG_VALUE_ACCESSOR, NgControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
4
4
|
import { DateAdapter, MAT_DATE_LOCALE, MAT_DATE_FORMATS, MatNativeDateModule } from '@angular/material/core';
|
|
5
5
|
import { MomentDateAdapter, MAT_MOMENT_DATE_ADAPTER_OPTIONS, MatMomentDateModule } from '@angular/material-moment-adapter';
|
|
6
6
|
import * as momentImported from 'moment';
|
|
7
|
-
import {
|
|
7
|
+
import { isPlatformBrowser, DOCUMENT, CommonModule } from '@angular/common';
|
|
8
|
+
import { Subject, from, merge, fromEvent, noop as noop$1 } from 'rxjs';
|
|
9
|
+
import { startWith, switchMap, takeUntil, filter, first } from 'rxjs/operators';
|
|
8
10
|
import { transition, style, animate, trigger } from '@angular/animations';
|
|
9
11
|
import * as i1 from '@angular/cdk/overlay';
|
|
10
12
|
import { Overlay, OverlayPositionBuilder, OverlayConfig } from '@angular/cdk/overlay';
|
|
11
13
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
12
|
-
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
13
|
-
import { first } from 'rxjs/operators';
|
|
14
14
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
15
15
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
16
16
|
import { MatInputModule } from '@angular/material/input';
|
|
@@ -785,6 +785,7 @@ DayTagComponent.propDecorators = {
|
|
|
785
785
|
class RadioButtonComponent {
|
|
786
786
|
constructor(cdr) {
|
|
787
787
|
this.cdr = cdr;
|
|
788
|
+
this.valueChange = new EventEmitter();
|
|
788
789
|
this.onChange = (onchanges => { });
|
|
789
790
|
this.onTouched = () => { };
|
|
790
791
|
}
|
|
@@ -808,6 +809,14 @@ class RadioButtonComponent {
|
|
|
808
809
|
}
|
|
809
810
|
valueChanged(event) {
|
|
810
811
|
this.onChange(this.modelValue);
|
|
812
|
+
this.valueChange.emit(this.value);
|
|
813
|
+
}
|
|
814
|
+
_setName(name) {
|
|
815
|
+
this.name = name;
|
|
816
|
+
this.cdr.markForCheck();
|
|
817
|
+
}
|
|
818
|
+
_markForCheck() {
|
|
819
|
+
this.cdr.markForCheck();
|
|
811
820
|
}
|
|
812
821
|
}
|
|
813
822
|
RadioButtonComponent.decorators = [
|
|
@@ -822,8 +831,7 @@ RadioButtonComponent.decorators = [
|
|
|
822
831
|
}
|
|
823
832
|
],
|
|
824
833
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
825
|
-
|
|
826
|
-
styles: ["label input[type=radio].radiobox+span{vertical-align:middle;line-height:20px}input+span,input+span:after,input+span:before{box-sizing:content-box!important;-webkit-box-sizing:content-box!important;-moz-box-sizing:content-box!important}input{visibility:hidden;position:absolute;width:18px;height:18px}label input+span{position:relative;z-index:19;display:inline-block;margin:0 5px 0 0;line-height:17px;min-height:14px;min-width:14px}label input+span:hover{cursor:pointer}label input+span:before{content:\"\";font-size:14px;border-radius:0;display:inline-block;text-align:center;vertical-align:middle;padding:1px;height:12px;line-height:13px;width:12px;margin-right:5px;border:1px solid #C3C4CE;background-color:#fff;font-weight:normal;margin-top:-1px}label input+span:before{border-radius:50%;-moz-border-radius:50%;-webkit-border-radius:50%}label input:checked+span:before,label:hover input:checked+span:before{background:white;border-color:#579bf2;color:#579bf2}label input:checked+span:before,label:hover input:checked+span:before{font-family:\"DataRails\"!important;background-image:url('data:image/svg+xml; utf8, <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"5\" cy=\"5\" r=\"4.5\" fill=\"%23579BF2\"/></svg> ');background-repeat:no-repeat;background-position:center;color:#579bf2}label input:disabled+span:before{border-color:#bcbcbc}label input[disabled]:checked+span:before{content:url('data:image/svg+xml; utf8, <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"5\" cy=\"5\" r=\"4.5\" fill=\"%23BCBCBC\"/></svg> ');border-color:#bcbcbc}label span:hover:before{border-color:#85889c}\n"]
|
|
834
|
+
styles: [":host{display:flex;line-height:22px}label input[type=radio].radiobox+span{vertical-align:middle;line-height:20px}input+span,input+span:after,input+span:before{box-sizing:content-box!important;-webkit-box-sizing:content-box!important;-moz-box-sizing:content-box!important}input{visibility:hidden;position:absolute;width:18px;height:18px}label input+span{position:relative;z-index:19;display:inline-block;margin:0 5px 0 0;line-height:17px;min-height:14px;min-width:14px}label input+span:hover{cursor:pointer}label input+span:before{content:\"\";font-size:14px;border-radius:0;display:inline-block;text-align:center;vertical-align:middle;padding:1px;height:12px;line-height:13px;width:12px;margin-right:5px;border:1px solid #C3C4CE;background-color:#fff;font-weight:normal;margin-top:-1px}label input+span:before{border-radius:50%;-moz-border-radius:50%;-webkit-border-radius:50%}label input:checked+span:before,label:hover input:checked+span:before{background:white;border-color:#579bf2;color:#579bf2}label input:checked+span:before,label:hover input:checked+span:before{font-family:\"DataRails\"!important;background-image:url('data:image/svg+xml; utf8, <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"5\" cy=\"5\" r=\"4.5\" fill=\"%23579BF2\"/></svg> ');background-repeat:no-repeat;background-position:center;color:#579bf2}label input:disabled+span:before{border-color:#bcbcbc}label input[disabled]:checked+span:before{content:url('data:image/svg+xml; utf8, <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"5\" cy=\"5\" r=\"4.5\" fill=\"%23BCBCBC\"/></svg> ');border-color:#bcbcbc}label span:hover:before{border-color:#85889c}\n"]
|
|
827
835
|
},] }
|
|
828
836
|
];
|
|
829
837
|
RadioButtonComponent.ctorParameters = () => [
|
|
@@ -832,7 +840,165 @@ RadioButtonComponent.ctorParameters = () => [
|
|
|
832
840
|
RadioButtonComponent.propDecorators = {
|
|
833
841
|
disabled: [{ type: Input }],
|
|
834
842
|
name: [{ type: Input }],
|
|
835
|
-
_value: [{ type: Input, args: ['value',] }]
|
|
843
|
+
_value: [{ type: Input, args: ['value',] }],
|
|
844
|
+
valueChange: [{ type: Output }]
|
|
845
|
+
};
|
|
846
|
+
|
|
847
|
+
class RadioGroupComponent {
|
|
848
|
+
constructor(hostElement, platformId, document) {
|
|
849
|
+
this.hostElement = hostElement;
|
|
850
|
+
this.platformId = platformId;
|
|
851
|
+
this.document = document;
|
|
852
|
+
this.destroy$ = new Subject();
|
|
853
|
+
this.valueChange = new EventEmitter();
|
|
854
|
+
this.onChange = (value) => { };
|
|
855
|
+
this.onTouched = () => { };
|
|
856
|
+
}
|
|
857
|
+
get value() {
|
|
858
|
+
return this._value;
|
|
859
|
+
}
|
|
860
|
+
set value(value) {
|
|
861
|
+
this._value = value;
|
|
862
|
+
this.updateValues();
|
|
863
|
+
}
|
|
864
|
+
get name() {
|
|
865
|
+
return this._name;
|
|
866
|
+
}
|
|
867
|
+
set name(name) {
|
|
868
|
+
this._name = name;
|
|
869
|
+
this.updateNames();
|
|
870
|
+
}
|
|
871
|
+
get disabled() {
|
|
872
|
+
return this._disabled;
|
|
873
|
+
}
|
|
874
|
+
set disabled(disabled) {
|
|
875
|
+
this._disabled = !!disabled;
|
|
876
|
+
this.updateDisabled();
|
|
877
|
+
}
|
|
878
|
+
ngAfterContentInit() {
|
|
879
|
+
// In case option 'name' isn't set on nb-radio component,
|
|
880
|
+
// we need to set it's name right away, so it won't overlap with options
|
|
881
|
+
// without names from other radio groups. Otherwise they all would have
|
|
882
|
+
// same name and will be considered as options from one group so only the
|
|
883
|
+
// last option will stay selected.
|
|
884
|
+
this.updateNames();
|
|
885
|
+
this.radios.changes
|
|
886
|
+
.pipe(startWith(this.radios),
|
|
887
|
+
// 'changes' emit during change detection run and we can't update
|
|
888
|
+
// option properties right of since they already was initialized.
|
|
889
|
+
// Instead we schedule microtask to update radios after change detection
|
|
890
|
+
// run is finished and trigger one more change detection run.
|
|
891
|
+
switchMap((radios) => from(Promise.resolve(radios))), takeUntil(this.destroy$))
|
|
892
|
+
.subscribe(() => this.updateAndSubscribeToRadios());
|
|
893
|
+
}
|
|
894
|
+
ngOnDestroy() {
|
|
895
|
+
this.destroy$.next();
|
|
896
|
+
this.destroy$.complete();
|
|
897
|
+
}
|
|
898
|
+
registerOnChange(fn) {
|
|
899
|
+
this.onChange = fn;
|
|
900
|
+
}
|
|
901
|
+
registerOnTouched(fn) {
|
|
902
|
+
this.onTouched = fn;
|
|
903
|
+
}
|
|
904
|
+
writeValue(value) {
|
|
905
|
+
this.value = value;
|
|
906
|
+
}
|
|
907
|
+
setDisabledState(isDisabled) {
|
|
908
|
+
this.disabled = isDisabled;
|
|
909
|
+
}
|
|
910
|
+
updateAndSubscribeToRadios() {
|
|
911
|
+
this.updateValueFromCheckedOption();
|
|
912
|
+
this.updateNames();
|
|
913
|
+
this.updateValues();
|
|
914
|
+
this.updateDisabled();
|
|
915
|
+
this.subscribeOnRadiosValueChange();
|
|
916
|
+
this.subscribeOnRadiosBlur();
|
|
917
|
+
}
|
|
918
|
+
updateNames() {
|
|
919
|
+
if (this.radios) {
|
|
920
|
+
this.radios.forEach((radio) => radio._setName(this.name));
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
updateValues() {
|
|
924
|
+
this.updateAndMarkForCheckRadios((radio) => {
|
|
925
|
+
if (radio.value === this.value) {
|
|
926
|
+
radio.modelValue = radio.value;
|
|
927
|
+
}
|
|
928
|
+
});
|
|
929
|
+
}
|
|
930
|
+
updateDisabled() {
|
|
931
|
+
if (typeof this.disabled !== 'undefined') {
|
|
932
|
+
this.updateAndMarkForCheckRadios((radio) => radio.disabled = this.disabled);
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
subscribeOnRadiosValueChange() {
|
|
936
|
+
if (!this.radios || !this.radios.length) {
|
|
937
|
+
return;
|
|
938
|
+
}
|
|
939
|
+
merge(...this.radios.map((radio) => radio.valueChange))
|
|
940
|
+
.pipe(takeUntil(merge(this.radios.changes, this.destroy$)))
|
|
941
|
+
.subscribe((value) => {
|
|
942
|
+
this.writeValue(value);
|
|
943
|
+
this.propagateValue(value);
|
|
944
|
+
});
|
|
945
|
+
}
|
|
946
|
+
propagateValue(value) {
|
|
947
|
+
this.valueChange.emit(value);
|
|
948
|
+
this.onChange(value);
|
|
949
|
+
}
|
|
950
|
+
subscribeOnRadiosBlur() {
|
|
951
|
+
const hasNoRadios = !this.radios || !this.radios.length;
|
|
952
|
+
if (!isPlatformBrowser(this.platformId) || hasNoRadios) {
|
|
953
|
+
return;
|
|
954
|
+
}
|
|
955
|
+
const hostElement = this.hostElement.nativeElement;
|
|
956
|
+
fromEvent(hostElement, 'focusin')
|
|
957
|
+
.pipe(filter(event => hostElement.contains(event.target)), switchMap(() => merge(fromEvent(this.document, 'focusin'), fromEvent(this.document, 'click'))), filter(event => !hostElement.contains(event.target)), takeUntil(merge(this.radios.changes, this.destroy$)))
|
|
958
|
+
.subscribe(() => this.onTouched());
|
|
959
|
+
}
|
|
960
|
+
updateAndMarkForCheckRadios(updateFn) {
|
|
961
|
+
if (this.radios) {
|
|
962
|
+
this.radios.forEach((radio) => {
|
|
963
|
+
updateFn(radio);
|
|
964
|
+
radio._markForCheck();
|
|
965
|
+
});
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
updateValueFromCheckedOption() {
|
|
969
|
+
const checkedRadio = this.radios.find((radio) => radio.modelValue);
|
|
970
|
+
const isValueMissing = this.value === undefined || this.value === null;
|
|
971
|
+
if (checkedRadio && isValueMissing && checkedRadio.value !== this.value) {
|
|
972
|
+
this.value = checkedRadio.value;
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
RadioGroupComponent.decorators = [
|
|
977
|
+
{ type: Component, args: [{
|
|
978
|
+
selector: 'dr-radio-group',
|
|
979
|
+
template: `
|
|
980
|
+
<ng-content select="dr-radio-button"></ng-content>`,
|
|
981
|
+
providers: [
|
|
982
|
+
{
|
|
983
|
+
provide: NG_VALUE_ACCESSOR,
|
|
984
|
+
useExisting: forwardRef(() => RadioGroupComponent),
|
|
985
|
+
multi: true,
|
|
986
|
+
},
|
|
987
|
+
],
|
|
988
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
989
|
+
},] }
|
|
990
|
+
];
|
|
991
|
+
RadioGroupComponent.ctorParameters = () => [
|
|
992
|
+
{ type: ElementRef },
|
|
993
|
+
{ type: undefined, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] },
|
|
994
|
+
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }
|
|
995
|
+
];
|
|
996
|
+
RadioGroupComponent.propDecorators = {
|
|
997
|
+
value: [{ type: Input }],
|
|
998
|
+
name: [{ type: Input }],
|
|
999
|
+
disabled: [{ type: Input }],
|
|
1000
|
+
radios: [{ type: ContentChildren, args: [RadioButtonComponent, { descendants: true },] }],
|
|
1001
|
+
valueChange: [{ type: Output }]
|
|
836
1002
|
};
|
|
837
1003
|
|
|
838
1004
|
class CheckboxComponent {
|
|
@@ -1024,7 +1190,7 @@ class DrInputComponent {
|
|
|
1024
1190
|
DrInputComponent.decorators = [
|
|
1025
1191
|
{ type: Component, args: [{
|
|
1026
1192
|
selector: 'dr-input',
|
|
1027
|
-
template: "<ng-content select=\"[prefixIcon]\"></ng-content>\r\n<input [(ngModel)]=\"value\"\r\n (ngModelChange)=\"updateChanges()\"\r\n (blur)=\"blur.emit(value); onTouched()\"\r\n [disabled]=\"_disabled\"\r\n [readonly]=\"readonly\"\r\n [type]=\"type\"\r\n [placeholder]=\"placeholder\"\r\n [name]=\"name\"\r\n>\r\n<span class=\"clear-icon\" (click)=\"writeValue(null)\"></span>\r\n<span *ngIf=\"type === 'search'\" class=\"search-icon\" (click)=\"onSearchClicked($event)\"></span>\r\n<ng-content select=\"[suffixIcon]\"></ng-content>\r\n<button *ngIf=\"_buttonOptions.show || (_buttonOptions.showOnFocus && _buttonOptions.focusSet)\"\r\n (click)=\"onButtonClicked($event)\">\r\n {{_buttonOptions.text}}\r\n</button>\r\n",
|
|
1193
|
+
template: "<ng-content select=\"[prefixIcon]\"></ng-content>\r\n<input [(ngModel)]=\"value\"\r\n (ngModelChange)=\"updateChanges()\"\r\n (blur)=\"blur.emit(value); onTouched()\"\r\n [disabled]=\"_disabled\"\r\n [readonly]=\"readonly\"\r\n [type]=\"type\"\r\n [placeholder]=\"placeholder\"\r\n [name]=\"name\"\r\n [min]=\"min\"\r\n [step]=\"step\"\r\n>\r\n<span class=\"clear-icon\" (click)=\"writeValue(null)\"></span>\r\n<span *ngIf=\"type === 'search'\" class=\"search-icon\" (click)=\"onSearchClicked($event)\"></span>\r\n<ng-content select=\"[suffixIcon]\"></ng-content>\r\n<button *ngIf=\"_buttonOptions.show || (_buttonOptions.showOnFocus && _buttonOptions.focusSet)\"\r\n (click)=\"onButtonClicked($event)\">\r\n {{_buttonOptions.text}}\r\n</button>\r\n",
|
|
1028
1194
|
providers: [{
|
|
1029
1195
|
provide: NG_VALUE_ACCESSOR,
|
|
1030
1196
|
useExisting: forwardRef(() => DrInputComponent),
|
|
@@ -1047,6 +1213,8 @@ DrInputComponent.propDecorators = {
|
|
|
1047
1213
|
placeholder: [{ type: Input }],
|
|
1048
1214
|
readonly: [{ type: Input }],
|
|
1049
1215
|
clearable: [{ type: Input }],
|
|
1216
|
+
min: [{ type: Input }],
|
|
1217
|
+
step: [{ type: Input }],
|
|
1050
1218
|
blur: [{ type: Output }],
|
|
1051
1219
|
elementClass: [{ type: HostBinding, args: ['class',] }],
|
|
1052
1220
|
searchHandler: [{ type: Output }],
|
|
@@ -1399,6 +1567,7 @@ class DrToggleComponent {
|
|
|
1399
1567
|
constructor(cdr) {
|
|
1400
1568
|
this.cdr = cdr;
|
|
1401
1569
|
this._disabled = false;
|
|
1570
|
+
this._elementClass = [];
|
|
1402
1571
|
this.checkedChange = new EventEmitter();
|
|
1403
1572
|
this.onChange = () => { };
|
|
1404
1573
|
this.onTouched = () => { };
|
|
@@ -1406,6 +1575,12 @@ class DrToggleComponent {
|
|
|
1406
1575
|
set disabled(value) {
|
|
1407
1576
|
this.setDisabledState(value);
|
|
1408
1577
|
}
|
|
1578
|
+
get elementClass() { return this._elementClass.join(' '); }
|
|
1579
|
+
ngAfterViewInit() {
|
|
1580
|
+
if (this.toggleTitleRight) {
|
|
1581
|
+
this._elementClass.push('toggle-label-alignment');
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1409
1584
|
writeValue(value) {
|
|
1410
1585
|
this.checkedStatus = value;
|
|
1411
1586
|
this.cdr.markForCheck();
|
|
@@ -1434,7 +1609,7 @@ DrToggleComponent.decorators = [
|
|
|
1434
1609
|
{ provide: NG_VALUE_ACCESSOR, useExisting: DrToggleComponent, multi: true }
|
|
1435
1610
|
],
|
|
1436
1611
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1437
|
-
styles: [":host{display:flex;justify-content:space-between;align-items:center}:host .toggle-container.disabled{pointer-events:none}:host .toggle-container.disabled .toggle-body{background-color:#8f9bb329!important}:host .toggle-container.disabled .toggle-body i{background:rgba(143,155,179,.24)!important}:host .toggle-container.success input:checked+span.toggle-body{background-color:#03a678}:host .toggle-container input{display:none}:host .toggle-container input:checked+span.toggle-body>i,:host .toggle-container input:checked+span.toggle-body:active>i{margin-left:16px}:host .toggle-container input:checked+span.toggle-body{background-color:#579bf2}:host .toggle-container .toggle-body{cursor:pointer;display:block;width:30px;height:16px;margin:7px auto;border-radius:15px;transition:all .2s ease-in-out;-webkit-transition:all .2s ease-in-out;background-color:#aeb5bb;line-height:1}:host .toggle-container .toggle-body:active{background-color:#a6b9cb}:host .toggle-container .toggle-body-wrapper{display:flex;flex-direction:column}:host .toggle-container .toggle-body i{height:12px;width:12px;background:#fff;display:inline-block;border-radius:100px;margin-top:2px;margin-left:1.5px;transition:all .2s ease-in-out;-webkit-transition:all .2s ease-in-out;pointer-events:none}\n"]
|
|
1612
|
+
styles: [":host{display:flex;justify-content:space-between;align-items:center}:host.toggle-label-alignment{justify-content:start}:host .toggle-container.disabled{pointer-events:none}:host .toggle-container.disabled .toggle-body{background-color:#8f9bb329!important}:host .toggle-container.disabled .toggle-body i{background:rgba(143,155,179,.24)!important}:host .toggle-container.success input:checked+span.toggle-body{background-color:#03a678}:host .toggle-container input{display:none}:host .toggle-container input:checked+span.toggle-body>i,:host .toggle-container input:checked+span.toggle-body:active>i{margin-left:16px}:host .toggle-container input:checked+span.toggle-body{background-color:#579bf2}:host .toggle-container .toggle-body{cursor:pointer;display:block;width:30px;height:16px;margin:7px auto;border-radius:15px;transition:all .2s ease-in-out;-webkit-transition:all .2s ease-in-out;background-color:#aeb5bb;line-height:1}:host .toggle-container .toggle-body:active{background-color:#a6b9cb}:host .toggle-container .toggle-body-wrapper{display:flex;flex-direction:column}:host .toggle-container .toggle-body i{height:12px;width:12px;background:#fff;display:inline-block;border-radius:100px;margin-top:2px;margin-left:1.5px;transition:all .2s ease-in-out;-webkit-transition:all .2s ease-in-out;pointer-events:none}\n"]
|
|
1438
1613
|
},] }
|
|
1439
1614
|
];
|
|
1440
1615
|
DrToggleComponent.ctorParameters = () => [
|
|
@@ -1446,7 +1621,8 @@ DrToggleComponent.propDecorators = {
|
|
|
1446
1621
|
successType: [{ type: Input }],
|
|
1447
1622
|
checkedStatus: [{ type: Input }],
|
|
1448
1623
|
disabled: [{ type: Input }],
|
|
1449
|
-
checkedChange: [{ type: Output }]
|
|
1624
|
+
checkedChange: [{ type: Output }],
|
|
1625
|
+
elementClass: [{ type: HostBinding, args: ['class',] }]
|
|
1450
1626
|
};
|
|
1451
1627
|
|
|
1452
1628
|
class DrToggleButtonComponent {
|
|
@@ -2512,6 +2688,7 @@ DrTagModule.decorators = [
|
|
|
2512
2688
|
const components$1 = [
|
|
2513
2689
|
DrButtonComponent,
|
|
2514
2690
|
RadioButtonComponent,
|
|
2691
|
+
RadioGroupComponent,
|
|
2515
2692
|
CheckboxComponent,
|
|
2516
2693
|
DrInputComponent,
|
|
2517
2694
|
DrSelectComponent,
|
|
@@ -2663,5 +2840,5 @@ DrTabsModule.decorators = [
|
|
|
2663
2840
|
* Generated bundle index. Do not edit.
|
|
2664
2841
|
*/
|
|
2665
2842
|
|
|
2666
|
-
export { AnyTagComponent, CheckboxComponent, DateTagComponent, DateTagModule, DayTagComponent, DrAvatarComponent, DrAvatarModule, DrAvatarPipe, DrButtonComponent, DrDatePickerComponent, DrDatePickerFormatDirective, DrDropdownComponent, DrDropdownDirective, DrDropdownItemShowPipe, DrDropdownModule, DrDropdownPositionDirective, DrDropdownService, DrInputComponent, DrInputsModule, DrPopoverAlignmentDimension, DrPopoverComponent, DrPopoverDirective, DrPopoverModule, DrPopoverRef, DrPopoverService, DrSelectComponent, DrSpinnerComponent, DrSpinnerDirective, DrSpinnerModule, DrTabComponent, DrTabsComponent, DrTabsModule, DrTagComponent, DrTagModule, DrToggleButtonComponent, DrToggleComponent, DrTooltipDirective, DrTooltipModule, ForecastTagComponent, ISpinnerOptions, ListTagComponent, ListTagModule, MonthTagComponent, QuarterTagComponent, RadioButtonComponent, TooltipComponent, WeekTagComponent, YearTagComponent, components$2 as ɵa, POPUP_ANIMATION as ɵb, CustomDateFormat as ɵc };
|
|
2843
|
+
export { AnyTagComponent, CheckboxComponent, DateTagComponent, DateTagModule, DayTagComponent, DrAvatarComponent, DrAvatarModule, DrAvatarPipe, DrButtonComponent, DrDatePickerComponent, DrDatePickerFormatDirective, DrDropdownComponent, DrDropdownDirective, DrDropdownItemShowPipe, DrDropdownModule, DrDropdownPositionDirective, DrDropdownService, DrInputComponent, DrInputsModule, DrPopoverAlignmentDimension, DrPopoverComponent, DrPopoverDirective, DrPopoverModule, DrPopoverRef, DrPopoverService, DrSelectComponent, DrSpinnerComponent, DrSpinnerDirective, DrSpinnerModule, DrTabComponent, DrTabsComponent, DrTabsModule, DrTagComponent, DrTagModule, DrToggleButtonComponent, DrToggleComponent, DrTooltipDirective, DrTooltipModule, ForecastTagComponent, ISpinnerOptions, ListTagComponent, ListTagModule, MonthTagComponent, QuarterTagComponent, RadioButtonComponent, RadioGroupComponent, TooltipComponent, WeekTagComponent, YearTagComponent, components$2 as ɵa, POPUP_ANIMATION as ɵb, CustomDateFormat as ɵc };
|
|
2667
2844
|
//# sourceMappingURL=datarailsshared-datarailsshared.js.map
|