ende 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (314) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-gemset +1 -0
  3. data/.ruby-version +1 -0
  4. data/build/build.css +112 -0
  5. data/build/build.js +36465 -0
  6. data/component.json +11 -15
  7. data/components/chaijs/assertion-error/1.0.0/component.json +18 -0
  8. data/components/chaijs/chai/1.9.1/.gitignore +22 -0
  9. data/components/chaijs/chai/1.9.1/.mailmap +1 -0
  10. data/components/chaijs/chai/1.9.1/.npmignore +14 -0
  11. data/components/chaijs/chai/1.9.1/.travis.yml +14 -0
  12. data/components/chaijs/chai/1.9.1/CONTRIBUTING.md +173 -0
  13. data/components/chaijs/chai/1.9.1/History.md +895 -0
  14. data/components/chaijs/chai/1.9.1/Makefile +93 -0
  15. data/components/chaijs/chai/1.9.1/README.md +99 -0
  16. data/components/chaijs/chai/1.9.1/ReleaseNotes.md +482 -0
  17. data/components/chaijs/chai/1.9.1/bower.json +27 -0
  18. data/components/chaijs/chai/1.9.1/chai.js +4782 -0
  19. data/components/chaijs/chai/1.9.1/component.json +50 -0
  20. data/components/chaijs/chai/1.9.1/karma.conf.js +28 -0
  21. data/components/chaijs/chai/1.9.1/karma.sauce.js +41 -0
  22. data/components/chaijs/chai/1.9.1/lib/chai/assertion.js +130 -0
  23. data/components/chaijs/chai/1.9.1/lib/chai/config.js +50 -0
  24. data/components/chaijs/chai/1.9.1/lib/chai/core/assertions.js +1314 -0
  25. data/components/chaijs/chai/1.9.1/lib/chai/interface/assert.js +1056 -0
  26. data/components/chaijs/chai/1.9.1/lib/chai/interface/expect.js +12 -0
  27. data/components/chaijs/chai/1.9.1/lib/chai/interface/should.js +78 -0
  28. data/components/chaijs/chai/1.9.1/lib/chai/utils/addChainableMethod.js +111 -0
  29. data/components/chaijs/chai/1.9.1/lib/chai/utils/addMethod.js +43 -0
  30. data/components/chaijs/chai/1.9.1/lib/chai/utils/addProperty.js +40 -0
  31. data/components/chaijs/chai/1.9.1/lib/chai/utils/flag.js +32 -0
  32. data/components/chaijs/chai/1.9.1/lib/chai/utils/getActual.js +18 -0
  33. data/components/chaijs/chai/1.9.1/lib/chai/utils/getEnumerableProperties.js +25 -0
  34. data/components/chaijs/chai/1.9.1/lib/chai/utils/getMessage.js +49 -0
  35. data/components/chaijs/chai/1.9.1/lib/chai/utils/getName.js +20 -0
  36. data/components/chaijs/chai/1.9.1/lib/chai/utils/getPathValue.js +102 -0
  37. data/components/chaijs/chai/1.9.1/lib/chai/utils/getProperties.js +35 -0
  38. data/components/chaijs/chai/1.9.1/lib/chai/utils/index.js +114 -0
  39. data/components/chaijs/chai/1.9.1/lib/chai/utils/objDisplay.js +49 -0
  40. data/components/chaijs/chai/1.9.1/lib/chai/utils/overwriteChainableMethod.js +53 -0
  41. data/components/chaijs/chai/1.9.1/lib/chai/utils/overwriteMethod.js +51 -0
  42. data/components/chaijs/chai/1.9.1/lib/chai/utils/overwriteProperty.js +54 -0
  43. data/components/chaijs/chai/1.9.1/lib/chai/utils/test.js +26 -0
  44. data/components/chaijs/chai/1.9.1/lib/chai/utils/transferFlags.js +44 -0
  45. data/components/chaijs/chai/1.9.1/lib/chai/utils/type.js +45 -0
  46. data/components/chaijs/chai/1.9.1/lib/chai.js +87 -0
  47. data/components/chaijs/chai/1.9.1/package.json +42 -0
  48. data/components/chaijs/chai/1.9.1/sauce.browsers.js +128 -0
  49. data/components/chaijs/chai/1.9.1/support/sauce/sauce_connect_block.sh +7 -0
  50. data/components/chaijs/chai/1.9.1/support/sauce/sauce_connect_setup.sh +53 -0
  51. data/components/chaijs/chai/1.9.1/test/assert.js +638 -0
  52. data/components/chaijs/chai/1.9.1/test/bootstrap/index.js +22 -0
  53. data/components/chaijs/chai/1.9.1/test/bootstrap/karma.js +22 -0
  54. data/components/chaijs/chai/1.9.1/test/configuration.js +133 -0
  55. data/components/chaijs/chai/1.9.1/test/display/errors.js +14 -0
  56. data/components/chaijs/chai/1.9.1/test/display/message.js +47 -0
  57. data/components/chaijs/chai/1.9.1/test/expect.js +814 -0
  58. data/components/chaijs/chai/1.9.1/test/globalShould.js +15 -0
  59. data/components/chaijs/chai/1.9.1/test/plugins.js +24 -0
  60. data/components/chaijs/chai/1.9.1/test/should.js +744 -0
  61. data/components/chaijs/chai/1.9.1/test/utilities.js +309 -0
  62. data/components/chaijs/deep-eql/0.1.3/component.json +20 -0
  63. data/components/chaijs/deep-eql/0.1.3/lib/eql.js +257 -0
  64. data/components/chaijs/type-detect/0.1.1/component.json +18 -0
  65. data/components/chaijs/type-detect/0.1.1/lib/type.js +142 -0
  66. data/{vendor/components/indefinido-indemma/components/component-bind → components/component/bind/0.0.1}/component.json +1 -1
  67. data/{vendor/components/component-classes → components/component/classes/1.1.2}/component.json +1 -1
  68. data/components/component/classes/1.2.1/component.json +19 -0
  69. data/components/component/classes/1.2.1/index.js +184 -0
  70. data/{vendor/components/component-css → components/component/css/0.0.2}/component.json +2 -2
  71. data/{vendor/components/component-delegate → components/component/delegate/0.1.0}/component.json +2 -2
  72. data/components/component/dialog/0.2.0/component.json +35 -0
  73. data/{vendor/components/component-dialog → components/component/dialog/0.2.0}/index.js +74 -40
  74. data/components/component/dialog/0.2.0/template.html +9 -0
  75. data/{vendor/components/component-dom → components/component/dom/0.7.1}/component.json +6 -4
  76. data/{vendor/components/component-domify → components/component/domify/1.0.0}/component.json +6 -4
  77. data/components/component/domify/1.2.2/component.json +22 -0
  78. data/components/component/domify/1.2.2/index.js +87 -0
  79. data/{vendor/components/component-emitter → components/component/emitter/1.0.0}/component.json +1 -1
  80. data/{vendor/components/component-event → components/component/event/0.1.0}/component.json +3 -3
  81. data/components/component/event/0.1.0/index.js +40 -0
  82. data/components/component/event/0.1.3/component.json +13 -0
  83. data/{vendor/components/component-event → components/component/event/0.1.3}/index.js +3 -5
  84. data/{vendor/components/component-indexof → components/component/indexof/0.0.1}/component.json +1 -1
  85. data/{vendor/components/indefinido-indemma/components/component-jquery → components/component/jquery/1.9.1}/component.json +1 -1
  86. data/{vendor/components/component-matches-selector → components/component/matches-selector/0.1.2}/component.json +6 -4
  87. data/{vendor/components/component-overlay → components/component/overlay/0.1.1}/component.json +1 -1
  88. data/{vendor/components/component-query → components/component/query/0.0.1}/component.json +6 -4
  89. data/components/component/query/0.0.3/component.json +23 -0
  90. data/components/component/query/0.0.3/index.js +21 -0
  91. data/{vendor/components/component-querystring → components/component/querystring/1.3.0}/component.json +4 -3
  92. data/{vendor/components/component-querystring → components/component/querystring/1.3.0}/index.js +26 -2
  93. data/{vendor/components/component-sort → components/component/sort/0.0.3}/component.json +2 -2
  94. data/{vendor/components/component-trim → components/component/trim/0.0.1}/component.json +1 -1
  95. data/{vendor/components/indefinido-indemma/components/component-type → components/component/type/1.0.0}/component.json +4 -2
  96. data/{vendor/components/component-value → components/component/value/1.1.0}/component.json +6 -4
  97. data/{vendor/components/components-modernizr → components/components/modernizr/2.6.2}/component.json +2 -3
  98. data/{vendor/components/indefinido-indemma/components/indefinido-advisable → components/indefinido/advisable/master}/component.json +2 -2
  99. data/components/indefinido/indemma/master/History.md +0 -0
  100. data/components/indefinido/indemma/master/build/build.js +26288 -0
  101. data/components/indefinido/indemma/master/build/development.js +22200 -0
  102. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/build/release.js +264 -273
  103. data/components/indefinido/indemma/master/build/test.js +22200 -0
  104. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/component.json +6 -6
  105. data/components/indefinido/indemma/master/components/chaijs-assertion-error/index.js +110 -0
  106. data/components/indefinido/indemma/master/components/chaijs-chai/index.js +1 -0
  107. data/components/indefinido/indemma/master/components/chaijs-chai/lib/chai/utils/inspect.js +320 -0
  108. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/associable.js +2 -14
  109. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/rest.js +2 -7
  110. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/restfulable.js +9 -33
  111. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/scopable.js +45 -16
  112. data/components/indefinido/indemma/master/lib/record/validatable.js +1100 -0
  113. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/associable_spec.js +2 -3
  114. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/scopable_spec.js +53 -83
  115. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/validations/cpf_spec.js +6 -5
  116. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/associable.coffee +0 -6
  117. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/persistable.coffee +0 -2
  118. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/queryable.coffee +2 -1
  119. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/resource.coffee +2 -3
  120. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/rest.coffee +1 -7
  121. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/restfulable.coffee +8 -34
  122. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/scopable.coffee +31 -32
  123. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/validatable.coffee +1 -12
  124. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/associable_spec.coffee +2 -3
  125. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/scopable_spec.coffee +43 -76
  126. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/validations/cpf_spec.coffee +4 -3
  127. data/{vendor/components/mikeric-rivets → components/mikeric/rivets/v0.5.12}/component.json +2 -2
  128. data/{vendor/components/paulmillr-es6-shim → components/paulmillr/es6-shim/0.10.1}/component.json +11 -4
  129. data/components/paulmillr/es6-shim/0.10.1/es6-shim.js +1833 -0
  130. data/{vendor/components/pluma-assimilate → components/pluma/assimilate/0.3.0}/component.json +3 -3
  131. data/{vendor/components/segmentio-extend → components/segmentio/extend/1.0.0}/component.json +3 -3
  132. data/lib/assets/javascripts/aura/extensions/models.js.coffee.erb +14 -14
  133. data/lib/assets/javascripts/aura/extensions/rivets/accounting.js.coffee +1 -1
  134. data/lib/assets/javascripts/aura/extensions/rivets.js.coffee +3 -3
  135. data/lib/assets/javascripts/aura/extensions/stamps/stampit.js +568 -242
  136. data/lib/assets/javascripts/aura/extensions/widget/#composable.js.coffee# +135 -0
  137. data/lib/assets/javascripts/aura/extensions/widget/composable.js.coffee +2 -2
  138. data/lib/assets/javascripts/config/load_components.js.coffee +10 -10
  139. data/lib/assets/javascripts/ende.js.coffee +21 -18
  140. data/lib/assets/javascripts/widgets/support/adapters/olark.js +1 -4
  141. data/lib/assets/javascripts/widgets/viewer/main.js.coffee +8 -4
  142. data/lib/assets/javascripts/widgets/viewer/plugins/scopable.js.coffee +6 -7
  143. data/lib/ende/version.rb +1 -1
  144. data/vendor/assets/components/build.css +4 -3
  145. data/vendor/assets/components/ende_build.js +29772 -21943
  146. metadata +284 -217
  147. data/vendor/components/KapIT-observe-utils/component.json +0 -16
  148. data/vendor/components/KapIT-observe-utils/lib/observe-utils.js +0 -780
  149. data/vendor/components/component-dialog/component.json +0 -23
  150. data/vendor/components/component-dialog/template.js +0 -1
  151. data/vendor/components/indefinido-indemma/build/development.js +0 -343
  152. data/vendor/components/indefinido-indemma/build/test.js +0 -343
  153. data/vendor/components/indefinido-indemma/lib/record/validatable.js +0 -224
  154. data/vendor/components/indefinido-observable/component.json +0 -24
  155. data/vendor/components/indefinido-observable/index.js +0 -1
  156. data/vendor/components/indefinido-observable/lib/adapters/rivets.js +0 -28
  157. data/vendor/components/indefinido-observable/lib/observable.js +0 -390
  158. data/vendor/components/indefinido-observable/vendor/shims/accessors-legacy.js +0 -92
  159. data/vendor/components/indefinido-observable/vendor/shims/accessors.js +0 -248
  160. data/vendor/components/indefinido-observable/vendor/shims/array.indexOf.js +0 -8
  161. data/vendor/components/indefinido-observable/vendor/shims/object.create.js +0 -77
  162. data/vendor/components/paulmillr-es6-shim/es6-shim.js +0 -996
  163. /data/{vendor/components/indefinido-indemma/components/chaijs-assertion-error → components/chaijs/assertion-error/1.0.0}/index.js +0 -0
  164. /data/{vendor/components/indefinido-indemma/components/chaijs-chai → components/chaijs/chai/1.9.1}/index.js +0 -0
  165. /data/{vendor/components/indefinido-indemma/components/chaijs-chai → components/chaijs/chai/1.9.1}/lib/chai/utils/inspect.js +0 -0
  166. /data/{vendor/components/indefinido-indemma/History.md → components/chaijs/chai/1.9.1/test/auth/.gitkeep} +0 -0
  167. /data/{vendor/components/component-bind → components/component/bind/0.0.1}/index.js +0 -0
  168. /data/{vendor/components/component-classes → components/component/classes/1.1.2}/index.js +0 -0
  169. /data/{vendor/components/component-css → components/component/css/0.0.2}/index.js +0 -0
  170. /data/{vendor/components/component-delegate → components/component/delegate/0.1.0}/index.js +0 -0
  171. /data/{vendor/components/component-dialog → components/component/dialog/0.2.0}/dialog.css +0 -0
  172. /data/{vendor/components/component-dom → components/component/dom/0.7.1}/index.js +0 -0
  173. /data/{vendor/components/component-domify → components/component/domify/1.0.0}/index.js +0 -0
  174. /data/{vendor/components/component-emitter → components/component/emitter/1.0.0}/index.js +0 -0
  175. /data/{vendor/components/component-indexof → components/component/indexof/0.0.1}/index.js +0 -0
  176. /data/{vendor/components/component-jquery → components/component/jquery/1.9.1}/index.js +0 -0
  177. /data/{vendor/components/component-matches-selector → components/component/matches-selector/0.1.2}/index.js +0 -0
  178. /data/{vendor/components/component-overlay → components/component/overlay/0.1.1}/index.js +0 -0
  179. /data/{vendor/components/component-overlay → components/component/overlay/0.1.1}/overlay.css +0 -0
  180. /data/{vendor/components/component-overlay → components/component/overlay/0.1.1}/template.js +0 -0
  181. /data/{vendor/components/component-query → components/component/query/0.0.1}/index.js +0 -0
  182. /data/{vendor/components/component-sort → components/component/sort/0.0.3}/index.js +0 -0
  183. /data/{vendor/components/component-trim → components/component/trim/0.0.1}/index.js +0 -0
  184. /data/{vendor/components/component-type → components/component/type/1.0.0}/index.js +0 -0
  185. /data/{vendor/components/component-value → components/component/value/1.1.0}/index.js +0 -0
  186. /data/{vendor/components/components-modernizr → components/components/modernizr/2.6.2}/modernizr.js +0 -0
  187. /data/{vendor/components/indefinido-advisable → components/indefinido/advisable/master}/index.js +0 -0
  188. /data/{vendor/components/indefinido-advisable → components/indefinido/advisable/master}/lib/advisable.js +0 -0
  189. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/.gitignore +0 -0
  190. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/.ruby-gemset +0 -0
  191. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/.ruby-version +0 -0
  192. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/Gemfile +0 -0
  193. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/Guardfile +0 -0
  194. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/Readme.md +0 -0
  195. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-assertion-error/component.json +0 -0
  196. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/component.json +0 -0
  197. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/assertion.js +0 -0
  198. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/core/assertions.js +0 -0
  199. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/interface/assert.js +0 -0
  200. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/interface/expect.js +0 -0
  201. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/interface/should.js +0 -0
  202. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/addChainableMethod.js +0 -0
  203. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/addMethod.js +0 -0
  204. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/addProperty.js +0 -0
  205. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/eql.js +0 -0
  206. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/flag.js +0 -0
  207. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/getActual.js +0 -0
  208. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/getEnumerableProperties.js +0 -0
  209. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/getMessage.js +0 -0
  210. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/getName.js +0 -0
  211. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/getPathValue.js +0 -0
  212. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/getProperties.js +0 -0
  213. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/index.js +0 -0
  214. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/objDisplay.js +0 -0
  215. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/overwriteMethod.js +0 -0
  216. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/overwriteProperty.js +0 -0
  217. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/test.js +0 -0
  218. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/transferFlags.js +0 -0
  219. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/type.js +0 -0
  220. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai.js +0 -0
  221. /data/{vendor → components/indefinido/indemma/master}/components/component-bind/component.json +0 -0
  222. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/component-bind/index.js +0 -0
  223. /data/{vendor → components/indefinido/indemma/master}/components/component-jquery/component.json +0 -0
  224. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/component-jquery/index.js +0 -0
  225. /data/{vendor → components/indefinido/indemma/master}/components/component-type/component.json +0 -0
  226. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/component-type/index.js +0 -0
  227. /data/{vendor → components/indefinido/indemma/master}/components/indefinido-advisable/component.json +0 -0
  228. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-advisable/index.js +0 -0
  229. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-advisable/lib/advisable.js +0 -0
  230. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-observable/component.json +0 -0
  231. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-observable/components/cjohansen-sinon/sinon.js +0 -0
  232. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-observable/index.js +0 -0
  233. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-observable/lib/adapters/rivets.js +0 -0
  234. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-observable/lib/observable.js +0 -0
  235. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-observable/vendor/shims/accessors-legacy.js +0 -0
  236. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-observable/vendor/shims/accessors.js +0 -0
  237. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-observable/vendor/shims/array.indexOf.js +0 -0
  238. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-observable/vendor/shims/object.create.js +0 -0
  239. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/kapit-observe-utils/component.json +0 -0
  240. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/paulmillr-es6-shim/component.json +0 -0
  241. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/paulmillr-es6-shim/es6-shim.js +0 -0
  242. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/pluma-assimilate/component.json +0 -0
  243. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/pluma-assimilate/dist/assimilate.js +0 -0
  244. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/index.js +0 -0
  245. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/karma.conf.js +0 -0
  246. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/extensions/rivets.js +0 -0
  247. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/errors.js +0 -0
  248. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/maid.js +0 -0
  249. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/persistable.js +0 -0
  250. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/queryable.js +0 -0
  251. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/resource.js +0 -0
  252. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/storable.js +0 -0
  253. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/translationable.js +0 -0
  254. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/validations/associated.js +0 -0
  255. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/validations/confirmation.js +0 -0
  256. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/validations/cpf.js +0 -0
  257. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/validations/presence.js +0 -0
  258. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/validations/remote.js +0 -0
  259. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/validations/type.js +0 -0
  260. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/validations/validatorable.js +0 -0
  261. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record.js +0 -0
  262. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/package.json +0 -0
  263. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/persistable_spec.js +0 -0
  264. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/queryable_spec.js +0 -0
  265. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/resource_spec.js +0 -0
  266. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/rest_spec.js +0 -0
  267. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/restfulable_spec.js +0 -0
  268. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/storable_spec.js +0 -0
  269. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/translationable.js +0 -0
  270. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/validatable_spec.js +0 -0
  271. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/validations/associated_spec.js +0 -0
  272. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/validations/confirmation_spec.js +0 -0
  273. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/validations/presence_spec.js +0 -0
  274. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/validations/remote_spec.js +0 -0
  275. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/validations/type_spec.js +0 -0
  276. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record_spec.js +0 -0
  277. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/spec_helper.js +0 -0
  278. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/support/value_objects/phone.js +0 -0
  279. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/extensions/rivets.coffee +0 -0
  280. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/errors.coffee +0 -0
  281. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/maid.coffee +0 -0
  282. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/storable.coffee +0 -0
  283. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/translationable.coffee +0 -0
  284. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/validations/associated.coffee +0 -0
  285. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/validations/confirmation.coffee +0 -0
  286. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/validations/cpf.coffee +0 -0
  287. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/validations/presence.coffee +0 -0
  288. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/validations/remote.coffee +0 -0
  289. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/validations/type.coffee +0 -0
  290. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/validations/validatorable.coffee +0 -0
  291. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record.coffee +0 -0
  292. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/persistable_spec.coffee +0 -0
  293. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/queryable_spec.coffee +0 -0
  294. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/resource_spec.coffee +0 -0
  295. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/rest_spec.coffee +0 -0
  296. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/restfulable_spec.coffee +0 -0
  297. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/storable_spec.coffee +0 -0
  298. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/translationable.coffee +0 -0
  299. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/validatable_spec.coffee +0 -0
  300. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/validations/associated_spec.coffee +0 -0
  301. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/validations/confirmation_spec.coffee +0 -0
  302. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/validations/presence_spec.coffee +0 -0
  303. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/validations/remote_spec.coffee +0 -0
  304. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/validations/type_spec.coffee +0 -0
  305. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record_spec.coffee +0 -0
  306. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/spec_helper.coffee +0 -0
  307. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/support/value_objects/phone.coffee +0 -0
  308. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/vendor/object/mixin.js +0 -0
  309. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/vendor/owl/pluralize.js +0 -0
  310. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/vendor/sinon.js +0 -0
  311. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/vendor/stampit.js +0 -0
  312. /data/{vendor/components/mikeric-rivets → components/mikeric/rivets/v0.5.12}/dist/rivets.js +0 -0
  313. /data/{vendor/components/pluma-assimilate → components/pluma/assimilate/0.3.0}/dist/assimilate.js +0 -0
  314. /data/{vendor/components/segmentio-extend → components/segmentio/extend/1.0.0}/index.js +0 -0
