@knime/jsonforms 0.1.7 → 1.0.1

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 (223) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +71 -70
  3. package/dist/AnyOfTwinlist-B_ZhgekG.js +20 -0
  4. package/dist/BaseButton-arvXMjXG.js +112 -0
  5. package/dist/Button-Bc51Uur8.js +83 -0
  6. package/dist/Checkbox-BxPISyW3.js +75 -0
  7. package/dist/CheckboxControl-B-RyvD0K.js +42 -0
  8. package/dist/{Checkboxes-C6FkTqJJ.js → Checkboxes-COtqblKj.js} +11 -10
  9. package/dist/CheckboxesControl-YyKWzrxj.js +38 -0
  10. package/dist/ColumnFilter-bO-fKaHD.js +22 -0
  11. package/dist/ColumnSelect-D0vqxZ2B.js +65 -0
  12. package/dist/{ComboBoxControl-ZCl7sHRN.js → ComboBoxControl-CLL5eRHX.js} +127 -126
  13. package/dist/DateControl-v0qHckKz.js +27 -0
  14. package/dist/DateTimeControl-COnMFfMd.js +47 -0
  15. package/dist/DateTimeInput-ltP7o2TE.js +11059 -0
  16. package/dist/Dropdown-By1NMrXZ.js +691 -0
  17. package/dist/{DropdownControl-BFnea4SN.js → DropdownControl-Eb3G4P0X.js} +1 -1
  18. package/dist/DropdownControl.vue_vue_type_script_setup_true_lang-Cfmqdv7v.js +223 -0
  19. package/dist/ErrorMessage-fuIcc8xw.js +23 -0
  20. package/dist/FunctionButton-DBec3TQi.js +75 -0
  21. package/dist/HorizontalLayout-Dsv1qfyL.js +30 -0
  22. package/dist/InputField-BKH5rtn3.js +148 -0
  23. package/dist/IntegerControl-CBuOHc4B.js +18 -0
  24. package/dist/{IntervalControl-CsuXbPwA.js → IntervalControl-JL6QGHT2.js} +214 -216
  25. package/dist/{MultiselectListBox-BWKtEC8t.js → MultiselectListBox-Dv5n9S3f.js} +4 -3
  26. package/dist/NameFilter-oHBcHQTY.js +22 -0
  27. package/dist/NumberControl-Cwf50Oe-.js +18 -0
  28. package/dist/NumberControlBase.vue_vue_type_script_setup_true_lang-C_g1bVI2.js +42 -0
  29. package/dist/{NumberInput-84bJjfB4.js → NumberInput-DERn3NyL.js} +9 -7
  30. package/dist/OneOfDropdown-kY3PQFJX.js +32 -0
  31. package/dist/RadioControl-DsVkQLSI.js +22 -0
  32. package/dist/RadioControlBase.vue_vue_type_script_setup_true_lang-BsA00YLx.js +106 -0
  33. package/dist/{RichTextControl-DgdPhNzf.js → RichTextControl-DXH5XiAI.js} +4595 -3481
  34. package/dist/SectionLayout-BDgtf57K.js +43 -0
  35. package/dist/SimpleButtonControl-6d7wNl3P.js +58 -0
  36. package/dist/SimpleTwinlistControl-CJyR3gN8.js +48 -0
  37. package/dist/SortListControl-On9GHu_U.js +356 -0
  38. package/dist/TextAreaControl-DF_pLD80.js +108 -0
  39. package/dist/TextControl-BTZ4ONmV.js +4 -0
  40. package/dist/TextControl.vue_vue_type_script_setup_true_lang-CYfvYMWm.js +65 -0
  41. package/dist/{TimeControl-D07XI-Sl.js → TimeControl-D2j2e_nC.js} +122 -124
  42. package/dist/TwinlistControl-DcFpZrni.js +553 -0
  43. package/dist/{TwinlistLoadingInfo-DHKwC-WM.js → TwinlistLoadingInfo-CTVlN9EZ.js} +183 -175
  44. package/dist/{ValueSwitch-DXmeJXda.js → ValueSwitch-CpE1f4ie.js} +1 -1
  45. package/dist/ValueSwitchControl-BQFL8H6P.js +18 -0
  46. package/dist/VerticalLayout-D1KXulG4.js +30 -0
  47. package/dist/{VerticalLayoutBase-CI2PQj0c.js → VerticalLayoutBase-D-NdtOho.js} +2 -2
  48. package/dist/VerticalLayoutBase.vue_vue_type_style_index_0_scoped_03d90ec1_lang-BmCXzwjJ.js +13201 -0
  49. package/dist/_baseAssignValue-C56BMUo_.js +19 -0
  50. package/dist/_baseEach-1sO8_8tT.js +31 -0
  51. package/dist/_baseIsEqual-d71B2UwX.js +248 -0
  52. package/dist/_baseIteratee-BgB8cpN8.js +104 -0
  53. package/dist/_getTag-BiNJdVyP.js +314 -0
  54. package/dist/arrow-dropdown-DjUxzjqC.js +17 -0
  55. package/dist/close-h7XT0ja0.js +17 -0
  56. package/dist/floating-ui.vue.esm-CDpUY3-t.js +986 -0
  57. package/dist/getPossibleValuesFromUiSchema-BFJtj-id.js +40 -0
  58. package/dist/index-BrIvBSNK-BRWnkVln.js +685 -0
  59. package/dist/index-C1PjXAJX.js +17 -0
  60. package/dist/index-Cp7Xre_V.js +331 -0
  61. package/dist/isObject-B53jY8Qg.js +7 -0
  62. package/dist/isSymbol-DLKDpjGl.js +8 -0
  63. package/dist/knime-jsonforms.css +1 -1
  64. package/dist/knime-jsonforms.d.ts +2 -0
  65. package/dist/knime-jsonforms.js +119 -3
  66. package/dist/magic-string.es-DFyz70Kz.js +860 -0
  67. package/dist/popper-1JCni0RT.js +907 -0
  68. package/dist/reload-BhzcZRFp.js +17 -0
  69. package/dist/src/JsonFormsDialog.vue.d.ts +50 -0
  70. package/dist/src/constants/index.d.ts +2 -0
  71. package/dist/src/constants/inputFormats.d.ts +25 -0
  72. package/dist/src/constants/priorityRanks.d.ts +4 -0
  73. package/dist/src/higherOrderComponents/control/LabeledControl.vue.d.ts +31 -0
  74. package/dist/src/higherOrderComponents/control/addLabel.d.ts +6 -0
  75. package/dist/src/higherOrderComponents/control/controlToRenderer.d.ts +6 -0
  76. package/dist/src/higherOrderComponents/control/handleVisibility.d.ts +2 -0
  77. package/dist/src/higherOrderComponents/control/index.d.ts +7 -0
  78. package/dist/src/higherOrderComponents/control/types.d.ts +36 -0
  79. package/dist/src/higherOrderComponents/control/util.d.ts +44 -0
  80. package/dist/src/higherOrderComponents/index.d.ts +3 -0
  81. package/dist/src/higherOrderComponents/layout/handleVisibility.d.ts +2 -0
  82. package/dist/src/higherOrderComponents/layout/index.d.ts +4 -0
  83. package/dist/src/higherOrderComponents/layout/layoutToRenderer.d.ts +6 -0
  84. package/dist/src/higherOrderComponents/layout/types.d.ts +28 -0
  85. package/dist/src/higherOrderComponents/layout/util.d.ts +25 -0
  86. package/dist/src/higherOrderComponents/types.d.ts +25 -0
  87. package/dist/src/index.d.ts +9 -0
  88. package/dist/src/layoutComponents/Form.vue.d.ts +10 -0
  89. package/dist/src/layoutComponents/HorizontalLayout.vue.d.ts +12 -0
  90. package/dist/src/layoutComponents/SectionLayout.vue.d.ts +21 -0
  91. package/dist/src/layoutComponents/VerticalLayout.vue.d.ts +12 -0
  92. package/dist/src/layoutComponents/VerticalLayoutBase.vue.d.ts +26 -0
  93. package/dist/src/layoutComponents/index.d.ts +3 -0
  94. package/dist/src/loading/LoadingDialog.vue.d.ts +2 -0
  95. package/dist/src/renderers/checkboxRenderer.d.ts +192 -0
  96. package/dist/src/renderers/checkboxesRenderer.d.ts +7 -0
  97. package/dist/src/renderers/columnFilterRenderer.d.ts +5 -0
  98. package/dist/src/renderers/columnSelectRenderer.d.ts +209 -0
  99. package/dist/src/renderers/comboBoxRenderer.d.ts +6 -0
  100. package/dist/src/renderers/dateTimeRenderer.d.ts +5 -0
  101. package/dist/src/renderers/defaultRenderers.d.ts +1898 -0
  102. package/dist/src/renderers/dropdownRenderer.d.ts +253 -0
  103. package/dist/src/renderers/fallbackRenderers.d.ts +649 -0
  104. package/dist/src/renderers/horizontalLayoutRenderer.d.ts +48 -0
  105. package/dist/src/renderers/index.d.ts +1 -0
  106. package/dist/src/renderers/integerRenderer.d.ts +5 -0
  107. package/dist/src/renderers/intervalRenderer.d.ts +5 -0
  108. package/dist/src/renderers/localDateRenderer.d.ts +5 -0
  109. package/dist/src/renderers/localTimeRenderer.d.ts +5 -0
  110. package/dist/src/renderers/nameFilterRenderer.d.ts +5 -0
  111. package/dist/src/renderers/numberRenderer.d.ts +5 -0
  112. package/dist/src/renderers/radioRenderer.d.ts +5 -0
  113. package/dist/src/renderers/richTextRenderer.d.ts +5 -0
  114. package/dist/src/renderers/sectionLayoutRenderer.d.ts +108 -0
  115. package/dist/src/renderers/simpleButtonRenderer.d.ts +121 -0
  116. package/dist/src/renderers/sortListRenderer.d.ts +288 -0
  117. package/dist/src/renderers/textAreaRenderer.d.ts +5 -0
  118. package/dist/src/renderers/textMessageRenderer.d.ts +89 -0
  119. package/dist/src/renderers/textRenderer.d.ts +193 -0
  120. package/dist/src/renderers/twinlistRenderer.d.ts +13 -0
  121. package/dist/src/renderers/valueSwitchRenderer.d.ts +5 -0
  122. package/dist/src/renderers/verticalLayoutRenderer.d.ts +94 -0
  123. package/dist/src/types/ChoicesUiSchema.d.ts +21 -0
  124. package/dist/src/types/Control.d.ts +2 -0
  125. package/dist/src/types/alert.d.ts +5 -0
  126. package/dist/src/types/provided.d.ts +25 -0
  127. package/dist/src/uiComponents/CheckboxControl.vue.d.ts +22 -0
  128. package/dist/src/uiComponents/CheckboxesControl.vue.d.ts +12 -0
  129. package/dist/src/uiComponents/ColumnSelect.vue.d.ts +26 -0
  130. package/dist/src/uiComponents/ComboBoxControl.vue.d.ts +12 -0
  131. package/dist/src/uiComponents/DateControl.vue.d.ts +12 -0
  132. package/dist/src/uiComponents/DateTimeControl.vue.d.ts +12 -0
  133. package/dist/src/uiComponents/DropdownControl.vue.d.ts +52 -0
  134. package/dist/src/uiComponents/DynamicIcon.vue.d.ts +16 -0
  135. package/dist/src/uiComponents/ErrorMessage.vue.d.ts +23 -0
  136. package/dist/src/uiComponents/IntegerControl.vue.d.ts +12 -0
  137. package/dist/src/uiComponents/IntervalControl.vue.d.ts +12 -0
  138. package/dist/src/uiComponents/NumberControl.vue.d.ts +12 -0
  139. package/dist/src/uiComponents/NumberControlBase.vue.d.ts +19 -0
  140. package/dist/src/uiComponents/OneOfDropdown.vue.d.ts +23 -0
  141. package/dist/src/uiComponents/RadioControl.vue.d.ts +12 -0
  142. package/dist/src/uiComponents/RadioControlBase.vue.d.ts +19 -0
  143. package/dist/src/uiComponents/SimpleButtonControl.vue.d.ts +121 -0
  144. package/dist/src/uiComponents/SortListControl.vue.d.ts +93 -0
  145. package/dist/src/uiComponents/TextAreaControl.vue.d.ts +12 -0
  146. package/dist/src/uiComponents/TextControl.vue.d.ts +23 -0
  147. package/dist/src/uiComponents/TextMessageControl.vue.d.ts +12 -0
  148. package/dist/src/uiComponents/TimeControl.vue.d.ts +12 -0
  149. package/dist/src/uiComponents/ValueSwitchControl.vue.d.ts +12 -0
  150. package/dist/src/uiComponents/composables/useHideOnNull.d.ts +28 -0
  151. package/dist/src/uiComponents/composables/useProvidedState.d.ts +3 -0
  152. package/dist/src/uiComponents/index.d.ts +4 -0
  153. package/dist/src/uiComponents/loading/LoadingDropdown.vue.d.ts +12 -0
  154. package/dist/src/uiComponents/loading/TwinlistLoadingInfo.vue.d.ts +2 -0
  155. package/dist/src/uiComponents/loading/types/LoadingDropdownProps.d.ts +8 -0
  156. package/dist/src/uiComponents/richTextControl/DialogLinkModal.vue.d.ts +29 -0
  157. package/dist/src/uiComponents/richTextControl/RichTextControl.vue.d.ts +12 -0
  158. package/dist/src/uiComponents/twinlist/AnyOfTwinlist.vue.d.ts +12 -0
  159. package/dist/src/uiComponents/twinlist/ColumnFilter.vue.d.ts +13 -0
  160. package/dist/src/uiComponents/twinlist/NameFilter.vue.d.ts +13 -0
  161. package/dist/src/uiComponents/twinlist/SimpleTwinlistControl.vue.d.ts +109 -0
  162. package/dist/src/uiComponents/twinlist/TwinlistControl.vue.d.ts +67 -0
  163. package/dist/src/uiComponents/twinlist/useUnknownValuesInTwinlist.d.ts +19 -0
  164. package/dist/src/utils/getFlattenedSettings.d.ts +5 -0
  165. package/dist/src/utils/getPossibleValuesFromUiSchema.d.ts +10 -0
  166. package/dist/src/utils/index.d.ts +15 -0
  167. package/dist/src/utils/inject.d.ts +3 -0
  168. package/dist/src/utils/localTimeUtils.d.ts +16 -0
  169. package/dist/svgWithTitle-zrGi2kyc.js +18 -0
  170. package/dist/testUtils/component.d.ts +190 -0
  171. package/dist/testUtils/index.d.ts +2 -0
  172. package/dist/testUtils/renderer.d.ts +6 -0
  173. package/dist/testing.d.ts +2 -0
  174. package/dist/testing.js +18889 -0
  175. package/dist/toString-C9vll-oa.js +26 -0
  176. package/dist/useSearch-hpyYQ_6y.js +74 -0
  177. package/package.json +11 -7
  178. package/dist/AnyOfTwinlist-BAbzoFfn.js +0 -17
  179. package/dist/ArrayLayout-Cfdlkm_T.js +0 -487
  180. package/dist/ButtonControl-yAb2GdQI.js +0 -127
  181. package/dist/CheckboxControl-Ck45Jycu.js +0 -50
  182. package/dist/CheckboxesControl-Xx9tpOL6.js +0 -39
  183. package/dist/ColumnFilter-u7yVpuFC.js +0 -17
  184. package/dist/ColumnSelect-DfXHTA0Z.js +0 -60
  185. package/dist/CredentialsControl-D1Te47JG.js +0 -20
  186. package/dist/CredentialsControlBase-Dqhh-4hT.js +0 -110
  187. package/dist/DateControl-CuV2lKvs.js +0 -30
  188. package/dist/DateTimeControl-BDZ18Hzl.js +0 -4
  189. package/dist/DropdownControl.vue_vue_type_script_setup_true_lang-BRWvAXuk.js +0 -171
  190. package/dist/DynamicValuesControl-BgNPwoHm.js +0 -127
  191. package/dist/FileChooserControl-HX_GjlNB.js +0 -605
  192. package/dist/FileExplorerTab-FjmnUl9M.js +0 -3951
  193. package/dist/HorizontalLayout-BrHkxvnP.js +0 -39
  194. package/dist/IntegerControl-Dxk1Y8LA.js +0 -13
  195. package/dist/LayoutComponentWrapper-VvzxL4qE.js +0 -36
  196. package/dist/LegacyCredentialsControl-p5U7Vp0h.js +0 -62
  197. package/dist/LocalFileChooserControl-Cr0A0dg6.js +0 -57
  198. package/dist/MenuItems.vue_vue_type_style_index_0_lang-BiJVA2Wt.js +0 -464
  199. package/dist/NameFilter-CsfBC6e2.js +0 -17
  200. package/dist/NodeDialog.vue.d.ts +0 -8
  201. package/dist/NumberControl-BJCFqjn3.js +0 -13
  202. package/dist/NumberControlBase.vue_vue_type_script_setup_true_lang-DkAPaKAi.js +0 -43
  203. package/dist/OneOfDropdown-CBLlPlxh.js +0 -15
  204. package/dist/RadioControl-BZEV6NYx.js +0 -13
  205. package/dist/RadioControlBase.vue_vue_type_script_setup_true_lang-DvA87Y4C.js +0 -128
  206. package/dist/SectionLayout-DtVREvcv.js +0 -54
  207. package/dist/SimpleButtonControl-D2kCPiU9.js +0 -59
  208. package/dist/SimpleTwinlistControl-D6E8DEoD.js +0 -68
  209. package/dist/SortListControl-DcW5Ofs5.js +0 -316
  210. package/dist/TextAreaControl-DTw_oBDS.js +0 -111
  211. package/dist/TextControl-BlfySQDC.js +0 -49
  212. package/dist/TwinlistControl-BqoP2Kbq.js +0 -587
  213. package/dist/ValueSwitchControl-CyDbUKLv.js +0 -13
  214. package/dist/VennDiagramLayout-DXH6CUzc.js +0 -104
  215. package/dist/VerticalLayout-CTFSrGS8.js +0 -39
  216. package/dist/arrow-up-Dsq3EgtE.js +0 -30
  217. package/dist/floating-ui.vue.esm-D_FlISFP.js +0 -94
  218. package/dist/getFlattenedSettings-D64OwqpI.js +0 -7
  219. package/dist/index-1mTLieVA.js +0 -32714
  220. package/dist/index.d.ts +0 -3
  221. package/dist/layoutComponents/Form.vue.d.ts +0 -2
  222. package/dist/link-BA69Hfx6.js +0 -17
  223. package/dist/loading/LoadingDialog.vue.d.ts +0 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @knime/json-forms
