ember-inspector 4.4.1 → 4.5.0

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 (163) hide show
  1. package/.eslintignore +1 -0
  2. package/.eslintrc.js +20 -12
  3. package/.github/workflows/build.yml +1 -0
  4. package/.tool-versions +1 -0
  5. package/CHANGELOG.md +31 -2
  6. package/app/{templates → components}/component-tree-toolbar.hbs +5 -5
  7. package/app/{templates → components}/container-type-toolbar.hbs +3 -3
  8. package/app/{templates/container-types/index-toolbar.hbs → components/container-types-toolbar.hbs} +2 -2
  9. package/app/components/date-property-field.js +4 -10
  10. package/app/{templates → components}/deprecations-toolbar.hbs +4 -4
  11. package/app/{templates → components}/libraries-toolbar.hbs +0 -0
  12. package/app/{templates → components}/model-types-toolbar.hbs +4 -4
  13. package/app/{templates → components}/promise-tree-toolbar.hbs +13 -13
  14. package/app/components/records-toolbar.hbs +26 -0
  15. package/app/components/render-tree-toolbar.hbs +33 -0
  16. package/app/components/route-cell-name.js +1 -1
  17. package/app/{templates → components}/route-tree-toolbar.hbs +3 -3
  18. package/app/components/scroll-container.js +3 -1
  19. package/app/computed/debounce.js +1 -3
  20. package/app/controllers/deprecations.js +1 -0
  21. package/app/controllers/render-tree.js +19 -4
  22. package/app/controllers/route-tree.js +51 -44
  23. package/app/initializers/setup.js +7 -18
  24. package/app/models/promise.js +3 -4
  25. package/app/routes/application.js +2 -14
  26. package/app/routes/component-tree.js +3 -0
  27. package/app/routes/deprecations.js +4 -0
  28. package/app/routes/launch.js +1 -0
  29. package/app/routes/libraries.js +1 -0
  30. package/app/routes/promise-tree.js +6 -0
  31. package/app/routes/render-tree.js +27 -10
  32. package/app/routes/route-tree.js +3 -2
  33. package/app/routes/tab.js +9 -9
  34. package/app/routes/whats-new.js +2 -0
  35. package/app/{adapters → services/adapters}/basic.js +3 -3
  36. package/app/{adapters → services/adapters}/bookmarklet.js +0 -0
  37. package/app/{adapters → services/adapters}/chrome.js +0 -0
  38. package/app/{adapters → services/adapters}/firefox.js +0 -0
  39. package/app/{adapters → services/adapters}/web-extension.js +0 -0
  40. package/app/{adapters → services/adapters}/websocket.js +0 -0
  41. package/app/services/port.js +3 -2
  42. package/app/templates/application.hbs +1 -1
  43. package/app/templates/component-tree.hbs +20 -4
  44. package/app/templates/container-type.hbs +10 -0
  45. package/app/templates/container-types/index.hbs +10 -0
  46. package/app/templates/deprecations.hbs +13 -10
  47. package/app/templates/libraries.hbs +12 -11
  48. package/app/templates/model-types.hbs +15 -2
  49. package/app/templates/promise-tree.hbs +22 -7
  50. package/app/templates/records.hbs +15 -7
  51. package/app/templates/render-tree.hbs +32 -9
  52. package/app/templates/route-tree.hbs +23 -14
  53. package/app/templates/whats-new.hbs +8 -4
  54. package/config/ember-cli-update.json +1 -1
  55. package/config/ember-try.js +8 -0
  56. package/config/targets.js +14 -6
  57. package/dist/bookmarklet/panes-3-4-0/assets/chunk.143.701794df61367d9c0beb.js +146 -0
  58. package/dist/bookmarklet/panes-3-4-0/assets/chunk.178.1fa501a69a8888639ff4.js +20 -0
  59. package/dist/bookmarklet/panes-3-4-0/assets/chunk.916.cfdae71ef87e943d7ad0.js +505 -0
  60. package/dist/bookmarklet/panes-3-4-0/assets/chunk.916.cfdae71ef87e943d7ad0.js.LICENSE.txt +8 -0
  61. package/dist/bookmarklet/panes-3-4-0/assets/ember-inspector.js +617 -1512
  62. package/dist/bookmarklet/panes-3-4-0/assets/vendor.css +9 -2
  63. package/dist/bookmarklet/panes-3-4-0/assets/vendor.js +6132 -7501
  64. package/dist/bookmarklet/panes-3-4-0/ember_debug.js +731 -416
  65. package/dist/bookmarklet/panes-3-4-0/index.html +2 -1
  66. package/dist/chrome/manifest.json +1 -1
  67. package/dist/chrome/panes-3-4-0/assets/chunk.143.701794df61367d9c0beb.js +146 -0
  68. package/dist/chrome/panes-3-4-0/assets/chunk.178.1fa501a69a8888639ff4.js +20 -0
  69. package/dist/chrome/panes-3-4-0/assets/chunk.916.cfdae71ef87e943d7ad0.js +505 -0
  70. package/dist/chrome/panes-3-4-0/assets/chunk.916.cfdae71ef87e943d7ad0.js.LICENSE.txt +8 -0
  71. package/dist/chrome/panes-3-4-0/assets/ember-inspector.js +617 -1512
  72. package/dist/chrome/panes-3-4-0/assets/vendor.css +9 -2
  73. package/dist/chrome/panes-3-4-0/assets/vendor.js +6132 -7501
  74. package/dist/chrome/panes-3-4-0/ember_debug.js +731 -416
  75. package/dist/chrome/panes-3-4-0/index.html +2 -1
  76. package/dist/firefox/manifest.json +1 -1
  77. package/dist/firefox/panes-3-4-0/assets/chunk.143.701794df61367d9c0beb.js +146 -0
  78. package/dist/firefox/panes-3-4-0/assets/chunk.178.1fa501a69a8888639ff4.js +20 -0
  79. package/dist/firefox/panes-3-4-0/assets/chunk.916.cfdae71ef87e943d7ad0.js +505 -0
  80. package/dist/firefox/panes-3-4-0/assets/chunk.916.cfdae71ef87e943d7ad0.js.LICENSE.txt +8 -0
  81. package/dist/firefox/panes-3-4-0/assets/ember-inspector.js +617 -1512
  82. package/dist/firefox/panes-3-4-0/assets/vendor.css +9 -2
  83. package/dist/firefox/panes-3-4-0/assets/vendor.js +6132 -7501
  84. package/dist/firefox/panes-3-4-0/ember_debug.js +731 -416
  85. package/dist/firefox/panes-3-4-0/index.html +2 -1
  86. package/dist/websocket/assets/chunk.143.701794df61367d9c0beb.js +146 -0
  87. package/dist/websocket/assets/chunk.178.1fa501a69a8888639ff4.js +20 -0
  88. package/dist/websocket/assets/chunk.916.cfdae71ef87e943d7ad0.js +505 -0
  89. package/dist/websocket/assets/chunk.916.cfdae71ef87e943d7ad0.js.LICENSE.txt +8 -0
  90. package/dist/websocket/assets/ember-inspector.js +617 -1512
  91. package/dist/websocket/assets/vendor.css +9 -2
  92. package/dist/websocket/assets/vendor.js +6132 -7501
  93. package/dist/websocket/ember_debug.js +731 -416
  94. package/dist/websocket/index.html +2 -1
  95. package/ember_debug/adapters/basic.js +4 -3
  96. package/ember_debug/adapters/web-extension.js +2 -1
  97. package/ember_debug/adapters/websocket.js +4 -7
  98. package/ember_debug/container-debug.js +2 -3
  99. package/ember_debug/data-debug.js +4 -3
  100. package/ember_debug/deprecation-debug.js +12 -15
  101. package/ember_debug/general-debug.js +3 -4
  102. package/ember_debug/libs/promise-assembler.js +12 -14
  103. package/ember_debug/libs/source-map.js +3 -8
  104. package/ember_debug/main.js +11 -11
  105. package/ember_debug/mixins/port-mixin.js +1 -3
  106. package/ember_debug/models/profile-manager.js +135 -3
  107. package/ember_debug/models/profile-node.js +2 -4
  108. package/ember_debug/models/promise.js +3 -4
  109. package/ember_debug/object-inspector.js +15 -19
  110. package/ember_debug/port.js +7 -5
  111. package/ember_debug/promise-debug.js +16 -17
  112. package/ember_debug/render-debug.js +11 -4
  113. package/ember_debug/route-debug.js +5 -10
  114. package/ember_debug/services/session.js +1 -3
  115. package/ember_debug/utils/ember/application.js +11 -0
  116. package/ember_debug/utils/ember/array/index.js +11 -0
  117. package/ember_debug/utils/ember/array/mutable.js +11 -0
  118. package/ember_debug/utils/ember/array/proxy.js +11 -0
  119. package/ember_debug/utils/ember/component.js +11 -0
  120. package/ember_debug/utils/ember/debug.js +15 -0
  121. package/ember_debug/utils/{ember.js → ember/index.js} +1 -0
  122. package/ember_debug/utils/ember/instrumentation.js +11 -0
  123. package/ember_debug/utils/ember/object/computed.js +11 -0
  124. package/ember_debug/utils/ember/object/evented.js +11 -0
  125. package/ember_debug/utils/ember/object/index.js +15 -0
  126. package/ember_debug/utils/ember/object/internals.js +11 -0
  127. package/ember_debug/utils/ember/object/mixin.js +11 -0
  128. package/ember_debug/utils/ember/object/observable.js +11 -0
  129. package/ember_debug/utils/ember/object/promise-proxy-mixin.js +13 -0
  130. package/ember_debug/utils/ember/runloop.js +17 -0
  131. package/ember_debug/utils/ember/utils.js +11 -0
  132. package/ember_debug/utils/rsvp.js +14 -0
  133. package/ember_debug/vendor/startup-wrapper.js +21 -12
  134. package/ember_debug/view-debug.js +2 -3
  135. package/package.json +43 -37
  136. package/tests/acceptance/app-picker-test.js +3 -3
  137. package/tests/acceptance/component-tree-test.js +17 -3
  138. package/tests/acceptance/container-test.js +8 -6
  139. package/tests/acceptance/data-test.js +2 -0
  140. package/tests/acceptance/deprecation-test.js +4 -0
  141. package/tests/acceptance/object-inspector-test.js +29 -1
  142. package/tests/acceptance/promise-test.js +11 -1
  143. package/tests/acceptance/route-tree-test.js +10 -0
  144. package/tests/acceptance/whats-new-test.js +1 -1
  145. package/tests/ember_debug/ember-debug-test.js +2 -0
  146. package/tests/ember_debug/object-inspector-test.js +54 -22
  147. package/tests/ember_debug/profile-manager-test.js +563 -6
  148. package/tests/ember_debug/profile-node-test.js +5 -5
  149. package/tests/ember_debug/promise-assembler-test.js +2 -0
  150. package/tests/ember_debug/promise-debug-test.js +7 -5
  151. package/tests/ember_debug/render-debug-test.js +1 -1
  152. package/tests/ember_debug/view-debug-test.js +8 -8
  153. package/tests/helpers/setup-ember-debug-test.js +11 -6
  154. package/tests/index.html +8 -1
  155. package/tests/integration/components/component-tree-arg-test.js +1 -1
  156. package/tests/test-adapter.js +1 -1
  157. package/tests/test-helper.js +5 -1
  158. package/tests/unit/check-current-route-test.js +4 -0
  159. package/tests/unit/is-route-substate-test.js +8 -8
  160. package/tests/unit/match-test.js +2 -2
  161. package/app/templates/records-toolbar.hbs +0 -26
  162. package/app/templates/render-tree-toolbar.hbs +0 -20
  163. package/tests/.eslintrc.js +0 -8
