@quillsql/react 2.15.16 → 2.15.17

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 (3) hide show
  1. package/dist/index.cjs +326 -167
  2. package/dist/index.js +356 -184
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -620,9 +620,12 @@ var formatPercent = (value) => {
620
620
  return formatterPercent.format(Number(value));
621
621
  };
622
622
  var _getUTCDateHelper = (value, fmt) => {
623
+ if (value === null || value === void 0) {
624
+ return "-";
625
+ }
623
626
  const parsedDate = parse(value, fmt, /* @__PURE__ */ new Date());
624
627
  const utcDate = isValid(parsedDate) ? utcToZonedTime(parsedDate, "UTC") : utcToZonedTime(new Date(value), "UTC");
625
- if (!isValid(utcDate)) return value;
628
+ if (!isValid(utcDate)) return "-";
626
629
  return format(utcDate, fmt);
627
630
  };
628
631
  var format_YYYY = (value) => _getUTCDateHelper(value, "yyyy");
@@ -633,8 +636,11 @@ var format_MMM_dd_yyyy = (value) => {
633
636
  return _getUTCDateHelper(value, "dd MMM yyyy");
634
637
  };
635
638
  var format_MMM_d_MMM_d = (value, dateRange, databaseType) => {
639
+ if (value === null || value === void 0) {
640
+ return "-";
641
+ }
636
642
  const utcDate = parseISO(value.split("T")[0]);
637
- if (!isValid(utcDate)) return "Invalid date";
643
+ if (!isValid(utcDate)) return "-";
638
644
  let weekStartsOn = 1;
639
645
  if (databaseType && ["mssql"].includes(databaseType)) {
640
646
  weekStartsOn = 0;
@@ -665,15 +671,21 @@ var format_MMM_d_MMM_d = (value, dateRange, databaseType) => {
665
671
  }
666
672
  };
667
673
  var format_MMM_dd_hh_mm_ap_pm = (value) => {
674
+ if (value === null || value === void 0) {
675
+ return "-";
676
+ }
668
677
  const utcDate = utcToZonedTime(new Date(value), "UTC");
669
- if (!isValid(utcDate)) return "Invalid date";
678
+ if (!isValid(utcDate)) return "-";
670
679
  const formatStr = utcDate.getMinutes() === 0 ? "MMM do h a" : "MMM do h:mm a";
671
680
  const res = format(utcDate, formatStr);
672
681
  return res.slice(0, -2) + res.slice(-2).toLowerCase();
673
682
  };
674
683
  var format_wo_yyyy = (value) => {
684
+ if (value === null || value === void 0) {
685
+ return "-";
686
+ }
675
687
  const utcDate = utcToZonedTime(new Date(value), "UTC");
676
- if (!isValid(utcDate)) return "Invalid date";
688
+ if (!isValid(utcDate)) return "-";
677
689
  return `${getWeek(utcDate)},${utcDate.getFullYear()}`;
678
690
  };
679
691
  function parseNumber(value) {
@@ -28384,7 +28396,7 @@ var ChartTooltipPrimary = (props) => /* @__PURE__ */ jsxs22(ChartTooltipFrame2,
28384
28396
  paddingTop: 2,
28385
28397
  paddingBottom: 2
28386
28398
  },
28387
- children: !isNaN(new Date(props.label)) && props.dateFormatter ? props.dateFormatter(props.label) : !isNaN(new Date(props.label)) ? format6(new Date(props.label), "MMM yyyy") : props.label
28399
+ children: props.label && !isNaN(new Date(props.label)) && props.dateFormatter ? props.dateFormatter(props.label) : props.label && !isNaN(new Date(props.label)) ? format6(new Date(props.label), "MMM yyyy") : props.label || "-"
28388
28400
  }
28389
28401
  )
28390
28402
  }
