How to use the aurelia-framework.bindable function in aurelia-framework

To help you get started, we’ve selected a few aurelia-framework examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github stamp-web / stamp-web-aurelia / src / resources / elements / editor-dialog.js View on Github external
Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */
import {bindable, customElement} from 'aurelia-framework';
import {I18N} from 'aurelia-i18n';
import {EventAggregator} from 'aurelia-event-aggregator';
import {EventNames, EventManaged} from '../../events/event-managed';

@customElement('editor-dialog')
@bindable('model')
@bindable('dialogId')
@bindable('content')
@bindable('title')
@bindable('icon')
export class EditorDialog extends EventManaged {

    static inject = [EventAggregator, I18N];

    errorMsg = '';
    subscriptions = [];
    valid = true;

    constructor(eventBus, i18n) {
        super(eventBus);
        this.i18n = i18n;
        this.eventBus = eventBus;
        this.setupSubscriptions();
    }
github stamp-web / stamp-web-aurelia / src / components / sort-dialog.js View on Github external
import {bindable, customElement} from 'aurelia-framework';

@customElement('sort-dialog')
@bindable('sort')
@bindable('sortOptions')
@bindable('dialogId')
export class SortDialog {
    chooseSort(s) {
        this.sort = s;
    }

    close() {

    }
}
github SpoonX / aurelia-filter / dist / es2015 / filter.js View on Github external
desc = null;
  }

  return desc;
}

function _initializerWarningHelper(descriptor, context) {
  throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
}

import { inject, customElement, bindable, bindingMode } from 'aurelia-framework';
import { resolvedView } from 'aurelia-view-manager';
import { CriteriaBuilder } from './criteriaBuilder';
import { Configuration } from 'aurelia-config';

