@genexus/genexus-ide-ui 1.0.38 → 1.0.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
  2. package/dist/cjs/gx-ide-ai-assistant.cjs.entry.js +26 -16
  3. package/dist/cjs/gx-ide-ai-assistant.cjs.entry.js.map +1 -1
  4. package/dist/cjs/gx-ide-ai-message.cjs.entry.js +22 -11
  5. package/dist/cjs/gx-ide-ai-message.cjs.entry.js.map +1 -1
  6. package/dist/cjs/gx-ide-current-user-info.cjs.entry.js +42 -3
  7. package/dist/cjs/gx-ide-current-user-info.cjs.entry.js.map +1 -1
  8. package/dist/cjs/gx-ide-data-type-selector.cjs.entry.js +226 -0
  9. package/dist/cjs/gx-ide-data-type-selector.cjs.entry.js.map +1 -0
  10. package/dist/cjs/loader.cjs.js +1 -1
  11. package/dist/collection/collection-manifest.json +1 -0
  12. package/dist/collection/components/ai-assistant/ai-assistant.js +26 -35
  13. package/dist/collection/components/ai-assistant/ai-assistant.js.map +1 -1
  14. package/dist/collection/components/ai-assistant/ai-message.css +13 -11
  15. package/dist/collection/components/ai-assistant/ai-message.js +41 -13
  16. package/dist/collection/components/ai-assistant/ai-message.js.map +1 -1
  17. package/dist/collection/components/current-user-info/current-user-info.css +7 -0
  18. package/dist/collection/components/current-user-info/current-user-info.js +4 -2
  19. package/dist/collection/components/current-user-info/current-user-info.js.map +1 -1
  20. package/dist/collection/components/current-user-info/helpers.js +38 -1
  21. package/dist/collection/components/current-user-info/helpers.js.map +1 -1
  22. package/dist/collection/components/data-type-selector/data-type-selector.css +24 -0
  23. package/dist/collection/components/data-type-selector/data-type-selector.js +275 -0
  24. package/dist/collection/components/data-type-selector/data-type-selector.js.map +1 -0
  25. package/dist/collection/components/data-type-selector/gx-ide-assets/data-type-selector/langs/data-type-selector.lang.en.json +13 -0
  26. package/dist/collection/components/data-type-selector/gx-ide-assets/data-type-selector/langs/data-type-selector.lang.ja.json +13 -0
  27. package/dist/collection/components/data-type-selector/gx-ide-assets/data-type-selector/langs/data-type-selector.lang.zh.json +13 -0
  28. package/dist/collection/components/data-type-selector/helpers.js +38 -0
  29. package/dist/collection/components/data-type-selector/helpers.js.map +1 -0
  30. package/dist/collection/components/kb-manager-import/kb-manager-import.js +1 -1
  31. package/dist/collection/components/team-dev/update/update.js +1 -1
  32. package/dist/collection/testing/locale.e2e.js +1 -0
  33. package/dist/collection/testing/locale.e2e.js.map +1 -1
  34. package/dist/components/ai-message.js +23 -11
  35. package/dist/components/ai-message.js.map +1 -1
  36. package/dist/components/gx-ide-ai-assistant.js +28 -18
  37. package/dist/components/gx-ide-ai-assistant.js.map +1 -1
  38. package/dist/components/gx-ide-current-user-info.js +42 -3
  39. package/dist/components/gx-ide-current-user-info.js.map +1 -1
  40. package/dist/components/gx-ide-data-type-selector.d.ts +11 -0
  41. package/dist/components/gx-ide-data-type-selector.js +258 -0
  42. package/dist/components/gx-ide-data-type-selector.js.map +1 -0
  43. package/dist/esm/genexus-ide-ui.js +1 -1
  44. package/dist/esm/gx-ide-ai-assistant.entry.js +27 -17
  45. package/dist/esm/gx-ide-ai-assistant.entry.js.map +1 -1
  46. package/dist/esm/gx-ide-ai-message.entry.js +22 -11
  47. package/dist/esm/gx-ide-ai-message.entry.js.map +1 -1
  48. package/dist/esm/gx-ide-current-user-info.entry.js +42 -3
  49. package/dist/esm/gx-ide-current-user-info.entry.js.map +1 -1
  50. package/dist/esm/gx-ide-data-type-selector.entry.js +222 -0
  51. package/dist/esm/gx-ide-data-type-selector.entry.js.map +1 -0
  52. package/dist/esm/loader.js +1 -1
  53. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
  54. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
  55. package/dist/genexus-ide-ui/gx-ide-assets/data-type-selector/langs/data-type-selector.lang.en.json +13 -0
  56. package/dist/genexus-ide-ui/gx-ide-assets/data-type-selector/langs/data-type-selector.lang.ja.json +13 -0
  57. package/dist/genexus-ide-ui/gx-ide-assets/data-type-selector/langs/data-type-selector.lang.zh.json +13 -0
  58. package/dist/genexus-ide-ui/{p-798eb91a.entry.js → p-6e993843.entry.js} +42 -22
  59. package/dist/genexus-ide-ui/p-6e993843.entry.js.map +1 -0
  60. package/dist/genexus-ide-ui/p-a3a43593.entry.js +255 -0
  61. package/dist/genexus-ide-ui/p-a3a43593.entry.js.map +1 -0
  62. package/dist/genexus-ide-ui/{p-dd890eed.entry.js → p-c2ec8185.entry.js} +85 -46
  63. package/dist/genexus-ide-ui/p-c2ec8185.entry.js.map +1 -0
  64. package/dist/genexus-ide-ui/{p-a7dcfedd.entry.js → p-fdd9de33.entry.js} +62 -54
  65. package/dist/genexus-ide-ui/p-fdd9de33.entry.js.map +1 -0
  66. package/dist/types/components/ai-assistant/ai-assistant.d.ts +1 -6
  67. package/dist/types/components/ai-assistant/ai-message.d.ts +5 -0
  68. package/dist/types/components/current-user-info/helpers.d.ts +24 -1
  69. package/dist/types/components/data-type-selector/data-type-selector.d.ts +46 -0
  70. package/dist/types/components/data-type-selector/helpers.d.ts +4 -0
  71. package/dist/types/components.d.ts +47 -19
  72. package/package.json +2 -1
  73. package/dist/genexus-ide-ui/p-798eb91a.entry.js.map +0 -1
  74. package/dist/genexus-ide-ui/p-a7dcfedd.entry.js.map +0 -1
  75. package/dist/genexus-ide-ui/p-dd890eed.entry.js.map +0 -1
