Skip to content

Commit

Permalink
feat: update @egjs/grid module
Browse files Browse the repository at this point in the history
  • Loading branch information
daybrush committed Jan 27, 2023
1 parent 6db0bff commit 081acd5
Show file tree
Hide file tree
Showing 16 changed files with 30 additions and 106,696 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
],
"devDependencies": {
"@daybrush/jsdoc": "^0.4.3",
"@egjs/release-helper": "^0.2.6",
"@egjs/release-helper": "^0.2.8",
"egjs-jsdoc-template": "^1.4.4",
"jsdoc-to-mdx": "^1.1.2",
"lerna": "^4.0.0",
"typescript": "^4.6.4"
"typescript": "^4.5.0 <4.6.0"
},
"workspaces": {
"packages": [
Expand Down
4 changes: 2 additions & 2 deletions packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
"@docusaurus/preset-classic": "^2.0.0-alpha.73",
"@docusaurus/theme-live-codeblock": "^2.0.0-alpha.73",
"@egjs/flicking-plugins": "^4.2.1",
"@egjs/infinitegrid": "~4.7.1",
"@egjs/infinitegrid": "~4.8.1-beta.3",
"@egjs/react-flicking": "^4.2.1",
"@egjs/react-infinitegrid": "~4.7.1",
"@egjs/react-infinitegrid": "~4.8.0-beta.1",
"@mdx-js/react": "^1.6.21",
"bulma": "^0.9.2",
"clsx": "^1.1.1",
Expand Down
8 changes: 2 additions & 6 deletions packages/infinitegrid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@
"license": "MIT",
"devDependencies": {
"@babel/core": "^7.13.10",
"@daybrush/jsdoc": "^0.3.11",
"@egjs/build-helper": "^0.1.2",
"@egjs/release-helper": "0.0.3",
"@storybook/addon-actions": "^6.0.21",
"@storybook/addon-controls": "^6.0.21",
"@storybook/addon-docs": "^6.0.21",
Expand Down Expand Up @@ -85,12 +83,10 @@
"coveralls": "^3.1.0",
"cpx": "^1.5.0",
"css-loader": "^5.0.1",
"egjs-jsdoc-template": "^1.4.4",
"eslint": "^7.7.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-react": "^7.22.0",
"gh-pages": "^2.0.1",
"jsdoc-to-mdx": "^1.1.0",
"karma": "^4.0.1",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^2.2.0",
Expand Down Expand Up @@ -119,13 +115,13 @@
"storybook-dark-mode": "^1.0.3",
"ts-node": "^9.1.1",
"tslib": "^2.0.3",
"typescript": "^3.9.7"
"typescript": "^4.5.0 <4.6.0"
},
"dependencies": {
"@cfcs/core": "^0.0.5",
"@egjs/children-differ": "^1.0.1",
"@egjs/component": "^3.0.0",
"@egjs/grid": "~1.11.0",
"@egjs/grid": "~1.12.0",
"@egjs/list-differ": "^1.0.0"
}
}
4 changes: 2 additions & 2 deletions packages/infinitegrid/test/manual/stretch.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ <h1 class="header">
useFit: true,
useRecycle: true,
horizontal: false,
useResizeObserver: true,
observeChildren: true,
// useResizeObserver: true,
// observeChildren: true,
align: "stretch",
maxStretchColumnSize: 400,
gap: 5,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class NgxInfiniteGridComponent
implements Required<InfiniteGridOptions>,
NgxInfiniteGridProps,
AfterViewInit, AfterViewChecked, OnChanges, OnDestroy {
public static GridClass: InfiniteGridFunction;
public static GridClass: InfiniteGridFunction | null = null;
@Input() gridConstructor!: NgxInfiniteGridProps['gridConstructor'];
@Input() renderer!: NgxInfiniteGridProps['renderer'];
@Input() container!: NgxInfiniteGridProps['container'];
Expand Down Expand Up @@ -128,7 +128,7 @@ export class NgxInfiniteGridComponent
}

const GridClass = (this.constructor as typeof NgxInfiniteGridComponent).GridClass;
const defaultOptions = GridClass.defaultOptions;
const defaultOptions = GridClass!.defaultOptions;
const options: Partial<InfiniteGridOptions> = {};

for (const name in defaultOptions) {
Expand All @@ -143,7 +143,7 @@ export class NgxInfiniteGridComponent
// and `ResizeWatcher`. These events force Angular to run change detection whenever
// dispatched; this happens too often.
const grid = this._ngZone.runOutsideAngular(
() => new GridClass(this.elementRef.nativeElement, options)
() => new GridClass!(this.elementRef.nativeElement, options)
);

for (const name in INFINITEGRID_EVENTS) {
Expand Down Expand Up @@ -190,7 +190,7 @@ export class NgxInfiniteGridComponent
}
this._isChange = false;
const GridClass = (this.constructor as typeof NgxInfiniteGridComponent).GridClass;
const propertyTypes = GridClass.propertyTypes;
const propertyTypes = GridClass!.propertyTypes;
const grid = this.vanillaGrid;

for (const name in propertyTypes) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* Public API Surface of ngx-infinitegrid
*/

export * from './lib/ngx-infinitegrid.service';
export * from './lib/grids/ngx-masonry-infinitegrid.component';
export * from './lib/ngx-infinitegrid.component';
export * from './lib/ngx-infinitegrid.module';

0 comments on commit 081acd5

Please sign in to comment.