terrier-engine 4.32.2 → 4.32.3

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 CHANGED
@@ -4,7 +4,7 @@
4
4
  "files": [
5
5
  "*"
6
6
  ],
7
- "version": "4.32.2",
7
+ "version": "4.32.3",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/Terrier-Tech/terrier-engine"
@@ -63,9 +63,12 @@ export default abstract class PagePart<TState> extends ContentPart<TState> {
63
63
  protected _breadcrumbs = Array<Action>()
64
64
 
65
65
  addBreadcrumb(crumb: Action) {
66
+ this.beforeAddBreadcrumb(crumb)
66
67
  this._breadcrumbs.push(crumb)
67
68
  }
68
69
 
70
+ protected beforeAddBreadcrumb(_crumb: Action) {}
71
+
69
72
  protected _titleHref?: string
70
73
 
71
74
  /**
@@ -150,6 +153,8 @@ export default abstract class PagePart<TState> extends ContentPart<TState> {
150
153
  if (!this._breadcrumbs.length && !this._title?.length) return
151
154
 
152
155
  parent.h1('.breadcrumbs', h1 => {
156
+ const crumbs = Array.from(this._breadcrumbs)
157
+
153
158
  // add a breadcrumb for the page title
154
159
  if (this._title?.length) {
155
160
  const titleCrumb: Action = {
@@ -162,10 +167,11 @@ export default abstract class PagePart<TState> extends ContentPart<TState> {
162
167
  if (this._titleClasses?.length) {
163
168
  titleCrumb.classes = this._titleClasses
164
169
  }
165
- this.addBreadcrumb(titleCrumb)
170
+ this.beforeAddBreadcrumb(titleCrumb)
171
+ crumbs.push(titleCrumb)
166
172
  }
167
173
 
168
- this.app.theme.renderActions(h1, Array.from(this._breadcrumbs))
174
+ this.app.theme.renderActions(h1, crumbs)
169
175
  })
170
176
  }
171
177