2
2
 
3
+ ## 1.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [03f69d0]
8
+ - @knime/components@1.15.1
9
+ - @knime/rich-text-editor@1.3.8
10
+
11
+ ## 1.0.0
12
+
13
+ ### Major Changes
14
+
15
+ - ff330d9: Export JsonFormsDialog and associated renderers with minimal capabilities. Renderers come in two ways: Controls and layouts. This package also exposes the utilities and types to write, adjust and test controls and layouts.
16
+
3
17
  ## 0.1.7
4
18
 
5
19
  ### Patch Changes
package/README.md CHANGED
@@ -1,112 +1,117 @@
1
- # ![Image](https://www.knime.com/files/knime_logo_github_40x40_4layers.png) KNIME JSONForms integration
2
-
3
- # TODO: this is a copy from core-ui, needs to be adjusted yet 🚨🚨
1
+ # ![Image](https://www.knime.com/sites/default/files/knime_logo_github_40x40_4layers.png) KNIME JSONForms integration
4
2
 
5
3
  This repository contains the frontend components of the KNIME JSONForms integration that is based on [Vue].
6
- It are built as a [Vue library] and used in KNIME Analytics Platform and/or KNIME Hub.
4
+ It is built as a [Vue library] and used in KNIME Analytics Platform and/or KNIME Hub.
7
5
 
