{"version":3,"file":"ajf-core-common.mjs","sources":["../../../projects/core/common/src/apply-styles-directive.ts","../../../projects/core/common/src/auto-focus.directive.ts","../../../projects/core/common/src/build-string-identifier.ts","../../../projects/core/common/src/dnd-directive.ts","../../../projects/core/common/src/format-if-number.ts","../../../projects/core/common/src/translate-if-string.ts","../../../projects/core/common/src/safe-html.ts","../../../projects/core/common/src/common-module.ts","../../../projects/core/common/src/context.ts","../../../projects/core/common/src/public_api.ts","../../../projects/core/common/src/ajf-core-common.ts"],"sourcesContent":["/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) 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 GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nimport {Directive, ElementRef, Input, isDevMode, Renderer2} from '@angular/core';\n\n// eslint-disable-next-line\n@Directive({selector: '[applyStyles]'})\nexport class ApplyStylesDirective {\n  private _cssStyles: {[style: string]: any} = {};\n  @Input()\n  set applyStyles(cssStyles: {[style: string]: any} | null) {\n    if (cssStyles != null && this._cssStyles !== cssStyles) {\n      this._cssStyles = cssStyles;\n      this._updateStyles();\n    }\n  }\n\n  constructor(private _el: ElementRef, private _renderer: Renderer2) {}\n\n  private _updateStyles(): void {\n    if (this._cssStyles == null) {\n      return;\n    }\n\n    Object.keys(this._cssStyles).forEach((style: string) => {\n      try {\n        this._renderer.setStyle(this._el.nativeElement, style, `${this._cssStyles[style]}`);\n      } catch (e) {\n        if (isDevMode()) {\n          console.log(e);\n        }\n      }\n    });\n  }\n}\n","/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) 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 GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\nimport {AfterContentInit, Directive, ElementRef, Input} from '@angular/core';\n\n// eslint-disable-next-line\n@Directive({selector: '[autoFocus]'})\nexport class AutofocusDirective implements AfterContentInit {\n  @Input() appAutoFocus: boolean = false;\n\n  constructor(private _el: ElementRef) {}\n\n  ngAfterContentInit() {\n    this._el.nativeElement.focus();\n  }\n}\n","/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) 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 GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nimport {AjfContext} from './context';\nimport {AjfStringIdentifier} from './string-identifier';\n\n/**\n * emptyString: the string displayed when the context has no match.\n * entriesDivider: the string displauyed beetwen entries\n * labelSuffix: the string displayed between the label and its values\n * valuesDivider: the string dispayed between values\n * @export\n * @interface BuildStringIdentifierOpts\n */\nexport interface BuildStringIdentifierOpts {\n  emptyString?: string;\n  entriesDivider?: string;\n  labelSuffix?: string;\n  valuesDivider?: string;\n}\n\nconst defaultOpts = {\n  emptyString: 'Not specified',\n  entriesDivider: ' - ',\n  labelSuffix: ': ',\n  valuesDivider: ', ',\n};\n\nexport const buildStringIdentifierOpts = (\n  opts?: BuildStringIdentifierOpts,\n): Required<BuildStringIdentifierOpts> => ({...defaultOpts, ...opts});\n\nexport const buildStringIdentifier = (\n  stringIdentifier: AjfStringIdentifier[] | undefined,\n  context: AjfContext,\n  opts?: BuildStringIdentifierOpts,\n): string => {\n  const strings = {...defaultOpts, ...opts} as Required<BuildStringIdentifierOpts>;\n  if (stringIdentifier == null) {\n    return strings.emptyString;\n  }\n  const str: string[] = stringIdentifier.map(s => {\n    const values: string[] = [];\n    if (s.value != null && s.value.length > 0) {\n      s.value.forEach(curValue => {\n        const vp: string[] = curValue.split('.');\n        let curContext = context;\n        let val: any = null;\n        vp.forEach(k => {\n          if (curContext[k] !== undefined) {\n            val = context[k];\n            curContext = context[k];\n          }\n        });\n        if (val != null && val instanceof Array && val.length > 0) {\n          val = val.map(v => `${v}`).join(', ');\n        }\n        if (val != null) {\n          values.push(`${val}`);\n        }\n      });\n    }\n    return `${s.label}: ${values.length > 0 ? values.join(', ') : strings.emptyString}`;\n  });\n  return str.join(' - ');\n};\n","/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) 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 GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nimport {Directive, EventEmitter, Output} from '@angular/core';\nimport {Observable} from 'rxjs';\n\n@Directive({\n  selector: '[ajfDnd]',\n  host: {\n    '[class.ajf-dnd-over]': 'over',\n    '(dragover)': 'onDragOver($event)',\n    '(dragleave)': 'onDragLeave($event)',\n    '(drop)': 'onDrop($event)',\n  },\n})\nexport class AjfDndDirective {\n  private _file: EventEmitter<FileList> = new EventEmitter<FileList>();\n  @Output() readonly file: Observable<FileList> = this._file as Observable<FileList>;\n\n  private _over: boolean = false;\n  get over(): boolean {\n    return this._over;\n  }\n\n  onDragOver(evt: DragEvent): void {\n    evt.preventDefault();\n    evt.stopPropagation();\n    this._over = true;\n  }\n\n  onDragLeave(evt: DragEvent): void {\n    evt.preventDefault();\n    evt.stopPropagation();\n    this._over = false;\n  }\n\n  onDrop(evt: DragEvent): void {\n    evt.preventDefault();\n    evt.stopPropagation();\n    if (evt.dataTransfer == null || evt.dataTransfer.files.length === 0) {\n      return;\n    }\n    let files: FileList = evt.dataTransfer.files;\n    if (files.length > 0) {\n      this._over = false;\n      this._file.emit(files);\n    }\n  }\n}\n","/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) 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 GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nimport {DecimalPipe} from '@angular/common';\nimport {Pipe, PipeTransform} from '@angular/core';\n\n@Pipe({name: 'ajfFormatIfNumber'})\nexport class FormatIfNumber extends DecimalPipe implements PipeTransform {\n  override transform(value: any, digitsInfo?: string, locale?: string) {\n    if (typeof value === 'number') {\n      return super.transform(value, digitsInfo, locale);\n    } else {\n      return value;\n    }\n  }\n}\n","/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) 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 GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nimport {TranslocoPipe} from '@ajf/core/transloco';\nimport {Pipe, PipeTransform} from '@angular/core';\n\n@Pipe({name: 'ajfTranslateIfString'})\nexport class TranslateIfString extends TranslocoPipe implements PipeTransform {\n  override transform(query: any, ...args: any[]): any {\n    if (typeof query === 'string') {\n      return super.transform(query, ...args);\n    } else {\n      return query;\n    }\n  }\n}\n","/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) 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 GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nimport {Pipe, PipeTransform, SecurityContext} from '@angular/core';\nimport {DomSanitizer} from '@angular/platform-browser';\n\n@Pipe({name: 'safeHtml'})\nexport class SafeHtmlPipe implements PipeTransform {\n  constructor(private sanitizer: DomSanitizer) {}\n\n  transform(value: string): string {\n    if (!value) return '';\n    const stringValue = typeof value === 'string' ? value : JSON.stringify(value);\n    const htmlText = stringValue.replace(/\\r\\n|\\r|\\n/g, '<br>');\n    return this.sanitizer.sanitize(SecurityContext.HTML, htmlText) ?? '';\n  }\n}\n","/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) 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 GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nimport {NgModule} from '@angular/core';\n\nimport {ApplyStylesDirective} from './apply-styles-directive';\nimport {AutofocusDirective} from './auto-focus.directive';\nimport {AjfDndDirective} from './dnd-directive';\nimport {FormatIfNumber} from './format-if-number';\nimport {TranslateIfString} from './translate-if-string';\nimport {SafeHtmlPipe} from './safe-html';\n\n@NgModule({\n  declarations: [\n    AjfDndDirective,\n    ApplyStylesDirective,\n    AutofocusDirective,\n    FormatIfNumber,\n    SafeHtmlPipe,\n    TranslateIfString,\n  ],\n  exports: [\n    AjfDndDirective,\n    ApplyStylesDirective,\n    AutofocusDirective,\n    FormatIfNumber,\n    SafeHtmlPipe,\n    TranslateIfString,\n  ],\n})\nexport class AjfCommonModule {}\n","/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) 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 GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nexport type AjfContext = {\n  [key: string]: any;\n};\n","/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) 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 GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nexport * from './apply-styles-directive';\nexport * from './auto-focus.directive';\nexport * from './build-string-identifier';\nexport * from './common-module';\nexport * from './context';\nexport * from './dnd-directive';\nexport * from './format-if-number';\nexport * from './string-identifier';\nexport * from './translate-if-string';\nexport * from './safe-html';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;;AAoBG;AAIH;MAEa,oBAAoB,CAAA;IAE/B,IACI,WAAW,CAAC,SAAwC,EAAA;QACtD,IAAI,SAAS,IAAI,IAAI,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,EAAE;AACtD,YAAA,IAAI,CAAC,UAAU,GAAG,SAAS;YAC3B,IAAI,CAAC,aAAa,EAAE;;;IAIxB,WAAoB,CA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