@@ -0,0 +1,142 @@
1
+ /*!
2
+ * type-detect
3
+ * Copyright(c) 2013 jake luer <jake@alogicalparadox.com>
4
+ * MIT Licensed
5
+ */
6
+
7
+ /*!
8
+ * Primary Exports
9
+ */
10
+
11
+ var exports = module.exports = getType;
12
+
13
+ /*!
14
+ * Detectable javascript natives
15
+ */
16
+
17
+ var natives = {
18
+ '[object Array]': 'array'
19
+ , '[object RegExp]': 'regexp'
20
+ , '[object Function]': 'function'
21
+ , '[object Arguments]': 'arguments'
22
+ , '[object Date]': 'date'
23
+ };
24
+
25
+ /**
26
+ * ### typeOf (obj)
27
+ *
28
+ * Use several different techniques to determine
29
+ * the type of object being tested.
30
+ *
31
+ *
32
+ * @param {Mixed} object
33
+ * @return {String} object type
34
+ * @api public
35
+ */
36
+
37
+ function getType (obj) {
38
+ var str = Object.prototype.toString.call(obj);
39
+ if (natives[str]) return natives[str];
40
+ if (obj === null) return 'null';
41
+ if (obj === undefined) return 'undefined';
42
+ if (obj === Object(obj)) return 'object';
43
+ return typeof obj;
44
+ }
45
+
46
+ exports.Library = Library;
47
+
48
+ /**
49
+ * ### Library
50
+ *
51
+ * Create a repository for custom type detection.
52
+ *
53
+ * ```js
54
+ * var lib = new type.Library;
55
+ * ```
56
+ *
57
+ */
58
+
59
+ function Library () {
60
+ this.tests = {};
61
+ }
62
+
63
+ /**
64
+ * #### .of (obj)
65
+ *
66
+ * Expose replacement `typeof` detection to the library.
67
+ *
68
+ * ```js
69
+ * if ('string' === lib.of('hello world')) {
70
+ * // ...
71
+ * }
72
+ * ```
73
+ *
74
+ * @param {Mixed} object to test
75
+ * @return {String} type
76
+ */
77
+
78
+ Library.prototype.of = getType;
79
+
80
+ /**
81
+ * #### .define (type, test)
82
+ *
83
+ * Add a test to for the `.test()` assertion.
84
+ *
85
+ * Can be defined as a regular expression:
86
+ *
87
+ * ```js
88
+ * lib.define('int', /^[0-9]+$/);
89
+ * ```
90
+ *
91
+ * ... or as a function:
92
+ *
93
+ * ```js
94
+ * lib.define('bln', function (obj) {
95
+ * if ('boolean' === lib.of(obj)) return true;
96
+ * var blns = [ 'yes', 'no', 'true', 'false', 1, 0 ];
97
+ * if ('string' === lib.of(obj)) obj = obj.toLowerCase();
98
+ * return !! ~blns.indexOf(obj);
99
+ * });
100
+ * ```
101
+ *
102
+ * @param {String} type
103
+ * @param {RegExp|Function} test
104
+ * @api public
105
+ */
106
+
107
+ Library.prototype.define = function (type, test) {
108
+ if (arguments.length === 1) return this.tests[type];
109
+ this.tests[type] = test;
110
+ return this;
111
+ };
112
+
113
+ /**
114
+ * #### .test (obj, test)
115
+ *
116
+ * Assert that an object is of type. Will first
117
+ * check natives, and if that does not pass it will
118
+ * use the user defined custom tests.
119
+ *
120
+ * ```js
121
+ * assert(lib.test('1', 'int'));
122
+ * assert(lib.test('yes', 'bln'));
123
+ * ```
124
+ *
125
+ * @param {Mixed} object
126
+ * @param {String} type
127
+ * @return {Boolean} result
128
+ * @api public
129
+ */
130
+
131
+ Library.prototype.test = function (obj, type) {
132
+ if (type === getType(obj)) return true;
133
+ var test = this.tests[type];
134
+
135
+ if (test && 'regexp' === getType(test)) {
136
+ return test.test(obj);
137
+ } else if (test && 'function' === getType(test)) {
138
+ return test(obj);
139
+ } else {
140
+ throw new ReferenceError('Type test "' + type + '" not defined or invalid.');
141
+ }
142
+ };
@@ -10,5 +10,5 @@
10
10
  "scripts": [
11
11
  "index.js"
12
12
  ],
