@dssp/supervision 1.0.0-alpha.74 → 1.0.0-alpha.77

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.
Files changed (58) hide show
  1. package/dist-client/pages/building-inspection/building-inspection-list.js +2 -2
  2. package/dist-client/pages/building-inspection/building-inspection-list.js.map +1 -1
  3. package/dist-client/pages/building-inspection/building-inspection-management.d.ts +8 -0
  4. package/dist-client/pages/building-inspection/building-inspection-management.js +297 -45
  5. package/dist-client/pages/building-inspection/building-inspection-management.js.map +1 -1
  6. package/dist-client/pages/building-inspection/component/field-document/field-document-constants.d.ts +18 -0
  7. package/dist-client/pages/building-inspection/component/field-document/field-document-constants.js +630 -0
  8. package/dist-client/pages/building-inspection/component/field-document/field-document-constants.js.map +1 -0
  9. package/dist-client/pages/building-inspection/component/field-document/field-document-detail-popup.d.ts +10 -0
  10. package/dist-client/pages/building-inspection/component/field-document/field-document-detail-popup.js +219 -0
  11. package/dist-client/pages/building-inspection/component/field-document/field-document-detail-popup.js.map +1 -0
  12. package/dist-client/pages/building-inspection/component/field-document/field-document-list-panel.d.ts +22 -0
  13. package/dist-client/pages/building-inspection/component/field-document/field-document-list-panel.js +472 -0
  14. package/dist-client/pages/building-inspection/component/field-document/field-document-list-panel.js.map +1 -0
  15. package/dist-client/pages/building-inspection/component/field-document/field-document-popup.d.ts +38 -0
  16. package/dist-client/pages/building-inspection/component/field-document/field-document-popup.js +651 -0
  17. package/dist-client/pages/building-inspection/component/field-document/field-document-popup.js.map +1 -0
  18. package/dist-client/pages/building-inspection/component/inspection-event-provider.d.ts +3 -2
  19. package/dist-client/pages/building-inspection/component/inspection-event-provider.js +129 -34
  20. package/dist-client/pages/building-inspection/component/inspection-event-provider.js.map +1 -1
  21. package/dist-client/pages/checklist-template/construction-checklist-template-list.js +9 -14
  22. package/dist-client/pages/checklist-template/construction-checklist-template-list.js.map +1 -1
  23. package/dist-client/pages/project-checklist/project-checklist-management.d.ts +2 -0
  24. package/dist-client/pages/project-checklist/project-checklist-management.js +24 -2
  25. package/dist-client/pages/project-checklist/project-checklist-management.js.map +1 -1
  26. package/dist-client/route.d.ts +1 -1
  27. package/dist-client/tsconfig.tsbuildinfo +1 -1
  28. package/dist-server/service/building-inspection/building-inspection-query.d.ts +5 -1
  29. package/dist-server/service/building-inspection/building-inspection-query.js +114 -0
  30. package/dist-server/service/building-inspection/building-inspection-query.js.map +1 -1
  31. package/dist-server/service/building-inspection/building-inspection-type.d.ts +4 -0
  32. package/dist-server/service/building-inspection/building-inspection-type.js +15 -1
  33. package/dist-server/service/building-inspection/building-inspection-type.js.map +1 -1
  34. package/dist-server/service/building-inspection/index.d.ts +1 -1
  35. package/dist-server/service/field-document/field-document-auto-file.d.ts +21 -0
  36. package/dist-server/service/field-document/field-document-auto-file.js +47 -0
  37. package/dist-server/service/field-document/field-document-auto-file.js.map +1 -0
  38. package/dist-server/service/field-document/field-document-mutation.d.ts +9 -0
  39. package/dist-server/service/field-document/field-document-mutation.js +136 -0
  40. package/dist-server/service/field-document/field-document-mutation.js.map +1 -0
  41. package/dist-server/service/field-document/field-document-query.d.ts +13 -0
  42. package/dist-server/service/field-document/field-document-query.js +107 -0
  43. package/dist-server/service/field-document/field-document-query.js.map +1 -0
  44. package/dist-server/service/field-document/field-document-summary-service.d.ts +2 -0
  45. package/dist-server/service/field-document/field-document-summary-service.js +55 -0
  46. package/dist-server/service/field-document/field-document-summary-service.js.map +1 -0
  47. package/dist-server/service/field-document/field-document-type.d.ts +22 -0
  48. package/dist-server/service/field-document/field-document-type.js +83 -0
  49. package/dist-server/service/field-document/field-document-type.js.map +1 -0
  50. package/dist-server/service/field-document/field-document.d.ts +28 -0
  51. package/dist-server/service/field-document/field-document.js +123 -0
  52. package/dist-server/service/field-document/field-document.js.map +1 -0
  53. package/dist-server/service/field-document/index.d.ts +5 -0
  54. package/dist-server/service/field-document/index.js +9 -0
  55. package/dist-server/service/field-document/index.js.map +1 -0
  56. package/dist-server/service/index.d.ts +1 -1
  57. package/dist-server/tsconfig.tsbuildinfo +1 -1
  58. package/package.json +4 -4
