@siemens/ix-aggrid 5.0.1 → 5.1.0
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.
package/dist/index.js
CHANGED
|
@@ -35,7 +35,7 @@ const aggridIxThemeParams = {
|
|
|
35
35
|
borderColor: `var(--theme-color-x-weak-bdr)`,
|
|
36
36
|
headerBackgroundColor: `var(--theme-color-2)`,
|
|
37
37
|
tooltipBackgroundColor: `var(--theme-color-2)`,
|
|
38
|
-
oddRowBackgroundColor: `var(--theme-color-
|
|
38
|
+
oddRowBackgroundColor: `var(--theme-color-2)`,
|
|
39
39
|
sideBarBackgroundColor: `var(--theme-color-2)`,
|
|
40
40
|
invalidColor: `var(--theme-color-alarm)`,
|
|
41
41
|
checkboxUncheckedBorderColor: `var(--theme-color-contrast-bdr)`,
|
|
@@ -108,7 +108,6 @@ const aggridIxThemeParams = {
|
|
|
108
108
|
sideButtonsBarBackgroundColor: `var(--theme-color-2)`,
|
|
109
109
|
sideButtonHoverBackgroundColor: `var(--theme-color-ghost--hover)`,
|
|
110
110
|
checkboxCheckedShapeColor: `var(--theme-color-primary--contrast)`,
|
|
111
|
-
OddRowBackgroundColor: `var(--theme-color-ghost-alt)`,
|
|
112
111
|
tabBackgroundColor: `rgba(255, 255, 255, 0)`,
|
|
113
112
|
tabBorderColor: `rgba(24, 29, 31, 0.15)`,
|
|
114
113
|
tabHoverBackgroundColor: `rgba(255, 255, 255, 0)`,
|
|
@@ -724,6 +723,9 @@ const iconSortAscending = "data:image/svg+xml;utf8,<?xml version='1.0' encoding=
|
|
|
724
723
|
const iconSortDescending = "data:image/svg+xml;utf8,<?xml version='1.0' encoding='UTF-8'?><svg width='512px' height='512px' viewBox='0 0 512 512' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'><desc>sort-descending</desc><g id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'><g id='add' transform='translate(64.000000, 106.666667)'><path d='M-4.26325641e-14,213.333333 L106.666667,213.333333 L106.666667,256 L-4.26325641e-14,256 L-4.26325641e-14,213.333333 Z M-4.26325641e-14,149.333333 L149.333333,149.333333 L149.333333,106.666667 L-4.26325641e-14,106.666667 L-4.26325641e-14,149.333333 Z M-4.26325641e-14,42.6666667 L192,42.6666667 L192,-2.84217094e-14 L-4.26325641e-14,-2.84217094e-14 L-4.26325641e-14,42.6666667 Z M368.916693,189.31904 L320,238.235733 L320,-2.84217094e-14 L277.333333,-2.84217094e-14 L277.333333,238.235733 L228.41664,189.31904 L198.250027,219.485653 L298.666667,320 L399.083307,219.485653 L368.916693,189.31904 Z' id='Shape'/></g></g></svg>";
|
|
725
724
|
|
|
726
725
|
const additionalThemeParams = { fontFamily: ['Siemens Sans', 'sans-serif'] };
|
|
726
|
+
const stripedRowThemeParams = {
|
|
727
|
+
oddRowBackgroundColor: 'var(--theme-color-1)',
|
|
728
|
+
};
|
|
727
729
|
function extractSvgFromDataUri(dataUri) {
|
|
728
730
|
let svgString = dataUri.replace(/^data:image\/svg\+xml;utf8,/, '');
|
|
729
731
|
svgString = decodeURIComponent(svgString);
|
|
@@ -732,11 +734,15 @@ function extractSvgFromDataUri(dataUri) {
|
|
|
732
734
|
svgString = svgString.replace(/stroke='none'/g, "stroke='currentColor'");
|
|
733
735
|
return svgString.trim();
|
|
734
736
|
}
|
|
735
|
-
function createIxTheme(agModule) {
|
|
737
|
+
function createIxTheme(agModule, options) {
|
|
736
738
|
const { createPart, themeAlpine } = agModule;
|
|
737
|
-
const
|
|
739
|
+
const themeParams = {
|
|
738
740
|
...aggridIxThemeParams,
|
|
739
741
|
...additionalThemeParams,
|
|
742
|
+
...(options?.stripedRows ? stripedRowThemeParams : {}),
|
|
743
|
+
};
|
|
744
|
+
const base = themeAlpine.withParams({
|
|
745
|
+
...themeParams,
|
|
740
746
|
});
|
|
741
747
|
const iconCSS = iconOverrides({
|
|
742
748
|
icons: {
|
|
@@ -790,12 +796,12 @@ function createIxTheme(agModule) {
|
|
|
790
796
|
}));
|
|
791
797
|
return theme;
|
|
792
798
|
}
|
|
793
|
-
const getIxTheme = (agModule) => {
|
|
794
|
-
return createIxTheme(agModule);
|
|
799
|
+
const getIxTheme = (agModule, options) => {
|
|
800
|
+
return createIxTheme(agModule, options);
|
|
795
801
|
};
|
|
796
|
-
const getIxThemeAsync = async (importModule) => {
|
|
802
|
+
const getIxThemeAsync = async (importModule, options) => {
|
|
797
803
|
const agLib = await importModule();
|
|
798
|
-
return createIxTheme(agLib);
|
|
804
|
+
return createIxTheme(agLib, options);
|
|
799
805
|
};
|
|
800
806
|
|
|
801
807
|
export { getIxTheme, getIxThemeAsync };
|