@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.
- package/README.md +21 -20
- package/dist/{ActionsInfoDialog-DtAY32vv.js → ActionsInfoDialog-MU98SAHM.js} +5 -5
- package/dist/{CanvasBlock-DTqaGXHf.js → CanvasBlock-J8NX3USC.js} +4 -4
- package/dist/{MapBlock-DSTG_Q0I.js → MapBlock-BRUw4qmr.js} +6357 -5723
- package/dist/{index-DWj9XRAV.js → index-BVkeZTJ7.js} +14603 -17112
- package/dist/index.js +2 -2
- package/dist/{strings_es-C8xkQaZj.js → strings_es-U2DRVtFy.js} +3 -0
- package/dist/{strings_fr-C0vLmCzP.js → strings_fr-BX-80ruq.js} +3 -0
- package/dist/{strings_id-BE0G3I_d.js → strings_id-C4jrcFTr.js} +3 -0
- package/dist/{vue-konva-D0sZ6RWk.js → vue-konva-nut7eulw.js} +35 -32
- package/package.json +17 -21
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ This section is auto generated. Please update `feature-matrix.json` and then run
|
|
|
12
12
|
<summary>
|
|
13
13
|
|
|
14
14
|
<!-- prettier-ignore -->
|
|
15
|
-
|
|
15
|
+
##### Question types (basic functionality)<br/>🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩⬜⬜ 91\%
|
|
16
16
|
|
|
17
17
|
</summary>
|
|
18
18
|
<br/>
|
|
@@ -60,7 +60,7 @@ This section is auto generated. Please update `feature-matrix.json` and then run
|
|
|
60
60
|
<summary>
|
|
61
61
|
|
|
62
62
|
<!-- prettier-ignore -->
|
|
63
|
-
|
|
63
|
+
##### Appearances<br/>🟩🟩🟩🟩🟩🟩🟩🟩⬜⬜⬜⬜⬜⬜⬜ 56\%
|
|
64
64
|
|
|
65
65
|
</summary>
|
|
66
66
|
<br/>
|
|
@@ -96,7 +96,7 @@ This section is auto generated. Please update `feature-matrix.json` and then run
|
|
|
96
96
|
| hide-input | |
|
|
97
97
|
| minimal | ✅ |
|
|
98
98
|
| search / autocomplete | ✅ |
|
|
99
|
-
| [quick](https://github.com/getodk/web-forms/issues/515) |
|
|
99
|
+
| [quick](https://github.com/getodk/web-forms/issues/515) | ✅ |
|
|
100
100
|
| columns-pack | ✅ |
|
|
101
101
|
| columns | ✅ |
|
|
102
102
|
| columns-n | ✅ |
|
|
@@ -120,7 +120,7 @@ This section is auto generated. Please update `feature-matrix.json` and then run
|
|
|
120
120
|
<summary>
|
|
121
121
|
|
|
122
122
|
<!-- prettier-ignore -->
|
|
123
|
-
|
|
123
|
+
##### Parameters<br/>🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩⬜⬜⬜⬜⬜ 66\%
|
|
124
124
|
|
|
125
125
|
</summary>
|
|
126
126
|
<br/>
|
|
@@ -146,7 +146,7 @@ This section is auto generated. Please update `feature-matrix.json` and then run
|
|
|
146
146
|
<summary>
|
|
147
147
|
|
|
148
148
|
<!-- prettier-ignore -->
|
|
149
|
-
|
|
149
|
+
##### Form logic<br/>🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 100\%
|
|
150
150
|
|
|
151
151
|
</summary>
|
|
152
152
|
<br/>
|
|
@@ -172,7 +172,7 @@ This section is auto generated. Please update `feature-matrix.json` and then run
|
|
|
172
172
|
<summary>
|
|
173
173
|
|
|
174
174
|
<!-- prettier-ignore -->
|
|
175
|
-
|
|
175
|
+
##### Descriptions and annotations<br/>🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩⬜⬜⬜⬜ 75\%
|
|
176
176
|
|
|
177
177
|
</summary>
|
|
178
178
|
<br/>
|
|
@@ -198,7 +198,7 @@ This section is auto generated. Please update `feature-matrix.json` and then run
|
|
|
198
198
|
<summary>
|
|
199
199
|
|
|
200
200
|
<!-- prettier-ignore -->
|
|
201
|
-
|
|
201
|
+
##### Theme and layouts<br/>🟩🟩🟩🟩🟩🟩🟩⬜⬜⬜⬜⬜⬜⬜⬜ 50\%
|
|
202
202
|
|
|
203
203
|
</summary>
|
|
204
204
|
<br/>
|
|
@@ -206,7 +206,7 @@ This section is auto generated. Please update `feature-matrix.json` and then run
|
|
|
206
206
|
| Feature <img width=250px/> | Progress |
|
|
207
207
|
| -------------------------------------------------------------------------- | :------: |
|
|
208
208
|
| [grid](https://github.com/getodk/web-forms/issues/16) | |
|
|
209
|
-
| [pages](https://github.com/getodk/web-forms/issues/254) |
|
|
209
|
+
| [pages](https://github.com/getodk/web-forms/issues/254) | ✅ |
|
|
210
210
|
| [logo](https://github.com/getodk/web-forms/issues/353) | |
|
|
211
211
|
| [application translations](https://github.com/getodk/web-forms/issues/332) | ✅ |
|
|
212
212
|
| [theme color](https://github.com/getodk/web-forms/issues/43) | |
|
|
@@ -222,7 +222,7 @@ This section is auto generated. Please update `feature-matrix.json` and then run
|
|
|
222
222
|
<summary>
|
|
223
223
|
|
|
224
224
|
<!-- prettier-ignore -->
|
|
225
|
-
|
|
225
|
+
##### XPath<br/>🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩⬜ 98\%
|
|
226
226
|
|
|
227
227
|
</summary>
|
|
228
228
|
<br/>
|
|
@@ -311,17 +311,17 @@ This section is auto generated. Please update `feature-matrix.json` and then run
|
|
|
311
311
|
<summary>
|
|
312
312
|
|
|
313
313
|
<!-- prettier-ignore -->
|
|
314
|
-
|
|
314
|
+
##### Misc<br/>🟩🟩🟩🟩🟩🟩⬜⬜⬜⬜⬜⬜⬜⬜⬜ 44\%
|
|
315
315
|
|
|
316
316
|
</summary>
|
|
317
317
|
<br/>
|
|
318
318
|
|
|
319
319
|
| Feature <img width=250px/> | Progress |
|
|
320
320
|
| -------------------------------------------------------------------------------- | :------: |
|
|
321
|
-
| [last saved instance](https://github.com/getodk/web-forms/issues/306) |
|
|
322
|
-
| [defaults from query parameters](https://github.com/getodk/web-forms/issues/464) |
|
|
321
|
+
| [last saved instance](https://github.com/getodk/web-forms/issues/306) | ✅ |
|
|
322
|
+
| [defaults from query parameters](https://github.com/getodk/web-forms/issues/464) | ✅ |
|
|
323
323
|
| multi-form app-like experience | |
|
|
324
|
-
| [prevent multiple submissions](https://github.com/getodk/web-forms/issues/461) |
|
|
324
|
+
| [prevent multiple submissions](https://github.com/getodk/web-forms/issues/461) | ✅ |
|
|
325
325
|
| configure end of form experience | |
|
|
326
326
|
| save as draft | |
|
|
327
327
|
| offline entities | |
|
|
@@ -348,7 +348,9 @@ To use this library in a Vue.js application:
|
|
|
348
348
|
:submission-max-size="5242880" <!-- 5MB -->
|
|
349
349
|
:edit-instance="editOptions"
|
|
350
350
|
:preload-properties="preloadProperties"
|
|
351
|
+
:instance-defaults="instanceDefaults"
|
|
351
352
|
:device-id="abc123"
|
|
353
|
+
:last-saved-xml="lastSavedXml"
|
|
352
354
|
@submit="handleSubmit"
|
|
353
355
|
@submit-chunked="handleChunkedSubmit"
|
|
354
356
|
/>
|
|
@@ -375,6 +377,8 @@ The `<OdkWebForm>` component accepts the following props:
|
|
|
375
377
|
- `editInstance` (`EditInstanceOptions`, optional): Options to resolve and load instance and attachment resources for editing.
|
|
376
378
|
- `preloadProperties` (`PreloadProperties`, optional): Properties to make available for binding in the form using jr:preload.
|
|
377
379
|
- `deviceId` (`string`, optional): If provided is available for binding into the form using preload attributes. Ignored if `preloadProperties.deviceID` is given.
|
|
380
|
+
- `instanceDefaults` (`InstanceDefaults`, optional): Default values to set in the form as a map of xpath reference to string value.
|
|
381
|
+
- `lastSavedXml` (`string`, optional): The XML to parse and bind to the last-saved virtual instance.
|
|
378
382
|
|
|
379
383
|
### Events (`OdkWebFormEmits`)
|
|
380
384
|
|
|
@@ -401,8 +405,6 @@ npm run dev -w=packages/web-forms
|
|
|
401
405
|
|
|
402
406
|
Individual test environments, and their corresponding watch modes, also have separate commands which can be found in [`package.json`](./package.json).
|
|
403
407
|
|
|
404
|
-
Upload XLSForm and XForm functionality in [`demo`](./src/demo/) app and in dev mode depends on [XLSForm-online](https://github.com/getodk/xlsform-online). Run the xlsform-online locally. By default it runs on port 8000, if you are running it on another port then you should update the [`config`](./src/demo/config.json) file.
|
|
405
|
-
|
|
406
408
|
### Project Structure
|
|
407
409
|
|
|
408
410
|
```
|
|
@@ -410,13 +412,12 @@ web-forms/
|
|
|
410
412
|
├── public/ # Static assets (e.g., favicon.ico)
|
|
411
413
|
├── src/
|
|
412
414
|
│ ├── assets/
|
|
413
|
-
│ │ ├── images/ # Web Forms
|
|
414
|
-
│ │ ├── styles/ # Web Forms
|
|
415
|
+
│ │ ├── images/ # Web Forms images
|
|
416
|
+
│ │ ├── styles/ # Web Forms styles
|
|
415
417
|
│ ├── components/ # UI components
|
|
416
418
|
│ │ ├── form-elements/ # Form elements or controllers (question types, hints, labels, inputs)
|
|
417
419
|
│ │ ├── form-layout/ # Form layout and rendering (e.g., form panel, groups, repeats, form error classes)
|
|
418
420
|
│ │ ├── common/ # Reusable smaller components (e.g., icon, image, checkbox components)
|
|
419
|
-
│ ├── demo/ # Demo page
|
|
420
421
|
│ ├── lib/ # Utilities
|
|
421
422
|
│ ├── index.ts
|
|
422
423
|
│ ├── web-forms-plugin.ts # Vue plugin
|
|
@@ -491,9 +492,9 @@ Use the npm scripts in this package to sync with Transifex. From the repository
|
|
|
491
492
|
|
|
492
493
|
- Pull translations from Transifex into `locales/`:
|
|
493
494
|
```sh
|
|
494
|
-
npm run
|
|
495
|
+
npm run transifex:pull -w @getodk/web-forms
|
|
495
496
|
```
|
|
496
497
|
- Push the English source strings (`locales/strings_en.json`) to Transifex:
|
|
497
498
|
```sh
|
|
498
|
-
npm run
|
|
499
|
+
npm run transifex:push -w @getodk/web-forms
|
|
499
500
|
```
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as m, openBlock as s, createBlock as f, unref as p, withCtx as n, createElementVNode as t, createElementBlock as l, Fragment as u, renderList as _, normalizeClass as
|
|
2
|
-
import { s as g, I, _ as k } from "./index-
|
|
1
|
+
import { defineComponent as m, openBlock as s, createBlock as f, unref as p, withCtx as n, createElementVNode as t, createElementBlock as l, Fragment as u, renderList as _, normalizeClass as b, createVNode as v, toDisplayString as a } from "vue";
|
|
2
|
+
import { s as g, I, _ as k } from "./index-BVkeZTJ7.js";
|
|
3
3
|
const x = { class: "odk-form-list" }, B = { class: "action-description" }, C = /* @__PURE__ */ m({
|
|
4
4
|
__name: "ActionsInfoDialog",
|
|
5
5
|
props: {
|
|
@@ -24,10 +24,10 @@ const x = { class: "odk-form-list" }, B = { class: "action-description" }, C = /
|
|
|
24
24
|
t("ul", x, [
|
|
25
25
|
(s(!0), l(u, null, _(i.actionsInfo, (e, d) => (s(), l("li", {
|
|
26
26
|
key: d,
|
|
27
|
-
class:
|
|
27
|
+
class: b(["odk-form-list-item", e.infoClasses?.join(" ")])
|
|
28
28
|
}, [
|
|
29
29
|
t("div", B, [
|
|
30
|
-
|
|
30
|
+
v(I, {
|
|
31
31
|
name: e.icon
|
|
32
32
|
}, null, 8, ["name"]),
|
|
33
33
|
t("span", null, a(e.description), 1)
|
|
@@ -38,7 +38,7 @@ const x = { class: "odk-form-list" }, B = { class: "action-description" }, C = /
|
|
|
38
38
|
_: 1
|
|
39
39
|
}, 8, ["visible"]));
|
|
40
40
|
}
|
|
41
|
-
}), D = /* @__PURE__ */ k(C, [["__scopeId", "data-v-
|
|
41
|
+
}), D = /* @__PURE__ */ k(C, [["__scopeId", "data-v-58b67d78"]]);
|
|
42
42
|
export {
|
|
43
43
|
D as A
|
|
44
44
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveComponent as T, openBlock as d, createElementBlock as m, mergeProps as P, createCommentVNode as k, createVNode as C, withCtx as U, Transition as Ue, createElementVNode as L, shallowRef as j, computed as w, onUnmounted as ge, defineComponent as be, inject as ke, ref as S, watch as ye, onBeforeUnmount as Ae, Fragment as Se, normalizeClass as $, unref as a, normalizeStyle as Ve, createBlock as B, useModel as $e, onMounted as Fe, createTextVNode as Ze, toDisplayString as G, renderList as Xe, mergeModels as re } from "vue";
|
|
2
|
-
import { A as _e } from "./ActionsInfoDialog-
|
|
3
|
-
import { B as Ne,
|
|
2
|
+
import { A as _e } from "./ActionsInfoDialog-MU98SAHM.js";
|
|
3
|
+
import { B as Ne, l as je, m as Ge, O as Ye, n as Ke, C as We, o as ae, r as qe, q as Je, u as Qe, Z as Y, T as Ce, I as x, _ as we, v as en, w as se, k as nn } from "./index-BVkeZTJ7.js";
|
|
4
4
|
var tn = ({ dt: e }) => `
|
|
5
5
|
.p-colorpicker {
|
|
6
6
|
display: inline-block;
|
|
@@ -955,7 +955,7 @@ const W = "000000", Me = 7, fn = 4, de = "image/jpeg", hn = "canvas.jpg", fe = 0
|
|
|
955
955
|
}, null, 8, ["visible", "title", "actions-info"])
|
|
956
956
|
], 64));
|
|
957
957
|
}
|
|
958
|
-
}), zn = /* @__PURE__ */ we(Rn, [["__scopeId", "data-v-
|
|
958
|
+
}), zn = /* @__PURE__ */ we(Rn, [["__scopeId", "data-v-03ec8ca1"]]), Tn = {
|
|
959
959
|
key: 2,
|
|
960
960
|
class: "canvas-status"
|
|
961
961
|
}, Un = {
|
|
@@ -1165,7 +1165,7 @@ const W = "000000", Me = 7, fn = 4, de = "image/jpeg", hn = "canvas.jpg", fe = 0
|
|
|
1165
1165
|
], 2);
|
|
1166
1166
|
};
|
|
1167
1167
|
}
|
|
1168
|
-
}), _n = /* @__PURE__ */ we($n, [["__scopeId", "data-v-
|
|
1168
|
+
}), _n = /* @__PURE__ */ we($n, [["__scopeId", "data-v-bdd64198"]]);
|
|
1169
1169
|
export {
|
|
1170
1170
|
_n as default
|
|
1171
1171
|
};
|