@total_onion/onion-library 1.0.60 → 1.0.62
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.
- package/components/block-block-interactions-v3/block-interactions-v3.js +14 -5
- package/components/block-block-interactions-v3/block-interactions-v3.twig +3 -1
- package/components/block-block-interactions-v3/group_687e1575ba23d.json +146 -2
- package/components/block-form-selection-v3/form-selection-v3.js +13 -15
- package/components/block-form-selection-v3/form-selection-v3.scss +3 -3
- package/components/block-form-selection-v3/form-selection-v3.twig +6 -1
- package/components/block-form-selection-v3/group_68752e7949e53.json +33 -3
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export default function blockinteractionsv3Js(options = {}) {
|
|
2
2
|
try {
|
|
3
3
|
const { block } = options;
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
const blockId = block.dataset.blockid;
|
|
6
6
|
const parentBlockId = block.dataset.parentblockid;
|
|
7
7
|
|
|
@@ -14,14 +14,23 @@ export default function blockinteractionsv3Js(options = {}) {
|
|
|
14
14
|
const shouldStoreCookie = button?.dataset?.storeCookie === 'true';
|
|
15
15
|
const cookieKey = `blockClosed_${parentBlockId}`;
|
|
16
16
|
const wrappingSection = document.querySelector(`[data-blockid="${parentBlockId}"]`);
|
|
17
|
-
|
|
17
|
+
|
|
18
18
|
if (getCookie(cookieKey) === 'true') {
|
|
19
|
-
wrappingSection.
|
|
19
|
+
wrappingSection.style.animation = 'none';
|
|
20
|
+
wrappingSection.style.display = 'none';
|
|
20
21
|
return;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
|
-
button.addEventListener('click', () => {
|
|
24
|
-
|
|
24
|
+
button.addEventListener('click', (e) => {
|
|
25
|
+
console.log(e.currentTarget.dataset);
|
|
26
|
+
wrappingSection.style.animation = 'none';
|
|
27
|
+
wrappingSection.offsetHeight; // trigger reflow
|
|
28
|
+
wrappingSection.style.animation = `${e.currentTarget.dataset.animationname} ${e.currentTarget.dataset.animationduration}s forwards reverse`;
|
|
29
|
+
|
|
30
|
+
setTimeout(() => {
|
|
31
|
+
wrappingSection.style.display = 'none';
|
|
32
|
+
}, e.currentTarget.dataset.animationduration * 1000);
|
|
33
|
+
|
|
25
34
|
if (shouldStoreCookie) {
|
|
26
35
|
setCookie(cookieKey, 'true', 7);
|
|
27
36
|
}
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
{% set blockInteractionsEnabled = fields.enable_block_interactions %}
|
|
17
17
|
{% set enableInteractionsButton = fields.enable_interactions_button %}
|
|
18
18
|
{% set interactionsButtonType = fields.interactions_button_type %}
|
|
19
|
+
{% set animationName = fields.animation_name|ru %}
|
|
20
|
+
{% set animationDuration = fields.animation_duration|ru %}
|
|
19
21
|
|
|
20
22
|
{% if blockInteractionsEnabled %}
|
|
21
23
|
|
|
@@ -25,7 +27,7 @@
|
|
|
25
27
|
{% set closeButtonIcon = get_image(fields.upload_close_icon) %}
|
|
26
28
|
{% set closeButtonCookie = fields.enable_closed_cookie %}
|
|
27
29
|
|
|
28
|
-
<button class="block-interactions-v3__block-close-button" data-store-cookie="{{closeButtonCookie ? 'true' : 'false' }}">
|
|
30
|
+
<button class="block-interactions-v3__block-close-button" data-animationname="{{animationName}}" data-animationduration="{{animationDuration}}" data-store-cookie="{{closeButtonCookie ? 'true' : 'false' }}">
|
|
29
31
|
<img class="block-interactions-v3__block-close-button-icon" src="{{closeButtonIcon.src}}">
|
|
30
32
|
</button>
|
|
31
33
|
{% endif %}
|
|
@@ -160,7 +160,9 @@
|
|
|
160
160
|
"allow_null": 0,
|
|
161
161
|
"ui": 0,
|
|
162
162
|
"ajax": 0,
|
|
163
|
-
"min": ""
|
|
163
|
+
"min": "",
|
|
164
|
+
"create_options": 0,
|
|
165
|
+
"save_options": 0
|
|
164
166
|
},
|
|
165
167
|
{
|
|
166
168
|
"key": "field_687e40dc485e6",
|
|
@@ -229,6 +231,148 @@
|
|
|
229
231
|
"ui": 1,
|
|
230
232
|
"style": ""
|
|
231
233
|
},
|
|
234
|
+
{
|
|
235
|
+
"key": "field_687f8a348086a",
|
|
236
|
+
"label": "Enable Animations",
|
|
237
|
+
"name": "enable_animations",
|
|
238
|
+
"aria-label": "",
|
|
239
|
+
"type": "true_false",
|
|
240
|
+
"instructions": "",
|
|
241
|
+
"required": 0,
|
|
242
|
+
"conditional_logic": [
|
|
243
|
+
[
|
|
244
|
+
{
|
|
245
|
+
"field": "field_687e4099485e5",
|
|
246
|
+
"operator": "==",
|
|
247
|
+
"value": "__close-block"
|
|
248
|
+
}
|
|
249
|
+
]
|
|
250
|
+
],
|
|
251
|
+
"wrapper": {
|
|
252
|
+
"width": "",
|
|
253
|
+
"class": "",
|
|
254
|
+
"id": ""
|
|
255
|
+
},
|
|
256
|
+
"wpml_cf_preferences": 1,
|
|
257
|
+
"message": "",
|
|
258
|
+
"default_value": 0,
|
|
259
|
+
"allow_in_bindings": 1,
|
|
260
|
+
"ui_on_text": "",
|
|
261
|
+
"ui_off_text": "",
|
|
262
|
+
"ui": 1,
|
|
263
|
+
"style": ""
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"key": "field_687f8a5c8086b",
|
|
267
|
+
"label": "Close Animations",
|
|
268
|
+
"name": "",
|
|
269
|
+
"aria-label": "",
|
|
270
|
+
"type": "tab",
|
|
271
|
+
"instructions": "",
|
|
272
|
+
"required": 0,
|
|
273
|
+
"conditional_logic": [
|
|
274
|
+
[
|
|
275
|
+
{
|
|
276
|
+
"field": "field_687f8a348086a",
|
|
277
|
+
"operator": "==",
|
|
278
|
+
"value": "1"
|
|
279
|
+
}
|
|
280
|
+
]
|
|
281
|
+
],
|
|
282
|
+
"wrapper": {
|
|
283
|
+
"width": "",
|
|
284
|
+
"class": "",
|
|
285
|
+
"id": ""
|
|
286
|
+
},
|
|
287
|
+
"wpml_cf_preferences": 1,
|
|
288
|
+
"placement": "top",
|
|
289
|
+
"endpoint": 0,
|
|
290
|
+
"no_preference": 0,
|
|
291
|
+
"selected": 0
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"key": "field_687f8ed3e0c7c",
|
|
295
|
+
"label": "Close Animation Message",
|
|
296
|
+
"name": "",
|
|
297
|
+
"aria-label": "",
|
|
298
|
+
"type": "message",
|
|
299
|
+
"instructions": "",
|
|
300
|
+
"required": 0,
|
|
301
|
+
"conditional_logic": [
|
|
302
|
+
[
|
|
303
|
+
{
|
|
304
|
+
"field": "field_687f8a348086a",
|
|
305
|
+
"operator": "==",
|
|
306
|
+
"value": "1"
|
|
307
|
+
}
|
|
308
|
+
]
|
|
309
|
+
],
|
|
310
|
+
"wrapper": {
|
|
311
|
+
"width": "",
|
|
312
|
+
"class": "",
|
|
313
|
+
"id": ""
|
|
314
|
+
},
|
|
315
|
+
"wpml_cf_preferences": 2,
|
|
316
|
+
"message": "In the parent block, you need to set your fade in animation, what ever that animation name is you need to pop that in here also, and it will play in reverse when the button is clicked",
|
|
317
|
+
"new_lines": "wpautop",
|
|
318
|
+
"esc_html": 0
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"key": "field_687f8b348086c",
|
|
322
|
+
"label": "name",
|
|
323
|
+
"name": "name",
|
|
324
|
+
"aria-label": "",
|
|
325
|
+
"type": "clone",
|
|
326
|
+
"instructions": "",
|
|
327
|
+
"required": 0,
|
|
328
|
+
"conditional_logic": 0,
|
|
329
|
+
"wrapper": {
|
|
330
|
+
"width": "",
|
|
331
|
+
"class": "",
|
|
332
|
+
"id": ""
|
|
333
|
+
},
|
|
334
|
+
"wpml_cf_preferences": 1,
|
|
335
|
+
"clone": [
|
|
336
|
+
"field_659e9ca0d24cc"
|
|
337
|
+
],
|
|
338
|
+
"display": "seamless",
|
|
339
|
+
"layout": "block",
|
|
340
|
+
"prefix_label": 0,
|
|
341
|
+
"prefix_name": 0,
|
|
342
|
+
"acfe_seamless_style": 0,
|
|
343
|
+
"acfe_clone_modal": 0,
|
|
344
|
+
"acfe_clone_modal_close": 0,
|
|
345
|
+
"acfe_clone_modal_button": "",
|
|
346
|
+
"acfe_clone_modal_size": "large"
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"key": "field_687f912e94fbc",
|
|
350
|
+
"label": "Duration",
|
|
351
|
+
"name": "duration",
|
|
352
|
+
"aria-label": "",
|
|
353
|
+
"type": "clone",
|
|
354
|
+
"instructions": "",
|
|
355
|
+
"required": 0,
|
|
356
|
+
"conditional_logic": 0,
|
|
357
|
+
"wrapper": {
|
|
358
|
+
"width": "",
|
|
359
|
+
"class": "",
|
|
360
|
+
"id": ""
|
|
361
|
+
},
|
|
362
|
+
"wpml_cf_preferences": 1,
|
|
363
|
+
"clone": [
|
|
364
|
+
"field_65ac30dc321c0"
|
|
365
|
+
],
|
|
366
|
+
"display": "seamless",
|
|
367
|
+
"layout": "block",
|
|
368
|
+
"prefix_label": 0,
|
|
369
|
+
"prefix_name": 0,
|
|
370
|
+
"acfe_seamless_style": 0,
|
|
371
|
+
"acfe_clone_modal": 0,
|
|
372
|
+
"acfe_clone_modal_close": 0,
|
|
373
|
+
"acfe_clone_modal_button": "",
|
|
374
|
+
"acfe_clone_modal_size": "large"
|
|
375
|
+
},
|
|
232
376
|
{
|
|
233
377
|
"key": "field_687e48d871084",
|
|
234
378
|
"label": "Block Padding",
|
|
@@ -390,5 +534,5 @@
|
|
|
390
534
|
"acfe_display_title": "",
|
|
391
535
|
"acfe_meta": "",
|
|
392
536
|
"acfe_note": "",
|
|
393
|
-
"modified":
|
|
537
|
+
"modified": 1753190749
|
|
394
538
|
}
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
export default function formselectionv3Js(options = {}) {
|
|
1
|
+
export default function formselectionv3Js ( options = {} ) {
|
|
2
2
|
try {
|
|
3
|
-
const {block} = options;
|
|
3
|
+
const { block } = options;
|
|
4
4
|
|
|
5
5
|
// modal logic
|
|
6
|
-
const formContainer = block.querySelector(
|
|
7
|
-
'.form-selection-v3__container-modal'
|
|
8
|
-
);
|
|
6
|
+
const formContainer = block.querySelector('.form-selection-v3__container-modal');
|
|
9
7
|
const openModal = block.querySelector('.form-selection-v3__modal-open');
|
|
10
|
-
const closeModal = block.querySelector(
|
|
11
|
-
|
|
12
|
-
);
|
|
8
|
+
const closeModal = block.querySelector('.form-selection-v3__modal-close');
|
|
9
|
+
|
|
13
10
|
|
|
14
|
-
if (formContainer && openModal) {
|
|
11
|
+
if (formContainer && openModal ) {
|
|
15
12
|
openModal.addEventListener('click', function (e) {
|
|
16
13
|
e.preventDefault();
|
|
17
14
|
document.documentElement.classList.add('lock-position');
|
|
@@ -33,9 +30,7 @@ export default function formselectionv3Js(options = {}) {
|
|
|
33
30
|
);
|
|
34
31
|
|
|
35
32
|
inputs.forEach((input) => {
|
|
36
|
-
const wrapper = input.closest(
|
|
37
|
-
'.cdb_form_field, .cdb_form_gdpr_information, .cdb_form_privacypolicy_information'
|
|
38
|
-
);
|
|
33
|
+
const wrapper = input.closest('.cdb_form_field, .cdb_form_gdpr_information, .cdb_form_privacypolicy_information');
|
|
39
34
|
|
|
40
35
|
if (!wrapper) return;
|
|
41
36
|
|
|
@@ -67,14 +62,17 @@ export default function formselectionv3Js(options = {}) {
|
|
|
67
62
|
});
|
|
68
63
|
}
|
|
69
64
|
|
|
70
|
-
const submit = block.querySelector(
|
|
65
|
+
const submit = block.querySelector(
|
|
66
|
+
'.cdb-submit'
|
|
67
|
+
);
|
|
71
68
|
|
|
72
69
|
submit.classList.add('cmpl-cta-style-11', 'cmpl-cta-animation-style-1');
|
|
73
70
|
|
|
74
71
|
submit.addEventListener('click', (e) => {
|
|
75
72
|
validateFormFields(block);
|
|
76
73
|
});
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
|
|
75
|
+
} catch ( error ) {
|
|
76
|
+
console.error( error );
|
|
79
77
|
}
|
|
80
78
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
@use 'Assets/scss/modules/library-modules/core-mixins/core-mixins';
|
|
1
|
+
@use 'Assets/scss/modules/library-modules/core-mixins/core-mixins';
|
|
2
2
|
@use 'Assets/scss/modules/library-modules/core-functions/core-functions';
|
|
3
3
|
@use 'Assets/scss/theme/breakpoints';
|
|
4
4
|
@use 'Assets/scss/blocks/form-selection-v3/form-selection-v3-extra';
|
|
5
5
|
|
|
6
6
|
.form-selection-v3 {
|
|
7
7
|
pointer-events: all;
|
|
8
|
-
|
|
8
|
+
|
|
9
9
|
&__container-modal {
|
|
10
10
|
display: none;
|
|
11
11
|
position: fixed;
|
|
12
12
|
left: 0;
|
|
13
|
-
|
|
13
|
+
// top: var(--global-site-header-height);
|
|
14
14
|
top: 74px;
|
|
15
15
|
width: 100vw;
|
|
16
16
|
height: calc(100vh - 103px);
|
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
{% set sectionStyles = styleEntryPoint %}
|
|
9
9
|
|
|
10
10
|
{% set displaySelector = fields.selector_type|ru %}
|
|
11
|
+
{% set renderDynamic = fields.render_dynamic|default(0) %}
|
|
11
12
|
|
|
12
13
|
{{previewEntryPoint}}
|
|
13
|
-
<section {{block.anchor ? "id=" ~ block.anchor : ''}} class="{{blockClassName}} {{block.className}} {{classNameEntryPoint}} lazy-fade" {{dataAttributeEntryPoint}} data-blockid="{{block.id}}" style="{{sectionStyles}}" data-assetkey="{{blockClassName}}">
|
|
14
|
+
<section {{block.anchor ? "id=" ~ block.anchor : ''}} class="{{blockClassName}} {{block.className}} {{classNameEntryPoint}} lazy-fade" {{dataAttributeEntryPoint}} data-blockid="{{block.id}}" style="{{sectionStyles}}" data-pattern-form-selection data-renderdynamic={{renderDynamic}} data-formid="{{fields.form}}" data-assetkey="{{blockClassName}}">
|
|
14
15
|
{% if displaySelector == 'modal' %}
|
|
15
16
|
<div class="{{ blockClassName }}__container-modal">
|
|
16
17
|
<div class="{{ blockClassName }}__inner">
|
|
@@ -18,7 +19,9 @@
|
|
|
18
19
|
{% if fields.title %}
|
|
19
20
|
{{ fields.title }}
|
|
20
21
|
{% endif %}
|
|
22
|
+
<!-- inline-form -->
|
|
21
23
|
{{function('do_shortcode', '[cdbform id=' ~ fields.form ~ ']')}}
|
|
24
|
+
<!-- end-inline-form -->
|
|
22
25
|
<button class="{{ blockClassName }}__modal-close"></button>
|
|
23
26
|
</div>
|
|
24
27
|
</div>
|
|
@@ -31,7 +34,9 @@
|
|
|
31
34
|
{% if fields.title %}
|
|
32
35
|
{{ fields.title }}
|
|
33
36
|
{% endif %}
|
|
37
|
+
<!-- inline-form -->
|
|
34
38
|
{{function('do_shortcode', '[cdbform id=' ~ fields.form ~ ']')}}
|
|
39
|
+
<!-- end-inline-form -->
|
|
35
40
|
</div>
|
|
36
41
|
</div>
|
|
37
42
|
</div>
|
|
@@ -37,7 +37,9 @@
|
|
|
37
37
|
"id": ""
|
|
38
38
|
},
|
|
39
39
|
"wpml_cf_preferences": 3,
|
|
40
|
-
"post_type": [
|
|
40
|
+
"post_type": [
|
|
41
|
+
"cdbform"
|
|
42
|
+
],
|
|
41
43
|
"post_status": "",
|
|
42
44
|
"taxonomy": "",
|
|
43
45
|
"return_format": "id",
|
|
@@ -244,6 +246,32 @@
|
|
|
244
246
|
"allow_custom": 0,
|
|
245
247
|
"search_placeholder": "",
|
|
246
248
|
"min": ""
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"key": "field_687f754d463f6",
|
|
252
|
+
"label": "Child Pattern Settings",
|
|
253
|
+
"name": "child_pattern_settings",
|
|
254
|
+
"aria-label": "",
|
|
255
|
+
"type": "clone",
|
|
256
|
+
"instructions": "",
|
|
257
|
+
"required": 0,
|
|
258
|
+
"conditional_logic": 0,
|
|
259
|
+
"wrapper": {
|
|
260
|
+
"width": "",
|
|
261
|
+
"class": "",
|
|
262
|
+
"id": ""
|
|
263
|
+
},
|
|
264
|
+
"wpml_cf_preferences": 3,
|
|
265
|
+
"clone": ["group_670b7ac92563c"],
|
|
266
|
+
"display": "seamless",
|
|
267
|
+
"layout": "block",
|
|
268
|
+
"prefix_label": 0,
|
|
269
|
+
"prefix_name": 0,
|
|
270
|
+
"acfe_seamless_style": 0,
|
|
271
|
+
"acfe_clone_modal": 0,
|
|
272
|
+
"acfe_clone_modal_close": 0,
|
|
273
|
+
"acfe_clone_modal_button": "",
|
|
274
|
+
"acfe_clone_modal_size": "large"
|
|
247
275
|
}
|
|
248
276
|
],
|
|
249
277
|
"location": [
|
|
@@ -264,11 +292,13 @@
|
|
|
264
292
|
"active": true,
|
|
265
293
|
"description": "",
|
|
266
294
|
"show_in_rest": 0,
|
|
267
|
-
"acfe_autosync": [
|
|
295
|
+
"acfe_autosync": [
|
|
296
|
+
"json"
|
|
297
|
+
],
|
|
268
298
|
"acfml_field_group_mode": "localization",
|
|
269
299
|
"acfe_form": 0,
|
|
270
300
|
"acfe_display_title": "",
|
|
271
301
|
"acfe_meta": "",
|
|
272
302
|
"acfe_note": "",
|
|
273
|
-
"modified":
|
|
303
|
+
"modified": 1752666089
|
|
274
304
|
}
|