@blaze-cms/react-page-builder 0.146.0-node18-core-styles-tooltips.20 → 0.146.0-node18-tooltips.19

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.
Files changed (72) hide show
  1. package/CHANGELOG.md +25 -63
  2. package/lib/components/ContentGroup/ContentGroup.js +41 -10
  3. package/lib/components/ContentGroup/ContentGroup.js.map +1 -1
  4. package/lib/components/ContentGroup/ContentGroupAccordion.js +175 -0
  5. package/lib/components/ContentGroup/ContentGroupAccordion.js.map +1 -0
  6. package/lib/components/ContentGroup/constants.js +13 -1
  7. package/lib/components/ContentGroup/constants.js.map +1 -1
  8. package/lib/components/ContentGroup/helpers/get-structured-data-properties.js +40 -0
  9. package/lib/components/ContentGroup/helpers/get-structured-data-properties.js.map +1 -0
  10. package/lib/components/Menu/Menu.js +1 -4
  11. package/lib/components/Menu/Menu.js.map +1 -1
  12. package/lib/components/Menu/MenuContext.js +1 -2
  13. package/lib/components/Menu/MenuContext.js.map +1 -1
  14. package/lib/components/MenuItem/MenuItemRender.js +12 -27
  15. package/lib/components/MenuItem/MenuItemRender.js.map +1 -1
  16. package/lib/components/MenuItem/helpers/index.js +0 -14
  17. package/lib/components/MenuItem/helpers/index.js.map +1 -1
  18. package/lib/components/SearchContent/SearchContent.js +4 -3
  19. package/lib/components/SearchContent/SearchContent.js.map +1 -1
  20. package/lib/system-components/EditorMode/helpers/add-editor-mode-event-listeners.js +0 -1
  21. package/lib/system-components/EditorMode/helpers/add-editor-mode-event-listeners.js.map +1 -1
  22. package/lib-es/components/ContentGroup/ContentGroup.js +25 -10
  23. package/lib-es/components/ContentGroup/ContentGroup.js.map +1 -1
  24. package/lib-es/components/ContentGroup/ContentGroupAccordion.js +138 -0
  25. package/lib-es/components/ContentGroup/ContentGroupAccordion.js.map +1 -0
  26. package/lib-es/components/ContentGroup/constants.js +12 -1
  27. package/lib-es/components/ContentGroup/constants.js.map +1 -1
  28. package/lib-es/components/ContentGroup/helpers/get-structured-data-properties.js +33 -0
  29. package/lib-es/components/ContentGroup/helpers/get-structured-data-properties.js.map +1 -0
  30. package/lib-es/components/Menu/Menu.js +1 -4
  31. package/lib-es/components/Menu/Menu.js.map +1 -1
  32. package/lib-es/components/Menu/MenuContext.js +1 -2
  33. package/lib-es/components/Menu/MenuContext.js.map +1 -1
  34. package/lib-es/components/MenuItem/MenuItemRender.js +11 -25
  35. package/lib-es/components/MenuItem/MenuItemRender.js.map +1 -1
  36. package/lib-es/components/MenuItem/helpers/index.js +1 -3
  37. package/lib-es/components/MenuItem/helpers/index.js.map +1 -1
  38. package/lib-es/components/SearchContent/SearchContent.js +4 -3
  39. package/lib-es/components/SearchContent/SearchContent.js.map +1 -1
  40. package/lib-es/system-components/EditorMode/helpers/add-editor-mode-event-listeners.js +0 -1
  41. package/lib-es/system-components/EditorMode/helpers/add-editor-mode-event-listeners.js.map +1 -1
  42. package/package.json +10 -10
  43. package/src/components/ContentGroup/ContentGroup.js +37 -13
  44. package/src/components/ContentGroup/ContentGroupAccordion.js +163 -0
  45. package/src/components/ContentGroup/constants.js +14 -1
  46. package/src/components/ContentGroup/helpers/get-structured-data-properties.js +36 -0
  47. package/src/components/Menu/Menu.js +1 -3
  48. package/src/components/Menu/MenuContext.js +1 -1
  49. package/src/components/MenuItem/MenuItemRender.js +12 -40
  50. package/src/components/MenuItem/helpers/index.js +1 -3
  51. package/src/components/SearchContent/SearchContent.js +6 -5
  52. package/src/system-components/EditorMode/helpers/add-editor-mode-event-listeners.js +3 -1
  53. package/tests/unit/src/components/ContentGroup/ContentGroup.test.js +32 -2
  54. package/tests/unit/src/components/ContentGroup/ContentGroupAccordion.test.js +283 -0
  55. package/tests/unit/src/components/ContentGroup/__snapshots__/ContentGroup.test.js.snap +2 -2
  56. package/tests/unit/src/components/ContentGroup/__snapshots__/ContentGroupAccordion.test.js.snap +243 -0
  57. package/tests/unit/src/components/ContentGroup/helpers/get-structured-data-properties.test.js +105 -0
  58. package/tests/unit/src/components/MenuItem/MenuItem.test.js +0 -5
  59. package/tests/unit/src/components/MenuItem/MenuItemRender.test.js +3 -11
  60. package/lib/components/MenuItem/helpers/has-active-child.js +0 -19
  61. package/lib/components/MenuItem/helpers/has-active-child.js.map +0 -1
  62. package/lib/components/MenuItem/helpers/isUrlPathMatch.js +0 -18
  63. package/lib/components/MenuItem/helpers/isUrlPathMatch.js.map +0 -1
  64. package/lib-es/components/MenuItem/helpers/has-active-child.js +0 -5
  65. package/lib-es/components/MenuItem/helpers/has-active-child.js.map +0 -1
  66. package/lib-es/components/MenuItem/helpers/isUrlPathMatch.js +0 -8
  67. package/lib-es/components/MenuItem/helpers/isUrlPathMatch.js.map +0 -1
  68. package/src/components/MenuItem/helpers/has-active-child.js +0 -10
  69. package/src/components/MenuItem/helpers/isUrlPathMatch.js +0 -10
  70. package/tests/unit/src/components/MenuItem/helpers/constants.js +0 -73
  71. package/tests/unit/src/components/MenuItem/helpers/has-active-child.test.js +0 -35
  72. package/tests/unit/src/components/MenuItem/helpers/is-url-path-match.test.js +0 -53
package/CHANGELOG.md CHANGED
@@ -3,85 +3,64 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- # [0.146.0-node18-core-styles-tooltips.20](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.19...v0.146.0-node18-core-styles-tooltips.20) (2025-10-03)
6
+ # [0.146.0-node18-tooltips.19](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.18...v0.146.0-node18-tooltips.19) (2025-10-10)
7
7
 
8
8
 
9
9
  ### Bug Fixes
10
10
 
