PluginProbe ʕ •ᴥ•ʔ
VK Blocks / 0.53.2
VK Blocks v0.53.2
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 / heading / deprecated / component.js
vk-blocks / src / blocks / heading / deprecated Last commit date
0.40.1 5 years ago block.js 5 years ago component.js 5 years ago component_0_39_5.js 5 years ago component_0_40_0.js 5 years ago heading-toolbar.js 5 years ago schema.js 6 years ago
component.js
344 lines
1 import { vkbBlockEditor } from "./../../_helper/depModules";
2 const { RichText } = vkbBlockEditor;
3 const { __ } = wp.i18n;
4 const { Component } = wp.element;
5
6 export class VKBHeading extends Component {
7 render() {
8 const {
9 level,
10 align,
11 title,
12 titleColor,
13 titleSize,
14 subText,
15 subTextFlag,
16 subTextColor,
17 subTextSize,
18 titleStyle,
19 titleMarginBottom,
20 outerMarginBottom
21 } = this.props.attributes;
22 const setAttributes = this.props.setAttributes;
23 const for_ = this.props.for_;
24
25 const containerClass = `vk_heading vk_heading-style-${titleStyle}`;
26 const tagName = "h" + level;
27 let cStyle;
28 let tStyle;
29
30 //containerのマージンを切り替え
31 if (outerMarginBottom != null) {
32 cStyle = { marginBottom: outerMarginBottom + `rem` };
33 }
34
35 //titleのマージンを切り替え
36 if (titleMarginBottom != null) {
37 tStyle = {
38 color: titleColor,
39 fontSize: titleSize + "rem",
40 marginBottom: titleMarginBottom + "rem",
41 textAlign: align
42 };
43 } else {
44 tStyle = {
45 color: titleColor,
46 fontSize: titleSize + "rem",
47 textAlign: align
48 };
49 }
50
51 if (for_ === "edit") {
52 return (
53 <div className={ containerClass } style={ cStyle }>
54 <RichText
55 tagName={ tagName }
56 value={ title }
57 onChange={ value => setAttributes({ title: value }) }
58 style={ tStyle }
59 className={ `vk_heading_title vk_heading_title-style-${titleStyle}` }
60 placeholder={ __("Input title…", "vk-blocks") }
61 />
62 { // サブテキスト
63 (() => {
64 if (subTextFlag === "on") {
65 return (
66 <RichText
67 tagName={ "p" }
68 value={ subText }
69 onChange={ value => setAttributes({ subText: value }) }
70 style={ {
71 color: subTextColor,
72 fontSize: subTextSize + "rem",
73 textAlign: align
74 } }
75 className={ `vk_heading_subtext vk_heading_subtext-style-${titleStyle}` }
76 placeholder={ __("Input sub text…", "vk-blocks") }
77 />
78 );
79 }
80 })() }
81 </div>
82 );
83 } else if (for_ === "save") {
84 return (
85 <div className={ containerClass } style={ cStyle }>
86 <RichText.Content
87 tagName={ tagName }
88 value={ title }
89 onChange={ value => setAttributes({ title: value }) }
90 style={ tStyle }
91 className={ `vk_heading_title vk_heading_title-style-${titleStyle}` }
92 placeholder={ __("Input title…", "vk-blocks") }
93 />
94 { // サブテキスト
95 (() => {
96 if (subTextFlag === "on") {
97 return (
98 <RichText.Content
99 tagName={ "p" }
100 value={ subText }
101 onChange={ value => setAttributes({ subText: value }) }
102 style={ {
103 color: subTextColor,
104 fontSize: subTextSize + "rem",
105 textAlign: align
106 } }
107 className={ `vk_heading_subtext vk_heading_subtext-style-${titleStyle}` }
108 placeholder={ __("Input sub text…", "vk-blocks") }
109 />
110 );
111 }
112 })() }
113 </div>
114 );
115 }
116 }
117 }
118
119 export class VKBHeading2 extends Component {
120 render() {
121 const {
122 level,
123 align,
124 title,
125 titleColor,
126 titleSize,
127 subText,
128 subTextFlag,
129 subTextColor,
130 subTextSize,
131 titleStyle,
132 titleMarginBottom,
133 outerMarginBottom
134 } = this.props.attributes;
135 const setAttributes = this.props.setAttributes;
136 const for_ = this.props.for_;
137
138 const containerClass = `vk_heading vk_heading-style-${titleStyle}`;
139 const tagName = "h" + level;
140 let cStyle;
141 let tStyle;
142
143 //containerのマージンを切り替え
144 if (outerMarginBottom != null) {
145 cStyle = { marginBottom: outerMarginBottom + `rem` };
146 }
147
148 //titleのマージンを切り替え
149 if (titleMarginBottom != null) {
150 tStyle = {
151 color: titleColor,
152 fontSize: titleSize + "rem",
153 marginBottom: titleMarginBottom + "rem",
154 textAlign: align
155 };
156 } else {
157 tStyle = {
158 color: titleColor,
159 fontSize: titleSize + "rem",
160 textAlign: align
161 };
162 }
163
164 if (for_ === "edit") {
165 return (
166 <div className={ containerClass } style={ cStyle }>
167 <RichText
168 tagName={ tagName }
169 value={ title }
170 onChange={ value => setAttributes({ title: value }) }
171 style={ tStyle }
172 className={ `vk_heading_title vk_heading_title-style-${titleStyle}` }
173 placeholder={ __("Input title…", "vk-blocks") }
174 />
175 { // サブテキスト
176 (() => {
177 if (subTextFlag === "on") {
178 return (
179 <RichText
180 tagName={ "p" }
181 value={ subText }
182 onChange={ value => setAttributes({ subText: value }) }
183 style={ {
184 color: subTextColor,
185 fontSize: subTextSize + "rem",
186 textAlign: align
187 } }
188 className={ `vk_heading_subtext vk_heading_subtext-style-${titleStyle}` }
189 placeholder={ __("Input sub text…", "vk-blocks") }
190 />
191 );
192 }
193 })() }
194 </div>
195 );
196 } else if (for_ === "save") {
197 return (
198 <div className={ containerClass } style={ cStyle }>
199 <RichText.Content
200 tagName={ tagName }
201 value={ title }
202 onChange={ value => setAttributes({ title: value }) }
203 style={ tStyle }
204 className={ `vk_heading_title vk_heading_title-style-${titleStyle}` }
205 placeholder={ __("Input title…", "vk-blocks") }
206 />
207 { // サブテキスト
208 (() => {
209 if (subTextFlag === "on") {
210 return (
211 <RichText.Content
212 tagName={ "p" }
213 value={ subText }
214 onChange={ value => setAttributes({ subText: value }) }
215 style={ {
216 color: subTextColor,
217 fontSize: subTextSize + "rem",
218 textAlign: align
219 } }
220 className={ `vk_heading_subtext vk_heading_subtext-style-${titleStyle}` }
221 placeholder={ __("Input sub text…", "vk-blocks") }
222 />
223 );
224 }
225 })() }
226 </div>
227 );
228 }
229 }
230 }
231
232 export class VKBHeadingV0_24_1 extends React.Component {
233 render() {
234 const {
235 level,
236 align,
237 title,
238 titleColor,
239 titleSize,
240 subText,
241 subTextFlag,
242 subTextColor,
243 subTextSize,
244 titleStyle,
245 titleMarginBottom,
246 outerMarginBottom
247 } = this.props.attributes;
248 const setAttributes = this.props.setAttributes;
249 const for_ = this.props.for_;
250
251 const containerClass = `vk_heading vk_heading-style-${titleStyle}`;
252 const tagName = "h" + level;
253 let cStyle;
254 let tStyle;
255
256 //containerのマージンを切り替え
257 if (outerMarginBottom !== null) {
258 cStyle = { marginBottom: outerMarginBottom + `rem` };
259 }
260
261 //titleのマージンを切り替え
262 if (titleMarginBottom != null) {
263 tStyle = {
264 color: titleColor,
265 fontSize: titleSize + "rem",
266 marginBottom: titleMarginBottom + "rem",
267 textAlign: align
268 };
269 } else {
270 tStyle = {
271 color: titleColor,
272 fontSize: titleSize + "rem",
273 textAlign: align
274 };
275 }
276
277 if (for_ === "edit") {
278 return (
279 <div className={ containerClass } style={ cStyle }>
280 <RichText
281 tagName={ tagName }
282 value={ title }
283 onChange={ value => setAttributes({ title: value }) }
284 style={ tStyle }
285 className={ `vk_heading_title vk_heading_title-style-${titleStyle}` }
286 placeholder={ __("Input title…", "vk-blocks") }
287 />
288 { // サブテキスト
289 (() => {
290 if (subTextFlag === "on") {
291 return (
292 <RichText
293 tagName={ "p" }
294 value={ subText }
295 onChange={ value => setAttributes({ subText: value }) }
296 style={ {
297 color: subTextColor,
298 fontSize: subTextSize + "rem",
299 textAlign: align
300 } }
301 className={ `vk_heading_subtext vk_heading_subtext-style-${titleStyle}` }
302 placeholder={ __("Input sub text…", "vk-blocks") }
303 />
304 );
305 }
306 })() }
307 </div>
308 );
309 } else if (for_ === "save") {
310 return (
311 <div className={ containerClass } style={ cStyle }>
312 <RichText.Content
313 tagName={ tagName }
314 value={ title }
315 onChange={ value => setAttributes({ title: value }) }
316 style={ tStyle }
317 className={ `vk_heading_title vk_heading_title-style-${titleStyle}` }
318 placeholder={ __("Input title…", "vk-blocks") }
319 />
320 { // サブテキスト
321 (() => {
322 if (subTextFlag === "on") {
323 return (
324 <RichText.Content
325 tagName={ "p" }
326 value={ subText }
327 onChange={ value => setAttributes({ subText: value }) }
328 style={ {
329 color: subTextColor,
330 fontSize: subTextSize + "rem",
331 textAlign: align
332 } }
333 className={ `vk_heading_subtext vk_heading_subtext-style-${titleStyle}` }
334 placeholder={ __("Input sub text…", "vk-blocks") }
335 />
336 );
337 }
338 })() }
339 </div>
340 );
341 }
342 }
343 }
344