How to use the aurelia-framework.bindingMode 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 adarshpastakia / aurelia-ui-framework / dist / commonjs / elements / inputs / ui-button.js View on Github external
if (this.active)
            this.active.element.classList.remove('ui-active');
        if (this.buttons.length > 0 && (this.active = _.find(this.buttons, function (b) { return b.value === _this.value; })))
            this.active.element.classList.add('ui-active');
        ui_event_1.UIEvent.fireEvent('change', this.element, this.value);
    };
    UIButtonGroup.prototype.clickEvent = function (evt) {
        if (evt.target.dataset['value'])
            this.value = evt.target.dataset['value'];
    };
    __decorate([
        aurelia_framework_1.children('ui-button'),
        __metadata("design:type", Object)
    ], UIButtonGroup.prototype, "buttons", void 0);
    __decorate([
        aurelia_framework_1.bindable({ defaultBindingMode: aurelia_framework_1.bindingMode.twoWay }),
        __metadata("design:type", Object)
    ], UIButtonGroup.prototype, "value", void 0);
    __decorate([
        aurelia_framework_1.bindable(),
        __metadata("design:type", Object)
    ], UIButtonGroup.prototype, "separator", void 0);
    __decorate([
        aurelia_framework_1.bindable(),
        __metadata("design:type", Object)
    ], UIButtonGroup.prototype, "disabled", void 0);
    UIButtonGroup = __decorate([
        aurelia_framework_1.autoinject(),
        aurelia_framework_1.inlineView("<template data-separator.bind="\&quot;separator\&quot;" class="\&quot;ui-button-group"></template>"),
        aurelia_framework_1.customElement('ui-button-group'),
        __metadata("design:paramtypes", [Element])
    ], UIButtonGroup);
github SpringflowNL / aurelia-mdc-elements / dist / components / checkbox / mdc-checkbox.js View on Github external
exports.MdcCheckbox = void 0;

var _aureliaFramework = require("aurelia-framework");

var _mdcCheckbox = require("@material/checkbox/dist/mdc.checkbox.min");

var _dec, _dec2, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8;

function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }

function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object['ke' + 'ys'](descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } 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 ' + 'proposal-class-properties is enabled and set to use loose mode. ' + 'To use proposal-class-properties in spec mode with decorators, wait for ' + 'the next major version of decorators in stage 2.'); }

