ngx-tethys 14.2.21 → 14.2.22

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.
Files changed (41) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/avatar/avatar-list/avatar-list.component.d.ts +75 -0
  3. package/avatar/avatar.component.d.ts +57 -1
  4. package/avatar/avatar.module.d.ts +5 -4
  5. package/avatar/index.d.ts +1 -0
  6. package/avatar/styles/avatar-list.scss +36 -0
  7. package/avatar/styles/avatar.scss +2 -0
  8. package/avatar/styles/mixin.scss +10 -0
  9. package/esm2020/avatar/avatar-list/avatar-list.component.mjs +175 -0
  10. package/esm2020/avatar/avatar.component.mjs +47 -3
  11. package/esm2020/avatar/avatar.module.mjs +5 -4
  12. package/esm2020/avatar/index.mjs +2 -1
  13. package/esm2020/comment/comment.component.mjs +1 -1
  14. package/esm2020/list/list-item-meta.component.mjs +1 -1
  15. package/esm2020/popover/header/popover-header.component.mjs +9 -5
  16. package/esm2020/version.mjs +2 -2
  17. package/fesm2015/ngx-tethys-avatar.mjs +221 -7
  18. package/fesm2015/ngx-tethys-avatar.mjs.map +1 -1
  19. package/fesm2015/ngx-tethys-comment.mjs +1 -1
  20. package/fesm2015/ngx-tethys-comment.mjs.map +1 -1
  21. package/fesm2015/ngx-tethys-list.mjs +1 -1
  22. package/fesm2015/ngx-tethys-list.mjs.map +1 -1
  23. package/fesm2015/ngx-tethys-popover.mjs +8 -4
  24. package/fesm2015/ngx-tethys-popover.mjs.map +1 -1
  25. package/fesm2015/ngx-tethys.mjs +1 -1
  26. package/fesm2015/ngx-tethys.mjs.map +1 -1
  27. package/fesm2020/ngx-tethys-avatar.mjs +221 -7
  28. package/fesm2020/ngx-tethys-avatar.mjs.map +1 -1
  29. package/fesm2020/ngx-tethys-comment.mjs +1 -1
  30. package/fesm2020/ngx-tethys-comment.mjs.map +1 -1
  31. package/fesm2020/ngx-tethys-list.mjs +1 -1
  32. package/fesm2020/ngx-tethys-list.mjs.map +1 -1
  33. package/fesm2020/ngx-tethys-popover.mjs +8 -4
  34. package/fesm2020/ngx-tethys-popover.mjs.map +1 -1
  35. package/fesm2020/ngx-tethys.mjs +1 -1
  36. package/fesm2020/ngx-tethys.mjs.map +1 -1
  37. package/package.json +1 -1
  38. package/popover/header/popover-header.component.d.ts +6 -2
  39. package/schematics/version.d.ts +1 -1
  40. package/schematics/version.js +1 -1
  41. package/styles/variables.scss +1 -0
@@ -1,11 +1,15 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Pipe, EventEmitter, Component, ChangeDetectionStrategy, HostBinding, Output, Input, NgModule } from '@angular/core';
3
- import * as i2 from '@angular/common';
2
+ import { Injectable, Pipe, EventEmitter, Component, ChangeDetectionStrategy, HostBinding, Output, Input, ContentChild, ContentChildren, ViewChild, NgModule } from '@angular/core';
3
+ import * as i1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import { coerceBooleanProperty, isString } from 'ngx-tethys/util';
6
6
  import { useHostRenderer } from '@tethys/cdk/dom';
7
7
  import * as i3 from 'ngx-tethys/icon';
8
8
  import { ThyIconModule } from 'ngx-tethys/icon';
9
+ import { __decorate, __metadata } from 'tslib';
10
+ import { UpdateHostClassService, InputBoolean } from 'ngx-tethys/core';
11
+ import { Subject, merge, of, Observable } from 'rxjs';
12
+ import { take, debounceTime, takeUntil } from 'rxjs/operators';
9
13
 
