@platforma-sdk/ui-vue 1.41.17 → 1.41.19

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 (102) hide show
  1. package/.turbo/turbo-build.log +26 -61
  2. package/.turbo/turbo-type-check.log +1 -1
  3. package/CHANGELOG.md +7 -0
  4. package/dist/components/PlAnnotations/components/PlAnnotationsModal.vue2.js +3 -3
  5. package/dist/lib/ui/uikit/dist/components/DataTable/TableComponent.vue.js +2 -4
  6. package/dist/lib/ui/uikit/dist/components/DataTable/TableComponent.vue.js.map +1 -1
  7. package/dist/lib/ui/uikit/dist/components/DataTable/index.js +2 -2
  8. package/dist/lib/ui/uikit/dist/components/PlAccordion/{ExpandTransition.vue2.js → ExpandTransition.vue.js} +1 -1
  9. package/dist/lib/ui/uikit/dist/components/PlAccordion/ExpandTransition.vue.js.map +1 -0
  10. package/dist/lib/ui/uikit/dist/components/PlAccordion/PlAccordionSection.vue2.js +1 -1
  11. package/dist/lib/ui/uikit/dist/components/PlChartHistogram/createGridlines.js +6 -8
  12. package/dist/lib/ui/uikit/dist/components/PlChartHistogram/createGridlines.js.map +1 -1
  13. package/dist/lib/ui/uikit/dist/components/PlChartHistogram/createLabels.js.map +1 -1
  14. package/dist/lib/ui/uikit/dist/components/PlChartHistogram/createSvgContainer.js +5 -7
  15. package/dist/lib/ui/uikit/dist/components/PlChartHistogram/createSvgContainer.js.map +1 -1
  16. package/dist/lib/ui/uikit/dist/components/PlChartHistogram/drawBins.js +3 -5
  17. package/dist/lib/ui/uikit/dist/components/PlChartHistogram/drawBins.js.map +1 -1
  18. package/dist/lib/ui/uikit/dist/components/PlChartHistogram/histogram.js +19 -21
  19. package/dist/lib/ui/uikit/dist/components/PlChartHistogram/histogram.js.map +1 -1
  20. package/dist/lib/ui/uikit/dist/components/PlChartHistogram/normalizeBins.js.map +1 -1
  21. package/dist/lib/ui/uikit/dist/components/PlSlideModal/PlPureSlideModal.vue.js +2 -4
  22. package/dist/lib/ui/uikit/dist/components/PlSlideModal/PlPureSlideModal.vue.js.map +1 -1
  23. package/dist/lib/ui/uikit/dist/index.js +78 -80
  24. package/dist/lib/ui/uikit/dist/index.js.map +1 -1
  25. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/rgb.js +7 -7
  26. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/rgb.js.map +1 -1
  27. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/string.js +9 -9
  28. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/string.js.map +1 -1
  29. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/index.js +51 -55
  30. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/index.js.map +1 -1
  31. package/package.json +6 -6
  32. package/dist/lib/ui/uikit/dist/components/PlAccordion/ExpandTransition.vue2.js.map +0 -1
  33. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-dispatch@3.0.1/node_modules/d3-dispatch/src/dispatch.js +0 -65
  34. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-dispatch@3.0.1/node_modules/d3-dispatch/src/dispatch.js.map +0 -1
  35. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-ease@3.0.1/node_modules/d3-ease/src/cubic.js +0 -7
  36. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-ease@3.0.1/node_modules/d3-ease/src/cubic.js.map +0 -1
  37. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/decompose.js +0 -24
  38. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/decompose.js.map +0 -1
  39. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/index.js +0 -38
  40. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/index.js.map +0 -1
  41. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/parse.js +0 -14
  42. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/parse.js.map +0 -1
  43. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timeout.js +0 -11
  44. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timeout.js.map +0 -1
  45. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timer.js +0 -63
  46. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timer.js.map +0 -1
  47. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/interrupt.js +0 -19
  48. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/interrupt.js.map +0 -1
  49. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.js +0 -6
  50. package/dist/lib/ui/uikit/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
  51. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/interrupt.js +0 -10
  52. package/dist/lib/ui/uikit/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
  53. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/transition.js +0 -29
  54. package/dist/lib/ui/uikit/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
  55. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/attr.js +0 -50
  56. package/dist/lib/ui/uikit/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
  57. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/attrTween.js +0 -39
  58. package/dist/lib/ui/uikit/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
  59. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/delay.js +0 -19
  60. package/dist/lib/ui/uikit/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
  61. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/duration.js +0 -19
  62. package/dist/lib/ui/uikit/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
  63. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/ease.js +0 -15
  64. package/dist/lib/ui/uikit/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
  65. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/easeVarying.js +0 -16
  66. package/dist/lib/ui/uikit/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
  67. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/end.js +0 -17
  68. package/dist/lib/ui/uikit/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
  69. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/filter.js +0 -13
  70. package/dist/lib/ui/uikit/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
  71. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/index.js +0 -66
  72. package/dist/lib/ui/uikit/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
  73. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/interpolate.js +0 -12
  74. package/dist/lib/ui/uikit/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
  75. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/merge.js +0 -14
  76. package/dist/lib/ui/uikit/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
  77. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/on.js +0 -22
  78. package/dist/lib/ui/uikit/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
  79. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/remove.js +0 -14
  80. package/dist/lib/ui/uikit/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
  81. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/schedule.js +0 -86
  82. package/dist/lib/ui/uikit/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
  83. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/select.js +0 -15
  84. package/dist/lib/ui/uikit/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
  85. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/selectAll.js +0 -19
  86. package/dist/lib/ui/uikit/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
  87. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/selection.js +0 -9
  88. package/dist/lib/ui/uikit/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
  89. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/style.js +0 -46
  90. package/dist/lib/ui/uikit/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
  91. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/styleTween.js +0 -24
  92. package/dist/lib/ui/uikit/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
  93. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/text.js +0 -19
  94. package/dist/lib/ui/uikit/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
  95. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/textTween.js +0 -24
  96. package/dist/lib/ui/uikit/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
  97. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/transition.js +0 -20
  98. package/dist/lib/ui/uikit/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
  99. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/tween.js +0 -57
  100. package/dist/lib/ui/uikit/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
  101. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.js +0 -44
  102. package/dist/lib/ui/uikit/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
