@genexus/mercury 1.1.1 → 1.2.1

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