10
14
  class ThyAvatarService {
11
15
  constructor() {
@@ -111,22 +115,48 @@ const thyAvatarSizeMap = {
111
115
  md: 36,
112
116
  lg: 48
113
117
  };
118
+ /**
119
+ * 头像组件
120
+ */
114
121
  class ThyAvatarComponent {
115
122
  constructor(thyAvatarService) {
116
123
  this.thyAvatarService = thyAvatarService;
117
124
  this._showRemove = false;
118
125
  this._isAvatar = true;
126
+ /**
127
+ * * 已废弃,请使用 thyRemove
128
+ * @deprecated
129
+ */
119
130
  this.thyOnRemove = new EventEmitter();
131
+ /**
132
+ * 移除按钮的事件, 当 thyRemovable 为 true 时起作用
133
+ */
134
+ this.thyRemove = new EventEmitter();
135
+ /**
136
+ * 头像 img 加载 error 时触发
137
+ */
120
138
  this.thyError = new EventEmitter();
121
139
  this.hostRenderer = useHostRenderer();
122
140
  }
141
+ /**
142
+ * 头像路径地址, 默认为全路径,如果不是全路径,可以通过自定义服务 ThyAvatarService,重写 srcTransform 方法实现转换
143
+ *
144
+ */
123
145
  set thySrc(value) {
124
146
  this._setAvatarSrc(value);
125
147
  }
148
+ /**
149
+ * 人员名称(可设置自定义名称,需通过自定义服务 ThyAvatarService,重写 nameTransform 方法去实现转换)
150
+ */
126
151
  set thyName(value) {
127
152
  // this._name = value;
128
153
  this._setAvatarName(value);
129
154
  }
155
+ /**
156
+ * 头像大小
157
+ * @type 16 | 22 | 24 | 28 | 32 | 36 | 44 | 48 | 68 | 110 | 160 | xxs(22px) | xs(24px) | sm(32px) | md(36px) | lg(48px)
158
+ * @default md
159
+ */
130
160
  set thySize(value) {
131
161
  if (thyAvatarSizeMap[value]) {
132
162
  this._setAvatarSize(thyAvatarSizeMap[value]);
@@ -135,9 +165,21 @@ class ThyAvatarComponent {
135
165
  this._setAvatarSize(value * 1);
136
166
  }
137
167
  }
168
+ /**
169
+ * 已废弃,请使用 thyRemovable
170
+ * @deprecated
171
+ * @default false
172
+ */
138
173
  set thyShowRemove(value) {
139
174
  this._showRemove = coerceBooleanProperty(value);
140
175
  }
176
+ /**
177
+ * 是否展示移除按钮
178
+ * @default false
179
+ */
180
+ set thyRemovable(value) {
181
+ this._showRemove = coerceBooleanProperty(value);
182
+ }
141
183
  _setAvatarSize(size) {
142
184
  if (sizeArray.indexOf(size) > -1) {
143
185
  this._size = size;
@@ -145,6 +187,7 @@ class ThyAvatarComponent {
145
187
  else {
146
188
  this._size = this.findClosestSize(sizeArray, size);
147
189
  }
190
+ this.hostRenderer.updateClass([`thy-avatar-${this._size}`]);
148
191
  }
149
192
  findClosestSize(sizes, value) {
150
193
  let left = 0, right = sizes.length - 1, middle, result;
@@ -193,6 +236,7 @@ class ThyAvatarComponent {
193
236
  }
194
237
  remove($event) {
195
238
  this.thyOnRemove.emit($event);
239
+ this.thyRemove.emit($event);
196
240
  }
197
241
  avatarImgError($event) {
198
242
  this._setAvatarSrc(null);
@@ -200,7 +244,7 @@ class ThyAvatarComponent {
200
244
  }
201
245
  }
202
246
  ThyAvatarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThyAvatarComponent, deps: [{ token: ThyAvatarService }], target: i0.ɵɵFactoryTarget.Component });
203
- ThyAvatarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: ThyAvatarComponent, selector: "thy-avatar", inputs: { thyShowName: "thyShowName", thySrc: "thySrc", thyName: "thyName", thySize: "thySize", thyShowRemove: "thyShowRemove", thyImgClass: "thyImgClass", thyDisabled: "thyDisabled", thyLoading: "thyLoading", thyFetchPriority: "thyFetchPriority" }, outputs: { thyOnRemove: "thyOnRemove", thyError: "thyError" }, host: { properties: { "class.thy-avatar": "this._isAvatar" } }, ngImport: i0, template: "<img\n *ngIf=\"_src; else noSrc\"\n [src]=\"_src | thyAvatarSrc: _size\"\n class=\"avatar-avatar\"\n [ngClass]=\"thyImgClass\"\n alt=\"{{ avatarName || '' }}\"\n [attr.loading]=\"thyLoading\"\n [attr.fetchpriority]=\"thyFetchPriority\"\n (error)=\"avatarImgError($event)\"\n/>\n\n<ng-template #noSrc>\n <span class=\"avatar-default\" [ngStyle]=\"avatarName | avatarBgColor\">\n <div>{{ avatarName | avatarShortName }}</div>\n </span>\n</ng-template>\n\n<ng-template [ngIf]=\"thyShowName\">\n <div *ngIf=\"avatarNameSafeHtml; else noAvatarNameSafeHtml\" class=\"avatar-name\" [innerHtml]=\"avatarNameSafeHtml\"></div>\n <ng-template #noAvatarNameSafeHtml>\n <div class=\"avatar-name\">{{ avatarName }}</div>\n </ng-template>\n</ng-template>\n\n<a *ngIf=\"_showRemove\" (click)=\"remove($event)\" href=\"javascript:;\" class=\"remove-link avatar-remove\">\n <thy-icon class=\"remove-link-icon\" thyIconName=\"close-circle-bold-fill\"></thy-icon>\n</a>\n<div *ngIf=\"thyDisabled\" class=\"thy-avatar-disabled\">\n <thy-icon class=\"thy-avatar-disabled-icon\" thyIconName=\"ban\"></thy-icon>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i3.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "pipe", type: AvatarShortNamePipe, name: "avatarShortName" }, { kind: "pipe", type: AvatarBgColorPipe, name: "avatarBgColor" }, { kind: "pipe", type: AvatarSrcPipe, name: "thyAvatarSrc" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
247
+ ThyAvatarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: ThyAvatarComponent, selector: "thy-avatar", inputs: { thyShowName: "thyShowName", thySrc: "thySrc", thyName: "thyName", thySize: "thySize", thyShowRemove: "thyShowRemove", thyRemovable: "thyRemovable", thyImgClass: "thyImgClass", thyDisabled: "thyDisabled", thyLoading: "thyLoading", thyFetchPriority: "thyFetchPriority" }, outputs: { thyOnRemove: "thyOnRemove", thyRemove: "thyRemove", thyError: "thyError" }, host: { properties: { "class.thy-avatar": "this._isAvatar" } }, ngImport: i0, template: "<img\n *ngIf=\"_src; else noSrc\"\n [src]=\"_src | thyAvatarSrc: _size\"\n class=\"avatar-avatar\"\n [ngClass]=\"thyImgClass\"\n alt=\"{{ avatarName || '' }}\"\n [attr.loading]=\"thyLoading\"\n [attr.fetchpriority]=\"thyFetchPriority\"\n (error)=\"avatarImgError($event)\"\n/>\n\n<ng-template #noSrc>\n <span class=\"avatar-default\" [ngStyle]=\"avatarName | avatarBgColor\">\n <div>{{ avatarName | avatarShortName }}</div>\n </span>\n</ng-template>\n\n<ng-template [ngIf]=\"thyShowName\">\n <div *ngIf=\"avatarNameSafeHtml; else noAvatarNameSafeHtml\" class=\"avatar-name\" [innerHtml]=\"avatarNameSafeHtml\"></div>\n <ng-template #noAvatarNameSafeHtml>\n <div class=\"avatar-name\">{{ avatarName }}</div>\n </ng-template>\n</ng-template>\n\n<a *ngIf=\"_showRemove\" (click)=\"remove($event)\" href=\"javascript:;\" class=\"remove-link avatar-remove\">\n <thy-icon class=\"remove-link-icon\" thyIconName=\"close-circle-bold-fill\"></thy-icon>\n</a>\n<div *ngIf=\"thyDisabled\" class=\"thy-avatar-disabled\">\n <thy-icon class=\"thy-avatar-disabled-icon\" thyIconName=\"ban\"></thy-icon>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i3.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "pipe", type: AvatarShortNamePipe, name: "avatarShortName" }, { kind: "pipe", type: AvatarBgColorPipe, name: "avatarBgColor" }, { kind: "pipe", type: AvatarSrcPipe, name: "thyAvatarSrc" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
204
248
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThyAvatarComponent, decorators: [{
205
249
  type: Component,
206
250
  args: [{ selector: 'thy-avatar', changeDetection: ChangeDetectionStrategy.OnPush, template: "<img\n *ngIf=\"_src; else noSrc\"\n [src]=\"_src | thyAvatarSrc: _size\"\n class=\"avatar-avatar\"\n [ngClass]=\"thyImgClass\"\n alt=\"{{ avatarName || '' }}\"\n [attr.loading]=\"thyLoading\"\n [attr.fetchpriority]=\"thyFetchPriority\"\n (error)=\"avatarImgError($event)\"\n/>\n\n<ng-template #noSrc>\n <span class=\"avatar-default\" [ngStyle]=\"avatarName | avatarBgColor\">\n <div>{{ avatarName | avatarShortName }}</div>\n </span>\n</ng-template>\n\n<ng-template [ngIf]=\"thyShowName\">\n <div *ngIf=\"avatarNameSafeHtml; else noAvatarNameSafeHtml\" class=\"avatar-name\" [innerHtml]=\"avatarNameSafeHtml\"></div>\n <ng-template #noAvatarNameSafeHtml>\n <div class=\"avatar-name\">{{ avatarName }}</div>\n </ng-template>\n</ng-template>\n\n<a *ngIf=\"_showRemove\" (click)=\"remove($event)\" href=\"javascript:;\" class=\"remove-link avatar-remove\">\n <thy-icon class=\"remove-link-icon\" thyIconName=\"close-circle-bold-fill\"></thy-icon>\n</a>\n<div *ngIf=\"thyDisabled\" class=\"thy-avatar-disabled\">\n <thy-icon class=\"thy-avatar-disabled-icon\" thyIconName=\"ban\"></thy-icon>\n</div>\n" }]
@@ -209,6 +253,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
209
253
  args: ['class.thy-avatar']
210
254
  }], thyOnRemove: [{
211
255
  type: Output
256
+ }], thyRemove: [{
257
+ type: Output
212
258
  }], thyError: [{
213
259
  type: Output
214
260
  }], thyShowName: [{
@@ -221,6 +267,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
221
267
  type: Input
222
268
  }], thyShowRemove: [{
223
269
  type: Input
270
+ }], thyRemovable: [{
271
+ type: Input
224
272
  }], thyImgClass: [{
225
273
  type: Input
226
274
  }], thyDisabled: [{
@@ -231,10 +279,176 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
231
279
  type: Input
232
280
  }] } });
233
281
 
282
+ const AVATAR_ITEM_SPACE = 6;
283
+ const OVERLAP_AVATAR_ITEM_SPACE = -8;
284
+ /**
285
+ * 头像列表组件
286
+ */
287
+ class ThyAvatarListComponent {
288
+ constructor(elementRef, ngZone) {
289
+ this.elementRef = elementRef;
290
+ this.ngZone = ngZone;
291
+ this.overlapMode = false;
292
+ this.avatarItems = [];
293
+ this.avatarRenderItems = [];
294
+ this.avatarSpace = AVATAR_ITEM_SPACE;
295
+ this.avatarOverlapSpace = OVERLAP_AVATAR_ITEM_SPACE;
296
+ this.ngUnsubscribe$ = new Subject();
297
+ /**
298
+ * 响应式,自动计算宽度存放 avatar
299
+ * @default false
300
+ */
301
+ this.thyResponsive = false;
302
+ /**
303
+ * 头像大小
304
+ * @type 22 | 24 | 28 | 32 | 36 | 44 | 48 | 68 | 110 | 160 | xxs(22px) | xs(24px) | sm(32px) | md(36px) | lg(48px)
305
+ * @default 36
306
+ */
307
+ this.thyAvatarSize = DEFAULT_SIZE;
308
+ /**
309
+ * 是否展示移除按钮
310
+ * @type boolean
311
+ * @default false
312
+ */
313
+ this.thyRemovable = false;
314
+ /**
315
+ * avatar 移除按钮事件
316
+ */
317
+ this.thyRemove = new EventEmitter();
318
+ }
319
+ get more() {
320
+ return this.avatarItems.length - this.avatarRenderItems.length;
321
+ }
322
+ /**
323
+ * 展示方式
324
+ * @type 'overlap'| 'default'
325
+ * @default default
326
+ */
327
+ set thyMode(value) {
328
+ this.overlapMode = value === "overlap" /* ThyAvatarListMode.overlap */;
329
+ }
330
+ /**
331
+ * @private
332
+ */
333
+ set avatarComponents(value) {
334
+ this.avatarItems = value.toArray();
335
+ this.avatarList = value;
336
+ }
337
+ ngOnChanges(changes) {
338
+ if (changes.thyAvatarSize && !changes.thyAvatarSize.firstChange) {
339
+ this.setAvatarSize();
340
+ }
341
+ if (changes.thyMax && !changes.thyMax.firstChange) {
342
+ this.getRenderAvatar();
343
+ }
344
+ }
345
+ ngAfterContentInit() {
346
+ this.setAvatarSize();
347
+ }
348
+ ngAfterViewInit() {
349
+ this.ngZone.onStable.pipe(take(1)).subscribe(() => {
350
+ this.getRenderAvatar();
351
+ });
352
+ if (this.thyResponsive) {
353
+ this.ngZone.runOutsideAngular(() => {
354
+ merge(this.avatarList.changes, this.createResizeObserver(this.elementRef.nativeElement))
355
+ .pipe(debounceTime(100), takeUntil(this.ngUnsubscribe$))
356
+ .subscribe(() => {
357
+ this.getRenderAvatar();
358
+ });
359
+ });
360
+ }
361
+ }
362
+ setAvatarSize() {
363
+ this.avatarItems.forEach((avatar) => {
364
+ avatar.thySize = this.thyAvatarSize;
365
+ });
366
+ this.getRenderAvatar();
367
+ }
368
+ remove(name) {
369
+ this.thyRemove.emit(name);
370
+ }
371
+ getRenderAvatar() {
372
+ const endIndex = this.getEndIndex();
373
+ const max = this.thyMax || this.avatarItems.length;
374
+ const showCount = Math.max(0, Math.min(max, endIndex));
375
+ this.avatarRenderItems = this.avatarItems.slice(0, showCount);
376
+ }
377
+ getEndIndex() {
378
+ if (this.avatarItems.length) {
379
+ const space = this.overlapMode ? this.avatarOverlapSpace : this.avatarSpace;
380
+ const avatarWidth = this.avatarItems[0]._size + space;
381
+ const wrapperWidth = this.elementRef.nativeElement.offsetWidth;
382
+ const appendWidth = this.appendContent ? this.appendContent.nativeElement.offsetWidth : 0;
383
+ const lastAvatarSpecialSpace = this.overlapMode ? space : 0; // overlap 模式下最后一个 avatar 元素占位比其他多 this.avatarSpace 个 px
384
+ return Math.floor((wrapperWidth - appendWidth + lastAvatarSpecialSpace) / avatarWidth);
385
+ }
386
+ else {
387
+ return 0;
388
+ }
389
+ }
390
+ createResizeObserver(element) {
391
+ return typeof ResizeObserver === 'undefined'
392
+ ? of(null)
393
+ : new Observable(observer => {
394
+ const resize = new ResizeObserver(entries => {
395
+ this.ngZone.run(() => {
396
+ observer.next(entries);
397
+ });
398
+ });
399
+ resize.observe(element);
400
+ return () => {
401
+ resize.disconnect();
402
+ };
403
+ });
404
+ }
405
+ ngOnDestroy() {
406
+ this.ngUnsubscribe$.next();
407
+ this.ngUnsubscribe$.complete();
408
+ }
409
+ }
410
+ ThyAvatarListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThyAvatarListComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
411
+ ThyAvatarListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: ThyAvatarListComponent, selector: "thy-avatar-list", inputs: { thyMode: "thyMode", thyResponsive: "thyResponsive", thyMax: "thyMax", thyAvatarSize: "thyAvatarSize", thyRemovable: "thyRemovable" }, outputs: { thyRemove: "thyRemove" }, host: { properties: { "style.margin-left.px": "overlapMode ? -avatarOverlapSpace : 0", "class.thy-avatar-list-overlap": "this.overlapMode" }, classAttribute: "thy-avatar-list" }, providers: [UpdateHostClassService], queries: [{ propertyName: "append", first: true, predicate: ["append"], descendants: true }, { propertyName: "avatarComponents", predicate: ThyAvatarComponent }], viewQueries: [{ propertyName: "appendContent", first: true, predicate: ["appendContent"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-template>\n <ng-content></ng-content>\n</ng-template>\n\n<ng-container *ngFor=\"let avatar of avatarRenderItems; index as index; last as isLast\">\n <div\n class=\"thy-avatar-content\"\n [ngStyle]=\"overlapMode ? { 'margin-left.px': avatarOverlapSpace } : { 'margin-right.px': isLast ? 0 : avatarSpace }\"\n >\n <thy-avatar\n [thySrc]=\"avatar._src\"\n [thyName]=\"avatar.avatarName\"\n [thySize]=\"avatar._size\"\n [thyRemovable]=\"overlapMode ? false : thyRemovable\"\n [thyImgClass]=\"avatar.thyImgClass\"\n [thyDisabled]=\"avatar.thyDisabled\"\n [thyLoading]=\"avatar.thyLoading\"\n [thyFetchPriority]=\"avatar.thyFetchPriority\"\n (thyRemove)=\"remove(avatar.avatarName)\"\n ></thy-avatar>\n <span *ngIf=\"isLast && more && thyResponsive\" ngClass=\"more-{{ avatar._size }}\">+{{ more }} </span>\n </div>\n</ng-container>\n\n<div #appendContent *ngIf=\"append\" [ngStyle]=\"{ 'padding-left.px': avatarSpace }\">\n <ng-container [ngTemplateOutlet]=\"append\"></ng-container>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: ThyAvatarComponent, selector: "thy-avatar", inputs: ["thyShowName", "thySrc", "thyName", "thySize", "thyShowRemove", "thyRemovable", "thyImgClass", "thyDisabled", "thyLoading", "thyFetchPriority"], outputs: ["thyOnRemove", "thyRemove", "thyError"] }] });
412
+ __decorate([
413
+ InputBoolean(),
414
+ __metadata("design:type", Object)
415
+ ], ThyAvatarListComponent.prototype, "thyResponsive", void 0);
416
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThyAvatarListComponent, decorators: [{
417
+ type: Component,
418
+ args: [{ selector: 'thy-avatar-list', host: {
419
+ class: 'thy-avatar-list',
420
+ '[style.margin-left.px]': 'overlapMode ? -avatarOverlapSpace : 0'
421
+ }, providers: [UpdateHostClassService], template: "<ng-template>\n <ng-content></ng-content>\n</ng-template>\n\n<ng-container *ngFor=\"let avatar of avatarRenderItems; index as index; last as isLast\">\n <div\n class=\"thy-avatar-content\"\n [ngStyle]=\"overlapMode ? { 'margin-left.px': avatarOverlapSpace } : { 'margin-right.px': isLast ? 0 : avatarSpace }\"\n >\n <thy-avatar\n [thySrc]=\"avatar._src\"\n [thyName]=\"avatar.avatarName\"\n [thySize]=\"avatar._size\"\n [thyRemovable]=\"overlapMode ? false : thyRemovable\"\n [thyImgClass]=\"avatar.thyImgClass\"\n [thyDisabled]=\"avatar.thyDisabled\"\n [thyLoading]=\"avatar.thyLoading\"\n [thyFetchPriority]=\"avatar.thyFetchPriority\"\n (thyRemove)=\"remove(avatar.avatarName)\"\n ></thy-avatar>\n <span *ngIf=\"isLast && more && thyResponsive\" ngClass=\"more-{{ avatar._size }}\">+{{ more }} </span>\n </div>\n</ng-container>\n\n<div #appendContent *ngIf=\"append\" [ngStyle]=\"{ 'padding-left.px': avatarSpace }\">\n <ng-container [ngTemplateOutlet]=\"append\"></ng-container>\n</div>\n" }]
422
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { overlapMode: [{
423
+ type: HostBinding,
424
+ args: ['class.thy-avatar-list-overlap']
425
+ }], thyMode: [{
426
+ type: Input
427
+ }], thyResponsive: [{
428
+ type: Input
429
+ }], thyMax: [{
430
+ type: Input
431
+ }], thyAvatarSize: [{
432
+ type: Input
433
+ }], thyRemovable: [{
434
+ type: Input
435
+ }], thyRemove: [{
436
+ type: Output
437
+ }], append: [{
438
+ type: ContentChild,
439
+ args: ['append', { static: false }]
440
+ }], avatarComponents: [{
441
+ type: ContentChildren,
442
+ args: [ThyAvatarComponent]
443
+ }], appendContent: [{
444
+ type: ViewChild,
445
+ args: ['appendContent']
446
+ }] } });
447
+
234
448
  class ThyAvatarModule {
235
449
  }
236
450
  ThyAvatarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThyAvatarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
237
- ThyAvatarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: ThyAvatarModule, declarations: [ThyAvatarComponent, AvatarShortNamePipe, AvatarBgColorPipe, AvatarSrcPipe], imports: [CommonModule, ThyIconModule], exports: [ThyAvatarComponent, AvatarShortNamePipe, AvatarBgColorPipe, AvatarSrcPipe] });
451
+ ThyAvatarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: ThyAvatarModule, declarations: [ThyAvatarComponent, ThyAvatarListComponent, AvatarShortNamePipe, AvatarBgColorPipe, AvatarSrcPipe], imports: [CommonModule, ThyIconModule], exports: [ThyAvatarComponent, ThyAvatarListComponent, AvatarShortNamePipe, AvatarBgColorPipe, AvatarSrcPipe] });
238
452
  ThyAvatarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThyAvatarModule, providers: [
239
453
  {
240
454
  provide: ThyAvatarService,
@@ -244,7 +458,7 @@ ThyAvatarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version
244
458
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThyAvatarModule, decorators: [{
245
459
  type: NgModule,
246
460
  args: [{
247
- declarations: [ThyAvatarComponent, AvatarPipes],
461
+ declarations: [ThyAvatarComponent, ThyAvatarListComponent, AvatarPipes],
248
462
  imports: [CommonModule, ThyIconModule],
249
463
  providers: [
250
464
  {
@@ -252,7 +466,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
252
466
  useClass: ThyDefaultAvatarService
253
467
  }
254
468
  ],
255
- exports: [ThyAvatarComponent, AvatarPipes]
469
+ exports: [ThyAvatarComponent, ThyAvatarListComponent, AvatarPipes]
256
470
  }]
257
471
  }] });
258
472
 
@@ -260,5 +474,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
260
474
  * Generated bundle index. Do not edit.
261
475
  */
262
476
 
263
- export { AvatarBgColorPipe, AvatarPipes, AvatarShortNamePipe, AvatarSrcPipe, ThyAvatarComponent, ThyAvatarModule, ThyAvatarService, ThyDefaultAvatarService, thyAvatarSizeMap };
477
+ export { AvatarBgColorPipe, AvatarPipes, AvatarShortNamePipe, AvatarSrcPipe, DEFAULT_SIZE, ThyAvatarComponent, ThyAvatarListComponent, ThyAvatarModule, ThyAvatarService, ThyDefaultAvatarService, thyAvatarSizeMap };
264
478
  //# sourceMappingURL=ngx-tethys-avatar.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-tethys-avatar.mjs","sources":["../../../src/avatar/avatar.service.ts","../../../src/avatar/avatar.pipe.ts","../../../src/avatar/avatar.component.ts","../../../src/avatar/avatar.component.html","../../../src/avatar/avatar.module.ts","../../../src/avatar/ngx-tethys-avatar.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { SafeHtml } from '@angular/platform-browser';\n\nexport abstract class ThyAvatarService {\n ignoreAvatarSrcPaths = [`default.png`];\n\n /**\n * @deprecated the avatarSrcTransform method will be deprecated, please use srcTransform.\n */\n abstract avatarSrcTransform(src: string, size: number): string;\n\n abstract srcTransform(src: string, size: number): string;\n\n abstract nameTransform(name: string): string | SafeHtml;\n}\n\n@Injectable()\nexport class ThyDefaultAvatarService extends ThyAvatarService {\n /**\n * @deprecated the avatarSrcTransform method will be deprecated, please use srcTransform.\n */\n avatarSrcTransform(src: string, size: number): string {\n return src;\n }\n\n srcTransform(src: string, size: number): string {\n return src;\n }\n\n nameTransform(name: string): string | SafeHtml {\n return name;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { ThyAvatarService } from './avatar.service';\n\n/**\n * `\\u4e00`: https://www.compart.com/en/unicode/U+4E00\n * `\\u9fa5`: https://www.compart.com/en/unicode/U+9FA5\n */\nconst UNIFIED_IDEOGRAPHS_REGEX = /^[\\u4e00-\\u9fa5]+$/;\n\nconst SET_OF_LETTERS_REGEX = /^[a-zA-Z\\/ ]+$/;\n\n@Pipe({ name: 'avatarShortName' })\nexport class AvatarShortNamePipe implements PipeTransform {\n transform(name: string | null | undefined): string {\n if (!name) {\n return '';\n }\n\n name = name.trim();\n\n if (UNIFIED_IDEOGRAPHS_REGEX.test(name) && name.length > 2) {\n return name.slice(name.length - 2);\n }\n\n if (SET_OF_LETTERS_REGEX.test(name) && name.indexOf(' ') > 0) {\n const words: string[] = name.split(' ');\n return (words[0].slice(0, 1) + words[1].slice(0, 1)).toUpperCase();\n }\n\n return name.length > 2 ? name.slice(0, 2).toUpperCase() : name.toUpperCase();\n }\n}\n\n@Pipe({ name: 'avatarBgColor' })\nexport class AvatarBgColorPipe implements PipeTransform {\n transform(name: string) {\n if (!name) {\n return;\n }\n const colors = ['#56abfb', '#5dcfff', '#84e17e', '#73d897', '#ff9f73', '#fa8888', '#fb7fb7', '#9a7ef4', '#868af6'];\n const nameArray: string[] = name.split('');\n const code: number =\n name && name.length > 0\n ? nameArray.reduce(\n function(result, item) {\n result.value += item.charCodeAt(0);\n return result;\n },\n { value: 0 }\n ).value\n : 0;\n return {\n 'background-color': colors[code % 9]\n };\n }\n}\n\n@Pipe({ name: 'thyAvatarSrc' })\nexport class AvatarSrcPipe implements PipeTransform {\n constructor(private thyAvatarService: ThyAvatarService) {}\n transform(src: string, size: number) {\n return this.thyAvatarService.srcTransform\n ? this.thyAvatarService.srcTransform(src, size)\n : this.thyAvatarService.avatarSrcTransform(src, size);\n }\n}\n\nexport const AvatarPipes = [AvatarShortNamePipe, AvatarBgColorPipe, AvatarSrcPipe];\n","import { ChangeDetectionStrategy, Component, EventEmitter, HostBinding, Input, OnInit, Output } from '@angular/core';\nimport { SafeHtml } from '@angular/platform-browser';\nimport { coerceBooleanProperty, isString } from 'ngx-tethys/util';\nimport { useHostRenderer } from '@tethys/cdk/dom';\nimport { ThyAvatarService } from './avatar.service';\n\nconst sizeArray = [16, 22, 24, 28, 32, 36, 44, 48, 68, 110, 160];\n\nconst DEFAULT_SIZE = 36;\n\nexport const thyAvatarSizeMap = {\n xxs: 22,\n xs: 24,\n sm: 32,\n md: 36,\n lg: 48\n};\n\n/** https://html.spec.whatwg.org/multipage/embedded-content.html#attr-img-loading */\nexport type ThyAvatarLoading = 'eager' | 'lazy';\n\n/** https://wicg.github.io/priority-hints/#idl-index */\nexport type ThyAvatarFetchPriority = 'high' | 'low' | 'auto';\n\n@Component({\n selector: 'thy-avatar',\n templateUrl: './avatar.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ThyAvatarComponent implements OnInit {\n _src: string;\n _name: string;\n _size: number;\n _showRemove = false;\n\n public avatarSrc: string;\n public avatarName?: string;\n public avatarNameSafeHtml?: SafeHtml;\n\n @HostBinding('class.thy-avatar') _isAvatar = true;\n\n @Output() thyOnRemove = new EventEmitter();\n\n @Output() thyError: EventEmitter<Event> = new EventEmitter<Event>();\n\n @Input() thyShowName: boolean;\n\n @Input()\n set thySrc(value: string) {\n this._setAvatarSrc(value);\n }\n\n @Input()\n set thyName(value: string) {\n // this._name = value;\n this._setAvatarName(value);\n }\n\n @Input()\n set thySize(value: number | string) {\n if (thyAvatarSizeMap[value]) {\n this._setAvatarSize(thyAvatarSizeMap[value]);\n } else {\n this._setAvatarSize((value as number) * 1);\n }\n }\n\n @Input()\n set thyShowRemove(value: boolean) {\n this._showRemove = coerceBooleanProperty(value);\n }\n\n @Input() thyImgClass: string;\n\n @Input() thyDisabled: boolean;\n\n @Input() thyLoading?: ThyAvatarLoading;\n\n @Input() thyFetchPriority?: ThyAvatarFetchPriority;\n\n private _setAvatarSize(size: number) {\n if (sizeArray.indexOf(size) > -1) {\n this._size = size;\n } else {\n this._size = this.findClosestSize(sizeArray, size);\n }\n }\n\n private findClosestSize(sizes: number[], value: number): number {\n let left = 0,\n right = sizes.length - 1,\n middle: number,\n result: number;\n\n while (left <= right) {\n middle = Math.floor((left + right) / 2);\n if (right - left <= 1) {\n result = sizes[right];\n break;\n }\n result = sizes[middle];\n if (result === value) {\n return value;\n } else if (result > value) {\n right = middle;\n } else {\n left = middle;\n }\n }\n return value - sizes[left] < sizes[right] - value ? sizes[left] : sizes[right];\n }\n\n private _setAvatarSrc(src: string) {\n if (src && this.thyAvatarService.ignoreAvatarSrcPaths.indexOf(src) < 0) {\n this._src = src;\n } else {\n this._src = null;\n }\n }\n\n private _setAvatarName(value: string) {\n const name = this.thyAvatarService.nameTransform(value);\n if (isString(name)) {\n this.avatarName = name as string;\n } else {\n this.avatarName = value;\n this.avatarNameSafeHtml = name;\n }\n }\n\n private hostRenderer = useHostRenderer();\n\n constructor(private thyAvatarService: ThyAvatarService) {}\n\n ngOnInit() {\n if (!this._size) {\n this._setAvatarSize(DEFAULT_SIZE);\n }\n this.hostRenderer.updateClass([`thy-avatar-${this._size}`]);\n }\n\n remove($event: Event) {\n this.thyOnRemove.emit($event);\n }\n\n avatarImgError($event: Event) {\n this._setAvatarSrc(null);\n this.thyError.emit($event);\n }\n}\n","<img\n *ngIf=\"_src; else noSrc\"\n [src]=\"_src | thyAvatarSrc: _size\"\n class=\"avatar-avatar\"\n [ngClass]=\"thyImgClass\"\n alt=\"{{ avatarName || '' }}\"\n [attr.loading]=\"thyLoading\"\n [attr.fetchpriority]=\"thyFetchPriority\"\n (error)=\"avatarImgError($event)\"\n/>\n\n<ng-template #noSrc>\n <span class=\"avatar-default\" [ngStyle]=\"avatarName | avatarBgColor\">\n <div>{{ avatarName | avatarShortName }}</div>\n </span>\n</ng-template>\n\n<ng-template [ngIf]=\"thyShowName\">\n <div *ngIf=\"avatarNameSafeHtml; else noAvatarNameSafeHtml\" class=\"avatar-name\" [innerHtml]=\"avatarNameSafeHtml\"></div>\n <ng-template #noAvatarNameSafeHtml>\n <div class=\"avatar-name\">{{ avatarName }}</div>\n </ng-template>\n</ng-template>\n\n<a *ngIf=\"_showRemove\" (click)=\"remove($event)\" href=\"javascript:;\" class=\"remove-link avatar-remove\">\n <thy-icon class=\"remove-link-icon\" thyIconName=\"close-circle-bold-fill\"></thy-icon>\n</a>\n<div *ngIf=\"thyDisabled\" class=\"thy-avatar-disabled\">\n <thy-icon class=\"thy-avatar-disabled-icon\" thyIconName=\"ban\"></thy-icon>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyAvatarComponent } from './avatar.component';\nimport { AvatarPipes } from './avatar.pipe';\nimport { ThyAvatarService, ThyDefaultAvatarService } from './avatar.service';\nimport { ThyIconModule } from 'ngx-tethys/icon';\n\n@NgModule({\n declarations: [ThyAvatarComponent, AvatarPipes],\n imports: [CommonModule, ThyIconModule],\n providers: [\n {\n provide: ThyAvatarService,\n useClass: ThyDefaultAvatarService\n }\n ],\n exports: [ThyAvatarComponent, AvatarPipes]\n})\nexport class ThyAvatarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.ThyAvatarService","i4.AvatarShortNamePipe","i4.AvatarBgColorPipe","i4.AvatarSrcPipe","i1.AvatarShortNamePipe","i1.AvatarBgColorPipe","i1.AvatarSrcPipe"],"mappings":";;;;;;;;;MAGsB,gBAAgB,CAAA;AAAtC,IAAA,WAAA,GAAA;AACI,QAAA,IAAA,CAAA,oBAAoB,GAAG,CAAC,CAAA,WAAA,CAAa,CAAC,CAAC;KAU1C;AAAA,CAAA;AAGK,MAAO,uBAAwB,SAAQ,gBAAgB,CAAA;AACzD;;AAEG;IACH,kBAAkB,CAAC,GAAW,EAAE,IAAY,EAAA;AACxC,QAAA,OAAO,GAAG,CAAC;KACd;IAED,YAAY,CAAC,GAAW,EAAE,IAAY,EAAA;AAClC,QAAA,OAAO,GAAG,CAAC;KACd;AAED,IAAA,aAAa,CAAC,IAAY,EAAA;AACtB,QAAA,OAAO,IAAI,CAAC;KACf;;oHAdQ,uBAAuB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;wHAAv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AW,CAAC;iBAC7C,CAAA;;;ACjBD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-tethys-avatar.mjs","sources":["../../../src/avatar/avatar.service.ts","../../../src/avatar/avatar.pipe.ts","../../../src/avatar/avatar.component.ts","../../../src/avatar/avatar.component.html","../../../src/avatar/avatar-list/avatar-list.component.ts","../../../src/avatar/avatar-list/avatar-list.component.html","../../../src/avatar/avatar.module.ts","../../../src/avatar/ngx-tethys-avatar.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { SafeHtml } from '@angular/platform-browser';\n\nexport abstract class ThyAvatarService {\n ignoreAvatarSrcPaths = [`default.png`];\n\n /**\n * @deprecated the avatarSrcTransform method will be deprecated, please use srcTransform.\n */\n abstract avatarSrcTransform(src: string, size: number): string;\n\n abstract srcTransform(src: string, size: number): string;\n\n abstract nameTransform(name: string): string | SafeHtml;\n}\n\n@Injectable()\nexport class ThyDefaultAvatarService extends ThyAvatarService {\n /**\n * @deprecated the avatarSrcTransform method will be deprecated, please use srcTransform.\n */\n avatarSrcTransform(src: string, size: number): string {\n return src;\n }\n\n srcTransform(src: string, size: number): string {\n return src;\n }\n\n nameTransform(name: string): string | SafeHtml {\n return name;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { ThyAvatarService } from './avatar.service';\n\n/**\n * `\\u4e00`: https://www.compart.com/en/unicode/U+4E00\n * `\\u9fa5`: https://www.compart.com/en/unicode/U+9FA5\n */\nconst UNIFIED_IDEOGRAPHS_REGEX = /^[\\u4e00-\\u9fa5]+$/;\n\nconst SET_OF_LETTERS_REGEX = /^[a-zA-Z\\/ ]+$/;\n\n@Pipe({ name: 'avatarShortName' })\nexport class AvatarShortNamePipe implements PipeTransform {\n transform(name: string | null | undefined): string {\n if (!name) {\n return '';\n }\n\n name = name.trim();\n\n if (UNIFIED_IDEOGRAPHS_REGEX.test(name) && name.length > 2) {\n return name.slice(name.length - 2);\n }\n\n if (SET_OF_LETTERS_REGEX.test(name) && name.indexOf(' ') > 0) {\n const words: string[] = name.split(' ');\n return (words[0].slice(0, 1) + words[1].slice(0, 1)).toUpperCase();\n }\n\n return name.length > 2 ? name.slice(0, 2).toUpperCase() : name.toUpperCase();\n }\n}\n\n@Pipe({ name: 'avatarBgColor' })\nexport class AvatarBgColorPipe implements PipeTransform {\n transform(name: string) {\n if (!name) {\n return;\n }\n const colors = ['#56abfb', '#5dcfff', '#84e17e', '#73d897', '#ff9f73', '#fa8888', '#fb7fb7', '#9a7ef4', '#868af6'];\n const nameArray: string[] = name.split('');\n const code: number =\n name && name.length > 0\n ? nameArray.reduce(\n function(result, item) {\n result.value += item.charCodeAt(0);\n return result;\n },\n { value: 0 }\n ).value\n : 0;\n return {\n 'background-color': colors[code % 9]\n };\n }\n}\n\n@Pipe({ name: 'thyAvatarSrc' })\nexport class AvatarSrcPipe implements PipeTransform {\n constructor(private thyAvatarService: ThyAvatarService) {}\n transform(src: string, size: number) {\n return this.thyAvatarService.srcTransform\n ? this.thyAvatarService.srcTransform(src, size)\n : this.thyAvatarService.avatarSrcTransform(src, size);\n }\n}\n\nexport const AvatarPipes = [AvatarShortNamePipe, AvatarBgColorPipe, AvatarSrcPipe];\n","import { ChangeDetectionStrategy, Component, EventEmitter, HostBinding, Input, OnInit, Output } from '@angular/core';\nimport { SafeHtml } from '@angular/platform-browser';\nimport { coerceBooleanProperty, isString } from 'ngx-tethys/util';\nimport { useHostRenderer } from '@tethys/cdk/dom';\nimport { ThyAvatarService } from './avatar.service';\n\nconst sizeArray = [16, 22, 24, 28, 32, 36, 44, 48, 68, 110, 160];\n\nexport const DEFAULT_SIZE = 36;\n\nexport const thyAvatarSizeMap = {\n xxs: 22,\n xs: 24,\n sm: 32,\n md: 36,\n lg: 48\n};\n\n/** https://html.spec.whatwg.org/multipage/embedded-content.html#attr-img-loading */\nexport type ThyAvatarLoading = 'eager' | 'lazy';\n\n/** https://wicg.github.io/priority-hints/#idl-index */\nexport type ThyAvatarFetchPriority = 'high' | 'low' | 'auto';\n\n/**\n * 头像组件\n */\n@Component({\n selector: 'thy-avatar',\n templateUrl: './avatar.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ThyAvatarComponent implements OnInit {\n _src: string;\n _name: string;\n _size: number;\n _showRemove = false;\n\n public avatarSrc: string;\n public avatarName?: string;\n public avatarNameSafeHtml?: SafeHtml;\n\n @HostBinding('class.thy-avatar') _isAvatar = true;\n\n /**\n * * 已废弃,请使用 thyRemove\n * @deprecated\n */\n @Output() thyOnRemove = new EventEmitter();\n\n /**\n * 移除按钮的事件, 当 thyRemovable 为 true 时起作用\n */\n @Output() thyRemove = new EventEmitter();\n\n /**\n * 头像 img 加载 error 时触发\n */\n @Output() thyError: EventEmitter<Event> = new EventEmitter<Event>();\n\n /**\n * 是否展示人员名称\n * @default false\n */\n @Input() thyShowName: boolean;\n\n /**\n * 头像路径地址, 默认为全路径,如果不是全路径,可以通过自定义服务 ThyAvatarService,重写 srcTransform 方法实现转换\n *\n */\n @Input()\n set thySrc(value: string) {\n this._setAvatarSrc(value);\n }\n\n /**\n * 人员名称(可设置自定义名称,需通过自定义服务 ThyAvatarService,重写 nameTransform 方法去实现转换)\n */\n @Input()\n set thyName(value: string) {\n // this._name = value;\n this._setAvatarName(value);\n }\n\n /**\n * 头像大小\n * @type 16 | 22 | 24 | 28 | 32 | 36 | 44 | 48 | 68 | 110 | 160 | xxs(22px) | xs(24px) | sm(32px) | md(36px) | lg(48px)\n * @default md\n */\n @Input()\n set thySize(value: number | string) {\n if (thyAvatarSizeMap[value]) {\n this._setAvatarSize(thyAvatarSizeMap[value]);\n } else {\n this._setAvatarSize((value as number) * 1);\n }\n }\n\n /**\n * 已废弃,请使用 thyRemovable\n * @deprecated\n * @default false\n */\n @Input()\n set thyShowRemove(value: boolean) {\n this._showRemove = coerceBooleanProperty(value);\n }\n\n /**\n * 是否展示移除按钮\n * @default false\n */\n @Input()\n set thyRemovable(value: boolean) {\n this._showRemove = coerceBooleanProperty(value);\n }\n\n /**\n * 图片自定义类\n */\n @Input() thyImgClass: string;\n\n /**\n * 禁用\n * @default false\n */\n @Input() thyDisabled: boolean;\n\n /**\n * 图片加载策略\n * @type eager(立即加载) | lazy(延迟加载)\n */\n @Input() thyLoading?: ThyAvatarLoading;\n\n /**\n * 图片加载优先级\n * @type auto(默认) | high(高) | low(低)\n */\n @Input() thyFetchPriority?: ThyAvatarFetchPriority;\n\n private _setAvatarSize(size: number) {\n if (sizeArray.indexOf(size) > -1) {\n this._size = size;\n } else {\n this._size = this.findClosestSize(sizeArray, size);\n }\n this.hostRenderer.updateClass([`thy-avatar-${this._size}`]);\n }\n\n private findClosestSize(sizes: number[], value: number): number {\n let left = 0,\n right = sizes.length - 1,\n middle: number,\n result: number;\n\n while (left <= right) {\n middle = Math.floor((left + right) / 2);\n if (right - left <= 1) {\n result = sizes[right];\n break;\n }\n result = sizes[middle];\n if (result === value) {\n return value;\n } else if (result > value) {\n right = middle;\n } else {\n left = middle;\n }\n }\n return value - sizes[left] < sizes[right] - value ? sizes[left] : sizes[right];\n }\n\n private _setAvatarSrc(src: string) {\n if (src && this.thyAvatarService.ignoreAvatarSrcPaths.indexOf(src) < 0) {\n this._src = src;\n } else {\n this._src = null;\n }\n }\n\n private _setAvatarName(value: string) {\n const name = this.thyAvatarService.nameTransform(value);\n if (isString(name)) {\n this.avatarName = name as string;\n } else {\n this.avatarName = value;\n this.avatarNameSafeHtml = name;\n }\n }\n\n private hostRenderer = useHostRenderer();\n\n constructor(private thyAvatarService: ThyAvatarService) {}\n\n ngOnInit() {\n if (!this._size) {\n this._setAvatarSize(DEFAULT_SIZE);\n }\n this.hostRenderer.updateClass([`thy-avatar-${this._size}`]);\n }\n\n remove($event: Event) {\n this.thyOnRemove.emit($event);\n this.thyRemove.emit($event);\n }\n\n avatarImgError($event: Event) {\n this._setAvatarSrc(null);\n this.thyError.emit($event);\n }\n}\n","<img\n *ngIf=\"_src; else noSrc\"\n [src]=\"_src | thyAvatarSrc: _size\"\n class=\"avatar-avatar\"\n [ngClass]=\"thyImgClass\"\n alt=\"{{ avatarName || '' }}\"\n [attr.loading]=\"thyLoading\"\n [attr.fetchpriority]=\"thyFetchPriority\"\n (error)=\"avatarImgError($event)\"\n/>\n\n<ng-template #noSrc>\n <span class=\"avatar-default\" [ngStyle]=\"avatarName | avatarBgColor\">\n <div>{{ avatarName | avatarShortName }}</div>\n </span>\n</ng-template>\n\n<ng-template [ngIf]=\"thyShowName\">\n <div *ngIf=\"avatarNameSafeHtml; else noAvatarNameSafeHtml\" class=\"avatar-name\" [innerHtml]=\"avatarNameSafeHtml\"></div>\n <ng-template #noAvatarNameSafeHtml>\n <div class=\"avatar-name\">{{ avatarName }}</div>\n </ng-template>\n</ng-template>\n\n<a *ngIf=\"_showRemove\" (click)=\"remove($event)\" href=\"javascript:;\" class=\"remove-link avatar-remove\">\n <thy-icon class=\"remove-link-icon\" thyIconName=\"close-circle-bold-fill\"></thy-icon>\n</a>\n<div *ngIf=\"thyDisabled\" class=\"thy-avatar-disabled\">\n <thy-icon class=\"thy-avatar-disabled-icon\" thyIconName=\"ban\"></thy-icon>\n</div>\n","import {\n AfterContentInit,\n AfterViewInit,\n Component,\n ContentChild,\n ContentChildren,\n ElementRef,\n EventEmitter,\n HostBinding,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n Output,\n QueryList,\n SimpleChanges,\n TemplateRef,\n ViewChild\n} from '@angular/core';\nimport { InputBoolean, UpdateHostClassService } from 'ngx-tethys/core';\nimport { merge, Observable, of, Subject } from 'rxjs';\nimport { debounceTime, take, takeUntil } from 'rxjs/operators';\nimport { DEFAULT_SIZE, ThyAvatarComponent } from '../avatar.component';\nimport { SafeAny } from 'ngx-tethys/types';\n\nconst AVATAR_ITEM_SPACE = 6;\n\nconst OVERLAP_AVATAR_ITEM_SPACE = -8;\n\nexport const enum ThyAvatarListMode {\n overlap = 'overlap',\n default = 'default'\n}\n/**\n * 头像列表组件\n */\n@Component({\n selector: 'thy-avatar-list',\n templateUrl: `./avatar-list.component.html`,\n host: {\n class: 'thy-avatar-list',\n '[style.margin-left.px]': 'overlapMode ? -avatarOverlapSpace : 0'\n },\n providers: [UpdateHostClassService]\n})\nexport class ThyAvatarListComponent implements OnChanges, OnDestroy, AfterContentInit, AfterViewInit {\n @HostBinding('class.thy-avatar-list-overlap') overlapMode = false;\n\n public avatarItems: ThyAvatarComponent[] = [];\n\n public avatarRenderItems: ThyAvatarComponent[] = [];\n\n public avatarSpace = AVATAR_ITEM_SPACE;\n\n public avatarOverlapSpace = OVERLAP_AVATAR_ITEM_SPACE;\n\n public get more() {\n return this.avatarItems.length - this.avatarRenderItems.length;\n }\n\n private ngUnsubscribe$ = new Subject<void>();\n\n private avatarList: QueryList<ThyAvatarComponent>;\n\n /**\n * 展示方式\n * @type 'overlap'| 'default'\n * @default default\n */\n @Input()\n set thyMode(value: ThyAvatarListMode) {\n this.overlapMode = value === ThyAvatarListMode.overlap;\n }\n\n /**\n * 响应式,自动计算宽度存放 avatar\n * @default false\n */\n @Input()\n @InputBoolean()\n thyResponsive = false;\n\n /**\n * 列表组件允许展示 avatar 最大数量\n */\n @Input() thyMax: number;\n\n /**\n * 头像大小\n * @type 22 | 24 | 28 | 32 | 36 | 44 | 48 | 68 | 110 | 160 | xxs(22px) | xs(24px) | sm(32px) | md(36px) | lg(48px)\n * @default 36\n */\n @Input() thyAvatarSize: number | string = DEFAULT_SIZE;\n\n /**\n * 是否展示移除按钮\n * @type boolean\n * @default false\n */\n @Input() thyRemovable = false;\n\n /**\n * avatar 移除按钮事件\n */\n @Output() thyRemove = new EventEmitter<string>();\n\n /**\n * append 自定义操作\n */\n @ContentChild('append', { static: false }) append: TemplateRef<SafeAny>;\n\n /**\n * @private\n */\n @ContentChildren(ThyAvatarComponent)\n private set avatarComponents(value: QueryList<ThyAvatarComponent>) {\n this.avatarItems = value.toArray();\n this.avatarList = value;\n }\n\n @ViewChild('appendContent') appendContent: ElementRef<HTMLInputElement>;\n\n constructor(private elementRef: ElementRef, private ngZone: NgZone) {}\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes.thyAvatarSize && !changes.thyAvatarSize.firstChange) {\n this.setAvatarSize();\n }\n\n if (changes.thyMax && !changes.thyMax.firstChange) {\n this.getRenderAvatar();\n }\n }\n\n ngAfterContentInit() {\n this.setAvatarSize();\n }\n\n ngAfterViewInit() {\n this.ngZone.onStable.pipe(take(1)).subscribe(() => {\n this.getRenderAvatar();\n });\n\n if (this.thyResponsive) {\n this.ngZone.runOutsideAngular(() => {\n merge(this.avatarList.changes, this.createResizeObserver(this.elementRef.nativeElement))\n .pipe(debounceTime(100), takeUntil(this.ngUnsubscribe$))\n .subscribe(() => {\n this.getRenderAvatar();\n });\n });\n }\n }\n\n private setAvatarSize() {\n this.avatarItems.forEach((avatar: ThyAvatarComponent) => {\n avatar.thySize = this.thyAvatarSize;\n });\n this.getRenderAvatar();\n }\n\n public remove(name: string) {\n this.thyRemove.emit(name);\n }\n\n private getRenderAvatar() {\n const endIndex = this.getEndIndex();\n const max = this.thyMax || this.avatarItems.length;\n const showCount = Math.max(0, Math.min(max, endIndex));\n this.avatarRenderItems = this.avatarItems.slice(0, showCount);\n }\n\n private getEndIndex() {\n if (this.avatarItems.length) {\n const space = this.overlapMode ? this.avatarOverlapSpace : this.avatarSpace;\n const avatarWidth = this.avatarItems[0]._size + space;\n const wrapperWidth = this.elementRef.nativeElement.offsetWidth;\n const appendWidth = this.appendContent ? this.appendContent.nativeElement.offsetWidth : 0;\n const lastAvatarSpecialSpace = this.overlapMode ? space : 0; // overlap 模式下最后一个 avatar 元素占位比其他多 this.avatarSpace 个 px\n return Math.floor((wrapperWidth - appendWidth + lastAvatarSpecialSpace) / avatarWidth);\n } else {\n return 0;\n }\n }\n\n private createResizeObserver(element: HTMLElement) {\n return typeof ResizeObserver === 'undefined'\n ? of(null)\n : new Observable(observer => {\n const resize = new ResizeObserver(entries => {\n this.ngZone.run(() => {\n observer.next(entries);\n });\n });\n resize.observe(element);\n return () => {\n resize.disconnect();\n };\n });\n }\n\n ngOnDestroy() {\n this.ngUnsubscribe$.next();\n this.ngUnsubscribe$.complete();\n }\n}\n","<ng-template>\n <ng-content></ng-content>\n</ng-template>\n\n<ng-container *ngFor=\"let avatar of avatarRenderItems; index as index; last as isLast\">\n <div\n class=\"thy-avatar-content\"\n [ngStyle]=\"overlapMode ? { 'margin-left.px': avatarOverlapSpace } : { 'margin-right.px': isLast ? 0 : avatarSpace }\"\n >\n <thy-avatar\n [thySrc]=\"avatar._src\"\n [thyName]=\"avatar.avatarName\"\n [thySize]=\"avatar._size\"\n [thyRemovable]=\"overlapMode ? false : thyRemovable\"\n [thyImgClass]=\"avatar.thyImgClass\"\n [thyDisabled]=\"avatar.thyDisabled\"\n [thyLoading]=\"avatar.thyLoading\"\n [thyFetchPriority]=\"avatar.thyFetchPriority\"\n (thyRemove)=\"remove(avatar.avatarName)\"\n ></thy-avatar>\n <span *ngIf=\"isLast && more && thyResponsive\" ngClass=\"more-{{ avatar._size }}\">+{{ more }} </span>\n </div>\n</ng-container>\n\n<div #appendContent *ngIf=\"append\" [ngStyle]=\"{ 'padding-left.px': avatarSpace }\">\n <ng-container [ngTemplateOutlet]=\"append\"></ng-container>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ThyAvatarComponent } from './avatar.component';\nimport { AvatarPipes } from './avatar.pipe';\nimport { ThyAvatarService, ThyDefaultAvatarService } from './avatar.service';\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyAvatarListComponent } from './avatar-list/avatar-list.component';\n\n@NgModule({\n declarations: [ThyAvatarComponent, ThyAvatarListComponent, AvatarPipes],\n imports: [CommonModule, ThyIconModule],\n providers: [\n {\n provide: ThyAvatarService,\n useClass: ThyDefaultAvatarService\n }\n ],\n exports: [ThyAvatarComponent, ThyAvatarListComponent, AvatarPipes]\n})\nexport class ThyAvatarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.ThyAvat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C,aAAA,CAAA,EAAA,CAAA,CAAA;AAE3C,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EARb,SAAA,EAAA;AACP,QAAA;AACI,YAAA,OAAO,EAAE,gBAAgB;AACzB,YAAA,QAAQ,EAAE,uBAAuB;AACpC,SAAA;KACJ,EANS,OAAA,EAAA,CAAA,YAAY,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA;2FAS5B,eAAe,EAAA,UAAA,EAAA,CAAA;kBAX3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE,CAAC,kBAAkB,EAAE,sBAAsB,EAAE,WAAW,CAAC;AACvE,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;AACtC,oBAAA,SAAS,EAAE;AACP,wBAAA;AACI,4BAAA,OAAO,EAAE,gBAAgB;AACzB,4BAAA,QAAQ,EAAE,uBAAuB;AACpC,yBAAA;AACJ,qBAAA;AACD,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,sBAAsB,EAAE,WAAW,CAAC;iBACrE,CAAA;;;AClBD;;AAEG;;;;"}
@@ -15,7 +15,7 @@ class ThyCommentComponent {
15
15
  }
16
16
  }
