@tilde-nlp/ngx-common 6.1.87 → 6.1.89
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/esm2022/lib/llm/components/llm-rephrase/llm-rephrase.component.mjs +48 -0
- package/esm2022/lib/llm/components/llm-summary/llm-summary.component.mjs +48 -0
- package/esm2022/lib/llm/icons/llm-menu.icon.mjs +12 -5
- package/esm2022/lib/llm/llm.component.mjs +46 -44
- package/esm2022/lib/llm/llm.module.mjs +15 -9
- package/esm2022/lib/new-feature-dialog/index.mjs +2 -1
- package/esm2022/lib/new-feature-dialog/models/index.mjs +2 -0
- package/esm2022/lib/new-feature-dialog/models/mobile-screen-custom-position.model.mjs +2 -0
- package/esm2022/lib/new-feature-dialog/new-feature-dialog-wrapper/new-feature-dialog-wrapper.component.mjs +29 -22
- package/esm2022/lib/new-feature-dialog/new-feature-dialog-wrapper/new-feature-dialog.service.mjs +6 -10
- package/fesm2022/tilde-nlp-ngx-common.mjs +319 -220
- package/fesm2022/tilde-nlp-ngx-common.mjs.map +1 -1
- package/lib/llm/components/llm-rephrase/llm-rephrase.component.d.ts +11 -0
- package/lib/llm/components/llm-summary/llm-summary.component.d.ts +11 -0
- package/lib/llm/icons/llm-menu.icon.d.ts +2 -1
- package/lib/llm/llm.component.d.ts +4 -3
- package/lib/llm/llm.module.d.ts +16 -14
- package/lib/new-feature-dialog/index.d.ts +1 -0
- package/lib/new-feature-dialog/models/index.d.ts +1 -0
- package/lib/new-feature-dialog/models/mobile-screen-custom-position.model.d.ts +5 -0
- package/lib/new-feature-dialog/new-feature-dialog-wrapper/new-feature-dialog-wrapper.component.d.ts +3 -1
- package/lib/new-feature-dialog/new-feature-dialog-wrapper/new-feature-dialog.service.d.ts +1 -1
- package/package.json +1 -1
- package/web-components/main.js +23 -15
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, EventEmitter, Component, Output, Input, ViewChild, NgModule, Optional, Inject, Pipe, inject, Directive, HostListener, HostBinding, ViewChildren, input, effect, ElementRef, ContentChildren, ContentChild, InjectionToken, output, computed
|
|
2
|
+
import { Injectable, EventEmitter, Component, Output, Input, ViewChild, NgModule, Optional, Inject, Pipe, inject, Directive, HostListener, HostBinding, ViewChildren, input, effect, ElementRef, ContentChildren, ContentChild, InjectionToken, signal, output, computed } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/material/icon';
|
|
4
4
|
import { MatIconModule, MatIcon } from '@angular/material/icon';
|
|
5
5
|
import * as i2 from '@angular/platform-browser';
|
|
@@ -41,11 +41,11 @@ import { SelectionModel } from '@angular/cdk/collections';
|
|
|
41
41
|
import { MatSort, MatSortModule } from '@angular/material/sort';
|
|
42
42
|
import * as i4$2 from '@angular/material/table';
|
|
43
43
|
import { MatTableDataSource, MatNoDataRow, MatHeaderRowDef, MatRowDef, MatColumnDef, MatTable, MatTableModule } from '@angular/material/table';
|
|
44
|
-
import * as
|
|
44
|
+
import * as i6$1 from '@angular/material/menu';
|
|
45
45
|
import { MatMenuModule } from '@angular/material/menu';
|
|
46
46
|
import * as i7 from '@angular/material/checkbox';
|
|
47
47
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
48
|
-
import * as i5$
|
|
48
|
+
import * as i5$1 from '@angular/material/radio';
|
|
49
49
|
import { MatRadioModule } from '@angular/material/radio';
|
|
50
50
|
import * as i1$5 from '@tilde-nlp/ngx-services';
|
|
51
51
|
import { QuotaType, LLMRephraseUseCase, LLMSummaryUseCase } from '@tilde-nlp/ngx-services';
|
|
@@ -4415,7 +4415,7 @@ class MultiFunctionalTableComponent {
|
|
|
4415
4415
|
i0.ɵɵproperty("ngForOf", ctx.configurableColumns);
|
|
4416
4416
|
i0.ɵɵadvance(3);
|
|
4417
4417
|
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(31, 20, "MULTI_FUNCTIONAL_TABLE.COLUMN_SELECT_SAVE"), " ");
|
|
4418
|
-
} }, dependencies: [i1$2.NgForOf, i1$2.NgIf, i4$2.MatTable, i4$2.MatHeaderCellDef, i4$2.MatHeaderRowDef, i4$2.MatColumnDef, i4$2.MatCellDef, i4$2.MatRowDef, i4$2.MatHeaderCell, i4$2.MatCell, i4$2.MatHeaderRow, i4$2.MatRow, i4$2.MatNoDataRow, i2$1.MatButton, i2$1.MatIconButton,
|
|
4418
|
+
} }, dependencies: [i1$2.NgForOf, i1$2.NgIf, i4$2.MatTable, i4$2.MatHeaderCellDef, i4$2.MatHeaderRowDef, i4$2.MatColumnDef, i4$2.MatCellDef, i4$2.MatRowDef, i4$2.MatHeaderCell, i4$2.MatCell, i4$2.MatHeaderRow, i4$2.MatRow, i4$2.MatNoDataRow, i2$1.MatButton, i2$1.MatIconButton, i6$1.MatMenu, i6$1.MatMenuTrigger, i7.MatCheckbox, i4$1.NgControlStatus, i4$1.NgModel, FilterBarComponent, i2$3.DefaultLayoutDirective, i2$3.DefaultLayoutGapDirective, i2$3.DefaultLayoutAlignDirective, i2$3.DefaultFlexDirective, i3.DefaultClassDirective, i2$2.MatTooltip, StatusDisplayComponent, i1.MatIcon, i15.MatPaginator, i1$1.TranslatePipe], styles: ["[_nghost-%COMP%] th, [_nghost-%COMP%] tr{white-space:nowrap}[_nghost-%COMP%] td:not(:first-of-type){padding-right:10px!important}[_nghost-%COMP%] tr.mat-mdc-row:hover, [_nghost-%COMP%] tr.mat-mdc-row.highlight{background-color:var(--base-95)}[_nghost-%COMP%] tr.mat-mdc-row.highlight-error{background-color:var(--warning-light)}[_nghost-%COMP%] .export-data .mdc-button__label{display:flex;align-items:center}[_nghost-%COMP%] .mat-mdc-cell, [_nghost-%COMP%] .mat-mdc-header-cell, [_nghost-%COMP%] .mdc-data-table__row:last-child{border-bottom-color:var(--base-70)}[_nghost-%COMP%] .mdc-data-table__row:last-child{border-bottom-width:1px;border-bottom-style:solid}[_nghost-%COMP%] .mdc-data-table__cell:nth-child(2), [_nghost-%COMP%] .mdc-data-table__header-cell:nth-child(2){padding:0 16px 0 10px}[_nghost-%COMP%] td+.cdk-column-columnSelect{display:none}[_nghost-%COMP%] .clear-filters-wrapper .mat-mdc-icon-button, [_nghost-%COMP%] .clear-filters-wrapper .mat-mdc-icon-button .mat-mdc-button-touch-target{height:36px!important;width:36px!important}[_nghost-%COMP%] .clear-filters-wrapper mat-icon{margin-top:-2px;margin-left:-2px}[_nghost-%COMP%] .filter-active{background-color:var(--neutral-95)}[_nghost-%COMP%] .row-actions{opacity:0}[_nghost-%COMP%] .mobile .row-actions, [_nghost-%COMP%] .highlight .row-actions{opacity:1}[_nghost-%COMP%] .mat-mdc-paginator-range-actions button{padding:8px}table[_ngcontent-%COMP%]{width:100%}.wild-search-wrapper[_ngcontent-%COMP%]{position:relative;padding:5px 10px;border-radius:4px;border:1px solid var(--neutral-50);margin:0 8px}.wild-search-wrapper[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{margin-right:30px}.wild-search-wrapper[_ngcontent-%COMP%] .search-icon[_ngcontent-%COMP%]{color:var(--base-40)}.wild-search-wrapper[_ngcontent-%COMP%] .wild-search-clear-btn[_ngcontent-%COMP%]{position:absolute;right:3px}.wild-search-wrapper[_ngcontent-%COMP%] .mat-mdc-icon-button[_ngcontent-%COMP%], .wild-search-wrapper[_ngcontent-%COMP%] .mat-mdc-icon-button[_ngcontent-%COMP%] .mat-mdc-button-touch-target[_ngcontent-%COMP%]{height:33px!important;width:33px!important}.wild-search-wrapper[_ngcontent-%COMP%] .mat-mdc-icon-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%], .wild-search-wrapper[_ngcontent-%COMP%] .mat-mdc-icon-button[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%], .wild-search-wrapper[_ngcontent-%COMP%] .mat-mdc-icon-button[_ngcontent-%COMP%] .material-icons-outlined[_ngcontent-%COMP%]{top:5px!important;left:5px!important}.mobile[_ngcontent-%COMP%] .wild-search-wrapper[_ngcontent-%COMP%]{margin:0}.column-selector-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:end}.column-select-menu[_ngcontent-%COMP%]{padding:8px 18px 8px 8px}.column-select-save[_ngcontent-%COMP%]{padding-left:8px;padding-top:8px}.column-select-save[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.row-clickable[_ngcontent-%COMP%]{cursor:pointer}.row-clickable[_ngcontent-%COMP%]:active{background-color:var(--base-70)!important}.material-icons[_ngcontent-%COMP%], .material-icons-outlined[_ngcontent-%COMP%]{margin-right:.5rem}.table-action-button[_ngcontent-%COMP%]{margin-bottom:1rem}th.mat-mdc-header-cell[_ngcontent-%COMP%]:first-of-type, td.mat-mdc-cell[_ngcontent-%COMP%]:first-of-type, td.mat-mdc-footer-cell[_ngcontent-%COMP%]:first-of-type{padding:0 0 0 10px}.row-select[_ngcontent-%COMP%]{width:0}.table-overflow[_ngcontent-%COMP%]{overflow-x:auto}.table-dragable[_ngcontent-%COMP%]{cursor:grab;-webkit-user-select:none;user-select:none}.table-dragable[_ngcontent-%COMP%]:active{cursor:grabbing}.table-sticky-header[_ngcontent-%COMP%]{max-height:70vh}"] }); }
|
|
4419
4419
|
}
|
|
4420
4420
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MultiFunctionalTableComponent, [{
|
|
4421
4421
|
type: Component,
|
|
@@ -5752,7 +5752,7 @@ class TerminologyCollectionCardComponent {
|
|
|
5752
5752
|
i0.ɵɵtemplate(0, TerminologyCollectionCardComponent_ng_container_0_Template, 20, 17, "ng-container", 1);
|
|
5753
5753
|
} if (rf & 2) {
|
|
5754
5754
|
i0.ɵɵproperty("ngIf", ctx.collection);
|
|
5755
|
-
} }, dependencies: [i1$2.NgForOf, i1$2.NgIf, i2$3.DefaultLayoutDirective, i2$3.DefaultLayoutGapDirective, i2$3.DefaultLayoutAlignDirective, i2$3.DefaultFlexDirective, i2$1.MatButton, i2$1.MatIconAnchor, i1.MatIcon, i2$5.MatProgressSpinner, i5$
|
|
5755
|
+
} }, dependencies: [i1$2.NgForOf, i1$2.NgIf, i2$3.DefaultLayoutDirective, i2$3.DefaultLayoutGapDirective, i2$3.DefaultLayoutAlignDirective, i2$3.DefaultFlexDirective, i2$1.MatButton, i2$1.MatIconAnchor, i1.MatIcon, i2$5.MatProgressSpinner, i5$1.MatRadioButton, i2$2.MatTooltip, i1$2.UpperCasePipe, i1$1.TranslatePipe, DateAgoPipe], styles: [".collection-languages[_ngcontent-%COMP%]{display:flex;gap:2px}.collection-languages[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:12px;border-radius:100px;padding-right:8px;padding-left:8px;color:var(--base-40);background-color:var(--base-70)}"] }); }
|
|
5756
5756
|
}
|
|
5757
5757
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TerminologyCollectionCardComponent, [{
|
|
5758
5758
|
type: Component,
|
|
@@ -5913,7 +5913,7 @@ class TerminologyCollectionListComponent {
|
|
|
5913
5913
|
i0.ɵɵproperty("ngIf", !ctx.hasAnyCollections);
|
|
5914
5914
|
i0.ɵɵadvance();
|
|
5915
5915
|
i0.ɵɵproperty("ngIf", ctx.hasAnyCollections);
|
|
5916
|
-
} }, dependencies: [i1$2.NgForOf, i1$2.NgIf, i2$3.DefaultLayoutDirective, i2$3.DefaultLayoutAlignDirective, i5$
|
|
5916
|
+
} }, dependencies: [i1$2.NgForOf, i1$2.NgIf, i2$3.DefaultLayoutDirective, i2$3.DefaultLayoutAlignDirective, i5$1.MatRadioGroup, i5$1.MatRadioButton, TerminologyCollectionCardComponent, i1$1.TranslatePipe, LanguageTranslatePipe], styles: ["[_nghost-%COMP%] .tld-collection-list-body, [_nghost-%COMP%] .tld-collection-list-header{padding:.5em .75em}[_nghost-%COMP%] .term-window-unavailable{font-style:italic}[_nghost-%COMP%] .term-window-unavailable, [_nghost-%COMP%] .term-window-description span{font-weight:500}[_nghost-%COMP%] .collection-label{max-width:280px;overflow:hidden;text-overflow:ellipsis}[_nghost-%COMP%] .collection-label-block{display:block}[_nghost-%COMP%] .collection-status-labels .mat-icon, [_nghost-%COMP%] .collection-status-labels .material-icons{font-size:18px}[_nghost-%COMP%] .default-badge{background-color:#9aa5b1;color:var(--base-100);font-size:10px;border-radius:12px;padding:4px 8px;line-height:16px;display:inline-block;margin-left:5px}[_nghost-%COMP%] .mat-mdc-radio-button{overflow:hidden;padding:5px 0;place-content:start!important}[_nghost-%COMP%] .mat-mdc-radio-button .mat-radio-ripple{display:none}[_nghost-%COMP%] .mat-mdc-radio-button .mat-mdc-button{padding:0!important}[_nghost-%COMP%] .collection{min-height:70px}[_nghost-%COMP%] .collection-card{width:100%}[_nghost-%COMP%] .collection, [_nghost-%COMP%] .none-option{border-bottom:1px solid var(--base-70)}[_nghost-%COMP%] mat-spinner{display:inline-block}[_nghost-%COMP%] .mdc-radio__inner-circle{transform:scale(0)!important}[_nghost-%COMP%] .mdc-radio__outer-circle{border-color:inherit!important}[_nghost-%COMP%] .mat-mdc-radio-checked .mdc-radio__inner-circle{transform:scale(.5)!important}[_nghost-%COMP%] .mat-mdc-radio-checked .mdc-radio__outer-circle{border-color:var(--accent)!important}[_nghost-%COMP%] .mat-mdc-radio-checked .mdc-radio--disabled .mdc-radio__outer-circle{border-color:inherit!important}"] }); }
|
|
5917
5917
|
}
|
|
5918
5918
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TerminologyCollectionListComponent, [{
|
|
5919
5919
|
type: Component,
|
|
@@ -6461,7 +6461,7 @@ class TerminologyComponent {
|
|
|
6461
6461
|
i0.ɵɵproperty("ngIf", !ctx.hideGlossaryMenuWithoutCollections || ctx.hideGlossaryMenuWithoutCollections && ctx.hasAnyCollections);
|
|
6462
6462
|
i0.ɵɵadvance(5);
|
|
6463
6463
|
i0.ɵɵproperty("system", ctx.system)("selectedCollection", ctx.selected)("setSelectedFromLocalStorage", ctx.setSelectedFromLocalStorage);
|
|
6464
|
-
} }, dependencies: [i1$2.NgIf, OpenCloseButtonComponent, i2$3.DefaultLayoutGapDirective, i2$3.DefaultLayoutAlignDirective, i3.DefaultShowHideDirective, i3.DefaultClassDirective, CloseButtonComponent, i2$1.MatIconButton, i1.MatIcon, i2$5.MatProgressSpinner,
|
|
6464
|
+
} }, dependencies: [i1$2.NgIf, OpenCloseButtonComponent, i2$3.DefaultLayoutGapDirective, i2$3.DefaultLayoutAlignDirective, i3.DefaultShowHideDirective, i3.DefaultClassDirective, CloseButtonComponent, i2$1.MatIconButton, i1.MatIcon, i2$5.MatProgressSpinner, i6$1.MatMenu, i6$1.MatMenuTrigger, i2$2.MatTooltip, TerminologyPanelComponent, i1$1.TranslatePipe], styles: ["[_nghost-%COMP%] .mdc-circular-progress__circle-clipper, [_nghost-%COMP%] .mdc-circular-progress__indeterminate-circle-graphic{width:100%!important}.selected-col-spinner[_ngcontent-%COMP%]{margin-left:5px}.tld-collection-menu-button[_ngcontent-%COMP%] .selected-collection[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;max-width:140px;display:inline-block;white-space:nowrap}"] }); }
|
|
6465
6465
|
}
|
|
6466
6466
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TerminologyComponent, [{
|
|
6467
6467
|
type: Component,
|
|
@@ -7308,18 +7308,299 @@ class LLMTextareaWithActionsComponent {
|
|
|
7308
7308
|
}] }], null); })();
|
|
7309
7309
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LLMTextareaWithActionsComponent, { className: "LLMTextareaWithActionsComponent", filePath: "lib\\llm\\components\\llm-textarea-with-actions\\llm-textarea-with-actions.component.ts", lineNumber: 20 }); })();
|
|
7310
7310
|
|
|
7311
|
-
const
|
|
7312
|
-
<path d="
|
|
7313
|
-
<path d="
|
|
7314
|
-
<path d="
|
|
7311
|
+
const SUMMARIZE = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
7312
|
+
<path d="M4 5H18.6286V6.82857H4V5ZM4 10.4857H18.6286V8.65714H4V10.4857ZM4 14.1429H10.4V12.3143H4V14.1429ZM4 17.8H10.4V15.9714H4V17.8Z" fill="currentColor"/>
|
|
7313
|
+
<path d="M17.4005 13.3093C17.0801 12.5922 16.0622 12.5922 15.7418 13.3093L15.1052 14.7341L13.6804 15.3707C12.9633 15.6911 12.9633 16.709 13.6804 17.0294L15.1052 17.666L15.7418 19.0908C16.0622 19.8079 17.0801 19.8079 17.4005 19.0908L18.0371 17.666L19.4619 17.0294C20.179 16.709 20.179 15.6911 19.4619 15.3707L18.0371 14.7341L17.4005 13.3093Z" fill="currentColor"/>
|
|
7314
|
+
<path d="M13.5612 12.0546C13.4438 11.7917 13.0705 11.7917 12.953 12.0546L12.7196 12.577L12.1972 12.8105C11.9343 12.9279 11.9343 13.3012 12.1972 13.4187L12.7196 13.6521L12.953 14.1745C13.0705 14.4374 13.4438 14.4374 13.5612 14.1745L13.7947 13.6521L14.3171 13.4187C14.58 13.3012 14.58 12.9279 14.3171 12.8105L13.7947 12.577L13.5612 12.0546Z" fill="currentColor"/>
|
|
7315
|
+
</svg>
|
|
7316
|
+
`;
|
|
7317
|
+
const REPHRASE = `<svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
7318
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M19.879 4.16166L21.229 5.51166C22.019 6.29166 22.019 7.56166 21.229 8.34166L7.99897 21.5717H3.81897V17.3917L14.219 6.98166L17.049 4.16166C17.829 3.38166 19.099 3.38166 19.879 4.16166ZM5.81897 19.5717L7.22897 19.6317L17.049 9.80166L15.639 8.39166L5.81897 18.2117V19.5717Z" fill="currentColor"/>
|
|
7319
|
+
<path d="M19.5181 19.798L18.8644 21.261C18.6793 21.6752 18.0913 21.6752 17.9062 21.261L17.2526 19.798C17.1471 19.5621 16.9584 19.3734 16.7225 19.268L15.2595 18.6143C14.8453 18.4292 14.8453 17.8412 15.2595 17.6561L16.7225 17.0024C16.9584 16.897 17.1471 16.7083 17.2526 16.4724L17.9062 15.0094C18.0913 14.5952 18.6793 14.5952 18.8644 15.0094L19.5181 16.4724C19.6235 16.7083 19.8122 16.897 20.0481 17.0024L21.5111 17.6561C21.9253 17.8412 21.9253 18.4292 21.5111 18.6143L20.0481 19.268C19.8122 19.3734 19.6235 19.5621 19.5181 19.798Z" stroke="#474D53"/>
|
|
7320
|
+
<path d="M9.88502 3.56437C9.75242 3.26761 9.33117 3.26761 9.19857 3.56437L8.93512 4.15399L8.3455 4.41744C8.04874 4.55003 8.04874 4.97129 8.3455 5.10389L8.93512 5.36733L9.19857 5.95696C9.33117 6.25372 9.75242 6.25372 9.88502 5.95696L10.1485 5.36733L10.7381 5.10389C11.0349 4.97129 11.0349 4.55003 10.7381 4.41744L10.1485 4.15399L9.88502 3.56437Z" fill="currentColor"/>
|
|
7321
|
+
<path d="M6.50947 5.80395C6.31057 5.35881 5.67869 5.35881 5.4798 5.80395L5.08462 6.68839L4.20019 7.08356C3.75505 7.28245 3.75505 7.91434 4.20019 8.11323L5.08462 8.5084L5.4798 9.39284C5.67869 9.83798 6.31057 9.83798 6.50947 9.39284L6.90464 8.5084L7.78907 8.11323C8.23421 7.91434 8.23421 7.28245 7.78907 7.08356L6.90464 6.68839L6.50947 5.80395Z" fill="currentColor"/>
|
|
7315
7322
|
</svg>
|
|
7316
7323
|
`;
|
|
7317
7324
|
|
|
7318
7325
|
var icons = /*#__PURE__*/Object.freeze({
|
|
7319
7326
|
__proto__: null,
|
|
7320
|
-
|
|
7327
|
+
REPHRASE: REPHRASE,
|
|
7328
|
+
SUMMARIZE: SUMMARIZE
|
|
7321
7329
|
});
|
|
7322
7330
|
|
|
7331
|
+
class NewFeatureDialogComponent {
|
|
7332
|
+
constructor() {
|
|
7333
|
+
this.data = inject(MAT_DIALOG_DATA);
|
|
7334
|
+
}
|
|
7335
|
+
static { this.ɵfac = function NewFeatureDialogComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || NewFeatureDialogComponent)(); }; }
|
|
7336
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NewFeatureDialogComponent, selectors: [["lib-new-feature-dialog"]], standalone: true, features: [i0.ɵɵStandaloneFeature], decls: 10, vars: 9, consts: [["mat-dialog-title", ""], [1, "description", 3, "innerHTML"], ["mat-button", "", "mat-dialog-close", "", "color", "accent"]], template: function NewFeatureDialogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
7337
|
+
i0.ɵɵelementStart(0, "h2", 0);
|
|
7338
|
+
i0.ɵɵtext(1);
|
|
7339
|
+
i0.ɵɵpipe(2, "translate");
|
|
7340
|
+
i0.ɵɵelementEnd();
|
|
7341
|
+
i0.ɵɵelementStart(3, "mat-dialog-content");
|
|
7342
|
+
i0.ɵɵelement(4, "p", 1);
|
|
7343
|
+
i0.ɵɵpipe(5, "translate");
|
|
7344
|
+
i0.ɵɵelementEnd();
|
|
7345
|
+
i0.ɵɵelementStart(6, "mat-dialog-actions")(7, "button", 2);
|
|
7346
|
+
i0.ɵɵtext(8);
|
|
7347
|
+
i0.ɵɵpipe(9, "translate");
|
|
7348
|
+
i0.ɵɵelementEnd()();
|
|
7349
|
+
} if (rf & 2) {
|
|
7350
|
+
i0.ɵɵadvance();
|
|
7351
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 3, ctx.data.title));
|
|
7352
|
+
i0.ɵɵadvance(3);
|
|
7353
|
+
i0.ɵɵproperty("innerHTML", i0.ɵɵpipeBind1(5, 5, ctx.data.description), i0.ɵɵsanitizeHtml);
|
|
7354
|
+
i0.ɵɵadvance(4);
|
|
7355
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(9, 7, ctx.data.close), " ");
|
|
7356
|
+
} }, dependencies: [MatDialogModule, i1$4.MatDialogClose, i1$4.MatDialogTitle, i1$4.MatDialogActions, i1$4.MatDialogContent, MatButtonModule, i2$1.MatButton, TranslatePipe], styles: ["[_nghost-%COMP%] {display:inline-block;padding:12px 16px}[_nghost-%COMP%] .mat-mdc-dialog-title, [_nghost-%COMP%] mat-dialog-actions, [_nghost-%COMP%] mat-dialog-content{padding:0!important;margin:0!important}"] }); }
|
|
7357
|
+
}
|
|
7358
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NewFeatureDialogComponent, [{
|
|
7359
|
+
type: Component,
|
|
7360
|
+
args: [{ selector: 'lib-new-feature-dialog', standalone: true, imports: [MatDialogModule, MatButtonModule, TranslatePipe], template: "<h2 mat-dialog-title>{{ data.title | translate }}</h2>\r\n<mat-dialog-content>\r\n <p class=\"description\" [innerHTML]=\"data.description | translate\"></p>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <button mat-button mat-dialog-close color=\"accent\">\r\n {{ data.close | translate }}\r\n </button>\r\n</mat-dialog-actions>\r\n", styles: [":host ::ng-deep{display:inline-block;padding:12px 16px}:host ::ng-deep .mat-mdc-dialog-title,:host ::ng-deep mat-dialog-actions,:host ::ng-deep mat-dialog-content{padding:0!important;margin:0!important}\n"] }]
|
|
7361
|
+
}], null, null); })();
|
|
7362
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(NewFeatureDialogComponent, { className: "NewFeatureDialogComponent", filePath: "lib\\new-feature-dialog\\new-feature-dialog.component.ts", lineNumber: 13 }); })();
|
|
7363
|
+
|
|
7364
|
+
class NewFeatureDialogService {
|
|
7365
|
+
constructor() {
|
|
7366
|
+
this.current = signal(undefined);
|
|
7367
|
+
this.queue = [];
|
|
7368
|
+
}
|
|
7369
|
+
requestOpenFeature(component) {
|
|
7370
|
+
if (this.queue.includes(component)) {
|
|
7371
|
+
return;
|
|
7372
|
+
}
|
|
7373
|
+
this.queue.push(component);
|
|
7374
|
+
if (!this.current()) {
|
|
7375
|
+
this.showNextFeature();
|
|
7376
|
+
}
|
|
7377
|
+
}
|
|
7378
|
+
showNextFeature() {
|
|
7379
|
+
if (this.queue.length === 0) {
|
|
7380
|
+
return;
|
|
7381
|
+
}
|
|
7382
|
+
const nextFeature = this.queue.shift();
|
|
7383
|
+
if (!nextFeature) {
|
|
7384
|
+
return;
|
|
7385
|
+
}
|
|
7386
|
+
this.current.set(nextFeature);
|
|
7387
|
+
nextFeature.showFeatureDialog();
|
|
7388
|
+
}
|
|
7389
|
+
static { this.ɵfac = function NewFeatureDialogService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || NewFeatureDialogService)(); }; }
|
|
7390
|
+
static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: NewFeatureDialogService, factory: NewFeatureDialogService.ɵfac, providedIn: 'root' }); }
|
|
7391
|
+
}
|
|
7392
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NewFeatureDialogService, [{
|
|
7393
|
+
type: Injectable,
|
|
7394
|
+
args: [{
|
|
7395
|
+
providedIn: 'root',
|
|
7396
|
+
}]
|
|
7397
|
+
}], null, null); })();
|
|
7398
|
+
|
|
7399
|
+
class NewFeatureDialogWrapperComponent {
|
|
7400
|
+
constructor() {
|
|
7401
|
+
this.timeout = 0;
|
|
7402
|
+
this.maxWidth = 320;
|
|
7403
|
+
this.#dialog = inject(MatDialog);
|
|
7404
|
+
this.#featureService = inject(NewFeatureDialogService);
|
|
7405
|
+
this.#destroy = new Subject();
|
|
7406
|
+
this.featureActive = signal(false);
|
|
7407
|
+
this.isFeatureSeen = false;
|
|
7408
|
+
}
|
|
7409
|
+
#dialog;
|
|
7410
|
+
#featureService;
|
|
7411
|
+
#destroy;
|
|
7412
|
+
ngOnInit() {
|
|
7413
|
+
setTimeout(() => {
|
|
7414
|
+
this.setFeatureStatus();
|
|
7415
|
+
}, this.timeout);
|
|
7416
|
+
}
|
|
7417
|
+
ngOnDestroy() {
|
|
7418
|
+
this.#destroy.next(null);
|
|
7419
|
+
this.#destroy.complete();
|
|
7420
|
+
}
|
|
7421
|
+
showFeatureDialog() {
|
|
7422
|
+
const targetElement = document.querySelector(`.${this.featureClassName}`);
|
|
7423
|
+
if (!targetElement) {
|
|
7424
|
+
return;
|
|
7425
|
+
}
|
|
7426
|
+
if (ResolutionHelper.isMobileRes() && this.mobileScreenCustomPosition?.autoScroll) {
|
|
7427
|
+
targetElement.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
7428
|
+
}
|
|
7429
|
+
setTimeout(() => {
|
|
7430
|
+
this.featureActive.set(true);
|
|
7431
|
+
const updatedRects = targetElement.getBoundingClientRect();
|
|
7432
|
+
this.dialogRef = this.#dialog.open(NewFeatureDialogComponent, {
|
|
7433
|
+
data: {
|
|
7434
|
+
title: this.titleLocalizationKey,
|
|
7435
|
+
description: this.descriptionLocalizationKey,
|
|
7436
|
+
close: this.closeLocalizationKey,
|
|
7437
|
+
featureLocalStorageKey: this.featureLocalStorageKey,
|
|
7438
|
+
},
|
|
7439
|
+
position: {
|
|
7440
|
+
left: `${ResolutionHelper.isMobileRes() && this.mobileScreenCustomPosition?.left ? this.mobileScreenCustomPosition.left : (updatedRects.left - this.maxWidth) + 'px'}`,
|
|
7441
|
+
top: `${ResolutionHelper.isMobileRes() && this.mobileScreenCustomPosition?.top ? this.mobileScreenCustomPosition.top : (updatedRects.top + 45) + 'px'}`
|
|
7442
|
+
},
|
|
7443
|
+
maxWidth: `${this.maxWidth}px`
|
|
7444
|
+
});
|
|
7445
|
+
this.dialogRef.afterClosed().subscribe(() => {
|
|
7446
|
+
this.setFeatureSeen();
|
|
7447
|
+
this.#featureService.current.set(undefined);
|
|
7448
|
+
this.#featureService.showNextFeature();
|
|
7449
|
+
});
|
|
7450
|
+
// Wait until the element is visible in the viewport.
|
|
7451
|
+
}, ResolutionHelper.isMobileRes() && this.mobileScreenCustomPosition?.autoScroll ? 500 : 0);
|
|
7452
|
+
}
|
|
7453
|
+
setFeatureStatus() {
|
|
7454
|
+
this.isFeatureSeen = !!this.featureLocalStorageKey && !!localStorage.getItem(this.featureLocalStorageKey);
|
|
7455
|
+
if (!this.isFeatureSeen) {
|
|
7456
|
+
this.#featureService.requestOpenFeature(this);
|
|
7457
|
+
}
|
|
7458
|
+
}
|
|
7459
|
+
setFeatureSeen() {
|
|
7460
|
+
this.featureActive.set(false);
|
|
7461
|
+
this.isFeatureSeen = true;
|
|
7462
|
+
if (this.featureLocalStorageKey) {
|
|
7463
|
+
localStorage.setItem(this.featureLocalStorageKey, 'true');
|
|
7464
|
+
}
|
|
7465
|
+
}
|
|
7466
|
+
static { this.ɵfac = function NewFeatureDialogWrapperComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || NewFeatureDialogWrapperComponent)(); }; }
|
|
7467
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NewFeatureDialogWrapperComponent, selectors: [["lib-new-feature-dialog-wrapper"]], inputs: { titleLocalizationKey: "titleLocalizationKey", descriptionLocalizationKey: "descriptionLocalizationKey", closeLocalizationKey: "closeLocalizationKey", featureClassName: "featureClassName", featureLocalStorageKey: "featureLocalStorageKey", timeout: "timeout", maxWidth: "maxWidth", mobileScreenCustomPosition: "mobileScreenCustomPosition" }, standalone: true, features: [i0.ɵɵStandaloneFeature], decls: 0, vars: 0, template: function NewFeatureDialogWrapperComponent_Template(rf, ctx) { }, dependencies: [CommonModule, MatDialogModule], encapsulation: 2 }); }
|
|
7468
|
+
}
|
|
7469
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NewFeatureDialogWrapperComponent, [{
|
|
7470
|
+
type: Component,
|
|
7471
|
+
args: [{
|
|
7472
|
+
selector: 'lib-new-feature-dialog-wrapper',
|
|
7473
|
+
standalone: true,
|
|
7474
|
+
imports: [CommonModule, MatDialogModule, NewFeatureDialogComponent],
|
|
7475
|
+
template: '',
|
|
7476
|
+
}]
|
|
7477
|
+
}], null, { titleLocalizationKey: [{
|
|
7478
|
+
type: Input
|
|
7479
|
+
}], descriptionLocalizationKey: [{
|
|
7480
|
+
type: Input
|
|
7481
|
+
}], closeLocalizationKey: [{
|
|
7482
|
+
type: Input
|
|
7483
|
+
}], featureClassName: [{
|
|
7484
|
+
type: Input
|
|
7485
|
+
}], featureLocalStorageKey: [{
|
|
7486
|
+
type: Input
|
|
7487
|
+
}], timeout: [{
|
|
7488
|
+
type: Input
|
|
7489
|
+
}], maxWidth: [{
|
|
7490
|
+
type: Input
|
|
7491
|
+
}], mobileScreenCustomPosition: [{
|
|
7492
|
+
type: Input
|
|
7493
|
+
}] }); })();
|
|
7494
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(NewFeatureDialogWrapperComponent, { className: "NewFeatureDialogWrapperComponent", filePath: "lib\\new-feature-dialog\\new-feature-dialog-wrapper\\new-feature-dialog-wrapper.component.ts", lineNumber: 16 }); })();
|
|
7495
|
+
|
|
7496
|
+
class LLMSummaryComponent {
|
|
7497
|
+
constructor() {
|
|
7498
|
+
this.openModalEvent = new EventEmitter();
|
|
7499
|
+
}
|
|
7500
|
+
openModal() {
|
|
7501
|
+
this.openModalEvent.emit(LLMActions.SUMMARY);
|
|
7502
|
+
}
|
|
7503
|
+
static { this.ɵfac = function LLMSummaryComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LLMSummaryComponent)(); }; }
|
|
7504
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LLMSummaryComponent, selectors: [["lib-llm-summary"]], inputs: { isTextSummarizable: "isTextSummarizable", newFeatureLocalStorageKey: "newFeatureLocalStorageKey" }, outputs: { openModalEvent: "openModalEvent" }, decls: 6, vars: 12, consts: [["summarizeFeature", ""], ["mat-stroked-button", "", "color", "accent", 1, "llm-summary", 3, "click", "disabled"], [3, "svgIcon"], [3, "titleLocalizationKey", "descriptionLocalizationKey", "closeLocalizationKey", "featureClassName", "featureLocalStorageKey"]], template: function LLMSummaryComponent_Template(rf, ctx) { if (rf & 1) {
|
|
7505
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
7506
|
+
i0.ɵɵelementStart(0, "button", 1);
|
|
7507
|
+
i0.ɵɵlistener("click", function LLMSummaryComponent_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.openModal()); });
|
|
7508
|
+
i0.ɵɵelement(1, "mat-icon", 2);
|
|
7509
|
+
i0.ɵɵtext(2);
|
|
7510
|
+
i0.ɵɵpipe(3, "translate");
|
|
7511
|
+
i0.ɵɵelementEnd();
|
|
7512
|
+
i0.ɵɵelement(4, "lib-new-feature-dialog-wrapper", 3, 0);
|
|
7513
|
+
} if (rf & 2) {
|
|
7514
|
+
const summarizeFeature_r2 = i0.ɵɵreference(5);
|
|
7515
|
+
i0.ɵɵclassProp("summarize-feature-active", summarizeFeature_r2 == null ? null : summarizeFeature_r2.featureActive());
|
|
7516
|
+
i0.ɵɵproperty("disabled", !ctx.isTextSummarizable);
|
|
7517
|
+
i0.ɵɵadvance();
|
|
7518
|
+
i0.ɵɵproperty("svgIcon", "summarize");
|
|
7519
|
+
i0.ɵɵadvance();
|
|
7520
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 10, "LLM.SUMMARY"), "\n");
|
|
7521
|
+
i0.ɵɵadvance(2);
|
|
7522
|
+
i0.ɵɵproperty("titleLocalizationKey", "LLM.SUMMARY_NEW_FEATURE.TITLE")("descriptionLocalizationKey", "LLM.SUMMARY_NEW_FEATURE.DESCRIPTION")("closeLocalizationKey", "LLM.SUMMARY_NEW_FEATURE.CLOSE")("featureClassName", "llm-summary")("featureLocalStorageKey", "summary" + ctx.newFeatureLocalStorageKey);
|
|
7523
|
+
} }, dependencies: [i2$1.MatButton, i1.MatIcon, NewFeatureDialogWrapperComponent, i1$1.TranslatePipe], styles: [".summarize-feature-active{z-index:1001!important;background-color:#fff!important}"] }); }
|
|
7524
|
+
}
|
|
7525
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LLMSummaryComponent, [{
|
|
7526
|
+
type: Component,
|
|
7527
|
+
args: [{ selector: 'lib-llm-summary', template: "<button\r\n\tmat-stroked-button\r\n\tclass=\"llm-summary\"\r\n\tcolor=\"accent\"\r\n\t[disabled]=\"!isTextSummarizable\"\r\n\t[class.summarize-feature-active]=\"summarizeFeature?.featureActive()\"\r\n\t(click)=\"openModal()\"\r\n>\r\n\t<mat-icon [svgIcon]=\"'summarize'\"></mat-icon>\r\n\t{{ \"LLM.SUMMARY\" | translate }}\r\n</button>\r\n\r\n<lib-new-feature-dialog-wrapper\r\n\t#summarizeFeature\r\n\t[titleLocalizationKey]=\"'LLM.SUMMARY_NEW_FEATURE.TITLE'\"\r\n\t[descriptionLocalizationKey]=\"'LLM.SUMMARY_NEW_FEATURE.DESCRIPTION'\"\r\n\t[closeLocalizationKey]=\"'LLM.SUMMARY_NEW_FEATURE.CLOSE'\"\r\n\t[featureClassName]=\"'llm-summary'\"\r\n\t[featureLocalStorageKey]=\"'summary' + newFeatureLocalStorageKey\"\r\n></lib-new-feature-dialog-wrapper>\r\n", styles: ["::ng-deep .summarize-feature-active{z-index:1001!important;background-color:#fff!important}\n"] }]
|
|
7528
|
+
}], null, { isTextSummarizable: [{
|
|
7529
|
+
type: Input
|
|
7530
|
+
}], newFeatureLocalStorageKey: [{
|
|
7531
|
+
type: Input
|
|
7532
|
+
}], openModalEvent: [{
|
|
7533
|
+
type: Output
|
|
7534
|
+
}] }); })();
|
|
7535
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LLMSummaryComponent, { className: "LLMSummaryComponent", filePath: "lib\\llm\\components\\llm-summary\\llm-summary.component.ts", lineNumber: 9 }); })();
|
|
7536
|
+
|
|
7537
|
+
class LLMRephraseComponent {
|
|
7538
|
+
constructor() {
|
|
7539
|
+
this.openModalEvent = new EventEmitter();
|
|
7540
|
+
}
|
|
7541
|
+
openModal() {
|
|
7542
|
+
this.openModalEvent.emit(LLMActions.REPHRASE);
|
|
7543
|
+
}
|
|
7544
|
+
static { this.ɵfac = function LLMRephraseComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LLMRephraseComponent)(); }; }
|
|
7545
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LLMRephraseComponent, selectors: [["lib-llm-rephrase"]], inputs: { isTargetLanguageRephrasable: "isTargetLanguageRephrasable", newFeatureLocalStorageKey: "newFeatureLocalStorageKey" }, outputs: { openModalEvent: "openModalEvent" }, decls: 6, vars: 13, consts: [["rephraseFeature", ""], ["mat-stroked-button", "", "color", "accent", 1, "llm-rephrase", 3, "click", "disabled"], [3, "svgIcon"], [3, "titleLocalizationKey", "descriptionLocalizationKey", "closeLocalizationKey", "featureClassName", "featureLocalStorageKey", "maxWidth"]], template: function LLMRephraseComponent_Template(rf, ctx) { if (rf & 1) {
|
|
7546
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
7547
|
+
i0.ɵɵelementStart(0, "button", 1);
|
|
7548
|
+
i0.ɵɵlistener("click", function LLMRephraseComponent_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.openModal()); });
|
|
7549
|
+
i0.ɵɵelement(1, "mat-icon", 2);
|
|
7550
|
+
i0.ɵɵtext(2);
|
|
7551
|
+
i0.ɵɵpipe(3, "translate");
|
|
7552
|
+
i0.ɵɵelementEnd();
|
|
7553
|
+
i0.ɵɵelement(4, "lib-new-feature-dialog-wrapper", 3, 0);
|
|
7554
|
+
} if (rf & 2) {
|
|
7555
|
+
const rephraseFeature_r2 = i0.ɵɵreference(5);
|
|
7556
|
+
i0.ɵɵclassProp("rephrase-feature-active", rephraseFeature_r2 == null ? null : rephraseFeature_r2.featureActive());
|
|
7557
|
+
i0.ɵɵproperty("disabled", !ctx.isTargetLanguageRephrasable);
|
|
7558
|
+
i0.ɵɵadvance();
|
|
7559
|
+
i0.ɵɵproperty("svgIcon", "rephrase");
|
|
7560
|
+
i0.ɵɵadvance();
|
|
7561
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 11, "LLM.REPHRASE"), "\n");
|
|
7562
|
+
i0.ɵɵadvance(2);
|
|
7563
|
+
i0.ɵɵproperty("titleLocalizationKey", "LLM.REPHRASE_NEW_FEATURE.TITLE")("descriptionLocalizationKey", "LLM.REPHRASE_NEW_FEATURE.DESCRIPTION")("closeLocalizationKey", "LLM.REPHRASE_NEW_FEATURE.CLOSE")("featureClassName", "llm-rephrase")("featureLocalStorageKey", "rephrase" + ctx.newFeatureLocalStorageKey)("maxWidth", 400);
|
|
7564
|
+
} }, dependencies: [i2$1.MatButton, i1.MatIcon, NewFeatureDialogWrapperComponent, i1$1.TranslatePipe], styles: [".rephrase-feature-active{z-index:1001!important;background-color:#fff!important}"] }); }
|
|
7565
|
+
}
|
|
7566
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LLMRephraseComponent, [{
|
|
7567
|
+
type: Component,
|
|
7568
|
+
args: [{ selector: 'lib-llm-rephrase', template: "<button\r\n\tmat-stroked-button\r\n\tclass=\"llm-rephrase\"\r\n\tcolor=\"accent\"\r\n\t[disabled]=\"!isTargetLanguageRephrasable\"\r\n\t[class.rephrase-feature-active]=\"rephraseFeature?.featureActive()\"\r\n\t(click)=\"openModal()\"\r\n>\r\n\t<mat-icon [svgIcon]=\"'rephrase'\"></mat-icon>\r\n\t{{ \"LLM.REPHRASE\" | translate }}\r\n</button>\r\n\r\n<lib-new-feature-dialog-wrapper\r\n\t#rephraseFeature\r\n\t[titleLocalizationKey]=\"'LLM.REPHRASE_NEW_FEATURE.TITLE'\"\r\n\t[descriptionLocalizationKey]=\"'LLM.REPHRASE_NEW_FEATURE.DESCRIPTION'\"\r\n\t[closeLocalizationKey]=\"'LLM.REPHRASE_NEW_FEATURE.CLOSE'\"\r\n\t[featureClassName]=\"'llm-rephrase'\"\r\n\t[featureLocalStorageKey]=\"'rephrase' + newFeatureLocalStorageKey\"\r\n\t[maxWidth]=\"400\"\r\n></lib-new-feature-dialog-wrapper>\r\n", styles: ["::ng-deep .rephrase-feature-active{z-index:1001!important;background-color:#fff!important}\n"] }]
|
|
7569
|
+
}], null, { isTargetLanguageRephrasable: [{
|
|
7570
|
+
type: Input
|
|
7571
|
+
}], newFeatureLocalStorageKey: [{
|
|
7572
|
+
type: Input
|
|
7573
|
+
}], openModalEvent: [{
|
|
7574
|
+
type: Output
|
|
7575
|
+
}] }); })();
|
|
7576
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LLMRephraseComponent, { className: "LLMRephraseComponent", filePath: "lib\\llm\\components\\llm-rephrase\\llm-rephrase.component.ts", lineNumber: 9 }); })();
|
|
7577
|
+
|
|
7578
|
+
function LLMComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
7579
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
7580
|
+
i0.ɵɵelementStart(0, "div", 2);
|
|
7581
|
+
i0.ɵɵpipe(1, "translate");
|
|
7582
|
+
i0.ɵɵelementStart(2, "lib-llm-summary", 3);
|
|
7583
|
+
i0.ɵɵlistener("openModalEvent", function LLMComponent_div_1_Template_lib_llm_summary_openModalEvent_2_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.openLLMModal($event)); });
|
|
7584
|
+
i0.ɵɵelementEnd()();
|
|
7585
|
+
} if (rf & 2) {
|
|
7586
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
7587
|
+
i0.ɵɵproperty("matTooltipPosition", "left")("matTooltip", !ctx_r1.isTextSummarizable ? i0.ɵɵpipeBind1(1, 4, "LLM.MENU_SUMMARY_DISABLED_TOOLTIP") : "");
|
|
7588
|
+
i0.ɵɵadvance(2);
|
|
7589
|
+
i0.ɵɵproperty("isTextSummarizable", !!ctx_r1.isTextSummarizable)("newFeatureLocalStorageKey", ctx_r1.newFeatureLocalStorageKey);
|
|
7590
|
+
} }
|
|
7591
|
+
function LLMComponent_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
7592
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
7593
|
+
i0.ɵɵelementStart(0, "div", 2);
|
|
7594
|
+
i0.ɵɵpipe(1, "translate");
|
|
7595
|
+
i0.ɵɵelementStart(2, "lib-llm-rephrase", 4);
|
|
7596
|
+
i0.ɵɵlistener("openModalEvent", function LLMComponent_div_2_Template_lib_llm_rephrase_openModalEvent_2_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.openLLMModal($event)); });
|
|
7597
|
+
i0.ɵɵelementEnd()();
|
|
7598
|
+
} if (rf & 2) {
|
|
7599
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
7600
|
+
i0.ɵɵproperty("matTooltipPosition", "left")("matTooltip", !ctx_r1.isTargetLanguageRephrasable ? i0.ɵɵpipeBind1(1, 4, "LLM.MENU_REPHRASE_DISABLED_TOOLTIP") : "");
|
|
7601
|
+
i0.ɵɵadvance(2);
|
|
7602
|
+
i0.ɵɵproperty("isTargetLanguageRephrasable", !!ctx_r1.isTargetLanguageRephrasable)("newFeatureLocalStorageKey", ctx_r1.newFeatureLocalStorageKey);
|
|
7603
|
+
} }
|
|
7323
7604
|
class LLMComponent {
|
|
7324
7605
|
get isTextSummarizable() {
|
|
7325
7606
|
return this.text;
|
|
@@ -7331,6 +7612,8 @@ class LLMComponent {
|
|
|
7331
7612
|
this.dialog = dialog;
|
|
7332
7613
|
this.iconService = iconService;
|
|
7333
7614
|
this.languageService = languageService;
|
|
7615
|
+
this.summaryEnabled = true;
|
|
7616
|
+
this.rephraseEnabled = true;
|
|
7334
7617
|
this.showUseCaseSummary = false;
|
|
7335
7618
|
this.showUseCaseRephrase = false;
|
|
7336
7619
|
this.menuTriggerClick = new EventEmitter();
|
|
@@ -7359,63 +7642,37 @@ class LLMComponent {
|
|
|
7359
7642
|
data
|
|
7360
7643
|
});
|
|
7361
7644
|
}
|
|
7362
|
-
menuTriggerClicked() {
|
|
7363
|
-
this.menuTriggerClick.emit();
|
|
7364
|
-
}
|
|
7365
7645
|
static { this.ɵfac = function LLMComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LLMComponent)(i0.ɵɵdirectiveInject(i1$4.MatDialog), i0.ɵɵdirectiveInject(IconService), i0.ɵɵdirectiveInject(LanguageTranslateService)); }; }
|
|
7366
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LLMComponent, selectors: [["lib-llm"]], inputs: { text: "text", language: "language",
|
|
7367
|
-
|
|
7368
|
-
i0.ɵɵ
|
|
7369
|
-
i0.ɵɵpipe(1, "translate");
|
|
7370
|
-
i0.ɵɵlistener("click", function LLMComponent_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.menuTriggerClicked()); });
|
|
7371
|
-
i0.ɵɵelement(2, "mat-icon", 2);
|
|
7646
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LLMComponent, selectors: [["lib-llm"]], inputs: { text: "text", language: "language", rephrasableLanguagesCodeList: "rephrasableLanguagesCodeList", summaryEnabled: "summaryEnabled", rephraseEnabled: "rephraseEnabled", showUseCaseSummary: "showUseCaseSummary", showUseCaseRephrase: "showUseCaseRephrase", newFeatureLocalStorageKey: "newFeatureLocalStorageKey" }, outputs: { menuTriggerClick: "menuTriggerClick" }, decls: 3, vars: 2, consts: [[1, "llm-wrapper"], [3, "matTooltipPosition", "matTooltip", 4, "ngIf"], [3, "matTooltipPosition", "matTooltip"], [3, "openModalEvent", "isTextSummarizable", "newFeatureLocalStorageKey"], [3, "openModalEvent", "isTargetLanguageRephrasable", "newFeatureLocalStorageKey"]], template: function LLMComponent_Template(rf, ctx) { if (rf & 1) {
|
|
7647
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
7648
|
+
i0.ɵɵtemplate(1, LLMComponent_div_1_Template, 3, 6, "div", 1)(2, LLMComponent_div_2_Template, 3, 6, "div", 1);
|
|
7372
7649
|
i0.ɵɵelementEnd();
|
|
7373
|
-
i0.ɵɵelementStart(3, "mat-menu", null, 0)(5, "div", 3);
|
|
7374
|
-
i0.ɵɵpipe(6, "translate");
|
|
7375
|
-
i0.ɵɵelementStart(7, "button", 4);
|
|
7376
|
-
i0.ɵɵlistener("click", function LLMComponent_Template_button_click_7_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.openLLMModal(ctx.llmAction.SUMMARY)); });
|
|
7377
|
-
i0.ɵɵtext(8);
|
|
7378
|
-
i0.ɵɵpipe(9, "translate");
|
|
7379
|
-
i0.ɵɵelementEnd()();
|
|
7380
|
-
i0.ɵɵelementStart(10, "div", 3);
|
|
7381
|
-
i0.ɵɵpipe(11, "translate");
|
|
7382
|
-
i0.ɵɵelementStart(12, "button", 4);
|
|
7383
|
-
i0.ɵɵlistener("click", function LLMComponent_Template_button_click_12_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.openLLMModal(ctx.llmAction.REPHRASE)); });
|
|
7384
|
-
i0.ɵɵtext(13);
|
|
7385
|
-
i0.ɵɵpipe(14, "translate");
|
|
7386
|
-
i0.ɵɵelementEnd()()();
|
|
7387
7650
|
} if (rf & 2) {
|
|
7388
|
-
const menu_r2 = i0.ɵɵreference(4);
|
|
7389
|
-
i0.ɵɵproperty("disabled", ctx.isMenuDisabled)("matTooltip", i0.ɵɵpipeBind1(1, 11, "LLM.MENU_TOOLTIP"))("matMenuTriggerFor", menu_r2);
|
|
7390
|
-
i0.ɵɵadvance(5);
|
|
7391
|
-
i0.ɵɵproperty("matTooltipPosition", "left")("matTooltip", !ctx.isTextSummarizable ? i0.ɵɵpipeBind1(6, 13, "LLM.MENU_SUMMARY_DISABLED_TOOLTIP") : "");
|
|
7392
|
-
i0.ɵɵadvance(2);
|
|
7393
|
-
i0.ɵɵproperty("disabled", !ctx.isTextSummarizable);
|
|
7394
7651
|
i0.ɵɵadvance();
|
|
7395
|
-
i0.ɵɵ
|
|
7396
|
-
i0.ɵɵadvance(2);
|
|
7397
|
-
i0.ɵɵproperty("matTooltipPosition", "left")("matTooltip", !ctx.isTargetLanguageRephrasable ? i0.ɵɵpipeBind1(11, 17, "LLM.MENU_REPHRASE_DISABLED_TOOLTIP") : "");
|
|
7398
|
-
i0.ɵɵadvance(2);
|
|
7399
|
-
i0.ɵɵproperty("disabled", !ctx.isTargetLanguageRephrasable);
|
|
7652
|
+
i0.ɵɵproperty("ngIf", ctx.summaryEnabled);
|
|
7400
7653
|
i0.ɵɵadvance();
|
|
7401
|
-
i0.ɵɵ
|
|
7402
|
-
} }, dependencies: [
|
|
7654
|
+
i0.ɵɵproperty("ngIf", ctx.rephraseEnabled);
|
|
7655
|
+
} }, dependencies: [i1$2.NgIf, i2$2.MatTooltip, LLMSummaryComponent, LLMRephraseComponent, i1$1.TranslatePipe], styles: [".llm-wrapper[_ngcontent-%COMP%]{display:flex;gap:8px}"] }); }
|
|
7403
7656
|
}
|
|
7404
7657
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LLMComponent, [{
|
|
7405
7658
|
type: Component,
|
|
7406
|
-
args: [{ selector: 'lib-llm', template: "<
|
|
7659
|
+
args: [{ selector: 'lib-llm', template: "<div class=\"llm-wrapper\">\r\n\t<div *ngIf=\"summaryEnabled\" [matTooltipPosition]=\"'left'\" [matTooltip]=\"!isTextSummarizable ? ('LLM.MENU_SUMMARY_DISABLED_TOOLTIP' | translate) : ''\">\r\n\t\t<lib-llm-summary [isTextSummarizable]=\"!!isTextSummarizable\" [newFeatureLocalStorageKey]=\"newFeatureLocalStorageKey\" (openModalEvent)=\"openLLMModal($event)\"></lib-llm-summary>\r\n\t</div>\r\n\r\n\t<div *ngIf=\"rephraseEnabled\" [matTooltipPosition]=\"'left'\" [matTooltip]=\"!isTargetLanguageRephrasable ? ('LLM.MENU_REPHRASE_DISABLED_TOOLTIP' | translate) : ''\">\r\n\t\t<lib-llm-rephrase\r\n\t\t\t[isTargetLanguageRephrasable]=\"!!isTargetLanguageRephrasable\"\r\n\t\t\t[newFeatureLocalStorageKey]=\"newFeatureLocalStorageKey\"\r\n\t\t\t(openModalEvent)=\"openLLMModal($event)\"\r\n\t\t></lib-llm-rephrase>\r\n\t</div>\r\n</div>\r\n", styles: [".llm-wrapper{display:flex;gap:8px}\n"] }]
|
|
7407
7660
|
}], () => [{ type: i1$4.MatDialog }, { type: IconService }, { type: LanguageTranslateService }], { text: [{
|
|
7408
7661
|
type: Input
|
|
7409
7662
|
}], language: [{
|
|
7410
7663
|
type: Input
|
|
7411
|
-
}], isMenuDisabled: [{
|
|
7412
|
-
type: Input
|
|
7413
7664
|
}], rephrasableLanguagesCodeList: [{
|
|
7414
7665
|
type: Input
|
|
7666
|
+
}], summaryEnabled: [{
|
|
7667
|
+
type: Input
|
|
7668
|
+
}], rephraseEnabled: [{
|
|
7669
|
+
type: Input
|
|
7415
7670
|
}], showUseCaseSummary: [{
|
|
7416
7671
|
type: Input
|
|
7417
7672
|
}], showUseCaseRephrase: [{
|
|
7418
7673
|
type: Input
|
|
7674
|
+
}], newFeatureLocalStorageKey: [{
|
|
7675
|
+
type: Input
|
|
7419
7676
|
}], menuTriggerClick: [{
|
|
7420
7677
|
type: Output
|
|
7421
7678
|
}] }); })();
|
|
@@ -7427,7 +7684,6 @@ class LLMModule {
|
|
|
7427
7684
|
static { this.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule,
|
|
7428
7685
|
MatButtonModule,
|
|
7429
7686
|
MatIconModule,
|
|
7430
|
-
MatMenuModule,
|
|
7431
7687
|
TranslateModule,
|
|
7432
7688
|
MatDialogModule,
|
|
7433
7689
|
ClipboardModule,
|
|
@@ -7437,7 +7693,8 @@ class LLMModule {
|
|
|
7437
7693
|
NotificationMessageModule,
|
|
7438
7694
|
MatTooltipModule,
|
|
7439
7695
|
FlexLayoutModule,
|
|
7440
|
-
MatProgressSpinnerModule
|
|
7696
|
+
MatProgressSpinnerModule,
|
|
7697
|
+
NewFeatureDialogWrapperComponent] }); }
|
|
7441
7698
|
}
|
|
7442
7699
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LLMModule, [{
|
|
7443
7700
|
type: NgModule,
|
|
@@ -7446,12 +7703,13 @@ class LLMModule {
|
|
|
7446
7703
|
LLMComponent,
|
|
7447
7704
|
LLMTextareaComponent,
|
|
7448
7705
|
LLMTextareaWithActionsComponent,
|
|
7706
|
+
LLMSummaryComponent,
|
|
7707
|
+
LLMRephraseComponent
|
|
7449
7708
|
],
|
|
7450
7709
|
imports: [
|
|
7451
7710
|
CommonModule,
|
|
7452
7711
|
MatButtonModule,
|
|
7453
7712
|
MatIconModule,
|
|
7454
|
-
MatMenuModule,
|
|
7455
7713
|
TranslateModule,
|
|
7456
7714
|
MatDialogModule,
|
|
7457
7715
|
ClipboardModule,
|
|
@@ -7461,17 +7719,19 @@ class LLMModule {
|
|
|
7461
7719
|
NotificationMessageModule,
|
|
7462
7720
|
MatTooltipModule,
|
|
7463
7721
|
FlexLayoutModule,
|
|
7464
|
-
MatProgressSpinnerModule
|
|
7722
|
+
MatProgressSpinnerModule,
|
|
7723
|
+
NewFeatureDialogWrapperComponent
|
|
7465
7724
|
],
|
|
7466
7725
|
exports: [LLMComponent],
|
|
7467
7726
|
}]
|
|
7468
7727
|
}], null, null); })();
|
|
7469
7728
|
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(LLMModule, { declarations: [LLMComponent,
|
|
7470
7729
|
LLMTextareaComponent,
|
|
7471
|
-
LLMTextareaWithActionsComponent
|
|
7730
|
+
LLMTextareaWithActionsComponent,
|
|
7731
|
+
LLMSummaryComponent,
|
|
7732
|
+
LLMRephraseComponent], imports: [CommonModule,
|
|
7472
7733
|
MatButtonModule,
|
|
7473
7734
|
MatIconModule,
|
|
7474
|
-
MatMenuModule,
|
|
7475
7735
|
TranslateModule,
|
|
7476
7736
|
MatDialogModule,
|
|
7477
7737
|
ClipboardModule,
|
|
@@ -7481,7 +7741,8 @@ class LLMModule {
|
|
|
7481
7741
|
NotificationMessageModule,
|
|
7482
7742
|
MatTooltipModule,
|
|
7483
7743
|
FlexLayoutModule,
|
|
7484
|
-
MatProgressSpinnerModule
|
|
7744
|
+
MatProgressSpinnerModule,
|
|
7745
|
+
NewFeatureDialogWrapperComponent], exports: [LLMComponent] }); })();
|
|
7485
7746
|
|
|
7486
7747
|
class SidebarService {
|
|
7487
7748
|
constructor() {
|
|
@@ -8234,168 +8495,6 @@ class SubscriptionComponent {
|
|
|
8234
8495
|
}], null, null); })();
|
|
8235
8496
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SubscriptionComponent, { className: "SubscriptionComponent", filePath: "lib\\subscription\\subscription.component.ts", lineNumber: 27 }); })();
|
|
8236
8497
|
|
|
8237
|
-
class NewFeatureDialogComponent {
|
|
8238
|
-
constructor() {
|
|
8239
|
-
this.data = inject(MAT_DIALOG_DATA);
|
|
8240
|
-
}
|
|
8241
|
-
static { this.ɵfac = function NewFeatureDialogComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || NewFeatureDialogComponent)(); }; }
|
|
8242
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NewFeatureDialogComponent, selectors: [["lib-new-feature-dialog"]], standalone: true, features: [i0.ɵɵStandaloneFeature], decls: 10, vars: 9, consts: [["mat-dialog-title", ""], [1, "description", 3, "innerHTML"], ["mat-button", "", "mat-dialog-close", "", "color", "accent"]], template: function NewFeatureDialogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
8243
|
-
i0.ɵɵelementStart(0, "h2", 0);
|
|
8244
|
-
i0.ɵɵtext(1);
|
|
8245
|
-
i0.ɵɵpipe(2, "translate");
|
|
8246
|
-
i0.ɵɵelementEnd();
|
|
8247
|
-
i0.ɵɵelementStart(3, "mat-dialog-content");
|
|
8248
|
-
i0.ɵɵelement(4, "p", 1);
|
|
8249
|
-
i0.ɵɵpipe(5, "translate");
|
|
8250
|
-
i0.ɵɵelementEnd();
|
|
8251
|
-
i0.ɵɵelementStart(6, "mat-dialog-actions")(7, "button", 2);
|
|
8252
|
-
i0.ɵɵtext(8);
|
|
8253
|
-
i0.ɵɵpipe(9, "translate");
|
|
8254
|
-
i0.ɵɵelementEnd()();
|
|
8255
|
-
} if (rf & 2) {
|
|
8256
|
-
i0.ɵɵadvance();
|
|
8257
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 3, ctx.data.title));
|
|
8258
|
-
i0.ɵɵadvance(3);
|
|
8259
|
-
i0.ɵɵproperty("innerHTML", i0.ɵɵpipeBind1(5, 5, ctx.data.description), i0.ɵɵsanitizeHtml);
|
|
8260
|
-
i0.ɵɵadvance(4);
|
|
8261
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(9, 7, ctx.data.close), " ");
|
|
8262
|
-
} }, dependencies: [MatDialogModule, i1$4.MatDialogClose, i1$4.MatDialogTitle, i1$4.MatDialogActions, i1$4.MatDialogContent, MatButtonModule, i2$1.MatButton, TranslatePipe], styles: ["[_nghost-%COMP%] {display:inline-block;padding:12px 16px}[_nghost-%COMP%] .mat-mdc-dialog-title, [_nghost-%COMP%] mat-dialog-actions, [_nghost-%COMP%] mat-dialog-content{padding:0!important;margin:0!important}"] }); }
|
|
8263
|
-
}
|
|
8264
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NewFeatureDialogComponent, [{
|
|
8265
|
-
type: Component,
|
|
8266
|
-
args: [{ selector: 'lib-new-feature-dialog', standalone: true, imports: [MatDialogModule, MatButtonModule, TranslatePipe], template: "<h2 mat-dialog-title>{{ data.title | translate }}</h2>\r\n<mat-dialog-content>\r\n <p class=\"description\" [innerHTML]=\"data.description | translate\"></p>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <button mat-button mat-dialog-close color=\"accent\">\r\n {{ data.close | translate }}\r\n </button>\r\n</mat-dialog-actions>\r\n", styles: [":host ::ng-deep{display:inline-block;padding:12px 16px}:host ::ng-deep .mat-mdc-dialog-title,:host ::ng-deep mat-dialog-actions,:host ::ng-deep mat-dialog-content{padding:0!important;margin:0!important}\n"] }]
|
|
8267
|
-
}], null, null); })();
|
|
8268
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(NewFeatureDialogComponent, { className: "NewFeatureDialogComponent", filePath: "lib\\new-feature-dialog\\new-feature-dialog.component.ts", lineNumber: 13 }); })();
|
|
8269
|
-
|
|
8270
|
-
class NewFeatureDialogService {
|
|
8271
|
-
constructor() {
|
|
8272
|
-
this.current = signal(undefined);
|
|
8273
|
-
this.quueue = [];
|
|
8274
|
-
}
|
|
8275
|
-
requestOpenFeature(component) {
|
|
8276
|
-
if (this.quueue.includes(component)) {
|
|
8277
|
-
return;
|
|
8278
|
-
}
|
|
8279
|
-
this.quueue.push(component);
|
|
8280
|
-
if (!this.current()) {
|
|
8281
|
-
this.showNextFeature();
|
|
8282
|
-
}
|
|
8283
|
-
}
|
|
8284
|
-
showNextFeature() {
|
|
8285
|
-
if (this.quueue.length === 0) {
|
|
8286
|
-
return;
|
|
8287
|
-
}
|
|
8288
|
-
const nextFeature = this.quueue.shift();
|
|
8289
|
-
if (!nextFeature) {
|
|
8290
|
-
return;
|
|
8291
|
-
}
|
|
8292
|
-
this.current.set(nextFeature);
|
|
8293
|
-
nextFeature.showFeatureDialog();
|
|
8294
|
-
nextFeature.dialogRef?.afterClosed().subscribe(() => {
|
|
8295
|
-
this.current.set(undefined);
|
|
8296
|
-
this.showNextFeature();
|
|
8297
|
-
});
|
|
8298
|
-
}
|
|
8299
|
-
static { this.ɵfac = function NewFeatureDialogService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || NewFeatureDialogService)(); }; }
|
|
8300
|
-
static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: NewFeatureDialogService, factory: NewFeatureDialogService.ɵfac, providedIn: 'root' }); }
|
|
8301
|
-
}
|
|
8302
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NewFeatureDialogService, [{
|
|
8303
|
-
type: Injectable,
|
|
8304
|
-
args: [{
|
|
8305
|
-
providedIn: 'root',
|
|
8306
|
-
}]
|
|
8307
|
-
}], null, null); })();
|
|
8308
|
-
|
|
8309
|
-
class NewFeatureDialogWrapperComponent {
|
|
8310
|
-
constructor() {
|
|
8311
|
-
this.timeout = 0;
|
|
8312
|
-
this.maxWidth = 320;
|
|
8313
|
-
this.#dialog = inject(MatDialog);
|
|
8314
|
-
this.#featureService = inject(NewFeatureDialogService);
|
|
8315
|
-
this.#destroy = new Subject();
|
|
8316
|
-
this.featureActive = signal(false);
|
|
8317
|
-
this.isFeatureSeen = false;
|
|
8318
|
-
}
|
|
8319
|
-
#dialog;
|
|
8320
|
-
#featureService;
|
|
8321
|
-
#destroy;
|
|
8322
|
-
ngOnInit() {
|
|
8323
|
-
setTimeout(() => {
|
|
8324
|
-
this.setFeatureStatus();
|
|
8325
|
-
}, this.timeout);
|
|
8326
|
-
}
|
|
8327
|
-
ngOnDestroy() {
|
|
8328
|
-
this.#destroy.next(null);
|
|
8329
|
-
this.#destroy.complete();
|
|
8330
|
-
}
|
|
8331
|
-
showFeatureDialog() {
|
|
8332
|
-
const targetElement = document.querySelector(`.${this.featureClassName}`);
|
|
8333
|
-
if (!targetElement) {
|
|
8334
|
-
return;
|
|
8335
|
-
}
|
|
8336
|
-
if (ResolutionHelper.isMobileRes()) {
|
|
8337
|
-
targetElement.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
8338
|
-
}
|
|
8339
|
-
const updatedRects = targetElement.getBoundingClientRect();
|
|
8340
|
-
this.featureActive.set(true);
|
|
8341
|
-
this.dialogRef = this.#dialog.open(NewFeatureDialogComponent, {
|
|
8342
|
-
data: {
|
|
8343
|
-
title: this.titleLocalizationKey,
|
|
8344
|
-
description: this.descriptionLocalizationKey,
|
|
8345
|
-
close: this.closeLocalizationKey,
|
|
8346
|
-
featureLocalStorageKey: this.featureLocalStorageKey,
|
|
8347
|
-
},
|
|
8348
|
-
position: {
|
|
8349
|
-
left: `${updatedRects.left - this.maxWidth}px`,
|
|
8350
|
-
top: `${updatedRects.top + 45}px`,
|
|
8351
|
-
},
|
|
8352
|
-
maxWidth: `${this.maxWidth}px`,
|
|
8353
|
-
});
|
|
8354
|
-
this.dialogRef.afterClosed().subscribe(() => {
|
|
8355
|
-
this.setFeatureSeen();
|
|
8356
|
-
});
|
|
8357
|
-
}
|
|
8358
|
-
setFeatureStatus() {
|
|
8359
|
-
this.isFeatureSeen = !!this.featureLocalStorageKey && !!localStorage.getItem(this.featureLocalStorageKey);
|
|
8360
|
-
if (!this.isFeatureSeen) {
|
|
8361
|
-
this.#featureService.requestOpenFeature(this);
|
|
8362
|
-
}
|
|
8363
|
-
}
|
|
8364
|
-
setFeatureSeen() {
|
|
8365
|
-
this.featureActive.set(false);
|
|
8366
|
-
this.isFeatureSeen = true;
|
|
8367
|
-
if (this.featureLocalStorageKey) {
|
|
8368
|
-
localStorage.setItem(this.featureLocalStorageKey, 'true');
|
|
8369
|
-
}
|
|
8370
|
-
}
|
|
8371
|
-
static { this.ɵfac = function NewFeatureDialogWrapperComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || NewFeatureDialogWrapperComponent)(); }; }
|
|
8372
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NewFeatureDialogWrapperComponent, selectors: [["lib-new-feature-dialog-wrapper"]], inputs: { titleLocalizationKey: "titleLocalizationKey", descriptionLocalizationKey: "descriptionLocalizationKey", closeLocalizationKey: "closeLocalizationKey", featureClassName: "featureClassName", featureLocalStorageKey: "featureLocalStorageKey", timeout: "timeout", maxWidth: "maxWidth" }, standalone: true, features: [i0.ɵɵStandaloneFeature], decls: 0, vars: 0, template: function NewFeatureDialogWrapperComponent_Template(rf, ctx) { }, dependencies: [CommonModule, MatDialogModule], encapsulation: 2 }); }
|
|
8373
|
-
}
|
|
8374
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NewFeatureDialogWrapperComponent, [{
|
|
8375
|
-
type: Component,
|
|
8376
|
-
args: [{
|
|
8377
|
-
selector: 'lib-new-feature-dialog-wrapper',
|
|
8378
|
-
standalone: true,
|
|
8379
|
-
imports: [CommonModule, MatDialogModule, NewFeatureDialogComponent],
|
|
8380
|
-
template: '',
|
|
8381
|
-
}]
|
|
8382
|
-
}], null, { titleLocalizationKey: [{
|
|
8383
|
-
type: Input
|
|
8384
|
-
}], descriptionLocalizationKey: [{
|
|
8385
|
-
type: Input
|
|
8386
|
-
}], closeLocalizationKey: [{
|
|
8387
|
-
type: Input
|
|
8388
|
-
}], featureClassName: [{
|
|
8389
|
-
type: Input
|
|
8390
|
-
}], featureLocalStorageKey: [{
|
|
8391
|
-
type: Input
|
|
8392
|
-
}], timeout: [{
|
|
8393
|
-
type: Input
|
|
8394
|
-
}], maxWidth: [{
|
|
8395
|
-
type: Input
|
|
8396
|
-
}] }); })();
|
|
8397
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(NewFeatureDialogWrapperComponent, { className: "NewFeatureDialogWrapperComponent", filePath: "lib\\new-feature-dialog\\new-feature-dialog-wrapper\\new-feature-dialog-wrapper.component.ts", lineNumber: 15 }); })();
|
|
8398
|
-
|
|
8399
8498
|
/*
|
|
8400
8499
|
* Public API Surface of ngx-common
|
|
8401
8500
|
*/
|