@platforma-sdk/ui-vue 1.41.13 → 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 (104) hide show
  1. package/.turbo/turbo-build.log +29 -64
  2. package/.turbo/turbo-type-check.log +1 -1
  3. package/CHANGELOG.md +14 -0
  4. package/dist/components/PlAnnotations/components/PlAnnotationsModal.vue2.js +3 -3
  5. package/dist/lib/ui/uikit/dist/components/DataTable/TableComponent.vue.js +3 -5
  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/PlFileInput/PlFileInput.vue.js +11 -11
  22. package/dist/lib/ui/uikit/dist/components/PlFileInput/PlFileInput.vue.js.map +1 -1
  23. package/dist/lib/ui/uikit/dist/components/PlSlideModal/PlPureSlideModal.vue.js +3 -5
  24. package/dist/lib/ui/uikit/dist/components/PlSlideModal/PlPureSlideModal.vue.js.map +1 -1
  25. package/dist/lib/ui/uikit/dist/index.js +78 -80
  26. package/dist/lib/ui/uikit/dist/index.js.map +1 -1
  27. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/rgb.js +7 -7
  28. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/rgb.js.map +1 -1
  29. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/string.js +9 -9
  30. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/string.js.map +1 -1
  31. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/index.js +51 -55
  32. 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
  33. package/package.json +4 -4
  34. package/dist/lib/ui/uikit/dist/components/PlAccordion/ExpandTransition.vue2.js.map +0 -1
  35. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-dispatch@3.0.1/node_modules/d3-dispatch/src/dispatch.js +0 -65
  36. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-dispatch@3.0.1/node_modules/d3-dispatch/src/dispatch.js.map +0 -1
  37. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-ease@3.0.1/node_modules/d3-ease/src/cubic.js +0 -7
  38. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-ease@3.0.1/node_modules/d3-ease/src/cubic.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/decompose.js +0 -24
  40. 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
  41. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/index.js +0 -38
  42. 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
  43. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/parse.js +0 -14
  44. 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
  45. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timeout.js +0 -11
  46. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timeout.js.map +0 -1
  47. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timer.js +0 -63
  48. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timer.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/interrupt.js +0 -19
  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/interrupt.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/index.js +0 -6
  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/index.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/interrupt.js +0 -10
  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/interrupt.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/selection/transition.js +0 -29
  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/selection/transition.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/attr.js +0 -50
  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/attr.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/attrTween.js +0 -39
  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/attrTween.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/delay.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/delay.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/duration.js +0 -19
  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/duration.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/ease.js +0 -15
  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/ease.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/easeVarying.js +0 -16
  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/easeVarying.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/end.js +0 -17
  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/end.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/filter.js +0 -13
  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/filter.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/index.js +0 -66
  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/index.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/interpolate.js +0 -12
  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/interpolate.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/merge.js +0 -14
  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/merge.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/on.js +0 -22
  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/on.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/remove.js +0 -14
  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/remove.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/schedule.js +0 -86
  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/schedule.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/select.js +0 -15
  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/select.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/selectAll.js +0 -19
  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/selectAll.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/selection.js +0 -9
  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/selection.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/style.js +0 -46
  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/style.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/styleTween.js +0 -24
  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/styleTween.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/text.js +0 -19
  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/text.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/textTween.js +0 -24
  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/textTween.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/transition.js +0 -20
  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/transition.js.map +0 -1
  101. 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
  102. 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
  103. package/dist/lib/ui/uikit/dist/node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.js +0 -44
  104. 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.13 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,19 @@
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
+
10
+ ## 1.41.17
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [093dbda]
15
+ - @milaboratories/uikit@2.3.22
16
+
3
17
  ## 1.41.13
4
18
 
5
19
  ### 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() {
@@ -65,7 +63,7 @@ import "../../colors/gradient.js";
65
63
  .ui-text-area{--contour-color: var(--txt-01);--label-color: var(--txt-01);--contour-border-width: 1px;--contour-box-shadow: none;--label-offset-left-x: 8px;--label-offset-right-x: 8px;--prefix-color: var(--color-placeholder);width:100%;min-height:var(--control-height);position:relative;border-radius:var(--border-radius-control);display:flex;flex-direction:row;align-items:center;outline:none}.ui-text-area__envelope{font-family:var(--font-family-base)}.ui-text-area textarea{min-height:calc(var(--control-height) - 2px);width:100%;padding:10px 12px;border:none;font-size:inherit;background-color:transparent;color:var(--txt-01);caret-color:var(--border-color-focus);cursor:inherit;resize:none;--thumb-color: var(--ic-02);overflow-y:auto}.ui-text-area textarea::-webkit-scrollbar{width:var(--scrollbar-width, 6px);height:5px;background-color:transparent;display:block}.ui-text-area textarea::-webkit-scrollbar-thumb{background:var(--thumb-color);border-radius:5px}.ui-text-area textarea::-webkit-scrollbar-thumb:hover{--thumb-color: var(--border-color-focus)}.ui-text-area textarea:focus{outline:none}.ui-text-area textarea::placeholder{color:var(--color-placeholder)}.ui-text-area label{display:flex;align-items:center;gap:4px;position:absolute;top:0;transform:translateY(-60%);left:var(--label-offset-left-x);padding:0 4px;max-width:calc(100% - 16px);overflow:hidden;white-space:pre;text-overflow:ellipsis;cursor:inherit;color:var(--label-color);font-size:12px;font-weight:500;border-bottom-right-radius:4px;border-bottom-left-radius:4px;background:var(--bg-elevated-01)}.ui-text-area label>span{overflow:hidden;white-space:pre;text-overflow:ellipsis}.ui-text-area__contour{position:absolute;top:0;left:0;right:0;bottom:0;border-radius:var(--border-radius-control);border-width:var(--contour-border-width);border-color:var(--contour-color);border-style:solid;box-shadow:var(--contour-box-shadow);z-index:0;pointer-events:none}.ui-text-area__append{display:flex;flex-direction:row;align-items:center;gap:4px}.ui-text-area__helper{font-size:12px;color:var(--txt-03);padding:2px 0 0;white-space:pre-wrap;text-overflow:ellipsis;font-weight:500;line-height:16px;margin-top:6px}.ui-text-area__error{font-size:12px;color:var(--txt-error);padding:2px 0 0;white-space:pre-wrap;text-overflow:ellipsis;font-weight:500;line-height:16px;margin-top:6px}.ui-text-area:hover{--contour-color: var(--control-hover-color)}.ui-text-area:focus-within:not(.error){--label-color: var(--txt-focus);--contour-color: var(--border-color-focus);--contour-border-width: 2px;--contour-box-shadow: 0 0 0 4px var(--border-color-focus-shadow)}.ui-text-area:focus-within.error{--contour-border-width: 2px;--contour-box-shadow: 0 0 0 4px var(--color-error-shadow)}.ui-text-area.dashed .ui-text-area__contour{border-style:dashed}.ui-text-area.nonEmpty{--prefix-color: var(--txt-01)}.ui-text-area.error{--contour-color: var(--txt-error)}.ui-text-area.disabled{--contour-color: var(--color-dis-01);cursor:not-allowed;pointer-events:none}.ui-text-area.disabled *{color:var(--contour-color)}