13
- "repo": "https://raw.github.com/component/bind"
13
+ "repository": "component/bind"
14
14
  }
@@ -15,5 +15,5 @@
15
15
  "dependencies": {
16
16
  "component/indexof": "*"
17
17
  },
18
- "repo": "https://raw.github.com/component/classes"
18
+ "repository": "component/classes"
19
19
  }
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "classes",
3
+ "version": "1.2.1",
4
+ "description": "Cross-browser element class list",
5
+ "keywords": [
6
+ "dom",
7
+ "html",
8
+ "classList",
9
+ "class",
10
+ "ui"
11
+ ],
12
+ "scripts": [
13
+ "index.js"
14
+ ],
15
+ "dependencies": {
16
+ "component/indexof": "*"
17
+ },
18
+ "repository": "component/classes"
19
+ }
@@ -0,0 +1,184 @@
1
+ /**
2
+ * Module dependencies.
3
+ */
4
+
5
+ var index = require('indexof');
6
+
7
+ /**
8
+ * Whitespace regexp.
9
+ */
10
+
11
+ var re = /\s+/;
12
+
13
+ /**
14
+ * toString reference.
15
+ */
16
+
17
+ var toString = Object.prototype.toString;
18
+
19
+ /**
20
+ * Wrap `el` in a `ClassList`.
21
+ *
22
+ * @param {Element} el
23
+ * @return {ClassList}
24
+ * @api public
25
+ */
26
+
27
+ module.exports = function(el){
28
+ return new ClassList(el);
29
+ };
30
+
31
+ /**
32
+ * Initialize a new ClassList for `el`.
33
+ *
34
+ * @param {Element} el
35
+ * @api private
36
+ */
37
+
38
+ function ClassList(el) {
39
+ if (!el) throw new Error('A DOM element reference is required');
40
+ this.el = el;
41
+ this.list = el.classList;
42
+ }
43
+
44
+ /**
45
+ * Add class `name` if not already present.
46
+ *
47
+ * @param {String} name
48
+ * @return {ClassList}
49
+ * @api public
50
+ */
51
+
52
+ ClassList.prototype.add = function(name){
53
+ // classList
54
+ if (this.list) {
55
+ this.list.add(name);
56
+ return this;
57
+ }
58
+
59
+ // fallback
60
+ var arr = this.array();
61
+ var i = index(arr, name);
62
+ if (!~i) arr.push(name);
63
+ this.el.className = arr.join(' ');
64
+ return this;
65
+ };
66
+
67
+ /**
68
+ * Remove class `name` when present, or
69
+ * pass a regular expression to remove
70
+ * any which match.
71
+ *
72
+ * @param {String|RegExp} name
73
+ * @return {ClassList}
74
+ * @api public
75
+ */
76
+
77
+ ClassList.prototype.remove = function(name){
78
+ if ('[object RegExp]' == toString.call(name)) {
79
+ return this.removeMatching(name);
80
+ }
81
+
82
+ // classList
83
+ if (this.list) {
84
+ this.list.remove(name);
85
+ return this;
86
+ }
87
+
88
+ // fallback
89
+ var arr = this.array();
90
+ var i = index(arr, name);
91
+ if (~i) arr.splice(i, 1);
92
+ this.el.className = arr.join(' ');
93
+ return this;
94
+ };
95
+
96
+ /**
97
+ * Remove all classes matching `re`.
98
+ *
99
+ * @param {RegExp} re
100
+ * @return {ClassList}
101
+ * @api private
102
+ */
103
+
104
+ ClassList.prototype.removeMatching = function(re){
105
+ var arr = this.array();
106
+ for (var i = 0; i < arr.length; i++) {
107
+ if (re.test(arr[i])) {
108
+ this.remove(arr[i]);
109
+ }
110
+ }
111
+ return this;
112
+ };
113
+
114
+ /**
115
+ * Toggle class `name`, can force state via `force`.
116
+ *
117
+ * For browsers that support classList, but do not support `force` yet,
118
+ * the mistake will be detected and corrected.
119
+ *
120
+ * @param {String} name
121
+ * @param {Boolean} force
122
+ * @return {ClassList}
123
+ * @api public
124
+ */
125
+
126
+ ClassList.prototype.toggle = function(name, force){
127
+ // classList
128
+ if (this.list) {
129
+ if ("undefined" !== typeof force) {
130
+ if (force !== this.list.toggle(name, force)) {
131
+ this.list.toggle(name); // toggle again to correct
132
+ }
133
+ } else {
134
+ this.list.toggle(name);
135
+ }
136
+ return this;
137
+ }
138
+
139
+ // fallback
140
+ if ("undefined" !== typeof force) {
141
+ if (!force) {
142
+ this.remove(name);
143
+ } else {
144
+ this.add(name);
145
+ }
146
+ } else {
147
+ if (this.has(name)) {
148
+ this.remove(name);
149
+ } else {
150
+ this.add(name);
151
+ }
152
+ }
153
+
154
+ return this;
155
+ };
156
+
157
+ /**
158
+ * Return an array of classes.
159
+ *
160
+ * @return {Array}
161
+ * @api public
162
+ */
163
+
164
+ ClassList.prototype.array = function(){
165
+ var str = this.el.className.replace(/^\s+|\s+$/g, '');
166
+ var arr = str.split(re);
167
+ if ('' === arr[0]) arr.shift();
168
+ return arr;
169
+ };
170
+
171
+ /**
172
+ * Check if class `name` is present.
173
+ *
174
+ * @param {String} name
175
+ * @return {ClassList}
176
+ * @api public
177
+ */
178
+
179
+ ClassList.prototype.has =
180
+ ClassList.prototype.contains = function(name){
181
+ return this.list
182
+ ? this.list.contains(name)
183
+ : !! ~index(this.array(), name);
184
+ };
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "name": "css",
3
- "repo": "component/css",
4
3
  "description": "DOM element css helper",
