@gov-cy/govcy-express-services 1.12.0 → 1.12.1
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.
- package/README.md +74 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -320,6 +320,35 @@ Here is an example JSON config:
|
|
|
320
320
|
"en": "Menu",
|
|
321
321
|
"tr": "Menu"
|
|
322
322
|
},
|
|
323
|
+
"navigation": { //<-- Navigation menu items
|
|
324
|
+
"items": [
|
|
325
|
+
{
|
|
326
|
+
"label": {
|
|
327
|
+
"el": "Αρχική",
|
|
328
|
+
"en": "Home",
|
|
329
|
+
"tr": "Home"
|
|
330
|
+
},
|
|
331
|
+
"href": {
|
|
332
|
+
"el": "/test/",
|
|
333
|
+
"en": "/test/",
|
|
334
|
+
"tr": "/test/"
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"label": {
|
|
339
|
+
"el": "Αίτηση",
|
|
340
|
+
"en": "The application",
|
|
341
|
+
"tr": "The application"
|
|
342
|
+
},
|
|
343
|
+
"href": {
|
|
344
|
+
"el": "/test/task-list",
|
|
345
|
+
"en": "/test/task-list",
|
|
346
|
+
"tr": "/test/task-list"
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
]
|
|
350
|
+
},
|
|
351
|
+
"menuHideLabelVisibility": true,
|
|
323
352
|
"title": { //<-- Service title (meta)
|
|
324
353
|
"el": "Υπηρεσία τεστ",
|
|
325
354
|
"en": "Test service",
|
|
@@ -789,6 +818,37 @@ Here are some details explaining the JSON structure:
|
|
|
789
818
|
- `submissionDataVersion` : The submission data version,
|
|
790
819
|
- `rendererVersion` : The govcy-frontend-renderer version,
|
|
791
820
|
- `designSystemsVersion` : The govcy-design-system version,
|
|
821
|
+
- <span id="site-navigation"></span>`navigation`: Optional menu navigation items. Example:
|
|
822
|
+
```json
|
|
823
|
+
"navigation": {
|
|
824
|
+
"items": [
|
|
825
|
+
{
|
|
826
|
+
"label": {
|
|
827
|
+
"el": "Αρχική",
|
|
828
|
+
"en": "Home",
|
|
829
|
+
"tr": "Home"
|
|
830
|
+
},
|
|
831
|
+
"href": {
|
|
832
|
+
"el": "/test/",
|
|
833
|
+
"en": "/test/",
|
|
834
|
+
"tr": "/test/"
|
|
835
|
+
}
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
"label": {
|
|
839
|
+
"el": "Αίτηση",
|
|
840
|
+
"en": "The application",
|
|
841
|
+
"tr": "The application"
|
|
842
|
+
},
|
|
843
|
+
"href": {
|
|
844
|
+
"el": "/test/task-list",
|
|
845
|
+
"en": "/test/task-list",
|
|
846
|
+
"tr": "/test/task-list"
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
]
|
|
850
|
+
}
|
|
851
|
+
```
|
|
792
852
|
- `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
853
|
```json
|
|
794
854
|
"homeRedirectPage": {
|
|
@@ -1925,23 +1985,23 @@ The validation rules for each element are defined in the `"validations` array fo
|
|
|
1925
1985
|
- `email`: Email input
|
|
1926
1986
|
- `date`: Date input (DD/MM/YYYY)
|
|
1927
1987
|
- `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.
|
|
1988
|
+
- `dateDMY`: European/Common Format date input `D/M/YYYY`
|
|
1989
|
+
- `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`).
|
|
1990
|
+
- `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`).
|
|
1991
|
+
- `minCurrentDate`: Checks if the value is greater than or equal to the current date.
|
|
1992
|
+
- `maxCurrentDate`: Checks if the value is less than or equal to the current date.
|
|
1933
1993
|
- `required`: Checks if the value is not null, undefined, or an empty string (after trimming).
|
|
1934
1994
|
- `length`: Checks if the value has a maximum length passed in the `checkValue` parameter.
|
|
1935
1995
|
- `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`.
|
|
1996
|
+
- `minValue`: Checks if the value is greater than or equal to the specified minimum value passed in the `checkValue` parameter.
|
|
1997
|
+
- `maxValue`: Checks if the value is less than or equal to the specified maximum value passed in the `checkValue` parameter.
|
|
1998
|
+
- `minValueDate`: Checks if the value is greater than or equal to the specified minimum date passed in the `checkValue` parameter.
|
|
1999
|
+
- `maxValueDate`: Checks if the value is less than or equal to the specified maximum date passed in the `checkValue` parameter.
|
|
2000
|
+
- `withinDaysBeforeToday`: Checks if the value is within the last `N` days (between `today - N` and `today`), where `N` is passed in `checkValue`.
|
|
2001
|
+
- `withinDaysAfterToday`: Checks if the value is within the next `N` days (between `today` and `today + N`), where `N` is passed in `checkValue`.
|
|
2002
|
+
- `minLength`: Checks if the value has a minimum length passed in the `checkValue` parameter.
|
|
2003
|
+
|
|
2004
|
+
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
2005
|
|
|
1946
2006
|
Example:
|
|
1947
2007
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gov-cy/govcy-express-services",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.1",
|
|
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",
|