@operato/app 1.5.30 → 1.5.32

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": "1.5.30",
5
+ "version": "1.5.32",
6
6
  "main": "dist/src/index.js",
7
7
  "module": "dist/src/index.js",
8
8
  "exports": {
@@ -129,15 +129,15 @@
129
129
  "@material/mwc-button": "^0.27.0",
130
130
  "@material/mwc-icon": "^0.27.0",
131
131
  "@material/mwc-icon-button": "^0.27.0",
132
- "@operato/attachment": "^1.5.30",
133
- "@operato/data-grist": "^1.5.30",
134
- "@operato/font": "^1.5.30",
132
+ "@operato/attachment": "^1.5.32",
133
+ "@operato/data-grist": "^1.5.32",
134
+ "@operato/font": "^1.5.32",
135
135
  "@operato/form": "^1.4.77",
136
136
  "@operato/graphql": "^1.4.76",
137
137
  "@operato/i18n": "^1.5.14",
138
138
  "@operato/input": "^1.5.28",
139
139
  "@operato/layout": "^1.5.28",
140
- "@operato/property-editor": "^1.5.30",
140
+ "@operato/property-editor": "^1.5.32",
141
141
  "@operato/shell": "^1.5.28",
142
142
  "@operato/styles": "^1.5.28",
143
143
  "@operato/utils": "^1.4.64",
@@ -182,5 +182,5 @@
182
182
  "prettier --write"
183
183
  ]
184
184
  },
185
- "gitHead": "92f283634c442e1377a5534ef7ed88a9281d9334"
185
+ "gitHead": "cc7c19babfdb76202f12efaff1f28317608789cf"
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 && response.data && response.data.commonCode
66
+ var commonCode = response?.data?.commonCode
68
67
 
69
68
  this.column.record.codes = [{ name: '', description: '' }].concat(
70
- commonCode.details.sort(function (a: CommonCodeDetail, b: CommonCodeDetail) {
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 ; idx++){
88
- let code = codes[idx];
89
-
90
- if(code.name == this.value){
91
- return html`<span @mouseover=${onmouseover} @mouseout=${onmouseout}>${code.name == '' ? '' : renderDispOpt.replace('name',code.description).replace('code',code.name)}</span> `
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
+ }