@gov-cy/govcy-express-services 1.12.0 → 1.12.2

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 (2) hide show
  1. package/README.md +80 -56
  2. package/package.json +2 -4
package/README.md CHANGED
@@ -269,50 +269,14 @@ Here is an example JSON config:
269
269
  ],
270
270
  "footerIcons": [ //<-- Icons on the footer
271
271
  {
272
- "target": "_blank",
273
- "src": {
274
- "el": "https://cdn.jsdelivr.net/gh/gov-cy/govdesign@main/FundedbyEU_NextGeneration_H53-EL.png",
275
- "en": "https://cdn.jsdelivr.net/gh/gov-cy/govdesign@main/FundedbyEU_NextGeneration_H53-EN.png",
276
- "tr": "https://cdn.jsdelivr.net/gh/gov-cy/govdesign@main/FundedbyEU_NextGeneration_H53-EN.png"
277
- },
278
- "alt": {
279
- "el": "Χρηματοδοτείται από την ΕΕ Next Generation EU",
280
- "en": "Funded by the EU Next Generation EU",
281
- "tr": "Funded by the EU Next Generation EU"
282
- },
283
- "href": {
284
- "el": "https://europa.eu/",
285
- "en": "https://europa.eu/",
286
- "tr": "https://europa.eu/"
287
- },
288
- "title": {
289
- "el": "Μετάβαση στην ιστοσελίδα της ΕΕ",
290
- "en": "Go to EU website",
291
- "tr": "Go to EU website"
292
- }
272
+ "preset": "dsf-badge",
273
+ "badgeId": "DSF-water-aerators"
293
274
  },
294
275
  {
295
- "target": "_blank",
296
- "src": {
297
- "el": "https://cdn.jsdelivr.net/gh/gov-cy/govdesign@main/CYpros%20to%20aurio%20logo%20eng_H53_EL.png",
298
- "en": "https://cdn.jsdelivr.net/gh/gov-cy/govdesign@main/CYpros%20to%20aurio%20logo%20eng_H53_EN.png",
299
- "tr": "https://cdn.jsdelivr.net/gh/gov-cy/govdesign@main/CYpros%20to%20aurio%20logo%20eng_H53_EN.png"
300
- },
301
- "alt": {
302
- "el": "Κύπρος το Αύριο, σχέδιο ανάκαμψης και ανθεντικότητας",
303
- "en": "Cyprus tomorrow, recovery and resilience plan",
304
- "tr": "Cyprus tomorrow, recovery and resilience plan"
305
- },
306
- "href": {
307
- "el": "http://www.cyprus-tomorrow.gov.cy/",
308
- "en": "http://www.cyprus-tomorrow.gov.cy/",
309
- "tr": "http://www.cyprus-tomorrow.gov.cy/"
310
- },
311
- "title": {
312
- "el": "Μετάβαση στην ιστοσελίδα Κύπρος το Αύριο",
313
- "en": "Go to Cyprus Tomorrow website",
314
- "tr": "Go to Cyprus Tomorrow website"
315
- }
276
+ "preset": "eu-next-generation"
277
+ },
278
+ {
279
+ "preset": "cyprus-tomorrow"
316
280
  }
317
281
  ],
318
282
  "menu": { //<-- Menu altext
@@ -320,6 +284,35 @@ Here is an example JSON config:
320
284
  "en": "Menu",
321
285
  "tr": "Menu"
322
286
  },
