@quillsql/react 2.16.0 → 2.16.2

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.d.cts CHANGED
@@ -569,6 +569,49 @@ type PivotData = {
569
569
  comparisonPivotQuery?: string;
570
570
  };
571
571
 
572
+ type SortDirection = 'asc' | 'desc' | 'ASC' | 'DESC';
573
+ type ReportBuilderTable = {
574
+ name: string;
575
+ alias?: string;
576
+ join?: JoinInfo;
577
+ };
578
+ declare enum JoinType {
579
+ JOIN = "JOIN",
580
+ INNER = "INNER JOIN",
581
+ LEFT = "LEFT JOIN",
582
+ RIGHT = "RIGHT JOIN",
583
+ FULL = "FULL JOIN"
584
+ }
585
+ type JoinInfo = {
586
+ type: JoinType;
587
+ condition: JoinCondition;
588
+ };
589
+ type JoinCondition = {
590
+ operator: string;
591
+ left: ReportBuilderColumn;
592
+ right: ReportBuilderColumn;
593
+ };
594
+ type ReportBuilderColumn = {
595
+ field: string;
596
+ table: string;
597
+ alias?: string;
598
+ };
599
+ type ReportBuilderSort = {
600
+ field: string;
601
+ direction: SortDirection;
602
+ };
603
+ type ReportBuilderLimit = {
604
+ value: number;
605
+ };
606
+ type ReportBuilderState = {
607
+ tables: ReportBuilderTable[];
608
+ columns: ReportBuilderColumn[];
609
+ filterStack: FilterTreeNode[];
610
+ pivot: Pivot | null;
611
+ sort: ReportBuilderSort[];
612
+ limit: ReportBuilderLimit | null;
613
+ };
614
+
572
615
  /**
573
616
  * ## QuillReport
574
617
  * Represents an individual item on a dashboard.
@@ -708,6 +751,11 @@ interface QuillReportInternal extends QuillReport {
708
751
  flags?: {
709
752
  [tenantField: string]: string[] | 'QUILL_ALL_TENANTS';
710
753
  };
754
+ /**
755
+ * ReportBuilderState used for ReportBuilder reports.
756
+ * When present, backend will generate SQL from this state instead of using queryString.
757
+ */
758
+ reportBuilderState?: ReportBuilderState;
711
759
  }
712
760
 
