@bluecopa/core 0.1.2

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.
Files changed (47) hide show
  1. package/README.md +312 -0
  2. package/dist/api/client.d.ts +2 -0
  3. package/dist/api/dataset/getData.d.ts +5 -0
  4. package/dist/api/dataset/getSampleData.d.ts +8 -0
  5. package/dist/api/dataset/index.d.ts +2 -0
  6. package/dist/api/definition/index.d.ts +3 -0
  7. package/dist/api/definition/runDefinition.d.ts +9 -0
  8. package/dist/api/definition/runPublishedDefinition.d.ts +11 -0
  9. package/dist/api/definition/runSampleDefinition.d.ts +6 -0
  10. package/dist/api/file/getFileUrlByFileId.d.ts +18 -0
  11. package/dist/api/file/index.d.ts +1 -0
  12. package/dist/api/index.d.ts +8 -0
  13. package/dist/api/inputTable/getData.d.ts +11 -0
  14. package/dist/api/inputTable/getTableById.d.ts +2 -0
  15. package/dist/api/inputTable/index.d.ts +2 -0
  16. package/dist/api/metric/getData.d.ts +10 -0
  17. package/dist/api/metric/index.d.ts +1 -0
  18. package/dist/api/user/getLoggedInUserDetails.d.ts +25 -0
  19. package/dist/api/user/index.d.ts +1 -0
  20. package/dist/api/workbook/getPublishedWorkbookById.d.ts +5 -0
  21. package/dist/api/workbook/index.d.ts +0 -0
  22. package/dist/api/workflow/index.d.ts +2 -0
  23. package/dist/api/workflow/triggerHttpWorkflow.d.ts +20 -0
  24. package/dist/api/workflow/triggerWorkflow.d.ts +23 -0
  25. package/dist/api/worksheet/getWorksheets.d.ts +2 -0
  26. package/dist/api/worksheet/index.d.ts +1 -0
  27. package/dist/config.d.ts +18 -0
  28. package/dist/index.d.ts +4 -0
  29. package/dist/index.es.js +2321 -0
  30. package/dist/index.es.js.map +1 -0
  31. package/dist/tailwind/bluecopa.config.d.ts +164 -0
  32. package/dist/types/workbook.d.ts +13 -0
  33. package/dist/utils/date.d.ts +1 -0
  34. package/dist/utils/file/downloadFile.d.ts +1 -0
  35. package/dist/utils/index.d.ts +3 -0
  36. package/dist/utils/inputTable/index.d.ts +1 -0
  37. package/dist/utils/inputTable/inputTableDefinition.d.ts +35 -0
  38. package/dist/utils/metric/analysisMethods.d.ts +424 -0
  39. package/dist/utils/metric/buildVariable.d.ts +19 -0
  40. package/dist/utils/metric/displayNamesUtil.d.ts +7 -0
  41. package/dist/utils/metric/filterUtils.d.ts +22 -0
  42. package/dist/utils/metric/getMetricDefinition.d.ts +28 -0
  43. package/dist/utils/metric/hydrateWorksheet.d.ts +2 -0
  44. package/dist/utils/metric/inputNameUtil.d.ts +1 -0
  45. package/dist/utils/metric/mergeFilterService.d.ts +34 -0
  46. package/dist/utils/metric/variableUtils.d.ts +5 -0
  47. package/package.json +39 -0