- > @platforma-sdk/ui-vue@1.41.17 type-check /home/runner/_work/platforma/platforma/sdk/ui-vue
3
+ > @platforma-sdk/ui-vue@1.41.19 type-check /home/runner/_work/platforma/platforma/sdk/ui-vue
4
4
  > vue-tsc --noEmit --project ./tsconfig.json
5
5
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @platforma-sdk/ui-vue
2
2
 
3
+ ## 1.41.19
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [e2a1629]
8
+ - @milaboratories/uikit@2.3.23
9
+
3
10
  ## 1.41.17
4
11
 
5
12
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- import { defineComponent as I, mergeModels as A, useModel as S, shallowRef as F, computed as u, effect as M, createElementBlock as w, openBlock as C, Fragment as B, createVNode as d, unref as y, normalizeClass as i, withCtx as p, createBlock as D, createCommentVNode as U } from "vue";
1
+ import { defineComponent as I, mergeModels as F, useModel as S, shallowRef as A, computed as u, effect as M, createElementBlock as w, openBlock as C, Fragment as B, createVNode as d, unref as y, normalizeClass as i, withCtx as p, createBlock as D, createCommentVNode as U } from "vue";
2
2
  import { isNil as g } from "../../../lib/util/helpers/dist/index.js";
3
3
  import "../../../lib/ui/uikit/dist/index.js";
4
4
  import { getDefaultAnnotationScript as $ } from "../utils.js";
@@ -10,7 +10,7 @@ import L from "../../../lib/ui/uikit/dist/components/PlSidebar/PlSidebarGroup.vu
10
10
  import { useConfirm as z } from "../../../lib/ui/uikit/dist/composition/useConfirm.js";
