validation-group.js 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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 validation_group_1 = require("devextreme/ui/validation_group");
  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 ValidationGroup is a widget that allows you to validate several editors simultaneously.
  37. */
  38. var DxValidationGroupComponent = (function (_super) {
  39. __extends(DxValidationGroupComponent, _super);
  40. function DxValidationGroupComponent(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: 'disposing', emit: 'onDisposing' },
  44. { subscribe: 'initialized', emit: 'onInitialized' },
  45. { subscribe: 'optionChanged', emit: 'onOptionChanged' },
  46. { emit: 'elementAttrChange' },
  47. { emit: 'heightChange' },
  48. { emit: 'widthChange' }
  49. ]);
  50. optionHost.setHost(_this);
  51. return _this;
  52. }
  53. Object.defineProperty(DxValidationGroupComponent.prototype, "elementAttr", {
  54. get: /**
  55. * Specifies the attributes to be attached to the widget's root element.
  56. */
  57. function () {
  58. return this._getOption('elementAttr');
  59. },
  60. set: function (value) {
  61. this._setOption('elementAttr', value);
  62. },
  63. enumerable: true,
  64. configurable: true
  65. });
  66. Object.defineProperty(DxValidationGroupComponent.prototype, "height", {
  67. get: /**
  68. * Specifies the widget's height.
  69. */
  70. function () {
  71. return this._getOption('height');
  72. },
  73. set: function (value) {
  74. this._setOption('height', value);
  75. },
  76. enumerable: true,
  77. configurable: true
  78. });
  79. Object.defineProperty(DxValidationGroupComponent.prototype, "width", {
  80. get: /**
  81. * Specifies the widget's width.
  82. */
  83. function () {
  84. return this._getOption('width');
  85. },
  86. set: function (value) {
  87. this._setOption('width', value);
  88. },
  89. enumerable: true,
  90. configurable: true
  91. });
  92. DxValidationGroupComponent.prototype._createInstance = function (element, options) {
  93. return new validation_group_1.default(element, options);
  94. };
  95. DxValidationGroupComponent.prototype.ngOnDestroy = function () {
  96. this._destroyWidget();
  97. };
  98. DxValidationGroupComponent.decorators = [
  99. { type: core_1.Component, args: [{
  100. selector: 'dx-validation-group',
  101. template: '<ng-content></ng-content>',
  102. providers: [
  103. template_host_1.DxTemplateHost,
  104. watcher_helper_1.WatcherHelper,
  105. nested_option_1.NestedOptionHost
  106. ]
  107. },] },
  108. ];
  109. /** @nocollapse */
  110. DxValidationGroupComponent.ctorParameters = function () { return [
  111. { type: core_1.ElementRef, },
  112. { type: core_1.NgZone, },
  113. { type: template_host_1.DxTemplateHost, },
  114. { type: watcher_helper_1.WatcherHelper, },
  115. { type: nested_option_1.NestedOptionHost, },
  116. { type: platform_browser_2.TransferState, },
  117. { type: undefined, decorators: [{ type: core_1.Inject, args: [core_1.PLATFORM_ID,] },] },
  118. ]; };
  119. DxValidationGroupComponent.propDecorators = {
  120. "elementAttr": [{ type: core_1.Input },],
  121. "height": [{ type: core_1.Input },],
  122. "width": [{ type: core_1.Input },],
  123. "onDisposing": [{ type: core_1.Output },],
  124. "onInitialized": [{ type: core_1.Output },],
  125. "onOptionChanged": [{ type: core_1.Output },],
  126. "elementAttrChange": [{ type: core_1.Output },],
  127. "heightChange": [{ type: core_1.Output },],
  128. "widthChange": [{ type: core_1.Output },],
  129. };
  130. return DxValidationGroupComponent;
  131. }(component_1.DxComponent));
  132. exports.DxValidationGroupComponent = DxValidationGroupComponent;
  133. var DxValidationGroupModule = (function () {
  134. function DxValidationGroupModule() {
  135. }
  136. DxValidationGroupModule.decorators = [
  137. { type: core_1.NgModule, args: [{
  138. imports: [
  139. integration_1.DxIntegrationModule,
  140. template_1.DxTemplateModule,
  141. platform_browser_1.BrowserTransferStateModule
  142. ],
  143. declarations: [
  144. DxValidationGroupComponent
  145. ],
  146. exports: [
  147. DxValidationGroupComponent,
  148. template_1.DxTemplateModule
  149. ]
  150. },] },
  151. ];
  152. return DxValidationGroupModule;
  153. }());
  154. exports.DxValidationGroupModule = DxValidationGroupModule;
  155. //# sourceMappingURL=validation-group.js.map