{"version":3,"file":"rero-ng-core.mjs","sources":["../../../../projects/rero/ng-core/src/lib/core-config.service.ts","../../../../projects/rero/ng-core/src/lib/api/api.service.ts","../../../../projects/rero/ng-core/src/lib/component/abstract-can-deactivate.component.ts","../../../../projects/rero/ng-core/src/lib/pipe/nl2br.pipe.ts","../../../../projects/rero/ng-core/src/lib/dialog/dialog.component.ts","../../../../projects/rero/ng-core/src/lib/directives/ng-var.directive.ts","../../../../projects/rero/ng-core/src/lib/pipe/default.pipe.ts","../../../../projects/rero/ng-core/src/lib/error/error.component.ts","../../../../projects/rero/ng-core/src/lib/error/error.component.html","../../../../projects/rero/ng-core/src/lib/guard/component-can-deactivate.guard.ts","../../../../projects/rero/ng-core/src/lib/pipe/callback-array-filter.pipe.ts","../../../../projects/rero/ng-core/src/lib/pipe/filesize.pipe.ts","../../../../projects/rero/ng-core/src/lib/pipe/markdown.pipe.ts","../../../../projects/rero/ng-core/src/lib/pipe/sanitize.pipe.ts","../../../../projects/rero/ng-core/src/lib/utils/sort-by-keys.ts","../../../../projects/rero/ng-core/src/lib/pipe/sort-by-keys.pipe.ts","../../../../projects/rero/ng-core/src/lib/pipe/truncate-text.pipe.ts","../../../../projects/rero/ng-core/src/lib/pipe/ucfirst.pipe.ts","../../../../projects/rero/ng-core/src/lib/prime-ng-core-module.ts","../../../../projects/rero/ng-core/src/lib/search-input/search-input.component.ts","../../../../projects/rero/ng-core/src/lib/search-input/search-input.component.html","../../../../projects/rero/ng-core/src/lib/text-read-more/text-read-more.component.ts","../../../../projects/rero/ng-core/src/lib/text-read-more/text-read-more.component.html","../../../../projects/rero/ng-core/src/lib/translate/date-translate-pipe.ts","../../../../projects/rero/ng-core/src/lib/translate/translate-language.service.ts","../../../../projects/rero/ng-core/src/lib/translate/translate-language.pipe.ts","../../../../projects/rero/ng-core/src/lib/translate/translate-loader.ts","../../../../projects/rero/ng-core/src/lib/translate/translate-service.ts","../../../../projects/rero/ng-core/src/lib/core.module.ts","../../../../projects/rero/ng-core/src/lib/error/error.ts","../../../../projects/rero/ng-core/src/lib/utils/utils.ts","../../../../projects/rero/ng-core/src/lib/record/editor/utils.ts","../../../../projects/rero/ng-core/src/lib/record/record.handle-error.service.ts","../../../../projects/rero/ng-core/src/lib/record/record.service.ts","../../../../projects/rero/ng-core/src/lib/pipe/get-record.pipe.ts","../../../../projects/rero/ng-core/src/lib/primeng-config.ts","../../../../projects/rero/ng-core/src/lib/record/action-status.ts","../../../../projects/rero/ng-core/src/lib/record/detail/detail-button/detail-button.component.ts","../../../../projects/rero/ng-core/src/lib/record/detail/detail-button/detail-button.component.html","../../../../projects/rero/ng-core/src/lib/utils/config.ts","../../../../projects/rero/ng-core/src/lib/record/record-ui.service.ts","../../../../projects/rero/ng-core/src/lib/record/detail/detail.directive.ts","../../../../projects/rero/ng-core/src/lib/record/detail/view/json.component.ts","../../../../projects/rero/ng-core/src/lib/record/detail/detail.component.ts","../../../../projects/rero/ng-core/src/lib/record/detail/detail.component.html","../../../../projects/rero/ng-core/src/lib/route/route-collection.service.ts","../../../../projects/rero/ng-core/src/lib/service/logger.service.ts","../../../../projects/rero/ng-core/src/lib/record/editor/services/jsonschema.service.ts","../../../../projects/rero/ng-core/src/lib/record/editor/services/templates.service.ts","../../../../projects/rero/ng-core/src/lib/record/editor/widgets/load-template-form/load-template-form.component.ts","../../../../projects/rero/ng-core/src/lib/record/editor/widgets/load-template-form/load-template-form.component.html","../../../../projects/rero/ng-core/src/lib/record/editor/widgets/save-template-form/save-template-form.component.ts","../../../../projects/rero/ng-core/src/lib/record/editor/widgets/save-template-form/save-template-form.component.html","../../../../projects/rero/ng-core/src/lib/record/editor/widgets/add-field-editor/add-field-editor.component.ts","../../../../projects/rero/ng-core/src/lib/record/editor/widgets/add-field-editor/add-field-editor.component.html","../../../../projects/rero/ng-core/src/lib/record/editor/editor.component.ts","../../../../projects/rero/ng-core/src/lib/record/editor/editor.component.html","../../../../projects/rero/ng-core/src/lib/validator/validators.ts","../../../../projects/rero/ng-core/src/lib/record/editor/extensions.ts","../../../../projects/rero/ng-core/src/lib/record/editor/formly/primeng/date-picker/date-picker.ts","../../../../projects/rero/ng-core/src/lib/record/editor/formly/primeng/input/src/input.type.ts","../../../../projects/rero/ng-core/src/lib/record/editor/formly/primeng/input/src/input.module.ts","../../../../projects/rero/ng-core/src/lib/record/editor/formly/primeng/services/translate-label.service.ts","../../../../projects/rero/ng-core/src/lib/record/editor/formly/primeng/multi-checkbox/multi-checkbox.ts","../../../../projects/rero/ng-core/src/lib/record/editor/formly/primeng/multi-select/multi-select.ts","../../../../projects/rero/ng-core/src/lib/record/editor/formly/primeng/remote-autocomplete/remote-autocomplete.service.ts","../../../../projects/rero/ng-core/src/lib/record/editor/formly/primeng/remote-autocomplete/remote-autocomplete.ts","../../../../projects/rero/ng-core/src/lib/record/editor/formly/primeng/remote-autocomplete/remote-autocomplete.interface.ts","../../../../projects/rero/ng-core/src/lib/record/editor/formly/primeng/select/select.ts","../../../../projects/rero/ng-core/src/lib/record/editor/formly/primeng/tree-select/tree-select.ts","../../../../projects/rero/ng-core/src/lib/record/editor/widgets/dropdown-label-editor/dropdown-label-editor.component.ts","../../../../projects/rero/ng-core/src/lib/record/editor/widgets/dropdown-label-editor/dropdown-label-editor.component.html","../../../../projects/rero/ng-core/src/lib/record/editor/widgets/label/label.component.ts","../../../../projects/rero/ng-core/src/lib/record/editor/widgets/label/label.component.html","../../../../projects/rero/ng-core/src/lib/record/editor/type/array-type/array-type.component.ts","../../../../projects/rero/ng-core/src/lib/record/editor/type/array-type/array-type.component.html","../../../../projects/rero/ng-core/src/lib/record/editor/type/multischema/multischema.component.ts","../../../../projects/rero/ng-core/src/lib/record/editor/type/object-type/object-type.component.ts","../../../../projects/rero/ng-core/src/lib/record/editor/type/object-type/object-type.component.html","../../../../projects/rero/ng-core/src/lib/record/editor/type/password-generator-type.component.ts","../../../../projects/rero/ng-core/src/lib/record/editor/type/switch/switch.component.ts","../../../../projects/rero/ng-core/src/lib/record/export-button/export-button.component.ts","../../../../projects/rero/ng-core/src/lib/record/export-button/export-button.component.html","../../../../projects/rero/ng-core/src/lib/record/record.ts","../../../../projects/rero/ng-core/src/lib/validator/email.validator.ts","../../../../projects/rero/ng-core/src/lib/record/editor/type/markdown/markdown.component.ts","../../../../projects/rero/ng-core/src/lib/record/editor/type/radio-button.component.ts","../../../../projects/rero/ng-core/src/lib/record/editor/type/textarea/textarea.component.ts","../../../../projects/rero/ng-core/src/lib/record/editor/wrappers/card-wrapper/card-wrapper.component.ts","../../../../projects/rero/ng-core/src/lib/record/editor/wrappers/form-field-wrapper/form-field-wrapper.component.ts","../../../../projects/rero/ng-core/src/lib/record/editor/wrappers/hide-wrapper/hide-wrapper.component.ts","../../../../projects/rero/ng-core/src/lib/record/search/record-search.service.ts","../../../../projects/rero/ng-core/src/lib/record/search/result/item/json.component.ts","../../../../projects/rero/ng-core/src/lib/record/search/result/record-search-result.component.ts","../../../../projects/rero/ng-core/src/lib/record/search/result/record-search-result.component.html","../../../../projects/rero/ng-core/src/lib/record/search/aggregation/service/bucket-name.service.ts","../../../../projects/rero/ng-core/src/lib/record/search/aggregation/pipe/bucket-name.pipe.ts","../../../../projects/rero/ng-core/src/lib/record/search/aggregation/buckets/buckets.component.ts","../../../../projects/rero/ng-core/src/lib/record/search/aggregation/buckets/buckets.component.html","../../../../projects/rero/ng-core/src/lib/record/search/aggregation/slider/slider.component.ts","../../../../projects/rero/ng-core/src/lib/record/search/aggregation/slider/slider.component.html","../../../../projects/rero/ng-core/src/lib/record/search/aggregation/date-range/date-range.component.ts","../../../../projects/rero/ng-core/src/lib/record/search/aggregation/date-range/date-range.component.html","../../../../projects/rero/ng-core/src/lib/record/search/aggregation/aggregation.component.ts","../../../../projects/rero/ng-core/src/lib/record/search/aggregation/aggregation.component.html","../../../../projects/rero/ng-core/src/lib/record/search/aggregation/list-filters/list-filters.component.ts","../../../../projects/rero/ng-core/src/lib/record/search/aggregation/list-filters/list-filters.component.html","../../../../projects/rero/ng-core/src/lib/record/search/paginator/paginator.component.ts","../../../../projects/rero/ng-core/src/lib/record/search/paginator/paginator.component.html","../../../../projects/rero/ng-core/src/lib/record/search/menu-sort/menu-sort.component.ts","../../../../projects/rero/ng-core/src/lib/record/search/menu-sort/menu-sort.component.html","../../../../projects/rero/ng-core/src/lib/record/search/search-filters/search-filters.component.ts","../../../../projects/rero/ng-core/src/lib/record/search/search-filters/search-filters.component.html","../../../../projects/rero/ng-core/src/lib/record/search/search-tabs/search-tabs.component.ts","../../../../projects/rero/ng-core/src/lib/record/search/search-tabs/search-tabs.component.html","../../../../projects/rero/ng-core/src/lib/record/search/record-search.component.ts","../../../../projects/rero/ng-core/src/lib/record/search/record-search.component.html","../../../../projects/rero/ng-core/src/lib/record/search/record-search-page.component.ts","../../../../projects/rero/ng-core/src/lib/record/search/record-search-page.component.html","../../../../projects/rero/ng-core/src/lib/record/record-routing.module.ts","../../../../projects/rero/ng-core/src/lib/record/search-autocomplete/search-autocomplete.component.ts","../../../../projects/rero/ng-core/src/lib/record/search/search-fields/search-fields.component.ts","../../../../projects/rero/ng-core/src/lib/record/search/search-fields/search-fields.component.html","../../../../projects/rero/ng-core/src/lib/record/record.module.ts","../../../../projects/rero/ng-core/src/lib/record/search/result/item/result-item.ts","../../../../projects/rero/ng-core/src/lib/service/crypto-js.service.ts","../../../../projects/rero/ng-core/src/lib/service/local-storage.service.ts","../../../../projects/rero/ng-core/src/lib/service/title-meta.service.ts","../../../../projects/rero/ng-core/src/lib/validator/time.validator.ts","../../../../projects/rero/ng-core/src/lib/validator/unique.validator.ts","../../../../projects/rero/ng-core/src/public-api.ts","../../../../projects/rero/ng-core/src/rero-ng-core.ts"],"sourcesContent":["/*\n * RERO angular core\n * Copyright (C) 2020 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Injectable } from '@angular/core';\n\n/**\n * Interface for configuration.\n */\nexport interface Config {\n  production?: boolean;\n  prefixWindow?: string;\n  apiBaseUrl?: string;\n  apiEndpointPrefix?: string;\n  $refPrefix: string;\n  schemaFormEndpoint: string;\n  languages?: string[];\n  defaultLanguage?: string;\n  secretPassphrase: string;\n  translationsURLs?: Array<any>;\n}\n\n/**\n * Service for managing configuration of the application.\n */\n@Injectable({\n  providedIn: 'root'\n})\nexport class CoreConfigService implements Config {\n  production = false;\n  prefixWindow = undefined;\n  apiBaseUrl = '';\n  apiEndpointPrefix = '/api';\n  schemaFormEndpoint = '/api/schemaform';\n  $refPrefix = undefined;\n  languages = ['en'];\n  defaultLanguage = 'en';\n  secretPassphrase = 'ShERWIN53SnAggIng48rELAtiVes';\n  translationsURLs = [];\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2025 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { inject, Injectable } from '@angular/core';\nimport { CoreConfigService } from '../core-config.service';\n\n/**\n * Service giving information about API.\n */\n@Injectable({\n  providedIn: 'root'\n})\nexport class ApiService {\n\n  protected configService: CoreConfigService = inject(CoreConfigService);\n\n  // API base URL. Ex: https://localhost:5000.\n  baseUrl = '';\n\n  // API prefix. Ex: /api\n  endpointPrefix = '/';\n\n  /**\n   * Returns Invenio API Endpoint corresponding to type.\n   *\n   * @param type Type of the resource.\n   * @param absolute If absolute or relative url must be returned.\n   * @return Endpoint as string.\n   */\n  getEndpointByType(type: string, absolute: boolean = false): string {\n    let endpoint = this.configService.apiEndpointPrefix + '/' + type;\n    if (absolute === true) {\n      endpoint = this.configService.apiBaseUrl + endpoint;\n    }\n    return endpoint;\n  }\n\n  /**\n   * Returns Invenio-RERO-base API export endpoint corresponding to type.\n   *\n   * @param type Type of the resource.\n   * @param absolute If absolute or relative url must be returned.\n   * @return Endpoint as string.\n   */\n  getExportEndpointByType(type: string, absolute: boolean = false): string {\n    let endpoint = this.configService.apiEndpointPrefix + '/export/' + type;\n    if (absolute === true) {\n      endpoint = this.configService.apiBaseUrl + endpoint;\n    }\n    return endpoint;\n  }\n\n  /**\n   * Returns $ref endpoint to resource.\n   *\n   * @param type Type of resource.\n   * @param id Id of the record.\n   * @return Ref endpoint as string.\n   */\n  getRefEndpoint(type: string, id: string): string {\n    let prefix = '';\n    if (this.configService.$refPrefix) {\n      prefix += this.configService.$refPrefix;\n    }\n    return `${prefix}${this.configService.apiEndpointPrefix}/${type}/${id}`;\n  }\n\n  /**\n   * Returns invenio API FormOption Endpoint corresponding to type.\n   *\n   * @param type Type of the resource\n   * @param absolute If absolute or relative url must be returned.\n   * @return Schema form endpoint.\n   */\n  getSchemaFormEndpoint(type: string, absolute: boolean = false): string {\n    let endpoint = this.configService.schemaFormEndpoint + '/' + type;\n    if (absolute === true) {\n      endpoint = this.configService.apiBaseUrl + endpoint;\n    }\n    return endpoint;\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2023 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport {Component, HostListener} from \"@angular/core\";\n\n/**\n * Doc: https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event\n *\n * The beforeunload event is fired when the window, the document and its resources\n * are about to be unloaded. The document is still visible and the event is still\n * cancelable at this point.\n */\n@Component({\n    template: '',\n    standalone: false\n})\nexport abstract class AbstractCanDeactivateComponent {\n\n  abstract canDeactivate: boolean;\n\n  @HostListener('window:beforeunload', ['$event'])\n  unloadNotification($event: any) {\n    if (!this.canDeactivate) {\n        $event.returnValue = true;\n    }\n  }\n\n  /**\n   * Can deactivate changed on editor\n   * @param activate - boolean\n   */\n  canDeactivateChanged(activate: boolean): void {\n    this.canDeactivate = activate;\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2025 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { inject, Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\n\n/**\n * Pipe for converting carriage returns to <br> html entities.\n */\n@Pipe({\n    name: 'nl2br',\n    standalone: false\n})\nexport class Nl2brPipe implements PipeTransform {\n\n  protected sanitizer: DomSanitizer = inject(DomSanitizer);\n\n  /**\n   * Returns transformed value containing <br> entities.\n   *\n   * @param value Value to transform.\n   * @return Transformed value.\n   */\n  transform(value?: string): any {\n    if (!value) {\n      return this.sanitizer.bypassSecurityTrustHtml('');\n    }\n    return this.sanitizer.bypassSecurityTrustHtml(\n      value.replace(/\\r\\n?|\\n/g, '<br>\\n')\n    );\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2025 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Component, inject } from '@angular/core';\nimport { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';\n\n@Component({\n    selector: 'ng-core-dialog',\n    template: `\n  <div class=\"core:flex core:flex-col core:gap-2\">\n    <div class=\"core:flex\" [innerHtml]=\"config.data.body|nl2br\"></div>\n    <div class=\"core:flex core:justify-end core:gap-1\">\n      <p-button\n        [label]=\"config.data.cancelTitleButton || 'Cancel'|translate\"\n        severity=\"danger\"\n        [outlined]=\"true\"\n        (onClick)=\"cancel()\"\n      />\n      @if (config.data.confirmButton) {\n        <p-button [label]=\"config.data.confirmTitleButton || 'OK'|translate\" (onClick)=\"confirm()\" />\n      }\n    </div>\n  </div>\n  `,\n    standalone: false\n})\nexport class DialogComponent {\n\n  config: DynamicDialogConfig = inject(DynamicDialogConfig);\n  protected ref: DynamicDialogRef = inject(DynamicDialogRef);\n\n  confirm(): void {\n    this.ref.close(true);\n  }\n\n  cancel(): void {\n    this.ref.close(false);\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Directive, inject, Input, TemplateRef, ViewContainerRef } from '@angular/core';\n\n// eslint-disable-next-line @angular-eslint/directive-selector\n@Directive({\n    selector: '[ngVar]',\n    standalone: false\n})\nexport class NgVarDirective {\n\n  protected vcRef: ViewContainerRef = inject(ViewContainerRef);\n  protected templateRef: TemplateRef<any> = inject(TemplateRef);\n\n  /** Context */\n  public context: any = {};\n\n  @Input()\n  set ngVar(context: any) {\n    this.context.$implicit = this.context.ngVar = context;\n    this.updateView();\n  }\n\n  /** Update view */\n  private updateView() {\n    this.vcRef.clear();\n    this.vcRef.createEmbeddedView(this.templateRef, this.context);\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Pipe, PipeTransform } from '@angular/core';\n\n/**\n * Pipe for returning a default value if the given value is null or undefined.\n */\n@Pipe({\n    name: 'default', pure: true,\n    standalone: false\n})\nexport class DefaultPipe implements PipeTransform {\n  /**\n   * Returns a default value.\n   *\n   * @param value Value to check.\n   * @param defaultValue Value to return if value is null.\n   * @return Value or default value.\n   */\n  transform(value: any, defaultValue: any): any {\n    return value || defaultValue;\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Component, Input } from '@angular/core';\nimport { Error } from './error';\n\n/**\n * Component for displaying errors.\n */\n@Component({\n    selector: 'ng-core-error',\n    templateUrl: './error.component.html',\n    standalone: false\n})\nexport class ErrorComponent {\n  // Error object containing title, status and optionally a message.\n  @Input() error: Error;\n}\n","<!--\n  RERO angular core\n  Copyright (C) 2020 RERO\n\n  This program is free software: you can redistribute it and/or modify\n  it under the terms of the GNU Affero General Public License as published by\n  the Free Software Foundation, version 3 of the License.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU Affero General Public License for more details.\n\n  You should have received a copy of the GNU Affero General Public License\n  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n-->\n<div class=\"core:text-center core:my-8\">\n  <p class=\"core:text-4xl\">\n    <i class=\"fa fa-flash core:mr-4\"></i>\n    <span class=\"core:text-muted-color\">{{ error.status }}</span>\n    {{ error.title }}\n  </p>\n  <h5 class=\"core:mt-8\">{{ error.message | default: ('You cannot access this page.' | translate) }}</h5>\n</div>\n","/*\n * RERO angular core\n * Copyright (C) 2023-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { inject, Injectable } from '@angular/core';\n\nimport { TranslateService } from '@ngx-translate/core';\nimport { Observable } from 'rxjs';\nimport { AbstractCanDeactivateComponent } from '../component/abstract-can-deactivate.component';\nimport { DialogService, DynamicDialogRef } from 'primeng/dynamicdialog';\nimport { DialogComponent } from '../dialog/dialog.component';\n\n/**\n * When this guard is configured, it intercepts the form output without\n * saving or undoing changes.\n *\n * Route definition configuration\n * { path: 'foo/bar', canDeactivate: [ ComponentCanDeactivateGuard ] },\n *\n * Custom editor component configuration\n * class FooComponent AbstractCanDeactivateComponent {\n *  canDeactivate: boolean = false;\n *  ...\n * }\n *\n * Template configuration (add output canDeactivateChange)\n * <ng-core-editor\n *   (canDeactivateChange)=\"canDeactivateChanged($event)\"\n *   ...\n * ></ng-core-editor>\n */\n\n@Injectable()\nexport class ComponentCanDeactivateGuard {\n\n  protected translateService: TranslateService = inject(TranslateService);\n  protected dialogService: DialogService = inject(DialogService);\n\n  ref: DynamicDialogRef | undefined;\n\n  /**\n   * Displays a confirmation modal if the user leaves the form without\n   * saving or canceling\n   * @param component - AbstractCanDeactivateComponent\n   * @returns Observable<boolean> or boolean\n   */\n  canDeactivate(component: AbstractCanDeactivateComponent): Observable<boolean> | boolean {\n      if (!component.canDeactivate) {\n        this.ref = this.dialogService.open(DialogComponent, {\n          header: this.translateService.instant('Quit the page'),\n          data: {\n            body: this.translateService.instant(\n              'Do you want to quit the page? The changes made so far will be lost.'\n            ),\n            confirmButton: true,\n            confirmTitleButton: this.translateService.instant('Quit'),\n            cancelTitleButton: this.translateService.instant('Stay'),\n          },\n          dismissableMask: true,\n          modal: true,\n          style: { width: '25rem' }\n        });\n\n        return this.ref.onClose;\n      }\n\n      return true;\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Pipe, PipeTransform } from '@angular/core';\n\n/**\n * Pipe for applying a callback function to filter array items.\n */\n@Pipe({\n    name: 'callbackArrayFilter',\n    standalone: false\n})\nexport class CallbackArrayFilterPipe implements PipeTransform {\n  /**\n   * Filter array items with the given callback function.\n   *\n   * @param items List of items.\n   * @param callback Callback function to apply.\n   * @return List of filtered values.\n   */\n  transform(items?: any[], callback?: (item: any) => boolean): any[] {\n    if (!items && !callback) {\n      return [];\n    }\n    if (items && !callback) {\n      return items;\n    }\n\n    return items.filter(item => callback(item));\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Pipe, PipeTransform } from '@angular/core';\n\n/**\n * Get human readable file size.\n */\n@Pipe({\n    name: 'filesize',\n    standalone: false\n})\nexport class FilesizePipe implements PipeTransform {\n  /**\n   * Transform size to a human readable size.\n   *\n   * @param size Size of file.\n   * @param precision Number of decimals.\n   * @return Human readable file size.\n   */\n  transform(size: number, precision = 2) {\n    let i = -1;\n    const byteUnits = ['kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n    do {\n        size /= 1024;\n        i++;\n    } while (size > 1024);\n\n    return [Math.max(size, 0.1).toFixed(precision), byteUnits[i]].join(' ');\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2021-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { inject, Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { marked } from 'marked';\n\n/**\n * Pipe to transform markdown to html.\n */\n@Pipe({\n    name: 'markdown',\n    standalone: false\n})\nexport class MarkdownPipe implements PipeTransform {\n\n  protected sanitizer: DomSanitizer = inject(DomSanitizer);\n\n  /**\n   * Transform markdown to HTML.\n   *\n   * @param value Markdown initial value.\n   * @returns HTML corresponding to markdown.\n   */\n  transform(value: string): SafeHtml {\n    const markValue: string = marked.parse(value, { gfm: true, breaks: false, async: false });\n    return this.sanitizer.bypassSecurityTrustHtml(markValue);\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2025 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { Pipe, PipeTransform } from \"@angular/core\";\n\n@Pipe({\n  name: 'sanitize',\n  standalone: false\n})\nexport class SanitizePipe implements PipeTransform\n{\n  transform(value: string, regex: string = '<[^>]*>', replace: string = '', flag: string = 'g'): string {\n    const re = new RegExp(regex, flag);\n    return value.replace(re, replace);\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n *\n * Source code: https://dev.to/codephobia/using-typescricore:pt-to-sort-by-keys-35ob\n */\n\n/**\n * Error messages\n */\nconst ERROR_REQUIRES_AT_LEAST_ONE_KEY = 'provide at least one key to sort by';\nconst ERROR_KEY_LENGTH_INVALID = 'a key was provided as an empty string';\nconst ERROR_DESC_KEY_LENGTH_INVALID = 'a descending key was missing the key name';\nconst ERROR_OBJECT_DOESNT_CONTAIN_KEY = 'a key you are attempting to sort by is not on all objects';\n\n/**\n *  Recursive function to sort values by their keys.\n */\nconst sortByKey = <T>(a: T, b: T, ...keys: string[]): number => {\n    // Get first key in array.\n    let key = keys.shift();\n\n    // Make sure we have a valid key name.\n    if (!key.length) {\n        throw new Error(ERROR_KEY_LENGTH_INVALID);\n    }\n\n    // Default to ascending order.\n    let desc = false;\n\n    // Check for descending sort.\n    if (key.charAt(0) === '-') {\n        // Make sure key has a name as well as the minus sign.\n        if (key.length < 2) {\n            throw new Error(ERROR_DESC_KEY_LENGTH_INVALID);\n        }\n\n        // Remove minus from key name.\n        key = key.substr(1);\n\n        // Flag as descending order.\n        desc = true;\n    }\n\n    // Make sure the objects both have the key. We make sure\n    // to check this after we have removed the minus sign.\n    if (!a.hasOwnProperty(key) || !b.hasOwnProperty(key)) {\n        throw new Error(ERROR_OBJECT_DOESNT_CONTAIN_KEY);\n    }\n\n    // Determine checks based on asc / desc.\n    const direction = (desc) ? -1 : 1;\n\n    // Perform bubble sort based on the values.\n    const authorizedSort = [-1, 1];\n    if (authorizedSort.includes(a[key].localeCompare(b[key]))) {\n      return a[key].localeCompare(b[key]) * direction;\n    }\n\n    // The values of the current key are equal, so if we still\n    // have keys to check recursively, check the next key.\n    if (keys.length) {\n        return sortByKey(a, b, ...keys);\n    }\n\n    // All keys returned and no more sorting needed.\n    return 0;\n};\n\n/**\n * Wrapper sort function for the recursive one.\n */\nexport const sortByKeys = <T>(data: T[], ...keys: string[]): T[] => {\n    // Make sure we have at least one key to sort by.\n    if (!keys.length) {\n        throw new Error(ERROR_REQUIRES_AT_LEAST_ONE_KEY);\n    }\n\n    // Sort data.\n    data.sort((a: T, b: T): number => {\n        return sortByKey(a, b, ...keys);\n    });\n\n    // Return sorted data.\n    return data;\n};\n","/*\n * RERO angular core\n * Copyright (C) 2020 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n *\n * Source code: https://dev.to/codephobia/using-typescript-to-sort-by-keys-35ob\n */\nimport { Pipe, PipeTransform } from '@angular/core';\nimport { sortByKeys } from '../utils/sort-by-keys';\n\n/**\n * Pipe for the sorting function.\n */\n@Pipe({\n    name: 'sortByKeys',\n    pure: true,\n    standalone: false\n})\nexport class SortByKeysPipe implements PipeTransform {\n  /**\n   * Order elements by sort key(s)\n   * @param value - array of values\n   * @param keys - string, sort key\n   */\n  public transform(value: any, ...keys: string[]): any[] {\n    return sortByKeys<any>(value, ...keys);\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Pipe, PipeTransform } from '@angular/core';\n\n/**\n * Pipe for truncating text.\n */\n@Pipe({\n    name: 'truncateText',\n    standalone: false\n})\nexport class TruncateTextPipe implements PipeTransform {\n  /**\n   * Truncate text.\n   *\n   * @param value Text to truncate.\n   * @param limit Limit after which the text is truncated.\n   * @param trail Trailing chars\n   * @param type Word or Char type\n   * @return Truncated string\n   */\n  transform(value: string, limit: number = 40, trail: string = '…', type: 'word'|'char' = 'word'): string {\n    let result = value || '';\n\n    if (type === 'char' && value) {\n      if (value.length < limit) {\n        return value;\n      } else {\n        return value.substring(0, limit) + trail;\n      }\n    }\n\n    if (type === 'word' && value) {\n      const words = value.split(/\\s+/);\n      if (words.length > Math.abs(limit)) {\n        if (limit < 0) {\n          limit *= -1;\n          result =\n            trail + words.slice(words.length - limit).join(' ');\n        } else {\n          result = words.slice(0, limit).join(' ') + trail;\n        }\n      }\n    }\n\n    return result;\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Pipe, PipeTransform } from '@angular/core';\n\n/**\n * Uppercase the first letter of the string.\n */\n@Pipe({\n    name: 'ucfirst',\n    standalone: false\n})\nexport class UpperCaseFirstPipe implements PipeTransform {\n  /**\n   * Uppercase the first letter of the given value.\n   *\n   * @param value Value to transform.\n   * @return Transformed value.\n   */\n  transform(value: string): string {\n    if (value === null) {\n      return value;\n    }\n\n    return value.charAt(0).toUpperCase() + value.slice(1);\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { NgModule } from '@angular/core';\nimport { ConfirmationService, MessageService } from 'primeng/api';\nimport { AutoCompleteModule } from 'primeng/autocomplete';\nimport { AutoFocusModule } from 'primeng/autofocus';\nimport { BadgeModule } from 'primeng/badge';\nimport { ButtonModule } from 'primeng/button';\nimport { CardModule } from 'primeng/card';\nimport { CheckboxModule } from 'primeng/checkbox';\nimport { ConfirmDialogModule } from 'primeng/confirmdialog';\nimport { DatePickerModule } from 'primeng/datepicker';\nimport { DividerModule } from 'primeng/divider';\nimport { DialogService, DynamicDialogModule } from 'primeng/dynamicdialog';\nimport { FieldsetModule } from 'primeng/fieldset';\nimport { InputGroupModule } from 'primeng/inputgroup';\nimport { InputGroupAddonModule } from 'primeng/inputgroupaddon';\nimport { InputNumberModule } from 'primeng/inputnumber';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { ListboxModule } from 'primeng/listbox';\nimport { MenuModule } from 'primeng/menu';\nimport { MessageModule } from 'primeng/message';\nimport { PaginatorModule } from 'primeng/paginator';\nimport { PanelModule } from 'primeng/panel';\nimport { RadioButtonModule } from 'primeng/radiobutton';\nimport { RippleModule } from 'primeng/ripple';\nimport { ScrollPanelModule } from 'primeng/scrollpanel';\nimport { SelectModule } from 'primeng/select';\nimport { SplitButtonModule } from 'primeng/splitbutton';\nimport { TabsModule } from 'primeng/tabs';\nimport { TextareaModule } from 'primeng/textarea';\nimport { TieredMenuModule } from 'primeng/tieredmenu';\nimport { ToastModule } from 'primeng/toast';\nimport { ToggleSwitchModule } from 'primeng/toggleswitch';\nimport { TooltipModule } from 'primeng/tooltip';\n\n@NgModule({\n  providers: [\n    ConfirmationService,\n    DialogService,\n    MessageService\n  ],\n  exports: [\n    AutoCompleteModule,\n    AutoFocusModule,\n    BadgeModule,\n    ButtonModule,\n    CardModule,\n    CheckboxModule,\n    ConfirmDialogModule,\n    DatePickerModule,\n    DividerModule,\n    DynamicDialogModule,\n    FieldsetModule,\n    InputGroupAddonModule,\n    InputGroupModule,\n    InputNumberModule,\n    InputTextModule,\n    ListboxModule,\n    MenuModule,\n    MessageModule,\n    PaginatorModule,\n    PanelModule,\n    RadioButtonModule,\n    RippleModule,\n    ScrollPanelModule,\n    SelectModule,\n    SplitButtonModule,\n    TabsModule,\n    TextareaModule,\n    TieredMenuModule,\n    ToastModule,\n    ToggleSwitchModule,\n    TooltipModule,\n  ],\n})\nexport class PrimeNgCoreModule {}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Component, ElementRef, ViewChild, input, output } from '@angular/core';\n\n@Component({\n    selector: 'ng-core-search-input',\n    templateUrl: './search-input.component.html',\n    standalone: false\n})\nexport class SearchInputComponent {\n  /** Input Id */\n  inputId = input<string>('search');\n\n  /** Display label */\n  displayLabel = input<boolean>(false);\n\n  /** Placeholder */\n  placeholder = input<string>('search');\n\n  /** Value to search */\n  searchText = input<string>('');\n\n  /** Remove trailing and leading spaces if true */\n  trimQueryString = input<boolean>(true);\n\n  /** Disabled attribute of search input */\n  disabled = input<boolean>(false);\n\n  /** Make the focus on field */\n  focus = input<boolean>(false);\n\n  /** Search value event */\n  search = output<string>();\n\n  /** Search input reference */\n  @ViewChild('searchInput') input: ElementRef;\n\n  /**\n   * Start the search by pressing enter\n   * or clicking on the lens.\n   */\n  doSearch(): void {\n    const { value } = this.input.nativeElement;\n    this.search.emit(this.trimQueryString() ? value.trim() : value);\n  }\n}\n","<!--\n  RERO angular core\n  Copyright (C) 2020-2024 RERO\n\n  This program is free software: you can redistribute it and/or modify\n  it under the terms of the GNU Affero General Public License as published by\n  the Free Software Foundation, version 3 of the License.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU Affero General Public License for more details.\n\n  You should have received a copy of the GNU Affero General Public License\n  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n-->\n@if (displayLabel()) {\n  <label [for]=\"inputId()\" class=\"core:font-bold\">{{ placeholder() }}</label>\n}\n<p-inputGroup>\n  <input\n    #searchInput\n    [pAutoFocus]=\"focus()\"\n    pInputText\n    [disabled]=\"disabled()\"\n    [id]=\"inputId()\"\n    [placeholder]=\"!displayLabel() && placeholder() ? placeholder() : ''\"\n    [value]=\"searchText()\"\n    (keydown.enter)=\"doSearch()\"\n    attr.aria-label=\"{{ placeholder() }}\"\n  />\n  <p-inputGroupAddon>\n    <i class=\"fa fa-search\" (click)=\"doSearch()\"></i>\n  </p-inputGroupAddon>\n</p-inputGroup>\n","/*\n * RERO angular core\n * Copyright (C) 2020 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Component, Input, OnInit } from '@angular/core';\n\n/**\n * Component for displaying a \"read more\" link after a text.\n */\n@Component({\n    selector: 'ng-core-text-read-more',\n    templateUrl: './text-read-more.component.html',\n    standalone: false\n})\nexport class TextReadMoreComponent implements OnInit {\n  /** Initial text  */\n  @Input() text: string;\n\n  /** Number of parts to display (depending of the unit)  */\n  @Input() limit = 50;\n\n  /** \"Show more\" label to display */\n  @Input() showMoreLabel = 'Show more';\n\n  /** \"Show less\" label to display  */\n  @Input() showLessLabel = 'Show less';\n\n  /** Splitting unit [ word | character] */\n  @Input() unit = 'word';\n\n  /** trailing string */\n  @Input() trailing = '…';\n\n  /** The text that will be display */\n  textToDisplay: string;\n\n  /** boolean to know if initial text is expanded  */\n  isExpanded = false;\n\n  /** boolean to know if limit is reached */\n  isLimitReached = true;\n\n  /** The truncated text  */\n  private sTruncateText: string;\n\n  ngOnInit() {\n    this.textToDisplay = this.sTruncateText = this._truncateText();\n    if (this.text === this.textToDisplay) {\n      this.isLimitReached = false;\n    }\n  }\n\n  /**\n   * Allow to toggle content of the field\n   * @param event : Click event\n   */\n  toggleText(event: Event) {\n    event.preventDefault();\n    this.textToDisplay = (this.isExpanded)\n      ? this.sTruncateText\n      : this.text;\n    this.isExpanded = !this.isExpanded;\n  }\n\n  /**\n   * Show the link label depending of isExpanded\n   */\n  get linkLabel(): string {\n    return this.isExpanded ? this.showLessLabel : this.showMoreLabel;\n  }\n\n  /**\n   * Truncate initial text using the defined limit and unit.\n   */\n  private _truncateText(): string {\n    if (this.text === undefined) {\n       return '';\n    }\n    let pattern: any = /\\s+/;\n    let joinText = ' ';\n    if (this.unit !== 'word') {\n      pattern = '';\n      joinText = '';\n    }\n    const parts = this.text.split(pattern);\n\n    if (parts.length <= this.limit) {\n      return this.text;\n    } else {\n      if (this.limit < 0) {\n        const tmpLimit = this.limit * -1;\n        return this.trailing + parts.slice(parts.length - tmpLimit, parts.length).join(joinText);\n      } else {\n        return parts.slice(0, this.limit).join(joinText) + this.trailing;\n      }\n    }\n  }\n}\n\n\n","<!--\n  RERO angular core\n  Copyright (C) 2020-2024 RERO\n\n  This program is free software: you can redistribute it and/or modify\n  it under the terms of the GNU Affero General Public License as published by\n  the Free Software Foundation, version 3 of the License.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU Affero General Public License for more details.\n\n  You should have received a copy of the GNU Affero General Public License\n  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n-->\n@if (isLimitReached && limit<0) {\n  <a class=\"core:pl-2\" href=\"#\" (click)=\"toggleText($event)\">{{ linkLabel }}</a>\n}\n<span [innerHTML]=\"textToDisplay | nl2br\"></span>\n@if (isLimitReached && limit>=0) {\n  <a class=\"core:pl-2\" href=\"#\" (click)=\"toggleText($event)\">{{ linkLabel }}</a>\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { DatePipe } from '@angular/common';\nimport { inject, Pipe, PipeTransform } from '@angular/core';\nimport { TranslateService } from '@ngx-translate/core';\n\n@Pipe({\n    name: 'dateTranslate',\n    pure: false,\n    standalone: false\n})\nexport class DateTranslatePipe extends DatePipe implements PipeTransform {\n\n  protected translateService: TranslateService = inject(TranslateService);\n\n  transform(value: Date | string | number, format?: string, timezone?: string, locale?: string): string | null;\n  transform(value: null | undefined, format?: string, timezone?: string, locale?: string): null;\n  transform(value: Date | string | number | null | undefined, format?: string, timezone?: string, locale?: string): string | null\n  {\n    if (!locale) {\n      locale = this.translateService.currentLang;\n    }\n\n    if (locale === 'en') {\n      locale = `${locale}-GB`;\n    }\n\n    return super.transform(value, format, timezone, locale);\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { inject, Injectable } from '@angular/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport de from './languages/de.json';\nimport en from './languages/en.json';\nimport fr from './languages/fr.json';\nimport it from './languages/it.json';\n\n@Injectable({\n  providedIn: 'root',\n})\nexport class TranslateLanguageService {\n\n  protected translateService: TranslateService = inject(TranslateService);\n\n  // List of preferred languages\n  static PREFERRED_LANGUAGES = ['eng', 'fre', 'ger', 'ita'];\n\n  // Available languages (import)\n  private _availableLanguages = { de, en, fr, it };\n\n  /**\n   * @param langCode - ISO 639-2 (3 characters)\n   * @param language - ISO 639-1 (2 characters)\n   * @return human language - string\n   */\n  translate(langCode: string, language?: string) {\n    const lang = language || this.translateService.currentLang;\n    if (!(lang in this._availableLanguages)) {\n      return langCode;\n    }\n\n    if (!(langCode in this._availableLanguages[lang])) {\n      return langCode;\n    }\n\n    return this._availableLanguages[lang][langCode];\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { inject, Pipe, PipeTransform } from '@angular/core';\nimport { TranslateLanguageService } from './translate-language.service';\n\n@Pipe({\n    name: 'translateLanguage',\n    standalone: false\n})\nexport class TranslateLanguagePipe implements PipeTransform {\n\n  protected translateLanguage: TranslateLanguageService = inject(TranslateLanguageService);\n\n  /**\n   * transform language code to human language\n   * @param langCode - ISO 639-2 (3 characters)\n   * @param language - ISO 639-1 (2 characters)\n   */\n  transform(langCode: string, language?: string): string {\n    return this.translateLanguage.translate(langCode, language);\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { HttpClient } from '@angular/common/http';\nimport { TranslateLoader as BaseTranslateLoader } from '@ngx-translate/core';\nimport { forkJoin, Observable, of } from 'rxjs';\nimport { catchError, map } from 'rxjs/operators';\nimport { CoreConfigService } from '../core-config.service';\nimport de from './i18n/de.json';\nimport en from './i18n/en.json';\nimport fr from './i18n/fr.json';\nimport it from './i18n/it.json';\nimport { inject } from '@angular/core';\n\n/**\n * Loader for translations used in ngx-translate library.\n */\nexport class TranslateLoader implements BaseTranslateLoader {\n\n  protected coreConfigService: CoreConfigService = inject(CoreConfigService);\n  protected http: HttpClient = inject(HttpClient);\n\n  // translations\n  private translations = {};\n\n  // locale translations\n  // with angular<9 assets are not available for libraries\n  // See: https://angular.io/guide/creating-libraries#managing-assets-in-a-library\n  private coreTranslations = { de, en, fr, it };\n\n  /**\n   * Return observable used by ngx-translate to get translations.\n   * @param lang - string, language to retrieve translations from.\n   */\n  getTranslation(lang: string): Observable<any> {\n    // Already in cache\n    if (this.translations[lang] != null) {\n      return of(this.translations[lang]);\n    }\n    const urls = this.coreConfigService.translationsURLs;\n    // create the list of http requests\n    const observers = urls.map(\n      url => {\n        const langURL = url.replace('${lang}', lang);\n        return this.http.get(langURL).pipe(\n          catchError(() => {\n            console.log(`ERROR: Cannot load translation: ${langURL}`);\n            return of([]);\n          })\n        );\n      }\n    );\n    // Get local and backend translations\n    return forkJoin(observers).pipe(\n      map((translations) => {\n        // copy local translations\n        if (this.coreTranslations[lang] != null) {\n          this.translations[lang] = { ...this.coreTranslations[lang] };\n        }\n        // get remote translations\n        translations.map(trans =>\n          this.translations[lang] = {\n            ...this.translations[lang],\n            ...trans\n          }\n        );\n        return this.translations[lang];\n      })\n    );\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { registerLocaleData } from '@angular/common';\nimport localeDe from '@angular/common/locales/de';\nimport localeEn from '@angular/common/locales/en-GB';\nimport localeFr from '@angular/common/locales/fr';\nimport localeIt from '@angular/common/locales/it';\nimport { inject, Injectable } from \"@angular/core\";\nimport { TranslateService } from \"@ngx-translate/core\";\nimport { DateTime } from \"luxon\";\nimport de from 'primelocale/de.json';\nimport en from 'primelocale/en.json';\nimport fr from 'primelocale/fr.json';\nimport it from 'primelocale/it.json';\nimport { PrimeNG } from \"primeng/config\";\nimport { Observable } from \"rxjs\";\nimport { CoreConfigService } from \"../core-config.service\";\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class NgCoreTranslateService extends TranslateService {\n\n  protected primeNG: PrimeNG = inject(PrimeNG);\n  protected coreConfigService: CoreConfigService = inject(CoreConfigService);\n\n  private locales = {\n    de: { angular: localeDe, primeng: de },\n    en: { angular: localeEn, primeng: en },\n    fr: { angular: localeFr, primeng: fr },\n    it: { angular: localeIt, primeng: it }\n  };\n\n  initialize(): void {\n    for (const [key, value] of Object.entries(this.locales)) {\n      registerLocaleData(value.angular, key);\n    }\n    const languages: string[] = this.coreConfigService.languages;\n    super.addLangs(languages);\n\n    super.onLangChange.subscribe(translation => {\n      this.use(translation.lang);\n    });\n    super.setDefaultLang(this.coreConfigService.defaultLanguage);\n    if (!super.currentLang) {\n      super.use(this.coreConfigService.defaultLanguage);\n    }\n  }\n\n  use(lang: string): Observable<any> {\n    DateTime.locale = lang;\n    this.primeNG.setTranslation(this.locales[lang].primeng[lang]);\n\n    return super.use(lang);\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2025 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { CommonModule } from '@angular/common';\nimport { HttpClient } from '@angular/common/http';\nimport { inject, NgModule, provideAppInitializer } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { TranslateLoader as BaseTranslateLoader, TranslateModule, TranslateService } from '@ngx-translate/core';\nimport { NgxSpinnerModule } from 'ngx-spinner';\nimport { ConfirmationService, MessageService } from 'primeng/api';\nimport { of } from 'rxjs';\nimport { CoreConfigService } from './core-config.service';\nimport { DialogComponent } from './dialog/dialog.component';\nimport { NgVarDirective } from './directives/ng-var.directive';\nimport { ErrorComponent } from './error/error.component';\nimport { ComponentCanDeactivateGuard } from './guard/component-can-deactivate.guard';\nimport { CallbackArrayFilterPipe } from './pipe/callback-array-filter.pipe';\nimport { DefaultPipe } from './pipe/default.pipe';\nimport { FilesizePipe } from './pipe/filesize.pipe';\nimport { MarkdownPipe } from './pipe/markdown.pipe';\nimport { Nl2brPipe } from './pipe/nl2br.pipe';\nimport { SanitizePipe } from './pipe/sanitize.pipe';\nimport { SortByKeysPipe } from './pipe/sort-by-keys.pipe';\nimport { TruncateTextPipe } from './pipe/truncate-text.pipe';\nimport { UpperCaseFirstPipe } from './pipe/ucfirst.pipe';\nimport { PrimeNgCoreModule } from './prime-ng-core-module';\nimport { SearchInputComponent } from './search-input/search-input.component';\nimport { TextReadMoreComponent } from './text-read-more/text-read-more.component';\nimport { DateTranslatePipe } from './translate/date-translate-pipe';\nimport { TranslateLanguagePipe } from './translate/translate-language.pipe';\nimport { TranslateLoader } from './translate/translate-loader';\nimport { NgCoreTranslateService } from './translate/translate-service';\n\n@NgModule({\n    declarations: [\n        Nl2brPipe,\n        DefaultPipe,\n        TruncateTextPipe,\n        UpperCaseFirstPipe,\n        CallbackArrayFilterPipe,\n        DateTranslatePipe,\n        DialogComponent,\n        SearchInputComponent,\n        TranslateLanguagePipe,\n        TextReadMoreComponent,\n        SortByKeysPipe,\n        ErrorComponent,\n        FilesizePipe,\n        NgVarDirective,\n        MarkdownPipe,\n        SanitizePipe\n    ],\n    imports: [\n        CommonModule,\n        RouterModule,\n        TranslateModule.forChild({\n            loader: {\n                provide: BaseTranslateLoader,\n                useClass: TranslateLoader,\n                deps: [CoreConfigService, HttpClient]\n            }\n        }),\n        NgxSpinnerModule,\n        PrimeNgCoreModule\n    ],\n    exports: [\n        PrimeNgCoreModule,\n        CommonModule,\n        TranslateModule,\n        Nl2brPipe,\n        DefaultPipe,\n        TruncateTextPipe,\n        TranslateLanguagePipe,\n        UpperCaseFirstPipe,\n        CallbackArrayFilterPipe,\n        DateTranslatePipe,\n        FilesizePipe,\n        DialogComponent,\n        SearchInputComponent,\n        TextReadMoreComponent,\n        ErrorComponent,\n        SortByKeysPipe,\n        NgxSpinnerModule,\n        NgVarDirective,\n        MarkdownPipe,\n        SanitizePipe\n    ],\n    providers: [\n      provideAppInitializer(() => {\n        const translateService = inject(NgCoreTranslateService);\n        translateService.initialize();\n        return of(true);\n      }),\n      ComponentCanDeactivateGuard,\n      ConfirmationService,\n      MessageService,\n      { provide: TranslateService, useClass: NgCoreTranslateService },\n      SanitizePipe\n    ]\n})\nexport class CoreModule { }\n","/*\n * RERO angular core\n * Copyright (C) 2020 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\n/**\n * Interface representing an error.\n */\nexport interface Error {\n  status: number;\n  title: string;\n  message?: string;\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nexport function extractIdOnRef(ref: string) {\n  if (ref != null) {\n    const pidRegExp = new RegExp('.*/(.*)$');\n    return pidRegExp.exec(ref)[1];\n  }\n  return null;\n}\n\nexport function cleanDictKeys(data: any) {\n  // let data = _.cloneDeep(data);\n  for (const key in data) {\n    if (data[key] === null || data[key] === undefined || data[key].length === 0) {\n      delete data[key];\n    }\n  }\n  return data;\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { extractIdOnRef } from '../../utils/utils';\n\n/**\n * Initialize the Formly widget on JSONSchema\n * @param schema - object, the JSONSchema\n */\nfunction createWidgetFormlyConfigProps(schema: any) {\n  if (!schema.widget) {\n    schema.widget = {};\n  }\n  if (!schema.widget.formlyConfig) {\n    schema.widget.formlyConfig = {};\n  }\n  if (!schema.widget.formlyConfig.props) {\n    schema.widget.formlyConfig.props = {};\n  }\n}\n\n/**\n * Resolve $ref definition and set properties on field\n * @param schema - json schema all properties\n * @param schemaProperties - json schema level\n * @returns the updated schema\n */\nexport function resolve$ref(schema: any, schemaProperties: any): any {\n  if (schemaProperties) {\n    Object.keys(schemaProperties).forEach((property: any) => {\n      let field = schemaProperties[property];\n      if (field.properties) {\n        resolve$ref(schema, field.properties);\n      }\n      // The field contains a $ref definition\n      if (field.$ref) {\n        const paths = field.$ref.replace('#/', '').split('/');\n        let def = schema;\n        paths.forEach((path: string) => {\n          def = def[path];\n        });\n        // Populate field with new definition\n        Object.keys(def).forEach((defKey: string) => {\n          if (defKey === 'widget' && def[defKey].formlyConfig?.templateOptions) {\n            def[defKey].formlyConfig.props = def[defKey].formlyConfig.templateOptions;\n            delete def[defKey].formlyConfig.templateOptions;\n          }\n          field[defKey] = def[defKey];\n        });\n        // Delete reference\n        delete field.$ref;\n      }\n    });\n  }\n\n  return schema;\n}\n\n/**\n * Process required properties on the JSONSchema.\n * @param schema - object, the JSONSchema\n * @returns object, a processed required properties JSONSchema\n */\nfunction processRequiredJsonSchema(schema: any): any {\n  schema.required.map((key: string) => {\n    const childSchema = schema.properties[key];\n      if (childSchema) {\n        createWidgetFormlyConfigProps(childSchema);\n        childSchema.widget.formlyConfig.props.initialRequired = true;\n      }\n  });\n\n  return schema;\n}\n\n/**\n * Process order properties on the JSONSchema\n * @param schema - object, the JSONSchema\n * @returns object, a processed order properties JSONSchema\n */\nfunction processPropertiesOder(schema: any): any {\n  // copy the data\n  schema._properties = { ...schema.properties };\n  // new ordered properties\n  schema.properties = {};\n  // copy in the right order\n  for (const property of schema.propertiesOrder) {\n    schema.properties[property] = schema._properties[property];\n  }\n\n  return schema;\n}\n\n\n/**\n * Process JSONSchema\n * This re-order the object properties given a local defined\n * `propertiesOrder` property.\n * The process the required properties given a local defined\n * `required` property.\n * @param schema - object, the JSONSchema\n * @returns object, a converted JSONSchema\n */\nexport function processJsonSchema(schema: any): any {\n  if (schema.properties) {\n    if (schema.propertiesOrder) {\n      schema = processPropertiesOder(schema);\n    }\n    if (schema.required) {\n      schema = processRequiredJsonSchema(schema);\n    }\n    // recursion for objects\n    for (const property of Object.keys(schema.properties)) {\n      processJsonSchema(schema.properties[property]);\n    }\n  }\n  // recursion for array\n  if (schema.items) {\n    processJsonSchema(schema.items);\n  }\n  // recursion for oneOf\n  if (schema.oneOf) {\n    for (const item of schema.oneOf) {\n      processJsonSchema(item);\n    }\n  }\n  // recursion for anyOf\n  if (schema.anyOf) {\n    for (const item of schema.anyOf) {\n      processJsonSchema(item);\n    }\n  }\n  // recursion for allOf\n  if (schema.allOf) {\n    for (const item of schema.allOf) {\n      processJsonSchema(item);\n    }\n  }\n  // recursion for definitions\n  if (schema.definitions) {\n    for (const property of Object.keys(schema.definitions)) {\n      processJsonSchema(schema.definitions[property]);\n    }\n  }\n  return schema;\n}\n\n/**\n * Replace $ref by pid\n *\n * @param schema - object, the JSONSchema\n * @param data - object, the data to be cleaned\n * @returns object, a fresh copy of the data with replacements\n */\nexport function resolveRefs(data: any) {\n  // array?\n  if (data instanceof Array) {\n    for (const d of data) {\n      // recursion\n      const value = resolveRefs(d);\n    }\n  }\n  // object\n  if (data instanceof Object) {\n    // new object with resolved refs\n    const newObject: any = {};\n    for (const key of Object.keys(data)) {\n      const value = resolveRefs(data[key]);\n      if (key === '$ref') {\n        newObject.pid = extractIdOnRef(value);\n      } else {\n        newObject[key] = value;\n      }\n    }\n    return newObject;\n  }\n  return data;\n}\n\n/**\n * Tell if a value can be considered as empty\n * @param value - any, the value to check\n * @returns boolean, true if the value is empty\n */\nexport function isEmpty(value: any) {\n  return (\n    // null or undefined\n    value == null ||\n    // has length and it's zero (array, string)\n    (value.hasOwnProperty('length') && value.length === 0) ||\n    // is an Object and has no keys\n    (value instanceof Object && Object.keys(value).length === 0)\n  );\n}\n\n/**\n * Recursively remove the empty values\n * @param data - object, the data to be cleaned\n * @returns object, a fresh copy of the clean data\n */\nexport function removeEmptyValues(data: any) {\n  // array?\n  if (data instanceof Array) {\n    // new array with non empty values\n    const newArray = [];\n    for (const d of data) {\n      // recursion\n      const value = removeEmptyValues(d);\n      if (!isEmpty(value)) {\n        newArray.push(value);\n      }\n    }\n    return newArray;\n  }\n  // object?\n  if (data instanceof Object) {\n    // new object with non empty values\n    const newObject = {};\n    for (const key of Object.keys(data)) {\n      const value = removeEmptyValues(data[key]);\n      if (!isEmpty(value)) {\n        newObject[key] = value;\n      }\n    }\n    return newObject;\n  }\n  return data;\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { HttpErrorResponse } from '@angular/common/http';\nimport { inject, Injectable } from '@angular/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { Observable, throwError } from 'rxjs';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class RecordHandleErrorService {\n\n  protected translateService: TranslateService = inject(TranslateService);\n\n  /**\n   * handle http error\n   * @param error - HttpErrorResponse\n   * @returns Observable\n   */\n  handleError(error: HttpErrorResponse, resourceName?: string): Observable<never> {\n    return this.standardHandleError(error);\n  }\n\n  /**\n   * Standard handle error (base error)\n   * @param error - HttpErrorResponse\n   * @returns Observable\n   */\n  protected standardHandleError(error: HttpErrorResponse): Observable<never> {\n    // handle Marshmallow errors\n    //   Python marshmallow library can raise ValidationError. In this case, the message is simply 'Validation error'\n    //   but list of errors are passed into the `errors` fields.\n    if (error.error?.errors) {\n      const message = typeof(error.error.errors) === 'object'\n      ? error.error.errors.message\n      : error.error.errors\n          .map(err => this.translateService.instant(err.message))\n          .join('; ');\n      return throwError(() => ({ status: error.status, title: message}));\n    }\n\n    // check if we have possible custom error message to display\n    if (error.status === 400 && error.error.hasOwnProperty('message')) {\n      let { message } = error.error;\n      message = message.replace(/^Validation error: /, '').trim();  // Remove Invenio `ValidationError` header\n      return throwError(() => ({ status: error.status, title: this.translateService.instant(message) }));\n    }\n\n    // If not, then return default message\n    switch (error.status) {\n      case 400:\n        return throwError(() => ({ status: error.status, title: this.translateService.instant('Bad request') }));\n      case 401:\n        return throwError(() => ({ status: error.status, title: this.translateService.instant('Unauthorized') }));\n      case 403:\n        return throwError(() => ({ status: error.status, title: this.translateService.instant('Forbidden') }));\n      case 404:\n        return throwError(() => ({ status: error.status, title: this.translateService.instant('Not found') }));\n      default:\n        return throwError(() => ({ status: 500, title: this.translateService.instant('An error occurred') }));\n    }\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { HttpClient, HttpErrorResponse, HttpHeaders, HttpParams } from '@angular/common/http';\nimport { inject, Injectable } from '@angular/core';\nimport { FormlyFieldConfig } from '@ngx-formly/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { Observable, Subject, of } from 'rxjs';\nimport { catchError, debounceTime, map, tap } from 'rxjs/operators';\nimport { ApiService } from '../api/api.service';\nimport { Error } from '../error/error';\nimport { resolveRefs } from './editor/utils';\nimport { Record } from './record';\nimport { RecordHandleErrorService } from './record.handle-error.service';\n\n@Injectable({\n  providedIn: 'root',\n})\nexport class RecordService {\n\n  protected http: HttpClient = inject(HttpClient);\n  protected apiService: ApiService = inject(ApiService);\n  protected translateService: TranslateService = inject(TranslateService);\n  protected recordHandleErrorService: RecordHandleErrorService = inject(RecordHandleErrorService);\n\n  static readonly DEFAULT_REST_RESULTS_SIZE = 10;\n  static readonly MAX_REST_RESULTS_SIZE = 9999;\n\n  /**\n   * Event for record created\n   */\n  private onCreate: Subject<RecordEvent> = new Subject();\n\n  /**\n   * Event for record updated\n   */\n  private onUpdate: Subject<RecordEvent> = new Subject();\n\n  /**\n   * Event for record deleted\n   */\n  private onDelete: Subject<RecordEvent> = new Subject();\n\n  /**\n   * On create observable\n   * @return onCreate Subject\n   */\n  get onCreate$() {\n    return this.onCreate.asObservable();\n  }\n\n  /**\n   * On update observable\n   * @return onUpdate Subject\n   */\n  get onUpdate$() {\n    return this.onUpdate.asObservable();\n  }\n\n  /**\n   * On delete observable\n   * @return onDelete Subject\n   */\n  get onDelete$() {\n    return this.onDelete.asObservable();\n  }\n\n  /**\n   * Get records filtered by given parameters.\n   *\n   * @param type - string, type of resource\n   * @param query - string, keyword to search for\n   * @param page - number, return records corresponding to this page\n   * @param itemsPerPage - number, number of records to return\n   * @param aggregationsFilters - list, option list of filters; usually used by\n   *                              the aggregation filters.\n   * @param preFilters - object, option list of additional filters.  The value can\n   *                     a string or a list of string to filter with multiple values.\n   * @param headers - HttpHeaders optional http header for the backend call.\n   * @param sort - parameter for sorting records (eg. 'mostrecent' or '-mostrecent')\n   * @param facets - list of strings, define which aggregations/facets should be included into the response.\n   */\n  getRecords(\n    type: string,\n    query: string = '',\n    page = 1,\n    itemsPerPage = RecordService.DEFAULT_REST_RESULTS_SIZE,\n    aggregationsFilters: any[] = [],\n    preFilters: object = {},\n    headers: any = null,\n    sort: string = null,\n    facets: string[] = []\n  ): Observable<Record | Error> {\n    // Build query string\n    let httpParams = new HttpParams().set('q', query);\n    httpParams = httpParams.append('page', '' + page);\n    httpParams = httpParams.append('size', '' + itemsPerPage);\n\n    if (sort) {\n      httpParams = httpParams.append('sort', sort);\n    }\n\n    // aggregationsFilters\n    aggregationsFilters.map((filter) => {\n      filter.values.map((value: string) => {\n        httpParams = httpParams.append(filter.key, value);\n      });\n    });\n\n    // preFilters\n    for (const key of Object.keys(preFilters)) {\n      const value = preFilters[key];\n      if (Array.isArray(value)) {\n        value.map((val) => {\n          httpParams = httpParams.append(key, val);\n        });\n      } else {\n        httpParams = httpParams.append(key, value);\n      }\n    }\n\n    // facets management\n    //   if array `facets` is an empty array, no aggregations data will be included into response.s\n    httpParams = httpParams.append('facets', facets.join(','));\n\n    // http request with headers\n    return this.http\n      .get<Record>(this.apiService.getEndpointByType(type, true) + '/', {\n        params: httpParams,\n        headers: this._createRequestHeaders(headers),\n      })\n      .pipe(catchError((error) => this._handleError(error, type)));\n  }\n\n  /**\n   * Delete a record.\n   * @param type - string, type of record\n   * @param pid - string, PID to remove\n   */\n  delete(type: string, pid: string): Observable<void | Error> {\n    return this.http\n      .delete<void>(this.apiService.getEndpointByType(type, true) + '/' + pid)\n      .pipe(\n        catchError((error) => this._handleError(error, type)),\n        tap(() => this.onDelete.next(this._createEvent(type, { pid })))\n      );\n  }\n\n  /**\n   * Get record data\n   * @param type - string, type of resource\n   * @param pid - string, record PID\n   */\n  getRecord(\n    type: string,\n    pid: string,\n    resolve = 0,\n    headers: any = {}\n  ): Observable<any | Error> {\n    return this.http\n      .get<Record>(\n        `${this.apiService.getEndpointByType(\n          type,\n          true\n        )}/${pid}?resolve=${resolve}`,\n        {\n          headers: this._createRequestHeaders(headers),\n        }\n      )\n      .pipe(catchError((error) => this._handleError(error, type)));\n  }\n\n  /**\n   * Return the schema form to generate the form based on the resource given.\n   * @param recordType - string, type of the resource\n   */\n  getSchemaForm(recordType: string) {\n    let recType = recordType.replace(/ies$/, 'y');\n    recType = recType.replace(/s$/, '');\n    const url = this.apiService.getSchemaFormEndpoint(recordType, true);\n    return this.http.get<any>(url).pipe(\n      catchError((e) => {\n        if (e.status === 404) {\n          return of(null);\n        }\n      }),\n      map((data) => {\n        return data;\n      })\n    );\n  }\n\n  /**\n   * Create a new record\n   * @param recordType - string, type of resource\n   * @param record - object, record to create\n   */\n  create(recordType: string, record: object): Observable<any> {\n\n    return this.http\n      .post(this.apiService.getEndpointByType(recordType, true) + '/', record)\n      .pipe(\n        catchError((error) => this._handleError(error, recordType)),\n        tap(() => this.onCreate.next(this._createEvent(recordType, { record })))\n      );\n  }\n\n  /**\n   * Update a record\n   * @param recordType - string, type of resource\n   * @param pid - string, record PID\n   * @param record - object, record to update\n   */\n  update(recordType: string, pid: string, record: any) {\n    const url = `${this.apiService.getEndpointByType(recordType, true)}/${pid}`;\n\n    return this.http\n        .put(url, record)\n        .pipe(\n          catchError((error) => this._handleError(error, recordType)),\n          tap(() => this.onUpdate.next(this._createEvent(recordType, { record })))\n        );\n  }\n\n  /**\n   * Check if a record is already registered with the same value\n   * @param recordType - string, type of record\n   * @param field - string, field to check\n   * @param value - string, value to check\n   * @param excludePid - string, PID to ignore (normally the current record we are checking)\n   */\n  valueAlreadyExists(\n    recordType: string,\n    field: string,\n    value: string,\n    excludePid: string\n  ) {\n    value = value.replace(/\\\"/g, '\\\\\"');\n    let query = `${field}:\"${value}\"`;\n    if (excludePid) {\n      query += ` NOT pid:${excludePid}`;\n    }\n    return this.getRecords(recordType, query, 1, 1).pipe(\n      map((res: Record) => this.totalHits(res.hits.total)),\n      map((total) => (total ? { alreadyTaken: value } : null)),\n      debounceTime(1000)\n    );\n  }\n\n  /**\n   * Check if a record is already registered with the same value\n   * @param field - FormlyFieldConfig, field to check\n   * @param recordType - string, type of record\n   * @param excludePid - string, PID to ignore (normally the current record we are checking)\n   * @param term - string, the elasticsearch term to check the uniqueness, use field.key if not given\n   * @param limitToValues - string[], limit the test to a given list of values\n   * @param filter - string, additional es query filters\n   */\n  uniqueValue(\n    field: FormlyFieldConfig,\n    recordType: string,\n    excludePid: string = null,\n    term = null,\n    limitToValues: string[] = [],\n    filter: string = null\n  ) {\n    let key = field.key;\n    if (term != null) {\n      key = term;\n    }\n    let value = field.formControl.value;\n    const model = resolveRefs(field.model);\n    if (value == null) {\n      return of(true);\n    }\n    if (typeof(value) === 'string') {\n      value = value.replace(/\\\"/g, '\\\\\"');\n    }\n    if (limitToValues.length > 0 && !limitToValues.some((v) => v === value)) {\n      return of(true);\n    }\n    let query = `${key}:${value}`;\n    if (typeof value === 'string') {\n      query = `${key}:\"${value}\"`;\n    }\n    if (filter) {\n      const filterFn = Function('model', `return ${filter};`);\n      query = `${query} AND ` + filterFn(model);\n    }\n    if (excludePid) {\n      query += ` NOT pid:${excludePid}`;\n    }\n    return this.getRecords(recordType, query, 1, 1).pipe(\n      map((res: Record) => this.totalHits(res.hits.total)),\n      map((total) => (total ? { alreadyTaken: value } : null)),\n      debounceTime(500)\n    );\n  }\n\n  /**\n   * Transform a total value string or object representation\n   * (ES compatibility v6 and v7)\n   * @param total - string or object\n   * @param relation - boolean\n   * @return integer, text or null\n   */\n  totalHits(total: any, relation = false): any {\n    switch (typeof total) {\n      case 'object':\n        if (relation) {\n          return `${this.translateService.instant(\n            total.relation\n          )} ${total.value.toString()}`;\n        }\n        return Number(total.value);\n      case 'number':\n        return total;\n      case 'string':\n        return Number(total);\n      default:\n        return null;\n    }\n  }\n\n  /**\n   * Return the suggestions for query and field.\n   *\n   * @param resource Resource type.\n   * @param url URL of suggestions endpoint.\n   * @param field Field to search for suggestions.\n   * @param q Query.\n   * @returns Observable containing the list of suggestions.\n   */\n  suggestions(\n    resource: string,\n    url: string,\n    field: string,\n    q: string\n  ): Observable<Array<string>> {\n    return this.http.get<Array<string>>(`${this.apiService.baseUrl}${url}`, {\n      params: { resource, field, q },\n    });\n  }\n\n  /**\n   * Error handling during api call process.\n   * @param error - HttpErrorResponse\n   * @param resourceName- Name of current resource\n   * @return throwError\n   */\n  private _handleError(error: HttpErrorResponse, resourceName?: string): Observable<never> {\n    return this.recordHandleErrorService.handleError(error, resourceName);\n  }\n\n  /**\n   * Creates and returns a HttpHeader object to send to request.\n   * @param headers Object containing http headers to send to request.\n   */\n  private _createRequestHeaders(headers: any = {}) {\n    return headers\n      ? new HttpHeaders(headers)\n      : new HttpHeaders({ 'Content-Type': 'application/json' });\n  }\n\n  /**\n   * Create a message for event\n   * @param resource - string\n   * @param data - any\n   */\n  private _createEvent(resource: string, data: any) {\n    return { resource, data };\n  }\n}\n\n/** Record Event Interface */\nexport interface RecordEvent {\n  resource: string;\n  data: any;\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { inject, Pipe, PipeTransform } from '@angular/core';\nimport { map } from 'rxjs/operators';\nimport { RecordService } from '../record/record.service';\nimport { extractIdOnRef } from '../utils/utils';\n\n/**\n * Get a record by its PID.\n */\n@Pipe({\n    name: 'getRecord',\n    standalone: false\n})\nexport class GetRecordPipe implements PipeTransform {\n\n  protected recordService: RecordService = inject(RecordService);\n\n  /**\n   * Return record data corresponding to PID.\n   *\n   * @param pid Record PID.\n   * @param type Type of the resource.\n   * @param returnType Type of data to return.\n   * @param field Field to return.\n   * @return Record or field record corresponding to PID.\n   */\n  transform(pid: any, type: string, returnType = 'object', field?: string, headers?: object): any {\n    // process $ref entrypoint\n    if (pid.startsWith('http')) {\n      pid = extractIdOnRef(pid);\n    }\n\n    if ('object' !== returnType) {\n      returnType = 'field';\n    }\n\n    return this.recordService.getRecord(type, pid, 1, headers).pipe(map(data => {\n      if (!data) {\n        return null;\n      }\n      if ('object' === returnType) {\n        return data;\n      }\n      if (field in data.metadata) {\n        return data.metadata[field];\n      }\n      return null;\n    }));\n  }\n}\n","import { definePreset } from \"@primeng/themes\";\nimport Aura from \"@primeng/themes/aura\";\n\nexport const primeNGConfig = {\n  theme: {\n    options: {\n      cssLayer: {\n        name: 'primeng'\n      },\n      darkModeSelector: false\n    },\n    preset: definePreset(Aura, {\n      primitive: {\n        borderRadius: {\n          none: \"0\",\n          xs: \"2px\",\n          sm: \"4px\",\n          md: \"6px\",\n          lg: \"8px\",\n          xl: \"12px\"\n        },\n        emerald: {\n          50: \"#ecfdf5\",\n          100: \"#d1fae5\",\n          200: \"#a7f3d0\",\n          300: \"#6ee7b7\",\n          400: \"#34d399\",\n          500: \"#10b981\",\n          600: \"#059669\",\n          700: \"#047857\",\n          800: \"#065f46\",\n          900: \"#064e3b\",\n          950: \"#022c22\"\n        },\n        green: {\n          50: \"#f0fdf4\",\n          100: \"#dcfce7\",\n          200: \"#bbf7d0\",\n          300: \"#86efac\",\n          400: \"#4ade80\",\n          500: \"#22c55e\",\n          600: \"#16a34a\",\n          700: \"#15803d\",\n          800: \"#166534\",\n          900: \"#14532d\",\n          950: \"#052e16\"\n        },\n        lime: {\n          50: \"#f7fee7\",\n          100: \"#ecfccb\",\n          200: \"#d9f99d\",\n          300: \"#bef264\",\n          400: \"#a3e635\",\n          500: \"#84cc16\",\n          600: \"#65a30d\",\n          700: \"#4d7c0f\",\n          800: \"#3f6212\",\n          900: \"#365314\",\n          950: \"#1a2e05\"\n        },\n        red: {\n          50: \"#fef2f2\",\n          100: \"#fee2e2\",\n          200: \"#fecaca\",\n          300: \"#fca5a5\",\n          400: \"#f87171\",\n          500: \"#ef4444\",\n          600: \"#dc2626\",\n          700: \"#b91c1c\",\n          800: \"#991b1b\",\n          900: \"#7f1d1d\",\n          950: \"#450a0a\"\n        },\n        orange: {\n          50: \"#fff7ed\",\n          100: \"#ffedd5\",\n          200: \"#fed7aa\",\n          300: \"#fdba74\",\n          400: \"#fb923c\",\n          500: \"#f97316\",\n          600: \"#ea580c\",\n          700: \"#c2410c\",\n          800: \"#9a3412\",\n          900: \"#7c2d12\",\n          950: \"#431407\"\n        },\n        amber: {\n          50: \"#fffbeb\",\n          100: \"#fef3c7\",\n          200: \"#fde68a\",\n          300: \"#fcd34d\",\n          400: \"#fbbf24\",\n          500: \"#f59e0b\",\n          600: \"#d97706\",\n          700: \"#b45309\",\n          800: \"#92400e\",\n          900: \"#78350f\",\n          950: \"#451a03\"\n        },\n        yellow: {\n          50: \"#fefce8\",\n          100: \"#fef9c3\",\n          200: \"#fef08a\",\n          300: \"#fde047\",\n          400: \"#facc15\",\n          500: \"#eab308\",\n          600: \"#ca8a04\",\n          700: \"#a16207\",\n          800: \"#854d0e\",\n          900: \"#713f12\",\n          950: \"#422006\"\n        },\n        teal: {\n          50: \"#f0fdfa\",\n          100: \"#ccfbf1\",\n          200: \"#99f6e4\",\n          300: \"#5eead4\",\n          400: \"#2dd4bf\",\n          500: \"#14b8a6\",\n          600: \"#0d9488\",\n          700: \"#0f766e\",\n          800: \"#115e59\",\n          900: \"#134e4a\",\n          950: \"#042f2e\"\n        },\n        cyan: {\n          50: \"#ecfeff\",\n          100: \"#cffafe\",\n          200: \"#a5f3fc\",\n          300: \"#67e8f9\",\n          400: \"#22d3ee\",\n          500: \"#06b6d4\",\n          600: \"#0891b2\",\n          700: \"#0e7490\",\n          800: \"#155e75\",\n          900: \"#164e63\",\n          950: \"#083344\"\n        },\n        sky: {\n          50: \"#f0f9ff\",\n          100: \"#e0f2fe\",\n          200: \"#bae6fd\",\n          300: \"#7dd3fc\",\n          400: \"#38bdf8\",\n          500: \"#0ea5e9\",\n          600: \"#0284c7\",\n          700: \"#0369a1\",\n          800: \"#075985\",\n          900: \"#0c4a6e\",\n          950: \"#082f49\"\n        },\n        blue: {\n          50: \"#eff6ff\",\n          100: \"#dbeafe\",\n          200: \"#bfdbfe\",\n          300: \"#93c5fd\",\n          400: \"#60a5fa\",\n          500: \"#3b82f6\",\n          600: \"#2563eb\",\n          700: \"#1d4ed8\",\n          800: \"#1e40af\",\n          900: \"#1e3a8a\",\n          950: \"#172554\"\n        },\n        indigo: {\n          50: \"#eef2ff\",\n          100: \"#e0e7ff\",\n          200: \"#c7d2fe\",\n          300: \"#a5b4fc\",\n          400: \"#818cf8\",\n          500: \"#6366f1\",\n          600: \"#4f46e5\",\n          700: \"#4338ca\",\n          800: \"#3730a3\",\n          900: \"#312e81\",\n          950: \"#1e1b4b\"\n        },\n        violet: {\n          50: \"#f5f3ff\",\n          100: \"#ede9fe\",\n          200: \"#ddd6fe\",\n          300: \"#c4b5fd\",\n          400: \"#a78bfa\",\n          500: \"#8b5cf6\",\n          600: \"#7c3aed\",\n          700: \"#6d28d9\",\n          800: \"#5b21b6\",\n          900: \"#4c1d95\",\n          950: \"#2e1065\"\n        },\n        purple: {\n          50: \"#faf5ff\",\n          100: \"#f3e8ff\",\n          200: \"#e9d5ff\",\n          300: \"#d8b4fe\",\n          400: \"#c084fc\",\n          500: \"#a855f7\",\n          600: \"#9333ea\",\n          700: \"#7e22ce\",\n          800: \"#6b21a8\",\n          900: \"#581c87\",\n          950: \"#3b0764\"\n        },\n        fuchsia: {\n          50: \"#fdf4ff\",\n          100: \"#fae8ff\",\n          200: \"#f5d0fe\",\n          300: \"#f0abfc\",\n          400: \"#e879f9\",\n          500: \"#d946ef\",\n          600: \"#c026d3\",\n          700: \"#a21caf\",\n          800: \"#86198f\",\n          900: \"#701a75\",\n          950: \"#4a044e\"\n        },\n        pink: {\n          50: \"#fdf2f8\",\n          100: \"#fce7f3\",\n          200: \"#fbcfe8\",\n          300: \"#f9a8d4\",\n          400: \"#f472b6\",\n          500: \"#ec4899\",\n          600: \"#db2777\",\n          700: \"#be185d\",\n          800: \"#9d174d\",\n          900: \"#831843\",\n          950: \"#500724\"\n        },\n        rose: {\n          50: \"#fff1f2\",\n          100: \"#ffe4e6\",\n          200: \"#fecdd3\",\n          300: \"#fda4af\",\n          400: \"#fb7185\",\n          500: \"#f43f5e\",\n          600: \"#e11d48\",\n          700: \"#be123c\",\n          800: \"#9f1239\",\n          900: \"#881337\",\n          950: \"#4c0519\"\n        },\n        slate: {\n          50: \"#f8fafc\",\n          100: \"#f1f5f9\",\n          200: \"#e2e8f0\",\n          300: \"#cbd5e1\",\n          400: \"#94a3b8\",\n          500: \"#64748b\",\n          600: \"#475569\",\n          700: \"#334155\",\n          800: \"#1e293b\",\n          900: \"#0f172a\",\n          950: \"#020617\"\n        },\n        gray: {\n          50: \"#f9fafb\",\n          100: \"#f3f4f6\",\n          200: \"#e5e7eb\",\n          300: \"#d1d5db\",\n          400: \"#9ca3af\",\n          500: \"#6b7280\",\n          600: \"#4b5563\",\n          700: \"#374151\",\n          800: \"#1f2937\",\n          900: \"#111827\",\n          950: \"#030712\"\n        },\n        zinc: {\n          50: \"#fafafa\",\n          100: \"#f4f4f5\",\n          200: \"#e4e4e7\",\n          300: \"#d4d4d8\",\n          400: \"#a1a1aa\",\n          500: \"#71717a\",\n          600: \"#52525b\",\n          700: \"#3f3f46\",\n          800: \"#27272a\",\n          900: \"#18181b\",\n          950: \"#09090b\"\n        },\n        neutral: {\n          50: \"#fafafa\",\n          100: \"#f5f5f5\",\n          200: \"#e5e5e5\",\n          300: \"#d4d4d4\",\n          400: \"#a3a3a3\",\n          500: \"#737373\",\n          600: \"#525252\",\n          700: \"#404040\",\n          800: \"#262626\",\n          900: \"#171717\",\n          950: \"#0a0a0a\"\n        },\n        stone: {\n          50: \"#fafaf9\",\n          100: \"#f5f5f4\",\n          200: \"#e7e5e4\",\n          300: \"#d6d3d1\",\n          400: \"#a8a29e\",\n          500: \"#78716c\",\n          600: \"#57534e\",\n          700: \"#44403c\",\n          800: \"#292524\",\n          900: \"#1c1917\",\n          950: \"#0c0a09\"\n        }\n      },\n      semantic: {\n        transitionDuration: \"0.2s\",\n        focusRing: {\n          width: \"1px\",\n          style: \"solid\",\n          color: \"{primary.color}\",\n          offset: \"2px\",\n          shadow: \"none\"\n        },\n        disabledOpacity: \"0.6\",\n        iconSize: \"1rem\",\n        anchorGutter: \"2px\",\n        primary: {\n          50: \"#eff6ff\",\n          100: \"#dbeafe\",\n          200: \"#bfdbfe\",\n          300: \"#93c5fd\",\n          400: \"#60a5fa\",\n          500: \"#3b82f6\",\n          600: \"#2563eb\",\n          700: \"#1d4ed8\",\n          800: \"#1e40af\",\n          900: \"#1e3a8a\",\n          950: \"#172554\"\n        },\n        formField: {\n          paddingX: \"0.75rem\",\n          paddingY: \"0.5rem\",\n          sm: {\n            fontSize: \"0.875rem\",\n            paddingX: \"0.625rem\",\n            paddingY: \"0.375rem\"\n          },\n          lg: {\n            fontSize: \"1.125rem\",\n            paddingX: \"0.875rem\",\n            paddingY: \"0.625rem\"\n          },\n          borderRadius: \"{border.radius.md}\",\n          focusRing: {\n            width: \"0\",\n            style: \"none\",\n            color: \"transparent\",\n            offset: \"0\",\n            shadow: \"none\"\n          },\n          transitionDuration: \"{transition.duration}\"\n        },\n        list: {\n          padding: \"0.25rem 0.25rem\",\n          gap: \"2px\",\n          header: {\n            padding: \"0.5rem 1rem 0.25rem 1rem\"\n          },\n          option: {\n            padding: \"0.5rem 0.75rem\",\n            borderRadius: \"{border.radius.sm}\"\n          },\n          optionGroup: {\n            padding: \"0.5rem 0.75rem\",\n            fontWeight: \"600\"\n          }\n        },\n        content: {\n          borderRadius: \"{border.radius.md}\"\n        },\n        mask: {\n          transitionDuration: \"0.15s\"\n        },\n        navigation: {\n          list: {\n            padding: \"0.25rem 0.25rem\",\n            gap: \"2px\"\n          },\n          item: {\n            padding: \"0.5rem 0.75rem\",\n            borderRadius: \"{border.radius.sm}\",\n            gap: \"0.5rem\"\n          },\n          submenuLabel: {\n            padding: \"0.5rem 0.75rem\",\n            fontWeight: \"600\"\n          },\n          submenuIcon: {\n            size: \"0.875rem\"\n          }\n        },\n        overlay: {\n          select: {\n            borderRadius: \"{border.radius.md}\",\n            shadow: \"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)\"\n          },\n          popover: {\n            borderRadius: \"{border.radius.md}\",\n            padding: \"0.75rem\",\n            shadow: \"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)\"\n          },\n          modal: {\n            borderRadius: \"{border.radius.xl}\",\n            padding: \"1.25rem\",\n            shadow: \"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)\"\n          },\n          navigation: {\n            shadow: \"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)\"\n          }\n        },\n        colorScheme: {\n          light: {\n            surface: {\n              0: \"#ffffff\",\n              50: \"#f8fafc\",\n              100: \"#f1f5f9\",\n              200: \"#e2e8f0\",\n              300: \"#cbd5e1\",\n              400: \"#94a3b8\",\n              500: \"#64748b\",\n              600: \"#475569\",\n              700: \"#334155\",\n              800: \"#1e293b\",\n              900: \"#0f172a\",\n              950: \"#020617\"\n            },\n            primary: {\n              color: \"{primary.500}\",\n              contrastColor: \"#ffffff\",\n              hoverColor: \"{primary.600}\",\n              activeColor: \"{primary.700}\"\n            },\n            highlight: {\n              background: \"{primary.50}\",\n              focusBackground: \"{primary.100}\",\n              color: \"{primary.700}\",\n              focusColor: \"{primary.800}\"\n            },\n            mask: {\n              background: \"rgba(0,0,0,0.4)\",\n              color: \"{surface.200}\"\n            },\n            formField: {\n              background: \"{surface.0}\",\n              disabledBackground: \"{surface.200}\",\n              filledBackground: \"{surface.50}\",\n              filledHoverBackground: \"{surface.50}\",\n              filledFocusBackground: \"{surface.50}\",\n              borderColor: \"{surface.300}\",\n              hoverBorderColor: \"{surface.400}\",\n              focusBorderColor: \"{primary.color}\",\n              invalidBorderColor: \"{red.400}\",\n              color: \"{surface.700}\",\n              disabledColor: \"{surface.500}\",\n              placeholderColor: \"{surface.500}\",\n              invalidPlaceholderColor: \"{red.600}\",\n              floatLabelColor: \"{surface.500}\",\n              floatLabelFocusColor: \"{primary.600}\",\n              floatLabelActiveColor: \"{surface.500}\",\n              floatLabelInvalidColor: \"{form.field.invalid.placeholder.color}\",\n              iconColor: \"{surface.400}\",\n              shadow: \"0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)\"\n            },\n            text: {\n              color: \"{surface.800}\",\n              hoverColor: \"{surface.900}\",\n              mutedColor: \"{surface.500}\",\n              hoverMutedColor: \"{surface.600}\"\n            },\n            content: {\n              background: \"{surface.0}\",\n              hoverBackground: \"{surface.100}\",\n              borderColor: \"{surface.200}\",\n              color: \"{text.color}\",\n              hoverColor: \"{text.hover.color}\"\n            },\n            overlay: {\n              select: {\n                background: \"{surface.0}\",\n                borderColor: \"{surface.200}\",\n                color: \"{text.color}\"\n              },\n              popover: {\n                background: \"{surface.0}\",\n                borderColor: \"{surface.200}\",\n                color: \"{text.color}\"\n              },\n              modal: {\n                background: \"{surface.0}\",\n                borderColor: \"{surface.200}\",\n                color: \"{text.color}\"\n              }\n            },\n            list: {\n              option: {\n                focusBackground: \"{surface.100}\",\n                selectedBackground: \"{highlight.background}\",\n                selectedFocusBackground: \"{highlight.focus.background}\",\n                color: \"{text.color}\",\n                focusColor: \"{text.hover.color}\",\n                selectedColor: \"{highlight.color}\",\n                selectedFocusColor: \"{highlight.focus.color}\",\n                icon: {\n                  color: \"{surface.400}\",\n                  focusColor: \"{surface.500}\"\n                }\n              },\n              optionGroup: {\n                background: \"transparent\",\n                color: \"{text.muted.color}\"\n              }\n            },\n            navigation: {\n              item: {\n                focusBackground: \"{surface.100}\",\n                activeBackground: \"{surface.100}\",\n                color: \"{text.color}\",\n                focusColor: \"{text.hover.color}\",\n                activeColor: \"{text.hover.color}\",\n                icon: {\n                  color: \"{surface.400}\",\n                  focusColor: \"{surface.500}\",\n                  activeColor: \"{surface.500}\"\n                }\n              },\n              submenuLabel: {\n                background: \"transparent\",\n                color: \"{text.muted.color}\"\n              },\n              submenuIcon: {\n                color: \"{surface.400}\",\n                focusColor: \"{surface.500}\",\n                activeColor: \"{surface.500}\"\n              }\n            }\n          },\n          dark: {\n            surface: {\n              0: \"#ffffff\",\n              50: \"#fafafa\",\n              100: \"#f4f4f5\",\n              200: \"#e4e4e7\",\n              300: \"#d4d4d8\",\n              400: \"#a1a1aa\",\n              500: \"#71717a\",\n              600: \"#52525b\",\n              700: \"#3f3f46\",\n              800: \"#27272a\",\n              900: \"#18181b\",\n              950: \"#09090b\"\n            },\n            primary: {\n              color: \"{primary.400}\",\n              contrastColor: \"{surface.900}\",\n              hoverColor: \"{primary.300}\",\n              activeColor: \"{primary.200}\"\n            },\n            highlight: {\n              background: \"color-mix(in srgb, {primary.400}, transparent 84%)\",\n              focusBackground: \"color-mix(in srgb, {primary.400}, transparent 76%)\",\n              color: \"rgba(255,255,255,.87)\",\n              focusColor: \"rgba(255,255,255,.87)\"\n            },\n            mask: {\n              background: \"rgba(0,0,0,0.6)\",\n              color: \"{surface.200}\"\n            },\n            formField: {\n              background: \"{surface.950}\",\n              disabledBackground: \"{surface.700}\",\n              filledBackground: \"{surface.800}\",\n              filledHoverBackground: \"{surface.800}\",\n              filledFocusBackground: \"{surface.800}\",\n              borderColor: \"{surface.600}\",\n              hoverBorderColor: \"{surface.500}\",\n              focusBorderColor: \"{primary.color}\",\n              invalidBorderColor: \"{red.300}\",\n              color: \"{surface.0}\",\n              disabledColor: \"{surface.400}\",\n              placeholderColor: \"{surface.400}\",\n              invalidPlaceholderColor: \"{red.400}\",\n              floatLabelColor: \"{surface.400}\",\n              floatLabelFocusColor: \"{primary.color}\",\n              floatLabelActiveColor: \"{surface.400}\",\n              floatLabelInvalidColor: \"{form.field.invalid.placeholder.color}\",\n              iconColor: \"{surface.400}\",\n              shadow: \"0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)\"\n            },\n            text: {\n              color: \"{surface.0}\",\n              hoverColor: \"{surface.0}\",\n              mutedColor: \"{surface.400}\",\n              hoverMutedColor: \"{surface.300}\"\n            },\n            content: {\n              background: \"{surface.900}\",\n              hoverBackground: \"{surface.800}\",\n              borderColor: \"{surface.700}\",\n              color: \"{text.color}\",\n              hoverColor: \"{text.hover.color}\"\n            },\n            overlay: {\n              select: {\n                background: \"{surface.900}\",\n                borderColor: \"{surface.700}\",\n                color: \"{text.color}\"\n              },\n              popover: {\n                background: \"{surface.900}\",\n                borderColor: \"{surface.700}\",\n                color: \"{text.color}\"\n              },\n              modal: {\n                background: \"{surface.900}\",\n                borderColor: \"{surface.700}\",\n                color: \"{text.color}\"\n              }\n            },\n            list: {\n              option: {\n                focusBackground: \"{surface.800}\",\n                selectedBackground: \"{highlight.background}\",\n                selectedFocusBackground: \"{highlight.focus.background}\",\n                color: \"{text.color}\",\n                focusColor: \"{text.hover.color}\",\n                selectedColor: \"{highlight.color}\",\n                selectedFocusColor: \"{highlight.focus.color}\",\n                icon: {\n                  color: \"{surface.500}\",\n                  focusColor: \"{surface.400}\"\n                }\n              },\n              optionGroup: {\n                background: \"transparent\",\n                color: \"{text.muted.color}\"\n              }\n            },\n            navigation: {\n              item: {\n                focusBackground: \"{surface.800}\",\n                activeBackground: \"{surface.800}\",\n                color: \"{text.color}\",\n                focusColor: \"{text.hover.color}\",\n                activeColor: \"{text.hover.color}\",\n                icon: {\n                  color: \"{surface.500}\",\n                  focusColor: \"{surface.400}\",\n                  activeColor: \"{surface.400}\"\n                }\n              },\n              submenuLabel: {\n                background: \"transparent\",\n                color: \"{text.muted.color}\"\n              },\n              submenuIcon: {\n                color: \"{surface.500}\",\n                focusColor: \"{surface.400}\",\n                activeColor: \"{surface.400}\"\n              }\n            }\n          }\n        }\n      },\n      components: {\n        accordion: {\n          header: {\n            borderRadius: \"{content.border.radius}\",\n            borderColor: \"{content.border.color}\",\n            background: \"{surface.100}\",\n            hoverBackground: \"{surface.200}\",\n            activeBackground: \"{surface.200}\",\n            activeHoverBackground: \"{surface.200}\"\n          },\n          content: {\n            padding: \"0.5rem 0.25rem\"\n          }\n        },\n        autocomplete: {\n          option: {\n            padding: \"0.2rem 0.5rem\"\n          }\n        },\n        card: {\n          root: {\n            background: \"{surface.100}\",\n          },\n          body: {\n            padding: \"0\",\n          }\n        },\n        fieldset: {\n          legend: {\n            padding: \"0 0.25rem 0.25rem 0.25rem\",\n          }\n        },\n        listbox: {\n          option: {\n            padding: \"0.2rem 0.5rem\"\n          }\n        },\n        menubar: {\n          root: {\n            borderColor: \"transparent\",\n          }\n        },\n        panel: {\n          root: {\n            background: \"{surface.100}\",\n          },\n          content: {\n            padding: \"0\"\n          }\n        },\n        tag: {\n          root: {\n            fontSize: \"0.8rem\",\n            fontWeight: \"600\",\n            padding: \"0.15rem 0.5rem\",\n            gap: \"0.25rem\",\n            borderRadius: \"{content.border.radius}\",\n            roundedBorderRadius: \"{border.radius.xl}\"\n          },\n          icon: {\n            size: \"0.5rem\"\n          },\n          colorScheme: {\n              light: {\n                  primary: {\n                      background: \"{primary.100}\",\n                      color: \"{primary.700}\"\n                  },\n                  secondary: {\n                      background: \"{surface.500}\",\n                      color: \"{surface.0}\"\n                  },\n                  success: {\n                      background: \"{green.100}\",\n                      color: \"{green.700}\"\n                  },\n                  info: {\n                      background: \"{sky.100}\",\n                      color: \"{sky.700}\"\n                  },\n                  warn: {\n                      background: \"{orange.100}\",\n                      color: \"{orange.700}\"\n                  },\n                  danger: {\n                      background: \"{red.100}\",\n                      color: \"{red.700}\"\n                  },\n                  contrast: {\n                      background: \"{surface.950}\",\n                      color: \"{surface.0}\"\n                  }\n              },\n              dark: {\n                  primary: {\n                      background: \"color-mix(in srgb, {primary.500}, transparent 84%)\",\n                      color: \"{primary.300}\"\n                  },\n                  secondary: {\n                      background: \"{surface.800}\",\n                      color: \"{surface.300}\"\n                  },\n                  success: {\n                      background: \"color-mix(in srgb, {green.500}, transparent 84%)\",\n                      color: \"{green.300}\"\n                  },\n                  info: {\n                      background: \"color-mix(in srgb, {sky.500}, transparent 84%)\",\n                      color: \"{sky.300}\"\n                  },\n                  warn: {\n                      background: \"color-mix(in srgb, {orange.500}, transparent 84%)\",\n                      color: \"{orange.300}\"\n                  },\n                  danger: {\n                      background: \"color-mix(in srgb, {red.500}, transparent 84%)\",\n                      color: \"{red.300}\"\n                  },\n                  contrast: {\n                      background: \"{surface.0}\",\n                      color: \"{surface.950}\"\n                  }\n              }\n          }\n      },\n        timeline: {\n          event: {\n            minHeight: \"2.5rem\",\n          }\n        }\n      }\n    })\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2019-2023 RERO\n * Copyright (C) 2019-2023 UCLouvain\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\n/**\n * Interface representing an action status for permission check.\n */\nexport interface ActionStatus {\n    can: boolean;\n    message: string;\n    url?: string;\n    routerLink?: string[];\n    type?: string | undefined | null;\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Location } from '@angular/common';\nimport { Component, inject, input, output } from '@angular/core';\nimport { ActionStatus } from '../../action-status';\nimport { IRecordEvent } from './IRecordEvent.interface';\n\n@Component({\n    selector: 'ng-core-detail-button',\n    templateUrl: './detail-button.component.html',\n    standalone: false\n})\nexport class DetailButtonComponent {\n\n  // Inject\n  location: Location = inject(Location);\n\n  /** Record */\n  record = input<any>();\n\n  /** Record type */\n  type = input<string>();\n\n  /** Admin mode for CRUD operations */\n  adminMode = input<ActionStatus>({ can: false, message: '' });\n\n  /** Record can be used ? */\n  useStatus = input<ActionStatus>({ can: false, message: '', url: '' });\n\n  /** Record can be updated ? */\n  updateStatus = input<ActionStatus>({ can: false, message: '' });\n\n  /** Record can be deleted ? */\n  deleteStatus = input<ActionStatus>({ can: false, message: '' });\n\n  /** Record event */\n  recordEvent = output<IRecordEvent>();\n\n  /** Delete record message event */\n  deleteMessageEvent = output<string>();\n\n  /** Use the record */\n  useRecord(): void {\n    this.recordEvent.emit({ action: 'use', url: this.updateStatus().url })\n  }\n\n  /**\n   * Update record event\n   * @param record - the current record\n   */\n  updateRecord(record: any): void {\n    this.recordEvent.emit({ action: 'update', record });\n  }\n\n  /**\n   * Delete record event\n   * @param record - the current record\n   */\n  deleteRecord(record: any): void {\n    if (this.deleteStatus().can) {\n      this.recordEvent.emit({ action: 'delete', record });\n    } else {\n      this.deleteMessageEvent.emit(this.deleteStatus().message.replace(new RegExp('\\n', 'g'), '<br>'));\n    }\n  }\n\n  /** Go back to previous page */\n  goBack() {\n    this.location.back();\n  }\n}\n","<!--\n  RERO angular core\n  Copyright (C) 2020-2024 RERO\n\n  This program is free software: you can redistribute it and/or modify\n  it under the terms of the GNU Affero General Public License as published by\n  the Free Software Foundation, version 3 of the License.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU Affero General Public License for more details.\n\n  You should have received a copy of the GNU Affero General Public License\n  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n-->\n<div class=\"core:flex core:justify-between core:flex-wrap core:mb-4\">\n  <p-button\n    id=\"detail-back-button\"\n    styleClass=\"core:grow\"\n    icon=\"fa fa-arrow-left\"\n    [label]=\"'Back'|translate\"\n    severity=\"secondary\"\n    [text]=\"true\"\n    (onClick)=\"goBack()\"\n  />\n  <div class=\"core:flex core:flex-wrap core:items-center core:gap-1\">\n    <ng-content select=\"[beforeButton]\"></ng-content>\n    @if (record() && adminMode().can) {\n      @if (useStatus() && useStatus().can && useStatus().url) {\n        <p-button\n          id=\"detail-use-button\"\n          icon=\"fa fa-hand-o-right\"\n          [label]=\"'Use'|translate\"\n          (onClick)=\"useRecord()\"\n          translate\n        />\n      }\n      @if (updateStatus() && updateStatus().can) {\n        <p-button\n          id=\"detail-edit-button\"\n          icon=\"fa fa-pencil\"\n          [label]=\"'Edit'|translate\"\n          [outlined]=\"useStatus()?.can\"\n          (onClick)=\"updateRecord(record())\"\n          translate\n        />\n      }\n      @if (deleteStatus()) {\n        <p-button\n          id=\"detail-delete-button\"\n          icon=\"fa fa-trash\"\n          severity=\"danger\"\n          class=\"core:pointer-events-auto\"\n          outlined\n          (onClick)=\"deleteRecord(record())\"\n          [pTooltip]=\"tooltipContent\"\n          tooltipPosition=\"bottom\"\n          [disabled]=\"!deleteStatus().can\"\n          [label]=\"'Delete'|translate\"\n          [tooltipDisabled]=\"deleteStatus().can\"\n        />\n        <ng-template #tooltipContent>\n          <span [innerHTML]=\"deleteStatus().message\"></span>\n        </ng-template>\n      }\n    }\n    <ng-content select=\"[afterButton]\"/>\n  </div>\n</div>\n","/*\n * RERO angular core\n * Copyright (C) 2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nexport const CONFIG = {\n  MESSAGE_LIFE: 5000        // Message lifetime in ms\n}\n","/*\n * RERO angular core\n * Copyright (C) 2019-2024 RERO\n * Copyright (C) 2019-2023 UCLouvain\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Injectable, inject } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { TranslateService } from '@ngx-translate/core';\nimport { ConfirmationService, MessageService } from 'primeng/api';\nimport { BehaviorSubject, Observable, of } from 'rxjs';\nimport { first, map } from 'rxjs/operators';\nimport { CONFIG } from '../utils/config';\nimport { ActionStatus } from './action-status';\nimport { RecordService } from './record.service';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class RecordUiService {\n\n  protected translateService: TranslateService = inject(TranslateService);\n  protected recordService: RecordService = inject(RecordService);\n  protected router: Router = inject(Router);\n  protected confirmationService: ConfirmationService = inject(ConfirmationService);\n  protected messageService: MessageService = inject(MessageService);\n\n  /** Configuration for all resources. */\n  types = [];\n\n  /**\n   * Delete a record by its PID.\n   * @param type Type of resource\n   * @param pid - string, PID to delete\n   * @returns Observable resolving as a boolean\n   */\n  deleteRecord(type: string, pid: string): Observable<boolean> {\n    const delete$ = new BehaviorSubject(false);\n    this.confirmationService.confirm({\n      acceptLabel: this.translateService.instant('Delete'),\n      rejectLabel: this.translateService.instant('Cancel'),\n      message: this.deleteMessage(pid, type).join('<br>'),\n      header: this.translateService.instant('Confirmation'),\n      icon: 'pi pi-exclamation-triangle',\n      acceptIcon:\"none\",\n      rejectIcon:\"none\",\n      acceptButtonStyleClass: \"bg-red-500 border-red-500\",\n      rejectButtonStyleClass:\"p-button-text\",\n      accept: () => {\n        this.recordService.delete(type, pid).subscribe({\n          next: () => {\n            delete$.next(true);\n            this.messageService.add({\n              severity: 'info',\n              summary: this.translateService.instant('Confirmed'),\n              detail: this.translateService.instant('Record deleted.'),\n              life: CONFIG.MESSAGE_LIFE\n            });\n          },\n          error: (error: any)  => {\n            delete$.next(false);\n            this.messageService.add({\n              severity: 'error',\n              summary: this.translateService.instant('Error'),\n              detail: this.translateService.instant(error.title),\n              sticky: true,\n              closable: true\n            });\n          }\n        });\n      }\n    });\n\n    return delete$.asObservable();\n  }\n\n  /**\n   * Show dialog with the reason why record cannot be deleted.\n   * @param message Message to display\n   */\n  showDeleteMessage(message: string): void {\n    this.confirmationService.confirm({\n      acceptLabel: this.translateService.instant('OK'),\n      rejectVisible: false,\n      header: this.translateService.instant('Information'),\n      message: message,\n      acceptIcon:\"none\",\n    });\n  }\n\n  /**\n   * Get resource configuration for given type.\n   *\n   * @param type Current type to find\n   * @returns Object configuration for the current type\n   */\n  getResourceConfig(type: string): any {\n    if (this.types == null) {\n      throw new Error(`Configuration not found for type \"${type}\"`);\n    }\n    const index = this.types.findIndex(item => item.key === type);\n    if (index === -1) {\n      throw new Error(`Configuration not found for type \"${type}\"`);\n    }\n    return this.types[index];\n  }\n\n  /**\n   * Redirects after saving a resource\n   * @param pid - string, pid of the record\n   * @param record - object, record to save\n   * @param recordType - string, Type of resource\n   * @param action - string, http action: create or update\n   * @param route - ActivatedRoute: the current route used\n   */\n  redirectAfterSave(pid: string, record: any, recordType: string, action: string, route: ActivatedRoute) {\n    const config = this.getResourceConfig(recordType);\n    if (config.redirectUrl) {\n      config.redirectUrl(record, action).subscribe((result: string) => {\n        if (result !== null) {\n          this.router.navigateByUrl(result);\n          return;\n        }\n      });\n    } else {\n      // Default behavior\n      if (action === 'update') {\n        this.router.navigate(['../../detail', pid], {relativeTo: route, replaceUrl: true});\n        return;\n      }\n      this.router.navigate(['../detail', pid], {relativeTo: route, replaceUrl: true});\n    }\n  }\n\n  /**\n   * Personalized message for delete a record\n   * @param pid - record pid string\n   * @param type - Type of resource\n   * @returns  Observable array of string\n   */\n  deleteMessage(pid: string, type: string): string[] {\n    const defaultMessage = [\n      this.translateService.instant('Do you really want to delete this record?')\n    ];\n    try {\n      const config = this.getResourceConfig(type);\n      return (config.deleteMessage)\n        ? config.deleteMessage(pid)\n        : defaultMessage;\n    } catch {\n      return defaultMessage;\n    }\n  }\n\n  // ================================================================\n  //    Permissions\n  // ================================================================\n\n  /**\n   * Check if a record can be added\n   * @param type Type of resource\n   * @returns Observable resolving an object containing the result of a permission check.\n   */\n  canAddRecord$(type: string): Observable<ActionStatus> {\n    const config = this.getResourceConfig(type);\n    return (config.canAdd)\n      ? config.canAdd().pipe(first())\n      : of({ can: true, message: '' });\n  }\n\n  /**\n   * Check if a record can be updated\n   * @param record - object, record to check\n   * @param type Type of resource\n   * @returns Observable resolving an object containing the result of a permission check.\n   */\n  canUpdateRecord$(record: object, type: string): Observable<ActionStatus> {\n    const config = this.getResourceConfig(type);\n    // The canUpdate function takes precedence over permissions\n    if (config.canUpdate) {\n      return config.canUpdate(record).pipe(first());\n    }\n    if (config.permissions) {\n      const permissions = config.permissions(record);\n      return permissions.pipe(\n        map((perms: any) => {\n          if ('canUpdate' in perms) {\n            return perms.canUpdate;\n          } else {\n            return of({ can: true, message: '' });\n          }\n        })\n      );\n    }\n    return of({ can: true, message: '' });\n  }\n\n  /**\n   * Check if a record can be deleted\n   * @param record - object, record to check\n   * @param type Type of resource\n   * @returns Observable resolving an object containing the result of a permission check.\n   */\n  canDeleteRecord$(record: object, type: string): Observable<ActionStatus> {\n    const config = this.getResourceConfig(type);\n    // The canDelete function takes precedence over permissions\n    if (config.canDelete) {\n      return config.canDelete(record).pipe(first());\n    }\n    if (config.permissions) {\n      const permissions = config.permissions(record);\n      return permissions.pipe(\n        map((perms: any) => {\n          if ('canDelete' in perms) {\n            return perms.canDelete;\n          } else {\n            return of({ can: true, message: '' });\n          }\n        })\n      );\n    }\n    return of({ can: true, message: '' });\n  }\n\n  /**\n   * Check if a record can be read\n   * @param record - object, record to check\n   * @param type Type of resource\n   * @returns Observable resolving an object containing the result of a permission check.\n   */\n  canReadRecord$(record: object, type: string): Observable<ActionStatus> {\n    const config = this.getResourceConfig(type);\n    // The canRead function takes precedence over permissions\n    if (config.canRead) {\n      return config.canRead(record).pipe(first());\n    }\n    if (config.permissions) {\n      const permissions = config.permissions(record);\n      return permissions.pipe(\n        map((perms: any) => {\n          if ('canRead' in perms) {\n            return perms.canRead;\n          } else {\n            return of({ can: true, message: '' });\n          }\n        })\n      );\n    }\n    return of({ can: true, message: '' });\n  }\n\n  /**\n   * Check if a record can be used (mainly used for templates)\n   * @param record - object, record to check\n   * @param type Type of resource\n   * @returns Observable resolving an object containing the result of a permission check.\n   */\n   canUseRecord$(record: object, type: string): Observable<ActionStatus> {\n    const config = this.getResourceConfig(type);\n    // The canUse function takes precedence over permissions\n    if (config.canUse) {\n      return config.canUse(record).pipe(first());\n    }\n    if (config.permissions) {\n      const permissions = config.permissions(record);\n      if ('canUse' in permissions) {\n        return permissions.canUse;\n      }\n    }\n    return of({ can: false, message: '' });\n   }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Directive, inject, Input, ViewContainerRef } from '@angular/core';\n\n/**\n * Directive for displaying a record detail.\n */\n@Directive({\n    selector: '[ngCoreRecordDetail]',\n    standalone: false\n})\nexport class RecordDetailDirective {\n\n  viewContainerRef: ViewContainerRef = inject(ViewContainerRef);\n\n  /**\n   * Record to display\n   */\n  @Input() record: object = {};\n\n  /**\n   * Type of resource\n   */\n  @Input() type: string;\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Component, OnInit } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { DetailRecord } from './detail-record';\n\n/**\n * Component to display a record by dumping its data to JSON.\n */\n@Component({\n    template: `\n    @if (record) {\n      <h1>Record of type \"{{ type }}\" #{{ record.id }}</h1>\n      <pre>\n        <div style=\"white-space: pre-wrap;\">{{ record|json }}</div>\n      </pre>\n    }\n  `,\n    standalone: false\n})\nexport class JsonComponent implements DetailRecord, OnInit {\n  // Observable resolving record data\n  record$: Observable<any>;\n\n  // Resource type\n  type: string;\n\n  // Record data\n  record: any;\n\n  /**\n   * Component initialization.\n   *\n   * Subscribes to observable for getting the record.\n   */\n  ngOnInit(): void {\n    this.record$.subscribe((record) => {\n      this.record = record;\n    });\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2023 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Location } from '@angular/common';\nimport { Component, inject, Input, OnDestroy, OnInit, ViewChild, ViewContainerRef } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { TranslateService } from '@ngx-translate/core';\nimport { NgxSpinnerService } from 'ngx-spinner';\nimport { MessageService } from 'primeng/api';\nimport { catchError, isObservable, Observable, of, Subscription, tap } from 'rxjs';\nimport { Error } from '../../error/error';\nimport { ActionStatus } from '../action-status';\nimport { RecordUiService } from '../record-ui.service';\nimport { RecordService } from '../record.service';\nimport { IRecordEvent } from './detail-button/IRecordEvent.interface';\nimport { RecordDetailDirective } from './detail.directive';\nimport { JsonComponent } from './view/json.component';\n\n@Component({\n    selector: 'ng-core-record-detail',\n    templateUrl: './detail.component.html',\n    standalone: false\n})\nexport class DetailComponent implements OnInit, OnDestroy {\n\n  protected route: ActivatedRoute = inject(ActivatedRoute);\n  protected router: Router = inject(Router);\n  protected location: Location = inject(Location);\n  protected recordService: RecordService = inject(RecordService);\n  protected recordUiService: RecordUiService = inject(RecordUiService);\n  protected translate: TranslateService = inject(TranslateService);\n  protected spinner: NgxSpinnerService = inject(NgxSpinnerService);\n  protected messageService: MessageService = inject(MessageService);\n\n  protected viewContainerRef: ViewContainerRef = inject(ViewContainerRef);\n\n\n  /** View component for displaying record */\n  @Input() viewComponent: any = null;\n\n  /** Record can be used ? */\n  useStatus: ActionStatus = { can: false, message: '', url: '' };\n\n  /** Record can be updated ? */\n  updateStatus: ActionStatus = { can: false, message: '' };\n\n  /** Record can be deleted ? */\n  deleteStatus: ActionStatus = { can: false, message: '' };\n\n  /** Observable resolving record data */\n  record$: Observable<any> = null;\n\n  /** Record data */\n  record: any = null;\n\n  /** Error message */\n  error: Error;\n\n  /** Admin mode for CRUD operations */\n  adminMode: ActionStatus = { can: true, message: '' };\n\n  /** Type of record */\n  type: string;\n\n  /**Subscription to route parameters observables */\n  private routeParametersSubscription: Subscription;\n\n  /** Object type route config */\n  private config: any = null;\n\n  // Subscription to detail component view observable.\n  private detailComponentSubscription: Subscription;\n\n  /** Directive for displaying record */\n  @ViewChild(RecordDetailDirective, { static: true })\n  recordDetail: RecordDetailDirective;\n\n  /** On init hook */\n  ngOnInit() {\n    this.routeParametersSubscription = this.route.paramMap.subscribe(() => {\n      this.spinner.show();\n\n      this.loadViewComponentRef();\n\n      const pid = this.route.snapshot.paramMap.get('pid');\n      this.type = this.route.snapshot.paramMap.get('type');\n\n      this.recordUiService.types = this.route.snapshot.data.types;\n      this.config = this.recordUiService.getResourceConfig(this.type);\n\n      const type = this.config.index || this.config.key;\n      this.record$ = this.recordService.getRecord(type, pid, 1, this.config.itemHeaders || null).pipe(\n        catchError((error) => {\n          this.error = error;\n          this.spinner.hide();\n          return of(null);\n        }),\n        tap(record => {\n          this.record = record;\n          this.recordUiService.canReadRecord$(this.record, this.type).subscribe(result => {\n            if (result.can === false) {\n              this.messageService.add({\n                severity: 'error',\n                summary: this.translate.instant(this.type),\n                detail: this.translate.instant('You cannot read this record'),\n                sticky: true,\n                closable: true\n              })\n              this.location.back();\n            }\n          });\n          this.recordUiService.canDeleteRecord$(this.record, this.type).subscribe(result => {\n            this.deleteStatus = result;\n          });\n\n          this.recordUiService.canUpdateRecord$(this.record, this.type).subscribe(result => {\n            this.updateStatus = result;\n          });\n\n          this.recordUiService.canUseRecord$(this.record, this.type).subscribe(result => {\n            this.useStatus = result;\n          });\n\n          if (this.route.snapshot.data.adminMode) {\n            this.route.snapshot.data.adminMode().subscribe((am: ActionStatus) => this.adminMode = am);\n          }\n\n          this.spinner.hide();\n        })\n      );\n      this.loadRecordView();\n    });\n  }\n\n  /**\n   * Component destruction.\n   *\n   * Unsubscribes from the observables of the route parameters.\n   * Unsubscribes from the observable for detail view.\n   */\n  ngOnDestroy(): void {\n    this.routeParametersSubscription.unsubscribe();\n\n    if (this.detailComponentSubscription) {\n      this.detailComponentSubscription.unsubscribe();\n    }\n  }\n\n  /**\n   * Record event\n   * @param event - Record event message\n   */\n  recordEvent(event: IRecordEvent): void {\n    switch(event.action) {\n      case 'use':\n        this.router.navigateByUrl(event.url);\n      break;\n      case 'update':\n        this.router.navigate(\n          ['../../edit', event.record.id],\n          { relativeTo: this.route, replaceUrl: true }\n        );\n      break;\n      case 'delete':\n        this.deleteRecord(event.record);\n      break;\n      default:\n        throw new Error('Missing record event action.');\n    }\n  }\n\n  /**\n   * Getter giving the information if file management is enabled.\n   * @returns True if file management is enabled.\n   */\n  get filesEnabled(): boolean {\n    return this.config.files && this.config.files.enabled ? this.config.files.enabled : false;\n  }\n\n  /**\n   * Delete the record and go back to previous page.\n   * @param event - DOM event\n   * @param element - string (PID to remove) or object\n   */\n  deleteRecord(element: any) {\n    const pid = typeof element === 'object' ? element.id : element;\n    return this.recordUiService.deleteRecord(this.type, pid).subscribe((result: any) => {\n      if (result === true) {\n        let redirectUrl = '../..';\n        const navigateOptions = { relativeTo: this.route };\n        if (typeof element === 'object' && this.config.redirectUrl) {\n          this.config.redirectUrl(element, 'delete').subscribe((redirect: string) => {\n            if (redirect !== null) {\n              redirectUrl = redirect;\n            }\n            this.router.navigate([redirectUrl], navigateOptions);\n          });\n        }\n        this.router.navigate([redirectUrl], navigateOptions);\n      }\n    });\n  }\n\n  /**\n   * Show a modal containing message given in parameter.\n   * @param message - message to display into modal\n   */\n  showDeleteMessage(message: string): void {\n    this.recordUiService.showDeleteMessage(message);\n  }\n\n  /** Dynamically load component depending on selected resource type. */\n  private loadRecordView(): void {\n    this.viewContainerRef.clear();\n    const componentRef = this.viewContainerRef.createComponent(this.viewComponent || JsonComponent);\n    (componentRef.instance as JsonComponent).record$ = this.record$;\n    (componentRef.instance as JsonComponent).type = this.route.snapshot.paramMap.get('type');\n  }\n\n  /** Load component view corresponding to type */\n  private loadViewComponentRef() {\n    if (!this.route.snapshot.data.types || this.route.snapshot.data.types.length === 0) {\n      throw new Error('Configuration types not passed to component');\n    }\n\n    const type = this.route.snapshot.paramMap.get('type');\n    const { types } = this.route.snapshot.data;\n    const index = types.findIndex((item: any) => item.key === type);\n\n    if (index === -1) {\n      throw new Error(`Configuration not found for type \"${type}\"`);\n    }\n\n    if (types[index].detailComponent) {\n      let detailComponent$ = types[index].detailComponent;\n\n      if (isObservable(detailComponent$) === false) {\n        detailComponent$ = of(detailComponent$);\n      }\n\n      this.detailComponentSubscription = detailComponent$.subscribe(\n        (component: any) => {\n          this.viewComponent = component;\n        }\n      );\n    }\n  }\n}\n","<!--\n  RERO angular core\n  Copyright (C) 2020-2024 RERO\n\n  This program is free software: you can redistribute it and/or modify\n  it under the terms of the GNU Affero General Public License as published by\n  the Free Software Foundation, version 3 of the License.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU Affero General Public License for more details.\n\n  You should have received a copy of the GNU Affero General Public License\n  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n-->\n<div>\n  @if (record) {\n    <ng-core-detail-button\n      [record]=\"record\"\n      [type]=\"type\"\n      [adminMode]=\"adminMode\"\n      [useStatus]=\"useStatus\"\n      [updateStatus]=\"updateStatus\"\n      [deleteStatus]=\"deleteStatus\"\n      (recordEvent)=\"recordEvent($event)\"\n      (deleteMessageEvent)=\"showDeleteMessage($event)\"\n    />\n  }\n  @if (error) {\n    <ng-core-error [error]=\"error\"/>\n  }\n  <ng-template ngCoreRecordDetail/>\n</div>\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Injectable } from '@angular/core';\nimport { RouteInterface } from './route-interface';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class RouteCollectionService {\n\n  /**\n   * Collection of routes\n   */\n  private collection = new Map();\n\n  /**\n   * Add route on collection\n   * @param route - RouteInterface\n   * @return this - RouteCollectionService\n   */\n  addRoute(route: RouteInterface): RouteCollectionService {\n    const routeName = route.name;\n    if (!this.hasRoute(routeName)) {\n      this.collection.set(routeName, route);\n    }\n    return this;\n  }\n\n  /**\n   * Delete route on collection\n   * @param name - string\n   * @return boolean\n   */\n  deleteRoute(name: string): boolean {\n    if (this.hasRoute(name)) {\n      this.collection.delete(name);\n      return true;\n    }\n    return false;\n  }\n\n  /**\n   * Check if route is present to the collection\n   * @param name - string\n   * @return boolean\n   */\n  hasRoute(name: string): boolean {\n    return this.collection.has(name);\n  }\n\n  /**\n   * Get route by name\n   * @param name - string\n   * @return mixed - RouteInterface | null\n   */\n  getRoute(name: string): RouteInterface | null {\n    if (this.hasRoute(name)) {\n      return this.collection.get(name);\n    }\n    return null;\n  }\n\n  /**\n   * Get All routes\n   * @return routes separated by comma\n   */\n  getRoutes() {\n    const routes = [];\n    for (const value of this.collection.values()) {\n      routes.push(value.getConfiguration());\n    }\n    return routes;\n  }\n\n  /**\n   * Return a array of route name\n   * @return array\n   */\n  availableRoutesName() {\n    const routesName = [];\n    for (const route of this.collection.keys()) {\n      routesName.push(route);\n    }\n    return routesName;\n  }\n\n  /**\n   * Count available routes\n   * @return number;\n   */\n  size() {\n    return this.collection.size;\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2022 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Injectable } from '@angular/core';\nimport { ILogger } from '../ILogger';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class LoggerService implements ILogger {\n\n  info(data: any, message?: any): void {\n    console.log(message, data);\n  }\n  warning(data: any, message?: any): void {\n    console.warn(message, data);\n  }\n  error(data: any, message?: any): void {\n    console.error(message, data);\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Injectable, inject } from '@angular/core';\nimport { UntypedFormControl } from '@angular/forms';\nimport { FormlyFieldConfig } from '@ngx-formly/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { map } from 'rxjs';\nimport { ApiService } from '../../../api/api.service';\nimport { Record } from '../../record';\nimport { RecordService } from '../../record.service';\nimport { JSONSchema7 } from '../editor.component';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class JSONSchemaService {\n\n  protected translateService: TranslateService = inject(TranslateService);\n  protected recordService: RecordService = inject(RecordService);\n  protected apiService: ApiService = inject(ApiService);\n\n  // list of custom validators\n  private customValidators = [\n    'valueAlreadyExists',\n    'uniqueValueKeysInObject',\n    'numberOfSpecificValuesInObject',\n    'dateMustBeGreaterThan',\n    'dateMustBeLessThan'\n  ];\n\n  processField(field: FormlyFieldConfig, jsonSchema: JSONSchema7) {\n    // initial population of arrays with a minItems constraints\n    if (field.type === 'array' && jsonSchema.minItems && !jsonSchema.hasOwnProperty('default')) {\n      field.defaultValue = new Array(jsonSchema.minItems);\n    }\n    // If 'format' is defined into the jsonSchema, use it as props to try a validation on this field.\n    // See: `email.validator.ts` file\n    if (jsonSchema.format) {\n      field.props.type = jsonSchema.format;\n    }\n\n    if (jsonSchema?.widget?.formlyConfig) {\n      const { props } = jsonSchema.widget.formlyConfig;\n\n      if (props) {\n        this.setSimpleOptions(field, props);\n        this.setValidation(field, props);\n        this.setRemoteSelectOptions(field, props);\n      }\n    }\n\n    return field;\n  }\n\n   /**\n   * Populate a select options with a remote API call.\n   * @param field formly field config\n   * @param formOptions JSONSchema object\n   */\n  protected setRemoteSelectOptions(\n    field: FormlyFieldConfig,\n    formOptions: any\n  ): void {\n    if (formOptions.remoteOptions && formOptions.remoteOptions.type) {\n      field.type = 'select';\n      field.hooks = {\n        ...field.hooks,\n        afterContentInit: (f: FormlyFieldConfig) => {\n          const recordType = formOptions.remoteOptions.type;\n          const query = formOptions.remoteOptions.query || '';\n          f.props.options = this.recordService\n            .getRecords(recordType, query, 1, RecordService.MAX_REST_RESULTS_SIZE)\n            .pipe(\n              map((data: Record) =>\n                data.hits.hits.map((record: any) => {\n                  return {\n                    label: formOptions.remoteOptions.labelField && formOptions.remoteOptions.labelField in record.metadata\n                      ? record.metadata[formOptions.remoteOptions.labelField]\n                      : record.metadata.name,\n                    value: this.apiService.getRefEndpoint(\n                      recordType,\n                      record.id\n                    )\n                  };\n                })\n              )\n            );\n        }\n      };\n    }\n  }\n\n  /**\n   *\n   * @param field formly field config\n   * @param formOptions JSONSchema object\n   */\n  protected setValidation(field: FormlyFieldConfig, formOptions: any): void {\n    if (formOptions.validation) {\n      // custom validation messages\n      // TODO: use widget instead\n      const { messages } = formOptions.validation;\n      if (messages) {\n        if (!field.validation) {\n          field.validation = {};\n        }\n        if (!field.validation.messages) {\n          field.validation.messages = {};\n        }\n        for (const key of Object.keys(messages)) {\n          const msg = messages[key];\n          // add support of key with or without Message suffix (required == requiredMessage),\n          // this is useful for backend translation extraction\n          field.validation.messages[key.replace(/Message$/, '')] = (error, f: FormlyFieldConfig) =>\n            // translate the validation messages coming from the JSONSchema\n            // TODO: need to remove `as any` once it is fixed in ngx-formly v.5.7.2\n            this.translateService.stream(msg) as any;\n        }\n      }\n\n      // store the custom validators config\n      field.props.customValidators = {};\n      if (formOptions.validation && formOptions.validation.validators) {\n        for (const customValidator of this.customValidators) {\n          const validatorConfig = formOptions.validation.validators[customValidator];\n          if (validatorConfig != null) {\n            field.props.customValidators[customValidator] = validatorConfig;\n          }\n        }\n      }\n\n      if (formOptions.validation.validators) {\n        // validators: add validator with expressions\n        // TODO: use widget\n        const validatorsKey = Object.keys(formOptions.validation.validators);\n        validatorsKey.map(validatorKey => {\n          const validator = formOptions.validation.validators[validatorKey];\n          if ('expression' in validator && 'message' in validator) {\n            const { expression } = validator;\n            const expressionFn = Function('formControl', `return ${expression};`);\n            const validatorExpression = {\n              expression: (fc: UntypedFormControl) => expressionFn(fc),\n              // translate the validation message coming form the JSONSchema\n              message: this.translateService.stream(validator.message)\n            };\n            field.validators = field.validators !== undefined ? field.validators : {};\n            field.validators[validatorKey] = validatorExpression;\n          }\n        });\n      }\n    }\n  }\n\n  /**\n   * Convert JSONSchema form options to formly field options.\n   * @param field formly field config\n   * @param formOptions JSONSchema object\n   */\n  protected setSimpleOptions(field: FormlyFieldConfig, formOptions: any): void {\n    // some fields should not submit the form when enter key is pressed\n    if (field.props.doNotSubmitOnEnter != null) {\n      field.props.keydown = (f: FormlyFieldConfig, event?: any) => {\n        if (event.key === 'Enter') {\n          event.preventDefault();\n        }\n      };\n    }\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { inject, Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { Record } from '../../record';\nimport { RecordService } from '../../record.service';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class TemplatesService {\n\n  protected recordService: RecordService = inject(RecordService);\n\n  /**\n   * Get all templates corresponding to a resource type\n   * @param templateResourceType - string: the resource name where to find templates\n   * @param resourceType - string: the resource type\n   * @return an observable of template record\n   */\n  getTemplates(templateResourceType: string, resourceType?: string): Observable<any> {\n    const query = (resourceType !== undefined)\n      ? `template_type:${resourceType}`\n      : '';\n    return this.recordService.getRecords(templateResourceType, query, 1, RecordService.MAX_REST_RESULTS_SIZE).pipe(\n        map((data: Record) => data.hits),\n        map(hits => hits.total === 0 ? [] : hits.hits),\n        map(hits => hits.map( hit => hit.metadata))\n    );\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2025 RERO\n * Copyright (C) 2020-2023 UCLouvain\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Component, inject, OnInit } from '@angular/core';\nimport { UntypedFormGroup } from '@angular/forms';\nimport { Router } from '@angular/router';\nimport { FormlyFieldConfig } from '@ngx-formly/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { MessageService } from 'primeng/api';\nimport { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';\nimport { RecordService } from '../../../record.service';\nimport { TemplatesService } from '../../services/templates.service';\n\n@Component({\n    selector: 'ng-core-load-template-form',\n    templateUrl: './load-template-form.component.html',\n    standalone: false\n})\nexport class LoadTemplateFormComponent implements OnInit {\n\n  protected dynamicDialogRef: DynamicDialogRef = inject(DynamicDialogRef);\n  protected dynamicDialogConfig: DynamicDialogConfig = inject(DynamicDialogConfig);\n  protected recordService: RecordService = inject(RecordService);\n  protected templateService: TemplatesService = inject(TemplatesService);\n  protected translateService: TranslateService = inject(TranslateService);\n  protected router: Router = inject(Router);\n  protected messageService: MessageService = inject(MessageService);\n\n  /** form group */\n  form: UntypedFormGroup = new UntypedFormGroup({});\n\n  /** fields config of the form */\n  formFields: FormlyFieldConfig[] = [];\n\n  /** model of the form */\n  model: FormModel;\n\n  isDataFormLoaded = false;\n\n  isVisible: boolean = true;\n\n  ngOnInit() {\n    const { data } = this.dynamicDialogConfig;\n\n    this.formFields.push({\n      key: 'template',\n      type: 'select',\n      props: {\n        appendTo: 'body',\n        required: true,\n        group: true,\n        options: [],\n        attributes: {\n          size: 10\n        }\n      }\n    });\n\n    this.templateService.getTemplates(data.templateResourceType, data.resourceType)\n      .subscribe((templates) => {\n        const items = [];\n        templates.map((hit: any) => {\n          let element = items.find((item) => item.untranslatedLabel === hit.visibility);\n          if (!element) {\n            element = {\n              label: hit.visibility === 'public'\n                ? this.translateService.instant('Public templates')\n                : this.translateService.instant('My private templates'),\n              untranslatedLabel: hit.visibility,\n              items: []\n            };\n            items.push(element);\n          }\n          element.items.push({\n            label: hit.name,\n            value: hit.pid\n          });\n        });\n        this.formFields[0].props.options = items;\n        this.isDataFormLoaded = true;\n      });\n  }\n\n  /**\n   * Submit form hook.\n   * Redirect to the same editor form url with query params related to the selected template.\n   */\n  onSubmitForm() {\n    const formValues = this.form.value;\n    this.recordService.getRecord('templates', formValues.template).subscribe({\n        next: (template) => {\n          this.router.navigate([], {\n            queryParams: {\n              source: 'templates',\n              pid: template.id\n            },\n            queryParamsHandling: 'merge',\n            skipLocationChange: true\n          });\n          this.closeDialog();\n        },\n        error: (error) => {\n          this.messageService.add({\n            severity: 'error',\n            summary: this.translateService.instant('Error'),\n            detail: error.message,\n            sticky: true,\n            closable: true\n          });\n        }\n    });\n  }\n\n  closeDialog(): void {\n    this.dynamicDialogRef.close();\n  }\n}\n\n/**\n * Interface to define fields on form\n */\ninterface FormModel {\n  template?: string;\n}\n","<!--\n  RERO angular core\n  Copyright (C) 2020-2024 RERO\n  Copyright (C) 2020 UCLouvain\n\n  This program is free software: you can redistribute it and/or modify\n  it under the terms of the GNU Affero General Public License as published by\n  the Free Software Foundation, version 3 of the License.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU Affero General Public License for more details.\n\n  You should have received a copy of the GNU Affero General Public License\n  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n-->\n@if (isDataFormLoaded) {\n  <form [formGroup]=\"form\" (ngSubmit)=\"onSubmitForm()\">\n    <p-message severity=\"warn\">\n        <div class=\"core:w-full\">\n          <h4 class=\"text-error\" translate>Warning!</h4>\n          <p class=\"core:mt-1\" translate>\n            Loading a template will reload the current form. All values previously encoded will be lost.\n          </p>\n        </div>\n    </p-message>\n\n    <div class=\"core:my-1 core:font-bold\" translate>Select a template</div>\n    <formly-form [form]=\"form\" [fields]=\"formFields\" [model]=\"model\" />\n    <div class=\"core:flex core:justify-end core:gap-2 core:mt-2\">\n      <p-button [label]=\"'Cancel'|translate\" [outlined]=\"true\" severity=\"danger\" (onClick)=\"closeDialog()\" />\n      <p-button type=\"submit\" [label]=\"'Load'|translate\"  [disabled]=\"this.form.status !== 'VALID'\" />\n    </div>\n  </form>\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n * Copyright (C) 2020-2023 UCLouvain\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Component, inject, OnInit } from '@angular/core';\nimport { UntypedFormGroup } from '@angular/forms';\nimport { FormlyFieldConfig } from '@ngx-formly/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { DynamicDialogRef } from 'primeng/dynamicdialog';\n\n@Component({\n    selector: 'ng-core-save-template-form',\n    templateUrl: './save-template-form.component.html',\n    standalone: false\n})\nexport class SaveTemplateFormComponent implements OnInit {\n\n  protected dynamicDialogRef: DynamicDialogRef = inject(DynamicDialogRef);\n  protected translateService: TranslateService = inject(TranslateService);\n\n  /** form group */\n  form: UntypedFormGroup = new UntypedFormGroup({});\n\n  /** fields config of the form */\n  formFields: FormlyFieldConfig[] = [];\n\n  /** model of the form */\n  model: FormModel;\n\n  ngOnInit() {\n    this.formFields.push({\n      key: 'name',\n      type: 'string',\n      props: {\n        required: true,\n        placeholder: this.translateService.instant('Choose a name for your template'),\n        minLength: 3,\n      }\n    });\n  }\n\n  /**\n   * Submit the form\n   */\n  onSubmitForm() {\n    this.closeDialog(this.form.value);\n  }\n\n  /**\n   * Close the modal dialog box\n   */\n  closeDialog(data?: FormModel) {\n    this.dynamicDialogRef.close(data);\n  }\n}\n\n/**\n * Interface to define fields on form\n */\ninterface FormModel {\n  name: string;\n}\n","<!--\n  RERO angular core\n  Copyright (C) 2020-2024 RERO\n  Copyright (C) 2020 UCLouvain\n\n  This program is free software: you can redistribute it and/or modify\n  it under the terms of the GNU Affero General Public License as published by\n  the Free Software Foundation, version 3 of the License.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU Affero General Public License for more details.\n\n  You should have received a copy of the GNU Affero General Public License\n  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n-->\n\n<form class=\"core:w-full\" [formGroup]=\"form\" (ngSubmit)=\"onSubmitForm()\">\n    <formly-form class=\"core:w-full\" [form]=\"form\" [fields]=\"formFields\" [model]=\"model\"/>\n    <div class=\"core:flex core:justify-end core:gap-1 core:mt-2\">\n      <p-button [label]=\"'Cancel'|translate\" [outlined]=\"true\" severity=\"danger\" (onClick)=\"closeDialog()\" />\n      <p-button type=\"submit\" [label]=\"'Save'|translate\" [disabled]=\"this.form.status !== 'VALID'\" />\n    </div>\n</form>\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Component, ElementRef, inject, Input, OnDestroy, OnInit, ViewChild } from '@angular/core';\nimport { FormlyFieldConfig } from '@ngx-formly/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { AutoComplete, AutoCompleteCompleteEvent, AutoCompleteSelectEvent } from 'primeng/autocomplete';\nimport { SelectChangeEvent } from 'primeng/select';\nimport { Observable, Subscription } from 'rxjs';\nimport { map, tap } from 'rxjs/operators';\n\n/**\n * For big editor add the possibility to display\n */\n@Component({\n    selector: 'ng-core-editor-add-field-editor',\n    templateUrl: './add-field-editor.component.html',\n    standalone: false\n})\nexport class AddFieldEditorComponent implements OnInit, OnDestroy {\n\n  protected translateService: TranslateService = inject(TranslateService);\n\n  /** EditorComponent function */\n  @Input() editorComponent: any;\n\n  searchValue: string | undefined;\n\n  items: any[] = [];\n\n  suggestions: any[] | undefined;\n\n  /** Instance of EditorComponent */\n  private editorComponentInstance: any;\n\n  // Subscriptions to observables.\n  private subscriptions: Subscription = new Subscription();\n\n  essentialsOptions = [];\n\n  @ViewChild(\"addField\") autocomplete: AutoComplete;\n\n  onAddField(event: SelectChangeEvent): void {\n    this.editorComponentInstance.setHide(event.value, false);\n  }\n\n  /** onInit hook */\n  ngOnInit() {\n    this.editorComponentInstance = (this.editorComponent)();\n\n    this.subscriptions.add(this.editorComponentInstance.hiddenFields$.pipe(\n      map((fields: any[]) => fields.sort(\n        (field1, field2) => field1.props.label.localeCompare(field2.props.label)\n      )),\n      tap((fields: any[]) => this.items = fields),\n      tap((fields: any[]) => {\n        this.essentialsOptions = fields\n          .filter(f => this.isFieldEssential(f))\n          .map((field: any) => {\n            return { label: this.translateService.stream(field.props.untranslatedLabel), value: field }\n          });\n\n      })\n    ).subscribe());\n  }\n\n  /** onDestroy hook */\n  ngOnDestroy(): void {\n      this.subscriptions.unsubscribe();\n  }\n\n  search(event: AutoCompleteCompleteEvent): void {\n    this.suggestions = this.items.filter((item: any) =>\n      item.props.label.toLowerCase().indexOf(event.query.toLowerCase()) === 0\n    );\n  }\n\n  onSelect(event: AutoCompleteSelectEvent): void {\n    this.editorComponentInstance.setHide(event.value, false);\n    this.autocomplete.clear();\n  }\n\n  /**\n   * Translate the label of a given formly field.\n   *\n   * @param field ngx-formly field\n   * @return the translated string\n   */\n  translateLabel(field: FormlyFieldConfig): Observable<string | any> {\n    return this.translateService.stream(field.props.untranslatedLabel);\n  }\n\n  /**\n   * Filter fields to display only essential ones\n   * @param field - field to check\n   */\n  isFieldEssential(field: FormlyFieldConfig) {\n    return field.props.navigation && field.props.navigation.essential === true;\n  }\n}\n","<!--\n  RERO angular core\n  Copyright (C) 2020-2025 RERO\n\n  This program is free software: you can redistribute it and/or modify\n  it under the terms of the GNU Affero General Public License as published by\n  the Free Software Foundation, version 3 of the License.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU Affero General Public License for more details.\n\n  You should have received a copy of the GNU Affero General Public License\n  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n-->\n  <div>\n    <p-autoComplete\n      [dropdown]=\"true\"\n      #addField\n      optionLabel=\"props.label\"\n      [placeholder]=\"'Add field' | translate\"\n      styleClass=\"core:mb-2 core:w-full\"\n      [suggestions]=\"suggestions\"\n      (completeMethod)=\"search($event)\"\n      (onSelect)=\"onSelect($event)\"\n      [disabled]=\"items.length < 1\"\n      scrollHeight=\"400px\"\n      appendTo=\"body\"\n    />\n  </div>\n\n@if(essentialsOptions?.length > 0) {\n  <p-listbox\n    [options]=\"essentialsOptions\"\n    scrollHeight=\"\"\n    styleClass=\"core:mt-2\"\n    (onChange)=\"onAddField($event)\"\n  >\n    <ng-template #item let-item>\n      {{ item.label | async }}\n    </ng-template>\n  </p-listbox>\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2025 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Location } from '@angular/common';\nimport { Component, EventEmitter, inject, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges } from '@angular/core';\nimport { UntypedFormGroup } from '@angular/forms';\nimport { ActivatedRoute } from '@angular/router';\nimport { FormlyFieldConfig, FormlyFormOptions } from '@ngx-formly/core';\nimport { FormlyJsonschema } from '@ngx-formly/core/json-schema';\nimport { TranslateService } from '@ngx-translate/core';\nimport { JSONSchema7 as JSONSchema7Base } from 'json-schema';\nimport { cloneDeep } from 'lodash-es';\nimport { MessageService } from 'primeng/api';\nimport { DialogService, DynamicDialogRef } from 'primeng/dynamicdialog';\nimport { BehaviorSubject, combineLatest, Observable, of, Subscription, throwError } from 'rxjs';\nimport { catchError, debounceTime, finalize, map, switchMap } from 'rxjs/operators';\nimport { ApiService } from '../../api/api.service';\nimport { AbstractCanDeactivateComponent } from '../../component/abstract-can-deactivate.component';\nimport { Error } from '../../error/error';\nimport { RouteCollectionService } from '../../route/route-collection.service';\nimport { LoggerService } from '../../service/logger.service';\nimport { CONFIG } from '../../utils/config';\nimport { RecordUiService } from '../record-ui.service';\nimport { RecordService } from '../record.service';\nimport { JSONSchemaService } from './services/jsonschema.service';\nimport { processJsonSchema, removeEmptyValues, resolve$ref } from './utils';\nimport { LoadTemplateFormComponent } from './widgets/load-template-form/load-template-form.component';\nimport { SaveTemplateFormComponent } from './widgets/save-template-form/save-template-form.component';\n\nexport interface JSONSchema7 extends JSONSchema7Base {\n  widget: any;\n}\n\n@Component({\n    selector: 'ng-core-editor',\n    templateUrl: './editor.component.html',\n    standalone: false\n})\nexport class EditorComponent extends AbstractCanDeactivateComponent implements OnInit, OnChanges, OnDestroy {\n\n  protected formlyJsonschema: FormlyJsonschema = inject(FormlyJsonschema);\n  protected recordService: RecordService = inject(RecordService);\n  protected apiService: ApiService = inject(ApiService);\n  protected route: ActivatedRoute = inject(ActivatedRoute);\n  protected recordUiService: RecordUiService = inject(RecordUiService);\n  protected translateService: TranslateService = inject(TranslateService);\n  protected location: Location = inject(Location);\n  protected routeCollectionService: RouteCollectionService = inject(RouteCollectionService);\n  protected loggerService: LoggerService = inject(LoggerService);\n  protected jsonschemaService: JSONSchemaService = inject(JSONSchemaService);\n  protected dialogService: DialogService = inject(DialogService);\n  protected messageService: MessageService = inject(MessageService);\n\n  // form initial values\n  @Input() model: any = null;\n\n  // initial values changes notification\n  @Output() modelChange = new EventEmitter<any>();\n\n  // editor loading state notifications\n  @Output() loadingChange = new EventEmitter<boolean>();\n\n  // editor can deactivate change notification\n  @Output() canDeactivateChange = new EventEmitter<boolean>();\n\n  // Resource title\n  title?: string;\n\n  // Resource description\n  description?: string;\n\n  // Can Deactivate\n  canDeactivate: boolean = false;\n\n  // angular formGroup root\n  form: UntypedFormGroup;\n\n  // additional form options\n  options: FormlyFormOptions;\n\n  // form configuration\n  fields: FormlyFieldConfig[];\n\n  // root element of the editor\n  rootField: FormlyFieldConfig;\n\n  // list of fields to display in the TOC\n  tocFields$: Observable<any>;\n\n  // JSONSchema\n  @Input() schema: any;\n\n  // editor settings\n  @Input()\n  editorSettings = {\n    longMode: false,  // editor long mode\n    template: {\n      recordType: undefined,    // the resource considerate as template\n      loadFromTemplate: false,  // enable load from template button\n      saveAsTemplate: false     // allow to save the record as a template\n    }\n  };\n\n  // store pid on edit mode\n  @Input() pid = null;\n\n  // save alternatives\n  saveAlternatives: { label: string, command: any }[] = [];\n\n  // current record type from the url\n  recordType = null;\n\n  // If an error occurred, it is stored, to display in interface.\n  error: Error;\n\n  /** Disables the save button during the action */\n  isSaveButtonDisabled = false;\n\n  // subscribers\n  private _subscribers: Subscription = new Subscription();\n\n  // Config for resource\n  private _resourceConfig: any;\n\n  // list of fields to be hidden\n  private _hiddenFields: FormlyFieldConfig[] = [];\n\n  // Observable of hidden fields\n  private _hiddenFieldsSubject: BehaviorSubject<FormlyFieldConfig[]> = new BehaviorSubject([]);\n\n  // Dialog Ref\n  ref: DynamicDialogRef | undefined;\n\n  // current list of hidden fields\n  public get hiddenFields$(): Observable<any[]> {\n    return this._hiddenFieldsSubject.asObservable();\n  }\n\n  // Editor long mode\n  public get longMode(): boolean {\n    return this.editorSettings.longMode;\n  }\n\n  // Editor function\n  public get editorComponent(): () => EditorComponent {\n    return () => this;\n  }\n\n  /** Constructor */\n  constructor() {\n    super();\n    this.form = new UntypedFormGroup({});\n  }\n\n  /**\n   * Component has changed\n   * Called before ngOnInit() and whenever one of the input properties change.\n   * @param changes: the changed properties\n   */\n  ngOnChanges(changes: SimpleChanges): void {\n    if (changes.model && !changes.model.isFirstChange()) { // Model has changed\n      this._setModel(changes.model.currentValue);\n      // needed to select the right value for existing data in the multi select\n      // components such as oneOf\n      if (this.schema) {\n        this.setSchema(this.schema);\n      }\n    }\n    if (changes.schema && changes.schema.isFirstChange()) { // Schema has changed\n      this.setSchema(changes.schema.currentValue);\n    }\n    if (changes.pid) { // Assign pid on schema. Reload schema\n      this.pid = changes.pid.currentValue;\n      if (this.schema) {\n        this.setSchema(this.schema);\n      }\n    }\n  }\n\n  /** onInit hook */\n  ngOnInit(): void {\n    this.tocFields$ = this.hiddenFields$.pipe(\n      debounceTime(300),\n      switchMap(() => {\n        if (this.fields && this.fields.length > 0) {\n          return of(\n            this.fields[0].fieldGroup.filter(f => {\n              // hidden properties should not be in the navigation\n              if (f.hide === true) {\n                return false;\n              }\n              // properties with hide wrapper should not be in the navigation\n              if (f.props.alwaysHidden) {\n                return false;\n              }\n              return true;\n            }));\n        }\n        return of([]);\n      })\n    );\n    combineLatest([this.route.params, this.route.queryParams]).subscribe(\n      ([params, queryParams]) => {\n        // uncomment for debug\n        // this.form.valueChanges.subscribe(v =>\n        //   console.log('model', this.model, 'v', v, 'form', this.form, 'field', this.fields)\n        // );\n        this.loadingChange.emit(true);\n        if (!params.type) {\n          this.model = {};\n          this.schema = {};\n          return;\n        }\n        this.recordType = params.type;\n        this.recordUiService.types = this.route.snapshot.data.types;\n\n        this._resourceConfig = this.recordUiService.getResourceConfig(\n          this.recordType\n        );\n        if (this._resourceConfig.editorSettings) {\n          this.editorSettings = { ...cloneDeep(this.editorSettings), ...this._resourceConfig.editorSettings };\n        }\n\n        // load template resource configuration if needed\n        //   If editor allowed to use a resource as a template, we need to load the configuration\n        //   of this resource and save it into `recordUIService.types` to use it when loading and saving\n        if (this.editorSettings.template.recordType !== undefined) {\n          const tmplResource = this.routeCollectionService.getRoute(this.editorSettings.template.recordType);\n          const tmplConfiguration = tmplResource.getConfiguration();\n          if (tmplConfiguration.hasOwnProperty('data')\n            && tmplConfiguration.data.hasOwnProperty('types')) {\n            this.recordUiService.types = this.recordUiService.types.concat(tmplConfiguration.data.types);\n          }\n        }\n\n        // saveAlternatives construction\n        //   Depending of editor configuration, it's possible to provide some alternatives save\n        //   methods. Each method must defined a label and a callback function used when user choose\n        //   this save method.\n        this.saveAlternatives = [];\n        if (this.editorSettings.template.saveAsTemplate) {\n          this.saveAlternatives.push({\n            label: this.translateService.instant('Save as template') + '…',\n            command: () => this.saveAsTemplate()\n          });\n        }\n\n        this.pid = params.pid;\n        const schema$: Observable<any> = this.recordService.getSchemaForm(this.recordType);\n        let record$: Observable<any> = of({ record: {}, result: null });\n        // load from template\n        //   If the url contains query arguments 'source' and 'pid' and 'source'=='templates'\n        //   then we need to use the data from this template as data source to fill the form.\n        if (queryParams.source === 'templates' && queryParams.pid != null) {\n          record$ = this.recordService.getRecord('templates', queryParams.pid).pipe(\n            map((record: any) => {\n              this.messageService.add({\n                severity: 'success',\n                summary: this.translateService.instant('Template'),\n                detail: this.translateService.instant('Template loaded'),\n                life: CONFIG.MESSAGE_LIFE\n              });\n              return {\n                result: true,\n                record: record.metadata.data\n              };\n            })\n          );\n          // load data from existing document\n          //   If the parsed url contains a 'pid' value, then user try to edit a record. Then\n          //   we need to load this record and use it as data source to fill the form.\n        } else if (this.pid) {\n          record$ = this.recordService\n            .getRecord(this.recordType, this.pid)\n            .pipe(\n              switchMap((record: any) => {\n                return this.recordUiService.canUpdateRecord$(record, this.recordType).pipe(\n                  map((result) => {\n                    return {\n                      result,\n                      record: record.metadata\n                    };\n                  })\n                );\n              })\n            );\n        }\n\n        combineLatest([schema$, record$]).subscribe({\n          next: ([schemaform, data]) => {\n            // Set schema\n            this.setSchema(\n              this._resourceConfig.recordResource\n                ? schemaform.schema.properties.metadata\n                : schemaform.schema\n            );\n\n            // Check permissions and set record\n            if (data.result && data.result.can === false) {\n              this.messageService.add({\n                severity: 'error',\n                summary: this.translateService.instant(this.recordType),\n                detail: this.translateService.instant('You cannot update this record'),\n                sticky: true,\n                closable: true\n              });\n              this.location.back();\n            } else {\n              this._setModel(data.record);\n            }\n            this.loadingChange.emit(false);\n          },\n          error: (error) => {\n            this.error = error;\n            this.loadingChange.emit(false);\n          }\n          }\n        );\n      }\n    );\n  }\n\n  /** onDestroy hook */\n  ngOnDestroy(): void {\n    this._subscribers.unsubscribe();\n  }\n\n  /**\n   * Set the model\n   * @param model: The data to use as new model\n   */\n  private _setModel(model: any): void {\n    if (this._resourceConfig != null) {\n      // the parent don't know that we are editing a record\n\n      // /!\\ This will probably not work anymore with resources managed by\n      // invenio-records-resources, a fix will be necessary to make it work\n      // with both systems.\n      if (\n        !this._resourceConfig.recordResource &&\n        this.pid != null &&\n        (this.model == null || this.model.pid == null)\n      ) {\n        model.pid = this.pid;\n      }\n      // preprocess the model before sending to formly\n      this.model = this.preprocessRecord(model);\n      this.modelChanged(this.model);\n    }\n  }\n\n  /**\n   * Emit value when model is changed.\n   * @param modelValue Model.\n   */\n  modelChanged(modelValue: any): void {\n    this.modelChange.emit(removeEmptyValues(modelValue));\n  }\n\n  /**\n   * Preprocess the record before passing it to the editor\n   * @param record - Record object to preprocess\n   */\n  private preprocessRecord(record: any): any {\n    const config = this.recordUiService.getResourceConfig(this.recordType);\n\n    if (config.preprocessRecordEditor) {\n      return config.preprocessRecordEditor(record);\n    }\n    return record;\n  }\n\n  /**\n   * Postprocess the record before save\n   * @param record - Record object to postprocess\n   */\n  private postprocessRecord(record: any): any {\n    const config = this.recordUiService.getResourceConfig(this.recordType);\n\n    if (config.postprocessRecordEditor) {\n      return config.postprocessRecordEditor(record);\n    }\n    return record;\n  }\n\n  /**\n   * Pre Create Record\n   * @param record - Record object\n   */\n  private preCreateRecord(record: any): any {\n    const config = this.recordUiService.getResourceConfig(this.recordType);\n\n    if (config.preCreateRecord) {\n      return config.preCreateRecord(record);\n    }\n    return record;\n  }\n\n  /**\n   * Pre Update Record\n   * @param record - Record object\n   */\n  private preUpdateRecord(record: any): any {\n    const config = this.recordUiService.getResourceConfig(this.recordType);\n\n    if (config.preUpdateRecord) {\n      return config.preUpdateRecord(record);\n    }\n    return record;\n  }\n\n  /**\n   * Preprocess the record before passing it to the editor\n   * @param schema - object, JSONSchema\n   */\n  setSchema(schema: any): void {\n    // reorder all object properties\n    this.schema = processJsonSchema(resolve$ref(schema, schema.properties));\n    this.options = {};\n\n    // remove hidden field list in case of a previous setSchema call\n    this.clearHiddenFields();\n\n    // form configuration\n    const editorConfig = {\n      pid: this.pid,\n      longMode: this.longMode,\n      recordType: this.recordType\n    }\n    const fields = [\n      this.formlyJsonschema.toFieldConfig(this.schema, {\n        // post process JSONSChema7 to FormlyFieldConfig conversion\n        map: (field: FormlyFieldConfig, jsonSchema: JSONSchema7) => {\n          /**** additional JSONSchema configurations *******/\n          field = this.jsonschemaService.processField(field, jsonSchema);\n          field.props.editorConfig = editorConfig;\n          field.props.getRoot = (() => this.rootField);\n          field.props.setHide = ((field: FormlyFieldConfig, value: boolean) => this.setHide(field, value));\n          if (this._resourceConfig != null && this._resourceConfig.formFieldMap) {\n            return this._resourceConfig.formFieldMap(field, jsonSchema);\n          }\n          return field;\n        }\n      })\n    ];\n    // mark the root field\n    fields[0].props.isRoot = true;\n\n    this.fields = fields;\n\n    // set root element\n    if (this.fields) {\n      this.title = this.fields[0].props?.label;\n      this.description = this.fields[0].props?.description;\n      this.rootField = this.fields[0];\n    }\n  }\n\n  /**\n   * Save the data on the server.\n   */\n  submit(): void {\n    this.isSaveButtonDisabled = true;\n    this._canDeactivate();\n    this.form.updateValueAndValidity();\n\n    if (this.form.valid === false) {\n      const fields = [];\n      Object.keys(this.form.controls).forEach((key: string) => {\n        if (this.form.controls[key].status !== 'VALID') {\n          fields.push(this.translateService.instant(key));\n        }\n      });\n      let errorMessage = '';\n      if (fields.length > 0) {\n        errorMessage += \"\\n\" + this.translateService.instant('Field(s) in error: ');\n        errorMessage += fields.join(', ');\n      }\n      this.messageService.add({\n        severity: 'error',\n        summary: this.translateService.instant(this.recordType),\n        detail: this.translateService.instant('The form contains errors.') + errorMessage,\n        sticky: true,\n        closable: true\n      });\n      this.isSaveButtonDisabled = false;\n      return;\n    }\n\n    this.loadingChange.emit(true);\n\n    let data = removeEmptyValues(this.model);\n    data = this.postprocessRecord(data);\n\n    // For compatibility with resources managed with invenio-records-resources\n    if (this._resourceConfig.recordResource) {\n      data = { metadata: data };\n    }\n\n    // The record has validation, the action `save` is set.\n    if (data.metadata?.validation) {\n      data.metadata.validation.action = 'save';\n    }\n\n    let recordAction$: Observable<any>;\n    if (this.pid != null) {\n      recordAction$ = this.recordService.update(this.recordType, this.pid, this.preUpdateRecord(data)).pipe(\n        catchError((error) => this._handleError(error)),\n        map(record => {\n          return { record, action: 'update', message: this.translateService.instant('Record updated.') };\n        }),\n        finalize(() => this.isSaveButtonDisabled = false)\n      );\n    } else {\n      recordAction$ = this.recordService.create(this.recordType, this.preCreateRecord(data)).pipe(\n        catchError((error) => this._handleError(error)),\n        map(record => {\n          return { record, action: 'create', message: this.translateService.instant('Record created.') };\n        }),\n        finalize(() => this.isSaveButtonDisabled = false)\n      );\n    }\n\n    recordAction$.subscribe(result => {\n      this.messageService.add({\n        severity: 'success',\n        summary: this.translateService.instant(this.recordType),\n        detail: this.translateService.instant(result.message),\n        life: CONFIG.MESSAGE_LIFE\n      });\n      this.recordUiService.redirectAfterSave(\n        result.record.id,\n        result.record,\n        this.recordType,\n        result.action,\n        this.route\n      );\n      this.loadingChange.emit(true);\n    });\n  }\n\n  /** Save the current editor content as a template */\n  saveAsTemplate(): void {\n    this.ref = this.dialogService.open(SaveTemplateFormComponent, {\n      header: this.translateService.instant('Save as template'),\n      width: '40vw',\n    });\n    this.ref.onClose.subscribe(data => {\n      if (data) {\n        let modelData = removeEmptyValues(this.model);\n        modelData = this.postprocessRecord(modelData);\n        let record = {\n          name: data.name,\n          data: modelData,\n          template_type: this.recordType\n        };\n        const tmplConfig = this.recordUiService.getResourceConfig(this.editorSettings.template.recordType);\n        if (tmplConfig.preCreateRecord) {\n          record = tmplConfig.preCreateRecord(record);\n        }\n        this.loadingChange.emit(true);\n        this.recordService.create(this.editorSettings.template.recordType, record).subscribe({\n          next: (createdRecord) => {\n            this.messageService.add({\n              severity: 'success',\n              summary: this.translateService.instant(this.editorSettings.template.recordType),\n              detail: this.translateService.instant('Record created.'),\n              life: CONFIG.MESSAGE_LIFE\n            });\n            this.recordUiService.redirectAfterSave(\n              createdRecord.id,\n              createdRecord,\n              this.editorSettings.template.recordType,\n              'create',\n              this.route\n            );\n          },\n          error: (error) => {\n            this.loadingChange.emit(false);\n            this.messageService.add({\n              severity: 'error',\n              summary: this.translateService.instant(this.editorSettings.template.recordType),\n              detail: error.title,\n              sticky: true,\n              closable: true\n            });\n          }\n        })\n      }\n    });\n  }\n\n\n  /**\n   * Scroll the window in to the DOM element corresponding to a given config field.\n   * @param event - click DOM event\n   * @param field - FormlyFieldConfig, the form config corresponding to the DOM element to jump to.\n   */\n  setFocus(event: any, field: FormlyFieldConfig): void {\n    event.preventDefault();\n    this.setFieldFocus(field, true);\n  }\n\n  /**\n   * Cancel editing and back to previous page\n   */\n  cancel(): void {\n    this._canDeactivate();\n    this.location.back();\n  }\n\n  /**\n   * Open a modal dialog box to load a template.\n   */\n  showLoadTemplateDialog(): void {\n    this.dialogService.open(LoadTemplateFormComponent, {\n      header: this.translateService.instant('Load from template'),\n      focusOnShow: false,\n      width: '50vw',\n      position: 'top',\n      dismissableMask: false,\n      data: {\n        templateResourceType: this.editorSettings.template.recordType,\n        resourceType: this.recordType\n      }\n    });\n  }\n\n  /**\n   * Can the `load template` should be visible.\n   * The 'load template' button will be visible only if the corresponding setting is set and the user\n   * isn't in 'edit mode' (load template is only available for new resources)\n   * @return True if the button could be visible ; False otherwise\n   */\n  canLoadTemplate(): boolean {\n    return this.editorSettings.template.loadFromTemplate && !this.pid;\n  }\n\n  /********** Form field manipulation **********/\n\n  /**\n   * Scroll to a field or fieldGroup and set focus in the first field candidate.\n   * @param field: the field or fieldGroup where to search about field candidate.\n   * @param scroll: is the screen should scroll to the field.\n   */\n  setFieldFocus(field: FormlyFieldConfig, scroll: boolean = false): boolean {\n    if (scroll === true && field.id)  {\n      const el = document.getElementById(`field-${field.id}`);\n      if (el != null) {\n        // we need to scroll after the focus setTimeout push the action in the\n        // next event loop.\n        setTimeout(() => el.scrollIntoView({ behavior: 'smooth' }));\n        scroll = false;\n      }\n    }\n    if (field.fieldGroup && field.fieldGroup.length > 0) {\n      const visibleFields = field.fieldGroup.filter(f => !f.hide);\n      if (visibleFields.length > 0) {\n        return this.setFieldFocus(visibleFields[0], scroll);\n      }\n    }\n    field.focus = true;\n    return true;\n  }\n\n  /**\n   * Add a field to the hidden list\n   * @param field - FormlyFieldConfig, form config to be added\n   */\n  addHiddenField(field: FormlyFieldConfig): void {\n    if (this.isRoot(field.parent)) {\n      // formly can change the reference of a field. Especially when the model\n      // change such as external import.\n      this._hiddenFields = this._hiddenFields.filter(f => f.id !== field.id);\n      this._hiddenFields.push(field);\n      this._hiddenFieldsSubject.next(this._hiddenFields);\n    }\n  }\n\n  /**\n   * Clear the list of the hidden fields\n   */\n  clearHiddenFields(): void {\n    this._hiddenFields = [];\n    this._hiddenFieldsSubject.next(this._hiddenFields);\n  }\n\n  /**\n   * Remove a field to the hidden list\n   * @param field - FormlyFieldConfig, form config to be removed\n   */\n  removeHiddenField(field: FormlyFieldConfig): void {\n    if (this._hiddenFields.some(f => f.id === field.id) && this.isRoot(field.parent)) {\n      // Form is touched if a field is added.\n      // Required for hide field in edit mode.\n      this.rootField.formControl.markAsTouched();\n      this._hiddenFields = this._hiddenFields.filter(f => f.id !== field.id);\n      this._hiddenFieldsSubject.next(this._hiddenFields);\n    }\n  }\n\n  /**\n   * Am I at the root of the form?\n   * @param field - FormlyFieldConfig, the field to hide\n   * @returns boolean, true if I'm the root\n   */\n  isRoot(field: FormlyFieldConfig): boolean {\n    if (field == null) {\n      return false;\n    }\n    return field.props?.isRoot || false;\n  }\n\n  /**\n   * Can the field be hidden?\n   * @param field - FormlyFieldConfig, the field to hide\n   * @returns boolean, true if the field can be hidden\n   */\n  canHide(field: FormlyFieldConfig): boolean {\n    if (!this.longMode) {\n      return false;\n    }\n    return (\n      !field.props.required &&\n      !field.hide &&\n      !('hide' in field?.expressions)\n    );\n  }\n\n  /**\n   * Hide the given formly field.\n   * @param field - FormlyFieldConfig, the field to hide\n   */\n  setHide(field: FormlyFieldConfig, value: boolean): void {\n    if (value) {\n      if (field.parent.props.isRoot) {\n        this.addHiddenField(field);\n      }\n    } else {\n      this.removeHiddenField(field);\n      this.setFieldFocus(field, true);\n    }\n    field.hide = value;\n  }\n\n  /********************* Private  ***************************************/\n\n\n\n  /**\n   * Handle form error\n   * @param error: object with status and title parameters\n   * @return Observable<Error>\n   */\n  private _handleError(error: { status: number, title: string }): Observable<Error> {\n    this.messageService.add({\n      severity: 'error',\n      summary: this.translateService.instant(error.title),\n      detail: this.translateService.instant('Server error.'),\n      sticky: true,\n      closable: true\n    });\n    return throwError(() => ({ status: error.status, title: error.title }));\n  }\n\n  private _canDeactivate(activate: boolean = true) {\n    this.canDeactivate = activate;\n    this.canDeactivateChange.next(activate);\n  }\n}\n","<!--\n  RERO angular core\n  Copyright (C) 2020-2025 RERO\n\n  This program is free software: you can redistribute it and/or modify\n  it under the terms of the GNU Affero General Public License as published by\n  the Free Software Foundation, version 3 of the License.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU Affero General Public License for more details.\n\n  You should have received a copy of the GNU Affero General Public License\n  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n-->\n<form [formGroup]=\"form\" (ngSubmit)=\"submit()\">\n  <div class=\"core:grid core:grid-cols-12 core:gap-4\">\n    <div class=\"core:col-span-12 core:flex core:top-0 core:bg-white core:h-full core:justify-between core:items-center core:border-b core:border-surface core:py-2\">\n      @if (rootField) {\n        <legend>\n            <span class=\"core:text-2xl\" [pTooltip]=\"description\" tooltipPosition=\"top\">\n              {{ title || recordType | ucfirst | translate }}\n            </span>\n        </legend>\n      }\n      <div class=\"core:flex core:items-center core:justify-end core:gap-1\">\n        <!-- load from template button -->\n        @if (canLoadTemplate()) {\n          <p-button\n            id=\"editor-load-template-button\"\n            [label]=\"'Load template…' | translate\"\n            [outlined]=\"true\"\n            icon=\"fa fa-upload\"\n            (onClick)=\"showLoadTemplateDialog()\"\n          />\n        }\n        <!-- cancel button -->\n        <p-button\n          id=\"editor-cancel-button\"\n          [label]=\"'Cancel' | translate\"\n          icon=\"fa fa-times\"\n          [outlined]=\"true\"\n          severity=\"danger\"\n          (onClick)=\"cancel()\"\n        />\n      <!-- save button -->\n        @if (saveAlternatives.length === 0) {\n        <p-button\n          id=\"editor-save-button\"\n          [label]=\"'Save' | translate\"\n          (onClick)=\"submit()\"\n          [disabled]=\"isSaveButtonDisabled\"\n        />\n        } @else {\n        <p-splitButton\n          id=\"editor-save-button-split\"\n          [label]=\"'Save' | translate\"\n          (onClick)=\"submit()\"\n          [model]=\"saveAlternatives\"\n        />\n        }\n      </div>\n    </div>\n\n    <div class=\"core:col-span-12\">\n      <div class=\"core:grid core:grid-cols-12 core:gap-4\">\n        <!-- add fields section -->\n        @if (editorSettings.longMode) {\n          <div class=\"core:col-span-2 core:h-[90vh]\">\n            <p-scrollpanel [style]=\"{ width: '100%', height: '100%' }\">\n              <ng-core-editor-add-field-editor [editorComponent]=\"editorComponent\" />\n            </p-scrollpanel>\n          </div>\n        }\n\n        <!-- editor itself -->\n        <div [ngClass]=\"{ 'core:h-[90vh] core:col-span-10 core:lg:col-span-8': editorSettings.longMode, 'core:col-span-12': !editorSettings.longMode }\" role=\"main\">\n          <!-- ngx-formly -->\n          @if (editorSettings.longMode) {\n            <p-scrollpanel [style]=\"{ width: '100%', height: '100%' }\">\n              <formly-form\n                [model]=\"model\"\n                [fields]=\"fields\"\n                [options]=\"options\"\n                [form]=\"form\"\n                (modelChange)=\"modelChanged($event)\"\n              />\n            </p-scrollpanel>\n          } @else {\n            <formly-form\n              [model]=\"model\"\n              [fields]=\"fields\"\n              [options]=\"options\"\n              [form]=\"form\"\n              (modelChange)=\"modelChanged($event)\"\n            />\n          }\n\n        </div>\n\n        @if (editorSettings.longMode) {\n          <!-- TOC navigation -->\n          <div class=\"core:col-span-2 core:text-sm core:hidden core:lg:block core:h-[90vh]\">\n            <p-scrollpanel [style]=\"{ width: '100%', height: '100%' }\">\n              <ng-content select=\"[beforeTableOfContent]\"></ng-content>\n              <span class=\"core:font-bold core:mb-1\" for=\"addField\" translate>Jump to</span>\n              <ul class=\"core:ml-2 core:pl-0 core:list-none\">\n                @for (f of tocFields$ | async; track f.key) {\n                  <li class=\"core:mb-1\">\n                    <span class=\"core:text-link-secondary core:cursor-pointer\" (click)=\"setFocus($event, f)\">{{ f.props.label | translate }}</span>\n                  </li>\n                }\n              </ul>\n            </p-scrollpanel>\n        </div>\n        }\n      </div>\n    </div>\n  </div>\n</form>\n\n@if (error) {\n  <ng-core-error [error]=\"error\" />\n}\n","/*\n * RERO angular core\n * Copyright (C) 2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { AbstractControl, ValidatorFn } from \"@angular/forms\";\nimport { DateTime } from \"luxon\";\n\nexport class Validators {\n  static datesGreaterThan(dateFirstName: string, dateLastName: string, targetField: string, strictMode: boolean = false): ValidatorFn {\n    return datesGreaterThanValidator(dateFirstName, dateLastName, targetField, strictMode);\n  }\n}\n\nexport function datesGreaterThanValidator(dateFirstName: string, dateLastName: string, targetField: string, strict: boolean): ValidatorFn {\n  return (control: AbstractControl): Boolean => {\n    const dateFormat = 'yyyy-MM-dd';\n    const dateFirst = control.parent.get(dateFirstName);\n    const dateLast = control.parent.get(dateLastName);\n    if (dateFirst.value?.length > 0 && dateLast.value?.length > 0) {\n      const dateTimeFirst = DateTime.fromFormat(dateFirst.value, dateFormat);\n      const dateTimeLast = DateTime.fromFormat(dateLast.value, dateFormat);\n      const status = strict ? dateTimeFirst < dateTimeLast : dateTimeFirst <= dateTimeLast;\n\n      if (status) {\n        dateFirst.setErrors(null);\n        dateLast.setErrors(null);\n      }\n\n      return status;\n    }\n\n    return true;\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2025 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { inject } from '@angular/core';\nimport { UntypedFormControl } from '@angular/forms';\nimport { _ } from \"@ngx-translate/core\";\nimport { FormlyExtension, FormlyFieldConfig, FormlyFieldProps } from '@ngx-formly/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { isObservable, of } from 'rxjs';\nimport { Validators } from '../../validator/validators';\nimport { RecordService } from '../record.service';\nimport { isEmpty, removeEmptyValues } from './utils';\n\nexport class NgCoreFormlyExtension {\n\n  protected recordService: RecordService = inject(RecordService);\n\n  // Types to apply field wrapper on\n  private _fieldWrapperTypes = ['boolean', 'datepicker', 'passwordGenerator'];\n\n  /**\n   * prePopulate Formly hook\n   * @param field - FormlyFieldConfig\n   */\n  prePopulate(field: FormlyFieldConfig): void {\n    if (field.key) {\n      field.id = this._getKey(field);\n    }\n    this._setCustomValidators(field);\n    // Set default value from expression.\n    if (field.props?.defaultValueExpression) {\n      const expression = field.props.defaultValueExpression;\n      const expressionFn = Function('expression', `return ${expression};`);\n      field.defaultValue = expressionFn();\n    }\n  }\n\n  /**\n   * onPopulate Formly hook\n   * @param field - FormlyFieldConfig\n   */\n  onPopulate(field: FormlyFieldConfig): void {\n    // Path of Array\n    // Bug issue: https://github.com/ngx-formly/ngx-formly/issues/3914\n    if (field?.parent?.type === 'array' && field.type !== 'object' && field.props.required) {\n      field.props.required = false;\n    }\n    this._setWrappers(field);\n    this._hideEmptyField(field);\n    if (field.props.alwaysHidden) {\n      field.props.itemCssClass = 'core:hidden';\n    }\n    const expressions = field?.expressions;\n    if (expressions && expressions['props.required'] !== undefined) {\n      field.options.fieldChanges.subscribe((changes) => {\n        if (\n          changes.type === 'expressionChanges' &&\n          changes.property === 'props.required' &&\n          changes.value === true &&\n          changes.field.hide === true\n        ) {\n          changes.field.hide = false;\n        }\n      });\n    }\n  }\n\n  /**\n   * Add formly wrappers\n   * @param field - FormlyFieldConfig\n   */\n  private _setWrappers(field: FormlyFieldConfig): void {\n    // get wrappers from the props (JSONSchema)\n    if (field.props) {\n      field.wrappers = [...(field.props.wrappers || []), ...(field.wrappers || [])];\n    }\n\n    if (field?.props?.editorConfig?.longMode) {\n      // add automatically a card wrapper for the first level fields\n      const { parent } = field;\n      if (parent && parent.props && parent.props.isRoot === true && !field.wrappers.includes('card') && !field.wrappers.includes('hide')) {\n        field.wrappers.unshift('card');\n      }\n    }\n\n    // adds form-fields for non standard field types\n    if (this._fieldWrapperTypes.some((elem) => elem === field.type) && !field.wrappers.includes('card')) {\n      field.wrappers = [...(field.wrappers || []), 'form-field'];\n    }\n\n    // The form-field and the card must not be together\n    if (field.wrappers.includes('card')) {\n      field.wrappers = field.wrappers.filter((value: string) => value != 'form-field');\n    }\n\n    // TODO: this can be fixed in a future formly release\n    // due to multiple calls (sometimes) we need to make the value unique\n    field.wrappers = [...new Set(field.wrappers)];\n  }\n\n  /**\n   * Create an id html attribute by joining field and parents keys\n   * @param field formly field config\n   * @returns array - keys to create the id html attribute\n   */\n  private _getKey(field: any): string {\n    let parentKey = null;\n    const keyParams = [];\n\n    if (field.parent != null) {\n      parentKey = this._getKey(field.parent);\n      keyParams.push(parentKey);\n    }\n\n    if (parentKey != null) {\n      if (field.key != null) {\n        keyParams.push(field.key);\n      } else {\n        keyParams.push(field.id.replace(/.*__(\\d+)$/, '$1'));\n      }\n\n      return keyParams.join('-');\n    }\n    return field.key;\n  }\n\n  /**\n   * Check if the given field or one of his parents has a hide wrapper\n   * @param field - FormlyFieldConfig\n   * @return boolean - true if has a hide wrapper\n   */\n  private _hasHideWrapper(field: FormlyFieldConfig): boolean {\n    if (field.wrappers.includes('hide')) {\n      return true;\n    }\n    if (field?.parent) {\n      return this._hasHideWrapper(field.parent);\n    }\n    return false;\n  }\n\n  /**\n   * Check if the given field has at least on parent marked as hidden.\n   * The model should be empty.\n   *\n   * @param field - FormlyFieldConfig\n   * @return boolean - true has a parent marked as hidden.\n   */\n  private _hasHiddenParent(field: FormlyFieldConfig): boolean {\n    if (field?.hide === true) {\n      return this._modelIsEmpty(field);\n    }\n    if (field?.parent) {\n      return this._hasHiddenParent(field.parent);\n    }\n    return false;\n  }\n\n  /**\n   * Check if a field has an empty model.\n   *\n   * @param field formly field config\n   * @returns true if the given field has an empty model.\n   */\n  private _modelIsEmpty(field): boolean {\n    let model = field?.model;\n    // for simple object the model is the parent dict\n    if (field.model != null && !field.hasOwnProperty('fieldGroup')) {\n      // New from ngx-formly v5.9.0\n      model = field.model[Array.isArray(field.key) ? field.key[0] : field.key];\n    }\n    model = removeEmptyValues(model);\n    return isEmpty(model);\n  }\n\n  /**\n   * Hide or show field depending of the data content and the hide property\n   * @param field - FormlyFieldConfig\n   */\n  private _hideEmptyField(field: FormlyFieldConfig): void {\n    if (!field.props?.editorConfig) {\n      return;\n    }\n    const { pid, longMode } = field.props?.editorConfig;\n    if (\n      // only in longMode else it will not be possible to unhide a field\n      !longMode ||\n      // system field has not key\n      !field?.key ||\n      // ignore array item which as key of the form \"0\"\n      // TODO: find a better way to identify this case\n      !isNaN(Number(field.key)) ||\n      // ignore field that has hide expression\n      'hide' in field?.expressions ||\n      // do not hide a field containing a 'hide' wrapper\n      this._hasHideWrapper(field) ||\n      // do not hide a field that has a parent marked as hidden and a model is empty\n      (this._hasHiddenParent(field?.parent) && field.props.hide !== true)\n    ) {\n      return;\n    }\n\n    // is the model empty\n    const modelEmpty = this._modelIsEmpty(field);\n    if (\n      // do not hide field which has value in the model\n      modelEmpty &&\n      // do not hide required fields\n      !field.props.initialRequired\n    ) {\n      if (\n        // hide field marked as hide\n        (field.props.hide === true &&\n          // do not hide field has been already manipulated\n          field.hide === undefined) ||\n        // in edition empty fields should be hidden\n        (pid != null &&\n          // only during the editor initialization\n          !field?.props?.getRoot()?.formControl?.touched)\n      ) {\n        field.props.setHide ? field.props.setHide(field, true) : (field.hide = true);\n      }\n    }\n  }\n\n  /**\n   * Set custom validators from the props configuration.\n   * @param field - FormlyFieldConfig\n   */\n  private _setCustomValidators(field: FormlyFieldConfig): void {\n    if (field.props == null || field.props.validation == null) {\n      return;\n    }\n    const customValidators = field.props.validation.validators || {};\n    // asyncValidators: valueAlreadyExists\n    if (customValidators.valueAlreadyExists) {\n      const { filter, limitToValues, term } = customValidators.valueAlreadyExists;\n      field.asyncValidators = {\n        validation: [\n          (control: UntypedFormControl) => {\n            return this.recordService.uniqueValue(\n              field,\n              field.props.editorConfig.recordType,\n              field.props.editorConfig.pid,\n              term ? term : null,\n              limitToValues ? limitToValues : [],\n              filter ? filter : null\n            );\n          },\n        ],\n      };\n      delete customValidators.valueAlreadyExists;\n    }\n    // asyncValidators: valueKeysInObject\n    //  This validator is similar to uniqueValidator but only check on some specific fields of array items.\n    if (customValidators.uniqueValueKeysInObject) {\n      field.validators = {\n        uniqueValueKeysInObject: {\n          expression: (control: UntypedFormControl) => {\n            // if value isn't an array or array contains less than 2 elements, no need to check\n            if (!(control.value instanceof Array) || control.value.length < 2) {\n              return true;\n            }\n            const keysToKeep = customValidators.uniqueValueKeysInObject.keys;\n            const uniqueItems = Array.from(\n              new Set(\n                control.value.map((v: any) => {\n                  const keys = keysToKeep.reduce((acc, elt) => {\n                    acc[elt] = v[elt];\n                    return acc;\n                  }, {});\n                  return JSON.stringify(keys);\n                })\n              )\n            );\n            return uniqueItems.length === control.value.length;\n          },\n        },\n      };\n    }\n    // asyncValidators: numberOfSpecificValuesInObject\n    if (customValidators.numberOfSpecificValuesInObject) {\n      field.validators = {\n        numberOfSpecificValuesInObject: {\n          expression: (control: UntypedFormControl) => {\n            function objIntersection(a, b) {\n              const k1 = Object.keys(a);\n              return k1.filter((k) => a[k] === b[k]);\n            }\n            const min = customValidators.numberOfSpecificValuesInObject.min || 0;\n            const max = customValidators.numberOfSpecificValuesInObject.max || Infinity;\n            const keys = customValidators.numberOfSpecificValuesInObject.keys;\n\n            // if value isn't an array and no minimum value is specified, no need to check.\n            if (!(control.value instanceof Array) && min === 0) {\n              return true;\n            }\n            const counter = control.value.filter((element) => objIntersection(keys, element).length > 0).length;\n            return min <= counter && counter <= max;\n          },\n        },\n      };\n    }\n    // The start date must be less than the end date.\n    if (customValidators.datesGreaterThan) {\n      const dateFirst: string = customValidators.datesGreaterThan.dateFirst;\n      const dateLast: string = customValidators.datesGreaterThan.dateLast;\n      const strict: boolean = customValidators.datesGreaterThan.strict || false;\n      const updateOn: 'change' | 'blur' | 'submit' = customValidators.datesGreaterThan.updateOn || 'blur';\n      const fieldKey = String(field.key);\n      field.validators = {\n        datesGreaterThan: {\n          updateOn,\n          expression: (control: UntypedFormControl) => Validators.datesGreaterThan(dateFirst, dateLast, fieldKey, strict)(control),\n          message: () => field.props.validation.messages.datesGreaterThan\n        },\n      };\n    }\n  }\n}\n\nexport class TranslateExtension implements FormlyExtension {\n\n  protected translate: TranslateService = inject(TranslateService);\n\n  prePopulate(field: FormlyFieldConfig<FormlyFieldProps & { [additionalProperties: string]: any; }>): void {\n    const props: any = field.props || {};\n\n    // translate only once\n    if (props.translated) {\n      return;\n    }\n    props.translated = true;\n\n    // label / title\n    if (props.label) {\n      // store the untranslated label as the hidden fields are not translated\n      props.untranslatedLabel = props.label;\n      field.expressions = {\n        ...(field.expressions || {}),\n        'props.label': this.translate.stream(props.label),\n      };\n    }\n    // description\n    if (props.description) {\n      field.expressions = {\n        ...(field.expressions || {}),\n        'props.description': this.translate.stream(props.description),\n      };\n    }\n    // placeholder\n    if (props.placeholder) {\n      field.expressions = {\n        ...(field.expressions || {}),\n        'props.placeholder': this.translate.stream(props.placeholder),\n      };\n    }\n\n    // Save untranslated string\n    if (props.addonLeft) {\n      props.addonLeftUntranslated = props.addonLeft;\n    }\n    if (props.addonRight) {\n      props.addonRightUntranslated = props.addonRight;\n    }\n\n    this.processAllAddon(props);\n    this.translate.onLangChange.subscribe(() => {\n      this.processAllAddon(props);\n    });\n  }\n\n  private processAllAddon(props: any): void {\n    if (props.addonLeft) {\n      props.addonLeft = this.processAddon(props.addonLeftUntranslated);\n    }\n    if (props.addonRight) {\n      props.addonRight = this.processAddon(props.addonRightUntranslated);\n    }\n  }\n\n  private processAddon(addon: string[]): any {\n    return addon.map((label: string) => (label.startsWith('<') ? label : this.translate.instant(label)));\n  }\n}\n\nexport class FormOptionsProcessExtension implements FormlyExtension {\n  prePopulate(field: FormlyFieldConfig<FormlyFieldProps & { [additionalProperties: string]: any; }>): void {\n    // Process options\n    if (field.props?.options && !isObservable(field.props.options)) {\n      field.props.options = of(this.processOptions(field.props));\n    }\n    // Process filter options\n    if (field.props?.filters?.options && !isObservable(field.props.filters.options)) {\n      field.props.filters.options = of(this.processOptions(field.props.filters));\n    }\n  }\n\n  private processOptions(props: any): any[] {\n    this.processUntranslatedLabel(props.options);\n    const preferredOptions = props.options.filter((option: any) => option.preferred);\n    if (preferredOptions.length > 0) {\n      const options = [];\n      props.group = true;\n      const otherOptions = props.options.filter((option: any) => !option.preferred);\n      options.push({\n        label: 'group-preferred',\n        untranslatedLabel: 'group-preferred',\n        items: props.sort ? this.sortOptions(preferredOptions) : preferredOptions\n      });\n      options.push({\n        label: 'group-other',\n        untranslatedLabel: 'group-other',\n        items: props.sort ? this.sortOptions(otherOptions) : otherOptions\n      });\n      return options;\n    } else {\n\n      return props.sort ? this.sortOptions(props.options) : props.options\n    }\n  }\n\n  private processUntranslatedLabel(options: any[]): void {\n    options.map((option: any) => {\n      option.untranslatedLabel = option.label;\n      if (option.items) {\n        this.processUntranslatedLabel(option.items);\n      }\n      if (option.children) {\n        this.processUntranslatedLabel(option.children);\n      }\n    });\n  }\n\n  private sortOptions(options: any) {\n    options = options.sort((a: any, b: any) => a.label.localeCompare(b.label));\n    if (options.filter((option: any) => option.items).length > 0) {\n      options.forEach((option: any) => {\n        if (option.items) {\n          return this.sortOptions(option.items);\n        }\n      });\n    }\n    return options;\n  }\n}\n\n/**\n * To register an ngx-formly translations extension.\n *\n * @param translate ngx-translate service\n * @param recordService - ng core record service\n * @returns FormlyConfig object configuration\n */\nexport function registerNgCoreFormlyExtension(translate: TranslateService, recordService: RecordService) {\n  return {\n    // translate the default validators messages\n    // widely inspired from ngx-formly example\n    validationMessages: [\n      {\n        name: 'required',\n        // use a marker to force translation extraction due to a bad detection of ngx-translate-extract\n        message: () => translate.stream(_('This field is required')),\n      },\n      {\n        name: 'null',\n        message: () => translate.stream(_('should be null')),\n      },\n      {\n        name: 'uniqueItems',\n        message: () => translate.stream(_('should NOT have duplicate items')),\n      },\n      {\n        name: 'uniqueValueKeysInObject',\n        message: () => translate.stream(_('should NOT have duplicate items')),\n      },\n      {\n        name: 'numberOfSpecificValuesInObject',\n        message: (_err, field: FormlyFieldConfig) => {\n          const validatorConfig = field.props.customValidators.numberOfSpecificValuesInObject;\n          const min = validatorConfig.min || 0;\n          const max = validatorConfig.max || Infinity;\n          const { keys } = validatorConfig;\n\n          // Build a string based on validators specified keys\n          // the object `{a: 'testA', b= 'testB'}` will be transform to a string `a=testA and b=testB`\n          const keysString = Object.keys(keys).map((key) => key + '=' + translate.instant(keys[key]));\n          const joinKeysString = keysString.join(' ' + translate.instant('and') + ' ');\n\n          // Build a string based on min/max values specified into configuration\n          // depending of min/max configuration, the message must be different\n          let counterMessage = '';\n          if (min > 0 && max < Infinity) {\n            counterMessage =\n              min === max\n                ? translate.instant(_('strictly {{counter}}'), { counter: min })\n                : translate.instant(_('between {{min}} and {{max}}'), { min, max });\n          } else if (min > 0) {\n            counterMessage = translate.instant(_('minimum {{min}}'), { min });\n          } else if (max < Infinity) {\n            counterMessage = translate.instant(_('maximum {{max}}'), { max });\n          }\n\n          // Combine string to return a full sentence\n          return translate.instant(_('should have {{counter}} {{keys}}'), {\n            counter: counterMessage,\n            keys: joinKeysString,\n          });\n        },\n      },\n      {\n        name: 'alreadyTaken',\n        message: () => translate.stream(_('the value is already taken')),\n      },\n      {\n        name: 'minLength',\n        message: (_err, field: FormlyFieldConfig) =>\n          translate.stream(_('should NOT be shorter than {{minLength}} characters'), {\n            minLength: field.props.minLength,\n          }),\n      },\n      {\n        name: 'maxLength',\n        message: (_err: any, field: FormlyFieldConfig) =>\n          translate.stream(_('should NOT be longer than {{maxLength}} characters'), {\n            maxLength: field.props.maxLength,\n          }),\n      },\n      {\n        name: 'minItems',\n        message: (_err, field: FormlyFieldConfig) =>\n          translate.stream(_('should NOT have fewer than {{minItems}} items'), {\n            minItems: field.props.minItems,\n          }),\n      },\n      {\n        name: 'maxItems',\n        message: (_err: any, field: FormlyFieldConfig) =>\n          translate.stream(_('should NOT have more than {{maxItems}} items'), {\n            maxItems: field.props.maxItems,\n          }),\n      },\n      {\n        name: 'min',\n        message: (_err: any, field: FormlyFieldConfig) =>\n          translate.stream(_('should be >=  {{min}}'), { min: field.props.min }),\n      },\n      {\n        name: 'max',\n        message: (_err: any, field: FormlyFieldConfig) =>\n          translate.stream(_('should be <=  {{max}}'), { max: field.props.max }),\n      },\n      {\n        name: 'exclusiveMinimum',\n        message: (_err: any, field: FormlyFieldConfig) =>\n          translate.stream(_('should be >  {{step}}'), { step: field.props.step }),\n      },\n      {\n        name: 'exclusiveMaximum',\n        message: (_err: any, field: FormlyFieldConfig) =>\n          translate.stream(_('should be <  {{step}}'), { step: field.props.step }),\n      },\n      {\n        name: 'multipleOf',\n        message: (_err: any, field: FormlyFieldConfig) =>\n          translate.stream(_('should be multiple of ${{step}}'), { step: field.props.step }),\n      },\n      {\n        name: 'const',\n        message: (_err: any, field: FormlyFieldConfig) =>\n          translate.stream(_('should be equal to constant \"{{const}}\"'), { const: field.props.const }),\n      },\n    ],\n    extensions: [\n      {\n        name: 'form-options',\n        extension: new FormOptionsProcessExtension(),\n        priority: 12\n      },\n      {\n        name: 'translate',\n        extension: new TranslateExtension(),\n        // Execute Translate extension after ng-core extension\n        priority: 11,\n      },\n      {\n        name: 'ng-core',\n        extension: new NgCoreFormlyExtension(),\n        // Execute Core Formly extension after formly processing (priority low)\n        // https://main.formly.dev/docs/guide/custom-formly-extension#extension-priority\n        priority: 10,\n      },\n    ],\n  };\n}\n","/*\n * RERO angular core\n * Copyright (C) 2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, inject, LOCALE_ID, NgModule, OnInit } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { FieldType, FormlyFieldConfig, FormlyFieldProps, FormlyModule } from '@ngx-formly/core';\nimport { DatePickerModule } from 'primeng/datepicker';\n\n// Calendar options: https://primeng.org/calendar\nexport interface IDateTimePickerProps extends FormlyFieldProps {\n  appendTo: string;\n  clearButtonStyleClass: string;\n  dataType: 'date' | 'string';\n  dateFormat?: string;\n  defaultDate?: Date;\n  disabledDates?: Date[];\n  disabledDays?: number[];\n  firstDayOfWeek?: number;\n  hourFormat?: string;\n  inline: boolean;\n  inputStyleClass?: string;\n  outputDateFormat: string;\n  maxDate?: Date;\n  minDate?: Date;\n  numberOfMonths: number;\n  readonlyInput?: boolean;\n  selectionMode: 'multiple' | 'range' | 'single';\n  showButtonBar: boolean;\n  showIcon: boolean;\n  showSeconds: boolean;\n  showTime?: boolean;\n  stepHour: number;\n  stepMinute: number;\n  stepSecond: number;\n  styleClass: string;\n  todayButtonStyleClass: string;\n  view?: 'date' | 'month' | 'year';\n}\n\n@Component({\n    selector: 'ng-core-date-picker',\n    template: `\n    <p-datepicker\n      [appendTo]=\"props.appendTo\"\n      [formControl]=\"formControl\"\n      [formlyAttributes]=\"field\"\n      [clearButtonStyleClass]=\"props.clearButtonStyleClass\"\n      [dataType]=\"props.dataType\"\n      [dateFormat]=\"props.dateFormat\"\n      [defaultDate]=\"props.defaultDate\"\n      [disabledDates]=\"disabledDates\"\n      [disabledDays]=\"props.disabledDays\"\n      [firstDayOfWeek]=\"props.firstDayOfWeek\"\n      [hourFormat]=\"props.hourFormat\"\n      [inline]=\"props.inline\"\n      [inputStyleClass]=\"props.inputStyleClass\"\n      [maxDate]=\"maxDate\"\n      [minDate]=\"minDate\"\n      [numberOfMonths]=\"props.numberOfMonths\"\n      [placeholder]=\"props.placeholder\"\n      [readonlyInput]=\"props.readonlyInput || props.selectionMode !== 'single'\"\n      [required]=\"props.required\"\n      [selectionMode]=\"props.selectionMode\"\n      [showButtonBar]=\"props.showButtonBar\"\n      [showIcon]=\"props.showIcon\"\n      [showSeconds]=\"props.showSeconds\"\n      [showTime]=\"props.showTime\"\n      [stepHour]=\"props.stepHour\"\n      [stepMinute]=\"props.stepMinute\"\n      [stepSecond]=\"props.stepSecond\"\n      [styleClass]=\"props.styleClass\"\n      [todayButtonStyleClass]=\"props.todayButtonStyleClass\"\n      [view]=\"props.view\"\n    />\n  `,\n    changeDetection: ChangeDetectionStrategy.OnPush,\n    standalone: false\n})\nexport class DatePickerComponent extends FieldType<FormlyFieldConfig<IDateTimePickerProps>> implements OnInit {\n\n  protected locale = inject(LOCALE_ID);\n\n  defaultOptions: Partial<FormlyFieldConfig<IDateTimePickerProps>> = {\n    props: {\n      appendTo: 'body',\n      clearButtonStyleClass: 'p-button-text',\n      dataType: 'string',\n      dateFormat: 'yy-mm-dd',\n      disabled: false,\n      firstDayOfWeek: 0,\n      inline: false,\n      numberOfMonths: 1,\n      outputDateFormat: 'yyyy-MM-dd',\n      placeholder: 'Select…',\n      required: false,\n      selectionMode: 'single',\n      showButtonBar: false,\n      showIcon: false,\n      showSeconds: false,\n      showTime: false,\n      stepHour: 1,\n      stepMinute: 1,\n      stepSecond: 1,\n      styleClass: 'core:w-full',\n      todayButtonStyleClass: 'p-button-text',\n      view: 'date'\n    },\n  };\n\n  defaultDate: Date = undefined;\n  disabledDates: Date[] = undefined;\n  maxDate: Date = undefined;\n  minDate: Date = undefined;\n\n  ngOnInit(): void {\n    if (!this.formControl.value && this.props.defaultDate) {\n      this.defaultDate = this.processDate(this.props.defaultDate);\n    }\n    if (this.props.disabledDates) {\n      this.disabledDates = this.props.disabledDates.map((date: any) =>this.processDate(date));\n    }\n    if (this.props.minDate) {\n      this.minDate = this.processDate(this.props.minDate);\n    }\n    if (this.props.maxDate) {\n      this.maxDate = this.processDate(this.props.maxDate);\n    }\n  }\n\n  private processDate(date: string | Date ): Date {\n    return date instanceof Date ? date : new Date(date);\n  }\n}\n\n\n@NgModule({\n  declarations: [DatePickerComponent],\n  imports: [\n    CommonModule,\n    DatePickerModule,\n    FormsModule,\n    ReactiveFormsModule,\n    FormlyModule.forChild({\n      types: [\n        {\n          name: 'datePicker',\n          component: DatePickerComponent,\n          wrappers: ['form-field'],\n        },\n        {\n          name: 'dateTimePicker', // For compatibility\n          extends: 'datePicker'\n        }\n      ],\n    }),\n  ],\n  exports: [DatePickerComponent]\n})\nexport class NgCoreFormlyDatePickerModule { }\n","/*\n * RERO angular core\n * Copyright (C) 2024-2025 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { ChangeDetectionStrategy, Component, Type } from '@angular/core';\nimport { FieldType, FormlyFieldConfig } from '@ngx-formly/core';\n\nexport interface NgCoreFormlyInputFieldConfig extends FormlyFieldConfig {\n  type: 'input' | Type<NgCoreFormlyFieldInput>;\n  addonRight?: string[];\n  addonLeft?: string[];\n  class?: string;\n  inputStep?: string|number;\n}\n\n@Component({\n    selector: 'ng-core-formly-field-primeng-input',\n    template: `\n    @if (props.addonLeft || props.addonRight) {\n      <p-inputgroup>\n          @if (props.addonLeft) {\n            @for (prop of props.addonLeft; track prop) {\n              <p-inputgroup-addon [innerHTML]=\"prop\"></p-inputgroup-addon>\n            }\n          }\n          <ng-container\n            [ngTemplateOutlet]=\"input\"\n            [ngTemplateOutletContext]=\"{ formControl, props, field, showError }\"\n          />\n          @if (props.addonRight) {\n            @for (prop of props.addonRight; track prop) {\n              <p-inputgroup-addon [innerHTML]=\"prop\"></p-inputgroup-addon>\n            }\n          }\n      </p-inputgroup>\n    } @else {\n      <ng-container\n        [ngTemplateOutlet]=\"input\"\n        [ngTemplateOutletContext]=\"{ formControl, props, field, showError }\"\n      />\n    }\n    <ng-template #input let-formControl=\"formControl\" let-props=\"props\" let-field=\"field\" let-showError=\"showError\">\n      @if (props.type === 'number') {\n        <input\n          pInputText\n          [class]=\"props.class\"\n          type=\"number\"\n          [attr.step]=\"props.inputStep\"\n          [formControl]=\"formControl\"\n          [formlyAttributes]=\"field\"\n          [ngClass]=\"{ 'ng-invalid ng-dirty': showError }\"\n        />\n      } @else {\n        <input\n          pInputText\n          [class]=\"props.class\"\n          [type]=\"props.type || 'text'\"\n          [formControl]=\"formControl\"\n          [formlyAttributes]=\"field\"\n          [ngClass]=\"{ 'ng-invalid ng-dirty': showError }\"\n        />\n      }\n    </ng-template>\n  `,\n    changeDetection: ChangeDetectionStrategy.OnPush,\n    standalone: false\n})\nexport class NgCoreFormlyFieldInput extends FieldType<NgCoreFormlyInputFieldConfig> {\n\n  defaultOptions?: any = {\n    props: {\n      class: 'core:w-full',\n      inputStep: 'any'\n    }\n  };\n\n}\n","/*\n * RERO angular core\n * Copyright (C) 2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlyFormFieldModule } from '@ngx-formly/primeng/form-field';\nimport { InputGroupModule } from 'primeng/inputgroup';\nimport { InputGroupAddonModule } from 'primeng/inputgroupaddon';\nimport { InputNumberModule } from 'primeng/inputnumber';\nimport { InputTextModule } from 'primeng/inputtext';\nimport { NgCoreFormlyFieldInput } from './input.type';\n\n\n@NgModule({\n  declarations: [NgCoreFormlyFieldInput],\n  imports: [\n    CommonModule,\n    ReactiveFormsModule,\n    InputTextModule,\n    InputNumberModule,\n    InputGroupModule,\n    InputGroupAddonModule,\n    FormlyFormFieldModule,\n    FormlyModule.forChild({\n      types: [\n        {\n          name: 'input',\n          component: NgCoreFormlyFieldInput,\n          wrappers: ['form-field'],\n        },\n        { name: 'string', extends: 'input' },\n        {\n          name: 'number',\n          extends: 'input',\n          defaultOptions: {\n            props: {\n              type: 'number',\n            },\n          },\n        },\n        {\n          name: 'integer',\n          extends: 'input',\n          defaultOptions: {\n            props: {\n              type: 'number',\n            },\n          },\n        },\n      ],\n    }),\n  ],\n  exports: [NgCoreFormlyFieldInput]\n})\nexport class NgCoreFormlyInputModule {}\n","/*\n * RERO angular core\n * Copyright (C) 2025 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { inject, Injectable } from \"@angular/core\";\nimport { TranslateService } from \"@ngx-translate/core\";\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class TranslateLabelService {\n\n  private translateService: TranslateService = inject(TranslateService);\n\n  translateLabel(options: any): any[] {\n    options.map((option: any) => {\n      if (!option.untranslatedLabel) {\n        option.untranslatedLabel = option.label;\n      }\n      option.label = this.translateService.instant(option.untranslatedLabel);\n      if (option.items) {\n        this.translateLabel(option.items);\n      }\n      if (option.children) {\n        this.translateLabel(option.children);\n      }\n    });\n\n    return options;\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2024-2025 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectorRef, Component, inject, NgModule, OnDestroy, OnInit } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { FieldType, FormlyFieldConfig, FormlyFieldProps, FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\nimport { TranslateModule, TranslateService } from '@ngx-translate/core';\nimport { CheckboxChangeEvent, CheckboxModule } from 'primeng/checkbox';\nimport { map, merge, Observable, Subscription, switchMap } from 'rxjs';\nimport { TranslateLabelService } from '../services/translate-label.service';\n\nexport interface IMultiCheckBoxProps extends FormlyFieldProps {\n  labelStyleClass?: string;\n  style: 'stacked' | 'inline';\n  styleClass?: string;\n  options?: Observable<any[]>;\n}\n\n@Component({\n    selector: 'ng-core-multi-checkbox',\n    template: `\n    <div class=\"core:flex\" [ngClass]=\"{ 'core:gap-3': props.style === 'inline', 'core:flex-col core:gap-1': props.style === 'stacked' }\">\n    @for (option of optionValues$|async|keyvalue; track option.key) {\n      @let fieldKey = field.key + '_' + option.key;\n      <div class=\"core:flex core:items-center core:gap-2\">\n        <p-checkbox\n          [disabled]=\"option.value.disabled\"\n          [formlyAttributes]=\"field\"\n          [inputId]=\"fieldKey\"\n          [name]=\"field.key\"\n          [ngModel]=\"field.formControl.value\"\n          [readonly]=\"props.readonly\"\n          [styleClass]=\"props.styleClass\"\n          [value]=\"option.value.value\"\n          (onChange)=\"onChange($event)\"\n        />\n        <label [for]=\"fieldKey\" [class]=\"props.labelStyleClass\">{{ option.value.label }}</label>\n      </div>\n    }\n    </div>\n  `,\n    standalone: false\n})\nexport class MultiCheckboxComponent extends FieldType<FormlyFieldConfig<IMultiCheckBoxProps>> implements OnInit, OnDestroy {\n\n  private translateService: TranslateService = inject(TranslateService);\n  private translateLabelService: TranslateLabelService = inject(TranslateLabelService);\n  private ref: ChangeDetectorRef = inject(ChangeDetectorRef);\n\n  private subscription: Subscription = new Subscription();\n\n  /** Default options */\n  defaultOptions?: Partial<FormlyFieldConfig<IMultiCheckBoxProps>> = {\n    props: {\n      style: 'stacked'\n    }\n  };\n\n  optionValues$: Observable<any[]>;\n\n  multiCheckBoxValue: string[] = [];\n\n  ngOnInit(): void {\n    const optionsObs = this.props.options;\n    const changeObs = this.translateService.onLangChange.pipe(switchMap(() => this.optionValues$));\n    this.optionValues$ = merge(...[optionsObs, changeObs])\n    .pipe(\n      map(options => {\n        this.ref.markForCheck();\n        return this.translateLabelService.translateLabel(options);\n      })\n    );\n  }\n\n  ngOnDestroy(): void {\n    this.subscription.unsubscribe();\n  }\n\n  onChange(event: CheckboxChangeEvent): void {\n    this.field.formControl.patchValue(event.checked);\n  }\n}\n\n@NgModule({\n  declarations: [MultiCheckboxComponent],\n  imports: [\n    CommonModule,\n    CheckboxModule,\n    FormsModule,\n    TranslateModule.forChild(),\n    FormlySelectModule,\n    FormlyModule.forChild({\n      types: [\n        {\n          name: 'multi-checkbox',\n          component: MultiCheckboxComponent,\n          wrappers: ['form-field'],\n        }\n      ],\n    }),\n  ],\n  exports: [MultiCheckboxComponent]\n})\nexport class NgCoreFormlyMultiCheckboxModule { }\n","/*\n * RERO angular core\n * Copyright (C) 2024-2025 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectorRef, Component, inject, NgModule, OnDestroy, OnInit, Type } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FieldType, FormlyFieldConfig, FormlyFieldProps, FormlyModule } from '@ngx-formly/core';\nimport { FormlyFieldSelectProps, FormlySelectModule } from '@ngx-formly/core/select';\nimport { TranslateModule, TranslateService } from '@ngx-translate/core';\nimport { MultiSelectModule as PrimeNgMultiSelectModule } from 'primeng/multiselect';\nimport { map, merge, Observable, Subscription, switchMap } from 'rxjs';\nimport { TranslateLabelService } from '../services/translate-label.service';\n\nexport interface IMultiSelectProps extends FormlyFieldProps, FormlyFieldSelectProps {\n  appendTo?: any;\n  class?: string;\n  display: string;\n  dropdownIcon?: string;\n  editable: boolean;\n  emptyFilterMessage?: string;\n  emptyMessage?: string;\n  filter: boolean;\n  filterMatchMode: 'endsWith' | 'startsWith' | 'contains' | 'equals' | 'notEquals' | 'in' | 'lt' | 'lte' | 'gt' | 'gte';\n  group: boolean;\n  loadingIcon?: string;\n  panelStyleClass?: string;\n  placeholder?: string;\n  required: boolean;\n  scrollHeight: string;\n  sort: boolean;\n  styleClass?: string;\n  tooltip?: string;\n  tooltipPosition: 'left' | 'top' | 'bottom' | 'right';\n  tooltipPositionStyle: string;\n  tooltipStyleClass?: string;\n  variant: 'outlined' | 'filled';\n  options?: Observable<any[]>;\n}\n\nexport interface FormlyMultiSelectFieldConfig extends FormlyFieldConfig<IMultiSelectProps> {\n  type: 'multi-select' | Type<MultiSelectComponent>;\n}\n\n@Component({\n    selector: 'ng-core-multi-select',\n    template: `\n    <p-multiSelect\n      [appendTo]=\"props.appendTo\"\n      [class]=\"props.class\"\n      [display]=\"props.display\"\n      [dropdownIcon]=\"props.dropdownIcon\"\n      [emptyFilterMessage]=\"props.emptyFilterMessage\"\n      [emptyMessage]=\"props.emptyMessage\"\n      [filter]=\"props.filter\"\n      filterBy=\"label\"\n      [formControl]=\"formControl\"\n      [formlyAttributes]=\"field\"\n      [group]=\"props.group\"\n      [loadingIcon]=\"props.loadingIcon\"\n      [ngClass]=\"{ 'ng-invalid ng-dirty': showError }\"\n      [options]=\"optionValues$|async\"\n      optionLabel=\"label\"\n      optionValue=\"value\"\n      [panelStyleClass]=\"props.panelStyleClass\"\n      [placeholder]=\"props.placeholder | translate\"\n      [required]=\"props.required\"\n      [showClear]=\"!props.required\"\n      [styleClass]=\"props.styleClass\"\n      [tooltip]=\"props.tooltip\"\n      [tooltipPosition]=\"props.tooltipPosition\"\n      [tooltipPositionStyle]=\"props.tooltipPositionStyle\"\n      [tooltipStyleClass]=\"props.tooltipStyleClass\"\n      (onChange)=\"props.change && props.change(field, $event)\"\n      (onClear)=\"clearValidators()\"\n    >\n      <ng-template #selectedItems let-items>\n        @for(option of items; track option.value; let last = $last) {\n          <div class=\"core:inline-flex core:items-center core:gap-2 core:px-1\">\n            <div>\n              {{ option.label }}@if(!last) {, }\n            </div>\n          </div>\n        }\n        @if (!items || items.length === 0) {\n          <div>{{ props.placeholder | translate }}</div>\n        }\n      </ng-template>\n    </p-multiSelect>\n  `,\n    standalone: false\n})\nexport class MultiSelectComponent extends FieldType<FormlyFieldConfig<IMultiSelectProps>> implements OnInit, OnDestroy {\n\n  private translateService: TranslateService = inject(TranslateService);\n  private translateLabelService: TranslateLabelService = inject(TranslateLabelService);\n  private ref: ChangeDetectorRef = inject(ChangeDetectorRef);\n\n  private subscription: Subscription = new Subscription();\n\n  /** Default properties */\n  defaultOptions: Partial<FormlyFieldConfig<IMultiSelectProps>> = {\n    props: {\n      class: 'core:w-full',\n      display: 'comma',\n      editable: false,\n      filter: true,\n      filterMatchMode: 'contains',\n      group: false,\n      panelStyleClass: 'core:w-full',\n      placeholder: 'Select…',\n      required: false,\n      scrollHeight: '250px',\n      sort: false,\n      styleClass: 'core:w-full core:mb-1',\n      tooltipPosition: 'top',\n      tooltipPositionStyle: 'absolute',\n      variant: 'outlined',\n    },\n  };\n\n  optionValues$: Observable<any[]>;\n\n  ngOnInit(): void {\n    const optionsObs = this.props.options;\n    const changeObs = this.translateService.onLangChange.pipe(switchMap(() => this.optionValues$));\n    this.optionValues$ = merge(...[optionsObs, changeObs])\n    .pipe(\n      map(options => {\n        this.ref.markForCheck();\n        return this.translateLabelService.translateLabel(options);\n      })\n    );\n  }\n\n  // Clear all validators except required.\n  clearValidators() {\n    const {errors} = this.formControl;\n    this.formControl.setErrors(errors.required ? { required: true } : null);\n  }\n\n  ngOnDestroy(): void {\n    this.subscription.unsubscribe();\n  }\n}\n\n@NgModule({\n  declarations: [MultiSelectComponent],\n  imports: [\n    CommonModule,\n    ReactiveFormsModule,\n    TranslateModule.forChild(),\n    FormlySelectModule,\n    PrimeNgMultiSelectModule,\n    FormlyModule.forChild({\n      types: [\n        {\n          name: 'multi-select',\n          component: MultiSelectComponent,\n          wrappers: ['form-field'],\n        },\n      ],\n    }),\n  ],\n  exports: [MultiSelectComponent],\n})\nexport class NgCoreFormlyMultiSelectModule {}\n","/*\n * RERO angular core\n * Copyright (C) 2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Injectable } from \"@angular/core\";\nimport { Observable, of } from \"rxjs\";\nimport { IQueryOptions, IRemoteAutocomplete, ISuggestionItem } from \"./remote-autocomplete.interface\";\n\n// Override this service in your application to implement your logic\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class RemoteAutocompleteService implements IRemoteAutocomplete {\n\n  public getSuggestions(query: string, queryOptions: IQueryOptions, currentPid: string): Observable<ISuggestionItem[]> {\n    return of([{label: \"test\"}]);\n  }\n\n  getValueAsHTML(queryOptions: IQueryOptions, item: ISuggestionItem): Observable<string> {\n    return of(item.label);\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2024-2025 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { CommonModule } from '@angular/common';\nimport { AfterViewInit, ChangeDetectorRef, Component, inject, NgModule, OnInit } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { FormsModule } from '@angular/forms';\nimport { ActivatedRoute } from '@angular/router';\nimport { FieldType, FormlyFieldConfig, FormlyModule } from '@ngx-formly/core';\nimport { FormlyFieldProps } from '@ngx-formly/primeng/form-field';\nimport { TranslateModule, TranslateService } from '@ngx-translate/core';\nimport { AutoCompleteCompleteEvent, AutoCompleteModule, AutoCompleteSelectEvent } from 'primeng/autocomplete';\nimport { ButtonModule } from 'primeng/button';\nimport { SelectChangeEvent, SelectModule } from 'primeng/select';\nimport { map, merge, Observable, Subject, switchMap } from 'rxjs';\nimport { IQuery, IQueryOptions, IRemoteAutoCompleteFilter, IValueSelect } from './remote-autocomplete.interface';\nimport { RemoteAutocompleteService } from './remote-autocomplete.service';\n\nexport interface IRemoteAutoCompleteProps extends FormlyFieldProps {\n  delay: number;\n  filters?: IRemoteAutoCompleteFilter;\n  group: boolean;\n  minLength: number;\n  maxLength?: number;\n  queryOptions?: IQueryOptions;\n  placeholder?: string;\n  scrollHeight: string;\n  summaryClass?: string\n}\n\n@Component({\n  selector: 'ng-core-remote-autocomplete',\n  standalone: false,\n  template: `\n  <div class=\"core:flex core:gap-1\">\n    @if (!field.formControl.value) {\n      @if (props.filters?.options) {\n        <p-select\n          [options]=\"optionValues$|async\"\n          [ngModel]=\"props.filters.selected\"\n          (onChange)=\"changeFilter($event)\"\n        >\n          <ng-template let-selected #selectedItem>\n            {{ selected.untranslatedLabel | translate }}\n          </ng-template>\n        </p-select>\n      }\n        <p-autoComplete\n          class=\"core:grow\"\n          styleClass=\"core:w-full\"\n          inputStyleClass=\"core:w-full\"\n          [scrollHeight]=\"props.scrollHeight\"\n          [minLength]=\"props.minLength\"\n          [maxlength]=\"props.maxLength\"\n          [(ngModel)]=\"value\"\n          [placeholder]=\"props.placeholder\"\n          [group]=\"props.group\"\n          [suggestions]=\"suggestions()\"\n          (completeMethod)=\"search($event)\"\n          (onSelect)=\"onSelect($event)\"\n        >\n          <ng-template #item let-data>\n            <div class=\"core:w-full\">\n              <div class=\"core:flex core:gap-2\">\n                <span class=\"core:grow\" [innerHTML]=\"data.label\"></span>\n                @if (data.link) {\n                  <a class=\"core:flex-none core:text-color-secondary\" [href]=\"data.link\" target=\"_blank\">\n                    <i class=\"fa fa-external-link\"></i>\n                  </a>\n                }\n              </div>\n              @if (data.summary) {\n                <div class=\"core:w-full\" [innerHTML]=\"data.summary\" [ngClass]=\"props.summaryClass\"></div>\n              }\n            </div>\n          </ng-template>\n        </p-autoComplete>\n    } @else {\n      <div class=\"core:flex core:gap-1 core:items-center\">\n        <div [innerHtml]=\"valueSelected()\"></div>\n        <p-button icon=\"fa fa-trash\" severity=\"secondary\" [text]=\"true\" (onClick)=\"clear()\" />\n      </div>\n    }\n  </div>\n  `,\n})\nexport class RemoteAutocomplete extends FieldType<FormlyFieldConfig<IRemoteAutoCompleteProps>> implements OnInit,AfterViewInit {\n\n  protected translateService: TranslateService = inject(TranslateService);\n  protected remoteAutocompleteService = inject(RemoteAutocompleteService);\n  protected route = inject(ActivatedRoute);\n  protected ref: ChangeDetectorRef = inject(ChangeDetectorRef);\n\n  protected query = new Subject<any>();\n\n  protected onValueSelect = new Subject<IValueSelect>();\n\n  suggestions = toSignal(this.query.pipe(\n    switchMap((data: IQuery) => this.remoteAutocompleteService.getSuggestions(\n      data.query,\n      data.queryOptions,\n      data.recordPid\n    ))\n  ), { initialValue: []});\n\n  valueSelected = toSignal(this.onValueSelect.pipe(\n    switchMap((data: IValueSelect) => this.remoteAutocompleteService.getValueAsHTML(\n      data.queryOptions,\n      data.item\n    ))\n  ));\n\n  /** Default properties */\n  defaultOptions: Partial<FormlyFieldConfig<IRemoteAutoCompleteProps>> = {\n    props: {\n      delay: 300,\n      group: false,\n      minLength: 3,\n      scrollHeight: '400px',\n      queryOptions: {\n        allowAdd: false,\n        maxOfResult: 100\n      }\n    }\n  };\n\n  value: string = '';\n\n  optionValues$: Observable<any[]>;\n\n  ngOnInit(): void {\n    if (this.props.filters) {\n      const optionsObs = this.props.filters.options;\n      const changeObs = this.translateService.onLangChange.pipe(switchMap(() => this.optionValues$));\n      this.optionValues$ = merge(...[optionsObs, changeObs])\n      .pipe(\n        map(options => {\n          this.ref.markForCheck();\n          return this.translateLabel(options);\n        })\n      );\n    }\n  }\n\n  ngAfterViewInit(): void {\n    if (this.field.props.filters) {\n      this.field.props.queryOptions.filter = this.field.props.filters.selected;\n    }\n    if (this.field.formControl?.value?.length > 0) {\n      this.onValueSelect.next({\n        item: { label: this.field.formControl.value, value: this.field.formControl.value },\n        queryOptions: { ...this.field.props.queryOptions },\n      });\n    }\n  }\n\n  changeFilter(filter: SelectChangeEvent): void {\n    this.field.props.queryOptions.filter = filter.value;\n    this.value = '';\n  }\n\n  search(event: AutoCompleteCompleteEvent): void {\n    this.query.next({\n      query: event.query,\n      queryOptions: { ...this.field.props.queryOptions },\n      recordPid: this.route.snapshot.params.pid || null\n    });\n  }\n\n  onSelect(event: AutoCompleteSelectEvent): void {\n    this.onValueSelect.next({\n      item: event.value,\n      queryOptions: { ...this.field.props.queryOptions },\n    });\n    this.formControl.patchValue(event.value.value);\n  }\n\n  clear(): void {\n    this.value = '';\n    this.formControl.reset(null);\n    this.field.focus = true;\n  }\n\n  translateLabel(options: any): any[] {\n    options.map((option: any) => {\n      if (!option.untranslatedLabel) {\n        option.untranslatedLabel = option.label;\n      }\n      option.label = this.translateService.instant(option.untranslatedLabel);\n    });\n\n    return options;\n  }\n}\n\n@NgModule({\n  declarations: [RemoteAutocomplete],\n  imports: [\n    AutoCompleteModule,\n    ButtonModule,\n    CommonModule,\n    SelectModule,\n    FormsModule,\n    TranslateModule.forChild(),\n    FormlyModule.forChild({\n      types: [\n        { name: 'remoteAutoComplete', component: RemoteAutocomplete }\n      ]\n    }),\n  ],\n  exports: [RemoteAutocomplete]\n})\nexport class NgCoreFormlyRemoteAutocompleteModule { }\n","/*\n * RERO angular core\n * Copyright (C) 2024-2025 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Observable } from \"rxjs\";\n\nexport interface IRemoteAutocomplete {\n  getSuggestions(query: string, queryOptions: IQueryOptions, currentPid: string): Observable<ISuggestionItem[]>;\n  getValueAsHTML(queryOptions: IQueryOptions, item: ISuggestionItem): Observable<string>;\n}\n\nexport interface IQueryOptions {\n  allowAdd?: boolean;\n  field?: string;\n  filter?: string;\n  isNotRef?: boolean;\n  label?: string;\n  maxLengthSuggestion?: number;\n  maxOfResult?: number;\n  suggest?: string;\n  type?: string;\n};\n\nexport interface ISuggestionItem {\n  label: string;\n  value?: string,\n  summary?: string;\n  link?: string;\n}\n\nexport interface IRemoteAutoCompleteFilter {\n  selected: string;\n  options: any;\n}\n\nexport interface IQuery {\n  query: string;\n  queryOptions: IQueryOptions;\n  recordPid: string | null;\n}\n\nexport interface IValueSelect {\n  item: ISuggestionItem;\n  queryOptions: IQueryOptions;\n}\n","/*\n * RERO angular core\n * Copyright (C) 2024-2025 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component, inject, NgModule, OnDestroy, OnInit, Type } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FieldType, FormlyFieldConfig, FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule as FormlyCoreSelectModule, FormlyFieldSelectProps } from '@ngx-formly/core/select';\nimport { FormlyFieldProps } from '@ngx-formly/primeng/form-field';\nimport { TranslateModule, TranslateService } from '@ngx-translate/core';\nimport { SelectModule } from 'primeng/select';\nimport { map, merge, Observable, Subscription, switchMap } from 'rxjs';\nimport { TranslateLabelService } from '../services/translate-label.service';\n\nexport interface ISelectProps extends FormlyFieldProps, FormlyFieldSelectProps {\n  appendTo?: any;\n  class?: string;\n  dropdownIcon?: string;\n  editable: boolean;\n  emptyFilterMessage?: string;\n  emptyMessage?: string;\n  filter: boolean;\n  filters?: any[];\n  filterMatchMode: 'endsWith' | 'startsWith' | 'contains' | 'equals' | 'notEquals' | 'in' | 'lt' | 'lte' | 'gt' | 'gte';\n  group: boolean;\n  loadingIcon?: string;\n  panelStyleClass?: string;\n  placeholder?: string;\n  required: boolean;\n  scrollHeight: string;\n  sort: boolean;\n  styleClass?: string;\n  tooltip?: string;\n  tooltipPosition: 'left' | 'top' | 'bottom' | 'right';\n  tooltipPositionStyle: string;\n  tooltipStyleClass?: string;\n  options?: Observable<any[]>;\n}\n\nexport interface IFormlySelectFieldConfig extends FormlyFieldConfig<ISelectProps> {\n  type: 'select' | Type<SelectComponent>;\n}\n\n@Component({\n    selector: 'ng-core-primeng-select',\n    changeDetection: ChangeDetectionStrategy.OnPush,\n    template: `\n  @if(props.options) {\n    <p-select\n      [appendTo]=\"props.appendTo\"\n      [class]=\"props.class\"\n      [dropdownIcon]=\"props.dropdownIcon\"\n      [editable]=\"props.editable\"\n      [emptyFilterMessage]=\"props.emptyFilterMessage\"\n      [emptyMessage]=\"props.emptyMessage\"\n      [filter]=\"props.filter\"\n      filterBy=\"label\"\n      [filterMatchMode]=\"props.filterMatchMode\"\n      [formControl]=\"formControl\"\n      [formlyAttributes]=\"field\"\n      [group]=\"props.group\"\n      [loadingIcon]=\"props.loadingIcon\"\n      [ngClass]=\"{ 'ng-invalid ng-dirty': showError }\"\n      [options]=\"optionValues$|async\"\n      [optionLabel]=\"props.group ? undefined : 'label'\"\n      [optionValue]=\"props.group ? undefined : 'value'\"\n      [panelStyleClass]=\"props.panelStyleClass\"\n      [placeholder]=\"props.placeholder | translate\"\n      [required]=\"props.required\"\n      [showClear]=\"!props.required\"\n      [styleClass]=\"props.styleClass\"\n      [tooltip]=\"props.tooltip\"\n      [tooltipPosition]=\"props.tooltipPosition\"\n      [tooltipPositionStyle]=\"props.tooltipPositionStyle\"\n      [tooltipStyleClass]=\"props.tooltipStyleClass\"\n      (onChange)=\"props.change && props.change(field, $event)\"\n      (onClear)=\"clearValidators()\"\n    >\n      <ng-template let-selected #selectedItem>\n        {{ selected.untranslatedLabel | translate }}\n      </ng-template>\n      <ng-template let-group #group>\n        @if (group.untranslatedLabel !== 'group-preferred' && group.untranslatedLabel !== 'group-other') {\n          <div class=\"core:py-2 core:font-bold\">{{ group.label }}</div>\n        } @else if (group.label === 'group-other') {\n          <div class=\"core:py-2\"><hr></div>\n        }\n      </ng-template>\n    </p-select>\n  }\n  `,\n    standalone: false\n})\nexport class SelectComponent extends FieldType<FormlyFieldConfig<ISelectProps>> implements OnInit, OnDestroy {\n\n  private translateService: TranslateService = inject(TranslateService);\n  private translateLabelService: TranslateLabelService = inject(TranslateLabelService);\n  private ref: ChangeDetectorRef = inject(ChangeDetectorRef);\n\n  private subscription: Subscription = new Subscription();\n\n  /** Default properties */\n  defaultOptions: Partial<FormlyFieldConfig<ISelectProps>> = {\n    props: {\n      class: 'core:w-full',\n      editable: false,\n      filter: false,\n      filterMatchMode: 'contains',\n      group: false,\n      panelStyleClass: 'core:w-full',\n      placeholder: 'Select…',\n      required: false,\n      scrollHeight: '250px',\n      sort: false,\n      styleClass: 'core:w-full core:mb-1',\n      tooltipPosition: 'top',\n      tooltipPositionStyle: 'absolute',\n    }\n  };\n\n  optionValues$: Observable<any[]>;\n\n  ngOnInit(): void {\n    const optionsObs = this.props.options;\n    const changeObs = this.translateService.onLangChange.pipe(switchMap(() => this.optionValues$));\n    this.optionValues$ = merge(...[optionsObs, changeObs])\n    .pipe(\n      map(options => {\n        this.ref.markForCheck();\n        return this.translateLabelService.translateLabel(options);\n      })\n    );\n  }\n\n  ngOnDestroy(): void {\n    this.subscription.unsubscribe();\n  }\n\n  clearValidators() {\n    const { errors } = this.formControl;\n    this.formControl.setErrors(errors.required? {required: true}: null);\n  }\n}\n\n@NgModule({\n  declarations: [SelectComponent],\n  imports: [\n    CommonModule,\n    SelectModule,\n    ReactiveFormsModule,\n    TranslateModule.forChild(),\n    FormlyCoreSelectModule,\n    FormlyModule.forChild({\n      types: [\n        {\n          name: 'select',\n          component: SelectComponent,\n          wrappers: ['form-field'],\n        },\n        { name: 'enum', extends: 'select' },\n      ],\n    }),\n  ],\n  exports: [SelectComponent]\n})\nexport class NgCoreFormlySelectModule { }\n","/*\n * RERO angular core\n * Copyright (C) 2024-2025 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectorRef, Component, inject, NgModule, OnDestroy, OnInit, Type } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { FieldType, FormlyFieldConfig, FormlyFieldProps, FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/primeng/select';\nimport { TranslateModule, TranslateService } from '@ngx-translate/core';\nimport { TreeNode } from 'primeng/api';\nimport { TreeNodeSelectEvent } from 'primeng/tree';\nimport { TreeSelectModule } from 'primeng/treeselect';\nimport { map, merge, Observable, Subscription, switchMap } from 'rxjs';\nimport { TranslateLabelService } from '../services/translate-label.service';\n\n// Doc https://primeng.org/treeselect\n\nexport interface ITreeSelectProps extends FormlyFieldProps {\n  class: string;\n  containerStyleClass: string;\n  disabled?: boolean;\n  filter: boolean;\n  filterBy: string;\n  filterInputAutoFocus: boolean;\n  filterPlaceholder?: string;\n  panelClass: string;\n  panelStyleClass: string;\n  placeholder?: string;\n  scrollHeight: string;\n  variant: string;\n}\n\nexport interface FormlyTreeSelectFieldConfig extends FormlyFieldConfig<ITreeSelectProps> {\n  type: 'tree-select' | Type<TreeSelectComponent>;\n}\n\n@Component({\n    selector: 'ng-core-tree-select',\n    template: `\n    <p-treeSelect\n      [class]=\"props.class\"\n      [containerStyleClass]=\"props.containerStyleClass\"\n      [disabled]=\"props.disabled\"\n      [filter]=\"props.filter\"\n      [filterBy]=\"props.filterBy\"\n      [filterInputAutoFocus]=\"props.filterInputAutoFocus\"\n      [filterPlaceholder]=\"props.filterPlaceholder\"\n      [formlyAttributes]=\"field\"\n      [ngModel]=\"nodeSelected\"\n      [options]=\"optionValues$|async\"\n      [panelClass]=\"props.panelClass\"\n      [panelStyleClass]=\"props.panelStyleClass\"\n      [placeholder]=\"props.placeholder | translate\"\n      [showClear]=\"!props.required\"\n      [variant]=\"props.variant\"\n      (onNodeSelect)=\"setFormValue($event)\"\n      (onNodeUnselect)=\"clearFormValue()\"\n      (onClear)=\"clearFormValue()\"\n    />\n  `,\n    standalone: false\n})\nexport class TreeSelectComponent extends FieldType<FormlyFieldConfig<ITreeSelectProps>> implements OnInit, OnDestroy {\n\n  private translateService: TranslateService = inject(TranslateService);\n  private translateLabelService: TranslateLabelService = inject(TranslateLabelService);\n  private ref: ChangeDetectorRef = inject(ChangeDetectorRef);\n\n  private subscription: Subscription = new Subscription();\n\n  /** Default properties */\n  defaultOptions: Partial<FormlyFieldConfig<ITreeSelectProps>> = {\n    props: {\n      class: 'core:w-full',\n      containerStyleClass: 'core:w-full',\n      filter: false,\n      filterBy: 'label',\n      filterInputAutoFocus: true,\n      panelClass: 'core:w-full',\n      panelStyleClass: 'core:w-full',\n      placeholder: 'Select…',\n      scrollHeight: '400px',\n      variant: 'outlined'\n    }\n  };\n\n  nodeSelected: any = undefined;\n\n  optionValues$: Observable<any[]>;\n\n  ngOnInit(): void {\n    const optionsObs = this.props.options;\n    const changeObs = this.translateService.onLangChange.pipe(switchMap(() => this.optionValues$));\n    this.optionValues$ = merge(...[optionsObs, changeObs])\n    .pipe(\n      map(options => {\n        this.ref.markForCheck();\n        return this.translateLabelService.translateLabel(options);\n      }),\n    );\n  }\n\n  ngOnDestroy(): void {\n    this.subscription.unsubscribe();\n  }\n\n  setFormValue(event: TreeNodeSelectEvent): void {\n    this.formControl.setValue(event.node.data);\n  }\n\n  clearFormValue(): void {\n    this.formControl.reset(null);\n    const { errors } = this.formControl;\n    this.formControl.setErrors(errors.required? {required: true}: null);\n  }\n\n  private findNodeByValue(node: TreeNode[], value: string, data?: TreeNode): any {\n    if (!data) {\n      node.map((treeNode: TreeNode) => {\n        if (treeNode.data === value) {\n          data = treeNode;\n        }\n        else if (treeNode.children) {\n          data = this.findNodeByValue(treeNode.children, value, data);\n        }\n      });\n    }\n\n    return data;\n  }\n}\n\n@NgModule({\n  declarations: [ TreeSelectComponent ],\n  imports: [\n    CommonModule,\n    FormsModule,\n    FormlySelectModule,\n    TranslateModule.forChild(),\n    TreeSelectModule,\n    FormlyModule.forChild({\n      types: [\n        {\n          name: 'tree-select',\n          component: TreeSelectComponent,\n          wrappers: ['form-field'],\n        }\n      ],\n    }),\n  ],\n})\nexport class NgCoreFormlyTreeSelectModule { }\n","/*\n * RERO angular core\n * Copyright (C) 2020-2022 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { FormlyFieldConfig } from '@ngx-formly/core';\n\n/**\n * Component for displaying a label with dropdown in editor.\n */\n@Component({\n    selector: 'ng-core-editor-dropdown-label-editor',\n    templateUrl: './dropdown-label-editor.component.html',\n    standalone: false\n})\nexport class DropdownLabelEditorComponent {\n  // current form field configuration\n  @Input() field: FormlyFieldConfig;\n\n  // can we add a new element to the related array\n  @Input() canAdd: boolean;\n\n  // event when the add button is clicked\n  @Output() addClicked = new EventEmitter<boolean>();\n\n  /**\n   * Emit a new Output event when the add button is clicked\n   * @param event - Event, the click event.\n   */\n  addClick(event: any): void {\n    this.addClicked.emit(event);\n  }\n}\n","<!--\n  RERO angular core\n  Copyright (C) 2020-2024 RERO\n\n  This program is free software: you can redistribute it and/or modify\n  it under the terms of the GNU Affero General Public License as published by\n  the Free Software Foundation, version 3 of the License.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU Affero General Public License for more details.\n\n  You should have received a copy of the GNU Affero General Public License\n  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n-->\n@if (field.props.label) {\n  <div class=\"core:flex core:gap-1 core:items-center\">\n    <span [pTooltip]=\"field.props.description\" tooltipPosition=\"top\">\n      {{ field.props.label }}\n      @if (field.props.required) {\n        &nbsp;*\n      }\n    </span>\n    <ng-content select=\"[menu]\"/>\n    <ng-content id=\"{field.id}-clone-button\" select=\"[buttons]\"/>\n  </div>\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Component, inject, Input, OnDestroy, OnInit } from '@angular/core';\nimport { FormlyFieldConfig } from '@ngx-formly/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { MenuItem } from 'primeng/api';\nimport { merge, Subscription } from 'rxjs';\n\n@Component({\n    selector: 'ng-core-label-editor',\n    templateUrl: './label.component.html',\n    standalone: false\n})\nexport class LabelComponent implements OnInit, OnDestroy {\n  protected translateService: TranslateService = inject(TranslateService);\n\n  // Current field\n  @Input() field: FormlyFieldConfig;\n\n  // Subscriptions to observables.\n  private subscriptions: Subscription = new Subscription();\n\n  items: MenuItem[] = [];\n\n  ngOnInit(): void {\n    this.updateItems();\n    // update items when the hidden state of the children change\n    const fields = this.getFieldGroup(this.field);\n    if (fields?.length > 0) {\n      this.subscriptions.add(\n        merge(...fields.map((child: any) => child.options.fieldChanges))\n          .subscribe(\n            (changes: any) => {\n            if (changes.type === 'hidden') {\n              this.updateItems();\n            }\n        })\n      );\n      // update translations\n      this.subscriptions.add(this.translateService.onLangChange.subscribe(() => this.updateItems()));\n    }\n  }\n\n  ngOnDestroy(): void {\n    this.subscriptions.unsubscribe();\n  }\n\n  updateItems() {\n    if (this.hasMenu(this.field)) {\n      this.items = [];\n      this.hiddenFieldGroup(this.getFieldGroup(this.field)).map((field: any) => {\n        if(!field.props.untranslatedLabel) {\n          field.props.untranslatedLabel = field.props.label;\n        }\n        this.items.push({\n          label: this.translateService.instant(field.props.untranslatedLabel),\n          command: () => this.show(field),\n        });\n      });\n    }\n  }\n\n  /**\n   * Is the dropdown menu displayed?\n   * @param field - FormlyFieldConfig, the corresponding form field config\n   * @returns boolean, true if the menu should be displayed\n   */\n  hasMenu(field: FormlyFieldConfig): boolean {\n    if (field.fieldGroup && field.fieldGroup.length > 0 && field.fieldGroup[0].type === 'multischema') {\n      return false;\n    }\n    if (this.field.fieldGroup == null) {\n      return false;\n    }\n    return (\n      (this.hiddenFieldGroup(this.getFieldGroup(this.field)).length > 0 || this.field.props.helpURL) &&\n      field.props?.editorConfig?.longMode\n    );\n  }\n\n  /** Get the current field index position in the parent array.\n   *\n   * @returns number - the index position in the parent array, null if the parent\n   *                   is not an array.\n   */\n  getIndex() {\n    if (this.field.parent.type === 'array') {\n      return Number(this.field.key);\n    }\n    return null;\n  }\n\n  /** Get the list of children fields of a given field.\n   *\n   * This is more complicated for multischema, the formlyField should be extracted\n   * from the children of children.\n   *\n   * @param field FormlyFieldConfig - the field to get the fieldGroup.\n   * @returns Array of FormlyFieldConfig - the list of the children fields.\n   */\n  getFieldGroup(field: FormlyFieldConfig) {\n    let fieldGroup = [];\n    // multischema has a nested structure object['enum', 'object'], enum is the oneOf select\n    // and object['object'] are all the possible oneOf entries\n    if (field.fieldGroup?.length > 0 && field.fieldGroup[0].type === 'multischema') {\n      const multischemaFieldGroup = field.fieldGroup[0];\n      // [0] is the enum i.e. (select) for the oneOf\n      const multischemaEntries = multischemaFieldGroup.fieldGroup[1];\n      let activeGroups = multischemaEntries.fieldGroup;\n      // only the active\n      activeGroups = activeGroups.filter((f) => f.hide === false);\n      activeGroups.map((group) => (fieldGroup = [...group.fieldGroup, group]));\n    } else {\n      fieldGroup = field.fieldGroup;\n    }\n    return fieldGroup;\n  }\n\n  /**\n   * Filter the fieldGroup to return the list of hidden field.\n   * @param fieldGroup - FormlyFieldConfig[], the fieldGroup to filter\n   * @returns FormlyFieldConfig[], the filtered list\n   */\n  hiddenFieldGroup(fieldGroup: FormlyFieldConfig[]): FormlyFieldConfig[] {\n    return fieldGroup.filter((f) => f.hide && !('hide' in f?.expressions));\n  }\n\n  /**\n   * Am I at the root of the form?\n   * @returns boolean, true if I'm the root\n   */\n  isRoot(): boolean {\n    return this.field.props?.isRoot || false;\n  }\n\n  /**\n   * Hide the field\n   * @param field - FormlyFieldConfig, the field to hide\n   */\n  remove(): void {\n    if (this.field.parent.type === 'object') {\n      this.field.props.setHide ? this.field.props.setHide(this.field, true) : (this.field.hide = true);\n    }\n    if (this.field.parent.type === 'array') {\n      this.field.parent.props.remove(this.getIndex());\n    }\n  }\n\n  /**\n   * Show the field\n   * @param field - FormlyFieldConfig, the field to show\n   */\n  show(field: FormlyFieldConfig) {\n    field.props.setHide ? field.props.setHide(field, false) : (field.hide = false);\n  }\n\n  /**\n   * Is the field can be hidden?\n   * @returns boolean, true if the field can be hidden\n   */\n  canRemove(): boolean {\n    switch (this.field.parent.type) {\n      case 'object':\n        if (!this.field.props?.editorConfig?.longMode) {\n          return false;\n        }\n        return !this.field.props.required && !this.field.hide;\n      case 'array':\n        return this.field.parent.props.canRemove();\n      default:\n        return false;\n    }\n  }\n\n  /**\n   * Is a new item can be added in an array?\n   * Note that this is true only if the array does not contains items, else the\n   * clone button should be used.\n   * @returns boolean, true if a new item can be added\n   */\n  canAddItem(): boolean {\n    if (this.field.type === 'array' && this.field.props.canAdd) {\n      return this.field.props.canAdd() && this.field.fieldGroup.length === 0;\n    }\n    return false;\n  }\n\n  /**\n   * Add a new item element\n   * @param field - FormlyFieldConfig, the field to hide\n   */\n  addItem() {\n    if (this.field.type === 'array') {\n      return this.field.props.add(0);\n    }\n  }\n\n  /**\n   * Is a array item can be cloned?\n   * @returns boolean, true if the field can be hidden\n   */\n  canAdd() {\n    if (this.field.parent.type === 'array') {\n      return this.field.parent.props.canAdd();\n    }\n    return false;\n  }\n\n  /**\n   * Add a array item after the current field.\n   * @param field - FormlyFieldConfig, the field to hide\n   */\n  add() {\n    if (this.field.parent.type === 'array') {\n      const index = this.getIndex() + 1;\n      return this.field.parent.props.add(index);\n    }\n  }\n}\n","<!--\n  RERO angular core\n  Copyright (C) 2020-2024 RERO\n\n  This program is free software: you can redistribute it and/or modify\n  it under the terms of the GNU Affero General Public License as published by\n  the Free Software Foundation, version 3 of the License.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU Affero General Public License for more details.\n\n  You should have received a copy of the GNU Affero General Public License\n  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n-->\n@if (field) {\n<!-- header and menu -->\n@if (!isRoot()) {\n  <ng-container *ngTemplateOutlet=\"hasMenu(field) ? menu : title; context: { f: field }\" />\n}\n\n<!-- TEMPLATES -->\n<!-- dropdown menu -->\n<ng-template #menu let-f=\"f\">\n  <ng-core-editor-dropdown-label-editor [field]=\"f\" [canAdd]=\"false\">\n    <ng-container menu>\n      <div class=\"core:flex\">\n        <p-button icon=\"fa fa-caret-down\" severity=\"secondary\" [text]=\"true\" (onClick)=\"menu.toggle($event)\" />\n        <p-tieredMenu #menu [model]=\"items\" [popup]=\"true\" appendTo=\"body\" />\n      </div>\n    </ng-container>\n    <ng-container buttons>\n      @if (canAddItem()) {\n      <p-button icon=\"fa fa-plus\" severity=\"secondary\" [text]=\"true\" (onClick)=\"addItem()\" />\n      } @if (canAdd()) {\n      <p-button\n        id=\"{{ f.id }}-clone-button\"\n        icon=\"fa fa-clone\"\n        severity=\"secondary\"\n        [text]=\"true\"\n        styleClass=\"core:mr-1\"\n        (onClick)=\"add()\"\n      />\n      }\n      <!-- hide button -->\n      @if (canRemove()) {\n      <p-button\n        id=\"{{ f.id }}-remove-button\"\n        icon=\"fa fa-trash\"\n        severity=\"secondary\"\n        [text]=\"true\"\n        (onClick)=\"remove()\"\n      />\n      }\n    </ng-container>\n  </ng-core-editor-dropdown-label-editor>\n</ng-template>\n\n<!-- section title -->\n<ng-template #title let-f=\"f\">\n  <div class=\"core:flex core:gap-1 core:items-center\">\n    @if (f.props.label) {\n    <label class=\"p-fieldset-legend-label\" [attr.for]=\"f.id\" [pTooltip]=\"f.props.description\" tooltipPosition=\"top\">\n      {{ f.props.label }}\n    </label>\n    @if (f.props.required && f.props.hideRequiredMarker !== true) { * } @if (canAddItem()) {\n    <p-button icon=\"fa fa-plus\" severity=\"secondary\" [text]=\"true\" (onClick)=\"addItem()\" />\n    } @if (canAdd()) {\n    <p-button id=\"{{ f.id }}-clone-button\" icon=\"fa fa-clone\" [text]=\"true\" severity=\"secondary\" (onClick)=\"add()\" />\n    }\n    <!-- hide button -->\n    @if (canRemove()) {\n    <p-button\n      id=\"{{ f.id }}-remove-button\"\n      icon=\"fa fa-trash\"\n      [text]=\"true\"\n      severity=\"secondary\"\n      (onClick)=\"remove()\"\n    />\n    } }\n  </div>\n</ng-template>\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Component, OnInit } from '@angular/core';\nimport { FieldArrayType, FormlyFieldConfig } from '@ngx-formly/core';\n\n/**\n * Component for displaying array fields in editor.\n */\n@Component({\n    selector: 'ng-core-editor-formly-array-type',\n    templateUrl: 'array-type.component.html',\n    standalone: false\n})\nexport class ArrayTypeComponent extends FieldArrayType implements OnInit {\n\n  /**\n   * Component initialization\n   */\n  ngOnInit() {\n    this.props.remove = this.remove.bind(this);\n    this.props.add = this.add.bind(this);\n    this.props.canAdd = this.canAdd.bind(this);\n    this.props.canRemove = this.canRemove.bind(this);\n  }\n\n  /**\n   * Can a new element be added?\n   * @returns boolean, true if a new element can be inserted in the array\n   */\n  canAdd(): boolean {\n    const { maxItems } = this.field.props;\n    if (maxItems === undefined) {\n      return true;\n    }\n    return this.field.fieldGroup.length < maxItems;\n  }\n\n  /**\n   * Can an element be removed?\n   * @returns boolean, true if an element ca be removed\n   */\n  canRemove() {\n    const { minItems } = this.field.props;\n    if (minItems === undefined) {\n      return true;\n    }\n    return this.field.fieldGroup.length > minItems;\n  }\n\n  /**\n   * Remove an element from the array and hide buttons\n   * @param i - number, the position to remove the element\n   */\n  remove(i: number) {\n    super.remove(i);\n  }\n\n  /**\n   * Add a new element in the array\n   * @param i - number, the position to add the element\n   */\n  add(i: number, initialModel?: any) {\n    super.add(i, initialModel);\n    this.setFocusInChildren(this.field.fieldGroup[i]);\n  }\n\n  /**\n   * Set the focus to the first non object, array in children\n   * Recursive.\n   * @param field - FormlyFieldConfig, configuration form\n   */\n  setFocusInChildren(field: FormlyFieldConfig) {\n    if (field.fieldGroup && field.fieldGroup.length > 0) {\n      for (const f of field.fieldGroup) {\n        if (this.setFocusInChildren(f)) {\n          return true;\n        }\n      }\n      return false;\n    }\n    if (!field.hide) {\n      field.focus = true;\n      return true;\n    }\n    return false;\n  }\n\n}\n","<!--\n  RERO angular core\n  Copyright (C) 2020-2025 RERO\n\n  This program is free software: you can redistribute it and/or modify\n  it under the terms of the GNU Affero General Public License as published by\n  the Free Software Foundation, version 3 of the License.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU Affero General Public License for more details.\n\n  You should have received a copy of the GNU Affero General Public License\n  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n-->\n<!-- array title only if the array is empty -->\n\n@if (props.label && field.props.hideLabel !== true) {\n  <ng-core-label-editor [field]=\"field\" />\n}\n\n<div>\n  <!-- for each item -->\n  <div [class]=\"props.containerCssClass\">\n    @for (f of field.fieldGroup; track f.id) { @if (!f.hide) {\n    <div class=\"{{ f.props.itemCssClass }} core:mb-1\" [id]=\"'field-' + f.id\">\n      <formly-field [field]=\"f\" />\n    </div>\n    } }\n  </div>\n</div>\n","/*\n * RERO angular core\n * Copyright (C) 2020-2025 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Component } from '@angular/core';\nimport { FieldType, FormlyFieldConfig } from '@ngx-formly/core';\n\n@Component({\n    selector: 'ng-core-editor-formly-multi-schema-type',\n    template: `\n    <div [class]=\"field.parent.props.cssClass\">\n      @if (props.label) {\n        <legend [pTooltip]=\"props.description\" tooltipPosition=\"top\">{{ props.label }}</legend>\n      }\n      @if (showError && formControl.errors) {\n        <div class=\"text-error core:my-2\">\n          <formly-validation-message [field]=\"field\" />\n        </div>\n      }\n      @for (f of field.fieldGroup; track f.id) {\n        <formly-field [field]=\"f\"></formly-field>\n      }\n    </div>\n  `,\n    standalone: false\n})\nexport class MultiSchemaTypeComponent extends FieldType<FormlyFieldConfig> {}\n","/*\n * RERO angular core\n * Copyright (C) 2020 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Component } from '@angular/core';\nimport { FieldType, FormlyFieldConfig } from '@ngx-formly/core';\n\n/**\n * Component for displaying an object in editor.\n */\n@Component({\n    selector: 'ng-core-editor-formly-object-type',\n    templateUrl: './object-type.component.html',\n    standalone: false\n})\nexport class ObjectTypeComponent extends FieldType<FormlyFieldConfig> {\n  defaultOptions: Partial<FormlyFieldConfig<any>> = {\n    props: {\n      containerCssClass: 'core:flex core:flex-col core:gap-2'\n    }\n  };\n}\n","<!--\n  RERO angular core\n  Copyright (C) 2020-2025 RERO\n\n  This program is free software: you can redistribute it and/or modify\n  it under the terms of the GNU Affero General Public License as published by\n  the Free Software Foundation, version 3 of the License.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU Affero General Public License for more details.\n\n  You should have received a copy of the GNU Affero General Public License\n  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n-->\n<div [class]=\"props.containerCssClass\">\n  @for (f of field.fieldGroup; track f.id) {\n    <div [hidden]=\"f.hide\" [class]=\"f.props.itemCssClass\" [id]=\"'field-' + f.id\">\n      <formly-field [field]=\"f\" />\n    </div>\n  }\n</div>\n","/*\n * RERO angular core\n * Copyright (C) 2022-2025 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Clipboard } from '@angular/cdk/clipboard';\nimport { HttpClient } from '@angular/common/http';\nimport { ChangeDetectorRef, Component, ElementRef, inject, OnInit, Signal, viewChild } from '@angular/core';\nimport { FieldType, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FormlyFieldProps } from '@ngx-formly/primeng/form-field';\nimport { GeneratePassword } from \"js-generate-password\";\nimport { Subject } from 'rxjs';\nimport { tap } from 'rxjs/operators';\n\n/**\n * Available options for generateOptions (GeneratePassword):\n * - length: Integer, length of password.\n *   default: 10\n * - lowercase: Boolean, put lowercase letters in password.\n *   default: true\n * - uppercase: Boolean, put uppercase letters in password.\n *   default: true\n * - numbers: Boolean, put numbers in password.\n *   default: true\n * - symbols: Boolean, put symbols in password.\n *   default: false\n * - exclude: String, characters to be excluded from password.\n *   default: ''\n * - minLengthLowercase: only if lowercase is set to true, minLengthLowercase will create\n *   a password that will have minimum number of lower case characters in the password.\n *   default: 1\n * - minLengthUppercase: only if uppercase is set to true, minLengthUppercase will create\n *   a password that will have minimum number of upper case characters in the password.\n *   default: 1\n * - minLengthNumbers: only if numbers is set to true, minLengthNumbers will create\n *   a password that will have minimum number of numbers in the password.\n *   default: 1\n * - minLengthSymbols: only if symbols is set to true, minLengthSymbols will create\n *   a password that will have minimum number of symbols in the password.\n *   default: 1\n */\n\ninterface PasswordGeneratorProps extends FormlyFieldProps {\n  enabledEditMode: boolean;\n  class?: string;\n  minLength: number;\n  maxLength: number;\n  specialChar: boolean;\n  readonly: boolean;\n  generateOptions: {\n    length?: number;\n    symbols?: boolean;\n  };\n  api?: string;\n  length?: number;\n  lowercase?: boolean;\n  uppercase?: boolean;\n  numbers?: boolean;\n  symbols?: boolean;\n  exclude?: string;\n  minLengthLowercase?: number;\n  minLengthUppercase?: number;\n  minLengthNumbers?: number;\n  minLengthSymbols?: number;\n};\n\n@Component({\n    selector: 'ng-core-editor-field-password-generator',\n    template: `\n  <p-inputGroup>\n    <input\n      pInputText\n      #password\n      id=\"password\"\n      [type]=\"type\"\n      autocomplete=\"off\"\n      [formControl]=\"formControl\"\n      (change)=\"onChange($event.target.value)\"\n      [readonly]=\"props.readonly\"\n      [class]=\"props.class ? props.class : props.readonly ? 'core:!bg-surface-200' : ''\"\n    />\n    <p-inputGroupAddon>\n      <div class=\"core:flex core:justify-center core:items-center core:min-h-full core:cursor-pointer core:hover:bg-emphasis\" (click)=\"onClick()\">\n        <i class=\"fa fa-repeat\" title=\"{{ 'Generate a new password' | translate }}\"></i>\n      </div>\n    </p-inputGroupAddon>\n    <p-inputGroupAddon>\n      <div class=\"core:flex core:justify-center core:items-center core:min-h-full core:cursor-pointer core:hover:bg-emphasis\" (click)=\"showHidePassword()\">\n        <i class=\"fa\" [ngClass]=\"{'fa-eye': type === 'password', 'fa-eye-slash': type === 'text'}\" title=\"{{ 'Show or hide password' | translate }}\"></i>\n      </div>\n    </p-inputGroupAddon>\n    @if (props.enabledEditMode) {\n    <p-inputGroupAddon>\n      <div class=\"core:flex core:justify-center core:items-center core:min-h-full core:cursor-pointer core:hover:bg-emphasis\" (click)=\"onEdit()\">\n        <i class=\"fa\" [ngClass]=\"{'fa-lock': props.readonly, 'fa-unlock-alt': !props.readonly}\" title=\"{{ 'Edit mode' | translate }}\"></i>\n      </div>\n    </p-inputGroupAddon>\n    }\n  </p-inputGroup>\n  @if (!showError && hasBeenGenerated) {\n    <div class=\"core:text-muted-color core:my-4\" translate>\n      The password has been copied to the clipboard.\n    </div>\n    }\n  `,\n    standalone: false\n})\nexport class PasswordGeneratorTypeComponent extends FieldType<FormlyFieldConfig<PasswordGeneratorProps>> implements OnInit {\n\n  protected httpClient: HttpClient = inject(HttpClient);\n  protected clipboard: Clipboard = inject(Clipboard);\n  protected cd: ChangeDetectorRef = inject(ChangeDetectorRef);\n\n  passwordField: Signal<ElementRef> = viewChild('password');\n\n  /** Default options */\n  defaultOptions: Partial<FormlyFieldConfig<PasswordGeneratorProps>> = {\n    props: {\n      // Allows you to edit the password\n      enabledEditMode: false,\n      // Minimum password size\n      minLength: 8,\n      // Maximum password size\n      maxLength: 255,\n      // Password generation with special characters (ex: $%&)\n      specialChar: false,\n      // The field is readonly\n      readonly: true,\n      // If you use the function in javascript, it is possible\n      // to pass options. See the information above.\n      generateOptions: {}\n    }\n  };\n\n  hasBeenGenerated: boolean = false;\n\n  /** Field password type (show or hide password) */\n  type: 'text' | 'password' = 'password';\n\n  /** Password Observable */\n  private _password$: Subject<string> = new Subject();\n\n  /** OnInit hook */\n  ngOnInit(): void {\n    this._password$.pipe(\n      tap((password: string) => this.formControl.setValue(password)),\n      tap((password: string) => this.clipboard.copy(this.formControl.errors ? ' ' : password)),\n    ).subscribe(() => {\n      this.hasBeenGenerated = true;\n      this.cd.markForCheck();\n    });\n  }\n\n  /** Generation of the password when the button is clicked. */\n  onClick(): void {\n    if (!this.props.api) {\n      this._jsGeneration();\n    } else {\n      this._callApi();\n    }\n  }\n\n  /**\n   * Change the password when entering.\n   * @param password - string\n   */\n  onChange(password: string): void {\n    this._password$.next(password);\n  }\n\n  /** Hide or show password data */\n  showHidePassword(): void {\n    this.type = this.type === 'password' ? 'text' : 'password';\n  }\n\n  onEdit(): void {\n    this.props.readonly = !this.props.readonly;\n    if (!this.props.readonly) {\n      this.passwordField().nativeElement.focus();\n    }\n  }\n\n  /** Generate the password by javascript */\n  private _jsGeneration(): void {\n    if (!this.props.generateOptions.length) {\n      this.props.generateOptions.length = this.props.minLength;\n    }\n    if (!this.props.generateOptions.symbols) {\n      this.props.generateOptions.symbols = this.props.specialChar;\n    }\n    this._password$.next(GeneratePassword(this.props.generateOptions));\n  }\n\n  /** Call backend api entrypoint */\n  private _callApi(): void {\n    this.httpClient.get(this.props.api, {\n      responseType: 'text',\n      params: {\n        length: this.props.minLength,\n        special_char: this.props.specialChar\n      }\n    }).subscribe((password: string) => this._password$.next(password));\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2025 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Component } from '@angular/core';\nimport { FieldType, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FormlyFieldProps } from '@ngx-formly/primeng/form-field';\n\ninterface SwitchProps extends FormlyFieldProps {\n  hideLabel: boolean;\n}\n\n/**\n * Component for displaying a switcher in editor.\n */\n@Component({\n    selector: 'ng-core-editor-formly-field-switch',\n    template: `\n    <div class=\"core:flex core:gap-2 core:my-2\">\n      <p-toggleswitch\n        [ngClass]=\"{'ng-invalid ng-dirty': showError }\"\n        [formControl]=\"formControl\"\n        [formlyAttributes]=\"field\"\n      />\n      <label [for]=\"id\" [pTooltip]=\"props.description\" tooltipPosition=\"top\">{{ props.label }}</label>\n    </div>\n  `,\n    standalone: false\n})\nexport class SwitchComponent extends FieldType<FormlyFieldConfig<SwitchProps>> {\n  /** Default properties */\n  defaultOptions: Partial<FormlyFieldConfig<SwitchProps>> = {\n    props: {\n      hideLabel: true,\n    },\n  };\n}\n","/*\n * RERO angular core\n * Copyright (C) 2022-2024 RERO\n * Copyright (C) 2022 UCLouvain\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Component, input } from '@angular/core';\n\nexport interface IExportOption {\n  label: string,\n  url: string,\n  disabled?: boolean,\n  disabled_message?: string\n};\n\n@Component({\n    selector: 'ng-core-export-button',\n    templateUrl: './export-button.component.html',\n    standalone: false\n})\nexport class ExportButtonComponent {\n\n  /** Export formats configuration */\n  exportOptions = input<IExportOption[]>([]);\n}\n","<!--\n  RERO angular core\n  Copyright (C) 2022-2024 RERO\n  Copyright (C) 2022 UCLouvain\n\n  This program is free software: you can redistribute it and/or modify\n  it under the terms of the GNU Affero General Public License as published by\n  the Free Software Foundation, version 3 of the License.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU Affero General Public License for more details.\n\n  You should have received a copy of the GNU Affero General Public License\n  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n-->\n@if (exportOptions() && exportOptions().length > 0) {\n  <!-- check single export format -->\n  @if (exportOptions().length === 1) {\n    <!-- check if we can export list -->\n    @if (!exportOptions()[0]?.disabled) {\n      <a\n        pButton\n        outlined\n        [href]=\"exportOptions()[0].url\"\n        rel=\"noopener noreferrer\"\n      >\n        <i class=\"fa fa-cloud-download core:mr-1\"></i>\n        {{ 'Export as' | translate }} {{ exportOptions()[0].label }}\n      </a>\n    } @else {\n      <p-button\n        label=\"{{ 'Export as' | translate }} {{ exportOptions()[0].label }}\"\n        icon=\"fa fa-cloud-download\"\n        styleClass=\"core:opacity-30 mx-1\"\n        outlined\n        [pTooltip]=\"exportOptions()[0]?.disabled_message\"\n        tooltipPosition=\"top\"\n      />\n    }\n  } @else {\n    <!-- display multiple export formats as dropdown list -->\n      <p-menu #menu [model]=\"exportOptions()\" [popup]=\"true\" />\n      <p-button severity=\"secondary\" outlined (onClick)=\"menu.toggle($event)\">\n        <div class=\"core:flex core:gap-4 core:items-center\">\n        <i class=\"fa fa-download\"></i>\n        {{ 'Export as' | translate }}&nbsp;…\n        <i class=\"fa fa-caret-down\"></i>\n      </div>\n      </p-button>\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2023 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\n/**\n * Class representing a record set returned by API.\n */\nexport class Record {\n  aggregations: any;\n  id?: string;\n  hits: any;\n  links: any;\n}\n\nexport class SearchResult {\n  type: string;\n  records: Record;\n}\n\nexport interface File {\n  updated: string;\n  size: string;\n  url?: string;\n  mimetype: string;\n  version_id: string;\n  is_head: boolean;\n  created: string;\n  tags: any;\n  delete_marker: boolean;\n  links: {\n    self: string,\n    version?: string,\n    uploads?: string,\n    commit?: string,\n    content?: string\n  };\n  checksum: string;\n  key: string;\n  showInfo: boolean;\n  showChildren: boolean;\n  metadata: any;\n}\n\n/**\n * Interface representing a search property, on which we can do a specific search\n * with query string like: `q=title:query`.\n */\nexport interface SearchField {\n  label: string;\n  path: string;\n  selected?: boolean;\n}\n\n/** Interface representing a search filter */\nexport interface SearchFilter {\n  filter: string;\n  label: string;\n  value: string;\n  /* Display filter only if there is a query.\n  This is overridden by the allowEmptySearch parameter\n  in the resource configuration. */\n  showIfQuery?: boolean;\n  /* If you set this value, the url parameter will still be present,\n  but with different values */\n  disabledValue?: string;\n  persistent?: boolean;\n  url?: {\n    external?: boolean;\n    link?: string;\n    routerLink?: Array<string>;\n    target?: string;\n    title?: string;\n  };\n}\n\n/**\n * Interface representing a collection of SearchFilters with label.\n * The label adds a title to the interface.\n *\n * Example on the interface:\n *\n * Show only (label):\n * Filter 1\n * Filter 2\n * etc…\n */\nexport interface SearchFilterSection {\n  label: string;\n  filters: SearchFilter[];\n}\n\n/** Interfaces for an aggregation */\nexport interface Aggregation {\n  key: string;\n  bucketSize: any;\n  value: { buckets: Array<any> };\n  expanded: boolean;\n  loaded?: boolean;\n  doc_count?: number;\n  type?: string;\n  config?: AggregationConfig;\n  name?: string;\n}\n\n/**\n * Interface to describe an aggregation configuration\n *\n * Additionally to aggregation buckets, an aggregation configuration object could be\n * provided to control the aggregation display behavior. The configuration keys depends\n * on the aggregation type.\n *\n * attributes are :\n *   @attribute type - string: the type of aggregation (ex date-range, sum, date-histogram, ...)\n *   @attribute min - number: the minimum value into the aggregation buckets.\n *   @attribute max - number: the maximum value into the aggregation buckets.\n *   @attribute step - number: the step uses between to value.\n *   @attributes any additional/not known attributes.\n */\nexport interface AggregationConfig {\n  type?: string,\n  min?: number,\n  max?: number,\n  step?: number\n  [x: string | number | symbol]: unknown  // allow additional properties\n}\n","/*\n * RERO angular core\n * Copyright (C) 2022-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { AbstractControl } from '@angular/forms';\nimport { FormlyFieldConfig } from '@ngx-formly/core';\n\nexport function emailValidator(field: FormlyFieldConfig) {\n  // Regex pattern to check email\n  const emailPattern = /^([A-Za-z0-9\\._%+-]+@[A-Za-z0-9\\.-]+\\.[A-Z|a-z]{2,})$/;\n  if ( field.props?.type !== 'email' || field.validators?.email) {\n    return;\n  }\n\n  field.validators = field.validators || {};\n  field.validators.email = {\n    expression: (control: AbstractControl) => control.value ? (new RegExp(emailPattern)).test(control.value) : true,\n    message: `This value is not a valid email.`,\n  };\n}\n","/*\n * RERO angular core\n * Copyright (C) 2021-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { AfterViewInit, Component, ElementRef, Type, ViewChild } from '@angular/core';\nimport { FieldType, FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FormlyFieldProps } from '@ngx-formly/primeng/form-field';\nimport { FormlyFieldTextArea } from '@ngx-formly/primeng/textarea';\nimport EasyMDE from 'easymde';\n\ninterface TextAreaProps extends FormlyFieldProps {\n  maxHeight?: string;\n  minHeight: string;\n  placeholder?: string;\n  promptURLs: boolean;\n  spellChecker: boolean;\n  status: boolean;\n  toolbar: any[];\n}\n\nexport interface FormlyTextAreaFieldConfig extends FormlyFieldConfig<TextAreaProps> {\n  type: 'textarea' | Type<FormlyFieldTextArea>;\n}\n\n/**\n * Component to display textarea as a markdown editor.\n */\n@Component({\n    selector: 'ng-core-editor-formly-field-markdown',\n    template: `\n    <div class=\"core:my-2\">\n      <textarea pTextarea #textarea></textarea>\n      @if (showError) {\n        <div class=\"text-error core:my-2\">\n          <formly-validation-message [field]=\"field\"/>\n        </div>\n      }\n    </div>\n  `,\n    standalone: false\n})\nexport class MarkdownFieldComponent extends FieldType<FieldTypeConfig<TextAreaProps>> implements AfterViewInit {\n  // Reference to textarea element.\n  @ViewChild('textarea') textarea: ElementRef;\n\n  /** Default options */\n  defaultOptions?: Partial<FieldTypeConfig<TextAreaProps>> = {\n    props: {\n      minHeight: '500px',\n      promptURLs: true,\n      spellChecker: false,\n      status: false,\n      toolbar: [\n        'bold',\n        'italic',\n        'heading',\n        '|',\n        'unordered-list',\n        'ordered-list',\n        '|',\n        'link',\n        'image',\n        '|',\n        'preview',\n        'fullscreen',\n        '|',\n        'guide',\n      ]\n    }\n  };\n\n  /**\n   * Markdown editor initialization and listen for changes to update the model\n   * value.\n   */\n  ngAfterViewInit(): void {\n    const mde = new EasyMDE({\n      spellChecker: this.props.spellChecker,\n      promptURLs: this.props.promptURLs,\n      initialValue: this.formControl.value,\n      maxHeight: this.props.maxHeight,\n      minHeight: this.props.minHeight,\n      toolbar: this.props.toolbar,\n      element: this.textarea.nativeElement,\n      status: this.props.status,\n    });\n\n    mde.codemirror.on('change', () => {\n      this.formControl.patchValue(mde.value());\n    });\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2022-2025 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport { FieldType, FormlyFieldConfig } from '@ngx-formly/core';\n\ninterface RadioButtonProps {\n  options: Option[];\n  style: 'stacked' | 'inline';\n};\n\ninterface Option {\n  label: string;\n  value: string;\n  disabled: boolean;\n};\n\n@Component({\n    selector: 'ng-core-editor-field-radio-button',\n    template: `\n  <ng-template #radioButton let-option=\"option\" let-class=\"class\">\n    <div class=\"core:flex\">\n      <p-radiobutton\n        [inputId]=\"option.value\"\n        [formControl]=\"option.disabled ? disabledControl : formControl\"\n        [value]=\"option.value\"\n      />\n      <label [for]=\"option.value\" class=\"core:ml-1\">{{ option.untranslatedLabel | translate }}</label>\n    </div>\n  </ng-template>\n  @if (props.style === 'stacked') {\n    @for (option of props.options | async; track option.value) {\n      <ng-container [ngTemplateOutlet]=\"radioButton\" [ngTemplateOutletContext]=\"{option}\"/>\n    }\n  } @else {\n    <div class=\"core:flex core:gap-2\">\n    @for (option of props.options | async; track option.value) {\n      <ng-container [ngTemplateOutlet]=\"radioButton\" [ngTemplateOutletContext]=\"{option}\"/>\n    }\n    </div>\n  }\n  `,\n    changeDetection: ChangeDetectionStrategy.OnPush,\n    standalone: false\n})\nexport class RadioButtonComponent extends FieldType<FormlyFieldConfig<RadioButtonProps>> {\n\n  defaultOptions?: Partial<FormlyFieldConfig<RadioButtonProps>> = {\n    props: {\n      options: [],\n      style: 'stacked'\n    }\n  };\n\n  get disabledControl() {\n    return new FormControl({ value: this.formControl.value, disabled: true });\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';\nimport { AbstractControl, ValidatorFn } from '@angular/forms';\nimport { FieldType, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FormlyFieldProps } from '@ngx-formly/primeng/form-field';\n\ninterface ExtraTextAreaProps extends FormlyFieldProps {\n  displayChars: boolean;\n  displayWords: boolean;\n  limitWords?: number;\n  limitChars?: number;\n}\n\n@Component({\n    selector: 'ng-core-editor-formly-field-textarea',\n    template: `\n    <textarea\n      pTextarea\n      [formControl]=\"formControl\"\n      [cols]=\"props.cols\"\n      [rows]=\"props.rows\"\n      class=\"core:w-full\"\n      [class.is-invalid]=\"showError\"\n      [formlyAttributes]=\"field\"\n    ></textarea>\n    @if (field.props.limitWords || field.props.displayWords) {\n      <ng-container\n        [ngTemplateOutlet]=\"counter\"\n        [ngTemplateOutletContext]=\"{\n          limit: field.props.limitWords,\n          count: countWords,\n          label: 'Number of words' | translate\n        }\"></ng-container>\n    }\n    @if (field.props.limitChars || field.props.displayChars) {\n      <ng-container\n        [ngTemplateOutlet]=\"counter\"\n        [ngTemplateOutletContext]=\"{\n          limit: field.props.limitChars,\n          count: countChars,\n          label: 'Number of chars' | translate\n        }\"></ng-container>\n    }\n    <ng-template #counter let-limit=\"limit\" let-count=\"count\" let-label=\"label\">\n      <span class=\"core:text-sm core:text-muted-color core:inline-block core:mr-4\">\n        {{ label }}: {{ count }}\n        @if (limit) {\n          / {{ limit }}\n        }\n      </span>\n    </ng-template>\n  `,\n    changeDetection: ChangeDetectionStrategy.OnPush,\n    standalone: false\n})\nexport class TextareaFieldComponent extends FieldType<FormlyFieldConfig<ExtraTextAreaProps>> implements OnInit {\n  /** Default properties */\n  defaultOptions?: Partial<FormlyFieldConfig<ExtraTextAreaProps>> = {\n    props: {\n      displayChars: false,\n      displayWords: false,\n    }\n  };\n\n  /**\n   * Get the number of chars.\n   *\n   * @returns The number of chars.\n   */\n  get countChars(): number {\n    return this.formControl.value ? this.formControl.value.length : 0;\n  }\n\n  /**\n   * Get the number of words.\n   *\n   * @returns The number of words.\n   */\n  get countWords(): number {\n    return this.formControl.value ? this.formControl.value.split(/\\s+/).length : 0;\n  }\n\n  /**\n   * Component init.\n   *\n   * Adds validator for chars and words.\n   * Check if the current value does not exceed the limit value for chars or words.\n   */\n  ngOnInit(): void {\n    if (this.props.limitWords || this.props.limitChars) {\n      this.formControl.setValidators([this.limitValidator(), this.formControl.validator]);\n      this.formControl.updateValueAndValidity();\n    }\n  }\n\n  /**\n   * Form validator to check if the value is not greater than the limit.\n   *\n   * @returns A validator function returning the eventual error.\n   */\n  limitValidator(): ValidatorFn {\n    return (control: AbstractControl): { [key: string]: any } | null => {\n      if (this.props.limitWords && this.countWords > this.props.limitWords) {\n        return { limitWords: { value: control.value } };\n      }\n\n      if (this.props.limitChars && this.countChars > this.props.limitChars) {\n        return { limitChars: { value: control.value } };\n      }\n\n      return null;\n    };\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { Component, OnInit } from '@angular/core';\nimport { FieldWrapper } from '@ngx-formly/core';\n\n@Component({\n    selector: 'ng-core-card-wrapper',\n    template: `\n  @if (!props?.isRoot) {\n    <p-fieldset>\n      <ng-template #header>\n          <ng-core-label-editor [field]=\"field\" />\n      </ng-template>\n      <ng-template #fieldComponent></ng-template>\n    </p-fieldset>\n    } @else {\n      <ng-template #fieldComponent></ng-template>\n    }\n  `,\n    standalone: false\n})\nexport class CardWrapperComponent extends FieldWrapper implements OnInit {\n  /** OnInit hook */\n  ngOnInit() {\n    // remove the field label as it is displayed by this wrapper\n    this.field.props.hideLabel = true;\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { FieldWrapper } from '@ngx-formly/core';\n\n@Component({\n    selector: 'ng-core-form-field-wrapper',\n    template: `\n    <div class=\"core:flex core:flex-col core:gap-2\" [class]=\"props.cssClass\" [class.has-error]=\"showError\">\n      <!-- label -->\n      @if (props.label && props.hideLabel !== true) {\n        <div>\n          <label [attr.for]=\"id\" [pTooltip]=\"props.description\" tooltipPosition=\"top\">\n            {{ props.label }}\n            @if (props.required && props.hideRequiredMarker !== true) {\n              &nbsp;*\n            }\n          </label>\n        </div>\n      }\n      <div class=\"core:flex core:content-center core:grow core:gap-1\">\n        <div class=\"core:grow\">\n          <!-- field -->\n          <ng-template #fieldComponent></ng-template>\n        </div>\n          @if (canAdd() || canRemove()) {\n          <div class=\"core:flex core:gap-1 core:items-center\">\n            <!-- clone button -->\n            @if (canAdd()) {\n              <p-button icon=\"fa fa-clone\" severity=\"secondary\" [text]=\"true\" (onClick)=\"add()\" />\n            }\n            <!-- trash button -->\n            @if (canRemove()) {\n              <p-button icon=\"fa fa-trash\" severity=\"secondary\" [text]=\"true\" (onClick)=\"remove()\" />\n            }\n          </div>\n          }\n        </div>\n      @if (showError) {\n        <div class=\"text-error core:my-2\">\n          <formly-validation-message [field]=\"field\"/>\n        </div>\n      }\n   </div>\n  `,\n    changeDetection: ChangeDetectionStrategy.OnPush,\n    standalone: false\n})\nexport class FormFieldWrapperComponent extends FieldWrapper {\n\n  /** Hide the field */\n  remove(): void {\n    switch (this.field.parent.type) {\n      case 'object':\n        this.field.props.setHide ? this.field.props.setHide(this.field, true): this.field.hide = true;\n        break;\n      case 'array':\n        this.field.parent.props.remove(Number(this.field.key));\n        break;\n    }\n  }\n\n  /**\n   * Is the field can be hidden?\n   * @returns boolean, true if the field can be hidden\n   */\n  canRemove(): boolean {\n    switch (this.field.parent.type) {\n      case 'object':\n        if (!this.field.props?.editorConfig?.longMode) {\n          return false;\n        }\n        return (!this.field.props.required && !this.field.hide);\n      case 'array':\n        return this.field.parent.props.canRemove();\n      default:\n        return false;\n      }\n  }\n\n  /**\n   * Is the field can be hidden?\n   * @returns boolean, true if the field can be hidden\n   */\n  canAdd(): boolean {\n    if (this.field.parent.type === 'array') {\n      return this.field.parent.props.canAdd();\n    }\n    return false;\n  }\n\n  /** Add a new element */\n  add(): void {\n    if (this.field.parent.type === 'array') {\n      const index = Number(this.field.key) + 1;\n      this.field.parent.props.add(index);\n    }\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Component } from '@angular/core';\nimport { FieldWrapper } from '@ngx-formly/core';\n\n@Component({\n    selector: 'ng-core-hide-wrapper',\n    // do not include the children\n    template: '',\n    standalone: false\n})\nexport class HideWrapperComponent extends FieldWrapper {\n\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Injectable } from '@angular/core';\nimport { cloneDeep } from 'lodash-es';\nimport { BehaviorSubject, Observable } from 'rxjs';\n\n/**\n * Interface representing aggregations filters\n */\nexport interface AggregationsFilter {\n  key: string;\n  values: Array<any>;\n}\n\n/**\n * Service for managing records search.\n */\n@Injectable({\n  providedIn: 'root',\n})\nexport class RecordSearchService {\n  /** Aggregations filters array */\n  private _aggregationsFilters: Array<AggregationsFilter> = null;\n\n  /** Aggregations filters subject */\n  private _aggregationsFiltersSubject: BehaviorSubject<Array<AggregationsFilter>>;\n\n  /**\n   * Constructor, initialize aggregations filters subject.\n   */\n  constructor() {\n    this._aggregationsFiltersSubject = new BehaviorSubject(this._aggregationsFilters);\n  }\n\n  /**\n   * Returns an observable which emits aggregations filters.\n   */\n  get aggregationsFilters(): Observable<Array<AggregationsFilter>> {\n    return this._aggregationsFiltersSubject.asObservable();\n  }\n\n  /**\n   * Removes the given value from selected filters and removes all children\n   * selected values, too.\n   * @param key Aggregation key\n   * @param bucket Bucket containing the value to remove\n   */\n  removeAggregationFilter(key: string, bucket: any) {\n    this.removeFilter(key, bucket.key.toString());\n    this.removeChildrenFilters(bucket);\n    this.removeParentFilters(bucket);\n    // Update selected aggregations filters\n    this._aggregationsFiltersSubject.next(cloneDeep(this._aggregationsFilters));\n  }\n\n  /**\n   * Set all aggregations filters and emit the list.\n   * @param aggregationsFilters List of aggregations filters\n   * @param forceRefresh Force the refresh of aggregations filters\n   */\n  setAggregationsFilters(aggregationsFilters: Array<AggregationsFilter>, forceRefresh: boolean = false) {\n    // TODO: If the filter is in a child bucket, checks if all parents are\n    // selected, too. If not, adds all parents filters.\n    if (!forceRefresh && JSON.stringify(this._aggregationsFilters) !== JSON.stringify(aggregationsFilters)) {\n      forceRefresh = true;\n    }\n\n    if (forceRefresh) {\n      this._aggregationsFilters = cloneDeep(aggregationsFilters);\n      this._aggregationsFiltersSubject.next(cloneDeep(this._aggregationsFilters));\n    }\n  }\n\n  /**\n   * Stores selected values for an aggregation or removes it if values are empty.\n   * @param term Term (aggregation key)\n   * @param values Selected values\n   * @param bucket The complete ElasticSearch affected bucket configuration\n   */\n  updateAggregationFilter(term: string, values: string[], bucket: any = null) {\n     if (this._aggregationsFilters === null) {\n      this._aggregationsFilters = [];\n    }\n\n    if (bucket) {\n      this.removeParentFilters(bucket);\n      this.removeChildrenFilters(bucket);\n    }\n\n    if (values.length === 0) {\n      // no more items selected, remove filter\n      this._aggregationsFilters = this._aggregationsFilters.filter(item => item.key !== term);\n    } else {\n      const filter = this._aggregationsFilters.find(item => item.key === term);\n      // In both cases values are affected with destructuring assignment, to\n      // avoid values to be modified outside the service, as array are assigned\n      // by reference.\n      if (filter) {\n        // update existing filter\n        filter.values = [...values];\n      } else {\n        // add new filter\n        this._aggregationsFilters.push({ key: term, values: [...values] });\n      }\n    }\n    this._aggregationsFiltersSubject.next(cloneDeep(this._aggregationsFilters));\n  }\n\n  /**\n   * Remove a filter from the current aggregations filters.\n   * @param key - the filter name\n   * @param value - the filter value\n   * @param emit - is the `_aggregationsFiltersSubject` should be emitted\n   */\n  removeFilter(key: string, value: string, emit: boolean = false): void {\n    const filter = this._aggregationsFilters.find(item => item.key === key);\n    if (filter) {\n      filter.values = filter.values.filter(item => item !== value);\n      // No more selected values, remove key from aggregations filters.\n      if (filter.values.length === 0) {\n        this._aggregationsFilters = this._aggregationsFilters.filter(item => item.key !== filter.key);\n      }\n    }\n    if (emit) {\n      this._aggregationsFiltersSubject.next(cloneDeep(this._aggregationsFilters));\n    }\n  }\n\n  /**\n   * Check if a given filter exist in the current aggregations filters.\n   * @param key - the filter name\n   * @param value - the filter value\n   * @returns `true` if exists\n   */\n   hasFilter(key: string, value: string): boolean {\n    const filter = this._aggregationsFilters.find((a) => a.key === key);\n    return !!(filter && filter.values.some(v => v === value));\n  }\n\n  /**\n   * Remove the parent filters of a given bucket.\n   * @param bucket - The ElasticSearch bucket\n   */\n  removeParentFilters(bucket) {\n    if (bucket.parent) {\n      this.removeParentFilters(bucket.parent);\n    }\n    this.removeFilter(bucket.aggregationKey, bucket.key);\n  }\n\n  /**\n   * Removes children filters of a given bucket.\n   * @param bucket - The ElasticSearch bucket\n   */\n  removeChildrenFilters(bucket) {\n    for (const k of Object.keys(bucket).filter(key => bucket[key].buckets)) {\n      const aggregationsKey = k;\n      for (const childBucket of bucket[k].buckets) {\n        this.removeFilter(aggregationsKey, childBucket.key);\n        this.removeChildrenFilters(childBucket);\n      }\n    }\n  }\n\n  /**\n   * Check if a children filter of a given bucket exists\n   * @param bucket - The ElasticSearch bucket\n   * @returns `true` if the bucket has children with a corresponding filter\n   */\n  hasChildrenFilter(bucket) {\n    for (const k of Object.keys(bucket).filter(key => typeof bucket[key] === 'object' && bucket[key].buckets)) {\n      const aggregationsKey = k;\n      for (const childBucket of bucket[k].buckets) {\n        const filter = this._aggregationsFilters.find((v) => v.key === aggregationsKey);\n        if ((filter && filter.values.includes(childBucket.key)) || this.hasChildrenFilter(childBucket)) {\n          return true;\n        }\n      }\n    }\n    return false;\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-20224 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Component, Input } from '@angular/core';\nimport { ResultItem } from './result-item';\n\n/**\n * Component for displaying record as JSON in brief views.\n */\n@Component({\n    template: `\n    {{ record|json }}\n    @if (detailUrl) {\n      <div class=\"core:my-4\">\n        @if (detailUrl.external === false) {\n          <p-button outlined icon=\"pi pi-eye\" [label]=\"'Show' | translate\" [routerLink]=\"detailUrl.link\" />\n        } @else {\n          <p-button outlined icon=\"pi pi-eye\" [label]=\"'Show' | translate\" [href]=\"detailUrl.link\" />\n        }\n      </div>\n    }\n  `,\n    standalone: false\n})\nexport class JsonComponent implements ResultItem {\n  // Record data.\n  @Input() record: any;\n\n  // Type of resource.\n  @Input() type: string;\n\n  // Info for detail URL link.\n  @Input() detailUrl: { link: string, external: boolean };\n}\n","/*\n * RERO angular core\n * Copyright (C) 2019-2024 RERO\n * Copyright (C) 2019-2023 UCLouvain\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { AfterViewInit, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output, ViewChild, ViewContainerRef, inject } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { Observable } from 'rxjs';\nimport { ActionStatus } from '../../action-status';\nimport { JsonComponent } from './item/json.component';\nimport { ResultItem } from './item/result-item';\n\nexport interface IDeleteRecordEvent {\n  pid: string;\n  type?: string | undefined | null\n}\n\n@Component({\n    selector: 'ng-core-record-search-result',\n    templateUrl: './record-search-result.component.html',\n    standalone: false\n})\nexport class RecordSearchResultComponent implements OnInit, AfterViewInit {\n\n  protected changeDetectorRef: ChangeDetectorRef = inject(ChangeDetectorRef);\n  protected router: Router = inject(Router);\n\n  // Store current URL to come back to the same page\n  currentUrl: string = null;\n\n  // Store if record can be deleted or not\n  deleteStatus: ActionStatus;\n\n  // Store if record can be updated or not\n  updateStatus: ActionStatus;\n\n  // Store if record can be use or not\n  useStatus: ActionStatus;\n\n  // Detail URL value, resolved by observable property detailUrl$.\n  detailUrl: { link: string, external: boolean };\n\n  // Record to display\n  @Input() record: { id: string, metadata: { pid: string } };\n\n  // Type of record\n  @Input() type: string;\n\n  // Component for displaying item view\n  @Input() itemViewComponent: any;\n\n  // Admin mode (edit, remove, add, ...)\n  @Input() adminMode: ActionStatus = { can: false, message: '' };\n\n  // Record can be updated\n  @Input() canUpdate$: Observable<ActionStatus>;\n\n  // Record can be removed\n  @Input() canDelete$: Observable<ActionStatus>;\n\n  // Record can be used (mainly for templates)\n  @Input() canUse$: Observable<ActionStatus>;\n\n  // Aggregations\n  @Input() aggregations: Array<object>;\n\n  // Observable emitting current value of record URL.\n  @Input() detailUrl$: Observable<{ link: string, external: boolean }> = null;\n\n  // Event emitted when a record is deleted\n  @Output() deletedRecord = new EventEmitter<IDeleteRecordEvent>();\n\n  @Output() deleteMessageEvent = new EventEmitter<string>();\n\n  // Location for component item creation\n  @ViewChild('item', { read: ViewContainerRef }) container!: ViewContainerRef;\n\n  // Return a message containing the reasons why the item cannot be deleted\n  get deleteInfoMessage(): string {\n    return this.deleteStatus.message;\n  }\n\n  // OnInit hook\n  ngOnInit() {\n    this.currentUrl = window.location.href;\n    if (this.canDelete$) {\n      this.canDelete$.subscribe((result: ActionStatus) => {\n        this.deleteStatus = result;\n      });\n    }\n\n    if (this.canUpdate$) {\n      this.canUpdate$.subscribe((result: ActionStatus) => {\n        this.updateStatus = result;\n      });\n    }\n\n    if (this.canUse$) {\n      this.canUse$.subscribe((result: ActionStatus) => {\n        this.useStatus = result;\n      });\n    }\n\n    if (this.detailUrl$) {\n      this.detailUrl$.subscribe((url: { link: string, external: boolean }) => {\n        this.detailUrl = url;\n      });\n    }\n  }\n\n  // AfterViewInit hook\n  ngAfterViewInit(): void {\n    this.container.clear();\n    const component = this.container.createComponent(this.itemViewComponent || JsonComponent);\n    (component.instance as ResultItem).record = this.record;\n    (component.instance as ResultItem).type = this.type;\n    (component.instance as ResultItem).detailUrl = this.detailUrl;\n    this.changeDetectorRef.detectChanges();\n  }\n\n  /**\n   * Delete a record\n   * @param pid - string, pid to delete\n   * @param type - string, resource type\n   */\n  deleteRecord(pid: string, type?: string): void {\n    if (this.deleteStatus.can) {\n      this.deletedRecord.emit({ pid, type });\n    } else {\n      this.deleteMessageEvent.emit(this.deleteStatus.message.replace(new RegExp('\\n', 'g'), '<br>'));\n    }\n  }\n\n  /**\n   * Use a record\n   */\n  useRecord() {\n    this.router.navigateByUrl(this.useStatus.url);\n  }\n}\n","<!--\n  RERO angular core\n  Copyright (C) 2019-2024 RERO\n  Copyright (C) 2019-2023 UCLouvain\n\n  This program is free software: you can redistribute it and/or modify\n  it under the terms of the GNU Affero General Public License as published by\n  the Free Software Foundation, version 3 of the License.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU Affero General Public License for more details.\n\n  You should have received a copy of the GNU Affero General Public License\n  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n-->\n<div class=\"core:flex core:items-start\">\n  <div class=\"core:grow\">\n    <ng-container #item></ng-container>\n  </div>\n  <div class=\"core:flex core:flex-none core:gap-1 core:justify-end core:ml-2\">\n    @if (adminMode.can) {\n        <!-- use button -->\n        @if (useStatus?.can && useStatus?.url) {\n          <p-button\n            [outlined]=\"true\"\n            [ariaLabel]=\"'Use' | translate\"\n            (onClick)=\"useRecord()\"\n            [title]=\"'Use' | translate\"\n            icon=\"fa fa-hand-o-right\"\n          />\n        }\n\n        <!-- edit button -->\n        @if (updateStatus?.can) {\n          <p-button\n            [outlined]=\"true\"\n            [ariaLabel]=\"'Edit' | translate\"\n            [routerLink]=\"updateStatus.routerLink || ['edit', record.id]\"\n            icon=\"fa fa-pencil\"\n          />\n        }\n\n        <!-- delete button -->\n        @if (deleteStatus?.can || deleteStatus?.message) {\n          <p-button\n          icon=\"fa fa-trash\"\n          severity=\"danger\"\n          class=\"core:pointer-events-auto\"\n          outlined\n          [title]=\"'Delete'|translate\"\n          (onClick)=\"deleteRecord(record.id, deleteStatus?.type)\"\n          [pTooltip]=\"tooltipContent\"\n          tooltipPosition=\"top\"\n          [disabled]=\"!deleteStatus.can\"\n          [tooltipDisabled]=\"deleteStatus.can\"\n        />\n        <ng-template #tooltipContent>\n          <span [innerHTML]=\"deleteStatus.message\"></span>\n        </ng-template>\n        }\n    }\n  </div>\n</div>\n","/*\n * RERO angular core\n * Copyright (C) 2019-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { inject, Injectable } from '@angular/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { Observable, of } from 'rxjs';\n\n/**\n * To implement your translation, please do it in your application\n * by overloading this service.\n * Example:\n *\n * import { BucketNameService as CoreBucketNameService } from '@rero/ng-core';\n * import { BucketNameService } from './service/bucket-name.service';\n *\n * @NgModule({\n *     providers: [\n *         { provide: CoreBucketNameService, useClass: BucketNameService }\n *     ]\n * });\n *\n */\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class BucketNameService {\n\n  protected translateService: TranslateService = inject(TranslateService);\n\n  /**\n   * Transform aggregation name\n   * @param aggregationKey - type of aggregation\n   * @param value - value of current aggregation\n   * @returns Observable of string\n   */\n  transform(aggregationKey: string, value: string): Observable<string> {\n    let data = value;\n    // Legacy: for compatibility\n    switch (aggregationKey) {\n      case 'language': data = `lang_${value}`; break;\n    }\n    // End Legacy\n    return of(this.translateService.instant(data));\n  }\n}\n\nexport interface IBucketNameService {\n  transform(aggregationKey: string, value: string): Observable<string>;\n}\n","/*\n * RERO angular core\n * Copyright (C) 2019-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { inject, Pipe, PipeTransform } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { BucketNameService } from '../service/bucket-name.service';\n\n@Pipe({\n    name: 'bucketName',\n    standalone: false\n})\nexport class BucketNamePipe implements PipeTransform {\n\n  protected bucketNameService: BucketNameService = inject(BucketNameService);\n\n  /**\n   * Transform value if the type of aggregation is language\n   * @param value - aggregation value\n   * @param aggregationKey - aggregation type\n   * @returns Observable<string>\n   */\n  transform(value: string, aggregationKey: string): Observable<string> {\n    return this.bucketNameService.transform(aggregationKey, value);\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Component, OnChanges, OnDestroy, OnInit, SimpleChanges, inject, input } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { AggregationsFilter, RecordSearchService } from '../../record-search.service';\n\n@Component({\n    selector: 'ng-core-record-search-aggregation-buckets',\n    templateUrl: './buckets.component.html',\n    standalone: false\n})\nexport class BucketsComponent implements OnInit, OnDestroy, OnChanges {\n\n  protected recordSearchService: RecordSearchService = inject(RecordSearchService);\n\n  // COMPONENT ATTRIBUTES ============================================================\n  /** Buckets list for aggregation */\n  buckets = input.required<any[]>();\n  /** Aggregation key */\n  aggregationKey = input.required<string>();\n  /** Bucket size, if not null, reduce displayed items to this size. */\n  size = input<number|null>();\n\n  /** More and less on aggregation content (facet) */\n  moreMode = true;\n  /** Current selected values for the aggregations */\n  aggregationsFilters: Array<AggregationsFilter> = [];\n  /** Children of current bucket */\n  bucketChildren: any = {};\n\n  /** Subscription to aggregationsFilters observable */\n  private aggregationsFiltersSubscription: Subscription;\n\n\n  // GETTERS & SETTERS =================================================================\n  /** Returns selected filters for the aggregation key. */\n  get aggregationFilters(): Array<string> {\n    const aggregationFilters = this.aggregationsFilters.find((item: AggregationsFilter) => item.key === this.aggregationKey());\n    return aggregationFilters === undefined\n        ? []\n        : aggregationFilters.values;\n  }\n\n  /** Get bucket size. */\n  get bucketSize(): number {\n    const size = this.buckets().length;\n    return this.size() === null || this.moreMode === false\n        ? size\n        : this.size();\n  }\n\n  /** Get the number of bucket items with non-zero doc_count. */\n  get bucketsLength(): number {\n    return this.buckets().reduce((acc, bucket) => (bucket.doc_count) ? acc+1 : acc, 0);\n  }\n\n  /** Should display more or less link for a bucket ? */\n  get displayMoreAndLessLink(): boolean {\n    return (this.size() === null)\n        ? false\n        : this.bucketsLength > this.size();\n  }\n\n  /**\n   * OnInit hook\n   *   Subscribe to aggregations filters observable for getting the aggregations filters each time\n   *   they will change.\n   */\n  ngOnInit() {\n    this.aggregationsFiltersSubscription = this.recordSearchService\n        .aggregationsFilters\n        .subscribe((aggregationsFilters: Array<AggregationsFilter>) => {\n          if (aggregationsFilters !== null) {\n            this.aggregationsFilters = aggregationsFilters;\n          }\n        });\n  }\n\n  /**\n   * OnChanges hook\n   *   Called each time an input property is modified.\n   *   If buckets are changed, refresh children buckets.\n   * @param changes - bucket changes\n   */\n  ngOnChanges(changes: SimpleChanges) {\n    if (changes.buckets) {\n      for (const bucket of this.buckets()) {\n        this.bucketChildren[bucket.key] = this.getBucketChildren(bucket);\n      }\n    }\n  }\n\n  /**\n   * OnDestroy hook\n   *   Unsubscribes from the observable of aggregations filters.\n   */\n  ngOnDestroy() {\n    this.aggregationsFiltersSubscription.unsubscribe();\n  }\n\n  // COMPONENT F£UNCTIONS =====================================================\n  /**\n   * Check if a value is present in selected filters.\n   * @param value: filter value (could be string, number, ...)\n   * @return `true` if value is present in the aggregation filters, `null` otherwise.\n   */\n  isSelected(value: any): boolean|null {\n    return this.aggregationFilters.includes(value.toString()) ? true : null;\n  }\n\n  /**\n   * Do we need to display the children?\n   * @return `true` if we want to display the children, `false` otherwise.\n   */\n  displayChildren(bucket): boolean {\n    return (\n      this.isSelected(bucket.key) ||\n      // not necessary but faster than hasChildrenFilter\n      bucket.indeterminate ||\n      // hasChildrenFilter is required to avoid blinks when a child is selected\n      this.recordSearchService.hasChildrenFilter(bucket)\n    );\n  }\n\n  /**\n   * Update selected filters by adding or removing the given value and push\n   * values to service.\n   * @param bucket - string: the selected bucket value (checked OR unchecked)\n   */\n  updateFilter(bucket: any) {\n    const index = this.aggregationsFilters.findIndex((item: AggregationsFilter) => item.key === this.aggregationKey());\n    if (index === -1) {\n      // No filters exist for the aggregation.\n      this.recordSearchService.updateAggregationFilter(this.aggregationKey(), [bucket.key], bucket);\n    } else {\n      const aggFilter = this.aggregationsFilters[index];\n      if (!aggFilter.values.includes(bucket.key.toString())) {\n        // Bucket value is not yet selected, we add value to selected values.\n        this.aggregationsFilters[index].values.push(bucket.key.toString());\n        this.recordSearchService.updateAggregationFilter(\n          this.aggregationKey(),\n          this.aggregationsFilters[index].values,\n          bucket\n        );\n      } else {\n        // Removes value from selected values and all children selected values.\n        this.recordSearchService.removeAggregationFilter(this.aggregationKey(), bucket);\n      }\n    }\n  }\n\n  /**\n   * Get children buckets\n   * @param bucket: parent bucket\n   * @return Bucket children list of given bucket\n   */\n  getBucketChildren(bucket: any): Array<any> {\n    const children = [];\n    for (const k of Object.keys(bucket).filter(key => typeof bucket[key] === 'object' && bucket[key].buckets)) {\n      children.push({\n        aggregationKey: k,\n        bucketSize: this.bucketSize,\n        key: k,\n        buckets: bucket[k].buckets,\n      });\n    }\n    return children;\n  }\n}\n","<!--\n  RERO angular core\n  Copyright (C) 2020-2025 RERO\n\n  This program is free software: you can redistribute it and/or modify\n  it under the terms of the GNU Affero General Public License as published by\n  the Free Software Foundation, version 3 of the License.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU Affero General Public License for more details.\n\n  You should have received a copy of the GNU Affero General Public License\n  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n-->\n@if (buckets()) {\n  <ul class=\"core:list-none core:text-sm\">\n  @for (bucket of buckets()|slice:0:bucketSize; track bucket.key; let index = $index) {\n    <li>\n        @if (bucket.doc_count) {\n          <div class=\"core:flex core:gap-1 core:items-start core:text-link-secondary core:mb-1\">\n            <p-checkbox\n              inputId=\"{{ bucket.aggregationKey }}-{{ index }}\"\n              binary\n              [indeterminate]=\"bucket.indeterminate\"\n              variant=\"filled\"\n              [ngModel]=\"isSelected(bucket.key)\"\n              (onChange)=\"updateFilter(bucket)\"\n            />\n            <label class=\"core:grow core:overflow-hidden\" for=\"{{ bucket.aggregationKey }}-{{ index }}\">\n              @if (bucket.name) {\n                {{ bucket.name }}\n              } @else {\n                {{ bucket.key | bucketName: aggregationKey() | async }}\n              }\n            </label>\n              <div class=\"core:pl-2\">\n                {{ bucket.doc_count }}\n              </div>\n          </div>\n        }\n      <div class=\"core:ml-6\">\n        @if (displayChildren(bucket)) {\n          @for (aggregation of bucketChildren[bucket.key]; track aggregation.key) {\n            <ng-core-record-search-aggregation-buckets\n              [buckets]=\"aggregation.buckets\"\n              [size]=\"aggregation.bucketSize\"\n              [aggregationKey]=\"aggregation.key\"\n            ></ng-core-record-search-aggregation-buckets>\n          }\n        }\n      </div>\n    </li>\n  }\n  </ul>\n}\n@if (displayMoreAndLessLink) {\n  <div class=\"core:flex core:justify-end\">\n    <span class=\"text-link\" (click)=\"moreMode = !moreMode\">{{ (moreMode ? 'more…' : 'less…') | translate }}</span>\n  </div>\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Component, OnDestroy, OnInit, inject, input } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { RecordSearchService } from '../../record-search.service';\n\n@Component({\n    selector: 'ng-core-aggregation-slider',\n    templateUrl: './slider.component.html',\n    standalone: false\n})\nexport class AggregationSliderComponent implements OnDestroy, OnInit {\n\n  protected recordSearchService: RecordSearchService = inject(RecordSearchService);\n\n  // COMPONENT ATTRIBUTES =====================================================\n  /** The aggregation key. */\n  key = input<string>();\n  /** Buckets list */\n  buckets = input<any[]>();\n  /** The minimum value */\n  min = input<number>(1);\n  /** The maximum value */\n  max = input<number>(1000);\n  /** gap between each value. */\n  step = input<number>(1);\n\n  /** Range to search */\n  range: Array<number> = null;\n  /** True if route have aggregation query param. */\n  hasQueryParam = false;\n\n  /** Subscription to search service. */\n  private searchServiceSubscription: Subscription;\n\n  /**\n   * OnInit hook\n   * Subscribe to route changes for getting aggregation query parameter.\n   */\n  ngOnInit() {\n    this.range = [this.min(), this.max()];\n    this.searchServiceSubscription = this.recordSearchService\n        .aggregationsFilters\n        .subscribe((filters: any) => {\n          if (!filters) {\n            return;\n          }\n          let filter = filters.find((element: any) => element.key === this.key());\n          if (filter) {\n            filter = filter.values[0].split('--').map((item: string) => +item);\n            this.hasQueryParam = true;\n            this.range = filter;\n          } else {\n            this.range = [this.min(), this.max()];\n          }\n        });\n  }\n\n  /**\n   * OnDestroy hook\n   * Unsubscribes from search service.\n   */\n  ngOnDestroy() {\n    this.searchServiceSubscription.unsubscribe();\n  }\n\n  // COMPONENT FUNCTIONS ======================================================\n  /** Update aggregation filter. */\n  updateFilter() {\n    if (!this.range[0] || this.range[0] < this.min()) { this.range[0] = this.min(); }\n    if (!this.range[1] || this.range[1] > this.max()) { this.range[1] = this.max(); }\n    this.recordSearchService.updateAggregationFilter(this.key(), [\n      `${this.range[0]}--${this.range[1]}`,\n    ]);\n  }\n\n  /** Clear aggregation filter. */\n  clearFilter() {\n    this.hasQueryParam = false;\n    this.recordSearchService.updateAggregationFilter(this.key(), []);\n  }\n}\n","<!--\n  RERO angular core\n  Copyright (C) 2020-2024 RERO\n\n  This program is free software: you can redistribute it and/or modify\n  it under the terms of the GNU Affero General Public License as published by\n  the Free Software Foundation, version 3 of the License.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU Affero General Public License for more details.\n\n  You should have received a copy of the GNU Affero General Public License\n  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n-->\n<p-inputGroup>\n    <p-inputNumber\n      class=\"core:mr-1\"\n      inputId=\"integeronly\"\n      [(ngModel)]=\"range[0]\"\n      [min]=\"range[0]\"\n      [max]=\"range[1]\" />\n    <p-inputNumber\n      class=\"core:ml-1\"\n      inputId=\"integeronly\"\n      [(ngModel)]=\"range[1]\"\n      [min]=\"range[0]\"\n      [max]=\"range[1]\" />\n</p-inputGroup>\n<div class=\"core:flex core:justify-end core:mt-2 core:gap-2\">\n    <p-button size=\"small\" [label]=\"'Apply' | translate\" [outlined]=\"true\" (onClick)=\"$event.preventDefault(); updateFilter()\" />\n    @if (hasQueryParam) {\n      <p-button size=\"small\" [label]=\"'Clear filter' | translate\" [outlined]=\"true\" (onClick)=\"$event.preventDefault(); clearFilter()\" />\n    }\n</div>\n","/*\n * RERO angular core\n * Copyright (C) 2021-2025 RERO\n * Copyright (C) 2021 UCLouvain\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Component, OnDestroy, OnInit, inject, input } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { RecordSearchService } from '../../record-search.service';\nimport { TranslateService } from '@ngx-translate/core';\n\n@Component({\n    selector: 'ng-core-aggregation-date-range',\n    templateUrl: './date-range.component.html',\n    standalone: false\n})\nexport class AggregationDateRangeComponent implements OnInit, OnDestroy {\n\n  protected recordSearchService: RecordSearchService = inject(RecordSearchService);\n  protected translateService: TranslateService = inject(TranslateService);\n\n  // COMPONENTS ATTRIBUTES ====================================================\n  // Aggregation key\n  key = input.required<string>();\n  // Components configuration\n  config = input.required<any>();\n\n  // Model used for Datepicker field.\n  dateRangeModel: Date[] | undefined;\n  // Date minimum\n  minDate: any = null;\n  // Date maximum\n  maxDate: any = null;\n\n  /** True if route have aggregation query param. */\n  hasQueryParam = false;\n  buttonConfig = [];\n\n  /** Subscription to search service. */\n  private searchServiceSubscription: Subscription;\n\n  /** OnInit hook */\n  ngOnInit(): void {\n    // Define min/max values if not exists\n    if (this.config().min) {\n      this.minDate = new Date(this.config().min);\n    } else{\n      this.minDate = new Date(1900, 0, 0);\n    }\n    if (this.config().max) {\n      this.maxDate = new Date(this.config().max);\n    } else {\n      this.maxDate = new Date();\n    }\n    this.dateRangeModel = [this.minDate, this.maxDate];\n\n    this.searchServiceSubscription = this.recordSearchService.aggregationsFilters.subscribe((filters: any) => {\n      if (!filters) {\n        return;\n      }\n      const filter = filters.find((element: any) => element.key === this.key());\n      this.hasQueryParam = filter !== undefined;\n      this.dateRangeModel = (filter)\n        ? filter.values[0].split('--').map((item: string) => new Date(+item))  // split filter data and transform each part into Date\n        :  [this.minDate, this.maxDate];\n    });\n    const today = new Date();\n    this.buttonConfig = [\n    {\n      value: [new Date(new Date().setDate(today.getDate() - 31)), today],\n      label: this.translateService.instant('Last month')\n    }, {\n      value: [new Date(new Date().setDate(today.getDate() - 366)), today],\n      label: this.translateService.instant('Last year')\n    }, {\n      value: [new Date(today.getFullYear(), today.getMonth(), 1), new Date(today.getFullYear(), today.getMonth() + 1, 0)],\n      label: this.translateService.instant('This month')\n    },\n    {\n      value: [new Date(today.getFullYear(), 0, 1), new Date(today.getFullYear() + 1, 0, 1)],\n      label: this.translateService.instant('This year')\n    }\n  ];\n  }\n  setRange(value: Date[]) {\n    this.dateRangeModel = value;\n    this.updateFilter();\n  }\n\n  /** OnDestroy hook */\n  ngOnDestroy(): void {\n    this.searchServiceSubscription.unsubscribe();\n  }\n\n  // COMPONENTS FUNCTIONS =====================================================\n  /** Update aggregation filter. */\n  updateFilter() {\n    if (this.dateRangeModel && this.dateRangeModel[0] && this.dateRangeModel[1]) {\n      this.recordSearchService.updateAggregationFilter(this.key(), [\n          `${this.dateRangeModel[0].getTime()}--${this.dateRangeModel[1].getTime()}`\n      ]);\n    }\n  }\n\n  /** Clear aggregation filter. */\n  clearFilter(): void {\n    this.recordSearchService.updateAggregationFilter(this.key(), []);\n  }\n}\n","<!--\n  RERO angular core\n  Copyright (C) 2021-2025 RERO\n  Copyright (C) 2021 UCLouvain\n\n  This program is free software: you can redistribute it and/or modify\n  it under the terms of the GNU Affero General Public License as published by\n  the Free Software Foundation, version 3 of the License.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU Affero General Public License for more details.\n\n  You should have received a copy of the GNU Affero General Public License\n  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n-->\n<p-datepicker\n  styleClass=\"core:w-full\"\n  inputStyleClass=\"core:text-center\"\n  [(ngModel)]=\"dateRangeModel\"\n  selectionMode=\"range\"\n  readonlyInput\n  showIcon\n>\n  <ng-template #footer>\n    <p-divider/>\n    <div class=\"core:grid core:grid-cols-12 core:gap-4\">\n      @for (cfg of buttonConfig; track cfg.value) {\n        <div class=\"core:col-span-6 core:flex core:justify-center\">\n          <p-button (onClick)=\"setRange(cfg.value)\" styleClass=\"core:w-full\" class=\"core:grow core:p-1\" outlined size=\"small\" [label]=\"cfg.label\" />\n        </div>\n      }\n    </div>\n  </ng-template>\n</p-datepicker>\n<div class=\"core:flex core:justify-end core:mt-2 core:gap-2\">\n  <p-button size=\"small\" [label]=\"'Apply' | translate\" outlined (onClick)=\"updateFilter()\" />\n  @if (hasQueryParam) {\n    <p-button size=\"small\" class=\"core:ml-1\" [label]=\"'Clear filter' | translate\" outlined (onClick)=\"clearFilter()\" />\n  }\n</div>\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Component, input, output } from '@angular/core';\nimport { Aggregation } from '../../record';\n\n@Component({\n    selector: 'ng-core-record-search-aggregation',\n    templateUrl: './aggregation.component.html',\n    standalone: false\n})\nexport class RecordSearchAggregationComponent {\n  // COMPONENT ATTRIBUTES =====================================================\n  /** Aggregation data */\n  aggregation = input<Aggregation>();\n  /** Current selected values */\n  aggregationsFilters = input.required<any[]>();\n  /** Output event when aggregation is clicked. */\n  aggregationClicked = output<{ key: string, expanded: boolean }>();\n\n  // GETTER & SETTER ==========================================================\n  /**\n   * Returns aggregations filters corresponding to the aggregation key.\n   * @return List of aggregation filters\n   */\n  get aggregationFilters(): Array<string> {\n    const aggregationFilters = this.aggregationsFilters().find((item: any) => item.key === this.aggregation().key);\n    return aggregationFilters === undefined ? [] : aggregationFilters.values;\n  }\n\n  /** Is the aggregation content should be displayed. */\n  get isAggregationDisplayed(): boolean {\n    return this.aggregation().expanded || this.aggregationFilters.length > 0;\n  }\n\n  // PUBLIC COMPONENTS ========================================================\n\n  /**\n   * Method called when the title of an aggregation is clicked.\n   */\n  toggleVisibility(): void {\n    // if filters are selected, we do nothing.\n    if (this.aggregationFilters.length > 0) {\n      return;\n    }\n    // Toggle aggregation expanded attribute\n    this.aggregation().expanded = !this.aggregation().expanded;\n    // Emit the value to parent.\n    this.aggregationClicked.emit({\n      key: this.aggregation().key,\n      expanded: this.aggregation().expanded,\n    });\n  }\n}\n","<!--\n  RERO angular core\n  Copyright (C) 2020-2024 RERO\n\n  This program is free software: you can redistribute it and/or modify\n  it under the terms of the GNU Affero General Public License as published by\n  the Free Software Foundation, version 3 of the License.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU Affero General Public License for more details.\n\n  You should have received a copy of the GNU Affero General Public License\n  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n-->\n<!-- Aggregation with no bucket, containing only the count. -->\n@if (aggregation().doc_count) {\n  <div class=\"core:mb-4\">\n    <ng-core-record-search-aggregation-buckets\n      [buckets]=\"[{key: '1', doc_count: aggregation().doc_count, name: aggregation().key | translate }]\"\n      [aggregationKey]=\"aggregation().key\"\n      [size]=\"aggregation().bucketSize\" />\n  </div>\n} @else {\n  <p-fieldset\n    [legend]=\"(aggregation().name || aggregation().key) | translate | ucfirst\"\n    [toggleable]=\"true\"\n    [collapsed]=\"!isAggregationDisplayed\"\n    (collapsedChange)=\"toggleVisibility()\"\n  >\n  <div class=\"core:p-2\">\n  @switch (aggregation().type) {\n    @case ('range') {\n      <ng-core-aggregation-slider\n        [key]=\"aggregation().key\"\n        [min]=\"aggregation().config.min || 1\"\n        [max]=\"aggregation().config.max || 100\"\n        [step]=\"aggregation().config.step || 1\"\n        [buckets]=\"aggregation().value.buckets\" />\n    }\n    @case ('date-range') {\n      <ng-core-aggregation-date-range\n        [key]=\"aggregation().key\"\n        [config]=\"aggregation().config\" />\n    }\n    @default {\n      @if (aggregation().value.buckets.length > 0) {\n        <ng-core-record-search-aggregation-buckets\n          [buckets]=\"aggregation().value.buckets\"\n          [aggregationKey]=\"aggregation().key\"\n          [size]=\"aggregation().bucketSize\" />\n      } @else {\n        @if (aggregation().loaded) {\n          <span class=\"core:text-sm\" translate>No result</span>\n        }\n      }\n    }\n  }\n</div>\n</p-fieldset>\n}\n","/*\n * RERO angular core\n * Copyright (C) 2022-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Component, computed, inject, input, OnChanges, output, SimpleChanges } from '@angular/core';\nimport { TranslateService } from '@ngx-translate/core';\n\nexport interface IFilter {\n  key: string;\n  aggregationKey: string;\n  name?: string;\n}\n\n@Component({\n    selector: 'ng-core-list-filters',\n    templateUrl: './list-filters.component.html',\n    standalone: false\n})\nexport class ListFiltersComponent {\n\n  protected translateService: TranslateService = inject(TranslateService);\n\n  /**\n   * All aggregations\n   */\n  aggregations = input<any[]>([]);\n\n  // Selected aggregations filters\n  aggregationsFilters = input<any>([]);\n\n  // Search filters\n  searchFilters = input<any[]>([]);\n\n  /** Remove filter event */\n  remove = output<IFilter>();\n\n  // Filters to hide\n  filtersToHide = ['simple'];\n\n  // Filters selected\n  filters = computed(() => this.getActiveFilters());\n\n  /**\n   * Returns promised filters\n   * @returns the array of IFilter\n   */\n  private getActiveFilters(): IFilter[] {\n    const filterSet = [];\n    this.searchFilters().forEach((filter: any) => {\n      if (!filter.filters) {\n        filterSet.push(filter.filter);\n      } else {\n        filter.filters.forEach((fSection: any) => {\n          filterSet.push(fSection.filter);\n        });\n      }\n    });\n    this.filtersToHide = [...new Set<string>([...this.filtersToHide, ...filterSet])];\n\n    let filters = [];\n    this.aggregationsFilters().map((filter: any) => {\n      if (!this.filtersToHide.includes(filter.key)) {\n        filter.values.map((value: string) => {\n          if (value.includes('--')) {\n            const regex = /\\d{13,}--\\d{13,}/;\n            if (regex.test(value)) {\n              const [min, max] = value.split('--');\n              const dateMin = new Intl.DateTimeFormat(this.translateService.currentLang).format(+min);\n              const dateMax = new Intl.DateTimeFormat(this.translateService.currentLang).format(+max);\n              filters.push({ key: value, aggregationKey: filter.key, name: `${dateMin} - ${dateMax}` });\n            } else {\n              filters.push({ key: value, aggregationKey: filter.key, name: value.replace('--', ' - ') });\n            }\n          } else {\n            filters.push({ key: value, aggregationKey: filter.key });\n          }\n        });\n      }\n    });\n    if(this.aggregations()) {\n      this.aggregations().map((item: any) => {\n        this.getFilterNames(item.value.buckets, filters);\n      });\n    }\n    return filters;\n  }\n\n  /**\n   * Get displayed name of bucket\n   * and fill in filters list.\n   *\n   * @param buckets - Bucket to get the name from.\n   */\n  getFilterNames(buckets: any, filters) {\n    if (!buckets || buckets.length === 0) {\n      return;\n    }\n    buckets.map((bucket: any) => {\n      for (const k in bucket) {\n        if (bucket[k].buckets) {\n          this.getFilterNames(bucket[k].buckets, filters);\n        }\n      }\n      if (bucket.name) {\n        const index = filters.findIndex((filter: any) => filter.key === bucket.key && filter.aggregationKey === bucket.aggregationKey);\n        if (index > -1) {\n          filters[index].name = bucket.name;\n          filters[index] = {...filters[index]};\n        }\n      }\n    });\n  }\n\n  /**\n   * Remove filter.\n   * @param filter - the filter to remove\n   */\n  removeFilter(filter: IFilter): void {\n    this.remove.emit(filter);\n  }\n}\n","<!--\n  RERO angular core\n  Copyright (C) 2022-2025 RERO\n\n  This program is free software: you can redistribute it and/or modify\n  it under the terms of the GNU Affero General Public License as published by\n  the Free Software Foundation, version 3 of the License.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU Affero General Public License for more details.\n\n  You should have received a copy of the GNU Affero General Public License\n  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n-->\n@if (filters()?.length > 0) {\n  <div class=\"core:flex core:flex-wrap core:mb-2\">\n    @for (filter of filters(); track filter.key) {\n    <p-button\n      class=\"core:mr-2 core:mb-2\"\n      [label]=\"filter.name ? filter.name : (filter.key | bucketName : filter.aggregationKey | async)\"\n      icon=\"fa fa-times\"\n      [outlined]=\"true\"\n      severity=\"secondary\"\n      (onClick)=\"removeFilter(filter)\"\n    />\n    }\n  </div>\n  }\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Component, OnInit, Signal, computed, input, output } from '@angular/core';\n\n// Documentation: https://primeng.org/paginator\n\nexport interface PageEvent {\n  first: number;\n  rows: number;\n  page: number;\n  pageCount: number;\n}\n\nexport interface ChangeEvent {\n  page: number;\n  rows: number;\n}\n\n@Component({\n    selector: 'ng-core-paginator',\n    templateUrl: './paginator.component.html',\n    standalone: false\n})\nexport class PaginatorComponent implements OnInit {\n\n  /** Input */\n  alwaysShow = input<boolean>(true);\n  currentPage = input<number>(1);\n  pageLinkSize = input<number>(5);\n  rows = input<number>(10);\n  rowsPerPageOptions = input<number[]>();\n  showCurrentPageReport = input<boolean>(false);\n  showFirstLastIcon = input<boolean>(false);\n  totalRecords = input<number>(0);\n  /** Output */\n  rowPageChange = output<ChangeEvent>();\n\n  /** Position for the current page */\n  first: Signal<number> = computed(() => this.eventData.page * this.eventData.rows);\n\n  /** Paginator Event */\n  private eventData: ChangeEvent = {\n    page: 0,\n    rows: 10\n  };\n\n  /** OnInit hook */\n  ngOnInit(): void {\n    this.eventData.page = this.currentPage() - 1;\n    this.eventData.rows = this.rows();\n  }\n\n  /** Event on change page */\n  onPageChange(event: PageEvent) {\n    this.eventData.rows = event.rows;\n    this.eventData.page = event.page;\n    this.rowPageChange.emit(this.eventData);\n  }\n}\n","<!--\n  RERO angular core\n  Copyright (C) 2020-2024 RERO\n\n  This program is free software: you can redistribute it and/or modify\n  it under the terms of the GNU Affero General Public License as published by\n  the Free Software Foundation, version 3 of the License.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU Affero General Public License for more details.\n\n  You should have received a copy of the GNU Affero General Public License\n  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n-->\n<p-paginator\n    (onPageChange)=\"onPageChange($event)\"\n    [alwaysShow]=\"alwaysShow()\"\n    [first]=\"first()\"\n    [pageLinkSize]=\"pageLinkSize()\"\n    [rows]=\"rows()\"\n    [showCurrentPageReport]=\"showCurrentPageReport()\"\n    [showFirstLastIcon]=\"showFirstLastIcon()\"\n    [totalRecords]=\"totalRecords()\"\n    [rowsPerPageOptions]=\"rowsPerPageOptions()\" />\n","/*\n * RERO angular core\n * Copyright (C) 2022-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Component, computed, inject, input, output } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { TranslateService } from '@ngx-translate/core';\nimport { MenuItem, MenuItemCommandEvent } from 'primeng/api';\n\n@Component({\n    selector: 'ng-core-menu-sort',\n    templateUrl: './menu-sort.component.html',\n    standalone: false\n})\nexport class MenuSortComponent {\n\n  protected translateService: TranslateService = inject(TranslateService);\n  protected activatedRoute: ActivatedRoute = inject(ActivatedRoute);\n\n  /** Input */\n  config = input.required<MenuItem[]>();\n  selectedValue = input<string>();\n\n  selectedOption = computed(() => this.config().find((conf: MenuItem) => conf.value === this.selectedValue()));\n  options = computed(() => this.sortOptions());\n\n  /** Change event */\n  onChange = output<string>();\n\n  /** Return the sort options from config. */\n  sortOptions(): MenuItem[] {\n    return (this.config())\n      ? this.config()\n          .map((option: MenuItem) => {\n            option.label = this.translateService.instant(option.label);\n            option.command = (event: MenuItemCommandEvent) => this.onChange.emit(event.item.value);\n            return option;\n          })\n          .sort((a: MenuItem, b: MenuItem) => a.label.localeCompare(b.label))\n      : [];\n  }\n\n}\n","<!--\n  RERO angular core\n  Copyright (C) 2019-2024 RERO\n\n  This program is free software: you can redistribute it and/or modify\n  it under the terms of the GNU Affero General Public License as published by\n  the Free Software Foundation, version 3 of the License.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU Affero General Public License for more details.\n\n  You should have received a copy of the GNU Affero General Public License\n  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n-->\n@if (options().length > 0) {\n<p-menu #menu [model]=\"options()\" [popup]=\"true\" />\n<p-button severity=\"secondary\" outlined (onClick)=\"menu.toggle($event)\">\n  <div class=\"core:flex core:gap-4 core:items-center\">\n    @if (selectedOption()?.icon) {\n      <i [ngClass]=\"selectedOption().icon\"></i>\n    } @else if (selectedOption()) {\n      {{'Sort by' | translate }}&nbsp;:\n    }\n    @if (selectedOption()?.label) {\n      {{ selectedOption()?.label | translate }}\n    } @else {\n      {{'Sort by' | translate }}&nbsp;…\n    }\n  <i class=\"fa fa-caret-down\"></i>\n</div>\n</p-button>\n}\n","/*\n * RERO angular core\n * Copyright (C) 2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Component, inject, input, output } from '@angular/core';\nimport { SearchFilter, SearchFilterSection } from '../../record';\nimport { ToggleSwitchChangeEvent } from 'primeng/toggleswitch';\nimport { ActivatedRoute } from '@angular/router';\n\nexport interface IChecked {\n  filterKey: string;\n  checked: boolean;\n}\n\n@Component({\n    selector: 'ng-core-search-filters',\n    templateUrl: './search-filters.component.html',\n    standalone: false\n})\nexport class SearchFiltersComponent {\n\n  protected activatedRoute: ActivatedRoute = inject(ActivatedRoute);\n\n  // Array of filters\n  searchFilters = input<SearchFilter[]|SearchFilterSection[]>([]);\n\n  // Resources configuration\n  config = input.required<any>();\n\n  // query string\n  query = input.required<string>();\n\n  // Class for section\n  styleClassSection = input<string>();\n\n  // Filter event\n  onChange = output<IChecked>();\n\n  /**\n   * Check if a filter section\n   * @param searchFilterSection - SearchFilterSection\n   * @returns True if the filter is the section\n   */\n  showFilterSection(searchFilterSection: SearchFilterSection): boolean {\n    return searchFilterSection.filters.some((filter: SearchFilter) => this.config().allowEmptySearch\n        ? true\n        : (this.query() && filter.showIfQuery === true) || !filter?.showIfQuery\n    );\n  }\n\n  /**\n   * Check if a simple filter\n   * @param searchFilter - SearchFilter\n   * @returns True if the filter is simple.\n   */\n  showFilter(searchFilter: SearchFilter): boolean {\n    if (this.config().allowEmptySearch) {\n      return true;\n    }\n    if (!this.query()) {\n      return !(searchFilter.showIfQuery === true);\n    } else {\n      return (searchFilter.showIfQuery === true || !searchFilter?.showIfQuery);\n    }\n  }\n\n  /**\n   * Activates the filter according to the route parameters.\n   * @param filter - SearchFilter\n   * @returns True, if the parameter is present nd contains a value.\n   */\n  isChecked(filter: SearchFilter): boolean {\n    if (this.activatedRoute.snapshot.queryParamMap.has(filter.filter)) {\n      const value = this.activatedRoute.snapshot.queryParamMap.get(filter.filter);\n      if (!value) {\n        return false;\n      }\n      if (filter.filter === 'simple') {\n        return !Boolean(JSON.parse(value));\n      } else {\n        return Boolean(JSON.parse(value));\n      }\n    }\n\n    return false;\n  }\n\n  /**\n   * Event on switch\n   * @param event - ToggleSwitchChangeEvent primeng\n   * @param filter the search filter\n   */\n  change(event: ToggleSwitchChangeEvent, filter: SearchFilter): void {\n    this.onChange.emit({ filterKey: filter.filter, checked: event.checked })\n  }\n}\n","<!--\n  RERO angular core\n  Copyright (C) 2024-2025 RERO\n\n  This program is free software: you can redistribute it and/or modify\n  it under the terms of the GNU Affero General Public License as published by\n  the Free Software Foundation, version 3 of the License.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU Affero General Public License for more details.\n\n  You should have received a copy of the GNU Affero General Public License\n  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n-->\n@if (searchFilters().length > 0) {\n  <div class=\"core:mb-2\">\n    @for (searchFilter of searchFilters(); track searchFilter.filter) {\n      @if (searchFilter.filters) {\n        @if (showFilterSection(searchFilter)) {\n          <div [ngClass]=\"styleClassSection()\">{{ searchFilter.label | translate }}</div>\n          @for(searchFilterSection of searchFilter.filters; track searchFilterSection.filter) {\n            @if (showFilter(searchFilterSection)) {\n              <ng-container [ngTemplateOutlet]=\"searchFilterTemplate\" [ngTemplateOutletContext]=\"{filter: searchFilterSection}\"/>\n            }\n          }\n        }\n      } @else {\n        @if (showFilter(searchFilter)) {\n          <ng-container [ngTemplateOutlet]=\"searchFilterTemplate\" [ngTemplateOutletContext]=\"{filter: searchFilter}\"/>\n        }\n      }\n    }\n  </div>\n}\n\n<ng-template #searchFilterTemplate let-filter=\"filter\">\n    <div class=\"core:flex\">\n      <div class=\"core:flex core:items-center core:mr-2\">\n        <p-toggleswitch\n          [ngModel]=\"isChecked(filter)\"\n          inputId=\"customSwitch-{{ filter.filter }}\"\n          [ariaLabel]=\"filter.label | translate\"\n          (onChange)=\"change($event, filter)\"\n        />\n      </div>\n      <div class=\"core:flex core:items-center\">\n        <label for=\"customSwitch-{{ filter.filter }}\">{{ filter.label | translate }}</label>\n        @if (filter.url) {\n          @if (filter.url.external) {\n            <a class=\"core:ml-1\" [title]=\"filter.url.title\" [href]=\"filter.url.link\" [target]=\"filter.url.target\">\n              <i class=\"fa fa-info-circle \" aria-hidden=\"true\"></i>\n            </a>\n          } @else {\n            <a class=\"core:ml-1\" [title]=\"filter.url.title\" [routerLink]=\"filter.url.routerLink\">\n              <i class=\"fa fa-info-circle \" aria-hidden=\"true\"></i>\n            </a>\n          }\n        }\n      </div>\n    </div>\n</ng-template>\n","/*\n * RERO angular core\n * Copyright (C) 2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Component, OnInit, inject, input, output, model, OnDestroy, OutputRefSubscription } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\n\n// Documentation: https://primeng.org/tabview\n\nexport interface ITabViewChangeEvent {\n  originalEvent: any;\n  index: number;\n};\n\n@Component({\n    selector: 'ng-core-search-tabs',\n    templateUrl: './search-tabs.component.html',\n    standalone: false\n})\nexport class SearchTabsComponent implements OnInit, OnDestroy {\n\n  protected activatedRoute: ActivatedRoute = inject(ActivatedRoute);\n\n  // Resources configuration\n  types = input.required<any>();\n\n  // Tab change event\n  onChangeType = output<string>();\n\n  /** Tabs displayed */\n  typesInTabs: any[];\n\n  /** Tab index */\n  currentType = model<string | undefined>(undefined);\n  currentTypeSubscription: OutputRefSubscription;\n\n  /** OnInit hook */\n  ngOnInit(): void {\n    this.typesInTabs = this.types().filter((item: any) => item.hideInTabs !== true);\n    this.currentType.set(this.activatedRoute.snapshot.params.type);\n    this.currentTypeSubscription = this.currentType.subscribe(typeName => this.onChangeType.emit(typeName));\n  }\n\n  ngOnDestroy(): void {\n    this.currentTypeSubscription.unsubscribe();\n  }\n}\n","<!--\n  RERO angular core\n  Copyright (C) 2024-2025 RERO\n\n  This program is free software: you can redistribute it and/or modify\n  it under the terms of the GNU Affero General Public License as published by\n  the Free Software Foundation, version 3 of the License.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU Affero General Public License for more details.\n\n  You should have received a copy of the GNU Affero General Public License\n  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n-->\n@if (typesInTabs.length > 1) {\n  <p-tabs [(value)]=\"currentType\">\n    <p-tablist>\n    @for (tab of typesInTabs; track tab.key) {\n      <p-tab [value]=\"tab.key\">{{ tab.label | translate }}</p-tab>\n    }\n    </p-tablist>\n  </p-tabs>\n}\n","/*\n * RERO angular core\n * Copyright (C) 2022-2024 RERO\n * Copyright (C) 2022 UCLouvain\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport {\n  Component,\n  ElementRef,\n  EventEmitter,\n  inject,\n  Input,\n  OnChanges,\n  OnDestroy,\n  OnInit,\n  Output,\n  SimpleChanges,\n  ViewChild,\n} from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { FormlyFieldConfig } from '@ngx-formly/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { cloneDeep } from 'lodash-es';\nimport { NgxSpinnerService } from 'ngx-spinner';\nimport { BehaviorSubject, Observable, Subscription, isObservable, of } from 'rxjs';\nimport { distinctUntilChanged, map, switchMap, tap } from 'rxjs/operators';\nimport { ApiService } from '../../api/api.service';\nimport { Error } from '../../error/error';\nimport { ActionStatus } from '../action-status';\nimport { JSONSchema7 } from '../editor/editor.component';\nimport { Aggregation, Record, SearchField, SearchFilter, SearchFilterSection, SearchResult } from '../record';\nimport { RecordUiService } from '../record-ui.service';\nimport { RecordService } from '../record.service';\nimport { AggregationsFilter, RecordSearchService } from './record-search.service';\nimport { ChangeEvent } from './paginator/paginator.component';\nimport { IChecked } from './search-filters/search-filters.component';\nimport { SelectChangeEvent } from 'primeng/select';\nimport { MenuItem } from 'primeng/api';\n\nexport interface SearchParams {\n  currentType: string;\n  index: string;\n  q: string;\n  page: number;\n  size: number;\n  aggregationsFilters: Array<AggregationsFilter>;\n  sort: string;\n  searchFields: Array<SearchField>;\n  searchFilters: Array<SearchFilter | SearchFilterSection>;\n}\n\nexport interface SortOption {\n  value: string;\n  label: string;\n  defaultQuery?: boolean;\n  defaultNoQuery?: boolean;\n  icon?: string;\n}\n\n@Component({\n    selector: 'ng-core-record-search',\n    templateUrl: './record-search.component.html',\n    standalone: false\n})\nexport class RecordSearchComponent implements OnInit, OnChanges, OnDestroy {\n  protected recordService: RecordService = inject(RecordService);\n  protected recordUiService: RecordUiService = inject(RecordUiService);\n  protected recordSearchService: RecordSearchService = inject(RecordSearchService);\n  protected translateService: TranslateService = inject(TranslateService);\n  protected spinner: NgxSpinnerService = inject(NgxSpinnerService);\n  protected apiService: ApiService = inject(ApiService);\n  protected activatedRoute: ActivatedRoute = inject(ActivatedRoute);\n\n  /** Page anchor to scroll on the top */\n  @ViewChild('topScrollAnchor') topScroll: ElementRef;\n\n  // COMPONENT ATTRIBUTES =====================================================\n  /** Current selected resource type */\n  @Input() currentType: string = null;\n  /** Search query */\n  @Input() q = '';\n  /** Define the current record's page */\n  @Input() page = 1;\n  /** Define the number of records per page */\n  @Input() size = 10;\n  /** Defined the sort order */\n  @Input() sort: string = null;\n  /** If admin mode is disabled, no action can be performed on a record (as add, update or remove) */\n  @Input() adminMode: ActionStatus = { can: true, message: '' };\n  /** Custom URL to notice detail */\n  @Input() detailUrl: string = null;\n  /** Resources types available */\n  @Input() types: {\n    key: string;\n    label: string;\n    index?: string;\n    component?: Component;\n    total?: number;\n    canAdd?: any;\n    canUpdate?: any;\n    canDelete?: any;\n    canRead?: any;\n    permissions?: any;\n    aggregations?: any;\n    preFilters?: any;\n    defaultSearchInputFilters?: Array<AggregationsFilter>;\n    listHeaders?: any;\n    itemHeaders?: any;\n    aggregationsName?: any;\n    aggregationsOrder?: Array<string>;\n    aggregationsExpand?: Array<string> | (() => Array<string>);\n    aggregationsHide?: Array<string> | (() => Array<string>);\n    aggregationsBucketSize?: number;\n    showSearchInput?: boolean;\n    pagination?: {\n      boundaryLinks?: boolean;\n      maxSize?: number;\n      pageReport?: boolean;\n      rowsPerPageOptions?: number[];\n    };\n    formFieldMap?: (field: FormlyFieldConfig, jsonSchema: JSONSchema7) => FormlyFieldConfig;\n    hideInTabs?: boolean;\n  }[] = [{ key: 'documents', label: 'Documents' }];\n\n  /** Output current state when parameters change. */\n  @Output() parametersChanged = new EventEmitter<any>();\n  /** Output current result of records by type. */\n  @Output() recordsSearched = new EventEmitter<SearchResult>();\n\n  /** Current aggregations filters applied */\n  aggregationsFilters: Array<AggregationsFilter> = [];\n  /** Contain result row data */\n  hits: any = [];\n  /** Facets retrieved from requested result */\n  aggregations: Array<Aggregation>;\n  /** Aggregation keys to always hide (defined into the config) */\n  aggregationsToHide: Array<string> = [];\n  /** Error message when something wrong happens during a search */\n  error: Error;\n  /** Check if record can be added */\n  addStatus: ActionStatus = { can: true, message: '' };\n  /** List of fields on which we can do a specific search. */\n  searchFields: Array<SearchField> = [];\n  /** List of fields on which we can filter. */\n  searchFilters: Array<SearchFilter | SearchFilterSection> = [];\n  /** If we need to show the empty search message info. */\n  showEmptySearchMessage = false;\n  /** Export formats configuration. */\n  exportOptions: {\n    label: string;\n    url: string;\n    disabled?: boolean;\n    disabled_message?: string;\n  }[];\n\n  /** JSON dumping of last search parameters (used for checking if we have to do a search or not).*/\n  protected _searchParameters: BehaviorSubject<SearchParams> = new BehaviorSubject(null);\n  /** Define if search input have to be displayed or not. */\n  protected _showSearchInput = true;\n  /** Define if title have to be displayed or not. */\n  protected _showLabel = true;\n  /** Subscriptions to observables. */\n  protected _subscriptions: Subscription = new Subscription();\n  /** Store configuration for type. */\n  protected config: any = null;\n\n  availableTypes = [];\n\n  loaded: boolean = false;\n\n  // GETTER & SETTER ==========================================================\n  /** Check if pagination have to be displayed or not. */\n  get showPagination(): boolean {\n    return this.total > this.size;\n  }\n\n  /** Does it require to activate the first and last button on pagination. */\n  get paginationBoundaryLinks(): boolean {\n    const paginationConfig = this._getResourceConfig('pagination', {});\n    return 'boundaryLinks' in paginationConfig ? paginationConfig.boundaryLinks : false;\n  }\n\n  /** Get the number of pages showed on pagination. */\n  get paginationMaxSize(): number {\n    const paginationConfig = this._getResourceConfig('pagination', {});\n    return 'maxSize' in paginationConfig ? paginationConfig.maxSize : 5;\n  }\n\n  /** Request result record hits. */\n  get records(): Array<any> {\n    return this.hits && this.hits.hits ? this.hits.hits : [];\n  }\n\n  /** Total records number corresponding to the request. */\n  get total(): number {\n    return this.hits && this.hits.total ? this.recordService.totalHits(this.hits.total) : 0;\n  }\n\n  /** Get the text for displaying results text. */\n  get resultsText$(): Observable<string> {\n    if (this.config.resultsText) {\n      return this.config.resultsText(this.hits);\n    }\n    return this.total <= 1\n      ? this.translateService.stream('{{ total }} result', { total: this.total }) // O or 1 result\n      : this.translateService.stream('{{ total }} results', { total: this.total });\n  }\n\n  /** Get showSearchInput value, given either by config or by local value. */\n  get showSearchInput(): boolean {\n    if (this.config.showSearchInput != null) {\n      return this.config.showSearchInput;\n    }\n    return this._showSearchInput;\n  }\n\n  /** Setter for `showSearchInput`. */\n  @Input() set showSearchInput(showSearchInput: boolean) {\n    this._showSearchInput = showSearchInput;\n  }\n\n  /** Get showLabel value, given either by config or by local value. */\n  get showLabel(): boolean {\n    if (this.config.showLabel != null) {\n      return this.config.showLabel;\n    }\n    return this._showLabel;\n  }\n\n  /** Setter for `showLabel`. */\n  @Input() set showLabel(showLabel: boolean) {\n    this._showLabel = showLabel;\n  }\n\n  /** Return the current page (used in pagination, has we cannot use `page` property directly) */\n  get currentPage() {\n    return this.page;\n  }\n\n  /**\n   * Used only for binding with pagination.\n   * Avoid side effect if \"page\" property is bound to pagination\n   * (infinite calls to get records).\n   * @param page - number, new page\n   */\n  set currentPage(page: number) {\n    this.page = +page;\n    this._searchParamsHasChanged(false);\n  }\n\n  /**\n   * Return the list of search fields that are selected.\n   * @return List of selected search fields.\n   */\n  get selectedSearchFields(): Array<SearchField> {\n    return this.searchFields.filter((field: SearchField) => field.selected);\n  }\n\n  /**\n   * Get the message if there's no record for the type.\n   * The message can be customized with the `noRecordMessage` property in route configuration.\n   * @returns A message indicating there's no record.\n   */\n  get emptyRecordMessage(): string {\n    return this.config.noRecordMessage || this.translateService.instant('There are no records in this section');\n  }\n\n  /**\n   * Check if the current type has no record.\n   * @returns True if no record is found and no search query is done.\n   */\n  get hasNoRecord(): boolean {\n    return this.config.showFacetsIfNoResults\n      ? false\n      : !this.q && this.records.length === 0 && !this.showEmptySearchMessage;\n  }\n\n  /** Return a message containing the reasons why record list cannot be exported. */\n  get exportInfoMessage(): string {\n    return this.total === 0\n      ? this.translateService.instant('Result list is empty.')\n      : this.translateService.instant('Too many items. Should be less than {{max}}.', {\n          max: RecordService.MAX_REST_RESULTS_SIZE,\n        });\n  }\n\n  get selectedSortValue(): MenuItem {\n    const sortParam = this.activatedRoute.snapshot?.queryParamMap?.get('sort');\n    return (sortParam && this.config.sortOptions)\n      ? this.config.sortOptions.find((item: MenuItem) => item.value === sortParam)?.value\n      : null;\n  }\n\n  // HOOKS ======================================================\n\n  /**\n   * OnInit hook.\n   *   Subscribes to the observable emitting the aggregations filters.\n   *   Loads total count of records for each resource.\n   */\n  ngOnInit() {\n    this._subscriptions.add(\n      this.translateService.onLangChange.subscribe((lang: any) => {\n        this._loadSearchFields();\n      })\n    );\n    this.availableTypes = this.types.filter((item) => item.hideInTabs !== true);\n    // Subscribe on aggregation filters changes and do search.\n    let first = true;\n\n    // Load the possible aggregation asked to search engine and that always need to be hide.\n    // DEV NOTE : These aggregation should be used by other components (using content injection)\n    //            otherwise it doesn't matter to ask them.\n    if (this.config.aggregationsHide) {\n      this.aggregationsToHide =\n        typeof this.config.aggregationsHide === 'function'\n          ? this.config.aggregationsHide()\n          : this.config.aggregationsHide;\n    }\n\n    this._subscriptions.add(\n      this.recordSearchService.aggregationsFilters.subscribe((aggregationsFilters: Array<AggregationsFilter>) => {\n        // No aggregations filters are set at this time, we do nothing.\n        if (aggregationsFilters === null) {\n          return;\n        }\n        aggregationsFilters.forEach((item, key) => (aggregationsFilters[key].values = item.values.sort()));\n        this.aggregationsFilters = aggregationsFilters;\n        // if it's the first value emitted, the current page is kept.\n        this._searchParamsHasChanged(first === false);\n        // not first anymore\n        first = false;\n      })\n    );\n    this._subscriptions.add(\n      this._searchParameters\n        .asObservable()\n        .pipe(\n          // only if the patterns changed\n          distinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b)),\n          // cancel previous pending requests\n          switchMap(() => {\n            if (this.aggregations != null) {\n              return of(null);\n            }\n            return this.config.aggregationsOrder.pipe(\n              tap((aggregations: string[]) => {\n                let aggregationsExpandCfg = this.config.aggregationsExpand;\n                if (typeof aggregationsExpandCfg === 'function') {\n                  aggregationsExpandCfg = aggregationsExpandCfg();\n                }\n                this.aggregations = aggregations.map((key: any) => {\n                  return {\n                    key: key.key || key,\n                    bucketSize: this.config.aggregationsBucketSize || null,\n                    value: { buckets: [] },\n                    expanded: (aggregationsExpandCfg || []).includes(key),\n                    included: ([...aggregationsExpandCfg, ...this.aggregationsToHide]).includes(key),\n                    name: key.name || this._aggregationName(key) || null,\n                  };\n                });\n              })\n            );\n          }),\n          tap(() => (this.hits = [])),\n          switchMap(() => this._getRecords())\n        )\n        .subscribe({\n\n          next: (records: Record) => {\n            this.loaded = true;\n            this.hits = records.hits;\n            this.spinner.hide();\n            // Apply filters\n            this.aggregations$(records.aggregations).subscribe((aggregations: any) => {\n              for (const agg of this.aggregations) {\n                // reset aggregations\n                agg.loaded = false;\n                agg.value.buckets = [];\n                if (agg.key in aggregations) {\n                  this._mapAggregation(agg, aggregations[agg.key]);\n                }\n              }\n            });\n            // Required to fire onChange event\n            this.aggregations = [...this.aggregations];\n            this._emitNewParameters();\n            this.recordsSearched.emit({ type: this.currentType, records });\n            // reload export options\n            this.exportOptions = this._exportFormats();\n          },\n          error: (error) => {\n            this.error = error;\n            this.spinner.hide();\n          }\n        }\n        )\n    );\n  }\n\n  /**\n   * Methods called each time an input property is modified.\n   *\n   * If current type is changed, the configuration for the new type is loaded.\n   *\n   * The first time current type is changed, the types property is set in the\n   * RecordUiServices. A better way to do that is to detect route change in the\n   * service, but at this time it is done like that.\n   *\n   * This method does a search at the end but only if the search parameters have\n   * changed. We want to avoid a double search when the following process is\n   * done:\n   *\n   * 1. A parameter is changed in the search interface.\n   * 2. Local property is updated.\n   * 3. A search is done.\n   * 4. The component outputs the search parameters.\n   * 5. The parent component (RecordSearchPage) updates the URL\n   * 6. The parent component detects route parameters changes.\n   * 7. The parent component update the input value of the component.\n   * 8. This method is triggered.\n   *\n   * @param changes Object containing all the changed properties.\n   */\n  ngOnChanges(changes: SimpleChanges) {\n    // Current type has changed\n    if (changes.currentType) {\n      if (changes.currentType.firstChange) {\n        // Load all configuration types, only during the first change\n        this.recordUiService.types = this.types;\n      }\n\n      // if the \"type\" property is changed in input, but the change is not\n      // triggered by clicking on a tab (which already load configuration),\n      // we reload configuration.\n      // If no configuration is loaded, we load it, too.\n      if (\n        this.config === null ||\n        (changes.currentType.currentValue != null && changes.currentType.currentValue !== this.config.key)\n      ) {\n        this._loadConfigurationForType(this.currentType);\n      }\n    }\n\n    // If it's the first change, we don't do a search, it's delegated to the\n    // aggregations filters subscription.\n    if (changes[Object.keys(changes)[0]].firstChange === false) {\n      // Get records and reset page only if page has not changed\n      this._searchParamsHasChanged(!('page' in changes));\n    }\n  }\n\n  /**\n   * OnDestroy hook\n   *  Unsubscribes from the observable of the aggregations filters.\n   */\n  ngOnDestroy() {\n    this._subscriptions.unsubscribe();\n  }\n\n  // COMPONENT FUNCTIONS ======================================================\n  /**\n   * Internal notification that notify the search parameters has changed.\n   * @param resetPage reset the pager to the first page\n   */\n  protected _searchParamsHasChanged(resetPage: boolean = true) {\n    if (resetPage) {\n      this.page = 1;\n    }\n    // Deep copy is sent, to avoid the reference (source object) to be\n    // accidentally changed.\n    this._searchParameters.next(cloneDeep(this._serializeSearchParameters()));\n  }\n\n  /** Move to the top of the page if you change page */\n  pageChanged() {\n    this.topScroll.nativeElement.scrollIntoView({ behavior: 'smooth' });\n  }\n\n  /**\n   * Change number of items per page value.\n   * @param event - Event, dom event triggered\n   * @param size - number, new page size\n   */\n  changeSize(event: Event, size: number) {\n    event.preventDefault();\n    this.size = size;\n    this._searchParamsHasChanged();\n  }\n\n  /**\n   * Change sorting.\n   * @param sort sort name.\n   */\n  changeSorting(sort: string) {\n    this.sort = sort;\n    this._searchParamsHasChanged();\n  }\n\n\n  /**\n   * Change query text.\n   * @param event - string, new query text\n   */\n  searchByQuery(event: string) {\n    // If empty search is not allowed and query is empty, the search is not processed.\n    if (this.config.allowEmptySearch === false && !event) {\n      this.showEmptySearchMessage = true;\n      return;\n    }\n\n    this.q = event;\n    this._setDefaultSort();\n    this._searchParamsHasChanged();\n\n    // Build aggregations to used.\n    //   This is a combination of `defaultSearchInputFilters` and persistent aggregation filters.\n    const aggregations = new Set(this._extractPersistentAggregationsFilters());\n    this.aggregationsFilters.forEach((aggregation) => aggregations.add(aggregation));\n    this.recordSearchService.setAggregationsFilters(Array.from(aggregations), true);\n  }\n\n  /**\n   * Change type of records.\n   * @param type - resource type name.\n   */\n  changeType(type: string) {\n    this.currentType = type;\n    this._loadConfigurationForType(this.currentType);\n    this.aggregationsFilters = [];\n    this._searchParamsHasChanged();\n    this.recordSearchService.setAggregationsFilters([]);\n  }\n\n  /**\n   * Delete a record by its PID.\n   * @param event - object\n   */\n  deleteRecord(event: { pid: string; type?: string }) {\n    const type = event.type ?? this.currentType;\n    this.recordUiService\n      .deleteRecord(type, event.pid)\n      .pipe(\n        switchMap((result) => {\n          if (result === true) {\n            this.page = 1;\n            return this._getRecords();\n          }\n          return of(null);\n        })\n      )\n      .subscribe((records: Record) => {\n        if (records != null) {\n          this.hits = records.hits;\n          this.spinner.hide();\n        }\n      });\n    // update main counter\n    this.config.total--;\n  }\n\n  /**\n   * Show a modal containing message given in parameter.\n   * @param message - message to display into modal\n   */\n  showDeleteMessage(message: string): void {\n    this.recordUiService.showDeleteMessage(message);\n  }\n\n  /**\n   * Get component view for the current resource type.\n   * @return A component for displaying result item.\n   */\n  getResultItemComponentView() {\n    return this.config.component ? this.config.component : null;\n  }\n\n  /**\n   * Get Export formats for the current resource given by configuration.\n   * @return Array of export format to generate an `export as` button or an empty array.\n   */\n  protected _exportFormats(): Array<any> {\n    if (!this.config || !this.config.exportFormats) {\n      return [];\n    }\n    return this.config.exportFormats.map((format) => {\n      return {\n        label: format.label,\n        url: this.getExportFormatUrl(format),\n        disabled: !this.canExport(format),\n        disabled_message: this.exportInfoMessage,\n      };\n    });\n  }\n\n  /**\n   * Get export format url.\n   * @param format - export format object\n   * @return formatted url for an export format.\n   */\n  getExportFormatUrl(format: any) {\n    const queryParams = Object.keys(this.activatedRoute.snapshot.queryParams);\n    // TODO: maybe we can use URLSerializer to build query string\n    const baseUrl = format.endpoint ? format.endpoint : this.apiService.getEndpointByType(this._currentIndex());\n    let url = `${baseUrl}?q=${encodeURIComponent(this.q)}&format=${format.format}`;\n\n    // check if max rest result size is disabled\n    if (!format.disableMaxRestResultsSize) {\n      url += `&size=${RecordService.MAX_REST_RESULTS_SIZE}`;\n    }\n    // preFilters\n    if (this.config && this.config.preFilters) {\n      for (const [key, value] of Object.entries(this.config.preFilters)) {\n        // force value to an array\n        const values = !Array.isArray(value) ? [value] : value;\n        values.map((v) => {\n          // We check whether the parameter exists in the current url.\n          // If it does, we don't add the preFilter parameter.\n          if (!queryParams.includes(key)) {\n            url += `&${key}=${v}`;\n          }\n        });\n      }\n    }\n    // aggregations\n    if (this.aggregationsFilters) {\n      this.aggregationsFilters.map((filter) => {\n        filter.values.map((v) => {\n          url += `&${filter.key}=${v}`;\n        });\n      });\n    }\n    return url;\n  }\n\n  /**\n   * Check if a record list can be exported\n   * @param format - export format object\n   * @return Boolean\n   */\n  canExport(format: any): boolean {\n    return format.hasOwnProperty('disableMaxRestResultsSize') && format.disableMaxRestResultsSize\n      ? this.total > 0\n      : 0 < this.total && this.total < RecordService.MAX_REST_RESULTS_SIZE;\n  }\n\n  /**\n   * Check if a record can be updated\n   * @param record - object, record to check\n   * @return Observable\n   */\n  canUpdateRecord$(record: object): Observable<ActionStatus> {\n    return this.recordUiService.canUpdateRecord$(record, this.currentType);\n  }\n\n  /**\n   * Check if a record can be deleted\n   * @param record - object, record to check\n   * @return Observable\n   */\n  canDeleteRecord$(record: object): Observable<ActionStatus> {\n    return this.recordUiService.canDeleteRecord$(record, this.currentType);\n  }\n\n  /**\n   * Check if a record can be used\n   * @param record - object, record to check\n   * @return Observable\n   */\n  canUseRecord$(record: object): Observable<ActionStatus> {\n    return this.recordUiService.canUseRecord$(record, this.currentType);\n  }\n\n  /**\n   * Filter the aggregations with given configuration function.\n   * If no configuration is given, return the original aggregations.\n   * @param records - Result records\n   * @return Observable containing aggregations corresponding to actual records.\n   */\n  aggregations$(aggregations: object): Observable<any> {\n    if (this.config.aggregations) {\n      return this.config.aggregations(aggregations);\n    } else {\n      return of(aggregations);\n    }\n  }\n\n  /**\n   * Returns an observable which emits the URL value for given record.\n   * In case record cannot be read, returns null.\n   * @param record - Generate detail URL for this record.\n   * @return Observable emitting detail URL object\n   */\n  resolveDetailUrl$(record: any): Observable<any> {\n    const url = { link: `detail/${record.id}`, external: false };\n\n    if (this.detailUrl) {\n      url.link = this.detailUrl.replace(':type', this._currentIndex()).replace(':pid', record.id);\n      url.external = true;\n    }\n\n    if (!this.config.canRead) {\n      return of(url);\n    }\n\n    return this.recordUiService.canReadRecord$(record, this.currentType).pipe(\n      map((status: ActionStatus) => {\n        if (status.can === false) {\n          return null;\n        }\n\n        return url;\n      })\n    );\n  }\n\n  searchInField(event: SelectChangeEvent): void {\n    const selectedField = event.value;\n    this.searchFields = this.searchFields.map((item: SearchField) => {\n      if (selectedField && item.path === selectedField.path) {\n        item.selected = !item.selected;\n      } else {\n        item.selected = false;\n      }\n      return item;\n    });\n\n    // If query string is specified, search is processed.\n    if (this.q) {\n      this.searchByQuery(this.q);\n    }\n  }\n\n  onChangeSearchFilter(event: IChecked): void {\n    const values = [];\n    if (event.filterKey === 'simple') {\n      values.push(event.checked ? '0' : '1');\n    } else if (event.checked) {\n      values.push(String(event.checked));\n    }\n    this.recordSearchService.updateAggregationFilter(event.filterKey, values);\n  }\n\n  /**\n   * Check if a filter is selected.\n   *\n   * @param filter SearchFilter\n   * @returns true if the given filter is selected.\n   */\n  isFilterActive(filter: SearchFilter): boolean {\n    return this.aggregationsFilters\n      ? this.aggregationsFilters.some(\n          (item: any) => item.key === filter.filter && item.values.includes(String(filter.value))\n        )\n      : false;\n  }\n\n  /**\n   * Load buckets for the given aggregation.\n   * @param event - Object outputted when an aggregation is clicked.\n   */\n  loadAggregationBuckets(event: { key: string; expanded: boolean }): void {\n    // the aggregation is collapsed, buckets are not loaded.\n    if (event.expanded === false) {\n      return;\n    }\n    const aggregation = this.aggregations.find((item: any) => item.key === event.key);\n    // No aggregation found or buckets are already loaded.\n    if (!aggregation || aggregation.loaded) {\n      return;\n    }\n\n    // Get buckets for the aggregation\n    this._getRecords(1).subscribe((records: any) => {\n      this.aggregations$(records.aggregations).subscribe((aggregations: any) => {\n        if (aggregations[event.key]) {\n          this._mapAggregation(aggregation, aggregations[event.key]);\n        }\n        // Required to fire onChange event\n        this.aggregations = [...this.aggregations];\n        this.spinner.hide();\n      });\n    });\n  }\n\n  /**\n   * Search for records.\n   * @param size - number : force the number of records to return. If `null` the default component `size` attribute will be used.\n   */\n  protected _getRecords(size: number = null): Observable<any> {\n    // Build query string\n    const q = this._buildQueryString();\n\n    // Empty search is not allowed and query is empty, search in backend is not\n    // processed.\n    if (this.config.allowEmptySearch === false && !q) {\n      this.showEmptySearchMessage = true;\n      return of({ hits: { hits: [], total: 0 }, aggregations: {} });\n    } else {\n      this.showEmptySearchMessage = false;\n    }\n\n    this.spinner.show();\n    // Check remove filter from preFilters if it is already present in\n    // the aggs filters.\n    const preFilters = {};\n    const aggsKeys = [];\n    this.aggregationsFilters.map((agg) => aggsKeys.push(agg.key));\n    for (const [key, value] of Object.entries(this.config.preFilters || {})) {\n      if (!aggsKeys.includes(key)) {\n        preFilters[key] = value;\n      }\n    }\n    return this.recordService.getRecords(\n      this._currentIndex(),\n      q,\n      this.page,\n      size || this.size,\n      this.aggregationsFilters || [],\n      preFilters,\n      this.config.listHeaders || null,\n      this.sort,\n      this._getFacetsParameter()\n    );\n  }\n\n  /**\n   * Emit new parameters when a search is done.\n   */\n  protected _emitNewParameters() {\n    this.parametersChanged.emit({\n      q: this.q,\n      page: this.page,\n      size: this.size,\n      currentType: this.config.key,\n      aggregationsFilters: this.aggregationsFilters,\n      sort: this.sort,\n    });\n  }\n\n  /**\n   * Get configuration for the current resource type.\n   * @param type Type of resource\n   */\n  protected _loadConfigurationForType(type: string) {\n    const q = this._buildQueryString();\n    this.config = this.recordUiService.getResourceConfig(type);\n    this.recordUiService.canAddRecord$(type).subscribe((result: ActionStatus) => {\n      this.addStatus = result;\n    });\n\n    this._loadSearchFields();\n\n    // Build aggregations.\n    if (this.config.aggregationsOrder) {\n      if (!isObservable(this.config.aggregationsOrder)) {\n        this.config.aggregationsOrder = of(this.config.aggregationsOrder);\n      }\n    } else {\n      this.config.aggregationsOrder = of([]);\n    }\n\n    // reset aggregations\n    this.aggregations = null;\n\n    // Sort options\n    this._setDefaultSort();\n\n    // load search filters\n    this.searchFilters = this.config.searchFilters || [];\n\n    // load export options\n    this.exportOptions = this._exportFormats();\n\n    // Update filters with default search filters only if the q parameter is empty\n    if ((q === null || q.trim().length === 0) && this.config.defaultSearchInputFilters) {\n      this.config.defaultSearchInputFilters.forEach((filter: { key: string; values: any[] }) => {\n        this.recordSearchService.updateAggregationFilter(filter.key, filter.values);\n      });\n    }\n  }\n\n  /**\n   * Get Resource config\n   * @param paramName - Name of parameter\n   * @param defaultValue - Default value is returned if the parameter is not defined\n   * @return A config value or the given default value instead\n   */\n  protected _getResourceConfig(paramName: string, defaultValue: any) {\n    return (paramName in this.config) ? this.config[paramName] : defaultValue;\n  }\n\n  /**\n   * Serialize all the search parameters with JSON.stringify method.\n   * @return The serialized string.\n   */\n  protected _serializeSearchParameters(): SearchParams {\n    return {\n      currentType: this.config.key,\n      index: this._currentIndex(),\n      q: this.q,\n      page: this.page,\n      size: this.size,\n      sort: this.sort,\n      aggregationsFilters: this.aggregationsFilters,\n      searchFields: this.searchFields,\n      searchFilters: this.searchFilters,\n    };\n  }\n\n  /**\n   * Load search fields stored in configuration and assign to them the\n   * `selected` property.\n   *\n   * @returns void\n   */\n  protected _loadSearchFields(): void {\n    // No search fields, reset previous stored and return.\n    if (!this.config.searchFields) {\n      this.searchFields = [];\n      return;\n    }\n\n    // Store search fields.\n    this.searchFields = this.config.searchFields.map((field: SearchField) => {\n      field.label = this.translateService.instant(field.label);\n      if (!field.selected) {\n        field.selected = false;\n      }\n      return field;\n    });\n  }\n\n  /**\n   * Build query string with possibly search fields.\n   *\n   * @return Final query string.\n   */\n  protected _buildQueryString(): string {\n    // If query is empty or no selected fields found, the initial query string\n    // is returned.\n    if (!this.q || this.selectedSearchFields.length === 0) {\n      return this.q;\n    }\n\n    // Loop over select fields and add them to final query string.\n    const queries = [];\n    this.selectedSearchFields.forEach((field: SearchField) => {\n      queries.push(`${field.path}:${this.q}`);\n    });\n\n    return queries.join(' ');\n  }\n\n  /**\n   * Return the name of the index defined either by the index key or key.\n   *\n   * @return string, current index defined by keys index or key\n   */\n  protected _currentIndex() {\n    if (this.config == null) {\n      return null;\n    }\n    return this.config.index || this.config.key;\n  }\n\n  /**\n   * Get personalized name for current aggregation\n   * @param key - string, aggregation key\n   * @return string or null\n   */\n  protected _aggregationName(key: string): string | null {\n    return this.config.aggregationsName && key in this.config.aggregationsName\n      ? this.config.aggregationsName[key]\n      : null;\n  }\n\n  /**\n   * Extract persistent search filters on current url\n   * @return Array of aggregations filter\n   */\n  protected _extractPersistentAggregationsFilters(): Array<AggregationsFilter> {\n    const persistent = [];\n    this._flatSearchFilters()\n      .filter((filter) => filter.persistent === true)\n      .forEach((filter: SearchFilter) => {\n        if (this.activatedRoute.snapshot.queryParams.hasOwnProperty(filter.filter)) {\n          const data = this.activatedRoute.snapshot.queryParams[filter.filter];\n          persistent.push({\n            key: filter.filter,\n            values: Array.isArray(data) ? data : [data],\n          });\n        }\n      });\n    return persistent;\n  }\n\n  /**\n   * Make all search filters on same array level\n   * @returns - A filters array\n   */\n  protected _flatSearchFilters(): SearchFilter[] {\n    const flatFilters = [];\n    this.searchFilters.forEach((searchFilter: any) => {\n      if (searchFilter.filters) {\n        searchFilter.filters.forEach((filter: any) => flatFilters.push(filter));\n      } else {\n        flatFilters.push(searchFilter);\n      }\n    });\n    return flatFilters;\n  }\n\n  /**\n   * Map aggregation records data to corresponding aggregation.\n   *\n   * @param aggregation Aggregation object.\n   * @param recordsAggregation Aggregation retrieved from record.\n   */\n  protected _mapAggregation(aggregation: Aggregation, recordsAggregation: any): void {\n    aggregation.doc_count = recordsAggregation.doc_count || null;\n    aggregation.type = recordsAggregation.type || 'terms';\n    aggregation.config = recordsAggregation.config || null;\n    if (!aggregation.name && recordsAggregation.name) {\n      aggregation.name = recordsAggregation.name;\n    }\n    if (recordsAggregation.buckets) {\n      aggregation.value.buckets = recordsAggregation.buckets;\n      if (recordsAggregation.doc_count != null) {\n        aggregation.doc_count = recordsAggregation.doc_count;\n      }\n      aggregation.value.buckets.map((bucket) => this.processBuckets(bucket, aggregation.key));\n    }\n    aggregation.loaded = true;\n  }\n\n  /**\n   * Enrich the bucket with several properties: indeterminate, parent, aggregationKey.\n   *\n   * @param bucket elastic bucket to process\n   * @param aggregationKey bucket parent key\n   * @returns the indeterminate state of the bucket\n   */\n  processBuckets(bucket, aggregationKey): boolean {\n    // checkbox indeterminate state\n    bucket.indeterminate = false;\n    bucket.aggregationKey = aggregationKey;\n    for (const k of Object.keys(bucket).filter((key) => bucket[key].buckets)) {\n      for (const childBucket of bucket[k].buckets) {\n        // store the parent: useful to remove parent filters\n        childBucket.parent = bucket;\n        // store the aggregation key as we re-organize the bucket structure\n        bucket.indeterminate ||= this.recordSearchService.hasFilter(k, childBucket.key);\n        // do not change the order of the boolean expression to force processBucket over all\n        // recursion steps\n        bucket.indeterminate = this.processBuckets(childBucket, k) || bucket.indeterminate;\n      }\n    }\n    return bucket.indeterminate;\n  }\n\n  /**\n   * Compile facets keys to get only 'included' facets or having a filter selected.\n   * @returns List of facets.\n   */\n  protected _getFacetsParameter(): Array<string> {\n    const facets = [];\n    this.aggregations.forEach((agg: any) => {\n      if (\n        agg.included === true ||\n        agg.expanded ||\n        this.aggregationsFilters.some((filter: any) => filter.key === agg.key)\n      ) {\n        facets.push(agg.key);\n      }\n    });\n    return facets;\n  }\n\n  /** Set the default sort. */\n  protected _setDefaultSort(): void {\n    if (this.sort != null) {\n      return;\n    }\n    if (this.config.sortOptions) {\n      const defaultSortValue = this.q ? 'defaultQuery' : 'defaultNoQuery';\n      this.config.sortOptions.forEach((option: SortOption) => {\n        if (option[defaultSortValue] === true) {\n          this.sort = option.value;\n        }\n      });\n    }\n  }\n\n  /**\n   * Show the filter's section\n   * @param searchFilterSection - Collection of filter\n   * @returns true if the filter's section is show\n   */\n  showFilterSection(searchFilterSection: SearchFilterSection): boolean {\n    return searchFilterSection.filters.some((filter: SearchFilter) => {\n      return this.config.allowEmptySearch ? true : (this.q && filter.showIfQuery === true) || !filter?.showIfQuery;\n    });\n  }\n\n  /**\n   * Show the filter\n   * @param searchFilter - search Filter\n   * @returns true if the filter is show\n   */\n  showFilter(searchFilter: SearchFilter) {\n    if (this.config.allowEmptySearch) {\n      return true;\n    }\n    if (!this.q) {\n      return !(searchFilter.showIfQuery === true);\n    } else {\n      return searchFilter.showIfQuery === true || !searchFilter?.showIfQuery;\n    }\n  }\n\n  paginatorChange(event: ChangeEvent): void {\n    this.page = ++event.page;\n    this.size = event.rows;\n    this._searchParamsHasChanged(false);\n  }\n\n  /**\n   * Remove filter.\n   *\n   * @param filter - the filter to remove\n   */\n  removeFilter(filter: any): void {\n    this.recordSearchService.removeFilter(filter.aggregationKey, filter.key, true);\n  }\n}\n","<!--\n  RERO angular core\n  Copyright (C) 2019-2024 RERO\n  Copyright (C) 2019-2023 UCLouvain\n\n  This program is free software: you can redistribute it and/or modify\n  it under the terms of the GNU Affero General Public License as published by\n  the Free Software Foundation, version 3 of the License.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU Affero General Public License for more details.\n\n  You should have received a copy of the GNU Affero General Public License\n  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n-->\n@if (error) {\n<ng-core-error [error]=\"error\"></ng-core-error>\n} @else {\n<span #topScrollAnchor></span>\n<ng-core-search-tabs [types]=\"availableTypes\" (onChangeType)=\"changeType($event)\"/>\n<div>\n  @if (availableTypes.length === 1 && showLabel) {\n  <h5>{{ availableTypes[0].label | translate }}</h5>\n  }\n  <ng-content select=\"[header]\"></ng-content>\n  <div class=\"core:mt-4 core:flex core:gap-2\">\n    @if (showSearchInput) {\n    <ng-core-search-input\n      class=\"core:grow\"\n      [placeholder]=\"'search' | translate | ucfirst\"\n      [searchText]=\"q\"\n      [displayLabel]=\"false\"\n      (search)=\"searchByQuery($event)\"\n      [focus]=\"true\"\n    />\n    }\n    <ng-content select=\"[afterInputSearch]\"/>\n  </div>\n  @if (loaded && hasNoRecord) {\n    <p-message class=\"core:my-6\" severity=\"info\">\n      {{ emptyRecordMessage }}\n    </p-message>\n    @if (adminMode.can && addStatus.can) {\n    <p-button\n      id=\"search-add-button\"\n      [label]=\"'Add' | translate\"\n      icon=\"fa fa-plus\"\n      [routerLink]=\"addStatus.routerLink || ['new']\"\n    />\n    }\n  } @else {\n  <div class=\"core:flex core:items-stretch core:w-full core:my-4\">\n    @if (resultsText$ | async; as resultsText) {\n    <div class=\"core:flex core:items-center core:w-full\">\n      <strong>{{ resultsText }}</strong>\n    </div>\n    }\n    <div class=\"core:flex core:items-center core:justify-end core:w-full\">\n      @if (adminMode.can && addStatus.can) {\n      <p-button\n        id=\"search-add-button\"\n        [label]=\"'Add' | translate\"\n        icon=\"fa fa-plus\"\n        [routerLink]=\"addStatus.routerLink || ['new']\"\n      />\n      }\n      <!-- Sorting -->\n      @if (config?.sortOptions?.length > 0) {\n      <ng-core-menu-sort class=\"core:ml-1\" [selectedValue]=\"selectedSortValue\" [config]=\"config.sortOptions\" (onChange)=\"changeSorting($event)\" />\n      }\n      <!-- EXPORT BUTTON -->\n      <ng-core-export-button class=\"core:ml-1\"[exportOptions]=\"exportOptions\"/>\n      <!-- END EXPORT BUTTON -->\n    </div>\n  </div>\n  <ng-content select=\"[beforeResult]\"></ng-content>\n  <div class=\"core:grid core:grid-cols-12 core:gap-4\">\n    <ng-core-list-filters\n      [aggregations]=\"aggregations\"\n      class=\"core:col-span-12\"\n      [aggregationsFilters]=\"aggregationsFilters\"\n      [searchFilters]=\"searchFilters\"\n      (remove)=\"removeFilter($event)\"\n    />\n    <ng-content select=\"[top-search-result]\"></ng-content>\n    @if ((aggregations && aggregations.length) || searchFields.length > 0 || searchFilters.length > 0) {\n    <div class=\"core:md:col-span-5 core:lg:col-span-3 core:col-span-12\">\n      @if (searchFields.length > 0 && q) {\n      <div class=\"core:mb-4\">\n        <span class=\"core:mr-1\" translate>Search in</span>\n        <p-select\n          class=\"core:w-full\"\n          placeholder=\"…\"\n          [optionValue]=\"'path'\"\n          [options]=\"searchFields\"\n          [showClear]=\"true\"\n          (onChange)=\"searchInField($event)\"\n        />\n      </div>\n      }\n\n      <ng-core-search-filters\n        [searchFilters]=\"searchFilters\"\n        [config]=\"config\"\n        [query]=\"q\"\n        styleClassSection=\"core:my-2\"\n        (onChange)=\"onChangeSearchFilter($event)\"\n      />\n\n      @if (!showEmptySearchMessage || q) {\n      <ng-content select=\"[top-facets]\"/>\n      @for (item of aggregations; track item.key) {\n      <div>\n        @if (!aggregationsToHide.includes(item.key)) {\n        <ng-core-record-search-aggregation\n          [aggregation]=\"item\"\n          [aggregationsFilters]=\"aggregationsFilters\"\n          (aggregationClicked)=\"loadAggregationBuckets($event)\"\n        />\n        }\n      </div>\n      } }\n    </div>\n    }\n    <div id=\"recordlist\" class=\"core:md:col-span-7 core:lg:col-span-9 core:col-span-12\">\n      @if (showEmptySearchMessage) {\n      <p-message severity=\"info\">\n        {{ 'Enter a query to get results.' | translate }}\n      </p-message>\n      }\n      <ng-content select=\"[top-result]\"/>\n      <p-dataView [value]=\"records\" [emptyMessage]=\"' '\">\n        <ng-template #list let-records>\n          <ul class=\"core:list-none\">\n            @for (record of records; track record.metadata.pid; let first = $first) {\n            <li class=\"core:py-2\" [ngClass]=\"{ 'core:border-t-1 core:border-surface': !first }\">\n              <ng-core-record-search-result\n                [adminMode]=\"adminMode\"\n                [record]=\"record\"\n                [type]=\"currentType\"\n                [itemViewComponent]=\"getResultItemComponentView()\"\n                [canUpdate$]=\"canUpdateRecord$(record)\"\n                [canDelete$]=\"canDeleteRecord$(record)\"\n                [canUse$]=\"canUseRecord$(record)\"\n                [detailUrl$]=\"resolveDetailUrl$(record)\"\n                (deletedRecord)=\"deleteRecord($event)\"\n                (deleteMessageEvent)=\"showDeleteMessage($event)\"\n              />\n            </li>\n            }\n          </ul>\n        </ng-template>\n      </p-dataView>\n\n      <ng-core-paginator\n        [alwaysShow]=\"showPagination\"\n        [currentPage]=\"currentPage\"\n        [pageLinkSize]=\"paginationMaxSize\"\n        [totalRecords]=\"total\"\n        [rows]=\"size\"\n        [rowsPerPageOptions]=\"config?.pagination?.rowsPerPageOptions || [10, 20, 50]\"\n        [showCurrentPageReport]=\"config?.pagination?.pageReport || false\"\n        [showFirstLastIcon]=\"paginationBoundaryLinks\"\n        (rowPageChange)=\"paginatorChange($event)\"\n      />\n      <ng-content select=\"[footer-result]\"/>\n      <ng-content/>\n    </div>\n  </div>\n  <ng-content select=\"[footer-search-result]\"/>\n  }\n</div>\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Component, inject, OnDestroy, OnInit } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { FormlyFieldConfig } from '@ngx-formly/core';\nimport { MenuItem } from 'primeng/api';\nimport { combineLatest, Subscription } from 'rxjs';\nimport { ActionStatus } from '../action-status';\nimport { JSONSchema7 } from '../editor/editor.component';\nimport { RecordUiService } from '../record-ui.service';\nimport { RecordSearchService } from './record-search.service';\n\n@Component({\n    selector: 'ng-core-record-search-page',\n    templateUrl: './record-search-page.component.html',\n    standalone: false\n})\nexport class RecordSearchPageComponent implements OnInit, OnDestroy {\n\n  protected route: ActivatedRoute = inject(ActivatedRoute);\n  protected router: Router = inject(Router);\n  protected recordSearchService: RecordSearchService = inject(RecordSearchService);\n  protected recordUiService: RecordUiService = inject(RecordUiService)\n\n  /**\n   * Current selected resource type\n   */\n  currentType = 'documents';\n\n  /**\n   * URL to notice detail\n   */\n  detailUrl: string = null;\n\n  /**\n   * Display search input\n   */\n  showSearchInput = true;\n\n  /**\n   * Admin mode (edit, remove, add, ...)\n   */\n  adminMode: ActionStatus = {\n    can: true,\n    message: ''\n  };\n\n  /**\n   * Define the current record's page\n   */\n  page = 1;\n\n  /**\n   * Define the number of records per page\n   */\n  size = 10;\n\n  /**\n   * Search query\n   */\n  q = '';\n\n  /**\n   * Define the sort order of resulting records. It takes a string value\n   * representing the property which is used to sort the records.\n   * If a minus is put before the value, the sort is reversed.\n   */\n  sort: string = null;\n\n  /**\n   * Types of resources available\n   */\n  types: {\n    key: string,\n    label: string,\n    index?: string,\n    component?: Component,\n    total?: number,\n    canAdd?: any,\n    canUpdate?: any,\n    canDelete?: any,\n    canRead?: any,\n    permissions?: any,\n    aggregations?: any,\n    preFilters?: any,\n    listHeaders?: any,\n    itemHeaders?: any,\n    aggregationsName?: any,\n    aggregationsOrder?: Array<string>,\n    aggregationsExpand?: Array<string> | (() => Array<string>),\n    aggregationsBucketSize?: number,\n    pagination?: {\n      boundaryLinks?: boolean,\n      maxSize?: number,\n      pageReport?: boolean,\n      rowsPerPageOptions?: number[],\n    },\n    formFieldMap?: (field: FormlyFieldConfig, jsonSchema: JSONSchema7) => FormlyFieldConfig\n  }[] = [{ key: 'documents', label: 'Documents' }];\n\n  /**\n   * Subscription to route parameters observables\n   */\n  private routeParametersSubscription: Subscription;\n\n  /**\n   * Component initialization.\n   *\n   * Subscribes to changes of route parameters and query parameters for\n   * updating the search parameters and sending them to child component\n   * (RecordSearchComponent).\n   */\n  ngOnInit() {\n    this.routeParametersSubscription = combineLatest([this.route.paramMap, this.route.queryParamMap]).subscribe(\n      ([paramMap, queryParams]) => {\n        // store current type of resource\n        this.currentType = paramMap.get('type');\n        this.recordUiService.types = this.route.snapshot.data.types;\n\n        const config = this.recordUiService.getResourceConfig(this.currentType);\n\n        // Stores query parameters\n        this.q = queryParams.get('q') || '';\n        this.size = queryParams.get('size') ? +queryParams.get('size') : 10;\n        this.page = queryParams.get('page') ? +queryParams.get('page') : 1;\n        this._setDefaultSort(config, queryParams.get('sort'));\n\n        // loops over all aggregations filters and stores them.\n        const aggregationsFilters = [];\n        queryParams.keys.forEach((key: string) => {\n          if (['q', 'page', 'size', 'sort'].includes(key) === false) {\n            const values = queryParams.getAll(key);\n            aggregationsFilters.push({ key, values });\n          }\n        });\n\n        // Add filter parameter value\n        if (config.searchFilters) {\n          config.searchFilters.forEach((filter: any) => {\n            if (queryParams.get(filter.filter) === null && filter.disabledValue) {\n              aggregationsFilters.push({ key: filter.filter, values: [filter.disabledValue] });\n            }\n          });\n        }\n        // update the facet filters given the URL params\n        this.recordSearchService.setAggregationsFilters(aggregationsFilters);\n      }\n    );\n\n    // Store configuration data\n    const { data } = this.route.snapshot;\n    if (data.types) {\n      this.types = data.types;\n    }\n\n    if (data.showSearchInput != null) {\n      this.showSearchInput = data.showSearchInput;\n    }\n\n    if (data.adminMode) {\n      data.adminMode().subscribe((as: ActionStatus) => this.adminMode = as);\n    }\n\n    if (data.detailUrl) {\n      this.detailUrl = data.detailUrl;\n    }\n  }\n\n  /**\n   * Component destruction.\n   *\n   * Unsubscribes from the observables of the route parameters.\n   */\n  ngOnDestroy() {\n    this.routeParametersSubscription.unsubscribe();\n  }\n\n  /**\n   * Update URL accordingly to parameters given.\n   * @param parameters Parameters to put in url or query string\n   */\n  updateUrl(parameters: any) {\n    const queryParams: any = {\n      q: parameters.q,\n      page: parameters.page,\n      size: parameters.size,\n      sort: parameters.sort\n    };\n    for (const filter of parameters.aggregationsFilters) {\n      // We need to loop over each value and insert it on beginning of the array\n      // instead of assign values directly. Otherwise, angular router doesn't\n      // detect the changes. It's certainly a bug in angular.\n      queryParams[filter.key] = [];\n      for (const value of filter.values) {\n        queryParams[filter.key].unshift(value);\n      }\n    }\n    this.router.navigate([this.getCurrentUrl(parameters.currentType)], { queryParams, relativeTo: this.route });\n  }\n\n  /**\n   * Return current URL after removing query parameters and updating resource type.\n   *\n   * @returns Updated url without query string\n   */\n  protected getCurrentUrl(type: string): string {\n    const segments = this.router.parseUrl(this.router.url).root.children.primary.segments.map(it => it.path);\n    segments[segments.length - 1] = type;\n\n    return '/' + segments.join('/');\n  }\n\n  /**\n   * Sets the default sort for resource type.\n   *\n   * @param config Configuration object.\n   */\n  private _setDefaultSort(config: any, sortParam: string) {\n    if (sortParam) {\n      this.sort = sortParam;\n      return;\n    }\n\n    this.sort = null;\n\n    if (!config.sortOptions) {\n      return;\n    }\n\n    const defaultSortValue = this.q ? 'defaultQuery' : 'defaultNoQuery';\n    config.sortOptions.forEach((option: MenuItem) => {\n      if (option[defaultSortValue] === true) {\n        this.sort = option.value;\n      }\n    });\n  }\n}\n","<!--\n  RERO angular core\n  Copyright (C) 2020 RERO\n\n  This program is free software: you can redistribute it and/or modify\n  it under the terms of the GNU Affero General Public License as published by\n  the Free Software Foundation, version 3 of the License.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU Affero General Public License for more details.\n\n  You should have received a copy of the GNU Affero General Public License\n  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n-->\n<ng-core-record-search class=\"core:my-1\" [adminMode]=\"adminMode\" [currentType]=\"currentType\" [types]=\"types\" [detailUrl]=\"detailUrl\"\n  [showSearchInput]=\"showSearchInput\" [q]=\"q\" [page]=\"page\" [size]=\"size\" [sort]=\"sort\"\n  (parametersChanged)=\"updateUrl($event)\"/>\n","/*\n * RERO angular core\n * Copyright (C) 2020 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\nimport { DetailComponent } from './detail/detail.component';\nimport { EditorComponent } from './editor/editor.component';\nimport { RecordSearchPageComponent } from './search/record-search-page.component';\n\nconst routes: Routes = [\n  { path: ':type', component: RecordSearchPageComponent },\n  { path: ':type/detail/:pid', component: DetailComponent },\n  { path: ':type/edit/:pid', component: EditorComponent },\n  { path: ':type/new', component: EditorComponent }\n];\n\n@NgModule({\n  imports: [RouterModule.forChild(routes)],\n  exports: [RouterModule]\n})\nexport class RecordRoutingModule {}\n","/*\n * RERO angular core\n * Copyright (C) 2024-2025 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { AfterViewInit, Component, HostListener, inject, input, output, ViewChild } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { OverlayOptions } from 'primeng/api';\nimport { AutoComplete, AutoCompleteCompleteEvent, AutoCompleteDropdownClickEvent, AutoCompleteSelectEvent } from 'primeng/autocomplete';\nimport { DomHandler } from 'primeng/dom';\nimport { combineLatest, map, Observable, Subject, switchMap } from 'rxjs';\nimport { RecordService } from '../record.service';\nimport { SanitizePipe } from '../../pipe/sanitize.pipe';\n\nexport interface IRecordType {\n  field: string;\n  groupLabel?: string;\n  index: string;\n  maxSuggestions?: number;\n  processSuggestions: Function;\n  preFilters?: any;\n  queryParams?: Object;\n  sort?: string;\n};\n\nexport interface IAutoComplete {\n  iconClass?: string;\n  index: string;\n  label: string;\n  originalLabel?: string;\n  value?: string;\n  [key: string]: string;\n}\n\n@Component({\n    selector: 'ng-core-search-autocomplete',\n    template: `\n    <p-autoComplete\n      #autoComplete\n      [overlayOptions]=\"overlayOptions\"\n      dropdownIcon=\"fa fa-search\"\n      [dropdown]=\"true\"\n      dropdownMode=\"none\"\n      [styleClass]=\"styleClass()\"\n      [inputStyleClass]=\"inputStyleClass()\"\n      [delay]=\"delay()\"\n      [group]=\"group\"\n      [minLength]=\"minLength()\"\n      [placeholder]=\"placeholder()\"\n      [ngModel]=\"value()\"\n      (ngModelChange)=\"currentValue = sanitize($event)\"\n      [scrollHeight]=\"scrollHeight()\"\n      [suggestions]=\"suggestions()\"\n      (completeMethod)=\"setSuggestionQuery($event)\"\n      (onSelect)=\"onSelectValue($event)\"\n      (onKeyUp)=\"search($event)\"\n      (onDropdownClick)=\"buttonClick($event)\"\n      [pAutoFocus]=\"true\"\n    >\n    <ng-template let-item #group>\n      <div class=\"core:flex core:items-center\" [ngClass]=\"groupClass()\" [innerHTML]=\"item.label\"></div>\n    </ng-template>\n    <ng-template let-item #item>\n        @if(item.iconClass) {\n          <i [ngClass]=\"item.iconClass\"></i>&nbsp;\n        }\n        <span [innerHTML]=\"item.label\" [title]=\"item.originalLabel ? item.originalLabel : ''\"></span>\n    </ng-template>\n    </p-autoComplete>\n  `,\n    standalone: false\n})\nexport class SearchAutocompleteComponent implements AfterViewInit{\n\n  protected recordService: RecordService = inject(RecordService);\n  protected sanitizePipe: SanitizePipe = inject(SanitizePipe);\n\n  // Input\n  delay = input<number>(300);\n  groupClass = input<string>('core:text-gray-400');\n  inputStyleClass = input<string>('core:w-full');\n  minLength = input<number>(3);\n  placeholder = input(null);\n  recordTypes = input.required<IRecordType[]>();\n  scrollHeight = input<string>('250px');\n  styleClass = input<string>('core:w-full');\n  value = input<string>();\n\n  // Output\n  onSearch = output<string>();\n\n  // Current value\n  currentValue: string = '';\n\n  // Whether to display options as grouped when nested options are provided.\n  group = false;\n  overlayOptions: OverlayOptions = {};\n\n  @ViewChild('autoComplete') autoComplete: AutoComplete;\n\n  // User Query\n  private query = new Subject<string>();\n\n  buttonClick(event: AutoCompleteDropdownClickEvent) {\n    this.onSearch.emit(this.currentValue);\n  }\n\n  suggestions = toSignal(this.query.pipe(\n    switchMap((query: string) => this.getSuggestions(query))\n  ), { initialValue: []});\n\n  setSuggestionQuery(event: AutoCompleteCompleteEvent): void {\n    this.query.next(event.query);\n  }\n\n  onSelectValue(event: AutoCompleteSelectEvent) {\n    this.onSearch.emit(event.value);\n  }\n\n  search(event: KeyboardEvent) {\n    if(event?.code === 'Enter') {\n      this.onSearch.emit(this.currentValue);\n    }\n  }\n\n  calculateWidth() {\n    let width = 200;\n    if (this.autoComplete) {\n      width = DomHandler.getOuterWidth(this.autoComplete.el.nativeElement);\n    }\n    this.overlayOptions = {\n      contentStyle: { width: width * 1 + 'px' }\n    };\n  }\n\n  @HostListener('window:resize')\n  onResize() {\n    this.calculateWidth();\n  }\n\n  ngAfterViewInit() {\n    this.calculateWidth();\n  }\n\n  sanitize(value: string): string {\n    return this.sanitizePipe.transform(value);\n  }\n\n  private getSuggestions(query: string): any {\n    return combineLatest(this.prepareQuery(query)).pipe(\n      map((data: IAutoComplete[]) => {\n        if (data.length > 1) {\n          this.group = true;\n          const suggestions = [];\n          data.forEach((hits: any) => {\n            if (hits.length > 0) {\n              const selectedRecordType = this.recordTypes().find((type: IRecordType) => type.index === hits[0].index);\n              if (!('groupLabel' in selectedRecordType)) {\n                throw new Error('Missing groupLabel definition');\n              }\n              suggestions.push({\n                label: selectedRecordType.groupLabel,\n                items: hits\n              });\n            }\n          });\n          return suggestions;\n        } else {\n          return data[0];\n        }\n      })\n    );\n  }\n\n  private prepareQuery(query: string): Observable<any>[] {\n    const suggestions: Observable<any>[] = [];\n    this.recordTypes().forEach((recordType: IRecordType) => {\n      const queryParams = [];\n      if ('queryParams' in recordType) {\n        Object.keys(recordType.queryParams).forEach(key => {\n          queryParams.push(`${key}:${recordType.queryParams[key].replace(':', '\\\\:')}`);\n        });\n      }\n      let queryRecord = `${recordType.field}:${query}`;\n      if (queryParams.length > 0) {\n        queryRecord += ` AND ${queryParams.join(' AND ')}`;\n      }\n      suggestions.push(this.recordService.getRecords(\n        recordType.index,\n        queryRecord,\n        1,\n        recordType.maxSuggestions || 10,\n        [],\n        recordType.preFilters || {},\n        null,\n        recordType.sort || null,\n      ).pipe(\n        map((data: any) => recordType.processSuggestions(data, query))\n      ));\n    });\n\n    return suggestions;\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Component, OnInit, inject, input, output, signal } from '@angular/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { SearchField } from '../../record';\nimport { MenuItem } from 'primeng/api';\n\nexport interface searchFieldEvent {\n  action: 'select' | 'reset';\n  field?: SearchField;\n};\n\n@Component({\n    selector: 'ng-core-search-fields',\n    templateUrl: './search-fields.component.html',\n    standalone: false\n})\nexport class SearchFieldsComponent implements OnInit {\n\n  protected translate: TranslateService = inject(TranslateService);\n\n  // Input\n  searchLabel = input<string>('Search in');\n  resetLabel = input<string>('Reset');\n  searchFields = input.required<SearchField[]>();\n  withResetAction = input<boolean>(true);\n\n  // Output\n  onChange = output<searchFieldEvent>();\n\n  // Field label\n  label = signal(this.processLabel());\n\n  // Field items\n  items: MenuItem[] = [];\n\n  /** onInit hook */\n  ngOnInit(): void {\n    this.searchFields().map((field: any) => {\n      this.items.push({\n        label: field.label,\n        command: () => this.select(field),\n      });\n    });\n    if (this.withResetAction()) {\n      this.items.push({ separator: true });\n      this.items.push({\n        label: this.translate.instant(this.resetLabel()),\n        command: () => this.reset(),\n      });\n    }\n    this.label.set(this.processLabel());\n  }\n\n  /**\n   * Select a field from the menu\n   * @param field - SearchField\n   */\n  select(field: SearchField): void {\n    this.label.set(this.processLabel(field.label));\n    this.onChange.emit({ action: 'select', field: field });\n  }\n\n  /** Reset search field */\n  reset(): void {\n    this.label.set(this.processLabel());\n    this.onChange.emit({ action: 'reset' });\n  }\n\n  /**\n   * Label formatting\n   * @param label - The name of the field\n   * @returns string, The formatted label\n   */\n  private processLabel(label: string = '…'): string {\n    return this.translate.instant(this.searchLabel()) + ' ' + label;\n  }\n}\n","\n<!--\n  RERO angular core\n  Copyright (C) 2024 RERO\n\n  This program is free software: you can redistribute it and/or modify\n  it under the terms of the GNU Affero General Public License as published by\n  the Free Software Foundation, version 3 of the License.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n  GNU Affero General Public License for more details.\n\n  You should have received a copy of the GNU Affero General Public License\n  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n-->\n<p-splitButton [label]=\"label()\" [model]=\"items\" outlined />\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { ClipboardModule } from '@angular/cdk/clipboard';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { FORMLY_CONFIG, FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\nimport { FormlyPrimeNGModule } from '@ngx-formly/primeng';\nimport { TranslateService } from '@ngx-translate/core';\nimport { AutoCompleteModule } from 'primeng/autocomplete';\nimport { DataViewModule } from 'primeng/dataview';\nimport { DatePickerModule } from 'primeng/datepicker';\nimport { RadioButtonModule } from 'primeng/radiobutton';\nimport { CoreModule } from '../core.module';\nimport { GetRecordPipe } from '../pipe/get-record.pipe';\nimport { emailValidator } from '../validator/email.validator';\nimport { DetailButtonComponent } from './detail/detail-button/detail-button.component';\nimport { DetailComponent } from './detail/detail.component';\nimport { RecordDetailDirective } from './detail/detail.directive';\nimport { JsonComponent as DetailJsonComponent } from './detail/view/json.component';\nimport { EditorComponent } from './editor/editor.component';\nimport { registerNgCoreFormlyExtension } from './editor/extensions';\nimport { NgCoreFormlyDatePickerModule } from './editor/formly/primeng/date-picker/date-picker';\nimport { NgCoreFormlyInputModule } from './editor/formly/primeng/input/src/input.module';\nimport { NgCoreFormlyFieldInput } from './editor/formly/primeng/input/src/input.type';\nimport { NgCoreFormlyMultiCheckboxModule } from './editor/formly/primeng/multi-checkbox/multi-checkbox';\nimport { NgCoreFormlyMultiSelectModule } from './editor/formly/primeng/multi-select/multi-select';\nimport { NgCoreFormlyRemoteAutocompleteModule } from './editor/formly/primeng/remote-autocomplete/remote-autocomplete';\nimport { NgCoreFormlySelectModule } from './editor/formly/primeng/select/select';\nimport { NgCoreFormlyTreeSelectModule } from './editor/formly/primeng/tree-select/tree-select';\nimport { ArrayTypeComponent } from './editor/type/array-type/array-type.component';\nimport { MarkdownFieldComponent } from './editor/type/markdown/markdown.component';\nimport { MultiSchemaTypeComponent } from './editor/type/multischema/multischema.component';\nimport { ObjectTypeComponent } from './editor/type/object-type/object-type.component';\nimport { PasswordGeneratorTypeComponent } from './editor/type/password-generator-type.component';\nimport { RadioButtonComponent } from './editor/type/radio-button.component';\nimport { SwitchComponent } from './editor/type/switch/switch.component';\nimport { TextareaFieldComponent } from './editor/type/textarea/textarea.component';\nimport { AddFieldEditorComponent } from './editor/widgets/add-field-editor/add-field-editor.component';\nimport { DropdownLabelEditorComponent } from './editor/widgets/dropdown-label-editor/dropdown-label-editor.component';\nimport { LabelComponent } from './editor/widgets/label/label.component';\nimport { LoadTemplateFormComponent } from './editor/widgets/load-template-form/load-template-form.component';\nimport { SaveTemplateFormComponent } from './editor/widgets/save-template-form/save-template-form.component';\nimport { CardWrapperComponent } from './editor/wrappers/card-wrapper/card-wrapper.component';\nimport { FormFieldWrapperComponent } from './editor/wrappers/form-field-wrapper/form-field-wrapper.component';\nimport { HideWrapperComponent } from './editor/wrappers/hide-wrapper/hide-wrapper.component';\nimport { ExportButtonComponent } from './export-button/export-button.component';\nimport { RecordRoutingModule } from './record-routing.module';\nimport { RecordService } from './record.service';\nimport { SearchAutocompleteComponent } from './search-autocomplete/search-autocomplete.component';\nimport { RecordSearchAggregationComponent } from './search/aggregation/aggregation.component';\nimport { BucketsComponent } from './search/aggregation/buckets/buckets.component';\nimport { AggregationDateRangeComponent } from './search/aggregation/date-range/date-range.component';\nimport { ListFiltersComponent } from './search/aggregation/list-filters/list-filters.component';\nimport { BucketNamePipe } from './search/aggregation/pipe/bucket-name.pipe';\nimport { AggregationSliderComponent } from './search/aggregation/slider/slider.component';\nimport { MenuSortComponent } from './search/menu-sort/menu-sort.component';\nimport { PaginatorComponent } from './search/paginator/paginator.component';\nimport { RecordSearchPageComponent } from './search/record-search-page.component';\nimport { RecordSearchComponent } from './search/record-search.component';\nimport { JsonComponent } from './search/result/item/json.component';\nimport { RecordSearchResultComponent } from './search/result/record-search-result.component';\nimport { SearchFieldsComponent } from './search/search-fields/search-fields.component';\nimport { SearchFiltersComponent } from './search/search-filters/search-filters.component';\nimport { SearchTabsComponent } from './search/search-tabs/search-tabs.component';\n\n@NgModule({\n    declarations: [\n        RecordSearchPageComponent,\n        RecordSearchComponent,\n        RecordSearchResultComponent,\n        RecordSearchAggregationComponent,\n        JsonComponent,\n        DetailComponent,\n        RecordDetailDirective,\n        DetailJsonComponent,\n        GetRecordPipe,\n        EditorComponent,\n        AddFieldEditorComponent,\n        DropdownLabelEditorComponent,\n        ArrayTypeComponent,\n        ObjectTypeComponent,\n        SwitchComponent,\n        MultiSchemaTypeComponent,\n        BucketsComponent,\n        FormFieldWrapperComponent,\n        HideWrapperComponent,\n        AggregationSliderComponent,\n        LoadTemplateFormComponent,\n        SaveTemplateFormComponent,\n        CardWrapperComponent,\n        LabelComponent,\n        TextareaFieldComponent,\n        MarkdownFieldComponent,\n        AggregationDateRangeComponent,\n        ExportButtonComponent,\n        ListFiltersComponent,\n        BucketNamePipe,\n        PasswordGeneratorTypeComponent,\n        DetailButtonComponent,\n        RadioButtonComponent,\n        PaginatorComponent,\n        MenuSortComponent,\n        SearchFiltersComponent,\n        SearchFieldsComponent,\n        SearchTabsComponent,\n        SearchAutocompleteComponent\n    ],\n    imports: [\n        // NOTE : BrowserAnimationModule **should** be include in application core module.\n        // BrowserAnimationsModule,\n        CoreModule,\n        FormsModule,\n        ReactiveFormsModule,\n        RecordRoutingModule,\n        DatePickerModule,\n        DataViewModule,\n        ClipboardModule,\n        RadioButtonModule,\n        AutoCompleteModule,\n        FormlySelectModule,\n        FormlyModule.forRoot({\n            extensions: [\n                { name: 'email', extension: { prePopulate: emailValidator } }\n            ],\n            extras: {\n                checkExpressionOn: 'changeDetectionCheck',\n                resetFieldOnHide: true\n            },\n            types: [\n                { name: 'input', component: NgCoreFormlyFieldInput },\n                { name: 'boolean', component: SwitchComponent },\n                { name: 'enum', extends: 'select' },\n                { name: 'array', component: ArrayTypeComponent, wrappers: ['card'] },\n                { name: 'object', component: ObjectTypeComponent,  wrappers: ['card'] },\n                { name: 'multischema', component: MultiSchemaTypeComponent},\n                { name: 'textarea', component: TextareaFieldComponent },\n                { name: 'markdown', component: MarkdownFieldComponent },\n                { name: 'passwordGenerator', component: PasswordGeneratorTypeComponent },\n                { name: 'radioButton', component: RadioButtonComponent },\n            ],\n            wrappers: [\n                { name: 'form-field', component: FormFieldWrapperComponent },\n                { name: 'hide', component: HideWrapperComponent },\n                { name: 'card', component: CardWrapperComponent }\n            ]\n        }),\n        FormlyPrimeNGModule,\n        NgCoreFormlyDatePickerModule,\n        NgCoreFormlyInputModule,\n        NgCoreFormlyMultiCheckboxModule,\n        NgCoreFormlyMultiSelectModule,\n        NgCoreFormlyRemoteAutocompleteModule,\n        NgCoreFormlySelectModule,\n        NgCoreFormlyTreeSelectModule,\n    ],\n    exports: [\n        RecordSearchComponent,\n        GetRecordPipe,\n        CoreModule,\n        EditorComponent,\n        FormlyModule,\n        FormlyPrimeNGModule,\n        FormlySelectModule,\n        ExportButtonComponent,\n        DetailButtonComponent,\n        RecordDetailDirective,\n        ListFiltersComponent,\n        RecordSearchAggregationComponent,\n        SearchFiltersComponent,\n        SearchFieldsComponent,\n        SearchAutocompleteComponent,\n        NgCoreFormlyDatePickerModule,\n        NgCoreFormlyInputModule,\n        NgCoreFormlyMultiCheckboxModule,\n        NgCoreFormlyRemoteAutocompleteModule,\n        NgCoreFormlySelectModule,\n        MenuSortComponent,\n        NgCoreFormlyTreeSelectModule,\n        SearchTabsComponent,\n        PaginatorComponent\n    ],\n    providers: [\n        {\n            provide: FORMLY_CONFIG,\n            multi: true,\n            useFactory: registerNgCoreFormlyExtension,\n            deps: [TranslateService, RecordService]\n        }\n    ]\n})\nexport class RecordModule { }\n","/*\n * RERO angular core\n * Copyright (C) 2020 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\n/**\n * Interface representing a result item in search.\n */\nexport interface ResultItem {\n  // Record data.\n  record: any;\n\n  // Type of resource.\n  type: string;\n\n  // Object containing info about the link to detail.\n  detailUrl: { link: string, external: boolean };\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { inject, Injectable } from '@angular/core';\nimport * as CryptoJS from 'crypto-js';\nimport { CoreConfigService } from '../core-config.service';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class CryptoJsService {\n\n  protected coreConfigService: CoreConfigService = inject(CoreConfigService);\n\n  encrypt(value: string) {\n    const _key = this.secretPassphrase();\n    return CryptoJS.AES.encrypt(value, _key, { iv: _key });\n  }\n\n  decrypt(value: string) {\n    const _key = this.secretPassphrase();\n    return CryptoJS.AES.decrypt(value, _key, { iv: _key }).toString(CryptoJS.enc.Utf8);\n  }\n\n  private secretPassphrase() {\n    return CryptoJS.enc.Utf8.parse(this.coreConfigService.secretPassphrase);\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { inject, Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { CryptoJsService } from './crypto-js.service';\n\n/**\n * Service for managing data saved into local storage.\n */\n@Injectable({\n  providedIn: 'root'\n})\nexport class LocalStorageService {\n\n  protected cryptoService: CryptoJsService = inject(CryptoJsService);\n\n  /**\n   * Event for set data on local storage\n   */\n  private onSet: Subject<LocalStorageEvent> = new Subject();\n\n  /**\n   * Event for remove data on local storage\n   */\n  private onRemove: Subject<any> = new Subject();\n\n  /**\n   * Event for clear on local storage\n   */\n  private onClear: Subject<any> = new Subject();\n\n  /**\n   * On set observable\n   * @return onSet subject observable\n   */\n  get onSet$() {\n    return this.onSet.asObservable();\n  }\n\n  /**\n   * On remove observable\n   * @return onRemove subject observable\n   */\n  get onRemove$() {\n    return this.onRemove.asObservable();\n  }\n\n  /**\n   * On clear observable\n   * @return onClear subject observable\n   */\n  get onClear$() {\n    return this.onClear.asObservable();\n  }\n\n  /**\n   * Set a new key on LocalStorage\n   * @param key - string\n   * @param value - string\n   * @return LocalStorageService\n   */\n  set(key: string, value: any) {\n    const data = { date: new Date(), data: value };\n    localStorage.setItem(key, this.cryptoService.encrypt(\n      JSON.stringify(data)\n    ));\n    this.onSet.next({ key, data });\n\n    return this;\n  }\n\n  /**\n   * Update date of current object qualified by the key\n   * @param key - string\n   * @return LocalStorageService;\n   */\n  updateDate(key: string) {\n    const local = this.getItem(key);\n    local.date = new Date();\n    localStorage.setItem(key, this.cryptoService.encrypt(\n      JSON.stringify(local)\n    ));\n\n    return this;\n  }\n\n  /**\n   * Return the status of current object qualified by the key\n   * @param key - string\n   * @param seconds - number of seconds session expired\n   * @return boolean\n   */\n  isExpired(key: string, seconds: number) {\n    const local = this.getItem(key);\n    const today = new Date();\n    const localDate = new Date(local.date);\n    localDate.setSeconds(localDate.getSeconds() + seconds);\n\n    return today > localDate;\n  }\n\n  /**\n   * Return JSON content of the LocaleStorage\n   * @param key - string\n   * @param field - string (default: data)\n   * @return JSON\n   */\n  get(key: string, field = 'data') {\n    const local = this.getItem(key);\n    return local ? local[field] : null;\n  }\n\n  /**\n   * Remove a key of LocaleStorage\n   * @param key - string\n   * @return LocalStorageService\n   */\n  remove(key: string) {\n    localStorage.removeItem(key);\n    this.onRemove.next(null);\n\n    return this;\n  }\n\n  /**\n   * Clear LocaleStorage\n   * @return LocalStorageService\n   */\n  clear() {\n    localStorage.clear();\n    this.onClear.next(null);\n\n    return this;\n  }\n\n  /**\n   * has key in LocaleStorage\n   * @param key - string\n   * @return Boolean\n   */\n  has(key: string) {\n    return this.keys().indexOf(key) > -1;\n  }\n\n  /**\n   * Get local storage with the key\n   * @param key - string\n   */\n  private getItem(key: string) {\n    return JSON.parse(this.cryptoService.decrypt(\n      localStorage.getItem(key)\n    ));\n  }\n\n  /**\n   * Return keys of LocaleStorage\n   * @return array\n   */\n  private keys() {\n    return Object.keys(localStorage);\n  }\n}\n\n/**\n * LocalStorageEvent interface\n */\nexport interface LocalStorageEvent {\n  key: string;\n  data: any;\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { inject, Injectable } from '@angular/core';\nimport { Meta, Title } from '@angular/platform-browser';\nimport { TranslateService } from '@ngx-translate/core';\n\n/**\n * Service for managing HTML meta and title.\n */\n@Injectable({\n  providedIn: 'root'\n})\nexport class TitleMetaService {\n\n  protected titleService: Title = inject(Title);\n  protected metaService: Meta = inject(Meta);\n  protected translateService: TranslateService = inject(TranslateService);\n\n  // Prefix.\n  private prefix = null;\n\n  /**\n   * Prefix of title window\n   * @param prefix - string\n   * @return this\n   */\n  setPrefix(prefix?: string) {\n    this.prefix = this.translateService.instant(prefix);\n\n    return this;\n  }\n\n  /**\n   * Title window <head>\n   * @param title - sting\n   * @return this\n   */\n  setTitle(title: string) {\n    let pageTitle = '';\n    if (this.prefix !== null) {\n      pageTitle += this.prefix + ': ';\n    }\n    pageTitle += this.translateService.instant(title);\n    this.titleService.setTitle(pageTitle);\n\n    return this;\n  }\n\n  /**\n   * Get Title\n   * @return string\n   */\n  getTitle() {\n    return this.titleService.getTitle();\n  }\n\n  /**\n   * Meta window <head>\n   * @param name - string\n   * @param content - string\n   * @return this\n   */\n  setMeta(name: string, content: string) {\n    this.metaService.updateTag({name, content});\n\n    return this;\n  }\n\n  /**\n   * Get Meta with its name\n   * @param name - string\n   * @return string\n   */\n  getMeta(name: string) {\n    return this.metaService.getTag(name);\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport {AbstractControl, UntypedFormArray, ValidationErrors, ValidatorFn} from '@angular/forms';\nimport { DateTime } from \"luxon\";\n\n// @dynamic\nexport class TimeValidator {\n\n  static readonly FORMAT = 'hh:mm';\n\n  /**\n   * Allow to control if time interval limits are well formed : the end limit should be 'older' the start limit\n   * @param start: the field name where to find the start limit value\n   * @param end: the field name where to find the end limit value\n   */\n  static greaterThanValidator(start: string, end: string): ValidatorFn {\n    return (control: AbstractControl): ValidationErrors|null => {\n      if (control) {\n        let isLessThan = false;\n        const startTime = control.get(start);\n        const endTime = control.get(end);\n        const startDate = DateTime.fromFormat(startTime.value, TimeValidator.FORMAT);\n        const endDate = DateTime.fromFormat(endTime.value, TimeValidator.FORMAT);\n        if (startDate.toFormat(TimeValidator.FORMAT) !== '00:00' || endDate.toFormat(TimeValidator.FORMAT) !== '00:00') {\n          isLessThan = startDate.diff(endDate) >= 0;\n        }\n        return (isLessThan)\n            ? ({ lessThan: { value: isLessThan }})\n            : null;\n      }\n    };\n  }\n\n  static RangePeriodValidator(): ValidatorFn {\n    return (control: AbstractControl): ValidationErrors|null => {\n      if (control.value) {\n        let isRangeLessThan = false;\n        const times = control.get('times') as UntypedFormArray;\n        if (control.get('is_open').value && times.value.length > 1) {\n          const firstStartDate = DateTime.fromFormat(times.at(0).get('start_time').value, TimeValidator.FORMAT);\n          const firstEndDate = DateTime.fromFormat(times.at(0).get('end_time').value, TimeValidator.FORMAT);\n          const lastStartDate = DateTime.fromFormat(times.at(1).get('start_time').value, TimeValidator.FORMAT);\n          const lastEndDate = DateTime.fromFormat(times.at(1).get('end_time').value, TimeValidator.FORMAT);\n          if (firstStartDate > lastStartDate) {\n            isRangeLessThan = firstStartDate.diff(lastStartDate) <= 0\n              || firstStartDate.diff(lastEndDate) <= 0;\n          } else {\n            isRangeLessThan = lastStartDate.diff(firstEndDate) <= 0\n              || lastStartDate.diff(firstEndDate) <= 0;\n          }\n        }\n        return (isRangeLessThan)\n            ? ({ rangeLessThan: { value: isRangeLessThan }})\n            : null;\n      }\n    };\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport { AbstractControl } from '@angular/forms';\nimport { RecordService } from '../record/record.service';\n\n// @dynamic\nexport class UniqueValidator {\n  static createValidator(\n    recordService: RecordService,\n    recordType: string,\n    fieldName: string,\n    excludePid: string = null\n  ) {\n    return (control: AbstractControl) => {\n      return recordService.valueAlreadyExists (\n        recordType,\n        fieldName,\n        control.value,\n        excludePid\n      );\n    };\n  }\n}\n","/*\n * RERO angular core\n * Copyright (C) 2020-2024 RERO\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published by\n * the Free Software Foundation, version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nexport * from './lib/api/api.service';\nexport * from './lib/component/abstract-can-deactivate.component';\nexport * from './lib/core-config.service';\nexport * from './lib/core.module';\nexport * from './lib/dialog/dialog.component';\nexport * from './lib/directives/ng-var.directive';\nexport * from './lib/error/error';\nexport * from './lib/error/error.component';\nexport * from './lib/guard/component-can-deactivate.guard';\nexport * from './lib/ILogger';\nexport * from './lib/pipe/callback-array-filter.pipe';\nexport * from './lib/pipe/default.pipe';\nexport * from './lib/pipe/filesize.pipe';\nexport * from './lib/pipe/get-record.pipe';\nexport * from './lib/pipe/markdown.pipe';\nexport * from './lib/pipe/nl2br.pipe';\nexport * from './lib/pipe/sanitize.pipe';\nexport * from './lib/pipe/sort-by-keys.pipe';\nexport * from './lib/pipe/truncate-text.pipe';\nexport * from './lib/pipe/ucfirst.pipe';\nexport * from './lib/prime-ng-core-module';\nexport * from './lib/primeng-config';\nexport * from './lib/record/action-status';\nexport * from './lib/record/detail/detail-button/detail-button.component';\nexport * from './lib/record/detail/detail-button/IRecordEvent.interface';\nexport * from './lib/record/detail/detail.component';\nexport * from './lib/record/detail/detail.directive';\nexport * from './lib/record/detail/view/detail-record';\nexport * from './lib/record/editor/editor.component';\nexport * from './lib/record/editor/extensions';\nexport * from './lib/record/editor/formly/primeng/date-picker/date-picker';\nexport * from './lib/record/editor/formly/primeng/input/src/input.module';\nexport * from './lib/record/editor/formly/primeng/input/src/input.type';\nexport * from './lib/record/editor/formly/primeng/multi-checkbox/multi-checkbox';\nexport * from './lib/record/editor/formly/primeng/multi-select/multi-select';\nexport * from './lib/record/editor/formly/primeng/remote-autocomplete/remote-autocomplete';\nexport * from './lib/record/editor/formly/primeng/remote-autocomplete/remote-autocomplete.service';\nexport * from './lib/record/editor/formly/primeng/remote-autocomplete/remote-autocomplete.interface';\nexport * from './lib/record/editor/formly/primeng/select/select';\nexport * from './lib/record/editor/formly/primeng/tree-select/tree-select';\nexport * from './lib/record/editor/services/jsonschema.service';\nexport * from './lib/record/editor/type/array-type/array-type.component';\nexport * from './lib/record/editor/type/multischema/multischema.component';\nexport * from './lib/record/editor/type/object-type/object-type.component';\nexport * from './lib/record/editor/type/password-generator-type.component';\nexport * from './lib/record/editor/type/switch/switch.component';\nexport * from './lib/record/editor/utils';\nexport * from './lib/record/editor/widgets/add-field-editor/add-field-editor.component';\nexport * from './lib/record/editor/widgets/dropdown-label-editor/dropdown-label-editor.component';\nexport * from './lib/record/export-button/export-button.component';\nexport * from './lib/record/record';\nexport * from './lib/record/record-ui.service';\nexport * from './lib/record/record.handle-error.service';\nexport * from './lib/record/record.module';\nexport * from './lib/record/record.service';\nexport * from './lib/record/search-autocomplete/search-autocomplete.component';\nexport * from './lib/record/search/aggregation/aggregation.component';\nexport * from './lib/record/search/aggregation/list-filters/list-filters.component';\nexport * from './lib/record/search/aggregation/service/bucket-name.service';\nexport * from './lib/record/search/menu-sort/menu-sort.component';\nexport * from './lib/record/search/paginator/paginator.component';\nexport * from './lib/record/search/record-search-page.component';\nexport * from './lib/record/search/record-search.component';\nexport * from './lib/record/search/record-search.service';\nexport * from './lib/record/search/result/item/result-item';\nexport * from './lib/record/search/search-fields/search-fields.component';\nexport * from './lib/record/search/search-filters/search-filters.component';\nexport * from './lib/record/search/search-tabs/search-tabs.component';\nexport * from './lib/route/route-collection.service';\nexport * from './lib/route/route-interface';\nexport * from './lib/search-input/search-input.component';\nexport * from './lib/service/crypto-js.service';\nexport * from './lib/service/local-storage.service';\nexport * from './lib/service/logger.service';\nexport * from './lib/service/title-meta.service';\nexport * from './lib/text-read-more/text-read-more.component';\nexport * from './lib/translate/date-translate-pipe';\nexport * from './lib/translate/translate-language.pipe';\nexport * from './lib/translate/translate-language.service';\nexport * from './lib/translate/translate-loader';\nexport * from './lib/translate/translate-service';\nexport * from './lib/utils/config';\nexport * from './lib/utils/sort-by-keys';\nexport * from './lib/utils/utils';\nexport * from './lib/validator/time.validator';\nexport * from './lib/validator/unique.validator';\nexport * from './lib/validator/validators';\nexport * from './lib/record/editor/formly/primeng/services/translate-label.service';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","i3.Nl2brPipe","i1","i2.DefaultPipe","i3","i4","i1.Nl2brPipe","de","en","fr","it","map","BaseTranslateLoader","JsonComponent","catchError","tap","i1.ErrorComponent","i2.RecordDetailDirective","i3.DetailButtonComponent","i5","i6","i7.ErrorComponent","i8","i9","i10.AddFieldEditorComponent","i11.UpperCaseFirstPipe","switchMap","PrimeNgMultiSelectModule","FormlyCoreSelectModule","FormlySelectModule","i5.DropdownLabelEditorComponent","i2.LabelComponent","i5.BucketNamePipe","i3.BucketsComponent","i4.AggregationSliderComponent","i5.AggregationDateRangeComponent","i6.UpperCaseFirstPipe","i3.BucketNamePipe","i6.SearchInputComponent","i10.RecordSearchResultComponent","i11.RecordSearchAggregationComponent","i12.ExportButtonComponent","i13.ListFiltersComponent","i14.PaginatorComponent","i15.MenuSortComponent","i16.SearchFiltersComponent","i17.SearchTabsComponent","i18.UpperCaseFirstPipe","i1.RecordSearchComponent","DetailJsonComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;AAeG;AAmBH;;AAEG;MAIU,iBAAiB,CAAA;AAH9B,IAAA,WAAA,GAAA;QAIE,IAAU,CAAA,UAAA,GAAG,KAAK;QAClB,IAAY,CAAA,YAAA,GAAG,SAAS;QACxB,IAAU,CAAA,UAAA,GAAG,EAAE;QACf,IAAiB,CAAA,iBAAA,GAAG,MAAM;QAC1B,IAAkB,CAAA,kBAAA,GAAG,iBAAiB;QACtC,IAAU,CAAA,UAAA,GAAG,SAAS;AACtB,QAAA,IAAA,CAAA,SAAS,GAAG,CAAC,IAAI,CAAC;QAClB,IAAe,CAAA,eAAA,GAAG,IAAI;QACtB,IAAgB,CAAA,gBAAA,GAAG,8BAA8B;QACjD,IAAgB,CAAA,gBAAA,GAAG,EAAE;AACtB;8GAXY,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EA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