8
- ## Development
6
+ ## Installation
9
7
 
10
- ### Prerequisites
8
+ To install the `@knime/jsonforms` package, you can use npm:
11
9
 
12
- - Install [Node.js][node], see version in [package.json](package.json).
10
+ ```bash
11
+ npm install @knime/jsonforms
12
+ ```
13
13
 
14
- Newer versions may also work, but have not been tested.
14
+ ## Usage
15
15
 
16
- ### Install dependencies
16
+ The vue component controlling the JSONForms instance can be imported as follows:
17
17
 
18
- ```sh
19
- npm install
18
+ ```javascript
19
+ import { JsonFormsDialog } from "@knime/jsonforms";
20
20
  ```
21
21
 
22
- and then use the following commands. For detailed explanations see [Vue CLI docs]:
22
+ It requires renderers as property, which can be constructed using a variety of defaults.
23
23
 
24
- ### Git hooks
24
+ Those default components are divided into layouts and controls:
25
25
 
26
- When committing your changes, a couple of commit hooks will run via [husky].
26
+ ```javascript
27
+ import { controls, layouts } from "@jsonforms/testing";
28
+ ```
27
29
 
28
- - `pre-commit` hook to lint and format the changes in your stage zone (via [lintstaged])
29
- - `prepare-commit-msg` hook to format your commit message to conform with the required format by KNIME. In order for this to work you must set environment variables with your Atlassian email and API token. Refer to `@knime/eslint-config/scripts/README.md` for more information.
30
+ Use the `toRenderers` method to construct the final list of renderers once the chosen controls/layouts are modified in the desired way. A modification might entail replacing the tester by which this renderer is used by jsonforms or wrapping a control using higher order vue components.
31
+
32
+ Combined example:
33
+
34
+ ```vue
35
+ <script setup lang="ts">
36
+ import {
37
+ controls,
38
+ layouts,
39
+ JsonFormsDialog
40
+ toRenderers
41
+ } from "@knime/jsonforms"
42
+
43
+
44
+ const renderers = toRenderers([/**
45
+ Add newly constructed renderers here
46
+ */], [
47
+ controls.dropdownRenderer,
48
+ controls.textRenderer
49
+ ], [
50
+ layouts.sectionRenderer
51
+ ])
52
+ </script>
53
+ <template>
54
+ <JsonFormsDialog :data="..." ... :renderers="renderers" />
55
+ </template>
56
+ ```
30
57
 
31
58
  ### Testing
32
59
 
33
- #### Running unit tests
34
-
35
- This project contains unit tests written with [vitest]. They are run with
60
+ Types and utility methods for testing are made available in the following way:
36
61
 
37
- ```sh
38
- npm run test
39
- ```
40
-
41
- or one can run unit- and integration-tests individually by
42
-
43
- ```sh
44
- npm run test:unit
45
- npm run test:integration
62
+ ```javascript
63
+ import * from "@knime/jsonforms/testing"
46
64
  ```
