@memberjunction/ng-list-management 6.1.4 → 6.2.0-edge.1
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/dist/lib/components/audience-source-picker/audience-source-picker.component.d.ts +74 -14
- package/dist/lib/components/audience-source-picker/audience-source-picker.component.d.ts.map +1 -1
- package/dist/lib/components/audience-source-picker/audience-source-picker.component.js +177 -57
- package/dist/lib/components/audience-source-picker/audience-source-picker.component.js.map +1 -1
- package/dist/lib/components/audience-source-summary/audience-source-summary.component.d.ts +7 -1
- package/dist/lib/components/audience-source-summary/audience-source-summary.component.d.ts.map +1 -1
- package/dist/lib/components/audience-source-summary/audience-source-summary.component.js +17 -5
- package/dist/lib/components/audience-source-summary/audience-source-summary.component.js.map +1 -1
- package/dist/lib/components/list-audit-log/list-audit-log.component.d.ts +30 -4
- package/dist/lib/components/list-audit-log/list-audit-log.component.d.ts.map +1 -1
- package/dist/lib/components/list-audit-log/list-audit-log.component.js +54 -14
- package/dist/lib/components/list-audit-log/list-audit-log.component.js.map +1 -1
- package/dist/lib/components/list-delta-confirm/list-delta-confirm.component.d.ts +17 -1
- package/dist/lib/components/list-delta-confirm/list-delta-confirm.component.d.ts.map +1 -1
- package/dist/lib/components/list-delta-confirm/list-delta-confirm.component.js +45 -13
- package/dist/lib/components/list-delta-confirm/list-delta-confirm.component.js.map +1 -1
- package/dist/lib/components/list-invitations/list-invitations.component.d.ts +48 -8
- package/dist/lib/components/list-invitations/list-invitations.component.d.ts.map +1 -1
- package/dist/lib/components/list-invitations/list-invitations.component.js +108 -28
- package/dist/lib/components/list-invitations/list-invitations.component.js.map +1 -1
- package/dist/lib/components/list-management-dialog/list-management-dialog.component.d.ts +123 -15
- package/dist/lib/components/list-management-dialog/list-management-dialog.component.d.ts.map +1 -1
- package/dist/lib/components/list-management-dialog/list-management-dialog.component.js +312 -100
- package/dist/lib/components/list-management-dialog/list-management-dialog.component.js.map +1 -1
- package/dist/lib/components/list-share-dialog/list-share-dialog.component.d.ts +128 -14
- package/dist/lib/components/list-share-dialog/list-share-dialog.component.d.ts.map +1 -1
- package/dist/lib/components/list-share-dialog/list-share-dialog.component.js +288 -92
- package/dist/lib/components/list-share-dialog/list-share-dialog.component.js.map +1 -1
- package/dist/lib/components/list-stats/list-stats.component.d.ts +32 -6
- package/dist/lib/components/list-stats/list-stats.component.d.ts.map +1 -1
- package/dist/lib/components/list-stats/list-stats.component.js +67 -15
- package/dist/lib/components/list-stats/list-stats.component.js.map +1 -1
- package/dist/lib/components/save-view-as-list-dialog/save-view-as-list-dialog.component.d.ts +44 -8
- package/dist/lib/components/save-view-as-list-dialog/save-view-as-list-dialog.component.d.ts.map +1 -1
- package/dist/lib/components/save-view-as-list-dialog/save-view-as-list-dialog.component.js +100 -28
- package/dist/lib/components/save-view-as-list-dialog/save-view-as-list-dialog.component.js.map +1 -1
- package/dist/lib/components/shared-with-me/shared-with-me.component.d.ts +18 -2
- package/dist/lib/components/shared-with-me/shared-with-me.component.d.ts.map +1 -1
- package/dist/lib/components/shared-with-me/shared-with-me.component.js +41 -9
- package/dist/lib/components/shared-with-me/shared-with-me.component.js.map +1 -1
- package/dist/lib/components/tag-chips/tag-chips.component.d.ts +30 -6
- package/dist/lib/components/tag-chips/tag-chips.component.d.ts.map +1 -1
- package/dist/lib/components/tag-chips/tag-chips.component.js +76 -28
- package/dist/lib/components/tag-chips/tag-chips.component.js.map +1 -1
- package/dist/lib/services/list-management.service.d.ts +25 -1
- package/dist/lib/services/list-management.service.d.ts.map +1 -1
- package/dist/lib/services/list-management.service.js +59 -11
- package/dist/lib/services/list-management.service.js.map +1 -1
- package/dist/lib/services/list-sharing.service.d.ts +42 -1
- package/dist/lib/services/list-sharing.service.d.ts.map +1 -1
- package/dist/lib/services/list-sharing.service.js +85 -17
- package/dist/lib/services/list-sharing.service.js.map +1 -1
- package/package.json +11 -11
|
@@ -330,27 +330,43 @@ export class ListShareDialogComponent extends BaseAngularComponent {
|
|
|
330
330
|
*/
|
|
331
331
|
get EmptyShareMessage() {
|
|
332
332
|
const base = "This list hasn't been shared with anyone yet.";
|
|
333
|
-
return this.
|
|
333
|
+
return this.CanModifyShares
|
|
334
334
|
? `${base} Use the search above to find users or roles to share with.`
|
|
335
335
|
: base;
|
|
336
336
|
}
|
|
337
337
|
/**
|
|
338
338
|
* Controls dialog visibility
|
|
339
339
|
*/
|
|
340
|
-
get
|
|
340
|
+
get Visible() {
|
|
341
341
|
return this._visible;
|
|
342
342
|
}
|
|
343
|
-
set
|
|
343
|
+
set Visible(value) {
|
|
344
344
|
if (value && !this._visible) {
|
|
345
345
|
this.initializeDialog();
|
|
346
346
|
}
|
|
347
347
|
this._visible = value;
|
|
348
348
|
}
|
|
349
|
+
/** @deprecated Use {@link Visible}. */
|
|
350
|
+
get visible() {
|
|
351
|
+
return this.Visible;
|
|
352
|
+
}
|
|
353
|
+
/** @deprecated Use {@link Visible}. */
|
|
354
|
+
set visible(value) {
|
|
355
|
+
this.Visible = value;
|
|
356
|
+
}
|
|
349
357
|
_visible = false;
|
|
350
358
|
/**
|
|
351
359
|
* Emitted when dialog is closed with results
|
|
352
360
|
*/
|
|
353
|
-
|
|
361
|
+
Complete = new EventEmitter();
|
|
362
|
+
/**
|
|
363
|
+
* @deprecated Use {@link Complete}.
|
|
364
|
+
*
|
|
365
|
+
* The same emitter under the old binding name, so a template still binding
|
|
366
|
+
* (complete) keeps working. Must stay AFTER Complete: class fields
|
|
367
|
+
* initialise in order, and the other way round this captures undefined.
|
|
368
|
+
*/
|
|
369
|
+
complete = this.Complete;
|
|
354
370
|
/**
|
|
355
371
|
* Emitted when dialog is cancelled
|
|
356
372
|
*/
|
|
@@ -359,40 +375,160 @@ export class ListShareDialogComponent extends BaseAngularComponent {
|
|
|
359
375
|
* Emitted when the user clicks "Manage Invitations" in the footer.
|
|
360
376
|
* Phase 2: opens the invitations management UI for this list.
|
|
361
377
|
*/
|
|
362
|
-
|
|
378
|
+
ManageInvitations = new EventEmitter();
|
|
379
|
+
/**
|
|
380
|
+
* @deprecated Use {@link ManageInvitations}.
|
|
381
|
+
*
|
|
382
|
+
* The same emitter under the old binding name, so a template still binding
|
|
383
|
+
* (manageInvitations) keeps working. Must stay AFTER ManageInvitations: class fields
|
|
384
|
+
* initialise in order, and the other way round this captures undefined.
|
|
385
|
+
*/
|
|
386
|
+
manageInvitations = this.ManageInvitations;
|
|
363
387
|
/**
|
|
364
388
|
* Emitted when the user clicks "View audit log" in the footer.
|
|
365
389
|
* Phase 2: opens the per-list audit log view.
|
|
366
390
|
*/
|
|
367
|
-
|
|
391
|
+
ViewAuditLog = new EventEmitter();
|
|
392
|
+
/**
|
|
393
|
+
* @deprecated Use {@link ViewAuditLog}.
|
|
394
|
+
*
|
|
395
|
+
* The same emitter under the old binding name, so a template still binding
|
|
396
|
+
* (viewAuditLog) keeps working. Must stay AFTER ViewAuditLog: class fields
|
|
397
|
+
* initialise in order, and the other way round this captures undefined.
|
|
398
|
+
*/
|
|
399
|
+
viewAuditLog = this.ViewAuditLog;
|
|
368
400
|
/**
|
|
369
401
|
* When true (the default), newly-added shares fan out as notifications
|
|
370
402
|
* to the recipient (email + in-app, depending on user preferences).
|
|
371
403
|
* The state is captured on the dialog so consumers can read it back
|
|
372
404
|
* via `ListShareDialogResult.notifyByEmail`.
|
|
373
405
|
*/
|
|
374
|
-
|
|
406
|
+
NotifyByEmail = true;
|
|
407
|
+
/** @deprecated Use {@link NotifyByEmail}. */
|
|
408
|
+
get notifyByEmail() {
|
|
409
|
+
return this.NotifyByEmail;
|
|
410
|
+
}
|
|
411
|
+
/** @deprecated Use {@link NotifyByEmail}. */
|
|
412
|
+
set notifyByEmail(value) {
|
|
413
|
+
this.NotifyByEmail = value;
|
|
414
|
+
}
|
|
375
415
|
// State
|
|
376
|
-
|
|
416
|
+
Loading = false;
|
|
417
|
+
/** @deprecated Use {@link Loading}. */
|
|
418
|
+
get loading() {
|
|
419
|
+
return this.Loading;
|
|
420
|
+
}
|
|
421
|
+
/** @deprecated Use {@link Loading}. */
|
|
422
|
+
set loading(value) {
|
|
423
|
+
this.Loading = value;
|
|
424
|
+
}
|
|
377
425
|
saving = false;
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
426
|
+
SearchText = '';
|
|
427
|
+
/** @deprecated Use {@link SearchText}. */
|
|
428
|
+
get searchText() {
|
|
429
|
+
return this.SearchText;
|
|
430
|
+
}
|
|
431
|
+
/** @deprecated Use {@link SearchText}. */
|
|
432
|
+
set searchText(value) {
|
|
433
|
+
this.SearchText = value;
|
|
434
|
+
}
|
|
435
|
+
SearchType = 'User';
|
|
436
|
+
/** @deprecated Use {@link SearchType}. */
|
|
437
|
+
get searchType() {
|
|
438
|
+
return this.SearchType;
|
|
439
|
+
}
|
|
440
|
+
/** @deprecated Use {@link SearchType}. */
|
|
441
|
+
set searchType(value) {
|
|
442
|
+
this.SearchType = value;
|
|
443
|
+
}
|
|
444
|
+
ShowSearchResults = false;
|
|
445
|
+
/** @deprecated Use {@link ShowSearchResults}. */
|
|
446
|
+
get showSearchResults() {
|
|
447
|
+
return this.ShowSearchResults;
|
|
448
|
+
}
|
|
449
|
+
/** @deprecated Use {@link ShowSearchResults}. */
|
|
450
|
+
set showSearchResults(value) {
|
|
451
|
+
this.ShowSearchResults = value;
|
|
452
|
+
}
|
|
381
453
|
// Data
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
454
|
+
CurrentShares = [];
|
|
455
|
+
/** @deprecated Use {@link CurrentShares}. */
|
|
456
|
+
get currentShares() {
|
|
457
|
+
return this.CurrentShares;
|
|
458
|
+
}
|
|
459
|
+
/** @deprecated Use {@link CurrentShares}. */
|
|
460
|
+
set currentShares(value) {
|
|
461
|
+
this.CurrentShares = value;
|
|
462
|
+
}
|
|
463
|
+
SearchResults = [];
|
|
464
|
+
/** @deprecated Use {@link SearchResults}. */
|
|
465
|
+
get searchResults() {
|
|
466
|
+
return this.SearchResults;
|
|
467
|
+
}
|
|
468
|
+
/** @deprecated Use {@link SearchResults}. */
|
|
469
|
+
set searchResults(value) {
|
|
470
|
+
this.SearchResults = value;
|
|
471
|
+
}
|
|
472
|
+
SelectedRecipient = null;
|
|
473
|
+
/** @deprecated Use {@link SelectedRecipient}. */
|
|
474
|
+
get selectedRecipient() {
|
|
475
|
+
return this.SelectedRecipient;
|
|
476
|
+
}
|
|
477
|
+
/** @deprecated Use {@link SelectedRecipient}. */
|
|
478
|
+
set selectedRecipient(value) {
|
|
479
|
+
this.SelectedRecipient = value;
|
|
480
|
+
}
|
|
481
|
+
SelectedPermission = 'View';
|
|
482
|
+
/** @deprecated Use {@link SelectedPermission}. */
|
|
483
|
+
get selectedPermission() {
|
|
484
|
+
return this.SelectedPermission;
|
|
485
|
+
}
|
|
486
|
+
/** @deprecated Use {@link SelectedPermission}. */
|
|
487
|
+
set selectedPermission(value) {
|
|
488
|
+
this.SelectedPermission = value;
|
|
489
|
+
}
|
|
386
490
|
// Track changes
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
491
|
+
SharesAdded = [];
|
|
492
|
+
/** @deprecated Use {@link SharesAdded}. */
|
|
493
|
+
get sharesAdded() {
|
|
494
|
+
return this.SharesAdded;
|
|
495
|
+
}
|
|
496
|
+
/** @deprecated Use {@link SharesAdded}. */
|
|
497
|
+
set sharesAdded(value) {
|
|
498
|
+
this.SharesAdded = value;
|
|
499
|
+
}
|
|
500
|
+
SharesUpdated = [];
|
|
501
|
+
/** @deprecated Use {@link SharesUpdated}. */
|
|
502
|
+
get sharesUpdated() {
|
|
503
|
+
return this.SharesUpdated;
|
|
504
|
+
}
|
|
505
|
+
/** @deprecated Use {@link SharesUpdated}. */
|
|
506
|
+
set sharesUpdated(value) {
|
|
507
|
+
this.SharesUpdated = value;
|
|
508
|
+
}
|
|
509
|
+
SharesRemoved = [];
|
|
510
|
+
/** @deprecated Use {@link SharesRemoved}. */
|
|
511
|
+
get sharesRemoved() {
|
|
512
|
+
return this.SharesRemoved;
|
|
513
|
+
}
|
|
514
|
+
/** @deprecated Use {@link SharesRemoved}. */
|
|
515
|
+
set sharesRemoved(value) {
|
|
516
|
+
this.SharesRemoved = value;
|
|
517
|
+
}
|
|
390
518
|
// Permission options
|
|
391
|
-
|
|
519
|
+
PermissionOptions = [
|
|
392
520
|
{ value: 'View', label: 'Viewer', description: 'Can view list contents' },
|
|
393
521
|
{ value: 'Edit', label: 'Editor', description: 'Can add/remove items' },
|
|
394
522
|
{ value: 'Owner', label: 'Co-owner', description: 'Full control including sharing' }
|
|
395
523
|
];
|
|
524
|
+
/** @deprecated Use {@link PermissionOptions}. */
|
|
525
|
+
get permissionOptions() {
|
|
526
|
+
return this.PermissionOptions;
|
|
527
|
+
}
|
|
528
|
+
/** @deprecated Use {@link PermissionOptions}. */
|
|
529
|
+
set permissionOptions(value) {
|
|
530
|
+
this.PermissionOptions = value;
|
|
531
|
+
}
|
|
396
532
|
// Cleanup
|
|
397
533
|
destroy$ = new Subject();
|
|
398
534
|
searchSubject = new Subject();
|
|
@@ -411,16 +547,24 @@ export class ListShareDialogComponent extends BaseAngularComponent {
|
|
|
411
547
|
/**
|
|
412
548
|
* Get dialog title
|
|
413
549
|
*/
|
|
414
|
-
get
|
|
550
|
+
get DialogTitle() {
|
|
415
551
|
return `Share "${this.config?.listName || 'List'}"`;
|
|
416
552
|
}
|
|
553
|
+
/** @deprecated Use {@link DialogTitle}. */
|
|
554
|
+
get dialogTitle() {
|
|
555
|
+
return this.DialogTitle;
|
|
556
|
+
}
|
|
417
557
|
/**
|
|
418
558
|
* Check if there are pending changes
|
|
419
559
|
*/
|
|
560
|
+
get HasChanges() {
|
|
561
|
+
return this.SharesAdded.length > 0 ||
|
|
562
|
+
this.SharesUpdated.length > 0 ||
|
|
563
|
+
this.SharesRemoved.length > 0;
|
|
564
|
+
}
|
|
565
|
+
/** @deprecated Use {@link HasChanges}. */
|
|
420
566
|
get hasChanges() {
|
|
421
|
-
return this.
|
|
422
|
-
this.sharesUpdated.length > 0 ||
|
|
423
|
-
this.sharesRemoved.length > 0;
|
|
567
|
+
return this.HasChanges;
|
|
424
568
|
}
|
|
425
569
|
/**
|
|
426
570
|
* Setup search with debounce
|
|
@@ -431,8 +575,8 @@ export class ListShareDialogComponent extends BaseAngularComponent {
|
|
|
431
575
|
await this.performSearch(searchText);
|
|
432
576
|
}
|
|
433
577
|
else {
|
|
434
|
-
this.
|
|
435
|
-
this.
|
|
578
|
+
this.SearchResults = [];
|
|
579
|
+
this.ShowSearchResults = false;
|
|
436
580
|
}
|
|
437
581
|
this.cdr.detectChanges();
|
|
438
582
|
});
|
|
@@ -448,15 +592,15 @@ export class ListShareDialogComponent extends BaseAngularComponent {
|
|
|
448
592
|
* Reset all state
|
|
449
593
|
*/
|
|
450
594
|
resetState() {
|
|
451
|
-
this.
|
|
452
|
-
this.
|
|
453
|
-
this.
|
|
454
|
-
this.
|
|
455
|
-
this.
|
|
456
|
-
this.
|
|
457
|
-
this.
|
|
458
|
-
this.
|
|
459
|
-
this.
|
|
595
|
+
this.SearchText = '';
|
|
596
|
+
this.SearchType = 'User';
|
|
597
|
+
this.ShowSearchResults = false;
|
|
598
|
+
this.SearchResults = [];
|
|
599
|
+
this.SelectedRecipient = null;
|
|
600
|
+
this.SelectedPermission = 'View';
|
|
601
|
+
this.SharesAdded = [];
|
|
602
|
+
this.SharesUpdated = [];
|
|
603
|
+
this.SharesRemoved = [];
|
|
460
604
|
}
|
|
461
605
|
/**
|
|
462
606
|
* Load current shares for the list
|
|
@@ -464,111 +608,127 @@ export class ListShareDialogComponent extends BaseAngularComponent {
|
|
|
464
608
|
async loadCurrentShares() {
|
|
465
609
|
if (!this.config)
|
|
466
610
|
return;
|
|
467
|
-
this.
|
|
611
|
+
this.Loading = true;
|
|
468
612
|
this.cdr.detectChanges();
|
|
469
613
|
try {
|
|
470
|
-
this.
|
|
614
|
+
this.CurrentShares = await this.sharingService.getListShares(this.config.listId);
|
|
471
615
|
}
|
|
472
616
|
catch (error) {
|
|
473
617
|
console.error('Error loading shares:', error);
|
|
474
|
-
this.
|
|
618
|
+
this.CurrentShares = [];
|
|
475
619
|
}
|
|
476
620
|
finally {
|
|
477
|
-
this.
|
|
621
|
+
this.Loading = false;
|
|
478
622
|
this.cdr.detectChanges();
|
|
479
623
|
}
|
|
480
624
|
}
|
|
481
625
|
/**
|
|
482
626
|
* Handle search input
|
|
483
627
|
*/
|
|
484
|
-
|
|
628
|
+
OnSearchInput(event) {
|
|
485
629
|
const value = event.target.value;
|
|
486
|
-
this.
|
|
630
|
+
this.SearchText = value;
|
|
487
631
|
this.searchSubject.next(value);
|
|
488
632
|
}
|
|
633
|
+
/** @deprecated Use {@link OnSearchInput}. */
|
|
634
|
+
onSearchInput(event) {
|
|
635
|
+
return this.OnSearchInput(event);
|
|
636
|
+
}
|
|
489
637
|
/**
|
|
490
638
|
* Clear search
|
|
491
639
|
*/
|
|
640
|
+
ClearSearch() {
|
|
641
|
+
this.SearchText = '';
|
|
642
|
+
this.SearchResults = [];
|
|
643
|
+
this.ShowSearchResults = false;
|
|
644
|
+
this.SelectedRecipient = null;
|
|
645
|
+
}
|
|
646
|
+
/** @deprecated Use {@link ClearSearch}. */
|
|
492
647
|
clearSearch() {
|
|
493
|
-
this.
|
|
494
|
-
this.searchResults = [];
|
|
495
|
-
this.showSearchResults = false;
|
|
496
|
-
this.selectedRecipient = null;
|
|
648
|
+
return this.ClearSearch();
|
|
497
649
|
}
|
|
498
650
|
/**
|
|
499
651
|
* Switch search type
|
|
500
652
|
*/
|
|
501
|
-
|
|
502
|
-
this.
|
|
503
|
-
if (this.
|
|
504
|
-
this.searchSubject.next(this.
|
|
653
|
+
SetSearchType(type) {
|
|
654
|
+
this.SearchType = type;
|
|
655
|
+
if (this.SearchText.trim().length >= 2) {
|
|
656
|
+
this.searchSubject.next(this.SearchText);
|
|
505
657
|
}
|
|
506
658
|
}
|
|
659
|
+
/** @deprecated Use {@link SetSearchType}. */
|
|
660
|
+
setSearchType(type) {
|
|
661
|
+
return this.SetSearchType(type);
|
|
662
|
+
}
|
|
507
663
|
/**
|
|
508
664
|
* Perform search
|
|
509
665
|
*/
|
|
510
666
|
async performSearch(searchText) {
|
|
511
667
|
try {
|
|
512
|
-
if (this.
|
|
513
|
-
this.
|
|
668
|
+
if (this.SearchType === 'User') {
|
|
669
|
+
this.SearchResults = await this.sharingService.searchUsers(searchText);
|
|
514
670
|
}
|
|
515
671
|
else {
|
|
516
|
-
this.
|
|
672
|
+
this.SearchResults = await this.sharingService.searchRoles(searchText);
|
|
517
673
|
}
|
|
518
674
|
// Filter out recipients that already have access
|
|
519
|
-
const existingIds = new Set(this.
|
|
520
|
-
this.
|
|
675
|
+
const existingIds = new Set(this.CurrentShares.map(s => s.recipientId));
|
|
676
|
+
this.SearchResults = this.SearchResults.filter(r => !existingIds.has(r.id));
|
|
521
677
|
// Also filter out the list owner
|
|
522
|
-
this.
|
|
523
|
-
this.
|
|
678
|
+
this.SearchResults = this.SearchResults.filter(r => r.id !== this.config?.currentUserId);
|
|
679
|
+
this.ShowSearchResults = this.SearchResults.length > 0;
|
|
524
680
|
}
|
|
525
681
|
catch (error) {
|
|
526
682
|
console.error('Error searching:', error);
|
|
527
|
-
this.
|
|
683
|
+
this.SearchResults = [];
|
|
528
684
|
}
|
|
529
685
|
}
|
|
530
686
|
/**
|
|
531
687
|
* Select a recipient from search results
|
|
532
688
|
*/
|
|
533
|
-
|
|
534
|
-
this.
|
|
535
|
-
this.
|
|
536
|
-
this.
|
|
689
|
+
SelectRecipient(recipient) {
|
|
690
|
+
this.SelectedRecipient = recipient;
|
|
691
|
+
this.SearchText = recipient.name;
|
|
692
|
+
this.ShowSearchResults = false;
|
|
537
693
|
this.cdr.detectChanges();
|
|
538
694
|
}
|
|
695
|
+
/** @deprecated Use {@link SelectRecipient}. */
|
|
696
|
+
selectRecipient(recipient) {
|
|
697
|
+
return this.SelectRecipient(recipient);
|
|
698
|
+
}
|
|
539
699
|
/**
|
|
540
700
|
* Add the selected recipient as a share
|
|
541
701
|
*/
|
|
542
|
-
async
|
|
543
|
-
if (!this.
|
|
702
|
+
async AddShare() {
|
|
703
|
+
if (!this.SelectedRecipient || !this.config)
|
|
544
704
|
return;
|
|
545
705
|
this.saving = true;
|
|
546
706
|
try {
|
|
547
707
|
const md = this.ProviderToUse;
|
|
548
708
|
let result;
|
|
549
|
-
if (this.
|
|
550
|
-
result = await this.sharingService.shareListWithUser(this.config.listId, this.
|
|
709
|
+
if (this.SelectedRecipient.type === 'User') {
|
|
710
|
+
result = await this.sharingService.shareListWithUser(this.config.listId, this.SelectedRecipient.id, this.SelectedPermission, this.config.currentUserId);
|
|
551
711
|
}
|
|
552
712
|
else {
|
|
553
|
-
result = await this.sharingService.shareListWithRole(this.config.listId, this.
|
|
713
|
+
result = await this.sharingService.shareListWithRole(this.config.listId, this.SelectedRecipient.id, this.SelectedPermission, this.config.currentUserId);
|
|
554
714
|
}
|
|
555
715
|
if (result.success && result.shareId) {
|
|
556
716
|
// Create a ListShareInfo for tracking
|
|
557
717
|
const newShare = {
|
|
558
718
|
shareId: result.shareId,
|
|
559
719
|
listId: this.config.listId,
|
|
560
|
-
type: this.
|
|
561
|
-
recipientId: this.
|
|
562
|
-
recipientName: this.
|
|
563
|
-
recipientEmail: this.
|
|
564
|
-
permissionLevel: this.
|
|
720
|
+
type: this.SelectedRecipient.type,
|
|
721
|
+
recipientId: this.SelectedRecipient.id,
|
|
722
|
+
recipientName: this.SelectedRecipient.name,
|
|
723
|
+
recipientEmail: this.SelectedRecipient.email,
|
|
724
|
+
permissionLevel: this.SelectedPermission,
|
|
565
725
|
status: 'Approved'
|
|
566
726
|
};
|
|
567
|
-
this.
|
|
568
|
-
this.
|
|
727
|
+
this.CurrentShares.push(newShare);
|
|
728
|
+
this.SharesAdded.push(newShare);
|
|
569
729
|
// Clear selection
|
|
570
|
-
this.
|
|
571
|
-
this.
|
|
730
|
+
this.ClearSearch();
|
|
731
|
+
this.SelectedPermission = 'View';
|
|
572
732
|
}
|
|
573
733
|
else {
|
|
574
734
|
console.error('Failed to add share:', result.message);
|
|
@@ -582,10 +742,14 @@ export class ListShareDialogComponent extends BaseAngularComponent {
|
|
|
582
742
|
this.cdr.detectChanges();
|
|
583
743
|
}
|
|
584
744
|
}
|
|
745
|
+
/** @deprecated Use {@link AddShare}. */
|
|
746
|
+
async addShare() {
|
|
747
|
+
return this.AddShare();
|
|
748
|
+
}
|
|
585
749
|
/**
|
|
586
750
|
* Update permission level for an existing share
|
|
587
751
|
*/
|
|
588
|
-
async
|
|
752
|
+
async UpdateSharePermission(share, newLevel) {
|
|
589
753
|
if (share.permissionLevel === newLevel)
|
|
590
754
|
return;
|
|
591
755
|
this.saving = true;
|
|
@@ -594,9 +758,9 @@ export class ListShareDialogComponent extends BaseAngularComponent {
|
|
|
594
758
|
if (result.success) {
|
|
595
759
|
share.permissionLevel = newLevel;
|
|
596
760
|
// Track the update if not already tracked
|
|
597
|
-
const existingUpdate = this.
|
|
761
|
+
const existingUpdate = this.SharesUpdated.find(s => s.shareId === share.shareId);
|
|
598
762
|
if (!existingUpdate) {
|
|
599
|
-
this.
|
|
763
|
+
this.SharesUpdated.push({ ...share });
|
|
600
764
|
}
|
|
601
765
|
}
|
|
602
766
|
else {
|
|
@@ -611,20 +775,24 @@ export class ListShareDialogComponent extends BaseAngularComponent {
|
|
|
611
775
|
this.cdr.detectChanges();
|
|
612
776
|
}
|
|
613
777
|
}
|
|
778
|
+
/** @deprecated Use {@link UpdateSharePermission}. */
|
|
779
|
+
async updateSharePermission(share, newLevel) {
|
|
780
|
+
return this.UpdateSharePermission(share, newLevel);
|
|
781
|
+
}
|
|
614
782
|
/**
|
|
615
783
|
* Remove a share
|
|
616
784
|
*/
|
|
617
|
-
async
|
|
785
|
+
async RemoveShare(share) {
|
|
618
786
|
this.saving = true;
|
|
619
787
|
try {
|
|
620
788
|
const result = await this.sharingService.removeShare(share.shareId);
|
|
621
789
|
if (result.success) {
|
|
622
790
|
// Remove from current shares
|
|
623
|
-
this.
|
|
791
|
+
this.CurrentShares = this.CurrentShares.filter(s => s.shareId !== share.shareId);
|
|
624
792
|
// Track the removal
|
|
625
|
-
this.
|
|
793
|
+
this.SharesRemoved.push(share.shareId);
|
|
626
794
|
// Remove from added if it was just added in this session
|
|
627
|
-
this.
|
|
795
|
+
this.SharesAdded = this.SharesAdded.filter(s => s.shareId !== share.shareId);
|
|
628
796
|
}
|
|
629
797
|
else {
|
|
630
798
|
console.error('Failed to remove share:', result.message);
|
|
@@ -638,32 +806,48 @@ export class ListShareDialogComponent extends BaseAngularComponent {
|
|
|
638
806
|
this.cdr.detectChanges();
|
|
639
807
|
}
|
|
640
808
|
}
|
|
809
|
+
/** @deprecated Use {@link RemoveShare}. */
|
|
810
|
+
async removeShare(share) {
|
|
811
|
+
return this.RemoveShare(share);
|
|
812
|
+
}
|
|
641
813
|
/**
|
|
642
814
|
* Get icon for share type
|
|
643
815
|
*/
|
|
644
|
-
|
|
816
|
+
GetShareTypeIcon(type) {
|
|
645
817
|
return type === 'User' ? 'fa-solid fa-user' : 'fa-solid fa-users';
|
|
646
818
|
}
|
|
819
|
+
/** @deprecated Use {@link GetShareTypeIcon}. */
|
|
820
|
+
getShareTypeIcon(type) {
|
|
821
|
+
return this.GetShareTypeIcon(type);
|
|
822
|
+
}
|
|
647
823
|
/**
|
|
648
824
|
* Get permission label
|
|
649
825
|
*/
|
|
650
|
-
|
|
651
|
-
const option = this.
|
|
826
|
+
GetPermissionLabel(level) {
|
|
827
|
+
const option = this.PermissionOptions.find(o => o.value === level);
|
|
652
828
|
return option?.label || level;
|
|
653
829
|
}
|
|
830
|
+
/** @deprecated Use {@link GetPermissionLabel}. */
|
|
831
|
+
getPermissionLabel(level) {
|
|
832
|
+
return this.GetPermissionLabel(level);
|
|
833
|
+
}
|
|
654
834
|
/**
|
|
655
835
|
* Close dialog with results
|
|
656
836
|
*/
|
|
657
|
-
|
|
837
|
+
OnDone() {
|
|
658
838
|
const result = {
|
|
659
839
|
action: 'apply',
|
|
660
|
-
sharesAdded: this.
|
|
661
|
-
sharesUpdated: this.
|
|
662
|
-
sharesRemoved: this.
|
|
663
|
-
notifyByEmail: this.
|
|
840
|
+
sharesAdded: this.SharesAdded,
|
|
841
|
+
sharesUpdated: this.SharesUpdated,
|
|
842
|
+
sharesRemoved: this.SharesRemoved,
|
|
843
|
+
notifyByEmail: this.NotifyByEmail
|
|
664
844
|
};
|
|
665
845
|
this._visible = false;
|
|
666
|
-
this.
|
|
846
|
+
this.Complete.emit(result);
|
|
847
|
+
}
|
|
848
|
+
/** @deprecated Use {@link OnDone}. */
|
|
849
|
+
onDone() {
|
|
850
|
+
return this.OnDone();
|
|
667
851
|
}
|
|
668
852
|
/**
|
|
669
853
|
* Cancel and close dialog
|
|
@@ -675,11 +859,15 @@ export class ListShareDialogComponent extends BaseAngularComponent {
|
|
|
675
859
|
/**
|
|
676
860
|
* Check if current user can modify shares
|
|
677
861
|
*/
|
|
678
|
-
get
|
|
862
|
+
get CanModifyShares() {
|
|
679
863
|
return this.config?.isOwner === true;
|
|
680
864
|
}
|
|
865
|
+
/** @deprecated Use {@link CanModifyShares}. */
|
|
866
|
+
get canModifyShares() {
|
|
867
|
+
return this.CanModifyShares;
|
|
868
|
+
}
|
|
681
869
|
static ɵfac = function ListShareDialogComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ListShareDialogComponent)(i0.ɵɵdirectiveInject(i1.ListSharingService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
682
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ListShareDialogComponent, selectors: [["mj-list-share-dialog"]], inputs: { config: "config", visible: "visible" }, outputs: { complete: "complete", cancel: "cancel", manageInvitations: "manageInvitations", viewAuditLog: "viewAuditLog" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["mjDropdownItem", ""], [3, "Visible", "Title", "Width"], [3, "Close", "Visible", "Title", "Width"], [1, "share-dialog-content"], [1, "loading-container"], [1, "notify-toggle"], ["mjButton", "", "variant", "primary", 3, "click"], ["mjButton", "", "variant", "outline", 3, "click"], [1, "fa-solid", "fa-envelope-open-text"], ["mjButton", "", 3, "click"], ["href", "#", 1, "audit-log-link", 3, "click"], [1, "fa-solid", "fa-clock-rotate-left"], ["text", "Loading shares..."], [1, "add-share-section"], [1, "section-divider"], [1, "current-shares-section"], ["Icon", "fa-solid fa-share-nodes", "Title", "Not shared yet", "Size", "compact", 3, "Message"], [1, "readonly-notice"], [1, "section-title"], [1, "search-type-toggle"], ["mjButton", "", 3, "click", "variant"], [1, "fa-solid", "fa-user"], [1, "fa-solid", "fa-users"], [1, "search-container"], [1, "search-input-wrapper"], [1, "fa-solid", "fa-search", "search-icon"], ["type", "text", 1, "mj-input", 3, "input", "blur", "value", "placeholder"], [1, "search-results"], [1, "selected-recipient"], [1, "search-result-item"], [1, "search-result-item", 3, "mousedown"], [1, "recipient-info"], [1, "recipient-name"], [1, "recipient-email"], [1, "recipient-chip"], ["mjButton", "", "variant", "flat", "size", "sm", 3, "click"], [1, "fa-solid", "fa-times"], ["TextField", "label", "ValueField", "value", 1, "permission-dropdown", 3, "ngModelChange", "Data", "ngModel", "ValuePrimitive"], ["mjButton", "", "variant", "primary", 3, "click", "disabled"], [1, "fa-solid", "fa-plus"], [1, "permission-option"], [1, "permission-label"], [1, "permission-desc"], [1, "share-list"], [1, "share-item"], [1, "share-info"], [1, "share-type-icon"], [1, "share-details"], [1, "share-name"], [1, "share-email"], [1, "share-type-label"], [1, "share-actions"], ["TextField", "label", "ValueField", "value", 1, "permission-dropdown-small", 3, "Data", "ngModel", "ValuePrimitive", "Disabled"], [1, "permission-badge"], ["mjButton", "", "variant", "danger", "size", "sm", "title", "Remove access", 3, "disabled"], ["TextField", "label", "ValueField", "value", 1, "permission-dropdown-small", 3, "ValueChange", "Data", "ngModel", "ValuePrimitive", "Disabled"], ["mjButton", "", "variant", "danger", "size", "sm", "title", "Remove access", 3, "click", "disabled"], [1, "fa-solid", "fa-trash"], [1, "fa-solid", "fa-info-circle"], ["id", "share-notify", "type", "checkbox", 3, "ngModelChange", "ngModel"], ["for", "share-notify"], [1, "fa-solid", "fa-envelope"]], template: function ListShareDialogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
870
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ListShareDialogComponent, selectors: [["mj-list-share-dialog"]], inputs: { config: "config", Visible: "Visible", visible: "visible" }, outputs: { Complete: "Complete", complete: "complete", cancel: "cancel", ManageInvitations: "ManageInvitations", manageInvitations: "manageInvitations", ViewAuditLog: "ViewAuditLog", viewAuditLog: "viewAuditLog" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["mjDropdownItem", ""], [3, "Visible", "Title", "Width"], [3, "Close", "Visible", "Title", "Width"], [1, "share-dialog-content"], [1, "loading-container"], [1, "notify-toggle"], ["mjButton", "", "variant", "primary", 3, "click"], ["mjButton", "", "variant", "outline", 3, "click"], [1, "fa-solid", "fa-envelope-open-text"], ["mjButton", "", 3, "click"], ["href", "#", 1, "audit-log-link", 3, "click"], [1, "fa-solid", "fa-clock-rotate-left"], ["text", "Loading shares..."], [1, "add-share-section"], [1, "section-divider"], [1, "current-shares-section"], ["Icon", "fa-solid fa-share-nodes", "Title", "Not shared yet", "Size", "compact", 3, "Message"], [1, "readonly-notice"], [1, "section-title"], [1, "search-type-toggle"], ["mjButton", "", 3, "click", "variant"], [1, "fa-solid", "fa-user"], [1, "fa-solid", "fa-users"], [1, "search-container"], [1, "search-input-wrapper"], [1, "fa-solid", "fa-search", "search-icon"], ["type", "text", 1, "mj-input", 3, "input", "blur", "value", "placeholder"], [1, "search-results"], [1, "selected-recipient"], [1, "search-result-item"], [1, "search-result-item", 3, "mousedown"], [1, "recipient-info"], [1, "recipient-name"], [1, "recipient-email"], [1, "recipient-chip"], ["mjButton", "", "variant", "flat", "size", "sm", 3, "click"], [1, "fa-solid", "fa-times"], ["TextField", "label", "ValueField", "value", 1, "permission-dropdown", 3, "ngModelChange", "Data", "ngModel", "ValuePrimitive"], ["mjButton", "", "variant", "primary", 3, "click", "disabled"], [1, "fa-solid", "fa-plus"], [1, "permission-option"], [1, "permission-label"], [1, "permission-desc"], [1, "share-list"], [1, "share-item"], [1, "share-info"], [1, "share-type-icon"], [1, "share-details"], [1, "share-name"], [1, "share-email"], [1, "share-type-label"], [1, "share-actions"], ["TextField", "label", "ValueField", "value", 1, "permission-dropdown-small", 3, "Data", "ngModel", "ValuePrimitive", "Disabled"], [1, "permission-badge"], ["mjButton", "", "variant", "danger", "size", "sm", "title", "Remove access", 3, "disabled"], ["TextField", "label", "ValueField", "value", 1, "permission-dropdown-small", 3, "ValueChange", "Data", "ngModel", "ValuePrimitive", "Disabled"], ["mjButton", "", "variant", "danger", "size", "sm", "title", "Remove access", 3, "click", "disabled"], [1, "fa-solid", "fa-trash"], [1, "fa-solid", "fa-info-circle"], ["id", "share-notify", "type", "checkbox", 3, "ngModelChange", "ngModel"], ["for", "share-notify"], [1, "fa-solid", "fa-envelope"]], template: function ListShareDialogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
683
871
|
i0.ɵɵconditionalCreate(0, ListShareDialogComponent_Conditional_0_Template, 16, 6, "mj-dialog", 1);
|
|
684
872
|
} if (rf & 2) {
|
|
685
873
|
i0.ɵɵconditional(ctx.visible ? 0 : -1);
|
|
@@ -690,14 +878,22 @@ export class ListShareDialogComponent extends BaseAngularComponent {
|
|
|
690
878
|
args: [{ standalone: false, selector: 'mj-list-share-dialog', template: "@if (visible) {\n <mj-dialog\n [Visible]=\"true\"\n [Title]=\"dialogTitle\"\n [Width]=\"500\"\n (Close)=\"onCancel()\">\n <div class=\"share-dialog-content\">\n <!-- Loading state -->\n @if (loading) {\n <div class=\"loading-container\">\n <mj-loading text=\"Loading shares...\"></mj-loading>\n </div>\n }\n @if (!loading) {\n <!-- Add new share section -->\n @if (canModifyShares) {\n <div class=\"add-share-section\">\n <h4 class=\"section-title\">Add people or roles</h4>\n <!-- Search type toggle -->\n <div class=\"search-type-toggle\">\n <button mjButton\n [variant]=\"searchType === 'User' ? 'primary' : 'outline'\"\n (click)=\"setSearchType('User')\">\n <i class=\"fa-solid fa-user\"></i> Users\n </button>\n <button mjButton\n [variant]=\"searchType === 'Role' ? 'primary' : 'outline'\"\n (click)=\"setSearchType('Role')\">\n <i class=\"fa-solid fa-users\"></i> Roles\n </button>\n </div>\n <!-- Search input -->\n <div class=\"search-container\">\n <div class=\"search-input-wrapper\">\n <i class=\"fa-solid fa-search search-icon\"></i>\n <input type=\"text\"\n class=\"mj-input\"\n [value]=\"searchText\"\n (input)=\"onSearchInput($any($event.target).value)\"\n [placeholder]=\"'Search for ' + (searchType === 'User' ? 'users' : 'roles') + '...'\"\n (blur)=\"showSearchResults = false\" />\n </div>\n <!-- Search results dropdown -->\n @if (showSearchResults && searchResults.length > 0) {\n <div class=\"search-results\">\n @for (recipient of searchResults; track recipient) {\n <div class=\"search-result-item\"\n (mousedown)=\"selectRecipient(recipient)\">\n <i [class]=\"getShareTypeIcon(recipient.type)\"></i>\n <div class=\"recipient-info\">\n <span class=\"recipient-name\">{{ recipient.name }}</span>\n @if (recipient.email) {\n <span class=\"recipient-email\">{{ recipient.email }}</span>\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n <!-- Selected recipient and permission -->\n @if (selectedRecipient) {\n <div class=\"selected-recipient\">\n <div class=\"recipient-chip\">\n <i [class]=\"getShareTypeIcon(selectedRecipient.type)\"></i>\n <span>{{ selectedRecipient.name }}</span>\n <button mjButton variant=\"flat\" size=\"sm\" (click)=\"clearSearch()\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n <mj-dropdown\n [Data]=\"permissionOptions\"\n TextField=\"label\"\n ValueField=\"value\"\n [(ngModel)]=\"selectedPermission\"\n [ValuePrimitive]=\"true\"\n class=\"permission-dropdown\">\n <ng-template #mjDropdownItem let-dataItem>\n <div class=\"permission-option\">\n <span class=\"permission-label\">{{ dataItem.label }}</span>\n <span class=\"permission-desc\">{{ dataItem.description }}</span>\n </div>\n </ng-template>\n </mj-dropdown>\n <button mjButton\n variant=\"primary\"\n [disabled]=\"saving\"\n (click)=\"addShare()\">\n <i class=\"fa-solid fa-plus\"></i> Add\n </button>\n </div>\n }\n </div>\n }\n <!-- Divider -->\n @if (currentShares.length > 0 && canModifyShares) {\n <hr class=\"section-divider\">\n }\n <!-- Current shares section -->\n @if (currentShares.length > 0) {\n <div class=\"current-shares-section\">\n <h4 class=\"section-title\">People with access</h4>\n <div class=\"share-list\">\n @for (share of currentShares; track share) {\n <div class=\"share-item\">\n <div class=\"share-info\">\n <i [class]=\"getShareTypeIcon(share.type)\" class=\"share-type-icon\"></i>\n <div class=\"share-details\">\n <span class=\"share-name\">{{ share.recipientName }}</span>\n @if (share.recipientEmail) {\n <span class=\"share-email\">{{ share.recipientEmail }}</span>\n }\n @if (share.type === 'Role') {\n <span class=\"share-type-label\">Role</span>\n }\n </div>\n </div>\n <div class=\"share-actions\">\n @if (canModifyShares) {\n <mj-dropdown\n [Data]=\"permissionOptions\"\n TextField=\"label\"\n ValueField=\"value\"\n [ngModel]=\"share.permissionLevel\"\n [ValuePrimitive]=\"true\"\n (ValueChange)=\"updateSharePermission(share, $any($event))\"\n [Disabled]=\"saving\"\n class=\"permission-dropdown-small\">\n </mj-dropdown>\n }\n @if (!canModifyShares) {\n <span class=\"permission-badge\">\n {{ getPermissionLabel(share.permissionLevel) }}\n </span>\n }\n @if (canModifyShares) {\n <button mjButton\n variant=\"danger\"\n size=\"sm\"\n title=\"Remove access\"\n [disabled]=\"saving\"\n (click)=\"removeShare(share)\">\n <i class=\"fa-solid fa-trash\"></i>\n </button>\n }\n </div>\n </div>\n }\n </div>\n </div>\n }\n <!-- Empty state -->\n @if (currentShares.length === 0 && !loading) {\n <mj-empty-state\n Icon=\"fa-solid fa-share-nodes\"\n Title=\"Not shared yet\"\n [Message]=\"EmptyShareMessage\"\n Size=\"compact\" />\n }\n <!-- Read-only notice -->\n @if (!canModifyShares) {\n <div class=\"readonly-notice\">\n <i class=\"fa-solid fa-info-circle\"></i>\n <span>Only the list owner can manage sharing.</span>\n </div>\n }\n }\n </div>\n <!-- Notify-by-email toggle (mockup 15). Sits above the action footer so\n the user can flip it after adding shares but before clicking Done. -->\n @if (canModifyShares) {\n <div class=\"notify-toggle\">\n <input id=\"share-notify\" type=\"checkbox\" [(ngModel)]=\"notifyByEmail\" />\n <label for=\"share-notify\">\n <i class=\"fa-solid fa-envelope\"></i>\n Send email notification to new shares\n </label>\n </div>\n }\n <mj-dialog-actions>\n <button mjButton variant=\"primary\" (click)=\"onDone()\">Done</button>\n <button mjButton variant=\"outline\" (click)=\"manageInvitations.emit()\">\n <i class=\"fa-solid fa-envelope-open-text\"></i>\n Manage Invitations\n </button>\n <button mjButton (click)=\"onCancel()\">Cancel</button>\n <a class=\"audit-log-link\" (click)=\"viewAuditLog.emit(); $event.preventDefault()\" href=\"#\">\n <i class=\"fa-solid fa-clock-rotate-left\"></i>\n View audit log\n </a>\n </mj-dialog-actions>\n </mj-dialog>\n}\n", styles: [".share-dialog-content {\n padding: 0;\n min-height: 200px;\n}\n\n.loading-container {\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 200px;\n}\n\n/* Section styling */\n.section-title {\n margin: 0 0 12px 0;\n font-size: 14px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.section-divider {\n margin: 16px 0;\n border: none;\n border-top: 1px solid var(--mj-border-default);\n}\n\n/* Add share section */\n.add-share-section {\n margin-bottom: 16px;\n}\n\n.search-type-toggle {\n display: flex;\n gap: 8px;\n margin-bottom: 12px;\n}\n\n.search-type-toggle button {\n flex: 1;\n}\n\n.search-type-toggle i {\n margin-right: 6px;\n}\n\n/* Search container */\n.search-container {\n position: relative;\n}\n\n.search-input-wrapper {\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.search-input-wrapper .search-icon {\n position: absolute;\n left: 12px;\n color: var(--mj-text-muted);\n pointer-events: none;\n z-index: 1;\n}\n\n.search-input-wrapper .mj-input {\n padding-left: 36px;\n}\n\n.search-results {\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n background: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: 4px;\n box-shadow: var(--mj-shadow-md);\n max-height: 200px;\n overflow-y: auto;\n z-index: 1000;\n}\n\n.search-result-item {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 10px 12px;\n cursor: pointer;\n transition: background-color 0.15s;\n}\n\n.search-result-item:hover {\n background-color: var(--mj-bg-surface-sunken);\n}\n\n.search-result-item i {\n color: var(--mj-text-secondary);\n width: 20px;\n text-align: center;\n}\n\n.recipient-info {\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.recipient-name {\n font-weight: 500;\n color: var(--mj-text-primary);\n}\n\n.recipient-email {\n font-size: 12px;\n color: var(--mj-text-secondary);\n}\n\n/* Selected recipient */\n.selected-recipient {\n display: flex;\n align-items: center;\n gap: 12px;\n margin-top: 12px;\n padding: 12px;\n background: var(--mj-bg-surface-sunken);\n border-radius: 6px;\n}\n\n.recipient-chip {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 12px;\n background: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: 20px;\n flex: 1;\n}\n\n.recipient-chip i {\n color: var(--mj-brand-primary);\n}\n\n.recipient-chip span {\n flex: 1;\n font-weight: 500;\n}\n\n.permission-dropdown {\n width: 150px;\n}\n\n/* Permission option template */\n.permission-option {\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding: 4px 0;\n}\n\n.permission-label {\n font-weight: 500;\n}\n\n.permission-desc {\n font-size: 11px;\n color: var(--mj-text-secondary);\n}\n\n/* Current shares section */\n.current-shares-section {\n margin-top: 16px;\n}\n\n.share-list {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.share-item {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 12px;\n background: var(--mj-bg-surface-sunken);\n border-radius: 6px;\n transition: background-color 0.15s;\n}\n\n.share-item:hover {\n background: var(--mj-bg-surface-sunken);\n}\n\n.share-info {\n display: flex;\n align-items: center;\n gap: 12px;\n flex: 1;\n}\n\n.share-type-icon {\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n border-radius: 50%;\n}\n\n.share-details {\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.share-name {\n font-weight: 500;\n color: var(--mj-text-primary);\n}\n\n.share-email {\n font-size: 12px;\n color: var(--mj-text-secondary);\n}\n\n.share-type-label {\n font-size: 11px;\n color: var(--mj-text-secondary);\n background: var(--mj-border-default);\n padding: 2px 6px;\n border-radius: 3px;\n display: inline-block;\n width: fit-content;\n}\n\n.share-actions {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.permission-dropdown-small {\n width: 110px;\n}\n\n.permission-badge {\n padding: 4px 10px;\n background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n border-radius: 4px;\n font-size: 12px;\n font-weight: 500;\n}\n\n/* Read-only notice */\n.readonly-notice {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px;\n background: color-mix(in srgb, var(--mj-status-warning) 15%, var(--mj-bg-surface));\n border-radius: 6px;\n margin-top: 16px;\n color: var(--mj-status-warning);\n font-size: 13px;\n}\n\n.readonly-notice i {\n color: var(--mj-status-warning);\n}\n\n/* Notify-by-email toggle (Phase 2 \u2014 mockup 15) */\n.notify-toggle {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px 16px;\n border-top: 1px solid var(--mj-border-subtle);\n font-size: 12.5px;\n color: var(--mj-text-secondary);\n}\n\n.notify-toggle input {\n cursor: pointer;\n}\n\n.notify-toggle label {\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n}\n\n/* Footer audit-log link \u2014 sits on the far right of the dialog footer */\n.audit-log-link {\n margin-left: auto;\n font-size: 12px;\n color: var(--mj-text-link);\n text-decoration: none;\n display: inline-flex;\n align-items: center;\n gap: 4px;\n cursor: pointer;\n}\n\n.audit-log-link:hover {\n text-decoration: underline;\n}\n\n"] }]
|
|
691
879
|
}], () => [{ type: i1.ListSharingService }, { type: i0.ChangeDetectorRef }], { config: [{
|
|
692
880
|
type: Input
|
|
881
|
+
}], Visible: [{
|
|
882
|
+
type: Input
|
|
693
883
|
}], visible: [{
|
|
694
884
|
type: Input
|
|
885
|
+
}], Complete: [{
|
|
886
|
+
type: Output
|
|
695
887
|
}], complete: [{
|
|
696
888
|
type: Output
|
|
697
889
|
}], cancel: [{
|
|
698
890
|
type: Output
|
|
891
|
+
}], ManageInvitations: [{
|
|
892
|
+
type: Output
|
|
699
893
|
}], manageInvitations: [{
|
|
700
894
|
type: Output
|
|
895
|
+
}], ViewAuditLog: [{
|
|
896
|
+
type: Output
|
|
701
897
|
}], viewAuditLog: [{
|
|
702
898
|
type: Output
|
|
703
899
|
}] }); })();
|