ag-common 0.0.667 → 0.0.669
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.
|
@@ -6,7 +6,8 @@ export declare const take: <T>(array: T[], num: number) => {
|
|
|
6
6
|
};
|
|
7
7
|
export declare const chunk: <T>(array: T[], max: number) => T[][];
|
|
8
8
|
export declare const partition: <T>(array: T[], func: (v: T) => boolean) => T[][] | null;
|
|
9
|
-
|
|
9
|
+
/** removes null, undefined, false, empty string */
|
|
10
|
+
export declare const notEmpty: <TValue>(value: false | "" | TValue | null | undefined) => value is TValue;
|
|
10
11
|
/**
|
|
11
12
|
* return a distinct array of items determined by a key function
|
|
12
13
|
* @param data
|
|
@@ -55,9 +55,8 @@ const partition = (array, func) => !(array === null || array === void 0 ? void 0
|
|
|
55
55
|
? null
|
|
56
56
|
: [array.filter((r) => func(r)), array.filter((r) => !func(r))];
|
|
57
57
|
exports.partition = partition;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
58
|
+
/** removes null, undefined, false, empty string */
|
|
59
|
+
const notEmpty = (value) => value !== null && value !== undefined && value !== false && value !== '';
|
|
61
60
|
exports.notEmpty = notEmpty;
|
|
62
61
|
/**
|
|
63
62
|
* return a distinct array of items determined by a key function
|
|
@@ -47,7 +47,7 @@ const Base = styled_1.default.div `
|
|
|
47
47
|
`;
|
|
48
48
|
const DropItems = styled_1.default.div `
|
|
49
49
|
flex-flow: column;
|
|
50
|
-
z-index:
|
|
50
|
+
z-index: 1;
|
|
51
51
|
display: none;
|
|
52
52
|
background-color: white;
|
|
53
53
|
cursor: default;
|
|
@@ -61,7 +61,6 @@ const DropItems = styled_1.default.div `
|
|
|
61
61
|
${(0, common_1.bounce)('data-bounced')}
|
|
62
62
|
`;
|
|
63
63
|
const ListItemStyle = styled_1.default.div `
|
|
64
|
-
z-index: 1;
|
|
65
64
|
font-weight: 500;
|
|
66
65
|
padding-left: 0.5rem;
|
|
67
66
|
flex-grow: 1;
|
package/package.json
CHANGED