@getodk/web-forms 1.0.2 → 1.1.0

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.
@@ -2,7 +2,10 @@ const e = {
2
2
  "form_load_failure_dialog.header.title": { string: "Ocurrió un error al cargar este formulario", developer_comment: "The title text shown in the header of the dialog." },
3
3
  "form_load_failure_dialog.details.label": { string: "Detalles técnicos del error", developer_comment: "The label for the clickable summary that reveals technical error information." },
4
4
  "odk_web_forms.submit.label": { string: "Enviar", developer_comment: "Label for the primary form submission button." },
5
+ "odk_web_forms.back.label": { string: "Atrás", developer_comment: "Label for the button that moves to the previous page in a paginated form." },
6
+ "odk_web_forms.next.label": { string: "Siguiente", developer_comment: "Label for the button that moves to the next page in a paginated form." },
5
7
  "odk_web_forms.validation.error": { string: "{count, plural, one {# pregunta con error} many {# preguntas con errores} other {# preguntas con errores}}", developer_comment: "Error banner message. {count} is the number of validation violations." },
8
+ "odk_web_forms.validation.view.label": { string: "Ver", developer_comment: "Label for the error banner button that navigates to the first question with a validation error." },
6
9
  "odk_web_forms.geolocation.error": { string: "Ubicación no disponible. Active el GPS y los permisos del navegador, luego reinicie el formulario para intentarlo de nuevo.", developer_comment: "Error message shown when background geolocation fails." },
7
10
  "odk_web_forms.delete.label": { string: "Eliminar", developer_comment: "Generic label for a delete action button." },
8
11
  "odk_web_forms.cancel.label": { string: "Cancelar", developer_comment: "Generic label for a cancel action button." },
@@ -2,7 +2,10 @@ const e = {
2
2
  "form_load_failure_dialog.header.title": { string: "Il y a eu une erreur lors du chargement de ce formulaire", developer_comment: "The title text shown in the header of the dialog." },
3
3
  "form_load_failure_dialog.details.label": { string: "Détails techniques de l'erreur", developer_comment: "The label for the clickable summary that reveals technical error information." },
4
4
  "odk_web_forms.submit.label": { string: "Envoyer", developer_comment: "Label for the primary form submission button." },
5
+ "odk_web_forms.back.label": { string: "Précédent", developer_comment: "Label for the button that moves to the previous page in a paginated form." },
6
+ "odk_web_forms.next.label": { string: "Suivant", developer_comment: "Label for the button that moves to the next page in a paginated form." },
5
7
  "odk_web_forms.validation.error": { string: "{count, plural, one {# question avec erreur} many {# questions avec erreurs} other {# questions avec erreurs}}", developer_comment: "Error banner message. {count} is the number of validation violations." },
8
+ "odk_web_forms.validation.view.label": { string: "Voir", developer_comment: "Label for the error banner button that navigates to the first question with a validation error." },
6
9
  "odk_web_forms.geolocation.error": { string: "La position n'est pas disponible. Activez le GPS et les autorisations du navigateur, puis rechargez le formulaire pour réessayer.", developer_comment: "Error message shown when background geolocation fails." },
7
10
  "odk_web_forms.delete.label": { string: "Supprimer", developer_comment: "Generic label for a delete action button." },
8
11
  "odk_web_forms.cancel.label": { string: "Annuler", developer_comment: "Generic label for a cancel action button." },
@@ -2,7 +2,10 @@ const e = {
2
2
  "form_load_failure_dialog.header.title": { string: "Terjadi kesalahan saat memuat formulir ini", developer_comment: "The title text shown in the header of the dialog." },
3
3
  "form_load_failure_dialog.details.label": { string: "Kesalahan detail teknis", developer_comment: "The label for the clickable summary that reveals technical error information." },
4
4
  "odk_web_forms.submit.label": { string: "Kirim", developer_comment: "Label for the primary form submission button." },
5
+ "odk_web_forms.back.label": { string: "Kembali", developer_comment: "Label for the button that moves to the previous page in a paginated form." },
6
+ "odk_web_forms.next.label": { string: "Lanjut", developer_comment: "Label for the button that moves to the next page in a paginated form." },
5
7
  "odk_web_forms.validation.error": { string: "{count, plural, other {# pertanyaan dojawab dengan tidak tepat}}", developer_comment: "Error banner message. {count} is the number of validation violations." },
8
+ "odk_web_forms.validation.view.label": { string: "Lihat", developer_comment: "Label for the error banner button that navigates to the first question with a validation error." },
6
9
  "odk_web_forms.geolocation.error": { string: "Lokasi tidak tersedia. Aktifkan GPS dan izin browser, lalu muat ulang formulir untuk mencoba lagi.", developer_comment: "Error message shown when background geolocation fails." },
7
10
  "odk_web_forms.delete.label": { string: "Hapus", developer_comment: "Generic label for a delete action button." },
8
11
  "odk_web_forms.cancel.label": { string: "Batal", developer_comment: "Generic label for a cancel action button." },
@@ -5,7 +5,7 @@ function cn() {
5
5
  }
6
6
  const bt = typeof global < "u" ? global : typeof window < "u" ? window : typeof WorkerGlobalScope < "u" ? self : {}, k = {
7
7
  _global: bt,
8
- version: "10.2.5",
8
+ version: "10.3.0",
9
9
  isBrowser: cn(),
10
10
  isUnminified: /param/.test(function(r) {
11
11
  }.toString()),
@@ -5624,7 +5624,7 @@ class q extends x {
5624
5624
  const L = R[U];
5625
5625
  if (L === " " && !W && d === It && (E += (p - a * 2 - O) / I), this._partialTextX = E, this._partialTextY = P + G, this._partialText = L, S) {
5626
5626
  t.save();
5627
- const Z = n.slice(0, A).reduce((J, et) => J + ut(et.text).length, 0), z = U + Z;
5627
+ const tt = n.slice(0, A).reduce((J, et) => J + ut(et.text).length, 0), z = U + tt;
5628
5628
  S({
5629
5629
  char: L,
5630
5630
  index: z,
@@ -5807,11 +5807,11 @@ function Qi(r) {
5807
5807
  function Ji(r) {
5808
5808
  r.strokeText(this.partialText, 0, 0);
5809
5809
  }
5810
- class tt extends x {
5810
+ class Z extends x {
5811
5811
  constructor(t) {
5812
5812
  super(t), this.dummyCanvas = m.createCanvasElement(), this.dataArray = [], this._readDataAttribute(), this.on("dataChange.konva", function() {
5813
5813
  this._readDataAttribute(), this._setTextData();
5814
- }), this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva", this._setTextData), this._setTextData();
5814
+ }), this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva directionChange.konva", this._setTextData), this._setTextData();
5815
5815
  }
5816
5816
  _getTextPathLength() {
5817
5817
  return j.getPathLength(this.dataArray);
@@ -5880,7 +5880,9 @@ class tt extends x {
5880
5880
  };
5881
5881
  }
5882
5882
  _setTextData() {
5883
- const t = ut(this.text()), e = [];
5883
+ const t = ut(this.text());
5884
+ this.direction() === "rtl" && t.reverse();
5885
+ const e = [];
5884
5886
  let i = 0;
5885
5887
  for (let p = 0; p < t.length; p++)
5886
5888
  e.push({
@@ -5955,24 +5957,25 @@ class tt extends x {
5955
5957
  return m.releaseCanvas(this.dummyCanvas), super.destroy();
5956
5958
  }
5957
5959
  }
5958
- tt.prototype._fillFunc = Qi;
5959
- tt.prototype._strokeFunc = Ji;
5960
- tt.prototype._fillFuncHit = Qi;
5961
- tt.prototype._strokeFuncHit = Ji;
5962
- tt.prototype.className = "TextPath";
5963
- tt.prototype._attrsAffectingSize = ["text", "fontSize", "data"];
5964
- K(tt);
5965
- u.addGetterSetter(tt, "data");
5966
- u.addGetterSetter(tt, "fontFamily", "Arial");
5967
- u.addGetterSetter(tt, "fontSize", 12, w());
5968
- u.addGetterSetter(tt, "fontStyle", $i);
5969
- u.addGetterSetter(tt, "align", "left");
5970
- u.addGetterSetter(tt, "letterSpacing", 0, w());
5971
- u.addGetterSetter(tt, "textBaseline", "middle");
5972
- u.addGetterSetter(tt, "fontVariant", $i);
5973
- u.addGetterSetter(tt, "text", Us);
5974
- u.addGetterSetter(tt, "textDecoration", "");
5975
- u.addGetterSetter(tt, "kerningFunc", void 0);
5960
+ Z.prototype._fillFunc = Qi;
5961
+ Z.prototype._strokeFunc = Ji;
5962
+ Z.prototype._fillFuncHit = Qi;
5963
+ Z.prototype._strokeFuncHit = Ji;
5964
+ Z.prototype.className = "TextPath";
5965
+ Z.prototype._attrsAffectingSize = ["text", "fontSize", "data"];
5966
+ K(Z);
5967
+ u.addGetterSetter(Z, "data");
5968
+ u.addGetterSetter(Z, "fontFamily", "Arial");
5969
+ u.addGetterSetter(Z, "fontSize", 12, w());
5970
+ u.addGetterSetter(Z, "fontStyle", $i);
5971
+ u.addGetterSetter(Z, "align", "left");
5972
+ u.addGetterSetter(Z, "letterSpacing", 0, w());
5973
+ u.addGetterSetter(Z, "textBaseline", "middle");
5974
+ u.addGetterSetter(Z, "fontVariant", $i);
5975
+ u.addGetterSetter(Z, "text", Us);
5976
+ u.addGetterSetter(Z, "textDecoration", "");
5977
+ u.addGetterSetter(Z, "kerningFunc", void 0);
5978
+ u.addGetterSetter(Z, "direction", "inherit");
5976
5979
  const Zi = "tr-konva", Vs = [
5977
5980
  "resizeEnabledChange",
5978
5981
  "rotateAnchorOffsetChange",
@@ -7171,7 +7174,7 @@ function nr(r, t) {
7171
7174
  const e = r.data, i = r.width, n = r.height;
7172
7175
  let s, a, o, h, l, c, f, d, p, g, S, y, b, _, C, v, A, P, M, E;
7173
7176
  const G = t + t + 1, D = i - 1, H = n - 1, O = t + 1, W = O * (O + 1) / 2, N = new ui(), I = er[t], R = ir[t];
7174
- let U = null, L = N, Y = null, Z = null;
7177
+ let U = null, L = N, Y = null, tt = null;
7175
7178
  for (let z = 1; z < G; z++)
7176
7179
  L = L.next = new ui(), z === O && (U = L);
7177
7180
  L.next = N, o = a = 0;
@@ -7181,9 +7184,9 @@ function nr(r, t) {
7181
7184
  L.r = v, L.g = A, L.b = P, L.a = M, L = L.next;
7182
7185
  for (let J = 1; J < O; J++)
7183
7186
  s = a + ((D < J ? D : J) << 2), h += (L.r = v = e[s]) * (E = O - J), l += (L.g = A = e[s + 1]) * E, c += (L.b = P = e[s + 2]) * E, f += (L.a = M = e[s + 3]) * E, y += v, b += A, _ += P, C += M, L = L.next;
7184
- Y = N, Z = U;
7187
+ Y = N, tt = U;
7185
7188
  for (let J = 0; J < i; J++)
7186
- e[a + 3] = M = f * I >> R, M !== 0 ? (M = 255 / M, e[a] = (h * I >> R) * M, e[a + 1] = (l * I >> R) * M, e[a + 2] = (c * I >> R) * M) : e[a] = e[a + 1] = e[a + 2] = 0, h -= d, l -= p, c -= g, f -= S, d -= Y.r, p -= Y.g, g -= Y.b, S -= Y.a, s = o + ((s = J + t + 1) < D ? s : D) << 2, y += Y.r = e[s], b += Y.g = e[s + 1], _ += Y.b = e[s + 2], C += Y.a = e[s + 3], h += y, l += b, c += _, f += C, Y = Y.next, d += v = Z.r, p += A = Z.g, g += P = Z.b, S += M = Z.a, y -= v, b -= A, _ -= P, C -= M, Z = Z.next, a += 4;
7189
+ e[a + 3] = M = f * I >> R, M !== 0 ? (M = 255 / M, e[a] = (h * I >> R) * M, e[a + 1] = (l * I >> R) * M, e[a + 2] = (c * I >> R) * M) : e[a] = e[a + 1] = e[a + 2] = 0, h -= d, l -= p, c -= g, f -= S, d -= Y.r, p -= Y.g, g -= Y.b, S -= Y.a, s = o + ((s = J + t + 1) < D ? s : D) << 2, y += Y.r = e[s], b += Y.g = e[s + 1], _ += Y.b = e[s + 2], C += Y.a = e[s + 3], h += y, l += b, c += _, f += C, Y = Y.next, d += v = tt.r, p += A = tt.g, g += P = tt.b, S += M = tt.a, y -= v, b -= A, _ -= P, C -= M, tt = tt.next, a += 4;
7187
7190
  o += i;
7188
7191
  }
7189
7192
  for (let z = 0; z < i; z++) {
@@ -7193,9 +7196,9 @@ function nr(r, t) {
7193
7196
  let J = i;
7194
7197
  for (let et = 1; et <= t; et++)
7195
7198
  a = J + z << 2, h += (L.r = v = e[a]) * (E = O - et), l += (L.g = A = e[a + 1]) * E, c += (L.b = P = e[a + 2]) * E, f += (L.a = M = e[a + 3]) * E, y += v, b += A, _ += P, C += M, L = L.next, et < H && (J += i);
7196
- a = z, Y = N, Z = U;
7199
+ a = z, Y = N, tt = U;
7197
7200
  for (let et = 0; et < n; et++)
7198
- s = a << 2, e[s + 3] = M = f * I >> R, M > 0 ? (M = 255 / M, e[s] = (h * I >> R) * M, e[s + 1] = (l * I >> R) * M, e[s + 2] = (c * I >> R) * M) : e[s] = e[s + 1] = e[s + 2] = 0, h -= d, l -= p, c -= g, f -= S, d -= Y.r, p -= Y.g, g -= Y.b, S -= Y.a, s = z + ((s = et + O) < H ? s : H) * i << 2, h += y += Y.r = e[s], l += b += Y.g = e[s + 1], c += _ += Y.b = e[s + 2], f += C += Y.a = e[s + 3], Y = Y.next, d += v = Z.r, p += A = Z.g, g += P = Z.b, S += M = Z.a, y -= v, b -= A, _ -= P, C -= M, Z = Z.next, a += i;
7201
+ s = a << 2, e[s + 3] = M = f * I >> R, M > 0 ? (M = 255 / M, e[s] = (h * I >> R) * M, e[s + 1] = (l * I >> R) * M, e[s + 2] = (c * I >> R) * M) : e[s] = e[s + 1] = e[s + 2] = 0, h -= d, l -= p, c -= g, f -= S, d -= Y.r, p -= Y.g, g -= Y.b, S -= Y.a, s = z + ((s = et + O) < H ? s : H) * i << 2, h += y += Y.r = e[s], l += b += Y.g = e[s + 1], c += _ += Y.b = e[s + 2], f += C += Y.a = e[s + 3], Y = Y.next, d += v = tt.r, p += A = tt.g, g += P = tt.b, S += M = tt.a, y -= v, b -= A, _ -= P, C -= M, tt = tt.next, a += i;
7199
7202
  }
7200
7203
  }
7201
7204
  const sr = function(t) {
@@ -7240,12 +7243,12 @@ const hr = function(r) {
7240
7243
  const R = N * f + I;
7241
7244
  let U = 0, L = 0;
7242
7245
  U += G[R + O[0]] * D[0], L += G[R + O[0]] * H[0], U += G[R + O[1]] * D[1], L += G[R + O[1]] * H[1], U += G[R + O[2]] * D[2], L += G[R + O[2]] * H[2], U += G[R + O[3]] * D[3], L += G[R + O[3]] * H[3], U += G[R + O[5]] * D[5], L += G[R + O[5]] * H[5], U += G[R + O[6]] * D[6], L += G[R + O[6]] * H[6], U += G[R + O[7]] * D[7], L += G[R + O[7]] * H[7], U += G[R + O[8]] * D[8], L += G[R + O[8]] * H[8];
7243
- const Y = A * U + P * L, Z = W(C + Y * M), z = R * 4;
7246
+ const Y = A * U + P * L, tt = W(C + Y * M), z = R * 4;
7244
7247
  if (b) {
7245
- const J = Z - C;
7248
+ const J = tt - C;
7246
7249
  c[z] = W(E[z] + J), c[z + 1] = W(E[z + 1] + J), c[z + 2] = W(E[z + 2] + J), c[z + 3] = E[z + 3];
7247
7250
  } else
7248
- c[z] = c[z + 1] = c[z + 2] = Z, c[z + 3] = E[z + 3];
7251
+ c[z] = c[z + 1] = c[z + 2] = tt, c[z + 3] = E[z + 3];
7249
7252
  }
7250
7253
  for (let N = 0; N < f; N++) {
7251
7254
  let I = N * 4, R = ((d - 1) * f + N) * 4;
@@ -7597,7 +7600,7 @@ const qt = ii.Util._assign(ii, {
7597
7600
  Sprite: ot,
7598
7601
  Star: yt,
7599
7602
  Text: q,
7600
- TextPath: tt,
7603
+ TextPath: Z,
7601
7604
  Transformer: F,
7602
7605
  Wedge: dt,
7603
7606
  Filters: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getodk/web-forms",
3
- "version": "1.0.2",
3
+ "version": "1.1.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "ODK Web Forms",
6
6
  "author": "getodk",
@@ -23,19 +23,17 @@
23
23
  "README.md"
24
24
  ],
25
25
  "engines": {
26
- "node": "^24.16.0",
26
+ "node": "^24.20.0",
27
27
  "npm": "11"
28
28
  },
29
29
  "scripts": {
30
- "build": "npm-run-all -l build:clean build:translations build:demo build:js",
31
- "build:clean": "rimraf dist/ dist-demo/",
32
- "build:demo": "vite build --mode demo --outDir dist-demo",
30
+ "build": "npm-run-all -l build:clean build:translations build:js",
31
+ "build:clean": "rimraf dist/",
33
32
  "build:js": "vite build",
34
33
  "build:translations": "node bin/merge-translations.js",
35
- "translations:pull": "cd ../.. && tx pull -r web_forms.strings -a -f --mode translator",
36
- "translations:push": "cd ../.. && tx push -r web_forms.strings -s",
37
- "dev": "vite",
38
- "dist-demo": "npm run build && vite serve dist-demo --port 5174",
34
+ "transifex:pull": "cd ../.. && tx pull -r web_forms.strings -a -f --mode translator",
35
+ "transifex:push": "cd ../.. && tx push -r web_forms.strings -s",
36
+ "dev": "vite --config vite.config.e2e.ts",
39
37
  "feature-matrix": "node bin/feature-matrix/render.js",
40
38
  "format:fix": "npm-run-all --print-name format:vue format:prettier",
41
39
  "format:lint": "prettier -c \"**/*\" --ignore-unknown --cache",
@@ -63,33 +61,31 @@
63
61
  "test:types:vitest": "vue-tsc --project ./tsconfig.vitest.json --emitDeclarationOnly false --noEmit"
64
62
  },
65
63
  "devDependencies": {
66
- "@faker-js/faker": "^10.1.0",
67
- "@fontsource/hanken-grotesk": "^5.2.8",
64
+ "@faker-js/faker": "^10.5.0",
68
65
  "@fontsource/roboto": "^5.2.9",
69
- "@getodk/xforms-engine": "1.0.2",
66
+ "@getodk/xforms-engine": "1.1.0",
70
67
  "@primeuix/themes": "1.0.3",
71
68
  "@types/image-blob-reduce": "^4",
72
- "@types/ramda": "^0.31.1",
73
- "@vitejs/plugin-vue-jsx": "^5.1.4",
69
+ "@types/ramda": "^0.32.0",
70
+ "@vitejs/plugin-vue-jsx": "^5.1.6",
74
71
  "primeflex": "^4.0.0",
75
72
  "primevue": "4.3.3",
76
73
  "ramda": "^0.32.0",
77
74
  "sass": "^1.94.2",
78
75
  "typescript": "~5.9.3",
79
- "vite-plugin-css-injected-by-js": "^3.5.2",
80
- "vite-plugin-static-copy": "^3.2.0"
76
+ "vite-plugin-css-injected-by-js": "^3.5.2"
81
77
  },
82
78
  "peerDependencies": {
83
79
  "vue": "^3.5.29"
84
80
  },
85
81
  "dependencies": {
86
- "@formatjs/intl": "^4.1.4",
82
+ "@formatjs/intl": "^4.1.14",
87
83
  "@mdi/js": "^7.4.47",
88
- "dompurify": "^3.3.0",
84
+ "dompurify": "^3.4.11",
89
85
  "image-blob-reduce": "^4.1.0",
90
- "konva": "^10.2.5",
91
- "ol": "^10.7.0",
92
- "primelocale": "^2.3.1",
86
+ "konva": "^10.3.0",
87
+ "ol": "^10.9.0",
88
+ "primelocale": "^2.4.0",
93
89
  "vue-draggable-plus": "^0.6.1",
94
90
  "vue-konva": "^3.4.0"
95
91
  },