@clikvn/showroom-visualizer 0.5.1 → 0.5.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 (28) hide show
  1. package/dist/components/SkinLayer/HotspotOverview/index.d.ts.map +1 -1
  2. package/dist/features/ShowroomVisualizer/index.d.ts +1 -0
  3. package/dist/features/ShowroomVisualizer/index.d.ts.map +1 -1
  4. package/dist/hooks/SkinLayer/useAutoPlayer.d.ts.map +1 -1
  5. package/dist/index.js +1 -1
  6. package/dist/models/Visualizer/Poi/PoiListMoving.d.ts.map +1 -1
  7. package/dist/web.js +1 -1
  8. package/example/src/App.tsx +195 -0
  9. package/example/src/components/ControlPanel.tsx +736 -0
  10. package/example/src/components/CustomComponents/FloorplanComponents.tsx +37 -0
  11. package/example/src/components/CustomComponents/HotspotCategoryComponents.tsx +106 -0
  12. package/example/src/components/CustomComponents/PinActionsComponents.tsx +45 -0
  13. package/example/src/components/CustomComponents/PlayBarComponents.tsx +41 -0
  14. package/example/src/components/CustomComponents/PoiDetailComponents.tsx +296 -0
  15. package/example/src/components/CustomComponents/SearchAndDiscoveryComponents.tsx +207 -0
  16. package/example/src/components/CustomComponents/index.tsx +7 -0
  17. package/example/src/css-modules.d.ts +4 -0
  18. package/example/src/hooks/useCustomLayout.ts +328 -0
  19. package/example/src/index.css +31 -0
  20. package/example/src/main.tsx +11 -0
  21. package/package.json +1 -1
  22. package/.idea/inspectionProfiles/Project_Default.xml +0 -36
  23. package/.idea/jsLinters/eslint.xml +0 -7
  24. package/.idea/misc.xml +0 -9
  25. package/.idea/modules.xml +0 -8
  26. package/.idea/prettier.xml +0 -8
  27. package/.idea/showroom-visualizer.iml +0 -9
  28. package/.idea/vcs.xml +0 -6
