@dssp/supervision 1.0.0-alpha.51 → 1.0.0-alpha.53

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 (30) hide show
  1. package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.d.ts +2 -0
  2. package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.js +43 -3
  3. package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.js.map +1 -1
  4. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.d.ts +1 -1
  5. package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js +1 -1
  6. package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js.map +1 -1
  7. package/dist-client/pages/checklist/checklist-view.js +14 -5
  8. package/dist-client/pages/checklist/checklist-view.js.map +1 -1
  9. package/dist-client/pages/checklist/inspection-tab-popup.js +0 -1
  10. package/dist-client/pages/checklist/inspection-tab-popup.js.map +1 -1
  11. package/dist-client/pages/checklist-template/checklist-template-item.js +25 -0
  12. package/dist-client/pages/checklist-template/checklist-template-item.js.map +1 -1
  13. package/dist-client/route.d.ts +1 -1
  14. package/dist-client/stt/speech-to-text.d.ts +13 -8
  15. package/dist-client/stt/speech-to-text.js +282 -40
  16. package/dist-client/stt/speech-to-text.js.map +1 -1
  17. package/dist-client/tsconfig.tsbuildinfo +1 -1
  18. package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js +11 -2
  19. package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js.map +1 -1
  20. package/dist-server/service/checklist-template-item/checklist-template-item-type.d.ts +1 -0
  21. package/dist-server/service/checklist-template-item/checklist-template-item-type.js +4 -0
  22. package/dist-server/service/checklist-template-item/checklist-template-item-type.js.map +1 -1
  23. package/dist-server/service/checklist-template-item/checklist-template-item.d.ts +1 -0
  24. package/dist-server/service/checklist-template-item/checklist-template-item.js +6 -1
  25. package/dist-server/service/checklist-template-item/checklist-template-item.js.map +1 -1
  26. package/dist-server/service/checklist-template-item/spec-matching-service.js +1 -0
  27. package/dist-server/service/checklist-template-item/spec-matching-service.js.map +1 -1
  28. package/dist-server/service/index.d.ts +1 -1
  29. package/dist-server/tsconfig.tsbuildinfo +1 -1
  30. package/package.json +2 -2
