ccs-digitalmarketplace-frontend-jinja 4.8.0__py3-none-any.whl → 4.9.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ccs-digitalmarketplace-frontend-jinja
3
- Version: 4.8.0
3
+ Version: 4.9.0
4
4
  Summary: Jinja templates for Digital Marketplace apps.
5
5
  Author: CCS Developers
6
6
  Project-URL: Homepage, https://github.com/Crown-Commercial-Service/ccs-digitalmarketplace-frontend-jinja
@@ -14,13 +14,13 @@ Requires-Dist: jinja2>3
14
14
  Requires-Dist: ccs-govuk-frontend-jinja<2,>=1.5
15
15
  Requires-Dist: ccs-digitalmarketplace-utils>=69.0.0
16
16
  Provides-Extra: dev
17
- Requires-Dist: flake8; extra == "dev"
18
- Requires-Dist: mypy; extra == "dev"
19
- Requires-Dist: pytest; extra == "dev"
20
- Requires-Dist: lxml; extra == "dev"
21
- Requires-Dist: xmldiff; extra == "dev"
22
- Requires-Dist: flask; extra == "dev"
23
- Requires-Dist: pre-commit; extra == "dev"
17
+ Requires-Dist: flake8==7.3.0; extra == "dev"
18
+ Requires-Dist: mypy==1.16.1; extra == "dev"
19
+ Requires-Dist: pytest==8.4.1; extra == "dev"
20
+ Requires-Dist: lxml==5.4.0; extra == "dev"
21
+ Requires-Dist: xmldiff==2.7.0; extra == "dev"
22
+ Requires-Dist: flask==3.1.1; extra == "dev"
23
+ Requires-Dist: pre-commit==4.2.0; extra == "dev"
24
24
  Dynamic: license-file
25
25
 
26
26
  Digital Marketplace Jinja Macros
@@ -41,6 +41,7 @@ The following table shows the version of Digital Marketplace Frontend Jinja that
41
41
 
42
42
  | Digital Marketplace Frontend Jinja Version | Target CCS Digital Marketplace GOV.UK Frontend Version |
43
43
  | ------------------------------------------ | ------------------------------------------------------ |
