@opengovsg/formsg-sdk 0.13.0 → 0.14.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/.github/workflows/ci.yml +2 -2
- package/CHANGELOG.md +12 -0
- package/README.md +4 -0
- package/dist/types.d.ts +1 -1
- package/package.json +1 -1
package/.github/workflows/ci.yml
CHANGED
|
@@ -14,7 +14,7 @@ jobs:
|
|
|
14
14
|
with:
|
|
15
15
|
node-version: 18
|
|
16
16
|
- name: Cache Node.js modules
|
|
17
|
-
uses: actions/cache@
|
|
17
|
+
uses: actions/cache@v4
|
|
18
18
|
with:
|
|
19
19
|
# npm cache files are stored in `~/.npm` on Linux/macOS
|
|
20
20
|
path: ~/.npm
|
|
@@ -35,7 +35,7 @@ jobs:
|
|
|
35
35
|
with:
|
|
36
36
|
node-version: 18
|
|
37
37
|
- name: Cache Node.js modules
|
|
38
|
-
uses: actions/cache@
|
|
38
|
+
uses: actions/cache@v4
|
|
39
39
|
with:
|
|
40
40
|
# npm cache files are stored in `~/.npm` on Linux/macOS
|
|
41
41
|
path: ~/.npm
|
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,20 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
#### [v0.14.0](https://github.com/opengovsg/formsg-javascript-sdk/compare/v0.13.0...v0.14.0)
|
|
8
|
+
|
|
9
|
+
- feat: add signature to supported form fields [`#118`](https://github.com/opengovsg/formsg-javascript-sdk/pull/118)
|
|
10
|
+
- fix: upgrade actions/cache [`#115`](https://github.com/opengovsg/formsg-javascript-sdk/pull/115)
|
|
11
|
+
- Release v0.13.0 [`#114`](https://github.com/opengovsg/formsg-javascript-sdk/pull/114)
|
|
12
|
+
- updated readme with address answerArray [`#112`](https://github.com/opengovsg/formsg-javascript-sdk/pull/112)
|
|
13
|
+
- build(deps-dev): bump braces from 3.0.2 to 3.0.3 [`#109`](https://github.com/opengovsg/formsg-javascript-sdk/pull/109)
|
|
14
|
+
- build(deps): bump follow-redirects from 1.15.4 to 1.15.6 [`#107`](https://github.com/opengovsg/formsg-javascript-sdk/pull/107)
|
|
15
|
+
- add signature to supported form fields [`31db628`](https://github.com/opengovsg/formsg-javascript-sdk/commit/31db628ce44e009b5c19f8c9910bd997d77df586)
|
|
16
|
+
|
|
7
17
|
#### [v0.13.0](https://github.com/opengovsg/formsg-javascript-sdk/compare/v0.12.0...v0.13.0)
|
|
8
18
|
|
|
19
|
+
> 15 January 2025
|
|
20
|
+
|
|
9
21
|
- add address to field type [`#111`](https://github.com/opengovsg/formsg-javascript-sdk/pull/111)
|
|
10
22
|
|
|
11
23
|
#### [v0.12.0](https://github.com/opengovsg/formsg-javascript-sdk/compare/v0.12.0-alpha.1...v0.12.0)
|
package/README.md
CHANGED
|
@@ -181,6 +181,10 @@ Attachments are end-to-end encrypted in the same way as normal form submissions,
|
|
|
181
181
|
|
|
182
182
|
_Warning:_ We do not have the ability to scan any attachments for malicious content (e.g. spyware or viruses), so careful handling is needed.
|
|
183
183
|
|
|
184
|
+
### Processing Local address fields
|
|
185
|
+
|
|
186
|
+
Address Field is a compound field with 6 inputs in the answerArray. It will always follow the ordinance of [`blockNumber`, `streetName`, `buildingName`, `levelNumber`, `unitNumber`, `postalCode`]
|
|
187
|
+
|
|
184
188
|
### Format of Payment Content
|
|
185
189
|
|
|
186
190
|
These fields will be available if the submission is a payment submission, otherwise, the value will be an empty `{}`.
|
package/dist/types.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export type PackageInitParams = {
|
|
|
6
6
|
/** Initializes public key used for verifying and decrypting in this package. If not given, will default to "production". */
|
|
7
7
|
mode?: PackageMode;
|
|
8
8
|
};
|
|
9
|
-
export type FieldType = 'section' | 'radiobutton' | 'dropdown' | 'checkbox' | 'nric' | 'email' | 'table' | 'number' | 'rating' | 'yes_no' | 'decimal' | 'textfield' | 'textarea' | 'attachment' | 'date' | 'mobile' | 'homeno' | 'statement' | 'image' | 'country_region' | 'uen' | 'children' | 'address';
|
|
9
|
+
export type FieldType = 'section' | 'radiobutton' | 'dropdown' | 'checkbox' | 'nric' | 'email' | 'table' | 'number' | 'rating' | 'yes_no' | 'decimal' | 'textfield' | 'textarea' | 'attachment' | 'date' | 'mobile' | 'homeno' | 'statement' | 'image' | 'country_region' | 'uen' | 'children' | 'address' | 'signature';
|
|
10
10
|
export type FormField = {
|
|
11
11
|
_id: string;
|
|
12
12
|
question: string;
|