-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from btecu/octane
Octane Updates
- Loading branch information
Showing
56 changed files
with
5,277 additions
and
2,771 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
# misc | ||
/coverage/ | ||
!.* | ||
.eslintcache | ||
|
||
# ember-try | ||
/.node_modules.ember-try/ | ||
|
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 |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
/.env* | ||
/.pnp* | ||
/.sass-cache | ||
/.eslintcache | ||
/connect.lock | ||
/coverage/ | ||
/libpeerconnection.log | ||
|
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,21 @@ | ||
# unconventional js | ||
/blueprints/*/files/ | ||
/vendor/ | ||
|
||
# compiled output | ||
/dist/ | ||
/tmp/ | ||
|
||
# dependencies | ||
/bower_components/ | ||
/node_modules/ | ||
|
||
# misc | ||
/coverage/ | ||
!.* | ||
.eslintcache | ||
|
||
# ember-try | ||
/.node_modules.ember-try/ | ||
/bower.json.ember-try | ||
/package.json.ember-try |
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,5 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
singleQuote: true, | ||
}; |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
extends: 'recommended' | ||
extends: 'octane', | ||
}; |
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 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,40 @@ | ||
<ul class="tree-branch"> | ||
{{#each @model as |child|}} | ||
{{#if child.isVisible}} | ||
{{#if (has-block)}} | ||
<XTreeChildren | ||
@checkable={{@checkable}} | ||
@recursiveCheck={{@recursiveCheck}} | ||
@updateCheckbox={{@updateCheckbox}} | ||
@chosenId={{@chosenId}} | ||
@onCheck={{@onCheck}} | ||
@onContextMenu={{@onContextMenu}} | ||
@onSelect={{@onSelect}} | ||
@onHover={{@onHover}} | ||
@onHoverOut={{@onHoverOut}} | ||
@model={{child}} | ||
@expandedIcon={{@expandedIcon}} | ||
@collapsedIcon={{@collapsedIcon}} | ||
as |node| | ||
> | ||
{{yield node}} | ||
</XTreeChildren> | ||
{{else}} | ||
<XTreeChildren | ||
@model={{child}} | ||
@checkable={{@checkable}} | ||
@recursiveCheck={{@recursiveCheck}} | ||
@updateCheckbox={{@updateCheckbox}} | ||
@chosenId={{@chosenId}} | ||
@onCheck={{@onCheck}} | ||
@onContextMenu={{@onContextMenu}} | ||
@onSelect={{@onSelect}} | ||
@onHover={{@onHover}} | ||
@onHoverOut={{@onHoverOut}} | ||
@expandedIcon={{@expandedIcon}} | ||
@collapsedIcon={{@collapsedIcon}} | ||
/> | ||
{{/if}} | ||
{{/if}} | ||
{{/each}} | ||
</ul> |
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,11 @@ | ||
<span class="tree-checkbox"> | ||
<span role="button" {{on "click" @toggleCheck}}> | ||
<Input | ||
aria-label="Checkbox for {{@model.name}}" | ||
disabled={{@model.isDisabled}} | ||
indeterminate={{@model.isIndeterminate}} | ||
@checked={{@model.isChecked}} | ||
@type="checkbox" | ||
/> | ||
</span> | ||
</span> |
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,72 @@ | ||
<li class="tree-node"> | ||
{{#if (has-block)}} | ||
<XTreeNode | ||
@checkable={{@checkable}} | ||
@recursiveCheck={{@recursiveCheck}} | ||
@updateCheckbox={{this.updateCheckbox}} | ||
@chosenId={{@chosenId}} | ||
@onCheck={{@onCheck}} | ||
@onContextMenu={{@onContextMenu}} | ||
@onSelect={{@onSelect}} | ||
@onHover={{@onHover}} | ||
@onHoverOut={{@onHoverOut}} | ||
@model={{@model}} | ||
@expandedIcon={{@expandedIcon}} | ||
@collapsedIcon={{@collapsedIcon}} | ||
as |node| | ||
> | ||
{{yield node}} | ||
</XTreeNode> | ||
|
||
{{#if @model.isExpanded}} | ||
<XTreeBranch | ||
@checkable={{@checkable}} | ||
@recursiveCheck={{@recursiveCheck}} | ||
@updateCheckbox={{this.updateCheckbox}} | ||
@chosenId={{@chosenId}} | ||
@onCheck={{@onCheck}} | ||
@onContextMenu={{@onContextMenu}} | ||
@onSelect={{@onSelect}} | ||
@onHover={{@onHover}} | ||
@onHoverOut={{@onHoverOut}} | ||
@model={{@model.children}} | ||
@expandedIcon={{@expandedIcon}} | ||
@collapsedIcon={{@collapsedIcon}} | ||
as |node| | ||
> | ||
{{yield node}} | ||
</XTreeBranch> | ||
{{/if}} | ||
{{else}} | ||
<XTreeNode | ||
@model={{@model}} | ||
@checkable={{@checkable}} | ||
@recursiveCheck={{@recursiveCheck}} | ||
@updateCheckbox={{this.updateCheckbox}} | ||
@chosenId={{@chosenId}} | ||
@onCheck={{@onCheck}} | ||
@onContextMenu={{@onContextMenu}} | ||
@onSelect={{@onSelect}} | ||
@onHover={{@onHover}} | ||
@onHoverOut={{@onHoverOut}} | ||
@expandedIcon={{@expandedIcon}} | ||
@collapsedIcon={{@collapsedIcon}} | ||
/> | ||
{{#if @model.isExpanded}} | ||
<XTreeBranch | ||
@model={{@model.children}} | ||
@checkable={{@checkable}} | ||
@recursiveCheck={{@recursiveCheck}} | ||
@updateCheckbox={{this.updateCheckbox}} | ||
@chosenId={{@chosenId}} | ||
@onCheck={{@onCheck}} | ||
@onContextMenu={{@onContextMenu}} | ||
@onSelect={{@onSelect}} | ||
@onHover={{@onHover}} | ||
@onHoverOut={{@onHoverOut}} | ||
@expandedIcon={{@expandedIcon}} | ||
@collapsedIcon={{@collapsedIcon}} | ||
/> | ||
{{/if}} | ||
{{/if}} | ||
</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 |
---|---|---|
@@ -1,34 +1,28 @@ | ||
import Component from '@ember/component'; | ||
import layout from '../templates/components/x-tree-children'; | ||
import { setProperties } from '@ember/object'; | ||
import Component from '@glimmer/component'; | ||
import { action, setProperties } from '@ember/object'; | ||
|
||
export default Component.extend({ | ||
layout, | ||
tagName: 'li', | ||
classNames: ['tree-node'], | ||
export default class TreeChildrenComponent extends Component { | ||
@action | ||
updateCheckbox() { | ||
if (this.args.recursiveCheck) { | ||
let { children } = this.args.model; | ||
|
||
actions: { | ||
updateCheckbox() { | ||
if (this.recursiveCheck) { | ||
let { children } = this.model; | ||
if (children.length) { | ||
let isChecked = false; | ||
let isIndeterminate = false; | ||
|
||
if (children.length) { | ||
let isChecked = false; | ||
let isIndeterminate = false; | ||
|
||
if (children.every(x => x.isChecked)) { | ||
isChecked = true; | ||
} else if (children.some(x => x.isChecked || x.isIndeterminate)) { | ||
isIndeterminate = true; | ||
} | ||
|
||
setProperties(this.model, { isChecked, isIndeterminate }); | ||
if (children.every(x => x.isChecked)) { | ||
isChecked = true; | ||
} else if (children.some(x => x.isChecked || x.isIndeterminate)) { | ||
isIndeterminate = true; | ||
} | ||
|
||
if (this.updateCheckbox) { | ||
this.updateCheckbox(); | ||
} | ||
setProperties(this.args.model, { isChecked, isIndeterminate }); | ||
} | ||
|
||
if (this.args.updateCheckbox) { | ||
this.args.updateCheckbox(); | ||
} | ||
} | ||
} | ||
}); | ||
} |
File renamed without changes.
Oops, something went wrong.