@datagrok/helm 2.13.7 → 3.0.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 (349) hide show
  1. package/CREDITS.md +164 -0
  2. package/dist/489.js +2 -0
  3. package/dist/489.js.map +1 -0
  4. package/dist/package-test.js +1 -1
  5. package/dist/package-test.js.map +1 -1
  6. package/dist/package.js +1 -1
  7. package/dist/package.js.map +1 -1
  8. package/files/samples/helm-showcase.csv +56 -0
  9. package/package.json +6 -10
  10. package/src/helm-helper.ts +61 -413
  11. package/src/package-api.ts +14 -11
  12. package/src/package-test.ts +0 -2
  13. package/src/package-utils.ts +8 -298
  14. package/src/package.g.ts +2 -8
  15. package/src/package.ts +11 -31
  16. package/src/tests/helm-activity-cliffs.ts +2 -2
  17. package/src/tests/helm-input-tests.ts +83 -0
  18. package/src/tests/parse-helm-tests.ts +7 -57
  19. package/src/tests/properties-widget-tests.ts +21 -11
  20. package/src/utils/helm-grid-cell-renderer.ts +141 -151
  21. package/src/utils/index.ts +3 -7
  22. package/src/widgets/helm-input.ts +42 -12
  23. package/src/widgets/properties-widget.ts +18 -11
  24. package/test-console-output-1.log +103 -706
  25. package/test-record-1.mp4 +0 -0
  26. package/webpack.config.js +1 -12
  27. package/dist/455.js +0 -2
  28. package/dist/455.js.map +0 -1
  29. package/dist/package-dojo.js +0 -2
  30. package/dist/package-dojo.js.map +0 -1
  31. package/helm/JSDraw/Pistoia.HELM-uncompressed.js +0 -9694
  32. package/helm/JSDraw/ReadMe.txt +0 -8
  33. package/helm/JSDraw/Scilligence.JSDraw2.Lite-uncompressed.js +0 -31126
  34. package/helm/dojo/package.ts +0 -41
  35. package/helm/dojo/types.ts +0 -12
  36. package/src/helm-web-editor.ts +0 -68
  37. package/src/tests/get-monomer-tests.ts +0 -214
  38. package/src/tests/helm-service-tests.ts +0 -98
  39. package/src/types/dojo.ts +0 -3
  40. package/src/types/index.ts +0 -5
  41. package/src/utils/get-monomer.ts +0 -90
  42. package/src/utils/helm-service.ts +0 -166
  43. package/vendor/dojo-1.10.10/dijit/BackgroundIframe.js +0 -63
  44. package/vendor/dojo-1.10.10/dijit/BackgroundIframe.js.uncompressed.js +0 -116
  45. package/vendor/dojo-1.10.10/dijit/Destroyable.js +0 -35
  46. package/vendor/dojo-1.10.10/dijit/Destroyable.js.uncompressed.js +0 -83
  47. package/vendor/dojo-1.10.10/dijit/Tooltip.js +0 -240
  48. package/vendor/dojo-1.10.10/dijit/Tooltip.js.uncompressed.js +0 -612
  49. package/vendor/dojo-1.10.10/dijit/Viewport.js +0 -44
  50. package/vendor/dojo-1.10.10/dijit/Viewport.js.uncompressed.js +0 -87
  51. package/vendor/dojo-1.10.10/dijit/WidgetSet.js +0 -76
  52. package/vendor/dojo-1.10.10/dijit/WidgetSet.js.uncompressed.js +0 -247
  53. package/vendor/dojo-1.10.10/dijit/_AttachMixin.js +0 -94
  54. package/vendor/dojo-1.10.10/dijit/_AttachMixin.js.uncompressed.js +0 -238
  55. package/vendor/dojo-1.10.10/dijit/_Contained.js +0 -17
  56. package/vendor/dojo-1.10.10/dijit/_Contained.js.uncompressed.js +0 -56
  57. package/vendor/dojo-1.10.10/dijit/_Container.js +0 -47
  58. package/vendor/dojo-1.10.10/dijit/_Container.js.uncompressed.js +0 -108
  59. package/vendor/dojo-1.10.10/dijit/_CssStateMixin.js +0 -198
  60. package/vendor/dojo-1.10.10/dijit/_CssStateMixin.js.uncompressed.js +0 -372
  61. package/vendor/dojo-1.10.10/dijit/_FocusMixin.js +0 -11
  62. package/vendor/dojo-1.10.10/dijit/_FocusMixin.js.uncompressed.js +0 -66
  63. package/vendor/dojo-1.10.10/dijit/_HasDropDown.js +0 -188
  64. package/vendor/dojo-1.10.10/dijit/_HasDropDown.js.uncompressed.js +0 -472
  65. package/vendor/dojo-1.10.10/dijit/_OnDijitClickMixin.js +0 -8
  66. package/vendor/dojo-1.10.10/dijit/_OnDijitClickMixin.js.uncompressed.js +0 -31
  67. package/vendor/dojo-1.10.10/dijit/_TemplatedMixin.js +0 -90
  68. package/vendor/dojo-1.10.10/dijit/_TemplatedMixin.js.uncompressed.js +0 -205
  69. package/vendor/dojo-1.10.10/dijit/_Widget.js +0 -66
  70. package/vendor/dojo-1.10.10/dijit/_Widget.js.uncompressed.js +0 -352
  71. package/vendor/dojo-1.10.10/dijit/_WidgetBase.js +0 -353
  72. package/vendor/dojo-1.10.10/dijit/_WidgetBase.js.uncompressed.js +0 -1200
  73. package/vendor/dojo-1.10.10/dijit/_base/focus.js +0 -68
  74. package/vendor/dojo-1.10.10/dijit/_base/focus.js.uncompressed.js +0 -207
  75. package/vendor/dojo-1.10.10/dijit/_base/manager.js +0 -10
  76. package/vendor/dojo-1.10.10/dijit/_base/manager.js.uncompressed.js +0 -35
  77. package/vendor/dojo-1.10.10/dijit/_base/place.js +0 -52
  78. package/vendor/dojo-1.10.10/dijit/_base/place.js.uncompressed.js +0 -131
  79. package/vendor/dojo-1.10.10/dijit/_base/popup.js +0 -23
  80. package/vendor/dojo-1.10.10/dijit/_base/popup.js.uncompressed.js +0 -58
  81. package/vendor/dojo-1.10.10/dijit/_base/scroll.js +0 -6
  82. package/vendor/dojo-1.10.10/dijit/_base/scroll.js.uncompressed.js +0 -22
  83. package/vendor/dojo-1.10.10/dijit/_base/sniff.js +0 -3
  84. package/vendor/dojo-1.10.10/dijit/_base/sniff.js.uncompressed.js +0 -12
  85. package/vendor/dojo-1.10.10/dijit/_base/typematic.js +0 -3
  86. package/vendor/dojo-1.10.10/dijit/_base/typematic.js.uncompressed.js +0 -10
  87. package/vendor/dojo-1.10.10/dijit/_base/wai.js +0 -32
  88. package/vendor/dojo-1.10.10/dijit/_base/wai.js.uncompressed.js +0 -109
  89. package/vendor/dojo-1.10.10/dijit/_base/window.js +0 -6
  90. package/vendor/dojo-1.10.10/dijit/_base/window.js.uncompressed.js +0 -18
  91. package/vendor/dojo-1.10.10/dijit/_base.js +0 -4
  92. package/vendor/dojo-1.10.10/dijit/_base.js.uncompressed.js +0 -27
  93. package/vendor/dojo-1.10.10/dijit/a11y.js +0 -109
  94. package/vendor/dojo-1.10.10/dijit/a11y.js.uncompressed.js +0 -191
  95. package/vendor/dojo-1.10.10/dijit/a11yclick.js +0 -66
  96. package/vendor/dojo-1.10.10/dijit/a11yclick.js.uncompressed.js +0 -139
  97. package/vendor/dojo-1.10.10/dijit/focus.js +0 -188
  98. package/vendor/dojo-1.10.10/dijit/focus.js.uncompressed.js +0 -371
  99. package/vendor/dojo-1.10.10/dijit/form/Button.js +0 -49
  100. package/vendor/dojo-1.10.10/dijit/form/Button.js.uncompressed.js +0 -130
  101. package/vendor/dojo-1.10.10/dijit/form/ComboBox.js +0 -4
  102. package/vendor/dojo-1.10.10/dijit/form/ComboBox.js.uncompressed.js +0 -27
  103. package/vendor/dojo-1.10.10/dijit/form/ComboButton.js +0 -21
  104. package/vendor/dojo-1.10.10/dijit/form/ComboButton.js.uncompressed.js +0 -86
  105. package/vendor/dojo-1.10.10/dijit/form/DropDownButton.js +0 -38
  106. package/vendor/dojo-1.10.10/dijit/form/DropDownButton.js.uncompressed.js +0 -102
  107. package/vendor/dojo-1.10.10/dijit/form/ToggleButton.js +0 -7
  108. package/vendor/dojo-1.10.10/dijit/form/ToggleButton.js.uncompressed.js +0 -26
  109. package/vendor/dojo-1.10.10/dijit/form/_ButtonMixin.js +0 -50
  110. package/vendor/dojo-1.10.10/dijit/form/_ButtonMixin.js.uncompressed.js +0 -116
  111. package/vendor/dojo-1.10.10/dijit/form/_FormValueMixin.js +0 -26
  112. package/vendor/dojo-1.10.10/dijit/form/_FormValueMixin.js.uncompressed.js +0 -81
  113. package/vendor/dojo-1.10.10/dijit/form/_FormValueWidget.js +0 -24
  114. package/vendor/dojo-1.10.10/dijit/form/_FormValueWidget.js.uncompressed.js +0 -51
  115. package/vendor/dojo-1.10.10/dijit/form/_FormWidget.js +0 -22
  116. package/vendor/dojo-1.10.10/dijit/form/_FormWidget.js.uncompressed.js +0 -67
  117. package/vendor/dojo-1.10.10/dijit/form/_FormWidgetMixin.js +0 -111
  118. package/vendor/dojo-1.10.10/dijit/form/_FormWidgetMixin.js.uncompressed.js +0 -254
  119. package/vendor/dojo-1.10.10/dijit/form/_ToggleButtonMixin.js +0 -32
  120. package/vendor/dojo-1.10.10/dijit/form/_ToggleButtonMixin.js.uncompressed.js +0 -69
  121. package/vendor/dojo-1.10.10/dijit/hccss.js +0 -9
  122. package/vendor/dojo-1.10.10/dijit/hccss.js.uncompressed.js +0 -21
  123. package/vendor/dojo-1.10.10/dijit/layout/AccordionContainer.js +0 -215
  124. package/vendor/dojo-1.10.10/dijit/layout/AccordionContainer.js.uncompressed.js +0 -550
  125. package/vendor/dojo-1.10.10/dijit/layout/AccordionPane.js +0 -7
  126. package/vendor/dojo-1.10.10/dijit/layout/AccordionPane.js.uncompressed.js +0 -25
  127. package/vendor/dojo-1.10.10/dijit/layout/ContentPane.js +0 -235
  128. package/vendor/dojo-1.10.10/dijit/layout/ContentPane.js.uncompressed.js +0 -653
  129. package/vendor/dojo-1.10.10/dijit/layout/StackContainer.js +0 -171
  130. package/vendor/dojo-1.10.10/dijit/layout/StackContainer.js.uncompressed.js +0 -411
  131. package/vendor/dojo-1.10.10/dijit/layout/StackController.js +0 -194
  132. package/vendor/dojo-1.10.10/dijit/layout/StackController.js.uncompressed.js +0 -410
  133. package/vendor/dojo-1.10.10/dijit/layout/_ContentPaneResizeMixin.js +0 -99
  134. package/vendor/dojo-1.10.10/dijit/layout/_ContentPaneResizeMixin.js.uncompressed.js +0 -236
  135. package/vendor/dojo-1.10.10/dijit/layout/_LayoutWidget.js +0 -47
  136. package/vendor/dojo-1.10.10/dijit/layout/_LayoutWidget.js.uncompressed.js +0 -190
  137. package/vendor/dojo-1.10.10/dijit/layout/utils.js +0 -77
  138. package/vendor/dojo-1.10.10/dijit/layout/utils.js.uncompressed.js +0 -151
  139. package/vendor/dojo-1.10.10/dijit/main.js +0 -4
  140. package/vendor/dojo-1.10.10/dijit/main.js.uncompressed.js +0 -16
  141. package/vendor/dojo-1.10.10/dijit/nls/dijit-all_en-us.js +0 -2
  142. package/vendor/dojo-1.10.10/dijit/nls/dijit-all_en-us.js.uncompressed.js +0 -21
  143. package/vendor/dojo-1.10.10/dijit/nls/loading.js +0 -2
  144. package/vendor/dojo-1.10.10/dijit/nls/loading.js.uncompressed.js +0 -47
  145. package/vendor/dojo-1.10.10/dijit/place.js +0 -142
  146. package/vendor/dojo-1.10.10/dijit/place.js.uncompressed.js +0 -407
  147. package/vendor/dojo-1.10.10/dijit/popup.js +0 -162
  148. package/vendor/dojo-1.10.10/dijit/popup.js.uncompressed.js +0 -441
  149. package/vendor/dojo-1.10.10/dijit/registry.js +0 -79
  150. package/vendor/dojo-1.10.10/dijit/registry.js.uncompressed.js +0 -159
  151. package/vendor/dojo-1.10.10/dijit/selection.js +0 -364
  152. package/vendor/dojo-1.10.10/dijit/selection.js.uncompressed.js +0 -525
  153. package/vendor/dojo-1.10.10/dijit/typematic.js +0 -96
  154. package/vendor/dojo-1.10.10/dijit/typematic.js.uncompressed.js +0 -211
  155. package/vendor/dojo-1.10.10/dojo/NodeList-manipulate.js +0 -195
  156. package/vendor/dojo-1.10.10/dojo/NodeList-manipulate.js.uncompressed.js +0 -761
  157. package/vendor/dojo-1.10.10/dojo/Stateful.js +0 -90
  158. package/vendor/dojo-1.10.10/dojo/Stateful.js.uncompressed.js +0 -218
  159. package/vendor/dojo-1.10.10/dojo/_base/url.js +0 -87
  160. package/vendor/dojo-1.10.10/dojo/_base/url.js.uncompressed.js +0 -109
  161. package/vendor/dojo-1.10.10/dojo/cache.js +0 -9
  162. package/vendor/dojo-1.10.10/dojo/cache.js.uncompressed.js +0 -7
  163. package/vendor/dojo-1.10.10/dojo/colors.js +0 -74
  164. package/vendor/dojo-1.10.10/dojo/colors.js.uncompressed.js +0 -232
  165. package/vendor/dojo-1.10.10/dojo/cookie.js +0 -48
  166. package/vendor/dojo-1.10.10/dojo/cookie.js.uncompressed.js +0 -98
  167. package/vendor/dojo-1.10.10/dojo/date/stamp.js +0 -82
  168. package/vendor/dojo-1.10.10/dojo/date/stamp.js.uncompressed.js +0 -144
  169. package/vendor/dojo-1.10.10/dojo/dojo.js +0 -7
  170. package/vendor/dojo-1.10.10/dojo/dojo.js.uncompressed.js +0 -18680
  171. package/vendor/dojo-1.10.10/dojo/fx/Toggler.js +0 -27
  172. package/vendor/dojo-1.10.10/dojo/fx/Toggler.js.uncompressed.js +0 -101
  173. package/vendor/dojo-1.10.10/dojo/fx/easing.js +0 -165
  174. package/vendor/dojo-1.10.10/dojo/fx/easing.js.uncompressed.js +0 -276
  175. package/vendor/dojo-1.10.10/dojo/fx.js +0 -271
  176. package/vendor/dojo-1.10.10/dojo/fx.js.uncompressed.js +0 -443
  177. package/vendor/dojo-1.10.10/dojo/hccss.js +0 -26
  178. package/vendor/dojo-1.10.10/dojo/hccss.js.uncompressed.js +0 -52
  179. package/vendor/dojo-1.10.10/dojo/html.js +0 -161
  180. package/vendor/dojo-1.10.10/dojo/html.js.uncompressed.js +0 -370
  181. package/vendor/dojo-1.10.10/dojo/io/iframe.js +0 -71
  182. package/vendor/dojo-1.10.10/dojo/io/iframe.js.uncompressed.js +0 -190
  183. package/vendor/dojo-1.10.10/dojo/io/script.js +0 -112
  184. package/vendor/dojo-1.10.10/dojo/io/script.js.uncompressed.js +0 -280
  185. package/vendor/dojo-1.10.10/dojo/parser.js +0 -437
  186. package/vendor/dojo-1.10.10/dojo/parser.js.uncompressed.js +0 -915
  187. package/vendor/dojo-1.10.10/dojo/promise/all.js +0 -59
  188. package/vendor/dojo-1.10.10/dojo/promise/all.js.uncompressed.js +0 -77
  189. package/vendor/dojo-1.10.10/dojo/regexp.js +0 -32
  190. package/vendor/dojo-1.10.10/dojo/regexp.js.uncompressed.js +0 -70
  191. package/vendor/dojo-1.10.10/dojo/request/iframe.js +0 -291
  192. package/vendor/dojo-1.10.10/dojo/request/iframe.js.uncompressed.js +0 -438
  193. package/vendor/dojo-1.10.10/dojo/request/script.js +0 -129
  194. package/vendor/dojo-1.10.10/dojo/request/script.js.uncompressed.js +0 -237
  195. package/vendor/dojo-1.10.10/dojo/require.js +0 -11
  196. package/vendor/dojo-1.10.10/dojo/require.js.uncompressed.js +0 -7
  197. package/vendor/dojo-1.10.10/dojo/resources/blank.gif +0 -0
  198. package/vendor/dojo-1.10.10/dojo/string.js +0 -67
  199. package/vendor/dojo-1.10.10/dojo/string.js.uncompressed.js +0 -181
  200. package/vendor/dojo-1.10.10/dojo/touch.js +0 -191
  201. package/vendor/dojo-1.10.10/dojo/touch.js.uncompressed.js +0 -468
  202. package/vendor/dojo-1.10.10/dojo/uacss.js +0 -36
  203. package/vendor/dojo-1.10.10/dojo/uacss.js.uncompressed.js +0 -85
  204. package/vendor/dojo-1.10.10/dojo/window.js +0 -141
  205. package/vendor/dojo-1.10.10/dojo/window.js.uncompressed.js +0 -241
  206. package/vendor/dojo-1.10.10/dojox/charting/Chart.js +0 -626
  207. package/vendor/dojo-1.10.10/dojox/charting/Chart.js.uncompressed.js +0 -1220
  208. package/vendor/dojo-1.10.10/dojox/charting/Chart2D.js +0 -5
  209. package/vendor/dojo-1.10.10/dojox/charting/Chart2D.js.uncompressed.js +0 -16
  210. package/vendor/dojo-1.10.10/dojox/charting/Element.js +0 -247
  211. package/vendor/dojo-1.10.10/dojox/charting/Element.js.uncompressed.js +0 -402
  212. package/vendor/dojo-1.10.10/dojox/charting/Series.js +0 -24
  213. package/vendor/dojo-1.10.10/dojox/charting/Series.js.uncompressed.js +0 -58
  214. package/vendor/dojo-1.10.10/dojox/charting/SimpleTheme.js +0 -191
  215. package/vendor/dojo-1.10.10/dojox/charting/SimpleTheme.js.uncompressed.js +0 -577
  216. package/vendor/dojo-1.10.10/dojox/charting/Theme.js +0 -42
  217. package/vendor/dojo-1.10.10/dojox/charting/Theme.js.uncompressed.js +0 -120
  218. package/vendor/dojo-1.10.10/dojox/charting/action2d/Base.js +0 -11
  219. package/vendor/dojo-1.10.10/dojox/charting/action2d/Base.js.uncompressed.js +0 -36
  220. package/vendor/dojo-1.10.10/dojox/charting/action2d/Highlight.js +0 -77
  221. package/vendor/dojo-1.10.10/dojox/charting/action2d/Highlight.js.uncompressed.js +0 -144
  222. package/vendor/dojo-1.10.10/dojox/charting/action2d/Magnify.js +0 -58
  223. package/vendor/dojo-1.10.10/dojox/charting/action2d/Magnify.js.uncompressed.js +0 -123
  224. package/vendor/dojo-1.10.10/dojox/charting/action2d/MoveSlice.js +0 -54
  225. package/vendor/dojo-1.10.10/dojox/charting/action2d/MoveSlice.js.uncompressed.js +0 -124
  226. package/vendor/dojo-1.10.10/dojox/charting/action2d/PlotAction.js +0 -28
  227. package/vendor/dojo-1.10.10/dojox/charting/action2d/PlotAction.js.uncompressed.js +0 -74
  228. package/vendor/dojo-1.10.10/dojox/charting/action2d/Tooltip.js +0 -116
  229. package/vendor/dojo-1.10.10/dojox/charting/action2d/Tooltip.js.uncompressed.js +0 -178
  230. package/vendor/dojo-1.10.10/dojox/charting/axis2d/Base.js +0 -24
  231. package/vendor/dojo-1.10.10/dojox/charting/axis2d/Base.js.uncompressed.js +0 -83
  232. package/vendor/dojo-1.10.10/dojox/charting/axis2d/Default.js +0 -557
  233. package/vendor/dojo-1.10.10/dojox/charting/axis2d/Default.js.uncompressed.js +0 -980
  234. package/vendor/dojo-1.10.10/dojox/charting/axis2d/Invisible.js +0 -65
  235. package/vendor/dojo-1.10.10/dojox/charting/axis2d/Invisible.js.uncompressed.js +0 -224
  236. package/vendor/dojo-1.10.10/dojox/charting/axis2d/common.js +0 -91
  237. package/vendor/dojo-1.10.10/dojox/charting/axis2d/common.js.uncompressed.js +0 -164
  238. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Areas.js +0 -7
  239. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Areas.js.uncompressed.js +0 -14
  240. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bars.js +0 -168
  241. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bars.js.uncompressed.js +0 -311
  242. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Base.js +0 -61
  243. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Base.js.uncompressed.js +0 -161
  244. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bubble.js +0 -141
  245. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bubble.js.uncompressed.js +0 -242
  246. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Candlesticks.js +0 -126
  247. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Candlesticks.js.uncompressed.js +0 -243
  248. package/vendor/dojo-1.10.10/dojox/charting/plot2d/CartesianBase.js +0 -108
  249. package/vendor/dojo-1.10.10/dojox/charting/plot2d/CartesianBase.js.uncompressed.js +0 -290
  250. package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredBars.js +0 -13
  251. package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredBars.js.uncompressed.js +0 -14
  252. package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredColumns.js +0 -13
  253. package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredColumns.js.uncompressed.js +0 -14
  254. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Columns.js +0 -153
  255. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Columns.js.uncompressed.js +0 -249
  256. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Default.js +0 -253
  257. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Default.js.uncompressed.js +0 -472
  258. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Grid.js +0 -182
  259. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Grid.js.uncompressed.js +0 -356
  260. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Lines.js +0 -6
  261. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Lines.js.uncompressed.js +0 -12
  262. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Markers.js +0 -6
  263. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Markers.js.uncompressed.js +0 -12
  264. package/vendor/dojo-1.10.10/dojox/charting/plot2d/MarkersOnly.js +0 -7
  265. package/vendor/dojo-1.10.10/dojox/charting/plot2d/MarkersOnly.js.uncompressed.js +0 -13
  266. package/vendor/dojo-1.10.10/dojox/charting/plot2d/OHLC.js +0 -110
  267. package/vendor/dojo-1.10.10/dojox/charting/plot2d/OHLC.js.uncompressed.js +0 -208
  268. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Pie.js +0 -303
  269. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Pie.js.uncompressed.js +0 -547
  270. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Scatter.js +0 -134
  271. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Scatter.js.uncompressed.js +0 -207
  272. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Spider.js +0 -299
  273. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Spider.js.uncompressed.js +0 -537
  274. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Stacked.js +0 -24
  275. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Stacked.js.uncompressed.js +0 -44
  276. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedAreas.js +0 -7
  277. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedAreas.js.uncompressed.js +0 -14
  278. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedBars.js +0 -22
  279. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedBars.js.uncompressed.js +0 -33
  280. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedColumns.js +0 -20
  281. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedColumns.js.uncompressed.js +0 -31
  282. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedLines.js +0 -6
  283. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedLines.js.uncompressed.js +0 -12
  284. package/vendor/dojo-1.10.10/dojox/charting/plot2d/_PlotEvents.js +0 -68
  285. package/vendor/dojo-1.10.10/dojox/charting/plot2d/_PlotEvents.js.uncompressed.js +0 -120
  286. package/vendor/dojo-1.10.10/dojox/charting/plot2d/common.js +0 -209
  287. package/vendor/dojo-1.10.10/dojox/charting/plot2d/common.js.uncompressed.js +0 -214
  288. package/vendor/dojo-1.10.10/dojox/charting/plot2d/commonStacked.js +0 -76
  289. package/vendor/dojo-1.10.10/dojox/charting/plot2d/commonStacked.js.uncompressed.js +0 -77
  290. package/vendor/dojo-1.10.10/dojox/charting/scaler/common.js +0 -59
  291. package/vendor/dojo-1.10.10/dojox/charting/scaler/common.js.uncompressed.js +0 -70
  292. package/vendor/dojo-1.10.10/dojox/charting/scaler/linear.js +0 -220
  293. package/vendor/dojo-1.10.10/dojox/charting/scaler/linear.js.uncompressed.js +0 -262
  294. package/vendor/dojo-1.10.10/dojox/charting/scaler/primitive.js +0 -23
  295. package/vendor/dojo-1.10.10/dojox/charting/scaler/primitive.js.uncompressed.js +0 -36
  296. package/vendor/dojo-1.10.10/dojox/charting/themes/Claro.js +0 -39
  297. package/vendor/dojo-1.10.10/dojox/charting/themes/Claro.js.uncompressed.js +0 -106
  298. package/vendor/dojo-1.10.10/dojox/charting/themes/Wetland.js +0 -5
  299. package/vendor/dojo-1.10.10/dojox/charting/themes/Wetland.js.uncompressed.js +0 -12
  300. package/vendor/dojo-1.10.10/dojox/charting/themes/common.js +0 -4
  301. package/vendor/dojo-1.10.10/dojox/charting/themes/common.js.uncompressed.js +0 -3
  302. package/vendor/dojo-1.10.10/dojox/charting/widget/Legend.js +0 -102
  303. package/vendor/dojo-1.10.10/dojox/charting/widget/Legend.js.uncompressed.js +0 -165
  304. package/vendor/dojo-1.10.10/dojox/color/Palette.js +0 -163
  305. package/vendor/dojo-1.10.10/dojox/color/Palette.js.uncompressed.js +0 -460
  306. package/vendor/dojo-1.10.10/dojox/color/_base.js +0 -174
  307. package/vendor/dojo-1.10.10/dojox/color/_base.js.uncompressed.js +0 -196
  308. package/vendor/dojo-1.10.10/dojox/gfx/_base.js +0 -253
  309. package/vendor/dojo-1.10.10/dojox/gfx/_base.js.uncompressed.js +0 -1024
  310. package/vendor/dojo-1.10.10/dojox/gfx/fx.js +0 -297
  311. package/vendor/dojo-1.10.10/dojox/gfx/fx.js.uncompressed.js +0 -350
  312. package/vendor/dojo-1.10.10/dojox/gfx/gradutils.js +0 -63
  313. package/vendor/dojo-1.10.10/dojox/gfx/gradutils.js.uncompressed.js +0 -91
  314. package/vendor/dojo-1.10.10/dojox/gfx/matrix.js +0 -170
  315. package/vendor/dojo-1.10.10/dojox/gfx/matrix.js.uncompressed.js +0 -501
  316. package/vendor/dojo-1.10.10/dojox/gfx/path.js +0 -319
  317. package/vendor/dojo-1.10.10/dojox/gfx/path.js.uncompressed.js +0 -478
  318. package/vendor/dojo-1.10.10/dojox/gfx/shape.js +0 -459
  319. package/vendor/dojo-1.10.10/dojox/gfx/shape.js.uncompressed.js +0 -1091
  320. package/vendor/dojo-1.10.10/dojox/gfx/svg.js +0 -662
  321. package/vendor/dojo-1.10.10/dojox/gfx/svg.js.uncompressed.js +0 -1023
  322. package/vendor/dojo-1.10.10/dojox/gfx/utils.js +0 -199
  323. package/vendor/dojo-1.10.10/dojox/gfx/utils.js.uncompressed.js +0 -322
  324. package/vendor/dojo-1.10.10/dojox/gfx.js +0 -2
  325. package/vendor/dojo-1.10.10/dojox/gfx.js.uncompressed.js +0 -1136
  326. package/vendor/dojo-1.10.10/dojox/lang/functional/array.js +0 -151
  327. package/vendor/dojo-1.10.10/dojox/lang/functional/array.js.uncompressed.js +0 -169
  328. package/vendor/dojo-1.10.10/dojox/lang/functional/fold.js +0 -93
  329. package/vendor/dojo-1.10.10/dojox/lang/functional/fold.js.uncompressed.js +0 -125
  330. package/vendor/dojo-1.10.10/dojox/lang/functional/lambda.js +0 -81
  331. package/vendor/dojo-1.10.10/dojox/lang/functional/lambda.js.uncompressed.js +0 -132
  332. package/vendor/dojo-1.10.10/dojox/lang/functional/object.js +0 -54
  333. package/vendor/dojo-1.10.10/dojox/lang/functional/object.js.uncompressed.js +0 -78
  334. package/vendor/dojo-1.10.10/dojox/lang/functional/reversed.js +0 -61
  335. package/vendor/dojo-1.10.10/dojox/lang/functional/reversed.js.uncompressed.js +0 -77
  336. package/vendor/dojo-1.10.10/dojox/lang/functional/scan.js +0 -87
  337. package/vendor/dojo-1.10.10/dojox/lang/functional/scan.js.uncompressed.js +0 -107
  338. package/vendor/dojo-1.10.10/dojox/lang/functional.js +0 -4
  339. package/vendor/dojo-1.10.10/dojox/lang/functional.js.uncompressed.js +0 -3
  340. package/vendor/dojo-1.10.10/dojox/lang/utils.js +0 -86
  341. package/vendor/dojo-1.10.10/dojox/lang/utils.js.uncompressed.js +0 -121
  342. package/vendor/dojo-1.10.10/dojox/main.js +0 -4
  343. package/vendor/dojo-1.10.10/dojox/main.js.uncompressed.js +0 -14
  344. package/vendor/dojo-1.10.10/dojox/storage/LocalStorageProvider.js +0 -112
  345. package/vendor/dojo-1.10.10/dojox/storage/LocalStorageProvider.js.uncompressed.js +0 -208
  346. package/vendor/dojo-1.10.10/dojox/storage/Provider.js +0 -62
  347. package/vendor/dojo-1.10.10/dojox/storage/Provider.js.uncompressed.js +0 -344
  348. package/vendor/dojo-1.10.10/dojox/storage/manager.js +0 -110
  349. package/vendor/dojo-1.10.10/dojox/storage/manager.js.uncompressed.js +0 -263
