platform-calendar-seatmap 1.0.4 → 1.0.5

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 (47) hide show
  1. package/dist/components/app/App.d.ts +3 -2
  2. package/dist/components/deleteModal/DeleteModal.d.ts +1 -1
  3. package/dist/components/draggableElementTitle/DraggableElementTitle.d.ts +2 -2
  4. package/dist/components/elementWrapper/ElementWrapper.d.ts +1 -1
  5. package/dist/components/elements/object/Object.d.ts +1 -1
  6. package/dist/components/elements/seatingGroup/SeatingGroup.d.ts +1 -1
  7. package/dist/components/elements/standingArea/StandingArea.d.ts +1 -1
  8. package/dist/components/elements/table/Table.d.ts +1 -1
  9. package/dist/components/elements/table/round/Round.d.ts +1 -1
  10. package/dist/components/elements/table/square/Square.d.ts +1 -1
  11. package/dist/components/elements/text/Text.d.ts +1 -1
  12. package/dist/components/mouseSeatSelector/MouseSeatSelector.d.ts +4 -5
  13. package/dist/components/resizer/Resizer.d.ts +8 -3
  14. package/dist/components/saveButton/SaveButton.d.ts +3 -0
  15. package/dist/components/seat/Seat.d.ts +1 -1
  16. package/dist/helpers/constants/commons.d.ts +6 -1
  17. package/dist/helpers/constants/seatMap.d.ts +1 -8
  18. package/dist/helpers/functions/commons.d.ts +1 -1
  19. package/dist/helpers/functions/seatingGroup.d.ts +2 -2
  20. package/dist/helpers/types/commons.d.ts +3 -1
  21. package/dist/hooks/useElementWrapperActionHandlers.d.ts +7 -1
  22. package/dist/index.js +1 -1
  23. package/dist/lib/numberInputWithSlider/NumberInputWithSlider.d.ts +3 -2
  24. package/dist/store/reducers/actionHandlers/actionCreators.d.ts +3 -0
  25. package/dist/store/reducers/actionHandlers/actionTypes.d.ts +2 -0
  26. package/dist/store/reducers/actionHandlers/reducer.d.ts +3 -0
  27. package/dist/store/reducers/actionHandlers/selectors.d.ts +3 -0
  28. package/dist/store/reducers/actionHandlers/types.d.ts +13 -0
  29. package/dist/store/reducers/elementSelector/actionCreators.d.ts +2 -9
  30. package/dist/store/reducers/elementSelector/actionTypes.d.ts +1 -6
  31. package/dist/store/reducers/elementSelector/selectors.d.ts +4 -3
  32. package/dist/store/reducers/elementSelector/types.d.ts +4 -43
  33. package/dist/store/reducers/main/actionCreators.d.ts +5 -2
  34. package/dist/store/reducers/main/actionTypes.d.ts +3 -1
  35. package/dist/store/reducers/main/selectors.d.ts +3 -2
  36. package/dist/store/reducers/main/types.d.ts +18 -6
  37. package/dist/store/reducers/rootReducer.d.ts +5 -3
  38. package/dist/store/reducers/seatMap/actionCreators.d.ts +4 -4
  39. package/dist/store/reducers/seatMap/actionTypes.d.ts +2 -2
  40. package/dist/store/reducers/seatMap/reducer.d.ts +1 -1
  41. package/dist/store/reducers/seatMap/selectors.d.ts +128 -26
  42. package/dist/store/reducers/seatMap/types.d.ts +9 -8
  43. package/dist/store/store.d.ts +6 -2
  44. package/package.json +2 -2
  45. package/tsconfig.json +30 -21
  46. package/dist/helpers/constants/defaults.d.ts +0 -7
  47. package/dist/helpers/types/seatMap.d.ts +0 -98
@@ -1,9 +1,10 @@
1
1
  import { FC } from 'react';
2
- import './../../assets/styles/global.css';
3
2
  import '@wix/design-system/styles.global.css';
