@finos/legend-query-builder 4.14.11 → 4.14.12
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js +7 -2
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/package.json +1 -1
- package/package.json +3 -3
- package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +13 -2
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderResultModifierPanel.d.ts","sourceRoot":"","sources":["../../../src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA4BH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0DAA0D,CAAC;
|
1
|
+
{"version":3,"file":"QueryBuilderResultModifierPanel.d.ts","sourceRoot":"","sources":["../../../src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA4BH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0DAA0D,CAAC;AAyLrG,eAAO,MAAM,wBAAwB,WAC3B;IAAE,QAAQ,EAAE,oBAAoB,CAAA;CAAE;;CAwN3C,CAAC"}
|
@@ -75,6 +75,11 @@ const ColumnsSortEditor = observer((props) => {
|
|
75
75
|
};
|
76
76
|
return (_jsxs("div", { className: "panel__content__form__section", children: [_jsx("div", { className: "panel__content__form__section__header__label", children: "Sort and Order" }), _jsx("div", { className: "panel__content__form__section__header__prompt", children: "Choose the column(s) and order direction(s) that the results should be arranged by" }), _jsxs("div", { className: "panel__content__form__section__list", children: [_jsx("div", { className: "panel__content__form__section__list__items", children: sortColumns.map((value) => (_jsx(ColumnSortEditor, { sortColumns: sortColumns, setSortColumns: setSortColumns, sortState: value, tdsColumns: tdsColumns }, value.columnState.uuid))) }), _jsx("div", { className: "panel__content__form__section__list__new-item__add", children: _jsx("button", { className: "panel__content__form__section__list__new-item__add-btn btn btn--dark", disabled: !projectionOptions.length, onClick: addValue, tabIndex: -1, children: "Add Value" }) })] })] }));
|
77
77
|
});
|
78
|
+
const cloneSortColumnStateArray = (sortColumns) => sortColumns.map((sortColumn) => {
|
79
|
+
const newSortColumn = new SortColumnState(sortColumn.columnState);
|
80
|
+
newSortColumn.setSortType(sortColumn.sortType);
|
81
|
+
return newSortColumn;
|
82
|
+
});
|
78
83
|
export const QueryResultModifierModal = observer((props) => {
|
79
84
|
// Read current state
|
80
85
|
const { tdsState } = props;
|
@@ -84,13 +89,13 @@ export const QueryResultModifierModal = observer((props) => {
|
|
84
89
|
const stateLimitResults = resultSetModifierState.limit;
|
85
90
|
const stateSlice = resultSetModifierState.slice;
|
86
91
|
// Set up temp state for modal lifecycle
|
87
|
-
const [sortColumns, setSortColumns] = useState(
|
92
|
+
const [sortColumns, setSortColumns] = useState(cloneSortColumnStateArray(stateSortColumns));
|
88
93
|
const [distinct, setDistinct] = useState(stateDistinct);
|
89
94
|
const [limitResults, setLimitResults] = useState(stateLimitResults);
|
90
95
|
const [slice, setSlice] = useState(stateSlice ?? [undefined, undefined]);
|
91
96
|
// Sync temp state with tdsState when modal is opened/closed
|
92
97
|
useEffect(() => {
|
93
|
-
setSortColumns(
|
98
|
+
setSortColumns(cloneSortColumnStateArray(stateSortColumns));
|
94
99
|
setDistinct(stateDistinct);
|
95
100
|
setLimitResults(stateLimitResults);
|
96
101
|
setSlice(stateSlice ?? [undefined, undefined]);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"QueryBuilderResultModifierPanel.js","sourceRoot":"","sources":["../../../src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACL,IAAI,EACJ,MAAM,EACN,mBAAmB,EACnB,eAAe,EACf,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|
+
{"version":3,"file":"QueryBuilderResultModifierPanel.js","sourceRoot":"","sources":["../../../src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACL,IAAI,EACJ,MAAM,EACN,mBAAmB,EACnB,eAAe,EACf,UAAU,EACV,SAAS,EACT,KAAK,EACL,SAAS,EACT,WAAW,EACX,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,yBAAyB,GAC1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,eAAe,EAAE,MAAM,iEAAiE,CAAC;AAClG,OAAO,EACL,cAAc,EACd,WAAW,EACX,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAE7E,MAAM,gBAAgB,GAAG,QAAQ,CAC/B,CAAC,KAKA,EAAE,EAAE;IACH,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IACrE,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;IAC/C,MAAM,iBAAiB,GAAG,UAAU;SACjC,MAAM,CACL,CAAC,aAAa,EAAE,EAAE,CAChB,aAAa,KAAK,SAAS,CAAC,WAAW;QACvC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,KAAK,aAAa,CAAC,CACxE;SACA,GAAG,CAAC,CAAC,aAAa,EAAE,EAAE,CAAC,CAA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C;AACJ,CAAC,CACF,CAAC"}
|
package/lib/index.css
CHANGED
package/lib/package.json
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@finos/legend-query-builder",
|
3
|
-
"version": "4.14.
|
3
|
+
"version": "4.14.12",
|
4
4
|
"description": "Legend query builder core",
|
5
5
|
"keywords": [
|
6
6
|
"legend",
|
@@ -44,8 +44,8 @@
|
|
44
44
|
"dependencies": {
|
45
45
|
"@finos/legend-application": "15.0.70",
|
46
46
|
"@finos/legend-art": "7.1.22",
|
47
|
-
"@finos/legend-graph": "31.8.
|
48
|
-
"@finos/legend-lego": "1.2.
|
47
|
+
"@finos/legend-graph": "31.8.7",
|
48
|
+
"@finos/legend-lego": "1.2.12",
|
49
49
|
"@finos/legend-server-depot": "6.0.36",
|
50
50
|
"@finos/legend-shared": "10.0.32",
|
51
51
|
"@finos/legend-storage": "3.0.82",
|
@@ -216,6 +216,15 @@ const ColumnsSortEditor = observer(
|
|
216
216
|
},
|
217
217
|
);
|
218
218
|
|
219
|
+
const cloneSortColumnStateArray = (
|
220
|
+
sortColumns: SortColumnState[],
|
221
|
+
): SortColumnState[] =>
|
222
|
+
sortColumns.map((sortColumn) => {
|
223
|
+
const newSortColumn = new SortColumnState(sortColumn.columnState);
|
224
|
+
newSortColumn.setSortType(sortColumn.sortType);
|
225
|
+
return newSortColumn;
|
226
|
+
});
|
227
|
+
|
219
228
|
export const QueryResultModifierModal = observer(
|
220
229
|
(props: { tdsState: QueryBuilderTDSState }) => {
|
221
230
|
// Read current state
|
@@ -227,7 +236,9 @@ export const QueryResultModifierModal = observer(
|
|
227
236
|
const stateSlice = resultSetModifierState.slice;
|
228
237
|
|
229
238
|
// Set up temp state for modal lifecycle
|
230
|
-
const [sortColumns, setSortColumns] = useState(
|
239
|
+
const [sortColumns, setSortColumns] = useState(
|
240
|
+
cloneSortColumnStateArray(stateSortColumns),
|
241
|
+
);
|
231
242
|
const [distinct, setDistinct] = useState(stateDistinct);
|
232
243
|
const [limitResults, setLimitResults] = useState(stateLimitResults);
|
233
244
|
const [slice, setSlice] = useState<
|
@@ -236,7 +247,7 @@ export const QueryResultModifierModal = observer(
|
|
236
247
|
|
237
248
|
// Sync temp state with tdsState when modal is opened/closed
|
238
249
|
useEffect(() => {
|
239
|
-
setSortColumns(
|
250
|
+
setSortColumns(cloneSortColumnStateArray(stateSortColumns));
|
240
251
|
setDistinct(stateDistinct);
|
241
252
|
setLimitResults(stateLimitResults);
|
242
253
|
setSlice(stateSlice ?? [undefined, undefined]);
|