5
4
  "version": "0.0.2",
6
5
  "keywords": [
@@ -14,5 +13,6 @@
14
13
  "license": "MIT",
15
14
  "scripts": [
16
15
  "index.js"
17
- ]
16
+ ],
17
+ "repository": "component/css"
18
18
  }
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "name": "delegate",
3
- "repo": "component/delegate",
4
3
  "description": "Event delegation component",
5
4
  "version": "0.1.0",
6
5
  "keywords": [
@@ -15,5 +14,6 @@
15
14
  },
16
15
  "scripts": [
17
16
  "index.js"
18
- ]
17
+ ],
18
+ "repository": "component/delegate"
19
19
  }
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "dialog",
3
+ "description": "Dialog component",
4
+ "version": "0.2.0",
5
+ "keywords": [
6
+ "dialog",
7
+ "ui",
8
+ "modal"
9
+ ],
10
+ "dependencies": {
11
+ "component/emitter": "1.0.0",
12
+ "component/overlay": "0.1.1",
13
+ "component/domify": "*",
14
+ "component/event": "*",
15
+ "component/classes": "*",
16
+ "component/query": "*"
17
+ },
18
+ "development": {
19
+ "dependencies": {
20
+ "visionmedia/mocha": "*",
21
+ "dominicbarnes/expect.js": "*"
22
+ }
23
+ },
24
+ "scripts": [
25
+ "index.js"
26
+ ],
27
+ "styles": [
28
+ "dialog.css"
29
+ ],
30
+ "templates": [
31
+ "template.html"
32
+ ],
33
+ "demo": "http://component.github.io/dialog/",
34
+ "repository": "component/dialog"
35
+ }
@@ -5,7 +5,10 @@
5
5
 