@@ -1,218 +1,26 @@
1
1
  /* eslint-disable max-len */
2
- import * as ui from 'datagrok-api/ui';
3
2
  import * as grok from 'datagrok-api/grok';
4
- import * as DG from 'datagrok-api/dg';
5
3
 
6
4
  import {Unsubscribable} from 'rxjs';
7
5
 
8
- import {timeout} from '@datagrok-libraries/utils/src/test';
9
-
10
6
  import {errorToConsole} from '@datagrok-libraries/utils/src/to-console';
11
- import {errInfo} from '@datagrok-libraries/bio/src/utils/err-info';
12
- import {
13
- DojoType, DojoxType, HweWindow, IOrgHelmWebEditor, Monomers
14
- } from '@datagrok-libraries/bio/src/helm/types';
15
- import {HelmServiceBase} from '@datagrok-libraries/bio/src/viewers/helm-service';
16
7
  import {IMonomerLib} from '@datagrok-libraries/bio/src/types/monomer-library';
17
8
  import {LoggerWrapper} from '@datagrok-libraries/bio/src/utils/logger';
18
9
  import {IHelmHelper} from '@datagrok-libraries/bio/src/helm/helm-helper';
19
- import {getMonomerLibHelper, IMonomerLibHelper} from '@datagrok-libraries/bio/src/types/monomer-library';
10
+ import {IMonomerLibHelper} from '@datagrok-libraries/bio/src/types/monomer-library';
20
11
  import {ISeqHelper} from '@datagrok-libraries/bio/src/utils/seq-helper';
