@operato/board 1.0.0-beta.18 → 1.0.0-beta.19

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@operato/board",
3
- "version": "1.0.0-beta.18",
3
+ "version": "1.0.0-beta.19",
4
4
  "description": "Webcomponent for board following open-wc recommendations",
5
5
  "author": "heartyoh",
6
6
  "license": "MIT",
@@ -49,17 +49,17 @@
49
49
  "storybook:build": "tsc && npm run analyze -- --exclude dist && build-storybook"
50
50
  },
51
51
  "dependencies": {
52
- "@operato/app": "^1.0.0-beta.18",
53
- "@operato/data-grist": "^1.0.0-beta.18",
54
- "@operato/font": "^1.0.0-beta.18",
55
- "@operato/graphql": "^1.0.0-beta.18",
56
- "@operato/i18n": "^1.0.0-beta.18",
57
- "@operato/input": "^1.0.0-beta.18",
58
- "@operato/markdown": "^1.0.0-beta.18",
59
- "@operato/popup": "^1.0.0-beta.18",
60
- "@operato/property-editor": "^1.0.0-beta.18",
61
- "@operato/styles": "^1.0.0-beta.18",
62
- "@operato/utils": "^1.0.0-beta.18",
52
+ "@operato/app": "^1.0.0-beta.19",
53
+ "@operato/data-grist": "^1.0.0-beta.19",
54
+ "@operato/font": "^1.0.0-beta.19",
55
+ "@operato/graphql": "^1.0.0-beta.19",
56
+ "@operato/i18n": "^1.0.0-beta.19",
57
+ "@operato/input": "^1.0.0-beta.19",
58
+ "@operato/markdown": "^1.0.0-beta.19",
59
+ "@operato/popup": "^1.0.0-beta.19",
60
+ "@operato/property-editor": "^1.0.0-beta.19",
61
+ "@operato/styles": "^1.0.0-beta.19",
62
+ "@operato/utils": "^1.0.0-beta.19",
63
63
  "@polymer/paper-dropdown-menu": "^3.2.0",
64
64
  "@types/file-saver": "^2.0.4",
65
65
  "@types/sortablejs": "^1.10.7",
@@ -71,7 +71,7 @@
71
71
  "devDependencies": {
72
72
  "@custom-elements-manifest/analyzer": "^0.4.17",
73
73
  "@hatiolab/prettier-config": "^1.0.0",
74
- "@hatiolab/things-scene": "^3.0.6",
74
+ "@hatiolab/things-scene": "^3.0.7",
75
75
  "@material/mwc-fab": "^0.25.3",
76
76
  "@material/mwc-icon": "^0.25.3",
77
77
  "@open-wc/eslint-config": "^4.3.0",
@@ -107,5 +107,5 @@
107
107
  "prettier --write"
108
108
  ]
109
109
  },
110
- "gitHead": "ef924f62033e3a16c1a2771bd53ddaa9b06ffa91"
110
+ "gitHead": "335d3279d8fb69496472ba348b9a023786b1fca3"
111
111
  }
@@ -8,10 +8,9 @@ import '@operato/input/ox-buttons-radio.js'
8
8
  import '@operato/input/ox-input-code.js'
9
9
  import '@operato/i18n/ox-i18n.js'
10
10
 
11
- import { css, html, LitElement, PropertyValues } from 'lit'
12
- import { customElement, property, query, state } from 'lit/decorators.js'
13
-
11
+ import { LitElement, PropertyValues, css, html } from 'lit'
14
12
  import { Properties, Scene } from '@hatiolab/things-scene'
13
+ import { customElement, property, query, state } from 'lit/decorators.js'
15
14
 
16
15
  export type Rule =
17
16
  | {
@@ -27,6 +26,7 @@ export type Mapping = {
27
26
  target?: string
28
27
  property?: string
29
28
  param?: Rule
29
+ ndnsp?: boolean
30
30
  }
31
31
 
32
32
  /**
@@ -126,6 +126,26 @@ export default class DataBindingMapper extends LitElement {
126
126
  height: 300px;
127
127
  overflow: auto;
128
128
  }
129
+
130
+ /* checkbox-row */
131
+ .checkbox-row {
132
+ grid-column: span 10;
133
+
134
+ display: grid;
135
+ grid-template-columns: repeat(10, 1fr);
136
+ grid-gap: 5px;
137
+ grid-auto-rows: minmax(24px, auto);
138
+ align-items: center;
139
+ }
140
+
141
+ .checkbox-row > input {
142
+ grid-column: 4 / 5;
143
+ }
144
+
145
+ .checkbox-row > label {
146
+ grid-column: span 6;
147
+ text-align: left;
148
+ }
129
149
  `
130
150
  ]
131
151
 
@@ -228,7 +248,7 @@ export default class DataBindingMapper extends LitElement {
228
248
  <div data-value="eval"><ox-i18n msgid="label.eval"></ox-i18n></div>
229
249
  </ox-buttons-radio>
230
250
 
231
- <div rule-editors class="content" ?hidden=${mapping.rule == 'value'}>
251
+ <div rule-editors ?hidden=${mapping.rule == 'value'}>
232
252
  <ox-input-value-map
233
253
  value-key="map"
234
254
  .value=${this.rule.map || {}}
@@ -253,6 +273,11 @@ export default class DataBindingMapper extends LitElement {
253
273
  >
254
274
  </ox-input-code>
255
275
  </div>
276
+
277
+ <div class="checkbox-row">
278
+ <input id="checkbox-ndnsp" type="checkbox" value-key="ndnsp" .checked=${mapping.ndnsp === true} />
279
+ <label for="checkbox-ndnsp"> <ox-i18n msgid="label.ndnsp">No Data No Spreading</ox-i18n> </label>
280
+ </div>
256
281
  `
257
282
  }
