Example #1
0
 set: /**
  * @param {?} value
  * @return {?}
  */
 function (value) {
     this._disabled = coerceBooleanProperty(value);
     // If tooltip is disabled, hide immediately.
     if (this._disabled) {
         this.hide(0);
     }
 },
Example #2
0
 set: /**
  * @param {?} value
  * @return {?}
  */
 function (value) {
     /** @type {?} */
     var newDisabledState = coerceBooleanProperty(value);
     if (this._disabled !== newDisabledState) {
         this._disabled = newDisabledState;
         this._changeDetector.markForCheck();
     }
 },
Example #3
0
 set: /**
  * @param {?} value
  * @return {?}
  */
 function (value) {
     /** @type {?} */
     var newValue = coerceBooleanProperty(value);
     if (newValue !== this.disabled) {
         this._disabled = newValue;
         this._changeDetectorRef.markForCheck();
     }
 },
Example #4
0
 set: /**
  * @param {?} value
  * @return {?}
  */
 function (value) {
     value = coerceBooleanProperty(value);
     // Only act if the actual value changed. This specifically helps to not run
     // resizeToFitContent too early (i.e. before ngAfterViewInit)
     if (this._enabled !== value) {
         (this._enabled = value) ? this.resizeToFitContent(true) : this.reset();
     }
 },
Example #5
0
 /**
  * @param {?} value
  * @return {?}
  */
 set selected(value) {
     const /** @type {?} */ isSelected = coerceBooleanProperty(value);
     if (isSelected !== this._selected) {
         const /** @type {?} */ selectionModel = this.selectionList.selectedOptions;
         this._selected = isSelected;
         isSelected ? selectionModel.select(this) : selectionModel.deselect(this);
         this._changeDetector.markForCheck();
     }
 }
Example #6
0
 /**
  * @param {?} value
  * @return {?}
  */
 set disabled(value) {
     this._disabled = coerceBooleanProperty(value);
     // Browsers may not fire the blur event if the input is disabled too quickly.
     // Reset from here to ensure that the element doesn't become stuck.
     if (this.focused) {
         this.focused = false;
         this.stateChanges.next();
     }
 }
Example #7
0
 /**
  * @param {?} value
  * @return {?}
  */
 set disabled(value) {
     this._disabled = coerceBooleanProperty(value);
     if (this._disabled) {
         this._unsubscribe();
     }
     else {
         this._subscribe();
     }
 }
Example #8
0
 set: /**
  * @param {?} value
  * @return {?}
  */
 function (value) {
     var /** @type {?} */ newValue = coerceBooleanProperty(value);
     if (newValue !== this._checked) {
         this._checked = newValue;
         if (this.buttonToggleGroup) {
             this.buttonToggleGroup._syncButtonToggle(this, this._checked);
         }
         this._changeDetectorRef.markForCheck();
     }
 },
 set: function (v) {
     if (!v) {
         this._config = {
             sortable: false,
             filterable: false,
             filterConfig: {
                 type: 'text'
             }
         };
     }
     else {
         this._config = {
             sortable: coercion_1.coerceBooleanProperty(v.sortable),
             filterable: coercion_1.coerceBooleanProperty(v.filterable),
             transforms: v.transforms || {},
             filterConfig: v.filterConfig || {
                 type: 'text'
             }
         };
         if (this._config.filterConfig.type === 'date' && !this._config.filterConfig.options) {
             this._config.filterConfig.options = this.getDefaultDateFilterOptions();
         }
     }
 },
 set: /**
  * @param {?} value
  * @return {?}
  */
 function (value) {
     var /** @type {?} */ newCheckedState = coerceBooleanProperty(value);
     if (this._checked != newCheckedState) {
         this._checked = newCheckedState;
         if (newCheckedState && this.radioGroup && this.radioGroup.value != this.value) {
             this.radioGroup.selected = this;
         }
         else if (!newCheckedState && this.radioGroup && this.radioGroup.value == this.value) {
             // When unchecking the selected radio button, update the selected radio
             // property on the group.
             this.radioGroup.selected = null;
         }
         if (newCheckedState) {
             // Notify all radio buttons with the same name to un-check.
             this._radioDispatcher.notify(this.id, this.name);
         }
         this._changeDetector.markForCheck();
     }
 },
