diff --git a/.eslintrc.json b/.eslintrc.json index d7977878e89..e4ec1d73d9b 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -231,7 +231,8 @@ { "ignoredTypeNames": [ "ResourceType", - "Error" + "Error", + "RegExp" ] } ], @@ -382,6 +383,13 @@ } ] } + }, + { + "files": ["src/external-libraries/ng-dynamic-forms/**/*.ts"], + "rules": { + "@angular-eslint/directive-selector": "off", + "@angular-eslint/component-selector": "off" + } } ] } diff --git a/package-lock.json b/package-lock.json index 67686290421..0998aaaf427 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,9 +22,7 @@ "@angular/router": "^20.3.12", "@angular/ssr": "^20.3.10", "@kolkov/ngx-gallery": "^2.0.1", - "@ng-bootstrap/ng-bootstrap": "^12.1.2", - "@ng-dynamic-forms/core": "^16.0.0", - "@ng-dynamic-forms/ui-ng-bootstrap": "^16.0.0", + "@ng-bootstrap/ng-bootstrap": "^15.1.2", "@ngrx/effects": "^20.1.0", "@ngrx/router-store": "^20.1.0", "@ngrx/store": "^20.1.0", @@ -7528,50 +7526,22 @@ } }, "node_modules/@ng-bootstrap/ng-bootstrap": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/@ng-bootstrap/ng-bootstrap/-/ng-bootstrap-12.1.2.tgz", - "integrity": "sha512-p27c+mYVdHiJMYrj5hwClVJxLdiZxafAqlbw1sdJh2xJ1rGOe+H/kCf5YDRbhlHqRN+34Gr0RQqIUeD1I2V8hg==", + "version": "15.1.2", + "resolved": "https://registry.npmjs.org/@ng-bootstrap/ng-bootstrap/-/ng-bootstrap-15.1.2.tgz", + "integrity": "sha512-mM2yiGnt9o7KZLIFp8K1vjfmVfu7HR3d8dhH5SszfArbgn9DvvQ4P5D5TDGygzyBSzeyZe18p7I8rX8vgA6DKw==", + "license": "MIT", "dependencies": { "tslib": "^2.3.0" }, "peerDependencies": { - "@angular/common": "^13.0.0", - "@angular/core": "^13.0.0", - "@angular/forms": "^13.0.0", - "@angular/localize": "^13.0.0", - "@popperjs/core": "^2.10.2", + "@angular/common": "^16.0.0", + "@angular/core": "^16.0.0", + "@angular/forms": "^16.0.0", + "@angular/localize": "^16.0.0", + "@popperjs/core": "^2.11.6", "rxjs": "^6.5.3 || ^7.4.0" } }, - "node_modules/@ng-dynamic-forms/core": { - "version": "16.0.0", - "resolved": "https://registry.npmjs.org/@ng-dynamic-forms/core/-/core-16.0.0.tgz", - "integrity": "sha512-fH0OIgFs/bWkVnnOtDoAAXHXb3K2UOQXm7qEgO9hg86keE2x3Tu/G/Ma6tRVi5+RfKRgvI2Q6JlMLHIQHYFAgA==", - "dependencies": { - "tslib": "^2.0.0" - }, - "peerDependencies": { - "@angular/common": "^15.0.0", - "@angular/core": "^15.0.0", - "@angular/forms": "^15.0.0", - "core-js": "^3.8.1", - "rxjs": "^7.5.5" - } - }, - "node_modules/@ng-dynamic-forms/ui-ng-bootstrap": { - "version": "16.0.0", - "resolved": "https://registry.npmjs.org/@ng-dynamic-forms/ui-ng-bootstrap/-/ui-ng-bootstrap-16.0.0.tgz", - "integrity": "sha512-qopjC+j1wfOaB6a/xSUKEpl5vohEospvhLqPl33BgNH557DQg3x3oI/oPo3caLRhIo2vpKGIeuEN5Itok0B3vg==", - "dependencies": { - "tslib": "^2.0.0" - }, - "peerDependencies": { - "@ng-bootstrap/ng-bootstrap": "^11.0.0", - "@ng-dynamic-forms/core": "^16.0.0", - "bootstrap": "^4.0.0", - "ngx-mask": "^13.0.0" - } - }, "node_modules/@ngrx/effects": { "version": "20.1.0", "resolved": "https://registry.npmjs.org/@ngrx/effects/-/effects-20.1.0.tgz", @@ -19106,6 +19076,7 @@ "version": "14.2.4", "resolved": "https://registry.npmjs.org/ngx-mask/-/ngx-mask-14.2.4.tgz", "integrity": "sha512-158nAe2tyiZa2T8COoI6SvJCQHqpJ4+JW0amGcvVEYUBF6FIoYK66BlnOJURAOy5qry0d0N45w7J/LGsCBgZcg==", + "dev": true, "license": "MIT", "dependencies": { "tslib": "^2.3.0" diff --git a/package.json b/package.json index 7afdcb913be..aaa91568ea8 100644 --- a/package.json +++ b/package.json @@ -66,16 +66,6 @@ "@angular/forms": "^20.3.12", "@angular/localize": "^20.3.12" }, - "@ng-dynamic-forms/core": { - "@angular/common": "^20.3.12", - "@angular/core": "^20.3.12", - "@angular/forms": "^20.3.12" - }, - "@ng-dynamic-forms/ui-ng-bootstrap": { - "ngx-mask": "14.2.4", - "@ng-bootstrap/ng-bootstrap": "^12.1.2", - "bootstrap": "^5.3" - }, "@nicky-lenaers/ngx-scroll-to": { "@angular/common": "^20.3.12", "@angular/core": "^20.3.12" @@ -95,9 +85,7 @@ "@angular/router": "^20.3.12", "@angular/ssr": "^20.3.10", "@kolkov/ngx-gallery": "^2.0.1", - "@ng-bootstrap/ng-bootstrap": "^12.1.2", - "@ng-dynamic-forms/core": "^16.0.0", - "@ng-dynamic-forms/ui-ng-bootstrap": "^16.0.0", + "@ng-bootstrap/ng-bootstrap": "^15.1.2", "@ngrx/effects": "^20.1.0", "@ngrx/router-store": "^20.1.0", "@ngrx/store": "^20.1.0", diff --git a/src/app/access-control/access-control-routes.ts b/src/app/access-control/access-control-routes.ts index 9252c075ec7..1c7fd20625d 100644 --- a/src/app/access-control/access-control-routes.ts +++ b/src/app/access-control/access-control-routes.ts @@ -6,7 +6,7 @@ import { siteAdministratorGuard } from '@dspace/core/data/feature-authorization/ import { DYNAMIC_ERROR_MESSAGES_MATCHER, DynamicErrorMessagesMatcher, -} from '@ng-dynamic-forms/core'; +} from '@ng-dynamic-forms/core/service/dynamic-form-validation-matchers'; import { EPERSON_PATH, diff --git a/src/app/access-control/bulk-access/browse/bulk-access-browse.component.spec.ts b/src/app/access-control/bulk-access/browse/bulk-access-browse.component.spec.ts index d3ce4e7541f..3bffd36089a 100644 --- a/src/app/access-control/bulk-access/browse/bulk-access-browse.component.spec.ts +++ b/src/app/access-control/bulk-access/browse/bulk-access-browse.component.spec.ts @@ -9,7 +9,11 @@ import { PageInfo } from '@dspace/core/shared/page-info.model'; import { createSuccessfulRemoteDataObject } from '@dspace/core/utilities/remote-data.utils'; import { NgbAccordionModule, - NgbNavModule, + NgbNav, + NgbNavContent, + NgbNavItem, + NgbNavLink, + NgbNavOutlet, } from '@ng-bootstrap/ng-bootstrap'; import { TranslateModule } from '@ngx-translate/core'; import { of } from 'rxjs'; @@ -42,7 +46,11 @@ describe('BulkAccessBrowseComponent', () => { TestBed.configureTestingModule({ imports: [ NgbAccordionModule, - NgbNavModule, + NgbNavLink, + NgbNavItem, + NgbNavContent, + NgbNavOutlet, + NgbNav, TranslateModule.forRoot(), BulkAccessBrowseComponent, ], diff --git a/src/app/access-control/bulk-access/browse/bulk-access-browse.component.ts b/src/app/access-control/bulk-access/browse/bulk-access-browse.component.ts index 97f625f7c69..e2ca2037b1e 100644 --- a/src/app/access-control/bulk-access/browse/bulk-access-browse.component.ts +++ b/src/app/access-control/bulk-access/browse/bulk-access-browse.component.ts @@ -17,7 +17,11 @@ import { createSuccessfulRemoteDataObject } from '@dspace/core/utilities/remote- import { hasValue } from '@dspace/shared/utils/empty.util'; import { NgbAccordionModule, - NgbNavModule, + NgbNav, + NgbNavContent, + NgbNavItem, + NgbNavLink, + NgbNavOutlet, } from '@ng-bootstrap/ng-bootstrap'; import { TranslateModule } from '@ngx-translate/core'; import { NgxPaginationModule } from 'ngx-pagination'; @@ -55,7 +59,11 @@ import { BrowserOnlyPipe } from '../../../shared/utils/browser-only.pipe'; BrowserOnlyPipe, ListableObjectComponentLoaderComponent, NgbAccordionModule, - NgbNavModule, + NgbNav, + NgbNavContent, + NgbNavItem, + NgbNavLink, + NgbNavOutlet, NgxPaginationModule, PaginationComponent, SelectableListItemControlComponent, diff --git a/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.ts b/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.ts index dde99b9ab7d..8f2fc9272d5 100644 --- a/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.ts +++ b/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.ts @@ -39,12 +39,10 @@ import { PageInfo } from '@dspace/core/shared/page-info.model'; import { Registration } from '@dspace/core/shared/registration.model'; import { hasValue } from '@dspace/shared/utils/empty.util'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; -import { - DynamicCheckboxModel, - DynamicFormControlModel, - DynamicFormLayout, - DynamicInputModel, -} from '@ng-dynamic-forms/core'; +import { DynamicCheckboxModel } from '@ng-dynamic-forms/core/model/checkbox/dynamic-checkbox.model'; +import { DynamicFormControlModel } from '@ng-dynamic-forms/core/model/dynamic-form-control.model'; +import { DynamicInputModel } from '@ng-dynamic-forms/core/model/input/dynamic-input.model'; +import { DynamicFormLayout } from '@ng-dynamic-forms/core/service/dynamic-form-layout.service'; import { TranslateModule, TranslateService, diff --git a/src/app/access-control/group-registry/group-form/group-form.component.ts b/src/app/access-control/group-registry/group-form/group-form.component.ts index 54ea6d77fcc..f66c84cd25f 100644 --- a/src/app/access-control/group-registry/group-form/group-form.component.ts +++ b/src/app/access-control/group-registry/group-form/group-form.component.ts @@ -43,12 +43,10 @@ import { isNotEmpty, } from '@dspace/shared/utils/empty.util'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; -import { - DynamicFormControlModel, - DynamicFormLayout, - DynamicInputModel, - DynamicTextAreaModel, -} from '@ng-dynamic-forms/core'; +import { DynamicFormControlModel } from '@ng-dynamic-forms/core/model/dynamic-form-control.model'; +import { DynamicInputModel } from '@ng-dynamic-forms/core/model/input/dynamic-input.model'; +import { DynamicTextAreaModel } from '@ng-dynamic-forms/core/model/textarea/dynamic-textarea.model'; +import { DynamicFormLayout } from '@ng-dynamic-forms/core/service/dynamic-form-layout.service'; import { TranslateModule, TranslateService, diff --git a/src/app/admin/admin-registries/bitstream-formats/format-form/format-form.component.spec.ts b/src/app/admin/admin-registries/bitstream-formats/format-form/format-form.component.spec.ts index ce367e8862f..5e99f6b869e 100644 --- a/src/app/admin/admin-registries/bitstream-formats/format-form/format-form.component.spec.ts +++ b/src/app/admin/admin-registries/bitstream-formats/format-form/format-form.component.spec.ts @@ -16,11 +16,9 @@ import { BitstreamFormatSupportLevel } from '@dspace/core/shared/bitstream-forma import { RouterStub } from '@dspace/core/testing/router.stub'; import { isEmpty } from '@dspace/shared/utils/empty.util'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; -import { - DynamicCheckboxModel, - DynamicFormArrayModel, - DynamicInputModel, -} from '@ng-dynamic-forms/core'; +import { DynamicCheckboxModel } from '@ng-dynamic-forms/core/model/checkbox/dynamic-checkbox.model'; +import { DynamicFormArrayModel } from '@ng-dynamic-forms/core/model/form-array/dynamic-form-array.model'; +import { DynamicInputModel } from '@ng-dynamic-forms/core/model/input/dynamic-input.model'; import { TranslateModule } from '@ngx-translate/core'; import { FormComponent } from '../../../../shared/form/form.component'; diff --git a/src/app/admin/admin-registries/bitstream-formats/format-form/format-form.component.ts b/src/app/admin/admin-registries/bitstream-formats/format-form/format-form.component.ts index 78d9bf7ff78..0f0d5e8d4f8 100644 --- a/src/app/admin/admin-registries/bitstream-formats/format-form/format-form.component.ts +++ b/src/app/admin/admin-registries/bitstream-formats/format-form/format-form.component.ts @@ -13,15 +13,13 @@ import { hasValue, isEmpty, } from '@dspace/shared/utils/empty.util'; -import { - DynamicCheckboxModel, - DynamicFormArrayModel, - DynamicFormControlLayout, - DynamicFormControlModel, - DynamicInputModel, - DynamicSelectModel, - DynamicTextAreaModel, -} from '@ng-dynamic-forms/core'; +import { DynamicCheckboxModel } from '@ng-dynamic-forms/core/model/checkbox/dynamic-checkbox.model'; +import { DynamicFormControlModel } from '@ng-dynamic-forms/core/model/dynamic-form-control.model'; +import { DynamicFormArrayModel } from '@ng-dynamic-forms/core/model/form-array/dynamic-form-array.model'; +import { DynamicInputModel } from '@ng-dynamic-forms/core/model/input/dynamic-input.model'; +import { DynamicFormControlLayout } from '@ng-dynamic-forms/core/model/misc/dynamic-form-control-layout.model'; +import { DynamicSelectModel } from '@ng-dynamic-forms/core/model/select/dynamic-select.model'; +import { DynamicTextAreaModel } from '@ng-dynamic-forms/core/model/textarea/dynamic-textarea.model'; import { environment } from '../../../../../environments/environment'; import { FormComponent } from '../../../../shared/form/form.component'; diff --git a/src/app/admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.ts b/src/app/admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.ts index 8f456dd0b16..9525175a0b1 100644 --- a/src/app/admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.ts +++ b/src/app/admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.ts @@ -8,12 +8,10 @@ import { } from '@angular/core'; import { UntypedFormGroup } from '@angular/forms'; import { MetadataSchema } from '@dspace/core/metadata/metadata-schema.model'; -import { - DynamicFormControlModel, - DynamicFormGroupModel, - DynamicFormLayout, - DynamicInputModel, -} from '@ng-dynamic-forms/core'; +import { DynamicFormControlModel } from '@ng-dynamic-forms/core/model/dynamic-form-control.model'; +import { DynamicFormGroupModel } from '@ng-dynamic-forms/core/model/form-group/dynamic-form-group.model'; +import { DynamicInputModel } from '@ng-dynamic-forms/core/model/input/dynamic-input.model'; +import { DynamicFormLayout } from '@ng-dynamic-forms/core/service/dynamic-form-layout.service'; import { TranslateModule, TranslateService, diff --git a/src/app/admin/admin-registries/metadata-schema/metadata-field-form/metadata-field-form.component.ts b/src/app/admin/admin-registries/metadata-schema/metadata-field-form/metadata-field-form.component.ts index 887ec2ab56c..65dd37d6335 100644 --- a/src/app/admin/admin-registries/metadata-schema/metadata-field-form/metadata-field-form.component.ts +++ b/src/app/admin/admin-registries/metadata-schema/metadata-field-form/metadata-field-form.component.ts @@ -10,13 +10,11 @@ import { import { UntypedFormGroup } from '@angular/forms'; import { MetadataField } from '@dspace/core/metadata/metadata-field.model'; import { MetadataSchema } from '@dspace/core/metadata/metadata-schema.model'; -import { - DynamicFormControlModel, - DynamicFormGroupModel, - DynamicFormLayout, - DynamicInputModel, - DynamicTextAreaModel, -} from '@ng-dynamic-forms/core'; +import { DynamicFormControlModel } from '@ng-dynamic-forms/core/model/dynamic-form-control.model'; +import { DynamicFormGroupModel } from '@ng-dynamic-forms/core/model/form-group/dynamic-form-group.model'; +import { DynamicInputModel } from '@ng-dynamic-forms/core/model/input/dynamic-input.model'; +import { DynamicTextAreaModel } from '@ng-dynamic-forms/core/model/textarea/dynamic-textarea.model'; +import { DynamicFormLayout } from '@ng-dynamic-forms/core/service/dynamic-form-layout.service'; import { TranslateModule, TranslateService, diff --git a/src/app/app.config.ts b/src/app/app.config.ts index 9a799147fdb..65da60e8f0f 100644 --- a/src/app/app.config.ts +++ b/src/app/app.config.ts @@ -31,7 +31,7 @@ import { } from '@dspace/core/provide-core'; import { XsrfInterceptor } from '@dspace/core/xsrf/xsrf.interceptor'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; -import { DYNAMIC_MATCHER_PROVIDERS } from '@ng-dynamic-forms/core'; +import { DYNAMIC_MATCHER_PROVIDERS } from '@ng-dynamic-forms/core/service/dynamic-form-relation-matchers'; import { EffectsModule } from '@ngrx/effects'; import { RouterStateSerializer, diff --git a/src/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.spec.ts b/src/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.spec.ts index c090197a8f2..e497f7f2ef8 100644 --- a/src/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.spec.ts +++ b/src/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.spec.ts @@ -37,10 +37,8 @@ import { createSuccessfulRemoteDataObject$, } from '@dspace/core/utilities/remote-data.utils'; import { hasValue } from '@dspace/shared/utils/empty.util'; -import { - DynamicFormControlModel, - DynamicFormService, -} from '@ng-dynamic-forms/core'; +import { DynamicFormControlModel } from '@ng-dynamic-forms/core/model/dynamic-form-control.model'; +import { DynamicFormService } from '@ng-dynamic-forms/core/service/dynamic-form.service'; import { TranslateModule } from '@ngx-translate/core'; import { of } from 'rxjs'; diff --git a/src/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.ts b/src/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.ts index 21cce391bbc..6d05b39d83a 100644 --- a/src/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.ts +++ b/src/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.ts @@ -38,13 +38,11 @@ import { isEmpty, isNotEmpty, } from '@dspace/shared/utils/empty.util'; -import { - DynamicFormControlModel, - DynamicFormGroupModel, - DynamicFormLayout, - DynamicFormService, - DynamicInputModel, -} from '@ng-dynamic-forms/core'; +import { DynamicFormControlModel } from '@ng-dynamic-forms/core/model/dynamic-form-control.model'; +import { DynamicFormGroupModel } from '@ng-dynamic-forms/core/model/form-group/dynamic-form-group.model'; +import { DynamicInputModel } from '@ng-dynamic-forms/core/model/input/dynamic-input.model'; +import { DynamicFormService } from '@ng-dynamic-forms/core/service/dynamic-form.service'; +import { DynamicFormLayout } from '@ng-dynamic-forms/core/service/dynamic-form-layout.service'; import { TranslateModule, TranslateService, diff --git a/src/app/collection-page/collection-form/collection-form.component.ts b/src/app/collection-page/collection-form/collection-form.component.ts index bc049aa6b5b..f3b045291cc 100644 --- a/src/app/collection-page/collection-form/collection-form.component.ts +++ b/src/app/collection-page/collection-form/collection-form.component.ts @@ -24,12 +24,10 @@ import { isNotNull, } from '@dspace/shared/utils/empty.util'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; -import { - DynamicFormControlModel, - DynamicFormOptionConfig, - DynamicFormService, - DynamicSelectModel, -} from '@ng-dynamic-forms/core'; +import { DynamicFormControlModel } from '@ng-dynamic-forms/core/model/dynamic-form-control.model'; +import { DynamicFormOptionConfig } from '@ng-dynamic-forms/core/model/dynamic-option-control.model'; +import { DynamicSelectModel } from '@ng-dynamic-forms/core/model/select/dynamic-select.model'; +import { DynamicFormService } from '@ng-dynamic-forms/core/service/dynamic-form.service'; import { TranslateModule, TranslateService, diff --git a/src/app/collection-page/collection-form/collection-form.models.ts b/src/app/collection-page/collection-form/collection-form.models.ts index 90204c246f6..2e8c4c95f40 100644 --- a/src/app/collection-page/collection-form/collection-form.models.ts +++ b/src/app/collection-page/collection-form/collection-form.models.ts @@ -1,9 +1,7 @@ -import { - DynamicFormControlModel, - DynamicInputModel, - DynamicSelectModelConfig, - DynamicTextAreaModel, -} from '@ng-dynamic-forms/core'; +import { DynamicFormControlModel } from '@ng-dynamic-forms/core/model/dynamic-form-control.model'; +import { DynamicInputModel } from '@ng-dynamic-forms/core/model/input/dynamic-input.model'; +import { DynamicSelectModelConfig } from '@ng-dynamic-forms/core/model/select/dynamic-select.model'; +import { DynamicTextAreaModel } from '@ng-dynamic-forms/core/model/textarea/dynamic-textarea.model'; import { environment } from '../../../environments/environment'; diff --git a/src/app/collection-page/collection-item-mapper/collection-item-mapper.component.spec.ts b/src/app/collection-page/collection-item-mapper/collection-item-mapper.component.spec.ts index 95f2e413d9c..ade5cb0fffd 100644 --- a/src/app/collection-page/collection-item-mapper/collection-item-mapper.component.spec.ts +++ b/src/app/collection-page/collection-item-mapper/collection-item-mapper.component.spec.ts @@ -40,7 +40,13 @@ import { createSuccessfulRemoteDataObject, createSuccessfulRemoteDataObject$, } from '@dspace/core/utilities/remote-data.utils'; -import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; +import { + NgbNav, + NgbNavContent, + NgbNavItem, + NgbNavLink, + NgbNavOutlet, +} from '@ng-bootstrap/ng-bootstrap'; import { TranslateModule, TranslateService, @@ -183,7 +189,25 @@ describe('CollectionItemMapperComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, CollectionItemMapperComponent, ItemSelectComponent, SearchFormComponent, PaginationComponent, EnumKeysPipe, VarDirective, ErrorComponent, LoadingComponent], + imports: [ + CommonModule, + FormsModule, + RouterTestingModule.withRoutes([]), + TranslateModule.forRoot(), + NgbNavLink, + NgbNavItem, + NgbNavContent, + NgbNavOutlet, + NgbNav, + CollectionItemMapperComponent, + ItemSelectComponent, + SearchFormComponent, + PaginationComponent, + EnumKeysPipe, + VarDirective, + ErrorComponent, + LoadingComponent, + ], providers: [ { provide: ActivatedRoute, useValue: activatedRouteStub }, { provide: Router, useValue: routerStub }, diff --git a/src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts b/src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts index e4010b271be..4ed8143b0c0 100644 --- a/src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts +++ b/src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts @@ -34,7 +34,13 @@ import { } from '@dspace/core/shared/operators'; import { PaginatedSearchOptions } from '@dspace/core/shared/search/models/paginated-search-options.model'; import { isNotEmpty } from '@dspace/shared/utils/empty.util'; -import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; +import { + NgbNav, + NgbNavContent, + NgbNavItem, + NgbNavLink, + NgbNavOutlet, +} from '@ng-bootstrap/ng-bootstrap'; import { TranslateModule, TranslateService, @@ -81,7 +87,11 @@ import { BrowserOnlyPipe } from '../../shared/utils/browser-only.pipe'; AsyncPipe, BrowserOnlyPipe, ItemSelectComponent, - NgbNavModule, + NgbNav, + NgbNavContent, + NgbNavItem, + NgbNavLink, + NgbNavOutlet, ThemedSearchFormComponent, TranslateModule, ], diff --git a/src/app/collection-page/edit-collection-page/collection-source/collection-source.component.spec.ts b/src/app/collection-page/edit-collection-page/collection-source/collection-source.component.spec.ts index 03f945eb831..7eadf1e095a 100644 --- a/src/app/collection-page/edit-collection-page/collection-source/collection-source.component.spec.ts +++ b/src/app/collection-page/edit-collection-page/collection-source/collection-source.component.spec.ts @@ -35,10 +35,8 @@ import { createSuccessfulRemoteDataObject$, } from '@dspace/core/utilities/remote-data.utils'; import { hasValue } from '@dspace/shared/utils/empty.util'; -import { - DynamicFormControlModel, - DynamicFormService, -} from '@ng-dynamic-forms/core'; +import { DynamicFormControlModel } from '@ng-dynamic-forms/core/model/dynamic-form-control.model'; +import { DynamicFormService } from '@ng-dynamic-forms/core/service/dynamic-form.service'; import { TranslateModule } from '@ngx-translate/core'; import { of } from 'rxjs'; diff --git a/src/app/collection-page/edit-collection-page/collection-source/collection-source.component.ts b/src/app/collection-page/edit-collection-page/collection-source/collection-source.component.ts index df87e2b12e5..539f7229a34 100644 --- a/src/app/collection-page/edit-collection-page/collection-source/collection-source.component.ts +++ b/src/app/collection-page/edit-collection-page/collection-source/collection-source.component.ts @@ -35,16 +35,14 @@ import { hasValue, isNotEmpty, } from '@dspace/shared/utils/empty.util'; -import { - DynamicFormControlModel, - DynamicFormGroupModel, - DynamicFormLayout, - DynamicFormService, - DynamicInputModel, - DynamicOptionControlModel, - DynamicRadioGroupModel, - DynamicSelectModel, -} from '@ng-dynamic-forms/core'; +import { DynamicFormControlModel } from '@ng-dynamic-forms/core/model/dynamic-form-control.model'; +import { DynamicOptionControlModel } from '@ng-dynamic-forms/core/model/dynamic-option-control.model'; +import { DynamicFormGroupModel } from '@ng-dynamic-forms/core/model/form-group/dynamic-form-group.model'; +import { DynamicInputModel } from '@ng-dynamic-forms/core/model/input/dynamic-input.model'; +import { DynamicRadioGroupModel } from '@ng-dynamic-forms/core/model/radio/dynamic-radio-group.model'; +import { DynamicSelectModel } from '@ng-dynamic-forms/core/model/select/dynamic-select.model'; +import { DynamicFormService } from '@ng-dynamic-forms/core/service/dynamic-form.service'; +import { DynamicFormLayout } from '@ng-dynamic-forms/core/service/dynamic-form-layout.service'; import { TranslateModule, TranslateService, diff --git a/src/app/community-page/community-form/community-form.component.ts b/src/app/community-page/community-form/community-form.component.ts index 8b7bd36b4c9..098a9ac090c 100644 --- a/src/app/community-page/community-form/community-form.component.ts +++ b/src/app/community-page/community-form/community-form.component.ts @@ -13,12 +13,10 @@ import { RequestService } from '@dspace/core/data/request.service'; import { NotificationsService } from '@dspace/core/notification-system/notifications.service'; import { Community } from '@dspace/core/shared/community.model'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; -import { - DynamicFormControlModel, - DynamicFormService, - DynamicInputModel, - DynamicTextAreaModel, -} from '@ng-dynamic-forms/core'; +import { DynamicFormControlModel } from '@ng-dynamic-forms/core/model/dynamic-form-control.model'; +import { DynamicInputModel } from '@ng-dynamic-forms/core/model/input/dynamic-input.model'; +import { DynamicTextAreaModel } from '@ng-dynamic-forms/core/model/textarea/dynamic-textarea.model'; +import { DynamicFormService } from '@ng-dynamic-forms/core/service/dynamic-form.service'; import { TranslateModule, TranslateService, diff --git a/src/app/entity-groups/research-entities/metadata-representations/org-unit/org-unit-item-metadata-list-element.component.spec.ts b/src/app/entity-groups/research-entities/metadata-representations/org-unit/org-unit-item-metadata-list-element.component.spec.ts index 3483cbab753..f8179bf96d5 100644 --- a/src/app/entity-groups/research-entities/metadata-representations/org-unit/org-unit-item-metadata-list-element.component.spec.ts +++ b/src/app/entity-groups/research-entities/metadata-representations/org-unit/org-unit-item-metadata-list-element.component.spec.ts @@ -12,7 +12,10 @@ import { RouterLink } from '@angular/router'; import { Item } from '@dspace/core/shared/item.model'; import { MetadataValue } from '@dspace/core/shared/metadata.models'; import { ItemMetadataRepresentation } from '@dspace/core/shared/metadata-representation/item/item-metadata-representation.model'; -import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; +import { + NgbTooltip, + NgbTooltipModule, +} from '@ng-bootstrap/ng-bootstrap'; import { TruncatableComponent } from '../../../../shared/truncatable/truncatable.component'; import { OrgUnitItemMetadataListElementComponent } from './org-unit-item-metadata-list-element.component'; @@ -30,7 +33,7 @@ describe('OrgUnitItemMetadataListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [ - NgbModule, + NgbTooltipModule, OrgUnitItemMetadataListElementComponent, ], schemas: [NO_ERRORS_SCHEMA], @@ -56,9 +59,8 @@ describe('OrgUnitItemMetadataListElementComponent', () => { it('should show the description on hover over the link in a tooltip', () => { const link = fixture.debugElement.query(By.css('a')); - link.triggerEventHandler('mouseenter', null); - fixture.detectChanges(); - const tooltip = fixture.debugElement.query(By.css('.item-list-job-title')).nativeElement.textContent; - expect(tooltip).toBe(description); + const tooltipDir = link.injector.get(NgbTooltip); + expect(tooltipDir).toBeTruthy(); + expect(tooltipDir.ngbTooltip).toEqual(comp.descTemplate); }); }); diff --git a/src/app/entity-groups/research-entities/metadata-representations/org-unit/org-unit-item-metadata-list-element.component.ts b/src/app/entity-groups/research-entities/metadata-representations/org-unit/org-unit-item-metadata-list-element.component.ts index aa1372ccd42..88a65fb6f50 100644 --- a/src/app/entity-groups/research-entities/metadata-representations/org-unit/org-unit-item-metadata-list-element.component.ts +++ b/src/app/entity-groups/research-entities/metadata-representations/org-unit/org-unit-item-metadata-list-element.component.ts @@ -1,4 +1,8 @@ -import { Component } from '@angular/core'; +import { + Component, + TemplateRef, + ViewChild, +} from '@angular/core'; import { RouterLink } from '@angular/router'; import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; @@ -18,4 +22,5 @@ import { TruncatableComponent } from '../../../../shared/truncatable/truncatable * The component for displaying an item of the type OrgUnit as a metadata field */ export class OrgUnitItemMetadataListElementComponent extends ItemMetadataRepresentationListElementComponent { + @ViewChild('descTemplate', { static: true }) descTemplate: TemplateRef; } diff --git a/src/app/entity-groups/research-entities/metadata-representations/person/person-item-metadata-list-element.component.spec.ts b/src/app/entity-groups/research-entities/metadata-representations/person/person-item-metadata-list-element.component.spec.ts index 0a15667f291..8afc3973716 100644 --- a/src/app/entity-groups/research-entities/metadata-representations/person/person-item-metadata-list-element.component.spec.ts +++ b/src/app/entity-groups/research-entities/metadata-representations/person/person-item-metadata-list-element.component.spec.ts @@ -12,7 +12,10 @@ import { RouterLink } from '@angular/router'; import { Item } from '@dspace/core/shared/item.model'; import { MetadataValue } from '@dspace/core/shared/metadata.models'; import { ItemMetadataRepresentation } from '@dspace/core/shared/metadata-representation/item/item-metadata-representation.model'; -import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; +import { + NgbModule, + NgbTooltip, +} from '@ng-bootstrap/ng-bootstrap'; import { TruncatableComponent } from '../../../../shared/truncatable/truncatable.component'; import { PersonItemMetadataListElementComponent } from './person-item-metadata-list-element.component'; @@ -58,9 +61,8 @@ describe('PersonItemMetadataListElementComponent', () => { it('should show the description on hover over the link in a tooltip', () => { const link = fixture.debugElement.query(By.css('a')); - link.triggerEventHandler('mouseenter', null); - fixture.detectChanges(); - const tooltip = fixture.debugElement.query(By.css('.item-list-job-title')).nativeElement.textContent; - expect(tooltip).toBe(jobTitle); + const tooltipDir = link.injector.get(NgbTooltip); + expect(tooltipDir).toBeTruthy(); + expect(tooltipDir.ngbTooltip).toEqual(comp.descTemplate); }); }); diff --git a/src/app/entity-groups/research-entities/metadata-representations/person/person-item-metadata-list-element.component.ts b/src/app/entity-groups/research-entities/metadata-representations/person/person-item-metadata-list-element.component.ts index 737d63475b4..0499490e5b7 100644 --- a/src/app/entity-groups/research-entities/metadata-representations/person/person-item-metadata-list-element.component.ts +++ b/src/app/entity-groups/research-entities/metadata-representations/person/person-item-metadata-list-element.component.ts @@ -1,5 +1,9 @@ -import { Component } from '@angular/core'; +import { + Component, + TemplateRef, + ViewChild, +} from '@angular/core'; import { RouterLink } from '@angular/router'; import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; @@ -21,4 +25,5 @@ import { TruncatableComponent } from '../../../../shared/truncatable/truncatable * The component for displaying an item of the type Person as a metadata field */ export class PersonItemMetadataListElementComponent extends ItemMetadataRepresentationListElementComponent { + @ViewChild('descTemplate', { static: true }) descTemplate: TemplateRef; } diff --git a/src/app/health-page/health-page.component.spec.ts b/src/app/health-page/health-page.component.spec.ts index 19b10b3930b..f2dd0b9393b 100644 --- a/src/app/health-page/health-page.component.spec.ts +++ b/src/app/health-page/health-page.component.spec.ts @@ -10,7 +10,13 @@ import { HealthResponseObj, } from '@dspace/core/testing/health-endpoint.mocks'; import { TranslateLoaderMock } from '@dspace/core/testing/translate-loader.mock'; -import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; +import { + NgbNav, + NgbNavContent, + NgbNavItem, + NgbNavLink, + NgbNavOutlet, +} from '@ng-bootstrap/ng-bootstrap'; import { TranslateLoader, TranslateModule, @@ -45,7 +51,11 @@ describe('HealthPageComponent', () => { await TestBed.configureTestingModule({ imports: [ CommonModule, - NgbNavModule, + NgbNavLink, + NgbNavItem, + NgbNavContent, + NgbNavOutlet, + NgbNav, TranslateModule.forRoot({ loader: { provide: TranslateLoader, diff --git a/src/app/health-page/health-page.component.ts b/src/app/health-page/health-page.component.ts index ede8f8bc213..be5229b09f7 100644 --- a/src/app/health-page/health-page.component.ts +++ b/src/app/health-page/health-page.component.ts @@ -7,7 +7,13 @@ import { HealthInfoResponse, HealthResponse, } from '@dspace/core/shared/health-component.model'; -import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; +import { + NgbNav, + NgbNavContent, + NgbNavItem, + NgbNavLink, + NgbNavOutlet, +} from '@ng-bootstrap/ng-bootstrap'; import { TranslateModule } from '@ngx-translate/core'; import { BehaviorSubject } from 'rxjs'; import { take } from 'rxjs/operators'; @@ -27,7 +33,11 @@ import { HealthPanelComponent } from './health-panel/health-panel.component'; AsyncPipe, HealthInfoComponent, HealthPanelComponent, - NgbNavModule, + NgbNav, + NgbNavContent, + NgbNavItem, + NgbNavLink, + NgbNavOutlet, TranslateModule, ], }) diff --git a/src/app/init.service.ts b/src/app/init.service.ts index 7838a21706d..3690f331160 100644 --- a/src/app/init.service.ts +++ b/src/app/init.service.ts @@ -26,7 +26,7 @@ import { LAZY_DATA_SERVICES } from '@dspace/core/data-services-map'; import { APP_DATA_SERVICES_MAP } from '@dspace/core/data-services-map-type'; import { LocaleService } from '@dspace/core/locale/locale.service'; import { HeadTagService } from '@dspace/core/metadata/head-tag.service'; -import { DYNAMIC_FORM_CONTROL_MAP_FN } from '@ng-dynamic-forms/core'; +import { DYNAMIC_FORM_CONTROL_MAP_FN } from '@ng-dynamic-forms/core/service/dynamic-form-component.service'; import { select, Store, diff --git a/src/app/item-page/edit-item-page/item-collection-mapper/item-collection-mapper.component.spec.ts b/src/app/item-page/edit-item-page/item-collection-mapper/item-collection-mapper.component.spec.ts index daa8ab535b2..b6358841036 100644 --- a/src/app/item-page/edit-item-page/item-collection-mapper/item-collection-mapper.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-collection-mapper/item-collection-mapper.component.spec.ts @@ -36,7 +36,12 @@ import { createSuccessfulRemoteDataObject, createSuccessfulRemoteDataObject$, } from '@dspace/core/utilities/remote-data.utils'; -import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; +import { + NgbNavContent, + NgbNavItem, + NgbNavLink, + NgbNavOutlet, +} from '@ng-bootstrap/ng-bootstrap'; import { TranslateModule, TranslateService, @@ -131,7 +136,24 @@ describe('ItemCollectionMapperComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, ItemCollectionMapperComponent, CollectionSelectComponent, SearchFormComponent, PaginationComponent, EnumKeysPipe, VarDirective, ErrorComponent, LoadingComponent], + imports: [ + CommonModule, + FormsModule, + RouterTestingModule.withRoutes([]), + TranslateModule.forRoot(), + NgbNavLink, + NgbNavItem, + NgbNavContent, + NgbNavOutlet, + ItemCollectionMapperComponent, + CollectionSelectComponent, + SearchFormComponent, + PaginationComponent, + EnumKeysPipe, + VarDirective, + ErrorComponent, + LoadingComponent, + ], providers: [ { provide: ActivatedRoute, useValue: activatedRouteStub }, { provide: Router, useValue: routerStub }, diff --git a/src/app/item-page/edit-item-page/item-collection-mapper/item-collection-mapper.component.ts b/src/app/item-page/edit-item-page/item-collection-mapper/item-collection-mapper.component.ts index df0898efb01..b740b5df6b0 100644 --- a/src/app/item-page/edit-item-page/item-collection-mapper/item-collection-mapper.component.ts +++ b/src/app/item-page/edit-item-page/item-collection-mapper/item-collection-mapper.component.ts @@ -33,7 +33,13 @@ import { hasValue, isNotEmpty, } from '@dspace/shared/utils/empty.util'; -import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; +import { + NgbNav, + NgbNavContent, + NgbNavItem, + NgbNavLink, + NgbNavOutlet, +} from '@ng-bootstrap/ng-bootstrap'; import { TranslateModule, TranslateService, @@ -74,7 +80,11 @@ import { BrowserOnlyPipe } from '../../../shared/utils/browser-only.pipe'; AsyncPipe, BrowserOnlyPipe, CollectionSelectComponent, - NgbNavModule, + NgbNav, + NgbNavContent, + NgbNavItem, + NgbNavLink, + NgbNavOutlet, ThemedSearchFormComponent, TranslateModule, ], diff --git a/src/app/process-page/overview/table/process-overview-table.component.html b/src/app/process-page/overview/table/process-overview-table.component.html index a9aa922977a..a061fba0536 100644 --- a/src/app/process-page/overview/table/process-overview-table.component.html +++ b/src/app/process-page/overview/table/process-overview-table.component.html @@ -14,7 +14,7 @@