17
17
  ThyCommentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThyCommentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
18
- ThyCommentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: ThyCommentComponent, selector: "thy-comment", inputs: { thyAuthor: "thyAuthor", thyDatetime: "thyDatetime", thyAvatar: "thyAvatar" }, host: { classAttribute: "thy-comment" }, ngImport: i0, template: "<div class=\"thy-comment-inner\">\n <ng-container *ngIf=\"isTemplateRef(this.thyAvatar); else defaultAvatar\">\n <ng-template [ngTemplateOutlet]=\"thyAvatar\"></ng-template>\n </ng-container>\n\n <div class=\"thy-comment-body\">\n <div class=\"thy-comment-body-author\">\n <span class=\"thy-comment-body-author-name\">\n <ng-container *thyStringOrTemplateOutlet=\"thyAuthor\"></ng-container>\n </span>\n <span class=\"thy-comment-body-author-time\">\n <ng-container *thyStringOrTemplateOutlet=\"thyDatetime\"></ng-container>\n </span>\n </div>\n <ng-content select=\"[thyCommentContent]\"></ng-content>\n </div>\n <ng-content select=\"[thyCommentActions]\"></ng-content>\n</div>\n<div class=\"thy-comment-nested\">\n <ng-content></ng-content>\n</div>\n\n<ng-template #defaultAvatar>\n <ng-container *ngIf=\"thyAuthor || thyAvatar\">\n <div class=\"thy-comment-avatar\">\n <thy-avatar [thyName]=\"!isTemplateRef(thyAuthor) && thyAuthor\" thySize=\"28\" [thySrc]=\"thyAvatar || ''\"></thy-avatar>\n </div>\n </ng-container>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.ThyStringOrTemplateOutletDirective, selector: "[thyStringOrTemplateOutlet]", inputs: ["thyStringOrTemplateOutletContext", "thyStringOrTemplateOutlet"], exportAs: ["thyStringOrTemplateOutlet"] }, { kind: "component", type: i3.ThyAvatarComponent, selector: "thy-avatar", inputs: ["thyShowName", "thySrc", "thyName", "thySize", "thyShowRemove", "thyImgClass", "thyDisabled", "thyLoading", "thyFetchPriority"], outputs: ["thyOnRemove", "thyError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
18
+ ThyCommentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: ThyCommentComponent, selector: "thy-comment", inputs: { thyAuthor: "thyAuthor", thyDatetime: "thyDatetime", thyAvatar: "thyAvatar" }, host: { classAttribute: "thy-comment" }, ngImport: i0, template: "<div class=\"thy-comment-inner\">\n <ng-container *ngIf=\"isTemplateRef(this.thyAvatar); else defaultAvatar\">\n <ng-template [ngTemplateOutlet]=\"thyAvatar\"></ng-template>\n </ng-container>\n\n <div class=\"thy-comment-body\">\n <div class=\"thy-comment-body-author\">\n <span class=\"thy-comment-body-author-name\">\n <ng-container *thyStringOrTemplateOutlet=\"thyAuthor\"></ng-container>\n </span>\n <span class=\"thy-comment-body-author-time\">\n <ng-container *thyStringOrTemplateOutlet=\"thyDatetime\"></ng-container>\n </span>\n </div>\n <ng-content select=\"[thyCommentContent]\"></ng-content>\n </div>\n <ng-content select=\"[thyCommentActions]\"></ng-content>\n</div>\n<div class=\"thy-comment-nested\">\n <ng-content></ng-content>\n</div>\n\n<ng-template #defaultAvatar>\n <ng-container *ngIf=\"thyAuthor || thyAvatar\">\n <div class=\"thy-comment-avatar\">\n <thy-avatar [thyName]=\"!isTemplateRef(thyAuthor) && thyAuthor\" thySize=\"28\" [thySrc]=\"thyAvatar || ''\"></thy-avatar>\n </div>\n </ng-container>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.ThyStringOrTemplateOutletDirective, selector: "[thyStringOrTemplateOutlet]", inputs: ["thyStringOrTemplateOutletContext", "thyStringOrTemplateOutlet"], exportAs: ["thyStringOrTemplateOutlet"] }, { kind: "component", type: i3.ThyAvatarComponent, selector: "thy-avatar", inputs: ["thyShowName", "thySrc", "thyName", "thySize", "thyShowRemove", "thyRemovable", "thyImgClass", "thyDisabled", "thyLoading", "thyFetchPriority"], outputs: ["thyOnRemove", "thyRemove", "thyError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
19
19
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThyCommentComponent, decorators: [{
20
20
  type: Component,
21
21
  args: [{ selector: 'thy-comment', host: {
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-tethys-comment.mjs","sources":["../../../src/comment/comment.component.ts","../../../src/comment/comment.component.html","../../../src/comment/comment-content.directive.ts","../../../src/comment/comment-actions.directive.ts","../../../src/comment/comment.module.ts","../../../src/comment/ngx-tethys-comment.ts"],"sourcesContent":["import { isTemplateRef } from 'ngx-tethys/util';\nimport { SafeAny } from 'ngx-tethys/types';\nimport { ChangeDetectionStrategy, Component, Input, TemplateRef, OnInit } from '@angular/core';\nimport { InputBoolean } from 'ngx-tethys/core';\n@Component({\n selector: 'thy-comment',\n templateUrl: './comment.component.html',\n host: {\n class: 'thy-comment'\n },\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ThyCommentComponent {\n /**\n * 展示评论作者\n */\n @Input() thyAuthor?: string | TemplateRef<SafeAny>;\n\n /**\n * 展示评论时间\n */\n @Input() thyDatetime?: string | TemplateRef<SafeAny>;\n\n /**\n * 展示评论作者头像\n */\n @Input() thyAvatar?: string | TemplateRef<SafeAny>;\n\n isTemplateRef = isTemplateRef;\n}\n","<div class=\"thy-comment-inner\">\n <ng-container *ngIf=\"isTemplateRef(this.thyAvatar); else defaultAvatar\">\n <ng-template [ngTemplateOutlet]=\"thyAvatar\"></ng-template>\n </ng-container>\n\n <div class=\"thy-comment-body\">\n <div class=\"thy-comment-body-author\">\n <span class=\"thy-comment-body-author-name\">\n <ng-container *thyStringOrTemplateOutlet=\"thyAuthor\"></ng-container>\n </span>\n <span class=\"thy-comment-body-author-time\">\n <ng-container *thyStringOrTemplateOutlet=\"thyDatetime\"></ng-container>\n </span>\n </div>\n <ng-content select=\"[thyCommentContent]\"></ng-content>\n </div>\n <ng-content select=\"[thyCommentActions]\"></ng-content>\n</div>\n<div class=\"thy-comment-nested\">\n <ng-content></ng-content>\n</div>\n\n<ng-template #defaultAvatar>\n <ng-container *ngIf=\"thyAuthor || thyAvatar\">\n <div class=\"thy-comment-avatar\">\n <thy-avatar [thyName]=\"!isTemplateRef(thyAuthor) && thyAuthor\" thySize=\"28\" [thySrc]=\"thyAvatar || ''\"></thy-avatar>\n </div>\n </ng-container>\n</ng-template>\n","import { Directive } from '@angular/core';\n\n/**\n * @private\n */\n@Directive({\n selector: '[thyCommentContent]',\n exportAs: 'thyCommentContent',\n host: { class: 'thy-comment-content' }\n})\nexport class ThyCommentContentDirective {}\n","import { Directive } from '@angular/core';\n\n/**\n * @private\n */\n@Directive({\n selector: '[thyCommentActions]',\n exportAs: 'thyCommentActions',\n host: { class: 'thy-comment-actions' }\n})\nexport class ThyCommentActionsDirective {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ThySharedModule } from 'ngx-tethys/shared';\nimport { ThyCommentComponent } from './comment.component';\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyAvatarModule } from 'ngx-tethys/avatar';\nimport { ThyCommentContentDirective } from './comment-content.directive';\nimport { ThyCommentActionsDirective } from './comment-actions.directive';\n@NgModule({\n declarations: [ThyCommentComponent, ThyCommentContentDirective, ThyCommentActionsDirective],\n imports: [CommonModule, ThySharedModule, ThyIconModule, ThyAvatarModule],\n exports: [ThyCommentComponent, ThyCommentContentDirective, ThyCommentActionsDirective],\n providers: []\n})\nexport class ThyCommentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAYa,mBAAmB,CAAA;AARhC,IAAA,WAAA,GAAA;AAwBI,QAAA,IAAa,CAAA,aAAA,GAAG,aAAa,CAAC;KACjC;;gHAjBY,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAA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KY,gBAAgB,CAAA;;6GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAhB,gBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,iBALV,mBAAmB,EAAE,0BAA0B,EAAE,0BAA0B,aAChF,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,CAAA,EAAA,OAAA,EAAA,CAC7D,mBAAmB,EAAE,0BAA0B,EAAE,0BAA0B,CAAA,EAAA,CAAA,CAAA;AAG5E,gBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAJf,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA;2FAI9D,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAN5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE,CAAC,mBAAmB,EAAE,0BAA0B,EAAE,0BAA0B,CAAC;oBAC3F,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,CAAC;AACxE,oBAAA,OAAO,EAAE,CAAC,mBAAmB,EAAE,0BAA0B,EAAE,0BAA0B,CAAC;AACtF,oBAAA,SAAS,EAAE,EAAE;iBAChB,CAAA;;;ACbD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-tethys-comment.mjs","sources":["../../../src/comment/comment.component.ts","../../../src/comment/comment.component.html","../../../src/comment/comment-content.directive.ts","../../../src/comment/comment-actions.directive.ts","../../../src/comment/comment.module.ts","../../../src/comment/ngx-tethys-comment.ts"],"sourcesContent":["import { isTemplateRef } from 'ngx-tethys/util';\nimport { SafeAny } from 'ngx-tethys/types';\nimport { ChangeDetectionStrategy, Component, Input, TemplateRef, OnInit } from '@angular/core';\nimport { InputBoolean } from 'ngx-tethys/core';\n@Component({\n selector: 'thy-comment',\n templateUrl: './comment.component.html',\n host: {\n class: 'thy-comment'\n },\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ThyCommentComponent {\n /**\n * 展示评论作者\n */\n @Input() thyAuthor?: string | TemplateRef<SafeAny>;\n\n /**\n * 展示评论时间\n */\n @Input() thyDatetime?: string | TemplateRef<SafeAny>;\n\n /**\n * 展示评论作者头像\n */\n @Input() thyAvatar?: string | TemplateRef<SafeAny>;\n\n isTemplateRef = isTemplateRef;\n}\n","<div class=\"thy-comment-inner\">\n <ng-container *ngIf=\"isTemplateRef(this.thyAvatar); else defaultAvatar\">\n <ng-template [ngTemplateOutlet]=\"thyAvatar\"></ng-template>\n </ng-container>\n\n <div class=\"thy-comment-body\">\n <div class=\"thy-comment-body-author\">\n <span class=\"thy-comment-body-author-name\">\n <ng-container *thyStringOrTemplateOutlet=\"thyAuthor\"></ng-container>\n </span>\n <span class=\"thy-comment-body-author-time\">\n <ng-container *thyStringOrTemplateOutlet=\"thyDatetime\"></ng-container>\n </span>\n </div>\n <ng-content select=\"[thyCommentContent]\"></ng-content>\n </div>\n <ng-content select=\"[thyCommentActions]\"></ng-content>\n</div>\n<div class=\"thy-comment-nested\">\n <ng-content></ng-content>\n</div>\n\n<ng-template #defaultAvatar>\n <ng-container *ngIf=\"thyAuthor || thyAvatar\">\n <div class=\"thy-comment-avatar\">\n <thy-avatar [thyName]=\"!isTemplateRef(thyAuthor) && thyAuthor\" thySize=\"28\" [thySrc]=\"thyAvatar || ''\"></thy-avatar>\n </div>\n </ng-container>\n</ng-template>\n","import { Directive } from '@angular/core';\n\n/**\n * @private\n */\n@Directive({\n selector: '[thyCommentContent]',\n exportAs: 'thyCommentContent',\n host: { class: 'thy-comment-content' }\n})\nexport class ThyCommentContentDirective {}\n","import { Directive } from '@angular/core';\n\n/**\n * @private\n */\n@Directive({\n selector: '[thyCommentActions]',\n exportAs: 'thyCommentActions',\n host: { class: 'thy-comment-actions' }\n})\nexport class ThyCommentActionsDirective {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ThySharedModule } from 'ngx-tethys/shared';\nimport { ThyCommentComponent } from './comment.component';\nimport { ThyIconModule } from 'ngx-tethys/icon';\nimport { ThyAvatarModule } from 'ngx-tethys/avatar';\nimport { ThyCommentContentDirective } from './comment-content.directive';\nimport { ThyCommentActionsDirective } from './comment-actions.directive';\n@NgModule({\n declarations: [ThyCommentComponent, ThyCommentContentDirective, ThyCommentActionsDirective],\n imports: [CommonModule, ThySharedModule, ThyIconModule, ThyAvatarModule],\n exports: [ThyCommentComponent, ThyCommentContentDirective, ThyCommentActionsDirective],\n providers: []\n})\nexport class ThyCommentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAYa,mBAAmB,CAAA;AARhC,IAAA,WAAA,GAAA;AAwBI,QAAA,IAAa,CAAA,aAAA,GAAG,aAAa,CAAC;KACjC;;gHAjBY,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAnB,mBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mBAAmB,oLCZhC,klCA6BA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,IAAA,EAAA,QAAA,EAAA,QAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WA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0B,aAChF,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,CAAA,EAAA,OAAA,EAAA,CAC7D,mBAAmB,EAAE,0BAA0B,EAAE,0BAA0B,CAAA,EAAA,CAAA,CAAA;AAG5E,gBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAJf,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA;2FAI9D,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAN5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE,CAAC,mBAAmB,EAAE,0BAA0B,EAAE,0BAA0B,CAAC;oBAC3F,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,CAAC;AACxE,oBAAA,OAAO,EAAE,CAAC,mBAAmB,EAAE,0BAA0B,EAAE,0BAA0B,CAAC;AACtF,oBAAA,SAAS,EAAE,EAAE;iBAChB,CAAA;;;ACbD;;AAEG;;;;"}
@@ -424,7 +424,7 @@ class ThyListItemMetaComponent {
424
424
  }
425
425
  }
426
426
  ThyListItemMetaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThyListItemMetaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
427
- ThyListItemMetaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: ThyListItemMetaComponent, selector: "thy-list-item-meta,[thy-list-item-meta]", inputs: { thyAvatar: "thyAvatar", thyTitle: "thyTitle", thyDescription: "thyDescription" }, host: { properties: { "class": "this.className" } }, queries: [{ propertyName: "avatarTemplateRef", first: true, predicate: ["metaAvatar"], descendants: true }, { propertyName: "titleTemplateRef", first: true, predicate: ["metaTitle"], descendants: true }, { propertyName: "descriptionTemplateRef", first: true, predicate: ["metaDescription"], descendants: true }], ngImport: i0, template: "<div class=\"thy-list-item-meta-avatar\">\n <ng-container *ngIf=\"thyAvatar; else avatarTemplateRef\">\n <thy-avatar [thySrc]=\"thyAvatar\"></thy-avatar>\n </ng-container>\n</div>\n<div class=\"thy-list-item-meta-content\">\n <div class=\"thy-list-item-meta-title\">\n <ng-container *ngIf=\"thyTitle; else titleTemplateRef\">{{ thyTitle }}</ng-container>\n </div>\n <div class=\"thy-list-item-meta-description\">\n <ng-container *ngIf=\"thyDescription; else descriptionTemplateRef\">{{ thyDescription }}</ng-container>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.ThyAvatarComponent, selector: "thy-avatar", inputs: ["thyShowName", "thySrc", "thyName", "thySize", "thyShowRemove", "thyImgClass", "thyDisabled", "thyLoading", "thyFetchPriority"], outputs: ["thyOnRemove", "thyError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
427
+ ThyListItemMetaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: ThyListItemMetaComponent, selector: "thy-list-item-meta,[thy-list-item-meta]", inputs: { thyAvatar: "thyAvatar", thyTitle: "thyTitle", thyDescription: "thyDescription" }, host: { properties: { "class": "this.className" } }, queries: [{ propertyName: "avatarTemplateRef", first: true, predicate: ["metaAvatar"], descendants: true }, { propertyName: "titleTemplateRef", first: true, predicate: ["metaTitle"], descendants: true }, { propertyName: "descriptionTemplateRef", first: true, predicate: ["metaDescription"], descendants: true }], ngImport: i0, template: "<div class=\"thy-list-item-meta-avatar\">\n <ng-container *ngIf=\"thyAvatar; else avatarTemplateRef\">\n <thy-avatar [thySrc]=\"thyAvatar\"></thy-avatar>\n </ng-container>\n</div>\n<div class=\"thy-list-item-meta-content\">\n <div class=\"thy-list-item-meta-title\">\n <ng-container *ngIf=\"thyTitle; else titleTemplateRef\">{{ thyTitle }}</ng-container>\n </div>\n <div class=\"thy-list-item-meta-description\">\n <ng-container *ngIf=\"thyDescription; else descriptionTemplateRef\">{{ thyDescription }}</ng-container>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.ThyAvatarComponent, selector: "thy-avatar", inputs: ["thyShowName", "thySrc", "thyName", "thySize", "thyShowRemove", "thyRemovable", "thyImgClass", "thyDisabled", "thyLoading", "thyFetchPriority"], outputs: ["thyOnRemove", "thyRemove", "thyError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
428
428
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThyListItemMetaComponent, decorators: [{
429
429
  type: Component,
430
430
  args: [{ selector: 'thy-list-item-meta,[thy-list-item-meta]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"thy-list-item-meta-avatar\">\n <ng-container *ngIf=\"thyAvatar; else avatarTemplateRef\">\n <thy-avatar [thySrc]=\"thyAvatar\"></thy-avatar>\n </ng-container>\n</div>\n<div class=\"thy-list-item-meta-content\">\n <div class=\"thy-list-item-meta-title\">\n <ng-container *ngIf=\"thyTitle; else titleTemplateRef\">{{ thyTitle }}</ng-container>\n </div>\n <div class=\"thy-list-item-meta-description\">\n <ng-container *ngIf=\"thyDescription; else descriptionTemplateRef\">{{ thyDescription }}</ng-container>\n </div>\n</div>\n" }]