@posiwise/enterprise-module 0.0.107 → 0.0.109
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.
|
@@ -7,17 +7,17 @@ import { UntypedFormBuilder, Validators, FormsModule, ReactiveFormsModule } from
|
|
|
7
7
|
import * as i16 from '@angular/router';
|
|
8
8
|
import { RouterModule } from '@angular/router';
|
|
9
9
|
import { CoreTranslocoModule } from '@posiwise/core-transloco';
|
|
10
|
-
import * as
|
|
10
|
+
import * as i10 from '@posiwise/directives';
|
|
11
11
|
import { DirectivesModule } from '@posiwise/directives';
|
|
12
12
|
import * as i19 from '@posiwise/pipes';
|
|
13
13
|
import { PipesModule } from '@posiwise/pipes';
|
|
14
|
-
import * as
|
|
14
|
+
import * as i4$1 from '@posiwise/shared-components';
|
|
15
15
|
import { GroupsComponent, GroupDefinitionComponent, EntityGroupComponent, SharedComponentsModule } from '@posiwise/shared-components';
|
|
16
16
|
import * as i2$1 from 'angular-plotly.js';
|
|
17
17
|
import { PlotlyViaCDNModule } from 'angular-plotly.js';
|
|
18
18
|
import * as i17 from 'ngx-quill';
|
|
19
19
|
import { QuillModule } from 'ngx-quill';
|
|
20
|
-
import * as i9
|
|
20
|
+
import * as i9 from 'ngx-ui-switch';
|
|
21
21
|
import { UiSwitchModule } from 'ngx-ui-switch';
|
|
22
22
|
import * as i16$1 from 'ngx-uploader';
|
|
23
23
|
import { humanizeBytes, UploadStatus, NgxUploaderModule } from 'ngx-uploader';
|
|
@@ -29,9 +29,9 @@ import * as i5 from 'primeng/inputicon';
|
|
|
29
29
|
import { InputIconModule } from 'primeng/inputicon';
|
|
30
30
|
import * as i3$1 from 'primeng/inputtext';
|
|
31
31
|
import { InputTextModule } from 'primeng/inputtext';
|
|
32
|
-
import * as
|
|
32
|
+
import * as i12 from 'primeng/multiselect';
|
|
33
33
|
import { MultiSelectModule } from 'primeng/multiselect';
|
|
34
|
-
import * as i10 from 'primeng/select';
|
|
34
|
+
import * as i10$1 from 'primeng/select';
|
|
35
35
|
import { SelectModule } from 'primeng/select';
|
|
36
36
|
import * as i7 from '@ng-bootstrap/ng-bootstrap';
|
|
37
37
|
import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap';
|
|
@@ -40,19 +40,18 @@ import { AppBaseComponent } from '@posiwise/app-base-component';
|
|
|
40
40
|
import * as i1 from '@posiwise/common-services';
|
|
41
41
|
import { PermissionService, ValidationService, PrimeNgHelper, FormHelperService } from '@posiwise/common-services';
|
|
42
42
|
import { HelperService } from '@posiwise/helper-service';
|
|
43
|
-
import * as
|
|
43
|
+
import * as i13 from 'primeng/progressspinner';
|
|
44
44
|
import { __decorate, __metadata } from 'tslib';
|
|
45
45
|
import { PAGE_SIZE, DOCUMENT_TYPE_EXT, TOKEN_HEADER_KEY } from '@posiwise/common-utilities';
|
|
46
46
|
import { QuillHelper, ValidateForm, handleDateRangeSelection } from '@posiwise/utils';
|
|
47
47
|
import * as i6 from 'primeng/api';
|
|
48
|
-
import * as i13 from 'primeng/table';
|
|
48
|
+
import * as i13$1 from 'primeng/table';
|
|
49
49
|
import * as i18 from '@jsverse/transloco';
|
|
50
50
|
import * as i3$2 from '@posiwise/admin-module-utils';
|
|
51
51
|
import { StatusCodes } from 'http-status-codes';
|
|
52
|
-
import swal from 'sweetalert2';
|
|
53
52
|
import * as i14 from 'primeng/tooltip';
|
|
54
53
|
import groupBy from 'lodash/groupBy';
|
|
55
|
-
import * as
|
|
54
|
+
import * as i14$1 from 'primeng/autocomplete';
|
|
56
55
|
import { switchMap } from 'rxjs/operators';
|
|
57
56
|
|
|
58
57
|
class EnterpriseViewParticularCommunicationComponent extends AppBaseComponent {
|
|
@@ -102,7 +101,7 @@ class EnterpriseViewParticularCommunicationComponent extends AppBaseComponent {
|
|
|
102
101
|
super.ngOnDestroy();
|
|
103
102
|
}
|
|
104
103
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: EnterpriseViewParticularCommunicationComponent, deps: [{ token: i0.Injector }, { token: i1.GroupService }, { token: i2.DomSanitizer }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
105
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: EnterpriseViewParticularCommunicationComponent, isStandalone: false, selector: "pw-enterprise-communication-details", usesInheritance: true, ngImport: i0, template: "<div class=\"row\">\n <div class=\"col-12 d-flex\">\n <a aria-label=\"Navigate to Target\"\n (keydown.enter)=\"onCancel()\"\n (click)=\"onCancel()\"\n class=\"previous\"><i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n <h2 class=\"mt-0 mb-0\">Communication</h2>\n </div>\n </div>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (isLoaded) {\n <div>\n @if (communicationDetails) {\n <div class=\"content-quill-wrapper container-fluid pw-tab overflow-hidden mt-3\">\n <div class=\"pb-0\">\n <div class=\"card-body p-4\">\n <div class=\"row mb-3\">\n <div class=\"col-12 d-flex flex-wrap justify-content-between align-items-center mb-md-2\">\n <div class=\"d-flex flex-wrap mb-3 mb-md-0\">\n <span [ngClass]=\"communicationDetails?.pushed ? 'badge bg-success' : 'badge bg-danger'\" class=\"me-2 mb-2 mb-md-0\">\n {{ communicationDetails?.pushed ? 'Pushed' : 'Not Pushed' }}\n </span>\n <span [ngClass]=\"communicationDetails?.published? 'badge bg-success' : 'badge bg-danger'\" class=\"me-2 mb-2 mb-md-0\">\n {{ communicationDetails?.published ? 'Published' : 'Not Published' }}\n </span>\n <span [ngClass]=\"communicationDetails?.published ? 'badge bg-success' : 'badge bg-danger'\" class=\"me-2 mb-2 mb-md-0\">\n {{ communicationDetails?.visible_globally ? 'Visible Globally' : 'Not Visible Globally' }}\n </span>\n </div>\n <div class=\"d-flex flex-wrap mb-3 mb-md-0\">\n <span class=\"badge bg-cyan mb-2 me-2 mb-md-0\">{{communicationDetails?.group?.name}}</span>\n <span class=\"badge bg-blue-grey mb-2 me-2 mb-md-0\">{{ 'Created At (' + (communicationDetails?.created_at | date: 'dd-MMM-yyyy') + ')' }}</span>\n @if (communicationDetails?.pushed_at) {\n <span class=\"badge bg-grey mb-2 mb-md-0\">{{ 'Pushed At (' + (communicationDetails?.pushed_at | date: 'dd-MMM-yyyy') + ')' }}</span>\n }\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12 mb-3 ms-2\">\n <h5>{{ communicationDetails?.title }}</h5>\n </div>\n <div class=\"col-12 mb-3 ms-2 message-icon\">\n <a [routerLink]=\"['/members', communicationDetails?.author?.slug]\">{{\n communicationDetails?.author | ifNameNullShowEmail\n }}</a>\n <div class=\"ms-2\"\n ngbTooltip=\"Message\"\n *rbacAllow=\"chatPermission\">\n <i\n [routerLink]=\"['/message']\"\n [fragment]=\"communicationDetails?.author?.slug\"\n class=\"fa fa-comments cta1-icon\"\n aria-hidden=\"true\"\n ></i>\n </div>\n </div>\n <div class=\"col-12 ms-2\">\n <div class=\"ql-container ql-snow body-quill\">\n <div class=\"ql-editor\"\n [innerHTML]=\"communicationDetails?.body\">\n </div>\n </div>\n </div>\n <div class=\"col-12 col-sm-10\">\n @for (\n files of communicationDetails?.group_communication_files; track trackByFileId($index,\n files)) {\n <p>\n <a [href]=\"files?.name?.url\"\n target=\"blank\">{{\n files?.name?.url?.split('?')[0]?.split('/')[\n files?.name?.url.split('?')[0]?.split('/')?.length - 1\n ]\n }}</a>\n </p>\n }\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n", styles: [".badge-success,.badge-danger{padding:.5rem 1rem;border:1px solid black;font-size:1rem;display:inline-block;text-align:center}.badge-success{background-color:green;color:#fff}.badge-danger{background-color:red;color:#fff}.message-icon{display:flex}.date-span{padding:.5rem 1rem;font-size:1rem;border:1px solid black;display:inline-block;text-align:center}.ql-container{resize:none!important}.light-gray{background-color:#d3d3d3;color:#fff}.gray{background-color:gray;color:#fff}.card-body{padding:1.5rem}h4,h5{font-weight:700;margin-bottom:.5rem}p{margin-bottom:1rem}.d-flex{display:flex;align-items:center}.me-3{margin-right:1rem}.container-fluid{padding:0}.mb-3{margin-bottom:1rem}.mb-2{margin-bottom:.5rem}.justify-content-between{justify-content:space-between}.align-items-center{align-items:center}.button-width{width:100px}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i7.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type:
|
|
104
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: EnterpriseViewParticularCommunicationComponent, isStandalone: false, selector: "pw-enterprise-communication-details", usesInheritance: true, ngImport: i0, template: "<div class=\"row\">\n <div class=\"col-12 d-flex\">\n <a aria-label=\"Navigate to Target\"\n (keydown.enter)=\"onCancel()\"\n (click)=\"onCancel()\"\n class=\"previous\"><i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n <h2 class=\"mt-0 mb-0\">Communication</h2>\n </div>\n </div>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (isLoaded) {\n <div>\n @if (communicationDetails) {\n <div class=\"content-quill-wrapper container-fluid pw-tab overflow-hidden mt-3\">\n <div class=\"pb-0\">\n <div class=\"card-body p-4\">\n <div class=\"row mb-3\">\n <div class=\"col-12 d-flex flex-wrap justify-content-between align-items-center mb-md-2\">\n <div class=\"d-flex flex-wrap mb-3 mb-md-0\">\n <span [ngClass]=\"communicationDetails?.pushed ? 'badge bg-success' : 'badge bg-danger'\" class=\"me-2 mb-2 mb-md-0\">\n {{ communicationDetails?.pushed ? 'Pushed' : 'Not Pushed' }}\n </span>\n <span [ngClass]=\"communicationDetails?.published? 'badge bg-success' : 'badge bg-danger'\" class=\"me-2 mb-2 mb-md-0\">\n {{ communicationDetails?.published ? 'Published' : 'Not Published' }}\n </span>\n <span [ngClass]=\"communicationDetails?.published ? 'badge bg-success' : 'badge bg-danger'\" class=\"me-2 mb-2 mb-md-0\">\n {{ communicationDetails?.visible_globally ? 'Visible Globally' : 'Not Visible Globally' }}\n </span>\n </div>\n <div class=\"d-flex flex-wrap mb-3 mb-md-0\">\n <span class=\"badge bg-cyan mb-2 me-2 mb-md-0\">{{communicationDetails?.group?.name}}</span>\n <span class=\"badge bg-blue-grey mb-2 me-2 mb-md-0\">{{ 'Created At (' + (communicationDetails?.created_at | date: 'dd-MMM-yyyy') + ')' }}</span>\n @if (communicationDetails?.pushed_at) {\n <span class=\"badge bg-grey mb-2 mb-md-0\">{{ 'Pushed At (' + (communicationDetails?.pushed_at | date: 'dd-MMM-yyyy') + ')' }}</span>\n }\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12 mb-3 ms-2\">\n <h5>{{ communicationDetails?.title }}</h5>\n </div>\n <div class=\"col-12 mb-3 ms-2 message-icon\">\n <a [routerLink]=\"['/members', communicationDetails?.author?.slug]\">{{\n communicationDetails?.author | ifNameNullShowEmail\n }}</a>\n <div class=\"ms-2\"\n ngbTooltip=\"Message\"\n *rbacAllow=\"chatPermission\">\n <i\n [routerLink]=\"['/message']\"\n [fragment]=\"communicationDetails?.author?.slug\"\n class=\"fa fa-comments cta1-icon\"\n aria-hidden=\"true\"\n ></i>\n </div>\n </div>\n <div class=\"col-12 ms-2\">\n <div class=\"ql-container ql-snow body-quill\">\n <div class=\"ql-editor\"\n [innerHTML]=\"communicationDetails?.body\">\n </div>\n </div>\n </div>\n <div class=\"col-12 col-sm-10\">\n @for (\n files of communicationDetails?.group_communication_files; track trackByFileId($index,\n files)) {\n <p>\n <a [href]=\"files?.name?.url\"\n target=\"blank\">{{\n files?.name?.url?.split('?')[0]?.split('/')[\n files?.name?.url.split('?')[0]?.split('/')?.length - 1\n ]\n }}</a>\n </p>\n }\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n", styles: [".badge-success,.badge-danger{padding:.5rem 1rem;border:1px solid black;font-size:1rem;display:inline-block;text-align:center}.badge-success{background-color:green;color:#fff}.badge-danger{background-color:red;color:#fff}.message-icon{display:flex}.date-span{padding:.5rem 1rem;font-size:1rem;border:1px solid black;display:inline-block;text-align:center}.ql-container{resize:none!important}.light-gray{background-color:#d3d3d3;color:#fff}.gray{background-color:gray;color:#fff}.card-body{padding:1.5rem}h4,h5{font-weight:700;margin-bottom:.5rem}p{margin-bottom:1rem}.d-flex{display:flex;align-items:center}.me-3{margin-right:1rem}.container-fluid{padding:0}.mb-3{margin-bottom:1rem}.mb-2{margin-bottom:.5rem}.justify-content-between{justify-content:space-between}.align-items-center{align-items:center}.button-width{width:100px}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i7.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type: i10.RbacAllowDirective, selector: "[rbacAllow]", inputs: ["rbacAllow"] }, { kind: "component", type: i13.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "directive", type: i16.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: i3.DatePipe, name: "date" }, { kind: "pipe", type: i19.IfNameNullShowEmailPipe, name: "ifNameNullShowEmail" }] }); }
|
|
106
105
|
}
|
|
107
106
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: EnterpriseViewParticularCommunicationComponent, decorators: [{
|
|
108
107
|
type: Component,
|
|
@@ -444,7 +443,7 @@ class EnterpriseCommunicationsComponent extends AppBaseComponent {
|
|
|
444
443
|
super.ngOnDestroy();
|
|
445
444
|
}
|
|
446
445
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: EnterpriseCommunicationsComponent, deps: [{ token: i1.GroupService }, { token: i0.Injector }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
447
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: EnterpriseCommunicationsComponent, isStandalone: false, selector: "pw-enterprise-communications", usesInheritance: true, ngImport: i0, template: "<section>\n <div class=\"row\">\n <div class=\"col-12\" [ngClass]=\"{'mb-3': !isEdit}\">\n <div class=\"title\">\n @if (isEdit) {\n <a\n aria-label=\"Navigate to Target\"\n (click)=\"onCancel()\"\n (keydown.enter)=\"onCancel()\"\n class=\"previous\"><i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n }\n @if (isEdit) {\n <h3 class=\"m-subheader__title m-subheader__title--separator mt-1\">\n <span>{{ !isAdd ? 'Edit' : 'Create new' }} Communication</span>\n </h3>\n }\n @if (!isEdit) {\n <h2 [ngClass]=\"{ 'mt-2': isEdit }\">Communications @if (groupId) {\n <span>for {{ groupName }}</span>\n }</h2>\n }\n </div>\n @if (!isEdit) {\n <p>\n Here you can send communications to your organization, based on the teams they are\n part of.\n </p>\n }\n </div>\n </div>\n </section>\n @if (!isLoaded && isEdit) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (isEdit && isLoaded) {\n <div class=\"container-fluid pw-tab overflow-hidden\">\n <div class=\"p-2 mt-1\">\n <form [formGroup]=\"form\"\n (ngSubmit)=\"onSave()\">\n <h3>{{ 'Enterprise.Documentation.Section.Content' | transloco }}</h3>\n <div class=\"row mb-3\">\n <div class=\"col-12\">\n <pw-input-container [label]=\"'Enterprise.Documentation.Title' | transloco\"\n [errorMsg]=\"'Enterprise.Documentation.Validation.Title' | transloco\"\n name=\"title\" controlId=\"enterprise-communications-title\">\n <input type=\"text\"\n id=\"enterprise-communications-title\"\n class=\"form-control\"\n formControlName=\"title\"\n [placeholder]=\"'Enterprise.Documentation.Placeholder.Title' | transloco\"\n [ngClass]=\"{ 'is-invalid': submitted && f['title'].errors }\" />\n </pw-input-container>\n </div>\n <pw-input-container [label]=\"'Enterprise.Documentation.Body' | transloco\"\n class=\"col-12\"\n name=\"body\" controlId=\"enterprise-communications-body\" [useAriaLabelledbyOnly]=\"true\"\n [errorMsg]=\"'Enterprise.Documentation.Validation.Body' | transloco\">\n <quill-editor [styles]=\"{ height: '220px' }\"\n [attr.aria-labelledby]=\"'enterprise-communications-body-label'\"\n [placeholder]=\"'Enterprise.Documentation.Placeholder.Body' | transloco\"\n class=\"quillEditor quill-container\" [modules]=\"editorConfig\"\n formControlName=\"body\"\n [ngClass]=\"{ 'is-invalid': submitted && f['body'].errors }\">\n </quill-editor>\n </pw-input-container>\n <div class=\"col-12 col-md-4\">\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'Enterprise.Tooltip.Group' | transloco\"\n [label]=\"'Enterprise.Documentation.Team' | transloco\"\n [isLeftTooltip]=\"true\"\n name=\"group_id\" controlId=\"enterprise-communications-group_id\" [useAriaLabelledbyOnly]=\"true\"\n [errorMsg]=\"'Enterprise.Documentation.Validation.Team' | transloco\">\n <p-select\n [attr.aria-labelledby]=\"'enterprise-communications-group_id-label'\"\n [options]=\"allGroups\"\n formControlName=\"group_id\"\n [placeholder]=\"'Enterprise.Documentation.Placeholder.Team' | transloco\"\n [ngClass]=\"{ 'is-invalid': submitted && f['group_id'].errors }\"\n optionValue=\"id\"\n optionLabel=\"name\">\n </p-select>\n </pw-input-container>\n </div>\n </div>\n\n <h3>{{ 'Enterprise.Documentation.Section.Visibility' | transloco }}</h3>\n <div class=\"row mb-3\">\n <div class=\"col-6 col-md-3\">\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'Enterprise.Tooltip.VisibleGlobally' | transloco\"\n [label]=\"'Enterprise.Documentation.VisibleGlobally' | transloco\"\n name=\"visible_globally\" controlId=\"enterprise-communications-visible_globally\" [useAriaLabelledbyOnly]=\"true\">\n <ui-switch class=\"d-block\"\n [attr.aria-labelledby]=\"'enterprise-communications-visible_globally-label'\"\n formControlName=\"visible_globally\"\n (change)=\"onChange($event, 'visible_globally')\"\n name=\"visible_globally\">\n </ui-switch>\n </pw-input-container>\n </div>\n <div class=\"col-6 col-md-3\">\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'Enterprise.Tooltip.Published' | transloco\"\n [label]=\"'Enterprise.Documentation.Published' | transloco\"\n name=\"published\" controlId=\"enterprise-communications-published\" [useAriaLabelledbyOnly]=\"true\">\n <ui-switch class=\"d-block\"\n [attr.aria-labelledby]=\"'enterprise-communications-published-label'\"\n formControlName=\"published\"\n (change)=\"onChange($event, 'published')\"\n name=\"published\">\n </ui-switch>\n </pw-input-container>\n </div>\n <div class=\"col-6 col-md-3\">\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'Enterprise.Tooltip.Pushed' | transloco\"\n [label]=\"'Enterprise.Documentation.Pushed' | transloco\"\n name=\"pushed\" controlId=\"enterprise-communications-pushed\" [useAriaLabelledbyOnly]=\"true\">\n <ui-switch class=\"d-block\"\n [attr.aria-labelledby]=\"'enterprise-communications-pushed-label'\"\n formControlName=\"pushed\"\n (change)=\"onChange($event, 'pushed')\"\n name=\"pushed\">\n </ui-switch>\n </pw-input-container>\n </div>\n </div>\n\n <h3>{{ 'Enterprise.Documentation.Section.Attachments' | transloco }}</h3>\n <div class=\"row mb-3\">\n <div class=\"col-12 col-md-6\">\n <div class=\"mb-3\">\n <span id=\"enterprise-communications-file-label\" class=\"pw-label-style\">Upload Communication File</span>\n <p-fileUpload #forms\n [attr.aria-labelledby]=\"'enterprise-communications-file-label'\"\n name=\"myfile[]\"\n [customUpload]=\"true\"\n [showUploadButton]=\"false\"\n accept=\"\"\n [disabled]=\"uploadedFiles && uploadedFiles.length > 0\"\n (onSelect)=\"onSelect($event)\"\n (onRemove)=\"onRemove($event)\"\n (onError)=\"onUploadError($event)\">\n <ng-template pTemplate=\"content\">\n @if (!uploadedFiles?.length) {\n <div class=\"drag-drop-text\">\n <p>You can drag and drop your file here</p>\n </div>\n }\n </ng-template>\n </p-fileUpload>\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12 text-end mt-3\">\n <button type=\"button\"\n class=\"btn btn-outline-default me-2\"\n (click)=\"onCancel()\"\n (keydown.enter)=\"onCancel()\" >\n {{ 'Button.Cancel' | transloco }}\n </button>\n <button type=\"submit\"\n [buttonBusy]=\"buttonBusy\"\n class=\"btn btn-primary\" [disabled]=\"invalidFile\">\n {{ 'Button.Submit' | transloco }}\n </button>\n </div>\n </div>\n </form>\n @if (filesData?.length) {\n <div\n class=\"mt-5\">\n <h2>Communications files attached to this communication</h2>\n @for (files of filesData; track files; let i = $index) {\n <div class=\"communication-files\"\n >\n <p>\n <a target=\"blank\"\n href=\"{{ files.name.url }}\">{{\n files.name.url.split('?')[0].split('/')[\n files.name.url.split('?')[0].split('/').length - 1\n ]\n }}</a>\n </p>\n <p ngbTooltip=\"Delete\"\n class=\"ms-3\">\n <i\n class=\"fa fa-trash delete-icon\"\n (keydown.enter)=\"deleteCommunicationFiles(files.id, i)\"\n (keydown.space)=\"deleteCommunicationFiles(files.id, i)\"\n (click)=\"deleteCommunicationFiles(files.id, i)\"\n aria-hidden=\"true\"\n ></i>\n </p>\n </div>\n }\n </div>\n }\n </div>\n </div>\n }\n @if (!isEdit) {\n <div class=\"row\">\n <div class=\"col-12 text-end mb-3\">\n <button class=\"btn btn-sm btn-outline-primary\"\n (click)=\"showEditForm()\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> {{ 'Add Communication' }}\n </button>\n </div>\n </div>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n <div class=\"primeng-datatable-container actions-collapsed mt-0 table-responsive\"\n [class.hideTable]=\"totalRecordsUnFiltered === 0\">\n <p-table #dt\n [value]=\"allCommunication\"\n [paginator]=\"totalRecords !== 0\"\n [lazy]=\"true\"\n [rows]=\"PAGE_SIZE\"\n [totalRecords]=\"totalRecords\"\n [loading]=\"loading\"\n (onLazyLoad)=\"onLazyLoad($event)\">\n <ng-template pTemplate=\"caption\">\n <div class=\"search-contact\">\n <div class=\"col-12 col-md-3 mb-2 mb-md-0 filter-domain-list\">\n <p-select\n [options]=\"allCommunicationGroups\"\n optionLabel=\"name\"\n optionValue=\"id\"\n [(ngModel)]=\"groupId\"\n [placeholder]=\"'Enterprise.Documentation.Placeholder.FilterTeam' | transloco\"\n [appendTo]=\"'body'\"\n (onChange)=\"filterDomainsList()\">\n </p-select>\n </div>\n <div class=\"text-end\">\n <label for=\"enterprise-communications-search\" class=\"visually-hidden\">Search Communications</label>\n <p-iconfield iconPosition=\"left\">\n <p-inputicon><i class=\"fa fa-search\" aria-hidden=\"true\"></i></p-inputicon>\n <input type=\"text\"\n id=\"enterprise-communications-search\"\n name=\"enterprise-communications-search\"\n [(ngModel)]=\"searchText\"\n pInputText\n [placeholder]=\"'Enterprise.Documentation.Placeholder.Search' | transloco\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\" />\n </p-iconfield>\n </div>\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\">{{ 'Enterprise.Documentation.Title' | transloco }}</th>\n <th scope=\"true\">{{ 'Enterprise.Documentation.Sender' | transloco }}</th>\n <th scope=\"true\">{{ 'Enterprise.Documentation.Team' | transloco }}</th>\n <th scope=\"true\">{{ 'Enterprise.Documentation.Files' | transloco }}</th>\n <th scope=\"true\">{{ 'Enterprise.Documentation.Date' | transloco }}</th>\n <th scope=\"true\">{{ 'Enterprise.Documentation.Status' | transloco }}</th>\n <th scope=\"true\"\n class=\"actions-column actions-list-three\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-item>\n <tr class=\"table-row\">\n <td data-head=\"Title\">\n <a [routerLink]=\"[item.id]\">{{ item.title }}</a>\n </td>\n <td data-head=\"Sender\">{{ item.author | ifNameNullShowEmail }}</td>\n <td data-head=\"Team\">{{ item.group?.name }}</td>\n <td data-head=\"Files\">\n @for (files of item.group_communication_files; track files) {\n <span>\n <a target=\"blank\"\n [href]=\"files.name.url\">{{\n files.name.url.split('?')[0].split('/')[\n files.name.url.split('?')[0].split('/').length - 1\n ]\n }}</a>\n </span>\n }\n </td>\n <td data-head=\"Date\">{{ item.created_at | dateFormat: 'datetime' }}</td>\n <td data-head=\"Status\">\n @if (item.visible_globally) {\n <span\n class=\"badge bg-warning ms-2\">{{\n 'Enterprise.Documentation.Global' | transloco\n }}</span>\n }@if (item.published) {\n <span\n class=\"badge bg-info ms-2\">{{\n 'Enterprise.Documentation.Published' | transloco\n }}</span>\n }@if (item.pushed) {\n <span\n class=\"badge bg-success ms-2\">{{\n 'Enterprise.Documentation.Pushed' | transloco\n }}</span>\n }\n </td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline list-action\">\n <li ngbTooltip=\"Edit\"\n class=\"me-2 me-sm-3\">\n <i\n class=\"fa fa-edit edit-icon\"\n (click)=\"getCommunicationDetails(item.id)\"\n (keydown.enter)=\"getCommunicationDetails(item.id)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n <li ngbTooltip=\"Delete\"\n class=\"me-2 me-sm-3\">\n <i\n class=\"fa fa-trash delete-icon\"\n (keydown.enter)=\"onDelete(item.id)\"\n (click)=\"onDelete(item.id)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n <li ngbTooltip=\"See Communication\"\n class=\"me-2 me-sm-3 see-icon\"\n [routerLink]=\"[item.id]\">\n <i class=\"fa fa-eye eye-icon\" aria-hidden=\"true\"></i>\n </li>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n @if (totalRecords === 0 && totalRecordsUnFiltered !== 0 && !groupId) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n </div>\n }\n @if (totalRecords !== 0) {\n <pw-records-summary [showing]=\"dt?.value?.length ?? 0\" [total]=\"totalRecords\" />\n }\n </div>\n @if (totalRecordsUnFiltered === 0 && isLoaded) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Enterprise.Communication.NoCommunication' | transloco\">\n </pw-no-data>\n </div>\n }\n }\n", styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}:host form>h3{display:block;border-top:1px solid #e2e5ea;margin-top:2rem;padding-top:1.25rem}:host form>h3:first-child{border-top:0;margin-top:.5rem;padding-top:0}.table-row{vertical-align:top}.communication-files{display:flex!important}.search-contact{display:flex;justify-content:space-between}@media(min-width:320px)and (max-width:720px){.search-contact{display:block}}.eye-icon{color:var(--first);font-size:18px;padding-left:3px;padding-right:3px}.title{display:flex}a.previous i{top:0}.drag-drop-text{padding:20px;border:2px dashed #ccc;text-align:center;color:#aaa;margin-top:10px}::ng-deep .file-upload-support-details .p-fileupload .p-fileupload-content{padding:1rem}::ng-deep .file-upload-support-details .p-fileupload-content .p-fileupload-files .p-fileupload-row>:first-child{display:flex}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$1.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: i4.IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["hostName", "iconPosition", "styleClass"] }, { kind: "component", type: i5.InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["hostName", "styleClass"] }, { kind: "directive", type: i6.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i7.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i9$1.UiSwitchComponent, selector: "ui-switch", inputs: ["size", "color", "switchOffColor", "switchColor", "defaultBgColor", "defaultBoColor", "checkedLabel", "uncheckedLabel", "checkedTextColor", "uncheckedTextColor", "beforeChange", "ariaLabel", "checked", "disabled", "reverse", "loading"], outputs: ["change", "changeEvent", "valueChange"] }, { kind: "component", type: i10.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", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: i11.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: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i9.ButtonBusyDirective, selector: "[buttonBusy]", inputs: ["buttonBusy", "busyText"] }, { kind: "component", type: i13.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: "component", type: i12.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i15.InputContainerComponent, selector: "pw-input-container", inputs: ["name", "controlId", "useAriaLabelledbyOnly", "label", "labelClass", "tooltipPosition", "required", "errorMsg", "isReadOnly", "showTooltip", "tooltipText", "showTriangle", "afterLabel", "showAfterLabel", "showTriangleText", "isLeftTooltip"] }, { kind: "component", type: i15.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "component", type: i15.RecordsSummaryComponent, selector: "pw-records-summary", inputs: ["showing", "total"] }, { kind: "directive", type: i16.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i17.QuillEditorComponent, selector: "quill-editor" }, { kind: "pipe", type: i18.TranslocoPipe, name: "transloco" }, { kind: "pipe", type: i19.DateFormatPipe, name: "dateFormat" }, { kind: "pipe", type: i19.IfNameNullShowEmailPipe, name: "ifNameNullShowEmail" }] }); }
|
|
446
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: EnterpriseCommunicationsComponent, isStandalone: false, selector: "pw-enterprise-communications", usesInheritance: true, ngImport: i0, template: "<section>\n <div class=\"row\">\n <div class=\"col-12\" [ngClass]=\"{'mb-3': !isEdit}\">\n <div class=\"title\">\n @if (isEdit) {\n <a\n aria-label=\"Navigate to Target\"\n (click)=\"onCancel()\"\n (keydown.enter)=\"onCancel()\"\n class=\"previous\"><i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n }\n @if (isEdit) {\n <h3 class=\"m-subheader__title m-subheader__title--separator mt-1\">\n <span>{{ !isAdd ? 'Edit' : 'Create new' }} Communication</span>\n </h3>\n }\n @if (!isEdit) {\n <h2 [ngClass]=\"{ 'mt-2': isEdit }\">Communications @if (groupId) {\n <span>for {{ groupName }}</span>\n }</h2>\n }\n </div>\n @if (!isEdit) {\n <p>\n Here you can send communications to your organization, based on the teams they are\n part of.\n </p>\n }\n </div>\n </div>\n </section>\n @if (!isLoaded && isEdit) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (isEdit && isLoaded) {\n <div class=\"container-fluid pw-tab overflow-hidden\">\n <div class=\"p-2 mt-1\">\n <form [formGroup]=\"form\"\n (ngSubmit)=\"onSave()\">\n <h3>{{ 'Enterprise.Documentation.Section.Content' | transloco }}</h3>\n <div class=\"row mb-3\">\n <div class=\"col-12\">\n <pw-input-container [label]=\"'Enterprise.Documentation.Title' | transloco\"\n [errorMsg]=\"'Enterprise.Documentation.Validation.Title' | transloco\"\n name=\"title\" controlId=\"enterprise-communications-title\">\n <input type=\"text\"\n id=\"enterprise-communications-title\"\n class=\"form-control\"\n formControlName=\"title\"\n [placeholder]=\"'Enterprise.Documentation.Placeholder.Title' | transloco\"\n [ngClass]=\"{ 'is-invalid': submitted && f['title'].errors }\" />\n </pw-input-container>\n </div>\n <pw-input-container [label]=\"'Enterprise.Documentation.Body' | transloco\"\n class=\"col-12\"\n name=\"body\" controlId=\"enterprise-communications-body\" [useAriaLabelledbyOnly]=\"true\"\n [errorMsg]=\"'Enterprise.Documentation.Validation.Body' | transloco\">\n <quill-editor [styles]=\"{ height: '220px' }\"\n [attr.aria-labelledby]=\"'enterprise-communications-body-label'\"\n [placeholder]=\"'Enterprise.Documentation.Placeholder.Body' | transloco\"\n class=\"quillEditor quill-container\" [modules]=\"editorConfig\"\n formControlName=\"body\"\n [ngClass]=\"{ 'is-invalid': submitted && f['body'].errors }\">\n </quill-editor>\n </pw-input-container>\n <div class=\"col-12 col-md-4\">\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'Enterprise.Tooltip.Group' | transloco\"\n [label]=\"'Enterprise.Documentation.Team' | transloco\"\n [isLeftTooltip]=\"true\"\n name=\"group_id\" controlId=\"enterprise-communications-group_id\" [useAriaLabelledbyOnly]=\"true\"\n [errorMsg]=\"'Enterprise.Documentation.Validation.Team' | transloco\">\n <p-select\n [attr.aria-labelledby]=\"'enterprise-communications-group_id-label'\"\n [options]=\"allGroups\"\n formControlName=\"group_id\"\n [placeholder]=\"'Enterprise.Documentation.Placeholder.Team' | transloco\"\n [ngClass]=\"{ 'is-invalid': submitted && f['group_id'].errors }\"\n optionValue=\"id\"\n optionLabel=\"name\">\n </p-select>\n </pw-input-container>\n </div>\n </div>\n\n <h3>{{ 'Enterprise.Documentation.Section.Visibility' | transloco }}</h3>\n <div class=\"row mb-3\">\n <div class=\"col-6 col-md-3\">\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'Enterprise.Tooltip.VisibleGlobally' | transloco\"\n [label]=\"'Enterprise.Documentation.VisibleGlobally' | transloco\"\n name=\"visible_globally\" controlId=\"enterprise-communications-visible_globally\" [useAriaLabelledbyOnly]=\"true\">\n <ui-switch class=\"d-block\"\n [attr.aria-labelledby]=\"'enterprise-communications-visible_globally-label'\"\n formControlName=\"visible_globally\"\n (change)=\"onChange($event, 'visible_globally')\"\n name=\"visible_globally\">\n </ui-switch>\n </pw-input-container>\n </div>\n <div class=\"col-6 col-md-3\">\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'Enterprise.Tooltip.Published' | transloco\"\n [label]=\"'Enterprise.Documentation.Published' | transloco\"\n name=\"published\" controlId=\"enterprise-communications-published\" [useAriaLabelledbyOnly]=\"true\">\n <ui-switch class=\"d-block\"\n [attr.aria-labelledby]=\"'enterprise-communications-published-label'\"\n formControlName=\"published\"\n (change)=\"onChange($event, 'published')\"\n name=\"published\">\n </ui-switch>\n </pw-input-container>\n </div>\n <div class=\"col-6 col-md-3\">\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'Enterprise.Tooltip.Pushed' | transloco\"\n [label]=\"'Enterprise.Documentation.Pushed' | transloco\"\n name=\"pushed\" controlId=\"enterprise-communications-pushed\" [useAriaLabelledbyOnly]=\"true\">\n <ui-switch class=\"d-block\"\n [attr.aria-labelledby]=\"'enterprise-communications-pushed-label'\"\n formControlName=\"pushed\"\n (change)=\"onChange($event, 'pushed')\"\n name=\"pushed\">\n </ui-switch>\n </pw-input-container>\n </div>\n </div>\n\n <h3>{{ 'Enterprise.Documentation.Section.Attachments' | transloco }}</h3>\n <div class=\"row mb-3\">\n <div class=\"col-12 col-md-6\">\n <div class=\"mb-3\">\n <span id=\"enterprise-communications-file-label\" class=\"pw-label-style\">Upload Communication File</span>\n <p-fileUpload #forms\n [attr.aria-labelledby]=\"'enterprise-communications-file-label'\"\n name=\"myfile[]\"\n [customUpload]=\"true\"\n [showUploadButton]=\"false\"\n accept=\"\"\n [disabled]=\"uploadedFiles && uploadedFiles.length > 0\"\n (onSelect)=\"onSelect($event)\"\n (onRemove)=\"onRemove($event)\"\n (onError)=\"onUploadError($event)\">\n <ng-template pTemplate=\"content\">\n @if (!uploadedFiles?.length) {\n <div class=\"drag-drop-text\">\n <p>You can drag and drop your file here</p>\n </div>\n }\n </ng-template>\n </p-fileUpload>\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12 text-end mt-3\">\n <button type=\"button\"\n class=\"btn btn-outline-default me-2\"\n (click)=\"onCancel()\"\n (keydown.enter)=\"onCancel()\" >\n {{ 'Button.Cancel' | transloco }}\n </button>\n <button type=\"submit\"\n [buttonBusy]=\"buttonBusy\"\n class=\"btn btn-primary\" [disabled]=\"invalidFile\">\n {{ 'Button.Submit' | transloco }}\n </button>\n </div>\n </div>\n </form>\n @if (filesData?.length) {\n <div\n class=\"mt-5\">\n <h2>Communications files attached to this communication</h2>\n @for (files of filesData; track files; let i = $index) {\n <div class=\"communication-files\"\n >\n <p>\n <a target=\"blank\"\n href=\"{{ files.name.url }}\">{{\n files.name.url.split('?')[0].split('/')[\n files.name.url.split('?')[0].split('/').length - 1\n ]\n }}</a>\n </p>\n <p ngbTooltip=\"Delete\"\n class=\"ms-3\">\n <i\n class=\"fa fa-trash delete-icon\"\n (keydown.enter)=\"deleteCommunicationFiles(files.id, i)\"\n (keydown.space)=\"deleteCommunicationFiles(files.id, i)\"\n (click)=\"deleteCommunicationFiles(files.id, i)\"\n aria-hidden=\"true\"\n ></i>\n </p>\n </div>\n }\n </div>\n }\n </div>\n </div>\n }\n @if (!isEdit) {\n <div class=\"row\">\n <div class=\"col-12 text-end mb-3\">\n <button class=\"btn btn-sm btn-outline-primary\"\n (click)=\"showEditForm()\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> {{ 'Add Communication' }}\n </button>\n </div>\n </div>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n <div class=\"primeng-datatable-container actions-collapsed mt-0 table-responsive\"\n [class.hideTable]=\"totalRecordsUnFiltered === 0\">\n <p-table #dt\n [value]=\"allCommunication\"\n [paginator]=\"totalRecords !== 0\"\n [lazy]=\"true\"\n [rows]=\"PAGE_SIZE\"\n [totalRecords]=\"totalRecords\"\n [loading]=\"loading\"\n (onLazyLoad)=\"onLazyLoad($event)\">\n <ng-template pTemplate=\"caption\">\n <div class=\"search-contact\">\n <div class=\"col-12 col-md-3 mb-2 mb-md-0 filter-domain-list\">\n <p-select\n [options]=\"allCommunicationGroups\"\n optionLabel=\"name\"\n optionValue=\"id\"\n [(ngModel)]=\"groupId\"\n [placeholder]=\"'Enterprise.Documentation.Placeholder.FilterTeam' | transloco\"\n [appendTo]=\"'body'\"\n (onChange)=\"filterDomainsList()\">\n </p-select>\n </div>\n <div class=\"text-end\">\n <label for=\"enterprise-communications-search\" class=\"visually-hidden\">Search Communications</label>\n <p-iconfield iconPosition=\"left\">\n <p-inputicon><i class=\"fa fa-search\" aria-hidden=\"true\"></i></p-inputicon>\n <input type=\"text\"\n id=\"enterprise-communications-search\"\n name=\"enterprise-communications-search\"\n [(ngModel)]=\"searchText\"\n pInputText\n [placeholder]=\"'Enterprise.Documentation.Placeholder.Search' | transloco\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\" />\n </p-iconfield>\n </div>\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\">{{ 'Enterprise.Documentation.Title' | transloco }}</th>\n <th scope=\"true\">{{ 'Enterprise.Documentation.Sender' | transloco }}</th>\n <th scope=\"true\">{{ 'Enterprise.Documentation.Team' | transloco }}</th>\n <th scope=\"true\">{{ 'Enterprise.Documentation.Files' | transloco }}</th>\n <th scope=\"true\">{{ 'Enterprise.Documentation.Date' | transloco }}</th>\n <th scope=\"true\">{{ 'Enterprise.Documentation.Status' | transloco }}</th>\n <th scope=\"true\"\n class=\"actions-column actions-list-three\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-item>\n <tr class=\"table-row\">\n <td data-head=\"Title\">\n <a [routerLink]=\"[item.id]\">{{ item.title }}</a>\n </td>\n <td data-head=\"Sender\">{{ item.author | ifNameNullShowEmail }}</td>\n <td data-head=\"Team\">{{ item.group?.name }}</td>\n <td data-head=\"Files\">\n @for (files of item.group_communication_files; track files) {\n <span>\n <a target=\"blank\"\n [href]=\"files.name.url\">{{\n files.name.url.split('?')[0].split('/')[\n files.name.url.split('?')[0].split('/').length - 1\n ]\n }}</a>\n </span>\n }\n </td>\n <td data-head=\"Date\">{{ item.created_at | dateFormat: 'datetime' }}</td>\n <td data-head=\"Status\">\n @if (item.visible_globally) {\n <span\n class=\"badge bg-warning ms-2\">{{\n 'Enterprise.Documentation.Global' | transloco\n }}</span>\n }@if (item.published) {\n <span\n class=\"badge bg-info ms-2\">{{\n 'Enterprise.Documentation.Published' | transloco\n }}</span>\n }@if (item.pushed) {\n <span\n class=\"badge bg-success ms-2\">{{\n 'Enterprise.Documentation.Pushed' | transloco\n }}</span>\n }\n </td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline list-action\">\n <li ngbTooltip=\"Edit\"\n class=\"me-2 me-sm-3\">\n <i\n class=\"fa fa-edit edit-icon\"\n (click)=\"getCommunicationDetails(item.id)\"\n (keydown.enter)=\"getCommunicationDetails(item.id)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n <li ngbTooltip=\"Delete\"\n class=\"me-2 me-sm-3\">\n <i\n class=\"fa fa-trash delete-icon\"\n (keydown.enter)=\"onDelete(item.id)\"\n (click)=\"onDelete(item.id)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n <li ngbTooltip=\"See Communication\"\n class=\"me-2 me-sm-3 see-icon\"\n [routerLink]=\"[item.id]\">\n <i class=\"fa fa-eye eye-icon\" aria-hidden=\"true\"></i>\n </li>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n @if (totalRecords === 0 && totalRecordsUnFiltered !== 0 && !groupId) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n </div>\n }\n @if (totalRecords !== 0) {\n <pw-records-summary [showing]=\"dt?.value?.length ?? 0\" [total]=\"totalRecords\" />\n }\n </div>\n @if (totalRecordsUnFiltered === 0 && isLoaded) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Enterprise.Communication.NoCommunication' | transloco\">\n </pw-no-data>\n </div>\n }\n }\n", styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}:host form>h3{display:block;border-top:1px solid #e2e5ea;margin-top:2rem;padding-top:1.25rem}:host form>h3:first-child{border-top:0;margin-top:.5rem;padding-top:0}.table-row{vertical-align:top}.communication-files{display:flex!important}.search-contact{display:flex;justify-content:space-between}@media(min-width:320px)and (max-width:720px){.search-contact{display:block}}.eye-icon{color:var(--first);font-size:18px;padding-left:3px;padding-right:3px}.title{display:flex}a.previous i{top:0}.drag-drop-text{padding:20px;border:2px dashed #ccc;text-align:center;color:#aaa;margin-top:10px}::ng-deep .file-upload-support-details .p-fileupload .p-fileupload-content{padding:1rem}::ng-deep .file-upload-support-details .p-fileupload-content .p-fileupload-files .p-fileupload-row>:first-child{display:flex}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$1.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: i4.IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["hostName", "iconPosition", "styleClass"] }, { kind: "component", type: i5.InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["hostName", "styleClass"] }, { kind: "directive", type: i6.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i7.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i9.UiSwitchComponent, selector: "ui-switch", inputs: ["size", "color", "switchOffColor", "switchColor", "defaultBgColor", "defaultBoColor", "checkedLabel", "uncheckedLabel", "checkedTextColor", "uncheckedTextColor", "beforeChange", "ariaLabel", "checked", "disabled", "reverse", "loading"], outputs: ["change", "changeEvent", "valueChange"] }, { kind: "component", type: i10$1.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", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: i11.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: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i10.ButtonBusyDirective, selector: "[buttonBusy]", inputs: ["buttonBusy", "busyText"] }, { kind: "component", type: i13$1.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: "component", type: i13.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i4$1.InputContainerComponent, selector: "pw-input-container", inputs: ["name", "controlId", "useAriaLabelledbyOnly", "label", "labelClass", "tooltipPosition", "required", "errorMsg", "isReadOnly", "showTooltip", "tooltipText", "showTriangle", "afterLabel", "showAfterLabel", "showTriangleText", "isLeftTooltip"] }, { kind: "component", type: i4$1.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "component", type: i4$1.RecordsSummaryComponent, selector: "pw-records-summary", inputs: ["showing", "total"] }, { kind: "directive", type: i16.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i17.QuillEditorComponent, selector: "quill-editor" }, { kind: "pipe", type: i18.TranslocoPipe, name: "transloco" }, { kind: "pipe", type: i19.DateFormatPipe, name: "dateFormat" }, { kind: "pipe", type: i19.IfNameNullShowEmailPipe, name: "ifNameNullShowEmail" }] }); }
|
|
448
447
|
}
|
|
449
448
|
__decorate([
|
|
450
449
|
ValidateForm('form'),
|
|
@@ -501,7 +500,7 @@ class EnterpriseInsightsComponent extends AppBaseComponent {
|
|
|
501
500
|
super.ngOnDestroy();
|
|
502
501
|
}
|
|
503
502
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: EnterpriseInsightsComponent, deps: [{ token: i1.SubscriptionService }, { token: i0.Injector }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
504
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: EnterpriseInsightsComponent, isStandalone: false, selector: "pw-enterprise-insights", usesInheritance: true, ngImport: i0, template: "<div class=\"row\">\n <div class=\"col-12 mb-3\">\n <h2>Enterprise Insight</h2>\n\n @if (hasAccess) {\n <p>Please find below some insight for your Enterprise subscription.</p>\n }\n </div>\n\n <app-date-picker\n [selectedDateRange]=\"selectedDateRange\"\n [dateRanges]=\"dateRanges\"\n (dateRangeChange)=\"onDateRangeSelect($event)\">\n </app-date-picker>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n\n\n @if (hasAccess) {\n <div class=\"col-12\"\n >\n @if (graph) {\n <plotly-plot [data]=\"graph?.data\"\n [config]=\"graph?.config\"\n [layout]=\"graph?.layout\" [useResizeHandler]=\"graph? true : false\"></plotly-plot>\n }\n </div>\n }\n\n @if (!hasAccess && isLoaded) {\n <div\n class=\"w-100\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Enterprise.Insight.NoDataMessage' | transloco\"> </pw-no-data>\n </div>\n }\n</div>\n", dependencies: [{ kind: "component", type: i2$1.PlotlyComponent, selector: "plotly-plot", inputs: ["data", "layout", "config", "frames", "style", "theme", "divId", "revision", "className", "debug", "useResizeHandler", "updateOnLayoutChange", "updateOnDataChange", "updateOnlyWithRevision"], outputs: ["initialized", "update", "purge", "error", "afterExport", "afterPlot", "animated", "animatingFrame", "animationInterrupted", "autoSize", "beforeExport", "beforeHover", "buttonClicked", "click", "plotlyClick", "clickAnnotation", "deselect", "doubleClick", "framework", "hover", "legendClick", "legendDoubleClick", "react", "relayout", "relayouting", "restyle", "redraw", "selected", "selecting", "sliderChange", "sliderEnd", "sliderStart", "sunburstclick", "transitioning", "transitionInterrupted", "unhover", "treemapclick", "webglcontextlost"] }, { kind: "component", type:
|
|
503
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: EnterpriseInsightsComponent, isStandalone: false, selector: "pw-enterprise-insights", usesInheritance: true, ngImport: i0, template: "<div class=\"row\">\n <div class=\"col-12 mb-3\">\n <h2>Enterprise Insight</h2>\n\n @if (hasAccess) {\n <p>Please find below some insight for your Enterprise subscription.</p>\n }\n </div>\n\n <app-date-picker\n [selectedDateRange]=\"selectedDateRange\"\n [dateRanges]=\"dateRanges\"\n (dateRangeChange)=\"onDateRangeSelect($event)\">\n </app-date-picker>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n\n\n @if (hasAccess) {\n <div class=\"col-12\"\n >\n @if (graph) {\n <plotly-plot [data]=\"graph?.data\"\n [config]=\"graph?.config\"\n [layout]=\"graph?.layout\" [useResizeHandler]=\"graph? true : false\"></plotly-plot>\n }\n </div>\n }\n\n @if (!hasAccess && isLoaded) {\n <div\n class=\"w-100\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Enterprise.Insight.NoDataMessage' | transloco\"> </pw-no-data>\n </div>\n }\n</div>\n", dependencies: [{ kind: "component", type: i2$1.PlotlyComponent, selector: "plotly-plot", inputs: ["data", "layout", "config", "frames", "style", "theme", "divId", "revision", "className", "debug", "useResizeHandler", "updateOnLayoutChange", "updateOnDataChange", "updateOnlyWithRevision"], outputs: ["initialized", "update", "purge", "error", "afterExport", "afterPlot", "animated", "animatingFrame", "animationInterrupted", "autoSize", "beforeExport", "beforeHover", "buttonClicked", "click", "plotlyClick", "clickAnnotation", "deselect", "doubleClick", "framework", "hover", "legendClick", "legendDoubleClick", "react", "relayout", "relayouting", "restyle", "redraw", "selected", "selecting", "sliderChange", "sliderEnd", "sliderStart", "sunburstclick", "transitioning", "transitionInterrupted", "unhover", "treemapclick", "webglcontextlost"] }, { kind: "component", type: i4$1.DateRangePickerComponent, selector: "app-date-picker", inputs: ["selectedDateRange", "dateRanges", "inputId"], outputs: ["dateRangeChange"] }, { kind: "component", type: i13.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i4$1.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "pipe", type: i18.TranslocoPipe, name: "transloco" }] }); }
|
|
505
504
|
}
|
|
506
505
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: EnterpriseInsightsComponent, decorators: [{
|
|
507
506
|
type: Component,
|
|
@@ -509,13 +508,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
|
|
|
509
508
|
}], ctorParameters: () => [{ type: i1.SubscriptionService }, { type: i0.Injector }, { type: i0.ChangeDetectorRef }] });
|
|
510
509
|
|
|
511
510
|
class EnterpriseMembersComponent extends AppBaseComponent {
|
|
512
|
-
constructor(injector, formBuilder, subscriptionService, authService, adminService, cdr) {
|
|
511
|
+
constructor(injector, formBuilder, subscriptionService, authService, adminService, cdr, confirmDialog) {
|
|
513
512
|
super(injector);
|
|
514
513
|
this.formBuilder = formBuilder;
|
|
515
514
|
this.subscriptionService = subscriptionService;
|
|
516
515
|
this.authService = authService;
|
|
517
516
|
this.adminService = adminService;
|
|
518
517
|
this.cdr = cdr;
|
|
518
|
+
this.confirmDialog = confirmDialog;
|
|
519
519
|
this.page = 1;
|
|
520
520
|
this.previousRolesMap = new Map();
|
|
521
521
|
this.allRoles = [];
|
|
@@ -731,15 +731,15 @@ class EnterpriseMembersComponent extends AppBaseComponent {
|
|
|
731
731
|
});
|
|
732
732
|
}
|
|
733
733
|
onSignUpMember() {
|
|
734
|
-
|
|
734
|
+
this.confirmDialog
|
|
735
|
+
.open({
|
|
735
736
|
title: this.translation.translate('Label.Confirm'),
|
|
736
737
|
text: this.translation.translate('Admin.Subscriptions.confirmEnterpriseMembersSubscriptionMessage'),
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
if (rep.value) {
|
|
738
|
+
destructive: true,
|
|
739
|
+
confirmLabel: 'Yes'
|
|
740
|
+
})
|
|
741
|
+
.then(ok => {
|
|
742
|
+
if (ok) {
|
|
743
743
|
const emails = this.form
|
|
744
744
|
.get('emailsFormArray')
|
|
745
745
|
?.value?.map(item => item.email)
|
|
@@ -776,65 +776,67 @@ class EnterpriseMembersComponent extends AppBaseComponent {
|
|
|
776
776
|
});
|
|
777
777
|
}
|
|
778
778
|
onDelete(user) {
|
|
779
|
-
|
|
779
|
+
this.confirmDialog
|
|
780
|
+
.open({
|
|
780
781
|
title: 'Remove user from subscription',
|
|
781
782
|
text: `Are you sure you want to remove ${user.first_name} from this subscription?`,
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
this.subscriptionService
|
|
788
|
-
.removeEnrolledSubscription(this.id, user.id)
|
|
789
|
-
.subscribe(response => {
|
|
790
|
-
if (response.status === StatusCodes.OK) {
|
|
791
|
-
this.toast.success(response.message);
|
|
792
|
-
this.getSubscribedUsers({
|
|
793
|
-
page: this.page,
|
|
794
|
-
page_size: PAGE_SIZE
|
|
795
|
-
});
|
|
796
|
-
}
|
|
797
|
-
else {
|
|
798
|
-
this.toast.error(response.error.message);
|
|
799
|
-
}
|
|
800
|
-
this.cdr.markForCheck();
|
|
801
|
-
});
|
|
783
|
+
destructive: true
|
|
784
|
+
})
|
|
785
|
+
.then(ok => {
|
|
786
|
+
if (!ok) {
|
|
787
|
+
return;
|
|
802
788
|
}
|
|
789
|
+
this.subscriptionService
|
|
790
|
+
.removeEnrolledSubscription(this.id, user.id)
|
|
791
|
+
.subscribe(response => {
|
|
792
|
+
if (response.status === StatusCodes.OK) {
|
|
793
|
+
this.toast.success(response.message);
|
|
794
|
+
this.getSubscribedUsers({
|
|
795
|
+
page: this.page,
|
|
796
|
+
page_size: PAGE_SIZE
|
|
797
|
+
});
|
|
798
|
+
}
|
|
799
|
+
else {
|
|
800
|
+
this.toast.error(response.error.message);
|
|
801
|
+
}
|
|
802
|
+
this.cdr.markForCheck();
|
|
803
|
+
});
|
|
803
804
|
});
|
|
804
805
|
}
|
|
805
806
|
makeAdmin(user, value) {
|
|
806
|
-
|
|
807
|
+
this.confirmDialog
|
|
808
|
+
.open({
|
|
807
809
|
title: value === true ? 'Make Admin' : 'Remove Admin',
|
|
808
810
|
text: value === true
|
|
809
|
-
?
|
|
810
|
-
:
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
const data = {
|
|
817
|
-
user_id: user.id,
|
|
818
|
-
is_admin: value
|
|
819
|
-
};
|
|
820
|
-
this.subscriptionService.toggleAdmin(this.id, data).subscribe(response => {
|
|
821
|
-
if (response.status === StatusCodes.OK) {
|
|
822
|
-
this.toast.success(response.message);
|
|
823
|
-
}
|
|
824
|
-
this.getSubscribedUsers({
|
|
825
|
-
page: this.page,
|
|
826
|
-
page_size: PAGE_SIZE
|
|
827
|
-
});
|
|
828
|
-
this.cdr.markForCheck();
|
|
829
|
-
});
|
|
811
|
+
? 'This user will now have full access to your subscription. Read more in FAQ.'
|
|
812
|
+
: 'Are you sure?',
|
|
813
|
+
destructive: true
|
|
814
|
+
})
|
|
815
|
+
.then(ok => {
|
|
816
|
+
if (!ok) {
|
|
817
|
+
return;
|
|
830
818
|
}
|
|
819
|
+
const data = {
|
|
820
|
+
user_id: user.id,
|
|
821
|
+
is_admin: value
|
|
822
|
+
};
|
|
823
|
+
this.subscriptionService.toggleAdmin(this.id, data).subscribe(response => {
|
|
824
|
+
if (response.status === StatusCodes.OK) {
|
|
825
|
+
this.toast.success(response.message);
|
|
826
|
+
}
|
|
827
|
+
this.getSubscribedUsers({
|
|
828
|
+
page: this.page,
|
|
829
|
+
page_size: PAGE_SIZE
|
|
830
|
+
});
|
|
831
|
+
this.cdr.markForCheck();
|
|
832
|
+
});
|
|
831
833
|
});
|
|
832
834
|
}
|
|
833
835
|
ngOnDestroy() {
|
|
834
836
|
super.ngOnDestroy();
|
|
835
837
|
}
|
|
836
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: EnterpriseMembersComponent, deps: [{ token: i0.Injector }, { token: i1$1.UntypedFormBuilder }, { token: i1.SubscriptionService }, { token: i1.AuthService }, { token: i3$2.AdminService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
837
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: EnterpriseMembersComponent, isStandalone: false, selector: "pw-enterprise-members", usesInheritance: true, ngImport: i0, template: "<section>\n <div class=\"row\">\n <div class=\"col-12 mb-3\">\n <div class=\"title\">\n @if (isAddEnabled) {\n <a\n aria-label=\"Navigate to Target\"\n (click)=\"back()\"\n class=\"previous\"><i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n }\n <h2>Enterprise Members for {{ productName }}</h2>\n </div>\n @if (!isAddEnabled) {\n <p>\n You'll find in this section all the members of your subscription. Based on your role\n in the enterprise, you'll be able to see, add, edit or remove access to them.\n </p>\n }\n @if (isAddEnabled) {\n <p>Here you can add members to your subscriptions</p>\n }\n </div>\n </div>\n </section>\n @if (!isAddEnabled) {\n <section id=\"enrolled\"\n >\n <div class=\"row\">\n @if (hasAccess) {\n <div class=\"col-12 text-end\"\n >\n @if (!isAddEnabled) {\n <button class=\"btn btn-sm btn-outline-primary\"\n (click)=\"isAddEnabled = true\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> Add Members\n </button>\n }\n </div>\n }\n </div>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n <div class=\"primeng-datatable-container actions-collapsed table-responsive\"\n [class.hideTable]=\"totalRecordsUnFiltered === 0\">\n <p-table #dt\n [value]=\"subscriptionMembers?.members\"\n [paginator]=\"subscriptionMembers?.members.length !== 0\"\n [totalRecords]=\"subscriptionMembers?.members.length\"\n [globalFilterFields]=\"['email', 'name']\"\n [rows]=\"PAGE_SIZE\"\n [loading]=\"loading\"\n [lazy]=\"true\"\n (onLazyLoad)=\"onLazyLoad($event)\">\n <ng-template pTemplate=\"caption\">\n <div class=\"text-end\">\n <label for=\"enterprise-members-search-contact\" class=\"visually-hidden\">Search contact</label>\n <p-iconfield iconPosition=\"left\">\n <p-inputicon><i class=\"fa fa-search\" aria-hidden=\"true\"></i></p-inputicon>\n <input type=\"text\"\n id=\"enterprise-members-search-contact\"\n name=\"enterprise-members-search-contact\"\n [(ngModel)]=\"searchText\"\n pInputText\n placeholder=\"Search contact...\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\" />\n </p-iconfield>\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\">{{ 'Label.Name' | transloco }}</th>\n <th scope=\"true\">{{ 'Label.Email' | transloco }}</th>\n <th scope=\"true\">{{ 'Enterprise.Members.Team' | transloco }}</th>\n <th scope=\"true\">{{ 'Label.Roles' | transloco }}</th>\n <th scope=\"true\">{{ 'Enterprise.Members.LastSeen' | transloco }}</th>\n <th scope=\"true\" class=\"actions-list-three\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-users>\n <tr class=\"table-row\">\n <td data-head=\"Name\">\n <span>\n <a [routerLink]=\"['/members', users.slug]\">{{\n users?.preferred_name\n ? users?.preferred_name\n : (users | ifNameNullShowEmail)\n }}\n </a>\n @if (!users?.has_password) {\n <span class=\"ms-2\"\n [pTooltip]=\"'This user hasn\\'t joined yet'\"\n tooltipPosition=\"top\">\n <i class=\"fas fa-exclamation-triangle text-warning\"></i>\n </span>\n }\n @if (users?.enable_two_factor_authenticator) {\n <span class=\"ms-2\"\n [pTooltip]=\"'2FA enabled'\"\n tooltipPosition=\"top\">\n <i class=\"fa-solid fa-lock text-success\"></i>\n </span>\n }\n @if (users?.blocked) {\n <span class=\"ms-2\"\n [pTooltip]=\"'This user has been blocked, please contact support'\"\n tooltipPosition=\"top\">\n <i class=\"fa-solid fa-hexagon-exclamation text-danger\"></i>\n </span>\n }\n @if (users.id === subscriptionOwner) {\n <span class=\"badge bg-dark mx-1\"> Owner </span>\n }\n @if (subscriptionMembers.admins.includes(users.id)) {\n <span class=\"badge bg-success mx-1 admin-badge\"> Admin </span>\n }\n @if (users.id === user.id) {\n <span class=\"badge mx-1 you-badge\"> You </span>\n }\n </span>\n </td>\n <td data-head=\"Email\">{{ users.email }}</td>\n <td data-head=\"Team\">\n @for (groups of users.user_groups; track groups) {\n <span><a class=\"badge bg-primary text-white ms-2\"\n [routerLink]=\"[\n '/' + subscription?.slug + '/enterprise',\n 'groups',\n groups.id,\n 'members'\n ]\">{{ groups.name }}</a>\n </span>\n }\n </td>\n <td data-head=\"Roles\">\n @if (hasAccess && allRoles.length) {\n <div *rbacAllow=\"'Pages.Alpha'\">\n <p-multiSelect [(ngModel)]=\"users.selected_roles\" [options]=\"allRoles\" (onChange)=\"onRoleChange($event, users)\"\n inputId=\"enterprise-members-roles-{{ users.id }}\"\n placeholder=\"Set roles\" [showHeader]=\"false\" appendTo=\"body\">\n </p-multiSelect>\n </div>\n }\n </td>\n <td data-head=\"Last seen\">\n @if (users?.current_sign_in_at) {\n <span>\n <span>{{ users.current_sign_in_at | dateFormat }}</span>\n @if (users.current_sign_in_at) {\n <span> ({{ users.current_sign_in_at | sinceAgo }})</span>\n }\n </span>\n } @else {\n <span>\n <span>{{ users.last_sign_in_at | dateFormat }}</span>\n @if (users.last_sign_in_at) {\n <span> ({{ users.last_sign_in_at | sinceAgo }})</span>\n }\n </span>\n }\n </td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline\">\n <!-- Message Icon -->\n <li ngbTooltip=\"Message\"\n class=\"me-2 me-sm-3 mx-2\"\n *rbacAllow=\"chatPermission\"\n [class.invisible]=\"user && user.id === users.id\"\n [routerLink]=\"['/message']\"\n [fragment]=\"users.slug\">\n <i class=\"fa fa-comments cta1-icon\" aria-hidden=\"true\"></i>\n </li>\n <!-- Action Buttons -->\n @if (hasAccess && users.id !== subscriptionOwner) {\n <!-- Make Admin -->\n @if (!this.subscriptionMembers.admins.includes(users.id)) {\n <li ngbTooltip=\"Make Admin\"\n class=\"me-2 me-sm-3 mx-2\"\n >\n <i\n class=\"fa fa-user-crown fa-lg success\"\n (click)=\"makeAdmin(users, true)\"\n (keydown.enter)=\"makeAdmin(users, true)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n }\n <li></li>\n <!-- Remove Admin -->\n @if (this.subscriptionMembers.admins.includes(users.id)) {\n <li ngbTooltip=\"Remove Admin\"\n class=\"me-2 me-sm-3 mx-2\"\n >\n <i\n class=\"fa fa-ban warning fa-lg\"\n (keydown.enter)=\"makeAdmin(users, false)\"\n (click)=\"makeAdmin(users, false)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n }\n } @else {\n <li class=\"mx-3\"></li>\n }\n @if (hasAccess) {\n @if (users.id !== subscriptionOwner) {\n <li class=\"delete-user mx-2\"\n ngbTooltip=\"Remove user from subscription\"\n >\n <i\n class=\"fa fa-trash delete-icon\"\n (keydown.enter)=\"onDelete(users)\"\n (keydown.space)=\"onDelete(users)\"\n (click)=\"onDelete(users)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n }\n }\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n @if (subscriptionMembers?.members.length !== 0) {\n <pw-records-summary [showing]=\"dt?.value?.length ?? 0\" [total]=\"subscriptionMembers?.members.length || 0\" />\n }\n </div>\n </section>\n}\n\n@if (isAddEnabled) {\n <section id=\"manage-members\"\n >\n <h5 class=\"ms-2 pt-3\">Upload File (CSV)</h5>\n <div class=\"row p-2\">\n <div class=\"col-12\">\n <div class=\"upload-box\">\n <div class=\"upload-box-content\">\n <div class=\"drop-container\"\n ngFileDrop\n [options]=\"options\"\n (uploadOutput)=\"onUploadOutput($event)\"\n [uploadInput]=\"uploadInput\">\n <p>\n Drag files here or\n <label class=\"upload-button\">\n <input type=\"file\"\n id=\"enterprise-members-csv-upload\"\n name=\"enterprise-members-csv-upload\"\n ngFileSelect\n [options]=\"options\"\n (uploadOutput)=\"onUploadOutput($event)\"\n [uploadInput]=\"uploadInput\"\n multiple />\n browse\n </label>\n to upload.\n </p>\n </div>\n @for (f of files; track f; let i = $index) {\n <div class=\"upload-item\"\n >\n <div class=\"upload-item-content\">\n <div class=\"filename\">\n <div class=\"filename-left\">\n <i class=\"ionicon ion-ios-copy\" aria-hidden=\"true\"></i>\n <span>{{ f.name }}</span>\n </div>\n </div>\n <div class=\"progress-content\">\n <div class=\"progress\">\n <span class=\"bar\"\n [style.width]=\"f?.progress?.data?.percentage + '%'\"\n [class.is-done]=\"f?.progress?.data?.percentage === 100\"></span>\n </div>\n </div>\n <div class=\"progress-text-content\">\n <span class=\"progress-text\"\n [class.is-done]=\"f?.progress?.data?.percentage === 100\">\n <span>{{ f.progress?.data?.percentage }}% </span>\n @if (f.progress?.data?.percentage !== 100) {\n <span>Uploading...</span>\n }\n @if (f.progress?.data?.percentage === 100) {\n <span>Done</span>\n }\n </span>\n @if (\n f.progress?.data?.percentage !== 0 &&\n f.progress?.data?.percentage !== 100\n ) {\n <span class=\"speed-and-eta-text\"\n >\n <span>{{ f.progress?.data?.speedHuman }} </span>\n <span>ETA {{ f.progress?.data?.etaHuman }}</span>\n </span>\n }\n </div>\n </div>\n </div>\n }\n <div class=\"help-text\">\n <span>Note: You can upload a .csv file containing the comma separated emails\n of the members to add.</span>\n </div>\n </div>\n </div>\n </div>\n </div>\n <h5 class=\"ms-2 pt-3 d-inline-block me-2\">Add Member's Email</h5>\n <small><strong> (Available {{ availableUnits }} Seats) </strong></small>\n <div class=\"p-2\">\n <form [formGroup]=\"form\"\n (ngSubmit)=\"onSignUpMember()\">\n @for (\n item of form.get('emailsFormArray')['controls']; track\n item; let i = $index; let last = $last) {\n <div formArrayName=\"emailsFormArray\"\n >\n <div [formGroupName]=\"i\">\n <div class=\"row mb-2\">\n <label class=\"col-12 col-md-4 text-md-end col-form-label col-form-label-sm\" [attr.for]=\"'enterprise-members-email-' + i\">\n #{{ i + 1 }}</label>\n <div class=\"col-10 col-md-4\">\n <input formControlName=\"email\"\n [id]=\"'enterprise-members-email-' + i\"\n class=\"form-control form-control-sm\"\n placeholder=\"Email\" id=\"input_email_3\" name=\"input_email_3\"/>\n </div>\n <div class=\"col-2\">\n <button class=\"btn btn-sm btn-danger\"\n type=\"button\">\n <i\n class=\"fa fa-times\"\n title=\"Delete\"\n (click)=\"removeItem(i)\"\n (keydown.enter)=\"removeItem(i)\"\n aria-hidden=\"true\"\n ></i>\n </button>\n @if (last && emailsFormArray?.controls?.length < availableUnits) {\n <i\n class=\"btn btn-sm btn-primary fal fa-plus ms-2\"\n title=\"Add More\"\n (click)=\"addItem()\"\n (keydown.enter)=\"addItem()\"\n aria-hidden=\"true\"\n ></i>\n }\n </div>\n </div>\n </div>\n </div>\n }\n <div class=\"text-center mt-2\">\n <button class=\"btn btn-sm btn-outline-default me-2\"\n (click)=\"isAddEnabled = false\">\n <i class=\"fa fa-plus-times\" aria-hidden=\"true\"></i>\n {{ 'Button.Back' | transloco }}\n </button>\n <button type=\"submit\"\n class=\"btn btn-sm btn-outline-primary me-2\"\n [buttonBusy]=\"buttonBusy\"\n [disabled]=\"form.invalid || buttonBusy\">\n Add Members\n </button>\n </div>\n </form>\n </div>\n </section>\n}\n", styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}a.previous i{top:0}.pw-tab .card{min-height:auto}td[data-head=Roles]{vertical-align:middle;min-width:200px;max-width:220px}td[data-head=Roles] p-multiselect{width:100%}.title{display:flex}.table-row{vertical-align:top}.admin-badge,.you-badge{background-color:var(--first)}td{vertical-align:middle}\n"], dependencies: [{ kind: "directive", type: i3$1.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: i4.IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["hostName", "iconPosition", "styleClass"] }, { kind: "component", type: i5.InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["hostName", "styleClass"] }, { kind: "directive", type: i6.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i7.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: i9.ButtonBusyDirective, selector: "[buttonBusy]", inputs: ["buttonBusy", "busyText"] }, { kind: "directive", type: i9.RbacAllowDirective, selector: "[rbacAllow]", inputs: ["rbacAllow"] }, { kind: "component", type: i13.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: "component", type: i11$1.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", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "component", type: i12.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i15.RecordsSummaryComponent, selector: "pw-records-summary", inputs: ["showing", "total"] }, { kind: "directive", type: i14.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "directive", type: i16.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i16$1.NgFileDropDirective, selector: "[ngFileDrop]", inputs: ["options", "uploadInput"], outputs: ["uploadOutput"] }, { kind: "directive", type: i16$1.NgFileSelectDirective, selector: "[ngFileSelect]", inputs: ["options", "uploadInput"], outputs: ["uploadOutput"] }, { kind: "pipe", type: i18.TranslocoPipe, name: "transloco" }, { kind: "pipe", type: i19.DateFormatPipe, name: "dateFormat" }, { kind: "pipe", type: i19.SinceAgoPipe, name: "sinceAgo" }, { kind: "pipe", type: i19.IfNameNullShowEmailPipe, name: "ifNameNullShowEmail" }] }); }
|
|
838
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: EnterpriseMembersComponent, deps: [{ token: i0.Injector }, { token: i1$1.UntypedFormBuilder }, { token: i1.SubscriptionService }, { token: i1.AuthService }, { token: i3$2.AdminService }, { token: i0.ChangeDetectorRef }, { token: i4$1.ConfirmDialogService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
839
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: EnterpriseMembersComponent, isStandalone: false, selector: "pw-enterprise-members", usesInheritance: true, ngImport: i0, template: "<section>\n <div class=\"row\">\n <div class=\"col-12 mb-3\">\n <div class=\"title\">\n @if (isAddEnabled) {\n <a\n aria-label=\"Navigate to Target\"\n (click)=\"back()\"\n class=\"previous\"><i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n }\n <h2>Enterprise Members for {{ productName }}</h2>\n </div>\n @if (!isAddEnabled) {\n <p>\n You'll find in this section all the members of your subscription. Based on your role\n in the enterprise, you'll be able to see, add, edit or remove access to them.\n </p>\n }\n @if (isAddEnabled) {\n <p>Here you can add members to your subscriptions</p>\n }\n </div>\n </div>\n </section>\n @if (!isAddEnabled) {\n <section id=\"enrolled\"\n >\n <div class=\"row\">\n @if (hasAccess) {\n <div class=\"col-12 text-end\"\n >\n @if (!isAddEnabled) {\n <button class=\"btn btn-sm btn-outline-primary\"\n (click)=\"isAddEnabled = true\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> Add Members\n </button>\n }\n </div>\n }\n </div>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n <div class=\"primeng-datatable-container actions-collapsed table-responsive\"\n [class.hideTable]=\"totalRecordsUnFiltered === 0\">\n <p-table #dt\n [value]=\"subscriptionMembers?.members\"\n [paginator]=\"subscriptionMembers?.members.length !== 0\"\n [totalRecords]=\"subscriptionMembers?.members.length\"\n [globalFilterFields]=\"['email', 'name']\"\n [rows]=\"PAGE_SIZE\"\n [loading]=\"loading\"\n [lazy]=\"true\"\n (onLazyLoad)=\"onLazyLoad($event)\">\n <ng-template pTemplate=\"caption\">\n <div class=\"text-end\">\n <label for=\"enterprise-members-search-contact\" class=\"visually-hidden\">Search contact</label>\n <p-iconfield iconPosition=\"left\">\n <p-inputicon><i class=\"fa fa-search\" aria-hidden=\"true\"></i></p-inputicon>\n <input type=\"text\"\n id=\"enterprise-members-search-contact\"\n name=\"enterprise-members-search-contact\"\n [(ngModel)]=\"searchText\"\n pInputText\n placeholder=\"Search contact...\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\" />\n </p-iconfield>\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\">{{ 'Label.Name' | transloco }}</th>\n <th scope=\"true\">{{ 'Label.Email' | transloco }}</th>\n <th scope=\"true\">{{ 'Enterprise.Members.Team' | transloco }}</th>\n <th scope=\"true\">{{ 'Label.Roles' | transloco }}</th>\n <th scope=\"true\">{{ 'Enterprise.Members.LastSeen' | transloco }}</th>\n <th scope=\"true\" class=\"actions-list-three\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-users>\n <tr class=\"table-row\">\n <td data-head=\"Name\">\n <span>\n <a [routerLink]=\"['/members', users.slug]\">{{\n users?.preferred_name\n ? users?.preferred_name\n : (users | ifNameNullShowEmail)\n }}\n </a>\n @if (!users?.has_password) {\n <span class=\"ms-2\"\n [pTooltip]=\"'This user hasn\\'t joined yet'\"\n tooltipPosition=\"top\">\n <i class=\"fas fa-exclamation-triangle text-warning\"></i>\n </span>\n }\n @if (users?.enable_two_factor_authenticator) {\n <span class=\"ms-2\"\n [pTooltip]=\"'2FA enabled'\"\n tooltipPosition=\"top\">\n <i class=\"fa-solid fa-lock text-success-muted\"></i>\n </span>\n }\n @if (users?.blocked) {\n <span class=\"ms-2\"\n [pTooltip]=\"'This user has been blocked, please contact support'\"\n tooltipPosition=\"top\">\n <i class=\"fa-solid fa-hexagon-exclamation text-danger\"></i>\n </span>\n }\n @if (users.id === subscriptionOwner) {\n <span class=\"badge bg-dark mx-1\"> Owner </span>\n }\n @if (subscriptionMembers.admins.includes(users.id)) {\n <span class=\"badge bg-success mx-1 admin-badge\"> Admin </span>\n }\n @if (users.id === user.id) {\n <span class=\"badge mx-1 you-badge\"> You </span>\n }\n </span>\n </td>\n <td data-head=\"Email\">{{ users.email }}</td>\n <td data-head=\"Team\">\n @for (groups of users.user_groups; track groups) {\n <span><a class=\"badge bg-primary text-white ms-2\"\n [routerLink]=\"[\n '/' + subscription?.slug + '/enterprise',\n 'groups',\n groups.id,\n 'members'\n ]\">{{ groups.name }}</a>\n </span>\n }\n </td>\n <td data-head=\"Roles\">\n @if (hasAccess && allRoles.length) {\n <div *rbacAllow=\"'Pages.Alpha'\">\n <p-multiSelect [(ngModel)]=\"users.selected_roles\" [options]=\"allRoles\" (onChange)=\"onRoleChange($event, users)\"\n inputId=\"enterprise-members-roles-{{ users.id }}\"\n placeholder=\"Set roles\" [showHeader]=\"false\" appendTo=\"body\">\n </p-multiSelect>\n </div>\n }\n </td>\n <td data-head=\"Last seen\">\n @if (users?.current_sign_in_at) {\n <span>\n <span>{{ users.current_sign_in_at | dateFormat }}</span>\n @if (users.current_sign_in_at) {\n <span> ({{ users.current_sign_in_at | sinceAgo }})</span>\n }\n </span>\n } @else {\n <span>\n <span>{{ users.last_sign_in_at | dateFormat }}</span>\n @if (users.last_sign_in_at) {\n <span> ({{ users.last_sign_in_at | sinceAgo }})</span>\n }\n </span>\n }\n </td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline\">\n <!-- Message Icon -->\n <li ngbTooltip=\"Message\"\n class=\"me-2 me-sm-3 mx-2\"\n *rbacAllow=\"chatPermission\"\n [class.invisible]=\"user && user.id === users.id\"\n [routerLink]=\"['/message']\"\n [fragment]=\"users.slug\">\n <i class=\"fa fa-comments cta1-icon\" aria-hidden=\"true\"></i>\n </li>\n <!-- Action Buttons -->\n @if (hasAccess && users.id !== subscriptionOwner) {\n <!-- Make Admin -->\n @if (!this.subscriptionMembers.admins.includes(users.id)) {\n <li ngbTooltip=\"Make Admin\"\n class=\"me-2 me-sm-3 mx-2\"\n >\n <i\n class=\"fa fa-user-crown fa-lg success\"\n (click)=\"makeAdmin(users, true)\"\n (keydown.enter)=\"makeAdmin(users, true)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n }\n <li></li>\n <!-- Remove Admin -->\n @if (this.subscriptionMembers.admins.includes(users.id)) {\n <li ngbTooltip=\"Remove Admin\"\n class=\"me-2 me-sm-3 mx-2\"\n >\n <i\n class=\"fa fa-ban warning fa-lg\"\n (keydown.enter)=\"makeAdmin(users, false)\"\n (click)=\"makeAdmin(users, false)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n }\n } @else {\n <li class=\"mx-3\"></li>\n }\n @if (hasAccess) {\n @if (users.id !== subscriptionOwner) {\n <li class=\"delete-user mx-2\"\n ngbTooltip=\"Remove user from subscription\"\n >\n <i\n class=\"fa fa-trash delete-icon\"\n (keydown.enter)=\"onDelete(users)\"\n (keydown.space)=\"onDelete(users)\"\n (click)=\"onDelete(users)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n }\n }\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n @if (subscriptionMembers?.members.length !== 0) {\n <pw-records-summary [showing]=\"dt?.value?.length ?? 0\" [total]=\"subscriptionMembers?.members.length || 0\" />\n }\n </div>\n </section>\n}\n\n@if (isAddEnabled) {\n <section id=\"manage-members\"\n >\n <h5 class=\"ms-2 pt-3\">Upload File (CSV)</h5>\n <div class=\"row p-2\">\n <div class=\"col-12\">\n <div class=\"upload-box\">\n <div class=\"upload-box-content\">\n <div class=\"drop-container\"\n ngFileDrop\n [options]=\"options\"\n (uploadOutput)=\"onUploadOutput($event)\"\n [uploadInput]=\"uploadInput\">\n <p>\n Drag files here or\n <label class=\"upload-button\">\n <input type=\"file\"\n id=\"enterprise-members-csv-upload\"\n name=\"enterprise-members-csv-upload\"\n ngFileSelect\n [options]=\"options\"\n (uploadOutput)=\"onUploadOutput($event)\"\n [uploadInput]=\"uploadInput\"\n multiple />\n browse\n </label>\n to upload.\n </p>\n </div>\n @for (f of files; track f; let i = $index) {\n <div class=\"upload-item\"\n >\n <div class=\"upload-item-content\">\n <div class=\"filename\">\n <div class=\"filename-left\">\n <i class=\"ionicon ion-ios-copy\" aria-hidden=\"true\"></i>\n <span>{{ f.name }}</span>\n </div>\n </div>\n <div class=\"progress-content\">\n <div class=\"progress\">\n <span class=\"bar\"\n [style.width]=\"f?.progress?.data?.percentage + '%'\"\n [class.is-done]=\"f?.progress?.data?.percentage === 100\"></span>\n </div>\n </div>\n <div class=\"progress-text-content\">\n <span class=\"progress-text\"\n [class.is-done]=\"f?.progress?.data?.percentage === 100\">\n <span>{{ f.progress?.data?.percentage }}% </span>\n @if (f.progress?.data?.percentage !== 100) {\n <span>Uploading...</span>\n }\n @if (f.progress?.data?.percentage === 100) {\n <span>Done</span>\n }\n </span>\n @if (\n f.progress?.data?.percentage !== 0 &&\n f.progress?.data?.percentage !== 100\n ) {\n <span class=\"speed-and-eta-text\"\n >\n <span>{{ f.progress?.data?.speedHuman }} </span>\n <span>ETA {{ f.progress?.data?.etaHuman }}</span>\n </span>\n }\n </div>\n </div>\n </div>\n }\n <div class=\"help-text\">\n <span>Note: You can upload a .csv file containing the comma separated emails\n of the members to add.</span>\n </div>\n </div>\n </div>\n </div>\n </div>\n <h5 class=\"ms-2 pt-3 d-inline-block me-2\">Add Member's Email</h5>\n <small><strong> (Available {{ availableUnits }} Seats) </strong></small>\n <div class=\"p-2\">\n <form [formGroup]=\"form\"\n (ngSubmit)=\"onSignUpMember()\">\n @for (\n item of form.get('emailsFormArray')['controls']; track\n item; let i = $index; let last = $last) {\n <div formArrayName=\"emailsFormArray\"\n >\n <div [formGroupName]=\"i\">\n <div class=\"row mb-2\">\n <label class=\"col-12 col-md-4 text-md-end col-form-label col-form-label-sm\" [attr.for]=\"'enterprise-members-email-' + i\">\n #{{ i + 1 }}</label>\n <div class=\"col-10 col-md-4\">\n <input formControlName=\"email\"\n [id]=\"'enterprise-members-email-' + i\"\n class=\"form-control form-control-sm\"\n placeholder=\"Email\" id=\"input_email_3\" name=\"input_email_3\"/>\n </div>\n <div class=\"col-2\">\n <button class=\"btn btn-sm btn-danger\"\n type=\"button\">\n <i\n class=\"fa fa-times\"\n title=\"Delete\"\n (click)=\"removeItem(i)\"\n (keydown.enter)=\"removeItem(i)\"\n aria-hidden=\"true\"\n ></i>\n </button>\n @if (last && emailsFormArray?.controls?.length < availableUnits) {\n <i\n class=\"btn btn-sm btn-primary fal fa-plus ms-2\"\n title=\"Add More\"\n (click)=\"addItem()\"\n (keydown.enter)=\"addItem()\"\n aria-hidden=\"true\"\n ></i>\n }\n </div>\n </div>\n </div>\n </div>\n }\n <div class=\"text-center mt-2\">\n <button class=\"btn btn-sm btn-outline-default me-2\"\n (click)=\"isAddEnabled = false\">\n <i class=\"fa fa-plus-times\" aria-hidden=\"true\"></i>\n {{ 'Button.Back' | transloco }}\n </button>\n <button type=\"submit\"\n class=\"btn btn-sm btn-outline-primary me-2\"\n [buttonBusy]=\"buttonBusy\"\n [disabled]=\"form.invalid || buttonBusy\">\n Add Members\n </button>\n </div>\n </form>\n </div>\n </section>\n}\n", styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}a.previous i{top:0}.pw-tab .card{min-height:auto}td[data-head=Roles]{vertical-align:middle;min-width:200px;max-width:220px}td[data-head=Roles] p-multiselect{width:100%}.title{display:flex}.table-row{vertical-align:top}.admin-badge,.you-badge{background-color:var(--first)}td{vertical-align:middle}\n"], dependencies: [{ kind: "directive", type: i3$1.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: i4.IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["hostName", "iconPosition", "styleClass"] }, { kind: "component", type: i5.InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["hostName", "styleClass"] }, { kind: "directive", type: i6.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i7.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: i10.ButtonBusyDirective, selector: "[buttonBusy]", inputs: ["buttonBusy", "busyText"] }, { kind: "directive", type: i10.RbacAllowDirective, selector: "[rbacAllow]", inputs: ["rbacAllow"] }, { kind: "component", type: i13$1.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: "component", type: i12.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", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "component", type: i13.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i4$1.RecordsSummaryComponent, selector: "pw-records-summary", inputs: ["showing", "total"] }, { kind: "directive", type: i14.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "directive", type: i16.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i16$1.NgFileDropDirective, selector: "[ngFileDrop]", inputs: ["options", "uploadInput"], outputs: ["uploadOutput"] }, { kind: "directive", type: i16$1.NgFileSelectDirective, selector: "[ngFileSelect]", inputs: ["options", "uploadInput"], outputs: ["uploadOutput"] }, { kind: "pipe", type: i18.TranslocoPipe, name: "transloco" }, { kind: "pipe", type: i19.DateFormatPipe, name: "dateFormat" }, { kind: "pipe", type: i19.SinceAgoPipe, name: "sinceAgo" }, { kind: "pipe", type: i19.IfNameNullShowEmailPipe, name: "ifNameNullShowEmail" }] }); }
|
|
838
840
|
}
|
|
839
841
|
__decorate([
|
|
840
842
|
ValidateForm('form'),
|
|
@@ -844,11 +846,11 @@ __decorate([
|
|
|
844
846
|
], EnterpriseMembersComponent.prototype, "onSignUpMember", null);
|
|
845
847
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: EnterpriseMembersComponent, decorators: [{
|
|
846
848
|
type: Component,
|
|
847
|
-
args: [{ selector: 'pw-enterprise-members', standalone: false, template: "<section>\n <div class=\"row\">\n <div class=\"col-12 mb-3\">\n <div class=\"title\">\n @if (isAddEnabled) {\n <a\n aria-label=\"Navigate to Target\"\n (click)=\"back()\"\n class=\"previous\"><i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n }\n <h2>Enterprise Members for {{ productName }}</h2>\n </div>\n @if (!isAddEnabled) {\n <p>\n You'll find in this section all the members of your subscription. Based on your role\n in the enterprise, you'll be able to see, add, edit or remove access to them.\n </p>\n }\n @if (isAddEnabled) {\n <p>Here you can add members to your subscriptions</p>\n }\n </div>\n </div>\n </section>\n @if (!isAddEnabled) {\n <section id=\"enrolled\"\n >\n <div class=\"row\">\n @if (hasAccess) {\n <div class=\"col-12 text-end\"\n >\n @if (!isAddEnabled) {\n <button class=\"btn btn-sm btn-outline-primary\"\n (click)=\"isAddEnabled = true\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> Add Members\n </button>\n }\n </div>\n }\n </div>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n <div class=\"primeng-datatable-container actions-collapsed table-responsive\"\n [class.hideTable]=\"totalRecordsUnFiltered === 0\">\n <p-table #dt\n [value]=\"subscriptionMembers?.members\"\n [paginator]=\"subscriptionMembers?.members.length !== 0\"\n [totalRecords]=\"subscriptionMembers?.members.length\"\n [globalFilterFields]=\"['email', 'name']\"\n [rows]=\"PAGE_SIZE\"\n [loading]=\"loading\"\n [lazy]=\"true\"\n (onLazyLoad)=\"onLazyLoad($event)\">\n <ng-template pTemplate=\"caption\">\n <div class=\"text-end\">\n <label for=\"enterprise-members-search-contact\" class=\"visually-hidden\">Search contact</label>\n <p-iconfield iconPosition=\"left\">\n <p-inputicon><i class=\"fa fa-search\" aria-hidden=\"true\"></i></p-inputicon>\n <input type=\"text\"\n id=\"enterprise-members-search-contact\"\n name=\"enterprise-members-search-contact\"\n [(ngModel)]=\"searchText\"\n pInputText\n placeholder=\"Search contact...\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\" />\n </p-iconfield>\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\">{{ 'Label.Name' | transloco }}</th>\n <th scope=\"true\">{{ 'Label.Email' | transloco }}</th>\n <th scope=\"true\">{{ 'Enterprise.Members.Team' | transloco }}</th>\n <th scope=\"true\">{{ 'Label.Roles' | transloco }}</th>\n <th scope=\"true\">{{ 'Enterprise.Members.LastSeen' | transloco }}</th>\n <th scope=\"true\" class=\"actions-list-three\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-users>\n <tr class=\"table-row\">\n <td data-head=\"Name\">\n <span>\n <a [routerLink]=\"['/members', users.slug]\">{{\n users?.preferred_name\n ? users?.preferred_name\n : (users | ifNameNullShowEmail)\n }}\n </a>\n @if (!users?.has_password) {\n <span class=\"ms-2\"\n [pTooltip]=\"'This user hasn\\'t joined yet'\"\n tooltipPosition=\"top\">\n <i class=\"fas fa-exclamation-triangle text-warning\"></i>\n </span>\n }\n @if (users?.enable_two_factor_authenticator) {\n <span class=\"ms-2\"\n [pTooltip]=\"'2FA enabled'\"\n tooltipPosition=\"top\">\n <i class=\"fa-solid fa-lock text-success\"></i>\n </span>\n }\n @if (users?.blocked) {\n <span class=\"ms-2\"\n [pTooltip]=\"'This user has been blocked, please contact support'\"\n tooltipPosition=\"top\">\n <i class=\"fa-solid fa-hexagon-exclamation text-danger\"></i>\n </span>\n }\n @if (users.id === subscriptionOwner) {\n <span class=\"badge bg-dark mx-1\"> Owner </span>\n }\n @if (subscriptionMembers.admins.includes(users.id)) {\n <span class=\"badge bg-success mx-1 admin-badge\"> Admin </span>\n }\n @if (users.id === user.id) {\n <span class=\"badge mx-1 you-badge\"> You </span>\n }\n </span>\n </td>\n <td data-head=\"Email\">{{ users.email }}</td>\n <td data-head=\"Team\">\n @for (groups of users.user_groups; track groups) {\n <span><a class=\"badge bg-primary text-white ms-2\"\n [routerLink]=\"[\n '/' + subscription?.slug + '/enterprise',\n 'groups',\n groups.id,\n 'members'\n ]\">{{ groups.name }}</a>\n </span>\n }\n </td>\n <td data-head=\"Roles\">\n @if (hasAccess && allRoles.length) {\n <div *rbacAllow=\"'Pages.Alpha'\">\n <p-multiSelect [(ngModel)]=\"users.selected_roles\" [options]=\"allRoles\" (onChange)=\"onRoleChange($event, users)\"\n inputId=\"enterprise-members-roles-{{ users.id }}\"\n placeholder=\"Set roles\" [showHeader]=\"false\" appendTo=\"body\">\n </p-multiSelect>\n </div>\n }\n </td>\n <td data-head=\"Last seen\">\n @if (users?.current_sign_in_at) {\n <span>\n <span>{{ users.current_sign_in_at | dateFormat }}</span>\n @if (users.current_sign_in_at) {\n <span> ({{ users.current_sign_in_at | sinceAgo }})</span>\n }\n </span>\n } @else {\n <span>\n <span>{{ users.last_sign_in_at | dateFormat }}</span>\n @if (users.last_sign_in_at) {\n <span> ({{ users.last_sign_in_at | sinceAgo }})</span>\n }\n </span>\n }\n </td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline\">\n <!-- Message Icon -->\n <li ngbTooltip=\"Message\"\n class=\"me-2 me-sm-3 mx-2\"\n *rbacAllow=\"chatPermission\"\n [class.invisible]=\"user && user.id === users.id\"\n [routerLink]=\"['/message']\"\n [fragment]=\"users.slug\">\n <i class=\"fa fa-comments cta1-icon\" aria-hidden=\"true\"></i>\n </li>\n <!-- Action Buttons -->\n @if (hasAccess && users.id !== subscriptionOwner) {\n <!-- Make Admin -->\n @if (!this.subscriptionMembers.admins.includes(users.id)) {\n <li ngbTooltip=\"Make Admin\"\n class=\"me-2 me-sm-3 mx-2\"\n >\n <i\n class=\"fa fa-user-crown fa-lg success\"\n (click)=\"makeAdmin(users, true)\"\n (keydown.enter)=\"makeAdmin(users, true)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n }\n <li></li>\n <!-- Remove Admin -->\n @if (this.subscriptionMembers.admins.includes(users.id)) {\n <li ngbTooltip=\"Remove Admin\"\n class=\"me-2 me-sm-3 mx-2\"\n >\n <i\n class=\"fa fa-ban warning fa-lg\"\n (keydown.enter)=\"makeAdmin(users, false)\"\n (click)=\"makeAdmin(users, false)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n }\n } @else {\n <li class=\"mx-3\"></li>\n }\n @if (hasAccess) {\n @if (users.id !== subscriptionOwner) {\n <li class=\"delete-user mx-2\"\n ngbTooltip=\"Remove user from subscription\"\n >\n <i\n class=\"fa fa-trash delete-icon\"\n (keydown.enter)=\"onDelete(users)\"\n (keydown.space)=\"onDelete(users)\"\n (click)=\"onDelete(users)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n }\n }\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n @if (subscriptionMembers?.members.length !== 0) {\n <pw-records-summary [showing]=\"dt?.value?.length ?? 0\" [total]=\"subscriptionMembers?.members.length || 0\" />\n }\n </div>\n </section>\n}\n\n@if (isAddEnabled) {\n <section id=\"manage-members\"\n >\n <h5 class=\"ms-2 pt-3\">Upload File (CSV)</h5>\n <div class=\"row p-2\">\n <div class=\"col-12\">\n <div class=\"upload-box\">\n <div class=\"upload-box-content\">\n <div class=\"drop-container\"\n ngFileDrop\n [options]=\"options\"\n (uploadOutput)=\"onUploadOutput($event)\"\n [uploadInput]=\"uploadInput\">\n <p>\n Drag files here or\n <label class=\"upload-button\">\n <input type=\"file\"\n id=\"enterprise-members-csv-upload\"\n name=\"enterprise-members-csv-upload\"\n ngFileSelect\n [options]=\"options\"\n (uploadOutput)=\"onUploadOutput($event)\"\n [uploadInput]=\"uploadInput\"\n multiple />\n browse\n </label>\n to upload.\n </p>\n </div>\n @for (f of files; track f; let i = $index) {\n <div class=\"upload-item\"\n >\n <div class=\"upload-item-content\">\n <div class=\"filename\">\n <div class=\"filename-left\">\n <i class=\"ionicon ion-ios-copy\" aria-hidden=\"true\"></i>\n <span>{{ f.name }}</span>\n </div>\n </div>\n <div class=\"progress-content\">\n <div class=\"progress\">\n <span class=\"bar\"\n [style.width]=\"f?.progress?.data?.percentage + '%'\"\n [class.is-done]=\"f?.progress?.data?.percentage === 100\"></span>\n </div>\n </div>\n <div class=\"progress-text-content\">\n <span class=\"progress-text\"\n [class.is-done]=\"f?.progress?.data?.percentage === 100\">\n <span>{{ f.progress?.data?.percentage }}% </span>\n @if (f.progress?.data?.percentage !== 100) {\n <span>Uploading...</span>\n }\n @if (f.progress?.data?.percentage === 100) {\n <span>Done</span>\n }\n </span>\n @if (\n f.progress?.data?.percentage !== 0 &&\n f.progress?.data?.percentage !== 100\n ) {\n <span class=\"speed-and-eta-text\"\n >\n <span>{{ f.progress?.data?.speedHuman }} </span>\n <span>ETA {{ f.progress?.data?.etaHuman }}</span>\n </span>\n }\n </div>\n </div>\n </div>\n }\n <div class=\"help-text\">\n <span>Note: You can upload a .csv file containing the comma separated emails\n of the members to add.</span>\n </div>\n </div>\n </div>\n </div>\n </div>\n <h5 class=\"ms-2 pt-3 d-inline-block me-2\">Add Member's Email</h5>\n <small><strong> (Available {{ availableUnits }} Seats) </strong></small>\n <div class=\"p-2\">\n <form [formGroup]=\"form\"\n (ngSubmit)=\"onSignUpMember()\">\n @for (\n item of form.get('emailsFormArray')['controls']; track\n item; let i = $index; let last = $last) {\n <div formArrayName=\"emailsFormArray\"\n >\n <div [formGroupName]=\"i\">\n <div class=\"row mb-2\">\n <label class=\"col-12 col-md-4 text-md-end col-form-label col-form-label-sm\" [attr.for]=\"'enterprise-members-email-' + i\">\n #{{ i + 1 }}</label>\n <div class=\"col-10 col-md-4\">\n <input formControlName=\"email\"\n [id]=\"'enterprise-members-email-' + i\"\n class=\"form-control form-control-sm\"\n placeholder=\"Email\" id=\"input_email_3\" name=\"input_email_3\"/>\n </div>\n <div class=\"col-2\">\n <button class=\"btn btn-sm btn-danger\"\n type=\"button\">\n <i\n class=\"fa fa-times\"\n title=\"Delete\"\n (click)=\"removeItem(i)\"\n (keydown.enter)=\"removeItem(i)\"\n aria-hidden=\"true\"\n ></i>\n </button>\n @if (last && emailsFormArray?.controls?.length < availableUnits) {\n <i\n class=\"btn btn-sm btn-primary fal fa-plus ms-2\"\n title=\"Add More\"\n (click)=\"addItem()\"\n (keydown.enter)=\"addItem()\"\n aria-hidden=\"true\"\n ></i>\n }\n </div>\n </div>\n </div>\n </div>\n }\n <div class=\"text-center mt-2\">\n <button class=\"btn btn-sm btn-outline-default me-2\"\n (click)=\"isAddEnabled = false\">\n <i class=\"fa fa-plus-times\" aria-hidden=\"true\"></i>\n {{ 'Button.Back' | transloco }}\n </button>\n <button type=\"submit\"\n class=\"btn btn-sm btn-outline-primary me-2\"\n [buttonBusy]=\"buttonBusy\"\n [disabled]=\"form.invalid || buttonBusy\">\n Add Members\n </button>\n </div>\n </form>\n </div>\n </section>\n}\n", styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}a.previous i{top:0}.pw-tab .card{min-height:auto}td[data-head=Roles]{vertical-align:middle;min-width:200px;max-width:220px}td[data-head=Roles] p-multiselect{width:100%}.title{display:flex}.table-row{vertical-align:top}.admin-badge,.you-badge{background-color:var(--first)}td{vertical-align:middle}\n"] }]
|
|
848
|
-
}], ctorParameters: () => [{ type: i0.Injector }, { type: i1$1.UntypedFormBuilder }, { type: i1.SubscriptionService }, { type: i1.AuthService }, { type: i3$2.AdminService }, { type: i0.ChangeDetectorRef }], propDecorators: { onSignUpMember: [] } });
|
|
849
|
+
args: [{ selector: 'pw-enterprise-members', standalone: false, template: "<section>\n <div class=\"row\">\n <div class=\"col-12 mb-3\">\n <div class=\"title\">\n @if (isAddEnabled) {\n <a\n aria-label=\"Navigate to Target\"\n (click)=\"back()\"\n class=\"previous\"><i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n }\n <h2>Enterprise Members for {{ productName }}</h2>\n </div>\n @if (!isAddEnabled) {\n <p>\n You'll find in this section all the members of your subscription. Based on your role\n in the enterprise, you'll be able to see, add, edit or remove access to them.\n </p>\n }\n @if (isAddEnabled) {\n <p>Here you can add members to your subscriptions</p>\n }\n </div>\n </div>\n </section>\n @if (!isAddEnabled) {\n <section id=\"enrolled\"\n >\n <div class=\"row\">\n @if (hasAccess) {\n <div class=\"col-12 text-end\"\n >\n @if (!isAddEnabled) {\n <button class=\"btn btn-sm btn-outline-primary\"\n (click)=\"isAddEnabled = true\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> Add Members\n </button>\n }\n </div>\n }\n </div>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n <div class=\"primeng-datatable-container actions-collapsed table-responsive\"\n [class.hideTable]=\"totalRecordsUnFiltered === 0\">\n <p-table #dt\n [value]=\"subscriptionMembers?.members\"\n [paginator]=\"subscriptionMembers?.members.length !== 0\"\n [totalRecords]=\"subscriptionMembers?.members.length\"\n [globalFilterFields]=\"['email', 'name']\"\n [rows]=\"PAGE_SIZE\"\n [loading]=\"loading\"\n [lazy]=\"true\"\n (onLazyLoad)=\"onLazyLoad($event)\">\n <ng-template pTemplate=\"caption\">\n <div class=\"text-end\">\n <label for=\"enterprise-members-search-contact\" class=\"visually-hidden\">Search contact</label>\n <p-iconfield iconPosition=\"left\">\n <p-inputicon><i class=\"fa fa-search\" aria-hidden=\"true\"></i></p-inputicon>\n <input type=\"text\"\n id=\"enterprise-members-search-contact\"\n name=\"enterprise-members-search-contact\"\n [(ngModel)]=\"searchText\"\n pInputText\n placeholder=\"Search contact...\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\" />\n </p-iconfield>\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\">{{ 'Label.Name' | transloco }}</th>\n <th scope=\"true\">{{ 'Label.Email' | transloco }}</th>\n <th scope=\"true\">{{ 'Enterprise.Members.Team' | transloco }}</th>\n <th scope=\"true\">{{ 'Label.Roles' | transloco }}</th>\n <th scope=\"true\">{{ 'Enterprise.Members.LastSeen' | transloco }}</th>\n <th scope=\"true\" class=\"actions-list-three\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-users>\n <tr class=\"table-row\">\n <td data-head=\"Name\">\n <span>\n <a [routerLink]=\"['/members', users.slug]\">{{\n users?.preferred_name\n ? users?.preferred_name\n : (users | ifNameNullShowEmail)\n }}\n </a>\n @if (!users?.has_password) {\n <span class=\"ms-2\"\n [pTooltip]=\"'This user hasn\\'t joined yet'\"\n tooltipPosition=\"top\">\n <i class=\"fas fa-exclamation-triangle text-warning\"></i>\n </span>\n }\n @if (users?.enable_two_factor_authenticator) {\n <span class=\"ms-2\"\n [pTooltip]=\"'2FA enabled'\"\n tooltipPosition=\"top\">\n <i class=\"fa-solid fa-lock text-success-muted\"></i>\n </span>\n }\n @if (users?.blocked) {\n <span class=\"ms-2\"\n [pTooltip]=\"'This user has been blocked, please contact support'\"\n tooltipPosition=\"top\">\n <i class=\"fa-solid fa-hexagon-exclamation text-danger\"></i>\n </span>\n }\n @if (users.id === subscriptionOwner) {\n <span class=\"badge bg-dark mx-1\"> Owner </span>\n }\n @if (subscriptionMembers.admins.includes(users.id)) {\n <span class=\"badge bg-success mx-1 admin-badge\"> Admin </span>\n }\n @if (users.id === user.id) {\n <span class=\"badge mx-1 you-badge\"> You </span>\n }\n </span>\n </td>\n <td data-head=\"Email\">{{ users.email }}</td>\n <td data-head=\"Team\">\n @for (groups of users.user_groups; track groups) {\n <span><a class=\"badge bg-primary text-white ms-2\"\n [routerLink]=\"[\n '/' + subscription?.slug + '/enterprise',\n 'groups',\n groups.id,\n 'members'\n ]\">{{ groups.name }}</a>\n </span>\n }\n </td>\n <td data-head=\"Roles\">\n @if (hasAccess && allRoles.length) {\n <div *rbacAllow=\"'Pages.Alpha'\">\n <p-multiSelect [(ngModel)]=\"users.selected_roles\" [options]=\"allRoles\" (onChange)=\"onRoleChange($event, users)\"\n inputId=\"enterprise-members-roles-{{ users.id }}\"\n placeholder=\"Set roles\" [showHeader]=\"false\" appendTo=\"body\">\n </p-multiSelect>\n </div>\n }\n </td>\n <td data-head=\"Last seen\">\n @if (users?.current_sign_in_at) {\n <span>\n <span>{{ users.current_sign_in_at | dateFormat }}</span>\n @if (users.current_sign_in_at) {\n <span> ({{ users.current_sign_in_at | sinceAgo }})</span>\n }\n </span>\n } @else {\n <span>\n <span>{{ users.last_sign_in_at | dateFormat }}</span>\n @if (users.last_sign_in_at) {\n <span> ({{ users.last_sign_in_at | sinceAgo }})</span>\n }\n </span>\n }\n </td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline\">\n <!-- Message Icon -->\n <li ngbTooltip=\"Message\"\n class=\"me-2 me-sm-3 mx-2\"\n *rbacAllow=\"chatPermission\"\n [class.invisible]=\"user && user.id === users.id\"\n [routerLink]=\"['/message']\"\n [fragment]=\"users.slug\">\n <i class=\"fa fa-comments cta1-icon\" aria-hidden=\"true\"></i>\n </li>\n <!-- Action Buttons -->\n @if (hasAccess && users.id !== subscriptionOwner) {\n <!-- Make Admin -->\n @if (!this.subscriptionMembers.admins.includes(users.id)) {\n <li ngbTooltip=\"Make Admin\"\n class=\"me-2 me-sm-3 mx-2\"\n >\n <i\n class=\"fa fa-user-crown fa-lg success\"\n (click)=\"makeAdmin(users, true)\"\n (keydown.enter)=\"makeAdmin(users, true)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n }\n <li></li>\n <!-- Remove Admin -->\n @if (this.subscriptionMembers.admins.includes(users.id)) {\n <li ngbTooltip=\"Remove Admin\"\n class=\"me-2 me-sm-3 mx-2\"\n >\n <i\n class=\"fa fa-ban warning fa-lg\"\n (keydown.enter)=\"makeAdmin(users, false)\"\n (click)=\"makeAdmin(users, false)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n }\n } @else {\n <li class=\"mx-3\"></li>\n }\n @if (hasAccess) {\n @if (users.id !== subscriptionOwner) {\n <li class=\"delete-user mx-2\"\n ngbTooltip=\"Remove user from subscription\"\n >\n <i\n class=\"fa fa-trash delete-icon\"\n (keydown.enter)=\"onDelete(users)\"\n (keydown.space)=\"onDelete(users)\"\n (click)=\"onDelete(users)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n }\n }\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n @if (subscriptionMembers?.members.length !== 0) {\n <pw-records-summary [showing]=\"dt?.value?.length ?? 0\" [total]=\"subscriptionMembers?.members.length || 0\" />\n }\n </div>\n </section>\n}\n\n@if (isAddEnabled) {\n <section id=\"manage-members\"\n >\n <h5 class=\"ms-2 pt-3\">Upload File (CSV)</h5>\n <div class=\"row p-2\">\n <div class=\"col-12\">\n <div class=\"upload-box\">\n <div class=\"upload-box-content\">\n <div class=\"drop-container\"\n ngFileDrop\n [options]=\"options\"\n (uploadOutput)=\"onUploadOutput($event)\"\n [uploadInput]=\"uploadInput\">\n <p>\n Drag files here or\n <label class=\"upload-button\">\n <input type=\"file\"\n id=\"enterprise-members-csv-upload\"\n name=\"enterprise-members-csv-upload\"\n ngFileSelect\n [options]=\"options\"\n (uploadOutput)=\"onUploadOutput($event)\"\n [uploadInput]=\"uploadInput\"\n multiple />\n browse\n </label>\n to upload.\n </p>\n </div>\n @for (f of files; track f; let i = $index) {\n <div class=\"upload-item\"\n >\n <div class=\"upload-item-content\">\n <div class=\"filename\">\n <div class=\"filename-left\">\n <i class=\"ionicon ion-ios-copy\" aria-hidden=\"true\"></i>\n <span>{{ f.name }}</span>\n </div>\n </div>\n <div class=\"progress-content\">\n <div class=\"progress\">\n <span class=\"bar\"\n [style.width]=\"f?.progress?.data?.percentage + '%'\"\n [class.is-done]=\"f?.progress?.data?.percentage === 100\"></span>\n </div>\n </div>\n <div class=\"progress-text-content\">\n <span class=\"progress-text\"\n [class.is-done]=\"f?.progress?.data?.percentage === 100\">\n <span>{{ f.progress?.data?.percentage }}% </span>\n @if (f.progress?.data?.percentage !== 100) {\n <span>Uploading...</span>\n }\n @if (f.progress?.data?.percentage === 100) {\n <span>Done</span>\n }\n </span>\n @if (\n f.progress?.data?.percentage !== 0 &&\n f.progress?.data?.percentage !== 100\n ) {\n <span class=\"speed-and-eta-text\"\n >\n <span>{{ f.progress?.data?.speedHuman }} </span>\n <span>ETA {{ f.progress?.data?.etaHuman }}</span>\n </span>\n }\n </div>\n </div>\n </div>\n }\n <div class=\"help-text\">\n <span>Note: You can upload a .csv file containing the comma separated emails\n of the members to add.</span>\n </div>\n </div>\n </div>\n </div>\n </div>\n <h5 class=\"ms-2 pt-3 d-inline-block me-2\">Add Member's Email</h5>\n <small><strong> (Available {{ availableUnits }} Seats) </strong></small>\n <div class=\"p-2\">\n <form [formGroup]=\"form\"\n (ngSubmit)=\"onSignUpMember()\">\n @for (\n item of form.get('emailsFormArray')['controls']; track\n item; let i = $index; let last = $last) {\n <div formArrayName=\"emailsFormArray\"\n >\n <div [formGroupName]=\"i\">\n <div class=\"row mb-2\">\n <label class=\"col-12 col-md-4 text-md-end col-form-label col-form-label-sm\" [attr.for]=\"'enterprise-members-email-' + i\">\n #{{ i + 1 }}</label>\n <div class=\"col-10 col-md-4\">\n <input formControlName=\"email\"\n [id]=\"'enterprise-members-email-' + i\"\n class=\"form-control form-control-sm\"\n placeholder=\"Email\" id=\"input_email_3\" name=\"input_email_3\"/>\n </div>\n <div class=\"col-2\">\n <button class=\"btn btn-sm btn-danger\"\n type=\"button\">\n <i\n class=\"fa fa-times\"\n title=\"Delete\"\n (click)=\"removeItem(i)\"\n (keydown.enter)=\"removeItem(i)\"\n aria-hidden=\"true\"\n ></i>\n </button>\n @if (last && emailsFormArray?.controls?.length < availableUnits) {\n <i\n class=\"btn btn-sm btn-primary fal fa-plus ms-2\"\n title=\"Add More\"\n (click)=\"addItem()\"\n (keydown.enter)=\"addItem()\"\n aria-hidden=\"true\"\n ></i>\n }\n </div>\n </div>\n </div>\n </div>\n }\n <div class=\"text-center mt-2\">\n <button class=\"btn btn-sm btn-outline-default me-2\"\n (click)=\"isAddEnabled = false\">\n <i class=\"fa fa-plus-times\" aria-hidden=\"true\"></i>\n {{ 'Button.Back' | transloco }}\n </button>\n <button type=\"submit\"\n class=\"btn btn-sm btn-outline-primary me-2\"\n [buttonBusy]=\"buttonBusy\"\n [disabled]=\"form.invalid || buttonBusy\">\n Add Members\n </button>\n </div>\n </form>\n </div>\n </section>\n}\n", styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}a.previous i{top:0}.pw-tab .card{min-height:auto}td[data-head=Roles]{vertical-align:middle;min-width:200px;max-width:220px}td[data-head=Roles] p-multiselect{width:100%}.title{display:flex}.table-row{vertical-align:top}.admin-badge,.you-badge{background-color:var(--first)}td{vertical-align:middle}\n"] }]
|
|
850
|
+
}], ctorParameters: () => [{ type: i0.Injector }, { type: i1$1.UntypedFormBuilder }, { type: i1.SubscriptionService }, { type: i1.AuthService }, { type: i3$2.AdminService }, { type: i0.ChangeDetectorRef }, { type: i4$1.ConfirmDialogService }], propDecorators: { onSignUpMember: [] } });
|
|
849
851
|
|
|
850
852
|
class EnterprisePartnersComponent extends AppBaseComponent {
|
|
851
|
-
constructor(injector, formBuilder, subscriptionService, authService, adminService, productService, cdr) {
|
|
853
|
+
constructor(injector, formBuilder, subscriptionService, authService, adminService, productService, cdr, confirmDialog) {
|
|
852
854
|
super(injector);
|
|
853
855
|
this.formBuilder = formBuilder;
|
|
854
856
|
this.subscriptionService = subscriptionService;
|
|
@@ -856,6 +858,7 @@ class EnterprisePartnersComponent extends AppBaseComponent {
|
|
|
856
858
|
this.adminService = adminService;
|
|
857
859
|
this.productService = productService;
|
|
858
860
|
this.cdr = cdr;
|
|
861
|
+
this.confirmDialog = confirmDialog;
|
|
859
862
|
this.page = 1;
|
|
860
863
|
this.filteredProducts = [];
|
|
861
864
|
this.searchOptions = [];
|
|
@@ -992,59 +995,55 @@ class EnterprisePartnersComponent extends AppBaseComponent {
|
|
|
992
995
|
}
|
|
993
996
|
}
|
|
994
997
|
onDelete(partner) {
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
showCancelButton: true,
|
|
999
|
-
reverseButtons: true,
|
|
1000
|
-
icon: 'warning'
|
|
1001
|
-
}).then(rep => {
|
|
1002
|
-
if (rep.value) {
|
|
1003
|
-
this.subscriptionService.removePartner(this.id, partner.id).subscribe(response => {
|
|
1004
|
-
if (response.status === StatusCodes.OK) {
|
|
1005
|
-
this.toast.success(response.message);
|
|
1006
|
-
this.getSubscribedPartners({
|
|
1007
|
-
page: this.page,
|
|
1008
|
-
page_size: PAGE_SIZE
|
|
1009
|
-
});
|
|
1010
|
-
}
|
|
1011
|
-
else {
|
|
1012
|
-
this.toast.success(response.error.message);
|
|
1013
|
-
}
|
|
1014
|
-
this.cdr.markForCheck();
|
|
1015
|
-
});
|
|
998
|
+
this.confirmDialog.confirmDelete().then(ok => {
|
|
999
|
+
if (!ok) {
|
|
1000
|
+
return;
|
|
1016
1001
|
}
|
|
1002
|
+
this.subscriptionService.removePartner(this.id, partner.id).subscribe(response => {
|
|
1003
|
+
if (response.status === StatusCodes.OK) {
|
|
1004
|
+
this.toast.success(response.message);
|
|
1005
|
+
this.getSubscribedPartners({
|
|
1006
|
+
page: this.page,
|
|
1007
|
+
page_size: PAGE_SIZE
|
|
1008
|
+
});
|
|
1009
|
+
}
|
|
1010
|
+
else {
|
|
1011
|
+
this.toast.success(response.error.message);
|
|
1012
|
+
}
|
|
1013
|
+
this.cdr.markForCheck();
|
|
1014
|
+
});
|
|
1017
1015
|
});
|
|
1018
1016
|
}
|
|
1019
1017
|
onDeactivate(partner) {
|
|
1020
|
-
|
|
1018
|
+
this.confirmDialog
|
|
1019
|
+
.open({
|
|
1021
1020
|
title: partner.is_active ? 'Deactivate' : 'Activate',
|
|
1022
1021
|
text: partner.is_active
|
|
1023
|
-
?
|
|
1022
|
+
? 'Are you sure you want to deactivate this partner?'
|
|
1024
1023
|
: 'Are you sure you want to activate this partner?',
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
const data = {
|
|
1031
|
-
subscription_partner_id: partner.id,
|
|
1032
|
-
is_active: !partner.is_active
|
|
1033
|
-
};
|
|
1034
|
-
this.subscriptionService.deactivatePartner(this.id, data).subscribe(response => {
|
|
1035
|
-
if (response.status === StatusCodes.OK) {
|
|
1036
|
-
this.toast.success(response.message);
|
|
1037
|
-
this.getSubscribedPartners({
|
|
1038
|
-
page: this.page,
|
|
1039
|
-
page_size: PAGE_SIZE
|
|
1040
|
-
});
|
|
1041
|
-
}
|
|
1042
|
-
else {
|
|
1043
|
-
this.toast.success(response.error.message);
|
|
1044
|
-
}
|
|
1045
|
-
this.cdr.markForCheck();
|
|
1046
|
-
});
|
|
1024
|
+
destructive: true
|
|
1025
|
+
})
|
|
1026
|
+
.then(ok => {
|
|
1027
|
+
if (!ok) {
|
|
1028
|
+
return;
|
|
1047
1029
|
}
|
|
1030
|
+
const data = {
|
|
1031
|
+
subscription_partner_id: partner.id,
|
|
1032
|
+
is_active: !partner.is_active
|
|
1033
|
+
};
|
|
1034
|
+
this.subscriptionService.deactivatePartner(this.id, data).subscribe(response => {
|
|
1035
|
+
if (response.status === StatusCodes.OK) {
|
|
1036
|
+
this.toast.success(response.message);
|
|
1037
|
+
this.getSubscribedPartners({
|
|
1038
|
+
page: this.page,
|
|
1039
|
+
page_size: PAGE_SIZE
|
|
1040
|
+
});
|
|
1041
|
+
}
|
|
1042
|
+
else {
|
|
1043
|
+
this.toast.success(response.error.message);
|
|
1044
|
+
}
|
|
1045
|
+
this.cdr.markForCheck();
|
|
1046
|
+
});
|
|
1048
1047
|
});
|
|
1049
1048
|
}
|
|
1050
1049
|
getProductsList() {
|
|
@@ -1110,13 +1109,13 @@ class EnterprisePartnersComponent extends AppBaseComponent {
|
|
|
1110
1109
|
}
|
|
1111
1110
|
return [];
|
|
1112
1111
|
}
|
|
1113
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: EnterprisePartnersComponent, deps: [{ token: i0.Injector }, { token: i1$1.UntypedFormBuilder }, { token: i1.SubscriptionService }, { token: i1.AuthService }, { token: i3$2.AdminService }, { token: i1.ProductService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1114
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: EnterprisePartnersComponent, isStandalone: false, selector: "pw-enterprise-partners", viewQueries: [{ propertyName: "refProduct", first: true, predicate: ["refProduct"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<section>\n <div class=\"row\">\n <div class=\"col-12 mb-3\">\n <div class=\"title\">\n @if (isAddEnabled) {\n <a\n aria-label=\"Navigate to Target\"\n (click)=\"isAddEnabled = false;\"\n class=\"previous\"><i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n }\n <h2 [ngClass]=\"{ 'mt-2': isAddEnabled }\">Enterprise Partners for {{ productName }}</h2>\n </div>\n @if (!isAddEnabled) {\n <p>\n You'll find in this section all the partners of your subscription. Based on your role\n in the enterprise, you'll be able to see, add, edit or remove access to them.\n </p>\n }\n @if (isAddEnabled) {\n <p>Here you can add partners to your subscriptions</p>\n }\n </div>\n </div>\n </section>\n @if (!isAddEnabled) {\n <section>\n <div class=\"row\">\n <div class=\"col-12 text-end mb-3\">\n @if (!isAddEnabled) {\n <button class=\"btn btn-sm btn-outline-primary\"\n (click)=\"isAddEnabled = true\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> Add Partners\n </button>\n }\n </div>\n </div>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n <div class=\"row faqlist primeng-datatable-container actions-collapsed mt-0\" [class.custom-disable-wrapper]=\"buttonBusy\" [class.hideTable]=\"totalRecordsUnFiltered === 0\">\n <div class=\"col-12 px-0\">\n <p-table #dt\n [value]=\"subscriptionPartners\"\n [paginator]=\"totalRecords !== 0\"\n [lazy]=\"true\"\n [rows]=\"PAGE_SIZE\"\n [totalRecords]=\"totalRecords\"\n [filterDelay]=\"1000\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n [customSort]=\"true\">\n <ng-template pTemplate=\"caption\">\n <div class=\"text-end\">\n <label for=\"enterprise-partners-search\" class=\"visually-hidden\">Search partner</label>\n <p-iconfield iconPosition=\"left\">\n <p-inputicon><i class=\"fa fa-search\" aria-hidden=\"true\"></i></p-inputicon>\n <input type=\"text\"\n id=\"enterprise-partners-search\"\n name=\"enterprise-partners-search\"\n [(ngModel)]=\"searchText\"\n pInputText\n [placeholder]=\"'Enterprise.Partner.Placeholder.Search' | transloco\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\" />\n </p-iconfield>\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\">{{ 'Label.Name' | transloco }}</th>\n <th scope=\"true\">{{ 'Label.Email' | transloco }}</th>\n <th scope=\"true\">{{ 'Relationship' | transloco }}</th>\n <th scope=\"true\">{{ 'Sessions' | transloco }}</th>\n <th scope=\"true\" class=\"actions-list-three\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-partner>\n <tr class=\"table-row\">\n <td data-head=\"Name\">\n {{partner.organisation}}\n </td>\n <td data-head=\"Email\">{{ partner.contact_email }}</td>\n <td data-head=\"Relationship\">\n {{partner.relationship_to_partner}}\n </td>\n <td>\n <span>{{ partner.sessions_last_month }}</span>\n </td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline list-action\">\n <li ngbTooltip=\"Click to remove this partner\" class=\"me-2 me-sm-2\">\n <i class=\"fa fa-trash delete-icon\" (keydown.enter)=\"onDelete(partner)\"\n (keydown.space)=\"onDelete(partner)\"\n (click)=\"onDelete(partner)\" aria-hidden=\"true\"></i>\n </li>\n <li [ngClass]=\"{'me-2 me-sm-2': true, }\"\n [ngbTooltip]=\"partner.is_active ? 'Deactivate this partner' : 'Activate this partner'\"\n (keydown.enter)=\"onDeactivate(partner)\"\n (click)=\"onDeactivate(partner)\">\n <i class=\"fa fa-power-off deactivate-icon\"\n [ngClass]=\"{'text-success': partner.is_active, 'text-danger': !partner.is_active}\"\n aria-hidden=\"true\"></i>\n </li>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n @if (totalRecords === 0 && totalRecordsUnFiltered !== 0) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n </div>\n }\n @if (totalRecords !== 0) {\n <pw-records-summary [showing]=\"dt?.value?.length ?? 0\" [total]=\"totalRecords\" />\n }\n </div>\n </div>\n @if (totalRecordsUnFiltered === 0 && isLoaded) {\n <pw-no-data [withImage]=\"true\" [message]=\"'Enterprise.Partner.NoDataMessage' | transloco\">\n </pw-no-data>\n }\n </section>\n }\n\n @if (isAddEnabled) {\n <section id=\"manage-members\"\n >\n @if (!isGroupEdit) {\n <div class=\"mt-4\"\n >\n <form [formGroup]=\"form\"\n (ngSubmit)=\"onSave()\">\n <div class=\"mb-3 col-12 col-md-4 mx-sm-auto\">\n <pw-input-container [label]=\"'Label.Product' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Admin.Subscriptions.Tooltip.SubscriptionProduct' | transloco\"\n name=\"product_id\" controlId=\"enterprise-partners-product_id\" [useAriaLabelledbyOnly]=\"true\"\n [errorMsg]=\"'Admin.Subscriptions.Validation.Product' | transloco\">\n <p-autoComplete appendTo=\"body\" #refProduct\n [attr.aria-labelledby]=\"'enterprise-partners-product_id-label'\"\n [suggestions]=\"filteredProducts\"\n formControlName=\"product_id\"\n dataKey=\"id\"\n optionLabel=\"label\"\n [dropdown]=\"true\"\n [delay]=\"1000\"\n [type]=\"'search'\"\n (completeMethod)=\"searchProduct($event)\"\n (onSelect)=\"onProductChange($event)\"\n (onClear)=\"onProductClear($event)\"\n styleClass=\"w-100\"\n [placeholder]=\"'Enterprise.Partner.Placeholder.Product' | transloco\"\n [inputStyle]=\"\n form.get('product_id').touched && form.get('product_id').invalid\n ? { border: '1px solid #ff586b' }\n : {}\n \"\n [multiple]=\"false\">\n </p-autoComplete>\n </pw-input-container>\n </div>\n @for (\n item of form.get('emailsFormArray')['controls']; track\n item; let i = $index; let last = $last) {\n <div formArrayName=\"emailsFormArray\"\n >\n <div [formGroupName]=\"i\">\n <div class=\"row mb-2\">\n <label class=\"col-12 col-md-4 text-md-end col-form-label col-form-label-sm\" [attr.for]=\"'enterprise-partners-email-' + i\">\n #{{ i + 1 }}</label>\n <div class=\"col-10 col-md-4\">\n <input formControlName=\"email\"\n [id]=\"'enterprise-partners-email-' + i\"\n class=\"form-control form-control-sm\"\n [placeholder]=\"'Enterprise.Partner.Placeholder.Email' | transloco\" name=\"input_email_2\"/>\n </div>\n <div class=\"col-2\">\n <button class=\"btn btn-sm btn-danger\"\n type=\"button\">\n <i\n class=\"fa fa-times\"\n title=\"Delete\"\n (click)=\"removeItem(i)\"\n (keydown.enter)=\"removeItem(i)\"\n aria-hidden=\"true\"\n ></i>\n </button>\n @if (last && emailsFormArray?.controls?.length < availableUnits) {\n <i\n class=\"btn btn-sm btn-primary fal fa-plus ms-2\"\n title=\"Add More\"\n (click)=\"addItem()\"\n (keydown.enter)=\"addItem()\"\n aria-hidden=\"true\"\n ></i>\n }\n </div>\n </div>\n </div>\n </div>\n }\n <div class=\"text-center mt-4\">\n <input type=\"button\"\n class=\"btn btn-secondary me-3\"\n value=\"Cancel\"\n (click)=\"form.reset(); totalRecordsUnFiltered = 0; isAddEnabled = false;\" />\n <button type=\"submit\"\n [buttonBusy]=\"buttonBusy\"\n [disabled]=\"buttonBusy\"\n class=\"btn btn-primary\">Submit</button>\n </div>\n </form>\n </div>\n }\n </section>\n }\n", styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}a.previous i{top:0}.pw-tab .card{min-height:auto}.enterprise-member-table{vertical-align:middle;min-width:200px}.delete-user{margin-left:15px}.title{display:flex}.table-row{vertical-align:top}.admin-badge{background-color:var(--first)}.col-product{width:61%}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$1.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: i4.IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["hostName", "iconPosition", "styleClass"] }, { kind: "component", type: i5.InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["hostName", "styleClass"] }, { kind: "directive", type: i6.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i7.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: i9.ButtonBusyDirective, selector: "[buttonBusy]", inputs: ["buttonBusy", "busyText"] }, { kind: "component", type: i13.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: "component", type: i12.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i13$1.AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "minQueryLength", "delay", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "addOnTab", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "addOnBlur", "separator", "appendTo", "motionOptions"], outputs: ["completeMethod", "onSelect", "onUnselect", "onAdd", "onFocus", "onBlur", "onDropdownClick", "onClear", "onInputKeydown", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "component", type: i15.InputContainerComponent, selector: "pw-input-container", inputs: ["name", "controlId", "useAriaLabelledbyOnly", "label", "labelClass", "tooltipPosition", "required", "errorMsg", "isReadOnly", "showTooltip", "tooltipText", "showTriangle", "afterLabel", "showAfterLabel", "showTriangleText", "isLeftTooltip"] }, { kind: "component", type: i15.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "component", type: i15.RecordsSummaryComponent, selector: "pw-records-summary", inputs: ["showing", "total"] }, { kind: "pipe", type: i18.TranslocoPipe, name: "transloco" }] }); }
|
|
1112
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: EnterprisePartnersComponent, deps: [{ token: i0.Injector }, { token: i1$1.UntypedFormBuilder }, { token: i1.SubscriptionService }, { token: i1.AuthService }, { token: i3$2.AdminService }, { token: i1.ProductService }, { token: i0.ChangeDetectorRef }, { token: i4$1.ConfirmDialogService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1113
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: EnterprisePartnersComponent, isStandalone: false, selector: "pw-enterprise-partners", viewQueries: [{ propertyName: "refProduct", first: true, predicate: ["refProduct"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<section>\n <div class=\"row\">\n <div class=\"col-12 mb-3\">\n <div class=\"title\">\n @if (isAddEnabled) {\n <a\n aria-label=\"Navigate to Target\"\n (click)=\"isAddEnabled = false;\"\n class=\"previous\"><i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n }\n <h2 [ngClass]=\"{ 'mt-2': isAddEnabled }\">Enterprise Partners for {{ productName }}</h2>\n </div>\n @if (!isAddEnabled) {\n <p>\n You'll find in this section all the partners of your subscription. Based on your role\n in the enterprise, you'll be able to see, add, edit or remove access to them.\n </p>\n }\n @if (isAddEnabled) {\n <p>Here you can add partners to your subscriptions</p>\n }\n </div>\n </div>\n </section>\n @if (!isAddEnabled) {\n <section>\n <div class=\"row\">\n <div class=\"col-12 text-end mb-3\">\n @if (!isAddEnabled) {\n <button class=\"btn btn-sm btn-outline-primary\"\n (click)=\"isAddEnabled = true\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> Add Partners\n </button>\n }\n </div>\n </div>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n <div class=\"row faqlist primeng-datatable-container actions-collapsed mt-0\" [class.custom-disable-wrapper]=\"buttonBusy\" [class.hideTable]=\"totalRecordsUnFiltered === 0\">\n <div class=\"col-12 px-0\">\n <p-table #dt\n [value]=\"subscriptionPartners\"\n [paginator]=\"totalRecords !== 0\"\n [lazy]=\"true\"\n [rows]=\"PAGE_SIZE\"\n [totalRecords]=\"totalRecords\"\n [filterDelay]=\"1000\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n [customSort]=\"true\">\n <ng-template pTemplate=\"caption\">\n <div class=\"text-end\">\n <label for=\"enterprise-partners-search\" class=\"visually-hidden\">Search partner</label>\n <p-iconfield iconPosition=\"left\">\n <p-inputicon><i class=\"fa fa-search\" aria-hidden=\"true\"></i></p-inputicon>\n <input type=\"text\"\n id=\"enterprise-partners-search\"\n name=\"enterprise-partners-search\"\n [(ngModel)]=\"searchText\"\n pInputText\n [placeholder]=\"'Enterprise.Partner.Placeholder.Search' | transloco\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\" />\n </p-iconfield>\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\">{{ 'Label.Name' | transloco }}</th>\n <th scope=\"true\">{{ 'Label.Email' | transloco }}</th>\n <th scope=\"true\">{{ 'Relationship' | transloco }}</th>\n <th scope=\"true\">{{ 'Sessions' | transloco }}</th>\n <th scope=\"true\" class=\"actions-list-three\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-partner>\n <tr class=\"table-row\">\n <td data-head=\"Name\">\n {{partner.organisation}}\n </td>\n <td data-head=\"Email\">{{ partner.contact_email }}</td>\n <td data-head=\"Relationship\">\n {{partner.relationship_to_partner}}\n </td>\n <td>\n <span>{{ partner.sessions_last_month }}</span>\n </td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline list-action\">\n <li ngbTooltip=\"Click to remove this partner\" class=\"me-2 me-sm-2\">\n <i class=\"fa fa-trash delete-icon\" (keydown.enter)=\"onDelete(partner)\"\n (keydown.space)=\"onDelete(partner)\"\n (click)=\"onDelete(partner)\" aria-hidden=\"true\"></i>\n </li>\n <li [ngClass]=\"{'me-2 me-sm-2': true, }\"\n [ngbTooltip]=\"partner.is_active ? 'Deactivate this partner' : 'Activate this partner'\"\n (keydown.enter)=\"onDeactivate(partner)\"\n (click)=\"onDeactivate(partner)\">\n <i class=\"fa fa-power-off deactivate-icon\"\n [ngClass]=\"{'text-success-muted': partner.is_active, 'text-danger': !partner.is_active}\"\n aria-hidden=\"true\"></i>\n </li>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n @if (totalRecords === 0 && totalRecordsUnFiltered !== 0) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n </div>\n }\n @if (totalRecords !== 0) {\n <pw-records-summary [showing]=\"dt?.value?.length ?? 0\" [total]=\"totalRecords\" />\n }\n </div>\n </div>\n @if (totalRecordsUnFiltered === 0 && isLoaded) {\n <pw-no-data [withImage]=\"true\" [message]=\"'Enterprise.Partner.NoDataMessage' | transloco\">\n </pw-no-data>\n }\n </section>\n }\n\n @if (isAddEnabled) {\n <section id=\"manage-members\"\n >\n @if (!isGroupEdit) {\n <div class=\"mt-4\"\n >\n <form [formGroup]=\"form\"\n (ngSubmit)=\"onSave()\">\n <div class=\"mb-3 col-12 col-md-4 mx-sm-auto\">\n <pw-input-container [label]=\"'Label.Product' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Admin.Subscriptions.Tooltip.SubscriptionProduct' | transloco\"\n name=\"product_id\" controlId=\"enterprise-partners-product_id\" [useAriaLabelledbyOnly]=\"true\"\n [errorMsg]=\"'Admin.Subscriptions.Validation.Product' | transloco\">\n <p-autoComplete appendTo=\"body\" #refProduct\n [attr.aria-labelledby]=\"'enterprise-partners-product_id-label'\"\n [suggestions]=\"filteredProducts\"\n formControlName=\"product_id\"\n dataKey=\"id\"\n optionLabel=\"label\"\n [dropdown]=\"true\"\n [delay]=\"1000\"\n [type]=\"'search'\"\n (completeMethod)=\"searchProduct($event)\"\n (onSelect)=\"onProductChange($event)\"\n (onClear)=\"onProductClear($event)\"\n styleClass=\"w-100\"\n [placeholder]=\"'Enterprise.Partner.Placeholder.Product' | transloco\"\n [inputStyle]=\"\n form.get('product_id').touched && form.get('product_id').invalid\n ? { border: '1px solid #ff586b' }\n : {}\n \"\n [multiple]=\"false\">\n </p-autoComplete>\n </pw-input-container>\n </div>\n @for (\n item of form.get('emailsFormArray')['controls']; track\n item; let i = $index; let last = $last) {\n <div formArrayName=\"emailsFormArray\"\n >\n <div [formGroupName]=\"i\">\n <div class=\"row mb-2\">\n <label class=\"col-12 col-md-4 text-md-end col-form-label col-form-label-sm\" [attr.for]=\"'enterprise-partners-email-' + i\">\n #{{ i + 1 }}</label>\n <div class=\"col-10 col-md-4\">\n <input formControlName=\"email\"\n [id]=\"'enterprise-partners-email-' + i\"\n class=\"form-control form-control-sm\"\n [placeholder]=\"'Enterprise.Partner.Placeholder.Email' | transloco\" name=\"input_email_2\"/>\n </div>\n <div class=\"col-2\">\n <button class=\"btn btn-sm btn-danger\"\n type=\"button\">\n <i\n class=\"fa fa-times\"\n title=\"Delete\"\n (click)=\"removeItem(i)\"\n (keydown.enter)=\"removeItem(i)\"\n aria-hidden=\"true\"\n ></i>\n </button>\n @if (last && emailsFormArray?.controls?.length < availableUnits) {\n <i\n class=\"btn btn-sm btn-primary fal fa-plus ms-2\"\n title=\"Add More\"\n (click)=\"addItem()\"\n (keydown.enter)=\"addItem()\"\n aria-hidden=\"true\"\n ></i>\n }\n </div>\n </div>\n </div>\n </div>\n }\n <div class=\"text-center mt-4\">\n <input type=\"button\"\n class=\"btn btn-secondary me-3\"\n value=\"Cancel\"\n (click)=\"form.reset(); totalRecordsUnFiltered = 0; isAddEnabled = false;\" />\n <button type=\"submit\"\n [buttonBusy]=\"buttonBusy\"\n [disabled]=\"buttonBusy\"\n class=\"btn btn-primary\">Submit</button>\n </div>\n </form>\n </div>\n }\n </section>\n }\n", styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}a.previous i{top:0}.pw-tab .card{min-height:auto}.enterprise-member-table{vertical-align:middle;min-width:200px}.delete-user{margin-left:15px}.title{display:flex}.table-row{vertical-align:top}.admin-badge{background-color:var(--first)}.col-product{width:61%}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$1.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: i4.IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["hostName", "iconPosition", "styleClass"] }, { kind: "component", type: i5.InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["hostName", "styleClass"] }, { kind: "directive", type: i6.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i7.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: i10.ButtonBusyDirective, selector: "[buttonBusy]", inputs: ["buttonBusy", "busyText"] }, { kind: "component", type: i13$1.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: "component", type: i13.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i14$1.AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "minQueryLength", "delay", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "addOnTab", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "addOnBlur", "separator", "appendTo", "motionOptions"], outputs: ["completeMethod", "onSelect", "onUnselect", "onAdd", "onFocus", "onBlur", "onDropdownClick", "onClear", "onInputKeydown", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "component", type: i4$1.InputContainerComponent, selector: "pw-input-container", inputs: ["name", "controlId", "useAriaLabelledbyOnly", "label", "labelClass", "tooltipPosition", "required", "errorMsg", "isReadOnly", "showTooltip", "tooltipText", "showTriangle", "afterLabel", "showAfterLabel", "showTriangleText", "isLeftTooltip"] }, { kind: "component", type: i4$1.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "component", type: i4$1.RecordsSummaryComponent, selector: "pw-records-summary", inputs: ["showing", "total"] }, { kind: "pipe", type: i18.TranslocoPipe, name: "transloco" }] }); }
|
|
1115
1114
|
}
|
|
1116
1115
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: EnterprisePartnersComponent, decorators: [{
|
|
1117
1116
|
type: Component,
|
|
1118
|
-
args: [{ selector: 'pw-enterprise-partners', standalone: false, template: "<section>\n <div class=\"row\">\n <div class=\"col-12 mb-3\">\n <div class=\"title\">\n @if (isAddEnabled) {\n <a\n aria-label=\"Navigate to Target\"\n (click)=\"isAddEnabled = false;\"\n class=\"previous\"><i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n }\n <h2 [ngClass]=\"{ 'mt-2': isAddEnabled }\">Enterprise Partners for {{ productName }}</h2>\n </div>\n @if (!isAddEnabled) {\n <p>\n You'll find in this section all the partners of your subscription. Based on your role\n in the enterprise, you'll be able to see, add, edit or remove access to them.\n </p>\n }\n @if (isAddEnabled) {\n <p>Here you can add partners to your subscriptions</p>\n }\n </div>\n </div>\n </section>\n @if (!isAddEnabled) {\n <section>\n <div class=\"row\">\n <div class=\"col-12 text-end mb-3\">\n @if (!isAddEnabled) {\n <button class=\"btn btn-sm btn-outline-primary\"\n (click)=\"isAddEnabled = true\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> Add Partners\n </button>\n }\n </div>\n </div>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n <div class=\"row faqlist primeng-datatable-container actions-collapsed mt-0\" [class.custom-disable-wrapper]=\"buttonBusy\" [class.hideTable]=\"totalRecordsUnFiltered === 0\">\n <div class=\"col-12 px-0\">\n <p-table #dt\n [value]=\"subscriptionPartners\"\n [paginator]=\"totalRecords !== 0\"\n [lazy]=\"true\"\n [rows]=\"PAGE_SIZE\"\n [totalRecords]=\"totalRecords\"\n [filterDelay]=\"1000\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n [customSort]=\"true\">\n <ng-template pTemplate=\"caption\">\n <div class=\"text-end\">\n <label for=\"enterprise-partners-search\" class=\"visually-hidden\">Search partner</label>\n <p-iconfield iconPosition=\"left\">\n <p-inputicon><i class=\"fa fa-search\" aria-hidden=\"true\"></i></p-inputicon>\n <input type=\"text\"\n id=\"enterprise-partners-search\"\n name=\"enterprise-partners-search\"\n [(ngModel)]=\"searchText\"\n pInputText\n [placeholder]=\"'Enterprise.Partner.Placeholder.Search' | transloco\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\" />\n </p-iconfield>\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\">{{ 'Label.Name' | transloco }}</th>\n <th scope=\"true\">{{ 'Label.Email' | transloco }}</th>\n <th scope=\"true\">{{ 'Relationship' | transloco }}</th>\n <th scope=\"true\">{{ 'Sessions' | transloco }}</th>\n <th scope=\"true\" class=\"actions-list-three\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-partner>\n <tr class=\"table-row\">\n <td data-head=\"Name\">\n {{partner.organisation}}\n </td>\n <td data-head=\"Email\">{{ partner.contact_email }}</td>\n <td data-head=\"Relationship\">\n {{partner.relationship_to_partner}}\n </td>\n <td>\n <span>{{ partner.sessions_last_month }}</span>\n </td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline list-action\">\n <li ngbTooltip=\"Click to remove this partner\" class=\"me-2 me-sm-2\">\n <i class=\"fa fa-trash delete-icon\" (keydown.enter)=\"onDelete(partner)\"\n (keydown.space)=\"onDelete(partner)\"\n (click)=\"onDelete(partner)\" aria-hidden=\"true\"></i>\n </li>\n <li [ngClass]=\"{'me-2 me-sm-2': true, }\"\n [ngbTooltip]=\"partner.is_active ? 'Deactivate this partner' : 'Activate this partner'\"\n (keydown.enter)=\"onDeactivate(partner)\"\n (click)=\"onDeactivate(partner)\">\n <i class=\"fa fa-power-off deactivate-icon\"\n [ngClass]=\"{'text-success': partner.is_active, 'text-danger': !partner.is_active}\"\n aria-hidden=\"true\"></i>\n </li>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n @if (totalRecords === 0 && totalRecordsUnFiltered !== 0) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n </div>\n }\n @if (totalRecords !== 0) {\n <pw-records-summary [showing]=\"dt?.value?.length ?? 0\" [total]=\"totalRecords\" />\n }\n </div>\n </div>\n @if (totalRecordsUnFiltered === 0 && isLoaded) {\n <pw-no-data [withImage]=\"true\" [message]=\"'Enterprise.Partner.NoDataMessage' | transloco\">\n </pw-no-data>\n }\n </section>\n }\n\n @if (isAddEnabled) {\n <section id=\"manage-members\"\n >\n @if (!isGroupEdit) {\n <div class=\"mt-4\"\n >\n <form [formGroup]=\"form\"\n (ngSubmit)=\"onSave()\">\n <div class=\"mb-3 col-12 col-md-4 mx-sm-auto\">\n <pw-input-container [label]=\"'Label.Product' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Admin.Subscriptions.Tooltip.SubscriptionProduct' | transloco\"\n name=\"product_id\" controlId=\"enterprise-partners-product_id\" [useAriaLabelledbyOnly]=\"true\"\n [errorMsg]=\"'Admin.Subscriptions.Validation.Product' | transloco\">\n <p-autoComplete appendTo=\"body\" #refProduct\n [attr.aria-labelledby]=\"'enterprise-partners-product_id-label'\"\n [suggestions]=\"filteredProducts\"\n formControlName=\"product_id\"\n dataKey=\"id\"\n optionLabel=\"label\"\n [dropdown]=\"true\"\n [delay]=\"1000\"\n [type]=\"'search'\"\n (completeMethod)=\"searchProduct($event)\"\n (onSelect)=\"onProductChange($event)\"\n (onClear)=\"onProductClear($event)\"\n styleClass=\"w-100\"\n [placeholder]=\"'Enterprise.Partner.Placeholder.Product' | transloco\"\n [inputStyle]=\"\n form.get('product_id').touched && form.get('product_id').invalid\n ? { border: '1px solid #ff586b' }\n : {}\n \"\n [multiple]=\"false\">\n </p-autoComplete>\n </pw-input-container>\n </div>\n @for (\n item of form.get('emailsFormArray')['controls']; track\n item; let i = $index; let last = $last) {\n <div formArrayName=\"emailsFormArray\"\n >\n <div [formGroupName]=\"i\">\n <div class=\"row mb-2\">\n <label class=\"col-12 col-md-4 text-md-end col-form-label col-form-label-sm\" [attr.for]=\"'enterprise-partners-email-' + i\">\n #{{ i + 1 }}</label>\n <div class=\"col-10 col-md-4\">\n <input formControlName=\"email\"\n [id]=\"'enterprise-partners-email-' + i\"\n class=\"form-control form-control-sm\"\n [placeholder]=\"'Enterprise.Partner.Placeholder.Email' | transloco\" name=\"input_email_2\"/>\n </div>\n <div class=\"col-2\">\n <button class=\"btn btn-sm btn-danger\"\n type=\"button\">\n <i\n class=\"fa fa-times\"\n title=\"Delete\"\n (click)=\"removeItem(i)\"\n (keydown.enter)=\"removeItem(i)\"\n aria-hidden=\"true\"\n ></i>\n </button>\n @if (last && emailsFormArray?.controls?.length < availableUnits) {\n <i\n class=\"btn btn-sm btn-primary fal fa-plus ms-2\"\n title=\"Add More\"\n (click)=\"addItem()\"\n (keydown.enter)=\"addItem()\"\n aria-hidden=\"true\"\n ></i>\n }\n </div>\n </div>\n </div>\n </div>\n }\n <div class=\"text-center mt-4\">\n <input type=\"button\"\n class=\"btn btn-secondary me-3\"\n value=\"Cancel\"\n (click)=\"form.reset(); totalRecordsUnFiltered = 0; isAddEnabled = false;\" />\n <button type=\"submit\"\n [buttonBusy]=\"buttonBusy\"\n [disabled]=\"buttonBusy\"\n class=\"btn btn-primary\">Submit</button>\n </div>\n </form>\n </div>\n }\n </section>\n }\n", styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}a.previous i{top:0}.pw-tab .card{min-height:auto}.enterprise-member-table{vertical-align:middle;min-width:200px}.delete-user{margin-left:15px}.title{display:flex}.table-row{vertical-align:top}.admin-badge{background-color:var(--first)}.col-product{width:61%}\n"] }]
|
|
1119
|
-
}], ctorParameters: () => [{ type: i0.Injector }, { type: i1$1.UntypedFormBuilder }, { type: i1.SubscriptionService }, { type: i1.AuthService }, { type: i3$2.AdminService }, { type: i1.ProductService }, { type: i0.ChangeDetectorRef }], propDecorators: { refProduct: [{
|
|
1117
|
+
args: [{ selector: 'pw-enterprise-partners', standalone: false, template: "<section>\n <div class=\"row\">\n <div class=\"col-12 mb-3\">\n <div class=\"title\">\n @if (isAddEnabled) {\n <a\n aria-label=\"Navigate to Target\"\n (click)=\"isAddEnabled = false;\"\n class=\"previous\"><i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n }\n <h2 [ngClass]=\"{ 'mt-2': isAddEnabled }\">Enterprise Partners for {{ productName }}</h2>\n </div>\n @if (!isAddEnabled) {\n <p>\n You'll find in this section all the partners of your subscription. Based on your role\n in the enterprise, you'll be able to see, add, edit or remove access to them.\n </p>\n }\n @if (isAddEnabled) {\n <p>Here you can add partners to your subscriptions</p>\n }\n </div>\n </div>\n </section>\n @if (!isAddEnabled) {\n <section>\n <div class=\"row\">\n <div class=\"col-12 text-end mb-3\">\n @if (!isAddEnabled) {\n <button class=\"btn btn-sm btn-outline-primary\"\n (click)=\"isAddEnabled = true\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> Add Partners\n </button>\n }\n </div>\n </div>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n <div class=\"row faqlist primeng-datatable-container actions-collapsed mt-0\" [class.custom-disable-wrapper]=\"buttonBusy\" [class.hideTable]=\"totalRecordsUnFiltered === 0\">\n <div class=\"col-12 px-0\">\n <p-table #dt\n [value]=\"subscriptionPartners\"\n [paginator]=\"totalRecords !== 0\"\n [lazy]=\"true\"\n [rows]=\"PAGE_SIZE\"\n [totalRecords]=\"totalRecords\"\n [filterDelay]=\"1000\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n [customSort]=\"true\">\n <ng-template pTemplate=\"caption\">\n <div class=\"text-end\">\n <label for=\"enterprise-partners-search\" class=\"visually-hidden\">Search partner</label>\n <p-iconfield iconPosition=\"left\">\n <p-inputicon><i class=\"fa fa-search\" aria-hidden=\"true\"></i></p-inputicon>\n <input type=\"text\"\n id=\"enterprise-partners-search\"\n name=\"enterprise-partners-search\"\n [(ngModel)]=\"searchText\"\n pInputText\n [placeholder]=\"'Enterprise.Partner.Placeholder.Search' | transloco\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\" />\n </p-iconfield>\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\">{{ 'Label.Name' | transloco }}</th>\n <th scope=\"true\">{{ 'Label.Email' | transloco }}</th>\n <th scope=\"true\">{{ 'Relationship' | transloco }}</th>\n <th scope=\"true\">{{ 'Sessions' | transloco }}</th>\n <th scope=\"true\" class=\"actions-list-three\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-partner>\n <tr class=\"table-row\">\n <td data-head=\"Name\">\n {{partner.organisation}}\n </td>\n <td data-head=\"Email\">{{ partner.contact_email }}</td>\n <td data-head=\"Relationship\">\n {{partner.relationship_to_partner}}\n </td>\n <td>\n <span>{{ partner.sessions_last_month }}</span>\n </td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline list-action\">\n <li ngbTooltip=\"Click to remove this partner\" class=\"me-2 me-sm-2\">\n <i class=\"fa fa-trash delete-icon\" (keydown.enter)=\"onDelete(partner)\"\n (keydown.space)=\"onDelete(partner)\"\n (click)=\"onDelete(partner)\" aria-hidden=\"true\"></i>\n </li>\n <li [ngClass]=\"{'me-2 me-sm-2': true, }\"\n [ngbTooltip]=\"partner.is_active ? 'Deactivate this partner' : 'Activate this partner'\"\n (keydown.enter)=\"onDeactivate(partner)\"\n (click)=\"onDeactivate(partner)\">\n <i class=\"fa fa-power-off deactivate-icon\"\n [ngClass]=\"{'text-success-muted': partner.is_active, 'text-danger': !partner.is_active}\"\n aria-hidden=\"true\"></i>\n </li>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n @if (totalRecords === 0 && totalRecordsUnFiltered !== 0) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage' | transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n </div>\n }\n @if (totalRecords !== 0) {\n <pw-records-summary [showing]=\"dt?.value?.length ?? 0\" [total]=\"totalRecords\" />\n }\n </div>\n </div>\n @if (totalRecordsUnFiltered === 0 && isLoaded) {\n <pw-no-data [withImage]=\"true\" [message]=\"'Enterprise.Partner.NoDataMessage' | transloco\">\n </pw-no-data>\n }\n </section>\n }\n\n @if (isAddEnabled) {\n <section id=\"manage-members\"\n >\n @if (!isGroupEdit) {\n <div class=\"mt-4\"\n >\n <form [formGroup]=\"form\"\n (ngSubmit)=\"onSave()\">\n <div class=\"mb-3 col-12 col-md-4 mx-sm-auto\">\n <pw-input-container [label]=\"'Label.Product' | transloco\"\n [showTooltip]=\"true\"\n [tooltipText]=\"'Admin.Subscriptions.Tooltip.SubscriptionProduct' | transloco\"\n name=\"product_id\" controlId=\"enterprise-partners-product_id\" [useAriaLabelledbyOnly]=\"true\"\n [errorMsg]=\"'Admin.Subscriptions.Validation.Product' | transloco\">\n <p-autoComplete appendTo=\"body\" #refProduct\n [attr.aria-labelledby]=\"'enterprise-partners-product_id-label'\"\n [suggestions]=\"filteredProducts\"\n formControlName=\"product_id\"\n dataKey=\"id\"\n optionLabel=\"label\"\n [dropdown]=\"true\"\n [delay]=\"1000\"\n [type]=\"'search'\"\n (completeMethod)=\"searchProduct($event)\"\n (onSelect)=\"onProductChange($event)\"\n (onClear)=\"onProductClear($event)\"\n styleClass=\"w-100\"\n [placeholder]=\"'Enterprise.Partner.Placeholder.Product' | transloco\"\n [inputStyle]=\"\n form.get('product_id').touched && form.get('product_id').invalid\n ? { border: '1px solid #ff586b' }\n : {}\n \"\n [multiple]=\"false\">\n </p-autoComplete>\n </pw-input-container>\n </div>\n @for (\n item of form.get('emailsFormArray')['controls']; track\n item; let i = $index; let last = $last) {\n <div formArrayName=\"emailsFormArray\"\n >\n <div [formGroupName]=\"i\">\n <div class=\"row mb-2\">\n <label class=\"col-12 col-md-4 text-md-end col-form-label col-form-label-sm\" [attr.for]=\"'enterprise-partners-email-' + i\">\n #{{ i + 1 }}</label>\n <div class=\"col-10 col-md-4\">\n <input formControlName=\"email\"\n [id]=\"'enterprise-partners-email-' + i\"\n class=\"form-control form-control-sm\"\n [placeholder]=\"'Enterprise.Partner.Placeholder.Email' | transloco\" name=\"input_email_2\"/>\n </div>\n <div class=\"col-2\">\n <button class=\"btn btn-sm btn-danger\"\n type=\"button\">\n <i\n class=\"fa fa-times\"\n title=\"Delete\"\n (click)=\"removeItem(i)\"\n (keydown.enter)=\"removeItem(i)\"\n aria-hidden=\"true\"\n ></i>\n </button>\n @if (last && emailsFormArray?.controls?.length < availableUnits) {\n <i\n class=\"btn btn-sm btn-primary fal fa-plus ms-2\"\n title=\"Add More\"\n (click)=\"addItem()\"\n (keydown.enter)=\"addItem()\"\n aria-hidden=\"true\"\n ></i>\n }\n </div>\n </div>\n </div>\n </div>\n }\n <div class=\"text-center mt-4\">\n <input type=\"button\"\n class=\"btn btn-secondary me-3\"\n value=\"Cancel\"\n (click)=\"form.reset(); totalRecordsUnFiltered = 0; isAddEnabled = false;\" />\n <button type=\"submit\"\n [buttonBusy]=\"buttonBusy\"\n [disabled]=\"buttonBusy\"\n class=\"btn btn-primary\">Submit</button>\n </div>\n </form>\n </div>\n }\n </section>\n }\n", styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}a.previous i{top:0}.pw-tab .card{min-height:auto}.enterprise-member-table{vertical-align:middle;min-width:200px}.delete-user{margin-left:15px}.title{display:flex}.table-row{vertical-align:top}.admin-badge{background-color:var(--first)}.col-product{width:61%}\n"] }]
|
|
1118
|
+
}], ctorParameters: () => [{ type: i0.Injector }, { type: i1$1.UntypedFormBuilder }, { type: i1.SubscriptionService }, { type: i1.AuthService }, { type: i3$2.AdminService }, { type: i1.ProductService }, { type: i0.ChangeDetectorRef }, { type: i4$1.ConfirmDialogService }], propDecorators: { refProduct: [{
|
|
1120
1119
|
type: ViewChild,
|
|
1121
1120
|
args: ['refProduct']
|
|
1122
1121
|
}] } });
|
|
@@ -1186,7 +1185,7 @@ class EnterpriseSubscriptionsComponent extends AppBaseComponent {
|
|
|
1186
1185
|
super.ngOnDestroy();
|
|
1187
1186
|
}
|
|
1188
1187
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: EnterpriseSubscriptionsComponent, deps: [{ token: i0.Injector }, { token: i1.DataService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1189
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: EnterpriseSubscriptionsComponent, isStandalone: false, selector: "pw-enterprise-subscriptions", usesInheritance: true, ngImport: i0, template: "<div class=\"container-fluid overflow-hidden\">\n <div class=\"row\">\n @for (item of subscriptions; track item) {\n <div class=\"col-12 col-md-6 col-xl-4 my-3\"\n >\n <div class=\"card\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <h5 class=\"mb-3\">{{ item?.product?.name }}</h5>\n <p>\n <strong class=\"d-inline-block w-50\">Organisation:</strong>\n {{ item.organisation }}\n </p>\n <p>\n <strong class=\"d-inline-block w-50\">Units Purchased:</strong>\n {{ item.purchased_units }}\n </p>\n <p>\n <strong class=\"d-inline-block w-50\">Seats In Use:</strong>\n {{ item.units_in_use }}\n </p>\n </div>\n <div class=\"card-footer px-3\">\n <div class=\"float-end px-2\">\n <a (click)=\"nextUrl()\"\n class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"['/' + subscription?.slug + item.id, 'members']\">\n Manage</a>\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n <div class=\"col-12\">\n @if (subscriptions.length === 0) {\n <pw-no-data [withImage]=\"true\" message=\"No current enterprise subscriptions.\"\n >\n </pw-no-data>\n }\n </div>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n </div>\n</div>\n", dependencies: [{ kind: "component", type:
|
|
1188
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: EnterpriseSubscriptionsComponent, isStandalone: false, selector: "pw-enterprise-subscriptions", usesInheritance: true, ngImport: i0, template: "<div class=\"container-fluid overflow-hidden\">\n <div class=\"row\">\n @for (item of subscriptions; track item) {\n <div class=\"col-12 col-md-6 col-xl-4 my-3\"\n >\n <div class=\"card\">\n <div class=\"card-content\">\n <div class=\"card-header\">\n <h5 class=\"mb-3\">{{ item?.product?.name }}</h5>\n <p>\n <strong class=\"d-inline-block w-50\">Organisation:</strong>\n {{ item.organisation }}\n </p>\n <p>\n <strong class=\"d-inline-block w-50\">Units Purchased:</strong>\n {{ item.purchased_units }}\n </p>\n <p>\n <strong class=\"d-inline-block w-50\">Seats In Use:</strong>\n {{ item.units_in_use }}\n </p>\n </div>\n <div class=\"card-footer px-3\">\n <div class=\"float-end px-2\">\n <a (click)=\"nextUrl()\"\n class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"['/' + subscription?.slug + item.id, 'members']\">\n Manage</a>\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n <div class=\"col-12\">\n @if (subscriptions.length === 0) {\n <pw-no-data [withImage]=\"true\" message=\"No current enterprise subscriptions.\"\n >\n </pw-no-data>\n }\n </div>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n </div>\n</div>\n", dependencies: [{ kind: "component", type: i13.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i4$1.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "directive", type: i16.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] }); }
|
|
1190
1189
|
}
|
|
1191
1190
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: EnterpriseSubscriptionsComponent, decorators: [{
|
|
1192
1191
|
type: Component,
|
|
@@ -1241,7 +1240,7 @@ class EnterpriseTabsComponent extends AppBaseComponent {
|
|
|
1241
1240
|
];
|
|
1242
1241
|
}
|
|
1243
1242
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: EnterpriseTabsComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1244
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.6", type: EnterpriseTabsComponent, isStandalone: false, selector: "pw-enterprise-tabs", usesInheritance: true, ngImport: i0, template: "<pw-tabs [items]=\"items\"\n [withSubscription]=\"true\"></pw-tabs>\n", dependencies: [{ kind: "component", type:
|
|
1243
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.6", type: EnterpriseTabsComponent, isStandalone: false, selector: "pw-enterprise-tabs", usesInheritance: true, ngImport: i0, template: "<pw-tabs [items]=\"items\"\n [withSubscription]=\"true\"></pw-tabs>\n", dependencies: [{ kind: "component", type: i4$1.PwTabsComponent, selector: "pw-tabs", inputs: ["items", "withSubscription"] }] }); }
|
|
1245
1244
|
}
|
|
1246
1245
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: EnterpriseTabsComponent, decorators: [{
|
|
1247
1246
|
type: Component,
|
|
@@ -1545,7 +1544,7 @@ class EnterpriseWikiComponent extends AppBaseComponent {
|
|
|
1545
1544
|
super.ngOnDestroy();
|
|
1546
1545
|
}
|
|
1547
1546
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: EnterpriseWikiComponent, deps: [{ token: i1.GroupService }, { token: i0.Injector }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1548
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: EnterpriseWikiComponent, isStandalone: false, selector: "pw-enterprise-wiki", usesInheritance: true, ngImport: i0, template: "<section>\n <div class=\"row\">\n <div class=\"col-12\" [ngClass]=\"{'mb-3': !isEdit}\">\n <div class=\"title\">\n @if (isEdit) {\n <a\n aria-label=\"Navigate to Target\"\n (click)=\"onCancel()\"\n (keydown.enter)=\"onCancel()\"\n class=\"previous\"><i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n }\n @if (isEdit) {\n <h3 class=\"m-subheader__title m-subheader__title--separator mt-1\">\n <span>{{ !isAdd ? 'Edit' : 'Create a new' }} documentation page</span>\n </h3>\n }\n @if (!isEdit) {\n <h2 [ngClass]=\"{ 'mt-2': isEdit }\">Documentation @if (groupId) {\n <span>for {{ groupName }}</span>\n }</h2>\n }\n </div>\n @if (!isEdit) {\n <p>\n Here you can write the documentation for your organization's members. Documentation\n pages are visible based on the teams the subscription's members are part of.\n </p>\n }\n </div>\n </div>\n </section>\n @if (!isLoaded && isEdit) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (isEdit && isLoaded) {\n <div class=\"container-fluid pw-tab overflow-hidden\">\n <div class=\"p-2 mt-1\">\n <form [formGroup]=\"form\"\n (ngSubmit)=\"onSave()\">\n <h3>{{ 'Enterprise.Documentation.Section.Content' | transloco }}</h3>\n <div class=\"row mb-3\">\n <div class=\"col-12\">\n <pw-input-container [label]=\"'Enterprise.Documentation.Title' | transloco\"\n [errorMsg]=\"'Enterprise.Documentation.Validation.Title' | transloco\"\n name=\"title\" controlId=\"enterprise-wiki-title\">\n <input type=\"text\"\n id=\"enterprise-wiki-title\"\n class=\"form-control\"\n formControlName=\"title\"\n [placeholder]=\"'Enterprise.Documentation.Placeholder.Title' | transloco\"\n [ngClass]=\"{ 'is-invalid': submitted && f.title.errors }\" />\n </pw-input-container>\n </div>\n <pw-input-container [label]=\"'Enterprise.Documentation.Body' | transloco\"\n class=\"col-12\"\n name=\"body\" controlId=\"enterprise-wiki-body\" [useAriaLabelledbyOnly]=\"true\"\n [errorMsg]=\"'Enterprise.Documentation.Validation.Body' | transloco\">\n <quill-editor [styles]=\"{ height: '220px' }\"\n [attr.aria-labelledby]=\"'enterprise-wiki-body-label'\"\n class=\"quillEditor quill-container\" [modules]=\"editorConfig\"\n formControlName=\"body\"\n [placeholder]=\"'Enterprise.Documentation.Placeholder.Body' | transloco\"\n [ngClass]=\"{ 'is-invalid': submitted && f.body.errors }\">\n </quill-editor>\n </pw-input-container>\n </div>\n\n <h3>{{ 'Enterprise.Documentation.Section.Visibility' | transloco }}</h3>\n <div class=\"row mb-3\">\n <div class=\"col-12 col-md-6\">\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'Enterprise.Tooltip.Group' | transloco\"\n [label]=\"'Enterprise.Documentation.Team' | transloco\"\n [isLeftTooltip]=\"true\"\n [errorMsg]=\"'Enterprise.Documentation.Validation.Team' | transloco\"\n name=\"group_id\" controlId=\"enterprise-wiki-group_id\" [useAriaLabelledbyOnly]=\"true\">\n <p-select\n [attr.aria-labelledby]=\"'enterprise-wiki-group_id-label'\"\n [options]=\"allGroups\"\n formControlName=\"group_id\"\n [ngClass]=\"{ 'is-invalid': submitted && f['group_id'].errors }\"\n [placeholder]=\"'Enterprise.Documentation.Placeholder.Team' | transloco\"\n optionValue=\"id\"\n optionLabel=\"name\">\n </p-select>\n </pw-input-container>\n </div>\n <div class=\"col-6 col-md-2\">\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'Enterprise.Tooltip.VisibleGlobally' | transloco\"\n [label]=\"'Enterprise.Documentation.VisibleGlobally' | transloco\"\n name=\"visible_globally\" controlId=\"enterprise-wiki-visible_globally\" [useAriaLabelledbyOnly]=\"true\">\n <ui-switch class=\"d-block\"\n [attr.aria-labelledby]=\"'enterprise-wiki-visible_globally-label'\"\n formControlName=\"visible_globally\"\n (change)=\"onChange($event, 'visible_globally')\"\n name=\"visible_globally\">\n </ui-switch>\n </pw-input-container>\n </div>\n <div class=\"col-6 col-md-2\">\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'Enterprise.Tooltip.Published' | transloco\"\n [label]=\"'Enterprise.Documentation.Published' | transloco\"\n name=\"published\" controlId=\"enterprise-wiki-published\" [useAriaLabelledbyOnly]=\"true\">\n <ui-switch class=\"d-block\"\n [attr.aria-labelledby]=\"'enterprise-wiki-published-label'\"\n formControlName=\"published\"\n (change)=\"onChange($event, 'published')\"\n name=\"published\">\n </ui-switch>\n </pw-input-container>\n </div>\n <div class=\"col-6 col-md-2\">\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'Enterprise.Tooltip.Pushed' | transloco\"\n [label]=\"'Enterprise.Documentation.Pushed' | transloco\"\n name=\"pushed\" controlId=\"enterprise-wiki-pushed\" [useAriaLabelledbyOnly]=\"true\">\n <ui-switch class=\"d-block\"\n [attr.aria-labelledby]=\"'enterprise-wiki-pushed-label'\"\n formControlName=\"pushed\"\n (change)=\"onChange($event, 'pushed')\"\n name=\"pushed\">\n </ui-switch>\n </pw-input-container>\n </div>\n </div>\n\n <h3>{{ 'Enterprise.Documentation.Section.Attachments' | transloco }}</h3>\n <div class=\"row mb-3\">\n <div class=\"col-12 col-md-6\">\n <div class=\"mb-3\">\n <span id=\"enterprise-wiki-file-label\" class=\"pw-label-style\">Upload File</span>\n <p-fileUpload #forms\n [attr.aria-labelledby]=\"'enterprise-wiki-file-label'\"\n name=\"myfile[]\"\n [customUpload]=\"true\"\n [showUploadButton]=\"false\"\n accept=\"\"\n [disabled]=\"uploadedFiles && uploadedFiles.length > 0\"\n (onSelect)=\"onSelect($event)\"\n (onRemove)=\"onRemove($event)\"\n (onError)=\"onUploadError($event)\">\n <ng-template pTemplate=\"content\">\n @if (!uploadedFiles?.length) {\n <div class=\"drag-drop-text\">\n <p>You can drag and drop your file here</p>\n </div>\n }\n </ng-template>\n </p-fileUpload>\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12 text-end mt-3\">\n <button type=\"button\"\n class=\"btn btn-outline-default me-2\"\n (click)=\"onCancel()\"\n (keydown.enter)=\"onCancel()\" >\n {{ 'Button.Cancel' | transloco }}\n </button>\n <button type=\"submit\"\n [buttonBusy]=\"buttonBusy\"\n class=\"btn btn-primary\" [disabled]=\"invalidFile\">\n {{ 'Button.Submit' | transloco }}\n </button>\n </div>\n </div>\n </form>\n @if (filesData?.length) {\n <div\n class=\"mt-5\">\n <h2>Files attached to this documentation page</h2>\n @for (files of filesData; track files; let i = $index) {\n <div class=\"communication-files\"\n >\n <p>\n <a target=\"blank\"\n [href]=\"files.name.url\">\n {{\n files.name.url.split('?')[0].split('/')[\n files.name?.url?.split('?')[0].split('/').length - 1\n ]\n }}\n </a>\n </p>\n <p ngbTooltip=\"Delete\"\n class=\"ms-3\">\n <i\n class=\"fa fa-trash delete-icon\"\n (keydown.enter)=\"deleteCommunicationFiles(files.id, i)\"\n (keydown.space)=\"deleteCommunicationFiles(files.id, i)\"\n (click)=\"deleteCommunicationFiles(files.id, i)\"\n aria-hidden=\"true\"\n ></i>\n </p>\n </div>\n }\n </div>\n }\n </div>\n </div>\n }\n @if (!isEdit) {\n <div class=\"row\">\n <div class=\"col-12 text-end mb-3\">\n <button class=\"btn btn-sm btn-outline-primary\"\n (click)=\"showEditForm()\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> {{ 'Add documentation' }}\n </button>\n </div>\n </div>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n <div class=\"primeng-datatable-container actions-collapsed mt-0 table-responsive\"\n [class.hideTable]=\"totalRecordsUnFiltered === 0\">\n <p-table #dt\n [value]=\"allCommunication\"\n [paginator]=\"totalRecords !== 0\"\n [lazy]=\"true\"\n [rows]=\"PAGE_SIZE\"\n [totalRecords]=\"totalRecords\"\n [loading]=\"loading\"\n (onLazyLoad)=\"onLazyLoad($event)\">\n <ng-template pTemplate=\"caption\">\n <div class=\"search-contact\">\n <div class=\"col-sm-3 mb-2 mb-md-0 filter-domain-list\">\n <p-select\n [options]=\"allDocumentationGroups\"\n optionLabel=\"name\"\n optionValue=\"id\"\n [(ngModel)]=\"groupId\"\n [placeholder]=\"'Enterprise.Documentation.Placeholder.FilterTeam' | transloco\"\n [appendTo]=\"'body'\"\n (onChange)=\"filterDomainsList()\">\n </p-select>\n </div>\n <div class=\"text-end\">\n <label for=\"enterprise-wiki-search\" class=\"visually-hidden\">Search Documentation</label>\n <p-iconfield iconPosition=\"left\">\n <p-inputicon><i class=\"fa fa-search\" aria-hidden=\"true\"></i></p-inputicon>\n <input type=\"text\"\n id=\"enterprise-wiki-search\"\n name=\"enterprise-wiki-search\"\n [(ngModel)]=\"searchText\"\n pInputText\n [placeholder]=\"'Enterprise.Documentation.Placeholder.Search' | transloco\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\" />\n </p-iconfield>\n </div>\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\">{{ 'Enterprise.Documentation.Title' | transloco }}</th>\n <th scope=\"true\">{{ 'Enterprise.Documentation.Sender' | transloco }}</th>\n <th scope=\"true\">{{ 'Enterprise.Documentation.Team' | transloco }}</th>\n <th scope=\"true\">{{ 'Enterprise.Documentation.Files' | transloco }}</th>\n <th scope=\"true\">{{ 'Enterprise.Documentation.Date' | transloco }}</th>\n <th scope=\"true\">{{ 'Enterprise.Documentation.Status' | transloco }}</th>\n <th scope=\"true\"\n class=\"actions-column actions-list-three\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-item>\n <tr class=\"table-row\">\n <td data-head=\"Title\">\n <a [routerLink]=\"[item.id]\">{{ item.title }}</a>\n </td>\n <td data-head=\"Sender\">{{ item.author | ifNameNullShowEmail }}</td>\n <td data-head=\"Team\">{{ item.group?.name }}</td>\n <td data-head=\"Files\">\n @for (files of item.group_communication_files; track files) {\n <span>\n <a target=\"blank\"\n [href]=\"files.name.url\">\n {{\n files.name.url.split('?')[0].split('/')[\n files.name.url.split('?')[0].split('/').length - 1\n ]\n }}\n </a>\n </span>\n }\n </td>\n <td data-head=\"Date\">{{ item.created_at | dateFormat: 'datetime' }}</td>\n <td data-head=\"Status\">\n @if (item.visible_globally) {\n <span\n class=\"badge bg-warning ms-2\">{{\n 'Enterprise.Documentation.Global' | transloco\n }}</span>\n }@if (item.published) {\n <span\n class=\"badge bg-info ms-2\">{{\n 'Enterprise.Documentation.Published' | transloco\n }}</span>\n }@if (item.pushed) {\n <span\n class=\"badge bg-success ms-2\">{{\n 'Enterprise.Documentation.Pushed' | transloco\n }}</span>\n }\n </td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline list-action\">\n <li ngbTooltip=\"Edit\"\n class=\"me-2 me-sm-3\">\n <i\n class=\"fa fa-edit edit-icon\"\n (click)=\"getCommunicationDetails(item.id)\"\n (keydown.enter)=\"getCommunicationDetails(item.id)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n <li ngbTooltip=\"Delete\"\n class=\"me-2 me-sm-3\">\n <i\n class=\"fa fa-trash delete-icon\"\n (keydown.enter)=\"onDelete(item.id)\"\n (keydown.space)=\"onDelete(item.id)\"\n (click)=\"onDelete(item.id)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n <li ngbTooltip=\"See Communication\"\n class=\"me-2 me-sm-3 see-icon\"\n [routerLink]=\"[item.id]\">\n <i class=\"fa fa-eye eye-icon \" aria-hidden=\"true\"></i>\n </li>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n @if (totalRecords === 0 && totalRecordsUnFiltered !== 0 && !groupId) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage'| transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n </div>\n }\n @if (totalRecords !== 0) {\n <pw-records-summary [showing]=\"dt?.value?.length ?? 0\" [total]=\"totalRecords\" />\n }\n </div>\n @if (totalRecordsUnFiltered === 0 && isLoaded) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Enterprise.Documentation.NoDocumentation' | transloco\">\n </pw-no-data>\n </div>\n }\n }\n", styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}:host form>h3{display:block;border-top:1px solid #e2e5ea;margin-top:2rem;padding-top:1.25rem}:host form>h3:first-child{border-top:0;margin-top:.5rem;padding-top:0}.table-row{vertical-align:top}.communication-files{display:flex!important}.search-contact{display:flex;justify-content:space-between}@media(min-width:320px)and (max-width:720px){.search-contact{display:block}}a.previous i{top:0}.eye-icon{color:var(--first);font-size:18px;padding-left:3px;padding-right:3px}.title{display:flex}.drag-drop-text{padding:20px;border:2px dashed #ccc;text-align:center;color:#aaa;margin-top:10px}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$1.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: i4.IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["hostName", "iconPosition", "styleClass"] }, { kind: "component", type: i5.InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["hostName", "styleClass"] }, { kind: "directive", type: i6.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i7.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i9$1.UiSwitchComponent, selector: "ui-switch", inputs: ["size", "color", "switchOffColor", "switchColor", "defaultBgColor", "defaultBoColor", "checkedLabel", "uncheckedLabel", "checkedTextColor", "uncheckedTextColor", "beforeChange", "ariaLabel", "checked", "disabled", "reverse", "loading"], outputs: ["change", "changeEvent", "valueChange"] }, { kind: "component", type: i10.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", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: i11.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: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i9.ButtonBusyDirective, selector: "[buttonBusy]", inputs: ["buttonBusy", "busyText"] }, { kind: "component", type: i13.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: "component", type: i12.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i15.InputContainerComponent, selector: "pw-input-container", inputs: ["name", "controlId", "useAriaLabelledbyOnly", "label", "labelClass", "tooltipPosition", "required", "errorMsg", "isReadOnly", "showTooltip", "tooltipText", "showTriangle", "afterLabel", "showAfterLabel", "showTriangleText", "isLeftTooltip"] }, { kind: "component", type: i15.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "component", type: i15.RecordsSummaryComponent, selector: "pw-records-summary", inputs: ["showing", "total"] }, { kind: "directive", type: i16.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i17.QuillEditorComponent, selector: "quill-editor" }, { kind: "pipe", type: i18.TranslocoPipe, name: "transloco" }, { kind: "pipe", type: i19.DateFormatPipe, name: "dateFormat" }, { kind: "pipe", type: i19.IfNameNullShowEmailPipe, name: "ifNameNullShowEmail" }] }); }
|
|
1547
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: EnterpriseWikiComponent, isStandalone: false, selector: "pw-enterprise-wiki", usesInheritance: true, ngImport: i0, template: "<section>\n <div class=\"row\">\n <div class=\"col-12\" [ngClass]=\"{'mb-3': !isEdit}\">\n <div class=\"title\">\n @if (isEdit) {\n <a\n aria-label=\"Navigate to Target\"\n (click)=\"onCancel()\"\n (keydown.enter)=\"onCancel()\"\n class=\"previous\"><i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n }\n @if (isEdit) {\n <h3 class=\"m-subheader__title m-subheader__title--separator mt-1\">\n <span>{{ !isAdd ? 'Edit' : 'Create a new' }} documentation page</span>\n </h3>\n }\n @if (!isEdit) {\n <h2 [ngClass]=\"{ 'mt-2': isEdit }\">Documentation @if (groupId) {\n <span>for {{ groupName }}</span>\n }</h2>\n }\n </div>\n @if (!isEdit) {\n <p>\n Here you can write the documentation for your organization's members. Documentation\n pages are visible based on the teams the subscription's members are part of.\n </p>\n }\n </div>\n </div>\n </section>\n @if (!isLoaded && isEdit) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (isEdit && isLoaded) {\n <div class=\"container-fluid pw-tab overflow-hidden\">\n <div class=\"p-2 mt-1\">\n <form [formGroup]=\"form\"\n (ngSubmit)=\"onSave()\">\n <h3>{{ 'Enterprise.Documentation.Section.Content' | transloco }}</h3>\n <div class=\"row mb-3\">\n <div class=\"col-12\">\n <pw-input-container [label]=\"'Enterprise.Documentation.Title' | transloco\"\n [errorMsg]=\"'Enterprise.Documentation.Validation.Title' | transloco\"\n name=\"title\" controlId=\"enterprise-wiki-title\">\n <input type=\"text\"\n id=\"enterprise-wiki-title\"\n class=\"form-control\"\n formControlName=\"title\"\n [placeholder]=\"'Enterprise.Documentation.Placeholder.Title' | transloco\"\n [ngClass]=\"{ 'is-invalid': submitted && f.title.errors }\" />\n </pw-input-container>\n </div>\n <pw-input-container [label]=\"'Enterprise.Documentation.Body' | transloco\"\n class=\"col-12\"\n name=\"body\" controlId=\"enterprise-wiki-body\" [useAriaLabelledbyOnly]=\"true\"\n [errorMsg]=\"'Enterprise.Documentation.Validation.Body' | transloco\">\n <quill-editor [styles]=\"{ height: '220px' }\"\n [attr.aria-labelledby]=\"'enterprise-wiki-body-label'\"\n class=\"quillEditor quill-container\" [modules]=\"editorConfig\"\n formControlName=\"body\"\n [placeholder]=\"'Enterprise.Documentation.Placeholder.Body' | transloco\"\n [ngClass]=\"{ 'is-invalid': submitted && f.body.errors }\">\n </quill-editor>\n </pw-input-container>\n </div>\n\n <h3>{{ 'Enterprise.Documentation.Section.Visibility' | transloco }}</h3>\n <div class=\"row mb-3\">\n <div class=\"col-12 col-md-6\">\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'Enterprise.Tooltip.Group' | transloco\"\n [label]=\"'Enterprise.Documentation.Team' | transloco\"\n [isLeftTooltip]=\"true\"\n [errorMsg]=\"'Enterprise.Documentation.Validation.Team' | transloco\"\n name=\"group_id\" controlId=\"enterprise-wiki-group_id\" [useAriaLabelledbyOnly]=\"true\">\n <p-select\n [attr.aria-labelledby]=\"'enterprise-wiki-group_id-label'\"\n [options]=\"allGroups\"\n formControlName=\"group_id\"\n [ngClass]=\"{ 'is-invalid': submitted && f['group_id'].errors }\"\n [placeholder]=\"'Enterprise.Documentation.Placeholder.Team' | transloco\"\n optionValue=\"id\"\n optionLabel=\"name\">\n </p-select>\n </pw-input-container>\n </div>\n <div class=\"col-6 col-md-2\">\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'Enterprise.Tooltip.VisibleGlobally' | transloco\"\n [label]=\"'Enterprise.Documentation.VisibleGlobally' | transloco\"\n name=\"visible_globally\" controlId=\"enterprise-wiki-visible_globally\" [useAriaLabelledbyOnly]=\"true\">\n <ui-switch class=\"d-block\"\n [attr.aria-labelledby]=\"'enterprise-wiki-visible_globally-label'\"\n formControlName=\"visible_globally\"\n (change)=\"onChange($event, 'visible_globally')\"\n name=\"visible_globally\">\n </ui-switch>\n </pw-input-container>\n </div>\n <div class=\"col-6 col-md-2\">\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'Enterprise.Tooltip.Published' | transloco\"\n [label]=\"'Enterprise.Documentation.Published' | transloco\"\n name=\"published\" controlId=\"enterprise-wiki-published\" [useAriaLabelledbyOnly]=\"true\">\n <ui-switch class=\"d-block\"\n [attr.aria-labelledby]=\"'enterprise-wiki-published-label'\"\n formControlName=\"published\"\n (change)=\"onChange($event, 'published')\"\n name=\"published\">\n </ui-switch>\n </pw-input-container>\n </div>\n <div class=\"col-6 col-md-2\">\n <pw-input-container [showTooltip]=\"true\"\n [tooltipText]=\"'Enterprise.Tooltip.Pushed' | transloco\"\n [label]=\"'Enterprise.Documentation.Pushed' | transloco\"\n name=\"pushed\" controlId=\"enterprise-wiki-pushed\" [useAriaLabelledbyOnly]=\"true\">\n <ui-switch class=\"d-block\"\n [attr.aria-labelledby]=\"'enterprise-wiki-pushed-label'\"\n formControlName=\"pushed\"\n (change)=\"onChange($event, 'pushed')\"\n name=\"pushed\">\n </ui-switch>\n </pw-input-container>\n </div>\n </div>\n\n <h3>{{ 'Enterprise.Documentation.Section.Attachments' | transloco }}</h3>\n <div class=\"row mb-3\">\n <div class=\"col-12 col-md-6\">\n <div class=\"mb-3\">\n <span id=\"enterprise-wiki-file-label\" class=\"pw-label-style\">Upload File</span>\n <p-fileUpload #forms\n [attr.aria-labelledby]=\"'enterprise-wiki-file-label'\"\n name=\"myfile[]\"\n [customUpload]=\"true\"\n [showUploadButton]=\"false\"\n accept=\"\"\n [disabled]=\"uploadedFiles && uploadedFiles.length > 0\"\n (onSelect)=\"onSelect($event)\"\n (onRemove)=\"onRemove($event)\"\n (onError)=\"onUploadError($event)\">\n <ng-template pTemplate=\"content\">\n @if (!uploadedFiles?.length) {\n <div class=\"drag-drop-text\">\n <p>You can drag and drop your file here</p>\n </div>\n }\n </ng-template>\n </p-fileUpload>\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12 text-end mt-3\">\n <button type=\"button\"\n class=\"btn btn-outline-default me-2\"\n (click)=\"onCancel()\"\n (keydown.enter)=\"onCancel()\" >\n {{ 'Button.Cancel' | transloco }}\n </button>\n <button type=\"submit\"\n [buttonBusy]=\"buttonBusy\"\n class=\"btn btn-primary\" [disabled]=\"invalidFile\">\n {{ 'Button.Submit' | transloco }}\n </button>\n </div>\n </div>\n </form>\n @if (filesData?.length) {\n <div\n class=\"mt-5\">\n <h2>Files attached to this documentation page</h2>\n @for (files of filesData; track files; let i = $index) {\n <div class=\"communication-files\"\n >\n <p>\n <a target=\"blank\"\n [href]=\"files.name.url\">\n {{\n files.name.url.split('?')[0].split('/')[\n files.name?.url?.split('?')[0].split('/').length - 1\n ]\n }}\n </a>\n </p>\n <p ngbTooltip=\"Delete\"\n class=\"ms-3\">\n <i\n class=\"fa fa-trash delete-icon\"\n (keydown.enter)=\"deleteCommunicationFiles(files.id, i)\"\n (keydown.space)=\"deleteCommunicationFiles(files.id, i)\"\n (click)=\"deleteCommunicationFiles(files.id, i)\"\n aria-hidden=\"true\"\n ></i>\n </p>\n </div>\n }\n </div>\n }\n </div>\n </div>\n }\n @if (!isEdit) {\n <div class=\"row\">\n <div class=\"col-12 text-end mb-3\">\n <button class=\"btn btn-sm btn-outline-primary\"\n (click)=\"showEditForm()\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> {{ 'Add documentation' }}\n </button>\n </div>\n </div>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n <div class=\"primeng-datatable-container actions-collapsed mt-0 table-responsive\"\n [class.hideTable]=\"totalRecordsUnFiltered === 0\">\n <p-table #dt\n [value]=\"allCommunication\"\n [paginator]=\"totalRecords !== 0\"\n [lazy]=\"true\"\n [rows]=\"PAGE_SIZE\"\n [totalRecords]=\"totalRecords\"\n [loading]=\"loading\"\n (onLazyLoad)=\"onLazyLoad($event)\">\n <ng-template pTemplate=\"caption\">\n <div class=\"search-contact\">\n <div class=\"col-sm-3 mb-2 mb-md-0 filter-domain-list\">\n <p-select\n [options]=\"allDocumentationGroups\"\n optionLabel=\"name\"\n optionValue=\"id\"\n [(ngModel)]=\"groupId\"\n [placeholder]=\"'Enterprise.Documentation.Placeholder.FilterTeam' | transloco\"\n [appendTo]=\"'body'\"\n (onChange)=\"filterDomainsList()\">\n </p-select>\n </div>\n <div class=\"text-end\">\n <label for=\"enterprise-wiki-search\" class=\"visually-hidden\">Search Documentation</label>\n <p-iconfield iconPosition=\"left\">\n <p-inputicon><i class=\"fa fa-search\" aria-hidden=\"true\"></i></p-inputicon>\n <input type=\"text\"\n id=\"enterprise-wiki-search\"\n name=\"enterprise-wiki-search\"\n [(ngModel)]=\"searchText\"\n pInputText\n [placeholder]=\"'Enterprise.Documentation.Placeholder.Search' | transloco\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\" />\n </p-iconfield>\n </div>\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\">{{ 'Enterprise.Documentation.Title' | transloco }}</th>\n <th scope=\"true\">{{ 'Enterprise.Documentation.Sender' | transloco }}</th>\n <th scope=\"true\">{{ 'Enterprise.Documentation.Team' | transloco }}</th>\n <th scope=\"true\">{{ 'Enterprise.Documentation.Files' | transloco }}</th>\n <th scope=\"true\">{{ 'Enterprise.Documentation.Date' | transloco }}</th>\n <th scope=\"true\">{{ 'Enterprise.Documentation.Status' | transloco }}</th>\n <th scope=\"true\"\n class=\"actions-column actions-list-three\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-item>\n <tr class=\"table-row\">\n <td data-head=\"Title\">\n <a [routerLink]=\"[item.id]\">{{ item.title }}</a>\n </td>\n <td data-head=\"Sender\">{{ item.author | ifNameNullShowEmail }}</td>\n <td data-head=\"Team\">{{ item.group?.name }}</td>\n <td data-head=\"Files\">\n @for (files of item.group_communication_files; track files) {\n <span>\n <a target=\"blank\"\n [href]=\"files.name.url\">\n {{\n files.name.url.split('?')[0].split('/')[\n files.name.url.split('?')[0].split('/').length - 1\n ]\n }}\n </a>\n </span>\n }\n </td>\n <td data-head=\"Date\">{{ item.created_at | dateFormat: 'datetime' }}</td>\n <td data-head=\"Status\">\n @if (item.visible_globally) {\n <span\n class=\"badge bg-warning ms-2\">{{\n 'Enterprise.Documentation.Global' | transloco\n }}</span>\n }@if (item.published) {\n <span\n class=\"badge bg-info ms-2\">{{\n 'Enterprise.Documentation.Published' | transloco\n }}</span>\n }@if (item.pushed) {\n <span\n class=\"badge bg-success ms-2\">{{\n 'Enterprise.Documentation.Pushed' | transloco\n }}</span>\n }\n </td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline list-action\">\n <li ngbTooltip=\"Edit\"\n class=\"me-2 me-sm-3\">\n <i\n class=\"fa fa-edit edit-icon\"\n (click)=\"getCommunicationDetails(item.id)\"\n (keydown.enter)=\"getCommunicationDetails(item.id)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n <li ngbTooltip=\"Delete\"\n class=\"me-2 me-sm-3\">\n <i\n class=\"fa fa-trash delete-icon\"\n (keydown.enter)=\"onDelete(item.id)\"\n (keydown.space)=\"onDelete(item.id)\"\n (click)=\"onDelete(item.id)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n <li ngbTooltip=\"See Communication\"\n class=\"me-2 me-sm-3 see-icon\"\n [routerLink]=\"[item.id]\">\n <i class=\"fa fa-eye eye-icon \" aria-hidden=\"true\"></i>\n </li>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n @if (totalRecords === 0 && totalRecordsUnFiltered !== 0 && !groupId) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage'| transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n </div>\n }\n @if (totalRecords !== 0) {\n <pw-records-summary [showing]=\"dt?.value?.length ?? 0\" [total]=\"totalRecords\" />\n }\n </div>\n @if (totalRecordsUnFiltered === 0 && isLoaded) {\n <div>\n <pw-no-data [withImage]=\"true\" [message]=\"'Enterprise.Documentation.NoDocumentation' | transloco\">\n </pw-no-data>\n </div>\n }\n }\n", styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}:host form>h3{display:block;border-top:1px solid #e2e5ea;margin-top:2rem;padding-top:1.25rem}:host form>h3:first-child{border-top:0;margin-top:.5rem;padding-top:0}.table-row{vertical-align:top}.communication-files{display:flex!important}.search-contact{display:flex;justify-content:space-between}@media(min-width:320px)and (max-width:720px){.search-contact{display:block}}a.previous i{top:0}.eye-icon{color:var(--first);font-size:18px;padding-left:3px;padding-right:3px}.title{display:flex}.drag-drop-text{padding:20px;border:2px dashed #ccc;text-align:center;color:#aaa;margin-top:10px}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$1.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: i4.IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["hostName", "iconPosition", "styleClass"] }, { kind: "component", type: i5.InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["hostName", "styleClass"] }, { kind: "directive", type: i6.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i7.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i9.UiSwitchComponent, selector: "ui-switch", inputs: ["size", "color", "switchOffColor", "switchColor", "defaultBgColor", "defaultBoColor", "checkedLabel", "uncheckedLabel", "checkedTextColor", "uncheckedTextColor", "beforeChange", "ariaLabel", "checked", "disabled", "reverse", "loading"], outputs: ["change", "changeEvent", "valueChange"] }, { kind: "component", type: i10$1.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", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: i11.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: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i10.ButtonBusyDirective, selector: "[buttonBusy]", inputs: ["buttonBusy", "busyText"] }, { kind: "component", type: i13$1.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: "component", type: i13.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i4$1.InputContainerComponent, selector: "pw-input-container", inputs: ["name", "controlId", "useAriaLabelledbyOnly", "label", "labelClass", "tooltipPosition", "required", "errorMsg", "isReadOnly", "showTooltip", "tooltipText", "showTriangle", "afterLabel", "showAfterLabel", "showTriangleText", "isLeftTooltip"] }, { kind: "component", type: i4$1.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "component", type: i4$1.RecordsSummaryComponent, selector: "pw-records-summary", inputs: ["showing", "total"] }, { kind: "directive", type: i16.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i17.QuillEditorComponent, selector: "quill-editor" }, { kind: "pipe", type: i18.TranslocoPipe, name: "transloco" }, { kind: "pipe", type: i19.DateFormatPipe, name: "dateFormat" }, { kind: "pipe", type: i19.IfNameNullShowEmailPipe, name: "ifNameNullShowEmail" }] }); }
|
|
1549
1548
|
}
|
|
1550
1549
|
__decorate([
|
|
1551
1550
|
ValidateForm('form'),
|
|
@@ -1605,7 +1604,7 @@ class EnterpriseWikiDetailsComponent extends AppBaseComponent {
|
|
|
1605
1604
|
super.ngOnDestroy();
|
|
1606
1605
|
}
|
|
1607
1606
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: EnterpriseWikiDetailsComponent, deps: [{ token: i0.Injector }, { token: i1.GroupService }, { token: i2.DomSanitizer }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1608
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: EnterpriseWikiDetailsComponent, isStandalone: false, selector: "pw-enterprise-wiki-details", usesInheritance: true, ngImport: i0, template: "<div class=\"row\">\n <div class=\"col-12 d-flex\">\n <a aria-label=\"Navigate to Target\"\n (click)=\"onCancel()\"\n (keydown.enter)=\"onCancel()\"\n class=\"previous\"><i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n <h2 class=\"mt-0 mb-0\">Documentation</h2>\n </div>\n </div>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (isLoaded) {\n <div>\n @if (communicationDetails) {\n <div class=\"content-quill-wrapper container-fluid pw-tab overflow-hidden mt-3\">\n <div class=\"pb-0\">\n <div class=\"card-body p-4\">\n <div class=\"row mb-3\">\n <div class=\"col-12 d-flex flex-wrap justify-content-between align-items-center mb-md-2\">\n <div class=\"d-flex flex-wrap mb-3 mb-md-0\">\n <span [ngClass]=\"communicationDetails?.pushed ? 'badge bg-success' : 'badge bg-danger'\" class=\"me-2 mb-2 mb-md-0\">\n {{ communicationDetails?.pushed ? 'Pushed' : 'Not Pushed' }}\n </span>\n <span [ngClass]=\"communicationDetails?.published? 'badge bg-success' : 'badge bg-danger'\" class=\"me-2 mb-2 mb-md-0\">\n {{ communicationDetails?.published ? 'Published' : 'Not Published' }}\n </span>\n <span [ngClass]=\"communicationDetails?.published ? 'badge bg-success' : 'badge bg-danger'\" class=\"me-2 mb-2 mb-md-0\">\n {{ communicationDetails?.visible_globally ? 'Visible Globally' : 'Not Visible Globally' }}\n </span>\n </div>\n <div class=\"d-flex flex-wrap mb-3 mb-md-0\">\n <span class=\"badge bg-cyan mb-2 me-2 mb-md-0\">{{communicationDetails?.group?.name}}</span>\n <span class=\"badge bg-blue-grey mb-2 me-2 mb-md-0\">{{ 'Created At (' + (communicationDetails?.created_at | date: 'dd-MMM-yyyy') + ')' }}</span>\n @if (communicationDetails?.pushed_at) {\n <span class=\"badge bg-grey mb-2 mb-md-0\">{{ 'Pushed At (' + (communicationDetails?.pushed_at | date: 'dd-MMM-yyyy') + ')' }}</span>\n }\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12 mb-3 ms-2\">\n <h5>{{ communicationDetails?.title }}</h5>\n </div>\n <div class=\"col-12 mb-3 ms-2 message-icon\">\n <a [routerLink]=\"['/members', communicationDetails?.author?.slug]\">{{\n communicationDetails?.author | ifNameNullShowEmail\n }}</a>\n <div class=\"ms-2\"\n ngbTooltip=\"Message\"\n *rbacAllow=\"chatPermission\">\n <i\n [routerLink]=\"['/message']\"\n [fragment]=\"communicationDetails?.author?.slug\"\n class=\"fa fa-comments cta1-icon\"\n aria-hidden=\"true\"\n ></i>\n </div>\n </div>\n <div class=\"col-12 ms-2\">\n <div class=\"ql-container ql-snow body-quill\">\n <div class=\"ql-editor\"\n [innerHTML]=\"communicationDetails?.body\">\n </div>\n </div>\n </div>\n <div class=\"col-12 col-sm-10\">\n @for (\n files of communicationDetails?.group_communication_files; track trackByFileId($index,\n files)) {\n <p>\n <a [href]=\"files?.name?.url\"\n target=\"blank\">{{\n files?.name?.url?.split('?')[0]?.split('/')[\n files?.name?.url.split('?')[0]?.split('/')?.length - 1\n ]\n }}</a>\n </p>\n }\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n", styles: [".badge-success,.badge-danger{padding:.5rem 1rem;border:1px solid black;font-size:1rem;display:inline-block;text-align:center}.badge-success{background-color:green;color:#fff}.badge-danger{background-color:red;color:#fff}.message-icon{display:flex}.ql-container{resize:none!important}.date-span{padding:.5rem 1rem;font-size:1rem;border:1px solid black;display:inline-block;text-align:center}.light-gray{background-color:#d3d3d3;color:#fff}.gray{background-color:gray;color:#fff}.card-body{padding:1.5rem}h4,h5{font-weight:700;margin-bottom:.5rem}p{margin-bottom:1rem}.d-flex{display:flex;align-items:center}.me-3{margin-right:1rem}.container-fluid{padding:0}.mb-3{margin-bottom:1rem}.mb-2{margin-bottom:.5rem}.justify-content-between{justify-content:space-between}.align-items-center{align-items:center}.button-width{width:100px}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i7.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type:
|
|
1607
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: EnterpriseWikiDetailsComponent, isStandalone: false, selector: "pw-enterprise-wiki-details", usesInheritance: true, ngImport: i0, template: "<div class=\"row\">\n <div class=\"col-12 d-flex\">\n <a aria-label=\"Navigate to Target\"\n (click)=\"onCancel()\"\n (keydown.enter)=\"onCancel()\"\n class=\"previous\"><i class=\"fa fa-arrow-alt-circle-left\" aria-hidden=\"true\"></i></a>\n <h2 class=\"mt-0 mb-0\">Documentation</h2>\n </div>\n </div>\n @if (!isLoaded) {\n <div class=\"w-100 text-center mt-3\"\n >\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n }\n @if (isLoaded) {\n <div>\n @if (communicationDetails) {\n <div class=\"content-quill-wrapper container-fluid pw-tab overflow-hidden mt-3\">\n <div class=\"pb-0\">\n <div class=\"card-body p-4\">\n <div class=\"row mb-3\">\n <div class=\"col-12 d-flex flex-wrap justify-content-between align-items-center mb-md-2\">\n <div class=\"d-flex flex-wrap mb-3 mb-md-0\">\n <span [ngClass]=\"communicationDetails?.pushed ? 'badge bg-success' : 'badge bg-danger'\" class=\"me-2 mb-2 mb-md-0\">\n {{ communicationDetails?.pushed ? 'Pushed' : 'Not Pushed' }}\n </span>\n <span [ngClass]=\"communicationDetails?.published? 'badge bg-success' : 'badge bg-danger'\" class=\"me-2 mb-2 mb-md-0\">\n {{ communicationDetails?.published ? 'Published' : 'Not Published' }}\n </span>\n <span [ngClass]=\"communicationDetails?.published ? 'badge bg-success' : 'badge bg-danger'\" class=\"me-2 mb-2 mb-md-0\">\n {{ communicationDetails?.visible_globally ? 'Visible Globally' : 'Not Visible Globally' }}\n </span>\n </div>\n <div class=\"d-flex flex-wrap mb-3 mb-md-0\">\n <span class=\"badge bg-cyan mb-2 me-2 mb-md-0\">{{communicationDetails?.group?.name}}</span>\n <span class=\"badge bg-blue-grey mb-2 me-2 mb-md-0\">{{ 'Created At (' + (communicationDetails?.created_at | date: 'dd-MMM-yyyy') + ')' }}</span>\n @if (communicationDetails?.pushed_at) {\n <span class=\"badge bg-grey mb-2 mb-md-0\">{{ 'Pushed At (' + (communicationDetails?.pushed_at | date: 'dd-MMM-yyyy') + ')' }}</span>\n }\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12 mb-3 ms-2\">\n <h5>{{ communicationDetails?.title }}</h5>\n </div>\n <div class=\"col-12 mb-3 ms-2 message-icon\">\n <a [routerLink]=\"['/members', communicationDetails?.author?.slug]\">{{\n communicationDetails?.author | ifNameNullShowEmail\n }}</a>\n <div class=\"ms-2\"\n ngbTooltip=\"Message\"\n *rbacAllow=\"chatPermission\">\n <i\n [routerLink]=\"['/message']\"\n [fragment]=\"communicationDetails?.author?.slug\"\n class=\"fa fa-comments cta1-icon\"\n aria-hidden=\"true\"\n ></i>\n </div>\n </div>\n <div class=\"col-12 ms-2\">\n <div class=\"ql-container ql-snow body-quill\">\n <div class=\"ql-editor\"\n [innerHTML]=\"communicationDetails?.body\">\n </div>\n </div>\n </div>\n <div class=\"col-12 col-sm-10\">\n @for (\n files of communicationDetails?.group_communication_files; track trackByFileId($index,\n files)) {\n <p>\n <a [href]=\"files?.name?.url\"\n target=\"blank\">{{\n files?.name?.url?.split('?')[0]?.split('/')[\n files?.name?.url.split('?')[0]?.split('/')?.length - 1\n ]\n }}</a>\n </p>\n }\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n", styles: [".badge-success,.badge-danger{padding:.5rem 1rem;border:1px solid black;font-size:1rem;display:inline-block;text-align:center}.badge-success{background-color:green;color:#fff}.badge-danger{background-color:red;color:#fff}.message-icon{display:flex}.ql-container{resize:none!important}.date-span{padding:.5rem 1rem;font-size:1rem;border:1px solid black;display:inline-block;text-align:center}.light-gray{background-color:#d3d3d3;color:#fff}.gray{background-color:gray;color:#fff}.card-body{padding:1.5rem}h4,h5{font-weight:700;margin-bottom:.5rem}p{margin-bottom:1rem}.d-flex{display:flex;align-items:center}.me-3{margin-right:1rem}.container-fluid{padding:0}.mb-3{margin-bottom:1rem}.mb-2{margin-bottom:.5rem}.justify-content-between{justify-content:space-between}.align-items-center{align-items:center}.button-width{width:100px}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i7.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type: i10.RbacAllowDirective, selector: "[rbacAllow]", inputs: ["rbacAllow"] }, { kind: "component", type: i13.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "directive", type: i16.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: i3.DatePipe, name: "date" }, { kind: "pipe", type: i19.IfNameNullShowEmailPipe, name: "ifNameNullShowEmail" }] }); }
|
|
1609
1608
|
}
|
|
1610
1609
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: EnterpriseWikiDetailsComponent, decorators: [{
|
|
1611
1610
|
type: Component,
|