Skip to content

Commit

Permalink
chore(front): update libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
cocotime committed Sep 4, 2023
1 parent 753e287 commit fe6d804
Show file tree
Hide file tree
Showing 17 changed files with 8,402 additions and 4,605 deletions.
13 changes: 12 additions & 1 deletion javascript/apps/taiga/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,18 @@
"executor": "@nx/angular:webpack-browser",
"outputs": ["{options.outputPath}"],
"options": {
"allowedCommonJsDependencies": ["angular2-text-mask"],
"allowedCommonJsDependencies": [
"angular2-text-mask",
"copy-to-clipboard",
"diacritic",
"check-password-strength",
"text-mask-core",
"dompurify",
"@messageformat/core",
"flat",
"seedrandom",
"apps/taiga/src/assets/editor/prism.js"
],
"customWebpackConfig": {
"path": "./extra-webpack.config.ts"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
* Copyright (c) 2023-present Kaleidos INC
*/

import { User } from '@ngneat/falso';
import { createActionGroup, emptyProps, props } from '@ngrx/store';
import { DeleteInfo, Language } from '@taiga/data';
import { DeleteInfo, Language, User } from '@taiga/data';

export const userSettingsActions = createActionGroup({
source: 'UserSettings',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Copyright (c) 2023-present Kaleidos INC
}

.content {
align-items: start;
align-items: flex-start;
display: flex;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Copyright (c) 2023-present Kaleidos INC
}

.content {
align-items: start;
align-items: flex-start;
display: flex;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import {
OnInit,
SimpleChanges,
} from '@angular/core';
import { randUserName } from '@ngneat/falso';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { Store } from '@ngrx/store';
import { RxState } from '@rx-angular/state';
Expand Down Expand Up @@ -493,7 +492,7 @@ export class WorkspaceItemComponent
fake?: boolean
) {
if (fake) {
const projectName = randUserName();
const projectName = 'project 123';
const fakeInvitation: WorkspaceProject = {
id: '123',
logoSmall: '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ import {
AfterViewInit,
ChangeDetectorRef,
} from '@angular/core';
import { User } from '@ngneat/falso';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { Store } from '@ngrx/store';
import { RxState } from '@rx-angular/state';
import { Membership, Project, Workspace } from '@taiga/data';
import { Membership, Project, Workspace, User } from '@taiga/data';
import { Subject } from 'rxjs';
import { filter, map, switchMap, take } from 'rxjs/operators';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Copyright (c) 2023-present Kaleidos INC
@import url("tools/typography.css");

.user {
align-items: start;
align-items: flex-start;
display: grid;
gap: var(--spacing-16);
grid-template-columns: 32px 1fr 32px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ tui-notification {
& .t-icon {
color: var(--color-info50);

@nest .t-close & {
.t-close & {
color: var(--color-info80);
}
}
Expand All @@ -131,7 +131,7 @@ tui-notification {
& .t-icon {
color: var(--color-red50);

@nest .t-close & {
.t-close & {
color: var(--color-red80);
}
}
Expand All @@ -157,7 +157,7 @@ tui-notification {
& .t-icon {
color: var(--color-ok50);

@nest .t-close & {
.t-close & {
color: var(--color-ok80);
}
}
Expand All @@ -183,7 +183,7 @@ tui-notification {
& .t-icon {
color: var(--color-warning50);

@nest .t-close & {
.t-close & {
color: var(--color-warning80);
}
}
Expand Down
2 changes: 1 addition & 1 deletion javascript/apps/taiga/src/app/styles/tools/skeleton.css
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Copyright (c) 2023-present Kaleidos INC
@mixin pulseAnimation;
}

@nest .static & {
.static & {
& * {
animation: none;
}
Expand Down
19 changes: 8 additions & 11 deletions javascript/apps/taiga/src/app/transloco/transloco-root.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@ import { HttpClient } from '@angular/common/http';
import { Injectable, NgModule } from '@angular/core';
import {
Translation,
translocoConfig,
TranslocoLoader,
TranslocoModule,
TRANSLOCO_CONFIG,
TRANSLOCO_LOADER,
provideTransloco,
} from '@ngneat/transloco';
import { TranslocoMessageFormatModule } from '@ngneat/transloco-messageformat';
import { provideTranslocoMessageformat } from '@ngneat/transloco-messageformat';
import cacheBusting from '~/assets/i18n/i18n-cache-busting.json';
import { environment } from '~/environments/environment';

Expand All @@ -34,12 +32,11 @@ export class TranslocoHttpLoader implements TranslocoLoader {
}

@NgModule({
imports: [TranslocoMessageFormatModule.forRoot()],
exports: [TranslocoModule],
providers: [
{
provide: TRANSLOCO_CONFIG,
useValue: translocoConfig({
provideTranslocoMessageformat(),
provideTransloco({
config: {
availableLangs: ['en-US'],
defaultLang: 'en-US',
fallbackLang: 'en-US',
Expand All @@ -48,9 +45,9 @@ export class TranslocoHttpLoader implements TranslocoLoader {
flatten: {
aot: environment.production,
},
}),
},
{ provide: TRANSLOCO_LOADER, useClass: TranslocoHttpLoader },
},
loader: TranslocoHttpLoader,
}),
],
})
export class TranslocoRootModule {}
2 changes: 1 addition & 1 deletion javascript/apps/taiga/src/assets/i18n/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
"pagination": {
"next_page": "Next page",
"previous_page": "Previous page",
"page_info": "<span class='page-range'>{pageStart} - {pageEnd}</span> of {total}"
"page_info": "<span class='page-range'>{{pageStart}} - {{pageEnd}}</span> of {{total}}"
},
"common_members_tabs": {
"resend": "Resend",
Expand Down
2 changes: 1 addition & 1 deletion javascript/apps/taiga/src/assets/i18n/es-ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
"pagination": {
"next_page": "Next page",
"previous_page": "Previous page",
"page_info": "<span class='page-range'>{pageStart} - {pageEnd}</span> of {total}"
"page_info": "<span class='page-range'>{{pageStart}} - {{pageEnd}}</span> of {{total}}"
},
"common_members_tabs": {
"resend": "Resend",
Expand Down
2 changes: 2 additions & 0 deletions javascript/libs/ui/src/lib/avatar/avatar.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
import { createComponentFactory, Spectator } from '@ngneat/spectator/jest';
import { AvatarComponent } from './avatar.component';
import { RandomColorService } from '../services/random-color/random-color.service';
import { NO_ERRORS_SCHEMA } from '@angular/core';

describe('AvatarComponent', () => {
let spectator: Spectator<AvatarComponent>;
const createComponent = createComponentFactory({
component: AvatarComponent,
mocks: [RandomColorService],
providers: [],
schemas: [NO_ERRORS_SCHEMA],
});

beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ Copyright (c) 2023-present Kaleidos INC
}

& .extra-info {
align-items: start;
align-items: flex-start;
display: flex;
justify-content: space-between;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@

import { Spectator, createComponentFactory } from '@ngneat/spectator/jest';
import { NumberedPaginationComponent } from './numbered-pagination.component';
import { getTranslocoModule } from '../transloco/transloco-testing.module';

describe('TooltipDirective', () => {
let spectator: Spectator<NumberedPaginationComponent>;
const createComponent = createComponentFactory(NumberedPaginationComponent);
const createComponent = createComponentFactory({
component: NumberedPaginationComponent,
imports: [getTranslocoModule()],
});

it('disable next / previous buttons', () => {
spectator = createComponent({
Expand Down
Loading

0 comments on commit fe6d804

Please sign in to comment.