terrier-engine 4.44.2 → 4.45.5

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.
@@ -233,6 +233,13 @@ export class DiveEditorPage extends DivePage<{id: string}> {
233
233
  onInputKey: this.showHintsKey
234
234
  })
235
235
 
236
+ this.addAction({
237
+ title: 'Sync to Terrier',
238
+ icon: 'glyp-terrier',
239
+ classes: ['terrier-record-sync up'],
240
+ data: { id: this.state.id, table: 'dd_dive', title: dive.name }
241
+ }, 'tertiary')
242
+
236
243
  this.addAction({
237
244
  title: 'Discard',
238
245
  icon: 'glyp-cancelled',
@@ -218,6 +218,13 @@ export class DiveListPage extends DivePage<{}> {
218
218
 
219
219
  this.addDocsAction()
220
220
 
221
+ this.addAction({
222
+ title: 'Sync from Terrier',
223
+ icon: 'glyp-terrier',
224
+ classes: ['terrier-record-sync down'],
225
+ data: { table: 'dd_dive' }
226
+ }, 'tertiary')
227
+
221
228
  this.addAction({
222
229
  title: "New Group",
223
230
  icon: 'glyp-plus_outline',
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "files": [
5
5
  "*"
6
6
  ],
7
- "version": "4.44.2",
7
+ "version": "4.45.5",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/Terrier-Tech/terrier-engine"
package/terrier/theme.ts CHANGED
@@ -40,6 +40,7 @@ export type Action = {
40
40
  href?: string
41
41
  classes?: string[]
42
42
  click?: Packet
43
+ data?: Record<string, unknown> | undefined
43
44
  badge?: string
44
45
  hint?: {
45
46
  hint: Hint
@@ -92,7 +93,8 @@ export default class Theme {
92
93
  }
93
94
  for (const action of actions) {
94
95
  let iconColor = action.color || options?.iconColor
95
- const attrs = action.tooltip?.length ? {data: {tooltip: action.tooltip}} : {}
96
+ let attrs = action.tooltip?.length ? {data: {tooltip: action.tooltip}} : {}
97
+ if (action.data) attrs = Object.assign({}, attrs, {data: action.data})
96
98
  parent.a(attrs, a => {
97
99
  const classes = action.classes || []
98
100
  if (classes?.length) {