govuk_publishing_components 28.9.2 → 29.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/app/assets/config/govuk_publishing_components_manifest.js +15 -3
  4. data/app/assets/javascripts/govuk_publishing_components/dependencies.js +2 -5
  5. data/app/assets/javascripts/govuk_publishing_components/modules.js +15 -18
  6. data/app/assets/javascripts/govuk_publishing_components/{rum-loader.js.erb → rum-loader.js} +13 -10
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +1 -0
  8. data/app/views/govuk_publishing_components/components/_contextual_breadcrumbs.html.erb +0 -5
  9. data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +7 -1
  10. data/app/views/govuk_publishing_components/components/docs/big_number.yml +3 -3
  11. data/app/views/govuk_publishing_components/components/docs/breadcrumbs.yml +3 -3
  12. data/app/views/govuk_publishing_components/components/docs/button.yml +2 -2
  13. data/app/views/govuk_publishing_components/components/docs/checkboxes.yml +5 -5
  14. data/app/views/govuk_publishing_components/components/docs/contents_list.yml +1 -1
  15. data/app/views/govuk_publishing_components/components/docs/contextual_breadcrumbs.yml +1 -1
  16. data/app/views/govuk_publishing_components/components/docs/contextual_guidance.yml +1 -1
  17. data/app/views/govuk_publishing_components/components/docs/cookie_banner.yml +2 -2
  18. data/app/views/govuk_publishing_components/components/docs/date_input.yml +1 -1
  19. data/app/views/govuk_publishing_components/components/docs/details.yml +1 -1
  20. data/app/views/govuk_publishing_components/components/docs/devolved_nations.yml +1 -1
  21. data/app/views/govuk_publishing_components/components/docs/document_list.yml +2 -2
  22. data/app/views/govuk_publishing_components/components/docs/error_alert.yml +1 -1
  23. data/app/views/govuk_publishing_components/components/docs/error_summary.yml +2 -2
  24. data/app/views/govuk_publishing_components/components/docs/feedback.yml +1 -1
  25. data/app/views/govuk_publishing_components/components/docs/fieldset.yml +4 -4
  26. data/app/views/govuk_publishing_components/components/docs/heading.yml +4 -4
  27. data/app/views/govuk_publishing_components/components/docs/hint.yml +1 -1
  28. data/app/views/govuk_publishing_components/components/docs/input.yml +3 -3
  29. data/app/views/govuk_publishing_components/components/docs/inset_text.yml +1 -1
  30. data/app/views/govuk_publishing_components/components/docs/label.yml +1 -1
  31. data/app/views/govuk_publishing_components/components/docs/layout_footer.yml +2 -2
  32. data/app/views/govuk_publishing_components/components/docs/lead_paragraph.yml +1 -1
  33. data/app/views/govuk_publishing_components/components/docs/metadata.yml +1 -1
  34. data/app/views/govuk_publishing_components/components/docs/notice.yml +2 -2
  35. data/app/views/govuk_publishing_components/components/docs/print_link.yml +1 -1
  36. data/app/views/govuk_publishing_components/components/docs/search.yml +4 -4
  37. data/app/views/govuk_publishing_components/components/docs/select.yml +5 -5
  38. data/app/views/govuk_publishing_components/components/docs/show_password.yml +3 -3
  39. data/app/views/govuk_publishing_components/components/docs/signup_link.yml +1 -1
  40. data/app/views/govuk_publishing_components/components/docs/single_page_notification_button.yml +2 -2
  41. data/app/views/govuk_publishing_components/components/docs/step_by_step_nav.yml +1 -1
  42. data/app/views/govuk_publishing_components/components/docs/step_by_step_nav_header.yml +3 -3
  43. data/app/views/govuk_publishing_components/components/docs/subscription_links.yml +3 -3
  44. data/app/views/govuk_publishing_components/components/docs/success_alert.yml +1 -1
  45. data/app/views/govuk_publishing_components/components/docs/table.yml +1 -1
  46. data/app/views/govuk_publishing_components/components/docs/textarea.yml +1 -1
  47. data/app/views/govuk_publishing_components/components/docs/title.yml +1 -1
  48. data/config/initializers/assets.rb +15 -45
  49. data/lib/govuk_publishing_components/presenters/attachment.rb +3 -2
  50. data/lib/govuk_publishing_components/presenters/breadcrumb_selector.rb +0 -11
  51. data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +0 -20
  52. data/lib/govuk_publishing_components/presenters/meta_tags.rb +1 -37
  53. data/lib/govuk_publishing_components/version.rb +1 -1
  54. data/lib/govuk_publishing_components.rb +0 -1
  55. metadata +10 -118
  56. data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_priority.rb +0 -118
  57. data/node_modules/jquery/AUTHORS.txt +0 -266
  58. data/node_modules/jquery/LICENSE.txt +0 -36
  59. data/node_modules/jquery/README.md +0 -65
  60. data/node_modules/jquery/bower.json +0 -14
  61. data/node_modules/jquery/dist/jquery.js +0 -11008
  62. data/node_modules/jquery/dist/jquery.min.js +0 -5
  63. data/node_modules/jquery/dist/jquery.min.map +0 -1
  64. data/node_modules/jquery/external/sizzle/LICENSE.txt +0 -36
  65. data/node_modules/jquery/external/sizzle/dist/sizzle.js +0 -2143
  66. data/node_modules/jquery/external/sizzle/dist/sizzle.min.js +0 -3
  67. data/node_modules/jquery/external/sizzle/dist/sizzle.min.map +0 -1
  68. data/node_modules/jquery/package.json +0 -85
  69. data/node_modules/jquery/src/ajax/jsonp.js +0 -100
  70. data/node_modules/jquery/src/ajax/load.js +0 -83
  71. data/node_modules/jquery/src/ajax/parseJSON.js +0 -53
  72. data/node_modules/jquery/src/ajax/parseXML.js +0 -31
  73. data/node_modules/jquery/src/ajax/script.js +0 -95
  74. data/node_modules/jquery/src/ajax/var/location.js +0 -3
  75. data/node_modules/jquery/src/ajax/var/nonce.js +0 -5
  76. data/node_modules/jquery/src/ajax/var/rquery.js +0 -3
  77. data/node_modules/jquery/src/ajax/xhr.js +0 -229
  78. data/node_modules/jquery/src/ajax.js +0 -842
  79. data/node_modules/jquery/src/attributes/attr.js +0 -281
  80. data/node_modules/jquery/src/attributes/classes.js +0 -174
  81. data/node_modules/jquery/src/attributes/prop.js +0 -156
  82. data/node_modules/jquery/src/attributes/support.js +0 -70
  83. data/node_modules/jquery/src/attributes/val.js +0 -191
  84. data/node_modules/jquery/src/attributes.js +0 -11
  85. data/node_modules/jquery/src/callbacks.js +0 -232
  86. data/node_modules/jquery/src/core/access.js +0 -65
  87. data/node_modules/jquery/src/core/init.js +0 -140
  88. data/node_modules/jquery/src/core/parseHTML.js +0 -41
  89. data/node_modules/jquery/src/core/ready.js +0 -163
  90. data/node_modules/jquery/src/core/var/rsingleTag.js +0 -5
  91. data/node_modules/jquery/src/core.js +0 -529
  92. data/node_modules/jquery/src/css/addGetHookIf.js +0 -24
  93. data/node_modules/jquery/src/css/adjustCSS.js +0 -65
  94. data/node_modules/jquery/src/css/curCSS.js +0 -137
  95. data/node_modules/jquery/src/css/defaultDisplay.js +0 -72
  96. data/node_modules/jquery/src/css/hiddenVisibleSelectors.js +0 -42
  97. data/node_modules/jquery/src/css/showHide.js +0 -45
  98. data/node_modules/jquery/src/css/support.js +0 -184
  99. data/node_modules/jquery/src/css/var/cssExpand.js +0 -3
  100. data/node_modules/jquery/src/css/var/isHidden.js +0 -16
  101. data/node_modules/jquery/src/css/var/rmargin.js +0 -3
  102. data/node_modules/jquery/src/css/var/rnumnonpx.js +0 -5
  103. data/node_modules/jquery/src/css/var/swap.js +0 -24
  104. data/node_modules/jquery/src/css.js +0 -563
  105. data/node_modules/jquery/src/data/support.js +0 -23
  106. data/node_modules/jquery/src/data/var/acceptData.js +0 -20
  107. data/node_modules/jquery/src/data.js +0 -342
  108. data/node_modules/jquery/src/deferred.js +0 -159
  109. data/node_modules/jquery/src/deprecated.js +0 -34
  110. data/node_modules/jquery/src/dimensions.js +0 -56
  111. data/node_modules/jquery/src/effects/Tween.js +0 -121
  112. data/node_modules/jquery/src/effects/animatedSelector.js +0 -13
  113. data/node_modules/jquery/src/effects/support.js +0 -58
  114. data/node_modules/jquery/src/effects.js +0 -640
  115. data/node_modules/jquery/src/event/ajax.js +0 -20
  116. data/node_modules/jquery/src/event/alias.js +0 -25
  117. data/node_modules/jquery/src/event/support.js +0 -28
  118. data/node_modules/jquery/src/event.js +0 -1134
  119. data/node_modules/jquery/src/exports/amd.js +0 -24
  120. data/node_modules/jquery/src/exports/global.js +0 -26
  121. data/node_modules/jquery/src/intro.js +0 -44
  122. data/node_modules/jquery/src/jquery.js +0 -37
  123. data/node_modules/jquery/src/manipulation/_evalUrl.js +0 -21
  124. data/node_modules/jquery/src/manipulation/buildFragment.js +0 -157
  125. data/node_modules/jquery/src/manipulation/createSafeFragment.js +0 -20
  126. data/node_modules/jquery/src/manipulation/getAll.js +0 -33
  127. data/node_modules/jquery/src/manipulation/setGlobalEval.js +0 -19
  128. data/node_modules/jquery/src/manipulation/support.js +0 -72
  129. data/node_modules/jquery/src/manipulation/var/nodeNames.js +0 -5
  130. data/node_modules/jquery/src/manipulation/var/rcheckableType.js +0 -3
  131. data/node_modules/jquery/src/manipulation/var/rleadingWhitespace.js +0 -3
  132. data/node_modules/jquery/src/manipulation/var/rscriptType.js +0 -3
  133. data/node_modules/jquery/src/manipulation/var/rtagName.js +0 -3
  134. data/node_modules/jquery/src/manipulation/wrapMap.js +0 -30
  135. data/node_modules/jquery/src/manipulation.js +0 -585
  136. data/node_modules/jquery/src/offset.js +0 -219
  137. data/node_modules/jquery/src/outro.js +0 -2
  138. data/node_modules/jquery/src/queue/delay.js +0 -22
  139. data/node_modules/jquery/src/queue.js +0 -144
  140. data/node_modules/jquery/src/selector-sizzle.js +0 -14
  141. data/node_modules/jquery/src/selector.js +0 -1
  142. data/node_modules/jquery/src/serialize.js +0 -125
  143. data/node_modules/jquery/src/support.js +0 -63
  144. data/node_modules/jquery/src/traversing/findFilter.js +0 -100
  145. data/node_modules/jquery/src/traversing/var/dir.js +0 -20
  146. data/node_modules/jquery/src/traversing/var/rneedsContext.js +0 -6
  147. data/node_modules/jquery/src/traversing/var/siblings.js +0 -15
  148. data/node_modules/jquery/src/traversing.js +0 -179
  149. data/node_modules/jquery/src/var/class2type.js +0 -5
  150. data/node_modules/jquery/src/var/concat.js +0 -5
  151. data/node_modules/jquery/src/var/deletedIds.js +0 -3
  152. data/node_modules/jquery/src/var/document.js +0 -3
  153. data/node_modules/jquery/src/var/documentElement.js +0 -5
  154. data/node_modules/jquery/src/var/hasOwn.js +0 -5
  155. data/node_modules/jquery/src/var/indexOf.js +0 -5
  156. data/node_modules/jquery/src/var/pnum.js +0 -3
  157. data/node_modules/jquery/src/var/push.js +0 -5
  158. data/node_modules/jquery/src/var/rcssNum.js +0 -7
  159. data/node_modules/jquery/src/var/rnotwhite.js +0 -3
  160. data/node_modules/jquery/src/var/slice.js +0 -5
  161. data/node_modules/jquery/src/var/support.js +0 -5
  162. data/node_modules/jquery/src/var/toString.js +0 -5
  163. data/node_modules/jquery/src/wrap.js +0 -77
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_publishing_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 28.9.2
4
+ version: 29.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-17 00:00:00.000000000 Z
11
+ date: 2022-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config
@@ -98,16 +98,16 @@ dependencies:
98
98
  name: sprockets
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "<"
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
- version: '4'
103
+ version: '3'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "<"
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
- version: '4'
110
+ version: '3'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: capybara
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -226,14 +226,14 @@ dependencies:
226
226
  requirements:
