@linzjs/step-ag-grid 6.1.1 → 7.0.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.css +12 -2
- package/dist/index.js +377 -202
- package/dist/index.js.map +1 -1
- package/dist/src/components/GridPopoverHook.d.ts +1 -1
- package/dist/src/components/gridForm/GridFormMultiSelect.d.ts +17 -12
- package/dist/src/components/gridPopoverEdit/GridPopoutEditMultiSelect.d.ts +1 -1
- package/dist/src/contexts/GridSubComponentContext.d.ts +1 -0
- package/dist/src/lui/ActionButton.d.ts +2 -1
- package/dist/src/lui/FormError.d.ts +2 -1
- package/dist/src/lui/TextAreaInput.d.ts +1 -1
- package/dist/src/lui/TextInputFormatted.d.ts +1 -1
- package/dist/src/react-menu3/utils/utils.d.ts +1 -0
- package/dist/src/utils/textMatcher.d.ts +13 -0
- package/dist/src/utils/textValidator.d.ts +3 -2
- package/dist/src/utils/util.d.ts +2 -1
- package/dist/step-ag-grid.esm.js +378 -204
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +9 -8
- package/src/components/GridPopoverHook.tsx +7 -1
- package/src/components/gridForm/GridFormDropDown.tsx +1 -0
- package/src/components/gridForm/GridFormMultiSelect.tsx +290 -188
- package/src/components/gridForm/GridFormPopoverMenu.tsx +1 -0
- package/src/components/gridForm/GridFormSubComponentTextArea.tsx +2 -2
- package/src/components/gridForm/GridFormSubComponentTextInput.tsx +3 -5
- package/src/components/gridForm/GridFormTextArea.tsx +13 -13
- package/src/components/gridForm/GridFormTextInput.tsx +3 -8
- package/src/components/gridPopoverEdit/GridPopoutEditMultiSelect.ts +3 -3
- package/src/contexts/GridSubComponentContext.ts +2 -0
- package/src/lui/ActionButton.tsx +26 -8
- package/src/lui/FormError.scss +7 -0
- package/src/lui/FormError.tsx +4 -13
- package/src/lui/TextAreaInput.tsx +1 -1
- package/src/lui/TextInputFormatted.tsx +1 -1
- package/src/react-menu3/components/ControlledMenu.tsx +3 -2
- package/src/react-menu3/components/MenuList.tsx +2 -12
- package/src/react-menu3/hooks/useItems.ts +5 -2
- package/src/react-menu3/utils/utils.ts +15 -0
- package/src/stories/components/ActionButton.stories.tsx +9 -0
- package/src/stories/grid/GridPopoutEditMultiSelect.stories.tsx +93 -17
- package/src/styles/Grid.scss +12 -0
- package/src/styles/lui-overrides.scss +0 -2
- package/src/utils/textMatcher.ts +31 -0
- package/src/utils/textValidator.ts +6 -3
- package/src/utils/util.ts +6 -7
package/src/utils/util.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { isEmpty
|
|
1
|
+
import { isEmpty, negate } from "lodash-es";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
export const isNotEmpty = (obj: Set<any> | Map<any, any> | Record<any, any> | any[] | undefined): boolean =>
|
|
5
|
-
!_isEmpty(obj);
|
|
3
|
+
export const isNotEmpty = negate(isEmpty);
|
|
6
4
|
|
|
7
5
|
export const wait = (timeoutMs: number) =>
|
|
8
6
|
new Promise<(string | null)[]>((resolve) => {
|
|
@@ -15,13 +13,14 @@ export const isFloat = (value: string) => {
|
|
|
15
13
|
};
|
|
16
14
|
|
|
17
15
|
export const hasParentClass = function (className: string, child: Node) {
|
|
18
|
-
let node: Node | null = child;
|
|
19
|
-
while (node) {
|
|
16
|
+
for (let node: Node | null = child; node; node = node.parentNode) {
|
|
20
17
|
// When nodes are in portals they aren't type node anymore hence treating it as any here
|
|
21
18
|
if ((node as any).classList && (node as any).classList.contains(className)) {
|
|
22
19
|
return true;
|
|
23
20
|
}
|
|
24
|
-
node = node.parentNode;
|
|
25
21
|
}
|
|
26
22
|
return false;
|
|
27
23
|
};
|
|
24
|
+
|
|
25
|
+
export const stringByteLengthIsInvalid = (str: string, maxBytes: number) =>
|
|
26
|
+
new TextEncoder().encode(str).length > maxBytes;
|