load-indicator.js 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  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 load_indicator_1 = require("devextreme/ui/load_indicator");
  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 LoadIndicator is a UI element notifying the viewer that a process is in progress.
  37. */
  38. var DxLoadIndicatorComponent = (function (_super) {
  39. __extends(DxLoadIndicatorComponent, _super);
  40. function DxLoadIndicatorComponent(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: 'contentReady', emit: 'onContentReady' },
  44. { subscribe: 'disposing', emit: 'onDisposing' },
  45. { subscribe: 'initialized', emit: 'onInitialized' },
  46. { subscribe: 'optionChanged', emit: 'onOptionChanged' },
  47. { emit: 'elementAttrChange' },
  48. { emit: 'heightChange' },
  49. { emit: 'hintChange' },
  50. { emit: 'indicatorSrcChange' },
  51. { emit: 'rtlEnabledChange' },
  52. { emit: 'visibleChange' },
  53. { emit: 'widthChange' }
  54. ]);
  55. optionHost.setHost(_this);
  56. return _this;
  57. }
  58. Object.defineProperty(DxLoadIndicatorComponent.prototype, "elementAttr", {
  59. get: /**
  60. * Specifies the attributes to be attached to the widget's root element.
  61. */
  62. function () {
  63. return this._getOption('elementAttr');
  64. },
  65. set: function (value) {
  66. this._setOption('elementAttr', value);
  67. },
  68. enumerable: true,
  69. configurable: true
  70. });
  71. Object.defineProperty(DxLoadIndicatorComponent.prototype, "height", {
  72. get: /**
  73. * Specifies the widget's height.
  74. */
  75. function () {
  76. return this._getOption('height');
  77. },
  78. set: function (value) {
  79. this._setOption('height', value);
  80. },
  81. enumerable: true,
  82. configurable: true
  83. });
  84. Object.defineProperty(DxLoadIndicatorComponent.prototype, "hint", {
  85. get: /**
  86. * Specifies text for a hint that appears when a user pauses on the widget.
  87. */
  88. function () {
  89. return this._getOption('hint');
  90. },
  91. set: function (value) {
  92. this._setOption('hint', value);
  93. },
  94. enumerable: true,
  95. configurable: true
  96. });
  97. Object.defineProperty(DxLoadIndicatorComponent.prototype, "indicatorSrc", {
  98. get: /**
  99. * Specifies the path to an image used as the indicator.
  100. */
  101. function () {
  102. return this._getOption('indicatorSrc');
  103. },
  104. set: function (value) {
  105. this._setOption('indicatorSrc', value);
  106. },
  107. enumerable: true,
  108. configurable: true
  109. });
  110. Object.defineProperty(DxLoadIndicatorComponent.prototype, "rtlEnabled", {
  111. get: /**
  112. * Switches the widget to a right-to-left representation.
  113. */
  114. function () {
  115. return this._getOption('rtlEnabled');
  116. },
  117. set: function (value) {
  118. this._setOption('rtlEnabled', value);
  119. },
  120. enumerable: true,
  121. configurable: true
  122. });
  123. Object.defineProperty(DxLoadIndicatorComponent.prototype, "visible", {
  124. get: /**
  125. * Specifies whether the widget is visible.
  126. */
  127. function () {
  128. return this._getOption('visible');
  129. },
  130. set: function (value) {
  131. this._setOption('visible', value);
  132. },
  133. enumerable: true,
  134. configurable: true
  135. });
  136. Object.defineProperty(DxLoadIndicatorComponent.prototype, "width", {
  137. get: /**
  138. * Specifies the widget's width.
  139. */
  140. function () {
  141. return this._getOption('width');
  142. },
  143. set: function (value) {
  144. this._setOption('width', value);
  145. },
  146. enumerable: true,
  147. configurable: true
  148. });
  149. DxLoadIndicatorComponent.prototype._createInstance = function (element, options) {
  150. return new load_indicator_1.default(element, options);
  151. };
  152. DxLoadIndicatorComponent.prototype.ngOnDestroy = function () {
  153. this._destroyWidget();
  154. };
  155. DxLoadIndicatorComponent.decorators = [
  156. { type: core_1.Component, args: [{
  157. selector: 'dx-load-indicator',
  158. template: '',
  159. providers: [
  160. template_host_1.DxTemplateHost,
  161. watcher_helper_1.WatcherHelper,
  162. nested_option_1.NestedOptionHost
  163. ]
  164. },] },
  165. ];
  166. /** @nocollapse */
  167. DxLoadIndicatorComponent.ctorParameters = function () { return [
  168. { type: core_1.ElementRef, },
  169. { type: core_1.NgZone, },
  170. { type: template_host_1.DxTemplateHost, },
  171. { type: watcher_helper_1.WatcherHelper, },
  172. { type: nested_option_1.NestedOptionHost, },
  173. { type: platform_browser_2.TransferState, },
  174. { type: undefined, decorators: [{ type: core_1.Inject, args: [core_1.PLATFORM_ID,] },] },
  175. ]; };
  176. DxLoadIndicatorComponent.propDecorators = {
  177. "elementAttr": [{ type: core_1.Input },],
  178. "height": [{ type: core_1.Input },],
  179. "hint": [{ type: core_1.Input },],
  180. "indicatorSrc": [{ type: core_1.Input },],
  181. "rtlEnabled": [{ type: core_1.Input },],
  182. "visible": [{ type: core_1.Input },],
  183. "width": [{ type: core_1.Input },],
  184. "onContentReady": [{ type: core_1.Output },],
  185. "onDisposing": [{ type: core_1.Output },],
  186. "onInitialized": [{ type: core_1.Output },],
  187. "onOptionChanged": [{ type: core_1.Output },],
  188. "elementAttrChange": [{ type: core_1.Output },],
  189. "heightChange": [{ type: core_1.Output },],
  190. "hintChange": [{ type: core_1.Output },],
  191. "indicatorSrcChange": [{ type: core_1.Output },],
  192. "rtlEnabledChange": [{ type: core_1.Output },],
  193. "visibleChange": [{ type: core_1.Output },],
  194. "widthChange": [{ type: core_1.Output },],
  195. };
  196. return DxLoadIndicatorComponent;
  197. }(component_1.DxComponent));
  198. exports.DxLoadIndicatorComponent = DxLoadIndicatorComponent;
  199. var DxLoadIndicatorModule = (function () {
  200. function DxLoadIndicatorModule() {
  201. }
  202. DxLoadIndicatorModule.decorators = [
  203. { type: core_1.NgModule, args: [{
  204. imports: [
  205. integration_1.DxIntegrationModule,
  206. template_1.DxTemplateModule,
  207. platform_browser_1.BrowserTransferStateModule
  208. ],
  209. declarations: [
  210. DxLoadIndicatorComponent
  211. ],
  212. exports: [
  213. DxLoadIndicatorComponent,
  214. template_1.DxTemplateModule
  215. ]
  216. },] },
  217. ];
  218. return DxLoadIndicatorModule;
  219. }());
  220. exports.DxLoadIndicatorModule = DxLoadIndicatorModule;
  221. //# sourceMappingURL=load-indicator.js.map