platform-calendar-seatmap 1.0.0 → 1.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.
Files changed (40) hide show
  1. package/dist/components/app/App.d.ts +5 -1
  2. package/dist/components/background/Background.d.ts +1 -1
  3. package/dist/components/draggableElementTitle/DraggableElementTitle.d.ts +4 -3
  4. package/dist/components/draggablePoint/DraggablePoint.d.ts +12 -0
  5. package/dist/components/elementSelector/ElementSelector.d.ts +1 -1
  6. package/dist/components/elementSelector/dropdown/Dropdown.d.ts +2 -5
  7. package/dist/components/elementSelector/dropdown/sections/objects/Objects.d.ts +1 -1
  8. package/dist/components/elementSelector/dropdown/sections/seatEditor/SeatEditor.d.ts +1 -1
  9. package/dist/components/elementSelector/dropdown/sections/seatingGroup/SeatingGroup.d.ts +1 -1
  10. package/dist/components/elementSelector/dropdown/sections/tables/Tables.d.ts +1 -1
  11. package/dist/components/elementWrapper/ElementWrapper.d.ts +1 -1
  12. package/dist/components/elements/object/Object.d.ts +2 -2
  13. package/dist/components/elements/seatingGroup/SeatingGroup.d.ts +2 -2
  14. package/dist/components/elements/standingArea/StandingArea.d.ts +2 -2
  15. package/dist/components/elements/table/Table.d.ts +2 -2
  16. package/dist/components/elements/table/round/Round.d.ts +2 -2
  17. package/dist/components/elements/table/square/Square.d.ts +2 -2
  18. package/dist/components/elements/text/Text.d.ts +2 -2
  19. package/dist/components/mouseSeatSelector/MouseSeatSelector.d.ts +4 -4
  20. package/dist/components/resizer/Resizer.d.ts +3 -1
  21. package/dist/components/seat/Seat.d.ts +7 -5
  22. package/dist/helpers/constants/commons.d.ts +2 -0
  23. package/dist/helpers/constants/defaults.d.ts +4 -0
  24. package/dist/helpers/constants/seatMap.d.ts +8 -1
  25. package/dist/helpers/types/seatMap.d.ts +14 -11
  26. package/dist/index.js +1 -1
  27. package/dist/store/reducers/elementSelector/reducer.d.ts +1 -1
  28. package/dist/store/reducers/elementSelector/selectors.d.ts +5 -3
  29. package/dist/store/reducers/elementSelector/types.d.ts +10 -10
  30. package/dist/store/reducers/main/reducer.d.ts +1 -1
  31. package/dist/store/reducers/main/selectors.d.ts +5 -3
  32. package/dist/store/reducers/main/types.d.ts +7 -7
  33. package/dist/store/reducers/rootReducer.d.ts +1 -1
  34. package/dist/store/reducers/seatMap/actionCreators.d.ts +5 -3
  35. package/dist/store/reducers/seatMap/actionTypes.d.ts +3 -1
  36. package/dist/store/reducers/seatMap/reducer.d.ts +1 -1
  37. package/dist/store/reducers/seatMap/selectors.d.ts +78 -3
  38. package/dist/store/reducers/seatMap/types.d.ts +25 -7
  39. package/dist/store/store.d.ts +11 -4
  40. package/package.json +5 -2
@@ -1,5 +1,9 @@
1
1
  import { FC } from 'react';
2
2
  import './../../assets/styles/global.css';
3
3
  import '@wix/design-system/styles.global.css';
4
- declare const App: FC;
4
+ import { T_Ticket } from 'platform-calendar-helpers';
5
+ type T_Props = {
6
+ tickets: T_Ticket[];
7
+ };
8
+ declare const App: FC<T_Props>;
5
9
  export { App };
@@ -1,3 +1,3 @@
1
- import { FC, PropsWithChildren } from "react";
1
+ import { FC, PropsWithChildren } from 'react';
2
2
  declare const Background: FC<PropsWithChildren>;
3
3
  export { Background };
