diff --git a/projects/truly-ui/src/components/autocomplete/autocomplete.html b/projects/truly-ui/src/components/autocomplete/autocomplete.html index 14996611b..831198b2f 100644 --- a/projects/truly-ui/src/components/autocomplete/autocomplete.html +++ b/projects/truly-ui/src/components/autocomplete/autocomplete.html @@ -21,6 +21,7 @@ [textBefore]="textBefore" [textAfter]="textAfter" [height]="height" + [required]="required" (clear)="close()" (click)="toggleIsOpen()" (clickAddon)="clickAddon.emit($event)" diff --git a/projects/truly-ui/src/components/datepicker/datepicker-content/datepicker-content.html b/projects/truly-ui/src/components/datepicker/datepicker-content/datepicker-content.html index ced1c14d3..17ed03f93 100644 --- a/projects/truly-ui/src/components/datepicker/datepicker-content/datepicker-content.html +++ b/projects/truly-ui/src/components/datepicker/datepicker-content/datepicker-content.html @@ -1,7 +1,7 @@
- +
diff --git a/projects/truly-ui/src/components/datepicker/datepicker-content/datepicker-content.ts b/projects/truly-ui/src/components/datepicker/datepicker-content/datepicker-content.ts index 43435c1cc..3d3e85eaf 100644 --- a/projects/truly-ui/src/components/datepicker/datepicker-content/datepicker-content.ts +++ b/projects/truly-ui/src/components/datepicker/datepicker-content/datepicker-content.ts @@ -24,6 +24,7 @@ import { } from '@angular/core'; import { TlInput } from '../../input/input'; import { OverlayAnimation } from '../../core/directives/overlay-animation'; +import { CalendarHoliday } from '../../calendar/interfaces/calendar-holiday.interface'; @Component( { selector: 'tl-datepicker-content', @@ -47,6 +48,8 @@ export class TlDatePickerContent { @Input('overlayPosition') overlayPosition: string; + @Input() holidays: Array = []; + @Output() selectDayContent: EventEmitter = new EventEmitter(); @ViewChild(TemplateRef, {static: true} ) template: TemplateRef; diff --git a/projects/truly-ui/src/components/datepicker/datepicker.html b/projects/truly-ui/src/components/datepicker/datepicker.html index 9b532355f..2597cabff 100644 --- a/projects/truly-ui/src/components/datepicker/datepicker.html +++ b/projects/truly-ui/src/components/datepicker/datepicker.html @@ -33,6 +33,7 @@ diff --git a/projects/truly-ui/src/components/datepicker/datepicker.ts b/projects/truly-ui/src/components/datepicker/datepicker.ts index 94325eb1c..2039f7d27 100644 --- a/projects/truly-ui/src/components/datepicker/datepicker.ts +++ b/projects/truly-ui/src/components/datepicker/datepicker.ts @@ -31,8 +31,7 @@ import { Output, Self, ViewChild } from '@angular/core'; -import {MakeProvider} from '../core/base/value-accessor-provider'; -import {FormControlName, NgControl, NgModel} from '@angular/forms'; +import {NgControl} from '@angular/forms'; import {TlInput} from '../input/input'; import {TlCalendar} from '../calendar/calendar'; @@ -41,6 +40,7 @@ import {ConnectedOverlayPositionChange} from '@angular/cdk/overlay'; import {KeyEvent} from '../core/enums/key-events'; import {ValueAccessorBase} from '../input/core/value-accessor'; import {Subscription} from 'rxjs'; +import {CalendarHoliday} from '../calendar/interfaces/calendar-holiday.interface'; export interface DateOject { day: number; @@ -84,6 +84,8 @@ export class TlDatePicker extends ValueAccessorBase implements On @Input() openOnFocus = true; + @Input() holidays: Array = []; + @Output() selectDay: EventEmitter = new EventEmitter(); @Output() completeMask: EventEmitter = new EventEmitter(); diff --git a/projects/truly-ui/src/components/editor/editor.ts b/projects/truly-ui/src/components/editor/editor.ts index f18f81f7e..83b1000ca 100644 --- a/projects/truly-ui/src/components/editor/editor.ts +++ b/projects/truly-ui/src/components/editor/editor.ts @@ -20,7 +20,7 @@ SOFTWARE. */ import { - AfterContentInit, + AfterContentInit, ChangeDetectorRef, Component, ElementRef, EventEmitter, @@ -36,7 +36,7 @@ import {trigger, transition, style, animate} from '@angular/animations'; import {ToolbarConfigModel} from './model/toolbar-config.model'; import {ToolbarConfig} from './interfaces/toolbar-config'; import {I18nService} from '../i18n/i18n.service'; -import {ControlValueAccessor, NG_VALUE_ACCESSOR, NgControl} from '@angular/forms'; +import {ControlValueAccessor, NgControl} from '@angular/forms'; import {DomSanitizer, SafeHtml} from '@angular/platform-browser'; import {Subscription} from 'rxjs'; import {EditorService} from './services/editor.service'; @@ -154,6 +154,7 @@ export class TlEditor implements ControlValueAccessor, AfterContentInit, OnChang private renderer: Renderer2, private editorService: EditorService, private sanitizer: DomSanitizer, + private cd: ChangeDetectorRef, @Optional() @Self() public ngControl: NgControl) { this.setControl(); this.fontCollection = [ @@ -195,18 +196,18 @@ export class TlEditor implements ControlValueAccessor, AfterContentInit, OnChang listenChangeControl() { if ( this.control ) { this.subscription.add(this.control.valueChanges.subscribe(( values ) => { - if (!this.listenerRegistered) { - this.handleFieldsPropagation(); - } + })); } } handleFieldsPropagation() { - const fields = this.contentEditor.nativeElement.querySelectorAll('.ui-field'); - for (const item of fields) { - this.preventPropagation(item); - } + setTimeout(() => { + const fields = this.contentEditor.nativeElement.querySelectorAll('.ui-field'); + for (const item of fields) { + this.preventPropagation(item); + } + }, 100); } alignContent(align) { @@ -581,7 +582,10 @@ export class TlEditor implements ControlValueAccessor, AfterContentInit, OnChang writeValue(value: any): void { this.content = this.sanitizer.bypassSecurityTrustHtml(value); + this.handleFieldsPropagation(); this.recoverCursorPosition(); + this.cd.detectChanges(); + } registerOnChange(fn: any): void { diff --git a/projects/truly-ui/src/components/editor/parts/editor-header/editor-header.html b/projects/truly-ui/src/components/editor/parts/editor-header/editor-header.html index 05db0db32..ce9ea17a3 100644 --- a/projects/truly-ui/src/components/editor/parts/editor-header/editor-header.html +++ b/projects/truly-ui/src/components/editor/parts/editor-header/editor-header.html @@ -1,95 +1,95 @@
    - - -
  • +
  • -
  • +
  • -
  • +
  • + [tooltip]="{text: toolbarConfig?.font.color?.tooltipText, placement: 'top-center'}" + *ngIf="toolbarConfig?.font.color?.show">
  • -
  • +
  • -
  • +
  • -
  • +
  • -
  • +
  • -
  • +
  • -
  • +
  • -
  • +
  • -
  • +
  • -
  • +
  • -
  • +
  • -
  • +
diff --git a/src/app/components/time-available-picker/time-available-pickerdemo.component.ts b/src/app/components/time-available-picker/time-available-pickerdemo.component.ts index 8b7415cc7..e3a2f2ae5 100644 --- a/src/app/components/time-available-picker/time-available-pickerdemo.component.ts +++ b/src/app/components/time-available-picker/time-available-pickerdemo.component.ts @@ -37,6 +37,14 @@ export class TimeAvailablePickerDemoComponent { public loading = true; + public holidaysArray = [ + { + date: new Date(), + description: 'Some Holiday Today', + tooltip: true + } + ]; + public data = [ { start: new Date( 1999, 1, 1, 8, 0 ),