4
- import { T_Ticket } from 'platform-calendar-helpers';
3
+ import { T_SeatMap, T_Ticket } from 'platform-calendar-helpers';
4
+ import 'assets/styles/global.css';
5
5
  type T_Props = {
6
6
  tickets: T_Ticket[];
7
+ seatMap: T_SeatMap | null;
7
8
  };
8
9
  declare const App: FC<T_Props>;
9
10
  export { App };
@@ -1,4 +1,4 @@
1
- import { FC } from "react";
1
+ import { FC } from 'react';
2
2
  type T_Props = {};
3
3
  declare const DeleteModal: FC<T_Props>;
4
4
  export { DeleteModal };
@@ -1,9 +1,9 @@
1
+ import { T_Element } from 'platform-calendar-helpers';
1
2
  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
+ elementPosition: T_Element['position'];
7
7
  absolute?: boolean;
8
8
  fontSize?: string | number;
9
9
  color?: string;
@@ -1,5 +1,5 @@
1
1
  import { FC, MutableRefObject, PropsWithChildren } from 'react';
2
- import { T_Element } from '../../helpers/types/seatMap';
2
+ import { T_Element } from 'platform-calendar-helpers';
3
3
  type T_Props = {
4
4
  rotateContainer: MutableRefObject<HTMLElement | null>;
5
5
  elementId: T_Element['id'];
@@ -1,5 +1,5 @@
1
+ import { T_Element_Object } from 'platform-calendar-helpers';
1
2
  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
1
  import { FC } from 'react';
2
- import { T_Element_SeatingGroup } from '../../../helpers/types/seatMap';
2
+ import { T_Element_SeatingGroup } from 'platform-calendar-helpers';
3
3
  type T_Props = {
4
4
  seatingGroup: T_Element_SeatingGroup;
5
5
  };
@@ -1,5 +1,5 @@
1
+ import { T_Element_StandingArea } from 'platform-calendar-helpers';
1
2
  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
1
  import { FC } from 'react';
2
- import { T_Element_Table } from '../../../helpers/types/seatMap';
2
+ import { T_Element_Table } from 'platform-calendar-helpers';
3
3
  type T_Props = {
4
4
  table: T_Element_Table;
5
5
  };
@@ -1,5 +1,5 @@
1
+ import { T_Element_Table } from 'platform-calendar-helpers';
1
2
  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 { T_Element_Table } from 'platform-calendar-helpers';
1
2
  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 { T_Element_Text } from 'platform-calendar-helpers';
1
2
  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,9 @@
1
+ import { SEAT_MAP_ELEMENTS, T_Element } from 'platform-calendar-helpers';
1
2
  import { FC, RefObject } from 'react';
2
- import { SEAT_MAP_ELEMENTS } from '../../helpers/constants/seatMap';
3
- import { T_Element } from '../../helpers/types/seatMap';
4
3
  type T_Props = {
5
- container: RefObject<HTMLDivElement>;
6
- elementType: typeof SEAT_MAP_ELEMENTS.tables | typeof SEAT_MAP_ELEMENTS.seatingGroup;
7
- elementId: T_Element['id'];
4
+ container?: RefObject<HTMLDivElement>;
5
+ elementType?: typeof SEAT_MAP_ELEMENTS.tables | typeof SEAT_MAP_ELEMENTS.seatingGroup;
6
+ elementId?: T_Element['id'];
8
7
  };
9
8
  declare const MouseSeatSelector: FC<T_Props>;
10
9
  export { MouseSeatSelector };
@@ -1,9 +1,14 @@
1
- import { FC, RefObject, MutableRefObject } from 'react';
2
- import { T_Element } from '../../helpers/types/seatMap';
1
+ import { FC, RefObject } from 'react';
2
+ type T_UpdatedSizes = {
3
+ top: number;
4
+ left: number;
5
+ height: number;
6
+ width: number;
7
+ };
3
8
  type T_Props = {
4
9
  resizeContainer: RefObject<HTMLElement>;
5
10
  positionAdjustContainer: RefObject<HTMLElement>;
6
- lastSavedPosition: MutableRefObject<T_Element['position'] | null>;
11
+ onResizeEnd: (updatedSizes: T_UpdatedSizes) => void;
7
12
  };
8
13
  declare const Resizer: FC<T_Props>;
9
14
  export { Resizer };
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ declare const SaveButton: FC;
3
+ export { SaveButton };
@@ -1,5 +1,5 @@
1
+ import { T_Element, T_ElementTypeContainingSeats, T_Seat } from 'platform-calendar-helpers';
1
2
  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
5
  elementId: T_Element['id'];
@@ -1,4 +1,9 @@
1
1
  declare const ALPHABET: string[];
2
2
  declare const CURVE_UPDATED_EVENT_NAME = "CUSTOM_EVENTS/CURVE_UPDATED_EVENT";
3
3
  declare const STRETCH_UPDATED_EVENT_NAME = "CUSTOM_EVENTS/STRETCH_UPDATED_EVENT_NAME";
4
- export { ALPHABET, CURVE_UPDATED_EVENT_NAME, STRETCH_UPDATED_EVENT_NAME };
4
+ declare const MODES: {
5
+ readonly edit: "edit";
6
+ readonly view: "view";
7
+ readonly tickets: "tickets";
8
+ };
9
+ export { ALPHABET, CURVE_UPDATED_EVENT_NAME, STRETCH_UPDATED_EVENT_NAME, MODES };
@@ -1,10 +1,3 @@
1
- declare const SEAT_MAP_ELEMENTS: {
2
- readonly seatingGroup: "seatingGroup";
3
- readonly standingArea: "standingArea";
4
- readonly tables: "tables";
5
- readonly objects: "objects";
6
- readonly text: "text";
7
- };
8
1
  declare const ELEMENT_DRAG_STEPS_BY_SCALE: {
9
2
  [key: number]: number;
10
3
  };
@@ -15,4 +8,4 @@ declare const D_SEAT: {
15
8
  locked: boolean;
16
9
  hide: boolean;
17
10
  };
18
- export { SEAT_MAP_ELEMENTS, ELEMENT_DRAG_STEPS_BY_SCALE, D_SEAT };
11
+ export { ELEMENT_DRAG_STEPS_BY_SCALE, D_SEAT };
@@ -1,4 +1,4 @@
1
- import { T_Element_Object, T_Element_StandingArea } from '../types/seatMap';
1
+ import { T_Element_Object, T_Element_StandingArea } from 'platform-calendar-helpers';
2
2
  declare const getElementStyles: (element: HTMLElement) => {
3
3
  top: number;
4
4
  left: number;
@@ -1,4 +1,4 @@
1
- import { T_Element } from '../types/seatMap';
2
- declare const updateCurve: (elementId: T_Element["id"], curveValue: number) => void;
1
+ import { T_Element } from 'platform-calendar-helpers';
2
+ declare const updateCurve: (elementId: T_Element["id"], curveValue: number, saved?: boolean) => void;
3
3
  declare const updateStretch: (elementId: T_Element["id"], stretchValue: number) => void;
4
4
  export { updateCurve, updateStretch };
@@ -1,4 +1,6 @@
1
+ import { MODES } from 'helpers/constants/commons';
1
2
  type RecursivePartial<T> = {
2
3
  [P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial<U>[] : T[P] extends object ? RecursivePartial<T[P]> : T[P];
3
4
  };
4
- export { type RecursivePartial };
5
+ type T_Mode = (typeof MODES)[keyof typeof MODES];
6
+ export { type RecursivePartial, type T_Mode };
@@ -1,4 +1,4 @@
1
- import { T_Element, T_ElementType } from '../helpers/types/seatMap';
1
+ import { T_Element, T_ElementType } from 'platform-calendar-helpers';
2
2
  type T_Props = {
3
3
  element: T_Element;
4
4
  elementType: T_ElementType;
@@ -7,5 +7,11 @@ declare const useElementWrapperActionHandlers: ({ element, elementType }: T_Prop
7
7
  deleteElement: () => void;
8
8
  editElement: () => void;
9
9
  duplicateElement: () => void;
10
+ resize: (updatedSizes: {
11
+ top: number;
12
+ left: number;
13
+ height: number;
14
+ width: number;
15
+ }) => void;
10
16
  };
11
17
  export { useElementWrapperActionHandlers };