66
64
  .pl-text-field{--pl-text-field-text-color: var(--txt-01);--contour-color: var(--txt-01);--label-color: var(--txt-01);--contour-border-width: 1px;--contour-box-shadow: none;--label-offset-left-x: 8px;--label-offset-right-x: 8px;--prefix-color: var(--color-placeholder);--show-clearable: none;width:100%;min-width:160px;min-height:var(--control-height);position:relative;border-radius:var(--border-radius-control);display:flex;flex-direction:row;align-items:center;outline:none}.pl-text-field__envelope{font-family:var(--font-family-base)}.pl-text-field input{font-family:var(--font-family-base);font-weight:500;min-height:calc(var(--control-height) - 2px);line-height:20px;width:100%;padding:0 12px;border:none;font-size:inherit;background-color:transparent;color:var(--pl-text-field-text-color);caret-color:var(--border-color-focus);cursor:inherit}.pl-text-field input:focus{outline:none}.pl-text-field input::placeholder{color:var(--color-placeholder)}.pl-text-field label{display:flex;align-items:center;gap:4px;position:absolute;top:0;transform:translateY(-60%);left:var(--label-offset-left-x);padding:0 4px;max-width:calc(100% - 16px);overflow:hidden;white-space:pre;text-overflow:ellipsis;cursor:inherit;color:var(--label-color);font-size:12px;font-weight:500;border-bottom-right-radius:4px;border-bottom-left-radius:4px;background:var(--bg-elevated-01)}.pl-text-field label>span{overflow:hidden;white-space:pre;text-overflow:ellipsis}.pl-text-field__contour{position:absolute;top:0;left:0;right:0;bottom:0;border-radius:var(--border-radius-control);border-width:var(--contour-border-width);border-color:var(--contour-color);border-style:solid;box-shadow:var(--contour-box-shadow);z-index:0;pointer-events:none}.pl-text-field__prefix{padding-left:12px;white-space:nowrap;margin-right:-12px;color:var(--prefix-color)}.pl-text-field__append{padding-right:12px;display:flex;flex-direction:row;align-items:center;gap:4px;cursor:text}.pl-text-field__append .icon-16{cursor:pointer}.pl-text-field__append .mask-16{--icon-color: var(--control-mask-fill);cursor:pointer}.pl-text-field__clearable{display:var(--show-clearable)!important;--icon-color: var(--ic-02) !important}.pl-text-field__helper{font-size:12px;color:var(--txt-03);padding:2px 0 0;white-space:pre-wrap;text-overflow:ellipsis;font-weight:500;line-height:16px;margin-top:6px}.pl-text-field__error{font-size:12px;color:var(--txt-error);padding:2px 0 0;white-space:pre-wrap;text-overflow:ellipsis;font-weight:500;line-height:16px;margin-top:6px}.pl-text-field:hover{--contour-color: var(--control-hover-color);--show-clearable: inline-block}.pl-text-field:focus-within{--show-clearable: inline-block}.pl-text-field:focus-within:not(.error){--label-color: var(--txt-focus);--contour-color: var(--border-color-focus);--contour-border-width: 2px;--contour-box-shadow: 0 0 0 4px var(--border-color-focus-shadow)}.pl-text-field:focus-within.error{--contour-border-width: 2px;--contour-box-shadow: 0 0 0 4px var(--color-error-shadow)}.pl-text-field.dashed .pl-text-field__contour{border-style:dashed}.pl-text-field.nonEmpty{--prefix-color: var(--txt-01)}.pl-text-field.error{--contour-color: var(--txt-error);--label-color: var(--txt-error)}.pl-text-field.disabled{--contour-color: var(--color-dis-01);--label-color: var(--dis-01);--pl-text-field-text-color: var(--dis-01);--mask-icon-bg-color: var(--dis-01);cursor:not-allowed}
