@datarailsshared/datarailsshared 1.6.121 → 1.6.125
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/datarailsshared-datarailsshared-1.6.125.tgz +0 -0
- package/esm2022/lib/dr-inputs/dr-toggle-button/dr-toggle-button.component.mjs +23 -10
- package/esm2022/lib/dr-inputs/dr-toggle-button/toggle-button-mode.mjs +2 -1
- package/fesm2022/datarailsshared-datarailsshared.mjs +22 -9
- package/fesm2022/datarailsshared-datarailsshared.mjs.map +1 -1
- package/lib/dr-inputs/dr-toggle-button/dr-toggle-button.component.d.ts +1 -0
- package/lib/dr-inputs/dr-toggle-button/toggle-button-mode.d.ts +2 -1
- package/package.json +1 -1
- package/datarailsshared-datarailsshared-1.6.121.tgz +0 -0
|
Binary file
|
|
@@ -3,32 +3,44 @@ import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
|
3
3
|
import { ToggleButtonMode } from './toggle-button-mode';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
import * as i1 from "@angular/common";
|
|
6
|
+
import * as i2 from "../../dr-tooltip/dr-tooltip.directive";
|
|
6
7
|
function DrToggleButtonComponent_ng_container_1_div_1_i_1_Template(rf, ctx) { if (rf & 1) {
|
|
7
|
-
i0.ɵɵelement(0, "i",
|
|
8
|
+
i0.ɵɵelement(0, "i", 6);
|
|
8
9
|
} if (rf & 2) {
|
|
9
10
|
const item_r1 = i0.ɵɵnextContext(2).$implicit;
|
|
10
11
|
i0.ɵɵclassMap(item_r1.icon);
|
|
11
12
|
} }
|
|
13
|
+
function DrToggleButtonComponent_ng_container_1_div_1_ng_container_2_Template(rf, ctx) { if (rf & 1) {
|
|
14
|
+
i0.ɵɵelementContainerStart(0);
|
|
15
|
+
i0.ɵɵtext(1);
|
|
16
|
+
i0.ɵɵelementContainerEnd();
|
|
17
|
+
} if (rf & 2) {
|
|
18
|
+
const item_r1 = i0.ɵɵnextContext(2).$implicit;
|
|
19
|
+
const ctx_r4 = i0.ɵɵnextContext();
|
|
20
|
+
i0.ɵɵadvance(1);
|
|
21
|
+
i0.ɵɵtextInterpolate1(" ", item_r1[ctx_r4.bindLabel] || item_r1.name || item_r1, " ");
|
|
22
|
+
} }
|
|
12
23
|
function DrToggleButtonComponent_ng_container_1_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
13
|
-
const
|
|
24
|
+
const _r9 = i0.ɵɵgetCurrentView();
|
|
14
25
|
i0.ɵɵelementStart(0, "div", 3);
|
|
15
|
-
i0.ɵɵlistener("click", function DrToggleButtonComponent_ng_container_1_div_1_Template_div_click_0_listener() { i0.ɵɵrestoreView(
|
|
26
|
+
i0.ɵɵlistener("click", function DrToggleButtonComponent_ng_container_1_div_1_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r9); const item_r1 = i0.ɵɵnextContext().$implicit; const ctx_r7 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r7.setValue(item_r1)); });
|
|
16
27
|
i0.ɵɵtemplate(1, DrToggleButtonComponent_ng_container_1_div_1_i_1_Template, 1, 2, "i", 4);
|
|
17
|
-
i0.ɵɵ
|
|
28
|
+
i0.ɵɵtemplate(2, DrToggleButtonComponent_ng_container_1_div_1_ng_container_2_Template, 2, 1, "ng-container", 5);
|
|
18
29
|
i0.ɵɵelementEnd();
|
|
19
30
|
} if (rf & 2) {
|
|
20
31
|
const item_r1 = i0.ɵɵnextContext().$implicit;
|
|
21
32
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
22
33
|
i0.ɵɵclassProp("selected", item_r1[ctx_r2.bindValue] === ctx_r2.selectedValue || item_r1 === ctx_r2.selectedValue)("disabled", item_r1.disabled);
|
|
34
|
+
i0.ɵɵproperty("drTooltip", item_r1.tooltip);
|
|
23
35
|
i0.ɵɵattribute("data-analytics", ctx_r2.getDataAnalyticsTag(item_r1));
|
|
24
36
|
i0.ɵɵadvance(1);
|
|
25
37
|
i0.ɵɵproperty("ngIf", item_r1.icon);
|
|
26
38
|
i0.ɵɵadvance(1);
|
|
27
|
-
i0.ɵɵ
|
|
39
|
+
i0.ɵɵproperty("ngIf", ctx_r2.mode !== ctx_r2.ToggleButtonMode.ICON_ONLY);
|
|
28
40
|
} }
|
|
29
41
|
function DrToggleButtonComponent_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
30
42
|
i0.ɵɵelementContainerStart(0);
|
|
31
|
-
i0.ɵɵtemplate(1, DrToggleButtonComponent_ng_container_1_div_1_Template, 3,
|
|
43
|
+
i0.ɵɵtemplate(1, DrToggleButtonComponent_ng_container_1_div_1_Template, 3, 8, "div", 2);
|
|
32
44
|
i0.ɵɵelementContainerEnd();
|
|
33
45
|
} if (rf & 2) {
|
|
34
46
|
const item_r1 = ctx.$implicit;
|
|
@@ -47,6 +59,7 @@ export class DrToggleButtonComponent {
|
|
|
47
59
|
this.bindValue = null;
|
|
48
60
|
this.bindHidden = null;
|
|
49
61
|
this.mode = ToggleButtonMode.DEFAULT;
|
|
62
|
+
this.ToggleButtonMode = ToggleButtonMode;
|
|
50
63
|
this.onChange = () => { };
|
|
51
64
|
this.onTouched = () => { };
|
|
52
65
|
}
|
|
@@ -82,7 +95,7 @@ export class DrToggleButtonComponent {
|
|
|
82
95
|
return this.dataAnalytics + '_' + String(value).toLowerCase().replace(/ /g, '-');
|
|
83
96
|
}
|
|
84
97
|
/** @nocollapse */ static { this.ɵfac = function DrToggleButtonComponent_Factory(t) { return new (t || DrToggleButtonComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); }; }
|
|
85
|
-
/** @nocollapse */ static { this.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: DrToggleButtonComponent, selectors: [["dr-toggle-button"]], inputs: { items: "items", bindLabel: "bindLabel", bindValue: "bindValue", bindHidden: "bindHidden", mode: "mode", selectedValue: "selectedValue", disabled: "disabled", dataAnalytics: ["data-analytics", "dataAnalytics"] }, features: [i0.ɵɵProvidersFeature([{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef((() => DrToggleButtonComponent)), multi: true }])], decls: 2, vars: 4, consts: [[1, "toggle-container"], [4, "ngFor", "ngForOf"], ["class", "toggle-container__item", 3, "selected", "disabled", "click", 4, "ngIf"], [1, "toggle-container__item", 3, "click"], ["class", "toggle-container__item__icon", 3, "class", 4, "ngIf"], [1, "toggle-container__item__icon"]], template: function DrToggleButtonComponent_Template(rf, ctx) { if (rf & 1) {
|
|
98
|
+
/** @nocollapse */ static { this.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: DrToggleButtonComponent, selectors: [["dr-toggle-button"]], inputs: { items: "items", bindLabel: "bindLabel", bindValue: "bindValue", bindHidden: "bindHidden", mode: "mode", selectedValue: "selectedValue", disabled: "disabled", dataAnalytics: ["data-analytics", "dataAnalytics"] }, features: [i0.ɵɵProvidersFeature([{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef((() => DrToggleButtonComponent)), multi: true }])], decls: 2, vars: 4, consts: [[1, "toggle-container"], [4, "ngFor", "ngForOf"], ["class", "toggle-container__item", 3, "drTooltip", "selected", "disabled", "click", 4, "ngIf"], [1, "toggle-container__item", 3, "drTooltip", "click"], ["class", "toggle-container__item__icon", 3, "class", 4, "ngIf"], [4, "ngIf"], [1, "toggle-container__item__icon"]], template: function DrToggleButtonComponent_Template(rf, ctx) { if (rf & 1) {
|
|
86
99
|
i0.ɵɵelementStart(0, "div", 0);
|
|
87
100
|
i0.ɵɵtemplate(1, DrToggleButtonComponent_ng_container_1_Template, 2, 1, "ng-container", 1);
|
|
88
101
|
i0.ɵɵelementEnd();
|
|
@@ -91,11 +104,11 @@ export class DrToggleButtonComponent {
|
|
|
91
104
|
i0.ɵɵattribute("mode", ctx.mode);
|
|
92
105
|
i0.ɵɵadvance(1);
|
|
93
106
|
i0.ɵɵproperty("ngForOf", ctx.items);
|
|
94
|
-
} }, dependencies: [i1.NgForOf, i1.NgIf], styles: ["[_nghost-%COMP%]{display:flex}.toggle-container[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap;box-sizing:border-box;border-radius:20px;height:28px;font-family:Poppins,sans-serif}.toggle-container.disabled[_ngcontent-%COMP%]{pointer-events:none}.toggle-container__item[_ngcontent-%COMP%]{height:28px;display:flex;align-items:center;justify-content:center;padding:4px 16px;border-radius:20px;margin:-1px;cursor:pointer;font-weight:400;font-size:12px;line-height:20px;white-space:nowrap;color:#4e566c;box-sizing:border-box}.toggle-container__item.selected[_ngcontent-%COMP%]{background:#f2f2fb!important;border:1px solid #7f7fdd!important;color:#25258c!important}.toggle-container__item.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:default;background:#f0f1f4;color:#9ea1aa;border:1px solid #c3c4ce}.toggle-container__item__icon[_ngcontent-%COMP%]{margin-right:4px}.toggle-container[mode~=default][_ngcontent-%COMP%]{background:#f6f7f8;border:1px solid #c3c4ce}.toggle-container[mode~=dotted][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]{padding:2px 8px;border:1px solid #9ea1aa;border-radius:18px;margin-left:4px;color:#0c142b}.toggle-container[mode~=dotted][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]:hover{background:#f0f1f4}.toggle-container[mode~=dotted][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]:hover .toggle-container[mode~=dotted][_ngcontent-%COMP%] .toggle-container__item.selected[_ngcontent-%COMP%]{background:unset}.toggle-container[mode~=dotted][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]:first-child{margin-left:0}.toggle-container[mode~=box][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]{height:40px;padding:8px 16px 8px 8px;border:1px solid #
|
|
107
|
+
} }, dependencies: [i1.NgForOf, i1.NgIf, i2.DrTooltipDirective], styles: ["[_nghost-%COMP%]{display:flex}.toggle-container[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap;box-sizing:border-box;border-radius:20px;height:28px;font-family:Poppins,sans-serif}.toggle-container.disabled[_ngcontent-%COMP%]{pointer-events:none}.toggle-container__item[_ngcontent-%COMP%]{height:28px;display:flex;align-items:center;justify-content:center;padding:4px 16px;border-radius:20px;margin:-1px;cursor:pointer;font-weight:400;font-size:12px;line-height:20px;white-space:nowrap;color:#4e566c;box-sizing:border-box}.toggle-container__item.selected[_ngcontent-%COMP%]{background:#f2f2fb!important;border:1px solid #7f7fdd!important;color:#25258c!important}.toggle-container__item.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:default;background:#f0f1f4;color:#9ea1aa;border:1px solid #c3c4ce}.toggle-container__item__icon[_ngcontent-%COMP%]{margin-right:4px}.toggle-container[mode~=default][_ngcontent-%COMP%], .toggle-container[mode~=iconOnly][_ngcontent-%COMP%]{background:#f6f7f8;border:1px solid #c3c4ce}.toggle-container[mode~=iconOnly][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]{padding:2px 8px}.toggle-container[mode~=dotted][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]{padding:2px 8px;border:1px solid #9ea1aa;border-radius:18px;margin-left:4px;color:#0c142b}.toggle-container[mode~=dotted][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]:hover{background:#f0f1f4}.toggle-container[mode~=dotted][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]:hover .toggle-container[mode~=dotted][_ngcontent-%COMP%] .toggle-container__item.selected[_ngcontent-%COMP%]{background:unset}.toggle-container[mode~=dotted][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]:first-child{margin-left:0}.toggle-container[mode~=box][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]{height:40px;padding:8px 16px 8px 8px;border:1px solid #dfe0e3;border-radius:8px;margin-left:8px;color:#333;font-weight:400;font-size:14px;line-height:22px}.toggle-container[mode~=box][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]:hover{background:#f0f1f4}.toggle-container[mode~=box][_ngcontent-%COMP%] .toggle-container__item.selected[_ngcontent-%COMP%]{background:#eaeaff!important;border:1px solid #dfe0e3!important;color:#333!important}.toggle-container[mode~=box][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]:hover .toggle-container[mode~=box][_ngcontent-%COMP%] .toggle-container__item.selected[_ngcontent-%COMP%]{background:unset}.toggle-container[mode~=box][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]:first-child{margin-left:0}"], changeDetection: 0 }); }
|
|
95
108
|
}
|
|
96
109
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DrToggleButtonComponent, [{
|
|
97
110
|
type: Component,
|
|
98
|
-
args: [{ selector: 'dr-toggle-button', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef((() => DrToggleButtonComponent)), multi: true }], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"toggle-container\" [class.disabled]=\"_disabled\" [attr.mode]=\"mode\">\n <ng-container *ngFor=\"let item of items\">\n <div\n *ngIf=\"item && !item[bindHidden]\"\n class=\"toggle-container__item\"\n [class.selected]=\"item[bindValue] === selectedValue || item === selectedValue\"\n [class.disabled]=\"item.disabled\"\n (click)=\"setValue(item)\"\n [attr.data-analytics]=\"getDataAnalyticsTag(item)\">\n <i *ngIf=\"item.icon\" class=\"toggle-container__item__icon\" [class]=\"item.icon\"></i>\n {{ item[bindLabel] || item.name || item }}\n </div>\n </ng-container>\n</div>\n", styles: [":host{display:flex}.toggle-container{display:flex;flex-wrap:nowrap;box-sizing:border-box;border-radius:20px;height:28px;font-family:Poppins,sans-serif}.toggle-container.disabled{pointer-events:none}.toggle-container__item{height:28px;display:flex;align-items:center;justify-content:center;padding:4px 16px;border-radius:20px;margin:-1px;cursor:pointer;font-weight:400;font-size:12px;line-height:20px;white-space:nowrap;color:#4e566c;box-sizing:border-box}.toggle-container__item.selected{background:#f2f2fb!important;border:1px solid #7f7fdd!important;color:#25258c!important}.toggle-container__item.disabled{pointer-events:none;cursor:default;background:#f0f1f4;color:#9ea1aa;border:1px solid #c3c4ce}.toggle-container__item__icon{margin-right:4px}.toggle-container[mode~=default]{background:#f6f7f8;border:1px solid #c3c4ce}.toggle-container[mode~=dotted] .toggle-container__item{padding:2px 8px;border:1px solid #9ea1aa;border-radius:18px;margin-left:4px;color:#0c142b}.toggle-container[mode~=dotted] .toggle-container__item:hover{background:#f0f1f4}.toggle-container[mode~=dotted] .toggle-container__item:hover .toggle-container[mode~=dotted] .toggle-container__item.selected{background:unset}.toggle-container[mode~=dotted] .toggle-container__item:first-child{margin-left:0}.toggle-container[mode~=box] .toggle-container__item{height:40px;padding:8px 16px 8px 8px;border:1px solid #
|
|
111
|
+
args: [{ selector: 'dr-toggle-button', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef((() => DrToggleButtonComponent)), multi: true }], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"toggle-container\" [class.disabled]=\"_disabled\" [attr.mode]=\"mode\">\n <ng-container *ngFor=\"let item of items\">\n <div\n *ngIf=\"item && !item[bindHidden]\"\n class=\"toggle-container__item\"\n [drTooltip]=\"item.tooltip\"\n [class.selected]=\"item[bindValue] === selectedValue || item === selectedValue\"\n [class.disabled]=\"item.disabled\"\n (click)=\"setValue(item)\"\n [attr.data-analytics]=\"getDataAnalyticsTag(item)\">\n <i *ngIf=\"item.icon\" class=\"toggle-container__item__icon\" [class]=\"item.icon\"></i>\n <ng-container *ngIf=\"mode !== ToggleButtonMode.ICON_ONLY\">\n {{ item[bindLabel] || item.name || item }}\n </ng-container>\n </div>\n </ng-container>\n</div>\n", styles: [":host{display:flex}.toggle-container{display:flex;flex-wrap:nowrap;box-sizing:border-box;border-radius:20px;height:28px;font-family:Poppins,sans-serif}.toggle-container.disabled{pointer-events:none}.toggle-container__item{height:28px;display:flex;align-items:center;justify-content:center;padding:4px 16px;border-radius:20px;margin:-1px;cursor:pointer;font-weight:400;font-size:12px;line-height:20px;white-space:nowrap;color:#4e566c;box-sizing:border-box}.toggle-container__item.selected{background:#f2f2fb!important;border:1px solid #7f7fdd!important;color:#25258c!important}.toggle-container__item.disabled{pointer-events:none;cursor:default;background:#f0f1f4;color:#9ea1aa;border:1px solid #c3c4ce}.toggle-container__item__icon{margin-right:4px}.toggle-container[mode~=default],.toggle-container[mode~=iconOnly]{background:#f6f7f8;border:1px solid #c3c4ce}.toggle-container[mode~=iconOnly] .toggle-container__item{padding:2px 8px}.toggle-container[mode~=dotted] .toggle-container__item{padding:2px 8px;border:1px solid #9ea1aa;border-radius:18px;margin-left:4px;color:#0c142b}.toggle-container[mode~=dotted] .toggle-container__item:hover{background:#f0f1f4}.toggle-container[mode~=dotted] .toggle-container__item:hover .toggle-container[mode~=dotted] .toggle-container__item.selected{background:unset}.toggle-container[mode~=dotted] .toggle-container__item:first-child{margin-left:0}.toggle-container[mode~=box] .toggle-container__item{height:40px;padding:8px 16px 8px 8px;border:1px solid #dfe0e3;border-radius:8px;margin-left:8px;color:#333;font-weight:400;font-size:14px;line-height:22px}.toggle-container[mode~=box] .toggle-container__item:hover{background:#f0f1f4}.toggle-container[mode~=box] .toggle-container__item.selected{background:#eaeaff!important;border:1px solid #dfe0e3!important;color:#333!important}.toggle-container[mode~=box] .toggle-container__item:hover .toggle-container[mode~=box] .toggle-container__item.selected{background:unset}.toggle-container[mode~=box] .toggle-container__item:first-child{margin-left:0}\n"] }]
|
|
99
112
|
}], function () { return [{ type: i0.ChangeDetectorRef }]; }, { items: [{
|
|
100
113
|
type: Input
|
|
101
114
|
}], bindLabel: [{
|
|
@@ -114,4 +127,4 @@ export class DrToggleButtonComponent {
|
|
|
114
127
|
type: Input,
|
|
115
128
|
args: [{ alias: 'data-analytics' }]
|
|
116
129
|
}] }); })();
|
|
117
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
130
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHItdG9nZ2xlLWJ1dHRvbi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ij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VkVmFsdWUgfHwgaXRlbSA9PT0gc2VsZWN0ZWRWYWx1ZVwiXG4gICAgICAgICAgICBbY2xhc3MuZGlzYWJsZWRdPVwiaXRlbS5kaXNhYmxlZFwiXG4gICAgICAgICAgICAoY2xpY2spPVwic2V0VmFsdWUoaXRlbSlcIlxuICAgICAgICAgICAgW2F0dHIuZGF0YS1hbmFseXRpY3NdPVwiZ2V0RGF0YUFuYWx5dGljc1RhZyhpdGVtKVwiPlxuICAgICAgICAgICAgPGkgKm5nSWY9XCJpdGVtLmljb25cIiBjbGFzcz1cInRvZ2dsZS1jb250YWluZXJfX2l0ZW1fX2ljb25cIiBbY2xhc3NdPVwiaXRlbS5pY29uXCI+PC9pPlxuICAgICAgICAgICAgPG5nLWNvbnRhaW5lciAqbmdJZj1cIm1vZGUgIT09IFRvZ2dsZUJ1dHRvbk1vZGUuSUNPTl9PTkxZXCI+XG4gICAgICAgICAgICAgICAge3sgaXRlbVtiaW5kTGFiZWxdIHx8IGl0ZW0ubmFtZSB8fCBpdGVtIH19XG4gICAgICAgICAgICA8L25nLWNvbnRhaW5lcj5cbiAgICAgICAgPC9kaXY+XG4gICAgPC9uZy1jb250YWluZXI+XG48L2Rpdj5cbiJdfQ==
|
|
@@ -3,5 +3,6 @@ export var ToggleButtonMode;
|
|
|
3
3
|
ToggleButtonMode["DEFAULT"] = "default";
|
|
4
4
|
ToggleButtonMode["DOTTED"] = "dotted";
|
|
5
5
|
ToggleButtonMode["BOX"] = "box";
|
|
6
|
+
ToggleButtonMode["ICON_ONLY"] = "iconOnly";
|
|
6
7
|
})(ToggleButtonMode || (ToggleButtonMode = {}));
|
|
7
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
8
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9nZ2xlLWJ1dHRvbi1tb2RlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZGF0YXJhaWxzc2hhcmVkL3NyYy9saWIvZHItaW5wdXRzL2RyLXRvZ2dsZS1idXR0b24vdG9nZ2xlLWJ1dHRvbi1tb2RlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sQ0FBTixJQUFZLGdCQUtYO0FBTEQsV0FBWSxnQkFBZ0I7SUFDeEIsdUNBQW1CLENBQUE7SUFDbkIscUNBQWlCLENBQUE7SUFDakIsK0JBQVcsQ0FBQTtJQUNYLDBDQUFzQixDQUFBO0FBQzFCLENBQUMsRUFMVyxnQkFBZ0IsS0FBaEIsZ0JBQWdCLFFBSzNCIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGVudW0gVG9nZ2xlQnV0dG9uTW9kZSB7XG4gICAgREVGQVVMVCA9ICdkZWZhdWx0JyxcbiAgICBET1RURUQgPSAnZG90dGVkJyxcbiAgICBCT1ggPSAnYm94JyxcbiAgICBJQ09OX09OTFkgPSAnaWNvbk9ubHknLFxufVxuIl19
|
|
@@ -3563,34 +3563,46 @@ var ToggleButtonMode;
|
|
|
3563
3563
|
ToggleButtonMode["DEFAULT"] = "default";
|
|
3564
3564
|
ToggleButtonMode["DOTTED"] = "dotted";
|
|
3565
3565
|
ToggleButtonMode["BOX"] = "box";
|
|
3566
|
+
ToggleButtonMode["ICON_ONLY"] = "iconOnly";
|
|
3566
3567
|
})(ToggleButtonMode || (ToggleButtonMode = {}));
|
|
3567
3568
|
|
|
3568
3569
|
function DrToggleButtonComponent_ng_container_1_div_1_i_1_Template(rf, ctx) { if (rf & 1) {
|
|
3569
|
-
i0.ɵɵelement(0, "i",
|
|
3570
|
+
i0.ɵɵelement(0, "i", 6);
|
|
3570
3571
|
} if (rf & 2) {
|
|
3571
3572
|
const item_r1 = i0.ɵɵnextContext(2).$implicit;
|
|
3572
3573
|
i0.ɵɵclassMap(item_r1.icon);
|
|
3573
3574
|
} }
|
|
3575
|
+
function DrToggleButtonComponent_ng_container_1_div_1_ng_container_2_Template(rf, ctx) { if (rf & 1) {
|
|
3576
|
+
i0.ɵɵelementContainerStart(0);
|
|
3577
|
+
i0.ɵɵtext(1);
|
|
3578
|
+
i0.ɵɵelementContainerEnd();
|
|
3579
|
+
} if (rf & 2) {
|
|
3580
|
+
const item_r1 = i0.ɵɵnextContext(2).$implicit;
|
|
3581
|
+
const ctx_r4 = i0.ɵɵnextContext();
|
|
3582
|
+
i0.ɵɵadvance(1);
|
|
3583
|
+
i0.ɵɵtextInterpolate1(" ", item_r1[ctx_r4.bindLabel] || item_r1.name || item_r1, " ");
|
|
3584
|
+
} }
|
|
3574
3585
|
function DrToggleButtonComponent_ng_container_1_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
3575
|
-
const
|
|
3586
|
+
const _r9 = i0.ɵɵgetCurrentView();
|
|
3576
3587
|
i0.ɵɵelementStart(0, "div", 3);
|
|
3577
|
-
i0.ɵɵlistener("click", function DrToggleButtonComponent_ng_container_1_div_1_Template_div_click_0_listener() { i0.ɵɵrestoreView(
|
|
3588
|
+
i0.ɵɵlistener("click", function DrToggleButtonComponent_ng_container_1_div_1_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r9); const item_r1 = i0.ɵɵnextContext().$implicit; const ctx_r7 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r7.setValue(item_r1)); });
|
|
3578
3589
|
i0.ɵɵtemplate(1, DrToggleButtonComponent_ng_container_1_div_1_i_1_Template, 1, 2, "i", 4);
|
|
3579
|
-
i0.ɵɵ
|
|
3590
|
+
i0.ɵɵtemplate(2, DrToggleButtonComponent_ng_container_1_div_1_ng_container_2_Template, 2, 1, "ng-container", 5);
|
|
3580
3591
|
i0.ɵɵelementEnd();
|
|
3581
3592
|
} if (rf & 2) {
|
|
3582
3593
|
const item_r1 = i0.ɵɵnextContext().$implicit;
|
|
3583
3594
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
3584
3595
|
i0.ɵɵclassProp("selected", item_r1[ctx_r2.bindValue] === ctx_r2.selectedValue || item_r1 === ctx_r2.selectedValue)("disabled", item_r1.disabled);
|
|
3596
|
+
i0.ɵɵproperty("drTooltip", item_r1.tooltip);
|
|
3585
3597
|
i0.ɵɵattribute("data-analytics", ctx_r2.getDataAnalyticsTag(item_r1));
|
|
3586
3598
|
i0.ɵɵadvance(1);
|
|
3587
3599
|
i0.ɵɵproperty("ngIf", item_r1.icon);
|
|
3588
3600
|
i0.ɵɵadvance(1);
|
|
3589
|
-
i0.ɵɵ
|
|
3601
|
+
i0.ɵɵproperty("ngIf", ctx_r2.mode !== ctx_r2.ToggleButtonMode.ICON_ONLY);
|
|
3590
3602
|
} }
|
|
3591
3603
|
function DrToggleButtonComponent_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
3592
3604
|
i0.ɵɵelementContainerStart(0);
|
|
3593
|
-
i0.ɵɵtemplate(1, DrToggleButtonComponent_ng_container_1_div_1_Template, 3,
|
|
3605
|
+
i0.ɵɵtemplate(1, DrToggleButtonComponent_ng_container_1_div_1_Template, 3, 8, "div", 2);
|
|
3594
3606
|
i0.ɵɵelementContainerEnd();
|
|
3595
3607
|
} if (rf & 2) {
|
|
3596
3608
|
const item_r1 = ctx.$implicit;
|
|
@@ -3609,6 +3621,7 @@ class DrToggleButtonComponent {
|
|
|
3609
3621
|
this.bindValue = null;
|
|
3610
3622
|
this.bindHidden = null;
|
|
3611
3623
|
this.mode = ToggleButtonMode.DEFAULT;
|
|
3624
|
+
this.ToggleButtonMode = ToggleButtonMode;
|
|
3612
3625
|
this.onChange = () => { };
|
|
3613
3626
|
this.onTouched = () => { };
|
|
3614
3627
|
}
|
|
@@ -3644,7 +3657,7 @@ class DrToggleButtonComponent {
|
|
|
3644
3657
|
return this.dataAnalytics + '_' + String(value).toLowerCase().replace(/ /g, '-');
|
|
3645
3658
|
}
|
|
3646
3659
|
/** @nocollapse */ static { this.ɵfac = function DrToggleButtonComponent_Factory(t) { return new (t || DrToggleButtonComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); }; }
|
|
3647
|
-
/** @nocollapse */ static { this.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: DrToggleButtonComponent, selectors: [["dr-toggle-button"]], inputs: { items: "items", bindLabel: "bindLabel", bindValue: "bindValue", bindHidden: "bindHidden", mode: "mode", selectedValue: "selectedValue", disabled: "disabled", dataAnalytics: ["data-analytics", "dataAnalytics"] }, features: [i0.ɵɵProvidersFeature([{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef((() => DrToggleButtonComponent)), multi: true }])], decls: 2, vars: 4, consts: [[1, "toggle-container"], [4, "ngFor", "ngForOf"], ["class", "toggle-container__item", 3, "selected", "disabled", "click", 4, "ngIf"], [1, "toggle-container__item", 3, "click"], ["class", "toggle-container__item__icon", 3, "class", 4, "ngIf"], [1, "toggle-container__item__icon"]], template: function DrToggleButtonComponent_Template(rf, ctx) { if (rf & 1) {
|
|
3660
|
+
/** @nocollapse */ static { this.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: DrToggleButtonComponent, selectors: [["dr-toggle-button"]], inputs: { items: "items", bindLabel: "bindLabel", bindValue: "bindValue", bindHidden: "bindHidden", mode: "mode", selectedValue: "selectedValue", disabled: "disabled", dataAnalytics: ["data-analytics", "dataAnalytics"] }, features: [i0.ɵɵProvidersFeature([{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef((() => DrToggleButtonComponent)), multi: true }])], decls: 2, vars: 4, consts: [[1, "toggle-container"], [4, "ngFor", "ngForOf"], ["class", "toggle-container__item", 3, "drTooltip", "selected", "disabled", "click", 4, "ngIf"], [1, "toggle-container__item", 3, "drTooltip", "click"], ["class", "toggle-container__item__icon", 3, "class", 4, "ngIf"], [4, "ngIf"], [1, "toggle-container__item__icon"]], template: function DrToggleButtonComponent_Template(rf, ctx) { if (rf & 1) {
|
|
3648
3661
|
i0.ɵɵelementStart(0, "div", 0);
|
|
3649
3662
|
i0.ɵɵtemplate(1, DrToggleButtonComponent_ng_container_1_Template, 2, 1, "ng-container", 1);
|
|
3650
3663
|
i0.ɵɵelementEnd();
|
|
@@ -3653,11 +3666,11 @@ class DrToggleButtonComponent {
|
|
|
3653
3666
|
i0.ɵɵattribute("mode", ctx.mode);
|
|
3654
3667
|
i0.ɵɵadvance(1);
|
|
3655
3668
|
i0.ɵɵproperty("ngForOf", ctx.items);
|
|
3656
|
-
} }, dependencies: [i1.NgForOf, i1.NgIf], styles: ["[_nghost-%COMP%]{display:flex}.toggle-container[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap;box-sizing:border-box;border-radius:20px;height:28px;font-family:Poppins,sans-serif}.toggle-container.disabled[_ngcontent-%COMP%]{pointer-events:none}.toggle-container__item[_ngcontent-%COMP%]{height:28px;display:flex;align-items:center;justify-content:center;padding:4px 16px;border-radius:20px;margin:-1px;cursor:pointer;font-weight:400;font-size:12px;line-height:20px;white-space:nowrap;color:#4e566c;box-sizing:border-box}.toggle-container__item.selected[_ngcontent-%COMP%]{background:#f2f2fb!important;border:1px solid #7f7fdd!important;color:#25258c!important}.toggle-container__item.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:default;background:#f0f1f4;color:#9ea1aa;border:1px solid #c3c4ce}.toggle-container__item__icon[_ngcontent-%COMP%]{margin-right:4px}.toggle-container[mode~=default][_ngcontent-%COMP%]{background:#f6f7f8;border:1px solid #c3c4ce}.toggle-container[mode~=dotted][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]{padding:2px 8px;border:1px solid #9ea1aa;border-radius:18px;margin-left:4px;color:#0c142b}.toggle-container[mode~=dotted][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]:hover{background:#f0f1f4}.toggle-container[mode~=dotted][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]:hover .toggle-container[mode~=dotted][_ngcontent-%COMP%] .toggle-container__item.selected[_ngcontent-%COMP%]{background:unset}.toggle-container[mode~=dotted][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]:first-child{margin-left:0}.toggle-container[mode~=box][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]{height:40px;padding:8px 16px 8px 8px;border:1px solid #
|
|
3669
|
+
} }, dependencies: [i1.NgForOf, i1.NgIf, DrTooltipDirective], styles: ["[_nghost-%COMP%]{display:flex}.toggle-container[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap;box-sizing:border-box;border-radius:20px;height:28px;font-family:Poppins,sans-serif}.toggle-container.disabled[_ngcontent-%COMP%]{pointer-events:none}.toggle-container__item[_ngcontent-%COMP%]{height:28px;display:flex;align-items:center;justify-content:center;padding:4px 16px;border-radius:20px;margin:-1px;cursor:pointer;font-weight:400;font-size:12px;line-height:20px;white-space:nowrap;color:#4e566c;box-sizing:border-box}.toggle-container__item.selected[_ngcontent-%COMP%]{background:#f2f2fb!important;border:1px solid #7f7fdd!important;color:#25258c!important}.toggle-container__item.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:default;background:#f0f1f4;color:#9ea1aa;border:1px solid #c3c4ce}.toggle-container__item__icon[_ngcontent-%COMP%]{margin-right:4px}.toggle-container[mode~=default][_ngcontent-%COMP%], .toggle-container[mode~=iconOnly][_ngcontent-%COMP%]{background:#f6f7f8;border:1px solid #c3c4ce}.toggle-container[mode~=iconOnly][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]{padding:2px 8px}.toggle-container[mode~=dotted][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]{padding:2px 8px;border:1px solid #9ea1aa;border-radius:18px;margin-left:4px;color:#0c142b}.toggle-container[mode~=dotted][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]:hover{background:#f0f1f4}.toggle-container[mode~=dotted][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]:hover .toggle-container[mode~=dotted][_ngcontent-%COMP%] .toggle-container__item.selected[_ngcontent-%COMP%]{background:unset}.toggle-container[mode~=dotted][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]:first-child{margin-left:0}.toggle-container[mode~=box][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]{height:40px;padding:8px 16px 8px 8px;border:1px solid #dfe0e3;border-radius:8px;margin-left:8px;color:#333;font-weight:400;font-size:14px;line-height:22px}.toggle-container[mode~=box][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]:hover{background:#f0f1f4}.toggle-container[mode~=box][_ngcontent-%COMP%] .toggle-container__item.selected[_ngcontent-%COMP%]{background:#eaeaff!important;border:1px solid #dfe0e3!important;color:#333!important}.toggle-container[mode~=box][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]:hover .toggle-container[mode~=box][_ngcontent-%COMP%] .toggle-container__item.selected[_ngcontent-%COMP%]{background:unset}.toggle-container[mode~=box][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]:first-child{margin-left:0}"], changeDetection: 0 }); }
|
|
3657
3670
|
}
|
|
3658
3671
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DrToggleButtonComponent, [{
|
|
3659
3672
|
type: Component,
|
|
3660
|
-
args: [{ selector: 'dr-toggle-button', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef((() => DrToggleButtonComponent)), multi: true }], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"toggle-container\" [class.disabled]=\"_disabled\" [attr.mode]=\"mode\">\n <ng-container *ngFor=\"let item of items\">\n <div\n *ngIf=\"item && !item[bindHidden]\"\n class=\"toggle-container__item\"\n [class.selected]=\"item[bindValue] === selectedValue || item === selectedValue\"\n [class.disabled]=\"item.disabled\"\n (click)=\"setValue(item)\"\n [attr.data-analytics]=\"getDataAnalyticsTag(item)\">\n <i *ngIf=\"item.icon\" class=\"toggle-container__item__icon\" [class]=\"item.icon\"></i>\n {{ item[bindLabel] || item.name || item }}\n </div>\n </ng-container>\n</div>\n", styles: [":host{display:flex}.toggle-container{display:flex;flex-wrap:nowrap;box-sizing:border-box;border-radius:20px;height:28px;font-family:Poppins,sans-serif}.toggle-container.disabled{pointer-events:none}.toggle-container__item{height:28px;display:flex;align-items:center;justify-content:center;padding:4px 16px;border-radius:20px;margin:-1px;cursor:pointer;font-weight:400;font-size:12px;line-height:20px;white-space:nowrap;color:#4e566c;box-sizing:border-box}.toggle-container__item.selected{background:#f2f2fb!important;border:1px solid #7f7fdd!important;color:#25258c!important}.toggle-container__item.disabled{pointer-events:none;cursor:default;background:#f0f1f4;color:#9ea1aa;border:1px solid #c3c4ce}.toggle-container__item__icon{margin-right:4px}.toggle-container[mode~=default]{background:#f6f7f8;border:1px solid #c3c4ce}.toggle-container[mode~=dotted] .toggle-container__item{padding:2px 8px;border:1px solid #9ea1aa;border-radius:18px;margin-left:4px;color:#0c142b}.toggle-container[mode~=dotted] .toggle-container__item:hover{background:#f0f1f4}.toggle-container[mode~=dotted] .toggle-container__item:hover .toggle-container[mode~=dotted] .toggle-container__item.selected{background:unset}.toggle-container[mode~=dotted] .toggle-container__item:first-child{margin-left:0}.toggle-container[mode~=box] .toggle-container__item{height:40px;padding:8px 16px 8px 8px;border:1px solid #
|
|
3673
|
+
args: [{ selector: 'dr-toggle-button', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef((() => DrToggleButtonComponent)), multi: true }], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"toggle-container\" [class.disabled]=\"_disabled\" [attr.mode]=\"mode\">\n <ng-container *ngFor=\"let item of items\">\n <div\n *ngIf=\"item && !item[bindHidden]\"\n class=\"toggle-container__item\"\n [drTooltip]=\"item.tooltip\"\n [class.selected]=\"item[bindValue] === selectedValue || item === selectedValue\"\n [class.disabled]=\"item.disabled\"\n (click)=\"setValue(item)\"\n [attr.data-analytics]=\"getDataAnalyticsTag(item)\">\n <i *ngIf=\"item.icon\" class=\"toggle-container__item__icon\" [class]=\"item.icon\"></i>\n <ng-container *ngIf=\"mode !== ToggleButtonMode.ICON_ONLY\">\n {{ item[bindLabel] || item.name || item }}\n </ng-container>\n </div>\n </ng-container>\n</div>\n", styles: [":host{display:flex}.toggle-container{display:flex;flex-wrap:nowrap;box-sizing:border-box;border-radius:20px;height:28px;font-family:Poppins,sans-serif}.toggle-container.disabled{pointer-events:none}.toggle-container__item{height:28px;display:flex;align-items:center;justify-content:center;padding:4px 16px;border-radius:20px;margin:-1px;cursor:pointer;font-weight:400;font-size:12px;line-height:20px;white-space:nowrap;color:#4e566c;box-sizing:border-box}.toggle-container__item.selected{background:#f2f2fb!important;border:1px solid #7f7fdd!important;color:#25258c!important}.toggle-container__item.disabled{pointer-events:none;cursor:default;background:#f0f1f4;color:#9ea1aa;border:1px solid #c3c4ce}.toggle-container__item__icon{margin-right:4px}.toggle-container[mode~=default],.toggle-container[mode~=iconOnly]{background:#f6f7f8;border:1px solid #c3c4ce}.toggle-container[mode~=iconOnly] .toggle-container__item{padding:2px 8px}.toggle-container[mode~=dotted] .toggle-container__item{padding:2px 8px;border:1px solid #9ea1aa;border-radius:18px;margin-left:4px;color:#0c142b}.toggle-container[mode~=dotted] .toggle-container__item:hover{background:#f0f1f4}.toggle-container[mode~=dotted] .toggle-container__item:hover .toggle-container[mode~=dotted] .toggle-container__item.selected{background:unset}.toggle-container[mode~=dotted] .toggle-container__item:first-child{margin-left:0}.toggle-container[mode~=box] .toggle-container__item{height:40px;padding:8px 16px 8px 8px;border:1px solid #dfe0e3;border-radius:8px;margin-left:8px;color:#333;font-weight:400;font-size:14px;line-height:22px}.toggle-container[mode~=box] .toggle-container__item:hover{background:#f0f1f4}.toggle-container[mode~=box] .toggle-container__item.selected{background:#eaeaff!important;border:1px solid #dfe0e3!important;color:#333!important}.toggle-container[mode~=box] .toggle-container__item:hover .toggle-container[mode~=box] .toggle-container__item.selected{background:unset}.toggle-container[mode~=box] .toggle-container__item:first-child{margin-left:0}\n"] }]
|
|
3661
3674
|
}], function () { return [{ type: i0.ChangeDetectorRef }]; }, { items: [{
|
|
3662
3675
|
type: Input
|
|
3663
3676
|
}], bindLabel: [{
|