@operato/data-grist 0.3.28 → 0.4.2
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/CHANGELOG.md +43 -0
- package/demo/data-grist-test.html +49 -114
- package/demo/index.html +20 -2
- package/dist/src/data-consumer.d.ts +1 -0
- package/dist/src/data-consumer.js.map +1 -1
- package/dist/src/data-grist.d.ts +2 -1
- package/dist/src/data-grist.js +25 -0
- package/dist/src/data-grist.js.map +1 -1
- package/dist/src/data-provider.d.ts +1 -2
- package/dist/src/data-provider.js +4 -0
- package/dist/src/data-provider.js.map +1 -1
- package/dist/src/data-report.d.ts +1 -0
- package/dist/src/data-report.js +3 -0
- package/dist/src/data-report.js.map +1 -1
- package/dist/src/editors/registry.d.ts +1 -1
- package/dist/src/editors/registry.js +1 -1
- package/dist/src/editors/registry.js.map +1 -1
- package/dist/src/handlers/move-down.d.ts +3 -0
- package/dist/src/handlers/move-down.js +26 -0
- package/dist/src/handlers/move-down.js.map +1 -0
- package/dist/src/handlers/move-up.d.ts +3 -0
- package/dist/src/handlers/move-up.js +26 -0
- package/dist/src/handlers/move-up.js.map +1 -0
- package/dist/src/handlers/record-copy.d.ts +3 -0
- package/dist/src/handlers/record-copy.js +23 -0
- package/dist/src/handlers/record-copy.js.map +1 -0
- package/dist/src/handlers/registry.js +7 -1
- package/dist/src/handlers/registry.js.map +1 -1
- package/dist/src/record-view/record-creator.js.map +1 -1
- package/dist/src/record-view/record-view.js +0 -2
- package/dist/src/record-view/record-view.js.map +1 -1
- package/dist/src/types.d.ts +8 -6
- package/dist/src/types.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -10
- package/src/data-consumer.ts +1 -0
- package/src/data-grist.ts +32 -1
- package/src/data-provider.ts +8 -3
- package/src/data-report.ts +4 -0
- package/src/editors/registry.ts +4 -3
- package/src/handlers/move-down.ts +44 -0
- package/src/handlers/move-up.ts +44 -0
- package/src/handlers/record-copy.ts +38 -0
- package/src/handlers/registry.ts +7 -1
- package/src/record-view/record-view.ts +0 -2
- package/src/types.ts +13 -7
- package/themes/grist-theme.css +5 -6
- package/yarn-error.log +17496 -0
- package/custom-elements.json +0 -12924
- package/dist/test/data-grist.test.d.ts +0 -1
- package/dist/test/data-grist.test.js +0 -24
- package/dist/test/data-grist.test.js.map +0 -1
- package/test/data-grist.test.ts +0 -35
package/src/types.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { TemplateResult } from 'lit-html'
|
|
2
|
-
|
|
3
1
|
import { DataCardField } from './data-card/data-card-field'
|
|
4
2
|
import { DataCardGutter } from './data-card/data-card-gutter'
|
|
5
|
-
import { RecordCard } from './data-card/record-card'
|
|
6
3
|
import { DataGridField } from './data-grid/data-grid-field'
|
|
7
4
|
import { DataListField } from './data-list/data-list-field'
|
|
8
5
|
import { DataListGutter } from './data-list/data-list-gutter'
|
|
9
|
-
import { RecordPartial } from './data-list/record-partial'
|
|
10
6
|
import { DataReportField } from './data-report/data-report-field'
|
|
7
|
+
import { RecordCard } from './data-card/record-card'
|
|
8
|
+
import { RecordPartial } from './data-list/record-partial'
|
|
9
|
+
import { TemplateResult } from 'lit-html'
|
|
11
10
|
|
|
12
11
|
export type GristConfig = {
|
|
13
12
|
columns: ColumnConfig[]
|
|
@@ -59,13 +58,20 @@ export type PaginationConfig = {
|
|
|
59
58
|
infinite?: boolean
|
|
60
59
|
}
|
|
61
60
|
|
|
62
|
-
export type FetchOption = {
|
|
63
|
-
|
|
61
|
+
export type FetchOption = {
|
|
62
|
+
page?: number
|
|
63
|
+
limit?: number
|
|
64
|
+
sorters?: SortersConfig
|
|
65
|
+
filters?: FilterConfigObject[]
|
|
66
|
+
options?: object
|
|
67
|
+
}
|
|
68
|
+
export type FetchResult = {
|
|
64
69
|
page?: number
|
|
65
70
|
limit?: number
|
|
66
71
|
total: number
|
|
67
|
-
records:
|
|
72
|
+
records: GristRecord[]
|
|
68
73
|
}
|
|
74
|
+
export type FetchHandler = (param: FetchOption) => FetchResult
|
|
69
75
|
|
|
70
76
|
export type GristEventHandler = (
|
|
71
77
|
columns: ColumnConfig[],
|
package/themes/grist-theme.css
CHANGED
|
@@ -143,13 +143,8 @@ 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
146
|
|
|
148
|
-
|
|
149
|
-
body {
|
|
150
|
-
--record-view-label-font: bold 15px/32px var(--theme-font);
|
|
151
|
-
--record-view-font: normal 15px/32px var(--theme-font);
|
|
152
|
-
}
|
|
147
|
+
--ox-grist-padding: var(--padding-default) var(--padding-default) 0 var(--padding-default);
|
|
153
148
|
}
|
|
154
149
|
|
|
155
150
|
@media print {
|
|
@@ -160,12 +155,16 @@ body {
|
|
|
160
155
|
|
|
161
156
|
@media only screen and (max-width: 460px) {
|
|
162
157
|
body {
|
|
158
|
+
--record-view-label-font: bold 15px/32px var(--theme-font);
|
|
159
|
+
--record-view-font: normal 15px/32px var(--theme-font);
|
|
163
160
|
--data-card-template: repeat(1, minmax(auto, 100%));
|
|
161
|
+
--ox-grist-padding: 0;
|
|
164
162
|
}
|
|
165
163
|
}
|
|
166
164
|
@media (min-width: 461px) and (max-width: 700px) {
|
|
167
165
|
body {
|
|
168
166
|
--data-card-template: repeat(2, minmax(auto, 100%));
|
|
167
|
+
--ox-grist-padding: 0;
|
|
169
168
|
}
|
|
170
169
|
}
|
|
171
170
|
@media (min-width: 461px) and (max-width: 1024px) {
|