@quillsql/react 2.15.8 → 2.15.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1216,11 +1216,29 @@ var convertCustomIntervalToDateRange = (interval2) => {
1216
1216
  endDate: (0, import_date_fns2.endOfToday)()
1217
1217
  };
1218
1218
  case "repeating": {
1219
- const currentMonth = (/* @__PURE__ */ new Date()).getMonth() + 1;
1220
- const currentDay = (/* @__PURE__ */ new Date()).getDate();
1221
- const currentSubInterval = interval2.subIntervals.find(
1222
- (subInterval) => subInterval.startDate.month <= currentMonth && subInterval.endDate.month >= currentMonth && subInterval.startDate.day <= currentDay && subInterval.endDate.day >= currentDay
1223
- );
1219
+ const currentDate = /* @__PURE__ */ new Date();
1220
+ const currentYear = currentDate.getFullYear();
1221
+ const currentSubInterval = interval2.subIntervals.find((subInterval) => {
1222
+ const intervalStart = (0, import_date_fns2.set)(/* @__PURE__ */ new Date(), {
1223
+ year: currentYear,
1224
+ month: subInterval.startDate.month - 1,
1225
+ // convert 1-index to 0-index
1226
+ date: subInterval.startDate.day,
1227
+ hours: 0,
1228
+ minutes: 0,
1229
+ seconds: 0
1230
+ });
1231
+ const intervalEnd = (0, import_date_fns2.set)(/* @__PURE__ */ new Date(), {
1232
+ year: currentYear,
1233
+ month: subInterval.endDate.month - 1,
1234
+ // convert 1-index to 0-index
1235
+ date: subInterval.endDate.day,
1236
+ hours: 23,
1237
+ minutes: 59,
1238
+ seconds: 59
1239
+ });
1240
+ return currentDate >= intervalStart && currentDate <= intervalEnd;
1241
+ });
1224
1242
  if (!currentSubInterval) {
1225
1243
  throw new Error("Date is not valid in this interval");
1226
1244
  }
@@ -1390,10 +1408,29 @@ var convertPresetOptionsToSelectableList = (customIntervals, defaultIntervals) =
1390
1408
  let currentDate = (0, import_date_fns2.endOfDay)(option.loopEnd ?? /* @__PURE__ */ new Date());
1391
1409
  const cutoffDate = option.loopStart;
1392
1410
  while (currentDate > cutoffDate) {
1393
- const currentMonth = currentDate.getMonth() + 1;
1394
- const currentDay = currentDate.getDate();
1411
+ const loopCurrentYear = currentDate.getFullYear();
1395
1412
  const currentSubInterval = option.subIntervals.find(
1396
- (subInterval) => subInterval.startDate.month <= currentMonth && subInterval.endDate.month >= currentMonth && subInterval.startDate.day <= currentDay && subInterval.endDate.day >= currentDay
1413
+ (subInterval) => {
1414
+ const intervalStart2 = (0, import_date_fns2.set)(/* @__PURE__ */ new Date(), {
1415
+ year: loopCurrentYear,
1416
+ month: subInterval.startDate.month - 1,
1417
+ // convert 1-index to 0-index
1418
+ date: subInterval.startDate.day,
1419
+ hours: 0,
1420
+ minutes: 0,
1421
+ seconds: 0
1422
+ });
1423
+ const intervalEnd = (0, import_date_fns2.set)(/* @__PURE__ */ new Date(), {
1424
+ year: loopCurrentYear,
1425
+ month: subInterval.endDate.month - 1,
1426
+ // convert 1-index to 0-index
1427
+ date: subInterval.endDate.day,
1428
+ hours: 23,
1429
+ minutes: 59,
1430
+ seconds: 59
1431
+ });
1432
+ return currentDate >= intervalStart2 && currentDate <= intervalEnd;
1433
+ }
1397
1434
  );
1398
1435
  if (!currentSubInterval) {
1399
1436
  return [];
@@ -1412,6 +1449,7 @@ var convertPresetOptionsToSelectableList = (customIntervals, defaultIntervals) =
1412
1449
  startDate: (0, import_date_fns2.set)(/* @__PURE__ */ new Date(), {
1413
1450
  year: currentYear,
1414
1451
  month: currentSubInterval.startDate.month - 1,
1452
+ // convert 1-index to 0-index
1415
1453
  date: currentSubInterval.startDate.day,
1416
1454
  minutes: 0,
1417
1455
  hours: 0,
@@ -1420,6 +1458,7 @@ var convertPresetOptionsToSelectableList = (customIntervals, defaultIntervals) =
1420
1458
  endDate: (0, import_date_fns2.set)(/* @__PURE__ */ new Date(), {
1421
1459
  year: currentYear,
1422
1460
  month: currentSubInterval.endDate.month - 1,
1461
+ // convert 1-index to 0-index
1423
1462
  date: currentSubInterval.endDate.day,
1424
1463
  minutes: 59,
1425
1464
  hours: 23,
@@ -1429,6 +1468,7 @@ var convertPresetOptionsToSelectableList = (customIntervals, defaultIntervals) =
1429
1468
  const intervalStart = (0, import_date_fns2.set)(/* @__PURE__ */ new Date(), {
1430
1469
  year: currentYear,
1431
1470
  month: currentSubInterval.startDate.month - 1,
1471
+ // convert 1-index to 0-index
1432
1472
  date: currentSubInterval.startDate.day
1433
1473
  });
1434
1474
  currentDate = (0, import_date_fns2.sub)(intervalStart, { days: 1 });
package/dist/index.d.cts CHANGED
@@ -3426,4 +3426,4 @@ interface ReportTableProps {
3426
3426
  }
3427
3427
  declare const ReportTable: ({ reportBuilder, TableComponent, }: ReportTableProps) => react_jsx_runtime.JSX.Element;
3428
3428
 
3429
- export { ALL_TENANTS, AddColumns, AddFilters, AddLimit, AddPivot, AddSort, type AxisFormat, type ButtonComponentProps, Calculation, Chart, ChartEditor, type ChartEditorProps, type ChartProps, type CheckboxComponentProps, type ColorMapType, type Column$1 as Column, type ContainerComponentProps, Dashboard, DashboardFilterType, type DashboardProps, type DashboardSectionComponentProps, DateOperator, type DateRange, type DateRangePickerComponentProps, type DateRangePickerOption, type DeleteButtonComponentProps, type DraggableColumnComponentProps, type EventBreadcrumb, type EventContext, type EventError, type EventMetadata, type EventTracking, type EventUser, type Filter, type FilterPopoverComponentProps, FilterType, type HeaderComponentProps, type HeaderProps, type InternalDashboardDateFilter, type InternalDashboardTenantFilter, type InternalFilter, type LabelComponentProps, type LimitPopoverComponentProps, type ModalComponentProps, NullOperator, NumberOperator, type Option, type Pivot, type PopoverComponentProps, type QuillCustomInterval, type QuillCustomRelativeInterval, type QuillCustomRepeatingInterval, type QuillCustomStaticInterval, QuillProvider, type QuillProviderProps, type QuillReport, type QuillReportProps, type QuillTheme, type QuillWeekInterval, ReportBuilder$1 as ReportBuilder, type ReportBuilderColumn, type ReportBuilderLimit, type ReportBuilderProps, type ReportBuilderSort, type ReportBuilderState, ReportTable, SINGLE_TENANT, SQLEditor, type SQLEditorProps, SaveReport, SchemaListComponent, type SelectColumnComponentProps, type SelectComponentProps, type SidebarComponentProps, type SidebarHeadingComponentProps, type SortPopoverComponentProps, StaticChart, type StaticChartProps, StringOperator, Table$1 as Table, type TableComponentProps, type TableProps, type TabsComponentProps, type TextComponentProps, type TextInputComponentProps, ThemeContext, downloadCSV, quillFormat as format, useAllReports, useAskQuill, useDashboard, useDashboardInternal, useDashboardReport, useDashboardReports, useDashboards, useExport, useMemoizedRows, useQuill, useReportBuilder, useReports, useTenants, useVirtualTables };
3429
+ export { ALL_TENANTS, AddColumns, AddFilters, AddLimit, AddPivot, AddSort, type AxisFormat, type ButtonComponentProps, Calculation, Chart, ChartEditor, type ChartEditorProps, type ChartProps, type CheckboxComponentProps, type ColorMapType, type Column$1 as Column, type ContainerComponentProps, Dashboard, type DashboardFilter, DashboardFilterType, type DashboardProps, type DashboardSectionComponentProps, DateOperator, type DateRange, type DateRangePickerComponentProps, type DateRangePickerOption, type DeleteButtonComponentProps, type DraggableColumnComponentProps, type EventBreadcrumb, type EventContext, type EventError, type EventMetadata, type EventTracking, type EventUser, type Filter, type FilterPopoverComponentProps, FilterType, type HeaderComponentProps, type HeaderProps, type InternalDashboardDateFilter, type InternalDashboardTenantFilter, type InternalFilter, type LabelComponentProps, type LimitPopoverComponentProps, type ModalComponentProps, NullOperator, NumberOperator, type Option, type Pivot, type PopoverComponentProps, type QuillCustomInterval, type QuillCustomRelativeInterval, type QuillCustomRepeatingInterval, type QuillCustomStaticInterval, QuillProvider, type QuillProviderProps, type QuillReport, type QuillReportProps, type QuillTheme, type QuillWeekInterval, ReportBuilder$1 as ReportBuilder, type ReportBuilderColumn, type ReportBuilderLimit, type ReportBuilderProps, type ReportBuilderSort, type ReportBuilderState, ReportTable, SINGLE_TENANT, SQLEditor, type SQLEditorProps, SaveReport, SchemaListComponent, type SelectColumnComponentProps, type SelectComponentProps, type SidebarComponentProps, type SidebarHeadingComponentProps, type SortPopoverComponentProps, StaticChart, type StaticChartProps, StringOperator, Table$1 as Table, type TableComponentProps, type TableProps, type TabsComponentProps, type TextComponentProps, type TextInputComponentProps, ThemeContext, downloadCSV, quillFormat as format, useAllReports, useAskQuill, useDashboard, useDashboardInternal, useDashboardReport, useDashboardReports, useDashboards, useExport, useMemoizedRows, useQuill, useReportBuilder, useReports, useTenants, useVirtualTables };
package/dist/index.d.ts CHANGED
@@ -3426,4 +3426,4 @@ interface ReportTableProps {
3426
3426
  }
3427
3427
  declare const ReportTable: ({ reportBuilder, TableComponent, }: ReportTableProps) => react_jsx_runtime.JSX.Element;
3428
3428
 
3429
- export { ALL_TENANTS, AddColumns, AddFilters, AddLimit, AddPivot, AddSort, type AxisFormat, type ButtonComponentProps, Calculation, Chart, ChartEditor, type ChartEditorProps, type ChartProps, type CheckboxComponentProps, type ColorMapType, type Column$1 as Column, type ContainerComponentProps, Dashboard, DashboardFilterType, type DashboardProps, type DashboardSectionComponentProps, DateOperator, type DateRange, type DateRangePickerComponentProps, type DateRangePickerOption, type DeleteButtonComponentProps, type DraggableColumnComponentProps, type EventBreadcrumb, type EventContext, type EventError, type EventMetadata, type EventTracking, type EventUser, type Filter, type FilterPopoverComponentProps, FilterType, type HeaderComponentProps, type HeaderProps, type InternalDashboardDateFilter, type InternalDashboardTenantFilter, type InternalFilter, type LabelComponentProps, type LimitPopoverComponentProps, type ModalComponentProps, NullOperator, NumberOperator, type Option, type Pivot, type PopoverComponentProps, type QuillCustomInterval, type QuillCustomRelativeInterval, type QuillCustomRepeatingInterval, type QuillCustomStaticInterval, QuillProvider, type QuillProviderProps, type QuillReport, type QuillReportProps, type QuillTheme, type QuillWeekInterval, ReportBuilder$1 as ReportBuilder, type ReportBuilderColumn, type ReportBuilderLimit, type ReportBuilderProps, type ReportBuilderSort, type ReportBuilderState, ReportTable, SINGLE_TENANT, SQLEditor, type SQLEditorProps, SaveReport, SchemaListComponent, type SelectColumnComponentProps, type SelectComponentProps, type SidebarComponentProps, type SidebarHeadingComponentProps, type SortPopoverComponentProps, StaticChart, type StaticChartProps, StringOperator, Table$1 as Table, type TableComponentProps, type TableProps, type TabsComponentProps, type TextComponentProps, type TextInputComponentProps, ThemeContext, downloadCSV, quillFormat as format, useAllReports, useAskQuill, useDashboard, useDashboardInternal, useDashboardReport, useDashboardReports, useDashboards, useExport, useMemoizedRows, useQuill, useReportBuilder, useReports, useTenants, useVirtualTables };
3429
+ export { ALL_TENANTS, AddColumns, AddFilters, AddLimit, AddPivot, AddSort, type AxisFormat, type ButtonComponentProps, Calculation, Chart, ChartEditor, type ChartEditorProps, type ChartProps, type CheckboxComponentProps, type ColorMapType, type Column$1 as Column, type ContainerComponentProps, Dashboard, type DashboardFilter, DashboardFilterType, type DashboardProps, type DashboardSectionComponentProps, DateOperator, type DateRange, type DateRangePickerComponentProps, type DateRangePickerOption, type DeleteButtonComponentProps, type DraggableColumnComponentProps, type EventBreadcrumb, type EventContext, type EventError, type EventMetadata, type EventTracking, type EventUser, type Filter, type FilterPopoverComponentProps, FilterType, type HeaderComponentProps, type HeaderProps, type InternalDashboardDateFilter, type InternalDashboardTenantFilter, type InternalFilter, type LabelComponentProps, type LimitPopoverComponentProps, type ModalComponentProps, NullOperator, NumberOperator, type Option, type Pivot, type PopoverComponentProps, type QuillCustomInterval, type QuillCustomRelativeInterval, type QuillCustomRepeatingInterval, type QuillCustomStaticInterval, QuillProvider, type QuillProviderProps, type QuillReport, type QuillReportProps, type QuillTheme, type QuillWeekInterval, ReportBuilder$1 as ReportBuilder, type ReportBuilderColumn, type ReportBuilderLimit, type ReportBuilderProps, type ReportBuilderSort, type ReportBuilderState, ReportTable, SINGLE_TENANT, SQLEditor, type SQLEditorProps, SaveReport, SchemaListComponent, type SelectColumnComponentProps, type SelectComponentProps, type SidebarComponentProps, type SidebarHeadingComponentProps, type SortPopoverComponentProps, StaticChart, type StaticChartProps, StringOperator, Table$1 as Table, type TableComponentProps, type TableProps, type TabsComponentProps, type TextComponentProps, type TextInputComponentProps, ThemeContext, downloadCSV, quillFormat as format, useAllReports, useAskQuill, useDashboard, useDashboardInternal, useDashboardReport, useDashboardReports, useDashboards, useExport, useMemoizedRows, useQuill, useReportBuilder, useReports, useTenants, useVirtualTables };
package/dist/index.js CHANGED
@@ -1213,11 +1213,29 @@ var convertCustomIntervalToDateRange = (interval2) => {
1213
1213
  endDate: endOfToday()
1214
1214
  };
1215
1215
  case "repeating": {
1216
- const currentMonth = (/* @__PURE__ */ new Date()).getMonth() + 1;
1217
- const currentDay = (/* @__PURE__ */ new Date()).getDate();
1218
- const currentSubInterval = interval2.subIntervals.find(
1219
- (subInterval) => subInterval.startDate.month <= currentMonth && subInterval.endDate.month >= currentMonth && subInterval.startDate.day <= currentDay && subInterval.endDate.day >= currentDay
1220
- );
1216
+ const currentDate = /* @__PURE__ */ new Date();
1217
+ const currentYear = currentDate.getFullYear();
1218
+ const currentSubInterval = interval2.subIntervals.find((subInterval) => {
1219
+ const intervalStart = set(/* @__PURE__ */ new Date(), {
1220
+ year: currentYear,
1221
+ month: subInterval.startDate.month - 1,
1222
+ // convert 1-index to 0-index
1223
+ date: subInterval.startDate.day,
1224
+ hours: 0,
1225
+ minutes: 0,
1226
+ seconds: 0
1227
+ });
1228
+ const intervalEnd = set(/* @__PURE__ */ new Date(), {
1229
+ year: currentYear,
1230
+ month: subInterval.endDate.month - 1,
1231
+ // convert 1-index to 0-index
1232
+ date: subInterval.endDate.day,
1233
+ hours: 23,
1234
+ minutes: 59,
1235
+ seconds: 59
1236
+ });
1237
+ return currentDate >= intervalStart && currentDate <= intervalEnd;
1238
+ });
1221
1239
  if (!currentSubInterval) {
1222
1240
  throw new Error("Date is not valid in this interval");
1223
1241
  }
@@ -1387,10 +1405,29 @@ var convertPresetOptionsToSelectableList = (customIntervals, defaultIntervals) =
1387
1405
  let currentDate = endOfDay(option.loopEnd ?? /* @__PURE__ */ new Date());
1388
1406
  const cutoffDate = option.loopStart;
1389
1407
  while (currentDate > cutoffDate) {
1390
- const currentMonth = currentDate.getMonth() + 1;
1391
- const currentDay = currentDate.getDate();
1408
+ const loopCurrentYear = currentDate.getFullYear();
1392
1409
  const currentSubInterval = option.subIntervals.find(
1393
- (subInterval) => subInterval.startDate.month <= currentMonth && subInterval.endDate.month >= currentMonth && subInterval.startDate.day <= currentDay && subInterval.endDate.day >= currentDay
1410
+ (subInterval) => {
1411
+ const intervalStart2 = set(/* @__PURE__ */ new Date(), {
1412
+ year: loopCurrentYear,
1413
+ month: subInterval.startDate.month - 1,
1414
+ // convert 1-index to 0-index
1415
+ date: subInterval.startDate.day,
1416
+ hours: 0,
1417
+ minutes: 0,
1418
+ seconds: 0
1419
+ });
1420
+ const intervalEnd = set(/* @__PURE__ */ new Date(), {
1421
+ year: loopCurrentYear,
1422
+ month: subInterval.endDate.month - 1,
1423
+ // convert 1-index to 0-index
1424
+ date: subInterval.endDate.day,
1425
+ hours: 23,
1426
+ minutes: 59,
1427
+ seconds: 59
1428
+ });
1429
+ return currentDate >= intervalStart2 && currentDate <= intervalEnd;
1430
+ }
1394
1431
  );
1395
1432
  if (!currentSubInterval) {
1396
1433
  return [];
@@ -1409,6 +1446,7 @@ var convertPresetOptionsToSelectableList = (customIntervals, defaultIntervals) =
1409
1446
  startDate: set(/* @__PURE__ */ new Date(), {
1410
1447
  year: currentYear,
1411
1448
  month: currentSubInterval.startDate.month - 1,
1449
+ // convert 1-index to 0-index
1412
1450
  date: currentSubInterval.startDate.day,
1413
1451
  minutes: 0,
1414
1452
  hours: 0,
@@ -1417,6 +1455,7 @@ var convertPresetOptionsToSelectableList = (customIntervals, defaultIntervals) =
1417
1455
  endDate: set(/* @__PURE__ */ new Date(), {
1418
1456
  year: currentYear,
1419
1457
  month: currentSubInterval.endDate.month - 1,
1458
+ // convert 1-index to 0-index
1420
1459
  date: currentSubInterval.endDate.day,
1421
1460
  minutes: 59,
1422
1461
  hours: 23,
@@ -1426,6 +1465,7 @@ var convertPresetOptionsToSelectableList = (customIntervals, defaultIntervals) =
1426
1465
  const intervalStart = set(/* @__PURE__ */ new Date(), {
1427
1466
  year: currentYear,
1428
1467
  month: currentSubInterval.startDate.month - 1,
1468
+ // convert 1-index to 0-index
1429
1469
  date: currentSubInterval.startDate.day
1430
1470
  });
1431
1471
  currentDate = sub(intervalStart, { days: 1 });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quillsql/react",
3
- "version": "2.15.8",
3
+ "version": "2.15.9",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -37,7 +37,7 @@
37
37
  "fast-deep-equal": "^3.1.3",
38
38
  "jspdf": "^3.0.1",
39
39
  "react-day-picker": "^9.7.0",
40
- "react-simple-maps": "git+https://github.com/zcreativelabs/react-simple-maps.git",
40
+ "react-simple-maps": "git+https://github.com/zcreativelabs/react-simple-maps.git#b322da59a76fa789de1de77165bbef6df9beb0ef",
41
41
  "recharts": "^2.13.0"
42
42
  },
43
43
  "devDependencies": {