@clikvn/showroom-visualizer 0.5.1-dev-01 → 0.5.1-dev-02

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 (53) hide show
  1. package/base.json +21 -21
  2. package/dist/components/SkinLayer/GalleryFullScreen/Content/ARViewer.d.ts +30 -0
  3. package/dist/components/SkinLayer/GalleryFullScreen/Content/ARViewer.d.ts.map +1 -0
  4. package/dist/components/SkinLayer/ModalItemInfo/Description.d.ts +10 -0
  5. package/dist/components/SkinLayer/ModalItemInfo/Description.d.ts.map +1 -0
  6. package/dist/components/SkinLayer/ModalItemInfo/Intro.d.ts +9 -0
  7. package/dist/components/SkinLayer/ModalItemInfo/Intro.d.ts.map +1 -0
  8. package/dist/components/SkinLayer/ModalItemInfo/Media.d.ts +13 -0
  9. package/dist/components/SkinLayer/ModalItemInfo/Media.d.ts.map +1 -0
  10. package/dist/components/SkinLayer/ModalItemInfo/index.d.ts +10 -0
  11. package/dist/components/SkinLayer/ModalItemInfo/index.d.ts.map +1 -0
  12. package/dist/components/SkinLayer/PoiTextureOptions/HorizontalMenu/index.d.ts +13 -0
  13. package/dist/components/SkinLayer/PoiTextureOptions/HorizontalMenu/index.d.ts.map +1 -0
  14. package/dist/components/SkinLayer/PoiTextureOptions/SemicircleMenu/index.d.ts +13 -0
  15. package/dist/components/SkinLayer/PoiTextureOptions/SemicircleMenu/index.d.ts.map +1 -0
  16. package/dist/components/SkinLayer/PoiTextureOptions/TextureMenuItem/index.d.ts +15 -0
  17. package/dist/components/SkinLayer/PoiTextureOptions/TextureMenuItem/index.d.ts.map +1 -0
  18. package/dist/components/SkinLayer/PoiTextureOptions/VerticalMenu/index.d.ts +13 -0
  19. package/dist/components/SkinLayer/PoiTextureOptions/VerticalMenu/index.d.ts.map +1 -0
  20. package/dist/context/StoreContext.d.ts +5 -0
  21. package/dist/context/StoreContext.d.ts.map +1 -0
  22. package/dist/features/ShowroomVisualizer/Scripts.d.ts +4 -0
  23. package/dist/features/ShowroomVisualizer/Scripts.d.ts.map +1 -0
  24. package/dist/features/ShowroomVisualizer/TourContainer.d.ts +9 -0
  25. package/dist/features/ShowroomVisualizer/TourContainer.d.ts.map +1 -0
  26. package/dist/features/ShowroomVisualizer/Tours.d.ts +3 -0
  27. package/dist/features/ShowroomVisualizer/Tours.d.ts.map +1 -0
  28. package/dist/features/ShowroomVisualizer/index.d.ts +1 -0
  29. package/dist/features/ShowroomVisualizer/index.d.ts.map +1 -1
  30. package/dist/fonts/icomoon.svg +633 -633
  31. package/dist/hooks/SkinLayer/useAutoPlayer.d.ts.map +1 -1
  32. package/dist/hooks/Visualizer/reducer.d.ts +116 -0
  33. package/dist/hooks/Visualizer/reducer.d.ts.map +1 -0
  34. package/dist/index.html +105 -31
  35. package/dist/index.js +1 -1
  36. package/dist/web.d.ts.map +1 -1
  37. package/dist/web.js +1 -1
  38. package/example/src/App.tsx +195 -0
  39. package/example/src/components/ControlPanel.tsx +736 -0
  40. package/example/src/components/CustomComponents/FloorplanComponents.tsx +37 -0
  41. package/example/src/components/CustomComponents/HotspotCategoryComponents.tsx +106 -0
  42. package/example/src/components/CustomComponents/PinActionsComponents.tsx +45 -0
  43. package/example/src/components/CustomComponents/PlayBarComponents.tsx +41 -0
  44. package/example/src/components/CustomComponents/PoiDetailComponents.tsx +296 -0
  45. package/example/src/components/CustomComponents/SearchAndDiscoveryComponents.tsx +207 -0
  46. package/example/src/components/CustomComponents/index.tsx +7 -0
  47. package/example/src/css-modules.d.ts +4 -0
  48. package/example/src/hooks/useCustomLayout.ts +328 -0
  49. package/example/src/index.css +31 -0
  50. package/example/src/main.tsx +11 -0
  51. package/package.json +1 -1
  52. package/tailwind.config.cjs +151 -151
  53. package/yarn-error.log +12200 -0
