From 39a67b5561de591c2bded5af752ed7076686e03c Mon Sep 17 00:00:00 2001 From: Bruno Sastre <54677414+bsastregx@users.noreply.github.com> Date: Wed, 16 Oct 2024 18:03:22 -0300 Subject: [PATCH 1/9] Update assets-manager.ts - update `getActionListImagePathCallback ` - Add `getComboBoxImagePathCallback` as a comment since is not ready yet. --- packages/mercury/src/assets-manager.ts | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/packages/mercury/src/assets-manager.ts b/packages/mercury/src/assets-manager.ts index 59ece8e27..2e29b839d 100644 --- a/packages/mercury/src/assets-manager.ts +++ b/packages/mercury/src/assets-manager.ts @@ -9,6 +9,7 @@ import { TreeViewItemImageMultiState } from "@genexus/chameleon-controls-library import { MERCURY_ASSETS } from "./assets/MERCURY_ASSETS.js"; import { ActionListItemAdditionalBase } from "@genexus/chameleon-controls-library/dist/types/components/action-list/types.js"; +import { ComboBoxItemModel } from "@genexus/chameleon-controls-library/dist/types/components/combo-box/types.js"; export { MercuryBundleBase, @@ -269,10 +270,10 @@ export const getImagePathCallback = ( export const getActionListImagePathCallback = ( additionalItem: ActionListItemAdditionalBase -): GxImageMultiState | undefined => { - const iconPath = additionalItem as string; - return getImagePathCallback(iconPath); -}; +) => + additionalItem.imgSrc + ? getImagePathCallback(additionalItem.imgSrc) + : undefined; export const getNavigationListImagePathCallback = ( itemModel: NavigationListItemModel @@ -313,6 +314,21 @@ export const getTreeViewImagePathCallback: TreeViewImagePathCallback = ( : { default: defaultPath }; }; +// export const getComboBoxImagePathCallback: ComboBoxImagePathCallback = ( +// item: ComboBoxItemModel, +// iconDirection: "start" | "end" +// ): GxImageMultiState | undefined => { +// if ( +// (!item.startImgSrc && iconDirection === "start") || +// (!item.endImgSrc && iconDirection === "end") +// ) { +// return undefined; +// } +// const imgSrc = +// iconDirection === "start" ? item.startImgSrc! : item.endImgSrc!; +// return getImagePathCallback(imgSrc); +// }; + /** * This object is used to register the getImagePathCallback definitions for all * controls in Chameleon. From e1b9bf37de0520a5376f58cb88d434c7ea1ad476 Mon Sep 17 00:00:00 2001 From: Bruno Sastre <54677414+bsastregx@users.noreply.github.com> Date: Wed, 16 Oct 2024 18:04:51 -0300 Subject: [PATCH 2/9] remove pills mixin `$add--icon` property from mercury.scss --- packages/mercury/src/mercury.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mercury/src/mercury.scss b/packages/mercury/src/mercury.scss index 7b0d7b82c..1ba8af1ad 100644 --- a/packages/mercury/src/mercury.scss +++ b/packages/mercury/src/mercury.scss @@ -524,7 +524,7 @@ } @if $pills { - @include pills($add--icon: $icons-variables); + @include pills(); } @if $radio-group { From 96e4f0348565b24f1488d63410d3fb37639a5716 Mon Sep 17 00:00:00 2001 From: Bruno Sastre <54677414+bsastregx@users.noreply.github.com> Date: Wed, 16 Oct 2024 18:09:02 -0300 Subject: [PATCH 3/9] comment ComboBoxItemModel sfrom assets-manager.ts It is not required yet. --- packages/mercury/src/assets-manager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mercury/src/assets-manager.ts b/packages/mercury/src/assets-manager.ts index 2e29b839d..fd55471de 100644 --- a/packages/mercury/src/assets-manager.ts +++ b/packages/mercury/src/assets-manager.ts @@ -9,7 +9,7 @@ import { TreeViewItemImageMultiState } from "@genexus/chameleon-controls-library import { MERCURY_ASSETS } from "./assets/MERCURY_ASSETS.js"; import { ActionListItemAdditionalBase } from "@genexus/chameleon-controls-library/dist/types/components/action-list/types.js"; -import { ComboBoxItemModel } from "@genexus/chameleon-controls-library/dist/types/components/combo-box/types.js"; +// import { ComboBoxItemModel } from "@genexus/chameleon-controls-library/dist/types/components/combo-box/types.js"; export { MercuryBundleBase, From d53a04dfb7c6309cdfed0e0bfc68e3dcfc2b0c54 Mon Sep 17 00:00:00 2001 From: Bruno Sastre <54677414+bsastregx@users.noreply.github.com> Date: Wed, 16 Oct 2024 18:24:34 -0300 Subject: [PATCH 4/9] update showcase files --- .../showcase/assets/scripts/assets-manager.js | 21 +++++++++++++++---- packages/mercury/showcase/scss/mercury.scss | 2 +- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/packages/mercury/showcase/assets/scripts/assets-manager.js b/packages/mercury/showcase/assets/scripts/assets-manager.js index e61890360..28018b4d5 100644 --- a/packages/mercury/showcase/assets/scripts/assets-manager.js +++ b/packages/mercury/showcase/assets/scripts/assets-manager.js @@ -120,10 +120,9 @@ export const getImagePathCallback = (iconPath) => { } return result; }; -export const getActionListImagePathCallback = (additionalItem) => { - const iconPath = additionalItem; - return getImagePathCallback(iconPath); -}; +export const getActionListImagePathCallback = (additionalItem) => additionalItem.imgSrc + ? getImagePathCallback(additionalItem.imgSrc) + : undefined; export const getNavigationListImagePathCallback = (itemModel) => itemModel.startImgSrc ? getImagePathCallback(itemModel.startImgSrc) : undefined; @@ -147,6 +146,20 @@ export const getTreeViewImagePathCallback = (item, iconDirection) => { } : { default: defaultPath }; }; +// export const getComboBoxImagePathCallback: ComboBoxImagePathCallback = ( +// item: ComboBoxItemModel, +// iconDirection: "start" | "end" +// ): GxImageMultiState | undefined => { +// if ( +// (!item.startImgSrc && iconDirection === "start") || +// (!item.endImgSrc && iconDirection === "end") +// ) { +// return undefined; +// } +// const imgSrc = +// iconDirection === "start" ? item.startImgSrc! : item.endImgSrc!; +// return getImagePathCallback(imgSrc); +// }; /** * This object is used to register the getImagePathCallback definitions for all * controls in Chameleon. diff --git a/packages/mercury/showcase/scss/mercury.scss b/packages/mercury/showcase/scss/mercury.scss index 66b0fcf3e..cbd5e0f8b 100644 --- a/packages/mercury/showcase/scss/mercury.scss +++ b/packages/mercury/showcase/scss/mercury.scss @@ -18268,7 +18268,7 @@ } @if $pills { - @include pills($add--icon: $icons-variables); + @include pills(); } @if $radio-group { From 02420c0adcf37afe2b882241101d6ed3b84cd2c4 Mon Sep 17 00:00:00 2001 From: Bruno Sastre Date: Fri, 18 Oct 2024 10:54:12 -0300 Subject: [PATCH 5/9] update chameleon to .46 --- packages/mercury/package.json | 2 +- packages/mercury/pnpm-lock.yaml | 10 +++++----- .../mercury/showcase/assets/scripts/scripts-header.js | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/mercury/package.json b/packages/mercury/package.json index 9101c90e9..7a2a6520a 100644 --- a/packages/mercury/package.json +++ b/packages/mercury/package.json @@ -27,7 +27,7 @@ "license": "MIT", "devDependencies": { "@atao60/fse-cli": "^0.1.9", - "@genexus/chameleon-controls-library": "6.0.0-next.45", + "@genexus/chameleon-controls-library": "6.0.0-next.46", "@genexus/svg-sass-generator": "1.1.24", "chokidar": "^3.6.0", "chokidar-cli": "^3.0.0", diff --git a/packages/mercury/pnpm-lock.yaml b/packages/mercury/pnpm-lock.yaml index 4bcabb24e..a55ebccb0 100644 --- a/packages/mercury/pnpm-lock.yaml +++ b/packages/mercury/pnpm-lock.yaml @@ -12,8 +12,8 @@ importers: specifier: ^0.1.9 version: 0.1.9 '@genexus/chameleon-controls-library': - specifier: 6.0.0-next.45 - version: 6.0.0-next.45(@stencil/core@4.19.2) + specifier: 6.0.0-next.46 + version: 6.0.0-next.46(@stencil/core@4.19.2) '@genexus/svg-sass-generator': specifier: 1.1.24 version: 1.1.24(@types/node@20.12.12) @@ -189,8 +189,8 @@ packages: cpu: [x64] os: [win32] - '@genexus/chameleon-controls-library@6.0.0-next.45': - resolution: {integrity: sha512-6DqUO0m2hf91QHcKCjvlo/9WEfbjgvh1X21324ornqbOLnd542t9hmVqIkNQOIIV6XuOWnSrEkdVMpcp+lg2jQ==} + '@genexus/chameleon-controls-library@6.0.0-next.46': + resolution: {integrity: sha512-8cAf2SI+XwcE3zdvIf1wALom47pDWDstiEhoAGY7WcNNnF3JI+ImRdk3kugVilAU9ys/c92kKYxxG/uFM2JKSw==} '@genexus/markdown-parser@0.1.1': resolution: {integrity: sha512-mPWHAOekmjQ3C2V5N3GyUADW6gHuTRRj1ul5G2nxY+h09RwlNxVfYLUWCC4S20l0c6wQzHabgGf+nroyuZJjxw==} @@ -1552,7 +1552,7 @@ snapshots: '@esbuild/win32-x64@0.21.5': optional: true - '@genexus/chameleon-controls-library@6.0.0-next.45(@stencil/core@4.19.2)': + '@genexus/chameleon-controls-library@6.0.0-next.46(@stencil/core@4.19.2)': dependencies: '@genexus/markdown-parser': 0.1.1 html5-qrcode: 2.3.8 diff --git a/packages/mercury/showcase/assets/scripts/scripts-header.js b/packages/mercury/showcase/assets/scripts/scripts-header.js index 855a9d75a..3212e4895 100644 --- a/packages/mercury/showcase/assets/scripts/scripts-header.js +++ b/packages/mercury/showcase/assets/scripts/scripts-header.js @@ -1,8 +1,8 @@ import { BUTTON_ICONS } from "./icons-showcase-paths.js"; // All definitions in this script are used for local testing purposes // only. The IDE Web's SDK implements all this and more -import { defineCustomElements } from "https://unpkg.com/@genexus/chameleon-controls-library@6.0.0-next.45/dist/esm/loader.js"; -import { registryProperty } from "https://unpkg.com/@genexus/chameleon-controls-library@6.0.0-next.45/dist/esm/index.js"; +import { defineCustomElements } from "https://unpkg.com/@genexus/chameleon-controls-library@6.0.0-next.46/dist/esm/loader.js"; +import { registryProperty } from "https://unpkg.com/@genexus/chameleon-controls-library@6.0.0-next.46/dist/esm/index.js"; import { getImagePathCallbackDefinitions, getIconPath From c92f96931019d47483dc986bf2fc20fcfb9bf929 Mon Sep 17 00:00:00 2001 From: Bruno Sastre Date: Fri, 18 Oct 2024 10:54:29 -0300 Subject: [PATCH 6/9] add "scrollable" to combo-box --- packages/mercury/showcase/combo-box.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/mercury/showcase/combo-box.html b/packages/mercury/showcase/combo-box.html index 454d2db25..1c8920b44 100644 --- a/packages/mercury/showcase/combo-box.html +++ b/packages/mercury/showcase/combo-box.html @@ -52,7 +52,7 @@

