diff --git a/package-lock.json b/package-lock.json index 561ac57d7..d2774f68a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,7 +28,7 @@ "@ngx-loading-bar/http-client": "^6.0.0", "@ngx-loading-bar/router": "^6.0.0", "@ngx-translate/core": "^15.0.0", - "@rero/ng-core": "^17.0.0", + "@rero/ng-core": "^17.1.0", "@swimlane/ngx-charts": "^20.5.0", "@vpoppy/ngx-translate-extract": "^9.0.0", "bootstrap": "^4.6.2", @@ -3879,9 +3879,9 @@ } }, "node_modules/@rero/ng-core": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/@rero/ng-core/-/ng-core-17.0.0.tgz", - "integrity": "sha512-xxD/H3pF65albrD3eA8aG+hwQYq/JoUxWJSGwquCw4psMMJbY+CuNQM/e47cspGYHns9m5Qo3XMBdLmHmX3tIQ==", + "version": "17.1.0", + "resolved": "https://registry.npmjs.org/@rero/ng-core/-/ng-core-17.1.0.tgz", + "integrity": "sha512-6p5R15sMalb33cVoaYQ+G50pbwNg5WDVbT4ZAjjG6gcA10PY25cABG4A/F2i8PHZq6rCovsrHi9+Bkwp1Sqiow==", "dependencies": { "tslib": "^2.3.0" }, diff --git a/package.json b/package.json index 5fc66a01a..41783426d 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@ngx-loading-bar/http-client": "^6.0.0", "@ngx-loading-bar/router": "^6.0.0", "@ngx-translate/core": "^15.0.0", - "@rero/ng-core": "^17.0.0", + "@rero/ng-core": "^17.1.0", "@swimlane/ngx-charts": "^20.5.0", "@vpoppy/ngx-translate-extract": "^9.0.0", "bootstrap": "^4.6.2", diff --git a/projects/admin/src/app/record/custom-editor/user-id-editor/user-id-editor.component.ts b/projects/admin/src/app/record/custom-editor/user-id-editor/user-id-editor.component.ts index 89335d40c..d6ae2bd56 100644 --- a/projects/admin/src/app/record/custom-editor/user-id-editor/user-id-editor.component.ts +++ b/projects/admin/src/app/record/custom-editor/user-id-editor/user-id-editor.component.ts @@ -20,7 +20,7 @@ import { UntypedFormControl, UntypedFormGroup } from '@angular/forms'; import { FormlyFieldConfig } from '@ngx-formly/core'; import { FormlyJsonschema } from '@ngx-formly/core/json-schema'; import { TranslateService } from '@ngx-translate/core'; -import { JSONSchema7, RecordService, orderedJsonSchema, processJsonSchema, removeEmptyValues } from '@rero/ng-core'; +import { JSONSchema7, RecordService, processJsonSchema, removeEmptyValues } from '@rero/ng-core'; import { UserService } from '@rero/shared'; import { BsModalRef } from 'ngx-bootstrap/modal'; import { ToastrService } from 'ngx-toastr'; @@ -88,7 +88,7 @@ export class UserIdEditorComponent implements OnInit { if (schema != null) { schema = processJsonSchema(schema.schema); this.fields = [ - this.formlyJsonschema.toFieldConfig(orderedJsonSchema(schema), { + this.formlyJsonschema.toFieldConfig(schema, { // post process JSONSchema7 to FormlyFieldConfig conversion map: (field: FormlyFieldConfig, jsonSchema: JSONSchema7) => { diff --git a/projects/admin/src/app/record/formly/type/entity-typeahead/add-entity-local-form/add-entity-local-form.component.ts b/projects/admin/src/app/record/formly/type/entity-typeahead/add-entity-local-form/add-entity-local-form.component.ts index be91db470..b4d788a1d 100644 --- a/projects/admin/src/app/record/formly/type/entity-typeahead/add-entity-local-form/add-entity-local-form.component.ts +++ b/projects/admin/src/app/record/formly/type/entity-typeahead/add-entity-local-form/add-entity-local-form.component.ts @@ -20,7 +20,7 @@ import { FormGroup } from '@angular/forms'; import { FormlyFieldConfig } from '@ngx-formly/core'; import { FormlyJsonschema } from '@ngx-formly/core/json-schema'; import { TranslateService } from '@ngx-translate/core'; -import { RecordService, orderedJsonSchema, processJsonSchema } from '@rero/ng-core'; +import { RecordService, processJsonSchema } from '@rero/ng-core'; import { ToastrService } from 'ngx-toastr'; import { Subscription } from 'rxjs'; @@ -101,7 +101,7 @@ export class AddEntityLocalFormComponent implements OnInit, OnDestroy { schema = schema.oneOf.find((element: any) => element.properties.type.const === this.translatedType(selectedType)); // Deleting the oneOf key from the schema delete schema.oneOf; - this.fields = [this.formlyJsonschema.toFieldConfig(orderedJsonSchema(schema), { + this.fields = [this.formlyJsonschema.toFieldConfig(schema, { map: (field: FormlyFieldConfig) => { // Put the value typed by the user in the corresponding field if (this.populateFields.includes(String(field.key))) { diff --git a/projects/public-search/src/app/patron-profile/patron-profile-personal-editor/patron-profile-personal-editor.component.ts b/projects/public-search/src/app/patron-profile/patron-profile-personal-editor/patron-profile-personal-editor.component.ts index 7dea03303..f0a94b1ae 100644 --- a/projects/public-search/src/app/patron-profile/patron-profile-personal-editor/patron-profile-personal-editor.component.ts +++ b/projects/public-search/src/app/patron-profile/patron-profile-personal-editor/patron-profile-personal-editor.component.ts @@ -21,7 +21,7 @@ import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; import { FormlyFieldConfig } from '@ngx-formly/core'; import { FormlyJsonschema } from '@ngx-formly/core/json-schema'; import { TranslateService } from '@ngx-translate/core'; -import { RecordService, orderedJsonSchema, removeEmptyValues } from '@rero/ng-core'; +import { RecordService, processJsonSchema, removeEmptyValues } from '@rero/ng-core'; import { AppSettingsService, UserService } from '@rero/shared'; import { ToastrService } from 'ngx-toastr'; import { Subscription, forkJoin, of } from 'rxjs'; @@ -88,7 +88,7 @@ export class PatronProfilePersonalEditorComponent implements OnInit, OnDestroy { if (schema) { const disabledFields = this.appSettingsService.settings.userProfile.readOnlyFields; this.fields = [ - this.formlyJsonschema.toFieldConfig(orderedJsonSchema(schema.schema), { + this.formlyJsonschema.toFieldConfig(processJsonSchema(schema.schema), { // post process JSONSchema7 to FormlyFieldConfig conversion map: (field: FormlyFieldConfig, jsonSchema: any) => {