@linzjs/step-ag-grid 17.4.9 → 17.5.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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@linzjs/step-ag-grid",
3
3
  "repository": "github:linz/step-ag-grid.git",
4
4
  "license": "MIT",
5
- "version": "17.4.9",
5
+ "version": "17.5.0",
6
6
  "keywords": [
7
7
  "aggrid",
8
8
  "ag-grid",
@@ -84,7 +84,7 @@
84
84
  "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
85
85
  "@rollup/plugin-commonjs": "^25.0.4",
86
86
  "@rollup/plugin-json": "^6.0.0",
87
- "@rollup/plugin-node-resolve": "^15.1.0",
87
+ "@rollup/plugin-node-resolve": "^15.2.1",
88
88
  "@semantic-release/changelog": "^6.0.3",
89
89
  "@semantic-release/git": "^10.0.1",
90
90
  "@storybook/addon-essentials": "^7.2.3",
@@ -111,7 +111,7 @@
111
111
  "@typescript-eslint/parser": "^5.62.0",
112
112
  "babel-jest": "^29.6.2",
113
113
  "babel-preset-react-app": "^10.0.1",
114
- "chromatic": "^6.21.0",
114
+ "chromatic": "^6.24.1",
115
115
  "conventional-changelog-conventionalcommits": "^6.1.0",
116
116
  "css-loader": "^6.8.1",
117
117
  "eslint": "^8.47.0",
@@ -132,7 +132,7 @@
132
132
  "jest-expect-message": "^1.1.3",
133
133
  "mkdirp": "^3.0.1",
134
134
  "npm-run-all": "^4.1.5",
135
- "postcss": "^8.4.27",
135
+ "postcss": "^8.4.29",
136
136
  "postcss-loader": "^7.3.3",
137
137
  "postcss-scss": "^4.0.6",
138
138
  "prettier": "^2.8.8",
@@ -143,13 +143,13 @@
143
143
  "rollup-plugin-peer-deps-external": "^2.2.4",
144
144
  "rollup-plugin-postcss": "^4.0.2",
145
145
  "rollup-plugin-typescript2": "^0.35.0",
146
- "sass": "1.64.2",
146
+ "sass": "1.66.1",
147
147
  "sass-loader": "^13.3.2",
148
- "semantic-release": "^21.0.7",
148
+ "semantic-release": "^21.1.1",
149
149
  "storybook": "^7.2.3",
150
150
  "storybook-css-modules-preset": "^1.1.1",
151
151
  "style-loader": "^3.3.3",
152
- "stylelint": "^15.10.2",
152
+ "stylelint": "^15.10.3",
153
153
  "stylelint-config-recommended-scss": "^12.0.0",
154
154
  "stylelint-config-standard": "^34.0.0",
155
155
  "stylelint-prettier": "^3.0.0",
@@ -96,6 +96,11 @@ export interface GridProps {
96
96
  * Whether to select row on context menu.
97
97
  */
98
98
  contextMenuSelectRow?: boolean;
99
+
100
+ /**
101
+ * Defaults to false.
102
+ */
103
+ singleClickEdit?: boolean;
99
104
  }
100
105
 
101
106
  /**
@@ -109,6 +114,7 @@ export const Grid = ({
109
114
  sizeColumns = "auto",
110
115
  selectColumnPinned = null,
111
116
  contextMenuSelectRow = false,
117
+ singleClickEdit = false,
112
118
  rowHeight = theme === "ag-theme-step-default" ? 40 : theme === "ag-theme-step-compact" ? 36 : undefined,
113
119
  ...params
114
120
  }: GridProps): ReactElement => {
@@ -469,11 +475,11 @@ export const Grid = ({
469
475
  */
470
476
  const onCellClicked = useCallback(
471
477
  (event: CellEvent) => {
472
- if (event.colDef?.cellRendererParams?.singleClickEdit) {
478
+ if (event.colDef?.cellRendererParams?.singleClickEdit ?? singleClickEdit) {
473
479
  startCellEditing(event);
474
480
  }
475
481
  },
476
- [startCellEditing],
482
+ [singleClickEdit, startCellEditing],
477
483
  );
478
484
 
479
485
  /**
@@ -1,6 +1,6 @@
1
1
  @use "../../node_modules/@linzjs/lui/dist/scss/Foundation/Variables/ColorVars" as colors;
2
2
 
3
- .helpText {
3
+ .FormError-helpText {
4
4
  font-size: 0.75rem;
5
5
  color: colors.$fuscous;
6
6
  font-weight: 400;
@@ -16,7 +16,7 @@ export const FormError = (props: FormErrorProps) => {
16
16
  </span>
17
17
  )}
18
18
 
19
- {props.helpText && !props.error && <span className={"helpText"}>{props.helpText}</span>}
19
+ {props.helpText && !props.error && <span className={"FormError-helpText"}>{props.helpText}</span>}
20
20
  </>
21
21
  );
22
22
  };
@@ -1,4 +1,4 @@
1
- .LuiTextInput {
1
+ .LuiTextInput.GridLuiTextInput {
2
2
  margin-bottom: 0;
3
3
  }
4
4
 
@@ -19,7 +19,13 @@ export interface LuiTextInputProps extends DetailedHTMLProps<InputHTMLAttributes
19
19
 
20
20
  export const TextInputFormatted = (props: LuiTextInputProps): ReactElement => {
21
21
  return (
22
- <div className={clsx("LuiTextInput Grid-popoverContainer", props.error && "hasError", props.className)}>
22
+ <div
23
+ className={clsx(
24
+ "LuiTextInput GridLuiTextInput Grid-popoverContainer",
25
+ props.error && "hasError",
26
+ props.className,
27
+ )}
28
+ >
23
29
  <span className="LuiTextInput-inputWrapper">
24
30
  {/* wrapper div used for error styling */}
25
31
  <input
@@ -4,6 +4,10 @@
4
4
  gap: 12px;
5
5
  }