@@ -1 +1 @@
1
- {"file":"gx-ide-ai-message.entry.cjs.js","mappings":";;;;;;;;;AAAA,MAAM,YAAY,GAAG,yoIAAyoI;;ACS9pI,MAAM,SAAS,GAAGA,0BAAW,CAAC;IAC5B,QAAQ,EAAE,KAAK;IACf,IAAI,EAAE,OAAO;IACb,SAAS,EAAE,SAAS;CACrB,CAAC,CAAC;MAOU,cAAc;;;QAmBjB,aAAQ,GAAG,KAAK,CAAC;;;;QAqEjB,gBAAW,GAAG;YACpB,MAAM,WAAW,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iBAAK,KAAK,EAAC,WAAW,GAAO,CACzB,IACJ,IAAI,CACJ,CACF,CACH,EACL;KACH;;;;;;;;","names":["getIconPath","h","Locale","hiChar"],"sources":["src/components/ai-assistant/ai-message.scss?tag=gx-ide-ai-message","src/components/ai-assistant/ai-message.tsx"],"sourcesContent":["@import \"../../global/gx-ide-mixins.scss\";\n\n:host {\n font-family: var(--mer-font-family--primary);\n}\n/*--- Messages ---*/\n.message {\n color: var(--mer-color__neutral-gray--100);\n display: grid;\n grid-template-rows: 0fr;\n transition: grid-template-rows 100ms;\n transition: grid-template-rows 100ms, -ms-grid-rows 100ms;\n &__outer-wrapper {\n overflow: hidden;\n }\n &__inner-wrapper {\n padding: var(--mer-spacing--sm) var(--mer-spacing--sm);\n border-radius: var(--mer-border__radius--sm);\n border-inline-start: var(--mer-border__width--md) solid transparent;\n background-color: var(--mer-color__neutral-gray--1200);\n margin-block-start: var(--mer-spacing--xs);\n position: relative;\n }\n &__header {\n display: flex;\n gap: var(--mer-spacing--xs);\n justify-content: space-between;\n pointer-events: none;\n\n .icon-md {\n opacity: 0;\n }\n }\n &__role {\n display: inline-block;\n font-weight: var(--mer-font__weight--semi-bold);\n margin-block-end: var(--mer-spacing--xs);\n display: inline-grid;\n grid-template-columns: max-content max-content;\n gap: 6px;\n &:before {\n content: \"\";\n display: grid;\n place-self: center flex-end;\n inline-size: 4px;\n block-size: 4px;\n border-radius: 50%;\n background-color: currentcolor;\n }\n\n &--user {\n color: var(--mer-color__primary--300);\n }\n &--assistant {\n }\n &--hidden {\n display: none;\n }\n }\n &__caption {\n font-size: var(--mer-font__size--xs);\n line-height: var(--mer-line-height--regular);\n }\n &--visible {\n grid-template-rows: 1fr;\n }\n &--copying {\n pointer-events: none;\n span:not(.copied),\n .message__caption {\n color: transparent;\n -webkit-user-select: none; /* Safari */\n -ms-user-select: none; /* IE 10 and IE 11 */\n user-select: none; /* Standard syntax */\n }\n }\n /*--- Types of messages ---*/\n &--user {\n .message__inner-wrapper {\n background-color: rgba(91, 167, 255, 0.08);\n border-color: var(--mer-border-color__primary);\n }\n }\n &--assistant-action {\n .message__inner-wrapper {\n background-color: rgba(63, 168, 155, 0.05);\n border-color: var(--mer-border-color__success);\n }\n }\n &--assistant-chat {\n .message__inner-wrapper {\n background-color: var(--mer-surface__elevation--01);\n }\n }\n &--assistant-in-progress {\n color: var(--mer-color__neutral-gray--500);\n .message__inner-wrapper {\n font-style: italic;\n display: grid;\n grid-template-columns: 1fr auto;\n gap: var(--mer-spacing--xs);\n\n .message__caption {\n @include ellipsis;\n flex: 1;\n }\n .animation-wrapper {\n flex: none;\n }\n }\n }\n &--assistant-error {\n .message__inner-wrapper {\n background-color: rgba(251, 124, 132, 0.05);\n border-color: var(--mer-border-color__error);\n }\n }\n &--copyable {\n cursor: pointer;\n &:hover {\n filter: brightness(1.2);\n .icon-md {\n opacity: 1;\n }\n }\n }\n &:last-child {\n margin-block-end: 0;\n }\n}\n:host(:first-child) {\n .message {\n &__inner-wrapper {\n margin-block-end: 0;\n }\n }\n}\n\n/*--- Dot Pulse Sweet Animation ---*/\n.animation-wrapper {\n width: 45px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n$color: var(--mer-color__neutral-gray--400);\n.dot-pulse {\n position: relative;\n left: -9999px;\n width: 5px;\n height: 5px;\n border-radius: 2.5px;\n background-color: $color;\n color: $color;\n box-shadow: 9999px 0 0 -5px;\n animation: dot-pulse 1.5s infinite linear;\n animation-delay: 0.25s;\n &::before,\n &::after {\n content: \"\";\n display: inline-block;\n position: absolute;\n top: 0;\n width: 5px;\n height: 5px;\n border-radius: 2.5px;\n background-color: $color;\n color: $color;\n }\n &::before {\n box-shadow: 9984px 0 0 -5px;\n animation: dot-pulse-before 1.5s infinite linear;\n animation-delay: 0s;\n }\n &::after {\n box-shadow: 10014px 0 0 -5px;\n animation: dot-pulse-after 1.5s infinite linear;\n animation-delay: 0.5s;\n }\n}\n@keyframes dot-pulse-before {\n 0% {\n box-shadow: 9984px 0 0 -5px;\n }\n 30% {\n box-shadow: 9984px 0 0 2px;\n }\n 60%,\n 100% {\n box-shadow: 9984px 0 0 -5px;\n }\n}\n@keyframes dot-pulse {\n 0% {\n box-shadow: 9999px 0 0 -5px;\n }\n 30% {\n box-shadow: 9999px 0 0 2px;\n }\n 60%,\n 100% {\n box-shadow: 9999px 0 0 -5px;\n }\n}\n@keyframes dot-pulse-after {\n 0% {\n box-shadow: 10014px 0 0 -5px;\n }\n 30% {\n box-shadow: 10014px 0 0 2px;\n }\n 60%,\n 100% {\n box-shadow: 10014px 0 0 -5px;\n }\n}\n\n/*--- Copy Message ---*/\n.copied {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--mer-color__neutral-gray--300);\n display: flex;\n gap: var(--mer-spacing--xs);\n opacity: 0;\n animation: fadeIn var(--mer-timing--fast) ease-out forwards;\n}\n\n@keyframes fadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n@include hiChar;\n","/* STENCIL IMPORTS */\nimport { Component, h, Prop, Element, State } from \"@stencil/core\";\n/* OTHER LIBRARIES IMPORTS */\nimport { getIconPath } from \"@genexus/mercury\";\n/* CUSTOM IMPORTS */\nimport { Locale } from \"../../common/locale\";\nimport { MessageType } from \"./ai-assistant\";\nimport { hiChar } from \"../../common/helpers\";\n\nconst COPY_ICON = getIconPath({\n category: \"bpm\",\n name: \"tasks\",\n colorType: \"neutral\"\n});\n@Component({\n tag: \"gx-ide-ai-message\",\n styleUrl: \"ai-message.scss\",\n shadow: false,\n assetsDirs: [\"gx-ide-assets/ai-message\"]\n})\nexport class GxIdeAiMessage {\n /*\nINDEX:\n1.OWN PROPERTIES \n2.REFERENCE TO ELEMENTS\n3.STATE() VARIABLES\n4.PUBLIC PROPERTY API | WATCH'S\n5.EVENTS (EMIT)\n6.COMPONENT LIFECYCLE METHODS\n7.LISTENERS\n8.PUBLIC METHODS API\n9.LOCAL METHODS\n10.RENDER() FUNCTION\n*/\n\n // 1.OWN PROPERTIES //\n\n /* The message allows to be copied*/\n private _componentLocale: any;\n private copyable = false;\n\n // 2. REFERENCE TO ELEMENTS //\n\n @Element() el: HTMLGxIdeAiMessageElement;\n\n // 3.STATE() VARIABLES //\n\n /**\n * This wil display the message if true\n */\n @State() visible = false;\n\n /**\n * This wil show the user a text, indicating that the message has been copied\n */\n @State() showCopiedMessage = false;\n\n // 4.PUBLIC PROPERTY API | WATCH'S //\n\n /**\n * The actual message\n */\n @Prop() readonly message: string;\n\n /**\n * The message type\n */\n @Prop() readonly messageType: MessageType;\n\n /**\n * The filter value\n */\n @Prop() readonly filterValue: string;\n\n /**\n * It hides the message (used for the filter)\n */\n @Prop() readonly hidden: boolean;\n\n /**\n * An object with the needed string translations.\n */\n @Prop() readonly translations: Translations;\n\n // 5.EVENTS (EMIT) //\n\n // 6.COMPONENT LIFECYCLE METHODS //\n\n async componentWillLoad() {\n this._componentLocale = await Locale.getComponentStrings(this.el);\n this.evaluateMessageIsCopyable();\n }\n\n componentDidRender() {\n setTimeout(() => {\n /* Without the timeout it appears instantly (no apparent transition)*/\n this.visible = true;\n const messagesList = this.el.parentElement;\n messagesList.scrollTo(0, 0);\n }, 0);\n }\n\n // 7.LISTENERS //\n\n // 8.PUBLIC METHODS API //\n\n // 9.LOCAL METHODS //\n\n private copyMessage = () => {\n const messageInfo = JSON.stringify(\n {\n messageType: this.messageType,\n message: this.message\n },\n null,\n 2\n );\n\n navigator.clipboard.writeText(messageInfo);\n this.showCopiedMessage = true;\n setTimeout(() => {\n this.showCopiedMessage = false;\n }, 1500);\n };\n\n private evaluateMessageIsCopyable = () => {\n this.copyable = this.messageType !== \"assistant-in-progress\";\n };\n\n private evaluateCopyIcon = () => {\n return this.copyable ? (\n <ch-image class=\"icon-md\" src={COPY_ICON}></ch-image>\n ) : null;\n };\n\n // 10.RENDER() FUNCTION //\n\n render() {\n return (\n <li\n class={{\n \"message\": true,\n \"message--visible\": this.visible && !this.hidden,\n [`message--${[this.messageType]}`]: true,\n \"message--assistant\": this.messageType !== \"user\",\n \"message--copyable\": this.copyable,\n \"message--copying\": this.showCopiedMessage\n }}\n onClick={this.copyable && this.copyMessage}\n >\n <div class=\"message__outer-wrapper\">\n <div\n class={{\n \"message__inner-wrapper\": true\n }}\n >\n {this.messageType === \"user\" ? (\n <div class=\"message__header\">\n <span class=\"message__role message__role--user\">\n {this._componentLocale.you}\n </span>\n {this.evaluateCopyIcon()}\n </div>\n ) : (\n <div class=\"message__header\">\n <span\n class={{\n \"message__role\":\n this.messageType !== \"assistant-in-progress\",\n \"message__role--hidden\":\n this.messageType === \"assistant-in-progress\",\n \"message__role--assistant\": true\n }}\n >\n {this._componentLocale.assistant}\n </span>\n {this.evaluateCopyIcon()}\n </div>\n )}\n <div\n class={{\n \"message__caption\": true,\n \"message__caption--in-progress\":\n this.messageType === \"assistant-in-progress\"\n }}\n >\n {this.showCopiedMessage ? (\n <span class=\"copied\">\n <ch-image class=\"icon-md\" src={COPY_ICON}></ch-image>\n {this.translations[\"copied\"]}\n </span>\n ) : null}\n {hiChar(this.message, this.filterValue)}\n </div>\n {this.messageType === \"assistant-in-progress\" ? (\n <div class=\"animation-wrapper\">\n <div class=\"dot-pulse\"></div>\n </div>\n ) : null}\n </div>\n </div>\n </li>\n );\n }\n}\n\nexport type Translations = {\n [key: string]: string;\n};\n"],"version":3}
1
+ {"file":"gx-ide-ai-message.entry.cjs.js","mappings":";;;;;;;;;AAAA,MAAM,YAAY,GAAG,grIAAgrI;;;;;;;;;;ACQrsI,MAAM,SAAS,GAAGA,0BAAW,CAAC;IAC5B,QAAQ,EAAE,KAAK;IACf,IAAI,EAAE,OAAO;IACb,SAAS,EAAE,SAAS;CACrB,CAAC,CAAC;MAQU,cAAc;;;QAGjB,aAAQ,GAAG,KAAK,CAAC;QA0DjB,gBAAW,GAAG;YACpB,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,CAChC;gBACE,WAAW,EAAE,IAA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QAAQ,IAClBA,sBAAU,KAAK,EAAC,SAAS,EAAC,GAAG,EAAE,SAAS,GAAa,EACpD,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CACvB,IACL,IAAI,EACPE,cAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,CACnC,EACL,IAAI,CAAC,WAAW,KAAK,uBAAuB,IAC3CF,iBAAK,KAAK,EAAC,mBAAmB,IAC5BA,iBAAK,KAAK,EAAC,WAAW,GAAO,CACzB,IACJ,IAAI,CACJ,CACF,CACH,EACL;KACH;;;;;;;;;","names":["getIconPath","h","Locale","hiChar"],"sources":["src/components/ai-assistant/ai-message.scss?tag=gx-ide-ai-message","src/components/ai-assistant/ai-message.tsx"],"sourcesContent":["@import \"../../global/gx-ide-mixins.scss\";\n\n:host {\n font-family: var(--mer-font-family--primary);\n}\n/*--- Messages ---*/\n.message {\n color: var(--mer-color__neutral-gray--100);\n display: grid;\n grid-template-rows: 0fr;\n transition: grid-template-rows 100ms;\n transition: grid-template-rows 100ms, -ms-grid-rows 100ms;\n &__outer-wrapper {\n overflow: hidden;\n }\n &__inner-wrapper {\n padding: var(--mer-spacing--sm) var(--mer-spacing--sm);\n border-radius: var(--mer-border__radius--sm);\n border-inline-start: var(--mer-border__width--md) solid transparent;\n background-color: var(--mer-color__neutral-gray--1200);\n margin-block-start: var(--mer-spacing--xs);\n position: relative;\n }\n &__header {\n display: flex;\n gap: var(--mer-spacing--xs);\n justify-content: space-between;\n\n .icon-md {\n opacity: 0;\n }\n\n &--in-progress {\n display: contents;\n }\n }\n &__role {\n &:before {\n content: \"\";\n display: grid;\n place-self: center flex-end;\n inline-size: 4px;\n block-size: 4px;\n border-radius: 50%;\n background-color: currentcolor;\n }\n\n font-weight: var(--mer-font__weight--semi-bold);\n margin-block-end: var(--mer-spacing--xs);\n display: inline-grid;\n grid-template-columns: max-content 1fr;\n gap: 8px;\n\n &-description {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n display: inline-block;\n padding-block-start: 2px;\n }\n &--user {\n color: var(--mer-color__primary--300);\n }\n &--assistant {\n }\n &--hidden {\n display: none;\n }\n }\n &__caption {\n font-size: var(--mer-font__size--xs);\n line-height: var(--mer-line-height--regular);\n }\n &--visible {\n grid-template-rows: 1fr;\n }\n &--copying {\n pointer-events: none;\n span:not(.copied),\n .message__caption {\n color: transparent;\n -webkit-user-select: none; /* Safari */\n -ms-user-select: none; /* IE 10 and IE 11 */\n user-select: none; /* Standard syntax */\n }\n }\n /*--- Types of messages ---*/\n &--user {\n .message__inner-wrapper {\n background-color: rgba(91, 167, 255, 0.08);\n border-color: var(--mer-border-color__primary);\n }\n }\n &--assistant-action {\n .message__inner-wrapper {\n background-color: rgba(63, 168, 155, 0.05);\n border-color: var(--mer-border-color__success);\n }\n }\n &--assistant-chat {\n .message__inner-wrapper {\n background-color: var(--mer-surface__elevation--01);\n }\n }\n &--assistant-in-progress {\n color: var(--mer-color__neutral-gray--500);\n .message__inner-wrapper {\n font-style: italic;\n display: grid;\n grid-template-columns: 1fr auto;\n gap: var(--mer-spacing--xs);\n\n .message__caption {\n flex: 1;\n }\n .animation-wrapper {\n flex: none;\n }\n }\n }\n &--assistant-error {\n .message__inner-wrapper {\n background-color: rgba(251, 124, 132, 0.05);\n border-color: var(--mer-border-color__error);\n }\n }\n &--copyable {\n &:hover {\n filter: brightness(1.2);\n .icon-md {\n opacity: 1;\n }\n }\n }\n &:last-child {\n margin-block-end: 0;\n }\n}\n:host(:first-child) {\n .message {\n &__inner-wrapper {\n margin-block-end: 0;\n }\n }\n}\n\n/*--- Dot Pulse Sweet Animation ---*/\n.animation-wrapper {\n width: 45px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n$color: var(--mer-color__neutral-gray--400);\n.dot-pulse {\n position: relative;\n left: -9999px;\n width: 5px;\n height: 5px;\n border-radius: 2.5px;\n background-color: $color;\n color: $color;\n box-shadow: 9999px 0 0 -5px;\n animation: dot-pulse 1.5s infinite linear;\n animation-delay: 0.25s;\n &::before,\n &::after {\n content: \"\";\n display: inline-block;\n position: absolute;\n top: 0;\n width: 5px;\n height: 5px;\n border-radius: 2.5px;\n background-color: $color;\n color: $color;\n }\n &::before {\n box-shadow: 9984px 0 0 -5px;\n animation: dot-pulse-before 1.5s infinite linear;\n animation-delay: 0s;\n }\n &::after {\n box-shadow: 10014px 0 0 -5px;\n animation: dot-pulse-after 1.5s infinite linear;\n animation-delay: 0.5s;\n }\n}\n@keyframes dot-pulse-before {\n 0% {\n box-shadow: 9984px 0 0 -5px;\n }\n 30% {\n box-shadow: 9984px 0 0 2px;\n }\n 60%,\n 100% {\n box-shadow: 9984px 0 0 -5px;\n }\n}\n@keyframes dot-pulse {\n 0% {\n box-shadow: 9999px 0 0 -5px;\n }\n 30% {\n box-shadow: 9999px 0 0 2px;\n }\n 60%,\n 100% {\n box-shadow: 9999px 0 0 -5px;\n }\n}\n@keyframes dot-pulse-after {\n 0% {\n box-shadow: 10014px 0 0 -5px;\n }\n 30% {\n box-shadow: 10014px 0 0 2px;\n }\n 60%,\n 100% {\n box-shadow: 10014px 0 0 -5px;\n }\n}\n\n/*--- Copy Message ---*/\n.copied {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--mer-color__neutral-gray--300);\n display: flex;\n gap: var(--mer-spacing--xs);\n opacity: 0;\n animation: fadeIn var(--mer-timing--regular) ease-out forwards;\n}\n\n@keyframes fadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n@include hiChar;\n","import { Component, h, Prop, Element, State } from \"@stencil/core\";\n\nimport { getIconPath } from \"@genexus/mercury\";\n\nimport { Locale } from \"../../common/locale\";\nimport { MessageType } from \"./ai-assistant\";\nimport { hiChar } from \"../../common/helpers\";\n\nconst COPY_ICON = getIconPath({\n category: \"bpm\",\n name: \"tasks\",\n colorType: \"neutral\"\n});\n\n@Component({\n tag: \"gx-ide-ai-message\",\n styleUrl: \"ai-message.scss\",\n shadow: false,\n assetsDirs: [\"gx-ide-assets/ai-message\"]\n})\nexport class GxIdeAiMessage {\n /* The message allows to be copied*/\n private _componentLocale: any;\n private copyable = false;\n\n @Element() el: HTMLGxIdeAiMessageElement;\n\n /**\n * This wil display the message if true\n */\n @State() visible = false;\n\n /**\n * This wil show the user a text, indicating that the message has been copied\n */\n @State() showCopiedMessage = false;\n\n /**\n * A reference to the gx-ide-ai-assistant host element\n */\n @Prop() readonly aiAssistantHostRef: HTMLGxIdeAiAssistantElement;\n\n /**\n * The actual message\n */\n @Prop() readonly message: string;\n\n /**\n * The message type\n */\n @Prop() readonly messageType: MessageType;\n\n /**\n * The filter value\n */\n @Prop() readonly filterValue: string;\n\n /**\n * It hides the message (used for the filter)\n */\n @Prop() readonly hidden: boolean;\n\n /**\n * An object with the needed string translations.\n */\n @Prop() readonly translations: Translations;\n\n async componentWillLoad() {\n this._componentLocale = await Locale.getComponentStrings(this.el);\n this.evaluateMessageIsCopyable();\n }\n\n componentDidRender() {\n setTimeout(() => {\n /* Without the timeout it appears instantly (no apparent transition)*/\n this.visible = true;\n const messagesList = this.el.parentElement;\n messagesList.scrollTo(0, 0);\n }, 0);\n }\n\n private copyMessage = () => {\n const messageInfo = JSON.stringify(\n {\n messageType: this.messageType,\n message: this.message\n },\n null,\n 2\n );\n\n navigator.clipboard.writeText(messageInfo);\n this.showCopiedMessage = true;\n setTimeout(() => {\n this.showCopiedMessage = false;\n }, 1500);\n };\n\n #buttonMouseDownHandler = (e: MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n };\n\n private evaluateMessageIsCopyable = () => {\n this.copyable = this.messageType !== \"assistant-in-progress\";\n };\n\n private evaluateCopyIcon = () => {\n return this.copyable ? (\n <button\n class=\"button-tertiary button-icon-only\"\n aria-label=\"copy\"\n onClick={this.copyMessage}\n onMouseDown={this.#buttonMouseDownHandler}\n >\n <ch-image class=\"icon-md\" src={COPY_ICON}></ch-image>\n </button>\n ) : null;\n };\n\n render() {\n return (\n <li\n class={{\n \"message\": true,\n \"message--visible\": this.visible && !this.hidden,\n [`message--${[this.messageType]}`]: true,\n \"message--assistant\": this.messageType !== \"user\",\n \"message--copyable\": this.copyable,\n \"message--copying\": this.showCopiedMessage\n }}\n >\n <div class=\"message__outer-wrapper\">\n <div\n class={{\n \"message__inner-wrapper\": true\n }}\n >\n {this.messageType === \"user\" ? (\n <div class=\"message__header\">\n <span class=\"message__role message__role--user\">\n <span class=\"message__role-description\">\n {this._componentLocale.you}\n </span>\n </span>\n {this.evaluateCopyIcon()}\n </div>\n ) : (\n <div\n class={{\n \"message__header\": true,\n \"message__header--in-progress\":\n this.messageType === \"assistant-in-progress\"\n }}\n >\n <span\n class={{\n \"message__role\":\n this.messageType !== \"assistant-in-progress\",\n \"message__role--hidden\":\n this.messageType === \"assistant-in-progress\",\n \"message__role--assistant\": true\n }}\n >\n <span class=\"message__role-description\">\n {this._componentLocale.assistant}\n </span>\n </span>\n {this.evaluateCopyIcon()}\n </div>\n )}\n <div\n class={{\n \"message__caption\": true,\n \"message__caption--in-progress\":\n this.messageType === \"assistant-in-progress\"\n }}\n >\n {this.showCopiedMessage ? (\n <span class=\"copied\">\n <ch-image class=\"icon-md\" src={COPY_ICON}></ch-image>\n {this.translations[\"copied\"]}\n </span>\n ) : null}\n {hiChar(this.message, this.filterValue)}\n </div>\n {this.messageType === \"assistant-in-progress\" ? (\n <div class=\"animation-wrapper\">\n <div class=\"dot-pulse\"></div>\n </div>\n ) : null}\n </div>\n </div>\n </li>\n );\n }\n}\n\nexport type Translations = {\n [key: string]: string;\n};\n"],"version":3}
@@ -6,8 +6,22 @@ const index = require('./index-caaa95cf.js');
6
6
  const MERCURY_ASSETS = require('./MERCURY_ASSETS-b23e31e2.js');