67
65
  .ui-toggle-switch{--handle-ml: 0;--body-bg: var(--bg-base-light);--body-shadow: var(--btn-group-shape-shadow);display:flex;align-items:center;gap:12px;outline:none}.ui-toggle-switch__body{width:40px;height:24px;display:flex;padding:5px;border-radius:12px;border:1px solid var(--color-ic-01);box-shadow:var(--body-shadow);background:var(--body-bg);cursor:pointer}.ui-toggle-switch__handle{width:12px;height:12px;border-radius:12px;border:1px solid var(--color-ic-01);background:var(--color-ic-00);margin-left:var(--handle-ml)}.ui-toggle-switch.active{--body-bg: var(--btn-switcher-bg);--handle-ml: auto}.ui-toggle-switch:focus-visible{--label-color: var(--txt-focus);--body-shadow: var(--btn-group-shape-shadow), 0 0 0 2px #fff, 0 0 0 4px var(--border-color-focus)}
68
- .pl-file-input{--contour-color: var(--txt-01);--label-color: var(--txt-01);--text-color: var(--txt-01);--contour-border-width: 1px;--contour-box-shadow: none;--label-offset-left-x: 8px;--label-offset-right-x: 8px;--prefix-color: var(--color-placeholder);--contour-offset: 2px;--icon-color: #000;width:100%;height:var(--control-height, 40px);position:relative;border-radius:var(--border-radius-control);display:flex;flex-direction:row;align-items:center;outline:none;padding:0 8px;gap:8px;cursor:pointer}.pl-file-input__envelope{font-family:var(--font-family-base);display:flex;flex-direction:column;min-width:160px}.pl-file-input .mask-24{display:block;min-width:24px}.pl-file-input .mask-close{cursor:pointer}.pl-file-input__progress{position:absolute;top:0;bottom:0;left:0;right:0;background:linear-gradient(90deg,#fff,#d8fac8);pointer-events:none;width:0}.pl-file-input__clear{--icon-color: var(--ic-02)}.pl-file-input__filename{width:100%;border:none;font-size:inherit;background-color:transparent;color:var(--text-color);caret-color:var(--border-color-focus);z-index:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:18px}.pl-file-input__filename:empty:before{color:var(--color-placeholder);content:attr(data-placeholder);color:var(--txt-03);font-size:14px;font-weight:500;line-height:20px}.pl-file-input__stats{white-space:nowrap;z-index:1;font-size:11px;font-weight:600;letter-spacing:.44px;text-transform:uppercase;color:var(--txt-03)}.pl-file-input label{display:flex;align-items:center;gap:4px;position:absolute;top:0;transform:translateY(-60%);left:var(--label-offset-left-x);padding:0 4px;max-width:calc(100% - 16px);overflow:hidden;white-space:pre;text-overflow:ellipsis;cursor:inherit;color:var(--label-color);font-size:12px;font-weight:500;border-bottom-right-radius:4px;border-bottom-left-radius:4px;background:var(--bg-elevated-01)}.pl-file-input label>span{overflow:hidden;white-space:pre;text-overflow:ellipsis}.pl-file-input__contour{position:absolute;top:0;left:0;right:0;bottom:0;border-radius:var(--border-radius-control);border-width:var(--contour-border-width);border-color:var(--contour-color);border-style:solid;box-shadow:var(--contour-box-shadow);z-index:0;pointer-events:none}.pl-file-input__prefix{padding-left:12px;white-space:nowrap;margin-right:-12px;color:var(--prefix-color)}.pl-file-input__helper{font-size:12px;color:var(--txt-03);padding:2px 0 0;white-space:pre-wrap;text-overflow:ellipsis;font-weight:500;line-height:16px;margin-top:6px}.pl-file-input__error{font-size:12px;color:var(--txt-error);padding:2px 0 0;white-space:pre-wrap;text-overflow:ellipsis;font-weight:500;line-height:16px;margin-top:6px}.pl-file-input:hover{--contour-color: var(--control-hover-color)}.pl-file-input:focus-within:not(.error){--label-color: var(--txt-focus);--contour-color: var(--border-color-focus);--contour-border-width: 2px;--contour-box-shadow: 0 0 0 4px var(--border-color-focus-shadow)}.pl-file-input:focus-within.error{--contour-border-width: 2px;--contour-box-shadow: 0 0 0 4px var(--color-error-shadow)}.pl-file-input.dashed .pl-file-input__contour{border-style:dashed}.pl-file-input.nonEmpty{--prefix-color: var(--txt-01)}.pl-file-input.error{--contour-color: var(--txt-error);--label-color: var(--txt-error);--text-color: var(--txt-error);--icon-color: var(--txt-error)}.pl-file-input.error .pl-file-input__progress{display:none}.pl-file-input.disabled{--contour-color: var(--color-dis-01);cursor:not-allowed}.pl-file-input__cell-style{--border-radius-control: 0px;--input-active-color: var(--bg-base-light);--border-color: var(--border-color-div-grey);background-color:var(--input-active-color);padding:4px;height:100%;position:relative}.pl-file-input__cell-style .mask-paper-clip{display:none}.pl-file-input__cell-style .pl-file-input{height:100%!important;position:unset}.pl-file-input__cell-style .pl-file-input .double-contour{top:2px;right:2px;bottom:2px;left:2px}.pl-file-input__cell-style .pl-file-input__contour{border-width:1px;box-shadow:unset!important;border-color:var(--border-color);border-style:dashed}.pl-file-input__cell-style .pl-file-input__filename{text-align:center!important}.pl-file-input__cell-style .pl-file-input__error{margin-top:0;margin-right:8px}.pl-file-input__cell-style:hover{--border-color: var(--border-color-focus);background-color:#d9f8ca}.pl-file-input__cell-style:hover .pl-file-input__filename:before{color:#110529!important}.pl-file-input__cell-style.has-file:hover{background-color:var(--input-active-color)}.pl-file-input__cell-style.has-file{padding-left:0;padding-right:0}.pl-file-input__cell-style.has-file .pl-file-input__contour{border:unset}.pl-file-input__cell-style.has-file .pl-file-input__filename{text-align:left!important}.pl-file-input__cell-style.has-file .mask-paper-clip{display:block}
66
+ .pl-file-input{--contour-color: var(--txt-01);--label-color: var(--txt-01);--text-color: var(--txt-01);--contour-border-width: 1px;--contour-box-shadow: none;--label-offset-left-x: 8px;--label-offset-right-x: 8px;--prefix-color: var(--color-placeholder);--contour-offset: 2px;--icon-color: #000;position:relative;z-index:0;width:100%;height:var(--control-height, 40px);border-radius:var(--border-radius-control);display:flex;flex-direction:row;align-items:center;outline:none;padding:0 8px;gap:8px;cursor:pointer}.pl-file-input__envelope{font-family:var(--font-family-base);display:flex;flex-direction:column;min-width:160px}.pl-file-input .mask-24{display:block;min-width:24px}.pl-file-input .mask-close{cursor:pointer}.pl-file-input__progress{position:absolute;z-index:-1;top:0;bottom:0;left:0;right:0;background:linear-gradient(90deg,#fff,#d8fac8);pointer-events:none;width:0}.pl-file-input__clear{--icon-color: var(--ic-02)}.pl-file-input__filename{width:100%;border:none;font-size:inherit;background-color:transparent;color:var(--text-color);caret-color:var(--border-color-focus);z-index:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:18px}.pl-file-input__filename:empty:before{color:var(--color-placeholder);content:attr(data-placeholder);color:var(--txt-03);font-size:14px;font-weight:500;line-height:20px}.pl-file-input__stats{white-space:nowrap;z-index:1;font-size:11px;font-weight:600;letter-spacing:.44px;text-transform:uppercase;color:var(--txt-03)}.pl-file-input label{display:flex;align-items:center;gap:4px;position:absolute;top:0;transform:translateY(-60%);left:var(--label-offset-left-x);padding:0 4px;max-width:calc(100% - 16px);overflow:hidden;white-space:pre;text-overflow:ellipsis;cursor:inherit;color:var(--label-color);font-size:12px;font-weight:500;border-bottom-right-radius:4px;border-bottom-left-radius:4px;background:var(--bg-elevated-01)}.pl-file-input label>span{overflow:hidden;white-space:pre;text-overflow:ellipsis}.pl-file-input__contour{position:absolute;top:0;left:0;right:0;bottom:0;border-radius:var(--border-radius-control);border-width:var(--contour-border-width);border-color:var(--contour-color);border-style:solid;box-shadow:var(--contour-box-shadow);z-index:0;pointer-events:none}.pl-file-input__prefix{padding-left:12px;white-space:nowrap;margin-right:-12px;color:var(--prefix-color)}.pl-file-input__helper{font-size:12px;color:var(--txt-03);padding:2px 0 0;white-space:pre-wrap;text-overflow:ellipsis;font-weight:500;line-height:16px;margin-top:6px}.pl-file-input__error{font-size:12px;color:var(--txt-error);padding:2px 0 0;white-space:pre-wrap;text-overflow:ellipsis;font-weight:500;line-height:16px;margin-top:6px}.pl-file-input:hover{--contour-color: var(--control-hover-color)}.pl-file-input:focus-within:not(.error){--label-color: var(--txt-focus);--contour-color: var(--border-color-focus);--contour-border-width: 2px;--contour-box-shadow: 0 0 0 4px var(--border-color-focus-shadow)}.pl-file-input:focus-within.error{--contour-border-width: 2px;--contour-box-shadow: 0 0 0 4px var(--color-error-shadow)}.pl-file-input.dashed .pl-file-input__contour{border-style:dashed}.pl-file-input.nonEmpty{--prefix-color: var(--txt-01)}.pl-file-input.error{--contour-color: var(--txt-error);--label-color: var(--txt-error);--text-color: var(--txt-error);--icon-color: var(--txt-error)}.pl-file-input.error .pl-file-input__progress{display:none}.pl-file-input.disabled{--contour-color: var(--color-dis-01);cursor:not-allowed}.pl-file-input__cell-style{--border-radius-control: 0px;--input-active-color: var(--bg-base-light);--border-color: var(--border-color-div-grey);background-color:var(--input-active-color);padding:4px;height:100%;position:relative}.pl-file-input__cell-style .mask-paper-clip{display:none}.pl-file-input__cell-style .pl-file-input{height:100%!important;position:unset}.pl-file-input__cell-style .pl-file-input .double-contour{top:2px;right:2px;bottom:2px;left:2px}.pl-file-input__cell-style .pl-file-input__contour{border-width:1px;box-shadow:unset!important;border-color:var(--border-color);border-style:dashed}.pl-file-input__cell-style .pl-file-input__filename{text-align:center!important}.pl-file-input__cell-style .pl-file-input__error{margin-top:0;margin-right:8px}.pl-file-input__cell-style:hover{--border-color: var(--border-color-focus);background-color:#d9f8ca}.pl-file-input__cell-style:hover .pl-file-input__filename:before{color:#110529!important}.pl-file-input__cell-style.has-file:hover{background-color:var(--input-active-color)}.pl-file-input__cell-style.has-file{padding-left:0;padding-right:0}.pl-file-input__cell-style.has-file .pl-file-input__contour{border:unset}.pl-file-input__cell-style.has-file .pl-file-input__filename{text-align:left!important}.pl-file-input__cell-style.has-file .mask-paper-clip{display:block}
69
67
  .pl-notification-alert{padding:12px;position:relative;border-radius:6px;border:1px solid var(--border-color-default);min-height:40px;width:256px;max-height:100%;overflow:auto}.pl-notification-alert .ui-btn-ghost{position:absolute;right:0;top:0}.pl-notification-alert__close{width:32px;min-width:28px}.pl-notification-alert__close .pl-btn-ghost{position:absolute;top:0;right:0;width:40px!important;height:40px!important}.pl-notification-alert__wrapper{flex-grow:1;overflow:auto}.pl-notification-alert.neutral{background:var(--notification-neutral)}.pl-notification-alert.error{background:var(--notification-error)}.pl-notification-alert.success{background:var(--notification-success)}.pl-notification-alert.warning{background:var(--notification-warning)}`)), document.head.appendChild(w);
70
68
  }
71
69
  } catch (p) {
@@ -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","d3.scaleSymlog","createThresholds","n","res","i","tickValues","logspace","createHistogramFromBins","_bins","b"],"mappings":";;;;;;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hC,EAAAF,CAAG,EAAE,KAAK0B,EAAYL,CAAC,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,EACP,EAAA,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;AAE5CK,EAAAA,EAAAtB,GAAKU,GAAS,EAAE,GAAAQ,GAAG,GAAAG,EAAAA,GAAK,CAACH,MAAMA,EAAE,WAAWgB,CAAU,CAAC,GAEvEX,EAASvB,GAAKI,GAAMM,GAAS,EAAE,GAAAQ,GAAG,GAAAG,EAAG,CAAA,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":["../../../../../../../../../lib/ui/uikit/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"],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,GAElEhC,EAAAF,CAAG,EAAE,KAAK0B,EAASL,CAAC,EAAE,SAAS,CAAC,CAAC,GAEpCM,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,EAAMZ,GAAM,CAACkC,MAAMA,EAAE,EAAE,GAC7BrB,IAAMX,EAAMF,GAAM,CAACkC,MAAMA,EAAE,EAAE,GAE7BpB,IAAIW,EACP,EAAA,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;AAE5CK,EAAAA,EAAAtB,GAAKU,GAAS,EAAE,GAAAQ,GAAG,GAAAG,EAAAA,GAAK,CAACH,MAAMA,EAAE,WAAWgB,CAAU,CAAC,GAEvEX,EAASvB,GAAKI,GAAMM,GAAS,EAAE,GAAAQ,GAAG,GAAAG,EAAG,CAAA,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 +1 @@
1
- {"version":3,"file":"normalizeBins.js","sources":["../../../../../../../../../lib/ui/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;"}
@@ -1,19 +1,19 @@
1
1
  import { defineComponent as M, reactive as P, useSlots as j, computed as i, watch as I, ref as q, createElementBlock as n, openBlock as o, Fragment as S, createElementVNode as u, createVNode as D, normalizeClass as B, createCommentVNode as s, withModifiers as N, withKeys as H, createBlock as p, normalizeStyle as K, toDisplayString as c, unref as r, withCtx as L, renderSlot as Q, createTextVNode as R } from "vue";
2
- import U from "../PlTooltip/PlTooltip.vue.js";
3
- import Y from "../PlFileDialog/PlFileDialog.vue.js";
4
- import f from "../PlIcon24/PlIcon24.vue.js";
2
+ import { prettyBytes as x } from "../../lib/util/helpers/dist/index.js";
5
3
  import "../../sdk/model/dist/index.js";
4
+ import U from "../../generated/components/svg/images/SvgRequired.vue2.js";
5
+ import { getErrorMessage as Y } from "../../helpers/error.js";
6
6
  import A from "../../utils/DoubleContour.vue.js";
7
7
  import { useLabelNotch as G } from "../../utils/useLabelNotch.js";
8
- import { prettyBytes as x } from "../../lib/util/helpers/dist/index.js";
9
- import J from "../../generated/components/svg/images/SvgRequired.vue2.js";
10
- import { getErrorMessage as W } from "../../helpers/error.js";
8
+ import J from "../PlFileDialog/PlFileDialog.vue.js";
9
+ import f from "../PlIcon24/PlIcon24.vue.js";
10
+ import W from "../PlTooltip/PlTooltip.vue.js";
11
11
  import { getFileNameFromHandle as X, getFilePathFromHandle as Z } from "../../lib/model/common/dist/index.js";
12
12
  (function() {
13
13
  try {
14
14
  if (typeof document < "u") {
15
15
  var h = document.createElement("style");
16
- h.appendChild(document.createTextNode(".pl-file-input{--contour-color: var(--txt-01);--label-color: var(--txt-01);--text-color: var(--txt-01);--contour-border-width: 1px;--contour-box-shadow: none;--label-offset-left-x: 8px;--label-offset-right-x: 8px;--prefix-color: var(--color-placeholder);--contour-offset: 2px;--icon-color: #000;width:100%;height:var(--control-height, 40px);position:relative;border-radius:var(--border-radius-control);display:flex;flex-direction:row;align-items:center;outline:none;padding:0 8px;gap:8px;cursor:pointer}.pl-file-input__envelope{font-family:var(--font-family-base);display:flex;flex-direction:column;min-width:160px}.pl-file-input .mask-24{display:block;min-width:24px}.pl-file-input .mask-close{cursor:pointer}.pl-file-input__progress{position:absolute;top:0;bottom:0;left:0;right:0;background:linear-gradient(90deg,#fff,#d8fac8);pointer-events:none;width:0}.pl-file-input__clear{--icon-color: var(--ic-02)}.pl-file-input__filename{width:100%;border:none;font-size:inherit;background-color:transparent;color:var(--text-color);caret-color:var(--border-color-focus);z-index:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:18px}.pl-file-input__filename:empty:before{color:var(--color-placeholder);content:attr(data-placeholder);color:var(--txt-03);font-size:14px;font-weight:500;line-height:20px}.pl-file-input__stats{white-space:nowrap;z-index:1;font-size:11px;font-weight:600;letter-spacing:.44px;text-transform:uppercase;color:var(--txt-03)}.pl-file-input label{display:flex;align-items:center;gap:4px;position:absolute;top:0;transform:translateY(-60%);left:var(--label-offset-left-x);padding:0 4px;max-width:calc(100% - 16px);overflow:hidden;white-space:pre;text-overflow:ellipsis;cursor:inherit;color:var(--label-color);font-size:12px;font-weight:500;border-bottom-right-radius:4px;border-bottom-left-radius:4px;background:var(--bg-elevated-01)}.pl-file-input label>span{overflow:hidden;white-space:pre;text-overflow:ellipsis}.pl-file-input__contour{position:absolute;top:0;left:0;right:0;bottom:0;border-radius:var(--border-radius-control);border-width:var(--contour-border-width);border-color:var(--contour-color);border-style:solid;box-shadow:var(--contour-box-shadow);z-index:0;pointer-events:none}.pl-file-input__prefix{padding-left:12px;white-space:nowrap;margin-right:-12px;color:var(--prefix-color)}.pl-file-input__helper{font-size:12px;color:var(--txt-03);padding:2px 0 0;white-space:pre-wrap;text-overflow:ellipsis;font-weight:500;line-height:16px;margin-top:6px}.pl-file-input__error{font-size:12px;color:var(--txt-error);padding:2px 0 0;white-space:pre-wrap;text-overflow:ellipsis;font-weight:500;line-height:16px;margin-top:6px}.pl-file-input:hover{--contour-color: var(--control-hover-color)}.pl-file-input:focus-within:not(.error){--label-color: var(--txt-focus);--contour-color: var(--border-color-focus);--contour-border-width: 2px;--contour-box-shadow: 0 0 0 4px var(--border-color-focus-shadow)}.pl-file-input:focus-within.error{--contour-border-width: 2px;--contour-box-shadow: 0 0 0 4px var(--color-error-shadow)}.pl-file-input.dashed .pl-file-input__contour{border-style:dashed}.pl-file-input.nonEmpty{--prefix-color: var(--txt-01)}.pl-file-input.error{--contour-color: var(--txt-error);--label-color: var(--txt-error);--text-color: var(--txt-error);--icon-color: var(--txt-error)}.pl-file-input.error .pl-file-input__progress{display:none}.pl-file-input.disabled{--contour-color: var(--color-dis-01);cursor:not-allowed}.pl-file-input__cell-style{--border-radius-control: 0px;--input-active-color: var(--bg-base-light);--border-color: var(--border-color-div-grey);background-color:var(--input-active-color);padding:4px;height:100%;position:relative}.pl-file-input__cell-style .mask-paper-clip{display:none}.pl-file-input__cell-style .pl-file-input{height:100%!important;position:unset}.pl-file-input__cell-style .pl-file-input .double-contour{top:2px;right:2px;bottom:2px;left:2px}.pl-file-input__cell-style .pl-file-input__contour{border-width:1px;box-shadow:unset!important;border-color:var(--border-color);border-style:dashed}.pl-file-input__cell-style .pl-file-input__filename{text-align:center!important}.pl-file-input__cell-style .pl-file-input__error{margin-top:0;margin-right:8px}.pl-file-input__cell-style:hover{--border-color: var(--border-color-focus);background-color:#d9f8ca}.pl-file-input__cell-style:hover .pl-file-input__filename:before{color:#110529!important}.pl-file-input__cell-style.has-file:hover{background-color:var(--input-active-color)}.pl-file-input__cell-style.has-file{padding-left:0;padding-right:0}.pl-file-input__cell-style.has-file .pl-file-input__contour{border:unset}.pl-file-input__cell-style.has-file .pl-file-input__filename{text-align:left!important}.pl-file-input__cell-style.has-file .mask-paper-clip{display:block}")), document.head.appendChild(h);
16
+ h.appendChild(document.createTextNode(".pl-file-input{--contour-color: var(--txt-01);--label-color: var(--txt-01);--text-color: var(--txt-01);--contour-border-width: 1px;--contour-box-shadow: none;--label-offset-left-x: 8px;--label-offset-right-x: 8px;--prefix-color: var(--color-placeholder);--contour-offset: 2px;--icon-color: #000;position:relative;z-index:0;width:100%;height:var(--control-height, 40px);border-radius:var(--border-radius-control);display:flex;flex-direction:row;align-items:center;outline:none;padding:0 8px;gap:8px;cursor:pointer}.pl-file-input__envelope{font-family:var(--font-family-base);display:flex;flex-direction:column;min-width:160px}.pl-file-input .mask-24{display:block;min-width:24px}.pl-file-input .mask-close{cursor:pointer}.pl-file-input__progress{position:absolute;z-index:-1;top:0;bottom:0;left:0;right:0;background:linear-gradient(90deg,#fff,#d8fac8);pointer-events:none;width:0}.pl-file-input__clear{--icon-color: var(--ic-02)}.pl-file-input__filename{width:100%;border:none;font-size:inherit;background-color:transparent;color:var(--text-color);caret-color:var(--border-color-focus);z-index:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:18px}.pl-file-input__filename:empty:before{color:var(--color-placeholder);content:attr(data-placeholder);color:var(--txt-03);font-size:14px;font-weight:500;line-height:20px}.pl-file-input__stats{white-space:nowrap;z-index:1;font-size:11px;font-weight:600;letter-spacing:.44px;text-transform:uppercase;color:var(--txt-03)}.pl-file-input label{display:flex;align-items:center;gap:4px;position:absolute;top:0;transform:translateY(-60%);left:var(--label-offset-left-x);padding:0 4px;max-width:calc(100% - 16px);overflow:hidden;white-space:pre;text-overflow:ellipsis;cursor:inherit;color:var(--label-color);font-size:12px;font-weight:500;border-bottom-right-radius:4px;border-bottom-left-radius:4px;background:var(--bg-elevated-01)}.pl-file-input label>span{overflow:hidden;white-space:pre;text-overflow:ellipsis}.pl-file-input__contour{position:absolute;top:0;left:0;right:0;bottom:0;border-radius:var(--border-radius-control);border-width:var(--contour-border-width);border-color:var(--contour-color);border-style:solid;box-shadow:var(--contour-box-shadow);z-index:0;pointer-events:none}.pl-file-input__prefix{padding-left:12px;white-space:nowrap;margin-right:-12px;color:var(--prefix-color)}.pl-file-input__helper{font-size:12px;color:var(--txt-03);padding:2px 0 0;white-space:pre-wrap;text-overflow:ellipsis;font-weight:500;line-height:16px;margin-top:6px}.pl-file-input__error{font-size:12px;color:var(--txt-error);padding:2px 0 0;white-space:pre-wrap;text-overflow:ellipsis;font-weight:500;line-height:16px;margin-top:6px}.pl-file-input:hover{--contour-color: var(--control-hover-color)}.pl-file-input:focus-within:not(.error){--label-color: var(--txt-focus);--contour-color: var(--border-color-focus);--contour-border-width: 2px;--contour-box-shadow: 0 0 0 4px var(--border-color-focus-shadow)}.pl-file-input:focus-within.error{--contour-border-width: 2px;--contour-box-shadow: 0 0 0 4px var(--color-error-shadow)}.pl-file-input.dashed .pl-file-input__contour{border-style:dashed}.pl-file-input.nonEmpty{--prefix-color: var(--txt-01)}.pl-file-input.error{--contour-color: var(--txt-error);--label-color: var(--txt-error);--text-color: var(--txt-error);--icon-color: var(--txt-error)}.pl-file-input.error .pl-file-input__progress{display:none}.pl-file-input.disabled{--contour-color: var(--color-dis-01);cursor:not-allowed}.pl-file-input__cell-style{--border-radius-control: 0px;--input-active-color: var(--bg-base-light);--border-color: var(--border-color-div-grey);background-color:var(--input-active-color);padding:4px;height:100%;position:relative}.pl-file-input__cell-style .mask-paper-clip{display:none}.pl-file-input__cell-style .pl-file-input{height:100%!important;position:unset}.pl-file-input__cell-style .pl-file-input .double-contour{top:2px;right:2px;bottom:2px;left:2px}.pl-file-input__cell-style .pl-file-input__contour{border-width:1px;box-shadow:unset!important;border-color:var(--border-color);border-style:dashed}.pl-file-input__cell-style .pl-file-input__filename{text-align:center!important}.pl-file-input__cell-style .pl-file-input__error{margin-top:0;margin-right:8px}.pl-file-input__cell-style:hover{--border-color: var(--border-color-focus);background-color:#d9f8ca}.pl-file-input__cell-style:hover .pl-file-input__filename:before{color:#110529!important}.pl-file-input__cell-style.has-file:hover{background-color:var(--input-active-color)}.pl-file-input__cell-style.has-file{padding-left:0;padding-right:0}.pl-file-input__cell-style.has-file .pl-file-input__contour{border:unset}.pl-file-input__cell-style.has-file .pl-file-input__filename{text-align:left!important}.pl-file-input__cell-style.has-file .mask-paper-clip{display:block}")), document.head.appendChild(h);
17
17
  }
18
18
  } catch (v) {
19
19
  console.error("vite-plugin-css-injected-by-js", v);
@@ -59,7 +59,7 @@ const ee = {
59
59
  } catch (d) {
60
60
  return a.error = d instanceof Error ? d.message : String(d), e;
61
61
  }
62
- }, y = i(() => b(l.modelValue, X)), w = i(() => b(l.modelValue, Z)), O = i(() => l.progress && !l.progress.done), E = i(() => l.progress && l.progress.done), k = i(() => W(a.error, l.error)), m = i(() => typeof k.value == "string"), V = i(() => {
62
+ }, y = i(() => b(l.modelValue, X)), w = i(() => b(l.modelValue, Z)), O = i(() => l.progress && !l.progress.done), E = i(() => l.progress && l.progress.done), k = i(() => Y(a.error, l.error)), m = i(() => typeof k.value == "string"), V = i(() => {
63
63
  const { status: e, done: t } = l.progress ?? {};
64
64
  return !e || !e.bytesTotal ? "" : e.bytesProcessed && !t ? x(e.bytesProcessed, {}) + " / " + x(e.bytesTotal, {}) : x(e.bytesTotal, {});
65
65
  }), T = i(() => {
@@ -96,9 +96,9 @@ const ee = {
96
96
  class: "pl-file-input__progress"
97
97
  }, null, 4),
98
98
  !e.cellStyle && e.label ? (o(), n("label", ee, [
99
- e.required ? (o(), p(J, { key: 0 })) : s("", !0),
99
+ e.required ? (o(), p(U, { key: 0 })) : s("", !0),
100
100
  u("span", null, c(e.label), 1),
101
- r(_).tooltip || w.value ? (o(), p(r(U), {
101
+ r(_).tooltip || w.value ? (o(), p(r(W), {
102
102
  key: 1,
103
103
  class: "info",
104
104
  position: "top"
@@ -139,7 +139,7 @@ const ee = {
139
139
  ], 34),
140
140
  m.value ? (o(), n("div", te, c(k.value), 1)) : e.helper ? (o(), n("div", re, c(e.helper), 1)) : s("", !0)
141
141
  ], 2),
142
- D(r(Y), {
142
+ D(r(J), {
143
143
  modelValue: a.fileDialogOpen,
144
144
  "onUpdate:modelValue": t[0] || (t[0] = (d) => a.fileDialogOpen = d),
145
145
  "close-on-outside-click": e.fileDialogCloseOnOutsideClick,
@@ -1 +1 @@
1
- {"version":3,"file":"PlFileInput.vue.js","sources":["../../../../../../../../../lib/ui/uikit/src/components/PlFileInput/PlFileInput.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport './pl-file-input.scss';\nimport { PlTooltip } from '../PlTooltip';\nimport { PlFileDialog } from '../PlFileDialog';\nimport type { ImportedFiles } from '../../types';\nimport { PlMaskIcon24 } from '../PlMaskIcon24';\nimport { computed, reactive, ref, useSlots, watch } from 'vue';\nimport type { ImportFileHandle, ImportProgress } from '@platforma-sdk/model';\nimport { getFileNameFromHandle, getFilePathFromHandle } from '@platforma-sdk/model';\nimport DoubleContour from '../../utils/DoubleContour.vue';\nimport { useLabelNotch } from '../../utils/useLabelNotch';\nimport { prettyBytes } from '@milaboratories/helpers';\nimport SvgRequired from '../../generated/components/svg/images/SvgRequired.vue';\nimport { getErrorMessage } from '../../helpers/error.ts';\n\nconst data = reactive({\n fileDialogOpen: false,\n error: undefined as undefined | string,\n});\n\nconst slots = useSlots();\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', value: ImportFileHandle | undefined): void;\n}>();\n\nconst props = withDefaults(\n defineProps<{\n /**\n * The current import file handle.\n */\n modelValue: ImportFileHandle | undefined;\n /**\n * The label to display above the input field.\n */\n label?: string;\n /**\n * If `true`, the input field is marked as required.\n */\n required?: boolean;\n /**\n * If `true`, the component border is dashed.\n */\n dashed?: boolean;\n /**\n * Allowed file extensions (should start with `.`)\n */\n extensions?: string[];\n /**\n * Placeholder text\n */\n placeholder?: string;\n /**\n * Import/Upload progress\n */\n progress?: ImportProgress;\n /**\n * An error message to display below the input field.\n */\n error?: unknown;\n /**\n * A helper text to display below the input field when there are no errors.\n */\n helper?: string;\n /**\n * Remove rounded border and change styles\n */\n cellStyle?: boolean;\n /**\n * File dialog title\n */\n fileDialogTitle?: string;\n /**\n * If `true`, the file dialog window closes when clicking outside the modal area (default: `true`)\n */\n fileDialogCloseOnOutsideClick?: boolean;\n }>(),\n {\n label: undefined,\n extensions: undefined,\n fileDialogTitle: undefined,\n placeholder: undefined,\n progress: undefined,\n error: undefined,\n helper: undefined,\n cellStyle: false,\n fileDialogCloseOnOutsideClick: true,\n },\n);\n\nconst tryValue = <T extends ImportFileHandle>(v: T | undefined, cb: (v: T) => string | undefined) => {\n if (!v) {\n return undefined;\n }\n\n try {\n return cb(v);\n } catch (err) {\n data.error = err instanceof Error ? err.message : String(err);\n return v;\n }\n};\n\nconst fileName = computed(() => tryValue(props.modelValue, getFileNameFromHandle));\n\nconst filePath = computed(() => tryValue(props.modelValue, getFilePathFromHandle));\n\nconst isUploading = computed(() => props.progress && !props.progress.done);\n\nconst isUploaded = computed(() => props.progress && props.progress.done);\n\nconst computedErrorMessage = computed(() => getErrorMessage(data.error, props.error));\n\nconst hasErrors = computed(() => typeof computedErrorMessage.value === 'string');\n\nconst uploadStats = computed(() => {\n const { status, done } = props.progress ?? {};\n\n if (!status || !status.bytesTotal) {\n return '';\n }\n\n if (status.bytesProcessed && !done) {\n return prettyBytes(status.bytesProcessed, {}) + ' / ' + prettyBytes(status.bytesTotal, {});\n }\n\n return prettyBytes(status.bytesTotal, {});\n});\n\nconst progressStyle = computed(() => {\n const { progress } = props;\n\n if (!progress) {\n return {};\n }\n\n return {\n width: progress.done ? '100%' : Math.round((progress.status?.progress ?? 0) * 100) + '%',\n };\n});\n\nconst openFileDialog = () => {\n data.fileDialogOpen = true;\n};\n\nconst onImport = (v: ImportedFiles) => {\n if (v.files.length) {\n emit('update:modelValue', v.files[0]);\n }\n};\n\nconst clear = () => emit('update:modelValue', undefined);\n\nwatch(\n () => props.modelValue,\n () => (data.error = undefined),\n { immediate: true },\n);\n\nconst rootRef = ref();\n\nif (!props.cellStyle) {\n useLabelNotch(rootRef);\n}\n</script>\n\n<template>\n <div :class=\"{ 'pl-file-input__cell-style': !!cellStyle, 'has-file': !!fileName }\" class=\"pl-file-input__envelope\">\n <div\n ref=\"rootRef\"\n :class=\"{ dashed, error: hasErrors }\"\n class=\"pl-file-input\"\n tabindex=\"0\"\n @keyup.enter=\"openFileDialog\"\n @click.stop=\"openFileDialog\"\n >\n <div :style=\"progressStyle\" class=\"pl-file-input__progress\" />\n <label v-if=\"!cellStyle && label\" ref=\"label\">\n <SvgRequired v-if=\"required\" />\n <span>{{ label }}</span>\n <PlTooltip v-if=\"slots.tooltip || filePath\" class=\"info\" position=\"top\">\n <template #tooltip>\n <slot v-if=\"slots.tooltip\" name=\"tooltip\" />\n <template v-else>{{ filePath }}</template>\n </template>\n </PlTooltip>\n </label>\n <PlMaskIcon24 v-if=\"hasErrors\" name=\"restart\" />\n <PlMaskIcon24 v-else-if=\"isUploading\" name=\"cloud-upload\" />\n <PlMaskIcon24 v-else-if=\"isUploaded\" name=\"success\" />\n <PlMaskIcon24 v-else name=\"paper-clip\" />\n <div :data-placeholder=\"placeholder ?? 'Choose file'\" class=\"pl-file-input__filename\">\n {{ fileName }}\n </div>\n <div v-if=\"uploadStats\" class=\"pl-file-input__stats\">{{ uploadStats }}</div>\n <PlMaskIcon24 v-if=\"modelValue\" class=\"pl-file-input__clear\" name=\"close\" @click.stop=\"clear\" />\n <DoubleContour class=\"pl-file-input__contour\" />\n </div>\n <div v-if=\"hasErrors\" class=\"pl-file-input__error\">\n {{ computedErrorMessage }}\n </div>\n <div v-else-if=\"helper\" class=\"pl-file-input__helper\">{{ helper }}</div>\n </div>\n <PlFileDialog\n v-model=\"data.fileDialogOpen\"\n :close-on-outside-click=\"fileDialogCloseOnOutsideClick\"\n :extensions=\"extensions\"\n :title=\"fileDialogTitle\"\n @import:files=\"onImport\"\n />\n</template>\n"],"names":["N","T","K","useSlots","v","err","data","k","s","props","h","o","x","E","P","V","Y","b","status","computed","y","t","e","progress","openFileDialog","emit","clear","watch","U","useLabelNotch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAeA,MAAAA,WAAsBC,EAAA,GAAA;AAAA,UACJ,IAAAC,EAAA;AAAA,MAChB,gBAAO;AAAA,MACR,OAEaC;AAAAA,IAuEPC,CAAAA,GAAAA,IAAAA,EAAAA,GAAAA,IAAAA,GAAAA,IAAAA,GAAAA,IAAAA,CAAAA,GAAAA,MAAAA;AAID,UAAA;AACF,YAAA;AAAW,iBACJC,EAAK,CAAA;AAAA,QACZC,SAAAA;AACO,iBAAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"PlFileInput.vue.js","sources":["../../../../../../../../../lib/ui/uikit/src/components/PlFileInput/PlFileInput.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { prettyBytes } from '@milaboratories/helpers';\nimport type { ImportFileHandle, ImportProgress } from '@platforma-sdk/model';\nimport { getFileNameFromHandle, getFilePathFromHandle } from '@platforma-sdk/model';\nimport { computed, reactive, ref, useSlots, watch } from 'vue';\nimport SvgRequired from '../../generated/components/svg/images/SvgRequired.vue';\nimport { getErrorMessage } from '../../helpers/error.ts';\nimport type { ImportedFiles } from '../../types';\nimport DoubleContour from '../../utils/DoubleContour.vue';\nimport { useLabelNotch } from '../../utils/useLabelNotch';\nimport { PlFileDialog } from '../PlFileDialog';\nimport { PlMaskIcon24 } from '../PlMaskIcon24';\nimport { PlTooltip } from '../PlTooltip';\nimport './pl-file-input.scss';\n\nconst data = reactive({\n fileDialogOpen: false,\n error: undefined as undefined | string,\n});\n\nconst slots = useSlots();\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', value: ImportFileHandle | undefined): void;\n}>();\n\nconst props = withDefaults(\n defineProps<{\n /**\n * The current import file handle.\n */\n modelValue: ImportFileHandle | undefined;\n /**\n * The label to display above the input field.\n */\n label?: string;\n /**\n * If `true`, the input field is marked as required.\n */\n required?: boolean;\n /**\n * If `true`, the component border is dashed.\n */\n dashed?: boolean;\n /**\n * Allowed file extensions (should start with `.`)\n */\n extensions?: string[];\n /**\n * Placeholder text\n */\n placeholder?: string;\n /**\n * Import/Upload progress\n */\n progress?: ImportProgress;\n /**\n * An error message to display below the input field.\n */\n error?: unknown;\n /**\n * A helper text to display below the input field when there are no errors.\n */\n helper?: string;\n /**\n * Remove rounded border and change styles\n */\n cellStyle?: boolean;\n /**\n * File dialog title\n */\n fileDialogTitle?: string;\n /**\n * If `true`, the file dialog window closes when clicking outside the modal area (default: `true`)\n */\n fileDialogCloseOnOutsideClick?: boolean;\n }>(),\n {\n label: undefined,\n extensions: undefined,\n fileDialogTitle: undefined,\n placeholder: undefined,\n progress: undefined,\n error: undefined,\n helper: undefined,\n cellStyle: false,\n fileDialogCloseOnOutsideClick: true,\n },\n);\n\nconst tryValue = <T extends ImportFileHandle>(v: T | undefined, cb: (v: T) => string | undefined) => {\n if (!v) {\n return undefined;\n }\n\n try {\n return cb(v);\n } catch (err) {\n data.error = err instanceof Error ? err.message : String(err);\n return v;\n }\n};\n\nconst fileName = computed(() => tryValue(props.modelValue, getFileNameFromHandle));\n\nconst filePath = computed(() => tryValue(props.modelValue, getFilePathFromHandle));\n\nconst isUploading = computed(() => props.progress && !props.progress.done);\n\nconst isUploaded = computed(() => props.progress && props.progress.done);\n\nconst computedErrorMessage = computed(() => getErrorMessage(data.error, props.error));\n\nconst hasErrors = computed(() => typeof computedErrorMessage.value === 'string');\n\nconst uploadStats = computed(() => {\n const { status, done } = props.progress ?? {};\n\n if (!status || !status.bytesTotal) {\n return '';\n }\n\n if (status.bytesProcessed && !done) {\n return prettyBytes(status.bytesProcessed, {}) + ' / ' + prettyBytes(status.bytesTotal, {});\n }\n\n return prettyBytes(status.bytesTotal, {});\n});\n\nconst progressStyle = computed(() => {\n const { progress } = props;\n\n if (!progress) {\n return {};\n }\n\n return {\n width: progress.done ? '100%' : Math.round((progress.status?.progress ?? 0) * 100) + '%',\n };\n});\n\nconst openFileDialog = () => {\n data.fileDialogOpen = true;\n};\n\nconst onImport = (v: ImportedFiles) => {\n if (v.files.length) {\n emit('update:modelValue', v.files[0]);\n }\n};\n\nconst clear = () => emit('update:modelValue', undefined);\n\nwatch(\n () => props.modelValue,\n () => (data.error = undefined),\n { immediate: true },\n);\n\nconst rootRef = ref();\n\nif (!props.cellStyle) {\n useLabelNotch(rootRef);\n}\n</script>\n\n<template>\n <div :class=\"{ 'pl-file-input__cell-style': !!cellStyle, 'has-file': !!fileName }\" class=\"pl-file-input__envelope\">\n <div\n ref=\"rootRef\"\n :class=\"{ dashed, error: hasErrors }\"\n class=\"pl-file-input\"\n tabindex=\"0\"\n @keyup.enter=\"openFileDialog\"\n @click.stop=\"openFileDialog\"\n >\n <div :style=\"progressStyle\" class=\"pl-file-input__progress\" />\n <label v-if=\"!cellStyle && label\" ref=\"label\">\n <SvgRequired v-if=\"required\" />\n <span>{{ label }}</span>\n <PlTooltip v-if=\"slots.tooltip || filePath\" class=\"info\" position=\"top\">\n <template #tooltip>\n <slot v-if=\"slots.tooltip\" name=\"tooltip\" />\n <template v-else>{{ filePath }}</template>\n </template>\n </PlTooltip>\n </label>\n <PlMaskIcon24 v-if=\"hasErrors\" name=\"restart\" />\n <PlMaskIcon24 v-else-if=\"isUploading\" name=\"cloud-upload\" />\n <PlMaskIcon24 v-else-if=\"isUploaded\" name=\"success\" />\n <PlMaskIcon24 v-else name=\"paper-clip\" />\n <div :data-placeholder=\"placeholder ?? 'Choose file'\" class=\"pl-file-input__filename\">\n {{ fileName }}\n </div>\n <div v-if=\"uploadStats\" class=\"pl-file-input__stats\">{{ uploadStats }}</div>\n <PlMaskIcon24 v-if=\"modelValue\" class=\"pl-file-input__clear\" name=\"close\" @click.stop=\"clear\" />\n <DoubleContour class=\"pl-file-input__contour\" />\n </div>\n <div v-if=\"hasErrors\" class=\"pl-file-input__error\">\n {{ computedErrorMessage }}\n </div>\n <div v-else-if=\"helper\" class=\"pl-file-input__helper\">{{ helper }}</div>\n </div>\n <PlFileDialog\n v-model=\"data.fileDialogOpen\"\n :close-on-outside-click=\"fileDialogCloseOnOutsideClick\"\n :extensions=\"extensions\"\n :title=\"fileDialogTitle\"\n @import:files=\"onImport\"\n />\n</template>\n"],"names":["N","T","K","useSlots","v","err","data","k","s","props","h","o","x","E","P","V","J","b","status","computed","y","t","e","progress","openFileDialog","emit","clear","watch","U","useLabelNotch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAeA,MAAAA,W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