@@ -28433,9 +28445,9 @@ function reformatComparisonPayload(props, primaryLabel, comparisonLabel) {
28433
28445
  const nameKey = isComparison ? `comparison_${props.xAxisField}` : props.xAxisField;
28434
28446
  const days = LABEL_TO_DAYS[primaryLabel] ?? 0;
28435
28447
  const primaryDate = item.payload[props.xAxisField] ?? 0;
28436
- const compDate = subDays2(new Date(primaryDate), days + 1);
28448
+ const compDate = primaryDate ? subDays2(new Date(primaryDate), days + 1) : /* @__PURE__ */ new Date();
28437
28449
  const date = item.payload[nameKey] ?? format6(compDate, props.xAxisFormat);
28438
- const name2 = props.dateFormatter(date);
28450
+ const name2 = props.dateFormatter ? props.dateFormatter(date) : date;
28439
28451
  const color2 = item.color;
28440
28452
  const value = props.valueFormatter(item.value, item.name);
28441
28453
  if (!columnsByKey[""]) {
@@ -28467,7 +28479,7 @@ function reformatComparisonPayload(props, primaryLabel, comparisonLabel) {
28467
28479
  return columnsByKey;
28468
28480
  }
28469
28481
  function getTooltipLabel(props, altTooltipLabel, isDateXAxis) {
28470
- return props.payload.length <= 2 && altTooltipLabel && isDateXAxis ? !isNaN(new Date(altTooltipLabel)) && props.dateFormatter ? props.dateFormatter(altTooltipLabel) : !isNaN(new Date(altTooltipLabel)) ? format6(new Date(altTooltipLabel), "MMM yyyy") : altTooltipLabel : !isNaN(new Date(props.label)) && props.dateFormatter ? props.dateFormatter(props.label) : !isNaN(new Date(props.label)) ? format6(new Date(props.label), "MMM yyyy") : props.label;
28482
+ return props.payload.length <= 2 && altTooltipLabel && isDateXAxis ? altTooltipLabel && !isNaN(new Date(altTooltipLabel)) && props.dateFormatter ? props.dateFormatter(altTooltipLabel) : altTooltipLabel && !isNaN(new Date(altTooltipLabel)) ? format6(new Date(altTooltipLabel), "MMM yyyy") : altTooltipLabel || "-" : props.label && !isNaN(new Date(props.label)) && props.dateFormatter ? props.dateFormatter(props.label) : props.label && !isNaN(new Date(props.label)) ? format6(new Date(props.label), "MMM yyyy") : props.label || "-";
28471
28483
  }
28472
28484
  function ChartTooltipComparison(props) {
28473
28485
  const isDateXAxis = isDateFormat(props.xAxisFormat);
@@ -39043,6 +39055,22 @@ import {
39043
39055
  useContext as useContext26,
39044
39056
  useMemo as useMemo21
39045
39057
  } from "react";
39058
+ import {
39059
+ closestCenter,
39060
+ DndContext,
39061
+ KeyboardSensor,
39062
+ PointerSensor,
39063
+ useSensor,
39064
+ useSensors
39065
+ } from "@dnd-kit/core";
39066
+ import {
39067
+ arrayMove,
39068
+ SortableContext,
39069
+ sortableKeyboardCoordinates,
39070
+ verticalListSortingStrategy,
39071
+ useSortable
39072
+ } from "@dnd-kit/sortable";
39073
+ import { CSS as DND_CSS } from "@dnd-kit/utilities";
39046
39074
 
39047
39075
  // src/internals/ReportBuilder/PivotModal.tsx
39048
39076
  import {
@@ -42312,6 +42340,173 @@ var CHART_TO_LABELS = {
42312
42340
  "World map": { xAxisLabel: "Country", yAxisLabel: "Value" },
42313
42341
  gauge: { xAxisLabel: "Value" }
42314
42342
  };
42343
+ function SortableColumnItem({
42344
+ column,
42345
+ index,
42346
+ rows,
42347
+ columns,
42348
+ handleChange,
42349
+ deleteRef,
42350
+ deleteButtonMargin,
42351
+ handleRemoveField,
42352
+ SelectComponent,
42353
+ TextInputComponent,
42354
+ DeleteButtonComponent
42355
+ }) {
42356
+ const { attributes, listeners, setNodeRef, transform, transition: transition2 } = useSortable({ id: column.field });
42357
+ const style2 = {
42358
+ transform: DND_CSS.Transform.toString(transform),
42359
+ transition: transition2
42360
+ };
42361
+ return /* @__PURE__ */ jsx65("div", { style: style2, ref: setNodeRef, children: /* @__PURE__ */ jsxs47(
42362
+ "div",
42363
+ {
42364
+ style: {
42365
+ display: "flex",
42366
+ alignItems: "center",
42367
+ gap: 4
42368
+ },
42369
+ children: [
42370
+ /* @__PURE__ */ jsxs47(
42371
+ "div",
42372
+ {
42373
+ style: {
42374
+ cursor: "grab",
42375
+ display: "flex",
42376
+ gap: 2,
42377
+ flexDirection: "row",
42378
+ paddingTop: 8,
42379
+ paddingBottom: 8,
42380
+ paddingLeft: 8,
42381
+ paddingRight: 8,
42382
+ borderRadius: 4
42383
+ },
42384
+ className: "handle",
42385
+ ...attributes,
42386
+ ...listeners,
42387
+ children: [
42388
+ /* @__PURE__ */ jsx65("style", { children: `.handle{background:white;} .handle:hover{background:rgba(0,0,0,0.03);}` }),
42389
+ /* @__PURE__ */ jsxs47("div", { style: { display: "flex", gap: 2, flexDirection: "column" }, children: [
42390
+ /* @__PURE__ */ jsx65(
42391
+ "div",
42392
+ {
42393
+ style: {
42394
+ width: 3,
42395
+ height: 3,
42396
+ borderRadius: 3,
42397
+ background: "#9CA0A7"
42398
+ }
42399
+ }
42400
+ ),
42401
+ /* @__PURE__ */ jsx65(
42402
+ "div",
42403
+ {
42404
+ style: {
42405
+ width: 3,
42406
+ height: 3,
42407
+ borderRadius: 3,
42408
+ background: "#9CA0A7"
42409
+ }
42410
+ }
42411
+ ),
42412
+ /* @__PURE__ */ jsx65(
42413
+ "div",
42414
+ {
42415
+ style: {
42416
+ width: 3,
42417
+ height: 3,
42418
+ borderRadius: 3,
42419
+ background: "#9CA0A7"
42420
+ }
42421
+ }
42422
+ )
42423
+ ] }),
42424
+ /* @__PURE__ */ jsxs47("div", { style: { display: "flex", gap: 2, flexDirection: "column" }, children: [
42425
+ /* @__PURE__ */ jsx65(
42426
+ "div",
42427
+ {
42428
+ style: {
42429
+ width: 3,
42430
+ height: 3,
42431
+ borderRadius: 3,
42432
+ background: "#9CA0A7"
42433
+ }
42434
+ }
42435
+ ),
42436
+ /* @__PURE__ */ jsx65(
42437
+ "div",
42438
+ {
42439
+ style: {
42440
+ width: 3,
42441
+ height: 3,
42442
+ borderRadius: 3,
42443
+ background: "#9CA0A7"
42444
+ }
42445
+ }
42446
+ ),
42447
+ /* @__PURE__ */ jsx65(
42448
+ "div",
42449
+ {
42450
+ style: {
42451
+ width: 3,
42452
+ height: 3,
42453
+ borderRadius: 3,
42454
+ background: "#9CA0A7"
42455
+ }
42456
+ }
42457
+ )
42458
+ ] })
42459
+ ]
42460
+ }
42461
+ ),
42462
+ /* @__PURE__ */ jsxs47("div", { style: { flex: 1, display: "flex", gap: 12 }, children: [
42463
+ /* @__PURE__ */ jsx65(
42464
+ SelectComponent,
42465
+ {
42466
+ value: column.field,
42467
+ onChange: (e) => handleChange(e.target.value, "columns.field", index),
42468
+ options: rows[0] ? Object.keys(rows[0]).map((elem) => ({
42469
+ label: elem,
42470
+ value: elem
42471
+ })) : columns.map((elem) => ({
42472
+ label: elem.field,
42473
+ value: elem.field
42474
+ })),
42475
+ width: 200,
42476
+ hideEmptyOption: true
42477
+ }
42478
+ ),
42479
+ /* @__PURE__ */ jsx65(
42480
+ TextInputComponent,
42481
+ {
42482
+ id: `chart-builder-column-label-${index}`,
42483
+ width: 200,
42484
+ value: column.label,
42485
+ placeholder: "Column Label",
42486
+ onChange: (e) => handleChange(e.target.value, "columns.label", index)
42487
+ }
42488
+ ),
42489
+ /* @__PURE__ */ jsx65(
42490
+ SelectComponent,
42491
+ {
42492
+ value: column.format,
42493
+ onChange: (e) => handleChange(e.target.value, "columns.format", index),
42494
+ options: ALL_FORMAT_OPTIONS,
42495
+ width: 200,
42496
+ hideEmptyOption: true
42497
+ }
42498
+ ),
42499
+ /* @__PURE__ */ jsx65("div", { ref: deleteRef, style: { marginLeft: deleteButtonMargin }, children: /* @__PURE__ */ jsx65(
42500
+ DeleteButtonComponent,
42501
+ {
42502
+ onClick: () => handleRemoveField("columns", index)
42503
+ }
42504
+ ) })
42505
+ ] })
42506
+ ]
42507
+ }
42508
+ ) });
42509
+ }
42315
42510
  function getPivotMetricOptions(pivot, selectedPivotTable, chartType) {
42316
42511
  if (["metric", "gauge"].includes(chartType) && selectedPivotTable) {
42317
42512
  return selectedPivotTable.columns.map((elem) => ({
@@ -43777,6 +43972,26 @@ function ChartBuilder({
43777
43972
  );
43778
43973
  setFormData({ ...formData, [fieldName]: updatedArray });
43779
43974
  };
43975
+ const columnDragSensors = useSensors(
43976
+ useSensor(PointerSensor),
43977
+ useSensor(KeyboardSensor, {
43978
+ coordinateGetter: sortableKeyboardCoordinates
43979
+ })
43980
+ );
43981
+ const handleColumnDragEnd = (event) => {
43982
+ const { active, over } = event;
43983
+ if (!active || !over) return;
43984
+ if (active.id !== over.id) {
43985
+ const oldIndex = formData.columns.findIndex(
43986
+ (col) => col.field === active.id
43987
+ );
43988
+ const newIndex = formData.columns.findIndex(
43989
+ (col) => col.field === over.id
43990
+ );
43991
+ const newColumns = arrayMove(formData.columns, oldIndex, newIndex);
43992
+ setFormData({ ...formData, columns: newColumns });
43993
+ }
43994
+ };
43780
43995
  const handleSubmit = (event) => {
43781
43996
  event.preventDefault();
43782
43997
  };
@@ -44685,141 +44900,98 @@ function ChartBuilder({
44685
44900
  formData.pivot && selectedPivotTable && selectedPivotTable.columns && formData.chartType === "table" ? (
44686
44901
  // THIS CASE IF FOR PIVOT TABLES ONLY
44687
44902
  selectedPivotTable.columns.map(
44688
- (column, index) => /* @__PURE__ */ jsxs47(
44689
- ChartBuilderInputRowContainer,
44690
- {
44691
- children: [
44692
- /* @__PURE__ */ jsx65(
44693
- SelectComponent,
44694
- {
44695
- value: column.field,
44696
- onChange: (e) => handleChange(
44697
- e.target.value,
44698
- "pivot.field",
44699
- index
44700
- ),
44701
- options: selectedPivotTable.columns.map(
44702
- (elem) => ({
44703
- label: elem.field,
44704
- value: elem.field
44705
- })
44706
- ),
44707
- disabled: index === 0,
44708
- width: 200,
44709
- hideEmptyOption: true
44710
- }
44903
+ (column, index) => /* @__PURE__ */ jsxs47(ChartBuilderInputRowContainer, { children: [
44904
+ /* @__PURE__ */ jsx65(
44905
+ SelectComponent,
44906
+ {
44907
+ value: column.field,
44908
+ onChange: (e) => handleChange(
44909
+ e.target.value,
44910
+ "pivot.field",
44911
+ index
44711
44912
  ),
44712
- /* @__PURE__ */ jsx65(
44713
- TextInputComponent,
44714
- {
44715
- id: `chart-builder-column-label-${index}`,
44716
- width: 200,
44717
- value: column.label,
44718
- placeholder: "Column Label",
44719
- onChange: (e) => handleChange(
44720
- e.target.value,
44721
- "pivot.label",
44722
- index
44723
- )
44724
- }
44913
+ options: selectedPivotTable.columns.map(
44914
+ (elem) => ({
44915
+ label: elem.field,
44916
+ value: elem.field
44917
+ })
44725
44918
  ),
44726
- /* @__PURE__ */ jsx65(
44727
- SelectComponent,
44728
- {
44729
- value: (
44730
- // The first index use rowField for the rest of them use value fields
44731
- column.format
44732
- ),
44733
- onChange: (e) => handleChange(
44734
- e.target.value,
44735
- "pivot.format",
44736
- index
44737
- ),
44738
- options: formData.pivot && index === 0 && selectedPivotTable?.columns.length > 1 ? isDateField(
44739
- formData.pivot.rowFieldType || ""
44740
- ) ? [{ label: "date", value: "string" }] : [{ label: "string", value: "string" }] : [
44741
- ...NUMBER_OPTIONS,
44742
- { label: "string", value: "string" }
44743
- ],
44744
- width: 200,
44745
- hideEmptyOption: true
44746
- }
44919
+ disabled: index === 0,
44920
+ width: 200,
44921
+ hideEmptyOption: true
44922
+ }
44923
+ ),
44924
+ /* @__PURE__ */ jsx65(
44925
+ TextInputComponent,
44926
+ {
44927
+ id: `chart-builder-column-label-${index}`,
44928
+ width: 200,
44929
+ value: column.label,
44930
+ placeholder: "Column Label",
44931
+ onChange: (e) => handleChange(
44932
+ e.target.value,
44933
+ "pivot.label",
44934
+ index
44747
44935
  )
44748
- ]
44749
- },
44750
- "column" + index
44751
- )
44936
+ }
44937
+ ),
44938
+ /* @__PURE__ */ jsx65(
44939
+ SelectComponent,
44940
+ {
44941
+ value: (
44942
+ // The first index use rowField for the rest of them use value fields
44943
+ column.format
44944
+ ),
44945
+ onChange: (e) => handleChange(
44946
+ e.target.value,
44947
+ "pivot.format",
44948
+ index
44949
+ ),
44950
+ options: formData.pivot && index === 0 && selectedPivotTable?.columns.length > 1 ? isDateField(
44951
+ formData.pivot.rowFieldType || ""
44952
+ ) ? [{ label: "date", value: "string" }] : [{ label: "string", value: "string" }] : [
44953
+ ...NUMBER_OPTIONS,
44954
+ { label: "string", value: "string" }
44955
+ ],
44956
+ width: 200,
44957
+ hideEmptyOption: true
44958
+ }
44959
+ )
44960
+ ] }, "column" + index)
44752
44961
  )
44753
- ) : formData.columns.map(
44754
- (column, index) => /* @__PURE__ */ jsxs47(
44755
- ChartBuilderInputRowContainer,
44756
- {
44757
- children: [
44758
- /* @__PURE__ */ jsx65(
44759
- SelectComponent,
44760
- {
44761
- value: column.field,
44762
- onChange: (e) => handleChange(
44763
- e.target.value,
44764
- "columns.field",
44765
- index
44766
- ),
44767
- options: rows[0] ? Object.keys(rows[0]).map((elem) => ({
44768
- label: elem,
44769
- value: elem
44770
- })) : columns.map((elem) => ({
44771
- label: elem.field,
44772
- value: elem.field
44773
- })),
44774
- width: 200,
44775
- hideEmptyOption: true
44776
- }
44777
- ),
44778
- /* @__PURE__ */ jsx65(
44779
- TextInputComponent,
44780
- {
44781
- id: `chart-builder-column-label-${index}`,
44782
- width: 200,
44783
- value: column.label,
44784
- placeholder: "Column Label",
44785
- onChange: (e) => handleChange(
44786
- e.target.value,
44787
- "columns.label",
44788
- index
44789
- )
44790
- }
44791
- ),
44792
- /* @__PURE__ */ jsx65(
44793
- SelectComponent,
44794
- {
44795
- value: column.format,
44796
- onChange: (e) => handleChange(
44797
- e.target.value,
44798
- "columns.format",
44799
- index
44800
- ),
44801
- options: ALL_FORMAT_OPTIONS,
44802
- width: 200,
44803
- hideEmptyOption: true
44804
- }
44805
- ),
44806
- /* @__PURE__ */ jsx65(
44807
- "div",
44808
- {
44809
- ref: deleteRef,
44810
- style: { marginLeft: deleteButtonMargin },
44811
- children: /* @__PURE__ */ jsx65(
44812
- DeleteButtonComponent,
44813
- {
44814
- onClick: () => handleRemoveField("columns", index)
44815
- }
44816
- )
44817
- }
44962
+ ) : /* @__PURE__ */ jsx65(
44963
+ DndContext,
44964
+ {
44965
+ sensors: columnDragSensors,
44966
+ collisionDetection: closestCenter,
44967
+ onDragEnd: handleColumnDragEnd,
44968
+ children: /* @__PURE__ */ jsx65(
44969
+ SortableContext,
44970
+ {
44971
+ items: formData.columns.map((col) => col.field),
44972
+ strategy: verticalListSortingStrategy,
44973
+ children: formData.columns.map(
44974
+ (column, index) => /* @__PURE__ */ jsx65(
44975
+ SortableColumnItem,
44976
+ {
44977
+ column,
44978
+ index,
44979
+ rows,
44980
+ columns,
44981
+ handleChange,
44982
+ deleteRef,
44983
+ deleteButtonMargin,
44984
+ handleRemoveField,
44985
+ SelectComponent,
44986
+ TextInputComponent,
44987
+ DeleteButtonComponent
44988
+ },
44989
+ column.field
44990
+ )
44818
44991
  )
44819
- ]
44820
- },
44821
- "column" + index
44822
- )
44992
+ }
44993
+ )
44994
+ }
44823
44995
  ),
44824
44996
  /* @__PURE__ */ jsx65("div", { children: !// hide when pivoted and chartType === 'table'
44825
44997
  (formData.pivot && selectedPivotTable && selectedPivotTable.columns && formData.chartType === "table") && /* @__PURE__ */ jsxs47(
@@ -48994,21 +49166,21 @@ var useReportBuilder = ({
48994
49166
  // src/components/ReportBuilder/AddColumnModal.tsx
48995
49167
  import { useState as useState32, useRef as useRef19, useMemo as useMemo24, useEffect as useEffect26, useContext as useContext30 } from "react";
48996
49168
  import {
48997
- DndContext,
48998
- closestCenter,
48999
- KeyboardSensor,
49000
- PointerSensor,
49001
- useSensor,
49002
- useSensors
49169
+ DndContext as DndContext2,
49170
+ closestCenter as closestCenter2,
49171
+ KeyboardSensor as KeyboardSensor2,
49172
+ PointerSensor as PointerSensor2,
49173
+ useSensor as useSensor2,
49174
+ useSensors as useSensors2
49003
49175
  } from "@dnd-kit/core";
49004
49176
  import {
49005
- arrayMove,
49006
- SortableContext,
49007
- sortableKeyboardCoordinates,
49008
- verticalListSortingStrategy,
49009
- useSortable
49177
+ arrayMove as arrayMove2,
49178
+ SortableContext as SortableContext2,
49179
+ sortableKeyboardCoordinates as sortableKeyboardCoordinates2,
49180
+ verticalListSortingStrategy as verticalListSortingStrategy2,
49181
+ useSortable as useSortable2
49010
49182
  } from "@dnd-kit/sortable";
49011
- import { CSS as DND_CSS } from "@dnd-kit/utilities";
49183
+ import { CSS as DND_CSS2 } from "@dnd-kit/utilities";
49012
49184
  import { jsx as jsx67, jsxs as jsxs49 } from "react/jsx-runtime";
49013
49185
  function AddColumnModal({
49014
49186
  onSave,
@@ -49077,10 +49249,10 @@ function AddColumnModal({
49077
49249
  setTimeout(() => setInitialLoad(false), 200);
49078
49250
  }
49079
49251
  }, [schemaLoading]);
49080
- const sensors = useSensors(
49081
- useSensor(PointerSensor),
49082
- useSensor(KeyboardSensor, {
49083
- coordinateGetter: sortableKeyboardCoordinates
49252
+ const sensors = useSensors2(
49253
+ useSensor2(PointerSensor2),
49254
+ useSensor2(KeyboardSensor2, {
49255
+ coordinateGetter: sortableKeyboardCoordinates2
49084
49256
  })
49085
49257
  );
49086
49258
  function handleDragEnd(event) {
@@ -49090,7 +49262,7 @@ function AddColumnModal({
49090
49262
  setOrderedColumnNames((orderedColumnNames2) => {
49091
49263
  const oldIndex = orderedColumnNames2.indexOf(active.id);
49092
49264
  const newIndex = orderedColumnNames2.indexOf(over.id);
49093
- return arrayMove(orderedColumnNames2, oldIndex, newIndex);
49265
+ return arrayMove2(orderedColumnNames2, oldIndex, newIndex);
49094
49266
  });
49095
49267
  }
49096
49268
  }
@@ -49134,16 +49306,16 @@ function AddColumnModal({
49134
49306
  }
49135
49307
  ),
49136
49308
  schemaLoading || initialLoad ? /* @__PURE__ */ jsx67(LoadingComponent, {}) : schema.length > 0 ? /* @__PURE__ */ jsx67(
49137
- DndContext,
49309
+ DndContext2,
49138
49310
  {
49139
49311
  sensors,
49140
- collisionDetection: closestCenter,
49312
+ collisionDetection: closestCenter2,
49141
49313
  onDragEnd: handleDragEnd,
49142
49314
  children: /* @__PURE__ */ jsx67(
49143
- SortableContext,
49315
+ SortableContext2,
49144
49316
  {
49145
49317
  items: orderedColumnNames,
49146
- strategy: verticalListSortingStrategy,
49318
+ strategy: verticalListSortingStrategy2,
49147
49319
  children: /* @__PURE__ */ jsxs49(
49148
49320
  "div",
49149
49321
  {
@@ -49351,9 +49523,9 @@ var SortableItem = ({
49351
49523
  selectedColumns,
49352
49524
  SelectColumn
49353
49525
  }) => {
49354
- const { attributes, listeners, setNodeRef, transform, transition: transition2 } = useSortable({ id: id2 });
49526
+ const { attributes, listeners, setNodeRef, transform, transition: transition2 } = useSortable2({ id: id2 });
49355
49527
  const style2 = {
49356
- transform: DND_CSS.Transform.toString(transform),
49528
+ transform: DND_CSS2.Transform.toString(transform),
49357
49529
  transition: transition2
49358
49530
  };
49359
49531
  const handleSelect = () => {
@@ -49383,17 +49555,17 @@ var SortableItem = ({
49383
49555
 
49384
49556
  // src/components/ReportBuilder/DraggableColumns.tsx
49385
49557
  import {
49386
- closestCenter as closestCenter2,
49387
- DndContext as DndContext2,
49388
- KeyboardSensor as KeyboardSensor2,
49389
- PointerSensor as PointerSensor2,
49390
- useSensor as useSensor2,
49391
- useSensors as useSensors2
49558
+ closestCenter as closestCenter3,
49559
+ DndContext as DndContext3,
49560
+ KeyboardSensor as KeyboardSensor3,
49561
+ PointerSensor as PointerSensor3,
49562
+ useSensor as useSensor3,
49563
+ useSensors as useSensors3
49392
49564
  } from "@dnd-kit/core";
49393
49565
 
49394
49566
  // src/components/ReportBuilder/DraggableItem.tsx
49395
- import { useSortable as useSortable2 } from "@dnd-kit/sortable";
49396
- import { CSS as DND_CSS2 } from "@dnd-kit/utilities";
49567
+ import { useSortable as useSortable3 } from "@dnd-kit/sortable";
49568
+ import { CSS as DND_CSS3 } from "@dnd-kit/utilities";
49397
49569
  import { jsx as jsx68 } from "react/jsx-runtime";
49398
49570
  function DraggableItem({
49399
49571
  id: id2,
@@ -49402,9 +49574,9 @@ function DraggableItem({
49402
49574
  DraggableColumnComponent,
49403
49575
  loading
49404
49576
  }) {
49405
- const { attributes, listeners, setNodeRef, transform, transition: transition2 } = useSortable2({ id: id2 });
49577
+ const { attributes, listeners, setNodeRef, transform, transition: transition2 } = useSortable3({ id: id2 });
49406
49578
  const style2 = {
49407
- transform: DND_CSS2.Transform.toString(transform),
49579
+ transform: DND_CSS3.Transform.toString(transform),
49408
49580
  transition: transition2
49409
49581
  };
49410
49582
  return /* @__PURE__ */ jsx68("div", { style: { ...style2 }, ref: setNodeRef, children: /* @__PURE__ */ jsx68(
@@ -49430,10 +49602,10 @@ function DraggableItem({
49430
49602
 
49431
49603
  // src/components/ReportBuilder/DraggableColumns.tsx
49432
49604
  import {
49433
- arrayMove as arrayMove2,
49434
- SortableContext as SortableContext2,
49435
- sortableKeyboardCoordinates as sortableKeyboardCoordinates2,
49436
- verticalListSortingStrategy as verticalListSortingStrategy2
49605
+ arrayMove as arrayMove3,
49606
+ SortableContext as SortableContext3,
49607
+ sortableKeyboardCoordinates as sortableKeyboardCoordinates3,
49608
+ verticalListSortingStrategy as verticalListSortingStrategy3
49437
49609
  } from "@dnd-kit/sortable";
49438
49610
  import { useMemo as useMemo25 } from "react";
49439
49611
  import { jsx as jsx69, jsxs as jsxs50 } from "react/jsx-runtime";
@@ -49443,10 +49615,10 @@ function DraggableColumns({
49443
49615
  DraggableColumnComponent,
49444
49616
  loading
49445
49617
  }) {
49446
- const sensors = useSensors2(
49447
- useSensor2(PointerSensor2),
49448
- useSensor2(KeyboardSensor2, {
49449
- coordinateGetter: sortableKeyboardCoordinates2
49618
+ const sensors = useSensors3(
49619
+ useSensor3(PointerSensor3),
49620
+ useSensor3(KeyboardSensor3, {
49621
+ coordinateGetter: sortableKeyboardCoordinates3
49450
49622
  })
49451
49623
  );
49452
49624
  const columnNames = useMemo25(() => {
@@ -49463,7 +49635,7 @@ function DraggableColumns({
49463
49635
  if (active.id !== over.id) {
49464
49636
  const oldIndex = columnNames.findIndex((c) => c.endsWith(active.id));
49465
49637
  const newIndex = columnNames.findIndex((c) => c.endsWith(over.id));
49466
- const newOrder = arrayMove2(columnNames, oldIndex, newIndex);
49638
+ const newOrder = arrayMove3(columnNames, oldIndex, newIndex);
49467
49639
  const orderToColumns = newOrder.map((name2) => {
49468
49640
  const [table, field] = name2.split(".");
49469
49641
  return columns.find(
@@ -49480,16 +49652,16 @@ function DraggableColumns({
49480
49652
  onColumnOrderChange(newColumns);
49481
49653
  }
49482
49654
  return /* @__PURE__ */ jsx69(
49483
- DndContext2,
49655
+ DndContext3,
49484
49656
  {
49485
49657
  sensors,
49486
- collisionDetection: closestCenter2,
49658
+ collisionDetection: closestCenter3,
49487
49659
  onDragEnd: handleDragEnd,
49488
49660
  children: /* @__PURE__ */ jsx69(
49489
- SortableContext2,
49661
+ SortableContext3,
49490
49662
  {
49491
49663
  items: columnNames,
49492
- strategy: verticalListSortingStrategy2,
49664
+ strategy: verticalListSortingStrategy3,
49493
49665
  children: /* @__PURE__ */ jsxs50(
49494
49666
  "div",
49495
49667
  {