@naniteninja/dashboard-components-lib 2.1.63 → 2.1.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6,7 +6,7 @@ import { MatButtonModule } from '@angular/material/button';
|
|
|
6
6
|
import { MatMenuModule } from '@angular/material/menu';
|
|
7
7
|
import * as i3 from '@ngx-translate/core';
|
|
8
8
|
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
|
9
|
-
import { interval, take, takeUntil, debounceTime, distinctUntilChanged, switchMap, of, Subject, filter, first, map, BehaviorSubject, animationFrameScheduler, defer, finalize, shareReplay, from, concatMap, Observable, combineLatest } from 'rxjs';
|
|
9
|
+
import { interval, take, takeUntil, debounceTime, distinctUntilChanged, switchMap, of, catchError, Subject, filter, first, map, BehaviorSubject, animationFrameScheduler, defer, finalize, shareReplay, from, concatMap, Observable, combineLatest } from 'rxjs';
|
|
10
10
|
import * as i1 from '@naniteninja/ionic-lib';
|
|
11
11
|
import { MODAL_DATA, BaseCardModule, ButtonsModule, PopperModule, LibModalComponent, DirectiveModule, AvatarComponent, InputFieldModule, FormFieldModule, BaseComponent, DateRangeValidator, TimeRangeValidator, LibMapModule, DashedCheckboxModule, InputDateFieldModule, InputFieldSelectModule, InputTimeFieldModule, LibModalModule, LibErrorMessageComponent, SectionSeparatorComponent, PopupModalService, ImageCardModule, ToggleModule } from '@naniteninja/ionic-lib';
|
|
12
12
|
import { trigger, transition, style, query, sequence, animate, stagger } from '@angular/animations';
|
|
@@ -796,7 +796,7 @@ class CalendarUtilsService {
|
|
|
796
796
|
getEventTimes(eventData, recurringException, newEvent) {
|
|
797
797
|
let startTime = new Date(recurringException?.startTime || eventData.startTime);
|
|
798
798
|
let endTime;
|
|
799
|
-
if (!eventData._id && newEvent) {
|
|
799
|
+
if (!eventData._id && newEvent && (!eventData.endTime || isEqual(eventData.startTime, eventData.endTime))) {
|
|
800
800
|
const startTimeMinutes = getMinutes(startTime);
|
|
801
801
|
startTime = set(startTime, { minutes: startTimeMinutes < 30 ? 0 : 30 });
|
|
802
802
|
endTime = addMinutes(startTime, 60);
|
|
@@ -1059,7 +1059,8 @@ class LibEventFormComponent extends BaseComponent {
|
|
|
1059
1059
|
});
|
|
1060
1060
|
this.recurringException =
|
|
1061
1061
|
this.calendarUtilService.getExceptionEvent(this.event, this.event.recurringPattern?.exceptions) || this.calendarUtilService.getUpdatedRecurringException(this.event);
|
|
1062
|
-
const
|
|
1062
|
+
const rawStartDate = this.recurringException?.startDate || this.event.recurringStartDate || this.event.startDate;
|
|
1063
|
+
const startDate = rawStartDate && !isNaN(new Date(rawStartDate).getTime()) ? new Date(rawStartDate) : new Date();
|
|
1063
1064
|
this.eventStart = startOfDay(startDate);
|
|
1064
1065
|
this.calendarUtilService.setEventTime(this.event);
|
|
1065
1066
|
const eventTimes = this.calendarUtilService.getEventTimes(this.event, this.recurringException, true);
|
|
@@ -1073,7 +1074,15 @@ class LibEventFormComponent extends BaseComponent {
|
|
|
1073
1074
|
allDay: new FormControl(this.recurringException?.allDay || this.event.allDay || false, []),
|
|
1074
1075
|
startDate: new FormControl(startDate, [Validators.required]),
|
|
1075
1076
|
startTime: new FormControl(eventTimes.startTime, [Validators.required]),
|
|
1076
|
-
endDate: new FormControl(new Date(!this.event._id
|
|
1077
|
+
endDate: new FormControl(new Date(!this.event._id
|
|
1078
|
+
? this.event.endDate && !isNaN(new Date(this.event.endDate).getTime())
|
|
1079
|
+
? this.event.endDate
|
|
1080
|
+
: startDate
|
|
1081
|
+
: this.event.recurringEndDate && !isNaN(new Date(this.event.recurringEndDate).getTime())
|
|
1082
|
+
? this.event.recurringEndDate
|
|
1083
|
+
: this.event.endDate && !isNaN(new Date(this.event.endDate).getTime())
|
|
1084
|
+
? this.event.endDate
|
|
1085
|
+
: startDate), [Validators.required]),
|
|
1077
1086
|
endTime: new FormControl(eventTimes.endTime, [Validators.required]),
|
|
1078
1087
|
note: [eventNote, []],
|
|
1079
1088
|
location: [this.recurringException?.location || this.event.location, []],
|
|
@@ -1093,27 +1102,46 @@ class LibEventFormComponent extends BaseComponent {
|
|
|
1093
1102
|
this.form.controls.allDay.valueChanges.pipe(takeUntil(this.componentDestroyed$)).subscribe((value) => this.handleAllDayEvents(value, true));
|
|
1094
1103
|
this.form.controls.address.valueChanges
|
|
1095
1104
|
.pipe(debounceTime(300), distinctUntilChanged(), switchMap((value) => {
|
|
1096
|
-
if (!value
|
|
1105
|
+
if (!value) {
|
|
1106
|
+
this.form.controls.location.setValue(null);
|
|
1107
|
+
this.showLocalSuggestions = false;
|
|
1108
|
+
this.localSuggestions = [];
|
|
1109
|
+
this.cdr.markForCheck();
|
|
1110
|
+
return of(null);
|
|
1111
|
+
}
|
|
1112
|
+
if (value.length < 3 || value === this.lastSelectedAddress) {
|
|
1097
1113
|
this.showLocalSuggestions = false;
|
|
1098
1114
|
this.localSuggestions = [];
|
|
1099
1115
|
this.cdr.markForCheck();
|
|
1100
|
-
return of(
|
|
1116
|
+
return of(null);
|
|
1117
|
+
}
|
|
1118
|
+
if (!this.locationSearchFn) {
|
|
1119
|
+
// If using Google Maps (internal to lib-input-field), don't set manual errors while typing
|
|
1120
|
+
return of(null);
|
|
1101
1121
|
}
|
|
1102
|
-
this.
|
|
1103
|
-
|
|
1122
|
+
this.form.controls.address.setErrors({ searching: true });
|
|
1123
|
+
this.cdr.markForCheck();
|
|
1124
|
+
return this.locationSearchFn(value).pipe(catchError(() => {
|
|
1125
|
+
this.form.controls.address.setErrors({ searchError: true });
|
|
1126
|
+
this.cdr.markForCheck();
|
|
1127
|
+
return of(null);
|
|
1128
|
+
}));
|
|
1104
1129
|
}), takeUntil(this.componentDestroyed$))
|
|
1105
1130
|
.subscribe((results) => {
|
|
1131
|
+
if (results === null)
|
|
1132
|
+
return;
|
|
1106
1133
|
this.localSuggestions = results;
|
|
1107
1134
|
this.showLocalSuggestions = results.length > 0;
|
|
1108
|
-
this.
|
|
1109
|
-
});
|
|
1110
|
-
this.form.controls.address.valueChanges.pipe(takeUntil(this.componentDestroyed$)).subscribe((value) => {
|
|
1111
|
-
if (value && !this.form.value.location) {
|
|
1135
|
+
if (results.length === 0 && !this.form.value.location) {
|
|
1112
1136
|
this.form.controls.address.setErrors({ invalidField: true });
|
|
1113
1137
|
}
|
|
1114
|
-
if (!value) {
|
|
1115
|
-
this.form.controls.
|
|
1138
|
+
else if (!this.form.value.location) {
|
|
1139
|
+
this.form.controls.address.setErrors({ invalidField: true });
|
|
1140
|
+
}
|
|
1141
|
+
else {
|
|
1142
|
+
this.form.controls.address.setErrors(null);
|
|
1116
1143
|
}
|
|
1144
|
+
this.cdr.markForCheck();
|
|
1117
1145
|
});
|
|
1118
1146
|
// ------- watch start date recurring -------------
|
|
1119
1147
|
this.form.controls.startDate.valueChanges.pipe(takeUntil(this.componentDestroyed$)).subscribe((value) => {
|
|
@@ -1211,11 +1239,11 @@ class LibEventFormComponent extends BaseComponent {
|
|
|
1211
1239
|
}
|
|
1212
1240
|
}
|
|
1213
1241
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: LibEventFormComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$2.FormBuilder }, { token: CalendarUtilsService }, { token: FallbackTranslatePipe }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1214
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: LibEventFormComponent, isStandalone: false, selector: "lib-event-form", inputs: { calendars: "calendars", locationSearchFn: "locationSearchFn", event: "event", draggedEvent: "draggedEvent" }, outputs: { updateRecurringEvent: "updateRecurringEvent", updateDraggedEvent: "updateDraggedEvent", delete: "delete", closeForm: "closeForm", submitForm: "submitForm" }, usesInheritance: true, ngImport: i0, template: "<lib-bottom-modal\n [title]=\"modalTitle\"\n [(isOpen)]=\"openModal\"\n [(showConfirm)]=\"showConfirm\"\n [confirmButton]=\"'CONFIRM.YES' | fallbackTranslate: 'Yes'\"\n [confirmCancelButton]=\"'CONFIRM.No' | fallbackTranslate: 'No'\"\n [confirmationTitle]=\"'CONFIRM.ARE_YOU_SURE' | fallbackTranslate: 'Confirm Deletion'\"\n [confirmationMsg]=\"'CONFIRM.ARE_YOU_SURE_MESSAGE' | fallbackTranslate: 'Sure you want to delete?'\"\n [showCloseBtn]=\"!cancelButtonTitle && editMode\"\n [customClass]=\"'calendar-event-modal'\"\n [loading]=\"loading$ | async\"\n [validModal]=\"(!form || form.valid) && (loading$ | async) !== true\"\n [submitButtonTitle]=\"submitButtonTitle\"\n [secondaryButtonTitle]=\"secondaryButtonTitle\"\n [cancelButtonTitle]=\"cancelButtonTitle\"\n (secondaryButtonClick)=\"onModalSecondaryButtonClick()\"\n (closeModal)=\"resetModal()\"\n (submitModal)=\"onSubmitModal()\"\n (confirmEvent)=\"onDeleteConfirm()\"\n>\n <div class=\"event-modal\">\n @if (!form && editMode && !openRecurringOptions) {\n <lib-event-info [event]=\"event\" [calendars]=\"calendars\"></lib-event-info>\n }\n @if (openRecurringOptions) {\n <lib-edit-recurring-event [editOptionsCtrl]=\"editOptionsCtrl\" [excludeCurrentInstance]=\"recurringTypeChanged\"></lib-edit-recurring-event>\n }\n <ng-content></ng-content>\n @if (form && !openRecurringOptions) {\n <form [formGroup]=\"form\" autocomplete=\"off\" appFocusInvalidInput (ngSubmit)=\"saveEvent()\" (keyup.enter)=\"saveEvent()\" id=\"event-form\">\n <div class=\"form-body\">\n <div class=\"form-row center-content\">\n <div class=\"event-title-field\">\n <lib-input-field\n maxLength=\"2000\"\n formControlName=\"title\"\n type=\"text\"\n [readonly]=\"loading$ | async\"\n [label]=\"'CALENDAR.TITLE_FIELD' | fallbackTranslate: 'Title'\"\n [trimWhiteSpace]=\"false\"\n ></lib-input-field>\n <lib-error-message class=\"input-error event-input-field-error\" [config]=\"{ control: form.controls['title'] }\"></lib-error-message>\n </div>\n </div>\n <div class=\"form-row event-dates\">\n <div class=\"input-field-container input-field-container-group\">\n <div class=\"event-date-container\" [ngClass]=\"{ 'input-field-container-full-row': !form.controls['allDay'].value }\">\n <lib-input-date-field\n class=\"event-date\"\n formControlName=\"startDate\"\n [readonly]=\"loading$ | async\"\n [hieActions]=\"true\"\n [showIcon]=\"true\"\n [label]=\"'CALENDAR.START_DATE' | fallbackTranslate: 'Start Date'\"\n ></lib-input-date-field>\n <lib-error-message class=\"input-error event-input-field-error\" [config]=\"{ control: form.controls['startDate'] }\"></lib-error-message>\n </div>\n @if (form.controls['allDay'].value) {\n <lib-input-date-field\n class=\"event-date event-end-date\"\n formControlName=\"endDate\"\n [disabled]=\"loading$ | async\"\n [hieActions]=\"true\"\n [showIcon]=\"true\"\n [label]=\"'CALENDAR.END_DATE' | fallbackTranslate: 'End Date'\"\n ></lib-input-date-field>\n <lib-error-message class=\"input-error event-input-field-error\" [config]=\"{ control: form.controls['endDate'] }\"></lib-error-message>\n }\n </div>\n </div>\n\n @if (!form.controls['allDay'].value) {\n <div class=\"form-row\">\n <div class=\"input-field-container input-field-container-group time-fields-group\">\n <div class=\"time-field\">\n <lib-input-time-field\n formControlName=\"startTime\"\n [showIcon]=\"true\"\n [startDate]=\"eventStart\"\n [interval]=\"15\"\n [disabled]=\"loading$ | async\"\n [label]=\"'CALENDAR.STARTS' | fallbackTranslate: 'Starts'\"\n ></lib-input-time-field>\n <lib-error-message class=\"input-error event-input-field-error\" [config]=\"{ control: form.controls['startTime'] }\"></lib-error-message>\n </div>\n <div class=\"time-field\">\n <lib-input-time-field\n class=\"end-time\"\n formControlName=\"endTime\"\n [interval]=\"15\"\n [showIcon]=\"true\"\n [displaySlotTime]=\"true\"\n [fromTime]=\"\n form.controls.startTime.value && form.controls.startTime.value['slotValue'] ? form.controls.startTime.value['slotValue'] : form.controls.startTime.value\n \"\n [startDate]=\"eventStart\"\n [disabled]=\"loading$ | async\"\n [label]=\"'CALENDAR.ENDS' | fallbackTranslate: 'Ends'\"\n ></lib-input-time-field>\n <lib-error-message class=\"input-error event-input-field-error\" [config]=\"{ control: form.controls['endTime'] }\"></lib-error-message>\n </div>\n </div>\n </div>\n }\n\n <div class=\"form-row recurring\">\n <div class=\"recurring-select\" formGroupName=\"recurringPattern\">\n <lib-input-field-select\n formControlName=\"type\"\n [optionLabel]=\"(recurringOptions[0].title | fallbackTranslate: 'noTrnslations') === 'noTrnslations' ? 'name' : 'title'\"\n [optionValue]=\"'type'\"\n [options]=\"recurringOptions\"\n [disabled]=\"loading$ | async\"\n >\n </lib-input-field-select>\n </div>\n <div class=\"allDay-container\">\n <ion-item class=\"no-shadow allDay\">\n <label>\n <lib-dashed-checkbox formControlName=\"allDay\" [disabled]=\"loading$ | async\"></lib-dashed-checkbox>\n <span>{{ 'CALENDAR.ALL_DAY' | fallbackTranslate: 'All day' }}</span>\n </label>\n </ion-item>\n </div>\n </div>\n\n <div class=\"form-row address\">\n <div class=\"input-field-container\">\n <lib-input-field\n maxLength=\"2000\"\n [trimWhiteSpace]=\"false\"\n formControlName=\"address\"\n [enableGoogleAddress]=\"!locationSearchFn\"\n [locationSearchFn]=\"null\"\n [address]=\"form.controls['address'].value\"\n (locationChange)=\"onLocationChange($event)\"\n (onBlur)=\"hideLocalSuggestionsDelayed()\"\n [readonly]=\"loading$ | async\"\n [label]=\"'FIELDS.ADD_LOCATION' | fallbackTranslate: 'Location'\"\n >\n </lib-input-field>\n\n @if (showLocalSuggestions && localSuggestions.length > 0) {\n <div class=\"custom-location-suggestions\">\n @for (suggestion of localSuggestions; track suggestion.address) {\n <div class=\"suggestion-item\" (mousedown)=\"onLocalSuggestionSelect(suggestion)\">\n <div class=\"suggestion-icon\"><i class=\"icon icon-gen3-pin\"></i></div>\n <div class=\"suggestion-text\">{{ suggestion.address }}</div>\n </div>\n }\n </div>\n }\n\n <lib-error-message class=\"input-error\" [config]=\"{ control: form.controls['address'] }\"></lib-error-message>\n </div>\n </div>\n\n <div class=\"form-row\">\n <div class=\"event-note-field\">\n <lib-input-field\n formControlName=\"note\"\n [textarea]=\"true\"\n [label]=\"'FIELDS.ADD_DESCRIPTION' | fallbackTranslate: 'Description'\"\n maxLength=\"2000\"\n [readonly]=\"loading$ | async\"\n ></lib-input-field>\n </div>\n </div>\n </div>\n </form>\n }\n </div>\n</lib-bottom-modal>\n", styles: [".event-modal{--input-width: 100%;--input-height: 48px;--border-radius: 100px;--input-icon-color: #fe3c72;--input-font-color: #fff;--dropdown-background: linear-gradient(191.18deg, #27242c 61.33%, #0c0b0e 101.43%);--input-font-family: \"Gilroy-Regular\", serif;--label-color: grey;--input-field-box-shadow: inset 17px 22px 20px 2.5px rgba(17, 16, 20, .7), inset -2px -2px 8px rgba(203, 199, 209, .5);--input-number-filed-font: var(--font-family);--textarea-height: 100px !important;position:relative;display:block;width:100%;padding:0 20px 10px;max-height:72vh;overflow:visible!important}.event-modal .form-row{display:flex;flex-direction:row;margin-bottom:10px}.event-modal .form-row.form-footer{align-items:flex-end;justify-content:flex-end;margin-bottom:-15px}.event-modal .form-row.form-footer lib-primary-btn{width:100px}.event-modal .form-row.form-row-error{margin:-10px 0 0;padding:0;height:20px}.event-modal .form-row.recurring{margin:12px 0;display:flex}.event-modal .form-row.recurring .allDay-container,.event-modal .form-row.recurring .recurring-select{width:50%}.event-modal .form-row.recurring .recurring-select lib-input-field-select{width:100%}.event-modal .form-row.recurring .allDay-container{display:flex;flex-direction:row;justify-content:flex-start;align-items:flex-end;margin-top:-10px}.event-modal form{padding:5px 5px 0}.event-modal form .form-body{max-width:100%;position:relative;display:block;overflow:visible}.event-modal ion-item ion-label{font-family:Gilroy-Regular,serif!important}.event-modal ion-item ion-label:not(.allDay){display:flex!important;flex-direction:row;align-items:center;justify-content:center}.event-modal ion-item.allDay{margin-top:-10px;width:fit-content;--min-height: 50px}.event-modal ion-item.allDay label{display:flex;gap:10px;align-items:center;font-family:Gilroy-Regular,serif;cursor:pointer}.event-modal ion-item.allDay lib-dashed-checkbox{--size: 24px;--color: var(--cyrano-pink-shade-1)}.event-modal .event-title-field,.event-modal .event-note-field{position:relative;display:block;width:100%;padding-top:10px}.event-modal .event-title-field lib-input-field,.event-modal .event-note-field lib-input-field{position:relative;width:100%;min-width:100%}.event-modal .input-field-container{padding-top:2px;width:100%}.event-modal .input-field-container.input-field-container-group{display:flex;gap:5px}.event-modal .input-field-container.input-field-container-group div{width:50%}.event-modal .input-field-container.input-field-container-group div.input-field-container-full-row{width:100%}.event-modal .input-field-container .time-fields{display:flex;gap:10px}.event-modal .input-field-container lib-input-field{width:100%}.event-modal .field-error{position:relative;display:block;width:100%}@media screen and (max-width:500px){.event-modal .event-date-container{margin-bottom:15px}.event-modal .input-field-container-group{display:flex;flex-direction:column}.event-modal .input-field-container-group div{width:100%!important}.event-modal .input-field-container-group.time-fields-group{flex-direction:row}.event-modal .form-row.recurring{display:block}.event-modal .form-row.recurring .allDay-container,.event-modal .form-row.recurring .recurring-select{width:100%}.event-modal .form-row.recurring .allDay-container{display:flex;flex-direction:row;justify-content:flex-start;align-items:flex-end}.event-modal .form-row.recurring .allDay-container ion-item.allDay{padding-left:0;margin-top:10px}.event-modal .form-row.address{margin-top:-20px}.event-modal .form-row.event-dates{margin-bottom:0}}@media screen and (max-width:350px){.event-modal .input-placeholder.input-placeholder-date .time-placeholder{margin-left:0}}.event-modal .event-input-field-error{margin-top:-20px}.event-modal ::ng-deep .location-suggestions{display:none!important}.event-modal .custom-location-suggestions{position:relative!important;display:block!important;visibility:visible!important;opacity:1!important;left:0;right:0;z-index:100;background:#1e1c23;border:1px solid rgba(255,255,255,.1);border-radius:12px;max-height:250px;overflow-y:auto;box-shadow:inset 0 0 10px #00000080;padding:4px 0;margin:8px 0;animation:slideDown .2s ease-out}@keyframes slideDown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.event-modal .custom-location-suggestions .suggestion-item{display:flex;align-items:center;gap:12px;padding:10px 16px;cursor:pointer;transition:all .2s ease}.event-modal .custom-location-suggestions .suggestion-item:hover{background:#fe3c721a}.event-modal .custom-location-suggestions .suggestion-item:hover .suggestion-text,.event-modal .custom-location-suggestions .suggestion-item:hover .suggestion-icon{color:#fe3c72}.event-modal .custom-location-suggestions .suggestion-item .suggestion-icon{color:#ffffff80;font-size:14px;flex-shrink:0}.event-modal .custom-location-suggestions .suggestion-item .suggestion-text{color:#ffffffe6;font-size:13px;font-family:Gilroy-Regular,serif;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i1$3.IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "component", type: i1.DashedCheckboxComponent, selector: "lib-dashed-checkbox", inputs: ["checked", "disabled"], outputs: ["toggle"] }, { kind: "component", type: i1.InputDateFieldComponent, selector: "lib-input-date-field", inputs: ["label", "defaultDate", "maxDate", "minDate", "showTime", "hieActions", "readonly", "defaultDayHighlight", "showIcon", "timeOnly", "view", "disabled", "dateFormat", "placeholder", "appendTo", "stepMinute", "mask", "styleClass", "timeFormat"], outputs: ["focusEvent"] }, { kind: "component", type: i1.InputFieldComponent, selector: "lib-input-field,[lib-input-field]", inputs: ["name", "autocomplete", "label", "placeholder", "type", "readonly", "focus", "enableGoogleAddress", "locationAutocompleteConfig", "defaultLocation", "mask", "prefix", "suffix", "maxLength", "address", "textarea", "resize", "counter", "patterns", "trimWhiteSpace", "disabled", "locationSearchFn", "locationSearchDebounce", "locationSearchMinLength"], outputs: ["mapError", "locationChange", "keyDown", "onBlur"] }, { kind: "component", type: i1.InputFieldSelectComponent, selector: "lib-input-field-select", inputs: ["multiple", "label", "placeholder", "optionLabel", "optionValue", "options", "optionsTemplates", "filterBy", "enableFilter", "readonly", "disabled", "showClear", "editable", "withTemplate", "enableTranslation"], outputs: ["valueChange"] }, { kind: "component", type: i1.InputTimeFieldComponent, selector: "lib-input-time-field", inputs: ["startDate", "interval", "displaySlotTime", "fromTime", "format", "label", "readonly", "showIcon", "disabled"], outputs: ["focusEvent"] }, { kind: "component", type: i1.BottomModalComponent, selector: "lib-bottom-modal", inputs: ["breakpoints", "initialBreakpoint", "isOpen", "backdropDismiss", "canDismiss", "showArrow", "showBackBtn", "showConfirm", "showCloseBtn", "loading", "showHeaderSeparator", "title", "confirmationTitle", "confirmationMsg", "confirmButton", "confirmCancelButton", "description", "secondaryButtonTitle", "submitButtonTitle", "cancelButtonTitle", "validModal", "adaptToContentHeight", "customClass"], outputs: ["isOpenChange", "breakpointChange", "closeModal", "submitModal", "secondaryButtonClick", "backClick", "showConfirmChange", "confirmEvent"] }, { kind: "component", type: i1.LibErrorMessageComponent, selector: "lib-error-message", inputs: ["config"] }, { kind: "component", type: LibEventInfoComponent, selector: "lib-event-info", inputs: ["event", "calendars"] }, { kind: "component", type: LibEditRecurringEventComponent, selector: "lib-edit-recurring-event", inputs: ["excludeCurrentInstance", "editOptionsCtrl"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: FallbackTranslatePipe, name: "fallbackTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1242
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: LibEventFormComponent, isStandalone: false, selector: "lib-event-form", inputs: { calendars: "calendars", locationSearchFn: "locationSearchFn", event: "event", draggedEvent: "draggedEvent" }, outputs: { updateRecurringEvent: "updateRecurringEvent", updateDraggedEvent: "updateDraggedEvent", delete: "delete", closeForm: "closeForm", submitForm: "submitForm" }, usesInheritance: true, ngImport: i0, template: "<lib-bottom-modal\n [title]=\"modalTitle\"\n [(isOpen)]=\"openModal\"\n [(showConfirm)]=\"showConfirm\"\n [confirmButton]=\"'CONFIRM.YES' | fallbackTranslate: 'Yes'\"\n [confirmCancelButton]=\"'CONFIRM.No' | fallbackTranslate: 'No'\"\n [confirmationTitle]=\"'CONFIRM.ARE_YOU_SURE' | fallbackTranslate: 'Confirm Deletion'\"\n [confirmationMsg]=\"'CONFIRM.ARE_YOU_SURE_MESSAGE' | fallbackTranslate: 'Sure you want to delete?'\"\n [showCloseBtn]=\"!cancelButtonTitle && editMode\"\n [customClass]=\"'calendar-event-modal'\"\n [loading]=\"loading$ | async\"\n [validModal]=\"(!form || form.valid) && (loading$ | async) !== true\"\n [submitButtonTitle]=\"submitButtonTitle\"\n [secondaryButtonTitle]=\"secondaryButtonTitle\"\n [cancelButtonTitle]=\"cancelButtonTitle\"\n (secondaryButtonClick)=\"onModalSecondaryButtonClick()\"\n (closeModal)=\"resetModal()\"\n (submitModal)=\"onSubmitModal()\"\n (confirmEvent)=\"onDeleteConfirm()\"\n>\n <div class=\"event-modal\">\n @if (!form && editMode && !openRecurringOptions) {\n <lib-event-info [event]=\"event\" [calendars]=\"calendars\"></lib-event-info>\n }\n @if (openRecurringOptions) {\n <lib-edit-recurring-event [editOptionsCtrl]=\"editOptionsCtrl\" [excludeCurrentInstance]=\"recurringTypeChanged\"></lib-edit-recurring-event>\n }\n <ng-content></ng-content>\n @if (form && !openRecurringOptions) {\n <form [formGroup]=\"form\" autocomplete=\"off\" appFocusInvalidInput (ngSubmit)=\"saveEvent()\" (keyup.enter)=\"saveEvent()\" id=\"event-form\">\n <div class=\"form-body\">\n <div class=\"form-row center-content\">\n <div class=\"event-title-field\">\n <lib-input-field\n maxLength=\"2000\"\n formControlName=\"title\"\n type=\"text\"\n [readonly]=\"loading$ | async\"\n [label]=\"'CALENDAR.TITLE_FIELD' | fallbackTranslate: 'Title'\"\n [trimWhiteSpace]=\"false\"\n ></lib-input-field>\n <lib-error-message class=\"input-error event-input-field-error\" [config]=\"{ control: form.controls['title'] }\"></lib-error-message>\n </div>\n </div>\n <div class=\"form-row event-dates\">\n <div class=\"input-field-container input-field-container-group date-time-grid\">\n <div class=\"event-date-container date-time-column\" [ngClass]=\"{ 'input-field-container-full-row': form.controls['allDay'].value }\">\n <lib-input-date-field\n class=\"event-date\"\n formControlName=\"startDate\"\n [readonly]=\"loading$ | async\"\n [hieActions]=\"true\"\n [showIcon]=\"true\"\n [label]=\"'CALENDAR.START_DATE' | fallbackTranslate: 'Start Date'\"\n ></lib-input-date-field>\n <lib-error-message class=\"input-error event-input-field-error\" [config]=\"{ control: form.controls['startDate'] }\"></lib-error-message>\n @if (!form.controls['allDay'].value) {\n <lib-input-date-field\n class=\"event-time\"\n formControlName=\"startTime\"\n [timeOnly]=\"true\"\n [showIcon]=\"true\"\n [hieActions]=\"true\"\n [startDate]=\"eventStart\"\n [disabled]=\"loading$ | async\"\n [label]=\"'CALENDAR.STARTS' | fallbackTranslate: 'Starts'\"\n ></lib-input-date-field>\n <lib-error-message class=\"input-error event-input-field-error\" [config]=\"{ control: form.controls['startTime'] }\"></lib-error-message>\n }\n </div>\n @if (!form.controls['allDay'].value) {\n <div class=\"event-date-container date-time-column\">\n <lib-input-date-field\n class=\"event-date event-end-date\"\n formControlName=\"endDate\"\n [disabled]=\"loading$ | async\"\n [hieActions]=\"true\"\n [showIcon]=\"true\"\n [label]=\"'CALENDAR.END_DATE' | fallbackTranslate: 'End Date'\"\n ></lib-input-date-field>\n <lib-error-message class=\"input-error event-input-field-error\" [config]=\"{ control: form.controls['endDate'] }\"></lib-error-message>\n <lib-input-date-field\n class=\"event-time end-time\"\n formControlName=\"endTime\"\n [timeOnly]=\"true\"\n [showIcon]=\"true\"\n [hieActions]=\"true\"\n [startDate]=\"eventStart\"\n [disabled]=\"loading$ | async\"\n [label]=\"'CALENDAR.ENDS' | fallbackTranslate: 'Ends'\"\n ></lib-input-date-field>\n <lib-error-message class=\"input-error event-input-field-error\" [config]=\"{ control: form.controls['endTime'] }\"></lib-error-message>\n </div>\n }\n </div>\n </div>\n\n <div class=\"form-row recurring\">\n <div class=\"recurring-select\" formGroupName=\"recurringPattern\">\n <lib-input-field-select\n formControlName=\"type\"\n [optionLabel]=\"(recurringOptions[0].title | fallbackTranslate: 'noTrnslations') === 'noTrnslations' ? 'name' : 'title'\"\n [optionValue]=\"'type'\"\n [options]=\"recurringOptions\"\n [disabled]=\"loading$ | async\"\n >\n </lib-input-field-select>\n </div>\n <div class=\"allDay-container\">\n <ion-item class=\"no-shadow allDay\">\n <label>\n <lib-dashed-checkbox formControlName=\"allDay\" [disabled]=\"loading$ | async\"></lib-dashed-checkbox>\n <span>{{ 'CALENDAR.ALL_DAY' | fallbackTranslate: 'All day' }}</span>\n </label>\n </ion-item>\n </div>\n </div>\n\n <div class=\"form-row address\">\n <div class=\"input-field-container\">\n <lib-input-field\n maxLength=\"2000\"\n [trimWhiteSpace]=\"false\"\n formControlName=\"address\"\n [enableGoogleAddress]=\"!locationSearchFn\"\n [locationSearchFn]=\"locationSearchFn\"\n [address]=\"form.controls['address'].value\"\n (locationChange)=\"onLocationChange($event)\"\n (onBlur)=\"hideLocalSuggestionsDelayed()\"\n [readonly]=\"loading$ | async\"\n [label]=\"'FIELDS.ADD_LOCATION' | fallbackTranslate: 'Location'\"\n >\n </lib-input-field>\n\n @if (showLocalSuggestions && localSuggestions.length > 0) {\n <div class=\"custom-location-suggestions\">\n @for (suggestion of localSuggestions; track suggestion.address) {\n <div class=\"suggestion-item\" (mousedown)=\"onLocalSuggestionSelect(suggestion)\">\n <div class=\"suggestion-icon\"><i class=\"icon icon-gen3-pin\"></i></div>\n <div class=\"suggestion-text\">{{ suggestion.address }}</div>\n </div>\n }\n </div>\n }\n\n <lib-error-message class=\"input-error\" [config]=\"{ control: form.controls['address'] }\"></lib-error-message>\n </div>\n </div>\n\n <div class=\"form-row\">\n <div class=\"event-note-field\">\n <lib-input-field\n formControlName=\"note\"\n [textarea]=\"true\"\n [label]=\"'FIELDS.ADD_DESCRIPTION' | fallbackTranslate: 'Description'\"\n maxLength=\"2000\"\n [readonly]=\"loading$ | async\"\n ></lib-input-field>\n </div>\n </div>\n </div>\n </form>\n }\n </div>\n</lib-bottom-modal>\n", styles: [".event-modal{--input-width: 100%;--input-height: 48px;--border-radius: 100px;--input-icon-color: #fe3c72;--input-font-color: #fff;--dropdown-background: linear-gradient(191.18deg, #27242c 61.33%, #0c0b0e 101.43%);--input-font-family: \"Gilroy-Regular\", serif;--label-color: grey;--input-field-box-shadow: inset 17px 22px 20px 2.5px rgba(17, 16, 20, .7), inset -2px -2px 8px rgba(203, 199, 209, .5);--input-number-filed-font: var(--font-family);--textarea-height: 100px !important;position:relative;display:block;width:100%;padding:0 20px 10px;max-height:72vh;overflow:visible!important}.event-modal .form-row{display:flex;flex-direction:row;margin-bottom:10px}.event-modal .form-row.form-footer{align-items:flex-end;justify-content:flex-end;margin-bottom:-15px}.event-modal .form-row.form-footer lib-primary-btn{width:100px}.event-modal .form-row.form-row-error{margin:-10px 0 0;padding:0;height:20px}.event-modal .form-row.recurring{margin:12px 0;display:flex}.event-modal .form-row.recurring .allDay-container,.event-modal .form-row.recurring .recurring-select{width:50%}.event-modal .form-row.recurring .recurring-select lib-input-field-select{width:100%}.event-modal .form-row.recurring .allDay-container{display:flex;flex-direction:row;justify-content:flex-start;align-items:flex-end;margin-top:-10px}.event-modal form{padding:5px 5px 0}.event-modal form .form-body{max-width:100%;position:relative;display:block;overflow:visible}.event-modal ion-item ion-label{font-family:Gilroy-Regular,serif!important}.event-modal ion-item ion-label:not(.allDay){display:flex!important;flex-direction:row;align-items:center;justify-content:center}.event-modal ion-item.allDay{margin-top:-10px;width:fit-content;--min-height: 50px}.event-modal ion-item.allDay label{display:flex;gap:10px;align-items:center;font-family:Gilroy-Regular,serif;cursor:pointer}.event-modal ion-item.allDay lib-dashed-checkbox{--size: 24px;--color: var(--cyrano-pink-shade-1)}.event-modal .event-title-field,.event-modal .event-note-field{position:relative;display:block;width:100%;padding-top:10px}.event-modal .event-title-field lib-input-field,.event-modal .event-note-field lib-input-field{position:relative;width:100%;min-width:100%}.event-modal .input-field-container{padding-top:2px;width:100%}.event-modal .input-field-container.input-field-container-group{display:flex;gap:5px}.event-modal .input-field-container.input-field-container-group.date-time-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}@media screen and (max-width:500px){.event-modal .input-field-container.input-field-container-group.date-time-grid{grid-template-columns:1fr}}.event-modal .input-field-container.input-field-container-group .date-time-column{display:flex;flex-direction:column;gap:10px;width:100%!important}.event-modal .input-field-container.input-field-container-group .date-time-column ::ng-deep lib-input-date-field .content-wrapper{padding-left:10px!important;padding-right:10px!important}.event-modal .input-field-container.input-field-container-group .date-time-column ::ng-deep lib-input-date-field .content-wrapper .input-field{font-size:13px!important}.event-modal .input-field-container.input-field-container-group div{width:50%}.event-modal .input-field-container.input-field-container-group div.input-field-container-full-row{width:100%}.event-modal .input-field-container .time-fields{display:flex;gap:10px}.event-modal .input-field-container lib-input-field{width:100%}.event-modal .field-error{position:relative;display:block;width:100%}@media screen and (max-width:500px){.event-modal .event-date-container{margin-bottom:15px}.event-modal .input-field-container-group{display:flex;flex-direction:column}.event-modal .input-field-container-group div{width:100%!important}.event-modal .input-field-container-group.time-fields-group{flex-direction:row}.event-modal .form-row.recurring{display:block}.event-modal .form-row.recurring .allDay-container,.event-modal .form-row.recurring .recurring-select{width:100%}.event-modal .form-row.recurring .allDay-container{display:flex;flex-direction:row;justify-content:flex-start;align-items:flex-end}.event-modal .form-row.recurring .allDay-container ion-item.allDay{padding-left:0;margin-top:10px}.event-modal .form-row.address{margin-top:-20px}.event-modal .form-row.event-dates{margin-bottom:0}}@media screen and (max-width:350px){.event-modal .input-placeholder.input-placeholder-date .time-placeholder{margin-left:0}}.event-modal .event-input-field-error{margin-top:-20px}.event-modal ::ng-deep .location-suggestions{display:none!important}.event-modal .custom-location-suggestions{position:relative!important;display:block!important;visibility:visible!important;opacity:1!important;left:0;right:0;z-index:100;background:#1e1c23;border:1px solid rgba(255,255,255,.1);border-radius:12px;max-height:250px;overflow-y:auto;box-shadow:inset 0 0 10px #00000080;padding:4px 0;margin:8px 0;animation:slideDown .2s ease-out}@keyframes slideDown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.event-modal .custom-location-suggestions .suggestion-item{display:flex;align-items:center;gap:12px;padding:10px 16px;cursor:pointer;transition:all .2s ease}.event-modal .custom-location-suggestions .suggestion-item:hover{background:#fe3c721a}.event-modal .custom-location-suggestions .suggestion-item:hover .suggestion-text,.event-modal .custom-location-suggestions .suggestion-item:hover .suggestion-icon{color:#fe3c72}.event-modal .custom-location-suggestions .suggestion-item .suggestion-icon{color:#ffffff80;font-size:14px;flex-shrink:0}.event-modal .custom-location-suggestions .suggestion-item .suggestion-text{color:#ffffffe6;font-size:13px;font-family:Gilroy-Regular,serif;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i1$3.IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "component", type: i1.DashedCheckboxComponent, selector: "lib-dashed-checkbox", inputs: ["checked", "disabled"], outputs: ["toggle"] }, { kind: "component", type: i1.InputDateFieldComponent, selector: "lib-input-date-field", inputs: ["label", "defaultDate", "maxDate", "minDate", "showTime", "hieActions", "readonly", "defaultDayHighlight", "showIcon", "timeOnly", "view", "disabled", "dateFormat", "placeholder", "appendTo", "stepMinute", "mask", "styleClass", "timeFormat"], outputs: ["focusEvent"] }, { kind: "component", type: i1.InputFieldComponent, selector: "lib-input-field,[lib-input-field]", inputs: ["name", "autocomplete", "label", "placeholder", "type", "readonly", "focus", "enableGoogleAddress", "locationAutocompleteConfig", "defaultLocation", "mask", "prefix", "suffix", "maxLength", "address", "textarea", "resize", "counter", "patterns", "trimWhiteSpace", "disabled", "locationSearchFn", "locationSearchDebounce", "locationSearchMinLength"], outputs: ["mapError", "locationChange", "keyDown", "onBlur"] }, { kind: "component", type: i1.InputFieldSelectComponent, selector: "lib-input-field-select", inputs: ["multiple", "label", "placeholder", "optionLabel", "optionValue", "options", "optionsTemplates", "filterBy", "enableFilter", "readonly", "disabled", "showClear", "editable", "withTemplate", "enableTranslation"], outputs: ["valueChange"] }, { kind: "component", type: i1.BottomModalComponent, selector: "lib-bottom-modal", inputs: ["breakpoints", "initialBreakpoint", "isOpen", "backdropDismiss", "canDismiss", "showArrow", "showBackBtn", "showConfirm", "showCloseBtn", "loading", "showHeaderSeparator", "title", "confirmationTitle", "confirmationMsg", "confirmButton", "confirmCancelButton", "description", "secondaryButtonTitle", "submitButtonTitle", "cancelButtonTitle", "validModal", "adaptToContentHeight", "customClass"], outputs: ["isOpenChange", "breakpointChange", "closeModal", "submitModal", "secondaryButtonClick", "backClick", "showConfirmChange", "confirmEvent"] }, { kind: "component", type: i1.LibErrorMessageComponent, selector: "lib-error-message", inputs: ["config"] }, { kind: "component", type: LibEventInfoComponent, selector: "lib-event-info", inputs: ["event", "calendars"] }, { kind: "component", type: LibEditRecurringEventComponent, selector: "lib-edit-recurring-event", inputs: ["excludeCurrentInstance", "editOptionsCtrl"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: FallbackTranslatePipe, name: "fallbackTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1215
1243
|
}
|
|
1216
1244
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: LibEventFormComponent, decorators: [{
|
|
1217
1245
|
type: Component,
|
|
1218
|
-
args: [{ selector: 'lib-event-form', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<lib-bottom-modal\n [title]=\"modalTitle\"\n [(isOpen)]=\"openModal\"\n [(showConfirm)]=\"showConfirm\"\n [confirmButton]=\"'CONFIRM.YES' | fallbackTranslate: 'Yes'\"\n [confirmCancelButton]=\"'CONFIRM.No' | fallbackTranslate: 'No'\"\n [confirmationTitle]=\"'CONFIRM.ARE_YOU_SURE' | fallbackTranslate: 'Confirm Deletion'\"\n [confirmationMsg]=\"'CONFIRM.ARE_YOU_SURE_MESSAGE' | fallbackTranslate: 'Sure you want to delete?'\"\n [showCloseBtn]=\"!cancelButtonTitle && editMode\"\n [customClass]=\"'calendar-event-modal'\"\n [loading]=\"loading$ | async\"\n [validModal]=\"(!form || form.valid) && (loading$ | async) !== true\"\n [submitButtonTitle]=\"submitButtonTitle\"\n [secondaryButtonTitle]=\"secondaryButtonTitle\"\n [cancelButtonTitle]=\"cancelButtonTitle\"\n (secondaryButtonClick)=\"onModalSecondaryButtonClick()\"\n (closeModal)=\"resetModal()\"\n (submitModal)=\"onSubmitModal()\"\n (confirmEvent)=\"onDeleteConfirm()\"\n>\n <div class=\"event-modal\">\n @if (!form && editMode && !openRecurringOptions) {\n <lib-event-info [event]=\"event\" [calendars]=\"calendars\"></lib-event-info>\n }\n @if (openRecurringOptions) {\n <lib-edit-recurring-event [editOptionsCtrl]=\"editOptionsCtrl\" [excludeCurrentInstance]=\"recurringTypeChanged\"></lib-edit-recurring-event>\n }\n <ng-content></ng-content>\n @if (form && !openRecurringOptions) {\n <form [formGroup]=\"form\" autocomplete=\"off\" appFocusInvalidInput (ngSubmit)=\"saveEvent()\" (keyup.enter)=\"saveEvent()\" id=\"event-form\">\n <div class=\"form-body\">\n <div class=\"form-row center-content\">\n <div class=\"event-title-field\">\n <lib-input-field\n maxLength=\"2000\"\n formControlName=\"title\"\n type=\"text\"\n [readonly]=\"loading$ | async\"\n [label]=\"'CALENDAR.TITLE_FIELD' | fallbackTranslate: 'Title'\"\n [trimWhiteSpace]=\"false\"\n ></lib-input-field>\n <lib-error-message class=\"input-error event-input-field-error\" [config]=\"{ control: form.controls['title'] }\"></lib-error-message>\n </div>\n </div>\n <div class=\"form-row event-dates\">\n <div class=\"input-field-container input-field-container-group\">\n <div class=\"event-date-container\" [ngClass]=\"{ 'input-field-container-full-row': !form.controls['allDay'].value }\">\n <lib-input-date-field\n class=\"event-date\"\n formControlName=\"startDate\"\n [readonly]=\"loading$ | async\"\n [hieActions]=\"true\"\n [showIcon]=\"true\"\n [label]=\"'CALENDAR.START_DATE' | fallbackTranslate: 'Start Date'\"\n ></lib-input-date-field>\n <lib-error-message class=\"input-error event-input-field-error\" [config]=\"{ control: form.controls['startDate'] }\"></lib-error-message>\n </div>\n @if (form.controls['allDay'].value) {\n <lib-input-date-field\n class=\"event-date event-end-date\"\n formControlName=\"endDate\"\n [disabled]=\"loading$ | async\"\n [hieActions]=\"true\"\n [showIcon]=\"true\"\n [label]=\"'CALENDAR.END_DATE' | fallbackTranslate: 'End Date'\"\n ></lib-input-date-field>\n <lib-error-message class=\"input-error event-input-field-error\" [config]=\"{ control: form.controls['endDate'] }\"></lib-error-message>\n }\n </div>\n </div>\n\n @if (!form.controls['allDay'].value) {\n <div class=\"form-row\">\n <div class=\"input-field-container input-field-container-group time-fields-group\">\n <div class=\"time-field\">\n <lib-input-time-field\n formControlName=\"startTime\"\n [showIcon]=\"true\"\n [startDate]=\"eventStart\"\n [interval]=\"15\"\n [disabled]=\"loading$ | async\"\n [label]=\"'CALENDAR.STARTS' | fallbackTranslate: 'Starts'\"\n ></lib-input-time-field>\n <lib-error-message class=\"input-error event-input-field-error\" [config]=\"{ control: form.controls['startTime'] }\"></lib-error-message>\n </div>\n <div class=\"time-field\">\n <lib-input-time-field\n class=\"end-time\"\n formControlName=\"endTime\"\n [interval]=\"15\"\n [showIcon]=\"true\"\n [displaySlotTime]=\"true\"\n [fromTime]=\"\n form.controls.startTime.value && form.controls.startTime.value['slotValue'] ? form.controls.startTime.value['slotValue'] : form.controls.startTime.value\n \"\n [startDate]=\"eventStart\"\n [disabled]=\"loading$ | async\"\n [label]=\"'CALENDAR.ENDS' | fallbackTranslate: 'Ends'\"\n ></lib-input-time-field>\n <lib-error-message class=\"input-error event-input-field-error\" [config]=\"{ control: form.controls['endTime'] }\"></lib-error-message>\n </div>\n </div>\n </div>\n }\n\n <div class=\"form-row recurring\">\n <div class=\"recurring-select\" formGroupName=\"recurringPattern\">\n <lib-input-field-select\n formControlName=\"type\"\n [optionLabel]=\"(recurringOptions[0].title | fallbackTranslate: 'noTrnslations') === 'noTrnslations' ? 'name' : 'title'\"\n [optionValue]=\"'type'\"\n [options]=\"recurringOptions\"\n [disabled]=\"loading$ | async\"\n >\n </lib-input-field-select>\n </div>\n <div class=\"allDay-container\">\n <ion-item class=\"no-shadow allDay\">\n <label>\n <lib-dashed-checkbox formControlName=\"allDay\" [disabled]=\"loading$ | async\"></lib-dashed-checkbox>\n <span>{{ 'CALENDAR.ALL_DAY' | fallbackTranslate: 'All day' }}</span>\n </label>\n </ion-item>\n </div>\n </div>\n\n <div class=\"form-row address\">\n <div class=\"input-field-container\">\n <lib-input-field\n maxLength=\"2000\"\n [trimWhiteSpace]=\"false\"\n formControlName=\"address\"\n [enableGoogleAddress]=\"!locationSearchFn\"\n [locationSearchFn]=\"null\"\n [address]=\"form.controls['address'].value\"\n (locationChange)=\"onLocationChange($event)\"\n (onBlur)=\"hideLocalSuggestionsDelayed()\"\n [readonly]=\"loading$ | async\"\n [label]=\"'FIELDS.ADD_LOCATION' | fallbackTranslate: 'Location'\"\n >\n </lib-input-field>\n\n @if (showLocalSuggestions && localSuggestions.length > 0) {\n <div class=\"custom-location-suggestions\">\n @for (suggestion of localSuggestions; track suggestion.address) {\n <div class=\"suggestion-item\" (mousedown)=\"onLocalSuggestionSelect(suggestion)\">\n <div class=\"suggestion-icon\"><i class=\"icon icon-gen3-pin\"></i></div>\n <div class=\"suggestion-text\">{{ suggestion.address }}</div>\n </div>\n }\n </div>\n }\n\n <lib-error-message class=\"input-error\" [config]=\"{ control: form.controls['address'] }\"></lib-error-message>\n </div>\n </div>\n\n <div class=\"form-row\">\n <div class=\"event-note-field\">\n <lib-input-field\n formControlName=\"note\"\n [textarea]=\"true\"\n [label]=\"'FIELDS.ADD_DESCRIPTION' | fallbackTranslate: 'Description'\"\n maxLength=\"2000\"\n [readonly]=\"loading$ | async\"\n ></lib-input-field>\n </div>\n </div>\n </div>\n </form>\n }\n </div>\n</lib-bottom-modal>\n", styles: [".event-modal{--input-width: 100%;--input-height: 48px;--border-radius: 100px;--input-icon-color: #fe3c72;--input-font-color: #fff;--dropdown-background: linear-gradient(191.18deg, #27242c 61.33%, #0c0b0e 101.43%);--input-font-family: \"Gilroy-Regular\", serif;--label-color: grey;--input-field-box-shadow: inset 17px 22px 20px 2.5px rgba(17, 16, 20, .7), inset -2px -2px 8px rgba(203, 199, 209, .5);--input-number-filed-font: var(--font-family);--textarea-height: 100px !important;position:relative;display:block;width:100%;padding:0 20px 10px;max-height:72vh;overflow:visible!important}.event-modal .form-row{display:flex;flex-direction:row;margin-bottom:10px}.event-modal .form-row.form-footer{align-items:flex-end;justify-content:flex-end;margin-bottom:-15px}.event-modal .form-row.form-footer lib-primary-btn{width:100px}.event-modal .form-row.form-row-error{margin:-10px 0 0;padding:0;height:20px}.event-modal .form-row.recurring{margin:12px 0;display:flex}.event-modal .form-row.recurring .allDay-container,.event-modal .form-row.recurring .recurring-select{width:50%}.event-modal .form-row.recurring .recurring-select lib-input-field-select{width:100%}.event-modal .form-row.recurring .allDay-container{display:flex;flex-direction:row;justify-content:flex-start;align-items:flex-end;margin-top:-10px}.event-modal form{padding:5px 5px 0}.event-modal form .form-body{max-width:100%;position:relative;display:block;overflow:visible}.event-modal ion-item ion-label{font-family:Gilroy-Regular,serif!important}.event-modal ion-item ion-label:not(.allDay){display:flex!important;flex-direction:row;align-items:center;justify-content:center}.event-modal ion-item.allDay{margin-top:-10px;width:fit-content;--min-height: 50px}.event-modal ion-item.allDay label{display:flex;gap:10px;align-items:center;font-family:Gilroy-Regular,serif;cursor:pointer}.event-modal ion-item.allDay lib-dashed-checkbox{--size: 24px;--color: var(--cyrano-pink-shade-1)}.event-modal .event-title-field,.event-modal .event-note-field{position:relative;display:block;width:100%;padding-top:10px}.event-modal .event-title-field lib-input-field,.event-modal .event-note-field lib-input-field{position:relative;width:100%;min-width:100%}.event-modal .input-field-container{padding-top:2px;width:100%}.event-modal .input-field-container.input-field-container-group{display:flex;gap:5px}.event-modal .input-field-container.input-field-container-group div{width:50%}.event-modal .input-field-container.input-field-container-group div.input-field-container-full-row{width:100%}.event-modal .input-field-container .time-fields{display:flex;gap:10px}.event-modal .input-field-container lib-input-field{width:100%}.event-modal .field-error{position:relative;display:block;width:100%}@media screen and (max-width:500px){.event-modal .event-date-container{margin-bottom:15px}.event-modal .input-field-container-group{display:flex;flex-direction:column}.event-modal .input-field-container-group div{width:100%!important}.event-modal .input-field-container-group.time-fields-group{flex-direction:row}.event-modal .form-row.recurring{display:block}.event-modal .form-row.recurring .allDay-container,.event-modal .form-row.recurring .recurring-select{width:100%}.event-modal .form-row.recurring .allDay-container{display:flex;flex-direction:row;justify-content:flex-start;align-items:flex-end}.event-modal .form-row.recurring .allDay-container ion-item.allDay{padding-left:0;margin-top:10px}.event-modal .form-row.address{margin-top:-20px}.event-modal .form-row.event-dates{margin-bottom:0}}@media screen and (max-width:350px){.event-modal .input-placeholder.input-placeholder-date .time-placeholder{margin-left:0}}.event-modal .event-input-field-error{margin-top:-20px}.event-modal ::ng-deep .location-suggestions{display:none!important}.event-modal .custom-location-suggestions{position:relative!important;display:block!important;visibility:visible!important;opacity:1!important;left:0;right:0;z-index:100;background:#1e1c23;border:1px solid rgba(255,255,255,.1);border-radius:12px;max-height:250px;overflow-y:auto;box-shadow:inset 0 0 10px #00000080;padding:4px 0;margin:8px 0;animation:slideDown .2s ease-out}@keyframes slideDown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.event-modal .custom-location-suggestions .suggestion-item{display:flex;align-items:center;gap:12px;padding:10px 16px;cursor:pointer;transition:all .2s ease}.event-modal .custom-location-suggestions .suggestion-item:hover{background:#fe3c721a}.event-modal .custom-location-suggestions .suggestion-item:hover .suggestion-text,.event-modal .custom-location-suggestions .suggestion-item:hover .suggestion-icon{color:#fe3c72}.event-modal .custom-location-suggestions .suggestion-item .suggestion-icon{color:#ffffff80;font-size:14px;flex-shrink:0}.event-modal .custom-location-suggestions .suggestion-item .suggestion-text{color:#ffffffe6;font-size:13px;font-family:Gilroy-Regular,serif;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n"] }]
|
|
1246
|
+
args: [{ selector: 'lib-event-form', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<lib-bottom-modal\n [title]=\"modalTitle\"\n [(isOpen)]=\"openModal\"\n [(showConfirm)]=\"showConfirm\"\n [confirmButton]=\"'CONFIRM.YES' | fallbackTranslate: 'Yes'\"\n [confirmCancelButton]=\"'CONFIRM.No' | fallbackTranslate: 'No'\"\n [confirmationTitle]=\"'CONFIRM.ARE_YOU_SURE' | fallbackTranslate: 'Confirm Deletion'\"\n [confirmationMsg]=\"'CONFIRM.ARE_YOU_SURE_MESSAGE' | fallbackTranslate: 'Sure you want to delete?'\"\n [showCloseBtn]=\"!cancelButtonTitle && editMode\"\n [customClass]=\"'calendar-event-modal'\"\n [loading]=\"loading$ | async\"\n [validModal]=\"(!form || form.valid) && (loading$ | async) !== true\"\n [submitButtonTitle]=\"submitButtonTitle\"\n [secondaryButtonTitle]=\"secondaryButtonTitle\"\n [cancelButtonTitle]=\"cancelButtonTitle\"\n (secondaryButtonClick)=\"onModalSecondaryButtonClick()\"\n (closeModal)=\"resetModal()\"\n (submitModal)=\"onSubmitModal()\"\n (confirmEvent)=\"onDeleteConfirm()\"\n>\n <div class=\"event-modal\">\n @if (!form && editMode && !openRecurringOptions) {\n <lib-event-info [event]=\"event\" [calendars]=\"calendars\"></lib-event-info>\n }\n @if (openRecurringOptions) {\n <lib-edit-recurring-event [editOptionsCtrl]=\"editOptionsCtrl\" [excludeCurrentInstance]=\"recurringTypeChanged\"></lib-edit-recurring-event>\n }\n <ng-content></ng-content>\n @if (form && !openRecurringOptions) {\n <form [formGroup]=\"form\" autocomplete=\"off\" appFocusInvalidInput (ngSubmit)=\"saveEvent()\" (keyup.enter)=\"saveEvent()\" id=\"event-form\">\n <div class=\"form-body\">\n <div class=\"form-row center-content\">\n <div class=\"event-title-field\">\n <lib-input-field\n maxLength=\"2000\"\n formControlName=\"title\"\n type=\"text\"\n [readonly]=\"loading$ | async\"\n [label]=\"'CALENDAR.TITLE_FIELD' | fallbackTranslate: 'Title'\"\n [trimWhiteSpace]=\"false\"\n ></lib-input-field>\n <lib-error-message class=\"input-error event-input-field-error\" [config]=\"{ control: form.controls['title'] }\"></lib-error-message>\n </div>\n </div>\n <div class=\"form-row event-dates\">\n <div class=\"input-field-container input-field-container-group date-time-grid\">\n <div class=\"event-date-container date-time-column\" [ngClass]=\"{ 'input-field-container-full-row': form.controls['allDay'].value }\">\n <lib-input-date-field\n class=\"event-date\"\n formControlName=\"startDate\"\n [readonly]=\"loading$ | async\"\n [hieActions]=\"true\"\n [showIcon]=\"true\"\n [label]=\"'CALENDAR.START_DATE' | fallbackTranslate: 'Start Date'\"\n ></lib-input-date-field>\n <lib-error-message class=\"input-error event-input-field-error\" [config]=\"{ control: form.controls['startDate'] }\"></lib-error-message>\n @if (!form.controls['allDay'].value) {\n <lib-input-date-field\n class=\"event-time\"\n formControlName=\"startTime\"\n [timeOnly]=\"true\"\n [showIcon]=\"true\"\n [hieActions]=\"true\"\n [startDate]=\"eventStart\"\n [disabled]=\"loading$ | async\"\n [label]=\"'CALENDAR.STARTS' | fallbackTranslate: 'Starts'\"\n ></lib-input-date-field>\n <lib-error-message class=\"input-error event-input-field-error\" [config]=\"{ control: form.controls['startTime'] }\"></lib-error-message>\n }\n </div>\n @if (!form.controls['allDay'].value) {\n <div class=\"event-date-container date-time-column\">\n <lib-input-date-field\n class=\"event-date event-end-date\"\n formControlName=\"endDate\"\n [disabled]=\"loading$ | async\"\n [hieActions]=\"true\"\n [showIcon]=\"true\"\n [label]=\"'CALENDAR.END_DATE' | fallbackTranslate: 'End Date'\"\n ></lib-input-date-field>\n <lib-error-message class=\"input-error event-input-field-error\" [config]=\"{ control: form.controls['endDate'] }\"></lib-error-message>\n <lib-input-date-field\n class=\"event-time end-time\"\n formControlName=\"endTime\"\n [timeOnly]=\"true\"\n [showIcon]=\"true\"\n [hieActions]=\"true\"\n [startDate]=\"eventStart\"\n [disabled]=\"loading$ | async\"\n [label]=\"'CALENDAR.ENDS' | fallbackTranslate: 'Ends'\"\n ></lib-input-date-field>\n <lib-error-message class=\"input-error event-input-field-error\" [config]=\"{ control: form.controls['endTime'] }\"></lib-error-message>\n </div>\n }\n </div>\n </div>\n\n <div class=\"form-row recurring\">\n <div class=\"recurring-select\" formGroupName=\"recurringPattern\">\n <lib-input-field-select\n formControlName=\"type\"\n [optionLabel]=\"(recurringOptions[0].title | fallbackTranslate: 'noTrnslations') === 'noTrnslations' ? 'name' : 'title'\"\n [optionValue]=\"'type'\"\n [options]=\"recurringOptions\"\n [disabled]=\"loading$ | async\"\n >\n </lib-input-field-select>\n </div>\n <div class=\"allDay-container\">\n <ion-item class=\"no-shadow allDay\">\n <label>\n <lib-dashed-checkbox formControlName=\"allDay\" [disabled]=\"loading$ | async\"></lib-dashed-checkbox>\n <span>{{ 'CALENDAR.ALL_DAY' | fallbackTranslate: 'All day' }}</span>\n </label>\n </ion-item>\n </div>\n </div>\n\n <div class=\"form-row address\">\n <div class=\"input-field-container\">\n <lib-input-field\n maxLength=\"2000\"\n [trimWhiteSpace]=\"false\"\n formControlName=\"address\"\n [enableGoogleAddress]=\"!locationSearchFn\"\n [locationSearchFn]=\"locationSearchFn\"\n [address]=\"form.controls['address'].value\"\n (locationChange)=\"onLocationChange($event)\"\n (onBlur)=\"hideLocalSuggestionsDelayed()\"\n [readonly]=\"loading$ | async\"\n [label]=\"'FIELDS.ADD_LOCATION' | fallbackTranslate: 'Location'\"\n >\n </lib-input-field>\n\n @if (showLocalSuggestions && localSuggestions.length > 0) {\n <div class=\"custom-location-suggestions\">\n @for (suggestion of localSuggestions; track suggestion.address) {\n <div class=\"suggestion-item\" (mousedown)=\"onLocalSuggestionSelect(suggestion)\">\n <div class=\"suggestion-icon\"><i class=\"icon icon-gen3-pin\"></i></div>\n <div class=\"suggestion-text\">{{ suggestion.address }}</div>\n </div>\n }\n </div>\n }\n\n <lib-error-message class=\"input-error\" [config]=\"{ control: form.controls['address'] }\"></lib-error-message>\n </div>\n </div>\n\n <div class=\"form-row\">\n <div class=\"event-note-field\">\n <lib-input-field\n formControlName=\"note\"\n [textarea]=\"true\"\n [label]=\"'FIELDS.ADD_DESCRIPTION' | fallbackTranslate: 'Description'\"\n maxLength=\"2000\"\n [readonly]=\"loading$ | async\"\n ></lib-input-field>\n </div>\n </div>\n </div>\n </form>\n }\n </div>\n</lib-bottom-modal>\n", styles: [".event-modal{--input-width: 100%;--input-height: 48px;--border-radius: 100px;--input-icon-color: #fe3c72;--input-font-color: #fff;--dropdown-background: linear-gradient(191.18deg, #27242c 61.33%, #0c0b0e 101.43%);--input-font-family: \"Gilroy-Regular\", serif;--label-color: grey;--input-field-box-shadow: inset 17px 22px 20px 2.5px rgba(17, 16, 20, .7), inset -2px -2px 8px rgba(203, 199, 209, .5);--input-number-filed-font: var(--font-family);--textarea-height: 100px !important;position:relative;display:block;width:100%;padding:0 20px 10px;max-height:72vh;overflow:visible!important}.event-modal .form-row{display:flex;flex-direction:row;margin-bottom:10px}.event-modal .form-row.form-footer{align-items:flex-end;justify-content:flex-end;margin-bottom:-15px}.event-modal .form-row.form-footer lib-primary-btn{width:100px}.event-modal .form-row.form-row-error{margin:-10px 0 0;padding:0;height:20px}.event-modal .form-row.recurring{margin:12px 0;display:flex}.event-modal .form-row.recurring .allDay-container,.event-modal .form-row.recurring .recurring-select{width:50%}.event-modal .form-row.recurring .recurring-select lib-input-field-select{width:100%}.event-modal .form-row.recurring .allDay-container{display:flex;flex-direction:row;justify-content:flex-start;align-items:flex-end;margin-top:-10px}.event-modal form{padding:5px 5px 0}.event-modal form .form-body{max-width:100%;position:relative;display:block;overflow:visible}.event-modal ion-item ion-label{font-family:Gilroy-Regular,serif!important}.event-modal ion-item ion-label:not(.allDay){display:flex!important;flex-direction:row;align-items:center;justify-content:center}.event-modal ion-item.allDay{margin-top:-10px;width:fit-content;--min-height: 50px}.event-modal ion-item.allDay label{display:flex;gap:10px;align-items:center;font-family:Gilroy-Regular,serif;cursor:pointer}.event-modal ion-item.allDay lib-dashed-checkbox{--size: 24px;--color: var(--cyrano-pink-shade-1)}.event-modal .event-title-field,.event-modal .event-note-field{position:relative;display:block;width:100%;padding-top:10px}.event-modal .event-title-field lib-input-field,.event-modal .event-note-field lib-input-field{position:relative;width:100%;min-width:100%}.event-modal .input-field-container{padding-top:2px;width:100%}.event-modal .input-field-container.input-field-container-group{display:flex;gap:5px}.event-modal .input-field-container.input-field-container-group.date-time-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}@media screen and (max-width:500px){.event-modal .input-field-container.input-field-container-group.date-time-grid{grid-template-columns:1fr}}.event-modal .input-field-container.input-field-container-group .date-time-column{display:flex;flex-direction:column;gap:10px;width:100%!important}.event-modal .input-field-container.input-field-container-group .date-time-column ::ng-deep lib-input-date-field .content-wrapper{padding-left:10px!important;padding-right:10px!important}.event-modal .input-field-container.input-field-container-group .date-time-column ::ng-deep lib-input-date-field .content-wrapper .input-field{font-size:13px!important}.event-modal .input-field-container.input-field-container-group div{width:50%}.event-modal .input-field-container.input-field-container-group div.input-field-container-full-row{width:100%}.event-modal .input-field-container .time-fields{display:flex;gap:10px}.event-modal .input-field-container lib-input-field{width:100%}.event-modal .field-error{position:relative;display:block;width:100%}@media screen and (max-width:500px){.event-modal .event-date-container{margin-bottom:15px}.event-modal .input-field-container-group{display:flex;flex-direction:column}.event-modal .input-field-container-group div{width:100%!important}.event-modal .input-field-container-group.time-fields-group{flex-direction:row}.event-modal .form-row.recurring{display:block}.event-modal .form-row.recurring .allDay-container,.event-modal .form-row.recurring .recurring-select{width:100%}.event-modal .form-row.recurring .allDay-container{display:flex;flex-direction:row;justify-content:flex-start;align-items:flex-end}.event-modal .form-row.recurring .allDay-container ion-item.allDay{padding-left:0;margin-top:10px}.event-modal .form-row.address{margin-top:-20px}.event-modal .form-row.event-dates{margin-bottom:0}}@media screen and (max-width:350px){.event-modal .input-placeholder.input-placeholder-date .time-placeholder{margin-left:0}}.event-modal .event-input-field-error{margin-top:-20px}.event-modal ::ng-deep .location-suggestions{display:none!important}.event-modal .custom-location-suggestions{position:relative!important;display:block!important;visibility:visible!important;opacity:1!important;left:0;right:0;z-index:100;background:#1e1c23;border:1px solid rgba(255,255,255,.1);border-radius:12px;max-height:250px;overflow-y:auto;box-shadow:inset 0 0 10px #00000080;padding:4px 0;margin:8px 0;animation:slideDown .2s ease-out}@keyframes slideDown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.event-modal .custom-location-suggestions .suggestion-item{display:flex;align-items:center;gap:12px;padding:10px 16px;cursor:pointer;transition:all .2s ease}.event-modal .custom-location-suggestions .suggestion-item:hover{background:#fe3c721a}.event-modal .custom-location-suggestions .suggestion-item:hover .suggestion-text,.event-modal .custom-location-suggestions .suggestion-item:hover .suggestion-icon{color:#fe3c72}.event-modal .custom-location-suggestions .suggestion-item .suggestion-icon{color:#ffffff80;font-size:14px;flex-shrink:0}.event-modal .custom-location-suggestions .suggestion-item .suggestion-text{color:#ffffffe6;font-size:13px;font-family:Gilroy-Regular,serif;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n"] }]
|
|
1219
1247
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$2.FormBuilder }, { type: CalendarUtilsService }, { type: FallbackTranslatePipe }], propDecorators: { calendars: [{
|
|
1220
1248
|
type: Input
|
|
1221
1249
|
}], locationSearchFn: [{
|