-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into data-tab-cleanup
- Loading branch information
Showing
36 changed files
with
2,490 additions
and
824 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
'use strict'; | ||
|
||
const { setEdition } = require('@ember/edition-utils'); | ||
|
||
setEdition('octane'); | ||
|
||
module.exports = { | ||
/** | ||
Ember CLI sends analytics information by default. The data is completely | ||
anonymous, but there are times when you might want to disable this behavior. | ||
Setting `disableAnalytics` to true will prevent any data from being sent. | ||
*/ | ||
'disableAnalytics': false | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{{yield (hash | ||
isExpanded=this.isExpanded | ||
toggle=this.toggle | ||
)}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { action, computed } from '@ember/object'; | ||
import Component from '@ember/component'; | ||
|
||
export default Component.extend({ | ||
tagName: '', | ||
|
||
isExpanded: computed('mixin.expand', 'mixin.properties.length', function () { | ||
return this.get('mixin.expand') && this.get('mixin.properties.length') > 0; | ||
}), | ||
|
||
toggle: action(function () { | ||
this.toggleProperty('mixin.expand'); | ||
}), | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<li class="mixin__property-dependency-list"> | ||
{{svg-jar "dependent-key-connection" width="20px" height="10px"}} | ||
<ul> | ||
{{#each @keys as |depKey|}} | ||
<li class="mixin__property-dependency-item"> | ||
{{svg-jar | ||
"dependent-key-bullet" | ||
width="9px" | ||
height="9px" | ||
}} | ||
|
||
<span | ||
class="mixin__property-dependency-name" | ||
data-label="object-property-name" | ||
> | ||
{{depKey}} | ||
</span> | ||
</li> | ||
{{/each}} | ||
</ul> | ||
</li> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<div class="mixin mixin_props_no js-object-inspector-errors"> | ||
<h2 class="mixin__name mixin__name--errors"> | ||
Errors | ||
<button | ||
class="send-to-console send-to-console--chevron-only js-send-errors-to-console" | ||
{{on "click" @traceErrors}} | ||
> | ||
{{svg-jar "send-with-chevron" width="6px" height="9px"}} | ||
Trace in the Console | ||
</button> | ||
</h2> | ||
<div class="mixin__properties"> | ||
{{#each @errors as |error|}} | ||
<div class="mixin__error js-object-inspector-error"> | ||
Error while computing: {{error.property}} | ||
</div> | ||
{{/each}} | ||
</div> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<ul class="mixin__properties"> | ||
<ObjectInspector::SortProperties | ||
@properties={{this.flatPropertyList}} as |sortedProperties| | ||
> | ||
{{#each sortedProperties as |prop|}} | ||
<ObjectInspector::Property | ||
@model={{prop}} | ||
@calculate={{fn this.calculate prop}} | ||
@digDeeper={{fn this.digDeeper prop}} | ||
@saveProperty={{this.saveProperty}} | ||
@sendToConsole={{fn this.sendToConsole prop}} | ||
/> | ||
{{/each}} | ||
</ObjectInspector::SortProperties> | ||
</ul> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { action, computed } from '@ember/object'; | ||
import PropertiesBase from 'ember-inspector/components/object-inspector/properties-base'; | ||
|
||
const findMixin = function(mixins, property) { | ||
return mixins.find((m) => { | ||
return m.properties.includes(property); | ||
}); | ||
}; | ||
|
||
export default PropertiesBase.extend({ | ||
calculate: action(function(property) { | ||
const mixin = findMixin(this.get('model.mixins'), property); | ||
|
||
this.port.send('objectInspector:calculate', { | ||
objectId: this.model.objectId, | ||
mixinIndex: this.get('model.mixins').indexOf(mixin), | ||
property: property.name | ||
}); | ||
}), | ||
|
||
flatPropertyList: computed('model', function () { | ||
const props = this.get('model.mixins').map(function (mixin) { | ||
return mixin.properties.filter(function (p) { | ||
return !p.hasOwnProperty('overridden'); | ||
}); | ||
}); | ||
|
||
return props.flat(); | ||
}), | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import Component from '@ember/component'; | ||
import { action } from '@ember/object'; | ||
|
||
export default Component.extend({ | ||
tagName: '', | ||
|
||
sendToConsole: action(function ({ name }) { | ||
this.port.send('objectInspector:sendToConsole', { | ||
objectId: this.model.objectId, | ||
property: name | ||
}); | ||
}), | ||
|
||
digDeeper: action(function({ name }) { | ||
this.port.send('objectInspector:digDeeper', { | ||
objectId: this.model.objectId, | ||
property: name | ||
}); | ||
}), | ||
|
||
saveProperty: action(function(property, value, dataType) { | ||
this.port.send('objectInspector:saveProperty', { | ||
objectId: this.model.objectId, | ||
property, | ||
value, | ||
dataType | ||
}); | ||
}), | ||
}); | ||
|
Oops, something went wrong.