|
| 1 | +<orcid-modal [title]="title"> |
| 2 | + <div orcidModalBody> |
| 3 | + <div class="import-works-dialog__intro" *ngIf="introText"> |
| 4 | + <p class="import-works-dialog__intro-text">{{ introText }}</p> |
| 5 | + <a |
| 6 | + *ngIf="supportLink" |
| 7 | + class="import-works-dialog__support-link" |
| 8 | + [href]="supportLink.url" |
| 9 | + target="_blank" |
| 10 | + rel="noopener noreferrer" |
| 11 | + > |
| 12 | + {{ supportLink.label }} |
| 13 | + </a> |
| 14 | + </div> |
| 15 | + |
| 16 | + <section class="import-works-dialog__section" *ngIf="loading || certifiedLinks.length"> |
| 17 | + <h3 class="import-works-dialog__section-heading"> |
| 18 | + {{ certifiedSectionHeading }} |
| 19 | + </h3> |
| 20 | + <div class="import-works-dialog__card-list"> |
| 21 | + <!-- Shimmer skeleton cards while loading --> |
| 22 | + <ng-container *ngIf="loading"> |
| 23 | + <div |
| 24 | + *ngFor="let _ of certifiedSkeletonCount" |
| 25 | + class="import-works-dialog__card import-works-dialog__card--certified import-works-dialog__card--skeleton" |
| 26 | + aria-hidden="true" |
| 27 | + > |
| 28 | + <div class="import-works-dialog__card-icon"> |
| 29 | + <orcid-skeleton-placeholder [accentBackground]="false" shape="square" width="48px" height="48px"></orcid-skeleton-placeholder> |
| 30 | + </div> |
| 31 | + <div class="import-works-dialog__card-content"> |
| 32 | + <orcid-skeleton-placeholder [accentBackground]="false" class="import-works-dialog__skeleton-title" height="27px" width="60%"></orcid-skeleton-placeholder> |
| 33 | + <orcid-skeleton-placeholder [accentBackground]="false" class="import-works-dialog__skeleton-line" height="21px" width="85%"></orcid-skeleton-placeholder> |
| 34 | + </div> |
| 35 | + <div class="import-works-dialog__card-actions"> |
| 36 | + <orcid-skeleton-placeholder [accentBackground]="false" class="import-works-dialog__skeleton-btn" height="36px" width="120px"></orcid-skeleton-placeholder> |
| 37 | + </div> |
| 38 | + </div> |
| 39 | + </ng-container> |
| 40 | + <!-- Real certified links --> |
| 41 | + <ng-container *ngIf="!loading"> |
| 42 | + <div |
| 43 | + *ngFor="let link of certifiedLinks" |
| 44 | + class="import-works-dialog__card import-works-dialog__card--certified" |
| 45 | + > |
| 46 | + <div class="import-works-dialog__card-icon" *ngIf="link.imageUrl || link.icon"> |
| 47 | + <img *ngIf="link.imageUrl" [src]="link.imageUrl" [alt]="link.name + ' logo'" class="import-works-dialog__card-img" /> |
| 48 | + <mat-icon *ngIf="!link.imageUrl && link.icon" [attr.aria-hidden]="true">{{ link.icon }}</mat-icon> |
| 49 | + </div> |
| 50 | + <div class="import-works-dialog__card-content"> |
| 51 | + <p class="import-works-dialog__card-title">{{ link.name }}</p> |
| 52 | + <p class="import-works-dialog__card-description"> |
| 53 | + {{ link.description }} |
| 54 | + </p> |
| 55 | + </div> |
| 56 | + <div class="import-works-dialog__card-actions"> |
| 57 | + <ng-container *ngIf="link.connected; else connectCertified"> |
| 58 | + <span class="import-works-dialog__connected"> |
| 59 | + <span class="import-works-dialog__connected-dot" aria-hidden="true"></span> |
| 60 | + {{ connectedLabel }} |
| 61 | + </span> |
| 62 | + </ng-container> |
| 63 | + <ng-template #connectCertified> |
| 64 | + <button |
| 65 | + mat-flat-button |
| 66 | + class="import-works-dialog__btn-connect" |
| 67 | + (click)="openInNewTab(link.url)" |
| 68 | + > |
| 69 | + {{ connectNowLabel }} |
| 70 | + </button> |
| 71 | + </ng-template> |
| 72 | + </div> |
| 73 | + </div> |
| 74 | + </ng-container> |
| 75 | + </div> |
| 76 | + </section> |
| 77 | + |
| 78 | + <section class="import-works-dialog__section import-works-dialog__section--more" *ngIf="loading || moreServicesLinks.length"> |
| 79 | + <div class="import-works-dialog__more-panel"> |
| 80 | + <button |
| 81 | + type="button" |
| 82 | + class="import-works-dialog__more-header" |
| 83 | + (click)="toggleMoreServices()" |
| 84 | + [attr.aria-expanded]="moreServicesExpanded" |
| 85 | + [attr.aria-controls]="'import-works-more-list'" |
| 86 | + id="import-works-more-heading" |
| 87 | + > |
| 88 | + <mat-icon class="import-works-dialog__more-chevron" aria-hidden="true"> |
| 89 | + {{ moreServicesExpanded ? 'expand_more' : 'expand_less' }} |
| 90 | + </mat-icon> |
| 91 | + <span class="import-works-dialog__more-heading-text"> |
| 92 | + {{ moreServicesHeading }} |
| 93 | + <span class="import-works-dialog__more-count" *ngIf="!loading">({{ moreServicesLinks.length }})</span> |
| 94 | + </span> |
| 95 | + </button> |
| 96 | + <div |
| 97 | + id="import-works-more-list" |
| 98 | + class="import-works-dialog__more-list" |
| 99 | + role="region" |
| 100 | + [attr.aria-labelledby]="'import-works-more-heading'" |
| 101 | + [hidden]="!moreServicesExpanded" |
| 102 | + > |
| 103 | + <!-- Shimmer skeleton cards while loading --> |
| 104 | + <ng-container *ngIf="loading"> |
| 105 | + <div |
| 106 | + *ngFor="let _ of moreServicesSkeletonCount" |
| 107 | + class="import-works-dialog__card import-works-dialog__card--more import-works-dialog__card--skeleton" |
| 108 | + aria-hidden="true" |
| 109 | + > |
| 110 | + <div class="import-works-dialog__card-icon"> |
| 111 | + <orcid-skeleton-placeholder [accentBackground]="false" shape="square" width="48px" height="48px"></orcid-skeleton-placeholder> |
| 112 | + </div> |
| 113 | + <div class="import-works-dialog__card-content"> |
| 114 | + <orcid-skeleton-placeholder [accentBackground]="false" class="import-works-dialog__skeleton-title" height="27px" width="55%"></orcid-skeleton-placeholder> |
| 115 | + <orcid-skeleton-placeholder [accentBackground]="false" class="import-works-dialog__skeleton-line" height="21px" width="100%"></orcid-skeleton-placeholder> |
| 116 | + <orcid-skeleton-placeholder [accentBackground]="false" class="import-works-dialog__skeleton-line" height="21px" width="80%"></orcid-skeleton-placeholder> |
| 117 | + </div> |
| 118 | + <div class="import-works-dialog__card-actions"> |
| 119 | + <orcid-skeleton-placeholder [accentBackground]="false" class="import-works-dialog__skeleton-btn" height="36px" width="120px"></orcid-skeleton-placeholder> |
| 120 | + </div> |
| 121 | + </div> |
| 122 | + </ng-container> |
| 123 | + <!-- Real more services links --> |
| 124 | + <ng-container *ngIf="!loading"> |
| 125 | + <div |
| 126 | + *ngFor="let link of moreServicesLinks" |
| 127 | + class="import-works-dialog__card import-works-dialog__card--more" |
| 128 | + > |
| 129 | + <div class="import-works-dialog__card-icon" *ngIf="link.imageUrl || link.icon"> |
| 130 | + <img *ngIf="link.imageUrl" [src]="link.imageUrl" [alt]="link.name + ' logo'" class="import-works-dialog__card-img" /> |
| 131 | + <mat-icon *ngIf="!link.imageUrl && link.icon" [attr.aria-hidden]="true">{{ link.icon }}</mat-icon> |
| 132 | + </div> |
| 133 | + <div class="import-works-dialog__card-content"> |
| 134 | + <p class="import-works-dialog__card-title">{{ link.name }}</p> |
| 135 | + <p class="import-works-dialog__card-description"> |
| 136 | + {{ link.description }} |
| 137 | + </p> |
| 138 | + </div> |
| 139 | + <div class="import-works-dialog__card-actions"> |
| 140 | + <button |
| 141 | + mat-stroked-button |
| 142 | + class="import-works-dialog__btn-connect-more" |
| 143 | + (click)="openInNewTab(link.url)" |
| 144 | + > |
| 145 | + {{ connectNowLabel }} |
| 146 | + </button> |
| 147 | + </div> |
| 148 | + </div> |
| 149 | + </ng-container> |
| 150 | + </div> |
| 151 | + </div> |
| 152 | + </section> |
| 153 | + </div> |
| 154 | +</orcid-modal> |
0 commit comments