258
283
 
@@ -332,9 +357,9 @@ export default class DataBindingMapper extends LitElement {
332
357
 
333
358
  if (!key) return
334
359
 
335
- var value = element.value
360
+ var value: string | boolean = element.value
336
361
 
337
- if (key == 'target') {
362
+ if (key === 'target') {
338
363
  if (value.length > 0 && !/^[.#(\[]/.test(value)) {
339
364
  value = '#' + value.trim()
340
365
 
@@ -345,25 +370,34 @@ export default class DataBindingMapper extends LitElement {
345
370
  ...this.mapping,
346
371
  target: value
347
372
  }
348
- } else if (key == 'accessor') {
373
+ } else if (key === 'accessor') {
349
374
  this.mapping = {
350
375
  ...this.mapping,
351
376
  accessor: (value || '').trim()
352
377
  }
353
- } else if (key == 'property') {
378
+ } else if (key === 'property') {
354
379
  this.mapping = {
355
380
  ...this.mapping,
356
381
  property: (value || '').trim()
357
382
  }
358
- } else if (key == 'map' || key == 'range' || key == 'eval') {
383
+ } else if (key === 'map' || key === 'range' || key === 'eval') {
359
384
  this.rule[key] = value
360
385
  this.mapping = {
361
386
  ...this.mapping,
362
387
  param: value
363
388
  }
389
+ } else if (key === 'ndnsp' /* no data no spreading */) {
390
+ value = element.checked
391
+
392
+ this.mapping = {
393
+ ...this.mapping,
394
+ ndnsp: value
395
+ }
364
396
  }
365
397
 
366
- if (!this.mapping.rule) this.mapping.rule = 'value'
398
+ if (!this.mapping.rule) {
399
+ this.mapping.rule = 'value'
400
+ }
367
401
 
368
402
  this._keep_saved_rule_params = true
369
403
  this.dispatchEvent(
@@ -26,6 +26,10 @@ export const PropertySharedStyle = css`
26
26
  border: var(--property-sidebar-fieldset-border);
27
27
  }
28
28
 
29
+ ox-input-data {
30
+ height: 300px;
31
+ }
32
+
29
33
  /* property grid */
30
34
  .property-grid {
31
35
  display: grid;
@@ -5,6 +5,7 @@
5
5
  import '@polymer/paper-dropdown-menu/paper-dropdown-menu'
6
6
  import '@operato/help/ox-title-with-help.js'
7
7
  import '@operato/input/ox-input-color.js'
8
+ import '@operato/input/ox-input-range.js'
8
9
  import '@operato/app/input/ox-input-fill-style.js'
9
10
  import '@operato/font/ox-font-selector.js'
10
11
  import '@operato/i18n/ox-i18n.js'
@@ -21,7 +22,7 @@ class PropertyStyles extends AbstractProperty {
21
22
  static styles = [
22
23
  PropertySharedStyle,
23
24
  css`
24
- paper-slider {
25
+ ox-input-range {
25
26
  width: 100%;
26
27
  }
27
28
 
@@ -334,7 +335,7 @@ class PropertyStyles extends AbstractProperty {
334
335
 
335
336
  render() {
336
337
  var {
337
- alpha,
338
+ alpha = 1,
338
339
  fontFamily,
339
340
  fontSize,
340
341
  lineHeight,
@@ -358,7 +359,7 @@ class PropertyStyles extends AbstractProperty {
358
359
  <legend>
359
360
  <ox-title-with-help topic="board-modeller/styles/opacity" msgid="label.opacity">opacity</ox-title-with-help>
360
361
  </legend>
361
- <paper-slider min="0" max="1" step="0.1" value-key="alpha" .value=${alpha || 1} editable> </paper-slider>
362
+ <ox-input-range min="0" max="1" step="0.1" value-key="alpha" .value=${alpha} editable> </ox-input-range>
362
363
  </fieldset>
363
364
 
364
365
  <fieldset>