{"version":3,"file":"index.cjs","sources":["../../../src/html-components/flow-legend/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { FlowLegend, FlowLegendConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\n\n// data and required props \ntype Props = FlowLegendConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\nconst data = computed(() => props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<FlowLegend>()\nconst elRef = ref<HTMLDivElement>()\n\nonMounted(() => {\n  nextTick(() => {\n    if(elRef.value)\n    component.value = new FlowLegend(elRef.value, { ...config.value, renderIntoProvidedDomNode: true })\n    \n    \n  })\n})\n\nonUnmounted(() => {\n  component.value?.destroy()\n  \n})\n\nwatch(config, (curr, prev) => {\n  if (!arePropsEqual(curr, prev)) {\n    component.value?.setConfig(config.value)\n    component.value?.render()\n  }\n})\n\n\ndefineExpose({\n  component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisFlowLegendSelectors = FlowLegend.selectors\n</script>\n\n<template>\n  <div data-vis-flow-legend ref=\"elRef\"/>\n</template>\n\n\n<style>\n  [data-vis-flow-legend] {\n    display:block;\n  }\n</style>\n"],"names":["VisFlowLegendSelectors","FlowLegend","props","__props","computed","config","useForwardProps","component","ref","elRef","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_createElementBlock"],"mappings":"8LA+CaA,EAAyBC,EAAAA,WAAW,ySAtCjD,MAAMC,EAAQC,EAEDC,EAAAA,SAAS,IAAMF,EAAM,IAAI,EAEtC,MAAMG,EAASC,EAAAA,gBAAgBJ,CAAK,EAG9BK,EAAYC,EAAAA,IAAA,EACZC,EAAQD,EAAAA,IAAA,EAEdE,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACVF,EAAM,QACTF,EAAU,MAAQ,IAAIN,EAAAA,WAAWQ,EAAM,MAAO,CAAE,GAAGJ,EAAO,MAAO,0BAA2B,EAAA,CAAM,EAGpG,CAAC,CACH,CAAC,EAEDO,EAAAA,YAAY,IAAM,CAChBL,EAAU,OAAO,QAAA,CAEnB,CAAC,EAEDM,EAAAA,MAAMR,EAAQ,CAACS,EAAMC,IAAS,CACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BR,EAAU,OAAO,UAAUF,EAAO,KAAK,EACvCE,EAAU,OAAO,OAAA,EAErB,CAAC,EAGDU,EAAa,CACX,UAAAV,CAAA,CACD,wBAQCW,EAAAA,mBAAuC,MAAA,CAAlC,uBAAA,WAAyB,QAAJ,IAAIT,CAAA"}