item-dxi.js 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  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 button_group_item_dxi_1 = require("./base/button-group-item-dxi");
  30. var validation_rule_dxi_1 = require("./validation-rule-dxi");
  31. var tab_dxi_1 = require("./tab-dxi");
  32. var location_dxi_1 = require("./location-dxi");
  33. var DxiItemComponent = (function (_super) {
  34. __extends(DxiItemComponent, _super);
  35. function DxiItemComponent(parentOptionHost, optionHost, renderer, document, templateHost, element) {
  36. var _this = _super.call(this) || this;
  37. _this.renderer = renderer;
  38. _this.document = document;
  39. _this.element = element;
  40. parentOptionHost.setNestedOption(_this);
  41. optionHost.setHost(_this, _this._fullOptionPath.bind(_this));
  42. templateHost.setHost(_this);
  43. return _this;
  44. }
  45. Object.defineProperty(DxiItemComponent.prototype, "_optionPath", {
  46. get: function () {
  47. return 'items';
  48. },
  49. enumerable: true,
  50. configurable: true
  51. });
  52. Object.defineProperty(DxiItemComponent.prototype, "itemsChildren", {
  53. get: function () {
  54. return this._getOption('items');
  55. },
  56. set: function (value) {
  57. this.setChildren('items', value);
  58. },
  59. enumerable: true,
  60. configurable: true
  61. });
  62. Object.defineProperty(DxiItemComponent.prototype, "validationRulesChildren", {
  63. get: function () {
  64. return this._getOption('validationRules');
  65. },
  66. set: function (value) {
  67. this.setChildren('validationRules', value);
  68. },
  69. enumerable: true,
  70. configurable: true
  71. });
  72. Object.defineProperty(DxiItemComponent.prototype, "tabsChildren", {
  73. get: function () {
  74. return this._getOption('tabs');
  75. },
  76. set: function (value) {
  77. this.setChildren('tabs', value);
  78. },
  79. enumerable: true,
  80. configurable: true
  81. });
  82. Object.defineProperty(DxiItemComponent.prototype, "locationChildren", {
  83. get: function () {
  84. return this._getOption('location');
  85. },
  86. set: function (value) {
  87. this.setChildren('location', value);
  88. },
  89. enumerable: true,
  90. configurable: true
  91. });
  92. DxiItemComponent.prototype.setTemplate = function (template) {
  93. this.template = template;
  94. };
  95. DxiItemComponent.prototype.ngAfterViewInit = function () {
  96. nested_option_1.extractTemplate(this, this.element, this.renderer, this.document);
  97. };
  98. DxiItemComponent.decorators = [
  99. { type: core_1.Component, args: [{
  100. selector: 'dxi-item',
  101. template: '<ng-content></ng-content>',
  102. styles: [':host { display: block; }'],
  103. providers: [nested_option_1.NestedOptionHost, template_host_1.DxTemplateHost],
  104. inputs: [
  105. 'disabled',
  106. 'html',
  107. 'icon',
  108. 'template',
  109. 'text',
  110. 'title',
  111. 'visible',
  112. 'onClick',
  113. 'type',
  114. 'baseSize',
  115. 'box',
  116. 'ratio',
  117. 'shrink',
  118. 'hint',
  119. 'beginGroup',
  120. 'closeMenuOnClick',
  121. 'items',
  122. 'selectable',
  123. 'selected',
  124. 'colSpan',
  125. 'cssClass',
  126. 'dataField',
  127. 'editorOptions',
  128. 'editorType',
  129. 'helpText',
  130. 'isRequired',
  131. 'itemType',
  132. 'label',
  133. 'name',
  134. 'validationRules',
  135. 'visibleIndex',
  136. 'alignItemLabels',
  137. 'caption',
  138. 'colCount',
  139. 'colCountByScreen',
  140. 'tabPanelOptions',
  141. 'tabs',
  142. 'badge',
  143. 'tabTemplate',
  144. 'alignment',
  145. 'buttonOptions',
  146. 'horizontalAlignment',
  147. 'verticalAlignment',
  148. 'imageAlt',
  149. 'imageSrc',
  150. 'formatName',
  151. 'formatValues',
  152. 'locateInMenu',
  153. 'location',
  154. 'menuItemTemplate',
  155. 'options',
  156. 'showText',
  157. 'widget',
  158. 'key',
  159. 'showChevron',
  160. 'menuTemplate',
  161. 'heightRatio',
  162. 'widthRatio',
  163. 'expanded',
  164. 'hasItems',
  165. 'parentId'
  166. ]
  167. },] },
  168. ];
  169. /** @nocollapse */
  170. DxiItemComponent.ctorParameters = function () { return [
  171. { type: nested_option_1.NestedOptionHost, decorators: [{ type: core_1.SkipSelf }, { type: core_1.Host },] },
  172. { type: nested_option_1.NestedOptionHost, decorators: [{ type: core_1.Host },] },
  173. { type: core_1.Renderer2, },
  174. { type: undefined, decorators: [{ type: core_1.Inject, args: [common_1.DOCUMENT,] },] },
  175. { type: template_host_1.DxTemplateHost, decorators: [{ type: core_1.Host },] },
  176. { type: core_1.ElementRef, },
  177. ]; };
  178. DxiItemComponent.propDecorators = {
  179. "itemsChildren": [{ type: core_1.ContentChildren, args: [core_1.forwardRef(function () { return DxiItemComponent; }),] },],
  180. "validationRulesChildren": [{ type: core_1.ContentChildren, args: [core_1.forwardRef(function () { return validation_rule_dxi_1.DxiValidationRuleComponent; }),] },],
  181. "tabsChildren": [{ type: core_1.ContentChildren, args: [core_1.forwardRef(function () { return tab_dxi_1.DxiTabComponent; }),] },],
  182. "locationChildren": [{ type: core_1.ContentChildren, args: [core_1.forwardRef(function () { return location_dxi_1.DxiLocationComponent; }),] },],
  183. };
  184. return DxiItemComponent;
  185. }(button_group_item_dxi_1.DxiButtonGroupItem));
  186. exports.DxiItemComponent = DxiItemComponent;
  187. var DxiItemModule = (function () {
  188. function DxiItemModule() {
  189. }
  190. DxiItemModule.decorators = [
  191. { type: core_1.NgModule, args: [{
  192. declarations: [
  193. DxiItemComponent
  194. ],
  195. exports: [
  196. DxiItemComponent
  197. ],
  198. },] },
  199. ];
  200. return DxiItemModule;
  201. }());
  202. exports.DxiItemModule = DxiItemModule;
  203. //# sourceMappingURL=item-dxi.js.map