@total_onion/onion-library 1.0.74 → 1.0.76
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-form-selection-v3/form-selection-v3.js +19 -5
- package/components/block-form-selection-v3/form-selection-v3.scss +1 -5
- package/package.json +1 -1
- package/components/component-wysiwyg-editor/group_6867e153af466.json +0 -130
- package/components/component-wysiwyg-editor/wysiwyg-editor.twig +0 -77
|
@@ -1,20 +1,34 @@
|
|
|
1
|
-
export default function formselectionv3Js
|
|
1
|
+
export default function formselectionv3Js(options = {}) {
|
|
2
2
|
try {
|
|
3
3
|
const { block } = options;
|
|
4
4
|
|
|
5
5
|
// modal logic
|
|
6
|
+
const siteHeader = document.querySelector('.site-header-block');
|
|
7
|
+
|
|
6
8
|
const formContainer = block.querySelector('.form-selection-v3__container-modal');
|
|
7
9
|
const openModal = block.querySelector('.form-selection-v3__modal-open');
|
|
8
10
|
const closeModal = block.querySelector('.form-selection-v3__modal-close');
|
|
9
|
-
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
|
|
13
|
+
document.body.appendChild(formContainer);
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
const headerHeight = () => {
|
|
17
|
+
const headerHeight = siteHeader.offsetHeight;
|
|
18
|
+
return headerHeight;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if (formContainer && openModal) {
|
|
12
22
|
openModal.addEventListener('click', function (e) {
|
|
13
23
|
e.preventDefault();
|
|
24
|
+
headerHeight();
|
|
14
25
|
document.documentElement.classList.add('lock-position');
|
|
15
26
|
formContainer.style.display = 'block';
|
|
27
|
+
formContainer.style.top = headerHeight() + 'px';
|
|
28
|
+
siteHeader.style.pointerEvents = 'none'
|
|
16
29
|
});
|
|
17
30
|
closeModal.addEventListener('click', function (e) {
|
|
31
|
+
siteHeader.style.pointerEvents = 'all'
|
|
18
32
|
document.documentElement.classList.remove('lock-position');
|
|
19
33
|
e.preventDefault();
|
|
20
34
|
formContainer.style.display = 'none';
|
|
@@ -72,7 +86,7 @@ export default function formselectionv3Js ( options = {} ) {
|
|
|
72
86
|
validateFormFields(block);
|
|
73
87
|
});
|
|
74
88
|
|
|
75
|
-
} catch (
|
|
76
|
-
console.error(
|
|
89
|
+
} catch (error) {
|
|
90
|
+
console.error(error);
|
|
77
91
|
}
|
|
78
92
|
}
|
|
@@ -10,15 +10,10 @@
|
|
|
10
10
|
display: none;
|
|
11
11
|
position: fixed;
|
|
12
12
|
left: 0;
|
|
13
|
-
top: var(--global-site-header-height);
|
|
14
|
-
// top: 74px;
|
|
15
13
|
width: 100vw;
|
|
16
14
|
height: calc(100vh - 103px);
|
|
17
15
|
z-index: 9998;
|
|
18
16
|
background-color: rgba(0, 0, 0, 0.4);
|
|
19
|
-
@include core-mixins-v3.device(breakpoints.$tabPortrait) {
|
|
20
|
-
top: 103px;
|
|
21
|
-
}
|
|
22
17
|
}
|
|
23
18
|
|
|
24
19
|
&__inner {
|
|
@@ -29,6 +24,7 @@
|
|
|
29
24
|
}
|
|
30
25
|
|
|
31
26
|
&__modal-open {
|
|
27
|
+
cursor: pointer;
|
|
32
28
|
&--icon {
|
|
33
29
|
appearance: none;
|
|
34
30
|
border: none;
|
package/package.json
CHANGED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"key": "group_6867e153af466",
|
|
3
|
-
"title": "Component: Wysiwyg Editor",
|
|
4
|
-
"fields": [
|
|
5
|
-
{
|
|
6
|
-
"key": "field_6867e153bb674",
|
|
7
|
-
"label": "Enable Wysiwyg editor",
|
|
8
|
-
"name": "enable_wysiwyg_editor",
|
|
9
|
-
"aria-label": "",
|
|
10
|
-
"type": "true_false",
|
|
11
|
-
"instructions": "",
|
|
12
|
-
"required": 0,
|
|
13
|
-
"conditional_logic": 0,
|
|
14
|
-
"wrapper": {
|
|
15
|
-
"width": "",
|
|
16
|
-
"class": "",
|
|
17
|
-
"id": ""
|
|
18
|
-
},
|
|
19
|
-
"wpml_cf_preferences": 3,
|
|
20
|
-
"message": "",
|
|
21
|
-
"default_value": 0,
|
|
22
|
-
"ui_on_text": "",
|
|
23
|
-
"ui_off_text": "",
|
|
24
|
-
"ui": 1,
|
|
25
|
-
"style": ""
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"key": "field_6867e153bbb00",
|
|
29
|
-
"label": "Text Editor Fields",
|
|
30
|
-
"name": "text_editor_fields",
|
|
31
|
-
"aria-label": "",
|
|
32
|
-
"type": "clone",
|
|
33
|
-
"instructions": "",
|
|
34
|
-
"required": 0,
|
|
35
|
-
"conditional_logic": 0,
|
|
36
|
-
"wrapper": {
|
|
37
|
-
"width": "",
|
|
38
|
-
"class": "",
|
|
39
|
-
"id": ""
|
|
40
|
-
},
|
|
41
|
-
"wpml_cf_preferences": 3,
|
|
42
|
-
"user_roles": [
|
|
43
|
-
"all"
|
|
44
|
-
],
|
|
45
|
-
"clone": [
|
|
46
|
-
"group_657305390de77"
|
|
47
|
-
],
|
|
48
|
-
"display": "seamless",
|
|
49
|
-
"layout": "block",
|
|
50
|
-
"prefix_label": 0,
|
|
51
|
-
"prefix_name": 0,
|
|
52
|
-
"acfe_seamless_style": 0,
|
|
53
|
-
"acfe_clone_modal": 0,
|
|
54
|
-
"acfe_clone_modal_close": 0,
|
|
55
|
-
"acfe_clone_modal_button": "",
|
|
56
|
-
"acfe_clone_modal_size": "large"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"key": "field_6867e153bbebf",
|
|
60
|
-
"label": "Text content",
|
|
61
|
-
"name": "wysiwyg_editor",
|
|
62
|
-
"aria-label": "",
|
|
63
|
-
"type": "wysiwyg",
|
|
64
|
-
"instructions": "",
|
|
65
|
-
"required": 0,
|
|
66
|
-
"conditional_logic": [
|
|
67
|
-
[
|
|
68
|
-
{
|
|
69
|
-
"field": "field_6867e153bb674",
|
|
70
|
-
"operator": "==",
|
|
71
|
-
"value": "1"
|
|
72
|
-
}
|
|
73
|
-
]
|
|
74
|
-
],
|
|
75
|
-
"wrapper": {
|
|
76
|
-
"width": "",
|
|
77
|
-
"class": "",
|
|
78
|
-
"id": ""
|
|
79
|
-
},
|
|
80
|
-
"wpml_cf_preferences": 2,
|
|
81
|
-
"default_value": "",
|
|
82
|
-
"acfe_wysiwyg_height": 300,
|
|
83
|
-
"acfe_wysiwyg_max_height": "",
|
|
84
|
-
"acfe_wysiwyg_valid_elements": "",
|
|
85
|
-
"acfe_wysiwyg_custom_style": "",
|
|
86
|
-
"acfe_wysiwyg_disable_wp_style": 0,
|
|
87
|
-
"acfe_wysiwyg_autoresize": 0,
|
|
88
|
-
"acfe_wysiwyg_disable_resize": 0,
|
|
89
|
-
"acfe_wysiwyg_remove_path": 0,
|
|
90
|
-
"acfe_wysiwyg_menubar": 0,
|
|
91
|
-
"acfe_wysiwyg_transparent": 0,
|
|
92
|
-
"acfe_wysiwyg_merge_toolbar": 0,
|
|
93
|
-
"acfe_wysiwyg_custom_toolbar": 0,
|
|
94
|
-
"tabs": "visual",
|
|
95
|
-
"toolbar": "colour_bold_italic_underline_link",
|
|
96
|
-
"media_upload": 0,
|
|
97
|
-
"delay": 1,
|
|
98
|
-
"acfe_wysiwyg_auto_init": 1,
|
|
99
|
-
"acfe_wysiwyg_min_height": 300,
|
|
100
|
-
"acfe_wysiwyg_toolbar_buttons": []
|
|
101
|
-
}
|
|
102
|
-
],
|
|
103
|
-
"location": [
|
|
104
|
-
[
|
|
105
|
-
{
|
|
106
|
-
"param": "block",
|
|
107
|
-
"operator": "!=",
|
|
108
|
-
"value": "all"
|
|
109
|
-
}
|
|
110
|
-
]
|
|
111
|
-
],
|
|
112
|
-
"menu_order": 0,
|
|
113
|
-
"position": "normal",
|
|
114
|
-
"style": "default",
|
|
115
|
-
"label_placement": "top",
|
|
116
|
-
"instruction_placement": "label",
|
|
117
|
-
"hide_on_screen": "",
|
|
118
|
-
"active": false,
|
|
119
|
-
"description": "Library version - Do not modify in this project as any changes will be overwritten by future updates.",
|
|
120
|
-
"show_in_rest": 0,
|
|
121
|
-
"acfe_autosync": [
|
|
122
|
-
"json"
|
|
123
|
-
],
|
|
124
|
-
"acfml_field_group_mode": "localization",
|
|
125
|
-
"acfe_form": 0,
|
|
126
|
-
"acfe_display_title": "",
|
|
127
|
-
"acfe_meta": "",
|
|
128
|
-
"acfe_note": "",
|
|
129
|
-
"modified": 1751638522
|
|
130
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
{# Do not edit this file outside of the component library as your changes will be lost with future updates. #}
|
|
2
|
-
{% if fields.enable_text_shadow %}
|
|
3
|
-
{% set textShadowClass = blockClassName|default('default-class') ~ "--text-shadow" %}
|
|
4
|
-
{% set textShadowStyle = "--text-shadow-offset-x:" ~ (fields.text_shadow_horizontal_offset|default(0)) ~ "; --text-shadow-offset-y: " ~ (fields.text_shadow_vertical_offset|default(0)) ~ "; --text-shadow-blur: " ~ (fields.text_shadow_blur|default(0)) ~ "; --text-shadow-colour: " ~ (fields.text_shadow_colour|default("#000000")) ~ ";" %}
|
|
5
|
-
{% endif %}
|
|
6
|
-
{% if fields.enable_wysiwyg_decoration %}
|
|
7
|
-
{% set wysiwygDecorationStyle = fields.wysiwyg_decoration_style|ru %}
|
|
8
|
-
{% endif %}
|
|
9
|
-
{% if fields.mobile_default_text_transform %}
|
|
10
|
-
{% set defaultTextTransformMobile = '--default-text-transform-mobile: ' ~ fields.mobile_default_text_transform|ru ~ ';' %}
|
|
11
|
-
{% endif %}
|
|
12
|
-
{% if fields.portrait_default_text_transform %}
|
|
13
|
-
{% set defaultTextTransformPortrait = '--default-text-transform-portrait: ' ~ fields.portrait_default_text_transform|ru ~ ';' %}
|
|
14
|
-
{% endif %}
|
|
15
|
-
{% if fields.desktop_default_text_transform %}
|
|
16
|
-
{% set defaultTextTransformDesktop = '--default-text-transform-desktop: ' ~ fields.desktop_default_text_transform|ru ~ ';' %}
|
|
17
|
-
{% endif %}
|
|
18
|
-
{% if fields.mobile_default_text_align %}
|
|
19
|
-
{% set defaultTextAlignMobile = '--default-text-align-mobile: ' ~ fields.mobile_default_text_align|ru ~ ';' %}
|
|
20
|
-
{% endif %}
|
|
21
|
-
{% if fields.portrait_default_text_align %}
|
|
22
|
-
{% set defaultTextAlignPortrait = '--default-text-align-portrait: ' ~ fields.portrait_default_text_align|ru ~ ';' %}
|
|
23
|
-
{% endif %}
|
|
24
|
-
{% if fields.desktop_default_text_align %}
|
|
25
|
-
{% set defaultTextAlignDesktop = '--default-text-align-desktop: ' ~ fields.desktop_default_text_align|ru ~ ';' %}
|
|
26
|
-
{% endif %}
|
|
27
|
-
{% if fields.mobile_default_font_weight %}
|
|
28
|
-
{% set defaultFontWeightMobile = '--default-font-weight-mobile: ' ~ fields.mobile_default_font_weight|ru ~ ';' %}
|
|
29
|
-
{% endif %}
|
|
30
|
-
{% if fields.portrait_default_font_weight %}
|
|
31
|
-
{% set defaultFontWeightPortrait = '--default-font-weight-portrait: ' ~ fields.portrait_default_font_weight|ru ~ ';' %}
|
|
32
|
-
{% endif %}
|
|
33
|
-
{% if fields.desktop_default_font_weight %}
|
|
34
|
-
{% set defaultFontWeightDesktop = '--default-font-weight-desktop: ' ~ fields.desktop_default_font_weight|ru ~ ';' %}
|
|
35
|
-
{% endif %}
|
|
36
|
-
{% set displaytype = 'grid' %}
|
|
37
|
-
{% set responsiveShowHide = include('components/responsive-show-hide.twig', { fields, block, blockClassName, displaytype, is_preview }, with_context = false) %}
|
|
38
|
-
{% if fields.mobile_default_font_style %}
|
|
39
|
-
{% set defaultFontStyleMobile = '--default-font-style-mobile: ' ~ fields.mobile_default_font_style|ru ~ ';' %}
|
|
40
|
-
{% endif %}
|
|
41
|
-
{% if fields.portrait_default_font_style %}
|
|
42
|
-
{% set defaultFontStylePortrait = '--default-font-style-portrait: ' ~ fields.portrait_default_font_style|ru ~ ';' %}
|
|
43
|
-
{% endif %}
|
|
44
|
-
{% if fields.desktop_default_font_style %}
|
|
45
|
-
{% set defaultFontStyleDesktop = '--default-font-style-desktop: ' ~ fields.desktop_default_font_style|ru ~ ';' %}
|
|
46
|
-
{% endif %}
|
|
47
|
-
{% if fields.desktop_default_text_colour %}
|
|
48
|
-
{% set defaultTextColourDesktop = '--default-text-colour-desktop: ' ~ fields.desktop_default_text_colour|ru ~ ';' %}
|
|
49
|
-
{% endif %}
|
|
50
|
-
{% if fields.portrait_default_text_colour %}
|
|
51
|
-
{% set defaultTextColourPortrait = '--default-text-colour-portrait: ' ~ fields.portrait_default_text_colour|ru ~ ';' %}
|
|
52
|
-
{% endif %}
|
|
53
|
-
{% if fields.mobile_default_text_colour %}
|
|
54
|
-
{% set defaultTextColourMobile = '--default-text-colour-mobile: ' ~ fields.mobile_default_text_colour|ru ~ ';' %}
|
|
55
|
-
{% endif %}
|
|
56
|
-
{% if fields.enable_text_outline %}
|
|
57
|
-
{% set textStrokeWidth = '--text-stroke-width: ' ~ fields.text_outline_width ~ ';' %}
|
|
58
|
-
{% set textStrokeColour = '--text-stroke-colour: ' ~ fields.text_outline_colour ~ ';' %}
|
|
59
|
-
{% endif %}
|
|
60
|
-
{% set wysiwygMaxWidth = '--wysiwyg-max-width: ' ~ fields.wysiwyg_max_width ~ '%;' %}
|
|
61
|
-
{% set wysiwygMaxWidthPortrait = '--wysiwyg-max-width-portrait: ' ~ fields.wysiwyg_max_width_portrait ~ '%;' %}
|
|
62
|
-
{% set wysiwygMaxWidthMobile = '--wysiwyg-max-width-mobile: ' ~ fields.wysiwyg_max_width_mobile ~ '%;' %}
|
|
63
|
-
{% set widgetStyles = textShadowStyle ~ defaultTextColourDesktop ~ defaultTextColourPortrait ~ defaultTextColourMobile ~ textStrokeWidth ~ textStrokeColour ~ wysiwygHorizPaddingMobile ~ wysiwygHorizPaddingDesktop ~ wysiwygMaxWidth ~ wysiwygMaxWidthMobile ~ wysiwygMaxWidthPortrait ~ defaultTextTransformDesktop ~ defaultTextTransformMobile ~ defaultTextTransformPortrait ~ defaultFontWeightMobile ~ defaultFontWeightPortrait ~ defaultFontWeightDesktop ~ defaultFontStyleMobile ~ defaultFontStylePortrait ~ defaultFontStyleDesktop ~ defaultTextAlignMobile ~ defaultTextAlignPortrait ~ defaultTextAlignDesktop ~ responsiveShowHide %}
|
|
64
|
-
<style>
|
|
65
|
-
.{{blockClassName|default('default-class')}}__content-container.{{block.id}}{
|
|
66
|
-
{{widgetStyles}}
|
|
67
|
-
}
|
|
68
|
-
</style>
|
|
69
|
-
{% if fields.wysiwyg_editor %}
|
|
70
|
-
<div class="{{blockClassName|default('default-class')}}__content-container {{textShadowClass}} {{blockClassName|default('default-class')}}__{{wysiwygDecorationStyle}} standard-content-box-wysiwyg-editor {{block.id}}">
|
|
71
|
-
{% if fields.wysiwyg_editor is not empty %}
|
|
72
|
-
<{{fields.element_type|ru}} class="{{fields.typographic_style|ru}}">
|
|
73
|
-
{{fields.wysiwyg_editor|striptags('<br>, <a>, <em>, <i>, <span>, <strong>')|raw}}
|
|
74
|
-
</{{fields.element_type|ru}}>
|
|
75
|
-
{% endif %}
|
|
76
|
-
</div>
|
|
77
|
-
{% endif %}
|