@genexus/genexus-ide-ui 1.0.37 → 1.0.38
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 +3 -1
- package/dist/cjs/gx-ide-ai-assistant.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-ai-message.cjs.entry.js +26 -8
- package/dist/cjs/gx-ide-ai-message.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ai-assistant/ai-assistant.js +2 -1
- package/dist/collection/components/ai-assistant/ai-assistant.js.map +1 -1
- package/dist/collection/components/ai-assistant/ai-message.css +32 -2
- package/dist/collection/components/ai-assistant/ai-message.js +25 -8
- package/dist/collection/components/ai-assistant/ai-message.js.map +1 -1
- package/dist/components/ai-message.js +27 -10
- package/dist/components/ai-message.js.map +1 -1
- package/dist/components/gx-ide-ai-assistant.js +3 -1
- package/dist/components/gx-ide-ai-assistant.js.map +1 -1
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-ai-assistant.entry.js +3 -1
- package/dist/esm/gx-ide-ai-assistant.entry.js.map +1 -1
- package/dist/esm/gx-ide-ai-message.entry.js +26 -8
- package/dist/esm/gx-ide-ai-message.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/p-798eb91a.entry.js +121 -0
- package/dist/genexus-ide-ui/p-798eb91a.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-040bd0c5.entry.js → p-a7dcfedd.entry.js} +9 -5
- package/dist/genexus-ide-ui/p-a7dcfedd.entry.js.map +1 -0
- package/dist/types/components/ai-assistant/ai-message.d.ts +2 -0
- package/package.json +1 -1
- package/dist/genexus-ide-ui/p-040bd0c5.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-7cdfbdba.entry.js +0 -88
- package/dist/genexus-ide-ui/p-7cdfbdba.entry.js.map +0 -1
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -6,7 +6,7 @@ const index = require('./index-caaa95cf.js');
|
|
|
6
6
|
|
|
7
7
|
const defineCustomElements = (win, options) => {
|
|
8
8
|
if (typeof window === 'undefined') return undefined;
|
|
9
|
-
return index.bootstrapLazy(JSON.parse("[[\"gx-ide-bpm-export-xpdl.cjs\",[[1,\"gx-ide-bpm-export-xpdl\",{\"displayTitle\":[4,\"display-title\"],\"exportCallback\":[16],\"cancelCallback\":[16],\"addCallback\":[16],\"referencesCallback\":[16],\"emptyInput\":[32],\"emptyObjects\":[32],\"notExporting\":[32]}]]],[\"gx-ide-bpm-import-files.cjs\",[[1,\"gx-ide-bpm-import-files\",{\"displayTitle\":[4,\"display-title\"],\"allowedExtensions\":[16],\"confirmCallback\":[16],\"cancelCallback\":[16],\"files\":[32],\"selectedFiles\":[32]}]]],[\"gx-ide-kb-manager-import.cjs\",[[1,\"gx-ide-kb-manager-import\",{\"cancelCallback\":[16],\"importCallback\":[16],\"loadCallback\":[16],\"objectContextMenuCallback\":[16],\"optionsCallback\":[16],\"selectedFile\":[1040],\"statusMinimal\":[4,\"status-minimal\"],\"checkedObjectsIds\":[32],\"selectAllCheckboxValue\":[32],\"selectAllCheckboxIndeterminate\":[32],\"importStatusMessage\":[32],\"importTreeState\":[32],\"importedTreeFilterRegExp\":[32],\"importingIsInProcess\":[32],\"importTreeFilterList\":[32],\"noImport\":[32],\"noObjects\":[32],\"objectsTreeModel\":[32],\"showHiddenImportsMessage\":[32],\"someStatusVisible\":[32],\"statusInfo\":[32],\"addResultItem\":[64]},null,{\"importTreeState\":[\"importTreeStateChanged\",\"watchImportTreeStateHandler\"],\"objectsTreeModel\":[\"watchObjectsTreeModelHandler\"],\"selectedFile\":[\"selectedFileChanged\"]}]]],[\"gx-ide-team-dev-select-recent-comment.cjs\",[[1,\"gx-ide-team-dev-select-recent-comment\",{\"displayTitle\":[4,\"display-title\"],\"comments\":[16],\"confirmCallback\":[16],\"cancelCallback\":[16]}]]],[\"gx-ide-team-dev-update.cjs\",[[1,\"gx-ide-team-dev-update\",{\"displayTitle\":[4,\"display-title\"],\"confirmCallback\":[16],\"gridContextMenuCallback\":[16],\"loadCallback\":[16],\"objectsScopeCallback\":[16],\"openServerCallback\":[16],\"pendingItemsCheckedCallback\":[16],\"revisionScopeCallback\":[16],\"objectsContextMenuCallback\":[16],\"selectCallback\":[16],\"types\":[16],\"updateCallback\":[16],\"updateFrom\":[16],\"isLoading\":[32],\"objectScopeText\":[32],\"openTab\":[32],\"revisionScopeText\":[32],\"showFilter\":[32],\"updateData\":[32],\"updateResultData\":[32],\"reload\":[64]}]]],[\"gx-ide-data-selector.cjs\",[[17,\"gx-ide-data-selector\",{\"cancelCallback\":[16],\"confirmCallback\":[16],\"defaultModule\":[16],\"displayTitle\":[4,\"display-title\"],\"editCallback\":[16],\"loadItemsCallback\":[16],\"loader\":[4],\"newVariableCallback\":[16],\"selectObjectCallback\":[16],\"selectionType\":[1,\"selection-type\"],\"loading\":[32],\"objects\":[32],\"selectedObjectsIds\":[32],\"suspendShortcuts\":[64],\"validate\":[64]}]]],[\"gx-ide-manage-module-references.cjs\",[[1,\"gx-ide-manage-module-references\",{\"displayTitle\":[4,\"display-title\"],\"servers\":[16],\"serverSelectedCallback\":[16],\"executeActionCallback\":[16],\"addServerCallback\":[16],\"serverContextMenuCallback\":[16],\"showServerCommands\":[4,\"show-server-commands\"],\"modulesAll\":[32],\"filteredModules\":[32],\"selectedModule\":[32],\"selectedServerId\":[32],\"selectedModuleAction\":[32],\"modulesSelectedVersion\":[32],\"actionCompleted\":[32],\"closeProgressBar\":[32],\"progressValue\":[32],\"progressState\":[32],\"loadingServer\":[32],\"reRenderCounter\":[32],\"validate\":[64]},null,{\"modulesAll\":[\"modulesAllWatcher\",\"onPropValueChange\"],\"loadingServer\":[\"loadingServerHandler\"]}]]],[\"gx-ide-manage-module-references-v2.cjs\",[[1,\"gx-ide-manage-module-references-v2\",{\"displayTitle\":[4,\"display-title\"],\"servers\":[16],\"serverSelectedCallback\":[16],\"executeActionCallback\":[16],\"serverContextMenuCallback\":[16],\"showServerCommands\":[4,\"show-server-commands\"],\"searchModulesFilterValue\":[32],\"selectedButtonFilter\":[32],\"serverModules\":[32],\"serverModulesExtended\":[32],\"filteredServerModules\":[32],\"modulesMap\":[32],\"selectedModule\":[32],\"selectedServerId\":[32],\"selectedModuleAction\":[32],\"modulesSelectedVersionMap\":[32],\"actionCompleted\":[32],\"closeProgressBar\":[32],\"progressValue\":[32],\"progressState\":[32],\"loadingServer\":[32]},null,{\"loadingServer\":[\"loadingServerHandler\"]}]]],[\"gx-ide-navigation-report.cjs\",[[1,\"gx-ide-navigation-report\",{\"headerData\":[16],\"confirmCallback\":[16],\"cancelCallback\":[16],\"closeCallback\":[16],\"itemSelectedCallback\":[16],\"reportTreeItems\":[32],\"navigationItemsStatusRegExpString\":[32],\"navigationItemsCaptionRegExpString\":[32],\"navigationItemsRegExp\":[32],\"confirmed\":[32],\"headerState\":[32],\"statusInfo\":[32],\"someStatusVisible\":[32],\"addItem\":[64],\"clearItems\":[64]},null,{\"navigationItemsStatusRegExpString\":[\"navigationItemsStatusRegExpStringChanged\"],\"navigationItemsCaptionRegExpString\":[\"navigationItemsCaptionRegExpStringChanged\"]}]]],[\"gx-ide-object-selector.cjs\",[[17,\"gx-ide-object-selector\",{\"cancelCallback\":[16],\"categories\":[16],\"defaultCategory\":[1,\"default-category\"],\"defaultModule\":[16],\"defaultType\":[1,\"default-type\"],\"loader\":[4],\"loadCallback\":[16],\"multiSelection\":[4,\"multi-selection\"],\"newObjectCallback\":[16],\"openSelectionCallback\":[16],\"patternValue\":[1,\"pattern-value\"],\"selectModuleCallback\":[16],\"types\":[16],\"filterModified\":[32],\"loading\":[32],\"modifiedAfterValue\":[32],\"objects\":[32],\"selectedObjectsIdsArray\":[32],\"suspendShortcuts\":[64],\"validate\":[64]}]]],[\"gx-ide-ww-images.cjs\",[[1,\"gx-ide-ww-images\",{\"displayTitle\":[4,\"display-title\"],\"secondaryFilter\":[4,\"secondary-filter\"],\"categories\":[16],\"densities\":[16],\"defaultCategory\":[1,\"default-category\"],\"defaultModule\":[16],\"defaultType\":[1,\"default-type\"],\"filterModules\":[16],\"languages\":[16],\"layers\":[16],\"contextMenuCallback\":[16],\"deleteSelectionCallback\":[16],\"loadCallback\":[16],\"loadImageItemsCallback\":[16],\"newObjectCallback\":[16],\"openSelectionCallback\":[16],\"selectModuleCallback\":[16],\"selectionObjectChangedCallback\":[16],\"shadow\":[4],\"styles\":[16],\"types\":[16],\"filtersHidden\":[32],\"filterAfterType\":[32],\"filterModified\":[32],\"images\":[32],\"filteredImages\":[32],\"imagesSelectedItems\":[32],\"selectedObjectsIds\":[32],\"filterImagesInputValue\":[32],\"validate\":[64],\"reload\":[64]},[[1,\"keydown\",\"keyDownHandler\"]],{\"filtersHidden\":[\"filtersHiddenHandler\"]}]]],[\"gx-ide-bpm-app-declaration.cjs\",[[1,\"gx-ide-bpm-app-declaration\",{\"displayTitle\":[4,\"display-title\"],\"application\":[1040],\"suggestApplicationsCallback\":[16],\"selectApplicationCallback\":[16],\"selectMappingCallback\":[16],\"confirmCallback\":[16],\"cancelCallback\":[16],\"getDataMappingCallback\":[16],\"suggestedApplications\":[32]},null,{\"application\":[\"watchApplicationHandler\"]}]]],[\"gx-ide-bpm-assign-roles.cjs\",[[1,\"gx-ide-bpm-assign-roles\",{\"displayTitle\":[4,\"display-title\"],\"roles\":[16],\"assignedRoles\":[16],\"confirmCallback\":[16],\"cancelCallback\":[16],\"unassignedRolesState\":[32],\"assignedRolesState\":[32],\"filterUnassignedInput\":[32],\"filterAssignedInput\":[32],\"unassignedSelected\":[32],\"assignedSelected\":[32]}]]],[\"gx-ide-bpm-import-gxpm.cjs\",[[1,\"gx-ide-bpm-import-gxpm\",{\"displayTitle\":[4,\"display-title\"],\"confirmCallback\":[16],\"cancelCallback\":[16],\"selectedFile\":[32],\"pathValue\":[32]}]]],[\"gx-ide-bpm-timer-duration.cjs\",[[1,\"gx-ide-bpm-timer-duration\",{\"displayTitle\":[4,\"display-title\"],\"duration\":[16],\"confirmCallback\":[16],\"cancelCallback\":[16]}]]],[\"gx-ide-design-import.cjs\",[[1,\"gx-ide-design-import\",{\"reactiveSettings\":[16],\"extensions\":[16],\"defaultModule\":[16],\"path\":[1025],\"accessToken\":[1025,\"access-token\"],\"importAsWebPanels\":[4,\"import-as-web-panels\"],\"selectModuleCallback\":[16],\"cancelCallback\":[16],\"confirmCallback\":[16],\"loadCallback\":[16],\"loadDesignSystemCallback\":[16],\"loadFontCallback\":[16],\"loadImageCallback\":[16],\"loadPanelDataCallback\":[16],\"requiresAccessTokenCallback\":[16],\"styles\":[16],\"textEditorFactoryCallback\":[16],\"reRenderCounter\":[32],\"stylesAsComboBoxModel\":[32],\"styleValue\":[32],\"accessTokenHasError\":[32],\"pathIsValid\":[32],\"tabsModel\":[32],\"activeTabs\":[32],\"renderedTabs\":[32],\"designData\":[32],\"detailTreeModel\":[32],\"isLoading\":[32],\"isLoaded\":[32],\"messages\":[32],\"selectedFile\":[32],\"selectedDesignType\":[32],\"selectedDesignItem\":[32],\"requiresAccessToken\":[32],\"designDataTreeDataModel\":[32],\"updateTabsActiveTab\":[32],\"fitImages\":[32],\"lastLoadCallbackSettingValues\":[32]},null,{\"pathIsValid\":[\"pathIsValidChanged\"],\"designData\":[\"designDataChanged\"],\"path\":[\"pathChanged\"],\"accessToken\":[\"accessTokenChanged\"],\"styles\":[\"stylesChanged\"],\"messages\":[\"watchMessagesHandler\"]}]]],[\"gx-ide-edit-module-server.cjs\",[[1,\"gx-ide-edit-module-server\",{\"types\":[16],\"name\":[1],\"source\":[1],\"type\":[1],\"confirmCallback\":[16],\"selectSourceCallback\":[16],\"cancelCallback\":[16],\"selectedType\":[32]}]]],[\"gx-ide-gam-installation-settings.cjs\",[[1,\"gx-ide-gam-installation-settings\",{\"displayTitle\":[4,\"display-title\"],\"configurationType\":[1,\"configuration-type\"],\"repairCallback\":[16],\"saveCallback\":[16],\"cancelCallback\":[16],\"defaultConfiguration\":[16],\"canSelectPanels\":[4,\"can-select-panels\"]}]]],[\"gx-ide-kb-manager-export.cjs\",[[1,\"gx-ide-kb-manager-export\",{\"addKBPropertiesCallback\":[16],\"addObjectsCallback\":[16],\"addReferencesCallback\":[16],\"cancelCallback\":[16],\"exportCallback\":[16],\"exportFileDirectoryCallback\":[16],\"fileName\":[1,\"file-name\"],\"kbPropertiesTypes\":[16],\"loader\":[4],\"objectTypes\":[16],\"optionsCallback\":[16],\"addKbPropertiesIsChecked\":[32],\"atLeastOnePropertyItemIsChecked\":[32],\"atLeastOneObjectItemIsChecked\":[32],\"checkedObjectsIds\":[32],\"checkedPropertiesIds\":[32],\"exportAllIsChecked\":[32],\"exportingIsInProcess\":[32],\"hasObjects\":[32],\"objectsTreeViewModel\":[32]},null,{\"objectsTreeViewModel\":[\"objectsTreeViewModelChanged\"],\"objectTypes\":[\"objectTypesChanged\"]}]]],[\"gx-ide-references.cjs\",[[1,\"gx-ide-references\",{\"displayTitle\":[4,\"display-title\"],\"selectedObject\":[1040],\"selectorSourceCallback\":[16],\"loadReferencesCallback\":[16],\"openObjectCallback\":[16],\"openSelectorDialogCallback\":[16],\"selectReferenceCallback\":[16],\"referencedByTreeData\":[32],\"referencesToTreeData\":[32],\"barHidden\":[32],\"objectsSuggestions\":[32]},null,{\"selectedObject\":[\"selectedObjectHandler\"]}]]],[\"gx-ide-start-page.cjs\",[[1,\"gx-ide-start-page\",{\"createKBCallback\":[16],\"openKbCallback\":[16],\"secondarySection\":[16],\"kbs\":[16],\"kbsFilterThreshold\":[2,\"kbs-filter-threshold\"],\"kbFilterValue\":[32],\"filteredKbs\":[32],\"loading\":[32]},null,{\"kbFilterValue\":[\"kbFilterValueChanged\"],\"kbs\":[\"kbsChanged\"]}]]],[\"gx-ide-team-dev-commit.cjs\",[[1,\"gx-ide-team-dev-commit\",{\"displayTitle\":[4,\"display-title\"],\"changeSet\":[16],\"types\":[16],\"folders\":[16],\"categories\":[16],\"getRecentCommentCallback\":[16],\"loadCallback\":[16],\"commitCallback\":[16],\"selectCallback\":[16],\"pendingItemsCheckedCallback\":[16],\"objectsContextMenuCallback\":[16],\"filtersHidden\":[32],\"comment\":[32],\"pendingCommits\":[32],\"ignoredObjects\":[32],\"commitButtonEnabled\":[32],\"filterHasConditions\":[32],\"reload\":[64]}]]],[\"gx-ide-team-dev-update-partial-selection.cjs\",[[1,\"gx-ide-team-dev-update-partial-selection\",{\"displayTitle\":[4,\"display-title\"],\"addCallback\":[16],\"cancelCallback\":[16],\"confirmCallback\":[16],\"selection\":[1040],\"selectedObjectsIds\":[32],\"validate\":[64]}]]],[\"gx-ide-team-dev-update-to-revision.cjs\",[[1,\"gx-ide-team-dev-update-to-revision\",{\"displayTitle\":[4,\"display-title\"],\"cancelCallback\":[16],\"confirmCallback\":[16],\"currentRevision\":[1,\"current-revision\"],\"validate\":[64]}]]],[\"gx-ide-template.cjs\",[[1,\"gx-ide-template\",{\"displayTitle\":[4,\"display-title\"]}]]],[\"gx-ide-wf-settings.cjs\",[[1,\"gx-ide-wf-settings\",{\"displayTitle\":[4,\"display-title\"],\"configurationType\":[1,\"configuration-type\"],\"defaultConfiguration\":[16],\"saveCallback\":[16],\"cancelCallback\":[16]}]]],[\"gx-ide-ai-assistant.cjs\",[[17,\"gx-ide-ai-assistant\",{\"messages\":[1040],\"promptMaxHeight\":[1,\"prompt-max-height\"],\"assistantStatus\":[1025,\"assistant-status\"],\"focusShortcuts\":[16],\"userMessageCallback\":[16],\"clearCallback\":[16],\"promptValue\":[1,\"prompt-value\"],\"filter\":[4],\"userHasTyped\":[32],\"aIInProgress\":[32],\"showFilter\":[32],\"promptHasFocus\":[32],\"filterValue\":[32],\"clear\":[64],\"addMessage\":[64]},[[2,\"focus\",\"handleFocus\"]],{\"aIInProgress\":[\"watchAIInProgressHandler\"],\"messages\":[\"watchMessagesHandler\"]}]]],[\"gx-ide-dashboard-home.cjs\",[[1,\"gx-ide-dashboard-home\",{\"kb\":[16],\"enableEditKBName\":[4,\"enable-edit-k-b-name\"],\"environment\":[16],\"enableEditEnvironmentName\":[4,\"enable-edit-environment-name\"],\"projectDescription\":[1,\"project-description\"],\"enableEditDescription\":[4,\"enable-edit-description\"],\"recentObjects\":[16],\"renameKBCallback\":[16],\"renameEnvironmentCallback\":[16],\"editDescriptionCallback\":[16],\"openObjectCallback\":[16],\"editingEnvName\":[32],\"editingProjectDescription\":[32]},null,{\"recentObjects\":[\"recentObjectsHandler\"]}]]],[\"gx-ide-new-object.cjs\",[[17,\"gx-ide-new-object\",{\"defaultTypeId\":[1,\"default-type-id\"],\"defaultParent\":[16],\"displayTitle\":[4,\"display-title\"],\"cancelCallback\":[16],\"createCallback\":[16],\"shadow\":[4],\"typeCategories\":[1040],\"parent\":[16],\"selectModuleCallback\":[16],\"validateNameCallback\":[16],\"description\":[32],\"name\":[32],\"nameValidationErrorMessage\":[32],\"selectedCategory\":[32],\"selectedType\":[32],\"typeCategoriesActionListModel\":[32],\"typesActionListModel\":[32],\"selectedTypeMap\":[32],\"suspendShortcuts\":[64]},null,{\"typeCategories\":[\"typeCategoriesChanged\"]}]]],[\"gx-ide-card.cjs\",[[1,\"gx-ide-card\",{\"cardTitle\":[1,\"card-title\"],\"cardSubTitle\":[1,\"card-sub-title\"],\"icon\":[1]}]]],[\"gx-ide-connect-gx-server.cjs\",[[1,\"gx-ide-connect-gx-server\",{\"authenticationTypes\":[16],\"cancelCallback\":[16],\"connectCallback\":[16],\"defaultConnectionData\":[16],\"enableCustomServer\":[4,\"enable-custom-server\"],\"serverUrls\":[16],\"authenticationTypesComboBoxModel\":[32],\"gxServerConnectionData\":[32],\"serverUrlsComboBoxModel\":[32],\"validatableControls\":[32]},null,{\"authenticationTypes\":[\"authenticationTypesChanged\"],\"serverUrls\":[\"serverUrlsChanged\"]}]]],[\"gx-ide-create-kb-from-server.cjs\",[[1,\"gx-ide-create-kb-from-server\",{\"connectionData\":[16],\"cancelCallback\":[16],\"changeConnectionCallback\":[16],\"createKBCallback\":[16],\"getGXserverKBsCallback\":[16],\"selectKBVersionsCallback\":[16],\"enableSelectVersionsButton\":[32],\"localKbNameInputValue\":[32],\"filterValue\":[32],\"kbsFilteredActionListModel\":[32],\"validatableControls\":[32],\"versionSelectedType\":[32],\"versionsValueInput\":[32]}]]],[\"gx-ide-current-user-info.cjs\",[[1,\"gx-ide-current-user-info\",{\"userInfo\":[16],\"myAccountCallback\":[16],\"changeTeamCallback\":[16],\"changeLanguageCallback\":[16],\"changeModeCallback\":[16],\"signOutCallback\":[16],\"showTermsCallback\":[16],\"showMenu\":[32]}]]],[\"gx-ide-directory-selector.cjs\",[[1,\"gx-ide-directory-selector\",{\"accessibilityLabels\":[16],\"label\":[1],\"labelPosition\":[513,\"label-position\"],\"centerLabel\":[1028,\"center-label\"],\"labelWidth\":[1,\"label-width\"],\"selectDirectoryCallback\":[16],\"value\":[1025],\"icon\":[32]}]]],[\"gx-ide-new-environment.cjs\",[[1,\"gx-ide-new-environment\",{\"cancelCallback\":[16],\"createCallback\":[16],\"dataStores\":[1040],\"environmentName\":[1025,\"environment-name\"],\"getDataSourcesCallback\":[16],\"getEnvironmentNameCallback\":[16],\"getFrontEndsCallback\":[16],\"isAdvanced\":[4,\"is-advanced\"],\"languages\":[16],\"runtimes\":[16],\"setAsTarget\":[4,\"set-as-target\"],\"advancedTabIsVisible\":[32],\"frontEnds\":[32],\"validatableControls\":[32],\"dataStoresComboBoxModel\":[32],\"languageComboBoxModel\":[32],\"runtimesRadioGroupModel\":[32],\"suspendShortcuts\":[64]},null,{\"dataStores\":[\"dataStoresChanged\"],\"languages\":[\"languagesChanged\"],\"runtimes\":[\"runtimesChanged\"]}]]],[\"gx-ide-new-kb.cjs\",[[1,\"gx-ide-new-kb\",{\"authenticationTypes\":[16],\"cancelCallback\":[16],\"collations\":[16],\"createCallback\":[16],\"createDataFilesInKBFolder\":[4,\"create-data-files-in-k-b-folder\"],\"databaseName\":[1,\"database-name\"],\"defaultDataSources\":[1040],\"getDataSourcesCallback\":[16],\"getFrontEndsCallback\":[16],\"isAdvanced\":[4,\"is-advanced\"],\"kbLocation\":[1025,\"kb-location\"],\"kbName\":[1,\"kb-name\"],\"password\":[1],\"prototypingEnvironments\":[16],\"prototypingTargets\":[16],\"savePassword\":[4,\"save-password\"],\"selectLocationCallback\":[16],\"serverNames\":[16],\"userInterfaceLanguages\":[16],\"userName\":[1,\"user-name\"],\"advancedTabIsVisible\":[32],\"frontEnds\":[32],\"validatableControls\":[32],\"createDataInKbDisabled\":[32],\"userNameVisible\":[32],\"passwordVisible\":[32],\"savePasswordVisible\":[32],\"authenticationTypesComboBoxModel\":[32],\"authenticationTypesInitialValue\":[32],\"collationsComboBoxModel\":[32],\"collationsInitialValue\":[32],\"defaultDataSourcesComboBoxModel\":[32],\"defaultDataSourcesInitialValue\":[32],\"prototypingTargetsComboBoxModel\":[32],\"prototypingTargetsInitialValue\":[32],\"prototypingEnvironmentsComboBoxModel\":[32],\"prototypingEnvironmentsInitialValue\":[32],\"serverNamesComboBoxModel\":[32],\"serverNamesInitialValue\":[32],\"userInterfaceLanguagesComboBoxModel\":[32],\"userInterfaceLanguagesInitialValue\":[32],\"suspendShortcuts\":[64]},null,{\"authenticationTypes\":[\"watchAuthenticationTypes\"],\"collations\":[\"watchCollations\"],\"defaultDataSources\":[\"watchDefaultDataSources\"],\"prototypingEnvironments\":[\"watchPrototypingEnvironments\"],\"prototypingTargets\":[\"watchPrototypingTargets\"],\"serverNames\":[\"watchServerNames\"],\"userInterfaceLanguages\":[\"watchUserInterfaceLanguages\"]}]]],[\"gx-ide-select-user-team.cjs\",[[1,\"gx-ide-select-user-team\",{\"cancelCallback\":[16],\"continueCallback\":[16],\"teams\":[16]},null,{\"teams\":[\"teamsChanged\"]}]]],[\"gx-ide-share-kb.cjs\",[[1,\"gx-ide-share-kb\",{\"connectionData\":[16],\"cancelCallback\":[16],\"changeConnectionCallback\":[16],\"kbName\":[1025,\"kb-name\"],\"shareKBCallback\":[16],\"selectKBVersionsCallback\":[16],\"enableSelectVersionsButton\":[32],\"validatableControls\":[32],\"versionSelectedType\":[32],\"versionsValueInput\":[32]}]]],[\"gx-ide-sign-in.cjs\",[[1,\"gx-ide-sign-in\",{\"termsCallback\":[16],\"signInCallback\":[16]}]]],[\"gx-ide-sign-in-team.cjs\",[[1,\"gx-ide-sign-in-team\",{\"authStep\":[1,\"auth-step\"],\"continueCallback\":[16],\"signInCallback\":[16],\"teams\":[16],\"termsCallback\":[16],\"authStepInternal\":[32],\"slideIsVisible\":[32]},null,{\"authStep\":[\"authStepChanged\"],\"teams\":[\"teamsChanged\"]}]]],[\"gx-ide-splash.cjs\",[[1,\"gx-ide-splash\",{\"version\":[1],\"removeSplash\":[4,\"remove-splash\"],\"splashVisible\":[32]},null,{\"removeSplash\":[\"removeSplashChanged\"]}]]],[\"gx-ide-switch-panel.cjs\",[[1,\"gx-ide-switch-panel\"]]],[\"gx-ide-switcher.cjs\",[[1,\"gx-ide-switcher\"]]],[\"gx-ide-test.cjs\",[[1,\"gx-ide-test\",{\"name\":[1],\"filterOn\":[32]}]]],[\"gx-ide-top-bar.cjs\",[[1,\"gx-ide-top-bar\",{\"topBarTitle\":[1,\"top-bar-title\"]}]]],[\"gx-ide-welcome-page.cjs\",[[1,\"gx-ide-welcome-page\",{\"transitionType\":[1,\"transition-type\"],\"wordsPerMinute\":[2,\"words-per-minute\"],\"closeCallback\":[16],\"slides\":[16],\"activeSlideIndex\":[32],\"displaySlider\":[32],\"copyrightsVisible\":[32],\"lastSlideReached\":[32],\"sliderVisible\":[32],\"slideTransitioning\":[32],\"userHasChangedSlide\":[32]}]]],[\"gx-ide-bpm-objects-selector.cjs\",[[1,\"gx-ide-bpm-objects-selector\",{\"displayTitle\":[4,\"display-title\"],\"selection\":[1040],\"addCallback\":[16],\"referencesCallback\":[16],\"objects\":[32],\"selectedObjects\":[32]}]]],[\"gx-ide-ai-message.cjs\",[[1,\"gx-ide-ai-message\",{\"message\":[1],\"messageType\":[1,\"message-type\"],\"filterValue\":[1,\"filter-value\"],\"hidden\":[4],\"translations\":[16],\"visible\":[32],\"showCopiedMessage\":[32]}]]],[\"gx-ide-list-selector_2.cjs\",[[1,\"gx-ide-list-selector\",{\"ordered\":[4],\"readonly\":[4],\"type\":[1],\"required\":[4],\"ellipsis\":[4],\"value\":[1025],\"listName\":[1,\"list-name\"],\"noItemsBorder\":[4,\"no-items-border\"],\"noListBorder\":[516,\"no-list-border\"]},[[2,\"itemSelectionChanged\",\"itemSelectionChangedHandler\"]]],[4,\"gx-ide-list-selector-item\",{\"itemId\":[513,\"item-id\"],\"itemValue\":[1,\"item-value\"],\"itemChecked\":[1028,\"item-checked\"],\"readonly\":[1540],\"ellipsis\":[1540],\"icon\":[1],\"noBorder\":[1540,\"no-border\"],\"universalSlotEnd\":[516,\"universal-slot-end\"]}]]],[\"gx-ide-status-buttons.cjs\",[[1,\"gx-ide-status-buttons\",{\"active\":[4],\"errors\":[2],\"hideError\":[4,\"hide-error\"],\"warnings\":[2],\"hideWarning\":[4,\"hide-warning\"],\"successes\":[2],\"hideSuccess\":[4,\"hide-success\"],\"messages\":[2],\"hideMessage\":[4,\"hide-message\"],\"minimal\":[4],\"compact\":[516],\"noInnerBorders\":[516,\"no-inner-borders\"],\"iconsSize\":[32]}]]],[\"gx-ide-loader.cjs\",[[1,\"gx-ide-loader\",{\"abortTime\":[2,\"abort-time\"],\"cancelCallback\":[16],\"cancelLabel\":[1,\"cancel-label\"],\"description\":[1],\"displayBorder\":[516,\"display-border\"],\"loaderTitle\":[1,\"loader-title\"],\"show\":[1028],\"showWrapper\":[32]}]]],[\"gx-ide-entity-selector.cjs\",[[1,\"gx-ide-entity-selector\",{\"defaultValue\":[16],\"disabled\":[516],\"labelCaption\":[1,\"label-caption\"],\"labelPosition\":[513,\"label-position\"],\"name\":[513],\"selectEntityCallback\":[16],\"value\":[1040],\"buttonHasFocus\":[32],\"iconSrc\":[32]},null,{\"value\":[\"valueChangedHandler\"]}]]],[\"gx-ide-empty-state.cjs\",[[1,\"gx-ide-empty-state\",{\"isAnimated\":[4,\"is-animated\"],\"stateDescription\":[1,\"state-description\"],\"stateIconSrc\":[1,\"state-icon-src\"],\"stateTitle\":[1,\"state-title\"]}]]],[\"gx-ide-container_2.cjs\",[[1,\"gx-ide-container\",{\"inactiveTitle\":[4,\"inactive-title\"],\"containerTitle\":[1,\"container-title\"],\"titleType\":[1,\"title-type\"],\"displayBorder\":[4,\"display-border\"],\"displayBorderTop\":[4,\"display-border-top\"],\"displayBorderEnd\":[4,\"display-border-end\"],\"displayBorderBottom\":[4,\"display-border-bottom\"],\"displayBorderStart\":[4,\"display-border-start\"],\"sectionsPadding\":[1,\"sections-padding\"],\"titleAlignment\":[1,\"title-alignment\"],\"noHeadingBorder\":[4,\"no-heading-border\"],\"noHeadingGap\":[4,\"no-heading-gap\"],\"noHeadingPadding\":[4,\"no-heading-padding\"],\"noHeadingPaddingBlockEnd\":[4,\"no-heading-padding-block-end\"],\"headingPaddingTop\":[4,\"heading-padding-top\"],\"headingJustify\":[1,\"heading-justify\"],\"titleHeightAsInput\":[4,\"title-height-as-input\"],\"flexRow\":[4,\"flex-row\"],\"flexContent\":[4,\"flex-content\"],\"noContentBorderTop\":[4,\"no-content-border-top\"],\"noContentPadding\":[4,\"no-content-padding\"],\"noContentGap\":[4,\"no-content-gap\"],\"alignItems\":[1,\"align-items\"],\"justifyContent\":[1,\"justify-content\"],\"contentBorderEnd\":[4,\"content-border-end\"],\"slimmerAboveFooter\":[4,\"slimmer-above-footer\"],\"noAboveFooterPadding\":[4,\"no-above-footer-padding\"],\"noBorderAboveFooter\":[4,\"no-border-above-footer\"],\"slimmerFooter\":[4,\"slimmer-footer\"],\"noFooterPadding\":[4,\"no-footer-padding\"],\"footerJustify\":[1,\"footer-justify\"],\"noBorderFooter\":[4,\"no-border-footer\"],\"hasHeaderSlot\":[32],\"hasSlottedContent\":[32],\"hasFooterSlot\":[32],\"hasAboveFooterSlot\":[32],\"hasOnlyHeading\":[32],\"hasOnlyContent\":[32],\"hasOnlyFooter\":[32]}],[1,\"gx-ide-title\",{\"titleCaption\":[1,\"title-caption\"],\"type\":[1],\"alignment\":[1],\"padding\":[516],\"noPaddingBottom\":[516,\"no-padding-bottom\"],\"border\":[516]}]]]]"), options);
|
|
9
|
+
return index.bootstrapLazy(JSON.parse("[[\"gx-ide-bpm-export-xpdl.cjs\",[[1,\"gx-ide-bpm-export-xpdl\",{\"displayTitle\":[4,\"display-title\"],\"exportCallback\":[16],\"cancelCallback\":[16],\"addCallback\":[16],\"referencesCallback\":[16],\"emptyInput\":[32],\"emptyObjects\":[32],\"notExporting\":[32]}]]],[\"gx-ide-bpm-import-files.cjs\",[[1,\"gx-ide-bpm-import-files\",{\"displayTitle\":[4,\"display-title\"],\"allowedExtensions\":[16],\"confirmCallback\":[16],\"cancelCallback\":[16],\"files\":[32],\"selectedFiles\":[32]}]]],[\"gx-ide-kb-manager-import.cjs\",[[1,\"gx-ide-kb-manager-import\",{\"cancelCallback\":[16],\"importCallback\":[16],\"loadCallback\":[16],\"objectContextMenuCallback\":[16],\"optionsCallback\":[16],\"selectedFile\":[1040],\"statusMinimal\":[4,\"status-minimal\"],\"checkedObjectsIds\":[32],\"selectAllCheckboxValue\":[32],\"selectAllCheckboxIndeterminate\":[32],\"importStatusMessage\":[32],\"importTreeState\":[32],\"importedTreeFilterRegExp\":[32],\"importingIsInProcess\":[32],\"importTreeFilterList\":[32],\"noImport\":[32],\"noObjects\":[32],\"objectsTreeModel\":[32],\"showHiddenImportsMessage\":[32],\"someStatusVisible\":[32],\"statusInfo\":[32],\"addResultItem\":[64]},null,{\"importTreeState\":[\"importTreeStateChanged\",\"watchImportTreeStateHandler\"],\"objectsTreeModel\":[\"watchObjectsTreeModelHandler\"],\"selectedFile\":[\"selectedFileChanged\"]}]]],[\"gx-ide-team-dev-select-recent-comment.cjs\",[[1,\"gx-ide-team-dev-select-recent-comment\",{\"displayTitle\":[4,\"display-title\"],\"comments\":[16],\"confirmCallback\":[16],\"cancelCallback\":[16]}]]],[\"gx-ide-team-dev-update.cjs\",[[1,\"gx-ide-team-dev-update\",{\"displayTitle\":[4,\"display-title\"],\"confirmCallback\":[16],\"gridContextMenuCallback\":[16],\"loadCallback\":[16],\"objectsScopeCallback\":[16],\"openServerCallback\":[16],\"pendingItemsCheckedCallback\":[16],\"revisionScopeCallback\":[16],\"objectsContextMenuCallback\":[16],\"selectCallback\":[16],\"types\":[16],\"updateCallback\":[16],\"updateFrom\":[16],\"isLoading\":[32],\"objectScopeText\":[32],\"openTab\":[32],\"revisionScopeText\":[32],\"showFilter\":[32],\"updateData\":[32],\"updateResultData\":[32],\"reload\":[64]}]]],[\"gx-ide-data-selector.cjs\",[[17,\"gx-ide-data-selector\",{\"cancelCallback\":[16],\"confirmCallback\":[16],\"defaultModule\":[16],\"displayTitle\":[4,\"display-title\"],\"editCallback\":[16],\"loadItemsCallback\":[16],\"loader\":[4],\"newVariableCallback\":[16],\"selectObjectCallback\":[16],\"selectionType\":[1,\"selection-type\"],\"loading\":[32],\"objects\":[32],\"selectedObjectsIds\":[32],\"suspendShortcuts\":[64],\"validate\":[64]}]]],[\"gx-ide-manage-module-references.cjs\",[[1,\"gx-ide-manage-module-references\",{\"displayTitle\":[4,\"display-title\"],\"servers\":[16],\"serverSelectedCallback\":[16],\"executeActionCallback\":[16],\"addServerCallback\":[16],\"serverContextMenuCallback\":[16],\"showServerCommands\":[4,\"show-server-commands\"],\"modulesAll\":[32],\"filteredModules\":[32],\"selectedModule\":[32],\"selectedServerId\":[32],\"selectedModuleAction\":[32],\"modulesSelectedVersion\":[32],\"actionCompleted\":[32],\"closeProgressBar\":[32],\"progressValue\":[32],\"progressState\":[32],\"loadingServer\":[32],\"reRenderCounter\":[32],\"validate\":[64]},null,{\"modulesAll\":[\"modulesAllWatcher\",\"onPropValueChange\"],\"loadingServer\":[\"loadingServerHandler\"]}]]],[\"gx-ide-manage-module-references-v2.cjs\",[[1,\"gx-ide-manage-module-references-v2\",{\"displayTitle\":[4,\"display-title\"],\"servers\":[16],\"serverSelectedCallback\":[16],\"executeActionCallback\":[16],\"serverContextMenuCallback\":[16],\"showServerCommands\":[4,\"show-server-commands\"],\"searchModulesFilterValue\":[32],\"selectedButtonFilter\":[32],\"serverModules\":[32],\"serverModulesExtended\":[32],\"filteredServerModules\":[32],\"modulesMap\":[32],\"selectedModule\":[32],\"selectedServerId\":[32],\"selectedModuleAction\":[32],\"modulesSelectedVersionMap\":[32],\"actionCompleted\":[32],\"closeProgressBar\":[32],\"progressValue\":[32],\"progressState\":[32],\"loadingServer\":[32]},null,{\"loadingServer\":[\"loadingServerHandler\"]}]]],[\"gx-ide-navigation-report.cjs\",[[1,\"gx-ide-navigation-report\",{\"headerData\":[16],\"confirmCallback\":[16],\"cancelCallback\":[16],\"closeCallback\":[16],\"itemSelectedCallback\":[16],\"reportTreeItems\":[32],\"navigationItemsStatusRegExpString\":[32],\"navigationItemsCaptionRegExpString\":[32],\"navigationItemsRegExp\":[32],\"confirmed\":[32],\"headerState\":[32],\"statusInfo\":[32],\"someStatusVisible\":[32],\"addItem\":[64],\"clearItems\":[64]},null,{\"navigationItemsStatusRegExpString\":[\"navigationItemsStatusRegExpStringChanged\"],\"navigationItemsCaptionRegExpString\":[\"navigationItemsCaptionRegExpStringChanged\"]}]]],[\"gx-ide-object-selector.cjs\",[[17,\"gx-ide-object-selector\",{\"cancelCallback\":[16],\"categories\":[16],\"defaultCategory\":[1,\"default-category\"],\"defaultModule\":[16],\"defaultType\":[1,\"default-type\"],\"loader\":[4],\"loadCallback\":[16],\"multiSelection\":[4,\"multi-selection\"],\"newObjectCallback\":[16],\"openSelectionCallback\":[16],\"patternValue\":[1,\"pattern-value\"],\"selectModuleCallback\":[16],\"types\":[16],\"filterModified\":[32],\"loading\":[32],\"modifiedAfterValue\":[32],\"objects\":[32],\"selectedObjectsIdsArray\":[32],\"suspendShortcuts\":[64],\"validate\":[64]}]]],[\"gx-ide-ww-images.cjs\",[[1,\"gx-ide-ww-images\",{\"displayTitle\":[4,\"display-title\"],\"secondaryFilter\":[4,\"secondary-filter\"],\"categories\":[16],\"densities\":[16],\"defaultCategory\":[1,\"default-category\"],\"defaultModule\":[16],\"defaultType\":[1,\"default-type\"],\"filterModules\":[16],\"languages\":[16],\"layers\":[16],\"contextMenuCallback\":[16],\"deleteSelectionCallback\":[16],\"loadCallback\":[16],\"loadImageItemsCallback\":[16],\"newObjectCallback\":[16],\"openSelectionCallback\":[16],\"selectModuleCallback\":[16],\"selectionObjectChangedCallback\":[16],\"shadow\":[4],\"styles\":[16],\"types\":[16],\"filtersHidden\":[32],\"filterAfterType\":[32],\"filterModified\":[32],\"images\":[32],\"filteredImages\":[32],\"imagesSelectedItems\":[32],\"selectedObjectsIds\":[32],\"filterImagesInputValue\":[32],\"validate\":[64],\"reload\":[64]},[[1,\"keydown\",\"keyDownHandler\"]],{\"filtersHidden\":[\"filtersHiddenHandler\"]}]]],[\"gx-ide-bpm-app-declaration.cjs\",[[1,\"gx-ide-bpm-app-declaration\",{\"displayTitle\":[4,\"display-title\"],\"application\":[1040],\"suggestApplicationsCallback\":[16],\"selectApplicationCallback\":[16],\"selectMappingCallback\":[16],\"confirmCallback\":[16],\"cancelCallback\":[16],\"getDataMappingCallback\":[16],\"suggestedApplications\":[32]},null,{\"application\":[\"watchApplicationHandler\"]}]]],[\"gx-ide-bpm-assign-roles.cjs\",[[1,\"gx-ide-bpm-assign-roles\",{\"displayTitle\":[4,\"display-title\"],\"roles\":[16],\"assignedRoles\":[16],\"confirmCallback\":[16],\"cancelCallback\":[16],\"unassignedRolesState\":[32],\"assignedRolesState\":[32],\"filterUnassignedInput\":[32],\"filterAssignedInput\":[32],\"unassignedSelected\":[32],\"assignedSelected\":[32]}]]],[\"gx-ide-bpm-import-gxpm.cjs\",[[1,\"gx-ide-bpm-import-gxpm\",{\"displayTitle\":[4,\"display-title\"],\"confirmCallback\":[16],\"cancelCallback\":[16],\"selectedFile\":[32],\"pathValue\":[32]}]]],[\"gx-ide-bpm-timer-duration.cjs\",[[1,\"gx-ide-bpm-timer-duration\",{\"displayTitle\":[4,\"display-title\"],\"duration\":[16],\"confirmCallback\":[16],\"cancelCallback\":[16]}]]],[\"gx-ide-design-import.cjs\",[[1,\"gx-ide-design-import\",{\"reactiveSettings\":[16],\"extensions\":[16],\"defaultModule\":[16],\"path\":[1025],\"accessToken\":[1025,\"access-token\"],\"importAsWebPanels\":[4,\"import-as-web-panels\"],\"selectModuleCallback\":[16],\"cancelCallback\":[16],\"confirmCallback\":[16],\"loadCallback\":[16],\"loadDesignSystemCallback\":[16],\"loadFontCallback\":[16],\"loadImageCallback\":[16],\"loadPanelDataCallback\":[16],\"requiresAccessTokenCallback\":[16],\"styles\":[16],\"textEditorFactoryCallback\":[16],\"reRenderCounter\":[32],\"stylesAsComboBoxModel\":[32],\"styleValue\":[32],\"accessTokenHasError\":[32],\"pathIsValid\":[32],\"tabsModel\":[32],\"activeTabs\":[32],\"renderedTabs\":[32],\"designData\":[32],\"detailTreeModel\":[32],\"isLoading\":[32],\"isLoaded\":[32],\"messages\":[32],\"selectedFile\":[32],\"selectedDesignType\":[32],\"selectedDesignItem\":[32],\"requiresAccessToken\":[32],\"designDataTreeDataModel\":[32],\"updateTabsActiveTab\":[32],\"fitImages\":[32],\"lastLoadCallbackSettingValues\":[32]},null,{\"pathIsValid\":[\"pathIsValidChanged\"],\"designData\":[\"designDataChanged\"],\"path\":[\"pathChanged\"],\"accessToken\":[\"accessTokenChanged\"],\"styles\":[\"stylesChanged\"],\"messages\":[\"watchMessagesHandler\"]}]]],[\"gx-ide-edit-module-server.cjs\",[[1,\"gx-ide-edit-module-server\",{\"types\":[16],\"name\":[1],\"source\":[1],\"type\":[1],\"confirmCallback\":[16],\"selectSourceCallback\":[16],\"cancelCallback\":[16],\"selectedType\":[32]}]]],[\"gx-ide-gam-installation-settings.cjs\",[[1,\"gx-ide-gam-installation-settings\",{\"displayTitle\":[4,\"display-title\"],\"configurationType\":[1,\"configuration-type\"],\"repairCallback\":[16],\"saveCallback\":[16],\"cancelCallback\":[16],\"defaultConfiguration\":[16],\"canSelectPanels\":[4,\"can-select-panels\"]}]]],[\"gx-ide-kb-manager-export.cjs\",[[1,\"gx-ide-kb-manager-export\",{\"addKBPropertiesCallback\":[16],\"addObjectsCallback\":[16],\"addReferencesCallback\":[16],\"cancelCallback\":[16],\"exportCallback\":[16],\"exportFileDirectoryCallback\":[16],\"fileName\":[1,\"file-name\"],\"kbPropertiesTypes\":[16],\"loader\":[4],\"objectTypes\":[16],\"optionsCallback\":[16],\"addKbPropertiesIsChecked\":[32],\"atLeastOnePropertyItemIsChecked\":[32],\"atLeastOneObjectItemIsChecked\":[32],\"checkedObjectsIds\":[32],\"checkedPropertiesIds\":[32],\"exportAllIsChecked\":[32],\"exportingIsInProcess\":[32],\"hasObjects\":[32],\"objectsTreeViewModel\":[32]},null,{\"objectsTreeViewModel\":[\"objectsTreeViewModelChanged\"],\"objectTypes\":[\"objectTypesChanged\"]}]]],[\"gx-ide-references.cjs\",[[1,\"gx-ide-references\",{\"displayTitle\":[4,\"display-title\"],\"selectedObject\":[1040],\"selectorSourceCallback\":[16],\"loadReferencesCallback\":[16],\"openObjectCallback\":[16],\"openSelectorDialogCallback\":[16],\"selectReferenceCallback\":[16],\"referencedByTreeData\":[32],\"referencesToTreeData\":[32],\"barHidden\":[32],\"objectsSuggestions\":[32]},null,{\"selectedObject\":[\"selectedObjectHandler\"]}]]],[\"gx-ide-start-page.cjs\",[[1,\"gx-ide-start-page\",{\"createKBCallback\":[16],\"openKbCallback\":[16],\"secondarySection\":[16],\"kbs\":[16],\"kbsFilterThreshold\":[2,\"kbs-filter-threshold\"],\"kbFilterValue\":[32],\"filteredKbs\":[32],\"loading\":[32]},null,{\"kbFilterValue\":[\"kbFilterValueChanged\"],\"kbs\":[\"kbsChanged\"]}]]],[\"gx-ide-team-dev-commit.cjs\",[[1,\"gx-ide-team-dev-commit\",{\"displayTitle\":[4,\"display-title\"],\"changeSet\":[16],\"types\":[16],\"folders\":[16],\"categories\":[16],\"getRecentCommentCallback\":[16],\"loadCallback\":[16],\"commitCallback\":[16],\"selectCallback\":[16],\"pendingItemsCheckedCallback\":[16],\"objectsContextMenuCallback\":[16],\"filtersHidden\":[32],\"comment\":[32],\"pendingCommits\":[32],\"ignoredObjects\":[32],\"commitButtonEnabled\":[32],\"filterHasConditions\":[32],\"reload\":[64]}]]],[\"gx-ide-team-dev-update-partial-selection.cjs\",[[1,\"gx-ide-team-dev-update-partial-selection\",{\"displayTitle\":[4,\"display-title\"],\"addCallback\":[16],\"cancelCallback\":[16],\"confirmCallback\":[16],\"selection\":[1040],\"selectedObjectsIds\":[32],\"validate\":[64]}]]],[\"gx-ide-team-dev-update-to-revision.cjs\",[[1,\"gx-ide-team-dev-update-to-revision\",{\"displayTitle\":[4,\"display-title\"],\"cancelCallback\":[16],\"confirmCallback\":[16],\"currentRevision\":[1,\"current-revision\"],\"validate\":[64]}]]],[\"gx-ide-template.cjs\",[[1,\"gx-ide-template\",{\"displayTitle\":[4,\"display-title\"]}]]],[\"gx-ide-wf-settings.cjs\",[[1,\"gx-ide-wf-settings\",{\"displayTitle\":[4,\"display-title\"],\"configurationType\":[1,\"configuration-type\"],\"defaultConfiguration\":[16],\"saveCallback\":[16],\"cancelCallback\":[16]}]]],[\"gx-ide-ai-assistant.cjs\",[[17,\"gx-ide-ai-assistant\",{\"messages\":[1040],\"promptMaxHeight\":[1,\"prompt-max-height\"],\"assistantStatus\":[1025,\"assistant-status\"],\"focusShortcuts\":[16],\"userMessageCallback\":[16],\"clearCallback\":[16],\"promptValue\":[1,\"prompt-value\"],\"filter\":[4],\"userHasTyped\":[32],\"aIInProgress\":[32],\"showFilter\":[32],\"promptHasFocus\":[32],\"filterValue\":[32],\"clear\":[64],\"addMessage\":[64]},[[2,\"focus\",\"handleFocus\"]],{\"aIInProgress\":[\"watchAIInProgressHandler\"],\"messages\":[\"watchMessagesHandler\"]}]]],[\"gx-ide-dashboard-home.cjs\",[[1,\"gx-ide-dashboard-home\",{\"kb\":[16],\"enableEditKBName\":[4,\"enable-edit-k-b-name\"],\"environment\":[16],\"enableEditEnvironmentName\":[4,\"enable-edit-environment-name\"],\"projectDescription\":[1,\"project-description\"],\"enableEditDescription\":[4,\"enable-edit-description\"],\"recentObjects\":[16],\"renameKBCallback\":[16],\"renameEnvironmentCallback\":[16],\"editDescriptionCallback\":[16],\"openObjectCallback\":[16],\"editingEnvName\":[32],\"editingProjectDescription\":[32]},null,{\"recentObjects\":[\"recentObjectsHandler\"]}]]],[\"gx-ide-new-object.cjs\",[[17,\"gx-ide-new-object\",{\"defaultTypeId\":[1,\"default-type-id\"],\"defaultParent\":[16],\"displayTitle\":[4,\"display-title\"],\"cancelCallback\":[16],\"createCallback\":[16],\"shadow\":[4],\"typeCategories\":[1040],\"parent\":[16],\"selectModuleCallback\":[16],\"validateNameCallback\":[16],\"description\":[32],\"name\":[32],\"nameValidationErrorMessage\":[32],\"selectedCategory\":[32],\"selectedType\":[32],\"typeCategoriesActionListModel\":[32],\"typesActionListModel\":[32],\"selectedTypeMap\":[32],\"suspendShortcuts\":[64]},null,{\"typeCategories\":[\"typeCategoriesChanged\"]}]]],[\"gx-ide-card.cjs\",[[1,\"gx-ide-card\",{\"cardTitle\":[1,\"card-title\"],\"cardSubTitle\":[1,\"card-sub-title\"],\"icon\":[1]}]]],[\"gx-ide-connect-gx-server.cjs\",[[1,\"gx-ide-connect-gx-server\",{\"authenticationTypes\":[16],\"cancelCallback\":[16],\"connectCallback\":[16],\"defaultConnectionData\":[16],\"enableCustomServer\":[4,\"enable-custom-server\"],\"serverUrls\":[16],\"authenticationTypesComboBoxModel\":[32],\"gxServerConnectionData\":[32],\"serverUrlsComboBoxModel\":[32],\"validatableControls\":[32]},null,{\"authenticationTypes\":[\"authenticationTypesChanged\"],\"serverUrls\":[\"serverUrlsChanged\"]}]]],[\"gx-ide-create-kb-from-server.cjs\",[[1,\"gx-ide-create-kb-from-server\",{\"connectionData\":[16],\"cancelCallback\":[16],\"changeConnectionCallback\":[16],\"createKBCallback\":[16],\"getGXserverKBsCallback\":[16],\"selectKBVersionsCallback\":[16],\"enableSelectVersionsButton\":[32],\"localKbNameInputValue\":[32],\"filterValue\":[32],\"kbsFilteredActionListModel\":[32],\"validatableControls\":[32],\"versionSelectedType\":[32],\"versionsValueInput\":[32]}]]],[\"gx-ide-current-user-info.cjs\",[[1,\"gx-ide-current-user-info\",{\"userInfo\":[16],\"myAccountCallback\":[16],\"changeTeamCallback\":[16],\"changeLanguageCallback\":[16],\"changeModeCallback\":[16],\"signOutCallback\":[16],\"showTermsCallback\":[16],\"showMenu\":[32]}]]],[\"gx-ide-directory-selector.cjs\",[[1,\"gx-ide-directory-selector\",{\"accessibilityLabels\":[16],\"label\":[1],\"labelPosition\":[513,\"label-position\"],\"centerLabel\":[1028,\"center-label\"],\"labelWidth\":[1,\"label-width\"],\"selectDirectoryCallback\":[16],\"value\":[1025],\"icon\":[32]}]]],[\"gx-ide-new-environment.cjs\",[[1,\"gx-ide-new-environment\",{\"cancelCallback\":[16],\"createCallback\":[16],\"dataStores\":[1040],\"environmentName\":[1025,\"environment-name\"],\"getDataSourcesCallback\":[16],\"getEnvironmentNameCallback\":[16],\"getFrontEndsCallback\":[16],\"isAdvanced\":[4,\"is-advanced\"],\"languages\":[16],\"runtimes\":[16],\"setAsTarget\":[4,\"set-as-target\"],\"advancedTabIsVisible\":[32],\"frontEnds\":[32],\"validatableControls\":[32],\"dataStoresComboBoxModel\":[32],\"languageComboBoxModel\":[32],\"runtimesRadioGroupModel\":[32],\"suspendShortcuts\":[64]},null,{\"dataStores\":[\"dataStoresChanged\"],\"languages\":[\"languagesChanged\"],\"runtimes\":[\"runtimesChanged\"]}]]],[\"gx-ide-new-kb.cjs\",[[1,\"gx-ide-new-kb\",{\"authenticationTypes\":[16],\"cancelCallback\":[16],\"collations\":[16],\"createCallback\":[16],\"createDataFilesInKBFolder\":[4,\"create-data-files-in-k-b-folder\"],\"databaseName\":[1,\"database-name\"],\"defaultDataSources\":[1040],\"getDataSourcesCallback\":[16],\"getFrontEndsCallback\":[16],\"isAdvanced\":[4,\"is-advanced\"],\"kbLocation\":[1025,\"kb-location\"],\"kbName\":[1,\"kb-name\"],\"password\":[1],\"prototypingEnvironments\":[16],\"prototypingTargets\":[16],\"savePassword\":[4,\"save-password\"],\"selectLocationCallback\":[16],\"serverNames\":[16],\"userInterfaceLanguages\":[16],\"userName\":[1,\"user-name\"],\"advancedTabIsVisible\":[32],\"frontEnds\":[32],\"validatableControls\":[32],\"createDataInKbDisabled\":[32],\"userNameVisible\":[32],\"passwordVisible\":[32],\"savePasswordVisible\":[32],\"authenticationTypesComboBoxModel\":[32],\"authenticationTypesInitialValue\":[32],\"collationsComboBoxModel\":[32],\"collationsInitialValue\":[32],\"defaultDataSourcesComboBoxModel\":[32],\"defaultDataSourcesInitialValue\":[32],\"prototypingTargetsComboBoxModel\":[32],\"prototypingTargetsInitialValue\":[32],\"prototypingEnvironmentsComboBoxModel\":[32],\"prototypingEnvironmentsInitialValue\":[32],\"serverNamesComboBoxModel\":[32],\"serverNamesInitialValue\":[32],\"userInterfaceLanguagesComboBoxModel\":[32],\"userInterfaceLanguagesInitialValue\":[32],\"suspendShortcuts\":[64]},null,{\"authenticationTypes\":[\"watchAuthenticationTypes\"],\"collations\":[\"watchCollations\"],\"defaultDataSources\":[\"watchDefaultDataSources\"],\"prototypingEnvironments\":[\"watchPrototypingEnvironments\"],\"prototypingTargets\":[\"watchPrototypingTargets\"],\"serverNames\":[\"watchServerNames\"],\"userInterfaceLanguages\":[\"watchUserInterfaceLanguages\"]}]]],[\"gx-ide-select-user-team.cjs\",[[1,\"gx-ide-select-user-team\",{\"cancelCallback\":[16],\"continueCallback\":[16],\"teams\":[16]},null,{\"teams\":[\"teamsChanged\"]}]]],[\"gx-ide-share-kb.cjs\",[[1,\"gx-ide-share-kb\",{\"connectionData\":[16],\"cancelCallback\":[16],\"changeConnectionCallback\":[16],\"kbName\":[1025,\"kb-name\"],\"shareKBCallback\":[16],\"selectKBVersionsCallback\":[16],\"enableSelectVersionsButton\":[32],\"validatableControls\":[32],\"versionSelectedType\":[32],\"versionsValueInput\":[32]}]]],[\"gx-ide-sign-in.cjs\",[[1,\"gx-ide-sign-in\",{\"termsCallback\":[16],\"signInCallback\":[16]}]]],[\"gx-ide-sign-in-team.cjs\",[[1,\"gx-ide-sign-in-team\",{\"authStep\":[1,\"auth-step\"],\"continueCallback\":[16],\"signInCallback\":[16],\"teams\":[16],\"termsCallback\":[16],\"authStepInternal\":[32],\"slideIsVisible\":[32]},null,{\"authStep\":[\"authStepChanged\"],\"teams\":[\"teamsChanged\"]}]]],[\"gx-ide-splash.cjs\",[[1,\"gx-ide-splash\",{\"version\":[1],\"removeSplash\":[4,\"remove-splash\"],\"splashVisible\":[32]},null,{\"removeSplash\":[\"removeSplashChanged\"]}]]],[\"gx-ide-switch-panel.cjs\",[[1,\"gx-ide-switch-panel\"]]],[\"gx-ide-switcher.cjs\",[[1,\"gx-ide-switcher\"]]],[\"gx-ide-test.cjs\",[[1,\"gx-ide-test\",{\"name\":[1],\"filterOn\":[32]}]]],[\"gx-ide-top-bar.cjs\",[[1,\"gx-ide-top-bar\",{\"topBarTitle\":[1,\"top-bar-title\"]}]]],[\"gx-ide-welcome-page.cjs\",[[1,\"gx-ide-welcome-page\",{\"transitionType\":[1,\"transition-type\"],\"wordsPerMinute\":[2,\"words-per-minute\"],\"closeCallback\":[16],\"slides\":[16],\"activeSlideIndex\":[32],\"displaySlider\":[32],\"copyrightsVisible\":[32],\"lastSlideReached\":[32],\"sliderVisible\":[32],\"slideTransitioning\":[32],\"userHasChangedSlide\":[32]}]]],[\"gx-ide-bpm-objects-selector.cjs\",[[1,\"gx-ide-bpm-objects-selector\",{\"displayTitle\":[4,\"display-title\"],\"selection\":[1040],\"addCallback\":[16],\"referencesCallback\":[16],\"objects\":[32],\"selectedObjects\":[32]}]]],[\"gx-ide-ai-message.cjs\",[[0,\"gx-ide-ai-message\",{\"message\":[1],\"messageType\":[1,\"message-type\"],\"filterValue\":[1,\"filter-value\"],\"hidden\":[4],\"translations\":[16],\"visible\":[32],\"showCopiedMessage\":[32]}]]],[\"gx-ide-list-selector_2.cjs\",[[1,\"gx-ide-list-selector\",{\"ordered\":[4],\"readonly\":[4],\"type\":[1],\"required\":[4],\"ellipsis\":[4],\"value\":[1025],\"listName\":[1,\"list-name\"],\"noItemsBorder\":[4,\"no-items-border\"],\"noListBorder\":[516,\"no-list-border\"]},[[2,\"itemSelectionChanged\",\"itemSelectionChangedHandler\"]]],[4,\"gx-ide-list-selector-item\",{\"itemId\":[513,\"item-id\"],\"itemValue\":[1,\"item-value\"],\"itemChecked\":[1028,\"item-checked\"],\"readonly\":[1540],\"ellipsis\":[1540],\"icon\":[1],\"noBorder\":[1540,\"no-border\"],\"universalSlotEnd\":[516,\"universal-slot-end\"]}]]],[\"gx-ide-status-buttons.cjs\",[[1,\"gx-ide-status-buttons\",{\"active\":[4],\"errors\":[2],\"hideError\":[4,\"hide-error\"],\"warnings\":[2],\"hideWarning\":[4,\"hide-warning\"],\"successes\":[2],\"hideSuccess\":[4,\"hide-success\"],\"messages\":[2],\"hideMessage\":[4,\"hide-message\"],\"minimal\":[4],\"compact\":[516],\"noInnerBorders\":[516,\"no-inner-borders\"],\"iconsSize\":[32]}]]],[\"gx-ide-loader.cjs\",[[1,\"gx-ide-loader\",{\"abortTime\":[2,\"abort-time\"],\"cancelCallback\":[16],\"cancelLabel\":[1,\"cancel-label\"],\"description\":[1],\"displayBorder\":[516,\"display-border\"],\"loaderTitle\":[1,\"loader-title\"],\"show\":[1028],\"showWrapper\":[32]}]]],[\"gx-ide-entity-selector.cjs\",[[1,\"gx-ide-entity-selector\",{\"defaultValue\":[16],\"disabled\":[516],\"labelCaption\":[1,\"label-caption\"],\"labelPosition\":[513,\"label-position\"],\"name\":[513],\"selectEntityCallback\":[16],\"value\":[1040],\"buttonHasFocus\":[32],\"iconSrc\":[32]},null,{\"value\":[\"valueChangedHandler\"]}]]],[\"gx-ide-empty-state.cjs\",[[1,\"gx-ide-empty-state\",{\"isAnimated\":[4,\"is-animated\"],\"stateDescription\":[1,\"state-description\"],\"stateIconSrc\":[1,\"state-icon-src\"],\"stateTitle\":[1,\"state-title\"]}]]],[\"gx-ide-container_2.cjs\",[[1,\"gx-ide-container\",{\"inactiveTitle\":[4,\"inactive-title\"],\"containerTitle\":[1,\"container-title\"],\"titleType\":[1,\"title-type\"],\"displayBorder\":[4,\"display-border\"],\"displayBorderTop\":[4,\"display-border-top\"],\"displayBorderEnd\":[4,\"display-border-end\"],\"displayBorderBottom\":[4,\"display-border-bottom\"],\"displayBorderStart\":[4,\"display-border-start\"],\"sectionsPadding\":[1,\"sections-padding\"],\"titleAlignment\":[1,\"title-alignment\"],\"noHeadingBorder\":[4,\"no-heading-border\"],\"noHeadingGap\":[4,\"no-heading-gap\"],\"noHeadingPadding\":[4,\"no-heading-padding\"],\"noHeadingPaddingBlockEnd\":[4,\"no-heading-padding-block-end\"],\"headingPaddingTop\":[4,\"heading-padding-top\"],\"headingJustify\":[1,\"heading-justify\"],\"titleHeightAsInput\":[4,\"title-height-as-input\"],\"flexRow\":[4,\"flex-row\"],\"flexContent\":[4,\"flex-content\"],\"noContentBorderTop\":[4,\"no-content-border-top\"],\"noContentPadding\":[4,\"no-content-padding\"],\"noContentGap\":[4,\"no-content-gap\"],\"alignItems\":[1,\"align-items\"],\"justifyContent\":[1,\"justify-content\"],\"contentBorderEnd\":[4,\"content-border-end\"],\"slimmerAboveFooter\":[4,\"slimmer-above-footer\"],\"noAboveFooterPadding\":[4,\"no-above-footer-padding\"],\"noBorderAboveFooter\":[4,\"no-border-above-footer\"],\"slimmerFooter\":[4,\"slimmer-footer\"],\"noFooterPadding\":[4,\"no-footer-padding\"],\"footerJustify\":[1,\"footer-justify\"],\"noBorderFooter\":[4,\"no-border-footer\"],\"hasHeaderSlot\":[32],\"hasSlottedContent\":[32],\"hasFooterSlot\":[32],\"hasAboveFooterSlot\":[32],\"hasOnlyHeading\":[32],\"hasOnlyContent\":[32],\"hasOnlyFooter\":[32]}],[1,\"gx-ide-title\",{\"titleCaption\":[1,\"title-caption\"],\"type\":[1],\"alignment\":[1],\"padding\":[516],\"noPaddingBottom\":[516,\"no-padding-bottom\"],\"border\":[516]}]]]]"), options);
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
exports.setNonce = index.setNonce;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* STENCIL IMPORTS */
|
|
2
2
|
import { Host, h } from "@stencil/core";
|
|
3
3
|
/* OTHER LIBRARIES IMPORTS */
|
|
4
|
+
const CSS_BUNDLES = ["resets/box-sizing", "components/icon"];
|
|
4
5
|
/* CUSTOM IMPORTS */
|
|
5
6
|
import { Locale } from "../../common/locale";
|
|
6
7
|
export class GxIdeTemplate {
|
|
@@ -242,7 +243,7 @@ export class GxIdeTemplate {
|
|
|
242
243
|
return (h(Host, { class: {
|
|
243
244
|
[`assistant--${this.assistantStatus}`]: true,
|
|
244
245
|
"assistant--in-progress": this.aIInProgress
|
|
245
|
-
} }, h("div", { class: "gx-ide-main-wrapper" }, h("header", { class: "header" }, h("div", { class: "header__first-row" }, h("gxg-title", { type: "title-02" }, this._componentLocale.componentName), h("div", { class: "header__actions-wrapper" }, this.filter ? (h("gxg-button", { class: "header__filter-button", type: "tertiary", icon: "menus/find", onClick: this.toggleFilterHandler, disabled: this.messages.length === 0 })) : null, h("gxg-button", { class: "header__clear-button", type: "tertiary", icon: "bpm/delete", onClick: this.clearMessages, disabled: this.messages.length === 0 }))), this.filter ? (h("div", { class: {
|
|
246
|
+
} }, h("ch-theme", { model: CSS_BUNDLES }), h("div", { class: "gx-ide-main-wrapper" }, h("header", { class: "header" }, h("div", { class: "header__first-row" }, h("gxg-title", { type: "title-02" }, this._componentLocale.componentName), h("div", { class: "header__actions-wrapper" }, this.filter ? (h("gxg-button", { class: "header__filter-button", type: "tertiary", icon: "menus/find", onClick: this.toggleFilterHandler, disabled: this.messages.length === 0 })) : null, h("gxg-button", { class: "header__clear-button", type: "tertiary", icon: "bpm/delete", onClick: this.clearMessages, disabled: this.messages.length === 0 }))), this.filter ? (h("div", { class: {
|
|
246
247
|
"header__second-row": true,
|
|
247
248
|
"header__second-row--visible": this.showFilter
|
|
248
249
|
} }, h("div", { class: "filter-inner-wrapper" }, h("gxg-form-text", { class: "header__filter", onInput: this.filterMessagesHandler, ref: el => (this.filterEl = el) })))) : null), h("div", { class: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-assistant.js","sourceRoot":"","sources":["../../../src/components/ai-assistant/ai-assistant.tsx"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EAEL,OAAO,EACP,MAAM,EACN,KAAK,EACL,KAAK,EACL,MAAM,EACP,MAAM,eAAe,CAAC;AACvB,6BAA6B;AAC7B,oBAAoB;AACpB,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAQ7C,MAAM,OAAO,aAAa;;QAOhB,sBAAiB,GAAG,KAAK,CAAC;QAG1B,aAAQ,GAAG,IAAI,CAAC;QAChB,uBAAkB,GAAG,IAAI,CAAC;QAwKlC,qBAAqB;QAEb,yBAAoB,GAAG,GAAG,EAAE;;YAClC,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;QACH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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["/* STENCIL IMPORTS */\nimport {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Element,\n Method,\n State,\n Watch,\n Listen\n} from \"@stencil/core\";\n/* OTHER LIBRARIES IMPORTS */\n/* CUSTOM IMPORTS */\nimport { Locale } from \"../../common/locale\";\n\n@Component({\n tag: \"gx-ide-ai-assistant\",\n styleUrl: \"ai-assistant.scss\",\n shadow: { delegatesFocus: true },\n assetsDirs: [\"gx-ide-assets/ai-assistant\"]\n})\nexport class GxIdeTemplate {\n // 1.OWN PROPERTIES //\n\n /**\n * The component hard-coded strings translations.\n */\n private _componentLocale: any;\n private renderedFirstTime = false;\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 // 2. REFERENCE TO ELEMENTS //\n\n @Element() el: HTMLGxIdeAiAssistantElement;\n private textAreaEl!: HTMLGxgFormTextareaElement;\n private textareaShadowPart: HTMLTextAreaElement;\n private filterEl: HTMLGxgFormTextElement;\n private messagesWrapperEl!: HTMLDivElement;\n\n // 3.STATE() VARIABLES //\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 // 4.PUBLIC PROPERTY API | WATCH'S //\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 // 5.EVENTS (EMIT) //\n\n /**\n * This event is emitted once just after the component is fully loaded and the first render() occurs\n */\n @Event() componentDidRenderFirstTime: EventEmitter<boolean>;\n\n // 6.COMPONENT LIFECYCLE METHODS //\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 }\n\n componentDidRender() {\n if (!this.renderedFirstTime) {\n this.componentDidRenderFirstTime.emit(\n this._componentLocale.componentName\n );\n this.renderedFirstTime = true;\n }\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 // 7.LISTENERS //\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 // 8.PUBLIC METHODS API //\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 // 9.LOCAL METHODS //\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 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 ></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 // 10.RENDER() FUNCTION //\n\n render() {\n return (\n <Host\n class={{\n [`assistant--${this.assistantStatus}`]: true,\n \"assistant--in-progress\": this.aIInProgress\n }}\n >\n <div class=\"gx-ide-main-wrapper\">\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"]}
|
|
1
|
+
{"version":3,"file":"ai-assistant.js","sourceRoot":"","sources":["../../../src/components/ai-assistant/ai-assistant.tsx"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EAEL,OAAO,EACP,MAAM,EACN,KAAK,EACL,KAAK,EACL,MAAM,EACP,MAAM,eAAe,CAAC;AACvB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AE,MAAM,IAAG,CAAC,CAAC,CAAC,CAAC,CAChC,WACE,KAAK,EAAE;4BACL,iBAAiB,EAAE,IAAI;yBACxB,IAEA,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE;wBACvC,6BAA6B;wBAC7B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CACd,YAAM,KAAK,EAAC,kBAAkB,IAAE,QAAQ,CAAQ,CACjD,CAAC,CAAC,CAAC,IAAI,CAAC;oBACX,CAAC,CAAC,CACE,CACP,CAAC,CAAC,CAAC,IAAI,CACJ,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["/* STENCIL IMPORTS */\nimport {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Element,\n Method,\n State,\n Watch,\n Listen\n} from \"@stencil/core\";\n/* OTHER LIBRARIES IMPORTS */\nconst CSS_BUNDLES: MercuryBundles = [\"resets/box-sizing\", \"components/icon\"];\n/* CUSTOM IMPORTS */\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: { delegatesFocus: true },\n assetsDirs: [\"gx-ide-assets/ai-assistant\"]\n})\nexport class GxIdeTemplate {\n // 1.OWN PROPERTIES //\n\n /**\n * The component hard-coded strings translations.\n */\n private _componentLocale: any;\n private renderedFirstTime = false;\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 // 2. REFERENCE TO ELEMENTS //\n\n @Element() el: HTMLGxIdeAiAssistantElement;\n private textAreaEl!: HTMLGxgFormTextareaElement;\n private textareaShadowPart: HTMLTextAreaElement;\n private filterEl: HTMLGxgFormTextElement;\n private messagesWrapperEl!: HTMLDivElement;\n\n // 3.STATE() VARIABLES //\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 // 4.PUBLIC PROPERTY API | WATCH'S //\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 // 5.EVENTS (EMIT) //\n\n /**\n * This event is emitted once just after the component is fully loaded and the first render() occurs\n */\n @Event() componentDidRenderFirstTime: EventEmitter<boolean>;\n\n // 6.COMPONENT LIFECYCLE METHODS //\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 }\n\n componentDidRender() {\n if (!this.renderedFirstTime) {\n this.componentDidRenderFirstTime.emit(\n this._componentLocale.componentName\n );\n this.renderedFirstTime = true;\n }\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 // 7.LISTENERS //\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 // 8.PUBLIC METHODS API //\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 // 9.LOCAL METHODS //\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 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 ></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 // 10.RENDER() FUNCTION //\n\n render() {\n return (\n <Host\n class={{\n [`assistant--${this.assistantStatus}`]: true,\n \"assistant--in-progress\": this.aIInProgress\n }}\n >\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <div class=\"gx-ide-main-wrapper\">\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"]}
|
|
@@ -25,6 +25,16 @@ Found on /common/helpers.tsx hiChar function is used to add a span/class to ever
|
|
|
25
25
|
border-inline-start: var(--mer-border__width--md) solid transparent;
|
|
26
26
|
background-color: var(--mer-color__neutral-gray--1200);
|
|
27
27
|
margin-block-start: var(--mer-spacing--xs);
|
|
28
|
+
position: relative;
|
|
29
|
+
}
|
|
30
|
+
.message__header {
|
|
31
|
+
display: flex;
|
|
32
|
+
gap: var(--mer-spacing--xs);
|
|
33
|
+
justify-content: space-between;
|
|
34
|
+
pointer-events: none;
|
|
35
|
+
}
|
|
36
|
+
.message__header .icon-md {
|
|
37
|
+
opacity: 0;
|
|
28
38
|
}
|
|
29
39
|
.message__role {
|
|
30
40
|
display: inline-block;
|
|
@@ -52,7 +62,6 @@ Found on /common/helpers.tsx hiChar function is used to add a span/class to ever
|
|
|
52
62
|
.message__caption {
|
|
53
63
|
font-size: var(--mer-font__size--xs);
|
|
54
64
|
line-height: var(--mer-line-height--regular);
|
|
55
|
-
position: relative;
|
|
56
65
|
}
|
|
57
66
|
.message--visible {
|
|
58
67
|
grid-template-rows: 1fr;
|
|
@@ -103,6 +112,15 @@ Found on /common/helpers.tsx hiChar function is used to add a span/class to ever
|
|
|
103
112
|
background-color: rgba(251, 124, 132, 0.05);
|
|
104
113
|
border-color: var(--mer-border-color__error);
|
|
105
114
|
}
|
|
115
|
+
.message--copyable {
|
|
116
|
+
cursor: pointer;
|
|
117
|
+
}
|
|
118
|
+
.message--copyable:hover {
|
|
119
|
+
filter: brightness(1.2);
|
|
120
|
+
}
|
|
121
|
+
.message--copyable:hover .icon-md {
|
|
122
|
+
opacity: 1;
|
|
123
|
+
}
|
|
106
124
|
.message:last-child {
|
|
107
125
|
margin-block-end: 0;
|
|
108
126
|
}
|
|
@@ -191,14 +209,26 @@ Found on /common/helpers.tsx hiChar function is used to add a span/class to ever
|
|
|
191
209
|
position: absolute;
|
|
192
210
|
width: 100%;
|
|
193
211
|
height: 100%;
|
|
212
|
+
top: 0;
|
|
213
|
+
left: 0;
|
|
194
214
|
display: flex;
|
|
195
215
|
align-items: center;
|
|
196
216
|
justify-content: center;
|
|
197
217
|
color: var(--mer-color__neutral-gray--300);
|
|
198
218
|
display: flex;
|
|
199
|
-
gap: var(--mer-spacing--
|
|
219
|
+
gap: var(--mer-spacing--xs);
|
|
220
|
+
opacity: 0;
|
|
221
|
+
animation: fadeIn var(--mer-timing--fast) ease-out forwards;
|
|
200
222
|
}
|
|
201
223
|
|
|
224
|
+
@keyframes fadeIn {
|
|
225
|
+
0% {
|
|
226
|
+
opacity: 0;
|
|
227
|
+
}
|
|
228
|
+
100% {
|
|
229
|
+
opacity: 1;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
202
232
|
.hiChar {
|
|
203
233
|
color: var(--mer-color__primary--200);
|
|
204
234
|
filter: brightness(1.3);
|
|
@@ -1,19 +1,37 @@
|
|
|
1
1
|
/* STENCIL IMPORTS */
|
|
2
2
|
import { h } from "@stencil/core";
|
|
3
3
|
/* OTHER LIBRARIES IMPORTS */
|
|
4
|
+
import { getIconPath } from "@genexus/mercury";
|
|
4
5
|
/* CUSTOM IMPORTS */
|
|
5
6
|
import { Locale } from "../../common/locale";
|
|
6
7
|
import { hiChar } from "../../common/helpers";
|
|
8
|
+
const COPY_ICON = getIconPath({
|
|
9
|
+
category: "bpm",
|
|
10
|
+
name: "tasks",
|
|
11
|
+
colorType: "neutral"
|
|
12
|
+
});
|
|
7
13
|
export class GxIdeAiMessage {
|
|
8
14
|
constructor() {
|
|
9
15
|
this.copyable = false;
|
|
10
16
|
// 7.LISTENERS //
|
|
11
17
|
// 8.PUBLIC METHODS API //
|
|
12
18
|
// 9.LOCAL METHODS //
|
|
19
|
+
this.copyMessage = () => {
|
|
20
|
+
const messageInfo = JSON.stringify({
|
|
21
|
+
messageType: this.messageType,
|
|
22
|
+
message: this.message
|
|
23
|
+
}, null, 2);
|
|
24
|
+
navigator.clipboard.writeText(messageInfo);
|
|
25
|
+
this.showCopiedMessage = true;
|
|
26
|
+
setTimeout(() => {
|
|
27
|
+
this.showCopiedMessage = false;
|
|
28
|
+
}, 1500);
|
|
29
|
+
};
|
|
13
30
|
this.evaluateMessageIsCopyable = () => {
|
|
14
|
-
this.copyable =
|
|
15
|
-
|
|
16
|
-
|
|
31
|
+
this.copyable = this.messageType !== "assistant-in-progress";
|
|
32
|
+
};
|
|
33
|
+
this.evaluateCopyIcon = () => {
|
|
34
|
+
return this.copyable ? (h("ch-image", { class: "icon-md", src: COPY_ICON })) : null;
|
|
17
35
|
};
|
|
18
36
|
this.visible = false;
|
|
19
37
|
this.showCopiedMessage = false;
|
|
@@ -46,19 +64,18 @@ export class GxIdeAiMessage {
|
|
|
46
64
|
"message--assistant": this.messageType !== "user",
|
|
47
65
|
"message--copyable": this.copyable,
|
|
48
66
|
"message--copying": this.showCopiedMessage
|
|
49
|
-
} }, h("div", { class: "message__outer-wrapper" }, h("div", { class: {
|
|
67
|
+
}, onClick: this.copyable && this.copyMessage }, h("div", { class: "message__outer-wrapper" }, h("div", { class: {
|
|
50
68
|
"message__inner-wrapper": true
|
|
51
|
-
} }, this.messageType === "user" ? (h("span", { class: "message__role message__role--user" }, this._componentLocale.you)) : (h("span", { class: {
|
|
69
|
+
} }, this.messageType === "user" ? (h("div", { class: "message__header" }, h("span", { class: "message__role message__role--user" }, this._componentLocale.you), this.evaluateCopyIcon())) : (h("div", { class: "message__header" }, h("span", { class: {
|
|
52
70
|
"message__role": this.messageType !== "assistant-in-progress",
|
|
53
71
|
"message__role--hidden": this.messageType === "assistant-in-progress",
|
|
54
72
|
"message__role--assistant": true
|
|
55
|
-
} }, this._componentLocale.assistant)), h("div", { class: {
|
|
73
|
+
} }, this._componentLocale.assistant), this.evaluateCopyIcon())), h("div", { class: {
|
|
56
74
|
"message__caption": true,
|
|
57
75
|
"message__caption--in-progress": this.messageType === "assistant-in-progress"
|
|
58
|
-
} }, hiChar(this.message, this.filterValue)), this.messageType === "assistant-in-progress" ? (h("div", { class: "animation-wrapper" }, h("div", { class: "dot-pulse" }))) : null))));
|
|
76
|
+
} }, this.showCopiedMessage ? (h("span", { class: "copied" }, h("ch-image", { class: "icon-md", src: COPY_ICON }), this.translations["copied"])) : null, hiChar(this.message, this.filterValue)), this.messageType === "assistant-in-progress" ? (h("div", { class: "animation-wrapper" }, h("div", { class: "dot-pulse" }))) : null))));
|
|
59
77
|
}
|
|
60
78
|
static get is() { return "gx-ide-ai-message"; }
|
|
61
|
-
static get encapsulation() { return "shadow"; }
|
|
62
79
|
static get originalStyleUrls() {
|
|
63
80
|
return {
|
|
64
81
|
"$": ["ai-message.scss"]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-message.js","sourceRoot":"","sources":["../../../src/components/ai-assistant/ai-message.tsx"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACnE,6BAA6B;AAC7B,oBAAoB;AACpB,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAs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*/\nimport { Component, h, Prop, Element, State } from \"@stencil/core\";\n/* OTHER LIBRARIES IMPORTS */\nimport { getIconPath } from \"@genexus/mercury\";\n/* CUSTOM IMPORTS */\nimport { Locale } from \"../../common/locale\";\nimport { MessageType } from \"./ai-assistant\";\nimport { hiChar } from \"../../common/helpers\";\n\nconst COPY_ICON = getIconPath({\n category: \"bpm\",\n name: \"tasks\",\n colorType: \"neutral\"\n});\n@Component({\n tag: \"gx-ide-ai-message\",\n styleUrl: \"ai-message.scss\",\n shadow: false,\n assetsDirs: [\"gx-ide-assets/ai-message\"]\n})\nexport class GxIdeAiMessage {\n /*\nINDEX:\n1.OWN PROPERTIES \n2.REFERENCE TO ELEMENTS\n3.STATE() VARIABLES\n4.PUBLIC PROPERTY API | WATCH'S\n5.EVENTS (EMIT)\n6.COMPONENT LIFECYCLE METHODS\n7.LISTENERS\n8.PUBLIC METHODS API\n9.LOCAL METHODS\n10.RENDER() FUNCTION\n*/\n\n // 1.OWN PROPERTIES //\n\n /* The message allows to be copied*/\n private _componentLocale: any;\n private copyable = false;\n\n // 2. REFERENCE TO ELEMENTS //\n\n @Element() el: HTMLGxIdeAiMessageElement;\n\n // 3.STATE() VARIABLES //\n\n /**\n * This wil display the message if true\n */\n @State() visible = false;\n\n /**\n * This wil show the user a text, indicating that the message has been copied\n */\n @State() showCopiedMessage = false;\n\n // 4.PUBLIC PROPERTY API | WATCH'S //\n\n /**\n * The actual message\n */\n @Prop() readonly message: string;\n\n /**\n * The message type\n */\n @Prop() readonly messageType: MessageType;\n\n /**\n * The filter value\n */\n @Prop() readonly filterValue: string;\n\n /**\n * It hides the message (used for the filter)\n */\n @Prop() readonly hidden: boolean;\n\n /**\n * An object with the needed string translations.\n */\n @Prop() readonly translations: Translations;\n\n // 5.EVENTS (EMIT) //\n\n // 6.COMPONENT LIFECYCLE METHODS //\n\n async componentWillLoad() {\n this._componentLocale = await Locale.getComponentStrings(this.el);\n this.evaluateMessageIsCopyable();\n }\n\n componentDidRender() {\n setTimeout(() => {\n /* Without the timeout it appears instantly (no apparent transition)*/\n this.visible = true;\n const messagesList = this.el.parentElement;\n messagesList.scrollTo(0, 0);\n }, 0);\n }\n\n // 7.LISTENERS //\n\n // 8.PUBLIC METHODS API //\n\n // 9.LOCAL METHODS //\n\n private copyMessage = () => {\n const messageInfo = JSON.stringify(\n {\n messageType: this.messageType,\n message: this.message\n },\n null,\n 2\n );\n\n navigator.clipboard.writeText(messageInfo);\n this.showCopiedMessage = true;\n setTimeout(() => {\n this.showCopiedMessage = false;\n }, 1500);\n };\n\n private evaluateMessageIsCopyable = () => {\n this.copyable = this.messageType !== \"assistant-in-progress\";\n };\n\n private evaluateCopyIcon = () => {\n return this.copyable ? (\n <ch-image class=\"icon-md\" src={COPY_ICON}></ch-image>\n ) : null;\n };\n\n // 10.RENDER() FUNCTION //\n\n render() {\n return (\n <li\n class={{\n \"message\": true,\n \"message--visible\": this.visible && !this.hidden,\n [`message--${[this.messageType]}`]: true,\n \"message--assistant\": this.messageType !== \"user\",\n \"message--copyable\": this.copyable,\n \"message--copying\": this.showCopiedMessage\n }}\n onClick={this.copyable && this.copyMessage}\n >\n <div class=\"message__outer-wrapper\">\n <div\n class={{\n \"message__inner-wrapper\": true\n }}\n >\n {this.messageType === \"user\" ? (\n <div class=\"message__header\">\n <span class=\"message__role message__role--user\">\n {this._componentLocale.you}\n </span>\n {this.evaluateCopyIcon()}\n </div>\n ) : (\n <div class=\"message__header\">\n <span\n class={{\n \"message__role\":\n this.messageType !== \"assistant-in-progress\",\n \"message__role--hidden\":\n this.messageType === \"assistant-in-progress\",\n \"message__role--assistant\": true\n }}\n >\n {this._componentLocale.assistant}\n </span>\n {this.evaluateCopyIcon()}\n </div>\n )}\n <div\n class={{\n \"message__caption\": true,\n \"message__caption--in-progress\":\n this.messageType === \"assistant-in-progress\"\n }}\n >\n {this.showCopiedMessage ? (\n <span class=\"copied\">\n <ch-image class=\"icon-md\" src={COPY_ICON}></ch-image>\n {this.translations[\"copied\"]}\n </span>\n ) : null}\n {hiChar(this.message, this.filterValue)}\n </div>\n {this.messageType === \"assistant-in-progress\" ? (\n <div class=\"animation-wrapper\">\n <div class=\"dot-pulse\"></div>\n </div>\n ) : null}\n </div>\n </div>\n </li>\n );\n }\n}\n\nexport type Translations = {\n [key: string]: string;\n};\n"]}
|
|
@@ -1,22 +1,39 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { g as getIconPath } from './MERCURY_ASSETS.js';
|
|
2
3
|
import { L as Locale } from './locale.js';
|
|
3
4
|
import { h as hiChar } from './helpers.js';
|
|
4
5
|
|
|
5
|
-
const aiMessageCss = ":host{font-family:var(--mer-font-family--primary)}.message{color:var(--mer-color__neutral-gray--100);display:grid;grid-template-rows:0fr;transition:grid-template-rows 100ms;transition:grid-template-rows 100ms, -ms-grid-rows 100ms;}.message__outer-wrapper{overflow:hidden}.message__inner-wrapper{padding:var(--mer-spacing--sm) var(--mer-spacing--sm);border-radius:var(--mer-border__radius--sm);border-inline-start:var(--mer-border__width--md) solid transparent;background-color:var(--mer-color__neutral-gray--1200);margin-block-start:var(--mer-spacing--xs)}.message__role{display:inline-block;font-weight:var(--mer-font__weight--semi-bold);margin-block-end:var(--mer-spacing--xs);display:inline-grid;grid-template-columns:max-content max-content;gap:6px}.message__role:before{content:\"\";display:grid;place-self:center flex-end;inline-size:4px;block-size:4px;border-radius:50%;background-color:currentcolor}.message__role--user{color:var(--mer-color__primary--300)}.message__role--hidden{display:none}.message__caption{font-size:var(--mer-font__size--xs);line-height:var(--mer-line-height--regular)
|
|
6
|
+
const aiMessageCss = ":host{font-family:var(--mer-font-family--primary)}.message{color:var(--mer-color__neutral-gray--100);display:grid;grid-template-rows:0fr;transition:grid-template-rows 100ms;transition:grid-template-rows 100ms, -ms-grid-rows 100ms;}.message__outer-wrapper{overflow:hidden}.message__inner-wrapper{padding:var(--mer-spacing--sm) var(--mer-spacing--sm);border-radius:var(--mer-border__radius--sm);border-inline-start:var(--mer-border__width--md) solid transparent;background-color:var(--mer-color__neutral-gray--1200);margin-block-start:var(--mer-spacing--xs);position:relative}.message__header{display:flex;gap:var(--mer-spacing--xs);justify-content:space-between;pointer-events:none}.message__header .icon-md{opacity:0}.message__role{display:inline-block;font-weight:var(--mer-font__weight--semi-bold);margin-block-end:var(--mer-spacing--xs);display:inline-grid;grid-template-columns:max-content max-content;gap:6px}.message__role:before{content:\"\";display:grid;place-self:center flex-end;inline-size:4px;block-size:4px;border-radius:50%;background-color:currentcolor}.message__role--user{color:var(--mer-color__primary--300)}.message__role--hidden{display:none}.message__caption{font-size:var(--mer-font__size--xs);line-height:var(--mer-line-height--regular)}.message--visible{grid-template-rows:1fr}.message--copying{pointer-events:none}.message--copying span:not(.copied),.message--copying .message__caption{color:transparent;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.message--user .message__inner-wrapper{background-color:rgba(91, 167, 255, 0.08);border-color:var(--mer-border-color__primary)}.message--assistant-action .message__inner-wrapper{background-color:rgba(63, 168, 155, 0.05);border-color:var(--mer-border-color__success)}.message--assistant-chat .message__inner-wrapper{background-color:var(--mer-surface__elevation--01)}.message--assistant-in-progress{color:var(--mer-color__neutral-gray--500)}.message--assistant-in-progress .message__inner-wrapper{font-style:italic;display:grid;grid-template-columns:1fr auto;gap:var(--mer-spacing--xs)}.message--assistant-in-progress .message__inner-wrapper .message__caption{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;flex:1}.message--assistant-in-progress .message__inner-wrapper .animation-wrapper{flex:none}.message--assistant-error .message__inner-wrapper{background-color:rgba(251, 124, 132, 0.05);border-color:var(--mer-border-color__error)}.message--copyable{cursor:pointer}.message--copyable:hover{filter:brightness(1.2)}.message--copyable:hover .icon-md{opacity:1}.message:last-child{margin-block-end:0}:host(:first-child) .message__inner-wrapper{margin-block-end:0}.animation-wrapper{width:45px;display:flex;align-items:center;justify-content:center}.dot-pulse{position:relative;left:-9999px;width:5px;height:5px;border-radius:2.5px;background-color:var(--mer-color__neutral-gray--400);color:var(--mer-color__neutral-gray--400);box-shadow:9999px 0 0 -5px;animation:dot-pulse 1.5s infinite linear;animation-delay:0.25s}.dot-pulse::before,.dot-pulse::after{content:\"\";display:inline-block;position:absolute;top:0;width:5px;height:5px;border-radius:2.5px;background-color:var(--mer-color__neutral-gray--400);color:var(--mer-color__neutral-gray--400)}.dot-pulse::before{box-shadow:9984px 0 0 -5px;animation:dot-pulse-before 1.5s infinite linear;animation-delay:0s}.dot-pulse::after{box-shadow:10014px 0 0 -5px;animation:dot-pulse-after 1.5s infinite linear;animation-delay:0.5s}@keyframes dot-pulse-before{0%{box-shadow:9984px 0 0 -5px}30%{box-shadow:9984px 0 0 2px}60%,100%{box-shadow:9984px 0 0 -5px}}@keyframes dot-pulse{0%{box-shadow:9999px 0 0 -5px}30%{box-shadow:9999px 0 0 2px}60%,100%{box-shadow:9999px 0 0 -5px}}@keyframes dot-pulse-after{0%{box-shadow:10014px 0 0 -5px}30%{box-shadow:10014px 0 0 2px}60%,100%{box-shadow:10014px 0 0 -5px}}.copied{position:absolute;width:100%;height:100%;top:0;left:0;display:flex;align-items:center;justify-content:center;color:var(--mer-color__neutral-gray--300);display:flex;gap:var(--mer-spacing--xs);opacity:0;animation:fadeIn var(--mer-timing--fast) ease-out forwards}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}.hiChar{color:var(--mer-color__primary--200);filter:brightness(1.3)}";
|
|
6
7
|
|
|
8
|
+
const COPY_ICON = getIconPath({
|
|
9
|
+
category: "bpm",
|
|
10
|
+
name: "tasks",
|
|
11
|
+
colorType: "neutral"
|
|
12
|
+
});
|
|
7
13
|
const GxIdeAiMessage = /*@__PURE__*/ proxyCustomElement(class GxIdeAiMessage extends HTMLElement {
|
|
8
14
|
constructor() {
|
|
9
15
|
super();
|
|
10
16
|
this.__registerHost();
|
|
11
|
-
this.__attachShadow();
|
|
12
17
|
this.copyable = false;
|
|
13
18
|
// 7.LISTENERS //
|
|
14
19
|
// 8.PUBLIC METHODS API //
|
|
15
20
|
// 9.LOCAL METHODS //
|
|
21
|
+
this.copyMessage = () => {
|
|
22
|
+
const messageInfo = JSON.stringify({
|
|
23
|
+
messageType: this.messageType,
|
|
24
|
+
message: this.message
|
|
25
|
+
}, null, 2);
|
|
26
|
+
navigator.clipboard.writeText(messageInfo);
|
|
27
|
+
this.showCopiedMessage = true;
|
|
28
|
+
setTimeout(() => {
|
|
29
|
+
this.showCopiedMessage = false;
|
|
30
|
+
}, 1500);
|
|
31
|
+
};
|
|
16
32
|
this.evaluateMessageIsCopyable = () => {
|
|
17
|
-
this.copyable =
|
|
18
|
-
|
|
19
|
-
|
|
33
|
+
this.copyable = this.messageType !== "assistant-in-progress";
|
|
34
|
+
};
|
|
35
|
+
this.evaluateCopyIcon = () => {
|
|
36
|
+
return this.copyable ? (h("ch-image", { class: "icon-md", src: COPY_ICON })) : null;
|
|
20
37
|
};
|
|
21
38
|
this.visible = false;
|
|
22
39
|
this.showCopiedMessage = false;
|
|
@@ -49,21 +66,21 @@ const GxIdeAiMessage = /*@__PURE__*/ proxyCustomElement(class GxIdeAiMessage ext
|
|
|
49
66
|
"message--assistant": this.messageType !== "user",
|
|
50
67
|
"message--copyable": this.copyable,
|
|
51
68
|
"message--copying": this.showCopiedMessage
|
|
52
|
-
} }, h("div", { class: "message__outer-wrapper" }, h("div", { class: {
|
|
69
|
+
}, onClick: this.copyable && this.copyMessage }, h("div", { class: "message__outer-wrapper" }, h("div", { class: {
|
|
53
70
|
"message__inner-wrapper": true
|
|
54
|
-
} }, this.messageType === "user" ? (h("span", { class: "message__role message__role--user" }, this._componentLocale.you)) : (h("span", { class: {
|
|
71
|
+
} }, this.messageType === "user" ? (h("div", { class: "message__header" }, h("span", { class: "message__role message__role--user" }, this._componentLocale.you), this.evaluateCopyIcon())) : (h("div", { class: "message__header" }, h("span", { class: {
|
|
55
72
|
"message__role": this.messageType !== "assistant-in-progress",
|
|
56
73
|
"message__role--hidden": this.messageType === "assistant-in-progress",
|
|
57
74
|
"message__role--assistant": true
|
|
58
|
-
} }, this._componentLocale.assistant)), h("div", { class: {
|
|
75
|
+
} }, this._componentLocale.assistant), this.evaluateCopyIcon())), h("div", { class: {
|
|
59
76
|
"message__caption": true,
|
|
60
77
|
"message__caption--in-progress": this.messageType === "assistant-in-progress"
|
|
61
|
-
} }, hiChar(this.message, this.filterValue)), this.messageType === "assistant-in-progress" ? (h("div", { class: "animation-wrapper" }, h("div", { class: "dot-pulse" }))) : null))));
|
|
78
|
+
} }, this.showCopiedMessage ? (h("span", { class: "copied" }, h("ch-image", { class: "icon-md", src: COPY_ICON }), this.translations["copied"])) : null, hiChar(this.message, this.filterValue)), this.messageType === "assistant-in-progress" ? (h("div", { class: "animation-wrapper" }, h("div", { class: "dot-pulse" }))) : null))));
|
|
62
79
|
}
|
|
63
80
|
static get assetsDirs() { return ["gx-ide-assets/ai-message"]; }
|
|
64
81
|
get el() { return this; }
|
|
65
82
|
static get style() { return aiMessageCss; }
|
|
66
|
-
}, [
|
|
83
|
+
}, [0, "gx-ide-ai-message", {
|
|
67
84
|
"message": [1],
|
|
68
85
|
"messageType": [1, "message-type"],
|
|
69
86
|
"filterValue": [1, "filter-value"],
|