Skip to content

Commit

Permalink
chore(release): Release 3.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
daybrush committed Jan 14, 2019
1 parent a7c7637 commit 5268e7f
Show file tree
Hide file tree
Showing 70 changed files with 37,120 additions and 229 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,3 @@ demo/release/
CHANGELOG.md
build/
packages/*/dist
dist/
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ Download dist files from repo directly or install it via npm.

|| Uncompressed | Compressed |
|---|----|---|
|No Dependency<br/>([@egjs/component](https://github.com/naver/egjs-component))| [infinitegrid.js (171.7kb)](https://naver.github.io/egjs-infinitegrid/release/latest/dist/infinitegrid.js)| [infinitegrid.min.js (46.3kb)](https://naver.github.io/egjs-infinitegrid/release/latest/dist/infinitegrid.min.js)|
|All| [infinitegrid.pkgd.js (181.5kb)](https://naver.github.io/egjs-infinitegrid/release/latest/dist/infinitegrid.pkgd.js) | [infinitegrid.pkgd.min.js (47.8kb)](https://naver.github.io/egjs-infinitegrid/release/latest/dist/infinitegrid.pkgd.min.js)|(https://naver.github.io/egjs-infinitegrid/release/latest/dist/infinitegrid.min.js)
|GridLayout| [infinitegrid.gridlayout.js (130kb)](https://naver.github.io/egjs-infinitegrid/release/latest/dist/infinitegrid.gridlayout.js) | [infinitegrid.gridlayout.min.js (37.2kb)](https://naver.github.io/egjs-infinitegrid/release/latest/dist/infinitegrid.gridlayout.min.js) |
|JustifiedLayout| [infinitegrid.justifiedlayout.js (137.8kb)](https://naver.github.io/egjs-infinitegrid/release/latest/dist/infinitegrid.justifiedlayout.js) | [infinitegrid.justifiedlayout.min.js (38.5kb)](https://naver.github.io/egjs-infinitegrid/release/latest/dist/infinitegrid.justifiedlayout.min.js)|
|FrameLayout| [infinitegrid.framelayout.js (133.1kb)](https://naver.github.io/egjs-infinitegrid/release/latest/dist/infinitegrid.framelayout.js) | [infinitegrid.framelayout.min.js (37.8kb)](https://naver.github.io/egjs-infinitegrid/release/latest/dist/infinitegrid.framelayout.min.js) |
|SquareLayout| [infinitegrid.squarelayout.js (139.5kb)](https://naver.github.io/egjs-infinitegrid/release/latest/dist/infinitegrid.squarelayout.js) | [infinitegrid.squarelayout.min.js (39.3kb)](https://naver.github.io/egjs-infinitegrid/release/latest/dist/infinitegrid.squarelayout.min.js) |
|PackingLayout| [infinitegrid.packinglayout.js (132.5kb)](https://naver.github.io/egjs-infinitegrid/release/latest/dist/infinitegrid.packinglayout.js) | [infinitegrid.packinglayout.min.js (38kb)](https://naver.github.io/egjs-infinitegrid/release/latest/dist/infinitegrid.packinglayout.min.js) |
|No Dependency<br/>([@egjs/component](https://github.com/naver/egjs-component))| [infinitegrid.js (169.5kb)](https://naver.github.io/egjs-infinitegrid/release/latest/dist/infinitegrid.js)| [infinitegrid.min.js (46kb)](https://naver.github.io/egjs-infinitegrid/release/latest/dist/infinitegrid.min.js)|
|All| [infinitegrid.pkgd.js (179.3kb)](https://naver.github.io/egjs-infinitegrid/release/latest/dist/infinitegrid.pkgd.js) | [infinitegrid.pkgd.min.js (47.5kb)](https://naver.github.io/egjs-infinitegrid/release/latest/dist/infinitegrid.pkgd.min.js)|(https://naver.github.io/egjs-infinitegrid/release/latest/dist/infinitegrid.min.js)
|GridLayout| [infinitegrid.gridlayout.js (127.9kb)](https://naver.github.io/egjs-infinitegrid/release/latest/dist/infinitegrid.gridlayout.js) | [infinitegrid.gridlayout.min.js (36.9kb)](https://naver.github.io/egjs-infinitegrid/release/latest/dist/infinitegrid.gridlayout.min.js) |
|JustifiedLayout| [infinitegrid.justifiedlayout.js (135.7kb)](https://naver.github.io/egjs-infinitegrid/release/latest/dist/infinitegrid.justifiedlayout.js) | [infinitegrid.justifiedlayout.min.js (38.2kb)](https://naver.github.io/egjs-infinitegrid/release/latest/dist/infinitegrid.justifiedlayout.min.js)|
|FrameLayout| [infinitegrid.framelayout.js (131kb)](https://naver.github.io/egjs-infinitegrid/release/latest/dist/infinitegrid.framelayout.js) | [infinitegrid.framelayout.min.js (37.6kb)](https://naver.github.io/egjs-infinitegrid/release/latest/dist/infinitegrid.framelayout.min.js) |
|SquareLayout| [infinitegrid.squarelayout.js (137.3kb)](https://naver.github.io/egjs-infinitegrid/release/latest/dist/infinitegrid.squarelayout.js) | [infinitegrid.squarelayout.min.js (39kb)](https://naver.github.io/egjs-infinitegrid/release/latest/dist/infinitegrid.squarelayout.min.js) |
|PackingLayout| [infinitegrid.packinglayout.js (130.4kb)](https://naver.github.io/egjs-infinitegrid/release/latest/dist/infinitegrid.packinglayout.js) | [infinitegrid.packinglayout.min.js (37.8kb)](https://naver.github.io/egjs-infinitegrid/release/latest/dist/infinitegrid.packinglayout.min.js) |

- **Specific version**
* https://naver.github.io/egjs-infinitegrid/release/[VERSION]/dist/[FILE_NAME]
Expand Down
23 changes: 6 additions & 17 deletions declaration/DOMRenderer.d.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,16 @@
import { WindowMockType } from "./browser";
import { IInfiniteGridItem } from "./ItemManager";
import { ISize, IJQuery } from "./types";
import { IJQuery, IInfiniteGridItem, WindowMockType, IDOMRendererStatus, IDOMRendererSize } from "./types";
export declare function resetSize(item: IInfiniteGridItem): void;
export interface IDOMRendererOptions {
isEqualSize: boolean;
isConstantSize: boolean;
horizontal: boolean;
container: boolean | HTMLElement;
}
export interface IDOMRendererSize {
container?: number;
view?: number;
viewport?: number;
item?: ISize;
}
export interface IDOMRendererStatus {
cssText: string;
_size: IDOMRendererSize;
}
export interface IDOMRendererOrgStyle {
position?: CSSStyleDeclaration["position"];
overflowX?: CSSStyleDeclaration["overflowX"];
overflowY?: CSSStyleDeclaration["overflowY"];
}
export declare function resetSize(item: IInfiniteGridItem): void;
export default class DOMRenderer {
static renderItem(item: IInfiniteGridItem, rect: IInfiniteGridItem["rect"], transitionDuration?: number): void;
static renderItems(items: IInfiniteGridItem[], transitionDuration?: number): void;
Expand All @@ -46,12 +34,13 @@ export default class DOMRenderer {
createAndInsert(items: IInfiniteGridItem[], isAppend?: boolean): void;
getViewSize(): number;
getViewportSize(): number;
getContainerSize(): number;
setContainerSize(size: number): void;
resize(): boolean;
isNeededResize(): boolean;
clear(): void;
destroy(): void;
private _init;
private _insert;
private _calcSize;
private _init(el);
private _insert(items, isAppend?, styles?);
private _calcSize();
}
14 changes: 6 additions & 8 deletions declaration/ImageLoaded.d.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
export declare type CHECK_ALL = 1;
export declare type CHECK_ONLY_ERROR = 2;
export declare const CHECK_ALL: 1;
export declare const CHECK_ONLY_ERROR: 2;
export interface IImageLoadedOptions {
prefix?: string;
length?: number;
type?: CHECK_ALL | CHECK_ONLY_ERROR;
type?: 1 | 2;
complete?: () => void;
end?: () => void;
error?: (e: {
target: LoadingImageElement;
itemIndex: number;
}) => void;
}
export declare const CHECK_ALL: CHECK_ALL;
export declare const CHECK_ONLY_ERROR: CHECK_ONLY_ERROR;
interface LoadingImageElement extends HTMLImageElement {
export interface LoadingImageElement extends HTMLImageElement {
__ITEM_INDEX__?: number;
}
declare class ImageLoaded {
static CHECK_ALL: number;
static CHECK_ONLY_ERROR: number;
static waitImageLoaded(checklist: LoadingImageElement[][], { prefix, length, type, complete, error, end }: IImageLoadedOptions): void;
static waitImageLoaded(checklist: LoadingImageElement[][], {prefix, length, type, complete, error, end}: IImageLoadedOptions): void;
static checkImageLoaded(el: HTMLElement): HTMLImageElement[];
static check(elements: HTMLElement[], { prefix, type, complete, error, end }: IImageLoadedOptions): void;
static check(elements: HTMLElement[], {prefix, type, complete, error, end}: IImageLoadedOptions): void;
}
export default ImageLoaded;
16 changes: 7 additions & 9 deletions declaration/Infinite.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ItemManager, { IInfiniteGridGroup } from "./ItemManager";
import { CursorType } from "./types";
import ItemManager from "./ItemManager";
import { CursorType, IInfiniteGridItem, IInfiniteGridGroup, IInfiniteStatus } from "./types";
export interface IInfiniteOptions {
useRecycle?: boolean;
threshold?: number;
Expand All @@ -14,11 +14,6 @@ export interface IInfiniteOptions {
end: number;
}) => void;
}
export interface IInfiniteStatus {
startCursor: number;
endCursor: number;
size: number;
}
declare class Infinite {
options: Required<IInfiniteOptions>;
private _items;
Expand All @@ -32,10 +27,13 @@ declare class Infinite {
getStatus(startKey: string | number, endKey: string | number): IInfiniteStatus;
getEdgeOutline(cursor: CursorType): number[];
getEdgeValue(cursor: CursorType): number;
getVisibleItems(): import("./ItemManager").IInfiniteGridItem[];
getVisibleItems(): IInfiniteGridItem[];
getCursor(cursor: CursorType): number;
getVisibleData(): IInfiniteGridGroup[];
remove(element: HTMLElement): import("./ItemManager").IInfiniteGridItem[];
remove(element: HTMLElement): {
items: IInfiniteGridItem[];
groups: IInfiniteGridGroup[];
};
clear(): void;
}
export default Infinite;
67 changes: 26 additions & 41 deletions declaration/InfiniteGrid.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import Component from "@egjs/component";
import { IInfiniteGridItem, IItemManagerStatus } from "./ItemManager";
import { IDOMRendererStatus } from "./DOMRenderer";
import { IWatchStatus } from "./Watcher";
import { IInfiniteStatus } from "./Infinite";
import { IJQuery, ILayout, StyleType } from "./types";
import { IJQuery, ILayout, StyleType, IInfiniteGridItem, IInfiniteGridStatus } from "./types";
export interface IInfiniteGridOptions {
itemSelector: string;
isOverflowScroll: boolean;
Expand All @@ -16,17 +12,6 @@ export interface IInfiniteGridOptions {
useFit: boolean;
attributePrefix: string;
}
export interface IInfiniteGridStatus {
_status: {
processingStatus: number;
loadingSize: number;
loadingStyle: StyleType;
};
_items: IItemManagerStatus;
_renderer: IDOMRendererStatus;
_watcher: IWatchStatus;
_infinite: IInfiniteStatus;
}
declare class InfiniteGrid extends Component {
static VERSION: string;
options: IInfiniteGridOptions;
Expand Down Expand Up @@ -61,30 +46,30 @@ declare class InfiniteGrid extends Component {
updateItems(): this;
moveTo(index?: number, itemIndex?: number): this;
destroy(): void;
private _setContainerSize;
private _appendLoadingBar;
private _setSize;
private _fitItems;
private _fit;
private _getEdgeValue;
private _isProcessing;
private _isLoading;
private _getLoadingStatus;
private _process;
private _insert;
private _recycle;
private _renderLoading;
private _updateItem;
private _setScrollPos;
private _scrollTo;
private _onImageError;
private _postCache;
private _postLayout;
private _requestAppend;
private _requestPrepend;
private _onResize;
private _onCheck;
private _onLayoutComplete;
private _reset;
private _setContainerSize(size);
private _appendLoadingBar();
private _setSize(size);
private _fitItems(base, margin?);
private _fit(useFit?);
private _getEdgeValue(cursor);
private _isProcessing();
private _isLoading();
private _getLoadingStatus();
private _process(status, isAdd?);
private _insert({elements, isAppend, isChildren, groupKey});
private _recycle({start, end});
private _renderLoading(userStyle?);
private _updateItem(item);
private _setScrollPos(pos);
private _scrollTo(pos);
private _onImageError(e);
private _postCache({cache, isAppend, isTrusted, moveItem});
private _postLayout({fromCache, groups, items, newItems, isAppend, isChildren, isTrusted, moveCache, moveItem});
private _requestAppend({cache});
private _requestPrepend({cache});
private _onResize();
private _onCheck({isForward, scrollPos, horizontal, orgScrollPos});
private _onLayoutComplete({items, isAppend, isTrusted, useRecycle, fromCache, isLayout});
private _reset();
}
export default InfiniteGrid;
25 changes: 2 additions & 23 deletions declaration/ItemManager.d.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,6 @@
import { CursorType, IInfiniteGridItemElement, ISize, IPosition, IJQuery } from "./types";
export interface IInfiniteGridItem {
groupKey: string | number;
content: string;
el?: IInfiniteGridItemElement;
orgSize?: ISize;
size?: ISize;
rect?: Partial<ISize & IPosition>;
prevRect?: Partial<ISize & IPosition>;
[key: string]: any;
}
export interface IInfiniteGridGroup {
groupKey: string | number;
items: IInfiniteGridItem[];
outlines: {
start: number[];
end: number[];
};
}
export interface IItemManagerStatus {
_data: IInfiniteGridGroup[];
}
import { CursorType, IJQuery, IInfiniteGridGroup, IInfiniteGridItem, IItemManagerStatus } from "./types";
export default class ItemManager {
static from(elements: HTMLElement[] | string | string[] | IJQuery, selector: string, { groupKey }: {
static from(elements: HTMLElement[] | string | string[] | IJQuery, selector: string, {groupKey}: {
groupKey: string | number;
}): {
el: HTMLElement;
Expand Down
37 changes: 13 additions & 24 deletions declaration/LayoutManager.d.ts
Original file line number Diff line number Diff line change
@@ -1,36 +1,25 @@
import ItemManager, { IInfiniteGridGroup, IInfiniteGridItem } from "./ItemManager";
import ItemManager from "./ItemManager";
import DOMRenderer from "./DOMRenderer";
import { ILayout, ILayoutResult } from "./types";
import { ILayout, ILayoutResult, IInfiniteGridItem, IInfiniteGridGroup, IErrorCallbackOptions } from "./types";
export interface ILayoutManagerOptions {
attributePrefix?: string;
isEqualSize?: boolean;
isConstantSize?: boolean;
horizontal?: boolean;
}
export interface ILayoutManagerErrorCallbackOptions {
target: HTMLImageElement;
element: HTMLElement;
items: IInfiniteGridItem[];
item: IInfiniteGridItem;
itemIndex?: number;
replace: (src: string) => void;
replaceItem: (content: string) => void;
remove: () => void;
removeItem: () => void;
}
export interface ILayoutManagerCompleteCallbackOptions {
export interface ICompleteCallbackOptions {
groups?: ILayoutResult[];
items?: IInfiniteGridItem[];
isAppend?: boolean;
}
export interface ILayoutManagerEndCallbackOptions {
export interface IEndCallbackOptions {
remove: HTMLElement[];
layout?: boolean;
}
export interface ILayoutManagerCallbacks {
complete: (e?: ILayoutManagerCompleteCallbackOptions) => void;
error: (e?: ILayoutManagerErrorCallbackOptions) => void;
end: (e?: ILayoutManagerEndCallbackOptions) => void;
complete: (e: ICompleteCallbackOptions) => void;
error: (e: IErrorCallbackOptions) => void;
end: (e: IEndCallbackOptions) => void;
}
export default class LayoutMananger {
options: Required<ILayoutManagerOptions>;
Expand All @@ -40,20 +29,20 @@ export default class LayoutMananger {
constructor(items: ItemManager, renderer: DOMRenderer, options?: ILayoutManagerOptions);
setLayout(layout: ILayout): void;
setSize(size: number): void;
append({ groups, items, isUpdate, }: {
append({groups, items, isUpdate}: {
groups: IInfiniteGridGroup[];
items: IInfiniteGridItem[];
isUpdate?: boolean;
}, callbacks: Partial<ILayoutManagerCallbacks>): void;
prepend({ groups, items, isUpdate, }: {
prepend({groups, items, isUpdate}: {
groups: IInfiniteGridGroup[];
items: IInfiniteGridItem[];
isUpdate?: boolean;
}, callbacks: Partial<ILayoutManagerCallbacks>): void;
layout(isRelayout: boolean, groups: IInfiniteGridGroup[], items: IInfiniteGridItem[]): IInfiniteGridGroup[];
destroy(): void;
private _complete;
private _error;
private _end;
private _insert;
private _complete(groups, items, isAppend, isUpdate, callback);
private _error(removeTarget, replaceTarget, target, items, errorIndex, callback);
private _end(removeTarget, replaceTarget, items, callback);
private _insert({groups, items, isAppend, isUpdate}, {error, complete, end});
}
6 changes: 2 additions & 4 deletions declaration/Parallax.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { IAlign, IJQuery } from "./types";
import { WindowMockType } from "./browser";
import { IInfiniteGridItem } from "./ItemManager";
import { IAlign, IJQuery, WindowMockType, IInfiniteGridItem } from "./types";
declare class Parallax {
options: {
container: HTMLElement;
Expand All @@ -19,6 +17,6 @@ declare class Parallax {
constructor(root?: WindowMockType | HTMLElement | IJQuery | string, options?: Partial<Parallax["options"]>);
resize(items?: IInfiniteGridItem[]): this;
refresh(items?: IInfiniteGridItem[], scrollPositionStart?: number): this;
private _checkParallaxItem;
private _checkParallaxItem(element);
}
export default Parallax;
12 changes: 4 additions & 8 deletions declaration/Watcher.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { WindowMockType } from "./browser";
import { WindowMockType, IWatchStatus } from "./types";
export interface IWatcherOptions {
container: HTMLElement;
isOverflowScroll: boolean;
Expand All @@ -11,10 +11,6 @@ export interface IWatcherOptions {
horizontal: boolean;
}) => void;
}
export interface IWatchStatus {
_prevPos: number;
scrollPos: number;
}
export default class Watcher {
options: IWatcherOptions;
private _timer;
Expand All @@ -36,7 +32,7 @@ export default class Watcher {
resize(): void;
detachEvent(): void;
destroy(): void;
private _onCheck;
private _getOffset;
private _onResize;
private _onCheck();
private _getOffset();
private _onResize();
}
4 changes: 1 addition & 3 deletions declaration/browser.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
export declare type WindowMockType = {
[P in keyof Window]?: Window[P] extends (...args: any[]) => any ? Window[P] : Partial<Window[P]>;
};
import { WindowMockType } from "./types";
declare let win: WindowMockType;
export { win as window };
export declare const document: Partial<Document>;
Loading

0 comments on commit 5268e7f

Please sign in to comment.