@rivet-health/design-system 40.0.0 → 40.2.0
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/esm2020/lib/input/date/date.component.mjs +17 -9
- package/esm2020/lib/navigation/views/view-menu/view-menu.component.mjs +1 -1
- package/esm2020/lib/overlay/modal/dialog/dialog.component.mjs +9 -3
- package/fesm2015/rivet-health-design-system.mjs +18 -5
- package/fesm2015/rivet-health-design-system.mjs.map +1 -1
- package/fesm2020/rivet-health-design-system.mjs +18 -5
- package/fesm2020/rivet-health-design-system.mjs.map +1 -1
- package/lib/input/date/date.component.d.ts +4 -2
- package/lib/overlay/modal/dialog/dialog.component.d.ts +3 -1
- package/package.json +1 -1
- package/styles/global.css +14 -0
|
@@ -5,12 +5,13 @@ import { CalendarComponent } from '../calendar/calendar.component';
|
|
|
5
5
|
import { InputLabelComponent } from '../input-label/input-label.component';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
import * as i1 from "@angular/common";
|
|
8
|
-
import * as i2 from "../
|
|
9
|
-
import * as i3 from "
|
|
10
|
-
import * as i4 from "../../
|
|
11
|
-
import * as i5 from "
|
|
12
|
-
import * as i6 from "
|
|
13
|
-
import * as i7 from "../../
|
|
8
|
+
import * as i2 from "../button/button.component";
|
|
9
|
+
import * as i3 from "../calendar/calendar.component";
|
|
10
|
+
import * as i4 from "../../overlay/callout/callout.component";
|
|
11
|
+
import * as i5 from "../../icon/icon.component";
|
|
12
|
+
import * as i6 from "../input-label/input-label.component";
|
|
13
|
+
import * as i7 from "../../overlay/overlay.directive";
|
|
14
|
+
import * as i8 from "../../format/pipes/date.pipe";
|
|
14
15
|
export class DateComponent extends InputLabelComponent {
|
|
15
16
|
constructor() {
|
|
16
17
|
super(...arguments);
|
|
@@ -19,6 +20,7 @@ export class DateComponent extends InputLabelComponent {
|
|
|
19
20
|
this.placeholder = 'Select date';
|
|
20
21
|
this.disabled = false;
|
|
21
22
|
this.size = 'medium';
|
|
23
|
+
this.showClearButton = true;
|
|
22
24
|
this.activeYearMonth = timeMonth.floor(new Date());
|
|
23
25
|
this.open$ = new BehaviorSubject(false);
|
|
24
26
|
this.valueChange = new EventEmitter();
|
|
@@ -43,12 +45,16 @@ export class DateComponent extends InputLabelComponent {
|
|
|
43
45
|
get open() {
|
|
44
46
|
return this.open$.getValue();
|
|
45
47
|
}
|
|
48
|
+
clearValue() {
|
|
49
|
+
this.valueChange.emit(undefined);
|
|
50
|
+
this.open$.next(false);
|
|
51
|
+
}
|
|
46
52
|
}
|
|
47
53
|
DateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DateComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
48
|
-
DateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DateComponent, selector: "riv-date", inputs: { min: "min", max: "max", value: "value", placeholder: "placeholder", disabled: "disabled", size: "size", open: "open" }, outputs: { valueChange: "valueChange" }, queries: [{ propertyName: "headerTemplate", first: true, predicate: ["header"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<riv-input-label\n [label]=\"label\"\n [help]=\"help\"\n [required]=\"required\"\n [state]=\"state\"\n [errorMessage]=\"errorMessage\"\n [labelActionText]=\"labelActionText\"\n (labelAction)=\"labelAction.emit($event)\"\n>\n <button\n #trigger\n class=\"trigger\"\n [class.xsmall]=\"size === 'xsmall'\"\n [class.small]=\"size === 'small'\"\n [class.large]=\"size === 'large'\"\n [class.xlarge]=\"size === 'xlarge'\"\n [class.warning]=\"state === 'warning'\"\n [class.error]=\"state === 'error'\"\n (click)=\"open$.next(true)\"\n [disabled]=\"disabled\"\n type=\"button\"\n >\n <ng-container *ngIf=\"value; else placeholderValue\">\n <span class=\"value\">{{ value | rivDate }}</span>\n </ng-container>\n <ng-template #placeholderValue>\n <span class=\"value placeholder\">{{ placeholder }}</span>\n </ng-template>\n <span class=\"chevron\">\n <riv-icon [name]=\"'Calendar'\" [size]=\"16\"></riv-icon>\n </span>\n </button>\n</riv-input-label>\n<ng-container *ngIf=\"open$ | async\">\n <riv-callout\n *riv-overlay\n [anchor]=\"trigger\"\n [showCaret]=\"false\"\n [theme]=\"'light'\"\n [allowedPositions]=\"[\n 'top-left',\n 'top-right',\n 'bottom-right',\n 'bottom-left'\n ]\"\n [preferredPosition]=\"'bottom-right'\"\n (close)=\"open$.next(false)\"\n >\n <header *ngIf=\"headerTemplate\">\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n </header>\n <div class=\"content\">\n <riv-calendar\n [activeYearMonth]=\"activeYearMonth\"\n (activeYearMonthChange)=\"activeYearMonth = $event\"\n [displayMin]=\"min\"\n [displayMax]=\"max\"\n [selectableMin]=\"min\"\n [selectableMax]=\"max\"\n [selectedValue]=\"value\"\n (dateSelect)=\"valueChange.next($event); open$.next(false)\"\n ></riv-calendar>\n </div>\n </riv-callout>\n</ng-container>\n", styles: [".trigger{width:100%;border:var(--border-width) solid var(--border-light);border-radius:var(--border-radius-small);display:flex;gap:var(--size-small);background-color:var(--surface-light-0);cursor:pointer;padding-left:var(--size-small)}.trigger:focus{outline:none;border:var(--border-width) solid var(--purp-60)}.trigger:disabled{color:var(--type-light-disabled);background-color:var(--surface-light-1)}.value{font:var(--input-medium);color:var(--type-light-high-contrast);padding:var(--size-small) 0;flex-grow:1;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:pre}.value.placeholder{color:var(--type-light-disabled)}.trigger.xsmall .value{font:var(--input-small);padding:var(--size-xsmall) 0}.trigger.small .value{font:var(--input-small)}.trigger.large .value{font:var(--input-large);padding:var(--size-medium) var(--size-xsmall)}.trigger.xlarge .value{font:var(--input-large);padding:var(--size-large) var(--size-small)}.chevron{display:flex;justify-content:center;align-items:center;padding:var(--size-xsmall) calc(var(--base-grid-size) * 1.5)}.trigger.warning{border-color:var(--surface-dark-caution)}.trigger.error{border-color:var(--surface-dark-danger);box-shadow:inset 0 0 0 var(--border-width-large) var(--surface-dark-danger)}.content{padding:var(--size-large)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.CalendarComponent, selector: "riv-calendar", inputs: ["activeYearMonth", "displayMin", "displayMax", "selectableMin", "selectableMax", "omitRange", "selectedValue"], outputs: ["activeYearMonthChange", "dateSelect"] }, { kind: "component", type:
|
|
54
|
+
DateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DateComponent, selector: "riv-date", inputs: { min: "min", max: "max", value: "value", placeholder: "placeholder", disabled: "disabled", size: "size", showClearButton: "showClearButton", open: "open" }, outputs: { valueChange: "valueChange" }, queries: [{ propertyName: "headerTemplate", first: true, predicate: ["header"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<riv-input-label\n [label]=\"label\"\n [help]=\"help\"\n [required]=\"required\"\n [state]=\"state\"\n [errorMessage]=\"errorMessage\"\n [labelActionText]=\"labelActionText\"\n (labelAction)=\"labelAction.emit($event)\"\n>\n <button\n #trigger\n class=\"trigger\"\n [class.xsmall]=\"size === 'xsmall'\"\n [class.small]=\"size === 'small'\"\n [class.large]=\"size === 'large'\"\n [class.xlarge]=\"size === 'xlarge'\"\n [class.warning]=\"state === 'warning'\"\n [class.error]=\"state === 'error'\"\n (click)=\"open$.next(true)\"\n [disabled]=\"disabled\"\n type=\"button\"\n >\n <ng-container *ngIf=\"value; else placeholderValue\">\n <span class=\"value\">{{ value | rivDate }}</span>\n </ng-container>\n <ng-template #placeholderValue>\n <span class=\"value placeholder\">{{ placeholder }}</span>\n </ng-template>\n <span class=\"chevron\">\n <riv-icon [name]=\"'Calendar'\" [size]=\"16\"></riv-icon>\n </span>\n </button>\n</riv-input-label>\n<ng-container *ngIf=\"open$ | async\">\n <riv-callout\n *riv-overlay\n [anchor]=\"trigger\"\n [showCaret]=\"false\"\n [theme]=\"'light'\"\n [allowedPositions]=\"[\n 'top-left',\n 'top-right',\n 'bottom-right',\n 'bottom-left'\n ]\"\n [preferredPosition]=\"'bottom-right'\"\n (close)=\"open$.next(false)\"\n >\n <header *ngIf=\"headerTemplate\">\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n </header>\n <div class=\"content\">\n <riv-calendar\n [activeYearMonth]=\"activeYearMonth\"\n (activeYearMonthChange)=\"activeYearMonth = $event\"\n [displayMin]=\"min\"\n [displayMax]=\"max\"\n [selectableMin]=\"min\"\n [selectableMax]=\"max\"\n [selectedValue]=\"value\"\n (dateSelect)=\"valueChange.next($event); open$.next(false)\"\n ></riv-calendar>\n </div>\n <footer *ngIf=\"showClearButton\" class=\"buttons\">\n <button\n rivButton\n [size]=\"'small'\"\n [variant]=\"'ghost'\"\n (click)=\"clearValue()\"\n type=\"button\"\n >\n Clear\n </button>\n </footer>\n </riv-callout>\n</ng-container>\n", styles: [".trigger{width:100%;border:var(--border-width) solid var(--border-light);border-radius:var(--border-radius-small);display:flex;gap:var(--size-small);background-color:var(--surface-light-0);cursor:pointer;padding-left:var(--size-small)}.trigger:focus{outline:none;border:var(--border-width) solid var(--purp-60)}.trigger:disabled{color:var(--type-light-disabled);background-color:var(--surface-light-1)}.value{font:var(--input-medium);color:var(--type-light-high-contrast);padding:var(--size-small) 0;flex-grow:1;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:pre}.value.placeholder{color:var(--type-light-disabled)}.trigger.xsmall .value{font:var(--input-small);padding:var(--size-xsmall) 0}.trigger.small .value{font:var(--input-small)}.trigger.large .value{font:var(--input-large);padding:var(--size-medium) var(--size-xsmall)}.trigger.xlarge .value{font:var(--input-large);padding:var(--size-large) var(--size-small)}.chevron{display:flex;justify-content:center;align-items:center;padding:var(--size-xsmall) calc(var(--base-grid-size) * 1.5)}.trigger.warning{border-color:var(--surface-dark-caution)}.trigger.error{border-color:var(--surface-dark-danger);box-shadow:inset 0 0 0 var(--border-width-large) var(--surface-dark-danger)}.content{padding:var(--size-large)}.buttons{padding:var(--size-small);display:flex;justify-content:space-between}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.ButtonComponent, selector: "[rivButton]", inputs: ["locked", "disabled", "loading", "full", "size", "variant", "icon", "iconPosition", "current"] }, { kind: "component", type: i3.CalendarComponent, selector: "riv-calendar", inputs: ["activeYearMonth", "displayMin", "displayMax", "selectableMin", "selectableMax", "omitRange", "selectedValue"], outputs: ["activeYearMonthChange", "dateSelect"] }, { kind: "component", type: i4.CalloutComponent, selector: "riv-callout", inputs: ["anchor", "isModal", "preferredPosition", "allowedPositions", "fallbackDirection", "showCaret", "theme"], outputs: ["close"] }, { kind: "component", type: i5.IconComponent, selector: "riv-icon", inputs: ["name", "fillColor", "size", "customSize", "strokeWidth"] }, { kind: "component", type: i6.InputLabelComponent, selector: "riv-input-label", inputs: ["label", "help", "required", "labelActionText", "errorMessage", "state"], outputs: ["labelAction"] }, { kind: "directive", type: i7.OverlayDirective, selector: "[riv-overlay]" }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i8.DatePipe, name: "rivDate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
49
55
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DateComponent, decorators: [{
|
|
50
56
|
type: Component,
|
|
51
|
-
args: [{ selector: 'riv-date', changeDetection: ChangeDetectionStrategy.OnPush, template: "<riv-input-label\n [label]=\"label\"\n [help]=\"help\"\n [required]=\"required\"\n [state]=\"state\"\n [errorMessage]=\"errorMessage\"\n [labelActionText]=\"labelActionText\"\n (labelAction)=\"labelAction.emit($event)\"\n>\n <button\n #trigger\n class=\"trigger\"\n [class.xsmall]=\"size === 'xsmall'\"\n [class.small]=\"size === 'small'\"\n [class.large]=\"size === 'large'\"\n [class.xlarge]=\"size === 'xlarge'\"\n [class.warning]=\"state === 'warning'\"\n [class.error]=\"state === 'error'\"\n (click)=\"open$.next(true)\"\n [disabled]=\"disabled\"\n type=\"button\"\n >\n <ng-container *ngIf=\"value; else placeholderValue\">\n <span class=\"value\">{{ value | rivDate }}</span>\n </ng-container>\n <ng-template #placeholderValue>\n <span class=\"value placeholder\">{{ placeholder }}</span>\n </ng-template>\n <span class=\"chevron\">\n <riv-icon [name]=\"'Calendar'\" [size]=\"16\"></riv-icon>\n </span>\n </button>\n</riv-input-label>\n<ng-container *ngIf=\"open$ | async\">\n <riv-callout\n *riv-overlay\n [anchor]=\"trigger\"\n [showCaret]=\"false\"\n [theme]=\"'light'\"\n [allowedPositions]=\"[\n 'top-left',\n 'top-right',\n 'bottom-right',\n 'bottom-left'\n ]\"\n [preferredPosition]=\"'bottom-right'\"\n (close)=\"open$.next(false)\"\n >\n <header *ngIf=\"headerTemplate\">\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n </header>\n <div class=\"content\">\n <riv-calendar\n [activeYearMonth]=\"activeYearMonth\"\n (activeYearMonthChange)=\"activeYearMonth = $event\"\n [displayMin]=\"min\"\n [displayMax]=\"max\"\n [selectableMin]=\"min\"\n [selectableMax]=\"max\"\n [selectedValue]=\"value\"\n (dateSelect)=\"valueChange.next($event); open$.next(false)\"\n ></riv-calendar>\n </div>\n </riv-callout>\n</ng-container>\n", styles: [".trigger{width:100%;border:var(--border-width) solid var(--border-light);border-radius:var(--border-radius-small);display:flex;gap:var(--size-small);background-color:var(--surface-light-0);cursor:pointer;padding-left:var(--size-small)}.trigger:focus{outline:none;border:var(--border-width) solid var(--purp-60)}.trigger:disabled{color:var(--type-light-disabled);background-color:var(--surface-light-1)}.value{font:var(--input-medium);color:var(--type-light-high-contrast);padding:var(--size-small) 0;flex-grow:1;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:pre}.value.placeholder{color:var(--type-light-disabled)}.trigger.xsmall .value{font:var(--input-small);padding:var(--size-xsmall) 0}.trigger.small .value{font:var(--input-small)}.trigger.large .value{font:var(--input-large);padding:var(--size-medium) var(--size-xsmall)}.trigger.xlarge .value{font:var(--input-large);padding:var(--size-large) var(--size-small)}.chevron{display:flex;justify-content:center;align-items:center;padding:var(--size-xsmall) calc(var(--base-grid-size) * 1.5)}.trigger.warning{border-color:var(--surface-dark-caution)}.trigger.error{border-color:var(--surface-dark-danger);box-shadow:inset 0 0 0 var(--border-width-large) var(--surface-dark-danger)}.content{padding:var(--size-large)}\n"] }]
|
|
57
|
+
args: [{ selector: 'riv-date', changeDetection: ChangeDetectionStrategy.OnPush, template: "<riv-input-label\n [label]=\"label\"\n [help]=\"help\"\n [required]=\"required\"\n [state]=\"state\"\n [errorMessage]=\"errorMessage\"\n [labelActionText]=\"labelActionText\"\n (labelAction)=\"labelAction.emit($event)\"\n>\n <button\n #trigger\n class=\"trigger\"\n [class.xsmall]=\"size === 'xsmall'\"\n [class.small]=\"size === 'small'\"\n [class.large]=\"size === 'large'\"\n [class.xlarge]=\"size === 'xlarge'\"\n [class.warning]=\"state === 'warning'\"\n [class.error]=\"state === 'error'\"\n (click)=\"open$.next(true)\"\n [disabled]=\"disabled\"\n type=\"button\"\n >\n <ng-container *ngIf=\"value; else placeholderValue\">\n <span class=\"value\">{{ value | rivDate }}</span>\n </ng-container>\n <ng-template #placeholderValue>\n <span class=\"value placeholder\">{{ placeholder }}</span>\n </ng-template>\n <span class=\"chevron\">\n <riv-icon [name]=\"'Calendar'\" [size]=\"16\"></riv-icon>\n </span>\n </button>\n</riv-input-label>\n<ng-container *ngIf=\"open$ | async\">\n <riv-callout\n *riv-overlay\n [anchor]=\"trigger\"\n [showCaret]=\"false\"\n [theme]=\"'light'\"\n [allowedPositions]=\"[\n 'top-left',\n 'top-right',\n 'bottom-right',\n 'bottom-left'\n ]\"\n [preferredPosition]=\"'bottom-right'\"\n (close)=\"open$.next(false)\"\n >\n <header *ngIf=\"headerTemplate\">\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n </header>\n <div class=\"content\">\n <riv-calendar\n [activeYearMonth]=\"activeYearMonth\"\n (activeYearMonthChange)=\"activeYearMonth = $event\"\n [displayMin]=\"min\"\n [displayMax]=\"max\"\n [selectableMin]=\"min\"\n [selectableMax]=\"max\"\n [selectedValue]=\"value\"\n (dateSelect)=\"valueChange.next($event); open$.next(false)\"\n ></riv-calendar>\n </div>\n <footer *ngIf=\"showClearButton\" class=\"buttons\">\n <button\n rivButton\n [size]=\"'small'\"\n [variant]=\"'ghost'\"\n (click)=\"clearValue()\"\n type=\"button\"\n >\n Clear\n </button>\n </footer>\n </riv-callout>\n</ng-container>\n", styles: [".trigger{width:100%;border:var(--border-width) solid var(--border-light);border-radius:var(--border-radius-small);display:flex;gap:var(--size-small);background-color:var(--surface-light-0);cursor:pointer;padding-left:var(--size-small)}.trigger:focus{outline:none;border:var(--border-width) solid var(--purp-60)}.trigger:disabled{color:var(--type-light-disabled);background-color:var(--surface-light-1)}.value{font:var(--input-medium);color:var(--type-light-high-contrast);padding:var(--size-small) 0;flex-grow:1;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:pre}.value.placeholder{color:var(--type-light-disabled)}.trigger.xsmall .value{font:var(--input-small);padding:var(--size-xsmall) 0}.trigger.small .value{font:var(--input-small)}.trigger.large .value{font:var(--input-large);padding:var(--size-medium) var(--size-xsmall)}.trigger.xlarge .value{font:var(--input-large);padding:var(--size-large) var(--size-small)}.chevron{display:flex;justify-content:center;align-items:center;padding:var(--size-xsmall) calc(var(--base-grid-size) * 1.5)}.trigger.warning{border-color:var(--surface-dark-caution)}.trigger.error{border-color:var(--surface-dark-danger);box-shadow:inset 0 0 0 var(--border-width-large) var(--surface-dark-danger)}.content{padding:var(--size-large)}.buttons{padding:var(--size-small);display:flex;justify-content:space-between}\n"] }]
|
|
52
58
|
}], propDecorators: { min: [{
|
|
53
59
|
type: Input
|
|
54
60
|
}], max: [{
|
|
@@ -61,6 +67,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
61
67
|
type: Input
|
|
62
68
|
}], size: [{
|
|
63
69
|
type: Input
|
|
70
|
+
}], showClearButton: [{
|
|
71
|
+
type: Input
|
|
64
72
|
}], headerTemplate: [{
|
|
65
73
|
type: ContentChild,
|
|
66
74
|
args: ['header']
|
|
@@ -78,4 +86,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
78
86
|
'xlarge',
|
|
79
87
|
];
|
|
80
88
|
})(DateComponent || (DateComponent = {}));
|
|
81
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
89
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9yaXYvc3JjL2xpYi9pbnB1dC9kYXRlL2RhdGUuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvcml2L3NyYy9saWIvaW5wdXQvZGF0ZS9kYXRlLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCx1QkFBdUIsRUFDdkIsU0FBUyxFQUNULFlBQVksRUFDWixZQUFZLEVBQ1osS0FBSyxFQUNMLE1BQU0sR0FFUCxNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sU0FBUyxDQUFDO0FBQ3BDLE9BQU8sRUFBRSxlQUFlLE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VwiYnV0dG9uc1wiPlxuICAgICAgPGJ1dHRvblxuICAgICAgICByaXZCdXR0b25cbiAgICAgICAgW3NpemVdPVwiJ3NtYWxsJ1wiXG4gICAgICAgIFt2YXJpYW50XT1cIidnaG9zdCdcIlxuICAgICAgICAoY2xpY2spPVwiY2xlYXJWYWx1ZSgpXCJcbiAgICAgICAgdHlwZT1cImJ1dHRvblwiXG4gICAgICA+XG4gICAgICAgIENsZWFyXG4gICAgICA8L2J1dHRvbj5cbiAgICA8L2Zvb3Rlcj5cbiAgPC9yaXYtY2FsbG91dD5cbjwvbmctY29udGFpbmVyPlxuIl19
|
|
@@ -13,7 +13,7 @@ export class ViewMenuComponent {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
ViewMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ViewMenuComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
16
|
-
ViewMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ViewMenuComponent, selector: "riv-view-menu", inputs: { manager: "manager", view: "view", menuContext: "menuContext" }, queries: [{ propertyName: "triggerTemplate", first: true, predicate: ["menuTrigger"], descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"view\">\n <riv-menu\n #menu\n [preferredPosition]=\"'bottom-right'\"\n (click)=\"$event.stopPropagation()\"\n >\n <ng-container *ngIf=\"triggerTemplate\">\n <ng-template #trigger>\n <ng-container [ngTemplateOutlet]=\"triggerTemplate\"></ng-container>\n </ng-template>\n </ng-container>\n <button\n riv-menu-item\n (click)=\"\n manager?.actions?.next({\n type: 'setEnabled',\n id: view.id,\n enabled: !view.enabled,\n source: 'menu'\n })\n \"\n [disabled]=\"view.system || view.temporary\"\n >\n {{ view.enabled ? 'Hide tab' : 'Show tab' }}\n </button>\n <div class=\"riv-divider\"></div>\n <button\n riv-menu-item\n (click)=\"\n manager?.actions?.next({\n type: 'setEditingView',\n context: { id: view.id, autoRename: false, menuContext }\n })\n \"\n [disabled]=\"view.system\"\n >\n Edit view\n </button>\n <button\n riv-menu-item\n (click)=\"\n manager?.actions?.next({\n type: 'setEditingView',\n context: { id: view.id, autoRename: true, menuContext }\n })\n \"\n [disabled]=\"view.system\"\n >\n Rename view\n </button>\n <button\n riv-menu-item\n (click)=\"\n manager?.actions?.next({ type: 'duplicateView', view, menuContext })\n \"\n [disabled]=\"view.temporary\"\n >\n Duplicate view\n </button>\n <button\n riv-menu-item\n (click)=\"\n manager?.actions?.next({\n type: 'setDeletingView',\n context: { id: view.id, menuContext }\n })\n \"\n [disabled]=\"view.system\"\n >\n Delete view\n </button>\n <div class=\"riv-divider\"></div>\n <button\n riv-menu-item\n (click)=\"manager?.actions?.next({ type: 'copyLinkToView', view })\"\n [disabled]=\"view.temporary\"\n >\n Copy link to view\n </button>\n </riv-menu>\n\n <ng-container *ngIf=\"manager?.state | async; let state\">\n <ng-container *ngIf=\"state.editingViewContext; let editingViewContext\">\n <riv-edit-view\n *ngIf=\"\n editingViewContext.id === view.id &&\n editingViewContext.menuContext === menuContext\n \"\n [view]=\"view\"\n [userSource]=\"state.userSource\"\n [userSelectMode]=\"state.userSelectMode\"\n [onAddUser]=\"state.onAddUser\"\n [newTooltip]=\"state.newTooltip\"\n [autoSelectName]=\"editingViewContext.autoRename\"\n [anchor]=\"el.nativeElement\"\n (save)=\"manager?.actions?.next({ type: 'updateView', view: $event })\"\n (delete)=\"manager?.actions?.next({ type: 'deleteView', view: $event })\"\n (close)=\"\n manager?.actions?.next({ type: 'setEditingView', context: null })\n \"\n ></riv-edit-view>\n </ng-container>\n\n <ng-container *ngIf=\"state.deletingViewContext; let deletingViewContext\">\n <riv-dialog\n *ngIf=\"\n deletingViewContext.id === view.id &&\n deletingViewContext.menuContext === menuContext\n \"\n [title]=\"'Delete view'\"\n (close)=\"\n manager?.actions?.next({ type: 'setDeletingView', context: null })\n \"\n >\n <div class=\"delete-dialog\">\n <div class=\"delete-title\">\n Are you sure you want to delete the following view?\n </div>\n <p>{{ view.title }}</p>\n </div>\n <footer class=\"delete-footer\">\n <button\n rivButton\n (click)=\"\n manager?.actions?.next({ type: 'setDeletingView', context: null })\n \"\n >\n Cancel\n </button>\n <button\n rivButton\n [variant]=\"'danger'\"\n (click)=\"\n manager?.actions?.next({\n type: 'deleteView',\n view\n })\n \"\n >\n Delete view\n </button>\n </footer>\n </riv-dialog>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [":host{display:inline-flex;align-items:stretch}riv-menu{width:100%;max-width:100%;height:100%;max-height:100%}.delete-dialog{padding:var(--size-xlarge);display:flex;flex-direction:column;gap:var(--size-large);width:calc(var(--base-grid-size) * 120);max-width:100%}.delete-title{font:var(--title-02)}.delete-footer{padding:var(--size-medium);display:flex;justify-content:space-between;gap:var(--size-medium)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.ButtonComponent, selector: "[rivButton]", inputs: ["locked", "disabled", "loading", "full", "size", "variant", "icon", "iconPosition", "current"] }, { kind: "component", type: i3.DialogComponent, selector: "riv-dialog", inputs: ["title", "minWidth"], outputs: ["close"] }, { kind: "component", type: i4.EditViewComponent, selector: "riv-edit-view", inputs: ["anchor", "autoSelectName", "view", "userSource", "userSelectMode", "onAddUser", "newTooltip", "mode"], outputs: ["save", "delete", "close"] }, { kind: "component", type: i5.MenuComponent, selector: "riv-menu", inputs: ["preferredPosition"] }, { kind: "component", type: i6.MenuItemComponent, selector: "[riv-menu-item]", inputs: ["locked", "disabled", "variant"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
16
|
+
ViewMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ViewMenuComponent, selector: "riv-view-menu", inputs: { manager: "manager", view: "view", menuContext: "menuContext" }, queries: [{ propertyName: "triggerTemplate", first: true, predicate: ["menuTrigger"], descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"view\">\n <riv-menu\n #menu\n [preferredPosition]=\"'bottom-right'\"\n (click)=\"$event.stopPropagation()\"\n >\n <ng-container *ngIf=\"triggerTemplate\">\n <ng-template #trigger>\n <ng-container [ngTemplateOutlet]=\"triggerTemplate\"></ng-container>\n </ng-template>\n </ng-container>\n <button\n riv-menu-item\n (click)=\"\n manager?.actions?.next({\n type: 'setEnabled',\n id: view.id,\n enabled: !view.enabled,\n source: 'menu'\n })\n \"\n [disabled]=\"view.system || view.temporary\"\n >\n {{ view.enabled ? 'Hide tab' : 'Show tab' }}\n </button>\n <div class=\"riv-divider\"></div>\n <button\n riv-menu-item\n (click)=\"\n manager?.actions?.next({\n type: 'setEditingView',\n context: { id: view.id, autoRename: false, menuContext }\n })\n \"\n [disabled]=\"view.system\"\n >\n Edit view\n </button>\n <button\n riv-menu-item\n (click)=\"\n manager?.actions?.next({\n type: 'setEditingView',\n context: { id: view.id, autoRename: true, menuContext }\n })\n \"\n [disabled]=\"view.system\"\n >\n Rename view\n </button>\n <button\n riv-menu-item\n (click)=\"\n manager?.actions?.next({ type: 'duplicateView', view, menuContext })\n \"\n [disabled]=\"view.temporary\"\n >\n Duplicate view\n </button>\n <button\n riv-menu-item\n (click)=\"\n manager?.actions?.next({\n type: 'setDeletingView',\n context: { id: view.id, menuContext }\n })\n \"\n [disabled]=\"view.system\"\n >\n Delete view\n </button>\n <div class=\"riv-divider\"></div>\n <button\n riv-menu-item\n (click)=\"manager?.actions?.next({ type: 'copyLinkToView', view })\"\n [disabled]=\"view.temporary\"\n >\n Copy link to view\n </button>\n </riv-menu>\n\n <ng-container *ngIf=\"manager?.state | async; let state\">\n <ng-container *ngIf=\"state.editingViewContext; let editingViewContext\">\n <riv-edit-view\n *ngIf=\"\n editingViewContext.id === view.id &&\n editingViewContext.menuContext === menuContext\n \"\n [view]=\"view\"\n [userSource]=\"state.userSource\"\n [userSelectMode]=\"state.userSelectMode\"\n [onAddUser]=\"state.onAddUser\"\n [newTooltip]=\"state.newTooltip\"\n [autoSelectName]=\"editingViewContext.autoRename\"\n [anchor]=\"el.nativeElement\"\n (save)=\"manager?.actions?.next({ type: 'updateView', view: $event })\"\n (delete)=\"manager?.actions?.next({ type: 'deleteView', view: $event })\"\n (close)=\"\n manager?.actions?.next({ type: 'setEditingView', context: null })\n \"\n ></riv-edit-view>\n </ng-container>\n\n <ng-container *ngIf=\"state.deletingViewContext; let deletingViewContext\">\n <riv-dialog\n *ngIf=\"\n deletingViewContext.id === view.id &&\n deletingViewContext.menuContext === menuContext\n \"\n [title]=\"'Delete view'\"\n (close)=\"\n manager?.actions?.next({ type: 'setDeletingView', context: null })\n \"\n >\n <div class=\"delete-dialog\">\n <div class=\"delete-title\">\n Are you sure you want to delete the following view?\n </div>\n <p>{{ view.title }}</p>\n </div>\n <footer class=\"delete-footer\">\n <button\n rivButton\n (click)=\"\n manager?.actions?.next({ type: 'setDeletingView', context: null })\n \"\n >\n Cancel\n </button>\n <button\n rivButton\n [variant]=\"'danger'\"\n (click)=\"\n manager?.actions?.next({\n type: 'deleteView',\n view\n })\n \"\n >\n Delete view\n </button>\n </footer>\n </riv-dialog>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [":host{display:inline-flex;align-items:stretch}riv-menu{width:100%;max-width:100%;height:100%;max-height:100%}.delete-dialog{padding:var(--size-xlarge);display:flex;flex-direction:column;gap:var(--size-large);width:calc(var(--base-grid-size) * 120);max-width:100%}.delete-title{font:var(--title-02)}.delete-footer{padding:var(--size-medium);display:flex;justify-content:space-between;gap:var(--size-medium)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.ButtonComponent, selector: "[rivButton]", inputs: ["locked", "disabled", "loading", "full", "size", "variant", "icon", "iconPosition", "current"] }, { kind: "component", type: i3.DialogComponent, selector: "riv-dialog", inputs: ["title", "minWidth", "customBody", "customFooter"], outputs: ["close"] }, { kind: "component", type: i4.EditViewComponent, selector: "riv-edit-view", inputs: ["anchor", "autoSelectName", "view", "userSource", "userSelectMode", "onAddUser", "newTooltip", "mode"], outputs: ["save", "delete", "close"] }, { kind: "component", type: i5.MenuComponent, selector: "riv-menu", inputs: ["preferredPosition"] }, { kind: "component", type: i6.MenuItemComponent, selector: "[riv-menu-item]", inputs: ["locked", "disabled", "variant"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
17
17
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ViewMenuComponent, decorators: [{
|
|
18
18
|
type: Component,
|
|
19
19
|
args: [{ selector: 'riv-view-menu', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"view\">\n <riv-menu\n #menu\n [preferredPosition]=\"'bottom-right'\"\n (click)=\"$event.stopPropagation()\"\n >\n <ng-container *ngIf=\"triggerTemplate\">\n <ng-template #trigger>\n <ng-container [ngTemplateOutlet]=\"triggerTemplate\"></ng-container>\n </ng-template>\n </ng-container>\n <button\n riv-menu-item\n (click)=\"\n manager?.actions?.next({\n type: 'setEnabled',\n id: view.id,\n enabled: !view.enabled,\n source: 'menu'\n })\n \"\n [disabled]=\"view.system || view.temporary\"\n >\n {{ view.enabled ? 'Hide tab' : 'Show tab' }}\n </button>\n <div class=\"riv-divider\"></div>\n <button\n riv-menu-item\n (click)=\"\n manager?.actions?.next({\n type: 'setEditingView',\n context: { id: view.id, autoRename: false, menuContext }\n })\n \"\n [disabled]=\"view.system\"\n >\n Edit view\n </button>\n <button\n riv-menu-item\n (click)=\"\n manager?.actions?.next({\n type: 'setEditingView',\n context: { id: view.id, autoRename: true, menuContext }\n })\n \"\n [disabled]=\"view.system\"\n >\n Rename view\n </button>\n <button\n riv-menu-item\n (click)=\"\n manager?.actions?.next({ type: 'duplicateView', view, menuContext })\n \"\n [disabled]=\"view.temporary\"\n >\n Duplicate view\n </button>\n <button\n riv-menu-item\n (click)=\"\n manager?.actions?.next({\n type: 'setDeletingView',\n context: { id: view.id, menuContext }\n })\n \"\n [disabled]=\"view.system\"\n >\n Delete view\n </button>\n <div class=\"riv-divider\"></div>\n <button\n riv-menu-item\n (click)=\"manager?.actions?.next({ type: 'copyLinkToView', view })\"\n [disabled]=\"view.temporary\"\n >\n Copy link to view\n </button>\n </riv-menu>\n\n <ng-container *ngIf=\"manager?.state | async; let state\">\n <ng-container *ngIf=\"state.editingViewContext; let editingViewContext\">\n <riv-edit-view\n *ngIf=\"\n editingViewContext.id === view.id &&\n editingViewContext.menuContext === menuContext\n \"\n [view]=\"view\"\n [userSource]=\"state.userSource\"\n [userSelectMode]=\"state.userSelectMode\"\n [onAddUser]=\"state.onAddUser\"\n [newTooltip]=\"state.newTooltip\"\n [autoSelectName]=\"editingViewContext.autoRename\"\n [anchor]=\"el.nativeElement\"\n (save)=\"manager?.actions?.next({ type: 'updateView', view: $event })\"\n (delete)=\"manager?.actions?.next({ type: 'deleteView', view: $event })\"\n (close)=\"\n manager?.actions?.next({ type: 'setEditingView', context: null })\n \"\n ></riv-edit-view>\n </ng-container>\n\n <ng-container *ngIf=\"state.deletingViewContext; let deletingViewContext\">\n <riv-dialog\n *ngIf=\"\n deletingViewContext.id === view.id &&\n deletingViewContext.menuContext === menuContext\n \"\n [title]=\"'Delete view'\"\n (close)=\"\n manager?.actions?.next({ type: 'setDeletingView', context: null })\n \"\n >\n <div class=\"delete-dialog\">\n <div class=\"delete-title\">\n Are you sure you want to delete the following view?\n </div>\n <p>{{ view.title }}</p>\n </div>\n <footer class=\"delete-footer\">\n <button\n rivButton\n (click)=\"\n manager?.actions?.next({ type: 'setDeletingView', context: null })\n \"\n >\n Cancel\n </button>\n <button\n rivButton\n [variant]=\"'danger'\"\n (click)=\"\n manager?.actions?.next({\n type: 'deleteView',\n view\n })\n \"\n >\n Delete view\n </button>\n </footer>\n </riv-dialog>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [":host{display:inline-flex;align-items:stretch}riv-menu{width:100%;max-width:100%;height:100%;max-height:100%}.delete-dialog{padding:var(--size-xlarge);display:flex;flex-direction:column;gap:var(--size-large);width:calc(var(--base-grid-size) * 120);max-width:100%}.delete-title{font:var(--title-02)}.delete-footer{padding:var(--size-medium);display:flex;justify-content:space-between;gap:var(--size-medium)}\n"] }]
|
|
@@ -5,6 +5,8 @@ import * as i1 from "../../../input/button/button.component";
|
|
|
5
5
|
import * as i2 from "../modal.component";
|
|
6
6
|
export class DialogComponent {
|
|
7
7
|
constructor() {
|
|
8
|
+
this.customBody = false;
|
|
9
|
+
this.customFooter = false;
|
|
8
10
|
this.close = new EventEmitter();
|
|
9
11
|
this.hook = ANIMATION_CONSTANTS.DIALOG.HOOK;
|
|
10
12
|
}
|
|
@@ -16,18 +18,22 @@ export class DialogComponent {
|
|
|
16
18
|
}
|
|
17
19
|
}
|
|
18
20
|
DialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
19
|
-
DialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DialogComponent, selector: "riv-dialog", inputs: { title: "title", minWidth: "minWidth" }, outputs: { close: "close" }, host: { listeners: { "document:keydown": "handleKeydown($event)" } }, ngImport: i0, template: "<riv-modal (close)=\"close.emit()\" [obscure]=\"true\">\n <div [attr.data-animation-hook]=\"hook\" class=\"wrapper\">\n <div class=\"dialog\" [style.min-width]=\"minWidth\">\n <header>\n <span class=\"title\">\n {{ title }}\n </span>\n <button\n rivButton\n [variant]=\"'ghost'\"\n [icon]=\"'X'\"\n (click)=\"close.emit()\"\n ></button>\n </header>\n <div class=\"body\">\n <ng-content></ng-content>\n </div>\n <div class=\"footer\">\n <ng-content select=\"footer\"></ng-content>\n </div>\n </div>\n </div>\n</riv-modal>\n", styles: [".wrapper{position:absolute;top:50%;left:50%}.dialog{transform:translate(-50%,-50%);border-radius:var(--border-radius-medium);border:var(--border-width) solid var(--border-light);display:flex;flex-direction:column;max-width:calc(100vw - var(--size-xlarge) * 2);max-height:calc(100vh - var(--size-xlarge) * 2);overflow:hidden}header{display:flex;justify-content:space-between;align-items:center;padding:0 var(--size-medium);gap:var(--size-medium);border-bottom:var(--border-width) solid var(--border-light);background-color:var(--surface-light-1);flex-shrink:0}.title{font:var(--title-04);padding:var(--size-large) 0}.body{background-color:var(--surface-light-0);overflow-y:auto;min-height:0}.footer{border-top:var(--border-width) solid var(--border-light);background-color:var(--surface-light-1);flex-shrink:0}\n"], dependencies: [{ kind: "component", type: i1.ButtonComponent, selector: "[rivButton]", inputs: ["locked", "disabled", "loading", "full", "size", "variant", "icon", "iconPosition", "current"] }, { kind: "component", type: i2.ModalComponent, selector: "riv-modal", inputs: ["obscure", "topOffset"], outputs: ["close"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
21
|
+
DialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DialogComponent, selector: "riv-dialog", inputs: { title: "title", minWidth: "minWidth", customBody: "customBody", customFooter: "customFooter" }, outputs: { close: "close" }, host: { listeners: { "document:keydown": "handleKeydown($event)" } }, ngImport: i0, template: "<riv-modal (close)=\"close.emit()\" [obscure]=\"true\">\n <div [attr.data-animation-hook]=\"hook\" class=\"wrapper\">\n <div class=\"dialog\" [style.min-width]=\"minWidth\">\n <header>\n <span class=\"title\">\n {{ title }}\n </span>\n <button\n rivButton\n [variant]=\"'ghost'\"\n [icon]=\"'X'\"\n (click)=\"close.emit()\"\n ></button>\n </header>\n <div class=\"body\" [class.custom]=\"customBody\">\n <ng-content></ng-content>\n </div>\n <div class=\"footer riv-dialog-footer\" [class.custom]=\"customFooter\">\n <ng-content select=\"footer\"></ng-content>\n </div>\n </div>\n </div>\n</riv-modal>\n", styles: [".wrapper{position:absolute;top:50%;left:50%}.dialog{transform:translate(-50%,-50%);border-radius:var(--border-radius-medium);border:var(--border-width) solid var(--border-light);display:flex;flex-direction:column;max-width:calc(100vw - var(--size-xlarge) * 2);max-height:calc(100vh - var(--size-xlarge) * 2);overflow:hidden}header{display:flex;justify-content:space-between;align-items:center;padding:0 var(--size-medium);gap:var(--size-medium);border-bottom:var(--border-width) solid var(--border-light);background-color:var(--surface-light-1);flex-shrink:0}.title{font:var(--title-04);padding:var(--size-large) 0}.body{background-color:var(--surface-light-0);overflow-y:auto;min-height:0}.body:not(.custom){padding:var(--size-large)}.footer{border-top:var(--border-width) solid var(--border-light);background-color:var(--surface-light-1);flex-shrink:0}.footer:not(:has(> footer)){display:none}\n"], dependencies: [{ kind: "component", type: i1.ButtonComponent, selector: "[rivButton]", inputs: ["locked", "disabled", "loading", "full", "size", "variant", "icon", "iconPosition", "current"] }, { kind: "component", type: i2.ModalComponent, selector: "riv-modal", inputs: ["obscure", "topOffset"], outputs: ["close"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
20
22
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DialogComponent, decorators: [{
|
|
21
23
|
type: Component,
|
|
22
|
-
args: [{ selector: 'riv-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<riv-modal (close)=\"close.emit()\" [obscure]=\"true\">\n <div [attr.data-animation-hook]=\"hook\" class=\"wrapper\">\n <div class=\"dialog\" [style.min-width]=\"minWidth\">\n <header>\n <span class=\"title\">\n {{ title }}\n </span>\n <button\n rivButton\n [variant]=\"'ghost'\"\n [icon]=\"'X'\"\n (click)=\"close.emit()\"\n ></button>\n </header>\n <div class=\"body\">\n <ng-content></ng-content>\n </div>\n <div class=\"footer\">\n <ng-content select=\"footer\"></ng-content>\n </div>\n </div>\n </div>\n</riv-modal>\n", styles: [".wrapper{position:absolute;top:50%;left:50%}.dialog{transform:translate(-50%,-50%);border-radius:var(--border-radius-medium);border:var(--border-width) solid var(--border-light);display:flex;flex-direction:column;max-width:calc(100vw - var(--size-xlarge) * 2);max-height:calc(100vh - var(--size-xlarge) * 2);overflow:hidden}header{display:flex;justify-content:space-between;align-items:center;padding:0 var(--size-medium);gap:var(--size-medium);border-bottom:var(--border-width) solid var(--border-light);background-color:var(--surface-light-1);flex-shrink:0}.title{font:var(--title-04);padding:var(--size-large) 0}.body{background-color:var(--surface-light-0);overflow-y:auto;min-height:0}.footer{border-top:var(--border-width) solid var(--border-light);background-color:var(--surface-light-1);flex-shrink:0}\n"] }]
|
|
24
|
+
args: [{ selector: 'riv-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<riv-modal (close)=\"close.emit()\" [obscure]=\"true\">\n <div [attr.data-animation-hook]=\"hook\" class=\"wrapper\">\n <div class=\"dialog\" [style.min-width]=\"minWidth\">\n <header>\n <span class=\"title\">\n {{ title }}\n </span>\n <button\n rivButton\n [variant]=\"'ghost'\"\n [icon]=\"'X'\"\n (click)=\"close.emit()\"\n ></button>\n </header>\n <div class=\"body\" [class.custom]=\"customBody\">\n <ng-content></ng-content>\n </div>\n <div class=\"footer riv-dialog-footer\" [class.custom]=\"customFooter\">\n <ng-content select=\"footer\"></ng-content>\n </div>\n </div>\n </div>\n</riv-modal>\n", styles: [".wrapper{position:absolute;top:50%;left:50%}.dialog{transform:translate(-50%,-50%);border-radius:var(--border-radius-medium);border:var(--border-width) solid var(--border-light);display:flex;flex-direction:column;max-width:calc(100vw - var(--size-xlarge) * 2);max-height:calc(100vh - var(--size-xlarge) * 2);overflow:hidden}header{display:flex;justify-content:space-between;align-items:center;padding:0 var(--size-medium);gap:var(--size-medium);border-bottom:var(--border-width) solid var(--border-light);background-color:var(--surface-light-1);flex-shrink:0}.title{font:var(--title-04);padding:var(--size-large) 0}.body{background-color:var(--surface-light-0);overflow-y:auto;min-height:0}.body:not(.custom){padding:var(--size-large)}.footer{border-top:var(--border-width) solid var(--border-light);background-color:var(--surface-light-1);flex-shrink:0}.footer:not(:has(> footer)){display:none}\n"] }]
|
|
23
25
|
}], propDecorators: { title: [{
|
|
24
26
|
type: Input
|
|
25
27
|
}], minWidth: [{
|
|
26
28
|
type: Input
|
|
29
|
+
}], customBody: [{
|
|
30
|
+
type: Input
|
|
31
|
+
}], customFooter: [{
|
|
32
|
+
type: Input
|
|
27
33
|
}], close: [{
|
|
28
34
|
type: Output
|
|
29
35
|
}], handleKeydown: [{
|
|
30
36
|
type: HostListener,
|
|
31
37
|
args: ['document:keydown', ['$event']]
|
|
32
38
|
}] } });
|
|
33
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
39
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlhbG9nLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3Jpdi9zcmMvbGliL292ZXJsYXkvbW9kYWwvZGlhbG9nL2RpYWxvZy5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9yaXYvc3JjL2xpYi9vdmVybGF5L21vZGFsL2RpYWxvZy9kaWFsb2cuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLHVCQUF1QixFQUN2QixTQUFTLEVBQ1QsWUFBWSxFQUNaLFlBQVksRUFDWixLQUFLLEVBQ0wsTUFBTSxHQUNQLE1BQU0sZUFBZSxDQUF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RyLmRhdGEtYW5pbWF0aW9uLWhvb2tdPVwiaG9va1wiIGNsYXNzPVwid3JhcHBlclwiPlxuICAgIDxkaXYgY2xhc3M9XCJkaWFsb2dcIiBbc3R5bGUubWluLXdpZHRoXT1cIm1pbldpZHRoXCI+XG4gICAgICA8aGVhZGVyPlxuICAgICAgICA8c3BhbiBjbGFzcz1cInRpdGxlXCI+XG4gICAgICAgICAge3sgdGl0bGUgfX1cbiAgICAgICAgPC9zcGFuPlxuICAgICAgICA8YnV0dG9uXG4gICAgICAgICAgcml2QnV0dG9uXG4gICAgICAgICAgW3ZhcmlhbnRdPVwiJ2dob3N0J1wiXG4gICAgICAgICAgW2ljb25dPVwiJ1gnXCJcbiAgICAgICAgICAoY2xpY2spPVwiY2xvc2UuZW1pdCgpXCJcbiAgICAgICAgPjwvYnV0dG9uPlxuICAgICAgPC9oZWFkZXI+XG4gICAgICA8ZGl2IGNsYXNzPVwiYm9keVwiIFtjbGFzcy5jdXN0b21dPVwiY3VzdG9tQm9keVwiPlxuICAgICAgICA8bmctY29udGVudD48L25nLWNvbnRlbnQ+XG4gICAgICA8L2Rpdj5cbiAgICAgIDxkaXYgY2xhc3M9XCJmb290ZXIgcml2LWRpYWxvZy1mb290ZXJcIiBbY2xhc3MuY3VzdG9tXT1cImN1c3RvbUZvb3RlclwiPlxuICAgICAgICA8bmctY29udGVudCBzZWxlY3Q9XCJmb290ZXJcIj48L25nLWNvbnRlbnQ+XG4gICAgICA8L2Rpdj5cbiAgICA8L2Rpdj5cbiAgPC9kaXY+XG48L3Jpdi1tb2RhbD5cbiJdfQ==
|
|
@@ -4015,6 +4015,7 @@ class DateComponent extends InputLabelComponent {
|
|
|
4015
4015
|
this.placeholder = 'Select date';
|
|
4016
4016
|
this.disabled = false;
|
|
4017
4017
|
this.size = 'medium';
|
|
4018
|
+
this.showClearButton = true;
|
|
4018
4019
|
this.activeYearMonth = timeMonth.floor(new Date());
|
|
4019
4020
|
this.open$ = new BehaviorSubject(false);
|
|
4020
4021
|
this.valueChange = new EventEmitter();
|
|
@@ -4040,12 +4041,16 @@ class DateComponent extends InputLabelComponent {
|
|
|
4040
4041
|
get open() {
|
|
4041
4042
|
return this.open$.getValue();
|
|
4042
4043
|
}
|
|
4044
|
+
clearValue() {
|
|
4045
|
+
this.valueChange.emit(undefined);
|
|
4046
|
+
this.open$.next(false);
|
|
4047
|
+
}
|
|
4043
4048
|
}
|
|
4044
4049
|
DateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DateComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
4045
|
-
DateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DateComponent, selector: "riv-date", inputs: { min: "min", max: "max", value: "value", placeholder: "placeholder", disabled: "disabled", size: "size", open: "open" }, outputs: { valueChange: "valueChange" }, queries: [{ propertyName: "headerTemplate", first: true, predicate: ["header"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<riv-input-label\n [label]=\"label\"\n [help]=\"help\"\n [required]=\"required\"\n [state]=\"state\"\n [errorMessage]=\"errorMessage\"\n [labelActionText]=\"labelActionText\"\n (labelAction)=\"labelAction.emit($event)\"\n>\n <button\n #trigger\n class=\"trigger\"\n [class.xsmall]=\"size === 'xsmall'\"\n [class.small]=\"size === 'small'\"\n [class.large]=\"size === 'large'\"\n [class.xlarge]=\"size === 'xlarge'\"\n [class.warning]=\"state === 'warning'\"\n [class.error]=\"state === 'error'\"\n (click)=\"open$.next(true)\"\n [disabled]=\"disabled\"\n type=\"button\"\n >\n <ng-container *ngIf=\"value; else placeholderValue\">\n <span class=\"value\">{{ value | rivDate }}</span>\n </ng-container>\n <ng-template #placeholderValue>\n <span class=\"value placeholder\">{{ placeholder }}</span>\n </ng-template>\n <span class=\"chevron\">\n <riv-icon [name]=\"'Calendar'\" [size]=\"16\"></riv-icon>\n </span>\n </button>\n</riv-input-label>\n<ng-container *ngIf=\"open$ | async\">\n <riv-callout\n *riv-overlay\n [anchor]=\"trigger\"\n [showCaret]=\"false\"\n [theme]=\"'light'\"\n [allowedPositions]=\"[\n 'top-left',\n 'top-right',\n 'bottom-right',\n 'bottom-left'\n ]\"\n [preferredPosition]=\"'bottom-right'\"\n (close)=\"open$.next(false)\"\n >\n <header *ngIf=\"headerTemplate\">\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n </header>\n <div class=\"content\">\n <riv-calendar\n [activeYearMonth]=\"activeYearMonth\"\n (activeYearMonthChange)=\"activeYearMonth = $event\"\n [displayMin]=\"min\"\n [displayMax]=\"max\"\n [selectableMin]=\"min\"\n [selectableMax]=\"max\"\n [selectedValue]=\"value\"\n (dateSelect)=\"valueChange.next($event); open$.next(false)\"\n ></riv-calendar>\n </div>\n </riv-callout>\n</ng-container>\n", styles: [".trigger{width:100%;border:var(--border-width) solid var(--border-light);border-radius:var(--border-radius-small);display:flex;gap:var(--size-small);background-color:var(--surface-light-0);cursor:pointer;padding-left:var(--size-small)}.trigger:focus{outline:none;border:var(--border-width) solid var(--purp-60)}.trigger:disabled{color:var(--type-light-disabled);background-color:var(--surface-light-1)}.value{font:var(--input-medium);color:var(--type-light-high-contrast);padding:var(--size-small) 0;flex-grow:1;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:pre}.value.placeholder{color:var(--type-light-disabled)}.trigger.xsmall .value{font:var(--input-small);padding:var(--size-xsmall) 0}.trigger.small .value{font:var(--input-small)}.trigger.large .value{font:var(--input-large);padding:var(--size-medium) var(--size-xsmall)}.trigger.xlarge .value{font:var(--input-large);padding:var(--size-large) var(--size-small)}.chevron{display:flex;justify-content:center;align-items:center;padding:var(--size-xsmall) calc(var(--base-grid-size) * 1.5)}.trigger.warning{border-color:var(--surface-dark-caution)}.trigger.error{border-color:var(--surface-dark-danger);box-shadow:inset 0 0 0 var(--border-width-large) var(--surface-dark-danger)}.content{padding:var(--size-large)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: CalendarComponent, selector: "riv-calendar", inputs: ["activeYearMonth", "displayMin", "displayMax", "selectableMin", "selectableMax", "omitRange", "selectedValue"], outputs: ["activeYearMonthChange", "dateSelect"] }, { kind: "component", type: CalloutComponent, selector: "riv-callout", inputs: ["anchor", "isModal", "preferredPosition", "allowedPositions", "fallbackDirection", "showCaret", "theme"], outputs: ["close"] }, { kind: "component", type: IconComponent, selector: "riv-icon", inputs: ["name", "fillColor", "size", "customSize", "strokeWidth"] }, { kind: "component", type: InputLabelComponent, selector: "riv-input-label", inputs: ["label", "help", "required", "labelActionText", "errorMessage", "state"], outputs: ["labelAction"] }, { kind: "directive", type: OverlayDirective, selector: "[riv-overlay]" }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: DatePipe, name: "rivDate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4050
|
+
DateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DateComponent, selector: "riv-date", inputs: { min: "min", max: "max", value: "value", placeholder: "placeholder", disabled: "disabled", size: "size", showClearButton: "showClearButton", open: "open" }, outputs: { valueChange: "valueChange" }, queries: [{ propertyName: "headerTemplate", first: true, predicate: ["header"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<riv-input-label\n [label]=\"label\"\n [help]=\"help\"\n [required]=\"required\"\n [state]=\"state\"\n [errorMessage]=\"errorMessage\"\n [labelActionText]=\"labelActionText\"\n (labelAction)=\"labelAction.emit($event)\"\n>\n <button\n #trigger\n class=\"trigger\"\n [class.xsmall]=\"size === 'xsmall'\"\n [class.small]=\"size === 'small'\"\n [class.large]=\"size === 'large'\"\n [class.xlarge]=\"size === 'xlarge'\"\n [class.warning]=\"state === 'warning'\"\n [class.error]=\"state === 'error'\"\n (click)=\"open$.next(true)\"\n [disabled]=\"disabled\"\n type=\"button\"\n >\n <ng-container *ngIf=\"value; else placeholderValue\">\n <span class=\"value\">{{ value | rivDate }}</span>\n </ng-container>\n <ng-template #placeholderValue>\n <span class=\"value placeholder\">{{ placeholder }}</span>\n </ng-template>\n <span class=\"chevron\">\n <riv-icon [name]=\"'Calendar'\" [size]=\"16\"></riv-icon>\n </span>\n </button>\n</riv-input-label>\n<ng-container *ngIf=\"open$ | async\">\n <riv-callout\n *riv-overlay\n [anchor]=\"trigger\"\n [showCaret]=\"false\"\n [theme]=\"'light'\"\n [allowedPositions]=\"[\n 'top-left',\n 'top-right',\n 'bottom-right',\n 'bottom-left'\n ]\"\n [preferredPosition]=\"'bottom-right'\"\n (close)=\"open$.next(false)\"\n >\n <header *ngIf=\"headerTemplate\">\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n </header>\n <div class=\"content\">\n <riv-calendar\n [activeYearMonth]=\"activeYearMonth\"\n (activeYearMonthChange)=\"activeYearMonth = $event\"\n [displayMin]=\"min\"\n [displayMax]=\"max\"\n [selectableMin]=\"min\"\n [selectableMax]=\"max\"\n [selectedValue]=\"value\"\n (dateSelect)=\"valueChange.next($event); open$.next(false)\"\n ></riv-calendar>\n </div>\n <footer *ngIf=\"showClearButton\" class=\"buttons\">\n <button\n rivButton\n [size]=\"'small'\"\n [variant]=\"'ghost'\"\n (click)=\"clearValue()\"\n type=\"button\"\n >\n Clear\n </button>\n </footer>\n </riv-callout>\n</ng-container>\n", styles: [".trigger{width:100%;border:var(--border-width) solid var(--border-light);border-radius:var(--border-radius-small);display:flex;gap:var(--size-small);background-color:var(--surface-light-0);cursor:pointer;padding-left:var(--size-small)}.trigger:focus{outline:none;border:var(--border-width) solid var(--purp-60)}.trigger:disabled{color:var(--type-light-disabled);background-color:var(--surface-light-1)}.value{font:var(--input-medium);color:var(--type-light-high-contrast);padding:var(--size-small) 0;flex-grow:1;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:pre}.value.placeholder{color:var(--type-light-disabled)}.trigger.xsmall .value{font:var(--input-small);padding:var(--size-xsmall) 0}.trigger.small .value{font:var(--input-small)}.trigger.large .value{font:var(--input-large);padding:var(--size-medium) var(--size-xsmall)}.trigger.xlarge .value{font:var(--input-large);padding:var(--size-large) var(--size-small)}.chevron{display:flex;justify-content:center;align-items:center;padding:var(--size-xsmall) calc(var(--base-grid-size) * 1.5)}.trigger.warning{border-color:var(--surface-dark-caution)}.trigger.error{border-color:var(--surface-dark-danger);box-shadow:inset 0 0 0 var(--border-width-large) var(--surface-dark-danger)}.content{padding:var(--size-large)}.buttons{padding:var(--size-small);display:flex;justify-content:space-between}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ButtonComponent, selector: "[rivButton]", inputs: ["locked", "disabled", "loading", "full", "size", "variant", "icon", "iconPosition", "current"] }, { kind: "component", type: CalendarComponent, selector: "riv-calendar", inputs: ["activeYearMonth", "displayMin", "displayMax", "selectableMin", "selectableMax", "omitRange", "selectedValue"], outputs: ["activeYearMonthChange", "dateSelect"] }, { kind: "component", type: CalloutComponent, selector: "riv-callout", inputs: ["anchor", "isModal", "preferredPosition", "allowedPositions", "fallbackDirection", "showCaret", "theme"], outputs: ["close"] }, { kind: "component", type: IconComponent, selector: "riv-icon", inputs: ["name", "fillColor", "size", "customSize", "strokeWidth"] }, { kind: "component", type: InputLabelComponent, selector: "riv-input-label", inputs: ["label", "help", "required", "labelActionText", "errorMessage", "state"], outputs: ["labelAction"] }, { kind: "directive", type: OverlayDirective, selector: "[riv-overlay]" }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: DatePipe, name: "rivDate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4046
4051
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DateComponent, decorators: [{
|
|
4047
4052
|
type: Component,
|
|
4048
|
-
args: [{ selector: 'riv-date', changeDetection: ChangeDetectionStrategy.OnPush, template: "<riv-input-label\n [label]=\"label\"\n [help]=\"help\"\n [required]=\"required\"\n [state]=\"state\"\n [errorMessage]=\"errorMessage\"\n [labelActionText]=\"labelActionText\"\n (labelAction)=\"labelAction.emit($event)\"\n>\n <button\n #trigger\n class=\"trigger\"\n [class.xsmall]=\"size === 'xsmall'\"\n [class.small]=\"size === 'small'\"\n [class.large]=\"size === 'large'\"\n [class.xlarge]=\"size === 'xlarge'\"\n [class.warning]=\"state === 'warning'\"\n [class.error]=\"state === 'error'\"\n (click)=\"open$.next(true)\"\n [disabled]=\"disabled\"\n type=\"button\"\n >\n <ng-container *ngIf=\"value; else placeholderValue\">\n <span class=\"value\">{{ value | rivDate }}</span>\n </ng-container>\n <ng-template #placeholderValue>\n <span class=\"value placeholder\">{{ placeholder }}</span>\n </ng-template>\n <span class=\"chevron\">\n <riv-icon [name]=\"'Calendar'\" [size]=\"16\"></riv-icon>\n </span>\n </button>\n</riv-input-label>\n<ng-container *ngIf=\"open$ | async\">\n <riv-callout\n *riv-overlay\n [anchor]=\"trigger\"\n [showCaret]=\"false\"\n [theme]=\"'light'\"\n [allowedPositions]=\"[\n 'top-left',\n 'top-right',\n 'bottom-right',\n 'bottom-left'\n ]\"\n [preferredPosition]=\"'bottom-right'\"\n (close)=\"open$.next(false)\"\n >\n <header *ngIf=\"headerTemplate\">\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n </header>\n <div class=\"content\">\n <riv-calendar\n [activeYearMonth]=\"activeYearMonth\"\n (activeYearMonthChange)=\"activeYearMonth = $event\"\n [displayMin]=\"min\"\n [displayMax]=\"max\"\n [selectableMin]=\"min\"\n [selectableMax]=\"max\"\n [selectedValue]=\"value\"\n (dateSelect)=\"valueChange.next($event); open$.next(false)\"\n ></riv-calendar>\n </div>\n </riv-callout>\n</ng-container>\n", styles: [".trigger{width:100%;border:var(--border-width) solid var(--border-light);border-radius:var(--border-radius-small);display:flex;gap:var(--size-small);background-color:var(--surface-light-0);cursor:pointer;padding-left:var(--size-small)}.trigger:focus{outline:none;border:var(--border-width) solid var(--purp-60)}.trigger:disabled{color:var(--type-light-disabled);background-color:var(--surface-light-1)}.value{font:var(--input-medium);color:var(--type-light-high-contrast);padding:var(--size-small) 0;flex-grow:1;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:pre}.value.placeholder{color:var(--type-light-disabled)}.trigger.xsmall .value{font:var(--input-small);padding:var(--size-xsmall) 0}.trigger.small .value{font:var(--input-small)}.trigger.large .value{font:var(--input-large);padding:var(--size-medium) var(--size-xsmall)}.trigger.xlarge .value{font:var(--input-large);padding:var(--size-large) var(--size-small)}.chevron{display:flex;justify-content:center;align-items:center;padding:var(--size-xsmall) calc(var(--base-grid-size) * 1.5)}.trigger.warning{border-color:var(--surface-dark-caution)}.trigger.error{border-color:var(--surface-dark-danger);box-shadow:inset 0 0 0 var(--border-width-large) var(--surface-dark-danger)}.content{padding:var(--size-large)}\n"] }]
|
|
4053
|
+
args: [{ selector: 'riv-date', changeDetection: ChangeDetectionStrategy.OnPush, template: "<riv-input-label\n [label]=\"label\"\n [help]=\"help\"\n [required]=\"required\"\n [state]=\"state\"\n [errorMessage]=\"errorMessage\"\n [labelActionText]=\"labelActionText\"\n (labelAction)=\"labelAction.emit($event)\"\n>\n <button\n #trigger\n class=\"trigger\"\n [class.xsmall]=\"size === 'xsmall'\"\n [class.small]=\"size === 'small'\"\n [class.large]=\"size === 'large'\"\n [class.xlarge]=\"size === 'xlarge'\"\n [class.warning]=\"state === 'warning'\"\n [class.error]=\"state === 'error'\"\n (click)=\"open$.next(true)\"\n [disabled]=\"disabled\"\n type=\"button\"\n >\n <ng-container *ngIf=\"value; else placeholderValue\">\n <span class=\"value\">{{ value | rivDate }}</span>\n </ng-container>\n <ng-template #placeholderValue>\n <span class=\"value placeholder\">{{ placeholder }}</span>\n </ng-template>\n <span class=\"chevron\">\n <riv-icon [name]=\"'Calendar'\" [size]=\"16\"></riv-icon>\n </span>\n </button>\n</riv-input-label>\n<ng-container *ngIf=\"open$ | async\">\n <riv-callout\n *riv-overlay\n [anchor]=\"trigger\"\n [showCaret]=\"false\"\n [theme]=\"'light'\"\n [allowedPositions]=\"[\n 'top-left',\n 'top-right',\n 'bottom-right',\n 'bottom-left'\n ]\"\n [preferredPosition]=\"'bottom-right'\"\n (close)=\"open$.next(false)\"\n >\n <header *ngIf=\"headerTemplate\">\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n </header>\n <div class=\"content\">\n <riv-calendar\n [activeYearMonth]=\"activeYearMonth\"\n (activeYearMonthChange)=\"activeYearMonth = $event\"\n [displayMin]=\"min\"\n [displayMax]=\"max\"\n [selectableMin]=\"min\"\n [selectableMax]=\"max\"\n [selectedValue]=\"value\"\n (dateSelect)=\"valueChange.next($event); open$.next(false)\"\n ></riv-calendar>\n </div>\n <footer *ngIf=\"showClearButton\" class=\"buttons\">\n <button\n rivButton\n [size]=\"'small'\"\n [variant]=\"'ghost'\"\n (click)=\"clearValue()\"\n type=\"button\"\n >\n Clear\n </button>\n </footer>\n </riv-callout>\n</ng-container>\n", styles: [".trigger{width:100%;border:var(--border-width) solid var(--border-light);border-radius:var(--border-radius-small);display:flex;gap:var(--size-small);background-color:var(--surface-light-0);cursor:pointer;padding-left:var(--size-small)}.trigger:focus{outline:none;border:var(--border-width) solid var(--purp-60)}.trigger:disabled{color:var(--type-light-disabled);background-color:var(--surface-light-1)}.value{font:var(--input-medium);color:var(--type-light-high-contrast);padding:var(--size-small) 0;flex-grow:1;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:pre}.value.placeholder{color:var(--type-light-disabled)}.trigger.xsmall .value{font:var(--input-small);padding:var(--size-xsmall) 0}.trigger.small .value{font:var(--input-small)}.trigger.large .value{font:var(--input-large);padding:var(--size-medium) var(--size-xsmall)}.trigger.xlarge .value{font:var(--input-large);padding:var(--size-large) var(--size-small)}.chevron{display:flex;justify-content:center;align-items:center;padding:var(--size-xsmall) calc(var(--base-grid-size) * 1.5)}.trigger.warning{border-color:var(--surface-dark-caution)}.trigger.error{border-color:var(--surface-dark-danger);box-shadow:inset 0 0 0 var(--border-width-large) var(--surface-dark-danger)}.content{padding:var(--size-large)}.buttons{padding:var(--size-small);display:flex;justify-content:space-between}\n"] }]
|
|
4049
4054
|
}], propDecorators: { min: [{
|
|
4050
4055
|
type: Input
|
|
4051
4056
|
}], max: [{
|
|
@@ -4058,6 +4063,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
4058
4063
|
type: Input
|
|
4059
4064
|
}], size: [{
|
|
4060
4065
|
type: Input
|
|
4066
|
+
}], showClearButton: [{
|
|
4067
|
+
type: Input
|
|
4061
4068
|
}], headerTemplate: [{
|
|
4062
4069
|
type: ContentChild,
|
|
4063
4070
|
args: ['header']
|
|
@@ -5747,6 +5754,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
5747
5754
|
|
|
5748
5755
|
class DialogComponent {
|
|
5749
5756
|
constructor() {
|
|
5757
|
+
this.customBody = false;
|
|
5758
|
+
this.customFooter = false;
|
|
5750
5759
|
this.close = new EventEmitter();
|
|
5751
5760
|
this.hook = ANIMATION_CONSTANTS.DIALOG.HOOK;
|
|
5752
5761
|
}
|
|
@@ -5758,14 +5767,18 @@ class DialogComponent {
|
|
|
5758
5767
|
}
|
|
5759
5768
|
}
|
|
5760
5769
|
DialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5761
|
-
DialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DialogComponent, selector: "riv-dialog", inputs: { title: "title", minWidth: "minWidth" }, outputs: { close: "close" }, host: { listeners: { "document:keydown": "handleKeydown($event)" } }, ngImport: i0, template: "<riv-modal (close)=\"close.emit()\" [obscure]=\"true\">\n <div [attr.data-animation-hook]=\"hook\" class=\"wrapper\">\n <div class=\"dialog\" [style.min-width]=\"minWidth\">\n <header>\n <span class=\"title\">\n {{ title }}\n </span>\n <button\n rivButton\n [variant]=\"'ghost'\"\n [icon]=\"'X'\"\n (click)=\"close.emit()\"\n ></button>\n </header>\n <div class=\"body\">\n <ng-content></ng-content>\n </div>\n <div class=\"footer\">\n <ng-content select=\"footer\"></ng-content>\n </div>\n </div>\n </div>\n</riv-modal>\n", styles: [".wrapper{position:absolute;top:50%;left:50%}.dialog{transform:translate(-50%,-50%);border-radius:var(--border-radius-medium);border:var(--border-width) solid var(--border-light);display:flex;flex-direction:column;max-width:calc(100vw - var(--size-xlarge) * 2);max-height:calc(100vh - var(--size-xlarge) * 2);overflow:hidden}header{display:flex;justify-content:space-between;align-items:center;padding:0 var(--size-medium);gap:var(--size-medium);border-bottom:var(--border-width) solid var(--border-light);background-color:var(--surface-light-1);flex-shrink:0}.title{font:var(--title-04);padding:var(--size-large) 0}.body{background-color:var(--surface-light-0);overflow-y:auto;min-height:0}.footer{border-top:var(--border-width) solid var(--border-light);background-color:var(--surface-light-1);flex-shrink:0}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "[rivButton]", inputs: ["locked", "disabled", "loading", "full", "size", "variant", "icon", "iconPosition", "current"] }, { kind: "component", type: ModalComponent, selector: "riv-modal", inputs: ["obscure", "topOffset"], outputs: ["close"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5770
|
+
DialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DialogComponent, selector: "riv-dialog", inputs: { title: "title", minWidth: "minWidth", customBody: "customBody", customFooter: "customFooter" }, outputs: { close: "close" }, host: { listeners: { "document:keydown": "handleKeydown($event)" } }, ngImport: i0, template: "<riv-modal (close)=\"close.emit()\" [obscure]=\"true\">\n <div [attr.data-animation-hook]=\"hook\" class=\"wrapper\">\n <div class=\"dialog\" [style.min-width]=\"minWidth\">\n <header>\n <span class=\"title\">\n {{ title }}\n </span>\n <button\n rivButton\n [variant]=\"'ghost'\"\n [icon]=\"'X'\"\n (click)=\"close.emit()\"\n ></button>\n </header>\n <div class=\"body\" [class.custom]=\"customBody\">\n <ng-content></ng-content>\n </div>\n <div class=\"footer riv-dialog-footer\" [class.custom]=\"customFooter\">\n <ng-content select=\"footer\"></ng-content>\n </div>\n </div>\n </div>\n</riv-modal>\n", styles: [".wrapper{position:absolute;top:50%;left:50%}.dialog{transform:translate(-50%,-50%);border-radius:var(--border-radius-medium);border:var(--border-width) solid var(--border-light);display:flex;flex-direction:column;max-width:calc(100vw - var(--size-xlarge) * 2);max-height:calc(100vh - var(--size-xlarge) * 2);overflow:hidden}header{display:flex;justify-content:space-between;align-items:center;padding:0 var(--size-medium);gap:var(--size-medium);border-bottom:var(--border-width) solid var(--border-light);background-color:var(--surface-light-1);flex-shrink:0}.title{font:var(--title-04);padding:var(--size-large) 0}.body{background-color:var(--surface-light-0);overflow-y:auto;min-height:0}.body:not(.custom){padding:var(--size-large)}.footer{border-top:var(--border-width) solid var(--border-light);background-color:var(--surface-light-1);flex-shrink:0}.footer:not(:has(> footer)){display:none}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "[rivButton]", inputs: ["locked", "disabled", "loading", "full", "size", "variant", "icon", "iconPosition", "current"] }, { kind: "component", type: ModalComponent, selector: "riv-modal", inputs: ["obscure", "topOffset"], outputs: ["close"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5762
5771
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DialogComponent, decorators: [{
|
|
5763
5772
|
type: Component,
|
|
5764
|
-
args: [{ selector: 'riv-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<riv-modal (close)=\"close.emit()\" [obscure]=\"true\">\n <div [attr.data-animation-hook]=\"hook\" class=\"wrapper\">\n <div class=\"dialog\" [style.min-width]=\"minWidth\">\n <header>\n <span class=\"title\">\n {{ title }}\n </span>\n <button\n rivButton\n [variant]=\"'ghost'\"\n [icon]=\"'X'\"\n (click)=\"close.emit()\"\n ></button>\n </header>\n <div class=\"body\">\n <ng-content></ng-content>\n </div>\n <div class=\"footer\">\n <ng-content select=\"footer\"></ng-content>\n </div>\n </div>\n </div>\n</riv-modal>\n", styles: [".wrapper{position:absolute;top:50%;left:50%}.dialog{transform:translate(-50%,-50%);border-radius:var(--border-radius-medium);border:var(--border-width) solid var(--border-light);display:flex;flex-direction:column;max-width:calc(100vw - var(--size-xlarge) * 2);max-height:calc(100vh - var(--size-xlarge) * 2);overflow:hidden}header{display:flex;justify-content:space-between;align-items:center;padding:0 var(--size-medium);gap:var(--size-medium);border-bottom:var(--border-width) solid var(--border-light);background-color:var(--surface-light-1);flex-shrink:0}.title{font:var(--title-04);padding:var(--size-large) 0}.body{background-color:var(--surface-light-0);overflow-y:auto;min-height:0}.footer{border-top:var(--border-width) solid var(--border-light);background-color:var(--surface-light-1);flex-shrink:0}\n"] }]
|
|
5773
|
+
args: [{ selector: 'riv-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<riv-modal (close)=\"close.emit()\" [obscure]=\"true\">\n <div [attr.data-animation-hook]=\"hook\" class=\"wrapper\">\n <div class=\"dialog\" [style.min-width]=\"minWidth\">\n <header>\n <span class=\"title\">\n {{ title }}\n </span>\n <button\n rivButton\n [variant]=\"'ghost'\"\n [icon]=\"'X'\"\n (click)=\"close.emit()\"\n ></button>\n </header>\n <div class=\"body\" [class.custom]=\"customBody\">\n <ng-content></ng-content>\n </div>\n <div class=\"footer riv-dialog-footer\" [class.custom]=\"customFooter\">\n <ng-content select=\"footer\"></ng-content>\n </div>\n </div>\n </div>\n</riv-modal>\n", styles: [".wrapper{position:absolute;top:50%;left:50%}.dialog{transform:translate(-50%,-50%);border-radius:var(--border-radius-medium);border:var(--border-width) solid var(--border-light);display:flex;flex-direction:column;max-width:calc(100vw - var(--size-xlarge) * 2);max-height:calc(100vh - var(--size-xlarge) * 2);overflow:hidden}header{display:flex;justify-content:space-between;align-items:center;padding:0 var(--size-medium);gap:var(--size-medium);border-bottom:var(--border-width) solid var(--border-light);background-color:var(--surface-light-1);flex-shrink:0}.title{font:var(--title-04);padding:var(--size-large) 0}.body{background-color:var(--surface-light-0);overflow-y:auto;min-height:0}.body:not(.custom){padding:var(--size-large)}.footer{border-top:var(--border-width) solid var(--border-light);background-color:var(--surface-light-1);flex-shrink:0}.footer:not(:has(> footer)){display:none}\n"] }]
|
|
5765
5774
|
}], propDecorators: { title: [{
|
|
5766
5775
|
type: Input
|
|
5767
5776
|
}], minWidth: [{
|
|
5768
5777
|
type: Input
|
|
5778
|
+
}], customBody: [{
|
|
5779
|
+
type: Input
|
|
5780
|
+
}], customFooter: [{
|
|
5781
|
+
type: Input
|
|
5769
5782
|
}], close: [{
|
|
5770
5783
|
type: Output
|
|
5771
5784
|
}], handleKeydown: [{
|
|
@@ -6023,7 +6036,7 @@ class ViewMenuComponent {
|
|
|
6023
6036
|
}
|
|
6024
6037
|
}
|
|
6025
6038
|
ViewMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ViewMenuComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
6026
|
-
ViewMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ViewMenuComponent, selector: "riv-view-menu", inputs: { manager: "manager", view: "view", menuContext: "menuContext" }, queries: [{ propertyName: "triggerTemplate", first: true, predicate: ["menuTrigger"], descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"view\">\n <riv-menu\n #menu\n [preferredPosition]=\"'bottom-right'\"\n (click)=\"$event.stopPropagation()\"\n >\n <ng-container *ngIf=\"triggerTemplate\">\n <ng-template #trigger>\n <ng-container [ngTemplateOutlet]=\"triggerTemplate\"></ng-container>\n </ng-template>\n </ng-container>\n <button\n riv-menu-item\n (click)=\"\n manager?.actions?.next({\n type: 'setEnabled',\n id: view.id,\n enabled: !view.enabled,\n source: 'menu'\n })\n \"\n [disabled]=\"view.system || view.temporary\"\n >\n {{ view.enabled ? 'Hide tab' : 'Show tab' }}\n </button>\n <div class=\"riv-divider\"></div>\n <button\n riv-menu-item\n (click)=\"\n manager?.actions?.next({\n type: 'setEditingView',\n context: { id: view.id, autoRename: false, menuContext }\n })\n \"\n [disabled]=\"view.system\"\n >\n Edit view\n </button>\n <button\n riv-menu-item\n (click)=\"\n manager?.actions?.next({\n type: 'setEditingView',\n context: { id: view.id, autoRename: true, menuContext }\n })\n \"\n [disabled]=\"view.system\"\n >\n Rename view\n </button>\n <button\n riv-menu-item\n (click)=\"\n manager?.actions?.next({ type: 'duplicateView', view, menuContext })\n \"\n [disabled]=\"view.temporary\"\n >\n Duplicate view\n </button>\n <button\n riv-menu-item\n (click)=\"\n manager?.actions?.next({\n type: 'setDeletingView',\n context: { id: view.id, menuContext }\n })\n \"\n [disabled]=\"view.system\"\n >\n Delete view\n </button>\n <div class=\"riv-divider\"></div>\n <button\n riv-menu-item\n (click)=\"manager?.actions?.next({ type: 'copyLinkToView', view })\"\n [disabled]=\"view.temporary\"\n >\n Copy link to view\n </button>\n </riv-menu>\n\n <ng-container *ngIf=\"manager?.state | async; let state\">\n <ng-container *ngIf=\"state.editingViewContext; let editingViewContext\">\n <riv-edit-view\n *ngIf=\"\n editingViewContext.id === view.id &&\n editingViewContext.menuContext === menuContext\n \"\n [view]=\"view\"\n [userSource]=\"state.userSource\"\n [userSelectMode]=\"state.userSelectMode\"\n [onAddUser]=\"state.onAddUser\"\n [newTooltip]=\"state.newTooltip\"\n [autoSelectName]=\"editingViewContext.autoRename\"\n [anchor]=\"el.nativeElement\"\n (save)=\"manager?.actions?.next({ type: 'updateView', view: $event })\"\n (delete)=\"manager?.actions?.next({ type: 'deleteView', view: $event })\"\n (close)=\"\n manager?.actions?.next({ type: 'setEditingView', context: null })\n \"\n ></riv-edit-view>\n </ng-container>\n\n <ng-container *ngIf=\"state.deletingViewContext; let deletingViewContext\">\n <riv-dialog\n *ngIf=\"\n deletingViewContext.id === view.id &&\n deletingViewContext.menuContext === menuContext\n \"\n [title]=\"'Delete view'\"\n (close)=\"\n manager?.actions?.next({ type: 'setDeletingView', context: null })\n \"\n >\n <div class=\"delete-dialog\">\n <div class=\"delete-title\">\n Are you sure you want to delete the following view?\n </div>\n <p>{{ view.title }}</p>\n </div>\n <footer class=\"delete-footer\">\n <button\n rivButton\n (click)=\"\n manager?.actions?.next({ type: 'setDeletingView', context: null })\n \"\n >\n Cancel\n </button>\n <button\n rivButton\n [variant]=\"'danger'\"\n (click)=\"\n manager?.actions?.next({\n type: 'deleteView',\n view\n })\n \"\n >\n Delete view\n </button>\n </footer>\n </riv-dialog>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [":host{display:inline-flex;align-items:stretch}riv-menu{width:100%;max-width:100%;height:100%;max-height:100%}.delete-dialog{padding:var(--size-xlarge);display:flex;flex-direction:column;gap:var(--size-large);width:calc(var(--base-grid-size) * 120);max-width:100%}.delete-title{font:var(--title-02)}.delete-footer{padding:var(--size-medium);display:flex;justify-content:space-between;gap:var(--size-medium)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ButtonComponent, selector: "[rivButton]", inputs: ["locked", "disabled", "loading", "full", "size", "variant", "icon", "iconPosition", "current"] }, { kind: "component", type: DialogComponent, selector: "riv-dialog", inputs: ["title", "minWidth"], outputs: ["close"] }, { kind: "component", type: EditViewComponent, selector: "riv-edit-view", inputs: ["anchor", "autoSelectName", "view", "userSource", "userSelectMode", "onAddUser", "newTooltip", "mode"], outputs: ["save", "delete", "close"] }, { kind: "component", type: MenuComponent, selector: "riv-menu", inputs: ["preferredPosition"] }, { kind: "component", type: MenuItemComponent, selector: "[riv-menu-item]", inputs: ["locked", "disabled", "variant"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6039
|
+
ViewMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ViewMenuComponent, selector: "riv-view-menu", inputs: { manager: "manager", view: "view", menuContext: "menuContext" }, queries: [{ propertyName: "triggerTemplate", first: true, predicate: ["menuTrigger"], descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"view\">\n <riv-menu\n #menu\n [preferredPosition]=\"'bottom-right'\"\n (click)=\"$event.stopPropagation()\"\n >\n <ng-container *ngIf=\"triggerTemplate\">\n <ng-template #trigger>\n <ng-container [ngTemplateOutlet]=\"triggerTemplate\"></ng-container>\n </ng-template>\n </ng-container>\n <button\n riv-menu-item\n (click)=\"\n manager?.actions?.next({\n type: 'setEnabled',\n id: view.id,\n enabled: !view.enabled,\n source: 'menu'\n })\n \"\n [disabled]=\"view.system || view.temporary\"\n >\n {{ view.enabled ? 'Hide tab' : 'Show tab' }}\n </button>\n <div class=\"riv-divider\"></div>\n <button\n riv-menu-item\n (click)=\"\n manager?.actions?.next({\n type: 'setEditingView',\n context: { id: view.id, autoRename: false, menuContext }\n })\n \"\n [disabled]=\"view.system\"\n >\n Edit view\n </button>\n <button\n riv-menu-item\n (click)=\"\n manager?.actions?.next({\n type: 'setEditingView',\n context: { id: view.id, autoRename: true, menuContext }\n })\n \"\n [disabled]=\"view.system\"\n >\n Rename view\n </button>\n <button\n riv-menu-item\n (click)=\"\n manager?.actions?.next({ type: 'duplicateView', view, menuContext })\n \"\n [disabled]=\"view.temporary\"\n >\n Duplicate view\n </button>\n <button\n riv-menu-item\n (click)=\"\n manager?.actions?.next({\n type: 'setDeletingView',\n context: { id: view.id, menuContext }\n })\n \"\n [disabled]=\"view.system\"\n >\n Delete view\n </button>\n <div class=\"riv-divider\"></div>\n <button\n riv-menu-item\n (click)=\"manager?.actions?.next({ type: 'copyLinkToView', view })\"\n [disabled]=\"view.temporary\"\n >\n Copy link to view\n </button>\n </riv-menu>\n\n <ng-container *ngIf=\"manager?.state | async; let state\">\n <ng-container *ngIf=\"state.editingViewContext; let editingViewContext\">\n <riv-edit-view\n *ngIf=\"\n editingViewContext.id === view.id &&\n editingViewContext.menuContext === menuContext\n \"\n [view]=\"view\"\n [userSource]=\"state.userSource\"\n [userSelectMode]=\"state.userSelectMode\"\n [onAddUser]=\"state.onAddUser\"\n [newTooltip]=\"state.newTooltip\"\n [autoSelectName]=\"editingViewContext.autoRename\"\n [anchor]=\"el.nativeElement\"\n (save)=\"manager?.actions?.next({ type: 'updateView', view: $event })\"\n (delete)=\"manager?.actions?.next({ type: 'deleteView', view: $event })\"\n (close)=\"\n manager?.actions?.next({ type: 'setEditingView', context: null })\n \"\n ></riv-edit-view>\n </ng-container>\n\n <ng-container *ngIf=\"state.deletingViewContext; let deletingViewContext\">\n <riv-dialog\n *ngIf=\"\n deletingViewContext.id === view.id &&\n deletingViewContext.menuContext === menuContext\n \"\n [title]=\"'Delete view'\"\n (close)=\"\n manager?.actions?.next({ type: 'setDeletingView', context: null })\n \"\n >\n <div class=\"delete-dialog\">\n <div class=\"delete-title\">\n Are you sure you want to delete the following view?\n </div>\n <p>{{ view.title }}</p>\n </div>\n <footer class=\"delete-footer\">\n <button\n rivButton\n (click)=\"\n manager?.actions?.next({ type: 'setDeletingView', context: null })\n \"\n >\n Cancel\n </button>\n <button\n rivButton\n [variant]=\"'danger'\"\n (click)=\"\n manager?.actions?.next({\n type: 'deleteView',\n view\n })\n \"\n >\n Delete view\n </button>\n </footer>\n </riv-dialog>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [":host{display:inline-flex;align-items:stretch}riv-menu{width:100%;max-width:100%;height:100%;max-height:100%}.delete-dialog{padding:var(--size-xlarge);display:flex;flex-direction:column;gap:var(--size-large);width:calc(var(--base-grid-size) * 120);max-width:100%}.delete-title{font:var(--title-02)}.delete-footer{padding:var(--size-medium);display:flex;justify-content:space-between;gap:var(--size-medium)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ButtonComponent, selector: "[rivButton]", inputs: ["locked", "disabled", "loading", "full", "size", "variant", "icon", "iconPosition", "current"] }, { kind: "component", type: DialogComponent, selector: "riv-dialog", inputs: ["title", "minWidth", "customBody", "customFooter"], outputs: ["close"] }, { kind: "component", type: EditViewComponent, selector: "riv-edit-view", inputs: ["anchor", "autoSelectName", "view", "userSource", "userSelectMode", "onAddUser", "newTooltip", "mode"], outputs: ["save", "delete", "close"] }, { kind: "component", type: MenuComponent, selector: "riv-menu", inputs: ["preferredPosition"] }, { kind: "component", type: MenuItemComponent, selector: "[riv-menu-item]", inputs: ["locked", "disabled", "variant"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6027
6040
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ViewMenuComponent, decorators: [{
|
|
6028
6041
|
type: Component,
|
|
6029
6042
|
args: [{ selector: 'riv-view-menu', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"view\">\n <riv-menu\n #menu\n [preferredPosition]=\"'bottom-right'\"\n (click)=\"$event.stopPropagation()\"\n >\n <ng-container *ngIf=\"triggerTemplate\">\n <ng-template #trigger>\n <ng-container [ngTemplateOutlet]=\"triggerTemplate\"></ng-container>\n </ng-template>\n </ng-container>\n <button\n riv-menu-item\n (click)=\"\n manager?.actions?.next({\n type: 'setEnabled',\n id: view.id,\n enabled: !view.enabled,\n source: 'menu'\n })\n \"\n [disabled]=\"view.system || view.temporary\"\n >\n {{ view.enabled ? 'Hide tab' : 'Show tab' }}\n </button>\n <div class=\"riv-divider\"></div>\n <button\n riv-menu-item\n (click)=\"\n manager?.actions?.next({\n type: 'setEditingView',\n context: { id: view.id, autoRename: false, menuContext }\n })\n \"\n [disabled]=\"view.system\"\n >\n Edit view\n </button>\n <button\n riv-menu-item\n (click)=\"\n manager?.actions?.next({\n type: 'setEditingView',\n context: { id: view.id, autoRename: true, menuContext }\n })\n \"\n [disabled]=\"view.system\"\n >\n Rename view\n </button>\n <button\n riv-menu-item\n (click)=\"\n manager?.actions?.next({ type: 'duplicateView', view, menuContext })\n \"\n [disabled]=\"view.temporary\"\n >\n Duplicate view\n </button>\n <button\n riv-menu-item\n (click)=\"\n manager?.actions?.next({\n type: 'setDeletingView',\n context: { id: view.id, menuContext }\n })\n \"\n [disabled]=\"view.system\"\n >\n Delete view\n </button>\n <div class=\"riv-divider\"></div>\n <button\n riv-menu-item\n (click)=\"manager?.actions?.next({ type: 'copyLinkToView', view })\"\n [disabled]=\"view.temporary\"\n >\n Copy link to view\n </button>\n </riv-menu>\n\n <ng-container *ngIf=\"manager?.state | async; let state\">\n <ng-container *ngIf=\"state.editingViewContext; let editingViewContext\">\n <riv-edit-view\n *ngIf=\"\n editingViewContext.id === view.id &&\n editingViewContext.menuContext === menuContext\n \"\n [view]=\"view\"\n [userSource]=\"state.userSource\"\n [userSelectMode]=\"state.userSelectMode\"\n [onAddUser]=\"state.onAddUser\"\n [newTooltip]=\"state.newTooltip\"\n [autoSelectName]=\"editingViewContext.autoRename\"\n [anchor]=\"el.nativeElement\"\n (save)=\"manager?.actions?.next({ type: 'updateView', view: $event })\"\n (delete)=\"manager?.actions?.next({ type: 'deleteView', view: $event })\"\n (close)=\"\n manager?.actions?.next({ type: 'setEditingView', context: null })\n \"\n ></riv-edit-view>\n </ng-container>\n\n <ng-container *ngIf=\"state.deletingViewContext; let deletingViewContext\">\n <riv-dialog\n *ngIf=\"\n deletingViewContext.id === view.id &&\n deletingViewContext.menuContext === menuContext\n \"\n [title]=\"'Delete view'\"\n (close)=\"\n manager?.actions?.next({ type: 'setDeletingView', context: null })\n \"\n >\n <div class=\"delete-dialog\">\n <div class=\"delete-title\">\n Are you sure you want to delete the following view?\n </div>\n <p>{{ view.title }}</p>\n </div>\n <footer class=\"delete-footer\">\n <button\n rivButton\n (click)=\"\n manager?.actions?.next({ type: 'setDeletingView', context: null })\n \"\n >\n Cancel\n </button>\n <button\n rivButton\n [variant]=\"'danger'\"\n (click)=\"\n manager?.actions?.next({\n type: 'deleteView',\n view\n })\n \"\n >\n Delete view\n </button>\n </footer>\n </riv-dialog>\n </ng-container>\n </ng-container>\n</ng-container>\n", styles: [":host{display:inline-flex;align-items:stretch}riv-menu{width:100%;max-width:100%;height:100%;max-height:100%}.delete-dialog{padding:var(--size-xlarge);display:flex;flex-direction:column;gap:var(--size-large);width:calc(var(--base-grid-size) * 120);max-width:100%}.delete-title{font:var(--title-02)}.delete-footer{padding:var(--size-medium);display:flex;justify-content:space-between;gap:var(--size-medium)}\n"] }]
|