@@ -0,0 +1,195 @@
1
+ import { useState } from 'react';
2
+ import { ShowroomVisualizer } from '@clikvn/showroom-visualizer';
3
+ import ControlPanel from './components/ControlPanel';
4
+ import { useCustomLayout } from './hooks/useCustomLayout';
5
+
6
+ function App() {
7
+ const [enableCustomLayout, setEnableCustomLayout] = useState(true);
8
+ const [language, setLanguage] = useState<'vi' | 'en'>('vi');
9
+
10
+ // Floorplan/Minimap custom toggles
11
+ const [customMinimap, setCustomMinimap] = useState(false);
12
+ const [customMarker, setCustomMarker] = useState(false);
13
+
14
+ // PinActions custom toggles
15
+ const [customPinActions, setCustomPinActions] = useState(false);
16
+ const [customPinActionButton, setCustomPinActionButton] = useState(false);
17
+ const [
18
+ customPinActionButtonWithTooltip,
19
+ setCustomPinActionButtonWithTooltip,
20
+ ] = useState(false);
21
+
22
+ // SearchAndDiscoverySlideIn custom toggles
23
+ const [customSearchAndDiscovery, setCustomSearchAndDiscovery] =
24
+ useState(false);
25
+ const [customTourInfoActionPart, setCustomTourInfoActionPart] =
26
+ useState(false);
27
+ const [customScenarioPart, setCustomScenarioPart] = useState(false);
28
+ const [customPromotionPart, setCustomPromotionPart] = useState(false);
29
+ const [customPoiInfoActionPart, setCustomPoiInfoActionPart] = useState(false);
30
+ const [customDisplayActionPart, setCustomDisplayActionPart] = useState(false);
31
+ const [customHelpActionPart, setCustomHelpActionPart] = useState(false);
32
+ const [customContentItem, setCustomContentItem] = useState(false);
33
+ const [customScenarioItem, setCustomScenarioItem] = useState(false);
34
+ const [customCardItem, setCustomCardItem] = useState(false);
35
+
36
+ // HotspotCategorySlideIn custom toggles
37
+ const [customHotspotCategorySlideIn, setCustomHotspotCategorySlideIn] =
38
+ useState(false);
39
+ const [customScenarioSlideIn, setCustomScenarioSlideIn] = useState(false);
40
+ const [customSpaceAndSceneSlideIn, setCustomSpaceAndSceneSlideIn] =
41
+ useState(false);
42
+ const [customFeatureSlideIn, setCustomFeatureSlideIn] = useState(false);
43
+ const [customProductSlideIn, setCustomProductSlideIn] = useState(false);
44
+ const [customPoiSlideIn, setCustomPoiSlideIn] = useState(false);
45
+
46
+ // PlayBar custom toggles
47
+ const [customPlayBarTooltip, setCustomPlayBarTooltip] = useState(false);
48
+ const [customPlayBarButton, setCustomPlayBarButton] = useState(false);
49
+
50
+ // PoiDetailSlideIn custom toggles
51
+ const [customPoiDetailDrawer, setCustomPoiDetailDrawer] = useState(false);
52
+ const [customPoiDetailBottomSheet, setCustomPoiDetailBottomSheet] =
53
+ useState(false);
54
+ const [customProductDetailHeader, setCustomProductDetailHeader] =
55
+ useState(false);
56
+ const [customGroupActionButton, setCustomGroupActionButton] = useState(false);
57
+ const [customTabs, setCustomTabs] = useState(false);
58
+ const [customTabsContent, setCustomTabsContent] = useState(false);
59
+ const [customInfo, setCustomInfo] = useState(false);
60
+ const [customGallery, setCustomGallery] = useState(false);
61
+ const [customArTab, setCustomArTab] = useState(false);
62
+
63
+ const { buildCustomLayout } = useCustomLayout({
64
+ enableCustomLayout,
65
+ customMinimap,
66
+ customMarker,
67
+ customPinActions,
68
+ customPinActionButton,
69
+ customPinActionButtonWithTooltip,
70
+ customSearchAndDiscovery,
71
+ customTourInfoActionPart,
72
+ customScenarioPart,
73
+ customPromotionPart,
74
+ customPoiInfoActionPart,
75
+ customDisplayActionPart,
76
+ customHelpActionPart,
77
+ customContentItem,
78
+ customScenarioItem,
79
+ customCardItem,
80
+ customHotspotCategorySlideIn,
81
+ customScenarioSlideIn,
82
+ customSpaceAndSceneSlideIn,
83
+ customFeatureSlideIn,
84
+ customProductSlideIn,
85
+ customPoiSlideIn,
86
+ customPlayBarTooltip,
87
+ customPlayBarButton,
88
+ customPoiDetailDrawer,
89
+ customPoiDetailBottomSheet,
90
+ customProductDetailHeader,
91
+ customGroupActionButton,
92
+ customTabs,
93
+ customTabsContent,
94
+ customInfo,
95
+ customGallery,
96
+ customArTab,
97
+ });
98
+
99
+ return (
100
+ <div style={{ height: '100vh', display: 'flex', flexDirection: 'column' }}>
101
+ {/* Control Panel */}
102
+ {/* <ControlPanel
103
+ enableCustomLayout={enableCustomLayout}
104
+ language={language}
105
+ onEnableCustomLayoutChange={setEnableCustomLayout}
106
+ onLanguageChange={setLanguage}
107
+ customMinimap={customMinimap}
108
+ customMarker={customMarker}
109
+ onCustomMinimapChange={setCustomMinimap}
110
+ onCustomMarkerChange={setCustomMarker}
111
+ customPinActions={customPinActions}
112
+ customPinActionButton={customPinActionButton}
113
+ customPinActionButtonWithTooltip={customPinActionButtonWithTooltip}
114
+ onCustomPinActionsChange={setCustomPinActions}
115
+ onCustomPinActionButtonChange={setCustomPinActionButton}
116
+ onCustomPinActionButtonWithTooltipChange={
117
+ setCustomPinActionButtonWithTooltip
118
+ }
119
+ customSearchAndDiscovery={customSearchAndDiscovery}
120
+ customTourInfoActionPart={customTourInfoActionPart}
121
+ customScenarioPart={customScenarioPart}
122
+ customPromotionPart={customPromotionPart}
123
+ customPoiInfoActionPart={customPoiInfoActionPart}
124
+ customDisplayActionPart={customDisplayActionPart}
125
+ customHelpActionPart={customHelpActionPart}
126
+ customContentItem={customContentItem}
127
+ customScenarioItem={customScenarioItem}
128
+ customCardItem={customCardItem}
129
+ onCustomSearchAndDiscoveryChange={setCustomSearchAndDiscovery}
130
+ onCustomTourInfoActionPartChange={setCustomTourInfoActionPart}
131
+ onCustomScenarioPartChange={setCustomScenarioPart}
132
+ onCustomPromotionPartChange={setCustomPromotionPart}
133
+ onCustomPoiInfoActionPartChange={setCustomPoiInfoActionPart}
134
+ onCustomDisplayActionPartChange={setCustomDisplayActionPart}
135
+ onCustomHelpActionPartChange={setCustomHelpActionPart}
136
+ onCustomContentItemChange={setCustomContentItem}
137
+ onCustomScenarioItemChange={setCustomScenarioItem}
138
+ onCustomCardItemChange={setCustomCardItem}
139
+ customHotspotCategorySlideIn={customHotspotCategorySlideIn}
140
+ customScenarioSlideIn={customScenarioSlideIn}
141
+ customSpaceAndSceneSlideIn={customSpaceAndSceneSlideIn}
142
+ customFeatureSlideIn={customFeatureSlideIn}
143
+ customProductSlideIn={customProductSlideIn}
144
+ customPoiSlideIn={customPoiSlideIn}
145
+ onCustomHotspotCategorySlideInChange={setCustomHotspotCategorySlideIn}
146
+ onCustomScenarioSlideInChange={setCustomScenarioSlideIn}
147
+ onCustomSpaceAndSceneSlideInChange={setCustomSpaceAndSceneSlideIn}
148
+ onCustomFeatureSlideInChange={setCustomFeatureSlideIn}
149
+ onCustomProductSlideInChange={setCustomProductSlideIn}
150
+ onCustomPoiSlideInChange={setCustomPoiSlideIn}
151
+ customPlayBarTooltip={customPlayBarTooltip}
152
+ customPlayBarButton={customPlayBarButton}
153
+ onCustomPlayBarTooltipChange={setCustomPlayBarTooltip}
154
+ onCustomPlayBarButtonChange={setCustomPlayBarButton}
155
+ customPoiDetailDrawer={customPoiDetailDrawer}
156
+ customPoiDetailBottomSheet={customPoiDetailBottomSheet}
157
+ customProductDetailHeader={customProductDetailHeader}
158
+ customGroupActionButton={customGroupActionButton}
159
+ customTabs={customTabs}
160
+ customTabsContent={customTabsContent}
161
+ customInfo={customInfo}
162
+ customGallery={customGallery}
163
+ customArTab={customArTab}
164
+ onCustomPoiDetailDrawerChange={setCustomPoiDetailDrawer}
165
+ onCustomPoiDetailBottomSheetChange={setCustomPoiDetailBottomSheet}
166
+ onCustomProductDetailHeaderChange={setCustomProductDetailHeader}
167
+ onCustomGroupActionButtonChange={setCustomGroupActionButton}
168
+ onCustomTabsChange={setCustomTabs}
169
+ onCustomTabsContentChange={setCustomTabsContent}
170
+ onCustomInfoChange={setCustomInfo}
171
+ onCustomGalleryChange={setCustomGallery}
172
+ onCustomArTabChange={setCustomArTab}
173
+ /> */}
174
+
175
+ {/* Visualizer */}
176
+ <div
177
+ style={{ flex: 1, position: 'relative', width: '100%', height: '100%' }}
178
+ >
179
+ <ShowroomVisualizer
180
+ apiHost="https://ci-api.clik.vn/vt360"
181
+ webRotateApiHost="https://ci-api.clik.vn/cms"
182
+ webRotateClientHost="https://ci-webrotate360-client.clik.vn"
183
+ config={{
184
+ language,
185
+ tourCode: 'TOUR_7YUL2ALGFL94',
186
+ }}
187
+ mobile={false}
188
+ customLayout={buildCustomLayout()}
189
+ />
190
+ </div>
191
+ </div>
192
+ );
193
+ }
194
+
195
+ export default App;