formbuilder-lhcforms 9.7.3 → 9.7.5

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 CHANGED
@@ -1,31 +1,83 @@
1
- ### Installation
2
- 1. Install **nodejs** package globally on your system.
1
+ ## What is NLM Form Builder?
2
+ [NLM Form Builder](https://formbuilder.nlm.nih.gov) is an open source web application to create and edit a
3
+ [FHIR Questionnaire](https://hl7.org/fhir/questionnaire.html) resource. The application
4
+ creates input forms supporting medical terminologies such as
5
+ [LOINC](https://loinc.org) and [SNOMED](https://www.snomed.org). This tool is
6
+ written in the Angular framework and is developed by the [Lister Hill National Center
7
+ for Biomedical Communications (LHNCBC)](https://lhbcbc.nlm.nih.gov), [National
8
+ Library of Medicine (NLM)](https://www.nlm.nih.gov), part of the [National
9
+ Institutes of Health (NIH)](https://www.nih.gov). It includes a preview of the
10
+ generated form using [LHC-Forms](https://lhncbc.github.io/lforms/)
11
+ widget.
3
12
 
4
- 2. Clone git repository of formbuilder-lhcforms.
13
+ ## Licensing and Copyright Notice
14
+ See [LICENSE.md](LICENSE.md).
5
15
 
6
- $ git clone https://github.com/lhncbc/formbuilder-lhcforms.git
16
+ ## Customizing and Contributing
17
+ If you wish to revise this package, the following steps will allow you install
18
+ and to make changes and test them.
7
19
 
8
- 3. Build the project.
9
- * To build the project, change to formbuilder-lhcforms directory. Edit bashrc.formbuilder file to suit your development environment. Make sure that ./node_modules/.bin is in your path for the rest of the installation.
20
+ ### Installation
10
21
 
11
- $ cd formbuilder-lhcforms
12
- $ source bashrc.formbuilder
13
- $ npm ci && npm run build
14
- $ npm test ## Optional
22
+ **Note**: The application is developed on a Linux platform. Therefore, the following
23
+ instructions are for those who are familiar with Linux systems.
15
24
 
16
- ### Running the application
17
- * To deploy on a production webserver:
25
+ 1. **Install Node.js**:
26
+ - Ensure that you install a version of Node.js that is compatible with the application. You can check the required version in the `bashrc.formbuilder` file included in the root of the project folder.
27
+ - You can use a version manager like `nvm` (Node Version Manager) to install Node.js:
28
+ ```bash
29
+ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
30
+ source ~/.bashrc
31
+ nvm install <version>
32
+ nvm use <version>
33
+ ```
18
34
 
19
- $ cp dist/formbuilder-lhcforms {webserver docs location}
35
+ 2. **Clone the repository**:
36
+ - Clone the repository from GitHub and navigate to its directory:
37
+ ```bash
38
+ git clone https://github.com/LHNCBC/formbuilder-lhcforms.git
39
+ cd formbuilder-lhcforms
40
+ ```
20
41
 
21
- * To start dev server locally:
42
+ 3. **Install dependencies**:
43
+ - Run the following command to install the necessary dependencies:
44
+ ```bash
45
+ npm ci
46
+ ```
22
47
 
23
- $ npm start
24
- Point the browser at http://localhost:9030
48
+ 4. **Build the application**:
49
+ - Run the build command to create the build files in the `./dist` folder:
50
+ ```bash
51
+ npm run build
52
+ ```
25
53
 
26
- ### Application Programming Interface (API)
54
+ 5. **Start the development server**:
55
+ - To start the development server, run:
56
+ ```bash
57
+ npm run start
58
+ ```
59
+ - Navigate to the provided local development server URL (this is usually `http://localhost:9030`).
60
+
61
+ **OR**
62
+
63
+ - If you need to access the dev server from a different machine, use:
64
+ ```bash
65
+ npm run start-public
66
+ ```
67
+
68
+ 6. **Run tests**:
69
+ - To run the unit tests and end-to-end (e2e) tests, use the following command:
70
+ ```bash
71
+ npm run test
72
+ ```
73
+
74
+ ## **Contributing**
75
+ - If you plan to contribute new functionality, it is important to coordinate with the maintainers to ensure proper integration and to avoid duplicating efforts. Reach out to the maintainers for guidance on contributing.
76
+
77
+ If you encounter any issues during the installation or setup process, consult the project's documentation or reach out to the maintainers for further assistance.
78
+ ## Application Programming Interface (API)
27
79
  The form builder is an application. However, it is possible to control it via
28
- JavaScript from another web page. Refer to <a href="API.md">API.md</a>
80
+ JavaScript from another web page. Refer to [API.md](API.md)
29
81
  for documentation.
30
82
 
31
83
 
@@ -776,6 +776,31 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
776
776
  SOFTWARE.
777
777
 
778
778
 
779
+ async-function
780
+ MIT
781
+ MIT License
782
+
783
+ Copyright (c) 2016 EduardoRFS
784
+
785
+ Permission is hereby granted, free of charge, to any person obtaining a copy
786
+ of this software and associated documentation files (the "Software"), to deal
787
+ in the Software without restriction, including without limitation the rights
788
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
789
+ copies of the Software, and to permit persons to whom the Software is
790
+ furnished to do so, subject to the following conditions:
791
+
792
+ The above copyright notice and this permission notice shall be included in all
793
+ copies or substantial portions of the Software.
794
+
795
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
796
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
797
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
798
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
799
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
800
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
801
+ SOFTWARE.
802
+
803
+
779
804
  available-typed-arrays
780
805
  MIT
781
806
  MIT License
@@ -16,6 +16,7 @@
16
16
  { "field": "answerOption", "title": "Answer choices", "col": 12 },
17
17
  { "field": "__$itemControl", "col": 12 },
18
18
  { "field": "__$itemControlGroup", "col": 12 },
19
+ { "field": "__$itemControlDisplay", "col": 12 },
19
20
  { "field": "__$units", "col": 12 }
20
21
  ]
21
22
  },
@@ -1128,10 +1128,75 @@
1128
1128
  "id": "item-control",
1129
1129
  "labelPosition": "left",
1130
1130
  "labelClasses": "col-2 ps-0 pe-1",
1131
- "controlClasses": "col-9 btn-group btn-group-sm p-0",
1131
+ "controlClasses": "col-10 btn-group btn-group-sm p-0",
1132
1132
  "note": "(1) - not supported by LHC-Forms preview."
1133
1133
  }
1134
1134
  },
1135
+ "__$itemControlDisplay": {
1136
+ // Proxy for item control extension.
1137
+ "description": "Choose the type of control for the 'Display' data type. Some item controls are not supported by the LHC-Forms preview, as indicated by the asterisk (1) symbol.",
1138
+ "title": "Display Item Control",
1139
+ "oneOf": [
1140
+ {
1141
+ 'enum': ["inline"],
1142
+ 'display': 'In-line',
1143
+ 'description': 'The display item is rendered as a paragraph positioned sequentially among its sibling items (default behavior).',
1144
+ 'support': true
1145
+ },
1146
+ {
1147
+ 'enum': ["prompt"],
1148
+ 'display': 'Prompt',
1149
+ 'description': 'Text is shown directly below or within the answer-entry area of the containing question item, usually as a guide for what to enter.',
1150
+ 'support': false,
1151
+ 'deprecated': true
1152
+ },
1153
+ {
1154
+ 'enum': ["unit"],
1155
+ 'display': 'Unit',
1156
+ 'description': 'The display item is shown next to the answer area of the parent question, usually to indicate a unit of measure.',
1157
+ 'support': false,
1158
+ 'deprecated': true
1159
+ },
1160
+ {
1161
+ 'enum': ["lower"],
1162
+ 'display': 'Lower-bound',
1163
+ 'description': 'The display item is rendered to the left of the answer choices or a scaling control for the parent question, indicating the meaning of the \'lower\' bound, e.g., \'Strongly disagree\'.',
1164
+ 'support': false
1165
+ },
1166
+ {
1167
+ 'enum': ["upper"],
1168
+ 'display': 'Upper-bound',
1169
+ 'description': 'The display item is rendered to the right of the answer choices or a scaling control for the parent question item, indicating the meaning of the \'upper\' bound, e.g., \'Strongly agree\'.',
1170
+ 'support': false
1171
+ },
1172
+ {
1173
+ 'enum': ["flyover"],
1174
+ 'display': 'Fly-over',
1175
+ 'description': 'The display item appears temporarily when the mouse hovers over the text of the containing item.',
1176
+ 'support': false
1177
+ },
1178
+ {
1179
+ 'enum': ["legal"],
1180
+ 'display': 'Legal-Button',
1181
+ 'description': 'The display item is shown in a dialog box or similar control when a button or other UI element is used to request legal information for a question, group, or the entire questionnaire, depending on where the display item is nested.',
1182
+ 'support': false
1183
+ }
1184
+ ],
1185
+ "default": "inline",
1186
+ "type": "string",
1187
+ "visibleIf": {
1188
+ "type": ["$EXP$ target.value == 'display'"]
1189
+ },
1190
+ "widget": {
1191
+ "id": "item-control",
1192
+ "labelPosition": "left",
1193
+ "labelClasses": "col-2 ps-0 pe-1",
1194
+ "controlClasses": "col-10 btn-group btn-group-sm p-0",
1195
+ "note": "(1) - not supported by LHC-Forms preview.",
1196
+ "deprecatedNote": "* '${deprecatedItemControl}' item control is deprecated and is not presented in this list of item controls."
1197
+ }
1198
+ },
1199
+
1135
1200
  "__$terminologyServer": {
1136
1201
  "description": "Enter url for preferred terminology server.",
1137
1202
  "title": "Terminology server",
@@ -1816,6 +1881,17 @@
1816
1881
  }
1817
1882
  ]