@@ -36,6 +36,7 @@ export declare class BuildingInspectionAiMeasurement extends PageView {
36
36
  private frameImageEl;
37
37
  private imageWrapperEl;
38
38
  private cameraInputEl;
39
+ private albumInputEl;
39
40
  get context(): {
40
41
  title: string;
41
42
  };
@@ -45,6 +46,7 @@ export declare class BuildingInspectionAiMeasurement extends PageView {
45
46
  initBuildingInspection(buildingInspectionId?: string): Promise<void>;
46
47
  private _getProjectByBuildingComplexId;
47
48
  private _onVideoSelected;
49
+ private _onAlbumButtonClick;
48
50
  private _onAnalyzeVideo;
49
51
  private _onRetry;
50
52
  private _onImageLoad;
@@ -136,9 +136,13 @@ let BuildingInspectionAiMeasurement = class BuildingInspectionAiMeasurement exte
136
136
  ? // 거리 측정 완료 시, 사진 저장 버튼 표시
137
137
  html `<button class="save" ?disabled=${this.analyzing} @click=${this._savePhoto}>사진 저장</button>`
138
138
  : // 거리 측정 완료 전, 동영상 촬영 버튼 표시
139
- html `<div class="camera-shutter">
140
- <md-icon>camera</md-icon>
141
- <input id="cameraInput" type="file" accept="video/*" @change="${this._onVideoSelected}" />
139
+ html `<div class="camera-controls">
140
+ <div class="camera-shutter">
141
+ <md-icon>camera</md-icon>
142
+ <input id="cameraInput" type="file" accept="video/*" capture="environment" @change="${this._onVideoSelected}" />
143
+ </div>
144
+ <button class="album-button" @click="${this._onAlbumButtonClick}">앨범 선택</button>
145
+ <input id="albumInput" type="file" accept="video/*" @change="${this._onVideoSelected}" style="display: none;" />
142
146
  </div>`}
143
147
 
144
148
  <!-- Action buttons -->
@@ -258,6 +262,11 @@ let BuildingInspectionAiMeasurement = class BuildingInspectionAiMeasurement exte
258
262
  this.videoFile = file;
259
263
  this.capturedVideoUrl = URL.createObjectURL(file);
260
264
  }
265
+ _onAlbumButtonClick() {
266
+ var _a;
267
+ // 앨범 선택을 위해 숨겨진 input을 클릭
268
+ (_a = this.albumInputEl) === null || _a === void 0 ? void 0 : _a.click();
269
+ }
261
270
  async _onAnalyzeVideo() {
262
271
  var _a, _b, _c, _d, _e, _f, _g;
263
272
  if (!this.videoFile) {
@@ -301,6 +310,7 @@ let BuildingInspectionAiMeasurement = class BuildingInspectionAiMeasurement exte
301
310
  this.frameNaturalWidth = 0;
302
311
  this.frameNaturalHeight = 0;
303
312
  this.cameraInputEl.value = '';
313
+ this.albumInputEl.value = '';
304
314
  this.distance = null;
305
315
  this.unit = null;
306
316
  this.analyzingError = null;
@@ -664,6 +674,13 @@ BuildingInspectionAiMeasurement.styles = [
664
674
  --ox-simple-switch-thumbnail-size: 34px;
665
675
  }
666
676
 
677
+ .camera-controls {
678
+ display: flex;
679
+ flex-direction: column;
680
+ align-items: center;
681
+ gap: 12px;
682
+ }
683
+
667
684
  .camera-shutter {
668
685
  display: flex;
669
686
  justify-content: center;
@@ -727,6 +744,25 @@ BuildingInspectionAiMeasurement.styles = [
727
744
  }
728
745
  }
729
746
 
747
+ button.album-button {
748
+ background-color: #9c27b0;
749
+ color: white;
750
+ font-size: 14px;
751
+ padding: 8px 16px;
752
+ border-radius: 5px;
753
+ border: none;
754
+ cursor: pointer;
755
+
756
+ &:hover {
757
+ background-color: #7b1fa2;
758
+ }
759
+
760
+ &:disabled {
761
+ background-color: #ccc;
762
+ cursor: default;
763
+ }
764
+ }
765
+
730
766
  .loading-overlay {
731
767
  position: fixed;
732
768
  top: 0;
@@ -818,6 +854,10 @@ __decorate([
818
854
  query('#cameraInput'),
819
855
  __metadata("design:type", HTMLInputElement)
820
856
  ], BuildingInspectionAiMeasurement.prototype, "cameraInputEl", void 0);
857
+ __decorate([
858
+ query('#albumInput'),
859
+ __metadata("design:type", HTMLInputElement)
860
+ ], BuildingInspectionAiMeasurement.prototype, "albumInputEl", void 0);
821
861
  BuildingInspectionAiMeasurement = __decorate([
822
862
  customElement('building-inspection-detail-ai-measurement')
823
863
  ], BuildingInspectionAiMeasurement);
@@ -1 +1 @@
1
- {"version":3,"file":"building-inspection-detail-ai-measurement.js","sourceRoot":"","sources":["../../../client/pages/building-inspection/building-inspection-detail-ai-measurement.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,mCAAmC,CAAA;AAC1C,OAAO,wCAAwC,CAAA;AAC/C,OAAO,6CAA6C,CAAA;AAEpD,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,WAAW,MAAM,aAAa,CAAA;AAErC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEpE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAExC,OAAO,+CAA+C,CAAA;AAG/C,IAAM,+BAA+B,GAArC,MAAM,+BAAgC,SAAQ,QAAQ;IAAtD;;QA4RG,gCAA2B,GAAW,yCAAyC,CAAA;QAE9E,YAAO,GAAQ,EAAE,CAAA;QACjB,uBAAkB,GAAQ,EAAE,CAAA;QAC5B,yBAAoB,GAAW,EAAE,CAAA;QACjC,qBAAgB,GAAkB,IAAI,CAAA;QACtC,cAAS,GAAgB,IAAI,CAAA;QAC7B,UAAK,GAAe,IAAI,CAAA;QACxB,cAAS,GAAY,KAAK,CAAA;QAC1B,mBAAc,GAAmF;YACxG,EAAE,EAAE,IAAI;YACR,EAAE,EAAE,IAAI;YACR,EAAE,EAAE,IAAI;YACR,EAAE,EAAE,IAAI;SACT,CAAA;QACQ,sBAAiB,GAAW,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,aAAa,CAAC,2CAA2C,CAAC;GAC9C,+BAA+B,CA+vB3C","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/input/ox-input-switch.js'\nimport '@operato/mini-map/ox-zoomable-image.js'\nimport '@material/web/progress/circular-progress.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, PropertyValues } from 'lit'\nimport { customElement, state, query } from 'lit/decorators.js'\nimport html2canvas from 'html2canvas'\n\nimport { PageView } from '@operato/shell'\nimport { CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view'\nimport { client } from '@operato/graphql'\nimport { notify } from '@operato/layout'\n\nimport './component/building-inspection-detail-header'\n\n@customElement('building-inspection-detail-ai-measurement')\nexport class BuildingInspectionAiMeasurement extends PageView {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n css`\n :host {\n display: grid;\n grid-template-rows: 75px 1fr;\n color: #4e5055;\n width: 100%;\n height: 100%;\n background-color: #f7f7f7;\n }\n\n div[body] {\n display: flex;\n justify-items: center;\n gap: var(--spacing-medium);\n margin: var(--spacing-medium);\n min-height: 0;\n }\n\n div[preview] {\n flex: 1;\n border: 2px solid #ddd;\n border-radius: 10px;\n\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 0;\n overflow: hidden;\n }\n\n div[preview] img {\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n }\n\n div[preview] video {\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n }\n\n div[preview] md-icon {\n --md-icon-size: 160px;\n }\n\n .loading-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 12px;\n }\n\n .loading-text {\n font-size: 14px;\n color: #666;\n }\n\n .frame-container {\n width: 100%;\n height: 100%;\n max-height: 100%;\n min-height: 0;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 12px;\n }\n\n .frames-header {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 12px;\n font-size: 20px;\n font-weight: 700;\n color: #333;\n text-align: center;\n padding-block: 8px;\n }\n\n .frames-count {\n font-size: 16px;\n color: #777;\n font-weight: 600;\n }\n\n .frames-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));\n gap: 12px;\n }\n\n .frame-item {\n border: 1px solid #ddd;\n border-radius: 8px;\n overflow: hidden;\n background: #fff;\n cursor: pointer;\n transition:\n box-shadow 0.2s,\n transform 0.1s;\n }\n\n .frame-item:hover {\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n transform: translateY(-1px);\n }\n\n .frame-item img {\n display: block;\n width: 100%;\n height: 120px;\n object-fit: cover;\n }\n\n .image-wrapper {\n position: relative;\n width: 100%;\n height: 100%;\n align-content: center;\n text-align: center;\n }\n\n .point-marker {\n position: absolute;\n width: 14px;\n height: 14px;\n border-radius: 50%;\n border: 2px solid #fff;\n transform: translate(-50%, -50%);\n pointer-events: none;\n box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25);\n }\n\n .point-1 {\n background-color: #e53935;\n }\n\n .point-2 {\n background-color: #1e88e5;\n }\n\n .line-overlay {\n position: absolute;\n pointer-events: none;\n background-color: #ff9800;\n transform-origin: left center;\n }\n\n .distance-label {\n position: absolute;\n background: rgba(0, 0, 0, 0.7);\n color: #fff;\n font-size: 14px;\n padding: 2px 6px;\n border-radius: 4px;\n transform: translate(-50%, -120%);\n pointer-events: none;\n white-space: nowrap;\n }\n\n div[controls] {\n width: 240px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n }\n\n div[action-buttons] {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n gap: 15px;\n }\n\n .switch-container {\n display: flex;\n align-items: center;\n gap: 10px;\n font-size: 24px;\n font-weight: bold;\n }\n\n ox-input-switch {\n --ox-simple-switch-fullwidth: 68px;\n --ox-simple-switch-fullheight: 34px;\n --ox-simple-switch-thumbnail-size: 34px;\n }\n\n .camera-shutter {\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n position: relative;\n }\n\n .controls-title {\n font-size: 18px;\n font-weight: 700;\n color: #333;\n margin-bottom: 8px;\n text-align: center;\n }\n\n .camera-shutter md-icon {\n --md-icon-size: 100px;\n }\n\n .camera-shutter input {\n opacity: 0;\n width: 100%;\n height: 100%;\n position: absolute;\n left: 0;\n top: 0;\n cursor: pointer;\n }\n\n button {\n padding: 10px 20px;\n font-size: 16px;\n border-radius: 5px;\n border: none;\n cursor: pointer;\n }\n\n button.save {\n background-color: #4caf50;\n color: white;\n\n &:disabled {\n background-color: #ccc;\n cursor: default;\n }\n }\n\n button.retry {\n background-color: #f0ad4e;\n color: white;\n }\n\n button.photo {\n background-color: #1e88e5;\n color: white;\n\n &:disabled {\n background-color: #ccc;\n cursor: default;\n }\n }\n\n .loading-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 12px;\n z-index: 2000;\n }\n\n .loading-overlay .loading-container {\n background: white;\n padding: 32px;\n border-radius: 12px;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);\n }\n `\n ]\n\n private KEYPOINT_RULER_API_BASE_URL: string = 'https://hatiolab-korea-uni.ettisoft.com'\n\n @state() project: any = {}\n @state() buildingInspection: any = {}\n @state() buildingInspectionId: string = ''\n @state() capturedVideoUrl: string | null = null\n @state() videoFile: File | null = null\n @state() frame: any | null = null\n @state() analyzing: boolean = false\n @state() selectedPoints: { x1: number | null; y1: number | null; x2: number | null; y2: number | null } = {\n x1: null,\n y1: null,\n x2: null,\n y2: null\n }\n @state() frameNaturalWidth: number = 0\n @state() frameNaturalHeight: number = 0\n @state() displayedImageRect: { width: number; height: number; left: number; top: number } | null = null\n @state() distance: number | null = null\n @state() unit: string | null = null\n @state() analyzingError: string | null = null\n\n @query('img#frameImage') private frameImageEl!: HTMLImageElement\n @query('div.image-wrapper') private imageWrapperEl!: HTMLDivElement\n @query('#cameraInput') private cameraInputEl!: HTMLInputElement\n\n get context() {\n return {\n title: '검측 관리 상세 - AI 거리 측정'\n }\n }\n\n render() {\n return html`\n <building-inspection-detail-header\n .buildingInspectionId=${this.buildingInspection?.id}\n .buildingLevelId=${this.buildingInspection?.buildingLevel?.id}\n .projectName=${this.project.name}\n .buildingName=${this.buildingInspection?.buildingLevel?.building?.name}\n .buildingLevelFloor=${this.buildingInspection?.buildingLevel?.floor}\n ></building-inspection-detail-header>\n\n <div body>\n <!-- Preview selected or recorded video -->\n <div preview>\n ${this.frame?.download_url\n ? html`\n <div class=\"image-wrapper\" @click=${this._onImageClick}>\n <img\n id=\"frameImage\"\n src=\"${this.KEYPOINT_RULER_API_BASE_URL + this.frame?.download_url}\"\n crossorigin=\"anonymous\"\n alt=\"frame\"\n loading=\"eager\"\n @load=${this._onImageLoad}\n />\n ${this._renderMarkers()}\n </div>\n `\n : // 동영상 선택 후 동영상 프리뷰\n this.capturedVideoUrl\n ? html`<video src=${this.capturedVideoUrl} controls playsinline></video>`\n : // 초기 상태, 동영상 선택 전\n html`<md-icon>videocam</md-icon>`}\n </div>\n\n <div controls>\n <span class=\"controls-title\">동영상 촬영</span>\n\n <!-- 가운데 버튼 -->\n ${this.frame?.download_url && this._hasTwoPoints() && this.distance && this.unit\n ? // 거리 측정 완료 시, 사진 저장 버튼 표시\n html`<button class=\"save\" ?disabled=${this.analyzing} @click=${this._savePhoto}>사진 저장</button>`\n : // 거리 측정 완료 전, 동영상 촬영 버튼 표시\n html`<div class=\"camera-shutter\">\n <md-icon>camera</md-icon>\n <input id=\"cameraInput\" type=\"file\" accept=\"video/*\" @change=\"${this._onVideoSelected}\" />\n </div>`}\n\n <!-- Action buttons -->\n <div action-buttons>\n ${this.frame\n ? html`\n <button class=\"photo\" ?disabled=${this.analyzing || !this._hasTwoPoints()} @click=${this._onAnalyzePhoto}>\n 사진 분석\n </button>\n `\n : html`\n <button class=\"save\" ?disabled=${this.analyzing || !this.capturedVideoUrl} @click=${this._onAnalyzeVideo}>\n 동영상 분석\n </button>\n `}\n <button class=\"retry\" @click=${this._onRetry}>초기화</button>\n </div>\n </div>\n </div>\n\n <!-- 전체 화면을 덮는 로딩 오버레이 -->\n ${this.analyzing\n ? html`<div class=\"loading-overlay\">\n <div class=\"loading-container\">\n <md-circular-progress indeterminate></md-circular-progress>\n <div class=\"loading-text\">분석 중...</div>\n </div>\n </div>`\n : ''}\n `\n }\n\n protected async updated(changes: PropertyValues): Promise<void> {}\n\n async pageUpdated(changes: any, lifecycle: PageLifecycle) {\n if (this.active) {\n this._onRetry()\n this.buildingInspectionId = lifecycle.resourceId || ''\n await this.initBuildingInspection(this.buildingInspectionId)\n }\n }\n\n async initBuildingInspection(buildingInspectionId: string = '') {\n const response = await client.query({\n query: gql`\n query BuildingInspection($buildingInspectionId: String!) {\n buildingInspection(id: $buildingInspectionId) {\n id\n status\n requestDate\n drawingMarker\n checklist {\n id\n location\n inspectionDrawingType\n }\n buildingLevel {\n id\n floor\n mainDrawing {\n id\n name\n fullpath\n }\n mainDrawingImage\n building {\n id\n name\n buildingComplex {\n id\n }\n }\n }\n }\n }\n `,\n variables: {\n buildingInspectionId\n }\n })\n\n if (response.errors) return\n\n this.buildingInspection = response.data.buildingInspection\n\n await this._getProjectByBuildingComplexId(this.buildingInspection?.buildingLevel?.building?.buildingComplex?.id)\n }\n\n private async _getProjectByBuildingComplexId(buildingComplexId) {\n const response = await client.query({\n query: gql`\n query ProjectByBuildingComplexId($buildingComplexId: String!) {\n project: projectByBuildingComplexId(buildingComplexId: $buildingComplexId) {\n id\n name\n }\n }\n `,\n variables: {\n buildingComplexId\n }\n })\n\n if (response.errors) return\n\n this.project = response.data.project\n }\n\n private _onVideoSelected(event: Event) {\n const input = event.target as HTMLInputElement\n const file = input?.files?.[0]\n if (!file) return\n\n // Only allow video files\n if (!file.type.startsWith('video/')) {\n console.warn('선택된 파일이 동영상이 아닙니다.')\n return\n }\n\n // Revoke old object URL if exists\n if (this.capturedVideoUrl) {\n URL.revokeObjectURL(this.capturedVideoUrl)\n }\n\n this.videoFile = file\n this.capturedVideoUrl = URL.createObjectURL(file)\n }\n\n private async _onAnalyzeVideo() {\n if (!this.videoFile) {\n console.warn('선택된 동영상이 없습니다.')\n return\n }\n\n try {\n this.analyzing = true\n const form = new FormData()\n form.append('files', this.videoFile, this.videoFile.name)\n const response = await fetch(`${this.KEYPOINT_RULER_API_BASE_URL}/api/run/keypoint-ruler`, {\n method: 'POST',\n headers: { Authorization: `Basic ${btoa('admin:admin1234')}` },\n body: form\n })\n\n const data = await response.json()\n\n this.frame = {\n file_id: data?.result?.output_files[0]?.file_id,\n download_url: data?.result?.output_files[0]?.download_url,\n file_path: data?.result?.frames[0]?.file_path,\n calibration: data?.result?.calibration\n }\n } catch (error) {\n console.error('동영상 업로드 실패:', error)\n } finally {\n this.analyzing = false\n }\n }\n\n private _onRetry() {\n // Clear current selection and reopen camera\n if (this.capturedVideoUrl) {\n URL.revokeObjectURL(this.capturedVideoUrl)\n }\n this.capturedVideoUrl = null\n this.videoFile = null\n this.frame = null\n this.selectedPoints = { x1: null, y1: null, x2: null, y2: null }\n this.displayedImageRect = null\n this.frameNaturalWidth = 0\n this.frameNaturalHeight = 0\n this.cameraInputEl.value = ''\n this.distance = null\n this.unit = null\n this.analyzingError = null\n }\n\n private _onImageLoad = () => {\n if (!this.frameImageEl || !this.imageWrapperEl) return\n const img = this.frameImageEl\n const wrapperRect = this.imageWrapperEl.getBoundingClientRect()\n const imgRect = img.getBoundingClientRect()\n this.frameNaturalWidth = img.naturalWidth\n this.frameNaturalHeight = img.naturalHeight\n this.displayedImageRect = {\n width: imgRect.width,\n height: imgRect.height,\n left: imgRect.left - wrapperRect.left,\n top: imgRect.top - wrapperRect.top\n }\n }\n\n private _onImageClick = (event: MouseEvent) => {\n if (!this.frameImageEl || !this.imageWrapperEl) return\n const imgRect = this.frameImageEl.getBoundingClientRect()\n const wrapperRect = this.imageWrapperEl.getBoundingClientRect()\n const clientX = event.clientX\n const clientY = event.clientY\n\n // Ignore clicks outside the displayed image area\n if (clientX < imgRect.left || clientX > imgRect.right || clientY < imgRect.top || clientY > imgRect.bottom) {\n return\n }\n\n // 새로운 마크 입력 시 이전 거리/단위 결과 초기화\n this.distance = null\n this.unit = null\n this.analyzingError = null\n\n const relativeX = clientX - imgRect.left\n const relativeY = clientY - imgRect.top\n\n const xOnNatural = Math.round((relativeX * this.frameNaturalWidth) / imgRect.width)\n const yOnNatural = Math.round((relativeY * this.frameNaturalHeight) / imgRect.height)\n\n if (this.selectedPoints.x1 === null || this.selectedPoints.y1 === null) {\n this.selectedPoints = { ...this.selectedPoints, x1: xOnNatural, y1: yOnNatural }\n } else if (this.selectedPoints.x2 === null || this.selectedPoints.y2 === null) {\n this.selectedPoints = { ...this.selectedPoints, x2: xOnNatural, y2: yOnNatural }\n } else {\n // 세 번째 클릭부터는 초기화 후 첫 점으로 설정\n this.selectedPoints = { x1: xOnNatural, y1: yOnNatural, x2: null, y2: null }\n }\n\n // Update displayed rect cache (in case layout changed)\n this.displayedImageRect = {\n width: imgRect.width,\n height: imgRect.height,\n left: imgRect.left - wrapperRect.left,\n top: imgRect.top - wrapperRect.top\n }\n }\n\n private _hasTwoPoints(): boolean {\n const { x1, y1, x2, y2 } = this.selectedPoints\n return x1 !== null && y1 !== null && x2 !== null && y2 !== null\n }\n\n private _renderMarkers() {\n if (!this.displayedImageRect) return html``\n const { left, top, width, height } = this.displayedImageRect\n const { x1, y1, x2, y2 } = this.selectedPoints\n const toDisplay = (x: number, y: number) => {\n const dx = left + (x * width) / (this.frameNaturalWidth || 1)\n const dy = top + (y * height) / (this.frameNaturalHeight || 1)\n return { dx, dy }\n }\n\n return html`\n <!-- 첫 번째 점 -->\n ${x1 !== null && y1 !== null\n ? (() => {\n const p = toDisplay(x1, y1)\n return html`<div class=\"point-marker point-1\" style=\"left:${p.dx}px; top:${p.dy}px;\"></div>`\n })()\n : ''}\n <!-- 두 번째 점 -->\n ${x2 !== null && y2 !== null\n ? (() => {\n const p = toDisplay(x2, y2)\n return html`<div class=\"point-marker point-2\" style=\"left:${p.dx}px; top:${p.dy}px;\"></div>`\n })()\n : ''}\n <!-- 두점 사이 선 -->\n ${this._hasTwoPoints()\n ? (() => {\n const p1 = toDisplay(x1 as number, y1 as number)\n const p2 = toDisplay(x2 as number, y2 as number)\n const cx = (p1.dx + p2.dx) / 2\n const cy = (p1.dy + p2.dy) / 2\n\n // 선의 길이와 각도 계산\n const length = Math.sqrt(Math.pow(p2.dx - p1.dx, 2) + Math.pow(p2.dy - p1.dy, 2))\n const angle = Math.atan2(p2.dy - p1.dy, p2.dx - p1.dx) * (180 / Math.PI)\n\n return html`\n <!-- DIV로 그린 선 -->\n <div\n class=\"line-overlay\"\n style=\"\n left: ${p1.dx}px; \n top: ${p1.dy}px; \n width: ${length}px; \n height: 3px;\n transform: rotate(${angle}deg);\n \"\n ></div>\n <!-- 거리 라벨 -->\n ${this.analyzingError\n ? html`<div class=\"distance-label\" style=\"left:${cx}px; top:${cy}px;\">${this.analyzingError}</div>`\n : this.distance && this.unit\n ? html`<div class=\"distance-label\" style=\"left:${cx}px; top:${cy}px;\">${this.distance} ${this.unit}</div>`\n : ''}\n `\n })()\n : ''}\n `\n }\n\n private async _onAnalyzePhoto() {\n if (!this.frame) {\n console.warn('분석할 사진이 없습니다.')\n return\n }\n if (!this._hasTwoPoints()) {\n console.warn('두 점을 먼저 선택해 주세요.')\n return\n }\n\n try {\n this.analyzing = true\n const payload = {\n x1: this.selectedPoints.x1,\n y1: this.selectedPoints.y1,\n x2: this.selectedPoints.x2,\n y2: this.selectedPoints.y2,\n file_path: this.frame.file_path,\n calibration: this.frame.calibration\n }\n\n const form = new FormData()\n form.append('input', JSON.stringify(payload))\n const response = await fetch(`${this.KEYPOINT_RULER_API_BASE_URL}/api/run/keypoint-ruler`, {\n method: 'POST',\n headers: { Authorization: `Basic ${btoa('admin:admin1234')}` },\n body: form\n })\n\n const result = await response.json()\n const { distance, unit, error } = result.result || {}\n this.distance = distance\n this.unit = unit\n this.analyzingError = error\n } catch (error) {\n console.error('사진 분석 실패:', error)\n } finally {\n this.analyzing = false\n }\n }\n\n async _savePhoto() {\n if (!this.frame || !this._hasTwoPoints() || this.distance === null || !this.unit) {\n notify({ message: '분석 완료 후 저장할 수 있습니다.', level: 'warn' })\n return\n }\n\n const checklistId = this.buildingInspection?.checklist?.id\n let file: File\n try {\n file = await this.getCurrentImage()\n } catch (e) {\n notify({ message: '이미지 합성에 실패했습니다.', level: 'error' })\n return\n }\n\n const response = await client.mutate({\n mutation: gql`\n mutation ($attachments: [NewAttachment!]!) {\n createAttachments(attachments: $attachments) {\n id\n }\n }\n `,\n variables: {\n attachments: [{ file, refBy: checklistId, refType: 'Checklist', description: this.buildingInspection?.status }]\n },\n context: { hasUpload: true }\n })\n\n if (!response.errors) {\n notify({ message: '사진 대지를 저장하였습니다.', level: 'info' })\n return\n }\n\n return response.data.createAttachments\n }\n\n async getCurrentImage(): Promise<File> {\n if (!this.imageWrapperEl) {\n throw new Error('이미지 영역을 찾을 수 없습니다.')\n }\n\n try {\n // html2canvas로 .image-wrapper 영역 캡처\n const canvas = await html2canvas(this.imageWrapperEl, {\n backgroundColor: null, // 투명 배경\n scale: 1, // 1:1 스케일\n useCORS: true, // CORS 이미지 허용\n allowTaint: false, // 보안상 false\n logging: false // 로그 비활성화\n })\n\n // 캔버스를 Blob으로 변환\n const blob: Blob = await new Promise(resolve => {\n canvas.toBlob(resolve as any, 'image/png', 1.0)\n })\n\n // File 객체로 변환하여 반환\n return new File([blob!], `inspection_${Date.now()}.png`, {\n type: 'image/png'\n })\n } catch (error) {\n console.error('html2canvas 캡처 실패:', error)\n throw new Error('화면 캡처에 실패했습니다.')\n }\n }\n}\n"]}
1
+ {"version":3,"file":"building-inspection-detail-ai-measurement.js","sourceRoot":"","sources":["../../../client/pages/building-inspection/building-inspection-detail-ai-measurement.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4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AgB;sEAAA;AACjC;IAA7B,KAAK,CAAC,aAAa,CAAC;8BAAwB,gBAAgB;qEAAA;AA/UlD,+BAA+B;IAD3C,aAAa,CAAC,2CAA2C,CAAC;GAC9C,+BAA+B,CAoyB3C","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/input/ox-input-switch.js'\nimport '@operato/mini-map/ox-zoomable-image.js'\nimport '@material/web/progress/circular-progress.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, PropertyValues } from 'lit'\nimport { customElement, state, query } from 'lit/decorators.js'\nimport html2canvas from 'html2canvas'\n\nimport { PageView } from '@operato/shell'\nimport { CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view'\nimport { client } from '@operato/graphql'\nimport { notify } from '@operato/layout'\n\nimport './component/building-inspection-detail-header'\n\n@customElement('building-inspection-detail-ai-measurement')\nexport class BuildingInspectionAiMeasurement extends PageView {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n css`\n :host {\n display: grid;\n grid-template-rows: 75px 1fr;\n color: #4e5055;\n width: 100%;\n height: 100%;\n background-color: #f7f7f7;\n }\n\n div[body] {\n display: flex;\n justify-items: center;\n gap: var(--spacing-medium);\n margin: var(--spacing-medium);\n min-height: 0;\n }\n\n div[preview] {\n flex: 1;\n border: 2px solid #ddd;\n border-radius: 10px;\n\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 0;\n overflow: hidden;\n }\n\n div[preview] img {\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n }\n\n div[preview] video {\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n }\n\n div[preview] md-icon {\n --md-icon-size: 160px;\n }\n\n .loading-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 12px;\n }\n\n .loading-text {\n font-size: 14px;\n color: #666;\n }\n\n .frame-container {\n width: 100%;\n height: 100%;\n max-height: 100%;\n min-height: 0;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 12px;\n }\n\n .frames-header {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 12px;\n font-size: 20px;\n font-weight: 700;\n color: #333;\n text-align: center;\n padding-block: 8px;\n }\n\n .frames-count {\n font-size: 16px;\n color: #777;\n font-weight: 600;\n }\n\n .frames-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));\n gap: 12px;\n }\n\n .frame-item {\n border: 1px solid #ddd;\n border-radius: 8px;\n overflow: hidden;\n background: #fff;\n cursor: pointer;\n transition:\n box-shadow 0.2s,\n transform 0.1s;\n }\n\n .frame-item:hover {\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n transform: translateY(-1px);\n }\n\n .frame-item img {\n display: block;\n width: 100%;\n height: 120px;\n object-fit: cover;\n }\n\n .image-wrapper {\n position: relative;\n width: 100%;\n height: 100%;\n align-content: center;\n text-align: center;\n }\n\n .point-marker {\n position: absolute;\n width: 14px;\n height: 14px;\n border-radius: 50%;\n border: 2px solid #fff;\n transform: translate(-50%, -50%);\n pointer-events: none;\n box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25);\n }\n\n .point-1 {\n background-color: #e53935;\n }\n\n .point-2 {\n background-color: #1e88e5;\n }\n\n .line-overlay {\n position: absolute;\n pointer-events: none;\n background-color: #ff9800;\n transform-origin: left center;\n }\n\n .distance-label {\n position: absolute;\n background: rgba(0, 0, 0, 0.7);\n color: #fff;\n font-size: 14px;\n padding: 2px 6px;\n border-radius: 4px;\n transform: translate(-50%, -120%);\n pointer-events: none;\n white-space: nowrap;\n }\n\n div[controls] {\n width: 240px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n }\n\n div[action-buttons] {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n gap: 15px;\n }\n\n .switch-container {\n display: flex;\n align-items: center;\n gap: 10px;\n font-size: 24px;\n font-weight: bold;\n }\n\n ox-input-switch {\n --ox-simple-switch-fullwidth: 68px;\n --ox-simple-switch-fullheight: 34px;\n --ox-simple-switch-thumbnail-size: 34px;\n }\n\n .camera-controls {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 12px;\n }\n\n .camera-shutter {\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n position: relative;\n }\n\n .controls-title {\n font-size: 18px;\n font-weight: 700;\n color: #333;\n margin-bottom: 8px;\n text-align: center;\n }\n\n .camera-shutter md-icon {\n --md-icon-size: 100px;\n }\n\n .camera-shutter input {\n opacity: 0;\n width: 100%;\n height: 100%;\n position: absolute;\n left: 0;\n top: 0;\n cursor: pointer;\n }\n\n button {\n padding: 10px 20px;\n font-size: 16px;\n border-radius: 5px;\n border: none;\n cursor: pointer;\n }\n\n button.save {\n background-color: #4caf50;\n color: white;\n\n &:disabled {\n background-color: #ccc;\n cursor: default;\n }\n }\n\n button.retry {\n background-color: #f0ad4e;\n color: white;\n }\n\n button.photo {\n background-color: #1e88e5;\n color: white;\n\n &:disabled {\n background-color: #ccc;\n cursor: default;\n }\n }\n\n button.album-button {\n background-color: #9c27b0;\n color: white;\n font-size: 14px;\n padding: 8px 16px;\n border-radius: 5px;\n border: none;\n cursor: pointer;\n\n &:hover {\n background-color: #7b1fa2;\n }\n\n &:disabled {\n background-color: #ccc;\n cursor: default;\n }\n }\n\n .loading-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 12px;\n z-index: 2000;\n }\n\n .loading-overlay .loading-container {\n background: white;\n padding: 32px;\n border-radius: 12px;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);\n }\n `\n ]\n\n private KEYPOINT_RULER_API_BASE_URL: string = 'https://hatiolab-korea-uni.ettisoft.com'\n\n @state() project: any = {}\n @state() buildingInspection: any = {}\n @state() buildingInspectionId: string = ''\n @state() capturedVideoUrl: string | null = null\n @state() videoFile: File | null = null\n @state() frame: any | null = null\n @state() analyzing: boolean = false\n @state() selectedPoints: { x1: number | null; y1: number | null; x2: number | null; y2: number | null } = {\n x1: null,\n y1: null,\n x2: null,\n y2: null\n }\n @state() frameNaturalWidth: number = 0\n @state() frameNaturalHeight: number = 0\n @state() displayedImageRect: { width: number; height: number; left: number; top: number } | null = null\n @state() distance: number | null = null\n @state() unit: string | null = null\n @state() analyzingError: string | null = null\n\n @query('img#frameImage') private frameImageEl!: HTMLImageElement\n @query('div.image-wrapper') private imageWrapperEl!: HTMLDivElement\n @query('#cameraInput') private cameraInputEl!: HTMLInputElement\n @query('#albumInput') private albumInputEl!: HTMLInputElement\n\n get context() {\n return {\n title: '검측 관리 상세 - AI 거리 측정'\n }\n }\n\n render() {\n return html`\n <building-inspection-detail-header\n .buildingInspectionId=${this.buildingInspection?.id}\n .buildingLevelId=${this.buildingInspection?.buildingLevel?.id}\n .projectName=${this.project.name}\n .buildingName=${this.buildingInspection?.buildingLevel?.building?.name}\n .buildingLevelFloor=${this.buildingInspection?.buildingLevel?.floor}\n ></building-inspection-detail-header>\n\n <div body>\n <!-- Preview selected or recorded video -->\n <div preview>\n ${this.frame?.download_url\n ? html`\n <div class=\"image-wrapper\" @click=${this._onImageClick}>\n <img\n id=\"frameImage\"\n src=\"${this.KEYPOINT_RULER_API_BASE_URL + this.frame?.download_url}\"\n crossorigin=\"anonymous\"\n alt=\"frame\"\n loading=\"eager\"\n @load=${this._onImageLoad}\n />\n ${this._renderMarkers()}\n </div>\n `\n : // 동영상 선택 후 동영상 프리뷰\n this.capturedVideoUrl\n ? html`<video src=${this.capturedVideoUrl} controls playsinline></video>`\n : // 초기 상태, 동영상 선택 전\n html`<md-icon>videocam</md-icon>`}\n </div>\n\n <div controls>\n <span class=\"controls-title\">동영상 촬영</span>\n\n <!-- 가운데 버튼 -->\n ${this.frame?.download_url && this._hasTwoPoints() && this.distance && this.unit\n ? // 거리 측정 완료 시, 사진 저장 버튼 표시\n html`<button class=\"save\" ?disabled=${this.analyzing} @click=${this._savePhoto}>사진 저장</button>`\n : // 거리 측정 완료 전, 동영상 촬영 버튼 표시\n html`<div class=\"camera-controls\">\n <div class=\"camera-shutter\">\n <md-icon>camera</md-icon>\n <input id=\"cameraInput\" type=\"file\" accept=\"video/*\" capture=\"environment\" @change=\"${this._onVideoSelected}\" />\n </div>\n <button class=\"album-button\" @click=\"${this._onAlbumButtonClick}\">앨범 선택</button>\n <input id=\"albumInput\" type=\"file\" accept=\"video/*\" @change=\"${this._onVideoSelected}\" style=\"display: none;\" />\n </div>`}\n\n <!-- Action buttons -->\n <div action-buttons>\n ${this.frame\n ? html`\n <button class=\"photo\" ?disabled=${this.analyzing || !this._hasTwoPoints()} @click=${this._onAnalyzePhoto}>\n 사진 분석\n </button>\n `\n : html`\n <button class=\"save\" ?disabled=${this.analyzing || !this.capturedVideoUrl} @click=${this._onAnalyzeVideo}>\n 동영상 분석\n </button>\n `}\n <button class=\"retry\" @click=${this._onRetry}>초기화</button>\n </div>\n </div>\n </div>\n\n <!-- 전체 화면을 덮는 로딩 오버레이 -->\n ${this.analyzing\n ? html`<div class=\"loading-overlay\">\n <div class=\"loading-container\">\n <md-circular-progress indeterminate></md-circular-progress>\n <div class=\"loading-text\">분석 중...</div>\n </div>\n </div>`\n : ''}\n `\n }\n\n protected async updated(changes: PropertyValues): Promise<void> {}\n\n async pageUpdated(changes: any, lifecycle: PageLifecycle) {\n if (this.active) {\n this._onRetry()\n this.buildingInspectionId = lifecycle.resourceId || ''\n await this.initBuildingInspection(this.buildingInspectionId)\n }\n }\n\n async initBuildingInspection(buildingInspectionId: string = '') {\n const response = await client.query({\n query: gql`\n query BuildingInspection($buildingInspectionId: String!) {\n buildingInspection(id: $buildingInspectionId) {\n id\n status\n requestDate\n drawingMarker\n checklist {\n id\n location\n inspectionDrawingType\n }\n buildingLevel {\n id\n floor\n mainDrawing {\n id\n name\n fullpath\n }\n mainDrawingImage\n building {\n id\n name\n buildingComplex {\n id\n }\n }\n }\n }\n }\n `,\n variables: {\n buildingInspectionId\n }\n })\n\n if (response.errors) return\n\n this.buildingInspection = response.data.buildingInspection\n\n await this._getProjectByBuildingComplexId(this.buildingInspection?.buildingLevel?.building?.buildingComplex?.id)\n }\n\n private async _getProjectByBuildingComplexId(buildingComplexId) {\n const response = await client.query({\n query: gql`\n query ProjectByBuildingComplexId($buildingComplexId: String!) {\n project: projectByBuildingComplexId(buildingComplexId: $buildingComplexId) {\n id\n name\n }\n }\n `,\n variables: {\n buildingComplexId\n }\n })\n\n if (response.errors) return\n\n this.project = response.data.project\n }\n\n private _onVideoSelected(event: Event) {\n const input = event.target as HTMLInputElement\n const file = input?.files?.[0]\n if (!file) return\n\n // Only allow video files\n if (!file.type.startsWith('video/')) {\n console.warn('선택된 파일이 동영상이 아닙니다.')\n return\n }\n\n // Revoke old object URL if exists\n if (this.capturedVideoUrl) {\n URL.revokeObjectURL(this.capturedVideoUrl)\n }\n\n this.videoFile = file\n this.capturedVideoUrl = URL.createObjectURL(file)\n }\n\n private _onAlbumButtonClick() {\n // 앨범 선택을 위해 숨겨진 input을 클릭\n this.albumInputEl?.click()\n }\n\n private async _onAnalyzeVideo() {\n if (!this.videoFile) {\n console.warn('선택된 동영상이 없습니다.')\n return\n }\n\n try {\n this.analyzing = true\n const form = new FormData()\n form.append('files', this.videoFile, this.videoFile.name)\n const response = await fetch(`${this.KEYPOINT_RULER_API_BASE_URL}/api/run/keypoint-ruler`, {\n method: 'POST',\n headers: { Authorization: `Basic ${btoa('admin:admin1234')}` },\n body: form\n })\n\n const data = await response.json()\n\n this.frame = {\n file_id: data?.result?.output_files[0]?.file_id,\n download_url: data?.result?.output_files[0]?.download_url,\n file_path: data?.result?.frames[0]?.file_path,\n calibration: data?.result?.calibration\n }\n } catch (error) {\n console.error('동영상 업로드 실패:', error)\n } finally {\n this.analyzing = false\n }\n }\n\n private _onRetry() {\n // Clear current selection and reopen camera\n if (this.capturedVideoUrl) {\n URL.revokeObjectURL(this.capturedVideoUrl)\n }\n this.capturedVideoUrl = null\n this.videoFile = null\n this.frame = null\n this.selectedPoints = { x1: null, y1: null, x2: null, y2: null }\n this.displayedImageRect = null\n this.frameNaturalWidth = 0\n this.frameNaturalHeight = 0\n this.cameraInputEl.value = ''\n this.albumInputEl.value = ''\n this.distance = null\n this.unit = null\n this.analyzingError = null\n }\n\n private _onImageLoad = () => {\n if (!this.frameImageEl || !this.imageWrapperEl) return\n const img = this.frameImageEl\n const wrapperRect = this.imageWrapperEl.getBoundingClientRect()\n const imgRect = img.getBoundingClientRect()\n this.frameNaturalWidth = img.naturalWidth\n this.frameNaturalHeight = img.naturalHeight\n this.displayedImageRect = {\n width: imgRect.width,\n height: imgRect.height,\n left: imgRect.left - wrapperRect.left,\n top: imgRect.top - wrapperRect.top\n }\n }\n\n private _onImageClick = (event: MouseEvent) => {\n if (!this.frameImageEl || !this.imageWrapperEl) return\n const imgRect = this.frameImageEl.getBoundingClientRect()\n const wrapperRect = this.imageWrapperEl.getBoundingClientRect()\n const clientX = event.clientX\n const clientY = event.clientY\n\n // Ignore clicks outside the displayed image area\n if (clientX < imgRect.left || clientX > imgRect.right || clientY < imgRect.top || clientY > imgRect.bottom) {\n return\n }\n\n // 새로운 마크 입력 시 이전 거리/단위 결과 초기화\n this.distance = null\n this.unit = null\n this.analyzingError = null\n\n const relativeX = clientX - imgRect.left\n const relativeY = clientY - imgRect.top\n\n const xOnNatural = Math.round((relativeX * this.frameNaturalWidth) / imgRect.width)\n const yOnNatural = Math.round((relativeY * this.frameNaturalHeight) / imgRect.height)\n\n if (this.selectedPoints.x1 === null || this.selectedPoints.y1 === null) {\n this.selectedPoints = { ...this.selectedPoints, x1: xOnNatural, y1: yOnNatural }\n } else if (this.selectedPoints.x2 === null || this.selectedPoints.y2 === null) {\n this.selectedPoints = { ...this.selectedPoints, x2: xOnNatural, y2: yOnNatural }\n } else {\n // 세 번째 클릭부터는 초기화 후 첫 점으로 설정\n this.selectedPoints = { x1: xOnNatural, y1: yOnNatural, x2: null, y2: null }\n }\n\n // Update displayed rect cache (in case layout changed)\n this.displayedImageRect = {\n width: imgRect.width,\n height: imgRect.height,\n left: imgRect.left - wrapperRect.left,\n top: imgRect.top - wrapperRect.top\n }\n }\n\n private _hasTwoPoints(): boolean {\n const { x1, y1, x2, y2 } = this.selectedPoints\n return x1 !== null && y1 !== null && x2 !== null && y2 !== null\n }\n\n private _renderMarkers() {\n if (!this.displayedImageRect) return html``\n const { left, top, width, height } = this.displayedImageRect\n const { x1, y1, x2, y2 } = this.selectedPoints\n const toDisplay = (x: number, y: number) => {\n const dx = left + (x * width) / (this.frameNaturalWidth || 1)\n const dy = top + (y * height) / (this.frameNaturalHeight || 1)\n return { dx, dy }\n }\n\n return html`\n <!-- 첫 번째 점 -->\n ${x1 !== null && y1 !== null\n ? (() => {\n const p = toDisplay(x1, y1)\n return html`<div class=\"point-marker point-1\" style=\"left:${p.dx}px; top:${p.dy}px;\"></div>`\n })()\n : ''}\n <!-- 두 번째 점 -->\n ${x2 !== null && y2 !== null\n ? (() => {\n const p = toDisplay(x2, y2)\n return html`<div class=\"point-marker point-2\" style=\"left:${p.dx}px; top:${p.dy}px;\"></div>`\n })()\n : ''}\n <!-- 두점 사이 선 -->\n ${this._hasTwoPoints()\n ? (() => {\n const p1 = toDisplay(x1 as number, y1 as number)\n const p2 = toDisplay(x2 as number, y2 as number)\n const cx = (p1.dx + p2.dx) / 2\n const cy = (p1.dy + p2.dy) / 2\n\n // 선의 길이와 각도 계산\n const length = Math.sqrt(Math.pow(p2.dx - p1.dx, 2) + Math.pow(p2.dy - p1.dy, 2))\n const angle = Math.atan2(p2.dy - p1.dy, p2.dx - p1.dx) * (180 / Math.PI)\n\n return html`\n <!-- DIV로 그린 선 -->\n <div\n class=\"line-overlay\"\n style=\"\n left: ${p1.dx}px; \n top: ${p1.dy}px; \n width: ${length}px; \n height: 3px;\n transform: rotate(${angle}deg);\n \"\n ></div>\n <!-- 거리 라벨 -->\n ${this.analyzingError\n ? html`<div class=\"distance-label\" style=\"left:${cx}px; top:${cy}px;\">${this.analyzingError}</div>`\n : this.distance && this.unit\n ? html`<div class=\"distance-label\" style=\"left:${cx}px; top:${cy}px;\">${this.distance} ${this.unit}</div>`\n : ''}\n `\n })()\n : ''}\n `\n }\n\n private async _onAnalyzePhoto() {\n if (!this.frame) {\n console.warn('분석할 사진이 없습니다.')\n return\n }\n if (!this._hasTwoPoints()) {\n console.warn('두 점을 먼저 선택해 주세요.')\n return\n }\n\n try {\n this.analyzing = true\n const payload = {\n x1: this.selectedPoints.x1,\n y1: this.selectedPoints.y1,\n x2: this.selectedPoints.x2,\n y2: this.selectedPoints.y2,\n file_path: this.frame.file_path,\n calibration: this.frame.calibration\n }\n\n const form = new FormData()\n form.append('input', JSON.stringify(payload))\n const response = await fetch(`${this.KEYPOINT_RULER_API_BASE_URL}/api/run/keypoint-ruler`, {\n method: 'POST',\n headers: { Authorization: `Basic ${btoa('admin:admin1234')}` },\n body: form\n })\n\n const result = await response.json()\n const { distance, unit, error } = result.result || {}\n this.distance = distance\n this.unit = unit\n this.analyzingError = error\n } catch (error) {\n console.error('사진 분석 실패:', error)\n } finally {\n this.analyzing = false\n }\n }\n\n async _savePhoto() {\n if (!this.frame || !this._hasTwoPoints() || this.distance === null || !this.unit) {\n notify({ message: '분석 완료 후 저장할 수 있습니다.', level: 'warn' })\n return\n }\n\n const checklistId = this.buildingInspection?.checklist?.id\n let file: File\n try {\n file = await this.getCurrentImage()\n } catch (e) {\n notify({ message: '이미지 합성에 실패했습니다.', level: 'error' })\n return\n }\n\n const response = await client.mutate({\n mutation: gql`\n mutation ($attachments: [NewAttachment!]!) {\n createAttachments(attachments: $attachments) {\n id\n }\n }\n `,\n variables: {\n attachments: [{ file, refBy: checklistId, refType: 'Checklist', description: this.buildingInspection?.status }]\n },\n context: { hasUpload: true }\n })\n\n if (!response.errors) {\n notify({ message: '사진 대지를 저장하였습니다.', level: 'info' })\n return\n }\n\n return response.data.createAttachments\n }\n\n async getCurrentImage(): Promise<File> {\n if (!this.imageWrapperEl) {\n throw new Error('이미지 영역을 찾을 수 없습니다.')\n }\n\n try {\n // html2canvas로 .image-wrapper 영역 캡처\n const canvas = await html2canvas(this.imageWrapperEl, {\n backgroundColor: null, // 투명 배경\n scale: 1, // 1:1 스케일\n useCORS: true, // CORS 이미지 허용\n allowTaint: false, // 보안상 false\n logging: false // 로그 비활성화\n })\n\n // 캔버스를 Blob으로 변환\n const blob: Blob = await new Promise(resolve => {\n canvas.toBlob(resolve as any, 'image/png', 1.0)\n })\n\n // File 객체로 변환하여 반환\n return new File([blob!], `inspection_${Date.now()}.png`, {\n type: 'image/png'\n })\n } catch (error) {\n console.error('html2canvas 캡처 실패:', error)\n throw new Error('화면 캡처에 실패했습니다.')\n }\n }\n}\n"]}
@@ -46,7 +46,7 @@ export declare class BuildingInspectionGridDetail extends BuildingInspectionGrid
46
46
  _onClickCreateInspection(): void;
47
47
  _onClickUpdateInspection(initialTab?: number): void;
48
48
  refresh(buildingInspectionId?: string): Promise<void>;
49
- _getIconHtmlByStatus(status: string): import("lit-html").TemplateResult<1> | "";
49
+ _getIconHtmlByStatus(status: string): "" | import("lit-html").TemplateResult<1>;
50
50
  private _groupInspectionsByCell;
51
51
  private _openListLayer;
52
52
  private _closeListLayer;
@@ -340,7 +340,7 @@ let GridInspectionCreatePopup = class GridInspectionCreatePopup extends LitEleme
340
340
  id
341
341
  sequence
342
342
  name
343
- inspctionCriteria
343
+ inspctionCriteria: inspctionCriteriaText
344
344
  mainType
345
345
  detailType
346
346
  }
@@ -1 +1 @@
1
- {"version":3,"file":"grid-inspection-create-popup.js","sourceRoot":"","sources":["../../../../client/pages/building-inspection-grid/component/grid-inspection-create-popup.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,iCAAiC,CAAA;AAExC,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AA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AAE;;4DAAuC;AAED;IAA7C,KAAK,CAAC,qCAAqC,CAAC;;8EAA4B;AAC5B;IAA5C,KAAK,CAAC,oCAAoC,CAAC;;6EAA2B;AACpB;IAAlD,KAAK,CAAC,0CAA0C,CAAC;;mFAAiC;AAChE;IAAlB,KAAK,CAAC,UAAU,CAAC;8BAAS,SAAS;wDAAA;AAEb;IAAtB,KAAK,CAAC,cAAc,CAAC;8BAA0B,cAAc;yEAAA;AACrC;IAAxB,KAAK,CAAC,gBAAgB,CAAC;8BAAiB,WAAW;gEAAA;AArKhD,yBAAyB;IAD9B,aAAa,CAAC,8BAA8B,CAAC;GACxC,yBAAyB,CA4qB9B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist/ox-grist.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { DataGrist } from '@operato/data-grist/ox-grist.js'\nimport { client } from '@operato/graphql'\nimport { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles'\nimport { notify } from '@operato/layout'\nimport { BuildingInspectionStatus, CHECKLIST_MAIN_TYPE_LIST } from '../../building-inspection/building-inspection-list'\nimport { ChecklistMode, ProjectType } from '../../checklist/checklist-view'\n\n@customElement('grid-inspection-create-popup')\nclass GridInspectionCreatePopup extends LitElement {\n static styles = [\n ButtonContainerStyles,\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n padding: 15px 20px;\n\n background-color: var(--md-sys-color-surface);\n }\n\n md-filled-select {\n width: auto;\n min-width: 150px;\n --md-filled-select-text-field-container-color: transparent;\n --md-filled-select-text-field-active-indicator-color: #999;\n --md-filled-select-text-field-input-text-size: 14px;\n --md-filled-select-text-field-input-text-weight: bold;\n --md-filled-select-text-field-input-text-line-height: 6px;\n }\n md-filled-select[level] {\n min-width: 110px;\n margin-left: 20px;\n }\n\n checklist-view {\n pointer-events: none;\n transform-origin: top left;\n }\n\n div[body] {\n height: 100%;\n overflow-y: auto;\n\n div[tab-container][inactive] {\n display: none !important;\n }\n\n div[edit] {\n width: 100%;\n\n div[detail] {\n margin-bottom: 30px;\n }\n\n h3 {\n position: relative;\n color: #0595e5;\n font-size: 17px;\n font-weight: 700;\n background-color: var(--md-sys-color-surface);\n margin-top: 0;\n margin-bottom: 5px;\n }\n\n div[data-row] {\n display: grid;\n grid-template-columns: 100px 1fr 0.3fr 100px 1fr;\n gap: 15px;\n margin-bottom: 11px;\n\n & > label {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n font-size: 15px;\n }\n\n div[inspection-parts] {\n display: block;\n margin-top: 7px;\n\n & > span {\n display: inline-block;\n margin-right: 5px;\n margin-bottom: 5px;\n\n & > md-checkbox {\n margin-top: 2px;\n }\n }\n }\n }\n }\n\n div[preview] {\n display: flex;\n overflow-y: auto;\n overflow-x: hidden;\n }\n }\n\n div[tabs] {\n display: flex;\n\n button {\n background-color: #fff;\n padding: 6px 14px;\n color: #999;\n border: solid 1px #999;\n border-top: none;\n border-radius: 0px 0px 8px 8px;\n margin-right: -2px;\n cursor: pointer;\n\n &[active] {\n color: var(--button-color, var(--md-sys-color-on-secondary-container));\n font-weight: 600;\n }\n }\n }\n\n div[button-container] {\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n\n md-elevated-button[blue] {\n --md-elevated-button-container-color: #0595e5;\n\n --md-elevated-button-label-text-color: #fff;\n --md-elevated-button-hover-label-text-color: #fff;\n --md-elevated-button-pressed-label-text-color: #fff;\n --md-elevated-button-focus-label-text-color: #fff;\n --md-elevated-button-icon-color: #fff;\n --md-elevated-button-hover-icon-color: #fff;\n --md-elevated-button-pressed-icon-color: #fff;\n --md-elevated-button-focus-icon-color: #fff;\n }\n }\n `\n ]\n\n @property({ type: Object }) gristConfig: any\n @property({ type: Object }) checklistDetailTypes: any\n @property({ type: String }) projectId: string = ''\n @property({ type: String }) checklistTemplateId: string = ''\n @property({ type: String }) selectedBuildingId: string = ''\n @property({ type: String }) selectedBuildingLevelId: string = ''\n @property({ type: String }) cell: string = ''\n\n @state() buildings: any = []\n @state() selectedBuilding: any = {}\n @state() selectedLevel: any = {}\n\n @state() constructionTypes: any = []\n @state() selectedConstructionType: any = {}\n @state() selectedConstructionDetailType: any = {}\n\n @state() managers: any = []\n @state() selectedManager: any = {}\n\n @state() checklistTemplates: any = []\n @state() checklist: any = {}\n\n @state() activeTab: 'edit' | 'preview' = 'edit'\n\n @query('md-filled-select[checklistTemplate]') htmlSelectChecklistTemplate\n @query('md-filled-select[constructionType]') htmlSelectConstructionType\n @query('md-filled-select[constructionDetailType]') htmlSelectConstructionDetailType\n @query('ox-grist') grist!: DataGrist\n\n @query('div[preview]') checklistViewContainer!: HTMLDivElement\n @query('checklist-view') checklistView!: HTMLElement\n\n render() {\n return html`\n <div body>\n <div tab-container ?inactive=${this.activeTab !== 'edit'} edit>\n <div detail>\n <h3>세부 정보</h3>\n\n <div data-row>\n <label>공종</label>\n <md-filled-select constructionType @change=${this._onSelectConstructionType}>\n ${this.constructionTypes?.map(constructionType => {\n const selected = constructionType.id === this.selectedConstructionType?.id\n return html`<md-select-option ?selected=${selected} .value=${constructionType.id}>\n <div slot=\"headline\">${constructionType.name}</div>\n </md-select-option>`\n })}\n </md-filled-select>\n\n <div partition></div>\n\n <label>세부 공종</label>\n <md-filled-select constructionDetailType @change=${this._onSelectConstructionDetailType}>\n ${this.selectedConstructionType?.constructionDetailTypes?.map(constructionDetailType => {\n const selected = constructionDetailType.id === this.selectedConstructionDetailType.id\n return html`<md-select-option ?selected=${selected} .value=${constructionDetailType.id}>\n <div slot=\"headline\">${constructionDetailType.name}</div>\n </md-select-option>`\n })}\n </md-filled-select>\n </div>\n\n <div data-row>\n <label>동</label>\n <md-filled-text-field building name=\"buildingName\" type=\"text\" .value=${this.selectedBuilding?.name || ''} disabled>\n </md-filled-text-field>\n\n <div partition></div>\n\n <label>층</label>\n <md-filled-text-field\n level\n name=\"buildingLevelName\"\n type=\"text\"\n .value=${this.selectedLevel?.floorDisplayName || ''}\n disabled\n >\n </md-filled-text-field>\n </div>\n </div>\n\n <div checklist>\n <h3>체크리스트</h3>\n\n <div data-row>\n <label>이름</label>\n <md-filled-text-field\n name=\"checklistName\"\n type=\"text\"\n .value=${this.checklist?.name || ''}\n @input=${this._onInputChange}\n >\n </md-filled-text-field>\n\n <div partition></div>\n\n <label>템플릿</label>\n <md-filled-select checklistTemplate @change=${this._onSelectChecklistTemplate}>\n <md-select-option></md-select-option>\n ${this.checklistTemplates?.map((checklistTemplate, idx) => {\n return html` <md-select-option .value=${checklistTemplate.id}>\n <div slot=\"headline\">${checklistTemplate.name}</div>\n </md-select-option>`\n })}\n </md-filled-select>\n </div>\n </div>\n\n <div manager>\n <h3>담당자</h3>\n\n <div data-row>\n <label>담당자</label>\n <md-filled-select manager @change=${this._onSelectManager}>\n <md-select-option></md-select-option>\n ${this.managers?.map((manager, idx) => {\n return html` <md-select-option .value=${manager.userId}>\n <div slot=\"headline\">${manager.name}</div>\n </md-select-option>`\n })}\n </md-filled-select>\n </div>\n </div>\n\n <ox-grist\n .mode=${'GRID'}\n .config=${this.gristConfig}\n .fetchHandler=${this.fetchHandler.bind(this)}\n @field-change=${this.onChangeGird}\n >\n </ox-grist>\n </div>\n\n <div tab-container ?inactive=${this.activeTab !== 'preview'} preview>\n <checklist-view\n .mode=${ChecklistMode.VIEWER}\n .checklist=${this.checklist}\n .manager=${this.selectedManager || {}}\n .projectType=${ProjectType.DSSP}\n ></checklist-view>\n </div>\n </div>\n\n <div tabs>\n <button ?active=${this.activeTab === 'edit'} @click=${() => (this.activeTab = 'edit')}>검측 요청 정보</button>\n <button ?active=${this.activeTab === 'preview'} @click=${() => (this.activeTab = 'preview')}>미리보기</button>\n </div>\n\n <div button-container>\n <md-elevated-button blue @click=${this._createInspection}>\n <md-icon slot=\"icon\">task</md-icon>검측 요청서 등록\n </md-elevated-button>\n <md-elevated-button @click=${this._close}> <md-icon slot=\"icon\">cancel</md-icon>취소</md-elevated-button>\n </div>\n `\n }\n\n updated() {\n const ratio = Math.round((this.checklistViewContainer?.offsetWidth / this.checklistView?.offsetWidth) * 100) / 100 || 1\n this.checklistView.style.transform = `scale(${ratio})`\n }\n\n async firstUpdated() {\n const response = await client.query({\n query: gql`\n query Project($id: String!) {\n project(id: $id) {\n id\n name\n documentNaming\n buildingComplex {\n id\n buildings {\n id\n name\n }\n }\n }\n\n constructionTypes {\n items {\n name\n id\n }\n }\n\n checklistTemplates {\n items {\n id\n name\n }\n }\n\n checklistTypes {\n items {\n id\n mainType\n detailType\n }\n }\n\n managers {\n id\n phone\n position\n userId\n name\n }\n }\n `,\n variables: {\n id: this.projectId\n }\n })\n\n if (response.errors) return\n\n const project = response.data?.project\n const checklistTemplates = response.data?.checklistTemplates?.items || []\n const constructionTypes = response.data?.constructionTypes?.items || []\n\n this.managers = response.data?.managers\n this.checklistDetailTypes = response.data.checklistTypes?.items?.map(v => {\n return {\n display: v.detailType,\n value: v.id,\n mainType: v.mainType\n }\n })\n\n this.constructionTypes = [...constructionTypes]\n this.checklistTemplates = [...checklistTemplates]\n this.buildings = [...(project?.buildingComplex?.buildings || [])]\n\n // selectedBuildingId가 있으면 해당 빌딩 선택, 없으면 첫번째 빌딩 선택\n this.selectedBuilding = this.buildings.find(building => building.id == this.selectedBuildingId)\n this.selectedBuilding = await this._getBuilding(this.selectedBuilding.id)\n this.selectedConstructionType = constructionTypes?.[0]\n\n // selectedBuildingLevelId가 있으면 선택된 층, 없으면 첫번째 층 선택\n this.selectedLevel = this.selectedBuilding?.buildingLevels?.find(level => level.id == this.selectedBuildingLevelId)\n\n // 세부 공종 리스트 가져오기\n this.selectedConstructionType = await this._getConstructionType(this.selectedConstructionType.id)\n this.selectedConstructionDetailType = this.selectedConstructionType?.constructionDetailTypes?.[0]\n this.selectedConstructionType = await { ...this.selectedConstructionType }\n\n // 기본 값 셋팅 select\n await this.htmlSelectChecklistTemplate.selectIndex(0)\n await this.htmlSelectConstructionDetailType.selectIndex(0)\n\n this.checklist = {\n constructionType: this.selectedConstructionType?.name,\n constructionDetailType: this.selectedConstructionDetailType?.name,\n location: `${this.selectedBuilding?.name || ''} ${this.selectedLevel.floorDisplayName || ''}층`,\n documentNo: `${project.documentNaming} 검측 제01-00000호`,\n buildingInspection: {\n status: BuildingInspectionStatus.WAIT\n }\n }\n\n // 그리드 셋팅\n this.setGristConfig()\n }\n\n requestRefresh(buildingInspectionId: string = '') {\n this.dispatchEvent(new CustomEvent('requestRefresh', { detail: { buildingInspectionId } }))\n }\n\n private _close() {\n history.back()\n }\n\n setGristConfig() {\n this.gristConfig = {\n columns: [\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'arrow_upward',\n handlers: {\n click: 'move-up'\n }\n },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'arrow_downward',\n handlers: {\n click: 'move-down'\n }\n },\n {\n type: 'select',\n name: 'mainType',\n header: '구분',\n record: {\n editable: true,\n options: [{ display: '', value: '' }].concat(\n Object.keys(CHECKLIST_MAIN_TYPE_LIST).map(key => ({ display: CHECKLIST_MAIN_TYPE_LIST[key], value: key }))\n )\n },\n width: 100\n },\n {\n type: 'select',\n name: 'detailType',\n header: '상세 구분',\n record: {\n editable: true,\n options: (columns, data, column) => [\n { display: '', value: '' },\n ...this.checklistDetailTypes.filter(v => v.mainType == column.mainType)\n ]\n },\n width: 200\n },\n {\n type: 'string',\n name: 'name',\n header: '검사 항목',\n record: {\n editable: true\n },\n width: 200\n },\n {\n type: 'string',\n name: 'inspctionCriteria',\n header: '검사 기준',\n record: {\n editable: true\n },\n width: 200\n }\n ],\n pagination: {\n infinite: true\n },\n sorters: [{ name: 'mainType' }, { name: 'sequence' }]\n }\n }\n\n async fetchHandler() {\n if (!this.checklistTemplateId) return []\n\n const response = await client.query({\n query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {\n checklistTemplateItems(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n sequence\n name\n inspctionCriteria\n mainType\n detailType\n }\n }\n }\n `,\n variables: {\n filters: {\n name: 'checklistTemplateId',\n value: this.checklistTemplateId,\n operator: 'eq'\n },\n sortings: [{ name: 'mainType' }, { name: 'sequence' }]\n }\n })\n\n // 체크리스트 아이템 데이터 갱신\n this.onChangeGird()\n\n return {\n records: response.data.checklistTemplateItems.items || []\n }\n }\n\n async _getBuilding(buildingId: string = '') {\n const response = await client.query({\n query: gql`\n query Building($id: String!) {\n building(id: $id) {\n id\n name\n buildingLevels {\n id\n floor\n floorDisplayName\n mainDrawing {\n id\n name\n fullpath\n }\n mainDrawingImage\n }\n }\n }\n `,\n variables: {\n id: buildingId\n }\n })\n\n if (response.errors) return\n\n return response.data?.building || {}\n }\n\n private _onSelectChecklistTemplate(e) {\n const checklistTemplateId = e.target.value\n\n // 체크 리스트 이름 셋팅\n this.checklist = { ...this.checklist, name: e.target.displayText }\n\n // 그리드 아이템 셋팅\n if (checklistTemplateId) {\n this.checklistTemplateId = checklistTemplateId\n this.grist.fetch()\n }\n }\n\n private _onSelectManager(e) {\n const managerId = e.target.value\n this.selectedManager = this.managers.find(manager => manager.userId == managerId)\n }\n\n async _createInspection() {\n let patch: any = {}\n\n patch.buildingLevelId = this.selectedLevel.id\n patch.managerId = this.selectedManager.userId\n patch.checklist = {\n name: this.checklist.name,\n constructionType: this.htmlSelectConstructionType.displayText,\n constructionDetailType: this.htmlSelectConstructionDetailType.displayText,\n location: `${this.selectedBuilding.name} ${this.selectedLevel.floorDisplayName}층`,\n inspectionParts: this.checklist.inspectionParts\n }\n patch.checklistItem = this.checklist.checklistItems?.map(item => {\n return {\n name: item.name,\n mainType: item.mainType,\n detailType: item.detailType,\n inspctionCriteria: item.inspctionCriteria\n }\n })\n\n const [cellX, cellY] = this.cell.split(',')\n patch.cellX = Number(cellX)\n patch.cellY = Number(cellY)\n\n const response = await client.mutate({\n mutation: gql`\n mutation CreateBuildingInspection($patch: NewBuildingInspection!) {\n createBuildingInspection(patch: $patch) {\n id\n }\n }\n `,\n variables: {\n patch\n }\n })\n\n if (!response.errors) {\n notify({ message: '검측 요청서를 등록하였습니다.' })\n this.requestRefresh(response.data.createBuildingInspection.id)\n this._close()\n } else {\n notify({ message: response.errors?.[0]?.message || '검측 요청서 등록에 실패하였습니다.', level: 'error' })\n }\n }\n\n // Input 요소의 값이 변경될 때 호출되는 콜백 함수\n private _onInputChange(event: InputEvent) {\n const target = event.target as HTMLInputElement\n this[target.name] = target.value\n this.checklist = { ...this.checklist, name: target.value }\n }\n\n // 체크리스트 아이템 데이터 갱신\n private onChangeGird() {\n const checklistDetailTypes = Object.fromEntries(this.checklistDetailTypes.map(item => [item.value, item.display]))\n const grist = this.grist\n\n // grist field-change가 오는 시점이 데이터 변경 전이라 setTimeout으로 변경\n setTimeout(() => {\n this.checklist.checklistItems = grist.dirtyData.records.map((row, idx) => {\n return {\n ...row,\n detailType: checklistDetailTypes[row.detailType],\n sequence: idx\n }\n })\n this.checklist = { ...this.checklist }\n }, 100)\n }\n\n private async _onSelectConstructionType(e) {\n const constructionTypeId = e.target.value\n this.selectedConstructionType = await this._getConstructionType(constructionTypeId)\n this.selectedConstructionDetailType = await { ...this.selectedConstructionType?.constructionDetailTypes?.[0] }\n this.checklist = {\n ...this.checklist,\n constructionType: this.selectedConstructionType?.name,\n constructionDetailType: this.selectedConstructionDetailType?.name\n }\n\n await this.htmlSelectConstructionDetailType.selectIndex(0)\n }\n\n private _onSelectConstructionDetailType(e) {\n const constructionDetailTypeId = e.target.value\n this.selectedConstructionDetailType = {\n ...(this.selectedConstructionType?.constructionDetailTypes?.find(v => v.id == constructionDetailTypeId) || {})\n }\n this.checklist = {\n ...this.checklist,\n constructionType: this.selectedConstructionType?.name,\n constructionDetailType: this.selectedConstructionDetailType?.name\n }\n }\n\n async _getConstructionType(id: string = '') {\n const response = await client.query({\n query: gql`\n query ConstructionType($id: String!) {\n constructionType(id: $id) {\n id\n name\n description\n constructionDetailTypes {\n id\n name\n }\n }\n }\n `,\n variables: { id }\n })\n\n if (response.errors) return\n\n return response.data?.constructionType || {}\n }\n}\n"]}
1
+ {"version":3,"file":"grid-inspection-create-popup.js","sourceRoot":"","sources":["../../../../client/pages/building-inspection-grid/component/grid-inspection-create-popup.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,iCAAiC,CAAA;AAExC,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAA;AAIvH,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,UAAU;IAAlD;;QAyI8B,cAAS,GAAW,EAAE,CAAA;QACtB,wBAAmB,GAAW,EAAE,CAAA;QAChC,uBAAkB,GAAW,EAAE,CAAA;QAC/B,4BAAuB,GAAW,EAAE,CAAA;QACpC,SAAI,GAAW,EAAE,CAAA;QAEpC,cAAS,GAAQ,EAAE,CAAA;QACnB,qBAAgB,GAAQ,EAAE,CAAA;QAC1B,kBAAa,GAAQ,EAAE,CAAA;QAEvB,sBAAiB,GAAQ,EAAE,CAAA;QAC3B,6BAAwB,GAAQ,EAAE,CAAA;QAClC,mCAA8B,GAAQ,EAAE,CAAA;QAExC,aAAQ,GAAQ,EAAE,CAAA;QAClB,oBAAe,GAAQ,EAAE,CAAA;QAEzB,uBAAkB,GAAQ,EAAE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4DAAoB;AACnB;IAAR,KAAK,EAAE;;mEAA2B;AAC1B;IAAR,KAAK,EAAE;;gEAAwB;AAEvB;IAAR,KAAK,EAAE;;oEAA4B;AAC3B;IAAR,KAAK,EAAE;;2EAAmC;AAClC;IAAR,KAAK,EAAE;;iFAAyC;AAExC;IAAR,KAAK,EAAE;;2DAAmB;AAClB;IAAR,KAAK,EAAE;;kEAA0B;AAEzB;IAAR,KAAK,EAAE;;qEAA6B;AAC5B;IAAR,KAAK,EAAE;;4DAAoB;AAEnB;IAAR,KAAK,EAAE;;4DAAuC;AAED;IAA7C,KAAK,CAAC,qCAAqC,CAAC;;8EAA4B;AAC5B;IAA5C,KAAK,CAAC,oCAAoC,CAAC;;6EAA2B;AACpB;IAAlD,KAAK,CAAC,0CAA0C,CAAC;;mFAAiC;AAChE;IAAlB,KAAK,CAAC,UAAU,CAAC;8BAAS,SAAS;wDAAA;AAEb;IAAtB,KAAK,CAAC,cAAc,CAAC;8BAA0B,cAAc;yEAAA;AACrC;IAAxB,KAAK,CAAC,gBAAgB,CAAC;8BAAiB,WAAW;gEAAA;AArKhD,yBAAyB;IAD9B,aAAa,CAAC,8BAA8B,CAAC;GACxC,yBAAyB,CA4qB9B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist/ox-grist.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { DataGrist } from '@operato/data-grist/ox-grist.js'\nimport { client } from '@operato/graphql'\nimport { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles'\nimport { notify } from '@operato/layout'\nimport { BuildingInspectionStatus, CHECKLIST_MAIN_TYPE_LIST } from '../../building-inspection/building-inspection-list'\nimport { ChecklistMode, ProjectType } from '../../checklist/checklist-view'\n\n@customElement('grid-inspection-create-popup')\nclass GridInspectionCreatePopup extends LitElement {\n static styles = [\n ButtonContainerStyles,\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n padding: 15px 20px;\n\n background-color: var(--md-sys-color-surface);\n }\n\n md-filled-select {\n width: auto;\n min-width: 150px;\n --md-filled-select-text-field-container-color: transparent;\n --md-filled-select-text-field-active-indicator-color: #999;\n --md-filled-select-text-field-input-text-size: 14px;\n --md-filled-select-text-field-input-text-weight: bold;\n --md-filled-select-text-field-input-text-line-height: 6px;\n }\n md-filled-select[level] {\n min-width: 110px;\n margin-left: 20px;\n }\n\n checklist-view {\n pointer-events: none;\n transform-origin: top left;\n }\n\n div[body] {\n height: 100%;\n overflow-y: auto;\n\n div[tab-container][inactive] {\n display: none !important;\n }\n\n div[edit] {\n width: 100%;\n\n div[detail] {\n margin-bottom: 30px;\n }\n\n h3 {\n position: relative;\n color: #0595e5;\n font-size: 17px;\n font-weight: 700;\n background-color: var(--md-sys-color-surface);\n margin-top: 0;\n margin-bottom: 5px;\n }\n\n div[data-row] {\n display: grid;\n grid-template-columns: 100px 1fr 0.3fr 100px 1fr;\n gap: 15px;\n margin-bottom: 11px;\n\n & > label {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n font-size: 15px;\n }\n\n div[inspection-parts] {\n display: block;\n margin-top: 7px;\n\n & > span {\n display: inline-block;\n margin-right: 5px;\n margin-bottom: 5px;\n\n & > md-checkbox {\n margin-top: 2px;\n }\n }\n }\n }\n }\n\n div[preview] {\n display: flex;\n overflow-y: auto;\n overflow-x: hidden;\n }\n }\n\n div[tabs] {\n display: flex;\n\n button {\n background-color: #fff;\n padding: 6px 14px;\n color: #999;\n border: solid 1px #999;\n border-top: none;\n border-radius: 0px 0px 8px 8px;\n margin-right: -2px;\n cursor: pointer;\n\n &[active] {\n color: var(--button-color, var(--md-sys-color-on-secondary-container));\n font-weight: 600;\n }\n }\n }\n\n div[button-container] {\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n\n md-elevated-button[blue] {\n --md-elevated-button-container-color: #0595e5;\n\n --md-elevated-button-label-text-color: #fff;\n --md-elevated-button-hover-label-text-color: #fff;\n --md-elevated-button-pressed-label-text-color: #fff;\n --md-elevated-button-focus-label-text-color: #fff;\n --md-elevated-button-icon-color: #fff;\n --md-elevated-button-hover-icon-color: #fff;\n --md-elevated-button-pressed-icon-color: #fff;\n --md-elevated-button-focus-icon-color: #fff;\n }\n }\n `\n ]\n\n @property({ type: Object }) gristConfig: any\n @property({ type: Object }) checklistDetailTypes: any\n @property({ type: String }) projectId: string = ''\n @property({ type: String }) checklistTemplateId: string = ''\n @property({ type: String }) selectedBuildingId: string = ''\n @property({ type: String }) selectedBuildingLevelId: string = ''\n @property({ type: String }) cell: string = ''\n\n @state() buildings: any = []\n @state() selectedBuilding: any = {}\n @state() selectedLevel: any = {}\n\n @state() constructionTypes: any = []\n @state() selectedConstructionType: any = {}\n @state() selectedConstructionDetailType: any = {}\n\n @state() managers: any = []\n @state() selectedManager: any = {}\n\n @state() checklistTemplates: any = []\n @state() checklist: any = {}\n\n @state() activeTab: 'edit' | 'preview' = 'edit'\n\n @query('md-filled-select[checklistTemplate]') htmlSelectChecklistTemplate\n @query('md-filled-select[constructionType]') htmlSelectConstructionType\n @query('md-filled-select[constructionDetailType]') htmlSelectConstructionDetailType\n @query('ox-grist') grist!: DataGrist\n\n @query('div[preview]') checklistViewContainer!: HTMLDivElement\n @query('checklist-view') checklistView!: HTMLElement\n\n render() {\n return html`\n <div body>\n <div tab-container ?inactive=${this.activeTab !== 'edit'} edit>\n <div detail>\n <h3>세부 정보</h3>\n\n <div data-row>\n <label>공종</label>\n <md-filled-select constructionType @change=${this._onSelectConstructionType}>\n ${this.constructionTypes?.map(constructionType => {\n const selected = constructionType.id === this.selectedConstructionType?.id\n return html`<md-select-option ?selected=${selected} .value=${constructionType.id}>\n <div slot=\"headline\">${constructionType.name}</div>\n </md-select-option>`\n })}\n </md-filled-select>\n\n <div partition></div>\n\n <label>세부 공종</label>\n <md-filled-select constructionDetailType @change=${this._onSelectConstructionDetailType}>\n ${this.selectedConstructionType?.constructionDetailTypes?.map(constructionDetailType => {\n const selected = constructionDetailType.id === this.selectedConstructionDetailType.id\n return html`<md-select-option ?selected=${selected} .value=${constructionDetailType.id}>\n <div slot=\"headline\">${constructionDetailType.name}</div>\n </md-select-option>`\n })}\n </md-filled-select>\n </div>\n\n <div data-row>\n <label>동</label>\n <md-filled-text-field building name=\"buildingName\" type=\"text\" .value=${this.selectedBuilding?.name || ''} disabled>\n </md-filled-text-field>\n\n <div partition></div>\n\n <label>층</label>\n <md-filled-text-field\n level\n name=\"buildingLevelName\"\n type=\"text\"\n .value=${this.selectedLevel?.floorDisplayName || ''}\n disabled\n >\n </md-filled-text-field>\n </div>\n </div>\n\n <div checklist>\n <h3>체크리스트</h3>\n\n <div data-row>\n <label>이름</label>\n <md-filled-text-field\n name=\"checklistName\"\n type=\"text\"\n .value=${this.checklist?.name || ''}\n @input=${this._onInputChange}\n >\n </md-filled-text-field>\n\n <div partition></div>\n\n <label>템플릿</label>\n <md-filled-select checklistTemplate @change=${this._onSelectChecklistTemplate}>\n <md-select-option></md-select-option>\n ${this.checklistTemplates?.map((checklistTemplate, idx) => {\n return html` <md-select-option .value=${checklistTemplate.id}>\n <div slot=\"headline\">${checklistTemplate.name}</div>\n </md-select-option>`\n })}\n </md-filled-select>\n </div>\n </div>\n\n <div manager>\n <h3>담당자</h3>\n\n <div data-row>\n <label>담당자</label>\n <md-filled-select manager @change=${this._onSelectManager}>\n <md-select-option></md-select-option>\n ${this.managers?.map((manager, idx) => {\n return html` <md-select-option .value=${manager.userId}>\n <div slot=\"headline\">${manager.name}</div>\n </md-select-option>`\n })}\n </md-filled-select>\n </div>\n </div>\n\n <ox-grist\n .mode=${'GRID'}\n .config=${this.gristConfig}\n .fetchHandler=${this.fetchHandler.bind(this)}\n @field-change=${this.onChangeGird}\n >\n </ox-grist>\n </div>\n\n <div tab-container ?inactive=${this.activeTab !== 'preview'} preview>\n <checklist-view\n .mode=${ChecklistMode.VIEWER}\n .checklist=${this.checklist}\n .manager=${this.selectedManager || {}}\n .projectType=${ProjectType.DSSP}\n ></checklist-view>\n </div>\n </div>\n\n <div tabs>\n <button ?active=${this.activeTab === 'edit'} @click=${() => (this.activeTab = 'edit')}>검측 요청 정보</button>\n <button ?active=${this.activeTab === 'preview'} @click=${() => (this.activeTab = 'preview')}>미리보기</button>\n </div>\n\n <div button-container>\n <md-elevated-button blue @click=${this._createInspection}>\n <md-icon slot=\"icon\">task</md-icon>검측 요청서 등록\n </md-elevated-button>\n <md-elevated-button @click=${this._close}> <md-icon slot=\"icon\">cancel</md-icon>취소</md-elevated-button>\n </div>\n `\n }\n\n updated() {\n const ratio = Math.round((this.checklistViewContainer?.offsetWidth / this.checklistView?.offsetWidth) * 100) / 100 || 1\n this.checklistView.style.transform = `scale(${ratio})`\n }\n\n async firstUpdated() {\n const response = await client.query({\n query: gql`\n query Project($id: String!) {\n project(id: $id) {\n id\n name\n documentNaming\n buildingComplex {\n id\n buildings {\n id\n name\n }\n }\n }\n\n constructionTypes {\n items {\n name\n id\n }\n }\n\n checklistTemplates {\n items {\n id\n name\n }\n }\n\n checklistTypes {\n items {\n id\n mainType\n detailType\n }\n }\n\n managers {\n id\n phone\n position\n userId\n name\n }\n }\n `,\n variables: {\n id: this.projectId\n }\n })\n\n if (response.errors) return\n\n const project = response.data?.project\n const checklistTemplates = response.data?.checklistTemplates?.items || []\n const constructionTypes = response.data?.constructionTypes?.items || []\n\n this.managers = response.data?.managers\n this.checklistDetailTypes = response.data.checklistTypes?.items?.map(v => {\n return {\n display: v.detailType,\n value: v.id,\n mainType: v.mainType\n }\n })\n\n this.constructionTypes = [...constructionTypes]\n this.checklistTemplates = [...checklistTemplates]\n this.buildings = [...(project?.buildingComplex?.buildings || [])]\n\n // selectedBuildingId가 있으면 해당 빌딩 선택, 없으면 첫번째 빌딩 선택\n this.selectedBuilding = this.buildings.find(building => building.id == this.selectedBuildingId)\n this.selectedBuilding = await this._getBuilding(this.selectedBuilding.id)\n this.selectedConstructionType = constructionTypes?.[0]\n\n // selectedBuildingLevelId가 있으면 선택된 층, 없으면 첫번째 층 선택\n this.selectedLevel = this.selectedBuilding?.buildingLevels?.find(level => level.id == this.selectedBuildingLevelId)\n\n // 세부 공종 리스트 가져오기\n this.selectedConstructionType = await this._getConstructionType(this.selectedConstructionType.id)\n this.selectedConstructionDetailType = this.selectedConstructionType?.constructionDetailTypes?.[0]\n this.selectedConstructionType = await { ...this.selectedConstructionType }\n\n // 기본 값 셋팅 select\n await this.htmlSelectChecklistTemplate.selectIndex(0)\n await this.htmlSelectConstructionDetailType.selectIndex(0)\n\n this.checklist = {\n constructionType: this.selectedConstructionType?.name,\n constructionDetailType: this.selectedConstructionDetailType?.name,\n location: `${this.selectedBuilding?.name || ''} ${this.selectedLevel.floorDisplayName || ''}층`,\n documentNo: `${project.documentNaming} 검측 제01-00000호`,\n buildingInspection: {\n status: BuildingInspectionStatus.WAIT\n }\n }\n\n // 그리드 셋팅\n this.setGristConfig()\n }\n\n requestRefresh(buildingInspectionId: string = '') {\n this.dispatchEvent(new CustomEvent('requestRefresh', { detail: { buildingInspectionId } }))\n }\n\n private _close() {\n history.back()\n }\n\n setGristConfig() {\n this.gristConfig = {\n columns: [\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'arrow_upward',\n handlers: {\n click: 'move-up'\n }\n },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'arrow_downward',\n handlers: {\n click: 'move-down'\n }\n },\n {\n type: 'select',\n name: 'mainType',\n header: '구분',\n record: {\n editable: true,\n options: [{ display: '', value: '' }].concat(\n Object.keys(CHECKLIST_MAIN_TYPE_LIST).map(key => ({ display: CHECKLIST_MAIN_TYPE_LIST[key], value: key }))\n )\n },\n width: 100\n },\n {\n type: 'select',\n name: 'detailType',\n header: '상세 구분',\n record: {\n editable: true,\n options: (columns, data, column) => [\n { display: '', value: '' },\n ...this.checklistDetailTypes.filter(v => v.mainType == column.mainType)\n ]\n },\n width: 200\n },\n {\n type: 'string',\n name: 'name',\n header: '검사 항목',\n record: {\n editable: true\n },\n width: 200\n },\n {\n type: 'string',\n name: 'inspctionCriteria',\n header: '검사 기준',\n record: {\n editable: true\n },\n width: 200\n }\n ],\n pagination: {\n infinite: true\n },\n sorters: [{ name: 'mainType' }, { name: 'sequence' }]\n }\n }\n\n async fetchHandler() {\n if (!this.checklistTemplateId) return []\n\n const response = await client.query({\n query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {\n checklistTemplateItems(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n sequence\n name\n inspctionCriteria: inspctionCriteriaText\n mainType\n detailType\n }\n }\n }\n `,\n variables: {\n filters: {\n name: 'checklistTemplateId',\n value: this.checklistTemplateId,\n operator: 'eq'\n },\n sortings: [{ name: 'mainType' }, { name: 'sequence' }]\n }\n })\n\n // 체크리스트 아이템 데이터 갱신\n this.onChangeGird()\n\n return {\n records: response.data.checklistTemplateItems.items || []\n }\n }\n\n async _getBuilding(buildingId: string = '') {\n const response = await client.query({\n query: gql`\n query Building($id: String!) {\n building(id: $id) {\n id\n name\n buildingLevels {\n id\n floor\n floorDisplayName\n mainDrawing {\n id\n name\n fullpath\n }\n mainDrawingImage\n }\n }\n }\n `,\n variables: {\n id: buildingId\n }\n })\n\n if (response.errors) return\n\n return response.data?.building || {}\n }\n\n private _onSelectChecklistTemplate(e) {\n const checklistTemplateId = e.target.value\n\n // 체크 리스트 이름 셋팅\n this.checklist = { ...this.checklist, name: e.target.displayText }\n\n // 그리드 아이템 셋팅\n if (checklistTemplateId) {\n this.checklistTemplateId = checklistTemplateId\n this.grist.fetch()\n }\n }\n\n private _onSelectManager(e) {\n const managerId = e.target.value\n this.selectedManager = this.managers.find(manager => manager.userId == managerId)\n }\n\n async _createInspection() {\n let patch: any = {}\n\n patch.buildingLevelId = this.selectedLevel.id\n patch.managerId = this.selectedManager.userId\n patch.checklist = {\n name: this.checklist.name,\n constructionType: this.htmlSelectConstructionType.displayText,\n constructionDetailType: this.htmlSelectConstructionDetailType.displayText,\n location: `${this.selectedBuilding.name} ${this.selectedLevel.floorDisplayName}층`,\n inspectionParts: this.checklist.inspectionParts\n }\n patch.checklistItem = this.checklist.checklistItems?.map(item => {\n return {\n name: item.name,\n mainType: item.mainType,\n detailType: item.detailType,\n inspctionCriteria: item.inspctionCriteria\n }\n })\n\n const [cellX, cellY] = this.cell.split(',')\n patch.cellX = Number(cellX)\n patch.cellY = Number(cellY)\n\n const response = await client.mutate({\n mutation: gql`\n mutation CreateBuildingInspection($patch: NewBuildingInspection!) {\n createBuildingInspection(patch: $patch) {\n id\n }\n }\n `,\n variables: {\n patch\n }\n })\n\n if (!response.errors) {\n notify({ message: '검측 요청서를 등록하였습니다.' })\n this.requestRefresh(response.data.createBuildingInspection.id)\n this._close()\n } else {\n notify({ message: response.errors?.[0]?.message || '검측 요청서 등록에 실패하였습니다.', level: 'error' })\n }\n }\n\n // Input 요소의 값이 변경될 때 호출되는 콜백 함수\n private _onInputChange(event: InputEvent) {\n const target = event.target as HTMLInputElement\n this[target.name] = target.value\n this.checklist = { ...this.checklist, name: target.value }\n }\n\n // 체크리스트 아이템 데이터 갱신\n private onChangeGird() {\n const checklistDetailTypes = Object.fromEntries(this.checklistDetailTypes.map(item => [item.value, item.display]))\n const grist = this.grist\n\n // grist field-change가 오는 시점이 데이터 변경 전이라 setTimeout으로 변경\n setTimeout(() => {\n this.checklist.checklistItems = grist.dirtyData.records.map((row, idx) => {\n return {\n ...row,\n detailType: checklistDetailTypes[row.detailType],\n sequence: idx\n }\n })\n this.checklist = { ...this.checklist }\n }, 100)\n }\n\n private async _onSelectConstructionType(e) {\n const constructionTypeId = e.target.value\n this.selectedConstructionType = await this._getConstructionType(constructionTypeId)\n this.selectedConstructionDetailType = await { ...this.selectedConstructionType?.constructionDetailTypes?.[0] }\n this.checklist = {\n ...this.checklist,\n constructionType: this.selectedConstructionType?.name,\n constructionDetailType: this.selectedConstructionDetailType?.name\n }\n\n await this.htmlSelectConstructionDetailType.selectIndex(0)\n }\n\n private _onSelectConstructionDetailType(e) {\n const constructionDetailTypeId = e.target.value\n this.selectedConstructionDetailType = {\n ...(this.selectedConstructionType?.constructionDetailTypes?.find(v => v.id == constructionDetailTypeId) || {})\n }\n this.checklist = {\n ...this.checklist,\n constructionType: this.selectedConstructionType?.name,\n constructionDetailType: this.selectedConstructionDetailType?.name\n }\n }\n\n async _getConstructionType(id: string = '') {\n const response = await client.query({\n query: gql`\n query ConstructionType($id: String!) {\n constructionType(id: $id) {\n id\n name\n description\n constructionDetailTypes {\n id\n name\n }\n }\n }\n `,\n variables: { id }\n })\n\n if (response.errors) return\n\n return response.data?.constructionType || {}\n }\n}\n"]}
@@ -32,15 +32,19 @@ let ChecklistView = class ChecklistView extends connect(store)(LitElement) {
32
32
  this.status = BuildingInspectionStatus.WAIT;
33
33
  this.projectType = "DSSP" /* ProjectType.DSSP */;
34
34
  this.isListening = false;
35
- this._onToggleSTT = () => {
35
+ this._onStartSTT = (e) => {
36
+ e.preventDefault();
36
37
  const stt = this.renderRoot.querySelector('#stt');
37
38
  if (!this.isListening) {
38
39
  stt === null || stt === void 0 ? void 0 : stt.startListening();
39
40
  }
40
- else {
41
+ };
42
+ this._onStopSTT = (e) => {
43
+ e.preventDefault();
44
+ const stt = this.renderRoot.querySelector('#stt');
45
+ if (this.isListening) {
41
46
  stt === null || stt === void 0 ? void 0 : stt.stopListening();
42
47
  }
43
- // isListening은 stt-status 이벤트에서 갱신됨
44
48
  };
45
49
  }
46
50
  firstUpdated() {
@@ -155,9 +159,13 @@ let ChecklistView = class ChecklistView extends connect(store)(LitElement) {
155
159
  <md-fab
156
160
  class="stt-fab"
157
161
  ?active=${this.isListening}
158
- @click=${this._onToggleSTT}
162
+ @mousedown=${this._onStartSTT}
163
+ @mouseup=${this._onStopSTT}
164
+ @mouseleave=${this._onStopSTT}
165
+ @touchstart=${this._onStartSTT}
166
+ @touchend=${this._onStopSTT}
159
167
  ?disabled=${false}
160
- .label=${this.isListening ? '음성 인식 중지' : '음성 인식 시작'}
168
+ .label=${this.isListening ? '말씀하세요...' : '길게 눌러서 음성 인식'}
161
169
  >
162
170
  <md-icon slot="icon">mic</md-icon>
163
171
  </md-fab>
@@ -700,6 +708,7 @@ ChecklistView.styles = [
700
708
  position: fixed;
701
709
  top: 100px;
702
710
  right: 20px;
711
+ z-index: 1;
703
712
  }
704
713
 
705
714
  .stt-fab[active] md-icon {