platform-calendar-seatmap 1.0.35 → 1.0.36

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,6 +1,6 @@
1
1
  import { T_Seat, T_SeatMap } from 'platform-calendar-helpers';
2
2
  type actions = {
3
- save: () => void;
3
+ save: () => T_SeatMap;
4
4
  cancel: () => void;
5
5
  updateSeatMap: (seatMap: T_SeatMap) => void;
6
6
  unselectSeat: (seatId: T_Seat['id']) => void;
@@ -0,0 +1,10 @@
1
+ import { T_Element } from 'platform-calendar-helpers';
2
+ import { FC, MutableRefObject, PropsWithChildren } from 'react';
3
+ type T_Props = PropsWithChildren<{
4
+ draggableContainer: MutableRefObject<HTMLElement | null>;
5
+ elementPosition: T_Element['position'];
6
+ disabled?: boolean;
7
+ onDragEnd?: (position: T_Element['position']) => void;
8
+ }>;
9
+ declare const Draggable: FC<T_Props>;
10
+ export { Draggable };
@@ -1,3 +1,7 @@
1
1
  import { FC } from 'react';
2
- declare const ElementSelector: FC;
2
+ import { T_SceneTransform } from "../../helpers/types/commons";
3
+ type T_Props = {
4
+ sceneTransform: T_SceneTransform;
5
+ };
6
+ declare const ElementSelector: FC<T_Props>;
3
7
  export { ElementSelector };
@@ -1,4 +1,7 @@
1
1
  import { FC } from 'react';
2
- type T_Props = {};
2
+ import { T_SceneTransform } from "../../../helpers/types/commons";
3
+ type T_Props = {
4
+ sceneTransform: T_SceneTransform;
5
+ };
3
6
  declare const Dropdown: FC<T_Props>;
4
7
  export { Dropdown };
@@ -1,3 +1,7 @@
1
1
  import { FC } from 'react';
2
- declare const Objects: FC;
2
+ import { T_SceneTransform } from "../../../../../helpers/types/commons";
3
+ type T_Props = {
4
+ sceneTransform: T_SceneTransform;
5
+ };
6
+ declare const Objects: FC<T_Props>;
3
7
  export { Objects };
@@ -1,3 +1,7 @@
1
1
  import { FC } from 'react';
2
- declare const SeatingGroup: FC;
2
+ import { T_SceneTransform } from "../../../../../helpers/types/commons";
3
+ type T_Props = {
4
+ sceneTransform: T_SceneTransform;
5
+ };
6
+ declare const SeatingGroup: FC<T_Props>;
3
7
  export { SeatingGroup };
@@ -1,3 +1,7 @@
1
1
  import { FC } from 'react';
2
- declare const StandingArea: FC;
2
+ import { T_SceneTransform } from "../../../../../helpers/types/commons";
3
+ type T_Props = {
4
+ sceneTransform: T_SceneTransform;
5
+ };
6
+ declare const StandingArea: FC<T_Props>;
3
7
  export { StandingArea };
@@ -1,3 +1,7 @@
1
1
  import { FC } from 'react';
2
- declare const Tables: FC;
2
+ import { T_SceneTransform } from "../../../../../helpers/types/commons";
3
+ type T_Props = {
4
+ sceneTransform: T_SceneTransform;
5
+ };
6
+ declare const Tables: FC<T_Props>;
3
7
  export { Tables };
@@ -1,3 +1,7 @@
1
1
  import { FC } from 'react';
2
- declare const Text: FC;
2
+ import { T_SceneTransform } from "../../../../../helpers/types/commons";
3
+ type T_Props = {
4
+ sceneTransform: T_SceneTransform;
5
+ };
6
+ declare const Text: FC<T_Props>;
3
7
  export { Text };
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ type T_Props = {
3
+ fontSize?: string | number;
4
+ elementTitle: string;
5
+ color?: string;
6
+ disabled?: boolean;
7
+ absolute?: boolean;
8
+ };
9
+ declare const ElementTitle: FC<T_Props>;
10
+ export { ElementTitle };
@@ -1,8 +1,10 @@
1
1
  import { FC, MutableRefObject, PropsWithChildren } from 'react';
2
- import { T_Element } from 'platform-calendar-helpers';
2
+ import { T_Element, T_ElementType } from 'platform-calendar-helpers';
3
3
  type T_Props = {
4
4
  rotateContainer: MutableRefObject<HTMLElement | null>;
5
5
  elementId: T_Element['id'];
6
+ elementType: T_ElementType;
7
+ elementPosition: T_Element['position'];
6
8
  disablePadding?: boolean;
7
9
  initialRotateAngle?: number;
8
10
  disableActions?: boolean;
@@ -1,6 +1,8 @@
1
1
  import { FC } from 'react';
2
+ import { T_SceneTransform } from "../../helpers/types/commons";
2
3
  type T_Props = {
3
4
  wrapperRef: React.MutableRefObject<HTMLDivElement>;
5
+ sceneTransform: T_SceneTransform;
4
6
  };
5
7
  declare const SceneContainer: FC<T_Props>;
6
8
  export { SceneContainer };
@@ -8,4 +8,5 @@ declare const D_SEAT: {
8
8
  locked: boolean;
9
9
  hide: boolean;
10
10
  };
11
- export { ELEMENT_DRAG_STEPS_BY_SCALE, D_SEAT };
11
+ declare const CORRECT_SCENE_POSITION_EVENT_NAME = "correct_scene_position_event_name";
12
+ export { ELEMENT_DRAG_STEPS_BY_SCALE, D_SEAT, CORRECT_SCENE_POSITION_EVENT_NAME };
@@ -1,4 +1,11 @@
1
1
  import { T_SeatMap } from 'platform-calendar-helpers';
2
2
  declare const removeFakeElementsFromSeatMap: (_seatMap: T_SeatMap) => T_SeatMap;
3
3
  declare const addFakeElementsToSeatMap: (_seatMap: T_SeatMap) => T_SeatMap;
4
- export { removeFakeElementsFromSeatMap, addFakeElementsToSeatMap };
4
+ declare const getElementInitialPosition: (sceneCoords: {
5
+ x: number;
6
+ y: number;
7
+ }) => {
8
+ top: number;
9
+ left: number;
10
+ };
11
+ export { removeFakeElementsFromSeatMap, addFakeElementsToSeatMap, getElementInitialPosition };
@@ -3,4 +3,8 @@ type RecursivePartial<T> = {
3
3
  [P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial<U>[] : T[P] extends object ? RecursivePartial<T[P]> : T[P];
4
4
  };
5
5
  type T_Mode = (typeof MODES)[keyof typeof MODES];
6
- export { type RecursivePartial, type T_Mode };
6
+ type T_SceneTransform = React.MutableRefObject<{
7
+ x: number;
8
+ y: number;
9
+ }>;
10
+ export { type RecursivePartial, type T_Mode, type T_SceneTransform };