@milaboratories/uikit 2.3.22 → 2.3.24
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/.turbo/turbo-build.log +31 -66
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +12 -0
- package/dist/components/DataTable/TableComponent.vue.js +2 -4
- package/dist/components/DataTable/TableComponent.vue.js.map +1 -1
- package/dist/components/PlChartHistogram/createGridlines.d.ts +4 -2
- package/dist/components/PlChartHistogram/createGridlines.d.ts.map +1 -1
- package/dist/components/PlChartHistogram/createGridlines.js +4 -6
- package/dist/components/PlChartHistogram/createGridlines.js.map +1 -1
- package/dist/components/PlChartHistogram/createLabels.d.ts +2 -2
- package/dist/components/PlChartHistogram/createLabels.d.ts.map +1 -1
- package/dist/components/PlChartHistogram/createLabels.js.map +1 -1
- package/dist/components/PlChartHistogram/createSvgContainer.d.ts +1 -2
- package/dist/components/PlChartHistogram/createSvgContainer.d.ts.map +1 -1
- package/dist/components/PlChartHistogram/createSvgContainer.js +5 -7
- package/dist/components/PlChartHistogram/createSvgContainer.js.map +1 -1
- package/dist/components/PlChartHistogram/drawBins.d.ts.map +1 -1
- package/dist/components/PlChartHistogram/drawBins.js +4 -6
- package/dist/components/PlChartHistogram/drawBins.js.map +1 -1
- package/dist/components/PlChartHistogram/histogram.d.ts.map +1 -1
- package/dist/components/PlChartHistogram/histogram.js +18 -20
- package/dist/components/PlChartHistogram/histogram.js.map +1 -1
- package/dist/components/PlChartHistogram/normalizeBins.d.ts +2 -1
- package/dist/components/PlChartHistogram/normalizeBins.d.ts.map +1 -1
- package/dist/components/PlChartHistogram/normalizeBins.js.map +1 -1
- package/dist/components/PlChartHistogram/types.d.ts +5 -3
- package/dist/components/PlChartHistogram/types.d.ts.map +1 -1
- package/dist/components/PlSlideModal/PlPureSlideModal.vue.js +9 -11
- package/dist/components/PlSlideModal/PlPureSlideModal.vue.js.map +1 -1
- package/dist/lib/model/common/dist/index.js.map +1 -1
- package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/rgb.js +8 -8
- package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/rgb.js.map +1 -1
- package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/string.js +7 -7
- package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/string.js.map +1 -1
- package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/value.js +6 -6
- package/dist/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/index.js +23 -27
- package/dist/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/index.js.map +1 -1
- package/dist/sdk/model/dist/index.js +1 -1
- package/package.json +13 -7
- package/src/components/PlChartHistogram/createGridlines.ts +10 -6
- package/src/components/PlChartHistogram/createLabels.ts +2 -2
- package/src/components/PlChartHistogram/createSvgContainer.ts +2 -3
- package/src/components/PlChartHistogram/drawBins.ts +2 -3
- package/src/components/PlChartHistogram/histogram.ts +25 -22
- package/src/components/PlChartHistogram/normalizeBins.ts +2 -1
- package/src/components/PlChartHistogram/types.ts +6 -3
- package/dist/node_modules/.pnpm/d3-dispatch@3.0.1/node_modules/d3-dispatch/src/dispatch.js +0 -65
- package/dist/node_modules/.pnpm/d3-dispatch@3.0.1/node_modules/d3-dispatch/src/dispatch.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-ease@3.0.1/node_modules/d3-ease/src/cubic.js +0 -7
- package/dist/node_modules/.pnpm/d3-ease@3.0.1/node_modules/d3-ease/src/cubic.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/decompose.js +0 -24
- package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/decompose.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/index.js +0 -38
- package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/index.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/parse.js +0 -14
- package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/parse.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timeout.js +0 -11
- package/dist/node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timeout.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timer.js +0 -63
- package/dist/node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timer.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/interrupt.js +0 -19
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/interrupt.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.js +0 -6
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/interrupt.js +0 -10
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/interrupt.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/transition.js +0 -29
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/transition.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/attr.js +0 -50
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/attr.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/attrTween.js +0 -39
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/attrTween.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/delay.js +0 -19
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/delay.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/duration.js +0 -19
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/duration.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/ease.js +0 -15
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/ease.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/easeVarying.js +0 -16
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/easeVarying.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/end.js +0 -17
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/end.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/filter.js +0 -13
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/filter.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/index.js +0 -66
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/index.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/interpolate.js +0 -12
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/interpolate.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/merge.js +0 -14
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/merge.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/on.js +0 -22
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/on.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/remove.js +0 -14
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/remove.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/schedule.js +0 -86
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/schedule.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/select.js +0 -15
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/select.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/selectAll.js +0 -19
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/selectAll.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/selection.js +0 -9
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/selection.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/style.js +0 -46
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/style.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/styleTween.js +0 -24
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/styleTween.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/text.js +0 -19
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/text.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/textTween.js +0 -24
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/textTween.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/transition.js +0 -20
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/transition.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/tween.js +0 -57
- package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/tween.js.map +0 -1
- package/dist/node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.js +0 -44
- package/dist/node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
WARN Issue while reading "/home/runner/_work/platforma/platforma/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
|
|
2
2
|
|
|
3
|
-
> @milaboratories/uikit@2.3.
|
|
3
|
+
> @milaboratories/uikit@2.3.24 type-check /home/runner/_work/platforma/platforma/lib/ui/uikit
|
|
4
4
|
> vue-tsc --project ./tsconfig.lib.json
|
|
5
5
|
|
package/CHANGELOG.md
CHANGED
|
@@ -102,14 +102,12 @@ import "../../sdk/model/dist/index.js";
|
|
|
102
102
|
|
|
103
103
|
|
|
104
104
|
|
|
105
|
-
import "../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.js";
|
|
106
|
-
import "../../node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.js";
|
|
107
105
|
import "../../colors/color.js";
|
|
108
106
|
import "../../colors/gradient.js";
|
|
109
107
|
const X = { class: "command-menu__container" }, Y = {
|
|
110
108
|
key: 0,
|
|
111
109
|
class: "table-body__no-data"
|
|
112
|
-
}, Z = { class: "carets" },
|
|
110
|
+
}, Z = { class: "carets" }, lo = /* @__PURE__ */ H({
|
|
113
111
|
__name: "TableComponent",
|
|
114
112
|
props: {
|
|
115
113
|
settings: {}
|
|
@@ -206,6 +204,6 @@ const X = { class: "command-menu__container" }, Y = {
|
|
|
206
204
|
}
|
|
207
205
|
});
|
|
208
206
|
export {
|
|
209
|
-
|
|
207
|
+
lo as default
|
|
210
208
|
};
|
|
211
209
|
//# sourceMappingURL=TableComponent.vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableComponent.vue.js","sources":["../../../src/components/DataTable/TableComponent.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport './assets/data-table-style.scss';\nimport { ref, unref, onMounted, nextTick, watchPostEffect, watch, computed } from 'vue';\nimport TdCell from './TdCell.vue';\nimport type { TableSettings, TableData } from './types';\nimport TableIcon from './assets/TableIcon.vue';\nimport TrHead from './TrHead.vue';\nimport ThCell from './ThCell.vue';\nimport TrBody from './TrBody.vue';\nimport ColumnCaret from './ColumnCaret.vue';\nimport { useEventListener } from '../../index';\nimport { tapIf } from '@milaboratories/helpers';\nimport { useResize } from './composition/useResize';\nimport RowsCommandMenu from './RowsCommandMenu.vue';\nimport ColumnsCommandMenu from './ColumnsCommandMenu.vue';\nimport TScroll from './TScroll.vue';\nimport { createState } from './state';\n\nconst emit = defineEmits<{\n (e: 'update:data', value: TableData): void;\n (e: 'change:sort', value: unknown): void;\n}>();\n\nconst props = defineProps<{\n settings: Readonly<TableSettings>;\n}>();\n\nconst state = createState(props);\n\nconst hasNoData = computed(() => state.data.rows.length === 0);\n\nconst tableBodyStyle = computed(() => ({\n height: hasNoData.value ? '212px' /* css value */ : state.data.bodyHeight + 'px',\n}));\n\nwatch(state.data, (v) => emit('update:data', v), { deep: true });\n\nwatch(props, () => updateDimensions);\n\nconst tableRef = ref<HTMLElement>();\nconst headRef = ref<HTMLElement>();\nconst bodyRef = ref<HTMLElement>();\n\nconst updateDimensions = () => {\n tapIf(bodyRef.value, (el) => {\n state.updateDimensions(el.getBoundingClientRect());\n });\n};\n\nconst tableColumns = state.tableColumns;\n\nconst tableRows = state.tableRows;\n\nconst { mouseDown } = useResize(state, tableRef);\n\nonMounted(() => {\n nextTick(updateDimensions);\n});\n\nwatchPostEffect(() => {\n unref(props.settings);\n nextTick(updateDimensions);\n});\n\nuseEventListener(window, 'resize', () => nextTick(updateDimensions));\n\nconst onWheel = (ev: WheelEvent) => {\n ev.preventDefault();\n state.updateOffsets(ev);\n};\n</script>\n\n<template>\n <div ref=\"tableRef\" class=\"data-table\" @mousedown=\"mouseDown\">\n <div class=\"command-menu__container\">\n <RowsCommandMenu />\n <ColumnsCommandMenu />\n </div>\n <div ref=\"headRef\" class=\"table-head\">\n <TrHead>\n <ThCell v-for=\"(col, i) in tableColumns\" :key=\"i\" :col=\"col\" :style=\"col.style\" @change:sort=\"$emit('change:sort', $event)\" />\n </TrHead>\n </div>\n <div ref=\"bodyRef\" class=\"table-body\" :style=\"tableBodyStyle\" @wheel=\"onWheel\">\n <div v-if=\"hasNoData\" class=\"table-body__no-data\">\n <div>\n <TableIcon />\n <div>No Data To Show</div>\n </div>\n </div>\n <TrBody v-for=\"(row, i) in tableRows\" :key=\"i\" :row=\"row\">\n <TdCell v-for=\"cell in row.cells\" :key=\"cell.column.id + ':' + i\" :cell=\"cell\" :style=\"cell.style\" />\n </TrBody>\n </div>\n <div class=\"carets\">\n <ColumnCaret v-for=\"(col, i) in tableColumns\" :key=\"i\" :column=\"col\" :style=\"col.style\" @change:sort=\"$emit('change:sort', $event)\" />\n </div>\n <TScroll\n :offset=\"state.data.scrollTop\"\n :window-size=\"state.data.bodyHeight\"\n :data-size=\"state.data.dataHeight\"\n @change:offset=\"state.updateScrollTop\"\n />\n </div>\n</template>\n"],"names":["emit","__emit","props","__props","state","createState","hasNoData","computed","tableBodyStyle","watch","v","updateDimensions","tableRef","ref","headRef","bodyRef","tapIf","el","tableColumns","tableRows","mouseDown","useResize","onMounted","nextTick","watchPostEffect","unref","useEventListener","onWheel","ev"],"mappings":"
|
|
1
|
+
{"version":3,"file":"TableComponent.vue.js","sources":["../../../src/components/DataTable/TableComponent.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport './assets/data-table-style.scss';\nimport { ref, unref, onMounted, nextTick, watchPostEffect, watch, computed } from 'vue';\nimport TdCell from './TdCell.vue';\nimport type { TableSettings, TableData } from './types';\nimport TableIcon from './assets/TableIcon.vue';\nimport TrHead from './TrHead.vue';\nimport ThCell from './ThCell.vue';\nimport TrBody from './TrBody.vue';\nimport ColumnCaret from './ColumnCaret.vue';\nimport { useEventListener } from '../../index';\nimport { tapIf } from '@milaboratories/helpers';\nimport { useResize } from './composition/useResize';\nimport RowsCommandMenu from './RowsCommandMenu.vue';\nimport ColumnsCommandMenu from './ColumnsCommandMenu.vue';\nimport TScroll from './TScroll.vue';\nimport { createState } from './state';\n\nconst emit = defineEmits<{\n (e: 'update:data', value: TableData): void;\n (e: 'change:sort', value: unknown): void;\n}>();\n\nconst props = defineProps<{\n settings: Readonly<TableSettings>;\n}>();\n\nconst state = createState(props);\n\nconst hasNoData = computed(() => state.data.rows.length === 0);\n\nconst tableBodyStyle = computed(() => ({\n height: hasNoData.value ? '212px' /* css value */ : state.data.bodyHeight + 'px',\n}));\n\nwatch(state.data, (v) => emit('update:data', v), { deep: true });\n\nwatch(props, () => updateDimensions);\n\nconst tableRef = ref<HTMLElement>();\nconst headRef = ref<HTMLElement>();\nconst bodyRef = ref<HTMLElement>();\n\nconst updateDimensions = () => {\n tapIf(bodyRef.value, (el) => {\n state.updateDimensions(el.getBoundingClientRect());\n });\n};\n\nconst tableColumns = state.tableColumns;\n\nconst tableRows = state.tableRows;\n\nconst { mouseDown } = useResize(state, tableRef);\n\nonMounted(() => {\n nextTick(updateDimensions);\n});\n\nwatchPostEffect(() => {\n unref(props.settings);\n nextTick(updateDimensions);\n});\n\nuseEventListener(window, 'resize', () => nextTick(updateDimensions));\n\nconst onWheel = (ev: WheelEvent) => {\n ev.preventDefault();\n state.updateOffsets(ev);\n};\n</script>\n\n<template>\n <div ref=\"tableRef\" class=\"data-table\" @mousedown=\"mouseDown\">\n <div class=\"command-menu__container\">\n <RowsCommandMenu />\n <ColumnsCommandMenu />\n </div>\n <div ref=\"headRef\" class=\"table-head\">\n <TrHead>\n <ThCell v-for=\"(col, i) in tableColumns\" :key=\"i\" :col=\"col\" :style=\"col.style\" @change:sort=\"$emit('change:sort', $event)\" />\n </TrHead>\n </div>\n <div ref=\"bodyRef\" class=\"table-body\" :style=\"tableBodyStyle\" @wheel=\"onWheel\">\n <div v-if=\"hasNoData\" class=\"table-body__no-data\">\n <div>\n <TableIcon />\n <div>No Data To Show</div>\n </div>\n </div>\n <TrBody v-for=\"(row, i) in tableRows\" :key=\"i\" :row=\"row\">\n <TdCell v-for=\"cell in row.cells\" :key=\"cell.column.id + ':' + i\" :cell=\"cell\" :style=\"cell.style\" />\n </TrBody>\n </div>\n <div class=\"carets\">\n <ColumnCaret v-for=\"(col, i) in tableColumns\" :key=\"i\" :column=\"col\" :style=\"col.style\" @change:sort=\"$emit('change:sort', $event)\" />\n </div>\n <TScroll\n :offset=\"state.data.scrollTop\"\n :window-size=\"state.data.bodyHeight\"\n :data-size=\"state.data.dataHeight\"\n @change:offset=\"state.updateScrollTop\"\n />\n </div>\n</template>\n"],"names":["emit","__emit","props","__props","state","createState","hasNoData","computed","tableBodyStyle","watch","v","updateDimensions","tableRef","ref","headRef","bodyRef","tapIf","el","tableColumns","tableRows","mouseDown","useResize","onMounted","nextTick","watchPostEffect","unref","useEventListener","onWheel","ev"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,UAAMA,IAAOC,GAKPC,IAAQC,GAIRC,IAAQC,EAAYH,CAAK,GAEzBI,IAAYC,EAAS,MAAMH,EAAM,KAAK,KAAK,WAAW,CAAC,GAEvDI,IAAiBD,EAAS,OAAO;AAAA,MACrC,QAAQD,EAAU,QAAQ,UAA0BF,EAAM,KAAK,aAAa;AAAA,IAAA,EAC5E;AAEI,IAAAK,EAAAL,EAAM,MAAM,CAACM,MAAMV,EAAK,eAAeU,CAAC,GAAG,EAAE,MAAM,GAAA,CAAM,GAEzDD,EAAAP,GAAO,MAAMS,CAAgB;AAEnC,UAAMC,IAAWC,EAAiB,GAC5BC,IAAUD,EAAiB,GAC3BE,IAAUF,EAAiB,GAE3BF,IAAmB,MAAM;AACvBK,MAAAA,EAAAD,EAAQ,OAAO,CAACE,MAAO;AACrB,QAAAb,EAAA,iBAAiBa,EAAG,uBAAuB;AAAA,MAAA,CAClD;AAAA,IACH,GAEMC,IAAed,EAAM,cAErBe,IAAYf,EAAM,WAElB,EAAE,WAAAgB,EAAc,IAAAC,EAAUjB,GAAOQ,CAAQ;AAE/C,IAAAU,EAAU,MAAM;AACd,MAAAC,EAASZ,CAAgB;AAAA,IAAA,CAC1B,GAEDa,EAAgB,MAAM;AACpB,MAAAC,EAAMvB,EAAM,QAAQ,GACpBqB,EAASZ,CAAgB;AAAA,IAAA,CAC1B,GAEDe,EAAiB,QAAQ,UAAU,MAAMH,EAASZ,CAAgB,CAAC;AAE7D,UAAAgB,IAAU,CAACC,MAAmB;AAClC,MAAAA,EAAG,eAAe,GAClBxB,EAAM,cAAcwB,CAAE;AAAA,IACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { ChartOptions, Scales } from './types';
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import { Selection } from 'd3-selection';
|
|
3
|
+
import { Axis } from 'd3-axis';
|
|
4
|
+
import { NumberValue } from 'd3-scale';
|
|
5
|
+
export declare function createGridlines(svg: Selection<SVGGElement, unknown, null, undefined>, options: ChartOptions, scales: Scales, xTicks: (d: Axis<NumberValue>) => Axis<NumberValue>): void;
|
|
4
6
|
//# sourceMappingURL=createGridlines.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createGridlines.d.ts","sourceRoot":"","sources":["../../../src/components/PlChartHistogram/createGridlines.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"createGridlines.d.ts","sourceRoot":"","sources":["../../../src/components/PlChartHistogram/createGridlines.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAI5C,wBAAgB,eAAe,CAC7B,GAAG,EAAE,SAAS,CAAC,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,CAAC,EACrD,OAAO,EAAE,YAAY,EACrB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC,WAAW,CAAC,QAkCpD"}
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import "../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.js";
|
|
2
|
-
import "../../node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.js";
|
|
3
1
|
import l from "../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selectAll.js";
|
|
4
|
-
import { axisLeft as c, axisBottom as
|
|
5
|
-
function
|
|
2
|
+
import { axisLeft as c, axisBottom as f } from "../../node_modules/.pnpm/d3-axis@3.0.0/node_modules/d3-axis/src/axis.js";
|
|
3
|
+
function d(t, a, i, e) {
|
|
6
4
|
const { width: n, height: r } = a;
|
|
7
5
|
function o() {
|
|
8
6
|
return c(i.y).ticks(6);
|
|
9
7
|
}
|
|
10
8
|
function s() {
|
|
11
|
-
return e(
|
|
9
|
+
return e(f(i.x));
|
|
12
10
|
}
|
|
13
11
|
t.append("g").attr("class", "grid").attr("font-family", "'Manrope', sans-serif").call(o().tickSize(-n).tickFormat(() => "")), t.append("g").attr("class", "grid").attr("font-family", "'Manrope', sans-serif").attr("transform", `translate(0,${r})`).call(s().tickSize(-r).tickFormat(() => "")), l(".grid line").style("stroke", "#E1E3EB").style("opacity", 0.7);
|
|
14
12
|
}
|
|
15
13
|
export {
|
|
16
|
-
|
|
14
|
+
d as createGridlines
|
|
17
15
|
};
|
|
18
16
|
//# sourceMappingURL=createGridlines.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createGridlines.js","sources":["../../../src/components/PlChartHistogram/createGridlines.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"createGridlines.js","sources":["../../../src/components/PlChartHistogram/createGridlines.ts"],"sourcesContent":["import type { ChartOptions, Scales } from './types';\nimport type { Selection } from 'd3-selection';\nimport type { Axis } from 'd3-axis';\nimport type { NumberValue } from 'd3-scale';\nimport { selectAll } from 'd3-selection';\nimport { axisBottom, axisLeft } from 'd3-axis';\n\nexport function createGridlines(\n svg: Selection<SVGGElement, unknown, null, undefined>,\n options: ChartOptions,\n scales: Scales,\n xTicks: (d: Axis<NumberValue>) => Axis<NumberValue>,\n) {\n const { width, height } = options;\n\n function makeYGridlines() {\n return axisLeft(scales.y) // Use the y-scale for horizontal gridlines\n .ticks(6); // Adjust the number of gridlines\n }\n\n function makeXGridlines() {\n return xTicks(axisBottom(scales.x));\n }\n // Append horizontal gridlines\n svg.append('g')\n .attr('class', 'grid') // Add a class for styling\n .attr('font-family', '\\'Manrope\\', sans-serif') // Doesn't work\n .call(makeYGridlines()\n .tickSize(-width) // Extend gridlines across the chart width\n .tickFormat(() => '')); // Remove tick labels\n\n // Append vertical gridlines\n svg.append('g')\n .attr('class', 'grid') // Add a class for styling\n .attr('font-family', '\\'Manrope\\', sans-serif')\n .attr('transform', `translate(0,${height})`) // Position at the bottom of the chart\n .call(makeXGridlines()\n .tickSize(-height) // Extend gridlines across the chart height\n .tickFormat(() => '')); // Remove tick labels\n\n // Style the gridlines using CSS (or inline styles)\n selectAll('.grid line')\n .style('stroke', '#E1E3EB') // Light gray gridlines\n // .style('stroke-dasharray', '2,2') // Dashed gridlines\n .style('opacity', 0.7); // Slightly transparent\n}\n"],"names":["createGridlines","svg","options","scales","xTicks","width","height","makeYGridlines","axisLeft","makeXGridlines","axisBottom","selectAll"],"mappings":";;AAOO,SAASA,EACdC,GACAC,GACAC,GACAC,GACA;AACM,QAAA,EAAE,OAAAC,GAAO,QAAAC,EAAA,IAAWJ;AAE1B,WAASK,IAAiB;AACxB,WAAOC,EAASL,EAAO,CAAC,EACrB,MAAM,CAAC;AAAA,EAAA;AAGZ,WAASM,IAAiB;AACxB,WAAOL,EAAOM,EAAWP,EAAO,CAAC,CAAC;AAAA,EAAA;AAGhC,EAAAF,EAAA,OAAO,GAAG,EACX,KAAK,SAAS,MAAM,EACpB,KAAK,eAAe,uBAAyB,EAC7C,KAAKM,EAAA,EACH,SAAS,CAACF,CAAK,EACf,WAAW,MAAM,EAAE,CAAC,GAGrBJ,EAAA,OAAO,GAAG,EACX,KAAK,SAAS,MAAM,EACpB,KAAK,eAAe,uBAAyB,EAC7C,KAAK,aAAa,eAAeK,CAAM,GAAG,EAC1C,KAAKG,EAAA,EACH,SAAS,CAACH,CAAM,EAChB,WAAW,MAAM,EAAE,CAAC,GAGfK,EAAA,YAAY,EACnB,MAAM,UAAU,SAAS,EAEzB,MAAM,WAAW,GAAG;AACzB;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
+
import { Selection } from 'd3-selection';
|
|
1
2
|
import { ChartOptions } from './types';
|
|
2
|
-
|
|
3
|
-
export declare function createLabels(svg: d3.Selection<SVGGElement, unknown, null, undefined>, options: ChartOptions): void;
|
|
3
|
+
export declare function createLabels(svg: Selection<SVGGElement, unknown, null, undefined>, options: ChartOptions): void;
|
|
4
4
|
//# sourceMappingURL=createLabels.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createLabels.d.ts","sourceRoot":"","sources":["../../../src/components/PlChartHistogram/createLabels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"createLabels.d.ts","sourceRoot":"","sources":["../../../src/components/PlChartHistogram/createLabels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,wBAAgB,YAAY,CAC1B,GAAG,EAAE,SAAS,CAAC,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,CAAC,EACrD,OAAO,EAAE,YAAY,QA0BtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createLabels.js","sources":["../../../src/components/PlChartHistogram/createLabels.ts"],"sourcesContent":["import type
|
|
1
|
+
{"version":3,"file":"createLabels.js","sources":["../../../src/components/PlChartHistogram/createLabels.ts"],"sourcesContent":["import type { Selection } from 'd3-selection';\nimport type { ChartOptions } from './types';\n\nexport function createLabels(\n svg: Selection<SVGGElement, unknown, null, undefined>,\n options: ChartOptions,\n) {\n const { height, width, margin, xAxisLabel, yAxisLabel, compact } = options;\n\n if (compact) {\n return;\n }\n\n // X-axis label\n svg.append('text')\n .attr('class', 'x-axis-label')\n .attr('font-weight', 500)\n .attr('text-anchor', 'middle') // Center the text\n .attr('x', width / 2) // Center horizontally\n .attr('y', height + margin.bottom - 5) // Position below the X-axis\n .text(xAxisLabel ?? 'Value Range'); // Set your custom label text\n\n // Y-axis label\n svg.append('text')\n .attr('class', 'y-axis-label')\n .attr('font-weight', 500)\n .attr('text-anchor', 'middle') // Center the text\n .attr('x', -height / 2) // Center vertically (rotated axis)\n .attr('y', -margin.left + 15) // Position to the left of the Y-axis\n .attr('transform', 'rotate(-90)') // Rotate text 90 degrees counter-clockwise\n .text(yAxisLabel ?? 'Frequency'); // Set your custom label text\n}\n"],"names":["createLabels","svg","options","height","width","margin","xAxisLabel","yAxisLabel","compact"],"mappings":"AAGgB,SAAAA,EACdC,GACAC,GACA;AACA,QAAM,EAAE,QAAAC,GAAQ,OAAAC,GAAO,QAAAC,GAAQ,YAAAC,GAAY,YAAAC,GAAY,SAAAC,MAAYN;AAEnE,EAAIM,MAKJP,EAAI,OAAO,MAAM,EACd,KAAK,SAAS,cAAc,EAC5B,KAAK,eAAe,GAAG,EACvB,KAAK,eAAe,QAAQ,EAC5B,KAAK,KAAKG,IAAQ,CAAC,EACnB,KAAK,KAAKD,IAASE,EAAO,SAAS,CAAC,EACpC,KAAKC,KAAc,aAAa,GAGnCL,EAAI,OAAO,MAAM,EACd,KAAK,SAAS,cAAc,EAC5B,KAAK,eAAe,GAAG,EACvB,KAAK,eAAe,QAAQ,EAC5B,KAAK,KAAK,CAACE,IAAS,CAAC,EACrB,KAAK,KAAK,CAACE,EAAO,OAAO,EAAE,EAC3B,KAAK,aAAa,aAAa,EAC/B,KAAKE,KAAc,WAAW;AACnC;"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { ChartOptions } from './types';
|
|
2
|
-
|
|
3
|
-
export declare function createSvgContainer(el: HTMLElement, options: ChartOptions): d3.Selection<SVGGElement, unknown, null, undefined>;
|
|
2
|
+
export declare function createSvgContainer(el: HTMLElement, options: ChartOptions): import('d3-selection').Selection<SVGGElement, unknown, null, undefined>;
|
|
4
3
|
//# sourceMappingURL=createSvgContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSvgContainer.d.ts","sourceRoot":"","sources":["../../../src/components/PlChartHistogram/createSvgContainer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"createSvgContainer.d.ts","sourceRoot":"","sources":["../../../src/components/PlChartHistogram/createSvgContainer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG5C,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY,2EAkBxE"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import "../../node_modules/.pnpm/d3-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const { width: o, height: r, margin: t, compact: n } = i;
|
|
6
|
-
return e.replaceChildren(), n && (e.style.height = r + "px", e.style.lineHeight = r + "px"), p(e).append("svg").attr("width", o + t.left + t.right).attr("height", r + t.top + t.bottom).append("g").attr("transform", `translate(${t.left},${t.top})`);
|
|
1
|
+
import o from "../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/select.js";
|
|
2
|
+
function h(e, i) {
|
|
3
|
+
const { width: n, height: r, margin: t, compact: a } = i;
|
|
4
|
+
return e.replaceChildren(), a && (e.style.height = r + "px", e.style.lineHeight = r + "px"), o(e).append("svg").attr("width", n + t.left + t.right).attr("height", r + t.top + t.bottom).append("g").attr("transform", `translate(${t.left},${t.top})`);
|
|
7
5
|
}
|
|
8
6
|
export {
|
|
9
|
-
|
|
7
|
+
h as createSvgContainer
|
|
10
8
|
};
|
|
11
9
|
//# sourceMappingURL=createSvgContainer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSvgContainer.js","sources":["../../../src/components/PlChartHistogram/createSvgContainer.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"createSvgContainer.js","sources":["../../../src/components/PlChartHistogram/createSvgContainer.ts"],"sourcesContent":["import type { ChartOptions } from './types';\nimport { select } from 'd3-selection';\n\nexport function createSvgContainer(el: HTMLElement, options: ChartOptions) {\n const { width, height, margin, compact } = options;\n\n el.replaceChildren();\n\n if (compact) {\n el.style.height = height + 'px';\n el.style.lineHeight = height + 'px';\n }\n\n const svg = select(el) // Append the SVG element to the body\n .append('svg')\n .attr('width', width + margin.left + margin.right) // Set the total width\n .attr('height', height + margin.top + margin.bottom) // Set the total height\n .append('g') // Append a group to handle margins\n .attr('transform', `translate(${margin.left},${margin.top})`);\n\n return svg;\n}\n"],"names":["createSvgContainer","el","options","width","height","margin","compact","select"],"mappings":";AAGgB,SAAAA,EAAmBC,GAAiBC,GAAuB;AACzE,QAAM,EAAE,OAAAC,GAAO,QAAAC,GAAQ,QAAAC,GAAQ,SAAAC,EAAY,IAAAJ;AAE3C,SAAAD,EAAG,gBAAgB,GAEfK,MACCL,EAAA,MAAM,SAASG,IAAS,MACxBH,EAAA,MAAM,aAAaG,IAAS,OAGrBG,EAAON,CAAE,EAClB,OAAO,KAAK,EACZ,KAAK,SAASE,IAAQE,EAAO,OAAOA,EAAO,KAAK,EAChD,KAAK,UAAUD,IAASC,EAAO,MAAMA,EAAO,MAAM,EAClD,OAAO,GAAG,EACV,KAAK,aAAa,aAAaA,EAAO,IAAI,IAAIA,EAAO,GAAG,GAAG;AAGhE;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawBins.d.ts","sourceRoot":"","sources":["../../../src/components/PlChartHistogram/drawBins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAGlE,wBAAgB,QAAQ,CACtB,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,OAAO,EAAE,EACf,SAAS,EAAE,YAAY,EACvB,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"drawBins.d.ts","sourceRoot":"","sources":["../../../src/components/PlChartHistogram/drawBins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAGlE,wBAAgB,QAAQ,CACtB,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,OAAO,EAAE,EACf,SAAS,EAAE,YAAY,EACvB,MAAM,EAAE,MAAM,QA8Cf"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import "../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.js";
|
|
2
|
-
import "../../node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.js";
|
|
3
1
|
import y from "../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/select.js";
|
|
4
|
-
function
|
|
5
|
-
const { height:
|
|
2
|
+
function f(n, l, r, a) {
|
|
3
|
+
const { height: c } = r, { x: e, y: s } = a, o = y("body").append("div").attr("class", "svg-tooltip").style("position", "absolute").style("visibility", "hidden"), p = function(t, i) {
|
|
6
4
|
o.style("visibility", "visible").text(`count: ${i.length}
|
|
7
5
|
x0: ${i.x0}
|
|
8
6
|
x1: ${i.x1}`);
|
|
@@ -11,11 +9,11 @@ x1: ${i.x1}`);
|
|
|
11
9
|
}, u = function() {
|
|
12
10
|
o.style("visibility", "hidden");
|
|
13
11
|
};
|
|
14
|
-
n.selectAll("rect").data(l).enter().append("rect").attr("x", (t) => e(t.x0)).attr("y", (t) => s(t.length)).attr("width", (t) => e(t.x1) - e(t.x0)).attr("height", (t) =>
|
|
12
|
+
n.selectAll("rect").data(l).enter().append("rect").attr("x", (t) => e(t.x0)).attr("y", (t) => s(t.length)).attr("width", (t) => e(t.x1) - e(t.x0)).attr("height", (t) => c - s(t.length)).style("fill", "#929BAD").attr("stroke", "#fff").attr("stroke-opacity", 0.2).attr("stroke-width", 0.5).on("mouseover", p).on("mousemove", x).on("mouseout", u).append("title").text((t) => `[${t.x0}, ${t.x1}]
|
|
15
13
|
` + t.length + `
|
|
16
14
|
`);
|
|
17
15
|
}
|
|
18
16
|
export {
|
|
19
|
-
|
|
17
|
+
f as drawBins
|
|
20
18
|
};
|
|
21
19
|
//# sourceMappingURL=drawBins.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawBins.js","sources":["../../../src/components/PlChartHistogram/drawBins.ts"],"sourcesContent":["import type { BinLike, ChartOptions, Scales, SVG } from './types';\nimport
|
|
1
|
+
{"version":3,"file":"drawBins.js","sources":["../../../src/components/PlChartHistogram/drawBins.ts"],"sourcesContent":["import type { BinLike, ChartOptions, Scales, SVG } from './types';\nimport { select } from 'd3-selection';\n\nexport function drawBins(\n svg: SVG,\n bins: BinLike[],\n dimension: ChartOptions,\n scales: Scales,\n) {\n const { height } = dimension;\n\n const { x, y } = scales;\n\n const tooltip = select('body')\n .append('div')\n .attr('class', 'svg-tooltip')\n .style('position', 'absolute')\n .style('visibility', 'hidden');\n\n // Three function that change the tooltip when user hover / move / leave a cell\n const mouseover = function (_event: MouseEvent, d: BinLike) {\n tooltip\n .style('visibility', 'visible')\n .text(`count: ${d.length}\\nx0: ${d.x0}\\nx1: ${d.x1}`);\n };\n\n const mousemove = function (event: MouseEvent) {\n tooltip\n .style('top', event.pageY - 10 + 'px')\n .style('left', event.pageX + 10 + 'px');\n };\n\n const mouseout = function () {\n tooltip.style('visibility', 'hidden');\n };\n\n // Add rectangles for the histogram bars\n svg.selectAll('rect')\n .data(bins)\n .enter()\n .append('rect')\n .attr('x', (d) => x(d.x0!)) // Position the bar based on the bin start\n .attr('y', (d) => y(d.length)) // Height based on bin count\n .attr('width', (d) => x(d.x1!) - x(d.x0!)) // Bar width based on logarithmic intervals\n .attr('height', (d) => height - y(d.length)) // Invert height to fit SVG coordinate system\n .style('fill', '#929BAD')\n .attr('stroke', '#fff') // Border color\n .attr('stroke-opacity', 0.2)\n .attr('stroke-width', 0.5)\n .on('mouseover', mouseover)\n .on('mousemove', mousemove)\n .on('mouseout', mouseout)\n .append('title').text((d) => `[${d.x0}, ${d.x1}]\\n` + d.length + '\\n'); // Set bar color\n}\n"],"names":["drawBins","svg","bins","dimension","scales","height","x","y","tooltip","select","mouseover","_event","d","mousemove","event","mouseout"],"mappings":";AAGO,SAASA,EACdC,GACAC,GACAC,GACAC,GACA;AACM,QAAA,EAAE,QAAAC,MAAWF,GAEb,EAAE,GAAAG,GAAG,GAAAC,EAAA,IAAMH,GAEXI,IAAUC,EAAO,MAAM,EAC1B,OAAO,KAAK,EACZ,KAAK,SAAS,aAAa,EAC3B,MAAM,YAAY,UAAU,EAC5B,MAAM,cAAc,QAAQ,GAGzBC,IAAY,SAAUC,GAAoBC,GAAY;AAC1D,IAAAJ,EACG,MAAM,cAAc,SAAS,EAC7B,KAAK,UAAUI,EAAE,MAAM;AAAA,MAASA,EAAE,EAAE;AAAA,MAASA,EAAE,EAAE,EAAE;AAAA,EACxD,GAEMC,IAAY,SAAUC,GAAmB;AAC7C,IAAAN,EACG,MAAM,OAAOM,EAAM,QAAQ,KAAK,IAAI,EACpC,MAAM,QAAQA,EAAM,QAAQ,KAAK,IAAI;AAAA,EAC1C,GAEMC,IAAW,WAAY;AACnB,IAAAP,EAAA,MAAM,cAAc,QAAQ;AAAA,EACtC;AAGA,EAAAP,EAAI,UAAU,MAAM,EACjB,KAAKC,CAAI,EACT,MACA,EAAA,OAAO,MAAM,EACb,KAAK,KAAK,CAACU,MAAMN,EAAEM,EAAE,EAAG,CAAC,EACzB,KAAK,KAAK,CAACA,MAAML,EAAEK,EAAE,MAAM,CAAC,EAC5B,KAAK,SAAS,CAACA,MAAMN,EAAEM,EAAE,EAAG,IAAIN,EAAEM,EAAE,EAAG,CAAC,EACxC,KAAK,UAAU,CAACA,MAAMP,IAASE,EAAEK,EAAE,MAAM,CAAC,EAC1C,MAAM,QAAQ,SAAS,EACvB,KAAK,UAAU,MAAM,EACrB,KAAK,kBAAkB,GAAG,EAC1B,KAAK,gBAAgB,GAAG,EACxB,GAAG,aAAaF,CAAS,EACzB,GAAG,aAAaG,CAAS,EACzB,GAAG,YAAYE,CAAQ,EACvB,OAAO,OAAO,EAAE,KAAK,CAACH,MAAM,IAAIA,EAAE,EAAE,KAAKA,EAAE,EAAE;AAAA,IAAQA,EAAE,SAAS;AAAA,CAAI;AACzE;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"histogram.d.ts","sourceRoot":"","sources":["../../../src/components/PlChartHistogram/histogram.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"histogram.d.ts","sourceRoot":"","sources":["../../../src/components/PlChartHistogram/histogram.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAW,YAAY,EAAE,MAAM,SAAS,CAAC;AA2B7D,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,QA6B3F;AAED,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,QA2CxF;AAED,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,QA8B9F"}
|
|
@@ -1,39 +1,37 @@
|
|
|
1
|
-
import "../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.js";
|
|
2
|
-
import "../../node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.js";
|
|
3
1
|
import { createSvgContainer as u } from "./createSvgContainer.js";
|
|
4
2
|
import { drawBins as k } from "./drawBins.js";
|
|
5
|
-
import { createGridlines as
|
|
3
|
+
import { createGridlines as y } from "./createGridlines.js";
|
|
6
4
|
import { logspace as H } from "./logspace.js";
|
|
7
|
-
import { createLabels as
|
|
8
|
-
import { drawThreshold as
|
|
9
|
-
import { normalizeBins as
|
|
5
|
+
import { createLabels as z } from "./createLabels.js";
|
|
6
|
+
import { drawThreshold as S } from "./drawThreshold.js";
|
|
7
|
+
import { normalizeBins as p } from "./normalizeBins.js";
|
|
10
8
|
import w from "../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/min.js";
|
|
11
9
|
import d from "../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/max.js";
|
|
12
10
|
import F from "../../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/symlog.js";
|
|
11
|
+
import { axisBottom as $, axisLeft as b } from "../../node_modules/.pnpm/d3-axis@3.0.0/node_modules/d3-axis/src/axis.js";
|
|
13
12
|
import T from "../../node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/bin.js";
|
|
14
13
|
import C from "../../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/linear.js";
|
|
15
|
-
import { axisBottom as $, axisLeft as b } from "../../node_modules/.pnpm/d3-axis@3.0.0/node_modules/d3-axis/src/axis.js";
|
|
16
14
|
const B = (n, t) => n.append("g").style("font-size", "14px").style("font-weight", "500").attr("transform", `translate(0,${t})`), V = (n) => n.append("g").style("font-size", "14px").style("font-weight", "500"), v = (n, t) => C().domain([0, d(n, (c) => c.length)]).range([t, 0]);
|
|
17
|
-
function
|
|
18
|
-
const { width: g, height:
|
|
19
|
-
|
|
15
|
+
function Q(n, t, c) {
|
|
16
|
+
const { width: g, height: m, nBins: o = 10 } = t, e = u(n, t), h = w(c), l = d(c), i = C().domain([h, l]).range([0, g]), a = p(T().domain(i.domain()).thresholds(i.ticks(o))(c)), s = v(a, m);
|
|
17
|
+
y(e, t, { x: i, y: s }, (r) => r.ticks(6)), k(e, a, t, { x: i, y: s }), S(e, { x: i, y: s }, t), B(e, m).call($(i).tickSize(0)), V(e).call(b(s).tickSize(0)), z(e, t);
|
|
20
18
|
}
|
|
21
|
-
function
|
|
22
|
-
const { width: g, height:
|
|
19
|
+
function R(n, t, c) {
|
|
20
|
+
const { width: g, height: m, nBins: o = 10 } = t, e = u(n, t), h = w(c), l = d(c), i = F().domain([h, l]).range([0, g]).nice(), a = (f) => {
|
|
23
21
|
const M = [];
|
|
24
22
|
for (let x = 0; x <= f; x++)
|
|
25
23
|
M.push(Number(i.invert(g * (x / f)).toFixed(2)));
|
|
26
24
|
return M;
|
|
27
|
-
}, s =
|
|
28
|
-
|
|
25
|
+
}, s = p(T().domain(i.domain()).thresholds(a(o))(c)), r = v(s, m), L = H(0, Math.ceil(Math.log10(l)), 6);
|
|
26
|
+
y(e, t, { x: i, y: r }, (f) => f.tickValues(L)), k(e, s, t, { x: i, y: r }), S(e, { x: i, y: r }, t), B(e, m).call($(i).tickValues(L).tickSize(0)), V(e).call(b(r).tickSize(0)), z(e, t);
|
|
29
27
|
}
|
|
30
|
-
function
|
|
31
|
-
const { width: g, height:
|
|
32
|
-
|
|
28
|
+
function U(n, t, c) {
|
|
29
|
+
const { width: g, height: m } = t, o = u(n, t), e = p(c), h = w(e, (r) => r.x0), l = d(e, (r) => r.x1), i = F().domain([h, l]).range([0, g]).nice(), a = v(e, m), s = H(0, Math.ceil(Math.log10(l)), 6);
|
|
30
|
+
y(o, t, { x: i, y: a }, (r) => r.tickValues(s)), k(o, e, t, { x: i, y: a }), S(o, { x: i, y: a }, t), B(o, m).call($(i).tickValues(s).tickSize(0)), V(o).call(b(a).tickSize(0)), z(o, t);
|
|
33
31
|
}
|
|
34
32
|
export {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
U as createHistogramFromBins,
|
|
34
|
+
Q as createHistogramLinear,
|
|
35
|
+
R as createHistogramLog
|
|
38
36
|
};
|
|
39
37
|
//# sourceMappingURL=histogram.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"histogram.js","sources":["../../../src/components/PlChartHistogram/histogram.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"histogram.js","sources":["../../../src/components/PlChartHistogram/histogram.ts"],"sourcesContent":["import { createSvgContainer } from './createSvgContainer';\nimport { drawBins } from './drawBins';\nimport { createGridlines } from './createGridlines';\nimport { logspace } from './logspace';\nimport { createLabels } from './createLabels';\nimport type { AnyBin, BinLike, ChartOptions } from './types';\nimport { drawThreshold } from './drawThreshold';\nimport { normalizeBins } from './normalizeBins';\nimport type { Selection } from 'd3-selection';\nimport { bin, max as d3max, min as d3min } from 'd3-array';\nimport { scaleLinear, scaleSymlog } from 'd3-scale';\nimport { axisBottom, axisLeft } from 'd3-axis';\n\nconst gx = (svg: Selection<SVGGElement, unknown, null, undefined>, height: number) => {\n return svg.append('g')\n .style('font-size', '14px')\n .style('font-weight', '500')\n .attr('transform', `translate(0,${height})`);\n};\n\nconst gy = (svg: Selection<SVGGElement, unknown, null, undefined>) => {\n return svg.append('g')\n .style('font-size', '14px')\n .style('font-weight', '500');\n};\n\nconst createYScale = (bins: BinLike[], height: number) => {\n return scaleLinear()\n .domain([0, d3max(bins, (d) => d.length)!]) // Max bin count for the domain\n .range([height, 0]); // Map to chart height (invert to match SVG coordinates)\n};\n\nexport function createHistogramLinear(el: HTMLElement, options: ChartOptions, data: number[]) {\n const { width, height, nBins = 10 } = options;\n\n const svg = createSvgContainer(el, options);\n\n const min = d3min(data) as number;\n const max = d3max(data) as number;\n\n const x = scaleLinear()\n .domain([min, max])\n .range([0, width]);\n\n const bins: BinLike[] = normalizeBins(bin()\n .domain(x.domain() as [number, number]) // Set the input domain to match the x-scale\n .thresholds(x.ticks(nBins))(data)); // Apply the data to create bins\n\n const y = createYScale(bins, height);\n\n createGridlines(svg, options, { x, y }, (x) => x.ticks(6));\n\n drawBins(svg, bins, options, { x, y });\n\n drawThreshold(svg, { x, y }, options);\n\n gx(svg, height).call(axisBottom(x).tickSize(0));\n\n gy(svg).call(axisLeft(y).tickSize(0));\n\n createLabels(svg, options);\n}\n\nexport function createHistogramLog(el: HTMLElement, options: ChartOptions, data: number[]) {\n const { width, height, nBins = 10 } = options;\n\n const svg = createSvgContainer(el, options);\n\n const min = d3min(data) as number;\n const max = d3max(data) as number;\n\n const x = scaleSymlog()\n .domain([min, max]) // Input range (min and max values of the data)\n .range([0, width])\n .nice() // Output range (width of the chart)\n ;\n\n const createThresholds = (n: number) => {\n const res = [];\n\n for (let i = 0; i <= n; i++) {\n res.push(Number(x.invert(width * (i / n)).toFixed(2)));\n }\n\n return res;\n };\n\n const bins = normalizeBins(bin()\n .domain(x.domain() as [number, number]) // Set the input domain to match the x-scale\n .thresholds(createThresholds(nBins))(data)); // Apply the data to create bins\n\n const y = createYScale(bins, height);\n\n const tickValues = logspace(0, Math.ceil(Math.log10(max)), 6);\n\n createGridlines(svg, options, { x, y }, (x) => x.tickValues(tickValues));\n\n drawBins(svg, bins, options, { x, y });\n\n drawThreshold(svg, { x, y }, options);\n\n gx(svg, height).call(axisBottom(x).tickValues(tickValues).tickSize(0));\n\n gy(svg).call(axisLeft(y).tickSize(0));\n\n createLabels(svg, options);\n}\n\nexport function createHistogramFromBins(el: HTMLElement, options: ChartOptions, _bins: AnyBin[]) {\n const { width, height } = options;\n\n const svg = createSvgContainer(el, options);\n\n const bins = normalizeBins(_bins);\n\n const min = d3min(bins, (b) => b.x0) as number;\n const max = d3max(bins, (b) => b.x1) as number;\n\n const x = scaleSymlog()\n .domain([min, max])\n .range([0, width])\n .nice();\n\n const y = createYScale(bins, height);\n\n const tickValues = logspace(0, Math.ceil(Math.log10(max)), 6);\n\n createGridlines(svg, options, { x, y }, (x) => x.tickValues(tickValues));\n\n drawBins(svg, bins, options, { x, y });\n\n drawThreshold(svg, { x, y }, options);\n\n gx(svg, height).call(axisBottom(x).tickValues(tickValues).tickSize(0));\n\n gy(svg).call(axisLeft(y).tickSize(0));\n\n createLabels(svg, options);\n}\n"],"names":["gx","svg","height","gy","createYScale","bins","scaleLinear","d3max","d","createHistogramLinear","el","options","data","width","nBins","createSvgContainer","min","d3min","max","x","normalizeBins","bin","y","createGridlines","drawBins","drawThreshold","axisBottom","axisLeft","createLabels","createHistogramLog","scaleSymlog","createThresholds","n","res","i","tickValues","logspace","createHistogramFromBins","_bins","b"],"mappings":"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"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { AnyBin, BinLike } from './types';
|
|
2
|
-
|
|
2
|
+
import { Bin } from 'd3-array';
|
|
3
|
+
export declare function normalizeBins(bins: (Bin<number, number> | AnyBin)[]): BinLike[];
|
|
3
4
|
//# sourceMappingURL=normalizeBins.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeBins.d.ts","sourceRoot":"","sources":["../../../src/components/PlChartHistogram/normalizeBins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"normalizeBins.d.ts","sourceRoot":"","sources":["../../../src/components/PlChartHistogram/normalizeBins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAEpC,wBAAgB,aAAa,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,EAAE,GAAG,OAAO,EAAE,CAgB/E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeBins.js","sources":["../../../src/components/PlChartHistogram/normalizeBins.ts"],"sourcesContent":["import type { AnyBin, BinLike } from './types';\n\nexport function normalizeBins(bins: (
|
|
1
|
+
{"version":3,"file":"normalizeBins.js","sources":["../../../src/components/PlChartHistogram/normalizeBins.ts"],"sourcesContent":["import type { AnyBin, BinLike } from './types';\nimport type { Bin } from 'd3-array';\n\nexport function normalizeBins(bins: (Bin<number, number> | AnyBin)[]): BinLike[] {\n return bins.map((it) => {\n if ('from' in it) {\n return {\n x0: it.from,\n x1: it.to,\n length: it.weight,\n };\n }\n\n return {\n x0: it.x0!,\n x1: it.x1!,\n length: it.length,\n };\n });\n}\n"],"names":["normalizeBins","bins","it"],"mappings":"AAGO,SAASA,EAAcC,GAAmD;AACxE,SAAAA,EAAK,IAAI,CAACC,MACX,UAAUA,IACL;AAAA,IACL,IAAIA,EAAG;AAAA,IACP,IAAIA,EAAG;AAAA,IACP,QAAQA,EAAG;AAAA,EACb,IAGK;AAAA,IACL,IAAIA,EAAG;AAAA,IACP,IAAIA,EAAG;AAAA,IACP,QAAQA,EAAG;AAAA,EACb,CACD;AACH;"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ScaleLinear, ScaleSymLog } from 'd3-scale';
|
|
2
|
+
import { Selection } from 'd3-selection';
|
|
1
3
|
export type Margin = {
|
|
2
4
|
top: number;
|
|
3
5
|
right: number;
|
|
@@ -15,10 +17,10 @@ export type ChartOptions = {
|
|
|
15
17
|
compact?: boolean;
|
|
16
18
|
};
|
|
17
19
|
export type Scales = {
|
|
18
|
-
x:
|
|
19
|
-
y:
|
|
20
|
+
x: ScaleSymLog<number, number, never> | ScaleLinear<number, number>;
|
|
21
|
+
y: ScaleLinear<number, number, never>;
|
|
20
22
|
};
|
|
21
|
-
export type SVG =
|
|
23
|
+
export type SVG = Selection<SVGGElement, unknown, null, undefined>;
|
|
22
24
|
export type CustomBin = {
|
|
23
25
|
from: number;
|
|
24
26
|
to: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/PlChartHistogram/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAElF,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG;IACnB,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/PlChartHistogram/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,MAAM,MAAM,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAElF,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG;IACnB,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpE,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,GAAG,GAAG,SAAS,CAAC,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;AAEnE,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AAEzC;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG;IAC5C,IAAI,EAAE,UAAU,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,CACrC,6BAA6B,GAC7B,+BAA+B,CAChC,GAAG;IACF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC"}
|
|
@@ -93,14 +93,12 @@ import { defaultProps as g } from "./props.js";
|
|
|
93
93
|
|
|
94
94
|
|
|
95
95
|
|
|
96
|
-
import "../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.js";
|
|
97
|
-
import "../../node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.js";
|
|
98
96
|
import "../../colors/color.js";
|
|
99
97
|
import "../../colors/gradient.js";
|
|
100
98
|
const K = {
|
|
101
99
|
name: "PlPureSlideModal",
|
|
102
100
|
inheritAttrs: !1
|
|
103
|
-
},
|
|
101
|
+
}, bt = /* @__PURE__ */ f({
|
|
104
102
|
...K,
|
|
105
103
|
props: /* @__PURE__ */ c({
|
|
106
104
|
modelValue: { type: Boolean },
|
|
@@ -110,12 +108,12 @@ const K = {
|
|
|
110
108
|
}, g),
|
|
111
109
|
emits: ["update:modelValue"],
|
|
112
110
|
setup(a, { emit: u }) {
|
|
113
|
-
const
|
|
111
|
+
const o = u, i = y(), n = V(), t = a;
|
|
114
112
|
return P(i, () => {
|
|
115
|
-
t.modelValue && t.closeOnOutsideClick &&
|
|
113
|
+
t.modelValue && t.closeOnOutsideClick && o("update:modelValue", !1);
|
|
116
114
|
}), E(document, "keydown", (r) => {
|
|
117
|
-
r.key === "Escape" &&
|
|
118
|
-
}), (r,
|
|
115
|
+
r.key === "Escape" && o("update:modelValue", !1);
|
|
116
|
+
}), (r, e) => (m(), k(w, { to: "body" }, [
|
|
119
117
|
v(h, null, {
|
|
120
118
|
default: C(() => [
|
|
121
119
|
t.modelValue ? (m(), l("div", _({
|
|
@@ -125,11 +123,11 @@ const K = {
|
|
|
125
123
|
class: "pl-slide-modal",
|
|
126
124
|
style: { width: t.width }
|
|
127
125
|
}, B(n), {
|
|
128
|
-
onKeyup:
|
|
126
|
+
onKeyup: e[1] || (e[1] = d((p) => o("update:modelValue", !1), ["esc"]))
|
|
129
127
|
}), [
|
|
130
128
|
O("div", {
|
|
131
129
|
class: "close-dialog-btn",
|
|
132
|
-
onClick:
|
|
130
|
+
onClick: e[0] || (e[0] = (p) => o("update:modelValue", !1))
|
|
133
131
|
}),
|
|
134
132
|
$(r.$slots, "default")
|
|
135
133
|
], 16)) : s("", !0)
|
|
@@ -139,12 +137,12 @@ const K = {
|
|
|
139
137
|
t.modelValue && t.shadow ? (m(), l("div", {
|
|
140
138
|
key: 0,
|
|
141
139
|
class: "pl-slide-modal__shadow",
|
|
142
|
-
onKeyup:
|
|
140
|
+
onKeyup: e[2] || (e[2] = d((p) => o("update:modelValue", !1), ["esc"]))
|
|
143
141
|
}, null, 32)) : s("", !0)
|
|
144
142
|
]));
|
|
145
143
|
}
|
|
146
144
|
});
|
|
147
145
|
export {
|
|
148
|
-
|
|
146
|
+
bt as default
|
|
149
147
|
};
|
|
150
148
|
//# sourceMappingURL=PlPureSlideModal.vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlPureSlideModal.vue.js","sources":["../../../src/components/PlSlideModal/PlPureSlideModal.vue"],"sourcesContent":["<script lang=\"ts\">\nexport default {\n name: 'PlPureSlideModal',\n inheritAttrs: false,\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport './pl-slide-modal.scss';\nimport { ref, useAttrs } from 'vue';\nimport TransitionSlidePanel from '../TransitionSlidePanel.vue';\nimport { useClickOutside, useEventListener } from '../../index';\nimport type { Props } from './props';\nimport { defaultProps } from './props';\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', value: boolean): void;\n}>();\n\nconst modal = ref();\nconst attrs = useAttrs();\nconst props = withDefaults(\n defineProps<Props>(),\n defaultProps,\n);\n\nuseClickOutside(modal, () => {\n if (props.modelValue && props.closeOnOutsideClick) {\n emit('update:modelValue', false);\n }\n});\n\nuseEventListener(document, 'keydown', (evt: KeyboardEvent) => {\n if (evt.key === 'Escape') {\n emit('update:modelValue', false);\n }\n});\n</script>\n\n<template>\n <Teleport to=\"body\">\n <TransitionSlidePanel>\n <div\n v-if=\"props.modelValue\"\n ref=\"modal\"\n class=\"pl-slide-modal\"\n :style=\"{ width: props.width }\"\n v-bind=\"attrs\"\n @keyup.esc=\"emit('update:modelValue', false)\"\n >\n <div class=\"close-dialog-btn\" @click=\"emit('update:modelValue', false)\" />\n <slot />\n </div>\n </TransitionSlidePanel>\n <div v-if=\"props.modelValue && props.shadow\" class=\"pl-slide-modal__shadow\" @keyup.esc=\"emit('update:modelValue', false)\" />\n </Teleport>\n</template>\n"],"names":["__default__","emit","__emit","modal","ref","attrs","useAttrs","props","__props","useClickOutside","useEventListener","evt"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PlPureSlideModal.vue.js","sources":["../../../src/components/PlSlideModal/PlPureSlideModal.vue"],"sourcesContent":["<script lang=\"ts\">\nexport default {\n name: 'PlPureSlideModal',\n inheritAttrs: false,\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport './pl-slide-modal.scss';\nimport { ref, useAttrs } from 'vue';\nimport TransitionSlidePanel from '../TransitionSlidePanel.vue';\nimport { useClickOutside, useEventListener } from '../../index';\nimport type { Props } from './props';\nimport { defaultProps } from './props';\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', value: boolean): void;\n}>();\n\nconst modal = ref();\nconst attrs = useAttrs();\nconst props = withDefaults(\n defineProps<Props>(),\n defaultProps,\n);\n\nuseClickOutside(modal, () => {\n if (props.modelValue && props.closeOnOutsideClick) {\n emit('update:modelValue', false);\n }\n});\n\nuseEventListener(document, 'keydown', (evt: KeyboardEvent) => {\n if (evt.key === 'Escape') {\n emit('update:modelValue', false);\n }\n});\n</script>\n\n<template>\n <Teleport to=\"body\">\n <TransitionSlidePanel>\n <div\n v-if=\"props.modelValue\"\n ref=\"modal\"\n class=\"pl-slide-modal\"\n :style=\"{ width: props.width }\"\n v-bind=\"attrs\"\n @keyup.esc=\"emit('update:modelValue', false)\"\n >\n <div class=\"close-dialog-btn\" @click=\"emit('update:modelValue', false)\" />\n <slot />\n </div>\n </TransitionSlidePanel>\n <div v-if=\"props.modelValue && props.shadow\" class=\"pl-slide-modal__shadow\" @keyup.esc=\"emit('update:modelValue', false)\" />\n </Teleport>\n</template>\n"],"names":["__default__","emit","__emit","modal","ref","attrs","useAttrs","props","__props","useClickOutside","useEventListener","evt"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,MAAeA,IAAA;AAAA,EACb,MAAM;AAAA,EACN,cAAc;AAChB;;;;;;;;;;AAWA,UAAMC,IAAOC,GAIPC,IAAQC,EAAI,GACZC,IAAQC,EAAS,GACjBC,IAAQC;AAKd,WAAAC,EAAgBN,GAAO,MAAM;AACvB,MAAAI,EAAM,cAAcA,EAAM,uBAC5BN,EAAK,qBAAqB,EAAK;AAAA,IACjC,CACD,GAEgBS,EAAA,UAAU,WAAW,CAACC,MAAuB;AACxD,MAAAA,EAAI,QAAQ,YACdV,EAAK,qBAAqB,EAAK;AAAA,IACjC,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|