@geotab/zenith 3.1.1-beta.4 → 3.1.1-beta.6
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/formField/formField.d.ts +0 -1
- package/dist/formField/formField.js +3 -5
- package/dist/groupsFilter/groupsFilterTestData.d.ts +37 -0
- package/dist/groupsFilter/groupsFilterTestData.js +7 -0
- package/dist/groupsFilter/groupsHelper.d.ts +24 -0
- package/dist/groupsFilter/groupsHelper.js +27 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/esm/formField/formField.d.ts +0 -1
- package/esm/formField/formField.js +3 -5
- package/esm/groupsFilter/groupsFilterTestData.d.ts +37 -0
- package/esm/groupsFilter/groupsFilterTestData.js +4 -0
- package/esm/groupsFilter/groupsHelper.d.ts +24 -0
- package/esm/groupsFilter/groupsHelper.js +24 -0
- package/esm/index.d.ts +1 -1
- package/esm/index.js +1 -1
- package/package.json +1 -1
- package/dist/formField/hooks/useClasses.d.ts +0 -8
- package/dist/formField/hooks/useClasses.js +0 -25
- package/esm/formField/hooks/useClasses.d.ts +0 -8
- package/esm/formField/hooks/useClasses.js +0 -21
|
@@ -33,7 +33,6 @@ const useLoading_1 = require("./hooks/useLoading");
|
|
|
33
33
|
const useReadonly_1 = require("./hooks/useReadonly");
|
|
34
34
|
const formFieldWithLabel_1 = require("./components/formFieldWithLabel");
|
|
35
35
|
const formFieldWithoutLabel_1 = require("./components/formFieldWithoutLabel");
|
|
36
|
-
const useClasses_1 = require("./hooks/useClasses");
|
|
37
36
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
38
37
|
const FormField = function FormFieldInner(WrappedComponent) {
|
|
39
38
|
// eslint-disable-next-line complexity
|
|
@@ -52,12 +51,11 @@ const FormField = function FormFieldInner(WrappedComponent) {
|
|
|
52
51
|
// TODO: add tests
|
|
53
52
|
const banner = errorBanner || bannerComp;
|
|
54
53
|
const isInputContainerHidden = isReadonly && props.isError;
|
|
55
|
-
const { inputClassName, counter } = props, rest = __rest(props, ["inputClassName", "counter"]);
|
|
54
|
+
const { className, inputClassName, counter } = props, rest = __rest(props, ["className", "inputClassName", "counter"]);
|
|
56
55
|
const driveTextClass = (0, useDriveClassName_1.useDriveClassName)("zen-form-field__text");
|
|
57
|
-
const { componentClasses, wrapperClasses } = (0, useClasses_1.useClasses)(props, WrappedComponent);
|
|
58
56
|
// TODO: Banner? Only it or assistive text?
|
|
59
57
|
const showAdditionalInfo = (error || assistive || counter) && !isReadonly;
|
|
60
|
-
const componentClassName = (0, classNames_1.classNames)(["zen-form-field__input",
|
|
58
|
+
const componentClassName = (0, classNames_1.classNames)(["zen-form-field__input", inputClassName || ""]);
|
|
61
59
|
const ariaDescribedBy = `${assistiveId} ${trailingId} ${errorId} ${bannerId}`.trim();
|
|
62
60
|
const localId = (0, react_1.useId)();
|
|
63
61
|
const id = props.id || localId;
|
|
@@ -75,7 +73,7 @@ const FormField = function FormFieldInner(WrappedComponent) {
|
|
|
75
73
|
isMobile ? "zen-form-field--mobile" : "",
|
|
76
74
|
banner ? "zen-form-field--with-banner" : "",
|
|
77
75
|
!props.label ? "" : props.labelAlign ? `zen-form-field--label-${props.labelAlign}` : "zen-form-field--label-left",
|
|
78
|
-
|
|
76
|
+
className || ""
|
|
79
77
|
]);
|
|
80
78
|
if (isLoading) {
|
|
81
79
|
const height = WrappedComponent.displayName === textareaRaw_1.TextareaRaw.displayName ? 110 : 32;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ITypedHash } from "./groupsFilterInterfaces";
|
|
2
|
+
export declare const groupsArr: ({
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
children: {
|
|
6
|
+
id: string;
|
|
7
|
+
}[];
|
|
8
|
+
color: {
|
|
9
|
+
a: number;
|
|
10
|
+
b: number;
|
|
11
|
+
g: number;
|
|
12
|
+
r: number;
|
|
13
|
+
};
|
|
14
|
+
} | {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
children: undefined;
|
|
18
|
+
color: {
|
|
19
|
+
a: number;
|
|
20
|
+
b: number;
|
|
21
|
+
g: number;
|
|
22
|
+
r: number;
|
|
23
|
+
};
|
|
24
|
+
})[];
|
|
25
|
+
export declare const groupsArrAdvanced: ({
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
children: {
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
}[];
|
|
32
|
+
} | {
|
|
33
|
+
id: string;
|
|
34
|
+
name: string;
|
|
35
|
+
children?: undefined;
|
|
36
|
+
})[];
|
|
37
|
+
export declare const groupsMap: ITypedHash<unknown>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.groupsMap = exports.groupsArrAdvanced = exports.groupsArr = void 0;
|
|
4
|
+
const groupsFilterTestData_1 = require("../groupsFilterRaw/groupsFilterTestData");
|
|
5
|
+
exports.groupsArr = groupsFilterTestData_1.groupsArr;
|
|
6
|
+
exports.groupsArrAdvanced = groupsFilterTestData_1.groupsArrAdvanced;
|
|
7
|
+
exports.groupsMap = groupsFilterTestData_1.groupsMap;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { makeBoolHash as makeBoolHashRaw, createLinkedTree as createLinkedTreeRaw, isEntireOrganization as isEntireOrganizationRaw } from "../groupsFilterRaw/groupsHelper";
|
|
2
|
+
import { RelationOperator } from "./groupsFilterInterfaces";
|
|
3
|
+
export declare const ENTIRE_ORGANIZATION_GROUP_ID = "GroupCompanyId";
|
|
4
|
+
export declare const DEFAULT_RELATION_OPERATOR: RelationOperator;
|
|
5
|
+
export declare const getDefaultFilterState: <T extends import("..").IEntityWithId = import("..").IEntityWithId>() => import("../groupsFilterRaw/groupsFilterInterfaces").ILeafStateItem<T>;
|
|
6
|
+
export declare const systemSecurityGroups: string[];
|
|
7
|
+
export declare const rootSecurityGroups: string[];
|
|
8
|
+
export declare const rootGroups: string[];
|
|
9
|
+
export declare const rootDefectGroups: string[];
|
|
10
|
+
export declare const defaultPrivateGroupId = "GroupPrivateUserId";
|
|
11
|
+
export declare const allSystemGroups: string[];
|
|
12
|
+
export declare const makeBoolHash: typeof makeBoolHashRaw;
|
|
13
|
+
export declare const isSystemGroup: (groupId: string) => boolean;
|
|
14
|
+
export declare const getGroupDescription: (group: import("..").IEntityWithId & Partial<import("../groupsFilterRaw/groupsFilterInterfaces").INamedEntity>, translate: (s: string) => string) => string;
|
|
15
|
+
export declare const createLinkedTree: typeof createLinkedTreeRaw;
|
|
16
|
+
export declare const isIdEntity: (entity: any) => entity is import("..").IEntityWithId;
|
|
17
|
+
export declare const isEntireOrganization: typeof isEntireOrganizationRaw;
|
|
18
|
+
export declare const isFilterState: <T, U>(item: U | import("../groupsFilterRaw/groupsFilterInterfaces").IFilterState<T>) => item is import("../groupsFilterRaw/groupsFilterInterfaces").IFilterState<T>;
|
|
19
|
+
export declare const mapFilterState: <TSource, TResult>(state: import("../groupsFilterRaw/groupsFilterInterfaces").IFilterState<TSource>, mapFunc: (item: TSource) => TResult) => import("../groupsFilterRaw/groupsFilterInterfaces").IFilterState<TResult>;
|
|
20
|
+
export declare const getId: (entity: string | import("..").IEntityWithId) => string;
|
|
21
|
+
export declare const mergeItems: <TSource extends string | import("..").IEntityWithId>(items: (TSource | import("../groupsFilterRaw/groupsFilterInterfaces").IFilterState<TSource>)[][]) => (TSource | import("../groupsFilterRaw/groupsFilterInterfaces").IFilterState<TSource>)[];
|
|
22
|
+
export declare const simplifyFilterState: <TSource extends string | import("..").IEntityWithId>(state: import("../groupsFilterRaw/groupsFilterInterfaces").IFilterState<TSource>) => import("../groupsFilterRaw/groupsFilterInterfaces").IFilterState<TSource>;
|
|
23
|
+
export declare const toFilterState: (state: unknown[] | import("../groupsFilterRaw/groupsFilterInterfaces").IFilterState<string | import("..").IEntityWithId>) => import("../groupsFilterRaw/groupsFilterInterfaces").IFilterState<import("..").IEntityWithId>;
|
|
24
|
+
export declare const compareFilters: <T extends string | import("..").IEntityWithId, U extends string | import("..").IEntityWithId>(filter1: import("../groupsFilterRaw/groupsFilterInterfaces").TFilterVal<T>, filter2: import("../groupsFilterRaw/groupsFilterInterfaces").TFilterVal<U>) => boolean;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.compareFilters = exports.toFilterState = exports.simplifyFilterState = exports.mergeItems = exports.getId = exports.mapFilterState = exports.isFilterState = exports.isEntireOrganization = exports.isIdEntity = exports.createLinkedTree = exports.getGroupDescription = exports.isSystemGroup = exports.makeBoolHash = exports.allSystemGroups = exports.defaultPrivateGroupId = exports.rootDefectGroups = exports.rootGroups = exports.rootSecurityGroups = exports.systemSecurityGroups = exports.getDefaultFilterState = exports.DEFAULT_RELATION_OPERATOR = exports.ENTIRE_ORGANIZATION_GROUP_ID = void 0;
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
5
|
+
const groupsHelper_1 = require("../groupsFilterRaw/groupsHelper");
|
|
6
|
+
exports.ENTIRE_ORGANIZATION_GROUP_ID = groupsHelper_1.ENTIRE_ORGANIZATION_GROUP_ID;
|
|
7
|
+
exports.DEFAULT_RELATION_OPERATOR = groupsHelper_1.DEFAULT_RELATION_OPERATOR;
|
|
8
|
+
exports.getDefaultFilterState = groupsHelper_1.getDefaultFilterState;
|
|
9
|
+
exports.systemSecurityGroups = groupsHelper_1.systemSecurityGroups;
|
|
10
|
+
exports.rootSecurityGroups = groupsHelper_1.rootSecurityGroups;
|
|
11
|
+
exports.rootGroups = groupsHelper_1.rootGroups;
|
|
12
|
+
exports.rootDefectGroups = groupsHelper_1.rootDefectGroups;
|
|
13
|
+
exports.defaultPrivateGroupId = groupsHelper_1.defaultPrivateGroupId;
|
|
14
|
+
exports.allSystemGroups = groupsHelper_1.allSystemGroups;
|
|
15
|
+
exports.makeBoolHash = groupsHelper_1.makeBoolHash;
|
|
16
|
+
exports.isSystemGroup = groupsHelper_1.isSystemGroup;
|
|
17
|
+
exports.getGroupDescription = groupsHelper_1.getGroupDescription;
|
|
18
|
+
exports.createLinkedTree = groupsHelper_1.createLinkedTree;
|
|
19
|
+
exports.isIdEntity = groupsHelper_1.isIdEntity;
|
|
20
|
+
exports.isEntireOrganization = groupsHelper_1.isEntireOrganization;
|
|
21
|
+
exports.isFilterState = groupsHelper_1.isFilterState;
|
|
22
|
+
exports.mapFilterState = groupsHelper_1.mapFilterState;
|
|
23
|
+
exports.getId = groupsHelper_1.getId;
|
|
24
|
+
exports.mergeItems = groupsHelper_1.mergeItems;
|
|
25
|
+
exports.simplifyFilterState = groupsHelper_1.simplifyFilterState;
|
|
26
|
+
exports.toFilterState = groupsHelper_1.toFilterState;
|
|
27
|
+
exports.compareFilters = groupsHelper_1.compareFilters;
|
package/dist/index.d.ts
CHANGED
|
@@ -155,7 +155,7 @@ export { removeSameTypeClasses } from "./gridLayout/utils/removeSameTypeClasses"
|
|
|
155
155
|
export { type IGroupButton, type TGroupButton, GroupButton } from "./groupButton/groupButton";
|
|
156
156
|
export { type IGroupsFilter, type TGroupsFilter, GroupsFilter } from "./groupsFilter/groupsFilter";
|
|
157
157
|
export { type IFilterState, type TFilterVal, type ITypedHash, type IAdvancedEntitiesNavigatorDialog, type IGroupItem, type IGroupsFilterTotalState, FilterMenuStep, RelationOperator, type IGroupsFilterOptions, type IGroupTree, type IColor, type IGroupsColorTree, type INamedEntity, type IGroup, type ILinkedGroup, type ILeafStateItem } from "./groupsFilter/groupsFilterInterfaces";
|
|
158
|
-
export { ENTIRE_ORGANIZATION_GROUP_ID, DEFAULT_RELATION_OPERATOR, getDefaultFilterState, systemSecurityGroups, rootSecurityGroups, rootGroups, rootDefectGroups, defaultPrivateGroupId, allSystemGroups, makeBoolHash, isSystemGroup, getGroupDescription, createLinkedTree, isIdEntity, isEntireOrganization, isFilterState, mapFilterState, getId, mergeItems, simplifyFilterState, toFilterState, compareFilters } from "./
|
|
158
|
+
export { ENTIRE_ORGANIZATION_GROUP_ID, DEFAULT_RELATION_OPERATOR, getDefaultFilterState, systemSecurityGroups, rootSecurityGroups, rootGroups, rootDefectGroups, defaultPrivateGroupId, allSystemGroups, makeBoolHash, isSystemGroup, getGroupDescription, createLinkedTree, isIdEntity, isEntireOrganization, isFilterState, mapFilterState, getId, mergeItems, simplifyFilterState, toFilterState, compareFilters } from "./groupsFilter/groupsHelper";
|
|
159
159
|
export { groupsFilterTotalStateDefault } from "./groupsFilterRaw/types";
|
|
160
160
|
export { HeaderType, type IHeader, Header, HeaderDisplayName } from "./header/header";
|
|
161
161
|
export { type IHeaderBack, HeaderBackDisplayName, HeaderBack } from "./header/headerBack";
|
package/dist/index.js
CHANGED
|
@@ -382,7 +382,7 @@ Object.defineProperty(exports, "GroupsFilter", { enumerable: true, get: function
|
|
|
382
382
|
var groupsFilterInterfaces_1 = require("./groupsFilter/groupsFilterInterfaces");
|
|
383
383
|
Object.defineProperty(exports, "FilterMenuStep", { enumerable: true, get: function () { return groupsFilterInterfaces_1.FilterMenuStep; } });
|
|
384
384
|
Object.defineProperty(exports, "RelationOperator", { enumerable: true, get: function () { return groupsFilterInterfaces_1.RelationOperator; } });
|
|
385
|
-
var groupsHelper_1 = require("./
|
|
385
|
+
var groupsHelper_1 = require("./groupsFilter/groupsHelper");
|
|
386
386
|
Object.defineProperty(exports, "ENTIRE_ORGANIZATION_GROUP_ID", { enumerable: true, get: function () { return groupsHelper_1.ENTIRE_ORGANIZATION_GROUP_ID; } });
|
|
387
387
|
Object.defineProperty(exports, "DEFAULT_RELATION_OPERATOR", { enumerable: true, get: function () { return groupsHelper_1.DEFAULT_RELATION_OPERATOR; } });
|
|
388
388
|
Object.defineProperty(exports, "getDefaultFilterState", { enumerable: true, get: function () { return groupsHelper_1.getDefaultFilterState; } });
|
|
@@ -30,7 +30,6 @@ import { useLoading } from "./hooks/useLoading";
|
|
|
30
30
|
import { useReadonly } from "./hooks/useReadonly";
|
|
31
31
|
import { FormFieldWithLabel } from "./components/formFieldWithLabel";
|
|
32
32
|
import { FormFieldWithoutLabel } from "./components/formFieldWithoutLabel";
|
|
33
|
-
import { useClasses } from "./hooks/useClasses";
|
|
34
33
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
35
34
|
export const FormField = function FormFieldInner(WrappedComponent) {
|
|
36
35
|
// eslint-disable-next-line complexity
|
|
@@ -49,12 +48,11 @@ export const FormField = function FormFieldInner(WrappedComponent) {
|
|
|
49
48
|
// TODO: add tests
|
|
50
49
|
const banner = errorBanner || bannerComp;
|
|
51
50
|
const isInputContainerHidden = isReadonly && props.isError;
|
|
52
|
-
const { inputClassName, counter } = props, rest = __rest(props, ["inputClassName", "counter"]);
|
|
51
|
+
const { className, inputClassName, counter } = props, rest = __rest(props, ["className", "inputClassName", "counter"]);
|
|
53
52
|
const driveTextClass = useDriveClassName("zen-form-field__text");
|
|
54
|
-
const { componentClasses, wrapperClasses } = useClasses(props, WrappedComponent);
|
|
55
53
|
// TODO: Banner? Only it or assistive text?
|
|
56
54
|
const showAdditionalInfo = (error || assistive || counter) && !isReadonly;
|
|
57
|
-
const componentClassName = classNames(["zen-form-field__input",
|
|
55
|
+
const componentClassName = classNames(["zen-form-field__input", inputClassName || ""]);
|
|
58
56
|
const ariaDescribedBy = `${assistiveId} ${trailingId} ${errorId} ${bannerId}`.trim();
|
|
59
57
|
const localId = useId();
|
|
60
58
|
const id = props.id || localId;
|
|
@@ -72,7 +70,7 @@ export const FormField = function FormFieldInner(WrappedComponent) {
|
|
|
72
70
|
isMobile ? "zen-form-field--mobile" : "",
|
|
73
71
|
banner ? "zen-form-field--with-banner" : "",
|
|
74
72
|
!props.label ? "" : props.labelAlign ? `zen-form-field--label-${props.labelAlign}` : "zen-form-field--label-left",
|
|
75
|
-
|
|
73
|
+
className || ""
|
|
76
74
|
]);
|
|
77
75
|
if (isLoading) {
|
|
78
76
|
const height = WrappedComponent.displayName === TextareaRaw.displayName ? 110 : 32;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ITypedHash } from "./groupsFilterInterfaces";
|
|
2
|
+
export declare const groupsArr: ({
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
children: {
|
|
6
|
+
id: string;
|
|
7
|
+
}[];
|
|
8
|
+
color: {
|
|
9
|
+
a: number;
|
|
10
|
+
b: number;
|
|
11
|
+
g: number;
|
|
12
|
+
r: number;
|
|
13
|
+
};
|
|
14
|
+
} | {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
children: undefined;
|
|
18
|
+
color: {
|
|
19
|
+
a: number;
|
|
20
|
+
b: number;
|
|
21
|
+
g: number;
|
|
22
|
+
r: number;
|
|
23
|
+
};
|
|
24
|
+
})[];
|
|
25
|
+
export declare const groupsArrAdvanced: ({
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
children: {
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
}[];
|
|
32
|
+
} | {
|
|
33
|
+
id: string;
|
|
34
|
+
name: string;
|
|
35
|
+
children?: undefined;
|
|
36
|
+
})[];
|
|
37
|
+
export declare const groupsMap: ITypedHash<unknown>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { groupsArr as groupsArrRaw, groupsArrAdvanced as groupsArrAdvancedRaw, groupsMap as groupsMapRaw } from "../groupsFilterRaw/groupsFilterTestData";
|
|
2
|
+
export const groupsArr = groupsArrRaw;
|
|
3
|
+
export const groupsArrAdvanced = groupsArrAdvancedRaw;
|
|
4
|
+
export const groupsMap = groupsMapRaw;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { makeBoolHash as makeBoolHashRaw, createLinkedTree as createLinkedTreeRaw, isEntireOrganization as isEntireOrganizationRaw } from "../groupsFilterRaw/groupsHelper";
|
|
2
|
+
import { RelationOperator } from "./groupsFilterInterfaces";
|
|
3
|
+
export declare const ENTIRE_ORGANIZATION_GROUP_ID = "GroupCompanyId";
|
|
4
|
+
export declare const DEFAULT_RELATION_OPERATOR: RelationOperator;
|
|
5
|
+
export declare const getDefaultFilterState: <T extends import("..").IEntityWithId = import("..").IEntityWithId>() => import("../groupsFilterRaw/groupsFilterInterfaces").ILeafStateItem<T>;
|
|
6
|
+
export declare const systemSecurityGroups: string[];
|
|
7
|
+
export declare const rootSecurityGroups: string[];
|
|
8
|
+
export declare const rootGroups: string[];
|
|
9
|
+
export declare const rootDefectGroups: string[];
|
|
10
|
+
export declare const defaultPrivateGroupId = "GroupPrivateUserId";
|
|
11
|
+
export declare const allSystemGroups: string[];
|
|
12
|
+
export declare const makeBoolHash: typeof makeBoolHashRaw;
|
|
13
|
+
export declare const isSystemGroup: (groupId: string) => boolean;
|
|
14
|
+
export declare const getGroupDescription: (group: import("..").IEntityWithId & Partial<import("../groupsFilterRaw/groupsFilterInterfaces").INamedEntity>, translate: (s: string) => string) => string;
|
|
15
|
+
export declare const createLinkedTree: typeof createLinkedTreeRaw;
|
|
16
|
+
export declare const isIdEntity: (entity: any) => entity is import("..").IEntityWithId;
|
|
17
|
+
export declare const isEntireOrganization: typeof isEntireOrganizationRaw;
|
|
18
|
+
export declare const isFilterState: <T, U>(item: U | import("../groupsFilterRaw/groupsFilterInterfaces").IFilterState<T>) => item is import("../groupsFilterRaw/groupsFilterInterfaces").IFilterState<T>;
|
|
19
|
+
export declare const mapFilterState: <TSource, TResult>(state: import("../groupsFilterRaw/groupsFilterInterfaces").IFilterState<TSource>, mapFunc: (item: TSource) => TResult) => import("../groupsFilterRaw/groupsFilterInterfaces").IFilterState<TResult>;
|
|
20
|
+
export declare const getId: (entity: string | import("..").IEntityWithId) => string;
|
|
21
|
+
export declare const mergeItems: <TSource extends string | import("..").IEntityWithId>(items: (TSource | import("../groupsFilterRaw/groupsFilterInterfaces").IFilterState<TSource>)[][]) => (TSource | import("../groupsFilterRaw/groupsFilterInterfaces").IFilterState<TSource>)[];
|
|
22
|
+
export declare const simplifyFilterState: <TSource extends string | import("..").IEntityWithId>(state: import("../groupsFilterRaw/groupsFilterInterfaces").IFilterState<TSource>) => import("../groupsFilterRaw/groupsFilterInterfaces").IFilterState<TSource>;
|
|
23
|
+
export declare const toFilterState: (state: unknown[] | import("../groupsFilterRaw/groupsFilterInterfaces").IFilterState<string | import("..").IEntityWithId>) => import("../groupsFilterRaw/groupsFilterInterfaces").IFilterState<import("..").IEntityWithId>;
|
|
24
|
+
export declare const compareFilters: <T extends string | import("..").IEntityWithId, U extends string | import("..").IEntityWithId>(filter1: import("../groupsFilterRaw/groupsFilterInterfaces").TFilterVal<T>, filter2: import("../groupsFilterRaw/groupsFilterInterfaces").TFilterVal<U>) => boolean;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
2
|
+
import { ENTIRE_ORGANIZATION_GROUP_ID as ENTIRE_ORGANIZATION_GROUP_ID_RAW, DEFAULT_RELATION_OPERATOR as DEFAULT_RELATION_OPERATOR_RAW, getDefaultFilterState as getDefaultFilterStateRaw, systemSecurityGroups as systemSecurityGroupsRaw, rootSecurityGroups as rootSecurityGroupsRaw, rootGroups as rootGroupsRaw, rootDefectGroups as rootDefectGroupsRaw, defaultPrivateGroupId as defaultPrivateGroupIdRaw, makeBoolHash as makeBoolHashRaw, isSystemGroup as isSystemGroupRaw, getGroupDescription as getGroupDescriptionRaw, createLinkedTree as createLinkedTreeRaw, isIdEntity as isIdEntityRaw, isEntireOrganization as isEntireOrganizationRaw, isFilterState as isFilterStateRaw, mapFilterState as mapFilterStateRaw, getId as getIdRaw, mergeItems as mergeItemsRaw, simplifyFilterState as simplifyFilterStateRaw, toFilterState as toFilterStateRaw, compareFilters as compareFiltersRaw, allSystemGroups as allSystemGroupsRaw } from "../groupsFilterRaw/groupsHelper";
|
|
3
|
+
export const ENTIRE_ORGANIZATION_GROUP_ID = ENTIRE_ORGANIZATION_GROUP_ID_RAW;
|
|
4
|
+
export const DEFAULT_RELATION_OPERATOR = DEFAULT_RELATION_OPERATOR_RAW;
|
|
5
|
+
export const getDefaultFilterState = getDefaultFilterStateRaw;
|
|
6
|
+
export const systemSecurityGroups = systemSecurityGroupsRaw;
|
|
7
|
+
export const rootSecurityGroups = rootSecurityGroupsRaw;
|
|
8
|
+
export const rootGroups = rootGroupsRaw;
|
|
9
|
+
export const rootDefectGroups = rootDefectGroupsRaw;
|
|
10
|
+
export const defaultPrivateGroupId = defaultPrivateGroupIdRaw;
|
|
11
|
+
export const allSystemGroups = allSystemGroupsRaw;
|
|
12
|
+
export const makeBoolHash = makeBoolHashRaw;
|
|
13
|
+
export const isSystemGroup = isSystemGroupRaw;
|
|
14
|
+
export const getGroupDescription = getGroupDescriptionRaw;
|
|
15
|
+
export const createLinkedTree = createLinkedTreeRaw;
|
|
16
|
+
export const isIdEntity = isIdEntityRaw;
|
|
17
|
+
export const isEntireOrganization = isEntireOrganizationRaw;
|
|
18
|
+
export const isFilterState = isFilterStateRaw;
|
|
19
|
+
export const mapFilterState = mapFilterStateRaw;
|
|
20
|
+
export const getId = getIdRaw;
|
|
21
|
+
export const mergeItems = mergeItemsRaw;
|
|
22
|
+
export const simplifyFilterState = simplifyFilterStateRaw;
|
|
23
|
+
export const toFilterState = toFilterStateRaw;
|
|
24
|
+
export const compareFilters = compareFiltersRaw;
|
package/esm/index.d.ts
CHANGED
|
@@ -155,7 +155,7 @@ export { removeSameTypeClasses } from "./gridLayout/utils/removeSameTypeClasses"
|
|
|
155
155
|
export { type IGroupButton, type TGroupButton, GroupButton } from "./groupButton/groupButton";
|
|
156
156
|
export { type IGroupsFilter, type TGroupsFilter, GroupsFilter } from "./groupsFilter/groupsFilter";
|
|
157
157
|
export { type IFilterState, type TFilterVal, type ITypedHash, type IAdvancedEntitiesNavigatorDialog, type IGroupItem, type IGroupsFilterTotalState, FilterMenuStep, RelationOperator, type IGroupsFilterOptions, type IGroupTree, type IColor, type IGroupsColorTree, type INamedEntity, type IGroup, type ILinkedGroup, type ILeafStateItem } from "./groupsFilter/groupsFilterInterfaces";
|
|
158
|
-
export { ENTIRE_ORGANIZATION_GROUP_ID, DEFAULT_RELATION_OPERATOR, getDefaultFilterState, systemSecurityGroups, rootSecurityGroups, rootGroups, rootDefectGroups, defaultPrivateGroupId, allSystemGroups, makeBoolHash, isSystemGroup, getGroupDescription, createLinkedTree, isIdEntity, isEntireOrganization, isFilterState, mapFilterState, getId, mergeItems, simplifyFilterState, toFilterState, compareFilters } from "./
|
|
158
|
+
export { ENTIRE_ORGANIZATION_GROUP_ID, DEFAULT_RELATION_OPERATOR, getDefaultFilterState, systemSecurityGroups, rootSecurityGroups, rootGroups, rootDefectGroups, defaultPrivateGroupId, allSystemGroups, makeBoolHash, isSystemGroup, getGroupDescription, createLinkedTree, isIdEntity, isEntireOrganization, isFilterState, mapFilterState, getId, mergeItems, simplifyFilterState, toFilterState, compareFilters } from "./groupsFilter/groupsHelper";
|
|
159
159
|
export { groupsFilterTotalStateDefault } from "./groupsFilterRaw/types";
|
|
160
160
|
export { HeaderType, type IHeader, Header, HeaderDisplayName } from "./header/header";
|
|
161
161
|
export { type IHeaderBack, HeaderBackDisplayName, HeaderBack } from "./header/headerBack";
|
package/esm/index.js
CHANGED
|
@@ -147,7 +147,7 @@ export { removeSameTypeClasses } from "./gridLayout/utils/removeSameTypeClasses"
|
|
|
147
147
|
export { GroupButton } from "./groupButton/groupButton";
|
|
148
148
|
export { GroupsFilter } from "./groupsFilter/groupsFilter";
|
|
149
149
|
export { FilterMenuStep, RelationOperator } from "./groupsFilter/groupsFilterInterfaces";
|
|
150
|
-
export { ENTIRE_ORGANIZATION_GROUP_ID, DEFAULT_RELATION_OPERATOR, getDefaultFilterState, systemSecurityGroups, rootSecurityGroups, rootGroups, rootDefectGroups, defaultPrivateGroupId, allSystemGroups, makeBoolHash, isSystemGroup, getGroupDescription, createLinkedTree, isIdEntity, isEntireOrganization, isFilterState, mapFilterState, getId, mergeItems, simplifyFilterState, toFilterState, compareFilters } from "./
|
|
150
|
+
export { ENTIRE_ORGANIZATION_GROUP_ID, DEFAULT_RELATION_OPERATOR, getDefaultFilterState, systemSecurityGroups, rootSecurityGroups, rootGroups, rootDefectGroups, defaultPrivateGroupId, allSystemGroups, makeBoolHash, isSystemGroup, getGroupDescription, createLinkedTree, isIdEntity, isEntireOrganization, isFilterState, mapFilterState, getId, mergeItems, simplifyFilterState, toFilterState, compareFilters } from "./groupsFilter/groupsHelper";
|
|
151
151
|
export { groupsFilterTotalStateDefault } from "./groupsFilterRaw/types";
|
|
152
152
|
export { HeaderType, Header, HeaderDisplayName } from "./header/header";
|
|
153
153
|
export { HeaderBackDisplayName, HeaderBack } from "./header/headerBack";
|
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { TFormFieldComponentProps } from "../formField";
|
|
3
|
-
interface IUseClasses {
|
|
4
|
-
wrapperClasses?: string;
|
|
5
|
-
componentClasses?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const useClasses: <T>(props: TFormFieldComponentProps<T>, wrapperComponent: React.FC<T>) => IUseClasses;
|
|
8
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useClasses = void 0;
|
|
4
|
-
const oldFormFieldComponents = [
|
|
5
|
-
"SearchInputRaw",
|
|
6
|
-
"SelectRaw",
|
|
7
|
-
"StepperRaw",
|
|
8
|
-
"TextAreaInput",
|
|
9
|
-
"TextInputRaw"
|
|
10
|
-
];
|
|
11
|
-
// eslint-disable-next-line @typescript-eslint/comma-dangle
|
|
12
|
-
const useClasses = (props, wrapperComponent) => {
|
|
13
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
14
|
-
if (oldFormFieldComponents.includes((wrapperComponent === null || wrapperComponent === void 0 ? void 0 : wrapperComponent.displayName) || "") || oldFormFieldComponents.includes((wrapperComponent === null || wrapperComponent === void 0 ? void 0 : wrapperComponent.name) || "")) {
|
|
15
|
-
return {
|
|
16
|
-
wrapperClasses: props.wrapperClassName || props.className || "",
|
|
17
|
-
componentClasses: props.inputClassName || ""
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
return {
|
|
21
|
-
wrapperClasses: props.wrapperClassName || "",
|
|
22
|
-
componentClasses: props.inputClassName || props.className || ""
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
exports.useClasses = useClasses;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { TFormFieldComponentProps } from "../formField";
|
|
3
|
-
interface IUseClasses {
|
|
4
|
-
wrapperClasses?: string;
|
|
5
|
-
componentClasses?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const useClasses: <T>(props: TFormFieldComponentProps<T>, wrapperComponent: React.FC<T>) => IUseClasses;
|
|
8
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
const oldFormFieldComponents = [
|
|
2
|
-
"SearchInputRaw",
|
|
3
|
-
"SelectRaw",
|
|
4
|
-
"StepperRaw",
|
|
5
|
-
"TextAreaInput",
|
|
6
|
-
"TextInputRaw"
|
|
7
|
-
];
|
|
8
|
-
// eslint-disable-next-line @typescript-eslint/comma-dangle
|
|
9
|
-
export const useClasses = (props, wrapperComponent) => {
|
|
10
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
11
|
-
if (oldFormFieldComponents.includes((wrapperComponent === null || wrapperComponent === void 0 ? void 0 : wrapperComponent.displayName) || "") || oldFormFieldComponents.includes((wrapperComponent === null || wrapperComponent === void 0 ? void 0 : wrapperComponent.name) || "")) {
|
|
12
|
-
return {
|
|
13
|
-
wrapperClasses: props.wrapperClassName || props.className || "",
|
|
14
|
-
componentClasses: props.inputClassName || ""
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
return {
|
|
18
|
-
wrapperClasses: props.wrapperClassName || "",
|
|
19
|
-
componentClasses: props.inputClassName || props.className || ""
|
|
20
|
-
};
|
|
21
|
-
};
|