oip-common 0.0.33 → 0.0.37
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/assets/i18n/en.json +124 -74
- package/assets/i18n/ru.json +47 -2
- package/assets/layout/_core.scss +30 -30
- package/fesm2022/oip-common.mjs +1869 -476
- package/fesm2022/oip-common.mjs.map +1 -1
- package/index.d.ts +239 -2
- package/package.json +1 -4
- package/scripts/generate-api.mjs +35 -51
- package/templates/api.ejs +4 -0
- package/templates/http-client.ejs +22 -5
package/fesm2022/oip-common.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, inject, signal, computed, effect, ChangeDetectorRef, Component, Input, PLATFORM_ID, InjectionToken, HostBinding, EventEmitter, Output, ViewChild, Renderer2, Pipe } from '@angular/core';
|
|
3
|
-
import * as i2$
|
|
2
|
+
import { Injectable, inject, signal, computed, effect, ChangeDetectorRef, Component, Input, PLATFORM_ID, InjectionToken, HostBinding, EventEmitter, Output, ViewChild, Renderer2, SecurityContext, ChangeDetectionStrategy, Pipe } from '@angular/core';
|
|
3
|
+
import * as i2$6 from 'primeng/api';
|
|
4
4
|
import { MessageService, ConfirmationService, PrimeIcons, SharedModule } from 'primeng/api';
|
|
5
5
|
import { HttpErrorResponse, HttpClient as HttpClient$1, HttpHeaders } from '@angular/common/http';
|
|
6
|
-
import * as i2$
|
|
6
|
+
import * as i2$4 from '@ngx-translate/core';
|
|
7
7
|
import { TranslateService, TranslatePipe, TranslateModule } from '@ngx-translate/core';
|
|
8
|
-
import * as i1$
|
|
8
|
+
import * as i1$3 from '@angular/router';
|
|
9
9
|
import { ActivatedRoute, Router, RouterModule, NavigationEnd, RouterLinkActive, RouterLink } from '@angular/router';
|
|
10
10
|
import { lastValueFrom, BehaviorSubject, Subject, filter as filter$1, combineLatest, of, map as map$1, Observable } from 'rxjs';
|
|
11
11
|
import { Title, DomSanitizer } from '@angular/platform-browser';
|
|
@@ -13,12 +13,12 @@ import * as i1 from 'primeng/multiselect';
|
|
|
13
13
|
import { MultiSelectModule } from 'primeng/multiselect';
|
|
14
14
|
import * as i2 from 'primeng/tooltip';
|
|
15
15
|
import { TooltipModule, Tooltip } from 'primeng/tooltip';
|
|
16
|
-
import * as i1$
|
|
16
|
+
import * as i1$2 from 'primeng/button';
|
|
17
17
|
import { ButtonModule, Button } from 'primeng/button';
|
|
18
|
-
import * as
|
|
18
|
+
import * as i1$1 from '@angular/forms';
|
|
19
19
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
20
20
|
import * as i2$1 from '@angular/common';
|
|
21
|
-
import { isPlatformBrowser, CommonModule, NgComponentOutlet, NgClass } from '@angular/common';
|
|
21
|
+
import { isPlatformBrowser, CommonModule, NgComponentOutlet, NgClass, DatePipe } from '@angular/common';
|
|
22
22
|
import * as i3$1 from 'primeng/styleclass';
|
|
23
23
|
import { StyleClassModule } from 'primeng/styleclass';
|
|
24
24
|
import { updatePreset, updateSurfacePalette, $t } from '@primeng/themes';
|
|
@@ -31,11 +31,11 @@ import { SelectButtonModule } from 'primeng/selectbutton';
|
|
|
31
31
|
import { OidcSecurityService, PublicEventsService, EventTypes, StsConfigHttpLoader } from 'angular-auth-oidc-client';
|
|
32
32
|
import { filter, map, switchMap, catchError } from 'rxjs/operators';
|
|
33
33
|
import { Tabs, TabList, Tab } from 'primeng/tabs';
|
|
34
|
-
import * as
|
|
34
|
+
import * as i2$2 from 'primeng/avatar';
|
|
35
35
|
import { AvatarModule } from 'primeng/avatar';
|
|
36
|
-
import * as i1$
|
|
36
|
+
import * as i1$4 from 'primeng/contextmenu';
|
|
37
37
|
import { ContextMenuModule, ContextMenu } from 'primeng/contextmenu';
|
|
38
|
-
import * as i2$
|
|
38
|
+
import * as i2$3 from 'primeng/dialog';
|
|
39
39
|
import { DialogModule } from 'primeng/dialog';
|
|
40
40
|
import * as i3$3 from 'primeng/inputtext';
|
|
41
41
|
import { InputTextModule } from 'primeng/inputtext';
|
|
@@ -43,19 +43,29 @@ import { trigger, state, transition, style, animate } from '@angular/animations'
|
|
|
43
43
|
import * as i3$2 from 'primeng/ripple';
|
|
44
44
|
import { RippleModule } from 'primeng/ripple';
|
|
45
45
|
import { ConfirmDialog } from 'primeng/confirmdialog';
|
|
46
|
-
import * as i4
|
|
46
|
+
import * as i4 from 'primeng/select';
|
|
47
47
|
import { SelectModule, Select } from 'primeng/select';
|
|
48
|
-
import * as i1$
|
|
48
|
+
import * as i1$5 from 'primeng/fileupload';
|
|
49
49
|
import { FileUploadModule } from 'primeng/fileupload';
|
|
50
50
|
import { ImageModule } from 'primeng/image';
|
|
51
|
-
import * as i1$
|
|
51
|
+
import * as i1$6 from 'primeng/table';
|
|
52
52
|
import { TableModule } from 'primeng/table';
|
|
53
|
-
import * as i2$
|
|
53
|
+
import * as i2$5 from 'primeng/toggleswitch';
|
|
54
54
|
import { ToggleSwitchModule } from 'primeng/toggleswitch';
|
|
55
|
+
import * as i9 from 'primeng/tag';
|
|
55
56
|
import { TagModule, Tag } from 'primeng/tag';
|
|
56
|
-
import { TextareaModule } from 'primeng/textarea';
|
|
57
|
-
import * as i4$
|
|
57
|
+
import { TextareaModule, Textarea } from 'primeng/textarea';
|
|
58
|
+
import * as i4$1 from 'primeng/toolbar';
|
|
58
59
|
import { ToolbarModule } from 'primeng/toolbar';
|
|
60
|
+
import * as i5 from 'primeng/card';
|
|
61
|
+
import { CardModule } from 'primeng/card';
|
|
62
|
+
import { DividerModule } from 'primeng/divider';
|
|
63
|
+
import * as i6 from 'primeng/panel';
|
|
64
|
+
import { PanelModule } from 'primeng/panel';
|
|
65
|
+
import * as i7 from 'primeng/popover';
|
|
66
|
+
import { PopoverModule } from 'primeng/popover';
|
|
67
|
+
import * as i8 from 'primeng/progressspinner';
|
|
68
|
+
import { ProgressSpinnerModule } from 'primeng/progressspinner';
|
|
59
69
|
import * as signalR from '@microsoft/signalr';
|
|
60
70
|
|
|
61
71
|
class TopBarService {
|
|
@@ -145,6 +155,24 @@ class MsgService {
|
|
|
145
155
|
life: life
|
|
146
156
|
});
|
|
147
157
|
}
|
|
158
|
+
extractErrorMessage(error, fallback) {
|
|
159
|
+
if (typeof error === 'object' &&
|
|
160
|
+
error &&
|
|
161
|
+
'error' in error &&
|
|
162
|
+
typeof error.error === 'object' &&
|
|
163
|
+
error.error &&
|
|
164
|
+
'message' in error.error &&
|
|
165
|
+
typeof error.error.message === 'string') {
|
|
166
|
+
return error.error.message;
|
|
167
|
+
}
|
|
168
|
+
if (typeof error === 'object' && error && 'message' in error && typeof error.message === 'string') {
|
|
169
|
+
return error.message;
|
|
170
|
+
}
|
|
171
|
+
return fallback;
|
|
172
|
+
}
|
|
173
|
+
errorFromException(error, fallback, summary = fallback, life = this.lifetime) {
|
|
174
|
+
this.error(this.extractErrorMessage(error, fallback), summary, life);
|
|
175
|
+
}
|
|
148
176
|
contrast(detail, summary = this.translate.instant('msgService.error'), life = this.lifetime) {
|
|
149
177
|
this.messageService.add({
|
|
150
178
|
severity: 'contrast',
|
|
@@ -814,7 +842,7 @@ class SecurityComponent {
|
|
|
814
842
|
</div>
|
|
815
843
|
</div>
|
|
816
844
|
</div>
|
|
817
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: MultiSelectModule }, { kind: "component", type: i1.MultiSelect, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "styleClass", "panelStyle", "panelStyleClass", "inputId", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "dataKey", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "chipIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "placeholder", "options", "filterValue", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus", "highlightOnSelect", "size", "variant", "fluid", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i2.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type:
|
|
845
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: MultiSelectModule }, { kind: "component", type: i1.MultiSelect, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "styleClass", "panelStyle", "panelStyleClass", "inputId", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "dataKey", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "chipIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "placeholder", "options", "filterValue", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus", "highlightOnSelect", "size", "variant", "fluid", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i2.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1$2.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
818
846
|
}
|
|
819
847
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: SecurityComponent, decorators: [{
|
|
820
848
|
type: Component,
|
|
@@ -1293,7 +1321,7 @@ class AppConfiguratorComponent {
|
|
|
1293
1321
|
</div>
|
|
1294
1322
|
}
|
|
1295
1323
|
</div>
|
|
1296
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type:
|
|
1324
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: SelectButtonModule }, { kind: "component", type: i3.SelectButton, selector: "p-selectButton, p-selectbutton, p-select-button", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "unselectable", "tabindex", "multiple", "allowEmpty", "styleClass", "ariaLabelledBy", "dataKey", "autofocus", "size", "fluid"], outputs: ["onOptionClick", "onChange"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
1297
1325
|
}
|
|
1298
1326
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AppConfiguratorComponent, decorators: [{
|
|
1299
1327
|
type: Component,
|
|
@@ -1734,7 +1762,7 @@ class AppTopbar {
|
|
|
1734
1762
|
</div>
|
|
1735
1763
|
</div>
|
|
1736
1764
|
</div>
|
|
1737
|
-
</div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$
|
|
1765
|
+
</div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "ngmodule", type: StyleClassModule }, { kind: "directive", type: i3$1.StyleClass, selector: "[pStyleClass]", inputs: ["pStyleClass", "enterFromClass", "enterActiveClass", "enterToClass", "leaveFromClass", "leaveActiveClass", "leaveToClass", "hideOnOutsideClick", "toggleClass", "hideOnEscape", "hideOnResize", "resizeSelector"] }, { kind: "component", type: AppConfiguratorComponent, selector: "app-configurator" }, { kind: "component", type: Tabs, selector: "p-tabs", inputs: ["value", "scrollable", "lazy", "selectOnFocus", "showNavigators", "tabindex"], outputs: ["valueChange"] }, { kind: "component", type: TabList, selector: "p-tablist" }, { kind: "component", type: Tab, selector: "p-tab", inputs: ["value", "disabled"], outputs: ["valueChange"] }, { kind: "ngmodule", type: AvatarModule }, { kind: "component", type: i2$2.Avatar, selector: "p-avatar", inputs: ["label", "icon", "image", "size", "shape", "styleClass", "ariaLabel", "ariaLabelledBy"], outputs: ["onImageError"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1$2.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
1738
1766
|
}
|
|
1739
1767
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AppTopbar, decorators: [{
|
|
1740
1768
|
type: Component,
|
|
@@ -2075,6 +2103,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2075
2103
|
args: [{ providedIn: "root" }]
|
|
2076
2104
|
}], ctorParameters: () => [] });
|
|
2077
2105
|
|
|
2106
|
+
/* eslint-disable */
|
|
2107
|
+
/* tslint:disable */
|
|
2108
|
+
// @ts-nocheck
|
|
2078
2109
|
class MenuApi extends HttpClient {
|
|
2079
2110
|
constructor() {
|
|
2080
2111
|
super(...arguments);
|
|
@@ -2369,7 +2400,7 @@ class MenuItemComponent {
|
|
|
2369
2400
|
},
|
|
2370
2401
|
{ separator: true, visible: this.hasVisibleNext(item) || this.hasVisiblePrev(item) },
|
|
2371
2402
|
{
|
|
2372
|
-
label:
|
|
2403
|
+
label: this.localization.moveUp,
|
|
2373
2404
|
icon: PrimeIcons.ANGLE_UP,
|
|
2374
2405
|
command: (event) => {
|
|
2375
2406
|
this.moveUp(item);
|
|
@@ -2379,7 +2410,7 @@ class MenuItemComponent {
|
|
|
2379
2410
|
visible: this.hasVisiblePrev(item)
|
|
2380
2411
|
},
|
|
2381
2412
|
{
|
|
2382
|
-
label:
|
|
2413
|
+
label: this.localization.moveDown,
|
|
2383
2414
|
icon: PrimeIcons.ANGLE_DOWN,
|
|
2384
2415
|
command: (event) => {
|
|
2385
2416
|
this.moveDown(item);
|
|
@@ -2458,10 +2489,12 @@ class MenuItemComponent {
|
|
|
2458
2489
|
const firstIndex = items.findIndex((item) => item.moduleInstanceId === firstModule.moduleInstanceId);
|
|
2459
2490
|
const secondIndex = items.findIndex((item) => item.moduleInstanceId === secondModule.moduleInstanceId);
|
|
2460
2491
|
[items[firstIndex], items[secondIndex]] = [items[secondIndex], items[firstIndex]];
|
|
2461
|
-
this.menuDataService
|
|
2492
|
+
this.menuDataService
|
|
2493
|
+
.changeOrder({
|
|
2462
2494
|
firstModuleId: firstModule.moduleInstanceId,
|
|
2463
2495
|
secondModuleId: secondModule.moduleInstanceId
|
|
2464
|
-
})
|
|
2496
|
+
})
|
|
2497
|
+
.then();
|
|
2465
2498
|
}
|
|
2466
2499
|
hasVisiblePrev(currentItem) {
|
|
2467
2500
|
const items = this.getItems(currentItem);
|
|
@@ -2478,14 +2511,12 @@ class MenuItemComponent {
|
|
|
2478
2511
|
const currentIndex = items.findIndex((item) => item.moduleInstanceId == currentItem.moduleInstanceId);
|
|
2479
2512
|
return currentIndex < items.length - 1;
|
|
2480
2513
|
}
|
|
2481
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MenuItemComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$
|
|
2514
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MenuItemComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$3.Router }, { token: MenuService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2482
2515
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: MenuItemComponent, isStandalone: true, selector: "[app-menuitem]", inputs: { item: "item", index: "index", root: "root", parentKey: "parentKey", menuItemCreateDialogComponent: "menuItemCreateDialogComponent", menuItemEditDialogComponent: "menuItemEditDialogComponent", contextMenu: "contextMenu" }, host: { properties: { "class.layout-root-menuitem": "this.root", "class.active-menuitem": "this.activeClass" } }, providers: [ConfirmationService], ngImport: i0, template: `
|
|
2483
2516
|
<ng-container>
|
|
2484
|
-
<p-confirm-dialog/>
|
|
2517
|
+
<p-confirm-dialog />
|
|
2485
2518
|
@if (root && item.visible !== false) {
|
|
2486
|
-
<div
|
|
2487
|
-
class="layout-menuitem-root-text"
|
|
2488
|
-
(contextmenu)="onContextMenu($event, item)">
|
|
2519
|
+
<div class="layout-menuitem-root-text" (contextmenu)="onContextMenu($event, item)">
|
|
2489
2520
|
{{ item.label }}
|
|
2490
2521
|
</div>
|
|
2491
2522
|
}
|
|
@@ -2518,13 +2549,13 @@ class MenuItemComponent {
|
|
|
2518
2549
|
[replaceUrl]="item.replaceUrl"
|
|
2519
2550
|
[routerLink]="item.routerLink"
|
|
2520
2551
|
[routerLinkActiveOptions]="
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2552
|
+
item.routerLinkActiveOptions || {
|
|
2553
|
+
paths: 'exact',
|
|
2554
|
+
queryParams: 'ignored',
|
|
2555
|
+
matrixParams: 'ignored',
|
|
2556
|
+
fragment: 'ignored'
|
|
2557
|
+
}
|
|
2558
|
+
"
|
|
2528
2559
|
[skipLocationChange]="item.skipLocationChange"
|
|
2529
2560
|
[state]="item.state"
|
|
2530
2561
|
(click)="itemClick($event)"
|
|
@@ -2538,9 +2569,7 @@ class MenuItemComponent {
|
|
|
2538
2569
|
}
|
|
2539
2570
|
|
|
2540
2571
|
@if (item.items && item.visible !== false) {
|
|
2541
|
-
<ul
|
|
2542
|
-
[@children]="submenuAnimation"
|
|
2543
|
-
(contextmenu)="onContextMenu($event, item)">
|
|
2572
|
+
<ul [@children]="submenuAnimation" (contextmenu)="onContextMenu($event, item)">
|
|
2544
2573
|
@for (child of item.items; track child; let i = $index) {
|
|
2545
2574
|
<li
|
|
2546
2575
|
app-menuitem
|
|
@@ -2574,11 +2603,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2574
2603
|
selector: '[app-menuitem]',
|
|
2575
2604
|
template: `
|
|
2576
2605
|
<ng-container>
|
|
2577
|
-
<p-confirm-dialog/>
|
|
2606
|
+
<p-confirm-dialog />
|
|
2578
2607
|
@if (root && item.visible !== false) {
|
|
2579
|
-
<div
|
|
2580
|
-
class="layout-menuitem-root-text"
|
|
2581
|
-
(contextmenu)="onContextMenu($event, item)">
|
|
2608
|
+
<div class="layout-menuitem-root-text" (contextmenu)="onContextMenu($event, item)">
|
|
2582
2609
|
{{ item.label }}
|
|
2583
2610
|
</div>
|
|
2584
2611
|
}
|
|
@@ -2611,13 +2638,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2611
2638
|
[replaceUrl]="item.replaceUrl"
|
|
2612
2639
|
[routerLink]="item.routerLink"
|
|
2613
2640
|
[routerLinkActiveOptions]="
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2641
|
+
item.routerLinkActiveOptions || {
|
|
2642
|
+
paths: 'exact',
|
|
2643
|
+
queryParams: 'ignored',
|
|
2644
|
+
matrixParams: 'ignored',
|
|
2645
|
+
fragment: 'ignored'
|
|
2646
|
+
}
|
|
2647
|
+
"
|
|
2621
2648
|
[skipLocationChange]="item.skipLocationChange"
|
|
2622
2649
|
[state]="item.state"
|
|
2623
2650
|
(click)="itemClick($event)"
|
|
@@ -2631,9 +2658,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2631
2658
|
}
|
|
2632
2659
|
|
|
2633
2660
|
@if (item.items && item.visible !== false) {
|
|
2634
|
-
<ul
|
|
2635
|
-
[@children]="submenuAnimation"
|
|
2636
|
-
(contextmenu)="onContextMenu($event, item)">
|
|
2661
|
+
<ul [@children]="submenuAnimation" (contextmenu)="onContextMenu($event, item)">
|
|
2637
2662
|
@for (child of item.items; track child; let i = $index) {
|
|
2638
2663
|
<li
|
|
2639
2664
|
app-menuitem
|
|
@@ -2663,7 +2688,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2663
2688
|
imports: [RippleModule, NgClass, RouterLinkActive, RouterLink, ContextMenuModule, ConfirmDialog],
|
|
2664
2689
|
providers: [ConfirmationService]
|
|
2665
2690
|
}]
|
|
2666
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$
|
|
2691
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$3.Router }, { type: MenuService }], propDecorators: { item: [{
|
|
2667
2692
|
type: Input
|
|
2668
2693
|
}], index: [{
|
|
2669
2694
|
type: Input
|
|
@@ -2720,68 +2745,68 @@ class MenuItemCreateDialogComponent {
|
|
|
2720
2745
|
this.visibleChange.emit(this.visible);
|
|
2721
2746
|
}
|
|
2722
2747
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MenuItemCreateDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2723
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: MenuItemCreateDialogComponent, isStandalone: true, selector: "menu-item-create-dialog", inputs: { visible: "visible" }, outputs: { visibleChange: "visibleChange" }, ngImport: i0, template: `
|
|
2724
|
-
<p-dialog
|
|
2725
|
-
header="{{ 'menuItemCreateDialogComponent.header' | translate }}"
|
|
2726
|
-
[modal]="true"
|
|
2727
|
-
[style]="{ width: '40rem' }"
|
|
2728
|
-
[(visible)]="visible">
|
|
2729
|
-
@if (menuService.contextMenuItem) {
|
|
2730
|
-
<div class="flex items-center gap-4 mb-4 mt-1">
|
|
2731
|
-
<label class="font-semibold w-1/3" for="oip-menu-item-create-dialog-parent-input">
|
|
2732
|
-
{{ 'menuItemCreateDialogComponent.parentLabel' | translate }}
|
|
2733
|
-
</label>
|
|
2734
|
-
<input
|
|
2735
|
-
autocomplete="off"
|
|
2736
|
-
class="flex-auto"
|
|
2737
|
-
id="oip-menu-item-create-dialog-parent-input"
|
|
2738
|
-
pInputText
|
|
2739
|
-
readonly
|
|
2740
|
-
[ngModel]="menuService.contextMenuItem?.label"/>
|
|
2741
|
-
</div>
|
|
2742
|
-
}
|
|
2743
|
-
<div class="flex items-center gap-4 mb-4">
|
|
2744
|
-
<label class="font-semibold w-1/3" for="oip-menu-item-create-label">
|
|
2745
|
-
{{ 'menuItemCreateDialogComponent.label' | translate }}
|
|
2746
|
-
</label>
|
|
2747
|
-
<input autocomplete="off" class="flex-auto" id="oip-menu-item-create-label" pInputText [(ngModel)]="label"/>
|
|
2748
|
-
</div>
|
|
2749
|
-
<div class="flex items-center gap-4 mb-4">
|
|
2750
|
-
<label class="font-semibold w-1/3" for="oip-menu-item-create-module">
|
|
2751
|
-
{{ 'menuItemCreateDialogComponent.module' | translate }}
|
|
2752
|
-
</label>
|
|
2753
|
-
<p-select
|
|
2754
|
-
appendTo="body"
|
|
2755
|
-
class="flex-auto"
|
|
2756
|
-
id="oip-menu-item-create-module"
|
|
2757
|
-
optionLabel="value"
|
|
2758
|
-
optionValue="key"
|
|
2759
|
-
placeholder="{{ 'menuItemCreateDialogComponent.selectModule' | translate }}"
|
|
2760
|
-
[options]="modules"
|
|
2761
|
-
[(ngModel)]="selectModule"/>
|
|
2762
|
-
</div>
|
|
2763
|
-
<div class="flex items-center gap-4 mb-4">
|
|
2764
|
-
<label class="font-semibold w-1/3" for="oip-menu-item-create-dialog-icon">
|
|
2765
|
-
{{ 'menuItemCreateDialogComponent.icon' | translate }}
|
|
2766
|
-
</label>
|
|
2767
|
-
<i class="{{ selectIcon }}"></i>
|
|
2768
|
-
<input class="flex-auto" id="oip-menu-item-create-dialog-icon" pInputText [(ngModel)]="selectIcon"/>
|
|
2769
|
-
</div>
|
|
2770
|
-
<div class="flex justify-end gap-2">
|
|
2771
|
-
<p-button
|
|
2772
|
-
id="oip-menu-item-create-cancel"
|
|
2773
|
-
label="{{ 'menuItemCreateDialogComponent.cancel' | translate }}"
|
|
2774
|
-
severity="secondary"
|
|
2775
|
-
(click)="changeVisible()"
|
|
2776
|
-
(keydown)="changeVisible()"/>
|
|
2777
|
-
<p-button
|
|
2778
|
-
id="oip-menu-item-create-save"
|
|
2779
|
-
label="{{ 'menuItemCreateDialogComponent.save' | translate }}"
|
|
2780
|
-
(click)="save()"
|
|
2781
|
-
(keydown)="save()"/>
|
|
2782
|
-
</div>
|
|
2783
|
-
</p-dialog>
|
|
2784
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1$
|
|
2748
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: MenuItemCreateDialogComponent, isStandalone: true, selector: "menu-item-create-dialog", inputs: { visible: "visible" }, outputs: { visibleChange: "visibleChange" }, ngImport: i0, template: `
|
|
2749
|
+
<p-dialog
|
|
2750
|
+
header="{{ 'menuItemCreateDialogComponent.header' | translate }}"
|
|
2751
|
+
[modal]="true"
|
|
2752
|
+
[style]="{ width: '40rem' }"
|
|
2753
|
+
[(visible)]="visible">
|
|
2754
|
+
@if (menuService.contextMenuItem) {
|
|
2755
|
+
<div class="flex items-center gap-4 mb-4 mt-1">
|
|
2756
|
+
<label class="font-semibold w-1/3" for="oip-menu-item-create-dialog-parent-input">
|
|
2757
|
+
{{ 'menuItemCreateDialogComponent.parentLabel' | translate }}
|
|
2758
|
+
</label>
|
|
2759
|
+
<input
|
|
2760
|
+
autocomplete="off"
|
|
2761
|
+
class="flex-auto"
|
|
2762
|
+
id="oip-menu-item-create-dialog-parent-input"
|
|
2763
|
+
pInputText
|
|
2764
|
+
readonly
|
|
2765
|
+
[ngModel]="menuService.contextMenuItem?.label" />
|
|
2766
|
+
</div>
|
|
2767
|
+
}
|
|
2768
|
+
<div class="flex items-center gap-4 mb-4">
|
|
2769
|
+
<label class="font-semibold w-1/3" for="oip-menu-item-create-label">
|
|
2770
|
+
{{ 'menuItemCreateDialogComponent.label' | translate }}
|
|
2771
|
+
</label>
|
|
2772
|
+
<input autocomplete="off" class="flex-auto" id="oip-menu-item-create-label" pInputText [(ngModel)]="label" />
|
|
2773
|
+
</div>
|
|
2774
|
+
<div class="flex items-center gap-4 mb-4">
|
|
2775
|
+
<label class="font-semibold w-1/3" for="oip-menu-item-create-module">
|
|
2776
|
+
{{ 'menuItemCreateDialogComponent.module' | translate }}
|
|
2777
|
+
</label>
|
|
2778
|
+
<p-select
|
|
2779
|
+
appendTo="body"
|
|
2780
|
+
class="flex-auto"
|
|
2781
|
+
id="oip-menu-item-create-module"
|
|
2782
|
+
optionLabel="value"
|
|
2783
|
+
optionValue="key"
|
|
2784
|
+
placeholder="{{ 'menuItemCreateDialogComponent.selectModule' | translate }}"
|
|
2785
|
+
[options]="modules"
|
|
2786
|
+
[(ngModel)]="selectModule" />
|
|
2787
|
+
</div>
|
|
2788
|
+
<div class="flex items-center gap-4 mb-4">
|
|
2789
|
+
<label class="font-semibold w-1/3" for="oip-menu-item-create-dialog-icon">
|
|
2790
|
+
{{ 'menuItemCreateDialogComponent.icon' | translate }}
|
|
2791
|
+
</label>
|
|
2792
|
+
<i class="{{ selectIcon }}"></i>
|
|
2793
|
+
<input class="flex-auto" id="oip-menu-item-create-dialog-icon" pInputText [(ngModel)]="selectIcon" />
|
|
2794
|
+
</div>
|
|
2795
|
+
<div class="flex justify-end gap-2">
|
|
2796
|
+
<p-button
|
|
2797
|
+
id="oip-menu-item-create-cancel"
|
|
2798
|
+
label="{{ 'menuItemCreateDialogComponent.cancel' | translate }}"
|
|
2799
|
+
severity="secondary"
|
|
2800
|
+
(click)="changeVisible()"
|
|
2801
|
+
(keydown)="changeVisible()" />
|
|
2802
|
+
<p-button
|
|
2803
|
+
id="oip-menu-item-create-save"
|
|
2804
|
+
label="{{ 'menuItemCreateDialogComponent.save' | translate }}"
|
|
2805
|
+
(click)="save()"
|
|
2806
|
+
(keydown)="save()" />
|
|
2807
|
+
</div>
|
|
2808
|
+
</p-dialog>
|
|
2809
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1$2.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i2$3.Dialog, selector: "p-dialog", inputs: ["hostName", "header", "draggable", "resizable", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "appendTo", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i3$3.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i4.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
2785
2810
|
}
|
|
2786
2811
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MenuItemCreateDialogComponent, decorators: [{
|
|
2787
2812
|
type: Component,
|
|
@@ -2789,67 +2814,67 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2789
2814
|
selector: 'menu-item-create-dialog',
|
|
2790
2815
|
standalone: true,
|
|
2791
2816
|
imports: [ButtonModule, DialogModule, InputTextModule, SelectModule, FormsModule, TranslatePipe],
|
|
2792
|
-
template: `
|
|
2793
|
-
<p-dialog
|
|
2794
|
-
header="{{ 'menuItemCreateDialogComponent.header' | translate }}"
|
|
2795
|
-
[modal]="true"
|
|
2796
|
-
[style]="{ width: '40rem' }"
|
|
2797
|
-
[(visible)]="visible">
|
|
2798
|
-
@if (menuService.contextMenuItem) {
|
|
2799
|
-
<div class="flex items-center gap-4 mb-4 mt-1">
|
|
2800
|
-
<label class="font-semibold w-1/3" for="oip-menu-item-create-dialog-parent-input">
|
|
2801
|
-
{{ 'menuItemCreateDialogComponent.parentLabel' | translate }}
|
|
2802
|
-
</label>
|
|
2803
|
-
<input
|
|
2804
|
-
autocomplete="off"
|
|
2805
|
-
class="flex-auto"
|
|
2806
|
-
id="oip-menu-item-create-dialog-parent-input"
|
|
2807
|
-
pInputText
|
|
2808
|
-
readonly
|
|
2809
|
-
[ngModel]="menuService.contextMenuItem?.label"/>
|
|
2810
|
-
</div>
|
|
2811
|
-
}
|
|
2812
|
-
<div class="flex items-center gap-4 mb-4">
|
|
2813
|
-
<label class="font-semibold w-1/3" for="oip-menu-item-create-label">
|
|
2814
|
-
{{ 'menuItemCreateDialogComponent.label' | translate }}
|
|
2815
|
-
</label>
|
|
2816
|
-
<input autocomplete="off" class="flex-auto" id="oip-menu-item-create-label" pInputText [(ngModel)]="label"/>
|
|
2817
|
-
</div>
|
|
2818
|
-
<div class="flex items-center gap-4 mb-4">
|
|
2819
|
-
<label class="font-semibold w-1/3" for="oip-menu-item-create-module">
|
|
2820
|
-
{{ 'menuItemCreateDialogComponent.module' | translate }}
|
|
2821
|
-
</label>
|
|
2822
|
-
<p-select
|
|
2823
|
-
appendTo="body"
|
|
2824
|
-
class="flex-auto"
|
|
2825
|
-
id="oip-menu-item-create-module"
|
|
2826
|
-
optionLabel="value"
|
|
2827
|
-
optionValue="key"
|
|
2828
|
-
placeholder="{{ 'menuItemCreateDialogComponent.selectModule' | translate }}"
|
|
2829
|
-
[options]="modules"
|
|
2830
|
-
[(ngModel)]="selectModule"/>
|
|
2831
|
-
</div>
|
|
2832
|
-
<div class="flex items-center gap-4 mb-4">
|
|
2833
|
-
<label class="font-semibold w-1/3" for="oip-menu-item-create-dialog-icon">
|
|
2834
|
-
{{ 'menuItemCreateDialogComponent.icon' | translate }}
|
|
2835
|
-
</label>
|
|
2836
|
-
<i class="{{ selectIcon }}"></i>
|
|
2837
|
-
<input class="flex-auto" id="oip-menu-item-create-dialog-icon" pInputText [(ngModel)]="selectIcon"/>
|
|
2838
|
-
</div>
|
|
2839
|
-
<div class="flex justify-end gap-2">
|
|
2840
|
-
<p-button
|
|
2841
|
-
id="oip-menu-item-create-cancel"
|
|
2842
|
-
label="{{ 'menuItemCreateDialogComponent.cancel' | translate }}"
|
|
2843
|
-
severity="secondary"
|
|
2844
|
-
(click)="changeVisible()"
|
|
2845
|
-
(keydown)="changeVisible()"/>
|
|
2846
|
-
<p-button
|
|
2847
|
-
id="oip-menu-item-create-save"
|
|
2848
|
-
label="{{ 'menuItemCreateDialogComponent.save' | translate }}"
|
|
2849
|
-
(click)="save()"
|
|
2850
|
-
(keydown)="save()"/>
|
|
2851
|
-
</div>
|
|
2852
|
-
</p-dialog>
|
|
2817
|
+
template: `
|
|
2818
|
+
<p-dialog
|
|
2819
|
+
header="{{ 'menuItemCreateDialogComponent.header' | translate }}"
|
|
2820
|
+
[modal]="true"
|
|
2821
|
+
[style]="{ width: '40rem' }"
|
|
2822
|
+
[(visible)]="visible">
|
|
2823
|
+
@if (menuService.contextMenuItem) {
|
|
2824
|
+
<div class="flex items-center gap-4 mb-4 mt-1">
|
|
2825
|
+
<label class="font-semibold w-1/3" for="oip-menu-item-create-dialog-parent-input">
|
|
2826
|
+
{{ 'menuItemCreateDialogComponent.parentLabel' | translate }}
|
|
2827
|
+
</label>
|
|
2828
|
+
<input
|
|
2829
|
+
autocomplete="off"
|
|
2830
|
+
class="flex-auto"
|
|
2831
|
+
id="oip-menu-item-create-dialog-parent-input"
|
|
2832
|
+
pInputText
|
|
2833
|
+
readonly
|
|
2834
|
+
[ngModel]="menuService.contextMenuItem?.label" />
|
|
2835
|
+
</div>
|
|
2836
|
+
}
|
|
2837
|
+
<div class="flex items-center gap-4 mb-4">
|
|
2838
|
+
<label class="font-semibold w-1/3" for="oip-menu-item-create-label">
|
|
2839
|
+
{{ 'menuItemCreateDialogComponent.label' | translate }}
|
|
2840
|
+
</label>
|
|
2841
|
+
<input autocomplete="off" class="flex-auto" id="oip-menu-item-create-label" pInputText [(ngModel)]="label" />
|
|
2842
|
+
</div>
|
|
2843
|
+
<div class="flex items-center gap-4 mb-4">
|
|
2844
|
+
<label class="font-semibold w-1/3" for="oip-menu-item-create-module">
|
|
2845
|
+
{{ 'menuItemCreateDialogComponent.module' | translate }}
|
|
2846
|
+
</label>
|
|
2847
|
+
<p-select
|
|
2848
|
+
appendTo="body"
|
|
2849
|
+
class="flex-auto"
|
|
2850
|
+
id="oip-menu-item-create-module"
|
|
2851
|
+
optionLabel="value"
|
|
2852
|
+
optionValue="key"
|
|
2853
|
+
placeholder="{{ 'menuItemCreateDialogComponent.selectModule' | translate }}"
|
|
2854
|
+
[options]="modules"
|
|
2855
|
+
[(ngModel)]="selectModule" />
|
|
2856
|
+
</div>
|
|
2857
|
+
<div class="flex items-center gap-4 mb-4">
|
|
2858
|
+
<label class="font-semibold w-1/3" for="oip-menu-item-create-dialog-icon">
|
|
2859
|
+
{{ 'menuItemCreateDialogComponent.icon' | translate }}
|
|
2860
|
+
</label>
|
|
2861
|
+
<i class="{{ selectIcon }}"></i>
|
|
2862
|
+
<input class="flex-auto" id="oip-menu-item-create-dialog-icon" pInputText [(ngModel)]="selectIcon" />
|
|
2863
|
+
</div>
|
|
2864
|
+
<div class="flex justify-end gap-2">
|
|
2865
|
+
<p-button
|
|
2866
|
+
id="oip-menu-item-create-cancel"
|
|
2867
|
+
label="{{ 'menuItemCreateDialogComponent.cancel' | translate }}"
|
|
2868
|
+
severity="secondary"
|
|
2869
|
+
(click)="changeVisible()"
|
|
2870
|
+
(keydown)="changeVisible()" />
|
|
2871
|
+
<p-button
|
|
2872
|
+
id="oip-menu-item-create-save"
|
|
2873
|
+
label="{{ 'menuItemCreateDialogComponent.save' | translate }}"
|
|
2874
|
+
(click)="save()"
|
|
2875
|
+
(keydown)="save()" />
|
|
2876
|
+
</div>
|
|
2877
|
+
</p-dialog>
|
|
2853
2878
|
`
|
|
2854
2879
|
}]
|
|
2855
2880
|
}], propDecorators: { visible: [{
|
|
@@ -2904,61 +2929,61 @@ class MenuItemEditDialogComponent {
|
|
|
2904
2929
|
this.visibleChange.emit(this.visible);
|
|
2905
2930
|
}
|
|
2906
2931
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MenuItemEditDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2907
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: MenuItemEditDialogComponent, isStandalone: true, selector: "menu-item-edit-dialog", inputs: { visible: "visible" }, outputs: { visibleChange: "visibleChange" }, ngImport: i0, template: `
|
|
2908
|
-
<p-dialog
|
|
2909
|
-
header="{{ 'menuItemEditDialogComponent.header' | translate }}"
|
|
2910
|
-
[modal]="true"
|
|
2911
|
-
[style]="{ width: '40rem' }"
|
|
2912
|
-
[(visible)]="visible">
|
|
2913
|
-
<div class="flex items-center gap-4 mb-4 mt-1">
|
|
2914
|
-
<label class="font-semibold w-1/3" for="oip-menu-item-edit-dialog-menu-input">
|
|
2915
|
-
{{ 'menuItemEditDialogComponent.label' | translate }}
|
|
2916
|
-
</label>
|
|
2917
|
-
<input
|
|
2918
|
-
autocomplete="off"
|
|
2919
|
-
class="flex-auto"
|
|
2920
|
-
id="oip-menu-item-edit-dialog-menu-input"
|
|
2921
|
-
pInputText
|
|
2922
|
-
[(ngModel)]="item.label" />
|
|
2923
|
-
</div>
|
|
2924
|
-
|
|
2925
|
-
<div class="flex items-center gap-4 mb-4">
|
|
2926
|
-
<label class="font-semibold w-1/3" for="oip-menu-item-edit-dialog-icon">
|
|
2927
|
-
{{ 'menuItemEditDialogComponent.icon' | translate }}
|
|
2928
|
-
</label>
|
|
2929
|
-
<i class="{{ item.icon }}"></i>
|
|
2930
|
-
<input class="flex-auto" id="oip-menu-item-edit-dialog-icon" pInputText [(ngModel)]="item.icon" />
|
|
2931
|
-
</div>
|
|
2932
|
-
|
|
2933
|
-
<div class="flex items-center gap-4 mb-4">
|
|
2934
|
-
<label class="font-semibold w-1/3" for="security">
|
|
2935
|
-
{{ 'menuItemEditDialogComponent.security' | translate }}
|
|
2936
|
-
</label>
|
|
2937
|
-
<p-multiSelect
|
|
2938
|
-
appendTo="body"
|
|
2939
|
-
class="flex-auto"
|
|
2940
|
-
id="oip-menu-item-edit-dialog-roles-multi-select"
|
|
2941
|
-
placeholder="Select roles"
|
|
2942
|
-
[maxSelectedLabels]="10"
|
|
2943
|
-
[options]="roles"
|
|
2944
|
-
[(ngModel)]="item.viewRoles" />
|
|
2945
|
-
</div>
|
|
2946
|
-
|
|
2947
|
-
<div class="flex justify-end gap-2">
|
|
2948
|
-
<p-button
|
|
2949
|
-
id="oip-menu-item-edit-dialog-cancel-edit-button"
|
|
2950
|
-
label="{{ 'menuItemEditDialogComponent.cancel' | translate }}"
|
|
2951
|
-
severity="secondary"
|
|
2952
|
-
(click)="changeVisible()"
|
|
2953
|
-
(keydown)="changeVisible()" />
|
|
2954
|
-
<p-button
|
|
2955
|
-
id="oip-menu-item-edit-dialog-save-edit-button"
|
|
2956
|
-
label="{{ 'menuItemEditDialogComponent.save' | translate }}"
|
|
2957
|
-
(click)="save()"
|
|
2958
|
-
(keydown)="save()" />
|
|
2959
|
-
</div>
|
|
2960
|
-
</p-dialog>
|
|
2961
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1$
|
|
2932
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: MenuItemEditDialogComponent, isStandalone: true, selector: "menu-item-edit-dialog", inputs: { visible: "visible" }, outputs: { visibleChange: "visibleChange" }, ngImport: i0, template: `
|
|
2933
|
+
<p-dialog
|
|
2934
|
+
header="{{ 'menuItemEditDialogComponent.header' | translate }}"
|
|
2935
|
+
[modal]="true"
|
|
2936
|
+
[style]="{ width: '40rem' }"
|
|
2937
|
+
[(visible)]="visible">
|
|
2938
|
+
<div class="flex items-center gap-4 mb-4 mt-1">
|
|
2939
|
+
<label class="font-semibold w-1/3" for="oip-menu-item-edit-dialog-menu-input">
|
|
2940
|
+
{{ 'menuItemEditDialogComponent.label' | translate }}
|
|
2941
|
+
</label>
|
|
2942
|
+
<input
|
|
2943
|
+
autocomplete="off"
|
|
2944
|
+
class="flex-auto"
|
|
2945
|
+
id="oip-menu-item-edit-dialog-menu-input"
|
|
2946
|
+
pInputText
|
|
2947
|
+
[(ngModel)]="item.label" />
|
|
2948
|
+
</div>
|
|
2949
|
+
|
|
2950
|
+
<div class="flex items-center gap-4 mb-4">
|
|
2951
|
+
<label class="font-semibold w-1/3" for="oip-menu-item-edit-dialog-icon">
|
|
2952
|
+
{{ 'menuItemEditDialogComponent.icon' | translate }}
|
|
2953
|
+
</label>
|
|
2954
|
+
<i class="{{ item.icon }}"></i>
|
|
2955
|
+
<input class="flex-auto" id="oip-menu-item-edit-dialog-icon" pInputText [(ngModel)]="item.icon" />
|
|
2956
|
+
</div>
|
|
2957
|
+
|
|
2958
|
+
<div class="flex items-center gap-4 mb-4">
|
|
2959
|
+
<label class="font-semibold w-1/3" for="security">
|
|
2960
|
+
{{ 'menuItemEditDialogComponent.security' | translate }}
|
|
2961
|
+
</label>
|
|
2962
|
+
<p-multiSelect
|
|
2963
|
+
appendTo="body"
|
|
2964
|
+
class="flex-auto"
|
|
2965
|
+
id="oip-menu-item-edit-dialog-roles-multi-select"
|
|
2966
|
+
placeholder="Select roles"
|
|
2967
|
+
[maxSelectedLabels]="10"
|
|
2968
|
+
[options]="roles"
|
|
2969
|
+
[(ngModel)]="item.viewRoles" />
|
|
2970
|
+
</div>
|
|
2971
|
+
|
|
2972
|
+
<div class="flex justify-end gap-2">
|
|
2973
|
+
<p-button
|
|
2974
|
+
id="oip-menu-item-edit-dialog-cancel-edit-button"
|
|
2975
|
+
label="{{ 'menuItemEditDialogComponent.cancel' | translate }}"
|
|
2976
|
+
severity="secondary"
|
|
2977
|
+
(click)="changeVisible()"
|
|
2978
|
+
(keydown)="changeVisible()" />
|
|
2979
|
+
<p-button
|
|
2980
|
+
id="oip-menu-item-edit-dialog-save-edit-button"
|
|
2981
|
+
label="{{ 'menuItemEditDialogComponent.save' | translate }}"
|
|
2982
|
+
(click)="save()"
|
|
2983
|
+
(keydown)="save()" />
|
|
2984
|
+
</div>
|
|
2985
|
+
</p-dialog>
|
|
2986
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1$2.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i2$3.Dialog, selector: "p-dialog", inputs: ["hostName", "header", "draggable", "resizable", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "appendTo", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i3$3.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MultiSelectModule }, { kind: "component", type: i1.MultiSelect, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "styleClass", "panelStyle", "panelStyleClass", "inputId", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "dataKey", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "chipIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "placeholder", "options", "filterValue", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus", "highlightOnSelect", "size", "variant", "fluid", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
2962
2987
|
}
|
|
2963
2988
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MenuItemEditDialogComponent, decorators: [{
|
|
2964
2989
|
type: Component,
|
|
@@ -2966,60 +2991,60 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2966
2991
|
imports: [ButtonModule, DialogModule, InputTextModule, FormsModule, TranslatePipe, MultiSelectModule],
|
|
2967
2992
|
selector: 'menu-item-edit-dialog',
|
|
2968
2993
|
standalone: true,
|
|
2969
|
-
template: `
|
|
2970
|
-
<p-dialog
|
|
2971
|
-
header="{{ 'menuItemEditDialogComponent.header' | translate }}"
|
|
2972
|
-
[modal]="true"
|
|
2973
|
-
[style]="{ width: '40rem' }"
|
|
2974
|
-
[(visible)]="visible">
|
|
2975
|
-
<div class="flex items-center gap-4 mb-4 mt-1">
|
|
2976
|
-
<label class="font-semibold w-1/3" for="oip-menu-item-edit-dialog-menu-input">
|
|
2977
|
-
{{ 'menuItemEditDialogComponent.label' | translate }}
|
|
2978
|
-
</label>
|
|
2979
|
-
<input
|
|
2980
|
-
autocomplete="off"
|
|
2981
|
-
class="flex-auto"
|
|
2982
|
-
id="oip-menu-item-edit-dialog-menu-input"
|
|
2983
|
-
pInputText
|
|
2984
|
-
[(ngModel)]="item.label" />
|
|
2985
|
-
</div>
|
|
2986
|
-
|
|
2987
|
-
<div class="flex items-center gap-4 mb-4">
|
|
2988
|
-
<label class="font-semibold w-1/3" for="oip-menu-item-edit-dialog-icon">
|
|
2989
|
-
{{ 'menuItemEditDialogComponent.icon' | translate }}
|
|
2990
|
-
</label>
|
|
2991
|
-
<i class="{{ item.icon }}"></i>
|
|
2992
|
-
<input class="flex-auto" id="oip-menu-item-edit-dialog-icon" pInputText [(ngModel)]="item.icon" />
|
|
2993
|
-
</div>
|
|
2994
|
-
|
|
2995
|
-
<div class="flex items-center gap-4 mb-4">
|
|
2996
|
-
<label class="font-semibold w-1/3" for="security">
|
|
2997
|
-
{{ 'menuItemEditDialogComponent.security' | translate }}
|
|
2998
|
-
</label>
|
|
2999
|
-
<p-multiSelect
|
|
3000
|
-
appendTo="body"
|
|
3001
|
-
class="flex-auto"
|
|
3002
|
-
id="oip-menu-item-edit-dialog-roles-multi-select"
|
|
3003
|
-
placeholder="Select roles"
|
|
3004
|
-
[maxSelectedLabels]="10"
|
|
3005
|
-
[options]="roles"
|
|
3006
|
-
[(ngModel)]="item.viewRoles" />
|
|
3007
|
-
</div>
|
|
3008
|
-
|
|
3009
|
-
<div class="flex justify-end gap-2">
|
|
3010
|
-
<p-button
|
|
3011
|
-
id="oip-menu-item-edit-dialog-cancel-edit-button"
|
|
3012
|
-
label="{{ 'menuItemEditDialogComponent.cancel' | translate }}"
|
|
3013
|
-
severity="secondary"
|
|
3014
|
-
(click)="changeVisible()"
|
|
3015
|
-
(keydown)="changeVisible()" />
|
|
3016
|
-
<p-button
|
|
3017
|
-
id="oip-menu-item-edit-dialog-save-edit-button"
|
|
3018
|
-
label="{{ 'menuItemEditDialogComponent.save' | translate }}"
|
|
3019
|
-
(click)="save()"
|
|
3020
|
-
(keydown)="save()" />
|
|
3021
|
-
</div>
|
|
3022
|
-
</p-dialog>
|
|
2994
|
+
template: `
|
|
2995
|
+
<p-dialog
|
|
2996
|
+
header="{{ 'menuItemEditDialogComponent.header' | translate }}"
|
|
2997
|
+
[modal]="true"
|
|
2998
|
+
[style]="{ width: '40rem' }"
|
|
2999
|
+
[(visible)]="visible">
|
|
3000
|
+
<div class="flex items-center gap-4 mb-4 mt-1">
|
|
3001
|
+
<label class="font-semibold w-1/3" for="oip-menu-item-edit-dialog-menu-input">
|
|
3002
|
+
{{ 'menuItemEditDialogComponent.label' | translate }}
|
|
3003
|
+
</label>
|
|
3004
|
+
<input
|
|
3005
|
+
autocomplete="off"
|
|
3006
|
+
class="flex-auto"
|
|
3007
|
+
id="oip-menu-item-edit-dialog-menu-input"
|
|
3008
|
+
pInputText
|
|
3009
|
+
[(ngModel)]="item.label" />
|
|
3010
|
+
</div>
|
|
3011
|
+
|
|
3012
|
+
<div class="flex items-center gap-4 mb-4">
|
|
3013
|
+
<label class="font-semibold w-1/3" for="oip-menu-item-edit-dialog-icon">
|
|
3014
|
+
{{ 'menuItemEditDialogComponent.icon' | translate }}
|
|
3015
|
+
</label>
|
|
3016
|
+
<i class="{{ item.icon }}"></i>
|
|
3017
|
+
<input class="flex-auto" id="oip-menu-item-edit-dialog-icon" pInputText [(ngModel)]="item.icon" />
|
|
3018
|
+
</div>
|
|
3019
|
+
|
|
3020
|
+
<div class="flex items-center gap-4 mb-4">
|
|
3021
|
+
<label class="font-semibold w-1/3" for="security">
|
|
3022
|
+
{{ 'menuItemEditDialogComponent.security' | translate }}
|
|
3023
|
+
</label>
|
|
3024
|
+
<p-multiSelect
|
|
3025
|
+
appendTo="body"
|
|
3026
|
+
class="flex-auto"
|
|
3027
|
+
id="oip-menu-item-edit-dialog-roles-multi-select"
|
|
3028
|
+
placeholder="Select roles"
|
|
3029
|
+
[maxSelectedLabels]="10"
|
|
3030
|
+
[options]="roles"
|
|
3031
|
+
[(ngModel)]="item.viewRoles" />
|
|
3032
|
+
</div>
|
|
3033
|
+
|
|
3034
|
+
<div class="flex justify-end gap-2">
|
|
3035
|
+
<p-button
|
|
3036
|
+
id="oip-menu-item-edit-dialog-cancel-edit-button"
|
|
3037
|
+
label="{{ 'menuItemEditDialogComponent.cancel' | translate }}"
|
|
3038
|
+
severity="secondary"
|
|
3039
|
+
(click)="changeVisible()"
|
|
3040
|
+
(keydown)="changeVisible()" />
|
|
3041
|
+
<p-button
|
|
3042
|
+
id="oip-menu-item-edit-dialog-save-edit-button"
|
|
3043
|
+
label="{{ 'menuItemEditDialogComponent.save' | translate }}"
|
|
3044
|
+
(click)="save()"
|
|
3045
|
+
(keydown)="save()" />
|
|
3046
|
+
</div>
|
|
3047
|
+
</p-dialog>
|
|
3023
3048
|
`
|
|
3024
3049
|
}]
|
|
3025
3050
|
}], propDecorators: { visible: [{
|
|
@@ -3051,31 +3076,31 @@ class MenuComponent {
|
|
|
3051
3076
|
];
|
|
3052
3077
|
}
|
|
3053
3078
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3054
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: MenuComponent, isStandalone: true, selector: "app-menu", providers: [MenuApi], viewQueries: [{ propertyName: "menuItemCreateDialogComponent", first: true, predicate: MenuItemCreateDialogComponent, descendants: true }, { propertyName: "menuItemEditDialogComponent", first: true, predicate: MenuItemEditDialogComponent, descendants: true }, { propertyName: "contextMenu", first: true, predicate: ContextMenu, descendants: true }], ngImport: i0, template: ` <div #empty class="layout-sidebar" (contextmenu)="onContextMenu($event)">
|
|
3055
|
-
<ul class="layout-menu">
|
|
3056
|
-
@for (item of menuService.menu; track item; let i = $index) {
|
|
3057
|
-
<ng-container>
|
|
3058
|
-
@if (item.separator) {
|
|
3059
|
-
<li class="menu-separator"></li>
|
|
3060
|
-
} @else {
|
|
3061
|
-
<li
|
|
3062
|
-
app-menuitem
|
|
3063
|
-
[contextMenu]="contextMenu"
|
|
3064
|
-
[index]="i"
|
|
3065
|
-
[item]="item"
|
|
3066
|
-
[menuItemCreateDialogComponent]="menuItemCreateDialogComponent"
|
|
3067
|
-
[menuItemEditDialogComponent]="menuItemEditDialogComponent"
|
|
3068
|
-
[root]="true"></li>
|
|
3069
|
-
}
|
|
3070
|
-
</ng-container>
|
|
3071
|
-
}
|
|
3072
|
-
</ul>
|
|
3073
|
-
</div>
|
|
3074
|
-
<p-contextMenu [target]="empty" />
|
|
3075
|
-
@if (securityService.isAdmin) {
|
|
3076
|
-
<menu-item-create-dialog />
|
|
3077
|
-
<menu-item-edit-dialog />
|
|
3078
|
-
}`, isInline: true, dependencies: [{ kind: "component", type: MenuItemComponent, selector: "[app-menuitem]", inputs: ["item", "index", "root", "parentKey", "menuItemCreateDialogComponent", "menuItemEditDialogComponent", "contextMenu"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: ContextMenuModule }, { kind: "component", type: i1$
|
|
3079
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: MenuComponent, isStandalone: true, selector: "app-menu", providers: [MenuApi], viewQueries: [{ propertyName: "menuItemCreateDialogComponent", first: true, predicate: MenuItemCreateDialogComponent, descendants: true }, { propertyName: "menuItemEditDialogComponent", first: true, predicate: MenuItemEditDialogComponent, descendants: true }, { propertyName: "contextMenu", first: true, predicate: ContextMenu, descendants: true }], ngImport: i0, template: ` <div #empty class="layout-sidebar" (contextmenu)="onContextMenu($event)">
|
|
3080
|
+
<ul class="layout-menu">
|
|
3081
|
+
@for (item of menuService.menu; track item; let i = $index) {
|
|
3082
|
+
<ng-container>
|
|
3083
|
+
@if (item.separator) {
|
|
3084
|
+
<li class="menu-separator"></li>
|
|
3085
|
+
} @else {
|
|
3086
|
+
<li
|
|
3087
|
+
app-menuitem
|
|
3088
|
+
[contextMenu]="contextMenu"
|
|
3089
|
+
[index]="i"
|
|
3090
|
+
[item]="item"
|
|
3091
|
+
[menuItemCreateDialogComponent]="menuItemCreateDialogComponent"
|
|
3092
|
+
[menuItemEditDialogComponent]="menuItemEditDialogComponent"
|
|
3093
|
+
[root]="true"></li>
|
|
3094
|
+
}
|
|
3095
|
+
</ng-container>
|
|
3096
|
+
}
|
|
3097
|
+
</ul>
|
|
3098
|
+
</div>
|
|
3099
|
+
<p-contextMenu [target]="empty" />
|
|
3100
|
+
@if (securityService.isAdmin) {
|
|
3101
|
+
<menu-item-create-dialog />
|
|
3102
|
+
<menu-item-edit-dialog />
|
|
3103
|
+
}`, isInline: true, dependencies: [{ kind: "component", type: MenuItemComponent, selector: "[app-menuitem]", inputs: ["item", "index", "root", "parentKey", "menuItemCreateDialogComponent", "menuItemEditDialogComponent", "contextMenu"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: ContextMenuModule }, { kind: "component", type: i1$4.ContextMenu, selector: "p-contextMenu, p-contextmenu, p-context-menu", inputs: ["model", "triggerEvent", "target", "global", "style", "styleClass", "autoZIndex", "baseZIndex", "id", "breakpoint", "ariaLabel", "ariaLabelledBy", "pressDelay", "appendTo"], outputs: ["onShow", "onHide"] }, { kind: "ngmodule", type: DialogModule }, { kind: "ngmodule", type: InputTextModule }, { kind: "component", type: MenuItemCreateDialogComponent, selector: "menu-item-create-dialog", inputs: ["visible"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: MenuItemEditDialogComponent, selector: "menu-item-edit-dialog", inputs: ["visible"], outputs: ["visibleChange"] }] }); }
|
|
3079
3104
|
}
|
|
3080
3105
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MenuComponent, decorators: [{
|
|
3081
3106
|
type: Component,
|
|
@@ -3093,30 +3118,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
3093
3118
|
providers: [MenuApi],
|
|
3094
3119
|
selector: 'app-menu',
|
|
3095
3120
|
standalone: true,
|
|
3096
|
-
template: ` <div #empty class="layout-sidebar" (contextmenu)="onContextMenu($event)">
|
|
3097
|
-
<ul class="layout-menu">
|
|
3098
|
-
@for (item of menuService.menu; track item; let i = $index) {
|
|
3099
|
-
<ng-container>
|
|
3100
|
-
@if (item.separator) {
|
|
3101
|
-
<li class="menu-separator"></li>
|
|
3102
|
-
} @else {
|
|
3103
|
-
<li
|
|
3104
|
-
app-menuitem
|
|
3105
|
-
[contextMenu]="contextMenu"
|
|
3106
|
-
[index]="i"
|
|
3107
|
-
[item]="item"
|
|
3108
|
-
[menuItemCreateDialogComponent]="menuItemCreateDialogComponent"
|
|
3109
|
-
[menuItemEditDialogComponent]="menuItemEditDialogComponent"
|
|
3110
|
-
[root]="true"></li>
|
|
3111
|
-
}
|
|
3112
|
-
</ng-container>
|
|
3113
|
-
}
|
|
3114
|
-
</ul>
|
|
3115
|
-
</div>
|
|
3116
|
-
<p-contextMenu [target]="empty" />
|
|
3117
|
-
@if (securityService.isAdmin) {
|
|
3118
|
-
<menu-item-create-dialog />
|
|
3119
|
-
<menu-item-edit-dialog />
|
|
3121
|
+
template: ` <div #empty class="layout-sidebar" (contextmenu)="onContextMenu($event)">
|
|
3122
|
+
<ul class="layout-menu">
|
|
3123
|
+
@for (item of menuService.menu; track item; let i = $index) {
|
|
3124
|
+
<ng-container>
|
|
3125
|
+
@if (item.separator) {
|
|
3126
|
+
<li class="menu-separator"></li>
|
|
3127
|
+
} @else {
|
|
3128
|
+
<li
|
|
3129
|
+
app-menuitem
|
|
3130
|
+
[contextMenu]="contextMenu"
|
|
3131
|
+
[index]="i"
|
|
3132
|
+
[item]="item"
|
|
3133
|
+
[menuItemCreateDialogComponent]="menuItemCreateDialogComponent"
|
|
3134
|
+
[menuItemEditDialogComponent]="menuItemEditDialogComponent"
|
|
3135
|
+
[root]="true"></li>
|
|
3136
|
+
}
|
|
3137
|
+
</ng-container>
|
|
3138
|
+
}
|
|
3139
|
+
</ul>
|
|
3140
|
+
</div>
|
|
3141
|
+
<p-contextMenu [target]="empty" />
|
|
3142
|
+
@if (securityService.isAdmin) {
|
|
3143
|
+
<menu-item-create-dialog />
|
|
3144
|
+
<menu-item-edit-dialog />
|
|
3120
3145
|
}`
|
|
3121
3146
|
}]
|
|
3122
3147
|
}], propDecorators: { menuItemCreateDialogComponent: [{
|
|
@@ -3223,19 +3248,19 @@ class AppLayoutComponent {
|
|
|
3223
3248
|
}
|
|
3224
3249
|
}
|
|
3225
3250
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AppLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3226
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: AppLayoutComponent, isStandalone: true, selector: "app-layout", providers: [MenuService, MenuApi], viewQueries: [{ propertyName: "appSidebar", first: true, predicate: SidebarComponent, descendants: true }, { propertyName: "appTopBar", first: true, predicate: AppTopbar, descendants: true }], ngImport: i0, template: `
|
|
3227
|
-
<div class="layout-wrapper" [ngClass]="containerClass">
|
|
3228
|
-
<app-topbar></app-topbar>
|
|
3229
|
-
<app-sidebar></app-sidebar>
|
|
3230
|
-
<div class="layout-main-container">
|
|
3231
|
-
<div class="layout-main">
|
|
3232
|
-
<router-outlet></router-outlet>
|
|
3233
|
-
</div>
|
|
3234
|
-
<app-footer></app-footer>
|
|
3235
|
-
</div>
|
|
3236
|
-
<div class="layout-mask animate-fadein"></div>
|
|
3237
|
-
</div>
|
|
3238
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: AppTopbar, selector: "app-topbar" }, { kind: "component", type: SidebarComponent, selector: "app-sidebar" }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$
|
|
3251
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: AppLayoutComponent, isStandalone: true, selector: "app-layout", providers: [MenuService, MenuApi], viewQueries: [{ propertyName: "appSidebar", first: true, predicate: SidebarComponent, descendants: true }, { propertyName: "appTopBar", first: true, predicate: AppTopbar, descendants: true }], ngImport: i0, template: `
|
|
3252
|
+
<div class="layout-wrapper" [ngClass]="containerClass">
|
|
3253
|
+
<app-topbar></app-topbar>
|
|
3254
|
+
<app-sidebar></app-sidebar>
|
|
3255
|
+
<div class="layout-main-container">
|
|
3256
|
+
<div class="layout-main">
|
|
3257
|
+
<router-outlet></router-outlet>
|
|
3258
|
+
</div>
|
|
3259
|
+
<app-footer></app-footer>
|
|
3260
|
+
</div>
|
|
3261
|
+
<div class="layout-mask animate-fadein"></div>
|
|
3262
|
+
</div>
|
|
3263
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: AppTopbar, selector: "app-topbar" }, { kind: "component", type: SidebarComponent, selector: "app-sidebar" }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$3.RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: FooterComponent, selector: "app-footer" }] }); }
|
|
3239
3264
|
}
|
|
3240
3265
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AppLayoutComponent, decorators: [{
|
|
3241
3266
|
type: Component,
|
|
@@ -3243,18 +3268,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
3243
3268
|
selector: 'app-layout',
|
|
3244
3269
|
standalone: true,
|
|
3245
3270
|
imports: [CommonModule, AppTopbar, SidebarComponent, RouterModule, FooterComponent],
|
|
3246
|
-
template: `
|
|
3247
|
-
<div class="layout-wrapper" [ngClass]="containerClass">
|
|
3248
|
-
<app-topbar></app-topbar>
|
|
3249
|
-
<app-sidebar></app-sidebar>
|
|
3250
|
-
<div class="layout-main-container">
|
|
3251
|
-
<div class="layout-main">
|
|
3252
|
-
<router-outlet></router-outlet>
|
|
3253
|
-
</div>
|
|
3254
|
-
<app-footer></app-footer>
|
|
3255
|
-
</div>
|
|
3256
|
-
<div class="layout-mask animate-fadein"></div>
|
|
3257
|
-
</div>
|
|
3271
|
+
template: `
|
|
3272
|
+
<div class="layout-wrapper" [ngClass]="containerClass">
|
|
3273
|
+
<app-topbar></app-topbar>
|
|
3274
|
+
<app-sidebar></app-sidebar>
|
|
3275
|
+
<div class="layout-main-container">
|
|
3276
|
+
<div class="layout-main">
|
|
3277
|
+
<router-outlet></router-outlet>
|
|
3278
|
+
</div>
|
|
3279
|
+
<app-footer></app-footer>
|
|
3280
|
+
</div>
|
|
3281
|
+
<div class="layout-mask animate-fadein"></div>
|
|
3282
|
+
</div>
|
|
3258
3283
|
`,
|
|
3259
3284
|
providers: [MenuService, MenuApi]
|
|
3260
3285
|
}]
|
|
@@ -3302,7 +3327,7 @@ class AppFloatingConfiguratorComponent {
|
|
|
3302
3327
|
<app-configurator />
|
|
3303
3328
|
</div>
|
|
3304
3329
|
</div>
|
|
3305
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1$
|
|
3330
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1$2.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: StyleClassModule }, { kind: "directive", type: i3$1.StyleClass, selector: "[pStyleClass]", inputs: ["pStyleClass", "enterFromClass", "enterActiveClass", "enterToClass", "leaveFromClass", "leaveActiveClass", "leaveToClass", "hideOnOutsideClick", "toggleClass", "hideOnEscape", "hideOnResize", "resizeSelector"] }, { kind: "component", type: AppConfiguratorComponent, selector: "app-configurator" }] }); }
|
|
3306
3331
|
}
|
|
3307
3332
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AppFloatingConfiguratorComponent, decorators: [{
|
|
3308
3333
|
type: Component,
|
|
@@ -3441,7 +3466,7 @@ class NotfoundComponent {
|
|
|
3441
3466
|
</div>
|
|
3442
3467
|
</div>
|
|
3443
3468
|
</div>
|
|
3444
|
-
</div>`, isInline: true, dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: LogoComponent, selector: "logo", inputs: ["width", "height"] }, { kind: "component", type: Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: AppFloatingConfiguratorComponent, selector: "app-floating-configurator" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2$
|
|
3469
|
+
</div>`, isInline: true, dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: LogoComponent, selector: "logo", inputs: ["width", "height"] }, { kind: "component", type: Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: AppFloatingConfiguratorComponent, selector: "app-floating-configurator" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2$4.TranslatePipe, name: "translate" }] }); }
|
|
3445
3470
|
}
|
|
3446
3471
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: NotfoundComponent, decorators: [{
|
|
3447
3472
|
type: Component,
|
|
@@ -3506,7 +3531,7 @@ class UnauthorizedComponent {
|
|
|
3506
3531
|
</div>
|
|
3507
3532
|
</div>
|
|
3508
3533
|
</div>
|
|
3509
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1$
|
|
3534
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1$2.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: RippleModule }, { kind: "component", type: LogoComponent, selector: "logo", inputs: ["width", "height"] }, { kind: "component", type: AppFloatingConfiguratorComponent, selector: "app-floating-configurator" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
3510
3535
|
}
|
|
3511
3536
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: UnauthorizedComponent, decorators: [{
|
|
3512
3537
|
type: Component,
|
|
@@ -3583,7 +3608,7 @@ class ErrorComponent {
|
|
|
3583
3608
|
</div>
|
|
3584
3609
|
</div>
|
|
3585
3610
|
</div>
|
|
3586
|
-
</div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i1$
|
|
3611
|
+
</div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i1$2.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i3$2.Ripple, selector: "[pRipple]" }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] }); }
|
|
3587
3612
|
}
|
|
3588
3613
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ErrorComponent, decorators: [{
|
|
3589
3614
|
type: Component,
|
|
@@ -3656,7 +3681,7 @@ class ProfileComponent {
|
|
|
3656
3681
|
[auto]="true"
|
|
3657
3682
|
(onUpload)="onBasicUploadAuto($event)" />
|
|
3658
3683
|
</div>
|
|
3659
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FileUploadModule }, { kind: "component", type: i1$
|
|
3684
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FileUploadModule }, { kind: "component", type: i1$5.FileUpload, selector: "p-fileupload, p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "chooseButtonProps", "uploadButtonProps", "cancelButtonProps", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError", "onRemoveUploadedFile"] }, { kind: "ngmodule", type: ImageModule }, { kind: "ngmodule", type: AvatarModule }, { kind: "component", type: i2$2.Avatar, selector: "p-avatar", inputs: ["label", "icon", "image", "size", "shape", "styleClass", "ariaLabel", "ariaLabelledBy"], outputs: ["onImageError"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
3660
3685
|
}
|
|
3661
3686
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ProfileComponent, decorators: [{
|
|
3662
3687
|
type: Component,
|
|
@@ -3823,7 +3848,7 @@ class ConfigComponent {
|
|
|
3823
3848
|
</div>
|
|
3824
3849
|
}
|
|
3825
3850
|
</div>
|
|
3826
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ProfileComponent, selector: "user-profile" }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type:
|
|
3851
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ProfileComponent, selector: "user-profile" }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: TableModule }, { kind: "ngmodule", type: ToggleSwitchModule }, { kind: "component", type: i2$5.ToggleSwitch, selector: "p-toggleswitch, p-toggleSwitch, p-toggle-switch", inputs: ["styleClass", "tabindex", "inputId", "readonly", "trueValue", "falseValue", "ariaLabel", "size", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }, { kind: "component", type: Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
3827
3852
|
}
|
|
3828
3853
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ConfigComponent, decorators: [{
|
|
3829
3854
|
type: Component,
|
|
@@ -4046,7 +4071,7 @@ class DbMigrationComponent extends BaseModuleComponent {
|
|
|
4046
4071
|
} @else if (isSecurity) {
|
|
4047
4072
|
<security [controller]="controller" [id]="id" />
|
|
4048
4073
|
}
|
|
4049
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: TableModule }, { kind: "component", type: i1$
|
|
4074
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: TableModule }, { kind: "component", type: i1$6.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i2$6.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i1$6.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i1$6.EditableRow, selector: "[pEditableRow]", inputs: ["pEditableRow", "pEditableRowDisabled"] }, { kind: "directive", type: i1$6.CancelEditableRow, selector: "[pCancelEditableRow]" }, { kind: "component", type: i1$6.ColumnFilter, selector: "p-columnFilter, p-column-filter, p-columnfilter", inputs: ["field", "type", "display", "showMenu", "matchMode", "operator", "showOperator", "showClearButton", "showApplyButton", "showMatchModes", "showAddButton", "hideOnClear", "placeholder", "matchModeOptions", "maxConstraints", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "locale", "localeMatcher", "currency", "currencyDisplay", "filterOn", "useGrouping", "showButtons", "ariaLabel", "filterButtonProps"], outputs: ["onShow", "onHide"] }, { kind: "ngmodule", type: SharedModule }, { kind: "ngmodule", type: TagModule }, { kind: "ngmodule", type: InputTextModule }, { kind: "ngmodule", type: TextareaModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1$2.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: ConfirmDialog, selector: "p-confirmDialog, p-confirmdialog, p-confirm-dialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "modal", "visible", "position", "draggable"], outputs: ["onHide"] }, { kind: "component", type: SecurityComponent, selector: "security", inputs: ["id", "controller"] }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
4050
4075
|
}
|
|
4051
4076
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DbMigrationComponent, decorators: [{
|
|
4052
4077
|
type: Component,
|
|
@@ -4148,6 +4173,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
4148
4173
|
}]
|
|
4149
4174
|
}], ctorParameters: () => [] });
|
|
4150
4175
|
|
|
4176
|
+
/* eslint-disable */
|
|
4177
|
+
/* tslint:disable */
|
|
4178
|
+
// @ts-nocheck
|
|
4151
4179
|
class ModuleApi extends HttpClient {
|
|
4152
4180
|
constructor() {
|
|
4153
4181
|
super(...arguments);
|
|
@@ -4284,61 +4312,61 @@ class AppModulesComponent {
|
|
|
4284
4312
|
});
|
|
4285
4313
|
}
|
|
4286
4314
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AppModulesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4287
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: AppModulesComponent, isStandalone: true, selector: "app-modules", providers: [ConfirmationService, ModuleApi], ngImport: i0, template: `
|
|
4288
|
-
<p-confirmDialog></p-confirmDialog>
|
|
4289
|
-
<div class="flex flex-col md:flex-row gap-4">
|
|
4290
|
-
<div class="card w-full">
|
|
4291
|
-
<div class="font-semibold text-xl mb-4">
|
|
4292
|
-
{{ l10n.title }}
|
|
4293
|
-
</div>
|
|
4294
|
-
<div class="mb-4">
|
|
4295
|
-
<p-toolbar>
|
|
4296
|
-
<p-button
|
|
4297
|
-
icon="pi pi-refresh"
|
|
4298
|
-
rounded="true"
|
|
4299
|
-
severity="secondary"
|
|
4300
|
-
text="true"
|
|
4301
|
-
tooltipPosition="bottom"
|
|
4302
|
-
[pTooltip]="'app-modules.refreshTooltip' | translate"
|
|
4303
|
-
(onClick)="refreshAction()"></p-button>
|
|
4304
|
-
</p-toolbar>
|
|
4305
|
-
</div>
|
|
4306
|
-
<p-table class="mt-4" [paginator]="true" [rows]="100" [value]="modules">
|
|
4307
|
-
<ng-template pTemplate="header">
|
|
4308
|
-
<tr>
|
|
4309
|
-
<th>{{ 'app-modules.table.moduleId' | translate }}</th>
|
|
4310
|
-
<th>{{ 'app-modules.table.name' | translate }}</th>
|
|
4311
|
-
<th>{{ 'app-modules.table.currentlyLoaded' | translate }}</th>
|
|
4312
|
-
<th style="width: 4rem"></th>
|
|
4313
|
-
</tr>
|
|
4314
|
-
</ng-template>
|
|
4315
|
-
<ng-template let-module pTemplate="body">
|
|
4316
|
-
<tr>
|
|
4317
|
-
<td>{{ module.moduleId }}</td>
|
|
4318
|
-
<td>{{ module.name }}</td>
|
|
4319
|
-
<td>
|
|
4320
|
-
<p-tag
|
|
4321
|
-
[severity]="module.currentlyLoaded ? 'success' : 'danger'"
|
|
4322
|
-
[value]="
|
|
4323
|
-
(module.currentlyLoaded ? 'app-modules.table.yes' : 'app-modules.table.no') | translate
|
|
4324
|
-
"></p-tag>
|
|
4325
|
-
</td>
|
|
4326
|
-
<td>
|
|
4327
|
-
<p-button
|
|
4328
|
-
icon="pi pi-trash"
|
|
4329
|
-
rounded="true"
|
|
4330
|
-
severity="danger"
|
|
4331
|
-
text="true"
|
|
4332
|
-
tooltipPosition="bottom"
|
|
4333
|
-
[pTooltip]="'app-modules.table.deleteTooltip' | translate"
|
|
4334
|
-
(onClick)="deleteModule(module)"></p-button>
|
|
4335
|
-
</td>
|
|
4336
|
-
</tr>
|
|
4337
|
-
</ng-template>
|
|
4338
|
-
</p-table>
|
|
4339
|
-
</div>
|
|
4340
|
-
</div>
|
|
4341
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i1$
|
|
4315
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: AppModulesComponent, isStandalone: true, selector: "app-modules", providers: [ConfirmationService, ModuleApi], ngImport: i0, template: `
|
|
4316
|
+
<p-confirmDialog></p-confirmDialog>
|
|
4317
|
+
<div class="flex flex-col md:flex-row gap-4">
|
|
4318
|
+
<div class="card w-full">
|
|
4319
|
+
<div class="font-semibold text-xl mb-4">
|
|
4320
|
+
{{ l10n.title }}
|
|
4321
|
+
</div>
|
|
4322
|
+
<div class="mb-4">
|
|
4323
|
+
<p-toolbar>
|
|
4324
|
+
<p-button
|
|
4325
|
+
icon="pi pi-refresh"
|
|
4326
|
+
rounded="true"
|
|
4327
|
+
severity="secondary"
|
|
4328
|
+
text="true"
|
|
4329
|
+
tooltipPosition="bottom"
|
|
4330
|
+
[pTooltip]="'app-modules.refreshTooltip' | translate"
|
|
4331
|
+
(onClick)="refreshAction()"></p-button>
|
|
4332
|
+
</p-toolbar>
|
|
4333
|
+
</div>
|
|
4334
|
+
<p-table class="mt-4" [paginator]="true" [rows]="100" [value]="modules">
|
|
4335
|
+
<ng-template pTemplate="header">
|
|
4336
|
+
<tr>
|
|
4337
|
+
<th>{{ 'app-modules.table.moduleId' | translate }}</th>
|
|
4338
|
+
<th>{{ 'app-modules.table.name' | translate }}</th>
|
|
4339
|
+
<th>{{ 'app-modules.table.currentlyLoaded' | translate }}</th>
|
|
4340
|
+
<th style="width: 4rem"></th>
|
|
4341
|
+
</tr>
|
|
4342
|
+
</ng-template>
|
|
4343
|
+
<ng-template let-module pTemplate="body">
|
|
4344
|
+
<tr>
|
|
4345
|
+
<td>{{ module.moduleId }}</td>
|
|
4346
|
+
<td>{{ module.name }}</td>
|
|
4347
|
+
<td>
|
|
4348
|
+
<p-tag
|
|
4349
|
+
[severity]="module.currentlyLoaded ? 'success' : 'danger'"
|
|
4350
|
+
[value]="
|
|
4351
|
+
(module.currentlyLoaded ? 'app-modules.table.yes' : 'app-modules.table.no') | translate
|
|
4352
|
+
"></p-tag>
|
|
4353
|
+
</td>
|
|
4354
|
+
<td>
|
|
4355
|
+
<p-button
|
|
4356
|
+
icon="pi pi-trash"
|
|
4357
|
+
rounded="true"
|
|
4358
|
+
severity="danger"
|
|
4359
|
+
text="true"
|
|
4360
|
+
tooltipPosition="bottom"
|
|
4361
|
+
[pTooltip]="'app-modules.table.deleteTooltip' | translate"
|
|
4362
|
+
(onClick)="deleteModule(module)"></p-button>
|
|
4363
|
+
</td>
|
|
4364
|
+
</tr>
|
|
4365
|
+
</ng-template>
|
|
4366
|
+
</p-table>
|
|
4367
|
+
</div>
|
|
4368
|
+
</div>
|
|
4369
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i1$6.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i2$6.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: Tag, selector: "p-tag", inputs: ["styleClass", "severity", "value", "icon", "rounded"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1$2.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: ToolbarModule }, { kind: "component", type: i4$1.Toolbar, selector: "p-toolbar", inputs: ["styleClass", "ariaLabelledBy"] }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip"] }, { kind: "component", type: ConfirmDialog, selector: "p-confirmDialog, p-confirmdialog, p-confirm-dialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "modal", "visible", "position", "draggable"], outputs: ["onHide"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
4342
4370
|
}
|
|
4343
4371
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AppModulesComponent, decorators: [{
|
|
4344
4372
|
type: Component,
|
|
@@ -4346,64 +4374,1429 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
4346
4374
|
imports: [FormsModule, TableModule, Tag, ButtonModule, ToolbarModule, Tooltip, ConfirmDialog, TranslatePipe],
|
|
4347
4375
|
providers: [ConfirmationService, ModuleApi],
|
|
4348
4376
|
selector: 'app-modules',
|
|
4349
|
-
template: `
|
|
4350
|
-
<p-confirmDialog></p-confirmDialog>
|
|
4351
|
-
<div class="flex flex-col md:flex-row gap-4">
|
|
4352
|
-
<div class="card w-full">
|
|
4353
|
-
<div class="font-semibold text-xl mb-4">
|
|
4354
|
-
{{ l10n.title }}
|
|
4355
|
-
</div>
|
|
4356
|
-
<div class="mb-4">
|
|
4357
|
-
<p-toolbar>
|
|
4358
|
-
<p-button
|
|
4359
|
-
icon="pi pi-refresh"
|
|
4360
|
-
rounded="true"
|
|
4361
|
-
severity="secondary"
|
|
4362
|
-
text="true"
|
|
4363
|
-
tooltipPosition="bottom"
|
|
4364
|
-
[pTooltip]="'app-modules.refreshTooltip' | translate"
|
|
4365
|
-
(onClick)="refreshAction()"></p-button>
|
|
4366
|
-
</p-toolbar>
|
|
4367
|
-
</div>
|
|
4368
|
-
<p-table class="mt-4" [paginator]="true" [rows]="100" [value]="modules">
|
|
4369
|
-
<ng-template pTemplate="header">
|
|
4370
|
-
<tr>
|
|
4371
|
-
<th>{{ 'app-modules.table.moduleId' | translate }}</th>
|
|
4372
|
-
<th>{{ 'app-modules.table.name' | translate }}</th>
|
|
4373
|
-
<th>{{ 'app-modules.table.currentlyLoaded' | translate }}</th>
|
|
4374
|
-
<th style="width: 4rem"></th>
|
|
4375
|
-
</tr>
|
|
4376
|
-
</ng-template>
|
|
4377
|
-
<ng-template let-module pTemplate="body">
|
|
4378
|
-
<tr>
|
|
4379
|
-
<td>{{ module.moduleId }}</td>
|
|
4380
|
-
<td>{{ module.name }}</td>
|
|
4381
|
-
<td>
|
|
4382
|
-
<p-tag
|
|
4383
|
-
[severity]="module.currentlyLoaded ? 'success' : 'danger'"
|
|
4384
|
-
[value]="
|
|
4385
|
-
(module.currentlyLoaded ? 'app-modules.table.yes' : 'app-modules.table.no') | translate
|
|
4386
|
-
"></p-tag>
|
|
4387
|
-
</td>
|
|
4388
|
-
<td>
|
|
4389
|
-
<p-button
|
|
4390
|
-
icon="pi pi-trash"
|
|
4391
|
-
rounded="true"
|
|
4392
|
-
severity="danger"
|
|
4393
|
-
text="true"
|
|
4394
|
-
tooltipPosition="bottom"
|
|
4395
|
-
[pTooltip]="'app-modules.table.deleteTooltip' | translate"
|
|
4396
|
-
(onClick)="deleteModule(module)"></p-button>
|
|
4397
|
-
</td>
|
|
4398
|
-
</tr>
|
|
4399
|
-
</ng-template>
|
|
4400
|
-
</p-table>
|
|
4401
|
-
</div>
|
|
4402
|
-
</div>
|
|
4377
|
+
template: `
|
|
4378
|
+
<p-confirmDialog></p-confirmDialog>
|
|
4379
|
+
<div class="flex flex-col md:flex-row gap-4">
|
|
4380
|
+
<div class="card w-full">
|
|
4381
|
+
<div class="font-semibold text-xl mb-4">
|
|
4382
|
+
{{ l10n.title }}
|
|
4383
|
+
</div>
|
|
4384
|
+
<div class="mb-4">
|
|
4385
|
+
<p-toolbar>
|
|
4386
|
+
<p-button
|
|
4387
|
+
icon="pi pi-refresh"
|
|
4388
|
+
rounded="true"
|
|
4389
|
+
severity="secondary"
|
|
4390
|
+
text="true"
|
|
4391
|
+
tooltipPosition="bottom"
|
|
4392
|
+
[pTooltip]="'app-modules.refreshTooltip' | translate"
|
|
4393
|
+
(onClick)="refreshAction()"></p-button>
|
|
4394
|
+
</p-toolbar>
|
|
4395
|
+
</div>
|
|
4396
|
+
<p-table class="mt-4" [paginator]="true" [rows]="100" [value]="modules">
|
|
4397
|
+
<ng-template pTemplate="header">
|
|
4398
|
+
<tr>
|
|
4399
|
+
<th>{{ 'app-modules.table.moduleId' | translate }}</th>
|
|
4400
|
+
<th>{{ 'app-modules.table.name' | translate }}</th>
|
|
4401
|
+
<th>{{ 'app-modules.table.currentlyLoaded' | translate }}</th>
|
|
4402
|
+
<th style="width: 4rem"></th>
|
|
4403
|
+
</tr>
|
|
4404
|
+
</ng-template>
|
|
4405
|
+
<ng-template let-module pTemplate="body">
|
|
4406
|
+
<tr>
|
|
4407
|
+
<td>{{ module.moduleId }}</td>
|
|
4408
|
+
<td>{{ module.name }}</td>
|
|
4409
|
+
<td>
|
|
4410
|
+
<p-tag
|
|
4411
|
+
[severity]="module.currentlyLoaded ? 'success' : 'danger'"
|
|
4412
|
+
[value]="
|
|
4413
|
+
(module.currentlyLoaded ? 'app-modules.table.yes' : 'app-modules.table.no') | translate
|
|
4414
|
+
"></p-tag>
|
|
4415
|
+
</td>
|
|
4416
|
+
<td>
|
|
4417
|
+
<p-button
|
|
4418
|
+
icon="pi pi-trash"
|
|
4419
|
+
rounded="true"
|
|
4420
|
+
severity="danger"
|
|
4421
|
+
text="true"
|
|
4422
|
+
tooltipPosition="bottom"
|
|
4423
|
+
[pTooltip]="'app-modules.table.deleteTooltip' | translate"
|
|
4424
|
+
(onClick)="deleteModule(module)"></p-button>
|
|
4425
|
+
</td>
|
|
4426
|
+
</tr>
|
|
4427
|
+
</ng-template>
|
|
4428
|
+
</p-table>
|
|
4429
|
+
</div>
|
|
4430
|
+
</div>
|
|
4403
4431
|
`
|
|
4404
4432
|
}]
|
|
4405
4433
|
}] });
|
|
4406
4434
|
|
|
4435
|
+
/* eslint-disable */
|
|
4436
|
+
/* tslint:disable */
|
|
4437
|
+
// @ts-nocheck
|
|
4438
|
+
class DiscussionApi extends HttpClient {
|
|
4439
|
+
constructor() {
|
|
4440
|
+
super(...arguments);
|
|
4441
|
+
/**
|
|
4442
|
+
* @description Gets comments by object type and object identifier.
|
|
4443
|
+
*
|
|
4444
|
+
* @tags Discussion
|
|
4445
|
+
* @name getByObject
|
|
4446
|
+
* @summary Gets comments by object type and object identifier.
|
|
4447
|
+
* @request GET:/api/discussion/get-by-object
|
|
4448
|
+
* @secure
|
|
4449
|
+
* @response `200` `(CommentDto)[]` OK
|
|
4450
|
+
* @response `401` `ApiExceptionResponse` Unauthorized
|
|
4451
|
+
*/
|
|
4452
|
+
this.getByObject = (query, params = {}) => this.request({
|
|
4453
|
+
path: `/api/discussion/get-by-object`,
|
|
4454
|
+
method: "GET",
|
|
4455
|
+
query: query,
|
|
4456
|
+
secure: true,
|
|
4457
|
+
format: "json",
|
|
4458
|
+
...params,
|
|
4459
|
+
});
|
|
4460
|
+
/**
|
|
4461
|
+
* @description Gets a comment by identifier.
|
|
4462
|
+
*
|
|
4463
|
+
* @tags Discussion
|
|
4464
|
+
* @name getById
|
|
4465
|
+
* @summary Gets a comment by identifier.
|
|
4466
|
+
* @request GET:/api/discussion/get-by-id
|
|
4467
|
+
* @secure
|
|
4468
|
+
* @response `200` `CommentDto` OK
|
|
4469
|
+
* @response `401` `ApiExceptionResponse` Unauthorized
|
|
4470
|
+
* @response `404` `ApiExceptionResponse` Not Found
|
|
4471
|
+
*/
|
|
4472
|
+
this.getById = (query, params = {}) => this.request({
|
|
4473
|
+
path: `/api/discussion/get-by-id`,
|
|
4474
|
+
method: "GET",
|
|
4475
|
+
query: query,
|
|
4476
|
+
secure: true,
|
|
4477
|
+
format: "json",
|
|
4478
|
+
...params,
|
|
4479
|
+
});
|
|
4480
|
+
/**
|
|
4481
|
+
* @description Creates a new comment
|
|
4482
|
+
*
|
|
4483
|
+
* @tags Discussion
|
|
4484
|
+
* @name create
|
|
4485
|
+
* @summary Creates a new comment
|
|
4486
|
+
* @request POST:/api/discussion/create
|
|
4487
|
+
* @secure
|
|
4488
|
+
* @response `200` `CommentDto` OK
|
|
4489
|
+
* @response `400` `ApiExceptionResponse` Bad Request
|
|
4490
|
+
* @response `401` `ApiExceptionResponse` Unauthorized
|
|
4491
|
+
*/
|
|
4492
|
+
this.create = (data, params = {}) => this.request({
|
|
4493
|
+
path: `/api/discussion/create`,
|
|
4494
|
+
method: "POST",
|
|
4495
|
+
body: data,
|
|
4496
|
+
secure: true,
|
|
4497
|
+
type: ContentType.Json,
|
|
4498
|
+
format: "json",
|
|
4499
|
+
...params,
|
|
4500
|
+
});
|
|
4501
|
+
/**
|
|
4502
|
+
* @description Updates an existing comment.
|
|
4503
|
+
*
|
|
4504
|
+
* @tags Discussion
|
|
4505
|
+
* @name update
|
|
4506
|
+
* @summary Updates an existing comment.
|
|
4507
|
+
* @request PUT:/api/discussion/update/{id}
|
|
4508
|
+
* @secure
|
|
4509
|
+
* @response `200` `CommentDto` OK
|
|
4510
|
+
* @response `400` `ApiExceptionResponse` Bad Request
|
|
4511
|
+
* @response `401` `ApiExceptionResponse` Unauthorized
|
|
4512
|
+
* @response `403` `ApiExceptionResponse` Forbidden
|
|
4513
|
+
* @response `404` `ApiExceptionResponse` Not Found
|
|
4514
|
+
*/
|
|
4515
|
+
this.update = ({ id, ...query }, data, params = {}) => this.request({
|
|
4516
|
+
path: `/api/discussion/update/${id}`,
|
|
4517
|
+
method: "PUT",
|
|
4518
|
+
body: data,
|
|
4519
|
+
secure: true,
|
|
4520
|
+
type: ContentType.Json,
|
|
4521
|
+
format: "json",
|
|
4522
|
+
...params,
|
|
4523
|
+
});
|
|
4524
|
+
/**
|
|
4525
|
+
* @description Soft deletes a comment.
|
|
4526
|
+
*
|
|
4527
|
+
* @tags Discussion
|
|
4528
|
+
* @name delete
|
|
4529
|
+
* @summary Soft deletes a comment.
|
|
4530
|
+
* @request DELETE:/api/discussion/delete/{id}
|
|
4531
|
+
* @secure
|
|
4532
|
+
* @response `204` `void` No Content
|
|
4533
|
+
* @response `401` `ApiExceptionResponse` Unauthorized
|
|
4534
|
+
* @response `403` `ApiExceptionResponse` Forbidden
|
|
4535
|
+
* @response `404` `ApiExceptionResponse` Not Found
|
|
4536
|
+
*/
|
|
4537
|
+
this.delete = ({ id, ...query }, params = {}) => this.request({
|
|
4538
|
+
path: `/api/discussion/delete/${id}`,
|
|
4539
|
+
method: "DELETE",
|
|
4540
|
+
secure: true,
|
|
4541
|
+
...params,
|
|
4542
|
+
});
|
|
4543
|
+
/**
|
|
4544
|
+
* @description Gets edit history for a comment.
|
|
4545
|
+
*
|
|
4546
|
+
* @tags Discussion
|
|
4547
|
+
* @name getHistory
|
|
4548
|
+
* @summary Gets edit history for a comment.
|
|
4549
|
+
* @request GET:/api/discussion/get-history/{id}
|
|
4550
|
+
* @secure
|
|
4551
|
+
* @response `200` `(CommentHistoryDto)[]` OK
|
|
4552
|
+
* @response `401` `ApiExceptionResponse` Unauthorized
|
|
4553
|
+
* @response `404` `ApiExceptionResponse` Not Found
|
|
4554
|
+
*/
|
|
4555
|
+
this.getHistory = ({ id, ...query }, params = {}) => this.request({
|
|
4556
|
+
path: `/api/discussion/get-history/${id}`,
|
|
4557
|
+
method: "GET",
|
|
4558
|
+
secure: true,
|
|
4559
|
+
format: "json",
|
|
4560
|
+
...params,
|
|
4561
|
+
});
|
|
4562
|
+
/**
|
|
4563
|
+
* @description Uploads an attachment for a comment.
|
|
4564
|
+
*
|
|
4565
|
+
* @tags Discussion
|
|
4566
|
+
* @name uploadAttachment
|
|
4567
|
+
* @summary Uploads an attachment for a comment.
|
|
4568
|
+
* @request POST:/api/discussion/upload-attachment
|
|
4569
|
+
* @secure
|
|
4570
|
+
* @response `200` `AttachmentDto` OK
|
|
4571
|
+
* @response `400` `ApiExceptionResponse` Bad Request
|
|
4572
|
+
* @response `401` `ApiExceptionResponse` Unauthorized
|
|
4573
|
+
* @response `403` `ApiExceptionResponse` Forbidden
|
|
4574
|
+
* @response `404` `ApiExceptionResponse` Not Found
|
|
4575
|
+
*/
|
|
4576
|
+
this.uploadAttachment = (data, params = {}) => this.request({
|
|
4577
|
+
path: `/api/discussion/upload-attachment`,
|
|
4578
|
+
method: "POST",
|
|
4579
|
+
body: data,
|
|
4580
|
+
secure: true,
|
|
4581
|
+
type: ContentType.FormData,
|
|
4582
|
+
format: "json",
|
|
4583
|
+
...params,
|
|
4584
|
+
});
|
|
4585
|
+
/**
|
|
4586
|
+
* @description Deletes an attachment.
|
|
4587
|
+
*
|
|
4588
|
+
* @tags Discussion
|
|
4589
|
+
* @name deleteAttachment
|
|
4590
|
+
* @summary Deletes an attachment.
|
|
4591
|
+
* @request DELETE:/api/discussion/delete-attachment/{id}
|
|
4592
|
+
* @secure
|
|
4593
|
+
* @response `204` `void` No Content
|
|
4594
|
+
* @response `401` `ApiExceptionResponse` Unauthorized
|
|
4595
|
+
* @response `403` `ApiExceptionResponse` Forbidden
|
|
4596
|
+
* @response `404` `ApiExceptionResponse` Not Found
|
|
4597
|
+
*/
|
|
4598
|
+
this.deleteAttachment = ({ id, ...query }, params = {}) => this.request({
|
|
4599
|
+
path: `/api/discussion/delete-attachment/${id}`,
|
|
4600
|
+
method: "DELETE",
|
|
4601
|
+
secure: true,
|
|
4602
|
+
...params,
|
|
4603
|
+
});
|
|
4604
|
+
/**
|
|
4605
|
+
* @description Downloads attachment content.
|
|
4606
|
+
*
|
|
4607
|
+
* @tags Discussion
|
|
4608
|
+
* @name getAttachmentContent
|
|
4609
|
+
* @summary Downloads attachment content.
|
|
4610
|
+
* @request GET:/api/discussion/get-attachment-content/{id}
|
|
4611
|
+
* @secure
|
|
4612
|
+
* @response `200` `void` OK
|
|
4613
|
+
* @response `401` `ApiExceptionResponse` Unauthorized
|
|
4614
|
+
* @response `404` `ApiExceptionResponse` Not Found
|
|
4615
|
+
*/
|
|
4616
|
+
this.getAttachmentContent = ({ id, ...query }, params = {}) => this.request({
|
|
4617
|
+
path: `/api/discussion/get-attachment-content/${id}`,
|
|
4618
|
+
method: "GET",
|
|
4619
|
+
secure: true,
|
|
4620
|
+
...params,
|
|
4621
|
+
});
|
|
4622
|
+
/**
|
|
4623
|
+
* @description Adds or toggles a reaction for a comment.
|
|
4624
|
+
*
|
|
4625
|
+
* @tags Discussion
|
|
4626
|
+
* @name addReaction
|
|
4627
|
+
* @summary Adds or toggles a reaction for a comment.
|
|
4628
|
+
* @request POST:/api/discussion/add-reaction
|
|
4629
|
+
* @secure
|
|
4630
|
+
* @response `200` `(CommentReactionDto)[]` OK
|
|
4631
|
+
* @response `400` `ApiExceptionResponse` Bad Request
|
|
4632
|
+
* @response `401` `ApiExceptionResponse` Unauthorized
|
|
4633
|
+
* @response `404` `ApiExceptionResponse` Not Found
|
|
4634
|
+
*/
|
|
4635
|
+
this.addReaction = (data, params = {}) => this.request({
|
|
4636
|
+
path: `/api/discussion/add-reaction`,
|
|
4637
|
+
method: "POST",
|
|
4638
|
+
body: data,
|
|
4639
|
+
secure: true,
|
|
4640
|
+
type: ContentType.Json,
|
|
4641
|
+
format: "json",
|
|
4642
|
+
...params,
|
|
4643
|
+
});
|
|
4644
|
+
/**
|
|
4645
|
+
* @description Removes a reaction from a comment.
|
|
4646
|
+
*
|
|
4647
|
+
* @tags Discussion
|
|
4648
|
+
* @name removeReaction
|
|
4649
|
+
* @summary Removes a reaction from a comment.
|
|
4650
|
+
* @request DELETE:/api/discussion/remove-reaction
|
|
4651
|
+
* @secure
|
|
4652
|
+
* @response `200` `(CommentReactionDto)[]` OK
|
|
4653
|
+
* @response `401` `ApiExceptionResponse` Unauthorized
|
|
4654
|
+
* @response `404` `ApiExceptionResponse` Not Found
|
|
4655
|
+
*/
|
|
4656
|
+
this.removeReaction = (query, params = {}) => this.request({
|
|
4657
|
+
path: `/api/discussion/remove-reaction`,
|
|
4658
|
+
method: "DELETE",
|
|
4659
|
+
query: query,
|
|
4660
|
+
secure: true,
|
|
4661
|
+
format: "json",
|
|
4662
|
+
...params,
|
|
4663
|
+
});
|
|
4664
|
+
/**
|
|
4665
|
+
* @description Searches users that can be mentioned in a comment.
|
|
4666
|
+
*
|
|
4667
|
+
* @tags Discussion
|
|
4668
|
+
* @name searchMentionUsers
|
|
4669
|
+
* @summary Searches users that can be mentioned in a comment.
|
|
4670
|
+
* @request GET:/api/discussion/search-mention-users
|
|
4671
|
+
* @secure
|
|
4672
|
+
* @response `200` `(MentionUserDto)[]` OK
|
|
4673
|
+
* @response `400` `ApiExceptionResponse` Bad Request
|
|
4674
|
+
* @response `401` `ApiExceptionResponse` Unauthorized
|
|
4675
|
+
*/
|
|
4676
|
+
this.searchMentionUsers = (query, params = {}) => this.request({
|
|
4677
|
+
path: `/api/discussion/search-mention-users`,
|
|
4678
|
+
method: "GET",
|
|
4679
|
+
query: query,
|
|
4680
|
+
secure: true,
|
|
4681
|
+
format: "json",
|
|
4682
|
+
...params,
|
|
4683
|
+
});
|
|
4684
|
+
}
|
|
4685
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DiscussionApi, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4686
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DiscussionApi }); }
|
|
4687
|
+
}
|
|
4688
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DiscussionApi, decorators: [{
|
|
4689
|
+
type: Injectable
|
|
4690
|
+
}] });
|
|
4691
|
+
|
|
4692
|
+
function getInitialsFromString(input) {
|
|
4693
|
+
if (!input || input.trim().length === 0) {
|
|
4694
|
+
return '';
|
|
4695
|
+
}
|
|
4696
|
+
const words = input.trim().split(/\s+/);
|
|
4697
|
+
if (words.length === 1) {
|
|
4698
|
+
return words[0].charAt(0).toUpperCase();
|
|
4699
|
+
}
|
|
4700
|
+
const firstInitial = words[0].charAt(0).toUpperCase();
|
|
4701
|
+
const lastInitial = words[words.length - 1].charAt(0).toUpperCase();
|
|
4702
|
+
return firstInitial + lastInitial;
|
|
4703
|
+
}
|
|
4704
|
+
|
|
4705
|
+
class DiscussionComponent {
|
|
4706
|
+
constructor() {
|
|
4707
|
+
this.msgService = inject(MsgService);
|
|
4708
|
+
this.discussionApi = inject(DiscussionApi);
|
|
4709
|
+
this.sanitizer = inject(DomSanitizer);
|
|
4710
|
+
this.translateService = inject(TranslateService);
|
|
4711
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
4712
|
+
this.confirmationService = inject(ConfirmationService);
|
|
4713
|
+
this.layoutService = inject(LayoutService);
|
|
4714
|
+
this.objectTypeId = 1;
|
|
4715
|
+
this.objectId = 1;
|
|
4716
|
+
this.comments = [];
|
|
4717
|
+
this.loading = false;
|
|
4718
|
+
this.submitting = false;
|
|
4719
|
+
this.previewMode = false;
|
|
4720
|
+
this.newComment = '';
|
|
4721
|
+
this.editContent = '';
|
|
4722
|
+
this.editingCommentId = null;
|
|
4723
|
+
this.pendingFiles = [];
|
|
4724
|
+
this.mentionSuggestions = [];
|
|
4725
|
+
this.historyByComment = {};
|
|
4726
|
+
this.emojiPalette = ['👍', '👎', '🐳', '🍆', '🍑'];
|
|
4727
|
+
this.mentionSearchTimer = null;
|
|
4728
|
+
this.getInitialsFromString = getInitialsFromString;
|
|
4729
|
+
}
|
|
4730
|
+
ngOnChanges(changes) {
|
|
4731
|
+
if ((changes['objectTypeId'] || changes['objectId']) && this.objectTypeId && this.objectId) {
|
|
4732
|
+
this.loadComments().then();
|
|
4733
|
+
}
|
|
4734
|
+
}
|
|
4735
|
+
async ngOnInit() {
|
|
4736
|
+
await this.loadComments();
|
|
4737
|
+
}
|
|
4738
|
+
ngOnDestroy() {
|
|
4739
|
+
if (this.mentionSearchTimer) {
|
|
4740
|
+
clearTimeout(this.mentionSearchTimer);
|
|
4741
|
+
}
|
|
4742
|
+
}
|
|
4743
|
+
async loadComments() {
|
|
4744
|
+
if (!this.objectTypeId || !this.objectId) {
|
|
4745
|
+
return;
|
|
4746
|
+
}
|
|
4747
|
+
this.loading = true;
|
|
4748
|
+
this.cdr.markForCheck();
|
|
4749
|
+
try {
|
|
4750
|
+
const items = await this.discussionApi.getByObject({
|
|
4751
|
+
objectTypeId: this.objectTypeId,
|
|
4752
|
+
objectId: this.objectId,
|
|
4753
|
+
skip: 0,
|
|
4754
|
+
take: 50
|
|
4755
|
+
});
|
|
4756
|
+
this.comments = items.map((item) => this.normalizeComment(item));
|
|
4757
|
+
}
|
|
4758
|
+
catch (error) {
|
|
4759
|
+
this.msgService.errorFromException(error, this.translateService.instant('discussionComponent.errors.loadComments'));
|
|
4760
|
+
}
|
|
4761
|
+
finally {
|
|
4762
|
+
this.loading = false;
|
|
4763
|
+
this.cdr.markForCheck();
|
|
4764
|
+
}
|
|
4765
|
+
}
|
|
4766
|
+
async createComment() {
|
|
4767
|
+
const content = this.newComment.trim();
|
|
4768
|
+
if (!content) {
|
|
4769
|
+
return;
|
|
4770
|
+
}
|
|
4771
|
+
this.submitting = true;
|
|
4772
|
+
this.cdr.markForCheck();
|
|
4773
|
+
try {
|
|
4774
|
+
const created = await this.discussionApi.create({
|
|
4775
|
+
objectTypeId: this.objectTypeId,
|
|
4776
|
+
objectId: this.objectId,
|
|
4777
|
+
content
|
|
4778
|
+
});
|
|
4779
|
+
if (this.pendingFiles.length > 0) {
|
|
4780
|
+
for (const file of this.pendingFiles) {
|
|
4781
|
+
await this.discussionApi.uploadAttachment({
|
|
4782
|
+
CommentId: created.commentId,
|
|
4783
|
+
File: file
|
|
4784
|
+
});
|
|
4785
|
+
}
|
|
4786
|
+
}
|
|
4787
|
+
this.newComment = '';
|
|
4788
|
+
this.pendingFiles = [];
|
|
4789
|
+
this.previewMode = false;
|
|
4790
|
+
this.mentionSuggestions = [];
|
|
4791
|
+
await this.loadComments();
|
|
4792
|
+
}
|
|
4793
|
+
catch (error) {
|
|
4794
|
+
this.msgService.errorFromException(error, this.translateService.instant('discussionComponent.errors.createComment'));
|
|
4795
|
+
}
|
|
4796
|
+
finally {
|
|
4797
|
+
this.submitting = false;
|
|
4798
|
+
this.cdr.markForCheck();
|
|
4799
|
+
}
|
|
4800
|
+
}
|
|
4801
|
+
startEdit(comment) {
|
|
4802
|
+
this.editingCommentId = comment.commentId;
|
|
4803
|
+
this.editContent = comment.content;
|
|
4804
|
+
}
|
|
4805
|
+
cancelEdit() {
|
|
4806
|
+
this.editingCommentId = null;
|
|
4807
|
+
this.editContent = '';
|
|
4808
|
+
}
|
|
4809
|
+
async saveEdit(comment) {
|
|
4810
|
+
try {
|
|
4811
|
+
const updated = await this.discussionApi.update({ id: comment.commentId }, { content: this.editContent.trim() });
|
|
4812
|
+
this.comments = this.comments.map((item) => item.commentId === comment.commentId ? this.normalizeComment(updated) : item);
|
|
4813
|
+
this.cancelEdit();
|
|
4814
|
+
}
|
|
4815
|
+
catch (error) {
|
|
4816
|
+
this.msgService.errorFromException(error, this.translateService.instant('discussionComponent.errors.updateComment'));
|
|
4817
|
+
}
|
|
4818
|
+
finally {
|
|
4819
|
+
this.cdr.markForCheck();
|
|
4820
|
+
}
|
|
4821
|
+
}
|
|
4822
|
+
deleteComment(comment) {
|
|
4823
|
+
this.confirmationService.confirm({
|
|
4824
|
+
header: this.translateService.instant('discussionComponent.warning'),
|
|
4825
|
+
message: this.translateService.instant('discussionComponent.confirmDeleteComment'),
|
|
4826
|
+
icon: 'pi pi-trash',
|
|
4827
|
+
rejectButtonProps: {
|
|
4828
|
+
label: this.translateService.instant('discussionComponent.cancel'),
|
|
4829
|
+
severity: 'secondary',
|
|
4830
|
+
outlined: true
|
|
4831
|
+
},
|
|
4832
|
+
acceptButtonProps: {
|
|
4833
|
+
label: this.translateService.instant('discussionComponent.delete'),
|
|
4834
|
+
severity: 'danger'
|
|
4835
|
+
},
|
|
4836
|
+
accept: async () => {
|
|
4837
|
+
await this.performDeleteComment(comment);
|
|
4838
|
+
}
|
|
4839
|
+
});
|
|
4840
|
+
}
|
|
4841
|
+
async toggleHistory(comment) {
|
|
4842
|
+
const current = this.historyByComment[comment.commentId];
|
|
4843
|
+
if (current?.opened) {
|
|
4844
|
+
this.historyByComment[comment.commentId] = { ...current, opened: false };
|
|
4845
|
+
return;
|
|
4846
|
+
}
|
|
4847
|
+
this.historyByComment[comment.commentId] = {
|
|
4848
|
+
opened: true,
|
|
4849
|
+
loading: true,
|
|
4850
|
+
items: current?.items ?? []
|
|
4851
|
+
};
|
|
4852
|
+
this.cdr.markForCheck();
|
|
4853
|
+
try {
|
|
4854
|
+
const items = await this.discussionApi.getHistory({ id: comment.commentId });
|
|
4855
|
+
this.historyByComment[comment.commentId] = {
|
|
4856
|
+
opened: true,
|
|
4857
|
+
loading: false,
|
|
4858
|
+
items: items.map((item) => this.normalizeHistoryItem(item))
|
|
4859
|
+
};
|
|
4860
|
+
}
|
|
4861
|
+
catch (error) {
|
|
4862
|
+
this.msgService.errorFromException(error, this.translateService.instant('discussionComponent.errors.loadEditHistory'));
|
|
4863
|
+
this.historyByComment[comment.commentId] = {
|
|
4864
|
+
opened: false,
|
|
4865
|
+
loading: false,
|
|
4866
|
+
items: []
|
|
4867
|
+
};
|
|
4868
|
+
}
|
|
4869
|
+
finally {
|
|
4870
|
+
this.cdr.markForCheck();
|
|
4871
|
+
}
|
|
4872
|
+
}
|
|
4873
|
+
onFilesSelected(event) {
|
|
4874
|
+
const input = event.target;
|
|
4875
|
+
this.pendingFiles = [...this.pendingFiles, ...Array.from(input.files ?? [])];
|
|
4876
|
+
input.value = '';
|
|
4877
|
+
}
|
|
4878
|
+
removePendingFile(file) {
|
|
4879
|
+
this.pendingFiles = this.pendingFiles.filter((item) => item !== file);
|
|
4880
|
+
}
|
|
4881
|
+
async onInlineFilesSelected(comment, event) {
|
|
4882
|
+
const input = event.target;
|
|
4883
|
+
const files = Array.from(input.files ?? []);
|
|
4884
|
+
input.value = '';
|
|
4885
|
+
try {
|
|
4886
|
+
for (const file of files) {
|
|
4887
|
+
await this.discussionApi.uploadAttachment({
|
|
4888
|
+
CommentId: comment.commentId,
|
|
4889
|
+
File: file
|
|
4890
|
+
});
|
|
4891
|
+
}
|
|
4892
|
+
await this.loadComments();
|
|
4893
|
+
}
|
|
4894
|
+
catch (error) {
|
|
4895
|
+
this.msgService.errorFromException(error, this.translateService.instant('discussionComponent.errors.uploadAttachment'));
|
|
4896
|
+
this.cdr.markForCheck();
|
|
4897
|
+
}
|
|
4898
|
+
}
|
|
4899
|
+
deleteAttachment(comment, attachment) {
|
|
4900
|
+
this.confirmationService.confirm({
|
|
4901
|
+
header: this.translateService.instant('discussionComponent.warning'),
|
|
4902
|
+
message: this.translateService.instant('discussionComponent.confirmDeleteFile', { fileName: attachment.fileName }),
|
|
4903
|
+
icon: 'pi pi-trash',
|
|
4904
|
+
rejectButtonProps: {
|
|
4905
|
+
label: this.translateService.instant('discussionComponent.cancel'),
|
|
4906
|
+
severity: 'secondary',
|
|
4907
|
+
outlined: true
|
|
4908
|
+
},
|
|
4909
|
+
acceptButtonProps: {
|
|
4910
|
+
label: this.translateService.instant('discussionComponent.delete'),
|
|
4911
|
+
severity: 'danger'
|
|
4912
|
+
},
|
|
4913
|
+
accept: async () => {
|
|
4914
|
+
await this.performDeleteAttachment(comment, attachment);
|
|
4915
|
+
}
|
|
4916
|
+
});
|
|
4917
|
+
}
|
|
4918
|
+
async performDeleteComment(comment) {
|
|
4919
|
+
try {
|
|
4920
|
+
await this.discussionApi.delete({ id: comment.commentId });
|
|
4921
|
+
this.comments = this.comments.filter((item) => item.commentId !== comment.commentId);
|
|
4922
|
+
}
|
|
4923
|
+
catch (error) {
|
|
4924
|
+
this.msgService.errorFromException(error, this.translateService.instant('discussionComponent.errors.deleteComment'));
|
|
4925
|
+
}
|
|
4926
|
+
finally {
|
|
4927
|
+
this.cdr.markForCheck();
|
|
4928
|
+
}
|
|
4929
|
+
}
|
|
4930
|
+
async performDeleteAttachment(comment, attachment) {
|
|
4931
|
+
try {
|
|
4932
|
+
await this.discussionApi.deleteAttachment({ id: attachment.attachmentId });
|
|
4933
|
+
this.comments = this.comments.map((item) => item.commentId === comment.commentId
|
|
4934
|
+
? { ...item, attachments: item.attachments.filter((entry) => entry.attachmentId !== attachment.attachmentId) }
|
|
4935
|
+
: item);
|
|
4936
|
+
}
|
|
4937
|
+
catch (error) {
|
|
4938
|
+
this.msgService.errorFromException(error, this.translateService.instant('discussionComponent.errors.deleteAttachment'));
|
|
4939
|
+
}
|
|
4940
|
+
finally {
|
|
4941
|
+
this.cdr.markForCheck();
|
|
4942
|
+
}
|
|
4943
|
+
}
|
|
4944
|
+
async downloadAttachment(attachment) {
|
|
4945
|
+
try {
|
|
4946
|
+
const blob = (await this.discussionApi.getAttachmentContent({ id: attachment.attachmentId }, { format: 'blob' }));
|
|
4947
|
+
const url = URL.createObjectURL(blob);
|
|
4948
|
+
const link = document.createElement('a');
|
|
4949
|
+
link.href = url;
|
|
4950
|
+
link.download = attachment.fileName;
|
|
4951
|
+
link.click();
|
|
4952
|
+
URL.revokeObjectURL(url);
|
|
4953
|
+
}
|
|
4954
|
+
catch (error) {
|
|
4955
|
+
this.msgService.errorFromException(error, this.translateService.instant('discussionComponent.errors.downloadAttachment'));
|
|
4956
|
+
this.cdr.markForCheck();
|
|
4957
|
+
}
|
|
4958
|
+
}
|
|
4959
|
+
async toggleReaction(comment, reaction) {
|
|
4960
|
+
try {
|
|
4961
|
+
const reactions = reaction.reactedByCurrentUser
|
|
4962
|
+
? await this.discussionApi.removeReaction({ commentId: comment.commentId, emojiCode: reaction.emojiCode })
|
|
4963
|
+
: await this.discussionApi.addReaction({ commentId: comment.commentId, emojiCode: reaction.emojiCode });
|
|
4964
|
+
this.applyReactions(comment.commentId, reactions.map((item) => this.normalizeReaction(item)));
|
|
4965
|
+
}
|
|
4966
|
+
catch (error) {
|
|
4967
|
+
this.msgService.errorFromException(error, this.translateService.instant('discussionComponent.errors.updateReaction'));
|
|
4968
|
+
}
|
|
4969
|
+
finally {
|
|
4970
|
+
this.cdr.markForCheck();
|
|
4971
|
+
}
|
|
4972
|
+
}
|
|
4973
|
+
async reactWithEmoji(comment, emojiCode, popover) {
|
|
4974
|
+
try {
|
|
4975
|
+
const reactions = await this.discussionApi.addReaction({ commentId: comment.commentId, emojiCode });
|
|
4976
|
+
this.applyReactions(comment.commentId, reactions.map((item) => this.normalizeReaction(item)));
|
|
4977
|
+
popover?.hide();
|
|
4978
|
+
}
|
|
4979
|
+
catch (error) {
|
|
4980
|
+
this.msgService.errorFromException(error, this.translateService.instant('discussionComponent.errors.addReaction'));
|
|
4981
|
+
}
|
|
4982
|
+
finally {
|
|
4983
|
+
this.cdr.markForCheck();
|
|
4984
|
+
}
|
|
4985
|
+
}
|
|
4986
|
+
onComposerInput() {
|
|
4987
|
+
if (this.mentionSearchTimer) {
|
|
4988
|
+
clearTimeout(this.mentionSearchTimer);
|
|
4989
|
+
}
|
|
4990
|
+
const token = this.extractMentionQuery(this.newComment);
|
|
4991
|
+
if (!token || token.length < 2) {
|
|
4992
|
+
this.mentionSuggestions = [];
|
|
4993
|
+
this.cdr.markForCheck();
|
|
4994
|
+
return;
|
|
4995
|
+
}
|
|
4996
|
+
this.mentionSearchTimer = setTimeout(async () => {
|
|
4997
|
+
try {
|
|
4998
|
+
const users = await this.discussionApi.searchMentionUsers({ term: token });
|
|
4999
|
+
this.mentionSuggestions = users.map((item) => this.normalizeMentionUser(item));
|
|
5000
|
+
}
|
|
5001
|
+
catch {
|
|
5002
|
+
this.mentionSuggestions = [];
|
|
5003
|
+
}
|
|
5004
|
+
finally {
|
|
5005
|
+
this.cdr.markForCheck();
|
|
5006
|
+
}
|
|
5007
|
+
}, 250);
|
|
5008
|
+
}
|
|
5009
|
+
insertMention(candidate) {
|
|
5010
|
+
const query = this.extractMentionQuery(this.newComment);
|
|
5011
|
+
if (!query) {
|
|
5012
|
+
return;
|
|
5013
|
+
}
|
|
5014
|
+
this.newComment = this.newComment.replace(/@[\w.+\-@]*$/, `@${candidate.email} `);
|
|
5015
|
+
this.mentionSuggestions = [];
|
|
5016
|
+
}
|
|
5017
|
+
renderMarkdown(markdown) {
|
|
5018
|
+
const escaped = markdown.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
|
5019
|
+
const html = escaped
|
|
5020
|
+
.replace(/^### (.*)$/gm, '<h3>$1</h3>')
|
|
5021
|
+
.replace(/^## (.*)$/gm, '<h2>$1</h2>')
|
|
5022
|
+
.replace(/^# (.*)$/gm, '<h1>$1</h1>')
|
|
5023
|
+
.replace(/\*\*(.+?)\*\*/g, '<strong>$1</strong>')
|
|
5024
|
+
.replace(/\*(.+?)\*/g, '<em>$1</em>')
|
|
5025
|
+
.replace(/`(.+?)`/g, '<code>$1</code>')
|
|
5026
|
+
.replace(/\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g, '<a href="$2" target="_blank" rel="noopener">$1</a>')
|
|
5027
|
+
.replace(/(^|\s)@([A-Za-z0-9._+\-@]+)/g, '$1<span class="mention-token">@$2</span>')
|
|
5028
|
+
.replace(/\n/g, '<br>');
|
|
5029
|
+
return this.sanitizer.sanitize(SecurityContext.HTML, html) ?? '';
|
|
5030
|
+
}
|
|
5031
|
+
formatBytes(value) {
|
|
5032
|
+
if (value < 1024) {
|
|
5033
|
+
return `${value} ${this.translateService.instant('discussionComponent.units.bytes')}`;
|
|
5034
|
+
}
|
|
5035
|
+
if (value < 1024 * 1024) {
|
|
5036
|
+
return `${(value / 1024).toFixed(1)} ${this.translateService.instant('discussionComponent.units.kilobytes')}`;
|
|
5037
|
+
}
|
|
5038
|
+
return `${(value / (1024 * 1024)).toFixed(1)} ${this.translateService.instant('discussionComponent.units.megabytes')}`;
|
|
5039
|
+
}
|
|
5040
|
+
hasUserReaction(comment) {
|
|
5041
|
+
return comment.reactions.some((reaction) => reaction.reactedByCurrentUser);
|
|
5042
|
+
}
|
|
5043
|
+
getReactions(comment) {
|
|
5044
|
+
return comment.reactions;
|
|
5045
|
+
}
|
|
5046
|
+
applyReactions(commentId, reactions) {
|
|
5047
|
+
this.comments = this.comments.map((item) => (item.commentId === commentId ? { ...item, reactions } : item));
|
|
5048
|
+
}
|
|
5049
|
+
normalizeComment(comment) {
|
|
5050
|
+
return {
|
|
5051
|
+
...comment,
|
|
5052
|
+
commentId: comment.commentId ?? 0,
|
|
5053
|
+
content: comment.content ?? '',
|
|
5054
|
+
authorDisplayName: comment.authorDisplayName ?? '',
|
|
5055
|
+
authorEmail: comment.authorEmail ?? '',
|
|
5056
|
+
isEdited: comment.isEdited ?? false,
|
|
5057
|
+
historyCount: comment.historyCount ?? 0,
|
|
5058
|
+
canEdit: comment.canEdit ?? false,
|
|
5059
|
+
canDelete: comment.canDelete ?? false,
|
|
5060
|
+
attachments: (comment.attachments ?? []).map((item) => this.normalizeAttachment(item)),
|
|
5061
|
+
reactions: (comment.reactions ?? []).map((item) => this.normalizeReaction(item))
|
|
5062
|
+
};
|
|
5063
|
+
}
|
|
5064
|
+
normalizeAttachment(attachment) {
|
|
5065
|
+
return {
|
|
5066
|
+
attachmentId: attachment.attachmentId ?? 0,
|
|
5067
|
+
fileName: attachment.fileName ?? '',
|
|
5068
|
+
fileType: attachment.fileType ?? '',
|
|
5069
|
+
fileSize: attachment.fileSize ?? 0,
|
|
5070
|
+
uploadedAt: attachment.uploadedAt ?? new Date(0),
|
|
5071
|
+
storageFileId: attachment.storageFileId ?? '',
|
|
5072
|
+
downloadUrl: attachment.downloadUrl ?? ''
|
|
5073
|
+
};
|
|
5074
|
+
}
|
|
5075
|
+
normalizeReaction(reaction) {
|
|
5076
|
+
return {
|
|
5077
|
+
emojiCode: reaction.emojiCode ?? '',
|
|
5078
|
+
count: reaction.count ?? 0,
|
|
5079
|
+
reactedByCurrentUser: reaction.reactedByCurrentUser ?? false
|
|
5080
|
+
};
|
|
5081
|
+
}
|
|
5082
|
+
normalizeMentionUser(user) {
|
|
5083
|
+
return {
|
|
5084
|
+
userId: user.userId ?? 0,
|
|
5085
|
+
displayName: user.displayName ?? '',
|
|
5086
|
+
email: user.email ?? ''
|
|
5087
|
+
};
|
|
5088
|
+
}
|
|
5089
|
+
normalizeHistoryItem(item) {
|
|
5090
|
+
return {
|
|
5091
|
+
commentEditHistoryId: item.commentEditHistoryId ?? 0,
|
|
5092
|
+
oldContent: item.oldContent ?? '',
|
|
5093
|
+
newContent: item.newContent ?? '',
|
|
5094
|
+
editedByUserId: item.editedByUserId ?? 0,
|
|
5095
|
+
editedByDisplayName: item.editedByDisplayName ?? '',
|
|
5096
|
+
editedAt: item.editedAt ?? new Date(0)
|
|
5097
|
+
};
|
|
5098
|
+
}
|
|
5099
|
+
extractMentionQuery(value) {
|
|
5100
|
+
const match = value.match(/@([A-Za-z0-9._+\-@]*)$/);
|
|
5101
|
+
return match?.[1] ?? null;
|
|
5102
|
+
}
|
|
5103
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DiscussionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5104
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: DiscussionComponent, isStandalone: true, selector: "discussion", inputs: { objectTypeId: "objectTypeId", objectId: "objectId" }, providers: [ConfirmationService, DiscussionApi], usesOnChanges: true, ngImport: i0, template: `
|
|
5105
|
+
<p-confirmDialog/>
|
|
5106
|
+
|
|
5107
|
+
<section class="flex flex-col gap-4">
|
|
5108
|
+
|
|
5109
|
+
<p-card class="block">
|
|
5110
|
+
<div class="flex flex-col gap-4">
|
|
5111
|
+
@if (!previewMode) {
|
|
5112
|
+
<textarea
|
|
5113
|
+
pTextarea
|
|
5114
|
+
class="min-h-28 w-full"
|
|
5115
|
+
[autoResize]="true"
|
|
5116
|
+
rows="5"
|
|
5117
|
+
[(ngModel)]="newComment"
|
|
5118
|
+
(ngModelChange)="onComposerInput()"
|
|
5119
|
+
[placeholder]="'discussionComponent.writeCommentPlaceholder' | translate"
|
|
5120
|
+
></textarea>
|
|
5121
|
+
} @else {
|
|
5122
|
+
<div
|
|
5123
|
+
class="markdown-preview min-h-28 rounded-2xl border border-surface-200 bg-surface-50 px-4 py-3 leading-7 dark:border-surface-700 dark:bg-surface-900/40"
|
|
5124
|
+
[innerHTML]="renderMarkdown(newComment)"
|
|
5125
|
+
></div>
|
|
5126
|
+
}
|
|
5127
|
+
|
|
5128
|
+
@if (mentionSuggestions.length > 0) {
|
|
5129
|
+
<p-panel class="block">
|
|
5130
|
+
<ng-template pTemplate="header">
|
|
5131
|
+
<div class="inline-flex items-center gap-2 text-sm font-medium">
|
|
5132
|
+
<i class="pi pi-at"></i>
|
|
5133
|
+
<span>{{ 'discussionComponent.mentionSuggestions' | translate }}</span>
|
|
5134
|
+
</div>
|
|
5135
|
+
</ng-template>
|
|
5136
|
+
|
|
5137
|
+
<div class="flex flex-col gap-3">
|
|
5138
|
+
@for (candidate of mentionSuggestions; track candidate.userId) {
|
|
5139
|
+
<button
|
|
5140
|
+
type="button"
|
|
5141
|
+
class="flex w-full items-center justify-between gap-4 rounded-xl border border-transparent px-3 py-3 text-left transition hover:border-primary-200 hover:bg-primary-50 dark:hover:border-primary-800 dark:hover:bg-primary-950/30"
|
|
5142
|
+
(click)="insertMention(candidate)"
|
|
5143
|
+
>
|
|
5144
|
+
<div class="min-w-0">
|
|
5145
|
+
<strong>{{ candidate.displayName }}</strong>
|
|
5146
|
+
<small class="mt-1 block text-surface-500">{{ candidate.email }}</small>
|
|
5147
|
+
</div>
|
|
5148
|
+
<i class="pi pi-arrow-up-left shrink-0 text-surface-400"></i>
|
|
5149
|
+
</button>
|
|
5150
|
+
}
|
|
5151
|
+
</div>
|
|
5152
|
+
</p-panel>
|
|
5153
|
+
}
|
|
5154
|
+
|
|
5155
|
+
@if (pendingFiles.length > 0) {
|
|
5156
|
+
<div class="flex flex-col gap-3">
|
|
5157
|
+
@for (file of pendingFiles; track file.name + file.size) {
|
|
5158
|
+
<div
|
|
5159
|
+
class="flex flex-col gap-3 rounded-2xl border border-surface-200 px-4 py-3 sm:flex-row sm:items-center sm:justify-between dark:border-surface-700">
|
|
5160
|
+
<div class="inline-flex items-center gap-2">
|
|
5161
|
+
<i class="pi pi-file"></i>
|
|
5162
|
+
<span class="break-all">{{ file.name }}</span>
|
|
5163
|
+
<p-tag [value]="formatBytes(file.size)" severity="contrast"/>
|
|
5164
|
+
</div>
|
|
5165
|
+
<p-button
|
|
5166
|
+
icon="pi pi-times"
|
|
5167
|
+
severity="danger"
|
|
5168
|
+
[rounded]="true"
|
|
5169
|
+
[text]="true"
|
|
5170
|
+
(onClick)="removePendingFile(file)"
|
|
5171
|
+
/>
|
|
5172
|
+
</div>
|
|
5173
|
+
}
|
|
5174
|
+
</div>
|
|
5175
|
+
}
|
|
5176
|
+
|
|
5177
|
+
<div class="flex flex-col gap-2 sm:flex-row sm:justify-end">
|
|
5178
|
+
<p-button
|
|
5179
|
+
[label]="
|
|
5180
|
+
previewMode
|
|
5181
|
+
? ('discussionComponent.edit' | translate)
|
|
5182
|
+
: ('discussionComponent.preview' | translate)
|
|
5183
|
+
"
|
|
5184
|
+
[icon]="previewMode ? 'pi pi-pencil' : 'pi pi-eye'"
|
|
5185
|
+
severity="secondary"
|
|
5186
|
+
[text]="true"
|
|
5187
|
+
(onClick)="previewMode = !previewMode"
|
|
5188
|
+
/>
|
|
5189
|
+
|
|
5190
|
+
<label class="file-trigger">
|
|
5191
|
+
<p-button
|
|
5192
|
+
[label]="'discussionComponent.attachFiles' | translate"
|
|
5193
|
+
icon="pi pi-paperclip"
|
|
5194
|
+
severity="secondary"
|
|
5195
|
+
[text]="true"
|
|
5196
|
+
/>
|
|
5197
|
+
<input type="file" multiple (change)="onFilesSelected($event)"/>
|
|
5198
|
+
</label>
|
|
5199
|
+
<p-button
|
|
5200
|
+
[label]="'discussionComponent.send' | translate"
|
|
5201
|
+
icon="pi pi-send"
|
|
5202
|
+
[loading]="submitting"
|
|
5203
|
+
[disabled]="submitting || !newComment.trim()"
|
|
5204
|
+
(onClick)="createComment()"
|
|
5205
|
+
/>
|
|
5206
|
+
</div>
|
|
5207
|
+
</div>
|
|
5208
|
+
</p-card>
|
|
5209
|
+
|
|
5210
|
+
@if (loading) {
|
|
5211
|
+
<div
|
|
5212
|
+
class="flex min-h-20 flex-col items-center justify-center gap-3 rounded-2xl border border-surface-200 px-4 py-5 text-surface-500 dark:border-surface-700">
|
|
5213
|
+
<p-progressSpinner strokeWidth="4"/>
|
|
5214
|
+
<span>{{ 'discussionComponent.loadingComments' | translate }}</span>
|
|
5215
|
+
</div>
|
|
5216
|
+
} @else if (comments.length === 0) {
|
|
5217
|
+
<div
|
|
5218
|
+
class="flex min-h-20 items-center justify-center gap-3 rounded-2xl border border-surface-200 px-4 py-5 text-surface-500 dark:border-surface-700">
|
|
5219
|
+
<i class="pi pi-inbox"></i>
|
|
5220
|
+
<span>{{ 'discussionComponent.noCommentsYet' | translate }}</span>
|
|
5221
|
+
</div>
|
|
5222
|
+
} @else {
|
|
5223
|
+
<div class="flex flex-col gap-4">
|
|
5224
|
+
@for (comment of comments; track comment.commentId) {
|
|
5225
|
+
<p-card class="block">
|
|
5226
|
+
<ng-template pTemplate="content">
|
|
5227
|
+
<div class="grid gap-4 md:grid-cols-[3.2rem_minmax(0,1fr)]">
|
|
5228
|
+
<div>
|
|
5229
|
+
<p-avatar
|
|
5230
|
+
[label]="getInitialsFromString(comment.authorDisplayName)"
|
|
5231
|
+
shape="circle"
|
|
5232
|
+
/>
|
|
5233
|
+
</div>
|
|
5234
|
+
|
|
5235
|
+
<div class="flex flex-col gap-2">
|
|
5236
|
+
<div class="flex flex-row gap-3 justify-between">
|
|
5237
|
+
<div class="flex flex-wrap items-center gap-2">
|
|
5238
|
+
<strong>{{ comment.authorDisplayName }}</strong>
|
|
5239
|
+
<span
|
|
5240
|
+
class="text-sm text-surface-500">{{ comment.createdAt | date: layoutService.dateTimeFormat() }}</span>
|
|
5241
|
+
</div>
|
|
5242
|
+
|
|
5243
|
+
<div class="flex flex-wrap items-center justify-end gap-2">
|
|
5244
|
+
<div class="flex flex-wrap items-center">
|
|
5245
|
+
@if (comment.isEdited) {
|
|
5246
|
+
<p-tag [value]="'discussionComponent.edited' | translate" icon="pi pi-pencil" severity="warn"/>
|
|
5247
|
+
}
|
|
5248
|
+
</div>
|
|
5249
|
+
@if (comment.canEdit) {
|
|
5250
|
+
<p-button
|
|
5251
|
+
icon="pi pi-pencil"
|
|
5252
|
+
severity="secondary"
|
|
5253
|
+
[rounded]="true"
|
|
5254
|
+
[text]="true"
|
|
5255
|
+
(onClick)="startEdit(comment)"
|
|
5256
|
+
/>
|
|
5257
|
+
}
|
|
5258
|
+
@if (comment.historyCount > 0) {
|
|
5259
|
+
<p-button
|
|
5260
|
+
icon="pi pi-history"
|
|
5261
|
+
severity="secondary"
|
|
5262
|
+
[rounded]="true"
|
|
5263
|
+
[text]="true"
|
|
5264
|
+
(onClick)="toggleHistory(comment)"
|
|
5265
|
+
/>
|
|
5266
|
+
}
|
|
5267
|
+
@if (comment.canDelete) {
|
|
5268
|
+
<p-button
|
|
5269
|
+
icon="pi pi-trash"
|
|
5270
|
+
severity="danger"
|
|
5271
|
+
[rounded]="true"
|
|
5272
|
+
[text]="true"
|
|
5273
|
+
(onClick)="deleteComment(comment)"
|
|
5274
|
+
/>
|
|
5275
|
+
}
|
|
5276
|
+
</div>
|
|
5277
|
+
</div>
|
|
5278
|
+
@if (editingCommentId === comment.commentId) {
|
|
5279
|
+
<div class="flex flex-col gap-4">
|
|
5280
|
+
<textarea
|
|
5281
|
+
pTextarea
|
|
5282
|
+
class="min-h-24 w-full"
|
|
5283
|
+
[autoResize]="true"
|
|
5284
|
+
rows="4"
|
|
5285
|
+
[(ngModel)]="editContent"
|
|
5286
|
+
[placeholder]="'discussionComponent.editCommentPlaceholder' | translate"
|
|
5287
|
+
></textarea>
|
|
5288
|
+
<div class="flex flex-col gap-2 sm:flex-row sm:justify-end">
|
|
5289
|
+
<div>
|
|
5290
|
+
<label class="file-trigger">
|
|
5291
|
+
<p-button
|
|
5292
|
+
[label]="'discussionComponent.addAttachment' | translate"
|
|
5293
|
+
icon="pi pi-paperclip"
|
|
5294
|
+
[text]="true"
|
|
5295
|
+
severity="secondary"
|
|
5296
|
+
/>
|
|
5297
|
+
<input type="file" multiple (change)="onInlineFilesSelected(comment, $event)"/>
|
|
5298
|
+
</label>
|
|
5299
|
+
</div>
|
|
5300
|
+
|
|
5301
|
+
<p-button
|
|
5302
|
+
[label]="'discussionComponent.save' | translate"
|
|
5303
|
+
icon="pi pi-check"
|
|
5304
|
+
[disabled]="!editContent.trim()"
|
|
5305
|
+
(onClick)="saveEdit(comment)"
|
|
5306
|
+
/>
|
|
5307
|
+
<p-button
|
|
5308
|
+
[label]="'discussionComponent.cancel' | translate"
|
|
5309
|
+
icon="pi pi-times"
|
|
5310
|
+
severity="secondary"
|
|
5311
|
+
[text]="true"
|
|
5312
|
+
(onClick)="cancelEdit()"
|
|
5313
|
+
/>
|
|
5314
|
+
</div>
|
|
5315
|
+
</div>
|
|
5316
|
+
} @else {
|
|
5317
|
+
<div class="markdown-preview" [innerHTML]="renderMarkdown(comment.content)"></div>
|
|
5318
|
+
}
|
|
5319
|
+
|
|
5320
|
+
@if (comment.attachments.length > 0) {
|
|
5321
|
+
<div class="flex flex-col gap-3">
|
|
5322
|
+
<div class="flex flex-col gap-3">
|
|
5323
|
+
@for (attachment of comment.attachments; track attachment.attachmentId) {
|
|
5324
|
+
<div class="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-end">
|
|
5325
|
+
<div class="inline-flex items-center gap-2">
|
|
5326
|
+
<i class="pi pi-file"></i>
|
|
5327
|
+
<button
|
|
5328
|
+
type="button"
|
|
5329
|
+
class="break-all bg-transparent p-0 text-left font-semibold text-primary-600 transition hover:text-primary-500"
|
|
5330
|
+
(click)="downloadAttachment(attachment)"
|
|
5331
|
+
>
|
|
5332
|
+
{{ attachment.fileName }}
|
|
5333
|
+
</button>
|
|
5334
|
+
<p-tag [value]="formatBytes(attachment.fileSize)" severity="contrast"/>
|
|
5335
|
+
</div>
|
|
5336
|
+
|
|
5337
|
+
@if (comment.canEdit) {
|
|
5338
|
+
<p-button
|
|
5339
|
+
icon="pi pi-times"
|
|
5340
|
+
severity="danger"
|
|
5341
|
+
[rounded]="true"
|
|
5342
|
+
[text]="true"
|
|
5343
|
+
(onClick)="deleteAttachment(comment, attachment)"
|
|
5344
|
+
/>
|
|
5345
|
+
}
|
|
5346
|
+
</div>
|
|
5347
|
+
}
|
|
5348
|
+
</div>
|
|
5349
|
+
</div>
|
|
5350
|
+
}
|
|
5351
|
+
|
|
5352
|
+
<div class="flex flex-wrap items-center gap-2">
|
|
5353
|
+
@for (reaction of getReactions(comment); track reaction.emojiCode) {
|
|
5354
|
+
<p-button
|
|
5355
|
+
[label]="reaction.emojiCode + ' ' + reaction.count"
|
|
5356
|
+
severity="secondary"
|
|
5357
|
+
[outlined]="false"
|
|
5358
|
+
(onClick)="toggleReaction(comment, reaction)"
|
|
5359
|
+
/>
|
|
5360
|
+
}
|
|
5361
|
+
|
|
5362
|
+
@if (!hasUserReaction(comment)) {
|
|
5363
|
+
<p-button
|
|
5364
|
+
icon="pi pi-face-smile"
|
|
5365
|
+
severity="secondary"
|
|
5366
|
+
[rounded]="true"
|
|
5367
|
+
[text]="true"
|
|
5368
|
+
(onClick)="reactionPopover.toggle($event)"
|
|
5369
|
+
/>
|
|
5370
|
+
<p-popover #reactionPopover>
|
|
5371
|
+
<div class="emoji-popover">
|
|
5372
|
+
@for (emoji of emojiPalette; track emoji) {
|
|
5373
|
+
<button
|
|
5374
|
+
type="button"
|
|
5375
|
+
class="emoji-option"
|
|
5376
|
+
(click)="reactWithEmoji(comment, emoji, reactionPopover)"
|
|
5377
|
+
>
|
|
5378
|
+
{{ emoji }}
|
|
5379
|
+
</button>
|
|
5380
|
+
}
|
|
5381
|
+
</div>
|
|
5382
|
+
</p-popover>
|
|
5383
|
+
}
|
|
5384
|
+
</div>
|
|
5385
|
+
|
|
5386
|
+
@if (historyByComment[comment.commentId]?.opened) {
|
|
5387
|
+
<p-panel class="block" [toggleable]="true" [collapsed]="false">
|
|
5388
|
+
<ng-template pTemplate="header">
|
|
5389
|
+
<div class="inline-flex items-center gap-2 text-sm font-medium">
|
|
5390
|
+
<i class="pi pi-history"></i>
|
|
5391
|
+
<span>{{ 'discussionComponent.editHistory' | translate }}</span>
|
|
5392
|
+
</div>
|
|
5393
|
+
</ng-template>
|
|
5394
|
+
|
|
5395
|
+
@if (historyByComment[comment.commentId]?.loading) {
|
|
5396
|
+
<div class="flex items-center gap-3 text-surface-500">
|
|
5397
|
+
<p-progressSpinner strokeWidth="4"/>
|
|
5398
|
+
<span>{{ 'discussionComponent.loadingHistory' | translate }}</span>
|
|
5399
|
+
</div>
|
|
5400
|
+
} @else {
|
|
5401
|
+
<div class="flex flex-col gap-4">
|
|
5402
|
+
@for (item of historyByComment[comment.commentId]?.items ?? []; track item.commentEditHistoryId) {
|
|
5403
|
+
<div class="rounded-2xl border border-surface-200 px-4 py-4 dark:border-surface-700">
|
|
5404
|
+
<div class="mb-3 inline-flex items-center gap-2 text-sm font-semibold">
|
|
5405
|
+
<i class="pi pi-clock"></i>
|
|
5406
|
+
<span>{{ item.editedByDisplayName }} · {{ item.editedAt | date: 'short' }}</span>
|
|
5407
|
+
</div>
|
|
5408
|
+
<div class="grid gap-4 lg:grid-cols-2">
|
|
5409
|
+
<div class="flex flex-col gap-2">
|
|
5410
|
+
<p-tag [value]="'discussionComponent.before' | translate" severity="secondary"/>
|
|
5411
|
+
<div
|
|
5412
|
+
class="history-markdown rounded-2xl bg-surface-50 px-4 py-3 leading-7 dark:bg-surface-900/40"
|
|
5413
|
+
[innerHTML]="renderMarkdown(item.oldContent)"
|
|
5414
|
+
></div>
|
|
5415
|
+
</div>
|
|
5416
|
+
<div class="flex flex-col gap-2">
|
|
5417
|
+
<p-tag [value]="'discussionComponent.after' | translate" severity="success"/>
|
|
5418
|
+
<div
|
|
5419
|
+
class="history-markdown rounded-2xl bg-surface-50 px-4 py-3 leading-7 dark:bg-surface-900/40"
|
|
5420
|
+
[innerHTML]="renderMarkdown(item.newContent)"
|
|
5421
|
+
></div>
|
|
5422
|
+
</div>
|
|
5423
|
+
</div>
|
|
5424
|
+
</div>
|
|
5425
|
+
}
|
|
5426
|
+
</div>
|
|
5427
|
+
}
|
|
5428
|
+
</p-panel>
|
|
5429
|
+
}
|
|
5430
|
+
</div>
|
|
5431
|
+
</div>
|
|
5432
|
+
</ng-template>
|
|
5433
|
+
</p-card>
|
|
5434
|
+
}
|
|
5435
|
+
</div>
|
|
5436
|
+
}
|
|
5437
|
+
</section>
|
|
5438
|
+
`, isInline: true, styles: [":host{display:block}.file-trigger{position:relative;display:inline-flex}.file-trigger input{position:absolute;inset:0;opacity:0;cursor:pointer}.markdown-preview,.history-markdown{word-break:break-word}.markdown-preview :is(h1,h2,h3),.history-markdown :is(h1,h2,h3){margin:0 0 .75rem;font-weight:600}.markdown-preview a,.history-markdown a{color:#2563eb;text-decoration:underline;text-underline-offset:.18em}.emoji-popover{display:flex;flex-wrap:wrap;gap:.5rem;max-width:16rem}.emoji-option{display:inline-flex;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;font-size:1.25rem;cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AvatarModule }, { kind: "component", type: i2$2.Avatar, selector: "p-avatar", inputs: ["label", "icon", "image", "size", "shape", "styleClass", "ariaLabel", "ariaLabelledBy"], outputs: ["onImageError"] }, { kind: "directive", type: i2$6.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1$2.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: CardModule }, { kind: "component", type: i5.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }, { kind: "component", type: ConfirmDialog, selector: "p-confirmDialog, p-confirmdialog, p-confirm-dialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "modal", "visible", "position", "draggable"], outputs: ["onHide"] }, { kind: "ngmodule", type: DividerModule }, { kind: "ngmodule", type: PanelModule }, { kind: "component", type: i6.Panel, selector: "p-panel", inputs: ["id", "toggleable", "header", "collapsed", "styleClass", "iconPos", "showHeader", "toggler", "transitionOptions", "toggleButtonProps"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "component", type: i7.Popover, selector: "p-popover", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "ngmodule", type: ProgressSpinnerModule }, { kind: "component", type: i8.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "ngmodule", type: TagModule }, { kind: "component", type: i9.Tag, selector: "p-tag", inputs: ["styleClass", "severity", "value", "icon", "rounded"] }, { kind: "directive", type: Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }, { kind: "pipe", type: i2$1.DatePipe, name: "date" }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5439
|
+
}
|
|
5440
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DiscussionComponent, decorators: [{
|
|
5441
|
+
type: Component,
|
|
5442
|
+
args: [{ selector: 'discussion', standalone: true, providers: [ConfirmationService, DiscussionApi], imports: [
|
|
5443
|
+
CommonModule,
|
|
5444
|
+
FormsModule,
|
|
5445
|
+
AvatarModule,
|
|
5446
|
+
ButtonModule,
|
|
5447
|
+
CardModule,
|
|
5448
|
+
ConfirmDialog,
|
|
5449
|
+
DividerModule,
|
|
5450
|
+
PanelModule,
|
|
5451
|
+
PopoverModule,
|
|
5452
|
+
ProgressSpinnerModule,
|
|
5453
|
+
TagModule,
|
|
5454
|
+
Textarea,
|
|
5455
|
+
DatePipe,
|
|
5456
|
+
TranslatePipe
|
|
5457
|
+
], template: `
|
|
5458
|
+
<p-confirmDialog/>
|
|
5459
|
+
|
|
5460
|
+
<section class="flex flex-col gap-4">
|
|
5461
|
+
|
|
5462
|
+
<p-card class="block">
|
|
5463
|
+
<div class="flex flex-col gap-4">
|
|
5464
|
+
@if (!previewMode) {
|
|
5465
|
+
<textarea
|
|
5466
|
+
pTextarea
|
|
5467
|
+
class="min-h-28 w-full"
|
|
5468
|
+
[autoResize]="true"
|
|
5469
|
+
rows="5"
|
|
5470
|
+
[(ngModel)]="newComment"
|
|
5471
|
+
(ngModelChange)="onComposerInput()"
|
|
5472
|
+
[placeholder]="'discussionComponent.writeCommentPlaceholder' | translate"
|
|
5473
|
+
></textarea>
|
|
5474
|
+
} @else {
|
|
5475
|
+
<div
|
|
5476
|
+
class="markdown-preview min-h-28 rounded-2xl border border-surface-200 bg-surface-50 px-4 py-3 leading-7 dark:border-surface-700 dark:bg-surface-900/40"
|
|
5477
|
+
[innerHTML]="renderMarkdown(newComment)"
|
|
5478
|
+
></div>
|
|
5479
|
+
}
|
|
5480
|
+
|
|
5481
|
+
@if (mentionSuggestions.length > 0) {
|
|
5482
|
+
<p-panel class="block">
|
|
5483
|
+
<ng-template pTemplate="header">
|
|
5484
|
+
<div class="inline-flex items-center gap-2 text-sm font-medium">
|
|
5485
|
+
<i class="pi pi-at"></i>
|
|
5486
|
+
<span>{{ 'discussionComponent.mentionSuggestions' | translate }}</span>
|
|
5487
|
+
</div>
|
|
5488
|
+
</ng-template>
|
|
5489
|
+
|
|
5490
|
+
<div class="flex flex-col gap-3">
|
|
5491
|
+
@for (candidate of mentionSuggestions; track candidate.userId) {
|
|
5492
|
+
<button
|
|
5493
|
+
type="button"
|
|
5494
|
+
class="flex w-full items-center justify-between gap-4 rounded-xl border border-transparent px-3 py-3 text-left transition hover:border-primary-200 hover:bg-primary-50 dark:hover:border-primary-800 dark:hover:bg-primary-950/30"
|
|
5495
|
+
(click)="insertMention(candidate)"
|
|
5496
|
+
>
|
|
5497
|
+
<div class="min-w-0">
|
|
5498
|
+
<strong>{{ candidate.displayName }}</strong>
|
|
5499
|
+
<small class="mt-1 block text-surface-500">{{ candidate.email }}</small>
|
|
5500
|
+
</div>
|
|
5501
|
+
<i class="pi pi-arrow-up-left shrink-0 text-surface-400"></i>
|
|
5502
|
+
</button>
|
|
5503
|
+
}
|
|
5504
|
+
</div>
|
|
5505
|
+
</p-panel>
|
|
5506
|
+
}
|
|
5507
|
+
|
|
5508
|
+
@if (pendingFiles.length > 0) {
|
|
5509
|
+
<div class="flex flex-col gap-3">
|
|
5510
|
+
@for (file of pendingFiles; track file.name + file.size) {
|
|
5511
|
+
<div
|
|
5512
|
+
class="flex flex-col gap-3 rounded-2xl border border-surface-200 px-4 py-3 sm:flex-row sm:items-center sm:justify-between dark:border-surface-700">
|
|
5513
|
+
<div class="inline-flex items-center gap-2">
|
|
5514
|
+
<i class="pi pi-file"></i>
|
|
5515
|
+
<span class="break-all">{{ file.name }}</span>
|
|
5516
|
+
<p-tag [value]="formatBytes(file.size)" severity="contrast"/>
|
|
5517
|
+
</div>
|
|
5518
|
+
<p-button
|
|
5519
|
+
icon="pi pi-times"
|
|
5520
|
+
severity="danger"
|
|
5521
|
+
[rounded]="true"
|
|
5522
|
+
[text]="true"
|
|
5523
|
+
(onClick)="removePendingFile(file)"
|
|
5524
|
+
/>
|
|
5525
|
+
</div>
|
|
5526
|
+
}
|
|
5527
|
+
</div>
|
|
5528
|
+
}
|
|
5529
|
+
|
|
5530
|
+
<div class="flex flex-col gap-2 sm:flex-row sm:justify-end">
|
|
5531
|
+
<p-button
|
|
5532
|
+
[label]="
|
|
5533
|
+
previewMode
|
|
5534
|
+
? ('discussionComponent.edit' | translate)
|
|
5535
|
+
: ('discussionComponent.preview' | translate)
|
|
5536
|
+
"
|
|
5537
|
+
[icon]="previewMode ? 'pi pi-pencil' : 'pi pi-eye'"
|
|
5538
|
+
severity="secondary"
|
|
5539
|
+
[text]="true"
|
|
5540
|
+
(onClick)="previewMode = !previewMode"
|
|
5541
|
+
/>
|
|
5542
|
+
|
|
5543
|
+
<label class="file-trigger">
|
|
5544
|
+
<p-button
|
|
5545
|
+
[label]="'discussionComponent.attachFiles' | translate"
|
|
5546
|
+
icon="pi pi-paperclip"
|
|
5547
|
+
severity="secondary"
|
|
5548
|
+
[text]="true"
|
|
5549
|
+
/>
|
|
5550
|
+
<input type="file" multiple (change)="onFilesSelected($event)"/>
|
|
5551
|
+
</label>
|
|
5552
|
+
<p-button
|
|
5553
|
+
[label]="'discussionComponent.send' | translate"
|
|
5554
|
+
icon="pi pi-send"
|
|
5555
|
+
[loading]="submitting"
|
|
5556
|
+
[disabled]="submitting || !newComment.trim()"
|
|
5557
|
+
(onClick)="createComment()"
|
|
5558
|
+
/>
|
|
5559
|
+
</div>
|
|
5560
|
+
</div>
|
|
5561
|
+
</p-card>
|
|
5562
|
+
|
|
5563
|
+
@if (loading) {
|
|
5564
|
+
<div
|
|
5565
|
+
class="flex min-h-20 flex-col items-center justify-center gap-3 rounded-2xl border border-surface-200 px-4 py-5 text-surface-500 dark:border-surface-700">
|
|
5566
|
+
<p-progressSpinner strokeWidth="4"/>
|
|
5567
|
+
<span>{{ 'discussionComponent.loadingComments' | translate }}</span>
|
|
5568
|
+
</div>
|
|
5569
|
+
} @else if (comments.length === 0) {
|
|
5570
|
+
<div
|
|
5571
|
+
class="flex min-h-20 items-center justify-center gap-3 rounded-2xl border border-surface-200 px-4 py-5 text-surface-500 dark:border-surface-700">
|
|
5572
|
+
<i class="pi pi-inbox"></i>
|
|
5573
|
+
<span>{{ 'discussionComponent.noCommentsYet' | translate }}</span>
|
|
5574
|
+
</div>
|
|
5575
|
+
} @else {
|
|
5576
|
+
<div class="flex flex-col gap-4">
|
|
5577
|
+
@for (comment of comments; track comment.commentId) {
|
|
5578
|
+
<p-card class="block">
|
|
5579
|
+
<ng-template pTemplate="content">
|
|
5580
|
+
<div class="grid gap-4 md:grid-cols-[3.2rem_minmax(0,1fr)]">
|
|
5581
|
+
<div>
|
|
5582
|
+
<p-avatar
|
|
5583
|
+
[label]="getInitialsFromString(comment.authorDisplayName)"
|
|
5584
|
+
shape="circle"
|
|
5585
|
+
/>
|
|
5586
|
+
</div>
|
|
5587
|
+
|
|
5588
|
+
<div class="flex flex-col gap-2">
|
|
5589
|
+
<div class="flex flex-row gap-3 justify-between">
|
|
5590
|
+
<div class="flex flex-wrap items-center gap-2">
|
|
5591
|
+
<strong>{{ comment.authorDisplayName }}</strong>
|
|
5592
|
+
<span
|
|
5593
|
+
class="text-sm text-surface-500">{{ comment.createdAt | date: layoutService.dateTimeFormat() }}</span>
|
|
5594
|
+
</div>
|
|
5595
|
+
|
|
5596
|
+
<div class="flex flex-wrap items-center justify-end gap-2">
|
|
5597
|
+
<div class="flex flex-wrap items-center">
|
|
5598
|
+
@if (comment.isEdited) {
|
|
5599
|
+
<p-tag [value]="'discussionComponent.edited' | translate" icon="pi pi-pencil" severity="warn"/>
|
|
5600
|
+
}
|
|
5601
|
+
</div>
|
|
5602
|
+
@if (comment.canEdit) {
|
|
5603
|
+
<p-button
|
|
5604
|
+
icon="pi pi-pencil"
|
|
5605
|
+
severity="secondary"
|
|
5606
|
+
[rounded]="true"
|
|
5607
|
+
[text]="true"
|
|
5608
|
+
(onClick)="startEdit(comment)"
|
|
5609
|
+
/>
|
|
5610
|
+
}
|
|
5611
|
+
@if (comment.historyCount > 0) {
|
|
5612
|
+
<p-button
|
|
5613
|
+
icon="pi pi-history"
|
|
5614
|
+
severity="secondary"
|
|
5615
|
+
[rounded]="true"
|
|
5616
|
+
[text]="true"
|
|
5617
|
+
(onClick)="toggleHistory(comment)"
|
|
5618
|
+
/>
|
|
5619
|
+
}
|
|
5620
|
+
@if (comment.canDelete) {
|
|
5621
|
+
<p-button
|
|
5622
|
+
icon="pi pi-trash"
|
|
5623
|
+
severity="danger"
|
|
5624
|
+
[rounded]="true"
|
|
5625
|
+
[text]="true"
|
|
5626
|
+
(onClick)="deleteComment(comment)"
|
|
5627
|
+
/>
|
|
5628
|
+
}
|
|
5629
|
+
</div>
|
|
5630
|
+
</div>
|
|
5631
|
+
@if (editingCommentId === comment.commentId) {
|
|
5632
|
+
<div class="flex flex-col gap-4">
|
|
5633
|
+
<textarea
|
|
5634
|
+
pTextarea
|
|
5635
|
+
class="min-h-24 w-full"
|
|
5636
|
+
[autoResize]="true"
|
|
5637
|
+
rows="4"
|
|
5638
|
+
[(ngModel)]="editContent"
|
|
5639
|
+
[placeholder]="'discussionComponent.editCommentPlaceholder' | translate"
|
|
5640
|
+
></textarea>
|
|
5641
|
+
<div class="flex flex-col gap-2 sm:flex-row sm:justify-end">
|
|
5642
|
+
<div>
|
|
5643
|
+
<label class="file-trigger">
|
|
5644
|
+
<p-button
|
|
5645
|
+
[label]="'discussionComponent.addAttachment' | translate"
|
|
5646
|
+
icon="pi pi-paperclip"
|
|
5647
|
+
[text]="true"
|
|
5648
|
+
severity="secondary"
|
|
5649
|
+
/>
|
|
5650
|
+
<input type="file" multiple (change)="onInlineFilesSelected(comment, $event)"/>
|
|
5651
|
+
</label>
|
|
5652
|
+
</div>
|
|
5653
|
+
|
|
5654
|
+
<p-button
|
|
5655
|
+
[label]="'discussionComponent.save' | translate"
|
|
5656
|
+
icon="pi pi-check"
|
|
5657
|
+
[disabled]="!editContent.trim()"
|
|
5658
|
+
(onClick)="saveEdit(comment)"
|
|
5659
|
+
/>
|
|
5660
|
+
<p-button
|
|
5661
|
+
[label]="'discussionComponent.cancel' | translate"
|
|
5662
|
+
icon="pi pi-times"
|
|
5663
|
+
severity="secondary"
|
|
5664
|
+
[text]="true"
|
|
5665
|
+
(onClick)="cancelEdit()"
|
|
5666
|
+
/>
|
|
5667
|
+
</div>
|
|
5668
|
+
</div>
|
|
5669
|
+
} @else {
|
|
5670
|
+
<div class="markdown-preview" [innerHTML]="renderMarkdown(comment.content)"></div>
|
|
5671
|
+
}
|
|
5672
|
+
|
|
5673
|
+
@if (comment.attachments.length > 0) {
|
|
5674
|
+
<div class="flex flex-col gap-3">
|
|
5675
|
+
<div class="flex flex-col gap-3">
|
|
5676
|
+
@for (attachment of comment.attachments; track attachment.attachmentId) {
|
|
5677
|
+
<div class="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-end">
|
|
5678
|
+
<div class="inline-flex items-center gap-2">
|
|
5679
|
+
<i class="pi pi-file"></i>
|
|
5680
|
+
<button
|
|
5681
|
+
type="button"
|
|
5682
|
+
class="break-all bg-transparent p-0 text-left font-semibold text-primary-600 transition hover:text-primary-500"
|
|
5683
|
+
(click)="downloadAttachment(attachment)"
|
|
5684
|
+
>
|
|
5685
|
+
{{ attachment.fileName }}
|
|
5686
|
+
</button>
|
|
5687
|
+
<p-tag [value]="formatBytes(attachment.fileSize)" severity="contrast"/>
|
|
5688
|
+
</div>
|
|
5689
|
+
|
|
5690
|
+
@if (comment.canEdit) {
|
|
5691
|
+
<p-button
|
|
5692
|
+
icon="pi pi-times"
|
|
5693
|
+
severity="danger"
|
|
5694
|
+
[rounded]="true"
|
|
5695
|
+
[text]="true"
|
|
5696
|
+
(onClick)="deleteAttachment(comment, attachment)"
|
|
5697
|
+
/>
|
|
5698
|
+
}
|
|
5699
|
+
</div>
|
|
5700
|
+
}
|
|
5701
|
+
</div>
|
|
5702
|
+
</div>
|
|
5703
|
+
}
|
|
5704
|
+
|
|
5705
|
+
<div class="flex flex-wrap items-center gap-2">
|
|
5706
|
+
@for (reaction of getReactions(comment); track reaction.emojiCode) {
|
|
5707
|
+
<p-button
|
|
5708
|
+
[label]="reaction.emojiCode + ' ' + reaction.count"
|
|
5709
|
+
severity="secondary"
|
|
5710
|
+
[outlined]="false"
|
|
5711
|
+
(onClick)="toggleReaction(comment, reaction)"
|
|
5712
|
+
/>
|
|
5713
|
+
}
|
|
5714
|
+
|
|
5715
|
+
@if (!hasUserReaction(comment)) {
|
|
5716
|
+
<p-button
|
|
5717
|
+
icon="pi pi-face-smile"
|
|
5718
|
+
severity="secondary"
|
|
5719
|
+
[rounded]="true"
|
|
5720
|
+
[text]="true"
|
|
5721
|
+
(onClick)="reactionPopover.toggle($event)"
|
|
5722
|
+
/>
|
|
5723
|
+
<p-popover #reactionPopover>
|
|
5724
|
+
<div class="emoji-popover">
|
|
5725
|
+
@for (emoji of emojiPalette; track emoji) {
|
|
5726
|
+
<button
|
|
5727
|
+
type="button"
|
|
5728
|
+
class="emoji-option"
|
|
5729
|
+
(click)="reactWithEmoji(comment, emoji, reactionPopover)"
|
|
5730
|
+
>
|
|
5731
|
+
{{ emoji }}
|
|
5732
|
+
</button>
|
|
5733
|
+
}
|
|
5734
|
+
</div>
|
|
5735
|
+
</p-popover>
|
|
5736
|
+
}
|
|
5737
|
+
</div>
|
|
5738
|
+
|
|
5739
|
+
@if (historyByComment[comment.commentId]?.opened) {
|
|
5740
|
+
<p-panel class="block" [toggleable]="true" [collapsed]="false">
|
|
5741
|
+
<ng-template pTemplate="header">
|
|
5742
|
+
<div class="inline-flex items-center gap-2 text-sm font-medium">
|
|
5743
|
+
<i class="pi pi-history"></i>
|
|
5744
|
+
<span>{{ 'discussionComponent.editHistory' | translate }}</span>
|
|
5745
|
+
</div>
|
|
5746
|
+
</ng-template>
|
|
5747
|
+
|
|
5748
|
+
@if (historyByComment[comment.commentId]?.loading) {
|
|
5749
|
+
<div class="flex items-center gap-3 text-surface-500">
|
|
5750
|
+
<p-progressSpinner strokeWidth="4"/>
|
|
5751
|
+
<span>{{ 'discussionComponent.loadingHistory' | translate }}</span>
|
|
5752
|
+
</div>
|
|
5753
|
+
} @else {
|
|
5754
|
+
<div class="flex flex-col gap-4">
|
|
5755
|
+
@for (item of historyByComment[comment.commentId]?.items ?? []; track item.commentEditHistoryId) {
|
|
5756
|
+
<div class="rounded-2xl border border-surface-200 px-4 py-4 dark:border-surface-700">
|
|
5757
|
+
<div class="mb-3 inline-flex items-center gap-2 text-sm font-semibold">
|
|
5758
|
+
<i class="pi pi-clock"></i>
|
|
5759
|
+
<span>{{ item.editedByDisplayName }} · {{ item.editedAt | date: 'short' }}</span>
|
|
5760
|
+
</div>
|
|
5761
|
+
<div class="grid gap-4 lg:grid-cols-2">
|
|
5762
|
+
<div class="flex flex-col gap-2">
|
|
5763
|
+
<p-tag [value]="'discussionComponent.before' | translate" severity="secondary"/>
|
|
5764
|
+
<div
|
|
5765
|
+
class="history-markdown rounded-2xl bg-surface-50 px-4 py-3 leading-7 dark:bg-surface-900/40"
|
|
5766
|
+
[innerHTML]="renderMarkdown(item.oldContent)"
|
|
5767
|
+
></div>
|
|
5768
|
+
</div>
|
|
5769
|
+
<div class="flex flex-col gap-2">
|
|
5770
|
+
<p-tag [value]="'discussionComponent.after' | translate" severity="success"/>
|
|
5771
|
+
<div
|
|
5772
|
+
class="history-markdown rounded-2xl bg-surface-50 px-4 py-3 leading-7 dark:bg-surface-900/40"
|
|
5773
|
+
[innerHTML]="renderMarkdown(item.newContent)"
|
|
5774
|
+
></div>
|
|
5775
|
+
</div>
|
|
5776
|
+
</div>
|
|
5777
|
+
</div>
|
|
5778
|
+
}
|
|
5779
|
+
</div>
|
|
5780
|
+
}
|
|
5781
|
+
</p-panel>
|
|
5782
|
+
}
|
|
5783
|
+
</div>
|
|
5784
|
+
</div>
|
|
5785
|
+
</ng-template>
|
|
5786
|
+
</p-card>
|
|
5787
|
+
}
|
|
5788
|
+
</div>
|
|
5789
|
+
}
|
|
5790
|
+
</section>
|
|
5791
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block}.file-trigger{position:relative;display:inline-flex}.file-trigger input{position:absolute;inset:0;opacity:0;cursor:pointer}.markdown-preview,.history-markdown{word-break:break-word}.markdown-preview :is(h1,h2,h3),.history-markdown :is(h1,h2,h3){margin:0 0 .75rem;font-weight:600}.markdown-preview a,.history-markdown a{color:#2563eb;text-decoration:underline;text-underline-offset:.18em}.emoji-popover{display:flex;flex-wrap:wrap;gap:.5rem;max-width:16rem}.emoji-option{display:inline-flex;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;font-size:1.25rem;cursor:pointer}\n"] }]
|
|
5792
|
+
}], propDecorators: { objectTypeId: [{
|
|
5793
|
+
type: Input,
|
|
5794
|
+
args: [{ required: true }]
|
|
5795
|
+
}], objectId: [{
|
|
5796
|
+
type: Input,
|
|
5797
|
+
args: [{ required: true }]
|
|
5798
|
+
}] } });
|
|
5799
|
+
|
|
4407
5800
|
/**
|
|
4408
5801
|
* A route guard that ensures the user is authenticated and has a valid access token.
|
|
4409
5802
|
* If the access token is expired, it attempts to refresh the session.
|
|
@@ -4643,5 +6036,5 @@ const httpLoaderAuthFactory = (httpClient) => {
|
|
|
4643
6036
|
* Generated bundle index. Do not edit.
|
|
4644
6037
|
*/
|
|
4645
6038
|
|
|
4646
|
-
export { AppConfiguratorComponent, AppFloatingConfiguratorComponent, AppLayoutComponent, AppModulesComponent, AppTopbar, AuthGuardService, BaseDataService, BaseModuleComponent, ConfigComponent, ContentType, DbMigrationComponent, ErrorComponent, FooterComponent, HttpClient, KeycloakSecurityService, L10nService, LOGO_COMPONENT_TOKEN, LayoutService, LogoComponent, LogoService, MenuComponent, MenuService, MsgService, NotfoundComponent, NotificationService, ProfileComponent, SecurePipe, SecurityComponent, SecurityDataService, SecurityService, SecurityStorageService, SidebarComponent, TableFilterService, TopBarService, UnauthorizedComponent, UserService, httpLoaderAuthFactory, langIntercept, provideLogoComponent };
|
|
6039
|
+
export { AppConfiguratorComponent, AppFloatingConfiguratorComponent, AppLayoutComponent, AppModulesComponent, AppTopbar, AuthGuardService, BaseDataService, BaseModuleComponent, ConfigComponent, ContentType, DbMigrationComponent, DiscussionComponent, ErrorComponent, FooterComponent, HttpClient, KeycloakSecurityService, L10nService, LOGO_COMPONENT_TOKEN, LayoutService, LogoComponent, LogoService, MenuComponent, MenuService, MsgService, NotfoundComponent, NotificationService, ProfileComponent, SecurePipe, SecurityComponent, SecurityDataService, SecurityService, SecurityStorageService, SidebarComponent, TableFilterService, TopBarService, UnauthorizedComponent, UserService, httpLoaderAuthFactory, langIntercept, provideLogoComponent };
|
|
4647
6040
|
//# sourceMappingURL=oip-common.mjs.map
|