227
227
  - - ">="
228
228
  - !ruby/object:Gem::Version
229
- version: '0'
229
+ version: '1.5'
230
230
  type: :development
231
231
  prerelease: false
232
232
  version_requirements: !ruby/object:Gem::Requirement
233
233
  requirements:
234
234
  - - ">="
235
235
  - !ruby/object:Gem::Version
236
- version: '0'
236
+ version: '1.5'
237
237
  - !ruby/object:Gem::Dependency
238
238
  name: rake
239
239
  requirement: !ruby/object:Gem::Requirement
@@ -493,7 +493,7 @@ files:
493
493
  - app/assets/javascripts/govuk_publishing_components/lib/toggle.js
494
494
  - app/assets/javascripts/govuk_publishing_components/lib/trigger-event.js
495
495
  - app/assets/javascripts/govuk_publishing_components/modules.js
496
- - app/assets/javascripts/govuk_publishing_components/rum-loader.js.erb
496
+ - app/assets/javascripts/govuk_publishing_components/rum-loader.js
497
497
  - app/assets/javascripts/govuk_publishing_components/vendor/html5shiv-printshiv.js
498
498
  - app/assets/javascripts/govuk_publishing_components/vendor/json2.js
499
499
  - app/assets/javascripts/govuk_publishing_components/vendor/lux/lux-measurer.js