1818
1883
  },
1884
+ {
1885
+ "fields": [
1886
+ "__$itemControlDisplay"
1887
+ ],
1888
+ "showFields": [
1889
+ {
1890
+ "field": "__$itemControlDisplay",
1891
+ "col": 12
1892
+ }
1893
+ ]
1894
+ },
1819
1895
  {
1820
1896
  "fields": [
1821
1897
  "__$terminologyServer"
@@ -1 +1 @@
1
- {"version": "9.7.3"}
1
+ {"version": "9.7.5"}
@@ -19,6 +19,6 @@
19
19
  <body class="bg-secondary">
20
20
  <lfb-root></lfb-root>
21
21
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
22
- <script src="runtime.451db9930bcccb8c.js" type="module"></script><script src="polyfills.ef59bbccd462f5ac.js" type="module"></script><script src="scripts.5c83cbb4dbb11a83.js" defer></script><script src="main.3731d110a39a76dc.js" type="module"></script></body>
22
+ <script src="runtime.451db9930bcccb8c.js" type="module"></script><script src="polyfills.ef59bbccd462f5ac.js" type="module"></script><script src="scripts.5c83cbb4dbb11a83.js" defer></script><script src="main.82e5df166dcc08d1.js" type="module"></script></body>
23
23
  </html>
24
24