7
7
  const locale = require('./locale-ff30a5f3.js');
8
8
 
9
+ /**
10
+ * Returns initials from the first two words of a name. Returns "X" for invalid input.
11
+ *
12
+ * @param name - The full name string.
13
+ * @returns Initials of the first two words, or "X" if invalid.
14
+ *
15
+ * Example:
16
+ * getInitialsFromName("John Doe") -> "JD"
17
+ * getInitialsFromName("Jane") -> "J"
18
+ * getInitialsFromName("") -> "X"
19
+ */
9
20
  const getInitialsFromName = (name) => {
10
- const nameData = name.split(" ");
21
+ if (typeof name !== "string" || name.trim() === "") {
22
+ return "X";
23
+ }
24
+ const nameData = name.split(" ").filter(Boolean); // Remove any empty strings from splitting
11
25
  if (nameData.length === 1) {
12
26
  return nameData[0][0].toUpperCase();
13
27
  }
@@ -15,8 +29,31 @@ const getInitialsFromName = (name) => {
15
29
  return `${nameData[0][0].toUpperCase()}${nameData[1][0].toUpperCase()}`;
16
30
  }
17
31
  };
32
+ /**
33
+ * Limits the full name to the first two words. Returns null for invalid input.
34
+ *
35
+ * @param fullName - The full name string to be limited.
36
+ * @returns The first two words of the full name, or null if invalid.
37
+ *
38
+ * Example:
39
+ * limitFullName("John Doe Smith") -> "John Doe"
40
+ * limitFullName("Jane") -> "Jane"
41
+ * limitFullName("") -> null
42
+ */
43
+ const limitFullName = (fullName) => {
44
+ if (typeof fullName !== "string" || fullName.trim() === "") {
45
+ return null;
46
+ }
47
+ const fullNameData = fullName.split(" ").filter(Boolean); // Remove any empty strings from splitting
48
+ if (fullNameData.length === 1) {
49
+ return fullNameData[0];
50
+ }
51
+ else {
52
+ return `${fullNameData[0]} ${fullNameData[1]}`;
53
+ }
54
+ };
18
55
 