@@ -907,7 +907,6 @@ files:
907
907
  - lib/govuk_publishing_components/presenters/button_helper.rb
908
908
  - lib/govuk_publishing_components/presenters/checkboxes_helper.rb
909
909
  - lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_ancestors.rb
910
- - lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_priority.rb
911
910
  - lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_taxons.rb
912
911
  - lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_topic.rb
913
912
  - lib/govuk_publishing_components/presenters/content_item.rb
@@ -1865,113 +1864,6 @@ files:
1865
1864
  - node_modules/govuk-frontend/govuk/vendor/polyfills/Object/defineProperty.js
1866
1865
  - node_modules/govuk-frontend/govuk/vendor/polyfills/Window.js
1867
1866
  - node_modules/govuk-frontend/package.json
1868
- - node_modules/jquery/AUTHORS.txt
1869
- - node_modules/jquery/LICENSE.txt
1870
- - node_modules/jquery/README.md
1871
- - node_modules/jquery/bower.json
1872
- - node_modules/jquery/dist/jquery.js
1873
- - node_modules/jquery/dist/jquery.min.js
1874
- - node_modules/jquery/dist/jquery.min.map
1875
- - node_modules/jquery/external/sizzle/LICENSE.txt
1876
- - node_modules/jquery/external/sizzle/dist/sizzle.js
1877
- - node_modules/jquery/external/sizzle/dist/sizzle.min.js
1878
- - node_modules/jquery/external/sizzle/dist/sizzle.min.map
1879
- - node_modules/jquery/package.json
1880
- - node_modules/jquery/src/ajax.js
1881
- - node_modules/jquery/src/ajax/jsonp.js
1882
- - node_modules/jquery/src/ajax/load.js
1883
- - node_modules/jquery/src/ajax/parseJSON.js
1884
- - node_modules/jquery/src/ajax/parseXML.js
1885
- - node_modules/jquery/src/ajax/script.js
1886
- - node_modules/jquery/src/ajax/var/location.js
1887
- - node_modules/jquery/src/ajax/var/nonce.js
1888
- - node_modules/jquery/src/ajax/var/rquery.js
1889
- - node_modules/jquery/src/ajax/xhr.js
1890
- - node_modules/jquery/src/attributes.js
1891
- - node_modules/jquery/src/attributes/attr.js
1892
- - node_modules/jquery/src/attributes/classes.js
1893
- - node_modules/jquery/src/attributes/prop.js
1894
- - node_modules/jquery/src/attributes/support.js
1895
- - node_modules/jquery/src/attributes/val.js
1896
- - node_modules/jquery/src/callbacks.js
1897
- - node_modules/jquery/src/core.js
1898
- - node_modules/jquery/src/core/access.js
1899
- - node_modules/jquery/src/core/init.js
1900
- - node_modules/jquery/src/core/parseHTML.js
1901
- - node_modules/jquery/src/core/ready.js
1902
- - node_modules/jquery/src/core/var/rsingleTag.js
1903
- - node_modules/jquery/src/css.js
1904
- - node_modules/jquery/src/css/addGetHookIf.js
1905
- - node_modules/jquery/src/css/adjustCSS.js
1906
- - node_modules/jquery/src/css/curCSS.js
1907
- - node_modules/jquery/src/css/defaultDisplay.js
1908
- - node_modules/jquery/src/css/hiddenVisibleSelectors.js
1909
- - node_modules/jquery/src/css/showHide.js
1910
- - node_modules/jquery/src/css/support.js
1911
- - node_modules/jquery/src/css/var/cssExpand.js
1912
- - node_modules/jquery/src/css/var/isHidden.js
1913
- - node_modules/jquery/src/css/var/rmargin.js
1914
- - node_modules/jquery/src/css/var/rnumnonpx.js
1915
- - node_modules/jquery/src/css/var/swap.js
1916
- - node_modules/jquery/src/data.js
1917
- - node_modules/jquery/src/data/support.js
1918
- - node_modules/jquery/src/data/var/acceptData.js
1919
- - node_modules/jquery/src/deferred.js
1920
- - node_modules/jquery/src/deprecated.js
1921
- - node_modules/jquery/src/dimensions.js
1922
- - node_modules/jquery/src/effects.js
1923
- - node_modules/jquery/src/effects/Tween.js
1924
- - node_modules/jquery/src/effects/animatedSelector.js
1925
- - node_modules/jquery/src/effects/support.js
1926
- - node_modules/jquery/src/event.js
1927
- - node_modules/jquery/src/event/ajax.js
1928
- - node_modules/jquery/src/event/alias.js
1929
- - node_modules/jquery/src/event/support.js
1930
- - node_modules/jquery/src/exports/amd.js
1931
- - node_modules/jquery/src/exports/global.js
1932
- - node_modules/jquery/src/intro.js
1933
- - node_modules/jquery/src/jquery.js
1934
- - node_modules/jquery/src/manipulation.js
1935
- - node_modules/jquery/src/manipulation/_evalUrl.js
1936
- - node_modules/jquery/src/manipulation/buildFragment.js
1937
- - node_modules/jquery/src/manipulation/createSafeFragment.js
1938
- - node_modules/jquery/src/manipulation/getAll.js
1939
- - node_modules/jquery/src/manipulation/setGlobalEval.js
1940
- - node_modules/jquery/src/manipulation/support.js
1941
- - node_modules/jquery/src/manipulation/var/nodeNames.js
1942
- - node_modules/jquery/src/manipulation/var/rcheckableType.js
1943
- - node_modules/jquery/src/manipulation/var/rleadingWhitespace.js
1944
- - node_modules/jquery/src/manipulation/var/rscriptType.js
1945
- - node_modules/jquery/src/manipulation/var/rtagName.js
1946
- - node_modules/jquery/src/manipulation/wrapMap.js
1947
- - node_modules/jquery/src/offset.js
1948
- - node_modules/jquery/src/outro.js
1949
- - node_modules/jquery/src/queue.js
1950
- - node_modules/jquery/src/queue/delay.js
1951
- - node_modules/jquery/src/selector-sizzle.js
1952
- - node_modules/jquery/src/selector.js
1953
- - node_modules/jquery/src/serialize.js
1954
- - node_modules/jquery/src/support.js
1955
- - node_modules/jquery/src/traversing.js
1956
- - node_modules/jquery/src/traversing/findFilter.js
1957
- - node_modules/jquery/src/traversing/var/dir.js
1958
- - node_modules/jquery/src/traversing/var/rneedsContext.js
1959
- - node_modules/jquery/src/traversing/var/siblings.js
1960
- - node_modules/jquery/src/var/class2type.js
1961
- - node_modules/jquery/src/var/concat.js
1962
- - node_modules/jquery/src/var/deletedIds.js
1963
- - node_modules/jquery/src/var/document.js
1964
- - node_modules/jquery/src/var/documentElement.js
1965
- - node_modules/jquery/src/var/hasOwn.js
1966
- - node_modules/jquery/src/var/indexOf.js
1967
- - node_modules/jquery/src/var/pnum.js
1968
- - node_modules/jquery/src/var/push.js
1969
- - node_modules/jquery/src/var/rcssNum.js
1970
- - node_modules/jquery/src/var/rnotwhite.js
1971
- - node_modules/jquery/src/var/slice.js
1972
- - node_modules/jquery/src/var/support.js
1973
- - node_modules/jquery/src/var/toString.js
1974
- - node_modules/jquery/src/wrap.js
1975
1867
  - node_modules/sortablejs/LICENSE
