Browse Source

UI: Angular 15 migration

pull/8204/head
Igor Kulikov 3 years ago
parent
commit
78caf17e07
  1. 4
      application/src/main/data/json/system/widget_bundles/entity_admin_widgets.json
  2. 32
      application/src/main/data/json/system/widget_bundles/input_widgets.json
  3. 1
      ui-ngx/src/app/modules/home/components/entity/entity-details-page.component.scss
  4. 17
      ui-ngx/src/app/modules/home/components/profile/tenant-profile.component.scss
  5. 6
      ui-ngx/src/app/modules/home/components/widget/action/custom-action-pretty-resources-tabs.component.html
  6. 16
      ui-ngx/src/app/modules/home/pages/admin/general-settings.component.html
  7. 12
      ui-ngx/src/app/modules/home/pages/admin/mail-server.component.html
  8. 12
      ui-ngx/src/app/modules/home/pages/admin/oauth2-settings.component.html
  9. 22
      ui-ngx/src/app/modules/home/pages/admin/security-settings.component.html
  10. 4
      ui-ngx/src/app/modules/home/pages/admin/security-settings.component.scss
  11. 4
      ui-ngx/src/app/modules/home/pages/admin/settings-card.scss
  12. 12
      ui-ngx/src/app/modules/home/pages/admin/sms-provider.component.html
  13. 16
      ui-ngx/src/app/modules/home/pages/admin/two-factor-auth-settings.component.html
  14. 4
      ui-ngx/src/app/modules/home/pages/admin/two-factor-auth-settings.component.ts
  15. 2
      ui-ngx/src/app/modules/home/pages/home-links/home-links.component.scss
  16. 10
      ui-ngx/src/app/modules/home/pages/profile/profile.component.html
  17. 10
      ui-ngx/src/app/modules/home/pages/profile/profile.component.scss
  18. 92
      ui-ngx/src/app/modules/home/pages/security/security.component.html
  19. 13
      ui-ngx/src/app/modules/home/pages/security/security.component.scss
  20. 38
      ui-ngx/src/app/modules/home/pages/widget/select-widget-type-dialog.component.scss
  21. 10
      ui-ngx/src/app/modules/home/pages/widget/widget-editor.component.html
  22. 54
      ui-ngx/src/app/modules/home/pages/widget/widget-editor.component.scss
  23. 4
      ui-ngx/src/app/modules/login/pages/login/create-password.component.html
  24. 4
      ui-ngx/src/app/modules/login/pages/login/login.component.html
  25. 2
      ui-ngx/src/app/modules/login/pages/login/reset-password-request.component.html
  26. 4
      ui-ngx/src/app/modules/login/pages/login/reset-password.component.html
  27. 1
      ui-ngx/src/app/shared/components/button/copy-button.component.scss
  28. 11
      ui-ngx/src/app/shared/components/file-input.component.scss
  29. 1
      ui-ngx/src/app/shared/components/footer-fab-buttons.component.scss
  30. 12
      ui-ngx/src/app/shared/components/help-popup.component.html
  31. 30
      ui-ngx/src/app/shared/components/help-popup.component.scss
  32. 11
      ui-ngx/src/app/shared/components/image-input.component.scss
  33. 1
      ui-ngx/src/app/shared/components/snack-bar-component.scss
  34. 2
      ui-ngx/src/app/shared/components/time/timeinterval.component.html
  35. 20
      ui-ngx/src/app/shared/components/time/timewindow-panel.component.html
  36. 10
      ui-ngx/src/app/shared/components/time/timewindow-panel.component.scss
  37. 2
      ui-ngx/src/app/shared/components/toast.directive.ts
  38. 46
      ui-ngx/src/styles.scss

4
application/src/main/data/json/system/widget_bundles/entity_admin_widgets.json

File diff suppressed because one or more lines are too long

32
application/src/main/data/json/system/widget_bundles/input_widgets.json

File diff suppressed because one or more lines are too long

1
ui-ngx/src/app/modules/home/components/entity/entity-details-page.component.scss

