angular 16 update

This commit is contained in:
Diamantis Tziotzios 2023-10-05 22:42:47 +03:00
parent 96c2940eb0
commit 5a46345f15
25 changed files with 571 additions and 567 deletions

View File

@ -23,7 +23,6 @@
], ],
"styles": [ "styles": [
"src/styles.scss", "src/styles.scss",
"src/assets/scss/material-dashboard.scss",
"src/assets/css/demo.css", "src/assets/css/demo.css",
"node_modules/cookieconsent/build/cookieconsent.min.css" "node_modules/cookieconsent/build/cookieconsent.min.css"
], ],

View File

@ -12,60 +12,62 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "^15.2.10", "@angular/animations": "^16.2.8",
"@angular/common": "^15.2.10", "@angular/common": "^16.2.8",
"@angular/compiler": "^15.2.10", "@angular/compiler": "^16.2.8",
"@angular/core": "^15.2.10", "@angular/core": "^16.2.8",
"@angular/forms": "^15.2.10", "@angular/forms": "^16.2.8",
"@angular/material-moment-adapter": "^15.2.9", "@angular/material-moment-adapter": "^16.2.7",
"@angular/platform-browser": "^15.2.10", "@angular/platform-browser": "^16.2.8",
"@kolkov/angular-editor": "^1.2.0", "@kolkov/angular-editor": "^2.1.0",
"@ngx-translate/core": "^13.0.0", "@ngx-translate/core": "^15.0.0",
"@ngx-translate/http-loader": "^6.0.0", "@ngx-translate/http-loader": "^8.0.0",
"@swimlane/ngx-datatable": "^20.0.0", "@swimlane/ngx-datatable": "^20.1.0",
"@tinymce/tinymce-angular": "^4.2.4", "@tinymce/tinymce-angular": "^7.0.0",
"@w11k/angular-sticky-things": "^1.3.2", "@w11k/angular-sticky-things": "^1.5.2",
"bootstrap": "^4.3.1", "bootstrap": "^4.6.0",
"cookieconsent": "^3.1.1", "cookieconsent": "^3.1.1",
"core-js": "^2.5.5", "core-js": "^3.33.0",
"dragula": "^3.7.3",
"file-saver": "^2.0.5", "file-saver": "^2.0.5",
"moment": "^2.29.1", "moment": "^2.29.4",
"moment-timezone": "^0.5.33", "moment-timezone": "^0.5.43",
"ng-dialog-animation": "^9.0.4", "ng-dialog-animation": "^9.0.4",
"ng2-dragula": "^2.1.1", "ng2-dragula": "^5.0.1",
"ngx-cookie-service": "^12.0.3", "ngx-cookie-service": "^16.0.1",
"ngx-cookieconsent": "^2.2.3", "ngx-cookieconsent": "^4.0.2",
"ngx-dropzone": "^3.0.0", "ngx-dropzone": "^3.0.0",
"ngx-guided-tour": "^1.1.11", "ngx-guided-tour": "^2.0.1",
"ngx-matomo": "^0.1.4", "ngx-matomo-client": "^5.0.4",
"pako": "^1.0.11", "pako": "^1.0.11",
"rxjs": "^6.3.2", "rxjs": "^6.3.2",
"tinymce": "^5.9.2", "tinymce": "^6.7.0",
"ts-simple-nameof": "^1.3.1", "ts-simple-nameof": "^1.3.1",
"tslib": "^2.0.0", "tslib": "^2.6.2",
"zone.js": "~0.11.4" "zone.js": "~0.13.0"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "^15.2.9", "@angular-devkit/build-angular": "^16.2.5",
"@angular/cdk": "^15.2.9", "@angular/cdk": "^16.2.7",
"@angular/cli": "15.2.9", "@angular/cli": "16.2.5",
"@angular/compiler-cli": "^15.2.10", "@angular/compiler-cli": "^16.2.8",
"@angular/language-service": "^15.2.10", "@angular/language-service": "^16.2.8",
"@angular/material": "^15.2.9", "@angular/material": "^16.2.7",
"@angular/platform-browser-dynamic": "^15.2.10", "@angular/platform-browser-dynamic": "^16.2.8",
"@angular/router": "^15.2.10", "@angular/router": "^16.2.8",
"@types/facebook-js-sdk": "^3.3.5", "@types/dragula": "^3.7.2",
"@types/file-saver": "^2.0.3", "@types/facebook-js-sdk": "^3.3.7",
"@types/gapi": "^0.0.41", "@types/file-saver": "^2.0.5",
"@types/gapi.auth2": "^0.0.55", "@types/gapi": "^0.0.45",
"@types/jasmine": "~3.9.1", "@types/gapi.auth2": "^0.0.58",
"@types/jasminewd2": "~2.0.10", "@types/jasmine": "~5.1.0",
"@types/jasminewd2": "~2.0.11",
"@types/moment-timezone": "^0.5.13", "@types/moment-timezone": "^0.5.13",
"@types/node": "^12.11.1", "@types/node": "^20.8.2",
"@types/pako": "^1.0.3", "@types/pako": "^1.0.3",
"codelyzer": "^6.0.2", "codelyzer": "^0.0.28",
"ts-node": "~10.2.1", "ts-node": "~10.9.1",
"tslint": "~6.1.0", "tslint": "~6.1.0",
"typescript": "^4.8" "typescript": "^4.9.3"
} }
} }

View File

@ -16,7 +16,6 @@ import { LanguageService } from './core/services/language/language.service';
import { ConfigurationService } from './core/services/configuration/configuration.service'; import { ConfigurationService } from './core/services/configuration/configuration.service';
import { Location } from '@angular/common'; import { Location } from '@angular/common';
import { MatomoInjector } from 'ngx-matomo';
import { MatomoService } from './core/services/matomo/matomo-service'; import { MatomoService } from './core/services/matomo/matomo-service';
import { SideNavService } from './core/services/sidenav/side-nav.sevice'; import { SideNavService } from './core/services/sidenav/side-nav.sevice';
import { MatSidenav } from '@angular/material/sidenav'; import { MatSidenav } from '@angular/material/sidenav';

View File