@@ -1,12 +1,13 @@
1
- import { FC, MutableRefObject } from "react";
2
- import { T_Element } from "../../helpers/types/seatMap";
1
+ import { FC, MutableRefObject } from 'react';
2
+ import { T_Element } from '../../helpers/types/seatMap';
3
3
  type T_Props = {
4
4
  draggableContainer: MutableRefObject<HTMLElement | null>;
5
5
  elementTitle: string;
6
+ lastSavedPosition: MutableRefObject<T_Element['position'] | null>;
6
7
  absolute?: boolean;
7
8
  fontSize?: string | number;
8
9
  color?: string;
9
- onDragEnd?: (position: T_Element["position"]) => void;
10
+ onDragEnd?: (position: T_Element['position']) => void;
10
11
  };
11
12
  declare const DraggableElementTitle: FC<T_Props>;
12
13
  export { DraggableElementTitle };
@@ -0,0 +1,12 @@
1
+ import { FC } from 'react';
2
+ type T_Props = {
3
+ initialPosition: {
4
+ top: number;
5
+ left: number;
6
+ };
7
+ onDrag: (a: number) => void;
8
+ onDragEnd: (a: number) => void;
9
+ onDragStart: () => void;
10
+ };
11
+ declare const DraggablePoint: FC<T_Props>;
12
+ export { DraggablePoint };
@@ -1,3 +1,3 @@
1
- import { FC } from "react";
1
+ import { FC } from 'react';
2
2
  declare const ElementSelector: FC;
3
3
  export { ElementSelector };
@@ -1,7 +1,4 @@
1
- import { FC } from "react";
2
- import { SEAT_MAP_ELEMENTS } from "../../../helpers/constants/seatMap";
3
- type T_Props = {
4
- openedTab: "settings" | "seatEditor" | (typeof SEAT_MAP_ELEMENTS)[keyof typeof SEAT_MAP_ELEMENTS];
5
- };
1
+ import { FC } from 'react';
2
+ type T_Props = {};
6
3
  declare const Dropdown: FC<T_Props>;
7
4
  export { Dropdown };
@@ -1,3 +1,3 @@
1
- import { FC } from "react";
1
+ import { FC } from 'react';
2
2
  declare const Objects: FC;
3
3
  export { Objects };
@@ -1,3 +1,3 @@
1
- import { FC } from "react";
1
+ import { FC } from 'react';
2
2
  declare const SeatEditor: FC;
3
3
  export { SeatEditor };
@@ -1,3 +1,3 @@
1
- import { FC } from "react";
1
+ import { FC } from 'react';
2
2
  declare const SeatingGroup: FC;
3
3
  export { SeatingGroup };
@@ -1,3 +1,3 @@
1
- import { FC } from "react";
1
+ import { FC } from 'react';
2
2
  declare const Tables: FC;
3
3
  export { Tables };
