{"version":3,"names":["createSchemes","newSchemes","AllColors.LINKLIST_SCHEMES","forEach","element","schemeName","linklistColor","AllColors","toConstantCase","linklistHoverColor","scheme","LINKLIST_SCHEME_CONFIG","LINKLIST_SCHEME_MAP","Map","Object","entries","createLinklistMapDefinition","map","background","config","linklistCss","EonUiLinklistStyle0","Linklist","this","schemeConfig","schemeMap","componentWillLoad","applyScheme","componentDidLoad","setCssVariables","applySchemeDelegate","setCssVariablesDelegate","render","h","key","name"],"sources":["src/components/linklist/constants/linklist-constants.ts","src/components/linklist/linklist.scss?tag=eon-ui-linklist&encapsulation=shadow","src/components/linklist/linklist.tsx"],"sourcesContent":["import { LinkListSchemeDefinition } from \"./linklist-types\";\nimport { BackgroundColor } from \"../../background/constants/background-types\";\nimport * as AllColors from \"../../../constants/colors\";\nimport { createLinklistMapDefinition } from \"../../../utils/scheme-helper\";\nimport { toConstantCase } from \"../../../utils/string-format\";\n\nfunction createSchemes() {\n let newSchemes: AllColors.LinklistSchemeConfiguration = {};\n\n AllColors.LINKLIST_SCHEMES.forEach((element) => {\n newSchemes[element.schemeName] = {\n linklistColor: AllColors[`COLOR_${toConstantCase(element.schemeName)}`],\n linklistHoverColor: AllColors[`COLOR_${toConstantCase(element.schemeName)}_SHADE_1`]\n };\n if (element.scheme) {\n newSchemes[element.schemeName] = { ...newSchemes[element.schemeName], ...element.scheme };\n }\n });\n return newSchemes;\n}\n\nexport const LINKLIST_SCHEME_CONFIG: AllColors.LinklistSchemeConfiguration = createSchemes();\n\nexport const LINKLIST_SCHEME_MAP: Map = new Map(\n Object.entries(createLinklistMapDefinition()).map(([background, config]) => [\n background as BackgroundColor,\n LINKLIST_SCHEME_CONFIG[config as string]\n ])\n);\n","/**\n * THEME JSON CONFIG CSS VARS\n * The following default component scss variables can be overwritten via theme configuration per brand.\n * If you need to add new one, please make sure to set a default value.\n * JSON Definition for Component with name \"Example\": testCssVar: \"20px\"\n * Resulting CSS var: $example-test-css-var: 20px;\n */\n\n/* END THEME JSON CONFIG CSS VARS ******************************************************* */\n\n:host {\n display: block;\n}\n\n::slotted(eon-ui-linklist-item) {\n display: block;\n margin-bottom: 8px !important;\n}\n","import { Component, Element, h, State, Prop, Watch } from \"@stencil/core\";\nimport { ColorableComponent, applySchemeDelegate, setCssVariablesDelegate } from \"../../common/colorable-component\";\nimport { LinkListSchemeDefinition, LinkListSchemeName } from \"./constants/linklist-types\";\nimport { LINKLIST_SCHEME_CONFIG, LINKLIST_SCHEME_MAP } from \"./constants/linklist-constants\";\nimport { LinklistSchemeConfiguration } from \"../../constants/colors\";\n// import { InitLogging } from \"../../decorators/init-logging\";\n\n/**\n * @slot [unnamed] - Holds any number of eon-ui-linklist-item elements. These are also slotted and expect a single eon-ui-link as child element.\n * @slot editor - Use this to inject editor controls etc. in a CMS environment like AEM\n */\n@Component({\n tag: \"eon-ui-linklist\",\n styleUrl: \"linklist.scss\",\n shadow: true\n})\nexport class Linklist implements ColorableComponent> {\n // @InitLogging() sentryTransaction;\n schemeConfig: LinklistSchemeConfiguration = LINKLIST_SCHEME_CONFIG;\n schemeMap = LINKLIST_SCHEME_MAP;\n\n @Element() hostElement: HTMLEonUiLinklistElement;\n\n /**\n * The components active scheme. If {@link scheme} is set, it will be set to the corresponding scheme.\n * If not set, the component will try to calculate it based on the nearest enclosing background information given by inner-background attribute or eon-ui-background component.\n */\n @State() activeScheme: LinkListSchemeDefinition;\n\n /**\n * The name of the color scheme of the component.\n * If not set, the component will try to calculate it based on the nearest enclosing background information given by inner-background attribute or eon-ui-background component.\n */\n @Prop({ reflect: true }) scheme: LinkListSchemeName;\n\n componentWillLoad() {\n this.applyScheme();\n }\n\n componentDidLoad() {\n this.setCssVariables();\n }\n\n @Watch(\"scheme\")\n applyScheme(): void {\n applySchemeDelegate(this);\n }\n\n @Watch(\"activeScheme\")\n setCssVariables(): void {\n setCssVariablesDelegate(this);\n }\n\n render() {\n return (\n
\n \n \n
\n );\n }\n}\n"],"mappings":"2PAMA,SAASA,IACP,IAAIC,EAA8E,GAElFC,EAA2BC,SAASC,IAClCH,EAAWG,EAAQC,YAAc,CAC/BC,cAAeC,EAAU,SAASC,EAAeJ,EAAQC,eACzDI,mBAAoBF,EAAU,SAASC,EAAeJ,EAAQC,wBAEhE,GAAID,EAAQM,OAAQ,CAClBT,EAAWG,EAAQC,YAAc,IAAKJ,EAAWG,EAAQC,eAAgBD,EAAQM,O,KAGrF,OAAOT,CACT,CAEO,MAAMU,EAA0FX,IAEhG,MAAMY,EAAkF,IAAIC,IACjGC,OAAOC,QAAQC,KAA+BC,KAAI,EAAEC,EAAYC,KAAY,CAC1ED,EACAP,EAAuBQ,OC1B3B,MAAMC,EAAc,gt8CACpB,MAAAC,EAAeD,E,MCeFE,EAAQ,M,yBAEnBC,KAAAC,aAAsEb,EACtEY,KAAAE,UAAYb,E,kDAgBZ,iBAAAc,GACEH,KAAKI,a,CAGP,gBAAAC,GACEL,KAAKM,iB,CAIP,WAAAF,GACEG,EAAoBP,K,CAItB,eAAAM,GACEE,EAAwBR,K,CAG1B,MAAAS,GACE,OACEC,EAAA,OAAAC,IAAA,4CACED,EAAA,QAAAC,IAAA,6CACAD,EAAA,QAAAC,IAAA,2CAAMC,KAAK,W"}