PluginProbe ʕ •ᴥ•ʔ
VK Blocks / 1.124.0
VK Blocks v1.124.0
1.126.4 1.126.3 1.126.1 1.126.2 1.126.0 1.125.0 1.124.0 1.123.0 1.122.0 1.121.0 1.120.0 1.119.2 1.119.1 1.119.0 1.118.7 1.82.0.0 1.82.0.1 1.83.0.0 1.83.0.1 1.84.0.0 1.84.0.1 1.85.0.2 1.85.0.3 1.85.1.0 1.85.1.1 1.86.0.0 1.86.0.1 1.86.1.0 1.87.0.0 1.87.0.1 1.88.0.1 1.88.0.2 1.89.0.0 1.9.2 1.90.0.0 1.90.0.1 1.90.1.1 1.91.0.0 1.91.1.1 1.92.0.0 1.92.0.1 1.92.1.0 1.92.1.1 1.93.0.0 trunk 1.93.0.1 0.1.1 1.93.1.0 0.10.3 1.93.1.1 0.11.0 1.94.0.0 0.12.6 1.94.0.1 0.15.1 1.94.1.0 0.16.2 1.94.2.1 0.17.6 1.94.2.2 0.2.2 1.95.0.3 0.22.4 1.95.0.4 0.26.7 1.96.2.0 0.3.2 1.96.2.1 0.31.0 1.97.0.1 0.35.5 1.97.0.2 0.37.5 1.99.0.0 0.38.8 1.99.0.1 0.39.4 0.4.7 0.41.0 0.42.0 0.44.13 0.45.2 0.46.1 0.47.0 0.48.0 0.49.8 0.5.2 0.50.3 0.51.0 0.52.2 0.53.2 0.54.0 0.55.0 0.56.2 0.56.3 0.57.6 0.58.10 0.59.0 0.6.0 0.60.1 0.61.2 0.7.1 0.8.2 1.0.16 1.10.0 1.100.0.0 1.100.0.1 1.102.0.0 1.102.0.1 1.103.0.0 1.104.0.0 1.104.0.1 1.105.1.0 1.105.1.1 1.106.0.0 1.106.0.1 1.107.0.0 1.107.0.1 1.107.0.2 1.108.0.0 1.108.0.1 1.109.0.0 1.109.0.1 1.11.4 1.110.0.0 1.110.0.1 1.111.0.0 1.111.0.1 1.111.0.2 1.112.0.0 1.112.0.1 1.113.0.0 1.113.0.1 1.114.0.0 1.114.0.1 1.114.2.0 1.114.2.1 1.115.0.0 1.115.0.1 1.115.1.0 1.115.1.1 1.115.2.0 1.115.2.1 1.116.0.0 1.116.0.1 1.116.1.0 1.116.1.1 1.116.2.0 1.117.0.0 1.117.0.1 1.117.1.0 1.118.2 1.118.5 1.12.0 1.13.2 1.14.1 1.15.1 1.16.11 1.17.0 1.18.6 1.19.0 1.19.1 1.2.3 1.20.7 1.21.0 1.22.4 1.23.0 1.24.5 1.25.1 1.26.2 1.27.7.2 1.28.0.1 1.29.2.0 1.3.9 1.30.0.1 1.31.0.1 1.32.0.2 1.33.2.1 1.36.1.5 1.37.0.0 1.39.2.1 1.4.6 1.40.0.1 1.40.1.0 1.40.1.1 1.41.0.0 1.41.0.1 1.41.2.2 1.41.2.3 1.43.0.0 1.43.0.1 1.43.0.2 1.44.0.0 1.44.0.1 1.45.0.0 1.45.0.1 1.46.0.0 1.46.0.1 1.47.0.0 1.47.0.1 1.47.1.0 1.48.0.0 1.48.0.1 1.48.0.2 1.48.1.0 1.48.1.1 1.5.0 1.50.0.0 1.50.0.1 1.51.0.0 1.51.0.1 1.52.0.0 1.52.0.1 1.53.0.0 1.53.0.1 1.54.0.0 1.54.0.1 1.55.0.0 1.55.0.1 1.56.0.0 1.56.0.1 1.57.0.0 1.57.0.2 1.57.0.3 1.57.0.4 1.57.0.5 1.57.1.0 1.57.1.1 1.57.1.2 1.58.0.0 1.58.0.1 1.59.0.0 1.59.0.1 1.6.0 1.60.0.0 1.60.0.1 1.63.0.0 1.63.0.1 1.64.0.0 1.64.0.1 1.64.1.0 1.64.1.2 1.67.0.0 1.67.0.1 1.68.0.0 1.68.0.1 1.69.0.0 1.69.0.1 1.69.1.1 1.69.1.2 1.7.1 1.70.0.0 1.70.0.1 1.71.0.0 1.71.0.1 1.72.0.0 1.72.1.0 1.72.1.1 1.73.0.0 1.73.0.1 1.74.0.0 1.74.0.1 1.75.0.0 1.75.1.0 1.75.1.1 1.76.0.0 1.76.0.1 1.76.1.0 1.76.1.1 1.76.2.0 1.76.2.1 1.77.0.0 1.77.0.1 1.78.0.0 1.78.0.1 1.79.0.0 1.79.0.1 1.79.0.2 1.79.0.3 1.79.1.0 1.79.1.1 1.8.2 1.80.1.0 1.80.1.1 1.80.1.2 1.81.0.1 1.81.0.2
vk-blocks / src / blocks / slider / deprecated / save / index.js
vk-blocks / src / blocks / slider / deprecated / save Last commit date
1.0.16 3 months ago 1.10.0 3 months ago 1.105.0 3 months ago 1.110.1 3 months ago 1.115.0 3 months ago 1.121.1 2 months ago 1.13.1 3 months ago 1.2.1 3 months ago 1.33.2 3 months ago 1.34.1 3 months ago 1.48.1 3 months ago 1.51.0 3 months ago 1.80.1 3 months ago 1.9.1 3 months ago 1.9.2 3 months ago index.js 2 months ago
index.js
320 lines
1 /* eslint camelcase: 0 */
2 import save1_121_1 from './1.121.1/save';
3 import save1_115_0 from './1.115.0/save';
4 import save1_110_1 from './1.110.1/save';
5 import save1_105_0 from './1.105.0/save';
6 import save1_80_1 from './1.80.1/save';
7 import save1_51_0 from './1.51.0/save';
8 import save1_48_1 from './1.48.1/save';
9 import save1_34_1 from './1.34.1/save';
10 import save1_13_1 from './1.13.1/save';
11 import save1_10_0 from './1.10.0/save';
12 import save1_9_2 from './1.9.2/save';
13 import save1_9_1 from './1.9.1/save';
14 import save1_2_1 from './1.2.1/save';
15 import save1_0_16 from './1.0.16/save';
16
17 const blockAttributes = {
18 unit: {
19 type: 'string',
20 default: 'px',
21 },
22 pc: {
23 type: 'number',
24 default: 600,
25 },
26 tablet: {
27 type: 'number',
28 default: 600,
29 },
30 mobile: {
31 type: 'number',
32 default: 600,
33 },
34 autoPlay: {
35 type: 'boolean',
36 default: true,
37 },
38 autoPlayDelay: {
39 type: 'number',
40 default: 2500,
41 },
42 pagination: {
43 type: 'boolean',
44 default: true,
45 },
46 clientId: {
47 type: 'string',
48 default: '',
49 },
50 width: {
51 type: 'string',
52 default: '',
53 },
54 loop: {
55 type: 'boolean',
56 default: true,
57 },
58 effect: {
59 type: 'string',
60 default: 'slide',
61 },
62 speed: {
63 type: 'number',
64 default: 300,
65 },
66 };
67
68 const blockAttributes2 = {
69 ...blockAttributes,
70 slidesPerView: {
71 type: 'number',
72 default: 1
73 },
74 slidesPerGroup: {
75 type: 'number',
76 default: 1
77 }
78 }
79
80 const blockAttributes3 = {
81 ...blockAttributes2,
82 speed: {
83 type: 'number',
84 default: 500,
85 },
86 }
87
88 const blockAttributes4 = {
89 ...blockAttributes3,
90 autoPlayStop: {
91 type: 'boolean',
92 default: false
93 },
94 pagination: {
95 type: 'string',
96 default: 'bullets'
97 },
98 clientId: {
99 type: 'string',
100 }
101 }
102
103 /**
104 * 1.10.0 で高さのデフォルト値を変更
105 */
106 const blockAttributes5 = {
107 ...blockAttributes4,
108 pc: {
109 type: 'number'
110 },
111 tablet: {
112 type: 'number'
113 },
114 mobile: {
115 type: 'number'
116 },
117 }
118
119 /**
120 * 1.11.0 でナビゲーション設定を追加
121 */
122 const blockAttributes6 = {
123 ...blockAttributes5,
124 navigationPosition: {
125 type: 'string',
126 default: 'mobile-bottom'
127 }
128 }
129
130 /**
131 * 1.34.1 で blockID を追加
132 */
133 const blockAttributes7 = {
134 ...blockAttributes6,
135 blockId: {
136 type: 'string'
137 }
138 }
139
140 /**
141 * 1.48.1 で追加された値
142 */
143 const blockAttributes8 = {
144 ...blockAttributes7,
145 slidesPerViewMobile: {
146 type: 'number',
147 default: 1
148 },
149 slidesPerViewTablet: {
150 type: 'number',
151 default: 1
152 },
153 slidesPerViewPC: {
154 type: 'number',
155 default: 1
156 },
157 slidesPerGroup: {
158 type: 'string',
159 default: 'one-by-one'
160 },
161 }
162
163 // 1.51.0 時点から追加された値
164 const blockAttributes9 = {
165 ...blockAttributes8,
166 centeredSlides: {
167 type: 'boolean',
168 default: false
169 },
170 editorMode: {
171 type: 'string',
172 default: 'default'
173 },
174 }
175
176 // 1.80.1 時点からの変更点
177 const blockAttributes10 = {
178 ...blockAttributes9,
179 width: {
180 type: 'string'
181 },
182 }
183
184 const blockAttributes11 = {
185 ...blockAttributes10,
186 zoomAnimation: {
187 type: 'boolean',
188 default: false
189 },
190 zoomInitialScale: {
191 type: 'number',
192 default: 1
193 },
194 zoomFinalScale: {
195 type: 'number',
196 default: 1.25
197 },
198 }
199
200 // 1.110.1 時点からの変更点(direction属性を追加)
201 const blockAttributes12 = {
202 ...blockAttributes11,
203 direction: {
204 type: 'string',
205 default: 'rtl'
206 },
207 }
208
209 // zoomFinalScale が zoomFinalScal として保存されていた後方互換
210 // blockAttributes11 から zoomFinalScale を除外し、typo版の zoomFinalScal のみにする
211 const { zoomFinalScale: _removed, ...blockAttributes11WithoutZoomFinalScale } = blockAttributes11;
212 const blockAttributes12Typo = {
213 ...blockAttributes11WithoutZoomFinalScale,
214 zoomFinalScal: {
215 type: 'number',
216 default: 1.25
217 },
218 direction: {
219 type: 'string',
220 default: 'rtl'
221 },
222 }
223
224 // 1.121.1 以降のスキーマ変更(pauseButton 属性の追加・autoPlayStop の既定値を false→true に変更)は
225 // 最新スキーマとして block.json が保持しているため、ここに blockAttributes13 は定義しない。
226 // 直前バージョンまでの保存形式(pauseButton なし/autoPlayStop 既定 false)は
227 // blockAttributes12 を使う下記 deprecated エントリで救済する。
228
229 const migrateZoomFinalScaleTypo = (attributes) => {
230 // Backward compatibility: handle typo in old attribute name.
231 if (
232 attributes.zoomFinalScale === undefined &&
233 attributes.zoomFinalScal !== undefined
234 ) {
235 const { zoomFinalScal, ...rest } = attributes;
236 return {
237 ...rest,
238 zoomFinalScale: zoomFinalScal,
239 };
240 }
241 return attributes;
242 };
243
244 const deprecated = [
245 // pauseButton 属性追加・autoPlayStop の既定値を false→true に変更する前
246 // (= 1.121.1 までの保存形式: pauseButton なし/autoPlayStop 既定 false)を救済する。
247 {
248 attributes: blockAttributes12,
249 save: save1_121_1,
250 },
251 {
252 attributes: blockAttributes12Typo,
253 save: save1_115_0,
254 migrate: migrateZoomFinalScaleTypo,
255 },
256 {
257 attributes: blockAttributes12Typo,
258 save: save1_110_1,
259 migrate: migrateZoomFinalScaleTypo,
260 },
261 {
262 attributes: blockAttributes12,
263 save: save1_115_0,
264 },
265 {
266 attributes: blockAttributes12,
267 save: save1_110_1,
268 },
269 {
270 attributes: blockAttributes11,
271 save: save1_110_1,
272 },
273 {
274 attributes: blockAttributes10,
275 save: save1_105_0,
276 },
277 {
278 attributes: blockAttributes9,
279 save: save1_80_1,
280 },
281 {
282 attributes: blockAttributes8,
283 save: save1_51_0,
284 },
285 {
286 attributes: blockAttributes7,
287 save: save1_48_1,
288 },
289 {
290 attributes: blockAttributes6,
291 save: save1_34_1,
292 },
293 {
294 attributes: blockAttributes6,
295 save: save1_13_1,
296 },
297 {
298 attributes: blockAttributes5,
299 save: save1_10_0,
300 },
301 {
302 attributes: blockAttributes4,
303 save: save1_9_2,
304 },
305 {
306 attributes: blockAttributes3,
307 save: save1_9_1,
308 },
309 {
310 attributes: blockAttributes2,
311 save: save1_2_1,
312 },
313 {
314 attributes: blockAttributes,
315 save: save1_0_16,
316 },
317 ];
318
319 export default deprecated;
320