@rivet-health/design-system 40.1.0 → 40.3.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 +134 -17
- package/esm2020/lib/navigation/views/view-menu/view-menu.component.mjs +1 -1
- package/esm2020/lib/notification/banner/banner.component.mjs +2 -2
- package/esm2020/lib/overlay/modal/dialog/dialog.component.mjs +9 -3
- package/esm2020/lib/table/table/table-search-columns/table-search-columns.component.mjs +2 -2
- package/fesm2015/rivet-health-design-system.mjs +144 -20
- package/fesm2015/rivet-health-design-system.mjs.map +1 -1
- package/fesm2020/rivet-health-design-system.mjs +143 -20
- package/fesm2020/rivet-health-design-system.mjs.map +1 -1
- package/lib/input/date/date.component.d.ts +20 -1
- package/lib/overlay/modal/dialog/dialog.component.d.ts +3 -1
- package/package.json +1 -1
- package/styles/global.css +14 -0
|
@@ -4097,8 +4097,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
4097
4097
|
})(DateRangeComponent || (DateRangeComponent = {}));
|
|
4098
4098
|
|
|
4099
4099
|
class DateComponent extends InputLabelComponent {
|
|
4100
|
-
constructor() {
|
|
4101
|
-
super(
|
|
4100
|
+
constructor(cdr, host) {
|
|
4101
|
+
super();
|
|
4102
|
+
this.cdr = cdr;
|
|
4103
|
+
this.host = host;
|
|
4102
4104
|
this.min = CalendarComponent.defaultMin;
|
|
4103
4105
|
this.max = CalendarComponent.defaultMax;
|
|
4104
4106
|
this.placeholder = 'Select date';
|
|
@@ -4108,17 +4110,20 @@ class DateComponent extends InputLabelComponent {
|
|
|
4108
4110
|
this.activeYearMonth = timeMonth.floor(new Date());
|
|
4109
4111
|
this.open$ = new BehaviorSubject(false);
|
|
4110
4112
|
this.valueChange = new EventEmitter();
|
|
4113
|
+
this.inputText = '';
|
|
4114
|
+
this.hasFocus = false;
|
|
4115
|
+
this.datePipe = new DatePipe();
|
|
4111
4116
|
}
|
|
4112
4117
|
set value(v) {
|
|
4113
4118
|
if (this._value?.getTime() === v?.getTime())
|
|
4114
4119
|
return;
|
|
4115
4120
|
this._value = v;
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4121
|
+
// Skip text sync while typing so we don't stomp the user's in-progress input.
|
|
4122
|
+
if (!this.hasFocus)
|
|
4123
|
+
this.inputText = v ? this.formatValue(v) : '';
|
|
4124
|
+
if (v)
|
|
4125
|
+
this.setActiveMonth(v);
|
|
4126
|
+
this.cdr.markForCheck();
|
|
4122
4127
|
}
|
|
4123
4128
|
get value() {
|
|
4124
4129
|
return this._value;
|
|
@@ -4129,17 +4134,101 @@ class DateComponent extends InputLabelComponent {
|
|
|
4129
4134
|
get open() {
|
|
4130
4135
|
return this.open$.getValue();
|
|
4131
4136
|
}
|
|
4137
|
+
// The callout renders with isModal=false (no full-viewport scrim) and can't
|
|
4138
|
+
// self-close on outside clicks. Any overlay layer — including sibling
|
|
4139
|
+
// overlays like the month/year selects — counts as "inside" the picker.
|
|
4140
|
+
onDocumentMouseDown(target) {
|
|
4141
|
+
if (!this.open$.getValue() || !(target instanceof Element))
|
|
4142
|
+
return;
|
|
4143
|
+
if (this.host.nativeElement.contains(target))
|
|
4144
|
+
return;
|
|
4145
|
+
if (target.closest('.callout, .scrim, .overlay-container'))
|
|
4146
|
+
return;
|
|
4147
|
+
this.open$.next(false);
|
|
4148
|
+
this.cdr.markForCheck();
|
|
4149
|
+
}
|
|
4132
4150
|
clearValue() {
|
|
4133
|
-
this.
|
|
4151
|
+
this.commit(undefined);
|
|
4152
|
+
this.open$.next(false);
|
|
4153
|
+
}
|
|
4154
|
+
onInputChange(value) {
|
|
4155
|
+
this.inputText = value;
|
|
4156
|
+
const parsed = this.parseInput(value);
|
|
4157
|
+
this.previewValue = parsed;
|
|
4158
|
+
if (parsed)
|
|
4159
|
+
this.setActiveMonth(parsed);
|
|
4160
|
+
this.cdr.markForCheck();
|
|
4161
|
+
}
|
|
4162
|
+
onInputBlur(event) {
|
|
4163
|
+
this.hasFocus = false;
|
|
4164
|
+
const parsed = this.parseInput(this.inputText);
|
|
4165
|
+
if (parsed) {
|
|
4166
|
+
this.commit(parsed);
|
|
4167
|
+
}
|
|
4168
|
+
else if (!this.inputText.trim()) {
|
|
4169
|
+
this.commit(undefined);
|
|
4170
|
+
}
|
|
4171
|
+
else {
|
|
4172
|
+
// Invalid text — revert to whatever the committed value was.
|
|
4173
|
+
this.inputText = this._value ? this.formatValue(this._value) : '';
|
|
4174
|
+
}
|
|
4175
|
+
this.previewValue = undefined;
|
|
4176
|
+
// Close on keyboard-driven focus changes (Tab out). Stay open if focus
|
|
4177
|
+
// moved into a nested overlay (e.g. the calendar's month/year select).
|
|
4178
|
+
// Mouse clicks inside the calendar preventDefault mousedown so this
|
|
4179
|
+
// handler never runs for them.
|
|
4180
|
+
const nextTarget = event?.relatedTarget;
|
|
4181
|
+
const stayOpen = nextTarget instanceof Element &&
|
|
4182
|
+
(this.host.nativeElement.contains(nextTarget) ||
|
|
4183
|
+
!!nextTarget.closest('.callout, .scrim, .overlay-container'));
|
|
4184
|
+
if (!stayOpen)
|
|
4185
|
+
this.open$.next(false);
|
|
4186
|
+
this.cdr.markForCheck();
|
|
4187
|
+
}
|
|
4188
|
+
onDateSelect(date) {
|
|
4189
|
+
this.commit(timeDay.floor(date));
|
|
4134
4190
|
this.open$.next(false);
|
|
4135
4191
|
}
|
|
4192
|
+
onInputFocus() {
|
|
4193
|
+
this.hasFocus = true;
|
|
4194
|
+
this.open$.next(true);
|
|
4195
|
+
}
|
|
4196
|
+
toggleCalendar() {
|
|
4197
|
+
this.open$.next(!this.open$.getValue());
|
|
4198
|
+
}
|
|
4199
|
+
formatValue(date) {
|
|
4200
|
+
return this.datePipe.transform(date);
|
|
4201
|
+
}
|
|
4202
|
+
parseInput(text) {
|
|
4203
|
+
const parsed = DateComponent.parseDate(text);
|
|
4204
|
+
return parsed && DateComponent.isValidDate(parsed, this.min, this.max)
|
|
4205
|
+
? timeDay.floor(parsed)
|
|
4206
|
+
: undefined;
|
|
4207
|
+
}
|
|
4208
|
+
setActiveMonth(date) {
|
|
4209
|
+
const month = timeMonth.floor(date);
|
|
4210
|
+
if (month.getTime() !== this.activeYearMonth.getTime()) {
|
|
4211
|
+
this.activeYearMonth = month;
|
|
4212
|
+
}
|
|
4213
|
+
}
|
|
4214
|
+
commit(next) {
|
|
4215
|
+
const unchanged = next?.getTime() === this._value?.getTime();
|
|
4216
|
+
this._value = next;
|
|
4217
|
+
this.inputText = next ? this.formatValue(next) : '';
|
|
4218
|
+
this.previewValue = undefined;
|
|
4219
|
+
if (next)
|
|
4220
|
+
this.setActiveMonth(next);
|
|
4221
|
+
if (!unchanged)
|
|
4222
|
+
this.valueChange.emit(next);
|
|
4223
|
+
this.cdr.markForCheck();
|
|
4224
|
+
}
|
|
4136
4225
|
}
|
|
4137
|
-
DateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DateComponent, deps:
|
|
4138
|
-
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 <
|
|
4226
|
+
DateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DateComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4227
|
+
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" }, host: { listeners: { "document:mousedown": "onDocumentMouseDown($event.target)" } }, 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 <div\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 [class.disabled]=\"disabled\"\n >\n <input\n #input\n class=\"value\"\n [placeholder]=\"placeholder\"\n [value]=\"inputText\"\n [disabled]=\"disabled\"\n [attr.aria-label]=\"label || null\"\n [attr.aria-expanded]=\"open$ | async\"\n role=\"combobox\"\n aria-haspopup=\"dialog\"\n aria-autocomplete=\"none\"\n (input)=\"onInputChange(input.value)\"\n (blur)=\"onInputBlur($event)\"\n (focus)=\"onInputFocus()\"\n (keydown.enter)=\"input.blur(); open$.next(false); $event.preventDefault()\"\n type=\"text\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n />\n <button\n class=\"chevron\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"toggleCalendar()\"\n [disabled]=\"disabled\"\n [attr.aria-label]=\"(open$ | async) ? 'Close calendar' : 'Open calendar'\"\n type=\"button\"\n tabindex=\"-1\"\n >\n <riv-icon [name]=\"'Calendar'\" [size]=\"16\"></riv-icon>\n </button>\n </div>\n</riv-input-label>\n<ng-container *ngIf=\"open$ | async\">\n <riv-callout\n *riv-overlay\n [anchor]=\"trigger\"\n [isModal]=\"false\"\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 <div (mousedown)=\"$event.preventDefault()\">\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]=\"previewValue ?? value\"\n (dateSelect)=\"onDateSelect($event); input.blur()\"\n ></riv-calendar>\n </div>\n <footer *ngIf=\"showClearButton\" class=\"buttons\">\n <button\n rivButton\n [size]=\"'small'\"\n [variant]=\"'ghost'\"\n (click)=\"clearValue(); input.blur()\"\n type=\"button\"\n >\n Clear\n </button>\n </footer>\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);padding-left:var(--size-small);position:relative}.trigger:focus-within{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;border:none;background:transparent;outline:none;width:100%}.value::placeholder{color:var(--type-light-disabled)}.value:disabled{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);border:none;background:transparent;cursor:pointer;color:var(--type-light-high-contrast)}.chevron:disabled{color:var(--type-light-disabled);cursor:not-allowed}.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" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4139
4228
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DateComponent, decorators: [{
|
|
4140
4229
|
type: Component,
|
|
4141
|
-
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 <
|
|
4142
|
-
}], propDecorators: { min: [{
|
|
4230
|
+
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 <div\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 [class.disabled]=\"disabled\"\n >\n <input\n #input\n class=\"value\"\n [placeholder]=\"placeholder\"\n [value]=\"inputText\"\n [disabled]=\"disabled\"\n [attr.aria-label]=\"label || null\"\n [attr.aria-expanded]=\"open$ | async\"\n role=\"combobox\"\n aria-haspopup=\"dialog\"\n aria-autocomplete=\"none\"\n (input)=\"onInputChange(input.value)\"\n (blur)=\"onInputBlur($event)\"\n (focus)=\"onInputFocus()\"\n (keydown.enter)=\"input.blur(); open$.next(false); $event.preventDefault()\"\n type=\"text\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n />\n <button\n class=\"chevron\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"toggleCalendar()\"\n [disabled]=\"disabled\"\n [attr.aria-label]=\"(open$ | async) ? 'Close calendar' : 'Open calendar'\"\n type=\"button\"\n tabindex=\"-1\"\n >\n <riv-icon [name]=\"'Calendar'\" [size]=\"16\"></riv-icon>\n </button>\n </div>\n</riv-input-label>\n<ng-container *ngIf=\"open$ | async\">\n <riv-callout\n *riv-overlay\n [anchor]=\"trigger\"\n [isModal]=\"false\"\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 <div (mousedown)=\"$event.preventDefault()\">\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]=\"previewValue ?? value\"\n (dateSelect)=\"onDateSelect($event); input.blur()\"\n ></riv-calendar>\n </div>\n <footer *ngIf=\"showClearButton\" class=\"buttons\">\n <button\n rivButton\n [size]=\"'small'\"\n [variant]=\"'ghost'\"\n (click)=\"clearValue(); input.blur()\"\n type=\"button\"\n >\n Clear\n </button>\n </footer>\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);padding-left:var(--size-small);position:relative}.trigger:focus-within{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;border:none;background:transparent;outline:none;width:100%}.value::placeholder{color:var(--type-light-disabled)}.value:disabled{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);border:none;background:transparent;cursor:pointer;color:var(--type-light-high-contrast)}.chevron:disabled{color:var(--type-light-disabled);cursor:not-allowed}.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"] }]
|
|
4231
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { min: [{
|
|
4143
4232
|
type: Input
|
|
4144
4233
|
}], max: [{
|
|
4145
4234
|
type: Input
|
|
@@ -4160,6 +4249,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
4160
4249
|
type: Input
|
|
4161
4250
|
}], valueChange: [{
|
|
4162
4251
|
type: Output
|
|
4252
|
+
}], onDocumentMouseDown: [{
|
|
4253
|
+
type: HostListener,
|
|
4254
|
+
args: ['document:mousedown', ['$event.target']]
|
|
4163
4255
|
}] } });
|
|
4164
4256
|
(function (DateComponent) {
|
|
4165
4257
|
DateComponent.Sizes = [
|
|
@@ -4169,6 +4261,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
4169
4261
|
'large',
|
|
4170
4262
|
'xlarge',
|
|
4171
4263
|
];
|
|
4264
|
+
// Accepts MM/DD/YYYY, M/D/YY, and YYYY-MM-DD with /, -, or . separators.
|
|
4265
|
+
// A 4-digit leading segment is treated as year.
|
|
4266
|
+
function parseDate(input) {
|
|
4267
|
+
const parts = input.trim().split(/[/.-]/);
|
|
4268
|
+
if (parts.length !== 3)
|
|
4269
|
+
return undefined;
|
|
4270
|
+
const nums = parts.map(p => parseInt(p, 10));
|
|
4271
|
+
if (nums.some(isNaN))
|
|
4272
|
+
return undefined;
|
|
4273
|
+
let [year, month, day] = parts[0].length === 4 ? nums : [nums[2], nums[0], nums[1]];
|
|
4274
|
+
if (parts[0].length !== 4 && year < 100)
|
|
4275
|
+
year += year < 50 ? 2000 : 1900;
|
|
4276
|
+
const date = new Date(year, month - 1, day);
|
|
4277
|
+
return date.getFullYear() === year &&
|
|
4278
|
+
date.getMonth() === month - 1 &&
|
|
4279
|
+
date.getDate() === day
|
|
4280
|
+
? date
|
|
4281
|
+
: undefined;
|
|
4282
|
+
}
|
|
4283
|
+
DateComponent.parseDate = parseDate;
|
|
4284
|
+
function isValidDate(date, min, max) {
|
|
4285
|
+
const time = date.getTime();
|
|
4286
|
+
return time >= min.getTime() && time <= max.getTime();
|
|
4287
|
+
}
|
|
4288
|
+
DateComponent.isValidDate = isValidDate;
|
|
4172
4289
|
})(DateComponent || (DateComponent = {}));
|
|
4173
4290
|
|
|
4174
4291
|
const ZWS = '';
|
|
@@ -5937,6 +6054,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
5937
6054
|
|
|
5938
6055
|
class DialogComponent {
|
|
5939
6056
|
constructor() {
|
|
6057
|
+
this.customBody = false;
|
|
6058
|
+
this.customFooter = false;
|
|
5940
6059
|
this.close = new EventEmitter();
|
|
5941
6060
|
this.hook = ANIMATION_CONSTANTS.DIALOG.HOOK;
|
|
5942
6061
|
}
|
|
@@ -5948,14 +6067,18 @@ class DialogComponent {
|
|
|
5948
6067
|
}
|
|
5949
6068
|
}
|
|
5950
6069
|
DialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5951
|
-
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 });
|
|
6070
|
+
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 });
|
|
5952
6071
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DialogComponent, decorators: [{
|
|
5953
6072
|
type: Component,
|
|
5954
|
-
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"] }]
|
|
6073
|
+
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"] }]
|
|
5955
6074
|
}], propDecorators: { title: [{
|
|
5956
6075
|
type: Input
|
|
5957
6076
|
}], minWidth: [{
|
|
5958
6077
|
type: Input
|
|
6078
|
+
}], customBody: [{
|
|
6079
|
+
type: Input
|
|
6080
|
+
}], customFooter: [{
|
|
6081
|
+
type: Input
|
|
5959
6082
|
}], close: [{
|
|
5960
6083
|
type: Output
|
|
5961
6084
|
}], handleKeydown: [{
|
|
@@ -6210,7 +6333,7 @@ class ViewMenuComponent {
|
|
|
6210
6333
|
}
|
|
6211
6334
|
}
|
|
6212
6335
|
ViewMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ViewMenuComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
6213
|
-
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 });
|
|
6336
|
+
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 });
|
|
6214
6337
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ViewMenuComponent, decorators: [{
|
|
6215
6338
|
type: Component,
|
|
6216
6339
|
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"] }]
|
|
@@ -6478,10 +6601,10 @@ class BannerComponent {
|
|
|
6478
6601
|
}
|
|
6479
6602
|
}
|
|
6480
6603
|
BannerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BannerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6481
|
-
BannerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: BannerComponent, selector: "riv-banner", inputs: { variant: "variant", icon: "icon", iconTooltip: "iconTooltip", heading: "heading", dismissable: "dismissable" }, outputs: { dismiss: "dismiss" }, host: { properties: { "class": "this.variant", "class.has-heading": "this.hasHeading" } }, ngImport: i0, template: "<riv-icon\n *ngIf=\"getResolvedIcon(); let icon\"\n [name]=\"icon\"\n [rivTooltip]=\"iconTooltip\"\n [size]=\"20\"\n class=\"icon\"\n></riv-icon>\n<div *ngIf=\"hasHeading\" class=\"heading\">{{ heading }}</div>\n<div class=\"content\">\n <ng-content></ng-content>\n</div>\n<button *ngIf=\"dismissable\" class=\"dismiss\" (click)=\"dismiss.emit()\">\n <riv-icon [name]=\"'X'\" [size]=\"20\"></riv-icon>\n</button>\n", styles: [":host{display:flex;align-items:flex-start;gap:var(--size-large);padding:var(--size-large);border-radius:var(--border-radius-medium);box-shadow:var(--depth-1);color:var(--type-light-high-contrast);border-left-style:solid;border-left-width:var(--size-small);border-left-color:var(--banner-accent)
|
|
6604
|
+
BannerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: BannerComponent, selector: "riv-banner", inputs: { variant: "variant", icon: "icon", iconTooltip: "iconTooltip", heading: "heading", dismissable: "dismissable" }, outputs: { dismiss: "dismiss" }, host: { properties: { "class": "this.variant", "class.has-heading": "this.hasHeading" } }, ngImport: i0, template: "<riv-icon\n *ngIf=\"getResolvedIcon(); let icon\"\n [name]=\"icon\"\n [rivTooltip]=\"iconTooltip\"\n [size]=\"20\"\n class=\"icon\"\n></riv-icon>\n<div *ngIf=\"hasHeading\" class=\"heading\">{{ heading }}</div>\n<div class=\"content\">\n <ng-content></ng-content>\n</div>\n<button *ngIf=\"dismissable\" class=\"dismiss\" (click)=\"dismiss.emit()\">\n <riv-icon [name]=\"'X'\" [size]=\"20\"></riv-icon>\n</button>\n", styles: [":host{display:flex;align-items:flex-start;gap:var(--size-large);padding:var(--size-large);border-radius:var(--border-radius-medium);box-shadow:var(--depth-1);color:var(--type-light-high-contrast);border-left-style:solid;border-left-width:var(--size-small);border-left-color:var(--banner-accent)}:host .icon{color:var(--banner-accent)}:host.has-heading{display:grid;grid-template-columns:auto 1fr auto;grid-template-areas:\"icon heading close\" \". content .\";column-gap:var(--size-large);row-gap:0;align-items:start}:host.has-heading .icon{grid-area:icon}:host.has-heading .heading{grid-area:heading}:host.has-heading .content{grid-area:content}:host.has-heading .dismiss{grid-area:close}.heading{font:var(--body-medium);font-weight:var(--font-weight-heavy);line-height:var(--type-2-line-height-2)}:host.info{background-color:var(--purp-10);--banner-accent: var(--purp-80)}:host.safety{background-color:var(--safety-light);--banner-accent: var(--safety-dark)}:host.warning{background-color:var(--caution-light);--banner-accent: var(--tang-70)}:host.danger{background-color:var(--danger-light);--banner-accent: var(--danger-main)}.icon{margin:var(--size-xxsmall);flex-shrink:0}.content{flex-grow:1;font:var(--body-medium)}.dismiss{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;padding:var(--size-xxsmall);cursor:pointer;transition:background-color var(--short-transition);border-radius:var(--border-radius-small);color:var(--type-light-high-contrast)}.dismiss:hover{background-color:var(--black-20)}.dismiss:active{background-color:var(--black-30)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconComponent, selector: "riv-icon", inputs: ["name", "fillColor", "size", "customSize", "strokeWidth"] }, { kind: "directive", type: TooltipDirective, selector: "[rivTooltip]", inputs: ["rivTooltip", "rivTooltipTheme", "rivTooltipMaxWidth", "rivTooltipPreferredPosition", "rivTooltipCloseDelay", "rivTooltipOpenDelay"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6482
6605
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BannerComponent, decorators: [{
|
|
6483
6606
|
type: Component,
|
|
6484
|
-
args: [{ selector: 'riv-banner', changeDetection: ChangeDetectionStrategy.OnPush, template: "<riv-icon\n *ngIf=\"getResolvedIcon(); let icon\"\n [name]=\"icon\"\n [rivTooltip]=\"iconTooltip\"\n [size]=\"20\"\n class=\"icon\"\n></riv-icon>\n<div *ngIf=\"hasHeading\" class=\"heading\">{{ heading }}</div>\n<div class=\"content\">\n <ng-content></ng-content>\n</div>\n<button *ngIf=\"dismissable\" class=\"dismiss\" (click)=\"dismiss.emit()\">\n <riv-icon [name]=\"'X'\" [size]=\"20\"></riv-icon>\n</button>\n", styles: [":host{display:flex;align-items:flex-start;gap:var(--size-large);padding:var(--size-large);border-radius:var(--border-radius-medium);box-shadow:var(--depth-1);color:var(--type-light-high-contrast);border-left-style:solid;border-left-width:var(--size-small);border-left-color:var(--banner-accent)
|
|
6607
|
+
args: [{ selector: 'riv-banner', changeDetection: ChangeDetectionStrategy.OnPush, template: "<riv-icon\n *ngIf=\"getResolvedIcon(); let icon\"\n [name]=\"icon\"\n [rivTooltip]=\"iconTooltip\"\n [size]=\"20\"\n class=\"icon\"\n></riv-icon>\n<div *ngIf=\"hasHeading\" class=\"heading\">{{ heading }}</div>\n<div class=\"content\">\n <ng-content></ng-content>\n</div>\n<button *ngIf=\"dismissable\" class=\"dismiss\" (click)=\"dismiss.emit()\">\n <riv-icon [name]=\"'X'\" [size]=\"20\"></riv-icon>\n</button>\n", styles: [":host{display:flex;align-items:flex-start;gap:var(--size-large);padding:var(--size-large);border-radius:var(--border-radius-medium);box-shadow:var(--depth-1);color:var(--type-light-high-contrast);border-left-style:solid;border-left-width:var(--size-small);border-left-color:var(--banner-accent)}:host .icon{color:var(--banner-accent)}:host.has-heading{display:grid;grid-template-columns:auto 1fr auto;grid-template-areas:\"icon heading close\" \". content .\";column-gap:var(--size-large);row-gap:0;align-items:start}:host.has-heading .icon{grid-area:icon}:host.has-heading .heading{grid-area:heading}:host.has-heading .content{grid-area:content}:host.has-heading .dismiss{grid-area:close}.heading{font:var(--body-medium);font-weight:var(--font-weight-heavy);line-height:var(--type-2-line-height-2)}:host.info{background-color:var(--purp-10);--banner-accent: var(--purp-80)}:host.safety{background-color:var(--safety-light);--banner-accent: var(--safety-dark)}:host.warning{background-color:var(--caution-light);--banner-accent: var(--tang-70)}:host.danger{background-color:var(--danger-light);--banner-accent: var(--danger-main)}.icon{margin:var(--size-xxsmall);flex-shrink:0}.content{flex-grow:1;font:var(--body-medium)}.dismiss{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;padding:var(--size-xxsmall);cursor:pointer;transition:background-color var(--short-transition);border-radius:var(--border-radius-small);color:var(--type-light-high-contrast)}.dismiss:hover{background-color:var(--black-20)}.dismiss:active{background-color:var(--black-30)}\n"] }]
|
|
6485
6608
|
}], propDecorators: { variant: [{
|
|
6486
6609
|
type: Input
|
|
6487
6610
|
}, {
|
|
@@ -8631,10 +8754,10 @@ class TableSearchColumnsComponent {
|
|
|
8631
8754
|
}
|
|
8632
8755
|
}
|
|
8633
8756
|
TableSearchColumnsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TableSearchColumnsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8634
|
-
TableSearchColumnsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TableSearchColumnsComponent, selector: "riv-table-search-columns", inputs: { manager: "manager", disabled: "disabled" }, ngImport: i0, template: "<ng-container *ngIf=\"columnList | async; let s\">\n <button #trigger class=\"trigger-button\" (click)=\"open.next(true)\">\n <riv-icon [name]=\"'MoreVertical'\" [size]=\"16\"></riv-icon>\n </button>\n <ng-container *ngIf=\"open | async\">\n <riv-callout\n *riv-overlay\n [anchor]=\"trigger\"\n [showCaret]=\"false\"\n [preferredPosition]=\"'bottom-left'\"\n [theme]=\"'light'\"\n (close)=\"open.next(false)\"\n >\n <div class=\"content-body\">\n <div class=\"header-container\">\n <riv-help\n [size]=\"12\"\n [help]=\"'Toggle which columns are included in table search results'\"\n ></riv-help\n ><span class=\"header-text\">Search in</span>\n </div>\n\n <ng-container\n [ngTemplateOutlet]=\"optionList\"\n [ngTemplateOutletContext]=\"{ columns: s.activeSearchColumns }\"\n ></ng-container>\n\n <div *ngIf=\"s.hiddenSearchColumns.length > 0\" class=\"column-header\">\n Hidden columns\n </div>\n\n <ng-container\n *ngIf=\"s.hiddenSearchColumns.length > 0\"\n [ngTemplateOutlet]=\"optionList\"\n [ngTemplateOutletContext]=\"{ columns: s.hiddenSearchColumns }\"\n ></ng-container>\n\n <ng-template #optionList let-columns=\"columns\">\n <ng-container *ngFor=\"let column of columns\">\n <ng-container\n [ngTemplateOutlet]=\"option\"\n [ngTemplateOutletContext]=\"{ node: column }\"\n ></ng-container>\n </ng-container>\n </ng-template>\n\n <ng-template #option let-node=\"node\">\n <div class=\"node-container\">\n <span class=\"node-text\">{{ node.title }}</span>\n <riv-switch-checkbox\n [size]=\"'small'\"\n [value]=\"node.searchEnabled\"\n [disabled]=\"s.searchEnabledCount === 1 && node.searchEnabled\"\n [rivTooltip]=\"\n s.searchEnabledCount === 1 && node.searchEnabled\n ? 'At least one search field is required'\n : undefined\n \"\n (valueChange)=\"updateColumns(node.id, $event)\"\n ></riv-switch-checkbox>\n </div>\n </ng-template>\n </div>\n </riv-callout>\n </ng-container>\n</ng-container>\n", styles: [".node-container{display:flex;justify-content:space-between;margin:var(--size-small) var(--size-medium)}.node-text{font:var(--input-medium)}.header-container{margin:calc(var(--base-grid-size) * .75) var(--size-medium);padding-bottom:var(--size-small)}.header-text{font:var(--input-medium);margin-left:var(--size-small)}.footer-container{display:flex;justify-content:end}.trigger-button{margin-top:var(--size-small);border-radius:var(--border-radius-small)}.trigger-button:hover{background-color:var(--black-20);cursor:pointer;transition:background-color var(--short-transition)}.column-header{margin:var(--size-small) var(--size-medium);font:var(--input-medium);color:var(--type-light-low-contrast)}.content-body{display:flex;max-height:50vh;overflow-y:auto;flex-direction:column;align-items:stretch;gap:var(--size-small);padding:var(--size-large);min-width:calc(var(--base-grid-size) * 75)}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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: CalloutComponent, selector: "riv-callout", inputs: ["anchor", "isModal", "preferredPosition", "allowedPositions", "fallbackDirection", "showCaret", "theme"], outputs: ["close"] }, { kind: "component", type: HelpComponent, selector: "riv-help", inputs: ["help", "size"] }, { kind: "component", type: IconComponent, selector: "riv-icon", inputs: ["name", "fillColor", "size", "customSize", "strokeWidth"] }, { kind: "directive", type: OverlayDirective, selector: "[riv-overlay]" }, { kind: "component", type: SwitchCheckboxComponent, selector: "riv-switch-checkbox", inputs: ["size"] }, { kind: "directive", type: TooltipDirective, selector: "[rivTooltip]", inputs: ["rivTooltip", "rivTooltipTheme", "rivTooltipMaxWidth", "rivTooltipPreferredPosition", "rivTooltipCloseDelay", "rivTooltipOpenDelay"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8757
|
+
TableSearchColumnsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TableSearchColumnsComponent, selector: "riv-table-search-columns", inputs: { manager: "manager", disabled: "disabled" }, ngImport: i0, template: "<ng-container *ngIf=\"columnList | async; let s\">\n <button #trigger class=\"trigger-button\" (click)=\"open.next(true)\">\n <riv-icon [name]=\"'MoreVertical'\" [size]=\"16\"></riv-icon>\n </button>\n <ng-container *ngIf=\"open | async\">\n <riv-callout\n *riv-overlay\n [anchor]=\"trigger\"\n [showCaret]=\"false\"\n [preferredPosition]=\"'bottom-left'\"\n [theme]=\"'light'\"\n (close)=\"open.next(false)\"\n >\n <div class=\"content-body\">\n <div class=\"header-container\">\n <riv-help\n [size]=\"12\"\n [help]=\"'Toggle which columns are included in table search results'\"\n ></riv-help\n ><span class=\"header-text\">Search in</span>\n </div>\n\n <ng-container\n [ngTemplateOutlet]=\"optionList\"\n [ngTemplateOutletContext]=\"{ columns: s.activeSearchColumns }\"\n ></ng-container>\n\n <div *ngIf=\"s.hiddenSearchColumns.length > 0\" class=\"column-header\">\n Hidden columns\n </div>\n\n <ng-container\n *ngIf=\"s.hiddenSearchColumns.length > 0\"\n [ngTemplateOutlet]=\"optionList\"\n [ngTemplateOutletContext]=\"{ columns: s.hiddenSearchColumns }\"\n ></ng-container>\n\n <ng-template #optionList let-columns=\"columns\">\n <ng-container *ngFor=\"let column of columns\">\n <ng-container\n [ngTemplateOutlet]=\"option\"\n [ngTemplateOutletContext]=\"{ node: column }\"\n ></ng-container>\n </ng-container>\n </ng-template>\n\n <ng-template #option let-node=\"node\">\n <div class=\"node-container\">\n <span class=\"node-text\">{{ node.title }}</span>\n <riv-switch-checkbox\n [size]=\"'small'\"\n [value]=\"node.searchEnabled\"\n [disabled]=\"s.searchEnabledCount === 1 && node.searchEnabled\"\n [rivTooltip]=\"\n s.searchEnabledCount === 1 && node.searchEnabled\n ? 'At least one search field is required'\n : undefined\n \"\n (valueChange)=\"updateColumns(node.id, $event)\"\n ></riv-switch-checkbox>\n </div>\n </ng-template>\n </div>\n </riv-callout>\n </ng-container>\n</ng-container>\n", styles: [".node-container{display:flex;justify-content:space-between;margin:var(--size-small) var(--size-medium)}.node-text{font:var(--input-medium)}.header-container{margin:calc(var(--base-grid-size) * .75) var(--size-medium);padding-bottom:var(--size-small)}.header-text{font:var(--input-medium);margin-left:var(--size-small)}.footer-container{display:flex;justify-content:flex-end}.trigger-button{margin-top:var(--size-small);border-radius:var(--border-radius-small)}.trigger-button:hover{background-color:var(--black-20);cursor:pointer;transition:background-color var(--short-transition)}.column-header{margin:var(--size-small) var(--size-medium);font:var(--input-medium);color:var(--type-light-low-contrast)}.content-body{display:flex;max-height:50vh;overflow-y:auto;flex-direction:column;align-items:stretch;gap:var(--size-small);padding:var(--size-large);min-width:calc(var(--base-grid-size) * 75)}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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: CalloutComponent, selector: "riv-callout", inputs: ["anchor", "isModal", "preferredPosition", "allowedPositions", "fallbackDirection", "showCaret", "theme"], outputs: ["close"] }, { kind: "component", type: HelpComponent, selector: "riv-help", inputs: ["help", "size"] }, { kind: "component", type: IconComponent, selector: "riv-icon", inputs: ["name", "fillColor", "size", "customSize", "strokeWidth"] }, { kind: "directive", type: OverlayDirective, selector: "[riv-overlay]" }, { kind: "component", type: SwitchCheckboxComponent, selector: "riv-switch-checkbox", inputs: ["size"] }, { kind: "directive", type: TooltipDirective, selector: "[rivTooltip]", inputs: ["rivTooltip", "rivTooltipTheme", "rivTooltipMaxWidth", "rivTooltipPreferredPosition", "rivTooltipCloseDelay", "rivTooltipOpenDelay"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8635
8758
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TableSearchColumnsComponent, decorators: [{
|
|
8636
8759
|
type: Component,
|
|
8637
|
-
args: [{ selector: 'riv-table-search-columns', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"columnList | async; let s\">\n <button #trigger class=\"trigger-button\" (click)=\"open.next(true)\">\n <riv-icon [name]=\"'MoreVertical'\" [size]=\"16\"></riv-icon>\n </button>\n <ng-container *ngIf=\"open | async\">\n <riv-callout\n *riv-overlay\n [anchor]=\"trigger\"\n [showCaret]=\"false\"\n [preferredPosition]=\"'bottom-left'\"\n [theme]=\"'light'\"\n (close)=\"open.next(false)\"\n >\n <div class=\"content-body\">\n <div class=\"header-container\">\n <riv-help\n [size]=\"12\"\n [help]=\"'Toggle which columns are included in table search results'\"\n ></riv-help\n ><span class=\"header-text\">Search in</span>\n </div>\n\n <ng-container\n [ngTemplateOutlet]=\"optionList\"\n [ngTemplateOutletContext]=\"{ columns: s.activeSearchColumns }\"\n ></ng-container>\n\n <div *ngIf=\"s.hiddenSearchColumns.length > 0\" class=\"column-header\">\n Hidden columns\n </div>\n\n <ng-container\n *ngIf=\"s.hiddenSearchColumns.length > 0\"\n [ngTemplateOutlet]=\"optionList\"\n [ngTemplateOutletContext]=\"{ columns: s.hiddenSearchColumns }\"\n ></ng-container>\n\n <ng-template #optionList let-columns=\"columns\">\n <ng-container *ngFor=\"let column of columns\">\n <ng-container\n [ngTemplateOutlet]=\"option\"\n [ngTemplateOutletContext]=\"{ node: column }\"\n ></ng-container>\n </ng-container>\n </ng-template>\n\n <ng-template #option let-node=\"node\">\n <div class=\"node-container\">\n <span class=\"node-text\">{{ node.title }}</span>\n <riv-switch-checkbox\n [size]=\"'small'\"\n [value]=\"node.searchEnabled\"\n [disabled]=\"s.searchEnabledCount === 1 && node.searchEnabled\"\n [rivTooltip]=\"\n s.searchEnabledCount === 1 && node.searchEnabled\n ? 'At least one search field is required'\n : undefined\n \"\n (valueChange)=\"updateColumns(node.id, $event)\"\n ></riv-switch-checkbox>\n </div>\n </ng-template>\n </div>\n </riv-callout>\n </ng-container>\n</ng-container>\n", styles: [".node-container{display:flex;justify-content:space-between;margin:var(--size-small) var(--size-medium)}.node-text{font:var(--input-medium)}.header-container{margin:calc(var(--base-grid-size) * .75) var(--size-medium);padding-bottom:var(--size-small)}.header-text{font:var(--input-medium);margin-left:var(--size-small)}.footer-container{display:flex;justify-content:end}.trigger-button{margin-top:var(--size-small);border-radius:var(--border-radius-small)}.trigger-button:hover{background-color:var(--black-20);cursor:pointer;transition:background-color var(--short-transition)}.column-header{margin:var(--size-small) var(--size-medium);font:var(--input-medium);color:var(--type-light-low-contrast)}.content-body{display:flex;max-height:50vh;overflow-y:auto;flex-direction:column;align-items:stretch;gap:var(--size-small);padding:var(--size-large);min-width:calc(var(--base-grid-size) * 75)}\n"] }]
|
|
8760
|
+
args: [{ selector: 'riv-table-search-columns', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"columnList | async; let s\">\n <button #trigger class=\"trigger-button\" (click)=\"open.next(true)\">\n <riv-icon [name]=\"'MoreVertical'\" [size]=\"16\"></riv-icon>\n </button>\n <ng-container *ngIf=\"open | async\">\n <riv-callout\n *riv-overlay\n [anchor]=\"trigger\"\n [showCaret]=\"false\"\n [preferredPosition]=\"'bottom-left'\"\n [theme]=\"'light'\"\n (close)=\"open.next(false)\"\n >\n <div class=\"content-body\">\n <div class=\"header-container\">\n <riv-help\n [size]=\"12\"\n [help]=\"'Toggle which columns are included in table search results'\"\n ></riv-help\n ><span class=\"header-text\">Search in</span>\n </div>\n\n <ng-container\n [ngTemplateOutlet]=\"optionList\"\n [ngTemplateOutletContext]=\"{ columns: s.activeSearchColumns }\"\n ></ng-container>\n\n <div *ngIf=\"s.hiddenSearchColumns.length > 0\" class=\"column-header\">\n Hidden columns\n </div>\n\n <ng-container\n *ngIf=\"s.hiddenSearchColumns.length > 0\"\n [ngTemplateOutlet]=\"optionList\"\n [ngTemplateOutletContext]=\"{ columns: s.hiddenSearchColumns }\"\n ></ng-container>\n\n <ng-template #optionList let-columns=\"columns\">\n <ng-container *ngFor=\"let column of columns\">\n <ng-container\n [ngTemplateOutlet]=\"option\"\n [ngTemplateOutletContext]=\"{ node: column }\"\n ></ng-container>\n </ng-container>\n </ng-template>\n\n <ng-template #option let-node=\"node\">\n <div class=\"node-container\">\n <span class=\"node-text\">{{ node.title }}</span>\n <riv-switch-checkbox\n [size]=\"'small'\"\n [value]=\"node.searchEnabled\"\n [disabled]=\"s.searchEnabledCount === 1 && node.searchEnabled\"\n [rivTooltip]=\"\n s.searchEnabledCount === 1 && node.searchEnabled\n ? 'At least one search field is required'\n : undefined\n \"\n (valueChange)=\"updateColumns(node.id, $event)\"\n ></riv-switch-checkbox>\n </div>\n </ng-template>\n </div>\n </riv-callout>\n </ng-container>\n</ng-container>\n", styles: [".node-container{display:flex;justify-content:space-between;margin:var(--size-small) var(--size-medium)}.node-text{font:var(--input-medium)}.header-container{margin:calc(var(--base-grid-size) * .75) var(--size-medium);padding-bottom:var(--size-small)}.header-text{font:var(--input-medium);margin-left:var(--size-small)}.footer-container{display:flex;justify-content:flex-end}.trigger-button{margin-top:var(--size-small);border-radius:var(--border-radius-small)}.trigger-button:hover{background-color:var(--black-20);cursor:pointer;transition:background-color var(--short-transition)}.column-header{margin:var(--size-small) var(--size-medium);font:var(--input-medium);color:var(--type-light-low-contrast)}.content-body{display:flex;max-height:50vh;overflow-y:auto;flex-direction:column;align-items:stretch;gap:var(--size-small);padding:var(--size-large);min-width:calc(var(--base-grid-size) * 75)}\n"] }]
|
|
8638
8761
|
}], propDecorators: { manager: [{
|
|
8639
8762
|
type: Input
|
|
8640
8763
|
}], disabled: [{
|