ember-inspector 4.13.1-alpha.2024.8.9 → 4.13.1-alpha.2025.10.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 (548) hide show
  1. package/PRIVACY.md +3 -0
  2. package/README.md +10 -2
  3. package/app/components/app-picker.hbs +2 -2
  4. package/app/components/component-tree-item.hbs +14 -14
  5. package/app/components/component-tree-toolbar.hbs +17 -3
  6. package/app/components/{date-property-field.js → date-property-field.ts} +6 -5
  7. package/app/components/deprecation-item-source.hbs +1 -1
  8. package/app/components/deprecation-item.hbs +1 -1
  9. package/app/components/deprecations-toolbar.hbs +1 -1
  10. package/app/components/item-types.hbs +7 -7
  11. package/app/components/list-cell.hbs +3 -3
  12. package/app/components/list-content.hbs +4 -3
  13. package/app/components/list-content.ts +96 -0
  14. package/app/components/list.hbs +3 -3
  15. package/app/components/list.js +7 -7
  16. package/app/components/model-types-toolbar.hbs +3 -3
  17. package/app/components/object-inspector/component-parents.hbs +33 -0
  18. package/app/components/object-inspector/component-parents.js +43 -0
  19. package/app/components/object-inspector/dependent-keys.hbs +4 -4
  20. package/app/components/object-inspector/errors.hbs +4 -4
  21. package/app/components/object-inspector/properties-all.hbs +1 -1
  22. package/app/components/object-inspector/properties-base.js +2 -0
  23. package/app/components/object-inspector/properties-grouped.hbs +5 -5
  24. package/app/components/object-inspector/property.hbs +36 -34
  25. package/app/components/object-inspector/property.ts +34 -17
  26. package/app/components/object-inspector/sort-properties.js +12 -4
  27. package/app/components/object-inspector/toggle.hbs +9 -0
  28. package/app/components/object-inspector/toggle.js +6 -0
  29. package/app/components/object-inspector.hbs +11 -9
  30. package/app/components/object-inspector.js +1 -1
  31. package/app/components/promise-item.hbs +11 -11
  32. package/app/components/promise-item.js +8 -6
  33. package/app/components/promise-tree-toolbar.hbs +5 -5
  34. package/app/components/records-toolbar.hbs +2 -2
  35. package/app/components/render-item.hbs +4 -4
  36. package/app/components/render-item.ts +12 -9
  37. package/app/components/render-tree-toolbar.hbs +1 -1
  38. package/app/components/route-cell-name.hbs +1 -1
  39. package/app/components/route-cell-name.js +3 -2
  40. package/app/components/route-tree-toolbar.hbs +2 -2
  41. package/app/components/scroll-container.js +2 -0
  42. package/app/components/side-nav.hbs +5 -5
  43. package/app/components/side-nav.js +1 -1
  44. package/{lib/ui/addon/components → app/components/ui}/drag-handle.hbs +4 -4
  45. package/{lib/ui/addon/components → app/components/ui}/drag-handle.js +3 -1
  46. package/{lib/ui/addon/components → app/components/ui}/empty-message.hbs +1 -1
  47. package/{lib/ui/addon/components → app/components/ui}/error-page.hbs +3 -3
  48. package/{lib/ui/addon/components → app/components/ui}/resizable-column.js +1 -1
  49. package/{lib/ui/addon/components → app/components/ui}/toolbar-clear-button.hbs +1 -1
  50. package/{lib/ui/addon/components → app/components/ui}/toolbar-reload-button.hbs +1 -1
  51. package/{lib/ui/addon/components → app/components/ui}/toolbar-search-field.hbs +2 -2
  52. package/app/computed/{debounce.js → debounce.ts} +7 -5
  53. package/app/config/environment.d.ts +5 -2
  54. package/app/controllers/app-config.js +1 -0
  55. package/app/controllers/application.js +36 -71
  56. package/app/controllers/component-tree.js +26 -7
  57. package/app/controllers/container-type.js +2 -1
  58. package/app/controllers/container-types/{index.js → index.ts} +5 -2
  59. package/app/controllers/container-types.js +3 -6
  60. package/app/controllers/deprecations.js +16 -11
  61. package/app/controllers/libraries.js +1 -0
  62. package/app/controllers/model-types.js +1 -0
  63. package/app/controllers/promise-tree.ts +149 -0
  64. package/app/controllers/records.js +18 -26
  65. package/app/controllers/{render-tree.js → render-tree.ts} +54 -45
  66. package/app/controllers/route-tree.js +7 -5
  67. package/app/helpers/build-style.js +1 -1
  68. package/app/index.html +1 -19
  69. package/app/initializers/setup.js +1 -1
  70. package/app/libs/promise-assembler.ts +249 -0
  71. package/app/libs/resizable-columns.js +10 -10
  72. package/app/models/{promise.js → promise.ts} +72 -69
  73. package/app/{router.js → router.ts} +1 -1
  74. package/app/routes/app-detected.js +3 -5
  75. package/app/routes/application.js +9 -13
  76. package/app/routes/deprecations.js +7 -16
  77. package/app/routes/launch.js +2 -1
  78. package/app/routes/libraries.js +2 -1
  79. package/app/routes/model-type.js +2 -3
  80. package/app/routes/model-types.ts +57 -0
  81. package/app/routes/promise-tree.ts +63 -0
  82. package/app/routes/records.ts +78 -0
  83. package/app/routes/render-tree.ts +93 -0
  84. package/app/routes/route-tree.js +0 -1
  85. package/app/routes/{tab.js → tab.ts} +9 -2
  86. package/app/routes/whats-new.js +2 -2
  87. package/app/services/adapters/{basic.js → basic.ts} +36 -30
  88. package/app/services/adapters/{bookmarklet.js → bookmarklet.ts} +17 -24
  89. package/app/services/adapters/{chrome.js → chrome.ts} +1 -2
  90. package/app/services/adapters/{web-extension.js → web-extension.ts} +46 -46
  91. package/app/services/adapters/websocket.ts +40 -0
  92. package/app/services/layout.ts +124 -0
  93. package/app/services/port.ts +195 -0
  94. package/app/services/storage/{local.js → local.ts} +7 -20
  95. package/app/services/storage/{memory.js → memory.ts} +6 -21
  96. package/app/services/{storage.js → storage.ts} +9 -20
  97. package/app/styles/app.scss +1 -0
  98. package/app/styles/base.scss +6 -2
  99. package/app/styles/colors.scss +33 -31
  100. package/app/styles/component_tree.scss +56 -51
  101. package/app/styles/dropdown.scss +2 -2
  102. package/app/styles/ember-table.scss +3 -3
  103. package/app/styles/mixin.scss +26 -26
  104. package/app/styles/object_inspector.scss +30 -21
  105. package/{lib/ui/addon/styles → app/styles/ui}/_disclosure-triangle.scss +3 -1
  106. package/{lib/ui/addon/styles → app/styles/ui}/_drag-handle.scss +7 -7
  107. package/{lib/ui/addon/styles → app/styles/ui}/_empty-message.scss +1 -1
  108. package/{lib/ui/addon/styles → app/styles/ui}/_error-page.scss +8 -7
  109. package/{lib/ui/addon/styles → app/styles/ui}/_list.scss +46 -45
  110. package/{lib/ui/addon/styles → app/styles/ui}/_nav.scss +29 -27
  111. package/app/styles/ui/_object-inspector-toggle.scss +4 -0
  112. package/{lib/ui/addon/styles → app/styles/ui}/_pill.scss +4 -4
  113. package/{lib/ui/addon/styles → app/styles/ui}/_send-to-console.scss +1 -1
  114. package/{lib/ui/addon/styles → app/styles/ui}/_split.scss +26 -20
  115. package/app/styles/ui/_ui.scss +13 -0
  116. package/{lib/ui/addon/styles → app/styles/ui}/toolbar/_checkbox.scss +5 -5
  117. package/app/styles/ui/toolbar/_icon-button.scss +80 -0
  118. package/{lib/ui/addon/styles → app/styles/ui}/toolbar/_index.scss +6 -5
  119. package/{lib/ui/addon/styles → app/styles/ui}/toolbar/_radio.scss +10 -10
  120. package/{lib/ui/addon/styles → app/styles/ui}/toolbar/_search.scss +5 -3
  121. package/app/styles/utils.scss +408 -122
  122. package/app/templates/application.hbs +21 -19
  123. package/app/templates/component-tree.hbs +4 -1
  124. package/app/templates/deprecations.hbs +2 -3
  125. package/app/templates/info.hbs +10 -10
  126. package/app/templates/promise-tree.hbs +1 -1
  127. package/app/templates/render-tree.hbs +1 -1
  128. package/app/templates/route-tree.hbs +1 -1
  129. package/app/utils/escape-reg-exp.ts +3 -2
  130. package/app/utils/nullish.ts +7 -0
  131. package/app/utils/parse-text.ts +4 -5
  132. package/app/utils/truncate.js +0 -1
  133. package/config/ember-cli-update.json +5 -3
  134. package/config/ember-try.js +117 -72
  135. package/config/environment.js +1 -1
  136. package/config/optional-features.json +2 -1
  137. package/dist/bookmarklet/load_inspector.js +31 -11
  138. package/dist/bookmarklet/panes-3-16-0/assets/chunk.443.86a005e528b587663b78.js +1135 -0
  139. package/dist/bookmarklet/panes-3-16-0/assets/chunk.443.86a005e528b587663b78.js.LICENSE.txt +18 -0
  140. package/dist/bookmarklet/panes-3-16-0/assets/chunk.524.3530526ca8a0822af855.js +40 -0
  141. package/dist/bookmarklet/panes-3-16-0/assets/chunk.582.0ae94a39ca88591dff80.js +42 -0
  142. package/dist/bookmarklet/panes-3-16-0/assets/ember-inspector.css +997 -156
  143. package/dist/bookmarklet/panes-3-16-0/assets/ember-inspector.js +557 -609
  144. package/dist/bookmarklet/panes-3-16-0/assets/svg/ellipsis.svg +3 -3
  145. package/dist/bookmarklet/panes-3-16-0/assets/svg/focus-point-round.svg +9 -0
  146. package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-bug.svg +1 -1
  147. package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-components.svg +2 -2
  148. package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-container.svg +1 -1
  149. package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-data.svg +1 -1
  150. package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-deprecations.svg +3 -3
  151. package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-info.svg +3 -3
  152. package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-promises.svg +2 -2
  153. package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-render-performance.svg +2 -2
  154. package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-route-tree.svg +7 -7
  155. package/dist/bookmarklet/panes-3-16-0/assets/svg/sidebar-toggle-trailing.svg +9 -0
  156. package/dist/bookmarklet/panes-3-16-0/assets/vendor.css +4 -841
  157. package/dist/bookmarklet/panes-3-16-0/assets/vendor.js +4277 -5152
  158. package/dist/bookmarklet/panes-3-16-0/base-object-HAEdWjmg.js +59 -0
  159. package/dist/bookmarklet/panes-3-16-0/basic-DfbgtngO.js +144 -0
  160. package/dist/bookmarklet/panes-3-16-0/basic-debug.js +6 -0
  161. package/dist/bookmarklet/panes-3-16-0/bookmarklet-debug.js +34 -0
  162. package/dist/bookmarklet/panes-3-16-0/chrome-debug.js +12 -0
  163. package/dist/bookmarklet/panes-3-16-0/ember.js +115 -0
  164. package/dist/bookmarklet/panes-3-16-0/ember_debug.js +24 -11011
  165. package/dist/bookmarklet/panes-3-16-0/evented-BCTya3yE.js +62 -0
  166. package/dist/bookmarklet/panes-3-16-0/firefox-debug.js +32 -0
  167. package/dist/bookmarklet/panes-3-16-0/index.html +4 -23
  168. package/dist/bookmarklet/panes-3-16-0/internals-CRmXMEzb.js +12 -0
  169. package/dist/bookmarklet/panes-3-16-0/main.js +7663 -0
  170. package/dist/bookmarklet/panes-3-16-0/port.js +108 -0
  171. package/dist/bookmarklet/panes-3-16-0/profile-node.js +60 -0
  172. package/dist/bookmarklet/panes-3-16-0/promise-assembler.js +218 -0
  173. package/dist/bookmarklet/panes-3-16-0/runloop-CF-Qpqgy.js +1138 -0
  174. package/dist/bookmarklet/panes-3-16-0/start-inspector-BPAW_WLv.js +376 -0
  175. package/dist/bookmarklet/panes-3-16-0/type-check.js +119 -0
  176. package/dist/bookmarklet/panes-3-16-0/version.js +90 -0
  177. package/dist/bookmarklet/panes-3-16-0/versions.js +4 -0
  178. package/dist/bookmarklet/panes-3-16-0/web-extension-C3pMNVSY.js +144 -0
  179. package/dist/bookmarklet/panes-3-16-0/websocket-debug.js +60 -0
  180. package/dist/chrome/background.js +26 -21
  181. package/dist/chrome/boot.js +1 -1
  182. package/dist/chrome/content-script.js +12 -11
  183. package/dist/chrome/devtools.js +12 -3
  184. package/dist/chrome/manifest.json +3 -3
  185. package/dist/chrome/options.js +17 -12
  186. package/dist/chrome/panes-3-16-0/assets/chunk.443.86a005e528b587663b78.js +1135 -0
  187. package/dist/chrome/panes-3-16-0/assets/chunk.443.86a005e528b587663b78.js.LICENSE.txt +18 -0
  188. package/dist/chrome/panes-3-16-0/assets/chunk.524.3530526ca8a0822af855.js +40 -0
  189. package/dist/chrome/panes-3-16-0/assets/chunk.582.0ae94a39ca88591dff80.js +42 -0
  190. package/dist/chrome/panes-3-16-0/assets/ember-inspector.css +997 -156
  191. package/dist/chrome/panes-3-16-0/assets/ember-inspector.js +557 -609
  192. package/dist/chrome/panes-3-16-0/assets/svg/ellipsis.svg +3 -3
  193. package/dist/chrome/panes-3-16-0/assets/svg/focus-point-round.svg +9 -0
  194. package/dist/chrome/panes-3-16-0/assets/svg/nav-bug.svg +1 -1
  195. package/dist/chrome/panes-3-16-0/assets/svg/nav-components.svg +2 -2
  196. package/dist/chrome/panes-3-16-0/assets/svg/nav-container.svg +1 -1
  197. package/dist/chrome/panes-3-16-0/assets/svg/nav-data.svg +1 -1
  198. package/dist/chrome/panes-3-16-0/assets/svg/nav-deprecations.svg +3 -3
  199. package/dist/chrome/panes-3-16-0/assets/svg/nav-info.svg +3 -3
  200. package/dist/chrome/panes-3-16-0/assets/svg/nav-promises.svg +2 -2
  201. package/dist/chrome/panes-3-16-0/assets/svg/nav-render-performance.svg +2 -2
  202. package/dist/chrome/panes-3-16-0/assets/svg/nav-route-tree.svg +7 -7
  203. package/dist/chrome/panes-3-16-0/assets/svg/sidebar-toggle-trailing.svg +9 -0
  204. package/dist/chrome/panes-3-16-0/assets/vendor.css +4 -841
  205. package/dist/chrome/panes-3-16-0/assets/vendor.js +4277 -5152
  206. package/dist/chrome/panes-3-16-0/base-object-HAEdWjmg.js +59 -0
  207. package/dist/chrome/panes-3-16-0/basic-DfbgtngO.js +144 -0
  208. package/dist/chrome/panes-3-16-0/basic-debug.js +6 -0
  209. package/dist/chrome/panes-3-16-0/bookmarklet-debug.js +34 -0
  210. package/dist/chrome/panes-3-16-0/chrome-debug.js +12 -0
  211. package/dist/chrome/panes-3-16-0/ember.js +115 -0
  212. package/dist/chrome/panes-3-16-0/ember_debug.js +12 -11021
  213. package/dist/chrome/panes-3-16-0/evented-BCTya3yE.js +62 -0
  214. package/dist/chrome/panes-3-16-0/firefox-debug.js +32 -0
  215. package/dist/chrome/panes-3-16-0/index.html +4 -23
  216. package/dist/chrome/panes-3-16-0/internals-CRmXMEzb.js +12 -0
  217. package/dist/chrome/panes-3-16-0/main.js +7663 -0
  218. package/dist/chrome/panes-3-16-0/port.js +108 -0
  219. package/dist/chrome/panes-3-16-0/profile-node.js +60 -0
  220. package/dist/chrome/panes-3-16-0/promise-assembler.js +218 -0
  221. package/dist/chrome/panes-3-16-0/runloop-CF-Qpqgy.js +1138 -0
  222. package/dist/chrome/panes-3-16-0/start-inspector-BPAW_WLv.js +376 -0
  223. package/dist/chrome/panes-3-16-0/type-check.js +119 -0
  224. package/dist/chrome/panes-3-16-0/version.js +90 -0
  225. package/dist/chrome/panes-3-16-0/versions.js +4 -0
  226. package/dist/chrome/panes-3-16-0/web-extension-C3pMNVSY.js +144 -0
  227. package/dist/chrome/panes-3-16-0/websocket-debug.js +60 -0
  228. package/dist/chrome/scripts/in-page-script.js +19 -13
  229. package/dist/firefox/background.js +26 -21
  230. package/dist/firefox/boot.js +1 -1
  231. package/dist/firefox/content-script.js +12 -11
  232. package/dist/firefox/devtools.js +12 -3
  233. package/dist/firefox/manifest.json +3 -3
  234. package/dist/firefox/options.js +17 -12
  235. package/dist/firefox/panes-3-16-0/assets/chunk.443.86a005e528b587663b78.js +1135 -0
  236. package/dist/firefox/panes-3-16-0/assets/chunk.443.86a005e528b587663b78.js.LICENSE.txt +18 -0
  237. package/dist/firefox/panes-3-16-0/assets/chunk.524.3530526ca8a0822af855.js +40 -0
  238. package/dist/firefox/panes-3-16-0/assets/chunk.582.0ae94a39ca88591dff80.js +42 -0
  239. package/dist/firefox/panes-3-16-0/assets/ember-inspector.css +997 -156
  240. package/dist/firefox/panes-3-16-0/assets/ember-inspector.js +557 -609
  241. package/dist/firefox/panes-3-16-0/assets/svg/ellipsis.svg +3 -3
  242. package/dist/firefox/panes-3-16-0/assets/svg/focus-point-round.svg +9 -0
  243. package/dist/firefox/panes-3-16-0/assets/svg/nav-bug.svg +1 -1
  244. package/dist/firefox/panes-3-16-0/assets/svg/nav-components.svg +2 -2
  245. package/dist/firefox/panes-3-16-0/assets/svg/nav-container.svg +1 -1
  246. package/dist/firefox/panes-3-16-0/assets/svg/nav-data.svg +1 -1
  247. package/dist/firefox/panes-3-16-0/assets/svg/nav-deprecations.svg +3 -3
  248. package/dist/firefox/panes-3-16-0/assets/svg/nav-info.svg +3 -3
  249. package/dist/firefox/panes-3-16-0/assets/svg/nav-promises.svg +2 -2
  250. package/dist/firefox/panes-3-16-0/assets/svg/nav-render-performance.svg +2 -2
  251. package/dist/firefox/panes-3-16-0/assets/svg/nav-route-tree.svg +7 -7
  252. package/dist/firefox/panes-3-16-0/assets/svg/sidebar-toggle-trailing.svg +9 -0
  253. package/dist/firefox/panes-3-16-0/assets/vendor.css +4 -841
  254. package/dist/firefox/panes-3-16-0/assets/vendor.js +4277 -5152
  255. package/dist/firefox/panes-3-16-0/base-object-HAEdWjmg.js +59 -0
  256. package/dist/firefox/panes-3-16-0/basic-DfbgtngO.js +144 -0
  257. package/dist/firefox/panes-3-16-0/basic-debug.js +6 -0
  258. package/dist/firefox/panes-3-16-0/bookmarklet-debug.js +34 -0
  259. package/dist/firefox/panes-3-16-0/chrome-debug.js +12 -0
  260. package/dist/firefox/panes-3-16-0/ember.js +115 -0
  261. package/dist/firefox/panes-3-16-0/ember_debug.js +27 -11016
  262. package/dist/firefox/panes-3-16-0/evented-BCTya3yE.js +62 -0
  263. package/dist/firefox/panes-3-16-0/firefox-debug.js +32 -0
  264. package/dist/firefox/panes-3-16-0/index.html +4 -23
  265. package/dist/firefox/panes-3-16-0/internals-CRmXMEzb.js +12 -0
  266. package/dist/firefox/panes-3-16-0/main.js +7663 -0
  267. package/dist/firefox/panes-3-16-0/port.js +108 -0
  268. package/dist/firefox/panes-3-16-0/profile-node.js +60 -0
  269. package/dist/firefox/panes-3-16-0/promise-assembler.js +218 -0
  270. package/dist/firefox/panes-3-16-0/runloop-CF-Qpqgy.js +1138 -0
  271. package/dist/firefox/panes-3-16-0/start-inspector-BPAW_WLv.js +376 -0
  272. package/dist/firefox/panes-3-16-0/type-check.js +119 -0
  273. package/dist/firefox/panes-3-16-0/version.js +90 -0
  274. package/dist/firefox/panes-3-16-0/versions.js +4 -0
  275. package/dist/firefox/panes-3-16-0/web-extension-C3pMNVSY.js +144 -0
  276. package/dist/firefox/panes-3-16-0/websocket-debug.js +60 -0
  277. package/dist/firefox/scripts/in-page-script.js +19 -13
  278. package/dist/websocket/assets/chunk.443.86a005e528b587663b78.js +1135 -0
  279. package/dist/websocket/assets/chunk.443.86a005e528b587663b78.js.LICENSE.txt +18 -0
  280. package/dist/websocket/assets/chunk.524.3530526ca8a0822af855.js +40 -0
  281. package/dist/websocket/assets/chunk.582.0ae94a39ca88591dff80.js +42 -0
  282. package/dist/websocket/assets/ember-inspector.css +997 -156
  283. package/dist/websocket/assets/ember-inspector.js +557 -609
  284. package/dist/websocket/assets/svg/ellipsis.svg +3 -3
  285. package/dist/websocket/assets/svg/focus-point-round.svg +9 -0
  286. package/dist/websocket/assets/svg/nav-bug.svg +1 -1
  287. package/dist/websocket/assets/svg/nav-components.svg +2 -2
  288. package/dist/websocket/assets/svg/nav-container.svg +1 -1
  289. package/dist/websocket/assets/svg/nav-data.svg +1 -1
  290. package/dist/websocket/assets/svg/nav-deprecations.svg +3 -3
  291. package/dist/websocket/assets/svg/nav-info.svg +3 -3
  292. package/dist/websocket/assets/svg/nav-promises.svg +2 -2
  293. package/dist/websocket/assets/svg/nav-render-performance.svg +2 -2
  294. package/dist/websocket/assets/svg/nav-route-tree.svg +7 -7
  295. package/dist/websocket/assets/svg/sidebar-toggle-trailing.svg +9 -0
  296. package/dist/websocket/assets/vendor.css +4 -841
  297. package/dist/websocket/assets/vendor.js +4277 -5152
  298. package/dist/websocket/base-object-HAEdWjmg.js +59 -0
  299. package/dist/websocket/basic-DfbgtngO.js +144 -0
  300. package/dist/websocket/basic-debug.js +6 -0
  301. package/dist/websocket/bookmarklet-debug.js +34 -0
  302. package/dist/websocket/chrome-debug.js +12 -0
  303. package/dist/websocket/ember.js +115 -0
  304. package/dist/websocket/ember_debug.js +48 -11009
  305. package/dist/websocket/evented-BCTya3yE.js +62 -0
  306. package/dist/websocket/firefox-debug.js +32 -0
  307. package/dist/websocket/index.html +4 -23
  308. package/dist/websocket/internals-CRmXMEzb.js +12 -0
  309. package/dist/websocket/main.js +7663 -0
  310. package/dist/websocket/port.js +108 -0
  311. package/dist/websocket/profile-node.js +60 -0
  312. package/dist/websocket/promise-assembler.js +218 -0
  313. package/dist/websocket/runloop-CF-Qpqgy.js +1138 -0
  314. package/dist/websocket/start-inspector-BPAW_WLv.js +376 -0
  315. package/dist/websocket/type-check.js +119 -0
  316. package/dist/websocket/version.js +90 -0
  317. package/dist/websocket/versions.js +4 -0
  318. package/dist/websocket/web-extension-C3pMNVSY.js +144 -0
  319. package/dist/websocket/websocket-debug.js +60 -0
  320. package/ember-cli-build.js +31 -140
  321. package/ember_debug/adapters/basic.js +10 -29
  322. package/ember_debug/adapters/bookmarklet.js +1 -0
  323. package/ember_debug/adapters/firefox.js +3 -3
  324. package/ember_debug/adapters/web-extension.js +6 -5
  325. package/ember_debug/adapters/websocket.js +2 -2
  326. package/ember_debug/babel.config.cjs +11 -0
  327. package/ember_debug/container-debug.js +1 -1
  328. package/ember_debug/data-debug.js +7 -8
  329. package/ember_debug/debug-port.js +1 -1
  330. package/ember_debug/deprecation-debug.js +14 -14
  331. package/ember_debug/entrypoints/basic-debug.js +6 -0
  332. package/ember_debug/entrypoints/bookmarklet-debug.js +6 -0
  333. package/ember_debug/entrypoints/chrome-debug.js +6 -0
  334. package/ember_debug/entrypoints/firefox-debug.js +6 -0
  335. package/ember_debug/entrypoints/websocket-debug.js +6 -0
  336. package/ember_debug/general-debug.js +4 -4
  337. package/ember_debug/lib/boot-ember-inspector.js +9 -0
  338. package/ember_debug/lib/get-applications.js +27 -0
  339. package/ember_debug/lib/load-ember-debug-in-webpage.js +30 -0
  340. package/ember_debug/lib/send-apps.js +14 -0
  341. package/ember_debug/lib/send-version-miss.js +39 -0
  342. package/ember_debug/lib/setup-instance-initializer.js +16 -0
  343. package/ember_debug/lib/start-inspector.js +211 -0
  344. package/ember_debug/lib/version-test.js +73 -0
  345. package/ember_debug/lib/versions.js +3 -0
  346. package/ember_debug/libs/capture-render-tree.js +1 -2
  347. package/ember_debug/libs/promise-assembler.js +5 -4
  348. package/ember_debug/libs/render-tree.js +37 -44
  349. package/ember_debug/libs/source-map.js +7 -6
  350. package/ember_debug/libs/view-inspection.js +25 -17
  351. package/ember_debug/main.js +18 -21
  352. package/ember_debug/models/profile-manager.js +6 -6
  353. package/ember_debug/models/profile-node.js +1 -1
  354. package/ember_debug/models/promise.js +2 -2
  355. package/ember_debug/object-inspector.js +71 -65
  356. package/ember_debug/package.json +27 -0
  357. package/ember_debug/port.js +5 -4
  358. package/ember_debug/promise-debug.js +5 -5
  359. package/ember_debug/render-debug.js +5 -5
  360. package/ember_debug/rollup.config.js +24 -0
  361. package/ember_debug/route-debug.js +10 -9
  362. package/ember_debug/services/session.js +2 -2
  363. package/ember_debug/utils/classify.js +1 -1
  364. package/ember_debug/utils/ember/object/internals.js +1 -11
  365. package/ember_debug/utils/ember/own-runloop.js +1 -1
  366. package/ember_debug/utils/ember/runloop.js +7 -10
  367. package/ember_debug/utils/ember-object-names.js +7 -8
  368. package/ember_debug/utils/ember.js +120 -14
  369. package/ember_debug/utils/evented.js +1 -1
  370. package/ember_debug/utils/get-object-name.js +3 -3
  371. package/ember_debug/utils/type-check.js +9 -5
  372. package/ember_debug/view-debug.js +12 -6
  373. package/eslint.config.mjs +173 -0
  374. package/gulpfile.js +1 -1
  375. package/package.json +97 -95
  376. package/pnpm-workspace.yaml +3 -0
  377. package/public/assets/svg/ellipsis.svg +3 -3
  378. package/public/assets/svg/focus-point-round.svg +9 -0
  379. package/public/assets/svg/nav-bug.svg +1 -1
  380. package/public/assets/svg/nav-components.svg +2 -2
  381. package/public/assets/svg/nav-container.svg +1 -1
  382. package/public/assets/svg/nav-data.svg +1 -1
  383. package/public/assets/svg/nav-deprecations.svg +3 -3
  384. package/public/assets/svg/nav-info.svg +3 -3
  385. package/public/assets/svg/nav-promises.svg +2 -2
  386. package/public/assets/svg/nav-render-performance.svg +2 -2
  387. package/public/assets/svg/nav-route-tree.svg +7 -7
  388. package/public/assets/svg/sidebar-toggle-trailing.svg +9 -0
  389. package/scripts/download-panes.js +1 -1
  390. package/skeletons/bookmarklet/load_inspector.js +31 -11
  391. package/skeletons/web-extension/background.js +26 -21
  392. package/skeletons/web-extension/boot.js +1 -1
  393. package/skeletons/web-extension/content-script.js +12 -11
  394. package/skeletons/web-extension/devtools.js +12 -3
  395. package/skeletons/web-extension/manifest.json +3 -3
  396. package/skeletons/web-extension/options.js +17 -12
  397. package/skeletons/web-extension/scripts/in-page-script.js +19 -13
  398. package/testem.js +0 -1
  399. package/tests/acceptance/app-picker-test.js +4 -4
  400. package/tests/acceptance/component-tree-test.js +96 -57
  401. package/tests/acceptance/container-test.js +0 -2
  402. package/tests/acceptance/data-test.js +8 -10
  403. package/tests/acceptance/deprecation-test.js +8 -12
  404. package/tests/acceptance/info-test.js +2 -2
  405. package/tests/acceptance/object-inspector-test.js +62 -110
  406. package/tests/acceptance/promise-test.js +1 -11
  407. package/tests/acceptance/render-tree-test.js +2 -2
  408. package/tests/acceptance/route-tree-test.js +12 -14
  409. package/tests/acceptance/whats-new-test.js +4 -4
  410. package/tests/ember_debug/container-debug-test.js +4 -4
  411. package/tests/ember_debug/deprecation-debug-test.js +8 -5
  412. package/tests/ember_debug/ember-debug-test.js +1 -4
  413. package/tests/ember_debug/object-inspector-test.js +108 -49
  414. package/tests/ember_debug/profile-manager-test.js +142 -169
  415. package/tests/ember_debug/profile-node-test.js +4 -4
  416. package/tests/ember_debug/promise-assembler-test.js +13 -10
  417. package/tests/ember_debug/promise-debug-test.js +5 -6
  418. package/tests/ember_debug/route-debug-test.js +8 -7
  419. package/tests/ember_debug/view-debug-test.js +257 -182
  420. package/tests/helpers/{index.js → index.ts} +6 -5
  421. package/tests/helpers/setup-ember-debug-test.js +14 -0
  422. package/tests/index.html +1 -2
  423. package/tests/integration/injection-test.js +14 -15
  424. package/tests/test-adapter.js +15 -15
  425. package/tests/test-helper.js +6 -4
  426. package/tests/unit/check-current-route-test.js +0 -4
  427. package/tests/unit/resizable-columns-test.js +53 -51
  428. package/tests/unit/utils/parse-text-test.js +3 -3
  429. package/tests/unit/utils/search-match-test.js +5 -5
  430. package/tests/unit/utils/type-check-test.js +22 -0
  431. package/tsconfig.json +3 -1
  432. package/types/ember-inspector/index.d.ts +2 -1
  433. package/types/global.d.ts +1 -7
  434. package/.editorconfig +0 -19
  435. package/.ember-cli +0 -15
  436. package/.eslintignore +0 -33
  437. package/.eslintrc.js +0 -86
  438. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -30
  439. package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
  440. package/.github/dependabot.yml +0 -14
  441. package/.github/pull_request_template.md +0 -4
  442. package/.github/workflows/build.yml +0 -339
  443. package/.github/workflows/plan-release.yml +0 -83
  444. package/.github/workflows/publish.yml +0 -60
  445. package/.prettierignore +0 -25
  446. package/.prettierrc.js +0 -14
  447. package/.release-plan.json +0 -17
  448. package/.stylelintrc.js +0 -3
  449. package/.template-lintrc.js +0 -12
  450. package/.tool-versions +0 -2
  451. package/.watchmanconfig +0 -3
  452. package/app/components/.gitkeep +0 -0
  453. package/app/components/list-content.js +0 -130
  454. package/app/controllers/.gitkeep +0 -0
  455. package/app/controllers/promise-tree.js +0 -130
  456. package/app/helpers/.gitkeep +0 -0
  457. package/app/libs/promise-assembler.js +0 -169
  458. package/app/models/.gitkeep +0 -0
  459. package/app/routes/.gitkeep +0 -0
  460. package/app/routes/model-types.js +0 -47
  461. package/app/routes/promise-tree.js +0 -48
  462. package/app/routes/records.js +0 -55
  463. package/app/routes/render-tree.js +0 -66
  464. package/app/services/adapters/websocket.js +0 -31
  465. package/app/services/layout.js +0 -39
  466. package/app/services/port.js +0 -90
  467. package/dist/bookmarklet/panes-3-16-0/assets/chunk.143.143ca772b0b28102c74a.js +0 -28
  468. package/dist/bookmarklet/panes-3-16-0/assets/chunk.178.b50e140d1ed8777b583e.js +0 -9
  469. package/dist/bookmarklet/panes-3-16-0/assets/chunk.359.0be5d21f60d2b5d6d423.js +0 -2620
  470. package/dist/bookmarklet/panes-3-16-0/assets/chunk.359.0be5d21f60d2b5d6d423.js.LICENSE.txt +0 -67
  471. package/dist/bookmarklet/panes-3-16-0/assets/fonts/Inter-Bold.woff +0 -0
  472. package/dist/bookmarklet/panes-3-16-0/assets/fonts/Inter-Bold.woff2 +0 -0
  473. package/dist/bookmarklet/panes-3-16-0/assets/fonts/Inter-Regular.woff +0 -0
  474. package/dist/bookmarklet/panes-3-16-0/assets/fonts/Inter-Regular.woff2 +0 -0
  475. package/dist/chrome/panes-3-16-0/assets/chunk.143.143ca772b0b28102c74a.js +0 -28
  476. package/dist/chrome/panes-3-16-0/assets/chunk.178.b50e140d1ed8777b583e.js +0 -9
  477. package/dist/chrome/panes-3-16-0/assets/chunk.359.0be5d21f60d2b5d6d423.js +0 -2620
  478. package/dist/chrome/panes-3-16-0/assets/chunk.359.0be5d21f60d2b5d6d423.js.LICENSE.txt +0 -67
  479. package/dist/chrome/panes-3-16-0/assets/fonts/Inter-Bold.woff +0 -0
  480. package/dist/chrome/panes-3-16-0/assets/fonts/Inter-Bold.woff2 +0 -0
  481. package/dist/chrome/panes-3-16-0/assets/fonts/Inter-Regular.woff +0 -0
  482. package/dist/chrome/panes-3-16-0/assets/fonts/Inter-Regular.woff2 +0 -0
  483. package/dist/firefox/panes-3-16-0/assets/chunk.143.143ca772b0b28102c74a.js +0 -28
  484. package/dist/firefox/panes-3-16-0/assets/chunk.178.b50e140d1ed8777b583e.js +0 -9
  485. package/dist/firefox/panes-3-16-0/assets/chunk.359.0be5d21f60d2b5d6d423.js +0 -2620
  486. package/dist/firefox/panes-3-16-0/assets/chunk.359.0be5d21f60d2b5d6d423.js.LICENSE.txt +0 -67
  487. package/dist/firefox/panes-3-16-0/assets/fonts/Inter-Bold.woff +0 -0
  488. package/dist/firefox/panes-3-16-0/assets/fonts/Inter-Bold.woff2 +0 -0
  489. package/dist/firefox/panes-3-16-0/assets/fonts/Inter-Regular.woff +0 -0
  490. package/dist/firefox/panes-3-16-0/assets/fonts/Inter-Regular.woff2 +0 -0
  491. package/dist/websocket/assets/chunk.143.143ca772b0b28102c74a.js +0 -28
  492. package/dist/websocket/assets/chunk.178.b50e140d1ed8777b583e.js +0 -9
  493. package/dist/websocket/assets/chunk.359.0be5d21f60d2b5d6d423.js +0 -2620
  494. package/dist/websocket/assets/chunk.359.0be5d21f60d2b5d6d423.js.LICENSE.txt +0 -67
  495. package/dist/websocket/assets/fonts/Inter-Bold.woff +0 -0
  496. package/dist/websocket/assets/fonts/Inter-Bold.woff2 +0 -0
  497. package/dist/websocket/assets/fonts/Inter-Regular.woff +0 -0
  498. package/dist/websocket/assets/fonts/Inter-Regular.woff2 +0 -0
  499. package/ember_debug/.eslintrc.js +0 -13
  500. package/ember_debug/utils/ember/debug.js +0 -20
  501. package/ember_debug/utils/ember/instrumentation.js +0 -11
  502. package/ember_debug/utils/ember/loader.js +0 -22
  503. package/ember_debug/utils/rsvp.js +0 -20
  504. package/ember_debug/vendor/loader.js +0 -54
  505. package/ember_debug/vendor/startup-wrapper.js +0 -399
  506. package/lib/ui/addon/styles/_object-inspector-toggle.scss +0 -12
  507. package/lib/ui/addon/styles/addon.scss +0 -13
  508. package/lib/ui/addon/styles/toolbar/_icon-button.scss +0 -61
  509. package/lib/ui/app/components/ui/disclosure-triangle.js +0 -1
  510. package/lib/ui/app/components/ui/disclosure.js +0 -1
  511. package/lib/ui/app/components/ui/drag-handle.js +0 -1
  512. package/lib/ui/app/components/ui/draggable-column.js +0 -1
  513. package/lib/ui/app/components/ui/empty-message.js +0 -1
  514. package/lib/ui/app/components/ui/error-page.js +0 -1
  515. package/lib/ui/app/components/ui/open-links-in-new-window.js +0 -1
  516. package/lib/ui/app/components/ui/resizable-column.js +0 -1
  517. package/lib/ui/app/components/ui/send-to-console.js +0 -1
  518. package/lib/ui/app/components/ui/toolbar-clear-button.js +0 -1
  519. package/lib/ui/app/components/ui/toolbar-divider.js +0 -1
  520. package/lib/ui/app/components/ui/toolbar-reload-button.js +0 -1
  521. package/lib/ui/app/components/ui/toolbar-search-field.js +0 -1
  522. package/lib/ui/app/components/ui/warning-message.js +0 -1
  523. package/lib/ui/index.js +0 -34
  524. package/lib/ui/package.json +0 -13
  525. package/public/assets/fonts/Inter-Bold.woff +0 -0
  526. package/public/assets/fonts/Inter-Bold.woff2 +0 -0
  527. package/public/assets/fonts/Inter-Regular.woff +0 -0
  528. package/public/assets/fonts/Inter-Regular.woff2 +0 -0
  529. package/tests/helpers/trigger-port.js +0 -6
  530. package/tests/unit/.gitkeep +0 -0
  531. /package/app/{app.js → app.ts} +0 -0
  532. /package/{lib/ui/addon/components → app/components/ui}/disclosure-triangle.hbs +0 -0
  533. /package/{lib/ui/addon/components → app/components/ui}/disclosure.hbs +0 -0
  534. /package/{lib/ui/addon/components → app/components/ui}/disclosure.js +0 -0
  535. /package/{lib/ui/addon/components → app/components/ui}/draggable-column.hbs +0 -0
  536. /package/{lib/ui/addon/components → app/components/ui}/draggable-column.js +0 -0
  537. /package/{lib/ui/addon/components → app/components/ui}/open-links-in-new-window.hbs +0 -0
  538. /package/{lib/ui/addon/components → app/components/ui}/open-links-in-new-window.js +0 -0
  539. /package/{lib/ui/addon/components → app/components/ui}/resizable-column.hbs +0 -0
  540. /package/{lib/ui/addon/components → app/components/ui}/send-to-console.hbs +0 -0
  541. /package/{lib/ui/addon/components → app/components/ui}/toolbar-divider.hbs +0 -0
  542. /package/{lib/ui/addon/components → app/components/ui}/toolbar-search-field.js +0 -0
  543. /package/{lib/ui/addon/components → app/components/ui}/warning-message.hbs +0 -0
  544. /package/app/controllers/{info.js → info.ts} +0 -0
  545. /package/app/services/adapters/{firefox.js → firefox.ts} +0 -0
  546. /package/{lib/ui/addon/styles → app/styles/ui}/_goto-source.scss +0 -0
  547. /package/{lib/ui/addon/styles → app/styles/ui}/_warning.scss +0 -0
  548. /package/{lib/ui/addon/styles → app/styles/ui}/toolbar/_divider.scss +0 -0
