@genexus/genexus-ide-ui 1.1.2 → 1.1.4
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/cjs/genexus-ide-ui.cjs.js +1 -1
- package/dist/cjs/gx-ide-ai-assistant.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-ai-assistant.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-bpm-app-declaration.cjs.entry.js +180 -166
- package/dist/cjs/gx-ide-bpm-app-declaration.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-bpm-assign-roles.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-bpm-assign-roles.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-bpm-export-xpdl.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-bpm-export-xpdl.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-bpm-import-files.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-bpm-import-files.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-bpm-import-gxpm.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-bpm-import-gxpm.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-bpm-objects-selector.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-bpm-objects-selector.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-bpm-timer-duration.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-bpm-timer-duration.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-card.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-card.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-dashboard-home.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-dashboard-home.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-deployment-tool.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-deployment-tool.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-edit-module-server.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-edit-module-server.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-empty-state.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-empty-state.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-file-item.cjs.entry.js +110 -0
- package/dist/cjs/gx-ide-file-item.cjs.entry.js.map +1 -0
- package/dist/cjs/gx-ide-file-uploader.cjs.entry.js +399 -0
- package/dist/cjs/gx-ide-file-uploader.cjs.entry.js.map +1 -0
- package/dist/cjs/gx-ide-gam-installation-settings.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-gam-installation-settings.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-list-selector_2.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-list-selector_2.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-manage-module-references-v2.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-manage-module-references-v2.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-manage-module-references.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-manage-module-references.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-references.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-references.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-team-dev-commit.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-team-dev-commit.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-team-dev-select-recent-comment.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-team-dev-select-recent-comment.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-team-dev-update-partial-selection.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-team-dev-update-partial-selection.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-team-dev-update-to-revision.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-team-dev-update-to-revision.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-team-dev-update.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-team-dev-update.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-template.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-template.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-wf-settings.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-wf-settings.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-ww-images.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-ww-images.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/_helpers/card/card.css +9 -0
- package/dist/collection/components/_helpers/empty-state/gx-ide-empty-state.css +9 -0
- package/dist/collection/components/_helpers/list-selector/list-selector.css +9 -0
- package/dist/collection/components/_starting-template/template.css +9 -0
- package/dist/collection/components/ai-assistant/ai-assistant.css +9 -0
- package/dist/collection/components/bpm/application-declaration/bpm-app-declaration.css +36 -27
- package/dist/collection/components/bpm/application-declaration/bpm-app-declaration.js +217 -181
- package/dist/collection/components/bpm/application-declaration/bpm-app-declaration.js.map +1 -1
- package/dist/collection/components/bpm/application-declaration/gx-ide-assets/bpm-app-declaration/langs/bpm-app-declaration.lang.en.json +14 -2
- package/dist/collection/components/bpm/application-declaration/gx-ide-assets/bpm-app-declaration/langs/bpm-app-declaration.lang.ja.json +15 -3
- package/dist/collection/components/bpm/application-declaration/gx-ide-assets/bpm-app-declaration/langs/bpm-app-declaration.lang.zh.json +14 -2
- package/dist/collection/components/bpm/assign-roles/bpm-assign-roles.css +9 -0
- package/dist/collection/components/bpm/export-xpdl/bpm-export-xpdl.css +9 -0
- package/dist/collection/components/bpm/import-files/bpm-import-files.css +9 -0
- package/dist/collection/components/bpm/import-gxpm/bpm-import-gxpm.css +9 -0
- package/dist/collection/components/bpm/objects-selector/bpm-objects-selector.css +9 -0
- package/dist/collection/components/bpm/timer-duration/bpm-timer-duration.css +9 -0
- package/dist/collection/components/dashboard-home/dashboard-home.css +9 -0
- package/dist/collection/components/deployment-tool/deployment-tool.css +9 -0
- package/dist/collection/components/file-uploader/file-item/file-item.css +97 -0
- package/dist/collection/components/file-uploader/file-item/file-item.js +246 -0
- package/dist/collection/components/file-uploader/file-item/file-item.js.map +1 -0
- package/dist/collection/components/file-uploader/file-uploader.css +687 -0
- package/dist/collection/components/file-uploader/file-uploader.js +750 -0
- package/dist/collection/components/file-uploader/file-uploader.js.map +1 -0
- package/dist/collection/components/file-uploader/gx-ide-assets/file-uploader/langs/file-uploader.lang.en.json +36 -0
- package/dist/collection/components/file-uploader/gx-ide-assets/file-uploader/langs/file-uploader.lang.ja.json +36 -0
- package/dist/collection/components/file-uploader/gx-ide-assets/file-uploader/langs/file-uploader.lang.zh.json +36 -0
- package/dist/collection/components/file-uploader/types.js +2 -0
- package/dist/collection/components/file-uploader/types.js.map +1 -0
- package/dist/collection/components/gam-installation-settings/gam-installation-settings.css +9 -0
- package/dist/collection/components/modules/edit-module-server/edit-module-server.css +9 -0
- package/dist/collection/components/modules/manage-module-references/manage-module-references.css +9 -0
- package/dist/collection/components/modules/manage-module-references-v2/manage-module-references.css +9 -0
- package/dist/collection/components/references/references.css +9 -0
- package/dist/collection/components/team-dev/commit/commit.css +9 -0
- package/dist/collection/components/team-dev/select-recent-comment/select-recent-comment.css +9 -0
- package/dist/collection/components/team-dev/update/update.css +9 -0
- package/dist/collection/components/team-dev/update-partial-selection/update-partial-selection.css +9 -0
- package/dist/collection/components/team-dev/update-to-revision/update-to-revision.css +9 -0
- package/dist/collection/components/wf-settings/wf-settings.css +9 -0
- package/dist/collection/components/ww-images/ww-images.css +9 -0
- package/dist/collection/testing/locale.e2e.js +4 -1
- package/dist/collection/testing/locale.e2e.js.map +1 -1
- package/dist/components/bpm-objects-selector.js +1 -1
- package/dist/components/bpm-objects-selector.js.map +1 -1
- package/dist/components/file-item.js +130 -0
- package/dist/components/file-item.js.map +1 -0
- package/dist/components/gx-ide-ai-assistant.js +1 -1
- package/dist/components/gx-ide-ai-assistant.js.map +1 -1
- package/dist/components/gx-ide-bpm-app-declaration.js +189 -184
- package/dist/components/gx-ide-bpm-app-declaration.js.map +1 -1
- package/dist/components/gx-ide-bpm-assign-roles.js +1 -1
- package/dist/components/gx-ide-bpm-assign-roles.js.map +1 -1
- package/dist/components/gx-ide-bpm-export-xpdl.js +1 -1
- package/dist/components/gx-ide-bpm-export-xpdl.js.map +1 -1
- package/dist/components/gx-ide-bpm-import-files.js +1 -1
- package/dist/components/gx-ide-bpm-import-files.js.map +1 -1
- package/dist/components/gx-ide-bpm-import-gxpm.js +1 -1
- package/dist/components/gx-ide-bpm-import-gxpm.js.map +1 -1
- package/dist/components/gx-ide-bpm-timer-duration.js +1 -1
- package/dist/components/gx-ide-bpm-timer-duration.js.map +1 -1
- package/dist/components/gx-ide-card.js +1 -1
- package/dist/components/gx-ide-card.js.map +1 -1
- package/dist/components/gx-ide-dashboard-home.js +1 -1
- package/dist/components/gx-ide-dashboard-home.js.map +1 -1
- package/dist/components/gx-ide-deployment-tool.js +1 -1
- package/dist/components/gx-ide-deployment-tool.js.map +1 -1
- package/dist/components/gx-ide-edit-module-server.js +1 -1
- package/dist/components/gx-ide-edit-module-server.js.map +1 -1
- package/dist/components/gx-ide-empty-state2.js +1 -1
- package/dist/components/gx-ide-empty-state2.js.map +1 -1
- package/dist/components/gx-ide-file-item.d.ts +11 -0
- package/dist/components/gx-ide-file-item.js +8 -0
- package/dist/components/gx-ide-file-item.js.map +1 -0
- package/dist/components/gx-ide-file-uploader.d.ts +11 -0
- package/dist/components/gx-ide-file-uploader.js +438 -0
- package/dist/components/gx-ide-file-uploader.js.map +1 -0
- package/dist/components/gx-ide-gam-installation-settings.js +1 -1
- package/dist/components/gx-ide-gam-installation-settings.js.map +1 -1
- package/dist/components/gx-ide-manage-module-references-v2.js +1 -1
- package/dist/components/gx-ide-manage-module-references-v2.js.map +1 -1
- package/dist/components/gx-ide-manage-module-references.js +1 -1
- package/dist/components/gx-ide-manage-module-references.js.map +1 -1
- package/dist/components/gx-ide-references.js +1 -1
- package/dist/components/gx-ide-references.js.map +1 -1
- package/dist/components/gx-ide-team-dev-commit.js +1 -1
- package/dist/components/gx-ide-team-dev-commit.js.map +1 -1
- package/dist/components/gx-ide-team-dev-select-recent-comment.js +1 -1
- package/dist/components/gx-ide-team-dev-select-recent-comment.js.map +1 -1
- package/dist/components/gx-ide-team-dev-update-partial-selection.js +1 -1
- package/dist/components/gx-ide-team-dev-update-partial-selection.js.map +1 -1
- package/dist/components/gx-ide-team-dev-update-to-revision.js +1 -1
- package/dist/components/gx-ide-team-dev-update-to-revision.js.map +1 -1
- package/dist/components/gx-ide-team-dev-update.js +1 -1
- package/dist/components/gx-ide-team-dev-update.js.map +1 -1
- package/dist/components/gx-ide-template.js +1 -1
- package/dist/components/gx-ide-template.js.map +1 -1
- package/dist/components/gx-ide-wf-settings.js +1 -1
- package/dist/components/gx-ide-wf-settings.js.map +1 -1
- package/dist/components/gx-ide-ww-images.js +1 -1
- package/dist/components/gx-ide-ww-images.js.map +1 -1
- package/dist/components/list-selector.js +1 -1
- package/dist/components/list-selector.js.map +1 -1
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-ai-assistant.entry.js +1 -1
- package/dist/esm/gx-ide-ai-assistant.entry.js.map +1 -1
- package/dist/esm/gx-ide-bpm-app-declaration.entry.js +181 -167
- package/dist/esm/gx-ide-bpm-app-declaration.entry.js.map +1 -1
- package/dist/esm/gx-ide-bpm-assign-roles.entry.js +1 -1
- package/dist/esm/gx-ide-bpm-assign-roles.entry.js.map +1 -1
- package/dist/esm/gx-ide-bpm-export-xpdl.entry.js +1 -1
- package/dist/esm/gx-ide-bpm-export-xpdl.entry.js.map +1 -1
- package/dist/esm/gx-ide-bpm-import-files.entry.js +1 -1
- package/dist/esm/gx-ide-bpm-import-files.entry.js.map +1 -1
- package/dist/esm/gx-ide-bpm-import-gxpm.entry.js +1 -1
- package/dist/esm/gx-ide-bpm-import-gxpm.entry.js.map +1 -1
- package/dist/esm/gx-ide-bpm-objects-selector.entry.js +1 -1
- package/dist/esm/gx-ide-bpm-objects-selector.entry.js.map +1 -1
- package/dist/esm/gx-ide-bpm-timer-duration.entry.js +1 -1
- package/dist/esm/gx-ide-bpm-timer-duration.entry.js.map +1 -1
- package/dist/esm/gx-ide-card.entry.js +1 -1
- package/dist/esm/gx-ide-card.entry.js.map +1 -1
- package/dist/esm/gx-ide-dashboard-home.entry.js +1 -1
- package/dist/esm/gx-ide-dashboard-home.entry.js.map +1 -1
- package/dist/esm/gx-ide-deployment-tool.entry.js +1 -1
- package/dist/esm/gx-ide-deployment-tool.entry.js.map +1 -1
- package/dist/esm/gx-ide-edit-module-server.entry.js +1 -1
- package/dist/esm/gx-ide-edit-module-server.entry.js.map +1 -1
- package/dist/esm/gx-ide-empty-state.entry.js +1 -1
- package/dist/esm/gx-ide-empty-state.entry.js.map +1 -1
- package/dist/esm/gx-ide-file-item.entry.js +106 -0
- package/dist/esm/gx-ide-file-item.entry.js.map +1 -0
- package/dist/esm/gx-ide-file-uploader.entry.js +395 -0
- package/dist/esm/gx-ide-file-uploader.entry.js.map +1 -0
- package/dist/esm/gx-ide-gam-installation-settings.entry.js +1 -1
- package/dist/esm/gx-ide-gam-installation-settings.entry.js.map +1 -1
- package/dist/esm/gx-ide-list-selector_2.entry.js +1 -1
- package/dist/esm/gx-ide-list-selector_2.entry.js.map +1 -1
- package/dist/esm/gx-ide-manage-module-references-v2.entry.js +1 -1
- package/dist/esm/gx-ide-manage-module-references-v2.entry.js.map +1 -1
- package/dist/esm/gx-ide-manage-module-references.entry.js +1 -1
- package/dist/esm/gx-ide-manage-module-references.entry.js.map +1 -1
- package/dist/esm/gx-ide-references.entry.js +1 -1
- package/dist/esm/gx-ide-references.entry.js.map +1 -1
- package/dist/esm/gx-ide-team-dev-commit.entry.js +1 -1
- package/dist/esm/gx-ide-team-dev-commit.entry.js.map +1 -1
- package/dist/esm/gx-ide-team-dev-select-recent-comment.entry.js +1 -1
- package/dist/esm/gx-ide-team-dev-select-recent-comment.entry.js.map +1 -1
- package/dist/esm/gx-ide-team-dev-update-partial-selection.entry.js +1 -1
- package/dist/esm/gx-ide-team-dev-update-partial-selection.entry.js.map +1 -1
- package/dist/esm/gx-ide-team-dev-update-to-revision.entry.js +1 -1
- package/dist/esm/gx-ide-team-dev-update-to-revision.entry.js.map +1 -1
- package/dist/esm/gx-ide-team-dev-update.entry.js +1 -1
- package/dist/esm/gx-ide-team-dev-update.entry.js.map +1 -1
- package/dist/esm/gx-ide-template.entry.js +1 -1
- package/dist/esm/gx-ide-template.entry.js.map +1 -1
- package/dist/esm/gx-ide-wf-settings.entry.js +1 -1
- package/dist/esm/gx-ide-wf-settings.entry.js.map +1 -1
- package/dist/esm/gx-ide-ww-images.entry.js +1 -1
- package/dist/esm/gx-ide-ww-images.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
- package/dist/genexus-ide-ui/gx-ide-assets/bpm-app-declaration/langs/bpm-app-declaration.lang.en.json +14 -2
- package/dist/genexus-ide-ui/gx-ide-assets/bpm-app-declaration/langs/bpm-app-declaration.lang.ja.json +15 -3
- package/dist/genexus-ide-ui/gx-ide-assets/bpm-app-declaration/langs/bpm-app-declaration.lang.zh.json +14 -2
- package/dist/genexus-ide-ui/gx-ide-assets/file-uploader/langs/file-uploader.lang.en.json +36 -0
- package/dist/genexus-ide-ui/gx-ide-assets/file-uploader/langs/file-uploader.lang.ja.json +36 -0
- package/dist/genexus-ide-ui/gx-ide-assets/file-uploader/langs/file-uploader.lang.zh.json +36 -0
- package/dist/genexus-ide-ui/{p-1e8f5da5.entry.js → p-04c6bd23.entry.js} +29 -29
- package/dist/genexus-ide-ui/{p-3e936f26.entry.js → p-05b04291.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-3ecdb582.entry.js → p-1072bf33.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-683cb15e.entry.js → p-14165308.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-2027c939.entry.js → p-2b3938b4.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-48826a6f.entry.js → p-3085add2.entry.js} +99 -99
- package/dist/genexus-ide-ui/{p-e4c2e200.entry.js → p-35f9ebbc.entry.js} +5 -5
- package/dist/genexus-ide-ui/{p-038c3f9b.entry.js → p-45996535.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-50b22f23.entry.js → p-4b38fffc.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-8f00263d.entry.js → p-6d2174ed.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-3d4355b4.entry.js → p-767e0f6d.entry.js} +8 -8
- package/dist/genexus-ide-ui/{p-bac13202.entry.js → p-844b7117.entry.js} +17 -17
- package/dist/genexus-ide-ui/{p-a790c4c9.entry.js → p-961bb2cc.entry.js} +2 -2
- package/dist/genexus-ide-ui/p-a1d73ca3.entry.js +310 -0
- package/dist/genexus-ide-ui/p-a1d73ca3.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-9b5cb6b9.entry.js → p-a47d71eb.entry.js} +5 -5
- package/dist/genexus-ide-ui/{p-a05d4963.entry.js → p-b1851e6b.entry.js} +8 -8
- package/dist/genexus-ide-ui/{p-c6c955a3.entry.js → p-b2928645.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-3b8db39e.entry.js → p-b58fb87b.entry.js} +2 -2
- package/dist/genexus-ide-ui/p-bbf88f43.entry.js +475 -0
- package/dist/genexus-ide-ui/p-bbf88f43.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-59ed3f39.entry.js → p-d8379699.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-beea29fa.entry.js → p-e24902a0.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-54fbb568.entry.js → p-edf889d2.entry.js} +2 -2
- package/dist/genexus-ide-ui/p-ef5dfd35.entry.js +157 -0
- package/dist/genexus-ide-ui/p-ef5dfd35.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-a59a07e2.entry.js → p-f49bb305.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-cd397078.entry.js → p-f51adb3d.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-74c81ca3.entry.js → p-f722955f.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-2a6683e1.entry.js → p-f7421997.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-22b8bdb1.entry.js → p-fcecdafa.entry.js} +2 -2
- package/dist/types/components/bpm/application-declaration/bpm-app-declaration.d.ts +22 -44
- package/dist/types/components/file-uploader/file-item/file-item.d.ts +31 -0
- package/dist/types/components/file-uploader/file-uploader.d.ts +51 -0
- package/dist/types/components/file-uploader/types.d.ts +31 -0
- package/dist/types/components.d.ts +249 -10
- package/package.json +1 -1
- package/dist/genexus-ide-ui/p-55c87f23.entry.js +0 -287
- package/dist/genexus-ide-ui/p-55c87f23.entry.js.map +0 -1
- /package/dist/genexus-ide-ui/{p-1e8f5da5.entry.js.map → p-04c6bd23.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-3e936f26.entry.js.map → p-05b04291.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-3ecdb582.entry.js.map → p-1072bf33.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-683cb15e.entry.js.map → p-14165308.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-2027c939.entry.js.map → p-2b3938b4.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-48826a6f.entry.js.map → p-3085add2.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-e4c2e200.entry.js.map → p-35f9ebbc.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-038c3f9b.entry.js.map → p-45996535.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-50b22f23.entry.js.map → p-4b38fffc.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-8f00263d.entry.js.map → p-6d2174ed.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-3d4355b4.entry.js.map → p-767e0f6d.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-bac13202.entry.js.map → p-844b7117.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-a790c4c9.entry.js.map → p-961bb2cc.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-9b5cb6b9.entry.js.map → p-a47d71eb.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-a05d4963.entry.js.map → p-b1851e6b.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-c6c955a3.entry.js.map → p-b2928645.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-3b8db39e.entry.js.map → p-b58fb87b.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-59ed3f39.entry.js.map → p-d8379699.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-beea29fa.entry.js.map → p-e24902a0.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-54fbb568.entry.js.map → p-edf889d2.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-a59a07e2.entry.js.map → p-f49bb305.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-cd397078.entry.js.map → p-f51adb3d.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-74c81ca3.entry.js.map → p-f722955f.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-2a6683e1.entry.js.map → p-f7421997.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-22b8bdb1.entry.js.map → p-fcecdafa.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"bpm-objects-selector.js","mappings":";;;;;;;;;AAQO,MAAM,qBAAqB,GAAG,CAAC,OAAqB;IACzD,MAAM,SAAS,GAAe,EAAE,CAAC;IACjC,OAAO,CAAC,OAAO,CAAC,MAAM;QACpB,MA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AAI,CAAC,eAAe,CAAC,MAAM,MACrB,CACL,EAEN,cACE,IAAI,EAAC,YAAY,EACjB,OAAO,EAAE,IAAI,CAAC,uBAAuB,EACrC,QAAQ,EAAE,IAAI,CAAC,UAAU,IAExB,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAChC,CACQ,CACf,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/bpm/objects-selector/helpers.ts","src/components/bpm/objects-selector/bpm-objects-selector.scss?tag=gx-ide-bpm-objects-selector&encapsulation=shadow","src/components/bpm/objects-selector/bpm-objects-selector.tsx"],"sourcesContent":["import { ItemData } from \"../../_helpers/list-selector/list-selector-item/list-selector-item\";\n\nexport type ObjectData = {\n id: string;\n icon: string;\n name: string;\n};\n\nexport const objectsToListItemData = (objects: ObjectData[]): ItemData[] => {\n const itemsData: ItemData[] = [];\n objects.forEach(object => {\n const itemId = object.id;\n const itemValue = object.name;\n const itemIcon: string = object.icon;\n const itemChecked: boolean = false;\n itemsData.push({\n itemId: itemId,\n itemValue: itemValue,\n itemIcon: itemIcon,\n itemChecked: itemChecked\n });\n });\n return itemsData;\n};\n","@import \"../../../global/gx-ide-common.scss\";\n@import \"../../../global/gx-ide-mixins.scss\";\n@import \"../../../global/temporary-tokens-chameleon.scss\";\n\n:host {\n display: block;\n}\n\n.header {\n display: grid;\n grid-template-columns: 1fr min-content min-content;\n grid-template-areas:\n \"label label label\"\n \"input cancel export\";\n grid-gap: var(--gx-ide-grid-column-gap);\n\n .label {\n grid-area: label;\n }\n .input {\n grid-area: input;\n }\n .cancel {\n grid-area: cancel;\n }\n .export {\n grid-area: export;\n }\n}\n","/* STENCIL IMPORTS */\nimport {\n Component,\n Host,\n h,\n Prop,\n Element,\n Event,\n EventEmitter,\n State\n} from \"@stencil/core\";\n/* OTHER LIBRARIES IMPORTS */\nimport { CheckedItemsInfo } from \"../../_helpers/list-selector/list-selector\";\n\n/* CUSTOM IMPORTS */\nimport { config } from \"../../../common/config\";\nimport { Locale } from \"../../../common/locale\";\nimport { renderListItems } from \"../../../common/render-list-item\";\nimport { ObjectData, objectsToListItemData } from \"./helpers\";\n\n@Component({\n tag: \"gx-ide-bpm-objects-selector\",\n styleUrl: \"bpm-objects-selector.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/bpm-objects-selector\"]\n})\nexport class GxIdeBpmExportXpdl {\n // 1.OWN PROPERTIES //\n\n /**\n * The component hard-coded strings translations.\n */\n private _componentLocale: any;\n private renderedFirstTime = false;\n\n private includeAll = false;\n\n // 2. REFERENCE TO ELEMENTS //\n\n @Element() el: HTMLGxIdeBpmObjectsSelectorElement;\n private includeAllCheckboxEl: HTMLChCheckboxElement;\n\n // 3.STATE() VARIABLES //\n\n @State() objects: ObjectData[] = [];\n\n /**\n * Contains the list of selected object ids\n */\n @State() selectedObjects: string[] = [];\n\n // 4.PUBLIC PROPERTY API | WATCH'S //\n\n /**\n * If true it displays the component title on the header\n */\n @Prop() readonly displayTitle = false;\n\n /**\n *The current selection in the list of objects\n */\n @Prop({ mutable: true }) selection: SelectionData;\n\n /**\n * Callback invoked when the user presses the 'Add' button.\n * This function is expected to return a list of selected objects' basic information.\n * @returns {Promise<ObjectData[]>} A Promise that resolves to an array of ObjectData. Each ObjectData contains the ID, icon, and name of an object.\n */\n @Prop() readonly addCallback: () => Promise<ObjectData[]>;\n\n /**\n * Callback invoked when the user presses the 'References' button.\n * Receives a parameter which is an array of IDs of the objects currently added to the list.\n * Returns a Promise that resolves to an array of ObjectData, where each ObjectData contains the ID, icon, and name of an object.\n * @param {string[]} ids - An array of IDs of the objects currently added to the list.\n * @returns {Promise<ObjectData[]>} A Promise that resolves to an array of ObjectData. Each ObjectData contains the ID, icon, and name of an object.\n */\n @Prop() readonly referencesCallback: (ids: string[]) => Promise<ObjectData[]>;\n\n // 5.EVENTS (EMIT) //\n\n /**\n * @description Gets fired when the component has rendered for the first time.\n */\n @Event()\n componentDidRenderFirstTime: EventEmitter<HTMLGxIdeBpmObjectsSelectorElement>;\n\n /**\n * @description Gets fired when the objects selection list change or when 'Select All' checkbox state changes.\n */\n @Event() selectionChanged: EventEmitter<string>;\n\n // 6.COMPONENT LIFECYCLE METHODS //\n\n async componentWillLoad() {\n this._componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n componentDidRender() {\n if (!this.renderedFirstTime) {\n this.componentDidRenderFirstTime.emit(this.el);\n this.renderedFirstTime = true;\n }\n }\n\n // 7.LISTENERS //\n\n // 8.PUBLIC METHODS API //\n\n // 9.LOCAL METHODS //\n\n private objectSelectionChangedHandler = (\n selectedItem: CustomEvent<CheckedItemsInfo>\n ) => {\n const selectedObjects = Array.isArray(selectedItem.detail)\n ? selectedItem.detail\n : [selectedItem.detail];\n\n this.selectedObjects = selectedObjects.map(item => item.itemId);\n };\n\n private removeObjectsHandler = () => {\n this.objects = this.objects.filter(\n object => !this.selectedObjects.includes(object.id)\n );\n\n this.selectedObjects = [];\n this.updateSelection(false);\n };\n\n private removeAllObjectsHandler = () => {\n this.objects = [];\n this.selectedObjects = [];\n this.updateSelection(false);\n };\n\n private includeAllHandler = () => {\n this.includeAll = this.includeAllCheckboxEl.value === \"true\";\n if (this.includeAll) {\n this.selectedObjects = this.objects.map(object => object.id);\n this.objects = [];\n this.updateSelection(true);\n } else {\n this.selectedObjects = [];\n this.updateSelection(false);\n }\n\n this.selectionChanged.emit();\n };\n private addCallbackHandler = async () => {\n if (this.addCallback) {\n const resultObjects = await this.addCallback();\n const newObjects = resultObjects.filter(\n resultObj =>\n !this.objects.some(existingObj => existingObj.id === resultObj.id)\n );\n this.objects = [...this.objects, ...newObjects];\n this.updateSelection(false);\n }\n };\n\n private referencesCallbackHandler = async () => {\n if (this.referencesCallback && this.objects.length > 0) {\n const ids = this.objects.map(obj => obj.id);\n\n const resultObjects = await this.referencesCallback(ids);\n\n const newObjects = resultObjects.filter(\n resultObj =>\n !this.objects.some(existingObj => existingObj.id === resultObj.id)\n );\n\n this.objects = [...this.objects, ...newObjects];\n this.updateSelection(false);\n }\n };\n\n private updateSelection = (includeAll: boolean) => {\n const data: SelectionData = {\n includeAll: this.includeAllCheckboxEl.value === \"true\",\n objectIds: includeAll\n ? this.selectedObjects\n : this.objects.map(object => object.id)\n };\n\n this.selection = data;\n this.selectionChanged.emit();\n };\n\n // 10.RENDER() FUNCTION //\n\n render() {\n return (\n <Host class=\"gx-ide-component gx-ide-bpm-objects-selector\">\n <div class=\"gx-ide-main-wrapper\">\n <gx-ide-container\n containerTitle={\n this.displayTitle ? this._componentLocale.componentName : null\n }\n slimmerFooter={config.gxIdeContainer.slimmerFooter}\n >\n <gx-ide-list-selector\n id=\"path-list\"\n type=\"multi-selection\"\n listName=\"path-list\"\n ordered\n onSelectionChanged={this.objectSelectionChangedHandler}\n class=\"path-list\"\n >\n {renderListItems(objectsToListItemData(this.objects))}\n </gx-ide-list-selector>\n\n <div class=\"controls-wrapper\">\n <label htmlFor=\"include-all\">\n {this._componentLocale.main.includeAllLabel}\n </label>\n <ch-checkbox\n id=\"include-all\"\n accessibleName={this._componentLocale.main.includeAllLabel}\n checkedValue=\"true\"\n unCheckedValue=\"false\"\n value=\"checked\"\n onInput={this.includeAllHandler}\n ref={el =>\n (this.includeAllCheckboxEl = el as HTMLChCheckboxElement)\n }\n ></ch-checkbox>\n <button\n onClick={this.addCallbackHandler}\n disabled={this.includeAll}\n >\n {this._componentLocale.main.addButton}\n </button>\n <button\n onClick={this.referencesCallbackHandler}\n disabled={this.objects.length === 0}\n >\n {this._componentLocale.main.referencesButton}\n </button>\n <button\n onClick={this.removeObjectsHandler}\n disabled={this.selectedObjects.length === 0 || this.includeAll}\n >\n {this._componentLocale.main.removeButton} (\n {this.selectedObjects.length})\n </button>\n </div>\n\n <button\n slot=\"footer-end\"\n onClick={this.removeAllObjectsHandler}\n disabled={this.includeAll}\n >\n {this._componentLocale.main.clearButton}\n </button>\n </gx-ide-container>\n </div>\n </Host>\n );\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,CAAC,gBAAgB,CAAC,IAAI,CAAC,gBAAgB,CACrC,EACT,cACE,OAAO,EAAE,IAAI,CAAC,oBAAoB,EAClC,QAAQ,EAAE,IAAI,CAAC,eAAe,CAAC,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,UAAU,IAE7D,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,YAAY,QACvC,IAAI,CAAC,eAAe,CAAC,MAAM,MACrB,CACL,EAEN,cACE,IAAI,EAAC,YAAY,EACjB,OAAO,EAAE,IAAI,CAAC,uBAAuB,EACrC,QAAQ,EAAE,IAAI,CAAC,UAAU,IAExB,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAChC,CACQ,CACf,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/bpm/objects-selector/helpers.ts","src/components/bpm/objects-selector/bpm-objects-selector.scss?tag=gx-ide-bpm-objects-selector&encapsulation=shadow","src/components/bpm/objects-selector/bpm-objects-selector.tsx"],"sourcesContent":["import { ItemData } from \"../../_helpers/list-selector/list-selector-item/list-selector-item\";\n\nexport type ObjectData = {\n id: string;\n icon: string;\n name: string;\n};\n\nexport const objectsToListItemData = (objects: ObjectData[]): ItemData[] => {\n const itemsData: ItemData[] = [];\n objects.forEach(object => {\n const itemId = object.id;\n const itemValue = object.name;\n const itemIcon: string = object.icon;\n const itemChecked: boolean = false;\n itemsData.push({\n itemId: itemId,\n itemValue: itemValue,\n itemIcon: itemIcon,\n itemChecked: itemChecked\n });\n });\n return itemsData;\n};\n","@import \"../../../global/gx-ide-common.scss\";\n@import \"../../../global/gx-ide-mixins.scss\";\n@import \"../../../global/temporary-tokens-chameleon.scss\";\n\n:host {\n display: block;\n}\n\n.header {\n display: grid;\n grid-template-columns: 1fr min-content min-content;\n grid-template-areas:\n \"label label label\"\n \"input cancel export\";\n grid-gap: var(--gx-ide-grid-column-gap);\n\n .label {\n grid-area: label;\n }\n .input {\n grid-area: input;\n }\n .cancel {\n grid-area: cancel;\n }\n .export {\n grid-area: export;\n }\n}\n","/* STENCIL IMPORTS */\nimport {\n Component,\n Host,\n h,\n Prop,\n Element,\n Event,\n EventEmitter,\n State\n} from \"@stencil/core\";\n/* OTHER LIBRARIES IMPORTS */\nimport { CheckedItemsInfo } from \"../../_helpers/list-selector/list-selector\";\n\n/* CUSTOM IMPORTS */\nimport { config } from \"../../../common/config\";\nimport { Locale } from \"../../../common/locale\";\nimport { renderListItems } from \"../../../common/render-list-item\";\nimport { ObjectData, objectsToListItemData } from \"./helpers\";\n\n@Component({\n tag: \"gx-ide-bpm-objects-selector\",\n styleUrl: \"bpm-objects-selector.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/bpm-objects-selector\"]\n})\nexport class GxIdeBpmExportXpdl {\n // 1.OWN PROPERTIES //\n\n /**\n * The component hard-coded strings translations.\n */\n private _componentLocale: any;\n private renderedFirstTime = false;\n\n private includeAll = false;\n\n // 2. REFERENCE TO ELEMENTS //\n\n @Element() el: HTMLGxIdeBpmObjectsSelectorElement;\n private includeAllCheckboxEl: HTMLChCheckboxElement;\n\n // 3.STATE() VARIABLES //\n\n @State() objects: ObjectData[] = [];\n\n /**\n * Contains the list of selected object ids\n */\n @State() selectedObjects: string[] = [];\n\n // 4.PUBLIC PROPERTY API | WATCH'S //\n\n /**\n * If true it displays the component title on the header\n */\n @Prop() readonly displayTitle = false;\n\n /**\n *The current selection in the list of objects\n */\n @Prop({ mutable: true }) selection: SelectionData;\n\n /**\n * Callback invoked when the user presses the 'Add' button.\n * This function is expected to return a list of selected objects' basic information.\n * @returns {Promise<ObjectData[]>} A Promise that resolves to an array of ObjectData. Each ObjectData contains the ID, icon, and name of an object.\n */\n @Prop() readonly addCallback: () => Promise<ObjectData[]>;\n\n /**\n * Callback invoked when the user presses the 'References' button.\n * Receives a parameter which is an array of IDs of the objects currently added to the list.\n * Returns a Promise that resolves to an array of ObjectData, where each ObjectData contains the ID, icon, and name of an object.\n * @param {string[]} ids - An array of IDs of the objects currently added to the list.\n * @returns {Promise<ObjectData[]>} A Promise that resolves to an array of ObjectData. Each ObjectData contains the ID, icon, and name of an object.\n */\n @Prop() readonly referencesCallback: (ids: string[]) => Promise<ObjectData[]>;\n\n // 5.EVENTS (EMIT) //\n\n /**\n * @description Gets fired when the component has rendered for the first time.\n */\n @Event()\n componentDidRenderFirstTime: EventEmitter<HTMLGxIdeBpmObjectsSelectorElement>;\n\n /**\n * @description Gets fired when the objects selection list change or when 'Select All' checkbox state changes.\n */\n @Event() selectionChanged: EventEmitter<string>;\n\n // 6.COMPONENT LIFECYCLE METHODS //\n\n async componentWillLoad() {\n this._componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n componentDidRender() {\n if (!this.renderedFirstTime) {\n this.componentDidRenderFirstTime.emit(this.el);\n this.renderedFirstTime = true;\n }\n }\n\n // 7.LISTENERS //\n\n // 8.PUBLIC METHODS API //\n\n // 9.LOCAL METHODS //\n\n private objectSelectionChangedHandler = (\n selectedItem: CustomEvent<CheckedItemsInfo>\n ) => {\n const selectedObjects = Array.isArray(selectedItem.detail)\n ? selectedItem.detail\n : [selectedItem.detail];\n\n this.selectedObjects = selectedObjects.map(item => item.itemId);\n };\n\n private removeObjectsHandler = () => {\n this.objects = this.objects.filter(\n object => !this.selectedObjects.includes(object.id)\n );\n\n this.selectedObjects = [];\n this.updateSelection(false);\n };\n\n private removeAllObjectsHandler = () => {\n this.objects = [];\n this.selectedObjects = [];\n this.updateSelection(false);\n };\n\n private includeAllHandler = () => {\n this.includeAll = this.includeAllCheckboxEl.value === \"true\";\n if (this.includeAll) {\n this.selectedObjects = this.objects.map(object => object.id);\n this.objects = [];\n this.updateSelection(true);\n } else {\n this.selectedObjects = [];\n this.updateSelection(false);\n }\n\n this.selectionChanged.emit();\n };\n private addCallbackHandler = async () => {\n if (this.addCallback) {\n const resultObjects = await this.addCallback();\n const newObjects = resultObjects.filter(\n resultObj =>\n !this.objects.some(existingObj => existingObj.id === resultObj.id)\n );\n this.objects = [...this.objects, ...newObjects];\n this.updateSelection(false);\n }\n };\n\n private referencesCallbackHandler = async () => {\n if (this.referencesCallback && this.objects.length > 0) {\n const ids = this.objects.map(obj => obj.id);\n\n const resultObjects = await this.referencesCallback(ids);\n\n const newObjects = resultObjects.filter(\n resultObj =>\n !this.objects.some(existingObj => existingObj.id === resultObj.id)\n );\n\n this.objects = [...this.objects, ...newObjects];\n this.updateSelection(false);\n }\n };\n\n private updateSelection = (includeAll: boolean) => {\n const data: SelectionData = {\n includeAll: this.includeAllCheckboxEl.value === \"true\",\n objectIds: includeAll\n ? this.selectedObjects\n : this.objects.map(object => object.id)\n };\n\n this.selection = data;\n this.selectionChanged.emit();\n };\n\n // 10.RENDER() FUNCTION //\n\n render() {\n return (\n <Host class=\"gx-ide-component gx-ide-bpm-objects-selector\">\n <div class=\"gx-ide-main-wrapper\">\n <gx-ide-container\n containerTitle={\n this.displayTitle ? this._componentLocale.componentName : null\n }\n slimmerFooter={config.gxIdeContainer.slimmerFooter}\n >\n <gx-ide-list-selector\n id=\"path-list\"\n type=\"multi-selection\"\n listName=\"path-list\"\n ordered\n onSelectionChanged={this.objectSelectionChangedHandler}\n class=\"path-list\"\n >\n {renderListItems(objectsToListItemData(this.objects))}\n </gx-ide-list-selector>\n\n <div class=\"controls-wrapper\">\n <label htmlFor=\"include-all\">\n {this._componentLocale.main.includeAllLabel}\n </label>\n <ch-checkbox\n id=\"include-all\"\n accessibleName={this._componentLocale.main.includeAllLabel}\n checkedValue=\"true\"\n unCheckedValue=\"false\"\n value=\"checked\"\n onInput={this.includeAllHandler}\n ref={el =>\n (this.includeAllCheckboxEl = el as HTMLChCheckboxElement)\n }\n ></ch-checkbox>\n <button\n onClick={this.addCallbackHandler}\n disabled={this.includeAll}\n >\n {this._componentLocale.main.addButton}\n </button>\n <button\n onClick={this.referencesCallbackHandler}\n disabled={this.objects.length === 0}\n >\n {this._componentLocale.main.referencesButton}\n </button>\n <button\n onClick={this.removeObjectsHandler}\n disabled={this.selectedObjects.length === 0 || this.includeAll}\n >\n {this._componentLocale.main.removeButton} (\n {this.selectedObjects.length})\n </button>\n </div>\n\n <button\n slot=\"footer-end\"\n onClick={this.removeAllObjectsHandler}\n disabled={this.includeAll}\n >\n {this._componentLocale.main.clearButton}\n </button>\n </gx-ide-container>\n </div>\n </Host>\n );\n }\n}\n\nexport type SelectionData = {\n includeAll: boolean;\n objectIds: string[];\n};\n"],"version":3}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { g as getIconPath } from './assets-manager.js';
|
|
3
|
+
import './MERCURY_ASSETS.js';
|
|
4
|
+
|
|
5
|
+
const fileItemCss = ":host{display:block;inline-size:100%}.file-item{display:grid;grid-template-columns:auto 1fr auto;grid-template-rows:auto;gap:var(--mer-spacing--sm);align-items:center;border:var(--mer-border__width--sm) solid var(--mer-border__default);border-radius:var(--mer-border__radius--sm)}.file-item__icon{display:flex;align-items:center}.file-item__name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;inline-size:100%;font-weight:var(--mer-font__weight--regular)}.file-item__name ch-edit{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;inline-size:100%;font-weight:var(--mer-font__weight--regular)}.file-item__name .label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;inline-size:100%;font-weight:var(--mer-font__weight--regular)}.file-item__actions{display:flex;gap:var(--mer-spacing--xs)}.file-item__actions button:active,.file-item__actions button:focus,.file-item__actions button:hover{background-color:var(--mer-surface__hover)}.file-item__actions button:active{background-color:var(--mer-surface__pressed)}.file-item__progress-container{grid-column:1/-1;display:flex;flex-direction:column;gap:var(--mer-spacing--2xs);inline-size:100%;border:var(--mer-border__width--md) dashed var(--mer-border-color__dim);border-radius:var(--mer-border__radius--md);padding:var(--mer-spacing--sm)}.file-item__progress-header{display:flex;justify-content:space-between;align-items:center;gap:var(--mer-spacing--sm)}.file-item__uploading-text{font-style:italic;color:var(--mer-text__complementary);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-inline-size:calc(100% - var(--mer-spacing--2xl))}.file-item__progress-bar{inline-size:100%}.file-item__progress-bar progress{inline-size:100%;height:var(--mer-spacing--xs);border:none;border-radius:var(--mer-border__radius--sm);overflow:hidden}.file-item__progress-bar progress::-webkit-progress-bar{background-color:transparent}.file-item__progress-bar progress::-webkit-progress-value{background-color:var(--mer-accent__primary)}.file-item__progress-bar progress::-moz-progress-bar{background-color:var(--mer-accent__primary)}";
|
|
6
|
+
|
|
7
|
+
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8
|
+
if (kind === "a" && !f)
|
|
9
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
11
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
12
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
13
|
+
};
|
|
14
|
+
var _FileItem_handleNameChange, _FileItem_handleBlur, _FileItem_handleDelete, _FileItem_handleCancelClick, _FileItem_startEditing;
|
|
15
|
+
const FILE_ICON = getIconPath({
|
|
16
|
+
category: "gemini-tools",
|
|
17
|
+
name: "file",
|
|
18
|
+
colorType: "primary"
|
|
19
|
+
});
|
|
20
|
+
const EDIT_ICON = getIconPath({
|
|
21
|
+
category: "gemini-tools",
|
|
22
|
+
name: "edit",
|
|
23
|
+
colorType: "primary"
|
|
24
|
+
});
|
|
25
|
+
const DELETE_ICON = getIconPath({
|
|
26
|
+
category: "gemini-tools",
|
|
27
|
+
name: "delete",
|
|
28
|
+
colorType: "primary"
|
|
29
|
+
});
|
|
30
|
+
const CANCEL_ICON = getIconPath({
|
|
31
|
+
category: "gemini-tools",
|
|
32
|
+
name: "close",
|
|
33
|
+
colorType: "primary"
|
|
34
|
+
});
|
|
35
|
+
const CSS_BUNDLES = [
|
|
36
|
+
"resets/box-sizing",
|
|
37
|
+
"components/button",
|
|
38
|
+
"components/icon",
|
|
39
|
+
"components/edit",
|
|
40
|
+
"utils/typography",
|
|
41
|
+
"utils/spacing",
|
|
42
|
+
"utils/form",
|
|
43
|
+
"utils/layout",
|
|
44
|
+
"utils/elevation"
|
|
45
|
+
];
|
|
46
|
+
const FileItem = /*@__PURE__*/ proxyCustomElement(class FileItem extends HTMLElement {
|
|
47
|
+
constructor() {
|
|
48
|
+
super();
|
|
49
|
+
this.__registerHost();
|
|
50
|
+
this.__attachShadow();
|
|
51
|
+
this.fileNameChange = createEvent(this, "fileNameChange", 7);
|
|
52
|
+
this.fileDelete = createEvent(this, "fileDelete", 7);
|
|
53
|
+
this.fileCancel = createEvent(this, "fileCancel", 7);
|
|
54
|
+
_FileItem_handleNameChange.set(this, (event) => {
|
|
55
|
+
const newName = event.detail;
|
|
56
|
+
if (newName && newName !== this.currentName) {
|
|
57
|
+
this.currentName = newName;
|
|
58
|
+
this.fileNameChange.emit({
|
|
59
|
+
id: this.file.id,
|
|
60
|
+
name: newName
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
_FileItem_handleBlur.set(this, () => {
|
|
65
|
+
this.isEditing = false;
|
|
66
|
+
});
|
|
67
|
+
/** Handles file deletion */
|
|
68
|
+
_FileItem_handleDelete.set(this, () => {
|
|
69
|
+
this.fileDelete.emit(this.file.id);
|
|
70
|
+
});
|
|
71
|
+
/** Handles upload cancellation */
|
|
72
|
+
_FileItem_handleCancelClick.set(this, (e) => {
|
|
73
|
+
e.preventDefault();
|
|
74
|
+
this.fileCancel.emit(this.file.id);
|
|
75
|
+
});
|
|
76
|
+
/** Starts file name editing */
|
|
77
|
+
_FileItem_startEditing.set(this, () => {
|
|
78
|
+
if (this.editable) {
|
|
79
|
+
this.isEditing = true;
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
this.file = undefined;
|
|
83
|
+
this.editable = false;
|
|
84
|
+
this.fileDeletedCallback = undefined;
|
|
85
|
+
this.fileDeletionErrorCallback = undefined;
|
|
86
|
+
this.isEditing = false;
|
|
87
|
+
this.currentName = undefined;
|
|
88
|
+
}
|
|
89
|
+
/** Updates current name when file prop changes */
|
|
90
|
+
handleFileChange(newFile) {
|
|
91
|
+
this.currentName = newFile.name;
|
|
92
|
+
}
|
|
93
|
+
componentWillLoad() {
|
|
94
|
+
this.currentName = this.file.name;
|
|
95
|
+
}
|
|
96
|
+
render() {
|
|
97
|
+
return (h("div", { class: "file-item" }, h("ch-theme", { model: CSS_BUNDLES }), h("div", { class: "file-item__icon" }, h("ch-image", { src: FILE_ICON, class: "icon-md" })), h("div", { class: "file-item__name" }, this.isEditing ? (h("ch-edit", { value: this.currentName, autoFocus: true, onInput: __classPrivateFieldGet(this, _FileItem_handleNameChange, "f"), onBlur: __classPrivateFieldGet(this, _FileItem_handleBlur, "f"), class: "input" })) : (h("label", { class: "label" }, this.currentName))), h("div", { class: "file-item__actions" }, !this.file.pending && this.editable && (h("button", { class: "button-tertiary button-icon-only", type: "button", onClick: __classPrivateFieldGet(this, _FileItem_startEditing, "f") }, h("ch-image", { src: EDIT_ICON, class: "icon-md" }))), !this.file.pending && (h("button", { class: "button-tertiary button-icon-only", type: "button", onClick: __classPrivateFieldGet(this, _FileItem_handleDelete, "f"), "aria-label": "Delete file" }, h("ch-image", { src: DELETE_ICON, class: "icon-md" })))), this.file.pending && (h("div", { class: "file-item__progress-container" }, h("div", { class: "file-item__progress-header" }, h("span", { class: "file-item__uploading-text" }, "Uploading ", this.currentName, "..."), h("button", { class: "button-tertiary button-icon-only", type: "button", onClick: __classPrivateFieldGet(this, _FileItem_handleCancelClick, "f") }, h("ch-image", { src: CANCEL_ICON, class: "icon-md" }))), h("div", { class: "file-item__progress-bar" }, h("progress", { class: "elevation-1", value: this.file.progress, max: "100" }))))));
|
|
98
|
+
}
|
|
99
|
+
static get watchers() { return {
|
|
100
|
+
"file": ["handleFileChange"]
|
|
101
|
+
}; }
|
|
102
|
+
static get style() { return fileItemCss; }
|
|
103
|
+
}, [1, "gx-ide-file-item", {
|
|
104
|
+
"file": [16],
|
|
105
|
+
"editable": [4],
|
|
106
|
+
"fileDeletedCallback": [16],
|
|
107
|
+
"fileDeletionErrorCallback": [16],
|
|
108
|
+
"isEditing": [32],
|
|
109
|
+
"currentName": [32]
|
|
110
|
+
}, undefined, {
|
|
111
|
+
"file": ["handleFileChange"]
|
|
112
|
+
}]);
|
|
113
|
+
_FileItem_handleNameChange = new WeakMap(), _FileItem_handleBlur = new WeakMap(), _FileItem_handleDelete = new WeakMap(), _FileItem_handleCancelClick = new WeakMap(), _FileItem_startEditing = new WeakMap();
|
|
114
|
+
function defineCustomElement() {
|
|
115
|
+
if (typeof customElements === "undefined") {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
const components = ["gx-ide-file-item"];
|
|
119
|
+
components.forEach(tagName => { switch (tagName) {
|
|
120
|
+
case "gx-ide-file-item":
|
|
121
|
+
if (!customElements.get(tagName)) {
|
|
122
|
+
customElements.define(tagName, FileItem);
|
|
123
|
+
}
|
|
124
|
+
break;
|
|
125
|
+
} });
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export { FileItem as F, defineCustomElement as d };
|
|
129
|
+
|
|
130
|
+
//# sourceMappingURL=file-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"file-item.js","mappings":";;;;AAAA,MAAM,WAAW,GAAG,ujEAAujE;;;;;;;;;;ACa3kE,MAAM,SAAS,GAAG,WAAW,CAAC;IAC5B,QAAQ,EAAE,cAAc;IACxB,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,SAAS;CACrB,CAAC,CAAC;AAEH,MAAM,SAAS,GAAG,WAAW,CAAC;IAC5B,QAAQ,EAAE,cAAc;IACxB,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,SAAS;CACrB,CAAC,CAAC;AAEH,MAAM,WAAW,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B,IACxC,WAAK,KAAK,EAAC,4BAA4B,IACrC,YAAM,KAAK,EAAC,2BAA2B,kBAC1B,IAAI,CAAC,WAAW,QACtB,EACP,cACE,KAAK,EAAC,kCAAkC,EACxC,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,uBAAA,IAAI,mCAAmB,IAEhC,gBAAU,GAAG,EAAE,WAAW,EAAE,KAAK,EAAC,SAAS,GAAG,CACvC,CACL,EACN,WAAK,KAAK,EAAC,yBAAyB,IAClC,gBACE,KAAK,EAAC,aAAa,EACnB,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EACzB,GAAG,EAAC,KAAK,GACT,CACE,CACF,CACP,CACG,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/file-uploader/file-item/file-item.scss?tag=gx-ide-file-item&encapsulation=shadow","src/components/file-uploader/file-item/file-item.tsx"],"sourcesContent":["@import \"../../../global/gx-ide-mixins.scss\";\n\n:host {\n display: block;\n inline-size: 100%;\n}\n\n.file-item {\n display: grid;\n grid-template-columns: auto 1fr auto;\n grid-template-rows: auto;\n gap: var(--mer-spacing--sm);\n align-items: center;\n border: var(--mer-border__width--sm) solid var(--mer-border__default);\n border-radius: var(--mer-border__radius--sm);\n\n &__icon {\n display: flex;\n align-items: center;\n }\n\n &__name {\n @include ellipsis;\n inline-size: 100%;\n font-weight: var(--mer-font__weight--regular);\n\n ch-edit {\n @include ellipsis;\n inline-size: 100%;\n font-weight: var(--mer-font__weight--regular);\n }\n\n .label {\n @include ellipsis;\n inline-size: 100%;\n font-weight: var(--mer-font__weight--regular);\n }\n }\n\n &__actions {\n display: flex;\n gap: var(--mer-spacing--xs);\n\n button {\n &:active,\n &:focus,\n &:hover {\n background-color: var(--mer-surface__hover);\n }\n\n &:active {\n background-color: var(--mer-surface__pressed);\n }\n }\n }\n\n &__progress-container {\n grid-column: 1 / -1;\n display: flex;\n flex-direction: column;\n gap: var(--mer-spacing--2xs);\n inline-size: 100%;\n border: var(--mer-border__width--md) dashed var(--mer-border-color__dim);\n border-radius: var(--mer-border__radius--md);\n padding: var(--mer-spacing--sm);\n }\n\n &__progress-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: var(--mer-spacing--sm);\n }\n\n &__uploading-text {\n font-style: italic;\n color: var(--mer-text__complementary);\n @include ellipsis;\n max-inline-size: calc(100% - var(--mer-spacing--2xl));\n }\n\n &__progress-bar {\n inline-size: 100%;\n\n progress {\n inline-size: 100%;\n height: var(--mer-spacing--xs);\n border: none;\n border-radius: var(--mer-border__radius--sm);\n overflow: hidden;\n\n &::-webkit-progress-bar {\n background-color: transparent;\n }\n\n &::-webkit-progress-value {\n background-color: var(--mer-accent__primary);\n }\n\n &::-moz-progress-bar {\n background-color: var(--mer-accent__primary);\n }\n }\n }\n}\n","import {\n Component,\n h,\n Prop,\n State,\n Event,\n EventEmitter,\n Watch\n} from \"@stencil/core\";\nimport { getIconPath, MercuryBundles } from \"@genexus/mercury\";\nimport { ChEditCustomEvent } from \"@genexus/chameleon-controls-library\";\nimport { FileUploadState } from \"../types\";\n\nconst FILE_ICON = getIconPath({\n category: \"gemini-tools\",\n name: \"file\",\n colorType: \"primary\"\n});\n\nconst EDIT_ICON = getIconPath({\n category: \"gemini-tools\",\n name: \"edit\",\n colorType: \"primary\"\n});\n\nconst DELETE_ICON = getIconPath({\n category: \"gemini-tools\",\n name: \"delete\",\n colorType: \"primary\"\n});\n\nconst CANCEL_ICON = getIconPath({\n category: \"gemini-tools\",\n name: \"close\",\n colorType: \"primary\"\n});\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/button\",\n \"components/icon\",\n \"components/edit\",\n \"utils/typography\",\n \"utils/spacing\",\n \"utils/form\",\n \"utils/layout\",\n \"utils/elevation\"\n];\n\n@Component({\n tag: \"gx-ide-file-item\",\n styleUrl: \"file-item.scss\",\n shadow: true\n})\nexport class FileItem {\n /** File state containing upload information */\n @Prop() readonly file!: FileUploadState;\n\n /** Whether the file name can be edited */\n @Prop() readonly editable: boolean = false;\n\n /** Callback when a file is deleted */\n @Prop() readonly fileDeletedCallback?: (fileId: string) => Promise<void>;\n\n /** Callback when a file deletion error occurs */\n @Prop() readonly fileDeletionErrorCallback?: (data: {\n fileName: string;\n error: string;\n }) => Promise<void>;\n\n /** Updates current name when file prop changes */\n @Watch(\"file\")\n handleFileChange(newFile: FileUploadState) {\n this.currentName = newFile.name;\n }\n\n @State() isEditing: boolean = false;\n @State() currentName: string;\n\n /** Emitted when the file name is changed */\n @Event() fileNameChange: EventEmitter<{ id: string; name: string }>;\n\n /** Emitted when the file is deleted */\n @Event() fileDelete: EventEmitter<string>;\n\n /** Emitted when the file upload is cancelled */\n @Event() fileCancel: EventEmitter<string>;\n\n componentWillLoad() {\n this.currentName = this.file.name;\n }\n\n #handleNameChange = (event: ChEditCustomEvent<string> | InputEvent) => {\n const newName = (event as CustomEvent<string>).detail;\n\n if (newName && newName !== this.currentName) {\n this.currentName = newName;\n this.fileNameChange.emit({\n id: this.file.id,\n name: newName\n });\n }\n };\n\n #handleBlur = () => {\n this.isEditing = false;\n };\n\n /** Handles file deletion */\n #handleDelete = () => {\n this.fileDelete.emit(this.file.id);\n };\n\n /** Handles upload cancellation */\n #handleCancelClick = (e: MouseEvent) => {\n e.preventDefault();\n this.fileCancel.emit(this.file.id);\n };\n\n /** Starts file name editing */\n #startEditing = () => {\n if (this.editable) {\n this.isEditing = true;\n }\n };\n\n render() {\n return (\n <div class=\"file-item\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <div class=\"file-item__icon\">\n <ch-image src={FILE_ICON} class=\"icon-md\" />\n </div>\n\n <div class=\"file-item__name\">\n {this.isEditing ? (\n <ch-edit\n value={this.currentName}\n autoFocus={true}\n onInput={this.#handleNameChange}\n onBlur={this.#handleBlur}\n class=\"input\"\n />\n ) : (\n <label class=\"label\">{this.currentName}</label>\n )}\n </div>\n\n <div class=\"file-item__actions\">\n {!this.file.pending && this.editable && (\n <button\n class=\"button-tertiary button-icon-only\"\n type=\"button\"\n onClick={this.#startEditing}\n >\n <ch-image src={EDIT_ICON} class=\"icon-md\" />\n </button>\n )}\n {!this.file.pending && (\n <button\n class=\"button-tertiary button-icon-only\"\n type=\"button\"\n onClick={this.#handleDelete}\n aria-label=\"Delete file\"\n >\n <ch-image src={DELETE_ICON} class=\"icon-md\" />\n </button>\n )}\n </div>\n\n {this.file.pending && (\n <div class=\"file-item__progress-container\">\n <div class=\"file-item__progress-header\">\n <span class=\"file-item__uploading-text\">\n Uploading {this.currentName}...\n </span>\n <button\n class=\"button-tertiary button-icon-only\"\n type=\"button\"\n onClick={this.#handleCancelClick}\n >\n <ch-image src={CANCEL_ICON} class=\"icon-md\" />\n </button>\n </div>\n <div class=\"file-item__progress-bar\">\n <progress\n class=\"elevation-1\"\n value={this.file.progress}\n max=\"100\"\n />\n </div>\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal
|
|
|
2
2
|
import { L as Locale } from './locale.js';
|
|
3
3
|
import { d as defineCustomElement$2 } from './ai-message.js';
|
|
4
4
|
|
|
5
|
-
const aiAssistantCss = ":root{--ui-animaton-speed:0.2s}.gxg-title-01{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-01-font-weight);font-size:var(--ds-title-01-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-01--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-01-font-weight);font-size:var(--ds-title-01-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-02{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-02-font-weight);font-size:var(--ds-title-02-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-02--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-02-font-weight);font-size:var(--ds-title-02-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable);color:var(--color-on-primary)}.gxg-title-03{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-03-font-weight);font-size:var(--ds-title-03-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-03--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-03-font-weight);font-size:var(--ds-title-03-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-04{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-04-font-weight);font-size:var(--ds-title-04-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-04--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-04-font-weight);font-size:var(--ds-title-04-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-05{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-05-font-weight);font-size:var(--ds-title-05-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-05--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-05-font-weight);font-size:var(--ds-title-05-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-text{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable)}.gxg-text--negative{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-text--gray{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--dimmed)}.gxg-quote{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);font-style:italic}.gxg-quote--negative{color:var(--ds-base-font-color--negative)}.gxg-link{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block}.gxg-link:hover{color:var(--ds-base-font-color--link-hover)}.gxg-link:active{color:var(--ds-base-font-color--link-active)}.gxg-link-gray{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--ds-base-font-color--dimmed)}.gxg-link-gray:hover{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--ds-base-font-color--dimmed);filter:brightness(1.4)}.gxg-alert-error{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--error);display:inline-block}.gxg-alert-warning{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--warning);display:inline-block}.gxg-alert-success{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--success);display:inline-block}.gxg-tab--disabled{color:var(--color-primary-disabled);pointer-events:none}.gxg-tab--disabled[disabled]{color:var(--color-primary-disabled);pointer-events:none}.gxg-label{font-family:var(--ds-base-font-family-primary);font-weight:var(--gxg-label-font-weight);font-size:var(--gxg-label-font-size);color:var(--gxg-label-color);text-align:center;line-height:1.455em;display:flex;align-items:center}.gxg-label:hover{color:var(--color-primary-hover)}.gxg-label:focus{color:var(--color-primary-active)}.gxg-label:active{color:var(--color-primary-active)}.gxg-label[disabled]{color:var(--color-primary-disabled)}.gxg-label--negative{color:var(--color-on-primary)}.gxg-label--negative[disabled]{color:var(--color-on-disabled)}.gxg-scrollbar{}.gxg-scrollbar::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gxg-scrollbar::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gxg-scrollbar::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gxg-scrollbar::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gxg-scrollbar::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}:host{display:grid;block-size:100%}.card-regular{background-color:var(--mer-surface__elevation--01);border:var(--mer-border__width--sm) solid var(--mer-border-color__on-elevation--01);border-radius:var(--mer-border__radius--md);padding:var(--mer-spacing--md) var(--mer-spacing--md);display:grid}.card-small{background-color:var(--mer-surface__elevation--02);border-radius:var(--mer-border__radius--sm);padding:var(--mer-spacing--sm) var(--mer-spacing--sm)}.card-small--actionable:hover{background-color:var(--mer-color__neutral-gray--600)}.card-small--actionable:active{background-color:var(--mer-color__neutral-gray--650)}.card-small:focus-visible{outline:var(--focus__outline-width) var(--focus__outline-style) var(--focus__outline-color);outline-offset:var(--focus__outline-offset)}.empty-state{block-size:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:var(--mer-spacing--sm);text-align:center}.empty-state__title,.empty-state__button,.empty-state__link{max-inline-size:300px}.opacity-0{opacity:0}.opacity-1{opacity:1}.display-contents{display:contents}.gxi-hidden{display:none !important}.gxi-full-height{height:100%}.gxi-overflow-auto{overflow:auto}.gxi-display-flex{display:flex}.align-start{display:flex;align-items:start}.align-center{display:flex;align-items:center}.align-end{display:flex;align-items:end}.overflow-auto{overflow:auto}.justify-start{display:flex;justify-content:start}.justify-center{display:flex;justify-content:center}.justify-end{display:flex;justify-content:end}.grid{display:grid;grid-row-gap:var(--gx-ide-grid-row-gap);grid-column-gap:var(--gx-ide-grid-column-gap);grid-template-rows:auto}ch-grid-cell{display:flex}ch-grid{overflow:auto;height:100%}ch-grid-column{z-index:99;border-bottom:1px solid var(--mer-color__neutral-gray--800)}ch-grid-column:first-child{padding-inline-start:var(--gx-ide-container__padding) !important}ch-grid-column:last-child{padding-inline-end:var(--gx-ide-container__padding) !important}ch-grid-cell{--mer-spacing--xs:var(--gx-ide-container__padding)}.layout{display:grid;gap:var(--mer-spacing--lg);box-sizing:border-box}.layout--two-cols{grid-template-columns:1fr 1fr}.layout--space-above{padding-block-start:var(--mer-spacing--lg)}gxg-tabs{box-shadow:none}:host(.gx-ide-component){height:100% !important;display:flex !important;flex-direction:column !important}:host(:focus-within) gx-ide-top-bar::part(wrapper){background-color:var(--color-secondary-enabled)}.gx-ide-main-wrapper{color:var(--gx-ide-component-text-color);font-weight:var(--mer-font__weight--regular);font-size:var(--mer-font__size--xs);font-family:var(--mer-font-family--primary);height:100%;background-color:var(--gx-ide-component-background-color);display:flex;flex-direction:column;flex-grow:1;box-sizing:border-box}.gx-ide-main{flex-grow:1;overflow-y:auto;}.gx-ide-main::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gx-ide-main::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gx-ide-main::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gx-ide-main::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gx-ide-main::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}.gx-ide-overflow{overflow-y:auto;}.gx-ide-overflow::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gx-ide-overflow::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gx-ide-overflow::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gx-ide-overflow::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gx-ide-overflow::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}.tree-view-primary{font-size:var(--mer-font__size--2xs)}p{margin:0;font-size:var(--mer-font__size--xxs)}.buttons-container{display:flex;gap:var(--mer-spacing--xs)}:root{--ui-animaton-speed:0.2s}.gxg-title-01{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-01-font-weight);font-size:var(--ds-title-01-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-01--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-01-font-weight);font-size:var(--ds-title-01-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-02{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-02-font-weight);font-size:var(--ds-title-02-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-02--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-02-font-weight);font-size:var(--ds-title-02-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable);color:var(--color-on-primary)}.gxg-title-03{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-03-font-weight);font-size:var(--ds-title-03-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-03--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-03-font-weight);font-size:var(--ds-title-03-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-04{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-04-font-weight);font-size:var(--ds-title-04-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-04--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-04-font-weight);font-size:var(--ds-title-04-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-05{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-05-font-weight);font-size:var(--ds-title-05-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-05--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-05-font-weight);font-size:var(--ds-title-05-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-text{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable)}.gxg-text--negative{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-text--gray{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--dimmed)}.gxg-quote{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);font-style:italic}.gxg-quote--negative{color:var(--ds-base-font-color--negative)}.gxg-link{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block}.gxg-link:hover{color:var(--ds-base-font-color--link-hover)}.gxg-link:active{color:var(--ds-base-font-color--link-active)}.gxg-link-gray{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--ds-base-font-color--dimmed)}.gxg-link-gray:hover{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--ds-base-font-color--dimmed);filter:brightness(1.4)}.gxg-alert-error{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--error);display:inline-block}.gxg-alert-warning{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--warning);display:inline-block}.gxg-alert-success{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--success);display:inline-block}.gxg-tab--disabled{color:var(--color-primary-disabled);pointer-events:none}.gxg-tab--disabled[disabled]{color:var(--color-primary-disabled);pointer-events:none}.gxg-label{font-family:var(--ds-base-font-family-primary);font-weight:var(--gxg-label-font-weight);font-size:var(--gxg-label-font-size);color:var(--gxg-label-color);text-align:center;line-height:1.455em;display:flex;align-items:center}.gxg-label:hover{color:var(--color-primary-hover)}.gxg-label:focus{color:var(--color-primary-active)}.gxg-label:active{color:var(--color-primary-active)}.gxg-label[disabled]{color:var(--color-primary-disabled)}.gxg-label--negative{color:var(--color-on-primary)}.gxg-label--negative[disabled]{color:var(--color-on-disabled)}.gxg-scrollbar{}.gxg-scrollbar::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gxg-scrollbar::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gxg-scrollbar::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gxg-scrollbar::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gxg-scrollbar::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}:host{font-family:var(--mer-font-family--primary);display:block;height:100%;flex-basis:286px;flex-shrink:0;height:100%;overflow-y:auto}.gx-ide-main-wrapper{padding:0 10px 52px 10px;background-color:var(--mer-surface);height:100%;display:grid;grid-template-rows:auto 1fr auto;gap:var(--mer-spacing--sm)}.header{padding-block-start:var(--mer-spacing--sm);display:flex;flex-direction:column}.header__actions-wrapper{display:flex;gap:var(--ai-assistant-header-actions-gap);margin-inline-start:auto}.header__first-row{display:flex;gap:var(--mer-spacing--xs);align-items:center;justify-content:space-between}.header__filter{margin-block-start:var(--mer-spacing--xs)}.header__second-row{transition:100ms grid-template-rows;display:grid;grid-template-rows:0fr}.header__second-row--visible{grid-template-rows:1fr}.header .filter-inner-wrapper{overflow:hidden}.messages-wrapper{position:relative;overflow:auto;display:flex;flex-direction:column;scroll-behavior:smooth;}.messages-wrapper::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.messages-wrapper::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.messages-wrapper::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.messages-wrapper::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.messages-wrapper::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}.messages{display:flex;flex-direction:column;list-style-type:none;padding:0;margin:0}.prompt{position:relative;margin-top:auto}.prompt__textarea::part(textarea-wrapper){border:none}.prompt__textarea::part(textarea){border:none;background-color:var(--mer-color__neutral-gray--800)}.prompt__shortcuts{position:absolute;display:flex;align-items:center;gap:var(--mer-spacing--2xs);padding-inline-end:var(--mer-spacing--xs);right:0;top:0;height:100%}.prompt__shortcut{color:var(--mer-color__neutral-gray--400);font-size:var(--mer-font__size--2xs);padding:var(--mer-spacing--3xs) var(--mer-spacing--xs);background-color:var(--mer-color__neutral-gray--700);border-radius:var(--mer-border__radius--xs)}";
|
|
5
|
+
const aiAssistantCss = ":root{--ui-animaton-speed:0.2s}.gxg-title-01{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-01-font-weight);font-size:var(--ds-title-01-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-01--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-01-font-weight);font-size:var(--ds-title-01-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-02{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-02-font-weight);font-size:var(--ds-title-02-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-02--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-02-font-weight);font-size:var(--ds-title-02-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable);color:var(--color-on-primary)}.gxg-title-03{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-03-font-weight);font-size:var(--ds-title-03-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-03--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-03-font-weight);font-size:var(--ds-title-03-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-04{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-04-font-weight);font-size:var(--ds-title-04-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-04--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-04-font-weight);font-size:var(--ds-title-04-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-05{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-05-font-weight);font-size:var(--ds-title-05-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-05--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-05-font-weight);font-size:var(--ds-title-05-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-text{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable)}.gxg-text--negative{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-text--gray{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--dimmed)}.gxg-quote{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);font-style:italic}.gxg-quote--negative{color:var(--ds-base-font-color--negative)}.gxg-link{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block}.gxg-link:hover{color:var(--ds-base-font-color--link-hover)}.gxg-link:active{color:var(--ds-base-font-color--link-active)}.gxg-link-gray{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--ds-base-font-color--dimmed)}.gxg-link-gray:hover{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--ds-base-font-color--dimmed);filter:brightness(1.4)}.gxg-alert-error{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--error);display:inline-block}.gxg-alert-warning{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--warning);display:inline-block}.gxg-alert-success{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--success);display:inline-block}.gxg-tab--disabled{color:var(--color-primary-disabled);pointer-events:none}.gxg-tab--disabled[disabled]{color:var(--color-primary-disabled);pointer-events:none}.gxg-label{font-family:var(--ds-base-font-family-primary);font-weight:var(--gxg-label-font-weight);font-size:var(--gxg-label-font-size);color:var(--gxg-label-color);text-align:center;line-height:1.455em;display:flex;align-items:center}.gxg-label:hover{color:var(--color-primary-hover)}.gxg-label:focus{color:var(--color-primary-active)}.gxg-label:active{color:var(--color-primary-active)}.gxg-label[disabled]{color:var(--color-primary-disabled)}.gxg-label--negative{color:var(--color-on-primary)}.gxg-label--negative[disabled]{color:var(--color-on-disabled)}.gxg-scrollbar{}.gxg-scrollbar::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gxg-scrollbar::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gxg-scrollbar::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gxg-scrollbar::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gxg-scrollbar::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}:host{display:grid;block-size:100%}.card-regular{background-color:var(--mer-surface__elevation--01);border:var(--mer-border__width--sm) solid var(--mer-border-color__on-elevation--01);border-radius:var(--mer-border__radius--md);padding:var(--mer-spacing--md) var(--mer-spacing--md);display:grid}.card-small{background-color:var(--mer-surface__elevation--02);border-radius:var(--mer-border__radius--sm);padding:var(--mer-spacing--sm) var(--mer-spacing--sm)}.card-small--actionable:hover{background-color:var(--mer-color__neutral-gray--600)}.card-small--actionable:active{background-color:var(--mer-color__neutral-gray--650)}.card-small:focus-visible{outline:var(--focus__outline-width) var(--focus__outline-style) var(--focus__outline-color);outline-offset:var(--focus__outline-offset)}.empty-state{block-size:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:var(--mer-spacing--sm);text-align:center}.empty-state__title,.empty-state__button,.empty-state__link{max-inline-size:300px}.opacity-0{opacity:0}.opacity-1{opacity:1}.display-contents{display:contents}.pill-tag{padding:1px 4px;border-radius:2px;min-inline-size:40px;text-align:center;margin-inline-end:10px;font-size:11px}.gxi-hidden{display:none !important}.gxi-full-height{height:100%}.gxi-overflow-auto{overflow:auto}.gxi-display-flex{display:flex}.align-start{display:flex;align-items:start}.align-center{display:flex;align-items:center}.align-end{display:flex;align-items:end}.overflow-auto{overflow:auto}.justify-start{display:flex;justify-content:start}.justify-center{display:flex;justify-content:center}.justify-end{display:flex;justify-content:end}.grid{display:grid;grid-row-gap:var(--gx-ide-grid-row-gap);grid-column-gap:var(--gx-ide-grid-column-gap);grid-template-rows:auto}ch-grid-cell{display:flex}ch-grid{overflow:auto;height:100%}ch-grid-column{z-index:99;border-bottom:1px solid var(--mer-color__neutral-gray--800)}ch-grid-column:first-child{padding-inline-start:var(--gx-ide-container__padding) !important}ch-grid-column:last-child{padding-inline-end:var(--gx-ide-container__padding) !important}ch-grid-cell{--mer-spacing--xs:var(--gx-ide-container__padding)}.layout{display:grid;gap:var(--mer-spacing--lg);box-sizing:border-box}.layout--two-cols{grid-template-columns:1fr 1fr}.layout--space-above{padding-block-start:var(--mer-spacing--lg)}gxg-tabs{box-shadow:none}:host(.gx-ide-component){height:100% !important;display:flex !important;flex-direction:column !important}:host(:focus-within) gx-ide-top-bar::part(wrapper){background-color:var(--color-secondary-enabled)}.gx-ide-main-wrapper{color:var(--gx-ide-component-text-color);font-weight:var(--mer-font__weight--regular);font-size:var(--mer-font__size--xs);font-family:var(--mer-font-family--primary);height:100%;background-color:var(--gx-ide-component-background-color);display:flex;flex-direction:column;flex-grow:1;box-sizing:border-box}.gx-ide-main{flex-grow:1;overflow-y:auto;}.gx-ide-main::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gx-ide-main::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gx-ide-main::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gx-ide-main::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gx-ide-main::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}.gx-ide-overflow{overflow-y:auto;}.gx-ide-overflow::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gx-ide-overflow::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gx-ide-overflow::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gx-ide-overflow::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gx-ide-overflow::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}.tree-view-primary{font-size:var(--mer-font__size--2xs)}p{margin:0;font-size:var(--mer-font__size--xxs)}.buttons-container{display:flex;gap:var(--mer-spacing--xs)}:root{--ui-animaton-speed:0.2s}.gxg-title-01{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-01-font-weight);font-size:var(--ds-title-01-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-01--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-01-font-weight);font-size:var(--ds-title-01-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-02{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-02-font-weight);font-size:var(--ds-title-02-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-02--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-02-font-weight);font-size:var(--ds-title-02-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable);color:var(--color-on-primary)}.gxg-title-03{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-03-font-weight);font-size:var(--ds-title-03-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-03--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-03-font-weight);font-size:var(--ds-title-03-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-04{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-04-font-weight);font-size:var(--ds-title-04-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-04--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-04-font-weight);font-size:var(--ds-title-04-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-05{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-05-font-weight);font-size:var(--ds-title-05-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-05--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-05-font-weight);font-size:var(--ds-title-05-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-text{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable)}.gxg-text--negative{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-text--gray{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--dimmed)}.gxg-quote{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);font-style:italic}.gxg-quote--negative{color:var(--ds-base-font-color--negative)}.gxg-link{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block}.gxg-link:hover{color:var(--ds-base-font-color--link-hover)}.gxg-link:active{color:var(--ds-base-font-color--link-active)}.gxg-link-gray{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--ds-base-font-color--dimmed)}.gxg-link-gray:hover{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--ds-base-font-color--dimmed);filter:brightness(1.4)}.gxg-alert-error{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--error);display:inline-block}.gxg-alert-warning{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--warning);display:inline-block}.gxg-alert-success{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--success);display:inline-block}.gxg-tab--disabled{color:var(--color-primary-disabled);pointer-events:none}.gxg-tab--disabled[disabled]{color:var(--color-primary-disabled);pointer-events:none}.gxg-label{font-family:var(--ds-base-font-family-primary);font-weight:var(--gxg-label-font-weight);font-size:var(--gxg-label-font-size);color:var(--gxg-label-color);text-align:center;line-height:1.455em;display:flex;align-items:center}.gxg-label:hover{color:var(--color-primary-hover)}.gxg-label:focus{color:var(--color-primary-active)}.gxg-label:active{color:var(--color-primary-active)}.gxg-label[disabled]{color:var(--color-primary-disabled)}.gxg-label--negative{color:var(--color-on-primary)}.gxg-label--negative[disabled]{color:var(--color-on-disabled)}.gxg-scrollbar{}.gxg-scrollbar::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gxg-scrollbar::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gxg-scrollbar::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gxg-scrollbar::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gxg-scrollbar::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}:host{font-family:var(--mer-font-family--primary);display:block;height:100%;flex-basis:286px;flex-shrink:0;height:100%;overflow-y:auto}.gx-ide-main-wrapper{padding:0 10px 52px 10px;background-color:var(--mer-surface);height:100%;display:grid;grid-template-rows:auto 1fr auto;gap:var(--mer-spacing--sm)}.header{padding-block-start:var(--mer-spacing--sm);display:flex;flex-direction:column}.header__actions-wrapper{display:flex;gap:var(--ai-assistant-header-actions-gap);margin-inline-start:auto}.header__first-row{display:flex;gap:var(--mer-spacing--xs);align-items:center;justify-content:space-between}.header__filter{margin-block-start:var(--mer-spacing--xs)}.header__second-row{transition:100ms grid-template-rows;display:grid;grid-template-rows:0fr}.header__second-row--visible{grid-template-rows:1fr}.header .filter-inner-wrapper{overflow:hidden}.messages-wrapper{position:relative;overflow:auto;display:flex;flex-direction:column;scroll-behavior:smooth;}.messages-wrapper::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.messages-wrapper::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.messages-wrapper::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.messages-wrapper::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.messages-wrapper::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}.messages{display:flex;flex-direction:column;list-style-type:none;padding:0;margin:0}.prompt{position:relative;margin-top:auto}.prompt__textarea::part(textarea-wrapper){border:none}.prompt__textarea::part(textarea){border:none;background-color:var(--mer-color__neutral-gray--800)}.prompt__shortcuts{position:absolute;display:flex;align-items:center;gap:var(--mer-spacing--2xs);padding-inline-end:var(--mer-spacing--xs);right:0;top:0;height:100%}.prompt__shortcut{color:var(--mer-color__neutral-gray--400);font-size:var(--mer-font__size--2xs);padding:var(--mer-spacing--3xs) var(--mer-spacing--xs);background-color:var(--mer-color__neutral-gray--700);border-radius:var(--mer-border__radius--xs)}";
|
|
6
6
|
|
|
7
7
|
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8
8
|
if (kind === "a" && !f)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gx-ide-ai-assistant.js","mappings":";;;;AAAA,MAAM,cAAc,GAAG,+lsBAA+lsB;;;;;;;;;;ACYtnsB,MAAM,WAAW,GAAmB;IAClC,mBAAmB;IACnB,iBAAiB;IACjB,mBAAmB;CACpB,CAAC;MAYW,aAAa;;;;;QAOhB,aAAQ,GAAG,IAAI,CAAC;QAChB,uBAAkB,GAAG,IAAI,CAAC;QAiJ1B,yBAAoB,GAAG;;YAC7B,IACE,CAA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AI,CAAC,iBAAiB,EAC9B,OAAO,EAAE,IAAI,CAAC,kBAAkB,EAChC,QAAQ,EAAE,IAAI,CAAC,YAAY,EAC3B,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,UAAU,GAAG,EAAgC,CAAC,GAC5C,EACpB,CAAC,IAAI,CAAC,YAAY;YACnB,CAAC,IAAI,CAAC,YAAY;YAClB,CAAC,IAAI,CAAC,cAAc;YACpB,CAAA,MAAA,IAAI,CAAC,cAAc,0CAAE,MAAM,IAAG,CAAC,IAC7B,WACE,KAAK,EAAE;gBACL,iBAAiB,EAAE,IAAI;aACxB,IAEA,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC;;YAEnC,OAAO,CAAC,IAAI,CAAC,IACX,YAAM,KAAK,EAAC,kBAAkB,IAAE,QAAQ,CAAQ,IAC9C,IAAI,CAAC;SACV,CAAC,CACE,IACJ,IAAI,CACJ,CACF,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ai-assistant/ai-assistant.scss?tag=gx-ide-ai-assistant&encapsulation=shadow","src/components/ai-assistant/ai-assistant.tsx"],"sourcesContent":["@import \"../../global/gx-ide-common.scss\";\n@import \"../../global/gx-ide-mixins.scss\";\n@import \"../../../node_modules/@genexus/gemini/dist/gemini/globals/mixins.scss\";\n\n:host {\n font-family: var(--mer-font-family--primary);\n display: block;\n height: 100%;\n flex-basis: 286px;\n flex-shrink: 0;\n height: 100%;\n overflow-y: auto;\n}\n.gx-ide-main-wrapper {\n padding: 0 10px 52px 10px;\n background-color: var(--mer-surface);\n height: 100%;\n display: grid;\n grid-template-rows: auto 1fr auto;\n gap: var(--mer-spacing--sm);\n}\n\n/*--- Header ---*/\n.header {\n padding-block-start: var(--mer-spacing--sm);\n display: flex;\n flex-direction: column;\n\n &__actions-wrapper {\n display: flex;\n gap: var(--ai-assistant-header-actions-gap);\n margin-inline-start: auto;\n }\n &__first-row {\n display: flex;\n gap: var(--mer-spacing--xs);\n align-items: center;\n justify-content: space-between;\n }\n &__filter {\n margin-block-start: var(--mer-spacing--xs);\n }\n &__second-row {\n transition: 100ms grid-template-rows;\n display: grid;\n grid-template-rows: 0fr;\n\n &--visible {\n grid-template-rows: 1fr;\n }\n }\n .filter-inner-wrapper {\n overflow: hidden;\n }\n}\n\n/*--- Messages ---*/\n.messages-wrapper {\n position: relative;\n overflow: auto;\n display: flex;\n flex-direction: column;\n scroll-behavior: smooth;\n @include gxg-scrollbar();\n}\n.messages {\n display: flex;\n flex-direction: column;\n list-style-type: none;\n padding: 0;\n margin: 0;\n}\n\n/*--- Prompt ---*/\n.prompt {\n position: relative;\n margin-top: auto;\n\n &__textarea {\n &::part(textarea-wrapper) {\n border: none;\n }\n &::part(textarea) {\n border: none;\n background-color: var(--mer-color__neutral-gray--800);\n }\n }\n &__shortcuts {\n position: absolute;\n display: flex;\n align-items: center;\n gap: var(--mer-spacing--2xs);\n padding-inline-end: var(--mer-spacing--xs);\n right: 0;\n top: 0;\n height: 100%;\n }\n &__shortcut {\n color: var(--mer-color__neutral-gray--400);\n font-size: var(--mer-font__size--2xs);\n padding: var(--mer-spacing--3xs) var(--mer-spacing--xs);\n background-color: var(--mer-color__neutral-gray--700);\n border-radius: var(--mer-border__radius--xs);\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Element,\n Method,\n State,\n Watch,\n Listen\n} from \"@stencil/core\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/icon\",\n \"components/button\"\n];\n\nimport { Locale } from \"../../common/locale\";\n\nimport { MercuryBundles } from \"@genexus/mercury\";\n\n@Component({\n tag: \"gx-ide-ai-assistant\",\n styleUrl: \"ai-assistant.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/ai-assistant\"]\n})\nexport class GxIdeTemplate {\n /**\n * The component hard-coded strings translations.\n */\n private _componentLocale: any;\n /* lastUserMessageHeight is used to set the appropriate height on the textarea, if user presses arrowUp (recover last message)*/\n private lastUserMessageHeight: number;\n private setFocus = true;\n private scrollToBottomFlag = true;\n\n @Element() el: HTMLGxIdeAiAssistantElement;\n private textAreaEl!: HTMLGxgFormTextareaElement;\n private textareaShadowPart: HTMLTextAreaElement;\n private filterEl: HTMLGxgFormTextElement;\n private messagesWrapperEl!: HTMLDivElement;\n\n /**\n * Flag used to hide the shortcuts\n */\n @State() userHasTyped = false;\n\n /**\n * This is true if the last message is of type 'assistant-in-progress'\n */\n @State() aIInProgress = false;\n @Watch(\"aIInProgress\")\n watchAIInProgressHandler(aiInProgress: boolean) {\n if (!aiInProgress) {\n this.setFocus = true;\n }\n }\n\n /**\n * This displays or hides the messages filter\n */\n @State() showFilter = false;\n\n /**\n * True if the prompt textbox has focus\n */\n @State() promptHasFocus = false;\n\n /**\n * The filter value\n */\n @State() filterValue: string;\n\n /**\n * List of messages displayed by the component\n */\n @Prop({ mutable: true }) messages: Message[] = [];\n @Watch(\"messages\")\n watchMessagesHandler() {\n this.evaluateAiInProgress();\n this.evaluateAiStatus();\n }\n\n /**\n * The prompt textarea max-height\n */\n @Prop() readonly promptMaxHeight = \"128px\";\n\n /**\n * A temporary property to illustrate the assistant status\n */\n @Prop({ mutable: true }) assistantStatus: AiStatus = \"indeterminate\";\n\n /**\n * List of keys that make up the shortcut to focus on the component's text input\n */\n @Prop() readonly focusShortcuts: string[];\n\n /**\n * List of keys that make up the shortcut to focus on the component's text input\n */\n @Prop() readonly userMessageCallback: UserMessageCallback;\n\n /**\n * Callback that must be invoked when the conversation is cleared, using the header button.\n */\n @Prop() readonly clearCallback: () => Promise<void>;\n\n /**\n * the prompt value\n */\n @Prop() readonly promptValue: string;\n\n /**\n * If tue, it will display a filter.\n */\n @Prop() readonly filter = true;\n\n async componentWillLoad() {\n this._componentLocale = await Locale.getComponentStrings(this.el);\n this.evaluateAiInProgress();\n this.evaluateAiStatus();\n this.attachShortcuts();\n }\n\n componentDidLoad() {\n this.textareaShadowPart =\n this.textAreaEl.shadowRoot.querySelector(\"textarea\");\n this.el.addEventListener(\"mousedown\", this.#mouseDownListener);\n this.el.addEventListener(\"mouseup\", this.#mouseUpListener);\n }\n\n componentDidRender() {\n if (this.setFocus) {\n setTimeout(() => {\n /* Doesn't seems to work without the setTimeout */\n this.textAreaEl.focus();\n this.setFocus = false;\n }, 50);\n }\n setTimeout(() => {\n this.scrollToBottom();\n }, 200);\n }\n\n @Listen(\"focus\", { capture: true })\n handleFocus(event: FocusEvent) {\n if (this.textAreaEl) {\n event.preventDefault();\n this.textAreaEl.focus();\n }\n }\n\n /**\n * Clear the list of messages\n */\n @Method()\n async clear() {\n this.messages = [];\n }\n\n /**\n * Add a message. This method will be used by the host to add messages from the assistant\n */\n @Method()\n async addMessage(message: Message) {\n if (message.text?.length > 0) {\n const messages = [...this.messages];\n const updateInProgressMessage =\n messages?.length > 0 &&\n messages[messages.length - 1].type === \"assistant-in-progress\";\n if (updateInProgressMessage) {\n messages.pop();\n }\n messages.push(message);\n this.messages = messages;\n }\n }\n\n private evaluateAiInProgress = () => {\n if (\n this.messages?.length > 0 &&\n this.messages[this.messages.length - 1].type === \"assistant-in-progress\"\n ) {\n this.aIInProgress = true;\n } else {\n this.aIInProgress = false;\n }\n };\n\n private evaluateAiStatus = () => {\n if (this.messages?.length === 0) {\n this.assistantStatus = \"indeterminate\";\n return;\n }\n if (\n this.messages[this.messages.length - 1].type ===\n \"assistant-in-progress\" ||\n this.messages[this.messages.length - 1].type === \"user\"\n ) {\n this.assistantStatus = \"indeterminate\";\n } else if (\n this.messages[this.messages.length - 1].type === \"assistant-error\"\n ) {\n this.assistantStatus = \"error\";\n } else {\n this.assistantStatus = \"success\";\n }\n };\n\n private renderMessage = (\n message: Message,\n i: number\n ): HTMLLIElement | void => {\n if (message.text.length > 0) {\n return (\n <gx-ide-ai-message\n style={{\n \"--primary-color\": \"lightblue\"\n }}\n message={message.text}\n messageType={message.type}\n hidden={message.hidden}\n filterValue={this.filterValue}\n key={`${i.toString()}-${message.type}`}\n translations={this._componentLocale.aiMessage}\n aiAssistantHostRef={this.el}\n ></gx-ide-ai-message>\n );\n }\n };\n\n private textAreaInputHandler = () => {\n this.userHasTyped = true;\n this.showFilter = false;\n this.filterEl.value = \"\";\n this.filterValue = \"\";\n this.scrollToBottomFlag = true;\n };\n\n private promptEnterHandler = async (prompt: CustomEvent<string>) => {\n /* First remove double spaces */\n const promptTrimmed = prompt.detail.replace(/\\s+/g, \" \");\n /* Update textarea value to get the proper height */\n this.textAreaEl.value = promptTrimmed;\n setTimeout(() => {\n /* Then save the actual height (setTimeOut required) */\n this.lastUserMessageHeight = this.textAreaEl.offsetHeight;\n }, 0);\n /* The clear the textarea */\n this.textAreaEl.value = \"\";\n /* Insert the user message */\n this.addMessage({\n type: \"user\",\n text: promptTrimmed\n });\n /* Call the callback */\n if (this.userMessageCallback && !this.aIInProgress) {\n this.aIInProgress = true;\n this.userMessageCallback(promptTrimmed).then(() => {\n this.aIInProgress = false;\n });\n }\n };\n\n private filterMessagesHandler = (e: CustomEvent<string>) => {\n this.scrollToBottomFlag = false;\n this.filterValue = e.detail.toLowerCase();\n const filteredMessages = [...this.messages];\n filteredMessages.forEach(message => {\n if (message.text.toLowerCase().includes(this.filterValue)) {\n message.hidden = false;\n } else {\n message.hidden = true;\n }\n });\n this.messages = filteredMessages;\n };\n\n private clearMessages = () => {\n this.messages = [];\n this.textAreaEl.focus();\n if (this.clearCallback) {\n this.clearCallback();\n }\n };\n\n private attachShortcuts = () => {\n if (this.focusShortcuts?.length > 0) {\n const ctrlFocusIndex = this.focusShortcuts.findIndex(\n key => key.toLocaleLowerCase() === \"ctrl\"\n );\n const shiftFocusIndex = this.focusShortcuts.findIndex(\n key => key.toLocaleLowerCase() === \"shift\"\n );\n const cmdKeyIndex = this.focusShortcuts.findIndex(\n key => key.toLocaleLowerCase() === \"cmd\"\n );\n const keyFocus = this.focusShortcuts\n .find(key => {\n return (\n key.toLocaleLowerCase() !== \"ctrl\" &&\n key.toLocaleLowerCase() !== \"shift\" &&\n key.toLocaleLowerCase() !== \"cmd\"\n );\n })\n .toLowerCase();\n document.addEventListener(\"keydown\", (e: KeyboardEvent) => {\n if (e.key === keyFocus && ctrlFocusIndex !== -1 && e.ctrlKey) {\n this.textAreaEl.focus();\n this.userHasTyped = true;\n } else if (e.key === keyFocus && shiftFocusIndex !== -1 && e.shiftKey) {\n this.textAreaEl.focus();\n this.userHasTyped = true;\n } else if (e.key === keyFocus && cmdKeyIndex !== -1 && e.metaKey) {\n this.textAreaEl.focus();\n this.userHasTyped = true;\n }\n });\n }\n };\n\n private promptArrowUpHandler = () => {\n this.userHasTyped = true;\n const lastUserMessage = this.messages?.find(message => {\n return message.type === \"user\";\n });\n if (lastUserMessage) {\n if (this.lastUserMessageHeight) {\n this.textareaShadowPart.style.height = `${this.lastUserMessageHeight}px`;\n }\n this.textAreaEl.value = lastUserMessage.text;\n }\n };\n\n private toggleFilterHandler = () => {\n this.showFilter = !this.showFilter;\n if (this.showFilter) {\n this.filterEl.focus();\n }\n };\n\n private promptFocusHandler = () => {\n this.promptHasFocus = true;\n };\n\n private promptBlurHandler = () => {\n this.promptHasFocus = false;\n };\n\n private scrollToBottom = () => {\n if (this.scrollToBottomFlag) {\n this.messagesWrapperEl.scrollTo(0, this.messagesWrapperEl.scrollHeight);\n this.messagesWrapperEl.scrollTop =\n this.messagesWrapperEl.scrollHeight -\n this.messagesWrapperEl.clientHeight;\n }\n };\n\n #mouseDownListener = () => {\n this.el.removeAttribute(\"tabindex\");\n };\n\n #mouseUpListener = () => {\n this.el.setAttribute(\"tabindex\", \"0\");\n };\n\n render() {\n return (\n <Host\n class={{\n [`assistant--${this.assistantStatus}`]: true,\n \"assistant--in-progress\": this.aIInProgress\n }}\n tabindex=\"0\"\n >\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <div class=\"gx-ide-main-wrapper\">\n <slot></slot>\n <header class=\"header\">\n <div class=\"header__first-row\">\n <gxg-title type=\"title-02\">\n {this._componentLocale.componentName}\n </gxg-title>\n <div class=\"header__actions-wrapper\">\n {this.filter ? (\n <gxg-button\n class=\"header__filter-button\"\n type=\"tertiary\"\n icon=\"menus/find\"\n onClick={this.toggleFilterHandler}\n disabled={this.messages.length === 0}\n ></gxg-button>\n ) : null}\n\n <gxg-button\n class=\"header__clear-button\"\n type=\"tertiary\"\n icon=\"bpm/delete\"\n onClick={this.clearMessages}\n disabled={this.messages.length === 0}\n ></gxg-button>\n </div>\n </div>\n {this.filter ? (\n <div\n class={{\n \"header__second-row\": true,\n \"header__second-row--visible\": this.showFilter\n }}\n >\n <div class=\"filter-inner-wrapper\">\n <gxg-form-text\n class=\"header__filter\"\n onInput={this.filterMessagesHandler as any}\n ref={el => (this.filterEl = el as HTMLGxgFormTextElement)}\n ></gxg-form-text>\n </div>\n </div>\n ) : null}\n </header>\n\n <div\n class={{\n \"messages-wrapper\": true,\n \"scrollable\": true\n }}\n ref={el => (this.messagesWrapperEl = el as HTMLDivElement)}\n >\n {this.messages?.length ? (\n <ol class={{ messages: true }}>\n {this.messages.map((message, i) => {\n return this.renderMessage(message, i);\n })}\n </ol>\n ) : null}\n </div>\n\n <div\n class={{\n prompt: true\n }}\n >\n <gxg-form-textarea\n ai\n class=\"prompt__textarea\"\n value={this.promptValue}\n maxHeight={this.promptMaxHeight}\n placeholder={\n this.aIInProgress\n ? this._componentLocale.processingQueryPlaceholder\n : this._componentLocale.promptPlaceholder\n }\n onInput={this.textAreaInputHandler}\n onEnter={this.promptEnterHandler}\n onArrowUpPressed={this.promptArrowUpHandler}\n onBlur={this.promptBlurHandler}\n onFocus={this.promptFocusHandler}\n disabled={this.aIInProgress}\n ref={el => (this.textAreaEl = el as HTMLGxgFormTextareaElement)}\n ></gxg-form-textarea>\n {!this.userHasTyped &&\n !this.aIInProgress &&\n !this.promptHasFocus &&\n this.focusShortcuts?.length > 0 ? (\n <div\n class={{\n prompt__shortcuts: true\n }}\n >\n {this.focusShortcuts.map((shortcut, i) => {\n /* Up to three keys allowed*/\n return i <= 2 ? (\n <span class=\"prompt__shortcut\">{shortcut}</span>\n ) : null;\n })}\n </div>\n ) : null}\n </div>\n </div>\n </Host>\n );\n }\n}\n\nexport type AiStatus = \"indeterminate\" | \"success\" | \"error\";\n\nexport type Message = {\n type: MessageType;\n text: string;\n hidden?: boolean;\n filterValue?: string;\n};\n\nexport type MessageType =\n | \"user\"\n | \"assistant-chat\"\n | \"assistant-action\"\n | \"assistant-in-progress\"\n | \"assistant-error\";\n\nexport type UserMessageCallback = (text: string) => Promise<void>;\n"],"version":3}
|
|
1
|
+
{"file":"gx-ide-ai-assistant.js","mappings":";;;;AAAA,MAAM,cAAc,GAAG,wtsBAAwtsB;;;;;;;;;;ACY/usB,MAAM,WAAW,GAAmB;IAClC,mBAAmB;IACnB,iBAAiB;IACjB,mBAAmB;CACpB,CAAC;MAYW,aAAa;;;;;QAOhB,aAAQ,GAAG,IAAI,CAAC;QAChB,uBAAkB,GAAG,IAAI,CAAC;QAiJ1B,yBAAoB,GAAG;;YAC7B,IACE,CAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,MAAM,IAAG,CAAC;gBACzB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,KAAK,uBAAuB,EACxE;gBACA,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;aAC1B;iBAAM;gBACL,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;aAC3B;SACF,CAAC;QAEM,qBAAgB,GAAG;;YACzB,IAAI,CAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,MAAM,MAAK,CAAC,EAAE;gBAC/B,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;gBACvC,OAAO;aACR;YACD,IACE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI;gBAC1C,uBAAuB;gBACzB,IA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IACJ,IAAI,CACJ,CACF,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ai-assistant/ai-assistant.scss?tag=gx-ide-ai-assistant&encapsulation=shadow","src/components/ai-assistant/ai-assistant.tsx"],"sourcesContent":["@import \"../../global/gx-ide-common.scss\";\n@import \"../../global/gx-ide-mixins.scss\";\n@import \"../../../node_modules/@genexus/gemini/dist/gemini/globals/mixins.scss\";\n\n:host {\n font-family: var(--mer-font-family--primary);\n display: block;\n height: 100%;\n flex-basis: 286px;\n flex-shrink: 0;\n height: 100%;\n overflow-y: auto;\n}\n.gx-ide-main-wrapper {\n padding: 0 10px 52px 10px;\n background-color: var(--mer-surface);\n height: 100%;\n display: grid;\n grid-template-rows: auto 1fr auto;\n gap: var(--mer-spacing--sm);\n}\n\n/*--- Header ---*/\n.header {\n padding-block-start: var(--mer-spacing--sm);\n display: flex;\n flex-direction: column;\n\n &__actions-wrapper {\n display: flex;\n gap: var(--ai-assistant-header-actions-gap);\n margin-inline-start: auto;\n }\n &__first-row {\n display: flex;\n gap: var(--mer-spacing--xs);\n align-items: center;\n justify-content: space-between;\n }\n &__filter {\n margin-block-start: var(--mer-spacing--xs);\n }\n &__second-row {\n transition: 100ms grid-template-rows;\n display: grid;\n grid-template-rows: 0fr;\n\n &--visible {\n grid-template-rows: 1fr;\n }\n }\n .filter-inner-wrapper {\n overflow: hidden;\n }\n}\n\n/*--- Messages ---*/\n.messages-wrapper {\n position: relative;\n overflow: auto;\n display: flex;\n flex-direction: column;\n scroll-behavior: smooth;\n @include gxg-scrollbar();\n}\n.messages {\n display: flex;\n flex-direction: column;\n list-style-type: none;\n padding: 0;\n margin: 0;\n}\n\n/*--- Prompt ---*/\n.prompt {\n position: relative;\n margin-top: auto;\n\n &__textarea {\n &::part(textarea-wrapper) {\n border: none;\n }\n &::part(textarea) {\n border: none;\n background-color: var(--mer-color__neutral-gray--800);\n }\n }\n &__shortcuts {\n position: absolute;\n display: flex;\n align-items: center;\n gap: var(--mer-spacing--2xs);\n padding-inline-end: var(--mer-spacing--xs);\n right: 0;\n top: 0;\n height: 100%;\n }\n &__shortcut {\n color: var(--mer-color__neutral-gray--400);\n font-size: var(--mer-font__size--2xs);\n padding: var(--mer-spacing--3xs) var(--mer-spacing--xs);\n background-color: var(--mer-color__neutral-gray--700);\n border-radius: var(--mer-border__radius--xs);\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Element,\n Method,\n State,\n Watch,\n Listen\n} from \"@stencil/core\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/icon\",\n \"components/button\"\n];\n\nimport { Locale } from \"../../common/locale\";\n\nimport { MercuryBundles } from \"@genexus/mercury\";\n\n@Component({\n tag: \"gx-ide-ai-assistant\",\n styleUrl: \"ai-assistant.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/ai-assistant\"]\n})\nexport class GxIdeTemplate {\n /**\n * The component hard-coded strings translations.\n */\n private _componentLocale: any;\n /* lastUserMessageHeight is used to set the appropriate height on the textarea, if user presses arrowUp (recover last message)*/\n private lastUserMessageHeight: number;\n private setFocus = true;\n private scrollToBottomFlag = true;\n\n @Element() el: HTMLGxIdeAiAssistantElement;\n private textAreaEl!: HTMLGxgFormTextareaElement;\n private textareaShadowPart: HTMLTextAreaElement;\n private filterEl: HTMLGxgFormTextElement;\n private messagesWrapperEl!: HTMLDivElement;\n\n /**\n * Flag used to hide the shortcuts\n */\n @State() userHasTyped = false;\n\n /**\n * This is true if the last message is of type 'assistant-in-progress'\n */\n @State() aIInProgress = false;\n @Watch(\"aIInProgress\")\n watchAIInProgressHandler(aiInProgress: boolean) {\n if (!aiInProgress) {\n this.setFocus = true;\n }\n }\n\n /**\n * This displays or hides the messages filter\n */\n @State() showFilter = false;\n\n /**\n * True if the prompt textbox has focus\n */\n @State() promptHasFocus = false;\n\n /**\n * The filter value\n */\n @State() filterValue: string;\n\n /**\n * List of messages displayed by the component\n */\n @Prop({ mutable: true }) messages: Message[] = [];\n @Watch(\"messages\")\n watchMessagesHandler() {\n this.evaluateAiInProgress();\n this.evaluateAiStatus();\n }\n\n /**\n * The prompt textarea max-height\n */\n @Prop() readonly promptMaxHeight = \"128px\";\n\n /**\n * A temporary property to illustrate the assistant status\n */\n @Prop({ mutable: true }) assistantStatus: AiStatus = \"indeterminate\";\n\n /**\n * List of keys that make up the shortcut to focus on the component's text input\n */\n @Prop() readonly focusShortcuts: string[];\n\n /**\n * List of keys that make up the shortcut to focus on the component's text input\n */\n @Prop() readonly userMessageCallback: UserMessageCallback;\n\n /**\n * Callback that must be invoked when the conversation is cleared, using the header button.\n */\n @Prop() readonly clearCallback: () => Promise<void>;\n\n /**\n * the prompt value\n */\n @Prop() readonly promptValue: string;\n\n /**\n * If tue, it will display a filter.\n */\n @Prop() readonly filter = true;\n\n async componentWillLoad() {\n this._componentLocale = await Locale.getComponentStrings(this.el);\n this.evaluateAiInProgress();\n this.evaluateAiStatus();\n this.attachShortcuts();\n }\n\n componentDidLoad() {\n this.textareaShadowPart =\n this.textAreaEl.shadowRoot.querySelector(\"textarea\");\n this.el.addEventListener(\"mousedown\", this.#mouseDownListener);\n this.el.addEventListener(\"mouseup\", this.#mouseUpListener);\n }\n\n componentDidRender() {\n if (this.setFocus) {\n setTimeout(() => {\n /* Doesn't seems to work without the setTimeout */\n this.textAreaEl.focus();\n this.setFocus = false;\n }, 50);\n }\n setTimeout(() => {\n this.scrollToBottom();\n }, 200);\n }\n\n @Listen(\"focus\", { capture: true })\n handleFocus(event: FocusEvent) {\n if (this.textAreaEl) {\n event.preventDefault();\n this.textAreaEl.focus();\n }\n }\n\n /**\n * Clear the list of messages\n */\n @Method()\n async clear() {\n this.messages = [];\n }\n\n /**\n * Add a message. This method will be used by the host to add messages from the assistant\n */\n @Method()\n async addMessage(message: Message) {\n if (message.text?.length > 0) {\n const messages = [...this.messages];\n const updateInProgressMessage =\n messages?.length > 0 &&\n messages[messages.length - 1].type === \"assistant-in-progress\";\n if (updateInProgressMessage) {\n messages.pop();\n }\n messages.push(message);\n this.messages = messages;\n }\n }\n\n private evaluateAiInProgress = () => {\n if (\n this.messages?.length > 0 &&\n this.messages[this.messages.length - 1].type === \"assistant-in-progress\"\n ) {\n this.aIInProgress = true;\n } else {\n this.aIInProgress = false;\n }\n };\n\n private evaluateAiStatus = () => {\n if (this.messages?.length === 0) {\n this.assistantStatus = \"indeterminate\";\n return;\n }\n if (\n this.messages[this.messages.length - 1].type ===\n \"assistant-in-progress\" ||\n this.messages[this.messages.length - 1].type === \"user\"\n ) {\n this.assistantStatus = \"indeterminate\";\n } else if (\n this.messages[this.messages.length - 1].type === \"assistant-error\"\n ) {\n this.assistantStatus = \"error\";\n } else {\n this.assistantStatus = \"success\";\n }\n };\n\n private renderMessage = (\n message: Message,\n i: number\n ): HTMLLIElement | void => {\n if (message.text.length > 0) {\n return (\n <gx-ide-ai-message\n style={{\n \"--primary-color\": \"lightblue\"\n }}\n message={message.text}\n messageType={message.type}\n hidden={message.hidden}\n filterValue={this.filterValue}\n key={`${i.toString()}-${message.type}`}\n translations={this._componentLocale.aiMessage}\n aiAssistantHostRef={this.el}\n ></gx-ide-ai-message>\n );\n }\n };\n\n private textAreaInputHandler = () => {\n this.userHasTyped = true;\n this.showFilter = false;\n this.filterEl.value = \"\";\n this.filterValue = \"\";\n this.scrollToBottomFlag = true;\n };\n\n private promptEnterHandler = async (prompt: CustomEvent<string>) => {\n /* First remove double spaces */\n const promptTrimmed = prompt.detail.replace(/\\s+/g, \" \");\n /* Update textarea value to get the proper height */\n this.textAreaEl.value = promptTrimmed;\n setTimeout(() => {\n /* Then save the actual height (setTimeOut required) */\n this.lastUserMessageHeight = this.textAreaEl.offsetHeight;\n }, 0);\n /* The clear the textarea */\n this.textAreaEl.value = \"\";\n /* Insert the user message */\n this.addMessage({\n type: \"user\",\n text: promptTrimmed\n });\n /* Call the callback */\n if (this.userMessageCallback && !this.aIInProgress) {\n this.aIInProgress = true;\n this.userMessageCallback(promptTrimmed).then(() => {\n this.aIInProgress = false;\n });\n }\n };\n\n private filterMessagesHandler = (e: CustomEvent<string>) => {\n this.scrollToBottomFlag = false;\n this.filterValue = e.detail.toLowerCase();\n const filteredMessages = [...this.messages];\n filteredMessages.forEach(message => {\n if (message.text.toLowerCase().includes(this.filterValue)) {\n message.hidden = false;\n } else {\n message.hidden = true;\n }\n });\n this.messages = filteredMessages;\n };\n\n private clearMessages = () => {\n this.messages = [];\n this.textAreaEl.focus();\n if (this.clearCallback) {\n this.clearCallback();\n }\n };\n\n private attachShortcuts = () => {\n if (this.focusShortcuts?.length > 0) {\n const ctrlFocusIndex = this.focusShortcuts.findIndex(\n key => key.toLocaleLowerCase() === \"ctrl\"\n );\n const shiftFocusIndex = this.focusShortcuts.findIndex(\n key => key.toLocaleLowerCase() === \"shift\"\n );\n const cmdKeyIndex = this.focusShortcuts.findIndex(\n key => key.toLocaleLowerCase() === \"cmd\"\n );\n const keyFocus = this.focusShortcuts\n .find(key => {\n return (\n key.toLocaleLowerCase() !== \"ctrl\" &&\n key.toLocaleLowerCase() !== \"shift\" &&\n key.toLocaleLowerCase() !== \"cmd\"\n );\n })\n .toLowerCase();\n document.addEventListener(\"keydown\", (e: KeyboardEvent) => {\n if (e.key === keyFocus && ctrlFocusIndex !== -1 && e.ctrlKey) {\n this.textAreaEl.focus();\n this.userHasTyped = true;\n } else if (e.key === keyFocus && shiftFocusIndex !== -1 && e.shiftKey) {\n this.textAreaEl.focus();\n this.userHasTyped = true;\n } else if (e.key === keyFocus && cmdKeyIndex !== -1 && e.metaKey) {\n this.textAreaEl.focus();\n this.userHasTyped = true;\n }\n });\n }\n };\n\n private promptArrowUpHandler = () => {\n this.userHasTyped = true;\n const lastUserMessage = this.messages?.find(message => {\n return message.type === \"user\";\n });\n if (lastUserMessage) {\n if (this.lastUserMessageHeight) {\n this.textareaShadowPart.style.height = `${this.lastUserMessageHeight}px`;\n }\n this.textAreaEl.value = lastUserMessage.text;\n }\n };\n\n private toggleFilterHandler = () => {\n this.showFilter = !this.showFilter;\n if (this.showFilter) {\n this.filterEl.focus();\n }\n };\n\n private promptFocusHandler = () => {\n this.promptHasFocus = true;\n };\n\n private promptBlurHandler = () => {\n this.promptHasFocus = false;\n };\n\n private scrollToBottom = () => {\n if (this.scrollToBottomFlag) {\n this.messagesWrapperEl.scrollTo(0, this.messagesWrapperEl.scrollHeight);\n this.messagesWrapperEl.scrollTop =\n this.messagesWrapperEl.scrollHeight -\n this.messagesWrapperEl.clientHeight;\n }\n };\n\n #mouseDownListener = () => {\n this.el.removeAttribute(\"tabindex\");\n };\n\n #mouseUpListener = () => {\n this.el.setAttribute(\"tabindex\", \"0\");\n };\n\n render() {\n return (\n <Host\n class={{\n [`assistant--${this.assistantStatus}`]: true,\n \"assistant--in-progress\": this.aIInProgress\n }}\n tabindex=\"0\"\n >\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <div class=\"gx-ide-main-wrapper\">\n <slot></slot>\n <header class=\"header\">\n <div class=\"header__first-row\">\n <gxg-title type=\"title-02\">\n {this._componentLocale.componentName}\n </gxg-title>\n <div class=\"header__actions-wrapper\">\n {this.filter ? (\n <gxg-button\n class=\"header__filter-button\"\n type=\"tertiary\"\n icon=\"menus/find\"\n onClick={this.toggleFilterHandler}\n disabled={this.messages.length === 0}\n ></gxg-button>\n ) : null}\n\n <gxg-button\n class=\"header__clear-button\"\n type=\"tertiary\"\n icon=\"bpm/delete\"\n onClick={this.clearMessages}\n disabled={this.messages.length === 0}\n ></gxg-button>\n </div>\n </div>\n {this.filter ? (\n <div\n class={{\n \"header__second-row\": true,\n \"header__second-row--visible\": this.showFilter\n }}\n >\n <div class=\"filter-inner-wrapper\">\n <gxg-form-text\n class=\"header__filter\"\n onInput={this.filterMessagesHandler as any}\n ref={el => (this.filterEl = el as HTMLGxgFormTextElement)}\n ></gxg-form-text>\n </div>\n </div>\n ) : null}\n </header>\n\n <div\n class={{\n \"messages-wrapper\": true,\n \"scrollable\": true\n }}\n ref={el => (this.messagesWrapperEl = el as HTMLDivElement)}\n >\n {this.messages?.length ? (\n <ol class={{ messages: true }}>\n {this.messages.map((message, i) => {\n return this.renderMessage(message, i);\n })}\n </ol>\n ) : null}\n </div>\n\n <div\n class={{\n prompt: true\n }}\n >\n <gxg-form-textarea\n ai\n class=\"prompt__textarea\"\n value={this.promptValue}\n maxHeight={this.promptMaxHeight}\n placeholder={\n this.aIInProgress\n ? this._componentLocale.processingQueryPlaceholder\n : this._componentLocale.promptPlaceholder\n }\n onInput={this.textAreaInputHandler}\n onEnter={this.promptEnterHandler}\n onArrowUpPressed={this.promptArrowUpHandler}\n onBlur={this.promptBlurHandler}\n onFocus={this.promptFocusHandler}\n disabled={this.aIInProgress}\n ref={el => (this.textAreaEl = el as HTMLGxgFormTextareaElement)}\n ></gxg-form-textarea>\n {!this.userHasTyped &&\n !this.aIInProgress &&\n !this.promptHasFocus &&\n this.focusShortcuts?.length > 0 ? (\n <div\n class={{\n prompt__shortcuts: true\n }}\n >\n {this.focusShortcuts.map((shortcut, i) => {\n /* Up to three keys allowed*/\n return i <= 2 ? (\n <span class=\"prompt__shortcut\">{shortcut}</span>\n ) : null;\n })}\n </div>\n ) : null}\n </div>\n </div>\n </Host>\n );\n }\n}\n\nexport type AiStatus = \"indeterminate\" | \"success\" | \"error\";\n\nexport type Message = {\n type: MessageType;\n text: string;\n hidden?: boolean;\n filterValue?: string;\n};\n\nexport type MessageType =\n | \"user\"\n | \"assistant-chat\"\n | \"assistant-action\"\n | \"assistant-in-progress\"\n | \"assistant-error\";\n\nexport type UserMessageCallback = (text: string) => Promise<void>;\n"],"version":3}
|