@@ -0,0 +1,651 @@
1
+ import { __decorate, __metadata } from "tslib";
2
+ import '@material/web/icon/icon.js';
3
+ import '@material/web/button/filled-button.js';
4
+ import '@material/web/button/outlined-button.js';
5
+ import './field-document-list-panel';
6
+ import { ScrollbarStyles } from '@operato/styles';
7
+ import { css, html, LitElement } from 'lit';
8
+ import { customElement, property, state } from 'lit/decorators.js';
9
+ import { client } from '@operato/graphql';
10
+ import { notify } from '@operato/layout';
11
+ import { openPopup } from '@operato/layout';
12
+ import gql from 'graphql-tag';
13
+ import { FIELD_DOCUMENT_CLASSIFICATIONS, findClassificationPath } from './field-document-constants';
14
+ import './field-document-detail-popup';
15
+ let FieldDocumentPopup = class FieldDocumentPopup extends LitElement {
16
+ constructor() {
17
+ super(...arguments);
18
+ this.projectId = '';
19
+ this.selectedMajor = null;
20
+ this.selectedMiddle = null;
21
+ this.selectedMinor = null;
22
+ this.documents = [];
23
+ this.selectedDocIds = new Set();
24
+ this.codeCounts = new Map();
25
+ this.dragOverItem = '';
26
+ }
27
+ render() {
28
+ var _a, _b, _c, _d;
29
+ const majors = FIELD_DOCUMENT_CLASSIFICATIONS;
30
+ const middles = ((_a = this.selectedMajor) === null || _a === void 0 ? void 0 : _a.children) || [];
31
+ const minors = ((_b = this.selectedMiddle) === null || _b === void 0 ? void 0 : _b.children) || [];
32
+ return html `
33
+ <div header>
34
+ <h2>
35
+ <md-icon>folder_open</md-icon>
36
+ 현장 문서 확인
37
+ </h2>
38
+ <span breadcrumb>
39
+ ${this.selectedMajor ? this.selectedMajor.name : ''}
40
+ ${this.selectedMiddle ? ` > ${this.selectedMiddle.name}` : ''}
41
+ ${this.selectedMinor ? ` > ${this.selectedMinor.name}` : ''}
42
+ </span>
43
+ </div>
44
+
45
+ <div content>
46
+ <div classification-panel>
47
+ <div column>
48
+ <div column-header>대분류</div>
49
+ ${majors.map(item => {
50
+ var _a;
51
+ return html `
52
+ <div
53
+ item
54
+ ?selected=${((_a = this.selectedMajor) === null || _a === void 0 ? void 0 : _a.code) === item.code}
55
+ @click=${() => this._selectMajor(item)}
56
+ @dragover=${(e) => this._onFolderDragOver(e, item.code)}
57
+ @dragleave=${() => (this.dragOverItem = '')}
58
+ @drop=${(e) => this._onFolderDrop(e, item.code)}
59
+ ?drag-over=${this.dragOverItem === item.code}
60
+ >
61
+ <span code>${item.code}</span>
62
+ <span name>${item.name}</span>
63
+ ${this._getMajorCount(item.code) > 0
64
+ ? html `<span count>${this._getMajorCount(item.code)}</span>`
65
+ : ''}
66
+ </div>
67
+ `;
68
+ })}
69
+ </div>
70
+
71
+ <div column>
72
+ <div column-header>중분류</div>
73
+ ${middles.map(item => {
74
+ var _a;
75
+ return html `
76
+ <div
77
+ item
78
+ ?selected=${((_a = this.selectedMiddle) === null || _a === void 0 ? void 0 : _a.code) === item.code}
79
+ @click=${() => this._selectMiddle(item)}
80
+ @dragover=${(e) => this._onFolderDragOver(e, item.code)}
81
+ @dragleave=${() => (this.dragOverItem = '')}
82
+ @drop=${(e) => this._onFolderDrop(e, item.code)}
83
+ ?drag-over=${this.dragOverItem === item.code}
84
+ >
85
+ <span code>${item.code}</span>
86
+ <span name>${item.name}</span>
87
+ ${this._getMiddleCount(item.code) > 0
88
+ ? html `<span count>${this._getMiddleCount(item.code)}</span>`
89
+ : ''}
90
+ </div>
91
+ `;
92
+ })}
93
+ </div>
94
+
95
+ <div column>
96
+ <div column-header>소분류</div>
97
+ ${minors.map(item => {
98
+ var _a;
99
+ return html `
100
+ <div
101
+ item
102
+ ?selected=${((_a = this.selectedMinor) === null || _a === void 0 ? void 0 : _a.code) === item.code}
103
+ @click=${() => this._selectMinor(item)}
104
+ @dragover=${(e) => this._onFolderDragOver(e, item.code)}
105
+ @dragleave=${() => (this.dragOverItem = '')}
106
+ @drop=${(e) => this._onFolderDrop(e, item.code)}
107
+ ?drag-over=${this.dragOverItem === item.code}
108
+ >
109
+ <span code>${item.code}</span>
110
+ <span name>${item.name}</span>
111
+ ${(this.codeCounts.get(item.code) || 0) > 0
112
+ ? html `<span count>${this.codeCounts.get(item.code)}</span>`
113
+ : ''}
114
+ </div>
115
+ `;
116
+ })}
117
+ </div>
118
+ </div>
119
+
120
+ <field-document-list-panel
121
+ .projectId=${this.projectId}
122
+ .code=${((_c = this.selectedMinor) === null || _c === void 0 ? void 0 : _c.code) || ''}
123
+ .folderName=${((_d = this.selectedMinor) === null || _d === void 0 ? void 0 : _d.name) || ''}
124
+ .documents=${this.documents}
125
+ @document-selected=${(e) => (this.selectedDocIds = e.detail)}
126
+ @documents-changed=${(e) => this._onDocumentsChanged(e)}
127
+ @open-detail=${(e) => this._openDetail(e.detail)}
128
+ ></field-document-list-panel>
129
+ </div>
130
+
131
+ <div footer>
132
+ <md-filled-button share @click=${this._shareDocuments}>
133
+ <md-icon slot="icon">share</md-icon>공유
134
+ </md-filled-button>
135
+ <md-filled-button move @click=${this._openMoveDialog}>
136
+ <md-icon slot="icon">drive_file_move</md-icon>이동
137
+ </md-filled-button>
138
+ <md-filled-button favorite @click=${this._toggleFavorites}>
139
+ <md-icon slot="icon">star</md-icon>즐겨찾기
140
+ </md-filled-button>
141
+ <md-filled-button upload @click=${this._triggerUpload}>
142
+ <md-icon slot="icon">upload</md-icon>업로드
143
+ </md-filled-button>
144
+ <md-filled-button delete @click=${this._deleteDocuments}>
145
+ <md-icon slot="icon">delete</md-icon>삭제
146
+ </md-filled-button>
147
+
148
+ <ox-input-file
149
+ id="file-input"
150
+ accept="*/*"
151
+ multiple="true"
152
+ hide-filelist
153
+ @change=${this._onFileSelected}
154
+ ></ox-input-file>
155
+ </div>
156
+ `;
157
+ }
158
+ async firstUpdated() {
159
+ await this._loadCounts();
160
+ // 첫 번째 대분류 자동 선택
161
+ if (FIELD_DOCUMENT_CLASSIFICATIONS.length > 0) {
162
+ this._selectMajor(FIELD_DOCUMENT_CLASSIFICATIONS[0]);
163
+ }
164
+ }
165
+ _selectMajor(item) {
166
+ var _a;
167
+ this.selectedMajor = item;
168
+ this.selectedMiddle = null;
169
+ this.selectedMinor = null;
170
+ this.documents = [];
171
+ this.selectedDocIds = new Set();
172
+ if ((_a = item.children) === null || _a === void 0 ? void 0 : _a.length) {
173
+ this._selectMiddle(item.children[0]);
174
+ }
175
+ }
176
+ _selectMiddle(item) {
177
+ var _a;
178
+ this.selectedMiddle = item;
179
+ this.selectedMinor = null;
180
+ this.documents = [];
181
+ this.selectedDocIds = new Set();
182
+ if ((_a = item.children) === null || _a === void 0 ? void 0 : _a.length) {
183
+ this._selectMinor(item.children[0]);
184
+ }
185
+ }
186
+ async _selectMinor(item) {
187
+ this.selectedMinor = item;
188
+ this.selectedDocIds = new Set();
189
+ await this._loadDocuments();
190
+ }
191
+ async _loadDocuments() {
192
+ var _a, _b, _c;
193
+ if (!((_a = this.selectedMinor) === null || _a === void 0 ? void 0 : _a.code) || !this.projectId) {
194
+ this.documents = [];
195
+ return;
196
+ }
197
+ const response = await client.query({
198
+ query: gql `
199
+ query FieldDocumentsByCode($projectId: String!, $code: String!) {
200
+ fieldDocumentsByCode(projectId: $projectId, code: $code) {
201
+ items {
202
+ id
203
+ name
204
+ code
205
+ isFavorite
206
+ aiSummary
207
+ aiSummaryStatus
208
+ sourceType
209
+ fullpath
210
+ createdAt
211
+ creator {
212
+ id
213
+ name
214
+ }
215
+ }
216
+ total
217
+ }
218
+ }
219
+ `,
220
+ variables: { projectId: this.projectId, code: this.selectedMinor.code }
221
+ });
222
+ this.documents = ((_c = (_b = response.data) === null || _b === void 0 ? void 0 : _b.fieldDocumentsByCode) === null || _c === void 0 ? void 0 : _c.items) || [];
223
+ }
224
+ async _loadCounts() {
225
+ var _a;
226
+ if (!this.projectId)
227
+ return;
228
+ const response = await client.query({
229
+ query: gql `
230
+ query FieldDocumentCountsByProject($projectId: String!) {
231
+ fieldDocumentCountsByProject(projectId: $projectId) {
232
+ code
233
+ count
234
+ }
235
+ }
236
+ `,
237
+ variables: { projectId: this.projectId }
238
+ });
239
+ const counts = ((_a = response.data) === null || _a === void 0 ? void 0 : _a.fieldDocumentCountsByProject) || [];
240
+ this.codeCounts = new Map(counts.map((c) => [c.code, c.count]));
241
+ }
242
+ _getMajorCount(majorCode) {
243
+ let total = 0;
244
+ for (const [code, count] of this.codeCounts) {
245
+ if (code.startsWith(majorCode))
246
+ total += count;
247
+ }
248
+ return total;
249
+ }
250
+ _getMiddleCount(middleCode) {
251
+ let total = 0;
252
+ for (const [code, count] of this.codeCounts) {
253
+ if (code.startsWith(middleCode))
254
+ total += count;
255
+ }
256
+ return total;
257
+ }
258
+ async _shareDocuments() {
259
+ const selected = this.documents.filter(d => this.selectedDocIds.has(d.id));
260
+ if (!selected.length) {
261
+ notify({ message: '공유할 문서를 선택해주세요.', level: 'info' });
262
+ return;
263
+ }
264
+ if (navigator.share) {
265
+ try {
266
+ await navigator.share({
267
+ title: '현장 문서',
268
+ text: selected.map(d => d.name).join(', '),
269
+ url: window.location.href
270
+ });
271
+ }
272
+ catch (_a) {
273
+ // 사용자 취소
274
+ }
275
+ }
276
+ else {
277
+ const links = selected.map(d => d.fullpath || d.name).join('\n');
278
+ await navigator.clipboard.writeText(links);
279
+ notify({ message: '링크가 복사되었습니다.' });
280
+ }
281
+ }
282
+ _openMoveDialog() {
283
+ if (!this.selectedDocIds.size) {
284
+ notify({ message: '이동할 문서를 선택해주세요.', level: 'info' });
285
+ return;
286
+ }
287
+ notify({ message: '이동할 폴더를 왼쪽 분류 패널에서 선택하거나, 문서를 드래그하여 폴더에 놓으세요.', level: 'info' });
288
+ }
289
+ async _toggleFavorites() {
290
+ if (!this.selectedDocIds.size) {
291
+ notify({ message: '즐겨찾기할 문서를 선택해주세요.', level: 'info' });
292
+ return;
293
+ }
294
+ for (const id of this.selectedDocIds) {
295
+ await client.mutate({
296
+ mutation: gql `
297
+ mutation ToggleFieldDocumentFavorite($id: String!) {
298
+ toggleFieldDocumentFavorite(id: $id) {
299
+ id
300
+ isFavorite
301
+ }
302
+ }
303
+ `,
304
+ variables: { id }
305
+ });
306
+ }
307
+ await this._loadDocuments();
308
+ notify({ message: '즐겨찾기가 변경되었습니다.' });
309
+ }
310
+ _triggerUpload() {
311
+ var _a;
312
+ if (!((_a = this.selectedMinor) === null || _a === void 0 ? void 0 : _a.code)) {
313
+ notify({ message: '파일을 업로드할 소분류 폴더를 먼저 선택해주세요.', level: 'info' });
314
+ return;
315
+ }
316
+ const fileInput = this.renderRoot.querySelector('#file-input');
317
+ fileInput === null || fileInput === void 0 ? void 0 : fileInput.click();
318
+ }
319
+ async _onFileSelected(e) {
320
+ var _a;
321
+ const files = e.detail;
322
+ if (!(files === null || files === void 0 ? void 0 : files.length) || !((_a = this.selectedMinor) === null || _a === void 0 ? void 0 : _a.code))
323
+ return;
324
+ await this._uploadFiles(files, this.selectedMinor.code);
325
+ }
326
+ async _uploadFiles(files, code) {
327
+ for (const file of files) {
328
+ await client.mutate({
329
+ mutation: gql `
330
+ mutation CreateFieldDocument($patch: NewFieldDocument!) {
331
+ createFieldDocument(patch: $patch) {
332
+ id
333
+ }
334
+ }
335
+ `,
336
+ variables: {
337
+ patch: {
338
+ projectId: this.projectId,
339
+ code,
340
+ name: file.name,
341
+ file
342
+ }
343
+ },
344
+ context: { hasUpload: true }
345
+ });
346
+ }
347
+ await this._loadDocuments();
348
+ await this._loadCounts();
349
+ notify({ message: `${files.length}개 파일이 업로드되었습니다.` });
350
+ }
351
+ async _deleteDocuments() {
352
+ if (!this.selectedDocIds.size) {
353
+ notify({ message: '삭제할 문서를 선택해주세요.', level: 'info' });
354
+ return;
355
+ }
356
+ if (!confirm('선택한 문서를 삭제하시겠습니까?'))
357
+ return;
358
+ const ids = Array.from(this.selectedDocIds);
359
+ const response = await client.mutate({
360
+ mutation: gql `
361
+ mutation DeleteFieldDocuments($ids: [String!]!) {
362
+ deleteFieldDocuments(ids: $ids)
363
+ }
364
+ `,
365
+ variables: { ids }
366
+ });
367
+ if (!response.errors) {
368
+ this.selectedDocIds = new Set();
369
+ await this._loadDocuments();
370
+ await this._loadCounts();
371
+ notify({ message: '삭제되었습니다.' });
372
+ }
373
+ }
374
+ _onFolderDragOver(e, code) {
375
+ var _a, _b, _c, _d;
376
+ const types = ((_a = e.dataTransfer) === null || _a === void 0 ? void 0 : _a.types) || [];
377
+ if (types.includes('application/x-field-document-ids')) {
378
+ e.preventDefault();
379
+ this.dragOverItem = code;
380
+ // 대분류/중분류 위에 hover 시 자동 확장
381
+ if (code.length === 2) {
382
+ const major = FIELD_DOCUMENT_CLASSIFICATIONS.find(m => m.code === code);
383
+ if (major && ((_b = this.selectedMajor) === null || _b === void 0 ? void 0 : _b.code) !== code) {
384
+ clearTimeout(this._expandTimeout);
385
+ this._expandTimeout = setTimeout(() => this._selectMajor(major), 500);
386
+ }
387
+ }
388
+ else if (code.length === 4) {
389
+ const middles = ((_c = this.selectedMajor) === null || _c === void 0 ? void 0 : _c.children) || [];
390
+ const middle = middles.find(m => m.code === code);
391
+ if (middle && ((_d = this.selectedMiddle) === null || _d === void 0 ? void 0 : _d.code) !== code) {
392
+ clearTimeout(this._expandTimeout);
393
+ this._expandTimeout = setTimeout(() => {
394
+ this.selectedMiddle = middle;
395
+ this.selectedMinor = null;
396
+ }, 500);
397
+ }
398
+ }
399
+ }
400
+ }
401
+ async _onFolderDrop(e, code) {
402
+ var _a, _b;
403
+ e.preventDefault();
404
+ this.dragOverItem = '';
405
+ clearTimeout(this._expandTimeout);
406
+ const idsJson = (_a = e.dataTransfer) === null || _a === void 0 ? void 0 : _a.getData('application/x-field-document-ids');
407
+ if (!idsJson)
408
+ return;
409
+ const ids = JSON.parse(idsJson);
410
+ // 소분류 코드에만 이동 가능
411
+ if (code.length !== 6) {
412
+ notify({ message: '소분류 폴더에만 이동할 수 있습니다.', level: 'info' });
413
+ return;
414
+ }
415
+ const response = await client.mutate({
416
+ mutation: gql `
417
+ mutation MoveFieldDocuments($ids: [String!]!, $targetCode: String!) {
418
+ moveFieldDocuments(ids: $ids, targetCode: $targetCode)
419
+ }
420
+ `,
421
+ variables: { ids, targetCode: code }
422
+ });
423
+ if (!response.errors) {
424
+ const path = findClassificationPath(code);
425
+ notify({ message: `${ids.length}개 문서가 "${((_b = path.minor) === null || _b === void 0 ? void 0 : _b.name) || code}" 폴더로 이동되었습니다.` });
426
+ await this._loadDocuments();
427
+ await this._loadCounts();
428
+ }
429
+ }
430
+ async _onDocumentsChanged(e) {
431
+ var _a, _b;
432
+ const files = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.files;
433
+ if ((files === null || files === void 0 ? void 0 : files.length) && ((_b = this.selectedMinor) === null || _b === void 0 ? void 0 : _b.code)) {
434
+ await this._uploadFiles(files, this.selectedMinor.code);
435
+ }
436
+ else {
437
+ await this._loadDocuments();
438
+ }
439
+ }
440
+ _openDetail(doc) {
441
+ openPopup(html `<field-document-detail-popup .document=${doc}></field-document-detail-popup>`, { backdrop: true, size: 'large', title: doc.name });
442
+ }
443
+ };
444
+ FieldDocumentPopup.styles = [
445
+ ScrollbarStyles,
446
+ css `
447
+ :host {
448
+ display: grid;
449
+ grid-template-rows: auto 1fr auto;
450
+ background-color: #fff;
451
+ width: 100%;
452
+ height: 80vh;
453
+ overflow: hidden;
454
+ }
455
+
456
+ div[header] {
457
+ display: flex;
458
+ align-items: center;
459
+ padding: 12px 20px;
460
+ border-bottom: 1px solid #e0e0e0;
461
+ background: linear-gradient(135deg, #f8f9fa, #e8eef5);
462
+
463
+ h2 {
464
+ display: flex;
465
+ align-items: center;
466
+ gap: 8px;
467
+ margin: 0;
468
+ font-size: 16px;
469
+ color: #3f71a0;
470
+
471
+ md-icon {
472
+ --md-icon-size: 22px;
473
+ }
474
+ }
475
+
476
+ span[breadcrumb] {
477
+ margin-left: auto;
478
+ font-size: 12px;
479
+ color: #888;
480
+ }
481
+ }
482
+
483
+ div[content] {
484
+ display: grid;
485
+ grid-template-columns: 3fr 7fr;
486
+ overflow: hidden;
487
+ }
488
+
489
+ div[classification-panel] {
490
+ display: grid;
491
+ grid-template-columns: 1fr 1fr 1fr;
492
+ border-right: 1px solid #e0e0e0;
493
+ overflow: hidden;
494
+ }
495
+
496
+ div[column] {
497
+ display: flex;
498
+ flex-direction: column;
499
+ border-right: 1px solid #eee;
500
+ overflow-y: auto;
501
+
502
+ &:last-child {
503
+ border-right: none;
504
+ }
505
+
506
+ div[column-header] {
507
+ position: sticky;
508
+ top: 0;
509
+ background: #f5f5f5;
510
+ padding: 8px 12px;
511
+ font-size: 12px;
512
+ font-weight: bold;
513
+ color: #666;
514
+ border-bottom: 1px solid #e0e0e0;
515
+ z-index: 1;
516
+ }
517
+
518
+ div[item] {
519
+ display: flex;
520
+ align-items: center;
521
+ padding: 8px 12px;
522
+ cursor: pointer;
523
+ font-size: 13px;
524
+ color: #333;
525
+ border-bottom: 1px solid #f0f0f0;
526
+ transition: background-color 0.15s;
527
+
528
+ &:hover {
529
+ background-color: #e3f2fd;
530
+ }
531
+
532
+ span[code] {
533
+ font-size: 11px;
534
+ color: #999;
535
+ margin-right: 6px;
536
+ min-width: 32px;
537
+ }
538
+
539
+ span[name] {
540
+ flex: 1;
541
+ overflow: hidden;
542
+ text-overflow: ellipsis;
543
+ white-space: nowrap;
544
+ }
545
+
546
+ span[count] {
547
+ font-size: 11px;
548
+ color: #fff;
549
+ background: #0595e5;
550
+ border-radius: 10px;
551
+ padding: 1px 6px;
552
+ min-width: 16px;
553
+ text-align: center;
554
+ margin-left: 4px;
555
+ }
556
+ }
557
+
558
+ div[item][selected] {
559
+ background-color: #0595e5;
560
+ color: #fff;
561
+
562
+ span[code] {
563
+ color: rgba(255, 255, 255, 0.7);
564
+ }
565
+
566
+ span[count] {
567
+ background: rgba(255, 255, 255, 0.3);
568
+ }
569
+ }
570
+
571
+ div[item][drag-over] {
572
+ background-color: #bbdefb;
573
+ outline: 2px dashed #1976d2;
574
+ }
575
+ }
576
+
577
+ div[footer] {
578
+ display: flex;
579
+ align-items: center;
580
+ justify-content: center;
581
+ gap: 8px;
582
+ padding: 12px 20px;
583
+ border-top: 1px solid #e0e0e0;
584
+ background: #f8f8f8;
585
+
586
+ md-filled-button {
587
+ --md-filled-button-container-height: 36px;
588
+ --md-filled-button-trailing-space: 16px;
589
+ --md-filled-button-leading-space: 16px;
590
+ }
591
+
592
+ md-filled-button[share] {
593
+ --md-filled-button-container-color: #607d8b;
594
+ }
595
+ md-filled-button[move] {
596
+ --md-filled-button-container-color: #ff9800;
597
+ }
598
+ md-filled-button[favorite] {
599
+ --md-filled-button-container-color: #ffc107;
600
+ --md-filled-button-label-text-color: #333;
601
+ }
602
+ md-filled-button[upload] {
603
+ --md-filled-button-container-color: #4caf50;
604
+ }
605
+ md-filled-button[delete] {
606
+ --md-filled-button-container-color: #f44336;
607
+ }
608
+ }
609
+
610
+ ox-input-file {
611
+ display: none;
612
+ }
613
+ `
614
+ ];
615
+ __decorate([
616
+ property({ type: String }),
617
+ __metadata("design:type", String)
618
+ ], FieldDocumentPopup.prototype, "projectId", void 0);
619
+ __decorate([
620
+ state(),
621
+ __metadata("design:type", Object)
622
+ ], FieldDocumentPopup.prototype, "selectedMajor", void 0);
623
+ __decorate([
624
+ state(),
625
+ __metadata("design:type", Object)
626
+ ], FieldDocumentPopup.prototype, "selectedMiddle", void 0);
627
+ __decorate([
628
+ state(),
629
+ __metadata("design:type", Object)
630
+ ], FieldDocumentPopup.prototype, "selectedMinor", void 0);
631
+ __decorate([
632
+ state(),
633
+ __metadata("design:type", Array)
634
+ ], FieldDocumentPopup.prototype, "documents", void 0);
635
+ __decorate([
636
+ state(),
637
+ __metadata("design:type", Set)
638
+ ], FieldDocumentPopup.prototype, "selectedDocIds", void 0);
639
+ __decorate([
640
+ state(),
641
+ __metadata("design:type", Map)
642
+ ], FieldDocumentPopup.prototype, "codeCounts", void 0);
643
+ __decorate([
644
+ state(),
645
+ __metadata("design:type", String)
646
+ ], FieldDocumentPopup.prototype, "dragOverItem", void 0);
647
+ FieldDocumentPopup = __decorate([
648
+ customElement('field-document-popup')
649
+ ], FieldDocumentPopup);
650
+ export { FieldDocumentPopup };
651
+ //# sourceMappingURL=field-document-popup.js.map