@dssp/supervision 1.0.0-alpha.7 → 1.0.0-alpha.74
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/graphql/building-inspection.d.ts +1 -0
- package/dist-client/graphql/building-inspection.js +101 -0
- package/dist-client/graphql/building-inspection.js.map +1 -0
- package/dist-client/pages/action-plan/action-plan-list-page.d.ts +1 -2
- package/dist-client/pages/action-plan/action-plan-list-page.js +1 -2
- package/dist-client/pages/action-plan/action-plan-list-page.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-defect.d.ts +22 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-defect.js +171 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-defect.js.map +1 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.d.ts +59 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.js +868 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.js.map +1 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-camera.d.ts +8 -6
- package/dist-client/pages/building-inspection/building-inspection-detail-camera.js +116 -65
- package/dist-client/pages/building-inspection/building-inspection-detail-camera.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.d.ts +11 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +147 -72
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.d.ts +1 -0
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js +78 -14
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-list.d.ts +26 -2
- package/dist-client/pages/building-inspection/building-inspection-list.js +375 -34
- package/dist-client/pages/building-inspection/building-inspection-list.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-management.d.ts +72 -0
- package/dist-client/pages/building-inspection/building-inspection-management.js +1256 -0
- package/dist-client/pages/building-inspection/building-inspection-management.js.map +1 -0
- package/dist-client/pages/building-inspection/component/building-inspection-detail-header.d.ts +3 -0
- package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js +112 -20
- package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js.map +1 -1
- package/dist-client/pages/building-inspection/component/daily-worklog-popup.d.ts +27 -0
- package/dist-client/pages/building-inspection/component/daily-worklog-popup.js +542 -0
- package/dist-client/pages/building-inspection/component/daily-worklog-popup.js.map +1 -0
- package/dist-client/pages/building-inspection/component/image-preview-popup.d.ts +15 -0
- package/dist-client/pages/building-inspection/component/image-preview-popup.js +348 -0
- package/dist-client/pages/building-inspection/component/image-preview-popup.js.map +1 -0
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.d.ts +25 -0
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js +491 -0
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js.map +1 -0
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.d.ts +31 -0
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js +485 -0
- package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js.map +1 -0
- package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.d.ts +27 -0
- package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.js +416 -0
- package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.js.map +1 -0
- package/dist-client/pages/building-inspection/component/inspection-event-provider.d.ts +2 -1
- package/dist-client/pages/building-inspection/component/inspection-event-provider.js +42 -18
- package/dist-client/pages/building-inspection/component/inspection-event-provider.js.map +1 -1
- package/dist-client/pages/building-inspection/inspection-create-popup.js +17 -5
- package/dist-client/pages/building-inspection/inspection-create-popup.js.map +1 -1
- package/dist-client/pages/building-inspection/inspection-with-checklist-create-popup.d.ts +3 -0
- package/dist-client/pages/building-inspection/inspection-with-checklist-create-popup.js +791 -0
- package/dist-client/pages/building-inspection/inspection-with-checklist-create-popup.js.map +1 -0
- package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.d.ts +16 -2
- package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js +249 -45
- package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js.map +1 -1
- package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js +9 -3
- package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js.map +1 -1
- package/dist-client/pages/building-inspection-grid/component/grid-inspection-list-layer.d.ts +19 -0
- package/dist-client/pages/building-inspection-grid/component/grid-inspection-list-layer.js +205 -0
- package/dist-client/pages/building-inspection-grid/component/grid-inspection-list-layer.js.map +1 -0
- package/dist-client/pages/checklist/attachment-list-popup.d.ts +1 -0
- package/dist-client/pages/checklist/attachment-list-popup.js +251 -69
- package/dist-client/pages/checklist/attachment-list-popup.js.map +1 -1
- package/dist-client/pages/checklist/checklist-view.d.ts +5 -0
- package/dist-client/pages/checklist/checklist-view.js +191 -30
- package/dist-client/pages/checklist/checklist-view.js.map +1 -1
- package/dist-client/pages/checklist/comment-list-popup.js +15 -5
- package/dist-client/pages/checklist/comment-list-popup.js.map +1 -1
- package/dist-client/pages/checklist/file-preview-popup.js +0 -1
- package/dist-client/pages/checklist/file-preview-popup.js.map +1 -1
- package/dist-client/pages/checklist/inspection-info-popup.d.ts +49 -0
- package/dist-client/pages/checklist/inspection-info-popup.js +683 -0
- package/dist-client/pages/checklist/inspection-info-popup.js.map +1 -0
- package/dist-client/pages/checklist/inspection-tab-popup.d.ts +18 -0
- package/dist-client/pages/checklist/inspection-tab-popup.js +196 -0
- package/dist-client/pages/checklist/inspection-tab-popup.js.map +1 -0
- package/dist-client/pages/checklist-database/checklist-database.d.ts +35 -0
- package/dist-client/pages/checklist-database/checklist-database.js +539 -0
- package/dist-client/pages/checklist-database/checklist-database.js.map +1 -0
- package/dist-client/pages/checklist-template/checklist-template-item.js +39 -3
- package/dist-client/pages/checklist-template/checklist-template-item.js.map +1 -1
- package/dist-client/pages/checklist-template/checklist-template-list.js +1 -1
- package/dist-client/pages/checklist-template/checklist-template-list.js.map +1 -1
- package/dist-client/pages/checklist-template/construction-checklist-template-item-popup.d.ts +2 -0
- package/dist-client/pages/checklist-template/construction-checklist-template-item-popup.js +242 -0
- package/dist-client/pages/checklist-template/construction-checklist-template-item-popup.js.map +1 -0
- package/dist-client/pages/checklist-template/construction-checklist-template-list.d.ts +55 -0
- package/dist-client/pages/checklist-template/construction-checklist-template-list.js +409 -0
- package/dist-client/pages/checklist-template/construction-checklist-template-list.js.map +1 -0
- package/dist-client/pages/issue/issue-list-page.d.ts +1 -2
- package/dist-client/pages/issue/issue-list-page.js +1 -2
- package/dist-client/pages/issue/issue-list-page.js.map +1 -1
- package/dist-client/pages/project-checklist/project-checklist-management.d.ts +50 -0
- package/dist-client/pages/project-checklist/project-checklist-management.js +910 -0
- package/dist-client/pages/project-checklist/project-checklist-management.js.map +1 -0
- package/dist-client/pages/project-report/project-report-list-page.d.ts +1 -2
- package/dist-client/pages/project-report/project-report-list-page.js +1 -2
- package/dist-client/pages/project-report/project-report-list-page.js.map +1 -1
- package/dist-client/pages/supervisor/supervisor-list-page.d.ts +1 -2
- package/dist-client/pages/supervisor/supervisor-list-page.js +1 -2
- package/dist-client/pages/supervisor/supervisor-list-page.js.map +1 -1
- package/dist-client/route.d.ts +1 -1
- package/dist-client/route.js +18 -0
- package/dist-client/route.js.map +1 -1
- package/dist-client/stt/speech-to-text.d.ts +13 -8
- package/dist-client/stt/speech-to-text.js +282 -40
- package/dist-client/stt/speech-to-text.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/service/action-plan/action-plan-mutation.js +5 -6
- package/dist-server/service/action-plan/action-plan-mutation.js.map +1 -1
- package/dist-server/service/action-plan/action-plan-query.d.ts +2 -2
- package/dist-server/service/action-plan/action-plan-query.js +5 -11
- package/dist-server/service/action-plan/action-plan-query.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-mutation.d.ts +2 -3
- package/dist-server/service/building-inspection/building-inspection-mutation.js +77 -39
- package/dist-server/service/building-inspection/building-inspection-mutation.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-query.d.ts +5 -7
- package/dist-server/service/building-inspection/building-inspection-query.js +54 -52
- package/dist-server/service/building-inspection/building-inspection-query.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-type.d.ts +26 -7
- package/dist-server/service/building-inspection/building-inspection-type.js +92 -13
- package/dist-server/service/building-inspection/building-inspection-type.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection.d.ts +5 -0
- package/dist-server/service/building-inspection/building-inspection.js +37 -4
- package/dist-server/service/building-inspection/building-inspection.js.map +1 -1
- package/dist-server/service/building-inspection/index.d.ts +3 -4
- package/dist-server/service/building-inspection/index.js +10 -3
- package/dist-server/service/building-inspection/index.js.map +1 -1
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.d.ts +6 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js +56 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js.map +1 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.d.ts +16 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.js +171 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.js.map +1 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.d.ts +23 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.js +90 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.js.map +1 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.d.ts +33 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.js +132 -0
- package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.js.map +1 -0
- package/dist-server/service/building-inspection-daily-worklog/index.d.ts +5 -0
- package/dist-server/service/building-inspection-daily-worklog/index.js +9 -0
- package/dist-server/service/building-inspection-daily-worklog/index.js.map +1 -0
- package/dist-server/service/building-inspection-history/building-inspection-history-query.d.ts +16 -0
- package/dist-server/service/building-inspection-history/building-inspection-history-query.js +120 -0
- package/dist-server/service/building-inspection-history/building-inspection-history-query.js.map +1 -0
- package/dist-server/service/building-inspection-history/building-inspection-history-type.d.ts +5 -0
- package/dist-server/service/building-inspection-history/building-inspection-history-type.js +21 -0
- package/dist-server/service/building-inspection-history/building-inspection-history-type.js.map +1 -0
- package/dist-server/service/building-inspection-history/building-inspection-history.d.ts +35 -0
- package/dist-server/service/building-inspection-history/building-inspection-history.js +162 -0
- package/dist-server/service/building-inspection-history/building-inspection-history.js.map +1 -0
- package/dist-server/service/building-inspection-history/event-subscriber.d.ts +7 -0
- package/dist-server/service/building-inspection-history/event-subscriber.js +21 -0
- package/dist-server/service/building-inspection-history/event-subscriber.js.map +1 -0
- package/dist-server/service/building-inspection-history/index.d.ts +6 -0
- package/dist-server/service/building-inspection-history/index.js +10 -0
- package/dist-server/service/building-inspection-history/index.js.map +1 -0
- package/dist-server/service/checklist/checklist-mutation.d.ts +0 -5
- package/dist-server/service/checklist/checklist-mutation.js +1 -67
- package/dist-server/service/checklist/checklist-mutation.js.map +1 -1
- package/dist-server/service/checklist/checklist-query.d.ts +7 -0
- package/dist-server/service/checklist/checklist-query.js +83 -0
- package/dist-server/service/checklist/checklist-query.js.map +1 -1
- package/dist-server/service/checklist/checklist-type.d.ts +0 -13
- package/dist-server/service/checklist/checklist-type.js +1 -49
- package/dist-server/service/checklist/checklist-type.js.map +1 -1
- package/dist-server/service/checklist/checklist.d.ts +28 -3
- package/dist-server/service/checklist/checklist.js +89 -15
- package/dist-server/service/checklist/checklist.js.map +1 -1
- package/dist-server/service/checklist/event-subscriber.d.ts +7 -0
- package/dist-server/service/checklist/event-subscriber.js +21 -0
- package/dist-server/service/checklist/event-subscriber.js.map +1 -0
- package/dist-server/service/checklist/index.d.ts +1 -2
- package/dist-server/service/checklist/index.js +1 -2
- package/dist-server/service/checklist/index.js.map +1 -1
- package/dist-server/service/checklist-history/checklist-history-query.d.ts +11 -0
- package/dist-server/service/checklist-history/checklist-history-query.js +77 -0
- package/dist-server/service/checklist-history/checklist-history-query.js.map +1 -0
- package/dist-server/service/checklist-history/checklist-history-type.d.ts +5 -0
- package/dist-server/service/checklist-history/checklist-history-type.js +21 -0
- package/dist-server/service/checklist-history/checklist-history-type.js.map +1 -0
- package/dist-server/service/{checklist → checklist-history}/checklist-history.d.ts +19 -1
- package/dist-server/service/{checklist → checklist-history}/checklist-history.js +97 -14
- package/dist-server/service/checklist-history/checklist-history.js.map +1 -0
- package/dist-server/service/checklist-history/event-subscriber.d.ts +7 -0
- package/dist-server/service/checklist-history/event-subscriber.js +21 -0
- package/dist-server/service/checklist-history/event-subscriber.js.map +1 -0
- package/dist-server/service/checklist-history/index.d.ts +6 -0
- package/dist-server/service/checklist-history/index.js +10 -0
- package/dist-server/service/checklist-history/index.js.map +1 -0
- package/dist-server/service/checklist-item/checklist-item-query.d.ts +1 -1
- package/dist-server/service/checklist-item/checklist-item-query.js +5 -3
- package/dist-server/service/checklist-item/checklist-item-query.js.map +1 -1
- package/dist-server/service/checklist-item/index.d.ts +0 -1
- package/dist-server/service/checklist-item/index.js +1 -2
- package/dist-server/service/checklist-item/index.js.map +1 -1
- package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.d.ts +1 -0
- package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.js +33 -6
- package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.js.map +1 -1
- package/dist-server/service/checklist-item-history/checklist-item-history-query.d.ts +16 -0
- package/dist-server/service/checklist-item-history/checklist-item-history-query.js +123 -0
- package/dist-server/service/checklist-item-history/checklist-item-history-query.js.map +1 -0
- package/dist-server/service/checklist-item-history/checklist-item-history-type.d.ts +5 -0
- package/dist-server/service/checklist-item-history/checklist-item-history-type.js +21 -0
- package/dist-server/service/checklist-item-history/checklist-item-history-type.js.map +1 -0
- package/dist-server/service/checklist-item-history/checklist-item-history.d.ts +25 -0
- package/dist-server/service/checklist-item-history/checklist-item-history.js +123 -0
- package/dist-server/service/checklist-item-history/checklist-item-history.js.map +1 -0
- package/dist-server/service/checklist-item-history/event-subscriber.d.ts +7 -0
- package/dist-server/service/checklist-item-history/event-subscriber.js +21 -0
- package/dist-server/service/checklist-item-history/event-subscriber.js.map +1 -0
- package/dist-server/service/checklist-item-history/index.d.ts +6 -0
- package/dist-server/service/checklist-item-history/index.js +10 -0
- package/dist-server/service/checklist-item-history/index.js.map +1 -0
- package/dist-server/service/checklist-template/checklist-template-query.d.ts +1 -1
- package/dist-server/service/checklist-template/checklist-template-query.js +2 -5
- package/dist-server/service/checklist-template/checklist-template-query.js.map +1 -1
- package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js +13 -1
- package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js.map +1 -1
- package/dist-server/service/checklist-template-item/checklist-template-item-type.d.ts +3 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-type.js +9 -0
- package/dist-server/service/checklist-template-item/checklist-template-item-type.js.map +1 -1
- package/dist-server/service/checklist-template-item/checklist-template-item.d.ts +7 -0
- package/dist-server/service/checklist-template-item/checklist-template-item.js +22 -2
- package/dist-server/service/checklist-template-item/checklist-template-item.js.map +1 -1
- package/dist-server/service/checklist-template-item/spec-matching-service.d.ts +2 -0
- package/dist-server/service/checklist-template-item/spec-matching-service.js +51 -0
- package/dist-server/service/checklist-template-item/spec-matching-service.js.map +1 -0
- package/dist-server/service/checklist-type/checklist-type-query.d.ts +1 -1
- package/dist-server/service/checklist-type/checklist-type-query.js +2 -5
- package/dist-server/service/checklist-type/checklist-type-query.js.map +1 -1
- package/dist-server/service/construction-checklist-template/construction-checklist-template-mutation.d.ts +7 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-mutation.js +107 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-mutation.js.map +1 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-query.d.ts +10 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-query.js +62 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-query.js.map +1 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-type.d.ts +11 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-type.js +43 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template-type.js.map +1 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template.d.ts +18 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template.js +80 -0
- package/dist-server/service/construction-checklist-template/construction-checklist-template.js.map +1 -0
- package/dist-server/service/construction-checklist-template/index.d.ts +5 -0
- package/dist-server/service/construction-checklist-template/index.js +9 -0
- package/dist-server/service/construction-checklist-template/index.js.map +1 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-mutation.d.ts +6 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-mutation.js +60 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-mutation.js.map +1 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-query.d.ts +9 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-query.js +53 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-query.js.map +1 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-type.d.ts +17 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-type.js +67 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-type.js.map +1 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item.d.ts +24 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item.js +113 -0
- package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item.js.map +1 -0
- package/dist-server/service/construction-checklist-template-item/index.d.ts +5 -0
- package/dist-server/service/construction-checklist-template-item/index.js +9 -0
- package/dist-server/service/construction-checklist-template-item/index.js.map +1 -0
- package/dist-server/service/construction-checklist-template-item/spec-matching-service.d.ts +2 -0
- package/dist-server/service/construction-checklist-template-item/spec-matching-service.js +50 -0
- package/dist-server/service/construction-checklist-template-item/spec-matching-service.js.map +1 -0
- package/dist-server/service/index.d.ts +8 -1
- package/dist-server/service/index.js +38 -3
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/issue/issue-mutation.js +5 -6
- package/dist-server/service/issue/issue-mutation.js.map +1 -1
- package/dist-server/service/issue/issue-query.d.ts +2 -2
- package/dist-server/service/issue/issue-query.js +5 -11
- package/dist-server/service/issue/issue-query.js.map +1 -1
- package/dist-server/service/project-checklist/index.d.ts +5 -0
- package/dist-server/service/project-checklist/index.js +9 -0
- package/dist-server/service/project-checklist/index.js.map +1 -0
- package/dist-server/service/project-checklist/project-checklist-mutation.d.ts +7 -0
- package/dist-server/service/project-checklist/project-checklist-mutation.js +109 -0
- package/dist-server/service/project-checklist/project-checklist-mutation.js.map +1 -0
- package/dist-server/service/project-checklist/project-checklist-query.d.ts +12 -0
- package/dist-server/service/project-checklist/project-checklist-query.js +76 -0
- package/dist-server/service/project-checklist/project-checklist-query.js.map +1 -0
- package/dist-server/service/project-checklist/project-checklist-type.d.ts +18 -0
- package/dist-server/service/project-checklist/project-checklist-type.js +69 -0
- package/dist-server/service/project-checklist/project-checklist-type.js.map +1 -0
- package/dist-server/service/project-checklist/project-checklist.d.ts +20 -0
- package/dist-server/service/project-checklist/project-checklist.js +90 -0
- package/dist-server/service/project-checklist/project-checklist.js.map +1 -0
- package/dist-server/service/project-checklist-item/index.d.ts +4 -0
- package/dist-server/service/project-checklist-item/index.js +9 -0
- package/dist-server/service/project-checklist-item/index.js.map +1 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-mutation.d.ts +2 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-mutation.js +13 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-mutation.js.map +1 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-query.d.ts +5 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-query.js +34 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-query.js.map +1 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-type.d.ts +5 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-type.js +21 -0
- package/dist-server/service/project-checklist-item/project-checklist-item-type.js.map +1 -0
- package/dist-server/service/project-checklist-item/project-checklist-item.d.ts +17 -0
- package/dist-server/service/project-checklist-item/project-checklist-item.js +82 -0
- package/dist-server/service/project-checklist-item/project-checklist-item.js.map +1 -0
- package/dist-server/service/project-report/project-report-mutation.js +5 -6
- package/dist-server/service/project-report/project-report-mutation.js.map +1 -1
- package/dist-server/service/project-report/project-report-query.d.ts +2 -2
- package/dist-server/service/project-report/project-report-query.js +5 -11
- package/dist-server/service/project-report/project-report-query.js.map +1 -1
- package/dist-server/service/project-report/project-report.d.ts +0 -2
- package/dist-server/service/project-report/project-report.js +0 -6
- package/dist-server/service/project-report/project-report.js.map +1 -1
- package/dist-server/service/supervisor/supervisor-mutation.js +5 -6
- package/dist-server/service/supervisor/supervisor-mutation.js.map +1 -1
- package/dist-server/service/supervisor/supervisor-query.d.ts +2 -2
- package/dist-server/service/supervisor/supervisor-query.js +5 -11
- package/dist-server/service/supervisor/supervisor-query.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -13
- package/things-factory.config.js +9 -1
- package/dist-server/service/building-inspection/building-inspection-history.d.ts +0 -17
- package/dist-server/service/building-inspection/building-inspection-history.js +0 -86
- package/dist-server/service/building-inspection/building-inspection-history.js.map +0 -1
- package/dist-server/service/checklist/checklist-history.js.map +0 -1
|
@@ -0,0 +1,868 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import '@material/web/icon/icon.js';
|
|
3
|
+
import '@operato/input/ox-input-switch.js';
|
|
4
|
+
import '@operato/mini-map/ox-zoomable-image.js';
|
|
5
|
+
import '@material/web/progress/circular-progress.js';
|
|
6
|
+
import gql from 'graphql-tag';
|
|
7
|
+
import { css, html } from 'lit';
|
|
8
|
+
import { customElement, state, query } from 'lit/decorators.js';
|
|
9
|
+
import html2canvas from 'html2canvas';
|
|
10
|
+
import { PageView } from '@operato/shell';
|
|
11
|
+
import { CommonGristStyles, ScrollbarStyles } from '@operato/styles';
|
|
12
|
+
import { client } from '@operato/graphql';
|
|
13
|
+
import { notify } from '@operato/layout';
|
|
14
|
+
import './component/building-inspection-detail-header';
|
|
15
|
+
let BuildingInspectionAiMeasurement = class BuildingInspectionAiMeasurement extends PageView {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this.KEYPOINT_RULER_API_BASE_URL = 'https://hatiolab-korea-uni.ettisoft.com';
|
|
19
|
+
this.project = {};
|
|
20
|
+
this.buildingInspection = {};
|
|
21
|
+
this.buildingInspectionId = '';
|
|
22
|
+
this.capturedVideoUrl = null;
|
|
23
|
+
this.videoFile = null;
|
|
24
|
+
this.frame = null;
|
|
25
|
+
this.analyzing = false;
|
|
26
|
+
this.selectedPoints = {
|
|
27
|
+
x1: null,
|
|
28
|
+
y1: null,
|
|
29
|
+
x2: null,
|
|
30
|
+
y2: null
|
|
31
|
+
};
|
|
32
|
+
this.frameNaturalWidth = 0;
|
|
33
|
+
this.frameNaturalHeight = 0;
|
|
34
|
+
this.displayedImageRect = null;
|
|
35
|
+
this.distance = null;
|
|
36
|
+
this.unit = null;
|
|
37
|
+
this.analyzingError = null;
|
|
38
|
+
this._onImageLoad = () => {
|
|
39
|
+
if (!this.frameImageEl || !this.imageWrapperEl)
|
|
40
|
+
return;
|
|
41
|
+
const img = this.frameImageEl;
|
|
42
|
+
const wrapperRect = this.imageWrapperEl.getBoundingClientRect();
|
|
43
|
+
const imgRect = img.getBoundingClientRect();
|
|
44
|
+
this.frameNaturalWidth = img.naturalWidth;
|
|
45
|
+
this.frameNaturalHeight = img.naturalHeight;
|
|
46
|
+
this.displayedImageRect = {
|
|
47
|
+
width: imgRect.width,
|
|
48
|
+
height: imgRect.height,
|
|
49
|
+
left: imgRect.left - wrapperRect.left,
|
|
50
|
+
top: imgRect.top - wrapperRect.top
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
this._onImageClick = (event) => {
|
|
54
|
+
if (!this.frameImageEl || !this.imageWrapperEl)
|
|
55
|
+
return;
|
|
56
|
+
const imgRect = this.frameImageEl.getBoundingClientRect();
|
|
57
|
+
const wrapperRect = this.imageWrapperEl.getBoundingClientRect();
|
|
58
|
+
const clientX = event.clientX;
|
|
59
|
+
const clientY = event.clientY;
|
|
60
|
+
// Ignore clicks outside the displayed image area
|
|
61
|
+
if (clientX < imgRect.left || clientX > imgRect.right || clientY < imgRect.top || clientY > imgRect.bottom) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
// 새로운 마크 입력 시 이전 거리/단위 결과 초기화
|
|
65
|
+
this.distance = null;
|
|
66
|
+
this.unit = null;
|
|
67
|
+
this.analyzingError = null;
|
|
68
|
+
const relativeX = clientX - imgRect.left;
|
|
69
|
+
const relativeY = clientY - imgRect.top;
|
|
70
|
+
const xOnNatural = Math.round((relativeX * this.frameNaturalWidth) / imgRect.width);
|
|
71
|
+
const yOnNatural = Math.round((relativeY * this.frameNaturalHeight) / imgRect.height);
|
|
72
|
+
if (this.selectedPoints.x1 === null || this.selectedPoints.y1 === null) {
|
|
73
|
+
this.selectedPoints = Object.assign(Object.assign({}, this.selectedPoints), { x1: xOnNatural, y1: yOnNatural });
|
|
74
|
+
}
|
|
75
|
+
else if (this.selectedPoints.x2 === null || this.selectedPoints.y2 === null) {
|
|
76
|
+
this.selectedPoints = Object.assign(Object.assign({}, this.selectedPoints), { x2: xOnNatural, y2: yOnNatural });
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
// 세 번째 클릭부터는 초기화 후 첫 점으로 설정
|
|
80
|
+
this.selectedPoints = { x1: xOnNatural, y1: yOnNatural, x2: null, y2: null };
|
|
81
|
+
}
|
|
82
|
+
// Update displayed rect cache (in case layout changed)
|
|
83
|
+
this.displayedImageRect = {
|
|
84
|
+
width: imgRect.width,
|
|
85
|
+
height: imgRect.height,
|
|
86
|
+
left: imgRect.left - wrapperRect.left,
|
|
87
|
+
top: imgRect.top - wrapperRect.top
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
get context() {
|
|
92
|
+
return {
|
|
93
|
+
title: '검측 관리 상세 - AI 거리 측정'
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
render() {
|
|
97
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
98
|
+
return html `
|
|
99
|
+
<building-inspection-detail-header
|
|
100
|
+
.buildingInspectionId=${(_a = this.buildingInspection) === null || _a === void 0 ? void 0 : _a.id}
|
|
101
|
+
.buildingLevelId=${(_c = (_b = this.buildingInspection) === null || _b === void 0 ? void 0 : _b.buildingLevel) === null || _c === void 0 ? void 0 : _c.id}
|
|
102
|
+
.projectName=${this.project.name}
|
|
103
|
+
.buildingName=${(_f = (_e = (_d = this.buildingInspection) === null || _d === void 0 ? void 0 : _d.buildingLevel) === null || _e === void 0 ? void 0 : _e.building) === null || _f === void 0 ? void 0 : _f.name}
|
|
104
|
+
.buildingLevelFloor=${(_h = (_g = this.buildingInspection) === null || _g === void 0 ? void 0 : _g.buildingLevel) === null || _h === void 0 ? void 0 : _h.floor}
|
|
105
|
+
.projectId=${this.project.id}
|
|
106
|
+
></building-inspection-detail-header>
|
|
107
|
+
|
|
108
|
+
<div body>
|
|
109
|
+
<!-- Preview selected or recorded video -->
|
|
110
|
+
<div preview>
|
|
111
|
+
${((_j = this.frame) === null || _j === void 0 ? void 0 : _j.download_url)
|
|
112
|
+
? html `
|
|
113
|
+
<div class="image-wrapper" @click=${this._onImageClick}>
|
|
114
|
+
<img
|
|
115
|
+
id="frameImage"
|
|
116
|
+
src="${this.KEYPOINT_RULER_API_BASE_URL + ((_k = this.frame) === null || _k === void 0 ? void 0 : _k.download_url)}"
|
|
117
|
+
crossorigin="anonymous"
|
|
118
|
+
alt="frame"
|
|
119
|
+
loading="eager"
|
|
120
|
+
@load=${this._onImageLoad}
|
|
121
|
+
/>
|
|
122
|
+
${this._renderMarkers()}
|
|
123
|
+
</div>
|
|
124
|
+
`
|
|
125
|
+
: // 동영상 선택 후 동영상 프리뷰
|
|
126
|
+
this.capturedVideoUrl
|
|
127
|
+
? html `<video src=${this.capturedVideoUrl} controls playsinline></video>`
|
|
128
|
+
: // 초기 상태, 동영상 선택 전
|
|
129
|
+
html `<md-icon>videocam</md-icon>`}
|
|
130
|
+
</div>
|
|
131
|
+
|
|
132
|
+
<div controls>
|
|
133
|
+
<span class="controls-title">동영상 촬영</span>
|
|
134
|
+
|
|
135
|
+
<!-- 가운데 버튼 -->
|
|
136
|
+
${((_l = this.frame) === null || _l === void 0 ? void 0 : _l.download_url) && this._hasTwoPoints() && this.distance && this.unit
|
|
137
|
+
? // 거리 측정 완료 시, 사진 저장 버튼 표시
|
|
138
|
+
html `<button class="save" ?disabled=${this.analyzing} @click=${this._savePhoto}>사진 저장</button>`
|
|
139
|
+
: // 거리 측정 완료 전, 동영상 촬영 버튼 표시
|
|
140
|
+
html `<div class="camera-controls">
|
|
141
|
+
<div class="camera-shutter">
|
|
142
|
+
<md-icon>camera</md-icon>
|
|
143
|
+
<input id="cameraInput" type="file" accept="video/*" capture="environment" @change="${this._onVideoSelected}" />
|
|
144
|
+
</div>
|
|
145
|
+
<button class="album-button" @click="${this._onAlbumButtonClick}">앨범 선택</button>
|
|
146
|
+
<input id="albumInput" type="file" accept="video/*" @change="${this._onVideoSelected}" style="display: none;" />
|
|
147
|
+
</div>`}
|
|
148
|
+
|
|
149
|
+
<!-- Action buttons -->
|
|
150
|
+
<div action-buttons>
|
|
151
|
+
${this.frame
|
|
152
|
+
? html `
|
|
153
|
+
<button class="photo" ?disabled=${this.analyzing || !this._hasTwoPoints()} @click=${this._onAnalyzePhoto}>
|
|
154
|
+
사진 분석
|
|
155
|
+
</button>
|
|
156
|
+
`
|
|
157
|
+
: html `
|
|
158
|
+
<button class="save" ?disabled=${this.analyzing || !this.capturedVideoUrl} @click=${this._onAnalyzeVideo}>
|
|
159
|
+
동영상 분석
|
|
160
|
+
</button>
|
|
161
|
+
`}
|
|
162
|
+
<button class="retry" @click=${this._onRetry}>초기화</button>
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
|
|
167
|
+
<!-- 전체 화면을 덮는 로딩 오버레이 -->
|
|
168
|
+
${this.analyzing
|
|
169
|
+
? html `<div class="loading-overlay">
|
|
170
|
+
<div class="loading-container">
|
|
171
|
+
<md-circular-progress indeterminate></md-circular-progress>
|
|
172
|
+
<div class="loading-text">분석 중...</div>
|
|
173
|
+
</div>
|
|
174
|
+
</div>`
|
|
175
|
+
: ''}
|
|
176
|
+
`;
|
|
177
|
+
}
|
|
178
|
+
async updated(changes) { }
|
|
179
|
+
async pageUpdated(changes, lifecycle) {
|
|
180
|
+
if (this.active) {
|
|
181
|
+
this._onRetry();
|
|
182
|
+
this.buildingInspectionId = lifecycle.resourceId || '';
|
|
183
|
+
await this.initBuildingInspection(this.buildingInspectionId);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
async initBuildingInspection(buildingInspectionId = '') {
|
|
187
|
+
var _a, _b, _c, _d;
|
|
188
|
+
const response = await client.query({
|
|
189
|
+
query: gql `
|
|
190
|
+
query BuildingInspection($buildingInspectionId: String!) {
|
|
191
|
+
buildingInspection(id: $buildingInspectionId) {
|
|
192
|
+
id
|
|
193
|
+
status
|
|
194
|
+
requestDate
|
|
195
|
+
drawingMarker
|
|
196
|
+
checklist {
|
|
197
|
+
id
|
|
198
|
+
location
|
|
199
|
+
inspectionDrawingType
|
|
200
|
+
}
|
|
201
|
+
buildingLevel {
|
|
202
|
+
id
|
|
203
|
+
floor
|
|
204
|
+
mainDrawing {
|
|
205
|
+
id
|
|
206
|
+
name
|
|
207
|
+
fullpath
|
|
208
|
+
}
|
|
209
|
+
mainDrawingImage
|
|
210
|
+
building {
|
|
211
|
+
id
|
|
212
|
+
name
|
|
213
|
+
buildingComplex {
|
|
214
|
+
id
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
`,
|
|
221
|
+
variables: {
|
|
222
|
+
buildingInspectionId
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
if (response.errors)
|
|
226
|
+
return;
|
|
227
|
+
this.buildingInspection = response.data.buildingInspection;
|
|
228
|
+
await this._getProjectByBuildingComplexId((_d = (_c = (_b = (_a = this.buildingInspection) === null || _a === void 0 ? void 0 : _a.buildingLevel) === null || _b === void 0 ? void 0 : _b.building) === null || _c === void 0 ? void 0 : _c.buildingComplex) === null || _d === void 0 ? void 0 : _d.id);
|
|
229
|
+
}
|
|
230
|
+
async _getProjectByBuildingComplexId(buildingComplexId) {
|
|
231
|
+
const response = await client.query({
|
|
232
|
+
query: gql `
|
|
233
|
+
query ProjectByBuildingComplexId($buildingComplexId: String!) {
|
|
234
|
+
project: projectByBuildingComplexId(buildingComplexId: $buildingComplexId) {
|
|
235
|
+
id
|
|
236
|
+
name
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
`,
|
|
240
|
+
variables: {
|
|
241
|
+
buildingComplexId
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
if (response.errors)
|
|
245
|
+
return;
|
|
246
|
+
this.project = response.data.project;
|
|
247
|
+
}
|
|
248
|
+
_onVideoSelected(event) {
|
|
249
|
+
var _a;
|
|
250
|
+
const input = event.target;
|
|
251
|
+
const file = (_a = input === null || input === void 0 ? void 0 : input.files) === null || _a === void 0 ? void 0 : _a[0];
|
|
252
|
+
if (!file)
|
|
253
|
+
return;
|
|
254
|
+
// Only allow video files
|
|
255
|
+
if (!file.type.startsWith('video/')) {
|
|
256
|
+
console.warn('선택된 파일이 동영상이 아닙니다.');
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
// Revoke old object URL if exists
|
|
260
|
+
if (this.capturedVideoUrl) {
|
|
261
|
+
URL.revokeObjectURL(this.capturedVideoUrl);
|
|
262
|
+
}
|
|
263
|
+
this.videoFile = file;
|
|
264
|
+
this.capturedVideoUrl = URL.createObjectURL(file);
|
|
265
|
+
}
|
|
266
|
+
_onAlbumButtonClick() {
|
|
267
|
+
var _a;
|
|
268
|
+
// 앨범 선택을 위해 숨겨진 input을 클릭
|
|
269
|
+
(_a = this.albumInputEl) === null || _a === void 0 ? void 0 : _a.click();
|
|
270
|
+
}
|
|
271
|
+
async _onAnalyzeVideo() {
|
|
272
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
273
|
+
if (!this.videoFile) {
|
|
274
|
+
console.warn('선택된 동영상이 없습니다.');
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
try {
|
|
278
|
+
this.analyzing = true;
|
|
279
|
+
const form = new FormData();
|
|
280
|
+
form.append('files', this.videoFile, this.videoFile.name);
|
|
281
|
+
const response = await fetch(`${this.KEYPOINT_RULER_API_BASE_URL}/api/run/keypoint-ruler`, {
|
|
282
|
+
method: 'POST',
|
|
283
|
+
headers: { Authorization: `Basic ${btoa('admin:admin1234')}` },
|
|
284
|
+
body: form
|
|
285
|
+
});
|
|
286
|
+
const data = await response.json();
|
|
287
|
+
this.frame = {
|
|
288
|
+
file_id: (_b = (_a = data === null || data === void 0 ? void 0 : data.result) === null || _a === void 0 ? void 0 : _a.output_files[0]) === null || _b === void 0 ? void 0 : _b.file_id,
|
|
289
|
+
download_url: (_d = (_c = data === null || data === void 0 ? void 0 : data.result) === null || _c === void 0 ? void 0 : _c.output_files[0]) === null || _d === void 0 ? void 0 : _d.download_url,
|
|
290
|
+
file_path: (_f = (_e = data === null || data === void 0 ? void 0 : data.result) === null || _e === void 0 ? void 0 : _e.frames[0]) === null || _f === void 0 ? void 0 : _f.file_path,
|
|
291
|
+
calibration: (_g = data === null || data === void 0 ? void 0 : data.result) === null || _g === void 0 ? void 0 : _g.calibration
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
catch (error) {
|
|
295
|
+
console.error('동영상 업로드 실패:', error);
|
|
296
|
+
}
|
|
297
|
+
finally {
|
|
298
|
+
this.analyzing = false;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
_onRetry() {
|
|
302
|
+
// Clear current selection and reopen camera
|
|
303
|
+
if (this.capturedVideoUrl) {
|
|
304
|
+
URL.revokeObjectURL(this.capturedVideoUrl);
|
|
305
|
+
}
|
|
306
|
+
this.capturedVideoUrl = null;
|
|
307
|
+
this.videoFile = null;
|
|
308
|
+
this.frame = null;
|
|
309
|
+
this.selectedPoints = { x1: null, y1: null, x2: null, y2: null };
|
|
310
|
+
this.displayedImageRect = null;
|
|
311
|
+
this.frameNaturalWidth = 0;
|
|
312
|
+
this.frameNaturalHeight = 0;
|
|
313
|
+
this.cameraInputEl.value = '';
|
|
314
|
+
this.albumInputEl.value = '';
|
|
315
|
+
this.distance = null;
|
|
316
|
+
this.unit = null;
|
|
317
|
+
this.analyzingError = null;
|
|
318
|
+
}
|
|
319
|
+
_hasTwoPoints() {
|
|
320
|
+
const { x1, y1, x2, y2 } = this.selectedPoints;
|
|
321
|
+
return x1 !== null && y1 !== null && x2 !== null && y2 !== null;
|
|
322
|
+
}
|
|
323
|
+
_renderMarkers() {
|
|
324
|
+
if (!this.displayedImageRect)
|
|
325
|
+
return html ``;
|
|
326
|
+
const { left, top, width, height } = this.displayedImageRect;
|
|
327
|
+
const { x1, y1, x2, y2 } = this.selectedPoints;
|
|
328
|
+
const toDisplay = (x, y) => {
|
|
329
|
+
const dx = left + (x * width) / (this.frameNaturalWidth || 1);
|
|
330
|
+
const dy = top + (y * height) / (this.frameNaturalHeight || 1);
|
|
331
|
+
return { dx, dy };
|
|
332
|
+
};
|
|
333
|
+
return html `
|
|
334
|
+
<!-- 첫 번째 점 -->
|
|
335
|
+
${x1 !== null && y1 !== null
|
|
336
|
+
? (() => {
|
|
337
|
+
const p = toDisplay(x1, y1);
|
|
338
|
+
return html `<div class="point-marker point-1" style="left:${p.dx}px; top:${p.dy}px;"></div>`;
|
|
339
|
+
})()
|
|
340
|
+
: ''}
|
|
341
|
+
<!-- 두 번째 점 -->
|
|
342
|
+
${x2 !== null && y2 !== null
|
|
343
|
+
? (() => {
|
|
344
|
+
const p = toDisplay(x2, y2);
|
|
345
|
+
return html `<div class="point-marker point-2" style="left:${p.dx}px; top:${p.dy}px;"></div>`;
|
|
346
|
+
})()
|
|
347
|
+
: ''}
|
|
348
|
+
<!-- 두점 사이 선 -->
|
|
349
|
+
${this._hasTwoPoints()
|
|
350
|
+
? (() => {
|
|
351
|
+
const p1 = toDisplay(x1, y1);
|
|
352
|
+
const p2 = toDisplay(x2, y2);
|
|
353
|
+
const cx = (p1.dx + p2.dx) / 2;
|
|
354
|
+
const cy = (p1.dy + p2.dy) / 2;
|
|
355
|
+
// 선의 길이와 각도 계산
|
|
356
|
+
const length = Math.sqrt(Math.pow(p2.dx - p1.dx, 2) + Math.pow(p2.dy - p1.dy, 2));
|
|
357
|
+
const angle = Math.atan2(p2.dy - p1.dy, p2.dx - p1.dx) * (180 / Math.PI);
|
|
358
|
+
return html `
|
|
359
|
+
<!-- DIV로 그린 선 -->
|
|
360
|
+
<div
|
|
361
|
+
class="line-overlay"
|
|
362
|
+
style="
|
|
363
|
+
left: ${p1.dx}px;
|
|
364
|
+
top: ${p1.dy}px;
|
|
365
|
+
width: ${length}px;
|
|
366
|
+
height: 3px;
|
|
367
|
+
transform: rotate(${angle}deg);
|
|
368
|
+
"
|
|
369
|
+
></div>
|
|
370
|
+
<!-- 거리 라벨 -->
|
|
371
|
+
${this.analyzingError
|
|
372
|
+
? html `<div class="distance-label" style="left:${cx}px; top:${cy}px;">${this.analyzingError}</div>`
|
|
373
|
+
: this.distance && this.unit
|
|
374
|
+
? html `<div class="distance-label" style="left:${cx}px; top:${cy}px;">${this.distance} ${this.unit}</div>`
|
|
375
|
+
: ''}
|
|
376
|
+
`;
|
|
377
|
+
})()
|
|
378
|
+
: ''}
|
|
379
|
+
`;
|
|
380
|
+
}
|
|
381
|
+
async _onAnalyzePhoto() {
|
|
382
|
+
if (!this.frame) {
|
|
383
|
+
console.warn('분석할 사진이 없습니다.');
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
386
|
+
if (!this._hasTwoPoints()) {
|
|
387
|
+
console.warn('두 점을 먼저 선택해 주세요.');
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
390
|
+
try {
|
|
391
|
+
this.analyzing = true;
|
|
392
|
+
const payload = {
|
|
393
|
+
x1: this.selectedPoints.x1,
|
|
394
|
+
y1: this.selectedPoints.y1,
|
|
395
|
+
x2: this.selectedPoints.x2,
|
|
396
|
+
y2: this.selectedPoints.y2,
|
|
397
|
+
file_path: this.frame.file_path,
|
|
398
|
+
calibration: this.frame.calibration
|
|
399
|
+
};
|
|
400
|
+
const form = new FormData();
|
|
401
|
+
form.append('input', JSON.stringify(payload));
|
|
402
|
+
const response = await fetch(`${this.KEYPOINT_RULER_API_BASE_URL}/api/run/keypoint-ruler`, {
|
|
403
|
+
method: 'POST',
|
|
404
|
+
headers: { Authorization: `Basic ${btoa('admin:admin1234')}` },
|
|
405
|
+
body: form
|
|
406
|
+
});
|
|
407
|
+
const result = await response.json();
|
|
408
|
+
const { distance, unit, error } = result.result || {};
|
|
409
|
+
this.distance = distance;
|
|
410
|
+
this.unit = unit;
|
|
411
|
+
this.analyzingError = error;
|
|
412
|
+
}
|
|
413
|
+
catch (error) {
|
|
414
|
+
console.error('사진 분석 실패:', error);
|
|
415
|
+
}
|
|
416
|
+
finally {
|
|
417
|
+
this.analyzing = false;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
async _savePhoto() {
|
|
421
|
+
var _a, _b, _c;
|
|
422
|
+
if (!this.frame || !this._hasTwoPoints() || this.distance === null || !this.unit) {
|
|
423
|
+
notify({ message: '분석 완료 후 저장할 수 있습니다.', level: 'warn' });
|
|
424
|
+
return;
|
|
425
|
+
}
|
|
426
|
+
const checklistId = (_b = (_a = this.buildingInspection) === null || _a === void 0 ? void 0 : _a.checklist) === null || _b === void 0 ? void 0 : _b.id;
|
|
427
|
+
let file;
|
|
428
|
+
try {
|
|
429
|
+
file = await this.getCurrentImage();
|
|
430
|
+
}
|
|
431
|
+
catch (e) {
|
|
432
|
+
notify({ message: '이미지 합성에 실패했습니다.', level: 'error' });
|
|
433
|
+
return;
|
|
434
|
+
}
|
|
435
|
+
const response = await client.mutate({
|
|
436
|
+
mutation: gql `
|
|
437
|
+
mutation ($attachments: [NewAttachment!]!) {
|
|
438
|
+
createAttachments(attachments: $attachments) {
|
|
439
|
+
id
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
`,
|
|
443
|
+
variables: {
|
|
444
|
+
attachments: [{ file, refBy: checklistId, refType: 'Checklist', description: (_c = this.buildingInspection) === null || _c === void 0 ? void 0 : _c.status }]
|
|
445
|
+
},
|
|
446
|
+
context: { hasUpload: true }
|
|
447
|
+
});
|
|
448
|
+
if (!response.errors) {
|
|
449
|
+
notify({ message: '사진 대지를 저장하였습니다.', level: 'info' });
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
return response.data.createAttachments;
|
|
453
|
+
}
|
|
454
|
+
async getCurrentImage() {
|
|
455
|
+
if (!this.imageWrapperEl) {
|
|
456
|
+
throw new Error('이미지 영역을 찾을 수 없습니다.');
|
|
457
|
+
}
|
|
458
|
+
try {
|
|
459
|
+
// html2canvas로 .image-wrapper 영역 캡처
|
|
460
|
+
const canvas = await html2canvas(this.imageWrapperEl, {
|
|
461
|
+
backgroundColor: null, // 투명 배경
|
|
462
|
+
scale: 1, // 1:1 스케일
|
|
463
|
+
useCORS: true, // CORS 이미지 허용
|
|
464
|
+
allowTaint: false, // 보안상 false
|
|
465
|
+
logging: false // 로그 비활성화
|
|
466
|
+
});
|
|
467
|
+
// 캔버스를 Blob으로 변환
|
|
468
|
+
const blob = await new Promise(resolve => {
|
|
469
|
+
canvas.toBlob(resolve, 'image/png', 1.0);
|
|
470
|
+
});
|
|
471
|
+
// File 객체로 변환하여 반환
|
|
472
|
+
return new File([blob], `inspection_${Date.now()}.png`, {
|
|
473
|
+
type: 'image/png'
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
catch (error) {
|
|
477
|
+
console.error('html2canvas 캡처 실패:', error);
|
|
478
|
+
throw new Error('화면 캡처에 실패했습니다.');
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
};
|
|
482
|
+
BuildingInspectionAiMeasurement.styles = [
|
|
483
|
+
ScrollbarStyles,
|
|
484
|
+
CommonGristStyles,
|
|
485
|
+
css `
|
|
486
|
+
:host {
|
|
487
|
+
display: grid;
|
|
488
|
+
grid-template-rows: 75px 1fr;
|
|
489
|
+
color: #4e5055;
|
|
490
|
+
width: 100%;
|
|
491
|
+
height: 100%;
|
|
492
|
+
background-color: #f7f7f7;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
div[body] {
|
|
496
|
+
display: flex;
|
|
497
|
+
justify-items: center;
|
|
498
|
+
gap: var(--spacing-medium);
|
|
499
|
+
margin: var(--spacing-medium);
|
|
500
|
+
min-height: 0;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
div[preview] {
|
|
504
|
+
flex: 1;
|
|
505
|
+
border: 2px solid #ddd;
|
|
506
|
+
border-radius: 10px;
|
|
507
|
+
|
|
508
|
+
display: flex;
|
|
509
|
+
justify-content: center;
|
|
510
|
+
align-items: center;
|
|
511
|
+
min-height: 0;
|
|
512
|
+
overflow: hidden;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
div[preview] img {
|
|
516
|
+
flex: 1;
|
|
517
|
+
max-width: 100%;
|
|
518
|
+
max-height: 100%;
|
|
519
|
+
object-fit: contain;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
div[preview] video {
|
|
523
|
+
flex: 1;
|
|
524
|
+
max-width: 100%;
|
|
525
|
+
max-height: 100%;
|
|
526
|
+
object-fit: contain;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
div[preview] md-icon {
|
|
530
|
+
--md-icon-size: 160px;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
.loading-container {
|
|
534
|
+
display: flex;
|
|
535
|
+
flex-direction: column;
|
|
536
|
+
align-items: center;
|
|
537
|
+
justify-content: center;
|
|
538
|
+
gap: 12px;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
.loading-text {
|
|
542
|
+
font-size: 14px;
|
|
543
|
+
color: #666;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
.frame-container {
|
|
547
|
+
width: 100%;
|
|
548
|
+
height: 100%;
|
|
549
|
+
max-height: 100%;
|
|
550
|
+
min-height: 0;
|
|
551
|
+
overflow-y: auto;
|
|
552
|
+
display: flex;
|
|
553
|
+
flex-direction: column;
|
|
554
|
+
gap: 12px;
|
|
555
|
+
padding: 12px;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
.frames-header {
|
|
559
|
+
display: flex;
|
|
560
|
+
align-items: center;
|
|
561
|
+
justify-content: center;
|
|
562
|
+
gap: 12px;
|
|
563
|
+
font-size: 20px;
|
|
564
|
+
font-weight: 700;
|
|
565
|
+
color: #333;
|
|
566
|
+
text-align: center;
|
|
567
|
+
padding-block: 8px;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
.frames-count {
|
|
571
|
+
font-size: 16px;
|
|
572
|
+
color: #777;
|
|
573
|
+
font-weight: 600;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
.frames-grid {
|
|
577
|
+
display: grid;
|
|
578
|
+
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
|
|
579
|
+
gap: 12px;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
.frame-item {
|
|
583
|
+
border: 1px solid #ddd;
|
|
584
|
+
border-radius: 8px;
|
|
585
|
+
overflow: hidden;
|
|
586
|
+
background: #fff;
|
|
587
|
+
cursor: pointer;
|
|
588
|
+
transition:
|
|
589
|
+
box-shadow 0.2s,
|
|
590
|
+
transform 0.1s;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
.frame-item:hover {
|
|
594
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
595
|
+
transform: translateY(-1px);
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
.frame-item img {
|
|
599
|
+
display: block;
|
|
600
|
+
width: 100%;
|
|
601
|
+
height: 120px;
|
|
602
|
+
object-fit: cover;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
.image-wrapper {
|
|
606
|
+
flex: 1;
|
|
607
|
+
display: flex;
|
|
608
|
+
position: relative;
|
|
609
|
+
align-content: center;
|
|
610
|
+
text-align: center;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
.point-marker {
|
|
614
|
+
position: absolute;
|
|
615
|
+
width: 14px;
|
|
616
|
+
height: 14px;
|
|
617
|
+
border-radius: 50%;
|
|
618
|
+
border: 2px solid #fff;
|
|
619
|
+
transform: translate(-50%, -50%);
|
|
620
|
+
pointer-events: none;
|
|
621
|
+
box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25);
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
.point-1 {
|
|
625
|
+
background-color: #e53935;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
.point-2 {
|
|
629
|
+
background-color: #1e88e5;
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
.line-overlay {
|
|
633
|
+
position: absolute;
|
|
634
|
+
pointer-events: none;
|
|
635
|
+
background-color: #ff9800;
|
|
636
|
+
transform-origin: left center;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
.distance-label {
|
|
640
|
+
position: absolute;
|
|
641
|
+
background: rgba(0, 0, 0, 0.7);
|
|
642
|
+
color: #fff;
|
|
643
|
+
font-size: 14px;
|
|
644
|
+
padding: 2px 6px;
|
|
645
|
+
border-radius: 4px;
|
|
646
|
+
transform: translate(-50%, -120%);
|
|
647
|
+
pointer-events: none;
|
|
648
|
+
white-space: nowrap;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
div[controls] {
|
|
652
|
+
width: 240px;
|
|
653
|
+
display: flex;
|
|
654
|
+
flex-direction: column;
|
|
655
|
+
justify-content: space-between;
|
|
656
|
+
align-items: center;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
div[action-buttons] {
|
|
660
|
+
display: flex;
|
|
661
|
+
flex-direction: row;
|
|
662
|
+
justify-content: space-between;
|
|
663
|
+
gap: 15px;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
.switch-container {
|
|
667
|
+
display: flex;
|
|
668
|
+
align-items: center;
|
|
669
|
+
gap: 10px;
|
|
670
|
+
font-size: 24px;
|
|
671
|
+
font-weight: bold;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
ox-input-switch {
|
|
675
|
+
--ox-simple-switch-fullwidth: 68px;
|
|
676
|
+
--ox-simple-switch-fullheight: 34px;
|
|
677
|
+
--ox-simple-switch-thumbnail-size: 34px;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
.camera-controls {
|
|
681
|
+
display: flex;
|
|
682
|
+
flex-direction: column;
|
|
683
|
+
align-items: center;
|
|
684
|
+
gap: 12px;
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
.camera-shutter {
|
|
688
|
+
display: flex;
|
|
689
|
+
justify-content: center;
|
|
690
|
+
align-items: center;
|
|
691
|
+
cursor: pointer;
|
|
692
|
+
position: relative;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
.controls-title {
|
|
696
|
+
font-size: 18px;
|
|
697
|
+
font-weight: 700;
|
|
698
|
+
color: #333;
|
|
699
|
+
margin-bottom: 8px;
|
|
700
|
+
text-align: center;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
.camera-shutter md-icon {
|
|
704
|
+
--md-icon-size: 100px;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
.camera-shutter input {
|
|
708
|
+
opacity: 0;
|
|
709
|
+
width: 100%;
|
|
710
|
+
height: 100%;
|
|
711
|
+
position: absolute;
|
|
712
|
+
left: 0;
|
|
713
|
+
top: 0;
|
|
714
|
+
cursor: pointer;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
button {
|
|
718
|
+
padding: 10px 20px;
|
|
719
|
+
font-size: 16px;
|
|
720
|
+
border-radius: 5px;
|
|
721
|
+
border: none;
|
|
722
|
+
cursor: pointer;
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
button.save {
|
|
726
|
+
background-color: #4caf50;
|
|
727
|
+
color: white;
|
|
728
|
+
|
|
729
|
+
&:disabled {
|
|
730
|
+
background-color: #ccc;
|
|
731
|
+
cursor: default;
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
button.retry {
|
|
736
|
+
background-color: #f0ad4e;
|
|
737
|
+
color: white;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
button.photo {
|
|
741
|
+
background-color: #1e88e5;
|
|
742
|
+
color: white;
|
|
743
|
+
|
|
744
|
+
&:disabled {
|
|
745
|
+
background-color: #ccc;
|
|
746
|
+
cursor: default;
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
button.album-button {
|
|
751
|
+
background-color: #9c27b0;
|
|
752
|
+
color: white;
|
|
753
|
+
font-size: 14px;
|
|
754
|
+
padding: 8px 16px;
|
|
755
|
+
border-radius: 5px;
|
|
756
|
+
border: none;
|
|
757
|
+
cursor: pointer;
|
|
758
|
+
|
|
759
|
+
&:hover {
|
|
760
|
+
background-color: #7b1fa2;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
&:disabled {
|
|
764
|
+
background-color: #ccc;
|
|
765
|
+
cursor: default;
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
.loading-overlay {
|
|
770
|
+
position: fixed;
|
|
771
|
+
top: 0;
|
|
772
|
+
left: 0;
|
|
773
|
+
right: 0;
|
|
774
|
+
bottom: 0;
|
|
775
|
+
background: rgba(0, 0, 0, 0.5);
|
|
776
|
+
display: flex;
|
|
777
|
+
flex-direction: column;
|
|
778
|
+
align-items: center;
|
|
779
|
+
justify-content: center;
|
|
780
|
+
gap: 12px;
|
|
781
|
+
z-index: 2000;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
.loading-overlay .loading-container {
|
|
785
|
+
background: white;
|
|
786
|
+
padding: 32px;
|
|
787
|
+
border-radius: 12px;
|
|
788
|
+
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
|
|
789
|
+
}
|
|
790
|
+
`
|
|
791
|
+
];
|
|
792
|
+
__decorate([
|
|
793
|
+
state(),
|
|
794
|
+
__metadata("design:type", Object)
|
|
795
|
+
], BuildingInspectionAiMeasurement.prototype, "project", void 0);
|
|
796
|
+
__decorate([
|
|
797
|
+
state(),
|
|
798
|
+
__metadata("design:type", Object)
|
|
799
|
+
], BuildingInspectionAiMeasurement.prototype, "buildingInspection", void 0);
|
|
800
|
+
__decorate([
|
|
801
|
+
state(),
|
|
802
|
+
__metadata("design:type", String)
|
|
803
|
+
], BuildingInspectionAiMeasurement.prototype, "buildingInspectionId", void 0);
|
|
804
|
+
__decorate([
|
|
805
|
+
state(),
|
|
806
|
+
__metadata("design:type", Object)
|
|
807
|
+
], BuildingInspectionAiMeasurement.prototype, "capturedVideoUrl", void 0);
|
|
808
|
+
__decorate([
|
|
809
|
+
state(),
|
|
810
|
+
__metadata("design:type", Object)
|
|
811
|
+
], BuildingInspectionAiMeasurement.prototype, "videoFile", void 0);
|
|
812
|
+
__decorate([
|
|
813
|
+
state(),
|
|
814
|
+
__metadata("design:type", Object)
|
|
815
|
+
], BuildingInspectionAiMeasurement.prototype, "frame", void 0);
|
|
816
|
+
__decorate([
|
|
817
|
+
state(),
|
|
818
|
+
__metadata("design:type", Boolean)
|
|
819
|
+
], BuildingInspectionAiMeasurement.prototype, "analyzing", void 0);
|
|
820
|
+
__decorate([
|
|
821
|
+
state(),
|
|
822
|
+
__metadata("design:type", Object)
|
|
823
|
+
], BuildingInspectionAiMeasurement.prototype, "selectedPoints", void 0);
|
|
824
|
+
__decorate([
|
|
825
|
+
state(),
|
|
826
|
+
__metadata("design:type", Number)
|
|
827
|
+
], BuildingInspectionAiMeasurement.prototype, "frameNaturalWidth", void 0);
|
|
828
|
+
__decorate([
|
|
829
|
+
state(),
|
|
830
|
+
__metadata("design:type", Number)
|
|
831
|
+
], BuildingInspectionAiMeasurement.prototype, "frameNaturalHeight", void 0);
|
|
832
|
+
__decorate([
|
|
833
|
+
state(),
|
|
834
|
+
__metadata("design:type", Object)
|
|
835
|
+
], BuildingInspectionAiMeasurement.prototype, "displayedImageRect", void 0);
|
|
836
|
+
__decorate([
|
|
837
|
+
state(),
|
|
838
|
+
__metadata("design:type", Object)
|
|
839
|
+
], BuildingInspectionAiMeasurement.prototype, "distance", void 0);
|
|
840
|
+
__decorate([
|
|
841
|
+
state(),
|
|
842
|
+
__metadata("design:type", Object)
|
|
843
|
+
], BuildingInspectionAiMeasurement.prototype, "unit", void 0);
|
|
844
|
+
__decorate([
|
|
845
|
+
state(),
|
|
846
|
+
__metadata("design:type", Object)
|
|
847
|
+
], BuildingInspectionAiMeasurement.prototype, "analyzingError", void 0);
|
|
848
|
+
__decorate([
|
|
849
|
+
query('img#frameImage'),
|
|
850
|
+
__metadata("design:type", HTMLImageElement)
|
|
851
|
+
], BuildingInspectionAiMeasurement.prototype, "frameImageEl", void 0);
|
|
852
|
+
__decorate([
|
|
853
|
+
query('div.image-wrapper'),
|
|
854
|
+
__metadata("design:type", HTMLDivElement)
|
|
855
|
+
], BuildingInspectionAiMeasurement.prototype, "imageWrapperEl", void 0);
|
|
856
|
+
__decorate([
|
|
857
|
+
query('#cameraInput'),
|
|
858
|
+
__metadata("design:type", HTMLInputElement)
|
|
859
|
+
], BuildingInspectionAiMeasurement.prototype, "cameraInputEl", void 0);
|
|
860
|
+
__decorate([
|
|
861
|
+
query('#albumInput'),
|
|
862
|
+
__metadata("design:type", HTMLInputElement)
|
|
863
|
+
], BuildingInspectionAiMeasurement.prototype, "albumInputEl", void 0);
|
|
864
|
+
BuildingInspectionAiMeasurement = __decorate([
|
|
865
|
+
customElement('building-inspection-detail-ai-measurement')
|
|
866
|
+
], BuildingInspectionAiMeasurement);
|
|
867
|
+
export { BuildingInspectionAiMeasurement };
|
|
868
|
+
//# sourceMappingURL=building-inspection-detail-ai-measurement.js.map
|