Example #11
0
 set: /**
  * @param {?} expanded
  * @return {?}
  */
 function (expanded) {
     expanded = coerceBooleanProperty(expanded);
     // Only emit events and update the internal value if the value changes.
     if (this._expanded !== expanded) {
         this._expanded = expanded;
         if (expanded) {
             this.opened.emit();
             /**
              * In the unique selection dispatcher, the id parameter is the id of the CdkAccordionItem,
              * the name value is the id of the accordion.
              */
             var /** @type {?} */ accordionId = this.accordion ? this.accordion.id : this.id;
             this._expansionDispatcher.notify(this.id, accordionId);
         }
         else {
             this.closed.emit();
         }
         // Ensures that the animation will run when the value is set outside of an `@Input`.
         // This includes cases like the open, close and toggle methods.
         this._changeDetectorRef.markForCheck();
     }
 },
Example #12
0
 /**
  * @param {?} value
  * @return {?}
  */
 set completed(value) {
     this._customCompleted = coerceBooleanProperty(value);
 }
Example #13
0
 /**
  * @param {?} value
  * @return {?}
  */
 set optional(value) {
     this._optional = coerceBooleanProperty(value);
 }
Example #14
0
 /**
  * @param {?} value
  * @return {?}
  */
 set editable(value) {
     this._editable = coerceBooleanProperty(value);
 }
Example #15
0
 set: /**
  * @param {?} value
  * @return {?}
  */
 function (value) {
     this._hideRequiredMarker = coerceBooleanProperty(value);
 },
 set: /**
  * @param {?} value
  * @return {?}
  */
 function (value) {
     this._optional = coerceBooleanProperty(value);
 },
 set: /**
  * @param {?} value
  * @return {?}
  */
 function (value) {
     this._editable = coerceBooleanProperty(value);
 },
 set: /**
  * @param {?} value
  * @return {?}
  */
 function (value) { this._linear = coerceBooleanProperty(value); },
 set: /**
  * @param {?} value
  * @return {?}
  */
 function (value) {
     this._customCompleted = coerceBooleanProperty(value);
 },
Example #20
0
 set: /**
  * @param {?} value
  * @return {?}
  */
 function (value) { this._disabled = coerceBooleanProperty(value); },
Example #21
0
 /**
  * @param {?} value
  * @return {?}
  */
 set thumbLabel(value) { this._thumbLabel = coerceBooleanProperty(value); }
 /**
  * @param {?} value
  * @return {?}
  */
 set required(value) { this._required = coerceBooleanProperty(value); }
Example #23
0
 /**
  * @param {?} value
  * @return {?}
  */
 set hasError(value) {
     this._customError = coerceBooleanProperty(value);
 }
Example #24
0
 set: function (value) {
     this._required = coerceBooleanProperty(value);
 },
Example #25
0
 set: function (value) {
     this._required = coerceBooleanProperty(value);
     this._markRadiosForCheck();
 },
Example #26
0
 /**
  * @param {?} value
  * @return {?}
  */
 set vertical(value) {
     this._vertical = coerceBooleanProperty(value);
 }
Example #27
0
 /**
  * @param {?} value
  * @return {?}
  */
 set linear(value) { this._linear = coerceBooleanProperty(value); }
Example #28
0
 set: /**
  * @param {?} value
  * @return {?}
  */
 function (value) {
     this._vertical = coerceBooleanProperty(value);
 },
 /**
  * @param {?} value
  * @return {?}
  */
 set checked(value) {
     this._checked = coerceBooleanProperty(value);
     this._changeDetectorRef.markForCheck();
 }
Example #30
0
 set: /**
  * @param {?} value
  * @return {?}
  */
 function (value) {
     this._multiple = coerceBooleanProperty(value);
 },