@ -79,7 +79,6 @@
.tb-header-button {
.tb-btn-header {
position: relative !important;
display: inline-block !important;
animation: tbMoveFromTopFade .3s ease both;
&.tb-hide {

17
ui-ngx/src/app/modules/home/components/profile/tenant-profile.component.scss

@ -14,23 +14,17 @@
* limitations under the License.
*/
:host ::ng-deep {
/*TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version.
*/
.mat-form-field-infix {
.mat-mdc-form-field-infix {
width: 100% !important;
}
.mat-mdc-checkbox{
&.hinted-checkbox {
/*TODO(mdc-migration): The following rule targets internal classes of checkbox that may no longer apply for the MDC version.
*/
.mat-checkbox-inner-container {
margin-top: 4px;
.mdc-checkbox {
margin-top: -28px;
}
}
/*TODO(mdc-migration): The following rule targets internal classes of checkbox that may no longer apply for the MDC version.
*/
.mat-checkbox-layout{
.mdc-form-field {
white-space: normal;
}
}
@ -47,6 +41,9 @@
.mat-expansion-panel-header {
height: 48px;
&.mat-expanded {
height: 48px;
}
}
.expansion-panel-block {
padding-bottom: 16px;

6
ui-ngx/src/app/modules/home/components/widget/action/custom-action-pretty-resources-tabs.component.html

@ -58,8 +58,7 @@
(click)="beautifyCss()">
{{ 'widget.tidy' | translate }}
</button>
<button mat-button
type="button"
<button type="button"
mat-icon-button class="tb-mat-32"
(click)="cssFullscreen = !cssFullscreen"
matTooltip="{{(cssFullscreen ? 'fullscreen.exit' : 'fullscreen.expand') | translate}}"
@ -77,8 +76,7 @@
type="button" (click)="beautifyHtml()">
{{ 'widget.tidy' | translate }}
</button>
<button mat-button
type="button"
<button type="button"
mat-icon-button class="tb-mat-32"
(click)="htmlFullscreen = !htmlFullscreen"
matTooltip="{{(htmlFullscreen ? 'fullscreen.exit' : 'fullscreen.expand') | translate}}"

16
ui-ngx/src/app/modules/home/pages/admin/general-settings.component.html

@ -17,11 +17,13 @@
-->
<div>
<mat-card appearance="outlined" class="settings-card">
<mat-card-title>
<div fxLayout="row">
<span class="mat-headline-5" translate>admin.general-settings</span>
</div>
</mat-card-title>
<mat-card-header>
<mat-card-title>
<div fxLayout="row">
<span class="mat-headline-5" translate>admin.general-settings</span>
</div>
</mat-card-title>
</mat-card-header>
<mat-progress-bar color="warn" mode="indeterminate" *ngIf="isLoading$ | async">
</mat-progress-bar>
<div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div>
@ -35,10 +37,10 @@
{{ 'admin.base-url-required' | translate }}
</mat-error>
</mat-form-field>
<tb-checkbox formControlName="prohibitDifferentUrl" style="display: block; padding-bottom: 16px;">
<tb-checkbox formControlName="prohibitDifferentUrl" style="display: block;">
{{ 'admin.prohibit-different-url' | translate }}
</tb-checkbox>
<div class="tb-hint" translate>admin.prohibit-different-url-hint</div>
<div class="tb-hint" style="padding-left: 10px;" translate>admin.prohibit-different-url-hint</div>
<div fxLayout="row" fxLayoutAlign="end center" style="width: 100%;" class="layout-wrap">
<button mat-button mat-raised-button color="primary" [disabled]="(isLoading$ | async) || generalSettings.invalid || !generalSettings.dirty"
type="submit">{{'action.save' | translate}}

12
ui-ngx/src/app/modules/home/pages/admin/mail-server.component.html

@ -17,13 +17,13 @@
-->
<div>
<mat-card appearance="outlined" class="settings-card">
<mat-card-title>
<div fxLayout="row">
<mat-card-header>
<mat-card-title>
<span class="mat-headline-5" translate>admin.outgoing-mail-settings</span>
<span fxFlex></span>
<div tb-help="outgoingMailSettings"></div>
</div>
</mat-card-title>
</mat-card-title>
<span fxFlex></span>
<div tb-help="outgoingMailSettings"></div>
</mat-card-header>
<mat-progress-bar color="warn" mode="indeterminate" *ngIf="isLoading$ | async">
</mat-progress-bar>
<div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div>

12
ui-ngx/src/app/modules/home/pages/admin/oauth2-settings.component.html

@ -17,13 +17,13 @@
-->
<div>
<mat-card appearance="outlined" class="settings-card">
<mat-card-title>
<div fxLayout="row">
<mat-card-header>
<mat-card-title>
<span class="mat-headline-5" translate>admin.oauth2.oauth2</span>
<span fxFlex></span>
<div tb-help="oauth2Settings"></div>
</div>
</mat-card-title>
</mat-card-title>
<span fxFlex></span>
<div tb-help="oauth2Settings"></div>
</mat-card-header>
<mat-progress-bar color="warn" mode="indeterminate" *ngIf="isLoading$ | async">
</mat-progress-bar>
<div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div>

22
ui-ngx/src/app/modules/home/pages/admin/security-settings.component.html

@ -16,17 +16,17 @@
-->
<mat-card appearance="outlined" class="settings-card">
<mat-card-title>
<div fxLayout="row">
<mat-card-header>
<mat-card-title>
<span class="mat-headline-5" translate>admin.security-settings</span>
<span fxFlex></span>
<div tb-help="securitySettings"></div>
</div>
</mat-card-title>
</mat-card-title>
<span fxFlex></span>
<div tb-help="securitySettings"></div>
</mat-card-header>
<mat-progress-bar color="warn" mode="indeterminate" *ngIf="isLoading$ | async">
</mat-progress-bar>
<div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div>
<mat-card-content style="padding-top: 16px;">
<mat-card-content>
<form [formGroup]="securitySettingsFormGroup" (ngSubmit)="save()" autocomplete="off">
<fieldset [disabled]="isLoading$ | async">
<fieldset class="fields-group">
@ -160,11 +160,11 @@
</mat-card-content>
</mat-card>
<mat-card appearance="outlined" class="settings-card">
<mat-card-title>
<div fxLayout="row">
<mat-card-header>
<mat-card-title>
<span class="mat-headline-5" translate>admin.jwt.security-settings</span>
</div>
</mat-card-title>
</mat-card-title>
</mat-card-header>
<mat-card-content style="padding-top: 16px;">
<form [formGroup]="jwtSecuritySettingsFormGroup" (ngSubmit)="saveJwtSettings()" autocomplete="off">
<fieldset [disabled]="isLoading$ | async" fxLayout="column" fxLayoutGap="8px">

4
ui-ngx/src/app/modules/home/pages/admin/security-settings.component.scss

@ -22,10 +22,6 @@
margin: 0;
}
.mat-mdc-card-content {
padding: 0 !important;
}
.fields-group {
padding: 8px 16px 0;
margin: 10px 0;

4
ui-ngx/src/app/modules/home/pages/admin/settings-card.scss

@ -16,9 +16,7 @@
@import "../../../../../scss/constants";
:host {
/*TODO(mdc-migration): The following rule targets internal classes of card that may no longer apply for the MDC version.
*/
mat-card.settings-card {
.mat-mdc-card.settings-card {
margin: 8px;
@media #{$mat-md} {

12
ui-ngx/src/app/modules/home/pages/admin/sms-provider.component.html

@ -17,13 +17,13 @@
-->
<div>
<mat-card appearance="outlined" class="settings-card">
<mat-card-title>
<div fxLayout="row">
<mat-card-header>
<mat-card-title>
<span class="mat-headline-5" translate>admin.sms-provider-settings</span>
<span fxFlex></span>
<div tb-help="smsProviderSettings"></div>
</div>
</mat-card-title>
</mat-card-title>
<span fxFlex></span>
<div tb-help="smsProviderSettings"></div>
</mat-card-header>
<mat-progress-bar color="warn" mode="indeterminate" *ngIf="isLoading$ | async">
</mat-progress-bar>
<div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div>

16
ui-ngx/src/app/modules/home/pages/admin/two-factor-auth-settings.component.html

@ -17,13 +17,13 @@
-->
<div>
<mat-card appearance="outlined" class="settings-card">
<mat-card-title>
<div fxLayout="row">
<mat-card-header>
<mat-card-title>
<span class="mat-headline-5" translate>admin.2fa.2fa</span>
<span fxFlex></span>
<div tb-help="twoFactorAuthentication"></div>
</div>
</mat-card-title>
</mat-card-title>
<span fxFlex></span>
<div tb-help="twoFactorAuthentication"></div>
</mat-card-header>
<mat-progress-bar color="warn" mode="indeterminate" *ngIf="isLoading$ | async">
</mat-progress-bar>
<div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div>
@ -38,7 +38,7 @@
<mat-expansion-panel-header>
<mat-panel-title fxLayoutAlign="start center">
<mat-slide-toggle
(click)="toggleExtensionPanel($event, i, provider.get('enable').value)"
(mousedown)="toggleExtensionPanel($event, i, provider.get('enable').value)"
formControlName="enable">
{{ twoFactorAuthProvidersData.get(provider.value.providerType).name | translate }}
</mat-slide-toggle>
@ -153,7 +153,7 @@
<mat-expansion-panel class="provider">
<mat-expansion-panel-header>
<mat-panel-title fxLayoutAlign="start center">
<mat-slide-toggle (click)="toggleExtensionPanel($event, providersForm.length, twoFaFormGroup.get('verificationCodeCheckRateLimitEnable').value)"
<mat-slide-toggle (mousedown)="toggleExtensionPanel($event, providersForm.length, twoFaFormGroup.get('verificationCodeCheckRateLimitEnable').value)"
formControlName="verificationCodeCheckRateLimitEnable">
</mat-slide-toggle>
{{ 'admin.2fa.verification-code-check-rate-limit' | translate }}

4
ui-ngx/src/app/modules/home/pages/admin/two-factor-auth-settings.component.ts

@ -99,9 +99,9 @@ export class TwoFactorAuthSettingsComponent extends PageComponent implements OnI
$event.stopPropagation();
}
if (currentState) {
this.getByIndexPanel(index).close();
} else {
this.getByIndexPanel(index).open();
} else {
this.getByIndexPanel(index).close();
}
}

2
ui-ngx/src/app/modules/home/pages/home-links/home-links.component.scss

@ -52,8 +52,6 @@
&:focus {
border-bottom: none;
}
/*TODO(mdc-migration): The following rule targets internal classes of button that may no longer apply for the MDC version.
*/
display: flex;
flex-direction: column;
align-items: center;

10
ui-ngx/src/app/modules/home/pages/profile/profile.component.html

@ -17,21 +17,19 @@
-->
<div>
<mat-card appearance="outlined" class="profile-card">
<mat-card-title>
<div fxLayout="row" fxLayout.xs="column" fxLayoutGap.xs="8px"
<mat-card-header>
<div fxFlex fxLayout="row" fxLayout.xs="column" fxLayoutGap.xs="8px"
fxLayoutAlign="space-between start" fxLayoutAlign.xs="start start">
<div fxFlex fxLayout="column">
<span class="mat-headline-5" translate>profile.profile</span>
<span class="profile-email" style='opacity: 0.7;'>{{ profile ? profile.get('email').value : '' }}</span>
</div>
<div fxLayout="column">
<span class="mat-subheader" translate>profile.last-login-time</span>
<span class="mat-mdc-subheader" translate>profile.last-login-time</span>
<span class="profile-last-login-ts" style='opacity: 0.7;'>{{ user?.additionalInfo?.lastLoginTs | date:'yyyy-MM-dd HH:mm:ss' }}</span>
</div>
</div>
</mat-card-title>
<mat-card-title>
</mat-card-title>
</mat-card-header>
<mat-progress-bar color="warn" mode="indeterminate" *ngIf="isLoading$ | async">
</mat-progress-bar>
<div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div>

10
ui-ngx/src/app/modules/home/pages/profile/profile.component.scss

@ -16,11 +16,7 @@
@import "../../../../../scss/constants";
:host {
/*TODO(mdc-migration): The following rule targets internal classes of card that may no longer apply for the MDC version.
*/
/*TODO(mdc-migration): The following rule targets internal classes of card that may no longer apply for the MDC version.
*/
mat-card.profile-card {
.mat-mdc-card.profile-card {
margin: 8px;
@media #{$mat-gt-sm} {
width: 60%;
@ -52,9 +48,7 @@
padding-bottom: 12px;
}
}
/*TODO(mdc-migration): The following rule targets internal classes of checkbox that may no longer apply for the MDC version.
*/
mat-checkbox {
.mat-mdc-checkbox {
@media #{$mat-gt-sm} {
margin-top: 16px;
}

92
ui-ngx/src/app/modules/home/pages/security/security.component.html

@ -20,20 +20,18 @@
<mat-card-title style="margin-bottom: 8px;">
<span class="mat-headline-5 card-title" translate>profile.jwt-token</span>
</mat-card-title>
<mat-card-content>
<div fxLayout="row" fxLayoutAlign="space-between center">
<div class="token-text">{{ 'profile.token-valid-till' | translate }} <span class="date">{{ jwtTokenExpiration | date: 'yyyy-MM-dd HH:mm:ss' }}</span></div>
<button mat-raised-button
color="primary"
type="button"
(click)="copyToken()">
<span>{{ 'profile.copy-jwt-token' | translate }}</span>
</button>
</div>
</mat-card-content>
<div fxLayout="row" fxLayoutAlign="space-between center">
<div class="token-text">{{ 'profile.token-valid-till' | translate }} <span class="date">{{ jwtTokenExpiration | date: 'yyyy-MM-dd HH:mm:ss' }}</span></div>
<button mat-raised-button
color="primary"
type="button"
(click)="copyToken()">
<span>{{ 'profile.copy-jwt-token' | translate }}</span>
</button>
</div>
</mat-card>
<mat-card appearance="outlined" class="profile-card" fxLayout="column">
<mat-card-content class="change-password" tb-toast toastTarget="changePassword">
<div class="change-password" tb-toast toastTarget="changePassword">
<form #changePasswordForm="ngForm" [formGroup]="changePassword" (ngSubmit)="onChangePassword(changePasswordForm)">
<div fxLayout="row" fxLayout.xs="column" fxLayoutGap="25px" fxLayoutGap.xs="0">
<div fxFlex="290px" fxFlex.sm="250px" fxFlex.xs="100">
@ -123,7 +121,7 @@
</button>
</div>
</form>
</mat-card-content>
</div>
</mat-card>
<mat-card appearance="outlined" class="profile-card" *ngIf="allowTwoFactorProviders.length">
<mat-card-title style="margin-bottom: 20px;">
@ -132,42 +130,40 @@
<mat-card-subtitle style="margin-bottom: 40px;">
<div class="mat-body-2 description" translate>security.2fa.2fa-description</div>
</mat-card-subtitle>
<mat-card-content>
<h3 class="mat-h3 auth-title" translate>security.2fa.authenticate-with</h3>
<form [formGroup]="twoFactorAuth">
<ng-container *ngFor="let provider of allowTwoFactorProviders; let $last = last; trackBy: trackByProvider">
<div class="provider">
<h4 class="provider-title">{{ providersData.get(provider).name | translate }}</h4>
<div fxLayout="row" fxLayoutAlign="space-between start">
<div class="mat-body-2 description" *ngIf="!twoFactorAuth.get(provider).value; else providerInfo">
{{ providersData.get(provider).description | translate }}
</div>
<ng-template #providerInfo>
<div class="mat-body-2 description">
{{ providersData.get(provider).activatedHint | translate: providerDataInfo(provider) }}
</div>
</ng-template>
<mat-slide-toggle [formControlName]="provider"
(click)="confirm2FAChange($event, provider)">
</mat-slide-toggle>
<h3 class="mat-h3 auth-title" translate>security.2fa.authenticate-with</h3>
<form [formGroup]="twoFactorAuth">
<ng-container *ngFor="let provider of allowTwoFactorProviders; let $last = last; trackBy: trackByProvider">
<div class="provider">
<h4 class="provider-title">{{ providersData.get(provider).name | translate }}</h4>
<div fxLayout="row" fxLayoutAlign="space-between start">
<div class="mat-body-2 description" *ngIf="!twoFactorAuth.get(provider).value; else providerInfo">
{{ providersData.get(provider).description | translate }}
</div>
<mat-checkbox [value]="provider"
[checked]="useByDefault === provider"
(click)="changeDefaultProvider($event, provider)"
[disabled]="(isLoading$ | async)"
*ngIf="twoFactorAuth.get(provider).value && provider !== twoFactorAuthProviderType.BACKUP_CODE && !activeSingleProvider">
<span class="checkbox-label" translate>security.2fa.main-2fa-method</span>
</mat-checkbox>
<button type="button"
mat-stroked-button color="primary"
(click)="generateNewBackupCode()"
*ngIf="twoFactorAuth.get(provider).value && provider === twoFactorAuthProviderType.BACKUP_CODE">
{{ 'security.2fa.get-new-code' | translate }}
</button>
<ng-template #providerInfo>
<div class="mat-body-2 description">
{{ providersData.get(provider).activatedHint | translate: providerDataInfo(provider) }}
</div>
</ng-template>
<mat-slide-toggle [formControlName]="provider"
(mousedown)="confirm2FAChange($event, provider)">
</mat-slide-toggle>
</div>
<mat-divider *ngIf="!$last"></mat-divider>
</ng-container>
</form>
</mat-card-content>
<mat-checkbox [value]="provider"
[checked]="useByDefault === provider"
(click)="changeDefaultProvider($event, provider)"
[disabled]="(isLoading$ | async)"
*ngIf="twoFactorAuth.get(provider).value && provider !== twoFactorAuthProviderType.BACKUP_CODE && !activeSingleProvider">
<span class="checkbox-label" translate>security.2fa.main-2fa-method</span>
</mat-checkbox>
<button type="button"
mat-stroked-button color="primary"
(click)="generateNewBackupCode()"
*ngIf="twoFactorAuth.get(provider).value && provider === twoFactorAuthProviderType.BACKUP_CODE">
{{ 'security.2fa.get-new-code' | translate }}
</button>
</div>
<mat-divider *ngIf="!$last"></mat-divider>
</ng-container>
</form>
</mat-card>
</div>

13
ui-ngx/src/app/modules/home/pages/security/security.component.scss

@ -19,11 +19,7 @@
.profile-container {
padding: 8px;
}
/*TODO(mdc-migration): The following rule targets internal classes of card that may no longer apply for the MDC version.
*/
/*TODO(mdc-migration): The following rule targets internal classes of card that may no longer apply for the MDC version.
*/
mat-card.profile-card {
.mat-mdc-card.profile-card {
padding: 24px;
@media #{$mat-gt-sm} {
width: 80%;
@ -126,10 +122,3 @@
}
}
}
:host ::ng-deep {
/*TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version.
*/
.mat-form-field-appearance-fill .mat-form-field-underline::before {
background-color: transparent;
}
}

38
ui-ngx/src/app/modules/home/pages/widget/select-widget-type-dialog.component.scss

@ -14,31 +14,25 @@
* limitations under the License.
*/
:host ::ng-deep {
button.tb-card-button {
.mat-mdc-button-base.tb-card-button {
width: 100%;
height: 100%;
max-width: 240px;
/*TODO(mdc-migration): The following rule targets internal classes of button that may no longer apply for the MDC version.
*/
.mat-button-wrapper {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
mat-icon {
margin: auto;
}
span {
height: 18px;
min-height: 18px;
max-height: 18px;
margin: 0 0 20px 0;
font-size: 18px;
font-weight: 400;
line-height: 18px;
white-space: normal;
}
display: flex;
flex-direction: column;
align-items: center;
mat-icon {
margin: auto;
}
span.mdc-button__label {
height: 18px;
min-height: 18px;
max-height: 18px;
margin: 0 0 20px 0;
font-size: 18px;
font-weight: 400;
line-height: 18px;
white-space: normal;
}
&.mat-mdc-raised-button.mat-primary {
.mat-ripple-element {

10
ui-ngx/src/app/modules/home/pages/widget/widget-editor.component.html

@ -19,13 +19,13 @@
<div fxFlex fxLayout="column" tb-fullscreen [fullscreen]="fullscreen" tb-hotkeys [hotkeys]="hotKeys" [cheatSheet]="cheatSheetComponent">
<tb-hotkeys-cheatsheet #cheatSheetComponent></tb-hotkeys-cheatsheet>
<mat-toolbar class="mat-elevation-z1 tb-edit-toolbar mat-hue-3" fxLayoutGap="16px" fxLayoutGap.lt-xl="8px">
<mat-form-field floatLabel="always" hideRequiredMarker class="tb-widget-title">
<mat-form-field floatLabel="always" hideRequiredMarker class="tb-widget-title tb-appearance-transparent">
<mat-label></mat-label>
<input [disabled]="isReadOnly" matInput required maxlength="255"
[(ngModel)]="widget.widgetName" (ngModelChange)="isDirty = true"
placeholder="{{ 'widget.title' | translate }}"/>
</mat-form-field>
<mat-form-field>
<mat-form-field class="tb-appearance-transparent">
<mat-select [disabled]="isReadOnly" matInput placeholder="{{ 'widget.type' | translate }}"
[(ngModel)]="widget.type" (ngModelChange)="widetTypeChanged()">
<mat-option *ngFor="let type of allWidgetTypes" [value]="type">
@ -116,14 +116,14 @@
<div class="tb-editor tb-absolute-fill">
<div #topPanel class="tb-split tb-split-vertical">
<div #topLeftPanel class="tb-split tb-content">
<mat-tab-group selectedIndex="1" dynamicHeight="true" style="width: 100%; height: 100%;">
<mat-tab-group mat-stretch-tabs="false" selectedIndex="1" dynamicHeight="true" style="width: 100%; height: 100%;">
<mat-tab label="{{ 'widget.resources' | translate }}">
<div class="tb-resize-container" style="background-color: #fff;">
<div class="mat-padding">
<div fxFlex fxLayout="row" style="max-height: 40px;"
fxLayoutAlign="start center"
*ngFor="let resource of widget.resources; let i = index" >
<mat-form-field fxFlex class="mat-block resource-field" floatLabel="never"
<mat-form-field fxFlex class="mat-block resource-field" hideRequiredMarker="false"
style="margin: 10px 0 0 0; max-height: 40px;">
<input required matInput [(ngModel)]="resource.url"
(ngModelChange)="isDirty = true"
@ -188,7 +188,7 @@
</mat-tab-group>
</div>
<div #topRightPanel class="tb-split tb-content">
<mat-tab-group dynamicHeight="true" style="width: 100%; height: 100%;">
<mat-tab-group mat-stretch-tabs="false" dynamicHeight="true" style="width: 100%; height: 100%;">
<mat-tab label="{{ 'widget.settings-schema' | translate }}">
<div class="tb-resize-container" tb-fullscreen [fullscreen]="jsonSettingsFullscreen">
<div class="tb-editor-area-title-panel">

54
ui-ngx/src/app/modules/home/pages/widget/widget-editor.component.scss

@ -34,31 +34,17 @@ tb-widget-editor {
mat-form-field.resource-field {
max-height: 40px;
margin: 10px 0 0;
/*TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version.
*/
/*TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version.
*/
/*TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version.
*/
.mat-form-field-wrapper {
.mat-mdc-text-field-wrapper {
padding-bottom: 0;
/*TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version.
*/
/*TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version.
*/
.mat-form-field-flex {
.mat-mdc-form-field-flex {
max-height: 40px;
/*TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version.
*/
.mat-form-field-infix {
.mat-mdc-form-field-infix {
border: 0;
padding-top: 7px;
padding-bottom: 7px;
min-height: 32px;
}
}
/*TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version.
*/
.mat-form-field-underline {
bottom: 0;
}
}
}
@ -105,12 +91,11 @@ tb-widget-editor {
width: 100%;
height: 100%;
}
/*TODO(mdc-migration): The following rule targets internal classes of tabs that may no longer apply for the MDC version.
*/
.mat-tab-label[aria-labelledby='hidden'] {
width: 0px !important;
min-width: 0px;
padding: 0px;
.mdc-tab[aria-labelledby='hidden'] {
width: 0 !important;
min-width: 0;
padding: 0;
overflow: hidden;
}
}
@ -151,7 +136,7 @@ div.tb-editor-area-title-panel {
border-radius: 5px;
}
button.mat-mdc-button, button.mat-mdc-icon-button, button.mat-icon-button.tb-mat-32 {
button.mat-mdc-button-base, button.mat-mdc-button-base.tb-mat-32 {
align-items: center;
vertical-align: middle;
min-width: 32px;
@ -164,6 +149,9 @@ div.tb-editor-area-title-panel {
color: #7b7b7b;
}
}
button.mat-mdc-button-base:not(.mat-mdc-icon-button) {
height: 23px;
}
.tb-help-popup-button-loading {
background: #f3f3f3;
}
@ -192,6 +180,7 @@ mat-toolbar.tb-edit-toolbar {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 28px;
mat-icon {
height: 20px;
@ -200,24 +189,19 @@ mat-toolbar.tb-edit-toolbar {
}
}
mat-form-field {
input, mat-select {
.mat-mdc-form-field {
input, .mat-mdc-select {
font-size: 1.1rem;
font-weight: 400;
letter-spacing: .005em;
}
/*TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version.
*/
div.mat-form-field-infix {
padding-bottom: 5px;
}
&.tb-widget-title {
min-width: 250px;
}
}
@media #{$mat-lt-lg} {
mat-form-field.tb-widget-title {
.mat-mdc-form-field.tb-widget-title {
min-width: 0;
}
}

4
ui-ngx/src/app/modules/login/pages/login/create-password.component.html

@ -30,13 +30,13 @@
<fieldset [disabled]="isLoading$ | async">
<div tb-toast fxLayout="column" class="layout-padding">
<span style="height: 50px;"></span>
<mat-form-field class="mat-block">
<mat-form-field class="mat-block tb-appearance-transparent">
<mat-label translate>common.password</mat-label>
<input matInput type="password" autofocus formControlName="password"/>
<mat-icon class="material-icons" matPrefix>lock</mat-icon>
<tb-toggle-password matSuffix></tb-toggle-password>
</mat-form-field>
<mat-form-field class="mat-block">
<mat-form-field class="mat-block tb-appearance-transparent">
<mat-label translate>login.password-again</mat-label>
<input matInput type="password" formControlName="password2"/>
<mat-icon class="material-icons" matPrefix>lock</mat-icon>

4
ui-ngx/src/app/modules/login/pages/login/login.component.html

@ -41,7 +41,7 @@
<div class="line"><mat-divider></mat-divider></div>
</div>
</div>
<mat-form-field>
<mat-form-field class="tb-appearance-transparent">
<mat-label translate>login.username</mat-label>
<input id="username-input" matInput type="email" autofocus formControlName="username" email required/>
<mat-icon matPrefix>email</mat-icon>
@ -49,7 +49,7 @@
{{ 'user.invalid-email-format' | translate }}
</mat-error>
</mat-form-field>
<mat-form-field>
<mat-form-field class="tb-appearance-transparent">
<mat-label translate>common.password</mat-label>
<input id="password-input" matInput type="password" formControlName="password"/>
<tb-toggle-password matSuffix></tb-toggle-password>

2
ui-ngx/src/app/modules/login/pages/login/reset-password-request.component.html

@ -31,7 +31,7 @@
<fieldset [disabled]="isLoading$ | async">
<div tb-toast fxLayout="column" class="layout-padding">
<span style="height: 50px;"></span>
<mat-form-field class="mat-block" hideRequiredMarker>
<mat-form-field class="mat-block tb-appearance-transparent" hideRequiredMarker>
<mat-label translate>login.email</mat-label>
<input matInput type="email" autofocus formControlName="email" email required/>
<mat-icon class="material-icons" matPrefix>email</mat-icon>

4
ui-ngx/src/app/modules/login/pages/login/reset-password.component.html

@ -33,13 +33,13 @@
<fieldset [disabled]="isLoading$ | async">
<div tb-toast fxLayout="column" class="layout-padding">
<span style="height: 50px;"></span>
<mat-form-field class="mat-block">
<mat-form-field class="mat-block tb-appearance-transparent">
<mat-label translate>login.new-password</mat-label>
<input matInput type="password" autofocus formControlName="newPassword"/>
<mat-icon class="material-icons" matPrefix>lock</mat-icon>
<tb-toggle-password matSuffix></tb-toggle-password>
</mat-form-field>
<mat-form-field class="mat-block">
<mat-form-field class="mat-block tb-appearance-transparent">
<mat-label translate>login.new-password-again</mat-label>
<input matInput type="password" formControlName="newPassword2"/>
<mat-icon class="material-icons" matPrefix>lock</mat-icon>

1
ui-ngx/src/app/shared/components/button/copy-button.component.scss

@ -18,6 +18,7 @@
height: 32px;
width: 32px;
line-height: 32px;
padding: 4px;
.mat-icon.copied{
color: #00C851 !important;
}

11
ui-ngx/src/app/shared/components/file-input.component.scss

@ -87,15 +87,10 @@ $previewSize: 100px !default;
button.browse-file {
padding: 0;
font-size: 16px;
/*TODO(mdc-migration): The following rule targets internal classes of button that may no longer apply for the MDC version.
*/
span.mat-button-wrapper {
span.mdc-button__label {
display: block;
label {
display: block;
cursor: pointer;
padding: 0 16px;
}
cursor: pointer;
padding: 0 16px;
}
}
}

1
ui-ngx/src/app/shared/components/footer-fab-buttons.component.scss

@ -43,7 +43,6 @@
margin-top: 0;
}
position: relative !important;
display: inline-block !important;
animation: tbMoveFromBottomFade .3s ease both;
&.tb-hide {

12
ui-ngx/src/app/shared/components/help-popup.component.html

@ -37,11 +37,13 @@
color="primary"
class="tb-help-popup-text-button"
[ngClass]="{'mat-stroked-button': popoverVisible && popoverReady}">
<ng-container *ngIf="triggerSafeHtml">
<span [style]="triggerStyle" [innerHTML]="triggerSafeHtml"></span>
</ng-container>
<mat-icon *ngIf="!popoverVisible || popoverReady" class="tb-mat-16">open_in_new</mat-icon>
<mat-spinner *ngIf="popoverVisible && !popoverReady" mode="indeterminate" diameter="16" strokeWidth="2"></mat-spinner>
<span>
<ng-container *ngIf="triggerSafeHtml">
<span [style]="triggerStyle" [innerHTML]="triggerSafeHtml"></span>
</ng-container>
<mat-icon *ngIf="!popoverVisible || popoverReady" class="tb-mat-16">open_in_new</mat-icon>
<mat-spinner *ngIf="popoverVisible && !popoverReady" mode="indeterminate" diameter="16" strokeWidth="2"></mat-spinner>
</span>
</button>
</div>
</fieldset>

30
ui-ngx/src/app/shared/components/help-popup.component.scss

@ -29,27 +29,39 @@
border-radius: 50%;
width: 32px !important;
height: 32px !important;
svg {
.mdc-circular-progress__indeterminate-container {
width: 20px;
height: 20px;
top: 6px;
left: 6px;
}
svg {
width: 20px;
height: 20px;
}
}
}
.tb-help-popup-text-button {
.tb-help-popup-text-button.mat-mdc-button.mat-mdc-button-base {
position: relative;
padding: 0 2px 0 8px;
line-height: 28px;
height: auto;
&.mat-mdc-outlined-button {
padding: 0 1px 0 7px;
line-height: 26px;
}
.mat-icon {
padding-left: 4px;
}
.mat-mdc-progress-spinner {
display: inline-block;
margin-left: 4px;
margin-right: 5px;
.mdc-button__label > span {
.mat-icon {
vertical-align: middle;
padding-left: 4px;
box-sizing: initial;
}
.mat-mdc-progress-spinner {
display: inline-block;
margin-left: 4px;
margin-right: 5px;
vertical-align: middle;
}
}
}

11
ui-ngx/src/app/shared/components/image-input.component.scss

@ -140,15 +140,10 @@ $previewSize: 96px !default;
button.browse-file {
padding: 0;
font-size: 16px;
/*TODO(mdc-migration): The following rule targets internal classes of button that may no longer apply for the MDC version.
*/
span.mat-button-wrapper {
span.mdc-button__label {
display: block;
label {
display: block;
cursor: pointer;
padding: 0 16px;
}
cursor: pointer;
padding: 0 16px;
}
}
}

1
ui-ngx/src/app/shared/components/snack-bar-component.scss

@ -56,6 +56,7 @@
}
button {
margin: 6px 0 6px 12px;
color: inherit;
}
&.info-toast {
background: #323232;

2
ui-ngx/src/app/shared/components/time/timeinterval.component.html

@ -16,7 +16,7 @@
-->
<section fxLayout="row" fxLayoutAlign="start start" fxLayoutGap="8px">
<section fxLayout="column" [fxShow]="isEdit">
<section fxLayout="column" fxLayoutAlign="start center" [fxShow]="isEdit">
<label class="tb-small hide-label" translate>timewindow.hide</label>
<mat-checkbox [(ngModel)]="hideFlag" (ngModelChange)="onHideFlagChange()"></mat-checkbox>
</section>

20
ui-ngx/src/app/shared/components/time/timewindow-panel.component.html

@ -22,7 +22,7 @@
(selectedIndexChange)="timewindowForm.markAsDirty()" [(selectedIndex)]="timewindow.selectedTab">
<mat-tab label="{{ 'timewindow.realtime' | translate }}">
<section fxLayout="row">
<section *ngIf="isEdit" fxLayout="column" style="padding-top: 8px; padding-left: 16px;">
<section *ngIf="isEdit" fxLayout="column" fxLayoutAlign="start center" style="padding-top: 8px; padding-left: 16px;">
<label class="tb-small hide-label" translate>timewindow.hide</label>
<mat-checkbox [ngModelOptions]="{standalone: true}" [(ngModel)]="timewindow.hideInterval"
(ngModelChange)="onHideIntervalChanged()"></mat-checkbox>
@ -33,7 +33,7 @@
formControlName="realtimeType">
<mat-radio-button [value]="realtimeTypes.LAST_INTERVAL" color="primary">
<section fxLayout="row">
<section *ngIf="isEdit" fxLayout="column" style="padding-right: 8px;">
<section *ngIf="isEdit" fxLayout="column" fxLayoutAlign="start center" style="padding-right: 8px;">
<label class="tb-small hide-label" translate>timewindow.hide</label>
<mat-checkbox [ngModelOptions]="{standalone: true}" [(ngModel)]="timewindow.hideLastInterval"
(ngModelChange)="onHideLastIntervalChanged()"></mat-checkbox>
@ -52,7 +52,7 @@
</mat-radio-button>
<mat-radio-button [value]="realtimeTypes.INTERVAL" color="primary">
<section fxLayout="row">
<section *ngIf="isEdit" fxLayout="column" style="padding-right: 8px;">
<section *ngIf="isEdit" fxLayout="column" fxLayoutAlign="start center" style="padding-right: 8px;">
<label class="tb-small hide-label" translate>timewindow.hide</label>
<mat-checkbox [ngModelOptions]="{standalone: true}" [(ngModel)]="timewindow.hideQuickInterval"
(ngModelChange)="onHideQuickIntervalChanged()"></mat-checkbox>
@ -86,7 +86,7 @@
</mat-tab>
<mat-tab label="{{ 'timewindow.history' | translate }}">
<section fxLayout="row">
<section *ngIf="isEdit" fxLayout="column" style="padding-top: 8px; padding-left: 16px;">
<section *ngIf="isEdit" fxLayout="column" fxLayoutAlign="start center" style="padding-top: 8px; padding-left: 16px;">
<label class="tb-small hide-label" translate>timewindow.hide</label>
<mat-checkbox [ngModelOptions]="{standalone: true}" [(ngModel)]="timewindow.hideInterval"
(ngModelChange)="onHideIntervalChanged()"></mat-checkbox>
@ -139,7 +139,7 @@
</mat-tab-group>
<div *ngIf="aggregation" formGroupName="aggregation" class="mat-content mat-padding" fxLayout="column">
<section fxLayout="row">
<section fxLayout="column" [fxShow]="isEdit">
<section fxLayout="column" fxLayoutAlign="start center" [fxShow]="isEdit">
<label class="tb-small hide-label" translate>timewindow.hide</label>
<mat-checkbox [ngModelOptions]="{standalone: true}" [(ngModel)]="timewindow.hideAggregation"
(ngModelChange)="onHideAggregationChanged()"></mat-checkbox>
@ -156,7 +156,7 @@
</section>
</section>
<section fxLayout="row" *ngIf="timewindowForm.get('aggregation.type').value === aggregationTypes.NONE">
<section fxLayout="column" [fxShow]="isEdit">
<section fxLayout="column" fxLayoutAlign="start center" [fxShow]="isEdit">
<label class="tb-small hide-label" translate>timewindow.hide</label>
<mat-checkbox [ngModelOptions]="{standalone: true}" [(ngModel)]="timewindow.hideAggInterval"
(ngModelChange)="onHideAggIntervalChanged()"></mat-checkbox>
@ -166,10 +166,10 @@
fxLayout.xs="column" fxLayoutAlign.xs="stretch">
<label translate>aggregation.limit</label>
<div fxLayout="row" fxLayoutAlign="start center" fxFlex>
<mat-slider fxFlex formControlName="limit"
thumbLabel
<mat-slider fxFlex
discrete
min="{{minDatapointsLimit()}}"
max="{{maxDatapointsLimit()}}"><input matSliderThumb [value]="timewindowForm.get('aggregation.limit').value" />
max="{{maxDatapointsLimit()}}"><input matSliderThumb formControlName="limit" />
</mat-slider>
<mat-form-field class="limit-slider-value">
<input matInput formControlName="limit" type="number" step="1"
@ -207,7 +207,7 @@
</tb-timeinterval>
</div>
<div *ngIf="timezone" class="mat-content mat-padding" fxLayout="row">
<section fxLayout="column" [fxShow]="isEdit">
<section fxLayout="column" fxLayoutAlign="start center" [fxShow]="isEdit">
<label class="tb-small hide-label" translate>timewindow.hide</label>
<mat-checkbox [ngModelOptions]="{standalone: true}" [(ngModel)]="timewindow.hideTimezone"
(ngModelChange)="onHideTimezoneChanged()"></mat-checkbox>

10
ui-ngx/src/app/shared/components/time/timewindow-panel.component.scss

@ -45,7 +45,7 @@
.limit-slider-value {
margin-left: 16px;
min-width: 25px;
max-width: 80px;
max-width: 100px;
}
mat-form-field input[type=number] {
text-align: center;
@ -78,12 +78,4 @@
}
}
}
/*TODO(mdc-migration): The following rule targets internal classes of slider that may no longer apply for the MDC version.
*/
.mat-slider-horizontal .mat-slider-thumb-label {
width: 38px;
height: 38px;
top: -46px;
right: -19px;
}
}

2
ui-ngx/src/app/shared/components/toast.directive.ts

@ -312,7 +312,7 @@ export class TbSnackBarComponent implements AfterViewInit, OnDestroy {
ngAfterViewInit() {
if (this.snackBarRef) {
this.parentEl = this.data.parent.nativeElement;
this.snackBarContainerEl = $(this.elementRef.nativeElement).closest('snack-bar-container')[0];
this.snackBarContainerEl = $(this.elementRef.nativeElement).closest('.mat-mdc-snack-bar-container')[0];
this.snackBarContainerEl.style.position = 'absolute';
this.updateContainerRect();
this.updatePosition(this.snackBarRef.containerInstance.snackBarConfig);

46
ui-ngx/src/styles.scss

@ -196,7 +196,6 @@ section.tb-footer-buttons {
.tb-btn-footer {
margin: 6px 8px;
position: relative !important;
display: inline-block !important;
animation: tbMoveFromBottomFade .3s ease both;
&.tb-hide {
animation: tbMoveToBottomFade .3s ease both;
@ -947,6 +946,22 @@ mat-label {
.mat-mdc-select-arrow-wrapper {
transform: none;
}
.mdc-text-field {
.mdc-floating-label:not(.mdc-floating-label--float-above) {
transform: translateY(-10%);
}
}
.mat-mdc-form-field-icon-prefix, .mat-mdc-form-field-icon-suffix {
align-self: end;
> .mat-icon {
padding-bottom: 4px;
}
.mat-mdc-icon-button.mat-mdc-button-base {
width: 36px;
height: 36px;
padding: 6px;
}
}
.mat-mdc-text-field-wrapper {
.mat-mdc-form-field-flex {
.mat-mdc-floating-label {
@ -1225,18 +1240,14 @@ mat-label {
min-width: inherit;
pointer-events: none;
display: flex;
}
.mat-mdc-snack-bar-handset {
.mat-mdc-snack-bar-container {
position: relative !important;
width: 100% !important;
top: 0 !important;
left: 0 !important;
height: inherit !important;
tb-snack-bar-component {
width: 100%;
}
.mdc-snackbar__surface {
padding: 0;
border: none;
background: none;
box-shadow: none;
}
.mdc-snackbar__label {
padding: 0;
}
}
@ -1405,8 +1416,13 @@ mat-label {
text-align: center;
}
.mat-mdc-tab-group.tb-headless {
margin-top: -50px;
.mat-mdc-tab-group {
&.tb-headless {
margin-top: -50px;
}
.mat-mdc-tab-header {
border-bottom: 1px solid #0000001f;
}
}
.tb-primary-background {

Loading…
Cancel
Save