@quillsql/react 2.12.35 → 2.12.37
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/cjs/Chart.d.ts +2 -1
- package/dist/cjs/Chart.d.ts.map +1 -1
- package/dist/cjs/Chart.js +3 -3
- package/dist/cjs/ChartBuilder.d.ts.map +1 -1
- package/dist/cjs/ChartBuilder.js +3 -3
- package/dist/cjs/Dashboard.d.ts.map +1 -1
- package/dist/cjs/Dashboard.js +2 -2
- package/dist/cjs/ReportBuilder.d.ts.map +1 -1
- package/dist/cjs/ReportBuilder.js +13 -0
- package/dist/cjs/SQLEditor.js +2 -1
- package/dist/cjs/components/Chart/BarList.d.ts +1 -0
- package/dist/cjs/components/Chart/BarList.d.ts.map +1 -1
- package/dist/cjs/components/Chart/BarList.js +3 -3
- package/dist/cjs/components/Chart/ChartError.js +1 -1
- package/dist/cjs/utils/dashboard.js +1 -1
- package/dist/cjs/utils/dataFetcher.d.ts.map +1 -1
- package/dist/cjs/utils/dataFetcher.js +7 -1
- package/dist/cjs/utils/dataProcessing.d.ts +1 -0
- package/dist/cjs/utils/dataProcessing.d.ts.map +1 -1
- package/dist/cjs/utils/dataProcessing.js +20 -1
- package/dist/cjs/utils/queryConstructor.d.ts +1 -1
- package/dist/cjs/utils/queryConstructor.d.ts.map +1 -1
- package/dist/cjs/utils/queryConstructor.js +8 -5
- package/dist/cjs/utils/report.d.ts.map +1 -1
- package/dist/cjs/utils/report.js +17 -5
- package/dist/cjs/utils/tableProcessing.d.ts.map +1 -1
- package/dist/cjs/utils/tableProcessing.js +7 -0
- package/package.json +1 -1
- package/dist/esm/Chart.d.ts +0 -203
- package/dist/esm/Chart.d.ts.map +0 -1
- package/dist/esm/Chart.js +0 -431
- package/dist/esm/ChartBuilder.d.ts +0 -339
- package/dist/esm/ChartBuilder.d.ts.map +0 -1
- package/dist/esm/ChartBuilder.js +0 -1312
- package/dist/esm/ChartEditor.d.ts +0 -209
- package/dist/esm/ChartEditor.d.ts.map +0 -1
- package/dist/esm/ChartEditor.js +0 -182
- package/dist/esm/Context.d.ts +0 -14
- package/dist/esm/Context.d.ts.map +0 -1
- package/dist/esm/Context.js +0 -269
- package/dist/esm/Dashboard.d.ts +0 -279
- package/dist/esm/Dashboard.d.ts.map +0 -1
- package/dist/esm/Dashboard.js +0 -660
- package/dist/esm/DateRangePicker/Calendar.d.ts +0 -17
- package/dist/esm/DateRangePicker/Calendar.d.ts.map +0 -1
- package/dist/esm/DateRangePicker/Calendar.js +0 -164
- package/dist/esm/DateRangePicker/DateRangePicker.d.ts +0 -39
- package/dist/esm/DateRangePicker/DateRangePicker.d.ts.map +0 -1
- package/dist/esm/DateRangePicker/DateRangePicker.js +0 -95
- package/dist/esm/DateRangePicker/DateRangePickerButton.d.ts +0 -22
- package/dist/esm/DateRangePicker/DateRangePickerButton.d.ts.map +0 -1
- package/dist/esm/DateRangePicker/DateRangePickerButton.js +0 -134
- package/dist/esm/DateRangePicker/QuillDateRangePicker.d.ts +0 -25
- package/dist/esm/DateRangePicker/QuillDateRangePicker.d.ts.map +0 -1
- package/dist/esm/DateRangePicker/QuillDateRangePicker.js +0 -260
- package/dist/esm/DateRangePicker/dateRangePickerUtils.d.ts +0 -80
- package/dist/esm/DateRangePicker/dateRangePickerUtils.d.ts.map +0 -1
- package/dist/esm/DateRangePicker/dateRangePickerUtils.js +0 -521
- package/dist/esm/DateRangePicker/index.d.ts +0 -3
- package/dist/esm/DateRangePicker/index.d.ts.map +0 -1
- package/dist/esm/DateRangePicker/index.js +0 -2
- package/dist/esm/QuillProvider.d.ts +0 -163
- package/dist/esm/QuillProvider.d.ts.map +0 -1
- package/dist/esm/QuillProvider.js +0 -104
- package/dist/esm/ReportBuilder.d.ts +0 -318
- package/dist/esm/ReportBuilder.d.ts.map +0 -1
- package/dist/esm/ReportBuilder.js +0 -3266
- package/dist/esm/SQLEditor.d.ts +0 -272
- package/dist/esm/SQLEditor.d.ts.map +0 -1
- package/dist/esm/SQLEditor.js +0 -509
- package/dist/esm/Table.d.ts +0 -167
- package/dist/esm/Table.d.ts.map +0 -1
- package/dist/esm/Table.js +0 -215
- package/dist/esm/TableChart.d.ts +0 -15
- package/dist/esm/TableChart.d.ts.map +0 -1
- package/dist/esm/TableChart.js +0 -95
- package/dist/esm/assets/ArrowDownHeadIcon.d.ts +0 -5
- package/dist/esm/assets/ArrowDownHeadIcon.d.ts.map +0 -1
- package/dist/esm/assets/ArrowDownHeadIcon.js +0 -3
- package/dist/esm/assets/ArrowDownIcon.d.ts +0 -5
- package/dist/esm/assets/ArrowDownIcon.d.ts.map +0 -1
- package/dist/esm/assets/ArrowDownIcon.js +0 -3
- package/dist/esm/assets/ArrowDownRightIcon.d.ts +0 -5
- package/dist/esm/assets/ArrowDownRightIcon.d.ts.map +0 -1
- package/dist/esm/assets/ArrowDownRightIcon.js +0 -3
- package/dist/esm/assets/ArrowLeftHeadIcon.d.ts +0 -5
- package/dist/esm/assets/ArrowLeftHeadIcon.d.ts.map +0 -1
- package/dist/esm/assets/ArrowLeftHeadIcon.js +0 -3
- package/dist/esm/assets/ArrowRightHeadIcon.d.ts +0 -5
- package/dist/esm/assets/ArrowRightHeadIcon.d.ts.map +0 -1
- package/dist/esm/assets/ArrowRightHeadIcon.js +0 -3
- package/dist/esm/assets/ArrowRightIcon.d.ts +0 -5
- package/dist/esm/assets/ArrowRightIcon.d.ts.map +0 -1
- package/dist/esm/assets/ArrowRightIcon.js +0 -3
- package/dist/esm/assets/ArrowUpHeadIcon.d.ts +0 -5
- package/dist/esm/assets/ArrowUpHeadIcon.d.ts.map +0 -1
- package/dist/esm/assets/ArrowUpHeadIcon.js +0 -3
- package/dist/esm/assets/ArrowUpIcon.d.ts +0 -5
- package/dist/esm/assets/ArrowUpIcon.d.ts.map +0 -1
- package/dist/esm/assets/ArrowUpIcon.js +0 -3
- package/dist/esm/assets/ArrowUpRightIcon.d.ts +0 -5
- package/dist/esm/assets/ArrowUpRightIcon.d.ts.map +0 -1
- package/dist/esm/assets/ArrowUpRightIcon.js +0 -3
- package/dist/esm/assets/CalendarIcon.d.ts +0 -5
- package/dist/esm/assets/CalendarIcon.d.ts.map +0 -1
- package/dist/esm/assets/CalendarIcon.js +0 -3
- package/dist/esm/assets/CalendarNormalIcon.d.ts +0 -5
- package/dist/esm/assets/CalendarNormalIcon.d.ts.map +0 -1
- package/dist/esm/assets/CalendarNormalIcon.js +0 -3
- package/dist/esm/assets/DoubleArrowLeftHeadIcon.d.ts +0 -5
- package/dist/esm/assets/DoubleArrowLeftHeadIcon.d.ts.map +0 -1
- package/dist/esm/assets/DoubleArrowLeftHeadIcon.js +0 -3
- package/dist/esm/assets/DoubleArrowRightHeadIcon.d.ts +0 -5
- package/dist/esm/assets/DoubleArrowRightHeadIcon.d.ts.map +0 -1
- package/dist/esm/assets/DoubleArrowRightHeadIcon.js +0 -3
- package/dist/esm/assets/ExclamationFilledIcon.d.ts +0 -5
- package/dist/esm/assets/ExclamationFilledIcon.d.ts.map +0 -1
- package/dist/esm/assets/ExclamationFilledIcon.js +0 -3
- package/dist/esm/assets/FilterIcon.d.ts +0 -5
- package/dist/esm/assets/FilterIcon.d.ts.map +0 -1
- package/dist/esm/assets/FilterIcon.js +0 -3
- package/dist/esm/assets/LoadingSpinner.d.ts +0 -5
- package/dist/esm/assets/LoadingSpinner.d.ts.map +0 -1
- package/dist/esm/assets/LoadingSpinner.js +0 -3
- package/dist/esm/assets/RefreshIcon.d.ts +0 -5
- package/dist/esm/assets/RefreshIcon.d.ts.map +0 -1
- package/dist/esm/assets/RefreshIcon.js +0 -3
- package/dist/esm/assets/SearchIcon.d.ts +0 -5
- package/dist/esm/assets/SearchIcon.d.ts.map +0 -1
- package/dist/esm/assets/SearchIcon.js +0 -3
- package/dist/esm/assets/UpLeftArrowsIcon.d.ts +0 -5
- package/dist/esm/assets/UpLeftArrowsIcon.d.ts.map +0 -1
- package/dist/esm/assets/UpLeftArrowsIcon.js +0 -3
- package/dist/esm/assets/XCircleIcon.d.ts +0 -5
- package/dist/esm/assets/XCircleIcon.d.ts.map +0 -1
- package/dist/esm/assets/XCircleIcon.js +0 -3
- package/dist/esm/assets/XIcon.d.ts +0 -5
- package/dist/esm/assets/XIcon.d.ts.map +0 -1
- package/dist/esm/assets/XIcon.js +0 -3
- package/dist/esm/assets/index.d.ts +0 -22
- package/dist/esm/assets/index.d.ts.map +0 -1
- package/dist/esm/assets/index.js +0 -21
- package/dist/esm/components/Banner/index.d.ts +0 -3
- package/dist/esm/components/Banner/index.d.ts.map +0 -1
- package/dist/esm/components/Banner/index.js +0 -24
- package/dist/esm/components/BigModal/BigModal.d.ts +0 -15
- package/dist/esm/components/BigModal/BigModal.d.ts.map +0 -1
- package/dist/esm/components/BigModal/BigModal.js +0 -56
- package/dist/esm/components/Chart/BarChart.d.ts +0 -23
- package/dist/esm/components/Chart/BarChart.d.ts.map +0 -1
- package/dist/esm/components/Chart/BarChart.js +0 -110
- package/dist/esm/components/Chart/BarList.d.ts +0 -26
- package/dist/esm/components/Chart/BarList.d.ts.map +0 -1
- package/dist/esm/components/Chart/BarList.js +0 -148
- package/dist/esm/components/Chart/ChartError.d.ts +0 -10
- package/dist/esm/components/Chart/ChartError.d.ts.map +0 -1
- package/dist/esm/components/Chart/ChartError.js +0 -65
- package/dist/esm/components/Chart/ChartSkeleton.d.ts +0 -8
- package/dist/esm/components/Chart/ChartSkeleton.d.ts.map +0 -1
- package/dist/esm/components/Chart/ChartSkeleton.js +0 -19
- package/dist/esm/components/Chart/ChartTooltip.d.ts +0 -31
- package/dist/esm/components/Chart/ChartTooltip.d.ts.map +0 -1
- package/dist/esm/components/Chart/ChartTooltip.js +0 -234
- package/dist/esm/components/Chart/ChartTooltipFrame.d.ts +0 -6
- package/dist/esm/components/Chart/ChartTooltipFrame.d.ts.map +0 -1
- package/dist/esm/components/Chart/ChartTooltipFrame.js +0 -14
- package/dist/esm/components/Chart/ChartTooltipGroup.d.ts +0 -11
- package/dist/esm/components/Chart/ChartTooltipGroup.d.ts.map +0 -1
- package/dist/esm/components/Chart/ChartTooltipGroup.js +0 -23
- package/dist/esm/components/Chart/ChartTooltipRow.d.ts +0 -8
- package/dist/esm/components/Chart/ChartTooltipRow.d.ts.map +0 -1
- package/dist/esm/components/Chart/ChartTooltipRow.js +0 -41
- package/dist/esm/components/Chart/LineChart.d.ts +0 -29
- package/dist/esm/components/Chart/LineChart.d.ts.map +0 -1
- package/dist/esm/components/Chart/LineChart.js +0 -163
- package/dist/esm/components/Chart/PieChart.d.ts +0 -62
- package/dist/esm/components/Chart/PieChart.d.ts.map +0 -1
- package/dist/esm/components/Chart/PieChart.js +0 -195
- package/dist/esm/components/Dashboard/ChartComponent.d.ts +0 -4
- package/dist/esm/components/Dashboard/ChartComponent.d.ts.map +0 -1
- package/dist/esm/components/Dashboard/ChartComponent.js +0 -60
- package/dist/esm/components/Dashboard/DashboardFilter.d.ts +0 -38
- package/dist/esm/components/Dashboard/DashboardFilter.d.ts.map +0 -1
- package/dist/esm/components/Dashboard/DashboardFilter.js +0 -89
- package/dist/esm/components/Dashboard/DashboardSection.d.ts +0 -7
- package/dist/esm/components/Dashboard/DashboardSection.d.ts.map +0 -1
- package/dist/esm/components/Dashboard/DashboardSection.js +0 -22
- package/dist/esm/components/Dashboard/DashboardSectionContainer.d.ts +0 -3
- package/dist/esm/components/Dashboard/DashboardSectionContainer.d.ts.map +0 -1
- package/dist/esm/components/Dashboard/DashboardSectionContainer.js +0 -10
- package/dist/esm/components/Dashboard/DataLoader.d.ts +0 -44
- package/dist/esm/components/Dashboard/DataLoader.d.ts.map +0 -1
- package/dist/esm/components/Dashboard/DataLoader.js +0 -190
- package/dist/esm/components/Dashboard/MetricComponent.d.ts +0 -4
- package/dist/esm/components/Dashboard/MetricComponent.d.ts.map +0 -1
- package/dist/esm/components/Dashboard/MetricComponent.js +0 -133
- package/dist/esm/components/Dashboard/TableComponent.d.ts +0 -15
- package/dist/esm/components/Dashboard/TableComponent.d.ts.map +0 -1
- package/dist/esm/components/Dashboard/TableComponent.js +0 -62
- package/dist/esm/components/Dropdown/Dropdown.d.ts +0 -14
- package/dist/esm/components/Dropdown/Dropdown.d.ts.map +0 -1
- package/dist/esm/components/Dropdown/Dropdown.js +0 -69
- package/dist/esm/components/Dropdown/DropdownItem.d.ts +0 -11
- package/dist/esm/components/Dropdown/DropdownItem.d.ts.map +0 -1
- package/dist/esm/components/Dropdown/DropdownItem.js +0 -37
- package/dist/esm/components/Dropdown/index.d.ts +0 -3
- package/dist/esm/components/Dropdown/index.d.ts.map +0 -1
- package/dist/esm/components/Dropdown/index.js +0 -2
- package/dist/esm/components/Modal/Modal.d.ts +0 -15
- package/dist/esm/components/Modal/Modal.d.ts.map +0 -1
- package/dist/esm/components/Modal/Modal.js +0 -64
- package/dist/esm/components/Modal/index.d.ts +0 -2
- package/dist/esm/components/Modal/index.d.ts.map +0 -1
- package/dist/esm/components/Modal/index.js +0 -1
- package/dist/esm/components/QuillCard.d.ts +0 -9
- package/dist/esm/components/QuillCard.d.ts.map +0 -1
- package/dist/esm/components/QuillCard.js +0 -56
- package/dist/esm/components/QuillMultiSelect.d.ts +0 -11
- package/dist/esm/components/QuillMultiSelect.d.ts.map +0 -1
- package/dist/esm/components/QuillMultiSelect.js +0 -193
- package/dist/esm/components/QuillMultiSelectWithCombo.d.ts +0 -11
- package/dist/esm/components/QuillMultiSelectWithCombo.d.ts.map +0 -1
- package/dist/esm/components/QuillMultiSelectWithCombo.js +0 -215
- package/dist/esm/components/QuillSelect.d.ts +0 -6
- package/dist/esm/components/QuillSelect.d.ts.map +0 -1
- package/dist/esm/components/QuillSelect.js +0 -136
- package/dist/esm/components/QuillSelectWithCombo.d.ts +0 -6
- package/dist/esm/components/QuillSelectWithCombo.d.ts.map +0 -1
- package/dist/esm/components/QuillSelectWithCombo.js +0 -163
- package/dist/esm/components/QuillTable.d.ts +0 -31
- package/dist/esm/components/QuillTable.d.ts.map +0 -1
- package/dist/esm/components/QuillTable.js +0 -261
- package/dist/esm/components/ReportBuilder/AddColumnModal.d.ts +0 -34
- package/dist/esm/components/ReportBuilder/AddColumnModal.d.ts.map +0 -1
- package/dist/esm/components/ReportBuilder/AddColumnModal.js +0 -145
- package/dist/esm/components/ReportBuilder/AddLimitPopover.d.ts +0 -26
- package/dist/esm/components/ReportBuilder/AddLimitPopover.d.ts.map +0 -1
- package/dist/esm/components/ReportBuilder/AddLimitPopover.js +0 -36
- package/dist/esm/components/ReportBuilder/AddSortPopover.d.ts +0 -23
- package/dist/esm/components/ReportBuilder/AddSortPopover.d.ts.map +0 -1
- package/dist/esm/components/ReportBuilder/AddSortPopover.js +0 -73
- package/dist/esm/components/ReportBuilder/FilterModal.d.ts +0 -30
- package/dist/esm/components/ReportBuilder/FilterModal.d.ts.map +0 -1
- package/dist/esm/components/ReportBuilder/FilterModal.js +0 -576
- package/dist/esm/components/ReportBuilder/ast.d.ts +0 -523
- package/dist/esm/components/ReportBuilder/ast.d.ts.map +0 -1
- package/dist/esm/components/ReportBuilder/ast.js +0 -230
- package/dist/esm/components/ReportBuilder/bigDateMap.d.ts +0 -7
- package/dist/esm/components/ReportBuilder/bigDateMap.d.ts.map +0 -1
- package/dist/esm/components/ReportBuilder/bigDateMap.js +0 -687
- package/dist/esm/components/ReportBuilder/constants.d.ts +0 -117
- package/dist/esm/components/ReportBuilder/constants.d.ts.map +0 -1
- package/dist/esm/components/ReportBuilder/constants.js +0 -161
- package/dist/esm/components/ReportBuilder/convert.d.ts +0 -65
- package/dist/esm/components/ReportBuilder/convert.d.ts.map +0 -1
- package/dist/esm/components/ReportBuilder/convert.js +0 -717
- package/dist/esm/components/ReportBuilder/operators.d.ts +0 -462
- package/dist/esm/components/ReportBuilder/operators.d.ts.map +0 -1
- package/dist/esm/components/ReportBuilder/operators.js +0 -581
- package/dist/esm/components/ReportBuilder/pivot.d.ts +0 -16
- package/dist/esm/components/ReportBuilder/pivot.d.ts.map +0 -1
- package/dist/esm/components/ReportBuilder/pivot.js +0 -1
- package/dist/esm/components/ReportBuilder/postgres.d.ts +0 -150
- package/dist/esm/components/ReportBuilder/postgres.d.ts.map +0 -1
- package/dist/esm/components/ReportBuilder/postgres.js +0 -355
- package/dist/esm/components/ReportBuilder/schema.d.ts +0 -23
- package/dist/esm/components/ReportBuilder/schema.d.ts.map +0 -1
- package/dist/esm/components/ReportBuilder/schema.js +0 -1
- package/dist/esm/components/ReportBuilder/ui.d.ts +0 -119
- package/dist/esm/components/ReportBuilder/ui.d.ts.map +0 -1
- package/dist/esm/components/ReportBuilder/ui.js +0 -382
- package/dist/esm/components/ReportBuilder/util.d.ts +0 -76
- package/dist/esm/components/ReportBuilder/util.d.ts.map +0 -1
- package/dist/esm/components/ReportBuilder/util.js +0 -729
- package/dist/esm/components/UiComponents.d.ts +0 -221
- package/dist/esm/components/UiComponents.d.ts.map +0 -1
- package/dist/esm/components/UiComponents.js +0 -571
- package/dist/esm/components/selectUtils.d.ts +0 -9
- package/dist/esm/components/selectUtils.d.ts.map +0 -1
- package/dist/esm/components/selectUtils.js +0 -17
- package/dist/esm/contexts/BaseColorContext.d.ts +0 -4
- package/dist/esm/contexts/BaseColorContext.d.ts.map +0 -1
- package/dist/esm/contexts/BaseColorContext.js +0 -3
- package/dist/esm/contexts/HoveredValueContext.d.ts +0 -8
- package/dist/esm/contexts/HoveredValueContext.d.ts.map +0 -1
- package/dist/esm/contexts/HoveredValueContext.js +0 -5
- package/dist/esm/contexts/RootStylesContext.d.ts +0 -4
- package/dist/esm/contexts/RootStylesContext.d.ts.map +0 -1
- package/dist/esm/contexts/RootStylesContext.js +0 -3
- package/dist/esm/contexts/SelectedValueContext.d.ts +0 -8
- package/dist/esm/contexts/SelectedValueContext.d.ts.map +0 -1
- package/dist/esm/contexts/SelectedValueContext.js +0 -6
- package/dist/esm/contexts/index.d.ts +0 -5
- package/dist/esm/contexts/index.d.ts.map +0 -1
- package/dist/esm/contexts/index.js +0 -4
- package/dist/esm/hooks/index.d.ts +0 -6
- package/dist/esm/hooks/index.d.ts.map +0 -1
- package/dist/esm/hooks/index.js +0 -5
- package/dist/esm/hooks/useAstToFilterTree.d.ts +0 -11
- package/dist/esm/hooks/useAstToFilterTree.d.ts.map +0 -1
- package/dist/esm/hooks/useAstToFilterTree.js +0 -24
- package/dist/esm/hooks/useDashboard.d.ts +0 -7
- package/dist/esm/hooks/useDashboard.d.ts.map +0 -1
- package/dist/esm/hooks/useDashboard.js +0 -69
- package/dist/esm/hooks/useExport.d.ts +0 -6
- package/dist/esm/hooks/useExport.d.ts.map +0 -1
- package/dist/esm/hooks/useExport.js +0 -125
- package/dist/esm/hooks/useFormat.d.ts +0 -5
- package/dist/esm/hooks/useFormat.d.ts.map +0 -1
- package/dist/esm/hooks/useFormat.js +0 -25
- package/dist/esm/hooks/useInternalState.d.ts +0 -4
- package/dist/esm/hooks/useInternalState.d.ts.map +0 -1
- package/dist/esm/hooks/useInternalState.js +0 -14
- package/dist/esm/hooks/useOnClickOutside.d.ts +0 -3
- package/dist/esm/hooks/useOnClickOutside.d.ts.map +0 -1
- package/dist/esm/hooks/useOnClickOutside.js +0 -18
- package/dist/esm/hooks/useOnWindowResize.d.ts +0 -5
- package/dist/esm/hooks/useOnWindowResize.d.ts.map +0 -1
- package/dist/esm/hooks/useOnWindowResize.js +0 -14
- package/dist/esm/hooks/useQuill.d.ts +0 -37
- package/dist/esm/hooks/useQuill.d.ts.map +0 -1
- package/dist/esm/hooks/useQuill.js +0 -182
- package/dist/esm/hooks/useSelectOnKeyDown.d.ts +0 -3
- package/dist/esm/hooks/useSelectOnKeyDown.d.ts.map +0 -1
- package/dist/esm/hooks/useSelectOnKeyDown.js +0 -63
- package/dist/esm/hooks/useTheme.d.ts +0 -7
- package/dist/esm/hooks/useTheme.d.ts.map +0 -1
- package/dist/esm/hooks/useTheme.js +0 -10
- package/dist/esm/index.d.ts +0 -29
- package/dist/esm/index.d.ts.map +0 -1
- package/dist/esm/index.js +0 -16
- package/dist/esm/internals/ReportBuilder/PivotForm.d.ts +0 -28
- package/dist/esm/internals/ReportBuilder/PivotForm.d.ts.map +0 -1
- package/dist/esm/internals/ReportBuilder/PivotForm.js +0 -62
- package/dist/esm/internals/ReportBuilder/PivotList.d.ts +0 -39
- package/dist/esm/internals/ReportBuilder/PivotList.d.ts.map +0 -1
- package/dist/esm/internals/ReportBuilder/PivotList.js +0 -89
- package/dist/esm/internals/ReportBuilder/PivotModal.d.ts +0 -146
- package/dist/esm/internals/ReportBuilder/PivotModal.d.ts.map +0 -1
- package/dist/esm/internals/ReportBuilder/PivotModal.js +0 -1210
- package/dist/esm/lib/font.d.ts +0 -14
- package/dist/esm/lib/font.d.ts.map +0 -1
- package/dist/esm/lib/font.js +0 -13
- package/dist/esm/lib/index.d.ts +0 -4
- package/dist/esm/lib/index.d.ts.map +0 -1
- package/dist/esm/lib/index.js +0 -3
- package/dist/esm/lib/inputTypes.d.ts +0 -21
- package/dist/esm/lib/inputTypes.d.ts.map +0 -1
- package/dist/esm/lib/inputTypes.js +0 -55
- package/dist/esm/lib/utils.d.ts +0 -10
- package/dist/esm/lib/utils.d.ts.map +0 -1
- package/dist/esm/lib/utils.js +0 -35
- package/dist/esm/models/Columns.d.ts +0 -12
- package/dist/esm/models/Columns.d.ts.map +0 -1
- package/dist/esm/models/Columns.js +0 -1
- package/dist/esm/models/Filter.d.ts +0 -118
- package/dist/esm/models/Filter.d.ts.map +0 -1
- package/dist/esm/models/Filter.js +0 -98
- package/dist/esm/models/Pagination.d.ts +0 -10
- package/dist/esm/models/Pagination.d.ts.map +0 -1
- package/dist/esm/models/Pagination.js +0 -1
- package/dist/esm/models/Pivots.d.ts +0 -2
- package/dist/esm/models/Pivots.d.ts.map +0 -1
- package/dist/esm/models/Pivots.js +0 -1
- package/dist/esm/models/Report.d.ts +0 -103
- package/dist/esm/models/Report.d.ts.map +0 -1
- package/dist/esm/models/Report.js +0 -1
- package/dist/esm/models/Tables.d.ts +0 -8
- package/dist/esm/models/Tables.d.ts.map +0 -1
- package/dist/esm/models/Tables.js +0 -1
- package/dist/esm/utils/aggregate.d.ts +0 -4
- package/dist/esm/utils/aggregate.d.ts.map +0 -1
- package/dist/esm/utils/aggregate.js +0 -422
- package/dist/esm/utils/astFilterProcessing.d.ts +0 -36
- package/dist/esm/utils/astFilterProcessing.d.ts.map +0 -1
- package/dist/esm/utils/astFilterProcessing.js +0 -8084
- package/dist/esm/utils/astProcessing.d.ts +0 -26
- package/dist/esm/utils/astProcessing.d.ts.map +0 -1
- package/dist/esm/utils/astProcessing.js +0 -254
- package/dist/esm/utils/axisFormatter.d.ts +0 -20
- package/dist/esm/utils/axisFormatter.d.ts.map +0 -1
- package/dist/esm/utils/axisFormatter.js +0 -179
- package/dist/esm/utils/color.d.ts +0 -44
- package/dist/esm/utils/color.d.ts.map +0 -1
- package/dist/esm/utils/color.js +0 -425
- package/dist/esm/utils/columnProcessing.d.ts +0 -13
- package/dist/esm/utils/columnProcessing.d.ts.map +0 -1
- package/dist/esm/utils/columnProcessing.js +0 -260
- package/dist/esm/utils/constants.d.ts +0 -2
- package/dist/esm/utils/constants.d.ts.map +0 -1
- package/dist/esm/utils/constants.js +0 -1
- package/dist/esm/utils/crypto.d.ts +0 -2
- package/dist/esm/utils/crypto.d.ts.map +0 -1
- package/dist/esm/utils/crypto.js +0 -10
- package/dist/esm/utils/csv.d.ts +0 -6
- package/dist/esm/utils/csv.d.ts.map +0 -1
- package/dist/esm/utils/csv.js +0 -78
- package/dist/esm/utils/dashboard.d.ts +0 -13
- package/dist/esm/utils/dashboard.d.ts.map +0 -1
- package/dist/esm/utils/dashboard.js +0 -171
- package/dist/esm/utils/dataFetcher.d.ts +0 -3
- package/dist/esm/utils/dataFetcher.d.ts.map +0 -1
- package/dist/esm/utils/dataFetcher.js +0 -199
- package/dist/esm/utils/dataProcessing.d.ts +0 -10
- package/dist/esm/utils/dataProcessing.d.ts.map +0 -1
- package/dist/esm/utils/dataProcessing.js +0 -144
- package/dist/esm/utils/dates.d.ts +0 -20
- package/dist/esm/utils/dates.d.ts.map +0 -1
- package/dist/esm/utils/dates.js +0 -95
- package/dist/esm/utils/error.d.ts +0 -5
- package/dist/esm/utils/error.d.ts.map +0 -1
- package/dist/esm/utils/error.js +0 -8
- package/dist/esm/utils/errorProcessing.d.ts +0 -2
- package/dist/esm/utils/errorProcessing.d.ts.map +0 -1
- package/dist/esm/utils/errorProcessing.js +0 -5
- package/dist/esm/utils/filterConstants.d.ts +0 -34
- package/dist/esm/utils/filterConstants.d.ts.map +0 -1
- package/dist/esm/utils/filterConstants.js +0 -33
- package/dist/esm/utils/filterProcessing.d.ts +0 -10
- package/dist/esm/utils/filterProcessing.d.ts.map +0 -1
- package/dist/esm/utils/filterProcessing.js +0 -232
- package/dist/esm/utils/getDomain.d.ts +0 -8
- package/dist/esm/utils/getDomain.d.ts.map +0 -1
- package/dist/esm/utils/getDomain.js +0 -52
- package/dist/esm/utils/logging.d.ts +0 -2
- package/dist/esm/utils/logging.d.ts.map +0 -1
- package/dist/esm/utils/logging.js +0 -7
- package/dist/esm/utils/merge.d.ts +0 -2
- package/dist/esm/utils/merge.d.ts.map +0 -1
- package/dist/esm/utils/merge.js +0 -18
- package/dist/esm/utils/monacoConfig.d.ts +0 -21
- package/dist/esm/utils/monacoConfig.d.ts.map +0 -1
- package/dist/esm/utils/monacoConfig.js +0 -319
- package/dist/esm/utils/paginationProcessing.d.ts +0 -5
- package/dist/esm/utils/paginationProcessing.d.ts.map +0 -1
- package/dist/esm/utils/paginationProcessing.js +0 -25
- package/dist/esm/utils/parserBigQuery.d.ts +0 -6
- package/dist/esm/utils/parserBigQuery.d.ts.map +0 -1
- package/dist/esm/utils/parserBigQuery.js +0 -52
- package/dist/esm/utils/parserPostgres.d.ts +0 -3
- package/dist/esm/utils/parserPostgres.d.ts.map +0 -1
- package/dist/esm/utils/parserPostgres.js +0 -37
- package/dist/esm/utils/pivotConstructor.d.ts +0 -7
- package/dist/esm/utils/pivotConstructor.d.ts.map +0 -1
- package/dist/esm/utils/pivotConstructor.js +0 -151
- package/dist/esm/utils/pivotProcessing.d.ts +0 -17
- package/dist/esm/utils/pivotProcessing.d.ts.map +0 -1
- package/dist/esm/utils/pivotProcessing.js +0 -132
- package/dist/esm/utils/queryConstructor.d.ts +0 -7
- package/dist/esm/utils/queryConstructor.d.ts.map +0 -1
- package/dist/esm/utils/queryConstructor.js +0 -223
- package/dist/esm/utils/report.d.ts +0 -10
- package/dist/esm/utils/report.d.ts.map +0 -1
- package/dist/esm/utils/report.js +0 -174
- package/dist/esm/utils/schema.d.ts +0 -6
- package/dist/esm/utils/schema.d.ts.map +0 -1
- package/dist/esm/utils/schema.js +0 -153
- package/dist/esm/utils/styles.d.ts +0 -17
- package/dist/esm/utils/styles.d.ts.map +0 -1
- package/dist/esm/utils/styles.js +0 -16
- package/dist/esm/utils/tableProcessing.d.ts +0 -45
- package/dist/esm/utils/tableProcessing.d.ts.map +0 -1
- package/dist/esm/utils/tableProcessing.js +0 -293
- package/dist/esm/utils/textProcessing.d.ts +0 -6
- package/dist/esm/utils/textProcessing.d.ts.map +0 -1
- package/dist/esm/utils/textProcessing.js +0 -49
- package/dist/esm/utils/validation.d.ts +0 -9
- package/dist/esm/utils/validation.d.ts.map +0 -1
- package/dist/esm/utils/validation.js +0 -20
- package/dist/esm/utils/valueFormatter.d.ts +0 -29
- package/dist/esm/utils/valueFormatter.d.ts.map +0 -1
- package/dist/esm/utils/valueFormatter.js +0 -342
- package/dist/esm/utils/width.d.ts +0 -12
- package/dist/esm/utils/width.d.ts.map +0 -1
- package/dist/esm/utils/width.js +0 -21
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { default as BaseColorContext } from './BaseColorContext';
|
|
2
|
-
export { default as HoveredValueContext } from './HoveredValueContext';
|
|
3
|
-
export { default as RootStylesContext } from './RootStylesContext';
|
|
4
|
-
export { default as SelectedValueContext } from './SelectedValueContext';
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/contexts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { default as BaseColorContext } from './BaseColorContext';
|
|
2
|
-
export { default as HoveredValueContext } from './HoveredValueContext';
|
|
3
|
-
export { default as RootStylesContext } from './RootStylesContext';
|
|
4
|
-
export { default as SelectedValueContext } from './SelectedValueContext';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { default as useInternalState } from './useInternalState';
|
|
2
|
-
export { default as useOnClickOutside } from './useOnClickOutside';
|
|
3
|
-
export { default as useOnWindowResize } from './useOnWindowResize';
|
|
4
|
-
export { default as useSelectOnKeyDown } from './useSelectOnKeyDown';
|
|
5
|
-
export { default as useTheme } from './useTheme';
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/esm/hooks/index.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { default as useInternalState } from './useInternalState';
|
|
2
|
-
export { default as useOnClickOutside } from './useOnClickOutside';
|
|
3
|
-
export { default as useOnWindowResize } from './useOnWindowResize';
|
|
4
|
-
export { default as useSelectOnKeyDown } from './useSelectOnKeyDown';
|
|
5
|
-
export { default as useTheme } from './useTheme';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { FilterTreeNode } from '../utils/astFilterProcessing';
|
|
2
|
-
/**
|
|
3
|
-
* @param ast
|
|
4
|
-
* @param client
|
|
5
|
-
* @returns Filter tree
|
|
6
|
-
*
|
|
7
|
-
* Hook that takes in an ast where node and parses it into a filter tree
|
|
8
|
-
*/
|
|
9
|
-
declare const useAstToFilterTree: (ast: any, client: any) => FilterTreeNode | null;
|
|
10
|
-
export default useAstToFilterTree;
|
|
11
|
-
//# sourceMappingURL=useAstToFilterTree.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useAstToFilterTree.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAstToFilterTree.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAmB,MAAM,8BAA8B,CAAC;AAE/E;;;;;;GAMG;AACH,QAAA,MAAM,kBAAkB,QAAS,GAAG,UAAU,GAAG,0BAkBhD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from 'react';
|
|
2
|
-
import { astToFilterTree } from '../utils/astFilterProcessing';
|
|
3
|
-
/**
|
|
4
|
-
* @param ast
|
|
5
|
-
* @param client
|
|
6
|
-
* @returns Filter tree
|
|
7
|
-
*
|
|
8
|
-
* Hook that takes in an ast where node and parses it into a filter tree
|
|
9
|
-
*/
|
|
10
|
-
const useAstToFilterTree = (ast, client) => {
|
|
11
|
-
const [filterTree, setFilterTree] = useState(null);
|
|
12
|
-
useEffect(() => {
|
|
13
|
-
if (!ast || !client) {
|
|
14
|
-
return setFilterTree(null);
|
|
15
|
-
}
|
|
16
|
-
const fetchFilter = () => {
|
|
17
|
-
const filterPromise = astToFilterTree(ast, client.databaseType.toLowerCase());
|
|
18
|
-
setFilterTree(filterPromise);
|
|
19
|
-
};
|
|
20
|
-
fetchFilter();
|
|
21
|
-
}, [ast, client]);
|
|
22
|
-
return filterTree;
|
|
23
|
-
};
|
|
24
|
-
export default useAstToFilterTree;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDashboard.d.ts","sourceRoot":"","sources":["../../../src/hooks/useDashboard.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY,kBAAmB,MAAM;;;;qCAYtB,MAAM;CAyEjC,CAAC"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { useContext, useEffect, useState } from 'react';
|
|
2
|
-
import { ClientContext, DashboardDataContext } from '../Context';
|
|
3
|
-
import { getData } from '../utils/dataFetcher';
|
|
4
|
-
export const useDashboard = (dashboardName) => {
|
|
5
|
-
const { dashboardData, dashboardDataDispatch } = useContext(DashboardDataContext);
|
|
6
|
-
// if (dashboardName === undefined || dashboardName === null) {
|
|
7
|
-
// throw new Error('useDashboard requires a dashboard name parameter');
|
|
8
|
-
// }
|
|
9
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
10
|
-
const [error, setError] = useState(null);
|
|
11
|
-
const [data, setData] = useState(null);
|
|
12
|
-
const [client] = useContext(ClientContext);
|
|
13
|
-
const handleReload = async (overrideDashboardName, fetchFromServer = false) => {
|
|
14
|
-
await getDashboards(overrideDashboardName ?? dashboardName, fetchFromServer);
|
|
15
|
-
};
|
|
16
|
-
async function getDashboards(dashboardName, fetchFromServer = false) {
|
|
17
|
-
if (!fetchFromServer &&
|
|
18
|
-
dashboardData &&
|
|
19
|
-
dashboardData[dashboardName] &&
|
|
20
|
-
dashboardData[dashboardName].newQueries) {
|
|
21
|
-
setData(dashboardData[dashboardName]);
|
|
22
|
-
setIsLoading(false);
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
setIsLoading(true);
|
|
26
|
-
if (!client || !client.publicKey || !client.customerId) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
if (dashboardName === null || dashboardName === undefined)
|
|
30
|
-
return;
|
|
31
|
-
const { databaseType, publicKey, customerId } = client;
|
|
32
|
-
try {
|
|
33
|
-
const searchParams = new URLSearchParams({
|
|
34
|
-
publicKey: publicKey,
|
|
35
|
-
orgId: customerId,
|
|
36
|
-
name: dashboardName,
|
|
37
|
-
}).toString();
|
|
38
|
-
const hostedBody = {
|
|
39
|
-
metadata: {
|
|
40
|
-
name: dashboardName,
|
|
41
|
-
task: 'config',
|
|
42
|
-
clientId: publicKey,
|
|
43
|
-
orgId: customerId || '*',
|
|
44
|
-
databaseType: databaseType,
|
|
45
|
-
useNewNodeSql: true,
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
const resp = await getData(client, `dashconfig?${searchParams}`, 'omit', hostedBody, null, 'GET');
|
|
49
|
-
dashboardDataDispatch({
|
|
50
|
-
type: 'ADD_DASHBOARD',
|
|
51
|
-
id: dashboardName,
|
|
52
|
-
data: { ...resp },
|
|
53
|
-
});
|
|
54
|
-
setData(resp);
|
|
55
|
-
setIsLoading(false);
|
|
56
|
-
setError(null);
|
|
57
|
-
}
|
|
58
|
-
catch (error) {
|
|
59
|
-
setError(null);
|
|
60
|
-
setIsLoading(false);
|
|
61
|
-
setError(error);
|
|
62
|
-
console.error('Error fetching data:', error);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
useEffect(() => {
|
|
66
|
-
getDashboards(dashboardName, true);
|
|
67
|
-
}, [dashboardName, client]);
|
|
68
|
-
return { data, isLoading, error, reload: handleReload };
|
|
69
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useExport.d.ts","sourceRoot":"","sources":["../../../src/hooks/useExport.tsx"],"names":[],"mappings":"AA0DA,eAAO,MAAM,SAAS,cAAe,MAAM;;;;CAuC1C,CAAC"}
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { downloadCSV } from '../utils/csv';
|
|
3
|
-
import { useContext, useLayoutEffect, useRef, useState } from 'react';
|
|
4
|
-
import { getData } from '../utils/dataFetcher';
|
|
5
|
-
import { ClientContext, DashboardFiltersContext } from '../Context';
|
|
6
|
-
import ReactDOM from 'react-dom';
|
|
7
|
-
import useTheme from './useTheme';
|
|
8
|
-
import { quillFormat } from '../utils/valueFormatter';
|
|
9
|
-
import { cleanDashboardItem } from '../utils/dashboard';
|
|
10
|
-
import { useReactToPrint } from 'react-to-print';
|
|
11
|
-
import { ChartDisplay } from '../Chart';
|
|
12
|
-
async function getExportData(client, dashboardFilters, reportId) {
|
|
13
|
-
const minimalFilters = Object.values(dashboardFilters).length
|
|
14
|
-
? Object.values(dashboardFilters).map((filter) => {
|
|
15
|
-
const newFilter = { ...filter };
|
|
16
|
-
if (newFilter.filterType === 'date_range') {
|
|
17
|
-
delete newFilter['field'];
|
|
18
|
-
delete newFilter['options'];
|
|
19
|
-
delete newFilter['selectedValue'];
|
|
20
|
-
}
|
|
21
|
-
return newFilter;
|
|
22
|
-
})
|
|
23
|
-
: [];
|
|
24
|
-
const hostedBody = {
|
|
25
|
-
metadata: {
|
|
26
|
-
dashboardItemId: reportId,
|
|
27
|
-
orgId: client.customerId || '*',
|
|
28
|
-
clientId: client.publicKey,
|
|
29
|
-
task: 'item',
|
|
30
|
-
databaseType: client?.databaseType,
|
|
31
|
-
filters: minimalFilters,
|
|
32
|
-
useNewNodeSql: true,
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
const cloudBody = {
|
|
36
|
-
id: reportId,
|
|
37
|
-
useNewNodeSql: true,
|
|
38
|
-
};
|
|
39
|
-
const resp = await getData(client, 'itempost', 'same-origin', hostedBody, cloudBody);
|
|
40
|
-
const cleanedReport = await cleanDashboardItem(resp, dashboardFilters);
|
|
41
|
-
if (cleanedReport.chartType === 'table' && cleanedReport.pivot) {
|
|
42
|
-
cleanedReport.columns = cleanedReport.yAxisFields;
|
|
43
|
-
}
|
|
44
|
-
return cleanedReport;
|
|
45
|
-
}
|
|
46
|
-
export const useExport = (reportId) => {
|
|
47
|
-
const { dashboardFilters } = useContext(DashboardFiltersContext);
|
|
48
|
-
const theme = useTheme();
|
|
49
|
-
const [client] = useContext(ClientContext);
|
|
50
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
51
|
-
if (!reportId) {
|
|
52
|
-
return { downloadCSV: () => { }, downloadPDF: () => { }, isLoading: false };
|
|
53
|
-
}
|
|
54
|
-
return {
|
|
55
|
-
downloadCSV: async () => {
|
|
56
|
-
setIsLoading(true);
|
|
57
|
-
const resp = await getExportData(client, dashboardFilters, reportId);
|
|
58
|
-
downloadCSV({
|
|
59
|
-
rows: resp.rows,
|
|
60
|
-
fields: resp.columns,
|
|
61
|
-
name: resp.name,
|
|
62
|
-
});
|
|
63
|
-
setIsLoading(false);
|
|
64
|
-
},
|
|
65
|
-
downloadPDF: async () => {
|
|
66
|
-
setIsLoading(true);
|
|
67
|
-
const resp = await getExportData(client, dashboardFilters, reportId);
|
|
68
|
-
const iframe = document.createElement('iframe');
|
|
69
|
-
document.body.appendChild(iframe);
|
|
70
|
-
if (iframe && iframe.contentDocument) {
|
|
71
|
-
ReactDOM.render(_jsx(PDFDetail, { report: resp, theme: theme }), iframe.contentDocument.body);
|
|
72
|
-
}
|
|
73
|
-
// delete the iframe
|
|
74
|
-
setTimeout(() => {
|
|
75
|
-
document.body.removeChild(iframe);
|
|
76
|
-
}, 1000);
|
|
77
|
-
setIsLoading(false);
|
|
78
|
-
},
|
|
79
|
-
isLoading,
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
function PDFDetail({ report, theme }) {
|
|
83
|
-
const componentRef = useRef(null);
|
|
84
|
-
const handlePrint = useReactToPrint({
|
|
85
|
-
content: () => componentRef.current,
|
|
86
|
-
pageStyle: `@page {
|
|
87
|
-
size: letter;
|
|
88
|
-
margin: 0;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
body {
|
|
92
|
-
margin: 2rem;
|
|
93
|
-
}`,
|
|
94
|
-
});
|
|
95
|
-
useLayoutEffect(() => {
|
|
96
|
-
setTimeout(() => handlePrint(), 1500);
|
|
97
|
-
}, []);
|
|
98
|
-
return (_jsxs("div", { ref: componentRef, style: { display: 'flex', flexDirection: 'column', margin: '2rem' }, children: [_jsx("div", { style: { display: 'flex', flexDirection: 'row', alignItems: 'center' }, children: _jsx("h2", { style: {
|
|
99
|
-
fontSize: 18,
|
|
100
|
-
fontWeight: '600',
|
|
101
|
-
textAlign: 'left',
|
|
102
|
-
paddingLeft: 10,
|
|
103
|
-
color: theme?.primaryTextColor,
|
|
104
|
-
}, children: report.name }) }), _jsxs("div", { style: { paddingLeft: 20, paddingRight: 20 }, children: [report.chartType !== 'table' && (_jsx(ChartDisplay, { overrideTheme: theme, config: report, containerStyle: {
|
|
105
|
-
display: 'flex',
|
|
106
|
-
height: 400,
|
|
107
|
-
}, loading: false, isAnimationActive: false })), _jsx("div", { style: {
|
|
108
|
-
border: '1px solid',
|
|
109
|
-
borderRadius: '4px',
|
|
110
|
-
borderStyle: 'none',
|
|
111
|
-
}, children: _jsxs("table", { style: {
|
|
112
|
-
fontFamily: 'sans-serif',
|
|
113
|
-
width: '100%',
|
|
114
|
-
borderCollapse: 'collapse',
|
|
115
|
-
borderStyle: 'none',
|
|
116
|
-
}, children: [_jsx("thead", { style: {
|
|
117
|
-
textAlign: 'left',
|
|
118
|
-
textOverflow: 'ellipsis',
|
|
119
|
-
whiteSpace: 'nowrap',
|
|
120
|
-
overflow: 'hidden',
|
|
121
|
-
}, children: _jsx("tr", { children: report.columns.map((col, colIndex) => (_jsx("th", { style: { padding: '2px', paddingLeft: '3px' }, children: col.label }, 'head' + colIndex))) }) }), _jsx("tbody", { children: report.rows.map((row, rowIndex) => (_jsx("tr", { children: report.columns.map((col, colIndex) => (_jsx("td", { style: { padding: '2px', paddingLeft: '3px' }, children: quillFormat({
|
|
122
|
-
value: row[col.field],
|
|
123
|
-
format: col.format,
|
|
124
|
-
}) }, 'cell' + col.field + colIndex + rowIndex))) }, 'row' + rowIndex))) })] }) })] })] }));
|
|
125
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useFormat.d.ts","sourceRoot":"","sources":["../../../src/hooks/useFormat.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,eAAe,aAChB,MAAM,KACf;IAAE,IAAI,EAAE,GAAG,EAAE,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAwBjC,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { quillFormat } from '../utils/valueFormatter';
|
|
2
|
-
import { useQuill } from './useQuill';
|
|
3
|
-
import { useMemo } from 'react';
|
|
4
|
-
export const useMemoizedRows = (reportId) => {
|
|
5
|
-
const { data } = useQuill(reportId);
|
|
6
|
-
const formattedRows = useMemo(() => {
|
|
7
|
-
if (!data || !data.rows || !data.columns)
|
|
8
|
-
return { rows: [], loading: true };
|
|
9
|
-
return {
|
|
10
|
-
rows: data.rows.map((row) => {
|
|
11
|
-
return data.columns.reduce((formattedRow, column) => {
|
|
12
|
-
// Apply the format function to each field in the row
|
|
13
|
-
const formattedValue = quillFormat({
|
|
14
|
-
value: row[column.field],
|
|
15
|
-
format: column.format,
|
|
16
|
-
});
|
|
17
|
-
formattedRow[column.field] = formattedValue;
|
|
18
|
-
return formattedRow;
|
|
19
|
-
}, {});
|
|
20
|
-
}),
|
|
21
|
-
loading: false,
|
|
22
|
-
};
|
|
23
|
-
}, [data]);
|
|
24
|
-
return formattedRows;
|
|
25
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useInternalState.d.ts","sourceRoot":"","sources":["../../../src/hooks/useInternalState.tsx"],"names":[],"mappings":";AAEA,QAAA,MAAM,gBAAgB,4GAWrB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
2
|
-
const useInternalState = (defaultValueProp, valueProp) => {
|
|
3
|
-
const isControlled = valueProp !== undefined;
|
|
4
|
-
const [valueState, setValueState] = useState(defaultValueProp);
|
|
5
|
-
const value = isControlled ? valueProp : valueState;
|
|
6
|
-
const setValue = (nextValue) => {
|
|
7
|
-
if (isControlled) {
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
setValueState(nextValue);
|
|
11
|
-
};
|
|
12
|
-
return [value, setValue];
|
|
13
|
-
};
|
|
14
|
-
export default useInternalState;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useOnClickOutside.d.ts","sourceRoot":"","sources":["../../../src/hooks/useOnClickOutside.tsx"],"names":[],"mappings":"AAEA,QAAA,MAAM,iBAAiB,QAChB,MAAM,SAAS,CAAC,cAAc,CAAC,mBACjB,GAAG,KAAG,IAAI,SAgB9B,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { useEffect } from 'react';
|
|
2
|
-
const useOnClickOutside = (ref, handler) => {
|
|
3
|
-
useEffect(() => {
|
|
4
|
-
const listener = (event) => {
|
|
5
|
-
if (!ref.current || ref.current.contains(event.target)) {
|
|
6
|
-
return;
|
|
7
|
-
}
|
|
8
|
-
handler(event);
|
|
9
|
-
};
|
|
10
|
-
document.addEventListener('mousedown', listener);
|
|
11
|
-
document.addEventListener('touchstart', listener);
|
|
12
|
-
return () => {
|
|
13
|
-
document.removeEventListener('mousedown', listener);
|
|
14
|
-
document.removeEventListener('touchstart', listener);
|
|
15
|
-
};
|
|
16
|
-
}, [ref, handler]);
|
|
17
|
-
};
|
|
18
|
-
export default useOnClickOutside;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useOnWindowResize.d.ts","sourceRoot":"","sources":["../../../src/hooks/useOnWindowResize.tsx"],"names":[],"mappings":"AAEA,QAAA,MAAM,iBAAiB,YACZ;IAAE,IAAI,IAAI,CAAA;CAAE,sBACD,MAAM,SAe3B,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from 'react';
|
|
2
|
-
const useOnWindowResize = (handler, initialWindowSize) => {
|
|
3
|
-
const [windowSize, setWindowSize] = useState(initialWindowSize);
|
|
4
|
-
useEffect(() => {
|
|
5
|
-
const handleResize = () => {
|
|
6
|
-
setWindowSize(window.innerWidth);
|
|
7
|
-
handler();
|
|
8
|
-
};
|
|
9
|
-
handleResize();
|
|
10
|
-
window.addEventListener('resize', handleResize);
|
|
11
|
-
return () => window.removeEventListener('resize', handleResize);
|
|
12
|
-
}, [handler, windowSize]);
|
|
13
|
-
};
|
|
14
|
-
export default useOnWindowResize;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { QuillReport } from '../models/Report';
|
|
2
|
-
import { Calculation } from '../utils/dataProcessing';
|
|
3
|
-
interface Column {
|
|
4
|
-
_id: string;
|
|
5
|
-
label: string;
|
|
6
|
-
field: string;
|
|
7
|
-
format: string;
|
|
8
|
-
}
|
|
9
|
-
export interface Field {
|
|
10
|
-
name: string;
|
|
11
|
-
tableID: number;
|
|
12
|
-
columnID: number;
|
|
13
|
-
dataTypeID: number;
|
|
14
|
-
dataTypeSize: number;
|
|
15
|
-
dataTypeModifier: number;
|
|
16
|
-
format: string;
|
|
17
|
-
}
|
|
18
|
-
export declare const useQuill: (reportId?: string, pagination?: {
|
|
19
|
-
rowsPerPage: number;
|
|
20
|
-
rowsPerRequest: number;
|
|
21
|
-
}) => {
|
|
22
|
-
data: QuillReport | null;
|
|
23
|
-
loading: boolean;
|
|
24
|
-
error: string | undefined;
|
|
25
|
-
fetchMore: (page: number) => void;
|
|
26
|
-
setSort: (field: string, direction: string) => void;
|
|
27
|
-
calculate: ((calcType: Calculation) => number | undefined) | (() => undefined);
|
|
28
|
-
};
|
|
29
|
-
export declare const usePivot: (reportId?: string) => {
|
|
30
|
-
data: {
|
|
31
|
-
rows: any[];
|
|
32
|
-
columns: Column[];
|
|
33
|
-
} | undefined;
|
|
34
|
-
error: string | undefined;
|
|
35
|
-
};
|
|
36
|
-
export {};
|
|
37
|
-
//# sourceMappingURL=useQuill.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useQuill.d.ts","sourceRoot":"","sources":["../../../src/hooks/useQuill.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EACL,WAAW,EAIZ,MAAM,yBAAyB,CAAC;AAEjC,UAAU,MAAM;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,QAAQ,cACR,MAAM,eACJ;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE;UAEtD,WAAW,GAAG,IAAI;aACf,OAAO;WACT,MAAM,GAAG,SAAS;sBACP,MAAM,KAAK,IAAI;qBAChB,MAAM,aAAa,MAAM,KAAK,IAAI;2BAEnC,WAAW,KAAK,MAAM,GAAG,SAAS,WACvC,SAAS;CAoLrB,CAAC;AAEF,eAAO,MAAM,QAAQ,cACR,MAAM;UAEX;QAAE,IAAI,EAAE,GAAG,EAAE,CAAC;QAAC,OAAO,EAAE,MAAM,EAAE,CAAA;KAAE,GAAG,SAAS;WAC7C,MAAM,GAAG,SAAS;CAoD1B,CAAC"}
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
import { useContext, useEffect, useState } from 'react';
|
|
2
|
-
import { ClientContext, CustomFieldContext, DashboardContext, DashboardFiltersContext, } from '../Context';
|
|
3
|
-
import { mergeComparisonRange } from '../utils/merge';
|
|
4
|
-
import { fetchReport } from '../utils/report';
|
|
5
|
-
import { shouldFetchMore } from '../utils/paginationProcessing';
|
|
6
|
-
import { fetchTableByReport, } from '../utils/tableProcessing';
|
|
7
|
-
import { getPointToPointPercentageChange, getSimplePercentageChange, getSumOfFields, } from '../utils/dataProcessing';
|
|
8
|
-
export const useQuill = (reportId, pagination) => {
|
|
9
|
-
const [dashboard, dispatch] = useContext(DashboardContext);
|
|
10
|
-
const { dashboardFilters } = useContext(DashboardFiltersContext);
|
|
11
|
-
const [customFields] = useContext(CustomFieldContext);
|
|
12
|
-
const [client] = useContext(ClientContext);
|
|
13
|
-
const [data, setData] = useState(null);
|
|
14
|
-
const [loading, setLoading] = useState(true);
|
|
15
|
-
const [error, setError] = useState(undefined);
|
|
16
|
-
const [previousPage, setPreviousPage] = useState(0);
|
|
17
|
-
const [calculate, setCalculate] = useState(() => emptyCalculate);
|
|
18
|
-
function emptyCalculate() {
|
|
19
|
-
return undefined;
|
|
20
|
-
}
|
|
21
|
-
const [additionalProcessing, setAdditionProcessing] = useState(pagination
|
|
22
|
-
? {
|
|
23
|
-
page: pagination,
|
|
24
|
-
}
|
|
25
|
-
: undefined);
|
|
26
|
-
function calculateFunction(calcType, options) {
|
|
27
|
-
if (!data) {
|
|
28
|
-
return undefined;
|
|
29
|
-
}
|
|
30
|
-
switch (calcType) {
|
|
31
|
-
case 'SIMPLE_PERCENTAGE_CHANGE':
|
|
32
|
-
return getSimplePercentageChange(data);
|
|
33
|
-
case 'POINT_TO_POINT_PERCENTAGE_CHANGE':
|
|
34
|
-
return getPointToPointPercentageChange(data);
|
|
35
|
-
case 'SUM':
|
|
36
|
-
return getSumOfFields(data, options?.comparison ? true : false);
|
|
37
|
-
default:
|
|
38
|
-
return getSimplePercentageChange(data);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
const fetchMore = (page) => {
|
|
42
|
-
if (additionalProcessing &&
|
|
43
|
-
additionalProcessing.page &&
|
|
44
|
-
shouldFetchMore(additionalProcessing.page, page, previousPage)) {
|
|
45
|
-
const newPagination = { ...additionalProcessing.page, page };
|
|
46
|
-
const updatedProcessing = {
|
|
47
|
-
...additionalProcessing,
|
|
48
|
-
page: newPagination,
|
|
49
|
-
};
|
|
50
|
-
setAdditionProcessing(updatedProcessing);
|
|
51
|
-
updateTableRows(updatedProcessing);
|
|
52
|
-
}
|
|
53
|
-
if (page > previousPage) {
|
|
54
|
-
setPreviousPage(page);
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
const setSort = (field, direction) => {
|
|
58
|
-
if (!additionalProcessing?.page) {
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
const updatedProcessing = {
|
|
62
|
-
page: { ...additionalProcessing.page, page: 0 },
|
|
63
|
-
sort: { field, direction },
|
|
64
|
-
};
|
|
65
|
-
updateTableRows(updatedProcessing, true);
|
|
66
|
-
setAdditionProcessing(updatedProcessing);
|
|
67
|
-
setPreviousPage(0);
|
|
68
|
-
};
|
|
69
|
-
const updateTableRows = async (processing, resetRows = false) => {
|
|
70
|
-
if (!loading && reportId && data) {
|
|
71
|
-
setLoading(true);
|
|
72
|
-
try {
|
|
73
|
-
const specificDashboardFilter = dashboardFilters.filter((f) => f &&
|
|
74
|
-
reportId &&
|
|
75
|
-
dashboard[reportId] &&
|
|
76
|
-
// @ts-ignore
|
|
77
|
-
dashboard[reportId].dashboardName === f.dashboardName);
|
|
78
|
-
const updatedProcessing = { ...additionalProcessing, ...processing };
|
|
79
|
-
const paginatedRows = await fetchTableByReport(reportId, client, updatedProcessing, specificDashboardFilter, customFields);
|
|
80
|
-
if (paginatedRows.error) {
|
|
81
|
-
throw new Error('Error fetching chart');
|
|
82
|
-
}
|
|
83
|
-
let tempRows = [...data.rows, ...paginatedRows.rows];
|
|
84
|
-
if (resetRows) {
|
|
85
|
-
tempRows = paginatedRows.rows;
|
|
86
|
-
}
|
|
87
|
-
setData({ ...data, rows: tempRows });
|
|
88
|
-
setTimeout(() => {
|
|
89
|
-
setLoading(false);
|
|
90
|
-
}, 200);
|
|
91
|
-
}
|
|
92
|
-
catch (e) {
|
|
93
|
-
console.log(e);
|
|
94
|
-
setLoading(false);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
const fetchReportHelper = async (curReportId, useReportTask = true, additionalProcessing) => {
|
|
99
|
-
if (dashboard && dashboard[curReportId]) {
|
|
100
|
-
// @ts-ignore
|
|
101
|
-
if (dashboard[curReportId].compareRows) {
|
|
102
|
-
mergeComparisonRange(dashboard[curReportId]);
|
|
103
|
-
}
|
|
104
|
-
// @ts-ignore
|
|
105
|
-
setData({ ...dashboard[curReportId] });
|
|
106
|
-
setLoading(false);
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
const specificDashboardFilter = dashboardFilters.filter((f) => f &&
|
|
110
|
-
reportId &&
|
|
111
|
-
dashboard[curReportId] &&
|
|
112
|
-
// @ts-ignore
|
|
113
|
-
dashboard[curReportId].dashboardName === f.dashboardName);
|
|
114
|
-
setLoading(true);
|
|
115
|
-
const { report, error } = await fetchReport(curReportId, client, useReportTask, specificDashboardFilter, additionalProcessing, undefined, customFields);
|
|
116
|
-
dispatch({
|
|
117
|
-
type: 'UPDATE_DASHBOARD_ITEM',
|
|
118
|
-
id: reportId,
|
|
119
|
-
data: {
|
|
120
|
-
...report,
|
|
121
|
-
filtersApplied: specificDashboardFilter,
|
|
122
|
-
triggerReload: false,
|
|
123
|
-
},
|
|
124
|
-
});
|
|
125
|
-
setData(report);
|
|
126
|
-
setError(error);
|
|
127
|
-
setLoading(false);
|
|
128
|
-
};
|
|
129
|
-
useEffect(() => {
|
|
130
|
-
if (reportId) {
|
|
131
|
-
fetchReportHelper(reportId, pagination ? true : false, pagination);
|
|
132
|
-
}
|
|
133
|
-
}, [reportId, dashboard]);
|
|
134
|
-
useEffect(() => {
|
|
135
|
-
setCalculate(() => calculateFunction);
|
|
136
|
-
}, [data]);
|
|
137
|
-
return { data, loading, error, fetchMore, setSort, calculate };
|
|
138
|
-
};
|
|
139
|
-
export const usePivot = (reportId) => {
|
|
140
|
-
const [dashboard] = useContext(DashboardContext);
|
|
141
|
-
const [data, setData] = useState(undefined);
|
|
142
|
-
const [error, setError] = useState(undefined);
|
|
143
|
-
useEffect(() => {
|
|
144
|
-
if (!reportId ||
|
|
145
|
-
!dashboard ||
|
|
146
|
-
// @ts-ignore
|
|
147
|
-
!dashboard[reportId] ||
|
|
148
|
-
// @ts-ignore
|
|
149
|
-
!dashboard[reportId].pivotColumns ||
|
|
150
|
-
// @ts-ignore
|
|
151
|
-
!dashboard[reportId].pivotRows) {
|
|
152
|
-
setError('No data found');
|
|
153
|
-
return;
|
|
154
|
-
}
|
|
155
|
-
setData({
|
|
156
|
-
// @ts-ignore
|
|
157
|
-
rows: dashboard[reportId].pivotRows,
|
|
158
|
-
// @ts-ignore
|
|
159
|
-
columns: dashboard[reportId].pivotColumns
|
|
160
|
-
.map((col, index) => {
|
|
161
|
-
if (index === 0) {
|
|
162
|
-
return {
|
|
163
|
-
...col,
|
|
164
|
-
format: 'string',
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
return {
|
|
168
|
-
...col,
|
|
169
|
-
// @ts-ignore
|
|
170
|
-
format: dashboard[reportId].yAxisFields[0].format,
|
|
171
|
-
};
|
|
172
|
-
})
|
|
173
|
-
.filter(
|
|
174
|
-
// @ts-ignore
|
|
175
|
-
(col) =>
|
|
176
|
-
// @ts-ignore
|
|
177
|
-
dashboard[reportId].chartType !== 'table' ||
|
|
178
|
-
!col.field.startsWith('comparison_')),
|
|
179
|
-
});
|
|
180
|
-
}, [dashboard, reportId]);
|
|
181
|
-
return { data, error };
|
|
182
|
-
};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
declare const useSelectOnKeyDown: (onValueChange: (value: string) => void, optionValues: string[], isFocused: boolean, handleFocusChange: (isFocused: boolean) => void, value?: string) => [string | null | undefined, (e: React.KeyboardEvent<HTMLDivElement | HTMLButtonElement>) => void];
|
|
2
|
-
export default useSelectOnKeyDown;
|
|
3
|
-
//# sourceMappingURL=useSelectOnKeyDown.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useSelectOnKeyDown.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSelectOnKeyDown.tsx"],"names":[],"mappings":"AAEA,QAAA,MAAM,kBAAkB,0BACC,MAAM,KAAK,IAAI,gBACxB,MAAM,EAAE,aACX,OAAO,iCACa,OAAO,KAAK,IAAI,UACvC,MAAM,qCAGV,mBAAmB,CAAC,cAAc,GAAG,iBAAiB,CAAC,KAAK,IAAI,CAqErE,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|