Skip to content

Commit

Permalink
Visibility widget (#1948)
Browse files Browse the repository at this point in the history
* 8597-prod-cern-has-reported-experiencing-an-error-with-their-inspire-integration-which-seems-related-to-the-recent-google-tag-manager

* Enable new visibility widget
  • Loading branch information
leomendoza123 authored May 9, 2023
1 parent 29bd56c commit 5e8ef38
Show file tree
Hide file tree
Showing 69 changed files with 2,139 additions and 452 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# war file builds
target/**
temp/**
src/**

# compiled output
/dist
Expand Down
2 changes: 1 addition & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { AppComponent } from './app.component'
import { CoreModule } from './core/core.module'
import { LayoutModule } from './layout/layout.module'
import { BidiModule } from '@angular/cdk/bidi'
import { PseudoModule } from 'src/locale/i18n.pseudo.component'
import { PseudoModule } from 'src/locale/i18n.pseudo.component';

@NgModule({
declarations: [AppComponent],
Expand Down
3 changes: 3 additions & 0 deletions src/app/cdk/panel/panel-privacy/panel-privacy.component.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
<div class="container">
<div
class="dot everyone"
*ngIf="visibility === 'PUBLIC'"
[ngClass]="{ active: visibility === 'PUBLIC' }"
></div>
<div
class="dot trusted"
*ngIf="visibility === 'LIMITED'"
[ngClass]="{ active: visibility === 'LIMITED' }"
></div>
<div
class="dot private"
*ngIf="visibility === 'PRIVATE'"
[ngClass]="{ active: visibility === 'PRIVATE' }"
></div>
</div>
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.container {
width: 40px;
height: 8px;
border-radius: 8px;
display: flex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
$background: map-get($theme, background);

.container {
border-color: map-get($background, 'ui-background-lightest');
background-color: map-get($background, 'ui-background-lightest');

.dot {
background-color: map-get($background, 'ui-background');
Expand Down
4 changes: 2 additions & 2 deletions src/app/cdk/panel/panel.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ import { PanelExpandButtonsComponent } from './panel-expand-buttons/panel-expand
import { MatMenuModule } from '@angular/material/menu'
import { SortLabelPipe } from './sort-label.pipe'
import { MatCheckboxModule } from '@angular/material/checkbox'
import { PrivacySelectorModule } from '../privacy-selector/privacy-selector.module'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { MatProgressBarModule } from '@angular/material/progress-bar'
import { SharedModule } from '../../shared/shared.module'
import { AppPanelActivityActionAriaLabelPipe } from '../../shared/pipes/app-panel-activity-action-aria-label/app-panel-activity-action-aria-label.pipe'
import { VisibilitySelectorModule } from '../visibility-selector/visibility-selector.module'

@NgModule({
declarations: [
Expand All @@ -47,7 +47,7 @@ import { AppPanelActivityActionAriaLabelPipe } from '../../shared/pipes/app-pane
MatDividerModule,
MatMenuModule,
MatCheckboxModule,
PrivacySelectorModule,
VisibilitySelectorModule,
ReactiveFormsModule,
FormsModule,
MatProgressBarModule,
Expand Down
9 changes: 5 additions & 4 deletions src/app/cdk/panel/panel/panel.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,17 @@
>
<ng-container *ngIf="visibilityError">
<mat-icon
class="large-material-icon error cy-inconsistency-issue"
class="large-material-icon error cy-inconsistency-issue material-icons-outlined"
[matTooltip]="tooltipLabelVisibilityError"
>info</mat-icon
>
</ng-container>
<app-privacy-selector
[whiteBackground]="true"
<app-visibility-selector
(ngModelChange)="updateVisibility($event)"
[ngModel]="visibility"
></app-privacy-selector>
[multiEdit]="stackSiblings.length > 1 ? 'multi' : 'single'"
[visibilityError]="visibilityError"
></app-visibility-selector>
</ng-container>

<!-- [CUSTOM CONTROLS] FOR `PEER REVIEWS` AND `RESEARCH RESOURCES` -->
Expand Down
2 changes: 1 addition & 1 deletion src/app/cdk/panel/panel/panel.component.scss-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
}

.error {
color: map-get($foreground, 'state-notice-dark');
color: map-get($foreground, 'state-warning-dark')
}
}
@include panel-theme($orcid-app-theme);
3 changes: 3 additions & 0 deletions src/app/cdk/panel/panel/panel.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'
import { MatDialogHarness } from '@angular/material/dialog/testing'
import { NoopAnimationsModule } from '@angular/platform-browser/animations'
import { ModalBiographyComponent } from '../../../record/components/top-bar/modals/modal-biography/modal-biography.component'
import { MatMenuModule } from '@angular/material/menu'

describe('PanelComponent', () => {
let component: PanelComponent
Expand All @@ -39,6 +40,8 @@ describe('PanelComponent', () => {
NoopAnimationsModule,
RouterTestingModule,
SharedModule,
MatMenuModule

],
declarations: [PanelComponent],
providers: [
Expand Down
1 change: 1 addition & 0 deletions src/app/cdk/panel/panel/panel.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,5 +314,6 @@ export class PanelComponent implements OnInit {
.subscribe()
break
}
this.visibilityError = false
}
}
3 changes: 1 addition & 2 deletions src/app/cdk/platform-info/browserlist.regexp.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
// tslint:disable-next-line: max-line-length
export const BROWSERLIST_REGEXP =
/((CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS)[ +]+(13[_.]4|13[_.]([5-9]|\d{2,})|13[_.]7|13[_.]([8-9]|\d{2,})|(1[4-9]|[2-9]\d|\d{3,})[_.]\d+|14[_.]0|14[_.]([1-9]|\d{2,})|14[_.]4|14[_.]([5-9]|\d{2,})|14[_.]8|14[_.](9|\d{2,})|(1[5-9]|[2-9]\d|\d{3,})[_.]\d+|15[_.]0|15[_.]([1-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})[_.]\d+|16[_.]0|16[_.]([1-9]|\d{2,})|(1[7-9]|[2-9]\d|\d{3,})[_.]\d+)(?:[_.]\d+)?)|((?:Chrome).*OPR\/(74|(7[5-9]|[8-9]\d|\d{3,}))\.\d+\.\d+)|(Edge\/(80|(8[1-9]|9\d|\d{3,})|83|(8[4-9]|9\d|\d{3,}))(?:\.\d+)?)|((Chromium|Chrome)\/(80|(8[1-9]|9\d|\d{3,})|83|(8[4-9]|9\d|\d{3,}))\.\d+(?:\.\d+)?)|(Version\/(13\.1|13\.([2-9]|\d{2,})|(1[4-9]|[2-9]\d|\d{3,})\.\d+|14\.0|14\.([1-9]|\d{2,})|(1[5-9]|[2-9]\d|\d{3,})\.\d+|15\.0|15\.([1-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})\.\d+|16\.0|16\.([1-9]|\d{2,})|(1[7-9]|[2-9]\d|\d{3,})\.\d+)(?:\.\d+)? Safari\/)|(Firefox\/(78|(79|[8-9]\d|\d{3,}))\.\d+\.\d+)|(Firefox\/(78|(79|[8-9]\d|\d{3,}))\.\d+(pre|[ab]\d+[a-z]*)?)/
export const BROWSERLIST_REGEXP = /((CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS)[ +]+(13[_.]4|13[_.]([5-9]|\d{2,})|13[_.]7|13[_.]([8-9]|\d{2,})|(1[4-9]|[2-9]\d|\d{3,})[_.]\d+|14[_.]0|14[_.]([1-9]|\d{2,})|14[_.]4|14[_.]([5-9]|\d{2,})|14[_.]8|14[_.](9|\d{2,})|(1[5-9]|[2-9]\d|\d{3,})[_.]\d+|15[_.]0|15[_.]([1-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})[_.]\d+|16[_.]0|16[_.]([1-9]|\d{2,})|(1[7-9]|[2-9]\d|\d{3,})[_.]\d+)(?:[_.]\d+)?)|((?:Chrome).*OPR\/(74|(7[5-9]|[8-9]\d|\d{3,}))\.\d+\.\d+)|(Edge\/(80|(8[1-9]|9\d|\d{3,})|83|(8[4-9]|9\d|\d{3,}))(?:\.\d+)?)|((Chromium|Chrome)\/(80|(8[1-9]|9\d|\d{3,})|83|(8[4-9]|9\d|\d{3,}))\.\d+(?:\.\d+)?)|(Version\/(13\.1|13\.([2-9]|\d{2,})|(1[4-9]|[2-9]\d|\d{3,})\.\d+|14\.0|14\.([1-9]|\d{2,})|(1[5-9]|[2-9]\d|\d{3,})\.\d+|15\.0|15\.([1-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})\.\d+|16\.0|16\.([1-9]|\d{2,})|(1[7-9]|[2-9]\d|\d{3,})\.\d+)(?:\.\d+)? Safari\/)|(Firefox\/(78|(79|[8-9]\d|\d{3,}))\.\d+\.\d+)|(Firefox\/(78|(79|[8-9]\d|\d{3,}))\.\d+(pre|[ab]\d+[a-z]*)?)/
12 changes: 0 additions & 12 deletions src/app/cdk/privacy-selector/privacy-selector.module.ts

This file was deleted.

This file was deleted.

Loading

0 comments on commit 5e8ef38

Please sign in to comment.