Skip to content

Commit

Permalink
chore(deps): update taiga-ui dev infra to v0.158.0
Browse files Browse the repository at this point in the history
  • Loading branch information
taiga-family-bot authored and splincode committed Sep 5, 2024
1 parent 7941913 commit 30637ee
Show file tree
Hide file tree
Showing 14 changed files with 142 additions and 57 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,19 @@ jobs:
- uses: taiga-family/ci/actions/setup/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]
- run: npm run prettier -- --check
- run: npm run stylelint
- run: npm run lint
- run: |
if [[ "${{ env.SUPPORT_AUTO_PUSH }}" == "true" ]]; then
npm run prettier -- --write
npm run stylelint -- --fix
npm run lint -- --fix
else
npm run prettier -- --check
npm run stylelint
npm run lint
fi
- uses: taiga-family/ci/actions/auto/[email protected]
with:
token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}

concurrency:
group: lint-${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
Expand Down
113 changes: 89 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,21 +108,21 @@
"@swc/core": "1.7.23",
"@swc/helpers": "0.5.13",
"@taiga-ui/addon-doc": "4.5.0",
"@taiga-ui/browserslist-config": "0.157.1",
"@taiga-ui/browserslist-config": "0.158.0",
"@taiga-ui/cdk": "4.5.0",
"@taiga-ui/commitlint-config": "0.157.1",
"@taiga-ui/commitlint-config": "0.158.0",
"@taiga-ui/core": "4.5.0",
"@taiga-ui/eslint-plugin-experience": "0.157.1",
"@taiga-ui/eslint-plugin-experience": "0.158.0",
"@taiga-ui/event-plugins": "4.0.2",
"@taiga-ui/icons": "4.5.0",
"@taiga-ui/layout": "4.5.0",
"@taiga-ui/legacy": "4.5.0",
"@taiga-ui/polymorpheus": "4.7.0",
"@taiga-ui/prettier-config": "0.157.1",
"@taiga-ui/stylelint-config": "0.157.1",
"@taiga-ui/prettier-config": "0.158.0",
"@taiga-ui/stylelint-config": "0.158.0",
"@taiga-ui/styles": "4.5.0",
"@taiga-ui/testing": "4.5.0",
"@taiga-ui/tsconfig": "0.157.1",
"@taiga-ui/tsconfig": "0.158.0",
"@types/express": "4.17.21",
"@types/jasmine": "5.1.4",
"@types/jest": "29.5.12",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
appearance="flat"
size="s"
tuiButton
type="button"
>
{{ size$ | async }}
</button>
Expand All @@ -24,6 +25,7 @@
<button
*ngFor="let size of sizes"
tuiOption
type="button"
(click)="setFontSize(size)"
>
{{ size }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*ngFor="let item of getFilteredItems(items, mentionSuggestions); let i = index"
#button
tuiOption
type="button"
(click)="setMention.emit(item)"
(keydown.enter)="setMention.emit(item)"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class Mentions {
public mentionSuggestions?: string;

@Output()
public setMention = new EventEmitter<User>();
public readonly setMention = new EventEmitter<User>();

@tuiPure
protected getFilteredItems(items: readonly User[], search?: string): readonly User[] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
appearance="secondary"
size="s"
tuiButton
type="button"
(click)="send()"
>
Send
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {ChangeDetectionStrategy, Component, inject} from '@angular/core';
import {FormControl, ReactiveFormsModule} from '@angular/forms';
import {TuiButton, TuiDialogService} from '@taiga-ui/core';
import {TuiButton, TuiDialogService, TuiOption} from '@taiga-ui/core';
import {TUI_EDITOR_EXTENSIONS, TuiEditor, TuiEditorTool} from '@taiga-ui/editor';

@Component({
standalone: true,
imports: [ReactiveFormsModule, TuiButton, TuiEditor],
imports: [ReactiveFormsModule, TuiButton, TuiEditor, TuiOption],
templateUrl: './index.html',
styleUrls: ['./index.less'],
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<button
*ngFor="let item of codeOptionsTexts$ | async; let index = index"
tuiOption
type="button"
(click)="onCode(!!index)"
>
{{ item }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<button
*ngFor="let item of fontsOptions$ | async"
tuiOption
type="button"
[attr.automation-id]="'tui_font__' + (item.name || '' | lowercase)"
[ngClass]="item?.ngClass || {}"
[ngStyle]="item?.ngStyle || {}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<button
*ngFor="let item of group; let j = index"
tuiOption
type="button"
(click)="onTableOption(i * 2 + j)"
>
{{ item }}
Expand Down
30 changes: 15 additions & 15 deletions projects/editor/src/constants/default-editor-tools.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
import {TuiEditorTool} from '../types/editor-tool';

export const TUI_EDITOR_DEFAULT_TOOLS = new Set([
TuiEditorTool.Undo,
TuiEditorTool.Size,
TuiEditorTool.Bold,
TuiEditorTool.Italic,
TuiEditorTool.Underline,
TuiEditorTool.Align,
TuiEditorTool.List,
TuiEditorTool.Quote,
TuiEditorTool.Link,
TuiEditorTool.Anchor,
TuiEditorTool.Color,
TuiEditorTool.Hilite,
TuiEditorTool.Bold,
TuiEditorTool.CellColor,
TuiEditorTool.Clear,
TuiEditorTool.Strikethrough,
TuiEditorTool.Code,
TuiEditorTool.Img,
TuiEditorTool.Color,
TuiEditorTool.Details,
TuiEditorTool.Hilite,
TuiEditorTool.HR,
TuiEditorTool.Sup,
TuiEditorTool.Img,
TuiEditorTool.Italic,
TuiEditorTool.Link,
TuiEditorTool.List,
TuiEditorTool.Quote,
TuiEditorTool.Size,
TuiEditorTool.Strikethrough,
TuiEditorTool.Sub,
TuiEditorTool.Sup,
TuiEditorTool.Table,
TuiEditorTool.CellColor,
TuiEditorTool.Details,
TuiEditorTool.Underline,
TuiEditorTool.Undo,
]);
11 changes: 5 additions & 6 deletions projects/editor/src/extensions/group/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,16 @@ export const tuiCreateGroupExtension = (
setGroupHilite:
(color: string) =>
({editor}) => {
let position = editor.state.selection.$anchor;

/**
* @note:
* we can't mutate DOM directly in tiptap
* find group element for update style attribute
*/
for (
let position = editor.state.selection.$anchor,
depth = position.depth;
depth > 0;
depth--
) {
for (let depth = position.depth; depth > 0; depth--) {
position = editor.state.selection.$anchor;

const node = position.node(depth);

if (node.type.name === this.name) {
Expand Down
Loading

0 comments on commit 30637ee

Please sign in to comment.