19
- const currentUserInfoCss = "@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}:host{display:inline-grid;justify-items:end;block-size:100%}.user-login__button{all:unset;display:grid;grid-template-columns:max-content max-content max-content;align-items:center;gap:var(--mer-spacing--sm);block-size:auto;cursor:pointer}.user-login__details{display:grid;grid-template-rows:max-content max-content;gap:var(--mer-spacing--3xs);justify-items:end}.user-login__name{font-weight:var(--mer-font__weight--medium);font-size:var(--mer-font__size--3xs);color:var(--mer-text__on-elevation)}.user-login__organization{font-weight:var(--mer-font__weight--light);font-size:var(--mer-font__size--4xs);color:var(--mer-text__neutral)}.user-login__avatar{font-size:9px;flex:0 0 auto;display:flex;align-items:center;justify-content:center;block-size:var(--mer-spacing--lg);inline-size:var(--mer-spacing--lg);color:var(--mer-text__on-elevation);border-radius:50%;background-color:var(--mer-color__tinted-primary--10);border:var(--mer-border__width--sm) solid var(--mer-color__primary--200)}.privacy-policy{text-decoration:underline;cursor:pointer}";
56
+ const currentUserInfoCss = "@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}:host{display:inline-grid;justify-items:end;block-size:100%}.user-login__button{all:unset;display:grid;grid-template-columns:max-content max-content max-content;align-items:center;gap:var(--mer-spacing--sm);block-size:auto;cursor:pointer}.user-login__details{display:grid;grid-template-rows:max-content max-content;gap:var(--mer-spacing--3xs);justify-items:end}.user-login__name{font-weight:var(--mer-font__weight--medium);font-size:var(--mer-font__size--3xs);color:var(--mer-text__on-elevation)}.user-login__organization{font-weight:var(--mer-font__weight--light);font-size:var(--mer-font__size--4xs);color:var(--mer-text__neutral)}.user-login__name,.user-login__organization{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-inline-size:120px;display:inline-block}.user-login__avatar{font-size:9px;flex:0 0 auto;display:flex;align-items:center;justify-content:center;block-size:var(--mer-spacing--lg);inline-size:var(--mer-spacing--lg);color:var(--mer-text__on-elevation);border-radius:50%;background-color:var(--mer-color__tinted-primary--10);border:var(--mer-border__width--sm) solid var(--mer-color__primary--200)}.privacy-policy{text-decoration:underline;cursor:pointer}";
20
57
 
21
58
  var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
22
59
  if (kind === "m")
@@ -120,7 +157,9 @@ const GxIdeNewEnvironment = class {
120
157
  ], "f");
121
158
  }
122
159
  render() {
123
- return (index.h(index.Host, { class: "widget" }, index.h("ch-theme", { model: CSS_BUNDLES }), index.h("ch-dropdown-render", { class: "dropdown", model: __classPrivateFieldGet(this, _GxIdeNewEnvironment_menuDropdownModel, "f"), position: "InsideEnd_OutsideEnd", itemClickCallback: __classPrivateFieldGet(this, _GxIdeNewEnvironment_dropDownitemClickHandler, "f") }, index.h("button", { class: "user-login__button", ref: el => (__classPrivateFieldSet(this, _GxIdeNewEnvironment_userLoginButton, el, "f")), slot: "action" }, index.h("div", { class: "user-login__details" }, index.h("span", { class: "user-login__name" }, this.userInfo.name), index.h("span", { class: "user-login__organization" }, this.userInfo.team)), index.h("div", { class: "user-login__avatar" }, __classPrivateFieldGet(this, _GxIdeNewEnvironment_initials, "f")), index.h("ch-image", { src: CHEVRON_DOWN_ICON, class: "icon-md", containerRef: __classPrivateFieldGet(this, _GxIdeNewEnvironment_userLoginButton, "f") })), index.h("div", { class: "user-login__footer footer-slot", slot: "footer" }, index.h("p", { class: "text-body-regular-s privacy-policy", onClick: this.showTermsCallback }, __classPrivateFieldGet(this, _GxIdeNewEnvironment_componentLocale, "f").privacyAndTerms)))));
160
+ var _a, _b;
161
+ const userName = limitFullName((_a = this.userInfo) === null || _a === void 0 ? void 0 : _a.name);
162
+ return (index.h(index.Host, { class: "widget" }, index.h("ch-theme", { model: CSS_BUNDLES }), index.h("ch-dropdown-render", { class: "dropdown", model: __classPrivateFieldGet(this, _GxIdeNewEnvironment_menuDropdownModel, "f"), position: "InsideEnd_OutsideEnd", itemClickCallback: __classPrivateFieldGet(this, _GxIdeNewEnvironment_dropDownitemClickHandler, "f") }, index.h("button", { class: "user-login__button", ref: el => (__classPrivateFieldSet(this, _GxIdeNewEnvironment_userLoginButton, el, "f")), slot: "action" }, index.h("div", { class: "user-login__details" }, userName ? (index.h("span", { class: "user-login__name" }, userName)) : null, ((_b = this.userInfo) === null || _b === void 0 ? void 0 : _b.team) ? (index.h("span", { class: "user-login__organization" }, this.userInfo.team)) : null), index.h("div", { class: "user-login__avatar" }, __classPrivateFieldGet(this, _GxIdeNewEnvironment_initials, "f")), index.h("ch-image", { src: CHEVRON_DOWN_ICON, class: "icon-md", containerRef: __classPrivateFieldGet(this, _GxIdeNewEnvironment_userLoginButton, "f") })), index.h("div", { class: "user-login__footer footer-slot", slot: "footer" }, index.h("p", { class: "text-body-regular-s privacy-policy", onClick: this.showTermsCallback }, __classPrivateFieldGet(this, _GxIdeNewEnvironment_componentLocale, "f").privacyAndTerms)))));
124
163
  }
125
164
  static get assetsDirs() { return ["gx-ide-assets/current-user-info"]; }
126
165
  get el() { return index.getElement(this); }
