@things-factory/grist-ui 4.2.12 → 4.3.0

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.
@@ -1,4 +1,4 @@
1
- import { css } from 'lit-element'
1
+ import { css } from 'lit'
2
2
 
3
3
  export const dataGridBodyStyle = css`
4
4
  :host {
@@ -1,7 +1,7 @@
1
1
  import './data-grid-field'
2
2
 
3
- import { html, LitElement } from 'lit-element'
4
- import _ from 'underscore'
3
+ import { html, LitElement } from 'lit'
4
+ import debounce from 'lodash-es/debounce'
5
5
 
6
6
  import { supportsPassive } from '@things-factory/utils'
7
7
 
@@ -30,7 +30,7 @@ function calcScrollPos(parent, child) {
30
30
  }
31
31
 
32
32
  class DataGridBody extends LitElement {
33
- debounce = _.debounce((scrollTop, clientHeight) => {
33
+ debounce = debounce((scrollTop, clientHeight) => {
34
34
  const maxVisibleRows = Math.ceil(clientHeight / (ROW_HEIGHT + GAP_SIZE))
35
35
  const from = Math.max(0, Math.floor(scrollTop / (ROW_HEIGHT + GAP_SIZE)) - maxVisibleRows * DATA_PADDING)
36
36
  const to = Math.min(this.data.records.length, from + maxVisibleRows * (DATA_PADDING * 2 + 1))
@@ -1,4 +1,4 @@
1
- import { css, html, LitElement } from 'lit-element'
1
+ import { css, html, LitElement } from 'lit'
2
2
 
3
3
  const DEFAULT_TEXT_ALIGN = 'left'
4
4
 
@@ -1,4 +1,4 @@
1
- import { LitElement, html, css } from 'lit-element'
1
+ import { LitElement, html, css } from 'lit'
2
2
 
3
3
  import '@material/mwc-icon'
4
4
 
@@ -93,11 +93,7 @@ class DataGridFooter extends LitElement {
93
93
  <span class="filler"></span>
94
94
 
95
95
  <span class="limit">
96
- ${pages.map(
97
- size => html`
98
- <a ?selected=${limit == size} @click=${e => this._changeLimit(size)}>${size}</a>
99
- `
100
- )}
96
+ ${pages.map(size => html` <a ?selected=${limit == size} @click=${e => this._changeLimit(size)}>${size}</a> `)}
101
97
  records
102
98
  </span>
103
99
  <span>&nbsp;</span>
@@ -1,6 +1,7 @@
1
- import { LitElement, html, css } from 'lit-element'
1
+ import { css, html, LitElement } from 'lit'
2
+ import throttle from 'lodash-es/throttle'
3
+
2
4
  import { supportsPassive } from '@things-factory/utils'
3
- import throttle from 'lodash/throttle'
4
5
 
5
6
  class DataGridHeader extends LitElement {
6
7
  static get properties() {
@@ -1,4 +1,4 @@
1
- import { LitElement, html, css } from 'lit-element'
1
+ import { LitElement, html, css } from 'lit'
2
2
  import { ScrollbarStyles } from '@things-factory/styles'
3
3
 
4
4
  import './data-grid-header'
@@ -1,7 +1,7 @@
1
1
  import './data-grid/data-grid'
2
2
  import './data-list/data-list'
3
3
 
4
- import { LitElement, css, html } from 'lit-element'
4
+ import { LitElement, css, html } from 'lit'
5
5
 
6
6
  import { DataProvider } from './data-provider'
7
7
  import Headroom from '@operato/headroom'
@@ -1,4 +1,4 @@
1
- import { LitElement, html, css } from 'lit-element'
1
+ import { LitElement, html, css } from 'lit'
2
2
 
3
3
  class DataListField extends LitElement {
4
4
  static get properties() {
@@ -1,4 +1,4 @@
1
- import { LitElement, html, css } from 'lit-element'
1
+ import { LitElement, html, css } from 'lit'
2
2
 
3
3
  const DEFAULT_TEXT_ALIGN = 'left'
4
4
 
@@ -28,7 +28,7 @@ class DataListGutter extends LitElement {
28
28
 
29
29
  font-size: var(--grid-record-wide-fontsize);
30
30
  text-overflow: ellipsis;
31
- color:var(--grid-record-color);
31
+ color: var(--grid-record-color);
32
32
  }
33
33
 
34
34
  * {
@@ -57,9 +57,7 @@ class DataListGutter extends LitElement {
57
57
  var { renderer } = column.record
58
58
 
59
59
  /* renderer가 html template이 아니고 단순한 값인 경우가 있으므로, html 템플릿으로 감싸준다. */
60
- return html`
61
- ${renderer(value, column, record, rowIndex, this)}
62
- `
60
+ return html` ${renderer(value, column, record, rowIndex, this)} `
63
61
  }
64
62
 
65
63
  updated(changes) {
@@ -1,4 +1,4 @@
1
- import { LitElement, html, css } from 'lit-element'
1
+ import { LitElement, html, css } from 'lit'
2
2
  import '@material/mwc-icon'
3
3
  import './record-partial'
4
4
 
@@ -1,4 +1,4 @@
1
- import { LitElement, html, css } from 'lit-element'
1
+ import { LitElement, html, css } from 'lit'
2
2
  // import { longpressable } from '@things-factory/utils'
3
3
  import '@material/mwc-icon'
4
4
 
@@ -1,5 +1,6 @@
1
- import isEqual from 'lodash/isEqual'
2
- import isEmpty from 'lodash/isEmpty'
1
+ import isEmpty from 'lodash-es/isEmpty'
2
+ import isEqual from 'lodash-es/isEqual'
3
+
3
4
  import { NOOP } from './const'
4
5
 
5
6
  function _calculateTotalPage(limit, total) {
@@ -1,4 +1,4 @@
1
- import { css } from 'lit-element'
1
+ import { css } from 'lit'
2
2
 
3
3
  export const dataReportBodyStyle = css`