287
+ "navigation": { //<-- Navigation menu items
288
+ "items": [
289
+ {
290
+ "label": {
291
+ "el": "Αρχική",
292
+ "en": "Home",
293
+ "tr": "Home"
294
+ },
295
+ "href": {
296
+ "el": "/test/",
297
+ "en": "/test/",
298
+ "tr": "/test/"
299
+ }
300
+ },
301
+ {
302
+ "label": {
303
+ "el": "Αίτηση",
304
+ "en": "The application",
305
+ "tr": "The application"
306
+ },
307
+ "href": {
308
+ "el": "/test/task-list",
309
+ "en": "/test/task-list",
310
+ "tr": "/test/task-list"
311
+ }
312
+ }
313
+ ]
314
+ },
315
+ "menuHideLabelVisibility": true,
323
316
  "title": { //<-- Service title (meta)
324
317
  "el": "Υπηρεσία τεστ",
325
318
  "en": "Test service",
@@ -789,6 +782,37 @@ Here are some details explaining the JSON structure:
789
782
  - `submissionDataVersion` : The submission data version,
790
783
  - `rendererVersion` : The govcy-frontend-renderer version,
791
784
  - `designSystemsVersion` : The govcy-design-system version,
785
+ - <span id="site-navigation"></span>`navigation`: Optional menu navigation items. Example:
786
+ ```json
787
+ "navigation": {
788
+ "items": [
789
+ {
790
+ "label": {
791
+ "el": "Αρχική",
792
+ "en": "Home",
793
+ "tr": "Home"
794
+ },
795
+ "href": {
796
+ "el": "/test/",
797
+ "en": "/test/",
798
+ "tr": "/test/"
799
+ }
800
+ },
801
+ {
802
+ "label": {
803
+ "el": "Αίτηση",
804
+ "en": "The application",
805
+ "tr": "The application"
806
+ },
807
+ "href": {
808
+ "el": "/test/task-list",
809
+ "en": "/test/task-list",
810
+ "tr": "/test/task-list"
811
+ }
812
+ }
813
+ ]
814
+ }
815
+ ```
792
816
  - `homeRedirectPage`: An object mapping language codes to URLs. When a user visits the root route (e.g., `https://whatever-your-service-is.service.gov.cy/`), the system redirects to the URL for the user's language. If the user's language is not found, it falls back to `"el"` or the first available URL. If not provided, a list of available sites is shown. Example:
793
817
  ```json
794
818
  "homeRedirectPage": {
@@ -1925,23 +1949,23 @@ The validation rules for each element are defined in the `"validations` array fo
1925
1949
  - `email`: Email input
1926
1950
  - `date`: Date input (DD/MM/YYYY)
1927
1951
  - `dateISO`: ISO date input `YYYY-M-D`
1928
- - `dateDMY`: European/Common Format date input `D/M/YYYY`
1929
- - `maxCurrentYear`: Maximum current year input. Use it for year-only inputs e.g. `2026` or formats that start with year e.g. `YYYY-M-D` (which works well with `dateInput` component). Do not use it with `D/M/YYYY` values (e.g. datePicker values); use date-based checks instead (`minCurrentDate`, `maxCurrentDate`, `withinDaysBeforeToday`, `withinDaysAfterToday`).
1930
- - `minCurrentYear`: Minimum current year input. Use it for year-only inputs e.g. `2026` or formats that start with year e.g. `YYYY-M-D` (which works well with `dateInput` component). Do not use it with `D/M/YYYY` values (e.g. datePicker values); use date-based checks instead (`minCurrentDate`, `maxCurrentDate`, `withinDaysBeforeToday`, `withinDaysAfterToday`).
1931
- - `minCurrentDate`: Checks if the value is greater than or equal to the current date.
1932
- - `maxCurrentDate`: Checks if the value is less than or equal to the current date.
1952
+ - `dateDMY`: European/Common Format date input `D/M/YYYY`
1953
+ - `maxCurrentYear`: Maximum current year input. Use it for year-only inputs e.g. `2026` or formats that start with year e.g. `YYYY-M-D` (which works well with `dateInput` component). Do not use it with `D/M/YYYY` values (e.g. datePicker values); use date-based checks instead (`minCurrentDate`, `maxCurrentDate`, `withinDaysBeforeToday`, `withinDaysAfterToday`).
1954
+ - `minCurrentYear`: Minimum current year input. Use it for year-only inputs e.g. `2026` or formats that start with year e.g. `YYYY-M-D` (which works well with `dateInput` component). Do not use it with `D/M/YYYY` values (e.g. datePicker values); use date-based checks instead (`minCurrentDate`, `maxCurrentDate`, `withinDaysBeforeToday`, `withinDaysAfterToday`).
1955
+ - `minCurrentDate`: Checks if the value is greater than or equal to the current date.
1956
+ - `maxCurrentDate`: Checks if the value is less than or equal to the current date.
1933
1957
  - `required`: Checks if the value is not null, undefined, or an empty string (after trimming).
1934
1958
  - `length`: Checks if the value has a maximum length passed in the `checkValue` parameter.
1935
1959
  - `regCheck`: Checks if the value matches the specified regular expression passed in the `checkValue` parameter.
1936
- - `minValue`: Checks if the value is greater than or equal to the specified minimum value passed in the `checkValue` parameter.
1937
- - `maxValue`: Checks if the value is less than or equal to the specified maximum value passed in the `checkValue` parameter.
1938
- - `minValueDate`: Checks if the value is greater than or equal to the specified minimum date passed in the `checkValue` parameter.
1939
- - `maxValueDate`: Checks if the value is less than or equal to the specified maximum date passed in the `checkValue` parameter.
1940
- - `withinDaysBeforeToday`: Checks if the value is within the last `N` days (between `today - N` and `today`), where `N` is passed in `checkValue`.
1941
- - `withinDaysAfterToday`: Checks if the value is within the next `N` days (between `today` and `today + N`), where `N` is passed in `checkValue`.
1942
- - `minLength`: Checks if the value has a minimum length passed in the `checkValue` parameter.
1943
-
1944
- For `withinDaysBeforeToday` and `withinDaysAfterToday`, validation compares calendar dates only (local server timezone), not time-of-day. Supported input date formats are `YYYY-M-D` / `YYYY-MM-DD` and `D/M/YYYY` / `DD/MM/YYYY`.
1960
+ - `minValue`: Checks if the value is greater than or equal to the specified minimum value passed in the `checkValue` parameter.
1961
+ - `maxValue`: Checks if the value is less than or equal to the specified maximum value passed in the `checkValue` parameter.
1962
+ - `minValueDate`: Checks if the value is greater than or equal to the specified minimum date passed in the `checkValue` parameter.
1963
+ - `maxValueDate`: Checks if the value is less than or equal to the specified maximum date passed in the `checkValue` parameter.
1964
+ - `withinDaysBeforeToday`: Checks if the value is within the last `N` days (between `today - N` and `today`), where `N` is passed in `checkValue`.
1965
+ - `withinDaysAfterToday`: Checks if the value is within the next `N` days (between `today` and `today + N`), where `N` is passed in `checkValue`.
1966
+ - `minLength`: Checks if the value has a minimum length passed in the `checkValue` parameter.
1967
+
1968
+ For `withinDaysBeforeToday` and `withinDaysAfterToday`, validation compares calendar dates only (local server timezone), not time-of-day. Supported input date formats are `YYYY-M-D` / `YYYY-MM-DD` and `D/M/YYYY` / `DD/MM/YYYY`.
1945
1969
 
1946
1970
  Example:
1947
1971
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gov-cy/govcy-express-services",
3
- "version": "1.12.0",
3
+ "version": "1.12.2",
4
4
  "description": "An Express-based system that dynamically renders services using @gov-cy/govcy-frontend-renderer and posts data to a submission API.",
5
5
  "author": "DMRID - DSF Team",
6
6
  "license": "MIT",
@@ -45,7 +45,6 @@
45
45
  "start:all-features": "node tests/mocks/all-features/allFeaturesStarter.mjs",
46
46
  "start:mock": "node tests/mocks/mockApiServer.mjs",
47
47
  "test": "mocha --timeout 60000 tests/**/*.test.mjs --exit",
48
- "test:report": "mocha --timeout 60000 --reporter mochawesome tests/**/*.test.mjs --exit",
49
48
  "test:unit": "mocha --recursive tests/unit/**/*.test.mjs",
50
49
  "test:integration": "mocha --recursive tests/integration/**/*.test.mjs",
51
50
  "test:package": "mocha --recursive tests/package/**/*.test.mjs",
@@ -58,7 +57,7 @@
58
57
  },
59
58
  "dependencies": {
60
59
  "@gov-cy/dsf-email-templates": "^2.1.15",
61
- "@gov-cy/govcy-frontend-renderer": "^1.28.1",
60
+ "@gov-cy/govcy-frontend-renderer": "^1.29.0",
62
61
  "axios": "^1.9.0",
63
62
  "cookie-parser": "^1.4.7",
64
63
  "dotenv": "^16.3.1",
@@ -75,7 +74,6 @@
75
74
  "chai-http": "^5.1.1",
76
75
  "coverage-badges-cli": "^2.2.0",
77
76
  "mocha": "^11.7.5",
78
- "mochawesome": "^7.1.4",
79
77
  "nodemon": "^3.0.2",
80
78
  "pa11y": "^9.1.0",
81
79
  "patch-package": "^8.0.1",