11
11
  const O = /* @__PURE__ */ I({
12
12
  __name: "PlAnnotationsModal",
13
- props: /* @__PURE__ */ A({
13
+ props: /* @__PURE__ */ F({
14
14
  columns: {},
15
15
  hasSelectedColumns: { type: Boolean },
16
16
  getValuesForSelectedColumns: { type: Function }
@@ -22,7 +22,7 @@ const O = /* @__PURE__ */ I({
22
22
  }),
23
23
  emits: ["update:annotation", "update:opened"],
24
24
  setup(m) {
25
- const e = S(m, "annotation"), n = S(m, "opened"), s = m, a = F(void 0), r = u(() => g(a.value) || g(e.value) ? void 0 : e.value.steps.find((t) => t.id === a.value)), c = u(() => e.value.isCreated === !0), v = u({
25
+ const e = S(m, "annotation"), n = S(m, "opened"), s = m, a = A(void 0), r = u(() => g(a.value) || g(e.value) ? void 0 : e.value.steps.find((t) => t.id === a.value)), c = u(() => e.value.isCreated === !0), v = u({
26
26
  get: () => !c.value && n.value,
27
27
  set: (t) => n.value = t
28
28
  }), f = u({
@@ -17,8 +17,6 @@ import "../../global/resizeObserver.js";
17
17
  import "../../layout/PlBlockPage/PlBlockPageTitleTeleportId.js";
18
18
  import "../PlSvg/registry.js";
19
19
  import "../../sdk/model/dist/index.js";
20
- import "../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.js";
21
- import "../../node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.js";
22
20
  import "../../colors/color.js";
23
21
  import "../../colors/gradient.js";
24
22
  (function() {
@@ -75,7 +73,7 @@ import "../../colors/gradient.js";
75
73
  const q = { class: "command-menu__container" }, _ = {
76
74
  key: 0,
77
75
  class: "table-body__no-data"
78
- }, $ = { class: "carets" }, YA = /* @__PURE__ */ H({
76
+ }, $ = { class: "carets" }, MA = /* @__PURE__ */ H({
79
77
  __name: "TableComponent",
80
78
  props: {
81
79
  settings: {}
@@ -172,6 +170,6 @@ const q = { class: "command-menu__container" }, _ = {
172
170
  }
173
171
  });
174
172
  export {
175
- YA as default
173
+ MA as default
176
174
  };
177
175
  //# sourceMappingURL=TableComponent.vue.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TableComponent.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"TableComponent.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import a from "./TableComponent.vue.js";
2
2
  import { h as s, computed as o, unref as n, reactive as f } from "vue";
3
3
  import { RawData as m } from "./adapters/RawData.js";
4
- import { AsyncData as h } from "./adapters/AsyncData.js";
4
+ import { AsyncData as d } from "./adapters/AsyncData.js";
5
5
  function y(t) {
6
6
  return Object.freeze(t);
7
7
  }
@@ -28,7 +28,7 @@ function v(t, r) {
28
28
  return o(() => s(a, c));
29
29
  }
30
30
  export {
31
- h as AsyncData,
31
+ d as AsyncData,
32
32
  a as Component,
33
33
  D as factory,
34
34
  u as rawDataSettings,
@@ -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":["../../../../../../../../../lib/ui/uikit/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":";;;;AACMA,UAAAA,IAAU,CAACC,MAAgB;AAC5BA,QAAA,UAAU,IAAI,qBAAqB,GACrCA,EAAmB,MAAM,YAAY,sBAAsBA,EAAG,eAAe,IAAI;AAAA,IAAA,GAG9EC,IAAU,CAACD,MAAgB;AAC9BA,QAAmB,MAAM,eAAe,oBAAoB,GAC1DA,EAAA,UAAU,OAAO,qBAAqB;AAAA,IAC3C;;;;;;;;;;;;;;;"}
@@ -2,7 +2,7 @@ import { defineComponent as x, mergeModels as g, inject as d, toRef as u, useMod
2
2
  import { uniqueId as w } from "../../lib/util/helpers/dist/index.js";
3
3
  import B from "../PlIcon16/PlIcon16.vue.js";
4
4
  import N from "../PlSectionSeparator/PlSectionSeparator.vue.js";
5
- import _ from "./ExpandTransition.vue2.js";
5
+ import _ from "./ExpandTransition.vue.js";
6
6
  (function() {
7
7
  try {
8
8
  if (typeof document < "u") {
@@ -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 c from "../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selectAll.js";
4
2
  import { axisLeft as f, axisBottom as l } from "../../node_modules/.pnpm/d3-axis@3.0.0/node_modules/d3-axis/src/axis.js";
5
- function g(t, i, r, s) {
6
- const { width: o, height: a } = i;
7
- function n() {
3
+ function d(t, i, r, s) {
4
+ const { width: n, height: a } = i;
5
+ function e() {
8
6
  return f(r.y).ticks(6);
9
7
  }
10
- function e() {
8
+ function o() {
11
9
  return s(l(r.x));
12
10
  }
13
- t.append("g").attr("class", "grid").attr("font-family", "'Manrope', sans-serif").call(n().tickSize(-o).tickFormat(() => "")), t.append("g").attr("class", "grid").attr("font-family", "'Manrope', sans-serif").attr("transform", `translate(0,${a})`).call(e().tickSize(-a).tickFormat(() => "")), c(".grid line").style("stroke", "#E1E3EB").style("opacity", 0.7);
11
+ t.append("g").attr("class", "grid").attr("font-family", "'Manrope', sans-serif").call(e().tickSize(-n).tickFormat(() => "")), t.append("g").attr("class", "grid").attr("font-family", "'Manrope', sans-serif").attr("transform", `translate(0,${a})`).call(o().tickSize(-a).tickFormat(() => "")), c(".grid line").style("stroke", "#E1E3EB").style("opacity", 0.7);
14
12
  }
15
13
  export {
16
- g as createGridlines
14
+ d as createGridlines
17
15
  };
18
16
  //# sourceMappingURL=createGridlines.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createGridlines.js","sources":["../../../../../../../../../lib/ui/uikit/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,EAAWJ,IAAAA;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;AAGnCF,IAAA,OAAO,GAAG,EACX,KAAK,SAAS,MAAM,EACpB,KAAK,eAAe,uBAAyB,EAC7C,KAAKM,EACH,EAAA,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":["../../../../../../../../../lib/ui/uikit/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,EAAWJ,IAAAA;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;AAGhCF,IAAA,OAAO,GAAG,EACX,KAAK,SAAS,MAAM,EACpB,KAAK,eAAe,uBAAyB,EAC7C,KAAKM,EACH,EAAA,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 +1 @@
1
- {"version":3,"file":"createLabels.js","sources":["../../../../../../../../../lib/ui/uikit/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,EAAYN,IAAAA;AAE/DM,EAAAA,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":["../../../../../../../../../lib/ui/uikit/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,EAAYN,IAAAA;AAE/DM,EAAAA,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,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 n from "../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/select.js";
4
- function l(r, i) {
5
- const { width: o, height: e, margin: t, compact: a } = i;
6
- return r.replaceChildren(), a && (r.style.height = e + "px", r.style.lineHeight = e + "px"), n(r).append("svg").attr("width", o + t.left + t.right).attr("height", e + t.top + t.bottom).append("g").attr("transform", `translate(${t.left},${t.top})`);
1
+ import h from "../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/select.js";
2
+ function p(r, a) {
3
+ const { width: n, height: e, margin: t, compact: i } = a;
4
+ return r.replaceChildren(), i && (r.style.height = e + "px", r.style.lineHeight = e + "px"), h(r).append("svg").attr("width", n + t.left + t.right).attr("height", e + t.top + t.bottom).append("g").attr("transform", `translate(${t.left},${t.top})`);
7
5
  }
8
6
  export {
9
- l as createSvgContainer
7
+ p as createSvgContainer
10
8
  };
11
9
  //# sourceMappingURL=createSvgContainer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createSvgContainer.js","sources":["../../../../../../../../../lib/ui/uikit/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;AACnE,QAAA,EAAE,OAAAC,GAAO,QAAAC,GAAQ,QAAAC,GAAQ,SAAAC,EAAAA,IAAYJ;AAE3CD,SAAAA,EAAG,mBAECK,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":["../../../../../../../../../lib/ui/uikit/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;AACnE,QAAA,EAAE,OAAAC,GAAO,QAAAC,GAAQ,QAAAC,GAAQ,SAAAC,EAAAA,IAAYJ;AAE3CD,SAAAA,EAAG,mBAECK,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,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 c from "../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/select.js";
4
- function g(l, n, r, a) {
5
- const { height: p } = r, { x: e, y: s } = a, i = c("body").append("div").attr("class", "svg-tooltip").style("position", "absolute").style("visibility", "hidden"), x = function(t, o) {
2
+ function f(l, n, a, r) {
3
+ const { height: p } = a, { x: e, y: s } = r, i = c("body").append("div").attr("class", "svg-tooltip").style("position", "absolute").style("visibility", "hidden"), x = function(t, o) {
6
4
  i.style("visibility", "visible").text(`count: ${o.length}
7
5
  x0: ${o.x0}
8
6
  x1: ${o.x1}`);
@@ -16,6 +14,6 @@ x1: ${o.x1}`);
16
14
  `);
17
15
  }
18
16
  export {
19
- g as drawBins
17
+ f as drawBins
20
18
  };
21
19
  //# sourceMappingURL=drawBins.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"drawBins.js","sources":["../../../../../../../../../lib/ui/uikit/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,EAAWF,IAAAA,GAEb,EAAE,GAAAG,GAAG,GAAAC,EAAAA,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;AAC1DJ,IAAAA,EACG,MAAM,cAAc,SAAS,EAC7B,KAAK,UAAUI,EAAE,MAAM;AAAA,MAASA,EAAE,EAAE;AAAA,MAASA,EAAE,EAAE,EAAE;AAAA,EAAA,GAGlDC,IAAY,SAAUC,GAAmB;AAC7CN,IAAAA,EACG,MAAM,OAAOM,EAAM,QAAQ,KAAK,IAAI,EACpC,MAAM,QAAQA,EAAM,QAAQ,KAAK,IAAI;AAAA,EAC1C,GAEMC,IAAW,WAAY;AACnBP,IAAAA,EAAA,MAAM,cAAc,QAAQ;AAAA,EACtC;AAGAP,EAAAA,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":["../../../../../../../../../lib/ui/uikit/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,EAAWF,IAAAA,GAEb,EAAE,GAAAG,GAAG,GAAAC,EAAAA,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;AAC1DJ,IAAAA,EACG,MAAM,cAAc,SAAS,EAC7B,KAAK,UAAUI,EAAE,MAAM;AAAA,MAASA,EAAE,EAAE;AAAA,MAASA,EAAE,EAAE,EAAE;AAAA,EAAA,GAGlDC,IAAY,SAAUC,GAAmB;AAC7CN,IAAAA,EACG,MAAM,OAAOM,EAAM,QAAQ,KAAK,IAAI,EACpC,MAAM,QAAQA,EAAM,QAAQ,KAAK,IAAI;AAAA,EAC1C,GAEMC,IAAW,WAAY;AACnBP,IAAAA,EAAA,MAAM,cAAc,QAAQ;AAAA,EACtC;AAGAP,EAAAA,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,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
- import { createSvgContainer as x } from "./createSvgContainer.js";
4
- import { drawBins as y } from "./drawBins.js";
5
- import { createGridlines as $ } from "./createGridlines.js";
1
+ import { createSvgContainer as $ } from "./createSvgContainer.js";
2
+ import { drawBins as x } from "./drawBins.js";
3
+ import { createGridlines as y } from "./createGridlines.js";
6
4
  import { logspace as b } from "./logspace.js";
7
5
  import { createLabels as k } from "./createLabels.js";
8
6
  import { drawThreshold as u } from "./drawThreshold.js";
@@ -10,30 +8,30 @@ import { normalizeBins as z } 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 p 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 B, axisLeft as S } from "../../node_modules/.pnpm/d3-axis@3.0.0/node_modules/d3-axis/src/axis.js";
13
12
  import q 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 B, axisLeft as S } from "../../node_modules/.pnpm/d3-axis@3.0.0/node_modules/d3-axis/src/axis.js";
16
- const L = (e, i) => e.append("g").style("font-size", "14px").style("font-weight", "500").attr("transform", `translate(0,${i})`), M = (e) => e.append("g").style("font-size", "14px").style("font-weight", "500"), V = (e, i) => C().domain([0, p(e, (r) => r.length)]).range([i, 0]);
17
- function Q(e, i, r) {
18
- const { width: h, height: l, nBins: s = 10 } = i, o = x(e, i), f = w(r), c = p(r), t = C().domain([f, c]).range([0, h]), m = z(q().domain(t.domain()).thresholds(t.ticks(s))(r)), n = V(m, l);
19
- $(o, i, { x: t, y: n }, (a) => a.ticks(6)), y(o, m, i, { x: t, y: n }), u(o, { x: t, y: n }, i), L(o, l).call(B(t).tickSize(0)), M(o).call(S(n).tickSize(0)), k(o, i);
14
+ const L = (t, i) => t.append("g").style("font-size", "14px").style("font-weight", "500").attr("transform", `translate(0,${i})`), M = (t) => t.append("g").style("font-size", "14px").style("font-weight", "500"), V = (t, i) => C().domain([0, p(t, (r) => r.length)]).range([i, 0]);
15
+ function O(t, i, r) {
16
+ const { width: h, height: l, nBins: s = 10 } = i, o = $(t, i), f = w(r), c = p(r), a = C().domain([f, c]).range([0, h]), m = z(q().domain(a.domain()).thresholds(a.ticks(s))(r)), n = V(m, l);
17
+ y(o, i, { x: a, y: n }, (e) => e.ticks(6)), x(o, m, i, { x: a, y: n }), u(o, { x: a, y: n }, i), L(o, l).call(B(a).tickSize(0)), M(o).call(S(n).tickSize(0)), k(o, i);
20
18
  }
21
- function R(e, i, r) {
22
- const { width: h, height: l, nBins: s = 10 } = i, o = x(e, i), f = w(r), c = p(r), t = F().domain([f, c]).range([0, h]).nice(), m = (g) => {
19
+ function P(t, i, r) {
20
+ const { width: h, height: l, nBins: s = 10 } = i, o = $(t, i), f = w(r), c = p(r), a = F().domain([f, c]).range([0, h]).nice(), m = (g) => {
23
21
  const H = [];
24
22
  for (let d = 0; d <= g; d++)
25
- H.push(Number(t.invert(h * (d / g)).toFixed(2)));
23
+ H.push(Number(a.invert(h * (d / g)).toFixed(2)));
26
24
  return H;
27
- }, n = z(q().domain(t.domain()).thresholds(m(s))(r)), a = V(n, l), v = b(0, Math.ceil(Math.log10(c)), 6);
28
- $(o, i, { x: t, y: a }, (g) => g.tickValues(v)), y(o, n, i, { x: t, y: a }), u(o, { x: t, y: a }, i), L(o, l).call(B(t).tickValues(v).tickSize(0)), M(o).call(S(a).tickSize(0)), k(o, i);
25
+ }, n = z(q().domain(a.domain()).thresholds(m(s))(r)), e = V(n, l), v = b(0, Math.ceil(Math.log10(c)), 6);
26
+ y(o, i, { x: a, y: e }, (g) => g.tickValues(v)), x(o, n, i, { x: a, y: e }), u(o, { x: a, y: e }, i), L(o, l).call(B(a).tickValues(v).tickSize(0)), M(o).call(S(e).tickSize(0)), k(o, i);
29
27
  }
30
- function Y(e, i, r) {
31
- const { width: h, height: l } = i, s = x(e, i), o = z(r), f = w(o, (a) => a.x0), c = p(o, (a) => a.x1), t = F().domain([f, c]).range([0, h]).nice(), m = V(o, l), n = b(0, Math.ceil(Math.log10(c)), 6);
32
- $(s, i, { x: t, y: m }, (a) => a.tickValues(n)), y(s, o, i, { x: t, y: m }), u(s, { x: t, y: m }, i), L(s, l).call(B(t).tickValues(n).tickSize(0)), M(s).call(S(m).tickSize(0)), k(s, i);
28
+ function W(t, i, r) {
29
+ const { width: h, height: l } = i, s = $(t, i), o = z(r), f = w(o, (e) => e.x0), c = p(o, (e) => e.x1), a = F().domain([f, c]).range([0, h]).nice(), m = V(o, l), n = b(0, Math.ceil(Math.log10(c)), 6);
30
+ y(s, i, { x: a, y: m }, (e) => e.tickValues(n)), x(s, o, i, { x: a, y: m }), u(s, { x: a, y: m }, i), L(s, l).call(B(a).tickValues(n).tickSize(0)), M(s).call(S(m).tickSize(0)), k(s, i);
33
31
  }
34
32
  export {
35
- Y as createHistogramFromBins,
36
- Q as createHistogramLinear,
37
- R as createHistogramLog
33
+ W as createHistogramFromBins,
34
+ O as createHistogramLinear,
35
+ P as createHistogramLog
38
36
  };
39
37
  //# sourceMappingURL=histogram.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"histogram.js","sources":["../../../../../../../../../lib/ui/uikit/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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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,OAAO,GAAG,EAClB,MAAM,aAAa,MAAM,EACzB,MAAM,eAAe,KAAK,EAC1B,KAAK,aAAa,eAAeC,CAAM,GAAG,GAGzCC,IAAK,CAACF,MACHA,EAAI,OAAO,GAAG,EAClB,MAAM,aAAa,MAAM,EACzB,MAAM,eAAe,KAAK,GAGzBG,IAAe,CAACC,GAAiBH,MAC9BI,EACJ,EAAA,OAAO,CAAC,GAAGC,EAAMF,GAAM,CAACG,MAAMA,EAAE,MAAM,CAAE,CAAC,EACzC,MAAM,CAACN,GAAQ,CAAC,CAAC;AAGN,SAAAO,EAAsBC,GAAiBC,GAAuBC,GAAgB;AACtF,QAAA,EAAE,OAAAC,GAAO,QAAAX,GAAQ,OAAAY,IAAQ,GAAO,IAAAH,GAEhCV,IAAMc,EAAmBL,GAAIC,CAAO,GAEpCK,IAAMC,EAAML,CAAI,GAChBM,IAAMX,EAAMK,CAAI,GAEhBO,IAAIb,EAAAA,EACP,OAAO,CAACU,GAAKE,CAAG,CAAC,EACjB,MAAM,CAAC,GAAGL,CAAK,CAAC,GAEbR,IAAkBe,EAAcC,EACnC,EAAA,OAAOF,EAAE,OAA4B,CAAA,EACrC,WAAWA,EAAE,MAAML,CAAK,CAAC,EAAEF,CAAI,CAAC,GAE7BU,IAAIlB,EAAaC,GAAMH,CAAM;AAEnBqB,EAAAA,EAAAtB,GAAKU,GAAS,EAAE,GAAAQ,GAAG,GAAAG,EAAAA,GAAK,CAACH,MAAMA,EAAE,MAAM,CAAC,CAAC,GAEzDK,EAASvB,GAAKI,GAAMM,GAAS,EAAE,GAAAQ,GAAG,GAAAG,EAAAA,CAAG,GAErCG,EAAcxB,GAAK,EAAE,GAAAkB,GAAG,GAAAG,EAAAA,GAAKX,CAAO,GAEjCX,EAAAC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uikit/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,EAAA,IAIR;AAAA,IACL,IAAIA,EAAG;AAAA,IACP,IAAIA,EAAG;AAAA,IACP,QAAQA,EAAG;AAAA,EAAA,CAEd;AACH;"}
1
+ {"version":3,"file":"normalizeBins.js","sources":["../../../../../../../../../lib/ui/uikit/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,EAAA,IAIR;AAAA,IACL,IAAIA,EAAG;AAAA,IACP,IAAIA,EAAG;AAAA,IACP,QAAQA,EAAG;AAAA,EAAA,CAEd;AACH;"}
@@ -8,8 +8,6 @@ import "../../layout/PlBlockPage/PlBlockPageTitleTeleportId.js";
8
8
  import "../PlSvg/registry.js";
9
9
  import "../../sdk/model/dist/index.js";
10
10
  import { defaultProps as f } from "./props.js";
11
- import "../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.js";
12
- import "../../node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.js";
13
11
  import "../../colors/color.js";
14
12
  import "../../colors/gradient.js";
15
13
  (function() {
@@ -66,7 +64,7 @@ import "../../colors/gradient.js";
66
64
  const U = {
67
65
  name: "PlPureSlideModal",
68
66
  inheritAttrs: !1
69
- }, y = /* @__PURE__ */ l({
67
+ }, T = /* @__PURE__ */ l({
70
68
  ...U,
71
69
  props: /* @__PURE__ */ I({
72
70
  modelValue: { type: Boolean },
@@ -111,6 +109,6 @@ const U = {
111
109
  }
112
110
  });
113
111
  export {
114
- y as default
112
+ T as default
115
113
  };
116
114
  //# sourceMappingURL=PlPureSlideModal.vue.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlPureSlideModal.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"PlPureSlideModal.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}