@fundamental-ngx/core 0.36.0-rc.19 → 0.36.0-rc.21
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/action-bar/package.json +1 -1
- package/action-sheet/package.json +1 -1
- package/alert/package.json +1 -1
- package/avatar/package.json +1 -1
- package/avatar-group/package.json +1 -1
- package/bar/package.json +1 -1
- package/breadcrumb/package.json +1 -1
- package/busy-indicator/package.json +1 -1
- package/button/package.json +1 -1
- package/calendar/package.json +1 -1
- package/card/package.json +1 -1
- package/carousel/package.json +1 -1
- package/checkbox/package.json +1 -1
- package/combobox/package.json +1 -1
- package/content-density/package.json +2 -2
- package/date-picker/package.json +1 -1
- package/datetime/package.json +1 -1
- package/datetime-picker/package.json +1 -1
- package/dialog/package.json +1 -1
- package/dynamic-page/package.json +1 -1
- package/dynamic-side-content/package.json +1 -1
- package/esm2020/feed-list-item/components/item/feed-list-item.component.mjs +23 -13
- package/esm2020/feed-list-item/components/list/feed-list.component.mjs +5 -1
- package/esm2020/feed-list-item/feed-list-item.module.mjs +4 -5
- package/esm2020/utils/directives/truncate/truncate.directive.mjs +27 -96
- package/esm2020/utils/pipes/pipe.module.mjs +33 -4
- package/esm2020/utils/pipes/truncate.pipe.mjs +16 -0
- package/esm2020/utils/public_api.mjs +2 -1
- package/facets/package.json +1 -1
- package/feed-input/package.json +1 -1
- package/feed-list-item/components/item/feed-list-item.component.d.ts +6 -6
- package/feed-list-item/esm2020/components/item/feed-list-item.component.mjs +23 -13
- package/feed-list-item/esm2020/components/list/feed-list.component.mjs +5 -1
- package/feed-list-item/esm2020/feed-list-item.module.mjs +4 -5
- package/feed-list-item/feed-list-item.module.d.ts +1 -1
- package/feed-list-item/fesm2015/fundamental-ngx-core-feed-list-item.mjs +29 -15
- package/feed-list-item/fesm2015/fundamental-ngx-core-feed-list-item.mjs.map +1 -1
- package/feed-list-item/fesm2020/fundamental-ngx-core-feed-list-item.mjs +29 -15
- package/feed-list-item/fesm2020/fundamental-ngx-core-feed-list-item.mjs.map +1 -1
- package/feed-list-item/package.json +1 -1
- package/fesm2015/fundamental-ngx-core-feed-list-item.mjs +29 -15
- package/fesm2015/fundamental-ngx-core-feed-list-item.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-utils.mjs +71 -96
- package/fesm2015/fundamental-ngx-core-utils.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-feed-list-item.mjs +29 -15
- package/fesm2020/fundamental-ngx-core-feed-list-item.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-utils.mjs +71 -96
- package/fesm2020/fundamental-ngx-core-utils.mjs.map +1 -1
- package/file-uploader/package.json +1 -1
- package/fixed-card-layout/package.json +1 -1
- package/flexible-column-layout/package.json +1 -1
- package/form/package.json +1 -1
- package/formatted-text/package.json +1 -1
- package/grid-list/package.json +1 -1
- package/icon/package.json +1 -1
- package/illustrated-message/package.json +1 -1
- package/infinite-scroll/package.json +1 -1
- package/info-label/package.json +1 -1
- package/inline-help/package.json +1 -1
- package/input-group/package.json +1 -1
- package/layout-grid/package.json +1 -1
- package/layout-panel/package.json +1 -1
- package/link/package.json +1 -1
- package/list/package.json +1 -1
- package/menu/package.json +1 -1
- package/message-box/package.json +1 -1
- package/message-strip/package.json +1 -1
- package/message-toast/package.json +1 -1
- package/micro-process-flow/package.json +1 -1
- package/mobile-mode/package.json +1 -1
- package/multi-input/package.json +1 -1
- package/nested-list/package.json +1 -1
- package/notification/package.json +1 -1
- package/object-identifier/package.json +1 -1
- package/object-marker/package.json +1 -1
- package/object-number/package.json +1 -1
- package/object-status/package.json +1 -1
- package/overflow-layout/package.json +4 -4
- package/package.json +2 -2
- package/pagination/package.json +1 -1
- package/panel/package.json +1 -1
- package/popover/package.json +1 -1
- package/product-switch/package.json +1 -1
- package/progress-indicator/package.json +1 -1
- package/quick-view/package.json +1 -1
- package/radio/package.json +1 -1
- package/rating-indicator/package.json +1 -1
- package/resizable-card-layout/package.json +1 -1
- package/scroll-spy/package.json +1 -1
- package/scrollbar/package.json +1 -1
- package/segmented-button/package.json +1 -1
- package/select/package.json +1 -1
- package/shared/package.json +1 -1
- package/shellbar/package.json +1 -1
- package/side-navigation/package.json +1 -1
- package/slider/package.json +1 -1
- package/split-button/package.json +1 -1
- package/splitter/package.json +1 -1
- package/status-indicator/package.json +1 -1
- package/step-input/package.json +1 -1
- package/switch/package.json +1 -1
- package/table/package.json +1 -1
- package/tabs/package.json +1 -1
- package/text/package.json +1 -1
- package/theming/package.json +1 -1
- package/tile/package.json +1 -1
- package/time/package.json +1 -1
- package/time-picker/package.json +1 -1
- package/timeline/package.json +1 -1
- package/title/package.json +1 -1
- package/token/package.json +1 -1
- package/toolbar/package.json +1 -1
- package/tree/package.json +1 -1
- package/upload-collection/package.json +1 -1
- package/utils/directives/truncate/truncate.directive.d.ts +21 -51
- package/utils/esm2020/directives/truncate/truncate.directive.mjs +27 -96
- package/utils/esm2020/pipes/pipe.module.mjs +33 -4
- package/utils/esm2020/pipes/truncate.pipe.mjs +16 -0
- package/utils/esm2020/public_api.mjs +2 -1
- package/utils/fesm2015/fundamental-ngx-core-utils.mjs +71 -96
- package/utils/fesm2015/fundamental-ngx-core-utils.mjs.map +1 -1
- package/utils/fesm2020/fundamental-ngx-core-utils.mjs +71 -96
- package/utils/fesm2020/fundamental-ngx-core-utils.mjs.map +1 -1
- package/utils/package.json +1 -1
- package/utils/pipes/pipe.module.d.ts +2 -1
- package/utils/pipes/truncate.pipe.d.ts +7 -0
- package/utils/public_api.d.ts +1 -0
- package/vertical-navigation/package.json +1 -1
- package/wizard/package.json +1 -1
|
@@ -8,7 +8,7 @@ import * as i2 from '@fundamental-ngx/core/formatted-text';
|
|
|
8
8
|
import { FormattedTextModule } from '@fundamental-ngx/core/formatted-text';
|
|
9
9
|
import { __decorate, __metadata } from 'tslib';
|
|
10
10
|
import * as i4 from '@fundamental-ngx/core/utils';
|
|
11
|
-
import { applyCssClass, PipeModule
|
|
11
|
+
import { applyCssClass, PipeModule } from '@fundamental-ngx/core/utils';
|
|
12
12
|
import * as i5 from '@fundamental-ngx/i18n';
|
|
13
13
|
import { I18nModule } from '@fundamental-ngx/i18n';
|
|
14
14
|
|
|
@@ -19,9 +19,8 @@ const CSS_CLASS_NAME = {
|
|
|
19
19
|
|
|
20
20
|
class FeedListItemComponent {
|
|
21
21
|
/** @hidden */
|
|
22
|
-
constructor(_elementRef
|
|
22
|
+
constructor(_elementRef) {
|
|
23
23
|
this._elementRef = _elementRef;
|
|
24
|
-
this._changeDetectorRef = _changeDetectorRef;
|
|
25
24
|
/**
|
|
26
25
|
* Sets the `aria-label` attribute to the element.
|
|
27
26
|
*/
|
|
@@ -35,6 +34,7 @@ class FeedListItemComponent {
|
|
|
35
34
|
* Apply mobile view
|
|
36
35
|
*/
|
|
37
36
|
this.mobile = false;
|
|
37
|
+
this.maxCharsAtDefault = false;
|
|
38
38
|
/**
|
|
39
39
|
* Apply body class by default
|
|
40
40
|
*/
|
|
@@ -48,15 +48,30 @@ class FeedListItemComponent {
|
|
|
48
48
|
*/
|
|
49
49
|
this.hasMore = false;
|
|
50
50
|
}
|
|
51
|
+
setHasMore() {
|
|
52
|
+
if (this.text) {
|
|
53
|
+
this.hasMore = this.text.length > this.maxChars;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
setDefaultMaxChars() {
|
|
57
|
+
this.maxChars = this.mobile ? 300 : 500;
|
|
58
|
+
}
|
|
51
59
|
/** @hidden */
|
|
52
60
|
ngOnInit() {
|
|
53
61
|
this.buildComponentCssClass();
|
|
62
|
+
if (!this.maxChars) {
|
|
63
|
+
this.setDefaultMaxChars();
|
|
64
|
+
this.maxCharsAtDefault = true;
|
|
65
|
+
}
|
|
66
|
+
this.setHasMore();
|
|
54
67
|
}
|
|
55
68
|
/** @hidden */
|
|
56
69
|
ngOnChanges(changes) {
|
|
57
70
|
if ('class' in changes || 'isRichText' in changes) {
|
|
58
71
|
this.buildComponentCssClass();
|
|
59
72
|
}
|
|
73
|
+
this.maxCharsAtDefault && this.setDefaultMaxChars();
|
|
74
|
+
this.setHasMore();
|
|
60
75
|
}
|
|
61
76
|
/** CssClassBuilder interface implementation
|
|
62
77
|
* function must return single string
|
|
@@ -73,14 +88,9 @@ class FeedListItemComponent {
|
|
|
73
88
|
toggleTextView() {
|
|
74
89
|
this.isCollapsed = !this.isCollapsed;
|
|
75
90
|
}
|
|
76
|
-
/** @hidden */
|
|
77
|
-
checkCharCount(isMore) {
|
|
78
|
-
this.hasMore = isMore;
|
|
79
|
-
this._changeDetectorRef.detectChanges();
|
|
80
|
-
}
|
|
81
91
|
}
|
|
82
|
-
FeedListItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: FeedListItemComponent, deps: [{ token: i0.ElementRef }
|
|
83
|
-
FeedListItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: FeedListItemComponent, selector: "fd-feed-list-item", inputs: { class: "class", authorTitle: "authorTitle", authorLink: "authorLink", text: "text", maxChars: "maxChars", ariaLabel: "ariaLabel", ariaLabelledby: "ariaLabelledby", moreLabel: "moreLabel", lessLabel: "lessLabel", isRichText: "isRichText", mobile: "mobile" }, host: { properties: { "class.fd-feed-list__body": "this.isFeedListItemBody" } }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"mobile; then headerTmpl; else avatarContent\"></ng-container>\n<div class=\"fd-feed-list__content\">\n <ng-container *ngIf=\"!mobile\">\n <ng-container *ngTemplateOutlet=\"actionContent\"></ng-container>\n </ng-container>\n <p class=\"fd-feed-list__text\">\n <ng-container *ngIf=\"!isRichText\">\n <ng-container *ngTemplateOutlet=\"feedContent; context: { $implicit: author }\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"isRichText\">\n <ng-container *ngTemplateOutlet=\"author\"></ng-container>\n <fd-formatted-text [htmlText]=\"text\"></fd-formatted-text>\n </ng-container>\n </p>\n <ng-container *ngIf=\"!mobile\">\n <ng-container *ngTemplateOutlet=\"footerContent\"></ng-container>\n </ng-container>\n</div>\n\n<ng-template #avatarContent>\n <ng-content select=\"fd-feed-list-avatar\"></ng-content>\n</ng-template>\n<ng-template #actionContent>\n <ng-content select=\"fd-feed-list-action\"></ng-content>\n</ng-template>\n<ng-template #footerContent>\n <ng-content select=\"fd-feed-list-footer\"></ng-content>\n</ng-template>\n\n<ng-template #author>\n <span class=\"fd-feed-list__name\">\n <ng-container *ngIf=\"authorLink; else authorTitleTemplate\">\n <a\n target=\"_blank\"\n fd-link\n [attr.title]=\"authorTitle\"\n [attr.href]=\"authorLink | safe: 'url'\"\n [emphasized]=\"true\"\n >\n <ng-container *ngTemplateOutlet=\"authorTitleTemplate\"></ng-container>\n </a> </ng-container\n >:\n </span>\n</ng-template>\n<ng-template #authorTitleTemplate>\n {{ authorTitle }}\n</ng-template>\n\n<ng-template #feedContent let-param>\n <ng-container *ngTemplateOutlet=\"param\"></ng-container>\n <span
|
|
92
|
+
FeedListItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: FeedListItemComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
93
|
+
FeedListItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: FeedListItemComponent, selector: "fd-feed-list-item", inputs: { class: "class", authorTitle: "authorTitle", authorLink: "authorLink", text: "text", maxChars: "maxChars", ariaLabel: "ariaLabel", ariaLabelledby: "ariaLabelledby", moreLabel: "moreLabel", lessLabel: "lessLabel", isRichText: "isRichText", mobile: "mobile" }, host: { properties: { "class.fd-feed-list__body": "this.isFeedListItemBody" } }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"mobile; then headerTmpl; else avatarContent\"></ng-container>\n<div class=\"fd-feed-list__content\">\n <ng-container *ngIf=\"!mobile\">\n <ng-container *ngTemplateOutlet=\"actionContent\"></ng-container>\n </ng-container>\n <p class=\"fd-feed-list__text\">\n <ng-container *ngIf=\"!isRichText\">\n <ng-container *ngTemplateOutlet=\"feedContent; context: { $implicit: author }\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"isRichText\">\n <ng-container *ngTemplateOutlet=\"author\"></ng-container>\n <fd-formatted-text [htmlText]=\"text\"></fd-formatted-text>\n </ng-container>\n </p>\n <ng-container *ngIf=\"!mobile\">\n <ng-container *ngTemplateOutlet=\"footerContent\"></ng-container>\n </ng-container>\n</div>\n\n<ng-template #avatarContent>\n <ng-content select=\"fd-feed-list-avatar\"></ng-content>\n</ng-template>\n<ng-template #actionContent>\n <ng-content select=\"fd-feed-list-action\"></ng-content>\n</ng-template>\n<ng-template #footerContent>\n <ng-content select=\"fd-feed-list-footer\"></ng-content>\n</ng-template>\n\n<ng-template #author>\n <span class=\"fd-feed-list__name\">\n <ng-container *ngIf=\"authorLink; else authorTitleTemplate\">\n <a\n target=\"_blank\"\n fd-link\n [attr.title]=\"authorTitle\"\n [attr.href]=\"authorLink | safe: 'url'\"\n [emphasized]=\"true\"\n >\n <ng-container *ngTemplateOutlet=\"authorTitleTemplate\"></ng-container>\n </a> </ng-container\n >:\n </span>\n</ng-template>\n<ng-template #authorTitleTemplate>\n {{ authorTitle }}\n</ng-template>\n\n<ng-template #feedContent let-param>\n <ng-container *ngTemplateOutlet=\"param\"></ng-container>\n <span>\n {{ isCollapsed ? (text | truncate: maxChars) : text }}\n </span>\n <a\n fd-link\n class=\"fd-feed-list__link--more\"\n *ngIf=\"!isRichText && hasMore\"\n (click)=\"toggleTextView()\"\n [innerText]=\"\n isCollapsed\n ? moreLabel || ('coreFeedListItem.moreLabel' | fdTranslate)\n : lessLabel || ('coreFeedListItem.lessLabel' | fdTranslate)\n \"\n ></a>\n</ng-template>\n\n<ng-template #headerTmpl>\n <div class=\"fd-feed-list__wrapper\">\n <div class=\"fd-feed-list__wrapper fd-feed-list__wrapper--header\">\n <ng-container *ngTemplateOutlet=\"avatarContent\"></ng-container>\n <div>\n <ng-container *ngTemplateOutlet=\"author\"></ng-container>\n <ng-container *ngTemplateOutlet=\"footerContent\"></ng-container>\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"actionContent\"></ng-container>\n </div>\n</ng-template>\n", styles: [".fd-feed-list__name a{max-width:75%;display:inline-block;overflow:hidden;text-overflow:ellipsis;vertical-align:top;white-space:nowrap}.fd-feed-list__thumb{display:flex;align-items:center;justify-content:center;max-width:3rem;flex:0 0 3rem;height:3rem;overflow:hidden}.fd-feed-list__thumb img{width:100%;height:100%;object-fit:contain}.fd-feed-list__link--more{cursor:pointer;text-transform:initial}.fd-feed-list__link--more:hover{text-decoration:underline}\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: "component", type: i2.FormattedTextComponent, selector: "fd-formatted-text", inputs: ["htmlText", "convertedLinksDefaultTarget", "height", "width"], exportAs: ["fd-formatted-text"] }, { kind: "component", type: i3.LinkComponent, selector: "[fdLink], [fd-link], [fd-breadcrumb-link]", inputs: ["class", "emphasized", "disabled", "inverted", "subtle", "undecorated"] }, { kind: "pipe", type: i4.SafePipe, name: "safe" }, { kind: "pipe", type: i4.TruncatePipe, name: "truncate" }, { kind: "pipe", type: i5.FdTranslatePipe, name: "fdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
84
94
|
__decorate([
|
|
85
95
|
applyCssClass,
|
|
86
96
|
__metadata("design:type", Function),
|
|
@@ -89,8 +99,8 @@ __decorate([
|
|
|
89
99
|
], FeedListItemComponent.prototype, "buildComponentCssClass", null);
|
|
90
100
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: FeedListItemComponent, decorators: [{
|
|
91
101
|
type: Component,
|
|
92
|
-
args: [{ selector: 'fd-feed-list-item', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"mobile; then headerTmpl; else avatarContent\"></ng-container>\n<div class=\"fd-feed-list__content\">\n <ng-container *ngIf=\"!mobile\">\n <ng-container *ngTemplateOutlet=\"actionContent\"></ng-container>\n </ng-container>\n <p class=\"fd-feed-list__text\">\n <ng-container *ngIf=\"!isRichText\">\n <ng-container *ngTemplateOutlet=\"feedContent; context: { $implicit: author }\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"isRichText\">\n <ng-container *ngTemplateOutlet=\"author\"></ng-container>\n <fd-formatted-text [htmlText]=\"text\"></fd-formatted-text>\n </ng-container>\n </p>\n <ng-container *ngIf=\"!mobile\">\n <ng-container *ngTemplateOutlet=\"footerContent\"></ng-container>\n </ng-container>\n</div>\n\n<ng-template #avatarContent>\n <ng-content select=\"fd-feed-list-avatar\"></ng-content>\n</ng-template>\n<ng-template #actionContent>\n <ng-content select=\"fd-feed-list-action\"></ng-content>\n</ng-template>\n<ng-template #footerContent>\n <ng-content select=\"fd-feed-list-footer\"></ng-content>\n</ng-template>\n\n<ng-template #author>\n <span class=\"fd-feed-list__name\">\n <ng-container *ngIf=\"authorLink; else authorTitleTemplate\">\n <a\n target=\"_blank\"\n fd-link\n [attr.title]=\"authorTitle\"\n [attr.href]=\"authorLink | safe: 'url'\"\n [emphasized]=\"true\"\n >\n <ng-container *ngTemplateOutlet=\"authorTitleTemplate\"></ng-container>\n </a> </ng-container\n >:\n </span>\n</ng-template>\n<ng-template #authorTitleTemplate>\n {{ authorTitle }}\n</ng-template>\n\n<ng-template #feedContent let-param>\n <ng-container *ngTemplateOutlet=\"param\"></ng-container>\n <span
|
|
93
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }
|
|
102
|
+
args: [{ selector: 'fd-feed-list-item', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"mobile; then headerTmpl; else avatarContent\"></ng-container>\n<div class=\"fd-feed-list__content\">\n <ng-container *ngIf=\"!mobile\">\n <ng-container *ngTemplateOutlet=\"actionContent\"></ng-container>\n </ng-container>\n <p class=\"fd-feed-list__text\">\n <ng-container *ngIf=\"!isRichText\">\n <ng-container *ngTemplateOutlet=\"feedContent; context: { $implicit: author }\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"isRichText\">\n <ng-container *ngTemplateOutlet=\"author\"></ng-container>\n <fd-formatted-text [htmlText]=\"text\"></fd-formatted-text>\n </ng-container>\n </p>\n <ng-container *ngIf=\"!mobile\">\n <ng-container *ngTemplateOutlet=\"footerContent\"></ng-container>\n </ng-container>\n</div>\n\n<ng-template #avatarContent>\n <ng-content select=\"fd-feed-list-avatar\"></ng-content>\n</ng-template>\n<ng-template #actionContent>\n <ng-content select=\"fd-feed-list-action\"></ng-content>\n</ng-template>\n<ng-template #footerContent>\n <ng-content select=\"fd-feed-list-footer\"></ng-content>\n</ng-template>\n\n<ng-template #author>\n <span class=\"fd-feed-list__name\">\n <ng-container *ngIf=\"authorLink; else authorTitleTemplate\">\n <a\n target=\"_blank\"\n fd-link\n [attr.title]=\"authorTitle\"\n [attr.href]=\"authorLink | safe: 'url'\"\n [emphasized]=\"true\"\n >\n <ng-container *ngTemplateOutlet=\"authorTitleTemplate\"></ng-container>\n </a> </ng-container\n >:\n </span>\n</ng-template>\n<ng-template #authorTitleTemplate>\n {{ authorTitle }}\n</ng-template>\n\n<ng-template #feedContent let-param>\n <ng-container *ngTemplateOutlet=\"param\"></ng-container>\n <span>\n {{ isCollapsed ? (text | truncate: maxChars) : text }}\n </span>\n <a\n fd-link\n class=\"fd-feed-list__link--more\"\n *ngIf=\"!isRichText && hasMore\"\n (click)=\"toggleTextView()\"\n [innerText]=\"\n isCollapsed\n ? moreLabel || ('coreFeedListItem.moreLabel' | fdTranslate)\n : lessLabel || ('coreFeedListItem.lessLabel' | fdTranslate)\n \"\n ></a>\n</ng-template>\n\n<ng-template #headerTmpl>\n <div class=\"fd-feed-list__wrapper\">\n <div class=\"fd-feed-list__wrapper fd-feed-list__wrapper--header\">\n <ng-container *ngTemplateOutlet=\"avatarContent\"></ng-container>\n <div>\n <ng-container *ngTemplateOutlet=\"author\"></ng-container>\n <ng-container *ngTemplateOutlet=\"footerContent\"></ng-container>\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"actionContent\"></ng-container>\n </div>\n</ng-template>\n", styles: [".fd-feed-list__name a{max-width:75%;display:inline-block;overflow:hidden;text-overflow:ellipsis;vertical-align:top;white-space:nowrap}.fd-feed-list__thumb{display:flex;align-items:center;justify-content:center;max-width:3rem;flex:0 0 3rem;height:3rem;overflow:hidden}.fd-feed-list__thumb img{width:100%;height:100%;object-fit:contain}.fd-feed-list__link--more{cursor:pointer;text-transform:initial}.fd-feed-list__link--more:hover{text-decoration:underline}\n"] }]
|
|
103
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { class: [{
|
|
94
104
|
type: Input
|
|
95
105
|
}], authorTitle: [{
|
|
96
106
|
type: Input
|
|
@@ -190,6 +200,10 @@ class FeedListComponent {
|
|
|
190
200
|
_refreshItems() {
|
|
191
201
|
(this.feedItems || []).forEach((feedItem) => {
|
|
192
202
|
feedItem.mobile = this.mobile;
|
|
203
|
+
if (feedItem.maxCharsAtDefault && this.mobile) {
|
|
204
|
+
feedItem.setDefaultMaxChars();
|
|
205
|
+
feedItem.setHasMore();
|
|
206
|
+
}
|
|
193
207
|
});
|
|
194
208
|
}
|
|
195
209
|
}
|
|
@@ -291,13 +305,13 @@ FeedListItemModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", vers
|
|
|
291
305
|
FeedListAvatarComponent,
|
|
292
306
|
FeedListActionComponent,
|
|
293
307
|
FeedListFooterComponent,
|
|
294
|
-
FeedListFooterBylineDirective], imports: [CommonModule, PipeModule, FormattedTextModule, LinkModule,
|
|
308
|
+
FeedListFooterBylineDirective], imports: [CommonModule, PipeModule, FormattedTextModule, LinkModule, I18nModule], exports: [FeedListComponent,
|
|
295
309
|
FeedListItemComponent,
|
|
296
310
|
FeedListAvatarComponent,
|
|
297
311
|
FeedListActionComponent,
|
|
298
312
|
FeedListFooterComponent,
|
|
299
313
|
FeedListFooterBylineDirective] });
|
|
300
|
-
FeedListItemModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: FeedListItemModule, imports: [CommonModule, PipeModule, FormattedTextModule, LinkModule,
|
|
314
|
+
FeedListItemModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: FeedListItemModule, imports: [CommonModule, PipeModule, FormattedTextModule, LinkModule, I18nModule] });
|
|
301
315
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: FeedListItemModule, decorators: [{
|
|
302
316
|
type: NgModule,
|
|
303
317
|
args: [{
|
|
@@ -309,7 +323,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
309
323
|
FeedListFooterComponent,
|
|
310
324
|
FeedListFooterBylineDirective
|
|
311
325
|
],
|
|
312
|
-
imports: [CommonModule, PipeModule, FormattedTextModule, LinkModule,
|
|
326
|
+
imports: [CommonModule, PipeModule, FormattedTextModule, LinkModule, I18nModule],
|
|
313
327
|
exports: [
|
|
314
328
|
FeedListComponent,
|
|
315
329
|
FeedListItemComponent,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fundamental-ngx-core-feed-list-item.mjs","sources":["../../../../libs/core/src/lib/feed-list-item/constants.ts","../../../../libs/core/src/lib/feed-list-item/components/item/feed-list-item.component.ts","../../../../libs/core/src/lib/feed-list-item/components/item/feed-list-item.component.html","../../../../libs/core/src/lib/feed-list-item/components/list/feed-list.component.ts","../../../../libs/core/src/lib/feed-list-item/components/list/feed-list.component.html","../../../../libs/core/src/lib/feed-list-item/components/feed-list-avatar/feed-list-avatar.component.ts","../../../../libs/core/src/lib/feed-list-item/components/feed-list-action/feed-list-action.component.ts","../../../../libs/core/src/lib/feed-list-item/components/feed-list-footer/feed-list-footer.component.ts","../../../../libs/core/src/lib/feed-list-item/directives/byline.directive.ts","../../../../libs/core/src/lib/feed-list-item/feed-list-item.module.ts","../../../../libs/core/src/lib/feed-list-item/fundamental-ngx-core-feed-list-item.ts"],"sourcesContent":["export const CSS_CLASS_NAME = {\n list: 'fd-feed-list',\n item: 'fd-feed-list__item'\n};\n","import { HostBinding } from '@angular/core';\nimport {\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n Input,\n SimpleChanges,\n ElementRef,\n OnInit,\n OnChanges,\n ChangeDetectorRef\n} from '@angular/core';\nimport { applyCssClass, CssClassBuilder } from '@fundamental-ngx/core/utils';\nimport { Nullable } from '@fundamental-ngx/core/shared';\n\nimport { CSS_CLASS_NAME } from '../../constants';\n\n@Component({\n selector: 'fd-feed-list-item',\n templateUrl: './feed-list-item.component.html',\n styleUrls: ['./feed-list-item.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FeedListItemComponent implements OnInit, OnChanges, CssClassBuilder {\n /** User's custom classes */\n @Input()\n class: string;\n\n /**\n * Author of feed\n */\n @Input()\n authorTitle: string;\n\n /**\n * Link to Author of feed\n */\n @Input()\n authorLink: Nullable<string>;\n\n /**\n * Feed text\n */\n @Input()\n text: string;\n\n /**\n * Max preview characters of Feed text. If you have more than max characters text, you can toggle preview/full text with more/less button.\n */\n @Input()\n maxChars?: number;\n\n /**\n * Sets the `aria-label` attribute to the element.\n */\n @Input()\n ariaLabel = '';\n\n /**\n * aria-labelledby for element describing.\n */\n @Input()\n ariaLabelledby: string;\n\n /**\n * @deprecated use i18n capabilities instead\n * Text for more button\n */\n @Input()\n moreLabel: string;\n\n /**\n * @deprecated use i18n capabilities instead\n * Text for less button\n */\n @Input()\n lessLabel: string;\n\n /**\n * Apply rich feed text, please note - we use a formatted text component with this option, it has a list of controlled tags and attibutes.\n * This feature should be handled with care as it allows for countless custom layouts.\n */\n @Input()\n isRichText = false;\n\n /**\n * Apply mobile view\n */\n @Input()\n mobile = false;\n\n /**\n * Apply body class by default\n */\n @HostBinding('class.fd-feed-list__body')\n isFeedListItemBody = true;\n\n /**\n * Shows toggle state of feed text - more or less\n */\n isCollapsed = true;\n\n /**\n * Shows have you more line than max lines\n */\n hasMore = false;\n\n /** @hidden */\n constructor(private readonly _elementRef: ElementRef, private readonly _changeDetectorRef: ChangeDetectorRef) {}\n\n /** @hidden */\n ngOnInit(): void {\n this.buildComponentCssClass();\n }\n\n /** @hidden */\n ngOnChanges(changes: SimpleChanges): void {\n if ('class' in changes || 'isRichText' in changes) {\n this.buildComponentCssClass();\n }\n }\n\n @applyCssClass\n /** CssClassBuilder interface implementation\n * function must return single string\n * function is responsible for order which css classes are applied\n */\n buildComponentCssClass(): string[] {\n return [CSS_CLASS_NAME.item, this.class, this.isRichText ? '' : `${CSS_CLASS_NAME.item}--collapsible`];\n }\n\n /** @hidden */\n elementRef(): ElementRef<any> {\n return this._elementRef;\n }\n\n /** @hidden */\n toggleTextView(): void {\n this.isCollapsed = !this.isCollapsed;\n }\n\n /** @hidden */\n checkCharCount(isMore: boolean): void {\n this.hasMore = isMore;\n this._changeDetectorRef.detectChanges();\n }\n}\n","<ng-container *ngIf=\"mobile; then headerTmpl; else avatarContent\"></ng-container>\n<div class=\"fd-feed-list__content\">\n <ng-container *ngIf=\"!mobile\">\n <ng-container *ngTemplateOutlet=\"actionContent\"></ng-container>\n </ng-container>\n <p class=\"fd-feed-list__text\">\n <ng-container *ngIf=\"!isRichText\">\n <ng-container *ngTemplateOutlet=\"feedContent; context: { $implicit: author }\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"isRichText\">\n <ng-container *ngTemplateOutlet=\"author\"></ng-container>\n <fd-formatted-text [htmlText]=\"text\"></fd-formatted-text>\n </ng-container>\n </p>\n <ng-container *ngIf=\"!mobile\">\n <ng-container *ngTemplateOutlet=\"footerContent\"></ng-container>\n </ng-container>\n</div>\n\n<ng-template #avatarContent>\n <ng-content select=\"fd-feed-list-avatar\"></ng-content>\n</ng-template>\n<ng-template #actionContent>\n <ng-content select=\"fd-feed-list-action\"></ng-content>\n</ng-template>\n<ng-template #footerContent>\n <ng-content select=\"fd-feed-list-footer\"></ng-content>\n</ng-template>\n\n<ng-template #author>\n <span class=\"fd-feed-list__name\">\n <ng-container *ngIf=\"authorLink; else authorTitleTemplate\">\n <a\n target=\"_blank\"\n fd-link\n [attr.title]=\"authorTitle\"\n [attr.href]=\"authorLink | safe: 'url'\"\n [emphasized]=\"true\"\n >\n <ng-container *ngTemplateOutlet=\"authorTitleTemplate\"></ng-container>\n </a> </ng-container\n >:\n </span>\n</ng-template>\n<ng-template #authorTitleTemplate>\n {{ authorTitle }}\n</ng-template>\n\n<ng-template #feedContent let-param>\n <ng-container *ngTemplateOutlet=\"param\"></ng-container>\n <span\n fd-truncate\n [fdTruncateState]=\"isCollapsed\"\n [fdTruncateChars]=\"maxChars\"\n [fdTruncateTargetText]=\"text\"\n (charCountUpdate)=\"checkCharCount($event)\"\n >\n </span>\n <a\n fd-link\n class=\"fd-feed-list__link--more\"\n *ngIf=\"!isRichText && hasMore\"\n (click)=\"toggleTextView()\"\n [innerText]=\"\n isCollapsed\n ? moreLabel || ('coreFeedListItem.moreLabel' | fdTranslate)\n : lessLabel || ('coreFeedListItem.lessLabel' | fdTranslate)\n \"\n ></a>\n</ng-template>\n\n<ng-template #headerTmpl>\n <div class=\"fd-feed-list__wrapper\">\n <div class=\"fd-feed-list__wrapper fd-feed-list__wrapper--header\">\n <ng-container *ngTemplateOutlet=\"avatarContent\"></ng-container>\n <div>\n <ng-container *ngTemplateOutlet=\"author\"></ng-container>\n <ng-container *ngTemplateOutlet=\"footerContent\"></ng-container>\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"actionContent\"></ng-container>\n </div>\n</ng-template>\n","import {\n Component,\n ElementRef,\n Input,\n OnInit,\n OnDestroy,\n OnChanges,\n SimpleChanges,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ContentChildren,\n QueryList,\n AfterContentChecked\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { applyCssClass } from '@fundamental-ngx/core/utils';\nimport { CssClassBuilder } from '@fundamental-ngx/core/utils';\n\nimport { CSS_CLASS_NAME } from '../../constants';\nimport { FeedListItemComponent } from '../item/feed-list-item.component';\n\n@Component({\n selector: 'fd-feed-list',\n templateUrl: './feed-list.component.html',\n styleUrls: ['./feed-list.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FeedListComponent implements OnInit, AfterContentChecked, OnDestroy, OnChanges, CssClassBuilder {\n /** User's custom classes */\n @Input()\n class: string;\n /**\n * Sets the `aria-label` attribute to the element.\n */\n @Input()\n ariaLabel = '';\n /**\n * aria-labelledby for element describing.\n */\n @Input()\n ariaLabelledby: string;\n /**\n * Apply mobile view\n */\n @Input()\n mobile = false;\n /**\n * Feed list items will be display in a group.\n */\n @Input()\n isGroup = true;\n /**\n * It removes border if items are displaying in a group.\n */\n @Input()\n borderLess = false;\n /**\n * Gets feed list items\n */\n @ContentChildren(FeedListItemComponent)\n feedItems: QueryList<FeedListItemComponent>;\n\n /** @hidden */\n private $feedItemChanges: Subscription;\n\n /** @hidden */\n constructor(private readonly _elementRef: ElementRef) {}\n\n /** @hidden */\n ngAfterContentChecked(): void {\n this._refreshItems();\n this._listenOnFeedItems();\n }\n /** @hidden */\n ngOnInit(): void {\n this.buildComponentCssClass();\n }\n /** @hidden */\n ngOnChanges(changes: SimpleChanges): void {\n if ('mobile' in changes || 'borderLess' in changes) {\n this.buildComponentCssClass();\n this._refreshItems();\n }\n }\n\n /** @hidden */\n ngOnDestroy(): void {\n if (this.$feedItemChanges) {\n this.$feedItemChanges.unsubscribe();\n }\n }\n\n @applyCssClass\n /** CssClassBuilder interface implementation\n * function must return single string\n * function is responsible for order which css classes are applied\n */\n buildComponentCssClass(): string[] {\n return [\n CSS_CLASS_NAME.list,\n this.class,\n this.borderLess ? `${CSS_CLASS_NAME.list}--no-border` : '',\n this.isGroup ? `${CSS_CLASS_NAME.list}--group` : '',\n this.mobile ? `${CSS_CLASS_NAME.list}--s` : ''\n ];\n }\n\n /** @hidden */\n elementRef(): ElementRef<any> {\n return this._elementRef;\n }\n\n /** @hidden */\n private _listenOnFeedItems(): void {\n this.$feedItemChanges = this.feedItems.changes.subscribe(() => this._refreshItems());\n }\n\n /** @hidden */\n private _refreshItems(): void {\n (this.feedItems || []).forEach((feedItem) => {\n feedItem.mobile = this.mobile;\n });\n }\n}\n","<ng-content select=\"fd-feed-list-item\"></ng-content>\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'fd-feed-list-avatar',\n template: '<ng-content></ng-content>',\n host: { class: 'fd-feed-list__thumb' }\n})\nexport class FeedListAvatarComponent {}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'fd-feed-list-action',\n template: '<ng-content></ng-content>',\n host: { class: 'fd-feed-list__actions' }\n})\nexport class FeedListActionComponent {}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'fd-feed-list-footer',\n template: '<ng-content></ng-content>',\n host: { class: 'fd-feed-list__footer' }\n})\nexport class FeedListFooterComponent {}\n","import { Directive, HostBinding } from '@angular/core';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[fd-item-footer-byline]'\n})\nexport class FeedListFooterBylineDirective {\n @HostBinding('class.fd-feed-list__footer--byline')\n fdBylineClass = true;\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { LinkModule } from '@fundamental-ngx/core/link';\nimport { FormattedTextModule } from '@fundamental-ngx/core/formatted-text';\nimport { FeedListItemComponent } from './components/item/feed-list-item.component';\nimport { FeedListComponent } from './components/list/feed-list.component';\nimport { FeedListAvatarComponent } from './components/feed-list-avatar/feed-list-avatar.component';\nimport { FeedListActionComponent } from './components/feed-list-action/feed-list-action.component';\nimport { FeedListFooterComponent } from './components/feed-list-footer/feed-list-footer.component';\nimport { FeedListFooterBylineDirective } from './directives/byline.directive';\nimport { PipeModule } from '@fundamental-ngx/core/utils';\nimport { TruncateModule } from '@fundamental-ngx/core/utils';\nimport { I18nModule } from '@fundamental-ngx/i18n';\n\n@NgModule({\n declarations: [\n FeedListComponent,\n FeedListItemComponent,\n FeedListAvatarComponent,\n FeedListActionComponent,\n FeedListFooterComponent,\n FeedListFooterBylineDirective\n ],\n imports: [CommonModule, PipeModule, FormattedTextModule, LinkModule, TruncateModule, I18nModule],\n exports: [\n FeedListComponent,\n FeedListItemComponent,\n FeedListAvatarComponent,\n FeedListActionComponent,\n FeedListFooterComponent,\n FeedListFooterBylineDirective\n ]\n})\nexport class FeedListItemModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAAO,MAAM,cAAc,GAAG;AAC1B,IAAA,IAAI,EAAE,cAAc;AACpB,IAAA,IAAI,EAAE,oBAAoB;CAC7B;;MCqBY,qBAAqB,CAAA;;IAqF9B,WAA6B,CAAA,WAAuB,EAAmB,kBAAqC,EAAA;QAA/E,IAAW,CAAA,WAAA,GAAX,WAAW,CAAY;QAAmB,IAAkB,CAAA,kBAAA,GAAlB,kBAAkB,CAAmB;AAxD5G;;AAEG;QAEH,IAAS,CAAA,SAAA,GAAG,EAAE,CAAC;AAsBf;;;AAGG;QAEH,IAAU,CAAA,UAAA,GAAG,KAAK,CAAC;AAEnB;;AAEG;QAEH,IAAM,CAAA,MAAA,GAAG,KAAK,CAAC;AAEf;;AAEG;QAEH,IAAkB,CAAA,kBAAA,GAAG,IAAI,CAAC;AAE1B;;AAEG;QACH,IAAW,CAAA,WAAA,GAAG,IAAI,CAAC;AAEnB;;AAE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ngx-core-feed-list-item.mjs","sources":["../../../../libs/core/src/lib/feed-list-item/constants.ts","../../../../libs/core/src/lib/feed-list-item/components/item/feed-list-item.component.ts","../../../../libs/core/src/lib/feed-list-item/components/item/feed-list-item.component.html","../../../../libs/core/src/lib/feed-list-item/components/list/feed-list.component.ts","../../../../libs/core/src/lib/feed-list-item/components/list/feed-list.component.html","../../../../libs/core/src/lib/feed-list-item/components/feed-list-avatar/feed-list-avatar.component.ts","../../../../libs/core/src/lib/feed-list-item/components/feed-list-action/feed-list-action.component.ts","../../../../libs/core/src/lib/feed-list-item/components/feed-list-footer/feed-list-footer.component.ts","../../../../libs/core/src/lib/feed-list-item/directives/byline.directive.ts","../../../../libs/core/src/lib/feed-list-item/feed-list-item.module.ts","../../../../libs/core/src/lib/feed-list-item/fundamental-ngx-core-feed-list-item.ts"],"sourcesContent":["export const CSS_CLASS_NAME = {\n list: 'fd-feed-list',\n item: 'fd-feed-list__item'\n};\n","import { HostBinding } from '@angular/core';\nimport {\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n Input,\n SimpleChanges,\n ElementRef,\n OnInit,\n OnChanges\n} from '@angular/core';\nimport { applyCssClass, CssClassBuilder } from '@fundamental-ngx/core/utils';\nimport { Nullable } from '@fundamental-ngx/core/shared';\n\nimport { CSS_CLASS_NAME } from '../../constants';\n\n@Component({\n selector: 'fd-feed-list-item',\n templateUrl: './feed-list-item.component.html',\n styleUrls: ['./feed-list-item.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FeedListItemComponent implements OnInit, OnChanges, CssClassBuilder {\n /** User's custom classes */\n @Input()\n class: string;\n\n /**\n * Author of feed\n */\n @Input()\n authorTitle: string;\n\n /**\n * Link to Author of feed\n */\n @Input()\n authorLink: Nullable<string>;\n\n /**\n * Feed text\n */\n @Input()\n text: string;\n\n /**\n * Max preview characters of Feed text. If you have more than max characters text, you can toggle preview/full text with more/less button.\n */\n @Input()\n maxChars: number;\n\n /**\n * Sets the `aria-label` attribute to the element.\n */\n @Input()\n ariaLabel = '';\n\n /**\n * aria-labelledby for element describing.\n */\n @Input()\n ariaLabelledby: string;\n\n /**\n * @deprecated use i18n capabilities instead\n * Text for more button\n */\n @Input()\n moreLabel: string;\n\n /**\n * @deprecated use i18n capabilities instead\n * Text for less button\n */\n @Input()\n lessLabel: string;\n\n /**\n * Apply rich feed text, please note - we use a formatted text component with this option, it has a list of controlled tags and attibutes.\n * This feature should be handled with care as it allows for countless custom layouts.\n */\n @Input()\n isRichText = false;\n\n /**\n * Apply mobile view\n */\n @Input()\n mobile = false;\n\n maxCharsAtDefault = false;\n /**\n * Apply body class by default\n */\n @HostBinding('class.fd-feed-list__body')\n isFeedListItemBody = true;\n\n /**\n * Shows toggle state of feed text - more or less\n */\n isCollapsed = true;\n\n /**\n * Shows have you more line than max lines\n */\n hasMore = false;\n\n /** @hidden */\n constructor(private readonly _elementRef: ElementRef) {}\n\n setHasMore(): void {\n if (this.text) {\n this.hasMore = this.text.length > this.maxChars;\n }\n }\n\n setDefaultMaxChars(): void {\n this.maxChars = this.mobile ? 300 : 500;\n }\n /** @hidden */\n ngOnInit(): void {\n this.buildComponentCssClass();\n if (!this.maxChars) {\n this.setDefaultMaxChars();\n this.maxCharsAtDefault = true;\n }\n this.setHasMore();\n }\n\n /** @hidden */\n ngOnChanges(changes: SimpleChanges): void {\n if ('class' in changes || 'isRichText' in changes) {\n this.buildComponentCssClass();\n }\n this.maxCharsAtDefault && this.setDefaultMaxChars();\n this.setHasMore();\n }\n\n @applyCssClass\n /** CssClassBuilder interface implementation\n * function must return single string\n * function is responsible for order which css classes are applied\n */\n buildComponentCssClass(): string[] {\n return [CSS_CLASS_NAME.item, this.class, this.isRichText ? '' : `${CSS_CLASS_NAME.item}--collapsible`];\n }\n\n /** @hidden */\n elementRef(): ElementRef<any> {\n return this._elementRef;\n }\n\n /** @hidden */\n toggleTextView(): void {\n this.isCollapsed = !this.isCollapsed;\n }\n}\n","<ng-container *ngIf=\"mobile; then headerTmpl; else avatarContent\"></ng-container>\n<div class=\"fd-feed-list__content\">\n <ng-container *ngIf=\"!mobile\">\n <ng-container *ngTemplateOutlet=\"actionContent\"></ng-container>\n </ng-container>\n <p class=\"fd-feed-list__text\">\n <ng-container *ngIf=\"!isRichText\">\n <ng-container *ngTemplateOutlet=\"feedContent; context: { $implicit: author }\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"isRichText\">\n <ng-container *ngTemplateOutlet=\"author\"></ng-container>\n <fd-formatted-text [htmlText]=\"text\"></fd-formatted-text>\n </ng-container>\n </p>\n <ng-container *ngIf=\"!mobile\">\n <ng-container *ngTemplateOutlet=\"footerContent\"></ng-container>\n </ng-container>\n</div>\n\n<ng-template #avatarContent>\n <ng-content select=\"fd-feed-list-avatar\"></ng-content>\n</ng-template>\n<ng-template #actionContent>\n <ng-content select=\"fd-feed-list-action\"></ng-content>\n</ng-template>\n<ng-template #footerContent>\n <ng-content select=\"fd-feed-list-footer\"></ng-content>\n</ng-template>\n\n<ng-template #author>\n <span class=\"fd-feed-list__name\">\n <ng-container *ngIf=\"authorLink; else authorTitleTemplate\">\n <a\n target=\"_blank\"\n fd-link\n [attr.title]=\"authorTitle\"\n [attr.href]=\"authorLink | safe: 'url'\"\n [emphasized]=\"true\"\n >\n <ng-container *ngTemplateOutlet=\"authorTitleTemplate\"></ng-container>\n </a> </ng-container\n >:\n </span>\n</ng-template>\n<ng-template #authorTitleTemplate>\n {{ authorTitle }}\n</ng-template>\n\n<ng-template #feedContent let-param>\n <ng-container *ngTemplateOutlet=\"param\"></ng-container>\n <span>\n {{ isCollapsed ? (text | truncate: maxChars) : text }}\n </span>\n <a\n fd-link\n class=\"fd-feed-list__link--more\"\n *ngIf=\"!isRichText && hasMore\"\n (click)=\"toggleTextView()\"\n [innerText]=\"\n isCollapsed\n ? moreLabel || ('coreFeedListItem.moreLabel' | fdTranslate)\n : lessLabel || ('coreFeedListItem.lessLabel' | fdTranslate)\n \"\n ></a>\n</ng-template>\n\n<ng-template #headerTmpl>\n <div class=\"fd-feed-list__wrapper\">\n <div class=\"fd-feed-list__wrapper fd-feed-list__wrapper--header\">\n <ng-container *ngTemplateOutlet=\"avatarContent\"></ng-container>\n <div>\n <ng-container *ngTemplateOutlet=\"author\"></ng-container>\n <ng-container *ngTemplateOutlet=\"footerContent\"></ng-container>\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"actionContent\"></ng-container>\n </div>\n</ng-template>\n","import {\n Component,\n ElementRef,\n Input,\n OnInit,\n OnDestroy,\n OnChanges,\n SimpleChanges,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ContentChildren,\n QueryList,\n AfterContentChecked\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { applyCssClass } from '@fundamental-ngx/core/utils';\nimport { CssClassBuilder } from '@fundamental-ngx/core/utils';\n\nimport { CSS_CLASS_NAME } from '../../constants';\nimport { FeedListItemComponent } from '../item/feed-list-item.component';\n\n@Component({\n selector: 'fd-feed-list',\n templateUrl: './feed-list.component.html',\n styleUrls: ['./feed-list.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FeedListComponent implements OnInit, AfterContentChecked, OnDestroy, OnChanges, CssClassBuilder {\n /** User's custom classes */\n @Input()\n class: string;\n /**\n * Sets the `aria-label` attribute to the element.\n */\n @Input()\n ariaLabel = '';\n /**\n * aria-labelledby for element describing.\n */\n @Input()\n ariaLabelledby: string;\n /**\n * Apply mobile view\n */\n @Input()\n mobile = false;\n /**\n * Feed list items will be display in a group.\n */\n @Input()\n isGroup = true;\n /**\n * It removes border if items are displaying in a group.\n */\n @Input()\n borderLess = false;\n /**\n * Gets feed list items\n */\n @ContentChildren(FeedListItemComponent)\n feedItems: QueryList<FeedListItemComponent>;\n\n /** @hidden */\n private $feedItemChanges: Subscription;\n\n /** @hidden */\n constructor(private readonly _elementRef: ElementRef) {}\n\n /** @hidden */\n ngAfterContentChecked(): void {\n this._refreshItems();\n this._listenOnFeedItems();\n }\n /** @hidden */\n ngOnInit(): void {\n this.buildComponentCssClass();\n }\n /** @hidden */\n ngOnChanges(changes: SimpleChanges): void {\n if ('mobile' in changes || 'borderLess' in changes) {\n this.buildComponentCssClass();\n this._refreshItems();\n }\n }\n\n /** @hidden */\n ngOnDestroy(): void {\n if (this.$feedItemChanges) {\n this.$feedItemChanges.unsubscribe();\n }\n }\n\n @applyCssClass\n /** CssClassBuilder interface implementation\n * function must return single string\n * function is responsible for order which css classes are applied\n */\n buildComponentCssClass(): string[] {\n return [\n CSS_CLASS_NAME.list,\n this.class,\n this.borderLess ? `${CSS_CLASS_NAME.list}--no-border` : '',\n this.isGroup ? `${CSS_CLASS_NAME.list}--group` : '',\n this.mobile ? `${CSS_CLASS_NAME.list}--s` : ''\n ];\n }\n\n /** @hidden */\n elementRef(): ElementRef<any> {\n return this._elementRef;\n }\n\n /** @hidden */\n private _listenOnFeedItems(): void {\n this.$feedItemChanges = this.feedItems.changes.subscribe(() => this._refreshItems());\n }\n\n /** @hidden */\n private _refreshItems(): void {\n (this.feedItems || []).forEach((feedItem) => {\n feedItem.mobile = this.mobile;\n if (feedItem.maxCharsAtDefault && this.mobile) {\n feedItem.setDefaultMaxChars();\n feedItem.setHasMore();\n }\n });\n }\n}\n","<ng-content select=\"fd-feed-list-item\"></ng-content>\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'fd-feed-list-avatar',\n template: '<ng-content></ng-content>',\n host: { class: 'fd-feed-list__thumb' }\n})\nexport class FeedListAvatarComponent {}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'fd-feed-list-action',\n template: '<ng-content></ng-content>',\n host: { class: 'fd-feed-list__actions' }\n})\nexport class FeedListActionComponent {}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'fd-feed-list-footer',\n template: '<ng-content></ng-content>',\n host: { class: 'fd-feed-list__footer' }\n})\nexport class FeedListFooterComponent {}\n","import { Directive, HostBinding } from '@angular/core';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[fd-item-footer-byline]'\n})\nexport class FeedListFooterBylineDirective {\n @HostBinding('class.fd-feed-list__footer--byline')\n fdBylineClass = true;\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { LinkModule } from '@fundamental-ngx/core/link';\nimport { FormattedTextModule } from '@fundamental-ngx/core/formatted-text';\nimport { FeedListItemComponent } from './components/item/feed-list-item.component';\nimport { FeedListComponent } from './components/list/feed-list.component';\nimport { FeedListAvatarComponent } from './components/feed-list-avatar/feed-list-avatar.component';\nimport { FeedListActionComponent } from './components/feed-list-action/feed-list-action.component';\nimport { FeedListFooterComponent } from './components/feed-list-footer/feed-list-footer.component';\nimport { FeedListFooterBylineDirective } from './directives/byline.directive';\nimport { PipeModule } from '@fundamental-ngx/core/utils';\nimport { I18nModule } from '@fundamental-ngx/i18n';\n\n@NgModule({\n declarations: [\n FeedListComponent,\n FeedListItemComponent,\n FeedListAvatarComponent,\n FeedListActionComponent,\n FeedListFooterComponent,\n FeedListFooterBylineDirective\n ],\n imports: [CommonModule, PipeModule, FormattedTextModule, LinkModule, I18nModule],\n exports: [\n FeedListComponent,\n FeedListItemComponent,\n FeedListAvatarComponent,\n FeedListActionComponent,\n FeedListFooterComponent,\n FeedListFooterBylineDirective\n ]\n})\nexport class FeedListItemModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAAO,MAAM,cAAc,GAAG;AAC1B,IAAA,IAAI,EAAE,cAAc;AACpB,IAAA,IAAI,EAAE,oBAAoB;CAC7B;;MCoBY,qBAAqB,CAAA;;AAsF9B,IAAA,WAAA,CAA6B,WAAuB,EAAA;QAAvB,IAAW,CAAA,WAAA,GAAX,WAAW,CAAY;AAzDpD;;AAEG;QAEH,IAAS,CAAA,SAAA,GAAG,EAAE,CAAC;AAsBf;;;AAGG;QAEH,IAAU,CA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6B,CAAA,EAAA,CAAA,CAAA;gHAGxB,kBAAkB,EAAA,OAAA,EAAA,CAVjB,YAAY,EAAE,UAAU,EAAE,mBAAmB,EAAE,UAAU,EAAE,UAAU,CAAA,EAAA,CAAA,CAAA;2FAUtE,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAnB9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE;wBACV,iBAAiB;wBACjB,qBAAqB;wBACrB,uBAAuB;wBACvB,uBAAuB;wBACvB,uBAAuB;wBACvB,6BAA6B;AAChC,qBAAA;oBACD,OAAO,EAAE,CAAC,YAAY,EAAE,UAAU,EAAE,mBAAmB,EAAE,UAAU,EAAE,UAAU,CAAC;AAChF,oBAAA,OAAO,EAAE;wBACL,iBAAiB;wBACjB,qBAAqB;wBACrB,uBAAuB;wBACvB,uBAAuB;wBACvB,uBAAuB;wBACvB,6BAA6B;AAChC,qBAAA;AACJ,iBAAA,CAAA;;;AChCD;;AAEG;;;;"}
|
|
@@ -1425,30 +1425,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
1425
1425
|
}]
|
|
1426
1426
|
}] });
|
|
1427
1427
|
|
|
1428
|
-
var DefaultTruncateCharCount;
|
|
1429
|
-
(function (DefaultTruncateCharCount) {
|
|
1430
|
-
DefaultTruncateCharCount[DefaultTruncateCharCount["MAX"] = 500] = "MAX";
|
|
1431
|
-
DefaultTruncateCharCount[DefaultTruncateCharCount["MIN"] = 300] = "MIN";
|
|
1432
|
-
})(DefaultTruncateCharCount || (DefaultTruncateCharCount = {}));
|
|
1433
1428
|
class TruncateDirective {
|
|
1434
1429
|
/** @hidden */
|
|
1435
|
-
constructor(_elementRef
|
|
1430
|
+
constructor(_elementRef) {
|
|
1436
1431
|
this._elementRef = _elementRef;
|
|
1437
|
-
this._renderer = _renderer;
|
|
1438
1432
|
/**
|
|
1439
1433
|
* Truncating state
|
|
1440
1434
|
*/
|
|
1441
1435
|
this.fdTruncateState = false;
|
|
1442
|
-
/**
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
this.charCountUpdate = new EventEmitter();
|
|
1436
|
+
/** @hidden */
|
|
1437
|
+
this._customWidthCount = 200;
|
|
1438
|
+
this.takeDefaultStyleOnce = true;
|
|
1446
1439
|
}
|
|
1447
1440
|
/**
|
|
1448
|
-
*
|
|
1441
|
+
* Width in pixel for truncation of an element , by default
|
|
1449
1442
|
*/
|
|
1450
|
-
set
|
|
1451
|
-
this.
|
|
1443
|
+
set fdTruncateWidth(value) {
|
|
1444
|
+
this._customWidthCount = coerceNumberProperty(value);
|
|
1452
1445
|
}
|
|
1453
1446
|
/**
|
|
1454
1447
|
* Root native element
|
|
@@ -1456,107 +1449,47 @@ class TruncateDirective {
|
|
|
1456
1449
|
get rootElement() {
|
|
1457
1450
|
return this._elementRef.nativeElement;
|
|
1458
1451
|
}
|
|
1459
|
-
/**
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
next: () => this._checkWidth()
|
|
1467
|
-
});
|
|
1468
|
-
this.refreshTruncate();
|
|
1452
|
+
/**
|
|
1453
|
+
* Method saves default style of target element before first truncate.
|
|
1454
|
+
*/
|
|
1455
|
+
setDefaultStyle() {
|
|
1456
|
+
if (this.takeDefaultStyleOnce) {
|
|
1457
|
+
this._defaultStyle = this._truncateTarget.style.cssText;
|
|
1458
|
+
this.takeDefaultStyleOnce = false;
|
|
1469
1459
|
}
|
|
1470
1460
|
}
|
|
1471
1461
|
/** @hidden */
|
|
1472
|
-
|
|
1473
|
-
if (this.
|
|
1474
|
-
this.
|
|
1462
|
+
ngAfterViewInit() {
|
|
1463
|
+
if (this.rootElement) {
|
|
1464
|
+
this._truncate();
|
|
1475
1465
|
}
|
|
1476
1466
|
}
|
|
1477
1467
|
/** @hidden */
|
|
1478
1468
|
ngOnChanges() {
|
|
1479
|
-
this.
|
|
1480
|
-
this.reset();
|
|
1481
|
-
this.refreshTruncate();
|
|
1482
|
-
}
|
|
1483
|
-
reset() {
|
|
1484
|
-
if (this._truncateTarget && this._originalText) {
|
|
1485
|
-
this._truncateTarget.textContent = this._originalText + ' ';
|
|
1486
|
-
}
|
|
1487
|
-
}
|
|
1488
|
-
refreshTarget(event) {
|
|
1489
|
-
this._truncateTarget = event.rootElement;
|
|
1490
|
-
this._originalText = event.fdTruncateTargetText;
|
|
1491
|
-
this.reset();
|
|
1492
|
-
this.refreshTruncate();
|
|
1469
|
+
this._truncate();
|
|
1493
1470
|
}
|
|
1494
|
-
refreshTruncate() {
|
|
1495
|
-
if (this.fdTruncateState && this._hasMore) {
|
|
1496
|
-
this._toggleTruncate();
|
|
1497
|
-
}
|
|
1498
|
-
}
|
|
1499
|
-
/** @hidden
|
|
1500
|
-
* Initialising truncate properties
|
|
1501
|
-
*/
|
|
1502
|
-
_initTruncate() {
|
|
1503
|
-
const style = window.getComputedStyle(this.rootElement, null);
|
|
1504
|
-
this._widthCount = parseInt(style.getPropertyValue('font-size'), 10) * 25;
|
|
1505
|
-
this._checkWidth();
|
|
1506
|
-
if (this._originalText && this._originalText.length > this._maxChars) {
|
|
1507
|
-
this._hasMore = true;
|
|
1508
|
-
this.charCountUpdate.emit(this._hasMore);
|
|
1509
|
-
this._truncate();
|
|
1510
|
-
}
|
|
1511
|
-
}
|
|
1512
|
-
/** @hidden
|
|
1513
|
-
* Toggle present text
|
|
1514
|
-
*/
|
|
1515
|
-
_toggleTruncate() {
|
|
1516
|
-
this._truncateTarget.textContent = this.fdTruncateState ? this._truncatedText : this._originalText;
|
|
1517
|
-
}
|
|
1518
|
-
/** @hidden
|
|
1519
|
-
* Truncate text in the target box, if the target exceeds the number of characters
|
|
1520
|
-
*/
|
|
1521
1471
|
_truncate() {
|
|
1472
|
+
this._truncateTarget = this.rootElement;
|
|
1522
1473
|
if (!this._truncateTarget) {
|
|
1523
1474
|
return;
|
|
1524
1475
|
}
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
}
|
|
1529
|
-
this._truncatedText = this._truncateTarget.textContent = ellipsisTextArray.join('') + ' … ';
|
|
1530
|
-
}
|
|
1531
|
-
/** @hidden */
|
|
1532
|
-
_checkWidth() {
|
|
1533
|
-
const width = this.rootElement.offsetWidth;
|
|
1534
|
-
this._maxChars = this._customCharCount
|
|
1535
|
-
? this._customCharCount
|
|
1536
|
-
: width >= this._widthCount
|
|
1537
|
-
? DefaultTruncateCharCount.MAX
|
|
1538
|
-
: DefaultTruncateCharCount.MIN;
|
|
1539
|
-
if (this.fdTruncateState && this._hasMore) {
|
|
1540
|
-
this._truncate();
|
|
1541
|
-
}
|
|
1476
|
+
this.setDefaultStyle();
|
|
1477
|
+
this._truncationStyle = `${this._defaultStyle} max-width: ${this._customWidthCount}px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;`;
|
|
1478
|
+
this._truncateTarget.style.cssText = this.fdTruncateState ? this._truncationStyle : this._defaultStyle;
|
|
1542
1479
|
}
|
|
1543
1480
|
}
|
|
1544
|
-
TruncateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: TruncateDirective, deps: [{ token: i0.ElementRef }
|
|
1545
|
-
TruncateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.2", type: TruncateDirective, selector: "[fd-truncate]", inputs: {
|
|
1481
|
+
TruncateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: TruncateDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1482
|
+
TruncateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.2", type: TruncateDirective, selector: "[fd-truncate]", inputs: { fdTruncateWidth: "fdTruncateWidth", fdTruncateState: "fdTruncateState" }, usesOnChanges: true, ngImport: i0 });
|
|
1546
1483
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: TruncateDirective, decorators: [{
|
|
1547
1484
|
type: Directive,
|
|
1548
1485
|
args: [{
|
|
1549
1486
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
1550
1487
|
selector: '[fd-truncate]'
|
|
1551
1488
|
}]
|
|
1552
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }
|
|
1553
|
-
type: Input
|
|
1554
|
-
}], fdTruncateChars: [{
|
|
1489
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { fdTruncateWidth: [{
|
|
1555
1490
|
type: Input
|
|
1556
1491
|
}], fdTruncateState: [{
|
|
1557
1492
|
type: Input
|
|
1558
|
-
}], charCountUpdate: [{
|
|
1559
|
-
type: Output
|
|
1560
1493
|
}] } });
|
|
1561
1494
|
|
|
1562
1495
|
class TruncateModule {
|
|
@@ -1846,16 +1779,58 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
1846
1779
|
args: [{ name: 'isCompactDensity' }]
|
|
1847
1780
|
}] });
|
|
1848
1781
|
|
|
1782
|
+
class TruncatePipe {
|
|
1783
|
+
transform(value, limit = 500) {
|
|
1784
|
+
return value && value.length > limit ? value.substring(0, limit) + '...' : value;
|
|
1785
|
+
}
|
|
1786
|
+
}
|
|
1787
|
+
TruncatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: TruncatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1788
|
+
TruncatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: TruncatePipe, name: "truncate" });
|
|
1789
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: TruncatePipe, decorators: [{
|
|
1790
|
+
type: Pipe,
|
|
1791
|
+
args: [{
|
|
1792
|
+
name: 'truncate'
|
|
1793
|
+
}]
|
|
1794
|
+
}] });
|
|
1795
|
+
|
|
1849
1796
|
class PipeModule {
|
|
1850
1797
|
}
|
|
1851
1798
|
PipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1852
|
-
PipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: PipeModule, declarations: [DisplayFnPipe,
|
|
1799
|
+
PipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: PipeModule, declarations: [DisplayFnPipe,
|
|
1800
|
+
SearchHighlightPipe,
|
|
1801
|
+
TwoDigitsPipe,
|
|
1802
|
+
SafePipe,
|
|
1803
|
+
ValueByPathPipe,
|
|
1804
|
+
IsCompactDensityPipe,
|
|
1805
|
+
TruncatePipe], exports: [DisplayFnPipe,
|
|
1806
|
+
SearchHighlightPipe,
|
|
1807
|
+
TwoDigitsPipe,
|
|
1808
|
+
SafePipe,
|
|
1809
|
+
ValueByPathPipe,
|
|
1810
|
+
IsCompactDensityPipe,
|
|
1811
|
+
TruncatePipe] });
|
|
1853
1812
|
PipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PipeModule });
|
|
1854
1813
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PipeModule, decorators: [{
|
|
1855
1814
|
type: NgModule,
|
|
1856
1815
|
args: [{
|
|
1857
|
-
declarations: [
|
|
1858
|
-
|
|
1816
|
+
declarations: [
|
|
1817
|
+
DisplayFnPipe,
|
|
1818
|
+
SearchHighlightPipe,
|
|
1819
|
+
TwoDigitsPipe,
|
|
1820
|
+
SafePipe,
|
|
1821
|
+
ValueByPathPipe,
|
|
1822
|
+
IsCompactDensityPipe,
|
|
1823
|
+
TruncatePipe
|
|
1824
|
+
],
|
|
1825
|
+
exports: [
|
|
1826
|
+
DisplayFnPipe,
|
|
1827
|
+
SearchHighlightPipe,
|
|
1828
|
+
TwoDigitsPipe,
|
|
1829
|
+
SafePipe,
|
|
1830
|
+
ValueByPathPipe,
|
|
1831
|
+
IsCompactDensityPipe,
|
|
1832
|
+
TruncatePipe
|
|
1833
|
+
]
|
|
1859
1834
|
}]
|
|
1860
1835
|
}] });
|
|
1861
1836
|
|
|
@@ -3337,5 +3312,5 @@ function applyMixins(derivedCtor, baseCtors) {
|
|
|
3337
3312
|
* Generated bundle index. Do not edit.
|
|
3338
3313
|
*/
|
|
3339
3314
|
|
|
3340
|
-
export { ANY_LANGUAGE_LETTERS_GROUP_REGEX, ANY_LANGUAGE_LETTERS_REGEX, AbstractFdNgxClass, AutoCompleteDirective, AutoCompleteModule, ContentDensityEnum, ContentDensityService, DECIMAL_NUMBER_UNICODE_GROUP_REGEX, DECIMAL_NUMBER_UNICODE_RANGE, DECIMAL_NUMBER_UNICODE_REGEX, DEFAULT_CONTENT_DENSITY,
|
|
3315
|
+
export { ANY_LANGUAGE_LETTERS_GROUP_REGEX, ANY_LANGUAGE_LETTERS_REGEX, AbstractFdNgxClass, AutoCompleteDirective, AutoCompleteModule, ContentDensityEnum, ContentDensityService, DECIMAL_NUMBER_UNICODE_GROUP_REGEX, DECIMAL_NUMBER_UNICODE_RANGE, DECIMAL_NUMBER_UNICODE_REGEX, DEFAULT_CONTENT_DENSITY, DestroyedService, DisplayFnPipe, DndItemDirective, DndKeyboardGroupDirective, DndKeyboardItemDirective, DndListDirective, DragAndDropModule, DynamicComponentContainer, DynamicComponentInjector, DynamicComponentService, ELEMENT_REF_EXCEPTION, FocusKeyManagerHelpersModule, FocusKeyManagerItemDirective, FocusKeyManagerListDirective, FocusTrapService, INVALID_DATE_ERROR, IgnoreClickOnSelectionDirective, IgnoreClickOnSelectionModule, InitialFocusDirective, InitialFocusModule, IsCompactDensityPipe, KeyUtil, KeyboardSupportService, LETTERS_UNICODE_RANGE, LIST_ITEM_COMPONENT, LineClampDirective, LineClampModule, LineClampTargetDirective, LocalStorageService, MOBILE_CONFIG_ERROR, ModuleDeprecations, OVERFLOW_PRIORITY_SCORE, OnlyDigitsDirective, OnlyDigitsModule, OverflowListDirective, OverflowListItemDirective, OverflowListModule, PipeModule, RTL_LANGUAGE, RangeSelector, ResizeDirective, ResizeHandleDirective, ResizeModule, ResizeObserverFactory, ResizeObserverService, RtlService, SafePipe, SearchHighlightPipe, THEME_SWITCHER_ROUTER_MISSING_ERROR, TemplateDirective, TemplateModule, ThemesService, TruncateDirective, TruncateModule, TruncatePipe, TwoDigitsPipe, UtilsModule, ValueByPathPipe, applyCssClass, applyCssStyle, applyMixins, consumerProviderFactory, getDocumentFontSize, getElementCapacity, getElementWidth, getRandomColorAccent, intersectionObservable, isCompactDensity, isValidContentDensity, moduleDeprecationsFactory, moduleDeprecationsProvider, parserFileSize, pxToNum, resizeObservable, scrollTop, toNativeElement, uuidv4 };
|
|
3341
3316
|
//# sourceMappingURL=fundamental-ngx-core-utils.mjs.map
|