Skip to content

Commit ceb9858

Browse files
authored
feat: upgrade @tethys/store@21.0.0-next.1 and angular-gridster2@21.0.0 (#209)
1 parent d9ac9b6 commit ceb9858

4 files changed

Lines changed: 7 additions & 17 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@
5757
"@date-fns/tz": "1.2.0",
5858
"@tethys/cdk": "^21.0.0-next.0",
5959
"@tethys/icons": "1.4.79",
60-
"@tethys/store": "20.0.0",
60+
"@tethys/store": "21.0.0-next.1",
6161
"@types/extend": "^3.0.1",
62-
"angular-gridster2": "19.0.0",
62+
"angular-gridster2": "21.0.0",
6363
"cropperjs": "1.5.13",
6464
"date-fns": "^4.1.0",
6565
"date-fns-tz": "^3.2.0",

packages/components/dashboard/dashboard.class.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { TemplateRef, Type } from '@angular/core';
2-
import { GridsterItem } from 'angular-gridster2';
2+
import { GridsterItemConfig } from 'angular-gridster2';
33
import { SafeAny } from 'ngx-tethys/types';
44

55
export type ThyWidgetViewOutlet<T = unknown> = Type<T> | TemplateRef<any>;
@@ -8,7 +8,7 @@ export type ThyWidgetViewOutletContext = Record<string, SafeAny>;
88

99
export type ThyWidgetVieOutletWithContext<T = unknown> = { outlet: ThyWidgetViewOutlet<T>; context: ThyWidgetViewOutletContext };
1010

11-
export interface WidgetGridsterItem extends GridsterItem {
11+
export interface WidgetGridsterItem extends GridsterItemConfig {
1212
widget: ThyWidgetItem;
1313
outlet: ThyWidgetViewOutlet;
1414
outletContext: ThyWidgetViewOutletContext;

packages/components/dashboard/dashboard.component.ts

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,7 @@ import {
1313
output,
1414
viewChild
1515
} from '@angular/core';
16-
import {
17-
CompactType,
18-
DisplayGrid,
19-
GridType,
20-
GridsterComponent,
21-
GridsterConfig,
22-
GridsterItem,
23-
GridsterItemComponent
24-
} from 'angular-gridster2';
16+
import { CompactType, DisplayGrid, GridType, Gridster, GridsterConfig, GridsterItem, GridsterItemConfig } from 'angular-gridster2';
2517
import { ThyViewOutletDirective } from 'ngx-tethys/shared';
2618
import { coerceBooleanProperty } from 'ngx-tethys/util';
2719
import { Observable, Subject, of } from 'rxjs';
@@ -33,7 +25,7 @@ import { ThyWidgetItem, ThyWidgetVieOutletWithContext, ThyWidgetViewOutlet, Widg
3325
templateUrl: './dashboard.component.html',
3426
changeDetection: ChangeDetectionStrategy.OnPush,
3527
host: { class: 'thy-dashboard' },
36-
imports: [GridsterComponent, GridsterItemComponent, ThyViewOutletDirective]
28+
imports: [Gridster, GridsterItem, ThyViewOutletDirective]
3729
})
3830
export class ThyDashboardComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy {
3931
/**
@@ -80,7 +72,7 @@ export class ThyDashboardComponent implements OnInit, OnChanges, AfterViewInit,
8072
disablePushOnDrag: true,
8173
useTransformPositioning: false,
8274
outerMargin: true,
83-
itemChangeCallback: (item: GridsterItem) => {
75+
itemChangeCallback: (item: GridsterItemConfig) => {
8476
const widgets = this.thyWidgets();
8577
const changedWidget = widgets.find((widget) => {
8678
return widget._id === item.widget._id;

packages/components/dashboard/module.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { ThyActionModule } from 'ngx-tethys/action';
33
import { CommonModule } from '@angular/common';
44
import { NgModule } from '@angular/core';
55
import { RouterModule } from '@angular/router';
6-
import { GridsterModule } from 'angular-gridster2';
76
import { ThyIconModule } from 'ngx-tethys/icon';
87
import { ThyTooltipModule } from 'ngx-tethys/tooltip';
98
import { ThyDashboardWidgetHeaderComponent } from './widget/header/widget-header.component';
@@ -17,7 +16,6 @@ const TETHYS_MODULES = [ThyTooltipModule, ThyIconModule, ThyActionModule, ThySha
1716
...TETHYS_MODULES,
1817
RouterModule,
1918
CommonModule,
20-
GridsterModule,
2119
ThyDashboardComponent,
2220
ThyDashboardWidgetHeaderComponent,
2321
ThyDashboardWidgetBodyComponent

0 commit comments

Comments
 (0)