autoql-fe-utils 1.0.0 → 1.0.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/dist/index.d.ts CHANGED
@@ -352,4 +352,210 @@ declare const rotateArray: (array: any, n: any) => any[];
352
352
  declare const onlyUnique: (value: any, index: any, self: any) => boolean;
353
353
  declare const makeEmptyArray: (w: any, h: any, value?: string) => any[];
354
354
 
355
- export { AGG_TYPES, AxiosResponse, CHART_TYPES, Column, Columns, DATE_ONLY_CHART_TYPES, DAYJS_PRECISION_FORMATS, DEFAULT_AGG_TYPE, DEFAULT_DATA_PAGE_SIZE, DOUBLE_AXIS_CHART_TYPES, DOW_STYLES, DataFormatting, FilterLock, FrontendReq, MAX_DATA_PAGE_SIZE, MAX_LEGEND_LABELS, MIN_HISTOGRAM_SAMPLE, MONTH_NAMES, NumberColumnTypeDisplayNames, NumberColumnTypes, PrecisionTypes, QueryData, QueryResponse, Rows, SEASON_NAMES, Scale, TABLE_TYPES, TimestampFormats, WEEKDAY_NAMES_MON, WEEKDAY_NAMES_SUN, animateInputText, authenticationDefault, autoQLConfigDefault, capitalizeFirstChar, currentEventLoopEnd, dataConfigDefault, dataFormattingDefault, dateSortFn, dateStringSortFn, deepEqual, difference, formatChartLabel, formatDateStringType, formatDateType, formatElement, formatEpochDate, formatISODateWithPrecision, formatStringDate, formatStringDateWithPrecision, functionsEqual, getAuthentication, getAutoQLConfig, getBBoxFromRef, getColumnTypeAmounts, getCurrencySymbol, getDataConfig, getDataFormatting, getDateColumnIndex, getDayJSObj, getDayjsObjForStringType, getDefaultDisplayType, getEpochFromDate, getFirstChartDisplayType, getGroupBys, getGroupBysFromPivotTable, getGroupBysFromTable, getGroupableColumns, getKeyByValue, getNumberFormatConfig, getNumberOfGroupables, getPadding, getQueryParams, getSVGBase64, getStringFromSource, getSupportedDisplayTypes, getVisibleColumns, handleTooltipBoundaryCollision, hasData, hasDateColumn, hasNumberColumn, hasStringColumn, invertArray, isAggregation, isChartType, isColumnDateType, isColumnNumberType, isColumnStringType, isDisplayTypeValid, isListQuery, isNumber, isObject, isSingleValueResponse, isTableType, makeEmptyArray, mergeSources, nameValueObject, onlyUnique, removeFromDOM, rotateArray, setCaretPosition, shouldPlotMultiSeries, sortDataByDate, supports2DCharts, supportsDatePivotTable, supportsPieChart, supportsRegularPivotTable, svgToPng };
355
+ declare const dataStructureChanged: (props: any, prevProps: any) => boolean;
356
+ declare const onlySeriesVisibilityChanged: (props: any, prevProps: any) => boolean;
357
+ declare const scaleZero: (scale: any) => any;
358
+ declare const getKey: (rowIndex: any, cellIndex: any, extraIndex?: number) => string;
359
+ declare const shouldLabelsRotate: (axisElement: any) => boolean;
360
+ declare const getTooltipContent: ({ row, columns, colIndex, colIndex2, legendColumn, dataFormatting, aggregated, }: {
361
+ row: any;
362
+ columns: any;
363
+ colIndex: any;
364
+ colIndex2: any;
365
+ legendColumn: any;
366
+ dataFormatting: any;
367
+ aggregated?: boolean;
368
+ }) => any;
369
+ declare const getLegendLabelsForMultiSeries: (columns: any, colorScale: any, numberColumnIndices?: any[]) => {
370
+ label: any;
371
+ color: any;
372
+ hidden: any;
373
+ columnIndex: any;
374
+ column: any;
375
+ }[];
376
+ declare const getNumberOfSeries: (data: any) => any;
377
+ declare const convertToNumber: (value: any) => number;
378
+ declare const calculateMinAndMaxSums: (data: any, stringColumnIndex: any, numberColumnIndices: any, isScaled: any) => {
379
+ maxValue: number;
380
+ minValue: number;
381
+ };
382
+ declare const getObjSize: (obj: any) => number;
383
+ declare const getMaxValueFromKeyValueObj: (obj: any) => number;
384
+ declare const getMinValueFromKeyValueObj: (obj: any) => number;
385
+ declare const getMinAndMaxValues: (data: any, numberColumnIndices: any, isScaled: any, sum: any, stringColumnIndex: any) => {
386
+ minValue: number;
387
+ maxValue: number;
388
+ };
389
+ declare const getLegendLocation: (seriesArray: any, displayType: any, preferredLocation?: string) => string;
390
+ declare const getRangeForAxis: ({ axis, height, width }: {
391
+ axis: any;
392
+ height: any;
393
+ width: any;
394
+ }) => any[];
395
+ declare const getTimeScale: ({ data, columns, columnIndex, axis, domain, dataFormatting, outerPadding, innerPadding, height, width, stringColumnIndices, changeColumnIndices, enableAxisDropdown, changeStringColumnIndex, }: {
396
+ data: Rows;
397
+ columns: Columns;
398
+ columnIndex: number;
399
+ axis: string;
400
+ domain: number[];
401
+ dataFormatting: DataFormatting;
402
+ outerPadding: number;
403
+ innerPadding: number;
404
+ height: number;
405
+ width: number;
406
+ stringColumnIndices: number[];
407
+ changeColumnIndices: number[];
408
+ enableAxisDropdown: boolean;
409
+ changeStringColumnIndex: Function;
410
+ }) => any;
411
+ declare const getBandScale: ({ data, columns, columnIndex, axis, domain, dataFormatting, outerPadding, innerPadding, height, width, stringColumnIndices, changeColumnIndices, enableAxisDropdown, changeStringColumnIndex, }: {
412
+ data: Rows;
413
+ columns: Columns;
414
+ columnIndex: number;
415
+ axis: string;
416
+ domain: number[];
417
+ dataFormatting: DataFormatting;
418
+ outerPadding: number;
419
+ innerPadding: number;
420
+ height: number;
421
+ width: number;
422
+ stringColumnIndices: number[];
423
+ changeColumnIndices: number[];
424
+ enableAxisDropdown: boolean;
425
+ changeStringColumnIndex: Function;
426
+ }) => any;
427
+ declare const getUnitsForColumn: (column: Column, useAgg?: boolean) => "none" | "currency" | "percent";
428
+ declare const getUnitSymbol: ({ column, dataFormatting, }: {
429
+ column: Column;
430
+ dataFormatting: DataFormatting;
431
+ }) => string;
432
+ declare const getLinearAxisTitle: ({ numberColumns, aggregated, }: {
433
+ numberColumns: Columns;
434
+ aggregated: boolean;
435
+ }) => string;
436
+ declare const getNumberAxisUnits: (numberColumns: any) => any;
437
+ declare const getBinLinearScale: ({ columns, columnIndex, axis, buckets, bins, changeColumnIndices, enableAxisDropdown, innerHeight, innerWidth, height, width, dataFormatting, changeNumberColumnIndices, }: {
438
+ columns: Columns;
439
+ columnIndex: number;
440
+ axis: string;
441
+ buckets: any[];
442
+ bins: (string | number)[];
443
+ changeColumnIndices: Function;
444
+ enableAxisDropdown: boolean;
445
+ innerHeight: number;
446
+ innerWidth: number;
447
+ height: number;
448
+ width: number;
449
+ dataFormatting: DataFormatting;
450
+ changeNumberColumnIndices: Function;
451
+ }) => any;
452
+ declare const getHistogramScale: ({ axis, buckets, columnIndex, height, width, minValue, maxValue, tickValues, numTicks, stacked, isScaled, columns, columnIndices, changeColumnIndices, dataFormatting, changeNumberColumnIndices, enableAxisDropdown, aggregated, }: {
453
+ buckets: any[];
454
+ minValue: number;
455
+ maxValue: number;
456
+ axis: string;
457
+ range: number[];
458
+ domain: number[];
459
+ tickValues: number[];
460
+ numTicks: number;
461
+ stacked: boolean;
462
+ isScaled: boolean;
463
+ columns: Columns;
464
+ units: string;
465
+ title: string;
466
+ columnIndex: number;
467
+ columnIndices: number[];
468
+ hasDropdown: boolean;
469
+ allowMultipleSeries: boolean;
470
+ changeColumnIndices: Function;
471
+ disableAutoScale: boolean;
472
+ dataFormatting: DataFormatting;
473
+ changeNumberColumnIndices: Function;
474
+ enableAxisDropdown: boolean;
475
+ height: number;
476
+ width: number;
477
+ aggregated: boolean;
478
+ }) => any;
479
+ declare const getLinearScale: ({ minValue, maxValue, axis, range, domain, tickValues, numTicks, stacked, isScaled, columns, units, title, columnIndex, columnIndices, hasDropdown, allowMultipleSeries, changeColumnIndices, disableAutoScale, dataFormatting, changeNumberColumnIndices, enableAxisDropdown, height, width, aggregated, }: {
480
+ axis: string;
481
+ columns: Columns;
482
+ columnIndex: number;
483
+ columnIndices: number[];
484
+ height: number;
485
+ width: number;
486
+ units?: string;
487
+ dataFormatting?: DataFormatting;
488
+ changeNumberColumnIndices?: Function;
489
+ enableAxisDropdown?: boolean;
490
+ stacked?: boolean;
491
+ isScaled?: boolean;
492
+ minValue?: number;
493
+ maxValue?: number;
494
+ aggregated?: boolean;
495
+ changeColumnIndices?: Function;
496
+ numTicks?: number;
497
+ range?: number[];
498
+ tickValues?: number[];
499
+ allowMultipleSeries?: boolean;
500
+ disableAutoScale?: boolean;
501
+ hasDropdown?: boolean;
502
+ domain?: number[];
503
+ title?: string;
504
+ }) => any;
505
+ declare const getLinearScales: ({ data, columnIndices1, columnIndices2, axis, stacked, isScaled, columns, hasDropdown, allowMultipleSeries, changeColumnIndices, disableAutoScale, dataFormatting, changeNumberColumnIndices, enableAxisDropdown, stringColumnIndex, height, width, aggregated, }: {
506
+ data: Rows;
507
+ columnIndices1: number[];
508
+ columnIndices2: number[];
509
+ axis: string;
510
+ stacked: boolean;
511
+ isScaled: boolean;
512
+ columns: Columns;
513
+ hasDropdown: boolean;
514
+ allowMultipleSeries: boolean;
515
+ changeColumnIndices: Function;
516
+ disableAutoScale: boolean;
517
+ dataFormatting: DataFormatting;
518
+ changeNumberColumnIndices: Function;
519
+ enableAxisDropdown: boolean;
520
+ stringColumnIndex: number;
521
+ height: number;
522
+ width: number;
523
+ aggregated: boolean;
524
+ }) => {
525
+ scale: any;
526
+ scale2?: undefined;
527
+ } | {
528
+ scale: any;
529
+ scale2: any;
530
+ };
531
+ declare const doesElementOverflowContainer: (element: any, container: any) => boolean;
532
+ declare const DateUTC: (d: any) => Date;
533
+ declare const getNiceDateTickValues: ({ tickValues, scale }: {
534
+ tickValues: any;
535
+ scale: any;
536
+ }) => any;
537
+ declare const getNiceTickValues: ({ tickValues, scale }: {
538
+ tickValues: any;
539
+ scale: any;
540
+ }) => any;
541
+ declare const getTickSizeFromNumTicks: ({ scale, numTicks, innerPadding, outerPadding, }: {
542
+ scale: any;
543
+ numTicks: any;
544
+ innerPadding?: number;
545
+ outerPadding?: number;
546
+ }) => number;
547
+ declare const getTickValues: ({ scale, initialTicks, numTicks, innerPadding, outerPadding, }: {
548
+ scale: any;
549
+ initialTicks?: (string | number)[];
550
+ numTicks?: number;
551
+ innerPadding?: number;
552
+ outerPadding?: number;
553
+ }) => any;
554
+ declare const mergeBboxes: (boundingBoxes: any) => {
555
+ x: any;
556
+ y: any;
557
+ height: number;
558
+ width: number;
559
+ };
560
+
561
+ export { AGG_TYPES, AxiosResponse, CHART_TYPES, Column, Columns, DATE_ONLY_CHART_TYPES, DAYJS_PRECISION_FORMATS, DEFAULT_AGG_TYPE, DEFAULT_DATA_PAGE_SIZE, DOUBLE_AXIS_CHART_TYPES, DOW_STYLES, DataFormatting, DateUTC, FilterLock, FrontendReq, MAX_DATA_PAGE_SIZE, MAX_LEGEND_LABELS, MIN_HISTOGRAM_SAMPLE, MONTH_NAMES, NumberColumnTypeDisplayNames, NumberColumnTypes, PrecisionTypes, QueryData, QueryResponse, Rows, SEASON_NAMES, Scale, TABLE_TYPES, TimestampFormats, WEEKDAY_NAMES_MON, WEEKDAY_NAMES_SUN, animateInputText, authenticationDefault, autoQLConfigDefault, calculateMinAndMaxSums, capitalizeFirstChar, convertToNumber, currentEventLoopEnd, dataConfigDefault, dataFormattingDefault, dataStructureChanged, dateSortFn, dateStringSortFn, deepEqual, difference, doesElementOverflowContainer, formatChartLabel, formatDateStringType, formatDateType, formatElement, formatEpochDate, formatISODateWithPrecision, formatStringDate, formatStringDateWithPrecision, functionsEqual, getAuthentication, getAutoQLConfig, getBBoxFromRef, getBandScale, getBinLinearScale, getColumnTypeAmounts, getCurrencySymbol, getDataConfig, getDataFormatting, getDateColumnIndex, getDayJSObj, getDayjsObjForStringType, getDefaultDisplayType, getEpochFromDate, getFirstChartDisplayType, getGroupBys, getGroupBysFromPivotTable, getGroupBysFromTable, getGroupableColumns, getHistogramScale, getKey, getKeyByValue, getLegendLabelsForMultiSeries, getLegendLocation, getLinearAxisTitle, getLinearScale, getLinearScales, getMaxValueFromKeyValueObj, getMinAndMaxValues, getMinValueFromKeyValueObj, getNiceDateTickValues, getNiceTickValues, getNumberAxisUnits, getNumberFormatConfig, getNumberOfGroupables, getNumberOfSeries, getObjSize, getPadding, getQueryParams, getRangeForAxis, getSVGBase64, getStringFromSource, getSupportedDisplayTypes, getTickSizeFromNumTicks, getTickValues, getTimeScale, getTooltipContent, getUnitSymbol, getUnitsForColumn, getVisibleColumns, handleTooltipBoundaryCollision, hasData, hasDateColumn, hasNumberColumn, hasStringColumn, invertArray, isAggregation, isChartType, isColumnDateType, isColumnNumberType, isColumnStringType, isDisplayTypeValid, isListQuery, isNumber, isObject, isSingleValueResponse, isTableType, makeEmptyArray, mergeBboxes, mergeSources, nameValueObject, onlySeriesVisibilityChanged, onlyUnique, removeFromDOM, rotateArray, scaleZero, setCaretPosition, shouldLabelsRotate, shouldPlotMultiSeries, sortDataByDate, supports2DCharts, supportsDatePivotTable, supportsPieChart, supportsRegularPivotTable, svgToPng };