Skip to content
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
278 commits
Select commit Hold shift + click to select a range
d007411
Merge branch 'develop' into fig-tree-2.0
CarlosNZ May 26, 2025
944170b
Update yarn.lock
CarlosNZ May 29, 2025
6a1b500
Merge branch 'develop' into fig-tree-2.0
CarlosNZ Jun 4, 2025
2dc77a3
Merge branch 'develop' into fig-tree-2.0
CarlosNZ Jul 9, 2025
a8eb395
WIP
CarlosNZ Jul 9, 2025
388d6a3
Update FigTree.ts
CarlosNZ Jul 9, 2025
4d3dda7
Add "copy to clipboard" functionality to evaluations
CarlosNZ Jul 11, 2025
3118f78
Implement applicationData for Actions
CarlosNZ Jul 11, 2025
ce3b8f4
Tidy up
CarlosNZ Jul 11, 2025
af7e8db
Update EvaluationEditor.tsx
CarlosNZ Jul 11, 2025
56dfcc1
UI Improvements, preserve parameter order
CarlosNZ Jul 11, 2025
86b0d9a
Update Evaluation.tsx
CarlosNZ Jul 11, 2025
77c28a5
Remove useEffect from ElementConfig
CarlosNZ Jul 11, 2025
77e3005
Fix element reset, data saving
CarlosNZ Jul 11, 2025
297508d
Show parameter names in bold when in "combined" view
CarlosNZ Jul 11, 2025
8740f57
Update EvaluationEditor.tsx
CarlosNZ Jul 11, 2025
ccd8414
Fix re-validation without adding to undo queue
CarlosNZ Jul 11, 2025
03f66d0
Update expression editor
CarlosNZ Jul 11, 2025
00536d1
Get it working for Actions
CarlosNZ Jul 12, 2025
806d34c
Style tweaks
CarlosNZ Jul 12, 2025
b2764fe
Add comments
CarlosNZ Jul 12, 2025
decc701
Comment
CarlosNZ Jul 12, 2025
08d4ae2
Update ActionConfig.tsx
CarlosNZ Jul 12, 2025
8552396
Implement separate FigTree instance for demo config
CarlosNZ Jul 13, 2025
889583e
Merge branch 'develop' into fig-tree-2.0
CarlosNZ Jul 13, 2025
a3f053d
Include fragment selection in Import modal
CarlosNZ Jul 13, 2025
e2f8978
Fragment UI
CarlosNZ Jul 13, 2025
a0cc72e
Include Fragment check in "Check" before commit
CarlosNZ Jul 14, 2025
bec70c8
Tweak "Check" modal styles
CarlosNZ Jul 14, 2025
b487775
Refactor General layout
CarlosNZ Jul 14, 2025
d34f0f9
Create Fragment queries
CarlosNZ Jul 15, 2025
80b4490
Improvements to Fragment editor
CarlosNZ Jul 16, 2025
a61fbe3
Implement undo/redo
CarlosNZ Jul 16, 2025
7330bd5
Layout improvements
CarlosNZ Jul 16, 2025
d9ffb77
Update EvaluatorFragments.tsx
CarlosNZ Jul 16, 2025
96cf2cc
Merge branch 'develop' into fig-tree-2.0-fragment-management
CarlosNZ Jul 17, 2025
6d34c83
Update draft correctly, remove fragments from Editor
CarlosNZ Jul 17, 2025
c38515e
Fix text strings
CarlosNZ Jul 17, 2025
8645cdb
Improve Drop-down, add onEvaluate and onError functions
CarlosNZ Jul 17, 2025
0745bf3
Start building Tester component
CarlosNZ Jul 17, 2025
c93397b
Improve Type definitions
CarlosNZ Jul 17, 2025
5cb0368
Merge branch 'develop' into fig-tree-2.0-fragment-management
CarlosNZ Jul 18, 2025
750d8af
Merge branch 'develop' into fig-tree-2.0-fragment-management
CarlosNZ Jul 18, 2025
c3c4840
Improve tester performance
CarlosNZ Jul 18, 2025
7062a47
Merge branch 'develop' into fig-tree-2.0-fragment-management
CarlosNZ Jul 18, 2025
4cefcd5
WIP
CarlosNZ Jul 18, 2025
681da8d
WIP
CarlosNZ Jul 18, 2025
05d0fd4
Update package.json
CarlosNZ Jul 18, 2025
f538870
Application data fetching init
CarlosNZ Jul 19, 2025
d406862
Improve layout
CarlosNZ Jul 19, 2025
2b8588e
Tweak
CarlosNZ Jul 19, 2025
3355459
Improvements
CarlosNZ Jul 20, 2025
f3376fd
Merge branch 'develop' into fig-tree-2.0-fragment-management
CarlosNZ Jul 20, 2025
517099c
Add loading, isDirty
CarlosNZ Jul 20, 2025
a90745d
Add JSON5, consolidate JsonEditor implementations
CarlosNZ Jul 20, 2025
e70252f
Tidy up
CarlosNZ Jul 20, 2025
8137700
Fix mutating readonly properties error
CarlosNZ Jul 20, 2025
99724da
Distinguish between New and Edit existing, Update dropdown with name …
CarlosNZ Jul 20, 2025
e699f96
Print evaluation error to console
CarlosNZ Jul 21, 2025
d0e8eba
Reset when "deleting" unsaved fragment
CarlosNZ Jul 21, 2025
fa1493b
Consolidate shared components
CarlosNZ Jul 21, 2025
cf6cf0d
Add color picker to Fragment editor
CarlosNZ Jul 22, 2025
69c4f8c
Merge branch 'develop' into fig-tree-2.0-fragment-management
CarlosNZ Jul 23, 2025
6b705dd
Allow droppdowns to be clearable in development
CarlosNZ Jul 23, 2025
cafd0d3
Update customFunctions.ts
CarlosNZ Jul 24, 2025
0478f34
v2.0.0-dev.3
CarlosNZ Jul 24, 2025
822847b
v2.0.0-dev.1
CarlosNZ Jul 24, 2025
6152496
Update component.tsx
CarlosNZ Jul 24, 2025
ab23659
v2.0.0-dev.2
CarlosNZ Jul 24, 2025
e7bf2c3
Update FigTree.ts
CarlosNZ Jul 24, 2025
9eb6fab
Temp move
CarlosNZ Jul 24, 2025
d8114d4
Fix folder casing problem
CarlosNZ Jul 24, 2025
81fd027
v2.0.0-dev.3
CarlosNZ Jul 24, 2025
70dc7a2
vv2.0.0-dev.4
CarlosNZ Jul 24, 2025
b576530
vv2.0.0-dev.5
CarlosNZ Jul 24, 2025
ceb9690
v2.0.0-dev.6
CarlosNZ Jul 24, 2025
f043329
Update ApplicationView.tsx
CarlosNZ Jul 24, 2025
aff55f8
Update FigTree.ts
CarlosNZ Jul 24, 2025
56df886
Update FigTree instantiations
CarlosNZ Jul 24, 2025
3782b07
v2.0.0-dev.7
CarlosNZ Jul 24, 2025
85c9d4e
v2.0.0-dev.8
CarlosNZ Jul 25, 2025
c9f76da
v2.0.0-dev.9
CarlosNZ Jul 25, 2025
19ae7d6
Fix color picker
CarlosNZ Jul 27, 2025
256ffd5
Add default figTree values
CarlosNZ Jul 28, 2025
9205b34
Improve parameter initialisation
CarlosNZ Jul 29, 2025
734430e
Better notification when result is empty string
CarlosNZ Jul 29, 2025
c9fb832
Set min-height for Toast notifications
CarlosNZ Jul 29, 2025
583b58b
Better display for Shorthand expressions in Summary
CarlosNZ Jul 30, 2025
93d099b
Rename initialiseParameters hook, implement in ElementConfig
CarlosNZ Jul 30, 2025
424f320
Fix dirty state handling
CarlosNZ Jul 30, 2025
b577068
FIx copy-to-clipboard formatting
CarlosNZ Jul 30, 2025
e764af3
v2.0.0-dev.10
CarlosNZ Jul 30, 2025
e9b0df2
Merge branch 'develop' into v2.0.0-dev
CarlosNZ Sep 16, 2025
8e77bda
Merge branch 'develop' into v2.0.0-dev
CarlosNZ Dec 3, 2025
ce679a8
Update graphql.tsx
CarlosNZ Dec 3, 2025
44e987e
Update schema.ts
CarlosNZ Dec 3, 2025
dff0279
Upgrade dependencies
CarlosNZ Dec 4, 2025
8f61bfe
v2.0.0-dev.11
CarlosNZ Dec 4, 2025
c003045
Update evaluator version
CarlosNZ Dec 9, 2025
e2de18f
Update fig-tree
CarlosNZ Dec 10, 2025
c7719a2
Add "Get Values" form element
CarlosNZ Dec 10, 2025
e84428c
Add "duplicate element" button
CarlosNZ Dec 10, 2025
281e18a
Typo
CarlosNZ Dec 10, 2025
e366ed5
Insert duplicate after copied element, not end of page
CarlosNZ Dec 10, 2025
1355cae
Upgrade dependency
CarlosNZ Dec 11, 2025
198439b
v2.0.0-dev.12
CarlosNZ Dec 11, 2025
32d3ae1
v2.0.0-dev.13
CarlosNZ Dec 12, 2025
376df92
Boilerplate
CarlosNZ Dec 15, 2025
ad87153
Add isReviewerSection field
CarlosNZ Dec 15, 2025
f3c98be
Tidy up erroneous types
CarlosNZ Dec 15, 2025
d00c83f
Isolate reviewSections
CarlosNZ Dec 15, 2025
2b22588
Update ReviewApplicationForm.tsx
CarlosNZ Dec 15, 2025
d2298ef
Handle creating review section responses and evaluations
CarlosNZ Dec 16, 2025
19220b6
Show review section in TemplateBuilder
CarlosNZ Dec 16, 2025
d762433
Fix config applications, reset application, and application_response …
CarlosNZ Dec 16, 2025
9810f0c
Default editablity setting
CarlosNZ Dec 16, 2025
6c5107b
Regenerate graphql
CarlosNZ Dec 16, 2025
94b1f00
Validation
CarlosNZ Dec 17, 2025
21dcdc6
Set "reviewability" to "never" for review elements and hide UI
CarlosNZ Dec 17, 2025
ec0caff
Fix element editability, fix files being deletable when non-editable
CarlosNZ Dec 17, 2025
c7fa33c
Show error indicator for Date Picker element
CarlosNZ Dec 18, 2025
9f6e0ba
Display error in console when parameter expressions fail
CarlosNZ Dec 18, 2025
04e7456
v2.0.0-dev.14
CarlosNZ Dec 18, 2025
93dde5a
v2.0.0-dev.15
CarlosNZ Dec 28, 2025
a2804a9
Add min/max to custom operators
CarlosNZ Dec 30, 2025
218b81b
Fix review section validation
CarlosNZ Jan 6, 2026
90253db
v2.0.0-dev.16
CarlosNZ Jan 6, 2026
1af74c8
v2.0.0-dev.17
CarlosNZ Jan 6, 2026
84437ea
Implement extraction
CarlosNZ Jan 7, 2026
4d52ea8
Implement Absorbtion
CarlosNZ Jan 7, 2026
0937a7e
Fix error, improve layout
CarlosNZ Jan 7, 2026
6c55f06
More error catching
CarlosNZ Jan 7, 2026
e178e46
Tweak style
CarlosNZ Jan 7, 2026
f1dcc82
Fix bracketing
CarlosNZ Jan 7, 2026
34f755c
Revert onSave method to previous
CarlosNZ Jan 7, 2026
79b8788
v2.0.0-dev.18
CarlosNZ Jan 7, 2026
129ce00
v2.0.0-dev.19
CarlosNZ Jan 8, 2026
1222195
v2.0.0-dev.20
CarlosNZ Jan 8, 2026
3f56f0e
Refactor to handle not selecting self
CarlosNZ Jan 8, 2026
96cb0e8
Separate absorb from start selection
CarlosNZ Jan 8, 2026
7e5e446
Update docs
CarlosNZ Jan 8, 2026
4c7fe15
Add comments
CarlosNZ Jan 8, 2026
50a1aeb
Update _wiki
CarlosNZ Jan 8, 2026
2c6217d
Update python docs script
CarlosNZ Jan 8, 2026
030c3ea
Merge branch 'v2.0.0-dev' into 1113-reviewer-application-elements
CarlosNZ Jan 8, 2026
7bf6727
Update _wiki
CarlosNZ Jan 8, 2026
0d1e9f8
Merge branch '1113-reviewer-application-elements' into 1043-listbuild…
CarlosNZ Jan 8, 2026
97eb422
Update _wiki
CarlosNZ Jan 8, 2026
a1dd5e0
v2.0.0-dev.21
CarlosNZ Jan 8, 2026
3640098
v2.0.0-dev.22
CarlosNZ Jan 12, 2026
990d7a7
Hide getValues elements from Summary page
CarlosNZ Jan 13, 2026
aa20115
Merge branch 'v2.0.0-dev' into 1113-reviewer-application-elements
CarlosNZ Jan 13, 2026
c22bcd3
Merge branch '1113-reviewer-application-elements' into 1043-listbuild…
CarlosNZ Jan 13, 2026
7805741
Merge pull request #1654 from msupply-foundation/1113-reviewer-applic…
CarlosNZ Jan 13, 2026
eb00e7b
Merge pull request #1655 from msupply-foundation/1043-listbuilder-edi…
CarlosNZ Jan 13, 2026
1d512ee
Fix Number Summary view
CarlosNZ Jan 13, 2026
4a263b8
v2.0.0-dev.23
CarlosNZ Jan 13, 2026
74230eb
v2.0.0-dev.24
CarlosNZ Jan 14, 2026
2dd57c2
Add number formatting to data view displays
CarlosNZ Jan 14, 2026
c9c4ef8
Update _wiki
CarlosNZ Jan 14, 2026
3ca782b
v2.0.0-dev.25
CarlosNZ Jan 14, 2026
57ee608
Fix conditional hook error
CarlosNZ Jan 14, 2026
db2d2d2
New "internal-applicant" role
CarlosNZ Jan 14, 2026
f9b3135
Update ReviewerActionCell.tsx
CarlosNZ Jan 14, 2026
389191a
Update ListWrapper.tsx
CarlosNZ Jan 14, 2026
9e3c5f7
Update StatusCell.tsx
CarlosNZ Jan 14, 2026
e7158ec
Merge pull request #1656 from msupply-foundation/new-user-role
CarlosNZ Jan 14, 2026
fa8b122
v2.0.0-dev.26
CarlosNZ Jan 14, 2026
980ce79
Add Preview Action element
CarlosNZ Jan 15, 2026
9c8ace7
Add preventDownload override
CarlosNZ Jan 15, 2026
60b5eee
Add documentation
CarlosNZ Jan 15, 2026
d69d4d5
Merge pull request #1658 from msupply-foundation/1657-preview-functio…
CarlosNZ Jan 15, 2026
5555cb0
Update _wiki
CarlosNZ Jan 15, 2026
07f1cc3
v2.0.0-dev.27
CarlosNZ Jan 15, 2026
125a525
Date element has undefined rather than null when not specified
CarlosNZ Jan 22, 2026
151adc0
v2.0.0-dev.28
CarlosNZ Jan 22, 2026
fb71a07
v2.0.0-dev.29
CarlosNZ Jan 22, 2026
b402e58
Fix type errors
CarlosNZ Jan 22, 2026
d544bce
v2.0.0-dev.30
CarlosNZ Jan 22, 2026
3134291
Update package.json
CarlosNZ Jan 23, 2026
86d5e1d
v2.0.0-dev.31
CarlosNZ Jan 23, 2026
76eb165
v2.0.0-dev.31
CarlosNZ Jan 27, 2026
d1d19c2
v2.0.0-dev.32
CarlosNZ Jan 27, 2026
289b7ce
v2.0.0-dev.32
CarlosNZ Jan 27, 2026
36151a4
v2.0.0-dev.33
CarlosNZ Jan 27, 2026
b60ef94
Merge branch 'upgrade-node' into v2.0.0-dev
CarlosNZ Feb 4, 2026
ac4f99a
v2.0.0-dev.34
CarlosNZ Feb 4, 2026
7ca227d
v2.0.0-dev.35
CarlosNZ Feb 9, 2026
763419a
v2.0.0-dev.36
CarlosNZ Feb 9, 2026
f7c2026
Upgrade fig-tree
CarlosNZ Feb 10, 2026
3221215
Fix for Evaluator Toast
CarlosNZ Feb 11, 2026
cf2759f
v2.0.0-dev.37
CarlosNZ Feb 11, 2026
57bd667
Lazy load Action config so it doesn't load (and give error) for non-A…
CarlosNZ Feb 12, 2026
25f9c98
Tidy
CarlosNZ Feb 12, 2026
0976bb1
WIP
CarlosNZ Feb 12, 2026
d273d0f
WIP
CarlosNZ Feb 13, 2026
d2ba778
UI for snapshot changes
CarlosNZ Feb 13, 2026
9493fea
Improve download method
CarlosNZ Feb 14, 2026
ecfa79e
Get downloads working
CarlosNZ Feb 14, 2026
f59210e
Initial Download Modal
CarlosNZ Feb 14, 2026
82a285d
Download snapshot modal UI
CarlosNZ Feb 14, 2026
0ce402f
Add submit function (incomplete)
CarlosNZ Feb 15, 2026
9d2181f
Get Download working good
CarlosNZ Feb 15, 2026
5893c06
More precise file naming, handle single selection value
CarlosNZ Feb 15, 2026
a2fc917
Download modal UI improvements
CarlosNZ Feb 16, 2026
2953d4e
Add purge and store actions
CarlosNZ Feb 17, 2026
39190a7
WIP
CarlosNZ Feb 17, 2026
3688bf9
Refactor for proper state update
CarlosNZ Feb 17, 2026
48b0ba9
Create .nvmrc
CarlosNZ Feb 17, 2026
5534e26
Toast improvements
CarlosNZ Feb 17, 2026
cfa80ca
Toast improvements
CarlosNZ Feb 17, 2026
45503e1
Update Snapshots.tsx
CarlosNZ Feb 17, 2026
93ff2e9
Add freeSpaceRequiredForZips property to prefs
CarlosNZ Feb 19, 2026
d0ebabd
Merge branch 'develop' into v2.0.0-dev
CarlosNZ Mar 5, 2026
95edc07
Merge branch 'v2.0.0-dev' into better-snapshot-management
CarlosNZ Mar 5, 2026
2aef402
v2.0.0-dev.38
CarlosNZ Mar 5, 2026
2f8d925
v2.0.0-dev.39
CarlosNZ Mar 5, 2026
49bebed
Placeholder text when file is offline
CarlosNZ Mar 18, 2026
a857cb1
Handle default value in Dropdown when options are objects
CarlosNZ Mar 18, 2026
e256bc0
Update ApplicationView.tsx
CarlosNZ Mar 18, 2026
50000d5
Keep "+New" button on all relevant Dashboard template elements
CarlosNZ Mar 18, 2026
6f77e6d
Don't wrap currency values in table cells
CarlosNZ Mar 19, 2026
ea9728e
Extend table width if necessary
CarlosNZ Mar 19, 2026
b75d402
Hide "hidden" getValues element from Review page
CarlosNZ Mar 20, 2026
d73e18a
v2.0.0-dev.40
CarlosNZ Mar 20, 2026
d98efab
Better messaging when user can't assign
CarlosNZ Apr 1, 2026
ed57c72
v2.0.0-dev.41
CarlosNZ Apr 13, 2026
7123c3b
Make reviewer form elements disabled when not in active review
CarlosNZ Apr 13, 2026
66e0c8c
Make ActionConfig wait until FigTree back-end fragments are loaded
CarlosNZ Apr 23, 2026
1a24231
Add protectedFilesKeepDays to prefs
CarlosNZ Apr 29, 2026
46a770a
Update doc
CarlosNZ Apr 29, 2026
5ebcdad
v2.0.0-dev.42
CarlosNZ Apr 29, 2026
a5cf5e1
Update _wiki
CarlosNZ Apr 29, 2026
cd20f85
Create .nvmrc
CarlosNZ May 4, 2026
9100f3c
Allow vscode settings to sync with repo
CarlosNZ May 4, 2026
01d8faa
Merge branch 'v2.0.0-dev' into better-snapshot-management
CarlosNZ May 4, 2026
841a6f2
Update _wiki
CarlosNZ May 4, 2026
f44ccee
Remove unused functionality
CarlosNZ May 4, 2026
af6f675
Visually identify OLD snapshots in UI
CarlosNZ May 5, 2026
f2f3fa0
Merge pull request #1659 from msupply-foundation/better-snapshot-mana…
CarlosNZ May 5, 2026
6adf925
Fixes for json editor resets, including upgrade package
CarlosNZ May 5, 2026
834b695
Update Snapshots.tsx
CarlosNZ May 5, 2026
82f3f75
Merge branch 'develop' into v2.0.0-dev
CarlosNZ May 6, 2026
5ddd380
Remove noise from yarn install logs
CarlosNZ May 6, 2026
e088c08
Remove redundant code
CarlosNZ May 6, 2026
6d67084
Update apiOperations.ts
CarlosNZ May 6, 2026
5e8a4f0
Squashed commit of the following:
CarlosNZ May 7, 2026
6f543b7
Hide archive UI in snapshot download modal when there are no archives
CarlosNZ May 7, 2026
c0303f0
PR Review fixes
CarlosNZ May 7, 2026
d446010
More PR review fixes
CarlosNZ May 7, 2026
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
node_modules
dist
.DS_Store
.vscode
.vscode/*
!.vscode/settings.json
yarn-error.log
.env
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20
13 changes: 13 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"files.exclude": {},
"cSpell.words": ["colour", "Prefs", "Refetched", "stackable", "Unassignment"],
"cSpell.ignoreWords": ["hkgx", "webp"],
"typescript.tsdk": "node_modules/typescript/lib",
"terminal.integrated.profiles.osx": {
"zsh (nvm)": {
"path": "zsh",
"args": ["-l", "-c", "source ~/.nvm/nvm.sh && nvm use && exec zsh"]
}
},
"terminal.integrated.defaultProfile.osx": "zsh (nvm)"
}
2 changes: 1 addition & 1 deletion docs/_wiki
Submodule _wiki updated from 3b7c0e to 2f4910
88 changes: 85 additions & 3 deletions docs/internal/Element-Type-Specs.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ _Ongoing authoritative reference of Template Question/Element types, including i
- [Date Picker](#date-picker)
- [Number](#number)
- [JSON Editor](#json-editor)
- [Get Values](#get-values)
- [Preview Action](#preview-action)
- [Page Break](#page-break)

<!-- tocstop -->
Expand Down Expand Up @@ -443,6 +445,7 @@ _Interface for uploading documents or other files_
- **showDescription**: `boolean` -- if `true`, an additional text input will be displayed alongside each file to allow the applicant to specify a description for each file. (default `false`)
- **showFileRestrictions**: `boolean` -- will display the allowed file extensions and maximum size below the upload box (default: `true`)
- **showDocumentModal**: `boolean` -- if `true`, will display documents (when clicked to view) in a modal overlay rather than opening in a new tab. Will fallback to global system preference.
- **isProtected**: `boolean` -- if `true`, files uploaded are treated with special privacy considerations: they'll never be archived, and will be automatically deleted after a certain number of days after upload (specified in Server Prefs:`protectedFilesKeepDays`, default 90)

#### Response type

Expand Down Expand Up @@ -488,11 +491,33 @@ _Allows user to build a list of items, such as an **Ingredients List**_
- **deleteItemText** `string` -- text to display on the button to delete an item from the item editing modal (default: "Update")
Note: this button only appears when displaying the list in "Table" view (see below). In "Cards" view, there is an icon to delete items directly on each card.
- **modalText** `string` -- additional instructional text to show on the item editing modal (e.g. "Please enter ingredient details") [Optional]
- **inputFields** `array[Elements]` -- an ordered list of input fields -- these are template questions/elements, just like all the ones on this page, but are "children" of the listBuilder element and display in the item editing modal. Not all fields are required or respected:
- **inputFields** `array[Elements]` -- an ordered list of input fields -- these are template questions/elements, just like all the ones on this page, but are "children" of the listBuilder element and display in the item editing modal. Not all fields are required:

- `index` -- not required, order follows listed order
- `visibility_condition` / `is_editable` -- not required, always `true` (for now, may be implemented later)
- `parameters`, `title`, and `code` are essential
- `index` -- not required, order follows listed order


> [!TIP]
> It is difficult to edit internal elements in this field directly, as it's all just JSON rather than TemplateBuilder UI. The best way to manage it is to create and edit the elements in the normal form editor, and then use the "Absorb elements" button to pull them into the List Builder:

<img src="images/Element-Type-Specs-listBuilder-absorb.png"
alt="Absorb elements"
style="max-width: 660px;">

Select the elements to pull in:

<img src="images/Element-Type-Specs-listBuilder-absorb-in-progress.png"
alt="Absorb elements in progress"
style="max-width: 690px; width: 100%;">

Reverse the process (pull out elements for further editing) using "Extract elements":

<img src="images/Element-Type-Specs-listBuilder-extract.png"
alt="Extract elements"
style="max-width: 500px;">

> [!IMPORTANT]
> To dynamically target other elements within a List Builder (e.g. if visibility of one is dependent on another), use the `applicationData` path as though the elements were in the main form rather than inside another element. This means that you can configure the dynamic behaviour as normal, with the elements in the main form, and when you pull them into the List Builder using "Absorb elements", the behaviour will be preserved. You will need to ensure that your element codes are unique within the whole template.

- **maxItems** `number` -- if specified, the maximum number of items that can be added to the list (once this number is reached, the "Add" button will no longer appear)
- **displayType** `'table' | 'cards' | 'inline' | 'list'` (default: `cards`) -- how to present the list of items, as shown here:
Expand Down Expand Up @@ -798,6 +823,63 @@ Uses [json-edit-react](https://carlosnz.github.io/json-edit-react/)

---

<a name="get-values"/>

### Get Values

- **type/code**: `getValues`
- **category**: `Information`

_Hidden element to store useful data_

This is a "dummy" element that can be used to fetch some data from anywhere and
store it in a response. Useful when you have several other elements or actions
that pull from the same query, this will reduce expression complexity and
redundant network requests. You can store a whole object in here and just pull individual fields out of it in other elements.

The element will be hidden for the applicant (and reviewer), but in the Template Builder you can see a Stringified representation of the current data for reference purposes.

#### Input parameters

- **values**: `any` -- The "data" you want (probably a network or database expression)
- **default**: `any` -- alias for `values`. The `values` property behaves exactly like every other element type's `default` field, so you can use either name here.


#### Response type

```
{
text: <Stringified version of the data object>
data: { ...fetchedData }
}
```

---

<a name="preview-action"/>

### Preview Action

- **type/code**: `previewAction`
- **category**: `Information`

_Button to view previews of back-end actions (e.g. generated documents)_

Behaves similarly to the "Preview Decision" button & modal for Reviewers when submitting their review. If Action aliases are configured for the `ON_PREVIEW` trigger (see [here](https://github.com/msupply-foundation/conforma-server/wiki/List-of-Action-plugins#aliasing-existing-template-actions)), when clicking the "Preview", the applicant will see the result of some server actions. Useful for showing what a certain output document will look like without having to Submit first.

![modal](images/Element-Type-Specs-previewAction-modal.png)


#### Input parameters

- **buttonText**: `string` -- Text to display on the "Preview" button (default: "Preview")
- **headerText**: `string` -- Text to display on the "Header" region of the Preview modal (see screenshot above) (default: "Preview Action")
- **previewText**: `string` -- Text to display on the "Content" region of the Preview modal (above the Action outputs) (default: "Action output:")
- **preventDownload**: `boolean` -- If previewing a document, and you have `showDocumentModal` enabled in [Preferences](https://github.com/msupply-foundation/conforma-server/wiki/Preferences), this will determine if there is a "Download" icon button available on the document preview modal (default: `true`)
- **applicationDataOverride**: `object` -- As with the Review decision preview, we can overwrite some `applicationData` values if required (for example, to simulate a different stage than the one we're actually on)

---

<a name="page"/>

### Page Break
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 12 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "conforma-web-app",
"version": "1.7.2-2",
"version": "2.0.0-dev.43",
"main": "index.tsx",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/msupply-foundation/conforma-web-app.git"
},
"engines": {
"node": ">=18.18.2 <19.0.0"
"node": ">=20.0.0 <21.0.0"
},
"scripts": {
"dev": "vite",
Expand All @@ -28,18 +28,22 @@
"apollo3-cache-persist": "^0.15.0",
"axios": "^1.7.7",
"clone-deep": "^4.0.1",
"colord": "^2.9.3",
"deep-equal": "^2.2.3",
"fig-tree-editor-react": "0.8.4",
"graphql": "^16.9.0",
"idle-tracker": "^0.1.3",
"json-edit-react": "^1.28.2",
"json-edit-react": "^1.29.1",
"json-to-css": "^0.1.0",
"json5": "^2.2.3",
"lodash-es": "^4.17.21",
"luxon": "^3.5.0",
"nanoid": "^5.0.7",
"papaparse": "^5.4.1",
"pluralize": "^8.0.0",
"query-string": "^9.1.0",
"react": "^18.3.1",
"react-colorful": "^5.6.1",
"react-cool-onclickoutside": "^1.7.0",
"react-dom": "^18.3.1",
"react-ga4": "^2.1.0",
Expand All @@ -52,11 +56,13 @@
"react-use-websocket": "^4.8.1",
"semantic-ui-less": "^2.5.0",
"semantic-ui-react": "^2.1.5",
"use-debounce": "^10.0.5",
"use-undo": "^1.1.1"
},
"devDependencies": {
"@eslint/js": "^9.9.0",
"@graphql-codegen/cli": "^5.0.2",
"@mojojoejo/vite-plugin-purgecss": "^1.1.0",
"@types/clone-deep": "^4.0.4",
"@types/deep-equal": "^1.0.4",
"@types/lodash-es": "^4.17.12",
Expand All @@ -75,5 +81,8 @@
"typescript": "^5.5.3",
"typescript-eslint": "^8.0.1",
"vite": "^5.4.1"
},
"resolutions": {
"canvas": "npm:noop2@^1"
}
}
Loading