@posiwise/enterprise-module 0.0.103 → 0.0.105

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.
@@ -444,7 +444,7 @@ class EnterpriseCommunicationsComponent extends AppBaseComponent {
444
444
  super.ngOnDestroy();
445
445
  }
446
446
  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 <div class=\"row mb-3\">\n <div class=\"col-12 col-md-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 [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 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-6\">\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 [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 class=\"col-12 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-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-12 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-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-12 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-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 class=\"col-12 col-md-6\">\n <h4 class=\"mt-4\">You can add files to your communication here</h4>\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 @if (uploadedFiles?.length) {\n <ng-template pTemplate=\"content\"\n >\n @if (!filesUploaded && (!uploadedFiles || uploadedFiles.length === 0)) {\n <div class=\"drag-drop-text\">\n <p>You can drag and drop your file here</p>\n </div>\n }\n </ng-template>\n }\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=\"Select Communication Team\"\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=\"Search Communications...\"\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\">{{ '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)}.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" }] }); }
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.Team' | 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" }] }); }
448
448
  }
449
449
  __decorate([
450
450
  ValidateForm('form'),
@@ -454,7 +454,7 @@ __decorate([
454
454
  ], EnterpriseCommunicationsComponent.prototype, "onSave", null);
455
455
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: EnterpriseCommunicationsComponent, decorators: [{
456
456
  type: Component,
457
- args: [{ selector: 'pw-enterprise-communications', standalone: false, 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 <div class=\"row mb-3\">\n <div class=\"col-12 col-md-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 [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 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-6\">\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 [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 class=\"col-12 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-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-12 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-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-12 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-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 class=\"col-12 col-md-6\">\n <h4 class=\"mt-4\">You can add files to your communication here</h4>\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 @if (uploadedFiles?.length) {\n <ng-template pTemplate=\"content\"\n >\n @if (!filesUploaded && (!uploadedFiles || uploadedFiles.length === 0)) {\n <div class=\"drag-drop-text\">\n <p>You can drag and drop your file here</p>\n </div>\n }\n </ng-template>\n }\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=\"Select Communication Team\"\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=\"Search Communications...\"\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\">{{ '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)}.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"] }]
457
+ args: [{ selector: 'pw-enterprise-communications', standalone: false, 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.Team' | 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"] }]
458
458
  }], ctorParameters: () => [{ type: i1.GroupService }, { type: i0.Injector }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i0.ElementRef }], propDecorators: { onSave: [] } });
459
459
 
460
460
  class EnterpriseInsightsComponent extends AppBaseComponent {
@@ -1111,11 +1111,11 @@ class EnterprisePartnersComponent extends AppBaseComponent {
1111
1111
  return [];
1112
1112
  }
1113
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=\"Search partner...\"\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\">{{ '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 @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=\"Email\" id=\"input_email_2\" 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=\"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 #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=\"Search Product\"\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 <div class=\"text-center mt-4\">\n <input type=\"button\"\n class=\"btn btn-outline-primary 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" }] }); }
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" }] }); }
1115
1115
  }
1116
1116
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: EnterprisePartnersComponent, decorators: [{
1117
1117
  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=\"Search partner...\"\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\">{{ '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 @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=\"Email\" id=\"input_email_2\" 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=\"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 #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=\"Search Product\"\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 <div class=\"text-center mt-4\">\n <input type=\"button\"\n class=\"btn btn-outline-primary 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
+ 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
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: [{
1120
1120
  type: ViewChild,
1121
1121
  args: ['refProduct']
@@ -1545,7 +1545,7 @@ class EnterpriseWikiComponent extends AppBaseComponent {
1545
1545
  super.ngOnDestroy();
1546
1546
  }
1547
1547
  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 <div class=\"row mb-3\">\n <div class=\"col-12 col-md-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 [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 [ngClass]=\"{ 'is-invalid': submitted && f.body.errors }\">\n </quill-editor>\n </pw-input-container>\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]=\"'Select Team'\"\n optionValue=\"id\"\n optionLabel=\"name\">\n </p-select>\n </pw-input-container>\n </div>\n <div class=\"col-12 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-12 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-12 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 class=\"col-12 col-md-6\">\n <h4 class=\"mt-4\">You can add files to your documentation page here</h4>\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 @if (uploadedFiles?.length) {\n <ng-template pTemplate=\"content\"\n >\n @if (!filesUploaded && (!uploadedFiles || uploadedFiles.length === 0)) {\n <div class=\"drag-drop-text\">\n <p>You can drag and drop your file here</p>\n </div>\n }\n </ng-template>\n }\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=\"Select Documentation Team\"\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=\"Search Documentation...\"\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\">{{ '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)}.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" }] }); }
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.Team' | 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" }] }); }
1549
1549
  }
1550
1550
  __decorate([
1551
1551
  ValidateForm('form'),
@@ -1555,7 +1555,7 @@ __decorate([
1555
1555
  ], EnterpriseWikiComponent.prototype, "onSave", null);
1556
1556
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: EnterpriseWikiComponent, decorators: [{
1557
1557
  type: Component,
1558
- args: [{ selector: 'pw-enterprise-wiki', standalone: false, 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 <div class=\"row mb-3\">\n <div class=\"col-12 col-md-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 [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 [ngClass]=\"{ 'is-invalid': submitted && f.body.errors }\">\n </quill-editor>\n </pw-input-container>\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]=\"'Select Team'\"\n optionValue=\"id\"\n optionLabel=\"name\">\n </p-select>\n </pw-input-container>\n </div>\n <div class=\"col-12 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-12 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-12 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 class=\"col-12 col-md-6\">\n <h4 class=\"mt-4\">You can add files to your documentation page here</h4>\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 @if (uploadedFiles?.length) {\n <ng-template pTemplate=\"content\"\n >\n @if (!filesUploaded && (!uploadedFiles || uploadedFiles.length === 0)) {\n <div class=\"drag-drop-text\">\n <p>You can drag and drop your file here</p>\n </div>\n }\n </ng-template>\n }\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=\"Select Documentation Team\"\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=\"Search Documentation...\"\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\">{{ '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)}.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"] }]
1558
+ args: [{ selector: 'pw-enterprise-wiki', standalone: false, 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.Team' | 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"] }]
1559
1559
  }], ctorParameters: () => [{ type: i1.GroupService }, { type: i0.Injector }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i0.ElementRef }], propDecorators: { onSave: [] } });
1560
1560
 
1561
1561
  class EnterpriseWikiDetailsComponent extends AppBaseComponent {