@genesislcap/foundation-zero-grid-pro 14.369.0 → 14.370.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-pro.d.ts","sourceRoot":"","sources":["../../src/grid-pro.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EACL,OAAO,EAIR,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"grid-pro.d.ts","sourceRoot":"","sources":["../../src/grid-pro.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EACL,OAAO,EAIR,MAAM,uBAAuB,CAAC;AA2B/B;;GAEG;AACH,qBAAa,WAAY,SAAQ,OAAO;IAC1B,QAAQ,EAAG,GAAG,CAAC;IAE3B,iBAAiB,IAAI,IAAI;IAazB;;;OAGG;IACH,KAAK,SAGA;IAEL,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAK/C;;;OAGG;IACH,IAAI,WAAW,CAAC,OAAO,EAAE,WAAW,EA2BnC;CACF;AAGD,eAAO,MAAM,wBAAwB,EAAE,cAA+C,CAAC;AACvF,eAAO,MAAM,wBAAwB;;CAAmB,CAAC;AAEzD,eAAO,MAAM,WAAW;;;;;;;;;;sBAMtB,CAAC"}
|
|
@@ -6,4 +6,6 @@ export declare const agThemeGenesisRapidTokens: {
|
|
|
6
6
|
headerForegroundColor: import("@microsoft/fast-foundation").CSSDesignToken<Swatch>;
|
|
7
7
|
rowHoverColor: import("@microsoft/fast-foundation").CSSDesignToken<Swatch>;
|
|
8
8
|
};
|
|
9
|
+
/** @internal */
|
|
10
|
+
export declare const deriveHeightsFromTokens: () => number;
|
|
9
11
|
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../src/style/tokens.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../src/style/tokens.ts"],"names":[],"mappings":"AACA,OAAO,EAAyC,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAM3F,eAAO,MAAM,yBAAyB;;;;;;CA2BrC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,uBAAuB,cAMnC,CAAC"}
|
package/dist/esm/grid-pro.js
CHANGED
|
@@ -6,6 +6,7 @@ import { ZeroNumberEditor, ZeroSelectEditor, ZeroMultiselectEditor, ZeroDateEdit
|
|
|
6
6
|
import { ZeroEditableRenderer, ZeroAgActionRenderer, ZeroAgActionsMenuRenderer, ZeroBooleanRenderer, ZeroStatusPillRenderer, ZeroAgSelectRenderer, } from './cell-renderers';
|
|
7
7
|
import { zeroGridProStyles as styles } from './grid-pro.styles';
|
|
8
8
|
import { zeroGridProTemplate as template } from './grid-pro.template';
|
|
9
|
+
import { deriveHeightsFromTokens } from './style';
|
|
9
10
|
import { themeGenesisZero, themeGenesisZeroDark, themeGenesisZeroLight } from './themes';
|
|
10
11
|
const defaultAgHeight = 32;
|
|
11
12
|
const zeroThemeDark = 'ag-theme-genesis-rapid-dark';
|
|
@@ -44,14 +45,14 @@ export class ZeroGridPro extends GridPro {
|
|
|
44
45
|
* @override
|
|
45
46
|
*/
|
|
46
47
|
set gridOptions(options) {
|
|
47
|
-
var _a, _b, _c;
|
|
48
|
+
var _a, _b, _c, _d, _e;
|
|
48
49
|
options.components = Object.assign({ [GridProRendererTypes.action]: ZeroAgActionRenderer, [GridProRendererTypes.actionsMenu]: ZeroAgActionsMenuRenderer, [GridProRendererTypes.boolean]: ZeroBooleanRenderer, [GridProRendererTypes.editable]: ZeroEditableRenderer, [GridProRendererTypes.statusPill]: ZeroStatusPillRenderer, [GridProRendererTypes.select]: ZeroAgSelectRenderer, [GridProRendererTypes.selectEditor]: ZeroSelectEditor, [GridProRendererTypes.numberEditor]: ZeroNumberEditor, [GridProRendererTypes.multiselectEditor]: ZeroMultiselectEditor, [GridProRendererTypes.dateEditor]: ZeroDateEditor, [GridProRendererTypes.stringEditor]: ZeroStringEditor }, ((_a = options.components) !== null && _a !== void 0 ? _a : {}));
|
|
49
50
|
const isRapidTheme = this.theme === themeGenesisZero ||
|
|
50
51
|
this.theme === themeGenesisZeroDark ||
|
|
51
52
|
this.theme === themeGenesisZeroLight;
|
|
52
53
|
if (isRapidTheme) {
|
|
53
|
-
this.headerHeight = (_b = options.headerHeight) !== null && _b !== void 0 ? _b : defaultAgHeight;
|
|
54
|
-
this.rowHeight = (
|
|
54
|
+
this.headerHeight = (_c = (_b = options.headerHeight) !== null && _b !== void 0 ? _b : deriveHeightsFromTokens()) !== null && _c !== void 0 ? _c : defaultAgHeight;
|
|
55
|
+
this.rowHeight = (_e = (_d = options.rowHeight) !== null && _d !== void 0 ? _d : deriveHeightsFromTokens()) !== null && _e !== void 0 ? _e : defaultAgHeight;
|
|
55
56
|
}
|
|
56
57
|
super.gridOptions = options;
|
|
57
58
|
}
|
package/dist/esm/style/tokens.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { designTokensMap } from '@genesislcap/foundation-ui';
|
|
1
2
|
import { baseLayerLuminance, StandardLuminance } from '@microsoft/fast-components';
|
|
2
3
|
import { DesignToken } from '@microsoft/fast-foundation';
|
|
3
4
|
import { darkColors, lightColors } from './colors';
|
|
@@ -19,3 +20,12 @@ export const agThemeGenesisRapidTokens = {
|
|
|
19
20
|
? lightColors.rowHoverSwatch
|
|
20
21
|
: darkColors.rowHoverSwatch),
|
|
21
22
|
};
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const deriveHeightsFromTokens = () => {
|
|
25
|
+
const tokens = designTokensMap();
|
|
26
|
+
if (!tokens.value)
|
|
27
|
+
return null;
|
|
28
|
+
const { style, space } = tokens.value.design_tokens;
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
30
|
+
return (style.baseHeightMultiplier.$value + style.density.$value) * space.designUnit.$value - 8;
|
|
31
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-zero-grid-pro",
|
|
3
3
|
"description": "Genesis Foundation Zero Grid Pro",
|
|
4
|
-
"version": "14.
|
|
4
|
+
"version": "14.370.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -35,17 +35,17 @@
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@genesislcap/genx": "14.
|
|
39
|
-
"@genesislcap/rollup-builder": "14.
|
|
40
|
-
"@genesislcap/ts-builder": "14.
|
|
41
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
42
|
-
"@genesislcap/vite-builder": "14.
|
|
43
|
-
"@genesislcap/webpack-builder": "14.
|
|
38
|
+
"@genesislcap/genx": "14.370.0",
|
|
39
|
+
"@genesislcap/rollup-builder": "14.370.0",
|
|
40
|
+
"@genesislcap/ts-builder": "14.370.0",
|
|
41
|
+
"@genesislcap/uvu-playwright-builder": "14.370.0",
|
|
42
|
+
"@genesislcap/vite-builder": "14.370.0",
|
|
43
|
+
"@genesislcap/webpack-builder": "14.370.0"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@genesislcap/foundation-ui": "14.
|
|
47
|
-
"@genesislcap/foundation-zero": "14.
|
|
48
|
-
"@genesislcap/grid-pro": "14.
|
|
46
|
+
"@genesislcap/foundation-ui": "14.370.0",
|
|
47
|
+
"@genesislcap/foundation-zero": "14.370.0",
|
|
48
|
+
"@genesislcap/grid-pro": "14.370.0",
|
|
49
49
|
"@microsoft/fast-colors": "5.3.1",
|
|
50
50
|
"@microsoft/fast-components": "2.30.6",
|
|
51
51
|
"@microsoft/fast-element": "1.14.0",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
67
|
"customElements": "dist/custom-elements.json",
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "85079a1941403b9daee95a1cca7fc14bc5929435"
|
|
69
69
|
}
|