4
4
  :host {
@@ -1,6 +1,6 @@
1
1
  import './data-report-field'
2
2
 
3
- import { html, LitElement } from 'lit-element'
3
+ import { html, LitElement } from 'lit'
4
4
 
5
5
  import { dataReportBodyStyle } from './data-report-body-style'
6
6
  import { dataReportBodyClickHandler } from './event-handlers/data-report-body-click-handler'
@@ -1,4 +1,4 @@
1
- import { LitElement, html, css } from 'lit-element'
1
+ import { LitElement, html, css } from 'lit'
2
2
  import { ScrollbarStyles } from '@things-factory/styles'
3
3
 
4
4
  import './data-report-header'
@@ -1,4 +1,4 @@
1
- import { LitElement, html, css } from 'lit-element'
1
+ import { LitElement, html, css } from 'lit'
2
2
 
3
3
  const DEFAULT_TEXT_ALIGN = 'left'
4
4
 
@@ -61,9 +61,7 @@ class DataReportField extends LitElement {
61
61
  var { value, column, record, rowIndex } = this
62
62
  var { renderer } = column.record
63
63
 
64
- return html`
65
- ${renderer(value, column, record, rowIndex, this)}
66
- `
64
+ return html` ${renderer(value, column, record, rowIndex, this)} `
67
65
  }
68
66
 
69
67
  updated(changes) {
@@ -1,5 +1,6 @@
1
- import { LitElement, html, css } from 'lit-element'
2
- import throttle from 'lodash/throttle'
1
+ import { css, html, LitElement } from 'lit'
2
+ import throttle from 'lodash-es/throttle'
3
+
3
4
  import { supportsPassive } from '@things-factory/utils'
4
5
 
5
6
  class DataReportHeader extends LitElement {
@@ -1,6 +1,6 @@
1
1
  import './data-report/data-report-component'
2
2
 
3
- import { LitElement, css, html } from 'lit-element'
3
+ import { LitElement, css, html } from 'lit'
4
4
 
5
5
  import { DataProvider } from './data-provider'
6
6
  import { buildColumn } from './configure/column-builder'
@@ -1,4 +1,4 @@
1
- import { LitElement, html, css } from 'lit-element'
1
+ import { LitElement, html, css } from 'lit'
2
2
 
3
3
  const STYLE = css`
4
4
  :host {
@@ -1,4 +1,4 @@
1
- import { html } from 'lit-element'
1
+ import { html } from 'lit'
2
2
  import '@material/mwc-icon'
3
3
 
4
4
  export class GutterButton {
@@ -1,4 +1,4 @@
1
- import { LitElement, html, css } from 'lit-element'
1
+ import { LitElement, html, css } from 'lit'
2
2
  import '@material/mwc-icon'
3
3
 
4
4
  class GutterDirtyElement extends LitElement {
@@ -1,4 +1,4 @@
1
- import { html } from 'lit-element'
1
+ import { html } from 'lit'
2
2
 
3
3
  export class GutterRowSelector {
4
4
  static instance(config = {}) {
@@ -1,4 +1,4 @@
1
- import { LitElement, html, css } from 'lit-element'
1
+ import { LitElement, html, css } from 'lit'
2
2
  import '@material/mwc-icon'
3
3
 
4
4
  import '../data-grid/data-grid-field'
@@ -49,7 +49,7 @@ export class RecordViewBody extends LitElement {
49
49
  }
50
50
 
51
51
  data-grid-field[editing='true'] {
52
- border-top:none;
52
+ border-top: none;
53
53
  border-bottom: var(--record-view-edit-border-bottom);
54
54
  }
55
55
 
@@ -112,7 +112,7 @@ export class RecordViewBody extends LitElement {
112
112
  target.setAttribute('editing', true)
113
113
  })
114
114
 
115
- this._focusedListener = function(e) {
115
+ this._focusedListener = function (e) {
116
116
  var keyCode = e.keyCode
117
117
  switch (keyCode) {
118
118
  case KEY_ESC:
@@ -141,9 +141,7 @@ export class RecordViewBody extends LitElement {
141
141
  var { renderer } = column.header
142
142
  var title = renderer.call(this, column)
143
143
 
144
- return html`
145
- ${title}
146
- `
144
+ return html` ${title} `
147
145
  }
148
146
  }
149
147
 
@@ -1,4 +1,4 @@
1
- import { LitElement, html, css } from 'lit-element'
1
+ import { LitElement, html, css } from 'lit'
2
2
  import '@material/mwc-icon'
3
3
 
4
4
  import './record-view-body'
@@ -1,4 +1,4 @@
1
- import { LitElement, html, css } from 'lit-element'
1
+ import { LitElement, html, css } from 'lit'
2
2
 
3
3
  class DataGristProgressRenderer extends LitElement {
4
4
  static get styles() {
@@ -143,12 +143,15 @@ body {
143
143
  --record-view-footer-button-color: var(--theme-white-color);
144
144
  --record-view-footer-iconbutton-size: 35px;
145
145
  --record-view-footer-focus-background: var(--primary-color);
146
+
147
+ --ox-grist-padding: var(--padding-default) var(--padding-default) 0 var(--padding-default);
146
148
  }
147
149
 
148
150
  @media only screen and (max-width: 460px) {
149
151
  body {
150
152
  --record-view-label-font: bold 15px/32px var(--theme-font);
151
153
  --record-view-font: normal 15px/32px var(--theme-font);
154
+ --ox-grist-padding: 0;
152
155
  }
153
156
  }
154
157
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/grist-ui",
3
- "version": "4.2.12",
3
+ "version": "4.3.0",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -25,13 +25,14 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@material/mwc-icon": "^0.25.3",
28
- "@operato/data-grist": "^0.3.28",
29
- "@operato/headroom": "^0.3.28",
30
- "@things-factory/i18n-base": "^4.2.12",
31
- "@things-factory/styles": "^4.1.40",
32
- "@things-factory/utils": "^4.1.40",
33
- "lit": "^2.0.2",
28
+ "@operato/data-grist": "^0.4.3",
29
+ "@operato/headroom": "^0.4.3",
30
+ "@things-factory/i18n-base": "^4.3.0",
31
+ "@things-factory/styles": "^4.3.0",
32
+ "@things-factory/utils": "^4.3.0",
33
+ "lit": "^2.2.0",
34
+ "lodash-es": "^4.17.15",
34
35
  "underscore": "^1.11.0"
35
36
  },
36
- "gitHead": "fea26f2ea238a3a279c7ab6427cd8aedcd68926b"
37
+ "gitHead": "772c8e6f56a3dda655ad49f7018a49a37e081ee8"
37
38
  }