@milaboratories/uikit 2.3.22 → 2.3.23

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.
Files changed (119) hide show
  1. package/.turbo/turbo-build.log +29 -64
  2. package/.turbo/turbo-type-check.log +1 -1
  3. package/CHANGELOG.md +6 -0
  4. package/dist/components/DataTable/TableComponent.vue.js +2 -4
  5. package/dist/components/DataTable/TableComponent.vue.js.map +1 -1
  6. package/dist/components/PlAccordion/{ExpandTransition.vue2.js → ExpandTransition.vue.js} +1 -1
  7. package/dist/components/PlAccordion/ExpandTransition.vue.js.map +1 -0
  8. package/dist/components/PlAccordion/ExpandTransition.vue3.js +1 -1
  9. package/dist/components/PlAccordion/PlAccordionSection.vue2.js +1 -1
  10. package/dist/components/PlChartHistogram/createGridlines.d.ts +4 -2
  11. package/dist/components/PlChartHistogram/createGridlines.d.ts.map +1 -1
  12. package/dist/components/PlChartHistogram/createGridlines.js +4 -6
  13. package/dist/components/PlChartHistogram/createGridlines.js.map +1 -1
  14. package/dist/components/PlChartHistogram/createLabels.d.ts +2 -2
  15. package/dist/components/PlChartHistogram/createLabels.d.ts.map +1 -1
  16. package/dist/components/PlChartHistogram/createLabels.js.map +1 -1
  17. package/dist/components/PlChartHistogram/createSvgContainer.d.ts +1 -2
  18. package/dist/components/PlChartHistogram/createSvgContainer.d.ts.map +1 -1
  19. package/dist/components/PlChartHistogram/createSvgContainer.js +5 -7
  20. package/dist/components/PlChartHistogram/createSvgContainer.js.map +1 -1
  21. package/dist/components/PlChartHistogram/drawBins.d.ts.map +1 -1
  22. package/dist/components/PlChartHistogram/drawBins.js +4 -6
  23. package/dist/components/PlChartHistogram/drawBins.js.map +1 -1
  24. package/dist/components/PlChartHistogram/histogram.d.ts.map +1 -1
  25. package/dist/components/PlChartHistogram/histogram.js +18 -20
  26. package/dist/components/PlChartHistogram/histogram.js.map +1 -1
  27. package/dist/components/PlChartHistogram/normalizeBins.d.ts +2 -1
  28. package/dist/components/PlChartHistogram/normalizeBins.d.ts.map +1 -1
  29. package/dist/components/PlChartHistogram/normalizeBins.js.map +1 -1
  30. package/dist/components/PlChartHistogram/types.d.ts +5 -3
  31. package/dist/components/PlChartHistogram/types.d.ts.map +1 -1
  32. package/dist/components/PlSlideModal/PlPureSlideModal.vue.js +9 -11
  33. package/dist/components/PlSlideModal/PlPureSlideModal.vue.js.map +1 -1
  34. package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/rgb.js +8 -8
  35. package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/rgb.js.map +1 -1
  36. package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/string.js +7 -7
  37. package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/string.js.map +1 -1
  38. package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/value.js +6 -6
  39. package/dist/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/index.js +23 -27
  40. package/dist/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/index.js.map +1 -1
  41. package/package.json +11 -5
  42. package/src/components/PlChartHistogram/createGridlines.ts +10 -6
  43. package/src/components/PlChartHistogram/createLabels.ts +2 -2
  44. package/src/components/PlChartHistogram/createSvgContainer.ts +2 -3
  45. package/src/components/PlChartHistogram/drawBins.ts +2 -3
  46. package/src/components/PlChartHistogram/histogram.ts +25 -22
  47. package/src/components/PlChartHistogram/normalizeBins.ts +2 -1
  48. package/src/components/PlChartHistogram/types.ts +6 -3
  49. package/dist/components/PlAccordion/ExpandTransition.vue2.js.map +0 -1
  50. package/dist/node_modules/.pnpm/d3-dispatch@3.0.1/node_modules/d3-dispatch/src/dispatch.js +0 -65
  51. package/dist/node_modules/.pnpm/d3-dispatch@3.0.1/node_modules/d3-dispatch/src/dispatch.js.map +0 -1
  52. package/dist/node_modules/.pnpm/d3-ease@3.0.1/node_modules/d3-ease/src/cubic.js +0 -7
  53. package/dist/node_modules/.pnpm/d3-ease@3.0.1/node_modules/d3-ease/src/cubic.js.map +0 -1
  54. package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/decompose.js +0 -24
  55. package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/decompose.js.map +0 -1
  56. package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/index.js +0 -38
  57. package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/index.js.map +0 -1
  58. package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/parse.js +0 -14
  59. package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/parse.js.map +0 -1
  60. package/dist/node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timeout.js +0 -11
  61. package/dist/node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timeout.js.map +0 -1
  62. package/dist/node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timer.js +0 -63
  63. package/dist/node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timer.js.map +0 -1
  64. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/interrupt.js +0 -19
  65. 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
  66. 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
  67. 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
  68. 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
  69. 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
  70. 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
  71. 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
  72. 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
  73. 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
  74. 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
  75. 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
  76. 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
  77. 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
  78. 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
  79. 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
  80. 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
  81. 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
  82. 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
  83. 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
  84. 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
  85. 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
  86. 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
  87. 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
  88. 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
  89. 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
  90. 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
  91. 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
  92. 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
  93. 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
  94. 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
  95. 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
  96. 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
  97. 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
  98. 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
  99. 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
  100. 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
  101. 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
  102. 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
  103. 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
  104. 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
  105. 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
  106. 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
  107. 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
  108. 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
  109. 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
  110. 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
  111. 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
  112. 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
  113. 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
  114. 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
  115. 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
  116. 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
  117. 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
  118. package/dist/node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.js +0 -44
  119. package/dist/node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.js.map +0 -1
