ember-inspector 4.5.11 → 4.6.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 (158) hide show
  1. package/.ember-cli +7 -1
  2. package/.eslintignore +6 -0
  3. package/.eslintrc.js +1 -3
  4. package/.github/workflows/build.yml +1 -0
  5. package/.prettierignore +4 -0
  6. package/.template-lintrc.js +0 -4
  7. package/CHANGELOG.md +43 -0
  8. package/README.md +5 -1
  9. package/app/components/component-tree-toolbar.hbs +5 -4
  10. package/app/components/container-type-toolbar.hbs +3 -5
  11. package/app/components/deprecation-item-source.hbs +28 -1
  12. package/app/components/deprecation-item-source.js +24 -12
  13. package/app/components/deprecation-item.hbs +16 -33
  14. package/app/components/deprecations-toolbar.hbs +3 -2
  15. package/app/components/list-cell.hbs +6 -3
  16. package/app/components/list-cell.js +18 -23
  17. package/app/components/list-content.hbs +2 -2
  18. package/app/components/list.hbs +5 -5
  19. package/app/components/list.js +2 -2
  20. package/app/components/object-inspector/properties-all.js +16 -17
  21. package/app/components/object-inspector/properties-base.js +13 -15
  22. package/app/components/object-inspector/properties-grouped.js +7 -9
  23. package/app/components/object-inspector.js +36 -37
  24. package/app/components/promise-item.hbs +1 -1
  25. package/app/components/promise-tree-toolbar.hbs +16 -14
  26. package/app/components/records-toolbar.hbs +7 -4
  27. package/app/components/render-item.hbs +9 -11
  28. package/app/components/render-tree-toolbar.hbs +3 -4
  29. package/app/components/route-tree-toolbar.hbs +4 -9
  30. package/app/components/side-nav.js +1 -7
  31. package/app/controllers/application.js +63 -60
  32. package/app/controllers/component-tree.js +39 -13
  33. package/app/controllers/container-type.js +26 -16
  34. package/app/controllers/container-types/index.js +6 -0
  35. package/app/controllers/container-types.js +3 -0
  36. package/app/controllers/deprecations.js +9 -9
  37. package/app/controllers/model-types.js +45 -39
  38. package/app/controllers/promise-tree.js +1 -0
  39. package/app/controllers/records.js +45 -48
  40. package/app/controllers/render-tree.js +56 -50
  41. package/app/index.html +0 -1
  42. package/app/routes/application.js +3 -16
  43. package/app/routes/container-type.js +2 -1
  44. package/app/routes/container-types.js +0 -6
  45. package/app/routes/data/index.js +2 -1
  46. package/app/routes/deprecations.js +5 -2
  47. package/app/routes/info-index.js +4 -1
  48. package/app/routes/launch.js +2 -1
  49. package/app/routes/model-type.js +4 -1
  50. package/app/routes/model-types.js +2 -5
  51. package/app/routes/render-tree.js +1 -6
  52. package/app/services/adapters/basic.js +18 -1
  53. package/app/services/adapters/web-extension.js +21 -0
  54. package/app/styles/deprecations.scss +4 -0
  55. package/app/templates/app-config.hbs +2 -2
  56. package/app/templates/container-type.hbs +1 -1
  57. package/app/templates/container-types/index.hbs +1 -1
  58. package/app/templates/container-types.hbs +1 -1
  59. package/app/templates/deprecations.hbs +10 -5
  60. package/app/templates/libraries.hbs +1 -1
  61. package/app/templates/model-types.hbs +1 -1
  62. package/app/templates/promise-tree.hbs +6 -2
  63. package/app/templates/render-tree.hbs +3 -3
  64. package/app/utils/escape-reg-exp.js +3 -1
  65. package/config/deprecation-workflow.js +0 -2
  66. package/config/ember-cli-update.json +1 -1
  67. package/config/ember-try.js +8 -0
  68. package/config/targets.js +0 -15
  69. package/dist/bookmarklet/panes-3-4-0/assets/{chunk.143.766b6dc4f6e22f21600a.js → chunk.143.87b884a2109dea570a40.js} +4 -4
  70. package/dist/{chrome/panes-3-4-0/assets/chunk.178.a8454b848db3f6224a61.js → bookmarklet/panes-3-4-0/assets/chunk.178.85404256031503a3a378.js} +4 -4
  71. package/dist/bookmarklet/panes-3-4-0/assets/chunk.916.2455f308cd244ed6a8d1.js +574 -0
  72. package/dist/{chrome/panes-3-4-0/assets/chunk.916.10195c168143dde80f98.js.LICENSE.txt → bookmarklet/panes-3-4-0/assets/chunk.916.2455f308cd244ed6a8d1.js.LICENSE.txt} +1 -1
  73. package/dist/bookmarklet/panes-3-4-0/assets/ember-inspector.css +4 -0
  74. package/dist/bookmarklet/panes-3-4-0/assets/ember-inspector.js +258 -226
  75. package/dist/bookmarklet/panes-3-4-0/assets/vendor.css +4 -0
  76. package/dist/bookmarklet/panes-3-4-0/assets/vendor.js +342 -292
  77. package/dist/bookmarklet/panes-3-4-0/ember_debug.js +40 -14
  78. package/dist/bookmarklet/panes-3-4-0/index.html +1 -2
  79. package/dist/chrome/background-script.js +1 -1
  80. package/dist/chrome/manifest.json +1 -1
  81. package/dist/chrome/panes-3-4-0/assets/{chunk.143.766b6dc4f6e22f21600a.js → chunk.143.87b884a2109dea570a40.js} +4 -4
  82. package/dist/{bookmarklet/panes-3-4-0/assets/chunk.178.a8454b848db3f6224a61.js → chrome/panes-3-4-0/assets/chunk.178.85404256031503a3a378.js} +4 -4
  83. package/dist/chrome/panes-3-4-0/assets/chunk.916.2455f308cd244ed6a8d1.js +574 -0
  84. package/dist/{firefox/panes-3-4-0/assets/chunk.916.10195c168143dde80f98.js.LICENSE.txt → chrome/panes-3-4-0/assets/chunk.916.2455f308cd244ed6a8d1.js.LICENSE.txt} +1 -1
  85. package/dist/chrome/panes-3-4-0/assets/ember-inspector.css +4 -0
  86. package/dist/chrome/panes-3-4-0/assets/ember-inspector.js +258 -226
  87. package/dist/chrome/panes-3-4-0/assets/vendor.css +4 -0
  88. package/dist/chrome/panes-3-4-0/assets/vendor.js +342 -292
  89. package/dist/chrome/panes-3-4-0/ember_debug.js +40 -14
  90. package/dist/chrome/panes-3-4-0/index.html +1 -2
  91. package/dist/firefox/background-script.js +1 -1
  92. package/dist/firefox/manifest.json +1 -1
  93. package/dist/firefox/panes-3-4-0/assets/{chunk.143.766b6dc4f6e22f21600a.js → chunk.143.87b884a2109dea570a40.js} +4 -4
  94. package/dist/firefox/panes-3-4-0/assets/{chunk.178.a8454b848db3f6224a61.js → chunk.178.85404256031503a3a378.js} +4 -4
  95. package/dist/firefox/panes-3-4-0/assets/chunk.916.2455f308cd244ed6a8d1.js +574 -0
  96. package/dist/{websocket/assets/chunk.916.10195c168143dde80f98.js.LICENSE.txt → firefox/panes-3-4-0/assets/chunk.916.2455f308cd244ed6a8d1.js.LICENSE.txt} +1 -1
  97. package/dist/firefox/panes-3-4-0/assets/ember-inspector.css +4 -0
  98. package/dist/firefox/panes-3-4-0/assets/ember-inspector.js +258 -226
  99. package/dist/firefox/panes-3-4-0/assets/vendor.css +4 -0
  100. package/dist/firefox/panes-3-4-0/assets/vendor.js +342 -292
  101. package/dist/firefox/panes-3-4-0/ember_debug.js +40 -14
  102. package/dist/firefox/panes-3-4-0/index.html +1 -2
  103. package/dist/websocket/assets/{chunk.143.766b6dc4f6e22f21600a.js → chunk.143.87b884a2109dea570a40.js} +4 -4
  104. package/dist/websocket/assets/{chunk.178.a8454b848db3f6224a61.js → chunk.178.85404256031503a3a378.js} +4 -4
  105. package/dist/websocket/assets/chunk.916.2455f308cd244ed6a8d1.js +574 -0
  106. package/dist/{bookmarklet/panes-3-4-0/assets/chunk.916.10195c168143dde80f98.js.LICENSE.txt → websocket/assets/chunk.916.2455f308cd244ed6a8d1.js.LICENSE.txt} +1 -1
  107. package/dist/websocket/assets/ember-inspector.css +4 -0
  108. package/dist/websocket/assets/ember-inspector.js +258 -226
  109. package/dist/websocket/assets/vendor.css +4 -0
  110. package/dist/websocket/assets/vendor.js +342 -292
  111. package/dist/websocket/ember_debug.js +40 -14
  112. package/dist/websocket/index.html +1 -2
  113. package/ember_debug/libs/view-inspection.js +4 -4
  114. package/ember_debug/object-inspector.js +4 -2
  115. package/ember_debug/vendor/startup-wrapper.js +30 -7
  116. package/gulpfile.js +3 -3
  117. package/lib/ui/addon/components/resizable-column.js +4 -8
  118. package/lib/ui/addon/components/toolbar-search-field.js +10 -11
  119. package/package.json +35 -36
  120. package/scripts/download-panes.js +7 -8
  121. package/skeletons/web-extension/background-script.js +1 -1
  122. package/tests/acceptance/app-picker-test.js +14 -6
  123. package/tests/acceptance/component-tree-test.js +76 -34
  124. package/tests/acceptance/container-test.js +2 -2
  125. package/tests/acceptance/data-test.js +15 -15
  126. package/tests/acceptance/deprecation-test.js +26 -11
  127. package/tests/acceptance/info-test.js +2 -2
  128. package/tests/acceptance/object-inspector-test.js +10 -10
  129. package/tests/acceptance/promise-test.js +6 -6
  130. package/tests/acceptance/render-tree-test.js +16 -8
  131. package/tests/acceptance/route-tree-test.js +12 -12
  132. package/tests/acceptance/whats-new-test.js +2 -2
  133. package/tests/ember_debug/container-debug-test.js +4 -4
  134. package/tests/ember_debug/deprecation-debug-test.js +11 -11
  135. package/tests/ember_debug/ember-debug-test.js +3 -3
  136. package/tests/ember_debug/object-inspector-test.js +175 -161
  137. package/tests/ember_debug/profile-manager-test.js +1 -1
  138. package/tests/ember_debug/profile-node-test.js +16 -12
  139. package/tests/ember_debug/promise-assembler-test.js +42 -42
  140. package/tests/ember_debug/promise-debug-test.js +22 -22
  141. package/tests/ember_debug/route-debug-test.js +26 -14
  142. package/tests/ember_debug/view-debug-test.js +27 -15
  143. package/tests/helpers/index.js +42 -0
  144. package/tests/index.html +0 -1
  145. package/tests/integration/components/basic-test.js +1 -1
  146. package/tests/integration/components/component-tree-arg-test.js +2 -2
  147. package/tests/integration/components/foo-test.js +1 -1
  148. package/tests/test-adapter.js +1 -1
  149. package/tests/test-helper.js +4 -0
  150. package/tests/unit/build-style-test.js +1 -1
  151. package/tests/unit/ms-to-time-test.js +1 -1
  152. package/tests/unit/resizable-columns-test.js +33 -29
  153. package/tests/unit/utils/parse-text-test.js +8 -4
  154. package/dist/bookmarklet/panes-3-4-0/assets/chunk.916.10195c168143dde80f98.js +0 -505
  155. package/dist/chrome/panes-3-4-0/assets/chunk.916.10195c168143dde80f98.js +0 -505
  156. package/dist/firefox/panes-3-4-0/assets/chunk.916.10195c168143dde80f98.js +0 -505
  157. package/dist/websocket/assets/chunk.916.10195c168143dde80f98.js +0 -505
  158. package/scripts/upload-panes.js +0 -56
