@epam/statgpt-conversation-view 0.3.0-rc.9 → 0.3.1
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/components/AdvancedView/TableSettings/AgGridColumnPanel/helpers.d.ts +13 -0
- package/components/AdvancedView/TableSettings/AgGridColumnPanel/types.d.ts +11 -0
- package/components/AdvancedView/TableSettings/AgGridColumnPanel/useAgGridColumnGridListeners.d.ts +2 -0
- package/components/AdvancedView/TableSettings/AgGridColumnPanel/useAgGridColumnPreferences.d.ts +9 -0
- package/components/AdvancedView/TableSettings/AgGridColumnPanel/useAgGridColumnsPanel.d.ts +15 -0
- package/constants/attachments.d.ts +2 -2
- package/constants/cross-dataset-grid.d.ts +11 -0
- package/index.js +7 -7
- package/index.mjs +4864 -3494
- package/models/actions.d.ts +3 -1
- package/models/attachments-styles.d.ts +2 -0
- package/models/attachments.d.ts +1 -1
- package/models/filters.d.ts +21 -5
- package/models/structure-data.d.ts +4 -3
- package/models/titles.d.ts +3 -0
- package/package.json +6 -6
- package/types/actions.d.ts +2 -0
- package/utils/attachments/attachment-parser.d.ts +1 -0
- package/utils/attachments/attachments-data.d.ts +3 -4
- package/utils/attachments/cross-dataset-grid/build-cross-dataset-grid-attachment.d.ts +13 -0
- package/utils/attachments/cross-dataset-grid/build-cross-dataset-grid-columns.d.ts +5 -0
- package/utils/attachments/cross-dataset-grid/build-cross-dataset-grid-data.d.ts +5 -0
- package/utils/attachments/cross-dataset-grid/dataset-info-columns.d.ts +4 -0
- package/utils/attachments/cross-dataset-grid/dimensions-columns.d.ts +4 -0
- package/utils/attachments/cross-dataset-grid/timeseries-columns.d.ts +5 -0
- package/utils/duplicate-conversation-attachments.d.ts +9 -0
- package/utils/filters.d.ts +22 -5
- package/utils/get-filled-filters.d.ts +30 -2
- package/utils/get-series-filters.d.ts +1 -1
- package/utils/multiple-filters.d.ts +37 -0
- package/utils/query-filters.d.ts +2 -2
package/models/actions.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GetAttachmentContent, GetBucket, GetDatasetData, GetDatasetDetails, UpdateConversation, getConstraints, CreateConversation, RateResponse, PutOnboardingFile } from '../types/actions';
|
|
1
|
+
import { GetAttachmentContent, GetAttachmentBlob, GetBucket, GetDatasetData, GetDatasetDetails, UpdateConversation, getConstraints, CreateConversation, RateResponse, PutOnboardingFile, PutFile } from '../types/actions';
|
|
2
2
|
import { DataQuery } from '../../../shared-toolkit/src/index';
|
|
3
3
|
import { Dataflow } from '../../../sdmx-toolkit/src/index';
|
|
4
4
|
import { DownloadDatasetAction } from '../../../download-panel/src/types/actions';
|
|
@@ -19,8 +19,10 @@ export type ConversationViewActions = AttachmentsActions & {
|
|
|
19
19
|
getConversation: GetConversation;
|
|
20
20
|
getConversations: (locale: string) => Promise<ConversationInfo[]>;
|
|
21
21
|
getBucket: GetBucket;
|
|
22
|
+
getFileBlob?: GetAttachmentBlob;
|
|
22
23
|
updateConversation: UpdateConversation;
|
|
23
24
|
createConversation: CreateConversation;
|
|
25
|
+
putFile?: PutFile;
|
|
24
26
|
rateResponse: RateResponse;
|
|
25
27
|
};
|
|
26
28
|
export type AdvancedViewActions = AttachmentsActions;
|
|
@@ -12,6 +12,8 @@ export interface AttachmentsStyles {
|
|
|
12
12
|
openLinkTitle?: string;
|
|
13
13
|
dataGridTitle?: string;
|
|
14
14
|
downloadTitle?: string;
|
|
15
|
+
columnsTitle?: string;
|
|
16
|
+
columnsResetTitle?: string;
|
|
15
17
|
closeTitle?: string;
|
|
16
18
|
successDownloadIcon?: ReactNode;
|
|
17
19
|
errorDownloadIcon?: ReactNode;
|
package/models/attachments.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export interface CustomGridAttachment extends Attachment {
|
|
|
11
11
|
columns: ColDef[];
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
export interface
|
|
14
|
+
export interface CrossDatasetGridAttachmentType extends Attachment {
|
|
15
15
|
gridContent?: {
|
|
16
16
|
data: GridData[];
|
|
17
17
|
columns: ColDef[];
|
package/models/filters.d.ts
CHANGED
|
@@ -5,7 +5,8 @@ import { LimitMessages } from '../../../ui-components/src/index';
|
|
|
5
5
|
import { PutOnboardingFile, UpdateConversation } from '../types/actions';
|
|
6
6
|
import { Conversation } from '@epam/ai-dial-shared';
|
|
7
7
|
import { ConversationViewTitles } from './titles';
|
|
8
|
-
|
|
8
|
+
import { StructureDataMaps } from './structure-data';
|
|
9
|
+
interface FilterBase {
|
|
9
10
|
id?: string;
|
|
10
11
|
title?: string;
|
|
11
12
|
dimensionValues?: FilterValue[];
|
|
@@ -16,12 +17,28 @@ export interface Filter {
|
|
|
16
17
|
isDisabled?: boolean;
|
|
17
18
|
displayMode?: string;
|
|
18
19
|
}
|
|
20
|
+
export interface DatasetFilter extends FilterBase {
|
|
21
|
+
filterType: 'dataset';
|
|
22
|
+
datasetUrn?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface SharedFilter extends FilterBase {
|
|
25
|
+
filterType: 'shared';
|
|
26
|
+
datasetUrn?: undefined;
|
|
27
|
+
}
|
|
28
|
+
export type Filter = DatasetFilter | SharedFilter;
|
|
29
|
+
export interface FilterValueSource {
|
|
30
|
+
datasetUrn?: string;
|
|
31
|
+
id: string;
|
|
32
|
+
name?: string;
|
|
33
|
+
parent?: string;
|
|
34
|
+
}
|
|
19
35
|
export interface FilterValue {
|
|
20
36
|
id: string;
|
|
21
37
|
name?: string;
|
|
22
38
|
isSelectedValue?: boolean;
|
|
23
39
|
isExpanded?: boolean;
|
|
24
40
|
parent?: string;
|
|
41
|
+
sourceValues?: FilterValueSource[];
|
|
25
42
|
}
|
|
26
43
|
export interface FilterTreeNodeProps extends FilterValue {
|
|
27
44
|
children?: FilterTreeNodeProps[];
|
|
@@ -53,13 +70,10 @@ export interface FiltersProps {
|
|
|
53
70
|
putOnboardingFile?: PutOnboardingFile;
|
|
54
71
|
};
|
|
55
72
|
dimensions?: Dimension[];
|
|
56
|
-
dimensionsMap?: Map<string, Dimension[]>;
|
|
57
73
|
structureDimensions?: StructureItemBase[];
|
|
58
|
-
structureDimensionsMap?: Map<string, StructureItemBase[]>;
|
|
59
74
|
structures?: StructuralData;
|
|
60
|
-
structuresMap?: Map<string, StructuralData | undefined>;
|
|
61
75
|
initialConstraints?: DataConstraints[];
|
|
62
|
-
|
|
76
|
+
structureDataMaps?: StructureDataMaps;
|
|
63
77
|
buttonProps?: FilterButtonProps;
|
|
64
78
|
modalProps?: FiltersModalProps;
|
|
65
79
|
attachmentsDataQuery?: DataQuery;
|
|
@@ -75,4 +89,6 @@ export interface FiltersProps {
|
|
|
75
89
|
updateDataQueries?: (dataQueries?: DataQuery[]) => void;
|
|
76
90
|
limitMessages?: LimitMessages;
|
|
77
91
|
filterIconClassName?: string;
|
|
92
|
+
datasetIcon?: ReactNode;
|
|
78
93
|
}
|
|
94
|
+
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { Dataflow, DataMessage, Dimension, StructuralData, StructureItemBase } from '../../../sdmx-toolkit/src/index';
|
|
2
|
-
export interface
|
|
1
|
+
import { DataConstraints, Dataflow, DataMessage, Dimension, StructuralData, StructureItemBase } from '../../../sdmx-toolkit/src/index';
|
|
2
|
+
export interface StructureDataMaps {
|
|
3
3
|
datasetsMap?: Map<string, Dataflow | undefined>;
|
|
4
4
|
dataMessagesMap?: Map<string, DataMessage | null>;
|
|
5
|
-
structuresMap?: Map<string, StructuralData>;
|
|
5
|
+
structuresMap?: Map<string, StructuralData | undefined>;
|
|
6
6
|
dimensionsMap?: Map<string, Dimension[]>;
|
|
7
7
|
structureDimensionsMap?: Map<string, StructureItemBase[]>;
|
|
8
|
+
constraintsMap?: Map<string, DataConstraints[] | undefined>;
|
|
8
9
|
}
|
|
9
10
|
export interface DatasetData {
|
|
10
11
|
dataMessage: DataMessage | null;
|
package/models/titles.d.ts
CHANGED
|
@@ -83,5 +83,8 @@ export interface ConversationViewTitles extends WelcomeViewTitles {
|
|
|
83
83
|
metadataPerDatasetDescription?: string;
|
|
84
84
|
exitAdvancedViewTitle?: string;
|
|
85
85
|
exitAdvancedViewDescription?: string;
|
|
86
|
+
countryDimensions?: string;
|
|
87
|
+
indicatorDimensions?: string;
|
|
88
|
+
frequency?: string;
|
|
86
89
|
}
|
|
87
90
|
export {};
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/statgpt-conversation-view",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"classnames": "^2.5.1",
|
|
7
7
|
"@epam/ai-dial-shared": "^0.43.3",
|
|
8
8
|
"@tabler/icons-react": "^3.34.1",
|
|
9
|
-
"@epam/statgpt-shared-toolkit": "0.3.
|
|
10
|
-
"@epam/statgpt-ui-components": "0.3.
|
|
11
|
-
"@epam/statgpt-sdmx-toolkit": "0.3.
|
|
9
|
+
"@epam/statgpt-shared-toolkit": "0.3.1",
|
|
10
|
+
"@epam/statgpt-ui-components": "0.3.1",
|
|
11
|
+
"@epam/statgpt-sdmx-toolkit": "0.3.1",
|
|
12
12
|
"react-window": "^1.8.11",
|
|
13
13
|
"react-virtualized-auto-sizer": "^1.0.26",
|
|
14
14
|
"ag-grid-community": "33.3.2",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"@floating-ui/react": "^0.27.14",
|
|
17
17
|
"echarts": "^5.6.0",
|
|
18
18
|
"echarts-for-react": "^3.0.2",
|
|
19
|
-
"@epam/statgpt-dial-toolkit": "0.3.
|
|
19
|
+
"@epam/statgpt-dial-toolkit": "0.3.1",
|
|
20
20
|
"react-markdown": "^10.1.0",
|
|
21
21
|
"remark-gfm": "^4.0.1",
|
|
22
|
-
"@epam/statgpt-conversation-list": "0.3.
|
|
22
|
+
"@epam/statgpt-conversation-list": "0.3.1",
|
|
23
23
|
"flatpickr": "4.6.13",
|
|
24
24
|
"react-flatpickr": "^4.0.11",
|
|
25
25
|
"date-fns": "^4.1.0",
|
package/types/actions.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { DataMessage, DatasetQueryFilters, SdmxReferences, SeriesFilterDto, Stru
|
|
|
3
3
|
import { OnboardingFileSchema, TimeRange } from '../../../shared-toolkit/src/index';
|
|
4
4
|
import { Conversation, ConversationInfo, Entity } from '@epam/ai-dial-shared';
|
|
5
5
|
export type GetAttachmentContent = (fileId: string) => Promise<GridAttachmentContent | null>;
|
|
6
|
+
export type GetAttachmentBlob = (fileId: string) => Promise<Blob>;
|
|
6
7
|
export type GetDatasetDetails = (datasetId: string, references?: SdmxReferences) => Promise<StructuralMetaData | null>;
|
|
7
8
|
export type GetDatasetData = (datasetId: string, filters: DatasetQueryFilters) => Promise<DataMessage | null>;
|
|
8
9
|
export type CreateConversation = (conversation: Conversation, locale: string) => Promise<ConversationInfo>;
|
|
@@ -13,3 +14,4 @@ export type UpdateConversation = (conversationId: string, request: UpdateConvers
|
|
|
13
14
|
export type getConstraints = (urn: string, filters?: SeriesFilterDto[], timeRange?: TimeRange) => Promise<StructuralMetaData>;
|
|
14
15
|
export type RateResponse = (id: string, rate: boolean, deploymentId: string) => Promise<void>;
|
|
15
16
|
export type PutOnboardingFile = (fileName: string, filePath: string, fileData: OnboardingFileSchema) => Promise<Entity | null>;
|
|
17
|
+
export type PutFile = (filePath: string, file: Blob) => Promise<void>;
|
|
@@ -10,3 +10,4 @@ export declare function isCustomGridAttachment(attachment: Attachment): boolean;
|
|
|
10
10
|
export declare function isCustomChartAttachment(attachment: Attachment): boolean;
|
|
11
11
|
export declare function isChartAttachment(attachment: Attachment): boolean;
|
|
12
12
|
export declare function isCustomCodeSampleAttachment(attachment: Attachment): boolean;
|
|
13
|
+
export declare function isCrossDatasetGrid(attachment: Attachment): boolean;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { DataQuery } from '../../../../shared-toolkit/src/index';
|
|
2
|
-
import { DataConstraints
|
|
2
|
+
import { DataConstraints } from '../../../../sdmx-toolkit/src/index';
|
|
3
3
|
import { getConstraints, GetDatasetData, GetDatasetDetails } from '../../types/actions';
|
|
4
|
-
import {
|
|
4
|
+
import { StructureDataMaps } from '../../models/structure-data';
|
|
5
5
|
export declare const getDataConstraintsMap: (dataQueries: DataQuery[], getConstraintsAction: getConstraints) => Promise<Map<string, DataConstraints[]>>;
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const getDataSetData: (dataQuery: DataQuery, filterParams: DatasetQueryFilters, getDataSetDataAction: GetDatasetData) => Promise<DatasetData>;
|
|
6
|
+
export declare const getStructureDataMaps: (dataQueries: DataQuery[], getDataSetAction: GetDatasetDetails, getDataSetDataAction: GetDatasetData, setIsLoadingGridData: (isLoading: boolean) => void) => Promise<StructureDataMaps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ColDef } from 'ag-grid-community';
|
|
2
|
+
import { DataConstraints, DataMessage, DatasetDimensionsScheme, StructuralData } from '../../../../../sdmx-toolkit/src/index';
|
|
3
|
+
import { DataQuery, FormatNumbersType, TimeRange } from '../../../../../shared-toolkit/src/index';
|
|
4
|
+
import { MetadataSettings } from '../../../models/metadata';
|
|
5
|
+
import { CrossDatasetGridAttachmentType } from '../../../models/attachments';
|
|
6
|
+
import { GridData } from '../../../types/data-grid/grid-data';
|
|
7
|
+
import { ChartingStyles } from '../../../models/attachments-styles';
|
|
8
|
+
import { ConversationViewTitles } from '../../../models/titles';
|
|
9
|
+
export declare function buildCrossDatasetGridAttachment(structuresMap: Map<string, StructuralData | undefined>, dataMessageMap: Map<string, DataMessage | null>, datasetDimensionsSchemeMap: Map<string, DatasetDimensionsScheme | undefined>, dataQueries: DataQuery[], locale: string, formattingSettings?: FormatNumbersType, metadataSettings?: MetadataSettings, chartStyles?: ChartingStyles, titles?: ConversationViewTitles, constraintsMap?: Map<string, DataConstraints[]>, selectedTimePeriod?: TimeRange): Partial<CrossDatasetGridAttachmentType>;
|
|
10
|
+
export declare function buildCrossDatasetGridContent(structuresMap: Map<string, StructuralData | undefined>, dataMessagesMap: Map<string, DataMessage | null>, datasetDimensionsSchemesMap: Map<string, DatasetDimensionsScheme | undefined>, dataQueries: DataQuery[], locale: string, formattingSettings?: FormatNumbersType, metadataSettings?: MetadataSettings, chartStyles?: ChartingStyles, titles?: ConversationViewTitles, constraintsMap?: Map<string, DataConstraints[]>, selectedTimePeriod?: TimeRange): {
|
|
11
|
+
data: GridData[];
|
|
12
|
+
columns: ColDef[];
|
|
13
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DataMessage, DatasetDimensionsScheme, StructuralData } from '../../../../../sdmx-toolkit/src/index';
|
|
2
|
+
import { FormatNumbersType } from '../../../../../shared-toolkit/src/index';
|
|
3
|
+
import { ColDef } from 'ag-grid-community';
|
|
4
|
+
import { ConversationViewTitles } from '../../../models/titles';
|
|
5
|
+
export declare function buildCrossDatasetGridColumns(structuresMap: Map<string, StructuralData | undefined>, datasetDimensionsSchemesMap: Map<string, DatasetDimensionsScheme | undefined>, dataMessagesMap: Map<string, DataMessage | null>, locale: string, titles?: ConversationViewTitles, formattingSettings?: FormatNumbersType): ColDef[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { GridData } from '../../../types/data-grid/grid-data';
|
|
2
|
+
import { DataMessage, StructuralData } from '../../../../../sdmx-toolkit/src/index';
|
|
3
|
+
import { DataQuery } from '../../../../../shared-toolkit/src/index';
|
|
4
|
+
import { ChartingStyles } from '../../../index';
|
|
5
|
+
export declare function buildCrossDatasetGridData(structuresMap: Map<string, StructuralData | undefined>, dataMessagesMap: Map<string, DataMessage | null>, dataQueries: DataQuery[], locale: string, chartStyles?: ChartingStyles): GridData[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { StructuralData } from '../../../../../sdmx-toolkit/src/index';
|
|
2
|
+
import { ColDef } from 'ag-grid-community';
|
|
3
|
+
import { ConversationViewTitles } from '../../../models/titles';
|
|
4
|
+
export declare function getCrossDatasetInfoColumns(structuresMap: Map<string, StructuralData | undefined>, locale: string, titles?: ConversationViewTitles): ColDef[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DatasetDimensionsScheme, StructuralData } from '../../../../../sdmx-toolkit/src/index';
|
|
2
|
+
import { ColDef } from 'ag-grid-community';
|
|
3
|
+
import { ConversationViewTitles } from '../../../models/titles';
|
|
4
|
+
export declare function getCrossDatasetDimensionsColumns(structuresMap: Map<string, StructuralData | undefined>, datasetDimensionsSchemesMap: Map<string, DatasetDimensionsScheme | undefined>, locale: string, titles?: ConversationViewTitles): ColDef[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DataMessage } from '../../../../../sdmx-toolkit/src/index';
|
|
2
|
+
import { FormatNumbersType } from '../../../../../shared-toolkit/src/index';
|
|
3
|
+
import { ColDef } from 'ag-grid-community';
|
|
4
|
+
import { ConversationViewTitles } from '../../../models/titles';
|
|
5
|
+
export declare function getCrossDatasetTimeseriesColumns(dataMessagesMap: Map<string, DataMessage | null>, formattingSettings?: FormatNumbersType, titles?: ConversationViewTitles): ColDef[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Conversation } from '@epam/ai-dial-shared';
|
|
2
|
+
interface DuplicateConversationAttachmentsOptions {
|
|
3
|
+
conversation: Conversation;
|
|
4
|
+
bucket: string;
|
|
5
|
+
getFileBlob: (filePath: string) => Promise<Blob>;
|
|
6
|
+
putFile: (filePath: string, file: Blob) => Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
export declare const duplicateConversationAttachments: ({ conversation, bucket, getFileBlob, putFile, }: DuplicateConversationAttachmentsOptions) => Promise<Conversation>;
|
|
9
|
+
export {};
|
package/utils/filters.d.ts
CHANGED
|
@@ -3,18 +3,23 @@ import { Filter, FilterTreeNodeProps, FilterValue } from '../models/filters';
|
|
|
3
3
|
import { DataQuery } from '../../../shared-toolkit/src/index';
|
|
4
4
|
import { FilterDisplayMode } from '../constants/filter-display-mode';
|
|
5
5
|
import { ConversationViewTitles } from '../models/titles';
|
|
6
|
-
export declare const getDatasetFilters: (dimensions?: Dimension[], structures?: StructuralData, structureDimensions?: StructureItemBase[], locale?: string) => Filter[];
|
|
6
|
+
export declare const getDatasetFilters: (dimensions?: Dimension[], structures?: StructuralData, structureDimensions?: StructureItemBase[], locale?: string, datasetUrn?: string) => Filter[];
|
|
7
|
+
export declare const isSharedFilter: (filter?: Filter) => boolean;
|
|
8
|
+
export declare const getFilterIdentity: (filter?: Filter) => string | undefined;
|
|
9
|
+
export declare const isSameFilter: (left?: Filter, right?: Filter) => boolean;
|
|
7
10
|
export declare const updateFiltersWithSelectedItem: (filters: Filter[], selectedFilter?: Filter) => Filter[];
|
|
8
|
-
export declare const updateFiltersWithDisplayMode: (filters: Filter[],
|
|
11
|
+
export declare const updateFiltersWithDisplayMode: (filters: Filter[], currentFilter?: Filter, displayMode?: string) => Filter[];
|
|
9
12
|
export declare const getSelectedDimensionValues: (dimensionValues?: FilterValue[]) => FilterValue[];
|
|
10
13
|
export declare const getSelectedFilterValues: (filters: Filter[]) => Filter[];
|
|
11
14
|
export declare const getTotalSelectedValuesLength: (selectedFilterValues: Filter[]) => number;
|
|
12
15
|
export declare const clearFilterValues: (filter: Filter) => Filter;
|
|
13
|
-
export declare const getFiltersAfterDelete: (filters: Filter[],
|
|
16
|
+
export declare const getFiltersAfterDelete: (filters: Filter[], deletedFilter?: Filter) => Filter[];
|
|
14
17
|
export declare const getFiltersAfterClear: (filters: Filter[]) => Filter[];
|
|
15
18
|
export declare const getFiltersPreselectedByDataQuery: (filters: Filter[], attachmentsFilters?: DataQuery, constraints?: DataConstraints[]) => Filter[];
|
|
16
|
-
export declare const updateFiltersWithDisabledOption: (filters: Filter[]) => {
|
|
19
|
+
export declare const updateFiltersWithDisabledOption: (filters: Filter[]) => ({
|
|
17
20
|
isDisabled: boolean;
|
|
21
|
+
filterType: "dataset";
|
|
22
|
+
datasetUrn?: string;
|
|
18
23
|
id?: string;
|
|
19
24
|
title?: string;
|
|
20
25
|
dimensionValues?: FilterValue[];
|
|
@@ -23,7 +28,19 @@ export declare const updateFiltersWithDisabledOption: (filters: Filter[]) => {
|
|
|
23
28
|
timeRange?: import('../../../shared-toolkit/src/index').TimeRange;
|
|
24
29
|
isHierarchical?: boolean;
|
|
25
30
|
displayMode?: string;
|
|
26
|
-
}
|
|
31
|
+
} | {
|
|
32
|
+
isDisabled: boolean;
|
|
33
|
+
filterType: "shared";
|
|
34
|
+
datasetUrn?: undefined;
|
|
35
|
+
id?: string;
|
|
36
|
+
title?: string;
|
|
37
|
+
dimensionValues?: FilterValue[];
|
|
38
|
+
isSelectedFilter?: boolean;
|
|
39
|
+
isTimeDimension?: boolean;
|
|
40
|
+
timeRange?: import('../../../shared-toolkit/src/index').TimeRange;
|
|
41
|
+
isHierarchical?: boolean;
|
|
42
|
+
displayMode?: string;
|
|
43
|
+
})[];
|
|
27
44
|
export declare const getFilterValuesTree: (filterValues?: FilterValue[]) => FilterTreeNodeProps[];
|
|
28
45
|
export declare const getFilterTreeNodePadding: (level: number, isHasChildren?: boolean) => string;
|
|
29
46
|
export declare const getFilterNodesBySelection: (node: FilterTreeNodeProps) => FilterTreeNodeProps[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DataConstraints, Dimension, StructuralData } from '../../../sdmx-toolkit/src/index';
|
|
2
2
|
import { Filter } from '../models/filters';
|
|
3
3
|
import { Locale } from '../../../shared-toolkit/src/index';
|
|
4
|
-
export declare const getFilledFilters: (filters?: Filter[], dimensions?: Dimension[], structures?: StructuralData, contentConstraints?: DataConstraints[], locale?: Locale) => {
|
|
4
|
+
export declare const getFilledFilters: (filters?: Filter[], dimensions?: Dimension[], structures?: StructuralData, contentConstraints?: DataConstraints[], locale?: Locale) => ({
|
|
5
5
|
isDisabled: boolean;
|
|
6
6
|
dimensionValues: {
|
|
7
7
|
isSelectedValue: boolean | undefined;
|
|
@@ -18,6 +18,8 @@ export declare const getFilledFilters: (filters?: Filter[], dimensions?: Dimensi
|
|
|
18
18
|
description?: string;
|
|
19
19
|
descriptions?: Record<string, string>;
|
|
20
20
|
}[];
|
|
21
|
+
filterType: "dataset";
|
|
22
|
+
datasetUrn?: string;
|
|
21
23
|
id?: string;
|
|
22
24
|
title?: string;
|
|
23
25
|
isSelectedFilter?: boolean;
|
|
@@ -25,4 +27,30 @@ export declare const getFilledFilters: (filters?: Filter[], dimensions?: Dimensi
|
|
|
25
27
|
timeRange?: import('../../../shared-toolkit/src/index').TimeRange;
|
|
26
28
|
isHierarchical?: boolean;
|
|
27
29
|
displayMode?: string;
|
|
28
|
-
}
|
|
30
|
+
} | {
|
|
31
|
+
isDisabled: boolean;
|
|
32
|
+
dimensionValues: {
|
|
33
|
+
isSelectedValue: boolean | undefined;
|
|
34
|
+
codes?: import('../../../sdmx-toolkit/src/index').Code[];
|
|
35
|
+
agencyID?: string;
|
|
36
|
+
version?: string;
|
|
37
|
+
urn?: string;
|
|
38
|
+
annotations?: import('../../../sdmx-toolkit/src/index').Annotation[];
|
|
39
|
+
links?: import('../../../sdmx-toolkit/src/index').Link[];
|
|
40
|
+
structure?: string;
|
|
41
|
+
id: string;
|
|
42
|
+
name?: string;
|
|
43
|
+
names?: Record<string, string>;
|
|
44
|
+
description?: string;
|
|
45
|
+
descriptions?: Record<string, string>;
|
|
46
|
+
}[];
|
|
47
|
+
filterType: "shared";
|
|
48
|
+
datasetUrn?: undefined;
|
|
49
|
+
id?: string;
|
|
50
|
+
title?: string;
|
|
51
|
+
isSelectedFilter?: boolean;
|
|
52
|
+
isTimeDimension?: boolean;
|
|
53
|
+
timeRange?: import('../../../shared-toolkit/src/index').TimeRange;
|
|
54
|
+
isHierarchical?: boolean;
|
|
55
|
+
displayMode?: string;
|
|
56
|
+
})[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SeriesFilterDto } from '../../../sdmx-toolkit/src/index';
|
|
2
2
|
import { TimeRange } from '../../../shared-toolkit/src/index';
|
|
3
3
|
import { Filter } from '../models/filters';
|
|
4
|
-
export declare const getSeriesFilterDto: (filters: Filter[]) => SeriesFilterDto[];
|
|
4
|
+
export declare const getSeriesFilterDto: (filters: Filter[], datasetUrn?: string) => SeriesFilterDto[];
|
|
5
5
|
export declare const getTimeSeriesFilterDto: (timeRange: TimeRange | null | undefined, id: string) => SeriesFilterDto[];
|
|
6
6
|
export declare const ONE_DAY_MS: number;
|
|
7
7
|
export declare const getTimeFilter: (date: Date, increment?: number) => string;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { DataConstraints, StructuralData } from '../../../sdmx-toolkit/src/index';
|
|
2
|
+
import { Filter, FiltersProps } from '../models/filters';
|
|
3
|
+
import { DataQuery, Locale } from '../../../shared-toolkit/src/index';
|
|
4
|
+
import { StructureDataMaps } from '../models/structure-data';
|
|
5
|
+
export declare const COMMON_COUNTRY_FILTER_ID = "COUNTRY";
|
|
6
|
+
export declare const COMMON_FREQUENCY_FILTER_ID = "FREQUENCY";
|
|
7
|
+
export declare const getFilledDatasetFiltersMap: (structureDataMaps?: StructureDataMaps, locale?: string) => Map<string, ({
|
|
8
|
+
dimensionValues: import('../../../sdmx-toolkit/src/index').Codelist[];
|
|
9
|
+
filterType: "dataset";
|
|
10
|
+
datasetUrn?: string;
|
|
11
|
+
id?: string;
|
|
12
|
+
title?: string;
|
|
13
|
+
isSelectedFilter?: boolean;
|
|
14
|
+
isTimeDimension?: boolean;
|
|
15
|
+
timeRange?: import('../../../shared-toolkit/src/index').TimeRange;
|
|
16
|
+
isHierarchical?: boolean;
|
|
17
|
+
isDisabled?: boolean;
|
|
18
|
+
displayMode?: string;
|
|
19
|
+
} | {
|
|
20
|
+
dimensionValues: import('../../../sdmx-toolkit/src/index').Codelist[];
|
|
21
|
+
filterType: "shared";
|
|
22
|
+
datasetUrn?: undefined;
|
|
23
|
+
id?: string;
|
|
24
|
+
title?: string;
|
|
25
|
+
isSelectedFilter?: boolean;
|
|
26
|
+
isTimeDimension?: boolean;
|
|
27
|
+
timeRange?: import('../../../shared-toolkit/src/index').TimeRange;
|
|
28
|
+
isHierarchical?: boolean;
|
|
29
|
+
isDisabled?: boolean;
|
|
30
|
+
displayMode?: string;
|
|
31
|
+
})[]>;
|
|
32
|
+
export declare const getFiltersPreselectedByDataQueries: (filtersMap: Map<string, Filter[]>, dataQueries?: DataQuery[], constraintsMap?: Map<string, DataConstraints[] | undefined>) => Filter[];
|
|
33
|
+
export declare const buildFiltersMap: (filters: Filter[]) => Map<string, Filter[]>;
|
|
34
|
+
export declare const getFiltersByConstraints: (filtersMap: Map<string, Filter[]>, structureDataMaps?: StructureDataMaps, locale?: Locale) => Filter[];
|
|
35
|
+
export declare const getFiltersForQueryContext: (filters: Filter[], datasetUrn?: string) => Filter[];
|
|
36
|
+
export declare const getDatasetNameFromFilters: (filter: Filter, structuresMap?: Map<string, StructuralData | undefined>) => string | undefined;
|
|
37
|
+
export declare const isStructureDataMapsReady: (dataQueries?: FiltersProps["dataQueries"], structureDataMaps?: FiltersProps["structureDataMaps"]) => boolean;
|
package/utils/query-filters.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ import { DataQuery, QueryFilter } from '../../../shared-toolkit/src/index';
|
|
|
3
3
|
import { Filter } from '../models/filters';
|
|
4
4
|
export declare const getQueryTimeSeriesFilters: (filters: Filter[]) => QueryFilter[];
|
|
5
5
|
export declare const getTimeQueryFilterFromAttachment: (dataQuery: DataQuery, dimensions?: DimensionList) => string | null;
|
|
6
|
-
export declare const getQueryFilters: (filters: Filter[], dimensions?: Dimension[]) => DatasetQueryFilters;
|
|
7
|
-
export declare const setDataQueryFilters: (filters: Filter[]) => QueryFilter[];
|
|
6
|
+
export declare const getQueryFilters: (filters: Filter[], dimensions?: Dimension[], datasetUrn?: string) => DatasetQueryFilters;
|
|
7
|
+
export declare const setDataQueryFilters: (filters: Filter[], datasetUrn?: string) => QueryFilter[];
|