@ -2,9 +2,9 @@ import { OverlayModule } from '@angular/cdk/overlay';
import { HttpClient, HttpClientModule } from '@angular/common/http'; import { HttpClient, HttpClientModule } from '@angular/common/http';
import { LOCALE_ID, NgModule } from '@angular/core'; import { LOCALE_ID, NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatMomentDateModule, MAT_MOMENT_DATE_FORMATS } from '@angular/material-moment-adapter'; import { MAT_MOMENT_DATE_FORMATS, MatMomentDateModule } from '@angular/material-moment-adapter';
import { DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE } from '@angular/material/core'; import { DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE } from '@angular/material/core';
import { MatLegacyFormFieldDefaultOptions as MatFormFieldDefaultOptions, MAT_LEGACY_FORM_FIELD_DEFAULT_OPTIONS as MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/legacy-form-field'; import { MAT_LEGACY_FORM_FIELD_DEFAULT_OPTIONS as MAT_FORM_FIELD_DEFAULT_OPTIONS, MatLegacyFormFieldDefaultOptions as MatFormFieldDefaultOptions } from '@angular/material/legacy-form-field';
import { BrowserModule, Title } from '@angular/platform-browser'; import { BrowserModule, Title } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { AppRoutingModule } from '@app/app-routing.module'; import { AppRoutingModule } from '@app/app-routing.module';
@ -26,14 +26,14 @@ import { TranslateCompiler, TranslateLoader, TranslateModule } from '@ngx-transl
import { DragulaModule } from 'ng2-dragula'; import { DragulaModule } from 'ng2-dragula';
import { CookieService } from 'ngx-cookie-service'; import { CookieService } from 'ngx-cookie-service';
import { NgcCookieConsentConfig, NgcCookieConsentModule } from 'ngx-cookieconsent'; import { NgcCookieConsentConfig, NgcCookieConsentModule } from 'ngx-cookieconsent';
import { MatomoModule } from 'ngx-matomo'; import { MatomoInitializationMode, NgxMatomoModule } from 'ngx-matomo-client';
import { ConfigurationService } from './core/services/configuration/configuration.service'; import { ConfigurationService } from './core/services/configuration/configuration.service';
import { CultureService } from './core/services/culture/culture-service'; import { CultureService } from './core/services/culture/culture-service';
import { TranslateServerLoader } from './core/services/language/server.loader'; import { TranslateServerLoader } from './core/services/language/server.loader';
import { MatomoService } from './core/services/matomo/matomo-service'; import { MatomoService } from './core/services/matomo/matomo-service';
import { GuidedTourModule } from './library/guided-tour/guided-tour.module'; import { GuidedTourModule } from './library/guided-tour/guided-tour.module';
import { OpenDMPCustomTranslationCompiler } from './utilities/translate/opendmp-custom-translation-compiler';
import { Oauth2DialogModule } from './ui/misc/oauth2-dialog/oauth2-dialog.module'; import { Oauth2DialogModule } from './ui/misc/oauth2-dialog/oauth2-dialog.module';
import { OpenDMPCustomTranslationCompiler } from './utilities/translate/opendmp-custom-translation-compiler';
// AoT requires an exported function for factories // AoT requires an exported function for factories
export function HttpLoaderFactory(http: HttpClient, appConfig: ConfigurationService) { export function HttpLoaderFactory(http: HttpClient, appConfig: ConfigurationService) {
@ -97,7 +97,6 @@ const appearance: MatFormFieldDefaultOptions = {
CommonHttpModule, CommonHttpModule,
MatMomentDateModule, MatMomentDateModule,
LoginModule, LoginModule,
MatomoModule,
//Ui //Ui
NotificationModule, NotificationModule,
NavigationModule, NavigationModule,
@ -111,7 +110,10 @@ const appearance: MatFormFieldDefaultOptions = {
NgcCookieConsentModule.forRoot(cookieConfig), NgcCookieConsentModule.forRoot(cookieConfig),
Oauth2DialogModule, Oauth2DialogModule,
GuidedTourModule.forRoot(), GuidedTourModule.forRoot(),
DragulaModule.forRoot() DragulaModule.forRoot(),
NgxMatomoModule.forRoot({
mode: MatomoInitializationMode.AUTO_DEFERRED,
})
], ],
declarations: [ declarations: [
AppComponent, AppComponent,

View File

@ -48,7 +48,7 @@ export class CultureService {
const newCulture = this.cultureValues.get(newCultureName); const newCulture = this.cultureValues.get(newCultureName);
if (!newCulture) { if (!newCulture) {
console.error(`unsupported culture given: ${newCultureName}`); //TODO: throw error? this.logger.error(`unsupported culture given: ${newCultureName}`); //TODO: throw error?
return; return;
} }
this.currentCulture = newCulture; this.currentCulture = newCulture;
@ -58,19 +58,17 @@ export class CultureService {
// This is a very hacky way to map cultures with angular cultures, since there is no mapping. We first try to // This is a very hacky way to map cultures with angular cultures, since there is no mapping. We first try to
// use the culture with the specialization (ex en-US), and if not exists we import the base culture (first part). // use the culture with the specialization (ex en-US), and if not exists we import the base culture (first part).
let locale = newCulture.name; let locale = newCulture.name;
import(`@angular/common/locales/${locale}.js`).catch(reason => { import(`/node_modules/@angular/common/locales/${locale}.mjs`).catch(reason => {
this.logger.error('Could not load locale: ' + locale); this.logger.error('Could not load locale: ' + locale);
}).then(selectedLocale => { }).then(selectedLocale => {
if (selectedLocale) { if (selectedLocale) {
registerLocaleData(selectedLocale.default); registerLocaleData(selectedLocale.default);
} else { } else {
locale = newCulture.name.split('-')[0]; locale = newCulture.name.split('-')[0];
import(`@angular/common/locales/${locale}.js`).catch(reason => { import(`/node_modules/@angular/common/locales/${locale}.mjs`).catch(reason => {
this.logger.error('Could not load locale: ' + locale); this.logger.error('Could not load locale: ' + locale);
}).then(selectedDefaultLocale => { }).then(selectedDefaultLocale => {
if (selectedDefaultLocale !== undefined) {
registerLocaleData(selectedDefaultLocale.default); registerLocaleData(selectedDefaultLocale.default);
}
}); });
} }
}); });

View File

@ -49,7 +49,7 @@ export class LanguageInfoService {
const newLanguageInfo = this.languageInfoValues.get(newLanguageInfoName); const newLanguageInfo = this.languageInfoValues.get(newLanguageInfoName);
if (!newLanguageInfo) { if (!newLanguageInfo) {
console.error(`unsupported language given: ${newLanguageInfoName}`); //TODO: throw error? this.logger.error(`unsupported culture given: ${newLanguageInfo}`); //TODO: throw error?
return; return;
} }
this.currentLanguageInfo = newLanguageInfo; this.currentLanguageInfo = newLanguageInfo;
@ -59,14 +59,14 @@ export class LanguageInfoService {
// This is a very hacky way to map cultures with angular cultures, since there is no mapping. We first try to // This is a very hacky way to map cultures with angular cultures, since there is no mapping. We first try to
// use the culture with the specialization (ex en-US), and if not exists we import the base culture (first part). // use the culture with the specialization (ex en-US), and if not exists we import the base culture (first part).
let locale = newLanguageInfo.code; let locale = newLanguageInfo.code;
import(`@angular/common/locales/${locale}.js`).catch(reason => { import(`/node_modules/@angular/common/locales/${locale}.mjs`).catch(reason => {
this.logger.error('Could not load locale: ' + locale); this.logger.error('Could not load locale: ' + locale);
}).then(selectedLocale => { }).then(selectedLocale => {
if (selectedLocale) { if (selectedLocale) {
registerLocaleData(selectedLocale.default); registerLocaleData(selectedLocale.default);
} else { } else {
// locale = newCulture.code.split('-')[0]; // locale = newCulture.code.split('-')[0];
import(`@angular/common/locales/${locale}.js`).catch(reason => { import(`/node_modules/@angular/common/locales/${locale}.mjs`).catch(reason => {
this.logger.error('Could not load locale: ' + locale); this.logger.error('Could not load locale: ' + locale);
}).then(selectedDefaultLocale => { }).then(selectedDefaultLocale => {
if (selectedDefaultLocale !== undefined) { if (selectedDefaultLocale !== undefined) {

View File

@ -1,5 +1,5 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { MatomoInjector, MatomoTracker } from 'ngx-matomo'; import { MatomoInitializerService, MatomoTracker } from 'ngx-matomo-client';
import { AuthService } from '../auth/auth.service'; import { AuthService } from '../auth/auth.service';
import { ConfigurationService } from '../configuration/configuration.service'; import { ConfigurationService } from '../configuration/configuration.service';
@ -8,7 +8,7 @@ export class MatomoService {
constructor( constructor(
private configurationService: ConfigurationService, private configurationService: ConfigurationService,
private matomoInjector: MatomoInjector, private matomoInitializerService: MatomoInitializerService,
private matomoTracker: MatomoTracker, private matomoTracker: MatomoTracker,
private authService: AuthService private authService: AuthService
) { ) {
@ -17,7 +17,7 @@ export class MatomoService {
init() { init() {
if (this.configurationService.matomoEnabled) { if (this.configurationService.matomoEnabled) {
this.matomoInjector.init(this.configurationService.matomoSiteUrl, this.configurationService.matomoSiteId); this.matomoInitializerService.initializeTracker({ trackerUrl: this.configurationService.matomoSiteUrl, siteId: this.configurationService.matomoSiteId });
} }
} }

View File

@ -17,7 +17,7 @@ import {
ViewChild ViewChild
} from '@angular/core'; } from '@angular/core';
import {ControlValueAccessor, FormGroupDirective, NgControl, NgForm} from '@angular/forms'; import {ControlValueAccessor, FormGroupDirective, NgControl, NgForm} from '@angular/forms';
import {MatLegacyChipInputEvent as MatChipInputEvent} from '@angular/material/legacy-chips'; import { MatChipInputEvent } from '@angular/material/chips';
import {ErrorStateMatcher, mixinErrorState} from '@angular/material/core'; import {ErrorStateMatcher, mixinErrorState} from '@angular/material/core';
import {MatLegacyAutocomplete as MatAutocomplete, MatLegacyAutocompleteSelectedEvent as MatAutocompleteSelectedEvent, MatLegacyAutocompleteTrigger as MatAutocompleteTrigger} from '@angular/material/legacy-autocomplete'; import {MatLegacyAutocomplete as MatAutocomplete, MatLegacyAutocompleteSelectedEvent as MatAutocompleteSelectedEvent, MatLegacyAutocompleteTrigger as MatAutocompleteTrigger} from '@angular/material/legacy-autocomplete';
import {MatLegacyFormFieldControl as MatFormFieldControl} from '@angular/material/legacy-form-field'; import {MatLegacyFormFieldControl as MatFormFieldControl} from '@angular/material/legacy-form-field';
@ -35,7 +35,8 @@ export class CustomComponentBase extends BaseComponent {
public _defaultErrorStateMatcher: ErrorStateMatcher, public _defaultErrorStateMatcher: ErrorStateMatcher,
public _parentForm: NgForm, public _parentForm: NgForm,
public _parentFormGroup: FormGroupDirective, public _parentFormGroup: FormGroupDirective,
public ngControl: NgControl public ngControl: NgControl,
public stateChanges: Subject<void>
) { ) {
super(); super();
} }
@ -166,7 +167,7 @@ export class MultipleAutoCompleteComponent extends _CustomComponentMixinBase imp
@Optional() _parentFormGroup: FormGroupDirective, @Optional() _parentFormGroup: FormGroupDirective,
_defaultErrorStateMatcher: ErrorStateMatcher _defaultErrorStateMatcher: ErrorStateMatcher
) { ) {
super(_defaultErrorStateMatcher, _parentForm, _parentFormGroup, ngControl); super(_defaultErrorStateMatcher, _parentForm, _parentFormGroup, ngControl, new Subject<void>());
fm.monitor(elRef.nativeElement, true).pipe(takeUntil(this._destroyed)).subscribe((origin) => { fm.monitor(elRef.nativeElement, true).pipe(takeUntil(this._destroyed)).subscribe((origin) => {
this.focused = !!origin; this.focused = !!origin;

View File

@ -17,7 +17,8 @@ export class CustomComponentBase extends BaseComponent {
public _defaultErrorStateMatcher: ErrorStateMatcher, public _defaultErrorStateMatcher: ErrorStateMatcher,
public _parentForm: NgForm, public _parentForm: NgForm,
public _parentFormGroup: FormGroupDirective, public _parentFormGroup: FormGroupDirective,
public ngControl: NgControl public ngControl: NgControl,
public stateChanges: Subject<void>
) { super(); } ) { super(); }
} }
export const _CustomComponentMixinBase = mixinErrorState(CustomComponentBase); export const _CustomComponentMixinBase = mixinErrorState(CustomComponentBase);
@ -110,7 +111,7 @@ export class SingleAutoCompleteComponent extends _CustomComponentMixinBase imple
@Optional() _parentFormGroup: FormGroupDirective, @Optional() _parentFormGroup: FormGroupDirective,
_defaultErrorStateMatcher: ErrorStateMatcher _defaultErrorStateMatcher: ErrorStateMatcher
) { ) {
super(_defaultErrorStateMatcher, _parentForm, _parentFormGroup, ngControl); super(_defaultErrorStateMatcher, _parentForm, _parentFormGroup, ngControl, new Subject<void>());
fm.monitor(elRef.nativeElement, true).pipe(takeUntil(this._destroyed)).subscribe((origin) => { fm.monitor(elRef.nativeElement, true).pipe(takeUntil(this._destroyed)).subscribe((origin) => {
this.focused = !!origin; this.focused = !!origin;

View File

@ -1,26 +1,14 @@
import { Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core'; import { Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core';
import { AbstractControl, UntypedFormArray, UntypedFormControl, UntypedFormGroup } from '@angular/forms'; import { AbstractControl, UntypedFormArray, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
import {FieldEditorModel} from '../../../admin/field-editor-model'; import { MatLegacyCheckboxChange as MatCheckboxChange } from '@angular/material/legacy-checkbox';
import {Guid} from '@common/types/guid'; import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
import {RuleEditorModel} from '../../../admin/rule-editor-model';
import {ValidationType} from '@app/core/common/enum/validation-type';
import {MMatLegacyCheckboxChange as MatCheckboxChange from '@@angular/material/legacy-checkbox;
import {
DatasetDescriptionCompositeFieldEditorModel,
DatasetDescriptionFieldEditorModel,
DatasetDescriptionSectionEditorModel
} from '@app/ui/misc/dataset-description-form/dataset-description-form.model';
import {DatasetProfileFieldViewStyle} from '@app/core/common/enum/dataset-profile-field-view-style';
import {MMatLegacyDialog as MatDialog from '@@angular/material/legacy-dialog;
import {ConfirmationDialogComponent} from '@common/modules/confirmation-dialog/confirmation-dialog.component';
import {TranslateService} from '@ngx-translate/core';
import {ViewStyleType} from '../field/view-style-enum';
import {EnumUtils} from '@app/core/services/utilities/enum-utils.service';
import {DatasetProfileService} from '@app/core/services/dataset-profile/dataset-profile.service';
import {EditorCustomValidators} from '../../custom-validators/editor-custom-validators';
import {Field, FieldSet} from '@app/core/model/admin/dataset-profile/dataset-profile';
import { DatasetProfileComboBoxType } from '@app/core/common/enum/dataset-profile-combo-box-type'; import { DatasetProfileComboBoxType } from '@app/core/common/enum/dataset-profile-combo-box-type';
import { DatasetProfileFieldViewStyle } from '@app/core/common/enum/dataset-profile-field-view-style';
import { DatasetProfileInternalDmpEntitiesType } from '@app/core/common/enum/dataset-profile-internal-dmp-entities-type'; import { DatasetProfileInternalDmpEntitiesType } from '@app/core/common/enum/dataset-profile-internal-dmp-entities-type';
import { ValidationType } from '@app/core/common/enum/validation-type';
import { Field, FieldSet } from '@app/core/model/admin/dataset-profile/dataset-profile';
import { CompositeField } from '@app/core/model/dataset-profile-definition/composite-field';
import { Field as FieldDefinition } from '@app/core/model/dataset-profile-definition/field';
import { import {
AutoCompleteFieldData, AutoCompleteFieldData,
BooleanDecisionFieldData, BooleanDecisionFieldData,
@ -33,29 +21,41 @@ import {
ExternalDatasetsFieldData, ExternalDatasetsFieldData,
FieldDataOption, FieldDataOption,
FreeTextFieldData, FreeTextFieldData,
LicensesFieldData,
OrganizationsFieldData, OrganizationsFieldData,
PublicationsFieldData,
RadioBoxFieldData, RadioBoxFieldData,
RegistriesFieldData, RegistriesFieldData,
ResearchersAutoCompleteFieldData, ResearchersAutoCompleteFieldData,
RichTextAreaFieldData,
ServicesFieldData, ServicesFieldData,
TagsFieldData, TagsFieldData,
TaxonomiesFieldData,
TextAreaFieldData, TextAreaFieldData,
RichTextAreaFieldData,
UploadFieldData, UploadFieldData,
ValidationFieldData, ValidationFieldData,
WordListFieldData, WordListFieldData
TaxonomiesFieldData,
LicensesFieldData,
PublicationsFieldData
} from '@app/core/model/dataset-profile-definition/field-data/field-data'; } from '@app/core/model/dataset-profile-definition/field-data/field-data';
import {CompositeField} from '@app/core/model/dataset-profile-definition/composite-field'; import { ConfigurationService } from "@app/core/services/configuration/configuration.service";
import {Field as FieldDefinition} from '@app/core/model/dataset-profile-definition/field'; import { DatasetProfileService } from '@app/core/services/dataset-profile/dataset-profile.service';
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
import {
DatasetDescriptionCompositeFieldEditorModel,
DatasetDescriptionFieldEditorModel,
DatasetDescriptionSectionEditorModel
} from '@app/ui/misc/dataset-description-form/dataset-description-form.model';
import { TransitionGroupComponent } from "@app/ui/transition-group/transition-group.component";
import { BaseComponent } from '@common/base/base.component';
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
import { Guid } from '@common/types/guid';
import { TranslateService } from '@ngx-translate/core';
import { Subject } from 'rxjs'; import { Subject } from 'rxjs';
import { debounceTime, delay, map, takeUntil, tap } from 'rxjs/operators'; import { debounceTime, delay, map, takeUntil, tap } from 'rxjs/operators';
import { FieldEditorModel } from '../../../admin/field-editor-model';
import { RuleEditorModel } from '../../../admin/rule-editor-model';
import { GENERAL_ANIMATIONS } from '../../animations/animations'; import { GENERAL_ANIMATIONS } from '../../animations/animations';
import {BaseComponent} from '@common/base/base.component'; import { EditorCustomValidators } from '../../custom-validators/editor-custom-validators';
import {TransitionGroupComponent} from "@app/ui/transition-group/transition-group.component"; import { ViewStyleType } from '../field/view-style-enum';
import {ConfigurationService} from "@app/core/services/configuration/configuration.service";
@Component({ @Component({
selector: 'app-dataset-profile-editor-composite-field-component', selector: 'app-dataset-profile-editor-composite-field-component',
@ -263,8 +263,10 @@ export class DatasetProfileEditorCompositeFieldComponent extends BaseComponent i
description: formValue.description, description: formValue.description,
hasCommentField: formValue.hasCommentField, hasCommentField: formValue.hasCommentField,
commentFieldValue: '', commentFieldValue: '',
multiplicity: {max: formValue.multiplicity.max, min: formValue.multiplicity.min, multiplicity: {
placeholder: formValue.multiplicity.placeholder, tableView: formValue.multiplicity.tableView}, max: formValue.multiplicity.max, min: formValue.multiplicity.min,
placeholder: formValue.multiplicity.placeholder, tableView: formValue.multiplicity.tableView
},
multiplicityItems: null, multiplicityItems: null,
fields: fields.map(editorField => { fields: fields.map(editorField => {
const model = new DatasetDescriptionFieldEditorModel().fromModel(editorField); const model = new DatasetDescriptionFieldEditorModel().fromModel(editorField);

View File

@ -1,20 +1,14 @@
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core'; import { COMMA, ENTER } from '@angular/cdk/keycodes';
import {UntypedFormArray, UntypedFormControl, UntypedFormGroup, FormGroupDirective, NgForm,} from '@angular/forms'; import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import {DatasetProfileFieldViewStyle} from '@app/core/common/enum/dataset-profile-field-view-style'; import { FormGroupDirective, NgForm, UntypedFormArray, UntypedFormControl, UntypedFormGroup, } from '@angular/forms';
import {ValidationType} from '@app/core/common/enum/validation-type'; import { ErrorStateMatcher } from '@angular/material/core';
import {DatasetProfileService} from '@app/core/services/dataset-profile/dataset-profile.service'; import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
import {EnumUtils} from '@app/core/services/utilities/enum-utils.service'; import { MatLegacySlideToggleChange as MatSlideToggleChange } from '@angular/material/legacy-slide-toggle';
import {RuleEditorModel} from '@app/ui/admin/dataset-profile/admin/rule-editor-model';
import {BaseComponent} from '@common/base/base.component';
import {Observable, Subscription} from 'rxjs';
import {ViewStyleType} from './view-style-enum';
import { DatasetProfileComboBoxType } from '@app/core/common/enum/dataset-profile-combo-box-type'; import { DatasetProfileComboBoxType } from '@app/core/common/enum/dataset-profile-combo-box-type';
iimport {ErrorStateMatcher} from '@angular/material/core'; import { DatasetProfileFieldViewStyle } from '@app/core/common/enum/dataset-profile-field-view-style';
import {MMatLegacyDialog as MatDialog from '@@angular/material/legacy-dialog;
import {MMatLegacySlideToggleChange as MatSlideToggleChange from '@@angular/material/legacy-slide-toggle;
import {DefaultValue, Field} from '@app/core/model/admin/dataset-profile/dataset-profile';
import { DatasetProfileInternalDmpEntitiesType } from '@app/core/common/enum/dataset-profile-internal-dmp-entities-type'; import { DatasetProfileInternalDmpEntitiesType } from '@app/core/common/enum/dataset-profile-internal-dmp-entities-type';
import {FieldEditorModel} from '../../../admin/field-editor-model'; import { ValidationType } from '@app/core/common/enum/validation-type';
import { DefaultValue, Field } from '@app/core/model/admin/dataset-profile/dataset-profile';
import { import {
AutoCompleteFieldData, AutoCompleteFieldData,
BooleanDecisionFieldData, BooleanDecisionFieldData,
@ -34,19 +28,25 @@ import {
RegistriesFieldData, RegistriesFieldData,
ResearchersAutoCompleteFieldData, ResearchersAutoCompleteFieldData,
RichTextAreaFieldData, RichTextAreaFieldData,
UploadFieldData,
ServicesFieldData, ServicesFieldData,
// TableFieldData, // TableFieldData,
TagsFieldData, TagsFieldData,
TaxonomiesFieldData, TaxonomiesFieldData,
TextAreaFieldData, TextAreaFieldData,
UploadFieldData,
ValidationFieldData, ValidationFieldData,
WordListFieldData WordListFieldData
} from '@app/core/model/dataset-profile-definition/field-data/field-data'; } from '@app/core/model/dataset-profile-definition/field-data/field-data';
import { ConfigurationService } from "@app/core/services/configuration/configuration.service"; import { ConfigurationService } from "@app/core/services/configuration/configuration.service";
import { DatasetProfileService } from '@app/core/services/dataset-profile/dataset-profile.service';
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
import { MultipleAutoCompleteConfiguration } from '@app/library/auto-complete/multiple/multiple-auto-complete-configuration'; import { MultipleAutoCompleteConfiguration } from '@app/library/auto-complete/multiple/multiple-auto-complete-configuration';
import { RuleEditorModel } from '@app/ui/admin/dataset-profile/admin/rule-editor-model';
import { BaseComponent } from '@common/base/base.component';
import { Observable, Subscription } from 'rxjs';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
import { COMMA, ENTER } from '@angular/cdk/keycodes'; import { FieldEditorModel } from '../../../admin/field-editor-model';
import { ViewStyleType } from './view-style-enum';
@Component({ @Component({
selector: 'app-dataset-profile-editor-field-component', selector: 'app-dataset-profile-editor-field-component',
@ -91,7 +91,8 @@ export class DatasetProfileEditorFieldComponent extends BaseComponent implements
public datasetProfileService: DatasetProfileService, public datasetProfileService: DatasetProfileService,
private dialog: MatDialog, private dialog: MatDialog,
private configurationService: ConfigurationService private configurationService: ConfigurationService
) { super(); ) {
super();
} }

View File

@ -4,7 +4,7 @@ import { HttpClient, HttpErrorResponse } from '@angular/common/http';
import { Component, OnInit, QueryList, ViewChild } from '@angular/core'; import { Component, OnInit, QueryList, ViewChild } from '@angular/core';
import { AbstractControl, UntypedFormArray, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms'; import { AbstractControl, UntypedFormArray, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
import { MatHorizontalStepper} from '@angular/material/stepper'; import { MatStepper} from '@angular/material/stepper';
import { ActivatedRoute, ParamMap, Router } from '@angular/router'; import { ActivatedRoute, ParamMap, Router } from '@angular/router';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { debounceTime, filter, map, mergeMap, takeUntil, tap } from 'rxjs/operators'; import { debounceTime, filter, map, mergeMap, takeUntil, tap } from 'rxjs/operators';
@ -77,7 +77,7 @@ export class DatasetProfileEditorComponent extends CheckDeactivateBaseComponent
newVersionId: string; newVersionId: string;
dataWizardModel: DatasetWizardModel; dataWizardModel: DatasetWizardModel;
breadCrumbs: Observable<BreadcrumbItem[]>; breadCrumbs: Observable<BreadcrumbItem[]>;
@ViewChild('stepper') stepper: MatHorizontalStepper; @ViewChild('stepper') stepper: MatStepper;
viewOnly = false; viewOnly = false;
nestedCount: number[] = []; nestedCount: number[] = [];
nestedIndex: number = 0; nestedIndex: number = 0;

View File

@ -102,7 +102,7 @@ export class DatasetProfileTableOfContents extends BaseComponent implements OnIn
if(!(element && (targetContainer ||((element.type===ToCEntryType.Page) && (targetId === this.ROOT_ID))) && (sourceContainer||((element.type===ToCEntryType.Page) && (sourceId === this.ROOT_ID))))){ if(!(element && (targetContainer ||((element.type===ToCEntryType.Page) && (targetId === this.ROOT_ID))) && (sourceContainer||((element.type===ToCEntryType.Page) && (sourceId === this.ROOT_ID))))){
// console.info('Could not find elements'); // console.info('Could not find elements');
this.dataNeedsRefresh.emit(); this.dataNeedsRefresh.emit();
drake.cancel(true); //TODO: angular update //drake.cancel(true);
return; return;
} }

View File

@ -1,68 +1,66 @@
import {ChangeDetectorRef, Component, OnInit, ViewChild} from '@angular/core'; import { Location } from '@angular/common';
import { HttpClient } from '@angular/common/http';
import { Component, OnInit, ViewChild } from '@angular/core';
import { AbstractControl, UntypedFormArray, UntypedFormControl, UntypedFormGroup } from '@angular/forms'; import { AbstractControl, UntypedFormArray, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
import { MatLegacySnackBar as MatSnackBar } from '@angular/material/legacy-snack-bar'; import { MatLegacySnackBar as MatSnackBar } from '@angular/material/legacy-snack-bar';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { DatasetStatus } from '@app/core/common/enum/dataset-status'; import { DatasetStatus } from '@app/core/common/enum/dataset-status';
import { DmpStatus } from '@app/core/common/enum/dmp-status'; import { DmpStatus } from '@app/core/common/enum/dmp-status';
import { SaveType } from '@app/core/common/enum/save-type';
import { DataTableRequest } from '@app/core/model/data-table/data-table-request'; import { DataTableRequest } from '@app/core/model/data-table/data-table-request';
import { DatasetProfileModel } from '@app/core/model/dataset/dataset-profile'; import { DatasetProfileModel } from '@app/core/model/dataset/dataset-profile';
import { DatasetWizardModel } from '@app/core/model/dataset/dataset-wizard';
import { DmpModel } from '@app/core/model/dmp/dmp'; import { DmpModel } from '@app/core/model/dmp/dmp';
import { DmpListingModel } from '@app/core/model/dmp/dmp-listing'; import { DmpListingModel } from '@app/core/model/dmp/dmp-listing';
import { LockModel } from '@app/core/model/lock/lock.model';
import { DatasetProfileCriteria } from '@app/core/query/dataset-profile/dataset-profile-criteria'; import { DatasetProfileCriteria } from '@app/core/query/dataset-profile/dataset-profile-criteria';
import { DmpCriteria } from '@app/core/query/dmp/dmp-criteria'; import { DmpCriteria } from '@app/core/query/dmp/dmp-criteria';
import { RequestItem } from '@app/core/query/request-item'; import { RequestItem } from '@app/core/query/request-item';
import { AuthService } from '@app/core/services/auth/auth.service';
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
import { DatasetWizardService } from '@app/core/services/dataset-wizard/dataset-wizard.service'; import { DatasetWizardService } from '@app/core/services/dataset-wizard/dataset-wizard.service';
import { DmpService } from '@app/core/services/dmp/dmp.service'; import { DmpService } from '@app/core/services/dmp/dmp.service';
import { import {
ExternalSourcesConfigurationService ExternalSourcesConfigurationService
} from '@app/core/services/external-sources/external-sources-configuration.service'; } from '@app/core/services/external-sources/external-sources-configuration.service';
import { ExternalSourcesService } from '@app/core/services/external-sources/external-sources.service'; import { ExternalSourcesService } from '@app/core/services/external-sources/external-sources.service';
import { LockService } from '@app/core/services/lock/lock.service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { import {
SnackBarNotificationLevel, SnackBarNotificationLevel,
UiNotificationService UiNotificationService
} from '@app/core/services/notification/ui-notification-service'; } from '@app/core/services/notification/ui-notification-service';
import { SingleAutoCompleteConfiguration } from '@app/library/auto-complete/single/single-auto-complete-configuration'; import { SingleAutoCompleteConfiguration } from '@app/library/auto-complete/single/single-auto-complete-configuration';
import { CheckDeactivateBaseComponent } from '@app/library/deactivate/deactivate.component';
import { PopupNotificationDialogComponent } from '@app/library/notification/popup/popup-notification.component';
import { import {
DatasetCopyDialogueComponent DatasetCopyDialogueComponent
} from '@app/ui/dataset/dataset-wizard/dataset-copy-dialogue/dataset-copy-dialogue.component'; } from '@app/ui/dataset/dataset-wizard/dataset-copy-dialogue/dataset-copy-dialogue.component';
import { DatasetWizardEditorModel } from '@app/ui/dataset/dataset-wizard/dataset-wizard-editor.model'; import { DatasetWizardEditorModel } from '@app/ui/dataset/dataset-wizard/dataset-wizard-editor.model';
import {BreadcrumbItem} from '@app/ui/misc/breadcrumb/definition/breadcrumb-item'; import { PrefillDatasetComponent } from "@app/ui/dataset/dataset-wizard/prefill-dataset/prefill-dataset.component";
import { IBreadCrumbComponent } from '@app/ui/misc/breadcrumb/definition/IBreadCrumbComponent'; import { IBreadCrumbComponent } from '@app/ui/misc/breadcrumb/definition/IBreadCrumbComponent';
import { BreadcrumbItem } from '@app/ui/misc/breadcrumb/definition/breadcrumb-item';
import { DatasetDescriptionFormEditorModel } from '@app/ui/misc/dataset-description-form/dataset-description-form.model'; import { DatasetDescriptionFormEditorModel } from '@app/ui/misc/dataset-description-form/dataset-description-form.model';
import { ToCEntry, ToCEntryType } from "@app/ui/misc/dataset-description-form/dataset-description.component";
import { import {
Link, Link,
LinkToScroll, LinkToScroll,
TableOfContents TableOfContents
} from '@app/ui/misc/dataset-description-form/tableOfContentsMaterial/table-of-contents'; } from '@app/ui/misc/dataset-description-form/tableOfContentsMaterial/table-of-contents';
import { VisibilityRulesService } from '@app/ui/misc/dataset-description-form/visibility-rules/visibility-rules.service';
import { isNullOrUndefined } from '@app/utilities/enhancers/utils';
import { FormService } from '@common/forms/form-service'; import { FormService } from '@common/forms/form-service';
import { import {
FormValidationErrorsDialogComponent FormValidationErrorsDialogComponent
} from '@common/forms/form-validation-errors-dialog/form-validation-errors-dialog.component'; } from '@common/forms/form-validation-errors-dialog/form-validation-errors-dialog.component';
import { ValidationErrorModel } from '@common/forms/validation/error-model/validation-error-model'; import { ValidationErrorModel } from '@common/forms/validation/error-model/validation-error-model';
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component'; import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
import { Guid } from '@common/types/guid';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import * as FileSaver from 'file-saver'; import * as FileSaver from 'file-saver';
import {interval, Observable, of as observableOf} from 'rxjs'; import { Observable, interval, of as observableOf } from 'rxjs';
import { catchError, debounceTime, filter, map, takeUntil } from 'rxjs/operators'; import { catchError, debounceTime, filter, map, takeUntil } from 'rxjs/operators';
import {LockService} from '@app/core/services/lock/lock.service';
import {Location} from '@angular/common';
import {LockModel} from '@app/core/model/lock/lock.model';
import {Guid} from '@common/types/guid';
import {isNullOrUndefined} from '@app/utilities/enhancers/utils';
import {AuthService} from '@app/core/services/auth/auth.service';
import {ConfigurationService} from '@app/core/services/configuration/configuration.service';
import {SaveType} from '@app/core/common/enum/save-type';
import {DatasetWizardModel} from '@app/core/model/dataset/dataset-wizard';
import {MatomoService} from '@app/core/services/matomo/matomo-service';
import {HttpClient} from '@angular/common/http';
import {VisibilityRulesService} from '@app/ui/misc/dataset-description-form/visibility-rules/visibility-rules.service';
import {PopupNotificationDialogComponent} from '@app/library/notification/popup/popup-notification.component';
import {CheckDeactivateBaseComponent} from '@app/library/deactivate/deactivate.component';
import {PrefillDatasetComponent} from "@app/ui/dataset/dataset-wizard/prefill-dataset/prefill-dataset.component";
import {ToCEntry, ToCEntryType} from "@app/ui/misc/dataset-description-form/dataset-description.component";
import {dispatchFakeEvent} from "@angular/cdk/testing/testbed/fake-events";
import { DmpDatasetProfile } from '@app/core/model/dmp/dmp-dataset-profile/dmp-dataset-profile';
@Component({ @Component({
selector: 'app-dataset-wizard-component', selector: 'app-dataset-wizard-component',

View File

@ -23,7 +23,7 @@ import { TranslateService } from '@ngx-translate/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { takeUntil, map } from 'rxjs/operators'; import { takeUntil, map } from 'rxjs/operators';
import { ENTER, COMMA } from '@angular/cdk/keycodes'; import { ENTER, COMMA } from '@angular/cdk/keycodes';
import { MatLegacyChipInputEvent as MatChipInputEvent } from '@angular/material/legacy-chips'; import { MatChipInputEvent } from '@angular/material/chips';
import { isNullOrUndefined } from '@app/utilities/enhancers/utils'; import { isNullOrUndefined } from '@app/utilities/enhancers/utils';
import { ExternalDataRepositoryService } from '@app/core/services/external-sources/data-repository/extternal-data-repository.service'; import { ExternalDataRepositoryService } from '@app/core/services/external-sources/data-repository/extternal-data-repository.service';
import { ExternalDatasetService } from '@app/core/services/external-sources/dataset/external-dataset.service'; import { ExternalDatasetService } from '@app/core/services/external-sources/dataset/external-dataset.service';

View File

@ -3,7 +3,7 @@ import { OnInit, Component, Input, Output, EventEmitter } from '@angular/core';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { ConfigurationService } from '@app/core/services/configuration/configuration.service'; import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
import { ExternalSourcesService } from '@app/core/services/external-sources/external-sources.service'; import { ExternalSourcesService } from '@app/core/services/external-sources/external-sources.service';
import { MatLegacyChipInputEvent as MatChipInputEvent } from '@angular/material/legacy-chips'; import { MatChipInputEvent } from '@angular/material/chips';
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog'; import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
import { MatLegacySnackBar as MatSnackBar } from '@angular/material/legacy-snack-bar'; import { MatLegacySnackBar as MatSnackBar } from '@angular/material/legacy-snack-bar';
import { DatasetWizardService } from '@app/core/services/dataset-wizard/dataset-wizard.service'; import { DatasetWizardService } from '@app/core/services/dataset-wizard/dataset-wizard.service';

View File

@ -2,7 +2,7 @@
import { COMMA, ENTER } from '@angular/cdk/keycodes'; import { COMMA, ENTER } from '@angular/cdk/keycodes';
import { Component, Inject, OnInit, ViewChild } from '@angular/core'; import { Component, Inject, OnInit, ViewChild } from '@angular/core';
import { UntypedFormGroup } from '@angular/forms'; import { UntypedFormGroup } from '@angular/forms';
import { MatLegacyChipInputEvent as MatChipInputEvent } from '@angular/material/legacy-chips'; import { MatChipInputEvent } from '@angular/material/chips';
import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog'; import { MatLegacyDialogRef as MatDialogRef, MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA } from '@angular/material/legacy-dialog';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { DmpInvitation } from '@app/core/model/dmp/invitation/dmp-invitation'; import { DmpInvitation } from '@app/core/model/dmp/invitation/dmp-invitation';

View File

@ -29,7 +29,7 @@ import { ServiceCriteria } from '@app/core/query/service/service-criteria';
import { TagCriteria } from '@app/core/query/tag/tag-criteria'; import { TagCriteria } from '@app/core/query/tag/tag-criteria';
import { isNullOrUndefined } from '@app/utilities/enhancers/utils'; import { isNullOrUndefined } from '@app/utilities/enhancers/utils';
import { ExternalTagEditorModel } from '@app/ui/dataset/dataset-wizard/dataset-wizard-editor.model'; import { ExternalTagEditorModel } from '@app/ui/dataset/dataset-wizard/dataset-wizard-editor.model';
import { MatLegacyChipInputEvent as MatChipInputEvent } from '@angular/material/legacy-chips'; import { MatChipInputEvent } from '@angular/material/chips';
import { ENTER, COMMA } from '@angular/cdk/keycodes'; import { ENTER, COMMA } from '@angular/cdk/keycodes';
import { DatasetIdModel } from '@app/core/model/dataset/dataset-id.model'; import { DatasetIdModel } from '@app/core/model/dataset/dataset-id.model';
import { LocalFetchModel } from '@app/core/model/local-fetch/local-fetch.model'; import { LocalFetchModel } from '@app/core/model/local-fetch/local-fetch.model';

View File

@ -1,6 +1,6 @@
import { AfterViewInit, Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core'; import { AfterViewInit, Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core';
import { UntypedFormGroup } from '@angular/forms'; import { UntypedFormGroup } from '@angular/forms';
import { MatHorizontalStepper } from '@angular/material/stepper'; import { MatStepper } from '@angular/material/stepper';
import { Rule } from '@app/core/model/dataset-profile-definition/rule'; import { Rule } from '@app/core/model/dataset-profile-definition/rule';
import { LinkToScroll } from '@app/ui/misc/dataset-description-form/tableOfContentsMaterial/table-of-contents'; import { LinkToScroll } from '@app/ui/misc/dataset-description-form/tableOfContentsMaterial/table-of-contents';
import { VisibilityRulesService } from '@app/ui/misc/dataset-description-form/visibility-rules/visibility-rules.service'; import { VisibilityRulesService } from '@app/ui/misc/dataset-description-form/visibility-rules/visibility-rules.service';
@ -13,7 +13,7 @@ import { BaseComponent } from '@common/base/base.component';
}) })
export class DatasetDescriptionFormComponent extends BaseComponent implements OnInit, AfterViewInit, OnChanges { export class DatasetDescriptionFormComponent extends BaseComponent implements OnInit, AfterViewInit, OnChanges {
@ViewChild('stepper') stepper: MatHorizontalStepper; @ViewChild('stepper') stepper: MatStepper;
@Input() path: string; @Input() path: string;
@Input() form: UntypedFormGroup; @Input() form: UntypedFormGroup;
@Input() visibilityRules: Rule[] = []; @Input() visibilityRules: Rule[] = [];

View File

@ -1,7 +1,7 @@
import { AfterViewInit, Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild, Output, EventEmitter } from '@angular/core'; import { AfterViewInit, Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild, Output, EventEmitter } from '@angular/core';
import { AbstractControl, AbstractControlOptions, UntypedFormArray, UntypedFormGroup } from '@angular/forms'; import { AbstractControl, AbstractControlOptions, UntypedFormArray, UntypedFormGroup } from '@angular/forms';
import { MatExpansionPanel } from '@angular/material/expansion'; import { MatExpansionPanel } from '@angular/material/expansion';
import { MatHorizontalStepper } from '@angular/material/stepper'; import { MatStepper } from '@angular/material/stepper';
import { CompositeField } from '@app/core/model/dataset-profile-definition/composite-field'; import { CompositeField } from '@app/core/model/dataset-profile-definition/composite-field';
import { Field } from '@app/core/model/dataset-profile-definition/field'; import { Field } from '@app/core/model/dataset-profile-definition/field';
import { Rule } from '@app/core/model/dataset-profile-definition/rule'; import { Rule } from '@app/core/model/dataset-profile-definition/rule';
@ -19,7 +19,7 @@ import { VisibilityRuleSource } from './visibility-rules/models/visibility-rule-
}) })
export class DatasetDescriptionComponent extends BaseComponent implements OnInit, AfterViewInit, OnChanges { export class DatasetDescriptionComponent extends BaseComponent implements OnInit, AfterViewInit, OnChanges {
// @ViewChild('stepper', { static: false }) stepper: MatHorizontalStepper; // @ViewChild('stepper', { static: false }) stepper: MatStepper;
@Input() path: string; @Input() path: string;
@Input() visibilityRules: Rule[] = []; @Input() visibilityRules: Rule[] = [];
@Input() datasetProfileId: String; @Input() datasetProfileId: String;

View File

@ -14,7 +14,7 @@
cursor: pointer; cursor: pointer;
background-color: transparent; background-color: transparent;
border: 0; border: 0;
border-radius: $border-radius-sm; //TODO: angular update border-radius: $border-radius-sm;
outline: 0; outline: 0;
transition: box-shadow 0.2s cubic-bezier(0.4, 0, 1, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1); transition: box-shadow 0.2s cubic-bezier(0.4, 0, 1, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
will-change: box-shadow, transform; will-change: box-shadow, transform;

View File

@ -47,7 +47,8 @@ $custom-theme: mat.define-light-theme($custom-theme-primary, $custom-theme-accen
@import "core/variables"; @import "core/variables";
@import "core/mixins"; @import "core/mixins";
@import "~bootstrap/scss/bootstrap"; //Material-Bootstrap configuration
//TODO: angular update @import "assets/scss/bootstrap-material";
// Core Components // Core Components
@import "core/buttons"; @import "core/buttons";

View File

@ -39,13 +39,13 @@ export function DateValidator(): ValidatorFn {
let monthParsed: number = null; let monthParsed: number = null;
let dayParsed: number = null; let dayParsed: number = null;
if (!isNullOrUndefined(yearString) && yearString.length === 4 && Number(yearString) !== NaN) { if (!isNullOrUndefined(yearString) && yearString.length === 4 && !Number.isNaN(Number(yearString))) {
yearParsed = Number(yearString); yearParsed = Number(yearString);
} }
if (!isNullOrUndefined(monthString) && monthString.length > 0 && Number(monthString) !== NaN) { if (!isNullOrUndefined(monthString) && monthString.length > 0 && !Number.isNaN(Number(monthString))) {
monthParsed = Number(monthString); monthParsed = Number(monthString);
} }
if (!isNullOrUndefined(dayString) && dayString.length > 0 && Number(dayString) !== NaN) { if (!isNullOrUndefined(dayString) && dayString.length > 0 && !Number.isNaN(Number(dayString))) {
dayParsed = Number(dayString); dayParsed = Number(dayString);
} }

View File

@ -18,10 +18,10 @@
* BROWSER POLYFILLS * BROWSER POLYFILLS
*/ */
import 'core-js/es7/array'; //TODO: angular update import 'core-js/es7/array';
/** Evergreen browsers require these. **/ /** Evergreen browsers require these. **/
import 'core-js/es6/reflect'; //TODO: angular update import 'core-js/es6/reflect';

View File

@ -2,15 +2,15 @@
@import "@angular/material/theming"; // @import '../node_modules/@angular/material/theming'; @import "@angular/material/theming"; // @import '../node_modules/@angular/material/theming';
@import "@angular/material/prebuilt-themes/indigo-pink.css"; @import "@angular/material/prebuilt-themes/indigo-pink.css";
@import "~bootstrap/dist/css/bootstrap.css";
//Material-Bootstrap configuration //Material-Bootstrap configuration
@import "~bootstrap/scss/bootstrap"; @import "assets/scss/bootstrap-material";
// Guided Tour style // Guided Tour style
@import '../node_modules/ngx-guided-tour/scss/guided-tour-base-theme.scss'; @import '../node_modules/ngx-guided-tour/scss/guided-tour-base-theme.scss';
@import '../node_modules/dragula/dist/dragula.css'; //TODO: angular update @import '../node_modules/dragula/dist/dragula.css';
/* in-flight clone */ /* in-flight clone */
.gu-mirror { .gu-mirror {
position: fixed !important; position: fixed !important;