@rivet-health/design-system 40.4.0 → 40.5.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/navigation/views/edit-view/edit-view.component.mjs +44 -85
- package/esm2020/lib/navigation/views/permission-picker/permission-picker.component.mjs +151 -0
- package/esm2020/lib/navigation/views/state.mjs +2 -2
- package/esm2020/lib/riv.module.mjs +6 -1
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/rivet-health-design-system.mjs +148 -46
- package/fesm2015/rivet-health-design-system.mjs.map +1 -1
- package/fesm2020/rivet-health-design-system.mjs +154 -46
- package/fesm2020/rivet-health-design-system.mjs.map +1 -1
- package/lib/navigation/views/edit-view/edit-view.component.d.ts +8 -21
- package/lib/navigation/views/permission-picker/permission-picker.component.d.ts +37 -0
- package/lib/navigation/views/state.d.ts +1 -1
- package/lib/riv.module.d.ts +48 -47
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -8,6 +8,7 @@ import { timeFormat, utcFormat } from 'd3-time-format';
|
|
|
8
8
|
import { defaultsDeep, sortBy, isNumber, flattenDeep, debounce, isEqual, cloneDeep, orderBy, range, toInteger, difference, union, sum, uniq } from 'lodash';
|
|
9
9
|
import Fuse from 'fuse.js';
|
|
10
10
|
import { query, style, animate, trigger, transition, group } from '@angular/animations';
|
|
11
|
+
import { map as map$1, distinctUntilChanged as distinctUntilChanged$1 } from 'rxjs/operators';
|
|
11
12
|
import * as i2 from '@angular/router';
|
|
12
13
|
import { RouterModule } from '@angular/router';
|
|
13
14
|
import * as p from 'papaparse';
|
|
@@ -5471,7 +5472,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
5471
5472
|
|
|
5472
5473
|
var RivViews;
|
|
5473
5474
|
(function (RivViews) {
|
|
5474
|
-
RivViews.ViewPermissions = ['private', '
|
|
5475
|
+
RivViews.ViewPermissions = ['private', 'shared', 'public'];
|
|
5475
5476
|
RivViews.MenuContexts = ['tab', 'all-views', 'overflow'];
|
|
5476
5477
|
RivViews.UserSelectModes = ['select', 'search-select'];
|
|
5477
5478
|
function createManager({ source, save, duplicate, userSource, userSelectMode, onAddUser, newTooltip, copyLink, options, setActiveViewId, }) {
|
|
@@ -6109,15 +6110,15 @@ const subtitles = {
|
|
|
6109
6110
|
public: 'Visible to everyone',
|
|
6110
6111
|
shared: 'Only visible to those with access',
|
|
6111
6112
|
};
|
|
6112
|
-
class
|
|
6113
|
+
class PermissionPickerComponent {
|
|
6113
6114
|
constructor(cdr) {
|
|
6114
6115
|
this.cdr = cdr;
|
|
6115
|
-
this.
|
|
6116
|
+
this.permission = 'private';
|
|
6117
|
+
this.sharedUsers = [];
|
|
6116
6118
|
this.userSelectMode = 'select';
|
|
6117
|
-
this.
|
|
6118
|
-
this.
|
|
6119
|
-
this.
|
|
6120
|
-
this.close = new EventEmitter();
|
|
6119
|
+
this.disabledPermissions = [];
|
|
6120
|
+
this.permissionChange = new EventEmitter();
|
|
6121
|
+
this.sharedUsersChange = new EventEmitter();
|
|
6121
6122
|
this.permissionOptions = RivViews.ViewPermissions.map(permission => ({
|
|
6122
6123
|
value: permission,
|
|
6123
6124
|
title: titles[permission],
|
|
@@ -6126,41 +6127,28 @@ class EditViewComponent {
|
|
|
6126
6127
|
this.userOptions = [];
|
|
6127
6128
|
this.selectedUsers = [];
|
|
6128
6129
|
}
|
|
6129
|
-
resetView() {
|
|
6130
|
-
this.editedView = cloneDeep(this.view);
|
|
6131
|
-
this.setUpUserSelectManager();
|
|
6132
|
-
}
|
|
6133
6130
|
ngOnInit() {
|
|
6134
|
-
this.
|
|
6131
|
+
this.setUpUserSelectManager();
|
|
6135
6132
|
}
|
|
6136
6133
|
ngOnChanges(changes) {
|
|
6137
|
-
|
|
6138
|
-
|
|
6134
|
+
// ngOnInit performs the initial setup, so ignore first-change events here.
|
|
6135
|
+
// Rebuild only on a genuine change: a new data source, a mode switch, or a
|
|
6136
|
+
// value-level change to the seeded selection. Comparing sharedUsers by value
|
|
6137
|
+
// (rather than reference) is essential — the parent binds a fresh array each
|
|
6138
|
+
// change-detection cycle, and reacting to that reference churn would rebuild
|
|
6139
|
+
// the manager on every cycle.
|
|
6140
|
+
const userSourceChanged = changes['userSource'] && !changes['userSource'].firstChange;
|
|
6141
|
+
const userSelectModeChanged = changes['userSelectMode'] && !changes['userSelectMode'].firstChange;
|
|
6142
|
+
const sharedUsersChanged = changes['sharedUsers'] &&
|
|
6143
|
+
!changes['sharedUsers'].firstChange &&
|
|
6144
|
+
!isEqual(changes['sharedUsers'].previousValue, changes['sharedUsers'].currentValue);
|
|
6145
|
+
if (userSourceChanged || userSelectModeChanged || sharedUsersChanged) {
|
|
6146
|
+
this.setUpUserSelectManager();
|
|
6139
6147
|
}
|
|
6140
6148
|
}
|
|
6141
6149
|
ngOnDestroy() {
|
|
6142
6150
|
this.tearDownUserSelectManager();
|
|
6143
6151
|
}
|
|
6144
|
-
canEdit() {
|
|
6145
|
-
return this.mode === 'edit';
|
|
6146
|
-
}
|
|
6147
|
-
isClean() {
|
|
6148
|
-
return isEqual(this.editedView, this.view);
|
|
6149
|
-
}
|
|
6150
|
-
titleChange(value) {
|
|
6151
|
-
if (this.editedView)
|
|
6152
|
-
this.editedView.title = value;
|
|
6153
|
-
}
|
|
6154
|
-
permissionChange(value) {
|
|
6155
|
-
if (this.editedView)
|
|
6156
|
-
this.editedView.permission = value;
|
|
6157
|
-
}
|
|
6158
|
-
getSharedUsers(view) {
|
|
6159
|
-
if (RivViews.isSharedView(view)) {
|
|
6160
|
-
return view.sharedUsers;
|
|
6161
|
-
}
|
|
6162
|
-
return [];
|
|
6163
|
-
}
|
|
6164
6152
|
tearDownUserSelectManager() {
|
|
6165
6153
|
this.userSelectSubscription?.unsubscribe();
|
|
6166
6154
|
}
|
|
@@ -6172,7 +6160,7 @@ class EditViewComponent {
|
|
|
6172
6160
|
...u,
|
|
6173
6161
|
new: u.new ?? false,
|
|
6174
6162
|
}));
|
|
6175
|
-
this.selectedUsers = this.
|
|
6163
|
+
this.selectedUsers = this.sharedUsers.map(u => ({
|
|
6176
6164
|
...u,
|
|
6177
6165
|
new: u.new ?? false,
|
|
6178
6166
|
}));
|
|
@@ -6186,23 +6174,37 @@ class EditViewComponent {
|
|
|
6186
6174
|
displayLimit: 500,
|
|
6187
6175
|
initialState: {
|
|
6188
6176
|
selection: {
|
|
6189
|
-
selected: new RivSelect.OptionSet(this.
|
|
6177
|
+
selected: new RivSelect.OptionSet(this.sharedUsers),
|
|
6190
6178
|
},
|
|
6191
6179
|
},
|
|
6192
6180
|
});
|
|
6193
|
-
this.userSelectSubscription = this.userSelectManager.state
|
|
6194
|
-
|
|
6195
|
-
|
|
6181
|
+
this.userSelectSubscription = this.userSelectManager.state
|
|
6182
|
+
.pipe(map$1(state => [...state.selection.selected]), distinctUntilChanged$1(isEqual))
|
|
6183
|
+
.subscribe(users => {
|
|
6184
|
+
// The manager replays its initial (seeded) selection synchronously on
|
|
6185
|
+
// subscribe. Emitting that back would echo the sharedUsers input to
|
|
6186
|
+
// the parent, which mutates its view and feeds a new array reference
|
|
6187
|
+
// straight back into this component — an infinite change-detection
|
|
6188
|
+
// loop. Only propagate genuine, user-driven selection changes.
|
|
6189
|
+
if (!isEqual(users, this.sharedUsers)) {
|
|
6190
|
+
this.sharedUsersChange.emit(users);
|
|
6196
6191
|
}
|
|
6197
6192
|
});
|
|
6198
6193
|
this.userSelectManager.actions.next({ type: 'load' });
|
|
6199
6194
|
}
|
|
6200
6195
|
}
|
|
6196
|
+
onPermissionClick(value) {
|
|
6197
|
+
if (this.isDisabled(value)) {
|
|
6198
|
+
return;
|
|
6199
|
+
}
|
|
6200
|
+
this.permissionChange.emit(value);
|
|
6201
|
+
}
|
|
6202
|
+
isDisabled(permission) {
|
|
6203
|
+
return this.disabledPermissions?.includes(permission) ?? false;
|
|
6204
|
+
}
|
|
6201
6205
|
onSelectedUsersChange(users) {
|
|
6202
6206
|
this.selectedUsers = users;
|
|
6203
|
-
|
|
6204
|
-
this.editedView.sharedUsers = RivViews.toSharedUsers(users);
|
|
6205
|
-
}
|
|
6207
|
+
this.sharedUsersChange.emit(RivViews.toSharedUsers(users));
|
|
6206
6208
|
}
|
|
6207
6209
|
handleAddUser(searchText) {
|
|
6208
6210
|
if (!this.onAddUser)
|
|
@@ -6210,17 +6212,119 @@ class EditViewComponent {
|
|
|
6210
6212
|
const newUser = this.onAddUser(searchText);
|
|
6211
6213
|
this.userOptions = [...this.userOptions, newUser];
|
|
6212
6214
|
this.selectedUsers = [...this.selectedUsers, newUser];
|
|
6215
|
+
this.sharedUsersChange.emit(RivViews.toSharedUsers(this.selectedUsers));
|
|
6216
|
+
this.cdr.markForCheck();
|
|
6217
|
+
}
|
|
6218
|
+
}
|
|
6219
|
+
PermissionPickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PermissionPickerComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
6220
|
+
PermissionPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: PermissionPickerComponent, selector: "riv-permission-picker", inputs: { permission: "permission", sharedUsers: "sharedUsers", userSelectMode: "userSelectMode", userSource: "userSource", onAddUser: "onAddUser", newTooltip: "newTooltip", disabledPermissions: "disabledPermissions" }, outputs: { permissionChange: "permissionChange", sharedUsersChange: "sharedUsersChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"permission-picker\">\n <div class=\"permission-label\">View permissions</div>\n\n <div class=\"permission-options\">\n <button\n *ngFor=\"let option of permissionOptions\"\n class=\"permission-option\"\n [class.current]=\"permission === option.value\"\n [class.disabled]=\"isDisabled(option.value)\"\n type=\"button\"\n [attr.aria-checked]=\"permission === option.value\"\n [attr.aria-label]=\"option.title + ' permission'\"\n [attr.aria-disabled]=\"isDisabled(option.value)\"\n (click)=\"onPermissionClick(option.value)\"\n >\n <div class=\"option-content\">\n <div class=\"option-title\">\n <span>{{ option.title }}</span>\n <span class=\"option-description\">{{ option.subtitle }}</span>\n </div>\n <riv-icon\n *ngIf=\"permission === option.value\"\n class=\"permission-indicator\"\n [name]=\"'Check'\"\n [size]=\"16\"\n ></riv-icon>\n </div>\n <riv-select\n *ngIf=\"\n permission === 'shared' &&\n option.value === 'shared' &&\n userSelectMode === 'select' &&\n userSelectManager\n \"\n [label]=\"'Users with access'\"\n [manager]=\"userSelectManager\"\n ></riv-select>\n <riv-search-select\n *ngIf=\"\n permission === 'shared' &&\n option.value === 'shared' &&\n userSelectMode === 'search-select'\n \"\n (click)=\"$event.stopPropagation()\"\n [label]=\"'Users with access'\"\n [options]=\"userOptions\"\n [selected]=\"selectedUsers\"\n [placeholder]=\"'Search users'\"\n [addNewLabel]=\"'Add'\"\n [newTooltip]=\"newTooltip\"\n (selectedChange)=\"onSelectedUsersChange($event)\"\n (addNew)=\"handleAddUser($event)\"\n ></riv-search-select>\n </button>\n </div>\n</div>\n", styles: [".permission-picker{display:flex;flex-direction:column;gap:var(--size-medium)}.permission-options{display:flex;flex-direction:column}.permission-label{font:var(--title-02)}.permission-option{display:flex;flex-direction:column;gap:var(--size-small);padding:var(--size-small) var(--size-medium);border-radius:var(--border-radius-large);cursor:pointer;text-align:left}.permission-option:hover:not(.disabled){background-color:var(--surface-light-1)}.permission-option:active:not(.disabled),.permission-option.current{background-color:var(--surface-light-2)}.permission-option.disabled{cursor:not-allowed;opacity:.5}.option-content{display:flex;justify-content:space-between;align-items:center}.option-title{font:var(--body-medium);display:flex;flex-direction:column;align-items:flex-start}.option-description{font:var(--body-medium);color:var(--type-light-low-contrast)}.permission-indicator{color:var(--type-light-link)}\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: "component", type: IconComponent, selector: "riv-icon", inputs: ["name", "fillColor", "size", "customSize", "strokeWidth"] }, { kind: "component", type: SearchSelectComponent, selector: "riv-search-select", inputs: ["options", "selected", "placeholder", "addNewLabel", "newTooltip", "size", "disabled", "label", "help", "required", "state", "errorMessage", "optionTemplate", "chipTemplate"], outputs: ["selectedChange", "addNew"] }, { kind: "component", type: SelectComponent, selector: "riv-select", inputs: ["manager", "size", "disabled", "locked", "allowedCalloutPositions", "preferredCalloutPosition"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6221
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PermissionPickerComponent, decorators: [{
|
|
6222
|
+
type: Component,
|
|
6223
|
+
args: [{ selector: 'riv-permission-picker', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"permission-picker\">\n <div class=\"permission-label\">View permissions</div>\n\n <div class=\"permission-options\">\n <button\n *ngFor=\"let option of permissionOptions\"\n class=\"permission-option\"\n [class.current]=\"permission === option.value\"\n [class.disabled]=\"isDisabled(option.value)\"\n type=\"button\"\n [attr.aria-checked]=\"permission === option.value\"\n [attr.aria-label]=\"option.title + ' permission'\"\n [attr.aria-disabled]=\"isDisabled(option.value)\"\n (click)=\"onPermissionClick(option.value)\"\n >\n <div class=\"option-content\">\n <div class=\"option-title\">\n <span>{{ option.title }}</span>\n <span class=\"option-description\">{{ option.subtitle }}</span>\n </div>\n <riv-icon\n *ngIf=\"permission === option.value\"\n class=\"permission-indicator\"\n [name]=\"'Check'\"\n [size]=\"16\"\n ></riv-icon>\n </div>\n <riv-select\n *ngIf=\"\n permission === 'shared' &&\n option.value === 'shared' &&\n userSelectMode === 'select' &&\n userSelectManager\n \"\n [label]=\"'Users with access'\"\n [manager]=\"userSelectManager\"\n ></riv-select>\n <riv-search-select\n *ngIf=\"\n permission === 'shared' &&\n option.value === 'shared' &&\n userSelectMode === 'search-select'\n \"\n (click)=\"$event.stopPropagation()\"\n [label]=\"'Users with access'\"\n [options]=\"userOptions\"\n [selected]=\"selectedUsers\"\n [placeholder]=\"'Search users'\"\n [addNewLabel]=\"'Add'\"\n [newTooltip]=\"newTooltip\"\n (selectedChange)=\"onSelectedUsersChange($event)\"\n (addNew)=\"handleAddUser($event)\"\n ></riv-search-select>\n </button>\n </div>\n</div>\n", styles: [".permission-picker{display:flex;flex-direction:column;gap:var(--size-medium)}.permission-options{display:flex;flex-direction:column}.permission-label{font:var(--title-02)}.permission-option{display:flex;flex-direction:column;gap:var(--size-small);padding:var(--size-small) var(--size-medium);border-radius:var(--border-radius-large);cursor:pointer;text-align:left}.permission-option:hover:not(.disabled){background-color:var(--surface-light-1)}.permission-option:active:not(.disabled),.permission-option.current{background-color:var(--surface-light-2)}.permission-option.disabled{cursor:not-allowed;opacity:.5}.option-content{display:flex;justify-content:space-between;align-items:center}.option-title{font:var(--body-medium);display:flex;flex-direction:column;align-items:flex-start}.option-description{font:var(--body-medium);color:var(--type-light-low-contrast)}.permission-indicator{color:var(--type-light-link)}\n"] }]
|
|
6224
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { permission: [{
|
|
6225
|
+
type: Input
|
|
6226
|
+
}], sharedUsers: [{
|
|
6227
|
+
type: Input
|
|
6228
|
+
}], userSelectMode: [{
|
|
6229
|
+
type: Input
|
|
6230
|
+
}], userSource: [{
|
|
6231
|
+
type: Input
|
|
6232
|
+
}], onAddUser: [{
|
|
6233
|
+
type: Input
|
|
6234
|
+
}], newTooltip: [{
|
|
6235
|
+
type: Input
|
|
6236
|
+
}], disabledPermissions: [{
|
|
6237
|
+
type: Input
|
|
6238
|
+
}], permissionChange: [{
|
|
6239
|
+
type: Output
|
|
6240
|
+
}], sharedUsersChange: [{
|
|
6241
|
+
type: Output
|
|
6242
|
+
}] } });
|
|
6243
|
+
|
|
6244
|
+
class EditViewComponent {
|
|
6245
|
+
constructor(cdr) {
|
|
6246
|
+
this.cdr = cdr;
|
|
6247
|
+
this.autoSelectName = false;
|
|
6248
|
+
this.userSelectMode = 'select';
|
|
6249
|
+
this.mode = 'edit';
|
|
6250
|
+
this.save = new EventEmitter();
|
|
6251
|
+
this.delete = new EventEmitter();
|
|
6252
|
+
this.close = new EventEmitter();
|
|
6253
|
+
}
|
|
6254
|
+
resetView() {
|
|
6255
|
+
this.editedView = cloneDeep(this.view);
|
|
6256
|
+
}
|
|
6257
|
+
ngOnInit() {
|
|
6258
|
+
this.resetView();
|
|
6259
|
+
}
|
|
6260
|
+
ngOnChanges(changes) {
|
|
6261
|
+
if (changes['view']) {
|
|
6262
|
+
this.resetView();
|
|
6263
|
+
}
|
|
6264
|
+
}
|
|
6265
|
+
canEdit() {
|
|
6266
|
+
return this.mode === 'edit';
|
|
6267
|
+
}
|
|
6268
|
+
isClean() {
|
|
6269
|
+
return isEqual(this.editedView, this.view);
|
|
6270
|
+
}
|
|
6271
|
+
titleChange(value) {
|
|
6272
|
+
if (this.editedView)
|
|
6273
|
+
this.editedView.title = value;
|
|
6274
|
+
// These handlers fire from the permission picker / text field, which render
|
|
6275
|
+
// in the overlay outlet's change-detection subtree — a different branch than
|
|
6276
|
+
// this OnPush component. Without markForCheck the updated editedView never
|
|
6277
|
+
// flows back into the child input bindings (e.g. the highlighted option).
|
|
6278
|
+
this.cdr.markForCheck();
|
|
6279
|
+
}
|
|
6280
|
+
onPermissionChange(value) {
|
|
6281
|
+
if (!this.editedView)
|
|
6282
|
+
return;
|
|
6283
|
+
if (value === 'shared') {
|
|
6284
|
+
if (!RivViews.isSharedView(this.editedView)) {
|
|
6285
|
+
this.editedView = {
|
|
6286
|
+
...this.editedView,
|
|
6287
|
+
permission: 'shared',
|
|
6288
|
+
sharedUsers: [],
|
|
6289
|
+
};
|
|
6290
|
+
}
|
|
6291
|
+
}
|
|
6292
|
+
else {
|
|
6293
|
+
if (RivViews.isSharedView(this.editedView)) {
|
|
6294
|
+
const { sharedUsers, ...rest } = this.editedView;
|
|
6295
|
+
this.editedView = {
|
|
6296
|
+
...rest,
|
|
6297
|
+
permission: value,
|
|
6298
|
+
};
|
|
6299
|
+
}
|
|
6300
|
+
else {
|
|
6301
|
+
this.editedView.permission = value;
|
|
6302
|
+
}
|
|
6303
|
+
}
|
|
6304
|
+
this.cdr.markForCheck();
|
|
6305
|
+
}
|
|
6306
|
+
onSharedUsersChange(users) {
|
|
6213
6307
|
if (RivViews.isSharedView(this.editedView)) {
|
|
6214
|
-
this.editedView.sharedUsers =
|
|
6308
|
+
this.editedView.sharedUsers = users;
|
|
6215
6309
|
}
|
|
6216
6310
|
this.cdr.markForCheck();
|
|
6217
6311
|
}
|
|
6312
|
+
getSharedUsers(view) {
|
|
6313
|
+
if (RivViews.isSharedView(view)) {
|
|
6314
|
+
return view.sharedUsers;
|
|
6315
|
+
}
|
|
6316
|
+
return EditViewComponent.NO_SHARED_USERS;
|
|
6317
|
+
}
|
|
6218
6318
|
}
|
|
6319
|
+
// Stable empty-array reference for the non-shared branch, so this getter
|
|
6320
|
+
// doesn't hand the permission picker a fresh [] on every change-detection
|
|
6321
|
+
// cycle (which would churn its @Input and trigger needless work).
|
|
6322
|
+
EditViewComponent.NO_SHARED_USERS = [];
|
|
6219
6323
|
EditViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EditViewComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
6220
|
-
EditViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: EditViewComponent, selector: "riv-edit-view", inputs: { anchor: "anchor", autoSelectName: "autoSelectName", view: "view", userSource: "userSource", userSelectMode: "userSelectMode", onAddUser: "onAddUser", newTooltip: "newTooltip", mode: "mode" }, outputs: { save: "save", delete: "delete", close: "close" }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"editedView; let ev\">\n <riv-callout\n *riv-overlay\n [anchor]=\"anchor ?? null\"\n [isModal]=\"true\"\n [showCaret]=\"false\"\n [theme]=\"'light'\"\n [preferredPosition]=\"'bottom-right'\"\n [fallbackDirection]=\"'clockwise'\"\n (close)=\"close.emit()\"\n >\n <div class=\"edit-view\">\n <div class=\"name-input\">\n <span class=\"name-label\">Name * </span>\n <riv-text-field\n [autoFocus]=\"autoSelectName ? 'select' : false\"\n [value]=\"ev.title ?? ''\"\n (valueChange)=\"titleChange($event)\"\n ></riv-text-field>\n </div>\n\n <hr class=\"divider\" />\n\n <
|
|
6324
|
+
EditViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: EditViewComponent, selector: "riv-edit-view", inputs: { anchor: "anchor", autoSelectName: "autoSelectName", view: "view", userSource: "userSource", userSelectMode: "userSelectMode", onAddUser: "onAddUser", newTooltip: "newTooltip", mode: "mode" }, outputs: { save: "save", delete: "delete", close: "close" }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"editedView; let ev\">\n <riv-callout\n *riv-overlay\n [anchor]=\"anchor ?? null\"\n [isModal]=\"true\"\n [showCaret]=\"false\"\n [theme]=\"'light'\"\n [preferredPosition]=\"'bottom-right'\"\n [fallbackDirection]=\"'clockwise'\"\n (close)=\"close.emit()\"\n >\n <div class=\"edit-view\">\n <div class=\"name-input\">\n <span class=\"name-label\">Name * </span>\n <riv-text-field\n [autoFocus]=\"autoSelectName ? 'select' : false\"\n [value]=\"ev.title ?? ''\"\n (valueChange)=\"titleChange($event)\"\n ></riv-text-field>\n </div>\n\n <hr class=\"divider\" />\n\n <riv-permission-picker\n [permission]=\"ev.permission\"\n [sharedUsers]=\"getSharedUsers(ev)\"\n [userSelectMode]=\"userSelectMode\"\n [userSource]=\"userSource\"\n [onAddUser]=\"onAddUser\"\n [newTooltip]=\"newTooltip\"\n (permissionChange)=\"onPermissionChange($event)\"\n (sharedUsersChange)=\"onSharedUsersChange($event)\"\n ></riv-permission-picker>\n\n <hr class=\"divider\" />\n\n <div class=\"actions\">\n <button\n rivButton\n [variant]=\"'ghost'\"\n [icon]=\"'Trash2'\"\n (click)=\"delete.emit(ev); close.emit()\"\n *ngIf=\"canEdit()\"\n >\n Delete\n </button>\n\n <div class=\"actions-spacer\"></div>\n\n <div class=\"primary-actions\">\n <button rivButton [variant]=\"'ghost'\" (click)=\"close.emit()\">\n Cancel\n </button>\n <button\n rivButton\n [variant]=\"'primary'\"\n [disabled]=\"canEdit() && isClean()\"\n (click)=\"save.emit(ev); close.emit()\"\n >\n Save\n </button>\n </div>\n </div>\n </div>\n </riv-callout>\n</ng-container>\n", styles: [".edit-view{padding:var(--size-large);display:flex;flex-direction:column;gap:var(--size-large);width:calc(var(--base-grid-size) * 104);max-width:50vw;max-height:80vh;overflow-y:auto}.divider{height:var(--border-width);background-color:var(--border-light);border:0;width:100%}.name-label{font:var(--title-02)}.name-input{display:flex;flex-direction:column;gap:var(--size-small)}.actions{display:flex;justify-content:space-between;align-items:center}.actions-spacer{flex-grow:1}.primary-actions{display:flex;align-items:center;gap:var(--size-small)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "[rivButton]", inputs: ["locked", "disabled", "loading", "full", "size", "variant", "icon", "iconPosition", "current"] }, { kind: "component", type: CalloutComponent, selector: "riv-callout", inputs: ["anchor", "isModal", "preferredPosition", "allowedPositions", "fallbackDirection", "showCaret", "theme"], outputs: ["close"] }, { kind: "directive", type: OverlayDirective, selector: "[riv-overlay]" }, { kind: "component", type: PermissionPickerComponent, selector: "riv-permission-picker", inputs: ["permission", "sharedUsers", "userSelectMode", "userSource", "onAddUser", "newTooltip", "disabledPermissions"], outputs: ["permissionChange", "sharedUsersChange"] }, { kind: "component", type: TextFieldComponent, selector: "riv-text-field", inputs: ["disabled", "readonly", "placeholder", "casing", "type", "size", "autoFocus", "name", "minLength", "maxLength", "value"], outputs: ["valueChange", "blur"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6221
6325
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: EditViewComponent, decorators: [{
|
|
6222
6326
|
type: Component,
|
|
6223
|
-
args: [{ selector: 'riv-edit-view', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"editedView; let ev\">\n <riv-callout\n *riv-overlay\n [anchor]=\"anchor ?? null\"\n [isModal]=\"true\"\n [showCaret]=\"false\"\n [theme]=\"'light'\"\n [preferredPosition]=\"'bottom-right'\"\n [fallbackDirection]=\"'clockwise'\"\n (close)=\"close.emit()\"\n >\n <div class=\"edit-view\">\n <div class=\"name-input\">\n <span class=\"name-label\">Name * </span>\n <riv-text-field\n [autoFocus]=\"autoSelectName ? 'select' : false\"\n [value]=\"ev.title ?? ''\"\n (valueChange)=\"titleChange($event)\"\n ></riv-text-field>\n </div>\n\n <hr class=\"divider\" />\n\n <
|
|
6327
|
+
args: [{ selector: 'riv-edit-view', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"editedView; let ev\">\n <riv-callout\n *riv-overlay\n [anchor]=\"anchor ?? null\"\n [isModal]=\"true\"\n [showCaret]=\"false\"\n [theme]=\"'light'\"\n [preferredPosition]=\"'bottom-right'\"\n [fallbackDirection]=\"'clockwise'\"\n (close)=\"close.emit()\"\n >\n <div class=\"edit-view\">\n <div class=\"name-input\">\n <span class=\"name-label\">Name * </span>\n <riv-text-field\n [autoFocus]=\"autoSelectName ? 'select' : false\"\n [value]=\"ev.title ?? ''\"\n (valueChange)=\"titleChange($event)\"\n ></riv-text-field>\n </div>\n\n <hr class=\"divider\" />\n\n <riv-permission-picker\n [permission]=\"ev.permission\"\n [sharedUsers]=\"getSharedUsers(ev)\"\n [userSelectMode]=\"userSelectMode\"\n [userSource]=\"userSource\"\n [onAddUser]=\"onAddUser\"\n [newTooltip]=\"newTooltip\"\n (permissionChange)=\"onPermissionChange($event)\"\n (sharedUsersChange)=\"onSharedUsersChange($event)\"\n ></riv-permission-picker>\n\n <hr class=\"divider\" />\n\n <div class=\"actions\">\n <button\n rivButton\n [variant]=\"'ghost'\"\n [icon]=\"'Trash2'\"\n (click)=\"delete.emit(ev); close.emit()\"\n *ngIf=\"canEdit()\"\n >\n Delete\n </button>\n\n <div class=\"actions-spacer\"></div>\n\n <div class=\"primary-actions\">\n <button rivButton [variant]=\"'ghost'\" (click)=\"close.emit()\">\n Cancel\n </button>\n <button\n rivButton\n [variant]=\"'primary'\"\n [disabled]=\"canEdit() && isClean()\"\n (click)=\"save.emit(ev); close.emit()\"\n >\n Save\n </button>\n </div>\n </div>\n </div>\n </riv-callout>\n</ng-container>\n", styles: [".edit-view{padding:var(--size-large);display:flex;flex-direction:column;gap:var(--size-large);width:calc(var(--base-grid-size) * 104);max-width:50vw;max-height:80vh;overflow-y:auto}.divider{height:var(--border-width);background-color:var(--border-light);border:0;width:100%}.name-label{font:var(--title-02)}.name-input{display:flex;flex-direction:column;gap:var(--size-small)}.actions{display:flex;justify-content:space-between;align-items:center}.actions-spacer{flex-grow:1}.primary-actions{display:flex;align-items:center;gap:var(--size-small)}\n"] }]
|
|
6224
6328
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { anchor: [{
|
|
6225
6329
|
type: Input
|
|
6226
6330
|
}], autoSelectName: [{
|
|
@@ -15161,6 +15265,7 @@ RivModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
|
15161
15265
|
PageHeaderComponent,
|
|
15162
15266
|
PercentageFieldComponent,
|
|
15163
15267
|
PercentagePipe,
|
|
15268
|
+
PermissionPickerComponent,
|
|
15164
15269
|
PhoneFieldComponent,
|
|
15165
15270
|
ProgressComponent,
|
|
15166
15271
|
RadioComponent,
|
|
@@ -15256,6 +15361,7 @@ RivModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
|
15256
15361
|
PageHeaderComponent,
|
|
15257
15362
|
PercentageFieldComponent,
|
|
15258
15363
|
PercentagePipe,
|
|
15364
|
+
PermissionPickerComponent,
|
|
15259
15365
|
PhoneFieldComponent,
|
|
15260
15366
|
ProgressComponent,
|
|
15261
15367
|
RadioComponent,
|
|
@@ -15357,6 +15463,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
15357
15463
|
PageHeaderComponent,
|
|
15358
15464
|
PercentageFieldComponent,
|
|
15359
15465
|
PercentagePipe,
|
|
15466
|
+
PermissionPickerComponent,
|
|
15360
15467
|
PhoneFieldComponent,
|
|
15361
15468
|
ProgressComponent,
|
|
15362
15469
|
RadioComponent,
|
|
@@ -15455,6 +15562,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
15455
15562
|
PageHeaderComponent,
|
|
15456
15563
|
PercentageFieldComponent,
|
|
15457
15564
|
PercentagePipe,
|
|
15565
|
+
PermissionPickerComponent,
|
|
15458
15566
|
PhoneFieldComponent,
|
|
15459
15567
|
ProgressComponent,
|
|
15460
15568
|
RadioComponent,
|
|
@@ -15506,5 +15614,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
15506
15614
|
* Generated bundle index. Do not edit.
|
|
15507
15615
|
*/
|
|
15508
15616
|
|
|
15509
|
-
export { ANIMATION_CONSTANTS, AllViewsModalComponent, AlphabeticFieldComponent, AutoFocusDirective, BadgeComponent, BannerActionComponent, BannerComponent, ButtonComponent, ButtonGroupComponent, CalloutComponent, CardCheckboxComponent, Chart, ChartComponent, CheckboxComponent, CurrencyFieldComponent, DataTableCellComponent, DataTableComponent, DataTableHeaderCellComponent, DataTableRowComponent, DateComponent, DatePipe, DateRangeComponent, DaysPipe, DialogComponent, DollarsPipe, DonutComponent, DownloadService, EditViewComponent, FunnelChartComponent, HelpComponent, HighlightComponent, IconComponent, InputLabelComponent, IssueComponent, LegendItemComponent, LinkComponent, LoadingComponent, LoadingCoverComponent, LockedTooltipDirective, MapIndicatorComponent, MentionsInputComponent, MenuComponent, MenuItemComponent, MetricComponent, MiniPieComponent, ModalComponent, NotificationBadgeComponent, NumberFieldComponent, NumberPipe, OptionGroupPipe, OverlayDirective, OverlayOutletComponent, PageHeaderComponent, PercentageFieldComponent, PercentagePipe, PhoneFieldComponent, ProgressComponent, RadioComponent, RivModule, RivSelect, RivTable, RivViews, SVGTextTruncateDirective, SearchComponent, SearchSelectComponent, SelectComponent, SelectNodeComponent, SentenceCasePipe, SideSheetComponent, SimpleSelectComponent, SimpleTableCellComponent, SimpleTableComponent, SimpleTableHeaderCellComponent, SimpleTableRowComponent, SizeDirective, SmallCurrencyPipe, SrOnlyComponent, StackedColumnComponent, StackedRowComponent, SwitchCheckboxComponent, TabComponent, TableColumnSettingsComponent, TableColumnSettingsSideSheetComponent, TableComponent, TableCsvExportComponent, TableSearchColumnsComponent, TableSearchComponent, TabsComponent, TextFieldComponent, TextareaFieldComponent, TimeSeriesComponent, ToastActionComponent, ToastComponent, TooltipComponent, TooltipDirective, TrendComponent, TruncateComponent, ValidationMessageComponent, ViewMenuComponent, ViewsComponent, VisibilityDirective, ZeroStateComponent, toSentenceCase };
|
|
15617
|
+
export { ANIMATION_CONSTANTS, AllViewsModalComponent, AlphabeticFieldComponent, AutoFocusDirective, BadgeComponent, BannerActionComponent, BannerComponent, ButtonComponent, ButtonGroupComponent, CalloutComponent, CardCheckboxComponent, Chart, ChartComponent, CheckboxComponent, CurrencyFieldComponent, DataTableCellComponent, DataTableComponent, DataTableHeaderCellComponent, DataTableRowComponent, DateComponent, DatePipe, DateRangeComponent, DaysPipe, DialogComponent, DollarsPipe, DonutComponent, DownloadService, EditViewComponent, FunnelChartComponent, HelpComponent, HighlightComponent, IconComponent, InputLabelComponent, IssueComponent, LegendItemComponent, LinkComponent, LoadingComponent, LoadingCoverComponent, LockedTooltipDirective, MapIndicatorComponent, MentionsInputComponent, MenuComponent, MenuItemComponent, MetricComponent, MiniPieComponent, ModalComponent, NotificationBadgeComponent, NumberFieldComponent, NumberPipe, OptionGroupPipe, OverlayDirective, OverlayOutletComponent, PageHeaderComponent, PercentageFieldComponent, PercentagePipe, PermissionPickerComponent, PhoneFieldComponent, ProgressComponent, RadioComponent, RivModule, RivSelect, RivTable, RivViews, SVGTextTruncateDirective, SearchComponent, SearchSelectComponent, SelectComponent, SelectNodeComponent, SentenceCasePipe, SideSheetComponent, SimpleSelectComponent, SimpleTableCellComponent, SimpleTableComponent, SimpleTableHeaderCellComponent, SimpleTableRowComponent, SizeDirective, SmallCurrencyPipe, SrOnlyComponent, StackedColumnComponent, StackedRowComponent, SwitchCheckboxComponent, TabComponent, TableColumnSettingsComponent, TableColumnSettingsSideSheetComponent, TableComponent, TableCsvExportComponent, TableSearchColumnsComponent, TableSearchComponent, TabsComponent, TextFieldComponent, TextareaFieldComponent, TimeSeriesComponent, ToastActionComponent, ToastComponent, TooltipComponent, TooltipDirective, TrendComponent, TruncateComponent, ValidationMessageComponent, ViewMenuComponent, ViewsComponent, VisibilityDirective, ZeroStateComponent, toSentenceCase };
|
|
15510
15618
|
//# sourceMappingURL=rivet-health-design-system.mjs.map
|