44
+ | [4.9.0](https://github.com/Crown-Commercial-Service/ccs-digitalmarketplace-frontend-jinja/releases/tag/4.9.0) | [3.9.0](https://github.com/Crown-Commercial-Service/ccs-digitalmarketplace-govuk-frontend/releases/tag/v3.9.0) |
44
45
  | [4.8.0](https://github.com/Crown-Commercial-Service/ccs-digitalmarketplace-frontend-jinja/releases/tag/4.8.0) | [3.8.0](https://github.com/Crown-Commercial-Service/ccs-digitalmarketplace-govuk-frontend/releases/tag/v3.8.0) |
45
46
  | [4.7.0](https://github.com/Crown-Commercial-Service/ccs-digitalmarketplace-frontend-jinja/releases/tag/4.7.0) | [3.7.0](https://github.com/Crown-Commercial-Service/ccs-digitalmarketplace-govuk-frontend/releases/tag/v3.7.0) |
46
47
  | [4.6.0](https://github.com/Crown-Commercial-Service/ccs-digitalmarketplace-frontend-jinja/releases/tag/4.6.0) | [3.6.0](https://github.com/Crown-Commercial-Service/ccs-digitalmarketplace-govuk-frontend/releases/tag/v3.6.0) |
@@ -1,5 +1,5 @@
1
- ccs_digitalmarketplace_frontend_jinja-4.8.0.dist-info/licenses/LICENCE,sha256=GbPuM26UomDfs5sMy6udIVXYC8grPSN7bSkO29-F5hI,1110
2
- digitalmarketplace_frontend_jinja/__init__.py,sha256=7aYkgOQT0badLEXhK2h5IVtpc3G2GMvJTt0OqArXcK8,22
1
+ ccs_digitalmarketplace_frontend_jinja-4.9.0.dist-info/licenses/LICENCE,sha256=GbPuM26UomDfs5sMy6udIVXYC8grPSN7bSkO29-F5hI,1110
2
+ digitalmarketplace_frontend_jinja/__init__.py,sha256=TGjqTJXDefd_lENnFYB6xPAor-aV9NiN2jxNvO-G1FA,22
3
3
  digitalmarketplace_frontend_jinja/templates/components/alert/macro.html,sha256=W4hQmVTEOTSON6ypLoV3cJNgBcCYN1akxy-Y1QZH8X0,992
4
4
  digitalmarketplace_frontend_jinja/templates/components/attachment/macro.html,sha256=0Fi8QqqwmPpZ3UBOjCDiUkfSOYxMYyTlBngnPJrZ7Zo,6452
5
5
  digitalmarketplace_frontend_jinja/templates/components/banner/macro.html,sha256=AsPQydTvw-SwcgczVZmbdlGMXT0SoilvhAtKrTskpME,905
@@ -16,14 +16,15 @@ digitalmarketplace_frontend_jinja/templates/components/input-from-form/macro.htm
16
16
  digitalmarketplace_frontend_jinja/templates/components/list-input/macro.html,sha256=MW0PA2jNKFaYJQtYrcEYBVTDBbFa7NL07QCXS3ozQhE,5756
17
17
  digitalmarketplace_frontend_jinja/templates/components/option-select/macro.html,sha256=YhQXBlqjPbONv1hTlaTMbEj4SO3wf-FAbeBETYpEB7c,2134
18
18
  digitalmarketplace_frontend_jinja/templates/components/previous-next-pagination/macro.html,sha256=z3VnGXfaQvgIgR0XfCkOlC9EDA46UpKgZyTIQQx14_8,668
19
- digitalmarketplace_frontend_jinja/templates/components/question/macro.html,sha256=lj0D5OopaFalkNG7_wRGHahHg7dbc7ddnMb_K7uv6QM,3722
19
+ digitalmarketplace_frontend_jinja/templates/components/question/macro.html,sha256=MY8f4PTxEBb7ifBx-kurXrLivHW_RN-UpcojJdAjHLk,3985
20
20
  digitalmarketplace_frontend_jinja/templates/components/question-boolean/macro.html,sha256=DVxnbPGYfEa_FgYwLPccvYmS2wD-PC_GI1B_fkYGHho,2878
21
21
  digitalmarketplace_frontend_jinja/templates/components/question-character-count/macro.html,sha256=YMOJiATKyLByuPq8SuPsjN4WZfpSp5PIPtKks1lGnT8,1501
22
22
  digitalmarketplace_frontend_jinja/templates/components/question-checkbox-tree/macro.html,sha256=-nSYoI7rmStap6rp_0QIfcYVhs8EjyLW4r1Y0UsDF7A,4593
23
+ digitalmarketplace_frontend_jinja/templates/components/question-checkbox-tree-large/macro.html,sha256=UteO9Lz5VbDiE5TS9W5LCGHUihx010SPlDBga35ce2g,3168
23
24
  digitalmarketplace_frontend_jinja/templates/components/question-checkboxes/macro.html,sha256=LZzaZVJ8o1nkUBX4Lf_fjIoDeuxwpXnfJcYaOFYQUXY,2496
24
25
  digitalmarketplace_frontend_jinja/templates/components/question-date/macro.html,sha256=D8UUNZTKuBXoAeWKWL3SLq_IUysOBfkC7Svgl1eYHIM,1948
25
26
  digitalmarketplace_frontend_jinja/templates/components/question-format-hint/macro.html,sha256=x6xTgRJgucQ-FVzeTmHLRrD0ocKIOzzGJRIzYsNZIXw,368
26
- digitalmarketplace_frontend_jinja/templates/components/question-hidden/macro.html,sha256=LX4-2-Js3XKjEYEgpCdNGBxQM3ttblw2IHRzrqXHKL4,4361
27
+ digitalmarketplace_frontend_jinja/templates/components/question-hidden/macro.html,sha256=HdvraPSzTN_x0rtoJLofB6nO3yZqpuqPTVA-4VF_RRU,4384
27
28
  digitalmarketplace_frontend_jinja/templates/components/question-list/macro.html,sha256=531t6KzHmeTBU2jNasRpIT8Yl5M-NcqLn720VQQn8YE,3981
28
29
  digitalmarketplace_frontend_jinja/templates/components/question-list-multiquestion/macro.html,sha256=oD5PLwydZ6Eg-N2aMS2sBWX9izOSU7Oeg6otMh6_qhc,682
29
30
  digitalmarketplace_frontend_jinja/templates/components/question-list-multiquestion-client-side/macro.html,sha256=E1ylDMDDfv8DA33IK3vvJWdctLGrEG1gEWT2_tQ-j1I,4156
@@ -35,11 +36,11 @@ digitalmarketplace_frontend_jinja/templates/components/question-pricing/macro.ht
35
36
  digitalmarketplace_frontend_jinja/templates/components/question-radios/macro.html,sha256=UQVf1O4OxTJoA9kLLyLiaHBhxvRSUKXpnA5EkrvLLnw,2884
36
37
  digitalmarketplace_frontend_jinja/templates/components/question-select/macro.html,sha256=HUSQiYWv9jMRkV4FdiyVojkGSns_dKoi_FUj9d5w3u0,2031
37
38
  digitalmarketplace_frontend_jinja/templates/components/question-text/macro.html,sha256=OV3z43lBdJRYSJofygrWVu3Y4VxWuQAApgebN1kM0-o,1381
38
- digitalmarketplace_frontend_jinja/templates/components/question-upload/macro.html,sha256=FY3-g4U8BTsh0WmO41jsjL1UCj0E1j88WtCXTw99GsU,2635
39
+ digitalmarketplace_frontend_jinja/templates/components/question-upload/macro.html,sha256=55H3I3oeCbTEHgNd3Mvpd4BJ6pAODmjYJrGACw7kgfU,2651
39
40
  digitalmarketplace_frontend_jinja/templates/components/radios-from-form/macro.html,sha256=DqXM84BLsAfLRtfjlLgKQ3-gjPGWFt0O5QdVOQiih60,1776
40
41
  digitalmarketplace_frontend_jinja/templates/components/search-box/macro.html,sha256=QHf7Log2Gp31HHCVK3ufoLvJwLDusRmZXDmZ7ME9EtA,1028
41
42
  digitalmarketplace_frontend_jinja/templates/components/select-country-from-form/macro.html,sha256=AHWNjovdZoLz5LP17l1U4XJlPirFTdVxsvUNLTWw-ik,1117
42
- digitalmarketplace_frontend_jinja/templates/components/summary-content/macro.html,sha256=I-FoGMcRMvwLx7UvuTkzRWJhu-7lQGEK7GnG_buQI3s,2738
43
+ digitalmarketplace_frontend_jinja/templates/components/summary-content/macro.html,sha256=w2__doR4tBr7njI7aM-Q-EPLG9TNGiRVIBtM8wV_UE0,2778
43
44
  digitalmarketplace_frontend_jinja/templates/components/summary-content-boolean/macro.html,sha256=JKMmIt_74HVtThFlvV6JHkmxmHKr7N1Dm9Flarbti6s,517
44
45
  digitalmarketplace_frontend_jinja/templates/components/summary-content-checkbox-tree/macro.html,sha256=yfSNtr0PIEgAbN-nxHnk3V1sJFdqLWu_q6CgJ8EWHK4,896
45
46
  digitalmarketplace_frontend_jinja/templates/components/summary-content-list/macro.html,sha256=whchdQS_dPCoxdjEQ1POpA_cQiN15kuaRAOoft4MNlg,625
@@ -59,7 +60,7 @@ digitalmarketplace_frontend_jinja/templates/errors/410.html,sha256=ub7W3MRbIPQvj
59
60
  digitalmarketplace_frontend_jinja/templates/errors/500.html,sha256=x1Lu8ATSPGGSXvjj1ZHVq-h9eBWLiUK2MxPHwqZCiDQ,408
60
61
  digitalmarketplace_frontend_jinja/templates/layouts/_custom_dimensions.html,sha256=SglUULyYlEWLWYQ7luwKONuI2BnWbOnd5MOIblKZR3E,731
61
62
  digitalmarketplace_frontend_jinja/templates/layouts/_site_verification.html,sha256=6YWaREd5cPw1u5V9zsVaCOWG_uJ9SUMNdZj9fLK2jU8,142
62
- ccs_digitalmarketplace_frontend_jinja-4.8.0.dist-info/METADATA,sha256=v8LtVCGrNAjDvTOqganseCMiUYF2POUAFK_uKoj66wU,15465
63
- ccs_digitalmarketplace_frontend_jinja-4.8.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
64
- ccs_digitalmarketplace_frontend_jinja-4.8.0.dist-info/top_level.txt,sha256=MeEUNXXhcYp_c2URA_Npkpxj50E3hc3Eir0PWJjNIrw,34
65
- ccs_digitalmarketplace_frontend_jinja-4.8.0.dist-info/RECORD,,
63
+ ccs_digitalmarketplace_frontend_jinja-4.9.0.dist-info/METADATA,sha256=JrSw5lFFDQ7oHJWKzSTzoBytdbtkVMPqOuow4rs8m0M,15742
64
+ ccs_digitalmarketplace_frontend_jinja-4.9.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
65
+ ccs_digitalmarketplace_frontend_jinja-4.9.0.dist-info/top_level.txt,sha256=MeEUNXXhcYp_c2URA_Npkpxj50E3hc3Eir0PWJjNIrw,34
66
+ ccs_digitalmarketplace_frontend_jinja-4.9.0.dist-info/RECORD,,
@@ -1 +1 @@
1
- __version__ = '4.8.0'
1
+ __version__ = '4.9.0'
@@ -10,6 +10,7 @@
10
10
  {%- from "digitalmarketplace_frontend_jinja/components/question-boolean/macro.html" import digitalmarketplaceQuestionBoolean -%}
11
11
  {%- from "digitalmarketplace_frontend_jinja/components/question-checkboxes/macro.html" import digitalmarketplaceQuestionCheckboxes -%}
12
12
  {%- from "digitalmarketplace_frontend_jinja/components/question-checkbox-tree/macro.html" import digitalmarketplaceQuestionCheckboxTree -%}
13
+ {%- from "digitalmarketplace_frontend_jinja/components/question-checkbox-tree-large/macro.html" import digitalmarketplaceQuestionCheckboxTreeLarge -%}
13
14
  {%- from "digitalmarketplace_frontend_jinja/components/question-list/macro.html" import digitalmarketplaceQuestionList -%}
14
15
  {%- from "digitalmarketplace_frontend_jinja/components/question-select/macro.html" import digitalmarketplaceQuestionSelect -%}
15
16
  {%- from "digitalmarketplace_frontend_jinja/components/question-multiquestion/macro.html" import digitalmarketplaceQuestionMultiquestion -%}
@@ -43,6 +44,8 @@
43
44
  {{ digitalmarketplaceQuestionCheckboxes(params) }}
44
45
  {% elif params.type == 'checkbox_tree' %}
45
46
  {{ digitalmarketplaceQuestionCheckboxTree(params) }}
47
+ {% elif params.type == 'checkbox_tree_large' %}
48
+ {{ digitalmarketplaceQuestionCheckboxTreeLarge(params) }}
46
49
  {% elif params.type == 'list' %}
47
50
  {{ digitalmarketplaceQuestionList(params) }}
48
51
  {% elif params.type == 'select' %}
@@ -0,0 +1,83 @@
1
+ {% macro digitalmarketplaceQuestionCheckboxTreeLarge(params) %}
2
+ {%- from "govuk_frontend_jinja/components/fieldset/macro.html" import govukFieldset -%}
3
+ {%- from "govuk_frontend_jinja/components/checkboxes/macro.html" import govukCheckboxes -%}
4
+ {%- from "govuk_frontend_jinja/components/hint/macro.html" import govukHint -%}
5
+ {%- from "govuk_frontend_jinja/components/accordion/macro.html" import govukAccordion -%}
6
+ {%- from "govuk_frontend_jinja/components/error-message/macro.html" import govukErrorMessage -%}
7
+ {%- from "digitalmarketplace_frontend_jinja/components/question-format-hint/macro.html" import digitalmarketplaceQuestionFormatHint -%}
8
+
9
+ {% set name = params.question.id %}
10
+ {% set questionText = params.question.question + " ({})".format(params.question.optional_text if params.question.optional_text else "optional") if params.question.optional else params.question.question %}
11
+ {% set errorMessage = params.errors[name] if params.errors %}
12
+ {% set values = params.data[name] or [] if params.data else [] %}
13
+
14
+ <div class="govuk-form-group {%- if errorMessage %} govuk-form-group--error{% endif %}">
15
+ {% call govukFieldset({
16
+ "legend": {
17
+ "html": questionText,
18
+ "classes": "govuk-fieldset__legend--m"
19
+ },
20
+ "classes": 'dm-checkbox-tree-large',
21
+ "attributes": {
22
+ 'aria-describedby': "input-" + name if errorMessage,
23
+ }
24
+ }) %}
25
+ {% if params.question.hint or params.question.question_advice %}
26
+ {{ govukHint({
27
+ "html": digitalmarketplaceQuestionFormatHint(params.question)
28
+ }) }}
29
+ {% endif %}
30
+
31
+ {% if errorMessage %}
32
+ {{ govukErrorMessage({
33
+ "text": errorMessage["message"],
34
+ "id": "input-" + name
35
+ }) }}
36
+ {% endif %}
37
+
38
+ <div class="govuk-grid-row">
39
+ <div class="dm-checkbox-tree-large__summary govuk-grid-column-full">
40
+ {% set accordionItems = [] %}
41
+
42
+ {% for option in params.question.options %}
43
+ {% set checkboxItems = [] %}
44
+
45
+ {% for label in option.options %}
46
+ {% set checkboxItem = {
47
+ "text": label.label,
48
+ "value": label.label,
49
+ "checked": label.label in values
50
+ } %}
51
+ {% if label.description %}
52
+ {% set _checkboxItem = checkboxItem.__setitem__("hint", { "html": label.description }) %}
53
+ {% endif %}
54
+ {% set _checkboxItems = checkboxItems.append(checkboxItem) %}
55
+ {% endfor %}
56
+
57
+ {% set _accordionItems = accordionItems.append({
58
+ "heading": {
59
+ "text": option.label
60
+ },
61
+ "summary": {
62
+ "html": option.description
63
+ } if option.description,
64
+ "content": {
65
+ "html": govukCheckboxes({
66
+ "name": name,
67
+ "idPrefix": "input-" + name + '-' + loop.index | string,
68
+ "items": checkboxItems,
69
+ "classes": "govuk-checkboxes--small"
70
+ })
71
+ }
72
+ }) %}
73
+ {% endfor %}
74
+
75
+ {{ govukAccordion({
76
+ "id": "accordion-" + name,
77
+ "items": accordionItems
78
+ }) }}
79
+ </div>
80
+ </div>
81
+ {% endcall %}
82
+ </div>
83
+ {% endmacro %}
@@ -94,7 +94,7 @@
94
94
  {{ digitalmarketplaceQuestionPricingHidden(params) }}
95
95
  {% elif params.type == 'date' %}
96
96
  {{ digitalmarketplaceQuestionDateHidden(params) }}
97
- {% elif params.type in ['checkboxes', 'checkbox_tree', 'list'] %}
97
+ {% elif params.type in ['checkboxes', 'checkbox_tree', 'checkbox_tree_large', 'list'] %}
98
98
  {{ digitalmarketplaceQuestionCheckboxesHidden(params) }}
99
99
  {% elif params.type == 'multiquestion' %}
100
100
  {{ digitalmarketplaceQuestionMultiquestionHidden(params) }}
@@ -15,23 +15,23 @@
15
15
  <ul class="dm-document-upload-list">
16
16
  <li class="dm-document-list-item">
17
17
  <div class="govuk-grid-row">
18
- <div class="govuk-grid-column-two-thirds">
18
+ <div class="govuk-grid-column-{{ 'two-thirds' if params.question.optional else 'full' }}">
19
19
  <div class="dm-document-upload-with-icon">
20
20
  <span class="dm-document-icon"></span>
21
21
  Document uploaded {{ value | parse_document_upload_time | datetimeformat }}
22
22
  </div>
23
23
  </div>
24
- <div class="govuk-grid-column-one-third">
25
- {% if params.question.optional %}
26
- {{ govukButton({
27
- "text": "Remove upload",
28
- "name": "remove-upload",
29
- "value": name,
30
- "classes": "govuk-button--secondary",
31
- "preventDoubleClick": true
32
- }) }}
33
- {% endif %}
34
- </div>
24
+ {% if params.question.optional %}
25
+ <div class="govuk-grid-column-one-third">
26
+ {{ govukButton({
27
+ "text": "Remove upload",
28
+ "name": "remove-upload",
29
+ "value": name,
30
+ "classes": "govuk-button--secondary",
31
+ "preventDoubleClick": true
32
+ }) }}
33
+ </div>
34
+ {% endif %}
35
35
  </div>
36
36
  </li>
37
37
  </ul>
@@ -34,7 +34,7 @@
34
34
  {{ digitalmarketplaceSummaryContentNumber({
35
35
  "value": params.value
36
36
  }) }}
37
- {% elif params.type == 'checkbox_tree' %}
37
+ {% elif params.type == 'checkbox_tree' or params.type == 'checkbox_tree_large' %}
38
38
  {{ digitalmarketplaceSummaryContentCheckboxTree({
39
39
  "value": params.value
40
40
  }) }}