@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.
- package/client/data-grid/data-grid-body-style.js +1 -1
- package/client/data-grid/data-grid-body.js +3 -3
- package/client/data-grid/data-grid-field.js +1 -1
- package/client/data-grid/data-grid-footer.js +2 -6
- package/client/data-grid/data-grid-header.js +3 -2
- package/client/data-grid/data-grid.js +1 -1
- package/client/data-grist.js +1 -1
- package/client/data-list/data-list-field.js +1 -1
- package/client/data-list/data-list-gutter.js +3 -5
- package/client/data-list/data-list.js +1 -1
- package/client/data-list/record-partial.js +1 -1
- package/client/data-provider.js +3 -2
- package/client/data-report/data-report-body-style.js +1 -1
- package/client/data-report/data-report-body.js +1 -1
- package/client/data-report/data-report-component.js +1 -1
- package/client/data-report/data-report-field.js +2 -4
- package/client/data-report/data-report-header.js +3 -2
- package/client/data-report.js +1 -1
- package/client/editors/input-editors.js +1 -1
- package/client/gutters/gutter-button.js +1 -1
- package/client/gutters/gutter-dirty.js +1 -1
- package/client/gutters/gutter-row-selector.js +1 -1
- package/client/record-view/record-view-body.js +4 -6
- package/client/record-view/record-view.js +1 -1
- package/client/renderers/progress-renderer.js +1 -1
- package/client/themes/grist-theme.css +3 -0
- package/package.json +9 -8
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './data-grid-field'
|
|
2
2
|
|
|
3
|
-
import { html, LitElement } from 'lit
|
|
4
|
-
import
|
|
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 =
|
|
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 { LitElement, html, css } from 'lit
|
|
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> </span>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
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() {
|
package/client/data-grist.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LitElement, html, css } from 'lit
|
|
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) {
|
package/client/data-provider.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './data-report-field'
|
|
2
2
|
|
|
3
|
-
import { html, LitElement } from 'lit
|
|
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
|
|
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 {
|
|
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 {
|
package/client/data-report.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LitElement, html, css } from 'lit
|
|
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
|
|
|
@@ -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.
|
|
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
|
|
29
|
-
"@operato/headroom": "^0.3
|
|
30
|
-
"@things-factory/i18n-base": "^4.
|
|
31
|
-
"@things-factory/styles": "^4.
|
|
32
|
-
"@things-factory/utils": "^4.
|
|
33
|
-
"lit": "^2.0
|
|
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": "
|
|
37
|
+
"gitHead": "772c8e6f56a3dda655ad49f7018a49a37e081ee8"
|
|
37
38
|
}
|