@alfresco/adf-content-services 8.4.0-19134168248 → 8.4.0-19164079943
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.
|
@@ -659,7 +659,9 @@
|
|
|
659
659
|
"TITLE_TOO_SHORT": "Title must be at least 2 characters long",
|
|
660
660
|
"ILLEGAL_CHARACTERS": "Use numbers and letters only",
|
|
661
661
|
"ONLY_SPACES": "Library name can't contain only spaces",
|
|
662
|
-
"LIBRARY_UPDATE_ERROR": "There was an error updating library properties"
|
|
662
|
+
"LIBRARY_UPDATE_ERROR": "There was an error updating library properties",
|
|
663
|
+
"NAME_REQUIRED": "Library name is required",
|
|
664
|
+
"ID_REQUIRED": "Library ID is required"
|
|
663
665
|
},
|
|
664
666
|
"SUCCESS": {
|
|
665
667
|
"LIBRARY_UPDATED": "Library properties updated"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Component, InjectionToken, Optional, Inject, Injectable, inject, ViewEncapsulation, HostListener, Input, Directive, DestroyRef, EventEmitter, Output, ViewChild, ElementRef, ContentChildren, ViewContainerRef, ContentChild, NgZone, forwardRef, TemplateRef, Pipe, HostBinding, ChangeDetectionStrategy, Host, NgModule, ViewChildren, Injector, runInInjectionContext, APP_INITIALIZER } from '@angular/core';
|
|
3
3
|
import * as i3 from '@alfresco/js-api';
|
|
4
|
-
import { AlfrescoApiConfig, AlfrescoApi, ContentApi, TrashcanApi, NodesApi, PeopleApi, SitesApi, SearchApi, SharedlinksApi, FavoritesApi, SEARCH_LANGUAGE, SiteMemberPaging, DiscoveryApi, AboutApi, SystemPropertiesApi, UploadApi, VersionsApi, RenditionsApi, PreferencesApi, DownloadsApi, FileDownloadStatus, TagsApi, TagBody, CategoriesApi, QueriesApi, Pagination, SiteEntry, Site, NodePagingList, Node, UserInfo, ContentInfo, Category, ClassesApi, TypesApi, CategoryLinkBody, AspectsApi, GroupsApi, NodeEntry, CommentsApi, SecurityGroupsApi, SecurityMarksApi, AuthorityClearanceApi, PredictionsApi, LegalHoldApi, AgentsApi, SearchAiApi, PathInfo, ResultSetRowEntry, ResultNode, ResultSetPaging,
|
|
4
|
+
import { AlfrescoApiConfig, AlfrescoApi, ContentApi, TrashcanApi, NodesApi, PeopleApi, SitesApi, SearchApi, SharedlinksApi, FavoritesApi, SEARCH_LANGUAGE, SiteMemberPaging, DiscoveryApi, AboutApi, SystemPropertiesApi, UploadApi, VersionsApi, RenditionsApi, PreferencesApi, DownloadsApi, FileDownloadStatus, TagsApi, TagBody, CategoriesApi, QueriesApi, Pagination, SiteEntry, Site, NodePagingList, Node, UserInfo, ContentInfo, Category, SitePaging, ClassesApi, TypesApi, CategoryLinkBody, AspectsApi, GroupsApi, NodeEntry, CommentsApi, SecurityGroupsApi, SecurityMarksApi, AuthorityClearanceApi, PredictionsApi, LegalHoldApi, AgentsApi, SearchAiApi, PathInfo, ResultSetRowEntry, ResultNode, ResultSetPaging, SitePagingList } from '@alfresco/js-api';
|
|
5
5
|
import { ReplaySubject, Subject, from, throwError, Observable, of, forkJoin, take as take$1, switchMap as switchMap$1, tap as tap$1, catchError as catchError$1, map as map$1, BehaviorSubject, timer, merge, EMPTY, Subscription, defer, zip, iif } from 'rxjs';
|
|
6
6
|
import * as i2 from '@alfresco/adf-core';
|
|
7
7
|
import { AppConfigValues, BpmProductVersionModel, AppConfigService, ObjectUtils, DataSorting, BaseEvent, DateFnsUtils, ADF_DATE_FORMATS, ADF_DATETIME_FORMATS, AdfDateFnsAdapter, AdfDateTimeFnsAdapter, UserPreferenceValues, IconComponent, HeaderFilterTemplateDirective, DataTableSchema, ShowHeaderMode, DataTableComponent, NoContentTemplateDirective, EmptyListComponent, NoPermissionTemplateDirective, LoadingContentTemplateDirective, MainMenuDataTableTemplateDirective, ColumnsSelectorComponent, DataColumnListComponent, CustomLoadingContentTemplateDirective, CustomNoPermissionTemplateDirective, CustomEmptyContentTemplateDirective, DataTableService, TranslationService, FileUtils, NotificationService, EXTENDIBLE_COMPONENT, FileSizePipe, InfiniteSelectScrollDirective, ToolbarTitleComponent, ToolbarComponent, HighlightDirective, DataColumnComponent, InfinitePaginationComponent, DynamicChipListComponent, SortingPickerComponent, SearchTextInputComponent, HighlightPipe, ConfirmDialogComponent, FileTypePipe, ContextMenuDirective, CardViewTextItemModel, CardViewDateItemModel, CardViewItemMatchValidator, UserPreferencesService, LogService, CardViewSelectItemModel, MultiValuePipe, CardViewBoolItemModel, CardViewDatetimeItemModel, CardViewFloatItemModel, CardViewLongItemModel, CardViewIntItemModel, DecimalNumberPipe, CardViewComponent, User, InitialUsernamePipe, DateColumnHeaderComponent, EmptyContentComponent, ClipboardDirective, CommentModel, CommentsComponent, ADF_COMMENTS_SERVICE, CloseButtonPosition, ViewerToolbarComponent, ViewerSidebarComponent, ViewerToolbarActionsComponent, ViewerMoreActionsComponent, ViewerOpenWithComponent, ViewUtilService, VIEWER_DIRECTIVES, provideTranslations, CoreModule, NoopAuthModule, NoopTranslateModule } from '@alfresco/adf-core';
|
|
@@ -19841,6 +19841,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
19841
19841
|
args: [MAT_DIALOG_DATA]
|
|
19842
19842
|
}] }] });
|
|
19843
19843
|
|
|
19844
|
+
/*!
|
|
19845
|
+
* @license
|
|
19846
|
+
* Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
19847
|
+
*
|
|
19848
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
19849
|
+
* you may not use this file except in compliance with the License.
|
|
19850
|
+
* You may obtain a copy of the License at
|
|
19851
|
+
*
|
|
19852
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
19853
|
+
*
|
|
19854
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
19855
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
19856
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19857
|
+
* See the License for the specific language governing permissions and
|
|
19858
|
+
* limitations under the License.
|
|
19859
|
+
*/
|
|
19844
19860
|
class LibraryDialogComponent {
|
|
19845
19861
|
get queriesApi() {
|
|
19846
19862
|
this._queriesApi = this._queriesApi ?? new QueriesApi(this.alfrescoApiService.getInstance());
|
|
@@ -19877,7 +19893,7 @@ class LibraryDialogComponent {
|
|
|
19877
19893
|
ngOnInit() {
|
|
19878
19894
|
const validators = {
|
|
19879
19895
|
id: [Validators.required, Validators.maxLength(72), this.forbidSpecialCharacters],
|
|
19880
|
-
title: [Validators.required, this.forbidOnlySpaces,
|
|
19896
|
+
title: [Validators.required, this.forbidOnlySpaces, this.minLengthTrimmed, Validators.maxLength(256)],
|
|
19881
19897
|
description: [Validators.maxLength(512)]
|
|
19882
19898
|
};
|
|
19883
19899
|
this.form = this.formBuilder.group({
|
|
@@ -19887,7 +19903,10 @@ class LibraryDialogComponent {
|
|
|
19887
19903
|
});
|
|
19888
19904
|
this.visibilityOption = this.visibilityOptions[0].value;
|
|
19889
19905
|
this.form.controls['title'].valueChanges
|
|
19890
|
-
.pipe(
|
|
19906
|
+
.pipe(take(1), takeUntilDestroyed(this.destroyRef))
|
|
19907
|
+
.subscribe(() => this.form.controls['title'].markAsTouched());
|
|
19908
|
+
this.form.controls['title'].valueChanges
|
|
19909
|
+
.pipe(debounceTime(500), mergeMap((title) => from(this.checkLibraryNameExists(title)).pipe(map(() => title))), takeUntilDestroyed(this.destroyRef))
|
|
19891
19910
|
.subscribe((title) => {
|
|
19892
19911
|
if (!this.form.controls['id'].dirty && this.canGenerateId(title)) {
|
|
19893
19912
|
this.form.patchValue({ id: this.sanitize(title.trim()) });
|
|
@@ -19918,10 +19937,13 @@ class LibraryDialogComponent {
|
|
|
19918
19937
|
this.disableCreateButton = true;
|
|
19919
19938
|
this.create()
|
|
19920
19939
|
.pipe(finalize(() => (this.disableCreateButton = false)))
|
|
19921
|
-
.subscribe(
|
|
19922
|
-
|
|
19923
|
-
|
|
19924
|
-
|
|
19940
|
+
.subscribe({
|
|
19941
|
+
next: (node) => {
|
|
19942
|
+
this.success.emit(node);
|
|
19943
|
+
dialog.close(node);
|
|
19944
|
+
},
|
|
19945
|
+
error: (error) => this.handleError(error)
|
|
19946
|
+
});
|
|
19925
19947
|
}
|
|
19926
19948
|
visibilityChangeHandler(event) {
|
|
19927
19949
|
this.visibilityOption = event.value;
|
|
@@ -19961,13 +19983,7 @@ class LibraryDialogComponent {
|
|
|
19961
19983
|
return error;
|
|
19962
19984
|
}
|
|
19963
19985
|
async checkLibraryNameExists(libraryTitle) {
|
|
19964
|
-
|
|
19965
|
-
try {
|
|
19966
|
-
entries = (await this.findLibraryByTitle(libraryTitle)).list.entries;
|
|
19967
|
-
}
|
|
19968
|
-
catch {
|
|
19969
|
-
entries = [];
|
|
19970
|
-
}
|
|
19986
|
+
const entries = (await this.findLibraryByTitle(libraryTitle)).list.entries;
|
|
19971
19987
|
if (entries.length) {
|
|
19972
19988
|
this.libraryTitleExists = entries[0].entry.title.toLowerCase() === libraryTitle.toLowerCase();
|
|
19973
19989
|
}
|
|
@@ -19975,11 +19991,16 @@ class LibraryDialogComponent {
|
|
|
19975
19991
|
this.libraryTitleExists = false;
|
|
19976
19992
|
}
|
|
19977
19993
|
}
|
|
19978
|
-
findLibraryByTitle(libraryTitle) {
|
|
19979
|
-
|
|
19980
|
-
|
|
19981
|
-
|
|
19982
|
-
|
|
19994
|
+
async findLibraryByTitle(libraryTitle) {
|
|
19995
|
+
try {
|
|
19996
|
+
return await this.queriesApi.findSites(libraryTitle, {
|
|
19997
|
+
maxItems: 1,
|
|
19998
|
+
fields: ['title']
|
|
19999
|
+
});
|
|
20000
|
+
}
|
|
20001
|
+
catch {
|
|
20002
|
+
return new SitePaging({ list: { entries: [], pagination: {} } });
|
|
20003
|
+
}
|
|
19983
20004
|
}
|
|
19984
20005
|
forbidSpecialCharacters({ value }) {
|
|
19985
20006
|
if (value === null || value.length === 0) {
|
|
@@ -19997,13 +20018,24 @@ class LibraryDialogComponent {
|
|
|
19997
20018
|
if (value === null || value.length === 0) {
|
|
19998
20019
|
return null;
|
|
19999
20020
|
}
|
|
20000
|
-
const isValid = !!
|
|
20021
|
+
const isValid = !!value.trim();
|
|
20001
20022
|
return isValid
|
|
20002
20023
|
? null
|
|
20003
20024
|
: {
|
|
20004
20025
|
message: 'LIBRARY.ERRORS.ONLY_SPACES'
|
|
20005
20026
|
};
|
|
20006
20027
|
}
|
|
20028
|
+
minLengthTrimmed({ value }) {
|
|
20029
|
+
if (value === null || value.length === 0) {
|
|
20030
|
+
return null;
|
|
20031
|
+
}
|
|
20032
|
+
const isValid = value.trim().length !== 1;
|
|
20033
|
+
return isValid
|
|
20034
|
+
? null
|
|
20035
|
+
: {
|
|
20036
|
+
message: 'LIBRARY.ERRORS.TITLE_TOO_SHORT'
|
|
20037
|
+
};
|
|
20038
|
+
}
|
|
20007
20039
|
createSiteIdValidator() {
|
|
20008
20040
|
let timer;
|
|
20009
20041
|
return (control) => {
|
|
@@ -20011,12 +20043,20 @@ class LibraryDialogComponent {
|
|
|
20011
20043
|
clearTimeout(timer);
|
|
20012
20044
|
}
|
|
20013
20045
|
return new Promise((resolve) => {
|
|
20014
|
-
timer = setTimeout(() =>
|
|
20046
|
+
timer = setTimeout(() => {
|
|
20047
|
+
this.checkSite(control.value, resolve);
|
|
20048
|
+
}, 300);
|
|
20015
20049
|
});
|
|
20016
20050
|
};
|
|
20017
20051
|
}
|
|
20052
|
+
checkSite(siteId, resolve) {
|
|
20053
|
+
this.sitesService.getSite(siteId).subscribe({
|
|
20054
|
+
next: () => resolve({ message: 'LIBRARY.ERRORS.EXISTENT_SITE' }),
|
|
20055
|
+
error: () => resolve(null)
|
|
20056
|
+
});
|
|
20057
|
+
}
|
|
20018
20058
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: LibraryDialogComponent, deps: [{ token: AlfrescoApiService }, { token: SitesService }, { token: i1$2.UntypedFormBuilder }, { token: i1.MatDialogRef }, { token: i2.NotificationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
20019
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
20059
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: LibraryDialogComponent, isStandalone: true, selector: "adf-library-dialog", outputs: { error: "error", success: "success" }, host: { classAttribute: "adf-library-dialog" }, ngImport: i0, template: "<h2 mat-dialog-title>{{ createTitle | translate }}</h2>\n\n<mat-dialog-content class=\"adf-library-dialog-content\">\n <form novalidate [formGroup]=\"form\" (submit)=\"submit()\">\n <mat-form-field class=\"adf-library-dialog-form-field\">\n <mat-label>{{ 'LIBRARY.DIALOG.FORM.NAME' | translate }}</mat-label>\n <input\n required\n matInput\n formControlName=\"title\"\n autocomplete=\"off\"\n adf-auto-focus\n />\n @if (libraryTitleExists) {\n <mat-hint>{{ 'LIBRARY.HINTS.SITE_TITLE_EXISTS' | translate }}</mat-hint>\n }\n @if (form.controls['title'].errors?.maxlength) {\n <mat-error>{{ 'LIBRARY.ERRORS.TITLE_TOO_LONG' | translate }}</mat-error>\n }\n @else if (form.controls['title'].errors?.message) {\n <mat-error>{{ form.controls['title'].errors?.message | translate }}</mat-error>\n }\n @else if (form.controls['title'].errors?.required) {\n <mat-error>{{ 'LIBRARY.ERRORS.NAME_REQUIRED' | translate }}</mat-error>\n }\n </mat-form-field>\n\n <mat-form-field class=\"adf-library-dialog-form-field\">\n <mat-label>{{ 'LIBRARY.DIALOG.FORM.SITE_ID' | translate }}</mat-label>\n <input\n required\n matInput\n formControlName=\"id\"\n autocomplete=\"off\"\n />\n\n @if (form.controls['id'].errors?.message) {\n <mat-error>{{ form.controls['id'].errors?.message | translate }}</mat-error>\n }\n @else if (form.controls['id'].errors?.maxlength) {\n <mat-error>{{ 'LIBRARY.ERRORS.ID_TOO_LONG' | translate }}</mat-error>\n }\n @else if (form.controls['id'].errors?.required) {\n <mat-error>{{ 'LIBRARY.ERRORS.ID_REQUIRED' | translate }}</mat-error>\n }\n </mat-form-field>\n\n <mat-form-field class=\"adf-library-dialog-form-field adf-library-dialog-form-field-description\">\n <mat-label>{{ 'LIBRARY.DIALOG.FORM.DESCRIPTION' | translate }}</mat-label>\n <textarea\n matInput\n rows=\"3\"\n formControlName=\"description\"\n ></textarea>\n @if (form.controls['description'].errors?.maxlength) {\n <mat-error>{{ 'LIBRARY.ERRORS.DESCRIPTION_TOO_LONG' | translate }}</mat-error>\n }\n </mat-form-field>\n\n <mat-radio-group\n class=\"adf-library-dialog-radio-group\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"visibilityOption\"\n (change)=\"visibilityChangeHandler($event)\"\n >\n @for (option of visibilityOptions; track option.value) {\n <mat-radio-button\n color=\"primary\"\n class=\"adf-library-dialog-radio-group-button\"\n [disabled]=\"option.disabled\"\n [attr.data-automation-id]=\"option.value\"\n [value]=\"option.value\"\n [checked]=\"visibilityOption === option.value\"\n >\n {{ option.label | translate }}\n </mat-radio-button>\n }\n </mat-radio-group>\n </form>\n</mat-dialog-content>\n\n<mat-dialog-actions class=\"adf-action-buttons\">\n <button class=\"adf-action-button\" mat-button mat-dialog-close data-automation-id=\"cancel-library-id\">\n {{ 'LIBRARY.DIALOG.CANCEL' | translate }}\n </button>\n\n <button\n color=\"primary\"\n class=\"adf-action-button\"\n mat-button\n (click)=\"submit()\"\n [disabled]=\"!form.valid || disableCreateButton\"\n data-automation-id=\"create-library-id\"\n >\n {{ 'LIBRARY.DIALOG.CREATE' | translate }}\n </button>\n</mat-dialog-actions>\n", styles: [".adf-library-dialog .adf-library-dialog-content{padding:0;overflow:unset}.adf-library-dialog .adf-library-dialog-radio-group{display:flex;flex-direction:column;margin:0}.adf-library-dialog .adf-library-dialog-radio-group .adf-library-dialog-radio-group-button{margin:10px 0}.adf-library-dialog .adf-library-dialog-form-field{width:100%;padding-top:9.5px}.adf-library-dialog .adf-library-dialog-form-field:first-of-type{padding-top:13.5px}.adf-library-dialog .adf-library-dialog-form-field:last-of-type{padding-top:4.5px}.adf-library-dialog .adf-library-dialog-form-field .mdc-floating-label{-webkit-font-smoothing:subpixel-antialiased}.adf-library-dialog .adf-library-dialog-form-field.mat-form-field-hide-placeholder .mdc-floating-label,.adf-library-dialog .adf-library-dialog-form-field-description.mat-form-field-hide-placeholder .mdc-floating-label{padding-top:20px}.adf-library-dialog .adf-library-dialog-form-field .mat-mdc-form-field-infix{padding-bottom:3.5px}.adf-library-dialog .adf-library-dialog-form-field .mat-mdc-form-field-error-wrapper{margin-left:-2px;font-size:10.5px;-webkit-font-smoothing:subpixel-antialiased}.adf-library-dialog .adf-library-dialog-form-field .mat-mdc-form-field-error-wrapper .mat-mdc-form-field-error{height:13.125px}.adf-library-dialog .adf-action-buttons{display:flex;flex-direction:row;justify-content:flex-end}.adf-library-dialog .adf-action-buttons .adf-action-button{text-transform:uppercase}.adf-library-dialog .adf-action-buttons .adf-action-button span{font-weight:500}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i6.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i7.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: AutoFocusDirective, selector: "[adf-auto-focus]" }, { kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i2$1.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i2$1.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
20020
20060
|
}
|
|
20021
20061
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: LibraryDialogComponent, decorators: [{
|
|
20022
20062
|
type: Component,
|
|
@@ -20031,7 +20071,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
20031
20071
|
MatRadioModule,
|
|
20032
20072
|
FormsModule,
|
|
20033
20073
|
MatButtonModule
|
|
20034
|
-
], encapsulation: ViewEncapsulation.None, host: { class: 'adf-library-dialog' }, template: "<h2 mat-dialog-title>{{ createTitle | translate }}</h2>\n\n<mat-dialog-content class=\"adf-library-dialog-content\">\n <form novalidate [formGroup]=\"form\" (submit)=\"submit()\">\n <mat-form-field class=\"adf-library-dialog-form-field\">\n <mat-label>{{ 'LIBRARY.DIALOG.FORM.NAME' | translate }}</mat-label>\n <input\n required\n matInput\n formControlName=\"title\"\n autocomplete=\"off\"\n adf-auto-focus\n />\n\n
|
|
20074
|
+
], encapsulation: ViewEncapsulation.None, host: { class: 'adf-library-dialog' }, template: "<h2 mat-dialog-title>{{ createTitle | translate }}</h2>\n\n<mat-dialog-content class=\"adf-library-dialog-content\">\n <form novalidate [formGroup]=\"form\" (submit)=\"submit()\">\n <mat-form-field class=\"adf-library-dialog-form-field\">\n <mat-label>{{ 'LIBRARY.DIALOG.FORM.NAME' | translate }}</mat-label>\n <input\n required\n matInput\n formControlName=\"title\"\n autocomplete=\"off\"\n adf-auto-focus\n />\n @if (libraryTitleExists) {\n <mat-hint>{{ 'LIBRARY.HINTS.SITE_TITLE_EXISTS' | translate }}</mat-hint>\n }\n @if (form.controls['title'].errors?.maxlength) {\n <mat-error>{{ 'LIBRARY.ERRORS.TITLE_TOO_LONG' | translate }}</mat-error>\n }\n @else if (form.controls['title'].errors?.message) {\n <mat-error>{{ form.controls['title'].errors?.message | translate }}</mat-error>\n }\n @else if (form.controls['title'].errors?.required) {\n <mat-error>{{ 'LIBRARY.ERRORS.NAME_REQUIRED' | translate }}</mat-error>\n }\n </mat-form-field>\n\n <mat-form-field class=\"adf-library-dialog-form-field\">\n <mat-label>{{ 'LIBRARY.DIALOG.FORM.SITE_ID' | translate }}</mat-label>\n <input\n required\n matInput\n formControlName=\"id\"\n autocomplete=\"off\"\n />\n\n @if (form.controls['id'].errors?.message) {\n <mat-error>{{ form.controls['id'].errors?.message | translate }}</mat-error>\n }\n @else if (form.controls['id'].errors?.maxlength) {\n <mat-error>{{ 'LIBRARY.ERRORS.ID_TOO_LONG' | translate }}</mat-error>\n }\n @else if (form.controls['id'].errors?.required) {\n <mat-error>{{ 'LIBRARY.ERRORS.ID_REQUIRED' | translate }}</mat-error>\n }\n </mat-form-field>\n\n <mat-form-field class=\"adf-library-dialog-form-field adf-library-dialog-form-field-description\">\n <mat-label>{{ 'LIBRARY.DIALOG.FORM.DESCRIPTION' | translate }}</mat-label>\n <textarea\n matInput\n rows=\"3\"\n formControlName=\"description\"\n ></textarea>\n @if (form.controls['description'].errors?.maxlength) {\n <mat-error>{{ 'LIBRARY.ERRORS.DESCRIPTION_TOO_LONG' | translate }}</mat-error>\n }\n </mat-form-field>\n\n <mat-radio-group\n class=\"adf-library-dialog-radio-group\"\n [ngModelOptions]=\"{ standalone: true }\"\n [(ngModel)]=\"visibilityOption\"\n (change)=\"visibilityChangeHandler($event)\"\n >\n @for (option of visibilityOptions; track option.value) {\n <mat-radio-button\n color=\"primary\"\n class=\"adf-library-dialog-radio-group-button\"\n [disabled]=\"option.disabled\"\n [attr.data-automation-id]=\"option.value\"\n [value]=\"option.value\"\n [checked]=\"visibilityOption === option.value\"\n >\n {{ option.label | translate }}\n </mat-radio-button>\n }\n </mat-radio-group>\n </form>\n</mat-dialog-content>\n\n<mat-dialog-actions class=\"adf-action-buttons\">\n <button class=\"adf-action-button\" mat-button mat-dialog-close data-automation-id=\"cancel-library-id\">\n {{ 'LIBRARY.DIALOG.CANCEL' | translate }}\n </button>\n\n <button\n color=\"primary\"\n class=\"adf-action-button\"\n mat-button\n (click)=\"submit()\"\n [disabled]=\"!form.valid || disableCreateButton\"\n data-automation-id=\"create-library-id\"\n >\n {{ 'LIBRARY.DIALOG.CREATE' | translate }}\n </button>\n</mat-dialog-actions>\n", styles: [".adf-library-dialog .adf-library-dialog-content{padding:0;overflow:unset}.adf-library-dialog .adf-library-dialog-radio-group{display:flex;flex-direction:column;margin:0}.adf-library-dialog .adf-library-dialog-radio-group .adf-library-dialog-radio-group-button{margin:10px 0}.adf-library-dialog .adf-library-dialog-form-field{width:100%;padding-top:9.5px}.adf-library-dialog .adf-library-dialog-form-field:first-of-type{padding-top:13.5px}.adf-library-dialog .adf-library-dialog-form-field:last-of-type{padding-top:4.5px}.adf-library-dialog .adf-library-dialog-form-field .mdc-floating-label{-webkit-font-smoothing:subpixel-antialiased}.adf-library-dialog .adf-library-dialog-form-field.mat-form-field-hide-placeholder .mdc-floating-label,.adf-library-dialog .adf-library-dialog-form-field-description.mat-form-field-hide-placeholder .mdc-floating-label{padding-top:20px}.adf-library-dialog .adf-library-dialog-form-field .mat-mdc-form-field-infix{padding-bottom:3.5px}.adf-library-dialog .adf-library-dialog-form-field .mat-mdc-form-field-error-wrapper{margin-left:-2px;font-size:10.5px;-webkit-font-smoothing:subpixel-antialiased}.adf-library-dialog .adf-library-dialog-form-field .mat-mdc-form-field-error-wrapper .mat-mdc-form-field-error{height:13.125px}.adf-library-dialog .adf-action-buttons{display:flex;flex-direction:row;justify-content:flex-end}.adf-library-dialog .adf-action-buttons .adf-action-button{text-transform:uppercase}.adf-library-dialog .adf-action-buttons .adf-action-button span{font-weight:500}\n"] }]
|
|
20035
20075
|
}], ctorParameters: () => [{ type: AlfrescoApiService }, { type: SitesService }, { type: i1$2.UntypedFormBuilder }, { type: i1.MatDialogRef }, { type: i2.NotificationService }], propDecorators: { error: [{
|
|
20036
20076
|
type: Output
|
|
20037
20077
|
}], success: [{
|