package/.ember-cli CHANGED
@@ -5,5 +5,11 @@
5
5
 
6
6
  Setting `disableAnalytics` to true will prevent any data from being sent.
7
7
  */
8
- "disableAnalytics": false
8
+ "disableAnalytics": false,
9
+
10
+ /**
11
+ Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
12
+ rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
13
+ */
14
+ "isTypeScriptProject": false
9
15
  }
package/.eslintignore CHANGED
@@ -19,9 +19,15 @@
19
19
  # ember-try
20
20
  /.node_modules.ember-try/
21
21
  /bower.json.ember-try
22
+ /npm-shrinkwrap.json.ember-try
22
23
  /package.json.ember-try
24
+ /package-lock.json.ember-try
25
+ /yarn.lock.ember-try
23
26
 
24
27
  # ember-inspector specific
25
28
  /dist_prev/
26
29
  /skeletons/
27
30
  /ember_debug/vendor/startup-wrapper.js
31
+
32
+ # Safari build
33
+ /Ember Inspector/
package/.eslintrc.js CHANGED
@@ -33,13 +33,11 @@ module.exports = {
33
33
  'ember/avoid-leaking-state-in-ember-objects': 'off',
34
34
  'ember/classic-decorator-hooks': 'off',
35
35
  'ember/classic-decorator-no-classic-methods': 'off',
36
- 'ember/no-actions-hash': 'off',
37
36
  'ember/no-classic-classes': 'off',
38
37
  'ember/no-classic-components': 'off',
39
38
  'ember/no-component-lifecycle-hooks': 'off',
40
39
  'ember/no-computed-properties-in-native-classes': 'off',
41
40
  'ember/no-get': 'off',
42
- 'ember/no-test-import-export': 'off',
43
41
 
44
42
  // Best practice
45
43
  'no-duplicate-imports': 'error',
@@ -78,7 +76,7 @@ module.exports = {
78
76
  },
79
77
  },