@@ -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" }, uo = /* @__PURE__ */ H({
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
- uo as default
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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
+ {"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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -24,4 +24,4 @@ const f = /* @__PURE__ */ n({
24
24
  export {
25
25
  f as default
26
26
  };
27
- //# sourceMappingURL=ExpandTransition.vue2.js.map
27
+ //# sourceMappingURL=ExpandTransition.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpandTransition.vue.js","sources":["../../../src/components/PlAccordion/ExpandTransition.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nconst onStart = (el: Element) => {\n el.classList.add('expand-collapse-fix');\n (el as HTMLElement).style.setProperty('--component-height', el.scrollHeight + 'px');\n};\n\nconst onAfter = (el: Element) => {\n (el as HTMLElement).style.removeProperty('--component-height');\n el.classList.remove('expand-collapse-fix');\n};\n</script>\n\n<template>\n <Transition name=\"expand-collapse\" @enter=\"onStart\" @leave=\"onStart\" @after-enter=\"onAfter\" @after-leave=\"onAfter\">\n <slot/>\n </Transition>\n</template>\n\n<style>\n.expand-collapse-fix {\n overflow: hidden;\n}\n\n.expand-collapse-enter-active,\n.expand-collapse-leave-active {\n transition:\n height 0.2s ease-in-out,\n opacity 0.2s ease-in-out;\n height: var(--component-height);\n}\n\n.expand-collapse-enter-from,\n.expand-collapse-leave-to {\n opacity: 0.5;\n height: 0;\n}\n</style>\n"],"names":["onStart","el","onAfter"],"mappings":";;;;AACM,UAAAA,IAAU,CAACC,MAAgB;AAC5B,MAAAA,EAAA,UAAU,IAAI,qBAAqB,GACrCA,EAAmB,MAAM,YAAY,sBAAsBA,EAAG,eAAe,IAAI;AAAA,IACpF,GAEMC,IAAU,CAACD,MAAgB;AAC9B,MAAAA,EAAmB,MAAM,eAAe,oBAAoB,GAC1DA,EAAA,UAAU,OAAO,qBAAqB;AAAA,IAC3C;;;;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".expand-collapse-fix{overflow:hidden}.expand-collapse-enter-active,.expand-collapse-leave-active{transition:height .2s ease-in-out,opacity .2s ease-in-out;height:var(--component-height)}.expand-collapse-enter-from,.expand-collapse-leave-to{opacity:.5;height:0}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
- import o from "./ExpandTransition.vue2.js";
2
+ import o from "./ExpandTransition.vue.js";
3
3
 
4
4
  export {
5
5
  o as default
@@ -3,7 +3,7 @@ import { defineComponent as M, mergeModels as V, inject as i, toRef as m, useMod
3
3
  import { uniqueId as B } from "../../lib/util/helpers/dist/index.js";
4
4
  import N from "../PlIcon16/PlIcon16.vue.js";
5
5
  import P from "../PlSectionSeparator/PlSectionSeparator.vue.js";
6
- import _ from "./ExpandTransition.vue2.js";
6
+ import _ from "./ExpandTransition.vue.js";
7
7
 
8
8
  const b = { class: "pl-accordion-section" }, E = /* @__PURE__ */ M({
9
9
  __name: "PlAccordionSection",
@@ -1,4 +1,6 @@
1
1
  import { ChartOptions, Scales } from './types';
2
- import * as d3 from 'd3';
3
- export declare function createGridlines(svg: d3.Selection<SVGGElement, unknown, null, undefined>, options: ChartOptions, scales: Scales, xTicks: (d: d3.Axis<d3.NumberValue>) => d3.Axis<d3.NumberValue>): void;
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,IAAI,CAAC;AACzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEpD,wBAAgB,eAAe,CAC7B,GAAG,EAAE,EAAE,CAAC,SAAS,CAAC,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,CAAC,EACxD,OAAO,EAAE,YAAY,EACrB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,QAkChE"}
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 m } from "../../node_modules/.pnpm/d3-axis@3.0.0/node_modules/d3-axis/src/axis.js";
5
- function y(t, a, i, e) {
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(m(i.x));
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
- y as createGridlines
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 * as d3 from 'd3';\nimport type { ChartOptions, Scales } from './types';\n\nexport function createGridlines(\n svg: d3.Selection<SVGGElement, unknown, null, undefined>,\n options: ChartOptions,\n scales: Scales,\n xTicks: (d: d3.Axis<d3.NumberValue>) => d3.Axis<d3.NumberValue>,\n) {\n const { width, height } = options;\n\n function makeYGridlines() {\n return d3.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(d3.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 d3.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","d3.axisLeft","makeXGridlines","d3.axisBottom","d3.selectAll"],"mappings":";;;;AAGO,SAASA,EACdC,GACAC,GACAC,GACAC,GACA;AACM,QAAA,EAAE,OAAAC,GAAO,QAAAC,EAAA,IAAWJ;AAE1B,WAASK,IAAiB;AACxB,WAAOC,EAAYL,EAAO,CAAC,EACxB,MAAM,CAAC;AAAA,EAAA;AAGZ,WAASM,IAAiB;AACxB,WAAOL,EAAOM,EAAcP,EAAO,CAAC,CAAC;AAAA,EAAA;AAGnC,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,GAGtBK,EAAU,YAAY,EACtB,MAAM,UAAU,SAAS,EAEzB,MAAM,WAAW,GAAG;AACzB;"}
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
- import type * as d3 from 'd3';
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,KAAK,EAAE,MAAM,IAAI,CAAC;AAC9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,wBAAgB,YAAY,CAC1B,GAAG,EAAE,EAAE,CAAC,SAAS,CAAC,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,CAAC,EACxD,OAAO,EAAE,YAAY,QA0BtB"}
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 * as d3 from 'd3';\nimport type { ChartOptions } from './types';\n\nexport function createLabels(\n svg: d3.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
+ {"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
- import * as d3 from 'd3';
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,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY,uDAmBxE"}
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-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
- import p from "../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/select.js";
4
- function c(e, i) {
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
- c as createSvgContainer
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 * as d3 from 'd3';\nimport type { ChartOptions } from './types';\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 = d3\n .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","d3.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,EACFN,CAAE,EACT,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
+ {"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,QA+Cf"}
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 v(n, l, r, a) {
5
- const { height: p } = r, { x: e, y: s } = a, o = y("body").append("div").attr("class", "svg-tooltip").style("position", "absolute").style("visibility", "hidden"), c = function(t, i) {
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) => p - s(t.length)).style("fill", "#929BAD").attr("stroke", "#fff").attr("stroke-opacity", 0.2).attr("stroke-width", 0.5).on("mouseover", c).on("mousemove", x).on("mouseout", u).append("title").text((t) => `[${t.x0}, ${t.x1}]
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
- v as drawBins
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 * as d3 from 'd3';\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 = d3\n .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","d3.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,EACN,MAAM,EACb,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
+ {"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":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAW,YAAY,EAAE,MAAM,SAAS,CAAC;AAuB7D,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
+ {"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 p } from "./createGridlines.js";
3
+ import { createGridlines as y } from "./createGridlines.js";
6
4
  import { logspace as H } from "./logspace.js";
7
- import { createLabels as y } from "./createLabels.js";
8
- import { drawThreshold as z } from "./drawThreshold.js";
9
- import { normalizeBins as S } from "./normalizeBins.js";
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 U(n, t, c) {
18
- const { width: g, height: a, nBins: o = 10 } = t, e = u(n, t), h = w(c), l = d(c), i = C().domain([h, l]).range([0, g]), m = S(T().domain(i.domain()).thresholds(i.ticks(o))(c)), s = v(m, a);
19
- p(e, t, { x: i, y: s }, (r) => r.ticks(6)), k(e, m, t, { x: i, y: s }), z(e, { x: i, y: s }, t), B(e, a).call($(i).tickSize(0)), V(e).call(b(s).tickSize(0)), y(e, t);
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 W(n, t, c) {
22
- const { width: g, height: a, nBins: o = 10 } = t, e = u(n, t), h = w(c), l = d(c), i = F().domain([h, l]).range([0, g]).nice(), m = (f) => {
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 = S(T().domain(i.domain()).thresholds(m(o))(c)), r = v(s, a), L = H(0, Math.ceil(Math.log10(l)), 6);
28
- p(e, t, { x: i, y: r }, (f) => f.tickValues(L)), k(e, s, t, { x: i, y: r }), z(e, { x: i, y: r }, t), B(e, a).call($(i).tickValues(L).tickSize(0)), V(e).call(b(r).tickSize(0)), y(e, t);
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 X(n, t, c) {
31
- const { width: g, height: a } = t, o = u(n, t), e = S(c), h = w(e, (r) => r.x0), l = d(e, (r) => r.x1), i = F().domain([h, l]).range([0, g]).nice(), m = v(e, a), s = H(0, Math.ceil(Math.log10(l)), 6);
32
- p(o, t, { x: i, y: m }, (r) => r.tickValues(s)), k(o, e, t, { x: i, y: m }), z(o, { x: i, y: m }, t), B(o, a).call($(i).tickValues(s).tickSize(0)), V(o).call(b(m).tickSize(0)), y(o, t);
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
- X as createHistogramFromBins,
36
- U as createHistogramLinear,
37
- W as createHistogramLog
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 * as d3 from 'd3';\nimport { 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';\n\nconst gx = (svg: d3.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: d3.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 d3.scaleLinear()\n .domain([0, d3.max(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 = d3.min(data) as number;\n const max = d3.max(data) as number;\n\n const x = d3.scaleLinear()\n .domain([min, max])\n .range([0, width]);\n\n const bins: BinLike[] = normalizeBins(d3.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(d3.axisBottom(x).tickSize(0));\n\n gy(svg).call(d3.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 = d3.min(data) as number;\n const max = d3.max(data) as number;\n\n const x = d3.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(d3.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(d3.axisBottom(x).tickValues(tickValues).tickSize(0));\n\n gy(svg).call(d3.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 = d3.min(bins, (b) => b.x0) as number;\n const max = d3.max(bins, (b) => b.x1) as number;\n\n const x = d3.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(d3.axisBottom(x).tickValues(tickValues).tickSize(0));\n\n gy(svg).call(d3.axisLeft(y).tickSize(0));\n\n createLabels(svg, options);\n}\n"],"names":["gx","svg","height","gy","createYScale","bins","d3.scaleLinear","d3.max","d","createHistogramLinear","el","options","data","width","nBins","createSvgContainer","min","d3.min","max","x","normalizeBins","d3.bin","y","createGridlines","drawBins","drawThreshold","d3.axisBottom","d3.axisLeft","createLabels","createHistogramLog","d3.scaleSymlog","createThresholds","n","res","i","tickValues","logspace","createHistogramFromBins","_bins","b"],"mappings":";;;;;;;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AAC,EAAE,SAAS,CAAC,CAAC,GAEvCM,EAAa3B,GAAKU,CAAO;AAC3B;AAEgB,SAAA0B,EAAwB3B,GAAiBC,GAAuB2B,GAAiB;AACzF,QAAA,EAAE,OAAAzB,GAAO,QAAAX,EAAA,IAAWS,GAEpBV,IAAMc,EAAmBL,GAAIC,CAAO,GAEpCN,IAAOe,EAAckB,CAAK,GAE1BtB,IAAMC,EAAOZ,GAAM,CAACkC,MAAMA,EAAE,EAAE,GAC9BrB,IAAMX,EAAOF,GAAM,CAACkC,MAAMA,EAAE,EAAE,GAE9BpB,IAAIW,EAAG,EACV,OAAO,CAACd,GAAKE,CAAG,CAAC,EACjB,MAAM,CAAC,GAAGL,CAAK,CAAC,EAChB,KAAK,GAEFS,IAAIlB,EAAaC,GAAMH,CAAM,GAE7BiC,IAAaC,EAAS,GAAG,KAAK,KAAK,KAAK,MAAMlB,CAAG,CAAC,GAAG,CAAC;AAE5C,EAAAK,EAAAtB,GAAKU,GAAS,EAAE,GAAAQ,GAAG,GAAAG,KAAK,CAACH,MAAMA,EAAE,WAAWgB,CAAU,CAAC,GAEvEX,EAASvB,GAAKI,GAAMM,GAAS,EAAE,GAAAQ,GAAG,GAAAG,GAAG,GAErCG,EAAcxB,GAAK,EAAE,GAAAkB,GAAG,GAAAG,EAAA,GAAKX,CAAO,GAEpCX,EAAGC,GAAKC,CAAM,EAAE,KAAKwB,EAAcP,CAAC,EAAE,WAAWgB,CAAU,EAAE,SAAS,CAAC,CAAC,GAErEhC,EAAAF,CAAG,EAAE,KAAK0B,EAAYL,CAAC,EAAE,SAAS,CAAC,CAAC,GAEvCM,EAAa3B,GAAKU,CAAO;AAC3B;"}
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":";;;;;;;;;;;;;AAaA,MAAMA,IAAK,CAACC,GAAuDC,MAC1DD,EAAI,OAA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EgB,SAAA0B,EAAwB3B,GAAiBC,GAAuB2B,GAAiB;AACzF,QAAA,EAAE,OAAAzB,GAAO,QAAAX,EAAA,IAAWS,GAEpBV,IAAMc,EAAmBL,GAAIC,CAAO,GAEpCN,IAAOe,EAAckB,CAAK,GAE1BtB,IAAMC,EAAMZ,GAAM,CAACkC,MAAMA,EAAE,EAAE,GAC7BrB,IAAMX,EAAMF,GAAM,CAACkC,MAAMA,EAAE,EAAE,GAE7BpB,IAAIW,EAAA,EACP,OAAO,CAACd,GAAKE,CAAG,CAAC,EACjB,MAAM,CAAC,GAAGL,CAAK,CAAC,EAChB,KAAK,GAEFS,IAAIlB,EAAaC,GAAMH,CAAM,GAE7BiC,IAAaC,EAAS,GAAG,KAAK,KAAK,KAAK,MAAMlB,CAAG,CAAC,GAAG,CAAC;AAE5C,EAAAK,EAAAtB,GAAKU,GAAS,EAAE,GAAAQ,GAAG,GAAAG,KAAK,CAACH,MAAMA,EAAE,WAAWgB,CAAU,CAAC,GAEvEX,EAASvB,GAAKI,GAAMM,GAAS,EAAE,GAAAQ,GAAG,GAAAG,GAAG,GAErCG,EAAcxB,GAAK,EAAE,GAAAkB,GAAG,GAAAG,EAAA,GAAKX,CAAO,GAEpCX,EAAGC,GAAKC,CAAM,EAAE,KAAKwB,EAAWP,CAAC,EAAE,WAAWgB,CAAU,EAAE,SAAS,CAAC,CAAC,GAElEhC,EAAAF,CAAG,EAAE,KAAK0B,EAASL,CAAC,EAAE,SAAS,CAAC,CAAC,GAEpCM,EAAa3B,GAAKU,CAAO;AAC3B;"}
@@ -1,3 +1,4 @@
1
1
  import { AnyBin, BinLike } from './types';
2
- export declare function normalizeBins(bins: (d3.Bin<number, number> | AnyBin)[]): BinLike[];
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;AAE/C,wBAAgB,aAAa,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,EAAE,GAAG,OAAO,EAAE,CAgBlF"}
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: (d3.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":"AAEO,SAASA,EAAcC,GAAsD;AAC3E,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
+ {"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: d3.ScaleSymLog<number, number, never> | d3.ScaleLinear<number, number>;
19
- y: d3.ScaleLinear<number, number, never>;
20
+ x: ScaleSymLog<number, number, never> | ScaleLinear<number, number>;
21
+ y: ScaleLinear<number, number, never>;
20
22
  };
21
- export type SVG = d3.Selection<SVGGElement, unknown, null, undefined>;
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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AAE,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
- }, At = /* @__PURE__ */ f({
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 e = u, i = y(), n = V(), t = a;
111
+ const o = u, i = y(), n = V(), t = a;
114
112
  return P(i, () => {
115
- t.modelValue && t.closeOnOutsideClick && e("update:modelValue", !1);
113
+ t.modelValue && t.closeOnOutsideClick && o("update:modelValue", !1);
116
114
  }), E(document, "keydown", (r) => {
117
- r.key === "Escape" && e("update:modelValue", !1);
118
- }), (r, o) => (m(), k(w, { to: "body" }, [
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: o[1] || (o[1] = d((p) => e("update:modelValue", !1), ["esc"]))
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: o[0] || (o[0] = (p) => e("update:modelValue", !1))
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: o[2] || (o[2] = d((p) => e("update:modelValue", !1), ["esc"]))
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
- At as default
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,14 +1,14 @@
1
- import y, { gamma as e } from "./color.js";
1
+ import y, { gamma as l } from "./color.js";
2
2
  import { rgb as c } from "../../../../d3-color@3.1.0/node_modules/d3-color/src/color.js";
3
- const x = function a(b) {
4
- var g = e(b);
5
- function i(o, r) {
6
- var n = g((o = c(o)).r, (r = c(r)).r), p = g(o.g, r.g), u = g(o.b, r.b), f = y(o.opacity, r.opacity);
7
- return function(m) {
8
- return o.r = n(m), o.g = p(m), o.b = u(m), o.opacity = f(m), o + "";
3
+ const x = function i(a) {
4
+ var m = l(a);
5
+ function b(o, r) {
6
+ var n = m((o = c(o)).r, (r = c(r)).r), p = m(o.g, r.g), u = m(o.b, r.b), f = y(o.opacity, r.opacity);
7
+ return function(g) {
8
+ return o.r = n(g), o.g = p(g), o.b = u(g), o.opacity = f(g), o + "";
9
9
  };
10
10
  }
11
- return i.gamma = a, i;
11
+ return b.gamma = i, b;
12
12
  }(1);
13
13
  export {
14
14
  x as default
@@ -1 +1 @@
1
- {"version":3,"file":"rgb.js","sources":["../../../../../../../../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/rgb.js"],"sourcesContent":["import {rgb as colorRgb} from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, {gamma} from \"./color.js\";\n\nexport default (function rgbGamma(y) {\n var color = gamma(y);\n\n function rgb(start, end) {\n var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n g = color(start.g, end.g),\n b = color(start.b, end.b),\n opacity = nogamma(start.opacity, end.opacity);\n return function(t) {\n start.r = r(t);\n start.g = g(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n rgb.gamma = rgbGamma;\n\n return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n return function(colors) {\n var n = colors.length,\n r = new Array(n),\n g = new Array(n),\n b = new Array(n),\n i, color;\n for (i = 0; i < n; ++i) {\n color = colorRgb(colors[i]);\n r[i] = color.r || 0;\n g[i] = color.g || 0;\n b[i] = color.b || 0;\n }\n r = spline(r);\n g = spline(g);\n b = spline(b);\n color.opacity = 1;\n return function(t) {\n color.r = r(t);\n color.g = g(t);\n color.b = b(t);\n return color + \"\";\n };\n };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);\n"],"names":["interpolateRgb","rgbGamma","y","color","gamma","rgb","start","end","r","colorRgb","g","b","opacity","nogamma","t"],"mappings":";;AAKA,MAAAA,IAAgB,SAASC,EAASC,GAAG;AACnC,MAAIC,IAAQC,EAAMF,CAAC;AAEnB,WAASG,EAAIC,GAAOC,GAAK;AACvB,QAAIC,IAAIL,GAAOG,IAAQG,EAASH,CAAK,GAAG,IAAIC,IAAME,EAASF,CAAG,GAAG,CAAC,GAC9DG,IAAIP,EAAMG,EAAM,GAAGC,EAAI,CAAC,GACxBI,IAAIR,EAAMG,EAAM,GAAGC,EAAI,CAAC,GACxBK,IAAUC,EAAQP,EAAM,SAASC,EAAI,OAAO;AAChD,WAAO,SAASO,GAAG;AACjB,aAAAR,EAAM,IAAIE,EAAEM,CAAC,GACbR,EAAM,IAAII,EAAEI,CAAC,GACbR,EAAM,IAAIK,EAAEG,CAAC,GACbR,EAAM,UAAUM,EAAQE,CAAC,GAClBR,IAAQ;AAAA,IAChB;AAAA,EACL;AAEED,SAAAA,EAAI,QAAQJ,GAELI;AACT,EAAG,CAAC;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"rgb.js","sources":["../../../../../../../../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/rgb.js"],"sourcesContent":["import {rgb as colorRgb} from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, {gamma} from \"./color.js\";\n\nexport default (function rgbGamma(y) {\n var color = gamma(y);\n\n function rgb(start, end) {\n var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n g = color(start.g, end.g),\n b = color(start.b, end.b),\n opacity = nogamma(start.opacity, end.opacity);\n return function(t) {\n start.r = r(t);\n start.g = g(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n rgb.gamma = rgbGamma;\n\n return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n return function(colors) {\n var n = colors.length,\n r = new Array(n),\n g = new Array(n),\n b = new Array(n),\n i, color;\n for (i = 0; i < n; ++i) {\n color = colorRgb(colors[i]);\n r[i] = color.r || 0;\n g[i] = color.g || 0;\n b[i] = color.b || 0;\n }\n r = spline(r);\n g = spline(g);\n b = spline(b);\n color.opacity = 1;\n return function(t) {\n color.r = r(t);\n color.g = g(t);\n color.b = b(t);\n return color + \"\";\n };\n };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);\n"],"names":["rgb","rgbGamma","y","color","gamma","start","end","r","colorRgb","g","b","opacity","nogamma","t"],"mappings":";;AAKA,MAAAA,IAAgB,SAASC,EAASC,GAAG;AACnC,MAAIC,IAAQC,EAAMF,CAAC;AAEnB,WAASF,EAAIK,GAAOC,GAAK;AACvB,QAAIC,IAAIJ,GAAOE,IAAQG,EAASH,CAAK,GAAG,IAAIC,IAAME,EAASF,CAAG,GAAG,CAAC,GAC9DG,IAAIN,EAAME,EAAM,GAAGC,EAAI,CAAC,GACxBI,IAAIP,EAAME,EAAM,GAAGC,EAAI,CAAC,GACxBK,IAAUC,EAAQP,EAAM,SAASC,EAAI,OAAO;AAChD,WAAO,SAASO,GAAG;AACjB,aAAAR,EAAM,IAAIE,EAAEM,CAAC,GACbR,EAAM,IAAII,EAAEI,CAAC,GACbR,EAAM,IAAIK,EAAEG,CAAC,GACbR,EAAM,UAAUM,EAAQE,CAAC,GAClBR,IAAQ;AAAA,IAChB;AAAA,EACL;AAEE,SAAAL,EAAI,QAAQC,GAELD;AACT,EAAG,CAAC;","x_google_ignoreList":[0]}