@datagrok/helm 2.3.2 → 2.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/package-test.js +1 -1
- package/dist/package-test.js.map +1 -1
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/package.json +4 -4
- package/src/cell-renderer.ts +5 -4
- package/src/helm-helper.ts +6 -6
- package/src/helm-monomer-placer.ts +1 -1
- package/src/helm-web-editor.ts +5 -5
- package/src/package-test.ts +0 -1
- package/src/package-utils.ts +211 -69
- package/src/package.ts +10 -71
- package/src/tests/findMonomers-tests.ts +2 -1
- package/src/tests/get-monomer-tests.ts +1 -49
- package/src/tests/helm-input-tests.ts +31 -20
- package/src/utils/get-monomer.ts +49 -1
- package/src/utils/helm-grid-cell-renderer.ts +8 -9
- package/src/utils/index.ts +2 -3
- package/src/widgets/helm-input.ts +4 -4
- package/vendor/dojo-1.10.10/dijit/BackgroundIframe.js +63 -0
- package/vendor/dojo-1.10.10/dijit/BackgroundIframe.js.uncompressed.js +116 -0
- package/vendor/dojo-1.10.10/dijit/Destroyable.js +35 -0
- package/vendor/dojo-1.10.10/dijit/Destroyable.js.uncompressed.js +83 -0
- package/vendor/dojo-1.10.10/dijit/Tooltip.js +240 -0
- package/vendor/dojo-1.10.10/dijit/Tooltip.js.uncompressed.js +612 -0
- package/vendor/dojo-1.10.10/dijit/Viewport.js +44 -0
- package/vendor/dojo-1.10.10/dijit/Viewport.js.uncompressed.js +87 -0
- package/vendor/dojo-1.10.10/dijit/WidgetSet.js +76 -0
- package/vendor/dojo-1.10.10/dijit/WidgetSet.js.uncompressed.js +247 -0
- package/vendor/dojo-1.10.10/dijit/_AttachMixin.js +94 -0
- package/vendor/dojo-1.10.10/dijit/_AttachMixin.js.uncompressed.js +238 -0
- package/vendor/dojo-1.10.10/dijit/_Contained.js +17 -0
- package/vendor/dojo-1.10.10/dijit/_Contained.js.uncompressed.js +56 -0
- package/vendor/dojo-1.10.10/dijit/_Container.js +47 -0
- package/vendor/dojo-1.10.10/dijit/_Container.js.uncompressed.js +108 -0
- package/vendor/dojo-1.10.10/dijit/_CssStateMixin.js +198 -0
- package/vendor/dojo-1.10.10/dijit/_CssStateMixin.js.uncompressed.js +372 -0
- package/vendor/dojo-1.10.10/dijit/_FocusMixin.js +11 -0
- package/vendor/dojo-1.10.10/dijit/_FocusMixin.js.uncompressed.js +66 -0
- package/vendor/dojo-1.10.10/dijit/_HasDropDown.js +188 -0
- package/vendor/dojo-1.10.10/dijit/_HasDropDown.js.uncompressed.js +472 -0
- package/vendor/dojo-1.10.10/dijit/_OnDijitClickMixin.js +8 -0
- package/vendor/dojo-1.10.10/dijit/_OnDijitClickMixin.js.uncompressed.js +31 -0
- package/vendor/dojo-1.10.10/dijit/_TemplatedMixin.js +90 -0
- package/vendor/dojo-1.10.10/dijit/_TemplatedMixin.js.uncompressed.js +205 -0
- package/vendor/dojo-1.10.10/dijit/_Widget.js +66 -0
- package/vendor/dojo-1.10.10/dijit/_Widget.js.uncompressed.js +352 -0
- package/vendor/dojo-1.10.10/dijit/_WidgetBase.js +353 -0
- package/vendor/dojo-1.10.10/dijit/_WidgetBase.js.uncompressed.js +1200 -0
- package/vendor/dojo-1.10.10/dijit/_base/focus.js +68 -0
- package/vendor/dojo-1.10.10/dijit/_base/focus.js.uncompressed.js +207 -0
- package/vendor/dojo-1.10.10/dijit/_base/manager.js +10 -0
- package/vendor/dojo-1.10.10/dijit/_base/manager.js.uncompressed.js +35 -0
- package/vendor/dojo-1.10.10/dijit/_base/place.js +52 -0
- package/vendor/dojo-1.10.10/dijit/_base/place.js.uncompressed.js +131 -0
- package/vendor/dojo-1.10.10/dijit/_base/popup.js +23 -0
- package/vendor/dojo-1.10.10/dijit/_base/popup.js.uncompressed.js +58 -0
- package/vendor/dojo-1.10.10/dijit/_base/scroll.js +6 -0
- package/vendor/dojo-1.10.10/dijit/_base/scroll.js.uncompressed.js +22 -0
- package/vendor/dojo-1.10.10/dijit/_base/sniff.js +3 -0
- package/vendor/dojo-1.10.10/dijit/_base/sniff.js.uncompressed.js +12 -0
- package/vendor/dojo-1.10.10/dijit/_base/typematic.js +3 -0
- package/vendor/dojo-1.10.10/dijit/_base/typematic.js.uncompressed.js +10 -0
- package/vendor/dojo-1.10.10/dijit/_base/wai.js +32 -0
- package/vendor/dojo-1.10.10/dijit/_base/wai.js.uncompressed.js +109 -0
- package/vendor/dojo-1.10.10/dijit/_base/window.js +6 -0
- package/vendor/dojo-1.10.10/dijit/_base/window.js.uncompressed.js +18 -0
- package/vendor/dojo-1.10.10/dijit/_base.js +4 -0
- package/vendor/dojo-1.10.10/dijit/a11y.js +109 -0
- package/vendor/dojo-1.10.10/dijit/a11y.js.uncompressed.js +191 -0
- package/vendor/dojo-1.10.10/dijit/a11yclick.js +66 -0
- package/vendor/dojo-1.10.10/dijit/a11yclick.js.uncompressed.js +139 -0
- package/vendor/dojo-1.10.10/dijit/focus.js +188 -0
- package/vendor/dojo-1.10.10/dijit/focus.js.uncompressed.js +371 -0
- package/vendor/dojo-1.10.10/dijit/form/Button.js +49 -0
- package/vendor/dojo-1.10.10/dijit/form/Button.js.uncompressed.js +130 -0
- package/vendor/dojo-1.10.10/dijit/form/ComboBox.js +4 -0
- package/vendor/dojo-1.10.10/dijit/form/ComboBox.js.uncompressed.js +27 -0
- package/vendor/dojo-1.10.10/dijit/form/ComboButton.js +21 -0
- package/vendor/dojo-1.10.10/dijit/form/ComboButton.js.uncompressed.js +86 -0
- package/vendor/dojo-1.10.10/dijit/form/DropDownButton.js +38 -0
- package/vendor/dojo-1.10.10/dijit/form/DropDownButton.js.uncompressed.js +102 -0
- package/vendor/dojo-1.10.10/dijit/form/ToggleButton.js +7 -0
- package/vendor/dojo-1.10.10/dijit/form/ToggleButton.js.uncompressed.js +26 -0
- package/vendor/dojo-1.10.10/dijit/form/_ButtonMixin.js +50 -0
- package/vendor/dojo-1.10.10/dijit/form/_ButtonMixin.js.uncompressed.js +116 -0
- package/vendor/dojo-1.10.10/dijit/form/_FormValueMixin.js +26 -0
- package/vendor/dojo-1.10.10/dijit/form/_FormValueMixin.js.uncompressed.js +81 -0
- package/vendor/dojo-1.10.10/dijit/form/_FormValueWidget.js +24 -0
- package/vendor/dojo-1.10.10/dijit/form/_FormValueWidget.js.uncompressed.js +51 -0
- package/vendor/dojo-1.10.10/dijit/form/_FormWidget.js +22 -0
- package/vendor/dojo-1.10.10/dijit/form/_FormWidget.js.uncompressed.js +67 -0
- package/vendor/dojo-1.10.10/dijit/form/_FormWidgetMixin.js +111 -0
- package/vendor/dojo-1.10.10/dijit/form/_FormWidgetMixin.js.uncompressed.js +254 -0
- package/vendor/dojo-1.10.10/dijit/form/_ToggleButtonMixin.js +32 -0
- package/vendor/dojo-1.10.10/dijit/form/_ToggleButtonMixin.js.uncompressed.js +69 -0
- package/vendor/dojo-1.10.10/dijit/hccss.js +9 -0
- package/vendor/dojo-1.10.10/dijit/hccss.js.uncompressed.js +21 -0
- package/vendor/dojo-1.10.10/dijit/layout/AccordionContainer.js +215 -0
- package/vendor/dojo-1.10.10/dijit/layout/AccordionContainer.js.uncompressed.js +550 -0
- package/vendor/dojo-1.10.10/dijit/layout/AccordionPane.js +7 -0
- package/vendor/dojo-1.10.10/dijit/layout/AccordionPane.js.uncompressed.js +25 -0
- package/vendor/dojo-1.10.10/dijit/layout/ContentPane.js +235 -0
- package/vendor/dojo-1.10.10/dijit/layout/ContentPane.js.uncompressed.js +653 -0
- package/vendor/dojo-1.10.10/dijit/layout/StackContainer.js +171 -0
- package/vendor/dojo-1.10.10/dijit/layout/StackContainer.js.uncompressed.js +411 -0
- package/vendor/dojo-1.10.10/dijit/layout/StackController.js +194 -0
- package/vendor/dojo-1.10.10/dijit/layout/StackController.js.uncompressed.js +410 -0
- package/vendor/dojo-1.10.10/dijit/layout/_ContentPaneResizeMixin.js +99 -0
- package/vendor/dojo-1.10.10/dijit/layout/_ContentPaneResizeMixin.js.uncompressed.js +236 -0
- package/vendor/dojo-1.10.10/dijit/layout/_LayoutWidget.js +47 -0
- package/vendor/dojo-1.10.10/dijit/layout/_LayoutWidget.js.uncompressed.js +190 -0
- package/vendor/dojo-1.10.10/dijit/layout/utils.js +77 -0
- package/vendor/dojo-1.10.10/dijit/layout/utils.js.uncompressed.js +151 -0
- package/vendor/dojo-1.10.10/dijit/main.js +4 -0
- package/vendor/dojo-1.10.10/dijit/main.js.uncompressed.js +16 -0
- package/vendor/dojo-1.10.10/dijit/nls/dijit-all_en-us.js +2 -0
- package/vendor/dojo-1.10.10/dijit/nls/dijit-all_en-us.js.uncompressed.js +21 -0
- package/vendor/dojo-1.10.10/dijit/nls/loading.js +2 -0
- package/vendor/dojo-1.10.10/dijit/nls/loading.js.uncompressed.js +47 -0
- package/vendor/dojo-1.10.10/dijit/place.js +142 -0
- package/vendor/dojo-1.10.10/dijit/place.js.uncompressed.js +407 -0
- package/vendor/dojo-1.10.10/dijit/popup.js +162 -0
- package/vendor/dojo-1.10.10/dijit/popup.js.uncompressed.js +441 -0
- package/vendor/dojo-1.10.10/dijit/registry.js +79 -0
- package/vendor/dojo-1.10.10/dijit/registry.js.uncompressed.js +159 -0
- package/vendor/dojo-1.10.10/dijit/selection.js +364 -0
- package/vendor/dojo-1.10.10/dijit/selection.js.uncompressed.js +525 -0
- package/vendor/dojo-1.10.10/dijit/typematic.js +96 -0
- package/vendor/dojo-1.10.10/dijit/typematic.js.uncompressed.js +211 -0
- package/vendor/dojo-1.10.10/dojo/NodeList-manipulate.js +195 -0
- package/vendor/dojo-1.10.10/dojo/NodeList-manipulate.js.uncompressed.js +761 -0
- package/vendor/dojo-1.10.10/dojo/Stateful.js +90 -0
- package/vendor/dojo-1.10.10/dojo/Stateful.js.uncompressed.js +218 -0
- package/vendor/dojo-1.10.10/dojo/_base/url.js +87 -0
- package/vendor/dojo-1.10.10/dojo/_base/url.js.uncompressed.js +109 -0
- package/vendor/dojo-1.10.10/dojo/cache.js +9 -0
- package/vendor/dojo-1.10.10/dojo/cache.js.uncompressed.js +7 -0
- package/vendor/dojo-1.10.10/dojo/colors.js +74 -0
- package/vendor/dojo-1.10.10/dojo/colors.js.uncompressed.js +232 -0
- package/vendor/dojo-1.10.10/dojo/cookie.js +48 -0
- package/vendor/dojo-1.10.10/dojo/cookie.js.uncompressed.js +98 -0
- package/vendor/dojo-1.10.10/dojo/date/stamp.js +82 -0
- package/vendor/dojo-1.10.10/dojo/date/stamp.js.uncompressed.js +144 -0
- package/vendor/dojo-1.10.10/dojo/dojo.js +7 -0
- package/vendor/dojo-1.10.10/dojo/dojo.js.uncompressed.js +18680 -0
- package/vendor/dojo-1.10.10/dojo/fx/Toggler.js +27 -0
- package/vendor/dojo-1.10.10/dojo/fx/Toggler.js.uncompressed.js +101 -0
- package/vendor/dojo-1.10.10/dojo/fx/easing.js +165 -0
- package/vendor/dojo-1.10.10/dojo/fx/easing.js.uncompressed.js +276 -0
- package/vendor/dojo-1.10.10/dojo/fx.js +271 -0
- package/vendor/dojo-1.10.10/dojo/fx.js.uncompressed.js +443 -0
- package/vendor/dojo-1.10.10/dojo/hccss.js +26 -0
- package/vendor/dojo-1.10.10/dojo/hccss.js.uncompressed.js +52 -0
- package/vendor/dojo-1.10.10/dojo/html.js +161 -0
- package/vendor/dojo-1.10.10/dojo/html.js.uncompressed.js +370 -0
- package/vendor/dojo-1.10.10/dojo/io/iframe.js +71 -0
- package/vendor/dojo-1.10.10/dojo/io/iframe.js.uncompressed.js +190 -0
- package/vendor/dojo-1.10.10/dojo/io/script.js +112 -0
- package/vendor/dojo-1.10.10/dojo/io/script.js.uncompressed.js +280 -0
- package/vendor/dojo-1.10.10/dojo/parser.js +437 -0
- package/vendor/dojo-1.10.10/dojo/parser.js.uncompressed.js +915 -0
- package/vendor/dojo-1.10.10/dojo/promise/all.js +59 -0
- package/vendor/dojo-1.10.10/dojo/promise/all.js.uncompressed.js +77 -0
- package/vendor/dojo-1.10.10/dojo/regexp.js +32 -0
- package/vendor/dojo-1.10.10/dojo/regexp.js.uncompressed.js +70 -0
- package/vendor/dojo-1.10.10/dojo/request/iframe.js +291 -0
- package/vendor/dojo-1.10.10/dojo/request/iframe.js.uncompressed.js +438 -0
- package/vendor/dojo-1.10.10/dojo/request/script.js +129 -0
- package/vendor/dojo-1.10.10/dojo/request/script.js.uncompressed.js +237 -0
- package/vendor/dojo-1.10.10/dojo/require.js +11 -0
- package/vendor/dojo-1.10.10/dojo/require.js.uncompressed.js +7 -0
- package/vendor/dojo-1.10.10/dojo/resources/blank.gif +0 -0
- package/vendor/dojo-1.10.10/dojo/string.js +67 -0
- package/vendor/dojo-1.10.10/dojo/string.js.uncompressed.js +181 -0
- package/vendor/dojo-1.10.10/dojo/touch.js +191 -0
- package/vendor/dojo-1.10.10/dojo/touch.js.uncompressed.js +468 -0
- package/vendor/dojo-1.10.10/dojo/uacss.js +36 -0
- package/vendor/dojo-1.10.10/dojo/uacss.js.uncompressed.js +85 -0
- package/vendor/dojo-1.10.10/dojo/window.js +141 -0
- package/vendor/dojo-1.10.10/dojo/window.js.uncompressed.js +241 -0
- package/vendor/dojo-1.10.10/dojox/charting/Chart.js +626 -0
- package/vendor/dojo-1.10.10/dojox/charting/Chart.js.uncompressed.js +1220 -0
- package/vendor/dojo-1.10.10/dojox/charting/Chart2D.js +5 -0
- package/vendor/dojo-1.10.10/dojox/charting/Chart2D.js.uncompressed.js +16 -0
- package/vendor/dojo-1.10.10/dojox/charting/Element.js +247 -0
- package/vendor/dojo-1.10.10/dojox/charting/Element.js.uncompressed.js +402 -0
- package/vendor/dojo-1.10.10/dojox/charting/Series.js +24 -0
- package/vendor/dojo-1.10.10/dojox/charting/Series.js.uncompressed.js +58 -0
- package/vendor/dojo-1.10.10/dojox/charting/SimpleTheme.js +191 -0
- package/vendor/dojo-1.10.10/dojox/charting/SimpleTheme.js.uncompressed.js +577 -0
- package/vendor/dojo-1.10.10/dojox/charting/Theme.js +42 -0
- package/vendor/dojo-1.10.10/dojox/charting/Theme.js.uncompressed.js +120 -0
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Base.js +11 -0
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Base.js.uncompressed.js +36 -0
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Highlight.js +77 -0
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Highlight.js.uncompressed.js +144 -0
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Magnify.js +58 -0
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Magnify.js.uncompressed.js +123 -0
- package/vendor/dojo-1.10.10/dojox/charting/action2d/MoveSlice.js +54 -0
- package/vendor/dojo-1.10.10/dojox/charting/action2d/MoveSlice.js.uncompressed.js +124 -0
- package/vendor/dojo-1.10.10/dojox/charting/action2d/PlotAction.js +28 -0
- package/vendor/dojo-1.10.10/dojox/charting/action2d/PlotAction.js.uncompressed.js +74 -0
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Tooltip.js +116 -0
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Tooltip.js.uncompressed.js +178 -0
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/Base.js +24 -0
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/Base.js.uncompressed.js +83 -0
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/Default.js +557 -0
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/Default.js.uncompressed.js +980 -0
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/Invisible.js +65 -0
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/Invisible.js.uncompressed.js +224 -0
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/common.js +91 -0
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/common.js.uncompressed.js +164 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Areas.js +7 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Areas.js.uncompressed.js +14 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bars.js +168 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bars.js.uncompressed.js +311 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Base.js +61 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Base.js.uncompressed.js +161 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bubble.js +141 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bubble.js.uncompressed.js +242 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Candlesticks.js +126 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Candlesticks.js.uncompressed.js +243 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/CartesianBase.js +108 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/CartesianBase.js.uncompressed.js +290 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredBars.js +13 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredBars.js.uncompressed.js +14 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredColumns.js +13 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredColumns.js.uncompressed.js +14 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Columns.js +153 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Columns.js.uncompressed.js +249 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Default.js +253 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Default.js.uncompressed.js +472 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Grid.js +182 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Grid.js.uncompressed.js +356 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Lines.js +6 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Lines.js.uncompressed.js +12 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Markers.js +6 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Markers.js.uncompressed.js +12 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/MarkersOnly.js +7 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/MarkersOnly.js.uncompressed.js +13 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/OHLC.js +110 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/OHLC.js.uncompressed.js +208 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Pie.js +303 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Pie.js.uncompressed.js +547 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Scatter.js +134 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Scatter.js.uncompressed.js +207 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Spider.js +299 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Spider.js.uncompressed.js +537 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Stacked.js +24 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Stacked.js.uncompressed.js +44 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedAreas.js +7 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedAreas.js.uncompressed.js +14 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedBars.js +22 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedBars.js.uncompressed.js +33 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedColumns.js +20 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedColumns.js.uncompressed.js +31 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedLines.js +6 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedLines.js.uncompressed.js +12 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/_PlotEvents.js +68 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/_PlotEvents.js.uncompressed.js +120 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/common.js +209 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/common.js.uncompressed.js +214 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/commonStacked.js +76 -0
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/commonStacked.js.uncompressed.js +77 -0
- package/vendor/dojo-1.10.10/dojox/charting/scaler/common.js +59 -0
- package/vendor/dojo-1.10.10/dojox/charting/scaler/common.js.uncompressed.js +70 -0
- package/vendor/dojo-1.10.10/dojox/charting/scaler/linear.js +220 -0
- package/vendor/dojo-1.10.10/dojox/charting/scaler/linear.js.uncompressed.js +262 -0
- package/vendor/dojo-1.10.10/dojox/charting/scaler/primitive.js +23 -0
- package/vendor/dojo-1.10.10/dojox/charting/scaler/primitive.js.uncompressed.js +36 -0
- package/vendor/dojo-1.10.10/dojox/charting/themes/Claro.js +39 -0
- package/vendor/dojo-1.10.10/dojox/charting/themes/Claro.js.uncompressed.js +106 -0
- package/vendor/dojo-1.10.10/dojox/charting/themes/Wetland.js +5 -0
- package/vendor/dojo-1.10.10/dojox/charting/themes/Wetland.js.uncompressed.js +12 -0
- package/vendor/dojo-1.10.10/dojox/charting/themes/common.js +4 -0
- package/vendor/dojo-1.10.10/dojox/charting/themes/common.js.uncompressed.js +3 -0
- package/vendor/dojo-1.10.10/dojox/charting/widget/Legend.js +102 -0
- package/vendor/dojo-1.10.10/dojox/charting/widget/Legend.js.uncompressed.js +165 -0
- package/vendor/dojo-1.10.10/dojox/color/Palette.js +163 -0
- package/vendor/dojo-1.10.10/dojox/color/Palette.js.uncompressed.js +460 -0
- package/vendor/dojo-1.10.10/dojox/color/_base.js +174 -0
- package/vendor/dojo-1.10.10/dojox/color/_base.js.uncompressed.js +196 -0
- package/vendor/dojo-1.10.10/dojox/gfx/fx.js +297 -0
- package/vendor/dojo-1.10.10/dojox/gfx/fx.js.uncompressed.js +350 -0
- package/vendor/dojo-1.10.10/dojox/gfx/gradutils.js +63 -0
- package/vendor/dojo-1.10.10/dojox/gfx/gradutils.js.uncompressed.js +91 -0
- package/vendor/dojo-1.10.10/dojox/gfx/matrix.js +170 -0
- package/vendor/dojo-1.10.10/dojox/gfx/matrix.js.uncompressed.js +501 -0
- package/vendor/dojo-1.10.10/dojox/gfx/path.js +319 -0
- package/vendor/dojo-1.10.10/dojox/gfx/path.js.uncompressed.js +478 -0
- package/vendor/dojo-1.10.10/dojox/gfx/shape.js +459 -0
- package/vendor/dojo-1.10.10/dojox/gfx/shape.js.uncompressed.js +1091 -0
- package/vendor/dojo-1.10.10/dojox/gfx/svg.js +662 -0
- package/vendor/dojo-1.10.10/dojox/gfx/svg.js.uncompressed.js +1023 -0
- package/vendor/dojo-1.10.10/dojox/gfx/utils.js +199 -0
- package/vendor/dojo-1.10.10/dojox/gfx/utils.js.uncompressed.js +322 -0
- package/vendor/dojo-1.10.10/dojox/gfx.js +2 -0
- package/vendor/dojo-1.10.10/dojox/gfx.js.uncompressed.js +1136 -0
- package/vendor/dojo-1.10.10/dojox/lang/functional/array.js +151 -0
- package/vendor/dojo-1.10.10/dojox/lang/functional/array.js.uncompressed.js +169 -0
- package/vendor/dojo-1.10.10/dojox/lang/functional/fold.js +93 -0
- package/vendor/dojo-1.10.10/dojox/lang/functional/fold.js.uncompressed.js +125 -0
- package/vendor/dojo-1.10.10/dojox/lang/functional/lambda.js +81 -0
- package/vendor/dojo-1.10.10/dojox/lang/functional/lambda.js.uncompressed.js +132 -0
- package/vendor/dojo-1.10.10/dojox/lang/functional/object.js +54 -0
- package/vendor/dojo-1.10.10/dojox/lang/functional/object.js.uncompressed.js +78 -0
- package/vendor/dojo-1.10.10/dojox/lang/functional/reversed.js +61 -0
- package/vendor/dojo-1.10.10/dojox/lang/functional/reversed.js.uncompressed.js +77 -0
- package/vendor/dojo-1.10.10/dojox/lang/functional/scan.js +87 -0
- package/vendor/dojo-1.10.10/dojox/lang/functional/scan.js.uncompressed.js +107 -0
- package/vendor/dojo-1.10.10/dojox/lang/functional.js +4 -0
- package/vendor/dojo-1.10.10/dojox/lang/functional.js.uncompressed.js +3 -0
- package/vendor/dojo-1.10.10/dojox/lang/utils.js +86 -0
- package/vendor/dojo-1.10.10/dojox/lang/utils.js.uncompressed.js +121 -0
- package/vendor/dojo-1.10.10/dojox/main.js +4 -0
- package/vendor/dojo-1.10.10/dojox/main.js.uncompressed.js +14 -0
- package/vendor/dojo-1.10.10/dojox/storage/LocalStorageProvider.js +112 -0
- package/vendor/dojo-1.10.10/dojox/storage/LocalStorageProvider.js.uncompressed.js +208 -0
- package/vendor/dojo-1.10.10/dojox/storage/Provider.js +62 -0
- package/vendor/dojo-1.10.10/dojox/storage/Provider.js.uncompressed.js +344 -0
- package/vendor/dojo-1.10.10/dojox/storage/manager.js +110 -0
- package/vendor/dojo-1.10.10/dojox/storage/manager.js.uncompressed.js +263 -0
package/package.json
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datagrok/helm",
|
|
3
3
|
"friendlyName": "Helm",
|
|
4
|
-
"version": "2.3.
|
|
4
|
+
"version": "2.3.4",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Oleksandra Serhiienko",
|
|
7
7
|
"email": "oserhiienko@datagrok.ai"
|
|
8
8
|
},
|
|
9
9
|
"description": "Provides support for HELM notation (importing, detecting, rendering, conversion).",
|
|
10
10
|
"sources-backup": [
|
|
11
|
+
"https://ajax.googleapis.com/ajax/libs/dojo/1.10.4/dojo/dojo.js.uncompressed.js",
|
|
11
12
|
"helm/JSDraw/Scilligence.JSDraw2.Lite-uncompressed.js",
|
|
12
13
|
"helm/JSDraw/Pistoia.HELM-uncompressed.js"
|
|
13
14
|
],
|
|
14
15
|
"sources": [
|
|
15
|
-
"https://ajax.googleapis.com/ajax/libs/dojo/1.10.4/dojo/dojo.js.uncompressed.js",
|
|
16
16
|
"css/helm.css"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@datagrok-libraries/bio": "^5.42.
|
|
19
|
+
"@datagrok-libraries/bio": "^5.42.6",
|
|
20
20
|
"@datagrok-libraries/chem-meta": "^1.2.5",
|
|
21
|
-
"@datagrok-libraries/utils": "^4.2.
|
|
21
|
+
"@datagrok-libraries/utils": "^4.2.19",
|
|
22
22
|
"cash-dom": "^8.1.1",
|
|
23
23
|
"datagrok-api": "^1.20.0",
|
|
24
24
|
"dayjs": "^1.10.6",
|
package/src/cell-renderer.ts
CHANGED
|
@@ -14,7 +14,7 @@ import {HelmMonomerPlacer} from './helm-monomer-placer';
|
|
|
14
14
|
import {getHoveredMonomerFallback, getHoveredMonomerFromEditorMol} from './utils/get-hovered';
|
|
15
15
|
import {JSDraw2HelmModule} from './types';
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
import {_package} from './package';
|
|
18
18
|
|
|
19
19
|
declare const JSDraw2: JSDraw2HelmModule;
|
|
20
20
|
|
|
@@ -49,6 +49,7 @@ export class HelmCellRenderer extends DG.GridCellRenderer {
|
|
|
49
49
|
const argsX = e.offsetX - gcb.x;
|
|
50
50
|
const argsY = e.offsetY - gcb.y;
|
|
51
51
|
|
|
52
|
+
const monomerLib = _package.monomerLib;
|
|
52
53
|
const editorMol: Mol<HelmType> | null = helmPlacer.getEditorMol(gridCell.tableRowIndex!);
|
|
53
54
|
let seqMonomer: ISeqMonomer | null;
|
|
54
55
|
let missedMonomers: Set<string> = new Set<string>(); // of .size = 0
|
|
@@ -57,7 +58,7 @@ export class HelmCellRenderer extends DG.GridCellRenderer {
|
|
|
57
58
|
else {
|
|
58
59
|
const seq: string = !gridCell.cell.value ? '' : removeGapsFromHelm(gridCell.cell.value as string);
|
|
59
60
|
const monomerList = parseHelm(seq);
|
|
60
|
-
missedMonomers = findMonomers(monomerList);
|
|
61
|
+
missedMonomers = findMonomers(monomerList, monomerLib);
|
|
61
62
|
const parsedMonomers = new Set<string>(monomerList);
|
|
62
63
|
seqMonomer = getHoveredMonomerFallback(argsX, argsY, gridCell, helmPlacer);
|
|
63
64
|
if (seqMonomer && !parsedMonomers.has(seqMonomer.symbol)) seqMonomer = null;
|
|
@@ -76,7 +77,6 @@ export class HelmCellRenderer extends DG.GridCellRenderer {
|
|
|
76
77
|
if (seqMonomer) {
|
|
77
78
|
if (!missedMonomers.has(seqMonomer.symbol)) {
|
|
78
79
|
const tooltipElements: HTMLElement[] = [ui.div(seqMonomer.symbol)];
|
|
79
|
-
const monomerLib = getMonomerLib();
|
|
80
80
|
const monomerDiv = monomerLib ? monomerLib.getTooltip(seqMonomer.polymerType, seqMonomer.symbol) :
|
|
81
81
|
ui.divText('Monomer library is not available.');
|
|
82
82
|
tooltipElements.push(monomerDiv);
|
|
@@ -128,7 +128,8 @@ export class HelmCellRenderer extends DG.GridCellRenderer {
|
|
|
128
128
|
const seq: string = !gridCell.cell.value ? '' : removeGapsFromHelm(gridCell.cell.value);
|
|
129
129
|
const monomerList = parseHelm(seq);
|
|
130
130
|
const monomers: Set<string> = new Set<string>(monomerList);
|
|
131
|
-
const
|
|
131
|
+
const monomerLib = _package.monomerLib;
|
|
132
|
+
const missedMonomers: Set<string> = findMonomers(monomerList, monomerLib);
|
|
132
133
|
|
|
133
134
|
if (missedMonomers.size == 0) {
|
|
134
135
|
// Recreate host to avoid hanging in window.dojox.gfx.svg.Text.prototype.getTextWidth
|
package/src/helm-helper.ts
CHANGED
|
@@ -62,16 +62,16 @@ export class HelmHelper implements IHelmHelper {
|
|
|
62
62
|
mexfilter: true
|
|
63
63
|
});
|
|
64
64
|
const sizes = webEditorApp.calculateSizes();
|
|
65
|
-
webEditorApp.canvas
|
|
65
|
+
webEditorApp.canvas!.resize(sizes.rightwidth - 100, sizes.topheight - 210);
|
|
66
66
|
let s: Partial<CSSStyleDeclaration> = {width: sizes.rightwidth - 100 + 'px', height: sizes.bottomheight + 'px'};
|
|
67
67
|
scil.apply(webEditorApp.sequence.style, s);
|
|
68
|
-
scil.apply(webEditorApp.notation
|
|
68
|
+
scil.apply(webEditorApp.notation!.style, s);
|
|
69
69
|
s = {width: sizes.rightwidth + 'px', height: (sizes.bottomheight + webEditorApp.toolbarheight) + 'px'};
|
|
70
|
-
scil.apply(webEditorApp.properties
|
|
71
|
-
webEditorApp.structureview
|
|
72
|
-
webEditorApp.mex
|
|
70
|
+
scil.apply(webEditorApp.properties!.parent.style, s);
|
|
71
|
+
webEditorApp.structureview!.resize(sizes.rightwidth, sizes.bottomheight + webEditorApp.toolbarheight);
|
|
72
|
+
webEditorApp.mex!.resize(sizes.topheight - 80);
|
|
73
73
|
setTimeout(() => {
|
|
74
|
-
webEditorApp.canvas
|
|
74
|
+
webEditorApp.canvas!.helm!.setSequence(helm, 'HELM');
|
|
75
75
|
}, 200);
|
|
76
76
|
return webEditorApp;
|
|
77
77
|
}
|
|
@@ -10,7 +10,7 @@ import {CellRendererBackBase} from '@datagrok-libraries/bio/src/utils/cell-rende
|
|
|
10
10
|
|
|
11
11
|
import {getParts, parseHelm} from './utils';
|
|
12
12
|
|
|
13
|
-
import {_package
|
|
13
|
+
import {_package} from './package';
|
|
14
14
|
|
|
15
15
|
export class HelmMonomerPlacer extends CellRendererBackBase<string> {
|
|
16
16
|
private _allPartsList: (string[] | null)[];
|
package/src/helm-web-editor.ts
CHANGED
|
@@ -64,14 +64,14 @@ export function buildWebEditorApp(view: HTMLDivElement): App {
|
|
|
64
64
|
mexfilter: true
|
|
65
65
|
});
|
|
66
66
|
const sizes = app.calculateSizes();
|
|
67
|
-
app.canvas
|
|
67
|
+
app.canvas!.resize(sizes.rightwidth - 100, sizes.topheight - 210);
|
|
68
68
|
let s = {width: sizes.rightwidth - 100 + 'px', height: sizes.bottomheight + 'px'};
|
|
69
69
|
scil.apply(app.sequence.style, s);
|
|
70
|
-
scil.apply(app.notation
|
|
70
|
+
scil.apply(app.notation!.style, s);
|
|
71
71
|
s = {width: sizes.rightwidth + 'px', height: (sizes.bottomheight + app.toolbarheight) + 'px'};
|
|
72
|
-
scil.apply(app.properties
|
|
73
|
-
app.structureview
|
|
74
|
-
app.mex
|
|
72
|
+
scil.apply(app.properties!.parent.style, s);
|
|
73
|
+
app.structureview!.resize(sizes.rightwidth, sizes.bottomheight + app.toolbarheight);
|
|
74
|
+
app.mex!.resize(sizes.topheight - 80);
|
|
75
75
|
|
|
76
76
|
return app;
|
|
77
77
|
}
|
package/src/package-test.ts
CHANGED
|
@@ -6,7 +6,6 @@ import * as grok from 'datagrok-api/grok';
|
|
|
6
6
|
// import {HelmType, OrgHelmModuleType} from '@datagrok/helm-web-editor/src/types/org-helm';
|
|
7
7
|
|
|
8
8
|
import {runTests, tests, TestContext} from '@datagrok-libraries/utils/src/test';
|
|
9
|
-
import {getHelmHelper} from '@datagrok-libraries/bio/src/helm/helm-helper';
|
|
10
9
|
|
|
11
10
|
import './tests/_first-tests';
|
|
12
11
|
import './tests/helm-tests';
|
package/src/package-utils.ts
CHANGED
|
@@ -2,19 +2,23 @@ import * as ui from 'datagrok-api/ui';
|
|
|
2
2
|
import * as grok from 'datagrok-api/grok';
|
|
3
3
|
import * as DG from 'datagrok-api/dg';
|
|
4
4
|
|
|
5
|
+
import {Unsubscribable} from 'rxjs';
|
|
6
|
+
|
|
5
7
|
import {delay, timeout} from '@datagrok-libraries/utils/src/test';
|
|
6
8
|
import {errInfo} from '@datagrok-libraries/bio/src/utils/err-info';
|
|
7
|
-
import
|
|
8
|
-
DojoType, DojoxType, IOrgHelmWebEditor, Monomers
|
|
9
|
+
import {
|
|
10
|
+
DojoType, DojoxType, HweWindow, IOrgHelmWebEditor, Monomers
|
|
9
11
|
} from '@datagrok-libraries/bio/src/helm/types';
|
|
10
12
|
import {HelmServiceBase} from '@datagrok-libraries/bio/src/viewers/helm-service';
|
|
11
13
|
import {IMonomerLib} from '@datagrok-libraries/bio/src/types';
|
|
12
14
|
import {LoggerWrapper} from '@datagrok-libraries/bio/src/utils/logger';
|
|
13
|
-
import {IMonomerLibHelper} from '@datagrok-libraries/bio/src/monomer-works/monomer-utils';
|
|
15
|
+
import {getMonomerLibHelper, IMonomerLibHelper} from '@datagrok-libraries/bio/src/monomer-works/monomer-utils';
|
|
16
|
+
import {errorToConsole} from '@datagrok-libraries/utils/src/to-console';
|
|
14
17
|
|
|
15
18
|
import {HelmHelper} from './helm-helper';
|
|
16
19
|
import {HelmService} from './utils/helm-service';
|
|
17
20
|
import {OrgHelmModule, ScilModule} from './types';
|
|
21
|
+
import {rewriteLibraries} from './utils/get-monomer';
|
|
18
22
|
|
|
19
23
|
import {_package} from './package';
|
|
20
24
|
|
|
@@ -23,13 +27,17 @@ declare const dojox: DojoxType;
|
|
|
23
27
|
declare const scil: ScilModule;
|
|
24
28
|
declare const org: OrgHelmModule;
|
|
25
29
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
type DojoConfigWindowType = {
|
|
31
|
+
dojoConfig: {
|
|
32
|
+
packages?: (string | { name: string, location: string })[],
|
|
33
|
+
deps?: string[], callback: Function, has?: any, parseOnLoad?: boolean, async?: boolean | string, locale?: string,
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
type HelmWindowType = {
|
|
30
37
|
$helmService?: HelmServiceBase,
|
|
31
|
-
|
|
32
|
-
|
|
38
|
+
require: Function,
|
|
39
|
+
};
|
|
40
|
+
declare const window: Window & DojoConfigWindowType & HweWindow & HelmWindowType;
|
|
33
41
|
|
|
34
42
|
export function _getHelmService(): HelmServiceBase {
|
|
35
43
|
let res = window.$helmService;
|
|
@@ -41,66 +49,124 @@ export async function initHelmLoadAndPatchDojo(): Promise<void> {
|
|
|
41
49
|
const logPrefix = `Helm: _package.initHelmPatchDojo()`;
|
|
42
50
|
// patch window.dojox.gfx.svg.Text.prototype.getTextWidth hangs
|
|
43
51
|
/** get the text width in pixels */
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
{
|
|
52
|
-
{
|
|
53
|
-
{
|
|
54
|
-
{
|
|
55
|
-
// {
|
|
56
|
-
|
|
52
|
+
const pi = DG.TaskBarProgressIndicator.create('Loading Helm Web Editor ...');
|
|
53
|
+
try {
|
|
54
|
+
await delay(2000);
|
|
55
|
+
const requireBackup = window.require;
|
|
56
|
+
|
|
57
|
+
// dojo.window','dojo.io.script','dojo.io.iframe','dojo.dom','dojox.gfx','dojox.gfx.svg','dojox.gfx.shape','dojox.charting'
|
|
58
|
+
const dojoTargetList: { name: string, checker: () => boolean }[] = [
|
|
59
|
+
{name: 'dojo.window', checker: () => !!dojo?.window},
|
|
60
|
+
{name: 'dojo.ready', checker: () => !!dojo?.ready},
|
|
61
|
+
{name: 'dojo.io.script', checker: () => !!dojo?.io?.script},
|
|
62
|
+
{name: 'dojo.io.iframe', checker: () => !!dojo?.io?.iframe},
|
|
63
|
+
// {name: 'dojo.dom', checker: () => !!dojo?.dom},
|
|
64
|
+
{name: 'dojox.gfx', checker: () => !!dojox?.gfx},
|
|
65
|
+
{name: 'dojox.gfx.svg', checker: () => !!dojox?.gfx?.svg},
|
|
66
|
+
{name: 'dojox.gfx.createSurface', checker: () => !!dojox?.gfx?.createSurface},
|
|
67
|
+
{name: 'dojox.gfx.shape', checker: () => !!dojox?.gfx?.shape},
|
|
68
|
+
{name: 'dojox.storage.Provider', checker: () => !!dojox?.storage?.Provider},
|
|
69
|
+
{name: 'dojox.storage.LocalStorageProvider', checker: () => !!dojox?.storage?.LocalStorageProvider},
|
|
70
|
+
// {name: 'dojox.charting', checker: () => !!dojox.charting},
|
|
71
|
+
// {name: 'dojox.charting.themes.Claro', checker: () => !!dojox.charting?.themes?.Claro},
|
|
72
|
+
// {name: 'dojox.charting.themes.Wetland', checker: () => !!dojox.charting?.themes?.Wetland},
|
|
73
|
+
// {name: 'dojox.charting.plot2d.Base', checker: () => !!dojox.charting?.plot2d?.Base},
|
|
74
|
+
// {name: 'dojox.charting.Series', checker: () => !!dojox?.charting?.Series},
|
|
75
|
+
// {name: 'dojox.charting.Chart2D', checker: () => !!dojox?.charting?.Chart2D},
|
|
57
76
|
];
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
const getDojoProgress = (): string[] => {
|
|
64
|
-
return dojoTargetList.filter((dt) => !dt.checker()).map((dt) => dt.module);
|
|
77
|
+
/** Gets list ofd modules not ready yet */
|
|
78
|
+
const getDojoNotReadyList = (): string[] => {
|
|
79
|
+
return dojoTargetList.filter((dt) => !dt.checker()).map((dt) => dt.name);
|
|
65
80
|
};
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
81
|
+
|
|
82
|
+
try {
|
|
83
|
+
await timeout(async () => {
|
|
84
|
+
|
|
85
|
+
await new Promise<void>((resolve, reject) => {
|
|
86
|
+
window.dojoConfig = {
|
|
87
|
+
callback: () => { resolve(); },
|
|
88
|
+
parseOnLoad: true,
|
|
89
|
+
async: false,
|
|
90
|
+
locale: 'en-us', // to limit dijit/nls file set
|
|
91
|
+
};
|
|
92
|
+
// Load dojo without package/sources section for the settings dojoConfig to take effect
|
|
93
|
+
DG.Utils.loadJsCss([
|
|
94
|
+
// 'https://ajax.googleapis.com/ajax/libs/dojo/1.10.4/dojo/dojo.js.uncompressed.js',
|
|
95
|
+
`${_package.webRoot}/vendor/dojo-1.10.10/dojo/dojo.js.uncompressed.js`,
|
|
96
|
+
]).then(() => {});
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
const dojoRequire = window.require;
|
|
100
|
+
const cmp = dojoRequire == requireBackup;
|
|
101
|
+
try {
|
|
102
|
+
await new Promise<void>((resolve, reject) => {
|
|
103
|
+
dojoRequire(['dojo/window', 'dojo/dom', 'dojo/io/script', 'dojo/io/iframe',
|
|
104
|
+
'dojox/gfx', 'dojox/gfx/svg', 'dojox/gfx/shape',
|
|
105
|
+
'dojox/storage/Provider', 'dojox/storage/LocalStorageProvider',
|
|
106
|
+
'dijit/_base', 'dijit/Tooltip', 'dijit/form/_FormValueWidget',
|
|
107
|
+
'dijit/form/DropDownButton', 'dijit/layout/AccordionContainer', 'dijit/form/ComboButton',
|
|
108
|
+
'dijit/layout/StackController', 'dijit/layout/StackContainer',
|
|
109
|
+
],
|
|
110
|
+
(...args: any[]) => {
|
|
111
|
+
resolve();
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
} finally {
|
|
115
|
+
// TODO: Check interference with NGL
|
|
116
|
+
window.require = function(...args: any[]) {
|
|
117
|
+
_package.logger.debug(`${logPrefix}, window.require( ${JSON.stringify(args)} )`);
|
|
118
|
+
dojoRequire(...args);
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** List of dojo modules not ready yet */ let dojoNotReadyList: string[];
|
|
123
|
+
while ((dojoNotReadyList = getDojoNotReadyList()).length > 0) {
|
|
124
|
+
const dojoProgress = dojoTargetList.length - dojoNotReadyList.length;
|
|
125
|
+
pi.update(Math.round(100 * dojoProgress / dojoTargetList.length),
|
|
126
|
+
`Loading Helm Web Editor ${dojoProgress}/${dojoTargetList.length}`);
|
|
127
|
+
_package.logger.debug(`${logPrefix}, dojo loading ... ${dojoNotReadyList.map((m) => `'${m}'`).join(',')} ...`);
|
|
128
|
+
await delay(100);
|
|
129
|
+
}
|
|
130
|
+
_package.logger.debug(`${logPrefix}, dojo ready all modules`);
|
|
131
|
+
}, 60000, 'timeout dojox.gfx.svg');
|
|
132
|
+
} catch (err: any) {
|
|
133
|
+
const dojoNotReadyList = getDojoNotReadyList();
|
|
134
|
+
_package.logger.error(`${logPrefix}, dojo not ready ${dojoNotReadyList.map((m) => `'${m}'`).join(',')} ...`);
|
|
70
135
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
_width = 68;
|
|
136
|
+
|
|
137
|
+
_package.logger.debug(`${logPrefix}, patch window.dojox.gfx.svg.Text.prototype.getTextWidth`);
|
|
138
|
+
// @ts-ignore
|
|
139
|
+
window.dojox.gfx.svg.Text.prototype.getTextWidth = function() {
|
|
140
|
+
// Patched via Datagrok Helm package
|
|
141
|
+
const rawNode = this.rawNode;
|
|
142
|
+
const oldParent = rawNode.parentNode;
|
|
143
|
+
const _measurementNode = rawNode.cloneNode(true);
|
|
144
|
+
_measurementNode.style.visibility = 'hidden';
|
|
145
|
+
|
|
146
|
+
// solution to the "orphan issue" in FF
|
|
147
|
+
let _width = 0;
|
|
148
|
+
const _text = _measurementNode.firstChild.nodeValue;
|
|
149
|
+
oldParent.appendChild(_measurementNode);
|
|
150
|
+
|
|
151
|
+
// solution to the "orphan issue" in Opera
|
|
152
|
+
// (nodeValue == "" hangs firefox)
|
|
153
|
+
if (_text != '') {
|
|
154
|
+
let watchdogCounter = 100;
|
|
155
|
+
while (!_width && --watchdogCounter > 0) { // <-- hangs
|
|
156
|
+
//Yang: work around svgweb bug 417 -- http://code.google.com/p/svgweb/issues/detail?id=417
|
|
157
|
+
if (_measurementNode.getBBox)
|
|
158
|
+
_width = parseInt(_measurementNode.getBBox().width);
|
|
159
|
+
else
|
|
160
|
+
_width = 68;
|
|
161
|
+
}
|
|
98
162
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
163
|
+
oldParent.removeChild(_measurementNode);
|
|
164
|
+
return _width;
|
|
165
|
+
};
|
|
166
|
+
_package.logger.debug(`${logPrefix}, end`);
|
|
167
|
+
} finally {
|
|
168
|
+
pi.close();
|
|
169
|
+
}
|
|
104
170
|
}
|
|
105
171
|
|
|
106
172
|
export const helmJsonReplacer = (key: string, value: any): any => {
|
|
@@ -126,8 +192,31 @@ export class HelmPackage extends DG.Package {
|
|
|
126
192
|
this.helmHelper = new HelmHelper(this.logger);
|
|
127
193
|
}
|
|
128
194
|
|
|
129
|
-
|
|
130
|
-
|
|
195
|
+
// -- Init --
|
|
196
|
+
/** Loads Dojo and HelmWebEditor, waits for init, patches */
|
|
197
|
+
async initHELMWebEditor(): Promise<void> {
|
|
198
|
+
const logPrefix: string = 'Helm: Package.initDojo()';
|
|
199
|
+
|
|
200
|
+
_package.logger.debug(`${logPrefix}, dependence loading …`);
|
|
201
|
+
const t1: number = performance.now();
|
|
202
|
+
|
|
203
|
+
_package.logger.debug(`${logPrefix}, dojox loading and patching …`);
|
|
204
|
+
await initHelmLoadAndPatchDojo();
|
|
205
|
+
_package.logger.debug(`${logPrefix}, dojox loaded and patched`);
|
|
206
|
+
|
|
207
|
+
// Alternatively load old bundles by package.json/sources
|
|
208
|
+
_package.logger.debug(`${logPrefix}, HelmWebEditor awaiting …`);
|
|
209
|
+
require('../node_modules/@datagrok-libraries/helm-web-editor/dist/package.js');
|
|
210
|
+
await window.helmWebEditor$.initPromise;
|
|
211
|
+
_package.logger.debug(`${logPrefix}, HelmWebEditor loaded`);
|
|
212
|
+
|
|
213
|
+
org.helm.webeditor.kCaseSensitive = true; // GROK-13880
|
|
214
|
+
|
|
215
|
+
_package.logger.debug(`${logPrefix}, scil.Utils.alert patch`);
|
|
216
|
+
_package.initHelmPatchScilAlert(); // patch immediately
|
|
217
|
+
|
|
218
|
+
const t2: number = performance.now();
|
|
219
|
+
_package.logger.debug(`${logPrefix}, dependence loaded, ET: ${(t2 - t1)} ms`);
|
|
131
220
|
}
|
|
132
221
|
|
|
133
222
|
public initHelmPatchScilAlert(): void {
|
|
@@ -139,13 +228,13 @@ export class HelmPackage extends DG.Package {
|
|
|
139
228
|
}
|
|
140
229
|
|
|
141
230
|
/** Patches Pistoia Monomers.getMonomer method to utilize DG Bio monomer Lib */
|
|
142
|
-
public
|
|
231
|
+
public initHelmPatchPistoia(): void {
|
|
143
232
|
const logPrefix: string = 'Helm: initHelmPatchPistoia()';
|
|
144
233
|
const monomers = org.helm.webeditor.Monomers;
|
|
145
234
|
|
|
146
235
|
this.logger.debug(`${logPrefix}, this.getMonomerOriginal stored`);
|
|
147
236
|
|
|
148
|
-
this.helmHelper.overrideGetMonomer(this.helmHelper.buildGetMonomerFromLib(monomerLib));
|
|
237
|
+
this.helmHelper.overrideGetMonomer(this.helmHelper.buildGetMonomerFromLib(this.monomerLib));
|
|
149
238
|
|
|
150
239
|
// @ts-ignore, intercept with proxy to observe access and usage
|
|
151
240
|
org.helm.webeditor.Monomers = new class {
|
|
@@ -186,4 +275,57 @@ export class HelmPackage extends DG.Package {
|
|
|
186
275
|
}
|
|
187
276
|
}(org.helm.webeditor) as IOrgHelmWebEditor;
|
|
188
277
|
}
|
|
278
|
+
|
|
279
|
+
// -- MonomerLib --
|
|
280
|
+
|
|
281
|
+
public get monomerLib(): IMonomerLib {
|
|
282
|
+
if (!this.libHelper)
|
|
283
|
+
throw new Error(`Helm: _package.libHelper is not initialized yet`);
|
|
284
|
+
return this.libHelper.getBioLib();
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
private _monomerLibSub: Unsubscribable;
|
|
288
|
+
|
|
289
|
+
async initMonomerLibHelper(): Promise<void> {
|
|
290
|
+
if (!!this.libHelper)
|
|
291
|
+
throw new Error(`Helm: _package.libHelper is initialized already`);
|
|
292
|
+
|
|
293
|
+
this.libHelper = await getMonomerLibHelper();
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/** Requires both Bio & HELMWebEditor initialized */
|
|
297
|
+
async initMonomerLib(): Promise<void> {
|
|
298
|
+
const lib = this.monomerLib;
|
|
299
|
+
rewriteLibraries(lib); // initHelm()
|
|
300
|
+
this._monomerLibSub = lib.onChanged
|
|
301
|
+
.subscribe(this.monomerLibOnChangedHandler.bind(this));
|
|
302
|
+
|
|
303
|
+
this.initHelmPatchPistoia();
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
monomerLibOnChangedHandler(): void {
|
|
307
|
+
const logPrefix = `Helm: _package.monomerLibOnChangedHandler()`;
|
|
308
|
+
try {
|
|
309
|
+
const libSummary = this.monomerLib.getSummaryObj();
|
|
310
|
+
const isLibEmpty = Object.keys(libSummary).length == 0;
|
|
311
|
+
const libSummaryLog = isLibEmpty ? 'empty' : Object.entries(libSummary)
|
|
312
|
+
.map(([pt, count]) => `${pt}: ${count}`)
|
|
313
|
+
.join(', ');
|
|
314
|
+
_package.logger.debug(`${logPrefix}, start, lib: { ${libSummaryLog} }`);
|
|
315
|
+
|
|
316
|
+
const libSummaryHtml = isLibEmpty ? 'empty' : Object.entries(libSummary)
|
|
317
|
+
.map(([pt, count]) => `${pt} ${count}`)
|
|
318
|
+
.join('<br />');
|
|
319
|
+
const libMsg: string = `Monomer lib updated:<br /> ${libSummaryHtml}`;
|
|
320
|
+
grok.shell.info(libMsg);
|
|
321
|
+
|
|
322
|
+
_package.logger.debug(`${logPrefix}, org,helm.webeditor.Monomers updating ...`);
|
|
323
|
+
rewriteLibraries(this.monomerLib); // initHelm() monomerLib.onChanged()
|
|
324
|
+
_package.logger.debug(`${logPrefix}, end, org.helm.webeditor.Monomers completed`);
|
|
325
|
+
} catch (err: any) {
|
|
326
|
+
const errMsg = errorToConsole(err);
|
|
327
|
+
console.error(`${logPrefix} error:\n` + errMsg);
|
|
328
|
+
// throw err; // Prevent disabling event handler
|
|
329
|
+
}
|
|
330
|
+
}
|
|
189
331
|
}
|
package/src/package.ts
CHANGED
|
@@ -28,7 +28,7 @@ import {getRS} from './utils/get-monomer-dummy';
|
|
|
28
28
|
import {buildWebEditorApp} from './helm-web-editor';
|
|
29
29
|
import {JSDraw2HelmModule, OrgHelmModule, ScilModule} from './types';
|
|
30
30
|
|
|
31
|
-
export const _package = new HelmPackage({debug:
|
|
31
|
+
export const _package = new HelmPackage(/*{debug: true}/**/);
|
|
32
32
|
|
|
33
33
|
let monomerLib: IMonomerLib | null = null;
|
|
34
34
|
|
|
@@ -51,71 +51,14 @@ export async function initHelm(): Promise<void> {
|
|
|
51
51
|
_package.logger.debug(`${logPrefix}, start`);
|
|
52
52
|
|
|
53
53
|
try {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
_package.logger.debug(`${logPrefix}, dojox loading and patching …`);
|
|
61
|
-
await initHelmLoadAndPatchDojo();
|
|
62
|
-
_package.logger.debug(`${logPrefix}, dojox loaded and patched`);
|
|
63
|
-
|
|
64
|
-
// Alternatively load old bundles by package.json/sources
|
|
65
|
-
_package.logger.debug(`${logPrefix}, HelmWebEditor awaiting …`);
|
|
66
|
-
require('../node_modules/@datagrok-libraries/helm-web-editor/dist/package.js');
|
|
67
|
-
await window.helmWebEditor$.initPromise;
|
|
68
|
-
_package.logger.debug(`${logPrefix}, HelmWebEditor loaded`);
|
|
69
|
-
|
|
70
|
-
org.helm.webeditor.kCaseSensitive = true; // GROK-13880
|
|
71
|
-
|
|
72
|
-
_package.logger.debug(`${logPrefix}, scil.Utils.alert patch`);
|
|
73
|
-
_package.initHelmPatchScilAlert(); // patch immediately
|
|
74
|
-
|
|
75
|
-
const t2: number = performance.now();
|
|
76
|
-
_package.logger.debug(`${logPrefix}, dependence loaded, ET: ${(t2 - t1)} ms`);
|
|
77
|
-
})()
|
|
78
|
-
]).then(() => {
|
|
79
|
-
|
|
80
|
-
// settings
|
|
81
|
-
}),
|
|
82
|
-
(async () => {
|
|
83
|
-
const libHelper = await getMonomerLibHelper();
|
|
84
|
-
_package.setLibHelper(libHelper);
|
|
85
|
-
return libHelper.getBioLib();
|
|
86
|
-
})()
|
|
87
|
-
]);
|
|
54
|
+
await Promise.all([
|
|
55
|
+
_package.initHELMWebEditor(),
|
|
56
|
+
_package.initMonomerLibHelper(),
|
|
57
|
+
]).then(() => {
|
|
58
|
+
_package.initMonomerLib();
|
|
59
|
+
});
|
|
88
60
|
|
|
89
61
|
_package.logger.debug(`${logPrefix}, then(), lib loaded`);
|
|
90
|
-
monomerLib = lib;
|
|
91
|
-
// rewriteLibraries(); // initHelm()
|
|
92
|
-
await _package.initHelmPatchPistoia(monomerLib);
|
|
93
|
-
|
|
94
|
-
monomerLib.onChanged.subscribe((_) => {
|
|
95
|
-
const logPrefixInt = `${logPrefix} monomerLib.onChanged()`;
|
|
96
|
-
try {
|
|
97
|
-
const libSummary = monomerLib!.getSummaryObj();
|
|
98
|
-
const isLibEmpty = Object.keys(libSummary).length == 0;
|
|
99
|
-
const libSummaryLog = isLibEmpty ? 'empty' : Object.entries(libSummary)
|
|
100
|
-
.map(([pt, count]) => `${pt}: ${count}`)
|
|
101
|
-
.join(', ');
|
|
102
|
-
_package.logger.debug(`${logPrefixInt}, start, lib: { ${libSummaryLog} }`);
|
|
103
|
-
|
|
104
|
-
const libSummaryHtml = isLibEmpty ? 'empty' : Object.entries(libSummary)
|
|
105
|
-
.map(([pt, count]) => `${pt} ${count}`)
|
|
106
|
-
.join('<br />');
|
|
107
|
-
const libMsg: string = `Monomer lib updated:<br /> ${libSummaryHtml}`;
|
|
108
|
-
grok.shell.info(libMsg);
|
|
109
|
-
|
|
110
|
-
// _package.logger.debug(`${logPrefixInt}, org,helm.webeditor.Monomers updating ...`);
|
|
111
|
-
// rewriteLibraries(); // initHelm() monomerLib.onChanged()
|
|
112
|
-
// _package.logger.debug(`${logPrefixInt}, end, org.helm.webeditor.Monomers completed`);
|
|
113
|
-
} catch (err: any) {
|
|
114
|
-
const errMsg = errorToConsole(err);
|
|
115
|
-
console.error(`${logPrefixInt} error:\n` + errMsg);
|
|
116
|
-
// throw err; // Prevent disabling event handler
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
62
|
} catch (err: any) {
|
|
120
63
|
const [errMsg, errStack] = errInfo(err);
|
|
121
64
|
// const errMsg: string = err instanceof Error ? err.message : !!err ? err.toString() : 'Exception \'undefined\'';
|
|
@@ -129,10 +72,6 @@ export async function initHelm(): Promise<void> {
|
|
|
129
72
|
_package.logger.debug(`${logPrefix}, end`);
|
|
130
73
|
}
|
|
131
74
|
|
|
132
|
-
export function getMonomerLib(): IMonomerLib | null {
|
|
133
|
-
return monomerLib;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
75
|
//name: getHelmService
|
|
137
76
|
//output: object result
|
|
138
77
|
export function getHelmService(): HelmServiceBase {
|
|
@@ -198,14 +137,14 @@ function openWebEditor(cell: DG.Cell, value?: string, units?: string) {
|
|
|
198
137
|
setTimeout(async () => {
|
|
199
138
|
app = await buildWebEditorApp(view);
|
|
200
139
|
if (!!cell && units === undefined)
|
|
201
|
-
app.canvas
|
|
140
|
+
app.canvas!.helm!.setSequence(cell.value, 'HELM');
|
|
202
141
|
else
|
|
203
|
-
app.canvas
|
|
142
|
+
app.canvas!.helm!.setSequence(value!, 'HELM');
|
|
204
143
|
}, 20);
|
|
205
144
|
const dlg = ui.dialog({showHeader: false, showFooter: true});
|
|
206
145
|
dlg.add(view)
|
|
207
146
|
.onOK(() => {
|
|
208
|
-
const helmValue: string = app.canvas
|
|
147
|
+
const helmValue: string = app.canvas!.getHelm(true).replace(/<\/span>/g, '')
|
|
209
148
|
.replace(/<span style='background:#bbf;'>/g, '');
|
|
210
149
|
if (!!cell) {
|
|
211
150
|
if (units === undefined)
|
|
@@ -53,8 +53,9 @@ category('findMonomers', () => {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
function _testFindMonomers(testHelmValue: string, tgtMissedSet: Set<string>): void {
|
|
56
|
+
const monomerLib = monomerLibHelper.getBioLib();
|
|
56
57
|
const monomerSymbolList: string[] = parseHelm(testHelmValue);
|
|
57
|
-
const resMissedSet: Set<string> = findMonomers(monomerSymbolList);
|
|
58
|
+
const resMissedSet: Set<string> = findMonomers(monomerSymbolList, monomerLib);
|
|
58
59
|
expectObject(resMissedSet, tgtMissedSet);
|
|
59
60
|
}
|
|
60
61
|
});
|