@dssp/supervision 1.0.0-alpha.76 → 1.0.0-alpha.78

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