devextreme-angular
Version:
Angular UI and visualization components based on DevExtreme widgets
406 lines (389 loc) • 15 kB
JavaScript
import { __extends, __decorate, __metadata, __param } from 'tslib';
import { TransferState, BrowserTransferStateModule } from '@angular/platform-browser';
import { ElementRef, NgZone, Inject, PLATFORM_ID, Input, Output, EventEmitter, Component, NgModule } from '@angular/core';
import DxSpeedDialAction from 'devextreme/ui/speed_dial_action';
import { DxTemplateHost, WatcherHelper, NestedOptionHost, DxComponent, DxIntegrationModule, DxTemplateModule } from 'devextreme-angular/core';
/*!
* devextreme-angular
* Version: 20.2.5
* Build date: Fri Jan 15 2021
*
* Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file in the root of the project for details.
*
* https://github.com/DevExpress/devextreme-angular
*/
/**
* The SpeedDialAction is a button that performs a custom action. It can be represented by a Floating Action Button (FAB) or a button in a speed dial menu opened with the FAB.
*/
var DxSpeedDialActionComponent = /** @class */ (function (_super) {
__extends(DxSpeedDialActionComponent, _super);
function DxSpeedDialActionComponent(elementRef, ngZone, templateHost, _watcherHelper, optionHost, transferState, platformId) {
var _this = _super.call(this, elementRef, ngZone, templateHost, _watcherHelper, transferState, platformId) || this;
_this._createEventEmitters([
{ subscribe: 'click', emit: 'onClick' },
{ subscribe: 'contentReady', emit: 'onContentReady' },
{ subscribe: 'disposing', emit: 'onDisposing' },
{ subscribe: 'initialized', emit: 'onInitialized' },
{ subscribe: 'optionChanged', emit: 'onOptionChanged' },
{ emit: 'accessKeyChange' },
{ emit: 'activeStateEnabledChange' },
{ emit: 'elementAttrChange' },
{ emit: 'focusStateEnabledChange' },
{ emit: 'hintChange' },
{ emit: 'hoverStateEnabledChange' },
{ emit: 'iconChange' },
{ emit: 'indexChange' },
{ emit: 'labelChange' },
{ emit: 'rtlEnabledChange' },
{ emit: 'tabIndexChange' },
{ emit: 'visibleChange' }
]);
optionHost.setHost(_this);
return _this;
}
Object.defineProperty(DxSpeedDialActionComponent.prototype, "accessKey", {
/**
* Specifies the shortcut key that sets focus on the UI component.
*/
get: function () {
return this._getOption('accessKey');
},
set: function (value) {
this._setOption('accessKey', value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(DxSpeedDialActionComponent.prototype, "activeStateEnabled", {
/**
* Specifies whether or not the UI component changes its state when interacting with a user.
*/
get: function () {
return this._getOption('activeStateEnabled');
},
set: function (value) {
this._setOption('activeStateEnabled', value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(DxSpeedDialActionComponent.prototype, "elementAttr", {
/**
* Specifies the global attributes to be attached to the UI component's container element.
*/
get: function () {
return this._getOption('elementAttr');
},
set: function (value) {
this._setOption('elementAttr', value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(DxSpeedDialActionComponent.prototype, "focusStateEnabled", {
/**
* Specifies whether the UI component can be focused using keyboard navigation.
*/
get: function () {
return this._getOption('focusStateEnabled');
},
set: function (value) {
this._setOption('focusStateEnabled', value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(DxSpeedDialActionComponent.prototype, "hint", {
/**
* Specifies text for a hint that appears when a user pauses on the UI component.
*/
get: function () {
return this._getOption('hint');
},
set: function (value) {
this._setOption('hint', value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(DxSpeedDialActionComponent.prototype, "hoverStateEnabled", {
/**
* Specifies whether the UI component changes its state when a user pauses on it.
*/
get: function () {
return this._getOption('hoverStateEnabled');
},
set: function (value) {
this._setOption('hoverStateEnabled', value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(DxSpeedDialActionComponent.prototype, "icon", {
/**
* Specifies the icon the FAB or speed dial action button displays.
*/
get: function () {
return this._getOption('icon');
},
set: function (value) {
this._setOption('icon', value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(DxSpeedDialActionComponent.prototype, "index", {
/**
* Allows you to reorder action buttons in the speed dial menu.
*/
get: function () {
return this._getOption('index');
},
set: function (value) {
this._setOption('index', value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(DxSpeedDialActionComponent.prototype, "label", {
/**
* Specifies the text label displayed inside the FAB or near the speed dial action button.
*/
get: function () {
return this._getOption('label');
},
set: function (value) {
this._setOption('label', value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(DxSpeedDialActionComponent.prototype, "rtlEnabled", {
/**
* Switches the UI component to a right-to-left representation.
*/
get: function () {
return this._getOption('rtlEnabled');
},
set: function (value) {
this._setOption('rtlEnabled', value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(DxSpeedDialActionComponent.prototype, "tabIndex", {
/**
* Specifies the number of the element when the Tab key is used for navigating.
*/
get: function () {
return this._getOption('tabIndex');
},
set: function (value) {
this._setOption('tabIndex', value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(DxSpeedDialActionComponent.prototype, "visible", {
/**
* Allows you to hide the FAB from the view or the action from the speed dial menu.
*/
get: function () {
return this._getOption('visible');
},
set: function (value) {
this._setOption('visible', value);
},
enumerable: true,
configurable: true
});
DxSpeedDialActionComponent.prototype._createInstance = function (element, options) {
return new DxSpeedDialAction(element, options);
};
DxSpeedDialActionComponent.prototype.ngOnDestroy = function () {
this._destroyWidget();
};
DxSpeedDialActionComponent.ctorParameters = function () { return [
{ type: ElementRef },
{ type: NgZone },
{ type: DxTemplateHost },
{ type: WatcherHelper },
{ type: NestedOptionHost },
{ type: TransferState },
{ type: undefined, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] }
]; };
__decorate([
Input(),
__metadata("design:type", String),
__metadata("design:paramtypes", [String])
], DxSpeedDialActionComponent.prototype, "accessKey", null);
__decorate([
Input(),
__metadata("design:type", Boolean),
__metadata("design:paramtypes", [Boolean])
], DxSpeedDialActionComponent.prototype, "activeStateEnabled", null);
__decorate([
Input(),
__metadata("design:type", Object),
__metadata("design:paramtypes", [Object])
], DxSpeedDialActionComponent.prototype, "elementAttr", null);
__decorate([
Input(),
__metadata("design:type", Boolean),
__metadata("design:paramtypes", [Boolean])
], DxSpeedDialActionComponent.prototype, "focusStateEnabled", null);
__decorate([
Input(),
__metadata("design:type", String),
__metadata("design:paramtypes", [String])
], DxSpeedDialActionComponent.prototype, "hint", null);
__decorate([
Input(),
__metadata("design:type", Boolean),
__metadata("design:paramtypes", [Boolean])
], DxSpeedDialActionComponent.prototype, "hoverStateEnabled", null);
__decorate([
Input(),
__metadata("design:type", String),
__metadata("design:paramtypes", [String])
], DxSpeedDialActionComponent.prototype, "icon", null);
__decorate([
Input(),
__metadata("design:type", Number),
__metadata("design:paramtypes", [Number])
], DxSpeedDialActionComponent.prototype, "index", null);
__decorate([
Input(),
__metadata("design:type", String),
__metadata("design:paramtypes", [String])
], DxSpeedDialActionComponent.prototype, "label", null);
__decorate([
Input(),
__metadata("design:type", Boolean),
__metadata("design:paramtypes", [Boolean])
], DxSpeedDialActionComponent.prototype, "rtlEnabled", null);
__decorate([
Input(),
__metadata("design:type", Number),
__metadata("design:paramtypes", [Number])
], DxSpeedDialActionComponent.prototype, "tabIndex", null);
__decorate([
Input(),
__metadata("design:type", Boolean),
__metadata("design:paramtypes", [Boolean])
], DxSpeedDialActionComponent.prototype, "visible", null);
__decorate([
Output(),
__metadata("design:type", EventEmitter)
], DxSpeedDialActionComponent.prototype, "onClick", void 0);
__decorate([
Output(),
__metadata("design:type", EventEmitter)
], DxSpeedDialActionComponent.prototype, "onContentReady", void 0);
__decorate([
Output(),
__metadata("design:type", EventEmitter)
], DxSpeedDialActionComponent.prototype, "onDisposing", void 0);
__decorate([
Output(),
__metadata("design:type", EventEmitter)
], DxSpeedDialActionComponent.prototype, "onInitialized", void 0);
__decorate([
Output(),
__metadata("design:type", EventEmitter)
], DxSpeedDialActionComponent.prototype, "onOptionChanged", void 0);
__decorate([
Output(),
__metadata("design:type", EventEmitter)
], DxSpeedDialActionComponent.prototype, "accessKeyChange", void 0);
__decorate([
Output(),
__metadata("design:type", EventEmitter)
], DxSpeedDialActionComponent.prototype, "activeStateEnabledChange", void 0);
__decorate([
Output(),
__metadata("design:type", EventEmitter)
], DxSpeedDialActionComponent.prototype, "elementAttrChange", void 0);
__decorate([
Output(),
__metadata("design:type", EventEmitter)
], DxSpeedDialActionComponent.prototype, "focusStateEnabledChange", void 0);
__decorate([
Output(),
__metadata("design:type", EventEmitter)
], DxSpeedDialActionComponent.prototype, "hintChange", void 0);
__decorate([
Output(),
__metadata("design:type", EventEmitter)
], DxSpeedDialActionComponent.prototype, "hoverStateEnabledChange", void 0);
__decorate([
Output(),
__metadata("design:type", EventEmitter)
], DxSpeedDialActionComponent.prototype, "iconChange", void 0);
__decorate([
Output(),
__metadata("design:type", EventEmitter)
], DxSpeedDialActionComponent.prototype, "indexChange", void 0);
__decorate([
Output(),
__metadata("design:type", EventEmitter)
], DxSpeedDialActionComponent.prototype, "labelChange", void 0);
__decorate([
Output(),
__metadata("design:type", EventEmitter)
], DxSpeedDialActionComponent.prototype, "rtlEnabledChange", void 0);
__decorate([
Output(),
__metadata("design:type", EventEmitter)
], DxSpeedDialActionComponent.prototype, "tabIndexChange", void 0);
__decorate([
Output(),
__metadata("design:type", EventEmitter)
], DxSpeedDialActionComponent.prototype, "visibleChange", void 0);
DxSpeedDialActionComponent = __decorate([
Component({
selector: 'dx-speed-dial-action',
template: '',
providers: [
DxTemplateHost,
WatcherHelper,
NestedOptionHost
]
}),
__param(6, Inject(PLATFORM_ID)),
__metadata("design:paramtypes", [ElementRef, NgZone, DxTemplateHost,
WatcherHelper,
NestedOptionHost,
TransferState, Object])
], DxSpeedDialActionComponent);
return DxSpeedDialActionComponent;
}(DxComponent));
var DxSpeedDialActionModule = /** @class */ (function () {
function DxSpeedDialActionModule() {
}
DxSpeedDialActionModule = __decorate([
NgModule({
imports: [
DxIntegrationModule,
DxTemplateModule,
BrowserTransferStateModule
],
declarations: [
DxSpeedDialActionComponent
],
exports: [
DxSpeedDialActionComponent,
DxTemplateModule
]
})
], DxSpeedDialActionModule);
return DxSpeedDialActionModule;
}());
/**
* Generated bundle index. Do not edit.
*/
export { DxSpeedDialActionComponent, DxSpeedDialActionModule };
//# sourceMappingURL=devextreme-angular-ui-speed-dial-action.js.map