lforms 29.3.1 → 33.3.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.
Files changed (115) hide show
  1. package/CHANGELOG.md +264 -0
  2. package/README.md +97 -14
  3. package/changed-features.md +99 -0
  4. package/dist/lforms/LICENSE.md +70 -0
  5. package/dist/lforms/README.md +121 -0
  6. package/dist/lforms/fhir/R4/lformsFHIR.min.js +2 -0
  7. package/dist/lforms/fhir/R4/lformsFHIR.min.js.map +1 -0
  8. package/dist/lforms/fhir/STU3/lformsFHIR.min.js +2 -0
  9. package/dist/lforms/fhir/STU3/lformsFHIR.min.js.map +1 -0
  10. package/dist/lforms/fhir/lformsFHIRAll.min.js +2 -0
  11. package/dist/lforms/fhir/lformsFHIRAll.min.js.map +1 -0
  12. package/dist/lforms/webcomponent/assets/lib/zone.min.js +134 -0
  13. package/dist/lforms/webcomponent/down_arrow_gray_10_10.png +0 -0
  14. package/dist/lforms/webcomponent/favicon.ico +0 -0
  15. package/dist/lforms/webcomponent/index.html +9 -0
  16. package/dist/lforms/webcomponent/lhc-forms.js +2472 -0
  17. package/dist/lforms/webcomponent/magnifying_glass.png +0 -0
  18. package/dist/lforms/webcomponent/main.js +2465 -0
  19. package/dist/lforms/webcomponent/main.js.map +1 -0
  20. package/dist/lforms/webcomponent/polyfills.js +2 -0
  21. package/dist/lforms/webcomponent/polyfills.js.map +1 -0
  22. package/dist/lforms/webcomponent/runtime.js +2 -0
  23. package/dist/lforms/webcomponent/runtime.js.map +1 -0
  24. package/dist/lforms/webcomponent/scripts.js +3 -0
  25. package/dist/lforms/webcomponent/scripts.js.map +1 -0
  26. package/dist/lforms/webcomponent/styles.css +3 -0
  27. package/dist/lforms/webcomponent/styles.css.map +1 -0
  28. package/form_definition.md +381 -0
  29. package/package.json +94 -88
  30. package/r4-support.md +147 -0
  31. package/sdc-support.md +127 -0
  32. package/app/.npmignore +0 -3
  33. package/app/images/blank.gif +0 -0
  34. package/app/images/signal-stop.png +0 -0
  35. package/app/index.html +0 -10
  36. package/app/lforms.js +0 -56
  37. package/app/lforms.tpl.js +0 -964
  38. package/app/scripts/angular-packages.js +0 -11
  39. package/app/scripts/bootstrap-decorators.js +0 -31
  40. package/app/scripts/bower-index.js +0 -14
  41. package/app/scripts/fhir/R4/export.js +0 -33
  42. package/app/scripts/fhir/R4/fhirRequire.js +0 -36
  43. package/app/scripts/fhir/R4/lformsFHIR.js +0 -27260
  44. package/app/scripts/fhir/R4/sdc-export.js +0 -455
  45. package/app/scripts/fhir/R4/sdc-import.js +0 -483
  46. package/app/scripts/fhir/STU3/export.js +0 -27
  47. package/app/scripts/fhir/STU3/fhirRequire.js +0 -36
  48. package/app/scripts/fhir/STU3/lformsFHIR.js +0 -27291
  49. package/app/scripts/fhir/STU3/sdc-export.js +0 -493
  50. package/app/scripts/fhir/STU3/sdc-import.js +0 -494
  51. package/app/scripts/fhir/diagnostic-report.js +0 -707
  52. package/app/scripts/fhir/export-common.js +0 -209
  53. package/app/scripts/fhir/expression-processor.js +0 -670
  54. package/app/scripts/fhir/extensions/rendering-style.js +0 -23
  55. package/app/scripts/fhir/fhir-common.js +0 -3
  56. package/app/scripts/fhir/obs-prepop.mjs +0 -97
  57. package/app/scripts/fhir/runtime-common.js +0 -33
  58. package/app/scripts/fhir/sdc-common.js +0 -334
  59. package/app/scripts/fhir/sdc-export-common.js +0 -1046
  60. package/app/scripts/fhir/sdc-import-common.js +0 -1343
  61. package/app/scripts/fhir/versions.js +0 -8
  62. package/app/scripts/index.js +0 -20
  63. package/app/scripts/lforms-config.js +0 -12
  64. package/app/scripts/lforms-constants.js +0 -10
  65. package/app/scripts/lforms-controllers.js +0 -1196
  66. package/app/scripts/lforms-directives.js +0 -424
  67. package/app/scripts/lforms-index.js +0 -20
  68. package/app/scripts/lib/cross_browser.js +0 -21
  69. package/app/scripts/lib/lforms-data.js +0 -3591
  70. package/app/scripts/lib/lforms-hl7.js +0 -525
  71. package/app/scripts/lib/lforms-util.js +0 -1122
  72. package/app/scripts/lib/lforms-validate.js +0 -277
  73. package/app/scripts/lib/polyfill.js +0 -81
  74. package/app/scripts/themeList.js +0 -17
  75. package/app/styles/lforms.css +0 -1219
  76. package/app/styles/redmond-theme/README.txt +0 -2
  77. package/app/styles/redmond-theme/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
  78. package/app/styles/redmond-theme/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
  79. package/app/styles/redmond-theme/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  80. package/app/styles/redmond-theme/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
  81. package/app/styles/redmond-theme/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
  82. package/app/styles/redmond-theme/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
  83. package/app/styles/redmond-theme/images/ui-icons_217bc0_256x240.png +0 -0
  84. package/app/styles/redmond-theme/images/ui-icons_2e83ff_256x240.png +0 -0
  85. package/app/styles/redmond-theme/images/ui-icons_469bdd_256x240.png +0 -0
  86. package/app/styles/redmond-theme/images/ui-icons_6da8d5_256x240.png +0 -0
  87. package/app/styles/redmond-theme/images/ui-icons_cd0a0a_256x240.png +0 -0
  88. package/app/styles/redmond-theme/images/ui-icons_d8e7f3_256x240.png +0 -0
  89. package/app/styles/redmond-theme/images/ui-icons_f9bd01_256x240.png +0 -0
  90. package/app/styles/redmond-theme/jquery-ui.css +0 -1311
  91. package/app/styles/redmond-theme/jquery-ui.min.css +0 -7
  92. package/app/styles/redmond-theme/theme.css +0 -443
  93. package/app/styles/themes.css +0 -1541
  94. package/app/styles/themes.css.map +0 -9
  95. package/app/styles/themes.scss +0 -411
  96. package/app/version.json +0 -1
  97. package/app/views/partials/attachment.html +0 -38
  98. package/app/views/partials/field-answers.html +0 -67
  99. package/app/views/partials/field-units.html +0 -24
  100. package/app/views/partials/form-controls.html +0 -19
  101. package/app/views/partials/form-header.html +0 -35
  102. package/app/views/partials/form-options.html +0 -50
  103. package/app/views/partials/form-title.html +0 -20
  104. package/app/views/partials/form-view.html +0 -13
  105. package/app/views/partials/item-options.html +0 -48
  106. package/app/views/partials/item.html +0 -126
  107. package/app/views/partials/itemPrefixAndText.html +0 -4
  108. package/app/views/partials/layout-horizontal.html +0 -156
  109. package/app/views/partials/layout-matrix.html +0 -145
  110. package/app/views/partials/popover-content.html +0 -1
  111. package/app/views/partials/repeating-button.html +0 -16
  112. package/app/views/partials/table-item.html +0 -30
  113. package/app/views/partials/template-table.html +0 -69
  114. package/app/views/partials/uib-popover-templates/uib-popover-template.html +0 -13
  115. package/app/views/partials/uib-popover-templates/uib-popover.html +0 -11
