Skip to content

Commit

Permalink
Merge pull request #7226 from opengovsg/release_v6.114.0
Browse files Browse the repository at this point in the history
build: release v6.114.0
  • Loading branch information
KenLSM authored Apr 2, 2024
2 parents 9ba1e34 + 993e31e commit d84c3fa
Show file tree
Hide file tree
Showing 62 changed files with 4,390 additions and 6,105 deletions.
57 changes: 53 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,63 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v6.113.0](https://github.com/opengovsg/FormSG/compare/v6.113.0...v6.113.0)

- chore: package cleanup [`#7141`](https://github.com/opengovsg/FormSG/pull/7141)
#### [v6.114.0](https://github.com/opengovsg/FormSG/compare/v6.113.0...v6.114.0)

- fix: prefill myinfo dropdown field options when faking sample submission data [`#7225`](https://github.com/opengovsg/FormSG/pull/7225)
- feat(mrf): attachments [`#7181`](https://github.com/opengovsg/FormSG/pull/7181)
- fix(mrf): design review add workflow page [`#7218`](https://github.com/opengovsg/FormSG/pull/7218)
- fix(mrf): skip verifying OTP signatures on decryption for export [`#7192`](https://github.com/opengovsg/FormSG/pull/7192)
- chore: update mrf copy on create-page [`#7217`](https://github.com/opengovsg/FormSG/pull/7217)
- refactor: move override code closer to other overrides [`#7216`](https://github.com/opengovsg/FormSG/pull/7216)
- fix(mrf): remove any response limits for MRF [`#7214`](https://github.com/opengovsg/FormSG/pull/7214)
- chore(mrf): prevent form activation if email confirmation is present [`#7201`](https://github.com/opengovsg/FormSG/pull/7201)
- fix(deps): bump mongodb-memory-server-core from 9.1.6 to 9.1.7 [`#7211`](https://github.com/opengovsg/FormSG/pull/7211)
- fix(deps): bump aws-sdk from 2.1354.0 to 2.1585.0 [`#7209`](https://github.com/opengovsg/FormSG/pull/7209)
- fix(deps): bump neverthrow from 6.0.0 to 6.1.0 [`#7208`](https://github.com/opengovsg/FormSG/pull/7208)
- chore(deps-dev): bump @babel/core from 7.23.9 to 7.24.3 [`#7206`](https://github.com/opengovsg/FormSG/pull/7206)
- fix(deps): bump @babel/runtime from 7.22.3 to 7.24.1 [`#7207`](https://github.com/opengovsg/FormSG/pull/7207)
- fix(deps): bump libphonenumber-js from 1.10.49 to 1.10.59 [`#7204`](https://github.com/opengovsg/FormSG/pull/7204)
- fix(deps): bump http-status-codes from 2.2.0 to 2.3.0 [`#7203`](https://github.com/opengovsg/FormSG/pull/7203)
- chore(deps-dev): bump eslint-plugin-playwright from 0.12.0 to 1.5.4 [`#7189`](https://github.com/opengovsg/FormSG/pull/7189)
- feat: Disabling MRF for Forms with SingPass [`#7200`](https://github.com/opengovsg/FormSG/pull/7200)
- fix(deps): bump express from 4.18.2 to 4.19.2 [`#7199`](https://github.com/opengovsg/FormSG/pull/7199)
- chore(deps-dev): bump express from 4.18.2 to 4.19.2 in /frontend [`#7198`](https://github.com/opengovsg/FormSG/pull/7198)
- fix(deps): bump libphonenumber-js from 1.10.58 to 1.10.59 in /shared [`#7195`](https://github.com/opengovsg/FormSG/pull/7195)
- feat(mrf): backend validation for field locking [`#7143`](https://github.com/opengovsg/FormSG/pull/7143)
- chore: switch advertising for checkpoint to mrf [`#7191`](https://github.com/opengovsg/FormSG/pull/7191)
- feat: disabling submit another response button (MRF) [`#7186`](https://github.com/opengovsg/FormSG/pull/7186)
- chore: remove unused deps #2 [`#7150`](https://github.com/opengovsg/FormSG/pull/7150)
- fix(deps): bump type-fest from 4.13.1 to 4.14.0 in /shared [`#7190`](https://github.com/opengovsg/FormSG/pull/7190)
- chore(deps-dev): bump rimraf from 4.4.0 to 5.0.5 [`#7173`](https://github.com/opengovsg/FormSG/pull/7173)
- build: merge release v6.113.0 back to develop [`#7149`](https://github.com/opengovsg/FormSG/pull/7149)
- feat: disabling response limit toggle for MRF [`#7180`](https://github.com/opengovsg/FormSG/pull/7180)
- revert: "chore(deps-dev): bump jest-mock-axios from 4.7.2 to 4.7.3" [`#7179`](https://github.com/opengovsg/FormSG/pull/7179)
- chore(deps): Upgrade bson from 5.4.0 to 5.5.1 [`#7152`](https://github.com/opengovsg/FormSG/pull/7152)
- fix(deps): bump type-fest from 4.8.3 to 4.13.1 in /shared [`#7178`](https://github.com/opengovsg/FormSG/pull/7178)
- chore(deps-dev): bump @types/convict from 6.1.1 to 6.1.6 [`#7176`](https://github.com/opengovsg/FormSG/pull/7176)
- fix(deps): bump celebrate from 15.0.1 to 15.0.3 [`#7175`](https://github.com/opengovsg/FormSG/pull/7175)
- fix(deps): bump zod from 3.22.3 to 3.22.4 [`#7174`](https://github.com/opengovsg/FormSG/pull/7174)
- chore(deps-dev): bump ts-node from 10.9.1 to 10.9.2 [`#7172`](https://github.com/opengovsg/FormSG/pull/7172)
- fix: remove number and decimal scrolling [`#7171`](https://github.com/opengovsg/FormSG/pull/7171)
- fix(deps): bump libphonenumber-js from 1.10.52 to 1.10.58 in /shared [`#7168`](https://github.com/opengovsg/FormSG/pull/7168)
- chore(deps-dev): bump @types/lodash from 4.14.202 to 4.17.0 in /shared [`#7169`](https://github.com/opengovsg/FormSG/pull/7169)
- chore(deps-dev): bump @types/uuid from 9.0.0 to 9.0.8 [`#7165`](https://github.com/opengovsg/FormSG/pull/7165)
- chore(deps-dev): bump @types/cookie-parser from 1.4.3 to 1.4.7 [`#7163`](https://github.com/opengovsg/FormSG/pull/7163)
- fix(deps): bump @faker-js/faker from 8.0.2 to 8.4.1 [`#7161`](https://github.com/opengovsg/FormSG/pull/7161)
- chore(deps-dev): bump @opengovsg/mockpass from 4.0.8 to 4.1.0 [`#7160`](https://github.com/opengovsg/FormSG/pull/7160)
- chore(deps-dev): bump @types/html-escaper from 3.0.0 to 3.0.2 [`#7159`](https://github.com/opengovsg/FormSG/pull/7159)
- fix(deps): bump ts-essentials from 9.3.1 to 9.4.1 [`#7158`](https://github.com/opengovsg/FormSG/pull/7158)
- chore(deps-dev): bump @types/busboy from 1.5.0 to 1.5.3 [`#7157`](https://github.com/opengovsg/FormSG/pull/7157)
- chore(deps-dev): bump jest-mock-axios from 4.7.2 to 4.7.3 [`#7154`](https://github.com/opengovsg/FormSG/pull/7154)
- fix(deps): bump the npm_and_yarn group group with 2 updates [`#7151`](https://github.com/opengovsg/FormSG/pull/7151)
- chore(deps): bump fast-xml-parser, @aws-sdk/client-secrets-manager and @aws-sdk/client-ssm in /functions/form-payment-reconciliation [`#6490`](https://github.com/opengovsg/FormSG/pull/6490)
- build: release v6.113.0 [`#7148`](https://github.com/opengovsg/FormSG/pull/7148)

#### [v6.113.0](https://github.com/opengovsg/FormSG/compare/v6.112.0...v6.113.0)

> 19 March 2024

- chore: package cleanup [`#7141`](https://github.com/opengovsg/FormSG/pull/7141)
- refactor(logic): consolidate logic functions into shared [`#7136`](https://github.com/opengovsg/FormSG/pull/7136)
- chore: Security upgrade nodemailer from 6.9.1 to 6.9.9 [`#7057`](https://github.com/opengovsg/FormSG/pull/7057)
- chore(dd): link source code to dd [`#7120`](https://github.com/opengovsg/FormSG/pull/7120)
Expand All @@ -25,7 +74,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- fix(deps): bump jose from 4.14.4 to 4.15.5 [`#7130`](https://github.com/opengovsg/FormSG/pull/7130)
- build: merge release v6.112.0 into develop [`#7127`](https://github.com/opengovsg/FormSG/pull/7127)
- build: release v6.112.0 [`#7126`](https://github.com/opengovsg/FormSG/pull/7126)
- chore: bump version to v6.113.0 [`67821dc`](https://github.com/opengovsg/FormSG/commit/67821dcd7787b2c48920e706e87357245972459b)
- chore: bump version to v6.113.0 [`50ff75b`](https://github.com/opengovsg/FormSG/commit/50ff75be48273526825cc596931b94c88be41fc2)

#### [v6.112.0](https://github.com/opengovsg/FormSG/compare/v6.111.0...v6.112.0)

Expand Down
80 changes: 40 additions & 40 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "form-frontend",
"version": "6.113.0",
"version": "6.114.0",
"homepage": ".",
"private": true,
"dependencies": {
Expand Down
23 changes: 23 additions & 0 deletions frontend/src/assets/icons/BxsInfoCircleAlt.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { forwardRef } from 'react'

export const BxsInfoCircleAlt = forwardRef<
SVGSVGElement,
React.SVGProps<SVGSVGElement>
>((props, ref) => {
return (
<svg
viewBox="0 0 24 24"
height="1em"
width="1em"
fill="none"
{...props}
ref={ref}
>
<path
d="M12 2C6.486 2 2 6.486 2 12C2 17.514 6.486 22 12 22C17.514 22 22 17.514 22 12C22 6.486 17.514 2 12 2ZM12 20C7.589 20 4 16.411 4 12C4 7.589 7.589 4 12 4C16.411 4 20 7.589 20 12C20 16.411 16.411 20 12 20Z"
fill="currentColor"
/>
<path d="M11 11H13V17H11V11ZM11 7H13V9H11V7Z" fill="currentColor" />
</svg>
)
})
1 change: 1 addition & 0 deletions frontend/src/assets/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export * from './BxsError'
export * from './BxsErrorCircle'
export * from './BxsHeart'
export * from './BxsInfoCircle'
export * from './BxsInfoCircleAlt'
export * from './BxsRocket'
export * from './BxsStar'
export * from './BxStar'
Expand Down
34 changes: 30 additions & 4 deletions frontend/src/components/Field/Attachment/Attachment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,17 @@ const IMAGE_UPLOAD_TYPES_TO_COMPRESS = ['image/jpeg', 'image/png']
export interface AttachmentProps extends UseFormControlProps<HTMLElement> {
/**
* Callback to be invoked when the file is attached or removed.
* Do not use undefined to clear the value, use null instead.
*/
onChange: (file?: File) => void
onChange: (file: File | null) => void
/**
* If exists, callback to be invoked when file has errors.
*/
onError?: (errMsg: string) => void
/**
* Current value of the input.
*/
value: File | undefined
value: File | undefined | null
/**
* Name of the input.
*/
Expand All @@ -67,6 +68,16 @@ export interface AttachmentProps extends UseFormControlProps<HTMLElement> {
* Color scheme of the component.
*/
colorScheme?: ThemeColorScheme

/**
* Show attachment download button.
*/
enableDownload?: boolean

/**
* Show attachment removal button
*/
enableRemove?: boolean
}

export const Attachment = forwardRef<AttachmentProps, 'div'>(
Expand All @@ -81,6 +92,8 @@ export const Attachment = forwardRef<AttachmentProps, 'div'>(
name,
colorScheme,
title,
enableDownload,
enableRemove,
...props
},
ref,
Expand Down Expand Up @@ -164,7 +177,6 @@ export const Attachment = forwardRef<AttachmentProps, 'div'>(
),
)
}

onChange(acceptedFile)
},
[accept, maxSize, onChange, onError],
Expand Down Expand Up @@ -205,10 +217,21 @@ export const Attachment = forwardRef<AttachmentProps, 'div'>(
})

const handleRemoveFile = useCallback(() => {
onChange(undefined)
onChange(null)
rootRef.current?.focus()
}, [onChange, rootRef])

const handleDownloadFile = useCallback(() => {
if (value) {
const url = URL.createObjectURL(value)
const a = document.createElement('a')
a.href = url
a.download = value.name
a.click()
URL.revokeObjectURL(url)
}
}, [value])

// Bunch of memoization to avoid unnecessary re-renders.
const processedRootProps = useMemo(() => {
return getRootProps({
Expand Down Expand Up @@ -246,6 +269,9 @@ export const Attachment = forwardRef<AttachmentProps, 'div'>(
<AttachmentFileInfo
file={value}
handleRemoveFile={handleRemoveFile}
handleDownloadFile={handleDownloadFile}
enableDownload={enableDownload}
enableRemove={enableRemove}
/>
) : (
<AttachmentDropzone
Expand Down
Loading

0 comments on commit d84c3fa

Please sign in to comment.