@egjs/ngx-infinitegrid 3.2.5 → 4.1.2-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +111 -178
- package/bundles/egjs-ngx-infinitegrid.umd.js +587 -751
- package/bundles/egjs-ngx-infinitegrid.umd.js.map +1 -1
- package/bundles/egjs-ngx-infinitegrid.umd.min.js +12 -12
- package/bundles/egjs-ngx-infinitegrid.umd.min.js.map +1 -1
- package/egjs-ngx-infinitegrid.d.ts +5 -1
- package/egjs-ngx-infinitegrid.metadata.json +1 -1
- package/esm2015/egjs-ngx-infinitegrid.js +7 -7
- package/esm2015/lib/consts.js +20 -23
- package/esm2015/lib/grids/ngx-frame-infinitegrid.component.js +19 -0
- package/esm2015/lib/grids/ngx-justified-infinitegrid.component.js +21 -0
- package/esm2015/lib/grids/ngx-masonry-infinitegrid.component.js +20 -0
- package/esm2015/lib/grids/ngx-packing-infinitegrid.component.js +20 -0
- package/esm2015/lib/ngx-infinitegrid.component.js +135 -312
- package/esm2015/lib/ngx-infinitegrid.interface.js +10 -18
- package/esm2015/lib/ngx-infinitegrid.module.js +14 -21
- package/esm2015/lib/ngx-infinitegrid.service.js +5 -10
- package/esm2015/lib/types.js +2 -5
- package/esm2015/public-api.js +5 -13
- package/fesm2015/egjs-ngx-infinitegrid.js +215 -476
- package/fesm2015/egjs-ngx-infinitegrid.js.map +1 -1
- package/lib/consts.d.ts +1 -1
- package/lib/grids/ngx-frame-infinitegrid.component.d.ts +8 -0
- package/lib/grids/ngx-justified-infinitegrid.component.d.ts +10 -0
- package/lib/grids/ngx-masonry-infinitegrid.component.d.ts +9 -0
- package/lib/grids/ngx-packing-infinitegrid.component.d.ts +9 -0
- package/lib/ngx-infinitegrid.component.d.ts +58 -37
- package/lib/ngx-infinitegrid.interface.d.ts +9 -5
- package/lib/ngx-infinitegrid.service.d.ts +1 -1
- package/lib/types.d.ts +18 -4
- package/package.json +19 -16
- package/public-api.d.ts +1 -5
- package/esm2015/lib/ngx-framelayout.component.js +0 -28
- package/esm2015/lib/ngx-gridlayout.component.js +0 -28
- package/esm2015/lib/ngx-justifiedlayout.component.js +0 -28
- package/esm2015/lib/ngx-packinglayout.component.js +0 -28
- package/esm2015/lib/ngx-squarelayout.component.js +0 -28
- package/esm5/egjs-ngx-infinitegrid.js +0 -10
- package/esm5/lib/consts.js +0 -8
- package/esm5/lib/ngx-framelayout.component.js +0 -33
- package/esm5/lib/ngx-gridlayout.component.js +0 -33
- package/esm5/lib/ngx-infinitegrid.component.js +0 -385
- package/esm5/lib/ngx-infinitegrid.interface.js +0 -25
- package/esm5/lib/ngx-infinitegrid.module.js +0 -42
- package/esm5/lib/ngx-infinitegrid.service.js +0 -21
- package/esm5/lib/ngx-justifiedlayout.component.js +0 -33
- package/esm5/lib/ngx-packinglayout.component.js +0 -33
- package/esm5/lib/ngx-squarelayout.component.js +0 -33
- package/esm5/lib/types.js +0 -5
- package/esm5/public-api.js +0 -16
- package/fesm5/egjs-ngx-infinitegrid.js +0 -611
- package/fesm5/egjs-ngx-infinitegrid.js.map +0 -1
- package/lib/ngx-framelayout.component.d.ts +0 -5
- package/lib/ngx-gridlayout.component.d.ts +0 -5
- package/lib/ngx-justifiedlayout.component.d.ts +0 -5
- package/lib/ngx-packinglayout.component.d.ts +0 -5
- package/lib/ngx-squarelayout.component.d.ts +0 -5
|
@@ -1,572 +1,311 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { __decorate
|
|
5
|
-
import { CommonModule } from '@angular/common';
|
|
1
|
+
import { ɵɵdefineInjectable, Injectable, EventEmitter, Component, ChangeDetectionStrategy, ElementRef, ChangeDetectorRef, Inject, PLATFORM_ID, Input, Output, ViewChild, NgModule } from '@angular/core';
|
|
2
|
+
import { isPlatformBrowser, CommonModule } from '@angular/common';
|
|
3
|
+
import { withInfiniteGridMethods, Renderer, INFINITEGRID_EVENTS, mountRenderingItems, getRenderingItems, MasonryInfiniteGrid, JustifiedInfiniteGrid, FrameInfiniteGrid, PackingInfiniteGrid } from '@egjs/infinitegrid';
|
|
4
|
+
import { __decorate } from 'tslib';
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
* @fileoverview added by tsickle
|
|
9
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
10
|
-
*/
|
|
11
|
-
class NgxInfiniteGridService {
|
|
6
|
+
class NgxInfinitegridService {
|
|
12
7
|
constructor() { }
|
|
13
8
|
}
|
|
14
|
-
|
|
9
|
+
NgxInfinitegridService.ɵprov = ɵɵdefineInjectable({ factory: function NgxInfinitegridService_Factory() { return new NgxInfinitegridService(); }, token: NgxInfinitegridService, providedIn: "root" });
|
|
10
|
+
NgxInfinitegridService.decorators = [
|
|
15
11
|
{ type: Injectable, args: [{
|
|
16
12
|
providedIn: 'root'
|
|
17
13
|
},] }
|
|
18
14
|
];
|
|
19
|
-
|
|
20
|
-
NgxInfiniteGridService.ctorParameters = () => [];
|
|
21
|
-
/** @nocollapse */ NgxInfiniteGridService.ngInjectableDef = ɵɵdefineInjectable({ factory: function NgxInfiniteGridService_Factory() { return new NgxInfiniteGridService(); }, token: NgxInfiniteGridService, providedIn: "root" });
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* @fileoverview added by tsickle
|
|
25
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
26
|
-
*/
|
|
27
|
-
/** @type {?} */
|
|
28
|
-
const TEMPLATE = `
|
|
29
|
-
<ng-template #content><ng-content></ng-content></ng-template>
|
|
30
|
-
<ng-template #viewer>
|
|
31
|
-
<ng-template [ngIf]="options.isOverflowScroll" [ngIfElse]="noContainer">
|
|
32
|
-
<div class="${CONTAINER_CLASSNAME}" #container>
|
|
33
|
-
<ng-container *ngTemplateOutlet="content"></ng-container>
|
|
34
|
-
</div>
|
|
35
|
-
</ng-template>
|
|
36
|
-
<ng-template #noContainer>
|
|
37
|
-
<ng-container *ngTemplateOutlet="content"></ng-container>
|
|
38
|
-
</ng-template>
|
|
39
|
-
</ng-template>
|
|
40
|
-
<ng-template [ngIf]="elRef.nativeElement.tagName==='NGX-INFINITEGRID'" [ngIfElse]="noWrapper">
|
|
41
|
-
<div #wrapper>
|
|
42
|
-
<ng-container *ngTemplateOutlet="viewer"></ng-container>
|
|
43
|
-
</div>
|
|
44
|
-
</ng-template>
|
|
45
|
-
<ng-template #noWrapper>
|
|
46
|
-
<ng-container *ngTemplateOutlet="viewer"></ng-container>
|
|
47
|
-
</ng-template>
|
|
48
|
-
`;
|
|
15
|
+
NgxInfinitegridService.ctorParameters = () => [];
|
|
49
16
|
|
|
50
|
-
/**
|
|
51
|
-
* @fileoverview added by tsickle
|
|
52
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
53
|
-
*/
|
|
54
17
|
class NgxInfiniteGridInterface {
|
|
55
18
|
}
|
|
56
19
|
__decorate([
|
|
57
|
-
withInfiniteGridMethods
|
|
58
|
-
|
|
59
|
-
], NgxInfiniteGridInterface.prototype, "ig", void 0);
|
|
60
|
-
if (false) {
|
|
61
|
-
/**
|
|
62
|
-
* @type {?}
|
|
63
|
-
* @protected
|
|
64
|
-
*/
|
|
65
|
-
NgxInfiniteGridInterface.prototype.ig;
|
|
66
|
-
}
|
|
67
|
-
// WARNING: interface has both a type and a value, skipping emit
|
|
20
|
+
withInfiniteGridMethods
|
|
21
|
+
], NgxInfiniteGridInterface.prototype, "vanillaGrid", void 0);
|
|
68
22
|
|
|
69
23
|
/**
|
|
70
|
-
*
|
|
71
|
-
*
|
|
24
|
+
* egjs-infinitegrid
|
|
25
|
+
* Copyright (c) 2021-present NAVER Corp.
|
|
26
|
+
* MIT license
|
|
72
27
|
*/
|
|
28
|
+
// @dynamic
|
|
73
29
|
class NgxInfiniteGridComponent extends NgxInfiniteGridInterface {
|
|
74
|
-
|
|
75
|
-
* @param {?} elRef
|
|
76
|
-
*/
|
|
77
|
-
constructor(elRef) {
|
|
30
|
+
constructor(elementRef, _detectorRef, _platform) {
|
|
78
31
|
super();
|
|
79
|
-
this.
|
|
80
|
-
this.
|
|
81
|
-
|
|
82
|
-
* @param {?} item
|
|
83
|
-
* @return {?}
|
|
84
|
-
*/
|
|
85
|
-
(_, item) => item.key));
|
|
86
|
-
this.groupBy = ((/**
|
|
87
|
-
* @param {?} _
|
|
88
|
-
* @param {?} item
|
|
89
|
-
* @return {?}
|
|
90
|
-
*/
|
|
91
|
-
(_, item) => item.groupKey));
|
|
32
|
+
this.elementRef = elementRef;
|
|
33
|
+
this._detectorRef = _detectorRef;
|
|
34
|
+
this._platform = _platform;
|
|
92
35
|
this.items = [];
|
|
93
|
-
this.
|
|
94
|
-
this.
|
|
95
|
-
this.options = {};
|
|
96
|
-
this.layoutOptions = {};
|
|
97
|
-
this.append = new EventEmitter();
|
|
98
|
-
this.prepend = new EventEmitter();
|
|
99
|
-
this.imageError = new EventEmitter();
|
|
100
|
-
this.contentError = new EventEmitter();
|
|
101
|
-
// tslint:disable-next-line: no-output-native
|
|
102
|
-
this.change = new EventEmitter();
|
|
103
|
-
this.layoutComplete = new EventEmitter();
|
|
104
|
-
this.visibleChange = new EventEmitter();
|
|
105
|
-
this.render = new EventEmitter();
|
|
36
|
+
this.trackBy = ((_, item) => item.key);
|
|
37
|
+
this.groupBy = ((_, item) => item.groupKey);
|
|
106
38
|
this.visibleItems = [];
|
|
107
|
-
this.
|
|
108
|
-
this.
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
item => item.itemKey));
|
|
114
|
-
this.nextFunction = (/**
|
|
115
|
-
* @return {?}
|
|
116
|
-
*/
|
|
117
|
-
() => { });
|
|
118
|
-
this.setStatus = (/**
|
|
119
|
-
* @param {?} status
|
|
120
|
-
* @param {?=} applyScrollPos
|
|
121
|
-
* @param {?=} syncElements
|
|
122
|
-
* @return {?}
|
|
123
|
-
*/
|
|
124
|
-
(status, applyScrollPos, syncElements = this.getElements()) => {
|
|
125
|
-
this.ig.setStatus(status, applyScrollPos, syncElements);
|
|
126
|
-
return this;
|
|
127
|
-
});
|
|
39
|
+
this._renderer = new Renderer();
|
|
40
|
+
this._isChange = false;
|
|
41
|
+
for (const name in INFINITEGRID_EVENTS) {
|
|
42
|
+
const eventName = INFINITEGRID_EVENTS[name];
|
|
43
|
+
this[eventName] = new EventEmitter();
|
|
44
|
+
}
|
|
128
45
|
}
|
|
129
|
-
/**
|
|
130
|
-
* @return {?}
|
|
131
|
-
*/
|
|
132
46
|
ngOnInit() {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
* @param {?} item
|
|
139
|
-
* @return {?}
|
|
140
|
-
*/
|
|
141
|
-
item => item.data)));
|
|
142
|
-
}
|
|
143
|
-
else if (this.useFirstRender) {
|
|
144
|
-
this.updateVisibleItems(this.items);
|
|
145
|
-
}
|
|
47
|
+
this._updateVisibleChildren();
|
|
48
|
+
}
|
|
49
|
+
ngOnChanges() {
|
|
50
|
+
this._isChange = true;
|
|
51
|
+
this._updateVisibleChildren();
|
|
146
52
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
*/
|
|
151
|
-
ngOnChanges(changes) {
|
|
152
|
-
/** @type {?} */
|
|
153
|
-
const ig = this.ig;
|
|
154
|
-
if (!ig) {
|
|
53
|
+
ngAfterViewInit() {
|
|
54
|
+
var _a;
|
|
55
|
+
if (!isPlatformBrowser(this._platform)) {
|
|
155
56
|
return;
|
|
156
57
|
}
|
|
157
|
-
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
58
|
+
const GridClass = this.constructor.GridClass;
|
|
59
|
+
const defaultOptions = GridClass.defaultOptions;
|
|
60
|
+
const options = {};
|
|
61
|
+
const containerElement = (_a = this._containerRef) === null || _a === void 0 ? void 0 : _a.nativeElement;
|
|
62
|
+
for (const name in defaultOptions) {
|
|
63
|
+
if (name in this && typeof this[name] !== "undefined") {
|
|
64
|
+
options[name] = this[name];
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
if (containerElement) {
|
|
68
|
+
options.container = containerElement;
|
|
69
|
+
}
|
|
70
|
+
options.renderer = this._renderer;
|
|
71
|
+
const wrapper = this._wrapperRef || this.elementRef;
|
|
72
|
+
const grid = new GridClass(wrapper.nativeElement, options);
|
|
73
|
+
for (const name in INFINITEGRID_EVENTS) {
|
|
74
|
+
const eventName = INFINITEGRID_EVENTS[name];
|
|
75
|
+
grid.on(eventName, (e) => {
|
|
76
|
+
this[eventName].emit(e);
|
|
166
77
|
});
|
|
167
78
|
}
|
|
79
|
+
this.vanillaGrid = grid;
|
|
80
|
+
this._renderer.on("requestUpdate", () => {
|
|
81
|
+
this._isChange = true;
|
|
82
|
+
this._updateVisibleChildren();
|
|
83
|
+
});
|
|
84
|
+
mountRenderingItems(this._getItemInfos(), {
|
|
85
|
+
grid,
|
|
86
|
+
useFirstRender: this.useFirstRender,
|
|
87
|
+
useLoading: this.useLoading,
|
|
88
|
+
usePlaceholder: this.usePlaceholder,
|
|
89
|
+
horizontal: this.horizontal,
|
|
90
|
+
status: this.status,
|
|
91
|
+
});
|
|
92
|
+
this._renderer.updated();
|
|
168
93
|
}
|
|
169
|
-
/**
|
|
170
|
-
* @return {?}
|
|
171
|
-
*/
|
|
172
94
|
ngAfterViewChecked() {
|
|
173
|
-
if (!this.
|
|
95
|
+
if (!this._isChange || !this.vanillaGrid) {
|
|
174
96
|
return;
|
|
175
97
|
}
|
|
176
|
-
this.
|
|
177
|
-
this.
|
|
178
|
-
|
|
179
|
-
const
|
|
180
|
-
|
|
181
|
-
this
|
|
182
|
-
|
|
183
|
-
}
|
|
184
|
-
this.nextFunction();
|
|
185
|
-
this.nextFunction = (/**
|
|
186
|
-
* @return {?}
|
|
187
|
-
*/
|
|
188
|
-
() => { });
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* @return {?}
|
|
192
|
-
*/
|
|
193
|
-
ngAfterViewInit() {
|
|
194
|
-
/** @type {?} */
|
|
195
|
-
const ref = this.wrapperRef || this.elRef;
|
|
196
|
-
this.ig = new NativeInfiniteGrid(ref.nativeElement, Object.assign({}, this.options, { renderExternal: true })).on('render', (/**
|
|
197
|
-
* @param {?} __0
|
|
198
|
-
* @return {?}
|
|
199
|
-
*/
|
|
200
|
-
({ next }) => {
|
|
201
|
-
setTimeout((/**
|
|
202
|
-
* @return {?}
|
|
203
|
-
*/
|
|
204
|
-
() => {
|
|
205
|
-
this.nextFunction = next;
|
|
206
|
-
this.updateVisibleItems(this.getVisibleItems());
|
|
207
|
-
this.isChange = true;
|
|
208
|
-
}));
|
|
209
|
-
}));
|
|
210
|
-
/** @type {?} */
|
|
211
|
-
const ig = this.ig;
|
|
212
|
-
INFINITEGRID_EVENTS.forEach((/**
|
|
213
|
-
* @param {?} name
|
|
214
|
-
* @return {?}
|
|
215
|
-
*/
|
|
216
|
-
name => {
|
|
217
|
-
if (!this[name]) {
|
|
218
|
-
return;
|
|
98
|
+
this._isChange = false;
|
|
99
|
+
const GridClass = this.constructor.GridClass;
|
|
100
|
+
const propertyTypes = GridClass.propertyTypes;
|
|
101
|
+
const grid = this.vanillaGrid;
|
|
102
|
+
for (const name in propertyTypes) {
|
|
103
|
+
if (name in this) {
|
|
104
|
+
grid[name] = this[name];
|
|
219
105
|
}
|
|
220
|
-
ig.on((/** @type {?} */ (name)), (/**
|
|
221
|
-
* @param {?} e
|
|
222
|
-
* @return {?}
|
|
223
|
-
*/
|
|
224
|
-
e => {
|
|
225
|
-
((/** @type {?} */ (this)))[name].emit(Object.assign({}, e, { currentTarget: this }));
|
|
226
|
-
}));
|
|
227
|
-
}));
|
|
228
|
-
ig.setLayout(this.layoutType, Object.assign({}, this.layoutOptions));
|
|
229
|
-
if (this.loading) {
|
|
230
|
-
ig.setLoadingBar({
|
|
231
|
-
prepend: this.loading,
|
|
232
|
-
append: this.loading,
|
|
233
|
-
});
|
|
234
|
-
}
|
|
235
|
-
if (this.status) {
|
|
236
|
-
this.setStatus(this.status, true);
|
|
237
|
-
}
|
|
238
|
-
else {
|
|
239
|
-
ig.beforeSync(this.toItems());
|
|
240
|
-
ig.layout(true);
|
|
241
106
|
}
|
|
107
|
+
this._renderer.updated();
|
|
242
108
|
}
|
|
243
|
-
/**
|
|
244
|
-
* @return {?}
|
|
245
|
-
*/
|
|
246
109
|
ngOnDestroy() {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
/**
|
|
250
|
-
* @private
|
|
251
|
-
* @return {?}
|
|
252
|
-
*/
|
|
253
|
-
getElements() {
|
|
254
|
-
/** @type {?} */
|
|
255
|
-
const ref = this.containerRef || this.wrapperRef || this.elRef;
|
|
256
|
-
/** @type {?} */
|
|
257
|
-
const elements = [].slice.call(ref.nativeElement.children);
|
|
258
|
-
if (this.loading) {
|
|
259
|
-
return elements.filter((/**
|
|
260
|
-
* @param {?} el
|
|
261
|
-
* @return {?}
|
|
262
|
-
*/
|
|
263
|
-
el => {
|
|
264
|
-
return el.className.indexOf(IGNORE_CLASSNAME) < 0;
|
|
265
|
-
}));
|
|
266
|
-
}
|
|
267
|
-
return elements;
|
|
110
|
+
var _a;
|
|
111
|
+
(_a = this.vanillaGrid) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
268
112
|
}
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
* @return {?}
|
|
272
|
-
*/
|
|
273
|
-
getVisibleItems() {
|
|
274
|
-
return this.ig.getRenderingItems().map((/**
|
|
275
|
-
* @param {?} item
|
|
276
|
-
* @return {?}
|
|
277
|
-
*/
|
|
278
|
-
item => item.data));
|
|
279
|
-
}
|
|
280
|
-
/**
|
|
281
|
-
* @private
|
|
282
|
-
* @return {?}
|
|
283
|
-
*/
|
|
284
|
-
toItems() {
|
|
285
|
-
/** @type {?} */
|
|
286
|
-
const groupBy = this.groupBy;
|
|
287
|
-
/** @type {?} */
|
|
113
|
+
_getItemInfos() {
|
|
114
|
+
const items = this.items;
|
|
288
115
|
const trackBy = this.trackBy;
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
data: item,
|
|
298
|
-
})));
|
|
116
|
+
const groupBy = this.groupBy;
|
|
117
|
+
return items.map((item, i) => {
|
|
118
|
+
return {
|
|
119
|
+
groupKey: groupBy(i, item),
|
|
120
|
+
key: trackBy(i, item),
|
|
121
|
+
data: item,
|
|
122
|
+
};
|
|
123
|
+
});
|
|
299
124
|
}
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
}
|
|
125
|
+
_updateVisibleChildren() {
|
|
126
|
+
this.visibleItems = getRenderingItems(this._getItemInfos(), {
|
|
127
|
+
grid: this.vanillaGrid,
|
|
128
|
+
useFirstRender: this.useFirstRender,
|
|
129
|
+
useLoading: this.useLoading,
|
|
130
|
+
usePlaceholder: this.usePlaceholder,
|
|
131
|
+
horizontal: this.horizontal,
|
|
132
|
+
status: this.status,
|
|
133
|
+
});
|
|
134
|
+
this._detectorRef.markForCheck();
|
|
311
135
|
}
|
|
312
136
|
}
|
|
313
137
|
NgxInfiniteGridComponent.decorators = [
|
|
314
138
|
{ type: Component, args: [{
|
|
315
|
-
selector: 'ngx-
|
|
316
|
-
template:
|
|
317
|
-
|
|
139
|
+
selector: 'ngx-infinite-grid, [NgxInfiniteGrid]',
|
|
140
|
+
template: '<slot></slot>',
|
|
141
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
142
|
+
styles: [':host { display: block }']
|
|
143
|
+
},] }
|
|
318
144
|
];
|
|
319
|
-
/** @nocollapse */
|
|
320
145
|
NgxInfiniteGridComponent.ctorParameters = () => [
|
|
321
|
-
{ type: ElementRef }
|
|
146
|
+
{ type: ElementRef },
|
|
147
|
+
{ type: ChangeDetectorRef },
|
|
148
|
+
{ type: Object, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] }
|
|
322
149
|
];
|
|
323
150
|
NgxInfiniteGridComponent.propDecorators = {
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
151
|
+
gridConstructor: [{ type: Input }],
|
|
152
|
+
renderer: [{ type: Input }],
|
|
153
|
+
container: [{ type: Input }],
|
|
154
|
+
containerTag: [{ type: Input }],
|
|
155
|
+
threshold: [{ type: Input }],
|
|
156
|
+
useRecycle: [{ type: Input }],
|
|
157
|
+
horizontal: [{ type: Input }],
|
|
158
|
+
percentage: [{ type: Input }],
|
|
159
|
+
isEqualSize: [{ type: Input }],
|
|
160
|
+
isConstantSize: [{ type: Input }],
|
|
161
|
+
gap: [{ type: Input }],
|
|
162
|
+
attributePrefix: [{ type: Input }],
|
|
163
|
+
resizeDebounce: [{ type: Input }],
|
|
164
|
+
maxResizeDebounce: [{ type: Input }],
|
|
165
|
+
autoResize: [{ type: Input }],
|
|
166
|
+
useFit: [{ type: Input }],
|
|
167
|
+
useTransform: [{ type: Input }],
|
|
168
|
+
renderOnPropertyChange: [{ type: Input }],
|
|
169
|
+
preserveUIOnDestroy: [{ type: Input }],
|
|
170
|
+
defaultDirection: [{ type: Input }],
|
|
171
|
+
externalItemRenderer: [{ type: Input }],
|
|
172
|
+
externalContainerManager: [{ type: Input }],
|
|
173
|
+
usePlaceholder: [{ type: Input }],
|
|
174
|
+
useLoading: [{ type: Input }],
|
|
327
175
|
status: [{ type: Input }],
|
|
328
|
-
loading: [{ type: Input }],
|
|
329
176
|
useFirstRender: [{ type: Input }],
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
prepend: [{ type: Output }],
|
|
335
|
-
imageError: [{ type: Output }],
|
|
177
|
+
items: [{ type: Input }],
|
|
178
|
+
trackBy: [{ type: Input }],
|
|
179
|
+
groupBy: [{ type: Input }],
|
|
180
|
+
renderComplete: [{ type: Output }],
|
|
336
181
|
contentError: [{ type: Output }],
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
containerRef: [{ type: ViewChild, args: ['container', { static: false },] }]
|
|
182
|
+
changeScroll: [{ type: Output }],
|
|
183
|
+
requestAppend: [{ type: Output }],
|
|
184
|
+
requestPrepend: [{ type: Output }],
|
|
185
|
+
_wrapperRef: [{ type: ViewChild, args: ['wrapperRef', { static: false },] }],
|
|
186
|
+
_containerRef: [{ type: ViewChild, args: ['containerRef', { static: false },] }]
|
|
343
187
|
};
|
|
344
|
-
if (false) {
|
|
345
|
-
/** @type {?} */
|
|
346
|
-
NgxInfiniteGridComponent.prototype.trackBy;
|
|
347
|
-
/** @type {?} */
|
|
348
|
-
NgxInfiniteGridComponent.prototype.groupBy;
|
|
349
|
-
/** @type {?} */
|
|
350
|
-
NgxInfiniteGridComponent.prototype.items;
|
|
351
|
-
/** @type {?} */
|
|
352
|
-
NgxInfiniteGridComponent.prototype.status;
|
|
353
|
-
/** @type {?} */
|
|
354
|
-
NgxInfiniteGridComponent.prototype.loading;
|
|
355
|
-
/** @type {?} */
|
|
356
|
-
NgxInfiniteGridComponent.prototype.useFirstRender;
|
|
357
|
-
/** @type {?} */
|
|
358
|
-
NgxInfiniteGridComponent.prototype.layoutType;
|
|
359
|
-
/** @type {?} */
|
|
360
|
-
NgxInfiniteGridComponent.prototype.options;
|
|
361
|
-
/** @type {?} */
|
|
362
|
-
NgxInfiniteGridComponent.prototype.layoutOptions;
|
|
363
|
-
/** @type {?} */
|
|
364
|
-
NgxInfiniteGridComponent.prototype.append;
|
|
365
|
-
/** @type {?} */
|
|
366
|
-
NgxInfiniteGridComponent.prototype.prepend;
|
|
367
|
-
/** @type {?} */
|
|
368
|
-
NgxInfiniteGridComponent.prototype.imageError;
|
|
369
|
-
/** @type {?} */
|
|
370
|
-
NgxInfiniteGridComponent.prototype.contentError;
|
|
371
|
-
/** @type {?} */
|
|
372
|
-
NgxInfiniteGridComponent.prototype.change;
|
|
373
|
-
/** @type {?} */
|
|
374
|
-
NgxInfiniteGridComponent.prototype.layoutComplete;
|
|
375
|
-
/** @type {?} */
|
|
376
|
-
NgxInfiniteGridComponent.prototype.visibleChange;
|
|
377
|
-
/** @type {?} */
|
|
378
|
-
NgxInfiniteGridComponent.prototype.render;
|
|
379
|
-
/** @type {?} */
|
|
380
|
-
NgxInfiniteGridComponent.prototype.wrapperRef;
|
|
381
|
-
/** @type {?} */
|
|
382
|
-
NgxInfiniteGridComponent.prototype.containerRef;
|
|
383
|
-
/** @type {?} */
|
|
384
|
-
NgxInfiniteGridComponent.prototype.visibleItems;
|
|
385
|
-
/**
|
|
386
|
-
* @type {?}
|
|
387
|
-
* @private
|
|
388
|
-
*/
|
|
389
|
-
NgxInfiniteGridComponent.prototype.layoutState;
|
|
390
|
-
/**
|
|
391
|
-
* @type {?}
|
|
392
|
-
* @private
|
|
393
|
-
*/
|
|
394
|
-
NgxInfiniteGridComponent.prototype.isChange;
|
|
395
|
-
/**
|
|
396
|
-
* @type {?}
|
|
397
|
-
* @private
|
|
398
|
-
*/
|
|
399
|
-
NgxInfiniteGridComponent.prototype.visibleDiffer;
|
|
400
|
-
/**
|
|
401
|
-
* @type {?}
|
|
402
|
-
* @private
|
|
403
|
-
*/
|
|
404
|
-
NgxInfiniteGridComponent.prototype.nextFunction;
|
|
405
|
-
/** @type {?} */
|
|
406
|
-
NgxInfiniteGridComponent.prototype.setStatus;
|
|
407
|
-
/** @type {?} */
|
|
408
|
-
NgxInfiniteGridComponent.prototype.elRef;
|
|
409
|
-
}
|
|
410
188
|
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
414
|
-
*/
|
|
415
|
-
class NgxGridLayoutComponent extends NgxInfiniteGridComponent {
|
|
416
|
-
constructor() {
|
|
417
|
-
super(...arguments);
|
|
418
|
-
this.layoutType = GridLayout;
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
NgxGridLayoutComponent.decorators = [
|
|
422
|
-
{ type: Component, args: [{
|
|
423
|
-
selector: 'ngx-gridlayout, [NgxGridLayout]',
|
|
424
|
-
template: TEMPLATE
|
|
425
|
-
}] }
|
|
426
|
-
];
|
|
427
|
-
NgxGridLayoutComponent.propDecorators = {
|
|
428
|
-
layoutType: [{ type: Input }]
|
|
429
|
-
};
|
|
430
|
-
if (false) {
|
|
431
|
-
/** @type {?} */
|
|
432
|
-
NgxGridLayoutComponent.prototype.layoutType;
|
|
433
|
-
}
|
|
189
|
+
const TEMPLATE = `
|
|
190
|
+
<ng-template #content><ng-content></ng-content></ng-template>
|
|
434
191
|
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
192
|
+
<ng-template #viewer>
|
|
193
|
+
<ng-template [ngIf]="container === true" [ngIfElse]="noContainer">
|
|
194
|
+
<div #containerRef>
|
|
195
|
+
<ng-container *ngTemplateOutlet="content"></ng-container>
|
|
196
|
+
</div>
|
|
197
|
+
</ng-template>
|
|
198
|
+
<ng-template #noContainer>
|
|
199
|
+
<ng-container *ngTemplateOutlet="content"></ng-container>
|
|
200
|
+
</ng-template>
|
|
201
|
+
</ng-template>
|
|
202
|
+
|
|
203
|
+
<ng-template [ngIf]="elementRef.nativeElement.tagName.indexOf('NGX-') === 0" [ngIfElse]="noWrapper">
|
|
204
|
+
<div #wrapperRef>
|
|
205
|
+
<ng-container *ngTemplateOutlet="viewer"></ng-container>
|
|
206
|
+
</div>
|
|
207
|
+
</ng-template>
|
|
208
|
+
|
|
209
|
+
<ng-template #noWrapper>
|
|
210
|
+
<ng-container *ngTemplateOutlet="viewer"></ng-container>
|
|
211
|
+
</ng-template>
|
|
212
|
+
`;
|
|
213
|
+
|
|
214
|
+
class NgxMasonryInfiniteGridComponent extends NgxInfiniteGridComponent {
|
|
444
215
|
}
|
|
445
|
-
|
|
216
|
+
NgxMasonryInfiniteGridComponent.GridClass = MasonryInfiniteGrid;
|
|
217
|
+
NgxMasonryInfiniteGridComponent.decorators = [
|
|
446
218
|
{ type: Component, args: [{
|
|
447
|
-
selector: 'ngx-
|
|
219
|
+
selector: 'ngx-masonry-infinite-grid, [NgxMasonryInfiniteGrid]',
|
|
448
220
|
template: TEMPLATE
|
|
449
|
-
}] }
|
|
221
|
+
},] }
|
|
450
222
|
];
|
|
451
|
-
|
|
452
|
-
|
|
223
|
+
NgxMasonryInfiniteGridComponent.propDecorators = {
|
|
224
|
+
column: [{ type: Input }],
|
|
225
|
+
columnSize: [{ type: Input }],
|
|
226
|
+
columnSizeRatio: [{ type: Input }],
|
|
227
|
+
align: [{ type: Input }]
|
|
453
228
|
};
|
|
454
|
-
if (false) {
|
|
455
|
-
/** @type {?} */
|
|
456
|
-
NgxJustifiedLayoutComponent.prototype.layoutType;
|
|
457
|
-
}
|
|
458
229
|
|
|
459
|
-
|
|
460
|
-
* @fileoverview added by tsickle
|
|
461
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
462
|
-
*/
|
|
463
|
-
class NgxSquareLayoutComponent extends NgxInfiniteGridComponent {
|
|
464
|
-
constructor() {
|
|
465
|
-
super(...arguments);
|
|
466
|
-
this.layoutType = SquareLayout;
|
|
467
|
-
}
|
|
230
|
+
class NgxJustifiedInfiniteGridComponent extends NgxInfiniteGridComponent {
|
|
468
231
|
}
|
|
469
|
-
|
|
232
|
+
NgxJustifiedInfiniteGridComponent.GridClass = JustifiedInfiniteGrid;
|
|
233
|
+
NgxJustifiedInfiniteGridComponent.decorators = [
|
|
470
234
|
{ type: Component, args: [{
|
|
471
|
-
selector: 'ngx-
|
|
235
|
+
selector: 'ngx-justified-infinite-grid, [NgxJustifiedInfiniteGrid]',
|
|
472
236
|
template: TEMPLATE
|
|
473
|
-
}] }
|
|
237
|
+
},] }
|
|
474
238
|
];
|
|
475
|
-
|
|
476
|
-
|
|
239
|
+
NgxJustifiedInfiniteGridComponent.propDecorators = {
|
|
240
|
+
columnRange: [{ type: Input }],
|
|
241
|
+
rowRange: [{ type: Input }],
|
|
242
|
+
sizeRange: [{ type: Input }],
|
|
243
|
+
displayedRow: [{ type: Input }],
|
|
244
|
+
isCroppedSize: [{ type: Input }]
|
|
477
245
|
};
|
|
478
|
-
if (false) {
|
|
479
|
-
/** @type {?} */
|
|
480
|
-
NgxSquareLayoutComponent.prototype.layoutType;
|
|
481
|
-
}
|
|
482
246
|
|
|
483
|
-
|
|
484
|
-
* @fileoverview added by tsickle
|
|
485
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
486
|
-
*/
|
|
487
|
-
class NgxFrameLayoutComponent extends NgxInfiniteGridComponent {
|
|
488
|
-
constructor() {
|
|
489
|
-
super(...arguments);
|
|
490
|
-
this.layoutType = FrameLayout;
|
|
491
|
-
}
|
|
247
|
+
class NgxFrameInfiniteGridComponent extends NgxInfiniteGridComponent {
|
|
492
248
|
}
|
|
493
|
-
|
|
249
|
+
NgxFrameInfiniteGridComponent.GridClass = FrameInfiniteGrid;
|
|
250
|
+
NgxFrameInfiniteGridComponent.decorators = [
|
|
494
251
|
{ type: Component, args: [{
|
|
495
|
-
selector: 'ngx-
|
|
252
|
+
selector: 'ngx-frame-infinite-grid, [NgxFrameInfiniteGrid]',
|
|
496
253
|
template: TEMPLATE
|
|
497
|
-
}] }
|
|
254
|
+
},] }
|
|
498
255
|
];
|
|
499
|
-
|
|
500
|
-
|
|
256
|
+
NgxFrameInfiniteGridComponent.propDecorators = {
|
|
257
|
+
frame: [{ type: Input }],
|
|
258
|
+
useFrameFill: [{ type: Input }],
|
|
259
|
+
rectSize: [{ type: Input }]
|
|
501
260
|
};
|
|
502
|
-
if (false) {
|
|
503
|
-
/** @type {?} */
|
|
504
|
-
NgxFrameLayoutComponent.prototype.layoutType;
|
|
505
|
-
}
|
|
506
261
|
|
|
507
|
-
|
|
508
|
-
* @fileoverview added by tsickle
|
|
509
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
510
|
-
*/
|
|
511
|
-
class NgxPackingLayoutComponent extends NgxInfiniteGridComponent {
|
|
512
|
-
constructor() {
|
|
513
|
-
super(...arguments);
|
|
514
|
-
this.layoutType = PackingLayout;
|
|
515
|
-
}
|
|
262
|
+
class NgxPackingInfiniteGridComponent extends NgxInfiniteGridComponent {
|
|
516
263
|
}
|
|
517
|
-
|
|
264
|
+
NgxPackingInfiniteGridComponent.GridClass = PackingInfiniteGrid;
|
|
265
|
+
NgxPackingInfiniteGridComponent.decorators = [
|
|
518
266
|
{ type: Component, args: [{
|
|
519
|
-
selector: 'ngx-
|
|
267
|
+
selector: 'ngx-packing-infinite-grid, [NgxPackingInfiniteGrid]',
|
|
520
268
|
template: TEMPLATE
|
|
521
|
-
}] }
|
|
269
|
+
},] }
|
|
522
270
|
];
|
|
523
|
-
|
|
524
|
-
|
|
271
|
+
NgxPackingInfiniteGridComponent.propDecorators = {
|
|
272
|
+
aspectRatio: [{ type: Input }],
|
|
273
|
+
sizeWeight: [{ type: Input }],
|
|
274
|
+
ratioWeight: [{ type: Input }],
|
|
275
|
+
weightPriority: [{ type: Input }]
|
|
525
276
|
};
|
|
526
|
-
if (false) {
|
|
527
|
-
/** @type {?} */
|
|
528
|
-
NgxPackingLayoutComponent.prototype.layoutType;
|
|
529
|
-
}
|
|
530
277
|
|
|
531
|
-
/**
|
|
532
|
-
* @fileoverview added by tsickle
|
|
533
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
534
|
-
*/
|
|
535
278
|
class NgxInfiniteGridModule {
|
|
536
279
|
}
|
|
537
280
|
NgxInfiniteGridModule.decorators = [
|
|
538
281
|
{ type: NgModule, args: [{
|
|
539
282
|
declarations: [
|
|
540
283
|
NgxInfiniteGridComponent,
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
NgxPackingLayoutComponent,
|
|
284
|
+
NgxMasonryInfiniteGridComponent,
|
|
285
|
+
NgxJustifiedInfiniteGridComponent,
|
|
286
|
+
NgxFrameInfiniteGridComponent,
|
|
287
|
+
NgxPackingInfiniteGridComponent,
|
|
546
288
|
],
|
|
547
289
|
imports: [
|
|
548
290
|
CommonModule,
|
|
549
291
|
],
|
|
550
292
|
exports: [
|
|
551
293
|
NgxInfiniteGridComponent,
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
NgxPackingLayoutComponent,
|
|
294
|
+
NgxMasonryInfiniteGridComponent,
|
|
295
|
+
NgxJustifiedInfiniteGridComponent,
|
|
296
|
+
NgxFrameInfiniteGridComponent,
|
|
297
|
+
NgxPackingInfiniteGridComponent,
|
|
557
298
|
],
|
|
558
299
|
},] }
|
|
559
300
|
];
|
|
560
301
|
|
|
561
|
-
|
|
562
|
-
*
|
|
563
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
302
|
+
/*
|
|
303
|
+
* Public API Surface of ngx-infinitegrid
|
|
564
304
|
*/
|
|
565
305
|
|
|
566
306
|
/**
|
|
567
|
-
*
|
|
568
|
-
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
307
|
+
* Generated bundle index. Do not edit.
|
|
569
308
|
*/
|
|
570
309
|
|
|
571
|
-
export {
|
|
310
|
+
export { NgxInfiniteGridComponent, NgxInfiniteGridModule, NgxInfinitegridService, NgxMasonryInfiniteGridComponent, NgxInfiniteGridInterface as ɵa, TEMPLATE as ɵb, NgxJustifiedInfiniteGridComponent as ɵc, NgxFrameInfiniteGridComponent as ɵd, NgxPackingInfiniteGridComponent as ɵe };
|
|
572
311
|
//# sourceMappingURL=egjs-ngx-infinitegrid.js.map
|