-
+
@if (!processesRD || processesRD.isLoading) { diff --git a/src/app/process-page/overview/table/process-overview-table.component.spec.ts b/src/app/process-page/overview/table/process-overview-table.component.spec.ts index dca49769442..883e0cfd302 100644 --- a/src/app/process-page/overview/table/process-overview-table.component.spec.ts +++ b/src/app/process-page/overview/table/process-overview-table.component.spec.ts @@ -146,8 +146,7 @@ describe('ProcessOverviewTableComponent', () => { translateServiceSpy = jasmine.createSpyObj('TranslateService', ['get']); void TestBed.configureTestingModule({ - declarations: [NgbCollapse], - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), VarDirective, ProcessOverviewTableComponent], + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), VarDirective, ProcessOverviewTableComponent, NgbCollapse], providers: [ { provide: ProcessOverviewService, useValue: processOverviewService }, { provide: ProcessDataService, useValue: processService }, diff --git a/src/app/process-page/overview/table/process-overview-table.component.ts b/src/app/process-page/overview/table/process-overview-table.component.ts index 02b9488dee2..e96bb617526 100644 --- a/src/app/process-page/overview/table/process-overview-table.component.ts +++ b/src/app/process-page/overview/table/process-overview-table.component.ts @@ -36,7 +36,7 @@ import { hasValue, isNotEmpty, } from '@dspace/shared/utils/empty.util'; -import { NgbCollapseModule } from '@ng-bootstrap/ng-bootstrap'; +import { NgbCollapse } from '@ng-bootstrap/ng-bootstrap'; import { TranslateModule, TranslateService, @@ -83,7 +83,7 @@ export interface ProcessOverviewTableEntry { templateUrl: './process-overview-table.component.html', imports: [ AsyncPipe, - NgbCollapseModule, + NgbCollapse, NgClass, PaginationComponent, RouterLink, diff --git a/src/app/profile-page/profile-page-metadata-form/profile-page-metadata-form.component.ts b/src/app/profile-page/profile-page-metadata-form/profile-page-metadata-form.component.ts index 114c221609c..1332f959bc5 100644 --- a/src/app/profile-page/profile-page-metadata-form/profile-page-metadata-form.component.ts +++ b/src/app/profile-page/profile-page-metadata-form/profile-page-metadata-form.component.ts @@ -17,12 +17,10 @@ import { hasValue, isNotEmpty, } from '@dspace/shared/utils/empty.util'; -import { - DynamicFormControlModel, - DynamicFormValueControlModel, - DynamicInputModel, - DynamicSelectModel, -} from '@ng-dynamic-forms/core'; +import { DynamicFormControlModel } from '@ng-dynamic-forms/core/model/dynamic-form-control.model'; +import { DynamicFormValueControlModel } from '@ng-dynamic-forms/core/model/dynamic-form-value-control.model'; +import { DynamicInputModel } from '@ng-dynamic-forms/core/model/input/dynamic-input.model'; +import { DynamicSelectModel } from '@ng-dynamic-forms/core/model/select/dynamic-select.model'; import { TranslateService } from '@ngx-translate/core'; import cloneDeep from 'lodash/cloneDeep'; diff --git a/src/app/profile-page/profile-page-security-form/profile-page-security-form.component.ts b/src/app/profile-page/profile-page-security-form/profile-page-security-form.component.ts index 189a7b020f4..c594fab5215 100644 --- a/src/app/profile-page/profile-page-security-form/profile-page-security-form.component.ts +++ b/src/app/profile-page/profile-page-security-form/profile-page-security-form.component.ts @@ -14,11 +14,9 @@ import { hasValue, isEmpty, } from '@dspace/shared/utils/empty.util'; -import { - DynamicFormControlModel, - DynamicFormService, - DynamicInputModel, -} from '@ng-dynamic-forms/core'; +import { DynamicFormControlModel } from '@ng-dynamic-forms/core/model/dynamic-form-control.model'; +import { DynamicInputModel } from '@ng-dynamic-forms/core/model/input/dynamic-input.model'; +import { DynamicFormService } from '@ng-dynamic-forms/core/service/dynamic-form.service'; import { TranslateModule, TranslateService, diff --git a/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.spec.ts b/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.spec.ts index d7f8961fde2..fa8b41fa0ab 100644 --- a/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.spec.ts +++ b/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.spec.ts @@ -21,11 +21,9 @@ import { AuthServiceMock } from '@dspace/core/testing/auth.service.mock'; import { NotificationsServiceStub } from '@dspace/core/testing/notifications-service.stub'; import { createSuccessfulRemoteDataObject$ } from '@dspace/core/utilities/remote-data.utils'; import { hasValue } from '@dspace/shared/utils/empty.util'; -import { - DynamicFormControlModel, - DynamicFormService, - DynamicInputModel, -} from '@ng-dynamic-forms/core'; +import { DynamicFormControlModel } from '@ng-dynamic-forms/core/model/dynamic-form-control.model'; +import { DynamicInputModel } from '@ng-dynamic-forms/core/model/input/dynamic-input.model'; +import { DynamicFormService } from '@ng-dynamic-forms/core/service/dynamic-form.service'; import { TranslateModule } from '@ngx-translate/core'; import { Operation } from 'fast-json-patch'; import { of } from 'rxjs'; diff --git a/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.ts b/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.ts index db9ac721301..24f2d0387e6 100644 --- a/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.ts +++ b/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.ts @@ -34,11 +34,9 @@ import { NgbModal, NgbModalRef, } from '@ng-bootstrap/ng-bootstrap'; -import { - DynamicFormControlModel, - DynamicFormService, - DynamicInputModel, -} from '@ng-dynamic-forms/core'; +import { DynamicFormControlModel } from '@ng-dynamic-forms/core/model/dynamic-form-control.model'; +import { DynamicInputModel } from '@ng-dynamic-forms/core/model/input/dynamic-input.model'; +import { DynamicFormService } from '@ng-dynamic-forms/core/service/dynamic-form.service'; import { TranslateModule, TranslateService, diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.spec.ts index 2721374f4e4..705993cd8d0 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.spec.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.spec.ts @@ -24,41 +24,40 @@ import { Item } from '@dspace/core/shared/item.model'; import { WorkspaceItem } from '@dspace/core/submission/models/workspaceitem.model'; import { VocabularyOptions } from '@dspace/core/submission/vocabularies/models/vocabulary-options.model'; import { createSuccessfulRemoteDataObject } from '@dspace/core/utilities/remote-data.utils'; -import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; +import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap'; +import { DynamicListDirective } from '@ng-dynamic-forms/core/directive/dynamic-list.directive'; +import { DynamicTemplateDirective } from '@ng-dynamic-forms/core/directive/dynamic-template.directive'; +import { DynamicCheckboxModel } from '@ng-dynamic-forms/core/model/checkbox/dynamic-checkbox.model'; +import { DynamicCheckboxGroupModel } from '@ng-dynamic-forms/core/model/checkbox/dynamic-checkbox-group.model'; +import { DynamicColorPickerModel } from '@ng-dynamic-forms/core/model/colorpicker/dynamic-colorpicker.model'; +import { DynamicDatePickerModel } from '@ng-dynamic-forms/core/model/datepicker/dynamic-datepicker.model'; +import { DynamicFormControlModel } from '@ng-dynamic-forms/core/model/dynamic-form-control.model'; +import { DynamicEditorModel } from '@ng-dynamic-forms/core/model/editor/dynamic-editor.model'; +import { DynamicFileUploadModel } from '@ng-dynamic-forms/core/model/file-upload/dynamic-file-upload.model'; +import { DynamicFormArrayModel } from '@ng-dynamic-forms/core/model/form-array/dynamic-form-array.model'; +import { DynamicFormGroupModel } from '@ng-dynamic-forms/core/model/form-group/dynamic-form-group.model'; +import { DynamicInputModel } from '@ng-dynamic-forms/core/model/input/dynamic-input.model'; +import { DynamicRadioGroupModel } from '@ng-dynamic-forms/core/model/radio/dynamic-radio-group.model'; +import { DynamicRatingModel } from '@ng-dynamic-forms/core/model/rating/dynamic-rating.model'; +import { DynamicSelectModel } from '@ng-dynamic-forms/core/model/select/dynamic-select.model'; +import { DynamicSliderModel } from '@ng-dynamic-forms/core/model/slider/dynamic-slider.model'; +import { DynamicSwitchModel } from '@ng-dynamic-forms/core/model/switch/dynamic-switch.model'; +import { DynamicTextAreaModel } from '@ng-dynamic-forms/core/model/textarea/dynamic-textarea.model'; +import { DynamicTimePickerModel } from '@ng-dynamic-forms/core/model/timepicker/dynamic-timepicker.model'; +import { DynamicFormService } from '@ng-dynamic-forms/core/service/dynamic-form.service'; +import { DYNAMIC_FORM_CONTROL_MAP_FN } from '@ng-dynamic-forms/core/service/dynamic-form-component.service'; import { - DYNAMIC_FORM_CONTROL_MAP_FN, - DynamicCheckboxGroupModel, - DynamicCheckboxModel, - DynamicColorPickerModel, - DynamicDatePickerModel, - DynamicEditorModel, - DynamicFileUploadModel, - DynamicFormArrayModel, - DynamicFormControlModel, - DynamicFormGroupModel, - DynamicFormsCoreModule, - DynamicFormService, - DynamicInputModel, - DynamicRadioGroupModel, - DynamicRatingModel, - DynamicSelectModel, - DynamicSliderModel, - DynamicSwitchModel, - DynamicTextAreaModel, - DynamicTimePickerModel, MATCH_VISIBLE, OR_OPERATOR, -} from '@ng-dynamic-forms/core'; -import { - DynamicNGBootstrapCalendarComponent, - DynamicNGBootstrapCheckboxComponent, - DynamicNGBootstrapCheckboxGroupComponent, - DynamicNGBootstrapInputComponent, - DynamicNGBootstrapRadioGroupComponent, - DynamicNGBootstrapSelectComponent, - DynamicNGBootstrapTextAreaComponent, - DynamicNGBootstrapTimePickerComponent, -} from '@ng-dynamic-forms/ui-ng-bootstrap'; +} from '@ng-dynamic-forms/core/service/dynamic-form-relation-matchers'; +import { DynamicNGBootstrapCalendarComponent } from '@ng-dynamic-forms/ui-ng-bootstrap/calendar/dynamic-ng-bootstrap-calendar.component'; +import { DynamicNGBootstrapCheckboxComponent } from '@ng-dynamic-forms/ui-ng-bootstrap/checkbox/dynamic-ng-bootstrap-checkbox.component'; +import { DynamicNGBootstrapCheckboxGroupComponent } from '@ng-dynamic-forms/ui-ng-bootstrap/checkbox-group/dynamic-ng-bootstrap-checkbox-group.component'; +import { DynamicNGBootstrapInputComponent } from '@ng-dynamic-forms/ui-ng-bootstrap/input/dynamic-ng-bootstrap-input.component'; +import { DynamicNGBootstrapRadioGroupComponent } from '@ng-dynamic-forms/ui-ng-bootstrap/radio-group/dynamic-ng-bootstrap-radio-group.component'; +import { DynamicNGBootstrapSelectComponent } from '@ng-dynamic-forms/ui-ng-bootstrap/select/dynamic-ng-bootstrap-select.component'; +import { DynamicNGBootstrapTextAreaComponent } from '@ng-dynamic-forms/ui-ng-bootstrap/textarea/dynamic-ng-bootstrap-textarea.component'; +import { DynamicNGBootstrapTimePickerComponent } from '@ng-dynamic-forms/ui-ng-bootstrap/timepicker/dynamic-ng-bootstrap-timepicker.component'; import { Store } from '@ngrx/store'; import { TranslateModule } from '@ngx-translate/core'; import { NgxMaskModule } from 'ngx-mask'; @@ -213,8 +212,9 @@ describe('DsDynamicFormControlContainerComponent test suite', () => { imports: [ FormsModule, ReactiveFormsModule, - NgbModule, - DynamicFormsCoreModule.forRoot(), + NgbTooltip, + DynamicListDirective, + DynamicTemplateDirective, TranslateModule.forRoot(), NgxMaskModule.forRoot(), ], diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts index 5a7ebcd34d6..2a48003e7fd 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts @@ -72,26 +72,32 @@ import { import { NgbModal, NgbModalRef, - NgbTooltipModule, + NgbTooltip, } from '@ng-bootstrap/ng-bootstrap'; +import { DynamicFormControlContainerComponent } from '@ng-dynamic-forms/core/component/dynamic-form-control-container.component'; +import { + DynamicFormControlEvent, + DynamicFormControlEventType, +} from '@ng-dynamic-forms/core/component/dynamic-form-control-event'; +import { DynamicFormControl } from '@ng-dynamic-forms/core/component/dynamic-form-control-interface'; +import { DynamicTemplateDirective } from '@ng-dynamic-forms/core/directive/dynamic-template.directive'; +import { DYNAMIC_FORM_CONTROL_TYPE_CHECKBOX } from '@ng-dynamic-forms/core/model/checkbox/dynamic-checkbox.model'; +import { DynamicFormControlModel } from '@ng-dynamic-forms/core/model/dynamic-form-control.model'; import { - DYNAMIC_FORM_CONTROL_MAP_FN, - DYNAMIC_FORM_CONTROL_TYPE_CHECKBOX, DynamicFormArrayGroupModel, DynamicFormArrayModel, +} from '@ng-dynamic-forms/core/model/form-array/dynamic-form-array.model'; +import { + DYNAMIC_FORM_CONTROL_MAP_FN, DynamicFormComponentService, - DynamicFormControl, - DynamicFormControlContainerComponent, - DynamicFormControlEvent, - DynamicFormControlEventType, DynamicFormControlMapFn, - DynamicFormControlModel, +} from '@ng-dynamic-forms/core/service/dynamic-form-component.service'; +import { DynamicFormLayout, DynamicFormLayoutService, - DynamicFormRelationService, - DynamicFormValidationService, - DynamicTemplateDirective, -} from '@ng-dynamic-forms/core'; +} from '@ng-dynamic-forms/core/service/dynamic-form-layout.service'; +import { DynamicFormRelationService } from '@ng-dynamic-forms/core/service/dynamic-form-relation.service'; +import { DynamicFormValidationService } from '@ng-dynamic-forms/core/service/dynamic-form-validation.service'; import { Store } from '@ngrx/store'; import { TranslateModule, @@ -133,7 +139,7 @@ import { NameVariantService } from './relation-lookup-modal/name-variant.service ExistingMetadataListElementComponent, ExistingRelationListElementComponent, FormsModule, - NgbTooltipModule, + NgbTooltip, NgClass, NgTemplateOutlet, ReactiveFormsModule, diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-map-fn.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-map-fn.ts index 5f3ce659fcd..63f49e33cb6 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-map-fn.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-map-fn.ts @@ -1,30 +1,28 @@ import { Type } from '@angular/core'; import { DYNAMIC_FORM_CONTROL_TYPE_RELATION_GROUP } from '@dspace/core/shared/form/ds-dynamic-form-constants'; +import { DynamicFormControl } from '@ng-dynamic-forms/core/component/dynamic-form-control-interface'; +import { DYNAMIC_FORM_CONTROL_TYPE_CHECKBOX } from '@ng-dynamic-forms/core/model/checkbox/dynamic-checkbox.model'; +import { DYNAMIC_FORM_CONTROL_TYPE_CHECKBOX_GROUP } from '@ng-dynamic-forms/core/model/checkbox/dynamic-checkbox-group.model'; import { - DYNAMIC_FORM_CONTROL_TYPE_ARRAY, - DYNAMIC_FORM_CONTROL_TYPE_CHECKBOX, - DYNAMIC_FORM_CONTROL_TYPE_CHECKBOX_GROUP, DYNAMIC_FORM_CONTROL_TYPE_DATEPICKER, - DYNAMIC_FORM_CONTROL_TYPE_GROUP, - DYNAMIC_FORM_CONTROL_TYPE_INPUT, - DYNAMIC_FORM_CONTROL_TYPE_RADIO_GROUP, - DYNAMIC_FORM_CONTROL_TYPE_SELECT, - DYNAMIC_FORM_CONTROL_TYPE_TEXTAREA, - DYNAMIC_FORM_CONTROL_TYPE_TIMEPICKER, DynamicDatePickerModel, - DynamicFormControl, - DynamicFormControlModel, -} from '@ng-dynamic-forms/core'; -import { - DynamicNGBootstrapCalendarComponent, - DynamicNGBootstrapCheckboxComponent, - DynamicNGBootstrapCheckboxGroupComponent, - DynamicNGBootstrapInputComponent, - DynamicNGBootstrapRadioGroupComponent, - DynamicNGBootstrapSelectComponent, - DynamicNGBootstrapTextAreaComponent, - DynamicNGBootstrapTimePickerComponent, -} from '@ng-dynamic-forms/ui-ng-bootstrap'; +} from '@ng-dynamic-forms/core/model/datepicker/dynamic-datepicker.model'; +import { DynamicFormControlModel } from '@ng-dynamic-forms/core/model/dynamic-form-control.model'; +import { DYNAMIC_FORM_CONTROL_TYPE_ARRAY } from '@ng-dynamic-forms/core/model/form-array/dynamic-form-array.model'; +import { DYNAMIC_FORM_CONTROL_TYPE_GROUP } from '@ng-dynamic-forms/core/model/form-group/dynamic-form-group.model'; +import { DYNAMIC_FORM_CONTROL_TYPE_INPUT } from '@ng-dynamic-forms/core/model/input/dynamic-input.model'; +import { DYNAMIC_FORM_CONTROL_TYPE_RADIO_GROUP } from '@ng-dynamic-forms/core/model/radio/dynamic-radio-group.model'; +import { DYNAMIC_FORM_CONTROL_TYPE_SELECT } from '@ng-dynamic-forms/core/model/select/dynamic-select.model'; +import { DYNAMIC_FORM_CONTROL_TYPE_TEXTAREA } from '@ng-dynamic-forms/core/model/textarea/dynamic-textarea.model'; +import { DYNAMIC_FORM_CONTROL_TYPE_TIMEPICKER } from '@ng-dynamic-forms/core/model/timepicker/dynamic-timepicker.model'; +import { DynamicNGBootstrapCalendarComponent } from '@ng-dynamic-forms/ui-ng-bootstrap/calendar/dynamic-ng-bootstrap-calendar.component'; +import { DynamicNGBootstrapCheckboxComponent } from '@ng-dynamic-forms/ui-ng-bootstrap/checkbox/dynamic-ng-bootstrap-checkbox.component'; +import { DynamicNGBootstrapCheckboxGroupComponent } from '@ng-dynamic-forms/ui-ng-bootstrap/checkbox-group/dynamic-ng-bootstrap-checkbox-group.component'; +import { DynamicNGBootstrapInputComponent } from '@ng-dynamic-forms/ui-ng-bootstrap/input/dynamic-ng-bootstrap-input.component'; +import { DynamicNGBootstrapRadioGroupComponent } from '@ng-dynamic-forms/ui-ng-bootstrap/radio-group/dynamic-ng-bootstrap-radio-group.component'; +import { DynamicNGBootstrapSelectComponent } from '@ng-dynamic-forms/ui-ng-bootstrap/select/dynamic-ng-bootstrap-select.component'; +import { DynamicNGBootstrapTextAreaComponent } from '@ng-dynamic-forms/ui-ng-bootstrap/textarea/dynamic-ng-bootstrap-textarea.component'; +import { DynamicNGBootstrapTimePickerComponent } from '@ng-dynamic-forms/ui-ng-bootstrap/timepicker/dynamic-ng-bootstrap-timepicker.component'; import { DsDynamicFormArrayComponent } from './models/array-group/dynamic-form-array.component'; import { CustomSwitchComponent } from './models/custom-switch/custom-switch.component'; diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form.component.ts index 2eb43b34829..09932f58485 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form.component.ts @@ -11,15 +11,13 @@ import { ViewChildren, } from '@angular/core'; import { UntypedFormGroup } from '@angular/forms'; -import { - DynamicFormComponent, - DynamicFormComponentService, - DynamicFormControlContainerComponent, - DynamicFormControlEvent, - DynamicFormControlModel, - DynamicFormLayout, - DynamicTemplateDirective, -} from '@ng-dynamic-forms/core'; +import { DynamicFormComponent } from '@ng-dynamic-forms/core/component/dynamic-form.component'; +import { DynamicFormControlContainerComponent } from '@ng-dynamic-forms/core/component/dynamic-form-control-container.component'; +import { DynamicFormControlEvent } from '@ng-dynamic-forms/core/component/dynamic-form-control-event'; +import { DynamicTemplateDirective } from '@ng-dynamic-forms/core/directive/dynamic-template.directive'; +import { DynamicFormControlModel } from '@ng-dynamic-forms/core/model/dynamic-form-control.model'; +import { DynamicFormComponentService } from '@ng-dynamic-forms/core/service/dynamic-form-component.service'; +import { DynamicFormLayout } from '@ng-dynamic-forms/core/service/dynamic-form-layout.service'; import { DsDynamicFormControlContainerComponent } from './ds-dynamic-form-control-container.component'; diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-type-bind-relation.service.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-type-bind-relation.service.spec.ts index 7ef578e7aa5..320398bc245 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-type-bind-relation.service.spec.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-type-bind-relation.service.spec.ts @@ -8,13 +8,13 @@ import { UntypedFormControl, } from '@angular/forms'; import { FormFieldMetadataValueObject } from '@dspace/core/shared/form/models/form-field-metadata-value.model'; +import { DynamicFormRelationService } from '@ng-dynamic-forms/core/service/dynamic-form-relation.service'; import { DISABLED_MATCHER_PROVIDER, - DynamicFormRelationService, HIDDEN_MATCHER, HIDDEN_MATCHER_PROVIDER, REQUIRED_MATCHER_PROVIDER, -} from '@ng-dynamic-forms/core'; +} from '@ng-dynamic-forms/core/service/dynamic-form-relation-matchers'; import { getMockFormBuilderService } from '../../testing/form-builder-service.mock'; import { diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-type-bind-relation.service.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-type-bind-relation.service.ts index 68a77c8f9ad..3b72843e557 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-type-bind-relation.service.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-type-bind-relation.service.ts @@ -11,16 +11,18 @@ import { hasNoValue, hasValue, } from '@dspace/shared/utils/empty.util'; +import { DynamicFormControlModel } from '@ng-dynamic-forms/core/model/dynamic-form-control.model'; +import { + DynamicFormControlCondition, + DynamicFormControlRelation, +} from '@ng-dynamic-forms/core/model/misc/dynamic-form-control-relation.model'; +import { DynamicFormRelationService } from '@ng-dynamic-forms/core/service/dynamic-form-relation.service'; import { AND_OPERATOR, DYNAMIC_MATCHERS, - DynamicFormControlCondition, DynamicFormControlMatcher, - DynamicFormControlModel, - DynamicFormControlRelation, - DynamicFormRelationService, OR_OPERATOR, -} from '@ng-dynamic-forms/core'; +} from '@ng-dynamic-forms/core/service/dynamic-form-relation-matchers'; import { Subscription } from 'rxjs'; import { startWith } from 'rxjs/operators'; diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/array-group/dynamic-form-array.component.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/array-group/dynamic-form-array.component.spec.ts index 576fa609e95..ef99c72d41e 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/array-group/dynamic-form-array.component.spec.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/array-group/dynamic-form-array.component.spec.ts @@ -9,13 +9,11 @@ import { ReactiveFormsModule } from '@angular/forms'; import { By } from '@angular/platform-browser'; import { APP_CONFIG } from '@dspace/config/app-config.interface'; import { APP_DATA_SERVICES_MAP } from '@dspace/core/data-services-map-type'; -import { - DYNAMIC_FORM_CONTROL_MAP_FN, - DynamicFormLayoutService, - DynamicFormService, - DynamicFormValidationService, - DynamicInputModel, -} from '@ng-dynamic-forms/core'; +import { DynamicInputModel } from '@ng-dynamic-forms/core/model/input/dynamic-input.model'; +import { DynamicFormService } from '@ng-dynamic-forms/core/service/dynamic-form.service'; +import { DYNAMIC_FORM_CONTROL_MAP_FN } from '@ng-dynamic-forms/core/service/dynamic-form-component.service'; +import { DynamicFormLayoutService } from '@ng-dynamic-forms/core/service/dynamic-form-layout.service'; +import { DynamicFormValidationService } from '@ng-dynamic-forms/core/service/dynamic-form-validation.service'; import { provideMockStore } from '@ngrx/store/testing'; import { TranslateModule, diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/array-group/dynamic-form-array.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/array-group/dynamic-form-array.component.ts index ceab82bf6f0..249bdd20bd8 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/array-group/dynamic-form-array.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/array-group/dynamic-form-array.component.ts @@ -22,17 +22,19 @@ import { } from '@angular/forms'; import { Relationship } from '@dspace/core/shared/item-relationships/relationship.model'; import { hasValue } from '@dspace/shared/utils/empty.util'; +import { DynamicFormArrayComponent } from '@ng-dynamic-forms/core/component/dynamic-form-array.component'; import { - DynamicFormArrayComponent, DynamicFormControlCustomEvent, DynamicFormControlEvent, - DynamicFormControlLayout, - DynamicFormControlModel, +} from '@ng-dynamic-forms/core/component/dynamic-form-control-event'; +import { DynamicTemplateDirective } from '@ng-dynamic-forms/core/directive/dynamic-template.directive'; +import { DynamicFormControlModel } from '@ng-dynamic-forms/core/model/dynamic-form-control.model'; +import { DynamicFormControlLayout } from '@ng-dynamic-forms/core/model/misc/dynamic-form-control-layout.model'; +import { DynamicFormLayout, DynamicFormLayoutService, - DynamicFormValidationService, - DynamicTemplateDirective, -} from '@ng-dynamic-forms/core'; +} from '@ng-dynamic-forms/core/service/dynamic-form-layout.service'; +import { DynamicFormValidationService } from '@ng-dynamic-forms/core/service/dynamic-form-validation.service'; import { TranslateModule, TranslateService, diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.component.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.component.spec.ts index 342e36d7186..8936471d6fe 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.component.spec.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.component.spec.ts @@ -11,10 +11,9 @@ import { } from '@angular/forms'; import { By } from '@angular/platform-browser'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; -import { - DynamicFormsCoreModule, - DynamicFormService, -} from '@ng-dynamic-forms/core'; +import { DynamicListDirective } from '@ng-dynamic-forms/core/directive/dynamic-list.directive'; +import { DynamicTemplateDirective } from '@ng-dynamic-forms/core/directive/dynamic-template.directive'; +import { DynamicFormService } from '@ng-dynamic-forms/core/service/dynamic-form.service'; import { TranslateModule } from '@ngx-translate/core'; import { CustomSwitchComponent } from './custom-switch.component'; @@ -36,7 +35,8 @@ describe('CustomSwitchComponent', () => { TranslateModule.forRoot(), ReactiveFormsModule, NoopAnimationsModule, - DynamicFormsCoreModule.forRoot(), + DynamicListDirective, + DynamicTemplateDirective, CustomSwitchComponent, ], }).compileComponents().then(() => { diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.component.ts index e99b53a99ce..c90c7f6aaf1 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.component.ts @@ -9,11 +9,9 @@ import { ReactiveFormsModule, UntypedFormGroup, } from '@angular/forms'; -import { - DynamicFormLayoutService, - DynamicFormValidationService, -} from '@ng-dynamic-forms/core'; -import { DynamicNGBootstrapCheckboxComponent } from '@ng-dynamic-forms/ui-ng-bootstrap'; +import { DynamicFormLayoutService } from '@ng-dynamic-forms/core/service/dynamic-form-layout.service'; +import { DynamicFormValidationService } from '@ng-dynamic-forms/core/service/dynamic-form-validation.service'; +import { DynamicNGBootstrapCheckboxComponent } from '@ng-dynamic-forms/ui-ng-bootstrap/checkbox/dynamic-ng-bootstrap-checkbox.component'; import { TranslateModule } from '@ngx-translate/core'; import { DynamicCustomSwitchModel } from './custom-switch.model'; diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.model.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.model.ts index 4a7e7a22bed..f9ca9cc15f2 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.model.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.model.ts @@ -1,9 +1,10 @@ +import { serializable } from '@ng-dynamic-forms/core/decorator/serializable.decorator'; import { DynamicCheckboxModel, DynamicCheckboxModelConfig, - DynamicFormControlLayout, - serializable, -} from '@ng-dynamic-forms/core'; +} from '@ng-dynamic-forms/core/model/checkbox/dynamic-checkbox.model'; +import { DynamicFormControlLayout } from '@ng-dynamic-forms/core/model/misc/dynamic-form-control-layout.model'; + export const DYNAMIC_FORM_CONTROL_TYPE_CUSTOM_SWITCH = 'CUSTOM_SWITCH'; diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker-inline/dynamic-date-picker-inline.component.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker-inline/dynamic-date-picker-inline.component.spec.ts index c3b488ef76c..2bba8ee6ceb 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker-inline/dynamic-date-picker-inline.component.spec.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker-inline/dynamic-date-picker-inline.component.spec.ts @@ -13,11 +13,10 @@ import { import { By } from '@angular/platform-browser'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { NgbDatepickerModule } from '@ng-bootstrap/ng-bootstrap'; -import { - DynamicDatePickerModel, - DynamicFormsCoreModule, - DynamicFormService, -} from '@ng-dynamic-forms/core'; +import { DynamicListDirective } from '@ng-dynamic-forms/core/directive/dynamic-list.directive'; +import { DynamicTemplateDirective } from '@ng-dynamic-forms/core/directive/dynamic-template.directive'; +import { DynamicDatePickerModel } from '@ng-dynamic-forms/core/model/datepicker/dynamic-datepicker.model'; +import { DynamicFormService } from '@ng-dynamic-forms/core/service/dynamic-form.service'; import { DsDatePickerInlineComponent } from './dynamic-date-picker-inline.component'; @@ -38,7 +37,8 @@ describe('DsDatePickerInlineComponent test suite', () => { ReactiveFormsModule, NoopAnimationsModule, NgbDatepickerModule, - DynamicFormsCoreModule.forRoot(), + DynamicListDirective, + DynamicTemplateDirective, DsDatePickerInlineComponent, ], }).compileComponents().then(() => { diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker-inline/dynamic-date-picker-inline.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker-inline/dynamic-date-picker-inline.component.ts index 5c4fe42a91f..dcc4f43ca09 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker-inline/dynamic-date-picker-inline.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker-inline/dynamic-date-picker-inline.component.ts @@ -15,13 +15,11 @@ import { NgbDatepickerConfig, NgbDatepickerModule, } from '@ng-bootstrap/ng-bootstrap'; -import { - DynamicDatePickerModel, - DynamicFormControlComponent, - DynamicFormControlLayout, - DynamicFormLayoutService, - DynamicFormValidationService, -} from '@ng-dynamic-forms/core'; +import { DynamicFormControlComponent } from '@ng-dynamic-forms/core/component/dynamic-form-control.component'; +import { DynamicDatePickerModel } from '@ng-dynamic-forms/core/model/datepicker/dynamic-datepicker.model'; +import { DynamicFormControlLayout } from '@ng-dynamic-forms/core/model/misc/dynamic-form-control-layout.model'; +import { DynamicFormLayoutService } from '@ng-dynamic-forms/core/service/dynamic-form-layout.service'; +import { DynamicFormValidationService } from '@ng-dynamic-forms/core/service/dynamic-form-validation.service'; import { BtnDisabledDirective } from '../../../../../btn-disabled.directive'; diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.component.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.component.spec.ts index 7af8b36b65b..b80d53f3c00 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.component.spec.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.component.spec.ts @@ -25,10 +25,8 @@ import { } from '@dspace/core/testing/dynamic-form-mock-services'; import { createTestComponent } from '@dspace/core/testing/utils.test'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; -import { - DynamicFormLayoutService, - DynamicFormValidationService, -} from '@ng-dynamic-forms/core'; +import { DynamicFormLayoutService } from '@ng-dynamic-forms/core/service/dynamic-form-layout.service'; +import { DynamicFormValidationService } from '@ng-dynamic-forms/core/service/dynamic-form-validation.service'; import { TranslateModule, TranslateService, diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.component.ts index f0475fdf61a..e900d75e91b 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.component.ts @@ -15,11 +15,9 @@ import { UntypedFormGroup, } from '@angular/forms'; import { hasValue } from '@dspace/shared/utils/empty.util'; -import { - DynamicFormControlComponent, - DynamicFormLayoutService, - DynamicFormValidationService, -} from '@ng-dynamic-forms/core'; +import { DynamicFormControlComponent } from '@ng-dynamic-forms/core/component/dynamic-form-control.component'; +import { DynamicFormLayoutService } from '@ng-dynamic-forms/core/service/dynamic-form-layout.service'; +import { DynamicFormValidationService } from '@ng-dynamic-forms/core/service/dynamic-form-validation.service'; import { TranslateModule } from '@ngx-translate/core'; import isEqual from 'lodash/isEqual'; diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.model.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.model.ts index 33e0ee9ca48..0c62a83e0c4 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.model.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.model.ts @@ -3,14 +3,12 @@ import { isEmpty, isNotUndefined, } from '@dspace/shared/utils/empty.util'; -import { - DynamicDateControlModel, - DynamicDatePickerModelConfig, - DynamicFormControlLayout, - DynamicFormControlModel, - DynamicFormControlRelation, - serializable, -} from '@ng-dynamic-forms/core'; +import { serializable } from '@ng-dynamic-forms/core/decorator/serializable.decorator'; +import { DynamicDatePickerModelConfig } from '@ng-dynamic-forms/core/model/datepicker/dynamic-datepicker.model'; +import { DynamicDateControlModel } from '@ng-dynamic-forms/core/model/dynamic-date-control.model'; +import { DynamicFormControlModel } from '@ng-dynamic-forms/core/model/dynamic-form-control.model'; +import { DynamicFormControlLayout } from '@ng-dynamic-forms/core/model/misc/dynamic-form-control-layout.model'; +import { DynamicFormControlRelation } from '@ng-dynamic-forms/core/model/misc/dynamic-form-control-relation.model'; import { BehaviorSubject, Subject, diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/disabled/dynamic-disabled.component.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/disabled/dynamic-disabled.component.spec.ts index 26d3f51ac7d..a27e2abd6af 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/disabled/dynamic-disabled.component.spec.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/disabled/dynamic-disabled.component.spec.ts @@ -17,10 +17,8 @@ import { mockDynamicFormLayoutService, mockDynamicFormValidationService, } from '@dspace/core/testing/dynamic-form-mock-services'; -import { - DynamicFormLayoutService, - DynamicFormValidationService, -} from '@ng-dynamic-forms/core'; +import { DynamicFormLayoutService } from '@ng-dynamic-forms/core/service/dynamic-form-layout.service'; +import { DynamicFormValidationService } from '@ng-dynamic-forms/core/service/dynamic-form-validation.service'; import { TranslateModule } from '@ngx-translate/core'; import { DsDynamicDisabledComponent } from './dynamic-disabled.component'; diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/disabled/dynamic-disabled.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/disabled/dynamic-disabled.component.ts index dfdfeb960e9..392b31a82af 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/disabled/dynamic-disabled.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/disabled/dynamic-disabled.component.ts @@ -5,11 +5,9 @@ import { Output, } from '@angular/core'; import { UntypedFormGroup } from '@angular/forms'; -import { - DynamicFormControlComponent, - DynamicFormLayoutService, - DynamicFormValidationService, -} from '@ng-dynamic-forms/core'; +import { DynamicFormControlComponent } from '@ng-dynamic-forms/core/component/dynamic-form-control.component'; +import { DynamicFormLayoutService } from '@ng-dynamic-forms/core/service/dynamic-form-layout.service'; +import { DynamicFormValidationService } from '@ng-dynamic-forms/core/service/dynamic-form-validation.service'; import { TranslateModule } from '@ngx-translate/core'; import { DynamicDisabledModel } from './dynamic-disabled.model'; diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/disabled/dynamic-disabled.model.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/disabled/dynamic-disabled.model.ts index 5902a7cc3d0..36595eb9939 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/disabled/dynamic-disabled.model.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/disabled/dynamic-disabled.model.ts @@ -1,7 +1,5 @@ -import { - DynamicFormControlLayout, - serializable, -} from '@ng-dynamic-forms/core'; +import { serializable } from '@ng-dynamic-forms/core/decorator/serializable.decorator'; +import { DynamicFormControlLayout } from '@ng-dynamic-forms/core/model/misc/dynamic-form-control-layout.model'; import { DsDynamicInputModel, diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-concat.model.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-concat.model.ts index 374d046b318..35a3dbb275b 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-concat.model.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-concat.model.ts @@ -5,13 +5,13 @@ import { hasNoValue, isNotEmpty, } from '@dspace/shared/utils/empty.util'; +import { serializable } from '@ng-dynamic-forms/core/decorator/serializable.decorator'; import { - DynamicFormControlLayout, - DynamicFormControlRelation, DynamicFormGroupModel, DynamicFormGroupModelConfig, - serializable, -} from '@ng-dynamic-forms/core'; +} from '@ng-dynamic-forms/core/model/form-group/dynamic-form-group.model'; +import { DynamicFormControlLayout } from '@ng-dynamic-forms/core/model/misc/dynamic-form-control-layout.model'; +import { DynamicFormControlRelation } from '@ng-dynamic-forms/core/model/misc/dynamic-form-control-relation.model'; import { Subject } from 'rxjs'; import { DsDynamicInputModel } from './ds-dynamic-input.model'; diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-input.model.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-input.model.ts index 8d1edcc27f3..caf3ed47a4b 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-input.model.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-input.model.ts @@ -3,13 +3,13 @@ import { FormFieldMetadataValueObject } from '@dspace/core/shared/form/models/fo import { RelationshipOptions } from '@dspace/core/shared/relationship-options.model'; import { VocabularyOptions } from '@dspace/core/submission/vocabularies/models/vocabulary-options.model'; import { hasValue } from '@dspace/shared/utils/empty.util'; +import { serializable } from '@ng-dynamic-forms/core/decorator/serializable.decorator'; import { - DynamicFormControlLayout, - DynamicFormControlRelation, DynamicInputModel, DynamicInputModelConfig, - serializable, -} from '@ng-dynamic-forms/core'; +} from '@ng-dynamic-forms/core/model/input/dynamic-input.model'; +import { DynamicFormControlLayout } from '@ng-dynamic-forms/core/model/misc/dynamic-form-control-layout.model'; +import { DynamicFormControlRelation } from '@ng-dynamic-forms/core/model/misc/dynamic-form-control-relation.model'; import { Subject } from 'rxjs'; export interface DsDynamicInputModelConfig extends DynamicInputModelConfig { diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-qualdrop.model.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-qualdrop.model.ts index 16d52a7330b..d5b35bde65d 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-qualdrop.model.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-qualdrop.model.ts @@ -1,10 +1,10 @@ import { LanguageCode } from '@dspace/core/shared/form/models/form-field-language-value.model'; +import { serializable } from '@ng-dynamic-forms/core/decorator/serializable.decorator'; import { - DynamicFormControlLayout, DynamicFormGroupModel, DynamicFormGroupModelConfig, - serializable, -} from '@ng-dynamic-forms/core'; +} from '@ng-dynamic-forms/core/model/form-group/dynamic-form-group.model'; +import { DynamicFormControlLayout } from '@ng-dynamic-forms/core/model/misc/dynamic-form-control-layout.model'; import { Subject } from 'rxjs'; import { DsDynamicInputModel } from './ds-dynamic-input.model'; diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-row-array-model.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-row-array-model.ts index 2761f365a09..48270a4d5f3 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-row-array-model.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-row-array-model.ts @@ -1,12 +1,12 @@ import { RelationshipOptions } from '@dspace/core/shared/relationship-options.model'; import { hasValue } from '@dspace/shared/utils/empty.util'; +import { serializable } from '@ng-dynamic-forms/core/decorator/serializable.decorator'; import { DynamicFormArrayModel, DynamicFormArrayModelConfig, - DynamicFormControlLayout, - DynamicFormControlRelation, - serializable, -} from '@ng-dynamic-forms/core'; +} from '@ng-dynamic-forms/core/model/form-array/dynamic-form-array.model'; +import { DynamicFormControlLayout } from '@ng-dynamic-forms/core/model/misc/dynamic-form-control-layout.model'; +import { DynamicFormControlRelation } from '@ng-dynamic-forms/core/model/misc/dynamic-form-control-relation.model'; export interface DynamicRowArrayModelConfig extends DynamicFormArrayModelConfig { notRepeatable: boolean; diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-row-group-model.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-row-group-model.ts index b6d76b4c55b..f555dea5371 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-row-group-model.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-row-group-model.ts @@ -1,4 +1,4 @@ -import { DynamicFormGroupModel } from '@ng-dynamic-forms/core'; +import { DynamicFormGroupModel } from '@ng-dynamic-forms/core/model/form-group/dynamic-form-group.model'; export class DynamicRowGroupModel extends DynamicFormGroupModel { isRowGroup = true; diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-textarea.model.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-textarea.model.ts index 532acf720a0..a83472c2e10 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-textarea.model.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-textarea.model.ts @@ -1,8 +1,6 @@ -import { - DYNAMIC_FORM_CONTROL_TYPE_TEXTAREA, - DynamicFormControlLayout, - serializable, -} from '@ng-dynamic-forms/core'; +import { serializable } from '@ng-dynamic-forms/core/decorator/serializable.decorator'; +import { DynamicFormControlLayout } from '@ng-dynamic-forms/core/model/misc/dynamic-form-control-layout.model'; +import { DYNAMIC_FORM_CONTROL_TYPE_TEXTAREA } from '@ng-dynamic-forms/core/model/textarea/dynamic-textarea.model'; import { DsDynamicInputModel, diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/dynamic-vocabulary.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/dynamic-vocabulary.component.ts index f249016c022..03bbb191bd7 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/dynamic-vocabulary.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/dynamic-vocabulary.component.ts @@ -10,11 +10,9 @@ import { PageInfo } from '@dspace/core/shared/page-info.model'; import { VocabularyEntry } from '@dspace/core/submission/vocabularies/models/vocabulary-entry.model'; import { VocabularyService } from '@dspace/core/submission/vocabularies/vocabulary.service'; import { isNotEmpty } from '@dspace/shared/utils/empty.util'; -import { - DynamicFormControlComponent, - DynamicFormLayoutService, - DynamicFormValidationService, -} from '@ng-dynamic-forms/core'; +import { DynamicFormControlComponent } from '@ng-dynamic-forms/core/component/dynamic-form-control.component'; +import { DynamicFormLayoutService } from '@ng-dynamic-forms/core/service/dynamic-form-layout.service'; +import { DynamicFormValidationService } from '@ng-dynamic-forms/core/service/dynamic-form-validation.service'; import { Observable, of, diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/form-group/dynamic-form-group.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/form-group/dynamic-form-group.component.ts index 561132893cc..fbfad520929 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/form-group/dynamic-form-group.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/form-group/dynamic-form-group.component.ts @@ -12,18 +12,20 @@ import { ReactiveFormsModule, UntypedFormGroup, } from '@angular/forms'; +import { DynamicFormControlComponent } from '@ng-dynamic-forms/core/component/dynamic-form-control.component'; import { - DynamicFormControlComponent, DynamicFormControlCustomEvent, DynamicFormControlEvent, - DynamicFormControlLayout, - DynamicFormControlModel, - DynamicFormGroupModel, +} from '@ng-dynamic-forms/core/component/dynamic-form-control-event'; +import { DynamicTemplateDirective } from '@ng-dynamic-forms/core/directive/dynamic-template.directive'; +import { DynamicFormControlModel } from '@ng-dynamic-forms/core/model/dynamic-form-control.model'; +import { DynamicFormGroupModel } from '@ng-dynamic-forms/core/model/form-group/dynamic-form-group.model'; +import { DynamicFormControlLayout } from '@ng-dynamic-forms/core/model/misc/dynamic-form-control-layout.model'; +import { DynamicFormLayout, DynamicFormLayoutService, - DynamicFormValidationService, - DynamicTemplateDirective, -} from '@ng-dynamic-forms/core'; +} from '@ng-dynamic-forms/core/service/dynamic-form-layout.service'; +import { DynamicFormValidationService } from '@ng-dynamic-forms/core/service/dynamic-form-validation.service'; import { DsDynamicFormControlContainerComponent } from '../../ds-dynamic-form-control-container.component'; diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/list/dynamic-list-checkbox-group.model.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/list/dynamic-list-checkbox-group.model.ts index 05ef4cb1015..2a679b0a93b 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/list/dynamic-list-checkbox-group.model.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/list/dynamic-list-checkbox-group.model.ts @@ -1,13 +1,11 @@ import { VocabularyEntry } from '@dspace/core/submission/vocabularies/models/vocabulary-entry.model'; import { VocabularyOptions } from '@dspace/core/submission/vocabularies/models/vocabulary-options.model'; import { hasValue } from '@dspace/shared/utils/empty.util'; -import { - DynamicCheckboxGroupModel, - DynamicFormControlLayout, - DynamicFormControlRelation, - DynamicFormGroupModelConfig, - serializable, -} from '@ng-dynamic-forms/core'; +import { serializable } from '@ng-dynamic-forms/core/decorator/serializable.decorator'; +import { DynamicCheckboxGroupModel } from '@ng-dynamic-forms/core/model/checkbox/dynamic-checkbox-group.model'; +import { DynamicFormGroupModelConfig } from '@ng-dynamic-forms/core/model/form-group/dynamic-form-group.model'; +import { DynamicFormControlLayout } from '@ng-dynamic-forms/core/model/misc/dynamic-form-control-layout.model'; +import { DynamicFormControlRelation } from '@ng-dynamic-forms/core/model/misc/dynamic-form-control-relation.model'; import { Subject } from 'rxjs'; export interface DynamicListCheckboxGroupModelConfig extends DynamicFormGroupModelConfig { diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/list/dynamic-list-radio-group.model.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/list/dynamic-list-radio-group.model.ts index 5b9c6801823..461e694549e 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/list/dynamic-list-radio-group.model.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/list/dynamic-list-radio-group.model.ts @@ -1,13 +1,14 @@ import { VocabularyEntry } from '@dspace/core/submission/vocabularies/models/vocabulary-entry.model'; import { VocabularyOptions } from '@dspace/core/submission/vocabularies/models/vocabulary-options.model'; import { hasValue } from '@dspace/shared/utils/empty.util'; +import { serializable } from '@ng-dynamic-forms/core/decorator/serializable.decorator'; +import { DynamicFormControlLayout } from '@ng-dynamic-forms/core/model/misc/dynamic-form-control-layout.model'; +import { DynamicFormControlRelation } from '@ng-dynamic-forms/core/model/misc/dynamic-form-control-relation.model'; import { - DynamicFormControlLayout, - DynamicFormControlRelation, DynamicRadioGroupModel, DynamicRadioGroupModelConfig, - serializable, -} from '@ng-dynamic-forms/core'; +} from '@ng-dynamic-forms/core/model/radio/dynamic-radio-group.model'; + export interface DynamicListModelConfig extends DynamicRadioGroupModelConfig { vocabularyOptions: VocabularyOptions; diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/list/dynamic-list.component.html b/src/app/shared/form/builder/ds-dynamic-form-ui/models/list/dynamic-list.component.html index 3c58f495321..5e21353d364 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/list/dynamic-list.component.html +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/list/dynamic-list.component.html @@ -37,11 +37,9 @@ @if (!model.repeatable) {
+ [ngClass]="model.layout.element?.control"> @for (columnItems of items; track columnItems) {
@for (item of columnItems; track item) { @@ -52,6 +50,7 @@ [name]="model.id" [required]="model.required" [value]="item.index" + (change)="onChange($event)" (blur)="onBlur($event)" (focus)="onFocus($event)"/>