47
65
 
48
- You can generate a coverage report with
66
+ ## Development
49
67
 
50
- ```sh
51
- npm run coverage
52
- ```
68
+ ### Prerequisites
53
69
 
54
- The output can be found in the `coverage` folder. It contains a browseable html report as well as raw coverage data in
55
- [LCOV] and [Clover] format, which can be used in analysis software (SonarQube, Jenkins, …).
70
+ - Install [Node.js][node], see version in [package.json](package.json).
56
71
 
57
- ### Running security audit
72
+ Newer versions may also work, but have not been tested.
58
73
 
59
- npm provides a check against known security issues of used dependencies. Run it by calling
74
+ ### Install dependencies
60
75
 
61
76
  ```sh
62
- npm run audit
77
+ pnpm install
63
78
  ```
64
79
 
65
- ### Logging
66
-
67
- You can log using the global `consola` variable (which the embedding application needs to provide).
68
-
69
- See https://github.com/nuxt/consola for details.
80
+ and then use the following commands. For detailed explanations see [Vue CLI docs]:
70
81
 
71
- ## Building
82
+ ## Testing
72
83
 
73
- To build all views and dialogs, use the following command:
84
+ Run unit- and integration-tests individually by
74
85
 
75
86
  ```sh
76
- npm run build
87
+ pnpm test:unit
88
+ pnpm test:integration
77
89
  ```
