platform-calendar-seatmap 2.0.0 → 2.0.2

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 (113) hide show
  1. package/dist/9ff54b1cefde15da74a9.svg +198 -0
  2. package/dist/components/actionsHandler/ActionsHandler.d.ts +11 -0
  3. package/dist/components/alignmentGuides/AlignmentGuides.d.ts +6 -0
  4. package/dist/components/app/App.d.ts +18 -0
  5. package/dist/components/background/Background.d.ts +7 -0
  6. package/dist/components/deleteModal/DeleteModal.d.ts +4 -0
  7. package/dist/components/draggable/Draggable.d.ts +14 -0
  8. package/dist/components/elementSelector/ElementSelector.d.ts +10 -0
  9. package/dist/components/elementSelector/dropdown/Dropdown.d.ts +7 -0
  10. package/dist/components/elementSelector/dropdown/sections/aisles/Aisles.d.ts +7 -0
  11. package/dist/components/elementSelector/dropdown/sections/info/Info.d.ts +3 -0
  12. package/dist/components/elementSelector/dropdown/sections/objects/Objects.d.ts +7 -0
  13. package/dist/components/elementSelector/dropdown/sections/seatEditor/SeatEditor.d.ts +3 -0
  14. package/dist/components/elementSelector/dropdown/sections/seatingGroup/SeatingGroup.d.ts +7 -0
  15. package/dist/components/elementSelector/dropdown/sections/settings/Settings.d.ts +3 -0
  16. package/dist/components/elementSelector/dropdown/sections/standingArea/StandingArea.d.ts +7 -0
  17. package/dist/components/elementSelector/dropdown/sections/stats/Statistics.d.ts +3 -0
  18. package/dist/components/elementSelector/dropdown/sections/tables/Tables.d.ts +7 -0
  19. package/dist/components/elementSelector/dropdown/sections/text/Text.d.ts +7 -0
  20. package/dist/components/elementTitle/ElementTitle.d.ts +15 -0
  21. package/dist/components/elementWrapper/ElementWrapper.d.ts +19 -0
  22. package/dist/components/elements/aisle/Aisle.d.ts +12 -0
  23. package/dist/components/elements/object/Object.d.ts +7 -0
  24. package/dist/components/elements/seatingGroup/SeatingGroup.d.ts +7 -0
  25. package/dist/components/elements/stage/Stage.d.ts +28 -0
  26. package/dist/components/elements/standingArea/StandingArea.d.ts +7 -0
  27. package/dist/components/elements/table/Table.d.ts +7 -0
  28. package/dist/components/elements/table/round/Round.d.ts +20 -0
  29. package/dist/components/elements/table/square/Square.d.ts +20 -0
  30. package/dist/components/elements/text/Text.d.ts +7 -0
  31. package/dist/components/mouseSeatSelector/MouseSeatSelector.d.ts +6 -0
  32. package/dist/components/numberingSettings/NumberingSettings.d.ts +12 -0
  33. package/dist/components/onboarding/Onboarding.d.ts +31 -0
  34. package/dist/components/previewMode/PreviewMode.d.ts +24 -0
  35. package/dist/components/resizer/Resizer.d.ts +18 -0
  36. package/dist/components/rotate/Rotate.d.ts +9 -0
  37. package/dist/components/scene3d/InteractionController3D.d.ts +18 -0
  38. package/dist/components/scene3d/Scene3D.d.ts +13 -0
  39. package/dist/components/scene3d/builders/Object3D.d.ts +3 -0
  40. package/dist/components/scene3d/builders/SeatingGroup3D.d.ts +3 -0
  41. package/dist/components/scene3d/builders/StandingArea3D.d.ts +3 -0
  42. package/dist/components/scene3d/builders/Table3D.d.ts +3 -0
  43. package/dist/components/scene3d/builders/Text3D.d.ts +3 -0
  44. package/dist/components/scene3d/builders/materials.d.ts +11 -0
  45. package/dist/components/scene3d/builders/types.d.ts +36 -0
  46. package/dist/components/sceneContainer/SceneContainer.d.ts +10 -0
  47. package/dist/components/seat/Seat.d.ts +39 -0
  48. package/dist/components/seat/seatIcons/index.d.ts +46 -0
  49. package/dist/components/seatTooltip/SeatTooltip.d.ts +30 -0
  50. package/dist/helpers/constants/commons.d.ts +10 -0
  51. package/dist/helpers/constants/numberingStyles.d.ts +55 -0
  52. package/dist/helpers/constants/seatColors.d.ts +35 -0
  53. package/dist/helpers/constants/seatMap.d.ts +12 -0
  54. package/dist/helpers/constants/standingAreaStyles.d.ts +51 -0
  55. package/dist/helpers/functions/commons.d.ts +9 -0
  56. package/dist/helpers/functions/export.d.ts +30 -0
  57. package/dist/helpers/functions/rowLabels.d.ts +7 -0
  58. package/dist/helpers/functions/seat.d.ts +16 -0
  59. package/dist/helpers/functions/seatMap.d.ts +38 -0
  60. package/dist/helpers/functions/seatSelectionUtils.d.ts +33 -0
  61. package/dist/helpers/functions/seatStatus.d.ts +20 -0
  62. package/dist/helpers/functions/seatingGroup.d.ts +4 -0
  63. package/dist/helpers/functions/statistics.d.ts +116 -0
  64. package/dist/helpers/functions/zoomToFit.d.ts +20 -0
  65. package/dist/helpers/types/aisle.d.ts +25 -0
  66. package/dist/helpers/types/commons.d.ts +10 -0
  67. package/dist/hooks/useCopyPaste.d.ts +1 -0
  68. package/dist/hooks/useElementWrapperActionHandlers.d.ts +21 -0
  69. package/dist/hooks/useIsViewOnly.d.ts +2 -0
  70. package/dist/hooks/useKeyboardSeatNavigation.d.ts +22 -0
  71. package/dist/hooks/useKeyboardShortcuts.d.ts +1 -0
  72. package/dist/hooks/useScaleTracker.d.ts +2 -0
  73. package/dist/hooks/useSmoothZoom.d.ts +18 -0
  74. package/dist/hooks/useUndoRedo.d.ts +4 -0
  75. package/dist/index.d.ts +2 -0
  76. package/dist/index.html +1 -0
  77. package/dist/index.js +2 -0
  78. package/dist/index.js.LICENSE.txt +66 -0
  79. package/dist/lib/numberInputWithSlider/NumberInputWithSlider.d.ts +11 -0
  80. package/dist/store/middleware/historyMiddleware.d.ts +3 -0
  81. package/dist/store/reducers/actionHandlers/actionCreators.d.ts +3 -0
  82. package/dist/store/reducers/actionHandlers/actionTypes.d.ts +2 -0
  83. package/dist/store/reducers/actionHandlers/reducer.d.ts +3 -0
  84. package/dist/store/reducers/actionHandlers/selectors.d.ts +8 -0
  85. package/dist/store/reducers/actionHandlers/types.d.ts +20 -0
  86. package/dist/store/reducers/clipboard/actionCreators.d.ts +6 -0
  87. package/dist/store/reducers/clipboard/actionTypes.d.ts +3 -0
  88. package/dist/store/reducers/clipboard/reducer.d.ts +3 -0
  89. package/dist/store/reducers/clipboard/selectors.d.ts +6 -0
  90. package/dist/store/reducers/clipboard/types.d.ts +19 -0
  91. package/dist/store/reducers/elementSelector/actionCreators.d.ts +7 -0
  92. package/dist/store/reducers/elementSelector/actionTypes.d.ts +5 -0
  93. package/dist/store/reducers/elementSelector/reducer.d.ts +3 -0
  94. package/dist/store/reducers/elementSelector/selectors.d.ts +8 -0
  95. package/dist/store/reducers/elementSelector/types.d.ts +45 -0
  96. package/dist/store/reducers/history/actionCreators.d.ts +10 -0
  97. package/dist/store/reducers/history/actionTypes.d.ts +4 -0
  98. package/dist/store/reducers/history/reducer.d.ts +21 -0
  99. package/dist/store/reducers/history/selectors.d.ts +5 -0
  100. package/dist/store/reducers/history/types.d.ts +18 -0
  101. package/dist/store/reducers/main/actionCreators.d.ts +15 -0
  102. package/dist/store/reducers/main/actionTypes.d.ts +12 -0
  103. package/dist/store/reducers/main/reducer.d.ts +3 -0
  104. package/dist/store/reducers/main/selectors.d.ts +65 -0
  105. package/dist/store/reducers/main/types.d.ts +89 -0
  106. package/dist/store/reducers/rootReducer.d.ts +28 -0
  107. package/dist/store/reducers/seatMap/actionCreators.d.ts +11 -0
  108. package/dist/store/reducers/seatMap/actionTypes.d.ts +9 -0
  109. package/dist/store/reducers/seatMap/reducer.d.ts +3 -0
  110. package/dist/store/reducers/seatMap/selectors.d.ts +474 -0
  111. package/dist/store/reducers/seatMap/types.d.ts +70 -0
  112. package/dist/store/store.d.ts +19 -0
  113. package/package.json +1 -1
