@genesislcap/rapid-grid-pro 14.136.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.
Files changed (84) hide show
  1. package/README.md +8 -0
  2. package/custom-elements-manifest.config.js +14 -0
  3. package/dist/custom-elements.json +4305 -0
  4. package/dist/dts/cell-editors/date.editor.d.ts +23 -0
  5. package/dist/dts/cell-editors/date.editor.d.ts.map +1 -0
  6. package/dist/dts/cell-editors/index.d.ts +6 -0
  7. package/dist/dts/cell-editors/index.d.ts.map +1 -0
  8. package/dist/dts/cell-editors/multiselect.editor.d.ts +23 -0
  9. package/dist/dts/cell-editors/multiselect.editor.d.ts.map +1 -0
  10. package/dist/dts/cell-editors/number.editor.d.ts +23 -0
  11. package/dist/dts/cell-editors/number.editor.d.ts.map +1 -0
  12. package/dist/dts/cell-editors/select.editor.d.ts +23 -0
  13. package/dist/dts/cell-editors/select.editor.d.ts.map +1 -0
  14. package/dist/dts/cell-editors/string.editor.d.ts +23 -0
  15. package/dist/dts/cell-editors/string.editor.d.ts.map +1 -0
  16. package/dist/dts/cell-renderers/action.renderer.d.ts +23 -0
  17. package/dist/dts/cell-renderers/action.renderer.d.ts.map +1 -0
  18. package/dist/dts/cell-renderers/actions-menu.renderer.d.ts +21 -0
  19. package/dist/dts/cell-renderers/actions-menu.renderer.d.ts.map +1 -0
  20. package/dist/dts/cell-renderers/boolean.renderer.d.ts +23 -0
  21. package/dist/dts/cell-renderers/boolean.renderer.d.ts.map +1 -0
  22. package/dist/dts/cell-renderers/editable.renderer.d.ts +23 -0
  23. package/dist/dts/cell-renderers/editable.renderer.d.ts.map +1 -0
  24. package/dist/dts/cell-renderers/index.d.ts +7 -0
  25. package/dist/dts/cell-renderers/index.d.ts.map +1 -0
  26. package/dist/dts/cell-renderers/select.renderer.d.ts +23 -0
  27. package/dist/dts/cell-renderers/select.renderer.d.ts.map +1 -0
  28. package/dist/dts/cell-renderers/text.renderer.d.ts +23 -0
  29. package/dist/dts/cell-renderers/text.renderer.d.ts.map +1 -0
  30. package/dist/dts/grid-components.d.ts +113 -0
  31. package/dist/dts/grid-components.d.ts.map +1 -0
  32. package/dist/dts/grid-pro.d.ts +34 -0
  33. package/dist/dts/grid-pro.d.ts.map +1 -0
  34. package/dist/dts/grid-pro.styles.d.ts +2 -0
  35. package/dist/dts/grid-pro.styles.d.ts.map +1 -0
  36. package/dist/dts/grid-pro.template.d.ts +2 -0
  37. package/dist/dts/grid-pro.template.d.ts.map +1 -0
  38. package/dist/dts/grid-pro.types.d.ts +168 -0
  39. package/dist/dts/grid-pro.types.d.ts.map +1 -0
  40. package/dist/dts/index.d.ts +10 -0
  41. package/dist/dts/index.d.ts.map +1 -0
  42. package/dist/dts/index.federated.d.ts +1 -0
  43. package/dist/dts/index.federated.d.ts.map +1 -0
  44. package/dist/dts/style/colors.d.ts +16 -0
  45. package/dist/dts/style/colors.d.ts.map +1 -0
  46. package/dist/dts/style/index.d.ts +3 -0
  47. package/dist/dts/style/index.d.ts.map +1 -0
  48. package/dist/dts/style/tokens.d.ts +9 -0
  49. package/dist/dts/style/tokens.d.ts.map +1 -0
  50. package/dist/dts/themes/genesis-rapid/ag-theme-genesis-rapid-css.d.ts +2 -0
  51. package/dist/dts/themes/genesis-rapid/ag-theme-genesis-rapid-css.d.ts.map +1 -0
  52. package/dist/dts/themes/genesis-rapid/ag-theme-genesis-rapid.d.ts +8 -0
  53. package/dist/dts/themes/genesis-rapid/ag-theme-genesis-rapid.d.ts.map +1 -0
  54. package/dist/dts/themes/index.d.ts +2 -0
  55. package/dist/dts/themes/index.d.ts.map +1 -0
  56. package/dist/esm/cell-editors/date.editor.js +18 -0
  57. package/dist/esm/cell-editors/index.js +5 -0
  58. package/dist/esm/cell-editors/multiselect.editor.js +18 -0
  59. package/dist/esm/cell-editors/number.editor.js +18 -0
  60. package/dist/esm/cell-editors/select.editor.js +18 -0
  61. package/dist/esm/cell-editors/string.editor.js +18 -0
  62. package/dist/esm/cell-renderers/action.renderer.js +39 -0
  63. package/dist/esm/cell-renderers/actions-menu.renderer.js +23 -0
  64. package/dist/esm/cell-renderers/boolean.renderer.js +18 -0
  65. package/dist/esm/cell-renderers/editable.renderer.js +18 -0
  66. package/dist/esm/cell-renderers/index.js +6 -0
  67. package/dist/esm/cell-renderers/select.renderer.js +18 -0
  68. package/dist/esm/cell-renderers/text.renderer.js +18 -0
  69. package/dist/esm/grid-components.js +30 -0
  70. package/dist/esm/grid-pro.js +56 -0
  71. package/dist/esm/grid-pro.styles.js +16 -0
  72. package/dist/esm/grid-pro.template.js +2 -0
  73. package/dist/esm/grid-pro.types.js +162 -0
  74. package/dist/esm/index.federated.js +1 -0
  75. package/dist/esm/index.js +9 -0
  76. package/dist/esm/style/colors.js +16 -0
  77. package/dist/esm/style/index.js +2 -0
  78. package/dist/esm/style/tokens.js +21 -0
  79. package/dist/esm/themes/genesis-rapid/ag-theme-genesis-rapid-css.js +462 -0
  80. package/dist/esm/themes/genesis-rapid/ag-theme-genesis-rapid.js +82 -0
  81. package/dist/esm/themes/index.js +1 -0
  82. package/genx.config.ts +11 -0
  83. package/license.txt +46 -0
  84. package/package.json +59 -0