@@ -1,4 +1,4 @@
1
- import { FC, MutableRefObject, PropsWithChildren } from "react";
1
+ import { FC, MutableRefObject, PropsWithChildren } from 'react';
2
2
  type T_Props = {
3
3
  rotateContainer: MutableRefObject<HTMLElement | null>;
4
4
  disablePadding?: boolean;
@@ -1,5 +1,5 @@
1
- import { FC } from "react";
2
- import { T_Element_Object } from "../../../helpers/types/seatMap";
1
+ import { FC } from 'react';
2
+ import { T_Element_Object } from '../../../helpers/types/seatMap';
3
3
  type T_Props = {
4
4
  object: T_Element_Object;
5
5
  };
@@ -1,5 +1,5 @@
1
- import { FC } from "react";
2
- import { T_Element_SeatingGroup } from "../../../helpers/types/seatMap";
1
+ import { FC } from 'react';
2
+ import { T_Element_SeatingGroup } from '../../../helpers/types/seatMap';
3
3
  type T_Props = {
4
4
  seatingGroup: T_Element_SeatingGroup;
5
5
  };
@@ -1,5 +1,5 @@
1
- import { FC } from "react";
2
- import { T_Element_StandingArea } from "../../../helpers/types/seatMap";
1
+ import { FC } from 'react';
2
+ import { T_Element_StandingArea } from '../../../helpers/types/seatMap';
3
3
  type T_Props = {
4
4
  standingArea: T_Element_StandingArea;
5
5
  };
@@ -1,5 +1,5 @@
1
- import { FC } from "react";
2
- import { T_Element_Table } from "../../../helpers/types/seatMap";
1
+ import { FC } from 'react';
2
+ import { T_Element_Table } from '../../../helpers/types/seatMap';
3
3
  type T_Props = {
4
4
  table: T_Element_Table;
5
5
  };
@@ -1,5 +1,5 @@
1
- import { FC } from "react";
2
- import { T_Element_Table } from "../../../../helpers/types/seatMap";
1
+ import { FC } from 'react';
2
+ import { T_Element_Table } from '../../../../helpers/types/seatMap';
3
3
  type T_Props = {
4
4
  table: T_Element_Table;
5
5
  };
@@ -1,5 +1,5 @@
1
- import { FC } from "react";
2
- import { T_Element_Table } from "../../../../helpers/types/seatMap";
1
+ import { FC } from 'react';
2
+ import { T_Element_Table } from '../../../../helpers/types/seatMap';
3
3
  type T_Props = {
4
4
  table: T_Element_Table;
5
5
  };
@@ -1,5 +1,5 @@
1
- import { FC } from "react";
2
- import { T_Element_Text } from "../../../helpers/types/seatMap";
1
+ import { FC } from 'react';
2
+ import { T_Element_Text } from '../../../helpers/types/seatMap';
3
3
  type T_Props = {
4
4
  text: T_Element_Text;
5
5
  };
@@ -1,10 +1,10 @@
1
- import { FC, RefObject } from "react";
2
- import { SEAT_MAP_ELEMENTS } from "../../helpers/constants/seatMap";
3
- import { T_Element } from "../../helpers/types/seatMap";
1
+ import { FC, RefObject } from 'react';
2
+ import { SEAT_MAP_ELEMENTS } from '../../helpers/constants/seatMap';
3
+ import { T_Element } from '../../helpers/types/seatMap';
4
4
  type T_Props = {
5
5
  container: RefObject<HTMLDivElement>;
6
6
  elementType: typeof SEAT_MAP_ELEMENTS.tables | typeof SEAT_MAP_ELEMENTS.seatingGroup;
7
- elementId: T_Element["id"];
7
+ elementId: T_Element['id'];
8
8
  };
9
9
  declare const MouseSeatSelector: FC<T_Props>;
10
10
  export { MouseSeatSelector };
@@ -1,7 +1,9 @@
1
- import { FC, RefObject } from "react";
1
+ import { FC, RefObject, MutableRefObject } from 'react';
2
+ import { T_Element } from '../../helpers/types/seatMap';
2
3
  type T_Props = {
3
4
  resizeContainer: RefObject<HTMLElement>;
4
5
  positionAdjustContainer: RefObject<HTMLElement>;
6
+ lastSavedPosition: MutableRefObject<T_Element['position'] | null>;
5
7
  };
6
8
  declare const Resizer: FC<T_Props>;
7
9
  export { Resizer };
@@ -1,12 +1,14 @@
1
- import { FC } from "react";
2
- import { T_Seat } from "../../helpers/types/seatMap";
1
+ import { FC } from 'react';
2
+ import { T_Element, T_ElementTypeContainingSeats, T_Seat } from '../../helpers/types/seatMap';
3
3
  type T_Props = {
4
4
  seat: T_Seat;
5
+ elementId: T_Element['id'];
6
+ elementType: T_ElementTypeContainingSeats;
7
+ iconType?: 0 | 1 | 2;
5
8
  absolutePosition?: {
6
- top: number;
7
- left: number;
9
+ top?: number;
10
+ left?: number;
8
11
  };
9
- className?: string;
10
12
  };
11
13
  declare const Seat: FC<T_Props>;
12
14
  export { Seat };
@@ -0,0 +1,2 @@
1
+ declare const ALPHABET: string[];
2
+ export { ALPHABET };
@@ -0,0 +1,4 @@
1
+ import { T_Element_Object, T_Element_SeatingGroup } from '../types/seatMap';
2
+ declare const D_ELEMENT_OBJECT: T_Element_Object;
3
+ declare const D_ELEMENT_SEATING_GROUP: T_Element_SeatingGroup;
4
+ export { D_ELEMENT_OBJECT, D_ELEMENT_SEATING_GROUP };
@@ -8,4 +8,11 @@ declare const SEAT_MAP_ELEMENTS: {
8
8
  declare const ELEMENT_DRAG_STEPS_BY_SCALE: {
9
9
  [key: number]: number;
10
10
  };
11
- export { SEAT_MAP_ELEMENTS, ELEMENT_DRAG_STEPS_BY_SCALE };
11
+ declare const D_SEAT: {
12
+ id: string;
13
+ label: string;
14
+ ticketId: number;
15
+ locked: boolean;
16
+ hide: boolean;
17
+ };
18
+ export { SEAT_MAP_ELEMENTS, ELEMENT_DRAG_STEPS_BY_SCALE, D_SEAT };
@@ -1,6 +1,6 @@
1
- import { SEAT_MAP_ELEMENTS } from "../constants/seatMap";
1
+ import { SEAT_MAP_ELEMENTS } from '../constants/seatMap';
2
2
  type T_SeatMap = {
3
- id: number;
3
+ id: string;
4
4
  elements: {
5
5
  [SEAT_MAP_ELEMENTS.seatingGroup]: T_Element_SeatingGroup[];
6
6
  [SEAT_MAP_ELEMENTS.standingArea]: T_Element_StandingArea[];
@@ -10,17 +10,19 @@ type T_SeatMap = {
10
10
  };
11
11
  };
12
12
  type T_Seat = {
13
- id: number;
13
+ id: string;
14
14
  label: string;
15
15
  ticketId: number;
16
- position?: "top" | "right" | "bottom" | "left";
16
+ locked: boolean;
17
+ hide: boolean;
18
+ position?: 'top' | 'right' | 'bottom' | 'left';
17
19
  };
18
20
  type T_Element_SeatingGroup = {
19
- id: number;
21
+ id: string;
20
22
  title: string;
21
23
  rows: number;
22
24
  cols: number;
23
- iconType: 0 | 1 | 2 | 3;
25
+ iconType: 0 | 1 | 2;
24
26
  seats: T_Seat[][];
25
27
  position: {
26
28
  top: number;
@@ -28,7 +30,7 @@ type T_Element_SeatingGroup = {
28
30
  };
29
31
  };
30
32
  type T_Element_StandingArea = {
31
- id: number;
33
+ id: string;
32
34
  title: string;
33
35
  height: number;
34
36
  width: number;
@@ -39,7 +41,7 @@ type T_Element_StandingArea = {
39
41
  };
40
42
  };
41
43
  type T_Element_Table = {
42
- id: number;
44
+ id: string;
43
45
  title: string;
44
46
  seatCount: number;
45
47
  endSeats: number;
@@ -52,7 +54,7 @@ type T_Element_Table = {
52
54
  };
53
55
  };
54
56
  type T_Element_Object = {
55
- id: number;
57
+ id: string;
56
58
  title: string;
57
59
  height: number;
58
60
  width: number;
@@ -65,7 +67,7 @@ type T_Element_Object = {
65
67
  };
66
68
  };
67
69
  type T_Element_Text = {
68
- id: number;
70
+ id: string;
69
71
  title: string;
70
72
  fontSize: number;
71
73
  color: string;
@@ -76,4 +78,5 @@ type T_Element_Text = {
76
78
  };
77
79
  type T_Element = T_Element_SeatingGroup | T_Element_StandingArea | T_Element_Table | T_Element_Object | T_Element_Text;
78
80
  type T_ElementType = (typeof SEAT_MAP_ELEMENTS)[keyof typeof SEAT_MAP_ELEMENTS];
79
- export type { T_SeatMap, T_Element_SeatingGroup, T_Element_StandingArea, T_Element_Table, T_Seat, T_Element_Object, T_Element_Text, T_Element, T_ElementType, };
81
+ type T_ElementTypeContainingSeats = typeof SEAT_MAP_ELEMENTS.seatingGroup | typeof SEAT_MAP_ELEMENTS.tables;
82
+ export type { T_SeatMap, T_Element_SeatingGroup, T_Element_StandingArea, T_Element_Table, T_Seat, T_Element_Object, T_Element_Text, T_Element, T_ElementType, T_ElementTypeContainingSeats };