@operato/app 1.11.2 → 1.11.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.
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.11.2",
5
+ "version": "1.11.5",
6
6
  "main": "dist/src/index.js",
7
7
  "module": "dist/src/index.js",
8
8
  "exports": {
@@ -136,15 +136,15 @@
136
136
  "@material/mwc-button": "^0.27.0",
137
137
  "@material/mwc-icon": "^0.27.0",
138
138
  "@material/mwc-icon-button": "^0.27.0",
139
- "@operato/attachment": "^1.11.2",
140
- "@operato/data-grist": "^1.11.2",
141
- "@operato/font": "^1.11.2",
142
- "@operato/form": "^1.5.44",
139
+ "@operato/attachment": "^1.11.5",
140
+ "@operato/data-grist": "^1.11.5",
141
+ "@operato/font": "^1.11.5",
142
+ "@operato/form": "^1.11.3",
143
143
  "@operato/graphql": "^1.4.76",
144
144
  "@operato/i18n": "^1.5.14",
145
- "@operato/input": "^1.7.4",
146
- "@operato/layout": "^1.9.0",
147
- "@operato/property-editor": "^1.11.2",
145
+ "@operato/input": "^1.11.5",
146
+ "@operato/layout": "^1.11.3",
147
+ "@operato/property-editor": "^1.11.5",
148
148
  "@operato/shell": "^1.9.0",
149
149
  "@operato/styles": "^1.7.3",
150
150
  "@operato/utils": "^1.5.44",
@@ -189,5 +189,5 @@
189
189
  "prettier --write"
190
190
  ]
191
191
  },
192
- "gitHead": "759acb9c2d51cd4c114ae57e4eccb7e865d8e559"
192
+ "gitHead": "e4aef6eb764b0960cdd96e0447c2cddab4f41021"
193
193
  }
@@ -53,6 +53,7 @@ export default class OxInputGraphql extends OxFormField {
53
53
 
54
54
  private _self_changing: boolean = false
55
55
  private _editor?: EditorView
56
+ private _changed: boolean = false
56
57
 
57
58
  async updated(changes: PropertyValues<this>) {
58
59
  const editor = await this.getEditor()
@@ -113,25 +114,15 @@ export default class OxInputGraphql extends OxFormField {
113
114
  }),
114
115
  highlightActiveLine(),
115
116
  history(),
116
- keymap.of([
117
- ...historyKeymap,
118
- indentWithTab,
119
- {
120
- key: 'Escape',
121
- run: (view: EditorView) => {
122
- togglefullscreen(this)
123
- return true
124
- }
125
- }
126
- ]),
127
- EditorView.updateListener.of(v => {
117
+ keymap.of([...historyKeymap, indentWithTab]),
118
+ EditorView.updateListener.of(async v => {
128
119
  if (v.docChanged) {
129
120
  this._self_changing = true
130
- this.value = v.state.doc.toString()
131
- this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true, detail: this.value }))
132
- requestAnimationFrame(() => {
133
- this._self_changing = false
134
- })
121
+ this._changed = true
122
+
123
+ await this.updateComplete
124
+
125
+ this._self_changing = false
135
126
  }
136
127
  })
137
128
  ],
@@ -139,6 +130,23 @@ export default class OxInputGraphql extends OxFormField {
139
130
  })
140
131
  }
141
132
 
133
+ this._editor.contentDOM.addEventListener('keydown', event => {
134
+ event.stopPropagation()
135
+
136
+ if (event.key === 'Escape') {
137
+ togglefullscreen(this._editor!.contentDOM)
138
+ }
139
+ })
140
+
141
+ this._editor.contentDOM.addEventListener('blur', e => {
142
+ if (!this._changed) {
143
+ return
144
+ }
145
+
146
+ this.value = this._editor!.state.doc.toString()
147
+ this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true, detail: this.value }))
148
+ })
149
+
142
150
  return this._editor
143
151
  }
144
152
  }
@@ -102,7 +102,7 @@ body {
102
102
  --button-primary-font: bold 16px var(--theme-font);
103
103
 
104
104
  /* table style */
105
- --th-padding: var(--padding-default) 0 var(--padding-default) var(--padding-default);
105
+ --th-padding: var(--padding-default);
106
106
  --th-border-top: 2px solid var(--secondary-color);
107
107
  --th-text-transform: capitalize;
108
108
  --th-font: bold var(--fontsize-small) var(--theme-font);
@@ -111,11 +111,14 @@ body {
111
111
  --tr-background-color: var(--theme-white-color);
112
112
  --tr-background-odd-color: rgba(255, 255, 255, 0.4);
113
113
  --tr-background-hover-color: #e1f5fe;
114
+ --td-border-line: 1px solid rgba(0, 0, 0, 0.05);
114
115
  --td-border-bottom: 1px solid rgba(0, 0, 0, 0.09);
115
116
  --td-padding: var(--padding-default);
116
117
  --td-font: normal 13px var(--theme-font);
117
118
  --td-color: var(--secondary-color);
118
119
 
120
+ --label-cell-background-color: #f6f6f6; /* th or td common background color */
121
+
119
122
  /* form style */
120
123
  --label-font: normal var(--fontsize-default) var(--theme-font);
121
124
  --label-color: var(--secondary-color);