@gov-cy/govcy-express-services 1.3.0-alpha → 1.3.0-alpha.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gov-cy/govcy-express-services",
3
- "version": "1.3.0-alpha",
3
+ "version": "1.3.0-alpha.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",
@@ -52,7 +52,7 @@
52
52
  },
53
53
  "dependencies": {
54
54
  "@gov-cy/dsf-email-templates": "^2.1.0",
55
- "@gov-cy/govcy-frontend-renderer": "^1.25.0",
55
+ "@gov-cy/govcy-frontend-renderer": "^1.26.0",
56
56
  "axios": "^1.9.0",
57
57
  "cookie-parser": "^1.4.7",
58
58
  "dotenv": "^16.3.1",
@@ -77,5 +77,8 @@
77
77
  },
78
78
  "engines": {
79
79
  "node": ">=18.0.0"
80
+ },
81
+ "overrides": {
82
+ "tar-fs": "^3.1.1"
80
83
  }
81
84
  }
@@ -63,6 +63,8 @@ export function govcyHttpErrorHandler(err, req, res, next) {
63
63
  if (dataLayer.getUser(req.session)) {
64
64
  pageTemplate.sections.push(govcyResources.userNameSection(dataLayer.getUser(req.session).name)); // Add user name section
65
65
  }
66
+ // Add custom CSS path
67
+ pageData.site.customCSSFile = `/css/govcyExpress.css`;
66
68
  const html = renderer.renderFromJSON(pageTemplate, pageData);
67
69
  res.send(html);
68
70
  }
@@ -24,6 +24,8 @@ export function renderGovcyPage() {
24
24
  if (dataLayer.getUser(req.session)) {
25
25
  processedPage.pageTemplate.sections.push(govcyResources.userNameSection(dataLayer.getUser(req.session).name)); // Add user name section
26
26
  }
27
+ // Add custom CSS path
28
+ processedPage.pageData.site.customCSSFile = `/css/govcyExpress.css`;
27
29
  const html = renderer.renderFromJSON(processedPage.pageTemplate, processedPage.pageData);
28
30
  res.send(html);
29
31
  };
@@ -47,6 +47,8 @@ export function govcyRoutePageHandler(req, res, next) {
47
47
  if (dataLayer.getUser(req.session)) {
48
48
  pageTemplate.sections.push(govcyResources.userNameSection(dataLayer.getUser(req.session).name)); // Add user name section
49
49
  }
50
+ // Add custom CSS path
51
+ pageData.site.customCSSFile = `/css/govcyExpress.css`;
50
52
  const renderer = new govcyFrontendRenderer();
51
53
  const html = renderer.renderFromJSON(pageTemplate, pageData);
52
54
  res.send(html);
@@ -0,0 +1,33 @@
1
+
2
+ dl.govcy-summary-list-row-internal:not(:first-of-type) {
3
+ margin-top: 0.5rem !important;
4
+ }
5
+
6
+ .list-inline-item:not(:last-child) {
7
+ margin-right: 0 !important;
8
+ }
9
+ .list-inline-item:not(:first-child) {
10
+ margin-left: .5rem;
11
+ }
12
+
13
+ .govcy-add-new-item {
14
+ display: inline-flex;
15
+ align-items: center;
16
+ text-decoration: underline;
17
+ }
18
+
19
+ .govcy-add-new-item::before {
20
+ content: "";
21
+ display: inline-block;
22
+ width: 24px;
23
+ height: 24px;
24
+ background: url("/img/Plus_24x24.svg") no-repeat center center;
25
+ background-size: contain;
26
+ margin-right: 0.25rem; /* Fallback for browsers without flex gap */
27
+ }
28
+
29
+ @media (max-width: 767.98px) {
30
+ #multipleThingsList>tbody>tr>td {
31
+ padding: .5rem .5rem;
32
+ }
33
+ }
@@ -172,9 +172,9 @@ export const staticResources = {
172
172
  tr: "You did not add any entries yet."
173
173
  },
174
174
  multipleThingsAddEntry: {
175
- en: "Add new entry",
176
- el: "Προσθήκη νέας καταχώρησης",
177
- tr: "Add new entry"
175
+ en: "Add new entry",
176
+ el: "Προσθήκη νέας καταχώρησης",
177
+ tr: "Add new entry"
178
178
  },
179
179
  multipleThingsDedupeMessage: {
180
180
  en: "This entry already exists",
@@ -631,9 +631,9 @@ export function getMultipleThingsLink(linkType, siteId, pageUrl, lang , entryKey
631
631
  element: "htmlElement",
632
632
  params: {
633
633
  text: {
634
- en: `<p><a${(count !== null && linkType === "add" ? ` id="addNewItem${count}"` : "")} href="${fullPath}">${linkTextString}</a></p>`,
635
- el: `<p><a${(count !== null && linkType === "add" ? ` id="addNewItem${count}"` : "")} href="${fullPath}">${linkTextString}</a></p>`,
636
- tr: `<p><a${(count !== null && linkType === "add" ? ` id="addNewItem${count}"` : "")} href="${fullPath}">${linkTextString}</a></p>`
634
+ en: `<p><a${(count !== null && linkType === "add" ? ` class="govcy-add-new-item" id="addNewItem${count}"` : "")} href="${fullPath}">${linkTextString}</a></p>`,
635
+ el: `<p><a${(count !== null && linkType === "add" ? ` class="govcy-add-new-item" id="addNewItem${count}"` : "")} href="${fullPath}">${linkTextString}</a></p>`,
636
+ tr: `<p><a${(count !== null && linkType === "add" ? ` class="govcy-add-new-item" id="addNewItem${count}"` : "")} href="${fullPath}">${linkTextString}</a></p>`
637
637
  }
638
638
  }
639
639
  };
@@ -104,7 +104,13 @@ export function populateFormData(
104
104
 
105
105
  // 2) If not found, fall back to dataLayer (normal page behaviour)
106
106
  if (!fileData) {
107
- fileData = dataLayer.getFormDataValue(store, siteId, pageUrl, fieldName);
107
+ if (mode === "edit" && index !== null) {
108
+ // In edit mode, try to get the file for the specific item index
109
+ fileData = dataLayer.getFormDataValue(store, siteId, pageUrl, fieldName, index);
110
+ } else {
111
+ // In single or add mode, get the file normally
112
+ fileData = dataLayer.getFormDataValue(store, siteId, pageUrl, fieldName);
113
+ }
108
114
  }
109
115
 
110
116
  if (fileData) {