speed-dial-action.js 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. "use strict";
  2. var __extends = (this && this.__extends) || (function () {
  3. var extendStatics = Object.setPrototypeOf ||
  4. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  5. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  6. return function (d, b) {
  7. extendStatics(d, b);
  8. function __() { this.constructor = d; }
  9. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  10. };
  11. })();
  12. /*!
  13. * devextreme-angular
  14. * Version: 19.1.16
  15. * Build date: Tue Oct 18 2022
  16. *
  17. * Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
  18. *
  19. * This software may be modified and distributed under the terms
  20. * of the MIT license. See the LICENSE file in the root of the project for details.
  21. *
  22. * https://github.com/DevExpress/devextreme-angular
  23. */
  24. Object.defineProperty(exports, "__esModule", { value: true });
  25. var platform_browser_1 = require("@angular/platform-browser");
  26. var platform_browser_2 = require("@angular/platform-browser");
  27. var core_1 = require("@angular/core");
  28. var speed_dial_action_1 = require("devextreme/ui/speed_dial_action");
  29. var component_1 = require("../core/component");
  30. var template_host_1 = require("../core/template-host");
  31. var integration_1 = require("../core/integration");
  32. var template_1 = require("../core/template");
  33. var nested_option_1 = require("../core/nested-option");
  34. var watcher_helper_1 = require("../core/watcher-helper");
  35. /**
  36. * 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.
  37. */
  38. var DxSpeedDialActionComponent = (function (_super) {
  39. __extends(DxSpeedDialActionComponent, _super);
  40. function DxSpeedDialActionComponent(elementRef, ngZone, templateHost, _watcherHelper, optionHost, transferState, platformId) {
  41. var _this = _super.call(this, elementRef, ngZone, templateHost, _watcherHelper, transferState, platformId) || this;
  42. _this._createEventEmitters([
  43. { subscribe: 'click', emit: 'onClick' },
  44. { subscribe: 'contentReady', emit: 'onContentReady' },
  45. { subscribe: 'disposing', emit: 'onDisposing' },
  46. { subscribe: 'initialized', emit: 'onInitialized' },
  47. { subscribe: 'optionChanged', emit: 'onOptionChanged' },
  48. { emit: 'accessKeyChange' },
  49. { emit: 'activeStateEnabledChange' },
  50. { emit: 'elementAttrChange' },
  51. { emit: 'focusStateEnabledChange' },
  52. { emit: 'hintChange' },
  53. { emit: 'hoverStateEnabledChange' },
  54. { emit: 'iconChange' },
  55. { emit: 'rtlEnabledChange' },
  56. { emit: 'tabIndexChange' }
  57. ]);
  58. optionHost.setHost(_this);
  59. return _this;
  60. }
  61. Object.defineProperty(DxSpeedDialActionComponent.prototype, "accessKey", {
  62. get: /**
  63. * Specifies the shortcut key that sets focus on the widget.
  64. */
  65. function () {
  66. return this._getOption('accessKey');
  67. },
  68. set: function (value) {
  69. this._setOption('accessKey', value);
  70. },
  71. enumerable: true,
  72. configurable: true
  73. });
  74. Object.defineProperty(DxSpeedDialActionComponent.prototype, "activeStateEnabled", {
  75. get: /**
  76. * Specifies whether or not the widget changes its state when interacting with a user.
  77. */
  78. function () {
  79. return this._getOption('activeStateEnabled');
  80. },
  81. set: function (value) {
  82. this._setOption('activeStateEnabled', value);
  83. },
  84. enumerable: true,
  85. configurable: true
  86. });
  87. Object.defineProperty(DxSpeedDialActionComponent.prototype, "elementAttr", {
  88. get: /**
  89. * Specifies the attributes to be attached to the widget's root element.
  90. */
  91. function () {
  92. return this._getOption('elementAttr');
  93. },
  94. set: function (value) {
  95. this._setOption('elementAttr', value);
  96. },
  97. enumerable: true,
  98. configurable: true
  99. });
  100. Object.defineProperty(DxSpeedDialActionComponent.prototype, "focusStateEnabled", {
  101. get: /**
  102. * Specifies whether the widget can be focused using keyboard navigation.
  103. */
  104. function () {
  105. return this._getOption('focusStateEnabled');
  106. },
  107. set: function (value) {
  108. this._setOption('focusStateEnabled', value);
  109. },
  110. enumerable: true,
  111. configurable: true
  112. });
  113. Object.defineProperty(DxSpeedDialActionComponent.prototype, "hint", {
  114. get: /**
  115. * Specifies text for a hint that appears when a user pauses on the widget.
  116. */
  117. function () {
  118. return this._getOption('hint');
  119. },
  120. set: function (value) {
  121. this._setOption('hint', value);
  122. },
  123. enumerable: true,
  124. configurable: true
  125. });
  126. Object.defineProperty(DxSpeedDialActionComponent.prototype, "hoverStateEnabled", {
  127. get: /**
  128. * Specifies whether the widget changes its state when a user pauses on it.
  129. */
  130. function () {
  131. return this._getOption('hoverStateEnabled');
  132. },
  133. set: function (value) {
  134. this._setOption('hoverStateEnabled', value);
  135. },
  136. enumerable: true,
  137. configurable: true
  138. });
  139. Object.defineProperty(DxSpeedDialActionComponent.prototype, "icon", {
  140. get: /**
  141. * Specifies the icon the FAB or speed dial action button displays.
  142. */
  143. function () {
  144. return this._getOption('icon');
  145. },
  146. set: function (value) {
  147. this._setOption('icon', value);
  148. },
  149. enumerable: true,
  150. configurable: true
  151. });
  152. Object.defineProperty(DxSpeedDialActionComponent.prototype, "rtlEnabled", {
  153. get: /**
  154. * Switches the widget to a right-to-left representation.
  155. */
  156. function () {
  157. return this._getOption('rtlEnabled');
  158. },
  159. set: function (value) {
  160. this._setOption('rtlEnabled', value);
  161. },
  162. enumerable: true,
  163. configurable: true
  164. });
  165. Object.defineProperty(DxSpeedDialActionComponent.prototype, "tabIndex", {
  166. get: /**
  167. * Specifies the number of the element when the Tab key is used for navigating.
  168. */
  169. function () {
  170. return this._getOption('tabIndex');
  171. },
  172. set: function (value) {
  173. this._setOption('tabIndex', value);
  174. },
  175. enumerable: true,
  176. configurable: true
  177. });
  178. DxSpeedDialActionComponent.prototype._createInstance = function (element, options) {
  179. return new speed_dial_action_1.default(element, options);
  180. };
  181. DxSpeedDialActionComponent.prototype.ngOnDestroy = function () {
  182. this._destroyWidget();
  183. };
  184. DxSpeedDialActionComponent.decorators = [
  185. { type: core_1.Component, args: [{
  186. selector: 'dx-speed-dial-action',
  187. template: '',
  188. providers: [
  189. template_host_1.DxTemplateHost,
  190. watcher_helper_1.WatcherHelper,
  191. nested_option_1.NestedOptionHost
  192. ]
  193. },] },
  194. ];
  195. /** @nocollapse */
  196. DxSpeedDialActionComponent.ctorParameters = function () { return [
  197. { type: core_1.ElementRef, },
  198. { type: core_1.NgZone, },
  199. { type: template_host_1.DxTemplateHost, },
  200. { type: watcher_helper_1.WatcherHelper, },
  201. { type: nested_option_1.NestedOptionHost, },
  202. { type: platform_browser_2.TransferState, },
  203. { type: undefined, decorators: [{ type: core_1.Inject, args: [core_1.PLATFORM_ID,] },] },
  204. ]; };
  205. DxSpeedDialActionComponent.propDecorators = {
  206. "accessKey": [{ type: core_1.Input },],
  207. "activeStateEnabled": [{ type: core_1.Input },],
  208. "elementAttr": [{ type: core_1.Input },],
  209. "focusStateEnabled": [{ type: core_1.Input },],
  210. "hint": [{ type: core_1.Input },],
  211. "hoverStateEnabled": [{ type: core_1.Input },],
  212. "icon": [{ type: core_1.Input },],
  213. "rtlEnabled": [{ type: core_1.Input },],
  214. "tabIndex": [{ type: core_1.Input },],
  215. "onClick": [{ type: core_1.Output },],
  216. "onContentReady": [{ type: core_1.Output },],
  217. "onDisposing": [{ type: core_1.Output },],
  218. "onInitialized": [{ type: core_1.Output },],
  219. "onOptionChanged": [{ type: core_1.Output },],
  220. "accessKeyChange": [{ type: core_1.Output },],
  221. "activeStateEnabledChange": [{ type: core_1.Output },],
  222. "elementAttrChange": [{ type: core_1.Output },],
  223. "focusStateEnabledChange": [{ type: core_1.Output },],
  224. "hintChange": [{ type: core_1.Output },],
  225. "hoverStateEnabledChange": [{ type: core_1.Output },],
  226. "iconChange": [{ type: core_1.Output },],
  227. "rtlEnabledChange": [{ type: core_1.Output },],
  228. "tabIndexChange": [{ type: core_1.Output },],
  229. };
  230. return DxSpeedDialActionComponent;
  231. }(component_1.DxComponent));
  232. exports.DxSpeedDialActionComponent = DxSpeedDialActionComponent;
  233. var DxSpeedDialActionModule = (function () {
  234. function DxSpeedDialActionModule() {
  235. }
  236. DxSpeedDialActionModule.decorators = [
  237. { type: core_1.NgModule, args: [{
  238. imports: [
  239. integration_1.DxIntegrationModule,
  240. template_1.DxTemplateModule,
  241. platform_browser_1.BrowserTransferStateModule
  242. ],
  243. declarations: [
  244. DxSpeedDialActionComponent
  245. ],
  246. exports: [
  247. DxSpeedDialActionComponent,
  248. template_1.DxTemplateModule
  249. ]
  250. },] },
  251. ];
  252. return DxSpeedDialActionModule;
  253. }());
  254. exports.DxSpeedDialActionModule = DxSpeedDialActionModule;
  255. //# sourceMappingURL=speed-dial-action.js.map