@things-factory/tutorial-ui 10.1.303 → 10.1.314

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,6 +1,7 @@
1
1
  import '@things-factory/form-ui'
2
2
  import '@operato/data-grist'
3
3
  import './tutorial-detail'
4
+ import '@things-factory/ai-assistant/dist-client/index.js'
4
5
 
5
6
  import gql from 'graphql-tag'
6
7
  import { css, html } from 'lit'
@@ -49,11 +50,6 @@ class TutorialSettingList extends localize(i18next)(PageView) {
49
50
  title: i18next.t('button.save'),
50
51
  action: this._saveTutorial.bind(this),
51
52
  ...CommonButtonStyles.save
52
- },
53
- {
54
- title: i18next.t('button.delete'),
55
- action: this._deleteTutorial.bind(this),
56
- ...CommonButtonStyles.delete
57
53
  }
58
54
  ]
59
55
  }
@@ -63,10 +59,19 @@ class TutorialSettingList extends localize(i18next)(PageView) {
63
59
  return html`
64
60
  <search-form id="search-form" .fields=${this._searchFields} @submit=${() => this.dataGrist.fetch()}></search-form>
65
61
  <ox-grist
66
- .mode=${isMobileDevice() ? 'LIST' : 'GRID'}
62
+ .mode=${isMobileDevice() ? 'CARD' : 'GRID'}
67
63
  .config=${this.config}
68
64
  .fetchHandler="${this.fetchHandler.bind(this)}"
69
- ></ox-grist>
65
+ >
66
+ <!-- What is done to the picked rows: over the column heads while rows are picked (ADR-0225). -->
67
+ <ox-assistant-selection-bar
68
+ slot="selection"
69
+ .gridOf=${() => this.dataGrist}
70
+ name=${i18next.t('title.tutorial_setting')}
71
+ .assistant=${false}
72
+ .actions=${[{ id: 'delete', title: i18next.t('button.delete'), icon: 'delete_outline', emphasis: { danger: true }, action: () => this._deleteTutorial() }]}
73
+ ></ox-assistant-selection-bar>
74
+ </ox-grist>
70
75
  `
71
76
  }
72
77
 
@@ -105,6 +110,8 @@ class TutorialSettingList extends localize(i18next)(PageView) {
105
110
  ]
106
111
 
107
112
  this.config = {
113
+ /* On a phone: the tutorial and what it is, then how long it runs, where it stands in the order and where it lives - each with its name. */
114
+ list: { fields: ['name', 'description'], details: ['duration', 'rank', 'resourceUrl'], labeled: true },
108
115
  rows: { selectable: { multiple: true } },
109
116
  columns: [
110
117
  { type: 'gutter', gutterName: 'sequence' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/tutorial-ui",
3
- "version": "10.1.303",
3
+ "version": "10.1.314",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.ts",
6
6
  "files": [
@@ -40,12 +40,13 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@operato/layout": "^10.0.0",
43
- "@things-factory/code-base": "^10.1.303",
43
+ "@things-factory/ai-assistant": "^10.1.314",
44
+ "@things-factory/code-base": "^10.1.314",
44
45
  "@things-factory/form-ui": "^10.1.281",
45
- "@things-factory/i18n-base": "^10.1.303",
46
- "@things-factory/more-base": "^10.1.303",
47
- "@things-factory/shell": "^10.1.303",
48
- "@things-factory/tutorial-base": "^10.1.303"
46
+ "@things-factory/i18n-base": "^10.1.314",
47
+ "@things-factory/more-base": "^10.1.304",
48
+ "@things-factory/shell": "^10.1.304",
49
+ "@things-factory/tutorial-base": "^10.1.314"
49
50
  },
50
- "gitHead": "2d5888ebfc0a004b000a4aa3dfb8ff9561e75ff9"
51
+ "gitHead": "8d74df0a0618131ff17309638a6aa0affbd4c77d"
51
52
  }