Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update formio lib baseline version to 4.14.0 #49

Merged
merged 6 commits into from
May 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,31 @@ Pleaser refer to [Form.io doc](https://help.form.io/developers/form-renderer#get
<script src="https://static.qgov.net.au/formio-qld/v1/v1.x.x-latest/formio-qld.min.js"></script>
```

## Formio scripts versioning

The scripts files in the `lib` folder will be copied and hosted in the CDN, which are coming from these libraries:

- https://github.com/formio/formio.js
- @formio/premium (private repo)

We will need to sync the version of these files with the version of the QG form.io platform https://api.forms.platforms.qld.gov.au/#/.

At the bottom of the page in https://api.forms.platforms.qld.gov.au/#/, you can get the server version, eg. `Application: 7.3.0, Renderer: 4.14.0`

Based on the server version `7.3.0`, you could find the required version of all the dependency libraries in https://github.com/formio/enterprise-release/blob/master/API-Server-Change-Log.md#api-server-version-730.

eg.
formiojs@4.14.0
premium@1.17.1

Then you could copy the corresponding script files to the `lib` folder.

### Auto updating scripts

Github actions has been setup for this repo to fetch the latest versions of scripts from `formiojs` and `premium`, automatic creates PR to merge the latest script to the `main` branch.

At the mean time we need to sync the version with QG form.io platform, we could merge these PRs if the version is the same as the form.io server otherwise we'll have to ignore them.

## Folder structure

### src/components
Expand Down Expand Up @@ -153,3 +178,29 @@ to run storybook dev mode
```shell
mvn com.github.eirslett:frontend-maven-plugin:npm@storybook
```

## Coding practice

### Functional programming pattern VS OOP pattern

The custom component library under `src/components` is using OOP (Object Oriented Programming) pattern. As we are extending formio.js components which are already written with this pattern.

Other part of the project is using FP (Functional programming) pattern instead of OOP (Object Oriented Programming) pattern.

https://tsh.io/blog/7-reasons-to-use-functional-programming-on-frontend-1-2/
https://medium.com/@bananicabananica/functional-programming-on-frontend-86d5b5fcf5a8
https://medium.com/@shaistha24/functional-programming-vs-object-oriented-programming-oop-which-is-better-82172e53a526

### IDE

`Vscode` is recommended for this project, with the following extensions:

- dbaeumer.vscode-eslint
- esbenp.prettier-vscode
- silvenon.mdx

With the default Vscode settings in the repo, you'll be able to:

- Auto lint on save
- Real time linting feedback
- Hint and quick fix for lint error
171 changes: 0 additions & 171 deletions lib/formio.changlog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,177 +4,6 @@ All notable changes to this project will be documented in this file
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## 4.14.3
### Changed
- Official Release

## 4.14.3-rc.4
### Changed
- FIO-4763: Fixed issues with Select not setting data properly in metadata.
- FIO-4398: Fixed issues where HTML text area in datagrid changes were …

## 4.14.3-rc.3
### Changed
- [FIO-4763] Select in Data/Edit Grid: Cannot make a submission. Get 'key editGrid[0].select must not contain '.')

## 4.14.3-rc.2
### Changed
- FIO-4632: Fixing the DateTime widget to work with saveAs date and tex…

## 4.14.3-rc.1
### Fixed
- Ensure that we properly read the selectData from the select component.

## 4.14.2
### Changed
- Official Release

## 4.14.2-rc.3
### Fixed
- FIO-4743: Fixed issue where "||" is not allowed for interpolate with non-url select dropdown templates.

## 4.14.2-rc.2
### Changed
- FIO-3435: Fixed an issue where form revisions would not load properly.

## 4.14.2-rc.1
### Changed
- Adding selectData to metadata to resolve templates that require more …

## 4.14.1
### Changed
- Official Release
- Updated @formio/bootstrap3@2.12.1

## 4.14.1-rc.17
### Changed
- FIO-4698: Fixed html tags not working in tooltips.

## 4.14.1-rc.16
### Changed
- FIO-4037: Fixed issues with calculated values so that they do not re-…

## 4.14.1-rc.15
### Changed
- FIO-4691: Fixed issues where calculated values would not re-calculate…
- FIO-4693: Fixed issue where input validation would not clear when no …
- FIO-4690: Fixed issues where wizard transformPages was causing crashes.

## 4.14.1-rc.14
### Changed
- FIO-4671: Resolved issues where pdf builder would show loading consta…

## 4.14.1-rc.13
### Changed
- FIO-4419: Time fields in Safari
- FIO-4558: fixed an issue where word 'select' with empty rows displays…
- FIO-2864: fixed an issue where tooltip not showing text into double q…
- FIO-4658: Fix the select dropdown for resources without save-as-refer…
- Fixed validation for protected field
- FIO-4632: Fixed the date return to always be a string.

## 4.14.1-rc.12
### Changed
- FIX Vertical Right Wizard Header.
- FIO-4631 Fixed tippy.js tooltips
- FIO-4632: Fixing the calendar widget to properly format all ISO time …

## 4.14.1-rc.11
### Changed
- FIO-4558: fixed an issue where html element displays error if contain…
- FIO-4632: Fixing date/time to work without time enabled.

## 4.14.1-rc.10
### Fixed
- FIO-4443: Fixed signature component when generating pdf forms..

## 4.14.1-rc.9
### Changed
- Updated @formio/bootstrap3@2.12.1-rc.1
- FIO-4579: Fixed extracting valueProperty from template
- FIO-4567: Fixes can't draw on Signature component on form load and size changing inside DataGrid
- FIO-4573: exclude using of zero form revision
- FIO-4571:Fixea an issue where tooltips do not appear on hover in the component setting modal
- FIO-2645 Made clicking on the error of Container component redirect t…
- FIO-4595 | 4364: Fixes Select with URL keeping default value on pdf submission
- FIO-4362: Fixed issues with checkbox set as radio type.
- FIO-4615: Fixing issues with calendar widget with save as text.

### Fixed
- FIO-560: Fixes an issue where CKEditor media is not shown in the view mode

## 4.14.1-rc.8
### Fixed
- FIO-3239: fix displaying custom validation on the inital component with default value
- FIO-4398: fixed display of element with html input type in DataGrid with one string
- FIO-4070: html edit grid issue fix
- FIO-4364: Fixes setting form and submission multiple times for pdf on submission view page
- FIO-4468: Fixes select boxes with options label position left are overlapped on pdf download
- FIO-4538: fixed an issue where component menu buttons in the form builder have Inappropriate style

## 4.14.1-rc.7
### Fixed
- FIO-4443: Fixed signature not visible when generating a pdf.
- FIO-4466: Fixed 'Save as reference' in Select resource
- FIO-4496: fixed an issue where response from the resource does not display in the dropdown when more than one object is in the item template
- FIO-4487: Protect the comp variable when iterating in wizards
- FIO-4405: fixed an issue where form doesn't submit if hidden radio component has storage type as string
- FIO-3715: fixed an issue where validation errors were shown with a submission in draft state if container component inside the form
- FIO-4442: fixed an issue where date is showing the date prior to submitted date on view tab and data tab
- FIO-4362, FIO-4363: Fixes an issue where values of the Radio type Checkboxes are not visible in the view and edit modes
- FIO-2960:Add debounce to reCaptcha component
- FIO-4446: Fixes Select with data source URL not fetching options when it has validation error
- FIO-3502: Fixes values on data tab get overwritten when label changed for Radio, Select Boxes and Select
- FIO-4351: Migrated to tippy.js
- FIO-4437: remove redundant SignRequest code
- FIO-3825: Fixed an issue where conditionally hidden components of the nested wizard form are not attached to the correct element
- FIO-4390: Signature becomes disabled only when at least one line is drawn
- FIO-3627 Fixed validating errors in nested forms that were not focusing on components

## 4.14.1-rc.6
### Fixed
- UIP-326: fix calling function to cancel submission made submit button disabled
- FIO-4412: fixed an issue where checkbox value does not return after submission when checkbox is shown conditionally and it is inside the nested form

## 4.14.1-rc.5
### Changed
- git cherry-pick ff372e4adffd10e71e9e181868c7a6068e577216

### Fixed
- FIO-3435: form definition downloading according query parameter
- FIO-4081 Fixed incorrect file pattern message
- FIO-3715: fixed an issue where validation errors displayed when rendering a form with a submission in draft-state
- FIO-3814: do not fetch Select options again if there was an error
- FIO-4037: Values should not modify once the component has been saved.
- FIO-3860: Resource Field showing different property name for PDF and webforms
- FIO-4055: fixed an issue where Calendar Widget is showing incorrect date on PDF submoission
- FIO-4232: Form controller not working inside wizard forms
- Added the flags to the setForm method for PDF
- FIO-3973: Fixed an issue where invalidRowError is not cleared for the opened EditGrid row after all the errors were fixed
- FIO-3975: Fixed an issue where all the modals preview are visible when the components are not
- FIO-4311: Wizard Theme support right hand nav
- FIO-2718 Moved minDate and maxDate to Validation tab in DateTime builder options
- FIO-3018: fixed custom JS pollution between stages
- FIO-3884 Fixed issue when conditionally required fields weren't indicated as required in labels

## 4.14.1-rc.4
### Fixed
- FIO-4324: Fixes an issue where templating code is evaluated when rending TextArea's value

## 4.14.1-rc.3
### Fixed
- FIO-4337: Fixes an issue where settings form for the selected addon is not shown
- FIO-3227: fixed an issue where isPromise returns false for Angular wrapped promises

## 4.14.1-rc.2
### Fixed
- FIO-4355: downloading data via CSV issue fix

## 4.14.1-rc.1
### Changed
- Feat/fio 2860 signrequest
- Feat/signrequest related changes

## 4.14.0
### Changed
- Official Release
Expand Down
8 changes: 1 addition & 7 deletions lib/formio.full.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.choices{position:relative;margin-bottom:24px;font-size:16px}.choices:focus{outline:0}.choices:last-child{margin-bottom:0}.choices.is-disabled .choices__inner,.choices.is-disabled .choices__input{background-color:#eaeaea;cursor:not-allowed;-webkit-user-select:none;-ms-user-select:none;user-select:none}.choices.is-disabled .choices__item{cursor:not-allowed}.choices [hidden]{display:none!important}.choices[data-type*=select-one]{cursor:pointer}.choices[data-type*=select-one] .choices__inner{padding-bottom:7.5px}.choices[data-type*=select-one] .choices__input{display:block;width:100%;padding:10px;border-bottom:1px solid #ddd;background-color:#fff;margin:0}.choices[data-type*=select-one] .choices__button{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);padding:0;background-size:8px;position:absolute;top:50%;right:0;margin-top:-10px;margin-right:25px;height:20px;width:20px;border-radius:10em;opacity:.5}.choices[data-type*=select-one] .choices__button:focus,.choices[data-type*=select-one] .choices__button:hover{opacity:1}.choices[data-type*=select-one] .choices__button:focus{box-shadow:0 0 0 2px #00bcd4}.choices[data-type*=select-one] .choices__item[data-value=''] .choices__button{display:none}.choices[data-type*=select-one]:after{content:'';height:0;width:0;border-style:solid;border-color:#333 transparent transparent;border-width:5px;position:absolute;right:11.5px;top:50%;margin-top:-2.5px;pointer-events:none}.choices[data-type*=select-one].is-open:after{border-color:transparent transparent #333;margin-top:-7.5px}.choices[data-type*=select-one][dir=rtl]:after{left:11.5px;right:auto}.choices[data-type*=select-one][dir=rtl] .choices__button{right:auto;left:0;margin-left:25px;margin-right:0}.choices[data-type*=select-multiple] .choices__inner,.choices[data-type*=text] .choices__inner{cursor:text}.choices[data-type*=select-multiple] .choices__button,.choices[data-type*=text] .choices__button{position:relative;display:inline-block;margin:0 -4px 0 8px;padding-left:16px;border-left:1px solid #008fa1;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);background-size:8px;width:8px;line-height:1;opacity:.75;border-radius:0}.choices[data-type*=select-multiple] .choices__button:focus,.choices[data-type*=select-multiple] .choices__button:hover,.choices[data-type*=text] .choices__button:focus,.choices[data-type*=text] .choices__button:hover{opacity:1}.choices__inner{display:inline-block;vertical-align:top;width:100%;background-color:#f9f9f9;padding:7.5px 7.5px 3.75px;border:1px solid #ddd;border-radius:2.5px;font-size:14px;min-height:44px;overflow:hidden}.is-focused .choices__inner,.is-open .choices__inner{border-color:#b7b7b7}.is-open .choices__inner{border-radius:2.5px 2.5px 0 0}.is-flipped.is-open .choices__inner{border-radius:0 0 2.5px 2.5px}.choices__list{margin:0;padding-left:0;list-style:none}.choices__list--single{display:inline-block;padding:4px 16px 4px 4px;width:100%}[dir=rtl] .choices__list--single{padding-right:4px;padding-left:16px}.choices__list--single .choices__item{width:100%}.choices__list--multiple{display:inline}.choices__list--multiple .choices__item{display:inline-block;vertical-align:middle;border-radius:20px;padding:4px 10px;font-size:12px;font-weight:500;margin-right:3.75px;margin-bottom:3.75px;background-color:#00bcd4;border:1px solid #00a5bb;color:#fff;word-break:break-all;box-sizing:border-box}.choices__list--multiple .choices__item[data-deletable]{padding-right:5px}[dir=rtl] .choices__list--multiple .choices__item{margin-right:0;margin-left:3.75px}.choices__list--multiple .choices__item.is-highlighted{background-color:#00a5bb;border:1px solid #008fa1}.is-disabled .choices__list--multiple .choices__item{background-color:#aaa;border:1px solid #919191}.choices__list--dropdown{visibility:hidden;z-index:1;position:absolute;width:100%;background-color:#fff;border:1px solid #ddd;top:100%;margin-top:-1px;border-bottom-left-radius:2.5px;border-bottom-right-radius:2.5px;overflow:hidden;word-break:break-all;will-change:visibility}.choices__list--dropdown.is-active{visibility:visible}.is-open .choices__list--dropdown{border-color:#b7b7b7}.is-flipped .choices__list--dropdown{top:auto;bottom:100%;margin-top:0;margin-bottom:-1px;border-radius:.25rem .25rem 0 0}.choices__list--dropdown .choices__list{position:relative;max-height:300px;overflow:auto;-webkit-overflow-scrolling:touch;will-change:scroll-position}.choices__list--dropdown .choices__item{position:relative;padding:10px;font-size:14px}[dir=rtl] .choices__list--dropdown .choices__item{text-align:right}@media (min-width:640px){.choices__list--dropdown .choices__item--selectable{padding-right:100px}.choices__list--dropdown .choices__item--selectable:after{content:attr(data-select-text);font-size:12px;opacity:0;position:absolute;right:10px;top:50%;transform:translateY(-50%)}[dir=rtl] .choices__list--dropdown .choices__item--selectable{text-align:right;padding-left:100px;padding-right:10px}[dir=rtl] .choices__list--dropdown .choices__item--selectable:after{right:auto;left:10px}}.choices__list--dropdown .choices__item--selectable.is-highlighted{background-color:#f2f2f2}.choices__list--dropdown .choices__item--selectable.is-highlighted:after{opacity:.5}.choices__item{cursor:default}.choices__item--selectable{cursor:pointer}.choices__item--disabled{cursor:not-allowed;-webkit-user-select:none;-ms-user-select:none;user-select:none;opacity:.5}.choices__heading{font-weight:600;font-size:12px;padding:10px;border-bottom:1px solid #f7f7f7;color:gray}.choices__button{text-indent:-9999px;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;background-color:transparent;background-repeat:no-repeat;background-position:center;cursor:pointer}.choices__button:focus,.choices__input:focus{outline:0}.choices__input{display:inline-block;vertical-align:baseline;background-color:#f9f9f9;font-size:14px;margin-bottom:5px;border:0;border-radius:0;max-width:100%;padding:4px 0 4px 2px}[dir=rtl] .choices__input{padding-right:2px;padding-left:0}.choices__placeholder{opacity:.5}
.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}
dialog {
position: absolute;
left: 0; right: 0;
Expand Down Expand Up @@ -3521,15 +3520,10 @@ div[data-oembed-url] {
margin-bottom: 8px;
}

.radio label.label-position-left input[type=radio] {
.radio label.label-position-left input[type=radio], .checkbox label.label-position-left input[type=checkbox] {
margin-left: 10px;
}

.checkbox label.label-position-left input[type=checkbox] {
margin-left: 4px;
position: relative;
}

.open-modal-button {
width: 100%;
text-align: left;
Expand Down
1,815 changes: 557 additions & 1,258 deletions lib/formio.full.js

Large diffs are not rendered by default.

Loading