combo box

+ +
+ + +
+ + + + + @@ -130,7 +163,7 @@

combo box

diff --git a/packages/mercury/showcase/icons/index.html b/packages/mercury/showcase/icons/index.html index abde2d06c..65997c43b 100644 --- a/packages/mercury/showcase/icons/index.html +++ b/packages/mercury/showcase/icons/index.html @@ -2517,7 +2517,7 @@

dark-mode.svg
  • - Cut.svg + cut.svg
  • copy.svg @@ -2532,14 +2532,11 @@

    check.svg

  • - Card.svg + card.svg
  • card-variant.svg
  • -
  • - Assistant.svg -
  • arrow-up.svg
  • @@ -2564,6 +2561,9 @@

  • add-circle.svg
  • +
  • + Assistant.svg +
  • @@ -2745,7 +2745,7 @@

    dark-mode.svg
  • - Cut.svg + cut.svg
  • copy.svg @@ -2760,14 +2760,11 @@

    check.svg

  • - Card.svg + card.svg
  • card-variant.svg
  • -
  • - Assistant.svg -
  • arrow-up.svg
  • @@ -2792,6 +2789,9 @@

  • add-circle.svg
  • +
  • + Assistant.svg +
  • @@ -3735,30 +3735,30 @@

    synchronized.svg