713
761
  /**
@@ -2530,49 +2578,6 @@ interface UniqueValuesByColumn {
2530
2578
  [column: string]: string[];
2531
2579
  }
2532
2580
 
2533
- type SortDirection = 'asc' | 'desc' | 'ASC' | 'DESC';
2534
- type ReportBuilderTable = {
2535
- name: string;
2536
- alias?: string;
2537
- join?: JoinInfo;
2538
- };
2539
- declare enum JoinType {
2540
- JOIN = "JOIN",
2541
- INNER = "INNER JOIN",
2542
- LEFT = "LEFT JOIN",
2543
- RIGHT = "RIGHT JOIN",
2544
- FULL = "FULL JOIN"
2545
- }
2546
- type JoinInfo = {
2547
- type: JoinType;
2548
- condition: JoinCondition;
2549
- };
2550
- type JoinCondition = {
2551
- operator: string;
2552
- left: ReportBuilderColumn;
2553
- right: ReportBuilderColumn;
2554
- };
2555
- type ReportBuilderColumn = {
2556
- field: string;
2557
- table: string;
2558
- alias?: string;
2559
- };
2560
- type ReportBuilderSort = {
2561
- field: string;
2562
- direction: SortDirection;
2563
- };
2564
- type ReportBuilderLimit = {
2565
- value: number;
2566
- };
2567
- type ReportBuilderState = {
2568
- tables: ReportBuilderTable[];
2569
- columns: ReportBuilderColumn[];
2570
- filterStack: FilterTreeNode[];
2571
- pivot: Pivot | null;
2572
- sort: ReportBuilderSort[];
2573
- limit: ReportBuilderLimit | null;
2574
- };
2575
-
2576
2581
  type ForeignKeyMap = {
2577
2582
  [table: string]: {
2578
2583
  foreignTable: string;
@@ -2588,7 +2593,6 @@ type ReportBuilder = {
2588
2593
  limit: ReportBuilderLimit | null;
2589
2594
  filterStack: FilterTreeNode[];
2590
2595
  state: ReportBuilderState;
2591
- activeQuery: string;
2592
2596
  tempReport: QuillReportInternal;
2593
2597
  stateStack: ReportBuilderState[];
2594
2598
  poppedStateStack: ReportBuilderState[];
package/dist/index.d.ts CHANGED
@@ -569,6 +569,49 @@ type PivotData = {
569
569
  comparisonPivotQuery?: string;
570
570
  };
571
571
 
572
+ type SortDirection = 'asc' | 'desc' | 'ASC' | 'DESC';
573
+ type ReportBuilderTable = {
574
+ name: string;
575
+ alias?: string;
576
+ join?: JoinInfo;
577
+ };
578
+ declare enum JoinType {
579
+ JOIN = "JOIN",
580
+ INNER = "INNER JOIN",
581
+ LEFT = "LEFT JOIN",
582
+ RIGHT = "RIGHT JOIN",
583
+ FULL = "FULL JOIN"
584
+ }
585
+ type JoinInfo = {
586
+ type: JoinType;
587
+ condition: JoinCondition;
588
+ };
589
+ type JoinCondition = {
590
+ operator: string;
591
+ left: ReportBuilderColumn;
592
+ right: ReportBuilderColumn;
593
+ };
594
+ type ReportBuilderColumn = {
595
+ field: string;
596
+ table: string;
597
+ alias?: string;
598
+ };
599
+ type ReportBuilderSort = {
600
+ field: string;
601
+ direction: SortDirection;
602
+ };
603
+ type ReportBuilderLimit = {
604
+ value: number;
605
+ };
606
+ type ReportBuilderState = {
607
+ tables: ReportBuilderTable[];
608
+ columns: ReportBuilderColumn[];
609
+ filterStack: FilterTreeNode[];
610
+ pivot: Pivot | null;
611
+ sort: ReportBuilderSort[];
612
+ limit: ReportBuilderLimit | null;
613
+ };
614
+
572
615
  /**
573
616
  * ## QuillReport
574
617
  * Represents an individual item on a dashboard.
@@ -708,6 +751,11 @@ interface QuillReportInternal extends QuillReport {
708
751
  flags?: {
709
752
  [tenantField: string]: string[] | 'QUILL_ALL_TENANTS';
710
753
  };
754
+ /**
755
+ * ReportBuilderState used for ReportBuilder reports.
756
+ * When present, backend will generate SQL from this state instead of using queryString.
757
+ */
758
+ reportBuilderState?: ReportBuilderState;
711
759
  }
712
760
 
713
761
  /**
@@ -2530,49 +2578,6 @@ interface UniqueValuesByColumn {
2530
2578
  [column: string]: string[];
2531
2579
  }
2532
2580
 
2533
- type SortDirection = 'asc' | 'desc' | 'ASC' | 'DESC';
2534
- type ReportBuilderTable = {
2535
- name: string;
2536
- alias?: string;
2537
- join?: JoinInfo;
2538
- };
2539
- declare enum JoinType {
2540
- JOIN = "JOIN",
2541
- INNER = "INNER JOIN",
2542
- LEFT = "LEFT JOIN",
2543
- RIGHT = "RIGHT JOIN",
2544
- FULL = "FULL JOIN"
2545
- }
2546
- type JoinInfo = {
2547
- type: JoinType;
2548
- condition: JoinCondition;
2549
- };
2550
- type JoinCondition = {
2551
- operator: string;
2552
- left: ReportBuilderColumn;
2553
- right: ReportBuilderColumn;
2554
- };
2555
- type ReportBuilderColumn = {
2556
- field: string;
2557
- table: string;
2558
- alias?: string;
2559
- };
2560
- type ReportBuilderSort = {
2561
- field: string;
2562
- direction: SortDirection;
2563
- };
2564
- type ReportBuilderLimit = {
2565
- value: number;
2566
- };
2567
- type ReportBuilderState = {
2568
- tables: ReportBuilderTable[];
2569
- columns: ReportBuilderColumn[];
2570
- filterStack: FilterTreeNode[];
2571
- pivot: Pivot | null;
2572
- sort: ReportBuilderSort[];
2573
- limit: ReportBuilderLimit | null;
2574
- };
2575
-
2576
2581
  type ForeignKeyMap = {
2577
2582
  [table: string]: {
2578
2583
  foreignTable: string;
@@ -2588,7 +2593,6 @@ type ReportBuilder = {
2588
2593
  limit: ReportBuilderLimit | null;
2589
2594
  filterStack: FilterTreeNode[];
2590
2595
  state: ReportBuilderState;
2591
- activeQuery: string;
2592
2596
  tempReport: QuillReportInternal;
2593
2597
  stateStack: ReportBuilderState[];
2594
2598
  poppedStateStack: ReportBuilderState[];