78
90
 
79
- To build a single item, use e.g. the following command:
91
+ You can generate a coverage report with
80
92
 
81
93
  ```sh
82
- npm run build:TableView
94
+ pnpm coverage:unit
95
+ pnpm coverage:integration
83
96
  ```
84
97
 
85
- Results are saved to `/dist`.
98
+ The output can be found in the `coverage` folder. It contains a browseable html report as well as raw coverage data in
99
+ [LCOV] and [Clover] format, which can be used in analysis software (SonarQube, Jenkins, …).
100
+
101
+ ### Running security audit
86
102
 
87
- This project can also be built via a maven build wrapper
103
+ npm provides a check against known security issues of used dependencies. Run it by calling
88
104
 
89
105
  ```sh
90
- mvn clean install
106
+ pnpm audit
91
107
  ```
92
108
 
93
- ## Embedding the views in apps
94
-
95
- The views can be used in Vue/Nuxt apps like a regular Vue component, e.g. loaded asynchronously.
96
-
97
- ### Requirements
98
-
99
- The views expect that the embedding app provides the following:
100
-
101
- - Vue and Consola compatible to the versions defined in [`package.json`](package.json)
102
- - global `window.consola` instance for logging
103
- - CSS variables as defined in the `@knime/styles` project.
104
- They are not included in the build in order to avoid duplication.
109
+ ## Building
105
110
 
106
- ### Usage example
111
+ To build the package, use the following command:
107
112
 