@@ -0,0 +1,164 @@
1
+ declare const bluecopaTailwindConfig: {
2
+ darkMode: string;
3
+ important: boolean;
4
+ theme: {
5
+ fontFamily: {
6
+ para: string[];
7
+ display: string[];
8
+ table: string[];
9
+ };
10
+ fontWeight: {
11
+ normal: string;
12
+ semibold: string;
13
+ bold: string;
14
+ black: string;
15
+ };
16
+ keyframes: {
17
+ "fadeIn-top-to-bottom": {
18
+ "0%": {
19
+ transform: string;
20
+ opacity: number;
21
+ };
22
+ "100%": {
23
+ transform: string;
24
+ opacity: number;
25
+ };
26
+ };
27
+ };
28
+ animation: {
29
+ "fadeIn-t-b": string;
30
+ "fadeOut-b-t": string;
31
+ };
32
+ extend: {
33
+ boxShadow: {
34
+ md: string;
35
+ lg: string;
36
+ xl: string;
37
+ DEFAULT: string;
38
+ };
39
+ colors: {
40
+ primary: {
41
+ 50: string;
42
+ 100: string;
43
+ 200: string;
44
+ 300: string;
45
+ 400: string;
46
+ 500: string;
47
+ 600: string;
48
+ 700: string;
49
+ 800: string;
50
+ 900: string;
51
+ 950: string;
52
+ DEFAULT: string;
53
+ };
54
+ secondary: {
55
+ 50: string;
56
+ 100: string;
57
+ 200: string;
58
+ 300: string;
59
+ 400: string;
60
+ 500: string;
61
+ 600: string;
62
+ 700: string;
63
+ 800: string;
64
+ 900: string;
65
+ DEFAULT: string;
66
+ };
67
+ danger: {
68
+ 50: string;
69
+ 100: string;
70
+ 200: string;
71
+ 300: string;
72
+ 400: string;
73
+ 500: string;
74
+ 600: string;
75
+ 700: string;
76
+ 800: string;
77
+ 900: string;
78
+ DEFAULT: string;
79
+ };
80
+ success: {
81
+ 50: string;
82
+ 100: string;
83
+ 200: string;
84
+ 300: string;
85
+ 400: string;
86
+ 500: string;
87
+ 600: string;
88
+ 700: string;
89
+ 800: string;
90
+ 900: string;
91
+ DEFAULT: string;
92
+ };
93
+ warning: {
94
+ DEFAULT: string;
95
+ 100: string;
96
+ };
97
+ menuBtnBg: string;
98
+ menuBtnText: string;
99
+ navbarBg: string;
100
+ navbarBlue: string;
101
+ navbarText: string;
102
+ headerBg: string;
103
+ headerText: string;
104
+ homeHeaderBg: string;
105
+ homeHeaderText: string;
106
+ coralRed: string;
107
+ dartMouthGreen: string;
108
+ chestnut: string;
109
+ softPink: string;
110
+ darkPurple: string;
111
+ darkPastelGreen: string;
112
+ sandyBrown: string;
113
+ cinnabar: string;
114
+ tyrianPurple: string;
115
+ ruddyBlue: string;
116
+ viridian: string;
117
+ cobaltBlue: string;
118
+ dukeBlue: string;
119
+ jasmine: string;
120
+ };
121
+ spacing: {
122
+ none: string;
123
+ sm: string;
124
+ md: string;
125
+ lg: string;
126
+ xl: string;
127
+ "2xl": string;
128
+ "3xl": string;
129
+ };
130
+ borderRadius: {
131
+ sm: string;
132
+ md: string;
133
+ lg: string;
134
+ DEFAULT: string;
135
+ };
136
+ fontSize: {
137
+ "preset-0": string[];
138
+ "preset-1": string[];
139
+ "preset-2": string[];
140
+ "preset-3": string[];
141
+ "preset-4": string[];
142
+ "preset-5": string[];
143
+ "preset-6": string[];
144
+ "preset-7": string[];
145
+ "preset-8": string[];
146
+ };
147
+ zIndex: {
148
+ 1: string;
149
+ 2: string;
150
+ 3: string;
151
+ 4: string;
152
+ 5: string;
153
+ 6: string;
154
+ 7: string;
155
+ 8: string;
156
+ 9: string;
157
+ 10: string;
158
+ 1001: string;
159
+ 1002: string;
160
+ };
161
+ };
162
+ };
163
+ };
164
+ export default bluecopaTailwindConfig;
@@ -0,0 +1,13 @@
1
+ export declare enum WorkbookTypeEnum {
2
+ WORKBOOK = "WORKBOOK",
3
+ TRANSFORMATION = "TRANSFORMATION",
4
+ STATEMENT = "STATEMENT",
5
+ DASHBOARD = "DASHBOARD",
6
+ PORTAL = "PORTAL",
7
+ PROCESS = "PROCESS",
8
+ COLLECTION = "COLLECTION",
9
+ COST_ALLOCATION_GROUP = "ALLOCATION_GROUP",
10
+ ALLOCATION_BLUEPRINT = "ALLOCATION_BLUEPRINT",
11
+ FIN_CLOSE = "FIN_CLOSE",
12
+ PAGE_TEMPLATE = "PAGE_TEMPLATE"
13
+ }
@@ -0,0 +1 @@
1
+ export declare function formatDate(date: Date): string;
@@ -0,0 +1 @@
1
+ export declare function downloadFile(loc: string, contentType: string): Promise<object | null>;
@@ -0,0 +1,3 @@
1
+ export * from './date';
2
+ export { getMetricDefinition } from './metric/getMetricDefinition';
3
+ export * as inputTableUtils from './inputTable/inputTableDefinition';
@@ -0,0 +1 @@
1
+ export * from './inputTableDefinition';
@@ -0,0 +1,35 @@
1
+ import { ColumnFilterRule } from '../../../../models/src/lib/gen/Api';
2
+ import { MetricSeries } from '../../../../models/src/lib/ui-models/definitionModel';
3
+ import { InputTableDefinitionModel } from '../../../../models/src/lib/ui-models/inputTableModel';
4
+ import { SortOptions, ValueColsType } from '../../../../models/src/lib/ui-models/workbookModel';
5
+ export declare const getGroupByDefinition: ({ tableId, tableName, groupKeys, rowGroupCols, columnSettings, filterRules, sortValue, metricSeries }: {
6
+ tableId: any;
7
+ tableName: any;
8
+ groupKeys: any;
9
+ rowGroupCols: any;
10
+ columnSettings: any;
11
+ filterRules: any;
12
+ sortValue: any;
13
+ metricSeries: any;
14
+ }) => {
15
+ targetName: string;
16
+ definition: InputTableDefinitionModel;
17
+ };
18
+ export declare const generateDefinitionModel: ({ filters, sort, metricSeries, tableId, tableName }: {
19
+ filters?: ColumnFilterRule;
20
+ sort?: Record<string, any>;
21
+ metricSeries?: Partial<MetricSeries>;
22
+ tableId: string;
23
+ tableName: string;
24
+ }) => {
25
+ targetName: string;
26
+ definition: InputTableDefinitionModel;
27
+ };
28
+ export declare const sortConfigFromValue: (sortBy: SortOptions) => {
29
+ [x: number]: any;
30
+ };
31
+ export declare const getMetricSeries: (props: {
32
+ pivotCols: string[];
33
+ rowGroupCols: string[];
34
+ valueCols: ValueColsType[];
35
+ }) => Partial<MetricSeries>;
@@ -0,0 +1,424 @@
1
+ import { DatasetImportMetadata } from '../../../../models/src/lib/gen/Api';
2
+ import { SelectOptionType } from '../../../../models/src/lib/types/selectType';
3
+ import { DateRange } from '../../../../models/src/lib/ui-models/dateRangeModel';
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';
6
+ import { CustomCalculationShowAsEnum, ShowAsEnum, WorkbookCustomModel, ColumnSetting, GridColumnState, MetricCustomModel, MetricMetadataType, PivotCustomModel, Sheet, SortOptions, ValueColsType, LimitOptions, RowGroupsType } from '../../../../models/src/lib/ui-models/workbookModel';
7
+ export type MetricToolPanelType = {
8
+ pivotCols: string[];
9
+ rowGroupCols: RowGroupsType;
10
+ valueCols: ValueColsType[];
11
+ sortOptions: SortOptions;
12
+ limitOptions: LimitOptions;
13
+ filterModel: FilterRule | [];
14
+ dateRange?: DateRange;
15
+ timeBin: TimeBin | '';
16
+ currency?: string;
17
+ compareTrends?: Array<{
18
+ id: string;
19
+ name: string;
20
+ dateRange: DateRange;
21
+ }>;
22
+ showDimensionMappingValues?: boolean;
23
+ plotAsTrendsOrder?: 'asc' | 'desc' | 'none';
24
+ showBinSortOrderValues?: boolean;
25
+ };
26
+ export declare const getPivotGridData: (props: {
27
+ inputs: Inputs;
28
+ definitionModel: Definition;
29
+ variableName: string;
30
+ valueCols?: ValueColsType[];
31
+ }) => Promise<import('axios').AxiosResponse<any, any>>;
32
+ export declare const replaceFilterColumn: (props: {
33
+ fr: FilterSelectOptionsType[];
34
+ column: SelectOptionType<ColumnSetting>;
35
+ }) => any;
36
+ export declare const mergeCommonFilters: (props: {
37
+ commonFilters: CommonFilter[];
38
+ rule: FilterSelectOptionsType[];
39
+ condition: RuleType;
40
+ lineId: string;
41
+ }) => {
42
+ defaultType: RuleType;
43
+ rules: any;
44
+ };
45
+ export declare const getUniqueValues: (column: string[], sheetDetails?: {
46
+ sheetId: string;
47
+ inputs: Inputs;
48
+ definitionModel: Definition;
49
+ parentTableVariable: string;
50
+ }, uniqueValues?: any, uniqueValueStore?: any, storeSelectOptions?: boolean) => Promise<string[]>;
51
+ export declare const _getAggregates: (valueCols: ValueColsType[]) => string[][];
52
+ export declare const findParentIsMetricSeries: (childId: string, variables: Variable[]) => boolean;
53
+ export declare const ShowAsToProjectFractionMapper: Partial<Record<ShowAsEnum | CustomCalculationShowAsEnum, ProjectFractionEnum>>;
54
+ export declare const getDefinitionModelAndVariableNameForPivot: (props: {
55
+ pivotSheet: Sheet<PivotCustomModel>;
56
+ rowsToGroupBy: string[];
57
+ valueCols: ValueColsType[];
58
+ sortOptions: SortOptions;
59
+ timeBin?: TimeBin | "";
60
+ dateRange: DateRange;
61
+ dateColumn?: string;
62
+ pivotCols: string[];
63
+ currency?: string;
64
+ compareTrends?: Array<{
65
+ id: string;
66
+ name: string;
67
+ dateRange: DateRange;
68
+ }>;
69
+ showDimensionMappingValues?: boolean;
70
+ showBinSortOrderValues?: boolean;
71
+ }) => {
72
+ inputs: any[];
73
+ definitionModel: Definition;
74
+ variableName: string;
75
+ inputsCompareTrendsIndices: {
76
+ id: string;
77
+ index: number;
78
+ }[];
79
+ } | {
80
+ inputs: any[] | Inputs;
81
+ definitionModel: Definition;
82
+ variableName: string;
83
+ inputsCompareTrendsIndices?: undefined;
84
+ };
85
+ export declare const getFilterSelectOptionsMap: (fSO: FilterSelectOptionsType[]) => {
86
+ [filterId: string]: FilterSelectOptionsType;
87
+ };
88
+ export declare const getDrilldownFiltersMap: (props: {
89
+ filtersToBeApplied: Array<{
90
+ field: string;
91
+ key: string | number;
92
+ type?: string;
93
+ startDate?: string;
94
+ endDate?: string;
95
+ operator?: string;
96
+ }>;
97
+ columnSelectOptions: SelectOptionType[];
98
+ }) => {
99
+ [id: string]: FilterSelectOptionsType;
100
+ };
101
+ export declare const getFilterRulesFromMap: (filterMap: {
102
+ [filterId: string]: FilterSelectOptionsType;
103
+ }) => FilterRule;
104
+ export declare const getFiltersToBeAppliedOnDrilldown: (props: {
105
+ rowGroups: string[];
106
+ groupKeys: string[];
107
+ }) => {
108
+ field: string;
109
+ key: string;
110
+ }[];
111
+ export declare const getMetricFilterRule: (inputs: Inputs | Inputs[]) => any;
112
+ export declare const getDrilldownModels: (props: {
113
+ filtersToBeApplied: {
114
+ field: string;
115
+ key: string;
116
+ }[];
117
+ sheetDefinitionModel: Definition;
118
+ sheetInputs: Inputs;
119
+ sheetVariableName: string;
120
+ columnSelectOptions: SelectOptionType[];
121
+ }) => {
122
+ drilldownTableDefinitionModel: {
123
+ variables: Variable[];
124
+ inputs?: {
125
+ [key: string]: any;
126
+ };
127
+ aliases?: {
128
+ [tableName: string]: {
129
+ [alias: string]: string;
130
+ };
131
+ };
132
+ imports?: Import[];
133
+ loads?: import('../../../../models/src/lib/ui-models/definitionModel').Load[];
134
+ permissions?: import('../../../../models/src/lib/ui-models/definitionModel').Permission[];
135
+ exports?: import('../../../../models/src/lib/ui-models/definitionModel').Export[];
136
+ tables?: import('../../../../models/src/lib/ui-models/definitionModel').Table[];
137
+ sections?: import('../../../../models/src/lib/ui-models/reportModel').Section[];
138
+ };
139
+ drilldownTableVariableName: string;
140
+ drilldownTableInputs: any;
141
+ };
142
+ export declare const getAmChartGroup: (props: {
143
+ drilldownLevel: string[];
144
+ clickedColumn: string;
145
+ }) => string[];
146
+ export declare const getDataForDrilldown: (props: {
147
+ drilldownFiltersToBeAppliedOnChart: {
148
+ field: string;
149
+ key: string;
150
+ }[];
151
+ sheetDefinitionModel: Definition;
152
+ sheetInputs: Inputs;
153
+ sheetVariableName: string;
154
+ columnSelectOptions: SelectOptionType[];
155
+ }) => Promise<any>;
156
+ export declare const updateWorksheetAndMetricFilterMapForDrilldown: (props: {
157
+ sheetInputs: Inputs;
158
+ filterVariable: Variable[];
159
+ columnSelectOptions: SelectOptionType[];
160
+ }) => {};
161
+ export declare const getTableDrilldownModels: (props: {
162
+ filtersToBeApplied: {
163
+ field: string;
164
+ key: string | number;
165
+ }[];
166
+ sheetDefinitionModel: Definition;
167
+ sheetInputs: Inputs;
168
+ columnSelectOptions: SelectOptionType[];
169
+ includesValueCols?: boolean;
170
+ }) => {
171
+ drilldownTableDefinitionModel: {
172
+ variables: Variable[];
173
+ inputs?: {
174
+ [key: string]: any;
175
+ };
176
+ aliases?: {
177
+ [tableName: string]: {
178
+ [alias: string]: string;
179
+ };
180
+ };
181
+ imports?: Import[];
182
+ loads?: import('../../../../models/src/lib/ui-models/definitionModel').Load[];
183
+ permissions?: import('../../../../models/src/lib/ui-models/definitionModel').Permission[];
184
+ exports?: import('../../../../models/src/lib/ui-models/definitionModel').Export[];
185
+ tables?: import('../../../../models/src/lib/ui-models/definitionModel').Table[];
186
+ sections?: import('../../../../models/src/lib/ui-models/reportModel').Section[];
187
+ };
188
+ drilldownTableVariableName: string;
189
+ drilldownTableInputs: {
190
+ rule_drillDown: FilterRule;
191
+ };
192
+ };
193
+ export declare const getValueGroupsSelectOptions: (props: {
194
+ valueCols: ValueColsType[];
195
+ aliases: {
196
+ [key: string]: string;
197
+ };
198
+ }) => ({
199
+ label: string;
200
+ value: string;
201
+ option: {
202
+ formulaMode: boolean;
203
+ aggFun: string;
204
+ formula: string;
205
+ fieldLabel: string;
206
+ impact: "positive" | "negative";
207
+ type: "value" | "column" | "formula";
208
+ currency: import('../../../../models/src/lib/common/localeUtils').NewCurrencyType;
209
+ precision: number;
210
+ isCurrency: boolean;
211
+ isPercentage: boolean;
212
+ isNumber: boolean;
213
+ showAs: import('../../../../models/src/lib/ui-models/workbookModel').ShowAsType | import('../../../../models/src/lib/ui-models/workbookModel').CustomCalculationsShowAsType;
214
+ isAmortize: boolean;
215
+ isHidden: boolean;
216
+ hideGrandTotal: boolean;
217
+ showRowTotal: boolean;
218
+ chartColorBasedOnImpact: boolean;
219
+ compactNotation: import('../../../../models/src/lib/common/localeUtils').CompactNotation;
220
+ };
221
+ } | {
222
+ label: string;
223
+ value: string;
224
+ option: {
225
+ formulaMode: boolean;
226
+ aggFun: string;
227
+ fieldLabel: any;
228
+ impact: "positive" | "negative";
229
+ type: ValueColsType["type"];
230
+ currency: import('../../../../models/src/lib/common/localeUtils').NewCurrencyType;
231
+ precision: number;
232
+ isCurrency: boolean;
233
+ isPercentage: boolean;
234
+ isNumber: boolean;
235
+ showAs: import('../../../../models/src/lib/ui-models/workbookModel').ShowAsType | import('../../../../models/src/lib/ui-models/workbookModel').CustomCalculationsShowAsType;
236
+ isHidden: boolean;
237
+ hideGrandTotal: boolean;
238
+ showRowTotal: boolean;
239
+ chartColorBasedOnImpact: boolean;
240
+ compactNotation: import('../../../../models/src/lib/common/localeUtils').CompactNotation;
241
+ formula?: undefined;
242
+ isAmortize?: undefined;
243
+ };
244
+ })[];
245
+ export declare const getRowGroupsSelectOptions: (props: {
246
+ rowGroups: Array<string | string[]>;
247
+ columns: SelectOptionType[];
248
+ }) => any[];
249
+ export declare const getColumnGroupsSelectOptions: (props: {
250
+ columnGroups: string[];
251
+ columns: SelectOptionType[];
252
+ }) => any[];
253
+ export declare const removeDateColumnFromColRowGroupIfTrend: (props: {
254
+ timeBin: TimeBin | "";
255
+ pivotCols: string[];
256
+ rowGroupCols: string[];
257
+ dateColumn: string;
258
+ }) => {
259
+ pivotCols: string[];
260
+ rowGroupCols: string[];
261
+ };
262
+ export declare const getNewMetricSheet: (props: {
263
+ datasetList: DatasetImportMetadata[];
264
+ sheetName: string;
265
+ objectId: string;
266
+ importType: any;
267
+ dateRange?: any;
268
+ parentId?: string;
269
+ }) => Promise<Sheet<{
270
+ [cols: number]: import('../../../../models/src/lib/ui-models/dashboardModel').DashboardBlockProperties;
271
+ metadata: import('../../../../models/src/lib/ui-models/dashboardModel').BlockMetadataType;
272
+ settings: import('../../../../models/src/lib/ui-models/dashboardModel').BlockSettingsType;
273
+ }>>;
274
+ export declare const getColumnSettingsToSelectOptions: (columnSettings: ColumnSetting[]) => any;
275
+ export declare const getDefinitionModelWithUpdatedValueCols: (props: {
276
+ definition: Definition;
277
+ valueCols: ValueColsType[];
278
+ }) => {
279
+ updatedDefinition: {
280
+ variables: Variable[];
281
+ inputs?: {
282
+ [key: string]: any;
283
+ };
284
+ aliases?: {
285
+ [tableName: string]: {
286
+ [alias: string]: string;
287
+ };
288
+ };
289
+ imports?: Import[];
290
+ loads?: import('../../../../models/src/lib/ui-models/definitionModel').Load[];
291
+ permissions?: import('../../../../models/src/lib/ui-models/definitionModel').Permission[];
292
+ exports?: import('../../../../models/src/lib/ui-models/definitionModel').Export[];
293
+ tables?: import('../../../../models/src/lib/ui-models/definitionModel').Table[];
294
+ sections?: import('../../../../models/src/lib/ui-models/reportModel').Section[];
295
+ };
296
+ variableName: string;
297
+ };
298
+ export declare const applyFilter: (props: {
299
+ sheetId: string;
300
+ metadata: MetricMetadataType;
301
+ lastModifiedDate: string;
302
+ }) => Promise<any[]>;
303
+ export declare const defaultFilterRule: FilterRule;
304
+ export declare const getPromotedFiltersSelectOptionsForLine: (metricSheet: Sheet<MetricCustomModel>) => SelectOptionType[];
305
+ export declare const getAllLinesFilterSelectOptions: (metricSheets: Sheet<MetricCustomModel>[]) => any;
306
+ export declare function formatDate(date: any): string;
307
+ export declare const getQuarterDates: (props: {
308
+ month: number;
309
+ year: number;
310
+ }) => {
311
+ startDate: any;
312
+ endDate: any;
313
+ };
314
+ export declare const getMonthDates: (props: {
315
+ month: number;
316
+ year: number;
317
+ }) => {
318
+ startDate: string;
319
+ endDate: string;
320
+ };
321
+ export declare const getYearDates: (props: {
322
+ year: number;
323
+ }) => {
324
+ startDate: string;
325
+ endDate: string;
326
+ };
327
+ export declare const getStartEndDates: (props: {
328
+ timeBin: TimeBin;
329
+ date: Date;
330
+ }) => {
331
+ startDate: any;
332
+ endDate: any;
333
+ };
334
+ export declare const getSheetProperties: (props: {
335
+ sheet: Sheet<PivotCustomModel>;
336
+ groupKeys?: string[];
337
+ toolPanelValues?: MetricToolPanelType;
338
+ initialLoad: boolean;
339
+ currencyValue: string;
340
+ }) => {
341
+ inputs: Inputs;
342
+ definitionModel: Definition;
343
+ variableName: string;
344
+ gridColumnState: GridColumnState;
345
+ inputsCompareTrendsIndices: {
346
+ id: string;
347
+ index: number;
348
+ }[];
349
+ };
350
+ export declare const getValueColumnsFromSelectOptions: (selectOptions: SelectOptionType[]) => ({
351
+ label: string;
352
+ col: any;
353
+ aggFun: any;
354
+ impact: any;
355
+ type: any;
356
+ isCurrency: any;
357
+ isPercentage: any;
358
+ isNumber: any;
359
+ showAs: any;
360
+ isAmortize: any;
361
+ hide: any;
362
+ hideGrandTotal: any;
363
+ showRowTotal: any;
364
+ chartColorBasedOnImpact: any;
365
+ compactNotation: any;
366
+ precision: any;
367
+ } | {
368
+ formula: string;
369
+ label: string;
370
+ col: any;
371
+ aggFun: any;
372
+ impact: any;
373
+ type: any;
374
+ isCurrency: any;
375
+ isPercentage: any;
376
+ isNumber: any;
377
+ showAs: any;
378
+ isAmortize: any;
379
+ hide: any;
380
+ hideGrandTotal: any;
381
+ showRowTotal: any;
382
+ chartColorBasedOnImpact: any;
383
+ compactNotation: any;
384
+ precision: any;
385
+ })[];
386
+ export declare const defaultDateRange: DateRange;
387
+ export declare const getPromotedFilterRulesSelectOptions: (promotedFiltersStoreValue: {
388
+ [datasetId: string]: {
389
+ [id: string]: FilterPanelStoreType;
390
+ };
391
+ }) => any[];
392
+ export declare const checkIfCurrencyFormula: (props: {
393
+ formula: string;
394
+ columns: any;
395
+ }) => boolean;
396
+ export declare const getProjectAsInput: (valueCols: ValueColsType[]) => any;
397
+ export declare const getUpdatedDefinitionCustomModel: (props: {
398
+ metricDefinitionModel: Definition;
399
+ parentDefinitionModel: Definition;
400
+ parentCustomModel: WorkbookCustomModel;
401
+ metricCustomModel: PivotCustomModel;
402
+ removeSort?: boolean;
403
+ }) => {
404
+ definitionModel: Definition;
405
+ customModel: PivotCustomModel;
406
+ };
407
+ export declare const getUpdatedWorksheetDefinitionCustomModels: (props: {
408
+ parentSheet: Sheet<WorkbookCustomModel>;
409
+ metricSheet: Sheet<PivotCustomModel>;
410
+ }) => {
411
+ definitionModel: Definition;
412
+ customModel: PivotCustomModel;
413
+ };
414
+ export declare const timeBinToIntervalMapper: {
415
+ per_month: string;
416
+ per_quarter: string;
417
+ per_week: string;
418
+ per_day: string;
419
+ per_year: string;
420
+ };
421
+ export declare const mapValueColsWithTrends: (props: {
422
+ valueCols: ValueColsType[];
423
+ compareTrends: PivotCustomModel["compareTrends"];
424
+ }) => any;
@@ -0,0 +1,19 @@
1
+ import { AvailableTransform, Join, JoinTransformHow, TransformStrings, Variable } from '../../../../models/src/lib/ui-models/definitionModel';
2
+ import { ValueColsType } from '../../../../models/src/lib/ui-models/workbookModel';
3
+ export declare const buildVariable: (transformType: TransformStrings, transformArguments: any) => Variable;
4
+ export declare const buildJoinTransform: (props: {
5
+ left: string;
6
+ right: string;
7
+ left_on: string;
8
+ how?: JoinTransformHow;
9
+ right_on: string;
10
+ right_cols?: string[];
11
+ right_aliases?: string[];
12
+ }) => Join;
13
+ export declare const variableObject: (name: string, transforms: AvailableTransform[]) => {
14
+ name: string;
15
+ transforms: AvailableTransform[];
16
+ };
17
+ export declare const _getAggregates: (valueCols: ValueColsType[]) => string[][];
18
+ export declare const getAggregatesAsRecord: (oldAggregates: string[][]) => Record<string, string[]>;
19
+ export declare const variableBuilderMapper: Partial<Record<TransformStrings, (args: any) => Variable>>;
@@ -0,0 +1,7 @@
1
+ import { Dataset } from '../../../../models/src/lib/gen/Api';
2
+ export declare const getDisplayName: (str: string) => string;
3
+ export declare const removeEnvFromFilterName: (filterName: string, env?: string) => string;
4
+ export declare const removeWorkspaceEnv: (name: string, workspaceId: string) => string;
5
+ export declare const moveIdInBrackets: (name: string, type: Dataset["datasetType"]) => string;
6
+ export declare const removeStdCopaFromName: (name: string) => string;
7
+ export declare const getDisplayableNameAfterRemovingWorkspaceIdEnv: (name: string, workspaceId: string, type?: Dataset["datasetType"], env?: string) => string;