@genexus/mercury 0.12.0 → 0.12.2

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.
@@ -29,8 +29,8 @@ export declare const getIconPath: (iconMetadata: AssetsMetadata, vendorAlias?: s
29
29
  */
30
30
  export declare const getIconPathExpanded: (iconMetadata: AssetsMetadata, iconMetadataExpanded: AssetsMetadata, vendorAlias?: string) => `${string}/${string}/${string}${string}:${string}/${string}/${string}${string}`;
31
31
  export declare const getImagePathCallback: (iconPath: string) => GxImageMultiState | undefined;
32
- export declare const getActionListImagePathCallback: (additionalItem: ActionListItemAdditionalBase) => any;
33
- export declare const getNavigationListImagePathCallback: (itemModel: NavigationListItemModel) => any;
32
+ export declare const getActionListImagePathCallback: (additionalItem: ActionListItemAdditionalBase) => GxImageMultiState | undefined;
33
+ export declare const getNavigationListImagePathCallback: (itemModel: NavigationListItemModel) => GxImageMultiState | undefined;
34
34
  export declare const getTreeViewImagePathCallback: TreeViewImagePathCallback;
35
35
  export declare const getComboBoxImagePathCallback: ComboBoxImagePathCallback;
36
36
  /**
@@ -0,0 +1 @@
1
+ "use strict";const a={},d={},g="/",i=":";export const MERCURY_ALIAS="mer",registerAssets=(e,t,n)=>{a[e]||d[t]||(a[e]=n,d[t]=e)},getAsset=(e,t)=>{const n=d[e]??e,r=a[n];if(!r)return;const c=r.icons[t.category];if(!c)return;const o=c[t.name];if(o)return t.colorType?o[t.colorType]:o},getIconPath=(e,t=MERCURY_ALIAS)=>{const n=e.colorType?`${g}${e.colorType}`:"";return`${t}${g}${e.category}${g}${e.name}${n}`},getIconPathExpanded=(e,t,n=MERCURY_ALIAS)=>`${getIconPath(e,n)}${i}${getIconPath(t,n)}`;const l=(e,t,n)=>{const r=t===MERCURY_ALIAS?"":`-${t}`;return n?`var(--icon${r}__${e}--${n})`:`var(--icon${r}__${e})`},S=e=>{const t=e.split(g),n=t[0],r=d[n]??n;if(!a[r]){const p=t[0],m=t[1],f=t[2];return{vendor:MERCURY_ALIAS,category:p,name:m,colorType:f}}const o=t[1],s=t[2],u=t[3];return{vendor:n,category:o,name:s,colorType:u}};export const getImagePathCallback=e=>{const{vendor:t,category:n,name:r,colorType:c}=S(e),o=getAsset(t,c?{category:n,name:r,colorType:c}:{category:n,name:r});if(!o)return;const s={base:l(o.enabled.name,t)};return o.hover&&(s.hover=l(o.hover.name,t)),o.active&&(s.active=l(o.active.name,t)),o.disabled&&(s.disabled=l(o.disabled.name,t)),s},getActionListImagePathCallback=e=>e.imgSrc?getImagePathCallback(e.imgSrc):void 0,getNavigationListImagePathCallback=e=>e.startImgSrc?getImagePathCallback(e.startImgSrc):void 0,getTreeViewImagePathCallback=(e,t)=>{if(!e.startImgSrc&&t==="start"||!e.endImgSrc&&t==="end")return;const r=(t==="start"?e.startImgSrc:e.endImgSrc).split(i),c=getImagePathCallback(r[0]);if(c)return r[1]?{default:c,expanded:getImagePathCallback(r[1])}:{default:c}},getComboBoxImagePathCallback=(e,t)=>{if(!e.startImgSrc&&t==="start"||!e.endImgSrc&&t==="end")return;const n=t==="start"?e.startImgSrc:e.endImgSrc;return getImagePathCallback(n)},getImagePathCallbackDefinitions={"ch-accordion-render":getImagePathCallback,"ch-action-list-render":getActionListImagePathCallback,"ch-combo-box-render":getComboBoxImagePathCallback,"ch-navigation-list-render":getNavigationListImagePathCallback,"ch-checkbox":getImagePathCallback,"ch-edit":getImagePathCallback,"ch-image":getImagePathCallback,"ch-tree-view-render":getTreeViewImagePathCallback};