Skip to content

Commit

Permalink
chore(deps): update taiga-ui (#184)
Browse files Browse the repository at this point in the history
* chore(deps): update taiga-ui

* chore: fix

---------

Co-authored-by: splincode <[email protected]>
  • Loading branch information
taiga-family-bot and splincode authored Aug 31, 2023
1 parent b881889 commit 037897d
Show file tree
Hide file tree
Showing 28 changed files with 457 additions and 236 deletions.
2 changes: 1 addition & 1 deletion apps/demo-cypress/cypress/plugins/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ declare module 'cypress-image-snapshot/plugin' {
}

export interface TuiSnapshotPluginOptions {
newSnapshotMarkFn: (oldSnapshotFileName: string) => string;
newSnapshotMarkEnabled: boolean;
newSnapshotMarkFn: (oldSnapshotFileName: string) => string;
}

export async function tuiAddSnapshotPlugin(
Expand Down
24 changes: 12 additions & 12 deletions apps/demo-cypress/cypress/support/commands/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,27 @@ import {tuiWaitKitDialog} from '../helpers/wait-kit-dialog';
declare global {
namespace Cypress {
interface Chainable {
getByAutomationId(automationId: string): Chainable<JQuery>;

findByAutomationId(automationId: string): Chainable<JQuery>;

tuiVisit: typeof tuiVisit;
getByAutomationId(automationId: string): Chainable<JQuery>;

tuiClickOutside: typeof tuiClickOutside;
tuiFindByExampleId(): Chainable;
tuiFocus(): Chainable;
tuiGetByExampleId(): Chainable;
tuiHide: typeof tuiHide;
tuiShow: typeof tuiShow;
tuiWaitKitDialog: typeof tuiWaitKitDialog;
tuiScrollIntoView(): Chainable;
tuiSetLanguage: typeof tuiSetLanguage;
tuiSetNightMode: typeof tuiSetNightMode;
tuiWaitCodeHighlight: typeof tuiWaitCodeHighlight;
tuiClickOutside: typeof tuiClickOutside;

tuiShow: typeof tuiShow;
tuiTab(direction: 'backward' | 'forward'): Chainable;
tuiGetByExampleId(): Chainable;
tuiFindByExampleId(): Chainable;
tuiVisit: typeof tuiVisit;
tuiWaitAllImgInside(enabled?: boolean): Chainable;
tuiWaitBeforeAction(): Chainable;
tuiWaitBeforeScreenshot(): Chainable;
tuiScrollIntoView(): Chainable;
tuiFocus(): Chainable;
tuiWaitAllImgInside(enabled?: boolean): Chainable;
tuiWaitCodeHighlight: typeof tuiWaitCodeHighlight;
tuiWaitKitDialog: typeof tuiWaitKitDialog;
}

interface Chainer<Subject> {
Expand Down
2 changes: 1 addition & 1 deletion apps/demo-cypress/cypress/support/editor/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export function tuiVisitEditorApiPage({
skipDecodingUrl,
}: Partial<{
content: string;
maxHeight: number;
enableNightMode: boolean;
maxHeight: number;
skipDecodingUrl: boolean;
}> = {}): void {
cy.viewport(1850, 1600).tuiVisit(
Expand Down
32 changes: 16 additions & 16 deletions apps/demo-cypress/cypress/support/helpers/visit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,35 @@ const NEXT_URL_STORAGE_KEY = `env`;
const REPEATED_SLASH_REG = new RegExp(`//`, `g`);

interface TuiVisitOptions {
clock?: Date | null;
enableNightMode?: boolean;
headers?: Record<string, string>;
hideCursor?: boolean;
hideGetHelpLinks?: boolean;
hideHeader?: boolean;
hideLanguageSwitcher?: boolean;
hideNavigation?: boolean;
hideScrollbar?: boolean;
hideVersionManager?: boolean;
/**
* Cypress runs all tests within an iframe.
* Sometimes our app can behave differently if it runs under iframe or not (see util {@link isInsideIframe}).
* This parameter can help to falsify result of {@link isInsideIframe} for certain test run.
*/
inIframe?: boolean;
waitAllIcons?: boolean;
enableNightMode?: boolean;
hideCursor?: boolean;
hideScrollbar?: boolean;
hideVersionManager?: boolean;
hideLanguageSwitcher?: boolean;
hideGetHelpLinks?: boolean;
noSmoothScroll?: boolean;
hideHeader?: boolean;
hideNavigation?: boolean;
stopAnimation?: boolean;
skipDecodingUrl?: boolean;
skipExpectUrl?: boolean;
waitRenderedFont?: RegExp;
rootSelector?: string;
clock?: Date | null;
headers?: Record<string, string>;
/**
* WARNING: this flag does not provide fully emulation of touch mobile device.
* Cypress can't do it (https://docs.cypress.io/faq/questions/general-questions-faq#Do-you-support-native-mobile-apps).
* But you can control token `TUI_IS_MOBILE` by this flag.
*/
pseudoMobile?: boolean;
rootSelector?: string;
skipDecodingUrl?: boolean;
skipExpectUrl?: boolean;
stopAnimation?: boolean;
waitAllIcons?: boolean;
waitRenderedFont?: RegExp;
}

const setBeforeLoadOptions = (
Expand Down
30 changes: 15 additions & 15 deletions apps/demo/src/app/constants/demo-path.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
// eslint-disable-next-line no-restricted-syntax
export const enum TuiDemoPath {
Stackblitz = `stackblitz`,
Anchors = `anchors`,
Changelog = `changelog`,
StarterKit = `starter-kit`,
ColorPicker = `color-picker`,
ColorPickerTool = `custom-tool/color-picker`,
EmbedHtml5 = `embed/html5`,
EmbedIframe = `embed/iframe`,
EmbedYoutube = `embed/youtube`,
Focus = `focus`,
Font = `font`,
Anchors = `anchors`,
Groups = `groups`,
Focus = `focus`,
UploadFiles = `upload-files`,
HighlightCode = `highlight/code`,
HighlightText = `highlight/text`,
ImagesPreview = `images/preview`,
ImagesResizable = `images/resizable`,
ImagesUpload = `images/upload`,
PasteEmojiTool = `custom-tool/paste-emoji`,
ColorPickerTool = `custom-tool/color-picker`,
PasteImageTool = `custom-tool/paste-image`,
HighlightText = `highlight/text`,
HighlightCode = `highlight/code`,
ProcessingLegacyHtml = `processing/legacy-html`,
ProcessingCleanupHtml = `processing/cleanup-html`,
ProcessingLegacyHtml = `processing/legacy-html`,
ProcessingMarkdown = `processing/markdown`,
ImagesResizable = `images/resizable`,
ImagesPreview = `images/preview`,
ImagesUpload = `images/upload`,
EmbedYoutube = `embed/youtube`,
EmbedIframe = `embed/iframe`,
EmbedHtml5 = `embed/html5`,
Stackblitz = `stackblitz`,
StarterKit = `starter-kit`,
UploadFiles = `upload-files`,
}
4 changes: 2 additions & 2 deletions apps/demo/src/app/pages/color-picker/examples/3/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import {BehaviorSubject} from 'rxjs';
})
export class TuiColorPickerExample3 {
colors = new Map([
['red', 'var(--tui-error-fill)'],
['green', 'var(--tui-success-fill)'],
['blue', 'var(--tui-info-fill)'],
['green', 'var(--tui-success-fill)'],
['red', 'var(--tui-error-fill)'],
]);

color$ = new BehaviorSubject('var(--tui-success-fill)');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ const imgbb = {

interface ImgbbResponse {
data: {
expiration: string;
height: string;
id: string;
size: number;
time: string;
title: string;
url: string;
width: string;
height: string;
size: number;
time: string;
expiration: string;
};
success: boolean;
status: number;
success: boolean;
}

@Injectable({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import {tuiRawLoad, tuiTryParseMarkdownCodeBlock} from '@taiga-ui/addon-doc';

interface TuiProjectFiles {
angularJson: string;
tsconfig: string;
mainTs: string;
appModuleTs: string;
indexHtml: string;
mainTs: string;
polyfills: string;
appModuleTs: string;
styles: string;
tsconfig: string;
}

export abstract class AbstractTuiStackblitzResourcesLoader {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import {
} from '@tinkoff/tui-editor/constants';

interface TuiEditLinkParsed {
prefix: string;
path: string;
prefix: string;
}

export function tuiEditLinkParseUrl(url: string = ``): TuiEditLinkParsed {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {merge} from 'rxjs';
import {takeUntil} from 'rxjs/operators';

export interface TuiEditorResizableContainer {
width?: number | string | null;
height?: number | string | null;
width?: number | string | null;
}

@Directive()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class TuiTableCreateComponent {
readonly texts$: Observable<TuiLanguageEditor['toolbarTools']>,
) {}

addTable({rows, cols}: {rows: number; cols: number}): void {
addTable({rows, cols}: {cols: number; rows: number}): void {
this.editor.enter(); // @note: clear previous styles

const prevLine = this.editor.state.selection.anchor;
Expand Down
24 changes: 12 additions & 12 deletions libs/tui-editor/constants/default-editor-colors.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
export const defaultEditorColors = new Map([
[`transparent`, `transparent`],
[`color-black-300`, `#333333`],
[`color-black-200`, `#666666`],
[`color-black-100`, `#909090`],
[`color-yellow-100`, `#FFDD2C`],
[`color-yellow-200`, `#FCC521`],
[`color-yellow-300`, `#FAB618`],
[`color-black-200`, `#666666`],
[`color-black-300`, `#333333`],
[`color-blue-100`, `#1771e6`],
[`color-blue-200`, `#1464cc`],
[`color-blue-300`, `#0953b3`],
[`color-gray-100`, `#f5f5f6`],
[`color-gray-200`, `#e7e8ea`],
[`color-gray-300`, `#cbcfd3`],
[`color-gray-400`, `#959ba4`],
[`color-gray-500`, `#79818c`],
[`color-gray-600`, `#616871`],
[`color-light-blue-100`, `#ecf1f7`],
[`color-light-blue-200`, `#e4ebf3`],
[`color-light-blue-300`, `#dde4ed`],
[`color-blue-100`, `#1771e6`],
[`color-blue-200`, `#1464cc`],
[`color-blue-300`, `#0953b3`],
[`color-green-100`, `#39b54a`],
[`color-green-200`, `#2ca53a`],
[`color-green-300`, `#168a21`],
[`color-light-blue-100`, `#ecf1f7`],
[`color-light-blue-200`, `#e4ebf3`],
[`color-light-blue-300`, `#dde4ed`],
[`color-red-100`, `#e01f19`],
[`color-red-200`, `#d3120e`],
[`color-red-300`, `#c40b08`],
[`color-yellow-100`, `#FFDD2C`],
[`color-yellow-200`, `#FCC521`],
[`color-yellow-300`, `#FAB618`],
[`transparent`, `transparent`],
]);

export const EDITOR_BLANK_COLOR = `rgb(51, 51, 51)`;
40 changes: 20 additions & 20 deletions libs/tui-editor/enums/editor-tool.ts
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
// TODO: change type in v4.0
// eslint-disable-next-line no-restricted-syntax
export enum TuiEditorTool {
Undo = `undo`,
Align = `justify`,
Anchor = `anchor`,
Size = `fontSize`,
Attach = `attach`,
Bold = `bold`,
Italic = `italic`,
Underline = `underline`,
Strikethrough = `strikeThrough`,
Align = `justify`,
List = `list`,
Quote = `quote`,
Color = `foreColor`,
Hilite = `hiliteColor`,
Clear = `clear`,
Link = `link`,
Attach = `attach`,
Tex = `tex`, // Todo
Code = `code`,
Img = `image`,
Color = `foreColor`,
Details = `details`,
Group = `group`,
HR = `insertHorizontalRule`,
Sup = `superscript`,
Sub = `subscript`,
Table = `insertTable`,
Hilite = `hiliteColor`,
Img = `image`,
Italic = `italic`,
Link = `link`,
List = `list`,
MergeCells = `mergeCells`,
SplitCells = `splitCells`,
Quote = `quote`,
RowsColumnsManaging = `rowsColumnsManaging`,
Details = `details`,
Group = `group`,
Size = `fontSize`,
SplitCells = `splitCells`,
Strikethrough = `strikeThrough`,
Sub = `subscript`,
Sup = `superscript`,
Table = `insertTable`,
Tex = `tex`, // Todo
Underline = `underline`,
Undo = `undo`,
}
2 changes: 1 addition & 1 deletion libs/tui-editor/extensions/details/details.extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export interface TuiDetailsOptions {
declare module '@tiptap/core' {
interface Commands<ReturnType> {
details: {
setDetails: () => ReturnType;
removeDetails: () => ReturnType;
setDetails: () => ReturnType;
};
}
}
Expand Down
2 changes: 1 addition & 1 deletion libs/tui-editor/extensions/group/group.extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import {TUI_EDITOR_GROUP_DEFAULT_OPTIONS, TuiEditorGroupOptions} from './group.o
declare module '@tiptap/core' {
interface Commands<ReturnType> {
group: {
removeGroup: () => ReturnType;
setGroup: () => ReturnType;
setGroupHilite: (color: string) => ReturnType;
removeGroup: () => ReturnType;
};
}
}
Expand Down
4 changes: 2 additions & 2 deletions libs/tui-editor/extensions/group/group.options.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export interface TuiEditorGroupOptions {
readonly createOnEnter: boolean;
readonly draggable: boolean;
readonly groupNodeClass: string;
readonly groupPointerNodeClass: string;
readonly draggable: boolean;
readonly nested: boolean;
readonly createOnEnter: boolean;
}

export const TUI_EDITOR_GROUP_DEFAULT_OPTIONS: TuiEditorGroupOptions = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import {InjectionToken} from '@angular/core';

export interface TuiEditableIframeOptions {
minWidth: number;
maxHeight: number;
maxWidth: number;
minHeight: number;
maxHeight: number;
minWidth: number;
}

export interface TuiEditableIframe {
src: string | null;
frameborder?: number | null;
allowfullscreen?: boolean | null;
width?: number | string | null;
frameborder?: number | null;
height?: number | string | null;
src: string | null;
width?: number | string | null;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ export function tuiCreateImageEditorExtension<T, K>({
injector,
draggable,
}: {
injector: Injector;
draggable?: boolean;
injector: Injector;
}): Node {
return createImageEditorExtension<T, K>(injector, {draggable});
}
Loading

0 comments on commit 037897d

Please sign in to comment.