var MdcCheckbox = (_dec = (0, _aureliaFramework.inject)(Element), _dec2 = (0, _aureliaFramework.bindable)({
  defaultBindingMode: _aureliaFramework.bindingMode.twoWay
}), _dec(_class = (_class2 =
/*#__PURE__*/
function () {
  function MdcCheckbox(element) {
    _initializerDefineProperty(this, "checked", _descriptor, this);

    _initializerDefineProperty(this, "disabled", _descriptor2, this);

    _initializerDefineProperty(this, "required", _descriptor3, this);

    _initializerDefineProperty(this, "indeterminate", _descriptor4, this);

    _initializerDefineProperty(this, "id", _descriptor5, this);

    _initializerDefineProperty(this, "label", _descriptor6, this);
github SpoonX / aurelia-charts / dist / native-modules / component / chart-picker.js View on Github external
desc.initializer = undefined;
  }

  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.');
}

var ChartPicker = exports.ChartPicker = (_dec = (0, _aureliaFramework.inject)(_config.Config), _dec2 = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), _dec(_class = (_class2 = function () {
  function ChartPicker(chartConfig) {
    

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

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

    this.schema = [];
    this.charts = [];

    this.chartConfig = chartConfig;
    this.vm = this;
  }

  ChartPicker.prototype.dimensionsChanged = function dimensionsChanged(dimensions) {
    var _chartConfig;
github grofit / aurelia-chart / dist / commonjs / attributes / chart-attribute.js View on Github external
decorators: [_aureliaFramework.bindable],
    initializer: null,
    enumerable: true
  }, {
    key: "shouldUpdate",
    decorators: [_aureliaFramework.bindable],
    initializer: null,
    enumerable: true
  }, {
    key: "throttle",
    decorators: [_aureliaFramework.bindable],
    initializer: null,
    enumerable: true
  }, {
    key: "nativeOptions",
    decorators: [(0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay })],
    initializer: function initializer() {
      return {};
    },
    enumerable: true
  }], null, _instanceInitializers);

  function ChartAttribute(element, modelObserver) {
    var _this = this;

    _classCallCheck(this, _ChartAttribute);

    _defineDecoratedPropertyDescriptor(this, "type", _instanceInitializers);

    _defineDecoratedPropertyDescriptor(this, "data", _instanceInitializers);

    _defineDecoratedPropertyDescriptor(this, "shouldUpdate", _instanceInitializers);
github ariovistus / aurelia-mask / dist / masked-input.js View on Github external
__metadata("design:type", Boolean)
], MaskedInput.prototype, "bindMasking", void 0);
__decorate([
    aurelia_framework_1.bindable({ defaultBindingMode: aurelia_framework_1.bindingMode.oneTime, defaultValue: false }),
    __metadata("design:type", Boolean)
], MaskedInput.prototype, "aspnetMasking", void 0);
__decorate([
    aurelia_framework_1.bindable({ defaultBindingMode: aurelia_framework_1.bindingMode.oneTime, defaultValue: null }),
    __metadata("design:type", String)
], MaskedInput.prototype, "placeholder", void 0);
__decorate([
    aurelia_framework_1.bindable({ defaultBindingMode: aurelia_framework_1.bindingMode.oneTime, defaultValue: "insert" }),
    __metadata("design:type", String)
], MaskedInput.prototype, "editMode", void 0);
__decorate([
    aurelia_framework_1.bindable({ defaultBindingMode: aurelia_framework_1.bindingMode.oneTime, defaultValue: null }),
    __metadata("design:type", Function)
], MaskedInput.prototype, "findInput", void 0);
__decorate([
    aurelia_framework_1.bindable(),
    __metadata("design:type", Function)
], MaskedInput.prototype, "change", void 0);
MaskedInput = __decorate([
    aurelia_framework_1.customAttribute('masked'),
    aurelia_framework_1.inject(Element),
    __metadata("design:paramtypes", [Element])
], MaskedInput);
exports.MaskedInput = MaskedInput;
//# sourceMappingURL=masked-input.js.map
github SpringflowNL / aurelia-mdc-elements / dist / components / radio / mdc-radio.js View on Github external
exports.MdcRadio = void 0;

var _aureliaFramework = require("aurelia-framework");

var _mdcRadio = require("@material/radio/dist/mdc.radio.min");

var _dec, _dec2, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7;

function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }

function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object['ke' + 'ys'](descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } 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 ' + 'proposal-class-properties is enabled and set to use loose mode. ' + 'To use proposal-class-properties in spec mode with decorators, wait for ' + 'the next major version of decorators in stage 2.'); }

var MdcRadio = (_dec = (0, _aureliaFramework.inject)(Element), _dec2 = (0, _aureliaFramework.bindable)({
  defaultBindingMode: _aureliaFramework.bindingMode.twoWay
}), _dec(_class = (_class2 =
/*#__PURE__*/
function () {
  function MdcRadio(element) {
    _initializerDefineProperty(this, "checked", _descriptor, this);

    _initializerDefineProperty(this, "disabled", _descriptor2, this);

    _initializerDefineProperty(this, "id", _descriptor3, this);

    _initializerDefineProperty(this, "label", _descriptor4, this);

    _initializerDefineProperty(this, "secondarylabel", _descriptor5, this);

    _initializerDefineProperty(this, "name", _descriptor6, this);
github ghiscoding / aurelia-slickgrid / dist / commonjs / aurelia-slickgrid.js View on Github external
}
        }
    };
    /** Toggle the filter row displayed on first row */
    AureliaSlickgridCustomElement.prototype.showHeaderRow = function (isShowing) {
        this.grid.setHeaderRowVisibility(isShowing);
        return isShowing;
    };
    /** Toggle the filter row displayed on first row */
    AureliaSlickgridCustomElement.prototype.toggleHeaderRow = function () {
        var isShowing = !this.grid.getOptions().showHeaderRow;
        this.grid.setHeaderRowVisibility(isShowing);
        return isShowing;
    };
    __decorate([
        aurelia_framework_1.bindable({ defaultBindingMode: aurelia_framework_1.bindingMode.twoWay })
    ], AureliaSlickgridCustomElement.prototype, "element", void 0);
    __decorate([
        aurelia_framework_1.bindable({ defaultBindingMode: aurelia_framework_1.bindingMode.twoWay })
    ], AureliaSlickgridCustomElement.prototype, "dataset", void 0);
    __decorate([
        aurelia_framework_1.bindable({ defaultBindingMode: aurelia_framework_1.bindingMode.twoWay })
    ], AureliaSlickgridCustomElement.prototype, "paginationOptions", void 0);
    __decorate([
        aurelia_framework_1.bindable({ defaultBindingMode: aurelia_framework_1.bindingMode.twoWay })
    ], AureliaSlickgridCustomElement.prototype, "gridPaginationOptions", void 0);
    __decorate([
        aurelia_framework_1.bindable({ defaultBindingMode: aurelia_framework_1.bindingMode.twoWay })
    ], AureliaSlickgridCustomElement.prototype, "dataview", void 0);
    __decorate([
        aurelia_framework_1.bindable({ defaultBindingMode: aurelia_framework_1.bindingMode.twoWay })
    ], AureliaSlickgridCustomElement.prototype, "grid", void 0);
github ghiscoding / aurelia-slickgrid / dist / commonjs / aurelia-slickgrid.js View on Github external
AureliaSlickgridCustomElement.prototype.toggleHeaderRow = function () {
        var isShowing = !this.grid.getOptions().showHeaderRow;
        this.grid.setHeaderRowVisibility(isShowing);
        return isShowing;
    };
    __decorate([
        aurelia_framework_1.bindable({ defaultBindingMode: aurelia_framework_1.bindingMode.twoWay })
    ], AureliaSlickgridCustomElement.prototype, "element", void 0);
    __decorate([
        aurelia_framework_1.bindable({ defaultBindingMode: aurelia_framework_1.bindingMode.twoWay })
    ], AureliaSlickgridCustomElement.prototype, "dataset", void 0);
    __decorate([
        aurelia_framework_1.bindable({ defaultBindingMode: aurelia_framework_1.bindingMode.twoWay })
    ], AureliaSlickgridCustomElement.prototype, "paginationOptions", void 0);
    __decorate([
        aurelia_framework_1.bindable({ defaultBindingMode: aurelia_framework_1.bindingMode.twoWay })
    ], AureliaSlickgridCustomElement.prototype, "gridPaginationOptions", void 0);
    __decorate([
        aurelia_framework_1.bindable({ defaultBindingMode: aurelia_framework_1.bindingMode.twoWay })
    ], AureliaSlickgridCustomElement.prototype, "dataview", void 0);
    __decorate([
        aurelia_framework_1.bindable({ defaultBindingMode: aurelia_framework_1.bindingMode.twoWay })
    ], AureliaSlickgridCustomElement.prototype, "grid", void 0);
    __decorate([
        aurelia_framework_1.bindable()
    ], AureliaSlickgridCustomElement.prototype, "gridId", void 0);
    __decorate([
        aurelia_framework_1.bindable()
    ], AureliaSlickgridCustomElement.prototype, "columnDefinitions", void 0);
    __decorate([
        aurelia_framework_1.bindable()
    ], AureliaSlickgridCustomElement.prototype, "gridOptions", void 0);
github SpoonX / aurelia-form / dist / commonjs / component / form-select.js View on Github external
desc.initializer = undefined;
  }

  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.');
}

var FormSelect = exports.FormSelect = (_dec = (0, _aureliaViewManager.resolvedView)('spoonx/form', 'form-select'), _dec2 = (0, _aureliaFramework.customElement)('form-select'), _dec3 = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), _dec4 = (0, _aureliaFramework.computedFrom)('selectOptions', 'optionLabel'), _dec(_class = _dec2(_class = (_class2 = function () {
  function FormSelect() {
    

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

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

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

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

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

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

    _initDefineProp(this, 'selectOptions', _descriptor7, this);
github SpringflowNL / aurelia-mdc-elements / dist / commonjs / components / textfield / mdc-text-field.js View on Github external
desc.initializer = undefined;
	}

	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.');
}

var MdcTextField = exports.MdcTextField = (_dec = (0, _aureliaFramework.customElement)('mdc-text-field'), _dec2 = (0, _aureliaFramework.inject)(Element), _dec3 = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), _dec(_class = _dec2(_class = (_class2 = function () {
	function MdcTextField(element) {
		_classCallCheck(this, MdcTextField);

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

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

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

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

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

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

		_initDefineProp(this, 'modifier', _descriptor7, this);