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.
- package/dist/components/app/App.d.ts +5 -1
- package/dist/components/background/Background.d.ts +1 -1
- package/dist/components/draggableElementTitle/DraggableElementTitle.d.ts +4 -3
- package/dist/components/draggablePoint/DraggablePoint.d.ts +12 -0
- package/dist/components/elementSelector/ElementSelector.d.ts +1 -1
- package/dist/components/elementSelector/dropdown/Dropdown.d.ts +2 -5
- package/dist/components/elementSelector/dropdown/sections/objects/Objects.d.ts +1 -1
- package/dist/components/elementSelector/dropdown/sections/seatEditor/SeatEditor.d.ts +1 -1
- package/dist/components/elementSelector/dropdown/sections/seatingGroup/SeatingGroup.d.ts +1 -1
- package/dist/components/elementSelector/dropdown/sections/tables/Tables.d.ts +1 -1
- package/dist/components/elementWrapper/ElementWrapper.d.ts +1 -1
- package/dist/components/elements/object/Object.d.ts +2 -2
- package/dist/components/elements/seatingGroup/SeatingGroup.d.ts +2 -2
- package/dist/components/elements/standingArea/StandingArea.d.ts +2 -2
- package/dist/components/elements/table/Table.d.ts +2 -2
- package/dist/components/elements/table/round/Round.d.ts +2 -2
- package/dist/components/elements/table/square/Square.d.ts +2 -2
- package/dist/components/elements/text/Text.d.ts +2 -2
- package/dist/components/mouseSeatSelector/MouseSeatSelector.d.ts +4 -4
- package/dist/components/resizer/Resizer.d.ts +3 -1
- package/dist/components/seat/Seat.d.ts +7 -5
- package/dist/helpers/constants/commons.d.ts +2 -0
- package/dist/helpers/constants/defaults.d.ts +4 -0
- package/dist/helpers/constants/seatMap.d.ts +8 -1
- package/dist/helpers/types/seatMap.d.ts +14 -11
- package/dist/index.js +1 -1
- package/dist/store/reducers/elementSelector/reducer.d.ts +1 -1
- package/dist/store/reducers/elementSelector/selectors.d.ts +5 -3
- package/dist/store/reducers/elementSelector/types.d.ts +10 -10
- package/dist/store/reducers/main/reducer.d.ts +1 -1
- package/dist/store/reducers/main/selectors.d.ts +5 -3
- package/dist/store/reducers/main/types.d.ts +7 -7
- package/dist/store/reducers/rootReducer.d.ts +1 -1
- package/dist/store/reducers/seatMap/actionCreators.d.ts +5 -3
- package/dist/store/reducers/seatMap/actionTypes.d.ts +3 -1
- package/dist/store/reducers/seatMap/reducer.d.ts +1 -1
- package/dist/store/reducers/seatMap/selectors.d.ts +78 -3
- package/dist/store/reducers/seatMap/types.d.ts +25 -7
- package/dist/store/store.d.ts +11 -4
- 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
|
-
|
|
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,12 +1,13 @@
|
|
|
1
|
-
import { FC, MutableRefObject } from
|
|
2
|
-
import { T_Element } from
|
|
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[
|
|
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,7 +1,4 @@
|
|
|
1
|
-
import { FC } from
|
|
2
|
-
|
|
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,5 +1,5 @@
|
|
|
1
|
-
import { FC } from
|
|
2
|
-
import { T_Element_SeatingGroup } from
|
|
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
|
|
2
|
-
import { T_Element_StandingArea } from
|
|
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,10 +1,10 @@
|
|
|
1
|
-
import { FC, RefObject } from
|
|
2
|
-
import { SEAT_MAP_ELEMENTS } from
|
|
3
|
-
import { T_Element } from
|
|
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[
|
|
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
|
|
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
|
|
2
|
-
import { T_Seat } from
|
|
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
|
|
7
|
-
left
|
|
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 };
|
|
@@ -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
|
-
|
|
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
|
|
1
|
+
import { SEAT_MAP_ELEMENTS } from '../constants/seatMap';
|
|
2
2
|
type T_SeatMap = {
|
|
3
|
-
id:
|
|
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:
|
|
13
|
+
id: string;
|
|
14
14
|
label: string;
|
|
15
15
|
ticketId: number;
|
|
16
|
-
|
|
16
|
+
locked: boolean;
|
|
17
|
+
hide: boolean;
|
|
18
|
+
position?: 'top' | 'right' | 'bottom' | 'left';
|
|
17
19
|
};
|
|
18
20
|
type T_Element_SeatingGroup = {
|
|
19
|
-
id:
|
|
21
|
+
id: string;
|
|
20
22
|
title: string;
|
|
21
23
|
rows: number;
|
|
22
24
|
cols: number;
|
|
23
|
-
iconType: 0 | 1 | 2
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
-
|
|
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 };
|