@@ -0,0 +1,121 @@
1
+ ## What is LForms?
2
+
3
+ [LForms](http://lhncbc.github.io/lforms/), a.k.a. LHC-Forms, is a feature-rich,
4
+ open-source Web Component that creates input forms, based on definition files,
5
+ for Web-based applications. In addition to its native form-definition format,
6
+ it partially supports the HL7 FHIR Questionnaire standard (SDC profile), and work
7
+ is in progress to expand that support.
8
+
9
+ It is being developed by the Lister Hill National Center for Biomedical
10
+ Communications ([LHNCBC](https://lhncbc.nlm.nih.gov)), National Library of
11
+ Medicine ([NLM](https://www.nlm.nih.gov)), part of the National Institutes of
12
+ Health ([NIH](https://www.nih.gov)), with the collaboration and support from
13
+ the [Regenstrief Institute](https://www.regenstrief.org/), Inc. and the
14
+ [LOINC](https://loinc.org/) Committee.
15
+
16
+ For features and demos, please visit the [project
17
+ page](http://lhncbc.github.io/lforms/).
18
+
19
+ ## Licensing and Copyright Notice
20
+
21
+ See [LICENSE.md](LICENSE.md).
22
+
23
+ ## Customizing and Contributing
24
+
25
+ If you wish to revise this package, the following steps will allow you to make
26
+ changes and test them:
27
+
28
+ - Install Node.js (version 14 is what we are currently using, but it should work
29
+ with later versions)
30
+ - Clone the lforms repository and cd to its directory
31
+ - `source bashrc.lforms` (make sure node dir is available at ~/)
32
+ - `npm ci`
33
+ - `source bashrc.lforms` # to add node_modules/.bin to your path
34
+ - `npm run build` # build both FHIR libs and LHC-Forms web component
35
+ - `npm run start` # starts the app we use for testing
36
+ - `npm run test` # runs the unit tests and e2e tests
37
+
38
+ If you are planning to contribute new functionality back to us, please
39
+ coordinate with us, so that the new code is in the right places, and so that
40
+ you don't accidentally add something that we are also working on.
41
+
42
+ ## Development server
43
+
44
+ - Run `npm run start` for a dev server. Navigate to `http://localhost:4200/`.
45
+ The app will automatically reload if you change any of the source files.
46
+
47
+ - Run `npm run start-public` if you need to access to the dev server from a
48
+ different machine. For example, to run Narrator from a Windows PC.
49
+
50
+ ## Build
51
+
52
+ - Run `npm run build` to build the project and generate a production version of
53
+ the js files, which are much smaller than the development version. It
54
+ generates an ES2017 version of the js files under dist/lforms. For details on
55
+ the files to load, see ["Usng the LHC-Forms Web Component"](#using).
56
+ The `dist` directory is deleted and recreated during the process.
57
+
58
+ The build also concatenates all the js files (except for zone.min.js and the
59
+ FHIR support files) into a single `lhc-forms.js` file, and it works,
60
+ but we don't currently recommend their use because the
61
+ source maps don't work with these files. Also, there is a dist/webcomponent
62
+ directory that is created with a copy of the files in dist/lforms, but that
63
+ is only needed for the tests.
64
+
65
+ ## Running tests
66
+
67
+ 1. Run `npm run test` to run unit tests and e2e tests, which also copies the
68
+ FHIR lib files and built files in places for testing.
69
+
70
+ ## Running unit tests
71
+
72
+ 1. Run `npm run test:unit` to execute the unit tests via
73
+ [Karma](https://karma-runner.github.io).
74
+
75
+ ## Running end-to-end tests
76
+
77
+ 1. Run `npm run test:e2e` to execute the end-to-end tests via
78
+ [Cypress](https://www.cypress.io/). The e2e tests are configured to use Chrome.
79
+
80
+ ## <a id="using">Using the LHC-Forms Web Component</a>
81
+
82
+ There are several script files to load. If you are building this, these files
83
+ will be under `dist/lforms`. If you are using the pre-built versions from
84
+ https://clinicaltables.nlm.nih.gov/lforms-versions, then the file paths below
85
+ are relative to those versioned directories.
86
+
87
+ 1. `webcomponent/styles.css`
88
+
89
+ You need to include the following files in your project:
90
+
91
+ 1. `webcomponent/styles.css`
92
+ 2. `webcomponent/assets/lib/zone.min.js` (unless you already have zone.min.js
93
+ on the page)
94
+ 3. `webcomponent/scripts.js`
95
+ 4. `webcomponent/runtime.js`
96
+ 5. `webcomponent/polyfills.js`
97
+ 6. `webcomponent/main.js`
98
+ 7. _One_ of the FHIR support library files, assuming you are planning to use
99
+ FHIR Questionnaires:
100
+ - `fhir/lformsFHIRAll.min.js`
101
+ - `fhir/R4/lformsFHIR.min.js`
102
+ - `fhir/STU3/lformsFHIR.min.js`
103
+
104
+ There is an example of an app using these files at
105
+ https://lhcforms.nlm.nih.gov/lforms-fhir-app/.
106
+ For details about how to work with this library, and for information about an
107
+ announcements list, see the [documentation](https://lhncbc.github.io/lforms/).
108
+
109
+ ## <a id="npm-package">lforms npm package</a>
110
+
111
+ A complete npm package that you can use with import/require statements in your
112
+ code is not ready yet. The current lforms npm package only contains built files
113
+ in `/dist/lforms` directory. You can use those files as described in above
114
+ section [Using the LHC-Forms Web Component](#using).
115
+
116
+ ## <a id="docs">Related Documents</a>
117
+ - `form_definition.md` The internal data format of the LHC-Forms widget.
118
+ - `changed-features.md` The list of features that changes between the new
119
+ version (v30.0.0) and previous versions.
120
+ - `r4-support.md` The FHIR R4 features supported by LHC-Forms widget.
121
+ - `sdc-support.md` The FHIR SDC features supported by LHC-Forms widget.