21
12
 
22
- import {HelmService} from './utils/helm-service';
23
- import {OrgHelmModule, ScilModule} from './types';
24
- import {rewriteLibraries} from './utils/get-monomer';
25
-
26
- import type {DojoWindowType} from '../helm/dojo/types';
13
+ import * as DG from 'datagrok-api/dg';
27
14
 
28
15
  import {_package} from './package';
29
16
 
30
- declare const dojo: DojoType;
31
- declare const dojox: DojoxType;
32
- declare const scil: ScilModule;
33
- declare const org: OrgHelmModule;
34
-
35
- type DojoConfigWindowType = {
36
- dojoConfig: {
37
- baseUrl: string,
38
- packages?: (string | { name: string, location: string })[],
39
- deps?: string[], callback: Function, has?: any, parseOnLoad?: boolean, async?: boolean | string, locale?: string,
40
- loaderPatch: any,
41
- },
42
- };
43
- type HelmWindowType = {
44
- $helmServicePromise?: Promise<HelmServiceBase>,
45
- require: any,
46
- };
47
- declare const window: Window & DojoConfigWindowType & DojoWindowType & HweWindow & HelmWindowType;
48
-
49
- export async function _getHelmService(): Promise<HelmServiceBase> {
50
- let res = window.$helmServicePromise;
51
- if (!res)
52
- res = window.$helmServicePromise = Promise.resolve(new HelmService());
53
- return res;
54
- }
55
-
56
- export async function initHelmLoadAndPatchDojo(): Promise<void> {
57
- const logPrefix = `Helm: _package.initHelmLoadAndPatchDojo()`;
58
- // patch window.dojox.gfx.svg.Text.prototype.getTextWidth hangs
59
- /** get the text width in pixels */
60
- const pi = DG.TaskBarProgressIndicator.create('Loading Helm Web Editor ...');
61
- const requireBackup = window.require;
62
- //@ts-ignore
63
- const defineBackup = window['define'];
64
- try {
65
- // Dojo modules required by JDraw2 and HELMWebEditor
66
- // 'dojo.window','dojo.io.script','dojo.io.iframe','dojo.dom',
67
- // 'dojox.gfx','dojox.gfx.svg','dojox.gfx.shape','dojox.charting'
68
- const dojoTargetList: { name: string, checker: () => boolean }[] = [
69
- {name: 'dojo.window', checker: () => !!(window.dojo?.window)},
70
- {name: 'dojo.ready', checker: () => !!(window.dojo?.ready)},
71
- {name: 'dojo.io.script', checker: () => !!(window.dojo?.io?.script)},
72
- {name: 'dojo.io.iframe', checker: () => !!(window.dojo?.io?.iframe)},
73
- // {name: 'dojo.dom', checker: () => !!(window.dojo?.dom)},
74
- {name: 'dojox.gfx', checker: () => !!(window.dojox?.gfx)},
75
- {name: 'dojox.gfx.svg', checker: () => !!(window.dojox?.gfx?.svg)},
76
- {name: 'dojox.gfx.createSurface', checker: () => !!(window.dojox?.gfx?.createSurface)},
77
- {name: 'dojox.gfx.shape', checker: () => !!(window.dojox?.gfx?.shape)},
78
- {name: 'dojox.storage.Provider', checker: () => !!(window.dojox?.storage?.Provider)},
79
- {name: 'dojox.storage.LocalStorageProvider', checker: () => !!(window.dojox?.storage?.LocalStorageProvider)},
80
- // {name: 'dojox.charting', checker: () => !!(window.dojox.charting)},
81
- // {name: 'dojox.charting.themes.Claro', checker: () => !!(window.dojox.charting?.themes?.Claro)},
82
- // {name: 'dojox.charting.themes.Wetland', checker: () => !!(window.dojox.charting?.themes?.Wetland)},
83
- // {name: 'dojox.charting.plot2d.Base', checker: () => !!(window.dojox.charting?.plot2d?.Base)},
84
- // {name: 'dojox.charting.Series', checker: () => !!(window.dojox?.charting?.Series)},
85
- // {name: 'dojox.charting.Chart2D', checker: () => !!(window.dojox?.charting?.Chart2D)},
86
- ];
87
- /** Gets list ofd modules not ready yet */
88
- const getDojoNotReadyList = (): string[] => {
89
- return dojoTargetList.filter((dt) => !dt.checker()).map((dt) => dt.name);
90
- };
91
-
92
- try {
93
- // Preliminary loading BiostructureViewer package because of NGL and dojo interference
94
- //await initNgl();
95
-
96
- await timeout(async () => {
97
- await new Promise<void>((resolve, reject) => {
98
- window.dojoConfig = {
99
- baseUrl: '/dojo',
100
- callback: () => { resolve(); },
101
- parseOnLoad: false,
102
- async: true,
103
- locale: 'en-us', // to limit dijit/nls file set
104
- loaderPatch: {
105
- injectUrl: (url: string, callback: any, owner: any) => {
106
- const logPrefixInt = `${logPrefix} dojoConfig.loaderPatch.injectUrl()`;
107
- _package.logger.debug(`${logPrefixInt}, url: ${url}`);
108
- try {
109
- const bundledFn = `.${url}${window.dojo$.uncompressed}`;
110
- window.dojo$.ctx(bundledFn);
111
- callback();
112
- } catch (err: any) {
113
- _package.logger.warning(`${logPrefixInt}: not loaded url: '${url}'.`);
114
- }
115
- },
116
- },
117
- };
118
- // Load dojo without package/sources section for the settings dojoConfig to take effect, calleback will be called and promise resolved
119
- DG.Utils.loadJsCss([
120
- // 'https://ajax.googleapis.com/ajax/libs/dojo/1.10.4/dojo/dojo.js.uncompressed.js',
121
- // `${_package.webRoot}/vendor/dojo-1.10.10/dojo/dojo.js.uncompressed.js`,
122
- `${_package.webRoot}/dist/package-dojo.js`,
123
- ]).then(() => {});
124
- });
125
-
126
- const dojoRequire = window.require;
127
- const cmp = dojoRequire == requireBackup;
128
- try {
129
- await new Promise<void>((resolve, reject) => {
130
- /* eslint-disable indent */
131
- dojoRequire([
132
- 'dojo/window', 'dojo/dom', 'dojo/io/script', 'dojo/io/iframe',
133
- 'dojox/gfx', 'dojox/gfx/svg', 'dojox/gfx/shape',
134
- 'dojox/storage/Provider', 'dojox/storage/LocalStorageProvider',
135
- 'dijit/_base', 'dijit/Tooltip', 'dijit/form/_FormValueWidget',
136
- 'dijit/form/DropDownButton', 'dijit/layout/AccordionContainer', 'dijit/form/ComboButton',
137
- 'dijit/layout/StackController', 'dijit/layout/StackContainer'],
138
- (...args: any[]) => { resolve(); });
139
- /* eslint-enable indent */
140
- });
141
- } finally {
142
- // TODO: Check interference with NGL
143
- window.require = function(...args: any[]) {
144
- _package.logger.debug(`${logPrefix}, window.require( ${JSON.stringify(args)} )`);
145
- dojoRequire(...args);
146
- };
147
- }
148
-
149
- /** List of dojo modules not ready yet */ let dojoNotReadyList: string[];
150
- while ((dojoNotReadyList = getDojoNotReadyList()).length > 0) {
151
- const dojoProgress = dojoTargetList.length - dojoNotReadyList.length;
152
- pi.update(Math.round(100 * dojoProgress / dojoTargetList.length),
153
- `Loading Helm Web Editor ${dojoProgress}/${dojoTargetList.length}`);
154
- _package.logger.debug(`${logPrefix}, dojo loading ... ` +
155
- `${dojoNotReadyList.map((m) => `'${m}'`).join(',')} ...`);
156
- await DG.delay(100);
157
- }
158
- _package.logger.debug(`${logPrefix}, dojo ready all modules`);
159
- }, 60000, 'timeout dojox.gfx.svg');
160
- } catch (err: any) {
161
- const dojoNotReadyList = getDojoNotReadyList();
162
- _package.logger.error(`${logPrefix}, dojo not ready ${dojoNotReadyList.map((m) => `'${m}'`).join(',')} ...`);
163
- }
164
-
165
- _package.logger.debug(`${logPrefix}, patch window.dojox.gfx.svg.Text.prototype.getTextWidth`);
166
- // @ts-ignore
167
- window.dojox.gfx.svg.Text.prototype.getTextWidth = function() {
168
- // Patched via Datagrok Helm package
169
- const rawNode = this.rawNode;
170
- const oldParent = rawNode.parentNode;
171
- const _measurementNode = rawNode.cloneNode(true);
172
- _measurementNode.style.visibility = 'hidden';
173
-
174
- // solution to the "orphan issue" in FF
175
- let _width = 0;
176
- const _text = _measurementNode.firstChild.nodeValue;
177
- oldParent.appendChild(_measurementNode);
178
-
179
- // solution to the "orphan issue" in Opera
180
- // (nodeValue == "" hangs firefox)
181
- if (_text != '') {
182
- let watchdogCounter = 100;
183
- while (!_width && --watchdogCounter > 0) { // <-- hangs
184
- //Yang: work around svgweb bug 417 -- http://code.google.com/p/svgweb/issues/detail?id=417
185
- if (_measurementNode.getBBox)
186
- _width = parseInt(_measurementNode.getBBox().width);
187
- else
188
- _width = 68;
189
- }
190
- }
191
- oldParent.removeChild(_measurementNode);
192
- return _width;
193
- };
194
- _package.logger.debug(`${logPrefix}, end`);
195
- } finally {
196
- window.require = requireBackup;
197
- // @ts-ignore
198
- window['define'] = defineBackup;
199
- pi.close();
200
- }
201
- }
202
-
203
- export const helmJsonReplacer = (key: string, value: any): any => {
204
- switch (key) {
205
- case '_parent': {
206
- return `${value.toString()}`;
207
- }
208
- default:
209
- return value;
210
- }
211
- };
17
+ // hwe migration (Phase 7): the legacy Dojo / JSDraw2 / HELMWebEditor loader and
18
+ // the `org.helm.webeditor.Monomers` patching that lived here are gone. The
19
+ // standalone `@datagrok-libraries/hwe` editor is self-contained (no global
20
+ // scripts to inject) and reads Bio's monomer library directly via
21
+ // `bridgeMonomerLib`, so package init just wires the helpers together.
212
22
 
