Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
npm i
npm run formatCheck --workspaces
npx tsc
npx quick-lint-js ./ui/**/*.mjs ./ui/**/*.ts
NODE_V8_COVERAGE=coverage0 npx c8 -r lcovonly --all --src ./ui/src node --experimental-test-coverage ./ui/test/all.mjs
if: ${{ env.TAG_NAME == '' }}

Expand Down
2 changes: 2 additions & 0 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"license": "MIT",
"description": "Terminal UI React.js components library",
"scripts": {
"lint": "quick-lint-js ./**/*.mjs ./**/*.ts",
"test": "tsc && bun test && node ./test/all.mjs",
"format": "prettier **/*.mjs **/*.ts --write",
"formatCheck": "prettier **/*.mjs **/*.ts --check"
Expand Down Expand Up @@ -48,6 +49,7 @@
"c8": "^7.13.0",
"mock-fn": "^1.0.0",
"prettier": "^2.8.8",
"quick-lint-js": "^3.0.0",
"react-assert": "^1.0.3",
"react-test-renderer": "^17.0.1",
"typescript": "^4.9.5"
Expand Down
2 changes: 1 addition & 1 deletion ui/src/Button.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ export interface ButtonProps {
readonly top: number;
readonly label: string;
readonly style: Widgets.Types.TStyle;
readonly onPress(): void;
onPress(): void;
}
2 changes: 1 addition & 1 deletion ui/src/ButtonsPanel.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Widgets } from "blessed";

export interface ButtonsPanelAction {
readonly label: string;
readonly onAction(): void;
onAction(): void;
}

export interface ButtonsPanelProps {
Expand Down
8 changes: 4 additions & 4 deletions ui/src/UiString.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export interface UiString {
readonly strWidth(): number;
readonly toString(): string;
readonly slice(from: number, until: number): string;
readonly ensureWidth(width: number, padCh: string): string;
strWidth(): number;
toString(): string;
slice(from: number, until: number): string;
ensureWidth(width: number, padCh: string): string;
}
2 changes: 1 addition & 1 deletion ui/src/WithSize.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export interface WithSizeProps {
readonly render(width: number, height: number): React.ReactElement | null;
render(width: number, height: number): React.ReactElement | null;
}
4 changes: 2 additions & 2 deletions ui/src/menu/MenuBar.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ export interface MenuBarItem {

export interface MenuBarProps {
readonly items: MenuBarItem[];
readonly onAction(menuIndex: number, subIndex: number): void;
readonly onClose(): void;
onAction(menuIndex: number, subIndex: number): void;
onClose(): void;
}
6 changes: 3 additions & 3 deletions ui/src/menu/MenuPopup.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export interface MenuPopupProps {
readonly title: string;
readonly items: string[];
readonly getLeft(width: number): string;
readonly onSelect(index: number): void;
readonly onClose(): void;
getLeft(width: number): string;
onSelect(index: number): void;
onClose(): void;
}
2 changes: 1 addition & 1 deletion ui/src/menu/SubMenu.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ export interface SubMenuProps {
readonly items: string[];
readonly top: number;
readonly left: number;
readonly onClick(index: number): void;
onClick(index: number): void;
}
2 changes: 1 addition & 1 deletion ui/src/popup/Modal.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ export interface ModalProps {
readonly width: number;
readonly height: number;
readonly style: BlessedStyle;
readonly onCancel(): void;
onCancel(): void;
}
4 changes: 2 additions & 2 deletions ui/src/task/TaskManagerUi.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export interface TaskManagerUiProps {
readonly showLoading: boolean;
readonly onHideStatus(): void;
readonly onCloseErrorPopup(): void;
onHideStatus(): void;
onCloseErrorPopup(): void;
readonly status?: string;
readonly error?: string;
readonly errorDetails?: string;
Expand Down