ngx-tethys 19.0.13 → 19.1.0-next.0
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.
- package/CHANGELOG.md +29 -2
- package/action/action.component.d.ts +12 -20
- package/action/actions.component.d.ts +5 -7
- package/affix/affix.component.d.ts +7 -10
- package/alert/alert.component.d.ts +1 -1
- package/anchor/anchor-link.component.d.ts +8 -8
- package/anchor/anchor.component.d.ts +15 -21
- package/arrow-switcher/arrow-switcher.component.d.ts +15 -22
- package/autocomplete/autocomplete.component.d.ts +10 -17
- package/autocomplete/autocomplete.trigger.directive.d.ts +10 -18
- package/avatar/avatar-list/avatar-list.component.d.ts +8 -14
- package/avatar/avatar.component.d.ts +25 -39
- package/back-top/back-top.component.d.ts +9 -12
- package/badge/badge.component.d.ts +19 -59
- package/breadcrumb/breadcrumb.component.d.ts +15 -20
- package/button/button-icon.component.d.ts +3 -2
- package/button/button.component.d.ts +3 -2
- package/calendar/calendar-header.component.d.ts +9 -8
- package/calendar/calendar.component.d.ts +16 -16
- package/card/card.component.d.ts +5 -11
- package/card/content.component.d.ts +3 -8
- package/card/header.component.d.ts +7 -8
- package/carousel/carousel.component.d.ts +22 -27
- package/cascader/cascader-li.component.d.ts +13 -21
- package/cascader/cascader-search-option.component.d.ts +8 -16
- package/cascader/cascader.component.d.ts +58 -80
- package/checkbox/checkbox.component.d.ts +2 -5
- package/collapse/collapse-item.component.d.ts +12 -19
- package/collapse/collapse.component.d.ts +6 -12
- package/collapse/collapse.token.d.ts +3 -3
- package/color-picker/color-picker-custom-panel.component.d.ts +5 -5
- package/color-picker/color-picker-panel.component.d.ts +7 -11
- package/color-picker/color-picker.component.d.ts +19 -35
- package/color-picker/parts/alpha/alpha.component.d.ts +8 -8
- package/color-picker/parts/hue/hue.component.d.ts +6 -6
- package/color-picker/parts/indicator/indicator.component.d.ts +4 -3
- package/color-picker/parts/inputs/inputs.component.d.ts +9 -9
- package/color-picker/parts/saturation/saturation.component.d.ts +9 -9
- package/comment/comment.component.d.ts +4 -5
- package/copy/copy.directive.d.ts +8 -9
- package/date-picker/abstract-picker.component.d.ts +8 -7
- package/date-picker/lib/calendar/calendar-footer.component.d.ts +2 -1
- package/date-picker/lib/popups/inner-popup.component.d.ts +2 -1
- package/date-picker/picker.component.d.ts +2 -1
- package/date-range/date-range.component.d.ts +2 -2
- package/dialog/body/dialog-body.component.d.ts +2 -6
- package/dialog/confirm/confirm.component.d.ts +2 -2
- package/dialog/footer/dialog-footer.component.d.ts +6 -9
- package/dialog/header/dialog-header.component.d.ts +9 -11
- package/divider/divider.component.d.ts +12 -16
- package/dot/dot.component.d.ts +5 -13
- package/drag-drop/drag-handle.directive.d.ts +2 -1
- package/drag-drop/drag.directive.d.ts +2 -1
- package/drag-drop/drop-container.directive.d.ts +2 -1
- package/dropdown/dropdown-menu-item.directive.d.ts +3 -2
- package/dropdown/dropdown-menu.component.d.ts +2 -1
- package/dropdown/dropdown.directive.d.ts +2 -1
- package/empty/empty.component.d.ts +21 -27
- package/fesm2022/ngx-tethys-action.mjs +54 -91
- package/fesm2022/ngx-tethys-action.mjs.map +1 -1
- package/fesm2022/ngx-tethys-affix.mjs +29 -26
- package/fesm2022/ngx-tethys-affix.mjs.map +1 -1
- package/fesm2022/ngx-tethys-anchor.mjs +91 -118
- package/fesm2022/ngx-tethys-anchor.mjs.map +1 -1
- package/fesm2022/ngx-tethys-arrow-switcher.mjs +51 -77
- package/fesm2022/ngx-tethys-arrow-switcher.mjs.map +1 -1
- package/fesm2022/ngx-tethys-autocomplete.mjs +69 -103
- package/fesm2022/ngx-tethys-autocomplete.mjs.map +1 -1
- package/fesm2022/ngx-tethys-avatar.mjs +117 -162
- package/fesm2022/ngx-tethys-avatar.mjs.map +1 -1
- package/fesm2022/ngx-tethys-back-top.mjs +33 -46
- package/fesm2022/ngx-tethys-back-top.mjs.map +1 -1
- package/fesm2022/ngx-tethys-badge.mjs +104 -208
- package/fesm2022/ngx-tethys-badge.mjs.map +1 -1
- package/fesm2022/ngx-tethys-breadcrumb.mjs +66 -70
- package/fesm2022/ngx-tethys-breadcrumb.mjs.map +1 -1
- package/fesm2022/ngx-tethys-calendar.mjs +85 -87
- package/fesm2022/ngx-tethys-calendar.mjs.map +1 -1
- package/fesm2022/ngx-tethys-card.mjs +72 -77
- package/fesm2022/ngx-tethys-card.mjs.map +1 -1
- package/fesm2022/ngx-tethys-carousel.mjs +82 -99
- package/fesm2022/ngx-tethys-carousel.mjs.map +1 -1
- package/fesm2022/ngx-tethys-cascader.mjs +313 -468
- package/fesm2022/ngx-tethys-cascader.mjs.map +1 -1
- package/fesm2022/ngx-tethys-checkbox.mjs +10 -17
- package/fesm2022/ngx-tethys-checkbox.mjs.map +1 -1
- package/fesm2022/ngx-tethys-collapse.mjs +66 -71
- package/fesm2022/ngx-tethys-collapse.mjs.map +1 -1
- package/fesm2022/ngx-tethys-color-picker.mjs +187 -246
- package/fesm2022/ngx-tethys-color-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-comment.mjs +16 -10
- package/fesm2022/ngx-tethys-comment.mjs.map +1 -1
- package/fesm2022/ngx-tethys-copy.mjs +25 -28
- package/fesm2022/ngx-tethys-copy.mjs.map +1 -1
- package/fesm2022/ngx-tethys-dialog.mjs +81 -82
- package/fesm2022/ngx-tethys-dialog.mjs.map +1 -1
- package/fesm2022/ngx-tethys-divider.mjs +49 -58
- package/fesm2022/ngx-tethys-divider.mjs.map +1 -1
- package/fesm2022/ngx-tethys-dot.mjs +45 -68
- package/fesm2022/ngx-tethys-dot.mjs.map +1 -1
- package/fesm2022/ngx-tethys-empty.mjs +107 -95
- package/fesm2022/ngx-tethys-empty.mjs.map +1 -1
- package/fesm2022/ngx-tethys-form.mjs +161 -200
- package/fesm2022/ngx-tethys-form.mjs.map +1 -1
- package/fesm2022/ngx-tethys-fullscreen.mjs +21 -23
- package/fesm2022/ngx-tethys-fullscreen.mjs.map +1 -1
- package/fesm2022/ngx-tethys-grid.mjs +160 -152
- package/fesm2022/ngx-tethys-grid.mjs.map +1 -1
- package/fesm2022/ngx-tethys-i18n.mjs +25 -25
- package/fesm2022/ngx-tethys-i18n.mjs.map +1 -1
- package/fesm2022/ngx-tethys-input-number.mjs +101 -114
- package/fesm2022/ngx-tethys-input-number.mjs.map +1 -1
- package/fesm2022/ngx-tethys-input.mjs +268 -271
- package/fesm2022/ngx-tethys-input.mjs.map +1 -1
- package/fesm2022/ngx-tethys-list.mjs +1 -1
- package/fesm2022/ngx-tethys-list.mjs.map +1 -1
- package/fesm2022/ngx-tethys-loading.mjs +17 -35
- package/fesm2022/ngx-tethys-loading.mjs.map +1 -1
- package/fesm2022/ngx-tethys-mention.mjs +52 -74
- package/fesm2022/ngx-tethys-mention.mjs.map +1 -1
- package/fesm2022/ngx-tethys-menu.mjs +106 -179
- package/fesm2022/ngx-tethys-menu.mjs.map +1 -1
- package/fesm2022/ngx-tethys-nav.mjs +169 -201
- package/fesm2022/ngx-tethys-nav.mjs.map +1 -1
- package/fesm2022/ngx-tethys-pagination.mjs +230 -294
- package/fesm2022/ngx-tethys-pagination.mjs.map +1 -1
- package/fesm2022/ngx-tethys-popover.mjs +67 -70
- package/fesm2022/ngx-tethys-popover.mjs.map +1 -1
- package/fesm2022/ngx-tethys-progress.mjs +196 -244
- package/fesm2022/ngx-tethys-progress.mjs.map +1 -1
- package/fesm2022/ngx-tethys-property.mjs +102 -105
- package/fesm2022/ngx-tethys-property.mjs.map +1 -1
- package/fesm2022/ngx-tethys-radio.mjs +34 -38
- package/fesm2022/ngx-tethys-radio.mjs.map +1 -1
- package/fesm2022/ngx-tethys-result.mjs +46 -28
- package/fesm2022/ngx-tethys-result.mjs.map +1 -1
- package/fesm2022/ngx-tethys-skeleton.mjs +339 -342
- package/fesm2022/ngx-tethys-skeleton.mjs.map +1 -1
- package/fesm2022/ngx-tethys-slider.mjs +75 -108
- package/fesm2022/ngx-tethys-slider.mjs.map +1 -1
- package/fesm2022/ngx-tethys-space.mjs +26 -46
- package/fesm2022/ngx-tethys-space.mjs.map +1 -1
- package/fesm2022/ngx-tethys-statistic.mjs +114 -151
- package/fesm2022/ngx-tethys-statistic.mjs.map +1 -1
- package/fesm2022/ngx-tethys-stepper.mjs +74 -107
- package/fesm2022/ngx-tethys-stepper.mjs.map +1 -1
- package/fesm2022/ngx-tethys-switch.mjs +80 -140
- package/fesm2022/ngx-tethys-switch.mjs.map +1 -1
- package/fesm2022/ngx-tethys-table.mjs +1 -1
- package/fesm2022/ngx-tethys-table.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tabs.mjs +69 -87
- package/fesm2022/ngx-tethys-tabs.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tag.mjs +42 -64
- package/fesm2022/ngx-tethys-tag.mjs.map +1 -1
- package/fesm2022/ngx-tethys-timeline.mjs +104 -129
- package/fesm2022/ngx-tethys-timeline.mjs.map +1 -1
- package/fesm2022/ngx-tethys-typography.mjs +36 -33
- package/fesm2022/ngx-tethys-typography.mjs.map +1 -1
- package/fesm2022/ngx-tethys-upload.mjs +91 -130
- package/fesm2022/ngx-tethys-upload.mjs.map +1 -1
- package/fesm2022/ngx-tethys-util.mjs.map +1 -1
- package/fesm2022/ngx-tethys-watermark.mjs +36 -40
- package/fesm2022/ngx-tethys-watermark.mjs.map +1 -1
- package/fesm2022/ngx-tethys.mjs +1 -1
- package/fesm2022/ngx-tethys.mjs.map +1 -1
- package/form/form-group-error/form-group-error.component.d.ts +2 -3
- package/form/form-group-label.directive.d.ts +2 -1
- package/form/form-group.component.d.ts +17 -24
- package/form/form-submit.directive.d.ts +2 -2
- package/form/form.directive.d.ts +6 -8
- package/form/from-group-footer/form-group-footer.component.d.ts +2 -2
- package/form/validator/confirm-validator.directive.d.ts +2 -2
- package/form/validator/unique-validator.directive.d.ts +2 -2
- package/fullscreen/fullscreen.component.d.ts +7 -7
- package/grid/flex.d.ts +14 -19
- package/grid/thy-col.directive.d.ts +6 -9
- package/grid/thy-grid-item.component.d.ts +3 -4
- package/grid/thy-grid.component.d.ts +11 -12
- package/grid/thy-row.directive.d.ts +12 -12
- package/icon/icon.component.d.ts +3 -2
- package/image/image.directive.d.ts +3 -2
- package/input/input-count.component.d.ts +4 -5
- package/input/input-group.component.d.ts +20 -20
- package/input/input-search.component.d.ts +15 -20
- package/input/input.component.d.ts +20 -21
- package/input/input.directive.d.ts +4 -6
- package/input-number/input-number.component.d.ts +21 -29
- package/layout/header.component.d.ts +4 -9
- package/layout/sidebar-header.component.d.ts +2 -1
- package/layout/sidebar.component.d.ts +8 -7
- package/list/list.component.d.ts +2 -1
- package/list/selection/selection-list.d.ts +4 -3
- package/loading/loading.component.d.ts +4 -10
- package/mention/mention.directive.d.ts +6 -7
- package/mention/suggestions/suggestions.component.d.ts +8 -9
- package/menu/group/menu-group.component.d.ts +16 -33
- package/menu/item/action/menu-item-action.component.d.ts +7 -8
- package/menu/item/icon/menu-item-icon.component.d.ts +2 -2
- package/menu/item/menu-item.component.d.ts +4 -4
- package/menu/item/name/menu-item-name.component.d.ts +2 -3
- package/menu/menu.component.d.ts +3 -7
- package/nav/icon-nav/icon-nav-link.directive.d.ts +3 -7
- package/nav/icon-nav/icon-nav.component.d.ts +3 -8
- package/nav/nav-ink-bar.directive.d.ts +4 -6
- package/nav/nav-item.directive.d.ts +7 -10
- package/nav/nav.component.d.ts +20 -48
- package/package.json +1 -1
- package/pagination/pagination.component.d.ts +48 -109
- package/popover/header/popover-header.component.d.ts +7 -6
- package/popover/popover.directive.d.ts +11 -18
- package/progress/progress-circle.component.d.ts +32 -21
- package/progress/progress-strip.component.d.ts +10 -14
- package/progress/progress.component.d.ts +15 -23
- package/property/examples/single/single.component.scss +6 -0
- package/property/properties.component.d.ts +6 -13
- package/property/property-item.component.d.ts +21 -26
- package/property/styles/properties.scss +124 -52
- package/property-operation/property-operation.component.d.ts +6 -5
- package/radio/button/radio-button.component.d.ts +2 -2
- package/radio/group/radio-group.component.d.ts +8 -7
- package/radio/radio.component.d.ts +2 -2
- package/radio/radio.token.d.ts +2 -2
- package/rate/rate-item.component.d.ts +2 -1
- package/rate/rate.component.d.ts +4 -3
- package/resizable/resizable.directive.d.ts +4 -9
- package/resizable/resize-handle.component.d.ts +2 -1
- package/resizable/resize-handles.component.d.ts +2 -1
- package/result/result.component.d.ts +9 -10
- package/schematics/version.d.ts +1 -1
- package/schematics/version.js +1 -1
- package/segment/segment-item.component.d.ts +2 -1
- package/segment/segment.component.d.ts +2 -1
- package/select/custom-select/custom-select.component.d.ts +11 -10
- package/select/native-select/native-select.component.d.ts +2 -1
- package/shared/base-form-check.component.d.ts +3 -2
- package/shared/directives/thy-autofocus.directive.d.ts +3 -2
- package/shared/directives/thy-scroll.directive.d.ts +2 -1
- package/shared/directives/thy-show.d.ts +2 -1
- package/shared/option/group/option-group.component.d.ts +2 -1
- package/shared/option/list-option/list-option.component.d.ts +2 -7
- package/shared/option/option.component.d.ts +2 -1
- package/shared/select/select-control/select-control.component.d.ts +7 -6
- package/skeleton/skeleton-circle.component.d.ts +16 -19
- package/skeleton/skeleton-rectangle.component.d.ts +20 -23
- package/skeleton/skeleton.component.d.ts +5 -6
- package/skeleton/stylized/bullet-list.component.d.ts +11 -13
- package/skeleton/stylized/list.component.d.ts +10 -12
- package/skeleton/stylized/paragraph.component.d.ts +12 -14
- package/slide/slide-body/slide-body-section.component.d.ts +2 -1
- package/slider/slider.component.d.ts +17 -24
- package/space/space.component.d.ts +8 -8
- package/statistic/statistic.component.d.ts +35 -40
- package/stepper/step-header.component.d.ts +6 -10
- package/stepper/step.component.d.ts +6 -6
- package/stepper/stepper.component.d.ts +15 -20
- package/switch/switch.component.d.ts +24 -35
- package/table/table-column.component.d.ts +6 -5
- package/table/table-skeleton.component.d.ts +3 -10
- package/table/table.component.d.ts +11 -10
- package/tabs/tab-content.component.d.ts +4 -4
- package/tabs/tab.component.d.ts +4 -5
- package/tabs/tabs.component.d.ts +13 -15
- package/tag/tag.component.d.ts +10 -16
- package/time-picker/time-picker-panel.component.d.ts +3 -2
- package/time-picker/time-picker.component.d.ts +6 -5
- package/timeline/timeline-item.component.d.ts +9 -13
- package/timeline/timeline.component.d.ts +13 -17
- package/tooltip/tooltip.directive.d.ts +3 -2
- package/tree/tree-node.component.d.ts +6 -15
- package/tree/tree.component.d.ts +8 -7
- package/tree-select/tree-select.component.d.ts +8 -7
- package/typography/bg-color.directive.d.ts +3 -3
- package/typography/text/text.component.d.ts +2 -2
- package/typography/text-color.directive.d.ts +3 -3
- package/upload/file-drop.directive.d.ts +9 -11
- package/upload/file-select-base.d.ts +6 -10
- package/upload/file-select.component.d.ts +10 -20
- package/util/helpers/helpers.d.ts +2 -1
- package/vote/vote.component.d.ts +4 -3
- package/watermark/watermark.directive.d.ts +7 -9
|
@@ -3,7 +3,7 @@ import { ThyLoading, ThyLoadingModule } from 'ngx-tethys/loading';
|
|
|
3
3
|
import { ThyPopoverRef, ThyPopover, ThyPopoverModule } from 'ngx-tethys/popover';
|
|
4
4
|
import { NgTemplateOutlet, SlicePipe, CommonModule } from '@angular/common';
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { inject, ElementRef, NgZone,
|
|
6
|
+
import { input, signal, inject, ElementRef, NgZone, Component, output, computed, Directive, NgModule } from '@angular/core';
|
|
7
7
|
import { NgControl, FormsModule } from '@angular/forms';
|
|
8
8
|
import { Subject, Observable, of, fromEvent, EMPTY } from 'rxjs';
|
|
9
9
|
import { switchMap, debounceTime, catchError, take, takeUntil } from 'rxjs/operators';
|
|
@@ -342,33 +342,34 @@ class CaretPositioner {
|
|
|
342
342
|
*/
|
|
343
343
|
class ThyMentionSuggestions {
|
|
344
344
|
constructor() {
|
|
345
|
-
this.
|
|
346
|
-
this.
|
|
347
|
-
this.popoverRef = inject(ThyPopoverRef);
|
|
345
|
+
this.mention = input();
|
|
346
|
+
this.data = signal([]);
|
|
348
347
|
this.suggestionSelect$ = new Subject();
|
|
349
348
|
this.debounce = 150;
|
|
350
|
-
this.loadingDone = true;
|
|
349
|
+
this.loadingDone = signal(true);
|
|
351
350
|
this.search$ = new Subject();
|
|
352
|
-
this.
|
|
351
|
+
this.elementRef = inject(ElementRef);
|
|
352
|
+
this.ngZone = inject(NgZone);
|
|
353
|
+
this.popoverRef = inject(ThyPopoverRef);
|
|
353
354
|
this.search$
|
|
354
355
|
.pipe(switchMap(query => {
|
|
355
|
-
const data = this.mention.search(query.term, this.mention.data);
|
|
356
|
+
const data = this.mention().search(query.term, this.mention().data);
|
|
356
357
|
if (data instanceof Observable) {
|
|
357
|
-
this.loadingDone
|
|
358
|
+
this.loadingDone.set(false);
|
|
358
359
|
return data.pipe(debounceTime(this.debounce));
|
|
359
360
|
}
|
|
360
361
|
else {
|
|
361
362
|
return of(data);
|
|
362
363
|
}
|
|
363
364
|
}), catchError(() => {
|
|
364
|
-
this.loadingDone
|
|
365
|
-
return [];
|
|
365
|
+
this.loadingDone.set(false);
|
|
366
|
+
return of([]);
|
|
366
367
|
}))
|
|
367
368
|
.subscribe(data => {
|
|
368
|
-
this.loadingDone
|
|
369
|
-
this.data
|
|
369
|
+
this.loadingDone.set(true);
|
|
370
|
+
this.data.set(data || []);
|
|
370
371
|
if (this.popoverRef) {
|
|
371
|
-
if (this.mention.autoClose && this.data.length === 0) {
|
|
372
|
+
if (this.mention().autoClose && this.data().length === 0) {
|
|
372
373
|
this.popoverRef.close();
|
|
373
374
|
}
|
|
374
375
|
this.ngZone.onStable.pipe(take(1)).subscribe(() => {
|
|
@@ -378,18 +379,15 @@ class ThyMentionSuggestions {
|
|
|
378
379
|
});
|
|
379
380
|
}
|
|
380
381
|
ngOnInit() {
|
|
381
|
-
if (this.mention.popoverClass) {
|
|
382
|
-
this.elementRef.nativeElement.classList.add(this.mention.popoverClass);
|
|
382
|
+
if (this.mention().popoverClass) {
|
|
383
|
+
this.elementRef.nativeElement.classList.add(this.mention().popoverClass);
|
|
383
384
|
}
|
|
384
385
|
}
|
|
385
386
|
search(query) {
|
|
386
387
|
this.search$.next(query);
|
|
387
388
|
}
|
|
388
389
|
select(item, event) {
|
|
389
|
-
this.suggestionSelect$.next({
|
|
390
|
-
event,
|
|
391
|
-
item
|
|
392
|
-
});
|
|
390
|
+
this.suggestionSelect$.next({ event, item });
|
|
393
391
|
}
|
|
394
392
|
selectionChange(event) {
|
|
395
393
|
this.select(event.value, event.event);
|
|
@@ -398,21 +396,15 @@ class ThyMentionSuggestions {
|
|
|
398
396
|
this.search$.complete();
|
|
399
397
|
}
|
|
400
398
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyMentionSuggestions, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
401
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyMentionSuggestions, isStandalone: true, selector: "thy-mention-suggestions",
|
|
399
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.8", type: ThyMentionSuggestions, isStandalone: true, selector: "thy-mention-suggestions", inputs: { mention: { classPropertyName: "mention", publicName: "mention", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "thy-mention-suggestions" }, ngImport: i0, template: "@if (mention().suggestionsTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"mention().suggestionsTemplateRef\" [ngTemplateOutletContext]=\"{ data: data() }\"></ng-container>\n} @else {\n <thy-loading [thyDone]=\"loadingDone()\"></thy-loading>\n @if (loadingDone()) {\n @if (data()?.length > 0) {\n <thy-selection-list\n thyBindKeyEventContainer=\"body\"\n thyMultiple=\"false\"\n thyAutoActiveFirstItem=\"true\"\n thySpaceKeyEnabled=\"false\"\n [thyScrollContainer]=\"elementRef\"\n (thySelectionChange)=\"selectionChange($event)\">\n @for (item of data() | slice: 0 : mention().limit; track $index) {\n <thy-list-option [thyValue]=\"item\">\n @if (mention().displayTemplateRef) {\n <ng-template *ngTemplateOutlet=\"mention().displayTemplateRef; context: { $implicit: item }\"></ng-template>\n } @else {\n {{ item['name'] || '' }}\n }\n </thy-list-option>\n }\n </thy-selection-list>\n } @else {\n <div class=\"text-desc p-3\">\n {{ mention().emptyText }}\n </div>\n }\n }\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ThyLoading, selector: "thy-loading", inputs: ["thyDone", "thyTip", "thyIsMask"] }, { kind: "component", type: ThySelectionList, selector: "thy-selection-list,[thy-selection-list]", inputs: ["thyMultiple", "thyBindKeyEventContainer", "thyScrollContainer", "thyBeforeKeydown", "thyUniqueKey", "thyCompareWith", "thyLayout", "thyAutoActiveFirstItem", "thySize", "thySpaceKeyEnabled"], outputs: ["thySelectionChange"] }, { kind: "component", type: ThyListOption, selector: "thy-list-option,[thy-list-option]", inputs: ["id", "thyValue", "thyDisabled"] }, { kind: "pipe", type: SlicePipe, name: "slice" }] }); }
|
|
402
400
|
}
|
|
403
401
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyMentionSuggestions, decorators: [{
|
|
404
402
|
type: Component,
|
|
405
|
-
args: [{ selector: 'thy-mention-suggestions', imports: [NgTemplateOutlet, ThyLoading, ThySelectionList, ThyListOption, SlicePipe], template: "@if (mention.suggestionsTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"mention.suggestionsTemplateRef\" [ngTemplateOutletContext]=\"{ data: data }\"></ng-container>\n} @else {\n <thy-loading [thyDone]=\"loadingDone\"></thy-loading>\n @if (loadingDone) {\n @if (data?.length > 0) {\n <thy-selection-list\n thyBindKeyEventContainer=\"body\"\n thyMultiple=\"false\"\n thyAutoActiveFirstItem=\"true\"\n thySpaceKeyEnabled=\"false\"\n [thyScrollContainer]=\"elementRef\"\n (thySelectionChange)=\"selectionChange($event)\">\n @for (item of data | slice: 0 : mention.limit; track $index) {\n <thy-list-option [thyValue]=\"item\">\n @if (mention
|
|
406
|
-
}], ctorParameters: () => []
|
|
407
|
-
type: HostBinding,
|
|
408
|
-
args: ['class.thy-mention-suggestions']
|
|
409
|
-
}] } });
|
|
403
|
+
args: [{ selector: 'thy-mention-suggestions', imports: [NgTemplateOutlet, ThyLoading, ThySelectionList, ThyListOption, SlicePipe], host: { class: 'thy-mention-suggestions' }, template: "@if (mention().suggestionsTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"mention().suggestionsTemplateRef\" [ngTemplateOutletContext]=\"{ data: data() }\"></ng-container>\n} @else {\n <thy-loading [thyDone]=\"loadingDone()\"></thy-loading>\n @if (loadingDone()) {\n @if (data()?.length > 0) {\n <thy-selection-list\n thyBindKeyEventContainer=\"body\"\n thyMultiple=\"false\"\n thyAutoActiveFirstItem=\"true\"\n thySpaceKeyEnabled=\"false\"\n [thyScrollContainer]=\"elementRef\"\n (thySelectionChange)=\"selectionChange($event)\">\n @for (item of data() | slice: 0 : mention().limit; track $index) {\n <thy-list-option [thyValue]=\"item\">\n @if (mention().displayTemplateRef) {\n <ng-template *ngTemplateOutlet=\"mention().displayTemplateRef; context: { $implicit: item }\"></ng-template>\n } @else {\n {{ item['name'] || '' }}\n }\n </thy-list-option>\n }\n </thy-selection-list>\n } @else {\n <div class=\"text-desc p-3\">\n {{ mention().emptyText }}\n </div>\n }\n }\n}\n" }]
|
|
404
|
+
}], ctorParameters: () => [] });
|
|
410
405
|
|
|
411
406
|
const SUGGESTION_BACKDROP_CLASS = 'thy-mention-suggestions-backdrop';
|
|
412
|
-
const POPOVER_DEFAULT_CONFIG = {
|
|
413
|
-
backdropClass: SUGGESTION_BACKDROP_CLASS,
|
|
414
|
-
placement: 'bottomLeft'
|
|
415
|
-
};
|
|
407
|
+
const POPOVER_DEFAULT_CONFIG = { backdropClass: SUGGESTION_BACKDROP_CLASS, placement: 'bottomLeft' };
|
|
416
408
|
const DEFAULT_MENTION_CONFIG = {
|
|
417
409
|
autoClose: true,
|
|
418
410
|
emptyText: '无匹配数据,按空格完成输入',
|
|
@@ -427,24 +419,6 @@ const DEFAULT_MENTION_CONFIG = {
|
|
|
427
419
|
* @order 10
|
|
428
420
|
*/
|
|
429
421
|
class ThyMentionDirective {
|
|
430
|
-
get mentions() {
|
|
431
|
-
return this._mentions;
|
|
432
|
-
}
|
|
433
|
-
/**
|
|
434
|
-
* 提及输入配置参数,同时支持多个提及规则
|
|
435
|
-
* @type Mention<any>[]
|
|
436
|
-
*/
|
|
437
|
-
set mentions(value) {
|
|
438
|
-
this._mentions = value;
|
|
439
|
-
if (this._mentions) {
|
|
440
|
-
this._mentions = this._mentions.map(mention => {
|
|
441
|
-
if ((typeof ngDevMode === 'undefined' || ngDevMode) && !mention.trigger) {
|
|
442
|
-
throw new Error(`mention trigger is required`);
|
|
443
|
-
}
|
|
444
|
-
return Object.assign({}, DEFAULT_MENTION_CONFIG, mention);
|
|
445
|
-
});
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
422
|
get isOpened() {
|
|
449
423
|
return !!this.openedSuggestionsRef;
|
|
450
424
|
}
|
|
@@ -453,10 +427,32 @@ class ThyMentionDirective {
|
|
|
453
427
|
this.thyPopover = inject(ThyPopover);
|
|
454
428
|
this.ngControl = inject(NgControl, { optional: true, self: true });
|
|
455
429
|
this.adapter = null;
|
|
430
|
+
/**
|
|
431
|
+
* 提及输入配置参数,同时支持多个提及规则
|
|
432
|
+
* @type Mention<any>[]
|
|
433
|
+
*/
|
|
434
|
+
this.thyMention = input([]);
|
|
435
|
+
/**
|
|
436
|
+
* Popover 弹出层参数配置
|
|
437
|
+
*/
|
|
438
|
+
this.thyPopoverConfig = input();
|
|
456
439
|
/**
|
|
457
440
|
* 选择后的回调函数
|
|
458
441
|
*/
|
|
459
|
-
this.
|
|
442
|
+
this.thySelectSuggestion = output();
|
|
443
|
+
this.mentions = computed(() => {
|
|
444
|
+
if (this.thyMention()) {
|
|
445
|
+
return this.thyMention().map(mention => {
|
|
446
|
+
if ((typeof ngDevMode === 'undefined' || ngDevMode) && !mention.trigger) {
|
|
447
|
+
throw new Error(`mention trigger is required`);
|
|
448
|
+
}
|
|
449
|
+
return Object.assign({}, DEFAULT_MENTION_CONFIG, mention);
|
|
450
|
+
});
|
|
451
|
+
}
|
|
452
|
+
else {
|
|
453
|
+
return [];
|
|
454
|
+
}
|
|
455
|
+
});
|
|
460
456
|
this.destroy$ = new Subject();
|
|
461
457
|
this.openedSuggestionsRef$ = new Subject();
|
|
462
458
|
const elementRef = this.elementRef;
|
|
@@ -485,7 +481,7 @@ class ThyMentionDirective {
|
|
|
485
481
|
this.elementRef.nativeElement.innerText = newValue;
|
|
486
482
|
}
|
|
487
483
|
this.openedSuggestionsRef.close();
|
|
488
|
-
this.
|
|
484
|
+
this.thySelectSuggestion.emit(event);
|
|
489
485
|
});
|
|
490
486
|
}
|
|
491
487
|
ngOnDestroy() {
|
|
@@ -498,7 +494,7 @@ class ThyMentionDirective {
|
|
|
498
494
|
this.lookup(event);
|
|
499
495
|
}
|
|
500
496
|
lookup(event) {
|
|
501
|
-
const matched = this.adapter.lookup(event, this.mentions);
|
|
497
|
+
const matched = this.adapter.lookup(event, this.mentions());
|
|
502
498
|
if (matched) {
|
|
503
499
|
this.openSuggestions(matched);
|
|
504
500
|
}
|
|
@@ -513,16 +509,9 @@ class ThyMentionDirective {
|
|
|
513
509
|
const fontSize = parseInt(getComputedStyle(this.elementRef.nativeElement).fontSize, 10);
|
|
514
510
|
this.openedSuggestionsRef = this.thyPopover.open(ThyMentionSuggestions, Object.assign({}, POPOVER_DEFAULT_CONFIG, {
|
|
515
511
|
origin: this.elementRef,
|
|
516
|
-
originPosition: {
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
width: fontSize,
|
|
520
|
-
height: fontSize
|
|
521
|
-
},
|
|
522
|
-
initialState: {
|
|
523
|
-
mention: matched.mention
|
|
524
|
-
}
|
|
525
|
-
}, this.popoverConfig));
|
|
512
|
+
originPosition: { x: position.left, y: position.top, width: fontSize, height: fontSize },
|
|
513
|
+
initialState: { mention: matched.mention }
|
|
514
|
+
}, this.thyPopoverConfig()));
|
|
526
515
|
this.openedSuggestionsRef.afterClosed().subscribe(() => {
|
|
527
516
|
this.openedSuggestionsRef = null;
|
|
528
517
|
this.openedSuggestionsRef$.next(null);
|
|
@@ -539,23 +528,12 @@ class ThyMentionDirective {
|
|
|
539
528
|
}
|
|
540
529
|
}
|
|
541
530
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyMentionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
542
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
531
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: ThyMentionDirective, isStandalone: true, selector: "[thyMention]", inputs: { thyMention: { classPropertyName: "thyMention", publicName: "thyMention", isSignal: true, isRequired: false, transformFunction: null }, thyPopoverConfig: { classPropertyName: "thyPopoverConfig", publicName: "thyPopoverConfig", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { thySelectSuggestion: "thySelectSuggestion" }, ngImport: i0 }); }
|
|
543
532
|
}
|
|
544
533
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyMentionDirective, decorators: [{
|
|
545
534
|
type: Directive,
|
|
546
|
-
args: [{
|
|
547
|
-
|
|
548
|
-
}]
|
|
549
|
-
}], ctorParameters: () => [], propDecorators: { mentions: [{
|
|
550
|
-
type: Input,
|
|
551
|
-
args: ['thyMention']
|
|
552
|
-
}], popoverConfig: [{
|
|
553
|
-
type: Input,
|
|
554
|
-
args: ['thyPopoverConfig']
|
|
555
|
-
}], select: [{
|
|
556
|
-
type: Output,
|
|
557
|
-
args: ['thySelectSuggestion']
|
|
558
|
-
}] } });
|
|
535
|
+
args: [{ selector: '[thyMention]' }]
|
|
536
|
+
}], ctorParameters: () => [] });
|
|
559
537
|
|
|
560
538
|
class ThyMentionModule {
|
|
561
539
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: ThyMentionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-tethys-mention.mjs","sources":["../../../src/mention/adapter/adapter.ts","../../../src/mention/adapter/textarea.adapter.ts","../../../src/mention/adapter/editable.adapter.ts","../../../src/mention/adapter/index.ts","../../../src/mention/caret-positioner.ts","../../../src/mention/suggestions/suggestions.component.ts","../../../src/mention/suggestions/suggestions.component.html","../../../src/mention/mention.directive.ts","../../../src/mention/mention.module.ts","../../../src/mention/ngx-tethys-mention.ts"],"sourcesContent":["import { MentionDefaultDataItem, Mention } from '../interfaces';\n\nexport interface SeekQueryResult {\n term: string;\n start: number;\n end: number;\n}\n\nexport interface MatchedMention<T = MentionDefaultDataItem> {\n query: SeekQueryResult;\n mention: Mention<T>;\n}\n\nexport type MentionInputorElement = HTMLTextAreaElement | HTMLInputElement;\nexport abstract class MentionAdapter {\n inputor: MentionInputorElement;\n\n matchedMention: MatchedMention;\n\n constructor(inputor: MentionInputorElement) {\n this.inputor = inputor;\n }\n\n abstract seekQuery(event: Event, mention: Mention): SeekQueryResult;\n\n abstract insertMention(item: MentionDefaultDataItem): string;\n\n lookup(event: Event, mentions: Mention[]) {\n this.matchedMention = null;\n for (const mention of mentions) {\n const query = this.seekQuery(event, mention);\n if (query) {\n this.matchedMention = {\n query: query,\n mention: mention\n };\n break;\n }\n }\n return this.matchedMention;\n }\n}\n","import { MentionAdapter, MentionInputorElement, SeekQueryResult } from './adapter';\nimport { Mention, MentionDefaultDataItem } from '../interfaces';\n\nexport class TextareaMentionAdapter extends MentionAdapter {\n inputor: MentionInputorElement;\n\n constructor(inputor: MentionInputorElement) {\n super(inputor);\n }\n\n public seekQuery(event: Event, mention: Mention): SeekQueryResult {\n const selectionStart = this.inputor.selectionStart;\n const value = this.inputor.value.replace(/[\\r\\n]/g, ' ');\n // @123 | @456 => 0(start) => @123\n // @123 @456 | => 5(start) => @456\n const start = value.lastIndexOf(mention.trigger, selectionStart);\n const fistSpaceIndexFromStart = value.indexOf(' ', selectionStart);\n const end = fistSpaceIndexFromStart > -1 ? fistSpaceIndexFromStart : value.length;\n const termWithTrigger = value.substring(start, end);\n const startBeforeHasSpace = start > 0 && value[start - 1] === ' ';\n if ((startBeforeHasSpace || start === 0) && !termWithTrigger.includes(' ') && !termWithTrigger.includes(mention.trigger, 1)) {\n return {\n start: start,\n end: end,\n term: termWithTrigger.substring(mention.trigger.length)\n };\n } else {\n return null;\n }\n }\n\n public insertMention(item: MentionDefaultDataItem): string {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !this.matchedMention) {\n throw new Error(`matchedMention is null`);\n }\n const insertValue = this.getInsertValue(item);\n const value: string = this.inputor.value;\n const newValue = [\n value.slice(0, this.matchedMention.query.start),\n insertValue,\n value.slice(this.matchedMention.query.end, value.length)\n ].join('');\n this.inputor.value = newValue;\n this.focus(this.matchedMention.query.start + insertValue.length);\n return newValue;\n }\n\n private getInsertValue(item: MentionDefaultDataItem) {\n if (this.matchedMention.mention.insertTransform) {\n return this.matchedMention.mention.insertTransform(item).trim() + ' ';\n } else {\n return `${this.matchedMention.mention.trigger}${item['name']}`.trim() + ' ';\n }\n }\n\n private focus(caretPosition?: number): void {\n this.inputor.focus();\n this.inputor.setSelectionRange(caretPosition, caretPosition);\n }\n\n private isEditable() {\n return !this.inputor.readOnly && !this.inputor.disabled;\n }\n}\n","import { MentionAdapter, MentionInputorElement, SeekQueryResult } from './adapter';\nimport { Mention, MentionDefaultDataItem } from '../interfaces';\n\nexport class EditableMentionAdapter extends MentionAdapter {\n inputor: MentionInputorElement;\n\n constructor(inputor: MentionInputorElement) {\n super(inputor);\n }\n\n seekQuery(event: Event, mention: Mention): SeekQueryResult {\n const selectionStart = getSelection().focusOffset;\n const value = this.inputor.innerText.replace(/[\\r\\n]/g, ' ');\n const start = value.lastIndexOf(mention.trigger, selectionStart);\n const fistSpaceIndexFromStart = value.indexOf(' ', selectionStart);\n const end = fistSpaceIndexFromStart > -1 ? fistSpaceIndexFromStart : value.length;\n const termWithTrigger = value.substring(start, end);\n const startBeforeHasSpace = start > 0 && value[start - 1] === ' ';\n if ((startBeforeHasSpace || start === 0) && !termWithTrigger.includes(' ') && !termWithTrigger.includes(mention.trigger, 1)) {\n return {\n start: start,\n end: end,\n term: termWithTrigger.substring(mention.trigger.length)\n };\n } else {\n return null;\n }\n }\n\n insertMention(item: MentionDefaultDataItem): string {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !this.matchedMention) {\n throw new Error(`matchedMention is null`);\n }\n const insertValue = this.getInsertValue(item);\n const value: string = this.inputor.innerText;\n const newValue = [\n value.slice(0, this.matchedMention.query.start),\n insertValue,\n value.slice(this.matchedMention.query.end, value.length)\n ].join('');\n this.inputor.value = newValue;\n return newValue;\n }\n\n private getInsertValue(item: MentionDefaultDataItem) {\n if (this.matchedMention.mention.insertTransform) {\n return this.matchedMention.mention.insertTransform(item).trim() + ' ';\n } else {\n return `${this.matchedMention.mention.trigger}${item['name']}`.trim() + ' ';\n }\n }\n}\n","import { isInputOrTextarea } from 'ngx-tethys/util';\nimport { TextareaMentionAdapter } from './textarea.adapter';\nimport { EditableMentionAdapter } from './editable.adapter';\nimport { MentionInputorElement } from './adapter';\n\nexport function createMentionAdapter(element: MentionInputorElement) {\n if (isInputOrTextarea(element)) {\n return new TextareaMentionAdapter(element);\n } else {\n element.contentEditable = 'true';\n return new EditableMentionAdapter(element);\n }\n}\n\nexport * from './editable.adapter';\nexport * from './textarea.adapter';\nexport * from './adapter';\n","import { Injectable } from '@angular/core';\nimport { getElementOffset } from 'ngx-tethys/util';\n\nexport interface CaretCoordinates {\n top: number;\n left: number;\n height: number;\n}\n\nexport interface CaretOptions {\n debug: boolean;\n}\n\n// We'll copy the properties below into the mirror div.\n// Note that some browsers, such as Firefox, do not concatenate properties\n// into their shorthand (e.g. padding-top, padding-bottom etc. -> padding),\n// so we have to list every single property explicitly.\nconst properties = [\n 'direction', // RTL support\n 'boxSizing',\n 'width', // on Chrome and IE, exclude the scrollbar, so the mirror div wraps exactly as the textarea does\n 'height',\n 'overflowX',\n 'overflowY', // copy the scrollbar for IE\n\n 'borderTopWidth',\n 'borderRightWidth',\n 'borderBottomWidth',\n 'borderLeftWidth',\n 'borderStyle',\n\n 'paddingTop',\n 'paddingRight',\n 'paddingBottom',\n 'paddingLeft',\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/font\n 'fontStyle',\n 'fontVariant',\n 'fontWeight',\n 'fontStretch',\n 'fontSize',\n 'fontSizeAdjust',\n 'lineHeight',\n 'fontFamily',\n\n 'textAlign',\n 'textTransform',\n 'textIndent',\n 'textDecoration', // might not make a difference, but better be safe\n\n 'letterSpacing',\n 'wordSpacing',\n\n 'tabSize',\n 'MozTabSize'\n];\n\nconst isBrowser = typeof window !== 'undefined';\nconst isFirefox = isBrowser && window['mozInnerScreenX'] != null;\n\nexport type InputOrTextAreaElement = HTMLInputElement | HTMLTextAreaElement;\nexport type AllElement = InputOrTextAreaElement | HTMLElement;\n\nexport class CaretPositioner {\n // get caret coordinates in input or textarea\n // copy from repo: https://github.com/component/textarea-caret-position\n static getTextareaCaretCoordinates(element: InputOrTextAreaElement, position: number, options?: CaretOptions): CaretCoordinates {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !isBrowser) {\n throw new Error('textarea-caret-position#getCaretCoordinates should only be called in a browser');\n }\n\n const debug = (options && options.debug) || false;\n if (debug) {\n const el = document.querySelector('#input-textarea-caret-position-mirror-div');\n if (el) {\n el.parentNode.removeChild(el);\n }\n }\n\n // The mirror div will replicate the textarea's style\n const div = document.createElement('div');\n div.id = 'input-textarea-caret-position-mirror-div';\n document.body.appendChild(div);\n\n const style = div.style;\n const computed = window.getComputedStyle ? window.getComputedStyle(element) : element['currentStyle']; // currentStyle for IE < 9\n const isInput = element.nodeName === 'INPUT';\n\n // Default textarea styles\n style.whiteSpace = 'pre-wrap';\n if (!isInput) {\n style.wordWrap = 'break-word'; // only for textarea-s\n }\n\n // Position off-screen\n style.position = 'absolute'; // required to return coordinates properly\n if (!debug) {\n style.visibility = 'hidden'; // not 'display: none' because we want rendering\n }\n // Transfer the element's properties to the div\n properties.forEach(function (prop) {\n if (isInput && prop === 'lineHeight') {\n // Special case for <input>s because text is rendered centered and line height may be != height\n if (computed.boxSizing === 'border-box') {\n const height = parseInt(computed.height, 10);\n const outerHeight =\n parseInt(computed.paddingTop, 10) +\n parseInt(computed.paddingBottom, 10) +\n parseInt(computed.borderTopWidth, 10) +\n parseInt(computed.borderBottomWidth, 10);\n const targetHeight = outerHeight + parseInt(computed.lineHeight, 10);\n if (height > targetHeight) {\n style.lineHeight = height - outerHeight + 'px';\n } else if (height === targetHeight) {\n style.lineHeight = computed.lineHeight;\n } else {\n style.lineHeight = '0';\n }\n } else {\n style.lineHeight = computed.height;\n }\n } else {\n style[prop] = computed[prop];\n }\n });\n\n if (isFirefox) {\n // Firefox lies about the overflow property for textareas: https://bugzilla.mozilla.org/show_bug.cgi?id=984275\n if (element.scrollHeight > parseInt(computed.height, 10)) {\n style.overflowY = 'scroll';\n }\n } else {\n style.overflow = 'hidden'; // for Chrome to not render a scrollbar; IE keeps overflowY = 'scroll'\n }\n\n div.textContent = element.value.substring(0, position);\n // The second special handling for input type=\"text\" vs textarea:\n // spaces need to be replaced with non-breaking spaces - http://stackoverflow.com/a/13402035/1269037\n if (isInput) {\n div.textContent = div.textContent.replace(/\\s/g, '\\u00a0');\n }\n\n const span = document.createElement('span');\n // Wrapping must be replicated *exactly*, including when a long word gets\n // onto the next line, with whitespace at the end of the line before (#7).\n // The *only* reliable way to do that is to copy the *entire* rest of the\n // textarea's content into the <span> created at the caret position.\n // For inputs, just '.' would be enough, but no need to bother.\n span.textContent = element.value.substring(position) || '.'; // || because a completely empty faux span doesn't render at all\n div.appendChild(span);\n\n const coordinates = {\n top: span.offsetTop + parseInt(computed['borderTopWidth'], 10),\n left: span.offsetLeft + parseInt(computed['borderLeftWidth'], 10),\n height: parseInt(computed['lineHeight'], 10)\n };\n\n if (debug) {\n span.style.backgroundColor = '#aaa';\n } else {\n document.body.removeChild(div);\n }\n\n return coordinates;\n }\n\n static getEditableCaretCoordinates(element: HTMLElement): CaretCoordinates {\n if (window.getSelection().rangeCount) {\n const range = window.getSelection().getRangeAt(0);\n const rect = range.getBoundingClientRect();\n // using the start or endcontainer is... uhm yeah... difficult...? :D\n let height: string | number =\n range.startContainer.nodeType === 1\n ? getComputedStyle(range.startContainer as Element).lineHeight\n : getComputedStyle(range.startContainer.parentNode as Element).lineHeight;\n if (isNaN(height as any)) {\n let node = range.startContainer as HTMLElement;\n if (range.startContainer.nodeType !== 1) {\n node = node.parentNode as HTMLElement;\n }\n const current = node.style.lineHeight;\n node.style.lineHeight = '1em';\n height = parseInt(getComputedStyle(node).lineHeight, 10);\n node.style.lineHeight = current != null ? current : '';\n if (!node.getAttribute('style').length) {\n // clean up if empty\n node.removeAttribute('style');\n }\n }\n const editableRect = element.getBoundingClientRect();\n return {\n top: rect.top - editableRect.top,\n left: rect.left - editableRect.left,\n height: height as number\n };\n } else {\n return {\n top: 0,\n left: 0,\n height: 0\n };\n }\n }\n\n static getCaretCoordinates(element: AllElement, position: number, options?: CaretOptions) {\n const isInput = ['INPUT', 'TEXTAREA'].indexOf(element.nodeName) >= 0;\n if (isInput) {\n return this.getTextareaCaretCoordinates(element as InputOrTextAreaElement, position, options);\n } else {\n return this.getEditableCaretCoordinates(element);\n }\n }\n\n // get caret position in view window\n static getCaretPosition(element: AllElement, position: number, options?: CaretOptions) {\n const coordinates = CaretPositioner.getCaretCoordinates(element, position, options);\n const elementOffset = getElementOffset(element);\n return {\n top: coordinates.top + elementOffset.top,\n left: coordinates.left + elementOffset.left\n };\n }\n}\n","import { ThySelectionListChange, ThySelectionList } from 'ngx-tethys/list';\nimport { ThyPopoverRef } from 'ngx-tethys/popover';\nimport { Observable, of, Subject } from 'rxjs';\nimport { catchError, debounceTime, switchMap, take } from 'rxjs/operators';\n\nimport { Component, ElementRef, HostBinding, NgZone, OnDestroy, OnInit, inject } from '@angular/core';\n\nimport { SeekQueryResult } from '../adapter/adapter';\nimport { Mention, MentionDefaultDataItem, MentionSuggestionSelectEvent } from '../interfaces';\nimport { ThyListOption } from 'ngx-tethys/shared';\nimport { ThyLoading } from 'ngx-tethys/loading';\nimport { NgTemplateOutlet, SlicePipe } from '@angular/common';\n\n/**\n * @private\n */\n@Component({\n selector: 'thy-mention-suggestions',\n templateUrl: './suggestions.component.html',\n imports: [NgTemplateOutlet, ThyLoading, ThySelectionList, ThyListOption, SlicePipe]\n})\nexport class ThyMentionSuggestions<TItem = MentionDefaultDataItem> implements OnInit, OnDestroy {\n elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private ngZone = inject(NgZone);\n private popoverRef = inject<ThyPopoverRef<any>>(ThyPopoverRef);\n\n data: TItem[];\n\n mention: Mention<TItem>;\n\n suggestionSelect$ = new Subject<MentionSuggestionSelectEvent>();\n\n debounce = 150;\n\n loadingDone = true;\n\n private search$ = new Subject<SeekQueryResult>();\n\n @HostBinding('class.thy-mention-suggestions') suggestionsClass = true;\n\n constructor() {\n this.search$\n .pipe(\n switchMap(query => {\n const data = this.mention.search(query.term, this.mention.data);\n if (data instanceof Observable) {\n this.loadingDone = false;\n return (data as Observable<TItem[]>).pipe(debounceTime(this.debounce));\n } else {\n return of(data as TItem[]);\n }\n }),\n catchError(() => {\n this.loadingDone = false;\n return [];\n })\n )\n .subscribe(data => {\n this.loadingDone = true;\n this.data = data || [];\n\n if (this.popoverRef) {\n if (this.mention.autoClose && this.data.length === 0) {\n this.popoverRef.close();\n }\n this.ngZone.onStable.pipe(take(1)).subscribe(() => {\n this.popoverRef.updatePosition();\n });\n }\n });\n }\n\n ngOnInit(): void {\n if (this.mention.popoverClass) {\n this.elementRef.nativeElement.classList.add(this.mention.popoverClass);\n }\n }\n\n search(query: SeekQueryResult) {\n this.search$.next(query);\n }\n\n select(item: TItem, event: Event) {\n this.suggestionSelect$.next({\n event,\n item\n });\n }\n\n selectionChange(event: ThySelectionListChange<TItem>) {\n this.select(event.value, event.event);\n }\n\n ngOnDestroy() {\n this.search$.complete();\n }\n}\n","@if (mention.suggestionsTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"mention.suggestionsTemplateRef\" [ngTemplateOutletContext]=\"{ data: data }\"></ng-container>\n} @else {\n <thy-loading [thyDone]=\"loadingDone\"></thy-loading>\n @if (loadingDone) {\n @if (data?.length > 0) {\n <thy-selection-list\n thyBindKeyEventContainer=\"body\"\n thyMultiple=\"false\"\n thyAutoActiveFirstItem=\"true\"\n thySpaceKeyEnabled=\"false\"\n [thyScrollContainer]=\"elementRef\"\n (thySelectionChange)=\"selectionChange($event)\">\n @for (item of data | slice: 0 : mention.limit; track $index) {\n <thy-list-option [thyValue]=\"item\">\n @if (mention?.displayTemplateRef) {\n <ng-template *ngTemplateOutlet=\"mention?.displayTemplateRef; context: { $implicit: item }\"></ng-template>\n } @else {\n {{ item['name'] || '' }}\n }\n </thy-list-option>\n }\n </thy-selection-list>\n } @else {\n <div class=\"text-desc p-3\">\n {{ mention?.emptyText }}\n </div>\n }\n }\n}\n","import { ThyPopover, ThyPopoverConfig, ThyPopoverRef } from 'ngx-tethys/popover';\nimport { EMPTY, fromEvent, Subject } from 'rxjs';\nimport { switchMap, takeUntil } from 'rxjs/operators';\n\nimport { Directive, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output, inject } from '@angular/core';\nimport { NgControl } from '@angular/forms';\n\nimport { createMentionAdapter, MatchedMention, MentionAdapter, MentionInputorElement } from './adapter';\nimport { CaretPositioner } from './caret-positioner';\nimport { Mention, MentionDefaultDataItem, MentionSuggestionSelectEvent } from './interfaces';\nimport { ThyMentionSuggestions } from './suggestions/suggestions.component';\nimport { isInputOrTextarea } from 'ngx-tethys/util';\n\nconst SUGGESTION_BACKDROP_CLASS = 'thy-mention-suggestions-backdrop';\n\nconst POPOVER_DEFAULT_CONFIG = {\n backdropClass: SUGGESTION_BACKDROP_CLASS,\n placement: 'bottomLeft'\n};\n\nconst DEFAULT_MENTION_CONFIG: Partial<Mention> = {\n autoClose: true,\n emptyText: '无匹配数据,按空格完成输入',\n search: (term: string, data: MentionDefaultDataItem[]) => {\n return data.filter(item => {\n return !item.name || item.name.toLowerCase().includes(term.toLowerCase());\n });\n }\n};\n\n/**\n * @name thyMention\n * @order 10\n */\n@Directive({\n selector: '[thyMention]'\n})\nexport class ThyMentionDirective implements OnInit, OnDestroy {\n private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private thyPopover = inject(ThyPopover);\n private ngControl = inject(NgControl, { optional: true, self: true })!;\n\n private adapter: MentionAdapter = null;\n\n public openedSuggestionsRef: ThyPopoverRef<ThyMentionSuggestions>;\n\n private _mentions: Mention<any>[];\n get mentions() {\n return this._mentions;\n }\n\n /**\n * 提及输入配置参数,同时支持多个提及规则\n * @type Mention<any>[]\n */\n @Input('thyMention') set mentions(value: Mention<any>[]) {\n this._mentions = value;\n if (this._mentions) {\n this._mentions = this._mentions.map(mention => {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !mention.trigger) {\n throw new Error(`mention trigger is required`);\n }\n return Object.assign({}, DEFAULT_MENTION_CONFIG, mention);\n });\n }\n }\n\n /**\n * Popover 弹出层参数配置\n */\n @Input('thyPopoverConfig') popoverConfig: ThyPopoverConfig;\n\n /**\n * 选择后的回调函数\n */\n @Output('thySelectSuggestion') select = new EventEmitter<MentionSuggestionSelectEvent>();\n\n get isOpened() {\n return !!this.openedSuggestionsRef;\n }\n\n private destroy$ = new Subject<void>();\n\n private openedSuggestionsRef$ = new Subject<ThyPopoverRef<ThyMentionSuggestions> | null>();\n\n constructor() {\n const elementRef = this.elementRef;\n\n this.adapter = createMentionAdapter(elementRef.nativeElement as MentionInputorElement);\n }\n\n ngOnInit() {\n fromEvent(this.elementRef.nativeElement, 'input')\n .pipe(takeUntil(this.destroy$))\n .subscribe(event => this.onInput(event));\n\n fromEvent(this.elementRef.nativeElement, 'click')\n .pipe(takeUntil(this.destroy$))\n .subscribe(event => this.onClick(event));\n\n this.openedSuggestionsRef$\n .pipe(\n switchMap(openedSuggestionsRef =>\n // Re-subscribe to `suggestionSelect$` every time the suggestions component is re-created,\n // otherwise, unsubscribe, if it gets closed.\n openedSuggestionsRef ? openedSuggestionsRef.componentInstance.suggestionSelect$ : EMPTY\n ),\n takeUntil(this.destroy$)\n )\n .subscribe(event => {\n const newValue = this.adapter.insertMention(event.item);\n if (isInputOrTextarea(this.elementRef.nativeElement)) {\n if (this.ngControl && this.ngControl.control) {\n this.ngControl.control.setValue(newValue);\n }\n } else {\n this.elementRef.nativeElement.innerText = newValue;\n }\n this.openedSuggestionsRef.close();\n this.select.emit(event);\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n }\n\n onClick(event: Event) {\n this.lookup(event);\n }\n\n onInput(event: Event) {\n this.lookup(event);\n }\n\n private lookup(event: Event) {\n const matched = this.adapter.lookup(event, this.mentions);\n if (matched) {\n this.openSuggestions(matched);\n } else {\n this.closeSuggestions();\n }\n }\n\n private openSuggestions(matched: MatchedMention) {\n if (!this.openedSuggestionsRef) {\n const inputElement = this.elementRef.nativeElement as HTMLInputElement;\n const position = CaretPositioner.getCaretPosition(inputElement, matched.query.start);\n const fontSize = parseInt(getComputedStyle(this.elementRef.nativeElement).fontSize, 10);\n this.openedSuggestionsRef = this.thyPopover.open(\n ThyMentionSuggestions,\n Object.assign(\n {},\n POPOVER_DEFAULT_CONFIG,\n {\n origin: this.elementRef,\n originPosition: {\n x: position.left,\n y: position.top,\n width: fontSize,\n height: fontSize\n },\n initialState: {\n mention: matched.mention\n }\n },\n this.popoverConfig\n )\n );\n this.openedSuggestionsRef.afterClosed().subscribe(() => {\n this.openedSuggestionsRef = null;\n this.openedSuggestionsRef$.next(null);\n });\n\n this.openedSuggestionsRef$.next(this.openedSuggestionsRef);\n }\n\n if (this.openedSuggestionsRef) {\n this.openedSuggestionsRef.componentInstance.search(matched.query);\n }\n }\n\n private closeSuggestions() {\n if (this.openedSuggestionsRef) {\n this.openedSuggestionsRef.close();\n }\n }\n}\n","import { ThyListModule } from 'ngx-tethys/list';\nimport { ThyLoadingModule } from 'ngx-tethys/loading';\nimport { ThyPopoverModule } from 'ngx-tethys/popover';\n\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\n\nimport { ThyMentionDirective } from './mention.directive';\nimport { ThyMentionSuggestions } from './suggestions/suggestions.component';\n\n@NgModule({\n imports: [CommonModule, FormsModule, ThyPopoverModule, ThyListModule, ThyLoadingModule, ThyMentionDirective, ThyMentionSuggestions],\n exports: [ThyMentionDirective],\n providers: []\n})\nexport class ThyMentionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MAcsB,cAAc,CAAA;AAKhC,IAAA,WAAA,CAAY,OAA8B,EAAA;AACtC,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO;;IAO1B,MAAM,CAAC,KAAY,EAAE,QAAmB,EAAA;AACpC,QAAA,IAAI,CAAC,cAAc,GAAG,IAAI;AAC1B,QAAA,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;YAC5B,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC;YAC5C,IAAI,KAAK,EAAE;gBACP,IAAI,CAAC,cAAc,GAAG;AAClB,oBAAA,KAAK,EAAE,KAAK;AACZ,oBAAA,OAAO,EAAE;iBACZ;gBACD;;;QAGR,OAAO,IAAI,CAAC,cAAc;;AAEjC;;ACtCK,MAAO,sBAAuB,SAAQ,cAAc,CAAA;AAGtD,IAAA,WAAA,CAAY,OAA8B,EAAA;QACtC,KAAK,CAAC,OAAO,CAAC;;IAGX,SAAS,CAAC,KAAY,EAAE,OAAgB,EAAA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,EAAA,CAAA;sBAAhC,KAAK;uBAAC,YAAY;gBAeQ,aAAa,EAAA,CAAA;sBAAvC,KAAK;uBAAC,kBAAkB;gBAKM,MAAM,EAAA,CAAA;sBAApC,MAAM;uBAAC,qBAAqB;;;MC3DpB,gBAAgB,CAAA;8GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,EAJf,OAAA,EAAA,CAAA,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,aAAa,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,qBAAqB,aACxH,mBAAmB,CAAA,EAAA,CAAA,CAAA;+GAGpB,gBAAgB,EAAA,OAAA,EAAA,CAJf,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,aAAa,EAAE,gBAAgB,EAAuB,qBAAqB,CAAA,EAAA,CAAA,CAAA;;2FAIzH,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAL5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,aAAa,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,qBAAqB,CAAC;oBACnI,OAAO,EAAE,CAAC,mBAAmB,CAAC;AAC9B,oBAAA,SAAS,EAAE;AACd,iBAAA;;;ACfD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-tethys-mention.mjs","sources":["../../../src/mention/adapter/adapter.ts","../../../src/mention/adapter/textarea.adapter.ts","../../../src/mention/adapter/editable.adapter.ts","../../../src/mention/adapter/index.ts","../../../src/mention/caret-positioner.ts","../../../src/mention/suggestions/suggestions.component.ts","../../../src/mention/suggestions/suggestions.component.html","../../../src/mention/mention.directive.ts","../../../src/mention/mention.module.ts","../../../src/mention/ngx-tethys-mention.ts"],"sourcesContent":["import { MentionDefaultDataItem, Mention } from '../interfaces';\n\nexport interface SeekQueryResult {\n term: string;\n start: number;\n end: number;\n}\n\nexport interface MatchedMention<T = MentionDefaultDataItem> {\n query: SeekQueryResult;\n mention: Mention<T>;\n}\n\nexport type MentionInputorElement = HTMLTextAreaElement | HTMLInputElement;\nexport abstract class MentionAdapter {\n inputor: MentionInputorElement;\n\n matchedMention: MatchedMention;\n\n constructor(inputor: MentionInputorElement) {\n this.inputor = inputor;\n }\n\n abstract seekQuery(event: Event, mention: Mention): SeekQueryResult;\n\n abstract insertMention(item: MentionDefaultDataItem): string;\n\n lookup(event: Event, mentions: Mention[]) {\n this.matchedMention = null;\n for (const mention of mentions) {\n const query = this.seekQuery(event, mention);\n if (query) {\n this.matchedMention = {\n query: query,\n mention: mention\n };\n break;\n }\n }\n return this.matchedMention;\n }\n}\n","import { MentionAdapter, MentionInputorElement, SeekQueryResult } from './adapter';\nimport { Mention, MentionDefaultDataItem } from '../interfaces';\n\nexport class TextareaMentionAdapter extends MentionAdapter {\n inputor: MentionInputorElement;\n\n constructor(inputor: MentionInputorElement) {\n super(inputor);\n }\n\n public seekQuery(event: Event, mention: Mention): SeekQueryResult {\n const selectionStart = this.inputor.selectionStart;\n const value = this.inputor.value.replace(/[\\r\\n]/g, ' ');\n // @123 | @456 => 0(start) => @123\n // @123 @456 | => 5(start) => @456\n const start = value.lastIndexOf(mention.trigger, selectionStart);\n const fistSpaceIndexFromStart = value.indexOf(' ', selectionStart);\n const end = fistSpaceIndexFromStart > -1 ? fistSpaceIndexFromStart : value.length;\n const termWithTrigger = value.substring(start, end);\n const startBeforeHasSpace = start > 0 && value[start - 1] === ' ';\n if ((startBeforeHasSpace || start === 0) && !termWithTrigger.includes(' ') && !termWithTrigger.includes(mention.trigger, 1)) {\n return {\n start: start,\n end: end,\n term: termWithTrigger.substring(mention.trigger.length)\n };\n } else {\n return null;\n }\n }\n\n public insertMention(item: MentionDefaultDataItem): string {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !this.matchedMention) {\n throw new Error(`matchedMention is null`);\n }\n const insertValue = this.getInsertValue(item);\n const value: string = this.inputor.value;\n const newValue = [\n value.slice(0, this.matchedMention.query.start),\n insertValue,\n value.slice(this.matchedMention.query.end, value.length)\n ].join('');\n this.inputor.value = newValue;\n this.focus(this.matchedMention.query.start + insertValue.length);\n return newValue;\n }\n\n private getInsertValue(item: MentionDefaultDataItem) {\n if (this.matchedMention.mention.insertTransform) {\n return this.matchedMention.mention.insertTransform(item).trim() + ' ';\n } else {\n return `${this.matchedMention.mention.trigger}${item['name']}`.trim() + ' ';\n }\n }\n\n private focus(caretPosition?: number): void {\n this.inputor.focus();\n this.inputor.setSelectionRange(caretPosition, caretPosition);\n }\n\n private isEditable() {\n return !this.inputor.readOnly && !this.inputor.disabled;\n }\n}\n","import { MentionAdapter, MentionInputorElement, SeekQueryResult } from './adapter';\nimport { Mention, MentionDefaultDataItem } from '../interfaces';\n\nexport class EditableMentionAdapter extends MentionAdapter {\n inputor: MentionInputorElement;\n\n constructor(inputor: MentionInputorElement) {\n super(inputor);\n }\n\n seekQuery(event: Event, mention: Mention): SeekQueryResult {\n const selectionStart = getSelection().focusOffset;\n const value = this.inputor.innerText.replace(/[\\r\\n]/g, ' ');\n const start = value.lastIndexOf(mention.trigger, selectionStart);\n const fistSpaceIndexFromStart = value.indexOf(' ', selectionStart);\n const end = fistSpaceIndexFromStart > -1 ? fistSpaceIndexFromStart : value.length;\n const termWithTrigger = value.substring(start, end);\n const startBeforeHasSpace = start > 0 && value[start - 1] === ' ';\n if ((startBeforeHasSpace || start === 0) && !termWithTrigger.includes(' ') && !termWithTrigger.includes(mention.trigger, 1)) {\n return {\n start: start,\n end: end,\n term: termWithTrigger.substring(mention.trigger.length)\n };\n } else {\n return null;\n }\n }\n\n insertMention(item: MentionDefaultDataItem): string {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !this.matchedMention) {\n throw new Error(`matchedMention is null`);\n }\n const insertValue = this.getInsertValue(item);\n const value: string = this.inputor.innerText;\n const newValue = [\n value.slice(0, this.matchedMention.query.start),\n insertValue,\n value.slice(this.matchedMention.query.end, value.length)\n ].join('');\n this.inputor.value = newValue;\n return newValue;\n }\n\n private getInsertValue(item: MentionDefaultDataItem) {\n if (this.matchedMention.mention.insertTransform) {\n return this.matchedMention.mention.insertTransform(item).trim() + ' ';\n } else {\n return `${this.matchedMention.mention.trigger}${item['name']}`.trim() + ' ';\n }\n }\n}\n","import { isInputOrTextarea } from 'ngx-tethys/util';\nimport { TextareaMentionAdapter } from './textarea.adapter';\nimport { EditableMentionAdapter } from './editable.adapter';\nimport { MentionInputorElement } from './adapter';\n\nexport function createMentionAdapter(element: MentionInputorElement) {\n if (isInputOrTextarea(element)) {\n return new TextareaMentionAdapter(element);\n } else {\n element.contentEditable = 'true';\n return new EditableMentionAdapter(element);\n }\n}\n\nexport * from './editable.adapter';\nexport * from './textarea.adapter';\nexport * from './adapter';\n","import { Injectable } from '@angular/core';\nimport { getElementOffset } from 'ngx-tethys/util';\n\nexport interface CaretCoordinates {\n top: number;\n left: number;\n height: number;\n}\n\nexport interface CaretOptions {\n debug: boolean;\n}\n\n// We'll copy the properties below into the mirror div.\n// Note that some browsers, such as Firefox, do not concatenate properties\n// into their shorthand (e.g. padding-top, padding-bottom etc. -> padding),\n// so we have to list every single property explicitly.\nconst properties = [\n 'direction', // RTL support\n 'boxSizing',\n 'width', // on Chrome and IE, exclude the scrollbar, so the mirror div wraps exactly as the textarea does\n 'height',\n 'overflowX',\n 'overflowY', // copy the scrollbar for IE\n\n 'borderTopWidth',\n 'borderRightWidth',\n 'borderBottomWidth',\n 'borderLeftWidth',\n 'borderStyle',\n\n 'paddingTop',\n 'paddingRight',\n 'paddingBottom',\n 'paddingLeft',\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/font\n 'fontStyle',\n 'fontVariant',\n 'fontWeight',\n 'fontStretch',\n 'fontSize',\n 'fontSizeAdjust',\n 'lineHeight',\n 'fontFamily',\n\n 'textAlign',\n 'textTransform',\n 'textIndent',\n 'textDecoration', // might not make a difference, but better be safe\n\n 'letterSpacing',\n 'wordSpacing',\n\n 'tabSize',\n 'MozTabSize'\n];\n\nconst isBrowser = typeof window !== 'undefined';\nconst isFirefox = isBrowser && window['mozInnerScreenX'] != null;\n\nexport type InputOrTextAreaElement = HTMLInputElement | HTMLTextAreaElement;\nexport type AllElement = InputOrTextAreaElement | HTMLElement;\n\nexport class CaretPositioner {\n // get caret coordinates in input or textarea\n // copy from repo: https://github.com/component/textarea-caret-position\n static getTextareaCaretCoordinates(element: InputOrTextAreaElement, position: number, options?: CaretOptions): CaretCoordinates {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !isBrowser) {\n throw new Error('textarea-caret-position#getCaretCoordinates should only be called in a browser');\n }\n\n const debug = (options && options.debug) || false;\n if (debug) {\n const el = document.querySelector('#input-textarea-caret-position-mirror-div');\n if (el) {\n el.parentNode.removeChild(el);\n }\n }\n\n // The mirror div will replicate the textarea's style\n const div = document.createElement('div');\n div.id = 'input-textarea-caret-position-mirror-div';\n document.body.appendChild(div);\n\n const style = div.style;\n const computed = window.getComputedStyle ? window.getComputedStyle(element) : element['currentStyle']; // currentStyle for IE < 9\n const isInput = element.nodeName === 'INPUT';\n\n // Default textarea styles\n style.whiteSpace = 'pre-wrap';\n if (!isInput) {\n style.wordWrap = 'break-word'; // only for textarea-s\n }\n\n // Position off-screen\n style.position = 'absolute'; // required to return coordinates properly\n if (!debug) {\n style.visibility = 'hidden'; // not 'display: none' because we want rendering\n }\n // Transfer the element's properties to the div\n properties.forEach(function (prop) {\n if (isInput && prop === 'lineHeight') {\n // Special case for <input>s because text is rendered centered and line height may be != height\n if (computed.boxSizing === 'border-box') {\n const height = parseInt(computed.height, 10);\n const outerHeight =\n parseInt(computed.paddingTop, 10) +\n parseInt(computed.paddingBottom, 10) +\n parseInt(computed.borderTopWidth, 10) +\n parseInt(computed.borderBottomWidth, 10);\n const targetHeight = outerHeight + parseInt(computed.lineHeight, 10);\n if (height > targetHeight) {\n style.lineHeight = height - outerHeight + 'px';\n } else if (height === targetHeight) {\n style.lineHeight = computed.lineHeight;\n } else {\n style.lineHeight = '0';\n }\n } else {\n style.lineHeight = computed.height;\n }\n } else {\n style[prop] = computed[prop];\n }\n });\n\n if (isFirefox) {\n // Firefox lies about the overflow property for textareas: https://bugzilla.mozilla.org/show_bug.cgi?id=984275\n if (element.scrollHeight > parseInt(computed.height, 10)) {\n style.overflowY = 'scroll';\n }\n } else {\n style.overflow = 'hidden'; // for Chrome to not render a scrollbar; IE keeps overflowY = 'scroll'\n }\n\n div.textContent = element.value.substring(0, position);\n // The second special handling for input type=\"text\" vs textarea:\n // spaces need to be replaced with non-breaking spaces - http://stackoverflow.com/a/13402035/1269037\n if (isInput) {\n div.textContent = div.textContent.replace(/\\s/g, '\\u00a0');\n }\n\n const span = document.createElement('span');\n // Wrapping must be replicated *exactly*, including when a long word gets\n // onto the next line, with whitespace at the end of the line before (#7).\n // The *only* reliable way to do that is to copy the *entire* rest of the\n // textarea's content into the <span> created at the caret position.\n // For inputs, just '.' would be enough, but no need to bother.\n span.textContent = element.value.substring(position) || '.'; // || because a completely empty faux span doesn't render at all\n div.appendChild(span);\n\n const coordinates = {\n top: span.offsetTop + parseInt(computed['borderTopWidth'], 10),\n left: span.offsetLeft + parseInt(computed['borderLeftWidth'], 10),\n height: parseInt(computed['lineHeight'], 10)\n };\n\n if (debug) {\n span.style.backgroundColor = '#aaa';\n } else {\n document.body.removeChild(div);\n }\n\n return coordinates;\n }\n\n static getEditableCaretCoordinates(element: HTMLElement): CaretCoordinates {\n if (window.getSelection().rangeCount) {\n const range = window.getSelection().getRangeAt(0);\n const rect = range.getBoundingClientRect();\n // using the start or endcontainer is... uhm yeah... difficult...? :D\n let height: string | number =\n range.startContainer.nodeType === 1\n ? getComputedStyle(range.startContainer as Element).lineHeight\n : getComputedStyle(range.startContainer.parentNode as Element).lineHeight;\n if (isNaN(height as any)) {\n let node = range.startContainer as HTMLElement;\n if (range.startContainer.nodeType !== 1) {\n node = node.parentNode as HTMLElement;\n }\n const current = node.style.lineHeight;\n node.style.lineHeight = '1em';\n height = parseInt(getComputedStyle(node).lineHeight, 10);\n node.style.lineHeight = current != null ? current : '';\n if (!node.getAttribute('style').length) {\n // clean up if empty\n node.removeAttribute('style');\n }\n }\n const editableRect = element.getBoundingClientRect();\n return {\n top: rect.top - editableRect.top,\n left: rect.left - editableRect.left,\n height: height as number\n };\n } else {\n return {\n top: 0,\n left: 0,\n height: 0\n };\n }\n }\n\n static getCaretCoordinates(element: AllElement, position: number, options?: CaretOptions) {\n const isInput = ['INPUT', 'TEXTAREA'].indexOf(element.nodeName) >= 0;\n if (isInput) {\n return this.getTextareaCaretCoordinates(element as InputOrTextAreaElement, position, options);\n } else {\n return this.getEditableCaretCoordinates(element);\n }\n }\n\n // get caret position in view window\n static getCaretPosition(element: AllElement, position: number, options?: CaretOptions) {\n const coordinates = CaretPositioner.getCaretCoordinates(element, position, options);\n const elementOffset = getElementOffset(element);\n return {\n top: coordinates.top + elementOffset.top,\n left: coordinates.left + elementOffset.left\n };\n }\n}\n","import { ThySelectionListChange, ThySelectionList } from 'ngx-tethys/list';\nimport { ThyPopoverRef } from 'ngx-tethys/popover';\nimport { Observable, of, Subject } from 'rxjs';\nimport { catchError, debounceTime, switchMap, take } from 'rxjs/operators';\nimport { Component, ElementRef, NgZone, OnDestroy, OnInit, inject, signal, input } from '@angular/core';\nimport { SeekQueryResult } from '../adapter/adapter';\nimport { Mention, MentionDefaultDataItem, MentionSuggestionSelectEvent } from '../interfaces';\nimport { ThyListOption } from 'ngx-tethys/shared';\nimport { ThyLoading } from 'ngx-tethys/loading';\nimport { NgTemplateOutlet, SlicePipe } from '@angular/common';\n\n/**\n * @private\n */\n@Component({\n selector: 'thy-mention-suggestions',\n templateUrl: './suggestions.component.html',\n imports: [NgTemplateOutlet, ThyLoading, ThySelectionList, ThyListOption, SlicePipe],\n host: { class: 'thy-mention-suggestions' }\n})\nexport class ThyMentionSuggestions<TItem = MentionDefaultDataItem> implements OnInit, OnDestroy {\n readonly mention = input<Mention<TItem>>();\n\n data = signal<TItem[]>([]);\n\n suggestionSelect$ = new Subject<MentionSuggestionSelectEvent>();\n\n debounce = 150;\n\n loadingDone = signal(true);\n\n private search$ = new Subject<SeekQueryResult>();\n\n private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n private ngZone = inject(NgZone);\n\n private popoverRef = inject<ThyPopoverRef<any>>(ThyPopoverRef);\n\n constructor() {\n this.search$\n .pipe(\n switchMap(query => {\n const data = this.mention().search(query.term, this.mention().data);\n if (data instanceof Observable) {\n this.loadingDone.set(false);\n return (data as Observable<TItem[]>).pipe(debounceTime(this.debounce));\n } else {\n return of(data as TItem[]);\n }\n }),\n catchError(() => {\n this.loadingDone.set(false);\n return of([]);\n })\n )\n .subscribe(data => {\n this.loadingDone.set(true);\n this.data.set(data || []);\n\n if (this.popoverRef) {\n if (this.mention().autoClose && this.data().length === 0) {\n this.popoverRef.close();\n }\n this.ngZone.onStable.pipe(take(1)).subscribe(() => {\n this.popoverRef.updatePosition();\n });\n }\n });\n }\n\n ngOnInit(): void {\n if (this.mention().popoverClass) {\n this.elementRef.nativeElement.classList.add(this.mention().popoverClass);\n }\n }\n\n search(query: SeekQueryResult) {\n this.search$.next(query);\n }\n\n select(item: TItem, event: Event) {\n this.suggestionSelect$.next({ event, item });\n }\n\n selectionChange(event: ThySelectionListChange<TItem>) {\n this.select(event.value, event.event);\n }\n\n ngOnDestroy() {\n this.search$.complete();\n }\n}\n","@if (mention().suggestionsTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"mention().suggestionsTemplateRef\" [ngTemplateOutletContext]=\"{ data: data() }\"></ng-container>\n} @else {\n <thy-loading [thyDone]=\"loadingDone()\"></thy-loading>\n @if (loadingDone()) {\n @if (data()?.length > 0) {\n <thy-selection-list\n thyBindKeyEventContainer=\"body\"\n thyMultiple=\"false\"\n thyAutoActiveFirstItem=\"true\"\n thySpaceKeyEnabled=\"false\"\n [thyScrollContainer]=\"elementRef\"\n (thySelectionChange)=\"selectionChange($event)\">\n @for (item of data() | slice: 0 : mention().limit; track $index) {\n <thy-list-option [thyValue]=\"item\">\n @if (mention().displayTemplateRef) {\n <ng-template *ngTemplateOutlet=\"mention().displayTemplateRef; context: { $implicit: item }\"></ng-template>\n } @else {\n {{ item['name'] || '' }}\n }\n </thy-list-option>\n }\n </thy-selection-list>\n } @else {\n <div class=\"text-desc p-3\">\n {{ mention().emptyText }}\n </div>\n }\n }\n}\n","import { ThyPopover, ThyPopoverConfig, ThyPopoverRef } from 'ngx-tethys/popover';\nimport { EMPTY, fromEvent, Subject } from 'rxjs';\nimport { switchMap, takeUntil } from 'rxjs/operators';\n\nimport { Directive, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output, computed, inject, input, output } from '@angular/core';\nimport { NgControl } from '@angular/forms';\n\nimport { createMentionAdapter, MatchedMention, MentionAdapter, MentionInputorElement } from './adapter';\nimport { CaretPositioner } from './caret-positioner';\nimport { Mention, MentionDefaultDataItem, MentionSuggestionSelectEvent } from './interfaces';\nimport { ThyMentionSuggestions } from './suggestions/suggestions.component';\nimport { isInputOrTextarea } from 'ngx-tethys/util';\n\nconst SUGGESTION_BACKDROP_CLASS = 'thy-mention-suggestions-backdrop';\n\nconst POPOVER_DEFAULT_CONFIG = { backdropClass: SUGGESTION_BACKDROP_CLASS, placement: 'bottomLeft' };\n\nconst DEFAULT_MENTION_CONFIG: Partial<Mention> = {\n autoClose: true,\n emptyText: '无匹配数据,按空格完成输入',\n search: (term: string, data: MentionDefaultDataItem[]) => {\n return data.filter(item => {\n return !item.name || item.name.toLowerCase().includes(term.toLowerCase());\n });\n }\n};\n\n/**\n * @name thyMention\n * @order 10\n */\n@Directive({ selector: '[thyMention]' })\nexport class ThyMentionDirective implements OnInit, OnDestroy {\n private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private thyPopover = inject(ThyPopover);\n private ngControl = inject(NgControl, { optional: true, self: true })!;\n\n private adapter: MentionAdapter = null;\n\n public openedSuggestionsRef: ThyPopoverRef<ThyMentionSuggestions>;\n\n /**\n * 提及输入配置参数,同时支持多个提及规则\n * @type Mention<any>[]\n */\n readonly thyMention = input<Mention<any>[]>([]);\n\n /**\n * Popover 弹出层参数配置\n */\n readonly thyPopoverConfig = input<ThyPopoverConfig>();\n\n /**\n * 选择后的回调函数\n */\n readonly thySelectSuggestion = output<MentionSuggestionSelectEvent>();\n\n get isOpened() {\n return !!this.openedSuggestionsRef;\n }\n\n mentions = computed(() => {\n if (this.thyMention()) {\n return this.thyMention().map(mention => {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !mention.trigger) {\n throw new Error(`mention trigger is required`);\n }\n return Object.assign({}, DEFAULT_MENTION_CONFIG, mention);\n });\n } else {\n return [];\n }\n });\n\n private destroy$ = new Subject<void>();\n\n private openedSuggestionsRef$ = new Subject<ThyPopoverRef<ThyMentionSuggestions> | null>();\n\n constructor() {\n const elementRef = this.elementRef;\n\n this.adapter = createMentionAdapter(elementRef.nativeElement as MentionInputorElement);\n }\n\n ngOnInit() {\n fromEvent(this.elementRef.nativeElement, 'input')\n .pipe(takeUntil(this.destroy$))\n .subscribe(event => this.onInput(event));\n\n fromEvent(this.elementRef.nativeElement, 'click')\n .pipe(takeUntil(this.destroy$))\n .subscribe(event => this.onClick(event));\n\n this.openedSuggestionsRef$\n .pipe(\n switchMap(openedSuggestionsRef =>\n // Re-subscribe to `suggestionSelect$` every time the suggestions component is re-created,\n // otherwise, unsubscribe, if it gets closed.\n openedSuggestionsRef ? openedSuggestionsRef.componentInstance.suggestionSelect$ : EMPTY\n ),\n takeUntil(this.destroy$)\n )\n .subscribe(event => {\n const newValue = this.adapter.insertMention(event.item);\n if (isInputOrTextarea(this.elementRef.nativeElement)) {\n if (this.ngControl && this.ngControl.control) {\n this.ngControl.control.setValue(newValue);\n }\n } else {\n this.elementRef.nativeElement.innerText = newValue;\n }\n this.openedSuggestionsRef.close();\n this.thySelectSuggestion.emit(event);\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n }\n\n onClick(event: Event) {\n this.lookup(event);\n }\n\n onInput(event: Event) {\n this.lookup(event);\n }\n\n private lookup(event: Event) {\n const matched = this.adapter.lookup(event, this.mentions());\n if (matched) {\n this.openSuggestions(matched);\n } else {\n this.closeSuggestions();\n }\n }\n\n private openSuggestions(matched: MatchedMention) {\n if (!this.openedSuggestionsRef) {\n const inputElement = this.elementRef.nativeElement as HTMLInputElement;\n const position = CaretPositioner.getCaretPosition(inputElement, matched.query.start);\n const fontSize = parseInt(getComputedStyle(this.elementRef.nativeElement).fontSize, 10);\n this.openedSuggestionsRef = this.thyPopover.open(\n ThyMentionSuggestions,\n Object.assign(\n {},\n POPOVER_DEFAULT_CONFIG,\n {\n origin: this.elementRef,\n originPosition: { x: position.left, y: position.top, width: fontSize, height: fontSize },\n initialState: { mention: matched.mention }\n },\n this.thyPopoverConfig()\n )\n );\n this.openedSuggestionsRef.afterClosed().subscribe(() => {\n this.openedSuggestionsRef = null;\n this.openedSuggestionsRef$.next(null);\n });\n\n this.openedSuggestionsRef$.next(this.openedSuggestionsRef);\n }\n\n if (this.openedSuggestionsRef) {\n this.openedSuggestionsRef.componentInstance.search(matched.query);\n }\n }\n\n private closeSuggestions() {\n if (this.openedSuggestionsRef) {\n this.openedSuggestionsRef.close();\n }\n }\n}\n","import { ThyListModule } from 'ngx-tethys/list';\nimport { ThyLoadingModule } from 'ngx-tethys/loading';\nimport { ThyPopoverModule } from 'ngx-tethys/popover';\n\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\n\nimport { ThyMentionDirective } from './mention.directive';\nimport { ThyMentionSuggestions } from './suggestions/suggestions.component';\n\n@NgModule({\n imports: [CommonModule, FormsModule, ThyPopoverModule, ThyListModule, ThyLoadingModule, ThyMentionDirective, ThyMentionSuggestions],\n exports: [ThyMentionDirective],\n providers: []\n})\nexport class ThyMentionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MAcsB,cAAc,CAAA;AAKhC,IAAA,WAAA,CAAY,OAA8B,EAAA;AACtC,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO;;IAO1B,MAAM,CAAC,KAAY,EAAE,QAAmB,EAAA;AACpC,QAAA,IAAI,CAAC,cAAc,GAAG,IAAI;AAC1B,QAAA,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;YAC5B,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC;YAC5C,IAAI,KAAK,EAAE;gBACP,IAAI,CAAC,cAAc,GAAG;AAClB,oBAAA,KAAK,EAAE,KAAK;AACZ,oBAAA,OAAO,EAAE;iBACZ;gBACD;;;QAGR,OAAO,IAAI,CAAC,cAAc;;AAEjC;;ACtCK,MAAO,sBAAuB,SAAQ,cAAc,CAAA;AAGtD,IAAA,WAAA,CAAY,OAA8B,EAAA;QACtC,KAAK,CAAC,OAAO,CAAC;;IAGX,SAAS,CAAC,KAAY,EAAE,OAAgB,EAAA;AAC3C,QAAA,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,cAAc;AAClD,QAAA,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC;;;AAGxD,QAAA,MAAM,KAAK,GAAG,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,EAAE,cAAc,CAAC;QAChE,MAAM,uBAAuB,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,cAAc,CAAC;AAClE,QAAA,MAAM,GAAG,GAAG,uBAAuB,GAAG,CAAC,CAAC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