@quillsql/react 2.15.10 → 2.15.12
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 +19 -16
- package/dist/index.js +19 -16
- package/package.json +2 -1
package/dist/index.cjs
CHANGED
|
@@ -20034,10 +20034,12 @@ function createTableNameToTableAliasMap(ast) {
|
|
|
20034
20034
|
if (ast.from) {
|
|
20035
20035
|
for (const table of ast.from) {
|
|
20036
20036
|
const tableObject = recursiveSearchByKeys(table, ["table", "as"]);
|
|
20037
|
-
if (tableObject
|
|
20038
|
-
|
|
20039
|
-
|
|
20040
|
-
|
|
20037
|
+
if (tableObject) {
|
|
20038
|
+
if (tableObject.as) {
|
|
20039
|
+
tableNameToTableAliasMap[tableObject.as] = tableObject.table;
|
|
20040
|
+
} else {
|
|
20041
|
+
tableNameToTableAliasMap[tableObject.table] = tableObject.table;
|
|
20042
|
+
}
|
|
20041
20043
|
}
|
|
20042
20044
|
}
|
|
20043
20045
|
}
|
|
@@ -20047,10 +20049,12 @@ function createTableNameToTableAliasMap(ast) {
|
|
|
20047
20049
|
if (astFrom) {
|
|
20048
20050
|
for (const table of astFrom) {
|
|
20049
20051
|
const tableObject = recursiveSearchByKeys(table, ["table", "as"]);
|
|
20050
|
-
if (tableObject
|
|
20051
|
-
|
|
20052
|
-
|
|
20053
|
-
|
|
20052
|
+
if (tableObject) {
|
|
20053
|
+
if (tableObject.as) {
|
|
20054
|
+
tableNameToTableAliasMap[tableObject.as] = tableObject.table;
|
|
20055
|
+
} else {
|
|
20056
|
+
tableNameToTableAliasMap[tableObject.table] = tableObject.table;
|
|
20057
|
+
}
|
|
20054
20058
|
}
|
|
20055
20059
|
}
|
|
20056
20060
|
}
|
|
@@ -22340,10 +22344,6 @@ var ContextProvider = ({
|
|
|
22340
22344
|
newSectionOrder = newSectionOrder.map((section) => {
|
|
22341
22345
|
if (section.section === report.section && !section.reportOrder.includes(report.id)) {
|
|
22342
22346
|
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
22347
|
}
|
|
22348
22348
|
return section;
|
|
22349
22349
|
});
|
|
@@ -43667,7 +43667,8 @@ function ChartBuilder({
|
|
|
43667
43667
|
referencedColumns,
|
|
43668
43668
|
includeCustomFields: includeCustomFields || containsCustomFields,
|
|
43669
43669
|
template: tenants ? void 0 : report && !isAdmin && formData.template ? false : formData.template,
|
|
43670
|
-
|
|
43670
|
+
adminMode: isAdmin,
|
|
43671
|
+
flags: containsCustomFields && customTenantAccess ? currentTenantAsFormFlags : formFlags ? Object.fromEntries(
|
|
43671
43672
|
Object.entries(formFlags).filter(([, value]) => value.length > 0).map(([key, value]) => {
|
|
43672
43673
|
return [
|
|
43673
43674
|
key,
|
|
@@ -43688,7 +43689,8 @@ function ChartBuilder({
|
|
|
43688
43689
|
dashboardItemId,
|
|
43689
43690
|
client,
|
|
43690
43691
|
getToken,
|
|
43691
|
-
eventTracking
|
|
43692
|
+
eventTracking,
|
|
43693
|
+
tenants
|
|
43692
43694
|
});
|
|
43693
43695
|
if (resp && resp.name !== "error") {
|
|
43694
43696
|
const data = {
|
|
@@ -46002,7 +46004,8 @@ function SQLEditor({
|
|
|
46002
46004
|
client,
|
|
46003
46005
|
task: "quillai",
|
|
46004
46006
|
metadata: {
|
|
46005
|
-
initialQuestion: sqlPrompt
|
|
46007
|
+
initialQuestion: sqlPrompt,
|
|
46008
|
+
existingQuery: query
|
|
46006
46009
|
}
|
|
46007
46010
|
});
|
|
46008
46011
|
setQuery(resp.message);
|
|
@@ -46644,7 +46647,7 @@ function SQLEditor({
|
|
|
46644
46647
|
},
|
|
46645
46648
|
children: [
|
|
46646
46649
|
errorMessage,
|
|
46647
|
-
errorMessage !== "No data found" && errorMessage !== "No query found" &&
|
|
46650
|
+
errorMessage !== "No data found" && errorMessage !== "No query found" && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
46648
46651
|
SecondaryButtonComponent,
|
|
46649
46652
|
{
|
|
46650
46653
|
onClick: handleFixWithAI,
|
package/dist/index.js
CHANGED
|
@@ -20046,10 +20046,12 @@ function createTableNameToTableAliasMap(ast) {
|
|
|
20046
20046
|
if (ast.from) {
|
|
20047
20047
|
for (const table of ast.from) {
|
|
20048
20048
|
const tableObject = recursiveSearchByKeys(table, ["table", "as"]);
|
|
20049
|
-
if (tableObject
|
|
20050
|
-
|
|
20051
|
-
|
|
20052
|
-
|
|
20049
|
+
if (tableObject) {
|
|
20050
|
+
if (tableObject.as) {
|
|
20051
|
+
tableNameToTableAliasMap[tableObject.as] = tableObject.table;
|
|
20052
|
+
} else {
|
|
20053
|
+
tableNameToTableAliasMap[tableObject.table] = tableObject.table;
|
|
20054
|
+
}
|
|
20053
20055
|
}
|
|
20054
20056
|
}
|
|
20055
20057
|
}
|
|
@@ -20059,10 +20061,12 @@ function createTableNameToTableAliasMap(ast) {
|
|
|
20059
20061
|
if (astFrom) {
|
|
20060
20062
|
for (const table of astFrom) {
|
|
20061
20063
|
const tableObject = recursiveSearchByKeys(table, ["table", "as"]);
|
|
20062
|
-
if (tableObject
|
|
20063
|
-
|
|
20064
|
-
|
|
20065
|
-
|
|
20064
|
+
if (tableObject) {
|
|
20065
|
+
if (tableObject.as) {
|
|
20066
|
+
tableNameToTableAliasMap[tableObject.as] = tableObject.table;
|
|
20067
|
+
} else {
|
|
20068
|
+
tableNameToTableAliasMap[tableObject.table] = tableObject.table;
|
|
20069
|
+
}
|
|
20066
20070
|
}
|
|
20067
20071
|
}
|
|
20068
20072
|
}
|
|
@@ -22352,10 +22356,6 @@ var ContextProvider = ({
|
|
|
22352
22356
|
newSectionOrder = newSectionOrder.map((section) => {
|
|
22353
22357
|
if (section.section === report.section && !section.reportOrder.includes(report.id)) {
|
|
22354
22358
|
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
22359
|
}
|
|
22360
22360
|
return section;
|
|
22361
22361
|
});
|
|
@@ -43797,7 +43797,8 @@ function ChartBuilder({
|
|
|
43797
43797
|
referencedColumns,
|
|
43798
43798
|
includeCustomFields: includeCustomFields || containsCustomFields,
|
|
43799
43799
|
template: tenants ? void 0 : report && !isAdmin && formData.template ? false : formData.template,
|
|
43800
|
-
|
|
43800
|
+
adminMode: isAdmin,
|
|
43801
|
+
flags: containsCustomFields && customTenantAccess ? currentTenantAsFormFlags : formFlags ? Object.fromEntries(
|
|
43801
43802
|
Object.entries(formFlags).filter(([, value]) => value.length > 0).map(([key, value]) => {
|
|
43802
43803
|
return [
|
|
43803
43804
|
key,
|
|
@@ -43818,7 +43819,8 @@ function ChartBuilder({
|
|
|
43818
43819
|
dashboardItemId,
|
|
43819
43820
|
client,
|
|
43820
43821
|
getToken,
|
|
43821
|
-
eventTracking
|
|
43822
|
+
eventTracking,
|
|
43823
|
+
tenants
|
|
43822
43824
|
});
|
|
43823
43825
|
if (resp && resp.name !== "error") {
|
|
43824
43826
|
const data = {
|
|
@@ -46132,7 +46134,8 @@ function SQLEditor({
|
|
|
46132
46134
|
client,
|
|
46133
46135
|
task: "quillai",
|
|
46134
46136
|
metadata: {
|
|
46135
|
-
initialQuestion: sqlPrompt
|
|
46137
|
+
initialQuestion: sqlPrompt,
|
|
46138
|
+
existingQuery: query
|
|
46136
46139
|
}
|
|
46137
46140
|
});
|
|
46138
46141
|
setQuery(resp.message);
|
|
@@ -46774,7 +46777,7 @@ function SQLEditor({
|
|
|
46774
46777
|
},
|
|
46775
46778
|
children: [
|
|
46776
46779
|
errorMessage,
|
|
46777
|
-
errorMessage !== "No data found" && errorMessage !== "No query found" &&
|
|
46780
|
+
errorMessage !== "No data found" && errorMessage !== "No query found" && /* @__PURE__ */ jsx66(
|
|
46778
46781
|
SecondaryButtonComponent,
|
|
46779
46782
|
{
|
|
46780
46783
|
onClick: handleFixWithAI,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quillsql/react",
|
|
3
|
-
"version": "2.15.
|
|
3
|
+
"version": "2.15.12",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"@types/d3-transition": "^3.0.9",
|
|
55
55
|
"@types/eslint": "^8.56.1",
|
|
56
56
|
"@types/node": "^20.10.6",
|
|
57
|
+
"@types/pluralize": "^0.0.33",
|
|
57
58
|
"@types/react": "^18",
|
|
58
59
|
"@types/react-dom": "^18",
|
|
59
60
|
"@types/react-simple-maps": "^3.0.6",
|