@datagrok/helm 2.3.2 → 2.3.3
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 +12 -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 +228 -69
- package/src/package.ts +7 -69
- package/src/tests/findMonomers-tests.ts +2 -1
- package/src/tests/get-monomer-tests.ts +1 -49
- 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.3",
|
|
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
|
|
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,136 @@ 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
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
52
|
+
const pi = DG.TaskBarProgressIndicator.create('Loading Helm Web Editor ...');
|
|
53
|
+
try {
|
|
54
|
+
await delay(2000);
|
|
55
|
+
const requireBackup = window.require;
|
|
56
|
+
|
|
57
|
+
await timeout(async () => {
|
|
58
|
+
|
|
59
|
+
await new Promise<void>((resolve, reject) => {
|
|
60
|
+
window.dojoConfig = {
|
|
61
|
+
deps: [
|
|
62
|
+
// 'dojo/dom', 'dojo/window', 'dojo/io/script', 'dojo/io/iframe',
|
|
63
|
+
// 'dojox/storage/LocalStorageProvider',
|
|
64
|
+
// 'dijit/layout/ContentPane',
|
|
65
|
+
],
|
|
66
|
+
// packages: [
|
|
67
|
+
// 'dojo.ready', 'dojo.window', 'dojo.io.script', 'dojo.io.iframe', 'dojo.dom',
|
|
68
|
+
// 'dojox.gfx', 'dojox.gfx.shape',
|
|
69
|
+
// ],
|
|
70
|
+
callback: () => { resolve(); },
|
|
71
|
+
// has: {
|
|
72
|
+
// "dojo-firebug": true,
|
|
73
|
+
// "dojo-debug-messages": true,
|
|
74
|
+
// },
|
|
75
|
+
parseOnLoad: true,
|
|
76
|
+
async: false
|
|
77
|
+
};
|
|
78
|
+
// Load dojo without package/sources section for the settings dojoConfig to take effect+
|
|
79
|
+
DG.Utils.loadJsCss([
|
|
80
|
+
// 'https://ajax.googleapis.com/ajax/libs/dojo/1.10.4/dojo/dojo.js.uncompressed.js',
|
|
81
|
+
`${_package.webRoot}/vendor/dojo-1.10.10/dojo/dojo.js.uncompressed.js`,
|
|
82
|
+
]).then(() => {});
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
const dojoRequire = window.require;
|
|
86
|
+
const cmp = dojoRequire == requireBackup;
|
|
87
|
+
try {
|
|
88
|
+
await new Promise<void>((resolve, reject) => {
|
|
89
|
+
dojoRequire(['dojo/window', 'dojo/dom', 'dojo/io/script', 'dojo/io/iframe',
|
|
90
|
+
'dojox/gfx', 'dojox/gfx/svg', 'dojox/gfx/shape',
|
|
91
|
+
'dijit/_base', 'dijit/Tooltip', 'dijit/form/_FormValueWidget',
|
|
92
|
+
'dijit/form/DropDownButton', 'dijit/layout/AccordionContainer', 'dijit/form/ComboButton',
|
|
93
|
+
'dijit/layout/StackController', 'dijit/layout/StackContainer',
|
|
94
|
+
],
|
|
95
|
+
(...args: any[]) => {
|
|
96
|
+
resolve();
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
} finally {
|
|
100
|
+
window.require = function(...args: any[]) {
|
|
101
|
+
_package.logger.debug(`${logPrefix}, window.require( ${JSON.stringify(args)} )`);
|
|
102
|
+
dojoRequire(...args);
|
|
103
|
+
};
|
|
61
104
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
if (_text != '') {
|
|
91
|
-
let watchdogCounter = 100;
|
|
92
|
-
while (!_width && --watchdogCounter > 0) { // <-- hangs
|
|
93
|
-
//Yang: work around svgweb bug 417 -- http://code.google.com/p/svgweb/issues/detail?id=417
|
|
94
|
-
if (_measurementNode.getBBox)
|
|
95
|
-
_width = parseInt(_measurementNode.getBBox().width);
|
|
96
|
-
else
|
|
97
|
-
_width = 68;
|
|
105
|
+
|
|
106
|
+
//await delay(50);
|
|
107
|
+
|
|
108
|
+
// dojo.window','dojo.io.script','dojo.io.iframe','dojo.dom','dojox.gfx','dojox.gfx.svg','dojox.gfx.shape','dojox.charting'
|
|
109
|
+
const dojoTargetList: { name: string, module: string | null, checker: () => boolean }[] = [
|
|
110
|
+
{name: 'dojo.window', module: null, checker: () => !!dojo?.window},
|
|
111
|
+
{name: 'dojo.ready', module: null, checker: () => !!dojo?.ready},
|
|
112
|
+
{name: 'dojo.io.script', module: null, checker: () => !!dojo?.io?.script},
|
|
113
|
+
{name: 'dojo.io.iframe', module: null, checker: () => !!dojo?.io?.iframe},
|
|
114
|
+
// //{name: 'dojo.request.script', module: 'dojo.request.script', checker: () => !!dojo?.request?.iframe},
|
|
115
|
+
// {name: 'dojo.dom', module: 'dojo.dom', checker: () => !!dojo?.dom},
|
|
116
|
+
// {name: 'dojox.gfx', module: 'dojox.gfx', checker: () => !!dojox?.gfx},
|
|
117
|
+
// {name: 'dojox.gfx.svg', module: 'dojox.gfx.svg', checker: () => !!dojox?.gfx?.svg},
|
|
118
|
+
{name: 'dojox.gfx.createSurface', module: null, checker: () => !!dojox?.gfx?.createSurface},
|
|
119
|
+
// {name: 'dojox.gfx.shape', module: 'dojox.gfx.shape', checker: () => !!dojox?.gfx?.shape},
|
|
120
|
+
// {name: 'dojox.charting.themes.Claro', module: 'dojox.charting.themes.Claro', checker: () => !!dojox.charting?.themes?.Claro},
|
|
121
|
+
// {name: 'dojox.charting.themes.Wetland', module: 'dojox.charting.themes.Wetland', checker: () => !!dojox.charting?.themes?.Wetland},
|
|
122
|
+
// {name: 'dojox.charting.plot2d.Base', module: 'dojox.charting.plot2d.Base', checker: () => !!dojox.charting?.plot2d?.Base},
|
|
123
|
+
// {name: 'dojox.charting.Series', module: 'dojox.charting.Series', checker: () => !!dojox?.charting?.Series},
|
|
124
|
+
// {name: 'dojox.charting.Chart2D', module: 'dojox.charting.Chart2D', checker: () => !!dojox?.charting?.Chart2D},
|
|
125
|
+
// //{module: 'dojox.charting', checker: () => !!dojox.charting},
|
|
126
|
+
// // {module: 'dojox.storage.Provider', checker: () => !!dojox?.storage?.Provider},
|
|
127
|
+
// // {module: 'dojox.storage.LocalStorageProvider', checker: () => !!dojox?.storage?.LocalStorageProvider},
|
|
128
|
+
];
|
|
129
|
+
for (const dojoTarget of dojoTargetList) {
|
|
130
|
+
try { if (dojoTarget.module) dojo.require(dojoTarget.module); } catch (err: any) {
|
|
131
|
+
_package.logger.error(err.message);
|
|
132
|
+
}
|
|
98
133
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
134
|
+
/** Gets list ofd modules not ready yet */
|
|
135
|
+
const getDojoNotReadyList = (): string[] => {
|
|
136
|
+
return dojoTargetList.filter((dt) => !dt.checker()).map((dt) => dt.name);
|
|
137
|
+
};
|
|
138
|
+
/** List of dojo modules not ready yet */ let dojoNotReadyList: string[];
|
|
139
|
+
while ((dojoNotReadyList = getDojoNotReadyList()).length > 0) {
|
|
140
|
+
const dojoProgress = dojoTargetList.length - dojoNotReadyList.length;
|
|
141
|
+
pi.update(Math.round(100 * dojoProgress / dojoTargetList.length),
|
|
142
|
+
`Loading Helm Web Editor ${dojoProgress}/${dojoTargetList.length}`);
|
|
143
|
+
_package.logger.debug(`${logPrefix}, dojo loading ... ${dojoNotReadyList.map((m) => `'${m}'`).join(',')} ...`);
|
|
144
|
+
await delay(100);
|
|
145
|
+
}
|
|
146
|
+
_package.logger.debug(`${logPrefix}, dojo ready all modules`);
|
|
147
|
+
}, 60000, 'timeout dojox.gfx.svg');
|
|
148
|
+
|
|
149
|
+
_package.logger.debug(`${logPrefix}, patch window.dojox.gfx.svg.Text.prototype.getTextWidth`);
|
|
150
|
+
// @ts-ignore
|
|
151
|
+
window.dojox.gfx.svg.Text.prototype.getTextWidth = function() {
|
|
152
|
+
// Patched via Datagrok Helm package
|
|
153
|
+
const rawNode = this.rawNode;
|
|
154
|
+
const oldParent = rawNode.parentNode;
|
|
155
|
+
const _measurementNode = rawNode.cloneNode(true);
|
|
156
|
+
_measurementNode.style.visibility = 'hidden';
|
|
157
|
+
|
|
158
|
+
// solution to the "orphan issue" in FF
|
|
159
|
+
let _width = 0;
|
|
160
|
+
const _text = _measurementNode.firstChild.nodeValue;
|
|
161
|
+
oldParent.appendChild(_measurementNode);
|
|
162
|
+
|
|
163
|
+
// solution to the "orphan issue" in Opera
|
|
164
|
+
// (nodeValue == "" hangs firefox)
|
|
165
|
+
if (_text != '') {
|
|
166
|
+
let watchdogCounter = 100;
|
|
167
|
+
while (!_width && --watchdogCounter > 0) { // <-- hangs
|
|
168
|
+
//Yang: work around svgweb bug 417 -- http://code.google.com/p/svgweb/issues/detail?id=417
|
|
169
|
+
if (_measurementNode.getBBox)
|
|
170
|
+
_width = parseInt(_measurementNode.getBBox().width);
|
|
171
|
+
else
|
|
172
|
+
_width = 68;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
oldParent.removeChild(_measurementNode);
|
|
176
|
+
return _width;
|
|
177
|
+
};
|
|
178
|
+
_package.logger.debug(`${logPrefix}, end`);
|
|
179
|
+
} finally {
|
|
180
|
+
pi.close();
|
|
181
|
+
}
|
|
104
182
|
}
|
|
105
183
|
|
|
106
184
|
export const helmJsonReplacer = (key: string, value: any): any => {
|
|
@@ -130,6 +208,39 @@ export class HelmPackage extends DG.Package {
|
|
|
130
208
|
this.libHelper = libHelper;
|
|
131
209
|
}
|
|
132
210
|
|
|
211
|
+
// -- Init --
|
|
212
|
+
/** Loads Dojo and HelmWebEditor, waits for init, patches */
|
|
213
|
+
async initHelm(): Promise<void> {
|
|
214
|
+
const logPrefix: string = 'Helm: Package.initDojo()';
|
|
215
|
+
|
|
216
|
+
_package.logger.debug(`${logPrefix}, dependence loading …`);
|
|
217
|
+
const t1: number = performance.now();
|
|
218
|
+
|
|
219
|
+
_package.logger.debug(`${logPrefix}, dojox loading and patching …`);
|
|
220
|
+
await initHelmLoadAndPatchDojo();
|
|
221
|
+
_package.logger.debug(`${logPrefix}, dojox loaded and patched`);
|
|
222
|
+
|
|
223
|
+
// Alternatively load old bundles by package.json/sources
|
|
224
|
+
_package.logger.debug(`${logPrefix}, HelmWebEditor awaiting …`);
|
|
225
|
+
require('../node_modules/@datagrok-libraries/helm-web-editor/dist/package.js');
|
|
226
|
+
await window.helmWebEditor$.initPromise;
|
|
227
|
+
_package.logger.debug(`${logPrefix}, HelmWebEditor loaded`);
|
|
228
|
+
|
|
229
|
+
org.helm.webeditor.kCaseSensitive = true; // GROK-13880
|
|
230
|
+
|
|
231
|
+
_package.logger.debug(`${logPrefix}, scil.Utils.alert patch`);
|
|
232
|
+
_package.initHelmPatchScilAlert(); // patch immediately
|
|
233
|
+
|
|
234
|
+
const t2: number = performance.now();
|
|
235
|
+
_package.logger.debug(`${logPrefix}, dependence loaded, ET: ${(t2 - t1)} ms`);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
async getMonomerLib(): Promise<IMonomerLib> {
|
|
239
|
+
const libHelper = await getMonomerLibHelper();
|
|
240
|
+
_package.setLibHelper(libHelper);
|
|
241
|
+
return libHelper.getBioLib();
|
|
242
|
+
}
|
|
243
|
+
|
|
133
244
|
public initHelmPatchScilAlert(): void {
|
|
134
245
|
const logPrefix: string = 'Helm: initHelmPatchScilAlert()';
|
|
135
246
|
this.alertOriginal = scil.Utils.alert;
|
|
@@ -139,13 +250,13 @@ export class HelmPackage extends DG.Package {
|
|
|
139
250
|
}
|
|
140
251
|
|
|
141
252
|
/** Patches Pistoia Monomers.getMonomer method to utilize DG Bio monomer Lib */
|
|
142
|
-
public
|
|
253
|
+
public initHelmPatchPistoia(): void {
|
|
143
254
|
const logPrefix: string = 'Helm: initHelmPatchPistoia()';
|
|
144
255
|
const monomers = org.helm.webeditor.Monomers;
|
|
145
256
|
|
|
146
257
|
this.logger.debug(`${logPrefix}, this.getMonomerOriginal stored`);
|
|
147
258
|
|
|
148
|
-
this.helmHelper.overrideGetMonomer(this.helmHelper.buildGetMonomerFromLib(monomerLib));
|
|
259
|
+
this.helmHelper.overrideGetMonomer(this.helmHelper.buildGetMonomerFromLib(this.monomerLib));
|
|
149
260
|
|
|
150
261
|
// @ts-ignore, intercept with proxy to observe access and usage
|
|
151
262
|
org.helm.webeditor.Monomers = new class {
|
|
@@ -186,4 +297,52 @@ export class HelmPackage extends DG.Package {
|
|
|
186
297
|
}
|
|
187
298
|
}(org.helm.webeditor) as IOrgHelmWebEditor;
|
|
188
299
|
}
|
|
300
|
+
|
|
301
|
+
// -- MonomerLib --
|
|
302
|
+
|
|
303
|
+
private _monomerLib: IMonomerLib;
|
|
304
|
+
public get monomerLib(): IMonomerLib {
|
|
305
|
+
if (!this._monomerLib)
|
|
306
|
+
throw new Error(`Helm: _package._monomerLib is not initialized yet`);
|
|
307
|
+
return this._monomerLib;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
private _monomerLibSub: Unsubscribable;
|
|
311
|
+
|
|
312
|
+
initMonomerLib(lib: IMonomerLib) {
|
|
313
|
+
if (!!this._monomerLib)
|
|
314
|
+
throw new Error(`Helm: _package._monomerLib is initialized already`);
|
|
315
|
+
this._monomerLib = lib;
|
|
316
|
+
rewriteLibraries(this._monomerLib); // initHelm()
|
|
317
|
+
this._monomerLibSub = this._monomerLib.onChanged
|
|
318
|
+
.subscribe(this.monomerLibOnChangedHandler.bind(this));
|
|
319
|
+
|
|
320
|
+
this.initHelmPatchPistoia();
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
monomerLibOnChangedHandler(): void {
|
|
324
|
+
const logPrefix = `Helm: _package.monomerLibOnChangedHandler()`;
|
|
325
|
+
try {
|
|
326
|
+
const libSummary = this.monomerLib!.getSummaryObj();
|
|
327
|
+
const isLibEmpty = Object.keys(libSummary).length == 0;
|
|
328
|
+
const libSummaryLog = isLibEmpty ? 'empty' : Object.entries(libSummary)
|
|
329
|
+
.map(([pt, count]) => `${pt}: ${count}`)
|
|
330
|
+
.join(', ');
|
|
331
|
+
_package.logger.debug(`${logPrefix}, start, lib: { ${libSummaryLog} }`);
|
|
332
|
+
|
|
333
|
+
const libSummaryHtml = isLibEmpty ? 'empty' : Object.entries(libSummary)
|
|
334
|
+
.map(([pt, count]) => `${pt} ${count}`)
|
|
335
|
+
.join('<br />');
|
|
336
|
+
const libMsg: string = `Monomer lib updated:<br /> ${libSummaryHtml}`;
|
|
337
|
+
grok.shell.info(libMsg);
|
|
338
|
+
|
|
339
|
+
_package.logger.debug(`${logPrefix}, org,helm.webeditor.Monomers updating ...`);
|
|
340
|
+
rewriteLibraries(this._monomerLib); // initHelm() monomerLib.onChanged()
|
|
341
|
+
_package.logger.debug(`${logPrefix}, end, org.helm.webeditor.Monomers completed`);
|
|
342
|
+
} catch (err: any) {
|
|
343
|
+
const errMsg = errorToConsole(err);
|
|
344
|
+
console.error(`${logPrefix} error:\n` + errMsg);
|
|
345
|
+
// throw err; // Prevent disabling event handler
|
|
346
|
+
}
|
|
347
|
+
}
|
|
189
348
|
}
|
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
|
|
|
@@ -52,70 +52,12 @@ export async function initHelm(): Promise<void> {
|
|
|
52
52
|
|
|
53
53
|
try {
|
|
54
54
|
const [_, lib]: [void, IMonomerLib] = await Promise.all([
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
_package.logger.debug(`${logPrefix}, dependence loading …`);
|
|
58
|
-
const t1: number = performance.now();
|
|
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
|
-
})()
|
|
55
|
+
_package.initHelm(),
|
|
56
|
+
_package.getMonomerLib(),
|
|
87
57
|
]);
|
|
88
58
|
|
|
89
59
|
_package.logger.debug(`${logPrefix}, then(), lib loaded`);
|
|
90
|
-
|
|
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
|
-
});
|
|
60
|
+
_package.initMonomerLib(lib);
|
|
119
61
|
} catch (err: any) {
|
|
120
62
|
const [errMsg, errStack] = errInfo(err);
|
|
121
63
|
// const errMsg: string = err instanceof Error ? err.message : !!err ? err.toString() : 'Exception \'undefined\'';
|
|
@@ -129,10 +71,6 @@ export async function initHelm(): Promise<void> {
|
|
|
129
71
|
_package.logger.debug(`${logPrefix}, end`);
|
|
130
72
|
}
|
|
131
73
|
|
|
132
|
-
export function getMonomerLib(): IMonomerLib | null {
|
|
133
|
-
return monomerLib;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
74
|
//name: getHelmService
|
|
137
75
|
//output: object result
|
|
138
76
|
export function getHelmService(): HelmServiceBase {
|
|
@@ -198,14 +136,14 @@ function openWebEditor(cell: DG.Cell, value?: string, units?: string) {
|
|
|
198
136
|
setTimeout(async () => {
|
|
199
137
|
app = await buildWebEditorApp(view);
|
|
200
138
|
if (!!cell && units === undefined)
|
|
201
|
-
app.canvas
|
|
139
|
+
app.canvas!.helm!.setSequence(cell.value, 'HELM');
|
|
202
140
|
else
|
|
203
|
-
app.canvas
|
|
141
|
+
app.canvas!.helm!.setSequence(value!, 'HELM');
|
|
204
142
|
}, 20);
|
|
205
143
|
const dlg = ui.dialog({showHeader: false, showFooter: true});
|
|
206
144
|
dlg.add(view)
|
|
207
145
|
.onOK(() => {
|
|
208
|
-
const helmValue: string = app.canvas
|
|
146
|
+
const helmValue: string = app.canvas!.getHelm(true).replace(/<\/span>/g, '')
|
|
209
147
|
.replace(/<span style='background:#bbf;'>/g, '');
|
|
210
148
|
if (!!cell) {
|
|
211
149
|
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
|
});
|