Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build problems #792

Merged
merged 4 commits into from
Mar 5, 2024
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 cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"stringz",
"stylelint",
"Stylesheet",
"testid",
"typedefs",
"unlocalized",
"unregistering",
Expand Down
7 changes: 7 additions & 0 deletions extensions/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ module.exports = {
'no-console': 'off',
},
},
{
files: ['*.d.ts'],
rules: {
// Allow .d.ts files to self import so they can refer to their types in `papi-shared-types`
'import/no-self-import': 'off',
},
},
],
parserOptions: {
ecmaVersion: 2022,
Expand Down
2 changes: 2 additions & 0 deletions extensions/package-lock.json

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

1 change: 0 additions & 1 deletion extensions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"platform-bible-utils": "file:../lib/platform-bible-utils"
},
"devDependencies": {
"@biblionexus-foundation/platform-editor": "^0.0.5",
"@emotion/react": "^11.11.3",
"@emotion/styled": "^11.11.0",
"@mui/material": "^5.15.6",
Expand Down
7 changes: 7 additions & 0 deletions extensions/src/hello-someone/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ module.exports = {
'no-console': 'off',
},
},
{
files: ['*.d.ts'],
rules: {
// Allow .d.ts files to self import so they can refer to their types in `papi-shared-types`
'import/no-self-import': 'off',
},
},
],
parserOptions: {
ecmaVersion: 2022,
Expand Down
7 changes: 7 additions & 0 deletions extensions/src/hello-world/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ module.exports = {
'no-console': 'off',
},
},
{
files: ['*.d.ts'],
rules: {
// Allow .d.ts files to self import so they can refer to their types in `papi-shared-types`
'import/no-self-import': 'off',
},
},
],
parserOptions: {
ecmaVersion: 2022,
Expand Down
7 changes: 7 additions & 0 deletions extensions/src/quick-verse/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ module.exports = {
'no-console': 'off',
},
},
{
files: ['*.d.ts'],
rules: {
// Allow .d.ts files to self import so they can refer to their types in `papi-shared-types`
'import/no-self-import': 'off',
},
},
],
parserOptions: {
ecmaVersion: 2022,
Expand Down
1 change: 1 addition & 0 deletions extensions/src/resource-viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"platform-bible-utils": "file:../../../lib/platform-bible-utils"
},
"devDependencies": {
"@biblionexus-foundation/platform-editor": "^0.0.5",
"@swc/core": "^1.4.2",
"@types/node": "^20.11.19",
"@types/react": "^18.2.57",
Expand Down
1 change: 1 addition & 0 deletions lib/papi-dts/package-lock.json

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

38 changes: 38 additions & 0 deletions lib/platform-bible-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,41 @@ TODO:

- [ ] Decide if this package will be public, if not it will probably need an NPM organization setup to publish it to privately.
- [ ] What NPM user login will we use to publish it (each developer or an app-wide user)?

### Building

#### Setting up

To set up the dev environment to build, you must do a couple of things **in order**:

1. `npm i` (here)
2. `npm i --ignore-scripts` (in `paranext-core` root)

Note: `--ignore-scripts` is only to prevent unnecessary work. You can leave it out if you want.

Note: any time you run any `npm` commands related to installing or uninstalling packages, you must
run `npm i --ignore-scripts` in `paranext-core` root again in order to run commands in here
successfully. This used to be run automatically, but linux developers were experiencing significant
issues with it.

#### Building `platform-bible-react`

Once you have set up your environment, you can run the build command in this folder to build `platform-bible-react`:

```bash
npm run build
```

Or you can build from `paranext-core`:

```bash
npm run build:platform-bible-react
```

If you want a quick build that doesn't lint, run the following:

```bash
npm run build:basic
```

Do not commit changes after running this basic build. Before committing, always run a full build.
973 changes: 504 additions & 469 deletions lib/platform-bible-react/dist/index.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/platform-bible-react/dist/index.cjs.map

Large diffs are not rendered by default.

18 changes: 14 additions & 4 deletions lib/platform-bible-react/dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -626,17 +626,27 @@ export type SwitchProps = {
*/
export declare function Switch({ id, isChecked: checked, isDisabled, hasError, className, onChange, }: SwitchProps): import("react/jsx-runtime").JSX.Element;
export interface TableCalculatedColumn<R> extends TableColumn<R> {
readonly parent: TableCalculatedColumnParent<R> | undefined;
readonly idx: number;
readonly level: number;
readonly width: number | string;
readonly minWidth: number;
readonly maxWidth: number | undefined;
readonly resizable: boolean;
readonly sortable: boolean;
readonly draggable: boolean;
readonly frozen: boolean;
readonly isLastFrozenColumn: boolean;
readonly rowGroup: boolean;
readonly renderCell: (props: RenderCellProps<R>) => React$1.ReactNode;
}
export declare interface TableCalculatedColumnParent<R> {
readonly name: string | React$1.ReactElement;
readonly parent: TableCalculatedColumnParent<R> | undefined;
readonly idx: number;
readonly colSpan: number;
readonly level: number;
readonly headerCellClass?: string | null;
}
export type TableCellClickArgs<R> = CellClickArgs<R>;
export type TableCellKeyboardEvent = CellKeyboardEvent;
export type TableCellKeyDownArgs<R> = CellKeyDownArgs<R>;
Expand Down Expand Up @@ -814,16 +824,16 @@ export type TableProps<R> = {
onPaste?: (event: TablePasteEvent<R>) => R;
/** Additional css classes to help with unique styling of the table */
className?: string;
/** Optional unique identifier */
id?: string;
/** Optional unique identifier for testing */
"data-testid"?: string;
};
/**
* Configurable table component
*
* Thanks to Adazzle for heavy inspiration and documentation
* https://adazzle.github.io/react-data-grid/
*/
export declare function Table<R>({ columns, sortColumns, onSortColumnsChange, onColumnResize, defaultColumnWidth, defaultColumnMinWidth, defaultColumnMaxWidth, defaultColumnSortable, defaultColumnResizable, rows, enableSelectColumn, selectColumnWidth, rowKeyGetter, rowHeight, headerRowHeight, selectedRows, onSelectedRowsChange, onRowsChange, onCellClick, onCellDoubleClick, onCellContextMenu, onCellKeyDown, direction, enableVirtualization, onCopy, onPaste, onScroll, className, id, }: TableProps<R>): import("react/jsx-runtime").JSX.Element;
export declare function Table<R>({ columns, sortColumns, onSortColumnsChange, onColumnResize, defaultColumnWidth, defaultColumnMinWidth, defaultColumnMaxWidth, defaultColumnSortable, defaultColumnResizable, rows, enableSelectColumn, selectColumnWidth, rowKeyGetter, rowHeight, headerRowHeight, selectedRows, onSelectedRowsChange, onRowsChange, onCellClick, onCellDoubleClick, onCellContextMenu, onCellKeyDown, direction, enableVirtualization, onCopy, onPaste, onScroll, className, "data-testid": testId, }: TableProps<R>): import("react/jsx-runtime").JSX.Element;
export type TextFieldProps = {
/**
* The variant to use.
Expand Down
Loading
Loading