toolbar-item-dxi.js 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  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 core_1 = require("@angular/core");
  26. var common_1 = require("@angular/common");
  27. var nested_option_1 = require("../../core/nested-option");
  28. var template_host_1 = require("../../core/template-host");
  29. var nested_option_2 = require("../../core/nested-option");
  30. var DxiToolbarItemComponent = (function (_super) {
  31. __extends(DxiToolbarItemComponent, _super);
  32. function DxiToolbarItemComponent(parentOptionHost, optionHost, renderer, document, templateHost, element) {
  33. var _this = _super.call(this) || this;
  34. _this.renderer = renderer;
  35. _this.document = document;
  36. _this.element = element;
  37. parentOptionHost.setNestedOption(_this);
  38. optionHost.setHost(_this, _this._fullOptionPath.bind(_this));
  39. templateHost.setHost(_this);
  40. return _this;
  41. }
  42. Object.defineProperty(DxiToolbarItemComponent.prototype, "disabled", {
  43. get: function () {
  44. return this._getOption('disabled');
  45. },
  46. set: function (value) {
  47. this._setOption('disabled', value);
  48. },
  49. enumerable: true,
  50. configurable: true
  51. });
  52. Object.defineProperty(DxiToolbarItemComponent.prototype, "html", {
  53. get: function () {
  54. return this._getOption('html');
  55. },
  56. set: function (value) {
  57. this._setOption('html', value);
  58. },
  59. enumerable: true,
  60. configurable: true
  61. });
  62. Object.defineProperty(DxiToolbarItemComponent.prototype, "location", {
  63. get: function () {
  64. return this._getOption('location');
  65. },
  66. set: function (value) {
  67. this._setOption('location', value);
  68. },
  69. enumerable: true,
  70. configurable: true
  71. });
  72. Object.defineProperty(DxiToolbarItemComponent.prototype, "options", {
  73. get: function () {
  74. return this._getOption('options');
  75. },
  76. set: function (value) {
  77. this._setOption('options', value);
  78. },
  79. enumerable: true,
  80. configurable: true
  81. });
  82. Object.defineProperty(DxiToolbarItemComponent.prototype, "template", {
  83. get: function () {
  84. return this._getOption('template');
  85. },
  86. set: function (value) {
  87. this._setOption('template', value);
  88. },
  89. enumerable: true,
  90. configurable: true
  91. });
  92. Object.defineProperty(DxiToolbarItemComponent.prototype, "text", {
  93. get: function () {
  94. return this._getOption('text');
  95. },
  96. set: function (value) {
  97. this._setOption('text', value);
  98. },
  99. enumerable: true,
  100. configurable: true
  101. });
  102. Object.defineProperty(DxiToolbarItemComponent.prototype, "toolbar", {
  103. get: function () {
  104. return this._getOption('toolbar');
  105. },
  106. set: function (value) {
  107. this._setOption('toolbar', value);
  108. },
  109. enumerable: true,
  110. configurable: true
  111. });
  112. Object.defineProperty(DxiToolbarItemComponent.prototype, "visible", {
  113. get: function () {
  114. return this._getOption('visible');
  115. },
  116. set: function (value) {
  117. this._setOption('visible', value);
  118. },
  119. enumerable: true,
  120. configurable: true
  121. });
  122. Object.defineProperty(DxiToolbarItemComponent.prototype, "widget", {
  123. get: function () {
  124. return this._getOption('widget');
  125. },
  126. set: function (value) {
  127. this._setOption('widget', value);
  128. },
  129. enumerable: true,
  130. configurable: true
  131. });
  132. Object.defineProperty(DxiToolbarItemComponent.prototype, "_optionPath", {
  133. get: function () {
  134. return 'toolbarItems';
  135. },
  136. enumerable: true,
  137. configurable: true
  138. });
  139. DxiToolbarItemComponent.prototype.setTemplate = function (template) {
  140. this.template = template;
  141. };
  142. DxiToolbarItemComponent.prototype.ngAfterViewInit = function () {
  143. nested_option_1.extractTemplate(this, this.element, this.renderer, this.document);
  144. };
  145. DxiToolbarItemComponent.decorators = [
  146. { type: core_1.Component, args: [{
  147. selector: 'dxi-toolbar-item',
  148. template: '<ng-content></ng-content>',
  149. styles: [':host { display: block; }'],
  150. providers: [nested_option_1.NestedOptionHost, template_host_1.DxTemplateHost]
  151. },] },
  152. ];
  153. /** @nocollapse */
  154. DxiToolbarItemComponent.ctorParameters = function () { return [
  155. { type: nested_option_1.NestedOptionHost, decorators: [{ type: core_1.SkipSelf }, { type: core_1.Host },] },
  156. { type: nested_option_1.NestedOptionHost, decorators: [{ type: core_1.Host },] },
  157. { type: core_1.Renderer2, },
  158. { type: undefined, decorators: [{ type: core_1.Inject, args: [common_1.DOCUMENT,] },] },
  159. { type: template_host_1.DxTemplateHost, decorators: [{ type: core_1.Host },] },
  160. { type: core_1.ElementRef, },
  161. ]; };
  162. DxiToolbarItemComponent.propDecorators = {
  163. "disabled": [{ type: core_1.Input },],
  164. "html": [{ type: core_1.Input },],
  165. "location": [{ type: core_1.Input },],
  166. "options": [{ type: core_1.Input },],
  167. "template": [{ type: core_1.Input },],
  168. "text": [{ type: core_1.Input },],
  169. "toolbar": [{ type: core_1.Input },],
  170. "visible": [{ type: core_1.Input },],
  171. "widget": [{ type: core_1.Input },],
  172. };
  173. return DxiToolbarItemComponent;
  174. }(nested_option_2.CollectionNestedOption));
  175. exports.DxiToolbarItemComponent = DxiToolbarItemComponent;
  176. var DxiToolbarItemModule = (function () {
  177. function DxiToolbarItemModule() {
  178. }
  179. DxiToolbarItemModule.decorators = [
  180. { type: core_1.NgModule, args: [{
  181. declarations: [
  182. DxiToolbarItemComponent
  183. ],
  184. exports: [
  185. DxiToolbarItemComponent
  186. ],
  187. },] },
  188. ];
  189. return DxiToolbarItemModule;
  190. }());
  191. exports.DxiToolbarItemModule = DxiToolbarItemModule;
  192. //# sourceMappingURL=toolbar-item-dxi.js.map