terrier-engine 4.36.0 → 4.36.1
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.
|
@@ -6,7 +6,6 @@ import QueryEditor from "../queries/query-editor"
|
|
|
6
6
|
import {Logger} from "tuff-core/logging"
|
|
7
7
|
import QueryForm from "../queries/query-form"
|
|
8
8
|
import {TabContainerPart} from "../../terrier/tabs"
|
|
9
|
-
import PagePart from "../../terrier/parts/page-part"
|
|
10
9
|
import ContentPart from "../../terrier/parts/content-part"
|
|
11
10
|
import {ModalPart} from "../../terrier/modals"
|
|
12
11
|
import {DdDive} from "../gen/models"
|
|
@@ -21,6 +20,7 @@ import {FormFields} from "tuff-core/forms"
|
|
|
21
20
|
import Fragments from "../../terrier/fragments"
|
|
22
21
|
import {DiveDeliveryForm} from "./dive-delivery"
|
|
23
22
|
import DivePlotList from "../plots/dive-plot-list"
|
|
23
|
+
import {DivePage} from "./dive-page"
|
|
24
24
|
|
|
25
25
|
const log = new Logger("DiveEditor")
|
|
26
26
|
|
|
@@ -193,7 +193,7 @@ export default class DiveEditor extends ContentPart<DiveEditorState> {
|
|
|
193
193
|
// Editor Page
|
|
194
194
|
////////////////////////////////////////////////////////////////////////////////
|
|
195
195
|
|
|
196
|
-
export class DiveEditorPage extends
|
|
196
|
+
export class DiveEditorPage extends DivePage<{id: string}> {
|
|
197
197
|
|
|
198
198
|
editor!: DiveEditor
|
|
199
199
|
session!: DdSession
|
|
@@ -223,6 +223,8 @@ export class DiveEditorPage extends PagePart<{id: string}> {
|
|
|
223
223
|
icon: 'glyp-data_dive'
|
|
224
224
|
})
|
|
225
225
|
|
|
226
|
+
this.addDocsAction()
|
|
227
|
+
|
|
226
228
|
this.addToolbarInput('show-hints', 'checkbox', {
|
|
227
229
|
title: "Hints",
|
|
228
230
|
icon: 'glyp-hint',
|
|
@@ -424,3 +426,4 @@ class DuplicateQueryModal extends ModalPart<DuplicateQueryState> {
|
|
|
424
426
|
})
|
|
425
427
|
}
|
|
426
428
|
}
|
|
429
|
+
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {Logger} from "tuff-core/logging"
|
|
2
|
-
import PagePart from "../../terrier/parts/page-part"
|
|
3
2
|
import {PartTag} from "tuff-core/parts"
|
|
4
3
|
import Schema, {SchemaDef} from "../../terrier/schema"
|
|
5
4
|
import {DdDive, DdDiveGroup, UnpersistedDdDive, UnpersistedDdDiveGroup} from "../gen/models"
|
|
@@ -16,6 +15,7 @@ import TerrierPart from "../../terrier/parts/terrier-part"
|
|
|
16
15
|
import {DiveRunModal} from "./dive-runs"
|
|
17
16
|
import * as inflection from "inflection"
|
|
18
17
|
import Schedules from "../../terrier/schedules"
|
|
18
|
+
import {DivePage} from "./dive-page"
|
|
19
19
|
|
|
20
20
|
const log = new Logger("DiveList")
|
|
21
21
|
|
|
@@ -204,7 +204,7 @@ export class DiveListPart extends TerrierPart<DiveListState> {
|
|
|
204
204
|
// Page
|
|
205
205
|
////////////////////////////////////////////////////////////////////////////////
|
|
206
206
|
|
|
207
|
-
export class DiveListPage extends
|
|
207
|
+
export class DiveListPage extends DivePage<{}> {
|
|
208
208
|
|
|
209
209
|
listPart!: DiveListPart
|
|
210
210
|
newGroupKey = Messages.untypedKey()
|
|
@@ -216,6 +216,8 @@ export class DiveListPage extends PagePart<{}> {
|
|
|
216
216
|
|
|
217
217
|
this.listPart = this.makePart(DiveListPart, {mode: 'editor'})
|
|
218
218
|
|
|
219
|
+
this.addDocsAction()
|
|
220
|
+
|
|
219
221
|
this.addAction({
|
|
220
222
|
title: "New Group",
|
|
221
223
|
icon: 'glyp-plus_outline',
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import PagePart from "../../terrier/parts/page-part"
|
|
2
|
+
import Messages from "tuff-core/messages"
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export abstract class DivePage<T> extends PagePart<T> {
|
|
6
|
+
|
|
7
|
+
static docsKey = Messages.untypedKey()
|
|
8
|
+
|
|
9
|
+
addDocsAction() {
|
|
10
|
+
|
|
11
|
+
this.addAction({
|
|
12
|
+
title: 'Docs',
|
|
13
|
+
icon: 'glyp-help',
|
|
14
|
+
click: {key: DivePage.docsKey},
|
|
15
|
+
classes: ['data-dive-docs']
|
|
16
|
+
}, 'tertiary')
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
}
|
package/package.json
CHANGED
package/terrier/list-viewer.ts
CHANGED
|
@@ -87,12 +87,11 @@ export class ListViewerDetailsContext<T extends ListItem> {
|
|
|
87
87
|
* @param state
|
|
88
88
|
*/
|
|
89
89
|
makePart<PartType extends Part<StateType>, StateType>(partType: PartConstructor<PartType, StateType>, state: StateType) {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
90
|
+
const parentPart = (this.viewer.layout == 'side')
|
|
91
|
+
? this.viewer.sideContainerPart
|
|
92
|
+
: this.viewer.currentItemPart
|
|
93
|
+
if (this.part) parentPart?.removeChild(this.part)
|
|
94
|
+
this.part = parentPart?.makePart(partType, state)
|
|
96
95
|
}
|
|
97
96
|
|
|
98
97
|
/**
|