@@ -0,0 +1,249 @@
1
+ /* eslint-disable @typescript-eslint/no-unsafe-argument */
2
+ import { assert } from '@ember/debug';
3
+ import { later } from '@ember/runloop';
4
+ import EmberObject, { action, setProperties } from '@ember/object';
5
+ import { addListener, removeListener, sendEvent } from '@ember/object/events';
6
+ import type { AnyFn } from '@ember/-internals/utility-types';
7
+
8
+ import { TrackedArray, TrackedObject } from 'tracked-built-ins';
9
+ import { tracked } from '@glimmer/tracking';
10
+
11
+ import PromiseModel from '../models/promise';
12
+ import type PortService from '../services/port';
13
+
14
+ interface SerializedPromise {
15
+ children?: Array<string>;
16
+ guid: string;
17
+ label: string;
18
+ parent?: string;
19
+ reason: string;
20
+ state: string;
21
+ value: string;
22
+ }
23
+
24
+ export default class PromiseAssembler extends EmberObject {
25
+ declare port: PortService;
26
+ // Used to track whether current message received
27
+ // is the first in the request
28
+ // Mainly helps in triggering 'firstMessageReceived' event
29
+ @tracked firstMessageReceived = false;
30
+
31
+ all = new TrackedArray<PromiseModel>([]);
32
+ promiseIndex = new TrackedObject<Record<string, number>>({});
33
+ topSort = new TrackedArray<PromiseModel>([]);
34
+ topSortMeta = new TrackedObject<Record<string, { hasParent?: boolean }>>({});
35
+
36
+ start() {
37
+ this.port.on('promise:promisesUpdated', this, this.addOrUpdatePromises);
38
+ this.port.send('promise:getAndObservePromises');
39
+ }
40
+
41
+ stop() {
42
+ this.port.off('promise:promisesUpdated', this, this.addOrUpdatePromises);
43
+ this.port.send('promise:releasePromises');
44
+ this.reset();
45
+ }
46
+
47
+ reset() {
48
+ this.topSortMeta = new TrackedObject<
49
+ Record<string, { hasParent?: boolean }>
50
+ >({});
51
+ this.promiseIndex = new TrackedObject<Record<string, number>>({});
52
+ this.topSort.splice(0, this.topSort.length);
53
+
54
+ this.firstMessageReceived = false;
55
+ const all = this.all;
56
+ // Lazily destroy promises
57
+ // Allows for a smooth transition on deactivate,
58
+ // and thus providing the illusion of better perf
59
+ // eslint-disable-next-line ember/no-runloop
60
+ later(
61
+ this,
62
+ function () {
63
+ this.destroyPromises(all);
64
+ },
65
+ 500,
66
+ );
67
+ this.all = new TrackedArray([]);
68
+ }
69
+
70
+ destroyPromises(promises: Array<EmberObject>) {
71
+ promises.forEach(function (item) {
72
+ item.destroy();
73
+ });
74
+ }
75
+
76
+ addOrUpdatePromises = (message: { promises: Array<SerializedPromise> }) => {
77
+ this.rebuildPromises(message.promises);
78
+
79
+ if (!this.firstMessageReceived) {
80
+ this.firstMessageReceived = true;
81
+ this.trigger('firstMessageReceived');
82
+ }
83
+ };
84
+
85
+ rebuildPromises = (promises: Array<SerializedPromise | PromiseModel>) => {
86
+ promises.forEach((props) => {
87
+ props = Object.assign({}, props);
88
+ const childrenIds = props.children;
89
+ const parentId = props.parent;
90
+ delete props.children;
91
+ delete props.parent;
92
+ if (parentId && parentId !== props.guid) {
93
+ props.parent = this.updateOrCreate({ guid: parentId });
94
+ }
95
+ const promise = this.updateOrCreate(props);
96
+ if (childrenIds) {
97
+ childrenIds.forEach((childId) => {
98
+ // avoid infinite recursion
99
+ if (childId === props.guid) {
100
+ return;
101
+ }
102
+ const child = this.updateOrCreate({ guid: childId, parent: promise });
103
+ promise.children.push(child);
104
+ });
105
+ }
106
+ });
107
+ };
108
+
109
+ updateTopSort = (promise: PromiseModel) => {
110
+ const topSortMeta = this.topSortMeta;
111
+ const guid = promise.guid;
112
+ let meta = topSortMeta[guid] ?? {};
113
+ const isNew = !meta;
114
+ let hadParent: boolean | undefined = false;
115
+ const hasParent = !!promise.parent;
116
+ const topSort = this.topSort;
117
+ let parentChanged = isNew;
118
+
119
+ if (isNew) {
120
+ meta = topSortMeta[guid] = {};
121
+ } else {
122
+ hadParent = meta.hasParent;
123
+ }
124
+ if (!isNew && hasParent !== hadParent) {
125
+ // todo: implement recursion to reposition children
126
+ const index = topSort.indexOf(promise);
127
+ if (index !== -1) {
128
+ topSort.splice(index, 1);
129
+ }
130
+ parentChanged = true;
131
+ }
132
+ meta.hasParent = hasParent;
133
+ if (parentChanged) {
134
+ this.insertInTopSort(promise);
135
+ }
136
+ };
137
+
138
+ insertInTopSort = (promise: PromiseModel) => {
139
+ const topSort = this.topSort;
140
+ if (promise.parent) {
141
+ const parentIndex = topSort.indexOf(promise.parent);
142
+ topSort.splice(parentIndex + 1, 0, promise);
143
+ } else {
144
+ this.topSort.push(promise);
145
+ }
146
+ promise.children.forEach((child) => {
147
+ const index = topSort.indexOf(child);
148
+ if (index !== -1) {
149
+ topSort.splice(index, 1);
150
+ }
151
+ this.insertInTopSort(child);
152
+ });
153
+ };
154
+
155
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
156
+ updateOrCreate = (props: any) => {
157
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
158
+ const guid = props.guid;
159
+ const promise = this.findOrCreate(guid);
160
+
161
+ setProperties(promise, props);
162
+
163
+ this.updateTopSort(promise);
164
+
165
+ return promise;
166
+ };
167
+
168
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
169
+ createPromise(props: any): PromiseModel {
170
+ const promise = PromiseModel.create(props) as PromiseModel;
171
+ const index = this.all.length;
172
+
173
+ this.all.push(promise);
174
+ this.promiseIndex[promise.guid as keyof object] = index;
175
+ return promise;
176
+ }
177
+
178
+ find(guid?: string) {
179
+ if (guid) {
180
+ const index = this.promiseIndex[guid as keyof object];
181
+ if (index !== undefined) {
182
+ return this.all.at(index);
183
+ }
184
+ } else {
185
+ return this.all;
186
+ }
187
+ }
188
+
189
+ findOrCreate(guid?: string) {
190
+ if (!guid) {
191
+ assert('You have tried to findOrCreate without a guid');
192
+ }
193
+ return (this.find(guid) as PromiseModel) || this.createPromise({ guid });
194
+ }
195
+
196
+ // Manually implement Evented functionality, so we can move away from the mixin
197
+
198
+ on(eventName: string, method: AnyFn): void;
199
+ on(eventName: string, target: unknown, method: AnyFn): void;
200
+
201
+ @action
202
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
203
+ on(eventName: string, targetOrMethod: unknown | AnyFn, method?: AnyFn): void {
204
+ if (typeof targetOrMethod === 'function') {
205
+ // If we did not pass a target, default to `this`
206
+ addListener(this, eventName, this, targetOrMethod as AnyFn);
207
+ } else {
208
+ addListener(this, eventName, targetOrMethod as object, method);
209
+ }
210
+ }
211
+
212
+ one(eventName: string, method: AnyFn): void;
213
+ one(eventName: string, target: unknown, method: AnyFn): void;
214
+
215
+ @action
216
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
217
+ one(eventName: string, targetOrMethod: unknown | AnyFn, method?: AnyFn) {
218
+ if (typeof targetOrMethod === 'function') {
219
+ // If we did not pass a target, default to `this`
220
+ addListener(this, eventName, this, targetOrMethod as AnyFn, true);
221
+ } else {
222
+ addListener(this, eventName, targetOrMethod as object, method, true);
223
+ }
224
+ }
225
+
226
+ off(eventName: string, method: AnyFn): void;
227
+ off(eventName: string, target: unknown, method: AnyFn): void;
228
+
229
+ @action
230
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
231
+ off(eventName: string, targetOrMethod: unknown | AnyFn, method?: AnyFn) {
232
+ try {
233
+ if (typeof targetOrMethod === 'function') {
234
+ // If we did not pass a target, default to `this`
235
+ removeListener(this, eventName, this, targetOrMethod as AnyFn);
236
+ } else {
237
+ removeListener(this, eventName, targetOrMethod as object, method);
238
+ }
239
+ } catch (e) {
240
+ console.error(e);
241
+ }
242
+ }
243
+
244
+ @action
245
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
246
+ trigger(eventName: string, ...args: Array<any>) {
247
+ sendEvent(this, eventName, args);
248
+ }
249
+ }
@@ -81,7 +81,7 @@ export default class {
81
81
  let saved = this.storage.getItem(this.getStorageKey());
82
82
  if (saved && saved.columnVisibility) {
83
83
  let savedIds = keys(saved.columnVisibility).sort();
84
- let schemaIds = this.columnSchema.mapBy('id').sort();
84
+ let schemaIds = this.columnSchema.map((col) => col.id).sort();
85
85
  if (!compareArrays(savedIds, schemaIds)) {
86
86
  // Clear saved items
87
87
  this.storage.removeItem(this.getStorageKey());
@@ -165,7 +165,7 @@ export default class {
165
165
  if (saved.columnVisibility && !isNone(saved.columnVisibility[id])) {
166
166
  return saved.columnVisibility[id];
167
167
  }
168
- return this.columnSchema.findBy('id', id).visible;
168
+ return this.columnSchema.find((x) => x.id === id).visible;
169
169
  }
170
170
 
171
171
  /**
@@ -195,7 +195,7 @@ export default class {
195
195
  this._columnVisibility = this.columnSchema.map((column) =>
196
196
  Object.assign({}, column, {
197
197
  visible: this.isColumnVisible(column.id),
198
- })
198
+ }),
199
199
  );
200
200
  }
201
201
 
@@ -221,8 +221,8 @@ export default class {
221
221
  let diff = this.tableWidth - totalWidth;
222
222
  while (diff > 0) {
223
223
  columns
224
- .filterBy('visible')
225
- .sortBy('width')
224
+ .filter((col) => !!col.visible)
225
+ .sort((a, b) => a.width - b.width)
226
226
  .forEach((column) => {
227
227
  if (diff > 0) {
228
228
  column.width++;
@@ -245,7 +245,7 @@ export default class {
245
245
  * @param {Number} width The column's new width
246
246
  */
247
247
  updateColumnWidth(id, width) {
248
- let column = this._columns.findBy('id', id);
248
+ let column = this._columns.find((x) => x.id === id);
249
249
  let previousWidth = column.width;
250
250
  column.width = width;
251
251
  let last = this._columns[this._columns.length - 1];
@@ -265,9 +265,9 @@ export default class {
265
265
  * @param {String} id
266
266
  */
267
267
  toggleVisibility(id) {
268
- let column = this._columnVisibility.findBy('id', id);
268
+ let column = this._columnVisibility.find((x) => x.id === id);
269
269
  column.visible = !column.visible;
270
- if (!this._columnVisibility.isAny('visible')) {
270
+ if (!this._columnVisibility.some((col) => col.visible)) {
271
271
  // If this column was the last visible column
272
272
  // cancel toggling and set back to `true`.
273
273
  column.visible = true;
@@ -317,7 +317,7 @@ export default class {
317
317
  obj[id] = visible;
318
318
  return obj;
319
319
  },
320
- {}
320
+ {},
321
321
  );
322
322
  this.storage.setItem(this.getStorageKey(), saved);
323
323
  }
@@ -362,7 +362,7 @@ export default class {
362
362
  * @method getStorageKey
363
363
  */
364
364
  getStorageKey() {
365
- return `list__${this.key}`;
365
+ return `list-${this.key}`;
366
366
  }
367
367
 
368
368
  /**
@@ -1,17 +1,24 @@
1
+ /* eslint-disable @typescript-eslint/no-unsafe-call */
2
+ // @ts-expect-error This does not seem to be typed
1
3
  import { observes } from '@ember-decorators/object';
2
- import { or, equal, not } from '@ember/object/computed';
3
4
  import { once } from '@ember/runloop';
4
- import { typeOf, isEmpty } from '@ember/utils';
5
- // eslint-disable-next-line ember/no-observers
5
+ import { typeOf } from '@ember/utils';
6
+
7
+ // eslint-disable-next-line ember/no-computed-properties-in-native-classes
6
8
  import EmberObject, { computed } from '@ember/object';
7
- import escapeRegExp from 'ember-inspector/utils/escape-reg-exp';
9
+ import { tracked } from '@glimmer/tracking';
10
+
11
+ import { TrackedArray } from 'tracked-built-ins';
12
+
13
+ import escapeRegExp from '../utils/escape-reg-exp';
14
+ import { isNullish } from '../utils/nullish';
8
15
 
9
16
  const dateComputed = function () {
10
17
  return computed({
11
18
  get() {
12
19
  return null;
13
20
  },
14
- set(key, date) {
21
+ set(_key, date: Date | number | string) {
15
22
  if (typeOf(date) === 'date') {
16
23
  return date;
17
24
  } else if (typeof date === 'number' || typeof date === 'string') {
@@ -22,61 +29,63 @@ const dateComputed = function () {
22
29
  });
23
30
  };
24
31
 
25
- export default class Promise extends EmberObject {
26
- @dateComputed()
27
- createdAt;
28
-
29
- @dateComputed()
30
- settledAt;
31
-
32
- parent = null;
33
-
34
- @computed('parent.level')
35
- get level() {
36
- let parent = this.parent;
32
+ export default class PromiseModel extends EmberObject {
33
+ children = new TrackedArray<PromiseModel>([]);
34
+ declare label?: string;
35
+ declare guid: string;
36
+ declare state: string;
37
+ // @ts-expect-error TODO: figure out types for this
38
+ @dateComputed() createdAt;
39
+ // @ts-expect-error TODO: figure out types for this
40
+ @dateComputed() settledAt;
41
+
42
+ @tracked branchLabel = '';
43
+ @tracked isExpanded = false;
44
+ @tracked isManuallyExpanded?: boolean = undefined;
45
+ @tracked parent: PromiseModel | null = null;
46
+
47
+ get level(): number {
48
+ const parent = this.parent;
37
49
  if (!parent) {
38
50
  return 0;
39
51
  }
40
- return parent.get('level') + 1;
52
+ return parent.level + 1;
41
53
  }
42
54
 
43
- @or('isFulfilled', 'isRejected')
44
- isSettled;
45
-
46
- @equal('state', 'fulfilled')
47
- isFulfilled;
55
+ get isSettled() {
56
+ return this.isFulfilled || this.isRejected;
57
+ }
48
58
 
49
- @equal('state', 'rejected')
50
- isRejected;
59
+ get isFulfilled() {
60
+ return this.state === 'fulfilled';
61
+ }
51
62
 
52
- @not('isSettled')
53
- isPending;
63
+ get isRejected() {
64
+ return this.state === 'rejected';
65
+ }
54
66
 
55
- get children() {
56
- return [];
67
+ get isPending() {
68
+ return !this.isSettled;
57
69
  }
58
70
 
59
- @computed('isPending', 'children.@each.pendingBranch')
60
71
  get pendingBranch() {
61
72
  return this.recursiveState('isPending', 'pendingBranch');
62
73
  }
63
74
 
64
- @computed('isRejected', 'children.@each.rejectedBranch')
65
75
  get rejectedBranch() {
66
76
  return this.recursiveState('isRejected', 'rejectedBranch');
67
77
  }
68
78
 
69
- @computed('isFulfilled', 'children.@each.fulfilledBranch')
70
79
  get fulfilledBranch() {
71
80
  return this.recursiveState('isFulfilled', 'fulfilledBranch');
72
81
  }
73
82
 
74
- recursiveState(prop, cp) {
75
- if (this.get(prop)) {
83
+ recursiveState(prop: keyof PromiseModel, cp: keyof PromiseModel) {
84
+ if (this[prop]) {
76
85
  return true;
77
86
  }
78
- for (let i = 0; i < this.get('children.length'); i++) {
79
- if (this.children.objectAt(i).get(cp)) {
87
+ for (let i = 0; i < this.children.length; i++) {
88
+ if (this.children.at(i)?.[cp]) {
80
89
  return true;
81
90
  }
82
91
  }
@@ -92,9 +101,9 @@ export default class Promise extends EmberObject {
92
101
  return;
93
102
  }
94
103
  if (
95
- (this.pendingBranch && !this.get('parent.pendingBranch')) ||
96
- (this.fulfilledBranch && !this.get('parent.fulfilledBranch')) ||
97
- (this.rejectedBranch && !this.get('parent.rejectedBranch'))
104
+ (this.pendingBranch && !this.parent.pendingBranch) ||
105
+ (this.fulfilledBranch && !this.parent.fulfilledBranch) ||
106
+ (this.rejectedBranch && !this.parent.rejectedBranch)
98
107
  ) {
99
108
  this.parent.notifyPropertyChange('fulfilledBranch');
100
109
  this.parent.notifyPropertyChange('rejectedBranch');
@@ -108,31 +117,29 @@ export default class Promise extends EmberObject {
108
117
  this.addBranchLabel(this.label, true);
109
118
  }
110
119
 
111
- addBranchLabel(label, replace) {
112
- if (isEmpty(label)) {
120
+ addBranchLabel(label?: string, replace?: boolean) {
121
+ if (isNullish(label)) {
113
122
  return;
114
123
  }
115
124
  if (replace) {
116
- this.set('branchLabel', label);
125
+ this.branchLabel = label;
117
126
  } else {
118
- this.set('branchLabel', `${this.branchLabel} ${label}`);
127
+ this.branchLabel = `${this.branchLabel} ${label}`;
119
128
  }
120
129
 
121
- let parent = this.parent;
130
+ const parent = this.parent;
122
131
  if (parent) {
123
132
  parent.addBranchLabel(label);
124
133
  }
125
134
  }
126
135
 
127
- branchLabel = '';
128
-
129
- matches(val) {
136
+ matches(val: string) {
130
137
  return !!this.branchLabel
131
138
  .toLowerCase()
132
139
  .match(new RegExp(`.*${escapeRegExp(val.toLowerCase())}.*`));
133
140
  }
134
141
 
135
- matchesExactly(val) {
142
+ matchesExactly(val: string) {
136
143
  return !!(this.label || '')
137
144
  .toLowerCase()
138
145
  .match(new RegExp(`.*${escapeRegExp(val.toLowerCase())}.*`));
@@ -140,21 +147,18 @@ export default class Promise extends EmberObject {
140
147
 
141
148
  // EXPANDED / COLLAPSED PROMISES
142
149
 
143
- isExpanded = false;
144
-
145
- isManuallyExpanded = undefined;
146
-
147
150
  // eslint-disable-next-line ember/no-observers
148
151
  @observes('isPending', 'isFulfilled', 'isRejected', 'parent')
149
152
  stateOrParentChanged() {
150
- let parent = this.parent;
153
+ const parent = this.parent;
151
154
  if (parent) {
155
+ // eslint-disable-next-line ember/no-runloop
152
156
  once(parent, 'recalculateExpanded');
153
157
  }
154
158
  }
155
159
 
156
- _findTopParent() {
157
- let parent = this.parent;
160
+ _findTopParent(): PromiseModel {
161
+ const parent = this.parent;
158
162
  if (!parent) {
159
163
  return this;
160
164
  } else {
@@ -167,36 +171,35 @@ export default class Promise extends EmberObject {
167
171
  if (this.isManuallyExpanded !== undefined) {
168
172
  isExpanded = this.isManuallyExpanded;
169
173
  } else {
170
- let children = this._allChildren();
171
- for (let i = 0, l = children.length; i < l; i++) {
172
- let child = children[i];
173
- if (child.get('isRejected')) {
174
+ const children = this._allChildren();
175
+ for (let i = 0; i < children.length; i++) {
176
+ const child = children[i] as PromiseModel;
177
+ if (child.isRejected) {
174
178
  isExpanded = true;
175
179
  }
176
- if (child.get('isPending') && !child.get('parent.isPending')) {
180
+ if (child.isPending && !child.parent!.isPending) {
177
181
  isExpanded = true;
178
182
  }
179
183
  if (isExpanded) {
180
184
  break;
181
185
  }
182
186
  }
183
- let parents = this._allParents();
187
+ const parents = this._allParents();
184
188
  if (isExpanded) {
185
189
  parents.forEach((parent) => {
186
190
  parent.set('isExpanded', true);
187
191
  });
188
- } else if (this.get('parent.isExpanded')) {
192
+ } else if (this.parent?.isExpanded) {
189
193
  this.parent.recalculateExpanded();
190
194
  }
191
195
  }
192
- this.set('isExpanded', isExpanded);
196
+ this.isExpanded = isExpanded;
193
197
  return isExpanded;
194
198
  }
195
199
 
196
- @computed('parent.{isExpanded,isVisible}', 'parent')
197
- get isVisible() {
200
+ get isVisible(): boolean {
198
201
  if (this.parent) {
199
- return this.get('parent.isExpanded') && this.get('parent.isVisible');
202
+ return this.parent.isExpanded && this.parent.isVisible;
200
203
  }
201
204
  return true;
202
205
  }
@@ -204,13 +207,13 @@ export default class Promise extends EmberObject {
204
207
  _allChildren() {
205
208
  let children = [...this.children];
206
209
  children.forEach((item) => {
207
- children = [...children, item._allChildren()];
210
+ children = [...children, ...item._allChildren()];
208
211
  });
209
212
  return children;
210
213
  }
211
214
 
212
- _allParents() {
213
- let parent = this.parent;
215
+ _allParents(): Array<PromiseModel> {
216
+ const parent = this.parent;
214
217
  if (parent) {
215
218
  return [parent, ...parent._allParents()];
216
219
  } else {
@@ -19,7 +19,7 @@ Router.map(function () {
19
19
  { path: '/:type_id', resetNamespace: true },
20
20
  function () {
21
21
  this.route('records', { resetNamespace: true });
22
- }
22
+ },
23
23
  );
24
24
  });
25
25
  });
@@ -16,18 +16,16 @@ export default class AppDetectedRoute extends Route {
16
16
  * @return {Promise}
17
17
  */
18
18
  model() {
19
- let port = this.port;
20
-
21
19
  return new Promise((resolve) => {
22
20
  this.applicationBooted = ({ booted }) => {
23
21
  if (booted) {
24
- port.off('general:applicationBooted', this.applicationBooted);
22
+ this.port.off('general:applicationBooted', this.applicationBooted);
25
23
  this.applicationBooted = null;
26
24
  resolve();
27
25
  }
28
26
  };
29
- port.on('general:applicationBooted', this.applicationBooted);
30
- port.send('general:applicationBooted');
27
+ this.port.on('general:applicationBooted', this.applicationBooted);
28
+ this.port.send('general:applicationBooted');
31
29
  });
32
30
  }
33
31
 
@@ -1,3 +1,4 @@
1
+ /* eslint-disable ember/no-controller-access-in-routes */
1
2
  import { inject as service } from '@ember/service';
2
3
  import { action, set } from '@ember/object';
3
4
  import Route from '@ember/routing/route';
@@ -8,9 +9,11 @@ export default class ApplicationRoute extends Route {
8
9
  @service adapter;
9
10
  @service port;
10
11
  @service router;
12
+ @service layout;
11
13
 
12
14
  setupController(controller) {
13
15
  controller.set('mixinStack', []);
16
+
14
17
  let port = this.port;
15
18
  port.on('objectInspector:updateObject', this, this.updateObject);
16
19
  port.on('objectInspector:updateProperty', this, this.updateProperty);
@@ -54,7 +57,6 @@ export default class ApplicationRoute extends Route {
54
57
  NativeArray.apply(details);
55
58
  details.forEach(arrayize);
56
59
 
57
- // eslint-disable-next-line ember/no-controller-access-in-routes
58
60
  let controller = this.controller;
59
61
 
60
62
  if (options.parentObject) {
@@ -63,23 +65,17 @@ export default class ApplicationRoute extends Route {
63
65
  controller.activateMixinDetails(name, objectId, details, errors);
64
66
  }
65
67
 
66
- // eslint-disable-next-line ember/no-controller-access-in-routes
67
- this.controller.showInspector();
68
+ this.layout.showInspector();
68
69
  }
69
70
 
70
71
  setDeprecationCount(message) {
71
- // eslint-disable-next-line ember/no-controller-access-in-routes
72
72
  this.controller.set('deprecationCount', message.count);
73
73
  }
74
74
 
75
- // eslint-enable ember/no-controller-access-in-routes
76
-
77
75
  updateProperty(options) {
78
- if (this.get('controller.mixinDetails.mixins')) {
79
- const detail = this.get('controller.mixinDetails.mixins').objectAt(
80
- options.mixinIndex
81
- );
82
- let property = detail.properties.findBy('name', options.property);
76
+ if (this.controller.mixinDetails?.mixins) {
77
+ const detail = this.controller.mixinDetails.mixins.at(options.mixinIndex);
78
+ let property = detail.properties.find((x) => x.name === options.property);
83
79
  if (!property) return;
84
80
  set(property, 'value', options.value);
85
81
  if (options.dependentKeys) {
@@ -89,7 +85,8 @@ export default class ApplicationRoute extends Route {
89
85
  }
90
86
 
91
87
  updateErrors(options) {
92
- let mixinDetails = this.get('controller.mixinDetails');
88
+ let mixinDetails = this.controller.mixinDetails;
89
+
93
90
  if (mixinDetails) {
94
91
  if (mixinDetails.objectId === options.objectId) {
95
92
  set(mixinDetails, 'errors', options.errors);
@@ -98,7 +95,6 @@ export default class ApplicationRoute extends Route {
98
95
  }
99
96
 
100
97
  droppedObject(message) {
101
- // eslint-disable-next-line ember/no-controller-access-in-routes
102
98
  this.controller.droppedObject(message.objectId);
103
99
  }
104
100