@genexus/mercury 0.9.8 → 0.9.9

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.
@@ -1,6 +1,7 @@
1
1
  import { GxImageMultiState, NavigationListItemModel, TreeViewImagePathCallback } from "@genexus/chameleon-controls-library";
2
2
  import { RegistryGetImagePathCallback } from "@genexus/chameleon-controls-library/dist/types/index";
3
3
  import { ActionListItemAdditionalBase } from "@genexus/chameleon-controls-library/dist/types/components/action-list/types.js";
4
+ import { ComboBoxImagePathCallback } from "@genexus/chameleon-controls-library/dist/types/components/combo-box/types.js";
4
5
  export { MercuryBundleBase, MercuryBundleComponent, MercuryBundleComponentForm, MercuryBundleFull, MercuryBundleOptimized, MercuryBundleReset, MercuryBundleUtil, MercuryBundleUtilFormFull, MercuryBundles } from "./bundles.js";
5
6
  export { getThemeBundles, getBundles } from "./bundles.js";
6
7
  export type AssetsMetadata = {
@@ -82,6 +83,7 @@ export declare const getImagePathCallback: (iconPath: string) => GxImageMultiSta
82
83
  export declare const getActionListImagePathCallback: (additionalItem: ActionListItemAdditionalBase) => GxImageMultiState | undefined;
83
84
  export declare const getNavigationListImagePathCallback: (itemModel: NavigationListItemModel) => GxImageMultiState | undefined;
84
85
  export declare const getTreeViewImagePathCallback: TreeViewImagePathCallback;
86
+ export declare const getComboBoxImagePathCallback: ComboBoxImagePathCallback;
85
87
  /**
86
88
  * This object is used to register the getImagePathCallback definitions for all
87
89
  * controls in Chameleon.
@@ -120,10 +120,9 @@ export const getImagePathCallback = (iconPath) => {
120
120
  }
121
121
  return result;
122
122
  };
123
- export const getActionListImagePathCallback = (additionalItem) => {
124
- const iconPath = additionalItem;
125
- return getImagePathCallback(iconPath);
126
- };
123
+ export const getActionListImagePathCallback = (additionalItem) => additionalItem.imgSrc
124
+ ? getImagePathCallback(additionalItem.imgSrc)
125
+ : undefined;
127
126
  export const getNavigationListImagePathCallback = (itemModel) => itemModel.startImgSrc
128
127
  ? getImagePathCallback(itemModel.startImgSrc)
129
128
  : undefined;
@@ -147,6 +146,14 @@ export const getTreeViewImagePathCallback = (item, iconDirection) => {
147
146
  }
148
147
  : { default: defaultPath };
149
148
  };
149
+ export const getComboBoxImagePathCallback = (item, iconDirection) => {
150
+ if ((!item.startImgSrc && iconDirection === "start") ||
151
+ (!item.endImgSrc && iconDirection === "end")) {
152
+ return undefined;
153
+ }
154
+ const imgSrc = iconDirection === "start" ? item.startImgSrc : item.endImgSrc;
155
+ return getImagePathCallback(imgSrc);
156
+ };
150
157
  /**
151
158
  * This object is used to register the getImagePathCallback definitions for all
152
159
  * controls in Chameleon.
@@ -159,6 +166,7 @@ export const getTreeViewImagePathCallback = (item, iconDirection) => {
159
166
  export const getImagePathCallbackDefinitions = {
160
167
  "ch-accordion-render": getImagePathCallback,
161
168
  "ch-action-list-render": getActionListImagePathCallback,
169
+ "ch-combo-box-render": getComboBoxImagePathCallback,
162
170
  "ch-navigation-list-render": getNavigationListImagePathCallback,
163
171
  "ch-checkbox": getImagePathCallback,
164
172
  "ch-edit": getImagePathCallback,