@@ -0,0 +1,162 @@
1
+ import { CSSVarsTokenMapper } from '@genesislcap/foundation-ui';
2
+ import { css } from '@microsoft/fast-element';
3
+ import { DI } from '@microsoft/fast-foundation';
4
+ /**
5
+ * All official AG CSS variables
6
+ * @public
7
+ */
8
+ export var AgGridCSSVars;
9
+ (function (AgGridCSSVars) {
10
+ AgGridCSSVars["foregroundColor"] = "--ag-foreground-color";
11
+ AgGridCSSVars["dataColor"] = "--ag-data-color";
12
+ AgGridCSSVars["secondaryForegroundColor"] = "--ag-secondary-foreground-color";
13
+ AgGridCSSVars["headerForegroundColor"] = "--ag-header-foreground-color";
14
+ AgGridCSSVars["disabledForegroundColor"] = "--ag-disabled-foreground-color";
15
+ AgGridCSSVars["backgroundColor"] = "--ag-background-color";
16
+ AgGridCSSVars["headerBackgroundColor"] = "--ag-header-background-color";
17
+ AgGridCSSVars["subheaderBackgroundColor"] = "--ag-subheader-background-color";
18
+ AgGridCSSVars["subheaderToolbarBackgroundColor"] = "--ag-subheader-toolbar-background-color";
19
+ AgGridCSSVars["controlPanelBackgroundColor"] = "--ag-control-panel-background-color";
20
+ AgGridCSSVars["selectedRowBackgroundColor"] = "--ag-selected-row-background-color";
21
+ AgGridCSSVars["oddRowBackgroundColor"] = "--ag-odd-row-background-color";
22
+ AgGridCSSVars["rowHoverColor"] = "--ag-row-hover-color";
23
+ AgGridCSSVars["rangeSelectionBorderColor"] = "--ag-range-selection-border-color";
24
+ AgGridCSSVars["rangeSelectionBackgroundColor"] = "--ag-range-selection-background-color";
25
+ AgGridCSSVars["selectedTabUnderlineColor"] = "--ag-selected-tab-underline-color";
26
+ AgGridCSSVars["rangeSelectionChartCategoryBackgroundColor"] = "--ag-range-selection-chart-category-background-color";
27
+ AgGridCSSVars["rangeSelectionChartBackgroundColor"] = "--ag-range-selection-chart-background-color";
28
+ AgGridCSSVars["headerCellHoverBackgroundColor"] = "--ag-header-cell-hover-background-color";
29
+ AgGridCSSVars["headerCellMovingBackgroundColor"] = "--ag-header-cell-moving-background-color";
30
+ AgGridCSSVars["chipBackgroundColor"] = "--ag-chip-background-color";
31
+ AgGridCSSVars["borderColor"] = "--ag-border-color";
32
+ AgGridCSSVars["secondaryBorderColor"] = "--ag-secondary-border-color";
33
+ AgGridCSSVars["rowBorderColor"] = "--ag-row-border-color";
34
+ AgGridCSSVars["headerColumnSeparatorColor"] = "--ag-header-column-separator-color";
35
+ AgGridCSSVars["headerColumnResizeHandleColor"] = "--ag-header-column-resize-handle-color";
36
+ AgGridCSSVars["inputBorderColor"] = "--ag-input-border-color";
37
+ AgGridCSSVars["inputDisabledBorderColor"] = "--ag-input-disabled-border-color";
38
+ AgGridCSSVars["inputDisabledBackgroundColor"] = "--ag-input-disabled-background-color";
39
+ AgGridCSSVars["checkboxBackgroundColor"] = "--ag-checkbox-background-color";
40
+ AgGridCSSVars["checkboxCheckedColor"] = "--ag-checkbox-checked-color";
41
+ AgGridCSSVars["checkboxUncheckedColor"] = "--ag-checkbox-unchecked-color";
42
+ AgGridCSSVars["checkboxIndeterminateColor"] = "--ag-checkbox-indeterminate-color";
43
+ AgGridCSSVars["toggleButtonOffBorderColor"] = "--ag-toggle-button-off-border-color";
44
+ AgGridCSSVars["toggleButtonOffBackgroundColor"] = "--ag-toggle-button-off-background-color";
45
+ AgGridCSSVars["toggleButtonOnBorderColor"] = "--ag-toggle-button-on-border-color";
46
+ AgGridCSSVars["toggleButtonOnBackgroundColor"] = "--ag-toggle-button-on-background-color";
47
+ AgGridCSSVars["toggleButtonSwitchBackgroundColor"] = "--ag-toggle-button-switch-background-color";
48
+ AgGridCSSVars["toggleButtonSwitchBorderColor"] = "--ag-toggle-button-switch-border-color";
49
+ AgGridCSSVars["minichartSelectedChartColor"] = "--ag-minichart-selected-chart-color";
50
+ AgGridCSSVars["minichartSelectedPageColor"] = "--ag-minichart-selected-page-color";
51
+ AgGridCSSVars["modalOverlayBackgroundColor"] = "--ag-modal-overlay-background-color";
52
+ AgGridCSSVars["inputFocusBoxShadow"] = "--ag-input-focus-box-shadow";
53
+ AgGridCSSVars["inputFocusBorderColor"] = "--ag-input-focus-border-color";
54
+ })(AgGridCSSVars || (AgGridCSSVars = {}));
55
+ /**
56
+ * The available Grid Pro themes.
57
+ * @public
58
+ */
59
+ export var AgGridTheme;
60
+ (function (AgGridTheme) {
61
+ AgGridTheme["alpine"] = "ag-theme-alpine";
62
+ AgGridTheme["alpineDark"] = "ag-theme-alpine-dark";
63
+ AgGridTheme["balham"] = "ag-theme-balham";
64
+ AgGridTheme["balhamDark"] = "ag-theme-balham-dark";
65
+ AgGridTheme["material"] = "ag-theme-material";
66
+ })(AgGridTheme || (AgGridTheme = {}));
67
+ /**
68
+ * Generates the class name for a given Grid Pro theme name.
69
+ * @param themeName - the Grid Pro theme name
70
+ * @returns the class name for the Grid Pro token map
71
+ * @public
72
+ * @example The result of this will be a class name that is applied to the grid part of GridPro template (actual content of the class comes from agThemeTokenMapCSS):
73
+ * ```html
74
+ * <span part="grid" class="ag-theme-genesis-rapid-dark">
75
+ * ```
76
+ */
77
+ export const agThemeTokenMapClassname = (themeName) => `${themeName}-token-map`;
78
+ /**
79
+ * Generates the id name for custom Grid Pro fonts.
80
+ * @param themeName - the Grid Pro theme name
81
+ * @returns the id name for the Grid Pro fonts
82
+ * @public
83
+ * @example The result of this is used in the id of style tag:
84
+ * ```html
85
+ * <style id="ag-theme-alpine-fonts"></style>
86
+ * ```
87
+ */
88
+ export const agThemeFontsId = (themeName) => `${themeName}-fonts`;
89
+ /**
90
+ * Generates the CSS for a given GridPro theme name and token map
91
+ * @param themeName - the GridPro theme name
92
+ * @param tokenMap - a map of CSS variables {@link @genesislcap/grid-pro#AgGridCSSVars} and custom token values
93
+ * @returns the CSS for the Grid Pro token map
94
+ * @public
95
+ * @example
96
+ * ```ts
97
+ * export const agThemeGenesisRapidTokens = {
98
+ * backgroundColor: create<Swatch>('rapid-ag-background-color').withDefault((elem: HTMLElement) =>
99
+ * baseLayerLuminance.getValueFor(elem) === StandardLuminance.LightMode
100
+ * ? lightColors.backgroundSwatch
101
+ * : darkColors.backgroundSwatch
102
+ * ),
103
+ * foregroundColor: create<Swatch>('rapid-ag-foreground-color').withDefault((elem: HTMLElement) =>
104
+ * baseLayerLuminance.getValueFor(elem) === StandardLuminance.LightMode
105
+ * ? lightColors.foregroundSwatch
106
+ * : darkColors.foregroundSwatch
107
+ * ),
108
+ * };
109
+ * export const agThemeGenesisRapidTokenMap: CSSVarTokenMap<AgGridCSSVars | string> = {
110
+ * [AgGridCSSVars.backgroundColor]: agThemeGenesisRapidTokens.backgroundColor,
111
+ * [AgGridCSSVars.foregroundColor]: agThemeGenesisRapidTokens.foregroundColor,
112
+ * };
113
+ * ```
114
+ */
115
+ export const agThemeTokenMapCSS = (themeName, tokenMap) => css `
116
+ .${agThemeTokenMapClassname(themeName)} {
117
+ ${new CSSVarsTokenMapper(tokenMap)}
118
+ }
119
+ `;
120
+ /**
121
+ * The available Grid Pro Renderer Types
122
+ * @public
123
+ */
124
+ export var GridProRendererTypes;
125
+ (function (GridProRendererTypes) {
126
+ GridProRendererTypes["action"] = "action";
127
+ GridProRendererTypes["actionsMenu"] = "actionsMenu";
128
+ GridProRendererTypes["boolean"] = "boolean";
129
+ GridProRendererTypes["editable"] = "editable";
130
+ GridProRendererTypes["text"] = "text";
131
+ GridProRendererTypes["select"] = "select";
132
+ GridProRendererTypes["dateEditor"] = "dateEditor";
133
+ GridProRendererTypes["selectEditor"] = "selectEditor";
134
+ GridProRendererTypes["numberEditor"] = "numberEditor";
135
+ GridProRendererTypes["stringEditor"] = "stringEditor";
136
+ GridProRendererTypes["multiselectEditor"] = "multiselectEditor";
137
+ })(GridProRendererTypes || (GridProRendererTypes = {}));
138
+ /**
139
+ * Event fired when grid is ready
140
+ * @public
141
+ */
142
+ export const GRID_READY_EVENT = 'onGridReady';
143
+ /**
144
+ * Key used to store currently edited column when it being synced with server side data
145
+ * @public
146
+ */
147
+ export const EDITED_COLUMN_FIELD = '__editedColumn';
148
+ /**
149
+ * Key used to store error details (column, message) when inline edit fails sync with server side data
150
+ * @public
151
+ */
152
+ export const ERROR_COLUMN_FIELD = '__errorColumn';
153
+ /**
154
+ * Default grid options
155
+ * @public
156
+ */
157
+ export const defaultGridOptionsConfig = {};
158
+ /**
159
+ * Grid options config used to inject into grids in application
160
+ * @internal
161
+ */
162
+ export const GridOptionsConfig = DI.createInterface((x) => x.instance(defaultGridOptionsConfig));
@@ -0,0 +1 @@
1
+ import('./index');
@@ -0,0 +1,9 @@
1
+ export * from './grid-pro';
2
+ export * from './grid-pro.styles';
3
+ export * from './grid-pro.template';
4
+ export * from './cell-editors';
5
+ export * from './cell-renderers';
6
+ export * from './themes';
7
+ export * from './style';
8
+ export * from './grid-components';
9
+ export * from '@genesislcap/grid-pro';
@@ -0,0 +1,16 @@
1
+ import { parseColorHexRGB } from '@microsoft/fast-colors';
2
+ import { SwatchRGB } from '@microsoft/fast-components';
3
+ export const darkColors = {
4
+ foregroundSwatch: SwatchRGB.from(parseColorHexRGB('#cccccc')),
5
+ headerForegroundSwatch: SwatchRGB.from(parseColorHexRGB('#879ba6')),
6
+ backgroundSwatch: SwatchRGB.from(parseColorHexRGB('#1f2126')),
7
+ borderSwatch: SwatchRGB.from(parseColorHexRGB('#2e3339')),
8
+ rowHoverSwatch: SwatchRGB.from(parseColorHexRGB('#2b2e34')),
9
+ };
10
+ export const lightColors = {
11
+ foregroundSwatch: SwatchRGB.from(parseColorHexRGB('#000000')),
12
+ headerForegroundSwatch: SwatchRGB.from(parseColorHexRGB('#181d1f')),
13
+ backgroundSwatch: SwatchRGB.from(parseColorHexRGB('#FFFFFF')),
14
+ borderSwatch: SwatchRGB.from(parseColorHexRGB('#babfc7')),
15
+ rowHoverSwatch: SwatchRGB.from(parseColorHexRGB('#2196f3')),
16
+ };
@@ -0,0 +1,2 @@
1
+ export * from './colors';
2
+ export * from './tokens';
@@ -0,0 +1,21 @@
1
+ import { baseLayerLuminance, StandardLuminance } from '@microsoft/fast-components';
2
+ import { DesignToken } from '@microsoft/fast-foundation';
3
+ import { darkColors, lightColors } from './colors';
4
+ const { create } = DesignToken;
5
+ export const agThemeGenesisRapidTokens = {
6
+ backgroundColor: create('rapid-ag-background-color').withDefault((elem) => baseLayerLuminance.getValueFor(elem) === StandardLuminance.LightMode
7
+ ? lightColors.backgroundSwatch
8
+ : darkColors.backgroundSwatch),
9
+ borderColor: create('rapid-ag-border-color').withDefault((elem) => baseLayerLuminance.getValueFor(elem) === StandardLuminance.LightMode
10
+ ? lightColors.borderSwatch
11
+ : darkColors.borderSwatch),
12
+ foregroundColor: create('rapid-ag-foreground-color').withDefault((elem) => baseLayerLuminance.getValueFor(elem) === StandardLuminance.LightMode
13
+ ? lightColors.foregroundSwatch
14
+ : darkColors.foregroundSwatch),
15
+ headerForegroundColor: create('rapid-ag-header-foreground-color').withDefault((elem) => baseLayerLuminance.getValueFor(elem) === StandardLuminance.LightMode
16
+ ? lightColors.headerForegroundSwatch
17
+ : darkColors.headerForegroundSwatch),
18
+ rowHoverColor: create('rapid-ag-row-hover-color').withDefault((elem) => baseLayerLuminance.getValueFor(elem) === StandardLuminance.LightMode
19
+ ? lightColors.rowHoverSwatch
20
+ : darkColors.rowHoverSwatch),
21
+ };