js-cloudimage-360-view 3.0.3 → 3.1.0

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 (93) hide show
  1. package/.env +3 -0
  2. package/CHANGELOG.md +167 -156
  3. package/LICENSE +27 -33
  4. package/README.md +820 -806
  5. package/bin/deploy-bundle.js +63 -0
  6. package/dist/ci360.service.js +65 -245
  7. package/dist/ci360.utils.js +2 -14
  8. package/dist/constants/index.js +0 -4
  9. package/dist/constants/props-require-reload.js +24 -12
  10. package/dist/index.js +0 -27
  11. package/dist/static/css/hotspots.css +221 -221
  12. package/dist/static/css/style.css +229 -229
  13. package/dist/utils/auto-play/get-speed-factor.js +0 -2
  14. package/dist/utils/auto-play/is-completed-one-cycle.js +0 -5
  15. package/dist/utils/auto-play/loop.js +3 -14
  16. package/dist/utils/class-names/add-class.js +0 -3
  17. package/dist/utils/class-names/remove-class.js +0 -2
  18. package/dist/utils/container-elements/apply-styles-to-container.js +0 -2
  19. package/dist/utils/container-elements/create-360-view-circle-icon.js +0 -2
  20. package/dist/utils/container-elements/create-360-view-icon.js +0 -2
  21. package/dist/utils/container-elements/create-box-shadow.js +0 -2
  22. package/dist/utils/container-elements/create-canvas.js +0 -2
  23. package/dist/utils/container-elements/create-close-fullscreen-icon.js +0 -2
  24. package/dist/utils/container-elements/create-fullscreen-icon.js +0 -2
  25. package/dist/utils/container-elements/create-fullscreen-modal.js +0 -2
  26. package/dist/utils/container-elements/create-icons-container.js +0 -2
  27. package/dist/utils/container-elements/create-inner-box.js +0 -2
  28. package/dist/utils/container-elements/create-loader.js +0 -2
  29. package/dist/utils/container-elements/create-magnifier-icon.js +0 -2
  30. package/dist/utils/container-elements/index.js +0 -13
  31. package/dist/utils/container-elements/remove-child-from-parent.js +0 -2
  32. package/dist/utils/controls/get-item-skipped.js +0 -2
  33. package/dist/utils/controls/init-controls.js +7 -16
  34. package/dist/utils/hotspots/attach-events/hide-popup.js +0 -2
  35. package/dist/utils/hotspots/attach-events/show-popup.js +0 -2
  36. package/dist/utils/hotspots/configs-error-handler.js +6 -10
  37. package/dist/utils/hotspots/create-popper-instace.js +1 -4
  38. package/dist/utils/hotspots/elements/create-carousel-dot.js +0 -6
  39. package/dist/utils/hotspots/elements/create-carousel-image.js +0 -4
  40. package/dist/utils/hotspots/elements/create-hotspot-icon.js +3 -14
  41. package/dist/utils/hotspots/elements/create-hotspot-popup-link.js +2 -6
  42. package/dist/utils/hotspots/elements/create-hotspots.js +0 -5
  43. package/dist/utils/hotspots/elements/create-images-carousel.js +0 -4
  44. package/dist/utils/hotspots/elements/create-modal-description.js +0 -2
  45. package/dist/utils/hotspots/elements/create-modal-title.js +0 -2
  46. package/dist/utils/hotspots/elements/create-model-elements.js +8 -25
  47. package/dist/utils/hotspots/elements/create-popup-arrow.js +0 -2
  48. package/dist/utils/hotspots/elements/create-popup.js +6 -18
  49. package/dist/utils/hotspots/elements/create-read-more-btn.js +0 -2
  50. package/dist/utils/hotspots/fill-empty-coord-with-previous.js +1 -6
  51. package/dist/utils/hotspots/generate-hotspots-configs.js +11 -21
  52. package/dist/utils/hotspots/generate-popup-config.js +9 -11
  53. package/dist/utils/hotspots/get-hotspot-icon.js +0 -2
  54. package/dist/utils/hotspots/get-hotspot-orientation.js +0 -4
  55. package/dist/utils/hotspots/get-hotspot-popup-node.js +0 -2
  56. package/dist/utils/hotspots/get-popup-node.js +0 -2
  57. package/dist/utils/hotspots/hide-hotspot-icon.js +0 -2
  58. package/dist/utils/hotspots/hide-hotspots-icons.js +0 -3
  59. package/dist/utils/hotspots/is-mouse-on-hotspot.js +0 -2
  60. package/dist/utils/hotspots/prepare-hotspots-positions.js +0 -6
  61. package/dist/utils/hotspots/set-current-slide.js +0 -2
  62. package/dist/utils/hotspots/toggle-popup-events.js +0 -4
  63. package/dist/utils/hotspots/update-hotspot-icon-position.js +0 -2
  64. package/dist/utils/hotspots/update-hotspots.js +6 -14
  65. package/dist/utils/image-src/generate-images-path.js +8 -17
  66. package/dist/utils/image-src/is-props-change-require-reload.js +0 -5
  67. package/dist/utils/index.js +0 -26
  68. package/dist/utils/load-images/images-from-folder/prepare-images-from-folder.js +2 -11
  69. package/dist/utils/load-images/images-from-list/prepare-images-from-list.js +0 -8
  70. package/dist/utils/load-images/lazyload/init-lazyload.js +3 -11
  71. package/dist/utils/load-images/lazyload/prepare-first-image/prepare-first-image-from-folder.js +1 -5
  72. package/dist/utils/load-images/lazyload/prepare-first-image/prepare-first-image-from-list.js +0 -9
  73. package/dist/utils/load-images/load-image-as-promise.js +8 -46
  74. package/dist/utils/load-images/load-images-relative-to-container-size.js +10 -49
  75. package/dist/utils/load-images/load-original-images.js +23 -37
  76. package/dist/utils/load-images/pad.js +0 -2
  77. package/dist/utils/load-images/preload-images.js +2 -9
  78. package/dist/utils/load-images/preload-original-images.js +2 -9
  79. package/dist/utils/magnify/get-current-original-image.js +0 -6
  80. package/dist/utils/magnify/get-cursor-position.js +0 -2
  81. package/dist/utils/magnify/magnify.js +4 -11
  82. package/dist/utils/magnify/move-magnifier.js +6 -14
  83. package/dist/utils/responsive/contain.js +0 -2
  84. package/dist/utils/responsive/fit.js +0 -4
  85. package/dist/utils/responsive/get-image-aspect-ratio.js +0 -8
  86. package/dist/utils/responsive/get-responsive-width-of-container.js +0 -3
  87. package/dist/utils/responsive/get-size-according-to-pixel-ratio.js +0 -2
  88. package/dist/utils/responsive/get-size-limit.js +0 -2
  89. package/dist/utils/spin-y/get-moving-direction.js +0 -3
  90. package/dist/utils/zoom/generate-zoom-in-steps.js +0 -2
  91. package/dist/utils/zoom/generate-zoom-out-steps.js +0 -2
  92. package/package.json +67 -62
  93. package/yarn-error.log +101 -0