80
78
  {
81
- // Test files:
79
+ // test files
82
80
  files: ['tests/**/*-test.{js,ts}'],
83
81
  extends: ['plugin:qunit/recommended'],
84
82
  rules: {
@@ -87,6 +87,7 @@ jobs:
87
87
  - ember-lts-3.16
88
88
  - ember-lts-3.20
89
89
  - ember-lts-3.24
90
+ - ember-lts-3.28
90
91
  - ember-release
91
92
  - ember-beta
92
93
  - ember-canary
package/.prettierignore CHANGED
@@ -14,8 +14,12 @@
14
14
  /coverage/
15
15
  !.*
16
16
  .eslintcache
17
+ .lint-todo/
17
18
 
18
19
  # ember-try
19
20
  /.node_modules.ember-try/
20
21
  /bower.json.ember-try
22
+ /npm-shrinkwrap.json.ember-try
21
23
  /package.json.ember-try
24
+ /package-lock.json.ember-try
25
+ /yarn.lock.ember-try
@@ -7,10 +7,6 @@ module.exports = {
7
7
  'no-negated-condition': false,
8
8
 
9
9
  // TODO: enable these rules
10
- 'no-action': false,
11
- 'no-implicit-this': false,
12
- 'no-inline-styles': false,
13
10
  'no-positive-tabindex': false,
14
- 'table-groups': false,
15
11
  },
16
12
  };
package/CHANGELOG.md CHANGED
@@ -8,6 +8,49 @@
8
8
 
9
9
 
10
10
 
11
+
12
+ ## v4.6.0 (2022-08-17)
13
+
14
+ #### :rocket: Enhancement
15
+ * [#2040](https://github.com/emberjs/ember-inspector/pull/2040) do not close the object inspector ([@patricklx](https://github.com/patricklx))
16
+ * [#1905](https://github.com/emberjs/ember-inspector/pull/1905) enhancement(view-inspection): increased z-index for highlight and tooltip ([@andrewmnlv](https://github.com/andrewmnlv))
17
+ * [#1959](https://github.com/emberjs/ember-inspector/pull/1959) component-tree: make left/right arrow nav in certain conditions (Closes [#1537](https://github.com/emberjs/ember-inspector/issues/1537)) ([@geneukum](https://github.com/geneukum))
18
+
19
+ #### :bug: Bug Fix
20
+ * [#2051](https://github.com/emberjs/ember-inspector/pull/2051) fix loading ember-inspector after reload ([@patricklx](https://github.com/patricklx))
21
+ * [#2052](https://github.com/emberjs/ember-inspector/pull/2052) fix component tree item show ([@patricklx](https://github.com/patricklx))
22
+ * [#2043](https://github.com/emberjs/ember-inspector/pull/2043) bring back the inspect component context menu functionality ([@patricklx](https://github.com/patricklx))
23
+ * [#2008](https://github.com/emberjs/ember-inspector/pull/2008) Deprecation toolbar clear btn does not clear deprecations ([@geneukum](https://github.com/geneukum))
24
+ * [#1940](https://github.com/emberjs/ember-inspector/pull/1940) Remove support for the TargetActionSupport mixin ([@Windvis](https://github.com/Windvis))
25
+
26
+ #### :house: Internal
27
+ * [#2103](https://github.com/emberjs/ember-inspector/pull/2103) Remove automated uploads ([@rwwagner90](https://github.com/rwwagner90))
28
+ * [#2101](https://github.com/emberjs/ember-inspector/pull/2101) Download panes from GitHub instead of S3 ([@rwwagner90](https://github.com/rwwagner90))
29
+ * [#2054](https://github.com/emberjs/ember-inspector/pull/2054) Convert controllers to native classes ([@rwwagner90](https://github.com/rwwagner90))
30
+ * [#2053](https://github.com/emberjs/ember-inspector/pull/2053) Convert ToolbarSearchField to glimmer ([@rwwagner90](https://github.com/rwwagner90))
31
+ * [#2041](https://github.com/emberjs/ember-inspector/pull/2041) ember-cli 4.4.0, fix some lint ([@rwwagner90](https://github.com/rwwagner90))
32
+ * [#1998](https://github.com/emberjs/ember-inspector/pull/1998) list-cell: convert to glimmer ([@geneukum](https://github.com/geneukum))
33
+ * [#1990](https://github.com/emberjs/ember-inspector/pull/1990) resizable-column: convert to glimmer ([@geneukum](https://github.com/geneukum))
34
+ * [#1991](https://github.com/emberjs/ember-inspector/pull/1991) object-inspector-test: fix legacy-attribute-arguments issue ([@geneukum](https://github.com/geneukum))
35
+ * [#1987](https://github.com/emberjs/ember-inspector/pull/1987) render-item: fixup no-curly-component-invocation ([@geneukum](https://github.com/geneukum))
36
+ * [#1988](https://github.com/emberjs/ember-inspector/pull/1988) eslintrc: enable 'no-actions-hash' lint rule ([@geneukum](https://github.com/geneukum))
37
+ * [#1989](https://github.com/emberjs/ember-inspector/pull/1989) eslintrc: enable no-test-import-export rule ([@geneukum](https://github.com/geneukum))
38
+ * [#1973](https://github.com/emberjs/ember-inspector/pull/1973) deprecations: resolve instances of this-property-fallback ([@geneukum](https://github.com/geneukum))
39
+ * [#1976](https://github.com/emberjs/ember-inspector/pull/1976) deprecations: fixup instances of no-inline-styles ([@geneukum](https://github.com/geneukum))
40
+ * [#1974](https://github.com/emberjs/ember-inspector/pull/1974) deprecations: fix instances of routing-transition-methods ([@geneukum](https://github.com/geneukum))
41
+ * [#1975](https://github.com/emberjs/ember-inspector/pull/1975) list: fixup dot access for run.bind deprecation ([@geneukum](https://github.com/geneukum))
42
+ * [#1972](https://github.com/emberjs/ember-inspector/pull/1972) properties-base, properties-grouped, properties-all: octane/glimmer upgrade ([@geneukum](https://github.com/geneukum))
43
+ * [#1961](https://github.com/emberjs/ember-inspector/pull/1961) object-inspector: migrate to glimmer component ([@geneukum](https://github.com/geneukum))
44
+ * [#1906](https://github.com/emberjs/ember-inspector/pull/1906) octane migration - deprecation-item-source ([@michaelbdai](https://github.com/michaelbdai))
45
+
46
+ #### Committers: 6
47
+ - Bing Dai ([@michaelbdai](https://github.com/michaelbdai))
48
+ - Geordan Neukum ([@geneukum](https://github.com/geneukum))
49
+ - Robert Wagner ([@rwwagner90](https://github.com/rwwagner90))
50
+ - Sam Van Campenhout ([@Windvis](https://github.com/Windvis))
51
+ - [@andrewmnlv](https://github.com/andrewmnlv)
52
+ - [@patricklx](https://github.com/patricklx)
53
+
11
54
  ## v4.5.11 (2021-12-27)
12
55
 
13
56
  #### :bug: Bug Fix
package/README.md CHANGED
@@ -120,7 +120,11 @@ Here are the steps to lock an inspector version:
120
120
  - Create a new branch (from `stable`) named after the Ember version range that will be supported by this branch. The min version in the range is the first element in the `emberVersionsSupported` array in `package.json`. The max version in the range is the first version that will *not* be supported. For example, a branch named `ember-0.0.0-2.7.0` means it supports Ember 0.0.0 -> 2.6.0, and a branch named `ember-2.7.0-3.4.0` means it supports Ember 2.7.0 -> Ember 3.3.2.
121
121
  - Update `package.json`'s `emberVersionsSupported`: add a second element that indicates the minimum Ember version the `master` branch *will not* support.
122
122
  - Commit the branch.
123
- - Run `yarn lock-version`. This will build, compress, and upload this version to S3.
123
+ - Run `yarn lock-version`. This will build, and compress the panes.
124
+ - To upload the panes to GitHub:
125
+ - Create a folder locally with the naming convention `panes-x-x-x`
126
+ - Copy the 3 zip files (chrome.zip, firefox.zip, and bookmarklet.zip) into the folder you just created.
127
+ - Go to https://github.com/emberjs/ember-inspector/upload/panes and drag the folder in to upload it.
124
128
  - Checkout the `master` branch.
125
129
  - Update `package.json`'s `previousEmberVersionsSupported`: add the first Ember version supported by the recently locked snapshot (the first element in the `emberVersionsSupported` array).
126
130
  - Update `package.json`'s `emberVersionsSupported`: Take the last element from `previousEmberVersionsSupported` and set it as the first element in this array. Set an empty string as the second element to indicate there's currently no maximum Ember version supported yet. `emberVersionsSupported` array length should always be `2` indicating a [min, max] range.
@@ -1,8 +1,8 @@
1
1
  <div class="toolbar">
2
2
  <button
3
3
  class="{{if @isInspecting "active"}} toolbar__icon-button"
4
- {{on "click" @toggleInspect}}
5
4
  type="button"
5
+ {{on "click" @toggleInspect}}
6
6
  >
7
7
  {{svg-jar "inspect" width="16px" height="17px"}}
8
8
  </button>
@@ -12,8 +12,8 @@
12
12
  <button
13
13
  class="toolbar__icon-button"
14
14
  title="expand all"
15
- {{on "click" @expandAll}}
16
15
  type="button"
16
+ {{on "click" @expandAll}}
17
17
  >
18
18
  {{svg-jar "chevron-down" width="16px" height="16px"}}
19
19
  </button>
@@ -21,8 +21,8 @@
21
21
  <button
22
22
  class="toolbar__icon-button"
23
23
  title="collapse all"
24
- {{on "click" @collapseAll}}
25
24
  type="button"
25
+ {{on "click" @collapseAll}}
26
26
  >
27
27
  {{svg-jar "chevron-right" width="16px" height="16px"}}
28
28
  </button>
@@ -30,7 +30,8 @@
30
30
  <Ui::ToolbarDivider />
31
31
 
32
32
  <Ui::ToolbarSearchField
33
+ @clear={{fn (mut @query)}}
33
34
  @value={{@query}}
34
35
  data-test-filter-views
35
36
  />
36
- </div>
37
+ </div>
@@ -1,8 +1,5 @@
1
1
  <div class="toolbar">
2
- <Ui::ToolbarReloadButton
3
- @action={{@reload}}
4
- data-test-reload-container-btn
5
- />
2
+ <Ui::ToolbarReloadButton @action={{@reload}} data-test-reload-container-btn />
6
3
 
7
4
  <Ui::ToolbarDivider />
8
5
 
@@ -11,7 +8,8 @@
11
8
  <Ui::ToolbarDivider />
12
9
 
13
10
  <Ui::ToolbarSearchField
11
+ @clear={{fn (mut @searchValue)}}
14
12
  @value={{@searchValue}}
15
13
  data-test-container-instance-search
16
14
  />
17
- </div>
15
+ </div>
@@ -1 +1,28 @@
1
- {{yield this}}
1
+ <div class="deprecation-source pb-2" data-test-deprecation-source>
2
+ <button
3
+ class="send-to-console send-to-console--chevron-only mr-3"
4
+ title="Trace deprecations in console"
5
+ data-test-trace-deprecations-btn
6
+ {{on "click" this.handleClick}}
7
+ type="button"
8
+ >
9
+ {{svg-jar "send-with-chevron" width="6px" height="9px"}}
10
+ Trace in the Console
11
+ </button>
12
+ <span class="source">
13
+ {{#if this.isClickable}}
14
+ <a
15
+ class="font-mono"
16
+ href="#"
17
+ data-test-deprecation-source-link
18
+ {{on "click" this.handleRedirect}}
19
+ >
20
+ {{this.url}}
21
+ </a>
22
+ {{else}}
23
+ <span class="font-mono" data-test-deprecation-source-text>
24
+ {{this.url}}
25
+ </span>
26
+ {{/if}}
27
+ </span>
28
+ </div>
@@ -1,26 +1,38 @@
1
- import { tagName } from '@ember-decorators/component';
2
- import { computed, get } from '@ember/object';
1
+ import { action } from '@ember/object';
3
2
  import { inject as service } from '@ember/service';
4
- import { and, readOnly, bool } from '@ember/object/computed';
5
- import Component from '@ember/component';
6
3
 
7
- @tagName('')
4
+ import Component from '@glimmer/component';
8
5
  export default class DeprecationItemSource extends Component {
9
6
  @service port;
10
7
 
11
- @bool('model.map.source') known;
12
-
13
- @computed('model.map.{line,source}', 'known')
14
8
  get url() {
15
- let source = get(this, 'model.map.source');
9
+ let source = this.args.itemModel?.map.source;
16
10
  if (this.known) {
17
- return `${source}:${get(this, 'model.map.line')}`;
11
+ return `${source}:${this.args.itemModel?.map.line}`;
18
12
  } else {
19
13
  return 'Unkown source';
20
14
  }
21
15
  }
22
16
 
23
- @readOnly('port.adapter') adapter;
17
+ get adapter() {
18
+ return this.port.adapter;
19
+ }
24
20
 
25
- @and('known', 'adapter.canOpenResource') isClickable;
21
+ get isClickable() {
22
+ return this.known && this.adapter.canOpenResource;
23
+ }
24
+
25
+ get known() {
26
+ return this.args.itemModel?.map.source;
27
+ }
28
+
29
+ @action
30
+ handleClick() {
31
+ this.args.traceSource?.(this.args.modelGroup, this.args.itemModel);
32
+ }
33
+
34
+ @action
35
+ handleRedirect() {
36
+ this.args.openResource?.(this.args.itemModel?.map);
37
+ }
26
38
  }
@@ -1,3 +1,4 @@
1
+ {{! template-lint-disable require-presentational-children }}
1
2
  <Ui::Disclosure as |disclosure|>
2
3
  <div class="deprecation-item px-3 text-lg" data-test-deprecation-item>
3
4
  <div class="flex items-center">
@@ -28,8 +29,8 @@
28
29
  class="send-to-console send-to-console--chevron-only mr-2"
29
30
  title="Trace deprecations in console"
30
31
  data-test-full-trace-deprecations-btn
31
- {{on "click" (fn @traceDeprecations @model)}}
32
32
  type="button"
33
+ {{on "click" (fn @traceDeprecations @model)}}
33
34
  >
34
35
  {{svg-jar "send-with-chevron" width="6px" height="9px"}}
35
36
  Trace in the Console
@@ -40,46 +41,28 @@
40
41
  <a
41
42
  href={{@model.url}}
42
43
  class="flex items-center flex-shrink-0 py-1 px-2 rounded no-underline bg-base02"
43
- target="_blank" rel="noopener noreferrer"
44
+ target="_blank"
45
+ rel="noopener noreferrer"
44
46
  >
45
47
  Transition Plan
46
- {{svg-jar "external-link" width="16px" height="16px" class="ml-1 external-link"}}
48
+ {{svg-jar
49
+ "external-link"
50
+ width="16px"
51
+ height="16px"
52
+ class="ml-1 external-link"
53
+ }}
47
54
  </a>
48
55
  {{/if}}
49
56
  </div>
50
57
 
51
58
  {{#if (and @model.hasSourceMap disclosure.isExpanded)}}
52
59
  {{#each @model.sources as |single|}}
53
- <DeprecationItemSource @model={{single}} as |source|>
54
- <div class="deprecation-source pb-2" data-test-deprecation-source>
55
- <button
56
- class="send-to-console send-to-console--chevron-only mr-3"
57
- title="Trace deprecations in console"
58
- data-test-trace-deprecations-btn
59
- {{on "click" (fn @traceSource @model source.model)}}
60
- type="button"
61
- >
62
- {{svg-jar "send-with-chevron" width="6px" height="9px"}}
63
- Trace in the Console
64
- </button>
65
- <span class="source">
66
- {{#if source.isClickable}}
67
- <a
68
- class="font-mono"
69
- href="#"
70
- data-test-deprecation-source-link
71
- {{on "click" (fn @openResource source.model.map)}}
72
- >
73
- {{source.url}}
74
- </a>
75
- {{else}}
76
- <span class="font-mono" data-test-deprecation-source-text>
77
- {{source.url}}
78
- </span>
79
- {{/if}}
80
- </span>
81
- </div>
82
- </DeprecationItemSource>
60
+ <DeprecationItemSource
61
+ @itemModel={{single}}
62
+ @modelGroup={{@model}}
63
+ @traceSource={{@traceSource}}
64
+ @openResource={{@openResource}}
65
+ />
83
66
  {{/each}}
84
67
  {{/if}}
85
68
  </div>
@@ -1,5 +1,5 @@
1
1
  <div class="toolbar">
2
- <Ui::ToolbarClearButton @action={{@clear}} />
2
+ <Ui::ToolbarClearButton @action={{@clear}} data-test-deprecations-clear />
3
3
 
4
4
  <Ui::ToolbarDivider />
5
5
 
@@ -17,7 +17,8 @@
17
17
  <Ui::ToolbarDivider />
18
18
 
19
19
  <Ui::ToolbarSearchField
20
+ @clear={{fn (mut @searchValue)}}
20
21
  @value={{@searchValue}}
21
22
  data-test-deprecations-search
22
23
  />
23
- </div>
24
+ </div>
@@ -1,9 +1,12 @@
1
1
  <td
2
- class="list__cell {{if this.clickable "list__cell_clickable"}} {{
3
- if this.highlight "list__cell_highlight"
4
- }}"
2
+ class="list__cell
3
+ {{if this.clickable 'list__cell_clickable'}}
4
+ {{if this.highlight 'list__cell_highlight'}}"
5
+ role="button"
5
6
  style={{this.safeStyle}}
6
7
  title={{this.title}}
8
+ {{on "click" this.click}}
9
+ ...attributes
7
10
  >
8
11
  {{yield}}
9
12
  </td>
@@ -1,5 +1,3 @@
1
- import { tagName } from '@ember-decorators/component';
2
- import { computed } from '@ember/object';
3
1
  /**
4
2
  * An individual cell for the `list` table.
5
3
  * Usually not called directly but as a contextual helper.
@@ -16,11 +14,10 @@ import { computed } from '@ember/object';
16
14
  * </List>
17
15
  * ```
18
16
  */
19
- import Component from '@ember/component';
20
-
17
+ import Component from '@glimmer/component';
18
+ import { action } from '@ember/object';
21
19
  import { htmlSafe } from '@ember/template';
22
20
 
23
- @tagName('')
24
21
  export default class ListCell extends Component {
25
22
  /**
26
23
  * Avoid unsafe style warning. This property does not
@@ -29,7 +26,6 @@ export default class ListCell extends Component {
29
26
  * @property safeStyle
30
27
  * @type {SafeString}
31
28
  */
32
- @computed('style')
33
29
  get safeStyle() {
34
30
  return htmlSafe(this.style);
35
31
  }
@@ -41,7 +37,9 @@ export default class ListCell extends Component {
41
37
  * @type {String}
42
38
  * @default null
43
39
  */
44
- title = null;
40
+ get title() {
41
+ return this.args.title ?? null;
42
+ }
45
43
 
46
44
  /**
47
45
  * The `style` attribute of the DOM element.
@@ -50,7 +48,9 @@ export default class ListCell extends Component {
50
48
  * @type {String}
51
49
  * @default null
52
50
  */
53
- style = null;
51
+ get style() {
52
+ return this.args.style ?? null;
53
+ }
54
54
 
55
55
  /**
56
56
  * Cells can be clickable. One example would be clicking Data records to
@@ -61,7 +61,9 @@ export default class ListCell extends Component {
61
61
  * @type {Boolean}
62
62
  * @default false
63
63
  */
64
- clickable = false;
64
+ get clickable() {
65
+ return this.args.clickable ?? false;
66
+ }
65
67
 
66
68
  /**
67
69
  * Set this property to `true` to highlight the cell. For example
@@ -71,25 +73,18 @@ export default class ListCell extends Component {
71
73
  * @type {Boolean}
72
74
  * @default false
73
75
  */
74
- highlight = false;
75
-
76
- /**
77
- * Action to trigger when the cell is clicked.
78
- * Pass the action through the template using the `action`
79
- * helper.
80
- *
81
- * @property on-click
82
- * @type {Function}
83
- */
84
- 'on-click'() {}
76
+ get highlight() {
77
+ return this.args.highlight ?? false;
78
+ }
85
79
 
86
80
  /**
87
- * DOM event triggered when cell is clicked.
88
- * Calls the `on-click` action (if set).
81
+ * Action triggered when cell is clicked.
82
+ * Calls the `on-click` argument (if set).
89
83
  *
90
84
  * @method click
91
85
  */
86
+ @action
92
87
  click() {
93
- this['on-click']();
88
+ this.args['on-click']?.();
94
89
  }
95
90
  }
@@ -2,11 +2,11 @@
2
2
  <div class="list__table-container">
3
3
  <table>
4
4
  <colgroup>
5
- {{#each columns as |column|}}
5
+ {{#each this.columns as |column|}}
6
6
  <col style={{build-style width=(concat column.width "px")}} />
7
7
  {{/each}}
8
8
  </colgroup>
9
- {{yield (hash rowEvents=rowEvents)}}
9
+ {{yield (hash rowEvents=this.rowEvents)}}
10
10
  </table>
11
11
  </div>
12
12
  </div>
@@ -1,15 +1,15 @@
1
- {{#if schema.columns.length}}
1
+ {{#if this.schema.columns.length}}
2
2
  <div class="list__header">
3
3
  <div class="list__table-container">
4
4
  <table>
5
5
  <colgroup>
6
- {{#each columns key="id" as |column|}}
6
+ {{#each this.columns key="id" as |column|}}
7
7
  <col style={{build-style width=(concat column.width "px")}}>
8
8
  {{/each}}
9
9
  </colgroup>
10
10
  <tbody>
11
11
  <tr class="list__row">
12
- {{#each columns key="id" as |column|}}
12
+ {{#each this.columns key="id" as |column|}}
13
13
  <ListCell
14
14
  class="js-header-column"
15
15
  @tagName="th"
@@ -40,8 +40,8 @@
40
40
  }}
41
41
  </ListContent>
42
42
 
43
- {{#each columns key="id" as |column|}}
44
- {{#if (and column.visible (not-eq column columns.lastObject))}}
43
+ {{#each this.columns key="id" as |column|}}
44
+ {{#if (and column.visible (not-eq column this.columns.lastObject))}}
45
45
  <Ui::DragHandle
46
46
  @faded={{true}}
47
47
  @left={{column.left}}
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable ember/require-tagless-components */
2
2
  import Component from '@ember/component';
3
- import { run, scheduleOnce } from '@ember/runloop';
3
+ import { bind, scheduleOnce } from '@ember/runloop';
4
4
  import { task, timeout } from 'ember-concurrency';
5
5
  import ResizableColumns from 'ember-inspector/libs/resizable-columns';
6
6
  import { inject as service } from '@ember/service';
@@ -165,7 +165,7 @@ export default Component.extend({
165
165
  arr.push({
166
166
  name,
167
167
  title: name,
168
- fn: run.bind(this, this.toggleColumnVisibility, id),
168
+ fn: bind(this, this.toggleColumnVisibility, id),
169
169
  });
170
170
  return arr;
171
171
  }, []);
@@ -1,4 +1,4 @@
1
- import { action, computed } from '@ember/object';
1
+ import { action } from '@ember/object';
2
2
  import { inject as service } from '@ember/service';
3
3
  import PropertiesBase from 'ember-inspector/components/object-inspector/properties-base';
4
4
 
@@ -8,31 +8,30 @@ const findMixin = function (mixins, property) {
8
8
  });
9
9
  };
10
10
 
11
- export default PropertiesBase.extend({
12
- port: service(),
11
+ export default class PropertiesAll extends PropertiesBase {
12
+ @service port;
13
13
 
14
- tagName: '',
15
-
16
- calculate: action(function (property) {
17
- const mixin = findMixin(this.get('model.mixins'), property);
14
+ @action calculate(property) {
15
+ const mixin = findMixin(this.args.model.mixins, property);
18
16
 
19
17
  this.port.send('objectInspector:calculate', {
20
- objectId: this.model.objectId,
21
- mixinIndex: this.get('model.mixins').indexOf(mixin),
18
+ objectId: this.args.model.objectId,
19
+ mixinIndex: this.args.model.mixins.indexOf(mixin),
22
20
  property: property.name,
23
21
  });
24
- }),
22
+ }
25
23
 
26
- flatPropertyList: computed('customFilter', 'model.mixins', function () {
27
- const props = this.get('model.mixins').map(function (mixin) {
24
+ get flatPropertyList() {
25
+ const props = this.args.model.mixins.map(function (mixin) {
28
26
  return mixin.properties.filter(function (p) {
29
- let shoulApplyCustomFilter = this.customFilter
30
- ? p.name.toLowerCase().indexOf(this.customFilter.toLowerCase()) > -1
27
+ let shouldApplyCustomFilter = this.args.customFilter
28
+ ? p.name.toLowerCase().indexOf(this.args.customFilter.toLowerCase()) >
29
+ -1
31
30
  : true;
32
- return !p.hasOwnProperty('overridden') && shoulApplyCustomFilter;
31
+ return !p.hasOwnProperty('overridden') && shouldApplyCustomFilter;
33
32
  }, this);
34
33
  }, this);
35
34
 
36
35
  return props.flat();
37
- }),
38
- });
36
+ }
37
+ }