package/.eslintignore CHANGED
@@ -13,6 +13,7 @@
13
13
  # misc
14
14
  /coverage/
15
15
  !.*
16
+ .*/
16
17
  .eslintcache
17
18
 
18
19
  # ember-try
package/.eslintrc.js CHANGED
@@ -50,18 +50,17 @@ module.exports = {
50
50
  // node files
51
51
  {
52
52
  files: [
53
- '.ember-cli.js',
54
- '.eslintrc.js',
55
- '.prettierrc.js',
56
- '.stylelintrc.js',
57
- '.template-lintrc.js',
58
- 'ember-cli-build.js',
59
- 'testem.js',
60
- 'blueprints/*/index.js',
61
- 'config/**/*.js',
62
- 'lib/*/index.js',
63
- 'scripts/**/*.js',
64
- 'server/**/*.js',
53
+ './.eslintrc.js',
54
+ './.prettierrc.js',
55
+ './.stylelintrc.js',
56
+ './.template-lintrc.js',
57
+ './ember-cli-build.js',
58
+ './testem.js',
59
+ './blueprints/*/index.js',
60
+ './config/**/*.js',
61
+ './lib/*/index.js',
62
+ './scripts/**/*.js',
63
+ './server/**/*.js',
65
64
  ],
66
65
  excludedFiles: ['app/**'],
67
66
  parserOptions: {
@@ -79,5 +78,14 @@ module.exports = {
79
78
  'node/no-unpublished-require': 'off',
80
79
  },
81
80
  },
81
+ {
82
+ // Test files:
83
+ files: ['tests/**/*-test.{js,ts}'],
84
+ extends: ['plugin:qunit/recommended'],
85
+ rules: {
86
+ 'qunit/no-conditional-assertions': 'off',
87
+ 'qunit/no-early-return': 'off',
88
+ },
89
+ },
82
90
  ],
83
91
  };