6
6
  var Emitter = require('emitter')
7
7
  , overlay = require('overlay')
8
- , o = require('jquery');
8
+ , domify = require('domify')
9
+ , events = require('event')
10
+ , classes = require('classes')
11
+ , query = require('query');
9
12
 
10
13
  /**
11
14
  * Active dialog.
@@ -26,7 +29,7 @@ exports = module.exports = dialog;
26
29
  exports.Dialog = Dialog;
27
30
 
28
31
  /**
29
- * Return a new `Dialog` with the given
32
+ * Return a new `Dialog` with the given
30
33
  * (optional) `title` and `msg`.
31
34
  *
32
35
  * @param {String} title or msg
@@ -64,8 +67,9 @@ function dialog(title, msg){
64
67
  function Dialog(options) {
65
68
  Emitter.call(this);
66
69
  options = options || {};
67
- this.template = require('./template');
68
- this.el = o(this.template);
70
+ this.template = require('./template.html');
71
+ this.el = domify(this.template);
72
+ this._classes = classes(this.el);
69
73
  this.render(options);
70
74
  if (active && !active.hiding) active.hide();
71
75
  if (exports.effect) this.effect(exports.effect);
@@ -87,30 +91,34 @@ Dialog.prototype = new Emitter;
87
91
  */