package/.env ADDED
@@ -0,0 +1,3 @@
1
+ BUNDLE_PLUGINS_CONTAINER=scaleflex
2
+ BUNDLE_UPLOAD_SECURITY_TEMPLATE_ID=SECU_083E16FC6CD549C4A172E9CC561740CF
3
+ BUNDLE_FOLDER=plugins/js-cloudimage-360-view
package/CHANGELOG.md CHANGED
@@ -1,156 +1,167 @@
1
- # Changelog
2
- All notable changes to this project will be documented in this file.
3
-
4
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
-
7
- Types of changes:
8
- - `Added` for new features.
9
- - `Changed` for changes in existing functionality.
10
- - `Deprecated` for soon-to-be removed features.
11
- - `Removed` for now removed features.
12
- - `Fixed` for any bug fixes.
13
- - `Security` in case of vulnerabilities.
14
-
15
- > Date format: YYYY-MM-DD
16
-
17
- > If we have some "Breaking changes" we can mark it in message by `**BREAKING**` preffix, like:
18
- > `- **BREAKING**: Some message`
19
-
20
- -------------
21
-
22
- ## TODOs
23
- > Todo list for future
24
-
25
- - ...
26
-
27
- -------------
28
- ## 3.0.3 - 2022-05-04
29
- ### Fixed
30
- - Error on loading original images from image list
31
-
32
- ## 3.0.2 - 2022-05-04
33
- ### Changed
34
- - documentation
35
-
36
- ## 3.0.1 - 2022-03-28
37
- ### Changed
38
- - hotspots icons
39
-
40
- ### Fixed
41
- - loader is hidden if hide-360-logo is active
42
-
43
- ## 3.0.0 - 2022-03-25
44
- ### Added
45
- - possibility to add makers or hotspots to each image
46
- - possibility add views after init the plugin
47
- - possibility to update views
48
- ### Fixed
49
- - hide 360 logo after play once
50
-
51
- ## 2.7.12 - 2022-03-19
52
- ### Changed
53
- - hotspots init method
54
-
55
- ## 2.7.11 - 2022-03-17
56
- ### Fixed
57
- - canvas aspect ratio
58
- - initialization of lazyloading
59
-
60
- ## 2.7.10 - 2022-03-01
61
- ### Fixed
62
- - image quality in fullscreen
63
- - resized image loading
64
-
65
- ## 2.7.9 - 2022-02-27
66
- ### Fixed
67
- - typo in documentation
68
-
69
- ## 2.7.8 - 2022-02-27
70
- ### Added
71
- - possibility to add new view to CI360 views
72
- ### Fixed
73
- - re-render method
74
-
75
- ## 2.7.7 - 2022-02-24
76
- ### Fixed
77
- - container width on mobile
78
- - re-render method
79
-
80
- ## 2.7.6 - 2022-02-20
81
- ### Fixed
82
- - drag speed
83
- - responsive canvas width and height
84
-
85
- ## 2.7.5 - 2022-02-08
86
- ### Added
87
- - update method to re-render or re-init the plugin
88
- ### Fixed
89
- - drag speed on mobile
90
- - error when drag speed is too high
91
- - error in dependencies
92
-
93
- ## 2.7.4 - 2022-01-26
94
- ### Fixed
95
- - typo in documentation file
96
- ## 2.7.3 - 2022-01-26
97
- ### Fixed
98
- - typo in documentation file
99
-
100
- ## 2.7.2 - 2022-01-26
101
- ### Added
102
- - possibility to fit container relative to its width or height and maintain the aspect ratio
103
- - possibility to reverse the directions of the keys on the keyboard
104
- ### Fixed
105
- - pointer zoom behavior
106
- - error while loading images from lists
107
- - get the active image index
108
-
109
- ## 2.7.1 - 2021-11-06
110
- ### Added
111
- - click to reset mouse zoom
112
- - show 360 logo after play once
113
- ### Fixed
114
- - set click as default value to start zoom
115
- - Sass error
116
- ### Changed
117
- - pointer zoom behavior
118
-
119
- ## 2.7.0 - 2021-11-04
120
- ### Added
121
- - play once then stop auto-play
122
- - spin in the y-direction
123
- - zoom with mouse wheel
124
- - zoom with fingers on mobile
125
- - possibility to change icons styles
126
-
127
- ### Fixed
128
- - hide scrollbar in fullscreen mode
129
- - auto-play not working on mobile
130
- - error on init the plugin inside a modal
131
- - removed chrome warning about non-passive events
132
- - images are not resized when window size changes
133
-
134
- ### Changed
135
- - migrate CDN URL to V7
136
-
137
- ## 2.6.0 - 2020-09-03
138
-
139
- ### Feat
140
- - add ability to specify custom 360 view logo
141
-
142
- ## 2.5.0 - 2020-07-05
143
-
144
- ### Feat
145
- - possibility to hide 360 view icon
146
-
147
- ## 2.4.1 - 2020-04-11
148
-
149
- ### Fixed
150
- - initialize first image using data-image-list #33
151
-
152
-
153
- ## 2.4.0 - 2020-04-09
154
-
155
- ### Fixed
156
- - problem with first preview image is random #28, #29
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ Types of changes:
8
+ - `Added` for new features.
9
+ - `Changed` for changes in existing functionality.
10
+ - `Deprecated` for soon-to-be removed features.
11
+ - `Removed` for now removed features.
12
+ - `Fixed` for any bug fixes.
13
+ - `Security` in case of vulnerabilities.
14
+
15
+ > Date format: YYYY-MM-DD
16
+
17
+ > If we have some "Breaking changes" we can mark it in message by `**BREAKING**` preffix, like:
18
+ > `- **BREAKING**: Some message`
19
+
20
+ -------------
21
+
22
+ ## TODOs
23
+ > Todo list for future
24
+
25
+ - ...
26
+
27
+ -------------
28
+ ## 3.1.0 - 2023-04-10
29
+ ### Added
30
+ - possibility to enable/disable the request of new image on resize using `data-request-responsive-images`
31
+
32
+ ### Fixed
33
+ - Page scroll, even spin-y is not active
34
+
35
+ ## 3.0.4 - 2022-10-19
36
+ ### Fixed
37
+ - Hotspot icons width
38
+
39
+ ## 3.0.3 - 2022-05-04
40
+ ### Fixed
41
+ - Error on loading original images from image list
42
+
43
+ ## 3.0.2 - 2022-05-04
44
+ ### Changed
45
+ - documentation
46
+
47
+ ## 3.0.1 - 2022-03-28
48
+ ### Changed
49
+ - hotspots icons
50
+
51
+ ### Fixed
52
+ - loader is hidden if hide-360-logo is active
53
+
54
+ ## 3.0.0 - 2022-03-25
55
+ ### Added
56
+ - possibility to add makers or hotspots to each image
57
+ - possibility add views after init the plugin
58
+ - possibility to update views
59
+ ### Fixed
60
+ - hide 360 logo after play once
61
+
62
+ ## 2.7.12 - 2022-03-19
63
+ ### Changed
64
+ - hotspots init method
65
+
66
+ ## 2.7.11 - 2022-03-17
67
+ ### Fixed
68
+ - canvas aspect ratio
69
+ - initialization of lazyloading
70
+
71
+ ## 2.7.10 - 2022-03-01
72
+ ### Fixed
73
+ - image quality in fullscreen
74
+ - resized image loading
75
+
76
+ ## 2.7.9 - 2022-02-27
77
+ ### Fixed
78
+ - typo in documentation
79
+
80
+ ## 2.7.8 - 2022-02-27
81
+ ### Added
82
+ - possibility to add new view to CI360 views
83
+ ### Fixed
84
+ - re-render method
85
+
86
+ ## 2.7.7 - 2022-02-24
87
+ ### Fixed
88
+ - container width on mobile
89
+ - re-render method
90
+
91
+ ## 2.7.6 - 2022-02-20
92
+ ### Fixed
93
+ - drag speed
94
+ - responsive canvas width and height
95
+
96
+ ## 2.7.5 - 2022-02-08
97
+ ### Added
98
+ - update method to re-render or re-init the plugin
99
+ ### Fixed
100
+ - drag speed on mobile
101
+ - error when drag speed is too high
102
+ - error in dependencies
103
+
104
+ ## 2.7.4 - 2022-01-26
105
+ ### Fixed
106
+ - typo in documentation file
107
+ ## 2.7.3 - 2022-01-26
108
+ ### Fixed
109
+ - typo in documentation file
110
+
111
+ ## 2.7.2 - 2022-01-26
112
+ ### Added
113
+ - possibility to fit container relative to its width or height and maintain the aspect ratio
114
+ - possibility to reverse the directions of the keys on the keyboard
115
+ ### Fixed
116
+ - pointer zoom behavior
117
+ - error while loading images from lists
118
+ - get the active image index
119
+
120
+ ## 2.7.1 - 2021-11-06
121
+ ### Added
122
+ - click to reset mouse zoom
123
+ - show 360 logo after play once
124
+ ### Fixed
125
+ - set click as default value to start zoom
126
+ - Sass error
127
+ ### Changed
128
+ - pointer zoom behavior
129
+
130
+ ## 2.7.0 - 2021-11-04
131
+ ### Added
132
+ - play once then stop auto-play
133
+ - spin in the y-direction
134
+ - zoom with mouse wheel
135
+ - zoom with fingers on mobile
136
+ - possibility to change icons styles
137
+
138
+ ### Fixed
139
+ - hide scrollbar in fullscreen mode
140
+ - auto-play not working on mobile
141
+ - error on init the plugin inside a modal
142
+ - removed chrome warning about non-passive events
143
+ - images are not resized when window size changes
144
+
145
+ ### Changed
146
+ - migrate CDN URL to V7
147
+
148
+ ## 2.6.0 - 2020-09-03
149
+
150
+ ### Feat
151
+ - add ability to specify custom 360 view logo
152
+
153
+ ## 2.5.0 - 2020-07-05
154
+
155
+ ### Feat
156
+ - possibility to hide 360 view icon
157
+
158
+ ## 2.4.1 - 2020-04-11
159
+
160
+ ### Fixed
161
+ - initialize first image using data-image-list #33
162
+
163
+
164
+ ## 2.4.0 - 2020-04-09
165
+
166
+ ### Fixed
167
+ - problem with first preview image is random #28, #29
package/LICENSE CHANGED
@@ -1,33 +1,27 @@
1
- MIT License
2
-
3
- Copyright (c) 2022 SCALEFLEX SAS
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
22
-
23
- ---------------------------------------------------------------------------------
24
-
25
- Publicity
26
-
27
- You agree that Scaleflex may reference and use Your name, logos and trademarks in Scaleflex
28
- marketing and promotional materials, including, but not limited to the Scaleflex Websites, solely for
29
- purposes of identifying You as a customer of Scaleflex. Otherwise, neither party may use the trade
30
- names, trademarks, service marks, or logos of the other party without the express written consent of
31
- the other party.
32
-
33
-
1
+ MIT License
2
+
3
+ Copyright (c) 2022 SCALEFLEX SAS
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17
+ SOFTWARE.
18
+
19
+ ---------------------------------------------------------------------------------
20
+
21
+ Publicity
22
+
23
+ You agree that Scaleflex may reference and use Your name, logos and trademarks in Scaleflex
24
+ marketing and promotional materials, including, but not limited to the Scaleflex Websites, solely for
25
+ purposes of identifying You as a customer of Scaleflex. Otherwise, neither party may use the trade
26
+ names, trademarks, service marks, or logos of the other party without the express written consent of
27
+ the other party.