ember-inspector 4.13.1 → 4.15.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.
- package/.ember-cli +1 -9
- package/.github/workflows/build.yml +33 -112
- package/.github/workflows/plan-release.yml +26 -48
- package/.github/workflows/publish.yml +129 -31
- package/.prettierignore +2 -13
- package/.prettierrc.js +10 -4
- package/.release-plan.json +13 -4
- package/.stylelintignore +8 -0
- package/.stylelintrc.js +10 -1
- package/.template-lintrc.js +2 -1
- package/.tool-versions +2 -2
- package/.watchmanconfig +1 -1
- package/CHANGELOG.md +137 -0
- package/DEVELOPMENT.md +50 -0
- package/PRIVACY.md +3 -0
- package/README.md +14 -50
- package/RELEASE.md +15 -50
- package/app/components/app-picker.hbs +2 -2
- package/app/components/component-tree-item.hbs +14 -14
- package/app/components/component-tree-toolbar.hbs +17 -3
- package/app/components/{date-property-field.js → date-property-field.ts} +6 -5
- package/app/components/deprecation-item-source.hbs +1 -1
- package/app/components/deprecation-item.hbs +1 -1
- package/app/components/deprecations-toolbar.hbs +1 -1
- package/app/components/item-types.hbs +7 -7
- package/app/components/list-cell.hbs +3 -3
- package/app/components/list-content.hbs +4 -3
- package/app/components/list-content.ts +96 -0
- package/app/components/list.hbs +3 -3
- package/app/components/list.js +7 -7
- package/app/components/model-types-toolbar.hbs +3 -3
- package/app/components/object-inspector/component-parents.hbs +33 -0
- package/app/components/object-inspector/component-parents.js +43 -0
- package/app/components/object-inspector/dependent-keys.hbs +4 -4
- package/app/components/object-inspector/errors.hbs +4 -4
- package/app/components/object-inspector/properties-all.hbs +1 -1
- package/app/components/object-inspector/properties-base.js +2 -0
- package/app/components/object-inspector/properties-grouped.hbs +5 -5
- package/app/components/object-inspector/property.hbs +36 -34
- package/app/components/object-inspector/property.ts +34 -17
- package/app/components/object-inspector/sort-properties.js +12 -4
- package/app/components/object-inspector/toggle.hbs +9 -0
- package/app/components/object-inspector/toggle.js +6 -0
- package/app/components/object-inspector.hbs +11 -9
- package/app/components/object-inspector.js +1 -1
- package/app/components/promise-item.hbs +11 -11
- package/app/components/promise-item.js +8 -6
- package/app/components/promise-tree-toolbar.hbs +5 -5
- package/app/components/records-toolbar.hbs +2 -2
- package/app/components/render-item.hbs +4 -4
- package/app/components/render-item.ts +12 -9
- package/app/components/render-tree-toolbar.hbs +1 -1
- package/app/components/route-cell-name.hbs +1 -1
- package/app/components/route-cell-name.js +3 -2
- package/app/components/route-tree-toolbar.hbs +2 -2
- package/app/components/scroll-container.js +2 -0
- package/app/components/side-nav.hbs +5 -5
- package/app/components/side-nav.js +1 -1
- package/{lib/ui/addon/components → app/components/ui}/drag-handle.hbs +4 -4
- package/{lib/ui/addon/components → app/components/ui}/drag-handle.js +3 -1
- package/{lib/ui/addon/components → app/components/ui}/empty-message.hbs +1 -1
- package/{lib/ui/addon/components → app/components/ui}/error-page.hbs +3 -3
- package/{lib/ui/addon/components → app/components/ui}/resizable-column.js +1 -1
- package/{lib/ui/addon/components → app/components/ui}/toolbar-clear-button.hbs +1 -1
- package/{lib/ui/addon/components → app/components/ui}/toolbar-reload-button.hbs +1 -1
- package/{lib/ui/addon/components → app/components/ui}/toolbar-search-field.hbs +2 -2
- package/app/computed/{debounce.js → debounce.ts} +7 -5
- package/app/config/environment.d.ts +5 -2
- package/app/controllers/app-config.js +1 -0
- package/app/controllers/application.js +36 -71
- package/app/controllers/component-tree.js +26 -7
- package/app/controllers/container-type.js +2 -1
- package/app/controllers/container-types/{index.js → index.ts} +5 -2
- package/app/controllers/container-types.js +3 -6
- package/app/controllers/deprecations.js +16 -11
- package/app/controllers/libraries.js +1 -0
- package/app/controllers/model-types.js +7 -13
- package/app/controllers/promise-tree.ts +149 -0
- package/app/controllers/records.js +18 -26
- package/app/controllers/{render-tree.js → render-tree.ts} +54 -45
- package/app/controllers/route-tree.js +7 -5
- package/app/helpers/build-style.js +1 -1
- package/app/index.html +1 -19
- package/app/initializers/setup.js +1 -1
- package/app/libs/promise-assembler.ts +249 -0
- package/app/libs/resizable-columns.js +10 -10
- package/app/models/{promise.js → promise.ts} +72 -69
- package/app/{router.js → router.ts} +1 -1
- package/app/routes/app-detected.js +3 -5
- package/app/routes/application.js +9 -13
- package/app/routes/deprecations.js +7 -16
- package/app/routes/launch.js +2 -1
- package/app/routes/libraries.js +2 -1
- package/app/routes/model-type.js +2 -3
- package/app/routes/model-types.ts +57 -0
- package/app/routes/promise-tree.ts +63 -0
- package/app/routes/records.ts +78 -0
- package/app/routes/render-tree.ts +93 -0
- package/app/routes/route-tree.js +0 -1
- package/app/routes/{tab.js → tab.ts} +9 -2
- package/app/routes/whats-new.js +6 -4
- package/app/services/adapters/{basic.js → basic.ts} +36 -30
- package/app/services/adapters/{bookmarklet.js → bookmarklet.ts} +17 -24
- package/app/services/adapters/{chrome.js → chrome.ts} +1 -2
- package/app/services/adapters/{web-extension.js → web-extension.ts} +46 -46
- package/app/services/adapters/websocket.ts +40 -0
- package/app/services/layout.ts +124 -0
- package/app/services/port.ts +195 -0
- package/app/services/storage/{local.js → local.ts} +7 -20
- package/app/services/storage/{memory.js → memory.ts} +6 -21
- package/app/services/{storage.js → storage.ts} +25 -23
- package/app/styles/app.scss +1 -0
- package/app/styles/base.scss +6 -2
- package/app/styles/colors.scss +33 -31
- package/app/styles/component_tree.scss +56 -51
- package/app/styles/dropdown.scss +2 -2
- package/app/styles/ember-table.scss +3 -3
- package/app/styles/mixin.scss +26 -26
- package/app/styles/object_inspector.scss +30 -21
- package/{lib/ui/addon/styles → app/styles/ui}/_disclosure-triangle.scss +3 -1
- package/{lib/ui/addon/styles → app/styles/ui}/_drag-handle.scss +7 -7
- package/{lib/ui/addon/styles → app/styles/ui}/_empty-message.scss +1 -1
- package/{lib/ui/addon/styles → app/styles/ui}/_error-page.scss +8 -7
- package/{lib/ui/addon/styles → app/styles/ui}/_list.scss +46 -45
- package/{lib/ui/addon/styles → app/styles/ui}/_nav.scss +29 -27
- package/app/styles/ui/_object-inspector-toggle.scss +4 -0
- package/{lib/ui/addon/styles → app/styles/ui}/_pill.scss +4 -4
- package/{lib/ui/addon/styles → app/styles/ui}/_send-to-console.scss +1 -1
- package/{lib/ui/addon/styles → app/styles/ui}/_split.scss +26 -20
- package/app/styles/ui/_ui.scss +13 -0
- package/{lib/ui/addon/styles → app/styles/ui}/toolbar/_checkbox.scss +5 -5
- package/app/styles/ui/toolbar/_icon-button.scss +80 -0
- package/{lib/ui/addon/styles → app/styles/ui}/toolbar/_index.scss +6 -5
- package/{lib/ui/addon/styles → app/styles/ui}/toolbar/_radio.scss +10 -10
- package/{lib/ui/addon/styles → app/styles/ui}/toolbar/_search.scss +5 -3
- package/app/styles/utils.scss +408 -122
- package/app/templates/application.hbs +22 -19
- package/app/templates/component-tree.hbs +4 -1
- package/app/templates/deprecations.hbs +2 -3
- package/app/templates/info.hbs +10 -10
- package/app/templates/promise-tree.hbs +1 -1
- package/app/templates/render-tree.hbs +1 -1
- package/app/templates/route-tree.hbs +1 -1
- package/app/utils/escape-reg-exp.ts +3 -2
- package/app/utils/nullish.ts +7 -0
- package/app/utils/parse-text.ts +4 -5
- package/app/utils/truncate.js +0 -1
- package/config/ember-cli-update.json +5 -3
- package/config/ember-try.js +117 -72
- package/config/environment.js +1 -1
- package/config/optional-features.json +2 -1
- package/dist/bookmarklet/load_inspector.js +31 -11
- package/dist/bookmarklet/panes-3-16-0/assets/chunk.443.86a005e528b587663b78.js +1135 -0
- package/dist/bookmarklet/panes-3-16-0/assets/chunk.443.86a005e528b587663b78.js.LICENSE.txt +18 -0
- package/dist/bookmarklet/panes-3-16-0/assets/chunk.524.aca67dc376e8cd35b522.js +40 -0
- package/dist/bookmarklet/panes-3-16-0/assets/chunk.582.d3d80e94c4f59dc3b65d.js +42 -0
- package/dist/bookmarklet/panes-3-16-0/assets/ember-inspector.css +997 -156
- package/dist/bookmarklet/panes-3-16-0/assets/ember-inspector.js +560 -613
- package/dist/bookmarklet/panes-3-16-0/assets/svg/ellipsis.svg +3 -3
- package/dist/bookmarklet/panes-3-16-0/assets/svg/focus-point-round.svg +9 -0
- package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-bug.svg +1 -1
- package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-components.svg +2 -2
- package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-container.svg +1 -1
- package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-data.svg +1 -1
- package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-deprecations.svg +3 -3
- package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-info.svg +3 -3
- package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-promises.svg +2 -2
- package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-render-performance.svg +2 -2
- package/dist/bookmarklet/panes-3-16-0/assets/svg/nav-route-tree.svg +7 -7
- package/dist/bookmarklet/panes-3-16-0/assets/svg/sidebar-toggle-trailing.svg +9 -0
- package/dist/bookmarklet/panes-3-16-0/assets/vendor.css +4 -841
- package/dist/bookmarklet/panes-3-16-0/assets/vendor.js +4277 -5152
- package/dist/bookmarklet/panes-3-16-0/base-object-HAEdWjmg.js +59 -0
- package/dist/bookmarklet/panes-3-16-0/basic-B1dkgN3d.js +149 -0
- package/dist/bookmarklet/panes-3-16-0/basic-debug.js +10 -0
- package/dist/bookmarklet/panes-3-16-0/bookmarklet-BZWtwuX-.js +32 -0
- package/dist/bookmarklet/panes-3-16-0/bookmarklet-debug.js +10 -0
- package/dist/bookmarklet/panes-3-16-0/chrome-P6FSEUf1.js +10 -0
- package/dist/bookmarklet/panes-3-16-0/chrome-debug.js +10 -0
- package/dist/bookmarklet/panes-3-16-0/ember.js +166 -0
- package/dist/bookmarklet/panes-3-16-0/ember_debug.js +7 -11018
- package/dist/bookmarklet/panes-3-16-0/evented-BCTya3yE.js +62 -0
- package/dist/bookmarklet/panes-3-16-0/firefox-8F84zphP.js +30 -0
- package/dist/bookmarklet/panes-3-16-0/firefox-debug.js +10 -0
- package/dist/bookmarklet/panes-3-16-0/index.html +4 -23
- package/dist/bookmarklet/panes-3-16-0/internals-CRmXMEzb.js +12 -0
- package/dist/bookmarklet/panes-3-16-0/load-ember-debug-in-webpage-DCWcJhQm.js +29 -0
- package/dist/bookmarklet/panes-3-16-0/main.js +7669 -0
- package/dist/bookmarklet/panes-3-16-0/port.js +108 -0
- package/dist/bookmarklet/panes-3-16-0/profile-node.js +60 -0
- package/dist/bookmarklet/panes-3-16-0/promise-assembler.js +218 -0
- package/dist/bookmarklet/panes-3-16-0/runloop-6_0lpzTA.js +1138 -0
- package/dist/bookmarklet/panes-3-16-0/start-inspector-BIYQArZn.js +334 -0
- package/dist/bookmarklet/panes-3-16-0/type-check.js +119 -0
- package/dist/bookmarklet/panes-3-16-0/version.js +90 -0
- package/dist/bookmarklet/panes-3-16-0/versions.js +4 -0
- package/dist/bookmarklet/panes-3-16-0/web-extension-OWnXJ_XK.js +144 -0
- package/dist/bookmarklet/panes-3-16-0/websocket-BSUvUqER.js +58 -0
- package/dist/bookmarklet/panes-3-16-0/websocket-debug.js +10 -0
- package/dist/chrome/background.js +26 -21
- package/dist/chrome/boot.js +1 -1
- package/dist/chrome/content-script.js +12 -11
- package/dist/chrome/devtools.js +12 -3
- package/dist/chrome/manifest.json +4 -2
- package/dist/chrome/options.js +17 -12
- package/dist/chrome/panes-3-16-0/assets/chunk.443.86a005e528b587663b78.js +1135 -0
- package/dist/chrome/panes-3-16-0/assets/chunk.443.86a005e528b587663b78.js.LICENSE.txt +18 -0
- package/dist/chrome/panes-3-16-0/assets/chunk.524.aca67dc376e8cd35b522.js +40 -0
- package/dist/chrome/panes-3-16-0/assets/chunk.582.d3d80e94c4f59dc3b65d.js +42 -0
- package/dist/chrome/panes-3-16-0/assets/ember-inspector.css +997 -156
- package/dist/chrome/panes-3-16-0/assets/ember-inspector.js +560 -613
- package/dist/chrome/panes-3-16-0/assets/svg/ellipsis.svg +3 -3
- package/dist/chrome/panes-3-16-0/assets/svg/focus-point-round.svg +9 -0
- package/dist/chrome/panes-3-16-0/assets/svg/nav-bug.svg +1 -1
- package/dist/chrome/panes-3-16-0/assets/svg/nav-components.svg +2 -2
- package/dist/chrome/panes-3-16-0/assets/svg/nav-container.svg +1 -1
- package/dist/chrome/panes-3-16-0/assets/svg/nav-data.svg +1 -1
- package/dist/chrome/panes-3-16-0/assets/svg/nav-deprecations.svg +3 -3
- package/dist/chrome/panes-3-16-0/assets/svg/nav-info.svg +3 -3
- package/dist/chrome/panes-3-16-0/assets/svg/nav-promises.svg +2 -2
- package/dist/chrome/panes-3-16-0/assets/svg/nav-render-performance.svg +2 -2
- package/dist/chrome/panes-3-16-0/assets/svg/nav-route-tree.svg +7 -7
- package/dist/chrome/panes-3-16-0/assets/svg/sidebar-toggle-trailing.svg +9 -0
- package/dist/chrome/panes-3-16-0/assets/vendor.css +4 -841
- package/dist/chrome/panes-3-16-0/assets/vendor.js +4277 -5152
- package/dist/chrome/panes-3-16-0/base-object-HAEdWjmg.js +59 -0
- package/dist/chrome/panes-3-16-0/basic-B1dkgN3d.js +149 -0
- package/dist/chrome/panes-3-16-0/basic-debug.js +10 -0
- package/dist/chrome/panes-3-16-0/bookmarklet-BZWtwuX-.js +32 -0
- package/dist/chrome/panes-3-16-0/bookmarklet-debug.js +10 -0
- package/dist/chrome/panes-3-16-0/chrome-P6FSEUf1.js +10 -0
- package/dist/chrome/panes-3-16-0/chrome-debug.js +10 -0
- package/dist/chrome/panes-3-16-0/ember.js +166 -0
- package/dist/chrome/panes-3-16-0/ember_debug.js +7 -11018
- package/dist/chrome/panes-3-16-0/evented-BCTya3yE.js +62 -0
- package/dist/chrome/panes-3-16-0/firefox-8F84zphP.js +30 -0
- package/dist/chrome/panes-3-16-0/firefox-debug.js +10 -0
- package/dist/chrome/panes-3-16-0/index.html +4 -23
- package/dist/chrome/panes-3-16-0/internals-CRmXMEzb.js +12 -0
- package/dist/chrome/panes-3-16-0/load-ember-debug-in-webpage-DCWcJhQm.js +29 -0
- package/dist/chrome/panes-3-16-0/main.js +7669 -0
- package/dist/chrome/panes-3-16-0/port.js +108 -0
- package/dist/chrome/panes-3-16-0/profile-node.js +60 -0
- package/dist/chrome/panes-3-16-0/promise-assembler.js +218 -0
- package/dist/chrome/panes-3-16-0/runloop-6_0lpzTA.js +1138 -0
- package/dist/chrome/panes-3-16-0/start-inspector-BIYQArZn.js +334 -0
- package/dist/chrome/panes-3-16-0/type-check.js +119 -0
- package/dist/chrome/panes-3-16-0/version.js +90 -0
- package/dist/chrome/panes-3-16-0/versions.js +4 -0
- package/dist/chrome/panes-3-16-0/web-extension-OWnXJ_XK.js +144 -0
- package/dist/chrome/panes-3-16-0/websocket-BSUvUqER.js +58 -0
- package/dist/chrome/panes-3-16-0/websocket-debug.js +10 -0
- package/dist/chrome/scripts/in-page-script.js +19 -13
- package/dist/firefox/background.js +26 -21
- package/dist/firefox/boot.js +1 -1
- package/dist/firefox/content-script.js +12 -11
- package/dist/firefox/devtools.js +12 -3
- package/dist/firefox/manifest.json +4 -2
- package/dist/firefox/options.js +17 -12
- package/dist/firefox/panes-3-16-0/assets/chunk.443.86a005e528b587663b78.js +1135 -0
- package/dist/firefox/panes-3-16-0/assets/chunk.443.86a005e528b587663b78.js.LICENSE.txt +18 -0
- package/dist/firefox/panes-3-16-0/assets/chunk.524.aca67dc376e8cd35b522.js +40 -0
- package/dist/firefox/panes-3-16-0/assets/chunk.582.d3d80e94c4f59dc3b65d.js +42 -0
- package/dist/firefox/panes-3-16-0/assets/ember-inspector.css +997 -156
- package/dist/firefox/panes-3-16-0/assets/ember-inspector.js +560 -613
- package/dist/firefox/panes-3-16-0/assets/svg/ellipsis.svg +3 -3
- package/dist/firefox/panes-3-16-0/assets/svg/focus-point-round.svg +9 -0
- package/dist/firefox/panes-3-16-0/assets/svg/nav-bug.svg +1 -1
- package/dist/firefox/panes-3-16-0/assets/svg/nav-components.svg +2 -2
- package/dist/firefox/panes-3-16-0/assets/svg/nav-container.svg +1 -1
- package/dist/firefox/panes-3-16-0/assets/svg/nav-data.svg +1 -1
- package/dist/firefox/panes-3-16-0/assets/svg/nav-deprecations.svg +3 -3
- package/dist/firefox/panes-3-16-0/assets/svg/nav-info.svg +3 -3
- package/dist/firefox/panes-3-16-0/assets/svg/nav-promises.svg +2 -2
- package/dist/firefox/panes-3-16-0/assets/svg/nav-render-performance.svg +2 -2
- package/dist/firefox/panes-3-16-0/assets/svg/nav-route-tree.svg +7 -7
- package/dist/firefox/panes-3-16-0/assets/svg/sidebar-toggle-trailing.svg +9 -0
- package/dist/firefox/panes-3-16-0/assets/vendor.css +4 -841
- package/dist/firefox/panes-3-16-0/assets/vendor.js +4277 -5152
- package/dist/firefox/panes-3-16-0/base-object-HAEdWjmg.js +59 -0
- package/dist/firefox/panes-3-16-0/basic-B1dkgN3d.js +149 -0
- package/dist/firefox/panes-3-16-0/basic-debug.js +10 -0
- package/dist/firefox/panes-3-16-0/bookmarklet-BZWtwuX-.js +32 -0
- package/dist/firefox/panes-3-16-0/bookmarklet-debug.js +10 -0
- package/dist/firefox/panes-3-16-0/chrome-P6FSEUf1.js +10 -0
- package/dist/firefox/panes-3-16-0/chrome-debug.js +10 -0
- package/dist/firefox/panes-3-16-0/ember.js +166 -0
- package/dist/firefox/panes-3-16-0/ember_debug.js +7 -11018
- package/dist/firefox/panes-3-16-0/evented-BCTya3yE.js +62 -0
- package/dist/firefox/panes-3-16-0/firefox-8F84zphP.js +30 -0
- package/dist/firefox/panes-3-16-0/firefox-debug.js +10 -0
- package/dist/firefox/panes-3-16-0/index.html +4 -23
- package/dist/firefox/panes-3-16-0/internals-CRmXMEzb.js +12 -0
- package/dist/firefox/panes-3-16-0/load-ember-debug-in-webpage-DCWcJhQm.js +29 -0
- package/dist/firefox/panes-3-16-0/main.js +7669 -0
- package/dist/firefox/panes-3-16-0/port.js +108 -0
- package/dist/firefox/panes-3-16-0/profile-node.js +60 -0
- package/dist/firefox/panes-3-16-0/promise-assembler.js +218 -0
- package/dist/firefox/panes-3-16-0/runloop-6_0lpzTA.js +1138 -0
- package/dist/firefox/panes-3-16-0/start-inspector-BIYQArZn.js +334 -0
- package/dist/firefox/panes-3-16-0/type-check.js +119 -0
- package/dist/firefox/panes-3-16-0/version.js +90 -0
- package/dist/firefox/panes-3-16-0/versions.js +4 -0
- package/dist/firefox/panes-3-16-0/web-extension-OWnXJ_XK.js +144 -0
- package/dist/firefox/panes-3-16-0/websocket-BSUvUqER.js +58 -0
- package/dist/firefox/panes-3-16-0/websocket-debug.js +10 -0
- package/dist/firefox/scripts/in-page-script.js +19 -13
- package/dist/websocket/assets/chunk.443.86a005e528b587663b78.js +1135 -0
- package/dist/websocket/assets/chunk.443.86a005e528b587663b78.js.LICENSE.txt +18 -0
- package/dist/websocket/assets/chunk.524.aca67dc376e8cd35b522.js +40 -0
- package/dist/websocket/assets/chunk.582.d3d80e94c4f59dc3b65d.js +42 -0
- package/dist/websocket/assets/ember-inspector.css +997 -156
- package/dist/websocket/assets/ember-inspector.js +560 -613
- package/dist/websocket/assets/svg/ellipsis.svg +3 -3
- package/dist/websocket/assets/svg/focus-point-round.svg +9 -0
- package/dist/websocket/assets/svg/nav-bug.svg +1 -1
- package/dist/websocket/assets/svg/nav-components.svg +2 -2
- package/dist/websocket/assets/svg/nav-container.svg +1 -1
- package/dist/websocket/assets/svg/nav-data.svg +1 -1
- package/dist/websocket/assets/svg/nav-deprecations.svg +3 -3
- package/dist/websocket/assets/svg/nav-info.svg +3 -3
- package/dist/websocket/assets/svg/nav-promises.svg +2 -2
- package/dist/websocket/assets/svg/nav-render-performance.svg +2 -2
- package/dist/websocket/assets/svg/nav-route-tree.svg +7 -7
- package/dist/websocket/assets/svg/sidebar-toggle-trailing.svg +9 -0
- package/dist/websocket/assets/vendor.css +4 -841
- package/dist/websocket/assets/vendor.js +4277 -5152
- package/dist/websocket/base-object-HAEdWjmg.js +59 -0
- package/dist/websocket/basic-B1dkgN3d.js +149 -0
- package/dist/websocket/basic-debug.js +10 -0
- package/dist/websocket/bookmarklet-BZWtwuX-.js +32 -0
- package/dist/websocket/bookmarklet-debug.js +10 -0
- package/dist/websocket/chrome-P6FSEUf1.js +10 -0
- package/dist/websocket/chrome-debug.js +10 -0
- package/dist/websocket/ember.js +166 -0
- package/dist/websocket/ember_debug.js +7 -11018
- package/dist/websocket/evented-BCTya3yE.js +62 -0
- package/dist/websocket/firefox-8F84zphP.js +30 -0
- package/dist/websocket/firefox-debug.js +10 -0
- package/dist/websocket/index.html +4 -23
- package/dist/websocket/internals-CRmXMEzb.js +12 -0
- package/dist/websocket/load-ember-debug-in-webpage-DCWcJhQm.js +29 -0
- package/dist/websocket/main.js +7669 -0
- package/dist/websocket/port.js +108 -0
- package/dist/websocket/profile-node.js +60 -0
- package/dist/websocket/promise-assembler.js +218 -0
- package/dist/websocket/runloop-6_0lpzTA.js +1138 -0
- package/dist/websocket/start-inspector-BIYQArZn.js +334 -0
- package/dist/websocket/type-check.js +119 -0
- package/dist/websocket/version.js +90 -0
- package/dist/websocket/versions.js +4 -0
- package/dist/websocket/web-extension-OWnXJ_XK.js +144 -0
- package/dist/websocket/websocket-BSUvUqER.js +58 -0
- package/dist/websocket/websocket-debug.js +10 -0
- package/ember-cli-build.js +31 -140
- package/ember_debug/adapters/basic.js +10 -29
- package/ember_debug/adapters/bookmarklet.js +1 -0
- package/ember_debug/adapters/firefox.js +3 -3
- package/ember_debug/adapters/web-extension.js +6 -5
- package/ember_debug/adapters/websocket.js +2 -2
- package/ember_debug/babel.config.cjs +11 -0
- package/ember_debug/container-debug.js +1 -1
- package/ember_debug/data-debug.js +7 -8
- package/ember_debug/debug-port.js +1 -1
- package/ember_debug/deprecation-debug.js +14 -14
- package/ember_debug/entrypoints/basic-debug.js +10 -0
- package/ember_debug/entrypoints/bookmarklet-debug.js +10 -0
- package/ember_debug/entrypoints/chrome-debug.js +10 -0
- package/ember_debug/entrypoints/firefox-debug.js +10 -0
- package/ember_debug/entrypoints/websocket-debug.js +10 -0
- package/ember_debug/general-debug.js +4 -4
- package/ember_debug/lib/boot-ember-inspector.js +9 -0
- package/ember_debug/lib/get-applications.js +28 -0
- package/ember_debug/lib/load-ember-debug-in-webpage.js +32 -0
- package/ember_debug/lib/send-apps.js +14 -0
- package/ember_debug/lib/send-version-miss.js +38 -0
- package/ember_debug/lib/setup-instance-initializer.js +17 -0
- package/ember_debug/lib/start-inspector.js +195 -0
- package/ember_debug/lib/version-test.js +73 -0
- package/ember_debug/lib/versions.js +3 -0
- package/ember_debug/libs/capture-render-tree.js +1 -2
- package/ember_debug/libs/promise-assembler.js +5 -4
- package/ember_debug/libs/render-tree.js +37 -44
- package/ember_debug/libs/source-map.js +7 -6
- package/ember_debug/libs/view-inspection.js +25 -17
- package/ember_debug/main.js +18 -21
- package/ember_debug/models/profile-manager.js +6 -6
- package/ember_debug/models/profile-node.js +1 -1
- package/ember_debug/models/promise.js +2 -2
- package/ember_debug/object-inspector.js +74 -65
- package/ember_debug/package.json +27 -0
- package/ember_debug/port.js +5 -4
- package/ember_debug/promise-debug.js +5 -5
- package/ember_debug/render-debug.js +5 -5
- package/ember_debug/rollup.config.js +24 -0
- package/ember_debug/route-debug.js +10 -9
- package/ember_debug/services/session.js +2 -2
- package/ember_debug/utils/classify.js +1 -1
- package/ember_debug/utils/ember/object/internals.js +1 -11
- package/ember_debug/utils/ember/own-runloop.js +1 -1
- package/ember_debug/utils/ember/runloop.js +7 -10
- package/ember_debug/utils/ember-object-names.js +11 -9
- package/ember_debug/utils/ember.js +222 -40
- package/ember_debug/utils/evented.js +1 -1
- package/ember_debug/utils/get-object-name.js +3 -3
- package/ember_debug/utils/type-check.js +9 -5
- package/ember_debug/view-debug.js +12 -6
- package/eslint.config.mjs +173 -0
- package/gulpfile.js +1 -1
- package/package.json +97 -95
- package/patches/ember-cli-inject-live-reload.patch +16 -0
- package/pnpm-workspace.yaml +3 -0
- package/public/assets/svg/ellipsis.svg +3 -3
- package/public/assets/svg/focus-point-round.svg +9 -0
- package/public/assets/svg/nav-bug.svg +1 -1
- package/public/assets/svg/nav-components.svg +2 -2
- package/public/assets/svg/nav-container.svg +1 -1
- package/public/assets/svg/nav-data.svg +1 -1
- package/public/assets/svg/nav-deprecations.svg +3 -3
- package/public/assets/svg/nav-info.svg +3 -3
- package/public/assets/svg/nav-promises.svg +2 -2
- package/public/assets/svg/nav-render-performance.svg +2 -2
- package/public/assets/svg/nav-route-tree.svg +7 -7
- package/public/assets/svg/sidebar-toggle-trailing.svg +9 -0
- package/scripts/download-panes.js +1 -1
- package/skeletons/bookmarklet/load_inspector.js +31 -11
- package/skeletons/web-extension/background.js +26 -21
- package/skeletons/web-extension/boot.js +1 -1
- package/skeletons/web-extension/content-script.js +12 -11
- package/skeletons/web-extension/devtools.js +12 -3
- package/skeletons/web-extension/manifest.json +3 -1
- package/skeletons/web-extension/options.js +17 -12
- package/skeletons/web-extension/scripts/in-page-script.js +19 -13
- package/testem.js +0 -1
- package/tests/acceptance/app-picker-test.js +4 -4
- package/tests/acceptance/component-tree-test.js +96 -57
- package/tests/acceptance/container-test.js +0 -2
- package/tests/acceptance/data-test.js +14 -11
- package/tests/acceptance/deprecation-test.js +8 -12
- package/tests/acceptance/info-test.js +2 -2
- package/tests/acceptance/object-inspector-test.js +62 -110
- package/tests/acceptance/promise-test.js +1 -11
- package/tests/acceptance/render-tree-test.js +2 -2
- package/tests/acceptance/route-tree-test.js +12 -14
- package/tests/acceptance/whats-new-test.js +11 -11
- package/tests/ember_debug/container-debug-test.js +5 -14
- package/tests/ember_debug/deprecation-debug-test.js +15 -6
- package/tests/ember_debug/ember-data-test.js +7 -1
- package/tests/ember_debug/ember-debug-test.js +13 -13
- package/tests/ember_debug/object-inspector-test.js +115 -50
- package/tests/ember_debug/profile-manager-test.js +153 -170
- package/tests/ember_debug/profile-node-test.js +9 -5
- package/tests/ember_debug/promise-assembler-test.js +18 -10
- package/tests/ember_debug/promise-debug-test.js +19 -15
- package/tests/ember_debug/render-debug-test.js +8 -1
- package/tests/ember_debug/route-debug-test.js +14 -8
- package/tests/ember_debug/view-debug-test.js +267 -183
- package/tests/helpers/{index.js → index.ts} +6 -5
- package/tests/helpers/setup-ember-debug-test.js +22 -2
- package/tests/index.html +1 -2
- package/tests/integration/injection-test.js +37 -81
- package/tests/test-adapter.js +15 -15
- package/tests/test-helper.js +6 -4
- package/tests/unit/check-current-route-test.js +0 -4
- package/tests/unit/resizable-columns-test.js +53 -51
- package/tests/unit/utils/parse-text-test.js +3 -3
- package/tests/unit/utils/search-match-test.js +5 -5
- package/tests/unit/utils/type-check-test.js +27 -0
- package/tsconfig.json +3 -1
- package/types/ember-inspector/index.d.ts +2 -1
- package/types/global.d.ts +1 -7
- package/.eslintignore +0 -33
- package/.eslintrc.js +0 -86
- package/app/components/list-content.js +0 -130
- package/app/controllers/promise-tree.js +0 -130
- package/app/libs/promise-assembler.js +0 -169
- package/app/routes/model-types.js +0 -47
- package/app/routes/promise-tree.js +0 -48
- package/app/routes/records.js +0 -55
- package/app/routes/render-tree.js +0 -66
- package/app/services/adapters/websocket.js +0 -31
- package/app/services/layout.js +0 -39
- package/app/services/port.js +0 -90
- package/dist/bookmarklet/panes-3-16-0/assets/chunk.143.76a242242ec46a377266.js +0 -28
- package/dist/bookmarklet/panes-3-16-0/assets/chunk.178.b6064b368cf24cc346ec.js +0 -9
- package/dist/bookmarklet/panes-3-16-0/assets/chunk.359.0be5d21f60d2b5d6d423.js +0 -2620
- package/dist/bookmarklet/panes-3-16-0/assets/chunk.359.0be5d21f60d2b5d6d423.js.LICENSE.txt +0 -67
- package/dist/bookmarklet/panes-3-16-0/assets/fonts/Inter-Bold.woff +0 -0
- package/dist/bookmarklet/panes-3-16-0/assets/fonts/Inter-Bold.woff2 +0 -0
- package/dist/bookmarklet/panes-3-16-0/assets/fonts/Inter-Regular.woff +0 -0
- package/dist/bookmarklet/panes-3-16-0/assets/fonts/Inter-Regular.woff2 +0 -0
- package/dist/chrome/panes-3-16-0/assets/chunk.143.76a242242ec46a377266.js +0 -28
- package/dist/chrome/panes-3-16-0/assets/chunk.178.b6064b368cf24cc346ec.js +0 -9
- package/dist/chrome/panes-3-16-0/assets/chunk.359.0be5d21f60d2b5d6d423.js +0 -2620
- package/dist/chrome/panes-3-16-0/assets/chunk.359.0be5d21f60d2b5d6d423.js.LICENSE.txt +0 -67
- package/dist/chrome/panes-3-16-0/assets/fonts/Inter-Bold.woff +0 -0
- package/dist/chrome/panes-3-16-0/assets/fonts/Inter-Bold.woff2 +0 -0
- package/dist/chrome/panes-3-16-0/assets/fonts/Inter-Regular.woff +0 -0
- package/dist/chrome/panes-3-16-0/assets/fonts/Inter-Regular.woff2 +0 -0
- package/dist/firefox/panes-3-16-0/assets/chunk.143.76a242242ec46a377266.js +0 -28
- package/dist/firefox/panes-3-16-0/assets/chunk.178.b6064b368cf24cc346ec.js +0 -9
- package/dist/firefox/panes-3-16-0/assets/chunk.359.0be5d21f60d2b5d6d423.js +0 -2620
- package/dist/firefox/panes-3-16-0/assets/chunk.359.0be5d21f60d2b5d6d423.js.LICENSE.txt +0 -67
- package/dist/firefox/panes-3-16-0/assets/fonts/Inter-Bold.woff +0 -0
- package/dist/firefox/panes-3-16-0/assets/fonts/Inter-Bold.woff2 +0 -0
- package/dist/firefox/panes-3-16-0/assets/fonts/Inter-Regular.woff +0 -0
- package/dist/firefox/panes-3-16-0/assets/fonts/Inter-Regular.woff2 +0 -0
- package/dist/websocket/assets/chunk.143.76a242242ec46a377266.js +0 -28
- package/dist/websocket/assets/chunk.178.b6064b368cf24cc346ec.js +0 -9
- package/dist/websocket/assets/chunk.359.0be5d21f60d2b5d6d423.js +0 -2620
- package/dist/websocket/assets/chunk.359.0be5d21f60d2b5d6d423.js.LICENSE.txt +0 -67
- package/dist/websocket/assets/fonts/Inter-Bold.woff +0 -0
- package/dist/websocket/assets/fonts/Inter-Bold.woff2 +0 -0
- package/dist/websocket/assets/fonts/Inter-Regular.woff +0 -0
- package/dist/websocket/assets/fonts/Inter-Regular.woff2 +0 -0
- package/ember_debug/.eslintrc.js +0 -13
- package/ember_debug/utils/ember/debug.js +0 -20
- package/ember_debug/utils/ember/instrumentation.js +0 -11
- package/ember_debug/utils/ember/loader.js +0 -22
- package/ember_debug/utils/rsvp.js +0 -20
- package/ember_debug/vendor/loader.js +0 -54
- package/ember_debug/vendor/startup-wrapper.js +0 -399
- package/lib/ui/addon/styles/_object-inspector-toggle.scss +0 -12
- package/lib/ui/addon/styles/addon.scss +0 -13
- package/lib/ui/addon/styles/toolbar/_icon-button.scss +0 -61
- package/lib/ui/app/components/ui/disclosure-triangle.js +0 -1
- package/lib/ui/app/components/ui/disclosure.js +0 -1
- package/lib/ui/app/components/ui/drag-handle.js +0 -1
- package/lib/ui/app/components/ui/draggable-column.js +0 -1
- package/lib/ui/app/components/ui/empty-message.js +0 -1
- package/lib/ui/app/components/ui/error-page.js +0 -1
- package/lib/ui/app/components/ui/open-links-in-new-window.js +0 -1
- package/lib/ui/app/components/ui/resizable-column.js +0 -1
- package/lib/ui/app/components/ui/send-to-console.js +0 -1
- package/lib/ui/app/components/ui/toolbar-clear-button.js +0 -1
- package/lib/ui/app/components/ui/toolbar-divider.js +0 -1
- package/lib/ui/app/components/ui/toolbar-reload-button.js +0 -1
- package/lib/ui/app/components/ui/toolbar-search-field.js +0 -1
- package/lib/ui/app/components/ui/warning-message.js +0 -1
- package/lib/ui/index.js +0 -34
- package/lib/ui/package.json +0 -13
- package/public/assets/fonts/Inter-Bold.woff +0 -0
- package/public/assets/fonts/Inter-Bold.woff2 +0 -0
- package/public/assets/fonts/Inter-Regular.woff +0 -0
- package/public/assets/fonts/Inter-Regular.woff2 +0 -0
- package/tests/helpers/trigger-port.js +0 -6
- /package/app/{app.js → app.ts} +0 -0
- /package/{lib/ui/addon/components → app/components/ui}/disclosure-triangle.hbs +0 -0
- /package/{lib/ui/addon/components → app/components/ui}/disclosure.hbs +0 -0
- /package/{lib/ui/addon/components → app/components/ui}/disclosure.js +0 -0
- /package/{lib/ui/addon/components → app/components/ui}/draggable-column.hbs +0 -0
- /package/{lib/ui/addon/components → app/components/ui}/draggable-column.js +0 -0
- /package/{lib/ui/addon/components → app/components/ui}/open-links-in-new-window.hbs +0 -0
- /package/{lib/ui/addon/components → app/components/ui}/open-links-in-new-window.js +0 -0
- /package/{lib/ui/addon/components → app/components/ui}/resizable-column.hbs +0 -0
- /package/{lib/ui/addon/components → app/components/ui}/send-to-console.hbs +0 -0
- /package/{lib/ui/addon/components → app/components/ui}/toolbar-divider.hbs +0 -0
- /package/{lib/ui/addon/components → app/components/ui}/toolbar-search-field.js +0 -0
- /package/{lib/ui/addon/components → app/components/ui}/warning-message.hbs +0 -0
- /package/app/controllers/{info.js → info.ts} +0 -0
- /package/app/services/adapters/{firefox.js → firefox.ts} +0 -0
- /package/{lib/ui/addon/styles → app/styles/ui}/_goto-source.scss +0 -0
- /package/{lib/ui/addon/styles → app/styles/ui}/_warning.scss +0 -0
- /package/{lib/ui/addon/styles → app/styles/ui}/toolbar/_divider.scss +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable ember/no-classic-classes */
|
|
1
2
|
import {
|
|
2
3
|
click,
|
|
3
4
|
find,
|
|
@@ -8,28 +9,37 @@ import {
|
|
|
8
9
|
import hasEmberVersion from '@ember/test-helpers/has-ember-version';
|
|
9
10
|
import { A } from '@ember/array';
|
|
10
11
|
import { run } from '@ember/runloop';
|
|
11
|
-
|
|
12
|
+
// eslint-disable-next-line ember/no-classic-components
|
|
13
|
+
import EmberComponent, { setComponentTemplate } from '@ember/component';
|
|
12
14
|
import EmberRoute from '@ember/routing/route';
|
|
13
15
|
import EmberObject from '@ember/object';
|
|
14
16
|
import Controller from '@ember/controller';
|
|
17
|
+
// eslint-disable-next-line ember/no-at-ember-render-modifiers
|
|
15
18
|
import didInsert from '@ember/render-modifiers/modifiers/did-insert';
|
|
16
19
|
import QUnit, { module, test } from 'qunit';
|
|
17
20
|
import { hbs } from 'ember-cli-htmlbars';
|
|
18
|
-
import EmberDebug from 'ember-debug/main';
|
|
19
21
|
import setupEmberDebugTest from '../helpers/setup-ember-debug-test';
|
|
20
|
-
import { isInVersionSpecifier } from 'ember-debug/
|
|
21
|
-
import
|
|
22
|
+
import { isInVersionSpecifier } from 'ember-debug/version';
|
|
23
|
+
import GlimmerComponent from '@glimmer/component';
|
|
24
|
+
import { tracked } from '@glimmer/tracking';
|
|
25
|
+
|
|
26
|
+
import EmberImport from 'ember-debug/ember';
|
|
27
|
+
import EmberDebugImport from 'ember-debug/main';
|
|
28
|
+
|
|
29
|
+
let EmberDebug;
|
|
30
|
+
let VERSION;
|
|
22
31
|
|
|
23
32
|
let templateOnlyComponent = null;
|
|
24
33
|
try {
|
|
25
34
|
// eslint-disable-next-line no-undef,ember/new-module-imports
|
|
26
35
|
templateOnlyComponent = Ember._templateOnlyComponent;
|
|
27
36
|
// eslint-disable-next-line no-empty
|
|
28
|
-
} catch
|
|
37
|
+
} catch {}
|
|
29
38
|
try {
|
|
39
|
+
// eslint-disable-next-line no-undef
|
|
30
40
|
templateOnlyComponent = require('ember').default._templateOnlyComponent;
|
|
31
41
|
// eslint-disable-next-line no-empty
|
|
32
|
-
} catch
|
|
42
|
+
} catch {}
|
|
33
43
|
|
|
34
44
|
// TODO switch to an adapter architecture, similar to the acceptance tests
|
|
35
45
|
async function captureMessage(type, callback) {
|
|
@@ -103,7 +113,7 @@ function matchTree(tree, matchers, name) {
|
|
|
103
113
|
QUnit.assert.strictEqual(
|
|
104
114
|
tree.length,
|
|
105
115
|
matchers.length,
|
|
106
|
-
`${name} tree and matcher should have the same length
|
|
116
|
+
`${name} tree and matcher should have the same length`,
|
|
107
117
|
);
|
|
108
118
|
|
|
109
119
|
for (let i = 0; i < matchers.length; i++) {
|
|
@@ -117,7 +127,7 @@ function match(actual, matcher, message) {
|
|
|
117
127
|
} else if (Array.isArray(matcher)) {
|
|
118
128
|
QUnit.assert.ok(
|
|
119
129
|
matcher.indexOf(actual) > -1,
|
|
120
|
-
`${actual} should be one of ${matcher.join('/')}
|
|
130
|
+
`${actual} should be one of ${matcher.join('/')}`,
|
|
121
131
|
);
|
|
122
132
|
} else if (matcher instanceof RegExp && actual !== null) {
|
|
123
133
|
QUnit.assert.ok(actual.match(matcher), `${actual} should match ${matcher}`);
|
|
@@ -146,23 +156,23 @@ function Serialized(id) {
|
|
|
146
156
|
return (actual) => {
|
|
147
157
|
QUnit.assert.ok(
|
|
148
158
|
typeof actual === 'object' && actual !== null,
|
|
149
|
-
'serialized object should be an object'
|
|
159
|
+
'serialized object should be an object',
|
|
150
160
|
);
|
|
151
161
|
QUnit.assert.ok(
|
|
152
162
|
typeof actual.id === 'string',
|
|
153
|
-
'serialized object should have a string id'
|
|
163
|
+
'serialized object should have a string id',
|
|
154
164
|
);
|
|
155
165
|
|
|
156
166
|
if (id === undefined) {
|
|
157
167
|
QUnit.assert.ok(
|
|
158
168
|
actual.id.match(/^ember[0-9]+$/),
|
|
159
|
-
'serialized object should have an ember guid'
|
|
169
|
+
'serialized object should have an ember guid',
|
|
160
170
|
);
|
|
161
171
|
} else {
|
|
162
172
|
QUnit.assert.strictEqual(
|
|
163
173
|
actual.id,
|
|
164
174
|
id,
|
|
165
|
-
'serialized object should have an ember guid'
|
|
175
|
+
'serialized object should have an ember guid',
|
|
166
176
|
);
|
|
167
177
|
}
|
|
168
178
|
};
|
|
@@ -172,13 +182,13 @@ function RenderNodeID(id) {
|
|
|
172
182
|
return (actual) => {
|
|
173
183
|
QUnit.assert.ok(
|
|
174
184
|
typeof actual === 'string',
|
|
175
|
-
'render node id should be a string'
|
|
185
|
+
'render node id should be a string',
|
|
176
186
|
);
|
|
177
187
|
|
|
178
188
|
if (id === undefined) {
|
|
179
189
|
QUnit.assert.ok(
|
|
180
190
|
actual.match(/^.+render-node:.+$/),
|
|
181
|
-
`render node id should have the right format, actual: ${actual}
|
|
191
|
+
`render node id should have the right format, actual: ${actual}`,
|
|
182
192
|
);
|
|
183
193
|
} else {
|
|
184
194
|
QUnit.assert.strictEqual(actual, id, 'render node id should match');
|
|
@@ -190,32 +200,32 @@ function Args({ names = [], positionals = 0 } = {}) {
|
|
|
190
200
|
return (actual) => {
|
|
191
201
|
QUnit.assert.ok(
|
|
192
202
|
typeof actual === 'object' && actual !== null,
|
|
193
|
-
'serialized args should be an object'
|
|
203
|
+
'serialized args should be an object',
|
|
194
204
|
);
|
|
195
205
|
|
|
196
206
|
QUnit.assert.ok(
|
|
197
207
|
actual !== null && !actual.named.__ARGS__,
|
|
198
|
-
'serialized named args should not have __ARGS__'
|
|
208
|
+
'serialized named args should not have __ARGS__',
|
|
199
209
|
);
|
|
200
210
|
|
|
201
211
|
QUnit.assert.ok(
|
|
202
212
|
typeof actual.named === 'object' && actual !== null,
|
|
203
|
-
'serialized named args should be an object'
|
|
213
|
+
'serialized named args should be an object',
|
|
204
214
|
);
|
|
205
215
|
QUnit.assert.deepEqual(
|
|
206
216
|
Object.keys(actual.named),
|
|
207
217
|
names,
|
|
208
|
-
'serialized named args should have the right keys'
|
|
218
|
+
'serialized named args should have the right keys',
|
|
209
219
|
);
|
|
210
220
|
|
|
211
221
|
QUnit.assert.ok(
|
|
212
222
|
Array.isArray(actual.positional),
|
|
213
|
-
'serialized positional args should be an array'
|
|
223
|
+
'serialized positional args should be an array',
|
|
214
224
|
);
|
|
215
225
|
QUnit.assert.strictEqual(
|
|
216
226
|
actual.positional.length,
|
|
217
227
|
positionals,
|
|
218
|
-
'serialized positional args should have the right number of items'
|
|
228
|
+
'serialized positional args should have the right number of items',
|
|
219
229
|
);
|
|
220
230
|
};
|
|
221
231
|
}
|
|
@@ -240,12 +250,12 @@ function RenderNode(
|
|
|
240
250
|
match(
|
|
241
251
|
actual.instance,
|
|
242
252
|
instance,
|
|
243
|
-
`${name} ${type} should have correct instance
|
|
253
|
+
`${name} ${type} should have correct instance`,
|
|
244
254
|
);
|
|
245
255
|
match(
|
|
246
256
|
actual.template,
|
|
247
257
|
template,
|
|
248
|
-
`${name} ${type} should have correct template
|
|
258
|
+
`${name} ${type} should have correct template`,
|
|
249
259
|
);
|
|
250
260
|
match(actual.bounds, bounds, `${name} ${type} should have correct bounds`);
|
|
251
261
|
matchTree(actual.children, children, `${name} ${type}`);
|
|
@@ -256,7 +266,7 @@ function Component(
|
|
|
256
266
|
{
|
|
257
267
|
name,
|
|
258
268
|
instance = Serialized(),
|
|
259
|
-
template = `my-app/
|
|
269
|
+
template = `my-app/components/${name}.hbs`,
|
|
260
270
|
bounds = 'single',
|
|
261
271
|
...options
|
|
262
272
|
},
|
|
@@ -264,7 +274,7 @@ function Component(
|
|
|
264
274
|
) {
|
|
265
275
|
return RenderNode(
|
|
266
276
|
{ name, instance, template, bounds, ...options, type: 'component' },
|
|
267
|
-
...children
|
|
277
|
+
...children,
|
|
268
278
|
);
|
|
269
279
|
}
|
|
270
280
|
|
|
@@ -280,7 +290,7 @@ function Modifier(
|
|
|
280
290
|
) {
|
|
281
291
|
return RenderNode(
|
|
282
292
|
{ name, instance, template, bounds, ...options, type: 'modifier' },
|
|
283
|
-
...children
|
|
293
|
+
...children,
|
|
284
294
|
);
|
|
285
295
|
}
|
|
286
296
|
|
|
@@ -305,14 +315,25 @@ function HtmlElement(
|
|
|
305
315
|
...options,
|
|
306
316
|
type: 'html-element',
|
|
307
317
|
},
|
|
308
|
-
...children
|
|
318
|
+
...children,
|
|
309
319
|
);
|
|
310
320
|
}
|
|
311
321
|
|
|
322
|
+
function RouteArgs() {
|
|
323
|
+
if (hasEmberVersion(6, 4)) {
|
|
324
|
+
// Related to routable components
|
|
325
|
+
return Args({ names: ['controller', 'model'] });
|
|
326
|
+
}
|
|
327
|
+
if (hasEmberVersion(3, 14)) {
|
|
328
|
+
return Args({ names: ['model'] });
|
|
329
|
+
}
|
|
330
|
+
return Args();
|
|
331
|
+
}
|
|
332
|
+
|
|
312
333
|
function Route(
|
|
313
334
|
{
|
|
314
335
|
name,
|
|
315
|
-
args =
|
|
336
|
+
args = RouteArgs(),
|
|
316
337
|
instance = Serialized(),
|
|
317
338
|
template = `my-app/templates/${name}.hbs`,
|
|
318
339
|
...options
|
|
@@ -323,8 +344,8 @@ function Route(
|
|
|
323
344
|
{ type: 'outlet', name: 'main', instance: undefined, template: null },
|
|
324
345
|
RenderNode(
|
|
325
346
|
{ name, args, instance, template, ...options, type: 'route-template' },
|
|
326
|
-
...children
|
|
327
|
-
)
|
|
347
|
+
...children,
|
|
348
|
+
),
|
|
328
349
|
);
|
|
329
350
|
}
|
|
330
351
|
|
|
@@ -336,7 +357,7 @@ function TopLevel(...children) {
|
|
|
336
357
|
instance: Undefined(),
|
|
337
358
|
template: /^packages\/.+\/templates\/outlet\.hbs$/,
|
|
338
359
|
},
|
|
339
|
-
...children
|
|
360
|
+
...children,
|
|
340
361
|
);
|
|
341
362
|
}
|
|
342
363
|
|
|
@@ -351,6 +372,11 @@ function findInspectorElement(kind) {
|
|
|
351
372
|
}
|
|
352
373
|
|
|
353
374
|
module('Ember Debug - View', function (hooks) {
|
|
375
|
+
hooks.before(async function () {
|
|
376
|
+
EmberDebug = (await EmberDebugImport).default;
|
|
377
|
+
VERSION = (await EmberImport).VERSION;
|
|
378
|
+
});
|
|
379
|
+
|
|
354
380
|
setupEmberDebugTest(hooks, {
|
|
355
381
|
routes() {
|
|
356
382
|
this.route('simple');
|
|
@@ -358,6 +384,7 @@ module('Ember Debug - View', function (hooks) {
|
|
|
358
384
|
this.route('test-component-in-in-element');
|
|
359
385
|
this.route('wormhole');
|
|
360
386
|
this.route('inputs');
|
|
387
|
+
this.route('component-in-shadow-dom');
|
|
361
388
|
this.route('comments', { resetNamespace: true }, function () {});
|
|
362
389
|
this.route('posts', { resetNamespace: true });
|
|
363
390
|
},
|
|
@@ -376,7 +403,7 @@ module('Ember Debug - View', function (hooks) {
|
|
|
376
403
|
},
|
|
377
404
|
});
|
|
378
405
|
},
|
|
379
|
-
})
|
|
406
|
+
}),
|
|
380
407
|
);
|
|
381
408
|
|
|
382
409
|
this.owner.register(
|
|
@@ -389,7 +416,7 @@ module('Ember Debug - View', function (hooks) {
|
|
|
389
416
|
},
|
|
390
417
|
});
|
|
391
418
|
},
|
|
392
|
-
})
|
|
419
|
+
}),
|
|
393
420
|
);
|
|
394
421
|
|
|
395
422
|
this.owner.register(
|
|
@@ -402,7 +429,7 @@ module('Ember Debug - View', function (hooks) {
|
|
|
402
429
|
},
|
|
403
430
|
});
|
|
404
431
|
},
|
|
405
|
-
})
|
|
432
|
+
}),
|
|
406
433
|
);
|
|
407
434
|
|
|
408
435
|
this.owner.register(
|
|
@@ -415,7 +442,7 @@ module('Ember Debug - View', function (hooks) {
|
|
|
415
442
|
},
|
|
416
443
|
});
|
|
417
444
|
},
|
|
418
|
-
})
|
|
445
|
+
}),
|
|
419
446
|
);
|
|
420
447
|
|
|
421
448
|
this.owner.register(
|
|
@@ -428,7 +455,7 @@ module('Ember Debug - View', function (hooks) {
|
|
|
428
455
|
},
|
|
429
456
|
});
|
|
430
457
|
},
|
|
431
|
-
})
|
|
458
|
+
}),
|
|
432
459
|
);
|
|
433
460
|
|
|
434
461
|
this.owner.register(
|
|
@@ -441,7 +468,7 @@ module('Ember Debug - View', function (hooks) {
|
|
|
441
468
|
},
|
|
442
469
|
});
|
|
443
470
|
},
|
|
444
|
-
})
|
|
471
|
+
}),
|
|
445
472
|
);
|
|
446
473
|
|
|
447
474
|
this.owner.register(
|
|
@@ -450,7 +477,7 @@ module('Ember Debug - View', function (hooks) {
|
|
|
450
477
|
model() {
|
|
451
478
|
return A(['first comment', 'second comment', 'third comment']);
|
|
452
479
|
},
|
|
453
|
-
})
|
|
480
|
+
}),
|
|
454
481
|
);
|
|
455
482
|
|
|
456
483
|
this.owner.register(
|
|
@@ -459,7 +486,7 @@ module('Ember Debug - View', function (hooks) {
|
|
|
459
486
|
model() {
|
|
460
487
|
return 'String as model';
|
|
461
488
|
},
|
|
462
|
-
})
|
|
489
|
+
}),
|
|
463
490
|
);
|
|
464
491
|
|
|
465
492
|
this.owner.register(
|
|
@@ -468,7 +495,7 @@ module('Ember Debug - View', function (hooks) {
|
|
|
468
495
|
toString() {
|
|
469
496
|
return 'App.ApplicationController';
|
|
470
497
|
},
|
|
471
|
-
})
|
|
498
|
+
}),
|
|
472
499
|
);
|
|
473
500
|
|
|
474
501
|
this.owner.register(
|
|
@@ -481,50 +508,108 @@ module('Ember Debug - View', function (hooks) {
|
|
|
481
508
|
toString() {
|
|
482
509
|
return 'App.SimpleController';
|
|
483
510
|
},
|
|
484
|
-
})
|
|
511
|
+
}),
|
|
485
512
|
);
|
|
486
513
|
|
|
487
514
|
this.owner.register(
|
|
488
|
-
'component:
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
515
|
+
'component:shadow-dom',
|
|
516
|
+
setComponentTemplate(
|
|
517
|
+
hbs(
|
|
518
|
+
`<div {{did-insert this.setupRoot}} />
|
|
519
|
+
{{#if this.shadow}}
|
|
520
|
+
{{#in-element this.shadow}}
|
|
521
|
+
{{yield}}
|
|
522
|
+
{{/in-element}}
|
|
523
|
+
{{/if}}
|
|
524
|
+
`,
|
|
525
|
+
{
|
|
526
|
+
moduleName: 'my-app/components/shadow-dom.hbs',
|
|
527
|
+
},
|
|
528
|
+
),
|
|
529
|
+
class extends GlimmerComponent {
|
|
530
|
+
@tracked shadow;
|
|
531
|
+
setupRoot = (element) => {
|
|
532
|
+
this.shadow = element.attachShadow({ mode: 'open' });
|
|
533
|
+
window.testShadow = this.shadow;
|
|
534
|
+
};
|
|
493
535
|
},
|
|
494
|
-
|
|
536
|
+
),
|
|
495
537
|
);
|
|
496
538
|
|
|
497
539
|
this.owner.register(
|
|
498
|
-
'component:test-
|
|
499
|
-
|
|
540
|
+
'component:test-foo',
|
|
541
|
+
setComponentTemplate(
|
|
542
|
+
hbs('test-foo', {
|
|
543
|
+
moduleName: 'my-app/components/test-foo.hbs',
|
|
544
|
+
}),
|
|
500
545
|
EmberComponent.extend({
|
|
501
|
-
|
|
546
|
+
classNames: ['simple-component'],
|
|
502
547
|
toString() {
|
|
503
|
-
return 'App.
|
|
548
|
+
return 'App.TestFooComponent';
|
|
504
549
|
},
|
|
505
|
-
})
|
|
550
|
+
}),
|
|
551
|
+
),
|
|
552
|
+
);
|
|
553
|
+
|
|
554
|
+
this.owner.register(
|
|
555
|
+
'component:test-bar',
|
|
556
|
+
setComponentTemplate(
|
|
557
|
+
hbs(
|
|
558
|
+
`<!-- before -->
|
|
559
|
+
<div class="another-component">
|
|
560
|
+
{{@value}}
|
|
561
|
+
<span>test</span>
|
|
562
|
+
<span class="bar-inner">bar</span>
|
|
563
|
+
</div>
|
|
564
|
+
<!-- after -->`,
|
|
565
|
+
{ moduleName: 'my-app/components/test-bar.hbs' },
|
|
566
|
+
),
|
|
567
|
+
templateOnlyComponent?.() ||
|
|
568
|
+
EmberComponent.extend({
|
|
569
|
+
tagName: '',
|
|
570
|
+
toString() {
|
|
571
|
+
return 'App.TestBarComponent';
|
|
572
|
+
},
|
|
573
|
+
}),
|
|
574
|
+
),
|
|
506
575
|
);
|
|
507
576
|
|
|
508
577
|
this.owner.register(
|
|
509
578
|
'component:test-in-element-in-component',
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
this.
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
579
|
+
setComponentTemplate(
|
|
580
|
+
hbs(`
|
|
581
|
+
{{#in-element this.elementTarget}}
|
|
582
|
+
<p class='test-in-element-in-component'>
|
|
583
|
+
App.TestInElementInComponent
|
|
584
|
+
</p>
|
|
585
|
+
{{/in-element}}
|
|
586
|
+
`),
|
|
587
|
+
EmberComponent.extend({
|
|
588
|
+
init(...args) {
|
|
589
|
+
this._super(...args);
|
|
590
|
+
this.elementTarget = document.querySelector('#target');
|
|
591
|
+
},
|
|
592
|
+
toString() {
|
|
593
|
+
return 'App.TestInElementInComponent';
|
|
594
|
+
},
|
|
595
|
+
}),
|
|
596
|
+
),
|
|
519
597
|
);
|
|
520
598
|
|
|
521
599
|
this.owner.register(
|
|
522
600
|
'component:test-component-in-in-element',
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
601
|
+
setComponentTemplate(
|
|
602
|
+
hbs(`
|
|
603
|
+
<p class='test-component-in-in-element'>
|
|
604
|
+
App.TestComponentInElement
|
|
605
|
+
</p>
|
|
606
|
+
`),
|
|
607
|
+
EmberComponent.extend({
|
|
608
|
+
toString() {
|
|
609
|
+
return 'App.TestComponentInElement';
|
|
610
|
+
},
|
|
611
|
+
}),
|
|
612
|
+
),
|
|
528
613
|
);
|
|
529
614
|
|
|
530
615
|
/*
|
|
@@ -539,8 +624,8 @@ module('Ember Debug - View', function (hooks) {
|
|
|
539
624
|
<div id="target"></div>
|
|
540
625
|
{{outlet}}
|
|
541
626
|
</div>`,
|
|
542
|
-
{ moduleName: 'my-app/templates/application.hbs' }
|
|
543
|
-
)
|
|
627
|
+
{ moduleName: 'my-app/templates/application.hbs' },
|
|
628
|
+
),
|
|
544
629
|
);
|
|
545
630
|
|
|
546
631
|
this.owner.register(
|
|
@@ -548,27 +633,29 @@ module('Ember Debug - View', function (hooks) {
|
|
|
548
633
|
hbs(
|
|
549
634
|
`
|
|
550
635
|
<div {{did-insert this.foo}}>
|
|
551
|
-
|
|
636
|
+
<div>
|
|
637
|
+
Simple {{test-foo}} {{test-bar value=(hash x=123 [x.y]=456)}} {{#in-element this.elementTarget}}<TestComponentInInElement />{{/in-element}}
|
|
638
|
+
</div>
|
|
552
639
|
</div>
|
|
553
640
|
`,
|
|
554
641
|
{
|
|
555
642
|
moduleName: 'my-app/templates/simple.hbs',
|
|
556
|
-
}
|
|
557
|
-
)
|
|
643
|
+
},
|
|
644
|
+
),
|
|
558
645
|
);
|
|
559
646
|
|
|
560
647
|
this.owner.register(
|
|
561
648
|
'template:test-in-element-in-component',
|
|
562
649
|
hbs('<TestInElementInComponent />', {
|
|
563
650
|
moduleName: 'my-app/templates/test-in-element-in-component.hbs',
|
|
564
|
-
})
|
|
651
|
+
}),
|
|
565
652
|
);
|
|
566
653
|
|
|
567
654
|
this.owner.register(
|
|
568
655
|
'template:test-component-in-in-element',
|
|
569
656
|
hbs('<TestComponentInInElement />', {
|
|
570
657
|
moduleName: 'my-app/templates/test-component-in-in-element.hbs',
|
|
571
|
-
})
|
|
658
|
+
}),
|
|
572
659
|
);
|
|
573
660
|
|
|
574
661
|
this.owner.register(
|
|
@@ -577,64 +664,32 @@ module('Ember Debug - View', function (hooks) {
|
|
|
577
664
|
'<EmberWormhole @to="target"><div class="in-wormhole">Wormhole</div></EmberWormhole>',
|
|
578
665
|
{
|
|
579
666
|
moduleName: 'my-app/templates/wormhole.hbs',
|
|
580
|
-
}
|
|
581
|
-
)
|
|
667
|
+
},
|
|
668
|
+
),
|
|
582
669
|
);
|
|
583
670
|
this.owner.register(
|
|
584
671
|
'template:inputs',
|
|
585
672
|
hbs('Simple <Input @value="987" />', {
|
|
586
673
|
moduleName: 'my-app/templates/inputs.hbs',
|
|
587
|
-
})
|
|
674
|
+
}),
|
|
675
|
+
);
|
|
676
|
+
|
|
677
|
+
this.owner.register(
|
|
678
|
+
'template:component-in-shadow-dom',
|
|
679
|
+
hbs('<ShadowDom><TestFoo /></ShadowDom>', {
|
|
680
|
+
moduleName: 'my-app/templates/component-in-shadow-dom.hbs',
|
|
681
|
+
}),
|
|
588
682
|
);
|
|
589
683
|
|
|
590
684
|
this.owner.register(
|
|
591
685
|
'template:comments/index',
|
|
592
686
|
hbs('{{#each this.comments as |comment|}}{{comment}}{{/each}}', {
|
|
593
687
|
moduleName: 'my-app/templates/comments/index.hbs',
|
|
594
|
-
})
|
|
688
|
+
}),
|
|
595
689
|
);
|
|
596
690
|
this.owner.register(
|
|
597
691
|
'template:posts',
|
|
598
|
-
hbs('Posts', { moduleName: 'my-app/templates/posts.hbs' })
|
|
599
|
-
);
|
|
600
|
-
this.owner.register(
|
|
601
|
-
'template:components/test-foo',
|
|
602
|
-
hbs('test-foo', {
|
|
603
|
-
moduleName: 'my-app/templates/components/test-foo.hbs',
|
|
604
|
-
})
|
|
605
|
-
);
|
|
606
|
-
this.owner.register(
|
|
607
|
-
'template:components/test-bar',
|
|
608
|
-
hbs(
|
|
609
|
-
`<!-- before -->
|
|
610
|
-
<div class="another-component">
|
|
611
|
-
{{@value}}
|
|
612
|
-
<span>test</span>
|
|
613
|
-
<span class="bar-inner">bar</span>
|
|
614
|
-
</div>
|
|
615
|
-
<!-- after -->`,
|
|
616
|
-
{ moduleName: 'my-app/templates/components/test-bar.hbs' }
|
|
617
|
-
)
|
|
618
|
-
);
|
|
619
|
-
|
|
620
|
-
this.owner.register(
|
|
621
|
-
'template:components/test-component-in-in-element',
|
|
622
|
-
hbs(`
|
|
623
|
-
<p class='test-component-in-in-element'>
|
|
624
|
-
App.TestComponentInElement
|
|
625
|
-
</p>
|
|
626
|
-
`)
|
|
627
|
-
);
|
|
628
|
-
|
|
629
|
-
this.owner.register(
|
|
630
|
-
'template:components/test-in-element-in-component',
|
|
631
|
-
hbs(`
|
|
632
|
-
{{#in-element this.elementTarget}}
|
|
633
|
-
<p class='test-in-element-in-component'>
|
|
634
|
-
App.TestInElementInComponent
|
|
635
|
-
</p>
|
|
636
|
-
{{/in-element}}
|
|
637
|
-
`)
|
|
692
|
+
hbs('Posts', { moduleName: 'my-app/templates/posts.hbs' }),
|
|
638
693
|
);
|
|
639
694
|
|
|
640
695
|
this.owner.register('modifier:did-insert', didInsert);
|
|
@@ -674,7 +729,7 @@ module('Ember Debug - View', function (hooks) {
|
|
|
674
729
|
Modifier({
|
|
675
730
|
name: 'deprecated-event-handlers',
|
|
676
731
|
args: Args({ positionals: 1 }),
|
|
677
|
-
})
|
|
732
|
+
}),
|
|
678
733
|
);
|
|
679
734
|
}
|
|
680
735
|
const enableModifierSupport = isInVersionSpecifier('>3.28.0', VERSION);
|
|
@@ -688,7 +743,7 @@ module('Ember Debug - View', function (hooks) {
|
|
|
688
743
|
name: '-text-field',
|
|
689
744
|
template: /.*/,
|
|
690
745
|
args: Args({ names: ['target', 'value'], positionals: 0 }),
|
|
691
|
-
})
|
|
746
|
+
}),
|
|
692
747
|
);
|
|
693
748
|
}
|
|
694
749
|
|
|
@@ -698,7 +753,7 @@ module('Ember Debug - View', function (hooks) {
|
|
|
698
753
|
name: 'input',
|
|
699
754
|
args: Args({ names: ['id', 'class', 'type'] }),
|
|
700
755
|
},
|
|
701
|
-
...modifiers
|
|
756
|
+
...modifiers,
|
|
702
757
|
);
|
|
703
758
|
if (hasEmberVersion(3, 26)) {
|
|
704
759
|
inputChildren.push(htmlElement);
|
|
@@ -718,10 +773,10 @@ module('Ember Debug - View', function (hooks) {
|
|
|
718
773
|
args: Args({ names: ['value'], positionals: 0 }),
|
|
719
774
|
template: /.*/,
|
|
720
775
|
},
|
|
721
|
-
...inputChildren
|
|
722
|
-
)
|
|
723
|
-
)
|
|
724
|
-
)
|
|
776
|
+
...inputChildren,
|
|
777
|
+
),
|
|
778
|
+
),
|
|
779
|
+
),
|
|
725
780
|
),
|
|
726
781
|
]);
|
|
727
782
|
});
|
|
@@ -747,7 +802,7 @@ module('Ember Debug - View', function (hooks) {
|
|
|
747
802
|
QUnit.assert.equal(
|
|
748
803
|
value.details[0].properties[0].value.inspect,
|
|
749
804
|
'{ x: 123, x.y: 456 }',
|
|
750
|
-
'test-bar args value inspect should be correct'
|
|
805
|
+
'test-bar args value inspect should be correct',
|
|
751
806
|
);
|
|
752
807
|
}
|
|
753
808
|
argsTestPromise = testArgsValue();
|
|
@@ -763,7 +818,7 @@ module('Ember Debug - View', function (hooks) {
|
|
|
763
818
|
QUnit.assert.equal(
|
|
764
819
|
value.details[1].name,
|
|
765
820
|
'HTMLDivElement',
|
|
766
|
-
'in-element args value inspect should be correct'
|
|
821
|
+
'in-element args value inspect should be correct',
|
|
767
822
|
);
|
|
768
823
|
}
|
|
769
824
|
argsTestPromise = testArgsValue();
|
|
@@ -773,7 +828,7 @@ module('Ember Debug - View', function (hooks) {
|
|
|
773
828
|
Component({
|
|
774
829
|
name: 'test-component-in-in-element',
|
|
775
830
|
template: () => null,
|
|
776
|
-
})
|
|
831
|
+
}),
|
|
777
832
|
),
|
|
778
833
|
];
|
|
779
834
|
|
|
@@ -790,9 +845,9 @@ module('Ember Debug - View', function (hooks) {
|
|
|
790
845
|
name: 'did-insert',
|
|
791
846
|
args: Args({ positionals: 1 }),
|
|
792
847
|
}),
|
|
793
|
-
...children
|
|
848
|
+
...children,
|
|
794
849
|
),
|
|
795
|
-
]
|
|
850
|
+
],
|
|
796
851
|
);
|
|
797
852
|
} else {
|
|
798
853
|
root.push(...children);
|
|
@@ -800,13 +855,13 @@ module('Ember Debug - View', function (hooks) {
|
|
|
800
855
|
|
|
801
856
|
matchTree(tree, [
|
|
802
857
|
TopLevel(
|
|
803
|
-
Route({ name: 'application' }, Route({ name: 'simple' }, ...root))
|
|
858
|
+
Route({ name: 'application' }, Route({ name: 'simple' }, ...root)),
|
|
804
859
|
),
|
|
805
860
|
]);
|
|
806
861
|
|
|
807
862
|
QUnit.assert.ok(
|
|
808
863
|
argsTestPromise instanceof Promise,
|
|
809
|
-
'args should be tested'
|
|
864
|
+
'args should be tested',
|
|
810
865
|
);
|
|
811
866
|
await argsTestPromise;
|
|
812
867
|
});
|
|
@@ -818,7 +873,7 @@ module('Ember Debug - View', function (hooks) {
|
|
|
818
873
|
.dom(this.element)
|
|
819
874
|
.hasClass(
|
|
820
875
|
'ember-application',
|
|
821
|
-
'The rootElement has the .ember-application CSS class'
|
|
876
|
+
'The rootElement has the .ember-application CSS class',
|
|
822
877
|
);
|
|
823
878
|
|
|
824
879
|
this.element.classList.remove('ember-application');
|
|
@@ -832,7 +887,7 @@ module('Ember Debug - View', function (hooks) {
|
|
|
832
887
|
.dom(this.element)
|
|
833
888
|
.doesNotHaveClass(
|
|
834
889
|
'ember-application',
|
|
835
|
-
'The rootElement no longer has the .ember-application CSS class'
|
|
890
|
+
'The rootElement no longer has the .ember-application CSS class',
|
|
836
891
|
);
|
|
837
892
|
|
|
838
893
|
let tree = await getRenderTree();
|
|
@@ -855,7 +910,7 @@ module('Ember Debug - View', function (hooks) {
|
|
|
855
910
|
Component({
|
|
856
911
|
name: 'test-component-in-in-element',
|
|
857
912
|
template: () => null,
|
|
858
|
-
})
|
|
913
|
+
}),
|
|
859
914
|
),
|
|
860
915
|
];
|
|
861
916
|
|
|
@@ -872,9 +927,9 @@ module('Ember Debug - View', function (hooks) {
|
|
|
872
927
|
name: 'did-insert',
|
|
873
928
|
args: Args({ positionals: 1 }),
|
|
874
929
|
}),
|
|
875
|
-
...children
|
|
930
|
+
...children,
|
|
876
931
|
),
|
|
877
|
-
]
|
|
932
|
+
],
|
|
878
933
|
);
|
|
879
934
|
} else {
|
|
880
935
|
root.push(...children);
|
|
@@ -882,32 +937,35 @@ module('Ember Debug - View', function (hooks) {
|
|
|
882
937
|
|
|
883
938
|
matchTree(tree, [
|
|
884
939
|
TopLevel(
|
|
885
|
-
Route({ name: 'application' }, Route({ name: 'simple' }, ...root))
|
|
940
|
+
Route({ name: 'application' }, Route({ name: 'simple' }, ...root)),
|
|
886
941
|
),
|
|
887
942
|
]);
|
|
888
943
|
});
|
|
889
944
|
|
|
890
945
|
test('Does not list nested {{yield}} views', async function () {
|
|
891
|
-
this.owner.register('component:x-first', EmberComponent.extend());
|
|
892
|
-
this.owner.register('component:x-second', EmberComponent.extend());
|
|
893
|
-
|
|
894
946
|
this.owner.register(
|
|
895
|
-
'
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
947
|
+
'component:x-first',
|
|
948
|
+
setComponentTemplate(
|
|
949
|
+
hbs('{{#x-second}}{{yield}}{{/x-second}}', {
|
|
950
|
+
moduleName: 'my-app/components/x-first.hbs',
|
|
951
|
+
}),
|
|
952
|
+
EmberComponent.extend(),
|
|
953
|
+
),
|
|
899
954
|
);
|
|
900
955
|
this.owner.register(
|
|
901
|
-
'
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
956
|
+
'component:x-second',
|
|
957
|
+
setComponentTemplate(
|
|
958
|
+
hbs('{{yield}}', {
|
|
959
|
+
moduleName: 'my-app/components/x-second.hbs',
|
|
960
|
+
}),
|
|
961
|
+
EmberComponent.extend(),
|
|
962
|
+
),
|
|
905
963
|
);
|
|
906
964
|
this.owner.register(
|
|
907
|
-
'template:
|
|
908
|
-
hbs('{{
|
|
909
|
-
moduleName: 'my-app/templates/
|
|
910
|
-
})
|
|
965
|
+
'template:posts',
|
|
966
|
+
hbs('{{#x-first}}Foo{{/x-first}}', {
|
|
967
|
+
moduleName: 'my-app/templates/posts.hbs',
|
|
968
|
+
}),
|
|
911
969
|
);
|
|
912
970
|
|
|
913
971
|
await visit('/posts');
|
|
@@ -920,9 +978,9 @@ module('Ember Debug - View', function (hooks) {
|
|
|
920
978
|
{ name: 'application' },
|
|
921
979
|
Route(
|
|
922
980
|
{ name: 'posts' },
|
|
923
|
-
Component({ name: 'x-first' }, Component({ name: 'x-second' }))
|
|
924
|
-
)
|
|
925
|
-
)
|
|
981
|
+
Component({ name: 'x-first' }, Component({ name: 'x-second' })),
|
|
982
|
+
),
|
|
983
|
+
),
|
|
926
984
|
),
|
|
927
985
|
]);
|
|
928
986
|
});
|
|
@@ -946,8 +1004,9 @@ module('Ember Debug - View', function (hooks) {
|
|
|
946
1004
|
assert.ok(!isVisible(tooltip), 'tooltip is not visible');
|
|
947
1005
|
assert.ok(!isVisible(highlight), 'highlight is not visible');
|
|
948
1006
|
|
|
1007
|
+
// eslint-disable-next-line ember/no-runloop
|
|
949
1008
|
run(() =>
|
|
950
|
-
EmberDebug.port.trigger('view:inspectViews', { inspect: true })
|
|
1009
|
+
EmberDebug.port.trigger('view:inspectViews', { inspect: true }),
|
|
951
1010
|
);
|
|
952
1011
|
});
|
|
953
1012
|
|
|
@@ -965,10 +1024,7 @@ module('Ember Debug - View', function (hooks) {
|
|
|
965
1024
|
assert
|
|
966
1025
|
.dom('.ember-inspector-tooltip-detail-template', tooltip)
|
|
967
1026
|
.hasText(
|
|
968
|
-
'my-app/
|
|
969
|
-
/\//g,
|
|
970
|
-
'\u200B/\u200B'
|
|
971
|
-
)
|
|
1027
|
+
'my-app/components/test-foo.hbs'.replace(/\//g, '\u200B/\u200B'),
|
|
972
1028
|
);
|
|
973
1029
|
assert
|
|
974
1030
|
.dom('.ember-inspector-tooltip-detail-instance', tooltip)
|
|
@@ -983,12 +1039,12 @@ module('Ember Debug - View', function (hooks) {
|
|
|
983
1039
|
assert.strictEqual(
|
|
984
1040
|
actual.width,
|
|
985
1041
|
expected.width,
|
|
986
|
-
'same width as component'
|
|
1042
|
+
'same width as component',
|
|
987
1043
|
);
|
|
988
1044
|
assert.strictEqual(
|
|
989
1045
|
actual.height,
|
|
990
1046
|
expected.height,
|
|
991
|
-
'same height as component'
|
|
1047
|
+
'same height as component',
|
|
992
1048
|
);
|
|
993
1049
|
|
|
994
1050
|
await triggerEvent('.bar-inner', 'mousemove');
|
|
@@ -1000,17 +1056,14 @@ module('Ember Debug - View', function (hooks) {
|
|
|
1000
1056
|
assert
|
|
1001
1057
|
.dom('.ember-inspector-tooltip-detail-template', tooltip)
|
|
1002
1058
|
.hasText(
|
|
1003
|
-
'my-app/
|
|
1004
|
-
/\//g,
|
|
1005
|
-
'\u200B/\u200B'
|
|
1006
|
-
)
|
|
1059
|
+
'my-app/components/test-bar.hbs'.replace(/\//g, '\u200B/\u200B'),
|
|
1007
1060
|
);
|
|
1008
1061
|
assert
|
|
1009
1062
|
.dom('.ember-inspector-tooltip-detail-instance', tooltip)
|
|
1010
1063
|
.hasText(
|
|
1011
1064
|
templateOnlyComponent
|
|
1012
1065
|
? 'TemplateOnlyComponent'
|
|
1013
|
-
: 'App.TestBarComponent'
|
|
1066
|
+
: 'App.TestBarComponent',
|
|
1014
1067
|
);
|
|
1015
1068
|
|
|
1016
1069
|
actual = highlight.getBoundingClientRect();
|
|
@@ -1022,12 +1075,12 @@ module('Ember Debug - View', function (hooks) {
|
|
|
1022
1075
|
assert.strictEqual(
|
|
1023
1076
|
actual.width,
|
|
1024
1077
|
expected.width,
|
|
1025
|
-
'same width as component'
|
|
1078
|
+
'same width as component',
|
|
1026
1079
|
);
|
|
1027
1080
|
assert.strictEqual(
|
|
1028
1081
|
actual.height,
|
|
1029
1082
|
expected.height,
|
|
1030
|
-
'same height as component'
|
|
1083
|
+
'same height as component',
|
|
1031
1084
|
);
|
|
1032
1085
|
|
|
1033
1086
|
await triggerEvent(document.body, 'mousemove');
|
|
@@ -1046,10 +1099,7 @@ module('Ember Debug - View', function (hooks) {
|
|
|
1046
1099
|
assert
|
|
1047
1100
|
.dom('.ember-inspector-tooltip-detail-template', tooltip)
|
|
1048
1101
|
.hasText(
|
|
1049
|
-
'my-app/
|
|
1050
|
-
/\//g,
|
|
1051
|
-
'\u200B/\u200B'
|
|
1052
|
-
)
|
|
1102
|
+
'my-app/components/test-foo.hbs'.replace(/\//g, '\u200B/\u200B'),
|
|
1053
1103
|
);
|
|
1054
1104
|
assert
|
|
1055
1105
|
.dom('.ember-inspector-tooltip-detail-instance', tooltip)
|
|
@@ -1065,7 +1115,7 @@ module('Ember Debug - View', function (hooks) {
|
|
|
1065
1115
|
assert.deepEqual(
|
|
1066
1116
|
actual.height,
|
|
1067
1117
|
expected.height,
|
|
1068
|
-
'same height as component'
|
|
1118
|
+
'same height as component',
|
|
1069
1119
|
);
|
|
1070
1120
|
|
|
1071
1121
|
assert.ok(isVisible(tooltip), 'tooltip is visible');
|
|
@@ -1075,10 +1125,7 @@ module('Ember Debug - View', function (hooks) {
|
|
|
1075
1125
|
assert
|
|
1076
1126
|
.dom('.ember-inspector-tooltip-detail-template', tooltip)
|
|
1077
1127
|
.hasText(
|
|
1078
|
-
'my-app/
|
|
1079
|
-
/\//g,
|
|
1080
|
-
'\u200B/\u200B'
|
|
1081
|
-
)
|
|
1128
|
+
'my-app/components/test-foo.hbs'.replace(/\//g, '\u200B/\u200B'),
|
|
1082
1129
|
);
|
|
1083
1130
|
assert
|
|
1084
1131
|
.dom('.ember-inspector-tooltip-detail-instance', tooltip)
|
|
@@ -1117,7 +1164,6 @@ module('Ember Debug - View', function (hooks) {
|
|
|
1117
1164
|
let actual = highlight.getBoundingClientRect();
|
|
1118
1165
|
let expected = inElement.getBoundingClientRect();
|
|
1119
1166
|
|
|
1120
|
-
// await this.pauseTest();
|
|
1121
1167
|
assert.ok(isVisible(tooltip), 'tooltip is visible');
|
|
1122
1168
|
assert.ok(isVisible(highlight), 'highlight is visible');
|
|
1123
1169
|
|
|
@@ -1127,7 +1173,7 @@ module('Ember Debug - View', function (hooks) {
|
|
|
1127
1173
|
assert.deepEqual(
|
|
1128
1174
|
actual.height,
|
|
1129
1175
|
expected.height,
|
|
1130
|
-
'same height as component'
|
|
1176
|
+
'same height as component',
|
|
1131
1177
|
);
|
|
1132
1178
|
|
|
1133
1179
|
assert
|
|
@@ -1151,7 +1197,6 @@ module('Ember Debug - View', function (hooks) {
|
|
|
1151
1197
|
let actual = highlight.getBoundingClientRect();
|
|
1152
1198
|
let expected = inElement.getBoundingClientRect();
|
|
1153
1199
|
|
|
1154
|
-
// await this.pauseTest();
|
|
1155
1200
|
assert.ok(isVisible(tooltip), 'tooltip is visible');
|
|
1156
1201
|
assert.ok(isVisible(highlight), 'highlight is visible');
|
|
1157
1202
|
|
|
@@ -1161,7 +1206,7 @@ module('Ember Debug - View', function (hooks) {
|
|
|
1161
1206
|
assert.deepEqual(
|
|
1162
1207
|
actual.height,
|
|
1163
1208
|
expected.height,
|
|
1164
|
-
'same height as component'
|
|
1209
|
+
'same height as component',
|
|
1165
1210
|
);
|
|
1166
1211
|
|
|
1167
1212
|
assert
|
|
@@ -1185,7 +1230,6 @@ module('Ember Debug - View', function (hooks) {
|
|
|
1185
1230
|
let actual = highlight.getBoundingClientRect();
|
|
1186
1231
|
let expected = inElement.getBoundingClientRect();
|
|
1187
1232
|
|
|
1188
|
-
// await this.pauseTest();
|
|
1189
1233
|
assert.ok(isVisible(tooltip), 'tooltip is visible');
|
|
1190
1234
|
assert.ok(isVisible(highlight), 'highlight is visible');
|
|
1191
1235
|
|
|
@@ -1195,12 +1239,52 @@ module('Ember Debug - View', function (hooks) {
|
|
|
1195
1239
|
assert.deepEqual(
|
|
1196
1240
|
actual.height,
|
|
1197
1241
|
expected.height,
|
|
1198
|
-
'same height as component'
|
|
1242
|
+
'same height as component',
|
|
1199
1243
|
);
|
|
1200
1244
|
|
|
1201
1245
|
assert
|
|
1202
1246
|
.dom('.ember-inspector-tooltip-detail-instance', tooltip)
|
|
1203
1247
|
.hasText(/ember-wormhole/);
|
|
1204
1248
|
});
|
|
1249
|
+
|
|
1250
|
+
test('component inside shadow dom', async function (assert) {
|
|
1251
|
+
if (isInVersionSpecifier('^5.8.0', VERSION)) {
|
|
1252
|
+
assert.expect(2);
|
|
1253
|
+
return;
|
|
1254
|
+
}
|
|
1255
|
+
await visit('component-in-shadow-dom');
|
|
1256
|
+
await rerender();
|
|
1257
|
+
await getRenderTree();
|
|
1258
|
+
|
|
1259
|
+
const inShadow = window.testShadow.querySelector('.simple-component');
|
|
1260
|
+
|
|
1261
|
+
await click(window.testShadow.host, {
|
|
1262
|
+
clientX: inShadow.getBoundingClientRect().x,
|
|
1263
|
+
clientY: inShadow.getBoundingClientRect().y,
|
|
1264
|
+
});
|
|
1265
|
+
|
|
1266
|
+
assert
|
|
1267
|
+
.dom('.ember-inspector-tooltip-header', tooltip)
|
|
1268
|
+
.hasText('<TestFoo>');
|
|
1269
|
+
|
|
1270
|
+
let actual = highlight.getBoundingClientRect();
|
|
1271
|
+
let expected = inShadow.getBoundingClientRect();
|
|
1272
|
+
|
|
1273
|
+
assert.ok(isVisible(tooltip), 'tooltip is visible');
|
|
1274
|
+
assert.ok(isVisible(highlight), 'highlight is visible');
|
|
1275
|
+
|
|
1276
|
+
assert.deepEqual(actual.x, expected.x, 'same x as component');
|
|
1277
|
+
assert.deepEqual(actual.y, expected.y, 'same y as component');
|
|
1278
|
+
assert.deepEqual(actual.width, expected.width, 'same width as component');
|
|
1279
|
+
assert.deepEqual(
|
|
1280
|
+
actual.height,
|
|
1281
|
+
expected.height,
|
|
1282
|
+
'same height as component',
|
|
1283
|
+
);
|
|
1284
|
+
|
|
1285
|
+
assert
|
|
1286
|
+
.dom('.ember-inspector-tooltip-detail-instance', tooltip)
|
|
1287
|
+
.hasText('App.TestFooComponent');
|
|
1288
|
+
});
|
|
1205
1289
|
});
|
|
1206
1290
|
});
|