@total_onion/onion-library 1.0.48 → 1.0.49

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.
@@ -0,0 +1,185 @@
1
+ {
2
+ "key": "group_687e00b45e9a3",
3
+ "title": "Block: Nav Menu Container v3",
4
+ "fields": [
5
+ {
6
+ "key": "field_687e00b466407",
7
+ "label": "Nav Menu",
8
+ "name": "",
9
+ "aria-label": "",
10
+ "type": "tab",
11
+ "instructions": "",
12
+ "required": 0,
13
+ "conditional_logic": 0,
14
+ "wrapper": {
15
+ "width": "",
16
+ "class": "",
17
+ "id": ""
18
+ },
19
+ "wpml_cf_preferences": 3,
20
+ "user_roles": [
21
+ "all"
22
+ ],
23
+ "placement": "top",
24
+ "endpoint": 0,
25
+ "no_preference": 0,
26
+ "selected": 0
27
+ },
28
+ {
29
+ "key": "field_687e00b4668dd",
30
+ "label": "Select menu type",
31
+ "name": "select_menu_type",
32
+ "aria-label": "",
33
+ "type": "select",
34
+ "instructions": "",
35
+ "required": 0,
36
+ "conditional_logic": 0,
37
+ "wrapper": {
38
+ "width": "",
39
+ "class": "",
40
+ "id": ""
41
+ },
42
+ "wpml_cf_preferences": 3,
43
+ "choices": {
44
+ "__slide_in_nav_panel": "Slide In Nav Panel",
45
+ "__classic_nav_items_center": "Classic Nav Items Center"
46
+ },
47
+ "default_value": "__classic_nav_items_center",
48
+ "return_format": "value",
49
+ "multiple": 0,
50
+ "max": "",
51
+ "prepend": "",
52
+ "append": "",
53
+ "allow_null": 0,
54
+ "ui": 0,
55
+ "ajax": 0,
56
+ "placeholder": "",
57
+ "allow_custom": 0,
58
+ "search_placeholder": "",
59
+ "min": ""
60
+ },
61
+ {
62
+ "key": "field_687e00b466c81",
63
+ "label": "Classic Nav Items Center",
64
+ "name": "classic_nav_items_center",
65
+ "aria-label": "",
66
+ "type": "group",
67
+ "instructions": "",
68
+ "required": 0,
69
+ "conditional_logic": [
70
+ [
71
+ {
72
+ "field": "field_687e00b4668dd",
73
+ "operator": "==",
74
+ "value": "__classic_nav_items_center"
75
+ }
76
+ ]
77
+ ],
78
+ "wrapper": {
79
+ "width": "",
80
+ "class": "",
81
+ "id": ""
82
+ },
83
+ "wpml_cf_preferences": 3,
84
+ "layout": "block",
85
+ "acfe_seamless_style": 0,
86
+ "acfe_group_modal": 0,
87
+ "acfe_group_modal_close": 0,
88
+ "acfe_group_modal_button": "",
89
+ "acfe_group_modal_size": "large",
90
+ "sub_fields": [
91
+ {
92
+ "key": "field_687e00b46977c",
93
+ "label": "Classic Nav Items Center",
94
+ "name": "classic_nav_items_center",
95
+ "aria-label": "",
96
+ "type": "clone",
97
+ "instructions": "",
98
+ "required": 0,
99
+ "conditional_logic": 0,
100
+ "wrapper": {
101
+ "width": "",
102
+ "class": "",
103
+ "id": ""
104
+ },
105
+ "wpml_cf_preferences": 3,
106
+ "clone": [
107
+ "group_66a2b63ae5cad"
108
+ ],
109
+ "display": "seamless",
110
+ "layout": "block",
111
+ "prefix_label": 0,
112
+ "prefix_name": 0,
113
+ "acfe_seamless_style": 0,
114
+ "acfe_clone_modal": 0,
115
+ "acfe_clone_modal_close": 0,
116
+ "acfe_clone_modal_button": "",
117
+ "acfe_clone_modal_size": "large"
118
+ }
119
+ ]
120
+ },
121
+ {
122
+ "key": "field_687e00b467072",
123
+ "label": "Slide In Nav Panel",
124
+ "name": "slide_in_nav_panel",
125
+ "aria-label": "",
126
+ "type": "clone",
127
+ "instructions": "",
128
+ "required": 0,
129
+ "conditional_logic": [
130
+ [
131
+ {
132
+ "field": "field_687e00b4668dd",
133
+ "operator": "==",
134
+ "value": "__slide_in_nav_panel"
135
+ }
136
+ ]
137
+ ],
138
+ "wrapper": {
139
+ "width": "",
140
+ "class": "",
141
+ "id": ""
142
+ },
143
+ "wpml_cf_preferences": 3,
144
+ "clone": [
145
+ "group_65db1f6c9cba8"
146
+ ],
147
+ "display": "seamless",
148
+ "layout": "block",
149
+ "prefix_label": 0,
150
+ "prefix_name": 0,
151
+ "acfe_seamless_style": 0,
152
+ "acfe_clone_modal": 0,
153
+ "acfe_clone_modal_close": 0,
154
+ "acfe_clone_modal_button": "",
155
+ "acfe_clone_modal_size": "large"
156
+ }
157
+ ],
158
+ "location": [
159
+ [
160
+ {
161
+ "param": "block",
162
+ "operator": "==",
163
+ "value": "acf\/nav-menu-container-v3"
164
+ }
165
+ ]
166
+ ],
167
+ "menu_order": 0,
168
+ "position": "normal",
169
+ "style": "default",
170
+ "label_placement": "left",
171
+ "instruction_placement": "label",
172
+ "hide_on_screen": "",
173
+ "active": true,
174
+ "description": "",
175
+ "show_in_rest": 0,
176
+ "acfe_autosync": [
177
+ "json"
178
+ ],
179
+ "acfml_field_group_mode": "localization",
180
+ "acfe_form": 0,
181
+ "acfe_display_title": "",
182
+ "acfe_meta": "",
183
+ "acfe_note": "",
184
+ "modified": 1753088249
185
+ }
@@ -0,0 +1,21 @@
1
+ export default function navmenucontainerv3Js(options = {}) {
2
+ try {
3
+ const {block} = options;
4
+
5
+ if (block.dataset.navtype == 'classic_nav_items_center') {
6
+ import('Assets/js/modules/library-modules/classic-nav-items-center/classic-nav-items-center.js').then(
7
+ (module) => {
8
+ module.default({block});
9
+ }
10
+ );
11
+ } else if (block.dataset.navtype == 'slide_in_nav_panel') {
12
+ import(
13
+ 'Assets/js/modules/library-modules/nav-menu-slide-in-panel/nav-menu-slide-in-panel.js'
14
+ ).then((module) => {
15
+ module.default({block});
16
+ });
17
+ }
18
+ } catch (error) {
19
+ console.error(error);
20
+ }
21
+ }
@@ -0,0 +1,14 @@
1
+ <?php
2
+
3
+ acf_register_block_type(
4
+ array(
5
+ 'name' => 'nav-menu-container-v3',
6
+ 'title' => __('Nav menu container v3', 'Global-theme Admin'),
7
+ 'render_callback' => 'athena_block_render_post_object',
8
+ 'category' => 'common',
9
+ 'icon' => get_svg_icon_content('brick.svg'),
10
+ 'keywords' => array('content', 'text'),
11
+ 'mode' => 'preview',
12
+ 'supports' => array('align' => false, 'anchor' => true),
13
+ )
14
+ );
@@ -0,0 +1,8 @@
1
+ @use 'Assets/scss/modules/library-modules/nav-menu-slide-in-panel/nav-menu-slide-in-panel';
2
+ @use 'Assets/scss/modules/library-modules/classic-nav-items-center/classic-nav-items-center';
3
+
4
+ .nav-menu-container-v3 {
5
+ pointer-events: all;
6
+ @include nav-menu-slide-in-panel.navMenuSlideInPanel();
7
+ @include classic-nav-items-center.classicNavItemsCenter();
8
+ }
@@ -0,0 +1,19 @@
1
+ {% set blockClassName = "nav-menu-container-v3" %}
2
+ {% set classNameEntryPoint = include('entry-points/entry-point-classes.twig', { fields, block }, with_context = false) %}
3
+ {% set htmlEntryPoint = include('entry-points/entry-point-html.twig', { fields, block, blockClassName, options, environment, is_preview, nav_menus }, with_context = false) %}
4
+ {% set dataAttributeEntryPoint = include('entry-points/entry-point-data-attribute.twig', { fields, block }, with_context = false) %}
5
+ {% set styleEntryPoint = include('entry-points/entry-point-style.twig', { fields, block, displaytype, is_preview }, with_context = false) %}
6
+ {% set previewEntryPoint = include('entry-points/entry-point-preview-info.twig', { fields, block, displaytype, is_preview }, with_context = false) %}
7
+ {% set menuType = fields.select_menu_type|ru %}
8
+ {% set sectionStyles = styleEntryPoint %}
9
+
10
+ <section
11
+ {{block.anchor ? "id=" ~ block.anchor : ''}} class="{{blockClassName}} {{block.className}} {{classNameEntryPoint}} lazy-fade" {{dataAttributeEntryPoint}} data-blockid="{{block.id}}" style="{{sectionStyles}}" data-assetkey="{{blockClassName}}" data-navtype="{{menuType}}">
12
+ {% if menuType == 'classic_nav_items_center' %}
13
+ {{ include( 'components/classic-nav-items-center.twig', { fields, block, blockClassName, options, nav_menus, current_post}, with_context = false, ignore_missing = true) }}
14
+ {% elseif menuType == 'slide_in_nav_panel'%}
15
+ {{ include( 'components/nav-menu-slide-in-panel.twig', { fields, block, blockClassName, options, nav_menus, current_post}, with_context = false, ignore_missing = true) }}
16
+ {% endif %}
17
+
18
+ {{htmlEntryPoint}}
19
+ </section>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@total_onion/onion-library",
3
- "version": "1.0.48",
3
+ "version": "1.0.49",
4
4
  "description": "Component library",
5
5
  "main": "index.js",
6
6
  "scripts": {