@@ -1 +1 @@
1
- {"file":"gx-ide-current-user-info.entry.cjs.js","mappings":";;;;;;;;AAAO,MAAM,mBAAmB,GAAG,CAAC,IAAY;IAC9C,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACjC,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;QACzB,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;KACrC;SAAM;QACL,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC;KACzE;AACH,CAAC;;ACPD,MAAM,kBAAkB,GAAG,8lCAA8lC;;;;;;;;;;;;;;;;;;;ACSznC,MAAM,WAAW,GAAmB;;IAElC,mBAAmB;IACnB,oBAAoB;IACpB,mBAAmB;IACnB,iBAAiB;IACjB,qBAAqB;IACrB,cAAc;IACd,kBAAkB;IAClB,eAAe;IACf,qBAAqB;CACtB,CAAC;AAEF,MAAM,iBAAiB,GAAGA,0BAAW,CAAC;IACpC,QAAQ,EAAE,YAAY;IACtB,IAAI,EAAE,cAAc;IACpB,SAAS,EAAE,SAAS;CACrB,CAAC,CAAC;AAEH,MAAM,aAAa,GAAG,YAAY,CAAC;AACnC,MAAM,cAAc,GAAG,aAAa,CAAC;AACrC,MAAM,WAAW,GAAG,UAAU,CAAC;AAC/B,MAAM,WAAW,GAAG,UAAU,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Aa,EACzCA,gCACE,KAAK,EAAC,UAAU,EAChB,KAAK,EAAE,uBAAA,IAAI,8CAAmB,EAC9B,QAAQ,EAAC,sBAAsB,EAC/B,iBAAiB,EAAE,uBAAA,IAAI,qDAA0B,IAEjDA,oBACE,KAAK,EAAC,oBAAoB,EAC1B,GAAG,EAAE,EAAE,KAAK,uBAAA,IAAI,wCAAoB,EAAuB,MAAA,CAAC,EAC5D,IAAI,EAAC,QAAQ,IAEbA,iBAAK,KAAK,EAAC,qBAAqB,IAC9BA,kBAAM,KAAK,EAAC,kBAAkB,IAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAQ,EAC1DA,kBAAM,KAAK,EAAC,0BAA0B,IAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAQ,CAC9D,EACNA,iBAAK,KAAK,EAAC,oBAAoB,IAAE,uBAAA,IAAI,qCAAU,CAAO,EACtDA,sBACE,GAAG,EAAE,iBAAiB,EACtB,KAAK,EAAC,SAAS,EACf,YAAY,EAAE,uBAAA,IAAI,4CAAiB,GACzB,CACL,EACTA,iBAAK,KAAK,EAAC,gCAAgC,EAAC,IAAI,EAAC,QAAQ,IACvDA,eACE,KAAK,EAAC,oCAAoC,EAC1C,OAAO,EAAE,IAAI,CAAC,iBAAiB,IAE9B,uBAAA,IAAI,4CAAiB,CAAC,eAAe,CACpC,CACA,CACa,CAChB,EACP;KACH;;;;;;;;;","names":["getIconPath","Locale","h","Host"],"sources":["src/components/current-user-info/helpers.tsx","src/components/current-user-info/current-user-info.scss?tag=gx-ide-current-user-info&encapsulation=shadow","src/components/current-user-info/current-user-info.tsx"],"sourcesContent":["export const getInitialsFromName = (name: string): string => {\n const nameData = name.split(\" \");\n if (nameData.length === 1) {\n return nameData[0][0].toUpperCase();\n } else {\n return `${nameData[0][0].toUpperCase()}${nameData[1][0].toUpperCase()}`;\n }\n};\n","@import \"../../../node_modules/@genexus/mercury/dist/mercury.scss\";\n\n:host {\n display: inline-grid;\n justify-items: end;\n block-size: 100%;\n}\n\n.user-login {\n &__button {\n all: unset;\n display: grid;\n grid-template-columns: max-content max-content max-content;\n align-items: center;\n gap: var(--mer-spacing--sm);\n block-size: auto;\n cursor: pointer;\n }\n &__details {\n display: grid;\n grid-template-rows: max-content max-content;\n gap: var(--mer-spacing--3xs);\n justify-items: end;\n }\n &__name {\n font-weight: var(--mer-font__weight--medium);\n font-size: var(--mer-font__size--3xs);\n color: var(--mer-text__on-elevation);\n }\n &__organization {\n font-weight: var(--mer-font__weight--light);\n font-size: var(--mer-font__size--4xs);\n color: var(--mer-text__neutral);\n }\n &__avatar {\n font-size: 9px;\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n block-size: var(--mer-spacing--lg);\n inline-size: var(--mer-spacing--lg);\n color: var(--mer-text__on-elevation);\n border-radius: 50%;\n background-color: var(--mer-color__tinted-primary--10);\n border: var(--mer-border__width--sm) solid var(--mer-color__primary--200);\n }\n}\n\n.privacy-policy {\n text-decoration: underline;\n cursor: pointer;\n}\n","/* STENCIL IMPORTS */\nimport { Component, Element, Host, Prop, State, h } from \"@stencil/core\";\n\nimport { getIconPath, MercuryBundles } from \"@genexus/mercury\";\n\nimport { Locale } from \"../../common/locale\";\nimport { getInitialsFromName } from \"./helpers\";\nimport { DropdownModel } from \"@genexus/chameleon-controls-library\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n // TODO: review if \"utils/form--full\" is required.\n \"resets/box-sizing\",\n \"components/tooltip\",\n \"components/toggle\",\n \"components/icon\",\n \"components/dropdown\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst CHEVRON_DOWN_ICON = getIconPath({\n category: \"navigation\",\n name: \"chevron-down\",\n colorType: \"neutral\"\n});\n\nconst MY_ACCOUNT_ID = \"my-account\";\nconst CHANGE_TEAM_ID = \"change-team\";\nconst SIGN_OUT_ID = \"sign-out\";\nconst LANGUAGE_ID = \"language\";\n\n@Component({\n tag: \"gx-ide-current-user-info\",\n styleUrl: \"current-user-info.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/current-user-info\"]\n})\nexport class GxIdeNewEnvironment {\n #componentLocale: any;\n #initials: string = \"\";\n // #mode: Mode;\n #menuDropdownModel: DropdownModel;\n\n @Element() el: HTMLGxIdeCurrentUserInfoElement;\n #userLoginButton: HTMLButtonElement;\n\n @State() showMenu: boolean = false;\n\n /**\n * User data\n */\n @Prop() readonly userInfo: UserInfo;\n\n /**\n * Callback executed when the user click \"My Account\" link\n */\n @Prop() readonly myAccountCallback!: () => Promise<void>;\n\n /**\n * Callback executed when the user click \"change team\" link\n */\n @Prop() readonly changeTeamCallback!: () => Promise<void>;\n\n /**\n * Callback executed when the user click \"Language\" link\n */\n @Prop() readonly changeLanguageCallback!: () => Promise<void>;\n\n /**\n * Callback executed when the user switch the \"Mode\" status\n */\n @Prop() readonly changeModeCallback!: (mode: Mode) => Promise<void>;\n\n /**\n * Callback executed when the user click \"Sign Out\" link\n */\n @Prop() readonly signOutCallback!: () => Promise<void>;\n\n /**\n * Callback executed when the user click \"Privacy Policy & Terms of use\" link\n */\n @Prop() readonly showTermsCallback!: () => Promise<void>;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n this.#initials = getInitialsFromName(this.userInfo.name);\n this.#menuDropdownModel = [\n {\n id: MY_ACCOUNT_ID,\n caption: this.#componentLocale.myAccountLabel,\n showSeparator: false\n },\n {\n id: CHANGE_TEAM_ID,\n caption: this.#componentLocale.changeTeamLabel,\n showSeparator: false\n },\n {\n id: SIGN_OUT_ID,\n caption: this.#componentLocale.signOutLabel,\n showSeparator: true\n }\n // {\n // id: LANGUAGE_ID,\n // caption: this.#componentLocale.languageLabel,\n // showSeparator: true\n // }\n ];\n }\n\n // #handleModeSwitch = () => {\n // this.#mode = this.#mode === \"dark\" ? \"light\" : \"dark\";\n // if (this.changeModeCallback) {\n // this.changeModeCallback(this.#mode);\n // }\n // };\n\n #dropDownitemClickHandler = (\n _event: UIEvent,\n _target: string,\n itemId: string\n ): void => {\n if (itemId === MY_ACCOUNT_ID) {\n this.myAccountCallback();\n } else if (itemId === CHANGE_TEAM_ID) {\n this.changeTeamCallback();\n } else if (itemId === SIGN_OUT_ID) {\n this.signOutCallback();\n } else if (itemId === LANGUAGE_ID) {\n this.changeLanguageCallback();\n }\n };\n\n render() {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <ch-dropdown-render\n class=\"dropdown\"\n model={this.#menuDropdownModel}\n position=\"InsideEnd_OutsideEnd\"\n itemClickCallback={this.#dropDownitemClickHandler}\n >\n <button\n class=\"user-login__button\"\n ref={el => (this.#userLoginButton = el as HTMLButtonElement)}\n slot=\"action\"\n >\n <div class=\"user-login__details\">\n <span class=\"user-login__name\">{this.userInfo.name}</span>\n <span class=\"user-login__organization\">{this.userInfo.team}</span>\n </div>\n <div class=\"user-login__avatar\">{this.#initials}</div>\n <ch-image\n src={CHEVRON_DOWN_ICON}\n class=\"icon-md\"\n containerRef={this.#userLoginButton}\n ></ch-image>\n </button>\n <div class=\"user-login__footer footer-slot\" slot=\"footer\">\n <p\n class=\"text-body-regular-s privacy-policy\"\n onClick={this.showTermsCallback}\n >\n {this.#componentLocale.privacyAndTerms}\n </p>\n </div>\n </ch-dropdown-render>\n </Host>\n );\n }\n}\n\nexport type UserInfo = {\n name: string;\n team: string;\n};\n\nexport type Mode = \"dark\" | \"light\";\n"],"version":3}
1
+ {"file":"gx-ide-current-user-info.entry.cjs.js","mappings":";;;;;;;;AAAA;;;;;;;;;;;AAWO,MAAM,mBAAmB,GAAG,CAAC,IAAY;IAC9C,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;QAClD,OAAO,GAAG,CAAC;KACZ;IAED,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;I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,aAAa,CAAC,MAAA,IAAI,CAAC,QAAQ,0CAAE,IAAI,CAAC,CAAC;QACpD,QACEC,QAACC,UAAI,IAAC,KAAK,EAAC,QAAQ,IAClBD,sBAAU,KAAK,EAAE,WAAW,GAAa,EACzCA,gCACE,KAAK,EAAC,UAAU,EAChB,KAAK,EAAE,uBAAA,IAAI,8CAAmB,EAC9B,QAAQ,EAAC,sBAAsB,EAC/B,iBAAiB,EAAE,uBAAA,IAAI,qDAA0B,IAEjDA,oBACE,KAAK,EAAC,oBAAoB,EAC1B,GAAG,EAAE,EAAE,KAAK,uBAAA,IAAI,wCAAoB,EAAuB,MAAA,CAAC,EAC5D,IAAI,EAAC,QAAQ,IAEbA,iBAAK,KAAK,EAAC,qBAAqB,IAC7B,QAAQ,IACPA,kBAAM,KAAK,EAAC,kBAAkB,IAAE,QAAQ,CAAQ,IAC9C,IAAI,EACP,CAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,IAAI,KAClBA,kBAAM,KAAK,EAAC,0BAA0B,IACnC,IAAI,CAAC,QAAQ,CAAC,IAAI,CACd,IACL,IAAI,CACJ,EAENA,iBAAK,KAAK,EAAC,oBAAoB,IAAE,uBAAA,IAAI,qCAAU,CAAO,EACtDA,sBACE,GAAG,EAAE,iBAAiB,EACtB,KAAK,EAAC,SAAS,EACf,YAAY,EAAE,uBAAA,IAAI,4CAAiB,GACzB,CACL,EACTA,iBAAK,KAAK,EAAC,gCAAgC,EAAC,IAAI,EAAC,QAAQ,IACvDA,eACE,KAAK,EAAC,oCAAoC,EAC1C,OAAO,EAAE,IAAI,CAAC,iBAAiB,IAE9B,uBAAA,IAAI,4CAAiB,CAAC,eAAe,CACpC,CACA,CACa,CAChB,EACP;KACH;;;;;;;;;","names":["getIconPath","Locale","h","Host"],"sources":["src/components/current-user-info/helpers.tsx","src/components/current-user-info/current-user-info.scss?tag=gx-ide-current-user-info&encapsulation=shadow","src/components/current-user-info/current-user-info.tsx"],"sourcesContent":["/**\n * Returns initials from the first two words of a name. Returns \"X\" for invalid input.\n *\n * @param name - The full name string.\n * @returns Initials of the first two words, or \"X\" if invalid.\n *\n * Example:\n * getInitialsFromName(\"John Doe\") -> \"JD\"\n * getInitialsFromName(\"Jane\") -> \"J\"\n * getInitialsFromName(\"\") -> \"X\"\n */\nexport const getInitialsFromName = (name: string): string | null => {\n if (typeof name !== \"string\" || name.trim() === \"\") {\n return \"X\";\n }\n\n const nameData = name.split(\" \").filter(Boolean); // Remove any empty strings from splitting\n if (nameData.length === 1) {\n return nameData[0][0].toUpperCase();\n } else {\n return `${nameData[0][0].toUpperCase()}${nameData[1][0].toUpperCase()}`;\n }\n};\n\n/**\n * Limits the full name to the first two words. Returns null for invalid input.\n *\n * @param fullName - The full name string to be limited.\n * @returns The first two words of the full name, or null if invalid.\n *\n * Example:\n * limitFullName(\"John Doe Smith\") -> \"John Doe\"\n * limitFullName(\"Jane\") -> \"Jane\"\n * limitFullName(\"\") -> null\n */\nexport const limitFullName = (fullName: string): string | null => {\n if (typeof fullName !== \"string\" || fullName.trim() === \"\") {\n return null;\n }\n\n const fullNameData = fullName.split(\" \").filter(Boolean); // Remove any empty strings from splitting\n if (fullNameData.length === 1) {\n return fullNameData[0];\n } else {\n return `${fullNameData[0]} ${fullNameData[1]}`;\n }\n};\n","@import \"../../../node_modules/@genexus/mercury/dist/mercury.scss\";\n\n:host {\n display: inline-grid;\n justify-items: end;\n block-size: 100%;\n}\n\n.user-login {\n &__button {\n all: unset;\n display: grid;\n grid-template-columns: max-content max-content max-content;\n align-items: center;\n gap: var(--mer-spacing--sm);\n block-size: auto;\n cursor: pointer;\n }\n &__details {\n display: grid;\n grid-template-rows: max-content max-content;\n gap: var(--mer-spacing--3xs);\n justify-items: end;\n }\n &__name {\n font-weight: var(--mer-font__weight--medium);\n font-size: var(--mer-font__size--3xs);\n color: var(--mer-text__on-elevation);\n }\n &__organization {\n font-weight: var(--mer-font__weight--light);\n font-size: var(--mer-font__size--4xs);\n color: var(--mer-text__neutral);\n }\n &__name,\n &__organization {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-inline-size: 120px;\n display: inline-block;\n }\n &__avatar {\n font-size: 9px;\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n block-size: var(--mer-spacing--lg);\n inline-size: var(--mer-spacing--lg);\n color: var(--mer-text__on-elevation);\n border-radius: 50%;\n background-color: var(--mer-color__tinted-primary--10);\n border: var(--mer-border__width--sm) solid var(--mer-color__primary--200);\n }\n}\n\n.privacy-policy {\n text-decoration: underline;\n cursor: pointer;\n}\n","/* STENCIL IMPORTS */\nimport { Component, Element, Host, Prop, State, h } from \"@stencil/core\";\n\nimport { getIconPath, MercuryBundles } from \"@genexus/mercury\";\n\nimport { Locale } from \"../../common/locale\";\nimport { getInitialsFromName, limitFullName } from \"./helpers\";\nimport { DropdownModel } from \"@genexus/chameleon-controls-library\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n // TODO: review if \"utils/form--full\" is required.\n \"resets/box-sizing\",\n \"components/tooltip\",\n \"components/toggle\",\n \"components/icon\",\n \"components/dropdown\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst CHEVRON_DOWN_ICON = getIconPath({\n category: \"navigation\",\n name: \"chevron-down\",\n colorType: \"neutral\"\n});\n\nconst MY_ACCOUNT_ID = \"my-account\";\nconst CHANGE_TEAM_ID = \"change-team\";\nconst SIGN_OUT_ID = \"sign-out\";\nconst LANGUAGE_ID = \"language\";\n\n@Component({\n tag: \"gx-ide-current-user-info\",\n styleUrl: \"current-user-info.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/current-user-info\"]\n})\nexport class GxIdeNewEnvironment {\n #componentLocale: any;\n #initials: string = \"\";\n // #mode: Mode;\n #menuDropdownModel: DropdownModel;\n\n @Element() el: HTMLGxIdeCurrentUserInfoElement;\n #userLoginButton: HTMLButtonElement;\n\n @State() showMenu: boolean = false;\n\n /**\n * User data\n */\n @Prop() readonly userInfo: UserInfo;\n\n /**\n * Callback executed when the user click \"My Account\" link\n */\n @Prop() readonly myAccountCallback!: () => Promise<void>;\n\n /**\n * Callback executed when the user click \"change team\" link\n */\n @Prop() readonly changeTeamCallback!: () => Promise<void>;\n\n /**\n * Callback executed when the user click \"Language\" link\n */\n @Prop() readonly changeLanguageCallback!: () => Promise<void>;\n\n /**\n * Callback executed when the user switch the \"Mode\" status\n */\n @Prop() readonly changeModeCallback!: (mode: Mode) => Promise<void>;\n\n /**\n * Callback executed when the user click \"Sign Out\" link\n */\n @Prop() readonly signOutCallback!: () => Promise<void>;\n\n /**\n * Callback executed when the user click \"Privacy Policy & Terms of use\" link\n */\n @Prop() readonly showTermsCallback!: () => Promise<void>;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n this.#initials = getInitialsFromName(this.userInfo.name);\n this.#menuDropdownModel = [\n {\n id: MY_ACCOUNT_ID,\n caption: this.#componentLocale.myAccountLabel,\n showSeparator: false\n },\n {\n id: CHANGE_TEAM_ID,\n caption: this.#componentLocale.changeTeamLabel,\n showSeparator: false\n },\n {\n id: SIGN_OUT_ID,\n caption: this.#componentLocale.signOutLabel,\n showSeparator: true\n }\n // {\n // id: LANGUAGE_ID,\n // caption: this.#componentLocale.languageLabel,\n // showSeparator: true\n // }\n ];\n }\n\n // #handleModeSwitch = () => {\n // this.#mode = this.#mode === \"dark\" ? \"light\" : \"dark\";\n // if (this.changeModeCallback) {\n // this.changeModeCallback(this.#mode);\n // }\n // };\n\n #dropDownitemClickHandler = (\n _event: UIEvent,\n _target: string,\n itemId: string\n ): void => {\n if (itemId === MY_ACCOUNT_ID) {\n this.myAccountCallback();\n } else if (itemId === CHANGE_TEAM_ID) {\n this.changeTeamCallback();\n } else if (itemId === SIGN_OUT_ID) {\n this.signOutCallback();\n } else if (itemId === LANGUAGE_ID) {\n this.changeLanguageCallback();\n }\n };\n\n render() {\n const userName = limitFullName(this.userInfo?.name);\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <ch-dropdown-render\n class=\"dropdown\"\n model={this.#menuDropdownModel}\n position=\"InsideEnd_OutsideEnd\"\n itemClickCallback={this.#dropDownitemClickHandler}\n >\n <button\n class=\"user-login__button\"\n ref={el => (this.#userLoginButton = el as HTMLButtonElement)}\n slot=\"action\"\n >\n <div class=\"user-login__details\">\n {userName ? (\n <span class=\"user-login__name\">{userName}</span>\n ) : null}\n {this.userInfo?.team ? (\n <span class=\"user-login__organization\">\n {this.userInfo.team}\n </span>\n ) : null}\n </div>\n\n <div class=\"user-login__avatar\">{this.#initials}</div>\n <ch-image\n src={CHEVRON_DOWN_ICON}\n class=\"icon-md\"\n containerRef={this.#userLoginButton}\n ></ch-image>\n </button>\n <div class=\"user-login__footer footer-slot\" slot=\"footer\">\n <p\n class=\"text-body-regular-s privacy-policy\"\n onClick={this.showTermsCallback}\n >\n {this.#componentLocale.privacyAndTerms}\n </p>\n </div>\n </ch-dropdown-render>\n </Host>\n );\n }\n}\n\nexport type UserInfo = {\n name: string;\n team: string;\n};\n\nexport type Mode = \"dark\" | \"light\";\n"],"version":3}
@@ -0,0 +1,226 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-caaa95cf.js');
6
+ const MERCURY_ASSETS = require('./MERCURY_ASSETS-b23e31e2.js');
7
+ const locale = require('./locale-ff30a5f3.js');
8
+
9
+ const mapCategoryToListItemGroup = (category) => {
10
+ const categoryGroup = {
11
+ caption: category.name,
12
+ id: category.name,
13
+ type: "group",
14
+ expanded: true,
15
+ expandable: true,
16
+ items: category.types.map(type => {
17
+ return {
18
+ caption: type.name,
19
+ id: type.name,
20
+ additionalInformation: {
21
+ "stretch-start": {
22
+ center: [{ imgSrc: type.icon }]
23
+ }
24
+ },
25
+ type: "actionable"
26
+ };
27
+ })
28
+ };
29
+ return categoryGroup;
30
+ };
31
+ const mapDataTypesToList = (dataTypes) => {
32
+ return dataTypes.map((dataType, index) => {
33
+ return {
34
+ caption: dataType.name,
35
+ id: dataType.name,
36
+ additionalInformation: {
37
+ "stretch-start": {
38
+ center: [{ imgSrc: dataType.icon || undefined }]
39
+ }
40
+ },
41
+ type: "actionable",
42
+ order: index
43
+ };
44
+ });
45
+ };
46
+
47
+ const dataTypeSelectorCss = ":host{position:relative;display:grid;block-size:100%;overflow:auto;grid-template-rows:1fr max-content;--control__border-width:var(--mer-border__width--sm);--control__border-radius:var(--mer-border__radius--sm)}.main{display:contents}.selected-category{margin:0;text-transform:capitalize;margin-inline-start:var(--mer-spacing--md);white-space:nowrap}.footer{overflow:auto}";
48
+
49
+ var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
50
+ if (kind === "a" && !f)
51
+ throw new TypeError("Private accessor was defined without a getter");
52
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
53
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
54
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
55
+ };
56
+ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
57
+ if (kind === "m")
58
+ throw new TypeError("Private method is not writable");
59
+ if (kind === "a" && !f)
60
+ throw new TypeError("Private accessor was defined without a setter");
61
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
62
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
63
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
64
+ };
65
+ var _GxIdeKbManagerImport__componentLocale, _GxIdeKbManagerImport_showAll, _GxIdeKbManagerImport_categoriesActionListItemGroupMap, _GxIdeKbManagerImport_handleSelectionChange, _GxIdeKbManagerImport_updateListBoxModelState, _GxIdeKbManagerImport_showAllObjects, _GxIdeKbManagerImport_showRecentlyObjects, _GxIdeKbManagerImport_renderFooter;
66
+ const CSS_BUNDLES = [
67
+ "resets/box-sizing",
68
+ "components/tab",
69
+ "components/tooltip",
70
+ "components/list-box",
71
+ "components/tree-view",
72
+ "utils/form--full",
73
+ "utils/layout",
74
+ "utils/typography",
75
+ "utils/spacing",
76
+ "chameleon/scrollbar"
77
+ ];
78
+ const ALL_CATEGORY_ID = "all";
79
+ const RECENTLY_USED_CATEGORY_ID = "recenttly-used";
80
+ const CLOCK_ICON = MERCURY_ASSETS.getIconPath({
81
+ category: "system",
82
+ name: "time",
83
+ colorType: "primary"
84
+ });
85
+ const GxIdeKbManagerImport = class {
86
+ constructor(hostRef) {
87
+ index.registerInstance(this, hostRef);
88
+ _GxIdeKbManagerImport__componentLocale.set(this, void 0);
89
+ _GxIdeKbManagerImport_showAll.set(this, false);
90
+ _GxIdeKbManagerImport_categoriesActionListItemGroupMap.set(this, new Map());
91
+ _GxIdeKbManagerImport_handleSelectionChange.set(this, (event) => {
92
+ var _a;
93
+ const eventType = (_a = event.detail[0]) === null || _a === void 0 ? void 0 : _a.item.type;
94
+ if (eventType === "actionable") {
95
+ const name = event.detail[0].item.caption;
96
+ const itemAdditionalBase = event.detail[0].item.additionalInformation["stretch-start"].center[0];
97
+ const icon = itemAdditionalBase.imgSrc;
98
+ this.dataTypeSelectedCallback({
99
+ name: name,
100
+ icon: icon
101
+ });
102
+ __classPrivateFieldGet(this, _GxIdeKbManagerImport_updateListBoxModelState, "f").call(this, event.detail[0].item.caption, "actionable");
103
+ }
104
+ else if (eventType === "group") {
105
+ __classPrivateFieldGet(this, _GxIdeKbManagerImport_updateListBoxModelState, "f").call(this, event.detail[0].item.caption, "group");
106
+ }
107
+ });
108
+ _GxIdeKbManagerImport_updateListBoxModelState.set(this, (name, type) => {
109
+ if (this.selectedCategory === RECENTLY_USED_CATEGORY_ID) {
110
+ this.recentlyUsedActionListModel.forEach(item => {
111
+ // clear selected
112
+ item.selected = false;
113
+ });
114
+ const selectedItemIndex = this.recentlyUsed.findIndex(item => item.name === name);
115
+ if (selectedItemIndex !== -1) {
116
+ this.recentlyUsedActionListModel[selectedItemIndex].selected = true;
117
+ }
118
+ }
119
+ else if (type === "group" &&
120
+ __classPrivateFieldGet(this, _GxIdeKbManagerImport_categoriesActionListItemGroupMap, "f").has(name)) {
121
+ const group = __classPrivateFieldGet(this, _GxIdeKbManagerImport_categoriesActionListItemGroupMap, "f").get(name);
122
+ const groupUpdated = Object.assign(Object.assign({}, group), { expanded: group.expanded });
123
+ __classPrivateFieldGet(this, _GxIdeKbManagerImport_categoriesActionListItemGroupMap, "f").set(name, groupUpdated);
124
+ }
125
+ });
126
+ _GxIdeKbManagerImport_showAllObjects.set(this, () => {
127
+ if (!__classPrivateFieldGet(this, _GxIdeKbManagerImport_showAll, "f")) {
128
+ const allCategoriesActionListModel = [];
129
+ let counter = 1;
130
+ const mapLength = __classPrivateFieldGet(this, _GxIdeKbManagerImport_categoriesActionListItemGroupMap, "f").size;
131
+ for (const key of __classPrivateFieldGet(this, _GxIdeKbManagerImport_categoriesActionListItemGroupMap, "f").keys()) {
132
+ allCategoriesActionListModel.push(__classPrivateFieldGet(this, _GxIdeKbManagerImport_categoriesActionListItemGroupMap, "f").get(key));
133
+ if (counter !== mapLength) {
134
+ allCategoriesActionListModel.push({ type: "separator" });
135
+ }
136
+ counter++;
137
+ }
138
+ this.categoriesListBoxModel = allCategoriesActionListModel;
139
+ __classPrivateFieldSet(this, _GxIdeKbManagerImport_showAll, true, "f");
140
+ this.selectedCategory = ALL_CATEGORY_ID;
141
+ }
142
+ });
143
+ _GxIdeKbManagerImport_showRecentlyObjects.set(this, () => {
144
+ __classPrivateFieldSet(this, _GxIdeKbManagerImport_showAll, false, "f");
145
+ this.categoriesListBoxModel = this.recentlyUsedActionListModel;
146
+ this.selectedCategory = RECENTLY_USED_CATEGORY_ID;
147
+ });
148
+ this.selectedCategoryHandler = (e) => {
149
+ this.selectedCategory = e.currentTarget.dataset.name;
150
+ const newSelectedCategory = [
151
+ __classPrivateFieldGet(this, _GxIdeKbManagerImport_categoriesActionListItemGroupMap, "f").get(this.selectedCategory)
152
+ ];
153
+ this.categoriesListBoxModel = newSelectedCategory;
154
+ __classPrivateFieldSet(this, _GxIdeKbManagerImport_showAll, false, "f");
155
+ };
156
+ _GxIdeKbManagerImport_renderFooter.set(this, () => {
157
+ const recentlyUsedBtnClass = this.selectedCategory === RECENTLY_USED_CATEGORY_ID
158
+ ? "button-secondary"
159
+ : "button-tertiary";
160
+ const allBtnClass = this.selectedCategory === ALL_CATEGORY_ID
161
+ ? "button-secondary"
162
+ : "button-tertiary";
163
+ let selectedCategoryDescription = this.selectedCategory;
164
+ if (this.selectedCategory === RECENTLY_USED_CATEGORY_ID) {
165
+ selectedCategoryDescription =
166
+ __classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").fixedTypes.recentlyUsed;
167
+ }
168
+ else if (this.selectedCategory === ALL_CATEGORY_ID) {
169
+ selectedCategoryDescription = __classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").fixedTypes.all;
170
+ }
171
+ else {
172
+ selectedCategoryDescription = this.selectedCategory;
173
+ }
174
+ return (index.h("footer", { class: "footer control-footer control-footer-start spacing-body-inline spacing-body-block scrollable\n " }, index.h("div", { class: "buttons-spacer" }, this.recentlyUsed && this.recentlyUsed.length > 0 && (index.h("button", { class: `button-icon-only ${recentlyUsedBtnClass}`, "aria-label": `${__classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").select} ${__classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").fixedTypes.recentlyUsed}`, title: `${__classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").select} ${__classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").fixedTypes.recentlyUsed}`, onClick: __classPrivateFieldGet(this, _GxIdeKbManagerImport_showRecentlyObjects, "f") }, index.h("ch-image", { class: "icon-md", src: CLOCK_ICON }))), index.h("button", { class: `button-icon-only ${allBtnClass}`, onClick: __classPrivateFieldGet(this, _GxIdeKbManagerImport_showAllObjects, "f"), "aria-label": `${__classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").select} ${__classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").fixedTypes.all}`, title: `${__classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").select} ${__classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").fixedTypes.all}` }, "[*]"), this.categories.map(category => {
175
+ const buttonClass = category.name === this.selectedCategory
176
+ ? "button-secondary"
177
+ : "button-tertiary";
178
+ return (index.h("button", { class: `button-icon-only ${buttonClass}`, "aria-label": category.name, title: category.name, onClick: this.selectedCategoryHandler, "data-name": category.name }, index.h("ch-image", { class: "icon-md", src: category.icon })));
179
+ })), index.h("p", { class: "text-body-regular-s selected-category" }, selectedCategoryDescription)));
180
+ });
181
+ this.categoriesListBoxModel = [];
182
+ this.selectedCategory = undefined;
183
+ this.statusInfo = [];
184
+ this.recentlyUsedActionListModel = [];
185
+ this.loading = true;
186
+ this.categories = undefined;
187
+ this.dataTypeSelectedCallback = undefined;
188
+ this.recentlyUsed = [];
189
+ }
190
+ categoriesChanged(newCategories) {
191
+ if (!(newCategories === null || newCategories === void 0 ? void 0 : newCategories.length)) {
192
+ return;
193
+ }
194
+ __classPrivateFieldGet(this, _GxIdeKbManagerImport_categoriesActionListItemGroupMap, "f").clear();
195
+ newCategories.forEach(category => {
196
+ const categoryListBoxModel = mapCategoryToListItemGroup(category);
197
+ __classPrivateFieldGet(this, _GxIdeKbManagerImport_categoriesActionListItemGroupMap, "f").set(category.name, categoryListBoxModel);
198
+ });
199
+ this.loading = false;
200
+ __classPrivateFieldGet(this, _GxIdeKbManagerImport_showAllObjects, "f").call(this);
201
+ }
202
+ recentlyUsedChanged(newRecentlyUsed) {
203
+ this.recentlyUsedActionListModel = null;
204
+ this.recentlyUsedActionListModel = mapDataTypesToList(newRecentlyUsed);
205
+ }
206
+ async componentWillLoad() {
207
+ __classPrivateFieldSet(this, _GxIdeKbManagerImport__componentLocale, await locale.Locale.getComponentStrings(this.el), "f");
208
+ // initialize models
209
+ this.recentlyUsed.length && this.recentlyUsedChanged(this.recentlyUsed);
210
+ }
211
+ render() {
212
+ return (index.h(index.Host, { class: "widget" }, index.h("ch-theme", { model: CSS_BUNDLES }), this.loading ? (index.h("gx-ide-loader", { loaderTitle: __classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").loader.title, description: __classPrivateFieldGet(this, _GxIdeKbManagerImport__componentLocale, "f").loader.description, show: true })) : (index.h("section", { class: "main" }, index.h("ch-action-list-render", { class: "list-box", model: this.categoriesListBoxModel, selection: "single", onSelectedItemsChange: __classPrivateFieldGet(this, _GxIdeKbManagerImport_handleSelectionChange, "f") }), __classPrivateFieldGet(this, _GxIdeKbManagerImport_renderFooter, "f").call(this)))));
213
+ }
214
+ static get assetsDirs() { return ["gx-ide-assets/data-type-selector"]; }
215
+ get el() { return index.getElement(this); }
216
+ static get watchers() { return {
217
+ "categories": ["categoriesChanged"],
218
+ "recentlyUsed": ["recentlyUsedChanged"]
219
+ }; }
220
+ };
221
+ _GxIdeKbManagerImport__componentLocale = new WeakMap(), _GxIdeKbManagerImport_showAll = new WeakMap(), _GxIdeKbManagerImport_categoriesActionListItemGroupMap = new WeakMap(), _GxIdeKbManagerImport_handleSelectionChange = new WeakMap(), _GxIdeKbManagerImport_updateListBoxModelState = new WeakMap(), _GxIdeKbManagerImport_showAllObjects = new WeakMap(), _GxIdeKbManagerImport_showRecentlyObjects = new WeakMap(), _GxIdeKbManagerImport_renderFooter = new WeakMap();
222
+ GxIdeKbManagerImport.style = dataTypeSelectorCss;
223
+
224
+ exports.gx_ide_data_type_selector = GxIdeKbManagerImport;
225
+
226
+ //# sourceMappingURL=gx-ide-data-type-selector.cjs.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"gx-ide-data-type-selector.entry.cjs.js","mappings":";;;;;;;;AAMO,MAAM,0BAA0B,GAAG,CACxC,QAA8B;IAE9B,MAAM,aA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AO,IACXA,2BACE,WAAW,EAAE,uBAAA,IAAI,8CAAkB,CAAC,MAAM,CAAC,KAAK,EAChD,WAAW,EAAE,uBAAA,IAAI,8CAAkB,CAAC,MAAM,CAAC,WAAW,EACtD,IAAI,SACW,KAEjBA,qBAAS,KAAK,EAAC,MAAM,IACnBA,mCACE,KAAK,EAAC,UAAU,EAChB,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAClC,SAAS,EAAC,QAAQ,EAClB,qBAAqB,EAAE,uBAAA,IAAI,mDAAuB,GAC3B,EACxB,uBAAA,IAAI,0CAAc,MAAlB,IAAI,CAAgB,CACb,CACX,CACI,EACP;KACH;;;;;;;;;;;;;","names":["getIconPath","h","Locale","Host"],"sources":["src/components/data-type-selector/helpers.ts","src/components/data-type-selector/data-type-selector.scss?tag=gx-ide-data-type-selector&encapsulation=shadow","src/components/data-type-selector/data-type-selector.tsx"],"sourcesContent":["import { DataTypeCategoryData, DataTypeData } from \"./data-type-selector\";\nimport {\n ActionListItemGroup,\n ActionListModel\n} from \"@genexus/chameleon-controls-library/dist/types/components/action-list/types\";\n\nexport const mapCategoryToListItemGroup = (\n category: DataTypeCategoryData\n): ActionListItemGroup => {\n const categoryGroup: ActionListItemGroup = {\n caption: category.name,\n id: category.name,\n type: \"group\",\n expanded: true,\n expandable: true,\n items: category.types.map(type => {\n return {\n caption: type.name,\n id: type.name,\n additionalInformation: {\n \"stretch-start\": {\n center: [{ imgSrc: type.icon }]\n }\n },\n type: \"actionable\"\n };\n })\n };\n return categoryGroup;\n};\n\nexport const mapDataTypesToList = (\n dataTypes: DataTypeData[]\n): ActionListModel => {\n return dataTypes.map((dataType, index) => {\n return {\n caption: dataType.name,\n id: dataType.name,\n additionalInformation: {\n \"stretch-start\": {\n center: [{ imgSrc: dataType.icon || undefined }]\n }\n },\n type: \"actionable\",\n order: index\n };\n });\n};\n",":host {\n position: relative;\n display: grid;\n block-size: 100%;\n overflow: auto;\n grid-template-rows: 1fr max-content;\n\n // WA: Prevent a custom css rule on genexus-web from overriding --control__border-width value.\n // TDOO: remove this when the custom style is removed from genexus-web.\n // custom stlye is: .gx-struct-editor .tabular-grid-cell {\n // --control__border-width: 0;\n // }\n\n --control__border-width: var(--mer-border__width--sm);\n --control__border-radius: var(--mer-border__radius--sm);\n}\n\n.main {\n display: contents;\n}\n\n.selected-category {\n margin: 0;\n text-transform: capitalize;\n margin-inline-start: var(\n --mer-spacing--md\n ); // TODO: Create a semantic class in Mercury for this case.\n white-space: nowrap;\n}\n\n.footer {\n overflow: auto;\n}\n","// Stencil\nimport { Component, Host, h, Prop, Element, State, Watch } from \"@stencil/core\";\n// Other Libraries\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\nimport {\n ActionListItemActionable,\n ActionListItemModel,\n ActionListItemModelExtended,\n ActionListItemType,\n ActionListModel\n} from \"@genexus/chameleon-controls-library\";\nimport {\n ActionListItemAdditionalBase,\n ActionListItemGroup\n} from \"@genexus/chameleon-controls-library/dist/types/components/action-list/types\";\n// Gx Ide Ui\nimport { Locale } from \"../../common/locale\";\nimport { mapCategoryToListItemGroup, mapDataTypesToList } from \"./helpers\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/tab\",\n \"components/tooltip\",\n \"components/list-box\",\n \"components/tree-view\",\n \"utils/form--full\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst ALL_CATEGORY_ID = \"all\";\nconst RECENTLY_USED_CATEGORY_ID = \"recenttly-used\";\n\nconst CLOCK_ICON = getIconPath({\n category: \"system\",\n name: \"time\",\n colorType: \"primary\"\n});\n\n@Component({\n tag: \"gx-ide-data-type-selector\",\n styleUrl: \"data-type-selector.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/data-type-selector\"]\n})\nexport class GxIdeKbManagerImport {\n #_componentLocale: any;\n #showAll: boolean = false;\n #categoriesActionListItemGroupMap: Map<string, ActionListItemGroup> = new Map<\n string,\n ActionListItemGroup\n >();\n\n @Element() el: HTMLGxIdeDataTypeSelectorElement;\n\n @State() categoriesListBoxModel: ActionListItemModel[] = [];\n @State() selectedCategory: string;\n @State() statusInfo: StatusInfo[] = [];\n @State() recentlyUsedActionListModel: ActionListModel = [];\n @State() loading: boolean = true;\n\n /**\n * All possible types and its category\n */\n @Prop() readonly categories: DataTypeCategoryData[] = undefined;\n @Watch(\"categories\")\n categoriesChanged(newCategories: DataTypeCategoryData[]) {\n if (!newCategories?.length) {\n return;\n }\n this.#categoriesActionListItemGroupMap.clear();\n newCategories.forEach(category => {\n const categoryListBoxModel = mapCategoryToListItemGroup(category);\n this.#categoriesActionListItemGroupMap.set(\n category.name,\n categoryListBoxModel\n );\n });\n this.loading = false;\n this.#showAllObjects();\n }\n\n /**\n * Callback invoked when user select an item type\n */\n @Prop() readonly dataTypeSelectedCallback: DataTypeSelectedCallback;\n\n /**\n * All recently used types list\n */\n @Prop() readonly recentlyUsed: DataTypeData[] = [];\n @Watch(\"recentlyUsed\")\n recentlyUsedChanged(newRecentlyUsed: DataTypeData[]) {\n this.recentlyUsedActionListModel = null;\n this.recentlyUsedActionListModel = mapDataTypesToList(newRecentlyUsed);\n }\n\n async componentWillLoad() {\n this.#_componentLocale = await Locale.getComponentStrings(this.el);\n // initialize models\n this.recentlyUsed.length && this.recentlyUsedChanged(this.recentlyUsed);\n }\n\n #handleSelectionChange = (\n event: CustomEvent<ActionListItemModelExtended[]>\n ) => {\n const eventType = event.detail[0]?.item.type;\n if (eventType === \"actionable\") {\n const name = event.detail[0].item.caption;\n\n const itemAdditionalBase = event.detail[0].item.additionalInformation[\n \"stretch-start\"\n ].center[0] as ActionListItemAdditionalBase;\n const icon = itemAdditionalBase.imgSrc;\n\n this.dataTypeSelectedCallback({\n name: name,\n icon: icon\n });\n\n this.#updateListBoxModelState(event.detail[0].item.caption, \"actionable\");\n } else if (eventType === \"group\") {\n this.#updateListBoxModelState(event.detail[0].item.caption, \"group\");\n }\n };\n\n #updateListBoxModelState = (name: string, type: ActionListItemType) => {\n if (this.selectedCategory === RECENTLY_USED_CATEGORY_ID) {\n this.recentlyUsedActionListModel.forEach(item => {\n // clear selected\n (item as ActionListItemActionable).selected = false;\n });\n const selectedItemIndex = this.recentlyUsed.findIndex(\n item => item.name === name\n );\n if (selectedItemIndex !== -1) {\n (\n this.recentlyUsedActionListModel[\n selectedItemIndex\n ] as ActionListItemActionable\n ).selected = true;\n }\n } else if (\n type === \"group\" &&\n this.#categoriesActionListItemGroupMap.has(name)\n ) {\n const group = this.#categoriesActionListItemGroupMap.get(\n name\n ) as ActionListItemGroup;\n const groupUpdated = { ...group, expanded: group.expanded };\n this.#categoriesActionListItemGroupMap.set(name, groupUpdated);\n }\n };\n\n #showAllObjects = () => {\n if (!this.#showAll) {\n const allCategoriesActionListModel: ActionListItemModel[] = [];\n let counter = 1;\n const mapLength = this.#categoriesActionListItemGroupMap.size;\n for (const key of this.#categoriesActionListItemGroupMap.keys()) {\n allCategoriesActionListModel.push(\n this.#categoriesActionListItemGroupMap.get(key)\n );\n if (counter !== mapLength) {\n allCategoriesActionListModel.push({ type: \"separator\" });\n }\n counter++;\n }\n this.categoriesListBoxModel = allCategoriesActionListModel;\n this.#showAll = true;\n this.selectedCategory = ALL_CATEGORY_ID;\n }\n };\n\n #showRecentlyObjects = () => {\n this.#showAll = false;\n this.categoriesListBoxModel = this.recentlyUsedActionListModel;\n this.selectedCategory = RECENTLY_USED_CATEGORY_ID;\n };\n\n private selectedCategoryHandler = (e: MouseEvent) => {\n this.selectedCategory = (e.currentTarget as HTMLButtonElement).dataset.name;\n const newSelectedCategory = [\n this.#categoriesActionListItemGroupMap.get(this.selectedCategory)\n ];\n this.categoriesListBoxModel = newSelectedCategory;\n this.#showAll = false;\n };\n\n #renderFooter = () => {\n const recentlyUsedBtnClass =\n this.selectedCategory === RECENTLY_USED_CATEGORY_ID\n ? \"button-secondary\"\n : \"button-tertiary\";\n const allBtnClass =\n this.selectedCategory === ALL_CATEGORY_ID\n ? \"button-secondary\"\n : \"button-tertiary\";\n let selectedCategoryDescription = this.selectedCategory;\n if (this.selectedCategory === RECENTLY_USED_CATEGORY_ID) {\n selectedCategoryDescription =\n this.#_componentLocale.fixedTypes.recentlyUsed;\n } else if (this.selectedCategory === ALL_CATEGORY_ID) {\n selectedCategoryDescription = this.#_componentLocale.fixedTypes.all;\n } else {\n selectedCategoryDescription = this.selectedCategory;\n }\n\n return (\n <footer\n class=\"footer control-footer control-footer-start spacing-body-inline spacing-body-block scrollable\n \"\n >\n <div class=\"buttons-spacer\">\n {this.recentlyUsed && this.recentlyUsed.length > 0 && (\n <button\n class={`button-icon-only ${recentlyUsedBtnClass}`}\n aria-label={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.recentlyUsed\n }`}\n title={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.recentlyUsed\n }`}\n onClick={this.#showRecentlyObjects}\n >\n <ch-image class=\"icon-md\" src={CLOCK_ICON}></ch-image>\n </button>\n )}\n <button\n class={`button-icon-only ${allBtnClass}`}\n onClick={this.#showAllObjects}\n aria-label={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.all\n }`}\n title={`${this.#_componentLocale.select} ${\n this.#_componentLocale.fixedTypes.all\n }`}\n >\n [*]\n </button>\n {this.categories.map(category => {\n const buttonClass =\n category.name === this.selectedCategory\n ? \"button-secondary\"\n : \"button-tertiary\";\n\n return (\n <button\n class={`button-icon-only ${buttonClass}`}\n aria-label={category.name}\n title={category.name}\n onClick={this.selectedCategoryHandler}\n data-name={category.name}\n >\n <ch-image class=\"icon-md\" src={category.icon}></ch-image>\n </button>\n );\n })}\n </div>\n <p class=\"text-body-regular-s selected-category\">\n {selectedCategoryDescription}\n </p>\n </footer>\n );\n };\n\n render(): void {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n {this.loading ? (\n <gx-ide-loader\n loaderTitle={this.#_componentLocale.loader.title}\n description={this.#_componentLocale.loader.description}\n show\n ></gx-ide-loader>\n ) : (\n <section class=\"main\">\n <ch-action-list-render\n class=\"list-box\"\n model={this.categoriesListBoxModel}\n selection=\"single\"\n onSelectedItemsChange={this.#handleSelectionChange}\n ></ch-action-list-render>\n {this.#renderFooter()}\n </section>\n )}\n </Host>\n );\n }\n}\n\ntype StatusInfo = {\n [key: string]: {\n display: boolean;\n };\n};\n\nexport type DataTypeCategoryData = {\n name: string;\n icon: string;\n types: DataTypeData[];\n};\nexport type DataTypeData = {\n name: string;\n icon: string;\n};\n\nexport type DataTypeSelectedCallback = (data: {\n name: string;\n icon: string;\n}) => Promise<void>;\n"],"version":3}