terrier-engine 4.52.7 → 4.53.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.
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { PartTag } from "tuff-core/parts"
|
|
3
|
-
import { ModalPart } from "../../terrier/modals"
|
|
4
|
-
import Columns from "./columns"
|
|
5
|
-
import Queries, { Query } from "./queries"
|
|
1
|
+
import { Logger } from "tuff-core/logging"
|
|
6
2
|
import Messages from "tuff-core/messages"
|
|
3
|
+
import { PartTag } from "tuff-core/parts"
|
|
7
4
|
import SortablePlugin from "tuff-sortable/sortable-plugin"
|
|
8
|
-
import {
|
|
5
|
+
import { ModalPart } from "../../terrier/modals"
|
|
6
|
+
import { Query } from "./queries"
|
|
9
7
|
|
|
10
8
|
const log = new Logger("ColumnOrderModal")
|
|
11
9
|
|
|
@@ -332,9 +332,6 @@ export class QueryModelPicker extends TerrierPart<QueryModelPickerState> {
|
|
|
332
332
|
////////////////////////////////////////////////////////////////////////////////
|
|
333
333
|
|
|
334
334
|
const Queries = {
|
|
335
|
-
eachColumn,
|
|
336
|
-
eachTable,
|
|
337
|
-
eachFilter,
|
|
338
335
|
childTables,
|
|
339
336
|
tables,
|
|
340
337
|
tableColumns,
|
package/package.json
CHANGED
|
@@ -82,7 +82,7 @@ export default abstract class PagePart<TState> extends ContentPart<TState> {
|
|
|
82
82
|
/// Toolbar Fields
|
|
83
83
|
|
|
84
84
|
protected _toolbarFieldsOrder: string[] = []
|
|
85
|
-
protected _toolbarFields:
|
|
85
|
+
protected _toolbarFields: Map<string, ToolbarFieldDef> = new Map<string, ToolbarFieldDef>()
|
|
86
86
|
|
|
87
87
|
protected get hasToolbarFields() {
|
|
88
88
|
return this._toolbarFieldsOrder.length > 0
|
|
@@ -109,8 +109,10 @@ export default abstract class PagePart<TState> extends ContentPart<TState> {
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
protected addToolbarFieldDef(def: ToolbarFieldDef) {
|
|
112
|
-
this.
|
|
113
|
-
|
|
112
|
+
if (!this._toolbarFields.has(def.name)) {
|
|
113
|
+
this._toolbarFieldsOrder.push(def.name)
|
|
114
|
+
}
|
|
115
|
+
this._toolbarFields.set(def.name, def)
|
|
114
116
|
}
|
|
115
117
|
|
|
116
118
|
/// Rendering
|
|
@@ -187,7 +189,7 @@ export default abstract class PagePart<TState> extends ContentPart<TState> {
|
|
|
187
189
|
protected renderToolbarFields(parent: PartTag) {
|
|
188
190
|
parent.div('.fields', fields => {
|
|
189
191
|
for (const name of this._toolbarFieldsOrder) {
|
|
190
|
-
const def = this._toolbarFields
|
|
192
|
+
const def = this._toolbarFields.get(name)
|
|
191
193
|
if (!def) {
|
|
192
194
|
log.warn(`No select def with name ${name} could be found!`)
|
|
193
195
|
continue;
|