@@ -1 +1 @@
1
- {"version":3,"file":"useAutoPlayer.d.ts","sourceRoot":"","sources":["../../../src/hooks/SkinLayer/useAutoPlayer.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,aAAa,YAuKlB,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"useAutoPlayer.d.ts","sourceRoot":"","sources":["../../../src/hooks/SkinLayer/useAutoPlayer.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,aAAa,YAmLlB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,116 @@
1
+ import Poi from '../../../model/Poi/Poi';
2
+ import { CoordsTypes } from '../../../types/PoiTypes';
3
+ import { FloorplanTypes } from './../../../types/FloorplanTypes';
4
+ export declare const storeName = "tour";
5
+ export declare const actions: {
6
+ SET_TOUR: string;
7
+ SET_ACTIVE_SCENE: string;
8
+ SET_ACTIVE_POI: string;
9
+ SET_ACTIVE_POI_COORDS: string;
10
+ SET_SELECTED_POI: string;
11
+ SET_SELECTED_POI_ACTIVE: string;
12
+ SET_ACTIVE_TOUR_GUIDE: string;
13
+ STOP_ACTIVE_TOUR_GUIDE: string;
14
+ TOGGLE_ACTIVE_TOUR_GUIDE: string;
15
+ TOGGLE_ACTIVE_BG_SOUND: string;
16
+ SET_LOADING: string;
17
+ TOGGLE_TOUR_PLUGIN: string;
18
+ SET_MOUSE_WHEEL: string;
19
+ SET_ACTIVE_FLOOR_PLAN: string;
20
+ SET_ALL_POI_VISIBLE: string;
21
+ SET_LOADING_SCENE: string;
22
+ SET_SOUND_PLAYABLE: string;
23
+ SET_SELECTED_PROMOTION: string;
24
+ SET_SELECTED_GALLERY: string;
25
+ SET_TOUR_READY: string;
26
+ SET_POI_TEXTURE_DATA: string;
27
+ SET_VIEW_ROTATING: string;
28
+ SET_TOUR_SCENARIO: string;
29
+ SET_ACTIVE_SCENARIO_CODE: string;
30
+ SET_REVIEW_SCENARIO_CODE: string;
31
+ SET_LANGUAGE: string;
32
+ SET_SCENARIO_LOADED: string;
33
+ SET_SCENARIO_CONFIG_CODES: string;
34
+ SET_EXIST_POI_TYPE: string;
35
+ SET_POI_CODE_BY_TYPE: string;
36
+ INCREASE_REPLAY_COUNTING: string;
37
+ SET_FLOOR_PLANS: string;
38
+ };
39
+ export interface TourStateType {
40
+ tourReady: boolean;
41
+ data: any;
42
+ activeScene: any;
43
+ activePoi: any;
44
+ activePoiCoords: any;
45
+ selectedPoi: any;
46
+ activeTourGuide: any;
47
+ backgroundSoundPlaying: boolean;
48
+ loading: boolean;
49
+ loadingScene: boolean;
50
+ plugin: {
51
+ [key: string]: boolean;
52
+ };
53
+ activeFloorPlan: FloorplanTypes;
54
+ soundReady: boolean;
55
+ selectedPromotion: any;
56
+ selectedGallery: any;
57
+ poiTextureData: {
58
+ poi: Poi | null;
59
+ coords: CoordsTypes | null;
60
+ };
61
+ viewRotating: boolean;
62
+ activeScenarioCode?: string;
63
+ reviewScenarioCode?: string;
64
+ language: string;
65
+ scenarioLoaded: {
66
+ [key: string]: boolean;
67
+ };
68
+ scenarioConfigCodes?: string[];
69
+ existPoiTypes?: string[];
70
+ poiCodeByType: {
71
+ [key: string]: string[];
72
+ };
73
+ poiCodeActive?: string;
74
+ replayCounting?: number;
75
+ floorplans: FloorplanTypes[];
76
+ }
77
+ declare const _default: (base: {
78
+ readonly tourReady: boolean;
79
+ readonly data: any;
80
+ readonly activeScene: any;
81
+ readonly activePoi: any;
82
+ readonly activePoiCoords: any;
83
+ readonly selectedPoi: any;
84
+ readonly activeTourGuide: any;
85
+ readonly backgroundSoundPlaying: boolean;
86
+ readonly loading: boolean;
87
+ readonly loadingScene: boolean;
88
+ readonly plugin: {
89
+ readonly [x: string]: boolean;
90
+ };
91
+ readonly activeFloorPlan: FloorplanTypes;
92
+ readonly soundReady: boolean;
93
+ readonly selectedPromotion: any;
94
+ readonly selectedGallery: any;
95
+ readonly poiTextureData: {
96
+ readonly poi: Poi | null;
97
+ readonly coords: CoordsTypes | null;
98
+ };
99
+ readonly viewRotating: boolean;
100
+ readonly activeScenarioCode?: string | undefined;
101
+ readonly reviewScenarioCode?: string | undefined;
102
+ readonly language: string;
103
+ readonly scenarioLoaded: {
104
+ readonly [x: string]: boolean;
105
+ };
106
+ readonly scenarioConfigCodes?: readonly string[] | undefined;
107
+ readonly existPoiTypes?: readonly string[] | undefined;
108
+ readonly poiCodeByType: {
109
+ readonly [x: string]: readonly string[];
110
+ };
111
+ readonly poiCodeActive?: string | undefined;
112
+ readonly replayCounting?: number | undefined;
113
+ readonly floorplans: any;
114
+ } | undefined, action: any) => TourStateType | undefined;
115
+ export default _default;
116
+ //# sourceMappingURL=reducer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../src/hooks/Visualizer/reducer.ts"],"names":[],"mappings":"AAGA,OAAO,GAAG,MAAM,wBAAwB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEjE,eAAO,MAAM,SAAS,SAAS,CAAC;AAChC,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCnB,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,GAAG,CAAC;IACV,WAAW,EAAE,GAAG,CAAC;IACjB,SAAS,EAAE,GAAG,CAAC;IACf,eAAe,EAAE,GAAG,CAAC;IACrB,WAAW,EAAE,GAAG,CAAC;IACjB,eAAe,EAAE,GAAG,CAAC;IACrB,sBAAsB,EAAE,OAAO,CAAC;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IACnC,eAAe,EAAE,cAAc,CAAC;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,iBAAiB,EAAE,GAAG,CAAC;IACvB,eAAe,EAAE,GAAG,CAAC;IACrB,cAAc,EAAE;QAAE,GAAG,EAAE,GAAG,GAAG,IAAI,CAAC;QAAC,MAAM,EAAE,WAAW,GAAG,IAAI,CAAA;KAAE,CAAC;IAChE,YAAY,EAAE,OAAO,CAAC;IAEtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAC3C,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,aAAa,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;KAAE,CAAC;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,cAAc,EAAE,CAAC;CAC9B;;wBA5BY,OAAO;mBACZ,GAAG;0BACI,GAAG;wBACL,GAAG;8BACG,GAAG;0BACP,GAAG;8BACC,GAAG;qCACI,OAAO;sBACtB,OAAO;2BACF,OAAO;;;;8BAEJ,cAAc;yBACnB,OAAO;gCACA,GAAG;8BACL,GAAG;;sBACG,GAAG,GAAG,IAAI;yBAAU,WAAW,GAAG,IAAI;;2BAC/C,OAAO;kCAEA,MAAM;kCACN,MAAM;uBACjB,MAAM;;;;;;;;;6BAKA,MAAM;8BACL,MAAM;;;AAmCzB,wBA4HG"}
package/dist/index.html CHANGED
@@ -1,36 +1,110 @@
1
- <!doctype html>
1
+ <!DOCTYPE html>
2
2
  <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
3
+ <head>
4
+ <meta charset="UTF-8">
5
5
  <meta
6
- name="viewport"
7
- content="width=device-width, height=device-height, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"
6
+ name="viewport"
7
+ content="width=device-width, height=device-height, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"
8
8
  />
9
9
  <title>Title</title>
10
- <script type="module">
11
- import ShowroomVisualizer from 'http://localhost:3000/web.js';
12
-
13
- ShowroomVisualizer.initVisualizer({
14
- apiHost: 'http://localhost:8084/vt360',
15
- webRotateHost: 'https://ci-webrotate360-client.clik.vn',
16
- config: {
17
- tourCode: "TOUR_KZCGAU2ZT7K7",
18
- language: 'VI',
19
- },
20
- onLoaded: (tool) => {
21
- window.tool = tool;
22
- },
23
- mobile: false,
24
- listeners: {
25
- onToggleFavorite: (productCode) =>
26
- console.log('productCode', productCode),
27
- },
28
- });
29
- </script>
30
- </head>
31
- <body>
32
- <div style="width: 100vw; height: 100vh; overflow: hidden">
33
- <showroom-visualizer></showroom-visualizer>
10
+ </head>
11
+ <body>
12
+ <div class="flex h-screen w-screen">
13
+ <!-- <div class="h-full" style="width: 72px"></div>-->
14
+ <div class="h-full" style="width: /*calc(100% - 462px);*/ 100%;">
15
+ <div class="h-full w-full relative">
16
+ <showroom-visualizer></showroom-visualizer>
17
+ </div>
34
18
  </div>
35
- </body>
36
- </html>
19
+ <!-- <div class="h-full" style="width: 390px"></div>-->
20
+ </div>
21
+ <script type="module">
22
+ // import ShowroomVisualizer from 'https://85f81d7dc992.ngrok-free.app/web.js';
23
+ import ShowroomVisualizer from 'http://localhost:3000/web.js';
24
+
25
+ ShowroomVisualizer.initVisualizer({
26
+ apiHost: 'https://api.clik.vn/vt360',
27
+ webRotateApiHost: 'https://api.clik.vn/cms',
28
+ webRotateClientHost: 'https://webrotate360-client.clik.vn',
29
+ config: {
30
+ language: 'VI',
31
+ // tourCode: 'TOUR_FXYCEN7ZZVW6',
32
+
33
+ // startScene: 'scene_kr3rgeezzvw6',
34
+ // hLookAt: -254,
35
+ // vLookAt: 1
36
+ // tourCode: 'TOUR_GEVEXLWNPT74',
37
+ // tourCode: 'TOUR_7YUL2ALGFL94',
38
+ // tourCode: 'TOUR_KUFGDEPDTJA4',
39
+ // hLookAt: 10,
40
+ // vLookAt: 28,
41
+ // startScene: 'SCENE_KNLRAKUHFL94',
42
+ // hLookAt: -54.11884505373274,
43
+ // vLookAt: -9.111287009391969
44
+
45
+ // tourCode: 'tour_7a6hchjljga4'.toUpperCase(),
46
+
47
+ // tourCode: 'TOUR_ZJMHKMJEACAH',
48
+ // startScene: 'SCENE_LVN4DLUFACAH',
49
+ // hLookAt: -179.145,
50
+ // vLookAt: 11.597,
51
+
52
+ // tourCode: 'tour_7yul2algfl94'.toUpperCase(),
53
+ // startScene: 'scene_vrz9v2uhfl94'.toUpperCase(),
54
+ // hLookAt: -87,
55
+ // vLookAt: 9,
56
+ // hotspot: 'item27getn2d2m94'.toUpperCase(),
57
+
58
+ tourCode: 'TOUR_ZJMHKMJEACAH',
59
+ startScene: 'scene_fkyyw9mznznh'.toUpperCase(),
60
+ },
61
+ listeners: {
62
+ onTourSwitchLoaded: (tool) => {
63
+ window.switchTour = tool.switchTour;
64
+ },
65
+ onSceneCompleted: (...args) => {
66
+ // console.log('onSceneCompleted', args);
67
+ },
68
+ onLoaded: tool => {
69
+ // console.log('TOOL_LOADED')
70
+ window.tool = tool;
71
+ },
72
+ onPoiClicked: (poi) => {
73
+ console.log('onPoiClicked', poi);
74
+ },
75
+ onPoiOut: () => {
76
+ // console.log('onPoiOut');
77
+ },
78
+ onPoiOver: (poi) => {
79
+ console.log('onPoiOver', poi);
80
+ },
81
+ onPoiInCenter: (poi) => {
82
+ // console.log('onPoiInCenter', poi);
83
+ },
84
+ onStartScenario: (code) => {
85
+ // console.log('onStartScenario', code);
86
+ },
87
+ onScenarioPaused: (code) => {
88
+ // console.log('onScenarioPaused', code);
89
+ },
90
+ onScenarioEnded: (code) => {
91
+ // console.log('onScenarioEnded', code);
92
+ },
93
+ onChanged: (args) => {
94
+ console.log('onChanged', args);
95
+ },
96
+ onStartLoadingTour: (code) => {
97
+ // console.log('onStartLoadingTour', code);
98
+ },
99
+ onFinishedLoadingTour: (code) => {
100
+ // console.log('onFinishedLoadingTour', code);
101
+ },
102
+ onStateChanged: (changes) => {
103
+ // console.log('changes', changes);
104
+ }
105
+ },
106
+ mobile: true
107
+ });
108
+ </script>
109
+ </body>
110
+ </html>