@libs-ui/components-line-clamp 0.1.1-1

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/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # line-clamp
2
+
3
+ This library was generated with [Nx](https://nx.dev).
@@ -0,0 +1,3 @@
1
+ export * from './line-clamp.component';
2
+ export * from './interfaces';
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzLXVpL2NvbXBvbmVudHMvbGluZS1jbGFtcC9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyx3QkFBd0IsQ0FBQztBQUN2QyxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vbGluZS1jbGFtcC5jb21wb25lbnQnO1xuZXhwb3J0ICogZnJvbSAnLi9pbnRlcmZhY2VzJztcbiJdfQ==
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLmludGVyZmFjZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMtdWkvY29tcG9uZW50cy9saW5lLWNsYW1wL3NyYy9pbnRlcmZhY2VzL2NvbmZpZy5pbnRlcmZhY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFRZUEVfT0JKRUNUIH0gZnJvbSAnQGxpYnMtdWkvaW50ZXJmYWNlcy10eXBlcyc7XG5cbmV4cG9ydCBpbnRlcmZhY2UgSUxpbmVDbGFtcENvbmZpZyB7XG4gIG1heEhlaWdodD86IG51bWJlcjtcbiAgY2xhc3M/OiBzdHJpbmc7XG4gIGlnbm9yZVNob3dCdXR0b25Db2xsYXBzZUV4cGFuZD86IGJvb2xlYW47XG4gIHNob3dUb29sdGlwPzogYm9vbGVhbjtcbiAgbWF4V2lkdGhUb29sdGlwPzogbnVtYmVyO1xuICBtYXhIZWlnaHRUb29sdGlwPzogbnVtYmVyO1xuICBuZ0NsYXNzT2JqZWN0PzogVFlQRV9PQkpFQ1Q7XG4gIGlzSW5uZXJUZXh0PzogYm9vbGVhbjtcbn1cbiJdfQ==
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnVuY3Rpb24tY29udHJvbC5pbnRlcmZhY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzLXVpL2NvbXBvbmVudHMvbGluZS1jbGFtcC9zcmMvaW50ZXJmYWNlcy9mdW5jdGlvbi1jb250cm9sLmludGVyZmFjZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGludGVyZmFjZSBJTGluZUNsYW1wRnVuY3Rpb25Db250cm9sRXZlbnQge1xuICByZWZyZXNoOiAoKSA9PiBQcm9taXNlPHZvaWQ+O1xufVxuIl19
@@ -0,0 +1,3 @@
1
+ export * from './config.interface';
2
+ export * from './function-control.interface';
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzLXVpL2NvbXBvbmVudHMvbGluZS1jbGFtcC9zcmMvaW50ZXJmYWNlcy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLG9CQUFvQixDQUFDO0FBQ25DLGNBQWMsOEJBQThCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2NvbmZpZy5pbnRlcmZhY2UnO1xuZXhwb3J0ICogZnJvbSAnLi9mdW5jdGlvbi1jb250cm9sLmludGVyZmFjZSc7XG4iXX0=
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlicy11aS1jb21wb25lbnRzLWxpbmUtY2xhbXAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzLXVpL2NvbXBvbmVudHMvbGluZS1jbGFtcC9zcmMvbGlicy11aS1jb21wb25lbnRzLWxpbmUtY2xhbXAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLFNBQVMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9pbmRleCc7XG4iXX0=
@@ -0,0 +1,115 @@
1
+ import { AsyncPipe, NgClass } from '@angular/common';
2
+ import { ChangeDetectionStrategy, Component, HostListener, effect, input, output, signal, untracked } from '@angular/core';
3
+ import { LibsUiComponentsButtonsButtonComponent } from '@libs-ui/components-buttons-button';
4
+ import { LibsUiComponentsPopoverComponent } from '@libs-ui/components-popover';
5
+ import { LibsUiPipesEscapeHtmlPipe } from '@libs-ui/pipes-escape-html';
6
+ import { LibsUiPipesSecurityTrustPipe } from '@libs-ui/pipes-security-trust';
7
+ import { TranslateModule } from '@ngx-translate/core';
8
+ import { LibsUiComponentsLineClampDirective } from './line-clamp.directive';
9
+ import { isNil } from '@libs-ui/utils';
10
+ import * as i0 from "@angular/core";
11
+ import * as i1 from "@ngx-translate/core";
12
+ export class LibsUiComponentsLineClampComponent {
13
+ /** PROPERTY */
14
+ displayLineClamp = signal(false);
15
+ isCollapse = signal(false);
16
+ contentClamp = signal('');
17
+ contentDisplay = signal('');
18
+ /** INPUT */
19
+ content = input.required();
20
+ lengthLimitDisplay = input(200, { transform: (val) => val || 200 });
21
+ maxHeight = input.required(); // maxHeight = (line-height của text)*(số dòng mong muốn)
22
+ ignoreShowButtonCollapseExpand = input();
23
+ ignoreShowButtonCollapse = input();
24
+ showTooltip = input();
25
+ timeHidePopoverOnMouseout = input(50, { transform: (val) => val ?? 50 });
26
+ maxWidthTooltip = input(250, { transform: (val) => val ?? 250 });
27
+ maxHeightTooltip = input(150, { transform: (val) => val ?? 150 });
28
+ zIndexPopover = input(1001, { transform: (val) => val ?? 1001 });
29
+ isInnerText = input(); // không cần escapeHTML content khi biến bằng true
30
+ classClassLabelButtonCollapseExpand = input('libs-ui-font-h5r', { transform: (val) => val ?? 'libs-ui-font-h5r' });
31
+ classClassIncludeButtonCollapseExpand = input('!p-0', { transform: (val) => val ?? '!p-0' });
32
+ ignoreStopPropagationTooltipEvent = input(false, { transform: (val) => val ?? false });
33
+ ngClassObject = input({ 'libs-ui-line-clamp-content libs-ui-font-h5r': true }, { transform: (val) => val || { 'libs-ui-line-clamp-content lib-ui-font-h5r': true } }); // object ngClass
34
+ hasBackgroundGradient = input(false, { transform: (val) => val ?? false });
35
+ labelButtonViewMore = input();
36
+ labelButtonCollapse = input();
37
+ directionTooltip = input('top', { transform: (val) => val ?? 'top' });
38
+ useXssFilter = input(true, { transform: (val) => val ?? true });
39
+ defaultIsCollapse = input(true, { transform: (val) => val ?? true });
40
+ /** OUTPUT */
41
+ outDisplayLineClamp = output();
42
+ outAction = output();
43
+ outClick = output();
44
+ outFunctionControl = output();
45
+ constructor() {
46
+ effect(() => {
47
+ if (!isNil(this.content())) {
48
+ untracked(() => {
49
+ this.contentDisplay.set('');
50
+ this.displayLineClamp.set(false);
51
+ this.isCollapse.set(false);
52
+ });
53
+ }
54
+ });
55
+ }
56
+ async ngOnInit() {
57
+ this.outFunctionControl.emit(this.FunctionsControl);
58
+ }
59
+ /** FUNCTIONS */
60
+ get FunctionsControl() {
61
+ return {
62
+ refresh: this.refresh.bind(this),
63
+ };
64
+ }
65
+ async handlerContentSub(content) {
66
+ if (this.content() !== content) {
67
+ this.displayLineClamp.set(true);
68
+ this.isCollapse.set(this.defaultIsCollapse());
69
+ this.contentClamp.set(content);
70
+ this.contentDisplay.set(this.isCollapse() ? content : this.content());
71
+ this.outDisplayLineClamp.emit(this.isCollapse());
72
+ }
73
+ }
74
+ async viewMore(e) {
75
+ e.stopPropagation();
76
+ this.isCollapse.set(false);
77
+ this.contentDisplay.set(this.content());
78
+ e.preventDefault();
79
+ this.outAction.emit('view-more');
80
+ }
81
+ async hiddenMore(e) {
82
+ e.stopPropagation();
83
+ this.isCollapse.set(true);
84
+ this.contentDisplay.set(this.contentClamp());
85
+ e.preventDefault();
86
+ this.outAction.emit('hidden-more');
87
+ }
88
+ async resize() {
89
+ this.refresh();
90
+ }
91
+ async refresh() {
92
+ this.contentDisplay.set(this.content());
93
+ this.displayLineClamp.set(false);
94
+ this.isCollapse.set(false);
95
+ }
96
+ async handlerClick(event) {
97
+ if (typeof event === 'string' && event !== 'click') {
98
+ return;
99
+ }
100
+ this.outClick.emit(event);
101
+ }
102
+ ngOnDestroy() {
103
+ this.displayLineClamp.set(false);
104
+ }
105
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsLineClampComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
106
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: LibsUiComponentsLineClampComponent, isStandalone: true, selector: "libs_ui-components-line_clamp", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null }, lengthLimitDisplay: { classPropertyName: "lengthLimitDisplay", publicName: "lengthLimitDisplay", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: true, transformFunction: null }, ignoreShowButtonCollapseExpand: { classPropertyName: "ignoreShowButtonCollapseExpand", publicName: "ignoreShowButtonCollapseExpand", isSignal: true, isRequired: false, transformFunction: null }, ignoreShowButtonCollapse: { classPropertyName: "ignoreShowButtonCollapse", publicName: "ignoreShowButtonCollapse", isSignal: true, isRequired: false, transformFunction: null }, showTooltip: { classPropertyName: "showTooltip", publicName: "showTooltip", isSignal: true, isRequired: false, transformFunction: null }, timeHidePopoverOnMouseout: { classPropertyName: "timeHidePopoverOnMouseout", publicName: "timeHidePopoverOnMouseout", isSignal: true, isRequired: false, transformFunction: null }, maxWidthTooltip: { classPropertyName: "maxWidthTooltip", publicName: "maxWidthTooltip", isSignal: true, isRequired: false, transformFunction: null }, maxHeightTooltip: { classPropertyName: "maxHeightTooltip", publicName: "maxHeightTooltip", isSignal: true, isRequired: false, transformFunction: null }, zIndexPopover: { classPropertyName: "zIndexPopover", publicName: "zIndexPopover", isSignal: true, isRequired: false, transformFunction: null }, isInnerText: { classPropertyName: "isInnerText", publicName: "isInnerText", isSignal: true, isRequired: false, transformFunction: null }, classClassLabelButtonCollapseExpand: { classPropertyName: "classClassLabelButtonCollapseExpand", publicName: "classClassLabelButtonCollapseExpand", isSignal: true, isRequired: false, transformFunction: null }, classClassIncludeButtonCollapseExpand: { classPropertyName: "classClassIncludeButtonCollapseExpand", publicName: "classClassIncludeButtonCollapseExpand", isSignal: true, isRequired: false, transformFunction: null }, ignoreStopPropagationTooltipEvent: { classPropertyName: "ignoreStopPropagationTooltipEvent", publicName: "ignoreStopPropagationTooltipEvent", isSignal: true, isRequired: false, transformFunction: null }, ngClassObject: { classPropertyName: "ngClassObject", publicName: "ngClassObject", isSignal: true, isRequired: false, transformFunction: null }, hasBackgroundGradient: { classPropertyName: "hasBackgroundGradient", publicName: "hasBackgroundGradient", isSignal: true, isRequired: false, transformFunction: null }, labelButtonViewMore: { classPropertyName: "labelButtonViewMore", publicName: "labelButtonViewMore", isSignal: true, isRequired: false, transformFunction: null }, labelButtonCollapse: { classPropertyName: "labelButtonCollapse", publicName: "labelButtonCollapse", isSignal: true, isRequired: false, transformFunction: null }, directionTooltip: { classPropertyName: "directionTooltip", publicName: "directionTooltip", isSignal: true, isRequired: false, transformFunction: null }, useXssFilter: { classPropertyName: "useXssFilter", publicName: "useXssFilter", isSignal: true, isRequired: false, transformFunction: null }, defaultIsCollapse: { classPropertyName: "defaultIsCollapse", publicName: "defaultIsCollapse", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outDisplayLineClamp: "outDisplayLineClamp", outAction: "outAction", outClick: "outClick", outFunctionControl: "outFunctionControl" }, host: { listeners: { "window:resize": "resize($event)" } }, ngImport: i0, template: "@if (!displayLineClamp()) {\n @if (!isInnerText()) {\n <div\n LibsUiComponentsLineClampDirective\n [lengthLimitDisplay]=\"lengthLimitDisplay()\"\n [ignoreThreeDots]=\"hasBackgroundGradient()\"\n methodDisplay=\"innerHTML\"\n class=\"overflow-hidden\"\n [content]=\"content()\"\n [ngClass]=\"ngClassObject()\"\n [style.maxHeight.px]=\"maxHeight()\"\n [innerHtml]=\"content() | translate | LibsUiPipesSecurityTrustPipe: 'html' : useXssFilter() | async\"\n (click)=\"handlerClick($event)\"\n (outContentSub)=\"handlerContentSub($event)\"></div>\n } @else {\n <div\n LibsUiComponentsLineClampDirective\n [lengthLimitDisplay]=\"lengthLimitDisplay()\"\n [ignoreThreeDots]=\"hasBackgroundGradient()\"\n methodDisplay=\"innerText\"\n class=\"overflow-hidden\"\n [content]=\"content()\"\n [ngClass]=\"ngClassObject()\"\n [style.maxHeight.px]=\"maxHeight()\"\n [innerText]=\"content() | translate\"\n (click)=\"handlerClick($event)\"\n (outContentSub)=\"handlerContentSub($event)\"></div>\n }\n} @else {\n <libs_ui-components-popover\n class=\"relative\"\n type=\"other\"\n [ignoreShowPopover]=\"!showTooltip()\"\n [ignoreStopPropagationEvent]=\"ignoreStopPropagationTooltipEvent()\"\n [config]=\"{\n timerDestroy: timeHidePopoverOnMouseout(),\n maxWidth: maxWidthTooltip(),\n maxHeight: maxHeightTooltip(),\n direction: directionTooltip(),\n content: isInnerText() ? (this.content() | LibsUiPipesEscapeHtmlPipe) : this.content(),\n zIndex: zIndexPopover(),\n }\"\n (outEvent)=\"handlerClick($event)\">\n @if (isCollapse() && hasBackgroundGradient()) {\n <div class=\"h-[40px] libs-ui-line-clamp-bg-gradient\"></div>\n }\n @if (!isInnerText()) {\n <div\n [ngClass]=\"ngClassObject()\"\n [innerHtml]=\"contentDisplay() | translate | LibsUiPipesSecurityTrustPipe: 'html' : useXssFilter() | async\"></div>\n } @else {\n <div\n [ngClass]=\"ngClassObject()\"\n [innerText]=\"contentDisplay() | translate\"></div>\n }\n </libs_ui-components-popover>\n\n @if (!ignoreShowButtonCollapseExpand()) {\n @if (isCollapse()) {\n <libs_ui-components-buttons-button\n type=\"button-link-primary\"\n [label]=\"labelButtonViewMore() || 'i18n_view_more'\"\n [classInclude]=\"classClassIncludeButtonCollapseExpand()\"\n [classLabel]=\"classClassLabelButtonCollapseExpand()\"\n (outClick)=\"viewMore($event)\" />\n } @else {\n @if (!ignoreShowButtonCollapse()) {\n <libs_ui-components-buttons-button\n type=\"button-link-primary\"\n [label]=\"labelButtonCollapse() || 'i18n_collapse'\"\n [classInclude]=\"classClassIncludeButtonCollapseExpand()\"\n [classLabel]=\"classClassLabelButtonCollapseExpand()\"\n (outClick)=\"hiddenMore($event)\" />\n }\n }\n }\n}\n", styles: [".libs-ui-line-clamp-content{font-weight:400;text-align:start}.libs-ui-line-clamp-bg-gradient{opacity:.5;background:linear-gradient(180deg,#fff0,#fffffff2 51.56%,#fff);position:absolute;width:100%;bottom:0}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: LibsUiComponentsLineClampDirective, selector: "[LibsUiComponentsLineClampDirective]", inputs: ["lengthLimitDisplay", "methodDisplay", "content", "ignoreThreeDots"], outputs: ["outContentSub"] }, { kind: "pipe", type: LibsUiPipesSecurityTrustPipe, name: "LibsUiPipesSecurityTrustPipe" }, { kind: "pipe", type: LibsUiPipesEscapeHtmlPipe, name: "LibsUiPipesEscapeHtmlPipe" }, { kind: "component", type: LibsUiComponentsPopoverComponent, selector: "libs_ui-components-popover,[LibsUiComponentsPopoverDirective]", inputs: ["debugId", "flagMouse", "type", "mode", "config", "ignoreShowPopover", "elementRefCustom", "initEventInElementRefCustom", "classInclude", "ignoreHiddenPopoverContentWhenMouseLeave", "ignoreStopPropagationEvent", "ignoreCursorPointerModeLikeClick", "isAddContentToParentDocument", "ignoreClickOutside"], outputs: ["outEvent", "outChangStageFlagMouse", "outEventPopoverContent", "outFunctionsControl"] }, { kind: "component", type: LibsUiComponentsButtonsButtonComponent, selector: "libs_ui-components-buttons-button", inputs: ["flagMouse", "type", "buttonCustom", "sizeButton", "label", "disable", "isPending", "imageLeft", "classInclude", "classIconLeft", "classIconRight", "classLabel", "iconOnlyType", "popover", "ignoreStopPropagationEvent", "zIndex", "widthLabelPopover", "styleIconLeft", "styleButton", "ignoreFocusWhenInputTab", "ignoreSetClickWhenShowPopover", "ignorePointerEvent", "isActive", "isHandlerEnterDocumentClickButton"], outputs: ["outClick", "outPopoverEvent", "outFunctionsControl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
107
+ }
108
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsLineClampComponent, decorators: [{
109
+ type: Component,
110
+ args: [{ selector: 'libs_ui-components-line_clamp', standalone: true, imports: [NgClass, TranslateModule, AsyncPipe, LibsUiComponentsLineClampDirective, LibsUiPipesSecurityTrustPipe, LibsUiPipesEscapeHtmlPipe, LibsUiComponentsPopoverComponent, LibsUiComponentsButtonsButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (!displayLineClamp()) {\n @if (!isInnerText()) {\n <div\n LibsUiComponentsLineClampDirective\n [lengthLimitDisplay]=\"lengthLimitDisplay()\"\n [ignoreThreeDots]=\"hasBackgroundGradient()\"\n methodDisplay=\"innerHTML\"\n class=\"overflow-hidden\"\n [content]=\"content()\"\n [ngClass]=\"ngClassObject()\"\n [style.maxHeight.px]=\"maxHeight()\"\n [innerHtml]=\"content() | translate | LibsUiPipesSecurityTrustPipe: 'html' : useXssFilter() | async\"\n (click)=\"handlerClick($event)\"\n (outContentSub)=\"handlerContentSub($event)\"></div>\n } @else {\n <div\n LibsUiComponentsLineClampDirective\n [lengthLimitDisplay]=\"lengthLimitDisplay()\"\n [ignoreThreeDots]=\"hasBackgroundGradient()\"\n methodDisplay=\"innerText\"\n class=\"overflow-hidden\"\n [content]=\"content()\"\n [ngClass]=\"ngClassObject()\"\n [style.maxHeight.px]=\"maxHeight()\"\n [innerText]=\"content() | translate\"\n (click)=\"handlerClick($event)\"\n (outContentSub)=\"handlerContentSub($event)\"></div>\n }\n} @else {\n <libs_ui-components-popover\n class=\"relative\"\n type=\"other\"\n [ignoreShowPopover]=\"!showTooltip()\"\n [ignoreStopPropagationEvent]=\"ignoreStopPropagationTooltipEvent()\"\n [config]=\"{\n timerDestroy: timeHidePopoverOnMouseout(),\n maxWidth: maxWidthTooltip(),\n maxHeight: maxHeightTooltip(),\n direction: directionTooltip(),\n content: isInnerText() ? (this.content() | LibsUiPipesEscapeHtmlPipe) : this.content(),\n zIndex: zIndexPopover(),\n }\"\n (outEvent)=\"handlerClick($event)\">\n @if (isCollapse() && hasBackgroundGradient()) {\n <div class=\"h-[40px] libs-ui-line-clamp-bg-gradient\"></div>\n }\n @if (!isInnerText()) {\n <div\n [ngClass]=\"ngClassObject()\"\n [innerHtml]=\"contentDisplay() | translate | LibsUiPipesSecurityTrustPipe: 'html' : useXssFilter() | async\"></div>\n } @else {\n <div\n [ngClass]=\"ngClassObject()\"\n [innerText]=\"contentDisplay() | translate\"></div>\n }\n </libs_ui-components-popover>\n\n @if (!ignoreShowButtonCollapseExpand()) {\n @if (isCollapse()) {\n <libs_ui-components-buttons-button\n type=\"button-link-primary\"\n [label]=\"labelButtonViewMore() || 'i18n_view_more'\"\n [classInclude]=\"classClassIncludeButtonCollapseExpand()\"\n [classLabel]=\"classClassLabelButtonCollapseExpand()\"\n (outClick)=\"viewMore($event)\" />\n } @else {\n @if (!ignoreShowButtonCollapse()) {\n <libs_ui-components-buttons-button\n type=\"button-link-primary\"\n [label]=\"labelButtonCollapse() || 'i18n_collapse'\"\n [classInclude]=\"classClassIncludeButtonCollapseExpand()\"\n [classLabel]=\"classClassLabelButtonCollapseExpand()\"\n (outClick)=\"hiddenMore($event)\" />\n }\n }\n }\n}\n", styles: [".libs-ui-line-clamp-content{font-weight:400;text-align:start}.libs-ui-line-clamp-bg-gradient{opacity:.5;background:linear-gradient(180deg,#fff0,#fffffff2 51.56%,#fff);position:absolute;width:100%;bottom:0}\n"] }]
111
+ }], ctorParameters: () => [], propDecorators: { resize: [{
112
+ type: HostListener,
113
+ args: ['window:resize', ['$event']]
114
+ }] } });
115
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGluZS1jbGFtcC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzLXVpL2NvbXBvbmVudHMvbGluZS1jbGFtcC9zcmMvbGluZS1jbGFtcC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9saWJzLXVpL2NvbXBvbmVudHMvbGluZS1jbGFtcC9zcmMvbGluZS1jbGFtcC5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQ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fSBAZWxzZSB7XG4gICAgICBAaWYgKCFpZ25vcmVTaG93QnV0dG9uQ29sbGFwc2UoKSkge1xuICAgICAgICA8bGlic191aS1jb21wb25lbnRzLWJ1dHRvbnMtYnV0dG9uXG4gICAgICAgICAgdHlwZT1cImJ1dHRvbi1saW5rLXByaW1hcnlcIlxuICAgICAgICAgIFtsYWJlbF09XCJsYWJlbEJ1dHRvbkNvbGxhcHNlKCkgfHwgJ2kxOG5fY29sbGFwc2UnXCJcbiAgICAgICAgICBbY2xhc3NJbmNsdWRlXT1cImNsYXNzQ2xhc3NJbmNsdWRlQnV0dG9uQ29sbGFwc2VFeHBhbmQoKVwiXG4gICAgICAgICAgW2NsYXNzTGFiZWxdPVwiY2xhc3NDbGFzc0xhYmVsQnV0dG9uQ29sbGFwc2VFeHBhbmQoKVwiXG4gICAgICAgICAgKG91dENsaWNrKT1cImhpZGRlbk1vcmUoJGV2ZW50KVwiIC8+XG4gICAgICB9XG4gICAgfVxuICB9XG59XG4iXX0=
@@ -0,0 +1,71 @@
1
+ import { Directive, effect, ElementRef, inject, input, output, signal, untracked } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export class LibsUiComponentsLineClampDirective {
4
+ /** PROPERTY */
5
+ timeInterval = signal(undefined);
6
+ textView = signal('');
7
+ /** INPUT */
8
+ lengthLimitDisplay = input.required();
9
+ methodDisplay = input.required();
10
+ content = input.required();
11
+ ignoreThreeDots = input();
12
+ /** OUTPUT */
13
+ outContentSub = output();
14
+ /** INJECT */
15
+ elementRef = inject(ElementRef);
16
+ constructor() {
17
+ effect(() => {
18
+ if (!this.content() || !this.methodDisplay() || !this.lengthLimitDisplay()) {
19
+ return;
20
+ }
21
+ untracked(() => {
22
+ this.textView.set(this.content());
23
+ if (this.textView().length > this.lengthLimitDisplay()) {
24
+ this.textView.update((val) => val.substring(0, this.lengthLimitDisplay()));
25
+ }
26
+ if (!this.textView()) {
27
+ return;
28
+ }
29
+ this.process();
30
+ this.timeInterval.set(setInterval(() => {
31
+ this.process();
32
+ }, 250));
33
+ });
34
+ });
35
+ }
36
+ /** FUNCTIONS */
37
+ process() {
38
+ if (this.elementRef && this.elementRef.nativeElement[this.methodDisplay()]) {
39
+ clearInterval(this.timeInterval());
40
+ this.truncate();
41
+ }
42
+ }
43
+ truncate() {
44
+ let content = this.textView();
45
+ while (this.elementRef.nativeElement.scrollHeight - 2 > this.elementRef.nativeElement.offsetHeight) {
46
+ // them -2 fix loi tren windows https://admin-cv.mobio.vn/issues/48107
47
+ if (!content) {
48
+ return;
49
+ }
50
+ content = content.substring(0, content.length - 3);
51
+ this.elementRef.nativeElement[this.methodDisplay()] = this.ignoreThreeDots() ? content : `${content}...`;
52
+ }
53
+ if (content !== this.textView()) {
54
+ this.outContentSub.emit(this.ignoreThreeDots() ? content : `${content}...`);
55
+ }
56
+ }
57
+ ngOnDestroy() {
58
+ clearInterval(this.timeInterval());
59
+ }
60
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsLineClampDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
61
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.14", type: LibsUiComponentsLineClampDirective, isStandalone: true, selector: "[LibsUiComponentsLineClampDirective]", inputs: { lengthLimitDisplay: { classPropertyName: "lengthLimitDisplay", publicName: "lengthLimitDisplay", isSignal: true, isRequired: true, transformFunction: null }, methodDisplay: { classPropertyName: "methodDisplay", publicName: "methodDisplay", isSignal: true, isRequired: true, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null }, ignoreThreeDots: { classPropertyName: "ignoreThreeDots", publicName: "ignoreThreeDots", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outContentSub: "outContentSub" }, ngImport: i0 });
62
+ }
63
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsLineClampDirective, decorators: [{
64
+ type: Directive,
65
+ args: [{
66
+ // eslint-disable-next-line @angular-eslint/directive-selector
67
+ selector: '[LibsUiComponentsLineClampDirective]',
68
+ standalone: true,
69
+ }]
70
+ }], ctorParameters: () => [] });
71
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGluZS1jbGFtcC5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzLXVpL2NvbXBvbmVudHMvbGluZS1jbGFtcC9zcmMvbGluZS1jbGFtcC5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLEVBQUUsVUFBVSxFQUFFLE1BQU0sRUFBRSxLQUFLLEVBQWEsTUFBTSxFQUFFLE1BQU0sRUFBRSxTQUFTLEVBQUUsTUFBTSxlQUFlLENBQUM7O0FBT25ILE1BQU0sT0FBTyxrQ0FBa0M7SUFDN0MsZUFBZTtJQUNQLFlBQVksR0FBRyxNQUFNLENBQXFCLFNBQVMsQ0FBQyxDQUFDO0lBQ3JELFFBQVEsR0FBRyxNQUFNLENBQVMsRUFBRSxDQUFDLENBQUM7SUFFdEMsWUFBWTtJQUNILGtCQUFrQixHQUFHLEtBQUssQ0FBQyxRQUFRLEVBQVUsQ0FBQztJQUM5QyxhQUFhLEdBQUcsS0FBSyxDQUFDLFFBQVEsRUFBVSxDQUFDO0lBQ3pDLE9BQU8sR0FBRyxLQUFLLENBQUMsUUFBUSxFQUFVLENBQUM7SUFDbkMsZUFBZSxHQUFHLEtBQUssRUFBVyxDQUFDO0lBRTVDLGFBQWE7SUFDSixhQUFhLEdBQUcsTUFBTSxFQUFVLENBQUM7SUFFMUMsYUFBYTtJQUNJLFVBQVUsR0FBRyxNQUFNLENBQUMsVUFBVSxDQUFDLENBQUM7SUFFakQ7UUFDRSxNQUFNLENBQ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GhyZWVEb3RzKCkgPyBjb250ZW50IDogYCR7Y29udGVudH0uLi5gKTtcbiAgICB9XG4gIH1cbiAgbmdPbkRlc3Ryb3koKSB7XG4gICAgY2xlYXJJbnRlcnZhbCh0aGlzLnRpbWVJbnRlcnZhbCgpKTtcbiAgfVxufVxuIl19
@@ -0,0 +1,190 @@
1
+ import { NgClass, AsyncPipe } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { signal, input, output, inject, ElementRef, effect, untracked, Directive, HostListener, ChangeDetectionStrategy, Component } from '@angular/core';
4
+ import { LibsUiComponentsButtonsButtonComponent } from '@libs-ui/components-buttons-button';
5
+ import { LibsUiComponentsPopoverComponent } from '@libs-ui/components-popover';
6
+ import { LibsUiPipesEscapeHtmlPipe } from '@libs-ui/pipes-escape-html';
7
+ import { LibsUiPipesSecurityTrustPipe } from '@libs-ui/pipes-security-trust';
8
+ import * as i1 from '@ngx-translate/core';
9
+ import { TranslateModule } from '@ngx-translate/core';
10
+ import { isNil } from '@libs-ui/utils';
11
+
12
+ class LibsUiComponentsLineClampDirective {
13
+ /** PROPERTY */
14
+ timeInterval = signal(undefined);
15
+ textView = signal('');
16
+ /** INPUT */
17
+ lengthLimitDisplay = input.required();
18
+ methodDisplay = input.required();
19
+ content = input.required();
20
+ ignoreThreeDots = input();
21
+ /** OUTPUT */
22
+ outContentSub = output();
23
+ /** INJECT */
24
+ elementRef = inject(ElementRef);
25
+ constructor() {
26
+ effect(() => {
27
+ if (!this.content() || !this.methodDisplay() || !this.lengthLimitDisplay()) {
28
+ return;
29
+ }
30
+ untracked(() => {
31
+ this.textView.set(this.content());
32
+ if (this.textView().length > this.lengthLimitDisplay()) {
33
+ this.textView.update((val) => val.substring(0, this.lengthLimitDisplay()));
34
+ }
35
+ if (!this.textView()) {
36
+ return;
37
+ }
38
+ this.process();
39
+ this.timeInterval.set(setInterval(() => {
40
+ this.process();
41
+ }, 250));
42
+ });
43
+ });
44
+ }
45
+ /** FUNCTIONS */
46
+ process() {
47
+ if (this.elementRef && this.elementRef.nativeElement[this.methodDisplay()]) {
48
+ clearInterval(this.timeInterval());
49
+ this.truncate();
50
+ }
51
+ }
52
+ truncate() {
53
+ let content = this.textView();
54
+ while (this.elementRef.nativeElement.scrollHeight - 2 > this.elementRef.nativeElement.offsetHeight) {
55
+ // them -2 fix loi tren windows https://admin-cv.mobio.vn/issues/48107
56
+ if (!content) {
57
+ return;
58
+ }
59
+ content = content.substring(0, content.length - 3);
60
+ this.elementRef.nativeElement[this.methodDisplay()] = this.ignoreThreeDots() ? content : `${content}...`;
61
+ }
62
+ if (content !== this.textView()) {
63
+ this.outContentSub.emit(this.ignoreThreeDots() ? content : `${content}...`);
64
+ }
65
+ }
66
+ ngOnDestroy() {
67
+ clearInterval(this.timeInterval());
68
+ }
69
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsLineClampDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
70
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.14", type: LibsUiComponentsLineClampDirective, isStandalone: true, selector: "[LibsUiComponentsLineClampDirective]", inputs: { lengthLimitDisplay: { classPropertyName: "lengthLimitDisplay", publicName: "lengthLimitDisplay", isSignal: true, isRequired: true, transformFunction: null }, methodDisplay: { classPropertyName: "methodDisplay", publicName: "methodDisplay", isSignal: true, isRequired: true, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null }, ignoreThreeDots: { classPropertyName: "ignoreThreeDots", publicName: "ignoreThreeDots", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outContentSub: "outContentSub" }, ngImport: i0 });
71
+ }
72
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsLineClampDirective, decorators: [{
73
+ type: Directive,
74
+ args: [{
75
+ // eslint-disable-next-line @angular-eslint/directive-selector
76
+ selector: '[LibsUiComponentsLineClampDirective]',
77
+ standalone: true,
78
+ }]
79
+ }], ctorParameters: () => [] });
80
+
81
+ class LibsUiComponentsLineClampComponent {
82
+ /** PROPERTY */
83
+ displayLineClamp = signal(false);
84
+ isCollapse = signal(false);
85
+ contentClamp = signal('');
86
+ contentDisplay = signal('');
87
+ /** INPUT */
88
+ content = input.required();
89
+ lengthLimitDisplay = input(200, { transform: (val) => val || 200 });
90
+ maxHeight = input.required(); // maxHeight = (line-height của text)*(số dòng mong muốn)
91
+ ignoreShowButtonCollapseExpand = input();
92
+ ignoreShowButtonCollapse = input();
93
+ showTooltip = input();
94
+ timeHidePopoverOnMouseout = input(50, { transform: (val) => val ?? 50 });
95
+ maxWidthTooltip = input(250, { transform: (val) => val ?? 250 });
96
+ maxHeightTooltip = input(150, { transform: (val) => val ?? 150 });
97
+ zIndexPopover = input(1001, { transform: (val) => val ?? 1001 });
98
+ isInnerText = input(); // không cần escapeHTML content khi biến bằng true
99
+ classClassLabelButtonCollapseExpand = input('libs-ui-font-h5r', { transform: (val) => val ?? 'libs-ui-font-h5r' });
100
+ classClassIncludeButtonCollapseExpand = input('!p-0', { transform: (val) => val ?? '!p-0' });
101
+ ignoreStopPropagationTooltipEvent = input(false, { transform: (val) => val ?? false });
102
+ ngClassObject = input({ 'libs-ui-line-clamp-content libs-ui-font-h5r': true }, { transform: (val) => val || { 'libs-ui-line-clamp-content lib-ui-font-h5r': true } }); // object ngClass
103
+ hasBackgroundGradient = input(false, { transform: (val) => val ?? false });
104
+ labelButtonViewMore = input();
105
+ labelButtonCollapse = input();
106
+ directionTooltip = input('top', { transform: (val) => val ?? 'top' });
107
+ useXssFilter = input(true, { transform: (val) => val ?? true });
108
+ defaultIsCollapse = input(true, { transform: (val) => val ?? true });
109
+ /** OUTPUT */
110
+ outDisplayLineClamp = output();
111
+ outAction = output();
112
+ outClick = output();
113
+ outFunctionControl = output();
114
+ constructor() {
115
+ effect(() => {
116
+ if (!isNil(this.content())) {
117
+ untracked(() => {
118
+ this.contentDisplay.set('');
119
+ this.displayLineClamp.set(false);
120
+ this.isCollapse.set(false);
121
+ });
122
+ }
123
+ });
124
+ }
125
+ async ngOnInit() {
126
+ this.outFunctionControl.emit(this.FunctionsControl);
127
+ }
128
+ /** FUNCTIONS */
129
+ get FunctionsControl() {
130
+ return {
131
+ refresh: this.refresh.bind(this),
132
+ };
133
+ }
134
+ async handlerContentSub(content) {
135
+ if (this.content() !== content) {
136
+ this.displayLineClamp.set(true);
137
+ this.isCollapse.set(this.defaultIsCollapse());
138
+ this.contentClamp.set(content);
139
+ this.contentDisplay.set(this.isCollapse() ? content : this.content());
140
+ this.outDisplayLineClamp.emit(this.isCollapse());
141
+ }
142
+ }
143
+ async viewMore(e) {
144
+ e.stopPropagation();
145
+ this.isCollapse.set(false);
146
+ this.contentDisplay.set(this.content());
147
+ e.preventDefault();
148
+ this.outAction.emit('view-more');
149
+ }
150
+ async hiddenMore(e) {
151
+ e.stopPropagation();
152
+ this.isCollapse.set(true);
153
+ this.contentDisplay.set(this.contentClamp());
154
+ e.preventDefault();
155
+ this.outAction.emit('hidden-more');
156
+ }
157
+ async resize() {
158
+ this.refresh();
159
+ }
160
+ async refresh() {
161
+ this.contentDisplay.set(this.content());
162
+ this.displayLineClamp.set(false);
163
+ this.isCollapse.set(false);
164
+ }
165
+ async handlerClick(event) {
166
+ if (typeof event === 'string' && event !== 'click') {
167
+ return;
168
+ }
169
+ this.outClick.emit(event);
170
+ }
171
+ ngOnDestroy() {
172
+ this.displayLineClamp.set(false);
173
+ }
174
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsLineClampComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
175
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: LibsUiComponentsLineClampComponent, isStandalone: true, selector: "libs_ui-components-line_clamp", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null }, lengthLimitDisplay: { classPropertyName: "lengthLimitDisplay", publicName: "lengthLimitDisplay", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: true, transformFunction: null }, ignoreShowButtonCollapseExpand: { classPropertyName: "ignoreShowButtonCollapseExpand", publicName: "ignoreShowButtonCollapseExpand", isSignal: true, isRequired: false, transformFunction: null }, ignoreShowButtonCollapse: { classPropertyName: "ignoreShowButtonCollapse", publicName: "ignoreShowButtonCollapse", isSignal: true, isRequired: false, transformFunction: null }, showTooltip: { classPropertyName: "showTooltip", publicName: "showTooltip", isSignal: true, isRequired: false, transformFunction: null }, timeHidePopoverOnMouseout: { classPropertyName: "timeHidePopoverOnMouseout", publicName: "timeHidePopoverOnMouseout", isSignal: true, isRequired: false, transformFunction: null }, maxWidthTooltip: { classPropertyName: "maxWidthTooltip", publicName: "maxWidthTooltip", isSignal: true, isRequired: false, transformFunction: null }, maxHeightTooltip: { classPropertyName: "maxHeightTooltip", publicName: "maxHeightTooltip", isSignal: true, isRequired: false, transformFunction: null }, zIndexPopover: { classPropertyName: "zIndexPopover", publicName: "zIndexPopover", isSignal: true, isRequired: false, transformFunction: null }, isInnerText: { classPropertyName: "isInnerText", publicName: "isInnerText", isSignal: true, isRequired: false, transformFunction: null }, classClassLabelButtonCollapseExpand: { classPropertyName: "classClassLabelButtonCollapseExpand", publicName: "classClassLabelButtonCollapseExpand", isSignal: true, isRequired: false, transformFunction: null }, classClassIncludeButtonCollapseExpand: { classPropertyName: "classClassIncludeButtonCollapseExpand", publicName: "classClassIncludeButtonCollapseExpand", isSignal: true, isRequired: false, transformFunction: null }, ignoreStopPropagationTooltipEvent: { classPropertyName: "ignoreStopPropagationTooltipEvent", publicName: "ignoreStopPropagationTooltipEvent", isSignal: true, isRequired: false, transformFunction: null }, ngClassObject: { classPropertyName: "ngClassObject", publicName: "ngClassObject", isSignal: true, isRequired: false, transformFunction: null }, hasBackgroundGradient: { classPropertyName: "hasBackgroundGradient", publicName: "hasBackgroundGradient", isSignal: true, isRequired: false, transformFunction: null }, labelButtonViewMore: { classPropertyName: "labelButtonViewMore", publicName: "labelButtonViewMore", isSignal: true, isRequired: false, transformFunction: null }, labelButtonCollapse: { classPropertyName: "labelButtonCollapse", publicName: "labelButtonCollapse", isSignal: true, isRequired: false, transformFunction: null }, directionTooltip: { classPropertyName: "directionTooltip", publicName: "directionTooltip", isSignal: true, isRequired: false, transformFunction: null }, useXssFilter: { classPropertyName: "useXssFilter", publicName: "useXssFilter", isSignal: true, isRequired: false, transformFunction: null }, defaultIsCollapse: { classPropertyName: "defaultIsCollapse", publicName: "defaultIsCollapse", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outDisplayLineClamp: "outDisplayLineClamp", outAction: "outAction", outClick: "outClick", outFunctionControl: "outFunctionControl" }, host: { listeners: { "window:resize": "resize($event)" } }, ngImport: i0, template: "@if (!displayLineClamp()) {\n @if (!isInnerText()) {\n <div\n LibsUiComponentsLineClampDirective\n [lengthLimitDisplay]=\"lengthLimitDisplay()\"\n [ignoreThreeDots]=\"hasBackgroundGradient()\"\n methodDisplay=\"innerHTML\"\n class=\"overflow-hidden\"\n [content]=\"content()\"\n [ngClass]=\"ngClassObject()\"\n [style.maxHeight.px]=\"maxHeight()\"\n [innerHtml]=\"content() | translate | LibsUiPipesSecurityTrustPipe: 'html' : useXssFilter() | async\"\n (click)=\"handlerClick($event)\"\n (outContentSub)=\"handlerContentSub($event)\"></div>\n } @else {\n <div\n LibsUiComponentsLineClampDirective\n [lengthLimitDisplay]=\"lengthLimitDisplay()\"\n [ignoreThreeDots]=\"hasBackgroundGradient()\"\n methodDisplay=\"innerText\"\n class=\"overflow-hidden\"\n [content]=\"content()\"\n [ngClass]=\"ngClassObject()\"\n [style.maxHeight.px]=\"maxHeight()\"\n [innerText]=\"content() | translate\"\n (click)=\"handlerClick($event)\"\n (outContentSub)=\"handlerContentSub($event)\"></div>\n }\n} @else {\n <libs_ui-components-popover\n class=\"relative\"\n type=\"other\"\n [ignoreShowPopover]=\"!showTooltip()\"\n [ignoreStopPropagationEvent]=\"ignoreStopPropagationTooltipEvent()\"\n [config]=\"{\n timerDestroy: timeHidePopoverOnMouseout(),\n maxWidth: maxWidthTooltip(),\n maxHeight: maxHeightTooltip(),\n direction: directionTooltip(),\n content: isInnerText() ? (this.content() | LibsUiPipesEscapeHtmlPipe) : this.content(),\n zIndex: zIndexPopover(),\n }\"\n (outEvent)=\"handlerClick($event)\">\n @if (isCollapse() && hasBackgroundGradient()) {\n <div class=\"h-[40px] libs-ui-line-clamp-bg-gradient\"></div>\n }\n @if (!isInnerText()) {\n <div\n [ngClass]=\"ngClassObject()\"\n [innerHtml]=\"contentDisplay() | translate | LibsUiPipesSecurityTrustPipe: 'html' : useXssFilter() | async\"></div>\n } @else {\n <div\n [ngClass]=\"ngClassObject()\"\n [innerText]=\"contentDisplay() | translate\"></div>\n }\n </libs_ui-components-popover>\n\n @if (!ignoreShowButtonCollapseExpand()) {\n @if (isCollapse()) {\n <libs_ui-components-buttons-button\n type=\"button-link-primary\"\n [label]=\"labelButtonViewMore() || 'i18n_view_more'\"\n [classInclude]=\"classClassIncludeButtonCollapseExpand()\"\n [classLabel]=\"classClassLabelButtonCollapseExpand()\"\n (outClick)=\"viewMore($event)\" />\n } @else {\n @if (!ignoreShowButtonCollapse()) {\n <libs_ui-components-buttons-button\n type=\"button-link-primary\"\n [label]=\"labelButtonCollapse() || 'i18n_collapse'\"\n [classInclude]=\"classClassIncludeButtonCollapseExpand()\"\n [classLabel]=\"classClassLabelButtonCollapseExpand()\"\n (outClick)=\"hiddenMore($event)\" />\n }\n }\n }\n}\n", styles: [".libs-ui-line-clamp-content{font-weight:400;text-align:start}.libs-ui-line-clamp-bg-gradient{opacity:.5;background:linear-gradient(180deg,#fff0,#fffffff2 51.56%,#fff);position:absolute;width:100%;bottom:0}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: LibsUiComponentsLineClampDirective, selector: "[LibsUiComponentsLineClampDirective]", inputs: ["lengthLimitDisplay", "methodDisplay", "content", "ignoreThreeDots"], outputs: ["outContentSub"] }, { kind: "pipe", type: LibsUiPipesSecurityTrustPipe, name: "LibsUiPipesSecurityTrustPipe" }, { kind: "pipe", type: LibsUiPipesEscapeHtmlPipe, name: "LibsUiPipesEscapeHtmlPipe" }, { kind: "component", type: LibsUiComponentsPopoverComponent, selector: "libs_ui-components-popover,[LibsUiComponentsPopoverDirective]", inputs: ["debugId", "flagMouse", "type", "mode", "config", "ignoreShowPopover", "elementRefCustom", "initEventInElementRefCustom", "classInclude", "ignoreHiddenPopoverContentWhenMouseLeave", "ignoreStopPropagationEvent", "ignoreCursorPointerModeLikeClick", "isAddContentToParentDocument", "ignoreClickOutside"], outputs: ["outEvent", "outChangStageFlagMouse", "outEventPopoverContent", "outFunctionsControl"] }, { kind: "component", type: LibsUiComponentsButtonsButtonComponent, selector: "libs_ui-components-buttons-button", inputs: ["flagMouse", "type", "buttonCustom", "sizeButton", "label", "disable", "isPending", "imageLeft", "classInclude", "classIconLeft", "classIconRight", "classLabel", "iconOnlyType", "popover", "ignoreStopPropagationEvent", "zIndex", "widthLabelPopover", "styleIconLeft", "styleButton", "ignoreFocusWhenInputTab", "ignoreSetClickWhenShowPopover", "ignorePointerEvent", "isActive", "isHandlerEnterDocumentClickButton"], outputs: ["outClick", "outPopoverEvent", "outFunctionsControl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
176
+ }
177
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsLineClampComponent, decorators: [{
178
+ type: Component,
179
+ args: [{ selector: 'libs_ui-components-line_clamp', standalone: true, imports: [NgClass, TranslateModule, AsyncPipe, LibsUiComponentsLineClampDirective, LibsUiPipesSecurityTrustPipe, LibsUiPipesEscapeHtmlPipe, LibsUiComponentsPopoverComponent, LibsUiComponentsButtonsButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (!displayLineClamp()) {\n @if (!isInnerText()) {\n <div\n LibsUiComponentsLineClampDirective\n [lengthLimitDisplay]=\"lengthLimitDisplay()\"\n [ignoreThreeDots]=\"hasBackgroundGradient()\"\n methodDisplay=\"innerHTML\"\n class=\"overflow-hidden\"\n [content]=\"content()\"\n [ngClass]=\"ngClassObject()\"\n [style.maxHeight.px]=\"maxHeight()\"\n [innerHtml]=\"content() | translate | LibsUiPipesSecurityTrustPipe: 'html' : useXssFilter() | async\"\n (click)=\"handlerClick($event)\"\n (outContentSub)=\"handlerContentSub($event)\"></div>\n } @else {\n <div\n LibsUiComponentsLineClampDirective\n [lengthLimitDisplay]=\"lengthLimitDisplay()\"\n [ignoreThreeDots]=\"hasBackgroundGradient()\"\n methodDisplay=\"innerText\"\n class=\"overflow-hidden\"\n [content]=\"content()\"\n [ngClass]=\"ngClassObject()\"\n [style.maxHeight.px]=\"maxHeight()\"\n [innerText]=\"content() | translate\"\n (click)=\"handlerClick($event)\"\n (outContentSub)=\"handlerContentSub($event)\"></div>\n }\n} @else {\n <libs_ui-components-popover\n class=\"relative\"\n type=\"other\"\n [ignoreShowPopover]=\"!showTooltip()\"\n [ignoreStopPropagationEvent]=\"ignoreStopPropagationTooltipEvent()\"\n [config]=\"{\n timerDestroy: timeHidePopoverOnMouseout(),\n maxWidth: maxWidthTooltip(),\n maxHeight: maxHeightTooltip(),\n direction: directionTooltip(),\n content: isInnerText() ? (this.content() | LibsUiPipesEscapeHtmlPipe) : this.content(),\n zIndex: zIndexPopover(),\n }\"\n (outEvent)=\"handlerClick($event)\">\n @if (isCollapse() && hasBackgroundGradient()) {\n <div class=\"h-[40px] libs-ui-line-clamp-bg-gradient\"></div>\n }\n @if (!isInnerText()) {\n <div\n [ngClass]=\"ngClassObject()\"\n [innerHtml]=\"contentDisplay() | translate | LibsUiPipesSecurityTrustPipe: 'html' : useXssFilter() | async\"></div>\n } @else {\n <div\n [ngClass]=\"ngClassObject()\"\n [innerText]=\"contentDisplay() | translate\"></div>\n }\n </libs_ui-components-popover>\n\n @if (!ignoreShowButtonCollapseExpand()) {\n @if (isCollapse()) {\n <libs_ui-components-buttons-button\n type=\"button-link-primary\"\n [label]=\"labelButtonViewMore() || 'i18n_view_more'\"\n [classInclude]=\"classClassIncludeButtonCollapseExpand()\"\n [classLabel]=\"classClassLabelButtonCollapseExpand()\"\n (outClick)=\"viewMore($event)\" />\n } @else {\n @if (!ignoreShowButtonCollapse()) {\n <libs_ui-components-buttons-button\n type=\"button-link-primary\"\n [label]=\"labelButtonCollapse() || 'i18n_collapse'\"\n [classInclude]=\"classClassIncludeButtonCollapseExpand()\"\n [classLabel]=\"classClassLabelButtonCollapseExpand()\"\n (outClick)=\"hiddenMore($event)\" />\n }\n }\n }\n}\n", styles: [".libs-ui-line-clamp-content{font-weight:400;text-align:start}.libs-ui-line-clamp-bg-gradient{opacity:.5;background:linear-gradient(180deg,#fff0,#fffffff2 51.56%,#fff);position:absolute;width:100%;bottom:0}\n"] }]
180
+ }], ctorParameters: () => [], propDecorators: { resize: [{
181
+ type: HostListener,
182
+ args: ['window:resize', ['$event']]
183
+ }] } });
184
+
185
+ /**
186
+ * Generated bundle index. Do not edit.
187
+ */
188
+
189
+ export { LibsUiComponentsLineClampComponent };
190
+ //# sourceMappingURL=libs-ui-components-line-clamp.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"libs-ui-components-line-clamp.mjs","sources":["../../../../../libs-ui/components/line-clamp/src/line-clamp.directive.ts","../../../../../libs-ui/components/line-clamp/src/line-clamp.component.ts","../../../../../libs-ui/components/line-clamp/src/line-clamp.component.html","../../../../../libs-ui/components/line-clamp/src/libs-ui-components-line-clamp.ts"],"sourcesContent":["import { Directive, effect, ElementRef, inject, input, OnDestroy, output, signal, untracked } from '@angular/core';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[LibsUiComponentsLineClampDirective]',\n standalone: true,\n})\nexport class LibsUiComponentsLineClampDirective implements OnDestroy {\n /** PROPERTY */\n private timeInterval = signal<number | undefined>(undefined);\n private textView = signal<string>('');\n\n /** INPUT */\n readonly lengthLimitDisplay = input.required<number>();\n readonly methodDisplay = input.required<string>();\n readonly content = input.required<string>();\n readonly ignoreThreeDots = input<boolean>();\n\n /** OUTPUT */\n readonly outContentSub = output<string>();\n\n /** INJECT */\n private readonly elementRef = inject(ElementRef);\n\n constructor() {\n effect(() => {\n if (!this.content() || !this.methodDisplay() || !this.lengthLimitDisplay()) {\n return;\n }\n untracked(() => {\n this.textView.set(this.content());\n if (this.textView().length > this.lengthLimitDisplay()) {\n this.textView.update((val) => val.substring(0, this.lengthLimitDisplay()));\n }\n\n if (!this.textView()) {\n return;\n }\n this.process();\n this.timeInterval.set(\n setInterval(() => {\n this.process();\n }, 250)\n );\n });\n });\n }\n\n /** FUNCTIONS */\n\n private process() {\n if (this.elementRef && this.elementRef.nativeElement[this.methodDisplay()]) {\n clearInterval(this.timeInterval());\n this.truncate();\n }\n }\n\n private truncate() {\n let content = this.textView();\n while (this.elementRef.nativeElement.scrollHeight - 2 > this.elementRef.nativeElement.offsetHeight) {\n // them -2 fix loi tren windows https://admin-cv.mobio.vn/issues/48107\n if (!content) {\n return;\n }\n content = content.substring(0, content.length - 3);\n this.elementRef.nativeElement[this.methodDisplay()] = this.ignoreThreeDots() ? content : `${content}...`;\n }\n if (content !== this.textView()) {\n this.outContentSub.emit(this.ignoreThreeDots() ? content : `${content}...`);\n }\n }\n ngOnDestroy() {\n clearInterval(this.timeInterval());\n }\n}\n","import { AsyncPipe, NgClass } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, HostListener, OnDestroy, OnInit, effect, input, output, signal, untracked } from '@angular/core';\nimport { LibsUiComponentsButtonsButtonComponent } from '@libs-ui/components-buttons-button';\nimport { LibsUiComponentsPopoverComponent, TYPE_POPOVER_DIRECTION, TYPE_POPOVER_EVENT } from '@libs-ui/components-popover';\nimport { LibsUiPipesEscapeHtmlPipe } from '@libs-ui/pipes-escape-html';\nimport { LibsUiPipesSecurityTrustPipe } from '@libs-ui/pipes-security-trust';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { ILineClampFunctionControlEvent } from './interfaces';\nimport { LibsUiComponentsLineClampDirective } from './line-clamp.directive';\nimport { TYPE_OBJECT } from '@libs-ui/interfaces-types';\nimport { isNil } from '@libs-ui/utils';\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'libs_ui-components-line_clamp',\n templateUrl: './line-clamp.component.html',\n styleUrls: ['./line-clamp.component.scss'],\n standalone: true,\n imports: [NgClass, TranslateModule, AsyncPipe, LibsUiComponentsLineClampDirective, LibsUiPipesSecurityTrustPipe, LibsUiPipesEscapeHtmlPipe, LibsUiComponentsPopoverComponent, LibsUiComponentsButtonsButtonComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LibsUiComponentsLineClampComponent implements OnInit, OnDestroy {\n /** PROPERTY */\n protected displayLineClamp = signal<boolean>(false);\n protected isCollapse = signal<boolean>(false);\n protected contentClamp = signal<string>('');\n protected contentDisplay = signal<string>('');\n\n /** INPUT */\n readonly content = input.required<string>();\n readonly lengthLimitDisplay = input<number, number | undefined>(200, { transform: (val) => val || 200 });\n readonly maxHeight = input.required<number>(); // maxHeight = (line-height của text)*(số dòng mong muốn)\n readonly ignoreShowButtonCollapseExpand = input<boolean>();\n readonly ignoreShowButtonCollapse = input<boolean>();\n readonly showTooltip = input<boolean>();\n readonly timeHidePopoverOnMouseout = input<number, number | undefined>(50, { transform: (val) => val ?? 50 });\n readonly maxWidthTooltip = input<number, number | undefined>(250, { transform: (val) => val ?? 250 });\n readonly maxHeightTooltip = input<number, number | undefined>(150, { transform: (val) => val ?? 150 });\n readonly zIndexPopover = input<number, number | undefined>(1001, { transform: (val) => val ?? 1001 });\n readonly isInnerText = input<boolean>(); // không cần escapeHTML content khi biến bằng true\n readonly classClassLabelButtonCollapseExpand = input<string, string | undefined>('libs-ui-font-h5r', { transform: (val) => val ?? 'libs-ui-font-h5r' });\n readonly classClassIncludeButtonCollapseExpand = input<string, string | undefined>('!p-0', { transform: (val) => val ?? '!p-0' });\n readonly ignoreStopPropagationTooltipEvent = input<boolean, boolean | undefined>(false, { transform: (val) => val ?? false });\n readonly ngClassObject = input<TYPE_OBJECT, TYPE_OBJECT | undefined>({ 'libs-ui-line-clamp-content libs-ui-font-h5r': true }, { transform: (val) => val || { 'libs-ui-line-clamp-content lib-ui-font-h5r': true } }); // object ngClass\n readonly hasBackgroundGradient = input<boolean, boolean | undefined>(false, { transform: (val) => val ?? false });\n readonly labelButtonViewMore = input<string>();\n readonly labelButtonCollapse = input<string>();\n readonly directionTooltip = input<TYPE_POPOVER_DIRECTION, TYPE_POPOVER_DIRECTION | undefined>('top', { transform: (val) => val ?? 'top' });\n readonly useXssFilter = input<boolean, boolean | undefined>(true, { transform: (val) => val ?? true });\n readonly defaultIsCollapse = input<boolean, boolean | undefined>(true, { transform: (val) => val ?? true });\n\n /** OUTPUT */\n protected readonly outDisplayLineClamp = output<boolean>();\n protected readonly outAction = output<string>();\n protected readonly outClick = output<Event | TYPE_POPOVER_EVENT>();\n protected readonly outFunctionControl = output<ILineClampFunctionControlEvent>();\n\n constructor() {\n effect(() => {\n if (!isNil(this.content())) {\n untracked(() => {\n this.contentDisplay.set('');\n this.displayLineClamp.set(false);\n this.isCollapse.set(false);\n });\n }\n });\n }\n\n async ngOnInit() {\n this.outFunctionControl.emit(this.FunctionsControl);\n }\n\n /** FUNCTIONS */\n public get FunctionsControl(): ILineClampFunctionControlEvent {\n return {\n refresh: this.refresh.bind(this),\n };\n }\n\n protected async handlerContentSub(content: string) {\n if (this.content() !== content) {\n this.displayLineClamp.set(true);\n this.isCollapse.set(this.defaultIsCollapse());\n this.contentClamp.set(content);\n this.contentDisplay.set(this.isCollapse() ? content : this.content());\n this.outDisplayLineClamp.emit(this.isCollapse());\n }\n }\n\n protected async viewMore(e: Event) {\n e.stopPropagation();\n this.isCollapse.set(false);\n this.contentDisplay.set(this.content());\n e.preventDefault();\n this.outAction.emit('view-more');\n }\n\n protected async hiddenMore(e: Event) {\n e.stopPropagation();\n this.isCollapse.set(true);\n this.contentDisplay.set(this.contentClamp());\n e.preventDefault();\n this.outAction.emit('hidden-more');\n }\n\n @HostListener('window:resize', ['$event'])\n protected async resize() {\n this.refresh();\n }\n\n protected async refresh() {\n this.contentDisplay.set(this.content());\n this.displayLineClamp.set(false);\n this.isCollapse.set(false);\n }\n\n protected async handlerClick(event: Event | TYPE_POPOVER_EVENT) {\n if (typeof event === 'string' && event !== 'click') {\n return;\n }\n this.outClick.emit(event);\n }\n\n ngOnDestroy() {\n this.displayLineClamp.set(false);\n }\n}\n","@if (!displayLineClamp()) {\n @if (!isInnerText()) {\n <div\n LibsUiComponentsLineClampDirective\n [lengthLimitDisplay]=\"lengthLimitDisplay()\"\n [ignoreThreeDots]=\"hasBackgroundGradient()\"\n methodDisplay=\"innerHTML\"\n class=\"overflow-hidden\"\n [content]=\"content()\"\n [ngClass]=\"ngClassObject()\"\n [style.maxHeight.px]=\"maxHeight()\"\n [innerHtml]=\"content() | translate | LibsUiPipesSecurityTrustPipe: 'html' : useXssFilter() | async\"\n (click)=\"handlerClick($event)\"\n (outContentSub)=\"handlerContentSub($event)\"></div>\n } @else {\n <div\n LibsUiComponentsLineClampDirective\n [lengthLimitDisplay]=\"lengthLimitDisplay()\"\n [ignoreThreeDots]=\"hasBackgroundGradient()\"\n methodDisplay=\"innerText\"\n class=\"overflow-hidden\"\n [content]=\"content()\"\n [ngClass]=\"ngClassObject()\"\n [style.maxHeight.px]=\"maxHeight()\"\n [innerText]=\"content() | translate\"\n (click)=\"handlerClick($event)\"\n (outContentSub)=\"handlerContentSub($event)\"></div>\n }\n} @else {\n <libs_ui-components-popover\n class=\"relative\"\n type=\"other\"\n [ignoreShowPopover]=\"!showTooltip()\"\n [ignoreStopPropagationEvent]=\"ignoreStopPropagationTooltipEvent()\"\n [config]=\"{\n timerDestroy: timeHidePopoverOnMouseout(),\n maxWidth: maxWidthTooltip(),\n maxHeight: maxHeightTooltip(),\n direction: directionTooltip(),\n content: isInnerText() ? (this.content() | LibsUiPipesEscapeHtmlPipe) : this.content(),\n zIndex: zIndexPopover(),\n }\"\n (outEvent)=\"handlerClick($event)\">\n @if (isCollapse() && hasBackgroundGradient()) {\n <div class=\"h-[40px] libs-ui-line-clamp-bg-gradient\"></div>\n }\n @if (!isInnerText()) {\n <div\n [ngClass]=\"ngClassObject()\"\n [innerHtml]=\"contentDisplay() | translate | LibsUiPipesSecurityTrustPipe: 'html' : useXssFilter() | async\"></div>\n } @else {\n <div\n [ngClass]=\"ngClassObject()\"\n [innerText]=\"contentDisplay() | translate\"></div>\n }\n </libs_ui-components-popover>\n\n @if (!ignoreShowButtonCollapseExpand()) {\n @if (isCollapse()) {\n <libs_ui-components-buttons-button\n type=\"button-link-primary\"\n [label]=\"labelButtonViewMore() || 'i18n_view_more'\"\n [classInclude]=\"classClassIncludeButtonCollapseExpand()\"\n [classLabel]=\"classClassLabelButtonCollapseExpand()\"\n (outClick)=\"viewMore($event)\" />\n } @else {\n @if (!ignoreShowButtonCollapse()) {\n <libs_ui-components-buttons-button\n type=\"button-link-primary\"\n [label]=\"labelButtonCollapse() || 'i18n_collapse'\"\n [classInclude]=\"classClassIncludeButtonCollapseExpand()\"\n [classLabel]=\"classClassLabelButtonCollapseExpand()\"\n (outClick)=\"hiddenMore($event)\" />\n }\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAOa,kCAAkC,CAAA;;AAErC,IAAA,YAAY,GAAG,MAAM,CAAqB,SAAS,CAAC;AACpD,IAAA,QAAQ,GAAG,MAAM,CAAS,EAAE,CAAC;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,mCAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,MAAA,EAAA,cAAA,EAAA,YAAA,EAAA,OAAA,EAAA,SAAA,EAAA,WAAA,EAAA,WAAA,EAAA,cAAA,EAAA,eAAA,EAAA,gBAAA,EAAA,YAAA,EAAA,cAAA,EAAA,SAAA,EAAA,4BAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,eAAA,EAAA,aAAA,EAAA,yBAAA,EAAA,+BAAA,EAAA,oBAAA,EAAA,UAAA,EAAA,mCAAA,CAAA,EAAA,OAAA,EAAA,CAAA,UAAA,EAAA,iBAAA,EAAA,qBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAGzM,kCAAkC,EAAA,UAAA,EAAA,CAAA;kBAT9C,SAAS;+BAEE,+BAA+B,EAAA,UAAA,EAG7B,IAAI,EAAA,OAAA,EACP,CAAC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,kCAAkC,EAAE,4BAA4B,EAAE,yBAAyB,EAAE,gCAAgC,EAAE,sCAAsC,CAAC,EAAA,eAAA,EACpM,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,65FAAA,EAAA,MAAA,EAAA,CAAA,iNAAA,CAAA,EAAA;wDAwF/B,MAAM,EAAA,CAAA;sBADrB,YAAY;uBAAC,eAAe,EAAE,CAAC,QAAQ,CAAC;;;AEzG3C;;AAEG;;;;"}
package/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './line-clamp.component';
2
+ export * from './interfaces';
@@ -0,0 +1,11 @@
1
+ import { TYPE_OBJECT } from '@libs-ui/interfaces-types';
2
+ export interface ILineClampConfig {
3
+ maxHeight?: number;
4
+ class?: string;
5
+ ignoreShowButtonCollapseExpand?: boolean;
6
+ showTooltip?: boolean;
7
+ maxWidthTooltip?: number;
8
+ maxHeightTooltip?: number;
9
+ ngClassObject?: TYPE_OBJECT;
10
+ isInnerText?: boolean;
11
+ }
@@ -0,0 +1,3 @@
1
+ export interface ILineClampFunctionControlEvent {
2
+ refresh: () => Promise<void>;
3
+ }
@@ -0,0 +1,2 @@
1
+ export * from './config.interface';
2
+ export * from './function-control.interface';
@@ -0,0 +1,52 @@
1
+ import { OnDestroy, OnInit } from '@angular/core';
2
+ import { TYPE_POPOVER_DIRECTION, TYPE_POPOVER_EVENT } from '@libs-ui/components-popover';
3
+ import { ILineClampFunctionControlEvent } from './interfaces';
4
+ import { TYPE_OBJECT } from '@libs-ui/interfaces-types';
5
+ import * as i0 from "@angular/core";
6
+ export declare class LibsUiComponentsLineClampComponent implements OnInit, OnDestroy {
7
+ /** PROPERTY */
8
+ protected displayLineClamp: import("@angular/core").WritableSignal<boolean>;
9
+ protected isCollapse: import("@angular/core").WritableSignal<boolean>;
10
+ protected contentClamp: import("@angular/core").WritableSignal<string>;
11
+ protected contentDisplay: import("@angular/core").WritableSignal<string>;
12
+ /** INPUT */
13
+ readonly content: import("@angular/core").InputSignal<string>;
14
+ readonly lengthLimitDisplay: import("@angular/core").InputSignalWithTransform<number, number | undefined>;
15
+ readonly maxHeight: import("@angular/core").InputSignal<number>;
16
+ readonly ignoreShowButtonCollapseExpand: import("@angular/core").InputSignal<boolean | undefined>;
17
+ readonly ignoreShowButtonCollapse: import("@angular/core").InputSignal<boolean | undefined>;
18
+ readonly showTooltip: import("@angular/core").InputSignal<boolean | undefined>;
19
+ readonly timeHidePopoverOnMouseout: import("@angular/core").InputSignalWithTransform<number, number | undefined>;
20
+ readonly maxWidthTooltip: import("@angular/core").InputSignalWithTransform<number, number | undefined>;
21
+ readonly maxHeightTooltip: import("@angular/core").InputSignalWithTransform<number, number | undefined>;
22
+ readonly zIndexPopover: import("@angular/core").InputSignalWithTransform<number, number | undefined>;
23
+ readonly isInnerText: import("@angular/core").InputSignal<boolean | undefined>;
24
+ readonly classClassLabelButtonCollapseExpand: import("@angular/core").InputSignalWithTransform<string, string | undefined>;
25
+ readonly classClassIncludeButtonCollapseExpand: import("@angular/core").InputSignalWithTransform<string, string | undefined>;
26
+ readonly ignoreStopPropagationTooltipEvent: import("@angular/core").InputSignalWithTransform<boolean, boolean | undefined>;
27
+ readonly ngClassObject: import("@angular/core").InputSignalWithTransform<TYPE_OBJECT, TYPE_OBJECT | undefined>;
28
+ readonly hasBackgroundGradient: import("@angular/core").InputSignalWithTransform<boolean, boolean | undefined>;
29
+ readonly labelButtonViewMore: import("@angular/core").InputSignal<string | undefined>;
30
+ readonly labelButtonCollapse: import("@angular/core").InputSignal<string | undefined>;
31
+ readonly directionTooltip: import("@angular/core").InputSignalWithTransform<TYPE_POPOVER_DIRECTION, TYPE_POPOVER_DIRECTION | undefined>;
32
+ readonly useXssFilter: import("@angular/core").InputSignalWithTransform<boolean, boolean | undefined>;
33
+ readonly defaultIsCollapse: import("@angular/core").InputSignalWithTransform<boolean, boolean | undefined>;
34
+ /** OUTPUT */
35
+ protected readonly outDisplayLineClamp: import("@angular/core").OutputEmitterRef<boolean>;
36
+ protected readonly outAction: import("@angular/core").OutputEmitterRef<string>;
37
+ protected readonly outClick: import("@angular/core").OutputEmitterRef<Event | TYPE_POPOVER_EVENT>;
38
+ protected readonly outFunctionControl: import("@angular/core").OutputEmitterRef<ILineClampFunctionControlEvent>;
39
+ constructor();
40
+ ngOnInit(): Promise<void>;
41
+ /** FUNCTIONS */
42
+ get FunctionsControl(): ILineClampFunctionControlEvent;
43
+ protected handlerContentSub(content: string): Promise<void>;
44
+ protected viewMore(e: Event): Promise<void>;
45
+ protected hiddenMore(e: Event): Promise<void>;
46
+ protected resize(): Promise<void>;
47
+ protected refresh(): Promise<void>;
48
+ protected handlerClick(event: Event | TYPE_POPOVER_EVENT): Promise<void>;
49
+ ngOnDestroy(): void;
50
+ static ɵfac: i0.ɵɵFactoryDeclaration<LibsUiComponentsLineClampComponent, never>;
51
+ static ɵcmp: i0.ɵɵComponentDeclaration<LibsUiComponentsLineClampComponent, "libs_ui-components-line_clamp", never, { "content": { "alias": "content"; "required": true; "isSignal": true; }; "lengthLimitDisplay": { "alias": "lengthLimitDisplay"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": true; "isSignal": true; }; "ignoreShowButtonCollapseExpand": { "alias": "ignoreShowButtonCollapseExpand"; "required": false; "isSignal": true; }; "ignoreShowButtonCollapse": { "alias": "ignoreShowButtonCollapse"; "required": false; "isSignal": true; }; "showTooltip": { "alias": "showTooltip"; "required": false; "isSignal": true; }; "timeHidePopoverOnMouseout": { "alias": "timeHidePopoverOnMouseout"; "required": false; "isSignal": true; }; "maxWidthTooltip": { "alias": "maxWidthTooltip"; "required": false; "isSignal": true; }; "maxHeightTooltip": { "alias": "maxHeightTooltip"; "required": false; "isSignal": true; }; "zIndexPopover": { "alias": "zIndexPopover"; "required": false; "isSignal": true; }; "isInnerText": { "alias": "isInnerText"; "required": false; "isSignal": true; }; "classClassLabelButtonCollapseExpand": { "alias": "classClassLabelButtonCollapseExpand"; "required": false; "isSignal": true; }; "classClassIncludeButtonCollapseExpand": { "alias": "classClassIncludeButtonCollapseExpand"; "required": false; "isSignal": true; }; "ignoreStopPropagationTooltipEvent": { "alias": "ignoreStopPropagationTooltipEvent"; "required": false; "isSignal": true; }; "ngClassObject": { "alias": "ngClassObject"; "required": false; "isSignal": true; }; "hasBackgroundGradient": { "alias": "hasBackgroundGradient"; "required": false; "isSignal": true; }; "labelButtonViewMore": { "alias": "labelButtonViewMore"; "required": false; "isSignal": true; }; "labelButtonCollapse": { "alias": "labelButtonCollapse"; "required": false; "isSignal": true; }; "directionTooltip": { "alias": "directionTooltip"; "required": false; "isSignal": true; }; "useXssFilter": { "alias": "useXssFilter"; "required": false; "isSignal": true; }; "defaultIsCollapse": { "alias": "defaultIsCollapse"; "required": false; "isSignal": true; }; }, { "outDisplayLineClamp": "outDisplayLineClamp"; "outAction": "outAction"; "outClick": "outClick"; "outFunctionControl": "outFunctionControl"; }, never, never, true, never>;
52
+ }
@@ -0,0 +1,23 @@
1
+ import { OnDestroy } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class LibsUiComponentsLineClampDirective implements OnDestroy {
4
+ /** PROPERTY */
5
+ private timeInterval;
6
+ private textView;
7
+ /** INPUT */
8
+ readonly lengthLimitDisplay: import("@angular/core").InputSignal<number>;
9
+ readonly methodDisplay: import("@angular/core").InputSignal<string>;
10
+ readonly content: import("@angular/core").InputSignal<string>;
11
+ readonly ignoreThreeDots: import("@angular/core").InputSignal<boolean | undefined>;
12
+ /** OUTPUT */
13
+ readonly outContentSub: import("@angular/core").OutputEmitterRef<string>;
14
+ /** INJECT */
15
+ private readonly elementRef;
16
+ constructor();
17
+ /** FUNCTIONS */
18
+ private process;
19
+ private truncate;
20
+ ngOnDestroy(): void;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<LibsUiComponentsLineClampDirective, never>;
22
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LibsUiComponentsLineClampDirective, "[LibsUiComponentsLineClampDirective]", never, { "lengthLimitDisplay": { "alias": "lengthLimitDisplay"; "required": true; "isSignal": true; }; "methodDisplay": { "alias": "methodDisplay"; "required": true; "isSignal": true; }; "content": { "alias": "content"; "required": true; "isSignal": true; }; "ignoreThreeDots": { "alias": "ignoreThreeDots"; "required": false; "isSignal": true; }; }, { "outContentSub": "outContentSub"; }, never, never, true, never>;
23
+ }
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@libs-ui/components-line-clamp",
3
+ "version": "0.1.1-1",
4
+ "peerDependencies": {
5
+ "@angular/common": ">=18.0.0",
6
+ "@angular/core": ">=18.0.0",
7
+ "@libs-ui/interfaces-types": "0.1.1-1",
8
+ "@libs-ui/components-buttons-button": "0.1.1-1",
9
+ "@libs-ui/components-popover": "0.1.1-1",
10
+ "@libs-ui/pipes-escape-html": "0.1.1-1",
11
+ "@libs-ui/pipes-security-trust": "0.1.1-1",
12
+ "@ngx-translate/core": "^15.0.0",
13
+ "@libs-ui/utils": "0.1.1-1"
14
+ },
15
+ "sideEffects": false,
16
+ "module": "fesm2022/libs-ui-components-line-clamp.mjs",
17
+ "typings": "index.d.ts",
18
+ "exports": {
19
+ "./package.json": {
20
+ "default": "./package.json"
21
+ },
22
+ ".": {
23
+ "types": "./index.d.ts",
24
+ "esm2022": "./esm2022/libs-ui-components-line-clamp.mjs",
25
+ "esm": "./esm2022/libs-ui-components-line-clamp.mjs",
26
+ "default": "./fesm2022/libs-ui-components-line-clamp.mjs"
27
+ }
28
+ },
29
+ "dependencies": {
30
+ "tslib": "^2.3.0"
31
+ }
32
+ }