@quillsql/react 2.15.11 → 2.15.13
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 +30 -17
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +30 -17
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -446,7 +446,8 @@ var DATE_FORMAT_TYPES = [
|
|
|
446
446
|
"hh_ap_pm",
|
|
447
447
|
"MMM_dd-MMM_dd",
|
|
448
448
|
"MMM_dd_hh:mm_ap_pm",
|
|
449
|
-
"wo, yyyy"
|
|
449
|
+
"wo, yyyy",
|
|
450
|
+
"yyyy_mm_dd"
|
|
450
451
|
];
|
|
451
452
|
var NUMBER_FORMAT_TYPES = [
|
|
452
453
|
"whole_number",
|
|
@@ -502,6 +503,8 @@ var valueFormatter = ({
|
|
|
502
503
|
return format_MMM_dd_hh_mm_ap_pm(value);
|
|
503
504
|
case "wo, yyyy":
|
|
504
505
|
return format_wo_yyyy(value);
|
|
506
|
+
case "yyyy_mm_dd":
|
|
507
|
+
return format_yyyy_mm_dd(value);
|
|
505
508
|
default:
|
|
506
509
|
return formatString(value);
|
|
507
510
|
}
|
|
@@ -550,6 +553,8 @@ var quillFormat = ({
|
|
|
550
553
|
return format_MMM_dd_hh_mm_ap_pm(value);
|
|
551
554
|
case "wo, yyyy":
|
|
552
555
|
return format_wo_yyyy(value);
|
|
556
|
+
case "yyyy_mm_dd":
|
|
557
|
+
return format_yyyy_mm_dd(value);
|
|
553
558
|
default:
|
|
554
559
|
return formatString(value);
|
|
555
560
|
}
|
|
@@ -655,6 +660,7 @@ var format_YYYY = (value) => _getUTCDateHelper(value, "yyyy");
|
|
|
655
660
|
var format_MMM_yyyy = (value) => _getUTCDateHelper(value, "MMM yyyy");
|
|
656
661
|
var format_hh_ap_pm = (value) => _getUTCDateHelper(value, "hh:mm aa");
|
|
657
662
|
var format_MMM_d = (value) => _getUTCDateHelper(value, "MMM d");
|
|
663
|
+
var format_yyyy_mm_dd = (value) => _getUTCDateHelper(value, "yyyy-MM-dd");
|
|
658
664
|
var format_MMM_dd_yyyy = (value) => {
|
|
659
665
|
return _getUTCDateHelper(value, "dd MMM yyyy");
|
|
660
666
|
};
|
|
@@ -19393,6 +19399,7 @@ var dateFormatOptions = [
|
|
|
19393
19399
|
"MMM_dd_yyyy",
|
|
19394
19400
|
"MMM_dd_hh:mm_ap_pm",
|
|
19395
19401
|
"hh_ap_pm",
|
|
19402
|
+
"yyyy_mm_dd",
|
|
19396
19403
|
"date",
|
|
19397
19404
|
"timestamptz"
|
|
19398
19405
|
];
|
|
@@ -19409,7 +19416,8 @@ var DATE_OPTIONS = [
|
|
|
19409
19416
|
{ value: "MMM_dd", label: "day" },
|
|
19410
19417
|
{ value: "MMM_dd_yyyy", label: "day and year" },
|
|
19411
19418
|
{ value: "MMM_dd_hh:mm_ap_pm", label: "day and time" },
|
|
19412
|
-
{ value: "hh_ap_pm", label: "hour" }
|
|
19419
|
+
{ value: "hh_ap_pm", label: "hour" },
|
|
19420
|
+
{ value: "yyyy_mm_dd", label: "intl date (yyyy-mm-dd)" }
|
|
19413
19421
|
];
|
|
19414
19422
|
var ALL_FORMAT_OPTIONS = [
|
|
19415
19423
|
...NUMBER_OPTIONS,
|
|
@@ -20034,10 +20042,12 @@ function createTableNameToTableAliasMap(ast) {
|
|
|
20034
20042
|
if (ast.from) {
|
|
20035
20043
|
for (const table of ast.from) {
|
|
20036
20044
|
const tableObject = recursiveSearchByKeys(table, ["table", "as"]);
|
|
20037
|
-
if (tableObject
|
|
20038
|
-
|
|
20039
|
-
|
|
20040
|
-
|
|
20045
|
+
if (tableObject) {
|
|
20046
|
+
if (tableObject.as) {
|
|
20047
|
+
tableNameToTableAliasMap[tableObject.as] = tableObject.table;
|
|
20048
|
+
} else {
|
|
20049
|
+
tableNameToTableAliasMap[tableObject.table] = tableObject.table;
|
|
20050
|
+
}
|
|
20041
20051
|
}
|
|
20042
20052
|
}
|
|
20043
20053
|
}
|
|
@@ -20047,10 +20057,12 @@ function createTableNameToTableAliasMap(ast) {
|
|
|
20047
20057
|
if (astFrom) {
|
|
20048
20058
|
for (const table of astFrom) {
|
|
20049
20059
|
const tableObject = recursiveSearchByKeys(table, ["table", "as"]);
|
|
20050
|
-
if (tableObject
|
|
20051
|
-
|
|
20052
|
-
|
|
20053
|
-
|
|
20060
|
+
if (tableObject) {
|
|
20061
|
+
if (tableObject.as) {
|
|
20062
|
+
tableNameToTableAliasMap[tableObject.as] = tableObject.table;
|
|
20063
|
+
} else {
|
|
20064
|
+
tableNameToTableAliasMap[tableObject.table] = tableObject.table;
|
|
20065
|
+
}
|
|
20054
20066
|
}
|
|
20055
20067
|
}
|
|
20056
20068
|
}
|
|
@@ -22340,10 +22352,6 @@ var ContextProvider = ({
|
|
|
22340
22352
|
newSectionOrder = newSectionOrder.map((section) => {
|
|
22341
22353
|
if (section.section === report.section && !section.reportOrder.includes(report.id)) {
|
|
22342
22354
|
section.reportOrder.push(report.id);
|
|
22343
|
-
} else if (section.section !== report.section && section.reportOrder.includes(report.id)) {
|
|
22344
|
-
section.reportOrder = section.reportOrder.filter(
|
|
22345
|
-
(id2) => id2 !== report.id
|
|
22346
|
-
);
|
|
22347
22355
|
}
|
|
22348
22356
|
return section;
|
|
22349
22357
|
});
|
|
@@ -28038,6 +28046,8 @@ var axisFormatter = ({ value, field, fields }) => {
|
|
|
28038
28046
|
return format_MMM_dd_hh_mm_ap_pm2(value);
|
|
28039
28047
|
case "wo, yyyy":
|
|
28040
28048
|
return format_wo_yyyy2(value);
|
|
28049
|
+
case "yyyy_mm_dd":
|
|
28050
|
+
return format_yyyy_mm_dd2(value);
|
|
28041
28051
|
default:
|
|
28042
28052
|
return formatString2(value);
|
|
28043
28053
|
}
|
|
@@ -28113,6 +28123,7 @@ var format_MMM_dd = (value) => _getUTCDateHelper2(value, "dd MMM");
|
|
|
28113
28123
|
var format_MMM_yyyy2 = (value) => _getUTCDateHelper2(value, "MMM yyyy");
|
|
28114
28124
|
var format_hh_ap_pm2 = (value) => _getUTCDateHelper2(value, "hh:mm aa");
|
|
28115
28125
|
var format_MMM_dd_yyyy2 = (value) => _getUTCDateHelper2(value, "dd MMM yyyy");
|
|
28126
|
+
var format_yyyy_mm_dd2 = (value) => _getUTCDateHelper2(value, "yyyy-MM-dd");
|
|
28116
28127
|
var format_MMM_dd_MMM_dd = (value) => {
|
|
28117
28128
|
const utcDate = (0, import_date_fns_tz3.utcToZonedTime)(new Date(value), "UTC");
|
|
28118
28129
|
if (!(0, import_date_fns9.isValid)(utcDate)) return "Invalid date";
|
|
@@ -43667,7 +43678,8 @@ function ChartBuilder({
|
|
|
43667
43678
|
referencedColumns,
|
|
43668
43679
|
includeCustomFields: includeCustomFields || containsCustomFields,
|
|
43669
43680
|
template: tenants ? void 0 : report && !isAdmin && formData.template ? false : formData.template,
|
|
43670
|
-
|
|
43681
|
+
adminMode: isAdmin,
|
|
43682
|
+
flags: containsCustomFields && customTenantAccess ? currentTenantAsFormFlags : formFlags ? Object.fromEntries(
|
|
43671
43683
|
Object.entries(formFlags).filter(([, value]) => value.length > 0).map(([key, value]) => {
|
|
43672
43684
|
return [
|
|
43673
43685
|
key,
|
|
@@ -46003,7 +46015,8 @@ function SQLEditor({
|
|
|
46003
46015
|
client,
|
|
46004
46016
|
task: "quillai",
|
|
46005
46017
|
metadata: {
|
|
46006
|
-
initialQuestion: sqlPrompt
|
|
46018
|
+
initialQuestion: sqlPrompt,
|
|
46019
|
+
existingQuery: query
|
|
46007
46020
|
}
|
|
46008
46021
|
});
|
|
46009
46022
|
setQuery(resp.message);
|
|
@@ -46645,7 +46658,7 @@ function SQLEditor({
|
|
|
46645
46658
|
},
|
|
46646
46659
|
children: [
|
|
46647
46660
|
errorMessage,
|
|
46648
|
-
errorMessage !== "No data found" && errorMessage !== "No query found" &&
|
|
46661
|
+
errorMessage !== "No data found" && errorMessage !== "No query found" && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
46649
46662
|
SecondaryButtonComponent,
|
|
46650
46663
|
{
|
|
46651
46664
|
onClick: handleFixWithAI,
|
package/dist/index.d.cts
CHANGED
|
@@ -499,7 +499,7 @@ type ColorMapType = {
|
|
|
499
499
|
/**
|
|
500
500
|
* A set of valid format values for the x and y axes of dashboard items.
|
|
501
501
|
*/
|
|
502
|
-
type AxisFormat = 'percent' | 'dollar_amount' | 'dollar_cents' | 'whole_number' | 'one_decimal_place' | 'two_decimal_places' | 'percentage' | 'string' | 'yyyy' | 'MMM_dd' | 'MMM_yyyy' | 'MMM_dd_yyyy' | 'hh_ap_pm' | 'MMM_dd-MMM_dd' | 'MMM_dd_hh:mm_ap_pm' | 'wo, yyyy';
|
|
502
|
+
type AxisFormat = 'percent' | 'dollar_amount' | 'dollar_cents' | 'whole_number' | 'one_decimal_place' | 'two_decimal_places' | 'percentage' | 'string' | 'yyyy' | 'MMM_dd' | 'MMM_yyyy' | 'MMM_dd_yyyy' | 'hh_ap_pm' | 'MMM_dd-MMM_dd' | 'MMM_dd_hh:mm_ap_pm' | 'wo, yyyy' | 'yyyy_mm_dd';
|
|
503
503
|
|
|
504
504
|
interface Column$1 {
|
|
505
505
|
field: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -499,7 +499,7 @@ type ColorMapType = {
|
|
|
499
499
|
/**
|
|
500
500
|
* A set of valid format values for the x and y axes of dashboard items.
|
|
501
501
|
*/
|
|
502
|
-
type AxisFormat = 'percent' | 'dollar_amount' | 'dollar_cents' | 'whole_number' | 'one_decimal_place' | 'two_decimal_places' | 'percentage' | 'string' | 'yyyy' | 'MMM_dd' | 'MMM_yyyy' | 'MMM_dd_yyyy' | 'hh_ap_pm' | 'MMM_dd-MMM_dd' | 'MMM_dd_hh:mm_ap_pm' | 'wo, yyyy';
|
|
502
|
+
type AxisFormat = 'percent' | 'dollar_amount' | 'dollar_cents' | 'whole_number' | 'one_decimal_place' | 'two_decimal_places' | 'percentage' | 'string' | 'yyyy' | 'MMM_dd' | 'MMM_yyyy' | 'MMM_dd_yyyy' | 'hh_ap_pm' | 'MMM_dd-MMM_dd' | 'MMM_dd_hh:mm_ap_pm' | 'wo, yyyy' | 'yyyy_mm_dd';
|
|
503
503
|
|
|
504
504
|
interface Column$1 {
|
|
505
505
|
field: string;
|
package/dist/index.js
CHANGED
|
@@ -420,7 +420,8 @@ var DATE_FORMAT_TYPES = [
|
|
|
420
420
|
"hh_ap_pm",
|
|
421
421
|
"MMM_dd-MMM_dd",
|
|
422
422
|
"MMM_dd_hh:mm_ap_pm",
|
|
423
|
-
"wo, yyyy"
|
|
423
|
+
"wo, yyyy",
|
|
424
|
+
"yyyy_mm_dd"
|
|
424
425
|
];
|
|
425
426
|
var NUMBER_FORMAT_TYPES = [
|
|
426
427
|
"whole_number",
|
|
@@ -476,6 +477,8 @@ var valueFormatter = ({
|
|
|
476
477
|
return format_MMM_dd_hh_mm_ap_pm(value);
|
|
477
478
|
case "wo, yyyy":
|
|
478
479
|
return format_wo_yyyy(value);
|
|
480
|
+
case "yyyy_mm_dd":
|
|
481
|
+
return format_yyyy_mm_dd(value);
|
|
479
482
|
default:
|
|
480
483
|
return formatString(value);
|
|
481
484
|
}
|
|
@@ -524,6 +527,8 @@ var quillFormat = ({
|
|
|
524
527
|
return format_MMM_dd_hh_mm_ap_pm(value);
|
|
525
528
|
case "wo, yyyy":
|
|
526
529
|
return format_wo_yyyy(value);
|
|
530
|
+
case "yyyy_mm_dd":
|
|
531
|
+
return format_yyyy_mm_dd(value);
|
|
527
532
|
default:
|
|
528
533
|
return formatString(value);
|
|
529
534
|
}
|
|
@@ -629,6 +634,7 @@ var format_YYYY = (value) => _getUTCDateHelper(value, "yyyy");
|
|
|
629
634
|
var format_MMM_yyyy = (value) => _getUTCDateHelper(value, "MMM yyyy");
|
|
630
635
|
var format_hh_ap_pm = (value) => _getUTCDateHelper(value, "hh:mm aa");
|
|
631
636
|
var format_MMM_d = (value) => _getUTCDateHelper(value, "MMM d");
|
|
637
|
+
var format_yyyy_mm_dd = (value) => _getUTCDateHelper(value, "yyyy-MM-dd");
|
|
632
638
|
var format_MMM_dd_yyyy = (value) => {
|
|
633
639
|
return _getUTCDateHelper(value, "dd MMM yyyy");
|
|
634
640
|
};
|
|
@@ -19405,6 +19411,7 @@ var dateFormatOptions = [
|
|
|
19405
19411
|
"MMM_dd_yyyy",
|
|
19406
19412
|
"MMM_dd_hh:mm_ap_pm",
|
|
19407
19413
|
"hh_ap_pm",
|
|
19414
|
+
"yyyy_mm_dd",
|
|
19408
19415
|
"date",
|
|
19409
19416
|
"timestamptz"
|
|
19410
19417
|
];
|
|
@@ -19421,7 +19428,8 @@ var DATE_OPTIONS = [
|
|
|
19421
19428
|
{ value: "MMM_dd", label: "day" },
|
|
19422
19429
|
{ value: "MMM_dd_yyyy", label: "day and year" },
|
|
19423
19430
|
{ value: "MMM_dd_hh:mm_ap_pm", label: "day and time" },
|
|
19424
|
-
{ value: "hh_ap_pm", label: "hour" }
|
|
19431
|
+
{ value: "hh_ap_pm", label: "hour" },
|
|
19432
|
+
{ value: "yyyy_mm_dd", label: "intl date (yyyy-mm-dd)" }
|
|
19425
19433
|
];
|
|
19426
19434
|
var ALL_FORMAT_OPTIONS = [
|
|
19427
19435
|
...NUMBER_OPTIONS,
|
|
@@ -20046,10 +20054,12 @@ function createTableNameToTableAliasMap(ast) {
|
|
|
20046
20054
|
if (ast.from) {
|
|
20047
20055
|
for (const table of ast.from) {
|
|
20048
20056
|
const tableObject = recursiveSearchByKeys(table, ["table", "as"]);
|
|
20049
|
-
if (tableObject
|
|
20050
|
-
|
|
20051
|
-
|
|
20052
|
-
|
|
20057
|
+
if (tableObject) {
|
|
20058
|
+
if (tableObject.as) {
|
|
20059
|
+
tableNameToTableAliasMap[tableObject.as] = tableObject.table;
|
|
20060
|
+
} else {
|
|
20061
|
+
tableNameToTableAliasMap[tableObject.table] = tableObject.table;
|
|
20062
|
+
}
|
|
20053
20063
|
}
|
|
20054
20064
|
}
|
|
20055
20065
|
}
|
|
@@ -20059,10 +20069,12 @@ function createTableNameToTableAliasMap(ast) {
|
|
|
20059
20069
|
if (astFrom) {
|
|
20060
20070
|
for (const table of astFrom) {
|
|
20061
20071
|
const tableObject = recursiveSearchByKeys(table, ["table", "as"]);
|
|
20062
|
-
if (tableObject
|
|
20063
|
-
|
|
20064
|
-
|
|
20065
|
-
|
|
20072
|
+
if (tableObject) {
|
|
20073
|
+
if (tableObject.as) {
|
|
20074
|
+
tableNameToTableAliasMap[tableObject.as] = tableObject.table;
|
|
20075
|
+
} else {
|
|
20076
|
+
tableNameToTableAliasMap[tableObject.table] = tableObject.table;
|
|
20077
|
+
}
|
|
20066
20078
|
}
|
|
20067
20079
|
}
|
|
20068
20080
|
}
|
|
@@ -22352,10 +22364,6 @@ var ContextProvider = ({
|
|
|
22352
22364
|
newSectionOrder = newSectionOrder.map((section) => {
|
|
22353
22365
|
if (section.section === report.section && !section.reportOrder.includes(report.id)) {
|
|
22354
22366
|
section.reportOrder.push(report.id);
|
|
22355
|
-
} else if (section.section !== report.section && section.reportOrder.includes(report.id)) {
|
|
22356
|
-
section.reportOrder = section.reportOrder.filter(
|
|
22357
|
-
(id2) => id2 !== report.id
|
|
22358
|
-
);
|
|
22359
22367
|
}
|
|
22360
22368
|
return section;
|
|
22361
22369
|
});
|
|
@@ -28066,6 +28074,8 @@ var axisFormatter = ({ value, field, fields }) => {
|
|
|
28066
28074
|
return format_MMM_dd_hh_mm_ap_pm2(value);
|
|
28067
28075
|
case "wo, yyyy":
|
|
28068
28076
|
return format_wo_yyyy2(value);
|
|
28077
|
+
case "yyyy_mm_dd":
|
|
28078
|
+
return format_yyyy_mm_dd2(value);
|
|
28069
28079
|
default:
|
|
28070
28080
|
return formatString2(value);
|
|
28071
28081
|
}
|
|
@@ -28141,6 +28151,7 @@ var format_MMM_dd = (value) => _getUTCDateHelper2(value, "dd MMM");
|
|
|
28141
28151
|
var format_MMM_yyyy2 = (value) => _getUTCDateHelper2(value, "MMM yyyy");
|
|
28142
28152
|
var format_hh_ap_pm2 = (value) => _getUTCDateHelper2(value, "hh:mm aa");
|
|
28143
28153
|
var format_MMM_dd_yyyy2 = (value) => _getUTCDateHelper2(value, "dd MMM yyyy");
|
|
28154
|
+
var format_yyyy_mm_dd2 = (value) => _getUTCDateHelper2(value, "yyyy-MM-dd");
|
|
28144
28155
|
var format_MMM_dd_MMM_dd = (value) => {
|
|
28145
28156
|
const utcDate = utcToZonedTime3(new Date(value), "UTC");
|
|
28146
28157
|
if (!isValid4(utcDate)) return "Invalid date";
|
|
@@ -43797,7 +43808,8 @@ function ChartBuilder({
|
|
|
43797
43808
|
referencedColumns,
|
|
43798
43809
|
includeCustomFields: includeCustomFields || containsCustomFields,
|
|
43799
43810
|
template: tenants ? void 0 : report && !isAdmin && formData.template ? false : formData.template,
|
|
43800
|
-
|
|
43811
|
+
adminMode: isAdmin,
|
|
43812
|
+
flags: containsCustomFields && customTenantAccess ? currentTenantAsFormFlags : formFlags ? Object.fromEntries(
|
|
43801
43813
|
Object.entries(formFlags).filter(([, value]) => value.length > 0).map(([key, value]) => {
|
|
43802
43814
|
return [
|
|
43803
43815
|
key,
|
|
@@ -46133,7 +46145,8 @@ function SQLEditor({
|
|
|
46133
46145
|
client,
|
|
46134
46146
|
task: "quillai",
|
|
46135
46147
|
metadata: {
|
|
46136
|
-
initialQuestion: sqlPrompt
|
|
46148
|
+
initialQuestion: sqlPrompt,
|
|
46149
|
+
existingQuery: query
|
|
46137
46150
|
}
|
|
46138
46151
|
});
|
|
46139
46152
|
setQuery(resp.message);
|
|
@@ -46775,7 +46788,7 @@ function SQLEditor({
|
|
|
46775
46788
|
},
|
|
46776
46789
|
children: [
|
|
46777
46790
|
errorMessage,
|
|
46778
|
-
errorMessage !== "No data found" && errorMessage !== "No query found" &&
|
|
46791
|
+
errorMessage !== "No data found" && errorMessage !== "No query found" && /* @__PURE__ */ jsx66(
|
|
46779
46792
|
SecondaryButtonComponent,
|
|
46780
46793
|
{
|
|
46781
46794
|
onClick: handleFixWithAI,
|