@libs-ui/components-line-clamp 0.2.78

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,3 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ export {};
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLmludGVyZmFjZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMtdWkvY29tcG9uZW50cy9saW5lLWNsYW1wL3NyYy9pbnRlcmZhY2VzL2NvbmZpZy5pbnRlcmZhY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsdURBQXVEIiwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuXG5leHBvcnQgaW50ZXJmYWNlIElMaW5lQ2xhbXBDb25maWcge1xuICBtYXhIZWlnaHQ/OiBudW1iZXI7XG4gIGNsYXNzPzogc3RyaW5nO1xuICBpZ25vcmVTaG93QnV0dG9uQ29sbGFwc2VFeHBhbmQ/OiBib29sZWFuO1xuICBzaG93VG9vbHRpcD86IGJvb2xlYW47XG4gIG1heFdpZHRoUG9wb3Zlcj86IG51bWJlcjtcbiAgbWF4SGVpZ2h0UG9wb3Zlcj86IG51bWJlcjtcbiAgbmdDbGFzc09iamVjdD86IFJlY29yZDxhbnksIGFueT47XG4gIGlzSW5uZXJUZXh0PzogYm9vbGVhbjtcbn1cbiJdfQ==
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnVuY3Rpb24tY29udHJvbC5pbnRlcmZhY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzLXVpL2NvbXBvbmVudHMvbGluZS1jbGFtcC9zcmMvaW50ZXJmYWNlcy9mdW5jdGlvbi1jb250cm9sLmludGVyZmFjZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGludGVyZmFjZSBJTGluZUNsYW1wRnVuY3Rpb25Db250cm9sRXZlbnQge1xuICByZWZyZXNoOiAoKSA9PiBQcm9taXNlPHZvaWQ+O1xufVxuXG4iXX0=
@@ -0,0 +1,3 @@
1
+ export * from './config.interface';
2
+ export * from './function-control.interface';
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzLXVpL2NvbXBvbmVudHMvbGluZS1jbGFtcC9zcmMvaW50ZXJmYWNlcy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLG9CQUFvQixDQUFDO0FBQ25DLGNBQWMsOEJBQThCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2NvbmZpZy5pbnRlcmZhY2UnO1xuZXhwb3J0ICogZnJvbSAnLi9mdW5jdGlvbi1jb250cm9sLmludGVyZmFjZSc7Il19
@@ -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,117 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ import { AsyncPipe, NgClass } from '@angular/common';
3
+ import { ChangeDetectionStrategy, Component, HostListener, effect, input, output, signal, untracked } 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 { TranslateModule } from '@ngx-translate/core';
9
+ import { LibsUiComponentsLineClampDirective } from './line-clamp.directive';
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
+ maxWidthPopover = input(250, { transform: val => val ?? 250 });
27
+ maxHeightPopover = 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
+ ;
40
+ /** OUTPUT */
41
+ outDisplayLineClamp = output();
42
+ outAction = output();
43
+ outClick = output();
44
+ outFunctionControl = output();
45
+ constructor() {
46
+ effect(() => {
47
+ untracked(() => {
48
+ this.contentDisplay.set(this.content());
49
+ this.displayLineClamp.set(false);
50
+ this.isCollapse.set(false);
51
+ });
52
+ });
53
+ }
54
+ async ngOnInit() {
55
+ this.outFunctionControl.emit({
56
+ refresh: this.refresh.bind(this)
57
+ });
58
+ }
59
+ /** FUNCTIONS */
60
+ async handlerContentSub(content) {
61
+ if (this.content() !== content) {
62
+ this.displayLineClamp.set(true);
63
+ this.isCollapse.set(true);
64
+ this.contentClamp.set(content);
65
+ this.contentDisplay.set(content);
66
+ this.outDisplayLineClamp.emit(true);
67
+ }
68
+ }
69
+ async viewMore(e) {
70
+ e.stopPropagation();
71
+ this.isCollapse.set(false);
72
+ this.contentDisplay.set(this.content());
73
+ e.preventDefault();
74
+ this.outAction.emit('view-more');
75
+ }
76
+ async hiddenMore(e) {
77
+ e.stopPropagation();
78
+ this.isCollapse.set(true);
79
+ this.contentDisplay.set(this.contentClamp());
80
+ e.preventDefault();
81
+ this.outAction.emit('hidden-more');
82
+ }
83
+ async resize() {
84
+ this.refresh();
85
+ }
86
+ async refresh() {
87
+ this.contentDisplay.set(this.content());
88
+ this.displayLineClamp.set(false);
89
+ this.isCollapse.set(false);
90
+ }
91
+ async handlerClick(event) {
92
+ if (typeof event === 'string' && event !== 'click') {
93
+ return;
94
+ }
95
+ this.outClick.emit(event);
96
+ }
97
+ ngOnDestroy() {
98
+ this.displayLineClamp.set(false);
99
+ }
100
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsLineClampComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
101
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", 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 }, maxWidthPopover: { classPropertyName: "maxWidthPopover", publicName: "maxWidthPopover", isSignal: true, isRequired: false, transformFunction: null }, maxHeightPopover: { classPropertyName: "maxHeightPopover", publicName: "maxHeightPopover", 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 } }, 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 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)\">\n </div>\n } @else {\n <div 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)\">\n </div>\n }\n}\n@else {\n <libs_ui-components-popover class=\"relative\"\n type=\"other\"\n [ignoreShowPopover]=\"!showTooltip()\"\n [ignoreStopPropagationEvent]=\"ignoreStopPropagationTooltipEvent()\"\n [config]=\"{\n timerDestroy:timeHidePopoverOnMouseout(),\n maxWidth:maxWidthPopover() ,\n maxHeight:maxHeightPopover(),\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 [ngClass]=\"ngClassObject()\"\n [innerHtml]=\"(contentDisplay() | translate | LibsUiPipesSecurityTrustPipe: 'html': useXssFilter()) | async\">\n </div>\n } @else {\n <div [ngClass]=\"ngClassObject()\"\n [innerText]=\"contentDisplay() | translate\">\n </div>\n }\n </libs_ui-components-popover>\n\n @if (!ignoreShowButtonCollapseExpand()) {\n @if (isCollapse()) {\n <libs_ui-components-buttons-button 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 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", "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"], outputs: ["outClick", "outPopoverEvent", "outFunctionsControl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
102
+ }
103
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsLineClampComponent, decorators: [{
104
+ type: Component,
105
+ args: [{ selector: 'libs_ui-components-line_clamp', standalone: true, imports: [
106
+ NgClass, TranslateModule, AsyncPipe,
107
+ LibsUiComponentsLineClampDirective,
108
+ LibsUiPipesSecurityTrustPipe,
109
+ LibsUiPipesEscapeHtmlPipe,
110
+ LibsUiComponentsPopoverComponent,
111
+ LibsUiComponentsButtonsButtonComponent
112
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (!displayLineClamp()) {\n @if (!isInnerText()) {\n <div 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)\">\n </div>\n } @else {\n <div 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)\">\n </div>\n }\n}\n@else {\n <libs_ui-components-popover class=\"relative\"\n type=\"other\"\n [ignoreShowPopover]=\"!showTooltip()\"\n [ignoreStopPropagationEvent]=\"ignoreStopPropagationTooltipEvent()\"\n [config]=\"{\n timerDestroy:timeHidePopoverOnMouseout(),\n maxWidth:maxWidthPopover() ,\n maxHeight:maxHeightPopover(),\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 [ngClass]=\"ngClassObject()\"\n [innerHtml]=\"(contentDisplay() | translate | LibsUiPipesSecurityTrustPipe: 'html': useXssFilter()) | async\">\n </div>\n } @else {\n <div [ngClass]=\"ngClassObject()\"\n [innerText]=\"contentDisplay() | translate\">\n </div>\n }\n </libs_ui-components-popover>\n\n @if (!ignoreShowButtonCollapseExpand()) {\n @if (isCollapse()) {\n <libs_ui-components-buttons-button 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 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"] }]
113
+ }], ctorParameters: () => [], propDecorators: { resize: [{
114
+ type: HostListener,
115
+ args: ['window:resize', ['$event']]
116
+ }] } });
117
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGluZS1jbGFtcC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzLXVpL2NvbXBvbmVudHMvbGluZS1jbGFtcC9zcmMvbGluZS1jbGFtcC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9saWJzLXVpL2NvbXBvbmVudHMvbGluZS1jbGFtcC9zcmMvbGluZS1jbGFtcC5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSx1REFBdUQ7QUFDdkQsT0FBTyxFQUFFLFNBQVMsRUFBRSxPQUFPLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUNyRCxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLFlBQVksRUFBcUIsTUFBTSxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsTUFBTSxFQUF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oKSkge1xuICAgICAgICA8bGlic191aS1jb21wb25lbnRzLWJ1dHRvbnMtYnV0dG9uIHR5cGU9XCJidXR0b24tbGluay1wcmltYXJ5XCJcbiAgICAgICAgICBbbGFiZWxdPVwibGFiZWxCdXR0b25Db2xsYXBzZSgpIHx8ICdpMThuX2NvbGxhcHNlJ1wiXG4gICAgICAgICAgW2NsYXNzSW5jbHVkZV09XCJjbGFzc0NsYXNzSW5jbHVkZUJ1dHRvbkNvbGxhcHNlRXhwYW5kKClcIlxuICAgICAgICAgIFtjbGFzc0xhYmVsXT1cImNsYXNzQ2xhc3NMYWJlbEJ1dHRvbkNvbGxhcHNlRXhwYW5kKClcIlxuICAgICAgICAgIChvdXRDbGljayk9XCJoaWRkZW5Nb3JlKCRldmVudClcIiAvPlxuICAgICAgfVxuICAgIH1cbiAgfVxufVxuIl19
@@ -0,0 +1,73 @@
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
+ console.log(this.elementRef.nativeElement);
46
+ while ((this.elementRef.nativeElement.scrollHeight - 2) > this.elementRef.nativeElement.offsetHeight) { // 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
+ console.log(content, this.textView(), content !== this.textView());
54
+ if (content !== this.textView()) {
55
+ console.log('vao day r');
56
+ this.outContentSub.emit(this.ignoreThreeDots() ? content : `${content}...`);
57
+ }
58
+ }
59
+ ngOnDestroy() {
60
+ clearInterval(this.timeInterval());
61
+ }
62
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsLineClampDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
63
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", 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 });
64
+ }
65
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsLineClampDirective, decorators: [{
66
+ type: Directive,
67
+ args: [{
68
+ // eslint-disable-next-line @angular-eslint/directive-selector
69
+ selector: '[LibsUiComponentsLineClampDirective]',
70
+ standalone: true
71
+ }]
72
+ }], ctorParameters: () => [] });
73
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGluZS1jbGFtcC5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzLXVpL2NvbXBvbmVudHMvbGluZS1jbGFtcC9zcmMvbGluZS1jbGFtcC5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLEVBQUUsVUFBVSxFQUFFLE1BQU0sRUFBRSxLQUFLLEVBQWEsTUFBTSxFQUFFLE1BQU0sRUFBRSxTQUFTLEVBQUUsTUFBTSxlQUFlLENBQUM7O0FBT25ILE1BQU0sT0FBTyxrQ0FBa0M7SUFFN0MsZUFBZTtJQUNQLFlBQVksR0FBRyxNQUFNLENBQXFCLFNBQVMsQ0FBQyxDQUFDO0lBQ3JELFFBQVEsR0FBRyxNQUFNLENBQVMsRUFBRSxDQUFDLENBQUM7SUFFdEMsWUFBWTtJQUNILGtCQUFrQixHQUFHLEtBQUssQ0FBQyxRQUFRLEVBQVUsQ0FBQztJQUM5QyxhQUFhLEdBQUcsS0FBSyxDQUFDLFFBQVEsRUFBVSxDQUFDO0lBQ3pDLE9BQU8sR0FBRyxLQUFLLENBQUMsUUFBUSxFQUFVLENBQUM7SUFDbkMsZUFBZSxHQUFHLEtBQUssRUFBVyxDQUFDO0lBRTVDLGFBQWE7SUFDSixhQUFhLEdBQUcsTUFBTSxFQUFVLENBQUM7SUFFMUMsYUFBYTtJQUNJLFVBQVUsR0FBRyxNQUFNLENBQUMsVUFBVSxDQUFDLENBQUM7SUFFakQ7UUFDRSxNQUFNLENBQUMsR0FBRyxFQUFFO1lBQ1Y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jb250ZW50LnN1YnN0cmluZygwLCBjb250ZW50Lmxlbmd0aCAtIDMpO1xuICAgICAgKHRoaXMuZWxlbWVudFJlZi5uYXRpdmVFbGVtZW50KVt0aGlzLm1ldGhvZERpc3BsYXkoKV0gPSB0aGlzLmlnbm9yZVRocmVlRG90cygpID8gY29udGVudCA6IGAke2NvbnRlbnR9Li4uYDtcbiAgICB9XG5cbiAgICBjb25zb2xlLmxvZyhjb250ZW50LCB0aGlzLnRleHRWaWV3KCksIGNvbnRlbnQgIT09IHRoaXMudGV4dFZpZXcoKSk7XG4gICAgaWYgKGNvbnRlbnQgIT09IHRoaXMudGV4dFZpZXcoKSkge1xuICAgICAgY29uc29sZS5sb2coJ3ZhbyBkYXkgcicpO1xuXG4gICAgICB0aGlzLm91dENvbnRlbnRTdWIuZW1pdCh0aGlzLmlnbm9yZVRocmVlRG90cygpID8gY29udGVudCA6IGAke2NvbnRlbnR9Li4uYCk7XG4gICAgfVxuICB9XG4gIG5nT25EZXN0cm95KCkge1xuICAgIGNsZWFySW50ZXJ2YWwodGhpcy50aW1lSW50ZXJ2YWwoKSk7XG4gIH1cbn1cbiJdfQ==
@@ -0,0 +1,196 @@
1
+ import { NgClass, AsyncPipe } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { signal, input, output, inject, ElementRef, effect, untracked, Directive, Component, ChangeDetectionStrategy, HostListener } 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
+
11
+ class LibsUiComponentsLineClampDirective {
12
+ /** PROPERTY */
13
+ timeInterval = signal(undefined);
14
+ textView = signal('');
15
+ /** INPUT */
16
+ lengthLimitDisplay = input.required();
17
+ methodDisplay = input.required();
18
+ content = input.required();
19
+ ignoreThreeDots = input();
20
+ /** OUTPUT */
21
+ outContentSub = output();
22
+ /** INJECT */
23
+ elementRef = inject(ElementRef);
24
+ constructor() {
25
+ effect(() => {
26
+ if (!this.content() || !this.methodDisplay() || !this.lengthLimitDisplay()) {
27
+ return;
28
+ }
29
+ untracked(() => {
30
+ this.textView.set(this.content());
31
+ if (this.textView().length > this.lengthLimitDisplay()) {
32
+ this.textView.update(val => val.substring(0, this.lengthLimitDisplay()));
33
+ }
34
+ if (!this.textView()) {
35
+ return;
36
+ }
37
+ this.process();
38
+ this.timeInterval.set(setInterval(() => {
39
+ this.process();
40
+ }, 250));
41
+ });
42
+ });
43
+ }
44
+ /** FUNCTIONS */
45
+ process() {
46
+ if (this.elementRef && this.elementRef.nativeElement[this.methodDisplay()]) {
47
+ clearInterval(this.timeInterval());
48
+ this.truncate();
49
+ }
50
+ }
51
+ truncate() {
52
+ let content = this.textView();
53
+ console.log(this.elementRef.nativeElement);
54
+ while ((this.elementRef.nativeElement.scrollHeight - 2) > this.elementRef.nativeElement.offsetHeight) { // them -2 fix loi tren windows https://admin-cv.mobio.vn/issues/48107
55
+ if (!content) {
56
+ return;
57
+ }
58
+ content = content.substring(0, content.length - 3);
59
+ (this.elementRef.nativeElement)[this.methodDisplay()] = this.ignoreThreeDots() ? content : `${content}...`;
60
+ }
61
+ console.log(content, this.textView(), content !== this.textView());
62
+ if (content !== this.textView()) {
63
+ console.log('vao day r');
64
+ this.outContentSub.emit(this.ignoreThreeDots() ? content : `${content}...`);
65
+ }
66
+ }
67
+ ngOnDestroy() {
68
+ clearInterval(this.timeInterval());
69
+ }
70
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsLineClampDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
71
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", 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 });
72
+ }
73
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsLineClampDirective, decorators: [{
74
+ type: Directive,
75
+ args: [{
76
+ // eslint-disable-next-line @angular-eslint/directive-selector
77
+ selector: '[LibsUiComponentsLineClampDirective]',
78
+ standalone: true
79
+ }]
80
+ }], ctorParameters: () => [] });
81
+
82
+ /* eslint-disable @typescript-eslint/no-explicit-any */
83
+ class LibsUiComponentsLineClampComponent {
84
+ /** PROPERTY */
85
+ displayLineClamp = signal(false);
86
+ isCollapse = signal(false);
87
+ contentClamp = signal('');
88
+ contentDisplay = signal('');
89
+ /** INPUT */
90
+ content = input.required();
91
+ lengthLimitDisplay = input(200, { transform: val => val || 200 });
92
+ maxHeight = input.required(); // maxHeight = (line-height của text)*(số dòng mong muốn)
93
+ ignoreShowButtonCollapseExpand = input();
94
+ ignoreShowButtonCollapse = input();
95
+ showTooltip = input();
96
+ timeHidePopoverOnMouseout = input(50, { transform: val => val ?? 50 });
97
+ maxWidthPopover = input(250, { transform: val => val ?? 250 });
98
+ maxHeightPopover = input(150, { transform: val => val ?? 150 });
99
+ zIndexPopover = input(1001, { transform: val => val ?? 1001 });
100
+ isInnerText = input(); // không cần escapeHTML content khi biến bằng true
101
+ classClassLabelButtonCollapseExpand = input('libs-ui-font-h5r', { transform: val => val ?? 'libs-ui-font-h5r' });
102
+ classClassIncludeButtonCollapseExpand = input('!p-0', { transform: val => val ?? '!p-0' });
103
+ ignoreStopPropagationTooltipEvent = input(false, { transform: val => val ?? false });
104
+ 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
105
+ hasBackgroundGradient = input(false, { transform: val => val ?? false });
106
+ labelButtonViewMore = input();
107
+ labelButtonCollapse = input();
108
+ directionTooltip = input('top', { transform: val => val ?? 'top' });
109
+ useXssFilter = input(true, { transform: val => val ?? true });
110
+ ;
111
+ /** OUTPUT */
112
+ outDisplayLineClamp = output();
113
+ outAction = output();
114
+ outClick = output();
115
+ outFunctionControl = output();
116
+ constructor() {
117
+ effect(() => {
118
+ untracked(() => {
119
+ this.contentDisplay.set(this.content());
120
+ this.displayLineClamp.set(false);
121
+ this.isCollapse.set(false);
122
+ });
123
+ });
124
+ }
125
+ async ngOnInit() {
126
+ this.outFunctionControl.emit({
127
+ refresh: this.refresh.bind(this)
128
+ });
129
+ }
130
+ /** FUNCTIONS */
131
+ async handlerContentSub(content) {
132
+ if (this.content() !== content) {
133
+ this.displayLineClamp.set(true);
134
+ this.isCollapse.set(true);
135
+ this.contentClamp.set(content);
136
+ this.contentDisplay.set(content);
137
+ this.outDisplayLineClamp.emit(true);
138
+ }
139
+ }
140
+ async viewMore(e) {
141
+ e.stopPropagation();
142
+ this.isCollapse.set(false);
143
+ this.contentDisplay.set(this.content());
144
+ e.preventDefault();
145
+ this.outAction.emit('view-more');
146
+ }
147
+ async hiddenMore(e) {
148
+ e.stopPropagation();
149
+ this.isCollapse.set(true);
150
+ this.contentDisplay.set(this.contentClamp());
151
+ e.preventDefault();
152
+ this.outAction.emit('hidden-more');
153
+ }
154
+ async resize() {
155
+ this.refresh();
156
+ }
157
+ async refresh() {
158
+ this.contentDisplay.set(this.content());
159
+ this.displayLineClamp.set(false);
160
+ this.isCollapse.set(false);
161
+ }
162
+ async handlerClick(event) {
163
+ if (typeof event === 'string' && event !== 'click') {
164
+ return;
165
+ }
166
+ this.outClick.emit(event);
167
+ }
168
+ ngOnDestroy() {
169
+ this.displayLineClamp.set(false);
170
+ }
171
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsLineClampComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
172
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", 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 }, maxWidthPopover: { classPropertyName: "maxWidthPopover", publicName: "maxWidthPopover", isSignal: true, isRequired: false, transformFunction: null }, maxHeightPopover: { classPropertyName: "maxHeightPopover", publicName: "maxHeightPopover", 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 } }, 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 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)\">\n </div>\n } @else {\n <div 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)\">\n </div>\n }\n}\n@else {\n <libs_ui-components-popover class=\"relative\"\n type=\"other\"\n [ignoreShowPopover]=\"!showTooltip()\"\n [ignoreStopPropagationEvent]=\"ignoreStopPropagationTooltipEvent()\"\n [config]=\"{\n timerDestroy:timeHidePopoverOnMouseout(),\n maxWidth:maxWidthPopover() ,\n maxHeight:maxHeightPopover(),\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 [ngClass]=\"ngClassObject()\"\n [innerHtml]=\"(contentDisplay() | translate | LibsUiPipesSecurityTrustPipe: 'html': useXssFilter()) | async\">\n </div>\n } @else {\n <div [ngClass]=\"ngClassObject()\"\n [innerText]=\"contentDisplay() | translate\">\n </div>\n }\n </libs_ui-components-popover>\n\n @if (!ignoreShowButtonCollapseExpand()) {\n @if (isCollapse()) {\n <libs_ui-components-buttons-button 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 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", "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"], outputs: ["outClick", "outPopoverEvent", "outFunctionsControl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
173
+ }
174
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LibsUiComponentsLineClampComponent, decorators: [{
175
+ type: Component,
176
+ args: [{ selector: 'libs_ui-components-line_clamp', standalone: true, imports: [
177
+ NgClass, TranslateModule, AsyncPipe,
178
+ LibsUiComponentsLineClampDirective,
179
+ LibsUiPipesSecurityTrustPipe,
180
+ LibsUiPipesEscapeHtmlPipe,
181
+ LibsUiComponentsPopoverComponent,
182
+ LibsUiComponentsButtonsButtonComponent
183
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (!displayLineClamp()) {\n @if (!isInnerText()) {\n <div 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)\">\n </div>\n } @else {\n <div 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)\">\n </div>\n }\n}\n@else {\n <libs_ui-components-popover class=\"relative\"\n type=\"other\"\n [ignoreShowPopover]=\"!showTooltip()\"\n [ignoreStopPropagationEvent]=\"ignoreStopPropagationTooltipEvent()\"\n [config]=\"{\n timerDestroy:timeHidePopoverOnMouseout(),\n maxWidth:maxWidthPopover() ,\n maxHeight:maxHeightPopover(),\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 [ngClass]=\"ngClassObject()\"\n [innerHtml]=\"(contentDisplay() | translate | LibsUiPipesSecurityTrustPipe: 'html': useXssFilter()) | async\">\n </div>\n } @else {\n <div [ngClass]=\"ngClassObject()\"\n [innerText]=\"contentDisplay() | translate\">\n </div>\n }\n </libs_ui-components-popover>\n\n @if (!ignoreShowButtonCollapseExpand()) {\n @if (isCollapse()) {\n <libs_ui-components-buttons-button 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 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"] }]
184
+ }], ctorParameters: () => [], propDecorators: { resize: [{
185
+ type: HostListener,
186
+ args: ['window:resize', ['$event']]
187
+ }] } });
188
+
189
+ /* eslint-disable @typescript-eslint/no-explicit-any */
190
+
191
+ /**
192
+ * Generated bundle index. Do not edit.
193
+ */
194
+
195
+ export { LibsUiComponentsLineClampComponent };
196
+ //# 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/interfaces/config.interface.ts","../../../../../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\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(setInterval(() => {\n this.process();\n }, 250));\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 console.log(this.elementRef.nativeElement);\n\n\n while ((this.elementRef.nativeElement.scrollHeight - 2) > this.elementRef.nativeElement.offsetHeight) { // 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\n console.log(content, this.textView(), content !== this.textView());\n if (content !== this.textView()) {\n console.log('vao day r');\n\n this.outContentSub.emit(this.ignoreThreeDots() ? content : `${content}...`);\n }\n }\n ngOnDestroy() {\n clearInterval(this.timeInterval());\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { 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';\n\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: [\n NgClass, TranslateModule, AsyncPipe,\n LibsUiComponentsLineClampDirective,\n LibsUiPipesSecurityTrustPipe,\n LibsUiPipesEscapeHtmlPipe,\n LibsUiComponentsPopoverComponent,\n LibsUiComponentsButtonsButtonComponent\n ],\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 maxWidthPopover = input<number, number | undefined>(250, { transform: val => val ?? 250 });\n readonly maxHeightPopover = 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<Record<any, any>, Record<any, any> | 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\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 untracked(() => {\n this.contentDisplay.set(this.content());\n this.displayLineClamp.set(false);\n this.isCollapse.set(false);\n })\n });\n }\n\n async ngOnInit() {\n this.outFunctionControl.emit({\n refresh: this.refresh.bind(this)\n });\n }\n\n /** FUNCTIONS */\n\n protected async handlerContentSub(content: string) {\n if (this.content() !== content) {\n this.displayLineClamp.set(true);\n this.isCollapse.set(true);\n this.contentClamp.set(content);\n this.contentDisplay.set(content);\n this.outDisplayLineClamp.emit(true);\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\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 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)\">\n </div>\n } @else {\n <div 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)\">\n </div>\n }\n}\n@else {\n <libs_ui-components-popover class=\"relative\"\n type=\"other\"\n [ignoreShowPopover]=\"!showTooltip()\"\n [ignoreStopPropagationEvent]=\"ignoreStopPropagationTooltipEvent()\"\n [config]=\"{\n timerDestroy:timeHidePopoverOnMouseout(),\n maxWidth:maxWidthPopover() ,\n maxHeight:maxHeightPopover(),\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 [ngClass]=\"ngClassObject()\"\n [innerHtml]=\"(contentDisplay() | translate | LibsUiPipesSecurityTrustPipe: 'html': useXssFilter()) | async\">\n </div>\n } @else {\n <div [ngClass]=\"ngClassObject()\"\n [innerText]=\"contentDisplay() | translate\">\n </div>\n }\n </libs_ui-components-popover>\n\n @if (!ignoreShowButtonCollapseExpand()) {\n @if (isCollapse()) {\n <libs_ui-components-buttons-button 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 type=\"button-link-primary\"\n [label]=\"labelButtonCollapse() || 'i18n_collapse'\"\n [classInclude]=\"classClassIncludeButtonCollapseExpand()\"\n [classLabel]=\"classClassLabelButtonCollapseExpand()\"\n (outClick)=\"hiddenMore($event)\" />\n }\n }\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\nexport interface ILineClampConfig {\n maxHeight?: number;\n class?: string;\n ignoreShowButtonCollapseExpand?: boolean;\n showTooltip?: boolean;\n maxWidthPopover?: number;\n maxHeightPopover?: number;\n ngClassObject?: Record<any, any>;\n isInnerText?: boolean;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MAOa,kCAAkC,CAAA;;AAGrC,IAAA,YAAY,GAAG,MAAM,CAAqB,SAAS,CAAC;AACpD,IAAA,QAAQ,GAAG,MAAM,CAAS,EAAE,CAAC;;AAG5B,IAAA,kBAAkB,GAAG,KAAK,CAAC,QAAQ,EAAU;AAC7C,IAAA,aAAa,GAAG,KAAK,CAAC,QAAQ,EAAU;AACxC,IAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,EAAU;IAClC,eAAe,GAAG,KAAK,EAAW;;IAGlC,aAAa,GAAG,MAAM,EAAU;;AAGxB,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAEhD,IAAA,WAAA,GAAA;QACE,MAAM,CAAC,MAAK;AACV,YAAA,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE;gBAC1E;;YAEF,SAAS,CAAC,MAAK;gBACb,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;AACjC,gBAAA,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,kBAAkB,EAAE,EAAE;oBACtD,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,C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AA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAC5B,yBAAyB,EACzB,IAAA,EAAA,2BAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,gCAAgC,qeAChC,sCAAsC,EAAA,QAAA,EAAA,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,CAAA,EAAA,OAAA,EAAA,CAAA,UAAA,EAAA,iBAAA,EAAA,qBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAI7B,kCAAkC,EAAA,UAAA,EAAA,CAAA;kBAhB9C,SAAS;+BAEE,+BAA+B,EAAA,UAAA,EAG7B,IAAI,EACP,OAAA,EAAA;wBACP,OAAO,EAAE,eAAe,EAAE,SAAS;wBACnC,kCAAkC;wBAClC,4BAA4B;wBAC5B,yBAAyB;wBACzB,gCAAgC;wBAChC;qBACD,EACgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,g4FAAA,EAAA,MAAA,EAAA,CAAA,iNAAA,CAAA,EAAA;wDAmF/B,MAAM,EAAA,CAAA;sBADrB,YAAY;uBAAC,eAAe,EAAE,CAAC,QAAQ,CAAC;;;AE3G3C;;ACAA;;AAEG;;;;"}
package/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './line-clamp.component';
2
+ export * from './interfaces';
@@ -0,0 +1,10 @@
1
+ export interface ILineClampConfig {
2
+ maxHeight?: number;
3
+ class?: string;
4
+ ignoreShowButtonCollapseExpand?: boolean;
5
+ showTooltip?: boolean;
6
+ maxWidthPopover?: number;
7
+ maxHeightPopover?: number;
8
+ ngClassObject?: Record<any, any>;
9
+ isInnerText?: boolean;
10
+ }
@@ -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,49 @@
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 * as i0 from "@angular/core";
5
+ export declare class LibsUiComponentsLineClampComponent implements OnInit, OnDestroy {
6
+ /** PROPERTY */
7
+ protected displayLineClamp: import("@angular/core").WritableSignal<boolean>;
8
+ protected isCollapse: import("@angular/core").WritableSignal<boolean>;
9
+ protected contentClamp: import("@angular/core").WritableSignal<string>;
10
+ protected contentDisplay: import("@angular/core").WritableSignal<string>;
11
+ /** INPUT */
12
+ readonly content: import("@angular/core").InputSignal<string>;
13
+ readonly lengthLimitDisplay: import("@angular/core").InputSignalWithTransform<number, number | undefined>;
14
+ readonly maxHeight: import("@angular/core").InputSignal<number>;
15
+ readonly ignoreShowButtonCollapseExpand: import("@angular/core").InputSignal<boolean | undefined>;
16
+ readonly ignoreShowButtonCollapse: import("@angular/core").InputSignal<boolean | undefined>;
17
+ readonly showTooltip: import("@angular/core").InputSignal<boolean | undefined>;
18
+ readonly timeHidePopoverOnMouseout: import("@angular/core").InputSignalWithTransform<number, number | undefined>;
19
+ readonly maxWidthPopover: import("@angular/core").InputSignalWithTransform<number, number | undefined>;
20
+ readonly maxHeightPopover: import("@angular/core").InputSignalWithTransform<number, number | undefined>;
21
+ readonly zIndexPopover: import("@angular/core").InputSignalWithTransform<number, number | undefined>;
22
+ readonly isInnerText: import("@angular/core").InputSignal<boolean | undefined>;
23
+ readonly classClassLabelButtonCollapseExpand: import("@angular/core").InputSignalWithTransform<string, string | undefined>;
24
+ readonly classClassIncludeButtonCollapseExpand: import("@angular/core").InputSignalWithTransform<string, string | undefined>;
25
+ readonly ignoreStopPropagationTooltipEvent: import("@angular/core").InputSignalWithTransform<boolean, boolean | undefined>;
26
+ readonly ngClassObject: import("@angular/core").InputSignalWithTransform<Record<any, any>, Record<any, any> | undefined>;
27
+ readonly hasBackgroundGradient: import("@angular/core").InputSignalWithTransform<boolean, boolean | undefined>;
28
+ readonly labelButtonViewMore: import("@angular/core").InputSignal<string | undefined>;
29
+ readonly labelButtonCollapse: import("@angular/core").InputSignal<string | undefined>;
30
+ readonly directionTooltip: import("@angular/core").InputSignalWithTransform<TYPE_POPOVER_DIRECTION, TYPE_POPOVER_DIRECTION | undefined>;
31
+ readonly useXssFilter: import("@angular/core").InputSignalWithTransform<boolean, boolean | undefined>;
32
+ /** OUTPUT */
33
+ protected readonly outDisplayLineClamp: import("@angular/core").OutputEmitterRef<boolean>;
34
+ protected readonly outAction: import("@angular/core").OutputEmitterRef<string>;
35
+ protected readonly outClick: import("@angular/core").OutputEmitterRef<Event | TYPE_POPOVER_EVENT>;
36
+ protected readonly outFunctionControl: import("@angular/core").OutputEmitterRef<ILineClampFunctionControlEvent>;
37
+ constructor();
38
+ ngOnInit(): Promise<void>;
39
+ /** FUNCTIONS */
40
+ protected handlerContentSub(content: string): Promise<void>;
41
+ protected viewMore(e: Event): Promise<void>;
42
+ protected hiddenMore(e: Event): Promise<void>;
43
+ protected resize(): Promise<void>;
44
+ protected refresh(): Promise<void>;
45
+ protected handlerClick(event: Event | TYPE_POPOVER_EVENT): Promise<void>;
46
+ ngOnDestroy(): void;
47
+ static ɵfac: i0.ɵɵFactoryDeclaration<LibsUiComponentsLineClampComponent, never>;
48
+ 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; }; "maxWidthPopover": { "alias": "maxWidthPopover"; "required": false; "isSignal": true; }; "maxHeightPopover": { "alias": "maxHeightPopover"; "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; }; }, { "outDisplayLineClamp": "outDisplayLineClamp"; "outAction": "outAction"; "outClick": "outClick"; "outFunctionControl": "outFunctionControl"; }, never, never, true, never>;
49
+ }
@@ -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,25 @@
1
+ {
2
+ "name": "@libs-ui/components-line-clamp",
3
+ "version": "0.2.78",
4
+ "peerDependencies": {
5
+ "@angular/common": "^18.2.0",
6
+ "@angular/core": "^18.2.0"
7
+ },
8
+ "sideEffects": false,
9
+ "module": "fesm2022/libs-ui-components-line-clamp.mjs",
10
+ "typings": "index.d.ts",
11
+ "exports": {
12
+ "./package.json": {
13
+ "default": "./package.json"
14
+ },
15
+ ".": {
16
+ "types": "./index.d.ts",
17
+ "esm2022": "./esm2022/libs-ui-components-line-clamp.mjs",
18
+ "esm": "./esm2022/libs-ui-components-line-clamp.mjs",
19
+ "default": "./fesm2022/libs-ui-components-line-clamp.mjs"
20
+ }
21
+ },
22
+ "dependencies": {
23
+ "tslib": "^2.3.0"
24
+ }
25
+ }