@cbm-common/cbm-types 0.0.318 → 0.0.319

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.
@@ -1,14 +1,28 @@
1
1
  import { AvailabilityBoardModel } from './availability-board.model';
2
2
  import { ValueColumnCompModel } from './models/value-column.model';
3
3
  import { ConfigService } from './services/config.service';
4
- import { CdkDragDrop } from '@angular/cdk/drag-drop';
4
+ interface ReservationMovedEvent {
5
+ reservation_id: string;
6
+ booking_id: string;
7
+ old_room: string;
8
+ new_room: string;
9
+ }
5
10
  export declare class CbmAvailabilityBoardComponent {
6
11
  private readonly configService;
7
12
  constructor(configService: ConfigService);
8
- roomDropped: import("@angular/core").OutputEmitterRef<{
9
- roomId: string;
10
- event: AvailabilityBoardModel.EventData;
13
+ private readonly elementRef;
14
+ reservationMoved: import("@angular/core").OutputEmitterRef<ReservationMovedEvent>;
15
+ draggingReservation: import("@angular/core").WritableSignal<any>;
16
+ protected dragPosition: import("@angular/core").WritableSignal<{
17
+ x: number;
18
+ y: number;
11
19
  }>;
20
+ protected isDragging: import("@angular/core").Signal<boolean>;
21
+ private startRow;
22
+ private currentRow;
23
+ private startMouseX;
24
+ private startMouseY;
25
+ private draggedHtmlElement;
12
26
  timelineRange: import("@angular/core").WritableSignal<Date[]>;
13
27
  protected timeline: import("@angular/core").WritableSignal<AvailabilityBoardModel.DateRange[]>;
14
28
  protected titleBody: import("@angular/core").WritableSignal<ValueColumnCompModel.Values[]>;
@@ -25,7 +39,23 @@ export declare class CbmAvailabilityBoardComponent {
25
39
  protected setSpan: (span: number) => string;
26
40
  setValuesColumn(value: AvailabilityBoardModel.ValueColumn[]): void;
27
41
  setEvents<T = any>(events: AvailabilityBoardModel.EventParams[], bgColor?: (d: Date, data: T) => string): void;
42
+ getDragStyle(reservation: any): {
43
+ transform?: undefined;
44
+ zIndex?: undefined;
45
+ position?: undefined;
46
+ pointerEvents?: undefined;
47
+ opacity?: undefined;
48
+ } | {
49
+ transform: string;
50
+ zIndex: string;
51
+ position: string;
52
+ pointerEvents: string;
53
+ opacity: string;
54
+ };
55
+ startDragReservation(event: MouseEvent, reservation: any, row: number): void;
56
+ onMouseMove(event: MouseEvent): void;
57
+ onMouseUp(): void;
28
58
  isToday(date: Date): boolean;
29
59
  isEqualDate(date1: Date, date2: Date): boolean;
30
- drop(event: CdkDragDrop<any>, roomId: string): void;
31
60
  }
61
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cbm-common/cbm-types",
3
- "version": "0.0.318",
3
+ "version": "0.0.319",
4
4
  "main": "index.js",
5
5
  "types": "public-api.d.ts",
6
6
  "exports": {