@total_onion/onion-library 1.0.161 → 1.0.162

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.
@@ -1,4 +1,4 @@
1
- export default function bazaarvoicereviewv3Js ( options = {} ) {
1
+ export default function betterreviewsdisplay3Js ( options = {} ) {
2
2
  try {
3
3
  const { block } = options;
4
4
  } catch ( error ) {
@@ -2,8 +2,8 @@
2
2
 
3
3
  acf_register_block_type(
4
4
  array(
5
- 'name' => 'bazaarvoice-review-v3',
6
- 'title' => __( 'Bazaarvoice review v3', 'Global-theme Admin' ),
5
+ 'name' => 'betterreviews-display-v3',
6
+ 'title' => __( 'Betterreviews Display V3', 'Global-theme Admin' ),
7
7
  'render_callback' => 'athena_block_render_post_object',
8
8
  'category' => 'common',
9
9
  'icon' => get_svg_icon_content('brick.svg'),
@@ -0,0 +1,7 @@
1
+ // @use 'Assets/scss/modules/library-modules/core-mixins/core-mixins';
2
+ // @use 'Assets/scss/modules/library-modules/core-functions/core-functions';
3
+ // @use 'Assets/scss/theme/breakpoints';
4
+ @use 'Assets/scss/blocks/betterreviews-display-v3/betterreviews-display-v3-extra';
5
+ .betterreviews-display-v3 {
6
+ @include betterreviews-display-v3-extra.additionalStyles();
7
+ }
@@ -0,0 +1,25 @@
1
+
2
+ {% set blockClassName = "betterreviews-display-v3" %}
3
+ {% set classNameEntryPoint = include('entry-points/entry-point-classes.twig', { fields: fields, block: block }, with_context = false) %}
4
+ {% set htmlEntryPoint = include('entry-points/entry-point-html.twig', { fields: fields, block: block, blockClassName, blockClassName }, with_context = false) %}
5
+ {% set dataAttributeEntryPoint = include('entry-points/entry-point-data-attribute.twig', { fields: fields, block: block }, with_context = false) %}
6
+ {% set styleEntryPoint = include('entry-points/entry-point-style.twig', { fields: fields, block: block, is_preview }, with_context = false) %}
7
+ {% set previewEntryPoint = include('entry-points/entry-point-preview-info.twig', { fields, block, displaytype, is_preview }, with_context = false) %}
8
+
9
+ {% set featureEnabled = environment != 'prod' %}
10
+
11
+ {% set post = get_post(fields.better_reviews_post) %}
12
+
13
+ {% set sectionStyles = styleEntryPoint %}
14
+
15
+ {% if featureEnabled %}
16
+ {{previewEntryPoint}}
17
+ <section {{block.anchor ? "id=" ~ block.anchor : ''}} class="{{blockClassName}} {{block.className}} {{classNameEntryPoint}} lazy-fade" {{dataAttributeEntryPoint}} data-blockid="{{block.id}}" data-blockid="{{block.id}}" style="{{sectionStyles}}" data-assetkey="{{blockClassName}}">
18
+ <div class="{{blockClassName}}__content">
19
+ {% if post.id and fields.better_reviews_display_options %}
20
+ [better-reviews post_id="{{ post.id }}" display="{{fields.better_reviews_display_options|join(', ')|replace({'__': ""})}}"]
21
+ {% endif %}
22
+ </div>
23
+ {{htmlEntryPoint}}
24
+ </section>
25
+ {% endif %}
@@ -0,0 +1,182 @@
1
+ {
2
+ "key": "group_6892880fc1a00",
3
+ "title": "Block: Betterreviews Display V3",
4
+ "fields": [
5
+ {
6
+ "key": "field_6892881303d89",
7
+ "label": "Content",
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
+ "placement": "top",
21
+ "endpoint": 0,
22
+ "no_preference": 0,
23
+ "selected": 0
24
+ },
25
+ {
26
+ "key": "field_6896a83c0b04c",
27
+ "label": "Better reviews post",
28
+ "name": "better_reviews_post",
29
+ "aria-label": "",
30
+ "type": "post_object",
31
+ "instructions": "",
32
+ "required": 0,
33
+ "conditional_logic": 0,
34
+ "wrapper": {
35
+ "width": "",
36
+ "class": "",
37
+ "id": ""
38
+ },
39
+ "wpml_cf_preferences": 0,
40
+ "post_type": [
41
+ "product"
42
+ ],
43
+ "post_status": [
44
+ "draft",
45
+ "publish"
46
+ ],
47
+ "taxonomy": "",
48
+ "return_format": "object",
49
+ "multiple": 0,
50
+ "max": "",
51
+ "save_custom": 0,
52
+ "save_post_status": "publish",
53
+ "acfe_add_post": 0,
54
+ "acfe_edit_post": 0,
55
+ "acfe_bidirectional": {
56
+ "acfe_bidirectional_enabled": "0"
57
+ },
58
+ "allow_null": 0,
59
+ "bidirectional": 0,
60
+ "ui": 1,
61
+ "bidirectional_target": [],
62
+ "save_post_type": "",
63
+ "min": ""
64
+ },
65
+ {
66
+ "key": "field_6896a8800b04d",
67
+ "label": "Better reviews display options",
68
+ "name": "better_reviews_display_options",
69
+ "aria-label": "",
70
+ "type": "checkbox",
71
+ "instructions": "",
72
+ "required": 0,
73
+ "conditional_logic": [
74
+ [
75
+ {
76
+ "field": "field_6896a83c0b04c",
77
+ "operator": "!=empty"
78
+ }
79
+ ]
80
+ ],
81
+ "wrapper": {
82
+ "width": "",
83
+ "class": "",
84
+ "id": ""
85
+ },
86
+ "wpml_cf_preferences": 0,
87
+ "choices": {
88
+ "__display_full": "Display full review block",
89
+ "__stars": "Average stars",
90
+ "__review_count": "Review count",
91
+ "__review_cta": "Call to action (Show rate review link)",
92
+ "__criteria": "Criteria (Make sure criteria's are set in the better reviews settings)"
93
+ },
94
+ "default_value": [
95
+ "__display_full"
96
+ ],
97
+ "return_format": "value",
98
+ "min": "",
99
+ "max": "",
100
+ "allow_custom": 0,
101
+ "layout": "vertical",
102
+ "toggle": 0,
103
+ "save_custom": 0,
104
+ "custom_choice_button_text": "Add new choice"
105
+ },
106
+ {
107
+ "key": "field_6896a8bb0b04e",
108
+ "label": "Block Padding",
109
+ "name": "",
110
+ "aria-label": "",
111
+ "type": "tab",
112
+ "instructions": "",
113
+ "required": 0,
114
+ "conditional_logic": 0,
115
+ "wrapper": {
116
+ "width": "",
117
+ "class": "",
118
+ "id": ""
119
+ },
120
+ "wpml_cf_preferences": 0,
121
+ "placement": "top",
122
+ "endpoint": 0,
123
+ "no_preference": 0,
124
+ "selected": 0
125
+ },
126
+ {
127
+ "key": "field_6896a8d80b04f",
128
+ "label": "Block padding settings",
129
+ "name": "block_padding_settings",
130
+ "aria-label": "",
131
+ "type": "clone",
132
+ "instructions": "",
133
+ "required": 0,
134
+ "conditional_logic": 0,
135
+ "wrapper": {
136
+ "width": "",
137
+ "class": "",
138
+ "id": ""
139
+ },
140
+ "wpml_cf_preferences": 0,
141
+ "clone": [
142
+ "group_638f4148bc10b"
143
+ ],
144
+ "display": "seamless",
145
+ "layout": "block",
146
+ "prefix_label": 0,
147
+ "prefix_name": 0,
148
+ "acfe_seamless_style": 0,
149
+ "acfe_clone_modal": 0,
150
+ "acfe_clone_modal_close": 0,
151
+ "acfe_clone_modal_button": "",
152
+ "acfe_clone_modal_size": "large"
153
+ }
154
+ ],
155
+ "location": [
156
+ [
157
+ {
158
+ "param": "block",
159
+ "operator": "==",
160
+ "value": "acf\/betterreviews-display-v3"
161
+ }
162
+ ]
163
+ ],
164
+ "menu_order": 0,
165
+ "position": "normal",
166
+ "style": "default",
167
+ "label_placement": "left",
168
+ "instruction_placement": "label",
169
+ "hide_on_screen": "",
170
+ "active": true,
171
+ "description": "",
172
+ "show_in_rest": 0,
173
+ "acfe_autosync": [
174
+ "json"
175
+ ],
176
+ "acfml_field_group_mode": "localization",
177
+ "acfe_form": 0,
178
+ "acfe_display_title": "",
179
+ "acfe_meta": "",
180
+ "acfe_note": "",
181
+ "modified": 1754704125
182
+ }
@@ -15,8 +15,8 @@
15
15
  {% set videoSelect = field.video_select|ru %}
16
16
  {% set videoDesktop = attribute(post, videoSelect) %}
17
17
 
18
- <div class="{{blockClassName|default('cblvc')}}__video-inner-container cblvc-video-container__video-inner-container" data-pattern-type >
19
- <video class="{{blockClassName|default('cblvc')}}__video-player cblvc-video-container__video-player {{block.id}}" playsinline width='{{videoDesktop.width}}' height='{{videoDesktop.height}}' autoplay loop muted>
18
+ <div class="{{blockClassName}}__post-video-container" data-pattern-type >
19
+ <video class="{{blockClassName}}__post-video {{block.id}}" playsinline width='{{videoDesktop.width}}' height='{{videoDesktop.height}}' autoplay loop muted>
20
20
  <source src="{{gt_video_mainsrc(videoDesktop['url'])}}" type="video/mp4">
21
21
  </video>
22
22
  </div>
@@ -1442,8 +1442,8 @@
1442
1442
  },
1443
1443
  "layout_68928b20c2e90": {
1444
1444
  "key": "layout_68928b20c2e90",
1445
- "name": "bazaarvoice_review_v3",
1446
- "label": "Bazaarvoice review v3",
1445
+ "name": "betterreviews_display_v3",
1446
+ "label": "Betterreviews display v3",
1447
1447
  "display": "block",
1448
1448
  "sub_fields": [
1449
1449
  {
@@ -1496,8 +1496,8 @@
1496
1496
  },
1497
1497
  {
1498
1498
  "key": "field_68928b20c2e95",
1499
- "label": "Bazaarvoice review fields",
1500
- "name": "bazaarvoice_review_fields",
1499
+ "label": "Betterreviews display fields",
1500
+ "name": "betterreviews_display_fields",
1501
1501
  "aria-label": "",
1502
1502
  "type": "clone",
1503
1503
  "instructions": "",
@@ -2004,5 +2004,5 @@
2004
2004
  "acfe_display_title": "",
2005
2005
  "acfe_meta": "",
2006
2006
  "acfe_note": "",
2007
- "modified": 1754434407
2007
+ "modified": 1754703874
2008
2008
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@total_onion/onion-library",
3
- "version": "1.0.161",
3
+ "version": "1.0.162",
4
4
  "description": "Component library",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,11 +0,0 @@
1
- // @use 'Assets/scss/modules/library-modules/core-mixins/core-mixins';
2
- // @use 'Assets/scss/modules/library-modules/core-functions/core-functions';
3
- // @use 'Assets/scss/theme/breakpoints';
4
- @use 'Assets/scss/blocks/bazaarvoice-review-v3/bazaarvoice-review-v3-extra';
5
- .bazaarvoice-review-v3 {
6
- &__review-wrapper {
7
- place-self: var(--horizontal-alignment, center);
8
- }
9
-
10
- @include bazaarvoice-review-v3-extra.additionalStyles();
11
- }
@@ -1,20 +0,0 @@
1
-
2
- {% set blockClassName = "bazaarvoice-review-v3" %}
3
- {% set classNameEntryPoint = include('entry-points/entry-point-classes.twig', { fields: fields, block: block }, with_context = false) %}
4
- {% set htmlEntryPoint = include('entry-points/entry-point-html.twig', { fields: fields, block: block, blockClassName, blockClassName }, with_context = false) %}
5
- {% set dataAttributeEntryPoint = include('entry-points/entry-point-data-attribute.twig', { fields: fields, block: block }, with_context = false) %}
6
- {% set styleEntryPoint = include('entry-points/entry-point-style.twig', { fields: fields, block: block, is_preview }, with_context = false) %}
7
- {% set previewEntryPoint = include('entry-points/entry-point-preview-info.twig', { fields, block, displaytype, is_preview }, with_context = false) %}
8
- {% set horizontalAlignment = '--horizontal-alignment: ' ~ fields.horizontal_alignment|ru ~ ';' %}
9
-
10
- {% set sectionStyles = styleEntryPoint ~ horizontalAlignment %}
11
-
12
- {{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
- {% if fn("is_plugin_active","cbl-better-reviews/cbl-better-reviews.php") %}
15
- <div class="{{blockClassName}}__review-wrapper">
16
- {{ function( 'do_shortcode', '[better-reviews post_id="' ~ get_post(fields.bazaarvoice_product).product_bazaarvoice~ '" stars="yes" review_count="yes"]' )|raw }}
17
- </div>
18
- {% endif %}
19
- {{htmlEntryPoint}}
20
- </section>
@@ -1,119 +0,0 @@
1
- {
2
- "key": "group_6892880fc1a00",
3
- "title": "Block: Bazaarvoice review v3",
4
- "fields": [
5
- {
6
- "key": "field_6892881303d89",
7
- "label": "Content",
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
- "placement": "top",
21
- "endpoint": 0,
22
- "no_preference": 0,
23
- "selected": 0
24
- },
25
- {
26
- "key": "field_6892887903d8a",
27
- "label": "Bazaarvoice product",
28
- "name": "bazaarvoice_product",
29
- "aria-label": "",
30
- "type": "post_object",
31
- "instructions": "",
32
- "required": 0,
33
- "conditional_logic": 0,
34
- "wrapper": {
35
- "width": "",
36
- "class": "",
37
- "id": ""
38
- },
39
- "wpml_cf_preferences": 3,
40
- "post_type": [
41
- "product"
42
- ],
43
- "post_status": [
44
- "publish"
45
- ],
46
- "taxonomy": "",
47
- "return_format": "object",
48
- "multiple": 0,
49
- "max": "",
50
- "save_custom": 0,
51
- "save_post_status": "publish",
52
- "acfe_add_post": 0,
53
- "acfe_edit_post": 0,
54
- "acfe_bidirectional": {
55
- "acfe_bidirectional_enabled": "0"
56
- },
57
- "allow_null": 0,
58
- "bidirectional": 0,
59
- "ui": 1,
60
- "bidirectional_target": [],
61
- "save_post_type": "",
62
- "min": ""
63
- },
64
- {
65
- "key": "field_689289f86d90d",
66
- "label": "Horizontal Alignment",
67
- "name": "horizontal_alignment",
68
- "aria-label": "",
69
- "type": "radio",
70
- "instructions": "",
71
- "required": 0,
72
- "conditional_logic": 0,
73
- "wrapper": {
74
- "width": "",
75
- "class": "",
76
- "id": ""
77
- },
78
- "wpml_cf_preferences": 0,
79
- "choices": {
80
- "__flex-start": "Left",
81
- "__center": "Center",
82
- "__flex-end": "Right"
83
- },
84
- "default_value": "__flex-start",
85
- "return_format": "value",
86
- "allow_null": 0,
87
- "other_choice": 0,
88
- "layout": "horizontal",
89
- "save_other_choice": 0
90
- }
91
- ],
92
- "location": [
93
- [
94
- {
95
- "param": "block",
96
- "operator": "==",
97
- "value": "acf\/bazaarvoice-review-v3"
98
- }
99
- ]
100
- ],
101
- "menu_order": 0,
102
- "position": "normal",
103
- "style": "default",
104
- "label_placement": "left",
105
- "instruction_placement": "label",
106
- "hide_on_screen": "",
107
- "active": true,
108
- "description": "",
109
- "show_in_rest": 0,
110
- "acfe_autosync": [
111
- "json"
112
- ],
113
- "acfml_field_group_mode": "localization",
114
- "acfe_form": 0,
115
- "acfe_display_title": "",
116
- "acfe_meta": "",
117
- "acfe_note": "",
118
- "modified": 1754434115
119
- }