@operato/app 1.5.30 → 1.5.31
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/CHANGELOG.md +9 -0
- package/dist/src/grist-editor/ox-grist-renderer-resource-code.js +6 -3
- package/dist/src/grist-editor/ox-grist-renderer-resource-code.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/grist-editor/ox-grist-renderer-resource-code.ts +15 -16
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": "1.5.
|
|
5
|
+
"version": "1.5.31",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
7
7
|
"module": "dist/src/index.js",
|
|
8
8
|
"exports": {
|
|
@@ -182,5 +182,5 @@
|
|
|
182
182
|
"prettier --write"
|
|
183
183
|
]
|
|
184
184
|
},
|
|
185
|
-
"gitHead": "
|
|
185
|
+
"gitHead": "8017a8d5b0fce7bbe312a30b5318286adb4ce986"
|
|
186
186
|
}
|
|
@@ -36,7 +36,6 @@ function onmouseout(e: Event) {
|
|
|
36
36
|
element.removeAttribute('data-tooltip')
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
|
|
40
39
|
@customElement('ox-grist-renderer-resource-code')
|
|
41
40
|
export class OxGristRendererResourceCode extends OxGristRenderer {
|
|
42
41
|
static styles = css`
|
|
@@ -54,7 +53,7 @@ export class OxGristRendererResourceCode extends OxGristRenderer {
|
|
|
54
53
|
}
|
|
55
54
|
`
|
|
56
55
|
|
|
57
|
-
async connectedCallback(){
|
|
56
|
+
async connectedCallback() {
|
|
58
57
|
var { codeName, codes } = this.column.record || {}
|
|
59
58
|
|
|
60
59
|
if (!codes && codeName) {
|
|
@@ -64,37 +63,37 @@ export class OxGristRendererResourceCode extends OxGristRenderer {
|
|
|
64
63
|
context: gqlContext()
|
|
65
64
|
})
|
|
66
65
|
|
|
67
|
-
var commonCode = response
|
|
66
|
+
var commonCode = response?.data?.commonCode
|
|
68
67
|
|
|
69
68
|
this.column.record.codes = [{ name: '', description: '' }].concat(
|
|
70
|
-
commonCode
|
|
69
|
+
(commonCode?.details || []).sort(function (a: CommonCodeDetail, b: CommonCodeDetail) {
|
|
71
70
|
return a.rank - b.rank
|
|
72
71
|
})
|
|
73
72
|
)
|
|
74
73
|
}
|
|
75
74
|
|
|
76
|
-
super.connectedCallback()
|
|
75
|
+
super.connectedCallback()
|
|
77
76
|
}
|
|
78
|
-
|
|
77
|
+
|
|
79
78
|
get rendererTemplate() {
|
|
80
|
-
if(!this.value) {
|
|
79
|
+
if (!this.value) {
|
|
81
80
|
return html``
|
|
82
81
|
}
|
|
83
82
|
|
|
84
83
|
var { codes, renderDispOpt = 'name' } = this.column.record || {}
|
|
85
84
|
|
|
86
|
-
if(codes){
|
|
87
|
-
for(let idx = 0; idx < codes.length
|
|
88
|
-
let code = codes[idx]
|
|
89
|
-
|
|
90
|
-
if(code.name == this.value){
|
|
91
|
-
return html`<span @mouseover=${onmouseover} @mouseout=${onmouseout}
|
|
85
|
+
if (codes) {
|
|
86
|
+
for (let idx = 0; idx < codes.length; idx++) {
|
|
87
|
+
let code = codes[idx]
|
|
88
|
+
|
|
89
|
+
if (code.name == this.value) {
|
|
90
|
+
return html`<span @mouseover=${onmouseover} @mouseout=${onmouseout}
|
|
91
|
+
>${code.name == '' ? '' : renderDispOpt.replace('name', code.description).replace('code', code.name)}</span
|
|
92
|
+
> `
|
|
92
93
|
}
|
|
93
94
|
}
|
|
94
95
|
}
|
|
95
96
|
|
|
96
|
-
|
|
97
|
-
|
|
98
97
|
return html`<span @mouseover=${onmouseover} @mouseout=${onmouseout}>${this.value}</span> `
|
|
99
98
|
}
|
|
100
|
-
}
|
|
99
|
+
}
|