@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.
Files changed (360) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/css/helm.css +40 -0
  3. package/dist/137.js +2 -0
  4. package/dist/137.js.map +1 -0
  5. package/dist/323.js +2 -0
  6. package/dist/323.js.map +1 -0
  7. package/dist/657.js +2 -0
  8. package/dist/657.js.map +1 -0
  9. package/dist/782.js +2 -0
  10. package/dist/782.js.map +1 -0
  11. package/dist/884.js +2 -0
  12. package/dist/884.js.map +1 -0
  13. package/dist/94.js +2 -0
  14. package/dist/94.js.map +1 -0
  15. package/dist/libraries_bio_src_monomer-works_seq-to-molfile-worker_ts.js +16420 -0
  16. package/dist/libraries_bio_src_monomer-works_seq-to-molfile-worker_ts.js.map +1 -0
  17. package/dist/package-test.js +1 -1
  18. package/dist/package-test.js.map +1 -1
  19. package/dist/package.js +1 -1
  20. package/dist/package.js.map +1 -1
  21. package/dist/vendors-HELM_node_modules_lru-cache_dist_esm_index_js.js +1560 -0
  22. package/dist/vendors-HELM_node_modules_lru-cache_dist_esm_index_js.js.map +1 -0
  23. package/files/samples/helm-showcase.csv +56 -0
  24. package/package.json +8 -12
  25. package/src/helm-helper.ts +134 -410
  26. package/src/package-api.ts +14 -11
  27. package/src/package-test.ts +0 -2
  28. package/src/package-utils.ts +8 -298
  29. package/src/package.g.ts +2 -8
  30. package/src/package.ts +11 -31
  31. package/src/tests/helm-activity-cliffs.ts +2 -2
  32. package/src/tests/helm-input-tests.ts +83 -0
  33. package/src/tests/parse-helm-tests.ts +7 -57
  34. package/src/tests/properties-widget-tests.ts +21 -11
  35. package/src/utils/helm-grid-cell-renderer.ts +141 -151
  36. package/src/utils/index.ts +3 -7
  37. package/src/widgets/helm-input.ts +42 -12
  38. package/src/widgets/properties-widget.ts +18 -11
  39. package/webpack.config.js +1 -12
  40. package/helm/JSDraw/Pistoia.HELM-uncompressed.js +0 -9694
  41. package/helm/JSDraw/ReadMe.txt +0 -8
  42. package/helm/JSDraw/Scilligence.JSDraw2.Lite-uncompressed.js +0 -31126
  43. package/helm/dojo/package.ts +0 -41
  44. package/helm/dojo/types.ts +0 -12
  45. package/src/helm-web-editor.ts +0 -68
  46. package/src/tests/get-monomer-tests.ts +0 -214
  47. package/src/tests/helm-service-tests.ts +0 -98
  48. package/src/types/dojo.ts +0 -3
  49. package/src/types/index.ts +0 -5
  50. package/src/utils/get-monomer.ts +0 -90
  51. package/src/utils/helm-service.ts +0 -166
  52. package/test-console-output-1.log +0 -919
  53. package/test-record-1.mp4 +0 -0
  54. package/vendor/dojo-1.10.10/dijit/BackgroundIframe.js +0 -63
  55. package/vendor/dojo-1.10.10/dijit/BackgroundIframe.js.uncompressed.js +0 -116
  56. package/vendor/dojo-1.10.10/dijit/Destroyable.js +0 -35
  57. package/vendor/dojo-1.10.10/dijit/Destroyable.js.uncompressed.js +0 -83
  58. package/vendor/dojo-1.10.10/dijit/Tooltip.js +0 -240
  59. package/vendor/dojo-1.10.10/dijit/Tooltip.js.uncompressed.js +0 -612
  60. package/vendor/dojo-1.10.10/dijit/Viewport.js +0 -44
  61. package/vendor/dojo-1.10.10/dijit/Viewport.js.uncompressed.js +0 -87
  62. package/vendor/dojo-1.10.10/dijit/WidgetSet.js +0 -76
  63. package/vendor/dojo-1.10.10/dijit/WidgetSet.js.uncompressed.js +0 -247
  64. package/vendor/dojo-1.10.10/dijit/_AttachMixin.js +0 -94
  65. package/vendor/dojo-1.10.10/dijit/_AttachMixin.js.uncompressed.js +0 -238
  66. package/vendor/dojo-1.10.10/dijit/_Contained.js +0 -17
  67. package/vendor/dojo-1.10.10/dijit/_Contained.js.uncompressed.js +0 -56
  68. package/vendor/dojo-1.10.10/dijit/_Container.js +0 -47
  69. package/vendor/dojo-1.10.10/dijit/_Container.js.uncompressed.js +0 -108
  70. package/vendor/dojo-1.10.10/dijit/_CssStateMixin.js +0 -198
  71. package/vendor/dojo-1.10.10/dijit/_CssStateMixin.js.uncompressed.js +0 -372
  72. package/vendor/dojo-1.10.10/dijit/_FocusMixin.js +0 -11
  73. package/vendor/dojo-1.10.10/dijit/_FocusMixin.js.uncompressed.js +0 -66
  74. package/vendor/dojo-1.10.10/dijit/_HasDropDown.js +0 -188
  75. package/vendor/dojo-1.10.10/dijit/_HasDropDown.js.uncompressed.js +0 -472
  76. package/vendor/dojo-1.10.10/dijit/_OnDijitClickMixin.js +0 -8
  77. package/vendor/dojo-1.10.10/dijit/_OnDijitClickMixin.js.uncompressed.js +0 -31
  78. package/vendor/dojo-1.10.10/dijit/_TemplatedMixin.js +0 -90
  79. package/vendor/dojo-1.10.10/dijit/_TemplatedMixin.js.uncompressed.js +0 -205
  80. package/vendor/dojo-1.10.10/dijit/_Widget.js +0 -66
  81. package/vendor/dojo-1.10.10/dijit/_Widget.js.uncompressed.js +0 -352
  82. package/vendor/dojo-1.10.10/dijit/_WidgetBase.js +0 -353
  83. package/vendor/dojo-1.10.10/dijit/_WidgetBase.js.uncompressed.js +0 -1200
  84. package/vendor/dojo-1.10.10/dijit/_base/focus.js +0 -68
  85. package/vendor/dojo-1.10.10/dijit/_base/focus.js.uncompressed.js +0 -207
  86. package/vendor/dojo-1.10.10/dijit/_base/manager.js +0 -10
  87. package/vendor/dojo-1.10.10/dijit/_base/manager.js.uncompressed.js +0 -35
  88. package/vendor/dojo-1.10.10/dijit/_base/place.js +0 -52
  89. package/vendor/dojo-1.10.10/dijit/_base/place.js.uncompressed.js +0 -131
  90. package/vendor/dojo-1.10.10/dijit/_base/popup.js +0 -23
  91. package/vendor/dojo-1.10.10/dijit/_base/popup.js.uncompressed.js +0 -58
  92. package/vendor/dojo-1.10.10/dijit/_base/scroll.js +0 -6
  93. package/vendor/dojo-1.10.10/dijit/_base/scroll.js.uncompressed.js +0 -22
  94. package/vendor/dojo-1.10.10/dijit/_base/sniff.js +0 -3
  95. package/vendor/dojo-1.10.10/dijit/_base/sniff.js.uncompressed.js +0 -12
  96. package/vendor/dojo-1.10.10/dijit/_base/typematic.js +0 -3
  97. package/vendor/dojo-1.10.10/dijit/_base/typematic.js.uncompressed.js +0 -10
  98. package/vendor/dojo-1.10.10/dijit/_base/wai.js +0 -32
  99. package/vendor/dojo-1.10.10/dijit/_base/wai.js.uncompressed.js +0 -109
  100. package/vendor/dojo-1.10.10/dijit/_base/window.js +0 -6
  101. package/vendor/dojo-1.10.10/dijit/_base/window.js.uncompressed.js +0 -18
  102. package/vendor/dojo-1.10.10/dijit/_base.js +0 -4
  103. package/vendor/dojo-1.10.10/dijit/_base.js.uncompressed.js +0 -27
  104. package/vendor/dojo-1.10.10/dijit/a11y.js +0 -109
  105. package/vendor/dojo-1.10.10/dijit/a11y.js.uncompressed.js +0 -191
  106. package/vendor/dojo-1.10.10/dijit/a11yclick.js +0 -66
  107. package/vendor/dojo-1.10.10/dijit/a11yclick.js.uncompressed.js +0 -139
  108. package/vendor/dojo-1.10.10/dijit/focus.js +0 -188
  109. package/vendor/dojo-1.10.10/dijit/focus.js.uncompressed.js +0 -371
  110. package/vendor/dojo-1.10.10/dijit/form/Button.js +0 -49
  111. package/vendor/dojo-1.10.10/dijit/form/Button.js.uncompressed.js +0 -130
  112. package/vendor/dojo-1.10.10/dijit/form/ComboBox.js +0 -4
  113. package/vendor/dojo-1.10.10/dijit/form/ComboBox.js.uncompressed.js +0 -27
  114. package/vendor/dojo-1.10.10/dijit/form/ComboButton.js +0 -21
  115. package/vendor/dojo-1.10.10/dijit/form/ComboButton.js.uncompressed.js +0 -86
  116. package/vendor/dojo-1.10.10/dijit/form/DropDownButton.js +0 -38
  117. package/vendor/dojo-1.10.10/dijit/form/DropDownButton.js.uncompressed.js +0 -102
  118. package/vendor/dojo-1.10.10/dijit/form/ToggleButton.js +0 -7
  119. package/vendor/dojo-1.10.10/dijit/form/ToggleButton.js.uncompressed.js +0 -26
  120. package/vendor/dojo-1.10.10/dijit/form/_ButtonMixin.js +0 -50
  121. package/vendor/dojo-1.10.10/dijit/form/_ButtonMixin.js.uncompressed.js +0 -116
  122. package/vendor/dojo-1.10.10/dijit/form/_FormValueMixin.js +0 -26
  123. package/vendor/dojo-1.10.10/dijit/form/_FormValueMixin.js.uncompressed.js +0 -81
  124. package/vendor/dojo-1.10.10/dijit/form/_FormValueWidget.js +0 -24
  125. package/vendor/dojo-1.10.10/dijit/form/_FormValueWidget.js.uncompressed.js +0 -51
  126. package/vendor/dojo-1.10.10/dijit/form/_FormWidget.js +0 -22
  127. package/vendor/dojo-1.10.10/dijit/form/_FormWidget.js.uncompressed.js +0 -67
  128. package/vendor/dojo-1.10.10/dijit/form/_FormWidgetMixin.js +0 -111
  129. package/vendor/dojo-1.10.10/dijit/form/_FormWidgetMixin.js.uncompressed.js +0 -254
  130. package/vendor/dojo-1.10.10/dijit/form/_ToggleButtonMixin.js +0 -32
  131. package/vendor/dojo-1.10.10/dijit/form/_ToggleButtonMixin.js.uncompressed.js +0 -69
  132. package/vendor/dojo-1.10.10/dijit/hccss.js +0 -9
  133. package/vendor/dojo-1.10.10/dijit/hccss.js.uncompressed.js +0 -21
  134. package/vendor/dojo-1.10.10/dijit/layout/AccordionContainer.js +0 -215
  135. package/vendor/dojo-1.10.10/dijit/layout/AccordionContainer.js.uncompressed.js +0 -550
  136. package/vendor/dojo-1.10.10/dijit/layout/AccordionPane.js +0 -7
  137. package/vendor/dojo-1.10.10/dijit/layout/AccordionPane.js.uncompressed.js +0 -25
  138. package/vendor/dojo-1.10.10/dijit/layout/ContentPane.js +0 -235
  139. package/vendor/dojo-1.10.10/dijit/layout/ContentPane.js.uncompressed.js +0 -653
  140. package/vendor/dojo-1.10.10/dijit/layout/StackContainer.js +0 -171
  141. package/vendor/dojo-1.10.10/dijit/layout/StackContainer.js.uncompressed.js +0 -411
  142. package/vendor/dojo-1.10.10/dijit/layout/StackController.js +0 -194
  143. package/vendor/dojo-1.10.10/dijit/layout/StackController.js.uncompressed.js +0 -410
  144. package/vendor/dojo-1.10.10/dijit/layout/_ContentPaneResizeMixin.js +0 -99
  145. package/vendor/dojo-1.10.10/dijit/layout/_ContentPaneResizeMixin.js.uncompressed.js +0 -236
  146. package/vendor/dojo-1.10.10/dijit/layout/_LayoutWidget.js +0 -47
  147. package/vendor/dojo-1.10.10/dijit/layout/_LayoutWidget.js.uncompressed.js +0 -190
  148. package/vendor/dojo-1.10.10/dijit/layout/utils.js +0 -77
  149. package/vendor/dojo-1.10.10/dijit/layout/utils.js.uncompressed.js +0 -151
  150. package/vendor/dojo-1.10.10/dijit/main.js +0 -4
  151. package/vendor/dojo-1.10.10/dijit/main.js.uncompressed.js +0 -16
  152. package/vendor/dojo-1.10.10/dijit/nls/dijit-all_en-us.js +0 -2
  153. package/vendor/dojo-1.10.10/dijit/nls/dijit-all_en-us.js.uncompressed.js +0 -21
  154. package/vendor/dojo-1.10.10/dijit/nls/loading.js +0 -2
  155. package/vendor/dojo-1.10.10/dijit/nls/loading.js.uncompressed.js +0 -47
  156. package/vendor/dojo-1.10.10/dijit/place.js +0 -142
  157. package/vendor/dojo-1.10.10/dijit/place.js.uncompressed.js +0 -407
  158. package/vendor/dojo-1.10.10/dijit/popup.js +0 -162
  159. package/vendor/dojo-1.10.10/dijit/popup.js.uncompressed.js +0 -441
  160. package/vendor/dojo-1.10.10/dijit/registry.js +0 -79
  161. package/vendor/dojo-1.10.10/dijit/registry.js.uncompressed.js +0 -159
  162. package/vendor/dojo-1.10.10/dijit/selection.js +0 -364
  163. package/vendor/dojo-1.10.10/dijit/selection.js.uncompressed.js +0 -525
  164. package/vendor/dojo-1.10.10/dijit/typematic.js +0 -96
  165. package/vendor/dojo-1.10.10/dijit/typematic.js.uncompressed.js +0 -211
  166. package/vendor/dojo-1.10.10/dojo/NodeList-manipulate.js +0 -195
  167. package/vendor/dojo-1.10.10/dojo/NodeList-manipulate.js.uncompressed.js +0 -761
  168. package/vendor/dojo-1.10.10/dojo/Stateful.js +0 -90
  169. package/vendor/dojo-1.10.10/dojo/Stateful.js.uncompressed.js +0 -218
  170. package/vendor/dojo-1.10.10/dojo/_base/url.js +0 -87
  171. package/vendor/dojo-1.10.10/dojo/_base/url.js.uncompressed.js +0 -109
  172. package/vendor/dojo-1.10.10/dojo/cache.js +0 -9
  173. package/vendor/dojo-1.10.10/dojo/cache.js.uncompressed.js +0 -7
  174. package/vendor/dojo-1.10.10/dojo/colors.js +0 -74
  175. package/vendor/dojo-1.10.10/dojo/colors.js.uncompressed.js +0 -232
  176. package/vendor/dojo-1.10.10/dojo/cookie.js +0 -48
  177. package/vendor/dojo-1.10.10/dojo/cookie.js.uncompressed.js +0 -98
  178. package/vendor/dojo-1.10.10/dojo/date/stamp.js +0 -82
  179. package/vendor/dojo-1.10.10/dojo/date/stamp.js.uncompressed.js +0 -144
  180. package/vendor/dojo-1.10.10/dojo/dojo.js +0 -7
  181. package/vendor/dojo-1.10.10/dojo/dojo.js.uncompressed.js +0 -18680
  182. package/vendor/dojo-1.10.10/dojo/fx/Toggler.js +0 -27
  183. package/vendor/dojo-1.10.10/dojo/fx/Toggler.js.uncompressed.js +0 -101
  184. package/vendor/dojo-1.10.10/dojo/fx/easing.js +0 -165
  185. package/vendor/dojo-1.10.10/dojo/fx/easing.js.uncompressed.js +0 -276
  186. package/vendor/dojo-1.10.10/dojo/fx.js +0 -271
  187. package/vendor/dojo-1.10.10/dojo/fx.js.uncompressed.js +0 -443
  188. package/vendor/dojo-1.10.10/dojo/hccss.js +0 -26
  189. package/vendor/dojo-1.10.10/dojo/hccss.js.uncompressed.js +0 -52
  190. package/vendor/dojo-1.10.10/dojo/html.js +0 -161
  191. package/vendor/dojo-1.10.10/dojo/html.js.uncompressed.js +0 -370
  192. package/vendor/dojo-1.10.10/dojo/io/iframe.js +0 -71
  193. package/vendor/dojo-1.10.10/dojo/io/iframe.js.uncompressed.js +0 -190
  194. package/vendor/dojo-1.10.10/dojo/io/script.js +0 -112
  195. package/vendor/dojo-1.10.10/dojo/io/script.js.uncompressed.js +0 -280
  196. package/vendor/dojo-1.10.10/dojo/parser.js +0 -437
  197. package/vendor/dojo-1.10.10/dojo/parser.js.uncompressed.js +0 -915
  198. package/vendor/dojo-1.10.10/dojo/promise/all.js +0 -59
  199. package/vendor/dojo-1.10.10/dojo/promise/all.js.uncompressed.js +0 -77
  200. package/vendor/dojo-1.10.10/dojo/regexp.js +0 -32
  201. package/vendor/dojo-1.10.10/dojo/regexp.js.uncompressed.js +0 -70
  202. package/vendor/dojo-1.10.10/dojo/request/iframe.js +0 -291
  203. package/vendor/dojo-1.10.10/dojo/request/iframe.js.uncompressed.js +0 -438
  204. package/vendor/dojo-1.10.10/dojo/request/script.js +0 -129
  205. package/vendor/dojo-1.10.10/dojo/request/script.js.uncompressed.js +0 -237
  206. package/vendor/dojo-1.10.10/dojo/require.js +0 -11
  207. package/vendor/dojo-1.10.10/dojo/require.js.uncompressed.js +0 -7
  208. package/vendor/dojo-1.10.10/dojo/resources/blank.gif +0 -0
  209. package/vendor/dojo-1.10.10/dojo/string.js +0 -67
  210. package/vendor/dojo-1.10.10/dojo/string.js.uncompressed.js +0 -181
  211. package/vendor/dojo-1.10.10/dojo/touch.js +0 -191
  212. package/vendor/dojo-1.10.10/dojo/touch.js.uncompressed.js +0 -468
  213. package/vendor/dojo-1.10.10/dojo/uacss.js +0 -36
  214. package/vendor/dojo-1.10.10/dojo/uacss.js.uncompressed.js +0 -85
  215. package/vendor/dojo-1.10.10/dojo/window.js +0 -141
  216. package/vendor/dojo-1.10.10/dojo/window.js.uncompressed.js +0 -241
  217. package/vendor/dojo-1.10.10/dojox/charting/Chart.js +0 -626
  218. package/vendor/dojo-1.10.10/dojox/charting/Chart.js.uncompressed.js +0 -1220
  219. package/vendor/dojo-1.10.10/dojox/charting/Chart2D.js +0 -5
  220. package/vendor/dojo-1.10.10/dojox/charting/Chart2D.js.uncompressed.js +0 -16
  221. package/vendor/dojo-1.10.10/dojox/charting/Element.js +0 -247
  222. package/vendor/dojo-1.10.10/dojox/charting/Element.js.uncompressed.js +0 -402
  223. package/vendor/dojo-1.10.10/dojox/charting/Series.js +0 -24
  224. package/vendor/dojo-1.10.10/dojox/charting/Series.js.uncompressed.js +0 -58
  225. package/vendor/dojo-1.10.10/dojox/charting/SimpleTheme.js +0 -191
  226. package/vendor/dojo-1.10.10/dojox/charting/SimpleTheme.js.uncompressed.js +0 -577
  227. package/vendor/dojo-1.10.10/dojox/charting/Theme.js +0 -42
  228. package/vendor/dojo-1.10.10/dojox/charting/Theme.js.uncompressed.js +0 -120
  229. package/vendor/dojo-1.10.10/dojox/charting/action2d/Base.js +0 -11
  230. package/vendor/dojo-1.10.10/dojox/charting/action2d/Base.js.uncompressed.js +0 -36
  231. package/vendor/dojo-1.10.10/dojox/charting/action2d/Highlight.js +0 -77
  232. package/vendor/dojo-1.10.10/dojox/charting/action2d/Highlight.js.uncompressed.js +0 -144
  233. package/vendor/dojo-1.10.10/dojox/charting/action2d/Magnify.js +0 -58
  234. package/vendor/dojo-1.10.10/dojox/charting/action2d/Magnify.js.uncompressed.js +0 -123
  235. package/vendor/dojo-1.10.10/dojox/charting/action2d/MoveSlice.js +0 -54
  236. package/vendor/dojo-1.10.10/dojox/charting/action2d/MoveSlice.js.uncompressed.js +0 -124
  237. package/vendor/dojo-1.10.10/dojox/charting/action2d/PlotAction.js +0 -28
  238. package/vendor/dojo-1.10.10/dojox/charting/action2d/PlotAction.js.uncompressed.js +0 -74
  239. package/vendor/dojo-1.10.10/dojox/charting/action2d/Tooltip.js +0 -116
  240. package/vendor/dojo-1.10.10/dojox/charting/action2d/Tooltip.js.uncompressed.js +0 -178
  241. package/vendor/dojo-1.10.10/dojox/charting/axis2d/Base.js +0 -24
  242. package/vendor/dojo-1.10.10/dojox/charting/axis2d/Base.js.uncompressed.js +0 -83
  243. package/vendor/dojo-1.10.10/dojox/charting/axis2d/Default.js +0 -557
  244. package/vendor/dojo-1.10.10/dojox/charting/axis2d/Default.js.uncompressed.js +0 -980
  245. package/vendor/dojo-1.10.10/dojox/charting/axis2d/Invisible.js +0 -65
  246. package/vendor/dojo-1.10.10/dojox/charting/axis2d/Invisible.js.uncompressed.js +0 -224
  247. package/vendor/dojo-1.10.10/dojox/charting/axis2d/common.js +0 -91
  248. package/vendor/dojo-1.10.10/dojox/charting/axis2d/common.js.uncompressed.js +0 -164
  249. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Areas.js +0 -7
  250. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Areas.js.uncompressed.js +0 -14
  251. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bars.js +0 -168
  252. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bars.js.uncompressed.js +0 -311
  253. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Base.js +0 -61
  254. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Base.js.uncompressed.js +0 -161
  255. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bubble.js +0 -141
  256. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Bubble.js.uncompressed.js +0 -242
  257. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Candlesticks.js +0 -126
  258. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Candlesticks.js.uncompressed.js +0 -243
  259. package/vendor/dojo-1.10.10/dojox/charting/plot2d/CartesianBase.js +0 -108
  260. package/vendor/dojo-1.10.10/dojox/charting/plot2d/CartesianBase.js.uncompressed.js +0 -290
  261. package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredBars.js +0 -13
  262. package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredBars.js.uncompressed.js +0 -14
  263. package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredColumns.js +0 -13
  264. package/vendor/dojo-1.10.10/dojox/charting/plot2d/ClusteredColumns.js.uncompressed.js +0 -14
  265. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Columns.js +0 -153
  266. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Columns.js.uncompressed.js +0 -249
  267. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Default.js +0 -253
  268. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Default.js.uncompressed.js +0 -472
  269. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Grid.js +0 -182
  270. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Grid.js.uncompressed.js +0 -356
  271. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Lines.js +0 -6
  272. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Lines.js.uncompressed.js +0 -12
  273. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Markers.js +0 -6
  274. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Markers.js.uncompressed.js +0 -12
  275. package/vendor/dojo-1.10.10/dojox/charting/plot2d/MarkersOnly.js +0 -7
  276. package/vendor/dojo-1.10.10/dojox/charting/plot2d/MarkersOnly.js.uncompressed.js +0 -13
  277. package/vendor/dojo-1.10.10/dojox/charting/plot2d/OHLC.js +0 -110
  278. package/vendor/dojo-1.10.10/dojox/charting/plot2d/OHLC.js.uncompressed.js +0 -208
  279. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Pie.js +0 -303
  280. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Pie.js.uncompressed.js +0 -547
  281. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Scatter.js +0 -134
  282. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Scatter.js.uncompressed.js +0 -207
  283. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Spider.js +0 -299
  284. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Spider.js.uncompressed.js +0 -537
  285. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Stacked.js +0 -24
  286. package/vendor/dojo-1.10.10/dojox/charting/plot2d/Stacked.js.uncompressed.js +0 -44
  287. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedAreas.js +0 -7
  288. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedAreas.js.uncompressed.js +0 -14
  289. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedBars.js +0 -22
  290. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedBars.js.uncompressed.js +0 -33
  291. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedColumns.js +0 -20
  292. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedColumns.js.uncompressed.js +0 -31
  293. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedLines.js +0 -6
  294. package/vendor/dojo-1.10.10/dojox/charting/plot2d/StackedLines.js.uncompressed.js +0 -12
  295. package/vendor/dojo-1.10.10/dojox/charting/plot2d/_PlotEvents.js +0 -68
  296. package/vendor/dojo-1.10.10/dojox/charting/plot2d/_PlotEvents.js.uncompressed.js +0 -120
  297. package/vendor/dojo-1.10.10/dojox/charting/plot2d/common.js +0 -209
  298. package/vendor/dojo-1.10.10/dojox/charting/plot2d/common.js.uncompressed.js +0 -214
  299. package/vendor/dojo-1.10.10/dojox/charting/plot2d/commonStacked.js +0 -76
  300. package/vendor/dojo-1.10.10/dojox/charting/plot2d/commonStacked.js.uncompressed.js +0 -77
  301. package/vendor/dojo-1.10.10/dojox/charting/scaler/common.js +0 -59
  302. package/vendor/dojo-1.10.10/dojox/charting/scaler/common.js.uncompressed.js +0 -70
  303. package/vendor/dojo-1.10.10/dojox/charting/scaler/linear.js +0 -220
  304. package/vendor/dojo-1.10.10/dojox/charting/scaler/linear.js.uncompressed.js +0 -262
  305. package/vendor/dojo-1.10.10/dojox/charting/scaler/primitive.js +0 -23
  306. package/vendor/dojo-1.10.10/dojox/charting/scaler/primitive.js.uncompressed.js +0 -36
  307. package/vendor/dojo-1.10.10/dojox/charting/themes/Claro.js +0 -39
  308. package/vendor/dojo-1.10.10/dojox/charting/themes/Claro.js.uncompressed.js +0 -106
  309. package/vendor/dojo-1.10.10/dojox/charting/themes/Wetland.js +0 -5
  310. package/vendor/dojo-1.10.10/dojox/charting/themes/Wetland.js.uncompressed.js +0 -12
  311. package/vendor/dojo-1.10.10/dojox/charting/themes/common.js +0 -4
  312. package/vendor/dojo-1.10.10/dojox/charting/themes/common.js.uncompressed.js +0 -3
  313. package/vendor/dojo-1.10.10/dojox/charting/widget/Legend.js +0 -102
  314. package/vendor/dojo-1.10.10/dojox/charting/widget/Legend.js.uncompressed.js +0 -165
  315. package/vendor/dojo-1.10.10/dojox/color/Palette.js +0 -163
  316. package/vendor/dojo-1.10.10/dojox/color/Palette.js.uncompressed.js +0 -460
  317. package/vendor/dojo-1.10.10/dojox/color/_base.js +0 -174
  318. package/vendor/dojo-1.10.10/dojox/color/_base.js.uncompressed.js +0 -196
  319. package/vendor/dojo-1.10.10/dojox/gfx/_base.js +0 -253
  320. package/vendor/dojo-1.10.10/dojox/gfx/_base.js.uncompressed.js +0 -1024
  321. package/vendor/dojo-1.10.10/dojox/gfx/fx.js +0 -297
  322. package/vendor/dojo-1.10.10/dojox/gfx/fx.js.uncompressed.js +0 -350
  323. package/vendor/dojo-1.10.10/dojox/gfx/gradutils.js +0 -63
  324. package/vendor/dojo-1.10.10/dojox/gfx/gradutils.js.uncompressed.js +0 -91
  325. package/vendor/dojo-1.10.10/dojox/gfx/matrix.js +0 -170
  326. package/vendor/dojo-1.10.10/dojox/gfx/matrix.js.uncompressed.js +0 -501
  327. package/vendor/dojo-1.10.10/dojox/gfx/path.js +0 -319
  328. package/vendor/dojo-1.10.10/dojox/gfx/path.js.uncompressed.js +0 -478
  329. package/vendor/dojo-1.10.10/dojox/gfx/shape.js +0 -459
  330. package/vendor/dojo-1.10.10/dojox/gfx/shape.js.uncompressed.js +0 -1091
  331. package/vendor/dojo-1.10.10/dojox/gfx/svg.js +0 -662
  332. package/vendor/dojo-1.10.10/dojox/gfx/svg.js.uncompressed.js +0 -1023
  333. package/vendor/dojo-1.10.10/dojox/gfx/utils.js +0 -199
  334. package/vendor/dojo-1.10.10/dojox/gfx/utils.js.uncompressed.js +0 -322
  335. package/vendor/dojo-1.10.10/dojox/gfx.js +0 -2
  336. package/vendor/dojo-1.10.10/dojox/gfx.js.uncompressed.js +0 -1136
  337. package/vendor/dojo-1.10.10/dojox/lang/functional/array.js +0 -151
  338. package/vendor/dojo-1.10.10/dojox/lang/functional/array.js.uncompressed.js +0 -169
  339. package/vendor/dojo-1.10.10/dojox/lang/functional/fold.js +0 -93
  340. package/vendor/dojo-1.10.10/dojox/lang/functional/fold.js.uncompressed.js +0 -125
  341. package/vendor/dojo-1.10.10/dojox/lang/functional/lambda.js +0 -81
  342. package/vendor/dojo-1.10.10/dojox/lang/functional/lambda.js.uncompressed.js +0 -132
  343. package/vendor/dojo-1.10.10/dojox/lang/functional/object.js +0 -54
  344. package/vendor/dojo-1.10.10/dojox/lang/functional/object.js.uncompressed.js +0 -78
  345. package/vendor/dojo-1.10.10/dojox/lang/functional/reversed.js +0 -61
  346. package/vendor/dojo-1.10.10/dojox/lang/functional/reversed.js.uncompressed.js +0 -77
  347. package/vendor/dojo-1.10.10/dojox/lang/functional/scan.js +0 -87
  348. package/vendor/dojo-1.10.10/dojox/lang/functional/scan.js.uncompressed.js +0 -107
  349. package/vendor/dojo-1.10.10/dojox/lang/functional.js +0 -4
  350. package/vendor/dojo-1.10.10/dojox/lang/functional.js.uncompressed.js +0 -3
  351. package/vendor/dojo-1.10.10/dojox/lang/utils.js +0 -86
  352. package/vendor/dojo-1.10.10/dojox/lang/utils.js.uncompressed.js +0 -121
  353. package/vendor/dojo-1.10.10/dojox/main.js +0 -4
  354. package/vendor/dojo-1.10.10/dojox/main.js.uncompressed.js +0 -14
  355. package/vendor/dojo-1.10.10/dojox/storage/LocalStorageProvider.js +0 -112
  356. package/vendor/dojo-1.10.10/dojox/storage/LocalStorageProvider.js.uncompressed.js +0 -208
  357. package/vendor/dojo-1.10.10/dojox/storage/Provider.js +0 -62
  358. package/vendor/dojo-1.10.10/dojox/storage/Provider.js.uncompressed.js +0 -344
  359. package/vendor/dojo-1.10.10/dojox/storage/manager.js +0 -110
  360. package/vendor/dojo-1.10.10/dojox/storage/manager.js.uncompressed.js +0 -263
