@datagrok/helm 2.13.8 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/css/helm.css +40 -0
- package/dist/137.js +2 -0
- package/dist/137.js.map +1 -0
- package/dist/323.js +2 -0
- package/dist/323.js.map +1 -0
- package/dist/657.js +2 -0
- package/dist/657.js.map +1 -0
- package/dist/782.js +2 -0
- package/dist/782.js.map +1 -0
- package/dist/884.js +2 -0
- package/dist/884.js.map +1 -0
- package/dist/94.js +2 -0
- package/dist/94.js.map +1 -0
- package/dist/libraries_bio_src_monomer-works_seq-to-molfile-worker_ts.js +16420 -0
- package/dist/libraries_bio_src_monomer-works_seq-to-molfile-worker_ts.js.map +1 -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/dist/vendors-HELM_node_modules_lru-cache_dist_esm_index_js.js +1560 -0
- package/dist/vendors-HELM_node_modules_lru-cache_dist_esm_index_js.js.map +1 -0
- package/files/samples/helm-showcase.csv +56 -0
- package/package.json +8 -12
- package/src/helm-helper.ts +134 -410
- package/src/package-api.ts +14 -11
- package/src/package-test.ts +0 -2
- package/src/package-utils.ts +8 -298
- package/src/package.g.ts +2 -8
- package/src/package.ts +11 -31
- package/src/tests/helm-activity-cliffs.ts +2 -2
- package/src/tests/helm-input-tests.ts +83 -0
- package/src/tests/parse-helm-tests.ts +7 -57
- package/src/tests/properties-widget-tests.ts +21 -11
- package/src/utils/helm-grid-cell-renderer.ts +141 -151
- package/src/utils/index.ts +3 -7
- package/src/widgets/helm-input.ts +42 -12
- package/src/widgets/properties-widget.ts +18 -11
- package/webpack.config.js +1 -12
- package/helm/JSDraw/Pistoia.HELM-uncompressed.js +0 -9694
- package/helm/JSDraw/ReadMe.txt +0 -8
- package/helm/JSDraw/Scilligence.JSDraw2.Lite-uncompressed.js +0 -31126
- package/helm/dojo/package.ts +0 -41
- package/helm/dojo/types.ts +0 -12
- package/src/helm-web-editor.ts +0 -68
- package/src/tests/get-monomer-tests.ts +0 -214
- package/src/tests/helm-service-tests.ts +0 -98
- package/src/types/dojo.ts +0 -3
- package/src/types/index.ts +0 -5
- package/src/utils/get-monomer.ts +0 -90
- package/src/utils/helm-service.ts +0 -166
- package/test-console-output-1.log +0 -919
- package/test-record-1.mp4 +0 -0
- package/vendor/dojo-1.10.10/dijit/BackgroundIframe.js +0 -63
- package/vendor/dojo-1.10.10/dijit/BackgroundIframe.js.uncompressed.js +0 -116
- package/vendor/dojo-1.10.10/dijit/Destroyable.js +0 -35
- package/vendor/dojo-1.10.10/dijit/Destroyable.js.uncompressed.js +0 -83
- package/vendor/dojo-1.10.10/dijit/Tooltip.js +0 -240
- package/vendor/dojo-1.10.10/dijit/Tooltip.js.uncompressed.js +0 -612
- package/vendor/dojo-1.10.10/dijit/Viewport.js +0 -44
- package/vendor/dojo-1.10.10/dijit/Viewport.js.uncompressed.js +0 -87
- package/vendor/dojo-1.10.10/dijit/WidgetSet.js +0 -76
- package/vendor/dojo-1.10.10/dijit/WidgetSet.js.uncompressed.js +0 -247
- package/vendor/dojo-1.10.10/dijit/_AttachMixin.js +0 -94
- package/vendor/dojo-1.10.10/dijit/_AttachMixin.js.uncompressed.js +0 -238
- package/vendor/dojo-1.10.10/dijit/_Contained.js +0 -17
- package/vendor/dojo-1.10.10/dijit/_Contained.js.uncompressed.js +0 -56
- package/vendor/dojo-1.10.10/dijit/_Container.js +0 -47
- package/vendor/dojo-1.10.10/dijit/_Container.js.uncompressed.js +0 -108
- package/vendor/dojo-1.10.10/dijit/_CssStateMixin.js +0 -198
- package/vendor/dojo-1.10.10/dijit/_CssStateMixin.js.uncompressed.js +0 -372
- package/vendor/dojo-1.10.10/dijit/_FocusMixin.js +0 -11
- package/vendor/dojo-1.10.10/dijit/_FocusMixin.js.uncompressed.js +0 -66
- package/vendor/dojo-1.10.10/dijit/_HasDropDown.js +0 -188
- package/vendor/dojo-1.10.10/dijit/_HasDropDown.js.uncompressed.js +0 -472
- package/vendor/dojo-1.10.10/dijit/_OnDijitClickMixin.js +0 -8
- package/vendor/dojo-1.10.10/dijit/_OnDijitClickMixin.js.uncompressed.js +0 -31
- package/vendor/dojo-1.10.10/dijit/_TemplatedMixin.js +0 -90
- package/vendor/dojo-1.10.10/dijit/_TemplatedMixin.js.uncompressed.js +0 -205
- package/vendor/dojo-1.10.10/dijit/_Widget.js +0 -66
- package/vendor/dojo-1.10.10/dijit/_Widget.js.uncompressed.js +0 -352
- package/vendor/dojo-1.10.10/dijit/_WidgetBase.js +0 -353
- package/vendor/dojo-1.10.10/dijit/_WidgetBase.js.uncompressed.js +0 -1200
- package/vendor/dojo-1.10.10/dijit/_base/focus.js +0 -68
- package/vendor/dojo-1.10.10/dijit/_base/focus.js.uncompressed.js +0 -207
- package/vendor/dojo-1.10.10/dijit/_base/manager.js +0 -10
- package/vendor/dojo-1.10.10/dijit/_base/manager.js.uncompressed.js +0 -35
- package/vendor/dojo-1.10.10/dijit/_base/place.js +0 -52
- package/vendor/dojo-1.10.10/dijit/_base/place.js.uncompressed.js +0 -131
- package/vendor/dojo-1.10.10/dijit/_base/popup.js +0 -23
- package/vendor/dojo-1.10.10/dijit/_base/popup.js.uncompressed.js +0 -58
- package/vendor/dojo-1.10.10/dijit/_base/scroll.js +0 -6
- package/vendor/dojo-1.10.10/dijit/_base/scroll.js.uncompressed.js +0 -22
- package/vendor/dojo-1.10.10/dijit/_base/sniff.js +0 -3
- package/vendor/dojo-1.10.10/dijit/_base/sniff.js.uncompressed.js +0 -12
- package/vendor/dojo-1.10.10/dijit/_base/typematic.js +0 -3
- package/vendor/dojo-1.10.10/dijit/_base/typematic.js.uncompressed.js +0 -10
- package/vendor/dojo-1.10.10/dijit/_base/wai.js +0 -32
- package/vendor/dojo-1.10.10/dijit/_base/wai.js.uncompressed.js +0 -109
- package/vendor/dojo-1.10.10/dijit/_base/window.js +0 -6
- package/vendor/dojo-1.10.10/dijit/_base/window.js.uncompressed.js +0 -18
- package/vendor/dojo-1.10.10/dijit/_base.js +0 -4
- package/vendor/dojo-1.10.10/dijit/_base.js.uncompressed.js +0 -27
- package/vendor/dojo-1.10.10/dijit/a11y.js +0 -109
- package/vendor/dojo-1.10.10/dijit/a11y.js.uncompressed.js +0 -191
- package/vendor/dojo-1.10.10/dijit/a11yclick.js +0 -66
- package/vendor/dojo-1.10.10/dijit/a11yclick.js.uncompressed.js +0 -139
- package/vendor/dojo-1.10.10/dijit/focus.js +0 -188
- package/vendor/dojo-1.10.10/dijit/focus.js.uncompressed.js +0 -371
- package/vendor/dojo-1.10.10/dijit/form/Button.js +0 -49
- package/vendor/dojo-1.10.10/dijit/form/Button.js.uncompressed.js +0 -130
- package/vendor/dojo-1.10.10/dijit/form/ComboBox.js +0 -4
- package/vendor/dojo-1.10.10/dijit/form/ComboBox.js.uncompressed.js +0 -27
- package/vendor/dojo-1.10.10/dijit/form/ComboButton.js +0 -21
- package/vendor/dojo-1.10.10/dijit/form/ComboButton.js.uncompressed.js +0 -86
- package/vendor/dojo-1.10.10/dijit/form/DropDownButton.js +0 -38
- package/vendor/dojo-1.10.10/dijit/form/DropDownButton.js.uncompressed.js +0 -102
- package/vendor/dojo-1.10.10/dijit/form/ToggleButton.js +0 -7
- package/vendor/dojo-1.10.10/dijit/form/ToggleButton.js.uncompressed.js +0 -26
- package/vendor/dojo-1.10.10/dijit/form/_ButtonMixin.js +0 -50
- package/vendor/dojo-1.10.10/dijit/form/_ButtonMixin.js.uncompressed.js +0 -116
- package/vendor/dojo-1.10.10/dijit/form/_FormValueMixin.js +0 -26
- package/vendor/dojo-1.10.10/dijit/form/_FormValueMixin.js.uncompressed.js +0 -81
- package/vendor/dojo-1.10.10/dijit/form/_FormValueWidget.js +0 -24
- package/vendor/dojo-1.10.10/dijit/form/_FormValueWidget.js.uncompressed.js +0 -51
- package/vendor/dojo-1.10.10/dijit/form/_FormWidget.js +0 -22
- package/vendor/dojo-1.10.10/dijit/form/_FormWidget.js.uncompressed.js +0 -67
- package/vendor/dojo-1.10.10/dijit/form/_FormWidgetMixin.js +0 -111
- package/vendor/dojo-1.10.10/dijit/form/_FormWidgetMixin.js.uncompressed.js +0 -254
- package/vendor/dojo-1.10.10/dijit/form/_ToggleButtonMixin.js +0 -32
- package/vendor/dojo-1.10.10/dijit/form/_ToggleButtonMixin.js.uncompressed.js +0 -69
- package/vendor/dojo-1.10.10/dijit/hccss.js +0 -9
- package/vendor/dojo-1.10.10/dijit/hccss.js.uncompressed.js +0 -21
- package/vendor/dojo-1.10.10/dijit/layout/AccordionContainer.js +0 -215
- package/vendor/dojo-1.10.10/dijit/layout/AccordionContainer.js.uncompressed.js +0 -550
- package/vendor/dojo-1.10.10/dijit/layout/AccordionPane.js +0 -7
- package/vendor/dojo-1.10.10/dijit/layout/AccordionPane.js.uncompressed.js +0 -25
- package/vendor/dojo-1.10.10/dijit/layout/ContentPane.js +0 -235
- package/vendor/dojo-1.10.10/dijit/layout/ContentPane.js.uncompressed.js +0 -653
- package/vendor/dojo-1.10.10/dijit/layout/StackContainer.js +0 -171
- package/vendor/dojo-1.10.10/dijit/layout/StackContainer.js.uncompressed.js +0 -411
- package/vendor/dojo-1.10.10/dijit/layout/StackController.js +0 -194
- package/vendor/dojo-1.10.10/dijit/layout/StackController.js.uncompressed.js +0 -410
- package/vendor/dojo-1.10.10/dijit/layout/_ContentPaneResizeMixin.js +0 -99
- package/vendor/dojo-1.10.10/dijit/layout/_ContentPaneResizeMixin.js.uncompressed.js +0 -236
- package/vendor/dojo-1.10.10/dijit/layout/_LayoutWidget.js +0 -47
- package/vendor/dojo-1.10.10/dijit/layout/_LayoutWidget.js.uncompressed.js +0 -190
- package/vendor/dojo-1.10.10/dijit/layout/utils.js +0 -77
- package/vendor/dojo-1.10.10/dijit/layout/utils.js.uncompressed.js +0 -151
- package/vendor/dojo-1.10.10/dijit/main.js +0 -4
- package/vendor/dojo-1.10.10/dijit/main.js.uncompressed.js +0 -16
- package/vendor/dojo-1.10.10/dijit/nls/dijit-all_en-us.js +0 -2
- package/vendor/dojo-1.10.10/dijit/nls/dijit-all_en-us.js.uncompressed.js +0 -21
- package/vendor/dojo-1.10.10/dijit/nls/loading.js +0 -2
- package/vendor/dojo-1.10.10/dijit/nls/loading.js.uncompressed.js +0 -47
- package/vendor/dojo-1.10.10/dijit/place.js +0 -142
- package/vendor/dojo-1.10.10/dijit/place.js.uncompressed.js +0 -407
- package/vendor/dojo-1.10.10/dijit/popup.js +0 -162
- package/vendor/dojo-1.10.10/dijit/popup.js.uncompressed.js +0 -441
- package/vendor/dojo-1.10.10/dijit/registry.js +0 -79
- package/vendor/dojo-1.10.10/dijit/registry.js.uncompressed.js +0 -159
- package/vendor/dojo-1.10.10/dijit/selection.js +0 -364
- package/vendor/dojo-1.10.10/dijit/selection.js.uncompressed.js +0 -525
- package/vendor/dojo-1.10.10/dijit/typematic.js +0 -96
- package/vendor/dojo-1.10.10/dijit/typematic.js.uncompressed.js +0 -211
- package/vendor/dojo-1.10.10/dojo/NodeList-manipulate.js +0 -195
- package/vendor/dojo-1.10.10/dojo/NodeList-manipulate.js.uncompressed.js +0 -761
- package/vendor/dojo-1.10.10/dojo/Stateful.js +0 -90
- package/vendor/dojo-1.10.10/dojo/Stateful.js.uncompressed.js +0 -218
- package/vendor/dojo-1.10.10/dojo/_base/url.js +0 -87
- package/vendor/dojo-1.10.10/dojo/_base/url.js.uncompressed.js +0 -109
- package/vendor/dojo-1.10.10/dojo/cache.js +0 -9
- package/vendor/dojo-1.10.10/dojo/cache.js.uncompressed.js +0 -7
- package/vendor/dojo-1.10.10/dojo/colors.js +0 -74
- package/vendor/dojo-1.10.10/dojo/colors.js.uncompressed.js +0 -232
- package/vendor/dojo-1.10.10/dojo/cookie.js +0 -48
- package/vendor/dojo-1.10.10/dojo/cookie.js.uncompressed.js +0 -98
- package/vendor/dojo-1.10.10/dojo/date/stamp.js +0 -82
- package/vendor/dojo-1.10.10/dojo/date/stamp.js.uncompressed.js +0 -144
- package/vendor/dojo-1.10.10/dojo/dojo.js +0 -7
- package/vendor/dojo-1.10.10/dojo/dojo.js.uncompressed.js +0 -18680
- package/vendor/dojo-1.10.10/dojo/fx/Toggler.js +0 -27
- package/vendor/dojo-1.10.10/dojo/fx/Toggler.js.uncompressed.js +0 -101
- package/vendor/dojo-1.10.10/dojo/fx/easing.js +0 -165
- package/vendor/dojo-1.10.10/dojo/fx/easing.js.uncompressed.js +0 -276
- package/vendor/dojo-1.10.10/dojo/fx.js +0 -271
- package/vendor/dojo-1.10.10/dojo/fx.js.uncompressed.js +0 -443
- package/vendor/dojo-1.10.10/dojo/hccss.js +0 -26
- package/vendor/dojo-1.10.10/dojo/hccss.js.uncompressed.js +0 -52
- package/vendor/dojo-1.10.10/dojo/html.js +0 -161
- package/vendor/dojo-1.10.10/dojo/html.js.uncompressed.js +0 -370
- package/vendor/dojo-1.10.10/dojo/io/iframe.js +0 -71
- package/vendor/dojo-1.10.10/dojo/io/iframe.js.uncompressed.js +0 -190
- package/vendor/dojo-1.10.10/dojo/io/script.js +0 -112
- package/vendor/dojo-1.10.10/dojo/io/script.js.uncompressed.js +0 -280
- package/vendor/dojo-1.10.10/dojo/parser.js +0 -437
- package/vendor/dojo-1.10.10/dojo/parser.js.uncompressed.js +0 -915
- package/vendor/dojo-1.10.10/dojo/promise/all.js +0 -59
- package/vendor/dojo-1.10.10/dojo/promise/all.js.uncompressed.js +0 -77
- package/vendor/dojo-1.10.10/dojo/regexp.js +0 -32
- package/vendor/dojo-1.10.10/dojo/regexp.js.uncompressed.js +0 -70
- package/vendor/dojo-1.10.10/dojo/request/iframe.js +0 -291
- package/vendor/dojo-1.10.10/dojo/request/iframe.js.uncompressed.js +0 -438
- package/vendor/dojo-1.10.10/dojo/request/script.js +0 -129
- package/vendor/dojo-1.10.10/dojo/request/script.js.uncompressed.js +0 -237
- package/vendor/dojo-1.10.10/dojo/require.js +0 -11
- package/vendor/dojo-1.10.10/dojo/require.js.uncompressed.js +0 -7
- package/vendor/dojo-1.10.10/dojo/resources/blank.gif +0 -0
- package/vendor/dojo-1.10.10/dojo/string.js +0 -67
- package/vendor/dojo-1.10.10/dojo/string.js.uncompressed.js +0 -181
- package/vendor/dojo-1.10.10/dojo/touch.js +0 -191
- package/vendor/dojo-1.10.10/dojo/touch.js.uncompressed.js +0 -468
- package/vendor/dojo-1.10.10/dojo/uacss.js +0 -36
- package/vendor/dojo-1.10.10/dojo/uacss.js.uncompressed.js +0 -85
- package/vendor/dojo-1.10.10/dojo/window.js +0 -141
- package/vendor/dojo-1.10.10/dojo/window.js.uncompressed.js +0 -241
- package/vendor/dojo-1.10.10/dojox/charting/Chart.js +0 -626
- package/vendor/dojo-1.10.10/dojox/charting/Chart.js.uncompressed.js +0 -1220
- package/vendor/dojo-1.10.10/dojox/charting/Chart2D.js +0 -5
- package/vendor/dojo-1.10.10/dojox/charting/Chart2D.js.uncompressed.js +0 -16
- package/vendor/dojo-1.10.10/dojox/charting/Element.js +0 -247
- package/vendor/dojo-1.10.10/dojox/charting/Element.js.uncompressed.js +0 -402
- package/vendor/dojo-1.10.10/dojox/charting/Series.js +0 -24
- package/vendor/dojo-1.10.10/dojox/charting/Series.js.uncompressed.js +0 -58
- package/vendor/dojo-1.10.10/dojox/charting/SimpleTheme.js +0 -191
- package/vendor/dojo-1.10.10/dojox/charting/SimpleTheme.js.uncompressed.js +0 -577
- package/vendor/dojo-1.10.10/dojox/charting/Theme.js +0 -42
- package/vendor/dojo-1.10.10/dojox/charting/Theme.js.uncompressed.js +0 -120
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Base.js +0 -11
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Base.js.uncompressed.js +0 -36
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Highlight.js +0 -77
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Highlight.js.uncompressed.js +0 -144
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Magnify.js +0 -58
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Magnify.js.uncompressed.js +0 -123
- package/vendor/dojo-1.10.10/dojox/charting/action2d/MoveSlice.js +0 -54
- package/vendor/dojo-1.10.10/dojox/charting/action2d/MoveSlice.js.uncompressed.js +0 -124
- package/vendor/dojo-1.10.10/dojox/charting/action2d/PlotAction.js +0 -28
- package/vendor/dojo-1.10.10/dojox/charting/action2d/PlotAction.js.uncompressed.js +0 -74
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Tooltip.js +0 -116
- package/vendor/dojo-1.10.10/dojox/charting/action2d/Tooltip.js.uncompressed.js +0 -178
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/Base.js +0 -24
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/Base.js.uncompressed.js +0 -83
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/Default.js +0 -557
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/Default.js.uncompressed.js +0 -980
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/Invisible.js +0 -65
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/Invisible.js.uncompressed.js +0 -224
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/common.js +0 -91
- package/vendor/dojo-1.10.10/dojox/charting/axis2d/common.js.uncompressed.js +0 -164
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Areas.js +0 -7
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Areas.js.uncompressed.js +0 -14
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bars.js +0 -168
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bars.js.uncompressed.js +0 -311
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Base.js +0 -61
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Base.js.uncompressed.js +0 -161
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bubble.js +0 -141
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bubble.js.uncompressed.js +0 -242
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Candlesticks.js +0 -126
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Candlesticks.js.uncompressed.js +0 -243
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/CartesianBase.js +0 -108
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/CartesianBase.js.uncompressed.js +0 -290
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredBars.js +0 -13
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredBars.js.uncompressed.js +0 -14
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredColumns.js +0 -13
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredColumns.js.uncompressed.js +0 -14
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Columns.js +0 -153
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Columns.js.uncompressed.js +0 -249
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Default.js +0 -253
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Default.js.uncompressed.js +0 -472
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Grid.js +0 -182
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Grid.js.uncompressed.js +0 -356
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Lines.js +0 -6
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Lines.js.uncompressed.js +0 -12
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Markers.js +0 -6
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Markers.js.uncompressed.js +0 -12
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/MarkersOnly.js +0 -7
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/MarkersOnly.js.uncompressed.js +0 -13
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/OHLC.js +0 -110
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/OHLC.js.uncompressed.js +0 -208
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Pie.js +0 -303
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Pie.js.uncompressed.js +0 -547
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Scatter.js +0 -134
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Scatter.js.uncompressed.js +0 -207
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Spider.js +0 -299
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Spider.js.uncompressed.js +0 -537
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Stacked.js +0 -24
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/Stacked.js.uncompressed.js +0 -44
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedAreas.js +0 -7
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedAreas.js.uncompressed.js +0 -14
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedBars.js +0 -22
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedBars.js.uncompressed.js +0 -33
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedColumns.js +0 -20
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedColumns.js.uncompressed.js +0 -31
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedLines.js +0 -6
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedLines.js.uncompressed.js +0 -12
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/_PlotEvents.js +0 -68
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/_PlotEvents.js.uncompressed.js +0 -120
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/common.js +0 -209
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/common.js.uncompressed.js +0 -214
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/commonStacked.js +0 -76
- package/vendor/dojo-1.10.10/dojox/charting/plot2d/commonStacked.js.uncompressed.js +0 -77
- package/vendor/dojo-1.10.10/dojox/charting/scaler/common.js +0 -59
- package/vendor/dojo-1.10.10/dojox/charting/scaler/common.js.uncompressed.js +0 -70
- package/vendor/dojo-1.10.10/dojox/charting/scaler/linear.js +0 -220
- package/vendor/dojo-1.10.10/dojox/charting/scaler/linear.js.uncompressed.js +0 -262
- package/vendor/dojo-1.10.10/dojox/charting/scaler/primitive.js +0 -23
- package/vendor/dojo-1.10.10/dojox/charting/scaler/primitive.js.uncompressed.js +0 -36
- package/vendor/dojo-1.10.10/dojox/charting/themes/Claro.js +0 -39
- package/vendor/dojo-1.10.10/dojox/charting/themes/Claro.js.uncompressed.js +0 -106
- package/vendor/dojo-1.10.10/dojox/charting/themes/Wetland.js +0 -5
- package/vendor/dojo-1.10.10/dojox/charting/themes/Wetland.js.uncompressed.js +0 -12
- package/vendor/dojo-1.10.10/dojox/charting/themes/common.js +0 -4
- package/vendor/dojo-1.10.10/dojox/charting/themes/common.js.uncompressed.js +0 -3
- package/vendor/dojo-1.10.10/dojox/charting/widget/Legend.js +0 -102
- package/vendor/dojo-1.10.10/dojox/charting/widget/Legend.js.uncompressed.js +0 -165
- package/vendor/dojo-1.10.10/dojox/color/Palette.js +0 -163
- package/vendor/dojo-1.10.10/dojox/color/Palette.js.uncompressed.js +0 -460
- package/vendor/dojo-1.10.10/dojox/color/_base.js +0 -174
- package/vendor/dojo-1.10.10/dojox/color/_base.js.uncompressed.js +0 -196
- package/vendor/dojo-1.10.10/dojox/gfx/_base.js +0 -253
- package/vendor/dojo-1.10.10/dojox/gfx/_base.js.uncompressed.js +0 -1024
- package/vendor/dojo-1.10.10/dojox/gfx/fx.js +0 -297
- package/vendor/dojo-1.10.10/dojox/gfx/fx.js.uncompressed.js +0 -350
- package/vendor/dojo-1.10.10/dojox/gfx/gradutils.js +0 -63
- package/vendor/dojo-1.10.10/dojox/gfx/gradutils.js.uncompressed.js +0 -91
- package/vendor/dojo-1.10.10/dojox/gfx/matrix.js +0 -170
- package/vendor/dojo-1.10.10/dojox/gfx/matrix.js.uncompressed.js +0 -501
- package/vendor/dojo-1.10.10/dojox/gfx/path.js +0 -319
- package/vendor/dojo-1.10.10/dojox/gfx/path.js.uncompressed.js +0 -478
- package/vendor/dojo-1.10.10/dojox/gfx/shape.js +0 -459
- package/vendor/dojo-1.10.10/dojox/gfx/shape.js.uncompressed.js +0 -1091
- package/vendor/dojo-1.10.10/dojox/gfx/svg.js +0 -662
- package/vendor/dojo-1.10.10/dojox/gfx/svg.js.uncompressed.js +0 -1023
- package/vendor/dojo-1.10.10/dojox/gfx/utils.js +0 -199
- package/vendor/dojo-1.10.10/dojox/gfx/utils.js.uncompressed.js +0 -322
- package/vendor/dojo-1.10.10/dojox/gfx.js +0 -2
- package/vendor/dojo-1.10.10/dojox/gfx.js.uncompressed.js +0 -1136
- package/vendor/dojo-1.10.10/dojox/lang/functional/array.js +0 -151
- package/vendor/dojo-1.10.10/dojox/lang/functional/array.js.uncompressed.js +0 -169
- package/vendor/dojo-1.10.10/dojox/lang/functional/fold.js +0 -93
- package/vendor/dojo-1.10.10/dojox/lang/functional/fold.js.uncompressed.js +0 -125
- package/vendor/dojo-1.10.10/dojox/lang/functional/lambda.js +0 -81
- package/vendor/dojo-1.10.10/dojox/lang/functional/lambda.js.uncompressed.js +0 -132
- package/vendor/dojo-1.10.10/dojox/lang/functional/object.js +0 -54
- package/vendor/dojo-1.10.10/dojox/lang/functional/object.js.uncompressed.js +0 -78
- package/vendor/dojo-1.10.10/dojox/lang/functional/reversed.js +0 -61
- package/vendor/dojo-1.10.10/dojox/lang/functional/reversed.js.uncompressed.js +0 -77
- package/vendor/dojo-1.10.10/dojox/lang/functional/scan.js +0 -87
- package/vendor/dojo-1.10.10/dojox/lang/functional/scan.js.uncompressed.js +0 -107
- package/vendor/dojo-1.10.10/dojox/lang/functional.js +0 -4
- package/vendor/dojo-1.10.10/dojox/lang/functional.js.uncompressed.js +0 -3
- package/vendor/dojo-1.10.10/dojox/lang/utils.js +0 -86
- package/vendor/dojo-1.10.10/dojox/lang/utils.js.uncompressed.js +0 -121
- package/vendor/dojo-1.10.10/dojox/main.js +0 -4
- package/vendor/dojo-1.10.10/dojox/main.js.uncompressed.js +0 -14
- package/vendor/dojo-1.10.10/dojox/storage/LocalStorageProvider.js +0 -112
- package/vendor/dojo-1.10.10/dojox/storage/LocalStorageProvider.js.uncompressed.js +0 -208
- package/vendor/dojo-1.10.10/dojox/storage/Provider.js +0 -62
- package/vendor/dojo-1.10.10/dojox/storage/Provider.js.uncompressed.js +0 -344
- package/vendor/dojo-1.10.10/dojox/storage/manager.js +0 -110
- package/vendor/dojo-1.10.10/dojox/storage/manager.js.uncompressed.js +0 -263
|
@@ -1,525 +0,0 @@
|
|
|
1
|
-
define("dijit/selection", [
|
|
2
|
-
"dojo/_base/array",
|
|
3
|
-
"dojo/dom", // dom.byId
|
|
4
|
-
"dojo/_base/lang",
|
|
5
|
-
"dojo/sniff", // has("ie") has("opera")
|
|
6
|
-
"dojo/_base/window",
|
|
7
|
-
"dijit/focus"
|
|
8
|
-
], function(array, dom, lang, has, baseWindow, focus){
|
|
9
|
-
|
|
10
|
-
// module:
|
|
11
|
-
// dijit/selection
|
|
12
|
-
|
|
13
|
-
// Note that this class is using feature detection, but doesn't use has() because sometimes on IE the outer window
|
|
14
|
-
// may be running in standards mode (ie, IE9 mode) but an iframe may be in compatibility mode. So the code path
|
|
15
|
-
// used will vary based on the window.
|
|
16
|
-
|
|
17
|
-
var SelectionManager = function(win){
|
|
18
|
-
// summary:
|
|
19
|
-
// Class for monitoring / changing the selection (typically highlighted text) in a given window
|
|
20
|
-
// win: Window
|
|
21
|
-
// The window to monitor/adjust the selection on.
|
|
22
|
-
|
|
23
|
-
var doc = win.document;
|
|
24
|
-
|
|
25
|
-
this.getType = function(){
|
|
26
|
-
// summary:
|
|
27
|
-
// Get the selection type (like doc.select.type in IE).
|
|
28
|
-
if(doc.getSelection){
|
|
29
|
-
// W3C path
|
|
30
|
-
var stype = "text";
|
|
31
|
-
|
|
32
|
-
// Check if the actual selection is a CONTROL (IMG, TABLE, HR, etc...).
|
|
33
|
-
var oSel;
|
|
34
|
-
try{
|
|
35
|
-
oSel = win.getSelection();
|
|
36
|
-
}catch(e){ /*squelch*/ }
|
|
37
|
-
|
|
38
|
-
if(oSel && oSel.rangeCount == 1){
|
|
39
|
-
var oRange = oSel.getRangeAt(0);
|
|
40
|
-
if( (oRange.startContainer == oRange.endContainer) &&
|
|
41
|
-
((oRange.endOffset - oRange.startOffset) == 1) &&
|
|
42
|
-
(oRange.startContainer.nodeType != 3 /* text node*/)
|
|
43
|
-
){
|
|
44
|
-
stype = "control";
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return stype; //String
|
|
48
|
-
}else{
|
|
49
|
-
// IE6-8
|
|
50
|
-
return doc.selection.type.toLowerCase();
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
this.getSelectedText = function(){
|
|
55
|
-
// summary:
|
|
56
|
-
// Return the text (no html tags) included in the current selection or null if no text is selected
|
|
57
|
-
if(doc.getSelection){
|
|
58
|
-
// W3C path
|
|
59
|
-
var selection = win.getSelection();
|
|
60
|
-
return selection ? selection.toString() : ""; //String
|
|
61
|
-
}else{
|
|
62
|
-
// IE6-8
|
|
63
|
-
if(this.getType() == 'control'){
|
|
64
|
-
return null;
|
|
65
|
-
}
|
|
66
|
-
return doc.selection.createRange().text;
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
this.getSelectedHtml = function(){
|
|
71
|
-
// summary:
|
|
72
|
-
// Return the html text of the current selection or null if unavailable
|
|
73
|
-
if(doc.getSelection){
|
|
74
|
-
// W3C path
|
|
75
|
-
var selection = win.getSelection();
|
|
76
|
-
if(selection && selection.rangeCount){
|
|
77
|
-
var i;
|
|
78
|
-
var html = "";
|
|
79
|
-
for(i = 0; i < selection.rangeCount; i++){
|
|
80
|
-
//Handle selections spanning ranges, such as Opera
|
|
81
|
-
var frag = selection.getRangeAt(i).cloneContents();
|
|
82
|
-
var div = doc.createElement("div");
|
|
83
|
-
div.appendChild(frag);
|
|
84
|
-
html += div.innerHTML;
|
|
85
|
-
}
|
|
86
|
-
return html; //String
|
|
87
|
-
}
|
|
88
|
-
return null;
|
|
89
|
-
}else{
|
|
90
|
-
// IE6-8
|
|
91
|
-
if(this.getType() == 'control'){
|
|
92
|
-
return null;
|
|
93
|
-
}
|
|
94
|
-
return doc.selection.createRange().htmlText;
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
this.getSelectedElement = function(){
|
|
99
|
-
// summary:
|
|
100
|
-
// Retrieves the selected element (if any), just in the case that
|
|
101
|
-
// a single element (object like and image or a table) is
|
|
102
|
-
// selected.
|
|
103
|
-
if(this.getType() == "control"){
|
|
104
|
-
if(doc.getSelection){
|
|
105
|
-
// W3C path
|
|
106
|
-
var selection = win.getSelection();
|
|
107
|
-
return selection.anchorNode.childNodes[ selection.anchorOffset ];
|
|
108
|
-
}else{
|
|
109
|
-
// IE6-8
|
|
110
|
-
var range = doc.selection.createRange();
|
|
111
|
-
if(range && range.item){
|
|
112
|
-
return doc.selection.createRange().item(0);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
return null;
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
this.getParentElement = function(){
|
|
120
|
-
// summary:
|
|
121
|
-
// Get the parent element of the current selection
|
|
122
|
-
if(this.getType() == "control"){
|
|
123
|
-
var p = this.getSelectedElement();
|
|
124
|
-
if(p){ return p.parentNode; }
|
|
125
|
-
}else{
|
|
126
|
-
if(doc.getSelection){
|
|
127
|
-
var selection = doc.getSelection();
|
|
128
|
-
if(selection){
|
|
129
|
-
var node = selection.anchorNode;
|
|
130
|
-
while(node && (node.nodeType != 1)){ // not an element
|
|
131
|
-
node = node.parentNode;
|
|
132
|
-
}
|
|
133
|
-
return node;
|
|
134
|
-
}
|
|
135
|
-
}else{
|
|
136
|
-
var r = doc.selection.createRange();
|
|
137
|
-
r.collapse(true);
|
|
138
|
-
return r.parentElement();
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
return null;
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
this.hasAncestorElement = function(/*String*/ tagName /* ... */){
|
|
145
|
-
// summary:
|
|
146
|
-
// Check whether current selection has a parent element which is
|
|
147
|
-
// of type tagName (or one of the other specified tagName)
|
|
148
|
-
// tagName: String
|
|
149
|
-
// The tag name to determine if it has an ancestor of.
|
|
150
|
-
return this.getAncestorElement.apply(this, arguments) != null; //Boolean
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
this.getAncestorElement = function(/*String*/ tagName /* ... */){
|
|
154
|
-
// summary:
|
|
155
|
-
// Return the parent element of the current selection which is of
|
|
156
|
-
// type tagName (or one of the other specified tagName)
|
|
157
|
-
// tagName: String
|
|
158
|
-
// The tag name to determine if it has an ancestor of.
|
|
159
|
-
var node = this.getSelectedElement() || this.getParentElement();
|
|
160
|
-
return this.getParentOfType(node, arguments); //DOMNode
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
this.isTag = function(/*DomNode*/ node, /*String[]*/ tags){
|
|
164
|
-
// summary:
|
|
165
|
-
// Function to determine if a node is one of an array of tags.
|
|
166
|
-
// node:
|
|
167
|
-
// The node to inspect.
|
|
168
|
-
// tags:
|
|
169
|
-
// An array of tag name strings to check to see if the node matches.
|
|
170
|
-
if(node && node.tagName){
|
|
171
|
-
var _nlc = node.tagName.toLowerCase();
|
|
172
|
-
for(var i=0; i<tags.length; i++){
|
|
173
|
-
var _tlc = String(tags[i]).toLowerCase();
|
|
174
|
-
if(_nlc == _tlc){
|
|
175
|
-
return _tlc; // String
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
return "";
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
this.getParentOfType = function(/*DomNode*/ node, /*String[]*/ tags){
|
|
183
|
-
// summary:
|
|
184
|
-
// Function to locate a parent node that matches one of a set of tags
|
|
185
|
-
// node:
|
|
186
|
-
// The node to inspect.
|
|
187
|
-
// tags:
|
|
188
|
-
// An array of tag name strings to check to see if the node matches.
|
|
189
|
-
while(node){
|
|
190
|
-
if(this.isTag(node, tags).length){
|
|
191
|
-
return node; // DOMNode
|
|
192
|
-
}
|
|
193
|
-
node = node.parentNode;
|
|
194
|
-
}
|
|
195
|
-
return null;
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
this.collapse = function(/*Boolean*/ beginning){
|
|
199
|
-
// summary:
|
|
200
|
-
// Function to collapse (clear), the current selection
|
|
201
|
-
// beginning: Boolean
|
|
202
|
-
// Indicates whether to collapse the cursor to the beginning of the selection or end.
|
|
203
|
-
if(doc.getSelection){
|
|
204
|
-
// W3C path
|
|
205
|
-
var selection = win.getSelection();
|
|
206
|
-
if(selection.removeAllRanges){ // Mozilla
|
|
207
|
-
if(beginning){
|
|
208
|
-
selection.collapseToStart();
|
|
209
|
-
}else{
|
|
210
|
-
selection.collapseToEnd();
|
|
211
|
-
}
|
|
212
|
-
}else{ // Safari
|
|
213
|
-
// pulled from WebCore/ecma/kjs_window.cpp, line 2536
|
|
214
|
-
selection.collapse(beginning);
|
|
215
|
-
}
|
|
216
|
-
}else{
|
|
217
|
-
// IE6-8
|
|
218
|
-
var range = doc.selection.createRange();
|
|
219
|
-
range.collapse(beginning);
|
|
220
|
-
range.select();
|
|
221
|
-
}
|
|
222
|
-
};
|
|
223
|
-
|
|
224
|
-
this.remove = function(){
|
|
225
|
-
// summary:
|
|
226
|
-
// Function to delete the currently selected content from the document.
|
|
227
|
-
var sel = doc.selection;
|
|
228
|
-
if(doc.getSelection){
|
|
229
|
-
// W3C path
|
|
230
|
-
sel = win.getSelection();
|
|
231
|
-
sel.deleteFromDocument();
|
|
232
|
-
return sel; //Selection
|
|
233
|
-
}else{
|
|
234
|
-
// IE6-8
|
|
235
|
-
if(sel.type.toLowerCase() != "none"){
|
|
236
|
-
sel.clear();
|
|
237
|
-
}
|
|
238
|
-
return sel; //Selection
|
|
239
|
-
}
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
this.selectElementChildren = function(/*DomNode*/ element, /*Boolean?*/ nochangefocus){
|
|
243
|
-
// summary:
|
|
244
|
-
// clear previous selection and select the content of the node
|
|
245
|
-
// (excluding the node itself)
|
|
246
|
-
// element: DOMNode
|
|
247
|
-
// The element you wish to select the children content of.
|
|
248
|
-
// nochangefocus: Boolean
|
|
249
|
-
// Indicates if the focus should change or not.
|
|
250
|
-
|
|
251
|
-
var range;
|
|
252
|
-
element = dom.byId(element);
|
|
253
|
-
if(doc.getSelection){
|
|
254
|
-
// W3C
|
|
255
|
-
var selection = win.getSelection();
|
|
256
|
-
if(has("opera")){
|
|
257
|
-
//Opera's selectAllChildren doesn't seem to work right
|
|
258
|
-
//against <body> nodes and possibly others ... so
|
|
259
|
-
//we use the W3C range API
|
|
260
|
-
if(selection.rangeCount){
|
|
261
|
-
range = selection.getRangeAt(0);
|
|
262
|
-
}else{
|
|
263
|
-
range = doc.createRange();
|
|
264
|
-
}
|
|
265
|
-
range.setStart(element, 0);
|
|
266
|
-
range.setEnd(element,(element.nodeType == 3) ? element.length : element.childNodes.length);
|
|
267
|
-
selection.addRange(range);
|
|
268
|
-
}else{
|
|
269
|
-
selection.selectAllChildren(element);
|
|
270
|
-
}
|
|
271
|
-
}else{
|
|
272
|
-
// IE6-8
|
|
273
|
-
range = element.ownerDocument.body.createTextRange();
|
|
274
|
-
range.moveToElementText(element);
|
|
275
|
-
if(!nochangefocus){
|
|
276
|
-
try{
|
|
277
|
-
range.select(); // IE throws an exception here if the widget is hidden. See #5439
|
|
278
|
-
}catch(e){ /* squelch */}
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
};
|
|
282
|
-
|
|
283
|
-
this.selectElement = function(/*DomNode*/ element, /*Boolean?*/ nochangefocus){
|
|
284
|
-
// summary:
|
|
285
|
-
// clear previous selection and select element (including all its children)
|
|
286
|
-
// element: DOMNode
|
|
287
|
-
// The element to select.
|
|
288
|
-
// nochangefocus: Boolean
|
|
289
|
-
// Boolean indicating if the focus should be changed. IE only.
|
|
290
|
-
var range;
|
|
291
|
-
element = dom.byId(element); // TODO: remove for 2.0 or sooner, spec listed above doesn't allow for string
|
|
292
|
-
if(doc.getSelection){
|
|
293
|
-
// W3C path
|
|
294
|
-
var selection = doc.getSelection();
|
|
295
|
-
range = doc.createRange();
|
|
296
|
-
if(selection.removeAllRanges){ // Mozilla
|
|
297
|
-
// FIXME: does this work on Safari?
|
|
298
|
-
if(has("opera")){
|
|
299
|
-
//Opera works if you use the current range on
|
|
300
|
-
//the selection if present.
|
|
301
|
-
if(selection.getRangeAt(0)){
|
|
302
|
-
range = selection.getRangeAt(0);
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
range.selectNode(element);
|
|
306
|
-
selection.removeAllRanges();
|
|
307
|
-
selection.addRange(range);
|
|
308
|
-
}
|
|
309
|
-
}else{
|
|
310
|
-
// IE6-8
|
|
311
|
-
try{
|
|
312
|
-
var tg = element.tagName ? element.tagName.toLowerCase() : "";
|
|
313
|
-
if(tg === "img" || tg === "table"){
|
|
314
|
-
range = baseWindow.body(doc).createControlRange();
|
|
315
|
-
}else{
|
|
316
|
-
range = baseWindow.body(doc).createRange();
|
|
317
|
-
}
|
|
318
|
-
range.addElement(element);
|
|
319
|
-
if(!nochangefocus){
|
|
320
|
-
range.select();
|
|
321
|
-
}
|
|
322
|
-
}catch(e){
|
|
323
|
-
this.selectElementChildren(element, nochangefocus);
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
};
|
|
327
|
-
|
|
328
|
-
this.inSelection = function(node){
|
|
329
|
-
// summary:
|
|
330
|
-
// This function determines if 'node' is
|
|
331
|
-
// in the current selection.
|
|
332
|
-
// tags:
|
|
333
|
-
// public
|
|
334
|
-
if(node){
|
|
335
|
-
var newRange;
|
|
336
|
-
var range;
|
|
337
|
-
|
|
338
|
-
if(doc.getSelection){
|
|
339
|
-
// WC3
|
|
340
|
-
var sel = win.getSelection();
|
|
341
|
-
if(sel && sel.rangeCount > 0){
|
|
342
|
-
range = sel.getRangeAt(0);
|
|
343
|
-
}
|
|
344
|
-
if(range && range.compareBoundaryPoints && doc.createRange){
|
|
345
|
-
try{
|
|
346
|
-
newRange = doc.createRange();
|
|
347
|
-
newRange.setStart(node, 0);
|
|
348
|
-
if(range.compareBoundaryPoints(range.START_TO_END, newRange) === 1){
|
|
349
|
-
return true;
|
|
350
|
-
}
|
|
351
|
-
}catch(e){ /* squelch */}
|
|
352
|
-
}
|
|
353
|
-
}else{
|
|
354
|
-
// IE6-8, so we can't use the range object as the pseudo
|
|
355
|
-
// range doesn't implement the boundary checking, we have to
|
|
356
|
-
// use IE specific crud.
|
|
357
|
-
range = doc.selection.createRange();
|
|
358
|
-
try{
|
|
359
|
-
newRange = node.ownerDocument.body.createTextRange();
|
|
360
|
-
newRange.moveToElementText(node);
|
|
361
|
-
}catch(e2){/* squelch */}
|
|
362
|
-
if(range && newRange){
|
|
363
|
-
// We can finally compare similar to W3C
|
|
364
|
-
if(range.compareEndPoints("EndToStart", newRange) === 1){
|
|
365
|
-
return true;
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
return false; // Boolean
|
|
371
|
-
};
|
|
372
|
-
|
|
373
|
-
this.getBookmark = function(){
|
|
374
|
-
// summary:
|
|
375
|
-
// Retrieves a bookmark that can be used with moveToBookmark to reselect the currently selected range.
|
|
376
|
-
|
|
377
|
-
// TODO: merge additional code from Editor._getBookmark into this method
|
|
378
|
-
|
|
379
|
-
var bm, rg, tg, sel = doc.selection, cf = focus.curNode;
|
|
380
|
-
|
|
381
|
-
if(doc.getSelection){
|
|
382
|
-
// W3C Range API for selections.
|
|
383
|
-
sel = win.getSelection();
|
|
384
|
-
if(sel){
|
|
385
|
-
if(sel.isCollapsed){
|
|
386
|
-
tg = cf? cf.tagName : "";
|
|
387
|
-
if(tg){
|
|
388
|
-
// Create a fake rangelike item to restore selections.
|
|
389
|
-
tg = tg.toLowerCase();
|
|
390
|
-
if(tg == "textarea" ||
|
|
391
|
-
(tg == "input" && (!cf.type || cf.type.toLowerCase() == "text"))){
|
|
392
|
-
sel = {
|
|
393
|
-
start: cf.selectionStart,
|
|
394
|
-
end: cf.selectionEnd,
|
|
395
|
-
node: cf,
|
|
396
|
-
pRange: true
|
|
397
|
-
};
|
|
398
|
-
return {isCollapsed: (sel.end <= sel.start), mark: sel}; //Object.
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
bm = {isCollapsed:true};
|
|
402
|
-
if(sel.rangeCount){
|
|
403
|
-
bm.mark = sel.getRangeAt(0).cloneRange();
|
|
404
|
-
}
|
|
405
|
-
}else{
|
|
406
|
-
rg = sel.getRangeAt(0);
|
|
407
|
-
bm = {isCollapsed: false, mark: rg.cloneRange()};
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
}else if(sel){
|
|
411
|
-
// If the current focus was a input of some sort and no selection, don't bother saving
|
|
412
|
-
// a native bookmark. This is because it causes issues with dialog/page selection restore.
|
|
413
|
-
// So, we need to create pseudo bookmarks to work with.
|
|
414
|
-
tg = cf ? cf.tagName : "";
|
|
415
|
-
tg = tg.toLowerCase();
|
|
416
|
-
if(cf && tg && (tg == "button" || tg == "textarea" || tg == "input")){
|
|
417
|
-
if(sel.type && sel.type.toLowerCase() == "none"){
|
|
418
|
-
return {
|
|
419
|
-
isCollapsed: true,
|
|
420
|
-
mark: null
|
|
421
|
-
}
|
|
422
|
-
}else{
|
|
423
|
-
rg = sel.createRange();
|
|
424
|
-
return {
|
|
425
|
-
isCollapsed: rg.text && rg.text.length?false:true,
|
|
426
|
-
mark: {
|
|
427
|
-
range: rg,
|
|
428
|
-
pRange: true
|
|
429
|
-
}
|
|
430
|
-
};
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
bm = {};
|
|
434
|
-
|
|
435
|
-
//'IE' way for selections.
|
|
436
|
-
try{
|
|
437
|
-
// createRange() throws exception when dojo in iframe
|
|
438
|
-
// and nothing selected, see #9632
|
|
439
|
-
rg = sel.createRange();
|
|
440
|
-
bm.isCollapsed = !(sel.type == 'Text' ? rg.htmlText.length : rg.length);
|
|
441
|
-
}catch(e){
|
|
442
|
-
bm.isCollapsed = true;
|
|
443
|
-
return bm;
|
|
444
|
-
}
|
|
445
|
-
if(sel.type.toUpperCase() == 'CONTROL'){
|
|
446
|
-
if(rg.length){
|
|
447
|
-
bm.mark=[];
|
|
448
|
-
var i=0,len=rg.length;
|
|
449
|
-
while(i<len){
|
|
450
|
-
bm.mark.push(rg.item(i++));
|
|
451
|
-
}
|
|
452
|
-
}else{
|
|
453
|
-
bm.isCollapsed = true;
|
|
454
|
-
bm.mark = null;
|
|
455
|
-
}
|
|
456
|
-
}else{
|
|
457
|
-
bm.mark = rg.getBookmark();
|
|
458
|
-
}
|
|
459
|
-
}else{
|
|
460
|
-
console.warn("No idea how to store the current selection for this browser!");
|
|
461
|
-
}
|
|
462
|
-
return bm; // Object
|
|
463
|
-
};
|
|
464
|
-
|
|
465
|
-
this.moveToBookmark = function(/*Object*/ bookmark){
|
|
466
|
-
// summary:
|
|
467
|
-
// Moves current selection to a bookmark.
|
|
468
|
-
// bookmark:
|
|
469
|
-
// This should be a returned object from getBookmark().
|
|
470
|
-
|
|
471
|
-
// TODO: merge additional code from Editor._moveToBookmark into this method
|
|
472
|
-
|
|
473
|
-
var mark = bookmark.mark;
|
|
474
|
-
if(mark){
|
|
475
|
-
if(doc.getSelection){
|
|
476
|
-
// W3C Range API (FF, WebKit, Opera, etc)
|
|
477
|
-
var sel = win.getSelection();
|
|
478
|
-
if(sel && sel.removeAllRanges){
|
|
479
|
-
if(mark.pRange){
|
|
480
|
-
var n = mark.node;
|
|
481
|
-
n.selectionStart = mark.start;
|
|
482
|
-
n.selectionEnd = mark.end;
|
|
483
|
-
}else{
|
|
484
|
-
sel.removeAllRanges();
|
|
485
|
-
sel.addRange(mark);
|
|
486
|
-
}
|
|
487
|
-
}else{
|
|
488
|
-
console.warn("No idea how to restore selection for this browser!");
|
|
489
|
-
}
|
|
490
|
-
}else if(doc.selection && mark){
|
|
491
|
-
//'IE' way.
|
|
492
|
-
var rg;
|
|
493
|
-
if(mark.pRange){
|
|
494
|
-
rg = mark.range;
|
|
495
|
-
}else if(lang.isArray(mark)){
|
|
496
|
-
rg = doc.body.createControlRange();
|
|
497
|
-
//rg.addElement does not have call/apply method, so can not call it directly
|
|
498
|
-
//rg is not available in "range.addElement(item)", so can't use that either
|
|
499
|
-
array.forEach(mark, function(n){
|
|
500
|
-
rg.addElement(n);
|
|
501
|
-
});
|
|
502
|
-
}else{
|
|
503
|
-
rg = doc.body.createTextRange();
|
|
504
|
-
rg.moveToBookmark(mark);
|
|
505
|
-
}
|
|
506
|
-
rg.select();
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
};
|
|
510
|
-
|
|
511
|
-
this.isCollapsed = function(){
|
|
512
|
-
// summary:
|
|
513
|
-
// Returns true if there is no text selected
|
|
514
|
-
return this.getBookmark().isCollapsed;
|
|
515
|
-
};
|
|
516
|
-
};
|
|
517
|
-
|
|
518
|
-
// singleton on the main window
|
|
519
|
-
var selection = new SelectionManager(window);
|
|
520
|
-
|
|
521
|
-
// hook for editor to use class
|
|
522
|
-
selection.SelectionManager = SelectionManager;
|
|
523
|
-
|
|
524
|
-
return selection;
|
|
525
|
-
});
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
//>>built
|
|
2
|
-
define("dijit/typematic",["dojo/_base/array","dojo/_base/connect","dojo/_base/lang","dojo/on","dojo/sniff","./main"],function(_1,_2,_3,on,_4,_5){
|
|
3
|
-
var _6=(_5.typematic={_fireEventAndReload:function(){
|
|
4
|
-
this._timer=null;
|
|
5
|
-
this._callback(++this._count,this._node,this._evt);
|
|
6
|
-
this._currentTimeout=Math.max(this._currentTimeout<0?this._initialDelay:(this._subsequentDelay>1?this._subsequentDelay:Math.round(this._currentTimeout*this._subsequentDelay)),this._minDelay);
|
|
7
|
-
this._timer=setTimeout(_3.hitch(this,"_fireEventAndReload"),this._currentTimeout);
|
|
8
|
-
},trigger:function(_7,_8,_9,_a,_b,_c,_d,_e){
|
|
9
|
-
if(_b!=this._obj){
|
|
10
|
-
this.stop();
|
|
11
|
-
this._initialDelay=_d||500;
|
|
12
|
-
this._subsequentDelay=_c||0.9;
|
|
13
|
-
this._minDelay=_e||10;
|
|
14
|
-
this._obj=_b;
|
|
15
|
-
this._node=_9;
|
|
16
|
-
this._currentTimeout=-1;
|
|
17
|
-
this._count=-1;
|
|
18
|
-
this._callback=_3.hitch(_8,_a);
|
|
19
|
-
this._evt={faux:true};
|
|
20
|
-
for(var _f in _7){
|
|
21
|
-
if(_f!="layerX"&&_f!="layerY"){
|
|
22
|
-
var v=_7[_f];
|
|
23
|
-
if(typeof v!="function"&&typeof v!="undefined"){
|
|
24
|
-
this._evt[_f]=v;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
this._fireEventAndReload();
|
|
29
|
-
}
|
|
30
|
-
},stop:function(){
|
|
31
|
-
if(this._timer){
|
|
32
|
-
clearTimeout(this._timer);
|
|
33
|
-
this._timer=null;
|
|
34
|
-
}
|
|
35
|
-
if(this._obj){
|
|
36
|
-
this._callback(-1,this._node,this._evt);
|
|
37
|
-
this._obj=null;
|
|
38
|
-
}
|
|
39
|
-
},addKeyListener:function(_10,_11,_12,_13,_14,_15,_16){
|
|
40
|
-
var _17="keyCode" in _11?"keydown":"charCode" in _11?"keypress":_2._keypress,_18="keyCode" in _11?"keyCode":"charCode" in _11?"charCode":"charOrCode";
|
|
41
|
-
var _19=[on(_10,_17,_3.hitch(this,function(evt){
|
|
42
|
-
if(evt[_18]==_11[_18]&&(_11.ctrlKey===undefined||_11.ctrlKey==evt.ctrlKey)&&(_11.altKey===undefined||_11.altKey==evt.altKey)&&(_11.metaKey===undefined||_11.metaKey==(evt.metaKey||false))&&(_11.shiftKey===undefined||_11.shiftKey==evt.shiftKey)){
|
|
43
|
-
evt.stopPropagation();
|
|
44
|
-
evt.preventDefault();
|
|
45
|
-
_6.trigger(evt,_12,_10,_13,_11,_14,_15,_16);
|
|
46
|
-
}else{
|
|
47
|
-
if(_6._obj==_11){
|
|
48
|
-
_6.stop();
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
})),on(_10,"keyup",_3.hitch(this,function(){
|
|
52
|
-
if(_6._obj==_11){
|
|
53
|
-
_6.stop();
|
|
54
|
-
}
|
|
55
|
-
}))];
|
|
56
|
-
return {remove:function(){
|
|
57
|
-
_1.forEach(_19,function(h){
|
|
58
|
-
h.remove();
|
|
59
|
-
});
|
|
60
|
-
}};
|
|
61
|
-
},addMouseListener:function(_1a,_1b,_1c,_1d,_1e,_1f){
|
|
62
|
-
var _20=[on(_1a,"mousedown",_3.hitch(this,function(evt){
|
|
63
|
-
evt.preventDefault();
|
|
64
|
-
_6.trigger(evt,_1b,_1a,_1c,_1a,_1d,_1e,_1f);
|
|
65
|
-
})),on(_1a,"mouseup",_3.hitch(this,function(evt){
|
|
66
|
-
if(this._obj){
|
|
67
|
-
evt.preventDefault();
|
|
68
|
-
}
|
|
69
|
-
_6.stop();
|
|
70
|
-
})),on(_1a,"mouseout",_3.hitch(this,function(evt){
|
|
71
|
-
if(this._obj){
|
|
72
|
-
evt.preventDefault();
|
|
73
|
-
}
|
|
74
|
-
_6.stop();
|
|
75
|
-
})),on(_1a,"dblclick",_3.hitch(this,function(evt){
|
|
76
|
-
evt.preventDefault();
|
|
77
|
-
if(_4("ie")<9){
|
|
78
|
-
_6.trigger(evt,_1b,_1a,_1c,_1a,_1d,_1e,_1f);
|
|
79
|
-
setTimeout(_3.hitch(this,_6.stop),50);
|
|
80
|
-
}
|
|
81
|
-
}))];
|
|
82
|
-
return {remove:function(){
|
|
83
|
-
_1.forEach(_20,function(h){
|
|
84
|
-
h.remove();
|
|
85
|
-
});
|
|
86
|
-
}};
|
|
87
|
-
},addListener:function(_21,_22,_23,_24,_25,_26,_27,_28){
|
|
88
|
-
var _29=[this.addKeyListener(_22,_23,_24,_25,_26,_27,_28),this.addMouseListener(_21,_24,_25,_26,_27,_28)];
|
|
89
|
-
return {remove:function(){
|
|
90
|
-
_1.forEach(_29,function(h){
|
|
91
|
-
h.remove();
|
|
92
|
-
});
|
|
93
|
-
}};
|
|
94
|
-
}});
|
|
95
|
-
return _6;
|
|
96
|
-
});
|