ember-inspector 4.13.1-alpha.2024.8.9 → 4.13.1-alpha.2025.10.2
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/PRIVACY.md +3 -0
- package/README.md +10 -2
- 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 +1 -0
- 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 +2 -2
- 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} +9 -20
- 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 +21 -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.25304d5512b5af001d54.js +40 -0
- package/dist/bookmarklet/panes-3-16-0/assets/chunk.582.8b244c3850a8429bac52.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 +557 -609
- 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-DfbgtngO.js +144 -0
- package/dist/bookmarklet/panes-3-16-0/basic-debug.js +6 -0
- package/dist/bookmarklet/panes-3-16-0/bookmarklet-debug.js +34 -0
- package/dist/bookmarklet/panes-3-16-0/chrome-debug.js +12 -0
- package/dist/bookmarklet/panes-3-16-0/ember.js +115 -0
- package/dist/bookmarklet/panes-3-16-0/ember_debug.js +24 -11011
- package/dist/bookmarklet/panes-3-16-0/evented-BCTya3yE.js +62 -0
- package/dist/bookmarklet/panes-3-16-0/firefox-debug.js +32 -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/main.js +7663 -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-CF-Qpqgy.js +1138 -0
- package/dist/bookmarklet/panes-3-16-0/start-inspector-BPAW_WLv.js +376 -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-C3pMNVSY.js +144 -0
- package/dist/bookmarklet/panes-3-16-0/websocket-debug.js +60 -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 +3 -3
- 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.25304d5512b5af001d54.js +40 -0
- package/dist/chrome/panes-3-16-0/assets/chunk.582.8b244c3850a8429bac52.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 +557 -609
- 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-DfbgtngO.js +144 -0
- package/dist/chrome/panes-3-16-0/basic-debug.js +6 -0
- package/dist/chrome/panes-3-16-0/bookmarklet-debug.js +34 -0
- package/dist/chrome/panes-3-16-0/chrome-debug.js +12 -0
- package/dist/chrome/panes-3-16-0/ember.js +115 -0
- package/dist/chrome/panes-3-16-0/ember_debug.js +12 -11021
- package/dist/chrome/panes-3-16-0/evented-BCTya3yE.js +62 -0
- package/dist/chrome/panes-3-16-0/firefox-debug.js +32 -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/main.js +7663 -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-CF-Qpqgy.js +1138 -0
- package/dist/chrome/panes-3-16-0/start-inspector-BPAW_WLv.js +376 -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-C3pMNVSY.js +144 -0
- package/dist/chrome/panes-3-16-0/websocket-debug.js +60 -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 +3 -3
- 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.25304d5512b5af001d54.js +40 -0
- package/dist/firefox/panes-3-16-0/assets/chunk.582.8b244c3850a8429bac52.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 +557 -609
- 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-DfbgtngO.js +144 -0
- package/dist/firefox/panes-3-16-0/basic-debug.js +6 -0
- package/dist/firefox/panes-3-16-0/bookmarklet-debug.js +34 -0
- package/dist/firefox/panes-3-16-0/chrome-debug.js +12 -0
- package/dist/firefox/panes-3-16-0/ember.js +115 -0
- package/dist/firefox/panes-3-16-0/ember_debug.js +27 -11016
- package/dist/firefox/panes-3-16-0/evented-BCTya3yE.js +62 -0
- package/dist/firefox/panes-3-16-0/firefox-debug.js +32 -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/main.js +7663 -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-CF-Qpqgy.js +1138 -0
- package/dist/firefox/panes-3-16-0/start-inspector-BPAW_WLv.js +376 -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-C3pMNVSY.js +144 -0
- package/dist/firefox/panes-3-16-0/websocket-debug.js +60 -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.25304d5512b5af001d54.js +40 -0
- package/dist/websocket/assets/chunk.582.8b244c3850a8429bac52.js +42 -0
- package/dist/websocket/assets/ember-inspector.css +997 -156
- package/dist/websocket/assets/ember-inspector.js +557 -609
- 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-DfbgtngO.js +144 -0
- package/dist/websocket/basic-debug.js +6 -0
- package/dist/websocket/bookmarklet-debug.js +34 -0
- package/dist/websocket/chrome-debug.js +12 -0
- package/dist/websocket/ember.js +115 -0
- package/dist/websocket/ember_debug.js +48 -11009
- package/dist/websocket/evented-BCTya3yE.js +62 -0
- package/dist/websocket/firefox-debug.js +32 -0
- package/dist/websocket/index.html +4 -23
- package/dist/websocket/internals-CRmXMEzb.js +12 -0
- package/dist/websocket/main.js +7663 -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-CF-Qpqgy.js +1138 -0
- package/dist/websocket/start-inspector-BPAW_WLv.js +376 -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-C3pMNVSY.js +144 -0
- package/dist/websocket/websocket-debug.js +60 -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 +6 -0
- package/ember_debug/entrypoints/bookmarklet-debug.js +6 -0
- package/ember_debug/entrypoints/chrome-debug.js +6 -0
- package/ember_debug/entrypoints/firefox-debug.js +6 -0
- package/ember_debug/entrypoints/websocket-debug.js +6 -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 +27 -0
- package/ember_debug/lib/load-ember-debug-in-webpage.js +30 -0
- package/ember_debug/lib/send-apps.js +14 -0
- package/ember_debug/lib/send-version-miss.js +39 -0
- package/ember_debug/lib/setup-instance-initializer.js +16 -0
- package/ember_debug/lib/start-inspector.js +211 -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 +71 -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 +7 -8
- package/ember_debug/utils/ember.js +120 -14
- 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/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 -3
- 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 +8 -10
- 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 +4 -4
- package/tests/ember_debug/container-debug-test.js +4 -4
- package/tests/ember_debug/deprecation-debug-test.js +8 -5
- package/tests/ember_debug/ember-debug-test.js +1 -4
- package/tests/ember_debug/object-inspector-test.js +108 -49
- package/tests/ember_debug/profile-manager-test.js +142 -169
- package/tests/ember_debug/profile-node-test.js +4 -4
- package/tests/ember_debug/promise-assembler-test.js +13 -10
- package/tests/ember_debug/promise-debug-test.js +5 -6
- package/tests/ember_debug/route-debug-test.js +8 -7
- package/tests/ember_debug/view-debug-test.js +257 -182
- package/tests/helpers/{index.js → index.ts} +6 -5
- package/tests/helpers/setup-ember-debug-test.js +14 -0
- package/tests/index.html +1 -2
- package/tests/integration/injection-test.js +14 -15
- 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 +22 -0
- package/tsconfig.json +3 -1
- package/types/ember-inspector/index.d.ts +2 -1
- package/types/global.d.ts +1 -7
- package/.editorconfig +0 -19
- package/.ember-cli +0 -15
- package/.eslintignore +0 -33
- package/.eslintrc.js +0 -86
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -30
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- package/.github/dependabot.yml +0 -14
- package/.github/pull_request_template.md +0 -4
- package/.github/workflows/build.yml +0 -339
- package/.github/workflows/plan-release.yml +0 -83
- package/.github/workflows/publish.yml +0 -60
- package/.prettierignore +0 -25
- package/.prettierrc.js +0 -14
- package/.release-plan.json +0 -17
- package/.stylelintrc.js +0 -3
- package/.template-lintrc.js +0 -12
- package/.tool-versions +0 -2
- package/.watchmanconfig +0 -3
- package/app/components/.gitkeep +0 -0
- package/app/components/list-content.js +0 -130
- package/app/controllers/.gitkeep +0 -0
- package/app/controllers/promise-tree.js +0 -130
- package/app/helpers/.gitkeep +0 -0
- package/app/libs/promise-assembler.js +0 -169
- package/app/models/.gitkeep +0 -0
- package/app/routes/.gitkeep +0 -0
- 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.143ca772b0b28102c74a.js +0 -28
- package/dist/bookmarklet/panes-3-16-0/assets/chunk.178.b50e140d1ed8777b583e.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.143ca772b0b28102c74a.js +0 -28
- package/dist/chrome/panes-3-16-0/assets/chunk.178.b50e140d1ed8777b583e.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.143ca772b0b28102c74a.js +0 -28
- package/dist/firefox/panes-3-16-0/assets/chunk.178.b50e140d1ed8777b583e.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.143ca772b0b28102c74a.js +0 -28
- package/dist/websocket/assets/chunk.178.b50e140d1ed8777b583e.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/tests/unit/.gitkeep +0 -0
- /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
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
|
2
|
+
import { assert } from '@ember/debug';
|
|
3
|
+
import { later } from '@ember/runloop';
|
|
4
|
+
import EmberObject, { action, setProperties } from '@ember/object';
|
|
5
|
+
import { addListener, removeListener, sendEvent } from '@ember/object/events';
|
|
6
|
+
import type { AnyFn } from '@ember/-internals/utility-types';
|
|
7
|
+
|
|
8
|
+
import { TrackedArray, TrackedObject } from 'tracked-built-ins';
|
|
9
|
+
import { tracked } from '@glimmer/tracking';
|
|
10
|
+
|
|
11
|
+
import PromiseModel from '../models/promise';
|
|
12
|
+
import type PortService from '../services/port';
|
|
13
|
+
|
|
14
|
+
interface SerializedPromise {
|
|
15
|
+
children?: Array<string>;
|
|
16
|
+
guid: string;
|
|
17
|
+
label: string;
|
|
18
|
+
parent?: string;
|
|
19
|
+
reason: string;
|
|
20
|
+
state: string;
|
|
21
|
+
value: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export default class PromiseAssembler extends EmberObject {
|
|
25
|
+
declare port: PortService;
|
|
26
|
+
// Used to track whether current message received
|
|
27
|
+
// is the first in the request
|
|
28
|
+
// Mainly helps in triggering 'firstMessageReceived' event
|
|
29
|
+
@tracked firstMessageReceived = false;
|
|
30
|
+
|
|
31
|
+
all = new TrackedArray<PromiseModel>([]);
|
|
32
|
+
promiseIndex = new TrackedObject<Record<string, number>>({});
|
|
33
|
+
topSort = new TrackedArray<PromiseModel>([]);
|
|
34
|
+
topSortMeta = new TrackedObject<Record<string, { hasParent?: boolean }>>({});
|
|
35
|
+
|
|
36
|
+
start() {
|
|
37
|
+
this.port.on('promise:promisesUpdated', this, this.addOrUpdatePromises);
|
|
38
|
+
this.port.send('promise:getAndObservePromises');
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
stop() {
|
|
42
|
+
this.port.off('promise:promisesUpdated', this, this.addOrUpdatePromises);
|
|
43
|
+
this.port.send('promise:releasePromises');
|
|
44
|
+
this.reset();
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
reset() {
|
|
48
|
+
this.topSortMeta = new TrackedObject<
|
|
49
|
+
Record<string, { hasParent?: boolean }>
|
|
50
|
+
>({});
|
|
51
|
+
this.promiseIndex = new TrackedObject<Record<string, number>>({});
|
|
52
|
+
this.topSort.splice(0, this.topSort.length);
|
|
53
|
+
|
|
54
|
+
this.firstMessageReceived = false;
|
|
55
|
+
const all = this.all;
|
|
56
|
+
// Lazily destroy promises
|
|
57
|
+
// Allows for a smooth transition on deactivate,
|
|
58
|
+
// and thus providing the illusion of better perf
|
|
59
|
+
// eslint-disable-next-line ember/no-runloop
|
|
60
|
+
later(
|
|
61
|
+
this,
|
|
62
|
+
function () {
|
|
63
|
+
this.destroyPromises(all);
|
|
64
|
+
},
|
|
65
|
+
500,
|
|
66
|
+
);
|
|
67
|
+
this.all = new TrackedArray([]);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
destroyPromises(promises: Array<EmberObject>) {
|
|
71
|
+
promises.forEach(function (item) {
|
|
72
|
+
item.destroy();
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
addOrUpdatePromises = (message: { promises: Array<SerializedPromise> }) => {
|
|
77
|
+
this.rebuildPromises(message.promises);
|
|
78
|
+
|
|
79
|
+
if (!this.firstMessageReceived) {
|
|
80
|
+
this.firstMessageReceived = true;
|
|
81
|
+
this.trigger('firstMessageReceived');
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
rebuildPromises = (promises: Array<SerializedPromise | PromiseModel>) => {
|
|
86
|
+
promises.forEach((props) => {
|
|
87
|
+
props = Object.assign({}, props);
|
|
88
|
+
const childrenIds = props.children;
|
|
89
|
+
const parentId = props.parent;
|
|
90
|
+
delete props.children;
|
|
91
|
+
delete props.parent;
|
|
92
|
+
if (parentId && parentId !== props.guid) {
|
|
93
|
+
props.parent = this.updateOrCreate({ guid: parentId });
|
|
94
|
+
}
|
|
95
|
+
const promise = this.updateOrCreate(props);
|
|
96
|
+
if (childrenIds) {
|
|
97
|
+
childrenIds.forEach((childId) => {
|
|
98
|
+
// avoid infinite recursion
|
|
99
|
+
if (childId === props.guid) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
const child = this.updateOrCreate({ guid: childId, parent: promise });
|
|
103
|
+
promise.children.push(child);
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
updateTopSort = (promise: PromiseModel) => {
|
|
110
|
+
const topSortMeta = this.topSortMeta;
|
|
111
|
+
const guid = promise.guid;
|
|
112
|
+
let meta = topSortMeta[guid] ?? {};
|
|
113
|
+
const isNew = !meta;
|
|
114
|
+
let hadParent: boolean | undefined = false;
|
|
115
|
+
const hasParent = !!promise.parent;
|
|
116
|
+
const topSort = this.topSort;
|
|
117
|
+
let parentChanged = isNew;
|
|
118
|
+
|
|
119
|
+
if (isNew) {
|
|
120
|
+
meta = topSortMeta[guid] = {};
|
|
121
|
+
} else {
|
|
122
|
+
hadParent = meta.hasParent;
|
|
123
|
+
}
|
|
124
|
+
if (!isNew && hasParent !== hadParent) {
|
|
125
|
+
// todo: implement recursion to reposition children
|
|
126
|
+
const index = topSort.indexOf(promise);
|
|
127
|
+
if (index !== -1) {
|
|
128
|
+
topSort.splice(index, 1);
|
|
129
|
+
}
|
|
130
|
+
parentChanged = true;
|
|
131
|
+
}
|
|
132
|
+
meta.hasParent = hasParent;
|
|
133
|
+
if (parentChanged) {
|
|
134
|
+
this.insertInTopSort(promise);
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
insertInTopSort = (promise: PromiseModel) => {
|
|
139
|
+
const topSort = this.topSort;
|
|
140
|
+
if (promise.parent) {
|
|
141
|
+
const parentIndex = topSort.indexOf(promise.parent);
|
|
142
|
+
topSort.splice(parentIndex + 1, 0, promise);
|
|
143
|
+
} else {
|
|
144
|
+
this.topSort.push(promise);
|
|
145
|
+
}
|
|
146
|
+
promise.children.forEach((child) => {
|
|
147
|
+
const index = topSort.indexOf(child);
|
|
148
|
+
if (index !== -1) {
|
|
149
|
+
topSort.splice(index, 1);
|
|
150
|
+
}
|
|
151
|
+
this.insertInTopSort(child);
|
|
152
|
+
});
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
156
|
+
updateOrCreate = (props: any) => {
|
|
157
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
158
|
+
const guid = props.guid;
|
|
159
|
+
const promise = this.findOrCreate(guid);
|
|
160
|
+
|
|
161
|
+
setProperties(promise, props);
|
|
162
|
+
|
|
163
|
+
this.updateTopSort(promise);
|
|
164
|
+
|
|
165
|
+
return promise;
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
169
|
+
createPromise(props: any): PromiseModel {
|
|
170
|
+
const promise = PromiseModel.create(props) as PromiseModel;
|
|
171
|
+
const index = this.all.length;
|
|
172
|
+
|
|
173
|
+
this.all.push(promise);
|
|
174
|
+
this.promiseIndex[promise.guid as keyof object] = index;
|
|
175
|
+
return promise;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
find(guid?: string) {
|
|
179
|
+
if (guid) {
|
|
180
|
+
const index = this.promiseIndex[guid as keyof object];
|
|
181
|
+
if (index !== undefined) {
|
|
182
|
+
return this.all.at(index);
|
|
183
|
+
}
|
|
184
|
+
} else {
|
|
185
|
+
return this.all;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
findOrCreate(guid?: string) {
|
|
190
|
+
if (!guid) {
|
|
191
|
+
assert('You have tried to findOrCreate without a guid');
|
|
192
|
+
}
|
|
193
|
+
return (this.find(guid) as PromiseModel) || this.createPromise({ guid });
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// Manually implement Evented functionality, so we can move away from the mixin
|
|
197
|
+
|
|
198
|
+
on(eventName: string, method: AnyFn): void;
|
|
199
|
+
on(eventName: string, target: unknown, method: AnyFn): void;
|
|
200
|
+
|
|
201
|
+
@action
|
|
202
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
203
|
+
on(eventName: string, targetOrMethod: unknown | AnyFn, method?: AnyFn): void {
|
|
204
|
+
if (typeof targetOrMethod === 'function') {
|
|
205
|
+
// If we did not pass a target, default to `this`
|
|
206
|
+
addListener(this, eventName, this, targetOrMethod as AnyFn);
|
|
207
|
+
} else {
|
|
208
|
+
addListener(this, eventName, targetOrMethod as object, method);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
one(eventName: string, method: AnyFn): void;
|
|
213
|
+
one(eventName: string, target: unknown, method: AnyFn): void;
|
|
214
|
+
|
|
215
|
+
@action
|
|
216
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
217
|
+
one(eventName: string, targetOrMethod: unknown | AnyFn, method?: AnyFn) {
|
|
218
|
+
if (typeof targetOrMethod === 'function') {
|
|
219
|
+
// If we did not pass a target, default to `this`
|
|
220
|
+
addListener(this, eventName, this, targetOrMethod as AnyFn, true);
|
|
221
|
+
} else {
|
|
222
|
+
addListener(this, eventName, targetOrMethod as object, method, true);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
off(eventName: string, method: AnyFn): void;
|
|
227
|
+
off(eventName: string, target: unknown, method: AnyFn): void;
|
|
228
|
+
|
|
229
|
+
@action
|
|
230
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
231
|
+
off(eventName: string, targetOrMethod: unknown | AnyFn, method?: AnyFn) {
|
|
232
|
+
try {
|
|
233
|
+
if (typeof targetOrMethod === 'function') {
|
|
234
|
+
// If we did not pass a target, default to `this`
|
|
235
|
+
removeListener(this, eventName, this, targetOrMethod as AnyFn);
|
|
236
|
+
} else {
|
|
237
|
+
removeListener(this, eventName, targetOrMethod as object, method);
|
|
238
|
+
}
|
|
239
|
+
} catch (e) {
|
|
240
|
+
console.error(e);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
@action
|
|
245
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
246
|
+
trigger(eventName: string, ...args: Array<any>) {
|
|
247
|
+
sendEvent(this, eventName, args);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
@@ -81,7 +81,7 @@ export default class {
|
|
|
81
81
|
let saved = this.storage.getItem(this.getStorageKey());
|
|
82
82
|
if (saved && saved.columnVisibility) {
|
|
83
83
|
let savedIds = keys(saved.columnVisibility).sort();
|
|
84
|
-
let schemaIds = this.columnSchema.
|
|
84
|
+
let schemaIds = this.columnSchema.map((col) => col.id).sort();
|
|
85
85
|
if (!compareArrays(savedIds, schemaIds)) {
|
|
86
86
|
// Clear saved items
|
|
87
87
|
this.storage.removeItem(this.getStorageKey());
|
|
@@ -165,7 +165,7 @@ export default class {
|
|
|
165
165
|
if (saved.columnVisibility && !isNone(saved.columnVisibility[id])) {
|
|
166
166
|
return saved.columnVisibility[id];
|
|
167
167
|
}
|
|
168
|
-
return this.columnSchema.
|
|
168
|
+
return this.columnSchema.find((x) => x.id === id).visible;
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
/**
|
|
@@ -195,7 +195,7 @@ export default class {
|
|
|
195
195
|
this._columnVisibility = this.columnSchema.map((column) =>
|
|
196
196
|
Object.assign({}, column, {
|
|
197
197
|
visible: this.isColumnVisible(column.id),
|
|
198
|
-
})
|
|
198
|
+
}),
|
|
199
199
|
);
|
|
200
200
|
}
|
|
201
201
|
|
|
@@ -221,8 +221,8 @@ export default class {
|
|
|
221
221
|
let diff = this.tableWidth - totalWidth;
|
|
222
222
|
while (diff > 0) {
|
|
223
223
|
columns
|
|
224
|
-
.
|
|
225
|
-
.
|
|
224
|
+
.filter((col) => !!col.visible)
|
|
225
|
+
.sort((a, b) => a.width - b.width)
|
|
226
226
|
.forEach((column) => {
|
|
227
227
|
if (diff > 0) {
|
|
228
228
|
column.width++;
|
|
@@ -245,7 +245,7 @@ export default class {
|
|
|
245
245
|
* @param {Number} width The column's new width
|
|
246
246
|
*/
|
|
247
247
|
updateColumnWidth(id, width) {
|
|
248
|
-
let column = this._columns.
|
|
248
|
+
let column = this._columns.find((x) => x.id === id);
|
|
249
249
|
let previousWidth = column.width;
|
|
250
250
|
column.width = width;
|
|
251
251
|
let last = this._columns[this._columns.length - 1];
|
|
@@ -265,9 +265,9 @@ export default class {
|
|
|
265
265
|
* @param {String} id
|
|
266
266
|
*/
|
|
267
267
|
toggleVisibility(id) {
|
|
268
|
-
let column = this._columnVisibility.
|
|
268
|
+
let column = this._columnVisibility.find((x) => x.id === id);
|
|
269
269
|
column.visible = !column.visible;
|
|
270
|
-
if (!this._columnVisibility.
|
|
270
|
+
if (!this._columnVisibility.some((col) => col.visible)) {
|
|
271
271
|
// If this column was the last visible column
|
|
272
272
|
// cancel toggling and set back to `true`.
|
|
273
273
|
column.visible = true;
|
|
@@ -317,7 +317,7 @@ export default class {
|
|
|
317
317
|
obj[id] = visible;
|
|
318
318
|
return obj;
|
|
319
319
|
},
|
|
320
|
-
{}
|
|
320
|
+
{},
|
|
321
321
|
);
|
|
322
322
|
this.storage.setItem(this.getStorageKey(), saved);
|
|
323
323
|
}
|
|
@@ -362,7 +362,7 @@ export default class {
|
|
|
362
362
|
* @method getStorageKey
|
|
363
363
|
*/
|
|
364
364
|
getStorageKey() {
|
|
365
|
-
return `
|
|
365
|
+
return `list-${this.key}`;
|
|
366
366
|
}
|
|
367
367
|
|
|
368
368
|
/**
|
|
@@ -1,17 +1,24 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
|
2
|
+
// @ts-expect-error This does not seem to be typed
|
|
1
3
|
import { observes } from '@ember-decorators/object';
|
|
2
|
-
import { or, equal, not } from '@ember/object/computed';
|
|
3
4
|
import { once } from '@ember/runloop';
|
|
4
|
-
import { typeOf
|
|
5
|
-
|
|
5
|
+
import { typeOf } from '@ember/utils';
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line ember/no-computed-properties-in-native-classes
|
|
6
8
|
import EmberObject, { computed } from '@ember/object';
|
|
7
|
-
import
|
|
9
|
+
import { tracked } from '@glimmer/tracking';
|
|
10
|
+
|
|
11
|
+
import { TrackedArray } from 'tracked-built-ins';
|
|
12
|
+
|
|
13
|
+
import escapeRegExp from '../utils/escape-reg-exp';
|
|
14
|
+
import { isNullish } from '../utils/nullish';
|
|
8
15
|
|
|
9
16
|
const dateComputed = function () {
|
|
10
17
|
return computed({
|
|
11
18
|
get() {
|
|
12
19
|
return null;
|
|
13
20
|
},
|
|
14
|
-
set(
|
|
21
|
+
set(_key, date: Date | number | string) {
|
|
15
22
|
if (typeOf(date) === 'date') {
|
|
16
23
|
return date;
|
|
17
24
|
} else if (typeof date === 'number' || typeof date === 'string') {
|
|
@@ -22,61 +29,63 @@ const dateComputed = function () {
|
|
|
22
29
|
});
|
|
23
30
|
};
|
|
24
31
|
|
|
25
|
-
export default class
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
export default class PromiseModel extends EmberObject {
|
|
33
|
+
children = new TrackedArray<PromiseModel>([]);
|
|
34
|
+
declare label?: string;
|
|
35
|
+
declare guid: string;
|
|
36
|
+
declare state: string;
|
|
37
|
+
// @ts-expect-error TODO: figure out types for this
|
|
38
|
+
@dateComputed() createdAt;
|
|
39
|
+
// @ts-expect-error TODO: figure out types for this
|
|
40
|
+
@dateComputed() settledAt;
|
|
41
|
+
|
|
42
|
+
@tracked branchLabel = '';
|
|
43
|
+
@tracked isExpanded = false;
|
|
44
|
+
@tracked isManuallyExpanded?: boolean = undefined;
|
|
45
|
+
@tracked parent: PromiseModel | null = null;
|
|
46
|
+
|
|
47
|
+
get level(): number {
|
|
48
|
+
const parent = this.parent;
|
|
37
49
|
if (!parent) {
|
|
38
50
|
return 0;
|
|
39
51
|
}
|
|
40
|
-
return parent.
|
|
52
|
+
return parent.level + 1;
|
|
41
53
|
}
|
|
42
54
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
@equal('state', 'fulfilled')
|
|
47
|
-
isFulfilled;
|
|
55
|
+
get isSettled() {
|
|
56
|
+
return this.isFulfilled || this.isRejected;
|
|
57
|
+
}
|
|
48
58
|
|
|
49
|
-
|
|
50
|
-
|
|
59
|
+
get isFulfilled() {
|
|
60
|
+
return this.state === 'fulfilled';
|
|
61
|
+
}
|
|
51
62
|
|
|
52
|
-
|
|
53
|
-
|
|
63
|
+
get isRejected() {
|
|
64
|
+
return this.state === 'rejected';
|
|
65
|
+
}
|
|
54
66
|
|
|
55
|
-
get
|
|
56
|
-
return
|
|
67
|
+
get isPending() {
|
|
68
|
+
return !this.isSettled;
|
|
57
69
|
}
|
|
58
70
|
|
|
59
|
-
@computed('isPending', 'children.@each.pendingBranch')
|
|
60
71
|
get pendingBranch() {
|
|
61
72
|
return this.recursiveState('isPending', 'pendingBranch');
|
|
62
73
|
}
|
|
63
74
|
|
|
64
|
-
@computed('isRejected', 'children.@each.rejectedBranch')
|
|
65
75
|
get rejectedBranch() {
|
|
66
76
|
return this.recursiveState('isRejected', 'rejectedBranch');
|
|
67
77
|
}
|
|
68
78
|
|
|
69
|
-
@computed('isFulfilled', 'children.@each.fulfilledBranch')
|
|
70
79
|
get fulfilledBranch() {
|
|
71
80
|
return this.recursiveState('isFulfilled', 'fulfilledBranch');
|
|
72
81
|
}
|
|
73
82
|
|
|
74
|
-
recursiveState(prop, cp) {
|
|
75
|
-
if (this
|
|
83
|
+
recursiveState(prop: keyof PromiseModel, cp: keyof PromiseModel) {
|
|
84
|
+
if (this[prop]) {
|
|
76
85
|
return true;
|
|
77
86
|
}
|
|
78
|
-
for (let i = 0; i < this.
|
|
79
|
-
if (this.children.
|
|
87
|
+
for (let i = 0; i < this.children.length; i++) {
|
|
88
|
+
if (this.children.at(i)?.[cp]) {
|
|
80
89
|
return true;
|
|
81
90
|
}
|
|
82
91
|
}
|
|
@@ -92,9 +101,9 @@ export default class Promise extends EmberObject {
|
|
|
92
101
|
return;
|
|
93
102
|
}
|
|
94
103
|
if (
|
|
95
|
-
(this.pendingBranch && !this.
|
|
96
|
-
(this.fulfilledBranch && !this.
|
|
97
|
-
(this.rejectedBranch && !this.
|
|
104
|
+
(this.pendingBranch && !this.parent.pendingBranch) ||
|
|
105
|
+
(this.fulfilledBranch && !this.parent.fulfilledBranch) ||
|
|
106
|
+
(this.rejectedBranch && !this.parent.rejectedBranch)
|
|
98
107
|
) {
|
|
99
108
|
this.parent.notifyPropertyChange('fulfilledBranch');
|
|
100
109
|
this.parent.notifyPropertyChange('rejectedBranch');
|
|
@@ -108,31 +117,29 @@ export default class Promise extends EmberObject {
|
|
|
108
117
|
this.addBranchLabel(this.label, true);
|
|
109
118
|
}
|
|
110
119
|
|
|
111
|
-
addBranchLabel(label, replace) {
|
|
112
|
-
if (
|
|
120
|
+
addBranchLabel(label?: string, replace?: boolean) {
|
|
121
|
+
if (isNullish(label)) {
|
|
113
122
|
return;
|
|
114
123
|
}
|
|
115
124
|
if (replace) {
|
|
116
|
-
this.
|
|
125
|
+
this.branchLabel = label;
|
|
117
126
|
} else {
|
|
118
|
-
this.
|
|
127
|
+
this.branchLabel = `${this.branchLabel} ${label}`;
|
|
119
128
|
}
|
|
120
129
|
|
|
121
|
-
|
|
130
|
+
const parent = this.parent;
|
|
122
131
|
if (parent) {
|
|
123
132
|
parent.addBranchLabel(label);
|
|
124
133
|
}
|
|
125
134
|
}
|
|
126
135
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
matches(val) {
|
|
136
|
+
matches(val: string) {
|
|
130
137
|
return !!this.branchLabel
|
|
131
138
|
.toLowerCase()
|
|
132
139
|
.match(new RegExp(`.*${escapeRegExp(val.toLowerCase())}.*`));
|
|
133
140
|
}
|
|
134
141
|
|
|
135
|
-
matchesExactly(val) {
|
|
142
|
+
matchesExactly(val: string) {
|
|
136
143
|
return !!(this.label || '')
|
|
137
144
|
.toLowerCase()
|
|
138
145
|
.match(new RegExp(`.*${escapeRegExp(val.toLowerCase())}.*`));
|
|
@@ -140,21 +147,18 @@ export default class Promise extends EmberObject {
|
|
|
140
147
|
|
|
141
148
|
// EXPANDED / COLLAPSED PROMISES
|
|
142
149
|
|
|
143
|
-
isExpanded = false;
|
|
144
|
-
|
|
145
|
-
isManuallyExpanded = undefined;
|
|
146
|
-
|
|
147
150
|
// eslint-disable-next-line ember/no-observers
|
|
148
151
|
@observes('isPending', 'isFulfilled', 'isRejected', 'parent')
|
|
149
152
|
stateOrParentChanged() {
|
|
150
|
-
|
|
153
|
+
const parent = this.parent;
|
|
151
154
|
if (parent) {
|
|
155
|
+
// eslint-disable-next-line ember/no-runloop
|
|
152
156
|
once(parent, 'recalculateExpanded');
|
|
153
157
|
}
|
|
154
158
|
}
|
|
155
159
|
|
|
156
|
-
_findTopParent() {
|
|
157
|
-
|
|
160
|
+
_findTopParent(): PromiseModel {
|
|
161
|
+
const parent = this.parent;
|
|
158
162
|
if (!parent) {
|
|
159
163
|
return this;
|
|
160
164
|
} else {
|
|
@@ -167,36 +171,35 @@ export default class Promise extends EmberObject {
|
|
|
167
171
|
if (this.isManuallyExpanded !== undefined) {
|
|
168
172
|
isExpanded = this.isManuallyExpanded;
|
|
169
173
|
} else {
|
|
170
|
-
|
|
171
|
-
for (let i = 0
|
|
172
|
-
|
|
173
|
-
if (child.
|
|
174
|
+
const children = this._allChildren();
|
|
175
|
+
for (let i = 0; i < children.length; i++) {
|
|
176
|
+
const child = children[i] as PromiseModel;
|
|
177
|
+
if (child.isRejected) {
|
|
174
178
|
isExpanded = true;
|
|
175
179
|
}
|
|
176
|
-
if (child.
|
|
180
|
+
if (child.isPending && !child.parent!.isPending) {
|
|
177
181
|
isExpanded = true;
|
|
178
182
|
}
|
|
179
183
|
if (isExpanded) {
|
|
180
184
|
break;
|
|
181
185
|
}
|
|
182
186
|
}
|
|
183
|
-
|
|
187
|
+
const parents = this._allParents();
|
|
184
188
|
if (isExpanded) {
|
|
185
189
|
parents.forEach((parent) => {
|
|
186
190
|
parent.set('isExpanded', true);
|
|
187
191
|
});
|
|
188
|
-
} else if (this.
|
|
192
|
+
} else if (this.parent?.isExpanded) {
|
|
189
193
|
this.parent.recalculateExpanded();
|
|
190
194
|
}
|
|
191
195
|
}
|
|
192
|
-
this.
|
|
196
|
+
this.isExpanded = isExpanded;
|
|
193
197
|
return isExpanded;
|
|
194
198
|
}
|
|
195
199
|
|
|
196
|
-
|
|
197
|
-
get isVisible() {
|
|
200
|
+
get isVisible(): boolean {
|
|
198
201
|
if (this.parent) {
|
|
199
|
-
return this.
|
|
202
|
+
return this.parent.isExpanded && this.parent.isVisible;
|
|
200
203
|
}
|
|
201
204
|
return true;
|
|
202
205
|
}
|
|
@@ -204,13 +207,13 @@ export default class Promise extends EmberObject {
|
|
|
204
207
|
_allChildren() {
|
|
205
208
|
let children = [...this.children];
|
|
206
209
|
children.forEach((item) => {
|
|
207
|
-
children = [...children, item._allChildren()];
|
|
210
|
+
children = [...children, ...item._allChildren()];
|
|
208
211
|
});
|
|
209
212
|
return children;
|
|
210
213
|
}
|
|
211
214
|
|
|
212
|
-
_allParents() {
|
|
213
|
-
|
|
215
|
+
_allParents(): Array<PromiseModel> {
|
|
216
|
+
const parent = this.parent;
|
|
214
217
|
if (parent) {
|
|
215
218
|
return [parent, ...parent._allParents()];
|
|
216
219
|
} else {
|
|
@@ -16,18 +16,16 @@ export default class AppDetectedRoute extends Route {
|
|
|
16
16
|
* @return {Promise}
|
|
17
17
|
*/
|
|
18
18
|
model() {
|
|
19
|
-
let port = this.port;
|
|
20
|
-
|
|
21
19
|
return new Promise((resolve) => {
|
|
22
20
|
this.applicationBooted = ({ booted }) => {
|
|
23
21
|
if (booted) {
|
|
24
|
-
port.off('general:applicationBooted', this.applicationBooted);
|
|
22
|
+
this.port.off('general:applicationBooted', this.applicationBooted);
|
|
25
23
|
this.applicationBooted = null;
|
|
26
24
|
resolve();
|
|
27
25
|
}
|
|
28
26
|
};
|
|
29
|
-
port.on('general:applicationBooted', this.applicationBooted);
|
|
30
|
-
port.send('general:applicationBooted');
|
|
27
|
+
this.port.on('general:applicationBooted', this.applicationBooted);
|
|
28
|
+
this.port.send('general:applicationBooted');
|
|
31
29
|
});
|
|
32
30
|
}
|
|
33
31
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable ember/no-controller-access-in-routes */
|
|
1
2
|
import { inject as service } from '@ember/service';
|
|
2
3
|
import { action, set } from '@ember/object';
|
|
3
4
|
import Route from '@ember/routing/route';
|
|
@@ -8,9 +9,11 @@ export default class ApplicationRoute extends Route {
|
|
|
8
9
|
@service adapter;
|
|
9
10
|
@service port;
|
|
10
11
|
@service router;
|
|
12
|
+
@service layout;
|
|
11
13
|
|
|
12
14
|
setupController(controller) {
|
|
13
15
|
controller.set('mixinStack', []);
|
|
16
|
+
|
|
14
17
|
let port = this.port;
|
|
15
18
|
port.on('objectInspector:updateObject', this, this.updateObject);
|
|
16
19
|
port.on('objectInspector:updateProperty', this, this.updateProperty);
|
|
@@ -54,7 +57,6 @@ export default class ApplicationRoute extends Route {
|
|
|
54
57
|
NativeArray.apply(details);
|
|
55
58
|
details.forEach(arrayize);
|
|
56
59
|
|
|
57
|
-
// eslint-disable-next-line ember/no-controller-access-in-routes
|
|
58
60
|
let controller = this.controller;
|
|
59
61
|
|
|
60
62
|
if (options.parentObject) {
|
|
@@ -63,23 +65,17 @@ export default class ApplicationRoute extends Route {
|
|
|
63
65
|
controller.activateMixinDetails(name, objectId, details, errors);
|
|
64
66
|
}
|
|
65
67
|
|
|
66
|
-
|
|
67
|
-
this.controller.showInspector();
|
|
68
|
+
this.layout.showInspector();
|
|
68
69
|
}
|
|
69
70
|
|
|
70
71
|
setDeprecationCount(message) {
|
|
71
|
-
// eslint-disable-next-line ember/no-controller-access-in-routes
|
|
72
72
|
this.controller.set('deprecationCount', message.count);
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
// eslint-enable ember/no-controller-access-in-routes
|
|
76
|
-
|
|
77
75
|
updateProperty(options) {
|
|
78
|
-
if (this.
|
|
79
|
-
const detail = this.
|
|
80
|
-
|
|
81
|
-
);
|
|
82
|
-
let property = detail.properties.findBy('name', options.property);
|
|
76
|
+
if (this.controller.mixinDetails?.mixins) {
|
|
77
|
+
const detail = this.controller.mixinDetails.mixins.at(options.mixinIndex);
|
|
78
|
+
let property = detail.properties.find((x) => x.name === options.property);
|
|
83
79
|
if (!property) return;
|
|
84
80
|
set(property, 'value', options.value);
|
|
85
81
|
if (options.dependentKeys) {
|
|
@@ -89,7 +85,8 @@ export default class ApplicationRoute extends Route {
|
|
|
89
85
|
}
|
|
90
86
|
|
|
91
87
|
updateErrors(options) {
|
|
92
|
-
let mixinDetails = this.
|
|
88
|
+
let mixinDetails = this.controller.mixinDetails;
|
|
89
|
+
|
|
93
90
|
if (mixinDetails) {
|
|
94
91
|
if (mixinDetails.objectId === options.objectId) {
|
|
95
92
|
set(mixinDetails, 'errors', options.errors);
|
|
@@ -98,7 +95,6 @@ export default class ApplicationRoute extends Route {
|
|
|
98
95
|
}
|
|
99
96
|
|
|
100
97
|
droppedObject(message) {
|
|
101
|
-
// eslint-disable-next-line ember/no-controller-access-in-routes
|
|
102
98
|
this.controller.droppedObject(message.objectId);
|
|
103
99
|
}
|
|
104
100
|
|