88
92
 
89
93
  Dialog.prototype.render = function(options){
90
- var el = this.el
94
+ var self = this
95
+ , el = self.el
91
96
  , title = options.title
92
- , msg = options.message
93
- , self = this;
97
+ , titleEl = query('.title', el)
98
+ , pEl = query('p', el)
99
+ , msg = options.message;
94
100
 
95
- el.find('.close').click(function(){
101
+ events.bind(query('.close', el), 'click', function (ev) {
102
+ ev.preventDefault();
96
103
  self.emit('close');
97
104
  self.hide();
98
- return false;
99
105
  });
100
106
 
101
- el.find('.title').text(title);
102
- if (!title) el.find('.title').remove();
107
+ if (titleEl) {
108
+ if (!title) {
109
+ titleEl.parentNode.removeChild(titleEl);
110
+ } else {
111
+ titleEl.textContent = title;
112
+ }
113
+ }
103
114
 
104
115
  // message
105
116
  if ('string' == typeof msg) {
106
- el.find('p').text(msg);
117
+ pEl.textContent = msg;
107
118
  } else if (msg) {
108
- el.find('p').replaceWith(msg.el || msg);
119
+ pEl.parentNode.insertBefore(msg.el || msg, pEl);
120
+ pEl.parentNode.removeChild(pEl);
109
121
  }
110
-
111
- setTimeout(function(){
112
- el.removeClass('hide');
113
- }, 0);
114
122
  };
115
123
 
116
124
  /**
@@ -121,8 +129,7 @@ Dialog.prototype.render = function(options){
121
129
  */
122
130
 
123
131
  Dialog.prototype.closable = function(){
124
- this.el.addClass('closable');
125
- return this;
132
+ return this.addClass('closable');
126
133
  };
127
134
 
128
135
  /**
@@ -134,7 +141,7 @@ Dialog.prototype.closable = function(){
134
141
  */
135
142
 
136
143
  Dialog.prototype.addClass = function(name){
137
- this.el.addClass(name);
144
+ this._classes.add(name);
138
145
  return this;
139
146
  };
140
147
 
@@ -171,9 +178,10 @@ Dialog.prototype.modal = function(){
171
178
  * @api public
172
179
  */
173
180
 
174
- Dialog.prototype.overlay = function(){
181
+ Dialog.prototype.overlay = function(opts){
175
182
  var self = this;
176
- var o = overlay({ closable: true });
183
+ opts = opts || { closable: true };
184
+ var o = overlay(opts);
177
185
  o.on('hide', function(){
178
186
  self._overlay = null;
179
187
  self.hide();
@@ -185,17 +193,33 @@ Dialog.prototype.overlay = function(){
185
193
  /**
186
194
  * Close the dialog when the escape key is pressed.
187
195
  *
188
- * @api private
196
+ * @api public
189
197
  */
190
198
 
191
199
  Dialog.prototype.escapable = function(){
192
200
  var self = this;
193
- o(document).bind('keydown.dialog', function(e){
194
- if (27 != e.which) return;
201
+ // Save reference to remove listener later
202
+ self._escKeyCallback = self._escKeyCallback || function (e) {
203
+ e.which = e.which || e.keyCode;
204
+ if (27 !== e.which) return;
195
205
  self.emit('escape');
196
- });
206
+ };
207
+ events.bind(document, 'keydown', self._escKeyCallback);
208
+ return this;
197
209
  };
198
210
 
211
+ /**
212
+ * Fixed dialogs position can be manipulated through CSS.
213
+ *
214
+ * @return {Dialog} for chaining
215
+ * @api public
216
+ */
217
+
218
+ Dialog.prototype.fixed = function(){
219
+ this._fixed = true;
220
+ return this;
221
+ }
222
+
199
223
  /**
200
224
  * Show the dialog.
201
225
  *
@@ -207,20 +231,25 @@ Dialog.prototype.escapable = function(){
207
231
 
208
232
  Dialog.prototype.show = function(){
209
233
  var overlay = this._overlay;
234
+ var self = this;
210
235
 
211
236
  // overlay
212
237
  if (overlay) {
213
238
  overlay.show();
214
- this.el.addClass('modal');
239
+ this._classes.add('modal');
215
240
  }
216
241
 
217
242
  // escape
218
243
  if (!overlay || overlay.closable) this.escapable();
219
244
 
220
245
  // position
221
- this.el.appendTo('body');
222
- this.el.css({ marginLeft: -(this.el.width() / 2) + 'px' });
223
-
246
+ document.body.appendChild(this.el);
247
+ if (!this._fixed) {
248
+ setTimeout(function() {
249
+ self.el.style.marginLeft = -(self.el.offsetWidth / 2) + 'px'
250
+ }, 0);
251
+ }
252
+ this._classes.remove('hide');
224
253
  this.emit('show');
225
254
  return this;
226
255
  };
@@ -250,22 +279,25 @@ Dialog.prototype.hideOverlay = function(){
250
279
 
251
280
  Dialog.prototype.hide = function(ms){
252
281
  var self = this;
253
- o(document).unbind('keydown.dialog');
254
282
 
255
- // prevent thrashing
256
- this.hiding = true;
283
+ if (self._escKeyCallback) {
284
+ events.unbind(document, 'keydown', self._escKeyCallback);
285
+ }
286
+
287
+ // prevent thrashing - this isn't used
288
+ self.hiding = true;
257
289
 
258
290
  // duration
259
291
  if (ms) {
260
292
  setTimeout(function(){
261
293
  self.hide();
262
294
  }, ms);
263
- return this;
295
+ return self;
264
296
  }
265
297
 
266
298
  // hide / remove
267
- this.el.addClass('hide');
268
- if (this._effect) {
299
+ self._classes.add('hide');
300
+ if (self._effect) {
269
301
  setTimeout(function(){
270
302
  self.remove();
271
303
  }, 500);
@@ -274,9 +306,9 @@ Dialog.prototype.hide = function(ms){
274
306
  }
275
307
 
276
308
  // overlay
277
- this.hideOverlay();
309
+ self.hideOverlay();
278
310
 
279
- return this;
311
+ return self;
280
312
  };
281
313
  /**
282
314
  * Hide the dialog without potential animation.
@@ -286,7 +318,9 @@ Dialog.prototype.hide = function(ms){
286
318
  */
287
319
 
288
320
  Dialog.prototype.remove = function(){
289
- this.emit('hide');
290
- this.el.remove();
321
+ if (this.el.parentNode) {
322
+ this.emit('hide');
323
+ this.el.parentNode.removeChild(this.el);
324
+ }
291
325
  return this;
292
326
  };
@@ -0,0 +1,9 @@
1
+ <div id="dialog" class="hide">
2
+ <div class="content">
3
+ <span class="title">Title</span>
4
+ <a href="#" class="close">&times;<em>close</em></a>
5
+ <div class="body">
6
+ <p>Message</p>
7
+ </div>
8
+ </div>
9
+ </div>
@@ -24,10 +24,12 @@
24
24
  "component/query": "0.0.1"
25
25
  },
26
26
  "development": {
27
- "component/assert": "*",
28
- "component/enumerable": "*",
29
- "visionmedia/mocha-matrix": "*"
27
+ "dependencies": {
28
+ "component/assert": "*",
29
+ "component/enumerable": "*",
30
+ "visionmedia/mocha-matrix": "*"
31
+ }
30
32
  },
31
33
  "license": "MIT",
32
- "repo": "https://raw.github.com/component/dom"
34
+ "repository": "component/dom"
33
35
  }