terrier-engine 4.10.8 → 4.10.10
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/package.json +1 -1
- package/terrier/parts/page-part.ts +11 -5
package/package.json
CHANGED
|
@@ -59,13 +59,13 @@ export default abstract class PagePart<TState> extends ContentPart<TState> {
|
|
|
59
59
|
|
|
60
60
|
/// Breadcrumbs
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
protected _breadcrumbs = Array<Action>()
|
|
63
63
|
|
|
64
64
|
addBreadcrumb(crumb: Action) {
|
|
65
65
|
this._breadcrumbs.push(crumb)
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
protected _titleHref?: string
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
71
|
* Adds an href to the title (last) breadcrumb.
|
|
@@ -77,8 +77,8 @@ export default abstract class PagePart<TState> extends ContentPart<TState> {
|
|
|
77
77
|
|
|
78
78
|
/// Toolbar Fields
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
protected _toolbarFieldsOrder: string[] = []
|
|
81
|
+
protected _toolbarFields: Record<string, ToolbarFieldDef> = {}
|
|
82
82
|
|
|
83
83
|
protected get hasToolbarFields() {
|
|
84
84
|
return this._toolbarFieldsOrder.length > 0
|
|
@@ -104,7 +104,7 @@ export default abstract class PagePart<TState> extends ContentPart<TState> {
|
|
|
104
104
|
this.addToolbarFieldDef({ type, name, ...opts })
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
protected addToolbarFieldDef(def: ToolbarFieldDef) {
|
|
108
108
|
this._toolbarFieldsOrder.push(def.name)
|
|
109
109
|
this._toolbarFields[def.name] = def
|
|
110
110
|
}
|
|
@@ -119,6 +119,7 @@ export default abstract class PagePart<TState> extends ContentPart<TState> {
|
|
|
119
119
|
parent.div(`.tt-page-part.content-width-${this.mainContentWidth}`, page => {
|
|
120
120
|
page.div('.tt-toolbar', toolbar => {
|
|
121
121
|
toolbar.class(...this.toolbarClasses)
|
|
122
|
+
this.renderCustomPreToolbar(toolbar)
|
|
122
123
|
this.renderBreadcrumbs(toolbar)
|
|
123
124
|
this.renderCustomToolbar(toolbar)
|
|
124
125
|
if (this.hasToolbarFields) this.renderToolbarFields(toolbar)
|
|
@@ -169,6 +170,11 @@ export default abstract class PagePart<TState> extends ContentPart<TState> {
|
|
|
169
170
|
})
|
|
170
171
|
}
|
|
171
172
|
|
|
173
|
+
|
|
174
|
+
protected renderCustomPreToolbar(_parent: PartTag): void {
|
|
175
|
+
|
|
176
|
+
}
|
|
177
|
+
|
|
172
178
|
protected renderCustomToolbar(_parent: PartTag): void {
|
|
173
179
|
|
|
174
180
|
}
|