export let Filter = (_dec = customElement('filter'), _dec2 = resolvedView('spoonx/filter', 'filter'), _dec3 = inject(Configuration.of('aurelia-filter')), _dec4 = bindable({ defaultBindingMode: bindingMode.twoWay }), _dec(_class = _dec2(_class = _dec3(_class = (_class2 = class Filter extends CriteriaBuilder {

  constructor(config) {
    super();

    _initDefineProp(this, 'criteria', _descriptor, this);

    _initDefineProp(this, 'columns', _descriptor2, this);

    _initDefineProp(this, 'entity', _descriptor3, this);

    _initDefineProp(this, 'showIdColumns', _descriptor4, this);

    _initDefineProp(this, 'excludeColumns', _descriptor5, this);

    this.filters = [];
    this.fieldTypes = [];
github stamp-web / stamp-web-aurelia / src / resources / elements / stamps / stamp-table.js View on Github external
*/
import {customElement, bindable, inject} from 'aurelia-framework';
import {EventAggregator} from 'aurelia-event-aggregator';

import {Catalogues} from '../../../services/catalogues';
import {Preferences} from '../../../services/preferences';
import {EventNames} from '../../../events/event-managed';
import {LocationHelper} from '../../../util/location-helper';

import _ from 'lodash';

const defaultImagePath = 'https://drake-server.ddns.net/Thumbnails/';

@customElement('stamp-table')
@inject(Element, EventAggregator, Catalogues, Preferences)
@bindable('stamps')
@bindable('lastSelected')
@bindable('total')
export class StampTable {

    catalogues = [];
    models = [];
    lastTime = 0;


    constructor(element, eventBus, catalogueService, prefService) {
        this.catalogueService = catalogueService;
        this.prefService = prefService;
        this.eventBus = eventBus;
        this.element = element;
    }
github stamp-web / stamp-web-aurelia / src / resources / elements / stamps / stamp-card.js View on Github external
import {bindable, customElement, inject} from 'aurelia-framework';
import {EventAggregator} from 'aurelia-event-aggregator';
import {BindingEngine} from 'aurelia-binding';
import {EventNames} from '../../../events/event-managed';
import {Preferences} from '../../../services/preferences';
import {LocationHelper} from '../../../util/location-helper';
import _ from 'lodash';
import $ from 'jquery';

var defaultImagePath = "https://drake-server.ddns.net/Thumbnails/";

@customElement('stamp-card')
@inject(Element, EventAggregator, BindingEngine, Preferences)
@bindable('model')
@bindable('selected')
@bindable('highlight')
export class StampCard {

    imageShown = false;
    activeCN;
    imagePath;

    constructor(element, eventBus, $bindingEngine, prefService) {
        this.element = element;
        this.eventBus = eventBus;
        this.prefService = prefService;
        this.bindingEngine = $bindingEngine;
    }

    modelChanged(newValue) {
        if (newValue) {
            this.bindActiveNumber();
github tochoromero / aurelia-table / dist / es2015 / au-table.js View on Github external
if (desc.initializer === void 0) {
    Object['define' + 'Property'](target, property, desc);
    desc = null;
  }

  return desc;
}

function _initializerWarningHelper(descriptor, context) {
  throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
}

import { inject, bindable, bindingMode, BindingEngine } from 'aurelia-framework';

export let AureliaTableCustomAttribute = (_dec = inject(BindingEngine), _dec2 = bindable({ defaultBindingMode: bindingMode.twoWay }), _dec3 = bindable({ defaultBindingMode: bindingMode.twoWay }), _dec4 = bindable({ defaultBindingMode: bindingMode.twoWay }), _dec5 = bindable({ defaultBindingMode: bindingMode.twoWay }), _dec(_class = (_class2 = class AureliaTableCustomAttribute {

  constructor(bindingEngine) {
    _initDefineProp(this, 'data', _descriptor, this);

    _initDefineProp(this, 'displayData', _descriptor2, this);

    _initDefineProp(this, 'filters', _descriptor3, this);

    _initDefineProp(this, 'currentPage', _descriptor4, this);

    _initDefineProp(this, 'pageSize', _descriptor5, this);

    _initDefineProp(this, 'totalItems', _descriptor6, this);

    _initDefineProp(this, 'api', _descriptor7, this);
github stamp-web / stamp-web-aurelia / src / components / entity-lists / entity-list.js View on Github external
import {bindable,customElement,inject} from 'aurelia-framework';
import {EventAggregator} from 'aurelia-event-aggregator';
import {EventNames} from '../../event-names';
import  _  from 'lodash';

import 'resources/styles/components/entity-lists/entity-list.css!';

@customElement('entity-list')
@bindable('models')
@bindable('field')
@inject(EventAggregator)
export class EntityList {

	hasIssue = false;
	editingModel;


	constructor(eventBus) {
		this.eventBus = eventBus;
	}

	fieldChanged(newVal) {
		this.hasIssue = ( newVal && newVal.field === 'catalogueRef');
	}

	viewStamps(model) {
github SpoonX / aurelia-form / dist / es2015 / component / form-group.js View on Github external
Object['define' + 'Property'](target, property, desc);
    desc = null;
  }

  return desc;
}

function _initializerWarningHelper(descriptor, context) {
  throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
}

import { bindable, customElement, bindingMode, inject } from 'aurelia-framework';
import { resolvedView } from 'aurelia-view-manager';
import { Configuration } from 'aurelia-config';

export let FormGroup = (_dec = resolvedView('spoonx/form', 'form-group'), _dec2 = customElement('form-group'), _dec3 = inject(Configuration.of('aurelia-form')), _dec4 = bindable({ defaultBindingMode: bindingMode.twoWay }), _dec(_class = _dec2(_class = _dec3(_class = (_class2 = class FormGroup {

  constructor(config) {
    _initDefineProp(this, 'value', _descriptor, this);

    _initDefineProp(this, 'classes', _descriptor2, this);

    _initDefineProp(this, 'elementClasses', _descriptor3, this);

    _initDefineProp(this, 'labelClasses', _descriptor4, this);

    _initDefineProp(this, 'element', _descriptor5, this);

    _initDefineProp(this, 'placeholder', _descriptor6, this);

    _initDefineProp(this, 'state', _descriptor7, this);
github stamp-web / stamp-web-aurelia / src / resources / elements / stamps / stamp-table.js View on Github external
import {EventAggregator} from 'aurelia-event-aggregator';

import {Catalogues} from '../../../services/catalogues';
import {Preferences} from '../../../services/preferences';
import {EventNames} from '../../../events/event-managed';
import {LocationHelper} from '../../../util/location-helper';

import _ from 'lodash';

const defaultImagePath = 'https://drake-server.ddns.net/Thumbnails/';

@customElement('stamp-table')
@inject(Element, EventAggregator, Catalogues, Preferences)
@bindable('stamps')
@bindable('lastSelected')
@bindable('total')
export class StampTable {

    catalogues = [];
    models = [];
    lastTime = 0;


    constructor(element, eventBus, catalogueService, prefService) {
        this.catalogueService = catalogueService;
        this.prefService = prefService;
        this.eventBus = eventBus;
        this.element = element;
    }

    bind() {
github stamp-web / stamp-web-aurelia / src / resources / elements / stamps / stamp-card.js View on Github external
limitations under the License.
 */
import {bindable, customElement, inject} from 'aurelia-framework';
import {EventAggregator} from 'aurelia-event-aggregator';
import {BindingEngine} from 'aurelia-binding';
import {EventNames} from '../../../events/event-managed';
import {Preferences} from '../../../services/preferences';
import {LocationHelper} from '../../../util/location-helper';
import _ from 'lodash';
import $ from 'jquery';

var defaultImagePath = "https://drake-server.ddns.net/Thumbnails/";

@customElement('stamp-card')
@inject(Element, EventAggregator, BindingEngine, Preferences)
@bindable('model')
@bindable('selected')
@bindable('highlight')
export class StampCard {

    imageShown = false;
    activeCN;
    imagePath;

    constructor(element, eventBus, $bindingEngine, prefService) {
        this.element = element;
        this.eventBus = eventBus;
        this.prefService = prefService;
        this.bindingEngine = $bindingEngine;
    }

    modelChanged(newValue) {