@things-factory/worklist-client 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.
@@ -1,4 +1,5 @@
1
1
  import '@operato/data-grist';
2
+ import '@things-factory/ai-assistant/dist-client/index.js';
2
3
  import { PageView } from '@operato/shell';
3
4
  import { FetchOption } from '@operato/data-grist';
4
5
  import { WorkCenterImporter } from './work-center-importer';
@@ -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, CommonGristStyles, CommonHeaderStyles, ScrollbarStyles, WorkSurfacePageStyles } from '@operato/styles';
4
5
  import { PageView } from '@operato/shell';
5
6
  import { css, html } from 'lit';
@@ -53,10 +54,6 @@ let WorkCenterListPage = class WorkCenterListPage extends localize(i18next)(Scop
53
54
  { title: i18next.t('button.save'),
54
55
  action: this._updateWorkCenter.bind(this),
55
56
  ...CommonButtonStyles.save
56
- },
57
- { title: i18next.t('button.delete'),
58
- action: this._deleteWorkCenter.bind(this),
59
- ...CommonButtonStyles.delete
60
57
  }
61
58
  ],
62
59
  exportable: { name: i18next.t('title.work-center list'),
@@ -69,6 +66,14 @@ let WorkCenterListPage = class WorkCenterListPage extends localize(i18next)(Scop
69
66
  const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID');
70
67
  return html `
71
68
  <ox-grist class="page-fill" .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
69
+ <!-- What is done to the picked rows: over the column heads while rows are picked (ADR-0225). -->
70
+ <ox-assistant-selection-bar
71
+ slot="selection"
72
+ .gridOf=${() => this.grist}
73
+ name=${i18next.t('title.work-center list')}
74
+ .assistant=${false}
75
+ .actions=${[{ id: 'delete', title: i18next.t('button.delete'), icon: 'delete_outline', emphasis: { danger: true }, action: () => this._deleteWorkCenter() }]}
76
+ ></ox-assistant-selection-bar>
72
77
  <div slot="headroom" class="header">
73
78
  <div class="filters">
74
79
  <ox-filters-form without-search autofocus></ox-filters-form>
@@ -220,8 +225,9 @@ let WorkCenterListPage = class WorkCenterListPage extends localize(i18next)(Scop
220
225
  }
221
226
  }
222
227
  }
228
+ /* The list's own export is the rows it shows; the picked rows go out by the selection bar's 「선택 내보내기」 (ADR-0225). */
223
229
  async exportHandler() {
224
- const exportTargets = this.grist.selected.length ? this.grist.selected : this.grist.dirtyData.records;
230
+ const exportTargets = this.grist.dirtyData.records;
225
231
  const targetFieldSet = new Set(['id', 'name', 'description', 'active']);
226
232
  return exportTargets.map(workCenter => {
227
233
  let tempObj = {};
@@ -37,13 +37,13 @@ let WorkCenterQuery = class WorkCenterQuery {
37
37
  return attachment?.fullpath;
38
38
  }
39
39
  async domain(workCenter) {
40
- return await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: workCenter.domainId });
40
+ return workCenter.domainId ? await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: workCenter.domainId }) : null;
41
41
  }
42
42
  async updater(workCenter) {
43
- return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: workCenter.updaterId });
43
+ return workCenter.updaterId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: workCenter.updaterId }) : null;
44
44
  }
45
45
  async creator(workCenter) {
46
- return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: workCenter.creatorId });
46
+ return workCenter.creatorId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: workCenter.creatorId }) : null;
47
47
  }
48
48
  };
49
49
  exports.WorkCenterQuery = WorkCenterQuery;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/worklist-client",
3
- "version": "10.1.303",
3
+ "version": "10.1.314",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "files": [
@@ -47,10 +47,11 @@
47
47
  "@operato/graphql": "^10.0.0",
48
48
  "@operato/popup": "^10.0.0",
49
49
  "@operato/shell": "^10.0.0",
50
- "@things-factory/attachment-base": "^10.1.303",
51
- "@things-factory/auth-base": "^10.1.303",
52
- "@things-factory/oauth2-client": "^10.1.303",
53
- "@things-factory/shell": "^10.1.303"
50
+ "@things-factory/ai-assistant": "^10.1.314",
51
+ "@things-factory/attachment-base": "^10.1.314",
52
+ "@things-factory/auth-base": "^10.1.314",
53
+ "@things-factory/oauth2-client": "^10.1.314",
54
+ "@things-factory/shell": "^10.1.304"
54
55
  },
55
- "gitHead": "2d5888ebfc0a004b000a4aa3dfb8ff9561e75ff9"
56
+ "gitHead": "8d74df0a0618131ff17309638a6aa0affbd4c77d"
56
57
  }