108
- ```
109
- <TableView>
113
+ ```sh
114
+ pnpm build
110
115
  ```
111
116
 
112
117
  # Join the Community!
@@ -115,11 +120,7 @@ The views expect that the embedding app provides the following:
115
120
 
116
121
  [Vue]: https://vuejs.org/
117
122
  [node]: https://knime-com.atlassian.net/wiki/spaces/SPECS/pages/905281540/Node.js+Installation
118
- [Java]: https://www.oracle.com/technetwork/java/javase/downloads/index.html
119
123
  [Vue CLI docs]: https://cli.vuejs.org/guide/
120
- [Vue libraries]: https://cli.vuejs.org/guide/build-targets.html#library
121
- [vitest]: https://vitest.dev/
124
+ [Vue library]: https://cli.vuejs.org/guide/build-targets.html#library
122
125
  [LCOV]: https://github.com/linux-test-project/lcov
123
126
  [Clover]: http://openclover.org/
124
- [husky]: https://www.npmjs.com/package/husky
125
- [lintstaged]: https://github.com/okonet/lint-staged
@@ -0,0 +1,20 @@
1
+ import { defineComponent as n, openBlock as r, createBlock as t, mergeProps as p } from "vue";
2
+ import { o as a } from "./index-C1PjXAJX.js";
3
+ import s from "./SimpleTwinlistControl-CJyR3gN8.js";
4
+ const f = /* @__PURE__ */ n({
5
+ __name: "AnyOfTwinlist",
6
+ props: {
7
+ control: {},
8
+ handleChange: { type: Function },
9
+ changeValue: { type: Function },
10
+ disabled: { type: Boolean },
11
+ labelForId: {}
12
+ },
13
+ setup(i) {
14
+ const e = (o) => o.schema.anyOf.map(a);
15
+ return (o, l) => (r(), t(s, p(o.$props, { "options-generator": e }), null, 16));
16
+ }
17
+ });
18
+ export {
19
+ f as default
20
+ };
@@ -0,0 +1,112 @@
1
+ import { defineComponent as i, useSlots as l, h as a, getCurrentInstance as c, openBlock as f, createBlock as p, resolveDynamicComponent as m, mergeProps as d, withCtx as h, renderSlot as C } from "vue";
2
+ import { _ as k } from "./VerticalLayoutBase.vue_vue_type_style_index_0_scoped_03d90ec1_lang-BmCXzwjJ.js";
3
+ const u = () => {
4
+ const t = c();
5
+ return t == null ? void 0 : t.appContext.app;
6
+ }, $ = () => {
7
+ const t = u(), e = t == null ? void 0 : t.component("ClientOnly");
8
+ return e || i({
9
+ render() {
10
+ var r, n;
11
+ return (n = (r = l()).default) == null ? void 0 : n.call(r);
12
+ }
13
+ });
14
+ }, b = () => {
15
+ const t = u(), e = t == null ? void 0 : t.component("NuxtLink");
16
+ if (e)
17
+ return e;
18
+ const o = t == null ? void 0 : t.component("RouterLink");
19
+ return o || i({
20
+ props: {
21
+ to: {
22
+ type: String,
23
+ default: ""
24
+ }
25
+ },
26
+ render() {
27
+ var n, s;
28
+ return a("a", { href: this.to }, [(s = (n = l()).default) == null ? void 0 : s.call(n)]);
29
+ }
30
+ });
31
+ }, y = i({
32
+ name: "BaseButton",
33
+ props: {
34
+ /**
35
+ * If set, the button renders an <a> element instead of a <button> element
36
+ * Has no effect when used together with `to`.
37
+ */
38
+ href: {
39
+ type: String,
40
+ default: ""
41
+ },
42
+ /**
43
+ * If set, the button renders a <nuxt-link> instead of a <button> element.
44
+ * Supersedes the `href` property.
45
+ */
46
+ to: {
47
+ type: String,
48
+ default: ""
49
+ },
50
+ /**
51
+ * toggle to prevent default click handler
52
+ */
53
+ preventDefault: {
54
+ type: Boolean,
55
+ default: !1
56
+ },
57
+ disabled: {
58
+ type: Boolean,
59
+ default: !1
60
+ }
61
+ },
62
+ emits: ["click"],
63
+ computed: {
64
+ // TODO: Can be made into a composition function
65
+ component() {
66
+ return this.to ? b() : this.href ? "a" : "button";
67
+ },
68
+ dynamicProps() {
69
+ return this.to ? {
70
+ to: this.to,
71
+ event: this.preventDefault ? [] : "click"
72
+ } : this.href ? {
73
+ href: this.href
74
+ } : {};
75
+ }
76
+ },
77
+ methods: {
78
+ onClick(t) {
79
+ this.$emit("click", t), this.preventDefault && t.preventDefault();
80
+ },
81
+ /**
82
+ * This can be called from outside via focus on a $ref
83
+ */
84
+ focus() {
85
+ var t;
86
+ (t = this.getComponent()) == null || t.focus();
87
+ },
88
+ /**
89
+ * This can be called from outside via getComponent on a $ref
90
+ */
91
+ getComponent() {
92
+ return this.$refs.button;
93
+ }
94
+ }
95
+ });
96
+ function B(t, e, o, r, n, s) {
97
+ return f(), p(m(t.component), d(t.dynamicProps, {
98
+ ref: "button",
99
+ disabled: t.disabled ? "disabled" : null,
100
+ onClick: t.onClick
101
+ }), {
102
+ default: h(() => [
103
+ C(t.$slots, "default")
104
+ ]),
105
+ _: 3
106
+ }, 16, ["disabled", "onClick"]);
107
+ }
108
+ const D = /* @__PURE__ */ k(y, [["render", B]]);
109
+ export {
110
+ D as B,
111
+ $ as r
112
+ };
@@ -0,0 +1,83 @@
1
+ import { defineComponent as o, resolveComponent as a, openBlock as s, createBlock as n, normalizeClass as r, withCtx as l, renderSlot as d } from "vue";
2
+ import { B as i } from "./BaseButton-arvXMjXG.js";
3
+ import { _ as p } from "./VerticalLayoutBase.vue_vue_type_style_index_0_scoped_03d90ec1_lang-BmCXzwjJ.js";
4
+ const c = o({
5
+ name: "Button",
6
+ components: {
7
+ BaseButton: i
8
+ },
9
+ props: {
10
+ /**
11
+ * @see {@link BaseButton.vue}
12
+ */
13
+ /**
14
+ * show button with border
15
+ */
16
+ withBorder: {
17
+ type: Boolean,
18
+ default: !1
19
+ },
20
+ /**
21
+ * switches colors to use button on a dark background
22
+ */
23
+ onDark: {
24
+ type: Boolean,
25
+ default: !1
26
+ },
27
+ /**
28
+ * switches colors
29
+ */
30
+ primary: {
31
+ type: Boolean,
32
+ default: !1
33
+ },
34
+ /**
35
+ * smaller font size and padding
36
+ */
37
+ compact: {
38
+ type: Boolean,
39
+ default: !1
40
+ },
41
+ /**
42
+ * show button in an error state
43
+ * - requires withBorder
44
+ * - doesnt work onDark
45
+ */
46
+ withWarning: {
47
+ type: Boolean,
48
+ default: !1
49
+ },
50
+ disabled: {
51
+ type: Boolean,
52
+ default: !1
53
+ }
54
+ },
55
+ computed: {
56
+ classes() {
57
+ return [
58
+ "button",
59
+ { primary: this.primary },
60
+ { "with-border": this.withBorder },
61
+ { "with-warning": this.withWarning },
62
+ { "on-dark": this.onDark },
63
+ { compact: this.compact }
64
+ ];
65
+ }
66
+ }
67
+ });
68
+ function f(e, m, B, u, h, _) {
69
+ const t = a("BaseButton");
70
+ return s(), n(t, {
71
+ class: r(e.classes),
72
+ disabled: e.disabled
73
+ }, {
74
+ default: l(() => [
75
+ d(e.$slots, "default")
76
+ ]),
77
+ _: 3
78
+ }, 8, ["class", "disabled"]);
79
+ }
80
+ const k = /* @__PURE__ */ p(c, [["render", f], ["__scopeId", "data-v-4d1f9e2d"]]);
81
+ export {
82
+ k as B
83
+ };
@@ -0,0 +1,75 @@
1
+ import { openBlock as i, createElementBlock as s, normalizeClass as o, createElementVNode as d, renderSlot as u } from "vue";
2
+ import { _ as c } from "./VerticalLayoutBase.vue_vue_type_style_index_0_scoped_03d90ec1_lang-BmCXzwjJ.js";
3
+ const r = {
4
+ name: "Checkbox",
5
+ props: {
6
+ id: {
7
+ type: String,
8
+ default: null
9
+ },
10
+ name: {
11
+ type: String,
12
+ default: null
13
+ },
14
+ modelValue: {
15
+ type: Boolean,
16
+ default: !1
17
+ },
18
+ disabled: {
19
+ default: !1,
20
+ type: Boolean
21
+ },
22
+ invalid: {
23
+ type: Boolean,
24
+ default: !1
25
+ },
26
+ /**
27
+ * Controls the size of the label
28
+ * supported values:
29
+ * - regular
30
+ * - large
31
+ */
32
+ labelSize: {
33
+ type: String,
34
+ default: "regular",
35
+ validator: (e) => ["regular", "large"].includes(e)
36
+ }
37
+ },
38
+ emits: ["update:modelValue"],
39
+ computed: {
40
+ classes() {
41
+ return ["checkbox", this.labelSize, { disabled: this.disabled }];
42
+ }
43
+ },
44
+ methods: {
45
+ onInput(e) {
46
+ let { checked: l } = e.target;
47
+ consola.trace("Checkbox value changed to", l), this.$emit("update:modelValue", l);
48
+ },
49
+ isChecked() {
50
+ return this.$refs.input.checked;
51
+ }
52
+ }
53
+ }, m = ["id", "name", "checked", "disabled"];
54
+ function f(e, l, a, h, p, t) {
55
+ return i(), s("label", {
56
+ class: o([t.classes, { invalid: a.invalid }])
57
+ }, [
58
+ d("input", {
59
+ id: a.id,
60
+ ref: "input",
61
+ name: a.name,
62
+ checked: a.modelValue,
63
+ disabled: a.disabled,
64
+ type: "checkbox",
65
+ onChange: l[0] || (l[0] = (...n) => t.onInput && t.onInput(...n))
66
+ }, null, 40, m),
67
+ d("span", null, [
68
+ u(e.$slots, "default", {}, void 0, !0)
69
+ ])
70
+ ], 2);
71
+ }
72
+ const _ = /* @__PURE__ */ c(r, [["render", f], ["__scopeId", "data-v-975ea421"]]);
73
+ export {
74
+ _ as C
75
+ };
@@ -0,0 +1,42 @@
1
+ import { defineComponent as n, ref as s, openBlock as d, createElementBlock as u, createVNode as l, unref as p, withCtx as i, createTextVNode as c, toDisplayString as m, renderSlot as t } from "vue";
2
+ import { E as v } from "./ErrorMessage-fuIcc8xw.js";
3
+ import { C as b } from "./Checkbox-BxPISyW3.js";
4
+ import { _ as f } from "./VerticalLayoutBase.vue_vue_type_style_index_0_scoped_03d90ec1_lang-BmCXzwjJ.js";
5
+ const h = /* @__PURE__ */ n({
6
+ __name: "CheckboxControl",
7
+ props: {
8
+ control: {},
9
+ handleChange: { type: Function },
10
+ changeValue: { type: Function },
11
+ disabled: { type: Boolean },
12
+ labelForId: {}
13
+ },
14
+ setup(C) {
15
+ const r = s(!1);
16
+ return (e, o) => (d(), u("div", {
17
+ class: "checkbox-input",
18
+ onMouseover: o[0] || (o[0] = (a) => r.value = !0),
19
+ onMouseleave: o[1] || (o[1] = (a) => r.value = !1)
20
+ }, [
21
+ l(p(b), {
22
+ class: "checkbox",
23
+ disabled: e.disabled,
24
+ "model-value": e.control.data,
25
+ "onUpdate:modelValue": e.changeValue
26
+ }, {
27
+ default: i(() => [
28
+ c(m(e.control.label) + " ", 1),
29
+ t(e.$slots, "icon", {}, void 0, !0)
30
+ ]),
31
+ _: 3
32
+ }, 8, ["disabled", "model-value", "onUpdate:modelValue"]),
33
+ t(e.$slots, "buttons", { hover: r.value }, void 0, !0),
34
+ l(v, {
35
+ error: e.control.errors
36
+ }, null, 8, ["error"])
37
+ ], 32));
38
+ }
39
+ }), $ = /* @__PURE__ */ f(h, [["__scopeId", "data-v-eb89a692"]]);
40
+ export {
41
+ $ as default
42
+ };
@@ -1,9 +1,10 @@
1
- import { _ as c, m as u } from "./index-1mTLieVA.js";
2
- import { resolveComponent as f, openBlock as o, createElementBlock as s, normalizeClass as m, Fragment as h, renderList as p, createBlock as x, withCtx as b, createTextVNode as V, toDisplayString as y } from "vue";
1
+ import { C as c } from "./Checkbox-BxPISyW3.js";
2
+ import { resolveComponent as u, openBlock as o, createElementBlock as s, normalizeClass as f, Fragment as m, renderList as h, createBlock as p, withCtx as x, createTextVNode as b, toDisplayString as V } from "vue";
3
+ import { _ as y } from "./VerticalLayoutBase.vue_vue_type_style_index_0_scoped_03d90ec1_lang-BmCXzwjJ.js";
3
4
  const _ = {
4
5
  name: "Checkboxes",
5
6
  components: {
6
- Checkbox: u
7
+ Checkbox: c
7
8
  },
8
9
  props: {
9
10
  /**
@@ -75,11 +76,11 @@ const _ = {
75
76
  }
76
77
  };
77
78
  function k(e, a, t, r, v, d) {
78
- const i = f("Checkbox");
79
+ const i = u("Checkbox");
79
80
  return o(), s("div", {
80
- class: m(["checkboxes", t.alignment])
81
+ class: f(["checkboxes", t.alignment])
81
82
  }, [
82
- (o(!0), s(h, null, p(t.possibleValues, (l) => (o(), x(i, {
83
+ (o(!0), s(m, null, h(t.possibleValues, (l) => (o(), p(i, {
83
84
  ref_for: !0,
84
85
  ref: "boxes",
85
86
  key: `checkboxes-${l.id}`,
@@ -90,14 +91,14 @@ function k(e, a, t, r, v, d) {
90
91
  class: "box",
91
92
  "onUpdate:modelValue": (n) => d.onUpdateModelValue(l.id, n)
92
93
  }, {
93
- default: b(() => [
94
- V(y(l.text), 1)
94
+ default: x(() => [
95
+ b(V(l.text), 1)
95
96
  ]),
96
97
  _: 2
97
98
  }, 1032, ["model-value", "title", "invalid", "disabled", "onUpdate:modelValue"]))), 128))
98
99
  ], 2);
99
100
  }
100
- const A = /* @__PURE__ */ c(_, [["render", k], ["__scopeId", "data-v-565cb857"]]);
101
+ const B = /* @__PURE__ */ y(_, [["render", k], ["__scopeId", "data-v-565cb857"]]);
101
102
  export {
102
- A as C
103
+ B as C
103
104
  };
@@ -0,0 +1,38 @@
1
+ import { defineComponent as t, computed as s, ref as c, onMounted as r, openBlock as d, createBlock as p, unref as u, createCommentVNode as m } from "vue";
2
+ import { o as i } from "./index-C1PjXAJX.js";
3
+ import { C as b } from "./Checkboxes-COtqblKj.js";
4
+ import { _ as h } from "./VerticalLayoutBase.vue_vue_type_style_index_0_scoped_03d90ec1_lang-BmCXzwjJ.js";
5
+ const f = /* @__PURE__ */ t({
6
+ __name: "CheckboxesControl",
7
+ props: {
8
+ control: {},
9
+ handleChange: { type: Function },
10
+ changeValue: { type: Function },
11
+ disabled: { type: Boolean },
12
+ labelForId: {}
13
+ },
14
+ setup(n) {
15
+ const a = n, l = s(
16
+ () => {
17
+ var e;
18
+ return (e = a.control.uischema.options) == null ? void 0 : e.checkboxLayout;
19
+ }
20
+ ), o = c(null);
21
+ return r(() => {
22
+ var e;
23
+ o.value = (e = a.control.schema.anyOf) == null ? void 0 : e.map(i);
24
+ }), (e, v) => o.value ? (d(), p(u(b), {
25
+ key: 0,
26
+ id: e.labelForId,
27
+ class: "checkboxes",
28
+ "possible-values": o.value,
29
+ alignment: l.value,
30
+ disabled: e.disabled,
31
+ "model-value": e.control.data,
32
+ "onUpdate:modelValue": e.changeValue
33
+ }, null, 8, ["id", "possible-values", "alignment", "disabled", "model-value", "onUpdate:modelValue"])) : m("", !0);
34
+ }
35
+ }), y = /* @__PURE__ */ h(f, [["__scopeId", "data-v-d9491213"]]);
36
+ export {
37
+ y as default
38
+ };
@@ -0,0 +1,22 @@
1
+ import { defineComponent as e, openBlock as o, createBlock as t, mergeProps as l } from "vue";
2
+ import r from "./TwinlistControl-DcFpZrni.js";
3
+ const i = /* @__PURE__ */ e({
4
+ __name: "ColumnFilter",
5
+ props: {
6
+ control: {},
7
+ handleChange: { type: Function },
8
+ changeValue: { type: Function },
9
+ disabled: { type: Boolean },
10
+ labelForId: {}
11
+ },
12
+ setup(a) {
13
+ return (n, s) => (o(), t(r, l({ ...n.$props, ...n.$attrs }, {
14
+ "unknown-values-text": "Any unknown column",
15
+ "show-unknown-values": "",
16
+ "empty-state-label": "No columns in this list"
17
+ }), null, 16));
18
+ }
19
+ });
20
+ export {
21
+ i as default
22
+ };