1976
1868
  - node_modules/sortablejs/README.md
1977
1869
  - node_modules/sortablejs/Sortable.js
@@ -1999,7 +1891,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1999
1891
  - !ruby/object:Gem::Version
2000
1892
  version: '0'
2001
1893
  requirements: []
2002
- rubygems_version: 3.3.9
1894
+ rubygems_version: 3.3.10
2003
1895
  signing_key:
2004
1896
  specification_version: 4
2005
1897
  summary: A gem to document components in GOV.UK frontend applications
@@ -1,118 +0,0 @@
1
- module GovukPublishingComponents
2
- module Presenters
3
- class ContentBreadcrumbsBasedOnPriority
4
- # keys are labels, values are the content_ids for the matching taxons
5
- # Where multiple matching taxons are present, the top most one is the highest priority
6
- # and the bottom one the lowest priority
7
- PRIORITY_TAXONS = {
8
- brexit_business: "634fd193-8039-4a70-a059-919c34ff4bfc",
9
- brexit_individuals: "614b2e65-56ac-4f8d-bb9c-d1a14167ba25",
10
- brexit_taxon: "d6c2de5d-ef90-45d1-82d4-5f2438369eea",
11
- }.freeze
12
-
13
- # Returns the highest priority taxon that has a content_id matching those in PRIORITY_TAXONS
14
- def self.call(content_item, query_parameters = nil)
15
- new(content_item, query_parameters).breadcrumbs
16
- end
17
-
18
- attr_reader :content_item, :query_parameters
19
-
20
- def initialize(content_item, query_parameters = nil)
21
- @content_item = content_item
22
- @query_parameters = query_parameters
23
- end
24
-
25
- def priority_taxon
26
- @priority_taxon ||= begin
27
- default_taxon = priority_taxons.min_by { |t| PRIORITY_TAXONS.values.index(t["content_id"]) }
28
- preferred_taxon || default_taxon
29
- end
30
- end
31
-
32
- def priority_brexit_taxon
33
- if tagged_to_both_brexit_child_taxons?
34
- priority_taxons.find { |t| t["content_id"] == PRIORITY_TAXONS[:brexit_taxon] }
35
- else
36
- priority_taxons.min_by { |t| PRIORITY_TAXONS.values.index(t["content_id"]) }
37
- end
38
- end
39
-
40
- def breadcrumbs
41
- priority_taxon && {
42
- title: priority_taxon["title"],
43
- path: breadcrumb_path,
44
- tracking_category: "breadcrumbClicked",
45
- tracking_action: tracking_action,
46
- tracking_label: content_item["base_path"],
47
- tracking_dimension_enabled: false,
48
- }
49
- end
50
-
51
- def brexit_audience(taxon)
52
- return nil unless taxon
53
-
54
- {
55
- PRIORITY_TAXONS[:brexit_business] => "Brexitbusiness",
56
- PRIORITY_TAXONS[:brexit_individuals] => "Brexitcitizen",
57
- PRIORITY_TAXONS[:brexit_taxon] => "Brexitbusinessandcitizen",
58
- }[taxon["content_id"]]
59
- end
60
-
61
- private
62
-
63
- def preferred_taxon
64
- if preferred_priority_taxon
65
- priority_taxons.find { |t| t["content_id"] == preferred_priority_taxon }
66
- elsif tagged_to_both_brexit_child_taxons?
67
- priority_taxons.find { |t| t["content_id"] == PRIORITY_TAXONS[:brexit_taxon] }
68
- end
69
- end
70
-
71
- def priority_taxons
72
- return [] unless content_item["links"].is_a?(Hash)
73
-
74
- taxons = content_item.dig("links", "taxons")
75
- taxon_tree(taxons).select do |taxon|
76
- priority_taxon?(taxon)
77
- end
78
- end
79
-
80
- def taxon_tree(taxons)
81
- return [] if taxons.blank?
82
-
83
- taxons + taxons.flat_map { |taxon| taxon_tree(taxon.dig("links", "parent_taxons")) }
84
- end
85
-
86
- def priority_taxon?(taxon)
87
- PRIORITY_TAXONS.values.include?(taxon["content_id"])
88
- end
89
-
90
- def brexit_child_taxon?(taxon)
91
- brexit_child_taxons.include?(taxon["content_id"])
92
- end
93
-
94
- def brexit_child_taxons
95
- [PRIORITY_TAXONS[:brexit_business], PRIORITY_TAXONS[:brexit_individuals]]
96
- end
97
-
98
- def preferred_priority_taxon
99
- query_parameters["priority-taxon"] if query_parameters
100
- end
101
-
102
- def tracking_action
103
- action = %w[superBreadcrumb]
104
- action << brexit_audience(priority_taxon)
105
- action.compact.join(" ")
106
- end
107
-
108
- def tagged_to_both_brexit_child_taxons?
109
- t = priority_taxons.select { |taxon| brexit_child_taxon?(taxon) }
110
- t.uniq.count > 1
111
- end
112
-
113
- def breadcrumb_path
114
- priority_taxon.dig("details", "url_override").present? ? priority_taxon.dig("details", "url_override") : priority_taxon["base_path"]
115
- end
116
- end
117
- end
118
- end
@@ -1,266 +0,0 @@
1
- Authors ordered by first contribution.
2
-
3
- John Resig <jeresig@gmail.com>
4
- Gilles van den Hoven <gilles0181@gmail.com>
5
- Michael Geary <mike@geary.com>
6
- Stefan Petre <stefan.petre@gmail.com>
7
- Yehuda Katz <wycats@gmail.com>
8
- Corey Jewett <cj@syntheticplayground.com>
9
- Klaus Hartl <klaus.hartl@googlemail.com>
10
- Franck Marcia <franck.marcia@gmail.com>
11
- Jörn Zaefferer <joern.zaefferer@gmail.com>
12
- Paul Bakaus <paul.bakaus@googlemail.com>
13
- Brandon Aaron <brandon.aaron@gmail.com>
14
- Mike Alsup <malsup@gmail.com>
15
- Dave Methvin <dave.methvin@gmail.com>
16
- Ed Engelhardt <edengelhardt@gmail.com>
17
- Sean Catchpole <littlecooldude@gmail.com>
18
- Paul Mclanahan <pmclanahan@gmail.com>
19
- David Serduke <davidserduke@gmail.com>
20
- Richard D. Worth <rdworth@gmail.com>
21
- Scott González <scott.gonzalez@gmail.com>
22
- Ariel Flesler <aflesler@gmail.com>
23
- Jon Evans <jon@springyweb.com>
24
- TJ Holowaychuk <tj@vision-media.ca>
25
- Michael Bensoussan <mickey@seesmic.com>
26
- Robert Katić <robert.katic@gmail.com>
27
- Louis-Rémi Babé <lrbabe@gmail.com>
28
- Earle Castledine <mrspeaker@gmail.com>
29
- Damian Janowski <damian.janowski@gmail.com>
30
- Rich Dougherty <rich@rd.gen.nz>
31
- Kim Dalsgaard <kim@kimdalsgaard.com>
32
- Andrea Giammarchi <andrea.giammarchi@gmail.com>
33
- Mark Gibson <jollytoad@gmail.com>
34
- Karl Swedberg <kswedberg@gmail.com>
35
- Justin Meyer <justinbmeyer@gmail.com>
36
- Ben Alman <cowboy@rj3.net>
37
- James Padolsey <cla@padolsey.net>
38
- David Petersen <public@petersendidit.com>
39
- Batiste Bieler <batiste.bieler@gmail.com>
40
- Alexander Farkas <info@corrupt-system.de>
41
- Rick Waldron <waldron.rick@gmail.com>
42
- Filipe Fortes <filipe@fortes.com>
43
- Neeraj Singh <neerajdotname@gmail.com>
44
- Paul Irish <paul.irish@gmail.com>
45
- Iraê Carvalho <irae@irae.pro.br>
46
- Matt Curry <matt@pseudocoder.com>
47
- Michael Monteleone <michael@michaelmonteleone.net>
48
- Noah Sloan <noah.sloan@gmail.com>
49
- Tom Viner <github@viner.tv>
50
- Douglas Neiner <doug@pixelgraphics.us>
51
- Adam J. Sontag <ajpiano@ajpiano.com>
52
- Dave Reed <dareed@microsoft.com>
53
- Ralph Whitbeck <ralph.whitbeck@gmail.com>
54
- Carl Fürstenberg <azatoth@gmail.com>
55
- Jacob Wright <jacwright@gmail.com>
56
- J. Ryan Stinnett <jryans@gmail.com>
57
- unknown <Igen005@.upcorp.ad.uprr.com>
58
- temp01 <temp01irc@gmail.com>
59
- Heungsub Lee <h@subl.ee>
60
- Colin Snover <colin@alpha.zetafleet.com>
61
- Ryan W Tenney <ryan@10e.us>
62
- Pinhook <contact@pinhooklabs.com>
63
- Ron Otten <r.j.g.otten@gmail.com>
64
- Jephte Clain <Jephte.Clain@univ-reunion.fr>
65
- Anton Matzneller <obhvsbypqghgc@gmail.com>
66
- Alex Sexton <AlexSexton@gmail.com>
67
- Dan Heberden <danheberden@gmail.com>
68
- Henri Wiechers <hwiechers@gmail.com>
69
- Russell Holbrook <russell.holbrook@patch.com>
70
- Julian Aubourg <aubourg.julian@gmail.com>
71
- Gianni Alessandro Chiappetta <gianni@runlevel6.org>
72
- Scott Jehl <scott@scottjehl.com>
73
- James Burke <jrburke@gmail.com>
74
- Jonas Pfenniger <jonas@pfenniger.name>
75
- Xavi Ramirez <xavi.rmz@gmail.com>
76
- Jared Grippe <jared@deadlyicon.com>
77
- Sylvester Keil <sylvester@keil.or.at>
78
- Brandon Sterne <bsterne@mozilla.com>
79
- Mathias Bynens <mathias@qiwi.be>
80
- Timmy Willison <timmywillisn@gmail.com>
81
- Corey Frang <gnarf@gnarf.net>
82
- Digitalxero <digitalxero>
83
- Anton Kovalyov <anton@kovalyov.net>
84
- David Murdoch <musicisair@yahoo.com>
85
- Josh Varner <josh.varner@gmail.com>
86
- Charles McNulty <cmcnulty@kznf.com>
87
- Jordan Boesch <jboesch26@gmail.com>
88
- Jess Thrysoee <jess@thrysoee.dk>
89
- Michael Murray <m@murz.net>
90
- Lee Carpenter <elcarpie@gmail.com>
91
- Alexis Abril <me@alexisabril.com>
92
- Rob Morgan <robbym@gmail.com>
93
- John Firebaugh <john_firebaugh@bigfix.com>
94
- Sam Bisbee <sam@sbisbee.com>
95
- Gilmore Davidson <gilmoreorless@gmail.com>
96
- Brian Brennan <me@brianlovesthings.com>
97
- Xavier Montillet <xavierm02.net@gmail.com>
98
- Daniel Pihlstrom <sciolist.se@gmail.com>
99
- Sahab Yazdani <sahab.yazdani+github@gmail.com>
100
- avaly <github-com@agachi.name>
101
- Scott Hughes <hi@scott-hughes.me>
102
- Mike Sherov <mike.sherov@gmail.com>
103
- Greg Hazel <ghazel@gmail.com>
104
- Schalk Neethling <schalk@ossreleasefeed.com>
105
- Denis Knauf <Denis.Knauf@gmail.com>
106
- Timo Tijhof <krinklemail@gmail.com>
107
- Steen Nielsen <swinedk@gmail.com>
108
- Anton Ryzhov <anton@ryzhov.me>
109
- Shi Chuan <shichuanr@gmail.com>
110
- Berker Peksag <berker.peksag@gmail.com>
111
- Toby Brain <tobyb@freshview.com>
112
- Matt Mueller <mattmuelle@gmail.com>
113
- Justin <drakefjustin@gmail.com>
114
- Daniel Herman <daniel.c.herman@gmail.com>
115
- Oleg Gaidarenko <markelog@gmail.com>
116
- Richard Gibson <richard.gibson@gmail.com>
117
- Rafaël Blais Masson <rafbmasson@gmail.com>
118
- cmc3cn <59194618@qq.com>
119
- Joe Presbrey <presbrey@gmail.com>
120
- Sindre Sorhus <sindresorhus@gmail.com>
121
- Arne de Bree <arne@bukkie.nl>
122
- Vladislav Zarakovsky <vlad.zar@gmail.com>
123
- Andrew E Monat <amonat@gmail.com>
124
- Oskari <admin@o-programs.com>
125
- Joao Henrique de Andrade Bruni <joaohbruni@yahoo.com.br>
126
- tsinha <tsinha@Anthonys-MacBook-Pro.local>
127
- Matt Farmer <matt@frmr.me>
128
- Trey Hunner <treyhunner@gmail.com>
129
- Jason Moon <jmoon@socialcast.com>
130
- Jeffery To <jeffery.to@gmail.com>
131
- Kris Borchers <kris.borchers@gmail.com>
132
- Vladimir Zhuravlev <private.face@gmail.com>
133
- Jacob Thornton <jacobthornton@gmail.com>
134
- Chad Killingsworth <chadkillingsworth@missouristate.edu>
135
- Nowres Rafid <nowres.rafed@gmail.com>
136
- David Benjamin <davidben@mit.edu>
137
- Uri Gilad <antishok@gmail.com>
138
- Chris Faulkner <thefaulkner@gmail.com>
139
- Elijah Manor <elijah.manor@gmail.com>
140
- Daniel Chatfield <chatfielddaniel@gmail.com>
141
- Nikita Govorov <nikita.govorov@gmail.com>
142
- Wesley Walser <wwalser@atlassian.com>
143
- Mike Pennisi <mike@mikepennisi.com>
144
- Markus Staab <markus.staab@redaxo.de>
145
- Dave Riddle <david@joyvuu.com>
146
- Callum Macrae <callum@lynxphp.com>
147
- Benjamin Truyman <bentruyman@gmail.com>
148
- James Huston <james@jameshuston.net>
149
- Erick Ruiz de Chávez <erickrdch@gmail.com>
150
- David Bonner <dbonner@cogolabs.com>
151
- Akintayo Akinwunmi <aakinwunmi@judge.com>
152
- MORGAN <morgan@morgangraphics.com>
153
- Ismail Khair <ismail.khair@gmail.com>
154
- Carl Danley <carldanley@gmail.com>
155
- Mike Petrovich <michael.c.petrovich@gmail.com>
156
- Greg Lavallee <greglavallee@wapolabs.com>
157
- Daniel Gálvez <dgalvez@editablething.com>
158
- Sai Lung Wong <sai.wong@huffingtonpost.com>
159
- Tom H Fuertes <TomFuertes@gmail.com>
160
- Roland Eckl <eckl.roland@googlemail.com>
161
- Jay Merrifield <fracmak@gmail.com>
162
- Allen J Schmidt Jr <cobrasoft@gmail.com>
163
- Jonathan Sampson <jjdsampson@gmail.com>
164
- Marcel Greter <marcel.greter@ocbnet.ch>
165
- Matthias Jäggli <matthias.jaeggli@gmail.com>
166
- David Fox <dfoxinator@gmail.com>
167
- Yiming He <yiminghe@gmail.com>
168
- Devin Cooper <cooper.semantics@gmail.com>
169
- Paul Ramos <paul.b.ramos@gmail.com>
170
- Rod Vagg <rod@vagg.org>
171
- Bennett Sorbo <bsorbo@gmail.com>
172
- Sebastian Burkhard <sebi.burkhard@gmail.com>
173
- nanto <nanto@moon.email.ne.jp>
174
- Danil Somsikov <danilasomsikov@gmail.com>
175
- Ryunosuke SATO <tricknotes.rs@gmail.com>
176
- Jean Boussier <jean.boussier@gmail.com>
177
- Adam Coulombe <me@adam.co>
178
- Andrew Plummer <plummer.andrew@gmail.com>
179
- Mark Raddatz <mraddatz@gmail.com>
180
- Dmitry Gusev <dmitry.gusev@gmail.com>
181
- Michał Gołębiowski <m.goleb@gmail.com>
182
- Nguyen Phuc Lam <ruado1987@gmail.com>
183
- Tom H Fuertes <tomfuertes@gmail.com>
184
- Brandon Johnson <bjohn465+github@gmail.com>
185
- Jason Bedard <jason+jquery@jbedard.ca>
186
- Kyle Robinson Young <kyle@dontkry.com>
187
- Renato Oliveira dos Santos <ros3@cin.ufpe.br>
188
- Chris Talkington <chris@talkingtontech.com>
189
- Eddie Monge <eddie@eddiemonge.com>
190
- Terry Jones <terry@jon.es>
191
- Jason Merino <jasonmerino@gmail.com>
192
- Jeremy Dunck <jdunck@gmail.com>
193
- Chris Price <price.c@gmail.com>
194
- Amey Sakhadeo <me@ameyms.com>
195
- Anthony Ryan <anthonyryan1@gmail.com>
196
- Dominik D. Geyer <dominik.geyer@gmail.com>
197
- George Kats <katsgeorgeek@gmail.com>
198
- Lihan Li <frankieteardrop@gmail.com>
199
- Ronny Springer <springer.ronny@gmail.com>
200
- Marian Sollmann <marian.sollmann@cargomedia.ch>
201
- Corey Frang <gnarf37@gmail.com>
202
- Chris Antaki <ChrisAntaki@gmail.com>
203
- Noah Hamann <njhamann@gmail.com>
204
- David Hong <d.hong@me.com>
205
- Jakob Stoeck <jakob@pokermania.de>
206
- Christopher Jones <christopherjonesqed@gmail.com>
207
- Forbes Lindesay <forbes@lindesay.co.uk>
208
- John Paul <john@johnkpaul.com>
209
- S. Andrew Sheppard <andrew@wq.io>
210
- Leonardo Balter <leonardo.balter@gmail.com>
211
- Roman Reiß <me@silverwind.io>
212
- Benjy Cui <benjytrys@gmail.com>
213
- Rodrigo Rosenfeld Rosas <rr.rosas@gmail.com>
214
- John Hoven <hovenj@gmail.com>
215
- Christian Kosmowski <ksmwsk@gmail.com>
216
- Liang Peng <poppinlp@gmail.com>
217
- TJ VanToll <tj.vantoll@gmail.com>
218
- Senya Pugach <upisfree@outlook.com>
219
- Aurelio De Rosa <aurelioderosa@gmail.com>
220
- Nazar Mokrynskyi <nazar@mokrynskyi.com>
221
- Arthur Verschaeve <contact@arthurverschaeve.be>
222
- Dan Hart <danhart@notonthehighstreet.com>
223
- Scott González <scott.gonzalez@gmail.com>
224
- Zheming Sun <mescodasun@gmail.com>
225
- Bin Xin <rhyzix@gmail.com>
226
- David Corbacho <davidcorbacho@gmail.com>
227
- Veaceslav Grimalschi <grimalschi@yandex.ru>
228
- Daniel Husar <dano.husar@gmail.com>
229
- Jason Bedard <jason+github@jbedard.ca>
230
- Ben Toews <mastahyeti@gmail.com>
231
- Aditya Raghavan <araghavan3@gmail.com>
232
- Nicolas HENRY <icewil@gmail.com>
233
- Norman Xu <homyu.shinn@gmail.com>
234
- Anne-Gaelle Colom <coloma@westminster.ac.uk>
235
- Victor Homyakov <vkhomyackov@gmail.com>
236
- George Mauer <gmauer@gmail.com>
237
- Leonardo Braga <leonardo.braga@gmail.com>
238
- Stephen Edgar <stephen@netweb.com.au>
239
- Thomas Tortorini <thomastortorini@gmail.com>
240
- Winston Howes <winstonhowes@gmail.com>
241
- Jon Hester <jon.d.hester@gmail.com>
242
- Alexander O'Mara <me@alexomara.com>
243
- Bastian Buchholz <buchholz.bastian@googlemail.com>
244
- Arthur Stolyar <nekr.fabula@gmail.com>
245
- Calvin Metcalf <calvin.metcalf@gmail.com>
246
- Mu Haibao <mhbseal@163.com>
247
- Richard McDaniel <rm0026@uah.edu>
248
- Chris Rebert <github@rebertia.com>
249
- Gilad Peleg <giladp007@gmail.com>
250
- Martin Naumann <martin@geekonaut.de>
251
- Bruno Pérel <brunoperel@gmail.com>
252
- Reed Loden <reed@reedloden.com>
253
- Daniel Nill <daniellnill@gmail.com>
254
- Yongwoo Jeon <yongwoo.jeon@navercorp.com>
255
- Sean Henderson <seanh.za@gmail.com>
256
- Adrian Olek <adrianolek@gmail.com>
257
- Richard Kraaijenhagen <stdin+git@riichard.com>
258
- Gary Ye <garysye@gmail.com>
259
- Christian Grete <webmaster@christiangrete.com>
260
- Liza Ramo <liza.h.ramo@gmail.com>
261
- Joelle Fleurantin <joasqueeniebee@gmail.com>
262
- Julian Alexander Murillo <julian.alexander.murillo@gmail.com>
263
- Jun Sun <klsforever@gmail.com>
264
- Devin Wilson <dwilson6.github@gmail.com>
265
- Todor Prikumov <tono_pr@abv.bg>
266
- Zack Hall <zackhall@outlook.com>
@@ -1,36 +0,0 @@
1
- Copyright jQuery Foundation and other contributors, https://jquery.org/
2
-
3
- This software consists of voluntary contributions made by many
4
- individuals. For exact contribution history, see the revision history
5
- available at https://github.com/jquery/jquery
6
-
7
- The following license applies to all parts of this software except as
8
- documented below:
9
-
10
- ====
11
-
12
- Permission is hereby granted, free of charge, to any person obtaining
13
- a copy of this software and associated documentation files (the
14
- "Software"), to deal in the Software without restriction, including
15
- without limitation the rights to use, copy, modify, merge, publish,
16
- distribute, sublicense, and/or sell copies of the Software, and to
17
- permit persons to whom the Software is furnished to do so, subject to
18
- the following conditions:
19
-
20
- The above copyright notice and this permission notice shall be
21
- included in all copies or substantial portions of the Software.
22
-
23
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
27
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
28
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
29
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30
-
31
- ====
32
-
33
- All files located in the node_modules and external directories are
34
- externally maintained libraries used by this software which have their
35
- own licenses; we recommend you read them, as their terms may differ from
36
- the terms above.
@@ -1,65 +0,0 @@
1
- # jQuery
2
-
3
- > jQuery is a fast, small, and feature-rich JavaScript library.
4
-
5
- For information on how to get started and how to use jQuery, please see [jQuery's documentation](http://api.jquery.com/).
6
- For source files and issues, please visit the [jQuery repo](https://github.com/jquery/jquery).
7
-
8
- ## Including jQuery
9
-
10
- Below are some of the most common ways to include jQuery.
11
-
12
- ### Browser
13
-
14
- #### Script tag
15
-
16
- ```html
17
- <script src="https://code.jquery.com/jquery-2.2.0.min.js"></script>
18
- ```
19
-
20
- #### Babel
21
-
22
- [Babel](http://babeljs.io/) is a next generation JavaScript compiler. One of the features is the ability to use ES6/ES2015 modules now, even though browsers do not yet support this feature natively.
23
-
24
- ```js
25
- import $ from "jquery";
26
- ```
27
-
28
- #### Browserify/Webpack
29
-
30
- There are several ways to use [Browserify](http://browserify.org/) and [Webpack](https://webpack.github.io/). For more information on using these tools, please refer to the corresponding project's documention. In the script, including jQuery will usually look like this...
31
-
32
- ```js
33
- var $ = require("jquery");
34
- ```
35
-
36
- #### AMD (Asynchronous Module Definition)
37
-
38
- AMD is a module format built for the browser. For more information, we recommend [require.js' documentation](http://requirejs.org/docs/whyamd.html).
39
-
40
- ```js
41
- define(["jquery"], function($) {
42
-
43
- });
44
- ```
45
-
46
- ### Node
47
-
48
- To include jQuery in [Node](nodejs.org), first install with npm.
49
-
50
- ```sh
51
- npm install jquery
52
- ```
53
-
54
- For jQuery to work in Node, a window with a document is required. Since no such window exists natively in Node, one can be mocked by tools such as [jsdom](https://github.com/tmpvar/jsdom). This can be useful for testing purposes.
55
-
56
- ```js
57
- require("jsdom").env("", function(err, window) {
58
- if (err) {
59
- console.error(err);
60
- return;
61
- }
62
-
63
- var $ = require("jquery")(window);
64
- });
65
- ```