6
6
 
7
+ .FormTest .LuiTextInput {
8
+ margin-bottom: 0;
9
+ }
10
+
7
11
  .FormTest-textInput {
8
12
  width: 100px;
9
13
  }
@@ -10,18 +10,21 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px);
10
10
  themes: (
11
11
  'step-compact.theme-specific': (
12
12
  extend-theme: alpine,
13
- --ag-row-height: 36px,
14
- --ag-header-height: 36px,
15
- --ag-font-size: calc($grid-base-font-size - 2px),
13
+ row-height: 36px,
14
+ header-height: 36px,
15
+ font-size: calc($grid-base-font-size - 2px),
16
16
  ),
17
17
  'step-default.theme-specific': (
18
18
  extend-theme: alpine,
19
- --ag-row-height: 40px,
20
- --ag-header-height: 40px,
21
- --ag-font-size: calc($grid-base-font-size),
19
+ row-height: 40px,
20
+ header-height: 40px,
21
+ font-size: calc($grid-base-font-size),
22
22
  ),
23
23
  ),
24
24
 
25
+ input-focus-border-color: lui.$sea,
26
+ borders-input: 1px solid,
27
+ input-border-color: lui.$silver,
25
28
  alpine-active-color: lui.$sea,
26
29
  background-color: lui.$white,
27
30
  border-color: lui.$dew,
@@ -49,6 +52,10 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px);
49
52
 
50
53
  .ag-theme-step-default.theme-specific,
51
54
  .ag-theme-step-compact.theme-specific {
55
+ .ag-text-area-input:focus {
56
+ border-color: lui.$sea;
57
+ }
58
+
52
59
  .ag-cell[col-id="selection"] {
53
60
  display: flex; // Fix that when you click below checkbox it doesn't process a click
54
61
  }