@genexus/genexus-ide-ui 1.0.58 → 1.0.60
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/{code-render-d66a13e2.js → code-render-2fb179d6.js} +4 -2
- package/dist/cjs/code-render-2fb179d6.js.map +1 -0
- package/dist/cjs/gx-ide-chat-container.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-chat-container.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-loader.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-loader.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-sc-chat-container.cjs.entry.js +2 -2
- package/dist/cjs/gx-ide-sc-chat-container.cjs.entry.js.map +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/collection/components/_helpers/chat-container/chat-container.css +3 -8
- package/dist/collection/components/_helpers/chat-container/code-render.js +4 -1
- package/dist/collection/components/_helpers/chat-container/code-render.js.map +1 -1
- package/dist/collection/components/_helpers/ide-loader/ide-loader.css +1 -1
- package/dist/collection/showcase/chat-container/chat.showcase.js +1 -1
- package/dist/collection/showcase/chat-container/chat.showcase.js.map +1 -1
- package/dist/components/chat-container.js +1 -1
- package/dist/components/chat-container.js.map +1 -1
- package/dist/components/code-render.js +3 -1
- package/dist/components/code-render.js.map +1 -1
- package/dist/components/gx-ide-sc-chat-container.js +1 -1
- package/dist/components/gx-ide-sc-chat-container.js.map +1 -1
- package/dist/components/ide-loader.js +1 -1
- package/dist/components/ide-loader.js.map +1 -1
- package/dist/esm/{code-render-67c13139.js → code-render-36275eb4.js} +4 -2
- package/dist/esm/code-render-36275eb4.js.map +1 -0
- package/dist/esm/gx-ide-chat-container.entry.js +1 -1
- package/dist/esm/gx-ide-chat-container.entry.js.map +1 -1
- package/dist/esm/gx-ide-loader.entry.js +1 -1
- package/dist/esm/gx-ide-loader.entry.js.map +1 -1
- package/dist/esm/gx-ide-sc-chat-container.entry.js +2 -2
- package/dist/esm/gx-ide-sc-chat-container.entry.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
- package/dist/genexus-ide-ui/index.esm.js +1 -1
- package/dist/genexus-ide-ui/{p-57354473.entry.js → p-5246559c.entry.js} +7 -7
- package/dist/genexus-ide-ui/p-5246559c.entry.js.map +1 -0
- package/dist/genexus-ide-ui/p-85eb72eb.entry.js +85 -0
- package/dist/genexus-ide-ui/p-85eb72eb.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-fc7b3ace.js → p-d6c2e256.js} +2 -1
- package/dist/genexus-ide-ui/{p-fc7b3ace.js.map → p-d6c2e256.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-9e27c0cc.entry.js → p-de589873.entry.js} +4 -3
- package/dist/genexus-ide-ui/{p-9e27c0cc.entry.js.map → p-de589873.entry.js.map} +1 -1
- package/package.json +1 -1
- package/dist/cjs/code-render-d66a13e2.js.map +0 -1
- package/dist/esm/code-render-67c13139.js.map +0 -1
- package/dist/genexus-ide-ui/p-57354473.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-bb0eb196.entry.js +0 -85
- package/dist/genexus-ide-ui/p-bb0eb196.entry.js.map +0 -1
|
@@ -13,5 +13,5 @@ export { s as setNonce } from "./p-2cf37639.js";
|
|
|
13
13
|
return e(t);
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
patchBrowser().then((e => a(JSON.parse('[["p-dcb1516d",[[1,"gx-ide-bpm-export-xpdl",{"displayTitle":[4,"display-title"],"exportCallback":[16],"cancelCallback":[16],"addCallback":[16],"referencesCallback":[16],"emptyInput":[32],"emptyObjects":[32],"notExporting":[32]}]]],["p-26aff07c",[[1,"gx-ide-bpm-import-files",{"displayTitle":[4,"display-title"],"allowedExtensions":[16],"confirmCallback":[16],"cancelCallback":[16],"files":[32],"selectedFiles":[32]}]]],["p-d8c7e0b5",[[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"]}]]],["p-aa821b66",[[1,"gx-ide-team-dev-select-recent-comment",{"displayTitle":[4,"display-title"],"comments":[16],"confirmCallback":[16],"cancelCallback":[16]}]]],["p-03265b1b",[[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]}]]],["p-acaed500",[[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]}]]],["p-eaab7765",[[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"]}]]],["p-97114eef",[[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"]}]]],["p-b238a545",[[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"]}]]],["p-df4249e1",[[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]}]]],["p-57986b2e",[[1,"gx-ide-ww-attributes",{"contextMenuCallback":[16],"deleteSelectionCallback":[16],"loadCallback":[16],"objectActionCallback":[16],"objects":[16],"openSelectionCallback":[16],"selectionChangeCallback":[16],"types":[16],"attributes":[32],"selectedAttributesIds":[32],"filterMore":[32],"name":[32],"loading":[32],"object":[32],"type":[32],"reload":[64],"validate":[64]},[[1,"keydown","keyDownHandler"]]]]],["p-6e667dde",[[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"]}]]],["p-fce76974",[[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"]}]]],["p-d7169c07",[[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]}]]],["p-1c36217e",[[1,"gx-ide-bpm-import-gxpm",{"displayTitle":[4,"display-title"],"confirmCallback":[16],"cancelCallback":[16],"selectedFile":[32],"pathValue":[32]}]]],["p-502f2b47",[[1,"gx-ide-bpm-timer-duration",{"displayTitle":[4,"display-title"],"duration":[16],"confirmCallback":[16],"cancelCallback":[16]}]]],["p-a6dd3f03",[[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"]}]]],["p-4cd56d14",[[1,"gx-ide-edit-module-server",{"types":[16],"name":[1],"source":[1],"type":[1],"confirmCallback":[16],"selectSourceCallback":[16],"cancelCallback":[16],"selectedType":[32]}]]],["p-f2f9e36e",[[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"]}]]],["p-e3f234a8",[[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"]}]]],["p-24af7f98",[[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"]}]]],["p-e07c97d5",[[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]}]]],["p-c74d18fe",[[1,"gx-ide-team-dev-update-partial-selection",{"displayTitle":[4,"display-title"],"addCallback":[16],"cancelCallback":[16],"confirmCallback":[16],"selection":[1040],"selectedObjectsIds":[32],"validate":[64]}]]],["p-b2af0c95",[[1,"gx-ide-team-dev-update-to-revision",{"displayTitle":[4,"display-title"],"cancelCallback":[16],"confirmCallback":[16],"currentRevision":[1,"current-revision"],"validate":[64]}]]],["p-b3e352c8",[[1,"gx-ide-template",{"displayTitle":[4,"display-title"]}]]],["p-1105c966",[[1,"gx-ide-wf-settings",{"displayTitle":[4,"display-title"],"configurationType":[1,"configuration-type"],"defaultConfiguration":[16],"saveCallback":[16],"cancelCallback":[16]}]]],["p-1cfcec9e",[[1,"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"]}]]],["p-9a604798",[[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"]}]]],["p-57354473",[[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]}]]],["p-49f9f6bf",[[1,"gx-ide-data-type-selector",{"categories":[16],"dataTypeSelectedCallback":[16],"recentlyUsed":[16],"categoriesListBoxModel":[32],"selectedCategory":[32],"statusInfo":[32],"recentlyUsedActionListModel":[32],"loading":[32]},null,{"categories":["categoriesChanged"],"recentlyUsed":["recentlyUsedChanged"]}]]],["p-09d55db9",[[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"]}]]],["p-9e27c0cc",[[1,"gx-ide-sc-chat-container",{"showAdditionalContent":[32],"conversationCopied":[32],"assistantStatus":[32]}]]],["p-395e9c81",[[1,"gx-ide-select-kb-items",{"cancelCallback":[16],"checkboxType":[1,"checkbox-type"],"checkedChanged":[16],"confirmCallback":[16],"dialogActions":[16],"itemContextMenuCallback":[16],"itemsList":[16],"multiSelection":[4,"multi-selection"],"selectionChanged":[16],"nodeListFlattenedTreeModel":[32],"loading":[32],"nodesVersionsViewType":[32],"nodeVersionsListTreeModel":[32],"searchPatternValue":[32],"toggleCheckboxes":[32],"suspendShortcuts":[64],"updateSelection":[64]},null,{"itemsList":["watchNodeListHandler"]}]]],["p-71f3b66e",[[1,"gx-ide-select-user-team",{"cancelCallback":[16],"continueCallback":[16],"teams":[16],"slideIsVisible":[32],"teamsModelReady":[32]},null,{"teams":["teamsChanged"]}]]],["p-8900c81a",[[1,"gx-ide-sign-in-team",{"authStep":[1,"auth-step"],"continueCallback":[16],"signInCallback":[16],"termsConfirmationRequired":[4,"terms-confirmation-required"],"teams":[16],"termsCallback":[16],"privacyCallback":[16],"authStepInternal":[32],"slideIsVisible":[32],"termsAndConditionsAccepted":[32]},null,{"authStep":["authStepChanged"],"teams":["teamsChanged"]}]]],["p-5a734013",[[1,"gx-ide-card",{"cardTitle":[1,"card-title"],"cardSubTitle":[1,"card-sub-title"],"icon":[1]}]]],["p-822090ba",[[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"]}]]],["p-8ff555f4",[[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]}]]],["p-fbab024e",[[1,"gx-ide-current-user-info",{"userInfo":[16],"myAccountCallback":[16],"changeTeamCallback":[16],"changeLanguageCallback":[16],"changeModeCallback":[16],"menuAlign":[16],"signOutCallback":[16],"termsCallback":[16],"privacyCallback":[16],"showMenu":[32]}]]],["p-df8bf481",[[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]}]]],["p-c21300fb",[[1,"gx-ide-gam-installation-settings",{"cancelCallback":[16],"canSelectPanels":[4,"can-select-panels"],"configurationType":[1,"configuration-type"],"defaultConfiguration":[16],"repairCallback":[16],"saveCallback":[16]}]]],["p-22908448",[[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"]}]]],["p-6374dabb",[[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"]}]]],["p-ebe6d71f",[[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]}]]],["p-3468662b",[[1,"gx-ide-sign-in",{"termsCallback":[16],"signInCallback":[16]}]]],["p-bb1394ca",[[1,"gx-ide-splash",{"version":[1],"removeSplash":[4,"remove-splash"],"splashVisible":[32]},null,{"removeSplash":["removeSplashChanged"]}]]],["p-9ffe118a",[[1,"gx-ide-switch-panel"]]],["p-f963b96e",[[1,"gx-ide-switcher"]]],["p-1a53cc60",[[1,"gx-ide-test",{"name":[1],"filterOn":[32]}]]],["p-34b5a494",[[1,"gx-ide-top-bar",{"topBarTitle":[1,"top-bar-title"]}]]],["p-5dc54e85",[[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]}]]],["p-3e15089e",[[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]}]]],["p-1364f700",[[1,"gx-ide-bpm-objects-selector",{"displayTitle":[4,"display-title"],"selection":[1040],"addCallback":[16],"referencesCallback":[16],"objects":[32],"selectedObjects":[32]}]]],["p-6637e817",[[0,"gx-ide-ai-message",{"aiAssistantHostRef":[16],"message":[1],"messageType":[1,"message-type"],"filterValue":[1,"filter-value"],"hidden":[4],"translations":[16],"visible":[32],"showCopiedMessage":[32]}]]],["p-bb0eb196",[[4,"gx-ide-chat-container",{"chatTitle":[1,"chat-title"],"copyConversationCallback":[16],"deleteConversationCallback":[16],"displayConversationCopiedMessage":[32],"showCopyConversationMessage":[64]}]]],["p-52af77c2",[[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]}]]],["p-70024ecb",[[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"]}]]],["p-f654f86d",[[1,"gx-ide-empty-state",{"isAnimated":[4,"is-animated"],"stateDescription":[1,"state-description"],"stateIconSrc":[1,"state-icon-src"],"stateTitle":[1,"state-title"]}]]],["p-afc73c6f",[[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"]}]]]]'), e)));
|
|
16
|
+
patchBrowser().then((e => a(JSON.parse('[["p-dcb1516d",[[1,"gx-ide-bpm-export-xpdl",{"displayTitle":[4,"display-title"],"exportCallback":[16],"cancelCallback":[16],"addCallback":[16],"referencesCallback":[16],"emptyInput":[32],"emptyObjects":[32],"notExporting":[32]}]]],["p-26aff07c",[[1,"gx-ide-bpm-import-files",{"displayTitle":[4,"display-title"],"allowedExtensions":[16],"confirmCallback":[16],"cancelCallback":[16],"files":[32],"selectedFiles":[32]}]]],["p-d8c7e0b5",[[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"]}]]],["p-aa821b66",[[1,"gx-ide-team-dev-select-recent-comment",{"displayTitle":[4,"display-title"],"comments":[16],"confirmCallback":[16],"cancelCallback":[16]}]]],["p-03265b1b",[[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]}]]],["p-acaed500",[[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]}]]],["p-eaab7765",[[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"]}]]],["p-97114eef",[[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"]}]]],["p-b238a545",[[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"]}]]],["p-df4249e1",[[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]}]]],["p-57986b2e",[[1,"gx-ide-ww-attributes",{"contextMenuCallback":[16],"deleteSelectionCallback":[16],"loadCallback":[16],"objectActionCallback":[16],"objects":[16],"openSelectionCallback":[16],"selectionChangeCallback":[16],"types":[16],"attributes":[32],"selectedAttributesIds":[32],"filterMore":[32],"name":[32],"loading":[32],"object":[32],"type":[32],"reload":[64],"validate":[64]},[[1,"keydown","keyDownHandler"]]]]],["p-6e667dde",[[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"]}]]],["p-fce76974",[[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"]}]]],["p-d7169c07",[[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]}]]],["p-1c36217e",[[1,"gx-ide-bpm-import-gxpm",{"displayTitle":[4,"display-title"],"confirmCallback":[16],"cancelCallback":[16],"selectedFile":[32],"pathValue":[32]}]]],["p-502f2b47",[[1,"gx-ide-bpm-timer-duration",{"displayTitle":[4,"display-title"],"duration":[16],"confirmCallback":[16],"cancelCallback":[16]}]]],["p-a6dd3f03",[[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"]}]]],["p-4cd56d14",[[1,"gx-ide-edit-module-server",{"types":[16],"name":[1],"source":[1],"type":[1],"confirmCallback":[16],"selectSourceCallback":[16],"cancelCallback":[16],"selectedType":[32]}]]],["p-f2f9e36e",[[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"]}]]],["p-e3f234a8",[[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"]}]]],["p-24af7f98",[[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"]}]]],["p-e07c97d5",[[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]}]]],["p-c74d18fe",[[1,"gx-ide-team-dev-update-partial-selection",{"displayTitle":[4,"display-title"],"addCallback":[16],"cancelCallback":[16],"confirmCallback":[16],"selection":[1040],"selectedObjectsIds":[32],"validate":[64]}]]],["p-b2af0c95",[[1,"gx-ide-team-dev-update-to-revision",{"displayTitle":[4,"display-title"],"cancelCallback":[16],"confirmCallback":[16],"currentRevision":[1,"current-revision"],"validate":[64]}]]],["p-b3e352c8",[[1,"gx-ide-template",{"displayTitle":[4,"display-title"]}]]],["p-1105c966",[[1,"gx-ide-wf-settings",{"displayTitle":[4,"display-title"],"configurationType":[1,"configuration-type"],"defaultConfiguration":[16],"saveCallback":[16],"cancelCallback":[16]}]]],["p-1cfcec9e",[[1,"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"]}]]],["p-9a604798",[[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"]}]]],["p-5246559c",[[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]}]]],["p-49f9f6bf",[[1,"gx-ide-data-type-selector",{"categories":[16],"dataTypeSelectedCallback":[16],"recentlyUsed":[16],"categoriesListBoxModel":[32],"selectedCategory":[32],"statusInfo":[32],"recentlyUsedActionListModel":[32],"loading":[32]},null,{"categories":["categoriesChanged"],"recentlyUsed":["recentlyUsedChanged"]}]]],["p-09d55db9",[[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"]}]]],["p-de589873",[[1,"gx-ide-sc-chat-container",{"showAdditionalContent":[32],"conversationCopied":[32],"assistantStatus":[32]}]]],["p-395e9c81",[[1,"gx-ide-select-kb-items",{"cancelCallback":[16],"checkboxType":[1,"checkbox-type"],"checkedChanged":[16],"confirmCallback":[16],"dialogActions":[16],"itemContextMenuCallback":[16],"itemsList":[16],"multiSelection":[4,"multi-selection"],"selectionChanged":[16],"nodeListFlattenedTreeModel":[32],"loading":[32],"nodesVersionsViewType":[32],"nodeVersionsListTreeModel":[32],"searchPatternValue":[32],"toggleCheckboxes":[32],"suspendShortcuts":[64],"updateSelection":[64]},null,{"itemsList":["watchNodeListHandler"]}]]],["p-71f3b66e",[[1,"gx-ide-select-user-team",{"cancelCallback":[16],"continueCallback":[16],"teams":[16],"slideIsVisible":[32],"teamsModelReady":[32]},null,{"teams":["teamsChanged"]}]]],["p-8900c81a",[[1,"gx-ide-sign-in-team",{"authStep":[1,"auth-step"],"continueCallback":[16],"signInCallback":[16],"termsConfirmationRequired":[4,"terms-confirmation-required"],"teams":[16],"termsCallback":[16],"privacyCallback":[16],"authStepInternal":[32],"slideIsVisible":[32],"termsAndConditionsAccepted":[32]},null,{"authStep":["authStepChanged"],"teams":["teamsChanged"]}]]],["p-5a734013",[[1,"gx-ide-card",{"cardTitle":[1,"card-title"],"cardSubTitle":[1,"card-sub-title"],"icon":[1]}]]],["p-822090ba",[[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"]}]]],["p-8ff555f4",[[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]}]]],["p-fbab024e",[[1,"gx-ide-current-user-info",{"userInfo":[16],"myAccountCallback":[16],"changeTeamCallback":[16],"changeLanguageCallback":[16],"changeModeCallback":[16],"menuAlign":[16],"signOutCallback":[16],"termsCallback":[16],"privacyCallback":[16],"showMenu":[32]}]]],["p-df8bf481",[[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]}]]],["p-c21300fb",[[1,"gx-ide-gam-installation-settings",{"cancelCallback":[16],"canSelectPanels":[4,"can-select-panels"],"configurationType":[1,"configuration-type"],"defaultConfiguration":[16],"repairCallback":[16],"saveCallback":[16]}]]],["p-22908448",[[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"]}]]],["p-6374dabb",[[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"]}]]],["p-ebe6d71f",[[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]}]]],["p-3468662b",[[1,"gx-ide-sign-in",{"termsCallback":[16],"signInCallback":[16]}]]],["p-bb1394ca",[[1,"gx-ide-splash",{"version":[1],"removeSplash":[4,"remove-splash"],"splashVisible":[32]},null,{"removeSplash":["removeSplashChanged"]}]]],["p-9ffe118a",[[1,"gx-ide-switch-panel"]]],["p-f963b96e",[[1,"gx-ide-switcher"]]],["p-1a53cc60",[[1,"gx-ide-test",{"name":[1],"filterOn":[32]}]]],["p-34b5a494",[[1,"gx-ide-top-bar",{"topBarTitle":[1,"top-bar-title"]}]]],["p-5dc54e85",[[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]}]]],["p-3e15089e",[[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]}]]],["p-1364f700",[[1,"gx-ide-bpm-objects-selector",{"displayTitle":[4,"display-title"],"selection":[1040],"addCallback":[16],"referencesCallback":[16],"objects":[32],"selectedObjects":[32]}]]],["p-6637e817",[[0,"gx-ide-ai-message",{"aiAssistantHostRef":[16],"message":[1],"messageType":[1,"message-type"],"filterValue":[1,"filter-value"],"hidden":[4],"translations":[16],"visible":[32],"showCopiedMessage":[32]}]]],["p-85eb72eb",[[4,"gx-ide-chat-container",{"chatTitle":[1,"chat-title"],"copyConversationCallback":[16],"deleteConversationCallback":[16],"displayConversationCopiedMessage":[32],"showCopyConversationMessage":[64]}]]],["p-52af77c2",[[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]}]]],["p-70024ecb",[[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"]}]]],["p-f654f86d",[[1,"gx-ide-empty-state",{"isAnimated":[4,"is-animated"],"stateDescription":[1,"state-description"],"stateIconSrc":[1,"state-icon-src"],"stateTitle":[1,"state-title"]}]]],["p-afc73c6f",[[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"]}]]]]'), e)));
|
|
17
17
|
//# sourceMappingURL=genexus-ide-ui.esm.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as e, c as r, h as a, H as i } from "./p-2cf37639.js";
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const o = ".loader__wrapper{position:absolute;border:none;opacity:0;transition:var(--show-transition) opacity;inline-size:100%;block-size:100%;display:flex;background-color:var(--elevation-background-color, var(--mer-surface__elevation--01));backdrop-filter:var(--gxg-ide-loader-wrapper__backdrop-filter);padding:var(--gxg-ide-loader-wrapper__padding);flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;color:var(--gxg-ide-loader-wrapper__color);z-index:99;animation:fadeIn var(--mer-timing--fast) forwards}.loader__wrapper--visible{opacity:1}.loader__spinner{border:var(--gxg-ide-loader-spinner__border);border-block-start:var(--gxg-ide-loader-spinner__border-top);border-radius:50%;animation:spinner 0.6s infinite linear;inline-size:var(--gxg-ide-loader-spinner__width);block-size:var(--gxg-ide-loader-spinner__width);flex-shrink:0;opacity:1}.loader__content-wrapper{display:flex;text-align:center;flex-direction:column;margin-block-start:var(--gxg-ide-loader-content-wrapper__mbs);gap:var(--mer-spacing--xs);max-block-size:var(--gxg-ide-loader-content-wrapper__max-width);opacity:1}.loader__content-wrapper--hidden{display:none}.loader__cancel-button{margin-block-start:var(--mer-spacing--xs)}@keyframes wrapper{0%{background-color:var(--gxg-ide-loader-wrapper__background-color--from)}100%{background-color:var(--gxg-ide-loader-wrapper__background-color--to)}}@keyframes spinner{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}:host([display-border]) .loader__wrapper{border:1px solid var(--mer-color__elevation--02)}@keyframes fadeIn{0%{opacity:0}}";
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var t = undefined && undefined.__classPrivateFieldGet || function(e, r, a, i) {
|
|
6
6
|
if (a === "a" && !i) throw new TypeError("Private accessor was defined without a getter");
|
|
7
7
|
if (typeof r === "function" ? e !== r || !i : !r.has(e)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
8
8
|
return a === "m" ? i : a === "a" ? i.call(e) : i ? i.value : r.get(e);
|
|
@@ -21,13 +21,13 @@ const h = class {
|
|
|
21
21
|
if (this.cancelCallback) {
|
|
22
22
|
this.cancelCallback();
|
|
23
23
|
}
|
|
24
|
-
clearTimeout(
|
|
24
|
+
clearTimeout(t(this, n, "f"));
|
|
25
25
|
this.show = false;
|
|
26
26
|
}));
|
|
27
27
|
d.set(this, (() => this.cancelLabel && a("div", null, a("button", {
|
|
28
28
|
class: "button-secondary loader__cancel-button",
|
|
29
29
|
type: "button",
|
|
30
|
-
onClick:
|
|
30
|
+
onClick: t(this, s, "f")
|
|
31
31
|
}, this.cancelLabel))));
|
|
32
32
|
l.set(this, (() => this.description && a("p", {
|
|
33
33
|
class: "body-regular-italic-s"
|
|
@@ -61,13 +61,13 @@ const h = class {
|
|
|
61
61
|
"loader__content-wrapper": true,
|
|
62
62
|
"loader__content-wrapper--hidden": !this.description && !this.loaderTitle && !this.cancelLabel
|
|
63
63
|
}
|
|
64
|
-
},
|
|
64
|
+
}, t(this, p, "f").call(this), t(this, l, "f").call(this), t(this, d, "f").call(this))));
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
|
|
68
68
|
n = new WeakMap, s = new WeakMap, d = new WeakMap, l = new WeakMap, p = new WeakMap;
|
|
69
69
|
|
|
70
|
-
h.style =
|
|
70
|
+
h.style = o;
|
|
71
71
|
|
|
72
72
|
export { h as gx_ide_loader };
|
|
73
|
-
//# sourceMappingURL=p-
|
|
73
|
+
//# sourceMappingURL=p-5246559c.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ideLoaderCss","CSS_BUNDLES","IdeLoader","_IdeLoader_timeoutReference","set","this","_IdeLoader_cancelProcess","cancelCallback","clearTimeout","__classPrivateFieldGet","show","_IdeLoader_renderCancelButton","cancelLabel","h","class","type","onClick","_IdeLoader_renderDescription","description","_IdeLoader_renderTitle","loaderTitle","render","Host","model","showWrapper","part","popover","call"],"sources":["src/components/_helpers/ide-loader/ide-loader.scss?tag=gx-ide-loader&encapsulation=shadow","src/components/_helpers/ide-loader/ide-loader.tsx"],"sourcesContent":[".loader {\n &__wrapper {\n position: absolute;\n border: none;\n opacity: 0;\n transition: var(--show-transition) opacity;\n inline-size: 100%;\n block-size: 100%;\n display: flex;\n background-color: var(\n --elevation-background-color,\n var(--mer-surface__elevation--01)\n );\n backdrop-filter: var(--gxg-ide-loader-wrapper__backdrop-filter);\n padding: var(--gxg-ide-loader-wrapper__padding);\n flex-direction: column;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n color: var(--gxg-ide-loader-wrapper__color);\n z-index: 99; // WA to prevent tree-view chevron arrow to appear above.\n animation: fadeIn var(--mer-timing--fast) forwards;\n\n &--visible {\n opacity: 1;\n }\n }\n &__spinner {\n border: var(--gxg-ide-loader-spinner__border);\n border-block-start: var(--gxg-ide-loader-spinner__border-top);\n border-radius: 50%;\n animation: spinner 0.6s infinite linear;\n inline-size: var(--gxg-ide-loader-spinner__width);\n block-size: var(--gxg-ide-loader-spinner__width);\n flex-shrink: 0;\n opacity: 1;\n }\n\n &__content-wrapper {\n display: flex;\n text-align: center;\n flex-direction: column;\n margin-block-start: var(--gxg-ide-loader-content-wrapper__mbs);\n gap: var(--mer-spacing--xs);\n max-block-size: var(--gxg-ide-loader-content-wrapper__max-width);\n &--hidden {\n display: none;\n }\n opacity: 1;\n }\n\n &__cancel-button {\n margin-block-start: var(--mer-spacing--xs);\n }\n}\n\n/*background color animation*/\n@keyframes wrapper {\n 0% {\n background-color: var(--gxg-ide-loader-wrapper__background-color--from);\n }\n 100% {\n background-color: var(--gxg-ide-loader-wrapper__background-color--to);\n }\n}\n@keyframes spinner {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(359deg);\n }\n}\n\n:host([display-border]) {\n .loader {\n &__wrapper {\n border: 1px solid var(--mer-color__elevation--02);\n }\n }\n}\n\n@keyframes fadeIn {\n 0% {\n opacity: 0;\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Event,\n EventEmitter\n} from \"@stencil/core\";\n\nimport { MercuryBundles } from \"@genexus/mercury\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/button\",\n \"utils/typography\"\n];\n@Component({\n tag: \"gx-ide-loader\",\n styleUrl: \"ide-loader.scss\",\n shadow: true\n})\nexport class IdeLoader {\n #timeoutReference: ReturnType<typeof setTimeout>;\n\n /**\n * shows the '.loader-wrapper'\n */\n @State() showWrapper = true;\n\n /**\n * The time the loader will await before abort.\n */\n @Prop() readonly abortTime: number = 5 * 60 * 1000; // 5 minutes\n\n /**\n * The cancel callback\n */\n @Prop() readonly cancelCallback: IdeLoaderCancelCallback;\n\n /**\n * The cancel button label (optional)\n */\n @Prop() readonly cancelLabel: string;\n\n /**\n * The loader description (optional)\n */\n @Prop() readonly description: string;\n\n /**\n * Displays a border all around\n */\n @Prop({ reflect: true }) readonly displayBorder: boolean = false;\n\n /**\n * The loader title (optional)\n */\n @Prop() readonly loaderTitle: string;\n\n /**\n * It shows the loader\n */\n @Prop({ mutable: true }) show = false;\n\n /**\n * This event is emitted when \"show\" is false.\n */\n @Event() loaderFinished: EventEmitter<void>;\n\n #cancelProcess = (): void => {\n if (this.cancelCallback) {\n this.cancelCallback();\n }\n clearTimeout(this.#timeoutReference);\n this.show = false;\n };\n\n #renderCancelButton = (): HTMLButtonElement | null =>\n this.cancelLabel && (\n <div>\n <button\n class=\"button-secondary loader__cancel-button\"\n type=\"button\"\n onClick={this.#cancelProcess}\n >\n {this.cancelLabel}\n </button>\n </div>\n );\n\n #renderDescription = (): HTMLParagraphElement | null =>\n this.description && <p class=\"body-regular-italic-s\">{this.description}</p>;\n\n #renderTitle = (): HTMLParagraphElement | null =>\n this.loaderTitle && <p class=\"body-regular-l\">{this.loaderTitle}</p>;\n\n render() {\n return (\n <Host>\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n {this.show && (\n <div\n class={{\n [`loader__wrapper`]: true,\n \"loader__wrapper--visible\": this.showWrapper\n }}\n part=\"loader-wrapper\"\n popover=\"\"\n >\n <div class=\"loader__spinner\"></div>\n <div\n class={{\n \"loader__content-wrapper\": true,\n \"loader__content-wrapper--hidden\":\n !this.description && !this.loaderTitle && !this.cancelLabel\n }}\n >\n {this.#renderTitle()}\n {this.#renderDescription()}\n {this.#renderCancelButton()}\n </div>\n </div>\n )}\n </Host>\n );\n }\n}\n\nexport type IdeLoaderCancelCallback = () => void;\n"],"mappings":";;AAAA,MAAMA,IAAe;;;;;;;;;;ACYrB,MAAMC,IAA8B,EAClC,qBACA,qBACA;;MAOWC,IAAS;;;;IACpBC,EAAAC,IAAAC,WAAA;IA+CAC,EAAAF,IAAAC,OAAiB;MACf,IAAIA,KAAKE,gBAAgB;QACvBF,KAAKE;;MAEPC,aAAaC,EAAAJ,MAAIF,GAAA;MACjBE,KAAKK,OAAO;AAAK;IAGnBC,EAAAP,IAAAC,OAAsB,MACpBA,KAAKO,eACHC,EAAA,aACEA,EAAA;MACEC,OAAM;MACNC,MAAK;MACLC,SAASP,EAAAJ,MAAIC,GAAA;OAEZD,KAAKO;IAKdK,EAAAb,IAAAC,OAAqB,MACnBA,KAAKa,eAAeL,EAAA;MAAGC,OAAM;OAAyBT,KAAKa;IAE7DC,EAAAf,IAAAC,OAAe,MACbA,KAAKe,eAAeP,EAAA;MAAGC,OAAM;OAAkBT,KAAKe;uBAnE/B;qBAKc,IAAI,KAAK;;;;yBAoBa;;gBAU3B;;EAkChC,MAAAC;IACE,OACER,EAACS,GAAI,MACHT,EAAA;MAAUU,OAAOtB;QAChBI,KAAKK,QACJG,EAAA;MACEC,OAAO;QACL,CAAC,oBAAoB;QACrB,4BAA4BT,KAAKmB;;MAEnCC,MAAK;MACLC,SAAQ;OAERb,EAAA;MAAKC,OAAM;QACXD,EAAA;MACEC,OAAO;QACL,2BAA2B;QAC3B,oCACGT,KAAKa,gBAAgBb,KAAKe,gBAAgBf,KAAKO;;OAGnDH,EAAAJ,MAAIc,GAAA,KAAaQ,KAAjBtB,OACAI,EAAAJ,MAAIY,GAAA,KAAmBU,KAAvBtB,OACAI,EAAAJ,MAAIM,GAAA,KAAoBgB,KAAxBtB"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { r as t, h as e, H as a } from "./p-2cf37639.js";
|
|
2
|
+
|
|
3
|
+
import { g as o } from "./p-6e4208d8.js";
|
|
4
|
+
|
|
5
|
+
import "./p-c9551186.js";
|
|
6
|
+
|
|
7
|
+
const r = '.chat-container{display:grid;block-size:100%;overflow:auto;grid-template-rows:max-content 1fr max-content;gap:6px;position:relative;--chat-common-border-radius:var(--mer-spacing--2xs);background-color:transparent !important}.section{display:contents}.chat-container__header{padding:var(--mer-spacing--2xs) var(--mer-spacing--2xs) var(--mer-spacing--2xs) var(--mer-spacing--sm);display:flex;align-items:center;gap:var(--mer-spacing--sm);justify-content:space-between}.chat-container__ch-chat{overflow:auto;position:relative;display:grid;padding:0 var(--mer-spacing--xs) var(--mer-spacing--xs) var(--mer-spacing--xs)}.chat-container__header,.chat-container__footer{padding:var(--mer-spacing--2xs) var(--mer-spacing--2xs) var(--mer-spacing--2xs) var(--mer-spacing--sm)}.chat-container__conversation-copied{position:absolute;z-index:1;inline-size:100%;block-size:100%;background:rgba(22, 22, 23, 0.75);backdrop-filter:saturate(180%) blur(20px);display:grid;align-items:center;justify-content:center;text-align:center;padding:32px;--mer-icon__box--md:18px;pointer-events:none;overflow:hidden;animation:fadeIn 100ms ease-in-out forwards;opacity:0}.chat-container__conversation-copied-wrapper{display:flex;align-items:center;gap:var(--mer-spacing--sm)}.chat-container__conversation-copied-wrapper{animation:liftUp var(--mer-timing--fast) ease-in-out forwards;inset-block-start:4px;opacity:0;animation-delay:var(--mer-timing--fast);position:relative}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes liftUp{from{opacity:0;inset-block-start:4px}to{opacity:1;inset-block-start:0}}.chat::part(message){position:relative;--copy-button-opacity:0;--copied-to-clipboard-opacity:0;--date-opacity:1}.chat::part(message__content){font-size:13px !important;line-height:1.3 !important}.chat::part(message__time),.chat::part(message__copy-button){transition:opacity var(--mer-timing--super-fast) ease-in-out}.chat::part(message__time){opacity:var(--date-opacity)}.chat::part(message):hover{position:relative;--copy-button-opacity:1;--date-opacity:0}.chat::part(message__copy-button){position:absolute;z-index:1;inset-inline-end:0;padding:var(--mer-spacing--sm);transition:opacity var(--mer-timing--fast) ease-in-out;opacity:var(--copy-button-opacity)}.chat::part(message__copy-button)::after{content:"";inline-size:var(--mer-icon__box--md);block-size:var(--mer-icon__box--md);background:no-repeat center/var(--mer-icon__size--md) var(--icon-path);--icon-path:var(--icon__system_copy_primary--enabled)}.chat::part(message__copy-button):hover::after{--icon-path:var(--icon__system_copy_primary--hover)}.chat::part(message__copy-button):active::after{--icon-path:var(--icon__system_copy_primary--active)}.chat::part(message__copied-feedback){transition:opacity 150ms ease-in-out;position:absolute;inline-size:100%;block-size:100%;display:flex;align-items:center;justify-content:center;z-index:2;background:rgba(22, 22, 23, 0.8);backdrop-filter:saturate(180%) blur(20px);opacity:var(--copied-to-clipboard-opacity);pointer-events:none}.chat::part(message__copied-feedback-visible){--copied-to-clipboard-opacity:1;pointer-events:visible}.chat::part(send-container){gap:var(--mer-spacing--xs)}.chat::part(send-input){--control__padding-block:7px !important}.chat::part(send-button){border-width:var(--control__border-width);border-style:var(--control__border-style);border-color:var(--control__border-color);border-radius:var(--control__border-radius);inline-size:32px;block-size:32px;background:no-repeat center/var(--mer-icon__box--md) var(--icon-path);--icon-path:var(--icon__system_send_primary--enabled)}.chat::part(send-button):hover{--icon-path:var(--icon__system_send_primary--hover);--control__border-color:var(--mer-text__primary--hover)}.chat::part(send-button):active{--icon-path:var(--icon__system_send_primary--active);--control__border-color:var(--mer-border-color__primary--active)}.chat::part(message assistant){background-color:var(--elevation-background-color, var(--mer-surface__elevation--01)) !important}.chat::part(message assistant waiting){align-items:center;gap:var(--mer-spacing--md) !important}.button-copy-chat,.button-delete-chat{--control__border-color:transparent !important}.button-delete-chat:hover{filter:brightness(1.3)}.button-delete-chat:active{filter:brightness(0.8)}';
|
|
8
|
+
|
|
9
|
+
const i = [ "resets/box-sizing", "utils/typography", "chameleon/scrollbar", "components/button", "components/icon", "utils/elevation" ];
|
|
10
|
+
|
|
11
|
+
const n = o({
|
|
12
|
+
category: "system",
|
|
13
|
+
name: "copy",
|
|
14
|
+
colorType: "neutral"
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const c = o({
|
|
18
|
+
category: "system",
|
|
19
|
+
name: "delete-outlined",
|
|
20
|
+
colorType: "error"
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const s = o({
|
|
24
|
+
category: "objects",
|
|
25
|
+
name: "conversational-flows"
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const p = class {
|
|
29
|
+
constructor(e) {
|
|
30
|
+
t(this, e);
|
|
31
|
+
this.chatTitle = undefined;
|
|
32
|
+
this.copyConversationCallback = undefined;
|
|
33
|
+
this.deleteConversationCallback = undefined;
|
|
34
|
+
this.displayConversationCopiedMessage = false;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* It will display a feedback message that the conversation has been copied
|
|
38
|
+
*/ async showCopyConversationMessage() {
|
|
39
|
+
this.displayConversationCopiedMessage = true;
|
|
40
|
+
setTimeout((() => {
|
|
41
|
+
this.displayConversationCopiedMessage = false;
|
|
42
|
+
}), 2e3);
|
|
43
|
+
}
|
|
44
|
+
render() {
|
|
45
|
+
const t = this.chatTitle || this.copyConversationCallback || this.deleteConversationCallback;
|
|
46
|
+
const o = this.copyConversationCallback || this.deleteConversationCallback;
|
|
47
|
+
return e(a, {
|
|
48
|
+
class: "chat-container"
|
|
49
|
+
}, e("ch-theme", {
|
|
50
|
+
model: i
|
|
51
|
+
}), e("section", {
|
|
52
|
+
class: "section"
|
|
53
|
+
}, t && e("header", {
|
|
54
|
+
class: "chat-container__header elevation-1 body-italic-m"
|
|
55
|
+
}, this.chatTitle && this.chatTitle, o && e("div", null, this.deleteConversationCallback && e("button", {
|
|
56
|
+
class: "button-secondary button-icon-only button-delete-chat",
|
|
57
|
+
onClick: this.deleteConversationCallback
|
|
58
|
+
}, e("ch-image", {
|
|
59
|
+
class: "icon-md",
|
|
60
|
+
src: c
|
|
61
|
+
})), this.copyConversationCallback && e("button", {
|
|
62
|
+
class: "button-secondary button-icon-only button-copy-chat",
|
|
63
|
+
onClick: this.copyConversationCallback
|
|
64
|
+
}, e("ch-image", {
|
|
65
|
+
class: "icon-md",
|
|
66
|
+
src: n
|
|
67
|
+
})))), e("section", {
|
|
68
|
+
class: "chat-container__ch-chat"
|
|
69
|
+
}, e("slot", null), this.displayConversationCopiedMessage && e("div", {
|
|
70
|
+
class: "chat-container__conversation-copied"
|
|
71
|
+
}, e("div", {
|
|
72
|
+
class: "chat-container__conversation-copied-wrapper"
|
|
73
|
+
}, e("ch-image", {
|
|
74
|
+
class: "icon-md",
|
|
75
|
+
src: s
|
|
76
|
+
}), e("p", {
|
|
77
|
+
class: "body-regular-l"
|
|
78
|
+
}, "conversation copied"))))));
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
p.style = r;
|
|
83
|
+
|
|
84
|
+
export { p as gx_ide_chat_container };
|
|
85
|
+
//# sourceMappingURL=p-85eb72eb.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["chatContainerCss","CSS_BUNDLES","COPY_ICON","getIconPath","category","name","colorType","DELETE_ICON","CONVERSATION_ICON","GxIdeChatContainer","showCopyConversationMessage","this","displayConversationCopiedMessage","setTimeout","render","renderHeader","chatTitle","copyConversationCallback","deleteConversationCallback","renderButtonsGroup","h","Host","class","model","onClick","src"],"sources":["src/components/_helpers/chat-container/chat-container.scss?tag=gx-ide-chat-container","src/components/_helpers/chat-container/chat-container.tsx"],"sourcesContent":[".chat-container {\n display: grid;\n block-size: 100%;\n overflow: auto;\n grid-template-rows: max-content 1fr max-content;\n gap: 6px;\n position: relative;\n --chat-common-border-radius: var(--mer-spacing--2xs);\n\n // force elevation-* class not applying on the host\n background-color: transparent !important;\n}\n.section {\n display: contents;\n}\n\n// header\n.chat-container__header {\n padding: var(--mer-spacing--2xs) var(--mer-spacing--2xs)\n var(--mer-spacing--2xs) var(--mer-spacing--sm);\n display: flex;\n align-items: center;\n gap: var(--mer-spacing--sm);\n justify-content: space-between;\n}\n\n// ch-chat container\n.chat-container__ch-chat {\n overflow: auto;\n position: relative;\n display: grid;\n padding: 0 var(--mer-spacing--xs) var(--mer-spacing--xs)\n var(--mer-spacing--xs);\n}\n\n// footer\n\n// header & footer (common styles)\n.chat-container__header,\n.chat-container__footer {\n padding: var(--mer-spacing--2xs) var(--mer-spacing--2xs)\n var(--mer-spacing--2xs) var(--mer-spacing--sm);\n}\n\n.chat-container__conversation-copied {\n position: absolute;\n z-index: 1;\n inline-size: 100%;\n block-size: 100%;\n background: rgba(22, 22, 23, 0.75);\n backdrop-filter: saturate(180%) blur(20px);\n display: grid;\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 32px;\n --mer-icon__box--md: 18px;\n pointer-events: none;\n overflow: hidden;\n animation: fadeIn 100ms ease-in-out forwards;\n opacity: 0;\n}\n.chat-container__conversation-copied-wrapper {\n display: flex;\n align-items: center;\n gap: var(--mer-spacing--sm);\n}\n.chat-container__conversation-copied-wrapper {\n animation: liftUp var(--mer-timing--fast) ease-in-out forwards;\n inset-block-start: 4px;\n opacity: 0;\n animation-delay: var(--mer-timing--fast);\n position: relative;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@keyframes liftUp {\n from {\n opacity: 0;\n inset-block-start: 4px;\n }\n to {\n opacity: 1;\n inset-block-start: 0;\n }\n}\n\n// - - - - - - - - - - - - - - - - - - - - - - - - - -\n// ch-chat overrides TODO: move this styles to Mercury\n// - - - - - - - - - - - - - - - - - - - - - - - - - -\n\n.chat::part(message) {\n position: relative;\n --copy-button-opacity: 0;\n --copied-to-clipboard-opacity: 0;\n --date-opacity: 1;\n}\n\n.chat::part(message__content) {\n font-size: 13px !important;\n line-height: 1.3 !important;\n}\n\n.chat::part(message__time),\n.chat::part(message__copy-button) {\n transition: opacity var(--mer-timing--super-fast) ease-in-out;\n}\n.chat::part(message__time) {\n opacity: var(--date-opacity);\n}\n.chat::part(message):hover {\n position: relative;\n --copy-button-opacity: 1;\n --date-opacity: 0;\n}\n.chat::part(message__copy-button) {\n position: absolute;\n z-index: 1;\n inset-inline-end: 0;\n padding: var(--mer-spacing--sm); // same as part::(message)\n transition: opacity var(--mer-timing--fast) ease-in-out;\n opacity: var(--copy-button-opacity);\n\n &::after {\n content: \"\";\n inline-size: var(--mer-icon__box--md);\n block-size: var(--mer-icon__box--md);\n background: no-repeat center / var(--mer-icon__size--md) var(--icon-path);\n --icon-path: var(--icon__system_copy_primary--enabled);\n }\n &:hover::after {\n --icon-path: var(--icon__system_copy_primary--hover);\n }\n &:active::after {\n --icon-path: var(--icon__system_copy_primary--active);\n }\n}\n\n// copy button effect\n.chat::part(message__copied-feedback) {\n transition: opacity 150ms ease-in-out;\n position: absolute;\n inline-size: 100%;\n block-size: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 2;\n background: rgba(22, 22, 23, 0.8);\n backdrop-filter: saturate(180%) blur(20px);\n opacity: var(--copied-to-clipboard-opacity);\n pointer-events: none;\n}\n\n.chat::part(message__copied-feedback-visible) {\n --copied-to-clipboard-opacity: 1;\n pointer-events: visible;\n}\n\n// send button\n.chat::part(send-container) {\n gap: var(--mer-spacing--xs);\n}\n.chat::part(send-input) {\n --control__padding-block: 7px !important;\n}\n\n.chat::part(send-button) {\n border-width: var(--control__border-width);\n border-style: var(--control__border-style);\n border-color: var(--control__border-color);\n border-radius: var(--control__border-radius);\n inline-size: 32px;\n block-size: 32px;\n background: no-repeat center / var(--mer-icon__box--md) var(--icon-path);\n --icon-path: var(--icon__system_send_primary--enabled);\n}\n.chat::part(send-button):hover {\n --icon-path: var(--icon__system_send_primary--hover);\n --control__border-color: var(--mer-text__primary--hover);\n}\n.chat::part(send-button):active {\n --icon-path: var(--icon__system_send_primary--active);\n --control__border-color: var(--mer-border-color__primary--active);\n}\n\n// assistant\n\n.chat::part(message assistant) {\n background-color: var(\n --elevation-background-color,\n var(--mer-surface__elevation--01)\n ) !important;\n}\n\n.chat::part(message assistant waiting) {\n align-items: center;\n gap: var(--mer-spacing--md) !important;\n}\n\n.button-copy-chat,\n.button-delete-chat {\n --control__border-color: transparent !important;\n}\n.button-delete-chat {\n &:hover {\n filter: brightness(1.3);\n }\n &:active {\n filter: brightness(0.8);\n }\n}\n","import { Component, Host, h, Prop, Method, State } from \"@stencil/core\";\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"utils/typography\",\n \"chameleon/scrollbar\",\n \"components/button\",\n \"components/icon\",\n \"utils/elevation\"\n];\n\nconst COPY_ICON = getIconPath({\n category: \"system\",\n name: \"copy\",\n colorType: \"neutral\"\n});\nconst DELETE_ICON = getIconPath({\n category: \"system\",\n name: \"delete-outlined\",\n colorType: \"error\"\n});\nconst CONVERSATION_ICON = getIconPath({\n category: \"objects\",\n name: \"conversational-flows\"\n});\n\n@Component({\n tag: \"gx-ide-chat-container\",\n styleUrl: \"chat-container.scss\",\n shadow: false\n})\nexport class GxIdeChatContainer {\n /**\n * The chat title\n */\n @Prop() readonly chatTitle?: string;\n\n /**\n * If true a button for copying the conversation will be render on the header\n */\n @Prop() readonly copyConversationCallback: () => void;\n\n /**\n * If true a button for deleting the conversation will be render on the header\n */\n @Prop() readonly deleteConversationCallback: () => void;\n\n /**\n * Coneration Copied\n */\n @State() displayConversationCopiedMessage: boolean = false;\n\n /**\n * It will display a feedback message that the conversation has been copied\n */\n @Method()\n async showCopyConversationMessage() {\n this.displayConversationCopiedMessage = true;\n setTimeout(() => {\n this.displayConversationCopiedMessage = false;\n }, 2000);\n }\n\n render() {\n const renderHeader =\n this.chatTitle ||\n this.copyConversationCallback ||\n this.deleteConversationCallback;\n\n const renderButtonsGroup =\n this.copyConversationCallback || this.deleteConversationCallback;\n return (\n <Host class=\"chat-container\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <section class=\"section\">\n {renderHeader && (\n <header class=\"chat-container__header elevation-1 body-italic-m\">\n {this.chatTitle && this.chatTitle}\n\n {renderButtonsGroup && (\n <div>\n {this.deleteConversationCallback && (\n <button\n class=\"button-secondary button-icon-only button-delete-chat\"\n onClick={this.deleteConversationCallback}\n >\n <ch-image class=\"icon-md\" src={DELETE_ICON}></ch-image>\n </button>\n )}\n\n {this.copyConversationCallback && (\n <button\n class=\"button-secondary button-icon-only button-copy-chat\"\n onClick={this.copyConversationCallback}\n >\n <ch-image class=\"icon-md\" src={COPY_ICON}></ch-image>\n </button>\n )}\n </div>\n )}\n </header>\n )}\n <section class=\"chat-container__ch-chat\">\n <slot></slot>\n {this.displayConversationCopiedMessage && (\n <div class=\"chat-container__conversation-copied\">\n <div class=\"chat-container__conversation-copied-wrapper\">\n <ch-image class=\"icon-md\" src={CONVERSATION_ICON}></ch-image>\n <p class=\"body-regular-l\">conversation copied</p>\n </div>\n </div>\n )}\n </section>\n {/* <footer class=\"chat-container__footer elevation-1\">footer</footer> */}\n </section>\n </Host>\n );\n }\n}\n"],"mappings":";;;;;;AAAA,MAAMA,IAAmB;;ACGzB,MAAMC,IAA8B,EAClC,qBACA,oBACA,uBACA,qBACA,mBACA;;AAGF,MAAMC,IAAYC,EAAY;EAC5BC,UAAU;EACVC,MAAM;EACNC,WAAW;;;AAEb,MAAMC,IAAcJ,EAAY;EAC9BC,UAAU;EACVC,MAAM;EACNC,WAAW;;;AAEb,MAAME,IAAoBL,EAAY;EACpCC,UAAU;EACVC,MAAM;;;MAQKI,IAAkB;;;;;;4CAmBwB;;;;SAMrD,iCAAMC;IACJC,KAAKC,mCAAmC;IACxCC,YAAW;MACTF,KAAKC,mCAAmC;AAAK,QAC5C;;EAGL,MAAAE;IACE,MAAMC,IACJJ,KAAKK,aACLL,KAAKM,4BACLN,KAAKO;IAEP,MAAMC,IACJR,KAAKM,4BAA4BN,KAAKO;IACxC,OACEE,EAACC,GAAI;MAACC,OAAM;OACVF,EAAA;MAAUG,OAAOtB;QACjBmB,EAAA;MAASE,OAAM;OACZP,KACCK,EAAA;MAAQE,OAAM;OACXX,KAAKK,aAAaL,KAAKK,WAEvBG,KACCC,EAAA,aACGT,KAAKO,8BACJE,EAAA;MACEE,OAAM;MACNE,SAASb,KAAKO;OAEdE,EAAA;MAAUE,OAAM;MAAUG,KAAKlB;SAIlCI,KAAKM,4BACJG,EAAA;MACEE,OAAM;MACNE,SAASb,KAAKM;OAEdG,EAAA;MAAUE,OAAM;MAAUG,KAAKvB;WAO3CkB,EAAA;MAASE,OAAM;OACbF,EAAA,eACCT,KAAKC,oCACJQ,EAAA;MAAKE,OAAM;OACTF,EAAA;MAAKE,OAAM;OACTF,EAAA;MAAUE,OAAM;MAAUG,KAAKjB;QAC/BY,EAAA;MAAGE,OAAM;OAAgB"}
|
|
@@ -86,6 +86,7 @@ const mercuryChatMessageRender = (a, o = "You", r = "AI Assistant") => i => i.ro
|
|
|
86
86
|
}, i.content), s ] : [
|
|
87
87
|
// "copy button" before "role" and "time" to hide both on button:focus
|
|
88
88
|
copyButton(i.content, "Copy code", "common-message"), e("p", {
|
|
89
|
+
// TODO: make this string translatable
|
|
89
90
|
part: t
|
|
90
91
|
}, "message copied to clipboard"), e("span", {
|
|
91
92
|
part: `message__role ${i.role}`
|
|
@@ -103,4 +104,4 @@ copyButton(i.content, "Copy code", "common-message"), e("p", {
|
|
|
103
104
|
}) ];
|
|
104
105
|
|
|
105
106
|
export { mercuryCodeRender as a, mercuryChatMessageRender as m };
|
|
106
|
-
//# sourceMappingURL=p-
|
|
107
|
+
//# sourceMappingURL=p-d6c2e256.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MESSAGE_COPIED_PART_SELECTOR","MESSAGE_COPIED_VISIBLE_PART_SELECTOR","ANIMATION_DOTS","h","width","height","fill","cx","cy","r","opacity","attributeName","values","dur","repeatCount","begin","copy","text","event","stopPropagation","navigator","clipboard","writeText","copiedFeedbackRef","target","nextSibling","copiedFeedbackPart","getAttribute","setAttribute","setTimeout","copyButton","textToCopy","accessibleName","additionalPart","title","class","type","onClick","part","mercuryCodeRender","copyButtonAccessibleName","options","plainText","language","lastNestedChildClass","value","mercuryChatMessageRender","theme","userName","assistantName","messageModel","role","status","content","dateTime","metadata","parts","showIndicator","renderCode"],"sources":["src/components/_helpers/chat-container/code-render.tsx"],"sourcesContent":["import { h } from \"@stencil/core\";\nimport {\n MarkdownViewerCodeRender,\n ChatMessageByRole\n} from \"@genexus/chameleon-controls-library\";\nimport { MarkdownViewerCodeRenderOptions } from \"@genexus/chameleon-controls-library/dist/types/components/markdown-viewer/parsers/types\";\nimport { getIconPath } from \"@genexus/mercury\";\ngetIconPath;\n\nconst MESSAGE_COPIED_PART_SELECTOR = \"message__copied-feedback\";\nconst MESSAGE_COPIED_VISIBLE_PART_SELECTOR = \"message__copied-feedback-visible\";\n\nconst ANIMATION_DOTS = (\n <svg width=\"36\" height=\"8\" fill=\"transparent\">\n <circle\n cx=\"4\"\n cy=\"4\"\n r=\"4\"\n opacity=\"0\"\n fill=\"var(--mer-color__primary--200)\"\n >\n <animate\n attributeName=\"opacity\"\n values=\"0;1;0\"\n dur=\"1s\"\n repeatCount=\"indefinite\"\n />\n </circle>\n <circle\n cx=\"18\"\n cy=\"4\"\n r=\"4\"\n opacity=\"0\"\n fill=\"var(--mer-color__primary--200)\"\n >\n <animate\n attributeName=\"opacity\"\n values=\"0;1;0\"\n dur=\"1s\"\n begin=\"0.15s\"\n repeatCount=\"indefinite\"\n />\n </circle>\n <circle\n cx=\"32\"\n cy=\"4\"\n r=\"4\"\n opacity=\"0\"\n fill=\"var(--mer-color__primary--200)\"\n >\n <animate\n attributeName=\"opacity\"\n values=\"0;1;0\"\n dur=\"1s\"\n begin=\"0.30s\"\n repeatCount=\"indefinite\"\n />\n </circle>\n </svg>\n);\n\nconst copy = (text: string) => (event: Event) => {\n event.stopPropagation();\n\n // 1. Copy message\n navigator.clipboard.writeText(text);\n\n // 2. Display \"copied\" message (expects to be the next sibling!)\n const copiedFeedbackRef = (event.target as HTMLElement)\n .nextSibling as HTMLElement;\n const copiedFeedbackPart = copiedFeedbackRef.getAttribute(\"part\");\n if (copiedFeedbackPart === MESSAGE_COPIED_PART_SELECTOR) {\n copiedFeedbackRef.setAttribute(\n \"part\",\n `${MESSAGE_COPIED_PART_SELECTOR} ${MESSAGE_COPIED_VISIBLE_PART_SELECTOR}`\n );\n\n setTimeout(() => {\n copiedFeedbackRef.setAttribute(\"part\", `${MESSAGE_COPIED_PART_SELECTOR}`);\n }, 1000);\n }\n};\n\nconst copyButton = (\n textToCopy: string,\n accessibleName: string,\n additionalPart: string\n) => {\n return (\n <button\n aria-label={accessibleName}\n title={accessibleName}\n class=\"button-copy-code\"\n type=\"button\"\n onClick={copy(textToCopy)}\n part={`message__copy-button ${additionalPart}`}\n ></button>\n );\n};\n\nexport const mercuryCodeRender =\n (copyButtonAccessibleName: string) =>\n (options: MarkdownViewerCodeRenderOptions): MarkdownViewerCodeRender =>\n (\n <div class=\"code-block-container\">\n <div class=\"code-block-header\">\n {copyButton(\n options.plainText,\n copyButtonAccessibleName,\n \"code-render\"\n )}\n </div>\n <ch-code\n language={options.language}\n lastNestedChildClass={options.lastNestedChildClass}\n value={options.plainText}\n ></ch-code>\n </div>\n );\n\nexport const mercuryChatMessageRender =\n (\n theme: string,\n userName: string = \"You\",\n assistantName: string = \"AI Assistant\"\n ) =>\n (messageModel: ChatMessageByRole<\"assistant\" | \"error\" | \"user\">) =>\n messageModel.role === \"assistant\" && messageModel.status === \"waiting\"\n ? [\n <span part=\"message__processing\">{messageModel.content}</span>,\n ANIMATION_DOTS\n ]\n : [\n // \"copy button\" before \"role\" and \"time\" to hide both on button:focus\n copyButton(\n messageModel.content as string,\n \"Copy code\",\n \"common-message\"\n ),\n <p part={MESSAGE_COPIED_PART_SELECTOR}>\n message copied to clipboard\n </p>,\n <span part={`message__role ${messageModel.role}`}>\n {messageModel.role === \"user\" ? userName : assistantName}\n </span>,\n <time dateTime={messageModel.metadata} part=\"message__time\">\n {messageModel.metadata}\n </time>,\n\n messageModel.role === \"user\" ? (\n <span part=\"message__content user\">{messageModel.content}</span>\n ) : (\n <ch-markdown-viewer\n part={\n messageModel.role === \"assistant\" &&\n (messageModel.status === \"complete\" || !messageModel.status) &&\n !messageModel.parts\n ? `message__content no-error`\n : \"message__content\"\n }\n theme={theme}\n showIndicator={false}\n renderCode={mercuryCodeRender(\"Copy code\")}\n value={messageModel.content as string}\n ></ch-markdown-viewer>\n )\n ];\n"],"mappings":";;;;AASA,MAAMA,IAA+B;;AACrC,MAAMC,IAAuC;;AAE7C,MAAMC,IACJC,EAAA;EAAKC,OAAM;EAAKC,QAAO;EAAIC,MAAK;GAC9BH,EAAA;EACEI,IAAG;EACHC,IAAG;EACHC,GAAE;EACFC,SAAQ;EACRJ,MAAK;GAELH,EAAA;EACEQ,eAAc;EACdC,QAAO;EACPC,KAAI;EACJC,aAAY;KAGhBX,EAAA;EACEI,IAAG;EACHC,IAAG;EACHC,GAAE;EACFC,SAAQ;EACRJ,MAAK;GAELH,EAAA;EACEQ,eAAc;EACdC,QAAO;EACPC,KAAI;EACJE,OAAM;EACND,aAAY;KAGhBX,EAAA;EACEI,IAAG;EACHC,IAAG;EACHC,GAAE;EACFC,SAAQ;EACRJ,MAAK;GAELH,EAAA;EACEQ,eAAc;EACdC,QAAO;EACPC,KAAI;EACJE,OAAM;EACND,aAAY;;;AAMpB,MAAME,OAAQC,KAAkBC;EAC9BA,EAAMC;;IAGNC,UAAUC,UAAUC,UAAUL;;IAG9B,MAAMM,IAAqBL,EAAMM,OAC9BC;EACH,MAAMC,IAAqBH,EAAkBI,aAAa;EAC1D,IAAID,MAAuB1B,GAA8B;IACvDuB,EAAkBK,aAChB,QACA,GAAG5B,KAAgCC;IAGrC4B,YAAW;MACTN,EAAkBK,aAAa,QAAQ,GAAG5B;AAA+B,QACxE;;;;AAIP,MAAM8B,aAAa,CACjBC,GACAC,GACAC,MAGE9B,EAAA;EAAA,cACc6B;EACZE,OAAOF;EACPG,OAAM;EACNC,MAAK;EACLC,SAASrB,KAAKe;EACdO,MAAM,wBAAwBL;;;MAKvBM,oBACVC,KACAC,KAEGtC,EAAA;EAAKgC,OAAM;GACThC,EAAA;EAAKgC,OAAM;GACRL,WACCW,EAAQC,WACRF,GACA,iBAGJrC,EAAA;EACEwC,UAAUF,EAAQE;EAClBC,sBAAsBH,EAAQG;EAC9BC,OAAOJ,EAAQC;;;MAKZI,2BACX,CACEC,GACAC,IAAmB,OACnBC,IAAwB,mBAEzBC,KACCA,EAAaC,SAAS,eAAeD,EAAaE,WAAW,YACzD,EACEjD,EAAA;EAAMmC,MAAK;GAAuBY,EAAaG,UAC/CnD,MAEF;;AAEE4B,WACEoB,EAAaG,SACb,aACA,mBAEFlD,EAAA
|
|
1
|
+
{"version":3,"names":["MESSAGE_COPIED_PART_SELECTOR","MESSAGE_COPIED_VISIBLE_PART_SELECTOR","ANIMATION_DOTS","h","width","height","fill","cx","cy","r","opacity","attributeName","values","dur","repeatCount","begin","copy","text","event","stopPropagation","navigator","clipboard","writeText","copiedFeedbackRef","target","nextSibling","copiedFeedbackPart","getAttribute","setAttribute","setTimeout","copyButton","textToCopy","accessibleName","additionalPart","title","class","type","onClick","part","mercuryCodeRender","copyButtonAccessibleName","options","plainText","language","lastNestedChildClass","value","mercuryChatMessageRender","theme","userName","assistantName","messageModel","role","status","content","dateTime","metadata","parts","showIndicator","renderCode"],"sources":["src/components/_helpers/chat-container/code-render.tsx"],"sourcesContent":["import { h } from \"@stencil/core\";\nimport {\n MarkdownViewerCodeRender,\n ChatMessageByRole\n} from \"@genexus/chameleon-controls-library\";\nimport { MarkdownViewerCodeRenderOptions } from \"@genexus/chameleon-controls-library/dist/types/components/markdown-viewer/parsers/types\";\nimport { getIconPath } from \"@genexus/mercury\";\ngetIconPath;\n\nconst MESSAGE_COPIED_PART_SELECTOR = \"message__copied-feedback\";\nconst MESSAGE_COPIED_VISIBLE_PART_SELECTOR = \"message__copied-feedback-visible\";\n\nconst ANIMATION_DOTS = (\n <svg width=\"36\" height=\"8\" fill=\"transparent\">\n <circle\n cx=\"4\"\n cy=\"4\"\n r=\"4\"\n opacity=\"0\"\n fill=\"var(--mer-color__primary--200)\"\n >\n <animate\n attributeName=\"opacity\"\n values=\"0;1;0\"\n dur=\"1s\"\n repeatCount=\"indefinite\"\n />\n </circle>\n <circle\n cx=\"18\"\n cy=\"4\"\n r=\"4\"\n opacity=\"0\"\n fill=\"var(--mer-color__primary--200)\"\n >\n <animate\n attributeName=\"opacity\"\n values=\"0;1;0\"\n dur=\"1s\"\n begin=\"0.15s\"\n repeatCount=\"indefinite\"\n />\n </circle>\n <circle\n cx=\"32\"\n cy=\"4\"\n r=\"4\"\n opacity=\"0\"\n fill=\"var(--mer-color__primary--200)\"\n >\n <animate\n attributeName=\"opacity\"\n values=\"0;1;0\"\n dur=\"1s\"\n begin=\"0.30s\"\n repeatCount=\"indefinite\"\n />\n </circle>\n </svg>\n);\n\nconst copy = (text: string) => (event: Event) => {\n event.stopPropagation();\n\n // 1. Copy message\n navigator.clipboard.writeText(text);\n\n // 2. Display \"copied\" message (expects to be the next sibling!)\n const copiedFeedbackRef = (event.target as HTMLElement)\n .nextSibling as HTMLElement;\n const copiedFeedbackPart = copiedFeedbackRef.getAttribute(\"part\");\n if (copiedFeedbackPart === MESSAGE_COPIED_PART_SELECTOR) {\n copiedFeedbackRef.setAttribute(\n \"part\",\n `${MESSAGE_COPIED_PART_SELECTOR} ${MESSAGE_COPIED_VISIBLE_PART_SELECTOR}`\n );\n\n setTimeout(() => {\n copiedFeedbackRef.setAttribute(\"part\", `${MESSAGE_COPIED_PART_SELECTOR}`);\n }, 1000);\n }\n};\n\nconst copyButton = (\n textToCopy: string,\n accessibleName: string,\n additionalPart: string\n) => {\n return (\n <button\n aria-label={accessibleName}\n title={accessibleName}\n class=\"button-copy-code\"\n type=\"button\"\n onClick={copy(textToCopy)}\n part={`message__copy-button ${additionalPart}`}\n ></button>\n );\n};\n\nexport const mercuryCodeRender =\n (copyButtonAccessibleName: string) =>\n (options: MarkdownViewerCodeRenderOptions): MarkdownViewerCodeRender =>\n (\n <div class=\"code-block-container\">\n <div class=\"code-block-header\">\n {copyButton(\n options.plainText,\n copyButtonAccessibleName,\n \"code-render\"\n )}\n </div>\n <ch-code\n language={options.language}\n lastNestedChildClass={options.lastNestedChildClass}\n value={options.plainText}\n ></ch-code>\n </div>\n );\n\nexport const mercuryChatMessageRender =\n (\n theme: string,\n userName: string = \"You\",\n assistantName: string = \"AI Assistant\"\n ) =>\n (messageModel: ChatMessageByRole<\"assistant\" | \"error\" | \"user\">) =>\n messageModel.role === \"assistant\" && messageModel.status === \"waiting\"\n ? [\n <span part=\"message__processing\">{messageModel.content}</span>,\n ANIMATION_DOTS\n ]\n : [\n // \"copy button\" before \"role\" and \"time\" to hide both on button:focus\n copyButton(\n messageModel.content as string,\n \"Copy code\",\n \"common-message\"\n ),\n <p\n // TODO: make this string translatable\n part={MESSAGE_COPIED_PART_SELECTOR}\n >\n message copied to clipboard\n </p>,\n <span part={`message__role ${messageModel.role}`}>\n {messageModel.role === \"user\" ? userName : assistantName}\n </span>,\n <time dateTime={messageModel.metadata} part=\"message__time\">\n {messageModel.metadata}\n </time>,\n\n messageModel.role === \"user\" ? (\n <span part=\"message__content user\">{messageModel.content}</span>\n ) : (\n <ch-markdown-viewer\n part={\n messageModel.role === \"assistant\" &&\n (messageModel.status === \"complete\" || !messageModel.status) &&\n !messageModel.parts\n ? `message__content no-error`\n : \"message__content\"\n }\n theme={theme}\n showIndicator={false}\n renderCode={mercuryCodeRender(\"Copy code\")}\n value={messageModel.content as string}\n ></ch-markdown-viewer>\n )\n ];\n"],"mappings":";;;;AASA,MAAMA,IAA+B;;AACrC,MAAMC,IAAuC;;AAE7C,MAAMC,IACJC,EAAA;EAAKC,OAAM;EAAKC,QAAO;EAAIC,MAAK;GAC9BH,EAAA;EACEI,IAAG;EACHC,IAAG;EACHC,GAAE;EACFC,SAAQ;EACRJ,MAAK;GAELH,EAAA;EACEQ,eAAc;EACdC,QAAO;EACPC,KAAI;EACJC,aAAY;KAGhBX,EA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ASH,IAAWC,IAE7C9C,EAAA;EAAMmD,UAAUJ,EAAaK;EAAUjB,MAAK;GACzCY,EAAaK,WAGhBL,EAAaC,SAAS,SACpBhD,EAAA;EAAMmC,MAAK;GAAyBY,EAAaG,WAEjDlD,EAAA;EACEmC,MACEY,EAAaC,SAAS,gBACrBD,EAAaE,WAAW,eAAeF,EAAaE,YACpDF,EAAaM,QACV,8BACA;EAENT,OAAOA;EACPU,eAAe;EACfC,YAAYnB,kBAAkB;EAC9BM,OAAOK,EAAaG"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as e, h as t, H as n } from "./p-2cf37639.js";
|
|
2
2
|
|
|
3
|
-
import { m as a } from "./p-
|
|
3
|
+
import { m as a } from "./p-d6c2e256.js";
|
|
4
4
|
|
|
5
5
|
import "./p-c9551186.js";
|
|
6
6
|
|
|
@@ -204,7 +204,8 @@ const x = class {
|
|
|
204
204
|
chatTitle: "GeneXus Assistant",
|
|
205
205
|
copyConversationCallback: m(this, g, "f"),
|
|
206
206
|
deleteConversationCallback: m(this, f, "f"),
|
|
207
|
-
ref: e => u(this, p, e, "f")
|
|
207
|
+
ref: e => u(this, p, e, "f"),
|
|
208
|
+
class: "elevation-2"
|
|
208
209
|
}, t("ch-chat", {
|
|
209
210
|
callbacks: c,
|
|
210
211
|
class: "chat",
|
|
@@ -227,4 +228,4 @@ p = new WeakMap, g = new WeakMap, f = new WeakMap;
|
|
|
227
228
|
x.style = h;
|
|
228
229
|
|
|
229
230
|
export { x as gx_ide_sc_chat_container };
|
|
230
|
-
//# sourceMappingURL=p-
|
|
231
|
+
//# sourceMappingURL=p-de589873.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PROCESSING_PLACEHOLDER","timeOut","ASSISTANT_RESPONSE_MARKDOWN","ASSISTANT_RESPONSE_SHORT_MARKDOWN","sendChatToLLM","chatRef","document","querySelector","addNewMessage","id","Date","getTime","role","content","status","setTimeout","updateLastMessage","dummyStreaming","counter","stringToDisplay","mode","streamingCompleted","length","message","substring","files","url","caption","undefined","chatCallbacks","clear","Promise","resolve","uploadImage","stopGeneratingAnswer","clearTimeout","chatTranslations","accessibleName","clearChat","copyResponseButton","downloadCodeButton","imagePicker","removeUploadedImage","sendButton","sendInput","stopGeneratingAnswerButton","placeholder","text","copyCodeButton","processing","sourceFiles","Array","from","_","index","codeFixerRecord","metadata","parts","chatShowcaseCss","CSS_BUNDLES","GxIdeScChatContainer","_GxIdeScChatContainer_chatContainerRef","set","this","_GxIdeScChatContainer_copyConversationCallbackHandler","__classPrivateFieldGet","showCopyConversationMessage","_GxIdeScChatContainer_deleteConversationCallbackHandler","console","log","componentDidLoad","assistantStatus","render","h","Host","model","chatTitle","copyConversationCallback","deleteConversationCallback","ref","el","__classPrivateFieldSet","callbacks","class","generatingResponse","loadingState","markdownTheme","renderItem","mercuryChatMessageRender","isMobile","items","showAdditionalContent","translations","slot"],"sources":["src/showcase/chat-container/callbacks.ts","src/showcase/chat-container/chat-showcase.scss?tag=gx-ide-sc-chat-container&encapsulation=shadow","src/showcase/chat-container/chat.showcase.tsx"],"sourcesContent":["import {\n ChatInternalCallbacks,\n ChatMessage,\n ChatTranslations\n} from \"@genexus/chameleon-controls-library\";\n\nconst PROCESSING_PLACEHOLDER = \"{{ASSISTANT_NAME}}\";\n\nlet timeOut: NodeJS.Timeout;\n\nconst ASSISTANT_RESPONSE_MARKDOWN = `\n ### Code block {#code-block}\n To create code blocks, you’ll use three backticks (\\` \\`\\`\\` \\`) or three tildes (\\`~~~\\`) on the lines before and after the code block.\n \n \\`\\`\\`\n {\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"age\": 25\n }\n \\`\\`\\`\n \n Another way to create code blocks is to indent every line of the block by at least four spaces or one tab.\n \n <html>\n <head>\n </head>\n </html>\n \n \n #### Syntax Highlighting {#syntax-highlighting}\n This feature allows you to add color highlighting for whatever language your code was written in.\n To add syntax highlighting, specify a language next to the backticks before the fenced code block.\n \n \\`\\`\\`json\n {\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"age\": 25\n }\n \\`\\`\\`\n \n \\`\\`\\`javascript\n import React from 'react'\n import ReactDOM from 'react-dom'\n import Markdown from 'react-markdown'\n import rehypeHighlight from 'rehype-highlight'\n \n const markdown = \\`\n # Your markdown here\n \\`\n \n ReactDOM.render(\n <Markdown rehypePlugins={[rehypeHighlight]}>{markdown}</Markdown>,\n document.querySelector('#content')\n )\n \\`\\`\\`\n \n ### Horizontal Rules {#horizontal-rules}\n To create a horizontal rule, use three or more asterisks (\\`***\\`), dashes (\\`---\\`), or underscores (\\`___\\`) on a line by themselves.\n `;\n\nconst ASSISTANT_RESPONSE_SHORT_MARKDOWN =\n '\\n### Code block {#code-block}\\nTo create code blocks, you’ll use three backticks (` ``` `) or three tildes (`~~~`) on the lines before and after the code block.\\n\\n```json\\n{\\n \"firstName\": \"John\",\\n \"lastName\": \"Smith\",\\n \"age\": 25\\n}\\n```\\n\\nindex: 5\\nindex: 5\\nindex: 5\\nindex: 5\\nindex: 5\\nindex: 5\\nindex: 5\\n';\n\nconst sendChatToLLM = () => {\n // This is a WA to get the chat reference\n const chatRef = document.querySelector(\"ch-chat\") as HTMLChChatElement;\n\n chatRef.addNewMessage({\n id: `${new Date().getTime()}`,\n role: \"assistant\",\n content: \"Analyzing\",\n status: \"waiting\"\n });\n\n timeOut = setTimeout(() => {\n chatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: \"Processing with Chat with LLMs\",\n status: \"waiting\"\n },\n \"replace\"\n );\n\n timeOut = setTimeout(() => {\n dummyStreaming(chatRef, 20, ASSISTANT_RESPONSE_MARKDOWN, \"replace\");\n }, 200);\n }, 200);\n};\n\nfunction dummyStreaming(\n chatRef: HTMLChChatElement,\n counter: number,\n stringToDisplay: string,\n mode: \"concat\" | \"replace\"\n) {\n timeOut = setTimeout(\n () => {\n const streamingCompleted = counter >= stringToDisplay.length;\n\n chatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: {\n message: stringToDisplay.substring(counter - 20, counter),\n files: streamingCompleted\n ? [\n {\n url: \"https://next.genexus.ai\",\n caption: \"Mars Exploration Contract\"\n },\n {\n url: \"https://gx-chameleon.netlify.app\",\n caption: \"Venus Exploration Contract\"\n }\n ]\n : undefined\n },\n status: streamingCompleted ? \"complete\" : \"streaming\"\n },\n mode\n );\n\n if (!streamingCompleted) {\n dummyStreaming(chatRef, counter + 20, stringToDisplay, \"concat\");\n }\n },\n counter % 200 === 0 ? 50 : 40\n );\n}\n\nexport const chatCallbacks: ChatInternalCallbacks = {\n clear: () => new Promise(resolve => resolve()),\n sendChatToLLM: sendChatToLLM,\n uploadImage: () => new Promise(resolve => resolve(\"\")),\n stopGeneratingAnswer: () => {\n clearTimeout(timeOut);\n\n // This is a WA to get the chat reference\n const chatRef = document.querySelector(\"ch-chat\") as HTMLChChatElement;\n\n chatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: \"\",\n status: \"complete\"\n },\n \"concat\"\n );\n\n return new Promise(resolve => setTimeout(() => resolve, 10));\n }\n};\n\nexport const chatTranslations: ChatTranslations = {\n accessibleName: {\n clearChat: \"Clear chat\",\n copyResponseButton: \"Copy assistant response\",\n downloadCodeButton: \"Download code\",\n imagePicker: \"Select images\",\n removeUploadedImage: \"Remove uploaded image\",\n sendButton: \"Send\",\n sendInput: \"Message\",\n stopGeneratingAnswerButton: \"Stop generating answer\"\n },\n placeholder: {\n sendInput: \"Ask me a question...\"\n },\n text: {\n copyCodeButton: \"Copy code\",\n processing: `Processing with ${PROCESSING_PLACEHOLDER}`,\n sourceFiles: \"Source files:\"\n }\n};\n\nexport const chatRecord: ChatMessage[] = [\n { id: \"1\", role: \"user\", content: \"Hello world\" },\n { id: \"2\", role: \"assistant\", content: ASSISTANT_RESPONSE_MARKDOWN },\n { id: \"3\", role: \"user\", content: \"Hello world 1\" },\n { id: \"4\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN },\n { id: \"5\", role: \"user\", content: \"Hello world 2\" },\n { id: \"6\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN },\n { id: \"7\", role: \"user\", content: \"Hello world 3\" },\n { id: \"8\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN },\n { id: \"9\", role: \"user\", content: \"Hello world 4\" },\n { id: \"10\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN }\n];\n\nexport const longChatRecord: ChatMessage[] = Array.from(\n { length: 40 },\n (_, index) =>\n index % 2 === 0\n ? {\n id: `index: ${index}`,\n role: \"user\",\n content:\n `index: ${index}` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n`\n }\n : {\n id: `index: ${index}`,\n role: \"assistant\",\n content:\n ASSISTANT_RESPONSE_SHORT_MARKDOWN +\n `\\nindex: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n`\n }\n);\n\nexport const codeFixerRecord: ChatMessage[] = [\n {\n id: \"1\",\n role: \"user\",\n content: \"Please give me an example about...\",\n metadata: \"14:55\"\n },\n {\n id: \"2\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Action required example. Action required example. Action required example.\",\n metadata: \"14:56\"\n },\n {\n id: \"3\",\n role: \"assistant\",\n status: \"complete\",\n content: \"Warning in request\",\n metadata: \"14:57\",\n parts: \"warning\"\n },\n {\n id: \"4\",\n role: \"error\",\n content: \"Error in Request\",\n metadata: \"14:58\"\n },\n {\n id: \"5\",\n role: \"assistant\",\n status: \"complete\",\n content: \"Warning in request\",\n metadata: \"14:59\",\n parts: \"success\"\n },\n {\n id: \"6\",\n role: \"user\",\n content:\n \"Implement the function calculate_average_grade in grades.py that takes a list of grades as input and returns the average grade as a floating-point number\",\n metadata: \"15:00\"\n },\n {\n id: \"7\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"You can provide further details or updates regarding your support ticket and its associated code. Your input here helps us better understand and address your issue effectively.\",\n metadata: \"15:01\"\n },\n {\n id: \"8\",\n role: \"assistant\",\n status: \"waiting\",\n content: \"You can provide further details or updates\"\n },\n {\n id: \"9\",\n role: \"assistant\",\n status: \"complete\",\n content: ASSISTANT_RESPONSE_SHORT_MARKDOWN\n }\n];\n",":host {\n block-size: 100%;\n display: grid;\n}\n","import { Component, Host, h, State } from \"@stencil/core\";\nimport { mercuryChatMessageRender } from \"../../components/_helpers/chat-container/code-render\";\nimport { MercuryBundles } from \"@genexus/mercury\";\n\nconst CSS_BUNDLES: MercuryBundles = [\"resets/box-sizing\", \"components/chat\"];\n\nimport { chatCallbacks, chatTranslations, codeFixerRecord } from \"./callbacks\";\n\n@Component({\n tag: \"gx-ide-sc-chat-container\",\n styleUrl: \"chat-showcase.scss\",\n shadow: true\n})\nexport class GxIdeScChatContainer {\n #chatContainerRef!: HTMLGxIdeChatContainerElement;\n\n @State() showAdditionalContent: boolean = false;\n @State() conversationCopied: boolean = false;\n @State() assistantStatus: string = \"Getting Data\";\n\n #copyConversationCallbackHandler = () => {\n this.#chatContainerRef.showCopyConversationMessage();\n };\n\n #deleteConversationCallbackHandler = () => {\n console.log(\"delete messages\");\n };\n\n componentDidLoad() {\n setTimeout(() => {\n this.assistantStatus = \"Creating Data Base..\";\n }, 1000);\n }\n\n render() {\n return (\n <Host>\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <gx-ide-chat-container\n chatTitle=\"GeneXus Assistant\"\n copyConversationCallback={this.#copyConversationCallbackHandler}\n deleteConversationCallback={this.#deleteConversationCallbackHandler}\n ref={el =>\n (this.#chatContainerRef = el as HTMLGxIdeChatContainerElement)\n }\n >\n <ch-chat\n callbacks={chatCallbacks}\n class=\"chat\"\n generatingResponse={false}\n loadingState=\"all-records-loaded\"\n markdownTheme=\"mercury/markdown-viewer\"\n renderItem={mercuryChatMessageRender(\n \"mercury/markdown-viewer\",\n \"Bruno\",\n \"Gx Assistant\"\n )}\n isMobile={false}\n items={codeFixerRecord}\n showAdditionalContent={this.showAdditionalContent}\n translations={chatTranslations}\n >\n <div slot=\"additional-content\">\n Custom content that is rendered when the chat renders content\n </div>\n </ch-chat>\n </gx-ide-chat-container>\n </Host>\n );\n }\n}\n"],"mappings":";;;;;;AAMA,MAAMA,IAAyB;;AAE/B,IAAIC;;AAEJ,MAAMC,IAA8B;;AAoDpC,MAAMC,IACJ;;AAEF,MAAMC,gBAAgB;;EAEpB,MAAMC,IAAUC,SAASC,cAAc;EAEvCF,EAAQG,cAAc;IACpBC,IAAI,IAAG,IAAIC,MAAOC;IAClBC,MAAM;IACNC,SAAS;IACTC,QAAQ;;EAGVb,IAAUc,YAAW;IACnBV,EAAQW,kBACN;MACEJ,MAAM;MACNC,SAAS;MACTC,QAAQ;OAEV;IAGFb,IAAUc,YAAW;MACnBE,eAAeZ,GAAS,IAAIH,GAA6B;AAAU,QAClE;AAAI,MACN;AAAI;;AAGT,SAASe,eACPZ,GACAa,GACAC,GACAC;EAEAnB,IAAUc,YACR;IACE,MAAMM,IAAqBH,KAAWC,EAAgBG;IAEtDjB,EAAQW,kBACN;MACEJ,MAAM;MACNC,SAAS;QACPU,SAASJ,EAAgBK,UAAUN,IAAU,IAAIA;QACjDO,OAAOJ,IACH,EACE;UACEK,KAAK;UACLC,SAAS;WAEX;UACED,KAAK;UACLC,SAAS;cAGbC;;MAENd,QAAQO,IAAqB,aAAa;OAE5CD;IAGF,KAAKC,GAAoB;MACvBJ,eAAeZ,GAASa,IAAU,IAAIC,GAAiB;;MAG3DD,IAAU,QAAQ,IAAI,KAAK;AAE/B;;AAEO,MAAMW,IAAuC;EAClDC,OAAO,MAAM,IAAIC,SAAQC,KAAWA;EACpC5B;EACA6B,aAAa,MAAM,IAAIF,SAAQC,KAAWA,EAAQ;EAClDE,sBAAsB;IACpBC,aAAalC;;QAGb,MAAMI,IAAUC,SAASC,cAAc;IAEv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IAAI;EACJG,MAAM;EACNE,QAAQ;EACRD,SAAS;GAEX;EACEJ,IAAI;EACJG,MAAM;EACNE,QAAQ;EACRD,SAASV;;;AC3Rb,MAAMuD,IAAkB;;;;;;;;;;;;;;;;;ACIxB,MAAMC,IAA8B,EAAC,qBAAqB;;MAS7CC,IAAoB;;;IAC/BC,EAAAC,IAAAC,WAAA;IAMAC,EAAAF,IAAAC,OAAmC;MACjCE,EAAAF,MAAIF,GAAA,KAAmBK;AAA6B;IAGtDC,EAAAL,IAAAC,OAAqC;MACnCK,QAAQC,IAAI;AAAkB;iCATU;8BACH;2BACJ;;EAUnC,gBAAAC;IACEvD,YAAW;MACTgD,KAAKQ,kBAAkB;AAAsB,QAC5C;;EAGL,MAAAC;IACE,OACEC,EAACC,GAAI,MACHD,EAAA;MAAUE,OAAOhB;QACjBc,EAAA;MACEG,WAAU;MACVC,0BAA0BZ,EAAAF,MAAIC,GAAA;MAC9Bc,4BAA4Bb,EAAAF,MAAII,GAAA;MAChCY,KAAKC,KACFC,EAAAlB,MAAIF,GAAqBmB,GAAmC;OAG/DP,EAAA;MACES,WAAWrD;MACXsD,OAAM;MACNC,oBAAoB;MACpBC,cAAa;MACbC,eAAc;MACdC,YAAYC,EACV,2BACA,SACA;MAEFC,UAAU;MACVC,OAAOnC;MACPoC,uBAAuB5B,KAAK4B;MAC5BC,cAAcxD;OAEdqC,EAAA;MAAKoB,MAAK;OAAoB"}
|
|
1
|
+
{"version":3,"names":["PROCESSING_PLACEHOLDER","timeOut","ASSISTANT_RESPONSE_MARKDOWN","ASSISTANT_RESPONSE_SHORT_MARKDOWN","sendChatToLLM","chatRef","document","querySelector","addNewMessage","id","Date","getTime","role","content","status","setTimeout","updateLastMessage","dummyStreaming","counter","stringToDisplay","mode","streamingCompleted","length","message","substring","files","url","caption","undefined","chatCallbacks","clear","Promise","resolve","uploadImage","stopGeneratingAnswer","clearTimeout","chatTranslations","accessibleName","clearChat","copyResponseButton","downloadCodeButton","imagePicker","removeUploadedImage","sendButton","sendInput","stopGeneratingAnswerButton","placeholder","text","copyCodeButton","processing","sourceFiles","Array","from","_","index","codeFixerRecord","metadata","parts","chatShowcaseCss","CSS_BUNDLES","GxIdeScChatContainer","_GxIdeScChatContainer_chatContainerRef","set","this","_GxIdeScChatContainer_copyConversationCallbackHandler","__classPrivateFieldGet","showCopyConversationMessage","_GxIdeScChatContainer_deleteConversationCallbackHandler","console","log","componentDidLoad","assistantStatus","render","h","Host","model","chatTitle","copyConversationCallback","deleteConversationCallback","ref","el","__classPrivateFieldSet","class","callbacks","generatingResponse","loadingState","markdownTheme","renderItem","mercuryChatMessageRender","isMobile","items","showAdditionalContent","translations","slot"],"sources":["src/showcase/chat-container/callbacks.ts","src/showcase/chat-container/chat-showcase.scss?tag=gx-ide-sc-chat-container&encapsulation=shadow","src/showcase/chat-container/chat.showcase.tsx"],"sourcesContent":["import {\n ChatInternalCallbacks,\n ChatMessage,\n ChatTranslations\n} from \"@genexus/chameleon-controls-library\";\n\nconst PROCESSING_PLACEHOLDER = \"{{ASSISTANT_NAME}}\";\n\nlet timeOut: NodeJS.Timeout;\n\nconst ASSISTANT_RESPONSE_MARKDOWN = `\n ### Code block {#code-block}\n To create code blocks, you’ll use three backticks (\\` \\`\\`\\` \\`) or three tildes (\\`~~~\\`) on the lines before and after the code block.\n \n \\`\\`\\`\n {\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"age\": 25\n }\n \\`\\`\\`\n \n Another way to create code blocks is to indent every line of the block by at least four spaces or one tab.\n \n <html>\n <head>\n </head>\n </html>\n \n \n #### Syntax Highlighting {#syntax-highlighting}\n This feature allows you to add color highlighting for whatever language your code was written in.\n To add syntax highlighting, specify a language next to the backticks before the fenced code block.\n \n \\`\\`\\`json\n {\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"age\": 25\n }\n \\`\\`\\`\n \n \\`\\`\\`javascript\n import React from 'react'\n import ReactDOM from 'react-dom'\n import Markdown from 'react-markdown'\n import rehypeHighlight from 'rehype-highlight'\n \n const markdown = \\`\n # Your markdown here\n \\`\n \n ReactDOM.render(\n <Markdown rehypePlugins={[rehypeHighlight]}>{markdown}</Markdown>,\n document.querySelector('#content')\n )\n \\`\\`\\`\n \n ### Horizontal Rules {#horizontal-rules}\n To create a horizontal rule, use three or more asterisks (\\`***\\`), dashes (\\`---\\`), or underscores (\\`___\\`) on a line by themselves.\n `;\n\nconst ASSISTANT_RESPONSE_SHORT_MARKDOWN =\n '\\n### Code block {#code-block}\\nTo create code blocks, you’ll use three backticks (` ``` `) or three tildes (`~~~`) on the lines before and after the code block.\\n\\n```json\\n{\\n \"firstName\": \"John\",\\n \"lastName\": \"Smith\",\\n \"age\": 25\\n}\\n```\\n\\nindex: 5\\nindex: 5\\nindex: 5\\nindex: 5\\nindex: 5\\nindex: 5\\nindex: 5\\n';\n\nconst sendChatToLLM = () => {\n // This is a WA to get the chat reference\n const chatRef = document.querySelector(\"ch-chat\") as HTMLChChatElement;\n\n chatRef.addNewMessage({\n id: `${new Date().getTime()}`,\n role: \"assistant\",\n content: \"Analyzing\",\n status: \"waiting\"\n });\n\n timeOut = setTimeout(() => {\n chatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: \"Processing with Chat with LLMs\",\n status: \"waiting\"\n },\n \"replace\"\n );\n\n timeOut = setTimeout(() => {\n dummyStreaming(chatRef, 20, ASSISTANT_RESPONSE_MARKDOWN, \"replace\");\n }, 200);\n }, 200);\n};\n\nfunction dummyStreaming(\n chatRef: HTMLChChatElement,\n counter: number,\n stringToDisplay: string,\n mode: \"concat\" | \"replace\"\n) {\n timeOut = setTimeout(\n () => {\n const streamingCompleted = counter >= stringToDisplay.length;\n\n chatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: {\n message: stringToDisplay.substring(counter - 20, counter),\n files: streamingCompleted\n ? [\n {\n url: \"https://next.genexus.ai\",\n caption: \"Mars Exploration Contract\"\n },\n {\n url: \"https://gx-chameleon.netlify.app\",\n caption: \"Venus Exploration Contract\"\n }\n ]\n : undefined\n },\n status: streamingCompleted ? \"complete\" : \"streaming\"\n },\n mode\n );\n\n if (!streamingCompleted) {\n dummyStreaming(chatRef, counter + 20, stringToDisplay, \"concat\");\n }\n },\n counter % 200 === 0 ? 50 : 40\n );\n}\n\nexport const chatCallbacks: ChatInternalCallbacks = {\n clear: () => new Promise(resolve => resolve()),\n sendChatToLLM: sendChatToLLM,\n uploadImage: () => new Promise(resolve => resolve(\"\")),\n stopGeneratingAnswer: () => {\n clearTimeout(timeOut);\n\n // This is a WA to get the chat reference\n const chatRef = document.querySelector(\"ch-chat\") as HTMLChChatElement;\n\n chatRef.updateLastMessage(\n {\n role: \"assistant\",\n content: \"\",\n status: \"complete\"\n },\n \"concat\"\n );\n\n return new Promise(resolve => setTimeout(() => resolve, 10));\n }\n};\n\nexport const chatTranslations: ChatTranslations = {\n accessibleName: {\n clearChat: \"Clear chat\",\n copyResponseButton: \"Copy assistant response\",\n downloadCodeButton: \"Download code\",\n imagePicker: \"Select images\",\n removeUploadedImage: \"Remove uploaded image\",\n sendButton: \"Send\",\n sendInput: \"Message\",\n stopGeneratingAnswerButton: \"Stop generating answer\"\n },\n placeholder: {\n sendInput: \"Ask me a question...\"\n },\n text: {\n copyCodeButton: \"Copy code\",\n processing: `Processing with ${PROCESSING_PLACEHOLDER}`,\n sourceFiles: \"Source files:\"\n }\n};\n\nexport const chatRecord: ChatMessage[] = [\n { id: \"1\", role: \"user\", content: \"Hello world\" },\n { id: \"2\", role: \"assistant\", content: ASSISTANT_RESPONSE_MARKDOWN },\n { id: \"3\", role: \"user\", content: \"Hello world 1\" },\n { id: \"4\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN },\n { id: \"5\", role: \"user\", content: \"Hello world 2\" },\n { id: \"6\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN },\n { id: \"7\", role: \"user\", content: \"Hello world 3\" },\n { id: \"8\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN },\n { id: \"9\", role: \"user\", content: \"Hello world 4\" },\n { id: \"10\", role: \"assistant\", content: ASSISTANT_RESPONSE_SHORT_MARKDOWN }\n];\n\nexport const longChatRecord: ChatMessage[] = Array.from(\n { length: 40 },\n (_, index) =>\n index % 2 === 0\n ? {\n id: `index: ${index}`,\n role: \"user\",\n content:\n `index: ${index}` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n`\n }\n : {\n id: `index: ${index}`,\n role: \"assistant\",\n content:\n ASSISTANT_RESPONSE_SHORT_MARKDOWN +\n `\\nindex: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n` +\n `index: ${index}\\n`\n }\n);\n\nexport const codeFixerRecord: ChatMessage[] = [\n {\n id: \"1\",\n role: \"user\",\n content: \"Please give me an example about...\",\n metadata: \"14:55\"\n },\n {\n id: \"2\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"Action required example. Action required example. Action required example.\",\n metadata: \"14:56\"\n },\n {\n id: \"3\",\n role: \"assistant\",\n status: \"complete\",\n content: \"Warning in request\",\n metadata: \"14:57\",\n parts: \"warning\"\n },\n {\n id: \"4\",\n role: \"error\",\n content: \"Error in Request\",\n metadata: \"14:58\"\n },\n {\n id: \"5\",\n role: \"assistant\",\n status: \"complete\",\n content: \"Warning in request\",\n metadata: \"14:59\",\n parts: \"success\"\n },\n {\n id: \"6\",\n role: \"user\",\n content:\n \"Implement the function calculate_average_grade in grades.py that takes a list of grades as input and returns the average grade as a floating-point number\",\n metadata: \"15:00\"\n },\n {\n id: \"7\",\n role: \"assistant\",\n status: \"complete\",\n content:\n \"You can provide further details or updates regarding your support ticket and its associated code. Your input here helps us better understand and address your issue effectively.\",\n metadata: \"15:01\"\n },\n {\n id: \"8\",\n role: \"assistant\",\n status: \"waiting\",\n content: \"You can provide further details or updates\"\n },\n {\n id: \"9\",\n role: \"assistant\",\n status: \"complete\",\n content: ASSISTANT_RESPONSE_SHORT_MARKDOWN\n }\n];\n",":host {\n block-size: 100%;\n display: grid;\n}\n","import { Component, Host, h, State } from \"@stencil/core\";\nimport { mercuryChatMessageRender } from \"../../components/_helpers/chat-container/code-render\";\nimport { MercuryBundles } from \"@genexus/mercury\";\n\nconst CSS_BUNDLES: MercuryBundles = [\"resets/box-sizing\", \"components/chat\"];\n\nimport { chatCallbacks, chatTranslations, codeFixerRecord } from \"./callbacks\";\n\n@Component({\n tag: \"gx-ide-sc-chat-container\",\n styleUrl: \"chat-showcase.scss\",\n shadow: true\n})\nexport class GxIdeScChatContainer {\n #chatContainerRef!: HTMLGxIdeChatContainerElement;\n\n @State() showAdditionalContent: boolean = false;\n @State() conversationCopied: boolean = false;\n @State() assistantStatus: string = \"Getting Data\";\n\n #copyConversationCallbackHandler = () => {\n this.#chatContainerRef.showCopyConversationMessage();\n };\n\n #deleteConversationCallbackHandler = () => {\n console.log(\"delete messages\");\n };\n\n componentDidLoad() {\n setTimeout(() => {\n this.assistantStatus = \"Creating Data Base..\";\n }, 1000);\n }\n\n render() {\n return (\n <Host>\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <gx-ide-chat-container\n chatTitle=\"GeneXus Assistant\"\n copyConversationCallback={this.#copyConversationCallbackHandler}\n deleteConversationCallback={this.#deleteConversationCallbackHandler}\n ref={el =>\n (this.#chatContainerRef = el as HTMLGxIdeChatContainerElement)\n }\n class=\"elevation-2\"\n >\n <ch-chat\n callbacks={chatCallbacks}\n class=\"chat\"\n generatingResponse={false}\n loadingState=\"all-records-loaded\"\n markdownTheme=\"mercury/markdown-viewer\"\n renderItem={mercuryChatMessageRender(\n \"mercury/markdown-viewer\",\n \"Bruno\",\n \"Gx Assistant\"\n )}\n isMobile={false}\n items={codeFixerRecord}\n showAdditionalContent={this.showAdditionalContent}\n translations={chatTranslations}\n >\n <div slot=\"additional-content\">\n Custom content that is rendered when the chat renders content\n </div>\n </ch-chat>\n </gx-ide-chat-container>\n </Host>\n );\n }\n}\n"],"mappings":";;;;;;AAMA,MAAMA,IAAyB;;AAE/B,IAAIC;;AAEJ,MAAMC,IAA8B;;AAoDpC,MAAMC,IACJ;;AAEF,MAAMC,gBAAgB;;EAEpB,MAAMC,IAAUC,SAASC,cAAc;EAEvCF,EAAQG,cAAc;IACpBC,IAAI,IAAG,IAAIC,MAAOC;IAClBC,MAAM;IACNC,SAAS;IACTC,QAAQ;;EAGVb,IAAUc,YAAW;IACnBV,EAAQW,kBACN;MACEJ,MAAM;MACNC,SAAS;MACTC,QAAQ;OAEV;IAGFb,IAAUc,YAAW;MACnBE,eAAeZ,GAAS,IAAIH,GAA6B;AAAU,QAClE;AAAI,MACN;AAAI;;AAGT,SAASe,eACPZ,GACAa,GACAC,GACAC;EAEAnB,IAAUc,YACR;IACE,MAAMM,IAAqBH,KAAWC,EAAgBG;IAEtDjB,EAAQW,kBACN;MACEJ,MAAM;MACNC,SAAS;QACPU,SAASJ,EAAgBK,UAAUN,IAAU,IAAIA;QACjDO,OAAOJ,IACH,EACE;UACEK,KAAK;UACLC,SAAS;WAEX;UACED,KAAK;UACLC,SAAS;cAGbC;;MAENd,QAAQO,IAAqB,aAAa;OAE5CD;IAGF,KAAKC,GAAoB;MACvBJ,eAAeZ,GAASa,IAAU,IAAIC,GAAiB;;MAG3DD,IAAU,QAAQ,IAAI,KAAK;AAE/B;;AAEO,MAAMW,IAAuC;EAClDC,OAAO,MAAM,IAAIC,SAAQC,KAAWA;EACpC5B;EACA6B,aAAa,MAAM,IAAIF,SAAQC,KAAWA,EAAQ;EAClDE,sBAAsB;IACpBC,aAAalC;;QAGb,MAAMI,IAAUC,SAASC,cAAc;IAEvCF,EAAQW,kBACN;MACEJ,MAAM;MACNC,SAAS;MACTC,QAAQ;OAEV;IAGF,OAAO,IAAIiB,SAAQC,KAAWjB,YAAW,MAAMiB,IAAS;AAAI;;;AAIzD,MAAM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I,EACF,YAAY,CAAC,IAAI,KAAK,WAAW;iBAChC,YAAY,CAAC,MAAM,KAAK,UAAU,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC;gBAC5D,CAAC,YAAY,CAAC,KAAK;kBACf,2BAA2B;kBAC3B,kBAAkB,EAExB,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,KAAK,EACpB,UAAU,EAAE,iBAAiB,CAAC,WAAW,CAAC,EAC1C,KAAK,EAAE,YAAY,CAAC,OAAiB,GACjB,CACvB;;;;;;","names":["h"],"sources":["src/components/_helpers/chat-container/code-render.tsx"],"sourcesContent":["import { h } from \"@stencil/core\";\nimport {\n MarkdownViewerCodeRender,\n ChatMessageByRole\n} from \"@genexus/chameleon-controls-library\";\nimport { MarkdownViewerCodeRenderOptions } from \"@genexus/chameleon-controls-library/dist/types/components/markdown-viewer/parsers/types\";\nimport { getIconPath } from \"@genexus/mercury\";\ngetIconPath;\n\nconst MESSAGE_COPIED_PART_SELECTOR = \"message__copied-feedback\";\nconst MESSAGE_COPIED_VISIBLE_PART_SELECTOR = \"message__copied-feedback-visible\";\n\nconst ANIMATION_DOTS = (\n <svg width=\"36\" height=\"8\" fill=\"transparent\">\n <circle\n cx=\"4\"\n cy=\"4\"\n r=\"4\"\n opacity=\"0\"\n fill=\"var(--mer-color__primary--200)\"\n >\n <animate\n attributeName=\"opacity\"\n values=\"0;1;0\"\n dur=\"1s\"\n repeatCount=\"indefinite\"\n />\n </circle>\n <circle\n cx=\"18\"\n cy=\"4\"\n r=\"4\"\n opacity=\"0\"\n fill=\"var(--mer-color__primary--200)\"\n >\n <animate\n attributeName=\"opacity\"\n values=\"0;1;0\"\n dur=\"1s\"\n begin=\"0.15s\"\n repeatCount=\"indefinite\"\n />\n </circle>\n <circle\n cx=\"32\"\n cy=\"4\"\n r=\"4\"\n opacity=\"0\"\n fill=\"var(--mer-color__primary--200)\"\n >\n <animate\n attributeName=\"opacity\"\n values=\"0;1;0\"\n dur=\"1s\"\n begin=\"0.30s\"\n repeatCount=\"indefinite\"\n />\n </circle>\n </svg>\n);\n\nconst copy = (text: string) => (event: Event) => {\n event.stopPropagation();\n\n // 1. Copy message\n navigator.clipboard.writeText(text);\n\n // 2. Display \"copied\" message (expects to be the next sibling!)\n const copiedFeedbackRef = (event.target as HTMLElement)\n .nextSibling as HTMLElement;\n const copiedFeedbackPart = copiedFeedbackRef.getAttribute(\"part\");\n if (copiedFeedbackPart === MESSAGE_COPIED_PART_SELECTOR) {\n copiedFeedbackRef.setAttribute(\n \"part\",\n `${MESSAGE_COPIED_PART_SELECTOR} ${MESSAGE_COPIED_VISIBLE_PART_SELECTOR}`\n );\n\n setTimeout(() => {\n copiedFeedbackRef.setAttribute(\"part\", `${MESSAGE_COPIED_PART_SELECTOR}`);\n }, 1000);\n }\n};\n\nconst copyButton = (\n textToCopy: string,\n accessibleName: string,\n additionalPart: string\n) => {\n return (\n <button\n aria-label={accessibleName}\n title={accessibleName}\n class=\"button-copy-code\"\n type=\"button\"\n onClick={copy(textToCopy)}\n part={`message__copy-button ${additionalPart}`}\n ></button>\n );\n};\n\nexport const mercuryCodeRender =\n (copyButtonAccessibleName: string) =>\n (options: MarkdownViewerCodeRenderOptions): MarkdownViewerCodeRender =>\n (\n <div class=\"code-block-container\">\n <div class=\"code-block-header\">\n {copyButton(\n options.plainText,\n copyButtonAccessibleName,\n \"code-render\"\n )}\n </div>\n <ch-code\n language={options.language}\n lastNestedChildClass={options.lastNestedChildClass}\n value={options.plainText}\n ></ch-code>\n </div>\n );\n\nexport const mercuryChatMessageRender =\n (\n theme: string,\n userName: string = \"You\",\n assistantName: string = \"AI Assistant\"\n ) =>\n (messageModel: ChatMessageByRole<\"assistant\" | \"error\" | \"user\">) =>\n messageModel.role === \"assistant\" && messageModel.status === \"waiting\"\n ? [\n <span part=\"message__processing\">{messageModel.content}</span>,\n ANIMATION_DOTS\n ]\n : [\n // \"copy button\" before \"role\" and \"time\" to hide both on button:focus\n copyButton(\n messageModel.content as string,\n \"Copy code\",\n \"common-message\"\n ),\n <p part={MESSAGE_COPIED_PART_SELECTOR}>\n message copied to clipboard\n </p>,\n <span part={`message__role ${messageModel.role}`}>\n {messageModel.role === \"user\" ? userName : assistantName}\n </span>,\n <time dateTime={messageModel.metadata} part=\"message__time\">\n {messageModel.metadata}\n </time>,\n\n messageModel.role === \"user\" ? (\n <span part=\"message__content user\">{messageModel.content}</span>\n ) : (\n <ch-markdown-viewer\n part={\n messageModel.role === \"assistant\" &&\n (messageModel.status === \"complete\" || !messageModel.status) &&\n !messageModel.parts\n ? `message__content no-error`\n : \"message__content\"\n }\n theme={theme}\n showIndicator={false}\n renderCode={mercuryCodeRender(\"Copy code\")}\n value={messageModel.content as string}\n ></ch-markdown-viewer>\n )\n ];\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"code-render-67c13139.js","mappings":";;;AASA,MAAM,4BAA4B,GAAG,0BAA0B,CAAC;AAChE,MAAM,oCAAoC,GAAG,kCAAkC,CAAC;AAEhF,MAAM,cAAc,IAClB,WAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,GAAG,EAAC,IAAI,EAAC,aAAa;IAC3C,cACE,EAAE,EAAC,GAAG,EACN,EAAE,EAAC,GAAG,EACN,CAAC,EAAC,GAAG,EACL,OAAO,EAAC,GAAG,EACX,IAAI,EAAC,gCAAgC;QAErC,eACE,aAAa,EAAC,SAAS,EACvB,MAAM,EAAC,OAAO,EACd,GAAG,EAAC,IAAI,EACR,WAAW,EAAC,YAAY,GACxB,CACK;IACT,cACE,EAAE,EAAC,IAAI,EACP,EAAE,EAAC,GAAG,EACN,CAAC,EAAC,GAAG,EACL,OAAO,EAAC,GAAG,EACX,IAAI,EAAC,gCAAgC;QAErC,eACE,aAAa,EAAC,SAAS,EACvB,MAAM,EAAC,OAAO,EACd,GAAG,EAAC,IAAI,EACR,KAAK,EAAC,OAAO,EACb,WAAW,EAAC,YAAY,GACxB,CACK;IACT,cACE,EAAE,EAAC,IAA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_helpers/chat-container/code-render.tsx"],"sourcesContent":["import { h } from \"@stencil/core\";\nimport {\n MarkdownViewerCodeRender,\n ChatMessageByRole\n} from \"@genexus/chameleon-controls-library\";\nimport { MarkdownViewerCodeRenderOptions } from \"@genexus/chameleon-controls-library/dist/types/components/markdown-viewer/parsers/types\";\nimport { getIconPath } from \"@genexus/mercury\";\ngetIconPath;\n\nconst MESSAGE_COPIED_PART_SELECTOR = \"message__copied-feedback\";\nconst MESSAGE_COPIED_VISIBLE_PART_SELECTOR = \"message__copied-feedback-visible\";\n\nconst ANIMATION_DOTS = (\n <svg width=\"36\" height=\"8\" fill=\"transparent\">\n <circle\n cx=\"4\"\n cy=\"4\"\n r=\"4\"\n opacity=\"0\"\n fill=\"var(--mer-color__primary--200)\"\n >\n <animate\n attributeName=\"opacity\"\n values=\"0;1;0\"\n dur=\"1s\"\n repeatCount=\"indefinite\"\n />\n </circle>\n <circle\n cx=\"18\"\n cy=\"4\"\n r=\"4\"\n opacity=\"0\"\n fill=\"var(--mer-color__primary--200)\"\n >\n <animate\n attributeName=\"opacity\"\n values=\"0;1;0\"\n dur=\"1s\"\n begin=\"0.15s\"\n repeatCount=\"indefinite\"\n />\n </circle>\n <circle\n cx=\"32\"\n cy=\"4\"\n r=\"4\"\n opacity=\"0\"\n fill=\"var(--mer-color__primary--200)\"\n >\n <animate\n attributeName=\"opacity\"\n values=\"0;1;0\"\n dur=\"1s\"\n begin=\"0.30s\"\n repeatCount=\"indefinite\"\n />\n </circle>\n </svg>\n);\n\nconst copy = (text: string) => (event: Event) => {\n event.stopPropagation();\n\n // 1. Copy message\n navigator.clipboard.writeText(text);\n\n // 2. Display \"copied\" message (expects to be the next sibling!)\n const copiedFeedbackRef = (event.target as HTMLElement)\n .nextSibling as HTMLElement;\n const copiedFeedbackPart = copiedFeedbackRef.getAttribute(\"part\");\n if (copiedFeedbackPart === MESSAGE_COPIED_PART_SELECTOR) {\n copiedFeedbackRef.setAttribute(\n \"part\",\n `${MESSAGE_COPIED_PART_SELECTOR} ${MESSAGE_COPIED_VISIBLE_PART_SELECTOR}`\n );\n\n setTimeout(() => {\n copiedFeedbackRef.setAttribute(\"part\", `${MESSAGE_COPIED_PART_SELECTOR}`);\n }, 1000);\n }\n};\n\nconst copyButton = (\n textToCopy: string,\n accessibleName: string,\n additionalPart: string\n) => {\n return (\n <button\n aria-label={accessibleName}\n title={accessibleName}\n class=\"button-copy-code\"\n type=\"button\"\n onClick={copy(textToCopy)}\n part={`message__copy-button ${additionalPart}`}\n ></button>\n );\n};\n\nexport const mercuryCodeRender =\n (copyButtonAccessibleName: string) =>\n (options: MarkdownViewerCodeRenderOptions): MarkdownViewerCodeRender =>\n (\n <div class=\"code-block-container\">\n <div class=\"code-block-header\">\n {copyButton(\n options.plainText,\n copyButtonAccessibleName,\n \"code-render\"\n )}\n </div>\n <ch-code\n language={options.language}\n lastNestedChildClass={options.lastNestedChildClass}\n value={options.plainText}\n ></ch-code>\n </div>\n );\n\nexport const mercuryChatMessageRender =\n (\n theme: string,\n userName: string = \"You\",\n assistantName: string = \"AI Assistant\"\n ) =>\n (messageModel: ChatMessageByRole<\"assistant\" | \"error\" | \"user\">) =>\n messageModel.role === \"assistant\" && messageModel.status === \"waiting\"\n ? [\n <span part=\"message__processing\">{messageModel.content}</span>,\n ANIMATION_DOTS\n ]\n : [\n // \"copy button\" before \"role\" and \"time\" to hide both on button:focus\n copyButton(\n messageModel.content as string,\n \"Copy code\",\n \"common-message\"\n ),\n <p part={MESSAGE_COPIED_PART_SELECTOR}>\n message copied to clipboard\n </p>,\n <span part={`message__role ${messageModel.role}`}>\n {messageModel.role === \"user\" ? userName : assistantName}\n </span>,\n <time dateTime={messageModel.metadata} part=\"message__time\">\n {messageModel.metadata}\n </time>,\n\n messageModel.role === \"user\" ? (\n <span part=\"message__content user\">{messageModel.content}</span>\n ) : (\n <ch-markdown-viewer\n part={\n messageModel.role === \"assistant\" &&\n (messageModel.status === \"complete\" || !messageModel.status) &&\n !messageModel.parts\n ? `message__content no-error`\n : \"message__content\"\n }\n theme={theme}\n showIndicator={false}\n renderCode={mercuryCodeRender(\"Copy code\")}\n value={messageModel.content as string}\n ></ch-markdown-viewer>\n )\n ];\n"],"version":3}
|