@things-factory/i18n-base 10.1.302 → 10.1.304
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,6 +1,7 @@
|
|
|
1
1
|
import '@material/web/icon/icon.js';
|
|
2
2
|
import '@operato/data-grist';
|
|
3
3
|
import '@operato/input/ox-input-select-buttons.js';
|
|
4
|
+
import '@things-factory/ai-assistant/dist-client/index.js';
|
|
4
5
|
import { PageView } from '@operato/shell';
|
|
5
6
|
import { FetchOption } from '@operato/data-grist';
|
|
6
7
|
declare const TerminologyPage_base: (new (...args: any[]) => import("lit").LitElement) & typeof PageView;
|
|
@@ -21,19 +22,11 @@ export declare class TerminologyPage extends TerminologyPage_base {
|
|
|
21
22
|
handler: () => void;
|
|
22
23
|
};
|
|
23
24
|
help: string;
|
|
24
|
-
actions:
|
|
25
|
+
actions: {
|
|
25
26
|
title: string;
|
|
26
27
|
action: () => Promise<void>;
|
|
27
28
|
icon: string;
|
|
28
|
-
|
|
29
|
-
} | {
|
|
30
|
-
title: string;
|
|
31
|
-
action: () => Promise<any>;
|
|
32
|
-
icon: string;
|
|
33
|
-
emphasis: {
|
|
34
|
-
danger: boolean;
|
|
35
|
-
};
|
|
36
|
-
})[];
|
|
29
|
+
}[];
|
|
37
30
|
exportable: {
|
|
38
31
|
name: string;
|
|
39
32
|
data: () => {
|
|
@@ -2,6 +2,7 @@ import { __decorate, __metadata } from "tslib";
|
|
|
2
2
|
import '@material/web/icon/icon.js';
|
|
3
3
|
import '@operato/data-grist';
|
|
4
4
|
import '@operato/input/ox-input-select-buttons.js';
|
|
5
|
+
import '@things-factory/ai-assistant/dist-client/index.js';
|
|
5
6
|
import { css, html } from 'lit';
|
|
6
7
|
import { customElement, query, state } from 'lit/decorators.js';
|
|
7
8
|
import gql from 'graphql-tag';
|
|
@@ -63,14 +64,6 @@ let TerminologyPage = class TerminologyPage extends localize(i18next)(PageView)
|
|
|
63
64
|
title: i18next.t('button.save'),
|
|
64
65
|
action: this.save.bind(this),
|
|
65
66
|
icon: 'save'
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
title: i18next.t('button.delete'),
|
|
69
|
-
action: this.delete.bind(this),
|
|
70
|
-
icon: 'delete',
|
|
71
|
-
emphasis: {
|
|
72
|
-
danger: true
|
|
73
|
-
}
|
|
74
67
|
}
|
|
75
68
|
],
|
|
76
69
|
exportable: {
|
|
@@ -105,6 +98,14 @@ let TerminologyPage = class TerminologyPage extends localize(i18next)(PageView)
|
|
|
105
98
|
const mode = this.mode || (isMobileDevice() ? 'LIST' : 'GRID');
|
|
106
99
|
return html `
|
|
107
100
|
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)} .countHandler=${this.countHandler.bind(this)}>
|
|
101
|
+
<!-- What is done to the picked rows: over the column heads while rows are picked (ADR-0225). -->
|
|
102
|
+
<ox-assistant-selection-bar
|
|
103
|
+
slot="selection"
|
|
104
|
+
.gridOf=${() => this.grist}
|
|
105
|
+
name=${i18next.t('title.terminology')}
|
|
106
|
+
.assistant=${false}
|
|
107
|
+
.actions=${[{ id: 'delete', title: i18next.t('button.delete'), icon: 'delete_outline', emphasis: { danger: true }, action: () => this.delete() }]}
|
|
108
|
+
></ox-assistant-selection-bar>
|
|
108
109
|
<div slot="headroom" class="header">
|
|
109
110
|
<div class="filters">
|
|
110
111
|
<ox-filters-form autofocus without-search></ox-filters-form>
|
|
@@ -117,8 +118,10 @@ let TerminologyPage = class TerminologyPage extends localize(i18next)(PageView)
|
|
|
117
118
|
async pageInitialized(lifecycle) {
|
|
118
119
|
this.gristConfig = {
|
|
119
120
|
list: {
|
|
120
|
-
|
|
121
|
-
|
|
121
|
+
/* description and active were no columns: the term and how it reads, then its language, category and date (2026-11-22 card audit). */
|
|
122
|
+
fields: ['name', 'display'],
|
|
123
|
+
details: ['locale', 'category', 'updatedAt'],
|
|
124
|
+
labeled: true
|
|
122
125
|
},
|
|
123
126
|
columns: [
|
|
124
127
|
{ type: 'gutter', gutterName: 'sequence' },
|
|
@@ -279,14 +282,9 @@ let TerminologyPage = class TerminologyPage extends localize(i18next)(PageView)
|
|
|
279
282
|
records: response.data.terminologies.items || []
|
|
280
283
|
};
|
|
281
284
|
}
|
|
285
|
+
/* The list's own export is the rows it shows; the picked rows go out by the selection bar's 「선택 내보내기」 (ADR-0225). */
|
|
282
286
|
exportHandler() {
|
|
283
|
-
let records =
|
|
284
|
-
if (this.grist.selected && this.grist.selected.length > 0) {
|
|
285
|
-
records = this.grist.selected;
|
|
286
|
-
}
|
|
287
|
-
else {
|
|
288
|
-
records = this.grist.data.records;
|
|
289
|
-
}
|
|
287
|
+
let records = this.grist.data.records;
|
|
290
288
|
var headerSetting = this.grist.compiledConfig.columns
|
|
291
289
|
.filter(column => column.type !== 'gutter' && column.record !== undefined && column.imex !== undefined)
|
|
292
290
|
.map(column => {
|
|
@@ -32,13 +32,13 @@ let TerminologyQuery = class TerminologyQuery {
|
|
|
32
32
|
return [...counted].map(([value, count]) => ({ value, count }));
|
|
33
33
|
}
|
|
34
34
|
async domain(terminology) {
|
|
35
|
-
return await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: terminology.domainId });
|
|
35
|
+
return terminology.domainId ? await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: terminology.domainId }) : null;
|
|
36
36
|
}
|
|
37
37
|
async updater(terminology) {
|
|
38
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: terminology.updaterId });
|
|
38
|
+
return terminology.updaterId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: terminology.updaterId }) : null;
|
|
39
39
|
}
|
|
40
40
|
async creator(terminology) {
|
|
41
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: terminology.creatorId });
|
|
41
|
+
return terminology.creatorId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: terminology.creatorId }) : null;
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
exports.TerminologyQuery = TerminologyQuery;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/i18n-base",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.304",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "dist-client/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -61,9 +61,10 @@
|
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@operato/data-grist": "^10.29.69",
|
|
63
63
|
"@operato/i18n": "^10.0.0",
|
|
64
|
-
"@things-factory/
|
|
64
|
+
"@things-factory/ai-assistant": "^10.1.304",
|
|
65
|
+
"@things-factory/auth-base": "^10.1.304",
|
|
65
66
|
"@things-factory/env": "^10.1.298",
|
|
66
|
-
"@things-factory/shell": "^10.1.
|
|
67
|
+
"@things-factory/shell": "^10.1.304"
|
|
67
68
|
},
|
|
68
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "76ce38519069ba90190d69d2a9d6c130bc981cf0"
|
|
69
70
|
}
|