@bluecopa/core 0.1.7 → 0.1.9
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/README.md +157 -8
- package/dist/api/chat/checkSubscriptionStatus.d.ts +16 -0
- package/dist/api/chat/createThread.d.ts +16 -0
- package/dist/api/chat/deleteComment.d.ts +12 -0
- package/dist/api/chat/getCommentsByThreadId.d.ts +13 -0
- package/dist/api/chat/index.d.ts +8 -0
- package/dist/api/chat/postComment.d.ts +16 -0
- package/dist/api/chat/subscribeUser.d.ts +18 -0
- package/dist/api/chat/unsubscribeUser.d.ts +18 -0
- package/dist/api/chat/updateComment.d.ts +17 -0
- package/dist/api/index.d.ts +1 -0
- package/dist/config.d.ts +1 -0
- package/dist/index.es.js +3907 -182
- package/dist/index.es.js.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/inputTable/inputTableDefinition.d.ts +1 -1
- package/dist/utils/metric/analysisMethods.d.ts +35 -8
- package/dist/utils/metric/filterUtils.d.ts +1 -1
- package/dist/utils/metric/getMetricDefinition.d.ts +1 -1
- package/dist/utils/websockets/centrifugoWebsocket.d.ts +18 -0
- package/dist/utils/websockets/websocketProviderFactory.d.ts +13 -0
- package/package.json +3 -2
package/dist/utils/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export declare const generateDefinitionModel: ({ filters, sort, metricSeries, ta
|
|
|
26
26
|
definition: InputTableDefinitionModel;
|
|
27
27
|
};
|
|
28
28
|
export declare const sortConfigFromValue: (sortBy: SortOptions) => {
|
|
29
|
-
[x: number]:
|
|
29
|
+
[x: number]: string;
|
|
30
30
|
};
|
|
31
31
|
export declare const getMetricSeries: (props: {
|
|
32
32
|
pivotCols: string[];
|
|
@@ -2,7 +2,7 @@ import { DatasetImportMetadata } from '../../../../models/src/lib/gen/Api';
|
|
|
2
2
|
import { SelectOptionType } from '../../../../models/src/lib/types/selectType';
|
|
3
3
|
import { DateRange } from '../../../../models/src/lib/ui-models/dateRangeModel';
|
|
4
4
|
import { ProjectFractionEnum, Definition, Import, Inputs, TimeBin, Variable } from '../../../../models/src/lib/ui-models/definitionModel';
|
|
5
|
-
import { CommonFilter, FilterPanelStoreType, FilterRule, FilterSelectOptionsType, RuleType } from '../../../../models/src/lib/ui-models/filterModel';
|
|
5
|
+
import { CommonFilter, FilterPanelStoreType, FilterRule, FilterSelectOptionsType, FilterUniqueValueSelectOptionsType, RuleType } from '../../../../models/src/lib/ui-models/filterModel';
|
|
6
6
|
import { CustomCalculationShowAsEnum, ShowAsEnum, WorkbookCustomModel, ColumnSetting, GridColumnState, MetricCustomModel, MetricMetadataType, PivotCustomModel, Sheet, SortOptions, ValueColsType, LimitOptions, RowGroupsType } from '../../../../models/src/lib/ui-models/workbookModel';
|
|
7
7
|
export type MetricToolPanelType = {
|
|
8
8
|
pivotCols: string[];
|
|
@@ -32,7 +32,22 @@ export declare const getPivotGridData: (props: {
|
|
|
32
32
|
export declare const replaceFilterColumn: (props: {
|
|
33
33
|
fr: FilterSelectOptionsType[];
|
|
34
34
|
column: SelectOptionType<ColumnSetting>;
|
|
35
|
-
}) =>
|
|
35
|
+
}) => {
|
|
36
|
+
label: string;
|
|
37
|
+
value: any;
|
|
38
|
+
selectable?: boolean;
|
|
39
|
+
group?: string;
|
|
40
|
+
hint?: string;
|
|
41
|
+
option: {
|
|
42
|
+
aggFun?: string;
|
|
43
|
+
uniqueValues: FilterUniqueValueSelectOptionsType[];
|
|
44
|
+
ruleType: RuleType;
|
|
45
|
+
type: string;
|
|
46
|
+
uniqueValueCount: number;
|
|
47
|
+
datasetId?: string;
|
|
48
|
+
datasetName?: string;
|
|
49
|
+
};
|
|
50
|
+
}[];
|
|
36
51
|
export declare const mergeCommonFilters: (props: {
|
|
37
52
|
commonFilters: CommonFilter[];
|
|
38
53
|
rule: FilterSelectOptionsType[];
|
|
@@ -40,7 +55,7 @@ export declare const mergeCommonFilters: (props: {
|
|
|
40
55
|
lineId: string;
|
|
41
56
|
}) => {
|
|
42
57
|
defaultType: RuleType;
|
|
43
|
-
rules:
|
|
58
|
+
rules: FilterSelectOptionsType[];
|
|
44
59
|
};
|
|
45
60
|
export declare const getUniqueValues: (column: string[], sheetDetails?: {
|
|
46
61
|
sheetId: string;
|
|
@@ -224,7 +239,7 @@ export declare const getValueGroupsSelectOptions: (props: {
|
|
|
224
239
|
option: {
|
|
225
240
|
formulaMode: boolean;
|
|
226
241
|
aggFun: string;
|
|
227
|
-
fieldLabel:
|
|
242
|
+
fieldLabel: string;
|
|
228
243
|
impact: "positive" | "negative";
|
|
229
244
|
type: ValueColsType["type"];
|
|
230
245
|
currency: import('../../../../models/src/lib/common/localeUtils').NewCurrencyType;
|
|
@@ -271,7 +286,19 @@ export declare const getNewMetricSheet: (props: {
|
|
|
271
286
|
metadata: import('../../../../models/src/lib/ui-models/dashboardModel').BlockMetadataType;
|
|
272
287
|
settings: import('../../../../models/src/lib/ui-models/dashboardModel').BlockSettingsType;
|
|
273
288
|
}>>;
|
|
274
|
-
export declare const getColumnSettingsToSelectOptions: (columnSettings: ColumnSetting[]) =>
|
|
289
|
+
export declare const getColumnSettingsToSelectOptions: (columnSettings: ColumnSetting[]) => {
|
|
290
|
+
label: string;
|
|
291
|
+
value: string;
|
|
292
|
+
option: {
|
|
293
|
+
type: "date" | "str" | "f64" | "i64" | "datetime(time_unit='us', time_zone=None)";
|
|
294
|
+
uniqueCount: number;
|
|
295
|
+
fieldLabel: string;
|
|
296
|
+
currency: import('../../../../models/src/lib/common/localeUtils').NewCurrencyType;
|
|
297
|
+
precision: number;
|
|
298
|
+
dateFormat: string;
|
|
299
|
+
isCurrency: boolean;
|
|
300
|
+
};
|
|
301
|
+
}[];
|
|
275
302
|
export declare const getDefinitionModelWithUpdatedValueCols: (props: {
|
|
276
303
|
definition: Definition;
|
|
277
304
|
valueCols: ValueColsType[];
|
|
@@ -302,7 +329,7 @@ export declare const applyFilter: (props: {
|
|
|
302
329
|
}) => Promise<any[]>;
|
|
303
330
|
export declare const defaultFilterRule: FilterRule;
|
|
304
331
|
export declare const getPromotedFiltersSelectOptionsForLine: (metricSheet: Sheet<MetricCustomModel>) => SelectOptionType[];
|
|
305
|
-
export declare const getAllLinesFilterSelectOptions: (metricSheets: Sheet<MetricCustomModel>[]) => any;
|
|
332
|
+
export declare const getAllLinesFilterSelectOptions: (metricSheets: Sheet<MetricCustomModel>[]) => SelectOptionType<any>[];
|
|
306
333
|
export declare function formatDate(date: any): string;
|
|
307
334
|
export declare const getQuarterDates: (props: {
|
|
308
335
|
month: number;
|
|
@@ -393,7 +420,7 @@ export declare const checkIfCurrencyFormula: (props: {
|
|
|
393
420
|
formula: string;
|
|
394
421
|
columns: any;
|
|
395
422
|
}) => boolean;
|
|
396
|
-
export declare const getProjectAsInput: (valueCols: ValueColsType[]) =>
|
|
423
|
+
export declare const getProjectAsInput: (valueCols: ValueColsType[]) => Record<string, ProjectFractionEnum>;
|
|
397
424
|
export declare const getUpdatedDefinitionCustomModel: (props: {
|
|
398
425
|
metricDefinitionModel: Definition;
|
|
399
426
|
parentDefinitionModel: Definition;
|
|
@@ -421,4 +448,4 @@ export declare const timeBinToIntervalMapper: {
|
|
|
421
448
|
export declare const mapValueColsWithTrends: (props: {
|
|
422
449
|
valueCols: ValueColsType[];
|
|
423
450
|
compareTrends: PivotCustomModel["compareTrends"];
|
|
424
|
-
}) =>
|
|
451
|
+
}) => ValueColsType[];
|
|
@@ -18,4 +18,4 @@ export declare const getFilterRulesFromFilterSelectOptionsMap: (filterSelectOpti
|
|
|
18
18
|
};
|
|
19
19
|
export declare const getColumnFilterRuleFromCombinedFilterRule: (combinedFilterRule: FilterRule, valueCols: ValueColsType[]) => FilterRule;
|
|
20
20
|
export declare const getAggregateFilterRuleFromCombinedFilterRule: (combinedFilterRule: FilterRule, valueCols: ValueColsType[]) => FilterRule;
|
|
21
|
-
export declare const getIsNotValueForPredicateType: (predicateType: Operator) =>
|
|
21
|
+
export declare const getIsNotValueForPredicateType: (predicateType: Operator) => boolean;
|
|
@@ -23,6 +23,6 @@ export declare const getMetricDefinition: (props: {
|
|
|
23
23
|
};
|
|
24
24
|
export declare const getSelectedMetricsParentIds: (selectedItems: {
|
|
25
25
|
sheet: Worksheet;
|
|
26
|
-
}[]) =>
|
|
26
|
+
}[]) => string[];
|
|
27
27
|
export declare const defaultDashboardDateRangeModel: DashboardDateRangeModel;
|
|
28
28
|
export declare const defaultCurrencyModel: BoardCurrencyModel;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IWebsocketProvider } from './websocketProviderFactory';
|
|
2
|
+
declare class CentrifugoWebsocket implements IWebsocketProvider {
|
|
3
|
+
private connectionUrl?;
|
|
4
|
+
private centrifuge;
|
|
5
|
+
private subscriptions;
|
|
6
|
+
isConnected: boolean;
|
|
7
|
+
private accessToken;
|
|
8
|
+
private userId;
|
|
9
|
+
constructor(connectionUrl?: string);
|
|
10
|
+
connect(): void;
|
|
11
|
+
private _bind;
|
|
12
|
+
bind(channel: string, event: string, callback: (data: any) => void): void;
|
|
13
|
+
bindGlobal(channel: string, callback: (data: any) => void): void;
|
|
14
|
+
unbind(channel: string, event: string): void;
|
|
15
|
+
unbindAll(channel: string): void;
|
|
16
|
+
disconnect(): void;
|
|
17
|
+
}
|
|
18
|
+
export default CentrifugoWebsocket;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface IWebsocketProvider {
|
|
2
|
+
connect: () => void;
|
|
3
|
+
bind: (channel: string, event: string, callback: (data: any) => void) => void;
|
|
4
|
+
bindGlobal: (event: string, callback: (data: any) => void) => void;
|
|
5
|
+
unbind: (channel: string, event: string) => void;
|
|
6
|
+
unbindAll: (channel: string) => void;
|
|
7
|
+
disconnect: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare class WebsocketContextFactory {
|
|
10
|
+
static create(mechanism: "pusher" | "centrifugo", args: {
|
|
11
|
+
connectionUrl?: string;
|
|
12
|
+
}): IWebsocketProvider;
|
|
13
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bluecopa/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.es.js",
|
|
6
6
|
"module": "dist/index.es.js",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"axios": "1.12.0",
|
|
37
|
-
"lodash": "4.17.21"
|
|
37
|
+
"lodash": "4.17.21",
|
|
38
|
+
"centrifuge": "5.2.2"
|
|
38
39
|
}
|
|
39
40
|
}
|