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
const panelsMachine = Machine({ | |
id: 'unassignedToursMachine', | |
initial: 'selectingTours', | |
states: { | |
selectingTours: { | |
on: { | |
SELECT_TOUR: 'selectingShipments', | |
}, | |
}, | |
selectingShipments: { |
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
import Controller from '@ember/controller'; | |
export default class ApplicationController extends Controller { | |
appName = 'Ember Twiddle'; | |
} |
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
import Controller from '@ember/controller'; | |
import { A } from '@ember/array'; | |
import { action } from '@ember/object'; | |
export default class ApplicationController extends Controller { | |
appName = 'particial application'; | |
values = A([1, 2, 3, 4, 5, 'omg']); | |
@action handleInput(event) { | |
this.values[0] = event.target.value; |
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
import Component from '@glimmer/component'; | |
export default class extends Component { | |
} |
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
import Component from '@glimmer/component'; | |
import { action } from '@ember/object'; | |
export default class extends Component { | |
@action handleInsert() { | |
console.log('insert'); | |
} | |
@action handleUpdate() { | |
console.log('update'); |
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
import Component from '@glimmer/component'; | |
import { tracked } from '@glimmer/tracking'; | |
class ReactivePart { | |
constructor(placeholder) { | |
this.value = placeholder.replace('{{', '').replace('}}',''); | |
this.placeholder = placeholder; | |
} | |
get isEditable() { | |
return this.placeholder.startsWith('{{'); |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
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
import Controller from '@ember/controller'; | |
import { tracked } from '@glimmer/tracking'; | |
import { action } from '@ember/object'; | |
export default class ApplicationController extends Controller { | |
appName = 'Input with handler example'; | |
@tracked text; | |
@action handleInput(event) { | |
const previousValue = this.text; |
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
import Controller from '@ember/controller'; | |
import { tracked } from '@glimmer/tracking'; | |
import { action } from '@ember/object'; | |
export default class ApplicationController extends Controller { | |
appName = 'Input with handler example'; | |
@tracked text; | |
handleInput(event) { | |
event.preventDefault(); |