@things-factory/dataset 6.0.67 → 6.0.69
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/pages/data-set/data-set-list-page.ts +1 -1
- package/client/pages/data-summary/data-summary-list-page.ts +390 -0
- package/client/pages/data-summary/data-summary-search-page.ts +417 -0
- package/client/pages/data-summary/data-summary-view.ts +119 -0
- package/client/route.ts +12 -0
- package/dist-client/pages/data-set/data-set-list-page.js +1 -1
- package/dist-client/pages/data-set/data-set-list-page.js.map +1 -1
- package/dist-client/pages/data-summary/data-summary-importer.d.ts +22 -0
- package/dist-client/pages/data-summary/data-summary-importer.js +100 -0
- package/dist-client/pages/data-summary/data-summary-importer.js.map +1 -0
- package/dist-client/pages/data-summary/data-summary-list-page.d.ts +57 -0
- package/dist-client/pages/data-summary/data-summary-list-page.js +389 -0
- package/dist-client/pages/data-summary/data-summary-list-page.js.map +1 -0
- package/dist-client/pages/data-summary/data-summary-search-page.d.ts +63 -0
- package/dist-client/pages/data-summary/data-summary-search-page.js +407 -0
- package/dist-client/pages/data-summary/data-summary-search-page.js.map +1 -0
- package/dist-client/pages/data-summary/data-summary-view.d.ts +1 -0
- package/dist-client/pages/data-summary/data-summary-view.js +100 -0
- package/dist-client/pages/data-summary/data-summary-view.js.map +1 -0
- package/dist-client/route.js +9 -0
- package/dist-client/route.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/controllers/create-data-sample.js +1 -1
- package/dist-server/controllers/create-data-sample.js.map +1 -1
- package/dist-server/controllers/generate-data-summary.js +94 -0
- package/dist-server/controllers/generate-data-summary.js.map +1 -0
- package/dist-server/controllers/generate-summary-data.js +88 -0
- package/dist-server/controllers/generate-summary-data.js.map +1 -0
- package/dist-server/service/data-summary/data-summary-mutation.js +28 -0
- package/dist-server/service/data-summary/data-summary-mutation.js.map +1 -0
- package/dist-server/service/data-summary/data-summary-query.js +136 -0
- package/dist-server/service/data-summary/data-summary-query.js.map +1 -0
- package/dist-server/service/data-summary/data-summary-type.js +57 -0
- package/dist-server/service/data-summary/data-summary-type.js.map +1 -0
- package/dist-server/service/data-summary/data-summary.js +188 -0
- package/dist-server/service/data-summary/data-summary.js.map +1 -0
- package/dist-server/service/data-summary/index.js +10 -0
- package/dist-server/service/data-summary/index.js.map +1 -0
- package/dist-server/service/index.js +4 -0
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/helps/dataset/data-summary.md +160 -0
- package/package.json +4 -4
- package/server/controllers/create-data-sample.ts +1 -1
- package/server/controllers/generate-data-summary.ts +124 -0
- package/server/service/data-summary/data-summary-mutation.ts +19 -0
- package/server/service/data-summary/data-summary-query.ts +96 -0
- package/server/service/data-summary/data-summary-type.ts +40 -0
- package/server/service/data-summary/data-summary.ts +165 -0
- package/server/service/data-summary/index.ts +7 -0
- package/server/service/index.ts +4 -0
- package/things-factory.config.js +10 -1
- package/translations/en.json +8 -0
- package/translations/ko.json +8 -0
- package/translations/ms.json +8 -0
- package/translations/zh.json +8 -0
@@ -0,0 +1,389 @@
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
2
|
+
import '@operato/data-grist';
|
3
|
+
import './data-summary-view.js';
|
4
|
+
import { CommonGristStyles, ScrollbarStyles } from '@operato/styles';
|
5
|
+
import { PageView, store } from '@operato/shell';
|
6
|
+
import { css, html } from 'lit';
|
7
|
+
import { customElement, property, query } from 'lit/decorators.js';
|
8
|
+
import { DataGrist } from '@operato/data-grist';
|
9
|
+
import { client } from '@operato/graphql';
|
10
|
+
import { i18next, localize } from '@operato/i18n';
|
11
|
+
import { openPopup } from '@operato/layout';
|
12
|
+
import { OxPopup } from '@operato/popup';
|
13
|
+
import { isMobileDevice } from '@operato/utils';
|
14
|
+
import { connect } from 'pwa-helpers/connect-mixin';
|
15
|
+
import gql from 'graphql-tag';
|
16
|
+
let DataSummaryListPage = class DataSummaryListPage extends connect(store)(localize(i18next)(PageView)) {
|
17
|
+
constructor() {
|
18
|
+
super(...arguments);
|
19
|
+
this.mode = isMobileDevice() ? 'CARD' : 'GRID';
|
20
|
+
}
|
21
|
+
get context() {
|
22
|
+
return {
|
23
|
+
search: {
|
24
|
+
handler: (search) => {
|
25
|
+
this.grist.searchText = search;
|
26
|
+
},
|
27
|
+
placeholder: i18next.t('title.data-summary list'),
|
28
|
+
value: this.grist.searchText
|
29
|
+
},
|
30
|
+
filter: {
|
31
|
+
handler: () => {
|
32
|
+
this.grist.toggleHeadroom();
|
33
|
+
}
|
34
|
+
},
|
35
|
+
help: 'dataset/data-summary',
|
36
|
+
exportable: {
|
37
|
+
name: i18next.t('title.data-summary list'),
|
38
|
+
data: this._exportableData.bind(this)
|
39
|
+
}
|
40
|
+
};
|
41
|
+
}
|
42
|
+
render() {
|
43
|
+
const mode = this.mode || (isMobileDevice() ? 'LIST' : 'GRID');
|
44
|
+
return html `
|
45
|
+
<ox-grist
|
46
|
+
.mode=${mode}
|
47
|
+
.config=${this.gristConfig}
|
48
|
+
.fetchHandler=${this.fetchHandler.bind(this)}
|
49
|
+
?url-params-sensitive=${false /* this.active */}
|
50
|
+
>
|
51
|
+
<div slot="headroom">
|
52
|
+
<div id="filters">
|
53
|
+
<ox-filters-form autofocus without-search></ox-filters-form>
|
54
|
+
</div>
|
55
|
+
|
56
|
+
<div id="sorters">
|
57
|
+
Sort
|
58
|
+
<mwc-icon
|
59
|
+
@click=${e => {
|
60
|
+
const target = e.currentTarget;
|
61
|
+
this.sortersControl.open({
|
62
|
+
right: 0,
|
63
|
+
top: target.offsetTop + target.offsetHeight
|
64
|
+
});
|
65
|
+
}}
|
66
|
+
>expand_more</mwc-icon
|
67
|
+
>
|
68
|
+
<ox-popup id="sorter-control">
|
69
|
+
<ox-sorters-control> </ox-sorters-control>
|
70
|
+
</ox-popup>
|
71
|
+
</div>
|
72
|
+
|
73
|
+
<div id="modes">
|
74
|
+
<mwc-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</mwc-icon>
|
75
|
+
<mwc-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</mwc-icon>
|
76
|
+
<mwc-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</mwc-icon>
|
77
|
+
</div>
|
78
|
+
</div>
|
79
|
+
</ox-grist>
|
80
|
+
`;
|
81
|
+
}
|
82
|
+
async pageInitialized(lifecycle) {
|
83
|
+
const today = new Date().toISOString().split('T')[0];
|
84
|
+
this.gristConfig = {
|
85
|
+
list: { fields: ['dataSet', 'data', 'updater', 'updatedAt'] },
|
86
|
+
columns: [
|
87
|
+
{ type: 'gutter', gutterName: 'sequence' },
|
88
|
+
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
89
|
+
{
|
90
|
+
type: 'gutter',
|
91
|
+
gutterName: 'button',
|
92
|
+
icon: 'assignment',
|
93
|
+
title: i18next.t('title.open data summary view'),
|
94
|
+
handlers: {
|
95
|
+
click: (columns, data, column, record, rowIndex) => {
|
96
|
+
openPopup(html `
|
97
|
+
<data-summary-view data-summary-id=${record.id} style="background-color: white;"></data-summary-view>
|
98
|
+
`, {
|
99
|
+
backdrop: true,
|
100
|
+
size: 'large',
|
101
|
+
title: i18next.t('title.data-summary view')
|
102
|
+
});
|
103
|
+
}
|
104
|
+
}
|
105
|
+
},
|
106
|
+
{
|
107
|
+
type: 'string',
|
108
|
+
name: 'name',
|
109
|
+
label: true,
|
110
|
+
header: i18next.t('field.name'),
|
111
|
+
record: {
|
112
|
+
editable: false
|
113
|
+
},
|
114
|
+
filter: 'search',
|
115
|
+
sortable: true,
|
116
|
+
width: 120,
|
117
|
+
imex: true
|
118
|
+
},
|
119
|
+
{
|
120
|
+
type: 'string',
|
121
|
+
name: 'description',
|
122
|
+
label: true,
|
123
|
+
header: i18next.t('field.description'),
|
124
|
+
record: {
|
125
|
+
editable: false
|
126
|
+
},
|
127
|
+
filter: 'search',
|
128
|
+
width: 150,
|
129
|
+
imex: true
|
130
|
+
},
|
131
|
+
{
|
132
|
+
type: 'string',
|
133
|
+
name: 'workDate',
|
134
|
+
header: i18next.t('field.work-date'),
|
135
|
+
sortable: true,
|
136
|
+
filter: {
|
137
|
+
type: 'date',
|
138
|
+
operator: 'between',
|
139
|
+
value: [today, today]
|
140
|
+
},
|
141
|
+
width: 80,
|
142
|
+
imex: true
|
143
|
+
},
|
144
|
+
{
|
145
|
+
type: 'string',
|
146
|
+
name: 'workShift',
|
147
|
+
header: i18next.t('field.work-shift'),
|
148
|
+
sortable: true,
|
149
|
+
width: 60,
|
150
|
+
imex: true
|
151
|
+
},
|
152
|
+
{
|
153
|
+
type: 'string',
|
154
|
+
name: 'key01',
|
155
|
+
header: i18next.t('field.key-01'),
|
156
|
+
record: {
|
157
|
+
editable: false
|
158
|
+
},
|
159
|
+
sortable: true,
|
160
|
+
width: 120,
|
161
|
+
imex: true
|
162
|
+
},
|
163
|
+
{
|
164
|
+
type: 'string',
|
165
|
+
name: 'key02',
|
166
|
+
header: i18next.t('field.key-02'),
|
167
|
+
record: {
|
168
|
+
editable: false
|
169
|
+
},
|
170
|
+
sortable: true,
|
171
|
+
width: 120,
|
172
|
+
imex: true
|
173
|
+
},
|
174
|
+
{
|
175
|
+
type: 'string',
|
176
|
+
name: 'key03',
|
177
|
+
header: i18next.t('field.key-03'),
|
178
|
+
record: {
|
179
|
+
editable: false
|
180
|
+
},
|
181
|
+
sortable: true,
|
182
|
+
width: 120,
|
183
|
+
imex: true
|
184
|
+
},
|
185
|
+
{
|
186
|
+
type: 'string',
|
187
|
+
name: 'key04',
|
188
|
+
header: i18next.t('field.key-04'),
|
189
|
+
record: {
|
190
|
+
editable: false
|
191
|
+
},
|
192
|
+
sortable: true,
|
193
|
+
width: 120,
|
194
|
+
imex: true
|
195
|
+
},
|
196
|
+
{
|
197
|
+
type: 'string',
|
198
|
+
name: 'key05',
|
199
|
+
header: i18next.t('field.key-05'),
|
200
|
+
record: {
|
201
|
+
editable: false
|
202
|
+
},
|
203
|
+
sortable: true,
|
204
|
+
width: 120,
|
205
|
+
imex: true
|
206
|
+
},
|
207
|
+
{
|
208
|
+
type: 'checkbox',
|
209
|
+
name: 'count',
|
210
|
+
header: i18next.t('field.count'),
|
211
|
+
record: {
|
212
|
+
editable: false
|
213
|
+
},
|
214
|
+
width: 30
|
215
|
+
},
|
216
|
+
{
|
217
|
+
type: 'checkbox',
|
218
|
+
name: 'countOoc',
|
219
|
+
header: i18next.t('field.count-ooc'),
|
220
|
+
record: {
|
221
|
+
editable: false
|
222
|
+
},
|
223
|
+
width: 30
|
224
|
+
},
|
225
|
+
{
|
226
|
+
type: 'checkbox',
|
227
|
+
name: 'countOos',
|
228
|
+
header: i18next.t('field.count-oos'),
|
229
|
+
record: {
|
230
|
+
editable: false
|
231
|
+
},
|
232
|
+
width: 30
|
233
|
+
},
|
234
|
+
{
|
235
|
+
type: 'resource-object',
|
236
|
+
name: 'updater',
|
237
|
+
header: i18next.t('field.updater'),
|
238
|
+
sortable: true,
|
239
|
+
width: 120,
|
240
|
+
imex: true
|
241
|
+
},
|
242
|
+
{
|
243
|
+
type: 'datetime',
|
244
|
+
name: 'updatedAt',
|
245
|
+
header: i18next.t('field.updated_at'),
|
246
|
+
sortable: true,
|
247
|
+
width: 180,
|
248
|
+
imex: true
|
249
|
+
}
|
250
|
+
],
|
251
|
+
rows: {
|
252
|
+
appendable: false,
|
253
|
+
selectable: {
|
254
|
+
multiple: true
|
255
|
+
},
|
256
|
+
classifier: function (record, rowIndex) {
|
257
|
+
var emphasized;
|
258
|
+
if (record['oos']) {
|
259
|
+
emphasized = ['red'];
|
260
|
+
}
|
261
|
+
else if (record['ooc']) {
|
262
|
+
emphasized = 'orange';
|
263
|
+
}
|
264
|
+
return {
|
265
|
+
emphasized
|
266
|
+
};
|
267
|
+
}
|
268
|
+
},
|
269
|
+
sorters: [
|
270
|
+
{
|
271
|
+
name: 'workDate',
|
272
|
+
desc: true
|
273
|
+
}
|
274
|
+
]
|
275
|
+
};
|
276
|
+
}
|
277
|
+
async fetchHandler({ page, limit, sortings = [], filters = [] }) {
|
278
|
+
const response = await client.query({
|
279
|
+
query: gql `
|
280
|
+
query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
281
|
+
responses: dataSummaries(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
282
|
+
items {
|
283
|
+
id
|
284
|
+
name
|
285
|
+
description
|
286
|
+
dataSet {
|
287
|
+
id
|
288
|
+
}
|
289
|
+
workDate
|
290
|
+
workShift
|
291
|
+
key01
|
292
|
+
key02
|
293
|
+
key03
|
294
|
+
key04
|
295
|
+
key05
|
296
|
+
summary
|
297
|
+
count
|
298
|
+
countOoc
|
299
|
+
countOos
|
300
|
+
updater {
|
301
|
+
id
|
302
|
+
name
|
303
|
+
}
|
304
|
+
updatedAt
|
305
|
+
}
|
306
|
+
total
|
307
|
+
}
|
308
|
+
}
|
309
|
+
`,
|
310
|
+
variables: {
|
311
|
+
filters,
|
312
|
+
pagination: { page, limit },
|
313
|
+
sortings
|
314
|
+
}
|
315
|
+
});
|
316
|
+
return {
|
317
|
+
total: response.data.responses.total || 0,
|
318
|
+
records: response.data.responses.items || []
|
319
|
+
};
|
320
|
+
}
|
321
|
+
_exportableData() {
|
322
|
+
let records = [];
|
323
|
+
if (this.grist.selected && this.grist.selected.length > 0) {
|
324
|
+
records = this.grist.selected;
|
325
|
+
}
|
326
|
+
else {
|
327
|
+
records = this.grist.data.records;
|
328
|
+
}
|
329
|
+
var headerSetting = this.grist.compiledConfig.columns
|
330
|
+
.filter(column => column.type !== 'gutter' && column.record !== undefined && column.imex !== undefined)
|
331
|
+
.map(column => {
|
332
|
+
return column.imex === true
|
333
|
+
? {
|
334
|
+
header: column.header.renderer(column),
|
335
|
+
key: column.name,
|
336
|
+
width: column.width,
|
337
|
+
type: column.type
|
338
|
+
}
|
339
|
+
: column.imex;
|
340
|
+
});
|
341
|
+
var data = records.map(item => {
|
342
|
+
return Object.assign({ id: item.id }, this.gristConfig.columns
|
343
|
+
.filter(column => column.type !== 'gutter' && column.record !== undefined && column.imex !== undefined)
|
344
|
+
.reduce((record, column) => {
|
345
|
+
const key = column.imex === true ? column.name : column.imex.key;
|
346
|
+
record[key] = key
|
347
|
+
.split('.')
|
348
|
+
.reduce((obj, key) => (obj && obj[key] !== 'undefined' ? obj[key] : undefined), item);
|
349
|
+
return record;
|
350
|
+
}, {}));
|
351
|
+
});
|
352
|
+
return { header: headerSetting, data: data };
|
353
|
+
}
|
354
|
+
};
|
355
|
+
DataSummaryListPage.styles = [
|
356
|
+
ScrollbarStyles,
|
357
|
+
CommonGristStyles,
|
358
|
+
css `
|
359
|
+
:host {
|
360
|
+
display: flex;
|
361
|
+
|
362
|
+
width: 100%;
|
363
|
+
|
364
|
+
--grid-record-emphasized-background-color: red;
|
365
|
+
--grid-record-emphasized-color: yellow;
|
366
|
+
}
|
367
|
+
`
|
368
|
+
];
|
369
|
+
__decorate([
|
370
|
+
property({ type: Object }),
|
371
|
+
__metadata("design:type", Object)
|
372
|
+
], DataSummaryListPage.prototype, "gristConfig", void 0);
|
373
|
+
__decorate([
|
374
|
+
property({ type: String }),
|
375
|
+
__metadata("design:type", String)
|
376
|
+
], DataSummaryListPage.prototype, "mode", void 0);
|
377
|
+
__decorate([
|
378
|
+
query('ox-grist'),
|
379
|
+
__metadata("design:type", DataGrist)
|
380
|
+
], DataSummaryListPage.prototype, "grist", void 0);
|
381
|
+
__decorate([
|
382
|
+
query('#sorter-control'),
|
383
|
+
__metadata("design:type", OxPopup)
|
384
|
+
], DataSummaryListPage.prototype, "sortersControl", void 0);
|
385
|
+
DataSummaryListPage = __decorate([
|
386
|
+
customElement('data-summary-list-page')
|
387
|
+
], DataSummaryListPage);
|
388
|
+
export { DataSummaryListPage };
|
389
|
+
//# sourceMappingURL=data-summary-list-page.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"data-summary-list-page.js","sourceRoot":"","sources":["../../../client/pages/data-summary/data-summary-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Y,mBAAmB","sourcesContent":["import '@operato/data-grist'\nimport './data-summary-view.js'\n\nimport { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageView, store } from '@operato/shell'\nimport { css, html } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements'\nimport { ColumnConfig, DataGrist, GristRecord, FetchOption, SortersControl } from '@operato/data-grist'\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { notify, openPopup } from '@operato/layout'\nimport { OxPopup } from '@operato/popup'\nimport { isMobileDevice } from '@operato/utils'\n\nimport { connect } from 'pwa-helpers/connect-mixin'\nimport gql from 'graphql-tag'\n\n@customElement('data-summary-list-page')\nexport class DataSummaryListPage extends connect(store)(localize(i18next)(PageView)) {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n css`\n :host {\n display: flex;\n\n width: 100%;\n\n --grid-record-emphasized-background-color: red;\n --grid-record-emphasized-color: yellow;\n }\n `\n ]\n\n @property({ type: Object }) gristConfig: any\n @property({ type: String }) mode: 'CARD' | 'GRID' | 'LIST' = isMobileDevice() ? 'CARD' : 'GRID'\n\n @query('ox-grist') private grist!: DataGrist\n @query('#sorter-control') private sortersControl!: OxPopup\n\n get context() {\n return {\n search: {\n handler: (search: string) => {\n this.grist.searchText = search\n },\n placeholder: i18next.t('title.data-summary list'),\n value: this.grist.searchText\n },\n filter: {\n handler: () => {\n this.grist.toggleHeadroom()\n }\n },\n help: 'dataset/data-summary',\n exportable: {\n name: i18next.t('title.data-summary list'),\n data: this._exportableData.bind(this)\n }\n }\n }\n\n render() {\n const mode = this.mode || (isMobileDevice() ? 'LIST' : 'GRID')\n\n return html`\n <ox-grist\n .mode=${mode}\n .config=${this.gristConfig}\n .fetchHandler=${this.fetchHandler.bind(this)}\n ?url-params-sensitive=${false /* this.active */}\n >\n <div slot=\"headroom\">\n <div id=\"filters\">\n <ox-filters-form autofocus without-search></ox-filters-form>\n </div>\n\n <div id=\"sorters\">\n Sort\n <mwc-icon\n @click=${e => {\n const target = e.currentTarget\n this.sortersControl.open({\n right: 0,\n top: target.offsetTop + target.offsetHeight\n })\n }}\n >expand_more</mwc-icon\n >\n <ox-popup id=\"sorter-control\">\n <ox-sorters-control> </ox-sorters-control>\n </ox-popup>\n </div>\n\n <div id=\"modes\">\n <mwc-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</mwc-icon>\n <mwc-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</mwc-icon>\n <mwc-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</mwc-icon>\n </div>\n </div>\n </ox-grist>\n `\n }\n\n async pageInitialized(lifecycle) {\n const today = new Date().toISOString().split('T')[0]\n\n this.gristConfig = {\n list: { fields: ['dataSet', 'data', 'updater', 'updatedAt'] },\n columns: [\n { type: 'gutter', gutterName: 'sequence' },\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'assignment',\n title: i18next.t('title.open data summary view'),\n handlers: {\n click: (columns, data, column, record, rowIndex) => {\n openPopup(\n html`\n <data-summary-view data-summary-id=${record.id} style=\"background-color: white;\"></data-summary-view>\n `,\n {\n backdrop: true,\n size: 'large',\n title: i18next.t('title.data-summary view')\n }\n )\n }\n }\n },\n {\n type: 'string',\n name: 'name',\n label: true,\n header: i18next.t('field.name'),\n record: {\n editable: false\n },\n filter: 'search',\n sortable: true,\n width: 120,\n imex: true\n },\n {\n type: 'string',\n name: 'description',\n label: true,\n header: i18next.t('field.description'),\n record: {\n editable: false\n },\n filter: 'search',\n width: 150,\n imex: true\n },\n {\n type: 'string',\n name: 'workDate',\n header: i18next.t('field.work-date'),\n sortable: true,\n filter: {\n type: 'date',\n operator: 'between',\n value: [today, today]\n },\n width: 80,\n imex: true\n },\n {\n type: 'string',\n name: 'workShift',\n header: i18next.t('field.work-shift'),\n sortable: true,\n width: 60,\n imex: true\n },\n {\n type: 'string',\n name: 'key01',\n header: i18next.t('field.key-01'),\n record: {\n editable: false\n },\n sortable: true,\n width: 120,\n imex: true\n },\n {\n type: 'string',\n name: 'key02',\n header: i18next.t('field.key-02'),\n record: {\n editable: false\n },\n sortable: true,\n width: 120,\n imex: true\n },\n {\n type: 'string',\n name: 'key03',\n header: i18next.t('field.key-03'),\n record: {\n editable: false\n },\n sortable: true,\n width: 120,\n imex: true\n },\n {\n type: 'string',\n name: 'key04',\n header: i18next.t('field.key-04'),\n record: {\n editable: false\n },\n sortable: true,\n width: 120,\n imex: true\n },\n {\n type: 'string',\n name: 'key05',\n header: i18next.t('field.key-05'),\n record: {\n editable: false\n },\n sortable: true,\n width: 120,\n imex: true\n },\n {\n type: 'checkbox',\n name: 'count',\n header: i18next.t('field.count'),\n record: {\n editable: false\n },\n width: 30\n },\n {\n type: 'checkbox',\n name: 'countOoc',\n header: i18next.t('field.count-ooc'),\n record: {\n editable: false\n },\n width: 30\n },\n {\n type: 'checkbox',\n name: 'countOos',\n header: i18next.t('field.count-oos'),\n record: {\n editable: false\n },\n width: 30\n },\n {\n type: 'resource-object',\n name: 'updater',\n header: i18next.t('field.updater'),\n sortable: true,\n width: 120,\n imex: true\n },\n {\n type: 'datetime',\n name: 'updatedAt',\n header: i18next.t('field.updated_at'),\n sortable: true,\n width: 180,\n imex: true\n }\n ],\n rows: {\n appendable: false,\n selectable: {\n multiple: true\n },\n classifier: function (record, rowIndex) {\n var emphasized\n if (record['oos']) {\n emphasized = ['red']\n } else if (record['ooc']) {\n emphasized = 'orange'\n }\n\n return {\n emphasized\n }\n }\n },\n sorters: [\n {\n name: 'workDate',\n desc: true\n }\n ]\n }\n }\n\n async fetchHandler({ page, limit, sortings = [], filters = [] }: FetchOption) {\n const response = await client.query({\n query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {\n responses: dataSummaries(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n name\n description\n dataSet {\n id\n }\n workDate\n workShift\n key01\n key02\n key03\n key04\n key05\n summary\n count\n countOoc\n countOos\n updater {\n id\n name\n }\n updatedAt\n }\n total\n }\n }\n `,\n variables: {\n filters,\n pagination: { page, limit },\n sortings\n }\n })\n\n return {\n total: response.data.responses.total || 0,\n records: response.data.responses.items || []\n }\n }\n\n _exportableData() {\n let records = [] as GristRecord[]\n if (this.grist.selected && this.grist.selected.length > 0) {\n records = this.grist.selected\n } else {\n records = this.grist.data.records\n }\n\n var headerSetting = this.grist.compiledConfig.columns\n .filter(column => column.type !== 'gutter' && column.record !== undefined && column.imex !== undefined)\n .map(column => {\n return column.imex === true\n ? {\n header: column.header.renderer(column),\n key: column.name,\n width: column.width,\n type: column.type\n }\n : column.imex\n })\n\n var data = records.map(item => {\n return {\n id: item.id,\n ...this.gristConfig.columns\n .filter(column => column.type !== 'gutter' && column.record !== undefined && column.imex !== undefined)\n .reduce((record, column) => {\n const key = column.imex === true ? column.name : column.imex.key\n record[key] = key\n .split('.')\n .reduce((obj, key) => (obj && obj[key] !== 'undefined' ? obj[key] : undefined), item)\n return record\n }, {})\n }\n })\n\n return { header: headerSetting, data: data }\n }\n}\n"]}
|
@@ -0,0 +1,63 @@
|
|
1
|
+
import '@operato/data-grist';
|
2
|
+
import './data-summary-view.js';
|
3
|
+
import { FetchOption } from '@operato/data-grist';
|
4
|
+
import { PageView } from '@operato/shell';
|
5
|
+
declare const DataSummarySearchPage_base: (new (...args: any[]) => {
|
6
|
+
_storeUnsubscribe: import("redux").Unsubscribe;
|
7
|
+
connectedCallback(): void;
|
8
|
+
disconnectedCallback(): void;
|
9
|
+
stateChanged(_state: unknown): void;
|
10
|
+
readonly isConnected: boolean;
|
11
|
+
}) & (new (...args: any[]) => import("lit").LitElement) & typeof PageView;
|
12
|
+
export declare class DataSummarySearchPage extends DataSummarySearchPage_base {
|
13
|
+
static styles: import("lit").CSSResult[];
|
14
|
+
dataKeySetId?: string;
|
15
|
+
dataKeySet: any;
|
16
|
+
gristConfig: any;
|
17
|
+
mode: 'CARD' | 'GRID' | 'LIST';
|
18
|
+
private grist;
|
19
|
+
private sortersControl;
|
20
|
+
get context(): {
|
21
|
+
search: {
|
22
|
+
handler: (search: string) => void;
|
23
|
+
placeholder: string;
|
24
|
+
value: string;
|
25
|
+
};
|
26
|
+
filter: {
|
27
|
+
handler: () => void;
|
28
|
+
};
|
29
|
+
help: string;
|
30
|
+
actions: never[];
|
31
|
+
exportable: {
|
32
|
+
name: string;
|
33
|
+
data: () => {
|
34
|
+
header: (false | {
|
35
|
+
header: any;
|
36
|
+
key: string;
|
37
|
+
width: string | number | import("@operato/data-grist").ColumnWidthCallback | undefined;
|
38
|
+
type: string;
|
39
|
+
} | undefined)[];
|
40
|
+
data: any[];
|
41
|
+
};
|
42
|
+
};
|
43
|
+
};
|
44
|
+
render(): import("lit-html").TemplateResult<1>;
|
45
|
+
pageUpdated(changes: any, lifecycle: any): void;
|
46
|
+
updated(changes: any): Promise<void>;
|
47
|
+
getDataKeyColumns(): any;
|
48
|
+
refreshGristConfig(): void;
|
49
|
+
fetchHandler({ page, limit, sortings, filters }: FetchOption): Promise<{
|
50
|
+
total: any;
|
51
|
+
records: any;
|
52
|
+
}>;
|
53
|
+
_exportableData(): {
|
54
|
+
header: (false | {
|
55
|
+
header: any;
|
56
|
+
key: string;
|
57
|
+
width: string | number | import("@operato/data-grist").ColumnWidthCallback | undefined;
|
58
|
+
type: string;
|
59
|
+
} | undefined)[];
|
60
|
+
data: any[];
|
61
|
+
};
|
62
|
+
}
|
63
|
+
export {};
|