@@ -0,0 +1,66 @@
1
+ /*!
2
+ Copyright (c) 2018 Jed Watson.
3
+ Licensed under the MIT License (MIT), see
4
+ http://jedwatson.github.io/classnames
5
+ */
6
+
7
+ /*!
8
+ Copyright (c) 2015 Jed Watson.
9
+ Based on code that is Copyright 2013-2015, Facebook, Inc.
10
+ All rights reserved.
11
+ */
12
+
13
+ /*!
14
+ * Adapted from jQuery UI core
15
+ *
16
+ * http://jqueryui.com
17
+ *
18
+ * Copyright 2014 jQuery Foundation and other contributors
19
+ * Released under the MIT license.
20
+ * http://jquery.org/license
21
+ *
22
+ * http://api.jqueryui.com/category/ui-core/
23
+ */
24
+
25
+ /*!
26
+ * tabbable 6.4.0
27
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
28
+ */
29
+
30
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
31
+
32
+ /**
33
+ * @license
34
+ * Copyright 2010-2023 Three.js Authors
35
+ * SPDX-License-Identifier: MIT
36
+ */
37
+
38
+ /**
39
+ * @license React
40
+ * react-is.production.min.js
41
+ *
42
+ * Copyright (c) Facebook, Inc. and its affiliates.
43
+ *
44
+ * This source code is licensed under the MIT license found in the
45
+ * LICENSE file in the root directory of this source tree.
46
+ */
47
+
48
+ /**
49
+ * @license React
50
+ * react-jsx-runtime.production.min.js
51
+ *
52
+ * Copyright (c) Facebook, Inc. and its affiliates.
53
+ *
54
+ * This source code is licensed under the MIT license found in the
55
+ * LICENSE file in the root directory of this source tree.
56
+ */
57
+
58
+ /**
59
+ * @license React
60
+ * use-sync-external-store-with-selector.production.js
61
+ *
62
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
63
+ *
64
+ * This source code is licensed under the MIT license found in the
65
+ * LICENSE file in the root directory of this source tree.
66
+ */
@@ -0,0 +1,11 @@
1
+ import { FC } from 'react';
2
+ type T_Props = {
3
+ initialValue: number;
4
+ min: number;
5
+ max: number;
6
+ onChange?: (value: number) => void;
7
+ onAfterChange?: (value: number) => void;
8
+ disabled?: boolean;
9
+ };
10
+ declare const NumberInputWithSlider: FC<T_Props>;
11
+ export { NumberInputWithSlider };
@@ -0,0 +1,3 @@
1
+ import { Middleware } from 'redux';
2
+ import { T_RootState } from '../store';
3
+ export declare const historyMiddleware: Middleware<{}, T_RootState>;
@@ -0,0 +1,3 @@
1
+ import { T_SetActionHandlers } from './types';
2
+ declare const setActionHandlers: (payload: T_SetActionHandlers["payload"]) => T_SetActionHandlers;
3
+ export { setActionHandlers };
@@ -0,0 +1,2 @@
1
+ declare const SET_ACTION_HANDLERS = "ACTION_HANDLERS/SET_ACTION_HANDLERS";
2
+ export { SET_ACTION_HANDLERS };
@@ -0,0 +1,3 @@
1
+ import { T_ActionHandlersAction, T_ActionHandlersState } from './types';
2
+ declare const actionHandlersReducer: (state: T_ActionHandlersState, { type, payload }: T_ActionHandlersAction) => T_ActionHandlersState;
3
+ export { actionHandlersReducer };
@@ -0,0 +1,8 @@
1
+ import { T_RootState } from "../../store";
2
+ declare const selectChangeHandler: (state: T_RootState) => (edited: boolean, seatMap: import("platform-calendar-helpers").T_SeatMap) => void;
3
+ declare const selectSelectHandler: (state: T_RootState) => (seats: (import("platform-calendar-helpers").T_Seat & {
4
+ elementId: import("platform-calendar-helpers").T_Element["id"];
5
+ elementTitle: import("platform-calendar-helpers").T_Element["title"];
6
+ elementType: import("../seatMap/types").T_ElementType_SeatMap;
7
+ })[]) => void;
8
+ export { selectChangeHandler, selectSelectHandler };
@@ -0,0 +1,20 @@
1
+ import { T_Element, T_Seat, T_SeatMap } from 'platform-calendar-helpers';
2
+ import { T_ElementType_SeatMap } from "../seatMap/types";
3
+ import { SET_ACTION_HANDLERS } from './actionTypes';
4
+ type T_ActionHandlersState = {
5
+ onChange: (edited: boolean, seatMap: T_SeatMap) => void;
6
+ onSelect: (seats: (T_Seat & {
7
+ elementId: T_Element['id'];
8
+ elementTitle: T_Element['title'];
9
+ elementType: T_ElementType_SeatMap;
10
+ })[]) => void;
11
+ };
12
+ type T_SetActionHandlers = {
13
+ type: typeof SET_ACTION_HANDLERS;
14
+ payload: {
15
+ onChange: T_ActionHandlersState['onChange'];
16
+ onSelect: T_ActionHandlersState['onSelect'];
17
+ };
18
+ };
19
+ type T_ActionHandlersAction = T_SetActionHandlers;
20
+ export { type T_SetActionHandlers, type T_ActionHandlersState, type T_ActionHandlersAction };
@@ -0,0 +1,6 @@
1
+ import { T_Element } from 'platform-calendar-helpers';
2
+ import { T_ElementType_SeatMap } from "../seatMap/types";
3
+ import { T_CopyElementAction, T_ClearClipboardAction } from './types';
4
+ declare const copyElement: (element: T_Element, elementType: T_ElementType_SeatMap) => T_CopyElementAction;
5
+ declare const clearClipboard: () => T_ClearClipboardAction;
6
+ export { copyElement, clearClipboard };
@@ -0,0 +1,3 @@
1
+ declare const COPY_ELEMENT = "CLIPBOARD/COPY_ELEMENT";
2
+ declare const CLEAR_CLIPBOARD = "CLIPBOARD/CLEAR_CLIPBOARD";
3
+ export { COPY_ELEMENT, CLEAR_CLIPBOARD };
@@ -0,0 +1,3 @@
1
+ import { T_ClipboardState, T_ClipboardAction } from './types';
2
+ declare const clipboardReducer: (state: T_ClipboardState, action: T_ClipboardAction) => T_ClipboardState;
3
+ export { clipboardReducer };
@@ -0,0 +1,6 @@
1
+ import { T_RootState } from '../../store';
2
+ declare const selectClipboard: (state: T_RootState) => import("./types").T_ClipboardState;
3
+ declare const selectClipboardElement: (state: T_RootState) => import("platform-calendar-helpers").T_Element;
4
+ declare const selectClipboardElementType: (state: T_RootState) => import("../seatMap/types").T_ElementType_SeatMap;
5
+ declare const selectHasClipboardContent: (state: T_RootState) => boolean;
6
+ export { selectClipboard, selectClipboardElement, selectClipboardElementType, selectHasClipboardContent };
@@ -0,0 +1,19 @@
1
+ import { T_Element } from 'platform-calendar-helpers';
2
+ import { T_ElementType_SeatMap } from "../seatMap/types";
3
+ import { COPY_ELEMENT, CLEAR_CLIPBOARD } from './actionTypes';
4
+ type T_ClipboardState = {
5
+ element: T_Element | null;
6
+ elementType: T_ElementType_SeatMap | null;
7
+ };
8
+ type T_CopyElementAction = {
9
+ type: typeof COPY_ELEMENT;
10
+ payload: {
11
+ element: T_Element;
12
+ elementType: T_ElementType_SeatMap;
13
+ };
14
+ };
15
+ type T_ClearClipboardAction = {
16
+ type: typeof CLEAR_CLIPBOARD;
17
+ };
18
+ type T_ClipboardAction = T_CopyElementAction | T_ClearClipboardAction;
19
+ export type { T_ClipboardState, T_ClipboardAction, T_CopyElementAction, T_ClearClipboardAction };
@@ -0,0 +1,7 @@
1
+ import { T_Seat } from 'platform-calendar-helpers';
2
+ import { T_AddSelectedSeats, T_ElementSelectorState, T_SetSelected, T_SetSelectorActiveELement, T_UnselectSeats } from './types';
3
+ declare const setSelectorActiveElement: (active: T_ElementSelectorState["active"]) => T_SetSelectorActiveELement;
4
+ declare const setSelected: (payload: T_SetSelected["payload"]) => T_SetSelected;
5
+ declare const addSelectedSeats: (payload: T_AddSelectedSeats["payload"]) => T_AddSelectedSeats;
6
+ declare const unselectSeats: (ids: T_Seat["id"][]) => T_UnselectSeats;
7
+ export { setSelectorActiveElement, setSelected, addSelectedSeats, unselectSeats };
@@ -0,0 +1,5 @@
1
+ declare const SET_SELECTOR_ACTIVE_ELEMENT = "ELEMENT_SELECTOR/SET_SELECTOR_ACTIVE_ELEMENT";
2
+ declare const SET_SELECTED = "ELEMENT_SELECTOR/SET_SELECTED";
3
+ declare const ADD_SELECTED_SEATS = "ELEMENT_SELECTOR/ADD_SELECTED_SEATS";
4
+ declare const UNSELECT_SEATS = "ELEMENT_SELECTOR/UNSELECT_SEATS";
5
+ export { SET_SELECTOR_ACTIVE_ELEMENT, SET_SELECTED, ADD_SELECTED_SEATS, UNSELECT_SEATS };
@@ -0,0 +1,3 @@
1
+ import { T_ElementSelectorState, T_SeatMapsReducerAction } from './types';
2
+ declare const elementSelectorReducer: (state: T_ElementSelectorState, { type, payload }: T_SeatMapsReducerAction) => T_ElementSelectorState;
3
+ export { elementSelectorReducer };
@@ -0,0 +1,8 @@
1
+ import { T_RootState } from '../../store';
2
+ import { T_ElementSelectorState, T_SelectorActiveTab } from './types';
3
+ declare const selectSelectorActiveElement: (state: T_RootState) => T_SelectorActiveTab;
4
+ declare const selectSelected: (state: T_RootState) => T_ElementSelectorState["selected"];
5
+ declare const selectSelectedSeats: (state: T_RootState) => T_ElementSelectorState["selected"]["seats"];
6
+ declare const selectSelectedElementId: (state: T_RootState) => T_ElementSelectorState["selected"]["elementId"];
7
+ declare const selectSelectedSeatsCount: (state: T_RootState) => number;
8
+ export { selectSelectorActiveElement, selectSelected, selectSelectedElementId, selectSelectedSeatsCount, selectSelectedSeats };
@@ -0,0 +1,45 @@
1
+ import { T_Element, T_ElementType, T_Seat } from 'platform-calendar-helpers';
2
+ import { ADD_SELECTED_SEATS, SET_SELECTED, SET_SELECTOR_ACTIVE_ELEMENT, UNSELECT_SEATS } from './actionTypes';
3
+ type T_SelectorActiveTab = T_ElementType | 'settings' | 'seatEditor' | 'info' | 'stats' | 'aisles' | null;
4
+ type T_ElementType_SeatMap = T_ElementType | 'aisles';
5
+ type T_ElementSelectorState = {
6
+ active: T_SelectorActiveTab;
7
+ selected: {
8
+ elementType: T_ElementType_SeatMap;
9
+ elementId: T_Element['id'];
10
+ seats: {
11
+ [key: T_Seat['id']]: {
12
+ id: T_Seat['id'];
13
+ elementType: T_ElementType_SeatMap;
14
+ elementId: T_Element['id'];
15
+ elementTitle: T_Element['title'];
16
+ } & Partial<T_Seat>;
17
+ };
18
+ seatIds: T_Seat['id'][];
19
+ };
20
+ };
21
+ type T_SelectedSeats = T_ElementSelectorState['selected']['seats'];
22
+ type T_SetSelectorActiveELement = {
23
+ type: typeof SET_SELECTOR_ACTIVE_ELEMENT;
24
+ payload: {
25
+ active: T_SelectorActiveTab;
26
+ };
27
+ };
28
+ type T_SetSelected = {
29
+ type: typeof SET_SELECTED;
30
+ payload: Partial<T_ElementSelectorState['selected']>;
31
+ };
32
+ type T_AddSelectedSeats = {
33
+ type: typeof ADD_SELECTED_SEATS;
34
+ payload: {
35
+ selectedSeats: T_ElementSelectorState['selected']['seats'];
36
+ };
37
+ };
38
+ type T_UnselectSeats = {
39
+ type: typeof UNSELECT_SEATS;
40
+ payload: {
41
+ ids: T_Seat['id'][];
42
+ };
43
+ };
44
+ type T_SeatMapsReducerAction = T_SetSelectorActiveELement | T_SetSelected | T_AddSelectedSeats | T_UnselectSeats;
45
+ export type { T_SeatMapsReducerAction, T_SetSelectorActiveELement, T_ElementSelectorState, T_SelectorActiveTab, T_SetSelected, T_AddSelectedSeats, T_UnselectSeats, T_SelectedSeats };
@@ -0,0 +1,10 @@
1
+ declare const undo: () => {
2
+ type: string;
3
+ };
4
+ declare const redo: () => {
5
+ type: string;
6
+ };
7
+ declare const clearHistory: () => {
8
+ type: string;
9
+ };
10
+ export { undo, redo, clearHistory };
@@ -0,0 +1,4 @@
1
+ declare const UNDO = "HISTORY/UNDO";
2
+ declare const REDO = "HISTORY/REDO";
3
+ declare const CLEAR_HISTORY = "HISTORY/CLEAR_HISTORY";
4
+ export { UNDO, REDO, CLEAR_HISTORY };
@@ -0,0 +1,21 @@
1
+ import { T_HistoryState, T_HistoryAction } from './types';
2
+ import { T_SeatMap } from 'platform-calendar-helpers';
3
+ export declare const UPDATE_HISTORY = "HISTORY/UPDATE_HISTORY";
4
+ export declare const INIT_HISTORY = "HISTORY/INIT_HISTORY";
5
+ type T_UpdateHistoryAction = {
6
+ type: typeof UPDATE_HISTORY;
7
+ payload: {
8
+ past: T_SeatMap[];
9
+ present: T_SeatMap;
10
+ future: T_SeatMap[];
11
+ };
12
+ };
13
+ type T_InitHistoryAction = {
14
+ type: typeof INIT_HISTORY;
15
+ payload: {
16
+ present: T_SeatMap;
17
+ };
18
+ };
19
+ type T_ExtendedHistoryAction = T_HistoryAction | T_UpdateHistoryAction | T_InitHistoryAction;
20
+ declare const historyReducer: (state: T_HistoryState, action: T_ExtendedHistoryAction) => T_HistoryState;
21
+ export { historyReducer };
@@ -0,0 +1,5 @@
1
+ import { T_RootState } from '../../store';
2
+ declare const selectHistory: (state: T_RootState) => import("./types").T_HistoryState;
3
+ declare const selectCanUndo: (state: T_RootState) => boolean;
4
+ declare const selectCanRedo: (state: T_RootState) => boolean;
5
+ export { selectHistory, selectCanUndo, selectCanRedo };
@@ -0,0 +1,18 @@
1
+ import { T_SeatMap } from 'platform-calendar-helpers';
2
+ import { UNDO, REDO, CLEAR_HISTORY } from './actionTypes';
3
+ type T_HistoryState = {
4
+ past: T_SeatMap[];
5
+ present: T_SeatMap | null;
6
+ future: T_SeatMap[];
7
+ };
8
+ type T_UndoAction = {
9
+ type: typeof UNDO;
10
+ };
11
+ type T_RedoAction = {
12
+ type: typeof REDO;
13
+ };
14
+ type T_ClearHistoryAction = {
15
+ type: typeof CLEAR_HISTORY;
16
+ };
17
+ type T_HistoryAction = T_UndoAction | T_RedoAction | T_ClearHistoryAction;
18
+ export type { T_HistoryState, T_HistoryAction, T_UndoAction, T_RedoAction, T_ClearHistoryAction };
@@ -0,0 +1,15 @@
1
+ import { T_Mode } from "../../../helpers/types/commons";
2
+ import { T_Ticket } from 'platform-calendar-helpers';
3
+ import { T_SetElementToDelete, T_SetError, T_SetHasChanges, T_SetInitialized, T_SetIsDraggingScene, T_SetMode, T_SetScale, T_SetSoldSeats, T_SetTickets, T_SetBackgroundColor, T_SetCurrencySymbol } from './types';
4
+ declare const setScale: (scale: number) => T_SetScale;
5
+ declare const setIsDraggingScene: (isDraggingScene: boolean) => T_SetIsDraggingScene;
6
+ declare const setElementToDelete: (elementToDelete: T_SetElementToDelete["payload"]["elementToDelete"]) => T_SetElementToDelete;
7
+ declare const setInitialized: (initialized: boolean) => T_SetInitialized;
8
+ declare const setTickets: (tickets: T_Ticket[]) => T_SetTickets;
9
+ declare const setHasChanges: (hasChanges: boolean) => T_SetHasChanges;
10
+ declare const setMode: (mode: T_Mode) => T_SetMode;
11
+ declare const setError: (payload: T_SetError["payload"]) => T_SetError;
12
+ declare const setSoldSeats: (soldSeats: T_SetSoldSeats["payload"]["soldSeats"]) => T_SetSoldSeats;
13
+ declare const setBackgroundColor: (backgroundColor: string) => T_SetBackgroundColor;
14
+ declare const setCurrencySymbol: (currencySymbol: string) => T_SetCurrencySymbol;
15
+ export { setScale, setIsDraggingScene, setElementToDelete, setInitialized, setTickets, setHasChanges, setMode, setError, setSoldSeats, setBackgroundColor, setCurrencySymbol };
@@ -0,0 +1,12 @@
1
+ declare const SET_SCALE = "MAIN/SET_SCALE";
2
+ declare const SET_IS_DRAGGING_SCENE = "MAIN/SET_IS_DRAGGING_SCENE";
3
+ declare const SET_ELEMENT_TO_DELETE = "MAIN/SET_ELEMENT_TO_DELETE";
4
+ declare const SET_INITIALIZED = "MAIN/SET_INITIALIZED";
5
+ declare const SET_TICKETS = "MAIN/SET_TICKETS";
6
+ declare const SET_HAS_CHANGES = "MAIN/SET_HAS_CHANGES";
7
+ declare const SET_MODE = "MAIN/SET_MODE";
8
+ declare const SET_ERROR = "MAIN/SET_ERROR";
9
+ declare const SET_SOLD_SEATS = "MAIN/SET_SOLD_SEATS";
10
+ declare const SET_BACKGROUND_COLOR = "MAIN/SET_BACKGROUND_COLOR";
11
+ declare const SET_CURRENCY_SYMBOL = "MAIN/SET_CURRENCY_SYMBOL";
12
+ export { SET_SCALE, SET_IS_DRAGGING_SCENE, SET_ELEMENT_TO_DELETE, SET_INITIALIZED, SET_TICKETS, SET_HAS_CHANGES, SET_MODE, SET_ERROR, SET_SOLD_SEATS, SET_BACKGROUND_COLOR, SET_CURRENCY_SYMBOL };
@@ -0,0 +1,3 @@
1
+ import { T_MainReducerAction, T_MainState } from './types';
2
+ declare const mainReducer: (state: T_MainState, { type, payload }: T_MainReducerAction) => T_MainState;
3
+ export { mainReducer };
@@ -0,0 +1,65 @@
1
+ import { T_Mode } from "../../../helpers/types/commons";
2
+ import { T_Ticket } from 'platform-calendar-helpers';
3
+ import { T_RootState } from "../../store";
4
+ import { T_MainState } from './types';
5
+ declare const selectInitialized: (state: T_RootState) => boolean;
6
+ declare const selectScale: (state: T_RootState) => number;
7
+ declare const selectIsDraggingScene: (state: T_RootState) => boolean;
8
+ declare const selectElementToDelete: (state: T_RootState) => T_MainState["elementToDelete"];
9
+ declare const selectTickets: (state: T_RootState) => T_Ticket[];
10
+ declare const selectHasChanges: (state: T_RootState) => boolean;
11
+ declare const selectMode: (state: T_RootState) => T_Mode;
12
+ declare const selectEmptyNameError: (state: T_RootState) => boolean;
13
+ declare const selectSoldSeats: (state: T_RootState) => T_MainState["soldSeats"];
14
+ declare const selectBackgroundColor: (state: T_RootState) => string;
15
+ declare const selectCurrencySymbol: (state: T_RootState) => string;
16
+ declare const selectTicketByIds: ((state: T_RootState) => {
17
+ ticketIds: {
18
+ [key: string | number]: boolean;
19
+ };
20
+ ticketsByIds: {
21
+ [key: string | number]: T_Ticket;
22
+ };
23
+ }) & {
24
+ clearCache: () => void;
25
+ resultsCount: () => number;
26
+ resetResultsCount: () => void;
27
+ } & {
28
+ resultFunc: (resultFuncArgs_0: T_Ticket[]) => {
29
+ ticketIds: {
30
+ [key: string | number]: boolean;
31
+ };
32
+ ticketsByIds: {
33
+ [key: string | number]: T_Ticket;
34
+ };
35
+ };
36
+ memoizedResultFunc: ((resultFuncArgs_0: T_Ticket[]) => {
37
+ ticketIds: {
38
+ [key: string | number]: boolean;
39
+ };
40
+ ticketsByIds: {
41
+ [key: string | number]: T_Ticket;
42
+ };
43
+ }) & {
44
+ clearCache: () => void;
45
+ resultsCount: () => number;
46
+ resetResultsCount: () => void;
47
+ };
48
+ lastResult: () => {
49
+ ticketIds: {
50
+ [key: string | number]: boolean;
51
+ };
52
+ ticketsByIds: {
53
+ [key: string | number]: T_Ticket;
54
+ };
55
+ };
56
+ dependencies: [(state: T_RootState) => T_Ticket[]];
57
+ recomputations: () => number;
58
+ resetRecomputations: () => void;
59
+ dependencyRecomputations: () => number;
60
+ resetDependencyRecomputations: () => void;
61
+ } & {
62
+ memoize: typeof import("reselect").weakMapMemoize;
63
+ argsMemoize: typeof import("reselect").weakMapMemoize;
64
+ };
65
+ export { selectScale, selectIsDraggingScene, selectElementToDelete, selectTickets, selectInitialized, selectHasChanges, selectMode, selectTicketByIds, selectEmptyNameError, selectSoldSeats, selectBackgroundColor, selectCurrencySymbol };
@@ -0,0 +1,89 @@
1
+ import { T_Mode } from "../../../helpers/types/commons";
2
+ import { T_Element, T_Ticket } from 'platform-calendar-helpers';
3
+ import { T_AddElement, T_DeleteElement, T_EditElement, T_EditSeats, T_ElementType_SeatMap, T_SetElementPosition, T_SetSeatMapName } from "../seatMap/types";
4
+ import { T_SelectedSeats } from '../elementSelector/types';
5
+ import { SET_ELEMENT_TO_DELETE, SET_ERROR, SET_HAS_CHANGES, SET_INITIALIZED, SET_IS_DRAGGING_SCENE, SET_MODE, SET_SCALE, SET_SOLD_SEATS, SET_TICKETS, SET_BACKGROUND_COLOR, SET_CURRENCY_SYMBOL } from './actionTypes';
6
+ type T_MainState = {
7
+ initialized: boolean;
8
+ scale: number;
9
+ isDraggingScene: boolean;
10
+ elementToDelete: {
11
+ id: T_Element['id'];
12
+ type: T_ElementType_SeatMap;
13
+ } | null;
14
+ tickets: T_Ticket[];
15
+ hasChanges: boolean;
16
+ mode: T_Mode;
17
+ error: {
18
+ emptyName: boolean;
19
+ };
20
+ soldSeats: T_SelectedSeats[keyof T_SelectedSeats][];
21
+ backgroundColor: string;
22
+ currencySymbol: string;
23
+ };
24
+ type T_SetScale = {
25
+ type: typeof SET_SCALE;
26
+ payload: {
27
+ scale: number;
28
+ };
29
+ };
30
+ type T_SetIsDraggingScene = {
31
+ type: typeof SET_IS_DRAGGING_SCENE;
32
+ payload: {
33
+ isDraggingScene: boolean;
34
+ };
35
+ };
36
+ type T_SetElementToDelete = {
37
+ type: typeof SET_ELEMENT_TO_DELETE;
38
+ payload: {
39
+ elementToDelete: T_MainState['elementToDelete'];
40
+ };
41
+ };
42
+ type T_SetInitialized = {
43
+ type: typeof SET_INITIALIZED;
44
+ payload: {
45
+ initialized: boolean;
46
+ };
47
+ };
48
+ type T_SetTickets = {
49
+ type: typeof SET_TICKETS;
50
+ payload: {
51
+ tickets: T_Ticket[];
52
+ };
53
+ };
54
+ type T_SetHasChanges = {
55
+ type: typeof SET_HAS_CHANGES;
56
+ payload: {
57
+ hasChanges: boolean;
58
+ };
59
+ };
60
+ type T_SetMode = {
61
+ type: typeof SET_MODE;
62
+ payload: {
63
+ mode: T_Mode;
64
+ };
65
+ };
66
+ type T_SetError = {
67
+ type: typeof SET_ERROR;
68
+ payload: Partial<T_MainState['error']>;
69
+ };
70
+ type T_SetSoldSeats = {
71
+ type: typeof SET_SOLD_SEATS;
72
+ payload: {
73
+ soldSeats: T_MainState['soldSeats'];
74
+ };
75
+ };
76
+ type T_SetBackgroundColor = {
77
+ type: typeof SET_BACKGROUND_COLOR;
78
+ payload: {
79
+ backgroundColor: string;
80
+ };
81
+ };
82
+ type T_SetCurrencySymbol = {
83
+ type: typeof SET_CURRENCY_SYMBOL;
84
+ payload: {
85
+ currencySymbol: string;
86
+ };
87
+ };
88
+ type T_MainReducerAction = T_SetScale | T_SetIsDraggingScene | T_SetElementToDelete | T_DeleteElement | T_SetInitialized | T_SetTickets | T_SetHasChanges | T_AddElement | T_DeleteElement | T_SetElementPosition | T_EditSeats | T_EditElement | T_SetMode | T_SetSeatMapName | T_SetError | T_SetSoldSeats | T_SetBackgroundColor | T_SetCurrencySymbol;
89
+ export type { T_MainState, T_SetScale, T_MainReducerAction, T_SetIsDraggingScene, T_SetElementToDelete, T_SetInitialized, T_SetTickets, T_SetHasChanges, T_SetMode, T_SetError, T_SetSoldSeats, T_SetBackgroundColor, T_SetCurrencySymbol };
@@ -0,0 +1,28 @@
1
+ declare const rootReducer: import("redux").Reducer<{
2
+ seatMap: import("platform-calendar-helpers").T_SeatMap;
3
+ main: import("./main/types").T_MainState;
4
+ elementSelector: import("./elementSelector/types").T_ElementSelectorState;
5
+ actionHandlers: import("./actionHandlers/types").T_ActionHandlersState;
6
+ history: import("./history/types").T_HistoryState;
7
+ clipboard: import("./clipboard/types").T_ClipboardState;
8
+ }, import("./seatMap/types").T_SetSeatMap | import("./main/types").T_SetBackgroundColor | import("./main/types").T_SetSoldSeats | import("./main/types").T_SetTickets | import("./main/types").T_SetCurrencySymbol | import("./actionHandlers/types").T_SetActionHandlers | import("./main/types").T_SetMode | import("./main/types").T_SetHasChanges | import("./main/types").T_SetInitialized | import("./main/types").T_SetIsDraggingScene | import("./elementSelector/types").T_SetSelectorActiveELement | import("./main/types").T_SetElementToDelete | import("./seatMap/types").T_DeleteElement | import("./elementSelector/types").T_SetSelected | import("./main/types").T_SetScale | import("./elementSelector/types").T_UnselectSeats | import("./elementSelector/types").T_AddSelectedSeats | import("./main/types").T_SetError | import("./seatMap/types").T_AddElement | import("./seatMap/types").T_SetElementPosition | import("./seatMap/types").T_EditSeats | import("./seatMap/types").T_EditElement | import("./seatMap/types").T_SetSeatMapName | import("./seatMap/types").T_ResetDefaultElement | import("./history/types").T_UndoAction | import("./history/types").T_RedoAction | import("./history/types").T_ClearHistoryAction | {
9
+ type: typeof import("./history/reducer").UPDATE_HISTORY;
10
+ payload: {
11
+ past: import("platform-calendar-helpers").T_SeatMap[];
12
+ present: import("platform-calendar-helpers").T_SeatMap;
13
+ future: import("platform-calendar-helpers").T_SeatMap[];
14
+ };
15
+ } | {
16
+ type: typeof import("./history/reducer").INIT_HISTORY;
17
+ payload: {
18
+ present: import("platform-calendar-helpers").T_SeatMap;
19
+ };
20
+ } | import("./clipboard/types").T_CopyElementAction | import("./clipboard/types").T_ClearClipboardAction, Partial<{
21
+ seatMap: import("platform-calendar-helpers").T_SeatMap;
22
+ main: import("./main/types").T_MainState;
23
+ elementSelector: import("./elementSelector/types").T_ElementSelectorState;
24
+ actionHandlers: import("./actionHandlers/types").T_ActionHandlersState;
25
+ history: import("./history/types").T_HistoryState;
26
+ clipboard: import("./clipboard/types").T_ClipboardState;
27
+ }>>;
28
+ export { rootReducer };
@@ -0,0 +1,11 @@
1
+ import { T_SeatMap } from 'platform-calendar-helpers';
2
+ import { T_AddElement, T_DeleteElement, T_EditElement, T_EditSeats, T_ResetDefaultElement, T_SetElementPosition, T_SetSeatMap, T_SetSeatMapName } from './types';
3
+ declare const setSeatMap: (seatMap: T_SeatMap) => T_SetSeatMap;
4
+ declare const setSeatMapName: (name: T_SeatMap["name"]) => T_SetSeatMapName;
5
+ declare const addElement: (payload: T_AddElement["payload"]) => T_AddElement;
6
+ declare const deleteElement: (payload: T_DeleteElement["payload"]) => T_DeleteElement;
7
+ declare const setElementPosition: (payload: T_SetElementPosition["payload"]) => T_SetElementPosition;
8
+ declare const editSeats: (payload: T_EditSeats["payload"]) => T_EditSeats;
9
+ declare const editElement: (payload: T_EditElement["payload"]) => T_EditElement;
10
+ declare const resetDefaultElement: (payload: T_ResetDefaultElement["payload"]) => T_ResetDefaultElement;
11
+ export { setSeatMap, addElement, deleteElement, setElementPosition, editSeats, editElement, setSeatMapName, resetDefaultElement };
@@ -0,0 +1,9 @@
1
+ declare const SET_SEAT_MAP = "SEAT_MAPS/SET_SEAT_MAP";
2
+ declare const SET_SEAT_MAP_NAME = "SEAT_MAPS/SET_SEAT_MAP_NAME";
3
+ declare const ADD_ELEMENT = "SEAT_MAPS/ADD_ELEMENT";
4
+ declare const DELETE_ELEMENT = "SEAT_MAPS/DELETE_ELEMENT";
5
+ declare const SET_ELEMENT_POSITION = "SEAT_MAPS/SET_ELEMENT_POSITION";
6
+ declare const EDIT_SEATS = "SEAT_MAPS/EDIT_SEATS";
7
+ declare const EDIT_ELEMENT = "SEAT_MAPS/EDIT_ELEMENT";
8
+ declare const RESET_DEFAULT_ELEMENT = "SEAT_MAPS/RESET_DEFAULT_ELEMENT";
9
+ export { SET_SEAT_MAP, ADD_ELEMENT, DELETE_ELEMENT, SET_ELEMENT_POSITION, EDIT_SEATS, EDIT_ELEMENT, SET_SEAT_MAP_NAME, RESET_DEFAULT_ELEMENT };
@@ -0,0 +1,3 @@
1
+ import { T_SeatMapsReducerAction, T_SeatMapsState } from './types';
2
+ declare const seatMapsReducer: (state: import("platform-calendar-helpers").T_SeatMap, { type, payload }: T_SeatMapsReducerAction) => T_SeatMapsState;
3
+ export { seatMapsReducer };