@schneideress/dashboardframework 0.0.1
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 +24 -0
- package/bundles/schneideress-dashboardframework.umd.js +5666 -0
- package/bundles/schneideress-dashboardframework.umd.js.map +1 -0
- package/bundles/schneideress-dashboardframework.umd.min.js +2 -0
- package/bundles/schneideress-dashboardframework.umd.min.js.map +1 -0
- package/esm2015/gridster/index.js +18 -0
- package/esm2015/gridster/lib/gridster.component.js +695 -0
- package/esm2015/gridster/lib/gridster.interface.js +84 -0
- package/esm2015/gridster/lib/gridster.module.js +27 -0
- package/esm2015/gridster/lib/gridsterCompact.service.js +223 -0
- package/esm2015/gridster/lib/gridsterConfig.constant.js +179 -0
- package/esm2015/gridster/lib/gridsterConfig.interface.js +219 -0
- package/esm2015/gridster/lib/gridsterConfigS.interface.js +161 -0
- package/esm2015/gridster/lib/gridsterDraggable.service.js +510 -0
- package/esm2015/gridster/lib/gridsterEmptyCell.service.js +317 -0
- package/esm2015/gridster/lib/gridsterItem.component.js +213 -0
- package/esm2015/gridster/lib/gridsterItem.interface.js +46 -0
- package/esm2015/gridster/lib/gridsterItemComponent.interface.js +48 -0
- package/esm2015/gridster/lib/gridsterPreview.component.js +66 -0
- package/esm2015/gridster/lib/gridsterPush.service.js +467 -0
- package/esm2015/gridster/lib/gridsterPushResize.service.js +358 -0
- package/esm2015/gridster/lib/gridsterRenderer.service.js +277 -0
- package/esm2015/gridster/lib/gridsterResizable.service.js +552 -0
- package/esm2015/gridster/lib/gridsterResizeEventType.interface.js +19 -0
- package/esm2015/gridster/lib/gridsterScroll.service.js +195 -0
- package/esm2015/gridster/lib/gridsterSwap.service.js +134 -0
- package/esm2015/gridster/lib/gridsterUtils.service.js +137 -0
- package/esm2015/lib/ra-dashboard-area/ra.dashboard.area.js +258 -0
- package/esm2015/lib/ra-widget-container/ra.widget.container.component.js +216 -0
- package/esm2015/lib/ra.base.dashboard.filter.js +35 -0
- package/esm2015/lib/ra.base.dashboard.template.js +63 -0
- package/esm2015/lib/ra.dashbard.event.bus.js +85 -0
- package/esm2015/lib/ra.dashboard.module.js +31 -0
- package/esm2015/lib/ra.dashboard.service.js +213 -0
- package/esm2015/lib/ra.event.enum.js +33 -0
- package/esm2015/lib/ra.gridster.config.js +63 -0
- package/esm2015/public-api.js +16 -0
- package/esm2015/schneideress-dashboardframework.js +13 -0
- package/esm5/gridster/index.js +18 -0
- package/esm5/gridster/lib/gridster.component.js +798 -0
- package/esm5/gridster/lib/gridster.interface.js +94 -0
- package/esm5/gridster/lib/gridster.module.js +31 -0
- package/esm5/gridster/lib/gridsterCompact.service.js +253 -0
- package/esm5/gridster/lib/gridsterConfig.constant.js +179 -0
- package/esm5/gridster/lib/gridsterConfig.interface.js +219 -0
- package/esm5/gridster/lib/gridsterConfigS.interface.js +161 -0
- package/esm5/gridster/lib/gridsterDraggable.service.js +549 -0
- package/esm5/gridster/lib/gridsterEmptyCell.service.js +358 -0
- package/esm5/gridster/lib/gridsterItem.component.js +238 -0
- package/esm5/gridster/lib/gridsterItem.interface.js +46 -0
- package/esm5/gridster/lib/gridsterItemComponent.interface.js +58 -0
- package/esm5/gridster/lib/gridsterPreview.component.js +70 -0
- package/esm5/gridster/lib/gridsterPush.service.js +547 -0
- package/esm5/gridster/lib/gridsterPushResize.service.js +423 -0
- package/esm5/gridster/lib/gridsterRenderer.service.js +323 -0
- package/esm5/gridster/lib/gridsterResizable.service.js +629 -0
- package/esm5/gridster/lib/gridsterResizeEventType.interface.js +19 -0
- package/esm5/gridster/lib/gridsterScroll.service.js +195 -0
- package/esm5/gridster/lib/gridsterSwap.service.js +152 -0
- package/esm5/gridster/lib/gridsterUtils.service.js +177 -0
- package/esm5/lib/ra-dashboard-area/ra.dashboard.area.js +307 -0
- package/esm5/lib/ra-widget-container/ra.widget.container.component.js +277 -0
- package/esm5/lib/ra.base.dashboard.filter.js +38 -0
- package/esm5/lib/ra.base.dashboard.template.js +63 -0
- package/esm5/lib/ra.dashbard.event.bus.js +125 -0
- package/esm5/lib/ra.dashboard.module.js +35 -0
- package/esm5/lib/ra.dashboard.service.js +295 -0
- package/esm5/lib/ra.event.enum.js +33 -0
- package/esm5/lib/ra.gridster.config.js +63 -0
- package/esm5/public-api.js +16 -0
- package/esm5/schneideress-dashboardframework.js +13 -0
- package/fesm2015/schneideress-dashboardframework.js +4811 -0
- package/fesm2015/schneideress-dashboardframework.js.map +1 -0
- package/fesm5/schneideress-dashboardframework.js +5613 -0
- package/fesm5/schneideress-dashboardframework.js.map +1 -0
- package/gridster/index.d.ts +11 -0
- package/gridster/lib/gridster.component.d.ts +67 -0
- package/gridster/lib/gridster.interface.d.ts +46 -0
- package/gridster/lib/gridster.module.d.ts +2 -0
- package/gridster/lib/gridsterCompact.service.d.ts +15 -0
- package/gridster/lib/gridsterConfig.constant.d.ts +2 -0
- package/gridster/lib/gridsterConfig.interface.d.ts +133 -0
- package/gridster/lib/gridsterConfigS.interface.d.ts +93 -0
- package/gridster/lib/gridsterDraggable.service.d.ts +59 -0
- package/gridster/lib/gridsterEmptyCell.service.d.ts +29 -0
- package/gridster/lib/gridsterItem.component.d.ts +32 -0
- package/gridster/lib/gridsterItem.interface.d.ts +21 -0
- package/gridster/lib/gridsterItemComponent.interface.d.ts +25 -0
- package/gridster/lib/gridsterPreview.component.d.ts +10 -0
- package/gridster/lib/gridsterPush.service.d.ts +33 -0
- package/gridster/lib/gridsterPushResize.service.d.ts +26 -0
- package/gridster/lib/gridsterRenderer.service.d.ts +38 -0
- package/gridster/lib/gridsterResizable.service.d.ts +67 -0
- package/gridster/lib/gridsterResizeEventType.interface.d.ts +6 -0
- package/gridster/lib/gridsterScroll.service.d.ts +4 -0
- package/gridster/lib/gridsterSwap.service.d.ts +13 -0
- package/gridster/lib/gridsterUtils.service.d.ts +16 -0
- package/lib/ra-dashboard-area/ra.dashboard.area.d.ts +37 -0
- package/lib/ra-widget-container/ra.widget.container.component.d.ts +37 -0
- package/lib/ra.base.dashboard.filter.d.ts +4 -0
- package/lib/ra.base.dashboard.template.d.ts +14 -0
- package/lib/ra.dashbard.event.bus.d.ts +20 -0
- package/lib/ra.dashboard.module.d.ts +2 -0
- package/lib/ra.dashboard.service.d.ts +73 -0
- package/lib/ra.event.enum.d.ts +24 -0
- package/lib/ra.gridster.config.d.ts +2 -0
- package/package.json +25 -0
- package/public-api.d.ts +8 -0
- package/schneideress-dashboardframework.d.ts +8 -0
- package/schneideress-dashboardframework.metadata.json +1 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { GridsterComponent } from './lib/gridster.component';
|
|
2
|
+
export { GridsterItemComponent } from './lib/gridsterItem.component';
|
|
3
|
+
export { GridsterItem } from './lib/gridsterItem.interface';
|
|
4
|
+
export { GridsterItemComponentInterface } from './lib/gridsterItemComponent.interface';
|
|
5
|
+
export { GridsterComponentInterface } from './lib/gridster.interface';
|
|
6
|
+
export { GridsterConfig, GridType, DisplayGrid, CompactType, Draggable, Resizable, PushDirections } from './lib/gridsterConfig.interface';
|
|
7
|
+
export { GridsterConfigService } from './lib/gridsterConfig.constant';
|
|
8
|
+
export { GridsterModule } from './lib/gridster.module';
|
|
9
|
+
export { GridsterPush } from './lib/gridsterPush.service';
|
|
10
|
+
export { GridsterPushResize } from './lib/gridsterPushResize.service';
|
|
11
|
+
export { GridsterSwap } from './lib/gridsterSwap.service';
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { ChangeDetectorRef, ElementRef, NgZone, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { GridsterConfig } from './gridsterConfig.interface';
|
|
3
|
+
import { GridsterEmptyCell } from './gridsterEmptyCell.service';
|
|
4
|
+
import { GridsterCompact } from './gridsterCompact.service';
|
|
5
|
+
import { GridsterConfigS } from './gridsterConfigS.interface';
|
|
6
|
+
import { GridsterComponentInterface } from './gridster.interface';
|
|
7
|
+
import { GridsterItemComponentInterface } from './gridsterItemComponent.interface';
|
|
8
|
+
import { GridsterRenderer } from './gridsterRenderer.service';
|
|
9
|
+
import { GridsterItem } from './gridsterItem.interface';
|
|
10
|
+
export declare class GridsterComponent implements OnInit, OnChanges, OnDestroy, GridsterComponentInterface {
|
|
11
|
+
renderer: Renderer2;
|
|
12
|
+
cdRef: ChangeDetectorRef;
|
|
13
|
+
zone: NgZone;
|
|
14
|
+
options: GridsterConfig;
|
|
15
|
+
calculateLayoutDebounce: () => void;
|
|
16
|
+
movingItem: GridsterItem | null;
|
|
17
|
+
previewStyle: () => void;
|
|
18
|
+
el: any;
|
|
19
|
+
$options: GridsterConfigS;
|
|
20
|
+
mobile: boolean;
|
|
21
|
+
curWidth: number;
|
|
22
|
+
curHeight: number;
|
|
23
|
+
grid: Array<GridsterItemComponentInterface>;
|
|
24
|
+
columns: number;
|
|
25
|
+
rows: number;
|
|
26
|
+
curColWidth: number;
|
|
27
|
+
curRowHeight: number;
|
|
28
|
+
gridColumns: any[];
|
|
29
|
+
gridRows: any[];
|
|
30
|
+
windowResize: (() => void) | null;
|
|
31
|
+
dragInProgress: boolean;
|
|
32
|
+
emptyCell: GridsterEmptyCell;
|
|
33
|
+
compact: GridsterCompact;
|
|
34
|
+
gridRenderer: GridsterRenderer;
|
|
35
|
+
constructor(el: ElementRef, renderer: Renderer2, cdRef: ChangeDetectorRef, zone: NgZone);
|
|
36
|
+
static checkCollisionTwoItems(item: GridsterItem, item2: GridsterItem): boolean;
|
|
37
|
+
ngOnInit(): void;
|
|
38
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
39
|
+
getCurrentRowHeight(): number;
|
|
40
|
+
resize(): void;
|
|
41
|
+
setOptions(): void;
|
|
42
|
+
optionsChanged(): void;
|
|
43
|
+
ngOnDestroy(): void;
|
|
44
|
+
onResize(): void;
|
|
45
|
+
checkIfToResize(): boolean;
|
|
46
|
+
setGridSize(): void;
|
|
47
|
+
setGridDimensions(): void;
|
|
48
|
+
calculateLayout(): void;
|
|
49
|
+
updateGrid(): void;
|
|
50
|
+
addItem(itemComponent: GridsterItemComponentInterface): void;
|
|
51
|
+
removeItem(itemComponent: GridsterItemComponentInterface): void;
|
|
52
|
+
checkCollision(item: GridsterItem): GridsterItemComponentInterface | boolean;
|
|
53
|
+
checkGridCollision(item: GridsterItem): boolean;
|
|
54
|
+
findItemWithItem(item: GridsterItem): GridsterItemComponentInterface | boolean;
|
|
55
|
+
findItemsWithItem(item: GridsterItem): Array<GridsterItemComponentInterface>;
|
|
56
|
+
autoPositionItem(itemComponent: GridsterItemComponentInterface): void;
|
|
57
|
+
getNextPossiblePosition(newItem: GridsterItem, startingFrom?: {
|
|
58
|
+
y?: number;
|
|
59
|
+
x?: number;
|
|
60
|
+
}): boolean;
|
|
61
|
+
getFirstPossiblePosition(item: GridsterItem): GridsterItem;
|
|
62
|
+
getLastPossiblePosition(item: GridsterItem): GridsterItem;
|
|
63
|
+
pixelsToPositionX(x: number, roundingMethod: Function, noLimit?: boolean): number;
|
|
64
|
+
pixelsToPositionY(y: number, roundingMethod: Function, noLimit?: boolean): number;
|
|
65
|
+
positionXToPixels(x: number): number;
|
|
66
|
+
positionYToPixels(y: number): number;
|
|
67
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { GridsterConfigS } from './gridsterConfigS.interface';
|
|
2
|
+
import { ChangeDetectorRef, NgZone, Renderer2 } from '@angular/core';
|
|
3
|
+
import { GridsterEmptyCell } from './gridsterEmptyCell.service';
|
|
4
|
+
import { GridsterCompact } from './gridsterCompact.service';
|
|
5
|
+
import { GridsterConfig } from './gridsterConfig.interface';
|
|
6
|
+
import { GridsterItem } from './gridsterItem.interface';
|
|
7
|
+
import { GridsterItemComponentInterface } from './gridsterItemComponent.interface';
|
|
8
|
+
import { GridsterRenderer } from './gridsterRenderer.service';
|
|
9
|
+
export declare abstract class GridsterComponentInterface {
|
|
10
|
+
$options: GridsterConfigS;
|
|
11
|
+
grid: Array<GridsterItemComponentInterface>;
|
|
12
|
+
checkCollision: (item: GridsterItem) => GridsterItemComponentInterface | boolean;
|
|
13
|
+
positionXToPixels: (x: number) => number;
|
|
14
|
+
pixelsToPositionX: (x: number, roundingMethod: (x: number) => number, noLimit?: boolean) => number;
|
|
15
|
+
positionYToPixels: (y: number) => number;
|
|
16
|
+
pixelsToPositionY: (y: number, roundingMethod: (x: number) => number, noLimit?: boolean) => number;
|
|
17
|
+
findItemWithItem: (item: GridsterItem) => GridsterItemComponentInterface | boolean;
|
|
18
|
+
findItemsWithItem: (item: GridsterItem) => Array<GridsterItemComponentInterface>;
|
|
19
|
+
checkGridCollision: (item: GridsterItem) => boolean;
|
|
20
|
+
el: any;
|
|
21
|
+
renderer: Renderer2;
|
|
22
|
+
gridRenderer: GridsterRenderer;
|
|
23
|
+
cdRef: ChangeDetectorRef;
|
|
24
|
+
options: GridsterConfig;
|
|
25
|
+
calculateLayoutDebounce: () => void;
|
|
26
|
+
updateGrid: () => void;
|
|
27
|
+
movingItem: GridsterItem | null;
|
|
28
|
+
addItem: (item: GridsterItemComponentInterface) => void;
|
|
29
|
+
removeItem: (item: GridsterItemComponentInterface) => void;
|
|
30
|
+
previewStyle: (drag?: boolean) => void;
|
|
31
|
+
mobile: boolean;
|
|
32
|
+
curWidth: number;
|
|
33
|
+
curHeight: number;
|
|
34
|
+
columns: number;
|
|
35
|
+
rows: number;
|
|
36
|
+
curColWidth: number;
|
|
37
|
+
curRowHeight: number;
|
|
38
|
+
windowResize: (() => void) | null;
|
|
39
|
+
setGridDimensions: (() => void);
|
|
40
|
+
dragInProgress: boolean;
|
|
41
|
+
emptyCell: GridsterEmptyCell;
|
|
42
|
+
compact: GridsterCompact;
|
|
43
|
+
zone: NgZone;
|
|
44
|
+
gridRows: Array<number>;
|
|
45
|
+
gridColumns: Array<number>;
|
|
46
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { GridsterComponentInterface } from './gridster.interface';
|
|
2
|
+
import { GridsterItem } from './gridsterItem.interface';
|
|
3
|
+
export declare class GridsterCompact {
|
|
4
|
+
private gridster;
|
|
5
|
+
constructor(gridster: GridsterComponentInterface);
|
|
6
|
+
destroy(): void;
|
|
7
|
+
checkCompact(): void;
|
|
8
|
+
checkCompactItem(item: GridsterItem): void;
|
|
9
|
+
checkCompactUp(): void;
|
|
10
|
+
moveUpTillCollision(item: GridsterItem): boolean;
|
|
11
|
+
checkCompactLeft(): void;
|
|
12
|
+
checkCompactRight(): void;
|
|
13
|
+
moveLeftTillCollision(item: GridsterItem): boolean;
|
|
14
|
+
moveRightTillCollision(item: any): boolean;
|
|
15
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { GridsterItem } from './gridsterItem.interface';
|
|
2
|
+
import { GridsterItemComponentInterface } from './gridsterItemComponent.interface';
|
|
3
|
+
import { GridsterComponentInterface } from './gridster.interface';
|
|
4
|
+
export declare type gridTypes = 'fit' | 'scrollVertical' | 'scrollHorizontal' | 'fixed' | 'verticalFixed' | 'horizontalFixed';
|
|
5
|
+
export declare type displayGrids = 'always' | 'onDrag&Resize' | 'none';
|
|
6
|
+
export declare type compactTypes = 'none' | 'compactUp' | 'compactLeft' | 'compactUp&Left' | 'compactLeft&Up' | 'compactRight' | 'compactUp&Right' | 'compactRight&Up';
|
|
7
|
+
export declare enum GridType {
|
|
8
|
+
Fit = "fit",
|
|
9
|
+
ScrollVertical = "scrollVertical",
|
|
10
|
+
ScrollHorizontal = "scrollHorizontal",
|
|
11
|
+
Fixed = "fixed",
|
|
12
|
+
VerticalFixed = "verticalFixed",
|
|
13
|
+
HorizontalFixed = "horizontalFixed"
|
|
14
|
+
}
|
|
15
|
+
export declare enum DisplayGrid {
|
|
16
|
+
Always = "always",
|
|
17
|
+
OnDragAndResize = "onDrag&Resize",
|
|
18
|
+
None = "none"
|
|
19
|
+
}
|
|
20
|
+
export declare enum CompactType {
|
|
21
|
+
None = "none",
|
|
22
|
+
CompactUp = "compactUp",
|
|
23
|
+
CompactLeft = "compactLeft",
|
|
24
|
+
CompactUpAndLeft = "compactUp&Left",
|
|
25
|
+
CompactLeftAndUp = "compactLeft&Up",
|
|
26
|
+
CompactRight = "compactRight",
|
|
27
|
+
CompactUpAndRight = "compactUp&Right",
|
|
28
|
+
CompactRightAndUp = "compactRight&Up"
|
|
29
|
+
}
|
|
30
|
+
export interface GridsterConfig {
|
|
31
|
+
gridType?: gridTypes;
|
|
32
|
+
fixedColWidth?: number;
|
|
33
|
+
fixedRowHeight?: number;
|
|
34
|
+
keepFixedHeightInMobile?: boolean;
|
|
35
|
+
keepFixedWidthInMobile?: boolean;
|
|
36
|
+
setGridSize?: boolean;
|
|
37
|
+
compactType?: compactTypes;
|
|
38
|
+
mobileBreakpoint?: number;
|
|
39
|
+
minCols?: number;
|
|
40
|
+
maxCols?: number;
|
|
41
|
+
minRows?: number;
|
|
42
|
+
maxRows?: number;
|
|
43
|
+
defaultItemCols?: number;
|
|
44
|
+
defaultItemRows?: number;
|
|
45
|
+
maxItemCols?: number;
|
|
46
|
+
maxItemRows?: number;
|
|
47
|
+
minItemCols?: number;
|
|
48
|
+
minItemRows?: number;
|
|
49
|
+
minItemArea?: number;
|
|
50
|
+
maxItemArea?: number;
|
|
51
|
+
margin?: number;
|
|
52
|
+
outerMargin?: boolean;
|
|
53
|
+
outerMarginTop?: number | null;
|
|
54
|
+
outerMarginRight?: number | null;
|
|
55
|
+
outerMarginBottom?: number | null;
|
|
56
|
+
outerMarginLeft?: number | null;
|
|
57
|
+
useTransformPositioning?: boolean;
|
|
58
|
+
scrollSensitivity?: number | null;
|
|
59
|
+
scrollSpeed?: number;
|
|
60
|
+
initCallback?: (gridster: GridsterComponentInterface) => void;
|
|
61
|
+
destroyCallback?: (gridster: GridsterComponentInterface) => void;
|
|
62
|
+
gridSizeChangedCallback?: (gridster: GridsterComponentInterface) => void;
|
|
63
|
+
itemChangeCallback?: (item: GridsterItem, itemComponent: GridsterItemComponentInterface) => void;
|
|
64
|
+
itemResizeCallback?: (item: GridsterItem, itemComponent: GridsterItemComponentInterface) => void;
|
|
65
|
+
itemInitCallback?: (item: GridsterItem, itemComponent: GridsterItemComponentInterface) => void;
|
|
66
|
+
itemRemovedCallback?: (item: GridsterItem, itemComponent: GridsterItemComponentInterface) => void;
|
|
67
|
+
itemValidateCallback?: (item: GridsterItem) => boolean;
|
|
68
|
+
draggable?: Draggable;
|
|
69
|
+
resizable?: Resizable;
|
|
70
|
+
swap?: boolean;
|
|
71
|
+
pushItems?: boolean;
|
|
72
|
+
disablePushOnDrag?: boolean;
|
|
73
|
+
disablePushOnResize?: boolean;
|
|
74
|
+
disableAutoPositionOnConflict?: boolean;
|
|
75
|
+
pushDirections?: PushDirections;
|
|
76
|
+
pushResizeItems?: boolean;
|
|
77
|
+
displayGrid?: displayGrids;
|
|
78
|
+
disableWindowResize?: boolean;
|
|
79
|
+
disableWarnings?: boolean;
|
|
80
|
+
scrollToNewItems?: boolean;
|
|
81
|
+
enableEmptyCellClick?: boolean;
|
|
82
|
+
enableEmptyCellContextMenu?: boolean;
|
|
83
|
+
enableEmptyCellDrop?: boolean;
|
|
84
|
+
enableEmptyCellDrag?: boolean;
|
|
85
|
+
emptyCellClickCallback?: (event: MouseEvent, item: GridsterItem) => void;
|
|
86
|
+
emptyCellContextMenuCallback?: (event: MouseEvent, item: GridsterItem) => void;
|
|
87
|
+
emptyCellDropCallback?: (event: MouseEvent, item: GridsterItem) => void;
|
|
88
|
+
emptyCellDragCallback?: (event: MouseEvent, item: GridsterItem) => void;
|
|
89
|
+
emptyCellDragMaxCols?: number;
|
|
90
|
+
emptyCellDragMaxRows?: number;
|
|
91
|
+
ignoreMarginInRow?: boolean;
|
|
92
|
+
autoResizeonDrag?: boolean;
|
|
93
|
+
api?: {
|
|
94
|
+
resize?: () => void;
|
|
95
|
+
optionsChanged?: () => void;
|
|
96
|
+
getNextPossiblePosition?: (newItem: GridsterItem) => boolean;
|
|
97
|
+
getFirstPossiblePosition?: (item: GridsterItem) => GridsterItem;
|
|
98
|
+
getLastPossiblePosition?: (item: GridsterItem) => GridsterItem;
|
|
99
|
+
getCurrentRowHeight?: () => number;
|
|
100
|
+
};
|
|
101
|
+
[propName: string]: any;
|
|
102
|
+
}
|
|
103
|
+
export interface DragBase {
|
|
104
|
+
enabled?: boolean;
|
|
105
|
+
stop?: (item: GridsterItem, itemComponent: GridsterItemComponentInterface, event: MouseEvent) => Promise<any> | void;
|
|
106
|
+
start?: (item: GridsterItem, itemComponent: GridsterItemComponentInterface, event: MouseEvent) => void;
|
|
107
|
+
delayStart?: number;
|
|
108
|
+
}
|
|
109
|
+
export interface Draggable extends DragBase {
|
|
110
|
+
ignoreContentClass?: string;
|
|
111
|
+
ignoreContent?: boolean;
|
|
112
|
+
dragHandleClass?: string;
|
|
113
|
+
dropOverItems?: boolean;
|
|
114
|
+
dropOverItemsCallback?: (source: GridsterItem, target: GridsterItem, grid?: GridsterComponentInterface) => void;
|
|
115
|
+
}
|
|
116
|
+
export interface Resizable extends DragBase {
|
|
117
|
+
handles?: {
|
|
118
|
+
s: boolean;
|
|
119
|
+
e: boolean;
|
|
120
|
+
n: boolean;
|
|
121
|
+
w: boolean;
|
|
122
|
+
se: boolean;
|
|
123
|
+
ne: boolean;
|
|
124
|
+
sw: boolean;
|
|
125
|
+
nw: boolean;
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
export interface PushDirections {
|
|
129
|
+
north: boolean;
|
|
130
|
+
east: boolean;
|
|
131
|
+
south: boolean;
|
|
132
|
+
west: boolean;
|
|
133
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { compactTypes, displayGrids, gridTypes } from './gridsterConfig.interface';
|
|
2
|
+
import { GridsterItem } from './gridsterItem.interface';
|
|
3
|
+
import { GridsterComponentInterface } from './gridster.interface';
|
|
4
|
+
export interface GridsterConfigS {
|
|
5
|
+
gridType: gridTypes;
|
|
6
|
+
fixedColWidth: number;
|
|
7
|
+
fixedRowHeight: number;
|
|
8
|
+
keepFixedHeightInMobile: boolean;
|
|
9
|
+
keepFixedWidthInMobile: boolean;
|
|
10
|
+
setGridSize: boolean;
|
|
11
|
+
compactType: compactTypes;
|
|
12
|
+
mobileBreakpoint: number;
|
|
13
|
+
minCols: number;
|
|
14
|
+
maxCols: number;
|
|
15
|
+
minRows: number;
|
|
16
|
+
maxRows: number;
|
|
17
|
+
defaultItemCols: number;
|
|
18
|
+
defaultItemRows: number;
|
|
19
|
+
maxItemCols: number;
|
|
20
|
+
maxItemRows: number;
|
|
21
|
+
minItemCols: number;
|
|
22
|
+
minItemRows: number;
|
|
23
|
+
minItemArea: number;
|
|
24
|
+
maxItemArea: number;
|
|
25
|
+
margin: number;
|
|
26
|
+
outerMargin: boolean;
|
|
27
|
+
outerMarginTop: number | null;
|
|
28
|
+
outerMarginRight: number | null;
|
|
29
|
+
outerMarginBottom: number | null;
|
|
30
|
+
outerMarginLeft: number | null;
|
|
31
|
+
useTransformPositioning: boolean;
|
|
32
|
+
scrollSensitivity: number;
|
|
33
|
+
scrollSpeed: number;
|
|
34
|
+
draggable: Draggable;
|
|
35
|
+
resizable: Resizable;
|
|
36
|
+
swap: boolean;
|
|
37
|
+
pushItems: boolean;
|
|
38
|
+
disablePushOnDrag: boolean;
|
|
39
|
+
disablePushOnResize: boolean;
|
|
40
|
+
disableAutoPositionOnConflict: boolean;
|
|
41
|
+
pushDirections: PushDirections;
|
|
42
|
+
pushResizeItems: boolean;
|
|
43
|
+
displayGrid: displayGrids;
|
|
44
|
+
disableWindowResize: boolean;
|
|
45
|
+
disableWarnings: boolean;
|
|
46
|
+
scrollToNewItems: boolean;
|
|
47
|
+
enableEmptyCellClick: boolean;
|
|
48
|
+
enableEmptyCellContextMenu: boolean;
|
|
49
|
+
enableEmptyCellDrop: boolean;
|
|
50
|
+
enableEmptyCellDrag: boolean;
|
|
51
|
+
emptyCellDragMaxCols: number;
|
|
52
|
+
emptyCellDragMaxRows: number;
|
|
53
|
+
ignoreMarginInRow: boolean;
|
|
54
|
+
api: {
|
|
55
|
+
resize: () => void;
|
|
56
|
+
optionsChanged: () => void;
|
|
57
|
+
getNextPossiblePosition: (newItem: GridsterItem) => boolean;
|
|
58
|
+
getFirstPossiblePosition: (item: GridsterItem) => GridsterItem;
|
|
59
|
+
getLastPossiblePosition: (item: GridsterItem) => GridsterItem;
|
|
60
|
+
getCurrentRowHeight: () => number;
|
|
61
|
+
};
|
|
62
|
+
[propName: string]: any;
|
|
63
|
+
}
|
|
64
|
+
export interface DragBase {
|
|
65
|
+
enabled: boolean;
|
|
66
|
+
delayStart: number;
|
|
67
|
+
[propName: string]: any;
|
|
68
|
+
}
|
|
69
|
+
export interface Draggable extends DragBase {
|
|
70
|
+
ignoreContentClass: string;
|
|
71
|
+
ignoreContent: boolean;
|
|
72
|
+
dragHandleClass: string;
|
|
73
|
+
dropOverItems: boolean;
|
|
74
|
+
dropOverItemsCallback: (source: GridsterItem, target: GridsterItem, grid?: GridsterComponentInterface) => void;
|
|
75
|
+
}
|
|
76
|
+
export interface Resizable extends DragBase {
|
|
77
|
+
handles: {
|
|
78
|
+
s: boolean;
|
|
79
|
+
e: boolean;
|
|
80
|
+
n: boolean;
|
|
81
|
+
w: boolean;
|
|
82
|
+
se: boolean;
|
|
83
|
+
ne: boolean;
|
|
84
|
+
sw: boolean;
|
|
85
|
+
nw: boolean;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
export interface PushDirections {
|
|
89
|
+
north: boolean;
|
|
90
|
+
east: boolean;
|
|
91
|
+
south: boolean;
|
|
92
|
+
west: boolean;
|
|
93
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { NgZone } from '@angular/core';
|
|
2
|
+
import { GridsterSwap } from './gridsterSwap.service';
|
|
3
|
+
import { GridsterPush } from './gridsterPush.service';
|
|
4
|
+
import { GridsterItemComponentInterface } from './gridsterItemComponent.interface';
|
|
5
|
+
import { GridsterComponentInterface } from './gridster.interface';
|
|
6
|
+
export declare class GridsterDraggable {
|
|
7
|
+
private zone;
|
|
8
|
+
gridsterItem: GridsterItemComponentInterface;
|
|
9
|
+
gridster: GridsterComponentInterface;
|
|
10
|
+
lastMouse: {
|
|
11
|
+
clientX: number;
|
|
12
|
+
clientY: number;
|
|
13
|
+
};
|
|
14
|
+
offsetLeft: number;
|
|
15
|
+
offsetTop: number;
|
|
16
|
+
margin: number;
|
|
17
|
+
diffTop: number;
|
|
18
|
+
diffLeft: number;
|
|
19
|
+
top: number;
|
|
20
|
+
left: number;
|
|
21
|
+
height: number;
|
|
22
|
+
width: number;
|
|
23
|
+
positionX: number;
|
|
24
|
+
positionY: number;
|
|
25
|
+
positionXBackup: number;
|
|
26
|
+
positionYBackup: number;
|
|
27
|
+
enabled: boolean;
|
|
28
|
+
dragStartFunction: (event: any) => void;
|
|
29
|
+
dragFunction: (event: any) => void;
|
|
30
|
+
dragStopFunction: (event: any) => void;
|
|
31
|
+
mousemove: Function;
|
|
32
|
+
mouseup: Function;
|
|
33
|
+
mouseleave: Function;
|
|
34
|
+
cancelOnBlur: Function;
|
|
35
|
+
touchmove: Function;
|
|
36
|
+
touchend: Function;
|
|
37
|
+
touchcancel: Function;
|
|
38
|
+
mousedown: Function;
|
|
39
|
+
touchstart: Function;
|
|
40
|
+
push: GridsterPush;
|
|
41
|
+
swap: GridsterSwap;
|
|
42
|
+
path: Array<{
|
|
43
|
+
x: number;
|
|
44
|
+
y: number;
|
|
45
|
+
}>;
|
|
46
|
+
collision: GridsterItemComponentInterface | boolean;
|
|
47
|
+
constructor(gridsterItem: GridsterItemComponentInterface, gridster: GridsterComponentInterface, zone: NgZone);
|
|
48
|
+
destroy(): void;
|
|
49
|
+
dragStart(e: any): void;
|
|
50
|
+
dragMove(e: any): void;
|
|
51
|
+
calculateItemPositionFromMousePosition(e: any): void;
|
|
52
|
+
dragStop(e: any): void;
|
|
53
|
+
cancelDrag(): void;
|
|
54
|
+
makeDrag(): void;
|
|
55
|
+
checkforavailableSpaceintheArea(): import("./gridsterItem.interface").GridsterItem;
|
|
56
|
+
calculateItemPosition(): void;
|
|
57
|
+
toggle(): void;
|
|
58
|
+
dragStartDelay(e: any): void;
|
|
59
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { GridsterItem } from './gridsterItem.interface';
|
|
2
|
+
import { GridsterComponentInterface } from './gridster.interface';
|
|
3
|
+
export declare class GridsterEmptyCell {
|
|
4
|
+
private gridster;
|
|
5
|
+
initialItem: GridsterItem | null;
|
|
6
|
+
emptyCellClick: Function | null;
|
|
7
|
+
emptyCellClickTouch: Function | null;
|
|
8
|
+
emptyCellContextMenu: Function | null;
|
|
9
|
+
emptyCellDrop: Function | null;
|
|
10
|
+
emptyCellDrag: Function | null;
|
|
11
|
+
emptyCellDragTouch: Function | null;
|
|
12
|
+
emptyCellMMove: Function;
|
|
13
|
+
emptyCellMMoveTouch: Function;
|
|
14
|
+
emptyCellUp: Function;
|
|
15
|
+
emptyCellUpTouch: Function;
|
|
16
|
+
emptyCellMove: Function | null;
|
|
17
|
+
emptyCellExit: Function | null;
|
|
18
|
+
constructor(gridster: GridsterComponentInterface);
|
|
19
|
+
destroy(): void;
|
|
20
|
+
updateOptions(): void;
|
|
21
|
+
emptyCellClickCb(e: any): void;
|
|
22
|
+
emptyCellContextMenuCb(e: any): void;
|
|
23
|
+
emptyCellDragDrop(e: any): void;
|
|
24
|
+
emptyCellDragOver(e: any): void;
|
|
25
|
+
emptyCellMouseDown(e: any): void;
|
|
26
|
+
emptyCellMouseMove(e: any): void;
|
|
27
|
+
emptyCellMouseUp(e: any): void;
|
|
28
|
+
getValidItemFromEvent(e: any, oldItem?: GridsterItem | null): GridsterItem | undefined;
|
|
29
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ElementRef, NgZone, OnDestroy, OnInit, Renderer2 } from '@angular/core';
|
|
2
|
+
import { GridsterItem } from './gridsterItem.interface';
|
|
3
|
+
import { GridsterDraggable } from './gridsterDraggable.service';
|
|
4
|
+
import { GridsterResizable } from './gridsterResizable.service';
|
|
5
|
+
import { GridsterItemComponentInterface } from './gridsterItemComponent.interface';
|
|
6
|
+
import { GridsterComponent } from './gridster.component';
|
|
7
|
+
export declare class GridsterItemComponent implements OnInit, OnDestroy, GridsterItemComponentInterface {
|
|
8
|
+
renderer: Renderer2;
|
|
9
|
+
private zone;
|
|
10
|
+
item: GridsterItem;
|
|
11
|
+
$item: GridsterItem;
|
|
12
|
+
el: any;
|
|
13
|
+
gridster: GridsterComponent;
|
|
14
|
+
top: number;
|
|
15
|
+
left: number;
|
|
16
|
+
width: number;
|
|
17
|
+
height: number;
|
|
18
|
+
drag: GridsterDraggable;
|
|
19
|
+
resize: GridsterResizable;
|
|
20
|
+
notPlaced: boolean;
|
|
21
|
+
init: boolean;
|
|
22
|
+
constructor(el: ElementRef, gridster: GridsterComponent, renderer: Renderer2, zone: NgZone);
|
|
23
|
+
ngOnInit(): void;
|
|
24
|
+
updateOptions(): void;
|
|
25
|
+
ngOnDestroy(): void;
|
|
26
|
+
setSize(): void;
|
|
27
|
+
updateItemSize(): void;
|
|
28
|
+
itemChanged(): void;
|
|
29
|
+
checkItemChanges(newValue: GridsterItem, oldValue: GridsterItem): void;
|
|
30
|
+
canBeDragged(): boolean;
|
|
31
|
+
canBeResized(): boolean;
|
|
32
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { GridsterItemComponentInterface } from './gridsterItemComponent.interface';
|
|
2
|
+
export interface GridsterItem {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
rows: number;
|
|
6
|
+
cols: number;
|
|
7
|
+
initCallback?: (item: GridsterItem, itemComponent: GridsterItemComponentInterface) => void;
|
|
8
|
+
dragEnabled?: boolean;
|
|
9
|
+
resizeEnabled?: boolean;
|
|
10
|
+
compactEnabled?: boolean;
|
|
11
|
+
maxItemRows?: number;
|
|
12
|
+
minItemRows?: number;
|
|
13
|
+
maxItemCols?: number;
|
|
14
|
+
minItemCols?: number;
|
|
15
|
+
minItemArea?: number;
|
|
16
|
+
maxItemArea?: number;
|
|
17
|
+
[propName: string]: any;
|
|
18
|
+
curRowHeight?: number;
|
|
19
|
+
widgetHeight?: number;
|
|
20
|
+
widgetInfo?: any;
|
|
21
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { GridsterItem } from './gridsterItem.interface';
|
|
2
|
+
import { GridsterDraggable } from './gridsterDraggable.service';
|
|
3
|
+
import { Renderer2 } from '@angular/core';
|
|
4
|
+
import { GridsterResizable } from './gridsterResizable.service';
|
|
5
|
+
import { GridsterComponentInterface } from './gridster.interface';
|
|
6
|
+
export declare abstract class GridsterItemComponentInterface {
|
|
7
|
+
item: GridsterItem;
|
|
8
|
+
$item: GridsterItem;
|
|
9
|
+
top: number;
|
|
10
|
+
left: number;
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
drag: GridsterDraggable;
|
|
14
|
+
resize: GridsterResizable;
|
|
15
|
+
notPlaced: boolean;
|
|
16
|
+
updateOptions: () => void;
|
|
17
|
+
itemChanged: () => void;
|
|
18
|
+
setSize: () => void;
|
|
19
|
+
checkItemChanges: (newValue: GridsterItem, oldValue: GridsterItem) => void;
|
|
20
|
+
canBeDragged: () => boolean;
|
|
21
|
+
canBeResized: () => boolean;
|
|
22
|
+
el: any;
|
|
23
|
+
gridster: GridsterComponentInterface;
|
|
24
|
+
renderer: Renderer2;
|
|
25
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ElementRef, OnDestroy, Renderer2 } from '@angular/core';
|
|
2
|
+
import { GridsterComponent } from './gridster.component';
|
|
3
|
+
export declare class GridsterPreviewComponent implements OnDestroy {
|
|
4
|
+
renderer: Renderer2;
|
|
5
|
+
el: any;
|
|
6
|
+
gridster: GridsterComponent;
|
|
7
|
+
constructor(el: ElementRef, gridster: GridsterComponent, renderer: Renderer2);
|
|
8
|
+
ngOnDestroy(): void;
|
|
9
|
+
previewStyle(drag?: boolean): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { GridsterItemComponentInterface } from './gridsterItemComponent.interface';
|
|
2
|
+
export declare class GridsterPush {
|
|
3
|
+
fromSouth: string;
|
|
4
|
+
fromNorth: string;
|
|
5
|
+
fromEast: string;
|
|
6
|
+
fromWest: string;
|
|
7
|
+
private pushedItems;
|
|
8
|
+
private pushedItemsTemp;
|
|
9
|
+
private pushedItemsTempPath;
|
|
10
|
+
private pushedItemsPath;
|
|
11
|
+
private gridsterItem;
|
|
12
|
+
private gridster;
|
|
13
|
+
private pushedItemsOrder;
|
|
14
|
+
private tryPattern;
|
|
15
|
+
constructor(gridsterItem: GridsterItemComponentInterface);
|
|
16
|
+
destroy(): void;
|
|
17
|
+
pushItems(direction: string, disable?: boolean): boolean;
|
|
18
|
+
restoreTempItems(): void;
|
|
19
|
+
restoreItems(): void;
|
|
20
|
+
setPushedItems(): void;
|
|
21
|
+
checkPushBack(): void;
|
|
22
|
+
private push;
|
|
23
|
+
private trySouth;
|
|
24
|
+
private tryNorth;
|
|
25
|
+
private tryEast;
|
|
26
|
+
private tryWest;
|
|
27
|
+
private addToTempPushed;
|
|
28
|
+
private removeFromTempPushed;
|
|
29
|
+
private addToPushed;
|
|
30
|
+
private removeFromPushed;
|
|
31
|
+
private removeFromPushedItem;
|
|
32
|
+
private checkPushedItem;
|
|
33
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { GridsterItemComponentInterface } from './gridsterItemComponent.interface';
|
|
2
|
+
export declare class GridsterPushResize {
|
|
3
|
+
fromSouth: string;
|
|
4
|
+
fromNorth: string;
|
|
5
|
+
fromEast: string;
|
|
6
|
+
fromWest: string;
|
|
7
|
+
private pushedItems;
|
|
8
|
+
private pushedItemsPath;
|
|
9
|
+
private gridsterItem;
|
|
10
|
+
private gridster;
|
|
11
|
+
private tryPattern;
|
|
12
|
+
constructor(gridsterItem: GridsterItemComponentInterface);
|
|
13
|
+
destroy(): void;
|
|
14
|
+
pushItems(direction: string): boolean;
|
|
15
|
+
restoreItems(): void;
|
|
16
|
+
setPushedItems(): void;
|
|
17
|
+
checkPushBack(): void;
|
|
18
|
+
private push;
|
|
19
|
+
private trySouth;
|
|
20
|
+
private tryNorth;
|
|
21
|
+
private tryEast;
|
|
22
|
+
private tryWest;
|
|
23
|
+
private addToPushed;
|
|
24
|
+
private removeFromPushed;
|
|
25
|
+
private checkPushedItem;
|
|
26
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Renderer2 } from '@angular/core';
|
|
2
|
+
import { GridsterComponentInterface } from './gridster.interface';
|
|
3
|
+
import { GridsterItem } from './gridsterItem.interface';
|
|
4
|
+
export declare class GridsterRenderer {
|
|
5
|
+
private gridster;
|
|
6
|
+
constructor(gridster: GridsterComponentInterface);
|
|
7
|
+
destroy(): void;
|
|
8
|
+
updateItem(el: any, item: GridsterItem, renderer: Renderer2): void;
|
|
9
|
+
updateGridster(): void;
|
|
10
|
+
getGridColumnStyle(i: number): {
|
|
11
|
+
width: string;
|
|
12
|
+
height: string;
|
|
13
|
+
constructor: Function;
|
|
14
|
+
toString(): string;
|
|
15
|
+
toLocaleString(): string;
|
|
16
|
+
valueOf(): Object;
|
|
17
|
+
hasOwnProperty(v: string | number | symbol): boolean;
|
|
18
|
+
isPrototypeOf(v: Object): boolean;
|
|
19
|
+
propertyIsEnumerable(v: string | number | symbol): boolean;
|
|
20
|
+
};
|
|
21
|
+
getGridRowStyle(i: number): {
|
|
22
|
+
width: string;
|
|
23
|
+
height: string;
|
|
24
|
+
constructor: Function;
|
|
25
|
+
toString(): string;
|
|
26
|
+
toLocaleString(): string;
|
|
27
|
+
valueOf(): Object;
|
|
28
|
+
hasOwnProperty(v: string | number | symbol): boolean;
|
|
29
|
+
isPrototypeOf(v: Object): boolean;
|
|
30
|
+
propertyIsEnumerable(v: string | number | symbol): boolean;
|
|
31
|
+
};
|
|
32
|
+
getLeftPosition(d: number): Object;
|
|
33
|
+
getTopPosition(d: number): Object;
|
|
34
|
+
clearCellPosition(renderer: Renderer2, el: any): void;
|
|
35
|
+
setCellPosition(renderer: Renderer2, el: any, x: number, y: number): void;
|
|
36
|
+
getLeftMargin(): number;
|
|
37
|
+
getTopMargin(): number;
|
|
38
|
+
}
|