| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054 |
- "use strict";
- var __extends = (this && this.__extends) || (function () {
- var extendStatics = Object.setPrototypeOf ||
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
- return function (d, b) {
- extendStatics(d, b);
- function __() { this.constructor = d; }
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
- };
- })();
- /*!
- * devextreme-angular
- * Version: 19.1.16
- * Build date: Tue Oct 18 2022
- *
- * Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
- *
- * This software may be modified and distributed under the terms
- * of the MIT license. See the LICENSE file in the root of the project for details.
- *
- * https://github.com/DevExpress/devextreme-angular
- */
- Object.defineProperty(exports, "__esModule", { value: true });
- var platform_browser_1 = require("@angular/platform-browser");
- var platform_browser_2 = require("@angular/platform-browser");
- var core_1 = require("@angular/core");
- var date_box_1 = require("devextreme/ui/date_box");
- var forms_1 = require("@angular/forms");
- var component_1 = require("../core/component");
- var template_host_1 = require("../core/template-host");
- var integration_1 = require("../core/integration");
- var template_1 = require("../core/template");
- var nested_option_1 = require("../core/nested-option");
- var watcher_helper_1 = require("../core/watcher-helper");
- var iterable_differ_helper_1 = require("../core/iterable-differ-helper");
- var button_dxi_1 = require("./nested/button-dxi");
- var options_1 = require("./nested/options");
- var calendar_options_1 = require("./nested/calendar-options");
- var display_format_1 = require("./nested/display-format");
- var button_dxi_2 = require("./nested/button-dxi");
- var CUSTOM_VALUE_ACCESSOR_PROVIDER = {
- provide: forms_1.NG_VALUE_ACCESSOR,
- useExisting: core_1.forwardRef(function () { return DxDateBoxComponent; }),
- multi: true
- };
- /**
- * The DateBox is a widget that displays date and time in a specified format, and enables a user to pick or type in the required date/time value.
- */
- var DxDateBoxComponent = (function (_super) {
- __extends(DxDateBoxComponent, _super);
- function DxDateBoxComponent(elementRef, ngZone, templateHost, _watcherHelper, _idh, optionHost, transferState, platformId) {
- var _this = _super.call(this, elementRef, ngZone, templateHost, _watcherHelper, transferState, platformId) || this;
- _this._watcherHelper = _watcherHelper;
- _this._idh = _idh;
- _this.touched = function (_) { };
- _this._createEventEmitters([
- { subscribe: 'change', emit: 'onChange' },
- { subscribe: 'closed', emit: 'onClosed' },
- { subscribe: 'contentReady', emit: 'onContentReady' },
- { subscribe: 'copy', emit: 'onCopy' },
- { subscribe: 'cut', emit: 'onCut' },
- { subscribe: 'disposing', emit: 'onDisposing' },
- { subscribe: 'enterKey', emit: 'onEnterKey' },
- { subscribe: 'focusIn', emit: 'onFocusIn' },
- { subscribe: 'focusOut', emit: 'onFocusOut' },
- { subscribe: 'initialized', emit: 'onInitialized' },
- { subscribe: 'input', emit: 'onInput' },
- { subscribe: 'keyDown', emit: 'onKeyDown' },
- { subscribe: 'keyPress', emit: 'onKeyPress' },
- { subscribe: 'keyUp', emit: 'onKeyUp' },
- { subscribe: 'opened', emit: 'onOpened' },
- { subscribe: 'optionChanged', emit: 'onOptionChanged' },
- { subscribe: 'paste', emit: 'onPaste' },
- { subscribe: 'valueChanged', emit: 'onValueChanged' },
- { emit: 'acceptCustomValueChange' },
- { emit: 'accessKeyChange' },
- { emit: 'activeStateEnabledChange' },
- { emit: 'adaptivityEnabledChange' },
- { emit: 'applyButtonTextChange' },
- { emit: 'applyValueModeChange' },
- { emit: 'buttonsChange' },
- { emit: 'calendarOptionsChange' },
- { emit: 'cancelButtonTextChange' },
- { emit: 'dateOutOfRangeMessageChange' },
- { emit: 'dateSerializationFormatChange' },
- { emit: 'deferRenderingChange' },
- { emit: 'disabledChange' },
- { emit: 'disabledDatesChange' },
- { emit: 'displayFormatChange' },
- { emit: 'dropDownButtonTemplateChange' },
- { emit: 'elementAttrChange' },
- { emit: 'focusStateEnabledChange' },
- { emit: 'heightChange' },
- { emit: 'hintChange' },
- { emit: 'hoverStateEnabledChange' },
- { emit: 'inputAttrChange' },
- { emit: 'intervalChange' },
- { emit: 'invalidDateMessageChange' },
- { emit: 'isValidChange' },
- { emit: 'maxChange' },
- { emit: 'maxLengthChange' },
- { emit: 'maxZoomLevelChange' },
- { emit: 'minChange' },
- { emit: 'minZoomLevelChange' },
- { emit: 'nameChange' },
- { emit: 'openedChange' },
- { emit: 'openOnFieldClickChange' },
- { emit: 'pickerTypeChange' },
- { emit: 'placeholderChange' },
- { emit: 'readOnlyChange' },
- { emit: 'rtlEnabledChange' },
- { emit: 'showAnalogClockChange' },
- { emit: 'showClearButtonChange' },
- { emit: 'showDropDownButtonChange' },
- { emit: 'spellcheckChange' },
- { emit: 'stylingModeChange' },
- { emit: 'tabIndexChange' },
- { emit: 'textChange' },
- { emit: 'typeChange' },
- { emit: 'useMaskBehaviorChange' },
- { emit: 'validationErrorChange' },
- { emit: 'validationMessageModeChange' },
- { emit: 'valueChange' },
- { emit: 'valueChangeEventChange' },
- { emit: 'visibleChange' },
- { emit: 'widthChange' },
- { emit: 'onBlur' }
- ]);
- _this._idh.setHost(_this);
- optionHost.setHost(_this);
- return _this;
- }
- Object.defineProperty(DxDateBoxComponent.prototype, "acceptCustomValue", {
- get: /**
- * Specifies whether or not the widget allows an end-user to enter a custom value.
- */
- function () {
- return this._getOption('acceptCustomValue');
- },
- set: function (value) {
- this._setOption('acceptCustomValue', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "accessKey", {
- get: /**
- * Specifies the shortcut key that sets focus on the widget.
- */
- function () {
- return this._getOption('accessKey');
- },
- set: function (value) {
- this._setOption('accessKey', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "activeStateEnabled", {
- get: /**
- * Specifies whether or not the widget changes its state when interacting with a user.
- */
- function () {
- return this._getOption('activeStateEnabled');
- },
- set: function (value) {
- this._setOption('activeStateEnabled', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "adaptivityEnabled", {
- get: /**
- * Specifies whether or not adaptive widget rendering is enabled on a small screen.
- */
- function () {
- return this._getOption('adaptivityEnabled');
- },
- set: function (value) {
- this._setOption('adaptivityEnabled', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "applyButtonText", {
- get: /**
- * The text displayed on the Apply button.
- */
- function () {
- return this._getOption('applyButtonText');
- },
- set: function (value) {
- this._setOption('applyButtonText', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "applyValueMode", {
- get: /**
- * Specifies the way an end-user applies the selected value.
- */
- function () {
- return this._getOption('applyValueMode');
- },
- set: function (value) {
- this._setOption('applyValueMode', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "buttons", {
- get: /**
- * Allows you to add custom buttons to the input text field.
- */
- function () {
- return this._getOption('buttons');
- },
- set: function (value) {
- this._setOption('buttons', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "calendarOptions", {
- get: /**
- * Configures the calendar's value picker. Applies only if the pickerType is "calendar".
- */
- function () {
- return this._getOption('calendarOptions');
- },
- set: function (value) {
- this._setOption('calendarOptions', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "cancelButtonText", {
- get: /**
- * The text displayed on the Cancel button.
- */
- function () {
- return this._getOption('cancelButtonText');
- },
- set: function (value) {
- this._setOption('cancelButtonText', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "dateOutOfRangeMessage", {
- get: /**
- * Specifies the message displayed if the specified date is later than the max value or earlier than the min value.
- */
- function () {
- return this._getOption('dateOutOfRangeMessage');
- },
- set: function (value) {
- this._setOption('dateOutOfRangeMessage', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "dateSerializationFormat", {
- get: /**
- * Specifies the date-time value serialization format. Use it only if you do not specify the value at design time.
- */
- function () {
- return this._getOption('dateSerializationFormat');
- },
- set: function (value) {
- this._setOption('dateSerializationFormat', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "deferRendering", {
- get: /**
- * Specifies whether to render the drop-down field's content when it is displayed. If false, the content is rendered immediately.
- */
- function () {
- return this._getOption('deferRendering');
- },
- set: function (value) {
- this._setOption('deferRendering', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "disabled", {
- get: /**
- * Specifies whether the widget responds to user interaction.
- */
- function () {
- return this._getOption('disabled');
- },
- set: function (value) {
- this._setOption('disabled', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "disabledDates", {
- get: /**
- * Specifies dates to be disabled. Applies only if pickerType is "calendar".
- */
- function () {
- return this._getOption('disabledDates');
- },
- set: function (value) {
- this._setOption('disabledDates', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "displayFormat", {
- get: /**
- * Specifies the date display format. Ignored if the pickerType option is "native"
- */
- function () {
- return this._getOption('displayFormat');
- },
- set: function (value) {
- this._setOption('displayFormat', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "dropDownButtonTemplate", {
- get: /**
- * Specifies a custom template for the drop-down button.
- */
- function () {
- return this._getOption('dropDownButtonTemplate');
- },
- set: function (value) {
- this._setOption('dropDownButtonTemplate', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "elementAttr", {
- get: /**
- * Specifies the attributes to be attached to the widget's root element.
- */
- function () {
- return this._getOption('elementAttr');
- },
- set: function (value) {
- this._setOption('elementAttr', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "focusStateEnabled", {
- get: /**
- * Specifies whether the widget can be focused using keyboard navigation.
- */
- function () {
- return this._getOption('focusStateEnabled');
- },
- set: function (value) {
- this._setOption('focusStateEnabled', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "height", {
- get: /**
- * Specifies the widget's height.
- */
- function () {
- return this._getOption('height');
- },
- set: function (value) {
- this._setOption('height', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "hint", {
- get: /**
- * Specifies text for a hint that appears when a user pauses on the widget.
- */
- function () {
- return this._getOption('hint');
- },
- set: function (value) {
- this._setOption('hint', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "hoverStateEnabled", {
- get: /**
- * Specifies whether the widget changes its state when a user pauses on it.
- */
- function () {
- return this._getOption('hoverStateEnabled');
- },
- set: function (value) {
- this._setOption('hoverStateEnabled', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "inputAttr", {
- get: /**
- * Specifies the attributes to be passed on to the underlying HTML element.
- */
- function () {
- return this._getOption('inputAttr');
- },
- set: function (value) {
- this._setOption('inputAttr', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "interval", {
- get: /**
- * Specifies the interval between neighboring values in the popup list in minutes.
- */
- function () {
- return this._getOption('interval');
- },
- set: function (value) {
- this._setOption('interval', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "invalidDateMessage", {
- get: /**
- * Specifies the message displayed if the typed value is not a valid date or time.
- */
- function () {
- return this._getOption('invalidDateMessage');
- },
- set: function (value) {
- this._setOption('invalidDateMessage', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "isValid", {
- get: /**
- * Specifies whether the editor's value is valid.
- */
- function () {
- return this._getOption('isValid');
- },
- set: function (value) {
- this._setOption('isValid', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "max", {
- get: /**
- * The last date that can be selected within the widget.
- */
- function () {
- return this._getOption('max');
- },
- set: function (value) {
- this._setOption('max', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "maxLength", {
- get: /**
- * Specifies the maximum number of characters you can enter into the textbox.
- */
- function () {
- return this._getOption('maxLength');
- },
- set: function (value) {
- this._setOption('maxLength', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "maxZoomLevel", {
- get: /**
- * Use the calendarOptions option instead.
- */
- function () {
- return this._getOption('maxZoomLevel');
- },
- set: function (value) {
- this._setOption('maxZoomLevel', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "min", {
- get: /**
- * The minimum date that can be selected within the widget.
- */
- function () {
- return this._getOption('min');
- },
- set: function (value) {
- this._setOption('min', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "minZoomLevel", {
- get: /**
- * Use the calendarOptions option instead.
- */
- function () {
- return this._getOption('minZoomLevel');
- },
- set: function (value) {
- this._setOption('minZoomLevel', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "name", {
- get: /**
- * The value to be assigned to the `name` attribute of the underlying HTML element.
- */
- function () {
- return this._getOption('name');
- },
- set: function (value) {
- this._setOption('name', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "opened", {
- get: /**
- * Specifies whether or not the drop-down editor is displayed.
- */
- function () {
- return this._getOption('opened');
- },
- set: function (value) {
- this._setOption('opened', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "openOnFieldClick", {
- get: /**
- * Specifies whether a user can open the drop-down list by clicking a text field.
- */
- function () {
- return this._getOption('openOnFieldClick');
- },
- set: function (value) {
- this._setOption('openOnFieldClick', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "pickerType", {
- get: /**
- * Specifies the type of the date/time picker.
- */
- function () {
- return this._getOption('pickerType');
- },
- set: function (value) {
- this._setOption('pickerType', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "placeholder", {
- get: /**
- * Specifies a placeholder for the input field.
- */
- function () {
- return this._getOption('placeholder');
- },
- set: function (value) {
- this._setOption('placeholder', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "readOnly", {
- get: /**
- * Specifies whether the editor is read-only.
- */
- function () {
- return this._getOption('readOnly');
- },
- set: function (value) {
- this._setOption('readOnly', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "rtlEnabled", {
- get: /**
- * Switches the widget to a right-to-left representation.
- */
- function () {
- return this._getOption('rtlEnabled');
- },
- set: function (value) {
- this._setOption('rtlEnabled', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "showAnalogClock", {
- get: /**
- * Specifies whether to show the analog clock in the value picker. Applies only if type is "datetime" and pickerType is "calendar".
- */
- function () {
- return this._getOption('showAnalogClock');
- },
- set: function (value) {
- this._setOption('showAnalogClock', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "showClearButton", {
- get: /**
- * Specifies whether to display the Clear button in the widget.
- */
- function () {
- return this._getOption('showClearButton');
- },
- set: function (value) {
- this._setOption('showClearButton', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "showDropDownButton", {
- get: /**
- * Specifies whether the drop-down button is visible.
- */
- function () {
- return this._getOption('showDropDownButton');
- },
- set: function (value) {
- this._setOption('showDropDownButton', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "spellcheck", {
- get: /**
- * Specifies whether or not the widget checks the inner text for spelling mistakes.
- */
- function () {
- return this._getOption('spellcheck');
- },
- set: function (value) {
- this._setOption('spellcheck', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "stylingMode", {
- get: /**
- * Specifies how the widget's text field is styled.
- */
- function () {
- return this._getOption('stylingMode');
- },
- set: function (value) {
- this._setOption('stylingMode', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "tabIndex", {
- get: /**
- * Specifies the number of the element when the Tab key is used for navigating.
- */
- function () {
- return this._getOption('tabIndex');
- },
- set: function (value) {
- this._setOption('tabIndex', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "text", {
- get: /**
- * The read-only option that holds the text displayed by the widget input element.
- */
- function () {
- return this._getOption('text');
- },
- set: function (value) {
- this._setOption('text', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "type", {
- get: /**
- * A format used to display date/time information.
- */
- function () {
- return this._getOption('type');
- },
- set: function (value) {
- this._setOption('type', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "useMaskBehavior", {
- get: /**
- * Specifies whether to control user input using a mask created based on the displayFormat.
- */
- function () {
- return this._getOption('useMaskBehavior');
- },
- set: function (value) {
- this._setOption('useMaskBehavior', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "validationError", {
- get: /**
- * Specifies information on the validation error when using a custom validation engine. Should be changed at runtime along with the isValid option.
- */
- function () {
- return this._getOption('validationError');
- },
- set: function (value) {
- this._setOption('validationError', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "validationMessageMode", {
- get: /**
- * Specifies how the message about the validation rules that are not satisfied by this editor's value is displayed.
- */
- function () {
- return this._getOption('validationMessageMode');
- },
- set: function (value) {
- this._setOption('validationMessageMode', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "value", {
- get: /**
- * An object or a value specifying the date and time currently selected using the date box.
- */
- function () {
- return this._getOption('value');
- },
- set: function (value) {
- this._setOption('value', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "valueChangeEvent", {
- get: /**
- * Specifies the DOM events after which the widget's value should be updated.
- */
- function () {
- return this._getOption('valueChangeEvent');
- },
- set: function (value) {
- this._setOption('valueChangeEvent', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "visible", {
- get: /**
- * Specifies whether the widget is visible.
- */
- function () {
- return this._getOption('visible');
- },
- set: function (value) {
- this._setOption('visible', value);
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(DxDateBoxComponent.prototype, "width", {
- get: /**
- * Specifies the widget's width.
- */
- function () {
- return this._getOption('width');
- },
- set: function (value) {
- this._setOption('width', value);
- },
- enumerable: true,
- configurable: true
- });
- DxDateBoxComponent.prototype.change = function (_) { };
- Object.defineProperty(DxDateBoxComponent.prototype, "buttonsChildren", {
- get: function () {
- return this._getOption('buttons');
- },
- set: function (value) {
- this.setChildren('buttons', value);
- },
- enumerable: true,
- configurable: true
- });
- DxDateBoxComponent.prototype._createInstance = function (element, options) {
- return new date_box_1.default(element, options);
- };
- DxDateBoxComponent.prototype.writeValue = function (value) {
- this.eventHelper.lockedValueChangeEvent = true;
- this.value = value;
- this.eventHelper.lockedValueChangeEvent = false;
- };
- DxDateBoxComponent.prototype.setDisabledState = function (isDisabled) {
- this.disabled = isDisabled;
- };
- DxDateBoxComponent.prototype.registerOnChange = function (fn) { this.change = fn; };
- DxDateBoxComponent.prototype.registerOnTouched = function (fn) { this.touched = fn; };
- DxDateBoxComponent.prototype._createWidget = function (element) {
- var _this = this;
- _super.prototype._createWidget.call(this, element);
- this.instance.on('focusOut', function (e) {
- _this.eventHelper.fireNgEvent('onBlur', [e]);
- });
- };
- DxDateBoxComponent.prototype.ngOnDestroy = function () {
- this._destroyWidget();
- };
- DxDateBoxComponent.prototype.ngOnChanges = function (changes) {
- _super.prototype.ngOnChanges.call(this, changes);
- this.setupChanges('buttons', changes);
- this.setupChanges('disabledDates', changes);
- };
- DxDateBoxComponent.prototype.setupChanges = function (prop, changes) {
- if (!(prop in this._optionsToUpdate)) {
- this._idh.setup(prop, changes);
- }
- };
- DxDateBoxComponent.prototype.ngDoCheck = function () {
- this._idh.doCheck('buttons');
- this._idh.doCheck('disabledDates');
- this._watcherHelper.checkWatchers();
- _super.prototype.ngDoCheck.call(this);
- _super.prototype.clearChangedOptions.call(this);
- };
- DxDateBoxComponent.prototype._setOption = function (name, value) {
- var isSetup = this._idh.setupSingle(name, value);
- var isChanged = this._idh.getChanges(name, value) !== null;
- if (isSetup || isChanged) {
- _super.prototype._setOption.call(this, name, value);
- }
- };
- DxDateBoxComponent.decorators = [
- { type: core_1.Component, args: [{
- selector: 'dx-date-box',
- template: '',
- providers: [
- template_host_1.DxTemplateHost,
- watcher_helper_1.WatcherHelper,
- CUSTOM_VALUE_ACCESSOR_PROVIDER,
- nested_option_1.NestedOptionHost,
- iterable_differ_helper_1.IterableDifferHelper
- ]
- },] },
- ];
- /** @nocollapse */
- DxDateBoxComponent.ctorParameters = function () { return [
- { type: core_1.ElementRef, },
- { type: core_1.NgZone, },
- { type: template_host_1.DxTemplateHost, },
- { type: watcher_helper_1.WatcherHelper, },
- { type: iterable_differ_helper_1.IterableDifferHelper, },
- { type: nested_option_1.NestedOptionHost, },
- { type: platform_browser_2.TransferState, },
- { type: undefined, decorators: [{ type: core_1.Inject, args: [core_1.PLATFORM_ID,] },] },
- ]; };
- DxDateBoxComponent.propDecorators = {
- "acceptCustomValue": [{ type: core_1.Input },],
- "accessKey": [{ type: core_1.Input },],
- "activeStateEnabled": [{ type: core_1.Input },],
- "adaptivityEnabled": [{ type: core_1.Input },],
- "applyButtonText": [{ type: core_1.Input },],
- "applyValueMode": [{ type: core_1.Input },],
- "buttons": [{ type: core_1.Input },],
- "calendarOptions": [{ type: core_1.Input },],
- "cancelButtonText": [{ type: core_1.Input },],
- "dateOutOfRangeMessage": [{ type: core_1.Input },],
- "dateSerializationFormat": [{ type: core_1.Input },],
- "deferRendering": [{ type: core_1.Input },],
- "disabled": [{ type: core_1.Input },],
- "disabledDates": [{ type: core_1.Input },],
- "displayFormat": [{ type: core_1.Input },],
- "dropDownButtonTemplate": [{ type: core_1.Input },],
- "elementAttr": [{ type: core_1.Input },],
- "focusStateEnabled": [{ type: core_1.Input },],
- "height": [{ type: core_1.Input },],
- "hint": [{ type: core_1.Input },],
- "hoverStateEnabled": [{ type: core_1.Input },],
- "inputAttr": [{ type: core_1.Input },],
- "interval": [{ type: core_1.Input },],
- "invalidDateMessage": [{ type: core_1.Input },],
- "isValid": [{ type: core_1.Input },],
- "max": [{ type: core_1.Input },],
- "maxLength": [{ type: core_1.Input },],
- "maxZoomLevel": [{ type: core_1.Input },],
- "min": [{ type: core_1.Input },],
- "minZoomLevel": [{ type: core_1.Input },],
- "name": [{ type: core_1.Input },],
- "opened": [{ type: core_1.Input },],
- "openOnFieldClick": [{ type: core_1.Input },],
- "pickerType": [{ type: core_1.Input },],
- "placeholder": [{ type: core_1.Input },],
- "readOnly": [{ type: core_1.Input },],
- "rtlEnabled": [{ type: core_1.Input },],
- "showAnalogClock": [{ type: core_1.Input },],
- "showClearButton": [{ type: core_1.Input },],
- "showDropDownButton": [{ type: core_1.Input },],
- "spellcheck": [{ type: core_1.Input },],
- "stylingMode": [{ type: core_1.Input },],
- "tabIndex": [{ type: core_1.Input },],
- "text": [{ type: core_1.Input },],
- "type": [{ type: core_1.Input },],
- "useMaskBehavior": [{ type: core_1.Input },],
- "validationError": [{ type: core_1.Input },],
- "validationMessageMode": [{ type: core_1.Input },],
- "value": [{ type: core_1.Input },],
- "valueChangeEvent": [{ type: core_1.Input },],
- "visible": [{ type: core_1.Input },],
- "width": [{ type: core_1.Input },],
- "onChange": [{ type: core_1.Output },],
- "onClosed": [{ type: core_1.Output },],
- "onContentReady": [{ type: core_1.Output },],
- "onCopy": [{ type: core_1.Output },],
- "onCut": [{ type: core_1.Output },],
- "onDisposing": [{ type: core_1.Output },],
- "onEnterKey": [{ type: core_1.Output },],
- "onFocusIn": [{ type: core_1.Output },],
- "onFocusOut": [{ type: core_1.Output },],
- "onInitialized": [{ type: core_1.Output },],
- "onInput": [{ type: core_1.Output },],
- "onKeyDown": [{ type: core_1.Output },],
- "onKeyPress": [{ type: core_1.Output },],
- "onKeyUp": [{ type: core_1.Output },],
- "onOpened": [{ type: core_1.Output },],
- "onOptionChanged": [{ type: core_1.Output },],
- "onPaste": [{ type: core_1.Output },],
- "onValueChanged": [{ type: core_1.Output },],
- "acceptCustomValueChange": [{ type: core_1.Output },],
- "accessKeyChange": [{ type: core_1.Output },],
- "activeStateEnabledChange": [{ type: core_1.Output },],
- "adaptivityEnabledChange": [{ type: core_1.Output },],
- "applyButtonTextChange": [{ type: core_1.Output },],
- "applyValueModeChange": [{ type: core_1.Output },],
- "buttonsChange": [{ type: core_1.Output },],
- "calendarOptionsChange": [{ type: core_1.Output },],
- "cancelButtonTextChange": [{ type: core_1.Output },],
- "dateOutOfRangeMessageChange": [{ type: core_1.Output },],
- "dateSerializationFormatChange": [{ type: core_1.Output },],
- "deferRenderingChange": [{ type: core_1.Output },],
- "disabledChange": [{ type: core_1.Output },],
- "disabledDatesChange": [{ type: core_1.Output },],
- "displayFormatChange": [{ type: core_1.Output },],
- "dropDownButtonTemplateChange": [{ type: core_1.Output },],
- "elementAttrChange": [{ type: core_1.Output },],
- "focusStateEnabledChange": [{ type: core_1.Output },],
- "heightChange": [{ type: core_1.Output },],
- "hintChange": [{ type: core_1.Output },],
- "hoverStateEnabledChange": [{ type: core_1.Output },],
- "inputAttrChange": [{ type: core_1.Output },],
- "intervalChange": [{ type: core_1.Output },],
- "invalidDateMessageChange": [{ type: core_1.Output },],
- "isValidChange": [{ type: core_1.Output },],
- "maxChange": [{ type: core_1.Output },],
- "maxLengthChange": [{ type: core_1.Output },],
- "maxZoomLevelChange": [{ type: core_1.Output },],
- "minChange": [{ type: core_1.Output },],
- "minZoomLevelChange": [{ type: core_1.Output },],
- "nameChange": [{ type: core_1.Output },],
- "openedChange": [{ type: core_1.Output },],
- "openOnFieldClickChange": [{ type: core_1.Output },],
- "pickerTypeChange": [{ type: core_1.Output },],
- "placeholderChange": [{ type: core_1.Output },],
- "readOnlyChange": [{ type: core_1.Output },],
- "rtlEnabledChange": [{ type: core_1.Output },],
- "showAnalogClockChange": [{ type: core_1.Output },],
- "showClearButtonChange": [{ type: core_1.Output },],
- "showDropDownButtonChange": [{ type: core_1.Output },],
- "spellcheckChange": [{ type: core_1.Output },],
- "stylingModeChange": [{ type: core_1.Output },],
- "tabIndexChange": [{ type: core_1.Output },],
- "textChange": [{ type: core_1.Output },],
- "typeChange": [{ type: core_1.Output },],
- "useMaskBehaviorChange": [{ type: core_1.Output },],
- "validationErrorChange": [{ type: core_1.Output },],
- "validationMessageModeChange": [{ type: core_1.Output },],
- "valueChange": [{ type: core_1.Output },],
- "valueChangeEventChange": [{ type: core_1.Output },],
- "visibleChange": [{ type: core_1.Output },],
- "widthChange": [{ type: core_1.Output },],
- "onBlur": [{ type: core_1.Output },],
- "change": [{ type: core_1.HostListener, args: ['valueChange', ['$event'],] },],
- "touched": [{ type: core_1.HostListener, args: ['onBlur', ['$event'],] },],
- "buttonsChildren": [{ type: core_1.ContentChildren, args: [button_dxi_2.DxiButtonComponent,] },],
- };
- return DxDateBoxComponent;
- }(component_1.DxComponent));
- exports.DxDateBoxComponent = DxDateBoxComponent;
- var DxDateBoxModule = (function () {
- function DxDateBoxModule() {
- }
- DxDateBoxModule.decorators = [
- { type: core_1.NgModule, args: [{
- imports: [
- button_dxi_1.DxiButtonModule,
- options_1.DxoOptionsModule,
- calendar_options_1.DxoCalendarOptionsModule,
- display_format_1.DxoDisplayFormatModule,
- integration_1.DxIntegrationModule,
- template_1.DxTemplateModule,
- platform_browser_1.BrowserTransferStateModule
- ],
- declarations: [
- DxDateBoxComponent
- ],
- exports: [
- DxDateBoxComponent,
- button_dxi_1.DxiButtonModule,
- options_1.DxoOptionsModule,
- calendar_options_1.DxoCalendarOptionsModule,
- display_format_1.DxoDisplayFormatModule,
- template_1.DxTemplateModule
- ]
- },] },
- ];
- return DxDateBoxModule;
- }());
- exports.DxDateBoxModule = DxDateBoxModule;
- //# sourceMappingURL=date-box.js.map
|