@dcs-tech/ui 0.3.0 → 0.4.0
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 +1 -6
- package/dist/ChartImageMenu-HILSfn5A.js +1115 -0
- package/dist/ChartView-Cehrcr05.js +1703 -0
- package/dist/{SummaryChart-D4jcOv-K.js → SummaryChart-y27q_BBN.js} +8 -10
- package/dist/{SummaryImage-BSbatHym.js → SummaryImage-DDNEEu_K.js} +3 -4
- package/dist/{SummarySeeAll-vnaL3pdy.js → SummarySeeAll-0dX-_LFe.js} +24 -20
- package/dist/{defaults-BbLB8QmD.js → defaults-DL745PK1.js} +1 -2
- package/dist/{exportContext-CAX8VPrP.js → exportContext-CdpsOzE8.js} +7 -15
- package/dist/{exportEngine-C4n1MiOw.js → exportEngine-DL-jEXFU.js} +6 -7
- package/dist/geometry-CG2nOEnw.js +1796 -0
- package/dist/index.js +14847 -17480
- package/dist/scrollArea-CkPGDYH2.js +210 -0
- package/dist/style.css +1 -1
- package/dist/{summaryChartData-CU_W5ocv.js → summaryChartData-Djo73zb8.js} +2 -3
- package/dist/types/{shared-web-ui/src → components}/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Button/Button.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Button/ButtonGroup.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Button/ButtonGroupContext.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Button/index.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Charts/ChartTooltip.d.ts +17 -3
- package/dist/types/{shared-web-ui/src → components}/Charts/geometry.d.ts +5 -3
- package/dist/types/{shared-web-ui/src → components}/Charts/parts.d.ts +1 -0
- package/dist/types/{shared-web-ui/src → components}/Charts/ui.d.ts +1 -1
- package/dist/types/components/Charts/useUiScale.d.ts +1 -0
- package/dist/types/{shared-web-ui/src → components}/Checkbox/Checkbox.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Checkbox/CheckboxGroup.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Checkbox/CheckboxGroupContext.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Checkbox/index.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/ChipInput/ChipInput.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/ChipInput/index.d.ts +2 -2
- package/dist/types/{shared-web-ui/src → components}/ChipInput/useChipSuggestions.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Collapsible/Collapsible.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Collapsible/CollapsibleContext.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Collapsible/CollapsibleItem.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Collapsible/index.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/ColorSchemeSelect/ColorSchemeSelect.d.ts +2 -2
- package/dist/types/components/DataTable/DataTable.storyData.d.ts +23 -0
- package/dist/types/components/DataTable/PressButton.d.ts +2 -0
- package/dist/types/components/DataTable/filters/FilterChips.d.ts +9 -0
- package/dist/types/components/DataTable/menu/layers.d.ts +1 -0
- package/dist/types/components/DataTable/rows/PressRow.d.ts +7 -0
- package/dist/types/{shared-web-ui/src → components}/DataTable/summary/summaryWidth.d.ts +1 -1
- package/dist/types/components/DataTable/ui-local/scrollLock.d.ts +1 -0
- package/dist/types/{shared-web-ui/src → components}/DatePicker/Calendar.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/DatePicker/DatePicker.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/DatePicker/TimeField.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/DatePicker/index.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Dialog/DialogHost.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/DropdownMenu/DropdownMenu.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/EditableTable/EditableTable.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/EditableTable/EditableTableActions.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/EditableTable/EditableTableCell.d.ts +2 -2
- package/dist/types/{shared-web-ui/src → components}/EditableTable/EditableTableRow.d.ts +3 -3
- package/dist/types/{shared-web-ui/src → components}/EditableTable/EditableTableSummary.d.ts +2 -2
- package/dist/types/{shared-web-ui/src → components}/EditableTable/index.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/EditableTable/useEditableTable.d.ts +3 -3
- package/dist/types/{shared-web-ui/src → components}/FieldContext/FieldContext.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/FieldContext/FieldProvider.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/FieldContext/index.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/FieldContext/useField.d.ts +2 -2
- package/dist/types/{shared-web-ui/src → components}/FieldContext/useFieldSurface.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/FieldContext/useFormKeyboard.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/FieldWrapper/FieldWrapper.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/FieldWrapper/index.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Fields/Field.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Fields/FieldButton.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Fields/Fields.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldBlur.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldChange.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldCondition.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldDisabled.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldRender.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldSelect.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldValidation.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Fields/hooks/useFieldValue.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Fields/index.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Form/Form.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Form/index.d.ts +1 -1
- package/dist/types/components/Image/ImagePicker.d.ts +23 -0
- package/dist/types/components/Image/ImageStrip.d.ts +13 -0
- package/dist/types/components/Image/ImageViewer.d.ts +16 -0
- package/dist/types/components/Image/index.d.ts +8 -0
- package/dist/types/components/Image/prepareImage.d.ts +19 -0
- package/dist/types/{shared-web-ui/src → components}/Input/Input.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Input/index.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Popover/Popover.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Popover/floatingPosition.d.ts +1 -1
- package/dist/types/components/Press/index.d.ts +2 -0
- package/dist/types/components/Press/usePress.d.ts +9 -0
- package/dist/types/{shared-web-ui/src → components}/Radio/Radio.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Radio/RadioGroup.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Radio/RadioGroupContext.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Radio/index.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Select/Select.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Select/index.d.ts +1 -1
- package/dist/types/components/Select/useSelect.d.ts +2 -0
- package/dist/types/{shared-web-ui/src → components}/Sidebar/Sidebar.d.ts +1 -1
- package/dist/types/components/Stepper/Stepper.d.ts +17 -0
- package/dist/types/components/Stepper/index.d.ts +2 -0
- package/dist/types/{shared-web-ui/src → components}/Suggest/Suggest.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Suggest/SuggestionList.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Suggest/index.d.ts +2 -2
- package/dist/types/{shared-web-ui/src → components}/Suggest/searchFilters.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Suggest/useSuggest.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Switch/Switch.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Switch/index.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Tooltip/Tooltip.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Tooltip/useTooltip.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Typography/Typography.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/Typography/index.d.ts +1 -1
- package/dist/types/{shared-web-ui/src → components}/UIProvider/UIProvider.d.ts +1 -1
- package/dist/types/core/hooks/index.d.ts +3 -0
- package/dist/types/core/hooks/useDebounced.d.ts +7 -0
- package/dist/types/core/hooks/usePresence.d.ts +5 -0
- package/dist/types/{shared-logic/src/ui → core/logic}/button.logic.d.ts +1 -1
- package/dist/types/{shared-logic/src/ui → core/logic}/cellRules.logic.d.ts +1 -1
- package/dist/types/{shared-logic/src/ui → core/logic}/chipinput.logic.d.ts +1 -1
- package/dist/types/{shared-logic/src/ui → core/logic}/collapsible.logic.d.ts +1 -1
- package/dist/types/{shared-logic/src/ui → core/logic}/datePicker.logic.d.ts +1 -1
- package/dist/types/core/logic/displayOrder.logic.d.ts +4 -0
- package/dist/types/{shared-logic/src/ui → core/logic}/editableTable.logic.d.ts +5 -1
- package/dist/types/{shared-logic/src/ui → core/logic}/fieldControl.logic.d.ts +1 -1
- package/dist/types/{shared-logic/src/ui → core/logic}/fieldWrapper.logic.d.ts +1 -1
- package/dist/types/{shared-logic/src/ui → core/logic}/fields.logic.d.ts +1 -1
- package/dist/types/{shared-logic/src/ui → core/logic}/index.d.ts +4 -0
- package/dist/types/{shared-logic/src/ui → core/logic}/keyboard.logic.d.ts +1 -1
- package/dist/types/core/logic/motion.logic.d.ts +1 -0
- package/dist/types/{shared-logic/src/ui → core/logic}/navigation.logic.d.ts +1 -1
- package/dist/types/{shared-logic/src/ui → core/logic}/popupList.logic.d.ts +1 -1
- package/dist/types/core/logic/press.logic.d.ts +14 -0
- package/dist/types/{shared-logic/src/ui → core/logic}/quickAddGrid.logic.d.ts +1 -1
- package/dist/types/{shared-logic/src/ui → core/logic}/select.logic.d.ts +1 -1
- package/dist/types/core/logic/stepper.logic.d.ts +6 -0
- package/dist/types/{shared-logic/src/ui → core/logic}/suggest.logic.d.ts +1 -1
- package/dist/types/{shared-logic/src/ui → core/logic}/tableLayout.logic.d.ts +1 -1
- package/dist/types/{shared-logic/src/ui → core/logic}/tableSummary.logic.d.ts +1 -1
- package/dist/types/{shared-logic/src/ui → core/logic}/tooltip.logic.d.ts +1 -1
- package/dist/types/{shared-logic/src/ui → core/logic}/typography.logic.d.ts +1 -1
- package/dist/types/core/logic/uiScale.logic.d.ts +1 -0
- package/dist/types/{shared-types/src/ui → core/types}/button.types.d.ts +1 -0
- package/dist/types/{shared-types/src/ui → core/types}/suggest.types.d.ts +1 -0
- package/dist/types/{shared-web-ui/src/index.d.ts → index.d.ts} +86 -83
- package/package.json +27 -28
- package/dist/ChartImageMenu-gvNAYVkY.js +0 -2938
- package/dist/Charts-COljjy0x.js +0 -1759
- package/dist/fuseSearch-vLQR3O5a.js +0 -37
- package/dist/types/published/dcs-ui/src/index.d.ts +0 -4
- package/dist/types/published/dcs-ui/src/publicLogic.d.ts +0 -2
- package/dist/types/published/dcs-ui/src/publicTypes.d.ts +0 -2
- package/dist/types/shared-logic/src/report/aggregate.d.ts +0 -8
- package/dist/types/shared-logic/src/report/canvas.d.ts +0 -51
- package/dist/types/shared-logic/src/report/conditions.d.ts +0 -4
- package/dist/types/shared-logic/src/report/constants.d.ts +0 -7
- package/dist/types/shared-logic/src/report/dataset.d.ts +0 -23
- package/dist/types/shared-logic/src/report/edit.d.ts +0 -126
- package/dist/types/shared-logic/src/report/fields.d.ts +0 -29
- package/dist/types/shared-logic/src/report/format.d.ts +0 -5
- package/dist/types/shared-logic/src/report/fromColumns.d.ts +0 -31
- package/dist/types/shared-logic/src/report/index.d.ts +0 -19
- package/dist/types/shared-logic/src/report/layout.d.ts +0 -31
- package/dist/types/shared-logic/src/report/metrics.d.ts +0 -17
- package/dist/types/shared-logic/src/report/migrate.d.ts +0 -17
- package/dist/types/shared-logic/src/report/paginate.d.ts +0 -8
- package/dist/types/shared-logic/src/report/renderers/html.d.ts +0 -8
- package/dist/types/shared-logic/src/report/renderers/pdfmake.d.ts +0 -18
- package/dist/types/shared-logic/src/report/resolve.d.ts +0 -11
- package/dist/types/shared-logic/src/report/scope.d.ts +0 -24
- package/dist/types/shared-logic/src/report/storage.d.ts +0 -36
- package/dist/types/shared-logic/src/report/validate.d.ts +0 -10
- package/dist/types/shared-types/src/report/bands.d.ts +0 -12
- package/dist/types/shared-types/src/report/blocks.d.ts +0 -122
- package/dist/types/shared-types/src/report/conditions.d.ts +0 -11
- package/dist/types/shared-types/src/report/dataset.d.ts +0 -53
- package/dist/types/shared-types/src/report/document.d.ts +0 -121
- package/dist/types/shared-types/src/report/index.d.ts +0 -9
- package/dist/types/shared-types/src/report/primitives.d.ts +0 -69
- package/dist/types/shared-types/src/report/registry.d.ts +0 -39
- package/dist/types/shared-types/src/report/storage.d.ts +0 -10
- package/dist/types/shared-types/src/report/template.d.ts +0 -32
- package/dist/types/shared-web-ui/src/ReportDesigner/AlignedRowsEditor.d.ts +0 -4
- package/dist/types/shared-web-ui/src/ReportDesigner/BandList.d.ts +0 -18
- package/dist/types/shared-web-ui/src/ReportDesigner/BlockEditor.d.ts +0 -33
- package/dist/types/shared-web-ui/src/ReportDesigner/ColumnEditor.d.ts +0 -2
- package/dist/types/shared-web-ui/src/ReportDesigner/ConditionEditor.d.ts +0 -5
- package/dist/types/shared-web-ui/src/ReportDesigner/FieldPicker.d.ts +0 -12
- package/dist/types/shared-web-ui/src/ReportDesigner/FieldSelect.d.ts +0 -2
- package/dist/types/shared-web-ui/src/ReportDesigner/FormatEditor.d.ts +0 -2
- package/dist/types/shared-web-ui/src/ReportDesigner/Inspector.d.ts +0 -7
- package/dist/types/shared-web-ui/src/ReportDesigner/OptionsEditor.d.ts +0 -2
- package/dist/types/shared-web-ui/src/ReportDesigner/ReportDesigner.d.ts +0 -12
- package/dist/types/shared-web-ui/src/ReportDesigner/StyleEditor.d.ts +0 -2
- package/dist/types/shared-web-ui/src/ReportDesigner/TableEditor.d.ts +0 -2
- package/dist/types/shared-web-ui/src/ReportDesigner/WatermarkEditor.d.ts +0 -2
- package/dist/types/shared-web-ui/src/ReportDesigner/chipSources.d.ts +0 -5
- package/dist/types/shared-web-ui/src/ReportDesigner/icons.d.ts +0 -21
- package/dist/types/shared-web-ui/src/ReportDesigner/index.d.ts +0 -16
- package/dist/types/shared-web-ui/src/ReportDesigner/labels.d.ts +0 -22
- package/dist/types/shared-web-ui/src/ReportDesigner/parts.d.ts +0 -33
- package/dist/types/shared-web-ui/src/ReportDesigner/types.d.ts +0 -67
- package/dist/types/shared-web-ui/src/ReportPreview/ReportPreview.d.ts +0 -20
- package/dist/types/shared-web-ui/src/ReportPreview/index.d.ts +0 -1
- package/dist/types/shared-web-ui/src/Select/useSelect.d.ts +0 -2
- package/dist/ui-DJFwpPdX.js +0 -4997
- /package/dist/types/{shared-web-ui/src → components}/AppBar/AppBar.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/AppBar/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/ArrowKeyFocus/useArrowKeyFocus.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Avatar/Avatar.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Avatar/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Badge/Badge.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Badge/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Breadcrumbs/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Card/Card.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Card/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Charts/AnchoredMenu.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Charts/BarList.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Charts/CalendarHeatmap.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Charts/Chart.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Charts/ChartIcon.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Charts/ChartImageMenu.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Charts/ChartTable.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Charts/ChartView.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Charts/ColumnChart.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Charts/Donut.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Charts/Funnel.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Charts/Gauge.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Charts/Legend.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Charts/LineChart.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Charts/NumberTrend.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Charts/Progress.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Charts/StackedBar.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Charts/Treemap.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Charts/chartData.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Charts/chartImage.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Charts/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Charts/labels.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Charts/menuPlacement.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Charts/palette.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Charts/pointer.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Charts/types.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Charts/useBoxSize.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Charts/useLegendFit.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/ColorSchemeSelect/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/CommandPalette/CommandPalette.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/CommandPalette/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/DataTable.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/DisplayPopover.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/HeaderMenu.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/ManageModal.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/SingleRowView.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/SortModal.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/StatusRow.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/TableColumnModal.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/TableControls.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/TablePagination.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/TableScrollStrip.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/TableToolbar.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/TableView.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/bulk/BulkConfirmDialog.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/bulk/TableToast.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/bulk/bulkActions.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/cards/CardFieldsEditor.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/cards/CardView.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/cards/cardFields.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/cards/rowParts.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/data/useServerData.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/defaults.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/detail/BuiltInDetail.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/detail/DetailHost.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/export/ExportPopover.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/export/ExportPreviewModal.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/export/ExportSettingsModal.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/export/ExportTemplateCards.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/export/exportContext.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/export/exportEngine.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/export/exportRows.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/export/templateDisplay.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/export/templateOptions.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/export/useTableExport.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/filters/ColumnFilterPopover.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/filters/FilterConditionRow.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/filters/FilterGroup.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/filters/FilterModal.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/filters/FilterRow.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/filters/columnFilterModel.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/filters/filterEngine.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/filters/filterRowModel.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/filters/quickFilterMatch.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/grouping/GroupUi.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/grouping/groupModel.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/grouping/useGrouping.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/host.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/keyboard/ShortcutsDialog.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/keyboard/shortcuts.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/keyboard/useGridKeyboard.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/labels.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/layout/LayoutSwitcher.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/layout/layouts.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/layout/scrollArea.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/layout/useFillHeight.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/menu/RowMenu.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/menu/buildRowMenu.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/menu/clipboard.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/menu/valueFilter.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/motion/useRowMotion.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/persistence/adapters.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/persistence/reconcile.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/persistence/useColumnPersistence.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/persistence/useManagePrefs.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/persistence/useOrphanPrefs.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/pinning.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/rows/RowActions.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/rows/rowPress.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/sharing/Sharing.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/split/SplitView.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/summary/ManageSummaryCards.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/summary/SummaryChart.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/summary/SummaryControls.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/summary/SummaryImage.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/summary/SummarySeeAll.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/summary/TableSummary.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/summary/summaryCatalogue.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/summary/summaryChartData.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/summary/summaryModel.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/summary/useTableSummary.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/types.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/ui-local/AutoHeight.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/ui-local/DateRangePicker.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/ui-local/DragAndDropList/DragAndDropList.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/ui-local/DragAndDropList/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/ui-local/DragAndDropList/types.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/ui-local/ReactModal.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/ui.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/useDataChangeTracker.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/useTable.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/vendor/columnOrder.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/vendor/diff.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/vendor/fileActions.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/vendor/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DataTable/virtual/useVirtualLines.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DatePicker/useOneMonthPane.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Dialog/Dialog.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Dialog/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/DropdownMenu/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/EditableTable/useRowAnimation.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Floating/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Floating/layers.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Floating/scrollLock.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Floating/useFloatingLayer.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Popover/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Scroll/ScrollRule.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Scroll/ScrollStrip.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Scroll/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Scroll/labels.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Scroll/scrollActivity.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Scroll/ui.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Sidebar/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Skeleton/Skeleton.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Skeleton/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Suggest/fuseSearch.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Tabs/Tabs.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Tabs/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Toast/ToastHost.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Toast/ToastItem.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Toast/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Toast/toast.types.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/Tooltip/index.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/UIProvider/UIPortalContext.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/UIProvider/UIThemeContext.d.ts +0 -0
- /package/dist/types/{shared-web-ui/src → components}/UIProvider/index.d.ts +0 -0
- /package/dist/types/{shared-logic/src/ui → core/logic}/checkbox.logic.d.ts +0 -0
- /package/dist/types/{shared-logic/src/ui → core/logic}/colorScheme.d.ts +0 -0
- /package/dist/types/{shared-logic/src/ui → core/logic}/columnOrder.logic.d.ts +0 -0
- /package/dist/types/{shared-logic/src/ui → core/logic}/form.logic.d.ts +0 -0
- /package/dist/types/{shared-logic/src/ui → core/logic}/input.logic.d.ts +0 -0
- /package/dist/types/{shared-logic/src/ui → core/logic}/popover.logic.d.ts +0 -0
- /package/dist/types/{shared-logic/src/ui → core/logic}/radio.logic.d.ts +0 -0
- /package/dist/types/{shared-logic/src/ui → core/logic}/switch.logic.d.ts +0 -0
- /package/dist/types/{shared-logic/src/ui → core/logic}/timeField.logic.d.ts +0 -0
- /package/dist/types/{shared-logic/src/ui → core/logic}/useMergeRefs.d.ts +0 -0
- /package/dist/types/{shared-types/src/ui → core/types}/checkbox.types.d.ts +0 -0
- /package/dist/types/{shared-types/src/ui → core/types}/chipinput.types.d.ts +0 -0
- /package/dist/types/{shared-types/src/ui → core/types}/collapsible.types.d.ts +0 -0
- /package/dist/types/{shared-types/src/ui → core/types}/common.types.d.ts +0 -0
- /package/dist/types/{shared-types/src/ui → core/types}/control.types.d.ts +0 -0
- /package/dist/types/{shared-types/src/ui → core/types}/datePicker.types.d.ts +0 -0
- /package/dist/types/{shared-types/src/ui → core/types}/editableTable.types.d.ts +0 -0
- /package/dist/types/{shared-types/src/ui → core/types}/field.types.d.ts +0 -0
- /package/dist/types/{shared-types/src/ui → core/types}/fieldWrapper.types.d.ts +0 -0
- /package/dist/types/{shared-types/src/ui → core/types}/fields.types.d.ts +0 -0
- /package/dist/types/{shared-types/src/ui → core/types}/form.types.d.ts +0 -0
- /package/dist/types/{shared-types/src/ui → core/types}/index.d.ts +0 -0
- /package/dist/types/{shared-types/src/ui → core/types}/input.types.d.ts +0 -0
- /package/dist/types/{shared-types/src/ui → core/types}/keyboard.types.d.ts +0 -0
- /package/dist/types/{shared-types/src/ui → core/types}/navigation.types.d.ts +0 -0
- /package/dist/types/{shared-types/src/ui → core/types}/radio.types.d.ts +0 -0
- /package/dist/types/{shared-types/src/ui → core/types}/select.types.d.ts +0 -0
- /package/dist/types/{shared-types/src/ui → core/types}/switch.types.d.ts +0 -0
- /package/dist/types/{shared-types/src/ui → core/types}/table.types.d.ts +0 -0
- /package/dist/types/{shared-types/src/ui → core/types}/tooltip.types.d.ts +0 -0
- /package/dist/types/{shared-types/src/ui → core/types}/typography.types.d.ts +0 -0
package/dist/Charts-COljjy0x.js
DELETED
|
@@ -1,1759 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { $ as e, A as t, B as n, C as r, Ct as i, E as a, F as o, G as s, H as c, I as l, J as u, K as d, L as f, Ln as p, M as m, N as h, O as g, P as _, Q as v, R as y, S as b, T as x, U as S, W as C, Wn as w, X as T, Y as E, Z as D, _ as O, _t as k, b as A, d as j, dt as M, et as N, f as P, g as F, h as I, j as L, k as R, l as z, m as ee, nt as B, pt as V, tt as te, v as ne, w as H, x as re, y as ie, z as U } from "./ChartImageMenu-gvNAYVkY.js";
|
|
3
|
-
import { useCallback as W, useEffect as G, useLayoutEffect as ae, useMemo as oe, useRef as K, useState as q } from "react";
|
|
4
|
-
import { Fragment as se, jsx as J, jsxs as Y } from "react/jsx-runtime";
|
|
5
|
-
import { createPortal as ce } from "react-dom";
|
|
6
|
-
//#region ../../shared-web-ui/src/Charts/ChartIcon.tsx
|
|
7
|
-
var le = {
|
|
8
|
-
number: [
|
|
9
|
-
"M5 9h14",
|
|
10
|
-
"M5 15h14",
|
|
11
|
-
"M10 4L8 20",
|
|
12
|
-
"M16 4l-2 16"
|
|
13
|
-
],
|
|
14
|
-
numberTrend: ["M3 17l5-5 4 3 8-8", "M15 7h5v5"],
|
|
15
|
-
bar: ["M3 9h18v6H3z", "M5 12h7"],
|
|
16
|
-
gauge: ["M4 17a8 8 0 0 1 16 0", "M12 17l4-5"],
|
|
17
|
-
ring: ["M12 4a8 8 0 1 1 0 16a8 8 0 1 1 0-16", "M12 4a8 8 0 0 1 8 8"],
|
|
18
|
-
donut: ["M12 5a7 7 0 1 1 0 14a7 7 0 1 1 0-14", "M12 9a3 3 0 1 1 0 6a3 3 0 1 1 0-6"],
|
|
19
|
-
pie: [
|
|
20
|
-
"M12 4a8 8 0 1 1 0 16a8 8 0 1 1 0-16",
|
|
21
|
-
"M12 12V4",
|
|
22
|
-
"M12 12l7 4"
|
|
23
|
-
],
|
|
24
|
-
bars: [
|
|
25
|
-
"M4 6h12",
|
|
26
|
-
"M4 12h16",
|
|
27
|
-
"M4 18h8"
|
|
28
|
-
],
|
|
29
|
-
stacked: [
|
|
30
|
-
"M3 12h6",
|
|
31
|
-
"M11 12h5",
|
|
32
|
-
"M18 12h3"
|
|
33
|
-
],
|
|
34
|
-
treemap: [
|
|
35
|
-
"M3 4h18v16H3z",
|
|
36
|
-
"M12 4v16",
|
|
37
|
-
"M12 11h9",
|
|
38
|
-
"M3 14h9"
|
|
39
|
-
],
|
|
40
|
-
columns: [
|
|
41
|
-
"M6 20v-7",
|
|
42
|
-
"M12 20V6",
|
|
43
|
-
"M18 20v-10"
|
|
44
|
-
],
|
|
45
|
-
line: ["M3 17l5-6 4 3 8-9"],
|
|
46
|
-
area: ["M3 20v-4l5-6 4 3 8-8v15z"],
|
|
47
|
-
grouped: [
|
|
48
|
-
"M5 20v-8",
|
|
49
|
-
"M8 20v-5",
|
|
50
|
-
"M14 20V8",
|
|
51
|
-
"M17 20v-9"
|
|
52
|
-
],
|
|
53
|
-
calendar: [
|
|
54
|
-
"M3 5h18v15H3z",
|
|
55
|
-
"M7 10h2",
|
|
56
|
-
"M11 10h2",
|
|
57
|
-
"M15 10h2",
|
|
58
|
-
"M7 14h2",
|
|
59
|
-
"M11 14h2",
|
|
60
|
-
"M15 14h2",
|
|
61
|
-
"M7 17h2",
|
|
62
|
-
"M11 17h2"
|
|
63
|
-
],
|
|
64
|
-
funnel: [
|
|
65
|
-
"M4 5h16",
|
|
66
|
-
"M7 11h10",
|
|
67
|
-
"M10 17h4"
|
|
68
|
-
]
|
|
69
|
-
}, ue = {
|
|
70
|
-
bars: 3,
|
|
71
|
-
stacked: 5,
|
|
72
|
-
columns: 3,
|
|
73
|
-
grouped: 2.5,
|
|
74
|
-
funnel: 3,
|
|
75
|
-
bar: 2
|
|
76
|
-
};
|
|
77
|
-
function de({ kind: e, size: t = 16 }) {
|
|
78
|
-
return /* @__PURE__ */ J("svg", {
|
|
79
|
-
className: "chart-icon",
|
|
80
|
-
viewBox: "0 0 24 24",
|
|
81
|
-
width: t,
|
|
82
|
-
height: t,
|
|
83
|
-
fill: "none",
|
|
84
|
-
stroke: "currentColor",
|
|
85
|
-
strokeWidth: ue[e] ?? 2,
|
|
86
|
-
strokeLinecap: "round",
|
|
87
|
-
strokeLinejoin: "round",
|
|
88
|
-
"aria-hidden": !0,
|
|
89
|
-
focusable: "false",
|
|
90
|
-
children: le[e].map((t, n) => /* @__PURE__ */ J("path", {
|
|
91
|
-
d: t,
|
|
92
|
-
fill: e === "area" ? "currentColor" : void 0,
|
|
93
|
-
fillOpacity: e === "area" ? .25 : void 0
|
|
94
|
-
}, n))
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
//#endregion
|
|
98
|
-
//#region ../../shared-web-ui/src/Charts/pointer.ts
|
|
99
|
-
function fe(e, t, n) {
|
|
100
|
-
return n <= 0 || t <= 0 ? null : Math.max(0, Math.min(n - 1, Math.floor(e / t * n)));
|
|
101
|
-
}
|
|
102
|
-
function pe(e, t) {
|
|
103
|
-
let n = null, r = Infinity;
|
|
104
|
-
return t.forEach((t, i) => {
|
|
105
|
-
let a = e < t.start ? t.start - e : e > t.end ? e - t.end : 0;
|
|
106
|
-
a < r && (n = i, r = a);
|
|
107
|
-
}), n;
|
|
108
|
-
}
|
|
109
|
-
function me(e, t, n) {
|
|
110
|
-
let r = null, i = Infinity;
|
|
111
|
-
return n.forEach((n, a) => {
|
|
112
|
-
if (!n) return;
|
|
113
|
-
let o = e < n.left ? n.left - e : e > n.left + n.width ? e - n.left - n.width : 0, s = t < n.top ? n.top - t : t > n.top + n.height ? t - n.top - n.height : 0, c = o * o + s * s;
|
|
114
|
-
c < i && (r = a, i = c);
|
|
115
|
-
}), r;
|
|
116
|
-
}
|
|
117
|
-
function he(e, t) {
|
|
118
|
-
let n = Math.atan2(e, -t);
|
|
119
|
-
return n < 0 ? n + 2 * Math.PI : n;
|
|
120
|
-
}
|
|
121
|
-
var ge = -1;
|
|
122
|
-
function _e(e, t, n, r, i) {
|
|
123
|
-
let a = Math.hypot(e, t);
|
|
124
|
-
if (a > n || !i.length) return null;
|
|
125
|
-
if (a < r) return -1;
|
|
126
|
-
let o = he(e, t), s = 2 * Math.PI, c = (e, t) => ((t - e) % s + s) % s, l = 0, u = Infinity;
|
|
127
|
-
return i.forEach((e, t) => {
|
|
128
|
-
if (o >= e.a0 && o <= e.a1) {
|
|
129
|
-
l = t, u = -1;
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
if (u < 0) return;
|
|
133
|
-
let n = Math.min(c(o, e.a0), c(e.a1, o));
|
|
134
|
-
n < u && (l = t, u = n);
|
|
135
|
-
}), l;
|
|
136
|
-
}
|
|
137
|
-
var ve = {
|
|
138
|
-
x: 12,
|
|
139
|
-
y: 4
|
|
140
|
-
};
|
|
141
|
-
function ye(e, t, n, r = ve, i = 8) {
|
|
142
|
-
let a = (e, t, n) => Math.min(Math.max(e, t), Math.max(t, n)), o = e.x + r.x, s = "right";
|
|
143
|
-
o + t.width > n.width - i && (o = e.x - r.x - t.width, s = "left");
|
|
144
|
-
let c = e.y + r.y, l = "below";
|
|
145
|
-
return c + t.height > n.height - i && (c = e.y - r.y - t.height, l = "above"), {
|
|
146
|
-
left: a(o, i, n.width - t.width - i),
|
|
147
|
-
top: a(c, i, n.height - t.height - i),
|
|
148
|
-
x: s,
|
|
149
|
-
y: l
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
//#endregion
|
|
153
|
-
//#region ../../shared-web-ui/src/Charts/ChartTooltip.tsx
|
|
154
|
-
var X = null, be = 8, xe = () => ({
|
|
155
|
-
width: document.documentElement.clientWidth || window.innerWidth,
|
|
156
|
-
height: document.documentElement.clientHeight || window.innerHeight
|
|
157
|
-
});
|
|
158
|
-
function Z(e) {
|
|
159
|
-
let t = K(e);
|
|
160
|
-
t.current = e;
|
|
161
|
-
let [n] = q(() => ({})), r = K(null), i = K(null), a = p(), [o, s] = q(null), c = K(null), l = K(null), u = W((e) => {
|
|
162
|
-
r.current = e;
|
|
163
|
-
}, []), d = W(() => {
|
|
164
|
-
c.current = null, s(null);
|
|
165
|
-
}, []), f = W((e, t) => {
|
|
166
|
-
X && X.id !== n && X.clear(), X = {
|
|
167
|
-
id: n,
|
|
168
|
-
clear: d
|
|
169
|
-
}, s((n) => n && n.index === e && n.via === t ? n : {
|
|
170
|
-
index: e,
|
|
171
|
-
via: t
|
|
172
|
-
});
|
|
173
|
-
}, [n, d]);
|
|
174
|
-
G(() => () => {
|
|
175
|
-
X?.id === n && (X = null);
|
|
176
|
-
}, [n]);
|
|
177
|
-
let m = W(() => {
|
|
178
|
-
let e = i.current, n = r.current;
|
|
179
|
-
if (!e || !n || !o) return;
|
|
180
|
-
let a = {
|
|
181
|
-
width: e.offsetWidth,
|
|
182
|
-
height: e.offsetHeight
|
|
183
|
-
}, s;
|
|
184
|
-
s = c.current ? ye(c.current, a, xe()) : w({
|
|
185
|
-
anchor: t.current.anchor?.(o.index, n) ?? Se(n, o.index) ?? n.getBoundingClientRect(),
|
|
186
|
-
tooltip: a,
|
|
187
|
-
viewport: xe(),
|
|
188
|
-
placement: "top",
|
|
189
|
-
offset: 8,
|
|
190
|
-
margin: 8
|
|
191
|
-
});
|
|
192
|
-
let l = e.parentElement?.getBoundingClientRect() ?? {
|
|
193
|
-
left: 0,
|
|
194
|
-
top: 0
|
|
195
|
-
};
|
|
196
|
-
e.style.transform = `translate(${Math.round(s.left - l.left)}px, ${Math.round(s.top - l.top)}px)`, e.style.visibility = "visible";
|
|
197
|
-
}, [o]);
|
|
198
|
-
ae(m), G(() => {
|
|
199
|
-
if (o?.via !== "touch") return;
|
|
200
|
-
let e = (e) => {
|
|
201
|
-
r.current?.contains(e.target) || d();
|
|
202
|
-
};
|
|
203
|
-
return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
|
|
204
|
-
}, [o?.via, d]);
|
|
205
|
-
let h = (e, n) => {
|
|
206
|
-
let i = r.current;
|
|
207
|
-
if (!i) return null;
|
|
208
|
-
let a = i.getBoundingClientRect();
|
|
209
|
-
return t.current.pick(e - a.left, n - a.top, a, i);
|
|
210
|
-
}, g = (e) => {
|
|
211
|
-
c.current = {
|
|
212
|
-
x: e.clientX,
|
|
213
|
-
y: e.clientY
|
|
214
|
-
};
|
|
215
|
-
let t = h(e.clientX, e.clientY);
|
|
216
|
-
if (t === null) return d();
|
|
217
|
-
f(t, e.pointerType === "touch" ? "touch" : "pointer"), m();
|
|
218
|
-
};
|
|
219
|
-
return {
|
|
220
|
-
active: o?.index ?? null,
|
|
221
|
-
plotProps: {
|
|
222
|
-
ref: u,
|
|
223
|
-
tabIndex: 0,
|
|
224
|
-
"data-chart-plot": "",
|
|
225
|
-
onPointerDown: (e) => {
|
|
226
|
-
e.pointerType === "touch" && (l.current = {
|
|
227
|
-
x: e.clientX,
|
|
228
|
-
y: e.clientY,
|
|
229
|
-
moved: !1
|
|
230
|
-
}, g(e));
|
|
231
|
-
},
|
|
232
|
-
onPointerMove: (e) => {
|
|
233
|
-
if (e.pointerType === "touch") {
|
|
234
|
-
if (!l.current) return;
|
|
235
|
-
Math.hypot(e.clientX - l.current.x, e.clientY - l.current.y) > be && (l.current.moved = !0);
|
|
236
|
-
}
|
|
237
|
-
g(e);
|
|
238
|
-
},
|
|
239
|
-
onPointerUp: () => {
|
|
240
|
-
l.current && setTimeout(() => l.current = null, 0);
|
|
241
|
-
},
|
|
242
|
-
onPointerLeave: (e) => {
|
|
243
|
-
e.pointerType !== "touch" && d();
|
|
244
|
-
},
|
|
245
|
-
onClick: (e) => {
|
|
246
|
-
if (l.current?.moved) return;
|
|
247
|
-
let n = h(e.clientX, e.clientY);
|
|
248
|
-
n !== null && n >= 0 && t.current.onPick?.(n);
|
|
249
|
-
},
|
|
250
|
-
onKeyDown: (e) => {
|
|
251
|
-
let n = t.current;
|
|
252
|
-
if ((e.key === "Enter" || e.key === " ") && o && o.index >= 0 && n.onPick) {
|
|
253
|
-
e.preventDefault(), n.onPick(o.index);
|
|
254
|
-
return;
|
|
255
|
-
}
|
|
256
|
-
if (e.key === "Escape") return o && e.stopPropagation(), d();
|
|
257
|
-
let r = te(e.key, o && o.index >= 0 ? o.index : n.start ?? null, n.count, n.keys);
|
|
258
|
-
r !== null && (e.preventDefault(), c.current = null, f(r, "key"));
|
|
259
|
-
},
|
|
260
|
-
onBlur: () => {
|
|
261
|
-
o?.via === "key" && d();
|
|
262
|
-
}
|
|
263
|
-
},
|
|
264
|
-
tooltip: (e) => !o || e == null || !a ? null : ce(/* @__PURE__ */ J("div", {
|
|
265
|
-
className: "chart-tooltip-layer",
|
|
266
|
-
"data-theme": r.current?.closest("[data-theme]")?.getAttribute("data-theme") ?? void 0,
|
|
267
|
-
children: /* @__PURE__ */ J("div", {
|
|
268
|
-
ref: i,
|
|
269
|
-
className: "chart-root chart-tooltip",
|
|
270
|
-
role: "presentation",
|
|
271
|
-
"aria-hidden": !0,
|
|
272
|
-
style: { visibility: "hidden" },
|
|
273
|
-
children: e
|
|
274
|
-
})
|
|
275
|
-
}), a)
|
|
276
|
-
};
|
|
277
|
-
}
|
|
278
|
-
function Se(e, t) {
|
|
279
|
-
let n = e.querySelector(`[data-hit="${t}"]`);
|
|
280
|
-
return n ? n.getBoundingClientRect() : null;
|
|
281
|
-
}
|
|
282
|
-
function Ce(e) {
|
|
283
|
-
let t = e.getBoundingClientRect(), n = [];
|
|
284
|
-
return e.querySelectorAll("[data-hit]").forEach((e) => {
|
|
285
|
-
let r = e.getBoundingClientRect();
|
|
286
|
-
n[Number(e.dataset.hit)] = {
|
|
287
|
-
left: r.left - t.left,
|
|
288
|
-
top: r.top - t.top,
|
|
289
|
-
width: r.width,
|
|
290
|
-
height: r.height
|
|
291
|
-
};
|
|
292
|
-
}), n;
|
|
293
|
-
}
|
|
294
|
-
function Q({ title: e, rows: t = [], note: n }) {
|
|
295
|
-
return /* @__PURE__ */ Y(se, { children: [
|
|
296
|
-
e != null && e !== "" && /* @__PURE__ */ J("p", {
|
|
297
|
-
className: "chart-tooltip-title",
|
|
298
|
-
children: e
|
|
299
|
-
}),
|
|
300
|
-
t.map((e) => /* @__PURE__ */ Y("p", {
|
|
301
|
-
className: "chart-tooltip-series",
|
|
302
|
-
children: [
|
|
303
|
-
e.color && /* @__PURE__ */ J("span", {
|
|
304
|
-
className: "chart-swatch chart-swatch--small",
|
|
305
|
-
style: { background: e.color }
|
|
306
|
-
}),
|
|
307
|
-
/* @__PURE__ */ J("span", {
|
|
308
|
-
className: "chart-tooltip-label",
|
|
309
|
-
children: e.label
|
|
310
|
-
}),
|
|
311
|
-
/* @__PURE__ */ J("strong", {
|
|
312
|
-
className: "chart-tooltip-value",
|
|
313
|
-
children: e.value
|
|
314
|
-
})
|
|
315
|
-
]
|
|
316
|
-
}, e.key)),
|
|
317
|
-
n != null && n !== "" && /* @__PURE__ */ J("p", {
|
|
318
|
-
className: "chart-tooltip-note",
|
|
319
|
-
children: n
|
|
320
|
-
})
|
|
321
|
-
] });
|
|
322
|
-
}
|
|
323
|
-
//#endregion
|
|
324
|
-
//#region ../../shared-web-ui/src/Charts/BarList.tsx
|
|
325
|
-
function we({ href: e, className: t, title: n, children: r }) {
|
|
326
|
-
return /* @__PURE__ */ J("a", {
|
|
327
|
-
href: e,
|
|
328
|
-
className: t,
|
|
329
|
-
title: n,
|
|
330
|
-
children: r
|
|
331
|
-
});
|
|
332
|
-
}
|
|
333
|
-
function Te({ data: t, series: n, ariaLabel: r, title: i, linkAs: a = we, compact: o = !1, onSelect: s, selected: c = null, ...l }) {
|
|
334
|
-
let { nf: u, L: d } = B(l), f = (e) => !!s && !t[e]?.href && t[e]?.selectable !== !1, p = Z({
|
|
335
|
-
count: t.length,
|
|
336
|
-
pick: (e, t, n, r) => pe(t, Ce(r).map((e) => e ? {
|
|
337
|
-
start: e.top,
|
|
338
|
-
end: e.top + e.height
|
|
339
|
-
} : {
|
|
340
|
-
start: Infinity,
|
|
341
|
-
end: Infinity
|
|
342
|
-
})),
|
|
343
|
-
keys: {
|
|
344
|
-
ArrowLeft: 0,
|
|
345
|
-
ArrowRight: 0
|
|
346
|
-
},
|
|
347
|
-
start: c === null ? null : t.findIndex((e) => H(e) === c),
|
|
348
|
-
onPick: s ? (e) => f(e) && s(t[e]) : void 0
|
|
349
|
-
}), m = t.map((e) => x(e, n));
|
|
350
|
-
if (m.every((e) => e === 0)) return /* @__PURE__ */ J(D, {
|
|
351
|
-
title: i,
|
|
352
|
-
children: /* @__PURE__ */ J(E, {
|
|
353
|
-
ariaLabel: r,
|
|
354
|
-
text: d.empty,
|
|
355
|
-
compact: o
|
|
356
|
-
})
|
|
357
|
-
});
|
|
358
|
-
let h = O(m), g = m.reduce((e, t) => e + t, 0), _ = p.active, y = _ === null ? c : H(t[_]), b = _ === null ? null : t[_], S = (e, t) => `${e.fullLabel ?? e.label}: ${u(m[t])}`;
|
|
359
|
-
return /* @__PURE__ */ Y(D, {
|
|
360
|
-
title: i,
|
|
361
|
-
children: [
|
|
362
|
-
/* @__PURE__ */ J("ul", {
|
|
363
|
-
className: v(`chart-bars chart-plot chart-plot--rows${s ? " chart-plot--pick" : ""}`, o),
|
|
364
|
-
role: s ? "button" : "img",
|
|
365
|
-
"aria-label": b ? S(b, _) : r,
|
|
366
|
-
...p.plotProps,
|
|
367
|
-
children: t.map((e, t) => {
|
|
368
|
-
let r = H(e), i = e.fullLabel ?? e.label;
|
|
369
|
-
return /* @__PURE__ */ Y("li", {
|
|
370
|
-
"data-hit": t,
|
|
371
|
-
className: `chart-bars-item${t === _ ? " chart-bars-item--active" : ""}${c === r ? " chart-bars-item--on" : ""}`,
|
|
372
|
-
children: [
|
|
373
|
-
e.href ? /* @__PURE__ */ J(a, {
|
|
374
|
-
href: e.href,
|
|
375
|
-
className: "chart-bars-label chart-bars-link",
|
|
376
|
-
title: i,
|
|
377
|
-
children: e.label
|
|
378
|
-
}) : /* @__PURE__ */ J("span", {
|
|
379
|
-
className: "chart-bars-label",
|
|
380
|
-
title: i,
|
|
381
|
-
children: e.label
|
|
382
|
-
}),
|
|
383
|
-
/* @__PURE__ */ J("span", {
|
|
384
|
-
className: `chart-bars-bar${y !== null && y !== r ? " chart-faded" : ""}`,
|
|
385
|
-
"aria-hidden": !0,
|
|
386
|
-
children: n.map((t, r) => {
|
|
387
|
-
let i = e.values[t.key] ?? 0;
|
|
388
|
-
return i ? /* @__PURE__ */ J("span", {
|
|
389
|
-
className: `chart-bars-segment${n.slice(r + 1).every((t) => !(e.values[t.key] ?? 0)) ? " chart-bars-segment--end" : ""}`,
|
|
390
|
-
style: {
|
|
391
|
-
width: `${i / h * 100}%`,
|
|
392
|
-
background: M(n.length === 1 && e.slot ? e.slot : t.slot)
|
|
393
|
-
}
|
|
394
|
-
}, t.key) : null;
|
|
395
|
-
})
|
|
396
|
-
}),
|
|
397
|
-
/* @__PURE__ */ J("span", {
|
|
398
|
-
className: "chart-bars-value",
|
|
399
|
-
children: u(m[t])
|
|
400
|
-
})
|
|
401
|
-
]
|
|
402
|
-
}, r);
|
|
403
|
-
})
|
|
404
|
-
}),
|
|
405
|
-
/* @__PURE__ */ J(T, { text: b ? S(b, _) : "" }),
|
|
406
|
-
p.tooltip(b && /* @__PURE__ */ J(Q, {
|
|
407
|
-
title: b.fullLabel ?? b.label,
|
|
408
|
-
rows: n.map((e) => ({
|
|
409
|
-
key: e.key,
|
|
410
|
-
color: M(n.length === 1 && b.slot ? b.slot : e.slot),
|
|
411
|
-
label: e.label,
|
|
412
|
-
value: u(b.values[e.key] ?? 0)
|
|
413
|
-
})),
|
|
414
|
-
note: d.shareOf(e(U(m[_], g)), u(g))
|
|
415
|
-
}))
|
|
416
|
-
]
|
|
417
|
-
});
|
|
418
|
-
}
|
|
419
|
-
//#endregion
|
|
420
|
-
//#region ../../shared-web-ui/src/Charts/useBoxSize.ts
|
|
421
|
-
function Ee() {
|
|
422
|
-
let [e, t] = q(null), [n, r] = q({
|
|
423
|
-
width: 0,
|
|
424
|
-
height: 0
|
|
425
|
-
});
|
|
426
|
-
return ae(() => {
|
|
427
|
-
if (!e) return;
|
|
428
|
-
let t = () => {
|
|
429
|
-
let t = e.getBoundingClientRect();
|
|
430
|
-
r((e) => e.width === Math.round(t.width) && e.height === Math.round(t.height) ? e : {
|
|
431
|
-
width: Math.round(t.width),
|
|
432
|
-
height: Math.round(t.height)
|
|
433
|
-
});
|
|
434
|
-
};
|
|
435
|
-
if (t(), typeof ResizeObserver > "u") return;
|
|
436
|
-
let n = new ResizeObserver(t);
|
|
437
|
-
return n.observe(e), () => n.disconnect();
|
|
438
|
-
}, [e]), [W((e) => t(e), []), n];
|
|
439
|
-
}
|
|
440
|
-
function $() {
|
|
441
|
-
let [e, t] = Ee();
|
|
442
|
-
return [e, t.width];
|
|
443
|
-
}
|
|
444
|
-
//#endregion
|
|
445
|
-
//#region ../../shared-web-ui/src/Charts/CalendarHeatmap.tsx
|
|
446
|
-
function De(e) {
|
|
447
|
-
let t = (t) => {
|
|
448
|
-
try {
|
|
449
|
-
return new Intl.DateTimeFormat(e, {
|
|
450
|
-
...t,
|
|
451
|
-
timeZone: "UTC"
|
|
452
|
-
});
|
|
453
|
-
} catch {
|
|
454
|
-
return new Intl.DateTimeFormat(void 0, {
|
|
455
|
-
...t,
|
|
456
|
-
timeZone: "UTC"
|
|
457
|
-
});
|
|
458
|
-
}
|
|
459
|
-
};
|
|
460
|
-
return {
|
|
461
|
-
day: t({ dateStyle: "medium" }),
|
|
462
|
-
month: t({ month: "short" }),
|
|
463
|
-
weekday: t({ weekday: "short" })
|
|
464
|
-
};
|
|
465
|
-
}
|
|
466
|
-
var Oe = (e = "en-IN") => Array.from({ length: 7 }, (t, n) => De(e).weekday.format(Date.UTC(2024, 0, 1 + n)));
|
|
467
|
-
function ke({ days: e, ariaLabel: t, title: n, onSelect: r, selected: i = null, compact: o = !1, ...s }) {
|
|
468
|
-
let { nf: c, L: l } = B(s), u = s.locale ?? "en-IN", d = oe(() => De(u), [u]), f = oe(() => Oe(u), [u]), p = oe(() => ie(e), [e]), [m, h] = $(), g = ne(h, p.weeks, o ? z.compactMax : z.max), _ = g.cell + g.gap, y = g.weekdays ? 28 : 0, b = i === null ? -1 : p.cells.findIndex((e) => e.day === i), x = Z({
|
|
469
|
-
count: p.cells.length,
|
|
470
|
-
pick: (e, t) => me(e, t, p.cells.map((e) => ({
|
|
471
|
-
left: y + e.week * _,
|
|
472
|
-
top: e.weekday * _,
|
|
473
|
-
width: g.cell,
|
|
474
|
-
height: g.cell
|
|
475
|
-
}))),
|
|
476
|
-
keys: {
|
|
477
|
-
ArrowLeft: -7,
|
|
478
|
-
ArrowRight: 7,
|
|
479
|
-
ArrowUp: -1,
|
|
480
|
-
ArrowDown: 1
|
|
481
|
-
},
|
|
482
|
-
start: b >= 0 ? b : null,
|
|
483
|
-
onPick: r ? (e) => r({
|
|
484
|
-
day: p.cells[e].day,
|
|
485
|
-
count: p.cells[e].count
|
|
486
|
-
}) : void 0
|
|
487
|
-
});
|
|
488
|
-
if (!p.cells.length || p.total === 0) return /* @__PURE__ */ J(D, {
|
|
489
|
-
title: n,
|
|
490
|
-
children: /* @__PURE__ */ J(E, {
|
|
491
|
-
ariaLabel: t,
|
|
492
|
-
text: l.empty,
|
|
493
|
-
compact: o
|
|
494
|
-
})
|
|
495
|
-
});
|
|
496
|
-
let S = (e) => `${d.day.format(a(e.day))}: ${c(e.count)}`, C = x.active, w = C === null ? null : p.cells[C] ?? null, O = `${g.weekdays ? "28px " : ""}repeat(${p.weeks}, ${g.cell}px)`, k = g.weekdays ? 2 : 1;
|
|
497
|
-
return /* @__PURE__ */ J(D, {
|
|
498
|
-
title: n,
|
|
499
|
-
children: /* @__PURE__ */ Y("div", {
|
|
500
|
-
ref: m,
|
|
501
|
-
className: v("chart-calendar", o),
|
|
502
|
-
role: "group",
|
|
503
|
-
"aria-label": `${t}: ${l.total} ${c(p.total)}`,
|
|
504
|
-
children: [
|
|
505
|
-
/* @__PURE__ */ J("div", {
|
|
506
|
-
className: "chart-calendar-months",
|
|
507
|
-
style: {
|
|
508
|
-
gridTemplateColumns: O,
|
|
509
|
-
columnGap: g.gap
|
|
510
|
-
},
|
|
511
|
-
"aria-hidden": !0,
|
|
512
|
-
children: A(p.months, _).map((e) => /* @__PURE__ */ J("span", {
|
|
513
|
-
style: {
|
|
514
|
-
gridRow: 1,
|
|
515
|
-
gridColumn: `${e.week + k} / span ${Math.max(1, Math.ceil(26 / _))}`
|
|
516
|
-
},
|
|
517
|
-
children: d.month.format(a(`${e.month}-01`))
|
|
518
|
-
}, e.month))
|
|
519
|
-
}),
|
|
520
|
-
/* @__PURE__ */ Y("div", {
|
|
521
|
-
className: `chart-calendar-grid chart-plot${r ? " chart-plot--pick" : ""}`,
|
|
522
|
-
style: {
|
|
523
|
-
gridTemplateColumns: O,
|
|
524
|
-
gridTemplateRows: `repeat(7, ${g.cell}px)`,
|
|
525
|
-
gap: g.gap
|
|
526
|
-
},
|
|
527
|
-
role: r ? "button" : "img",
|
|
528
|
-
"aria-label": w ? S(w) : t,
|
|
529
|
-
...x.plotProps,
|
|
530
|
-
children: [g.weekdays && f.map((e, t) => /* @__PURE__ */ J("span", {
|
|
531
|
-
className: "chart-calendar-weekday",
|
|
532
|
-
style: {
|
|
533
|
-
gridRow: t + 1,
|
|
534
|
-
gridColumn: 1
|
|
535
|
-
},
|
|
536
|
-
"aria-hidden": !0,
|
|
537
|
-
children: t % 2 == 0 ? e : ""
|
|
538
|
-
}, e)), p.cells.map((e, t) => /* @__PURE__ */ J("span", {
|
|
539
|
-
"data-hit": t,
|
|
540
|
-
className: `chart-calendar-day${t === b ? " chart-calendar-day--on" : ""}${t === C ? " chart-calendar-day--active" : ""}${b >= 0 && t !== b ? " chart-calendar-day--faded" : ""}`,
|
|
541
|
-
style: {
|
|
542
|
-
gridRow: e.weekday + 1,
|
|
543
|
-
gridColumn: e.week + k,
|
|
544
|
-
background: V(e.level),
|
|
545
|
-
borderRadius: g.cell < 8 ? 1 : 2
|
|
546
|
-
},
|
|
547
|
-
"data-level": e.level,
|
|
548
|
-
"aria-hidden": !0
|
|
549
|
-
}, e.day))]
|
|
550
|
-
}),
|
|
551
|
-
/* @__PURE__ */ Y("div", {
|
|
552
|
-
className: "chart-calendar-legend",
|
|
553
|
-
"aria-hidden": !0,
|
|
554
|
-
children: [
|
|
555
|
-
/* @__PURE__ */ J("span", { children: l.less }),
|
|
556
|
-
Array.from({ length: 5 }, (e, t) => /* @__PURE__ */ J("span", {
|
|
557
|
-
className: "chart-calendar-swatch",
|
|
558
|
-
style: { background: V(t) }
|
|
559
|
-
}, t)),
|
|
560
|
-
/* @__PURE__ */ J("span", { children: l.more })
|
|
561
|
-
]
|
|
562
|
-
}),
|
|
563
|
-
/* @__PURE__ */ J(T, { text: w ? S(w) : "" }),
|
|
564
|
-
x.tooltip(w && /* @__PURE__ */ J(Q, {
|
|
565
|
-
title: d.day.format(a(w.day)),
|
|
566
|
-
rows: [{
|
|
567
|
-
key: "n",
|
|
568
|
-
color: V(Math.max(1, w.level)),
|
|
569
|
-
label: t,
|
|
570
|
-
value: c(w.count)
|
|
571
|
-
}]
|
|
572
|
-
}))
|
|
573
|
-
]
|
|
574
|
-
})
|
|
575
|
-
});
|
|
576
|
-
}
|
|
577
|
-
//#endregion
|
|
578
|
-
//#region ../../shared-web-ui/src/Charts/Legend.tsx
|
|
579
|
-
function Ae({ series: e, labels: t }) {
|
|
580
|
-
let { L: n } = B({ labels: t });
|
|
581
|
-
return e.length < 2 ? null : /* @__PURE__ */ J("ul", {
|
|
582
|
-
className: v("chart-legend"),
|
|
583
|
-
"aria-label": n.legend,
|
|
584
|
-
children: e.map((e) => /* @__PURE__ */ Y("li", {
|
|
585
|
-
className: "chart-legend-item",
|
|
586
|
-
children: [/* @__PURE__ */ J("span", {
|
|
587
|
-
className: "chart-swatch",
|
|
588
|
-
style: { background: M(e.slot) },
|
|
589
|
-
"aria-hidden": !0
|
|
590
|
-
}), e.label]
|
|
591
|
-
}, e.key))
|
|
592
|
-
});
|
|
593
|
-
}
|
|
594
|
-
//#endregion
|
|
595
|
-
//#region ../../shared-web-ui/src/Charts/ColumnChart.tsx
|
|
596
|
-
var je = 6, Me = 2, Ne = 6, Pe = 44;
|
|
597
|
-
function Fe({ data: e, series: t, ariaLabel: n, title: i, height: a, compact: o = !1, mode: s = "stacked", legend: c = !1, onSelect: l, selected: u = null, ...d }) {
|
|
598
|
-
let { nf: f, L: p } = B(d), [h, g] = $(), _ = e.length, y = (t) => !!l && e[t]?.selectable !== !1, S = Z({
|
|
599
|
-
count: _,
|
|
600
|
-
pick: (e, t, n) => fe(e, n.width, _),
|
|
601
|
-
anchor: (e, t) => {
|
|
602
|
-
let n = t.getBoundingClientRect();
|
|
603
|
-
return {
|
|
604
|
-
left: n.left + n.width * e / _,
|
|
605
|
-
top: n.top,
|
|
606
|
-
width: n.width / _,
|
|
607
|
-
height: n.height
|
|
608
|
-
};
|
|
609
|
-
},
|
|
610
|
-
keys: {
|
|
611
|
-
ArrowUp: 0,
|
|
612
|
-
ArrowDown: 0
|
|
613
|
-
},
|
|
614
|
-
start: u === null ? null : e.findIndex((e) => H(e) === u),
|
|
615
|
-
onPick: l ? (t) => y(t) && l(e[t]) : void 0
|
|
616
|
-
}), C = e.map((e) => x(e, t));
|
|
617
|
-
if (C.every((e) => e === 0)) return /* @__PURE__ */ J(D, {
|
|
618
|
-
title: i,
|
|
619
|
-
children: /* @__PURE__ */ J(E, {
|
|
620
|
-
ariaLabel: n,
|
|
621
|
-
text: p.empty,
|
|
622
|
-
compact: o
|
|
623
|
-
})
|
|
624
|
-
});
|
|
625
|
-
let w = a ?? (o ? 96 : 220), O = s === "grouped" && t.length > 1, { max: k, ticks: A } = b(r(e, t, O ? "grouped" : "stacked")), j = O ? m(t.length, 100, je) : [], N = S.active, P = (N === null ? null : H(e[N])) ?? u, I = g && g / Math.max(1, _) < Ne ? 0 : Me, L = new Set(F(_, Math.max(2, Math.min(12, Math.floor((g || 600) / Pe))))), R = (e, n) => `${e.fullLabel ?? e.label}: ${t.length > 1 ? t.map((t) => `${t.label} ${f(e.values[t.key] ?? 0)}`).join(", ") : f(C[n])}`, z = N === null ? null : e[N];
|
|
626
|
-
return /* @__PURE__ */ J(D, {
|
|
627
|
-
title: i,
|
|
628
|
-
children: /* @__PURE__ */ Y("div", {
|
|
629
|
-
ref: h,
|
|
630
|
-
className: v(`chart-columns${O ? " chart-columns--grouped" : ""}`, o),
|
|
631
|
-
role: "group",
|
|
632
|
-
"aria-label": n,
|
|
633
|
-
children: [
|
|
634
|
-
/* @__PURE__ */ Y("div", {
|
|
635
|
-
className: "chart-columns-plot",
|
|
636
|
-
style: { height: w },
|
|
637
|
-
children: [!o && /* @__PURE__ */ J("div", {
|
|
638
|
-
className: "chart-axis-y",
|
|
639
|
-
"aria-hidden": !0,
|
|
640
|
-
children: [...A].reverse().map((e) => /* @__PURE__ */ J("span", { children: f(e) }, e))
|
|
641
|
-
}), /* @__PURE__ */ Y("div", {
|
|
642
|
-
className: `chart-columns-area chart-plot chart-plot--x${l ? " chart-plot--pick" : ""}`,
|
|
643
|
-
role: l ? "button" : "img",
|
|
644
|
-
"aria-label": z ? R(z, N) : n,
|
|
645
|
-
...S.plotProps,
|
|
646
|
-
children: [!o && A.slice(1).map((e) => /* @__PURE__ */ J("div", {
|
|
647
|
-
className: "chart-gridline",
|
|
648
|
-
style: { bottom: `${e / k * 100}%` },
|
|
649
|
-
"aria-hidden": !0
|
|
650
|
-
}, e)), /* @__PURE__ */ J("div", {
|
|
651
|
-
className: "chart-columns-bars",
|
|
652
|
-
style: { gap: I },
|
|
653
|
-
"aria-hidden": !0,
|
|
654
|
-
children: e.map((e, n) => {
|
|
655
|
-
let r = H(e), i = P !== null && P !== r ? " chart-faded" : "";
|
|
656
|
-
return /* @__PURE__ */ J("div", {
|
|
657
|
-
"data-hit": n,
|
|
658
|
-
className: `chart-column${n === N ? " chart-column--active" : ""}${u === r ? " chart-column--on" : ""}`,
|
|
659
|
-
children: O ? /* @__PURE__ */ J("span", {
|
|
660
|
-
className: `chart-column-group${i}`,
|
|
661
|
-
children: t.map((t, n) => /* @__PURE__ */ J("span", {
|
|
662
|
-
className: "chart-column-segment chart-column-segment--top chart-column-bar",
|
|
663
|
-
style: {
|
|
664
|
-
left: `${j[n].x}%`,
|
|
665
|
-
width: `${j[n].width}%`,
|
|
666
|
-
height: `${(e.values[t.key] ?? 0) / k * w}px`,
|
|
667
|
-
background: M(t.slot)
|
|
668
|
-
}
|
|
669
|
-
}, t.key))
|
|
670
|
-
}) : /* @__PURE__ */ J("span", {
|
|
671
|
-
className: `chart-column-stack${i}`,
|
|
672
|
-
children: t.map((n, r) => {
|
|
673
|
-
let i = e.values[n.key] ?? 0;
|
|
674
|
-
return i ? /* @__PURE__ */ J("span", {
|
|
675
|
-
className: `chart-column-segment${t.slice(r + 1).every((t) => !(e.values[t.key] ?? 0)) ? " chart-column-segment--top" : ""}`,
|
|
676
|
-
style: {
|
|
677
|
-
height: `${i / k * w}px`,
|
|
678
|
-
background: M(n.slot)
|
|
679
|
-
}
|
|
680
|
-
}, n.key) : null;
|
|
681
|
-
})
|
|
682
|
-
})
|
|
683
|
-
}, r);
|
|
684
|
-
})
|
|
685
|
-
})]
|
|
686
|
-
})]
|
|
687
|
-
}),
|
|
688
|
-
/* @__PURE__ */ J("div", {
|
|
689
|
-
className: `chart-axis-x${o ? " chart-axis-x--compact" : ""}`,
|
|
690
|
-
style: { gap: I },
|
|
691
|
-
"aria-hidden": !0,
|
|
692
|
-
children: e.map((e, t) => /* @__PURE__ */ J("span", {
|
|
693
|
-
className: u !== null && u !== H(e) ? "chart-faded" : void 0,
|
|
694
|
-
children: L.has(t) ? e.label : ""
|
|
695
|
-
}, H(e)))
|
|
696
|
-
}),
|
|
697
|
-
c && /* @__PURE__ */ J("div", {
|
|
698
|
-
className: "chart-columns-legend",
|
|
699
|
-
children: /* @__PURE__ */ J(Ae, {
|
|
700
|
-
series: t,
|
|
701
|
-
labels: d.labels
|
|
702
|
-
})
|
|
703
|
-
}),
|
|
704
|
-
/* @__PURE__ */ J(T, { text: z ? R(z, N) : "" }),
|
|
705
|
-
S.tooltip(z && /* @__PURE__ */ J(Q, {
|
|
706
|
-
title: z.fullLabel ?? z.label,
|
|
707
|
-
rows: t.map((e) => ({
|
|
708
|
-
key: e.key,
|
|
709
|
-
color: M(e.slot),
|
|
710
|
-
label: e.label,
|
|
711
|
-
value: f(z.values[e.key] ?? 0)
|
|
712
|
-
})),
|
|
713
|
-
note: t.length > 1 ? `${p.total}: ${f(C[N])}` : void 0
|
|
714
|
-
}))
|
|
715
|
-
]
|
|
716
|
-
})
|
|
717
|
-
});
|
|
718
|
-
}
|
|
719
|
-
//#endregion
|
|
720
|
-
//#region ../../shared-web-ui/src/Charts/useLegendFit.ts
|
|
721
|
-
function Ie(e, t) {
|
|
722
|
-
let [n, r] = q(null), [i, a] = q(e), [o, s] = q(e);
|
|
723
|
-
return ae(() => {
|
|
724
|
-
if (!t || !n) {
|
|
725
|
-
a(e), s(e);
|
|
726
|
-
return;
|
|
727
|
-
}
|
|
728
|
-
let r = 0, i = () => {
|
|
729
|
-
let t = n.clientHeight, r = Array.from(n.children).filter((e) => !e.hasAttribute("data-legend-more")), i = e;
|
|
730
|
-
if (t && r.length >= e) {
|
|
731
|
-
let a = n.getBoundingClientRect().top, o = r.filter((e) => e.getBoundingClientRect().bottom - a <= t + .5).length;
|
|
732
|
-
i = o >= e ? e : Math.max(0, o - 1);
|
|
733
|
-
}
|
|
734
|
-
a(i), s(i);
|
|
735
|
-
}, o = () => {
|
|
736
|
-
cancelAnimationFrame(r), a(e), r = requestAnimationFrame(i);
|
|
737
|
-
};
|
|
738
|
-
if (o(), typeof ResizeObserver > "u") return () => cancelAnimationFrame(r);
|
|
739
|
-
let c = n.parentElement ?? n, l = c.clientWidth, u = new ResizeObserver(() => {
|
|
740
|
-
c.clientWidth !== l && (l = c.clientWidth, o());
|
|
741
|
-
});
|
|
742
|
-
return u.observe(c), () => {
|
|
743
|
-
cancelAnimationFrame(r), u.disconnect();
|
|
744
|
-
};
|
|
745
|
-
}, [
|
|
746
|
-
n,
|
|
747
|
-
e,
|
|
748
|
-
t
|
|
749
|
-
]), [
|
|
750
|
-
W((e) => r(e), []),
|
|
751
|
-
t ? i : e,
|
|
752
|
-
t ? o : e
|
|
753
|
-
];
|
|
754
|
-
}
|
|
755
|
-
//#endregion
|
|
756
|
-
//#region ../../shared-web-ui/src/Charts/Donut.tsx
|
|
757
|
-
var Le = 2.5;
|
|
758
|
-
function Re({ slices: t, ariaLabel: n, title: r, size: a, compact: o = !1, variant: s = "donut", onLegendCut: c, legend: u = !0, onSelect: d, selected: f = null, ...p }) {
|
|
759
|
-
let { nf: m, L: h } = B(p), [g, _] = q(null), [b, x, S] = Ie(t.length, o);
|
|
760
|
-
G(() => c?.(t.length - S), [
|
|
761
|
-
c,
|
|
762
|
-
t.length,
|
|
763
|
-
S
|
|
764
|
-
]);
|
|
765
|
-
let w = a ?? (o ? 112 : 168), E = t.reduce((e, t) => e + t.value, 0), D = s === "pie", O = D ? l(t).map((e) => ({
|
|
766
|
-
slice: e.slice,
|
|
767
|
-
a0: e.a0,
|
|
768
|
-
a1: e.a1
|
|
769
|
-
})) : R(t).map((e) => ({
|
|
770
|
-
slice: e.slice,
|
|
771
|
-
a0: e.start / j * 2 * Math.PI,
|
|
772
|
-
a1: (e.start + e.length) / j * 2 * Math.PI
|
|
773
|
-
})), k = (e) => !!d && t[e].value > 0 && t[e].selectable !== !1, A = Z({
|
|
774
|
-
count: t.length,
|
|
775
|
-
pick: (e, n, r) => {
|
|
776
|
-
let i = r.width / 100, a = 48 * i, o = D ? 0 : (40 - 16 / 2) * i, s = _e(e - r.width / 2, n - r.height / 2, a, o, O);
|
|
777
|
-
return s === null || s === -1 ? s : t.indexOf(O[s].slice);
|
|
778
|
-
},
|
|
779
|
-
anchor: (e, n) => {
|
|
780
|
-
let r = n.getBoundingClientRect(), i = O.find((n) => n.slice === t[e]), a = i ? y(r.left + r.width / 2, r.top + r.height / 2, r.width / 100 * (D ? 48 * .75 : 40), (i.a0 + i.a1) / 2) : {
|
|
781
|
-
x: r.left + r.width / 2,
|
|
782
|
-
y: r.top + r.height / 2
|
|
783
|
-
};
|
|
784
|
-
return {
|
|
785
|
-
left: a.x - 1,
|
|
786
|
-
top: a.y - 1,
|
|
787
|
-
width: 2,
|
|
788
|
-
height: 2
|
|
789
|
-
};
|
|
790
|
-
},
|
|
791
|
-
start: f === null ? null : t.findIndex((e) => e.key === f),
|
|
792
|
-
onPick: d ? (e) => k(e) && d(t[e]) : void 0
|
|
793
|
-
}), N = (e) => U(e, E), P = (t) => `${t.label} ${m(t.value)} (${e(N(t.value))})`, F = A.active === -1, I = A.active !== null && A.active >= 0 ? t[A.active] : void 0, L = I?.key ?? g ?? f, z = t.find((e) => e.key === L) ?? t[0], ee = (e) => L !== null && L !== e ? .55 : 1, V = D ? l(t) : [];
|
|
794
|
-
return /* @__PURE__ */ Y("figure", {
|
|
795
|
-
className: v(D ? "chart-donut chart-pie" : "chart-donut", o),
|
|
796
|
-
"aria-label": n,
|
|
797
|
-
children: [
|
|
798
|
-
r && /* @__PURE__ */ J("figcaption", {
|
|
799
|
-
className: "chart-donut-title",
|
|
800
|
-
children: r
|
|
801
|
-
}),
|
|
802
|
-
/* @__PURE__ */ Y("div", {
|
|
803
|
-
className: `chart-donut-ring chart-plot${d ? " chart-plot--pick" : ""}`,
|
|
804
|
-
style: {
|
|
805
|
-
width: w,
|
|
806
|
-
height: w
|
|
807
|
-
},
|
|
808
|
-
role: d ? "button" : "img",
|
|
809
|
-
"aria-label": I ? P(I) : `${n}: ${t.map(P).join(", ")}`,
|
|
810
|
-
...A.plotProps,
|
|
811
|
-
children: [/* @__PURE__ */ J("svg", {
|
|
812
|
-
viewBox: "0 0 100 100",
|
|
813
|
-
width: w,
|
|
814
|
-
height: w,
|
|
815
|
-
className: "chart-donut-svg",
|
|
816
|
-
overflow: "visible",
|
|
817
|
-
"aria-hidden": !0,
|
|
818
|
-
children: D ? E === 0 ? /* @__PURE__ */ J("circle", {
|
|
819
|
-
cx: "50",
|
|
820
|
-
cy: "50",
|
|
821
|
-
r: 48,
|
|
822
|
-
fill: M("rest"),
|
|
823
|
-
opacity: .5
|
|
824
|
-
}) : V.map((t) => {
|
|
825
|
-
let n = t.slice, r = L === n.key && V.length > 1 ? y(0, 0, Le, (t.a0 + t.a1) / 2) : null;
|
|
826
|
-
return /* @__PURE__ */ Y("g", {
|
|
827
|
-
transform: r ? `translate(${r.x} ${r.y})` : void 0,
|
|
828
|
-
opacity: ee(n.key),
|
|
829
|
-
className: "chart-pie-slice-group",
|
|
830
|
-
children: [/* @__PURE__ */ J("path", {
|
|
831
|
-
d: C(50, 50, 48, t.a0, t.a1),
|
|
832
|
-
fill: M(n.slot),
|
|
833
|
-
stroke: "var(--chart-surface)",
|
|
834
|
-
strokeWidth: +(V.length > 1),
|
|
835
|
-
strokeLinejoin: "round",
|
|
836
|
-
className: "chart-donut-slice chart-pie-slice"
|
|
837
|
-
}), t.label && /* @__PURE__ */ J("text", {
|
|
838
|
-
x: t.label.x,
|
|
839
|
-
y: t.label.y,
|
|
840
|
-
className: "chart-pie-share",
|
|
841
|
-
fill: i(n.slot),
|
|
842
|
-
textAnchor: "middle",
|
|
843
|
-
dominantBaseline: "central",
|
|
844
|
-
children: e(t.share)
|
|
845
|
-
})]
|
|
846
|
-
}, n.key);
|
|
847
|
-
}) : /* @__PURE__ */ J("g", {
|
|
848
|
-
transform: "rotate(-90 50 50)",
|
|
849
|
-
children: E === 0 ? /* @__PURE__ */ J("circle", {
|
|
850
|
-
cx: "50",
|
|
851
|
-
cy: "50",
|
|
852
|
-
r: 40,
|
|
853
|
-
fill: "none",
|
|
854
|
-
stroke: M("rest"),
|
|
855
|
-
strokeWidth: 16,
|
|
856
|
-
opacity: .5
|
|
857
|
-
}) : R(t).map(({ slice: e, start: t, length: n }) => /* @__PURE__ */ J("circle", {
|
|
858
|
-
cx: "50",
|
|
859
|
-
cy: "50",
|
|
860
|
-
r: 40,
|
|
861
|
-
fill: "none",
|
|
862
|
-
stroke: M(e.slot),
|
|
863
|
-
strokeWidth: L === e.key ? 18 : 16,
|
|
864
|
-
strokeDasharray: `${n} ${j}`,
|
|
865
|
-
strokeDashoffset: -t,
|
|
866
|
-
className: "chart-donut-slice",
|
|
867
|
-
opacity: F ? 1 : ee(e.key)
|
|
868
|
-
}, e.key))
|
|
869
|
-
})
|
|
870
|
-
}), D ? E === 0 && /* @__PURE__ */ J("div", {
|
|
871
|
-
className: "chart-donut-centre",
|
|
872
|
-
"aria-hidden": !0,
|
|
873
|
-
children: /* @__PURE__ */ J("span", {
|
|
874
|
-
className: "chart-donut-empty",
|
|
875
|
-
children: h.empty
|
|
876
|
-
})
|
|
877
|
-
}) : /* @__PURE__ */ J("div", {
|
|
878
|
-
className: "chart-donut-centre",
|
|
879
|
-
"aria-hidden": !0,
|
|
880
|
-
children: E > 0 && F ? /* @__PURE__ */ Y(se, { children: [/* @__PURE__ */ J("span", {
|
|
881
|
-
className: "chart-donut-share",
|
|
882
|
-
children: m(E)
|
|
883
|
-
}), /* @__PURE__ */ J("span", {
|
|
884
|
-
className: "chart-donut-share-label",
|
|
885
|
-
children: h.total.toLowerCase()
|
|
886
|
-
})] }) : E > 0 && z ? /* @__PURE__ */ Y(se, { children: [/* @__PURE__ */ J("span", {
|
|
887
|
-
className: "chart-donut-share",
|
|
888
|
-
children: e(N(z.value))
|
|
889
|
-
}), /* @__PURE__ */ J("span", {
|
|
890
|
-
className: "chart-donut-share-label",
|
|
891
|
-
children: z.label.toLowerCase()
|
|
892
|
-
})] }) : /* @__PURE__ */ J("span", {
|
|
893
|
-
className: "chart-donut-empty",
|
|
894
|
-
children: h.empty
|
|
895
|
-
})
|
|
896
|
-
})]
|
|
897
|
-
}),
|
|
898
|
-
u && /* @__PURE__ */ Y("ul", {
|
|
899
|
-
ref: b,
|
|
900
|
-
className: "chart-donut-legend",
|
|
901
|
-
"aria-label": h.legend,
|
|
902
|
-
children: [t.slice(0, x).map((t, n) => /* @__PURE__ */ Y("li", {
|
|
903
|
-
className: `chart-donut-legend-item${k(n) ? " chart-donut-legend-item--hit" : ""}${f === t.key ? " chart-donut-legend-item--on" : ""}${f !== null && f !== t.key ? " chart-faded" : ""}`,
|
|
904
|
-
onMouseEnter: () => _(t.key),
|
|
905
|
-
onMouseLeave: () => _(null),
|
|
906
|
-
onClick: k(n) ? () => d(t) : void 0,
|
|
907
|
-
children: [
|
|
908
|
-
/* @__PURE__ */ J("span", {
|
|
909
|
-
className: "chart-swatch",
|
|
910
|
-
style: { background: M(t.slot) },
|
|
911
|
-
"aria-hidden": !0
|
|
912
|
-
}),
|
|
913
|
-
/* @__PURE__ */ J("span", {
|
|
914
|
-
className: "chart-donut-legend-label",
|
|
915
|
-
children: t.label
|
|
916
|
-
}),
|
|
917
|
-
/* @__PURE__ */ Y("span", {
|
|
918
|
-
className: "chart-donut-legend-value",
|
|
919
|
-
children: [
|
|
920
|
-
m(t.value),
|
|
921
|
-
" · ",
|
|
922
|
-
e(N(t.value))
|
|
923
|
-
]
|
|
924
|
-
})
|
|
925
|
-
]
|
|
926
|
-
}, t.key)), x < t.length && /* @__PURE__ */ J("li", {
|
|
927
|
-
className: "chart-donut-legend-more",
|
|
928
|
-
"data-legend-more": "",
|
|
929
|
-
children: h.moreValues(m(t.length - x))
|
|
930
|
-
})]
|
|
931
|
-
}),
|
|
932
|
-
/* @__PURE__ */ J(T, { text: I ? P(I) : F ? `${h.total} ${m(E)}` : "" }),
|
|
933
|
-
A.tooltip(F ? /* @__PURE__ */ J(Q, {
|
|
934
|
-
title: n,
|
|
935
|
-
rows: t.map((e) => ({
|
|
936
|
-
key: e.key,
|
|
937
|
-
color: M(e.slot),
|
|
938
|
-
label: e.label,
|
|
939
|
-
value: m(e.value)
|
|
940
|
-
})),
|
|
941
|
-
note: `${h.total}: ${m(E)}`
|
|
942
|
-
}) : I && /* @__PURE__ */ J(Q, {
|
|
943
|
-
rows: [{
|
|
944
|
-
key: I.key,
|
|
945
|
-
color: M(I.slot),
|
|
946
|
-
label: I.label,
|
|
947
|
-
value: m(I.value)
|
|
948
|
-
}],
|
|
949
|
-
note: h.shareOf(e(N(I.value)), m(E))
|
|
950
|
-
}))
|
|
951
|
-
]
|
|
952
|
-
});
|
|
953
|
-
}
|
|
954
|
-
//#endregion
|
|
955
|
-
//#region ../../shared-web-ui/src/Charts/Funnel.tsx
|
|
956
|
-
function ze({ steps: n, ariaLabel: r, title: a, compact: o = !1, onSelect: s, selected: c = null, ...l }) {
|
|
957
|
-
let { nf: u, L: d } = B(l), f = (e) => !!s && n[e].selectable !== !1, p = Z({
|
|
958
|
-
count: n.length,
|
|
959
|
-
pick: (e, t, n, r) => pe(t, Ce(r).map((e) => e ? {
|
|
960
|
-
start: e.top,
|
|
961
|
-
end: e.top + e.height
|
|
962
|
-
} : {
|
|
963
|
-
start: Infinity,
|
|
964
|
-
end: Infinity
|
|
965
|
-
})),
|
|
966
|
-
keys: {
|
|
967
|
-
ArrowLeft: 0,
|
|
968
|
-
ArrowRight: 0
|
|
969
|
-
},
|
|
970
|
-
start: c === null ? null : n.findIndex((e) => e.key === c),
|
|
971
|
-
onPick: s ? (e) => f(e) && s(n[e]) : void 0
|
|
972
|
-
});
|
|
973
|
-
if (!n.some((e) => e.value > 0)) return /* @__PURE__ */ J(D, {
|
|
974
|
-
title: a,
|
|
975
|
-
children: /* @__PURE__ */ J(E, {
|
|
976
|
-
ariaLabel: r,
|
|
977
|
-
text: d.empty,
|
|
978
|
-
compact: o
|
|
979
|
-
})
|
|
980
|
-
});
|
|
981
|
-
let m = t(n), h = p.active === null ? null : m[p.active] ?? null, g = h?.step.key ?? c, _ = (e) => `${e.step.label}: ${u(e.step.value)}${e.drop === null ? "" : `, ${d.funnelDrop} ${N(e.drop)}`}`;
|
|
982
|
-
return /* @__PURE__ */ Y(D, {
|
|
983
|
-
title: a,
|
|
984
|
-
children: [
|
|
985
|
-
/* @__PURE__ */ J("ol", {
|
|
986
|
-
className: v(`chart-funnel chart-plot chart-plot--rows${s ? " chart-plot--pick" : ""}`, o),
|
|
987
|
-
role: s ? "button" : "img",
|
|
988
|
-
"aria-label": h ? _(h) : r,
|
|
989
|
-
...p.plotProps,
|
|
990
|
-
children: m.map(({ step: e, width: t, drop: n }, r) => /* @__PURE__ */ J("li", {
|
|
991
|
-
"data-hit": r,
|
|
992
|
-
className: `chart-funnel-item${r === p.active ? " chart-funnel-item--active" : ""}`,
|
|
993
|
-
"aria-hidden": !0,
|
|
994
|
-
children: /* @__PURE__ */ Y("span", {
|
|
995
|
-
className: `chart-funnel-row${g !== null && g !== e.key ? " chart-faded" : ""}`,
|
|
996
|
-
children: [
|
|
997
|
-
/* @__PURE__ */ J("span", {
|
|
998
|
-
className: "chart-funnel-label",
|
|
999
|
-
title: e.label,
|
|
1000
|
-
children: e.label
|
|
1001
|
-
}),
|
|
1002
|
-
/* @__PURE__ */ Y("span", {
|
|
1003
|
-
className: "chart-funnel-track",
|
|
1004
|
-
children: [/* @__PURE__ */ J("span", {
|
|
1005
|
-
className: "chart-funnel-bar",
|
|
1006
|
-
style: {
|
|
1007
|
-
width: `${t * 100}%`,
|
|
1008
|
-
background: M(e.slot),
|
|
1009
|
-
color: i(e.slot)
|
|
1010
|
-
},
|
|
1011
|
-
children: t >= .18 ? u(e.value) : ""
|
|
1012
|
-
}), t < .18 && /* @__PURE__ */ J("span", {
|
|
1013
|
-
className: "chart-funnel-outside",
|
|
1014
|
-
children: u(e.value)
|
|
1015
|
-
})]
|
|
1016
|
-
}),
|
|
1017
|
-
/* @__PURE__ */ J("span", {
|
|
1018
|
-
className: "chart-funnel-drop",
|
|
1019
|
-
"data-change": n === null ? void 0 : n > 0 ? "drop" : n < 0 ? "rise" : "flat",
|
|
1020
|
-
children: n === null ? "" : N(n)
|
|
1021
|
-
})
|
|
1022
|
-
]
|
|
1023
|
-
})
|
|
1024
|
-
}, e.key))
|
|
1025
|
-
}),
|
|
1026
|
-
/* @__PURE__ */ J(T, { text: h ? _(h) : "" }),
|
|
1027
|
-
p.tooltip(h && /* @__PURE__ */ J(Q, {
|
|
1028
|
-
rows: [{
|
|
1029
|
-
key: h.step.key,
|
|
1030
|
-
color: M(h.step.slot),
|
|
1031
|
-
label: h.step.label,
|
|
1032
|
-
value: u(h.step.value)
|
|
1033
|
-
}],
|
|
1034
|
-
note: [p.active > 0 ? `${d.funnelOfFirst}: ${e(h.ofFirst)}` : "", h.drop === null ? "" : `${d.funnelDrop}: ${N(h.drop)}`].filter(Boolean).join(" · ") || void 0
|
|
1035
|
-
}))
|
|
1036
|
-
]
|
|
1037
|
-
});
|
|
1038
|
-
}
|
|
1039
|
-
//#endregion
|
|
1040
|
-
//#region ../../shared-web-ui/src/Charts/Gauge.tsx
|
|
1041
|
-
function Be({ value: t, total: n, ariaLabel: r, label: i, variant: a = "half", color: o = 1, size: s, compact: c = !1, ...l }) {
|
|
1042
|
-
let { nf: u, L: d } = B(l), f = P[a], p = U(t, n), { a0: m, a1: h, end: g } = L(a, p), _ = s ?? (a === "half" ? c ? 120 : 168 : c ? 88 : 128), y = Z({
|
|
1043
|
-
count: 1,
|
|
1044
|
-
pick: (e, t, n) => {
|
|
1045
|
-
let r = n.width / f.width;
|
|
1046
|
-
return _e(e - f.cx * r, t - f.cy * r, (f.r + 12 / 2) * r, 0, [{
|
|
1047
|
-
a0: m,
|
|
1048
|
-
a1: h
|
|
1049
|
-
}]) === null ? null : 0;
|
|
1050
|
-
}
|
|
1051
|
-
}), b = d.ofTotal(u(t), u(n)), x = M(k(o, p));
|
|
1052
|
-
return /* @__PURE__ */ Y("div", {
|
|
1053
|
-
className: v(`chart-gauge chart-gauge--${a}`, c),
|
|
1054
|
-
role: "meter",
|
|
1055
|
-
"aria-label": r,
|
|
1056
|
-
"aria-valuemin": 0,
|
|
1057
|
-
"aria-valuemax": 100,
|
|
1058
|
-
"aria-valuenow": Math.round(p * 10) / 10,
|
|
1059
|
-
"aria-valuetext": `${b} (${e(p)})`,
|
|
1060
|
-
children: [
|
|
1061
|
-
/* @__PURE__ */ Y("div", {
|
|
1062
|
-
className: "chart-gauge-dial chart-plot",
|
|
1063
|
-
style: { width: _ },
|
|
1064
|
-
...y.plotProps,
|
|
1065
|
-
children: [/* @__PURE__ */ Y("svg", {
|
|
1066
|
-
viewBox: `0 0 ${f.width} ${f.height}`,
|
|
1067
|
-
width: _,
|
|
1068
|
-
height: _ * f.height / f.width,
|
|
1069
|
-
"aria-hidden": !0,
|
|
1070
|
-
children: [/* @__PURE__ */ J("path", {
|
|
1071
|
-
d: ee(f.cx, f.cy, f.r, m, h),
|
|
1072
|
-
className: "chart-gauge-track",
|
|
1073
|
-
fill: "none",
|
|
1074
|
-
strokeWidth: 12,
|
|
1075
|
-
strokeLinecap: "round"
|
|
1076
|
-
}), p > 0 && /* @__PURE__ */ J("path", {
|
|
1077
|
-
d: ee(f.cx, f.cy, f.r, m, Math.max(g, m + .01)),
|
|
1078
|
-
className: "chart-gauge-value",
|
|
1079
|
-
fill: "none",
|
|
1080
|
-
stroke: x,
|
|
1081
|
-
strokeWidth: 12,
|
|
1082
|
-
strokeLinecap: "round"
|
|
1083
|
-
})]
|
|
1084
|
-
}), /* @__PURE__ */ J("span", {
|
|
1085
|
-
className: "chart-gauge-share",
|
|
1086
|
-
"aria-hidden": !0,
|
|
1087
|
-
children: e(p)
|
|
1088
|
-
})]
|
|
1089
|
-
}),
|
|
1090
|
-
i !== void 0 && /* @__PURE__ */ J("span", {
|
|
1091
|
-
className: "chart-gauge-label",
|
|
1092
|
-
children: i
|
|
1093
|
-
}),
|
|
1094
|
-
/* @__PURE__ */ J("span", {
|
|
1095
|
-
className: "chart-gauge-of",
|
|
1096
|
-
"aria-hidden": !0,
|
|
1097
|
-
children: b
|
|
1098
|
-
}),
|
|
1099
|
-
/* @__PURE__ */ J(T, { text: y.active === null ? "" : `${b} (${e(p)})` }),
|
|
1100
|
-
y.tooltip(y.active !== null && /* @__PURE__ */ J(Q, {
|
|
1101
|
-
title: i ?? r,
|
|
1102
|
-
rows: [{
|
|
1103
|
-
key: "v",
|
|
1104
|
-
color: x,
|
|
1105
|
-
label: b,
|
|
1106
|
-
value: e(p)
|
|
1107
|
-
}]
|
|
1108
|
-
}))
|
|
1109
|
-
]
|
|
1110
|
-
});
|
|
1111
|
-
}
|
|
1112
|
-
//#endregion
|
|
1113
|
-
//#region ../../shared-web-ui/src/Charts/LineChart.tsx
|
|
1114
|
-
var Ve = 64;
|
|
1115
|
-
function He({ data: e, series: t, ariaLabel: n, title: r, area: i = !1, height: a, compact: s = !1, onSelect: c, selected: l = null, ...u }) {
|
|
1116
|
-
let { nf: d, L: p } = B(u), [m, g] = $(), y = e.length, S = l === null ? -1 : e.findIndex((e) => H(e) === l), C = Z({
|
|
1117
|
-
count: y,
|
|
1118
|
-
pick: (e, t, n) => o(e, n.width, y),
|
|
1119
|
-
anchor: (e, t) => {
|
|
1120
|
-
let n = t.getBoundingClientRect();
|
|
1121
|
-
return {
|
|
1122
|
-
left: n.left + f(e, y, 100) / 100 * n.width - 1,
|
|
1123
|
-
top: n.top,
|
|
1124
|
-
width: 2,
|
|
1125
|
-
height: n.height
|
|
1126
|
-
};
|
|
1127
|
-
},
|
|
1128
|
-
keys: {
|
|
1129
|
-
ArrowUp: 0,
|
|
1130
|
-
ArrowDown: 0
|
|
1131
|
-
},
|
|
1132
|
-
start: S >= 0 ? S : null,
|
|
1133
|
-
onPick: c ? (t) => e[t].selectable !== !1 && c(e[t]) : void 0
|
|
1134
|
-
}), w = e.flatMap((e) => t.map((t) => e.values[t.key] ?? 0));
|
|
1135
|
-
if (!w.some((e) => e > 0)) return /* @__PURE__ */ J(D, {
|
|
1136
|
-
title: r,
|
|
1137
|
-
children: /* @__PURE__ */ J(E, {
|
|
1138
|
-
ariaLabel: n,
|
|
1139
|
-
text: p.empty,
|
|
1140
|
-
compact: s
|
|
1141
|
-
})
|
|
1142
|
-
});
|
|
1143
|
-
let O = a ?? (s ? 96 : 220), { max: k, ticks: A } = b(w), j = t.map((t) => ({
|
|
1144
|
-
s: t,
|
|
1145
|
-
points: _(e.map((e) => e.values[t.key] ?? 0), 100, 100, k)
|
|
1146
|
-
})), N = C.active, P = (e) => `${e.fullLabel ?? e.label}: ${t.map((n) => t.length > 1 ? `${n.label} ${d(e.values[n.key] ?? 0)}` : d(e.values[n.key] ?? 0)).join(", ")}`, L = N === null ? null : e[N] ?? null, R = F(y, Math.max(2, Math.min(s ? 4 : 6, Math.floor((g || 400) / Ve)))), z = (e) => `${f(e, y, 100)}%`;
|
|
1147
|
-
return /* @__PURE__ */ J(D, {
|
|
1148
|
-
title: r,
|
|
1149
|
-
children: /* @__PURE__ */ Y("div", {
|
|
1150
|
-
ref: m,
|
|
1151
|
-
className: v(`chart-line${i ? " chart-line--area" : ""}`, s),
|
|
1152
|
-
role: "group",
|
|
1153
|
-
"aria-label": n,
|
|
1154
|
-
children: [
|
|
1155
|
-
/* @__PURE__ */ Y("div", {
|
|
1156
|
-
className: "chart-columns-plot",
|
|
1157
|
-
style: { height: O },
|
|
1158
|
-
children: [!s && /* @__PURE__ */ J("div", {
|
|
1159
|
-
className: "chart-axis-y",
|
|
1160
|
-
"aria-hidden": !0,
|
|
1161
|
-
children: [...A].reverse().map((e) => /* @__PURE__ */ J("span", { children: d(e) }, e))
|
|
1162
|
-
}), /* @__PURE__ */ Y("div", {
|
|
1163
|
-
className: `chart-line-area chart-plot chart-plot--x${c ? " chart-plot--pick" : ""}`,
|
|
1164
|
-
role: c ? "button" : "img",
|
|
1165
|
-
"aria-label": L ? P(L) : n,
|
|
1166
|
-
...C.plotProps,
|
|
1167
|
-
children: [
|
|
1168
|
-
!s && A.slice(1).map((e) => /* @__PURE__ */ J("div", {
|
|
1169
|
-
className: "chart-gridline",
|
|
1170
|
-
style: { bottom: `${e / k * 100}%` },
|
|
1171
|
-
"aria-hidden": !0
|
|
1172
|
-
}, e)),
|
|
1173
|
-
/* @__PURE__ */ Y("svg", {
|
|
1174
|
-
className: "chart-line-svg",
|
|
1175
|
-
viewBox: "0 0 100 100",
|
|
1176
|
-
preserveAspectRatio: "none",
|
|
1177
|
-
width: "100%",
|
|
1178
|
-
height: "100%",
|
|
1179
|
-
"aria-hidden": !0,
|
|
1180
|
-
children: [
|
|
1181
|
-
i && j.map(({ s: e, points: t }) => /* @__PURE__ */ J("path", {
|
|
1182
|
-
d: I(t, 100),
|
|
1183
|
-
fill: M(e.slot),
|
|
1184
|
-
className: "chart-line-fill"
|
|
1185
|
-
}, `a-${e.key}`)),
|
|
1186
|
-
j.map(({ s: e, points: t }) => /* @__PURE__ */ J("path", {
|
|
1187
|
-
d: h(t),
|
|
1188
|
-
fill: "none",
|
|
1189
|
-
stroke: M(e.slot),
|
|
1190
|
-
className: "chart-line-path",
|
|
1191
|
-
vectorEffect: "non-scaling-stroke"
|
|
1192
|
-
}, e.key)),
|
|
1193
|
-
S >= 0 && /* @__PURE__ */ J("line", {
|
|
1194
|
-
className: "chart-line-selected",
|
|
1195
|
-
x1: f(S, y, 100),
|
|
1196
|
-
x2: f(S, y, 100),
|
|
1197
|
-
y1: 0,
|
|
1198
|
-
y2: 100,
|
|
1199
|
-
vectorEffect: "non-scaling-stroke"
|
|
1200
|
-
}),
|
|
1201
|
-
N !== null && /* @__PURE__ */ J("line", {
|
|
1202
|
-
className: "chart-line-crosshair",
|
|
1203
|
-
x1: f(N, y, 100),
|
|
1204
|
-
x2: f(N, y, 100),
|
|
1205
|
-
y1: 0,
|
|
1206
|
-
y2: 100,
|
|
1207
|
-
vectorEffect: "non-scaling-stroke"
|
|
1208
|
-
})
|
|
1209
|
-
]
|
|
1210
|
-
}),
|
|
1211
|
-
[N, S >= 0 ? S : null].map((e, t) => e === null || t === 1 && e === N ? null : j.map(({ s: n, points: r }) => /* @__PURE__ */ J("span", {
|
|
1212
|
-
className: "chart-line-dot",
|
|
1213
|
-
style: {
|
|
1214
|
-
left: z(e),
|
|
1215
|
-
top: `${r[e].y}%`,
|
|
1216
|
-
background: M(n.slot)
|
|
1217
|
-
},
|
|
1218
|
-
"aria-hidden": !0
|
|
1219
|
-
}, `${t}-${n.key}`)))
|
|
1220
|
-
]
|
|
1221
|
-
})]
|
|
1222
|
-
}),
|
|
1223
|
-
/* @__PURE__ */ J("div", {
|
|
1224
|
-
className: `chart-line-axis-x${s ? " chart-line-axis-x--compact" : ""}`,
|
|
1225
|
-
"aria-hidden": !0,
|
|
1226
|
-
children: R.map((t) => /* @__PURE__ */ J("span", {
|
|
1227
|
-
style: { left: z(t) },
|
|
1228
|
-
className: t === 0 ? "chart-line-axis-first" : t === y - 1 ? "chart-line-axis-last" : void 0,
|
|
1229
|
-
children: e[t].label
|
|
1230
|
-
}, t))
|
|
1231
|
-
}),
|
|
1232
|
-
/* @__PURE__ */ J(T, { text: L ? P(L) : "" }),
|
|
1233
|
-
C.tooltip(L && /* @__PURE__ */ J(Q, {
|
|
1234
|
-
title: L.fullLabel ?? L.label,
|
|
1235
|
-
rows: t.map((e) => ({
|
|
1236
|
-
key: e.key,
|
|
1237
|
-
color: M(e.slot),
|
|
1238
|
-
label: e.label,
|
|
1239
|
-
value: d(L.values[e.key] ?? 0)
|
|
1240
|
-
})),
|
|
1241
|
-
note: t.length > 1 ? `${p.total}: ${d(x(L, t))}` : void 0
|
|
1242
|
-
}))
|
|
1243
|
-
]
|
|
1244
|
-
})
|
|
1245
|
-
});
|
|
1246
|
-
}
|
|
1247
|
-
//#endregion
|
|
1248
|
-
//#region ../../shared-web-ui/src/Charts/NumberTrend.tsx
|
|
1249
|
-
function Ue({ value: t, ariaLabel: r, title: i, points: a = [], current: s, previous: c, good: l = "up", slot: u = 1, compact: d = !1, ...p }) {
|
|
1250
|
-
let { nf: m, L: _ } = B(p), y = Z({
|
|
1251
|
-
count: a.length,
|
|
1252
|
-
pick: (e, t, n) => o(e, n.width, a.length),
|
|
1253
|
-
anchor: (e, t) => {
|
|
1254
|
-
let n = t.getBoundingClientRect();
|
|
1255
|
-
return {
|
|
1256
|
-
left: n.left + f(e, a.length, 100) / 100 * n.width - 1,
|
|
1257
|
-
top: n.top,
|
|
1258
|
-
width: 2,
|
|
1259
|
-
height: n.height
|
|
1260
|
-
};
|
|
1261
|
-
},
|
|
1262
|
-
keys: {
|
|
1263
|
-
ArrowUp: 0,
|
|
1264
|
-
ArrowDown: 0
|
|
1265
|
-
}
|
|
1266
|
-
}), b = s ?? a.reduce((e, t) => e + t.value, 0), x = c === void 0 ? null : S(b, c), C = x ? g(x.direction, l) : "neutral", w = x ? x.direction === "up" ? "▲" : x.direction === "down" ? "▼" : "=" : "", E = x ? x.percent === null ? _.deltaNew : e(Math.abs(x.percent)) : "", D = x ? `${x.direction === "up" ? _.deltaUp : x.direction === "down" ? _.deltaDown : _.deltaSame}${x.direction === "same" ? "" : ` ${E}`} ${_.vsPrevious}` : "", O = n(a.map((e) => e.value), 100, 100), k = y.active, A = k === null ? null : a[k] ?? null;
|
|
1267
|
-
return /* @__PURE__ */ Y("div", {
|
|
1268
|
-
className: v("chart-number", d),
|
|
1269
|
-
role: "group",
|
|
1270
|
-
"aria-label": `${r}: ${m(t)}${D ? `, ${D}` : ""}`,
|
|
1271
|
-
children: [
|
|
1272
|
-
i != null && i !== "" && /* @__PURE__ */ J("div", {
|
|
1273
|
-
className: "chart-title",
|
|
1274
|
-
children: i
|
|
1275
|
-
}),
|
|
1276
|
-
/* @__PURE__ */ Y("div", {
|
|
1277
|
-
className: "chart-number-line",
|
|
1278
|
-
"aria-hidden": !0,
|
|
1279
|
-
children: [/* @__PURE__ */ J("span", {
|
|
1280
|
-
className: "chart-number-value",
|
|
1281
|
-
children: m(t)
|
|
1282
|
-
}), x && /* @__PURE__ */ Y("span", {
|
|
1283
|
-
className: "chart-number-delta",
|
|
1284
|
-
"data-tone": C,
|
|
1285
|
-
style: { color: M(C) },
|
|
1286
|
-
children: [
|
|
1287
|
-
w,
|
|
1288
|
-
" ",
|
|
1289
|
-
x.direction === "same" ? e(0) : E
|
|
1290
|
-
]
|
|
1291
|
-
})]
|
|
1292
|
-
}),
|
|
1293
|
-
O.length > 1 && /* @__PURE__ */ Y("div", {
|
|
1294
|
-
className: "chart-number-spark chart-plot chart-plot--x",
|
|
1295
|
-
role: "img",
|
|
1296
|
-
"aria-label": A ? `${A.label}: ${m(A.value)}` : r,
|
|
1297
|
-
...y.plotProps,
|
|
1298
|
-
children: [/* @__PURE__ */ Y("svg", {
|
|
1299
|
-
viewBox: "0 0 100 100",
|
|
1300
|
-
preserveAspectRatio: "none",
|
|
1301
|
-
width: "100%",
|
|
1302
|
-
height: "100%",
|
|
1303
|
-
"aria-hidden": !0,
|
|
1304
|
-
children: [
|
|
1305
|
-
/* @__PURE__ */ J("path", {
|
|
1306
|
-
d: I(O, 100),
|
|
1307
|
-
fill: M(u),
|
|
1308
|
-
className: "chart-line-fill"
|
|
1309
|
-
}),
|
|
1310
|
-
/* @__PURE__ */ J("path", {
|
|
1311
|
-
d: h(O),
|
|
1312
|
-
fill: "none",
|
|
1313
|
-
stroke: M(u),
|
|
1314
|
-
className: "chart-line-path",
|
|
1315
|
-
vectorEffect: "non-scaling-stroke"
|
|
1316
|
-
}),
|
|
1317
|
-
k !== null && /* @__PURE__ */ J("line", {
|
|
1318
|
-
className: "chart-line-crosshair",
|
|
1319
|
-
x1: f(k, a.length, 100),
|
|
1320
|
-
x2: f(k, a.length, 100),
|
|
1321
|
-
y1: 0,
|
|
1322
|
-
y2: 100,
|
|
1323
|
-
vectorEffect: "non-scaling-stroke"
|
|
1324
|
-
})
|
|
1325
|
-
]
|
|
1326
|
-
}), k !== null && O[k] && /* @__PURE__ */ J("span", {
|
|
1327
|
-
className: "chart-line-dot",
|
|
1328
|
-
style: {
|
|
1329
|
-
left: `${O[k].x}%`,
|
|
1330
|
-
top: `${O[k].y}%`,
|
|
1331
|
-
background: M(u)
|
|
1332
|
-
},
|
|
1333
|
-
"aria-hidden": !0
|
|
1334
|
-
})]
|
|
1335
|
-
}),
|
|
1336
|
-
x && /* @__PURE__ */ J("div", {
|
|
1337
|
-
className: "chart-number-note",
|
|
1338
|
-
"aria-hidden": !0,
|
|
1339
|
-
children: _.vsPrevious
|
|
1340
|
-
}),
|
|
1341
|
-
/* @__PURE__ */ J(T, { text: A ? `${A.label}: ${m(A.value)}` : "" }),
|
|
1342
|
-
y.tooltip(A && /* @__PURE__ */ J(Q, {
|
|
1343
|
-
title: A.label,
|
|
1344
|
-
rows: [{
|
|
1345
|
-
key: "v",
|
|
1346
|
-
color: M(u),
|
|
1347
|
-
label: r,
|
|
1348
|
-
value: m(A.value)
|
|
1349
|
-
}]
|
|
1350
|
-
}))
|
|
1351
|
-
]
|
|
1352
|
-
});
|
|
1353
|
-
}
|
|
1354
|
-
//#endregion
|
|
1355
|
-
//#region ../../shared-web-ui/src/Charts/Progress.tsx
|
|
1356
|
-
function We({ value: t, total: n, ariaLabel: r, label: i, color: a = 1, compact: o = !1, ...s }) {
|
|
1357
|
-
let { nf: c, L: l } = B(s), u = Z({
|
|
1358
|
-
count: 1,
|
|
1359
|
-
pick: () => 0
|
|
1360
|
-
}), d = n > 0 ? t / n * 100 : 0, f = M(k(a, d)), p = l.ofTotal(c(t), c(n));
|
|
1361
|
-
return /* @__PURE__ */ Y("div", {
|
|
1362
|
-
className: v("chart-progress chart-plot", o),
|
|
1363
|
-
role: "progressbar",
|
|
1364
|
-
"aria-label": r,
|
|
1365
|
-
"aria-valuemin": 0,
|
|
1366
|
-
"aria-valuemax": 100,
|
|
1367
|
-
"aria-valuenow": Math.round(d * 10) / 10,
|
|
1368
|
-
"aria-valuetext": `${c(t)} / ${c(n)} (${e(d)})`,
|
|
1369
|
-
...u.plotProps,
|
|
1370
|
-
children: [
|
|
1371
|
-
i !== void 0 && /* @__PURE__ */ Y("div", {
|
|
1372
|
-
className: "chart-progress-head",
|
|
1373
|
-
children: [/* @__PURE__ */ J("span", {
|
|
1374
|
-
className: "chart-progress-label",
|
|
1375
|
-
children: i
|
|
1376
|
-
}), /* @__PURE__ */ J("span", {
|
|
1377
|
-
className: "chart-progress-share",
|
|
1378
|
-
children: e(d)
|
|
1379
|
-
})]
|
|
1380
|
-
}),
|
|
1381
|
-
/* @__PURE__ */ J("div", {
|
|
1382
|
-
className: "chart-progress-track",
|
|
1383
|
-
children: /* @__PURE__ */ J("div", {
|
|
1384
|
-
className: "chart-progress-fill",
|
|
1385
|
-
style: {
|
|
1386
|
-
width: `${Math.min(100, d)}%`,
|
|
1387
|
-
background: f
|
|
1388
|
-
}
|
|
1389
|
-
})
|
|
1390
|
-
}),
|
|
1391
|
-
/* @__PURE__ */ J(T, { text: u.active === null ? "" : `${p} (${e(d)})` }),
|
|
1392
|
-
u.tooltip(u.active !== null && /* @__PURE__ */ J(Q, {
|
|
1393
|
-
title: i ?? r,
|
|
1394
|
-
rows: [{
|
|
1395
|
-
key: "v",
|
|
1396
|
-
color: f,
|
|
1397
|
-
label: p,
|
|
1398
|
-
value: e(d)
|
|
1399
|
-
}]
|
|
1400
|
-
}))
|
|
1401
|
-
]
|
|
1402
|
-
});
|
|
1403
|
-
}
|
|
1404
|
-
//#endregion
|
|
1405
|
-
//#region ../../shared-web-ui/src/Charts/StackedBar.tsx
|
|
1406
|
-
function Ge({ slices: t, ariaLabel: n, title: r, compact: i = !1, onLegendCut: a, onSelect: o, selected: s = null, ...c }) {
|
|
1407
|
-
let { nf: l, L: u } = B(c), [d, f] = q(null), [p, m, h] = Ie(t.length, i);
|
|
1408
|
-
G(() => a?.(t.length - h), [
|
|
1409
|
-
a,
|
|
1410
|
-
t.length,
|
|
1411
|
-
h
|
|
1412
|
-
]);
|
|
1413
|
-
let g = t.filter((e) => e.value > 0), _ = (e) => !!o && e.value > 0 && e.selectable !== !1, y = Z({
|
|
1414
|
-
count: g.length,
|
|
1415
|
-
pick: (e, t, n, r) => pe(e, Ce(r).map((e) => e ? {
|
|
1416
|
-
start: e.left,
|
|
1417
|
-
end: e.left + e.width
|
|
1418
|
-
} : {
|
|
1419
|
-
start: Infinity,
|
|
1420
|
-
end: Infinity
|
|
1421
|
-
})),
|
|
1422
|
-
keys: {
|
|
1423
|
-
ArrowUp: 0,
|
|
1424
|
-
ArrowDown: 0
|
|
1425
|
-
},
|
|
1426
|
-
start: s === null ? null : g.findIndex((e) => e.key === s),
|
|
1427
|
-
onPick: o ? (e) => _(g[e]) && o(g[e]) : void 0
|
|
1428
|
-
}), b = t.reduce((e, t) => e + t.value, 0);
|
|
1429
|
-
if (b === 0) return /* @__PURE__ */ J(D, {
|
|
1430
|
-
title: r,
|
|
1431
|
-
children: /* @__PURE__ */ J(E, {
|
|
1432
|
-
ariaLabel: n,
|
|
1433
|
-
text: u.empty,
|
|
1434
|
-
compact: i
|
|
1435
|
-
})
|
|
1436
|
-
});
|
|
1437
|
-
let x = (e) => U(e, b), S = (t) => `${t.label} ${l(t.value)} (${e(x(t.value))})`, C = y.active === null ? null : g[y.active] ?? null, w = C?.key ?? d ?? s, O = (e) => w !== null && w !== e ? " chart-faded" : "";
|
|
1438
|
-
return /* @__PURE__ */ Y("figure", {
|
|
1439
|
-
className: v("chart-stacked", i),
|
|
1440
|
-
"aria-label": n,
|
|
1441
|
-
children: [
|
|
1442
|
-
r && /* @__PURE__ */ J("figcaption", {
|
|
1443
|
-
className: "chart-title",
|
|
1444
|
-
children: r
|
|
1445
|
-
}),
|
|
1446
|
-
/* @__PURE__ */ J("div", {
|
|
1447
|
-
className: `chart-stacked-bar chart-plot chart-plot--x${o ? " chart-plot--pick" : ""}`,
|
|
1448
|
-
role: o ? "button" : "img",
|
|
1449
|
-
"aria-label": C ? S(C) : `${n}: ${t.map(S).join(", ")}`,
|
|
1450
|
-
...y.plotProps,
|
|
1451
|
-
children: g.map((e, t) => /* @__PURE__ */ J("span", {
|
|
1452
|
-
"data-hit": t,
|
|
1453
|
-
className: `chart-stacked-segment${O(e.key)}`,
|
|
1454
|
-
style: {
|
|
1455
|
-
flexGrow: e.value,
|
|
1456
|
-
background: M(e.slot)
|
|
1457
|
-
},
|
|
1458
|
-
"aria-hidden": !0
|
|
1459
|
-
}, e.key))
|
|
1460
|
-
}),
|
|
1461
|
-
/* @__PURE__ */ Y("ul", {
|
|
1462
|
-
ref: p,
|
|
1463
|
-
className: "chart-donut-legend chart-stacked-legend",
|
|
1464
|
-
"aria-label": u.legend,
|
|
1465
|
-
children: [t.slice(0, m).map((t) => /* @__PURE__ */ Y("li", {
|
|
1466
|
-
className: `chart-donut-legend-item${_(t) ? " chart-donut-legend-item--hit" : ""}${s === t.key ? " chart-donut-legend-item--on" : ""}${O(t.key)}`,
|
|
1467
|
-
onMouseEnter: () => f(t.key),
|
|
1468
|
-
onMouseLeave: () => f(null),
|
|
1469
|
-
onClick: _(t) ? () => o(t) : void 0,
|
|
1470
|
-
children: [
|
|
1471
|
-
/* @__PURE__ */ J("span", {
|
|
1472
|
-
className: "chart-swatch",
|
|
1473
|
-
style: { background: M(t.slot) },
|
|
1474
|
-
"aria-hidden": !0
|
|
1475
|
-
}),
|
|
1476
|
-
/* @__PURE__ */ J("span", {
|
|
1477
|
-
className: "chart-donut-legend-label",
|
|
1478
|
-
children: t.label
|
|
1479
|
-
}),
|
|
1480
|
-
/* @__PURE__ */ Y("span", {
|
|
1481
|
-
className: "chart-donut-legend-value",
|
|
1482
|
-
children: [
|
|
1483
|
-
l(t.value),
|
|
1484
|
-
" · ",
|
|
1485
|
-
e(x(t.value))
|
|
1486
|
-
]
|
|
1487
|
-
})
|
|
1488
|
-
]
|
|
1489
|
-
}, t.key)), m < t.length && /* @__PURE__ */ J("li", {
|
|
1490
|
-
className: "chart-donut-legend-more",
|
|
1491
|
-
"data-legend-more": "",
|
|
1492
|
-
children: u.moreValues(l(t.length - m))
|
|
1493
|
-
})]
|
|
1494
|
-
}),
|
|
1495
|
-
/* @__PURE__ */ J(T, { text: C ? S(C) : "" }),
|
|
1496
|
-
y.tooltip(C && /* @__PURE__ */ J(Q, {
|
|
1497
|
-
rows: [{
|
|
1498
|
-
key: C.key,
|
|
1499
|
-
color: M(C.slot),
|
|
1500
|
-
label: C.label,
|
|
1501
|
-
value: l(C.value)
|
|
1502
|
-
}],
|
|
1503
|
-
note: u.shareOf(e(x(C.value)), l(b))
|
|
1504
|
-
}))
|
|
1505
|
-
]
|
|
1506
|
-
});
|
|
1507
|
-
}
|
|
1508
|
-
//#endregion
|
|
1509
|
-
//#region ../../shared-web-ui/src/Charts/Treemap.tsx
|
|
1510
|
-
var Ke = 400;
|
|
1511
|
-
function qe({ nodes: t, ariaLabel: n, title: r, height: a, compact: o = !1, onSelect: s, selected: l = null, ...u }) {
|
|
1512
|
-
let { nf: d, L: f } = B(u), [p, m] = $(), h = m || Ke, g = a ?? (o ? 120 : 220), _ = t.reduce((e, t) => e + Math.max(0, t.value), 0), y = _ > 0 ? c(t, h, g) : [], b = y.filter((e) => !e.node.children?.some((e) => e.value > 0)), x = (e) => e.parent ?? e.node, S = (e) => !!s && x(e).selectable !== !1, C = Z({
|
|
1513
|
-
count: b.length,
|
|
1514
|
-
pick: (e, t, n) => me(e / n.width * h, t / n.height * g, b.map((e) => ({
|
|
1515
|
-
left: e.rect.x,
|
|
1516
|
-
top: e.rect.y,
|
|
1517
|
-
width: e.rect.w,
|
|
1518
|
-
height: e.rect.h
|
|
1519
|
-
}))),
|
|
1520
|
-
start: l === null ? null : b.findIndex((e) => x(e).key === l),
|
|
1521
|
-
onPick: s ? (e) => S(b[e]) && s(x(b[e])) : void 0
|
|
1522
|
-
}), w = C.plotProps.ref, O = W((e) => {
|
|
1523
|
-
p(e), w(e);
|
|
1524
|
-
}, [p, w]);
|
|
1525
|
-
if (_ <= 0) return /* @__PURE__ */ J(D, {
|
|
1526
|
-
title: r,
|
|
1527
|
-
children: /* @__PURE__ */ J(E, {
|
|
1528
|
-
ariaLabel: n,
|
|
1529
|
-
text: f.empty,
|
|
1530
|
-
compact: o
|
|
1531
|
-
})
|
|
1532
|
-
});
|
|
1533
|
-
let k = (t) => `${t.parent ? `${t.parent.label} › ` : ""}${t.node.label} ${d(t.node.value)} (${e(U(t.node.value, _))})`, A = (e) => e.parent ? `${e.parent.key}\u0000${e.node.key}` : e.node.key, j = C.active === null ? null : b[C.active] ?? null, N = (e) => ({
|
|
1534
|
-
left: `${e.rect.x / h * 100}%`,
|
|
1535
|
-
top: `${e.rect.y / g * 100}%`,
|
|
1536
|
-
width: `${e.rect.w / h * 100}%`,
|
|
1537
|
-
height: `${e.rect.h / g * 100}%`
|
|
1538
|
-
});
|
|
1539
|
-
return /* @__PURE__ */ J(D, {
|
|
1540
|
-
title: r,
|
|
1541
|
-
children: /* @__PURE__ */ Y("div", {
|
|
1542
|
-
className: v("chart-treemap", o),
|
|
1543
|
-
role: "group",
|
|
1544
|
-
"aria-label": n,
|
|
1545
|
-
children: [
|
|
1546
|
-
/* @__PURE__ */ J("div", {
|
|
1547
|
-
className: `chart-treemap-box chart-plot${s ? " chart-plot--pick" : ""}`,
|
|
1548
|
-
style: { height: g },
|
|
1549
|
-
role: s ? "button" : "img",
|
|
1550
|
-
"aria-label": j ? k(j) : `${n}: ${b.map(k).join(", ")}`,
|
|
1551
|
-
...C.plotProps,
|
|
1552
|
-
ref: O,
|
|
1553
|
-
children: y.map((e) => {
|
|
1554
|
-
let t = x(e), n = !!e.node.children?.some((e) => e.value > 0), r = e.parent ? e.parent.children.filter((e) => e.value > 0).indexOf(e.node) : 0, a = l !== null && l !== t.key || j !== null && x(j).key !== t.key, o = b.indexOf(e);
|
|
1555
|
-
return /* @__PURE__ */ J("div", {
|
|
1556
|
-
"data-hit": o >= 0 ? o : void 0,
|
|
1557
|
-
className: `chart-treemap-tile${n ? " chart-treemap-tile--group" : ""}${e.parent ? " chart-treemap-tile--child" : ""}${a ? " chart-faded" : ""}${l === t.key ? " chart-treemap-tile--on" : ""}${j === e ? " chart-treemap-tile--active" : ""}`,
|
|
1558
|
-
style: {
|
|
1559
|
-
...N(e),
|
|
1560
|
-
background: M(t.slot),
|
|
1561
|
-
color: i(t.slot),
|
|
1562
|
-
opacity: e.parent ? re(r) : void 0
|
|
1563
|
-
},
|
|
1564
|
-
"aria-hidden": !0,
|
|
1565
|
-
children: e.label && /* @__PURE__ */ Y("span", {
|
|
1566
|
-
className: "chart-treemap-label",
|
|
1567
|
-
children: [/* @__PURE__ */ J("span", {
|
|
1568
|
-
className: "chart-treemap-name",
|
|
1569
|
-
children: e.node.label
|
|
1570
|
-
}), !n && /* @__PURE__ */ J("span", {
|
|
1571
|
-
className: "chart-treemap-count",
|
|
1572
|
-
children: d(e.node.value)
|
|
1573
|
-
})]
|
|
1574
|
-
})
|
|
1575
|
-
}, A(e));
|
|
1576
|
-
})
|
|
1577
|
-
}),
|
|
1578
|
-
/* @__PURE__ */ J(T, { text: j ? k(j) : "" }),
|
|
1579
|
-
C.tooltip(j && /* @__PURE__ */ J(Q, {
|
|
1580
|
-
title: j.parent ? `${j.parent.label} › ${j.node.label}` : j.node.label,
|
|
1581
|
-
rows: [{
|
|
1582
|
-
key: "n",
|
|
1583
|
-
color: M(x(j).slot),
|
|
1584
|
-
label: n,
|
|
1585
|
-
value: d(j.node.value)
|
|
1586
|
-
}],
|
|
1587
|
-
note: f.shareOf(e(U(j.node.value, _)), d(_))
|
|
1588
|
-
}))
|
|
1589
|
-
]
|
|
1590
|
-
})
|
|
1591
|
-
});
|
|
1592
|
-
}
|
|
1593
|
-
//#endregion
|
|
1594
|
-
//#region ../../shared-web-ui/src/Charts/ChartView.tsx
|
|
1595
|
-
function Je({ chart: e, ariaLabel: t, compact: n = !1, height: r, size: i, onSelect: a, selected: o = null, linkAs: s, onLegendCut: c, legend: l = !0, ...u }) {
|
|
1596
|
-
let d = {
|
|
1597
|
-
ariaLabel: t,
|
|
1598
|
-
compact: n,
|
|
1599
|
-
...u
|
|
1600
|
-
}, f = a ? (e) => a(e.key ?? e.label) : void 0;
|
|
1601
|
-
switch (e.kind) {
|
|
1602
|
-
case "columns": return /* @__PURE__ */ J(Fe, {
|
|
1603
|
-
data: e.data,
|
|
1604
|
-
series: e.series,
|
|
1605
|
-
mode: e.mode,
|
|
1606
|
-
legend: l && e.series.length > 1,
|
|
1607
|
-
height: r,
|
|
1608
|
-
onSelect: f,
|
|
1609
|
-
selected: o,
|
|
1610
|
-
...d
|
|
1611
|
-
});
|
|
1612
|
-
case "line": return /* @__PURE__ */ J(He, {
|
|
1613
|
-
data: e.data,
|
|
1614
|
-
series: e.series,
|
|
1615
|
-
area: e.area,
|
|
1616
|
-
height: r,
|
|
1617
|
-
onSelect: f,
|
|
1618
|
-
selected: o,
|
|
1619
|
-
...d
|
|
1620
|
-
});
|
|
1621
|
-
case "bars": return /* @__PURE__ */ J(Te, {
|
|
1622
|
-
data: e.data,
|
|
1623
|
-
series: e.series,
|
|
1624
|
-
linkAs: s,
|
|
1625
|
-
onSelect: f,
|
|
1626
|
-
selected: o,
|
|
1627
|
-
...d
|
|
1628
|
-
});
|
|
1629
|
-
case "stacked": return /* @__PURE__ */ J(Ge, {
|
|
1630
|
-
slices: e.slices,
|
|
1631
|
-
onLegendCut: c,
|
|
1632
|
-
onSelect: f,
|
|
1633
|
-
selected: o,
|
|
1634
|
-
...d
|
|
1635
|
-
});
|
|
1636
|
-
case "donut":
|
|
1637
|
-
case "pie": return /* @__PURE__ */ J(Re, {
|
|
1638
|
-
variant: e.kind,
|
|
1639
|
-
slices: e.slices,
|
|
1640
|
-
size: i,
|
|
1641
|
-
legend: l,
|
|
1642
|
-
onLegendCut: c,
|
|
1643
|
-
onSelect: f,
|
|
1644
|
-
selected: o,
|
|
1645
|
-
...d
|
|
1646
|
-
});
|
|
1647
|
-
case "treemap": return /* @__PURE__ */ J(qe, {
|
|
1648
|
-
nodes: e.nodes,
|
|
1649
|
-
height: r,
|
|
1650
|
-
onSelect: f,
|
|
1651
|
-
selected: o,
|
|
1652
|
-
...d
|
|
1653
|
-
});
|
|
1654
|
-
case "calendar": return /* @__PURE__ */ J(ke, {
|
|
1655
|
-
days: e.days,
|
|
1656
|
-
onSelect: a ? (e) => a(e.day) : void 0,
|
|
1657
|
-
selected: o,
|
|
1658
|
-
...d
|
|
1659
|
-
});
|
|
1660
|
-
case "funnel": return /* @__PURE__ */ J(ze, {
|
|
1661
|
-
steps: e.steps,
|
|
1662
|
-
onSelect: f,
|
|
1663
|
-
selected: o,
|
|
1664
|
-
...d
|
|
1665
|
-
});
|
|
1666
|
-
case "gauge": {
|
|
1667
|
-
let t = e.rows[0];
|
|
1668
|
-
return /* @__PURE__ */ J(Be, {
|
|
1669
|
-
value: t.value,
|
|
1670
|
-
total: t.total,
|
|
1671
|
-
color: t.color,
|
|
1672
|
-
variant: e.variant,
|
|
1673
|
-
label: n ? void 0 : t.label,
|
|
1674
|
-
...d
|
|
1675
|
-
});
|
|
1676
|
-
}
|
|
1677
|
-
case "progress": {
|
|
1678
|
-
let t = e.rows[0];
|
|
1679
|
-
return /* @__PURE__ */ J(We, {
|
|
1680
|
-
value: t.value,
|
|
1681
|
-
total: t.total,
|
|
1682
|
-
color: t.color,
|
|
1683
|
-
label: n ? void 0 : t.label,
|
|
1684
|
-
...d
|
|
1685
|
-
});
|
|
1686
|
-
}
|
|
1687
|
-
case "number": return /* @__PURE__ */ J(Ue, {
|
|
1688
|
-
value: e.value,
|
|
1689
|
-
points: e.points,
|
|
1690
|
-
current: e.current,
|
|
1691
|
-
previous: e.previous,
|
|
1692
|
-
good: e.good,
|
|
1693
|
-
slot: e.slot,
|
|
1694
|
-
...d
|
|
1695
|
-
});
|
|
1696
|
-
}
|
|
1697
|
-
}
|
|
1698
|
-
//#endregion
|
|
1699
|
-
//#region ../../shared-web-ui/src/Charts/Chart.tsx
|
|
1700
|
-
function Ye({ data: e, as: t, offer: n, ariaLabel: r, title: i, compact: a = !1, height: o, size: c, onSelect: l, selected: f = null, linkAs: p, onChartChange: m, legend: h, ...g }) {
|
|
1701
|
-
let { L: _ } = B(g), [y, b] = q(void 0), x = n ? d(e).filter((e) => n.includes(e)) : [], S = s(e, y ?? t, n), C = u(e, S, _), w = (e) => {
|
|
1702
|
-
b(e), m?.(e);
|
|
1703
|
-
}, T = /* @__PURE__ */ J(Je, {
|
|
1704
|
-
chart: C,
|
|
1705
|
-
ariaLabel: r,
|
|
1706
|
-
compact: a,
|
|
1707
|
-
height: o,
|
|
1708
|
-
size: c,
|
|
1709
|
-
onSelect: l,
|
|
1710
|
-
selected: f,
|
|
1711
|
-
linkAs: p,
|
|
1712
|
-
legend: h,
|
|
1713
|
-
...g
|
|
1714
|
-
});
|
|
1715
|
-
return x.length < 2 && (i == null || i === "") ? T : /* @__PURE__ */ Y("figure", {
|
|
1716
|
-
className: v("chart-titled chart-chart", a),
|
|
1717
|
-
children: [(i || x.length > 1) && /* @__PURE__ */ Y("figcaption", {
|
|
1718
|
-
className: "chart-chart-head",
|
|
1719
|
-
children: [i && /* @__PURE__ */ J("span", {
|
|
1720
|
-
className: "chart-title",
|
|
1721
|
-
children: i
|
|
1722
|
-
}), x.length > 1 && /* @__PURE__ */ J("span", {
|
|
1723
|
-
className: "chart-choice",
|
|
1724
|
-
role: "group",
|
|
1725
|
-
"aria-label": `${_.chartChoice} — ${r}`,
|
|
1726
|
-
children: x.map((e) => /* @__PURE__ */ J("button", {
|
|
1727
|
-
type: "button",
|
|
1728
|
-
className: "chart-choice-button",
|
|
1729
|
-
"aria-pressed": e === S,
|
|
1730
|
-
title: _.kinds[e],
|
|
1731
|
-
"aria-label": _.kinds[e],
|
|
1732
|
-
onClick: () => w(e),
|
|
1733
|
-
children: /* @__PURE__ */ J(de, { kind: e })
|
|
1734
|
-
}, e))
|
|
1735
|
-
})]
|
|
1736
|
-
}), T]
|
|
1737
|
-
});
|
|
1738
|
-
}
|
|
1739
|
-
//#endregion
|
|
1740
|
-
//#region ../../shared-web-ui/src/Charts/ChartTable.tsx
|
|
1741
|
-
function Xe({ data: e, series: t, firstHeader: n, ...r }) {
|
|
1742
|
-
let { nf: i } = B(r);
|
|
1743
|
-
return /* @__PURE__ */ J("div", {
|
|
1744
|
-
className: v("chart-table"),
|
|
1745
|
-
children: /* @__PURE__ */ Y("table", { children: [/* @__PURE__ */ J("thead", { children: /* @__PURE__ */ Y("tr", { children: [/* @__PURE__ */ J("th", {
|
|
1746
|
-
scope: "col",
|
|
1747
|
-
children: n
|
|
1748
|
-
}), t.map((e) => /* @__PURE__ */ J("th", {
|
|
1749
|
-
scope: "col",
|
|
1750
|
-
className: "chart-table-number",
|
|
1751
|
-
children: e.label
|
|
1752
|
-
}, e.key))] }) }), /* @__PURE__ */ J("tbody", { children: e.map((e) => /* @__PURE__ */ Y("tr", { children: [/* @__PURE__ */ J("td", { children: e.fullLabel ?? e.label }), t.map((t) => /* @__PURE__ */ J("td", {
|
|
1753
|
-
className: "chart-table-number",
|
|
1754
|
-
children: i(e.values[t.key] ?? 0)
|
|
1755
|
-
}, t.key))] }, H(e))) })] })
|
|
1756
|
-
});
|
|
1757
|
-
}
|
|
1758
|
-
//#endregion
|
|
1759
|
-
export { pe as A, ge as C, ye as D, fe as E, me as O, Z as S, he as T, $ as _, Ge as a, Se as b, He as c, Re as d, Fe as f, Ee as g, Oe as h, qe as i, de as j, _e as k, Be as l, ke as m, Ye as n, We as o, Ae as p, Je as r, Ue as s, Xe as t, ze as u, Te as v, ve as w, Ce as x, Q as y };
|