11
- * remove card wrapper that is not required ([#4938](https://github.com/thebyte9/blaze/issues/4938)) ([52a449c](https://github.com/thebyte9/blaze/commit/52a449c4de5d8d806112ff4159b4d5556030e5c3))
12
-
13
-
14
-
11
+ * editor mode icon flicker improvements ([#4949](https://github.com/thebyte9/blaze/issues/4949)) ([211c72d](https://github.com/thebyte9/blaze/commit/211c72d83dc1da87e9bdef8e2a816af9ae3e321c))
12
+ * reset input and results on click away ([#4930](https://github.com/thebyte9/blaze/issues/4930)) ([cebd271](https://github.com/thebyte9/blaze/commit/cebd271c09d0b32db5db52943888a342acd484d3))
15
13
 
16
14
 
17
- # [0.146.0-node18-core-styles-tooltips.19](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.18...v0.146.0-node18-core-styles-tooltips.19) (2025-10-01)
15
+ ### Features
18
16
 
17
+ * add accordion content group variant ([#4906](https://github.com/thebyte9/blaze/issues/4906)) ([879f4e4](https://github.com/thebyte9/blaze/commit/879f4e45e3d35de6ab8e739adb0739a94a5bbfb4))
18
+ * enable accordion component to be marked up with FAQPage schema ([#4913](https://github.com/thebyte9/blaze/issues/4913)) ([6bf92fe](https://github.com/thebyte9/blaze/commit/6bf92fe870f47dc6069b12ce0d8b29abc9fee3d5))
19
19
 
20
- ### Bug Fixes
21
20
 
22
- * render all group sections ([#4903](https://github.com/thebyte9/blaze/issues/4903)) ([fb79560](https://github.com/thebyte9/blaze/commit/fb7956017d8486ed345cfee889882d8c756c117f))
23
- * updated chart icon ([#4925](https://github.com/thebyte9/blaze/issues/4925)) ([0cc8721](https://github.com/thebyte9/blaze/commit/0cc87217889e3c5ab93adb4ba8d7506fc78d9316))
24
21
 
25
22
 
26
23
 
27
-
28
-
29
- # [0.146.0-node18-core-styles-tooltips.18](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.17...v0.146.0-node18-core-styles-tooltips.18) (2025-09-29)
24
+ # [0.146.0-node18-tooltips.13](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.12...v0.146.0-node18-tooltips.13) (2025-10-02)
30
25
 
31
26
 
32
27
  ### Bug Fixes
33
28
 
34
- * update range when changing unit ([#4893](https://github.com/thebyte9/blaze/issues/4893)) ([817789a](https://github.com/thebyte9/blaze/commit/817789a1b5fac364ff004981855e04d25c6d8544))
35
-
36
-
37
- ### Features
38
-
39
- * navigate on SearchFilter submit even without changes ([#4904](https://github.com/thebyte9/blaze/issues/4904)) ([082e72e](https://github.com/thebyte9/blaze/commit/082e72ee8fec81f93a6664d7375e947fa0972c32))
40
-
41
-
42
-
43
-
29
+ * remove card wrapper that is not required ([#4938](https://github.com/thebyte9/blaze/issues/4938)) ([52a449c](https://github.com/thebyte9/blaze/commit/52a449c4de5d8d806112ff4159b4d5556030e5c3))
44
30
 
45
- # [0.146.0-node18-core-styles-tooltips.15](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.14...v0.146.0-node18-core-styles-tooltips.15) (2025-09-23)
46
31
 
47
- **Note:** Version bump only for package @blaze-cms/react-page-builder
48
32
 
49
33
 
50
34
 
35
+ # [0.146.0-node18-tooltips.11](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.10...v0.146.0-node18-tooltips.11) (2025-10-01)
51
36
 
52
37
 
53
- # [0.146.0-node18-core-styles-tooltips.13](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.12...v0.146.0-node18-core-styles-tooltips.13) (2025-09-15)
38
+ ### Bug Fixes
54
39
 
55
- **Note:** Version bump only for package @blaze-cms/react-page-builder
40
+ * render all group sections ([#4903](https://github.com/thebyte9/blaze/issues/4903)) ([fb79560](https://github.com/thebyte9/blaze/commit/fb7956017d8486ed345cfee889882d8c756c117f))
41
+ * updated chart icon ([#4925](https://github.com/thebyte9/blaze/issues/4925)) ([0cc8721](https://github.com/thebyte9/blaze/commit/0cc87217889e3c5ab93adb4ba8d7506fc78d9316))
56
42
 
57
43
 
58
44
 
59
45
 
60
46
 
61
- # [0.146.0-node18-core-styles-tooltips.12](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.11...v0.146.0-node18-core-styles-tooltips.12) (2025-08-27)
47
+ # [0.146.0-node18-tooltips.8](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.7...v0.146.0-node18-tooltips.8) (2025-09-24)
62
48
 
63
49
 
64
50
  ### Bug Fixes
65
51
 
66
- * add react import missing from editor mode components ([#4885](https://github.com/thebyte9/blaze/issues/4885)) ([bb6e3eb](https://github.com/thebyte9/blaze/commit/bb6e3eb238a0f0263ed13a32e5121f49d21b2add))
67
-
68
-
69
-
70
-
71
-
72
- # [0.146.0-node18-core-styles-tooltips.11](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.10...v0.146.0-node18-core-styles-tooltips.11) (2025-08-27)
52
+ * update range when changing unit ([#4893](https://github.com/thebyte9/blaze/issues/4893)) ([817789a](https://github.com/thebyte9/blaze/commit/817789a1b5fac364ff004981855e04d25c6d8544))
73
53
 
74
54
 
75
55
  ### Features
76
56
 
77
- * add hook for search content component ([#4866](https://github.com/thebyte9/blaze/issues/4866)) ([2fe2fb9](https://github.com/thebyte9/blaze/commit/2fe2fb91a13199b2c7cabbd734c3b79f9c962cad))
78
- * add unit support to range filters ([fabc125](https://github.com/thebyte9/blaze/commit/fabc125355a4097c0fbe71e8419f207f93929926))
57
+ * navigate on SearchFilter submit even without changes ([#4904](https://github.com/thebyte9/blaze/issues/4904)) ([082e72e](https://github.com/thebyte9/blaze/commit/082e72ee8fec81f93a6664d7375e947fa0972c32))
79
58
 
80
59
 
81
60
 
82
61
 
83
62
 
84
- # [0.146.0-node18-core-styles-tooltips.5](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.4...v0.146.0-node18-core-styles-tooltips.5) (2025-07-18)
63
+ # [0.146.0-node18-tooltips.4](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.3...v0.146.0-node18-tooltips.4) (2025-09-22)
85
64
 
86
65
  **Note:** Version bump only for package @blaze-cms/react-page-builder
87
66
 
@@ -89,50 +68,33 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
89
68
 
90
69
 
91
70
 
92
- # [0.146.0-node18-core-styles-tooltips.4](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.3...v0.146.0-node18-core-styles-tooltips.4) (2025-07-10)
93
-
94
-
95
- ### Bug Fixes
96
-
97
- * add constant to avoid duplication ([07d6742](https://github.com/thebyte9/blaze/commit/07d6742f894ee8e063c17847fbb89559c23c5766))
98
- * respond to live blog item size changes for laze loaded image, live blog title and global light box fix ([#4730](https://github.com/thebyte9/blaze/issues/4730)) ([5dd38d8](https://github.com/thebyte9/blaze/commit/5dd38d8d9e5983c55d3053d440eb7ab618688920))
99
-
100
-
71
+ # [0.146.0-node18-tooltips.2](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-tooltips.1...v0.146.0-node18-tooltips.2) (2025-09-17)
101
72
 
102
-
103
-
104
- # [0.146.0-node18-core-styles-tooltips.1](https://github.com/thebyte9/blaze/compare/v0.146.0-node18-core-styles-tooltips.0...v0.146.0-node18-core-styles-tooltips.1) (2025-06-20)
105
-
106
-
107
- ### Features
108
-
109
- * added frontend links for editor mode ([#4801](https://github.com/thebyte9/blaze/issues/4801)) ([d5de370](https://github.com/thebyte9/blaze/commit/d5de370203abf467fcc3819d06c7375f4a6c1eb9))
73
+ **Note:** Version bump only for package @blaze-cms/react-page-builder
110
74
 
111
75
 
112
76
 
113
77
 
114
78
 
115
- # [0.146.0-node18-core-styles-tooltips.0](https://github.com/thebyte9/blaze/compare/v0.145.0...v0.146.0-node18-core-styles-tooltips.0) (2025-06-18)
79
+ # [0.146.0-node18-tooltips.0](https://github.com/thebyte9/blaze/compare/v0.145.0...v0.146.0-node18-tooltips.0) (2025-09-09)
116
80
 
117
81
 
118
82
  ### Bug Fixes
119
83
 
120
- * menu setdisplaychildren logic ([#4629](https://github.com/thebyte9/blaze/issues/4629)) ([16c5c67](https://github.com/thebyte9/blaze/commit/16c5c674f4db1505131a8557d34f5349cf33fc42))
84
+ * add constant to avoid duplication ([07d6742](https://github.com/thebyte9/blaze/commit/07d6742f894ee8e063c17847fbb89559c23c5766))
85
+ * add react import missing from editor mode components ([#4885](https://github.com/thebyte9/blaze/issues/4885)) ([bb6e3eb](https://github.com/thebyte9/blaze/commit/bb6e3eb238a0f0263ed13a32e5121f49d21b2add))
121
86
  * added space between image counter ([fe23887](https://github.com/thebyte9/blaze/commit/fe23887db201c8f8c4d3c2df6b0f84adac84df9f))
122
87
  * apply search filters even when shouldAddFilters is false ([ac82708](https://github.com/thebyte9/blaze/commit/ac827080df3001f4643a2d7a69b8f5502646cf77))
123
88
  * changed image lightbox counter ([3e22b68](https://github.com/thebyte9/blaze/commit/3e22b6817d60d2b4fd4beac713f864fdb5b6826e))
124
89
  * close menu item on url change ([#4669](https://github.com/thebyte9/blaze/issues/4669)) ([697750a](https://github.com/thebyte9/blaze/commit/697750ac771a5ea89702e990e23d6e78b1c45a67))
125
90
  * encode dynamic menu urls ([#4497](https://github.com/thebyte9/blaze/issues/4497)) ([43695a0](https://github.com/thebyte9/blaze/commit/43695a01408a85a5cd94704d9b78f36fd3fb509f))
126
91
  * exported necessary helpers from blaze react page builder ([#4466](https://github.com/thebyte9/blaze/issues/4466)) ([9a8d0db](https://github.com/thebyte9/blaze/commit/9a8d0db28dc0fbf7a2c93733fa1c7d61f293ac1b))
127
- * extended regex for #s in urls ([#4648](https://github.com/thebyte9/blaze/issues/4648)) ([089b19a](https://github.com/thebyte9/blaze/commit/089b19afaf503477429df3415fcd382e8b55745a))
128
92
  * fixed breaking tests, updated next to 14 ([fecb0e1](https://github.com/thebyte9/blaze/commit/fecb0e1d822bd69ebbaa084072a219f0fddd23f1))
129
93
  * fixed code smells ([95d874e](https://github.com/thebyte9/blaze/commit/95d874e7e392e8e39921c146c86987d515d090e5))
130
94
  * fixed more tests ([46a2fb9](https://github.com/thebyte9/blaze/commit/46a2fb9467f9f3c9cf320c9caf36c66503cc1f49))
131
95
  * fixed nan values on ranges ([#4582](https://github.com/thebyte9/blaze/issues/4582)) ([963ceec](https://github.com/thebyte9/blaze/commit/963ceec6b1eea027cb36b9358f7dee5e91e852ce))
132
96
  * fixed url change not reflecting on filters ([#4488](https://github.com/thebyte9/blaze/issues/4488)) ([0d6574f](https://github.com/thebyte9/blaze/commit/0d6574f5d5e698633c6032668cb8e1d914cf0342))
133
97
  * fixed url not being decoded when set on useEffect in SearchFilterContainer ([#4492](https://github.com/thebyte9/blaze/issues/4492)) ([64ba7a0](https://github.com/thebyte9/blaze/commit/64ba7a0260ee657561df5273fac3e537d6845db0))
134
- * fixed variable placing ([cbd733b](https://github.com/thebyte9/blaze/commit/cbd733b15bf9094bec7f2349267042fe22a54dac))
135
- * handle active url ([58be170](https://github.com/thebyte9/blaze/commit/58be170c8641abeb89e6b51dca9c5a75179c3dd7))
136
98
  * handle reseting filters and pagination with correct client scroll ([#4804](https://github.com/thebyte9/blaze/issues/4804)) ([8f098d9](https://github.com/thebyte9/blaze/commit/8f098d9240fe260911f399a54d91e235aa109b76))
137
99
  * improve filter and pagination scroll client side ([#4803](https://github.com/thebyte9/blaze/issues/4803)) ([b438755](https://github.com/thebyte9/blaze/commit/b4387551cb9fea3197c83db6b245ecd11a2dd64a))
138
100
  * lint errors in node 18 dev ([#4784](https://github.com/thebyte9/blaze/issues/4784)) ([5b102df](https://github.com/thebyte9/blaze/commit/5b102df10a77abc62aa94ffa476f1c2156c17947))
@@ -142,17 +104,15 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
142
104
  * permission should be returned when returnPermission=true ([#4775](https://github.com/thebyte9/blaze/issues/4775)) ([5f9f903](https://github.com/thebyte9/blaze/commit/5f9f90341c871d9dc76b035b7511e71cb7f964fe))
143
105
  * persist last selected filter ([#4526](https://github.com/thebyte9/blaze/issues/4526)) ([5b15b57](https://github.com/thebyte9/blaze/commit/5b15b57f5b008a6a9b71a0ea4d5a7bc75b1779a3))
144
106
  * remove limit from dynamic menu item check ([535e557](https://github.com/thebyte9/blaze/commit/535e5574817c3d4248419cf42961fdc27c28dd34))
145
- * remove limit from dynamic menu item check ([#4533](https://github.com/thebyte9/blaze/issues/4533)) ([2f9cba8](https://github.com/thebyte9/blaze/commit/2f9cba859223e0d2a81ce8bb816cfacbe7b474b6))
146
107
  * remove youtube origin api param as it breaks SSR ([#4538](https://github.com/thebyte9/blaze/issues/4538)) ([98f71c5](https://github.com/thebyte9/blaze/commit/98f71c501fa8f01f9187d3ab7807c8fc4eada3e6))
147
108
  * removed commented code ([5e93306](https://github.com/thebyte9/blaze/commit/5e933063ff0896dc67da0b33506231bc57427a40))
148
109
  * removed empty sapce ([461f486](https://github.com/thebyte9/blaze/commit/461f4868cf7a49208825851ff4dbc22a2c65974e))
149
110
  * resolving eslint warnings ([d4d1568](https://github.com/thebyte9/blaze/commit/d4d1568751c3f63a630bf396ff002c7fdc2532e8))
150
111
  * resolving eslint warnings ([a0fc18a](https://github.com/thebyte9/blaze/commit/a0fc18a4b4ef4f2f50edf2ae9fd24ab8fb4ef2bb))
112
+ * respond to live blog item size changes for laze loaded image, live blog title and global light box fix ([#4730](https://github.com/thebyte9/blaze/issues/4730)) ([5dd38d8](https://github.com/thebyte9/blaze/commit/5dd38d8d9e5983c55d3053d440eb7ab618688920))
151
113
  * set correct list limit ([#4714](https://github.com/thebyte9/blaze/issues/4714)) ([4b981a2](https://github.com/thebyte9/blaze/commit/4b981a29a19e78d1cbd72fa2ab1d867958e0bdee))
152
- * typo ([88018f9](https://github.com/thebyte9/blaze/commit/88018f96fe2559a981826acb67a60f5b02c94f04))
153
114
  * udpated yarn lock ([0cd4fa4](https://github.com/thebyte9/blaze/commit/0cd4fa4a185fca4b80b57e472badb771dd649ec2))
154
115
  * update content tab state using url instead of url and button click ([#4759](https://github.com/thebyte9/blaze/issues/4759)) ([f5beff6](https://github.com/thebyte9/blaze/commit/f5beff686c059fb4523e87b274da5d630285478e))
155
- * update snapshot ([f3e1029](https://github.com/thebyte9/blaze/commit/f3e1029d9eb713a3126f396966ad01516a6a6add))
156
116
  * updated jest dependences/setup ([6d6cba8](https://github.com/thebyte9/blaze/commit/6d6cba84b3c4ce4d4da7463098de19815a9fb7a6))
157
117
  * updated react-testing-library ([ec9a955](https://github.com/thebyte9/blaze/commit/ec9a955d8991989a8daf6910d084b2853f557647))
158
118
  * updated with dev ([90f545f](https://github.com/thebyte9/blaze/commit/90f545f1beabb35e26ba6fb2b45a7a0dfd072927))
@@ -166,10 +126,13 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
166
126
  ### Features
167
127
 
168
128
  * add Floating Side Button variant with MVP styling ([#4594](https://github.com/thebyte9/blaze/issues/4594)) ([effb843](https://github.com/thebyte9/blaze/commit/effb843fa9c226fbf07b3ad3dac359d81e164590))
129
+ * add hook for search content component ([#4866](https://github.com/thebyte9/blaze/issues/4866)) ([2fe2fb9](https://github.com/thebyte9/blaze/commit/2fe2fb91a13199b2c7cabbd734c3b79f9c962cad))
169
130
  * add list live variant ([#4727](https://github.com/thebyte9/blaze/issues/4727)) ([f482abf](https://github.com/thebyte9/blaze/commit/f482abfe03bf6db2d2d7eb462f8141ff80c1cc79))
170
131
  * add live property to content entities ([#4729](https://github.com/thebyte9/blaze/issues/4729)) ([8cdc5d6](https://github.com/thebyte9/blaze/commit/8cdc5d6b57945590ac97bd2da82c7ad74583c51d))
171
132
  * add tooltip support to parent select in DynamicRelation component ([#4603](https://github.com/thebyte9/blaze/issues/4603)) ([7767b5d](https://github.com/thebyte9/blaze/commit/7767b5dd7641d4b0c2477cffe6c0be8f9e8aa9dd))
133
+ * add unit support to range filters ([fabc125](https://github.com/thebyte9/blaze/commit/fabc125355a4097c0fbe71e8419f207f93929926))
172
134
  * add video component events for youtube and jwplayer ([7b4aa78](https://github.com/thebyte9/blaze/commit/7b4aa78dea3798d736b32aed13760cc67445780c))
135
+ * added frontend links for editor mode ([#4801](https://github.com/thebyte9/blaze/issues/4801)) ([d5de370](https://github.com/thebyte9/blaze/commit/d5de370203abf467fcc3819d06c7375f4a6c1eb9))
173
136
  * added Loading component ([#4469](https://github.com/thebyte9/blaze/issues/4469)) ([957f09b](https://github.com/thebyte9/blaze/commit/957f09bab84e2e08df879abf4eec17293d167e00))
174
137
  * allow customisation of refine search text ([#4489](https://github.com/thebyte9/blaze/issues/4489)) ([2082c4b](https://github.com/thebyte9/blaze/commit/2082c4b9322882cf779c9619d32ff44793324723))
175
138
  * dynamic menu items ([#4099](https://github.com/thebyte9/blaze/issues/4099)) ([c1e052b](https://github.com/thebyte9/blaze/commit/c1e052ba93218d4f603c697cf8b533d2d0befbf1))
@@ -177,7 +140,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
177
140
  * improve card click wrapper feature flag to make valid html ([#4495](https://github.com/thebyte9/blaze/issues/4495)) ([cc01f4d](https://github.com/thebyte9/blaze/commit/cc01f4dae15158c0896d48ed05cb32a64c8caa1b))
178
141
  * make editorview card placeholders dynamic ([#4722](https://github.com/thebyte9/blaze/issues/4722)) ([872be4a](https://github.com/thebyte9/blaze/commit/872be4ac9537fa8d52c705c4b120eec23a35afae))
179
142
  * move error message component to react page builder ([#4680](https://github.com/thebyte9/blaze/issues/4680)) ([5585514](https://github.com/thebyte9/blaze/commit/55855146a43300c702d7a8284828f592854950c7))
180
- * new preOpenMenu menu setting ([db23d0d](https://github.com/thebyte9/blaze/commit/db23d0d46a3bfe9db848ce5b52532c13e8ed5aa0))
181
143
  * update image-cdn-react package with fetchpolicy update ([#4564](https://github.com/thebyte9/blaze/issues/4564)) ([1b6b719](https://github.com/thebyte9/blaze/commit/1b6b71952dc63f90fdecde1c4214e59a3207d615))
182
144
  * updated react to 18 ([9335f84](https://github.com/thebyte9/blaze/commit/9335f8432b376494501abb9c3deef1ddaa9b35a8))
183
145
 
@@ -1,37 +1,68 @@
1
1
  "use strict";
2
2
 
3
+ require("core-js/modules/es.array.iterator.js");
3
4
  require("core-js/modules/es.object.define-property.js");
5
+ require("core-js/modules/es.object.get-own-property-descriptor.js");
6
+ require("core-js/modules/es.object.to-string.js");
7
+ require("core-js/modules/es.string.iterator.js");
8
+ require("core-js/modules/es.weak-map.js");
9
+ require("core-js/modules/web.dom-collections.iterator.js");
4
10
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
11
+ var _typeof = require("@babel/runtime/helpers/typeof");
5
12
  Object.defineProperty(exports, "__esModule", {
6
13
  value: true
7
14
  });
8
15
  exports["default"] = void 0;
9
16
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
17
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
- var _react = _interopRequireDefault(require("react"));
18
+ require("core-js/modules/es.array.includes.js");
19
+ require("core-js/modules/es.object.values.js");
20
+ require("core-js/modules/es.string.includes.js");
21
+ var _react = _interopRequireWildcard(require("react"));
12
22
  var _propTypes = _interopRequireDefault(require("prop-types"));
23
+ var _constants = require("./constants");
13
24
  var _ContentGroupTabs = _interopRequireDefault(require("./ContentGroupTabs"));
25
+ var _ContentGroupAccordion = _interopRequireDefault(require("./ContentGroupAccordion"));
14
26
  var _helpers = require("./helpers");
15
- var _excluded = ["contentType", "children"];
27
+ var _getStructuredDataProperties = _interopRequireDefault(require("./helpers/get-structured-data-properties"));
28
+ var _excluded = ["contentType", "isFaqContent", "children"],
29
+ _excluded2 = ["topWrapperProps"];
30
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
31
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
32
+ var VALID_TYPES = Object.values(_constants.CONTENT_GROUP_TYPES);
16
33
  var ContentGroup = function ContentGroup(_ref) {
17
- var _children$props;
34
+ var _children$props, _children$props$child;
18
35
  var contentType = _ref.contentType,
36
+ isFaqContent = _ref.isFaqContent,
19
37
  children = _ref.children,
20
38
  props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
21
- var groupSections = children === null || children === void 0 ? void 0 : (_children$props = children.props) === null || _children$props === void 0 ? void 0 : _children$props.children[1];
22
- if (!groupSections || !groupSections.length) return '';
23
- if (contentType !== 'tab' && contentType !== 'sidepanel') return '';
39
+ var groupSections = children === null || children === void 0 ? void 0 : (_children$props = children.props) === null || _children$props === void 0 ? void 0 : (_children$props$child = _children$props.children) === null || _children$props$child === void 0 ? void 0 : _children$props$child[1];
40
+ var GroupComponent = (0, _react.useMemo)(function () {
41
+ return contentType === _constants.CONTENT_GROUP_TYPES.ACCORDION ? _ContentGroupAccordion["default"] : _ContentGroupTabs["default"];
42
+ }, [contentType]);
43
+ var WrapperComponent = (0, _react.useMemo)(function () {
44
+ return !isFaqContent ? _react.Fragment : 'div';
45
+ }, [isFaqContent]);
46
+ var _useMemo = (0, _react.useMemo)(function () {
47
+ return (0, _getStructuredDataProperties["default"])(isFaqContent);
48
+ }, [isFaqContent]),
49
+ topWrapperProps = _useMemo.topWrapperProps,
50
+ schemaProperties = (0, _objectWithoutProperties2["default"])(_useMemo, _excluded2);
51
+ if (!groupSections || !groupSections.length || !VALID_TYPES.includes(contentType)) return '';
24
52
  var sectionsData = (0, _helpers.getSectionsData)(groupSections);
25
- return /*#__PURE__*/_react["default"].createElement(_ContentGroupTabs["default"], (0, _extends2["default"])({
53
+ return /*#__PURE__*/_react["default"].createElement(WrapperComponent, topWrapperProps, /*#__PURE__*/_react["default"].createElement(GroupComponent, (0, _extends2["default"])({
26
54
  contentType: contentType,
27
55
  groupSections: groupSections,
28
56
  sectionsData: sectionsData
29
- }, props));
57
+ }, props, schemaProperties)));
30
58
  };
31
59
  ContentGroup.propTypes = {
32
60
  children: _propTypes["default"].object.isRequired,
33
- contentType: _propTypes["default"].string.isRequired
61
+ contentType: _propTypes["default"].oneOf(VALID_TYPES).isRequired,
62
+ isFaqContent: _propTypes["default"].bool
63
+ };
64
+ ContentGroup.defaultProps = {
65
+ isFaqContent: false
34
66
  };
35
- ContentGroup.defaultProps = {};
36
67
  var _default = exports["default"] = ContentGroup;
37
68
  //# sourceMappingURL=ContentGroup.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContentGroup.js","names":["_react","_interopRequireDefault","require","_propTypes","_ContentGroupTabs","_helpers","_excluded","ContentGroup","_ref","_children$props","contentType","children","props","_objectWithoutProperties2","groupSections","length","sectionsData","getSectionsData","createElement","_extends2","propTypes","PropTypes","object","isRequired","string","defaultProps","_default","exports"],"sources":["../../../src/components/ContentGroup/ContentGroup.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ContentGroupTabs from './ContentGroupTabs';\nimport { getSectionsData } from './helpers';\n\nconst ContentGroup = ({ contentType, children, ...props }) => {\n const groupSections = children?.props?.children[1];\n if (!groupSections || !groupSections.length) return '';\n if (contentType !== 'tab' && contentType !== 'sidepanel') return '';\n const sectionsData = getSectionsData(groupSections);\n\n return (\n <ContentGroupTabs\n contentType={contentType}\n groupSections={groupSections}\n sectionsData={sectionsData}\n {...props}\n />\n );\n};\n\nContentGroup.propTypes = {\n children: PropTypes.object.isRequired,\n contentType: PropTypes.string.isRequired\n};\n\nContentGroup.defaultProps = {};\n\nexport default ContentGroup;\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,iBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAA4C,IAAAI,SAAA;AAE5C,IAAMC,YAAY,GAAG,SAAfA,YAAYA,CAAAC,IAAA,EAA4C;EAAA,IAAAC,eAAA;EAAA,IAAtCC,WAAW,GAAAF,IAAA,CAAXE,WAAW;IAAEC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IAAKC,KAAK,OAAAC,yBAAA,aAAAL,IAAA,EAAAF,SAAA;EACrD,IAAMQ,aAAa,GAAGH,QAAQ,aAARA,QAAQ,wBAAAF,eAAA,GAARE,QAAQ,CAAEC,KAAK,cAAAH,eAAA,uBAAfA,eAAA,CAAiBE,QAAQ,CAAC,CAAC,CAAC;EAClD,IAAI,CAACG,aAAa,IAAI,CAACA,aAAa,CAACC,MAAM,EAAE,OAAO,EAAE;EACtD,IAAIL,WAAW,KAAK,KAAK,IAAIA,WAAW,KAAK,WAAW,EAAE,OAAO,EAAE;EACnE,IAAMM,YAAY,GAAG,IAAAC,wBAAe,EAACH,aAAa,CAAC;EAEnD,oBACEd,MAAA,YAAAkB,aAAA,CAACd,iBAAA,WAAgB,MAAAe,SAAA;IACfT,WAAW,EAAEA,WAAY;IACzBI,aAAa,EAAEA,aAAc;IAC7BE,YAAY,EAAEA;EAAa,GACvBJ,KAAK,CACV,CAAC;AAEN,CAAC;AAEDL,YAAY,CAACa,SAAS,GAAG;EACvBT,QAAQ,EAAEU,qBAAS,CAACC,MAAM,CAACC,UAAU;EACrCb,WAAW,EAAEW,qBAAS,CAACG,MAAM,CAACD;AAChC,CAAC;AAEDhB,YAAY,CAACkB,YAAY,GAAG,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEhBpB,YAAY","ignoreList":[]}
1
+ {"version":3,"file":"ContentGroup.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_constants","_ContentGroupTabs","_ContentGroupAccordion","_helpers","_getStructuredDataProperties","_excluded","_excluded2","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","VALID_TYPES","values","CONTENT_GROUP_TYPES","ContentGroup","_ref","_children$props","_children$props$child","contentType","isFaqContent","children","props","_objectWithoutProperties2","groupSections","GroupComponent","useMemo","ACCORDION","ContentGroupAccordion","ContentGroupTabs","WrapperComponent","Fragment","_useMemo","getStructuredDataProperties","topWrapperProps","schemaProperties","length","includes","sectionsData","getSectionsData","createElement","_extends2","propTypes","PropTypes","object","isRequired","oneOf","bool","defaultProps","_default","exports"],"sources":["../../../src/components/ContentGroup/ContentGroup.js"],"sourcesContent":["import React, { Fragment, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport { CONTENT_GROUP_TYPES } from './constants';\nimport ContentGroupTabs from './ContentGroupTabs';\nimport ContentGroupAccordion from './ContentGroupAccordion';\nimport { getSectionsData } from './helpers';\nimport getStructuredDataProperties from './helpers/get-structured-data-properties';\n\nconst VALID_TYPES = Object.values(CONTENT_GROUP_TYPES);\n\nconst ContentGroup = ({ contentType, isFaqContent, children, ...props }) => {\n const groupSections = children?.props?.children?.[1];\n\n const GroupComponent = useMemo(\n () =>\n contentType === CONTENT_GROUP_TYPES.ACCORDION ? ContentGroupAccordion : ContentGroupTabs,\n [contentType]\n );\n const WrapperComponent = useMemo(() => (!isFaqContent ? Fragment : 'div'), [isFaqContent]);\n\n const { topWrapperProps, ...schemaProperties } = useMemo(\n () => getStructuredDataProperties(isFaqContent),\n [isFaqContent]\n );\n\n if (!groupSections || !groupSections.length || !VALID_TYPES.includes(contentType)) return '';\n\n const sectionsData = getSectionsData(groupSections);\n\n return (\n <WrapperComponent {...topWrapperProps}>\n <GroupComponent\n contentType={contentType}\n groupSections={groupSections}\n sectionsData={sectionsData}\n {...props}\n {...schemaProperties}\n />\n </WrapperComponent>\n );\n};\n\nContentGroup.propTypes = {\n children: PropTypes.object.isRequired,\n contentType: PropTypes.oneOf(VALID_TYPES).isRequired,\n isFaqContent: PropTypes.bool\n};\n\nContentGroup.defaultProps = {\n isFaqContent: false\n};\n\nexport default ContentGroup;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CA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B,QAAQ,CAAClB,WAAW,CAAC,EAAE,OAAO,EAAE;EAE5F,IAAMmB,YAAY,GAAG,IAAAC,wBAAe,EAACf,aAAa,CAAC;EAEnD,oBACE5C,MAAA,YAAA4D,aAAA,CAACV,gBAAgB,EAAKI,eAAe,eACnCtD,MAAA,YAAA4D,aAAA,CAACf,cAAc,MAAAgB,SAAA;IACbtB,WAAW,EAAEA,WAAY;IACzBK,aAAa,EAAEA,aAAc;IAC7Bc,YAAY,EAAEA;EAAa,GACvBhB,KAAK,EACLa,gBAAgB,CACrB,CACe,CAAC;AAEvB,CAAC;AAEDpB,YAAY,CAAC2B,SAAS,GAAG;EACvBrB,QAAQ,EAAEsB,qBAAS,CAACC,MAAM,CAACC,UAAU;EACrC1B,WAAW,EAAEwB,qBAAS,CAACG,KAAK,CAAClC,WAAW,CAAC,CAACiC,UAAU;EACpDzB,YAAY,EAAEuB,qBAAS,CAACI;AAC1B,CAAC;AAEDhC,YAAY,CAACiC,YAAY,GAAG;EAC1B5B,YAAY,EAAE;AAChB,CAAC;AAAC,IAAA6B,QAAA,GAAAC,OAAA,cAEanC,YAAY","ignoreList":[]}
@@ -0,0 +1,175 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.object.define-property.js");
4
+ require("core-js/modules/es.object.get-own-property-descriptor.js");
5
+ require("core-js/modules/es.weak-map.js");
6
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
7
+ var _typeof = require("@babel/runtime/helpers/typeof");
8
+ Object.defineProperty(exports, "__esModule", {
9
+ value: true
10
+ });
11
+ exports["default"] = void 0;
12
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
14
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
15
+ require("core-js/modules/es.array.concat.js");
16
+ require("core-js/modules/es.array.includes.js");
17
+ require("core-js/modules/es.array.iterator.js");
18
+ require("core-js/modules/es.array.map.js");
19
+ require("core-js/modules/es.function.name.js");
20
+ require("core-js/modules/es.object.to-string.js");
21
+ require("core-js/modules/es.object.values.js");
22
+ require("core-js/modules/es.regexp.exec.js");
23
+ require("core-js/modules/es.set.js");
24
+ require("core-js/modules/es.string.includes.js");
25
+ require("core-js/modules/es.string.iterator.js");
26
+ require("core-js/modules/es.string.replace.js");
27
+ require("core-js/modules/es.string.trim.js");
28
+ require("core-js/modules/web.dom-collections.iterator.js");
29
+ var _react = _interopRequireWildcard(require("react"));
30
+ var _propTypes = _interopRequireDefault(require("prop-types"));
31
+ var _classnames3 = _interopRequireDefault(require("classnames"));
32
+ var _router = require("next/router");
33
+ var _vsc = require("react-icons/vsc");
34
+ var _constants = require("./constants");
35
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
36
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
37
+ var ContentGroupAccordion = function ContentGroupAccordion(_ref) {
38
+ var name = _ref.name,
39
+ groupSections = _ref.groupSections,
40
+ sectionsData = _ref.sectionsData,
41
+ VariantComponent = _ref.VariantComponent,
42
+ openState = _ref.openState,
43
+ groupSectionProps = _ref.groupSectionProps,
44
+ groupSectionTitleProps = _ref.groupSectionTitleProps,
45
+ groupContentWrapperProps = _ref.groupContentWrapperProps,
46
+ groupContentProps = _ref.groupContentProps;
47
+ var router = (0, _router.useRouter)();
48
+ var asPath = router.asPath;
49
+ var sectionPairs = (0, _react.useMemo)(function () {
50
+ return sectionsData.map(function (_ref2) {
51
+ var _ref3 = (0, _slicedToArray2["default"])(_ref2, 2),
52
+ sectionName = _ref3[0],
53
+ sectionLabel = _ref3[1];
54
+ return {
55
+ sectionName: sectionName,
56
+ sectionLabel: sectionLabel,
57
+ panelId: "".concat(sectionName, "-panel")
58
+ };
59
+ });
60
+ }, [sectionsData]);
61
+ var sectionNames = (0, _react.useMemo)(function () {
62
+ return sectionPairs.map(function (p) {
63
+ return p.sectionName;
64
+ });
65
+ }, [sectionPairs]);
66
+ var baseInitialOpen = (0, _react.useMemo)(function () {
67
+ if (openState === _constants.OPEN_STATES.ALL_OPEN) return new Set(sectionNames);
68
+ if (openState === _constants.OPEN_STATES.ALL_CLOSED && sectionNames.length) return new Set();
69
+ return new Set([sectionNames[0]]);
70
+ }, [openState, sectionNames]);
71
+ var _useState = (0, _react.useState)(baseInitialOpen),
72
+ _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
73
+ openSet = _useState2[0],
74
+ setOpenSet = _useState2[1];
75
+ (0, _react.useEffect)(function () {
76
+ var rawHash = (asPath.split('#')[1] || '').trim();
77
+ if (rawHash && sectionNames.includes(rawHash) && !openSet.has(rawHash)) {
78
+ setOpenSet(function (prev) {
79
+ var next = new Set(prev);
80
+ next.add(rawHash);
81
+ return next;
82
+ });
83
+ }
84
+ },
85
+ // eslint-disable-next-line react-hooks/exhaustive-deps
86
+ [asPath, sectionNames]);
87
+ var WrapperComponent = VariantComponent || 'div';
88
+ var baseClass = "".concat(_constants.CONTENT_GROUP, "-accordion");
89
+ var itemsClass = "".concat(baseClass, "__items");
90
+ var itemClass = "".concat(baseClass, "__item");
91
+ var headerBtnClass = "".concat(baseClass, "__header-btn");
92
+ var panelClass = "".concat(baseClass, "__panel");
93
+ var headingClass = "".concat(baseClass, "__heading");
94
+ var titleClass = "".concat(baseClass, "__title");
95
+ var chevronClass = "".concat(baseClass, "__chevron");
96
+ var chevronIconClass = "".concat(baseClass, "__chevron-icon");
97
+ var onToggle = function onToggle(sectionName) {
98
+ setOpenSet(function (prev) {
99
+ var next = new Set(prev);
100
+ var willOpen = !next.has(sectionName);
101
+ if (willOpen) next.add(sectionName);else next["delete"](sectionName);
102
+ var baseUrl = asPath.split('#')[0];
103
+ var newUrl = willOpen ? "".concat(baseUrl, "#").concat(sectionName) : baseUrl;
104
+ router.replace("/Resolver", newUrl, {
105
+ shallow: true,
106
+ scroll: false
107
+ });
108
+ return next;
109
+ });
110
+ };
111
+ return /*#__PURE__*/_react["default"].createElement("div", {
112
+ className: baseClass
113
+ }, /*#__PURE__*/_react["default"].createElement("div", {
114
+ className: itemsClass,
115
+ "aria-label": name
116
+ }, groupSections.map(function (groupSection, index) {
117
+ var _sectionPairs$index = sectionPairs[index],
118
+ sectionName = _sectionPairs$index.sectionName,
119
+ sectionLabel = _sectionPairs$index.sectionLabel,
120
+ panelId = _sectionPairs$index.panelId;
121
+ var isOpen = openSet.has(sectionName);
122
+ return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
123
+ key: sectionName,
124
+ className: (0, _classnames3["default"])(itemClass, (0, _defineProperty2["default"])({}, "".concat(itemClass, "--open"), isOpen))
125
+ }, groupSectionProps), /*#__PURE__*/_react["default"].createElement("h3", {
126
+ className: headingClass
127
+ }, /*#__PURE__*/_react["default"].createElement("button", {
128
+ id: sectionName,
129
+ type: "button",
130
+ className: (0, _classnames3["default"])(headerBtnClass, (0, _defineProperty2["default"])({}, "".concat(headerBtnClass, "--open"), isOpen)),
131
+ "aria-expanded": isOpen,
132
+ "aria-controls": panelId,
133
+ onClick: function onClick() {
134
+ return onToggle(sectionName);
135
+ }
136
+ }, /*#__PURE__*/_react["default"].createElement("span", (0, _extends2["default"])({
137
+ className: titleClass
138
+ }, groupSectionTitleProps), sectionLabel), /*#__PURE__*/_react["default"].createElement("span", {
139
+ "aria-hidden": "true",
140
+ className: chevronClass
141
+ }, isOpen ? /*#__PURE__*/_react["default"].createElement(_vsc.VscChevronUp, {
142
+ className: chevronIconClass
143
+ }) : /*#__PURE__*/_react["default"].createElement(_vsc.VscChevronDown, {
144
+ className: chevronIconClass
145
+ })))), /*#__PURE__*/_react["default"].createElement(WrapperComponent, (0, _extends2["default"])({
146
+ id: panelId,
147
+ role: "region",
148
+ "aria-labelledby": sectionName,
149
+ className: panelClass,
150
+ hidden: !isOpen,
151
+ "data-section": sectionName
152
+ }, groupContentWrapperProps), /*#__PURE__*/_react["default"].createElement("div", groupContentProps, groupSection)));
153
+ })));
154
+ };
155
+ ContentGroupAccordion.propTypes = {
156
+ name: _propTypes["default"].string.isRequired,
157
+ groupSections: _propTypes["default"].array.isRequired,
158
+ sectionsData: _propTypes["default"].array.isRequired,
159
+ VariantComponent: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].elementType]),
160
+ openState: _propTypes["default"].oneOf(Object.values(_constants.OPEN_STATES)),
161
+ groupSectionProps: _propTypes["default"].object,
162
+ groupSectionTitleProps: _propTypes["default"].object,
163
+ groupContentWrapperProps: _propTypes["default"].object,
164
+ groupContentProps: _propTypes["default"].object
165
+ };
166
+ ContentGroupAccordion.defaultProps = {
167
+ VariantComponent: null,
168
+ openState: _constants.OPEN_STATES.ALL_CLOSED,
169
+ groupSectionProps: {},
170
+ groupSectionTitleProps: {},
171
+ groupContentWrapperProps: {},
172
+ groupContentProps: {}
173
+ };
174
+ var _default = exports["default"] = ContentGroupAccordion;
175
+ //# sourceMappingURL=ContentGroupAccordion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentGroupAccordion.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_classnames3","_router","_vsc","_constants","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ContentGroupAccordion","_ref","name","groupSections","sectionsData","VariantComponent","openState","groupSectionProps","groupSectionTitleProps","groupContentWrapperProps","groupContentProps","router","useRouter","asPath","sectionPairs","useMemo","map","_ref2","_ref3","_slicedToArray2","sectionName","sectionLabel","panelId","concat","sectionNames","p","baseInitialOpen","OPEN_STATES","ALL_OPEN","Set","ALL_CLOSED","length","_useState","useState","_useState2","openSet","setOpenSet","useEffect","rawHash","split","trim","includes","prev","next","add","WrapperComponent","baseClass","CONTENT_GROUP","itemsClass","itemClass","headerBtnClass","panelClass","headingClass","titleClass","chevronClass","chevronIconClass","onToggle","willOpen","baseUrl","newUrl","replace","shallow","scroll","createElement","className","groupSection","index","_sectionPairs$index","isOpen","_extends2","key","classnames","_defineProperty2","id","type","onClick","VscChevronUp","VscChevronDown","role","hidden","propTypes","PropTypes","string","isRequired","array","oneOfType","func","elementType","oneOf","values","object","defaultProps","_default","exports"],"sources":["../../../src/components/ContentGroup/ContentGroupAccordion.js"],"sourcesContent":["import React, { useEffect, useMemo, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport { useRouter } from 'next/router';\nimport { VscChevronUp, VscChevronDown } from 'react-icons/vsc';\nimport { CONTENT_GROUP, OPEN_STATES } from './constants';\n\nconst ContentGroupAccordion = ({\n name,\n groupSections,\n sectionsData,\n VariantComponent,\n openState,\n groupSectionProps,\n groupSectionTitleProps,\n groupContentWrapperProps,\n groupContentProps\n}) => {\n const router = useRouter();\n const { asPath } = router;\n\n const sectionPairs = useMemo(\n () =>\n sectionsData.map(([sectionName, sectionLabel]) => ({\n sectionName,\n sectionLabel,\n panelId: `${sectionName}-panel`\n })),\n [sectionsData]\n );\n\n const sectionNames = useMemo(() => sectionPairs.map(p => p.sectionName), [sectionPairs]);\n\n const baseInitialOpen = useMemo(\n () => {\n if (openState === OPEN_STATES.ALL_OPEN) return new Set(sectionNames);\n if (openState === OPEN_STATES.ALL_CLOSED && sectionNames.length) return new Set();\n\n return new Set([sectionNames[0]]);\n },\n [openState, sectionNames]\n );\n\n const [openSet, setOpenSet] = useState(baseInitialOpen);\n\n useEffect(\n () => {\n const rawHash = (asPath.split('#')[1] || '').trim();\n if (rawHash && sectionNames.includes(rawHash) && !openSet.has(rawHash)) {\n setOpenSet(prev => {\n const next = new Set(prev);\n next.add(rawHash);\n return next;\n });\n }\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [asPath, sectionNames]\n );\n\n const WrapperComponent = VariantComponent || 'div';\n\n const baseClass = `${CONTENT_GROUP}-accordion`;\n const itemsClass = `${baseClass}__items`;\n const itemClass = `${baseClass}__item`;\n const headerBtnClass = `${baseClass}__header-btn`;\n const panelClass = `${baseClass}__panel`;\n const headingClass = `${baseClass}__heading`;\n const titleClass = `${baseClass}__title`;\n const chevronClass = `${baseClass}__chevron`;\n const chevronIconClass = `${baseClass}__chevron-icon`;\n\n const onToggle = sectionName => {\n setOpenSet(prev => {\n const next = new Set(prev);\n const willOpen = !next.has(sectionName);\n\n if (willOpen) next.add(sectionName);\n else next.delete(sectionName);\n\n const baseUrl = asPath.split('#')[0];\n const newUrl = willOpen ? `${baseUrl}#${sectionName}` : baseUrl;\n\n router.replace(`/Resolver`, newUrl, { shallow: true, scroll: false });\n\n return next;\n });\n };\n\n return (\n <div className={baseClass}>\n <div className={itemsClass} aria-label={name}>\n {groupSections.map((groupSection, index) => {\n const { sectionName, sectionLabel, panelId } = sectionPairs[index];\n const isOpen = openSet.has(sectionName);\n\n return (\n <div\n key={sectionName}\n className={classnames(itemClass, { [`${itemClass}--open`]: isOpen })}\n {...groupSectionProps}>\n <h3 className={headingClass}>\n <button\n id={sectionName}\n type=\"button\"\n className={classnames(headerBtnClass, { [`${headerBtnClass}--open`]: isOpen })}\n aria-expanded={isOpen}\n aria-controls={panelId}\n onClick={() => onToggle(sectionName)}>\n <span className={titleClass} {...groupSectionTitleProps}>\n {sectionLabel}\n </span>\n\n <span aria-hidden=\"true\" className={chevronClass}>\n {isOpen ? (\n <VscChevronUp className={chevronIconClass} />\n ) : (\n <VscChevronDown className={chevronIconClass} />\n )}\n </span>\n </button>\n </h3>\n\n <WrapperComponent\n id={panelId}\n role=\"region\"\n aria-labelledby={sectionName}\n className={panelClass}\n hidden={!isOpen}\n data-section={sectionName}\n {...groupContentWrapperProps}>\n <div {...groupContentProps}>{groupSection}</div>\n </WrapperComponent>\n </div>\n );\n })}\n </div>\n </div>\n );\n};\n\nContentGroupAccordion.propTypes = {\n name: PropTypes.string.isRequired,\n groupSections: PropTypes.array.isRequired,\n sectionsData: PropTypes.array.isRequired,\n VariantComponent: PropTypes.oneOfType([PropTypes.func, PropTypes.elementType]),\n openState: PropTypes.oneOf(Object.values(OPEN_STATES)),\n groupSectionProps: PropTypes.object,\n groupSectionTitleProps: PropTypes.object,\n groupContentWrapperProps: PropTypes.object,\n groupContentProps: PropTypes.object\n};\n\nContentGroupAccordion.defaultProps = {\n VariantComponent: null,\n openState: OPEN_STATES.ALL_CLOSED,\n groupSectionProps: {},\n groupSectionTitleProps: {},\n groupContentWrapperProps: {},\n groupContentProps: {}\n};\n\nexport default ContentGroupAccordion;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,IAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AAAyD,SAAAO,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAT,wBAAAS,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,gBAAAK,OAAA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AAU;EACxC9E,gBAAgB,EAAE4E,qBAAS,CAACI,SAAS,CAAC,CAACJ,qBAAS,CAACK,IAAI,EAAEL,qBAAS,CAACM,WAAW,CAAC,CAAC;EAC9EjF,SAAS,EAAE2E,qBAAS,CAACO,KAAK,CAAChG,MAAM,CAACiG,MAAM,CAAC9D,sBAAW,CAAC,CAAC;EACtDpB,iBAAiB,EAAE0E,qBAAS,CAACS,MAAM;EACnClF,sBAAsB,EAAEyE,qBAAS,CAACS,MAAM;EACxCjF,wBAAwB,EAAEwE,qBAAS,CAACS,MAAM;EAC1ChF,iBAAiB,EAAEuE,qBAAS,CAACS;AAC/B,CAAC;AAED1F,qBAAqB,CAAC2F,YAAY,GAAG;EACnCtF,gBAAgB,EAAE,IAAI;EACtBC,SAAS,EAAEqB,sBAAW,CAACG,UAAU;EACjCvB,iBAAiB,EAAE,CAAC,CAAC;EACrBC,sBAAsB,EAAE,CAAC,CAAC;EAC1BC,wBAAwB,EAAE,CAAC,CAAC;EAC5BC,iBAAiB,EAAE,CAAC;AACtB,CAAC;AAAC,IAAAkF,QAAA,GAAAC,OAAA,cAEa7F,qBAAqB","ignoreList":[]}
@@ -4,10 +4,22 @@ require("core-js/modules/es.object.define-property.js");
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.TABS = exports.TAB = exports.SIDEPANEL = exports.PANEL = exports.CONTENT_GROUP = void 0;
7
+ exports.TABS = exports.TAB = exports.SIDEPANEL = exports.PANEL = exports.OPEN_STATES = exports.FAQ_PAGE = exports.CONTENT_GROUP_TYPES = exports.CONTENT_GROUP = void 0;
8
+ require("core-js/modules/es.object.freeze.js");
8
9
  var TAB = exports.TAB = 'tab';
9
10
  var TABS = exports.TABS = 'tabs';
10
11
  var SIDEPANEL = exports.SIDEPANEL = 'sidepanel';
11
12
  var CONTENT_GROUP = exports.CONTENT_GROUP = 'content-group';
12
13
  var PANEL = exports.PANEL = 'panel';
14
+ var FAQ_PAGE = exports.FAQ_PAGE = 'https://schema.org/FAQPage';
15
+ var CONTENT_GROUP_TYPES = exports.CONTENT_GROUP_TYPES = Object.freeze({
16
+ TAB: 'tab',
17
+ SIDEPANEL: 'sidepanel',
18
+ ACCORDION: 'accordion'
19
+ });
20
+ var OPEN_STATES = exports.OPEN_STATES = Object.freeze({
21
+ FIRST_OPEN: 'first_open',
22
+ ALL_CLOSED: 'all_closed',
23
+ ALL_OPEN: 'all_open'
24
+ });
13
25
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","names":["TAB","exports","TABS","SIDEPANEL","CONTENT_GROUP","PANEL"],"sources":["../../../src/components/ContentGroup/constants.js"],"sourcesContent":["const TAB = 'tab';\nconst TABS = 'tabs';\nconst SIDEPANEL = 'sidepanel';\nconst CONTENT_GROUP = 'content-group';\nconst PANEL = 'panel';\n\nexport { TAB, TABS, SIDEPANEL, CONTENT_GROUP, PANEL };\n"],"mappings":";;;;;;;AAAA,IAAMA,GAAG,GAAAC,OAAA,CAAAD,GAAA,GAAG,KAAK;AACjB,IAAME,IAAI,GAAAD,OAAA,CAAAC,IAAA,GAAG,MAAM;AACnB,IAAMC,SAAS,GAAAF,OAAA,CAAAE,SAAA,GAAG,WAAW;AAC7B,IAAMC,aAAa,GAAAH,OAAA,CAAAG,aAAA,GAAG,eAAe;AACrC,IAAMC,KAAK,GAAAJ,OAAA,CAAAI,KAAA,GAAG,OAAO","ignoreList":[]}
1
+ {"version":3,"file":"constants.js","names":["TAB","exports","TABS","SIDEPANEL","CONTENT_GROUP","PANEL","FAQ_PAGE","CONTENT_GROUP_TYPES","Object","freeze","ACCORDION","OPEN_STATES","FIRST_OPEN","ALL_CLOSED","ALL_OPEN"],"sources":["../../../src/components/ContentGroup/constants.js"],"sourcesContent":["const TAB = 'tab';\nconst TABS = 'tabs';\nconst SIDEPANEL = 'sidepanel';\nconst CONTENT_GROUP = 'content-group';\nconst PANEL = 'panel';\nconst FAQ_PAGE = 'https://schema.org/FAQPage';\n\nconst CONTENT_GROUP_TYPES = Object.freeze({\n TAB: 'tab',\n SIDEPANEL: 'sidepanel',\n ACCORDION: 'accordion'\n});\n\nconst OPEN_STATES = Object.freeze({\n FIRST_OPEN: 'first_open',\n ALL_CLOSED: 'all_closed',\n ALL_OPEN: 'all_open'\n});\n\nexport { TAB, TABS, SIDEPANEL, CONTENT_GROUP, PANEL, CONTENT_GROUP_TYPES, OPEN_STATES, FAQ_PAGE };\n"],"mappings":";;;;;;;;AAAA,IAAMA,GAAG,GAAAC,OAAA,CAAAD,GAAA,GAAG,KAAK;AACjB,IAAME,IAAI,GAAAD,OAAA,CAAAC,IAAA,GAAG,MAAM;AACnB,IAAMC,SAAS,GAAAF,OAAA,CAAAE,SAAA,GAAG,WAAW;AAC7B,IAAMC,aAAa,GAAAH,OAAA,CAAAG,aAAA,GAAG,eAAe;AACrC,IAAMC,KAAK,GAAAJ,OAAA,CAAAI,KAAA,GAAG,OAAO;AACrB,IAAMC,QAAQ,GAAAL,OAAA,CAAAK,QAAA,GAAG,4BAA4B;AAE7C,IAAMC,mBAAmB,GAAAN,OAAA,CAAAM,mBAAA,GAAGC,MAAM,CAACC,MAAM,CAAC;EACxCT,GAAG,EAAE,KAAK;EACVG,SAAS,EAAE,WAAW;EACtBO,SAAS,EAAE;AACb,CAAC,CAAC;AAEF,IAAMC,WAAW,GAAAV,OAAA,CAAAU,WAAA,GAAGH,MAAM,CAACC,MAAM,CAAC;EAChCG,UAAU,EAAE,YAAY;EACxBC,UAAU,EAAE,YAAY;EACxBC,QAAQ,EAAE;AACZ,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.object.define-property.js");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports["default"] = void 0;
8
+ var getStructuredDataProperties = function getStructuredDataProperties(isFaqContent) {
9
+ var properties = {
10
+ topWrapperProps: {},
11
+ groupSectionProps: {},
12
+ groupSectionTitleProps: {},
13
+ groupContentWrapperProps: {},
14
+ groupContentProps: {}
15
+ };
16
+ if (!isFaqContent) return properties;
17
+ properties.topWrapperProps = {
18
+ itemScope: true,
19
+ itemType: 'https://schema.org/FAQPage'
20
+ };
21
+ properties.groupSectionProps = {
22
+ itemScope: true,
23
+ itemProp: 'mainEntity',
24
+ itemType: 'https://schema.org/Question'
25
+ };
26
+ properties.groupSectionTitleProps = {
27
+ itemProp: 'name'
28
+ };
29
+ properties.groupContentWrapperProps = {
30
+ itemScope: true,
31
+ itemProp: 'acceptedAnswer',
32
+ itemType: 'https://schema.org/Answer'
33
+ };
34
+ properties.groupContentProps = {
35
+ itemProp: 'text'
36
+ };
37
+ return properties;
38
+ };
39
+ var _default = exports["default"] = getStructuredDataProperties;
40
+ //# sourceMappingURL=get-structured-data-properties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-structured-data-properties.js","names":["getStructuredDataProperties","isFaqContent","properties","topWrapperProps","groupSectionProps","groupSectionTitleProps","groupContentWrapperProps","groupContentProps","itemScope","itemType","itemProp","_default","exports"],"sources":["../../../../src/components/ContentGroup/helpers/get-structured-data-properties.js"],"sourcesContent":["const getStructuredDataProperties = isFaqContent => {\n const properties = {\n topWrapperProps: {},\n groupSectionProps: {},\n groupSectionTitleProps: {},\n groupContentWrapperProps: {},\n groupContentProps: {}\n };\n if (!isFaqContent) return properties;\n\n properties.topWrapperProps = {\n itemScope: true,\n itemType: 'https://schema.org/FAQPage'\n };\n properties.groupSectionProps = {\n itemScope: true,\n itemProp: 'mainEntity',\n itemType: 'https://schema.org/Question'\n };\n properties.groupSectionTitleProps = {\n itemProp: 'name'\n };\n properties.groupContentWrapperProps = {\n itemScope: true,\n itemProp: 'acceptedAnswer',\n itemType: 'https://schema.org/Answer'\n };\n\n properties.groupContentProps = {\n itemProp: 'text'\n };\n\n return properties;\n};\n\nexport default getStructuredDataProperties;\n"],"mappings":";;;;;;;AAAA,IAAMA,2BAA2B,GAAG,SAA9BA,2BAA2BA,CAAGC,YAAY,EAAI;EAClD,IAAMC,UAAU,GAAG;IACjBC,eAAe,EAAE,CAAC,CAAC;IACnBC,iBAAiB,EAAE,CAAC,CAAC;IACrBC,sBAAsB,EAAE,CAAC,CAAC;IAC1BC,wBAAwB,EAAE,CAAC,CAAC;IAC5BC,iBAAiB,EAAE,CAAC;EACtB,CAAC;EACD,IAAI,CAACN,YAAY,EAAE,OAAOC,UAAU;EAEpCA,UAAU,CAACC,eAAe,GAAG;IAC3BK,SAAS,EAAE,IAAI;IACfC,QAAQ,EAAE;EACZ,CAAC;EACDP,UAAU,CAACE,iBAAiB,GAAG;IAC7BI,SAAS,EAAE,IAAI;IACfE,QAAQ,EAAE,YAAY;IACtBD,QAAQ,EAAE;EACZ,CAAC;EACDP,UAAU,CAACG,sBAAsB,GAAG;IAClCK,QAAQ,EAAE;EACZ,CAAC;EACDR,UAAU,CAACI,wBAAwB,GAAG;IACpCE,SAAS,EAAE,IAAI;IACfE,QAAQ,EAAE,gBAAgB;IAC1BD,QAAQ,EAAE;EACZ,CAAC;EAEDP,UAAU,CAACK,iBAAiB,GAAG;IAC7BG,QAAQ,EAAE;EACZ,CAAC;EAED,OAAOR,UAAU;AACnB,CAAC;AAAC,IAAAS,QAAA,GAAAC,OAAA,cAEaZ,2BAA2B","ignoreList":[]}