{"version":3,"file":"ajf-material-node-icon.mjs","sources":["../../../projects/material/node-icon/src/node-icon.ts","../../../projects/material/node-icon/src/node-icon.html","../../../projects/material/node-icon/src/node-icon-module.ts","../../../projects/material/node-icon/src/public_api.ts","../../../projects/material/node-icon/src/ajf-material-node-icon.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 {AjfField, AjfFieldType, AjfNode, AjfNodeType} from '@ajf/core/forms';\nimport {AjfNodeIcon as CoreNodeIcon} from '@ajf/core/node-icon';\nimport {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core';\n\n@Component({\n  selector: 'ajf-node-icon',\n  templateUrl: 'node-icon.html',\n  styleUrls: ['node-icon.scss'],\n  encapsulation: ViewEncapsulation.None,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AjfNodeIcon extends CoreNodeIcon {\n  matIcon(node: AjfNode): string {\n    if (node.nodeType === AjfNodeType.AjfSlide) {\n      return 'folder';\n    }\n    if (node.nodeType === AjfNodeType.AjfRepeatingSlide) {\n      return 'create_new_folder';\n    }\n    if (node.nodeType !== AjfNodeType.AjfField) {\n      return 'broken_image';\n    }\n    switch ((node as AjfField).fieldType as AjfFieldType) {\n      case AjfFieldType.String:\n      case AjfFieldType.Text:\n        return 'abc';\n      case AjfFieldType.Number:\n      case AjfFieldType.Range:\n        return 'pin';\n      case AjfFieldType.Boolean:\n        return 'toggle_off';\n      case AjfFieldType.SingleChoice:\n        return 'format_list_bulleted';\n      case AjfFieldType.MultipleChoice:\n        return 'format_list_numbered';\n      case AjfFieldType.Formula:\n        return 'code';\n      case AjfFieldType.Empty:\n        return 'html';\n      case AjfFieldType.Date:\n      case AjfFieldType.DateInput:\n        return 'calendar_month';\n      case AjfFieldType.Time:\n        return 'access_time';\n      case AjfFieldType.Table:\n        return 'grid_on';\n      case AjfFieldType.Geolocation:\n        return 'location_on';\n      case AjfFieldType.Barcode:\n        return 'qr_code_2';\n      case AjfFieldType.File:\n        return 'attach_file';\n      case AjfFieldType.Image:\n        return 'image';\n      case AjfFieldType.VideoUrl:\n        return 'videocam';\n      case AjfFieldType.Signature:\n        return 'draw';\n      default:\n        return 'broken_image';\n    }\n  }\n}\n","<ng-template [ngIf]=\"node\">\n  <mat-icon>{{matIcon(node)}}</mat-icon>\n</ng-template>\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 {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {MatIconModule} from '@angular/material/icon';\n\nimport {AjfNodeIcon} from './node-icon';\n\n@NgModule({\n  imports: [CommonModule, MatIconModule],\n  declarations: [AjfNodeIcon],\n  exports: [AjfNodeIcon],\n})\nexport class AjfNodeIconModule {}\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 './node-icon-module';\nexport * from './node-icon';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["CoreNodeIcon"],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;AAoBG;AAaG,MAAO,WAAY,SAAQA,aAAY,CAAA;AAC3C,IAAA,OAAO,CAAC,IAAa,EAAA;QACnB,IAAI,IAAI,CAAC,QAAQ,KAAK,WAAW,CAAC,QAAQ,EAAE;AAC1C,YAAA,OAAO,QAAQ;;QAEjB,IAAI,IAAI,CAAC,QAAQ,KAAK,WAAW,CAAC,iBAAiB,EAAE;AACnD,YAAA,OAAO,mBAAmB;;QAE5B,IAAI,IAAI,CAAC,QAAQ,KAAK,WAAW,CAAC,QAAQ,EAAE;AAC1C,YAAA,OAAO,cAAc;;AAEvB,QAAA,QAAS,IAAiB,CAAC,SAAyB;YAClD,KAAK,YAAY,CAAC,MAAM;YACxB,KAAK,YAAY,CAAC,IAAI;AACpB,gBAAA,OAAO,KAAK;YACd,KAAK,YAAY,CAAC,MAAM;YACxB,KAAK,YAAY,CAAC,KAAK;AACrB,gBAAA,OAAO,KAAK;YACd,KAAK,YAAY,CAAC,OAAO;AACvB,gBAAA,OAAO,YAAY;YACrB,KAAK,YAAY,CAAC,YAAY;AAC5B,gBAAA,OAAO,sBAAsB;YAC/B,KAAK,YAAY,CAAC,cA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