@@ -88,6 +88,7 @@ jobs:
88
88
  - ember-lts-3.12
89
89
  - ember-lts-3.16
90
90
  - ember-lts-3.20
91
+ - ember-lts-3.24
91
92
  - ember-release
92
93
  - ember-beta
93
94
  - ember-canary
package/.tool-versions ADDED
@@ -0,0 +1 @@
1
+ nodejs 14.16.0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,34 @@
1
+ # Changelog
2
+
3
+
4
+ ## v4.5.0 (2021-11-02)
5
+
6
+ #### :rocket: Enhancement
7
+ * [#1730](https://github.com/emberjs/ember-inspector/pull/1730) Update ember-flatpickr ([@rwwagner90](https://github.com/rwwagner90))
8
+ * [#1685](https://github.com/emberjs/ember-inspector/pull/1685) add highlight render option to Render Performance tab ([@michaelbdai](https://github.com/michaelbdai))
9
+
10
+ #### :bug: Bug Fix
11
+ * [#1760](https://github.com/emberjs/ember-inspector/pull/1760) Don't rely on Ember.EmberInspectorDebugger ([@sandstrom](https://github.com/sandstrom))
12
+
13
+ #### :house: Internal
14
+ * [#1759](https://github.com/emberjs/ember-inspector/pull/1759) Fix release-it-lerna-changelog ([@rwwagner90](https://github.com/rwwagner90))
15
+ * [#1750](https://github.com/emberjs/ember-inspector/pull/1750) fixed all the beta build test failures ([@michaelbdai](https://github.com/michaelbdai))
16
+ * [#1733](https://github.com/emberjs/ember-inspector/pull/1733) Recreate yarn.lock ([@rwwagner90](https://github.com/rwwagner90))
17
+ * [#1741](https://github.com/emberjs/ember-inspector/pull/1741) Fix build ([@chancancode](https://github.com/chancancode))
18
+ * [#1731](https://github.com/emberjs/ember-inspector/pull/1731) Fix deprecated use of `run.debounce` ([@chancancode](https://github.com/chancancode))
19
+ * [#1714](https://github.com/emberjs/ember-inspector/pull/1714) Use forks of packages ([@rwwagner90](https://github.com/rwwagner90))
20
+ * [#1727](https://github.com/emberjs/ember-inspector/pull/1727) Refactor legacy/bespoke injection patterns into services ([@chancancode](https://github.com/chancancode))
21
+ * [#1695](https://github.com/emberjs/ember-inspector/pull/1695) Update ember-test-selectors ([@rwwagner90](https://github.com/rwwagner90))
22
+ * [#1683](https://github.com/emberjs/ember-inspector/pull/1683) Remove toolbar outlet, remove more global Ember ([@rwwagner90](https://github.com/rwwagner90))
23
+ * [#1680](https://github.com/emberjs/ember-inspector/pull/1680) ember-cli 3.27, fix some lint ([@rwwagner90](https://github.com/rwwagner90))
24
+ * [#1619](https://github.com/emberjs/ember-inspector/pull/1619) Move changelog heading to top ([@sandstrom](https://github.com/sandstrom))
25
+
26
+ #### Committers: 4
27
+ - Bing Dai ([@michaelbdai](https://github.com/michaelbdai))
28
+ - Godfrey Chan ([@chancancode](https://github.com/chancancode))
29
+ - Robert Wagner ([@rwwagner90](https://github.com/rwwagner90))
30
+ - [@sandstrom](https://github.com/sandstrom)
31
+
1
32
  ## v4.4.1 (2021-05-25)
2
33
 
3
34
  #### :bug: Bug Fix
@@ -75,8 +106,6 @@
75
106
  - [@dependabot-preview[bot]](https://github.com/apps/dependabot-preview)
76
107
  - [@patricklx](https://github.com/patricklx)
77
108
 
78
- # Changelog
79
-
80
109
  ## [v4.1.0](https://github.com/emberjs/ember-inspector/tree/v4.1.0) (2020-05-12)
81
110
 
82
111
  [Full Changelog](https://github.com/emberjs/ember-inspector/compare/v4.0.1...v4.1.0)
@@ -1,7 +1,7 @@
1
1
  <div class="toolbar">
2
2
  <button
3
- class="{{if this.isInspecting "active"}} toolbar__icon-button"
4
- {{on "click" this.toggleInspect}}
3
+ class="{{if @isInspecting "active"}} toolbar__icon-button"
4
+ {{on "click" @toggleInspect}}
5
5
  type="button"
6
6
  >
7
7
  {{svg-jar "inspect" width="16px" height="17px"}}
@@ -12,7 +12,7 @@
12
12
  <button
13
13
  class="toolbar__icon-button"
14
14
  title="expand all"
15
- {{on "click" this.expandAll}}
15
+ {{on "click" @expandAll}}
16
16
  type="button"
17
17
  >
18
18
  {{svg-jar "chevron-down" width="16px" height="16px"}}
@@ -21,7 +21,7 @@
21
21
  <button
22
22
  class="toolbar__icon-button"
23
23
  title="collapse all"
24
- {{on "click" this.collapseAll}}
24
+ {{on "click" @collapseAll}}
25
25
  type="button"
26
26
  >
27
27
  {{svg-jar "chevron-right" width="16px" height="16px"}}
@@ -30,7 +30,7 @@
30
30
  <Ui::ToolbarDivider />
31
31
 
32
32
  <Ui::ToolbarSearchField
33
- @value={{this.query}}
33
+ @value={{@query}}
34
34
  data-test-filter-views
35
35
  />
36
36
  </div>
@@ -1,17 +1,17 @@
1
1
  <div class="toolbar">
2
2
  <Ui::ToolbarReloadButton
3
- @action={{action send "reload"}}
3
+ @action={{@reload}}
4
4
  data-test-reload-container-btn
5
5
  />
6
6
 
7
7
  <Ui::ToolbarDivider />
8
8
 
9
- <Ui::SendToConsole @action={{this.sendContainerToConsole}} />
9
+ <Ui::SendToConsole @action={{@sendContainerToConsole}} />
10
10
 
11
11
  <Ui::ToolbarDivider />
12
12
 
13
13
  <Ui::ToolbarSearchField
14
- @value={{this.searchValue}}
14
+ @value={{@searchValue}}
15
15
  data-test-container-instance-search
16
16
  />
17
17
  </div>
@@ -1,10 +1,10 @@
1
1
  <div class="toolbar">
2
2
  <Ui::ToolbarReloadButton
3
- @action={{action send "reload"}}
3
+ @action={{@reload}}
4
4
  data-test-reload-container-btn
5
5
  />
6
6
 
7
7
  <Ui::ToolbarDivider />
8
8
 
9
- <Ui::SendToConsole @action={{this.sendContainerToConsole}} />
9
+ <Ui::SendToConsole @action={{@sendContainerToConsole}} />
10
10
  </div>
@@ -1,21 +1,15 @@
1
1
  import { scheduleOnce } from '@ember/runloop';
2
+ import { action } from '@ember/object';
2
3
  import DatePicker from 'ember-inspector/components/ember-flatpickr';
3
- import { KEYS } from 'ember-inspector/utils/key-codes';
4
4
 
5
5
  export default class DatePropertyFieldComponent extends DatePicker {
6
- didInsertElement() {
7
- super.didInsertElement(...arguments);
6
+ @action
7
+ onInsert(element) {
8
+ super.onInsert(element);
8
9
 
9
10
  scheduleOnce('afterRender', this, this._openFlatpickr);
10
11
  }
11
12
 
12
- keyUp(e) {
13
- if (e.keyCode === KEYS.escape) {
14
- this.flatpickrRef.close();
15
- }
16
- return super.keyUp(...arguments);
17
- }
18
-
19
13
  _openFlatpickr() {
20
14
  this.flatpickrRef.open();
21
15
  }
@@ -1,5 +1,5 @@
1
1
  <div class="toolbar">
2
- <Ui::ToolbarClearButton @action={{action send "clear"}} />
2
+ <Ui::ToolbarClearButton @action={{@clear}} />
3
3
 
4
4
  <Ui::ToolbarDivider />
5
5
 
@@ -7,8 +7,8 @@
7
7
  <label title="Deprecation workflow">
8
8
  <Input
9
9
  @type="checkbox"
10
- @checked={{this.toggleDeprecationWorkflow}}
11
- {{on "change" this.changeDeprecationWorkflow}}
10
+ @checked={{@toggleDeprecationWorkflow}}
11
+ {{on "change" @changeDeprecationWorkflow}}
12
12
  />
13
13
  Toggle for Deprecation Workflow
14
14
  </label>
@@ -17,7 +17,7 @@
17
17
  <Ui::ToolbarDivider />
18
18
 
19
19
  <Ui::ToolbarSearchField
20
- @value={{this.searchValue}}
20
+ @value={{@searchValue}}
21
21
  data-test-deprecations-search
22
22
  />
23
23
  </div>
@@ -1,6 +1,6 @@
1
1
  <div class="toolbar">
2
2
  <Ui::ToolbarReloadButton
3
- @action={{action send "reload"}}
3
+ @action={{@reload}}
4
4
  data-test-reload-container-btn
5
5
  />
6
6
 
@@ -11,7 +11,7 @@
11
11
  <Input
12
12
  data-test-options-hideEmptyModelTypes
13
13
  @type="checkbox"
14
- @checked={{this.hideEmptyModelTypes}}
14
+ @checked={{@hideEmptyModelTypes}}
15
15
  />
16
16
  Hide Empty Model Types
17
17
  </label>
@@ -21,12 +21,12 @@
21
21
  <Input
22
22
  data-test-options-orderByRecordCount
23
23
  @type="checkbox"
24
- @checked={{this.orderByRecordCount}}
24
+ @checked={{@orderByRecordCount}}
25
25
  />
26
26
  Order Models By Record Count
27
27
  </label>
28
28
  </div>
29
- <button class="toolbar__radio js-filter" {{on "click" this.getStore}} data-test-inspect-store type="button">
29
+ <button class="toolbar__radio js-filter" {{on "click" @getStore}} data-test-inspect-store type="button">
30
30
  Inspect Store
31
31
  </button>
32
32
  </div>
@@ -1,6 +1,6 @@
1
1
  <div class="toolbar">
2
2
  <Ui::ToolbarClearButton
3
- @action={{this.clear}}
3
+ @action={{@clear}}
4
4
  class="js-clear-promises-btn"
5
5
  />
6
6
 
@@ -8,7 +8,7 @@
8
8
  {{#unless shouldRefresh}}
9
9
  <Ui::ToolbarDivider />
10
10
  <Ui::ToolbarReloadButton
11
- @action={{action send "refreshPage"}}
11
+ @action={{@refreshPage}}
12
12
  class="js-toolbar-page-refresh-btn"
13
13
  />
14
14
  {{/unless}}
@@ -16,37 +16,37 @@
16
16
  <Ui::ToolbarDivider />
17
17
 
18
18
  <Ui::ToolbarSearchField
19
- @value={{this.searchValue}}
19
+ @value={{@searchValue}}
20
20
  class="js-promise-search"
21
21
  />
22
22
 
23
23
  <Ui::ToolbarDivider />
24
24
 
25
25
  <button
26
- class="{{if (eq this.filter "all") "active"}} toolbar__radio toolbar__radio--first js-filter"
27
- {{on "click" (fn this.setFilter "all")}}
26
+ class="{{if (eq @filter "all") "active"}} toolbar__radio toolbar__radio--first js-filter"
27
+ {{on "click" (fn @setFilter "all")}}
28
28
  type="button"
29
29
  >
30
30
  All
31
31
  </button>
32
32
 
33
33
  <button
34
- class="{{if (eq this.filter "rejected") "active"}} toolbar__radio js-filter"
35
- {{on "click" (fn this.setFilter "rejected")}}
34
+ class="{{if (eq @filter "rejected") "active"}} toolbar__radio js-filter"
35
+ {{on "click" (fn @setFilter "rejected")}}
36
36
  type="button"
37
37
  >
38
38
  Rejected
39
39
  </button>
40
40
  <button
41
- class="{{if (eq this.filter "pending") "active"}} toolbar__radio js-filter"
42
- {{on "click" (fn this.setFilter "pending")}}
41
+ class="{{if (eq @filter "pending") "active"}} toolbar__radio js-filter"
42
+ {{on "click" (fn @setFilter "pending")}}
43
43
  type="button"
44
44
  >
45
45
  Pending
46
46
  </button>
47
47
  <button
48
- class="{{if (eq this.filter "fulfilled") "active"}} toolbar__radio toolbar__radio--last js-filter"
49
- {{on "click" (fn this.setFilter "fullfilled")}}
48
+ class="{{if (eq @filter "fulfilled") "active"}} toolbar__radio toolbar__radio--last js-filter"
49
+ {{on "click" (fn @setFilter "fullfilled")}}
50
50
  type="button"
51
51
  >
52
52
  Fulfilled
@@ -58,8 +58,8 @@
58
58
  <label>
59
59
  <Input
60
60
  @type="checkbox"
61
- @checked={{this.instrumentWithStack}}
62
- {{on "change" (fn this.updateInstrumentWithStack (not this.instrumentWithStack))}}
61
+ @checked={{@instrumentWithStack}}
62
+ {{on "change" (fn @updateInstrumentWithStack (not @instrumentWithStack))}}
63
63
  />
64
64
  Trace promises
65
65
  </label>
@@ -0,0 +1,26 @@
1
+ <div class="toolbar">
2
+ <Ui::ToolbarSearchField
3
+ @value={{@searchValue}}
4
+ class="js-records-search"
5
+ />
6
+
7
+ <Ui::ToolbarDivider />
8
+
9
+ <button
10
+ class="{{if (is-empty @filterValue) "active"}} toolbar__radio js-filter"
11
+ {{on "click" (fn @setFilter "")}}
12
+ type="button"
13
+ >
14
+ All
15
+ </button>
16
+
17
+ {{#each @filters as |filter|}}
18
+ <button
19
+ class="{{if (eq @filterValue filter.name) "active"}} toolbar__radio js-filter"
20
+ {{on "click" (fn @setFilter filter.name)}}
21
+ type="button"
22
+ >
23
+ {{filter.desc}}
24
+ </button>
25
+ {{/each}}
26
+ </div>
@@ -0,0 +1,33 @@
1
+ <div class="toolbar">
2
+ <Ui::ToolbarClearButton
3
+ @action={{@clearProfiles}}
4
+ />
5
+
6
+ {{#unless @showEmpty}}
7
+ <Ui::ToolbarDivider />
8
+ <Ui::ToolbarReloadButton
9
+ @action={{@refreshPage}}
10
+ class="js-toolbar-page-refresh-btn"
11
+ />
12
+ {{/unless}}
13
+
14
+ <Ui::ToolbarDivider />
15
+
16
+ <Ui::ToolbarSearchField
17
+ @value={{@searchValue}}
18
+ class="js-render-profiles-search"
19
+ />
20
+ {{#if @isHighlightEnabled}}
21
+ <div class="toolbar__checkbox js-hightlight-render">
22
+ <label>
23
+ <Input
24
+ data-test-options-highlight-render
25
+ @type="checkbox"
26
+ @checked={{@shouldHighlightRender}}
27
+ {{on "change" @updateShouldHighlightRender}}
28
+ />
29
+ Highlight render
30
+ </label>
31
+ </div>
32
+ {{/if}}
33
+ </div>
@@ -17,7 +17,7 @@ export default class RouteCellName extends Component {
17
17
  get isCurrent() {
18
18
  const { currentRoute, route } = this;
19
19
 
20
- if (!currentRoute) {
20
+ if (!currentRoute || !route) {
21
21
  return false;
22
22
  }
23
23
 
@@ -3,7 +3,7 @@
3
3
  <label>
4
4
  <Input
5
5
  @type="checkbox"
6
- @checked={{this.options.hideRoutes}}
6
+ @checked={{@options.hideRoutes}}
7
7
  />
8
8
  Current Route only
9
9
  </label>
@@ -13,7 +13,7 @@
13
13
  <label title="Hide loading and error substates">
14
14
  <Input
15
15
  @type="checkbox"
16
- @checked={{this.options.hideSubstates}}
16
+ @checked={{@options.hideSubstates}}
17
17
  />
18
18
  Hide Substates
19
19
  </label>
@@ -22,7 +22,7 @@
22
22
  <Ui::ToolbarDivider />
23
23
 
24
24
  <Ui::ToolbarSearchField
25
- @value={{this.searchValue}}
25
+ @value={{@searchValue}}
26
26
  data-test-filter-views
27
27
  />
28
28
  </div>
@@ -45,7 +45,7 @@ export default class ScrollContainerComponent extends Component {
45
45
  }
46
46
 
47
47
  get scrollTarget() {
48
- return this.element.querySelector('.scroll-target');
48
+ return this.element?.querySelector('.scroll-target');
49
49
  }
50
50
 
51
51
  didRender() {
@@ -74,6 +74,8 @@ export default class ScrollContainerComponent extends Component {
74
74
  }
75
75
 
76
76
  function needsScroll(container, target) {
77
+ if (!container || !target) return false;
78
+
77
79
  let { top: containerTop, bottom: containerBottom } =
78
80
  container.getBoundingClientRect();
79
81
  let { top: targetTop, bottom: targetBottom } = target.getBoundingClientRect();
@@ -1,8 +1,6 @@
1
- import { run } from '@ember/runloop';
1
+ import { debounce } from '@ember/runloop';
2
2
  import { computed } from '@ember/object';
3
3
 
4
- const { debounce } = run;
5
-
6
4
  // Use this if you want a property to debounce
7
5
  // another property with a certain delay.
8
6
  // This means that every time this prop changes,
@@ -5,6 +5,7 @@ import debounceComputed from 'ember-inspector/computed/debounce';
5
5
  import searchMatch from 'ember-inspector/utils/search-match';
6
6
 
7
7
  export default class DeprecationsController extends Controller {
8
+ @service adapter;
8
9
  @service port;
9
10
 
10
11
  search = null;
@@ -7,9 +7,12 @@ import debounceComputed from 'ember-inspector/computed/debounce';
7
7
  import { and, equal } from '@ember/object/computed';
8
8
 
9
9
  export default Controller.extend({
10
+ port: service(),
11
+
10
12
  initialEmpty: false,
11
- modelEmpty: equal('model.length', 0),
13
+ modelEmpty: equal('model.profiles.length', 0),
12
14
  showEmpty: and('initialEmpty', 'modelEmpty'),
15
+ shouldHighlightRender: false,
13
16
 
14
17
  /**
15
18
  * Storage is needed for remembering if the user closed the warning
@@ -56,16 +59,20 @@ export default Controller.extend({
56
59
  return escapeRegExp(this.search.toLowerCase());
57
60
  }),
58
61
 
62
+ isHighlightEnabled: computed('model.isHighlightSupported', function () {
63
+ return get(this.model, 'isHighlightSupported');
64
+ }),
65
+
59
66
  filtered: computed(
60
67
  'escapedSearch',
61
- 'model.@each.name',
68
+ 'model.profiles.@each.name',
62
69
  'search',
63
70
  function () {
64
71
  if (isEmpty(this.escapedSearch)) {
65
- return this.model;
72
+ return get(this.model, 'profiles');
66
73
  }
67
74
 
68
- return this.model.filter((item) => {
75
+ return get(this.model, 'profiles').filter((item) => {
69
76
  const regExp = new RegExp(this.escapedSearch);
70
77
  return recursiveMatch(item, regExp);
71
78
  });
@@ -75,6 +82,14 @@ export default Controller.extend({
75
82
  closeWarning: action(function () {
76
83
  this.set('isWarningClosed', true);
77
84
  }),
85
+
86
+ updateShouldHighlightRender: action(function () {
87
+ const value = !this.shouldHighlightRender;
88
+ this.set('shouldHighlightRender', value);
89
+ this.port.send('render:updateShouldHighlightRender', {
90
+ shouldHighlightRender: value,
91
+ });
92
+ }),
78
93
  });
79
94
 
80
95
  function recursiveMatch(item, regExp) {
@@ -6,45 +6,48 @@ import checkCurrentRoute from 'ember-inspector/utils/check-current-route';
6
6
  import searchMatch from 'ember-inspector/utils/search-match';
7
7
  import isRouteSubstate from 'ember-inspector/utils/is-route-substate';
8
8
 
9
- export default Controller.extend({
10
- application: controller(),
11
- port: service(),
9
+ export default class RouteTreeController extends Controller {
10
+ @controller application;
11
+ @service port;
12
12
 
13
- queryParams: ['hideRoutes'],
13
+ queryParams = ['hideRoutes'];
14
14
 
15
- currentRoute: null,
16
- hideRoutes: alias('options.hideRoutes'),
17
- searchValue: '',
15
+ currentRoute = null;
18
16
 
19
- filtered: computed(
17
+ searchValue = '';
18
+
19
+ @alias('options.hideRoutes') hideRoutes;
20
+
21
+ @computed(
20
22
  'model.[]',
21
23
  'options.{hideRoutes,hideSubstates}',
22
24
  'currentRoute.{name,url}',
23
- 'searchValue',
24
- function () {
25
- return this.model.filter((routeItem) => {
26
- let currentRoute = this.currentRoute;
27
- let hideRoutes = this.get('options.hideRoutes');
28
- let hideSubstates = this.get('options.hideSubstates');
29
-
30
- if (hideRoutes && currentRoute) {
31
- return checkCurrentRoute(currentRoute, routeItem.value);
32
- }
33
-
34
- if (hideSubstates && isRouteSubstate(routeItem.value.name)) {
35
- return false;
36
- }
37
-
38
- if (!searchMatch(routeItem.value.name, this.searchValue)) {
39
- return false;
40
- }
41
-
42
- return true;
43
- });
44
- }
45
- ),
25
+ 'searchValue'
26
+ )
27
+ get filtered() {
28
+ return this.model.filter((routeItem) => {
29
+ let currentRoute = this.currentRoute;
30
+ let hideRoutes = this.get('options.hideRoutes');
31
+ let hideSubstates = this.get('options.hideSubstates');
32
+
33
+ if (hideRoutes && currentRoute) {
34
+ return checkCurrentRoute(currentRoute, routeItem.value);
35
+ }
36
+
37
+ if (hideSubstates && isRouteSubstate(routeItem.value.name)) {
38
+ return false;
39
+ }
40
+
41
+ if (!searchMatch(routeItem.value.name, this.searchValue)) {
42
+ return false;
43
+ }
44
+
45
+ return true;
46
+ });
47
+ }
46
48
 
47
- rows: computed('filtered.[]', function () {
49
+ @computed('filtered.[]')
50
+ get rows() {
48
51
  return this.filtered.map(function (route) {
49
52
  return {
50
53
  name: route,
@@ -52,36 +55,40 @@ export default Controller.extend({
52
55
  url: route,
53
56
  };
54
57
  });
55
- }),
58
+ }
56
59
 
57
60
  init() {
58
- this._super(...arguments);
61
+ super.init(...arguments);
59
62
 
60
63
  set(this, 'model', []);
61
64
  set(this, 'options', {
62
65
  hideRoutes: false,
63
66
  hideSubstates: false,
64
67
  });
65
- },
68
+ }
66
69
 
67
- inspectRoute: action(function (name) {
70
+ @action
71
+ inspectRoute(name) {
68
72
  this.port.send('objectInspector:inspectRoute', { name });
69
- }),
73
+ }
70
74
 
71
- sendRouteHandlerToConsole: action(function (name) {
75
+ @action
76
+ sendRouteHandlerToConsole(name) {
72
77
  this.port.send('objectInspector:sendRouteHandlerToConsole', { name });
73
- }),
78
+ }
74
79
 
75
- inspectController: action(function (controller) {
80
+ @action
81
+ inspectController(controller) {
76
82
  if (!controller.exists) {
77
83
  return;
78
84
  }
79
85
  this.port.send('objectInspector:inspectController', {
80
86
  name: controller.name,
81
87
  });
82
- }),
88
+ }
83
89
 
84
- sendControllerToConsole: action(function (name) {
90
+ @action
91
+ sendControllerToConsole(name) {
85
92
  this.port.send('objectInspector:sendControllerToConsole', { name });
86
- }),
87
- });
93
+ }
94
+ }