@things-factory/rack-base 10.1.303 → 10.1.314
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/dist-client/pages/cell/cell-list-page.d.ts +1 -0
- package/dist-client/pages/cell/cell-list-page.js +11 -5
- package/dist-client/pages/rack/rack-list-page.d.ts +1 -0
- package/dist-client/pages/rack/rack-list-page.js +11 -5
- package/dist-server/service/cell/cell-query.js +3 -3
- package/dist-server/service/rack/rack-query.js +3 -3
- package/package.json +6 -5
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
2
|
import '@operato/data-grist';
|
|
3
|
+
import '@things-factory/ai-assistant/dist-client/index.js';
|
|
3
4
|
import { CommonButtonStyles, CommonHeaderStyles, CommonGristStyles, ScrollbarStyles, WorkSurfacePageStyles } from '@operato/styles';
|
|
4
5
|
import { PageView } from '@operato/shell';
|
|
5
6
|
import { css, html } from 'lit';
|
|
@@ -53,10 +54,6 @@ let CellListPage = class CellListPage extends localize(i18next)(ScopedElementsMi
|
|
|
53
54
|
{ title: i18next.t('button.save'),
|
|
54
55
|
action: this._updateCell.bind(this),
|
|
55
56
|
...CommonButtonStyles.save
|
|
56
|
-
},
|
|
57
|
-
{ title: i18next.t('button.delete'),
|
|
58
|
-
action: this._deleteCell.bind(this),
|
|
59
|
-
...CommonButtonStyles.delete
|
|
60
57
|
}
|
|
61
58
|
],
|
|
62
59
|
exportable: { name: i18next.t('title.cell list'),
|
|
@@ -70,6 +67,14 @@ let CellListPage = class CellListPage extends localize(i18next)(ScopedElementsMi
|
|
|
70
67
|
const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID');
|
|
71
68
|
return html `
|
|
72
69
|
<ox-grist class="page-fill" .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
|
|
70
|
+
<!-- What is done to the picked rows: over the column heads while rows are picked (ADR-0225). -->
|
|
71
|
+
<ox-assistant-selection-bar
|
|
72
|
+
slot="selection"
|
|
73
|
+
.gridOf=${() => this.grist}
|
|
74
|
+
name=${i18next.t('title.cell list')}
|
|
75
|
+
.assistant=${false}
|
|
76
|
+
.actions=${[{ id: 'delete', title: i18next.t('button.delete'), icon: 'delete_outline', emphasis: { danger: true }, action: () => this._deleteCell() }]}
|
|
77
|
+
></ox-assistant-selection-bar>
|
|
73
78
|
<div slot="headroom" class="header">
|
|
74
79
|
<div class="filters">
|
|
75
80
|
<ox-filters-form without-search autofocus></ox-filters-form>
|
|
@@ -216,8 +221,9 @@ let CellListPage = class CellListPage extends localize(i18next)(ScopedElementsMi
|
|
|
216
221
|
}
|
|
217
222
|
}
|
|
218
223
|
}
|
|
224
|
+
/* The list's own export is the rows it shows; the picked rows go out by the selection bar's 「선택 내보내기」 (ADR-0225). */
|
|
219
225
|
async exportHandler() {
|
|
220
|
-
const exportTargets = this.grist.
|
|
226
|
+
const exportTargets = this.grist.dirtyData.records;
|
|
221
227
|
const targetFieldSet = new Set(['id', 'name', 'description', 'active']);
|
|
222
228
|
return exportTargets.map(cell => {
|
|
223
229
|
let tempObj = {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
2
|
import '@operato/data-grist';
|
|
3
|
+
import '@things-factory/ai-assistant/dist-client/index.js';
|
|
3
4
|
import { CommonButtonStyles, CommonHeaderStyles, CommonGristStyles, ScrollbarStyles, WorkSurfacePageStyles } from '@operato/styles';
|
|
4
5
|
import { PageView } from '@operato/shell';
|
|
5
6
|
import { css, html } from 'lit';
|
|
@@ -56,10 +57,6 @@ let RackListPage = class RackListPage extends localize(i18next)(ScopedElementsMi
|
|
|
56
57
|
{ title: i18next.t('button.save'),
|
|
57
58
|
action: this._updateRack.bind(this),
|
|
58
59
|
...CommonButtonStyles.save
|
|
59
|
-
},
|
|
60
|
-
{ title: i18next.t('button.delete'),
|
|
61
|
-
action: this._deleteRack.bind(this),
|
|
62
|
-
...CommonButtonStyles.delete
|
|
63
60
|
}
|
|
64
61
|
],
|
|
65
62
|
exportable: { name: i18next.t('title.rack list'),
|
|
@@ -73,6 +70,14 @@ let RackListPage = class RackListPage extends localize(i18next)(ScopedElementsMi
|
|
|
73
70
|
const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID');
|
|
74
71
|
return html `
|
|
75
72
|
<ox-grist class="page-fill" .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
|
|
73
|
+
<!-- What is done to the picked rows: over the column heads while rows are picked (ADR-0225). -->
|
|
74
|
+
<ox-assistant-selection-bar
|
|
75
|
+
slot="selection"
|
|
76
|
+
.gridOf=${() => this.grist}
|
|
77
|
+
name=${i18next.t('title.rack list')}
|
|
78
|
+
.assistant=${false}
|
|
79
|
+
.actions=${[{ id: 'delete', title: i18next.t('button.delete'), icon: 'delete_outline', emphasis: { danger: true }, action: () => this._deleteRack() }]}
|
|
80
|
+
></ox-assistant-selection-bar>
|
|
76
81
|
<div slot="headroom" class="header">
|
|
77
82
|
<div class="filters">
|
|
78
83
|
<ox-filters-form without-search autofocus></ox-filters-form>
|
|
@@ -219,8 +224,9 @@ let RackListPage = class RackListPage extends localize(i18next)(ScopedElementsMi
|
|
|
219
224
|
}
|
|
220
225
|
}
|
|
221
226
|
}
|
|
227
|
+
/* The list's own export is the rows it shows; the picked rows go out by the selection bar's 「선택 내보내기」 (ADR-0225). */
|
|
222
228
|
async exportHandler() {
|
|
223
|
-
const exportTargets = this.grist.
|
|
229
|
+
const exportTargets = this.grist.dirtyData.records;
|
|
224
230
|
const targetFieldSet = new Set(['id', 'name', 'description', 'active']);
|
|
225
231
|
return exportTargets.map(rack => {
|
|
226
232
|
let tempObj = {};
|
|
@@ -26,13 +26,13 @@ let CellQuery = class CellQuery {
|
|
|
26
26
|
return { items, total };
|
|
27
27
|
}
|
|
28
28
|
async domain(cell) {
|
|
29
|
-
return await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: cell.domainId });
|
|
29
|
+
return cell.domainId ? await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: cell.domainId }) : null;
|
|
30
30
|
}
|
|
31
31
|
async updater(cell) {
|
|
32
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: cell.updaterId });
|
|
32
|
+
return cell.updaterId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: cell.updaterId }) : null;
|
|
33
33
|
}
|
|
34
34
|
async creator(cell) {
|
|
35
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: cell.creatorId });
|
|
35
|
+
return cell.creatorId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: cell.creatorId }) : null;
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
exports.CellQuery = CellQuery;
|
|
@@ -37,13 +37,13 @@ let RackQuery = class RackQuery {
|
|
|
37
37
|
return attachment?.fullpath;
|
|
38
38
|
}
|
|
39
39
|
async domain(rack) {
|
|
40
|
-
return await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: rack.domainId });
|
|
40
|
+
return rack.domainId ? await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: rack.domainId }) : null;
|
|
41
41
|
}
|
|
42
42
|
async updater(rack) {
|
|
43
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: rack.updaterId });
|
|
43
|
+
return rack.updaterId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: rack.updaterId }) : null;
|
|
44
44
|
}
|
|
45
45
|
async creator(rack) {
|
|
46
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: rack.creatorId });
|
|
46
|
+
return rack.creatorId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: rack.creatorId }) : null;
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
exports.RackQuery = RackQuery;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/rack-base",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.314",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "dist-client/index.js",
|
|
6
6
|
"files": [
|
|
@@ -44,9 +44,10 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@operato/popup": "^10.0.0",
|
|
47
|
-
"@things-factory/
|
|
48
|
-
"@things-factory/
|
|
49
|
-
"@things-factory/
|
|
47
|
+
"@things-factory/ai-assistant": "^10.1.314",
|
|
48
|
+
"@things-factory/attachment-base": "^10.1.314",
|
|
49
|
+
"@things-factory/auth-base": "^10.1.314",
|
|
50
|
+
"@things-factory/shell": "^10.1.304"
|
|
50
51
|
},
|
|
51
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "8d74df0a0618131ff17309638a6aa0affbd4c77d"
|
|
52
53
|
}
|