@unovis/vue 1.6.2 → 1.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/annotations/index.cjs.map +1 -1
- package/components/annotations/index.d.ts +18 -94
- package/components/annotations/index.js.map +1 -1
- package/components/area/index.cjs +1 -1
- package/components/area/index.cjs.map +1 -1
- package/components/area/index.d.ts +12 -59
- package/components/area/index.js +25 -25
- package/components/area/index.js.map +1 -1
- package/components/axis/index.cjs +1 -1
- package/components/axis/index.cjs.map +1 -1
- package/components/axis/index.d.ts +12 -82
- package/components/axis/index.js +16 -16
- package/components/axis/index.js.map +1 -1
- package/components/brush/index.cjs +1 -1
- package/components/brush/index.cjs.map +1 -1
- package/components/brush/index.d.ts +12 -62
- package/components/brush/index.js +17 -17
- package/components/brush/index.js.map +1 -1
- package/components/chord-diagram/index.cjs +1 -1
- package/components/chord-diagram/index.cjs.map +1 -1
- package/components/chord-diagram/index.d.ts +12 -60
- package/components/chord-diagram/index.js +26 -26
- package/components/chord-diagram/index.js.map +1 -1
- package/components/crosshair/index.cjs.map +1 -1
- package/components/crosshair/index.d.ts +12 -66
- package/components/crosshair/index.js.map +1 -1
- package/components/donut/index.cjs +1 -1
- package/components/donut/index.cjs.map +1 -1
- package/components/donut/index.d.ts +12 -64
- package/components/donut/index.js +17 -17
- package/components/donut/index.js.map +1 -1
- package/components/free-brush/index.cjs +1 -1
- package/components/free-brush/index.cjs.map +1 -1
- package/components/free-brush/index.d.ts +12 -62
- package/components/free-brush/index.js +18 -18
- package/components/free-brush/index.js.map +1 -1
- package/components/graph/index.cjs +1 -1
- package/components/graph/index.cjs.map +1 -1
- package/components/graph/index.d.ts +10 -134
- package/components/graph/index.js +66 -66
- package/components/graph/index.js.map +1 -1
- package/components/grouped-bar/index.cjs +1 -1
- package/components/grouped-bar/index.cjs.map +1 -1
- package/components/grouped-bar/index.d.ts +12 -62
- package/components/grouped-bar/index.js +25 -25
- package/components/grouped-bar/index.js.map +1 -1
- package/components/line/index.cjs +1 -1
- package/components/line/index.cjs.map +1 -1
- package/components/line/index.d.ts +12 -60
- package/components/line/index.js +24 -24
- package/components/line/index.js.map +1 -1
- package/components/nested-donut/index.cjs +1 -1
- package/components/nested-donut/index.cjs.map +1 -1
- package/components/nested-donut/index.d.ts +12 -65
- package/components/nested-donut/index.js +22 -22
- package/components/nested-donut/index.js.map +1 -1
- package/components/plotband/index.cjs +1 -1
- package/components/plotband/index.cjs.map +1 -1
- package/components/plotband/index.d.ts +12 -63
- package/components/plotband/index.js +12 -12
- package/components/plotband/index.js.map +1 -1
- package/components/plotline/index.cjs +1 -1
- package/components/plotline/index.cjs.map +1 -1
- package/components/plotline/index.d.ts +12 -64
- package/components/plotline/index.js +9 -9
- package/components/plotline/index.js.map +1 -1
- package/components/sankey/index.cjs +1 -1
- package/components/sankey/index.cjs.map +1 -1
- package/components/sankey/index.d.ts +12 -95
- package/components/sankey/index.js +35 -35
- package/components/sankey/index.js.map +1 -1
- package/components/scatter/index.cjs +1 -1
- package/components/scatter/index.cjs.map +1 -1
- package/components/scatter/index.d.ts +12 -65
- package/components/scatter/index.js +27 -27
- package/components/scatter/index.js.map +1 -1
- package/components/stacked-bar/index.cjs +1 -1
- package/components/stacked-bar/index.cjs.map +1 -1
- package/components/stacked-bar/index.d.ts +12 -62
- package/components/stacked-bar/index.js +22 -22
- package/components/stacked-bar/index.js.map +1 -1
- package/components/timeline/index.cjs.map +1 -1
- package/components/timeline/index.d.ts +12 -88
- package/components/timeline/index.js.map +1 -1
- package/components/tooltip/index.cjs.map +1 -1
- package/components/tooltip/index.d.ts +19 -99
- package/components/tooltip/index.js.map +1 -1
- package/components/topojson-map/index.cjs +1 -1
- package/components/topojson-map/index.cjs.map +1 -1
- package/components/topojson-map/index.d.ts +12 -78
- package/components/topojson-map/index.js +39 -39
- package/components/topojson-map/index.js.map +1 -1
- package/components/treemap/index.cjs +1 -1
- package/components/treemap/index.cjs.map +1 -1
- package/components/treemap/index.d.ts +12 -69
- package/components/treemap/index.js +14 -14
- package/components/treemap/index.js.map +1 -1
- package/components/xy-labels/index.cjs +1 -1
- package/components/xy-labels/index.cjs.map +1 -1
- package/components/xy-labels/index.d.ts +12 -66
- package/components/xy-labels/index.js +38 -38
- package/components/xy-labels/index.js.map +1 -1
- package/components.d.ts +27 -26
- package/containers/single-container/index.cjs.map +1 -1
- package/containers/single-container/index.d.ts +11 -25
- package/containers/single-container/index.js.map +1 -1
- package/containers/xy-container/index.cjs.map +1 -1
- package/containers/xy-container/index.d.ts +12 -44
- package/containers/xy-container/index.js.map +1 -1
- package/containers.d.ts +2 -2
- package/html-components/bullet-legend/index.cjs +1 -1
- package/html-components/bullet-legend/index.cjs.map +1 -1
- package/html-components/bullet-legend/index.d.ts +18 -74
- package/html-components/bullet-legend/index.js +12 -12
- package/html-components/bullet-legend/index.js.map +1 -1
- package/html-components/flow-legend/index.cjs +2 -0
- package/html-components/flow-legend/index.cjs.map +1 -0
- package/html-components/flow-legend/index.d.ts +20 -0
- package/html-components/flow-legend/index.js +44 -0
- package/html-components/flow-legend/index.js.map +1 -0
- package/html-components/flow-legend/index3.cjs +2 -0
- package/html-components/flow-legend/index3.cjs.map +1 -0
- package/html-components/flow-legend/index3.js +8 -0
- package/html-components/flow-legend/index3.js.map +1 -0
- package/html-components/leaflet-flow-map/index.cjs +1 -1
- package/html-components/leaflet-flow-map/index.cjs.map +1 -1
- package/html-components/leaflet-flow-map/index.d.ts +12 -112
- package/html-components/leaflet-flow-map/index.js +47 -47
- package/html-components/leaflet-flow-map/index.js.map +1 -1
- package/html-components/leaflet-map/index.cjs +1 -1
- package/html-components/leaflet-map/index.cjs.map +1 -1
- package/html-components/leaflet-map/index.d.ts +12 -99
- package/html-components/leaflet-map/index.js +38 -38
- package/html-components/leaflet-map/index.js.map +1 -1
- package/html-components/rolling-pin-legend/index.cjs.map +1 -1
- package/html-components/rolling-pin-legend/index.d.ts +18 -50
- package/html-components/rolling-pin-legend/index.js.map +1 -1
- package/index.cjs +2 -2
- package/index.js +79 -75
- package/index.js.map +1 -1
- package/package.json +6 -4
- package/utils/context.cjs.map +1 -1
- package/utils/context.d.ts +1 -0
- package/utils/context.js.map +1 -1
- package/utils/props.cjs.map +1 -1
- package/utils/props.d.ts +2 -1
- package/utils/props.js.map +1 -1
|
@@ -1,52 +1,20 @@
|
|
|
1
|
-
import { RollingPinLegend } from '@unovis/ts';
|
|
2
|
-
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
type: import(
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
type: import("vue").PropType<string>;
|
|
19
|
-
};
|
|
20
|
-
renderIntoProvidedDomNode: {
|
|
21
|
-
type: import("vue").PropType<boolean>;
|
|
22
|
-
};
|
|
23
|
-
data: {
|
|
24
|
-
type: import("vue").PropType<never>;
|
|
25
|
-
};
|
|
26
|
-
}>, {
|
|
27
|
-
component: import("vue").Ref<RollingPinLegend, RollingPinLegend>;
|
|
28
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
29
|
-
rects: {
|
|
30
|
-
type: import("vue").PropType<string[]>;
|
|
1
|
+
import { RollingPinLegend, RollingPinLegendConfigInterface } from '@unovis/ts';
|
|
2
|
+
|
|
3
|
+
export declare const VisRollingPinLegendSelectors: typeof import("@unovis/ts/components/rolling-pin-legend/style");
|
|
4
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<RollingPinLegendConfigInterface & {
|
|
5
|
+
data?: null;
|
|
6
|
+
}>>, {
|
|
7
|
+
component: import('vue').Ref<RollingPinLegend, RollingPinLegend>;
|
|
8
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<RollingPinLegendConfigInterface & {
|
|
9
|
+
data?: null;
|
|
10
|
+
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
13
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
14
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
15
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
16
|
+
} : {
|
|
17
|
+
type: import('vue').PropType<T[K]>;
|
|
31
18
|
required: true;
|
|
32
19
|
};
|
|
33
|
-
|
|
34
|
-
type: import("vue").PropType<string>;
|
|
35
|
-
};
|
|
36
|
-
rightLabelText: {
|
|
37
|
-
type: import("vue").PropType<string>;
|
|
38
|
-
};
|
|
39
|
-
labelClassName: {
|
|
40
|
-
type: import("vue").PropType<string>;
|
|
41
|
-
};
|
|
42
|
-
labelFontSize: {
|
|
43
|
-
type: import("vue").PropType<string>;
|
|
44
|
-
};
|
|
45
|
-
renderIntoProvidedDomNode: {
|
|
46
|
-
type: import("vue").PropType<boolean>;
|
|
47
|
-
};
|
|
48
|
-
data: {
|
|
49
|
-
type: import("vue").PropType<never>;
|
|
50
|
-
};
|
|
51
|
-
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
52
|
-
export default _default;
|
|
20
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/html-components/rolling-pin-legend/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { RollingPinLegend, RollingPinLegendConfigInterface, RollingPinLegendItem } 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 = RollingPinLegendConfigInterface\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<RollingPinLegend>()\nconst elRef = ref<HTMLDivElement>()\n\nonMounted(() => {\n nextTick(() => {\n if(elRef.value)\n component.value = new RollingPinLegend(elRef.value, config.value)\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 }\n})\n\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisRollingPinLegendSelectors = RollingPinLegend.selectors\n</script>\n\n<template>\n <div data-vis-rolling-pin-legend ref=\"elRef\"/>\n</template>\n\n\n<style>\n [data-vis-rolling-pin-legend] {\n display:block;\n }\n</style>\n"],"names":["VisRollingPinLegendSelectors","RollingPinLegend","props","__props","computed","config","useForwardProps","component","ref","elRef","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;AA8CO,MAAMA,IAA+BC,EAAiB;;;;;;;;;;;;AArC7D,UAAMC,IAAQC;AAED,IAAAC,EAAS,MAAMF,EAAM,IAAI;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/html-components/rolling-pin-legend/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { RollingPinLegend, RollingPinLegendConfigInterface, RollingPinLegendItem } 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 = RollingPinLegendConfigInterface\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<RollingPinLegend>()\nconst elRef = ref<HTMLDivElement>()\n\nonMounted(() => {\n nextTick(() => {\n if(elRef.value)\n component.value = new RollingPinLegend(elRef.value, config.value)\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 }\n})\n\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisRollingPinLegendSelectors = RollingPinLegend.selectors\n</script>\n\n<template>\n <div data-vis-rolling-pin-legend ref=\"elRef\"/>\n</template>\n\n\n<style>\n [data-vis-rolling-pin-legend] {\n display:block;\n }\n</style>\n"],"names":["VisRollingPinLegendSelectors","RollingPinLegend","props","__props","computed","config","useForwardProps","component","ref","elRef","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose","_createElementBlock"],"mappings":";;;AA8CO,MAAMA,IAA+BC,EAAiB;;;;;;;;;;;;AArC7D,UAAMC,IAAQC;AAED,IAAAC,EAAS,MAAMF,EAAM,IAAI;AAEtC,UAAMG,IAASC,EAAgBJ,CAAK,GAG9BK,IAAYC,EAAA,GACZC,IAAQD,EAAA;AAEd,WAAAE,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAGF,EAAM,UACTF,EAAU,QAAQ,IAAIN,EAAiBQ,EAAM,OAAOJ,EAAO,KAAK;AAAA,MAGlE,CAAC;AAAA,IACH,CAAC,GAEDO,EAAY,MAAM;;AAChB,OAAAC,IAAAN,EAAU,UAAV,QAAAM,EAAiB;AAAA,IAEnB,CAAC,GAEDC,EAAMT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BH,IAAAN,EAAU,UAAV,QAAAM,EAAiB,UAAUR,EAAO;AAAA,IAEtC,CAAC,GAGDa,EAAa;AAAA,MACX,WAAAX;AAAA,IAAA,CACD,mBAQCY,EAA8C,OAAA;AAAA,MAAzC,+BAAA;AAAA,eAAgC;AAAA,MAAJ,KAAIV;AAAA,IAAA;;;"}
|
package/index.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".unovis-xy-container,.unovis-single-container{display:block;position:relative;width:100%}[data-vis-leaflet-map],[data-vis-leaflet-flow-map]{display:block;position:relative}[data-vis-bullet-legend],[data-vis-rolling-pin-legend]{display:block}")),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".unovis-xy-container,.unovis-single-container{display:block;position:relative;width:100%}[data-vis-leaflet-map],[data-vis-leaflet-flow-map]{display:block;position:relative}[data-vis-bullet-legend],[data-vis-flow-legend],[data-vis-rolling-pin-legend]{display:block}")),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./containers/xy-container/index.cjs");;const M=require("./containers/single-container/index.cjs");;const e=require("./components/area/index.cjs"),t=require("./components/axis/index.cjs"),s=require("./components/brush/index.cjs"),r=require("./components/crosshair/index.cjs"),i=require("./components/free-brush/index.cjs"),_=require("./components/grouped-bar/index.cjs"),u=require("./components/line/index.cjs"),l=require("./components/scatter/index.cjs"),n=require("./components/stacked-bar/index.cjs"),o=require("./components/timeline/index.cjs"),c=require("./components/xy-labels/index.cjs"),a=require("./components/plotband/index.cjs"),p=require("./components/plotline/index.cjs"),d=require("./components/chord-diagram/index.cjs"),V=require("./components/donut/index.cjs"),S=require("./components/graph/index.cjs"),v=require("./components/nested-donut/index.cjs"),g=require("./components/sankey/index.cjs"),f=require("./components/topojson-map/index.cjs"),q=require("./components/treemap/index.cjs"),y=require("./components/tooltip/index.cjs"),x=require("./components/annotations/index.cjs"),$=require("./html-components/leaflet-map/index.cjs");;const L=require("./html-components/leaflet-flow-map/index.cjs");;const h=require("./html-components/bullet-legend/index.cjs");;const B=require("./html-components/flow-legend/index.cjs");;const T=require("./html-components/rolling-pin-legend/index.cjs");;exports.VisXYContainer=m.default;exports.VisSingleContainer=M.default;exports.VisArea=e.default;exports.VisAreaSelectors=e.VisAreaSelectors;exports.VisAxis=t.default;exports.VisAxisSelectors=t.VisAxisSelectors;exports.VisBrush=s.default;exports.VisBrushSelectors=s.VisBrushSelectors;exports.VisCrosshair=r.default;exports.VisCrosshairSelectors=r.VisCrosshairSelectors;exports.VisFreeBrush=i.default;exports.VisFreeBrushSelectors=i.VisFreeBrushSelectors;exports.VisGroupedBar=_.default;exports.VisGroupedBarSelectors=_.VisGroupedBarSelectors;exports.VisLine=u.default;exports.VisLineSelectors=u.VisLineSelectors;exports.VisScatter=l.default;exports.VisScatterSelectors=l.VisScatterSelectors;exports.VisStackedBar=n.default;exports.VisStackedBarSelectors=n.VisStackedBarSelectors;exports.VisTimeline=o.default;exports.VisTimelineSelectors=o.VisTimelineSelectors;exports.VisXYLabels=c.default;exports.VisXYLabelsSelectors=c.VisXYLabelsSelectors;exports.VisPlotband=a.default;exports.VisPlotbandSelectors=a.VisPlotbandSelectors;exports.VisPlotline=p.default;exports.VisPlotlineSelectors=p.VisPlotlineSelectors;exports.VisChordDiagram=d.default;exports.VisChordDiagramSelectors=d.VisChordDiagramSelectors;exports.VisDonut=V.default;exports.VisDonutSelectors=V.VisDonutSelectors;exports.VisGraph=S.default;exports.VisGraphSelectors=S.VisGraphSelectors;exports.VisNestedDonut=v.default;exports.VisNestedDonutSelectors=v.VisNestedDonutSelectors;exports.VisSankey=g.default;exports.VisSankeySelectors=g.VisSankeySelectors;exports.VisTopoJSONMap=f.default;exports.VisTopoJSONMapSelectors=f.VisTopoJSONMapSelectors;exports.VisTreemap=q.default;exports.VisTreemapSelectors=q.VisTreemapSelectors;exports.VisTooltip=y.default;exports.VisTooltipSelectors=y.VisTooltipSelectors;exports.VisAnnotations=x.default;exports.VisAnnotationsSelectors=x.VisAnnotationsSelectors;exports.VisLeafletMap=$.default;exports.VisLeafletMapSelectors=$.VisLeafletMapSelectors;exports.VisLeafletFlowMap=L.default;exports.VisLeafletFlowMapSelectors=L.VisLeafletFlowMapSelectors;exports.VisBulletLegend=h.default;exports.VisBulletLegendSelectors=h.VisBulletLegendSelectors;exports.VisFlowLegend=B.default;exports.VisFlowLegendSelectors=B.VisFlowLegendSelectors;exports.VisRollingPinLegend=T.default;exports.VisRollingPinLegendSelectors=T.VisRollingPinLegendSelectors;
|
|
3
3
|
//# sourceMappingURL=index.cjs.map
|
package/index.js
CHANGED
|
@@ -1,92 +1,96 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".unovis-xy-container,.unovis-single-container{display:block;position:relative;width:100%}[data-vis-leaflet-map],[data-vis-leaflet-flow-map]{display:block;position:relative}[data-vis-bullet-legend],[data-vis-rolling-pin-legend]{display:block}")),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
|
|
2
|
-
import { default as
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".unovis-xy-container,.unovis-single-container{display:block;position:relative;width:100%}[data-vis-leaflet-map],[data-vis-leaflet-flow-map]{display:block;position:relative}[data-vis-bullet-legend],[data-vis-flow-legend],[data-vis-rolling-pin-legend]{display:block}")),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
|
|
2
|
+
import { default as V } from "./containers/xy-container/index.js";
|
|
3
3
|
|
|
4
|
-
import { default as
|
|
5
|
-
|
|
6
|
-
import { default as
|
|
7
|
-
import { default as
|
|
8
|
-
import { default as
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
4
|
+
import { default as d } from "./containers/single-container/index.js";
|
|
5
|
+
|
|
6
|
+
import { default as u, VisAreaSelectors as S } from "./components/area/index.js";
|
|
7
|
+
import { default as c, VisAxisSelectors as x } from "./components/axis/index.js";
|
|
8
|
+
import { default as g, VisBrushSelectors as h } from "./components/brush/index.js";
|
|
9
|
+
import { default as T, VisCrosshairSelectors as A } from "./components/crosshair/index.js";
|
|
10
|
+
import { default as D, VisFreeBrushSelectors as F } from "./components/free-brush/index.js";
|
|
11
11
|
import { default as P, VisGroupedBarSelectors as b } from "./components/grouped-bar/index.js";
|
|
12
|
-
import { default as
|
|
12
|
+
import { default as w, VisLineSelectors as G } from "./components/line/index.js";
|
|
13
13
|
import { default as X, VisScatterSelectors as Y } from "./components/scatter/index.js";
|
|
14
|
-
import { default as
|
|
15
|
-
import { default as
|
|
16
|
-
import { default as
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
19
|
-
import { default as
|
|
20
|
-
import { default as
|
|
21
|
-
import { default as
|
|
22
|
-
import { default as
|
|
23
|
-
import { default as
|
|
24
|
-
import { default as
|
|
25
|
-
import { default as
|
|
26
|
-
import { default as
|
|
27
|
-
import { default as
|
|
28
|
-
import { default as
|
|
29
|
-
|
|
14
|
+
import { default as J, VisStackedBarSelectors as O } from "./components/stacked-bar/index.js";
|
|
15
|
+
import { default as j, VisTimelineSelectors as q } from "./components/timeline/index.js";
|
|
16
|
+
import { default as z, VisXYLabelsSelectors as E } from "./components/xy-labels/index.js";
|
|
17
|
+
import { default as I, VisPlotbandSelectors as K } from "./components/plotband/index.js";
|
|
18
|
+
import { default as U, VisPlotlineSelectors as W } from "./components/plotline/index.js";
|
|
19
|
+
import { default as _, VisChordDiagramSelectors as $ } from "./components/chord-diagram/index.js";
|
|
20
|
+
import { default as se, VisDonutSelectors as oe } from "./components/donut/index.js";
|
|
21
|
+
import { default as te, VisGraphSelectors as ae } from "./components/graph/index.js";
|
|
22
|
+
import { default as le, VisNestedDonutSelectors as fe } from "./components/nested-donut/index.js";
|
|
23
|
+
import { default as pe, VisSankeySelectors as de } from "./components/sankey/index.js";
|
|
24
|
+
import { default as ue, VisTopoJSONMapSelectors as Se } from "./components/topojson-map/index.js";
|
|
25
|
+
import { default as ce, VisTreemapSelectors as xe } from "./components/treemap/index.js";
|
|
26
|
+
import { default as ge, VisTooltipSelectors as he } from "./components/tooltip/index.js";
|
|
27
|
+
import { default as Te, VisAnnotationsSelectors as Ae } from "./components/annotations/index.js";
|
|
28
|
+
import { default as De, VisLeafletMapSelectors as Fe } from "./html-components/leaflet-map/index.js";
|
|
29
|
+
|
|
30
30
|
import { default as Pe, VisLeafletFlowMapSelectors as be } from "./html-components/leaflet-flow-map/index.js";
|
|
31
|
-
|
|
32
|
-
import { default as
|
|
33
|
-
|
|
34
|
-
import { default as Xe,
|
|
35
|
-
|
|
31
|
+
|
|
32
|
+
import { default as we, VisBulletLegendSelectors as Ge } from "./html-components/bullet-legend/index.js";
|
|
33
|
+
|
|
34
|
+
import { default as Xe, VisFlowLegendSelectors as Ye } from "./html-components/flow-legend/index.js";
|
|
35
|
+
|
|
36
|
+
import { default as Je, VisRollingPinLegendSelectors as Oe } from "./html-components/rolling-pin-legend/index.js";
|
|
37
|
+
|
|
36
38
|
export {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
Te as VisAnnotations,
|
|
40
|
+
Ae as VisAnnotationsSelectors,
|
|
41
|
+
u as VisArea,
|
|
42
|
+
S as VisAreaSelectors,
|
|
43
|
+
c as VisAxis,
|
|
44
|
+
x as VisAxisSelectors,
|
|
45
|
+
g as VisBrush,
|
|
44
46
|
h as VisBrushSelectors,
|
|
45
|
-
|
|
47
|
+
we as VisBulletLegend,
|
|
46
48
|
Ge as VisBulletLegendSelectors,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
49
|
+
_ as VisChordDiagram,
|
|
50
|
+
$ as VisChordDiagramSelectors,
|
|
51
|
+
T as VisCrosshair,
|
|
52
|
+
A as VisCrosshairSelectors,
|
|
53
|
+
se as VisDonut,
|
|
54
|
+
oe as VisDonutSelectors,
|
|
55
|
+
Xe as VisFlowLegend,
|
|
56
|
+
Ye as VisFlowLegendSelectors,
|
|
57
|
+
D as VisFreeBrush,
|
|
58
|
+
F as VisFreeBrushSelectors,
|
|
59
|
+
te as VisGraph,
|
|
60
|
+
ae as VisGraphSelectors,
|
|
57
61
|
P as VisGroupedBar,
|
|
58
62
|
b as VisGroupedBarSelectors,
|
|
59
63
|
Pe as VisLeafletFlowMap,
|
|
60
64
|
be as VisLeafletFlowMapSelectors,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
65
|
+
De as VisLeafletMap,
|
|
66
|
+
Fe as VisLeafletMapSelectors,
|
|
67
|
+
w as VisLine,
|
|
64
68
|
G as VisLineSelectors,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
le as VisNestedDonut,
|
|
70
|
+
fe as VisNestedDonutSelectors,
|
|
71
|
+
I as VisPlotband,
|
|
72
|
+
K as VisPlotbandSelectors,
|
|
73
|
+
U as VisPlotline,
|
|
74
|
+
W as VisPlotlineSelectors,
|
|
75
|
+
Je as VisRollingPinLegend,
|
|
76
|
+
Oe as VisRollingPinLegendSelectors,
|
|
77
|
+
pe as VisSankey,
|
|
78
|
+
de as VisSankeySelectors,
|
|
75
79
|
X as VisScatter,
|
|
76
80
|
Y as VisScatterSelectors,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
d as VisSingleContainer,
|
|
82
|
+
J as VisStackedBar,
|
|
83
|
+
O as VisStackedBarSelectors,
|
|
84
|
+
j as VisTimeline,
|
|
85
|
+
q as VisTimelineSelectors,
|
|
86
|
+
ge as VisTooltip,
|
|
83
87
|
he as VisTooltipSelectors,
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
ue as VisTopoJSONMap,
|
|
89
|
+
Se as VisTopoJSONMapSelectors,
|
|
90
|
+
ce as VisTreemap,
|
|
91
|
+
xe as VisTreemapSelectors,
|
|
92
|
+
V as VisXYContainer,
|
|
93
|
+
z as VisXYLabels,
|
|
94
|
+
E as VisXYLabelsSelectors
|
|
91
95
|
};
|
|
92
96
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unovis/vue",
|
|
3
3
|
"description": "Modular data visualization framework for React, Angular, Svelte, Vue, and vanilla TypeScript or JavaScript",
|
|
4
|
-
"version": "1.6.
|
|
5
|
-
"packageManager": "
|
|
4
|
+
"version": "1.6.4",
|
|
5
|
+
"packageManager": "pnpm@10.23.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/f5/unovis.git",
|
|
@@ -53,21 +53,23 @@
|
|
|
53
53
|
"gallery": "vite"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@unovis/ts": "1.6.
|
|
56
|
+
"@unovis/ts": "1.6.4",
|
|
57
57
|
"vue": "^3"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
+
"@unovis/shared": "workspace:*",
|
|
60
61
|
"@antfu/eslint-config": "^3.9.1",
|
|
61
62
|
"@rollup/plugin-node-resolve": "^13.0.4",
|
|
62
63
|
"@vitejs/plugin-vue": "^5.2.3",
|
|
63
64
|
"@vue/tsconfig": "^0.4.0",
|
|
65
|
+
"buffer-from": "^1.1.2",
|
|
64
66
|
"de-indent": "^1.0.2",
|
|
65
67
|
"jju": "^1.4.0",
|
|
66
68
|
"rollup": "^2.61.1",
|
|
67
69
|
"rollup-plugin-commonjs": "^10.1.0",
|
|
68
70
|
"rollup-plugin-typescript2": "^0.31.1",
|
|
69
71
|
"tslib": "^2.3.1",
|
|
70
|
-
"typescript": "~
|
|
72
|
+
"typescript": "~5.6.3",
|
|
71
73
|
"vite": "^6.2.4",
|
|
72
74
|
"vite-plugin-css-injected-by-js": "^3.3.0",
|
|
73
75
|
"vite-plugin-dts": "^3.5.3",
|
package/utils/context.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.cjs","sources":["../../src/utils/context.ts"],"sourcesContent":["import { XYComponentCore, ComponentCore, Tooltip, Crosshair, Axis, Annotations } from '@unovis/ts'\nimport { InjectionKey, Ref } from 'vue'\n\nexport const componentAccessorKey = Symbol('componentAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: XYComponentCore<any> | ComponentCore<any>) => void;\n destroy: () => void;\n}>\n\nexport const tooltipAccessorKey = Symbol('tooltipAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: Tooltip) => void;\n destroy: () => void;\n}>\n\nexport const crosshairAccessorKey = Symbol('crosshairAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: Crosshair<any>) => void;\n destroy: () => void;\n}>\n\nexport const axisAccessorKey = Symbol('axisAccessorKey') as InjectionKey< {\n data: Ref<any>;\n update: (c: Axis<any>) => void;\n destroy: (c: string) => void;\n}>\n\nexport const annotationsAccessorKey = Symbol('annotationsAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: Annotations) => void;\n destroy: () => void;\n}>\n"],"names":["componentAccessorKey","tooltipAccessorKey","crosshairAccessorKey","axisAccessorKey","annotationsAccessorKey"],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.cjs","sources":["../../src/utils/context.ts"],"sourcesContent":["import { XYComponentCore, ComponentCore, Tooltip, Crosshair, Axis, Annotations } from '@unovis/ts'\nimport { InjectionKey, Ref } from 'vue'\n\nexport const componentAccessorKey = Symbol('componentAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: XYComponentCore<any> | ComponentCore<any>) => void;\n destroy: () => void;\n}>\n\nexport const tooltipAccessorKey = Symbol('tooltipAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: Tooltip) => void;\n destroy: () => void;\n}>\n\nexport const crosshairAccessorKey = Symbol('crosshairAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: Crosshair<any>) => void;\n destroy: () => void;\n}>\n\nexport const axisAccessorKey = Symbol('axisAccessorKey') as InjectionKey< {\n data: Ref<any>;\n update: (c: Axis<any>) => void;\n destroy: (c: string) => void;\n}>\n\nexport const annotationsAccessorKey = Symbol('annotationsAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: Annotations) => void;\n destroy: () => void;\n}>\n"],"names":["componentAccessorKey","tooltipAccessorKey","crosshairAccessorKey","axisAccessorKey","annotationsAccessorKey"],"mappings":"gFAGO,MAAMA,EAAuB,OAAO,sBAAsB,EAMpDC,EAAqB,OAAO,oBAAoB,EAMhDC,EAAuB,OAAO,sBAAsB,EAMpDC,EAAkB,OAAO,iBAAiB,EAM1CC,EAAyB,OAAO,wBAAwB"}
|
package/utils/context.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { XYComponentCore, ComponentCore, Tooltip, Crosshair, Axis, Annotations } from '@unovis/ts';
|
|
2
2
|
import { InjectionKey, Ref } from 'vue';
|
|
3
|
+
|
|
3
4
|
export declare const componentAccessorKey: InjectionKey<{
|
|
4
5
|
data: Ref<any>;
|
|
5
6
|
update: (c: XYComponentCore<any> | ComponentCore<any>) => void;
|
package/utils/context.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sources":["../../src/utils/context.ts"],"sourcesContent":["import { XYComponentCore, ComponentCore, Tooltip, Crosshair, Axis, Annotations } from '@unovis/ts'\nimport { InjectionKey, Ref } from 'vue'\n\nexport const componentAccessorKey = Symbol('componentAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: XYComponentCore<any> | ComponentCore<any>) => void;\n destroy: () => void;\n}>\n\nexport const tooltipAccessorKey = Symbol('tooltipAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: Tooltip) => void;\n destroy: () => void;\n}>\n\nexport const crosshairAccessorKey = Symbol('crosshairAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: Crosshair<any>) => void;\n destroy: () => void;\n}>\n\nexport const axisAccessorKey = Symbol('axisAccessorKey') as InjectionKey< {\n data: Ref<any>;\n update: (c: Axis<any>) => void;\n destroy: (c: string) => void;\n}>\n\nexport const annotationsAccessorKey = Symbol('annotationsAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: Annotations) => void;\n destroy: () => void;\n}>\n"],"names":["componentAccessorKey","tooltipAccessorKey","crosshairAccessorKey","axisAccessorKey","annotationsAccessorKey"],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.js","sources":["../../src/utils/context.ts"],"sourcesContent":["import { XYComponentCore, ComponentCore, Tooltip, Crosshair, Axis, Annotations } from '@unovis/ts'\nimport { InjectionKey, Ref } from 'vue'\n\nexport const componentAccessorKey = Symbol('componentAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: XYComponentCore<any> | ComponentCore<any>) => void;\n destroy: () => void;\n}>\n\nexport const tooltipAccessorKey = Symbol('tooltipAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: Tooltip) => void;\n destroy: () => void;\n}>\n\nexport const crosshairAccessorKey = Symbol('crosshairAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: Crosshair<any>) => void;\n destroy: () => void;\n}>\n\nexport const axisAccessorKey = Symbol('axisAccessorKey') as InjectionKey< {\n data: Ref<any>;\n update: (c: Axis<any>) => void;\n destroy: (c: string) => void;\n}>\n\nexport const annotationsAccessorKey = Symbol('annotationsAccessorKey') as InjectionKey<{\n data: Ref<any>;\n update: (c: Annotations) => void;\n destroy: () => void;\n}>\n"],"names":["componentAccessorKey","tooltipAccessorKey","crosshairAccessorKey","axisAccessorKey","annotationsAccessorKey"],"mappings":"AAGO,MAAMA,IAAuB,OAAO,sBAAsB,GAMpDC,IAAqB,OAAO,oBAAoB,GAMhDC,IAAuB,OAAO,sBAAsB,GAMpDC,IAAkB,OAAO,iBAAiB,GAM1CC,IAAyB,OAAO,wBAAwB;"}
|
package/utils/props.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.cjs","sources":["../../src/utils/props.ts"],"sourcesContent":["import { isEqual } from '@unovis/ts'\nimport { ComponentInternalInstance, camelize, computed, getCurrentInstance } from 'vue'\n\nexport function arePropsEqual<PropTypes> (prevProps: PropTypes, nextProps: PropTypes): boolean {\n return isEqual(prevProps, nextProps)\n}\n\n// source: https://www.radix-vue.com/utilities/use-forward-props.html\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport function useForwardProps<T extends Record<string, any>> (props: T) {\n const vm = getCurrentInstance()\n const attrs = vm.attrs\n\n return computed(() => {\n const preservedProps = {} as T\n const assignedProps = vm?.vnode.props ?? {}\n\n Object.keys(assignedProps).forEach((key) => {\n preservedProps[camelize(key) as keyof T] = props[camelize(key)]\n })\n return { ...preservedProps, ...attrs }\n })\n}\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport function parseProps <T extends object> (props: T, instance: ComponentInternalInstance | null) {\n const preservedProps = {} as T\n const assignedProps = instance?.vnode.props ?? {}\n\n Object.keys(assignedProps).forEach(key => {\n preservedProps[camelize(key)] = assignedProps[key]\n })\n return preservedProps\n}\n\n"],"names":["arePropsEqual","prevProps","nextProps","isEqual","useForwardProps","props","vm","getCurrentInstance","attrs","computed","preservedProps","assignedProps","key","camelize"],"mappings":"+
|
|
1
|
+
{"version":3,"file":"props.cjs","sources":["../../src/utils/props.ts"],"sourcesContent":["import { isEqual } from '@unovis/ts'\nimport { ComponentInternalInstance, camelize, computed, getCurrentInstance } from 'vue'\n\nexport function arePropsEqual<PropTypes> (prevProps: PropTypes, nextProps: PropTypes): boolean {\n return isEqual(prevProps, nextProps)\n}\n\n// source: https://www.radix-vue.com/utilities/use-forward-props.html\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport function useForwardProps<T extends Record<string, any>> (props: T) {\n const vm = getCurrentInstance()\n const attrs = vm.attrs\n\n return computed(() => {\n const preservedProps = {} as T\n const assignedProps = vm?.vnode.props ?? {}\n\n Object.keys(assignedProps).forEach((key) => {\n preservedProps[camelize(key) as keyof T] = props[camelize(key)]\n })\n return { ...preservedProps, ...attrs }\n })\n}\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport function parseProps <T extends object> (props: T, instance: ComponentInternalInstance | null) {\n const preservedProps = {} as T\n const assignedProps = instance?.vnode.props ?? {}\n\n Object.keys(assignedProps).forEach(key => {\n preservedProps[camelize(key)] = assignedProps[key]\n })\n return preservedProps\n}\n\n"],"names":["arePropsEqual","prevProps","nextProps","isEqual","useForwardProps","props","vm","getCurrentInstance","attrs","computed","preservedProps","assignedProps","key","camelize"],"mappings":"+HAGO,SAASA,EAA0BC,EAAsBC,EAA+B,CAC7F,OAAOC,EAAAA,QAAQF,EAAWC,CAAS,CACrC,CAIO,SAASE,EAAgDC,EAAU,CACxE,MAAMC,EAAKC,EAAAA,mBAAA,EACLC,EAAQF,EAAG,MAEjB,OAAOG,EAAAA,SAAS,IAAM,CACpB,MAAMC,EAAiB,CAAA,EACjBC,GAAgBL,GAAA,YAAAA,EAAI,MAAM,QAAS,CAAA,EAEzC,cAAO,KAAKK,CAAa,EAAE,QAASC,GAAQ,CAC1CF,EAAeG,EAAAA,SAASD,CAAG,CAAY,EAAIP,EAAMQ,EAAAA,SAASD,CAAG,CAAC,CAChE,CAAC,EACM,CAAE,GAAGF,EAAgB,GAAGF,CAAA,CACjC,CAAC,CACH"}
|
package/utils/props.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ComponentInternalInstance } from 'vue';
|
|
2
|
+
|
|
2
3
|
export declare function arePropsEqual<PropTypes>(prevProps: PropTypes, nextProps: PropTypes): boolean;
|
|
3
|
-
export declare function useForwardProps<T extends Record<string, any>>(props: T): import(
|
|
4
|
+
export declare function useForwardProps<T extends Record<string, any>>(props: T): import('vue').ComputedRef<T & {
|
|
4
5
|
[x: string]: unknown;
|
|
5
6
|
}>;
|
|
6
7
|
export declare function parseProps<T extends object>(props: T, instance: ComponentInternalInstance | null): T;
|
package/utils/props.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.js","sources":["../../src/utils/props.ts"],"sourcesContent":["import { isEqual } from '@unovis/ts'\nimport { ComponentInternalInstance, camelize, computed, getCurrentInstance } from 'vue'\n\nexport function arePropsEqual<PropTypes> (prevProps: PropTypes, nextProps: PropTypes): boolean {\n return isEqual(prevProps, nextProps)\n}\n\n// source: https://www.radix-vue.com/utilities/use-forward-props.html\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport function useForwardProps<T extends Record<string, any>> (props: T) {\n const vm = getCurrentInstance()\n const attrs = vm.attrs\n\n return computed(() => {\n const preservedProps = {} as T\n const assignedProps = vm?.vnode.props ?? {}\n\n Object.keys(assignedProps).forEach((key) => {\n preservedProps[camelize(key) as keyof T] = props[camelize(key)]\n })\n return { ...preservedProps, ...attrs }\n })\n}\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport function parseProps <T extends object> (props: T, instance: ComponentInternalInstance | null) {\n const preservedProps = {} as T\n const assignedProps = instance?.vnode.props ?? {}\n\n Object.keys(assignedProps).forEach(key => {\n preservedProps[camelize(key)] = assignedProps[key]\n })\n return preservedProps\n}\n\n"],"names":["arePropsEqual","prevProps","nextProps","isEqual","useForwardProps","props","vm","getCurrentInstance","attrs","computed","preservedProps","assignedProps","key","camelize"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"props.js","sources":["../../src/utils/props.ts"],"sourcesContent":["import { isEqual } from '@unovis/ts'\nimport { ComponentInternalInstance, camelize, computed, getCurrentInstance } from 'vue'\n\nexport function arePropsEqual<PropTypes> (prevProps: PropTypes, nextProps: PropTypes): boolean {\n return isEqual(prevProps, nextProps)\n}\n\n// source: https://www.radix-vue.com/utilities/use-forward-props.html\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport function useForwardProps<T extends Record<string, any>> (props: T) {\n const vm = getCurrentInstance()\n const attrs = vm.attrs\n\n return computed(() => {\n const preservedProps = {} as T\n const assignedProps = vm?.vnode.props ?? {}\n\n Object.keys(assignedProps).forEach((key) => {\n preservedProps[camelize(key) as keyof T] = props[camelize(key)]\n })\n return { ...preservedProps, ...attrs }\n })\n}\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport function parseProps <T extends object> (props: T, instance: ComponentInternalInstance | null) {\n const preservedProps = {} as T\n const assignedProps = instance?.vnode.props ?? {}\n\n Object.keys(assignedProps).forEach(key => {\n preservedProps[camelize(key)] = assignedProps[key]\n })\n return preservedProps\n}\n\n"],"names":["arePropsEqual","prevProps","nextProps","isEqual","useForwardProps","props","vm","getCurrentInstance","attrs","computed","preservedProps","assignedProps","key","camelize"],"mappings":";;AAGO,SAASA,EAA0BC,GAAsBC,GAA+B;AAC7F,SAAOC,EAAQF,GAAWC,CAAS;AACrC;AAIO,SAASE,EAAgDC,GAAU;AACxE,QAAMC,IAAKC,EAAA,GACLC,IAAQF,EAAG;AAEjB,SAAOG,EAAS,MAAM;AACpB,UAAMC,IAAiB,CAAA,GACjBC,KAAgBL,KAAA,gBAAAA,EAAI,MAAM,UAAS,CAAA;AAEzC,kBAAO,KAAKK,CAAa,EAAE,QAAQ,CAACC,MAAQ;AAC1C,MAAAF,EAAeG,EAASD,CAAG,CAAY,IAAIP,EAAMQ,EAASD,CAAG,CAAC;AAAA,IAChE,CAAC,GACM,EAAE,GAAGF,GAAgB,GAAGF,EAAA;AAAA,EACjC,CAAC;AACH;"}
|