213
23
  export class HelmPackage extends DG.Package {
214
- public alertOriginal: ((s: string) => void) | null = null;
215
-
216
24
  private _helmHelper?: IHelmHelper;
217
25
  public get helmHelper(): IHelmHelper {
218
26
  if (!this._helmHelper)
@@ -232,92 +40,6 @@ export class HelmPackage extends DG.Package {
232
40
  super._logger = new LoggerWrapper(super.logger, opts.debug);
233
41
  }
234
42
 
235
- // -- Init --
236
- /** Loads Dojo and HelmWebEditor, waits for init, patches */
237
- async initHELMWebEditor(): Promise<void> {
238
- const logPrefix: string = 'Helm: Package.initDojo()';
239
-
240
- _package.logger.debug(`${logPrefix}, dependence loading …`);
241
- const t1: number = performance.now();
242
-
243
- _package.logger.debug(`${logPrefix}, dojox loading and patching …`);
244
- await initHelmLoadAndPatchDojo();
245
- _package.logger.debug(`${logPrefix}, dojox loaded and patched`);
246
-
247
- // Alternatively load old bundles by package.json/sources
248
- _package.logger.debug(`${logPrefix}, HelmWebEditor awaiting …`);
249
- // require('../helm/JSDraw/Scilligence.JSDraw2.Lite-uncompressed');
250
- // require('../helm/JSDraw/Pistoia.HELM-uncompressed');
251
- require('../node_modules/@datagrok-libraries/helm-web-editor/dist/package.js');
252
- await window.helmWebEditor$.initPromise;
253
- _package.logger.debug(`${logPrefix}, HelmWebEditor loaded`);
254
-
255
- org.helm.webeditor.kCaseSensitive = true; // GROK-13880
256
-
257
- _package.logger.debug(`${logPrefix}, scil.Utils.alert patch`);
258
- _package.initHelmPatchScilAlert(); // patch immediately
259
-
260
- const t2: number = performance.now();
261
- _package.logger.debug(`${logPrefix}, dependence loaded, ET: ${(t2 - t1)} ms`);
262
- }
263
-
264
- public initHelmPatchScilAlert(): void {
265
- const logPrefix: string = 'Helm: initHelmPatchScilAlert()';
266
- this.alertOriginal = scil.Utils.alert;
267
- scil.Utils.alert = (s: string): void => {
268
- this.logger.warning(`${logPrefix}, scil.Utils.alert() s: "${s}".`);
269
- };
270
- }
271
-
272
- /** Patches Pistoia Monomers.getMonomer method to utilize DG Bio monomer Lib */
273
- public initHelmPatchPistoia(): void {
274
- const logPrefix: string = 'Helm: initHelmPatchPistoia()';
275
- const monomers = org.helm.webeditor.Monomers;
276
-
277
- this.logger.debug(`${logPrefix}, this.getMonomerOriginal stored`);
278
-
279
- this.helmHelper.overrideMonomersFuncs(this.helmHelper.buildMonomersFuncsFromLib(this.monomerLib));
280
-
281
- // @ts-ignore, intercept with proxy to observe access and usage
282
- org.helm.webeditor.Monomers = new class {
283
- constructor(base: Monomers) {
284
- return new Proxy(base, {
285
- get(target: any, p: string | symbol, _receiver: any): any {
286
- return target[p];
287
- },
288
- set(target: any, p: string | symbol, newValue: any, _receiver: any): boolean {
289
- if (p != 'sugars' && p != 'linkers' && p != 'bases' && p != 'aas') {
290
- const k = 11;
291
- }
292
- target[p] = newValue;
293
- return true;
294
- },
295
- apply(target: any, thisArg: any, argArray: any[]): any {
296
- return target[thisArg](...argArray);
297
- },
298
- });
299
- }
300
- }(org.helm.webeditor.Monomers) as Monomers;
301
-
302
- // @ts-ignore, intercept with proxy to observe access and usage
303
- org.helm.webeditor = new class {
304
- constructor(base: IOrgHelmWebEditor) {
305
- return new Proxy(base, {
306
- get(target: any, p: string | symbol, _receiver: any): any {
307
- return target[p];
308
- },
309
- set(target: any, p: string | symbol, newValue: any, _receiver: any): boolean {
310
- target[p] = newValue;
311
- return true;
312
- },
313
- apply(target: any, thisArg: any, argArray: any[]): any {
314
- return target[thisArg](...argArray);
315
- },
316
- });
317
- }
318
- }(org.helm.webeditor) as IOrgHelmWebEditor;
319
- }
320
-
321
43
  // -- MonomerLib --
322
44
 
323
45
  public get monomerLib(): IMonomerLib {
@@ -330,17 +52,15 @@ export class HelmPackage extends DG.Package {
330
52
 
331
53
  private _initialized: boolean = false;
332
54
 
333
- /** Requires both Bio & HELMWebEditor initialized */
55
+ /** Requires Bio initialized (monomer library). */
334
56
  completeInit(helmHelper: IHelmHelper, libHelper: IMonomerLibHelper): void {
335
57
  this._helmHelper = helmHelper;
336
58
  this._libHelper = libHelper;
337
59
 
338
60
  const lib = this.monomerLib;
339
- rewriteLibraries(lib); // initHelm()
340
61
  this._monomerLibSub = lib.onChanged
341
62
  .subscribe(this.monomerLibOnChangedHandler.bind(this));
342
63
 
343
- this.initHelmPatchPistoia();
344
64
  this._initialized = true;
345
65
  }
346
66
 
@@ -359,10 +79,6 @@ export class HelmPackage extends DG.Package {
359
79
  .join('<br />');
360
80
  const libMsg: string = `Monomer lib updated:<br /> ${libSummaryHtml}`;
361
81
  grok.shell.info(libMsg);
362
-
363
- _package.logger.debug(`${logPrefix}, org,helm.webeditor.Monomers updating ...`);
364
- rewriteLibraries(this.monomerLib); // initHelm() monomerLib.onChanged()
365
- _package.logger.debug(`${logPrefix}, end, org.helm.webeditor.Monomers completed`);
366
82
  } catch (err: any) {
367
83
  const errMsg = errorToConsole(err);
368
84
  console.error(`${logPrefix} error:\n` + errMsg);
@@ -370,9 +86,3 @@ export class HelmPackage extends DG.Package {
370
86
  }
371
87
  }
372
88
  }
373
-
374
- async function initNgl(): Promise<void> {
375
- const funcList = DG.Func.find({package: 'BiostructureViewer', name: 'getNglGlService'});
376
- if (funcList.length === 0) return; // Not mandatory if the BiostructureViewer package is not installed
377
- await funcList[0].prepare().call();
378
- }
package/src/package.g.ts CHANGED
@@ -7,12 +7,6 @@ export async function initHelm() : Promise<void> {
7
7
  await PackageFunctions.initHelm();
8
8
  }
9
9
 
10
- //description: Helm renderer service
11
- //output: object result
12
- export async function getHelmService() : Promise<any> {
13
- return await PackageFunctions.getHelmService();
14
- }
15
-
16
10
  //tags: cellRenderer
17
11
  //output: grid_cell_renderer result
18
12
  //meta.columnTags: quality=Macromolecule, units=helm
@@ -45,8 +39,8 @@ export function openEditor(mol: DG.SemanticValue) : void {
45
39
  //output: widget result
46
40
  //meta.role: widgets,panel
47
41
  //meta.domain: bio
48
- export function propertiesWidget(sequence: DG.SemanticValue) : any {
49
- return PackageFunctions.propertiesWidget(sequence);
42
+ export async function propertiesWidget(sequence: DG.SemanticValue) : Promise<any> {
43
+ return await PackageFunctions.propertiesWidget(sequence);
50
44
  }
51
45
 
52
46
  //input: column col { semType: Macromolecule }
package/src/package.ts CHANGED
@@ -10,18 +10,20 @@ import {testEvent} from '@datagrok-libraries/utils/src/test';
10
10
  import {errInfo} from '@datagrok-libraries/bio/src/utils/err-info';
11
11
  import {NOTATION} from '@datagrok-libraries/bio/src/utils/macromolecule';
12
12
  import {getSeqHelper} from '@datagrok-libraries/bio/src/utils/seq-helper';
13
- import {App, HweWindow} from '@datagrok-libraries/bio/src/helm/types';
13
+ import {App} from '@datagrok-libraries/bio/src/helm/types';
14
14
  import {HelmInputBase, IHelmHelper, IHelmInputInitOptions} from '@datagrok-libraries/bio/src/helm/helm-helper';
15
- import {HelmServiceBase} from '@datagrok-libraries/bio/src/viewers/helm-service';
16
15
  import {getMonomerLibHelper} from '@datagrok-libraries/bio/src/types/monomer-library';
17
16
 
18
17
  import {getPropertiesWidget} from './widgets/properties-widget';
19
18
  import {HelmGridCellRenderer, HelmGridCellRendererBack} from './utils/helm-grid-cell-renderer';
20
- import {_getHelmService, HelmPackage} from './package-utils';
19
+ import {HelmPackage} from './package-utils';
21
20
  import {HelmHelper} from './helm-helper';
22
21
  import {getRdKitModule} from '@datagrok-libraries/bio/src/chem/rdkit-module';
23
22
 
24
- import type {JSDraw2Module, OrgHelmModule, ScilModule} from './types';
23
+ // hwe editor stylesheet (`.hw-*` classes). hwe (Phase 28) ships its CSS only as
24
+ // a bundler import — there is no runtime injection — so consumers must import it
25
+ // or the HelmEditorApp renders unstyled. See @datagrok-libraries/hwe editor.css.
26
+ import '@datagrok-libraries/hwe/styles.css';
25
27
 
26
28
  export * from './package.g';
27
29
  export const _package = new HelmPackage(/*{debug: true}/**/);
@@ -56,20 +58,6 @@ decorators.forEach((decorator) => {
56
58
 
57
59
  /** End temporary polyfill */
58
60
 
59
-
60
- /*
61
- Loading modules:
62
- Through Helm/package.json/sources section
63
- dojo from ajax.googleapis.com
64
- HELMWebEditor
65
- JSDraw.Lite is embedded into HELMWebEditor bundle (dist/package.js)
66
- */
67
-
68
- declare const window: Window & HweWindow;
69
- declare const scil: ScilModule;
70
- declare const JSDraw2: JSDraw2Module;
71
- declare const org: OrgHelmModule;
72
-
73
61
  let initHelmPromise: Promise<void> | null = null;
74
62
 
75
63
  async function initHelmInt(): Promise<void> {
@@ -77,11 +65,10 @@ async function initHelmInt(): Promise<void> {
77
65
  _package.logger.debug(`${logPrefix}, start`);
78
66
 
79
67
  try {
80
- await getRdKitModule();
68
+ const rdKitModule = await getRdKitModule();
81
69
  const seqHelper = await getSeqHelper();
82
70
  const libHelper = await getMonomerLibHelper();
83
- await _package.initHELMWebEditor();
84
- const helmHelper: IHelmHelper = new HelmHelper(seqHelper, _package.logger);
71
+ const helmHelper: IHelmHelper = new HelmHelper(seqHelper, _package.logger, rdKitModule);
85
72
  _package.completeInit(helmHelper, libHelper);
86
73
  } catch (err: any) {
87
74
  const [errMsg, errStack] = errInfo(err);
@@ -97,6 +84,7 @@ async function initHelmInt(): Promise<void> {
97
84
 
98
85
  function openWebEditor(cell: DG.GridCell, value?: string, units?: string) {
99
86
  const view = ui.div();
87
+ view.style.height = '100%';
100
88
  const col = cell.cell.column as DG.Column<string>;
101
89
  const sh = _package.seqHelper.getSeqHandler(col);
102
90
  const app: App =
@@ -133,14 +121,6 @@ export class PackageFunctions {
133
121
  }
134
122
 
135
123
 
136
- @grok.decorators.func({
137
- 'description': 'Helm renderer service',
138
- 'outputs': [{'type': 'object', 'name': 'result'}]
139
- })
140
- static async getHelmService(): Promise<HelmServiceBase> {
141
- return _getHelmService();
142
- }
143
-
144
124
  @grok.decorators.func({
145
125
  'meta': {
146
126
  'columnTags': 'quality=Macromolecule, units=helm',
@@ -201,8 +181,8 @@ export class PackageFunctions {
201
181
  'meta': {role: 'widgets', domain: 'bio'},
202
182
  'tags': ['panel', 'widgets', 'bio']
203
183
  })
204
- static propertiesWidget(
205
- @grok.decorators.param({'options': {'semType': 'Macromolecule'}}) sequence: DG.SemanticValue): DG.Widget {
184
+ static async propertiesWidget(
185
+ @grok.decorators.param({'options': {'semType': 'Macromolecule'}}) sequence: DG.SemanticValue): Promise<DG.Widget> {
206
186
  return getPropertiesWidget(sequence);
207
187
  }
208
188
 
@@ -24,7 +24,7 @@ category('activityCliffs', async () => {
24
24
  let monomerLibHelper: IMonomerLibHelper;
25
25
  /** Backup actual user's monomer libraries settings */
26
26
  let userLibSettings: UserLibSettings;
27
- const helmEncodingFunc = DG.Func.find({name: 'helmPreprocessingFunction', package: 'Bio'})[0];
27
+ const helmEncodingFunc = DG.Func.find({name: 'macromoleculePreprocessingFunction', package: 'Bio'})[0];
28
28
  before(async () => {
29
29
  helmHelper = await getHelmHelper(); // init Helm package
30
30
  monomerLibHelper = await getMonomerLibHelper();
@@ -46,7 +46,7 @@ category('activityCliffs', async () => {
46
46
  const _view = grok.shell.addTableView(df);
47
47
 
48
48
  await _testActivityCliffsOpen(_view, df, DimReductionMethods.UMAP,
49
- 'HELM', 'Activity', 65, 20, BitArrayMetricsNames.Tanimoto, helmEncodingFunc);
49
+ 'HELM', 'Activity', 65, 311, MmDistanceFunctionsNames.HAMMING, helmEncodingFunc);
50
50
  });
51
51
  });
52
52
 
@@ -50,6 +50,89 @@ category('HelmInput', () => {
50
50
  expect(mol.bonds.length, 3);
51
51
  });
52
52
 
53
+ test('renders-with-nonzero-height (root in a dialog)', async () => {
54
+ // Regression: `ui.input.helmAsync` placed in a content-sized container
55
+ // (no explicit height) used to collapse the editor host to 0 px, rendering
56
+ // an empty div. Assert the editor host AND its mounted SVG are visibly tall.
57
+ const helmInput = await ui.input.helmAsync('Macromolecule');
58
+ helmInput.stringValue = 'PEPTIDE1{[meY].A.G.T}$$$$';
59
+ const dlg = ui.dialog('Helm Input Height Test').add(helmInput).show();
60
+ try {
61
+ await delay(500);
62
+ const hostEl = helmInput.getInput();
63
+ expect(hostEl.clientHeight > 0, true, `editor host height must be > 0 (was ${hostEl.clientHeight})`);
64
+ const svg = hostEl.querySelector('svg');
65
+ expect(svg != null, true, 'an SVG must be mounted in the editor host');
66
+ const svgH = (svg as SVGSVGElement).getBoundingClientRect().height;
67
+ expect(svgH > 0, true, `mounted SVG height must be > 0 (was ${svgH})`);
68
+ } finally {
69
+ dlg.close();
70
+ }
71
+ });
72
+
73
+ test('default size is 250x250', async () => {
74
+ // `ui.input.helmAsync` with no `editorOptions` should render a compact
75
+ // 250×250 box, NOT stretch to the form row or fall back to hwe's 400×100.
76
+ const helmInput = await ui.input.helmAsync('Macromolecule');
77
+ helmInput.stringValue = 'PEPTIDE1{[meY].A.G.T}$$$$';
78
+ const dlg = ui.dialog('Helm Input Default Size').add(helmInput).show();
79
+ try {
80
+ await delay(500);
81
+ const host = helmInput.getInput();
82
+ expect(Math.abs(host.clientWidth - 250) <= 4, true, `default width ~250 (was ${host.clientWidth})`);
83
+ expect(Math.abs(host.clientHeight - 250) <= 4, true, `default height ~250 (was ${host.clientHeight})`);
84
+ } finally {
85
+ dlg.close();
86
+ }
87
+ });
88
+
89
+ test('editorOptions.width/height override the default size', async () => {
90
+ const helmInput = await ui.input.helmAsync('Macromolecule', {editable: true, editorOptions: {width: 320, height: 180}});
91
+ helmInput.stringValue = 'PEPTIDE1{[meY].A.G.T}$$$$';
92
+ const dlg = ui.dialog('Helm Input Custom Size').add(helmInput).show();
93
+ try {
94
+ await delay(500);
95
+ const host = helmInput.getInput();
96
+ expect(Math.abs(host.clientWidth - 320) <= 4, true, `width ~320 from editorOptions (was ${host.clientWidth})`);
97
+ expect(Math.abs(host.clientHeight - 180) <= 4, true, `height ~180 from editorOptions (was ${host.clientHeight})`);
98
+ } finally {
99
+ dlg.close();
100
+ }
101
+ });
102
+
103
+ test('editor canvas sizes from getInput() box (consumer sets height on the host)', async () => {
104
+ // The real consumer pattern (e.g. libraries/db-explorer/renderer.ts) sets an
105
+ // explicit size directly on `getInput()` (the editor host). The editor
106
+ // canvas must follow the HOST's own box — the old code derived the size from
107
+ // `this.root` and painted a 0-height SVG when a consumer sized only the host
108
+ // (the reported "height 0 / width 105" bug). Mount via the input so layout
109
+ // is real, then size the host and assert the SVG tracks it.
110
+ const helmInput = await ui.input.helmAsync('Macromolecule');
111
+ helmInput.stringValue = 'PEPTIDE1{[meY].A.G.T}$$$$';
112
+ const dlg = ui.dialog('Helm getInput() Size Test').add(helmInput).show();
113
+ try {
114
+ await delay(300);
115
+ const host = helmInput.getInput();
116
+ // Consumer sizes the host element directly (the db-explorer pattern).
117
+ host.style.setProperty('width', '360px', 'important');
118
+ host.style.setProperty('height', '260px', 'important');
119
+ await delay(500); // ResizeObserver → editor.setSize → re-render
120
+
121
+ expect(host.clientWidth, 360, `host width (was ${host.clientWidth})`);
122
+ expect(host.clientHeight, 260, `host height (was ${host.clientHeight})`);
123
+ const svg = host.querySelector('svg') as SVGSVGElement | null;
124
+ expect(svg != null, true, 'an SVG must be mounted');
125
+ const r = svg!.getBoundingClientRect();
126
+ // The canvas tracks the host box (NOT root): both dimensions filled.
127
+ expect(r.height >= host.clientHeight - 8, true,
128
+ `SVG height should track the host's ${host.clientHeight} (was ${r.height})`);
129
+ expect(r.width >= host.clientWidth - 8, true,
130
+ `SVG width should track the host's ${host.clientWidth} (was ${r.width})`);
131
+ } finally {
132
+ dlg.close();
133
+ }
134
+ });
135
+
53
136
  test('tooltip', async () => {
54
137
  await _testTooltipOnHelmInput();
55
138
  }, {timeout: 300000});