@akinon/akifilter 0.0.7
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/Utils/index.d.ts +25 -0
- package/dist/Utils/index.d.ts.map +1 -0
- package/dist/components/AppliedFilters/AppliedFilterItem.d.ts +11 -0
- package/dist/components/AppliedFilters/AppliedFilterItem.d.ts.map +1 -0
- package/dist/components/AppliedFilters/common.d.ts +7 -0
- package/dist/components/AppliedFilters/common.d.ts.map +1 -0
- package/dist/components/AppliedFilters/index.d.ts +3 -0
- package/dist/components/AppliedFilters/index.d.ts.map +1 -0
- package/dist/components/ConditionalFilters/index.d.ts +3 -0
- package/dist/components/ConditionalFilters/index.d.ts.map +1 -0
- package/dist/components/FilterContext/index.d.ts +45 -0
- package/dist/components/FilterContext/index.d.ts.map +1 -0
- package/dist/components/SelectShownFilters/index.d.ts +6 -0
- package/dist/components/SelectShownFilters/index.d.ts.map +1 -0
- package/dist/components/ShownFilters/index.d.ts +3 -0
- package/dist/components/ShownFilters/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/constants/index.d.ts +56 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/i18n/translations/en.d.ts +5 -0
- package/dist/i18n/translations/en.d.ts.map +1 -0
- package/dist/i18n/translations/tr.d.ts +5 -0
- package/dist/i18n/translations/tr.d.ts.map +1 -0
- package/dist/index.cjs +519 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +82390 -0
- package/package.json +55 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
interface TreeNode {
|
|
2
|
+
value: any;
|
|
3
|
+
children?: TreeNode[];
|
|
4
|
+
}
|
|
5
|
+
interface Params {
|
|
6
|
+
tree: TreeNode[];
|
|
7
|
+
nodeValue: any;
|
|
8
|
+
}
|
|
9
|
+
export declare function getTreeNodeByValue({ tree, nodeValue }: Params): TreeNode | null;
|
|
10
|
+
/**
|
|
11
|
+
* To understand this fragmentation, you need to know that the path is built as follows:
|
|
12
|
+
*
|
|
13
|
+
* `appPath = /{appLanguage}/{apiLanguage}/{rootPath}/{subPath}`
|
|
14
|
+
*
|
|
15
|
+
* `mainPath = rootPath + subPath`
|
|
16
|
+
*/
|
|
17
|
+
export declare const getPathFragments: (path: any) => {
|
|
18
|
+
appLanguage: any;
|
|
19
|
+
apiLanguage: any;
|
|
20
|
+
rootPath: string;
|
|
21
|
+
subPath: string;
|
|
22
|
+
mainPath: string;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Utils/index.tsx"],"names":[],"mappings":"AAEA,UAAU,QAAQ;IAChB,KAAK,EAAE,GAAG,CAAC;IACX,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;CACvB;AAED,UAAU,MAAM;IACd,IAAI,EAAE,QAAQ,EAAE,CAAC;IACjB,SAAS,EAAE,GAAG,CAAC;CAChB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,SAAS,EACV,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAiB1B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,SAAU,GAAG;;;;;;CAUzC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FilterState } from '../FilterContext';
|
|
3
|
+
type AppliedFilterItemProps = {
|
|
4
|
+
filterKeyValue: [
|
|
5
|
+
string,
|
|
6
|
+
(FilterState['appliedFilters'][string] | FilterState['appliedFilters'][string][])
|
|
7
|
+
];
|
|
8
|
+
};
|
|
9
|
+
export declare const AppliedFilterItem: ({ filterKeyValue }: AppliedFilterItemProps) => React.JSX.Element | null;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=AppliedFilterItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppliedFilterItem.d.ts","sourceRoot":"","sources":["../../../src/components/AppliedFilters/AppliedFilterItem.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AAKvB,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAOpD,KAAK,sBAAsB,GAAG;IAC5B,cAAc,EAAE;QACd,MAAM;QACN,CACI,WAAW,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC,GACrC,WAAW,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC,EAAE,CAC1C;KACF,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,iBAAiB,uBAE3B,sBAAsB,6BA4FxB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IFilterSchema } from '../FilterContext';
|
|
2
|
+
export declare const isFileObject: (value: any) => boolean;
|
|
3
|
+
export declare const getModifiedFilterValue: ({ filterItem, filterValue }: {
|
|
4
|
+
filterItem: IFilterSchema;
|
|
5
|
+
filterValue: IFilterSchema;
|
|
6
|
+
}) => any;
|
|
7
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/components/AppliedFilters/common.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,eAAO,MAAM,YAAY,UAAW,GAAG,YAAuC,CAAC;AAE/E,eAAO,MAAM,sBAAsB;;;SAoClC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AppliedFilters/index.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AAIvB,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,eAAO,MAAM,cAAc,yBAyC1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ConditionalFilters/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,eAAO,MAAM,kBAAkB,gCAyC9B,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { FormField } from '@akinon/akiform-builder';
|
|
2
|
+
import React, { Dispatch } from 'react';
|
|
3
|
+
import type { FilterProps } from '../..';
|
|
4
|
+
export type FilterState = {
|
|
5
|
+
mainPath: string;
|
|
6
|
+
appliedFilters: {
|
|
7
|
+
[key: string]: string | number | boolean | undefined;
|
|
8
|
+
};
|
|
9
|
+
applicableFilters: FormField[];
|
|
10
|
+
shownFilters: string[];
|
|
11
|
+
recreateShownFiltersCount: number;
|
|
12
|
+
};
|
|
13
|
+
export type FilterAction = {
|
|
14
|
+
type: 'SET_APPLIED_FILTERS';
|
|
15
|
+
payload: {
|
|
16
|
+
appliedFilters: FilterState['appliedFilters'];
|
|
17
|
+
};
|
|
18
|
+
} | {
|
|
19
|
+
type: 'SET_APPLICABLE_FILTERS';
|
|
20
|
+
payload: {
|
|
21
|
+
applicableFilters: FilterState['applicableFilters'];
|
|
22
|
+
};
|
|
23
|
+
} | {
|
|
24
|
+
type: 'SET_SHOWN_FILTERS';
|
|
25
|
+
payload: {
|
|
26
|
+
shownFilters: FilterState['shownFilters'];
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export type FilterContext = {
|
|
30
|
+
state: FilterState;
|
|
31
|
+
dispatch: Dispatch<FilterAction>;
|
|
32
|
+
conditionalFiltersSchema: FilterProps['conditionalFiltersSchema'];
|
|
33
|
+
};
|
|
34
|
+
type FilterContextProviderProps = FilterProps & {
|
|
35
|
+
children: React.ReactNode;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* FilterContextProvider manages both filter context and antd form state.
|
|
39
|
+
* Reason for not separating antd form state from filter context is that antd
|
|
40
|
+
* form state is tightly coupled with filter context state.
|
|
41
|
+
*/
|
|
42
|
+
export declare const FilterContextProvider: ({ children, filterSchema, customMainPath, useAppliedFilters, conditionalFiltersSchema }: FilterContextProviderProps) => React.JSX.Element;
|
|
43
|
+
export declare function useFilterContext(): FilterContext;
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FilterContext/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,EAAE,EAAiB,QAAQ,EAAyB,MAAM,OAAO,CAAC;AAI9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAGzC,MAAM,MAAM,WAAW,GAAG;IAExB,QAAQ,EAAE,MAAM,CAAC;IAEjB,cAAc,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;KAAE,CAAC;IAEzE,iBAAiB,EAAE,SAAS,EAAE,CAAC;IAE/B,YAAY,EAAE,MAAM,EAAE,CAAC;IAEvB,yBAAyB,EAAE,MAAM,CAAC;CACnC,CAAC;AAQF,MAAM,MAAM,YAAY,GACpB;IACE,IAAI,EAAE,qBAAqB,CAAC;IAC5B,OAAO,EAAE;QAAE,cAAc,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAA;KAAE,CAAC;CAC5D,GACD;IACE,IAAI,EAAE,wBAAwB,CAAC;IAC/B,OAAO,EAAE;QAAE,iBAAiB,EAAE,WAAW,CAAC,mBAAmB,CAAC,CAAA;KAAE,CAAC;CAClE,GACD;IACE,IAAI,EAAE,mBAAmB,CAAC;IAC1B,OAAO,EAAE;QAAE,YAAY,EAAE,WAAW,CAAC,cAAc,CAAC,CAAA;KAAE,CAAC;CACxD,CAAC;AAEN,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,WAAW,CAAC;IACnB,QAAQ,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAC;IACjC,wBAAwB,EAAE,WAAW,CAAC,0BAA0B,CAAC,CAAC;CACnE,CAAC;AAEF,KAAK,0BAA0B,GAAG,WAAW,GAAG;IAC9C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAIF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,4FAM/B,0BAA0B,sBA2F5B,CAAC;AAEF,wBAAgB,gBAAgB,kBAM/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SelectShownFilters/index.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AAWvB,OAAO,KAAmB,MAAM,OAAO,CAAC;AAWxC;;GAEG;AACH,eAAO,MAAM,kBAAkB,yBA6J9B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ShownFilters/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,eAAO,MAAM,YAAY,yBAiExB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.tsx"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export declare const defaultDateFormat = "DD/MM/YYYY";
|
|
2
|
+
export declare const defaultDateValueFormat = "YYYY-MM-DD";
|
|
3
|
+
export declare const defaultTimeFormat = "HH:mm";
|
|
4
|
+
export declare const defaultTimeFormatWithSeconds = "HH:mm:ss";
|
|
5
|
+
export declare const defaultTimeFormatWithTimeZone = "HH:mm:ssZZ";
|
|
6
|
+
export declare const timeFormatWithTimeZone = "HH:mmZ";
|
|
7
|
+
export declare const timeFormatWithDateAndTime = "LLL";
|
|
8
|
+
export declare const dateWithMonthName = "DD MMMM";
|
|
9
|
+
export declare const dateWithMonthNameAndYear = "DD MMMM YYYY";
|
|
10
|
+
export declare const overallDateFormat = "DD-MM-YYYY HH:mm:ss";
|
|
11
|
+
export declare const dateTimeLocalSecondsFormat = "YYYY-MM-DDTHH:mm:ss.SSS";
|
|
12
|
+
export declare const fullDateTimeWithZoneFormat = "YYYY-MM-DDTHH:mm:ss.SSS\\Z";
|
|
13
|
+
export declare const defaultDateTimeValueFormat = "YYYY-MM-DD HH:mm:ss";
|
|
14
|
+
export declare const defaultDateTimeFormat = "DD/MM/YYYY HH:mm";
|
|
15
|
+
export declare const defaultDateTimeFormatIntl: {
|
|
16
|
+
year: string;
|
|
17
|
+
month: string;
|
|
18
|
+
day: string;
|
|
19
|
+
hour: string;
|
|
20
|
+
minute: string;
|
|
21
|
+
hour12: boolean;
|
|
22
|
+
};
|
|
23
|
+
export declare const defaultDateTimeFormatWithTimeZone = "YYYY-MM-DD HH:mmZ";
|
|
24
|
+
export declare const dateTimeFormat = "YYYY-MM-DD HH:mm";
|
|
25
|
+
export declare const tokenHeaderKEY = "Bearer";
|
|
26
|
+
export declare const tokenStorageKey = "tkn";
|
|
27
|
+
export declare const googleMapApiKey = "AIzaSyB7GLs4svXGax91fiW-gH1wInjmde7cEHk";
|
|
28
|
+
export declare const permissionSlugSuffix = "-v2";
|
|
29
|
+
export declare const readResponseMessageKey = "readResponseMessages";
|
|
30
|
+
export declare const platformLanguage = "platform_language";
|
|
31
|
+
export declare const contextChannel = "contextChannel";
|
|
32
|
+
export declare const allowedFileTypes = ".xls, .csv";
|
|
33
|
+
export declare const allowedFileTypesAndXlsx: string;
|
|
34
|
+
export declare const allowedImageTypes = ".png,.jpeg,.jpg,.bmp";
|
|
35
|
+
export declare const allowedHtmlTypes = ".html";
|
|
36
|
+
export declare const omsDashboardStorageKeyName = "oms_dashboardFilters";
|
|
37
|
+
export declare const dateManipulationKeys: {
|
|
38
|
+
END_OF: string;
|
|
39
|
+
SUBTRACT: string;
|
|
40
|
+
ADD: string;
|
|
41
|
+
};
|
|
42
|
+
export declare const sampleDate = "2022-01-01";
|
|
43
|
+
export declare const defaultRowKey = "id";
|
|
44
|
+
export declare const Breakpoint: {
|
|
45
|
+
MOBILE: string;
|
|
46
|
+
TABLET: string;
|
|
47
|
+
DESKTOP: string;
|
|
48
|
+
LARGE_DESKTOP: string;
|
|
49
|
+
};
|
|
50
|
+
export declare const defaultBreakpoints: {
|
|
51
|
+
MOBILE: number;
|
|
52
|
+
TABLET: number;
|
|
53
|
+
DESKTOP: number;
|
|
54
|
+
LARGE_DESKTOP: number;
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,eAAe,CAAC;AAC9C,eAAO,MAAM,sBAAsB,eAAe,CAAC;AACnD,eAAO,MAAM,iBAAiB,UAAU,CAAC;AACzC,eAAO,MAAM,4BAA4B,aAAa,CAAC;AACvD,eAAO,MAAM,6BAA6B,eAAe,CAAC;AAC1D,eAAO,MAAM,sBAAsB,WAAW,CAAC;AAC/C,eAAO,MAAM,yBAAyB,QAAQ,CAAC;AAC/C,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAC3C,eAAO,MAAM,wBAAwB,iBAAiB,CAAC;AACvD,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AACvD,eAAO,MAAM,0BAA0B,4BAA4B,CAAC;AACpE,eAAO,MAAM,0BAA0B,+BAA+B,CAAC;AAEvE,eAAO,MAAM,0BAA0B,wBAA8D,CAAC;AACtG,eAAO,MAAM,qBAAqB,qBAA8C,CAAC;AACjF,eAAO,MAAM,yBAAyB;;;;;;;CAOrC,CAAC;AAEF,eAAO,MAAM,iCAAiC,sBAAwD,CAAC;AACvG,eAAO,MAAM,cAAc,qBAAmD,CAAC;AAE/E,eAAO,MAAM,cAAc,WAAW,CAAC;AACvC,eAAO,MAAM,eAAe,QAAQ,CAAC;AAErC,eAAO,MAAM,eAAe,4CAA4C,CAAC;AAEzE,eAAO,MAAM,oBAAoB,QAAQ,CAAC;AAE1C,eAAO,MAAM,sBAAsB,yBAAyB,CAAC;AAE7D,eAAO,MAAM,gBAAgB,sBAAsB,CAAC;AAEpD,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAE/C,eAAO,MAAM,gBAAgB,eAAe,CAAC;AAE7C,eAAO,MAAM,uBAAuB,QAA+B,CAAC;AAEpE,eAAO,MAAM,iBAAiB,yBAAyB,CAAC;AAExD,eAAO,MAAM,gBAAgB,UAAU,CAAC;AAExC,eAAO,MAAM,0BAA0B,yBAAyB,CAAC;AAEjE,eAAO,MAAM,oBAAoB;;;;CAIhC,CAAC;AAEF,eAAO,MAAM,UAAU,eAAe,CAAC;AAEvC,eAAO,MAAM,aAAa,OAAO,CAAC;AAElC,eAAO,MAAM,UAAU;;;;;CAKtB,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;CAK9B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../src/i18n/translations/en.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,MAAM;;CAEF,CAAC;AAEX,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tr.d.ts","sourceRoot":"","sources":["../../../src/i18n/translations/tr.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,MAAM;;CAEF,CAAC;AAEX,eAAe,MAAM,CAAC"}
|