@operato/app 2.0.0-beta.12 → 2.0.0-beta.14

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
@@ -2,7 +2,7 @@
2
2
  "name": "@operato/app",
3
3
  "description": "WebApplication production supporting components following open-wc recommendations",
4
4
  "author": "heartyoh",
5
- "version": "2.0.0-beta.12",
5
+ "version": "2.0.0-beta.14",
6
6
  "main": "dist/src/index.js",
7
7
  "module": "dist/src/index.js",
8
8
  "exports": {
@@ -134,18 +134,18 @@
134
134
  "@graphql-tools/delegate": "^10.0.1",
135
135
  "@graphql-tools/wrap": "^8.5.0",
136
136
  "@material/web": "^1.4.0",
137
- "@operato/attachment": "^2.0.0-beta.12",
138
- "@operato/data-grist": "^2.0.0-beta.12",
139
- "@operato/font": "^2.0.0-beta.12",
140
- "@operato/form": "^2.0.0-beta.12",
141
- "@operato/graphql": "^2.0.0-beta.0",
137
+ "@operato/attachment": "^2.0.0-beta.14",
138
+ "@operato/data-grist": "^2.0.0-beta.14",
139
+ "@operato/font": "^2.0.0-beta.14",
140
+ "@operato/form": "^2.0.0-beta.14",
141
+ "@operato/graphql": "^2.0.0-beta.13",
142
142
  "@operato/i18n": "^2.0.0-beta.3",
143
- "@operato/input": "^2.0.0-beta.12",
144
- "@operato/layout": "^2.0.0-beta.12",
145
- "@operato/property-editor": "^2.0.0-beta.12",
146
- "@operato/shell": "^2.0.0-beta.12",
147
- "@operato/styles": "^2.0.0-beta.5",
148
- "@operato/utils": "^2.0.0-beta.0",
143
+ "@operato/input": "^2.0.0-beta.14",
144
+ "@operato/layout": "^2.0.0-beta.14",
145
+ "@operato/property-editor": "^2.0.0-beta.14",
146
+ "@operato/shell": "^2.0.0-beta.14",
147
+ "@operato/styles": "^2.0.0-beta.13",
148
+ "@operato/utils": "^2.0.0-beta.13",
149
149
  "cm6-graphql": "^0.0.14",
150
150
  "codemirror": "^6.0.1",
151
151
  "cronstrue": "^2.2.0",
@@ -186,5 +186,5 @@
186
186
  "prettier --write"
187
187
  ]
188
188
  },
189
- "gitHead": "08cd1f9bacfca1f0559ee61089a26087cc1876ba"
189
+ "gitHead": "2f3c3eb99f4435dc4d0d66bc097647b3d8351ba1"
190
190
  }
@@ -3,19 +3,6 @@ import i18next from 'i18next'
3
3
  import { html } from 'lit'
4
4
 
5
5
  import { FieldRenderer } from '@operato/data-grist'
6
- import { detectOverflow } from '@operato/utils'
7
-
8
- function onmouseover(e: Event) {
9
- const element = e.target as HTMLSpanElement
10
- if (detectOverflow(element)) {
11
- element.setAttribute('data-tooltip', element.textContent!)
12
- }
13
- }
14
-
15
- function onmouseout(e: Event) {
16
- const element = e.target as HTMLSpanElement
17
- element.removeAttribute('data-tooltip')
18
- }
19
6
 
20
7
  export const OxGristRendererCrontab: FieldRenderer = (value, column, record, rowIndex, field) => {
21
8
  let text = ''
@@ -27,5 +14,5 @@ export const OxGristRendererCrontab: FieldRenderer = (value, column, record, row
27
14
  console.error(e)
28
15
  }
29
16
 
30
- return html`<span @mouseover=${onmouseover} @mouseout=${onmouseout}>${text}</span>`
17
+ return html`<span data-reactive-tooltip>${text}</span>`
31
18
  }
@@ -4,7 +4,6 @@ import { client, gqlContext } from '@operato/graphql'
4
4
  import { customElement } from 'lit/decorators.js'
5
5
 
6
6
  import { OxGristRenderer } from '@operato/data-grist'
7
- import { detectOverflow } from '@operato/utils'
8
7
 
9
8
  type CommonCodeDetail = {
10
9
  name: string
@@ -24,18 +23,6 @@ const FETCH_COMMON_CODE_GQL = (codeName: string) => gql`
24
23
  }
25
24
  `
26
25
 
27
- function onmouseover(e: Event) {
28
- const element = e.target as HTMLSpanElement
29
- if (detectOverflow(element)) {
30
- element.setAttribute('data-tooltip', element.textContent!)
31
- }
32
- }
33
-
34
- function onmouseout(e: Event) {
35
- const element = e.target as HTMLSpanElement
36
- element.removeAttribute('data-tooltip')
37
- }
38
-
39
26
  @customElement('ox-grist-renderer-resource-code')
40
27
  export class OxGristRendererResourceCode extends OxGristRenderer {
41
28
  static styles = css`
@@ -87,13 +74,13 @@ export class OxGristRendererResourceCode extends OxGristRenderer {
87
74
  let code = codes[idx]
88
75
 
89
76
  if (code.name == this.value) {
90
- return html`<span @mouseover=${onmouseover} @mouseout=${onmouseout}
77
+ return html`<span data-reactive-tooltip
91
78
  >${code.name == '' ? '' : renderDispOpt.replace('name', code.description).replace('code', code.name)}</span
92
79
  > `
93
80
  }
94
81
  }
95
82
  }
96
83
 
97
- return html`<span @mouseover=${onmouseover} @mouseout=${onmouseout}>${this.value}</span> `
84
+ return html`<span data-reactive-tooltip>${this.value}</span> `
98
85
  }
99
86
  }