great-components 2.3.0__py3-none-any.whl → 2.5.0__py3-none-any.whl
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.
- great_components/mixins.py +3 -1
- great_components/static/great_components/js/dit.tagging.js +11 -2
- {great_components-2.3.0.dist-info → great_components-2.5.0.dist-info}/METADATA +44 -44
- {great_components-2.3.0.dist-info → great_components-2.5.0.dist-info}/RECORD +7 -7
- {great_components-2.3.0.dist-info → great_components-2.5.0.dist-info}/WHEEL +1 -1
- {great_components-2.3.0.dist-info → great_components-2.5.0.dist-info}/LICENSE +0 -0
- {great_components-2.3.0.dist-info → great_components-2.5.0.dist-info}/top_level.txt +0 -0
great_components/mixins.py
CHANGED
@@ -64,12 +64,14 @@ class GA360Mixin:
|
|
64
64
|
self.ga360_payload = {}
|
65
65
|
super().__init__(*args, **kwargs)
|
66
66
|
|
67
|
-
def set_ga360_payload(self, page_id, business_unit, site_section, site_subsection=None):
|
67
|
+
def set_ga360_payload(self, page_id, business_unit, site_section, site_subsection=None, referer_url=None):
|
68
68
|
self.ga360_payload['page_id'] = page_id
|
69
69
|
self.ga360_payload['business_unit'] = business_unit
|
70
70
|
self.ga360_payload['site_section'] = site_section
|
71
71
|
if site_subsection:
|
72
72
|
self.ga360_payload['site_subsection'] = site_subsection
|
73
|
+
if referer_url:
|
74
|
+
self.ga360_payload['referer_url'] = referer_url
|
73
75
|
|
74
76
|
def get_context_data(self, *args, **kwargs):
|
75
77
|
user = helpers.get_user(self.request)
|
@@ -76,8 +76,9 @@ dit.tagging.base = new function() {
|
|
76
76
|
|
77
77
|
var includeFormData = form.data('ga-include-form-data');
|
78
78
|
var formData = includeFormData && includeFormData.toLowerCase() === "true" ? form.serialize() : null;
|
79
|
+
var nextUrl = inferNextUrlValue(form);
|
79
80
|
|
80
|
-
sendEvent(formEvent(action, type, element, value, formData));
|
81
|
+
sendEvent(formEvent(action, type, element, value, formData, nextUrl));
|
81
82
|
}
|
82
83
|
|
83
84
|
function inferLinkType(link) {
|
@@ -122,6 +123,10 @@ dit.tagging.base = new function() {
|
|
122
123
|
return form.attr('action') || '';
|
123
124
|
}
|
124
125
|
|
126
|
+
function inferNextUrlValue(form) {
|
127
|
+
return form.attr('data-next-url') || '';
|
128
|
+
}
|
129
|
+
|
125
130
|
function isCta(link) {
|
126
131
|
var ctaClasses = ['button', 'cta'];
|
127
132
|
var linkClasses = link.attr('class') || '';
|
@@ -176,13 +181,17 @@ dit.tagging.base = new function() {
|
|
176
181
|
return linkEvent;
|
177
182
|
}
|
178
183
|
|
179
|
-
function formEvent(action, type, element, value, data) {
|
184
|
+
function formEvent(action, type, element, value, data, nextUrl) {
|
180
185
|
var formEvent = event(action, type, element, value);
|
181
186
|
|
182
187
|
if (data) {
|
183
188
|
formEvent['formData'] = data;
|
184
189
|
}
|
185
190
|
|
191
|
+
if (nextUrl) {
|
192
|
+
formEvent['dLV - Next URL'] = nextUrl;
|
193
|
+
}
|
194
|
+
|
186
195
|
return formEvent;
|
187
196
|
}
|
188
197
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: great-components
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.5.0
|
4
4
|
Summary: Shared components library for Great services.
|
5
5
|
Home-page: https://github.com/uktrade/great-components
|
6
6
|
Author: DIT
|
@@ -23,53 +23,53 @@ Classifier: Programming Language :: Python :: 3.6
|
|
23
23
|
Classifier: Programming Language :: Python :: 3.9
|
24
24
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
25
25
|
Description-Content-Type: text/markdown
|
26
|
-
Requires-Dist: django
|
27
|
-
Requires-Dist: beautifulsoup4
|
28
|
-
Requires-Dist: directory-constants
|
29
|
-
Requires-Dist: jsonschema
|
26
|
+
Requires-Dist: django <=4.2,>=3.2.18
|
27
|
+
Requires-Dist: beautifulsoup4 <5.0.0,>=4.6.0
|
28
|
+
Requires-Dist: directory-constants <=23.1.0,>=20.3.0
|
29
|
+
Requires-Dist: jsonschema <4.0.0,>=3.0.1
|
30
30
|
Provides-Extra: demo
|
31
|
-
Requires-Dist: lorem
|
32
|
-
Requires-Dist: django-environ
|
33
|
-
Requires-Dist: gunicorn
|
34
|
-
Requires-Dist: whitenoise
|
35
|
-
Requires-Dist: django-pygments
|
31
|
+
Requires-Dist: lorem ==0.1.1 ; extra == 'demo'
|
32
|
+
Requires-Dist: django-environ ==0.4.5 ; extra == 'demo'
|
33
|
+
Requires-Dist: gunicorn ==19.5.0 ; extra == 'demo'
|
34
|
+
Requires-Dist: whitenoise ==6.4.0 ; extra == 'demo'
|
35
|
+
Requires-Dist: django-pygments ==0.3.0 ; extra == 'demo'
|
36
36
|
Provides-Extra: janitor
|
37
|
-
Requires-Dist: ansicolors
|
37
|
+
Requires-Dist: ansicolors <2.0.0,>=1.1.8 ; extra == 'janitor'
|
38
38
|
Provides-Extra: test
|
39
|
-
Requires-Dist: lorem
|
40
|
-
Requires-Dist: ansicolors
|
41
|
-
Requires-Dist: gitdb
|
42
|
-
Requires-Dist: gitpython
|
39
|
+
Requires-Dist: lorem ==0.1.1 ; extra == 'test'
|
40
|
+
Requires-Dist: ansicolors ==1.1.8 ; extra == 'test'
|
41
|
+
Requires-Dist: gitdb ==4.0.10 ; extra == 'test'
|
42
|
+
Requires-Dist: gitpython ==3.1.31 ; extra == 'test'
|
43
43
|
Requires-Dist: GitPython ; extra == 'test'
|
44
|
-
Requires-Dist: flake8
|
45
|
-
Requires-Dist: smmap
|
46
|
-
Requires-Dist: toml
|
47
|
-
Requires-Dist: requests-toolbelt
|
48
|
-
Requires-Dist: twine
|
49
|
-
Requires-Dist: wheel
|
50
|
-
Requires-Dist: setuptools
|
51
|
-
Requires-Dist: vulture
|
52
|
-
Requires-Dist: hvac
|
53
|
-
Requires-Dist: attrs
|
54
|
-
Requires-Dist: certifi
|
55
|
-
Requires-Dist: charset-normalizer
|
56
|
-
Requires-Dist: coverage[toml]
|
57
|
-
Requires-Dist: execnet
|
58
|
-
Requires-Dist: idna
|
59
|
-
Requires-Dist: iniconfig
|
60
|
-
Requires-Dist: packaging
|
61
|
-
Requires-Dist: pluggy
|
62
|
-
Requires-Dist: py
|
63
|
-
Requires-Dist: pytest
|
64
|
-
Requires-Dist: pytest-codecov
|
65
|
-
Requires-Dist: pytest-cov
|
66
|
-
Requires-Dist: pytest-django
|
67
|
-
Requires-Dist: pytest-sugar
|
68
|
-
Requires-Dist: pytest-xdist
|
69
|
-
Requires-Dist: requests
|
70
|
-
Requires-Dist: termcolor
|
71
|
-
Requires-Dist: tomli
|
72
|
-
Requires-Dist: urllib3
|
44
|
+
Requires-Dist: flake8 ==3.7.8 ; extra == 'test'
|
45
|
+
Requires-Dist: smmap ==5.0.0 ; extra == 'test'
|
46
|
+
Requires-Dist: toml ==0.10.2 ; extra == 'test'
|
47
|
+
Requires-Dist: requests-toolbelt ==0.8.0 ; extra == 'test'
|
48
|
+
Requires-Dist: twine <2.0.0,>=1.11.0 ; extra == 'test'
|
49
|
+
Requires-Dist: wheel <1.0.0,>=0.31.0 ; extra == 'test'
|
50
|
+
Requires-Dist: setuptools <39.0.0,>=38.6.0 ; extra == 'test'
|
51
|
+
Requires-Dist: vulture <2.0.0,>=1.0.0 ; extra == 'test'
|
52
|
+
Requires-Dist: hvac <1.0.0,>=0.9.5 ; extra == 'test'
|
53
|
+
Requires-Dist: attrs ==23.1.0 ; extra == 'test'
|
54
|
+
Requires-Dist: certifi ==2022.12.7 ; extra == 'test'
|
55
|
+
Requires-Dist: charset-normalizer ==3.1.0 ; extra == 'test'
|
56
|
+
Requires-Dist: coverage[toml] ==7.2.5 ; extra == 'test'
|
57
|
+
Requires-Dist: execnet ==1.9.0 ; extra == 'test'
|
58
|
+
Requires-Dist: idna ==3.4 ; extra == 'test'
|
59
|
+
Requires-Dist: iniconfig ==2.0.0 ; extra == 'test'
|
60
|
+
Requires-Dist: packaging ==23.1 ; extra == 'test'
|
61
|
+
Requires-Dist: pluggy ==0.13.1 ; extra == 'test'
|
62
|
+
Requires-Dist: py ==1.11.0 ; extra == 'test'
|
63
|
+
Requires-Dist: pytest ==6.2.1 ; extra == 'test'
|
64
|
+
Requires-Dist: pytest-codecov ==0.5.1 ; extra == 'test'
|
65
|
+
Requires-Dist: pytest-cov ==4.0.0 ; extra == 'test'
|
66
|
+
Requires-Dist: pytest-django ==3.10.0 ; extra == 'test'
|
67
|
+
Requires-Dist: pytest-sugar ==0.9.7 ; extra == 'test'
|
68
|
+
Requires-Dist: pytest-xdist ==3.2.1 ; extra == 'test'
|
69
|
+
Requires-Dist: requests ==2.30.0 ; extra == 'test'
|
70
|
+
Requires-Dist: termcolor ==2.3.0 ; extra == 'test'
|
71
|
+
Requires-Dist: tomli ==2.0.1 ; extra == 'test'
|
72
|
+
Requires-Dist: urllib3 ==1.26.15 ; extra == 'test'
|
73
73
|
Requires-Dist: codecov ; extra == 'test'
|
74
74
|
|
75
75
|
# directory-components
|
@@ -7,7 +7,7 @@ great_components/context_processors.py,sha256=YkJPBLrrYnDYUHCpQP1shHommdj5NhgL-a
|
|
7
7
|
great_components/decorators.py,sha256=dgT0IxSN0uTlCSzsAdGU9NsR9hqouk0YPkNNzefRKtE,311
|
8
8
|
great_components/helpers.py,sha256=kOQqv4v2DSY5iKyseWnrMLawoa381GPRMgC7oHN3uCM,6908
|
9
9
|
great_components/middleware.py,sha256=9dVTTbMlTBnwcmDB3CDi6DGQrxiecOwY-Dg7lEOC_OQ,7361
|
10
|
-
great_components/mixins.py,sha256=
|
10
|
+
great_components/mixins.py,sha256=GTMV82AV5tUcuLy07jXPeAPIoqTeYph0SEDlu4mAcx0,3111
|
11
11
|
great_components/views.py,sha256=N2F6kvJUMmW9OQCIPcH16KMLlNhD_nrOTz_m0bnExZo,544
|
12
12
|
great_components/forms/__init__.py,sha256=hKKA3w8GBglzmszrK3-z3n8DSRBKcBe9_TLrC52YbLI,153
|
13
13
|
great_components/forms/fields.py,sha256=1N8hqFhVrZRgGIXDHzA8fH85XtI6B3ZyiWkZDXh0LOg,6044
|
@@ -58,7 +58,7 @@ great_components/static/great_components/js/dit.components.languageSelectorDropd
|
|
58
58
|
great_components/static/great_components/js/dit.components.multiselect-autocomplete.js,sha256=BYEwSMS4tdbieb0cxMhdqMRZhiZl5L75Ba_L4o1r6yM,4156
|
59
59
|
great_components/static/great_components/js/dit.components.searchPageExpandableOptions.js,sha256=sbZd5APWrSJzC6WQAbpRc8Aezl-fiv0quVm9KO3j7s8,772
|
60
60
|
great_components/static/great_components/js/dit.responsive.js,sha256=SvMnrKTsZyNYNojfSxSVnCW-jUPBFmRfkjfL9Aqt4Ac,4401
|
61
|
-
great_components/static/great_components/js/dit.tagging.js,sha256=
|
61
|
+
great_components/static/great_components/js/dit.tagging.js,sha256=q35k7VkDP5tce3s8OlFVjbJAduVPfA1GxN2FVBeGlNY,6753
|
62
62
|
great_components/static/great_components/js/dit.utils.js,sha256=_EyGUKvfL-DfSPfVmUFWGIxF7U07foPQ61Dx8YJdgM4,413
|
63
63
|
great_components/static/great_components/js/vendor/accessible-autocomplete.min.css,sha256=h9z4dVhBoGVIPCgnliGaJWjXRdSCtU13Q8l2jSn0thk,1928
|
64
64
|
great_components/static/great_components/js/vendor/accessible-autocomplete.min.js,sha256=MgqXRu91CapcNUdzaKX9nNkoKDiGk5-hzIdT2Ca13j4,21867
|
@@ -634,8 +634,8 @@ great_components/templates/great_components/header_footer/search.html,sha256=SVU
|
|
634
634
|
great_components/templates/great_components/header_footer/sso_login.html,sha256=IasiMYwuaTDbwpwYa2gLJcEQRIqZcZHGCpeh7Awvw9M,463
|
635
635
|
great_components/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
636
636
|
great_components/templatetags/great_components.py,sha256=VtVJpVHfYZ5zb4qlpFF8mbfs2nXLqjguYLV6iO8tXX0,12230
|
637
|
-
great_components-2.
|
638
|
-
great_components-2.
|
639
|
-
great_components-2.
|
640
|
-
great_components-2.
|
641
|
-
great_components-2.
|
637
|
+
great_components-2.5.0.dist-info/LICENSE,sha256=q4QjlbTN37umB_xq3DRmS0qvT2tMO_5_-u0WWzYcDQE,1091
|
638
|
+
great_components-2.5.0.dist-info/METADATA,sha256=5_-ipJrtLjzFoj9ttmhT4O6OXuW03AFmfi6wRNsmX0k,10633
|
639
|
+
great_components-2.5.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
640
|
+
great_components-2.5.0.dist-info/top_level.txt,sha256=aI2xcjZzpL8o3QuUGQB5YkqHOknVkFwQOSZQiaNqRHU,22
|
641
|
+
great_components-2.5.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|