@@ -1,1200 +0,0 @@
1
- define("dijit/_WidgetBase", [
2
- "require", // require.toUrl
3
- "dojo/_base/array", // array.forEach array.map
4
- "dojo/aspect",
5
- "dojo/_base/config", // config.blankGif
6
- "dojo/_base/connect", // connect.connect
7
- "dojo/_base/declare", // declare
8
- "dojo/dom", // dom.byId
9
- "dojo/dom-attr", // domAttr.set domAttr.remove
10
- "dojo/dom-class", // domClass.add domClass.replace
11
- "dojo/dom-construct", // domConstruct.destroy domConstruct.place
12
- "dojo/dom-geometry", // isBodyLtr
13
- "dojo/dom-style", // domStyle.set, domStyle.get
14
- "dojo/has",
15
- "dojo/_base/kernel",
16
- "dojo/_base/lang", // mixin(), isArray(), etc.
17
- "dojo/on",
18
- "dojo/ready",
19
- "dojo/Stateful", // Stateful
20
- "dojo/topic",
21
- "dojo/_base/window", // win.body()
22
- "./Destroyable",
23
- "dojo/has!dojo-bidi?./_BidiMixin",
24
- "./registry" // registry.getUniqueId(), registry.findWidgets()
25
- ], function(require, array, aspect, config, connect, declare,
26
- dom, domAttr, domClass, domConstruct, domGeometry, domStyle, has, kernel,
27
- lang, on, ready, Stateful, topic, win, Destroyable, _BidiMixin, registry){
28
-
29
- // module:
30
- // dijit/_WidgetBase
31
-
32
- // Flag to make dijit load modules the app didn't explicitly request, for backwards compatibility
33
- has.add("dijit-legacy-requires", !kernel.isAsync);
34
-
35
- // Flag to enable support for textdir attribute
36
- has.add("dojo-bidi", false);
37
-
38
-
39
- // For back-compat, remove in 2.0.
40
- if(has("dijit-legacy-requires")){
41
- ready(0, function(){
42
- var requires = ["dijit/_base/manager"];
43
- require(requires); // use indirection so modules not rolled into a build
44
- });
45
- }
46
-
47
- // Nested hash listing attributes for each tag, all strings in lowercase.
48
- // ex: {"div": {"style": true, "tabindex" true}, "form": { ...
49
- var tagAttrs = {};
50
-
51
- function getAttrs(obj){
52
- var ret = {};
53
- for(var attr in obj){
54
- ret[attr.toLowerCase()] = true;
55
- }
56
- return ret;
57
- }
58
-
59
- function nonEmptyAttrToDom(attr){
60
- // summary:
61
- // Returns a setter function that copies the attribute to this.domNode,
62
- // or removes the attribute from this.domNode, depending on whether the
63
- // value is defined or not.
64
- return function(val){
65
- domAttr[val ? "set" : "remove"](this.domNode, attr, val);
66
- this._set(attr, val);
67
- };
68
- }
69
-
70
- function isEqual(a, b){
71
- // summary:
72
- // Function that determines whether two values are identical,
73
- // taking into account that NaN is not normally equal to itself
74
- // in JS.
75
-
76
- return a === b || (/* a is NaN */ a !== a && /* b is NaN */ b !== b);
77
- }
78
-
79
- var _WidgetBase = declare("dijit._WidgetBase", [Stateful, Destroyable], {
80
- // summary:
81
- // Future base class for all Dijit widgets.
82
- // description:
83
- // Future base class for all Dijit widgets.
84
- // _Widget extends this class adding support for various features needed by desktop.
85
- //
86
- // Provides stubs for widget lifecycle methods for subclasses to extend, like postMixInProperties(), buildRendering(),
87
- // postCreate(), startup(), and destroy(), and also public API methods like set(), get(), and watch().
88
- //
89
- // Widgets can provide custom setters/getters for widget attributes, which are called automatically by set(name, value).
90
- // For an attribute XXX, define methods _setXXXAttr() and/or _getXXXAttr().
91
- //
92
- // _setXXXAttr can also be a string/hash/array mapping from a widget attribute XXX to the widget's DOMNodes:
93
- //
94
- // - DOM node attribute
95
- // | _setFocusAttr: {node: "focusNode", type: "attribute"}
96
- // | _setFocusAttr: "focusNode" (shorthand)
97
- // | _setFocusAttr: "" (shorthand, maps to this.domNode)
98
- // Maps this.focus to this.focusNode.focus, or (last example) this.domNode.focus
99
- //
100
- // - DOM node innerHTML
101
- // | _setTitleAttr: { node: "titleNode", type: "innerHTML" }
102
- // Maps this.title to this.titleNode.innerHTML
103
- //
104
- // - DOM node innerText
105
- // | _setTitleAttr: { node: "titleNode", type: "innerText" }
106
- // Maps this.title to this.titleNode.innerText
107
- //
108
- // - DOM node CSS class
109
- // | _setMyClassAttr: { node: "domNode", type: "class" }
110
- // Maps this.myClass to this.domNode.className
111
- //
112
- // If the value of _setXXXAttr is an array, then each element in the array matches one of the
113
- // formats of the above list.
114
- //
115
- // If the custom setter is null, no action is performed other than saving the new value
116
- // in the widget (in this).
117
- //
118
- // If no custom setter is defined for an attribute, then it will be copied
119
- // to this.focusNode (if the widget defines a focusNode), or this.domNode otherwise.
120
- // That's only done though for attributes that match DOMNode attributes (title,
121
- // alt, aria-labelledby, etc.)
122
-
123
- // id: [const] String
124
- // A unique, opaque ID string that can be assigned by users or by the
125
- // system. If the developer passes an ID which is known not to be
126
- // unique, the specified ID is ignored and the system-generated ID is
127
- // used instead.
128
- id: "",
129
- _setIdAttr: "domNode", // to copy to this.domNode even for auto-generated id's
130
-
131
- // lang: [const] String
132
- // Rarely used. Overrides the default Dojo locale used to render this widget,
133
- // as defined by the [HTML LANG](http://www.w3.org/TR/html401/struct/dirlang.html#adef-lang) attribute.
134
- // Value must be among the list of locales specified during by the Dojo bootstrap,
135
- // formatted according to [RFC 3066](http://www.ietf.org/rfc/rfc3066.txt) (like en-us).
136
- lang: "",
137
- // set on domNode even when there's a focus node. but don't set lang="", since that's invalid.
138
- _setLangAttr: nonEmptyAttrToDom("lang"),
139
-
140
- // dir: [const] String
141
- // Bi-directional support, as defined by the [HTML DIR](http://www.w3.org/TR/html401/struct/dirlang.html#adef-dir)
142
- // attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's
143
- // default direction.
144
- dir: "",
145
- // set on domNode even when there's a focus node. but don't set dir="", since that's invalid.
146
- _setDirAttr: nonEmptyAttrToDom("dir"), // to set on domNode even when there's a focus node
147
-
148
- // class: String
149
- // HTML class attribute
150
- "class": "",
151
- _setClassAttr: { node: "domNode", type: "class" },
152
-
153
- // Override automatic assigning type --> focusNode, it causes exception on IE6-8.
154
- // Instead, type must be specified as ${type} in the template, as part of the original DOM.
155
- _setTypeAttr: null,
156
-
157
- // style: String||Object
158
- // HTML style attributes as cssText string or name/value hash
159
- style: "",
160
-
161
- // title: String
162
- // HTML title attribute.
163
- //
164
- // For form widgets this specifies a tooltip to display when hovering over
165
- // the widget (just like the native HTML title attribute).
166
- //
167
- // For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer,
168
- // etc., it's used to specify the tab label, accordion pane title, etc. In this case it's
169
- // interpreted as HTML.
170
- title: "",
171
-
172
- // tooltip: String
173
- // When this widget's title attribute is used to for a tab label, accordion pane title, etc.,
174
- // this specifies the tooltip to appear when the mouse is hovered over that text.
175
- tooltip: "",
176
-
177
- // baseClass: [protected] String
178
- // Root CSS class of the widget (ex: dijitTextBox), used to construct CSS classes to indicate
179
- // widget state.
180
- baseClass: "",
181
-
182
- // srcNodeRef: [readonly] DomNode
183
- // pointer to original DOM node
184
- srcNodeRef: null,
185
-
186
- // domNode: [readonly] DomNode
187
- // This is our visible representation of the widget! Other DOM
188
- // Nodes may by assigned to other properties, usually through the
189
- // template system's data-dojo-attach-point syntax, but the domNode
190
- // property is the canonical "top level" node in widget UI.
191
- domNode: null,
192
-
193
- // containerNode: [readonly] DomNode
194
- // Designates where children of the source DOM node will be placed.
195
- // "Children" in this case refers to both DOM nodes and widgets.
196
- // For example, for myWidget:
197
- //
198
- // | <div data-dojo-type=myWidget>
199
- // | <b> here's a plain DOM node
200
- // | <span data-dojo-type=subWidget>and a widget</span>
201
- // | <i> and another plain DOM node </i>
202
- // | </div>
203
- //
204
- // containerNode would point to:
205
- //
206
- // | <b> here's a plain DOM node
207
- // | <span data-dojo-type=subWidget>and a widget</span>
208
- // | <i> and another plain DOM node </i>
209
- //
210
- // In templated widgets, "containerNode" is set via a
211
- // data-dojo-attach-point assignment.
212
- //
213
- // containerNode must be defined for any widget that accepts innerHTML
214
- // (like ContentPane or BorderContainer or even Button), and conversely
215
- // is null for widgets that don't, like TextBox.
216
- containerNode: null,
217
-
218
- // ownerDocument: [const] Document?
219
- // The document this widget belongs to. If not specified to constructor, will default to
220
- // srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global
221
- ownerDocument: null,
222
- _setOwnerDocumentAttr: function(val){
223
- // this setter is merely to avoid automatically trying to set this.domNode.ownerDocument
224
- this._set("ownerDocument", val);
225
- },
226
-
227
- /*=====
228
- // _started: [readonly] Boolean
229
- // startup() has completed.
230
- _started: false,
231
- =====*/
232
-
233
- // attributeMap: [protected] Object
234
- // Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute
235
- // for each XXX attribute to be mapped to the DOM.
236
- //
237
- // attributeMap sets up a "binding" between attributes (aka properties)
238
- // of the widget and the widget's DOM.
239
- // Changes to widget attributes listed in attributeMap will be
240
- // reflected into the DOM.
241
- //
242
- // For example, calling set('title', 'hello')
243
- // on a TitlePane will automatically cause the TitlePane's DOM to update
244
- // with the new title.
245
- //
246
- // attributeMap is a hash where the key is an attribute of the widget,
247
- // and the value reflects a binding to a:
248
- //
249
- // - DOM node attribute
250
- // | focus: {node: "focusNode", type: "attribute"}
251
- // Maps this.focus to this.focusNode.focus
252
- //
253
- // - DOM node innerHTML
254
- // | title: { node: "titleNode", type: "innerHTML" }
255
- // Maps this.title to this.titleNode.innerHTML
256
- //
257
- // - DOM node innerText
258
- // | title: { node: "titleNode", type: "innerText" }
259
- // Maps this.title to this.titleNode.innerText
260
- //
261
- // - DOM node CSS class
262
- // | myClass: { node: "domNode", type: "class" }
263
- // Maps this.myClass to this.domNode.className
264
- //
265
- // If the value is an array, then each element in the array matches one of the
266
- // formats of the above list.
267
- //
268
- // There are also some shorthands for backwards compatibility:
269
- //
270
- // - string --> { node: string, type: "attribute" }, for example:
271
- //
272
- // | "focusNode" ---> { node: "focusNode", type: "attribute" }
273
- //
274
- // - "" --> { node: "domNode", type: "attribute" }
275
- attributeMap: {},
276
-
277
- // _blankGif: [protected] String
278
- // Path to a blank 1x1 image.
279
- // Used by `<img>` nodes in templates that really get their image via CSS background-image.
280
- _blankGif: config.blankGif || require.toUrl("dojo/resources/blank.gif"),
281
-
282
- //////////// INITIALIZATION METHODS ///////////////////////////////////////
283
-
284
- /*=====
285
- constructor: function(params, srcNodeRef){
286
- // summary:
287
- // Create the widget.
288
- // params: Object|null
289
- // Hash of initialization parameters for widget, including scalar values (like title, duration etc.)
290
- // and functions, typically callbacks like onClick.
291
- // The hash can contain any of the widget's properties, excluding read-only properties.
292
- // srcNodeRef: DOMNode|String?
293
- // If a srcNodeRef (DOM node) is specified:
294
- //
295
- // - use srcNodeRef.innerHTML as my contents
296
- // - if this is a behavioral widget then apply behavior to that srcNodeRef
297
- // - otherwise, replace srcNodeRef with my generated DOM tree
298
- },
299
- =====*/
300
-
301
- _introspect: function(){
302
- // summary:
303
- // Collect metadata about this widget (only once per class, not once per instance):
304
- //
305
- // - list of attributes with custom setters, storing in this.constructor._setterAttrs
306
- // - generate this.constructor._onMap, mapping names like "mousedown" to functions like onMouseDown
307
-
308
- var ctor = this.constructor;
309
- if(!ctor._setterAttrs){
310
- var proto = ctor.prototype,
311
- attrs = ctor._setterAttrs = [], // attributes with custom setters
312
- onMap = (ctor._onMap = {});
313
-
314
- // Items in this.attributeMap are like custom setters. For back-compat, remove for 2.0.
315
- for(var name in proto.attributeMap){
316
- attrs.push(name);
317
- }
318
-
319
- // Loop over widget properties, collecting properties with custom setters and filling in ctor._onMap.
320
- for(name in proto){
321
- if(/^on/.test(name)){
322
- onMap[name.substring(2).toLowerCase()] = name;
323
- }
324
-
325
- if(/^_set[A-Z](.*)Attr$/.test(name)){
326
- name = name.charAt(4).toLowerCase() + name.substr(5, name.length - 9);
327
- if(!proto.attributeMap || !(name in proto.attributeMap)){
328
- attrs.push(name);
329
- }
330
- }
331
- }
332
-
333
- // Note: this isn't picking up info on properties like aria-label and role, that don't have custom setters
334
- // but that set() maps to attributes on this.domNode or this.focusNode
335
- }
336
- },
337
-
338
- postscript: function(/*Object?*/params, /*DomNode|String*/srcNodeRef){
339
- // summary:
340
- // Kicks off widget instantiation. See create() for details.
341
- // tags:
342
- // private
343
-
344
- // Note that we skip calling this.inherited(), i.e. dojo/Stateful::postscript(), because 1.x widgets don't
345
- // expect their custom setters to get called until after buildRendering(). Consider changing for 2.0.
346
-
347
- this.create(params, srcNodeRef);
348
- },
349
-
350
- create: function(params, srcNodeRef){
351
- // summary:
352
- // Kick off the life-cycle of a widget
353
- // description:
354
- // Create calls a number of widget methods (postMixInProperties, buildRendering, postCreate,
355
- // etc.), some of which of you'll want to override. See http://dojotoolkit.org/reference-guide/dijit/_WidgetBase.html
356
- // for a discussion of the widget creation lifecycle.
357
- //
358
- // Of course, adventurous developers could override create entirely, but this should
359
- // only be done as a last resort.
360
- // params: Object|null
361
- // Hash of initialization parameters for widget, including scalar values (like title, duration etc.)
362
- // and functions, typically callbacks like onClick.
363
- // The hash can contain any of the widget's properties, excluding read-only properties.
364
- // srcNodeRef: DOMNode|String?
365
- // If a srcNodeRef (DOM node) is specified:
366
- //
367
- // - use srcNodeRef.innerHTML as my contents
368
- // - if this is a behavioral widget then apply behavior to that srcNodeRef
369
- // - otherwise, replace srcNodeRef with my generated DOM tree
370
- // tags:
371
- // private
372
-
373
- // First time widget is instantiated, scan prototype to figure out info about custom setters etc.
374
- this._introspect();
375
-
376
- // store pointer to original DOM tree
377
- this.srcNodeRef = dom.byId(srcNodeRef);
378
-
379
- // No longer used, remove for 2.0.
380
- this._connects = [];
381
- this._supportingWidgets = [];
382
-
383
- // this is here for back-compat, remove in 2.0 (but check NodeList-instantiate.html test)
384
- if(this.srcNodeRef && (typeof this.srcNodeRef.id == "string")){
385
- this.id = this.srcNodeRef.id;
386
- }
387
-
388
- // mix in our passed parameters
389
- if(params){
390
- this.params = params;
391
- lang.mixin(this, params);
392
- }
393
- this.postMixInProperties();
394
-
395
- // Generate an id for the widget if one wasn't specified, or it was specified as id: undefined.
396
- // Do this before buildRendering() because it might expect the id to be there.
397
- if(!this.id){
398
- this.id = registry.getUniqueId(this.declaredClass.replace(/\./g, "_"));
399
- if(this.params){
400
- // if params contains {id: undefined}, prevent _applyAttributes() from processing it
401
- delete this.params.id;
402
- }
403
- }
404
-
405
- // The document and <body> node this widget is associated with
406
- this.ownerDocument = this.ownerDocument || (this.srcNodeRef ? this.srcNodeRef.ownerDocument : document);
407
- this.ownerDocumentBody = win.body(this.ownerDocument);
408
-
409
- registry.add(this);
410
-
411
- this.buildRendering();
412
-
413
- var deleteSrcNodeRef;
414
-
415
- if(this.domNode){
416
- // Copy attributes listed in attributeMap into the [newly created] DOM for the widget.
417
- // Also calls custom setters for all attributes with custom setters.
418
- this._applyAttributes();
419
-
420
- // If srcNodeRef was specified, then swap out original srcNode for this widget's DOM tree.
421
- // For 2.0, move this after postCreate(). postCreate() shouldn't depend on the
422
- // widget being attached to the DOM since it isn't when a widget is created programmatically like
423
- // new MyWidget({}). See #11635.
424
- var source = this.srcNodeRef;
425
- if(source && source.parentNode && this.domNode !== source){
426
- source.parentNode.replaceChild(this.domNode, source);
427
- deleteSrcNodeRef = true;
428
- }
429
-
430
- // Note: for 2.0 may want to rename widgetId to dojo._scopeName + "_widgetId",
431
- // assuming that dojo._scopeName even exists in 2.0
432
- this.domNode.setAttribute("widgetId", this.id);
433
- }
434
- this.postCreate();
435
-
436
- // If srcNodeRef has been processed and removed from the DOM (e.g. TemplatedWidget) then delete it to allow GC.
437
- // I think for back-compatibility it isn't deleting srcNodeRef until after postCreate() has run.
438
- if(deleteSrcNodeRef){
439
- delete this.srcNodeRef;
440
- }
441
-
442
- this._created = true;
443
- },
444
-
445
- _applyAttributes: function(){
446
- // summary:
447
- // Step during widget creation to copy widget attributes to the
448
- // DOM according to attributeMap and _setXXXAttr objects, and also to call
449
- // custom _setXXXAttr() methods.
450
- //
451
- // Skips over blank/false attribute values, unless they were explicitly specified
452
- // as parameters to the widget, since those are the default anyway,
453
- // and setting tabIndex="" is different than not setting tabIndex at all.
454
- //
455
- // For backwards-compatibility reasons attributeMap overrides _setXXXAttr when
456
- // _setXXXAttr is a hash/string/array, but _setXXXAttr as a functions override attributeMap.
457
- // tags:
458
- // private
459
-
460
- // Call this.set() for each property that was either specified as parameter to constructor,
461
- // or is in the list found above. For correlated properties like value and displayedValue, the one
462
- // specified as a parameter should take precedence.
463
- // Particularly important for new DateTextBox({displayedValue: ...}) since DateTextBox's default value is
464
- // NaN and thus is not ignored like a default value of "".
465
-
466
- // Step 1: Save the current values of the widget properties that were specified as parameters to the constructor.
467
- // Generally this.foo == this.params.foo, except if postMixInProperties() changed the value of this.foo.
468
- var params = {};
469
- for(var key in this.params || {}){
470
- params[key] = this._get(key);
471
- }
472
-
473
- // Step 2: Call set() for each property with a non-falsy value that wasn't passed as a parameter to the constructor
474
- array.forEach(this.constructor._setterAttrs, function(key){
475
- if(!(key in params)){
476
- var val = this._get(key);
477
- if(val){
478
- this.set(key, val);
479
- }
480
- }
481
- }, this);
482
-
483
- // Step 3: Call set() for each property that was specified as parameter to constructor.
484
- // Use params hash created above to ignore side effects from step #2 above.
485
- for(key in params){
486
- this.set(key, params[key]);
487
- }
488
- },
489
-
490
- postMixInProperties: function(){
491
- // summary:
492
- // Called after the parameters to the widget have been read-in,
493
- // but before the widget template is instantiated. Especially
494
- // useful to set properties that are referenced in the widget
495
- // template.
496
- // tags:
497
- // protected
498
- },
499
-
500
- buildRendering: function(){
501
- // summary:
502
- // Construct the UI for this widget, setting this.domNode.
503
- // Most widgets will mixin `dijit._TemplatedMixin`, which implements this method.
504
- // tags:
505
- // protected
506
-
507
- if(!this.domNode){
508
- // Create root node if it wasn't created by _TemplatedMixin
509
- this.domNode = this.srcNodeRef || this.ownerDocument.createElement("div");
510
- }
511
-
512
- // baseClass is a single class name or occasionally a space-separated list of names.
513
- // Add those classes to the DOMNode. If RTL mode then also add with Rtl suffix.
514
- // TODO: make baseClass custom setter
515
- if(this.baseClass){
516
- var classes = this.baseClass.split(" ");
517
- if(!this.isLeftToRight()){
518
- classes = classes.concat(array.map(classes, function(name){
519
- return name + "Rtl";
520
- }));
521
- }
522
- domClass.add(this.domNode, classes);
523
- }
524
- },
525
-
526
- postCreate: function(){
527
- // summary:
528
- // Processing after the DOM fragment is created
529
- // description:
530
- // Called after the DOM fragment has been created, but not necessarily
531
- // added to the document. Do not include any operations which rely on
532
- // node dimensions or placement.
533
- // tags:
534
- // protected
535
- },
536
-
537
- startup: function(){
538
- // summary:
539
- // Processing after the DOM fragment is added to the document
540
- // description:
541
- // Called after a widget and its children have been created and added to the page,
542
- // and all related widgets have finished their create() cycle, up through postCreate().
543
- //
544
- // Note that startup() may be called while the widget is still hidden, for example if the widget is
545
- // inside a hidden dijit/Dialog or an unselected tab of a dijit/layout/TabContainer.
546
- // For widgets that need to do layout, it's best to put that layout code inside resize(), and then
547
- // extend dijit/layout/_LayoutWidget so that resize() is called when the widget is visible.
548
- if(this._started){
549
- return;
550
- }
551
- this._started = true;
552
- array.forEach(this.getChildren(), function(obj){
553
- if(!obj._started && !obj._destroyed && lang.isFunction(obj.startup)){
554
- obj.startup();
555
- obj._started = true;
556
- }
557
- });
558
- },
559
-
560
- //////////// DESTROY FUNCTIONS ////////////////////////////////
561
-
562
- destroyRecursive: function(/*Boolean?*/ preserveDom){
563
- // summary:
564
- // Destroy this widget and its descendants
565
- // description:
566
- // This is the generic "destructor" function that all widget users
567
- // should call to cleanly discard with a widget. Once a widget is
568
- // destroyed, it is removed from the manager object.
569
- // preserveDom:
570
- // If true, this method will leave the original DOM structure
571
- // alone of descendant Widgets. Note: This will NOT work with
572
- // dijit._TemplatedMixin widgets.
573
-
574
- this._beingDestroyed = true;
575
- this.destroyDescendants(preserveDom);
576
- this.destroy(preserveDom);
577
- },
578
-
579
- destroy: function(/*Boolean*/ preserveDom){
580
- // summary:
581
- // Destroy this widget, but not its descendants. Descendants means widgets inside of
582
- // this.containerNode. Will also destroy any resources (including widgets) registered via this.own().
583
- //
584
- // This method will also destroy internal widgets such as those created from a template,
585
- // assuming those widgets exist inside of this.domNode but outside of this.containerNode.
586
- //
587
- // For 2.0 it's planned that this method will also destroy descendant widgets, so apps should not
588
- // depend on the current ability to destroy a widget without destroying its descendants. Generally
589
- // they should use destroyRecursive() for widgets with children.
590
- // preserveDom: Boolean
591
- // If true, this method will leave the original DOM structure alone.
592
- // Note: This will not yet work with _TemplatedMixin widgets
593
-
594
- this._beingDestroyed = true;
595
- this.uninitialize();
596
-
597
- function destroy(w){
598
- if(w.destroyRecursive){
599
- w.destroyRecursive(preserveDom);
600
- }else if(w.destroy){
601
- w.destroy(preserveDom);
602
- }
603
- }
604
-
605
- // Back-compat, remove for 2.0
606
- array.forEach(this._connects, lang.hitch(this, "disconnect"));
607
- array.forEach(this._supportingWidgets, destroy);
608
-
609
- // Destroy supporting widgets, but not child widgets under this.containerNode (for 2.0, destroy child widgets
610
- // here too). if() statement is to guard against exception if destroy() called multiple times (see #15815).
611
- if(this.domNode){
612
- array.forEach(registry.findWidgets(this.domNode, this.containerNode), destroy);
613
- }
614
-
615
- this.destroyRendering(preserveDom);
616
- registry.remove(this.id);
617
- this._destroyed = true;
618
- },
619
-
620
- destroyRendering: function(/*Boolean?*/ preserveDom){
621
- // summary:
622
- // Destroys the DOM nodes associated with this widget.
623
- // preserveDom:
624
- // If true, this method will leave the original DOM structure alone
625
- // during tear-down. Note: this will not work with _Templated
626
- // widgets yet.
627
- // tags:
628
- // protected
629
-
630
- if(this.bgIframe){
631
- this.bgIframe.destroy(preserveDom);
632
- delete this.bgIframe;
633
- }
634
-
635
- if(this.domNode){
636
- if(preserveDom){
637
- domAttr.remove(this.domNode, "widgetId");
638
- }else{
639
- domConstruct.destroy(this.domNode);
640
- }
641
- delete this.domNode;
642
- }
643
-
644
- if(this.srcNodeRef){
645
- if(!preserveDom){
646
- domConstruct.destroy(this.srcNodeRef);
647
- }
648
- delete this.srcNodeRef;
649
- }
650
- },
651
-
652
- destroyDescendants: function(/*Boolean?*/ preserveDom){
653
- // summary:
654
- // Recursively destroy the children of this widget and their
655
- // descendants.
656
- // preserveDom:
657
- // If true, the preserveDom attribute is passed to all descendant
658
- // widget's .destroy() method. Not for use with _Templated
659
- // widgets.
660
-
661
- // get all direct descendants and destroy them recursively
662
- array.forEach(this.getChildren(), function(widget){
663
- if(widget.destroyRecursive){
664
- widget.destroyRecursive(preserveDom);
665
- }
666
- });
667
- },
668
-
669
- uninitialize: function(){
670
- // summary:
671
- // Deprecated. Override destroy() instead to implement custom widget tear-down
672
- // behavior.
673
- // tags:
674
- // protected
675
- return false;
676
- },
677
-
678
- ////////////////// GET/SET, CUSTOM SETTERS, ETC. ///////////////////
679
-
680
- _setStyleAttr: function(/*String||Object*/ value){
681
- // summary:
682
- // Sets the style attribute of the widget according to value,
683
- // which is either a hash like {height: "5px", width: "3px"}
684
- // or a plain string
685
- // description:
686
- // Determines which node to set the style on based on style setting
687
- // in attributeMap.
688
- // tags:
689
- // protected
690
-
691
- var mapNode = this.domNode;
692
-
693
- // Note: technically we should revert any style setting made in a previous call
694
- // to his method, but that's difficult to keep track of.
695
-
696
- if(lang.isObject(value)){
697
- domStyle.set(mapNode, value);
698
- }else{
699
- if(mapNode.style.cssText){
700
- mapNode.style.cssText += "; " + value;
701
- }else{
702
- mapNode.style.cssText = value;
703
- }
704
- }
705
-
706
- this._set("style", value);
707
- },
708
-
709
- _attrToDom: function(/*String*/ attr, /*String*/ value, /*Object?*/ commands){
710
- // summary:
711
- // Reflect a widget attribute (title, tabIndex, duration etc.) to
712
- // the widget DOM, as specified by commands parameter.
713
- // If commands isn't specified then it's looked up from attributeMap.
714
- // Note some attributes like "type"
715
- // cannot be processed this way as they are not mutable.
716
- // attr:
717
- // Name of member variable (ex: "focusNode" maps to this.focusNode) pointing
718
- // to DOMNode inside the widget, or alternately pointing to a subwidget
719
- // tags:
720
- // private
721
-
722
- commands = arguments.length >= 3 ? commands : this.attributeMap[attr];
723
-
724
- array.forEach(lang.isArray(commands) ? commands : [commands], function(command){
725
-
726
- // Get target node and what we are doing to that node
727
- var mapNode = this[command.node || command || "domNode"]; // DOM node
728
- var type = command.type || "attribute"; // class, innerHTML, innerText, or attribute
729
-
730
- switch(type){
731
- case "attribute":
732
- if(lang.isFunction(value)){ // functions execute in the context of the widget
733
- value = lang.hitch(this, value);
734
- }
735
-
736
- // Get the name of the DOM node attribute; usually it's the same
737
- // as the name of the attribute in the widget (attr), but can be overridden.
738
- // Also maps handler names to lowercase, like onSubmit --> onsubmit
739
- var attrName = command.attribute ? command.attribute :
740
- (/^on[A-Z][a-zA-Z]*$/.test(attr) ? attr.toLowerCase() : attr);
741
-
742
- if(mapNode.tagName){
743
- // Normal case, mapping to a DOMNode. Note that modern browsers will have a mapNode.set()
744
- // method, but for consistency we still call domAttr
745
- domAttr.set(mapNode, attrName, value);
746
- }else{
747
- // mapping to a sub-widget
748
- mapNode.set(attrName, value);
749
- }
750
- break;
751
- case "innerText":
752
- mapNode.innerHTML = "";
753
- mapNode.appendChild(this.ownerDocument.createTextNode(value));
754
- break;
755
- case "innerHTML":
756
- mapNode.innerHTML = value;
757
- break;
758
- case "class":
759
- domClass.replace(mapNode, value, this[attr]);
760
- break;
761
- }
762
- }, this);
763
- },
764
-
765
- get: function(name){
766
- // summary:
767
- // Get a property from a widget.
768
- // name:
769
- // The property to get.
770
- // description:
771
- // Get a named property from a widget. The property may
772
- // potentially be retrieved via a getter method. If no getter is defined, this
773
- // just retrieves the object's property.
774
- //
775
- // For example, if the widget has properties `foo` and `bar`
776
- // and a method named `_getFooAttr()`, calling:
777
- // `myWidget.get("foo")` would be equivalent to calling
778
- // `widget._getFooAttr()` and `myWidget.get("bar")`
779
- // would be equivalent to the expression
780
- // `widget.bar2`
781
- var names = this._getAttrNames(name);
782
- return this[names.g] ? this[names.g]() : this._get(name);
783
- },
784
-
785
- set: function(name, value){
786
- // summary:
787
- // Set a property on a widget
788
- // name:
789
- // The property to set.
790
- // value:
791
- // The value to set in the property.
792
- // description:
793
- // Sets named properties on a widget which may potentially be handled by a
794
- // setter in the widget.
795
- //
796
- // For example, if the widget has properties `foo` and `bar`
797
- // and a method named `_setFooAttr()`, calling
798
- // `myWidget.set("foo", "Howdy!")` would be equivalent to calling
799
- // `widget._setFooAttr("Howdy!")` and `myWidget.set("bar", 3)`
800
- // would be equivalent to the statement `widget.bar = 3;`
801
- //
802
- // set() may also be called with a hash of name/value pairs, ex:
803
- //
804
- // | myWidget.set({
805
- // | foo: "Howdy",
806
- // | bar: 3
807
- // | });
808
- //
809
- // This is equivalent to calling `set(foo, "Howdy")` and `set(bar, 3)`
810
-
811
- if(typeof name === "object"){
812
- for(var x in name){
813
- this.set(x, name[x]);
814
- }
815
- return this;
816
- }
817
- var names = this._getAttrNames(name),
818
- setter = this[names.s];
819
- if(lang.isFunction(setter)){
820
- // use the explicit setter
821
- var result = setter.apply(this, Array.prototype.slice.call(arguments, 1));
822
- }else{
823
- // Mapping from widget attribute to DOMNode/subwidget attribute/value/etc.
824
- // Map according to:
825
- // 1. attributeMap setting, if one exists (TODO: attributeMap deprecated, remove in 2.0)
826
- // 2. _setFooAttr: {...} type attribute in the widget (if one exists)
827
- // 3. apply to focusNode or domNode if standard attribute name, excluding funcs like onClick.
828
- // Checks if an attribute is a "standard attribute" by whether the DOMNode JS object has a similar
829
- // attribute name (ex: accept-charset attribute matches jsObject.acceptCharset).
830
- // Note also that Tree.focusNode() is a function not a DOMNode, so test for that.
831
- var defaultNode = this.focusNode && !lang.isFunction(this.focusNode) ? "focusNode" : "domNode",
832
- tag = this[defaultNode] && this[defaultNode].tagName,
833
- attrsForTag = tag && (tagAttrs[tag] || (tagAttrs[tag] = getAttrs(this[defaultNode]))),
834
- map = name in this.attributeMap ? this.attributeMap[name] :
835
- names.s in this ? this[names.s] :
836
- ((attrsForTag && names.l in attrsForTag && typeof value != "function") ||
837
- /^aria-|^data-|^role$/.test(name)) ? defaultNode : null;
838
- if(map != null){
839
- this._attrToDom(name, value, map);
840
- }
841
- this._set(name, value);
842
- }
843
- return result || this;
844
- },
845
-
846
- _attrPairNames: {}, // shared between all widgets
847
- _getAttrNames: function(name){
848
- // summary:
849
- // Helper function for get() and set().
850
- // Caches attribute name values so we don't do the string ops every time.
851
- // tags:
852
- // private
853
-
854
- var apn = this._attrPairNames;
855
- if(apn[name]){
856
- return apn[name];
857
- }
858
- var uc = name.replace(/^[a-z]|-[a-zA-Z]/g, function(c){
859
- return c.charAt(c.length - 1).toUpperCase();
860
- });
861
- return (apn[name] = {
862
- n: name + "Node",
863
- s: "_set" + uc + "Attr", // converts dashes to camel case, ex: accept-charset --> _setAcceptCharsetAttr
864
- g: "_get" + uc + "Attr",
865
- l: uc.toLowerCase() // lowercase name w/out dashes, ex: acceptcharset
866
- });
867
- },
868
-
869
- _set: function(/*String*/ name, /*anything*/ value){
870
- // summary:
871
- // Helper function to set new value for specified property, and call handlers
872
- // registered with watch() if the value has changed.
873
- var oldValue = this[name];
874
- this[name] = value;
875
- if(this._created && !isEqual(oldValue, value)){
876
- if(this._watchCallbacks){
877
- this._watchCallbacks(name, oldValue, value);
878
- }
879
- this.emit("attrmodified-" + name, {
880
- detail: {
881
- prevValue: oldValue,
882
- newValue: value
883
- }
884
- });
885
- }
886
- },
887
-
888
- _get: function(/*String*/ name){
889
- // summary:
890
- // Helper function to get value for specified property stored by this._set(),
891
- // i.e. for properties with custom setters. Used mainly by custom getters.
892
- //
893
- // For example, CheckBox._getValueAttr() calls this._get("value").
894
-
895
- // future: return name in this.props ? this.props[name] : this[name];
896
- return this[name];
897
- },
898
-
899
- emit: function(/*String*/ type, /*Object?*/ eventObj, /*Array?*/ callbackArgs){
900
- // summary:
901
- // Used by widgets to signal that a synthetic event occurred, ex:
902
- // | myWidget.emit("attrmodified-selectedChildWidget", {}).
903
- //
904
- // Emits an event on this.domNode named type.toLowerCase(), based on eventObj.
905
- // Also calls onType() method, if present, and returns value from that method.
906
- // By default passes eventObj to callback, but will pass callbackArgs instead, if specified.
907
- // Modifies eventObj by adding missing parameters (bubbles, cancelable, widget).
908
- // tags:
909
- // protected
910
-
911
- // Specify fallback values for bubbles, cancelable in case they are not set in eventObj.
912
- // Also set pointer to widget, although since we can't add a pointer to the widget for native events
913
- // (see #14729), maybe we shouldn't do it here?
914
- eventObj = eventObj || {};
915
- if(eventObj.bubbles === undefined){
916
- eventObj.bubbles = true;
917
- }
918
- if(eventObj.cancelable === undefined){
919
- eventObj.cancelable = true;
920
- }
921
- if(!eventObj.detail){
922
- eventObj.detail = {};
923
- }
924
- eventObj.detail.widget = this;
925
-
926
- var ret, callback = this["on" + type];
927
- if(callback){
928
- ret = callback.apply(this, callbackArgs ? callbackArgs : [eventObj]);
929
- }
930
-
931
- // Emit event, but avoid spurious emit()'s as parent sets properties on child during startup/destroy
932
- if(this._started && !this._beingDestroyed){
933
- on.emit(this.domNode, type.toLowerCase(), eventObj);
934
- }
935
-
936
- return ret;
937
- },
938
-
939
- on: function(/*String|Function*/ type, /*Function*/ func){
940
- // summary:
941
- // Call specified function when event occurs, ex: myWidget.on("click", function(){ ... }).
942
- // type:
943
- // Name of event (ex: "click") or extension event like touch.press.
944
- // description:
945
- // Call specified function when event `type` occurs, ex: `myWidget.on("click", function(){ ... })`.
946
- // Note that the function is not run in any particular scope, so if (for example) you want it to run in the
947
- // widget's scope you must do `myWidget.on("click", lang.hitch(myWidget, func))`.
948
-
949
- // For backwards compatibility, if there's an onType() method in the widget then connect to that.
950
- // Remove in 2.0.
951
- var widgetMethod = this._onMap(type);
952
- if(widgetMethod){
953
- return aspect.after(this, widgetMethod, func, true);
954
- }
955
-
956
- // Otherwise, just listen for the event on this.domNode.
957
- return this.own(on(this.domNode, type, func))[0];
958
- },
959
-
960
- _onMap: function(/*String|Function*/ type){
961
- // summary:
962
- // Maps on() type parameter (ex: "mousemove") to method name (ex: "onMouseMove").
963
- // If type is a synthetic event like touch.press then returns undefined.
964
- var ctor = this.constructor, map = ctor._onMap;
965
- if(!map){
966
- map = (ctor._onMap = {});
967
- for(var attr in ctor.prototype){
968
- if(/^on/.test(attr)){
969
- map[attr.replace(/^on/, "").toLowerCase()] = attr;
970
- }
971
- }
972
- }
973
- return map[typeof type == "string" && type.toLowerCase()]; // String
974
- },
975
-
976
- toString: function(){
977
- // summary:
978
- // Returns a string that represents the widget.
979
- // description:
980
- // When a widget is cast to a string, this method will be used to generate the
981
- // output. Currently, it does not implement any sort of reversible
982
- // serialization.
983
- return '[Widget ' + this.declaredClass + ', ' + (this.id || 'NO ID') + ']'; // String
984
- },
985
-
986
- getChildren: function(){
987
- // summary:
988
- // Returns all direct children of this widget, i.e. all widgets underneath this.containerNode whose parent
989
- // is this widget. Note that it does not return all descendants, but rather just direct children.
990
- // Analogous to [Node.childNodes](https://developer.mozilla.org/en-US/docs/DOM/Node.childNodes),
991
- // except containing widgets rather than DOMNodes.
992
- //
993
- // The result intentionally excludes internally created widgets (a.k.a. supporting widgets)
994
- // outside of this.containerNode.
995
- //
996
- // Note that the array returned is a simple array. Application code should not assume
997
- // existence of methods like forEach().
998
-
999
- return this.containerNode ? registry.findWidgets(this.containerNode) : []; // dijit/_WidgetBase[]
1000
- },
1001
-
1002
- getParent: function(){
1003
- // summary:
1004
- // Returns the parent widget of this widget.
1005
-
1006
- return registry.getEnclosingWidget(this.domNode.parentNode);
1007
- },
1008
-
1009
- connect: function(/*Object|null*/ obj, /*String|Function*/ event, /*String|Function*/ method){
1010
- // summary:
1011
- // Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead.
1012
- //
1013
- // Connects specified obj/event to specified method of this object
1014
- // and registers for disconnect() on widget destroy.
1015
- //
1016
- // Provide widget-specific analog to dojo.connect, except with the
1017
- // implicit use of this widget as the target object.
1018
- // Events connected with `this.connect` are disconnected upon
1019
- // destruction.
1020
- // returns:
1021
- // A handle that can be passed to `disconnect` in order to disconnect before
1022
- // the widget is destroyed.
1023
- // example:
1024
- // | var btn = new Button();
1025
- // | // when foo.bar() is called, call the listener we're going to
1026
- // | // provide in the scope of btn
1027
- // | btn.connect(foo, "bar", function(){
1028
- // | console.debug(this.toString());
1029
- // | });
1030
- // tags:
1031
- // protected
1032
-
1033
- return this.own(connect.connect(obj, event, this, method))[0]; // handle
1034
- },
1035
-
1036
- disconnect: function(handle){
1037
- // summary:
1038
- // Deprecated, will be removed in 2.0, use handle.remove() instead.
1039
- //
1040
- // Disconnects handle created by `connect`.
1041
- // tags:
1042
- // protected
1043
-
1044
- handle.remove();
1045
- },
1046
-
1047
- subscribe: function(t, method){
1048
- // summary:
1049
- // Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead.
1050
- //
1051
- // Subscribes to the specified topic and calls the specified method
1052
- // of this object and registers for unsubscribe() on widget destroy.
1053
- //
1054
- // Provide widget-specific analog to dojo.subscribe, except with the
1055
- // implicit use of this widget as the target object.
1056
- // t: String
1057
- // The topic
1058
- // method: Function
1059
- // The callback
1060
- // example:
1061
- // | var btn = new Button();
1062
- // | // when /my/topic is published, this button changes its label to
1063
- // | // be the parameter of the topic.
1064
- // | btn.subscribe("/my/topic", function(v){
1065
- // | this.set("label", v);
1066
- // | });
1067
- // tags:
1068
- // protected
1069
- return this.own(topic.subscribe(t, lang.hitch(this, method)))[0]; // handle
1070
- },
1071
-
1072
- unsubscribe: function(/*Object*/ handle){
1073
- // summary:
1074
- // Deprecated, will be removed in 2.0, use handle.remove() instead.
1075
- //
1076
- // Unsubscribes handle created by this.subscribe.
1077
- // Also removes handle from this widget's list of subscriptions
1078
- // tags:
1079
- // protected
1080
-
1081
- handle.remove();
1082
- },
1083
-
1084
- isLeftToRight: function(){
1085
- // summary:
1086
- // Return this widget's explicit or implicit orientation (true for LTR, false for RTL)
1087
- // tags:
1088
- // protected
1089
- return this.dir ? (this.dir.toLowerCase() == "ltr") : domGeometry.isBodyLtr(this.ownerDocument); //Boolean
1090
- },
1091
-
1092
- isFocusable: function(){
1093
- // summary:
1094
- // Return true if this widget can currently be focused
1095
- // and false if not
1096
- return this.focus && (domStyle.get(this.domNode, "display") != "none");
1097
- },
1098
-
1099
- placeAt: function(/*String|DomNode|DocumentFragment|dijit/_WidgetBase*/ reference, /*String|Int?*/ position){
1100
- // summary:
1101
- // Place this widget somewhere in the DOM based
1102
- // on standard domConstruct.place() conventions.
1103
- // description:
1104
- // A convenience function provided in all _Widgets, providing a simple
1105
- // shorthand mechanism to put an existing (or newly created) Widget
1106
- // somewhere in the dom, and allow chaining.
1107
- // reference:
1108
- // Widget, DOMNode, DocumentFragment, or id of widget or DOMNode
1109
- // position:
1110
- // If reference is a widget (or id of widget), and that widget has an ".addChild" method,
1111
- // it will be called passing this widget instance into that method, supplying the optional
1112
- // position index passed. In this case position (if specified) should be an integer.
1113
- //
1114
- // If reference is a DOMNode (or id matching a DOMNode but not a widget),
1115
- // the position argument can be a numeric index or a string
1116
- // "first", "last", "before", or "after", same as dojo/dom-construct::place().
1117
- // returns: dijit/_WidgetBase
1118
- // Provides a useful return of the newly created dijit._Widget instance so you
1119
- // can "chain" this function by instantiating, placing, then saving the return value
1120
- // to a variable.
1121
- // example:
1122
- // | // create a Button with no srcNodeRef, and place it in the body:
1123
- // | var button = new Button({ label:"click" }).placeAt(win.body());
1124
- // | // now, 'button' is still the widget reference to the newly created button
1125
- // | button.on("click", function(e){ console.log('click'); }));
1126
- // example:
1127
- // | // create a button out of a node with id="src" and append it to id="wrapper":
1128
- // | var button = new Button({},"src").placeAt("wrapper");
1129
- // example:
1130
- // | // place a new button as the first element of some div
1131
- // | var button = new Button({ label:"click" }).placeAt("wrapper","first");
1132
- // example:
1133
- // | // create a contentpane and add it to a TabContainer
1134
- // | var tc = dijit.byId("myTabs");
1135
- // | new ContentPane({ href:"foo.html", title:"Wow!" }).placeAt(tc)
1136
-
1137
- var refWidget = !reference.tagName && registry.byId(reference);
1138
- if(refWidget && refWidget.addChild && (!position || typeof position === "number")){
1139
- // Adding this to refWidget and can use refWidget.addChild() to handle everything.
1140
- refWidget.addChild(this, position);
1141
- }else{
1142
- // "reference" is a plain DOMNode, or we can't use refWidget.addChild(). Use domConstruct.place() and
1143
- // target refWidget.containerNode for nested placement (position==number, "first", "last", "only"), and
1144
- // refWidget.domNode otherwise ("after"/"before"/"replace"). (But not supported officially, see #14946.)
1145
- var ref = refWidget && ("domNode" in refWidget) ?
1146
- (refWidget.containerNode && !/after|before|replace/.test(position || "") ?
1147
- refWidget.containerNode : refWidget.domNode) : dom.byId(reference, this.ownerDocument);
1148
- domConstruct.place(this.domNode, ref, position);
1149
-
1150
- // Start this iff it has a parent widget that's already started.
1151
- // TODO: for 2.0 maybe it should also start the widget when this.getParent() returns null??
1152
- if(!this._started && (this.getParent() || {})._started){
1153
- this.startup();
1154
- }
1155
- }
1156
- return this;
1157
- },
1158
-
1159
- defer: function(fcn, delay){
1160
- // summary:
1161
- // Wrapper to setTimeout to avoid deferred functions executing
1162
- // after the originating widget has been destroyed.
1163
- // Returns an object handle with a remove method (that returns null) (replaces clearTimeout).
1164
- // fcn: Function
1165
- // Function reference.
1166
- // delay: Number?
1167
- // Delay, defaults to 0.
1168
- // tags:
1169
- // protected
1170
-
1171
- var timer = setTimeout(lang.hitch(this,
1172
- function(){
1173
- if(!timer){
1174
- return;
1175
- }
1176
- timer = null;
1177
- if(!this._destroyed){
1178
- lang.hitch(this, fcn)();
1179
- }
1180
- }),
1181
- delay || 0
1182
- );
1183
- return {
1184
- remove: function(){
1185
- if(timer){
1186
- clearTimeout(timer);
1187
- timer = null;
1188
- }
1189
- return null; // so this works well: handle = handle.remove();
1190
- }
1191
- };
1192
- }
1193
- });
1194
-
1195
- if(has("dojo-bidi")){
1196
- _WidgetBase.extend(_BidiMixin);
1197
- }
1198
-
1199
- return _WidgetBase;
1200
- });