@quillsql/react 2.15.11 → 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 +17 -15
- package/dist/index.js +17 -15
- package/package.json +1 -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,
|
|
@@ -46003,7 +46004,8 @@ function SQLEditor({
|
|
|
46003
46004
|
client,
|
|
46004
46005
|
task: "quillai",
|
|
46005
46006
|
metadata: {
|
|
46006
|
-
initialQuestion: sqlPrompt
|
|
46007
|
+
initialQuestion: sqlPrompt,
|
|
46008
|
+
existingQuery: query
|
|
46007
46009
|
}
|
|
46008
46010
|
});
|
|
46009
46011
|
setQuery(resp.message);
|
|
@@ -46645,7 +46647,7 @@ function SQLEditor({
|
|
|
46645
46647
|
},
|
|
46646
46648
|
children: [
|
|
46647
46649
|
errorMessage,
|
|
46648
|
-
errorMessage !== "No data found" && errorMessage !== "No query found" &&
|
|
46650
|
+
errorMessage !== "No data found" && errorMessage !== "No query found" && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
46649
46651
|
SecondaryButtonComponent,
|
|
46650
46652
|
{
|
|
46651
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,
|
|
@@ -46133,7 +46134,8 @@ function SQLEditor({
|
|
|
46133
46134
|
client,
|
|
46134
46135
|
task: "quillai",
|
|
46135
46136
|
metadata: {
|
|
46136
|
-
initialQuestion: sqlPrompt
|
|
46137
|
+
initialQuestion: sqlPrompt,
|
|
46138
|
+
existingQuery: query
|
|
46137
46139
|
}
|
|
46138
46140
|
});
|
|
46139
46141
|
setQuery(resp.message);
|
|
@@ -46775,7 +46777,7 @@ function SQLEditor({
|
|
|
46775
46777
|
},
|
|
46776
46778
|
children: [
|
|
46777
46779
|
errorMessage,
|
|
46778
|
-
errorMessage !== "No data found" && errorMessage !== "No query found" &&
|
|
46780
|
+
errorMessage !== "No data found" && errorMessage !== "No query found" && /* @__PURE__ */ jsx66(
|
|
46779
46781
|
SecondaryButtonComponent,
|
|
46780
46782
|
{
|
|
46781
46783
|
onClick: handleFixWithAI,
|