ng-zenduit 2.0.2 → 2.0.7

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.
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M9 18L15 12L9 6" stroke="#4F4F4F" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
@@ -0,0 +1,49 @@
1
+ import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export interface CommentData {
4
+ id: string | number;
5
+ authorName: string;
6
+ authorAvatar?: string;
7
+ timestamp: string;
8
+ text: string;
9
+ online?: boolean;
10
+ editable?: boolean;
11
+ deletable?: boolean;
12
+ attachments?: CommentAttachmentData[];
13
+ }
14
+ export interface CommentAttachmentData {
15
+ name: string;
16
+ size: string;
17
+ url?: string;
18
+ }
19
+ export declare class ZenduCommentItemComponent implements OnChanges {
20
+ comment: CommentData;
21
+ showConnector: boolean;
22
+ editable: boolean;
23
+ deletable: boolean;
24
+ loading: boolean;
25
+ edit: EventEmitter<CommentData>;
26
+ delete: EventEmitter<CommentData>;
27
+ saveEdit: EventEmitter<{
28
+ comment: CommentData;
29
+ text: string;
30
+ }>;
31
+ cancelEdit: EventEmitter<CommentData>;
32
+ editing: boolean;
33
+ editValue: string;
34
+ private wasLoading;
35
+ ngOnChanges(changes: SimpleChanges): void;
36
+ get isEditable(): boolean;
37
+ get isDeletable(): boolean;
38
+ get initials(): string;
39
+ onEdit(): void;
40
+ onDelete(): void;
41
+ onSaveEdit(event: {
42
+ text: string;
43
+ files: File[];
44
+ }): void;
45
+ onCancelEdit(): void;
46
+ getFileIcon(name: string): 'document' | 'video' | 'misc';
47
+ static ɵfac: i0.ɵɵFactoryDeclaration<ZenduCommentItemComponent, never>;
48
+ static ɵcmp: i0.ɵɵComponentDeclaration<ZenduCommentItemComponent, "zen-comment-item", never, { "comment": "comment"; "showConnector": "showConnector"; "editable": "editable"; "deletable": "deletable"; "loading": "loading"; }, { "edit": "edit"; "delete": "delete"; "saveEdit": "saveEdit"; "cancelEdit": "cancelEdit"; }, never, never, false>;
49
+ }
@@ -0,0 +1,22 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { CommentData } from '../comment-item/zendu-comment-item.component';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ZenduCommentListComponent {
5
+ comments: CommentData[];
6
+ collapsible: boolean;
7
+ expanded: boolean;
8
+ editable: boolean;
9
+ deletable: boolean;
10
+ loadingCommentId: string | number | null;
11
+ expandedChange: EventEmitter<boolean>;
12
+ editComment: EventEmitter<CommentData>;
13
+ deleteComment: EventEmitter<CommentData>;
14
+ saveEditComment: EventEmitter<{
15
+ comment: CommentData;
16
+ text: string;
17
+ }>;
18
+ cancelEditComment: EventEmitter<CommentData>;
19
+ toggle(): void;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<ZenduCommentListComponent, never>;
21
+ static ɵcmp: i0.ɵɵComponentDeclaration<ZenduCommentListComponent, "zen-comment-list", never, { "comments": "comments"; "collapsible": "collapsible"; "expanded": "expanded"; "editable": "editable"; "deletable": "deletable"; "loadingCommentId": "loadingCommentId"; }, { "expandedChange": "expandedChange"; "editComment": "editComment"; "deleteComment": "deleteComment"; "saveEditComment": "saveEditComment"; "cancelEditComment": "cancelEditComment"; }, never, never, false>;
22
+ }
@@ -0,0 +1,57 @@
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export interface CommentAttachment {
4
+ file: File;
5
+ name: string;
6
+ size: string;
7
+ progress: number;
8
+ complete: boolean;
9
+ }
10
+ export interface EmojiCategory {
11
+ key: string;
12
+ label: string;
13
+ icon: string;
14
+ emojis: string[];
15
+ }
16
+ export declare class ZenduCommentTextareaComponent implements OnInit {
17
+ value: string;
18
+ valueChange: EventEmitter<string>;
19
+ label: string;
20
+ placeholder: string;
21
+ rows: number;
22
+ fileTypes: string;
23
+ loading: boolean;
24
+ addComment: EventEmitter<{
25
+ text: string;
26
+ files: File[];
27
+ }>;
28
+ filesChanged: EventEmitter<File[]>;
29
+ save: EventEmitter<{
30
+ text: string;
31
+ files: File[];
32
+ }>;
33
+ cancel: EventEmitter<void>;
34
+ editing: boolean;
35
+ emojiPickerOpen: boolean;
36
+ ngOnInit(): void;
37
+ emojiCategories: EmojiCategory[];
38
+ activeEmojiCategory: string;
39
+ attachments: CommentAttachment[];
40
+ onDocumentClick(event: MouseEvent): void;
41
+ onInput(value: string): void;
42
+ onKeydown(event: KeyboardEvent): void;
43
+ onAddComment(): void;
44
+ onSave(): void;
45
+ reset(): void;
46
+ onCancel(): void;
47
+ toggleEmojiPicker(): void;
48
+ selectEmoji(emoji: string): void;
49
+ setEmojiCategory(key: string): void;
50
+ get activeEmojis(): string[];
51
+ onFileInput(event: Event): void;
52
+ removeAttachment(index: number): void;
53
+ getFileIcon(name: string): 'document' | 'video' | 'misc';
54
+ private formatFileSize;
55
+ static ɵfac: i0.ɵɵFactoryDeclaration<ZenduCommentTextareaComponent, never>;
56
+ static ɵcmp: i0.ɵɵComponentDeclaration<ZenduCommentTextareaComponent, "zen-comment-textarea", never, { "value": "value"; "label": "label"; "placeholder": "placeholder"; "rows": "rows"; "fileTypes": "fileTypes"; "loading": "loading"; }, { "valueChange": "valueChange"; "addComment": "addComment"; "filesChanged": "filesChanged"; "save": "save"; "cancel": "cancel"; }, never, never, false>;
57
+ }
@@ -0,0 +1,12 @@
1
+ export declare type DatePickerDropdownType = 'single' | 'range';
2
+ export interface DatePickerPreset {
3
+ label: string;
4
+ getRange: () => {
5
+ start: Date;
6
+ end: Date;
7
+ };
8
+ }
9
+ export interface DateRangeValue {
10
+ start: Date | null;
11
+ end: Date | null;
12
+ }
@@ -0,0 +1,90 @@
1
+ import { ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core';
2
+ import { DatePickerDay } from '../datepicker/date-picker-day';
3
+ import { Overlay } from '@angular/cdk/overlay';
4
+ import { TranslateService } from '@ngx-translate/core';
5
+ import { DatePickerDropdownType, DatePickerPreset, DateRangeValue } from './date-picker-dropdown.types';
6
+ import * as i0 from "@angular/core";
7
+ export declare class ZenduDatePickerDropdownComponent implements OnInit, OnChanges, OnDestroy {
8
+ private _element;
9
+ private overlay;
10
+ private viewContainerRef;
11
+ private _translate;
12
+ type: DatePickerDropdownType;
13
+ date: Date | null;
14
+ dateChange: EventEmitter<Date>;
15
+ startDate: Date | null;
16
+ startDateChange: EventEmitter<Date>;
17
+ endDate: Date | null;
18
+ endDateChange: EventEmitter<Date>;
19
+ rangeChange: EventEmitter<DateRangeValue>;
20
+ presets: DatePickerPreset[] | null;
21
+ minDate: Date | null;
22
+ maxDate: Date | null;
23
+ disabled: boolean;
24
+ highlightDays: number[];
25
+ placeholder: string;
26
+ mobileBreakpoint: number;
27
+ triggerBtn: ElementRef;
28
+ dropdownTemplate: TemplateRef<unknown>;
29
+ mobile: boolean;
30
+ isOpen: boolean;
31
+ leftCurrentSlot: Date;
32
+ leftDayRows: Array<{
33
+ days: DatePickerDay[];
34
+ }>;
35
+ leftDaysTitle: string;
36
+ rightCurrentSlot: Date;
37
+ rightDayRows: Array<{
38
+ days: DatePickerDay[];
39
+ }>;
40
+ rightDaysTitle: string;
41
+ weekDays: string[];
42
+ _selectedDate: Date | null;
43
+ _selectedStart: Date | null;
44
+ _selectedEnd: Date | null;
45
+ _activePreset: string | null;
46
+ private overlayRef;
47
+ defaultPresets: DatePickerPreset[];
48
+ constructor(_element: ElementRef, overlay: Overlay, viewContainerRef: ViewContainerRef, _translate: TranslateService);
49
+ ngOnInit(): void;
50
+ onResize(): void;
51
+ private checkMobile;
52
+ ngOnChanges(changes: SimpleChanges): void;
53
+ ngOnDestroy(): void;
54
+ outsideHandling(event: MouseEvent): void;
55
+ get activePresets(): DatePickerPreset[];
56
+ get showPresetsSidebar(): boolean;
57
+ get showDualCalendars(): boolean;
58
+ get triggerLabel(): string;
59
+ get hasValue(): boolean;
60
+ get formattedSelectedDate(): string;
61
+ get formattedStartDate(): string;
62
+ get formattedEndDate(): string;
63
+ formatDate(date: Date): string;
64
+ toggle(): void;
65
+ open(): void;
66
+ close(): void;
67
+ private createOverlay;
68
+ private closeOverlay;
69
+ leftPrevMonth(): void;
70
+ leftNextMonth(): void;
71
+ rightPrevMonth(): void;
72
+ rightNextMonth(): void;
73
+ prevMonth(): void;
74
+ nextMonth(): void;
75
+ selectDay(day: DatePickerDay): void;
76
+ selectPreset(preset: DatePickerPreset): void;
77
+ goToToday(): void;
78
+ apply(): void;
79
+ cancel(): void;
80
+ get canApply(): boolean;
81
+ private updateCalendars;
82
+ private updateDays;
83
+ private isDaySelected;
84
+ isToday(day: DatePickerDay): boolean;
85
+ isInRange(day: DatePickerDay): boolean;
86
+ isRangeStart(day: DatePickerDay): boolean;
87
+ isRangeEnd(day: DatePickerDay): boolean;
88
+ static ɵfac: i0.ɵɵFactoryDeclaration<ZenduDatePickerDropdownComponent, never>;
89
+ static ɵcmp: i0.ɵɵComponentDeclaration<ZenduDatePickerDropdownComponent, "zen-date-picker-dropdown", never, { "type": "type"; "date": "date"; "startDate": "startDate"; "endDate": "endDate"; "presets": "presets"; "minDate": "minDate"; "maxDate": "maxDate"; "disabled": "disabled"; "highlightDays": "highlightDays"; "placeholder": "placeholder"; "mobileBreakpoint": "mobileBreakpoint"; }, { "dateChange": "dateChange"; "startDateChange": "startDateChange"; "endDateChange": "endDateChange"; "rangeChange": "rangeChange"; }, never, never, false>;
90
+ }
@@ -35,16 +35,20 @@ import * as i31 from "./live-view-player/snapshot-player/snapshot-player.compone
35
35
  import * as i32 from "./live-view-player/web-rtc/web-rtc-player.component";
36
36
  import * as i33 from "./select/templates/zendu-select-button.directive";
37
37
  import * as i34 from "./timepicker/zendu-timepicker.component";
38
- import * as i35 from "@angular/common";
39
- import * as i36 from "@angular/forms";
40
- import * as i37 from "@angular/cdk/drag-drop";
41
- import * as i38 from "@almothafar/angular-signature-pad";
42
- import * as i39 from "@angular/common/http";
43
- import * as i40 from "@angular/cdk/overlay";
44
- import * as i41 from "@ngx-translate/core";
38
+ import * as i35 from "./comment-textarea/zendu-comment-textarea.component";
39
+ import * as i36 from "./comment-item/zendu-comment-item.component";
40
+ import * as i37 from "./comment-list/zendu-comment-list.component";
41
+ import * as i38 from "./date-picker-dropdown/zendu-date-picker-dropdown.component";
42
+ import * as i39 from "@angular/common";
43
+ import * as i40 from "@angular/forms";
44
+ import * as i41 from "@angular/cdk/drag-drop";
45
+ import * as i42 from "@almothafar/angular-signature-pad";
46
+ import * as i43 from "@angular/common/http";
47
+ import * as i44 from "@angular/cdk/overlay";
48
+ import * as i45 from "@ngx-translate/core";
45
49
  export declare function HttpLoaderFactory(httpClient: HttpClient): TranslateHttpLoader;
46
50
  export declare class NgZenduitModule {
47
51
  static ɵfac: i0.ɵɵFactoryDeclaration<NgZenduitModule, never>;
48
- static ɵmod: i0.ɵɵNgModuleDeclaration<NgZenduitModule, [typeof i1.ZenduCheckboxComponent, typeof i2.ZenduToggleComponent, typeof i3.ZenduToggleSlideComponent, typeof i4.ZenduSearchBoxComponent, typeof i5.ZenduSelectComponent, typeof i6.ZenduSelectOptionDirective, typeof i7.ZenduSelectValueDirective, typeof i8.ZenduDatepickerComponent, typeof i9.ZenduFilterComponent, typeof i10.ZenduGroupsComponent, typeof i11.ZenduPaginationBarComponent, typeof i12.ZenduColumnConfigurationComponent, typeof i13.ZenduSortHeaderComponent, typeof i14.ZenduPhoneInputComponent, typeof i15.ZenduColorPickerComponent, typeof i16.ZenduRadioButtonComponent, typeof i17.ZenduIconComponent, typeof i18.ZenduCardBlockComponent, typeof i19.ZenduMapPreviewComponent, typeof i20.ZenduSpinner, typeof i21.ZenduDocScanner, typeof i22.ZenduBreadcrumbs, typeof i23.ZenduMapComponent, typeof i24.ZenduFileUpload, typeof i25.ZenduProgress, typeof i26.ZenduLocationSearch, typeof i27.ZenLiveViewPlayerComponent, typeof i28.ZenHTML5VideoPlayerComponent, typeof i29.ZenFlvPlayerComponent, typeof i30.ZenHlsPlayerComponent, typeof i31.ZenSnapshotPlayerComponent, typeof i32.ZenWebRTCPlayerComponent, typeof i33.ZenduSelectButtonDirective, typeof i34.ZenduTimepickerComponent], [typeof i35.CommonModule, typeof i36.FormsModule, typeof i37.DragDropModule, typeof i38.AngularSignaturePadModule, typeof i36.ReactiveFormsModule, typeof i39.HttpClientModule, typeof i40.OverlayModule, typeof i41.TranslateModule], [typeof i1.ZenduCheckboxComponent, typeof i2.ZenduToggleComponent, typeof i3.ZenduToggleSlideComponent, typeof i4.ZenduSearchBoxComponent, typeof i5.ZenduSelectComponent, typeof i6.ZenduSelectOptionDirective, typeof i7.ZenduSelectValueDirective, typeof i8.ZenduDatepickerComponent, typeof i9.ZenduFilterComponent, typeof i10.ZenduGroupsComponent, typeof i11.ZenduPaginationBarComponent, typeof i12.ZenduColumnConfigurationComponent, typeof i13.ZenduSortHeaderComponent, typeof i14.ZenduPhoneInputComponent, typeof i15.ZenduColorPickerComponent, typeof i16.ZenduRadioButtonComponent, typeof i17.ZenduIconComponent, typeof i18.ZenduCardBlockComponent, typeof i19.ZenduMapPreviewComponent, typeof i20.ZenduSpinner, typeof i21.ZenduDocScanner, typeof i22.ZenduBreadcrumbs, typeof i23.ZenduMapComponent, typeof i24.ZenduFileUpload, typeof i25.ZenduProgress, typeof i26.ZenduLocationSearch, typeof i27.ZenLiveViewPlayerComponent, typeof i33.ZenduSelectButtonDirective, typeof i34.ZenduTimepickerComponent]>;
52
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NgZenduitModule, [typeof i1.ZenduCheckboxComponent, typeof i2.ZenduToggleComponent, typeof i3.ZenduToggleSlideComponent, typeof i4.ZenduSearchBoxComponent, typeof i5.ZenduSelectComponent, typeof i6.ZenduSelectOptionDirective, typeof i7.ZenduSelectValueDirective, typeof i8.ZenduDatepickerComponent, typeof i9.ZenduFilterComponent, typeof i10.ZenduGroupsComponent, typeof i11.ZenduPaginationBarComponent, typeof i12.ZenduColumnConfigurationComponent, typeof i13.ZenduSortHeaderComponent, typeof i14.ZenduPhoneInputComponent, typeof i15.ZenduColorPickerComponent, typeof i16.ZenduRadioButtonComponent, typeof i17.ZenduIconComponent, typeof i18.ZenduCardBlockComponent, typeof i19.ZenduMapPreviewComponent, typeof i20.ZenduSpinner, typeof i21.ZenduDocScanner, typeof i22.ZenduBreadcrumbs, typeof i23.ZenduMapComponent, typeof i24.ZenduFileUpload, typeof i25.ZenduProgress, typeof i26.ZenduLocationSearch, typeof i27.ZenLiveViewPlayerComponent, typeof i28.ZenHTML5VideoPlayerComponent, typeof i29.ZenFlvPlayerComponent, typeof i30.ZenHlsPlayerComponent, typeof i31.ZenSnapshotPlayerComponent, typeof i32.ZenWebRTCPlayerComponent, typeof i33.ZenduSelectButtonDirective, typeof i34.ZenduTimepickerComponent, typeof i35.ZenduCommentTextareaComponent, typeof i36.ZenduCommentItemComponent, typeof i37.ZenduCommentListComponent, typeof i38.ZenduDatePickerDropdownComponent], [typeof i39.CommonModule, typeof i40.FormsModule, typeof i41.DragDropModule, typeof i42.AngularSignaturePadModule, typeof i40.ReactiveFormsModule, typeof i43.HttpClientModule, typeof i44.OverlayModule, typeof i45.TranslateModule], [typeof i1.ZenduCheckboxComponent, typeof i2.ZenduToggleComponent, typeof i3.ZenduToggleSlideComponent, typeof i4.ZenduSearchBoxComponent, typeof i5.ZenduSelectComponent, typeof i6.ZenduSelectOptionDirective, typeof i7.ZenduSelectValueDirective, typeof i8.ZenduDatepickerComponent, typeof i9.ZenduFilterComponent, typeof i10.ZenduGroupsComponent, typeof i11.ZenduPaginationBarComponent, typeof i12.ZenduColumnConfigurationComponent, typeof i13.ZenduSortHeaderComponent, typeof i14.ZenduPhoneInputComponent, typeof i15.ZenduColorPickerComponent, typeof i16.ZenduRadioButtonComponent, typeof i17.ZenduIconComponent, typeof i18.ZenduCardBlockComponent, typeof i19.ZenduMapPreviewComponent, typeof i20.ZenduSpinner, typeof i21.ZenduDocScanner, typeof i22.ZenduBreadcrumbs, typeof i23.ZenduMapComponent, typeof i24.ZenduFileUpload, typeof i25.ZenduProgress, typeof i26.ZenduLocationSearch, typeof i27.ZenLiveViewPlayerComponent, typeof i33.ZenduSelectButtonDirective, typeof i34.ZenduTimepickerComponent, typeof i35.ZenduCommentTextareaComponent, typeof i36.ZenduCommentItemComponent, typeof i37.ZenduCommentListComponent, typeof i38.ZenduDatePickerDropdownComponent]>;
49
53
  static ɵinj: i0.ɵɵInjectorDeclaration<NgZenduitModule>;
50
54
  }
@@ -6,6 +6,7 @@ export declare class ZenduPhoneInputComponent implements OnInit, OnChanges {
6
6
  phoneChange: EventEmitter<string>;
7
7
  validChange: EventEmitter<boolean>;
8
8
  disabled: boolean;
9
+ width: string;
9
10
  phoneText: string;
10
11
  countryList: {
11
12
  countryCode: string;
@@ -35,5 +36,5 @@ export declare class ZenduPhoneInputComponent implements OnInit, OnChanges {
35
36
  hideDropDown(): void;
36
37
  toggle(): void;
37
38
  static ɵfac: i0.ɵɵFactoryDeclaration<ZenduPhoneInputComponent, never>;
38
- static ɵcmp: i0.ɵɵComponentDeclaration<ZenduPhoneInputComponent, "zen-phone-input", never, { "phone": "phone"; "maxLength": "maxLength"; "disabled": "disabled"; }, { "phoneChange": "phoneChange"; "validChange": "validChange"; }, never, never, false>;
39
+ static ɵcmp: i0.ɵɵComponentDeclaration<ZenduPhoneInputComponent, "zen-phone-input", never, { "phone": "phone"; "maxLength": "maxLength"; "disabled": "disabled"; "width": "width"; }, { "phoneChange": "phoneChange"; "validChange": "validChange"; }, never, never, false>;
39
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ng-zenduit",
3
- "version": "2.0.2",
3
+ "version": "2.0.7",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "14-16",
6
6
  "@angular/core": "14-16",
package/public-api.d.ts CHANGED
@@ -10,6 +10,7 @@ export * from './lib/map/map.types';
10
10
  export * from './lib/location-search/location.address';
11
11
  export * from './lib/datepicker/datepicker';
12
12
  export * from './lib/datepicker/date-picker-hint';
13
+ export * from './lib/date-picker-dropdown/date-picker-dropdown.types';
13
14
  /**
14
15
  * Components
15
16
  */
@@ -42,3 +43,7 @@ export * from "./lib/progress/zendu-progress.component";
42
43
  export * from "./lib/location-search/zendu-location-search.component";
43
44
  export * from "./lib/live-view-player/live-view-player/live-view-player.component";
44
45
  export * from "./lib/timepicker/zendu-timepicker.component";
46
+ export * from "./lib/comment-textarea/zendu-comment-textarea.component";
47
+ export * from "./lib/comment-item/zendu-comment-item.component";
48
+ export * from "./lib/comment-list/zendu-comment-list.component";
49
+ export * from "./lib/date-picker-dropdown/zendu-date-picker-dropdown.component";