@mailstep/design-system 0.8.52 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +22 -6
- package/ui/Blocks/CommonGrid/components/ActionHead/ActionHead.js +1 -1
- package/ui/Blocks/CommonGrid/hooks/useManageColumn.js +1 -1
- package/ui/Blocks/Header/components/UserMenu/index.js +1 -1
- package/ui/Blocks/Header/styles.js +1 -1
- package/ui/Elements/Avatar/Avatar.js +1 -1
- package/ui/Elements/Avatar/styles.js +1 -1
- package/ui/Elements/Button/styles.js +1 -1
- package/ui/Modules/Dashboard/Hoc/LoadingBoundary.d.ts +8 -0
- package/ui/Modules/Dashboard/Hoc/LoadingBoundary.js +11 -0
- package/ui/Modules/Dashboard/Hoc/index.d.ts +3 -0
- package/ui/Modules/Dashboard/Hoc/index.js +4 -0
- package/ui/Modules/Dashboard/Hoc/storybook/withReduxProvider.d.ts +4 -0
- package/ui/Modules/Dashboard/Hoc/storybook/withReduxProvider.js +14 -0
- package/ui/Modules/Dashboard/Hoc/withConfig.d.ts +7 -0
- package/ui/Modules/Dashboard/Hoc/withConfig.js +22 -0
- package/ui/Modules/Dashboard/Hoc/withFetch.d.ts +26 -0
- package/ui/Modules/Dashboard/Hoc/withFetch.js +50 -0
- package/ui/Modules/Dashboard/Hoc/withProps.d.ts +4 -0
- package/ui/Modules/Dashboard/Hoc/withProps.js +25 -0
- package/ui/Modules/Dashboard/assets/BarChartPreview.png +0 -0
- package/ui/Modules/Dashboard/assets/ColorBoxPreview.png +0 -0
- package/ui/Modules/Dashboard/assets/HorizontalBarPreview.png +0 -0
- package/ui/Modules/Dashboard/assets/NumberBoxPreview.png +0 -0
- package/ui/Modules/Dashboard/assets/PieChartPreview.png +0 -0
- package/ui/Modules/Dashboard/assets/TablePreview.png +0 -0
- package/ui/Modules/Dashboard/assets/TextBoxPreview.png +0 -0
- package/ui/Modules/Dashboard/assets/move.svg +18 -0
- package/ui/Modules/Dashboard/components/Config/MultiConfig.d.ts +6 -0
- package/ui/Modules/Dashboard/components/Config/MultiConfig.js +51 -0
- package/ui/Modules/Dashboard/components/Config/components/CommonConfig.d.ts +4 -0
- package/ui/Modules/Dashboard/components/Config/components/CommonConfig.js +20 -0
- package/ui/Modules/Dashboard/components/Config/components/InputConfig.d.ts +5 -0
- package/ui/Modules/Dashboard/components/Config/components/InputConfig.js +104 -0
- package/ui/Modules/Dashboard/components/Config/types.d.ts +1 -0
- package/ui/Modules/Dashboard/components/Config/types.js +1 -0
- package/ui/Modules/Dashboard/components/Dashboard/Dashboard.d.ts +9 -0
- package/ui/Modules/Dashboard/components/Dashboard/Dashboard.js +16 -0
- package/ui/Modules/Dashboard/components/Dashboard/DashboardContainer.d.ts +4 -0
- package/ui/Modules/Dashboard/components/Dashboard/DashboardContainer.js +31 -0
- package/ui/Modules/Dashboard/components/Dashboard/components/Body.d.ts +7 -0
- package/ui/Modules/Dashboard/components/Dashboard/components/Body.js +7 -0
- package/ui/Modules/Dashboard/components/Dashboard/components/HandleChange.d.ts +6 -0
- package/ui/Modules/Dashboard/components/Dashboard/components/HandleChange.js +25 -0
- package/ui/Modules/Dashboard/components/Dashboard/components/LayoutErrorBoundary.d.ts +13 -0
- package/ui/Modules/Dashboard/components/Dashboard/components/LayoutErrorBoundary.js +19 -0
- package/ui/Modules/Dashboard/components/Dashboard/dashboard2.css +124 -0
- package/ui/Modules/Dashboard/components/Dashboard/index.d.ts +2 -0
- package/ui/Modules/Dashboard/components/Dashboard/index.js +5 -0
- package/ui/Modules/Dashboard/components/Header/Header.d.ts +8 -0
- package/ui/Modules/Dashboard/components/Header/Header.js +9 -0
- package/ui/Modules/Dashboard/components/Header/index.d.ts +2 -0
- package/ui/Modules/Dashboard/components/Header/index.js +5 -0
- package/ui/Modules/Dashboard/components/Layout/Layout.d.ts +18 -0
- package/ui/Modules/Dashboard/components/Layout/Layout.js +39 -0
- package/ui/Modules/Dashboard/components/Layout/LayoutContainer.d.ts +7 -0
- package/ui/Modules/Dashboard/components/Layout/LayoutContainer.js +40 -0
- package/ui/Modules/Dashboard/components/Layout/components/Item/Item.d.ts +18 -0
- package/ui/Modules/Dashboard/components/Layout/components/Item/Item.js +79 -0
- package/ui/Modules/Dashboard/components/Layout/components/Item/ItemContainer.d.ts +11 -0
- package/ui/Modules/Dashboard/components/Layout/components/Item/ItemContainer.js +64 -0
- package/ui/Modules/Dashboard/components/Layout/components/Item/WidgetErrorBoundary.d.ts +14 -0
- package/ui/Modules/Dashboard/components/Layout/components/Item/WidgetErrorBoundary.js +28 -0
- package/ui/Modules/Dashboard/components/Layout/components/Item/index.d.ts +2 -0
- package/ui/Modules/Dashboard/components/Layout/components/Item/index.js +5 -0
- package/ui/Modules/Dashboard/components/Layout/components/ItemConfig/ItemConfig.d.ts +13 -0
- package/ui/Modules/Dashboard/components/Layout/components/ItemConfig/ItemConfig.js +18 -0
- package/ui/Modules/Dashboard/components/Layout/components/ItemConfig/ItemConfigControls.d.ts +8 -0
- package/ui/Modules/Dashboard/components/Layout/components/ItemConfig/ItemConfigControls.js +31 -0
- package/ui/Modules/Dashboard/components/Layout/components/ItemConfig/index.d.ts +2 -0
- package/ui/Modules/Dashboard/components/Layout/components/ItemConfig/index.js +5 -0
- package/ui/Modules/Dashboard/components/Layout/components/ItemHeader/ItemHeader.d.ts +12 -0
- package/ui/Modules/Dashboard/components/Layout/components/ItemHeader/ItemHeader.js +27 -0
- package/ui/Modules/Dashboard/components/Layout/components/ItemHeader/index.d.ts +2 -0
- package/ui/Modules/Dashboard/components/Layout/components/ItemHeader/index.js +5 -0
- package/ui/Modules/Dashboard/components/Layout/index.d.ts +2 -0
- package/ui/Modules/Dashboard/components/Layout/index.js +5 -0
- package/ui/Modules/Dashboard/components/NoData/NoData.d.ts +2 -0
- package/ui/Modules/Dashboard/components/NoData/NoData.js +14 -0
- package/ui/Modules/Dashboard/components/NoData/index.d.ts +2 -0
- package/ui/Modules/Dashboard/components/NoData/index.js +5 -0
- package/ui/Modules/Dashboard/components/Picker/Picker.d.ts +8 -0
- package/ui/Modules/Dashboard/components/Picker/Picker.js +38 -0
- package/ui/Modules/Dashboard/components/Picker/PickerContainer.d.ts +7 -0
- package/ui/Modules/Dashboard/components/Picker/PickerContainer.js +38 -0
- package/ui/Modules/Dashboard/components/Picker/components/PickerItem.d.ts +8 -0
- package/ui/Modules/Dashboard/components/Picker/components/PickerItem.js +25 -0
- package/ui/Modules/Dashboard/components/Picker/index.d.ts +2 -0
- package/ui/Modules/Dashboard/components/Picker/index.js +5 -0
- package/ui/Modules/Dashboard/components/Text/Text.d.ts +7 -0
- package/ui/Modules/Dashboard/components/Text/Text.js +14 -0
- package/ui/Modules/Dashboard/components/Text/index.d.ts +1 -0
- package/ui/Modules/Dashboard/components/Text/index.js +2 -0
- package/ui/Modules/Dashboard/components/Widgets/BarChart/BarChart.d.ts +19 -0
- package/ui/Modules/Dashboard/components/Widgets/BarChart/BarChart.js +52 -0
- package/ui/Modules/Dashboard/components/Widgets/BarChart/Config.d.ts +1 -0
- package/ui/Modules/Dashboard/components/Widgets/BarChart/Config.js +5 -0
- package/ui/Modules/Dashboard/components/Widgets/BarChart/index.d.ts +4 -0
- package/ui/Modules/Dashboard/components/Widgets/BarChart/index.js +6 -0
- package/ui/Modules/Dashboard/components/Widgets/BarChart/styles.d.ts +12 -0
- package/ui/Modules/Dashboard/components/Widgets/BarChart/styles.js +39 -0
- package/ui/Modules/Dashboard/components/Widgets/ColorBox/ColorBox.d.ts +7 -0
- package/ui/Modules/Dashboard/components/Widgets/ColorBox/ColorBox.js +21 -0
- package/ui/Modules/Dashboard/components/Widgets/ColorBox/Config.d.ts +3 -0
- package/ui/Modules/Dashboard/components/Widgets/ColorBox/Config.js +23 -0
- package/ui/Modules/Dashboard/components/Widgets/ColorBox/index.d.ts +4 -0
- package/ui/Modules/Dashboard/components/Widgets/ColorBox/index.js +6 -0
- package/ui/Modules/Dashboard/components/Widgets/EmptyWidget/EmptyWidget.d.ts +7 -0
- package/ui/Modules/Dashboard/components/Widgets/EmptyWidget/EmptyWidget.js +10 -0
- package/ui/Modules/Dashboard/components/Widgets/EmptyWidget/index.d.ts +2 -0
- package/ui/Modules/Dashboard/components/Widgets/EmptyWidget/index.js +5 -0
- package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/Config.d.ts +1 -0
- package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/Config.js +5 -0
- package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/HorizontalBar.d.ts +4 -0
- package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/HorizontalBar.js +38 -0
- package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/components/LabelsLine.d.ts +8 -0
- package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/components/LabelsLine.js +14 -0
- package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/components/ProgressLine.d.ts +7 -0
- package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/components/ProgressLine.js +14 -0
- package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/index.d.ts +4 -0
- package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/index.js +6 -0
- package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/storybook.sample.d.ts +2 -0
- package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/storybook.sample.js +33 -0
- package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/styles.d.ts +18 -0
- package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/styles.js +58 -0
- package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/types.d.ts +13 -0
- package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/types.js +1 -0
- package/ui/Modules/Dashboard/components/Widgets/NumberBox/Config.d.ts +4 -0
- package/ui/Modules/Dashboard/components/Widgets/NumberBox/Config.js +38 -0
- package/ui/Modules/Dashboard/components/Widgets/NumberBox/NumberBox.d.ts +5 -0
- package/ui/Modules/Dashboard/components/Widgets/NumberBox/NumberBox.js +38 -0
- package/ui/Modules/Dashboard/components/Widgets/NumberBox/index.d.ts +4 -0
- package/ui/Modules/Dashboard/components/Widgets/NumberBox/index.js +6 -0
- package/ui/Modules/Dashboard/components/Widgets/NumberBox/styles.d.ts +4 -0
- package/ui/Modules/Dashboard/components/Widgets/NumberBox/styles.js +25 -0
- package/ui/Modules/Dashboard/components/Widgets/PieChart/Config.d.ts +1 -0
- package/ui/Modules/Dashboard/components/Widgets/PieChart/Config.js +5 -0
- package/ui/Modules/Dashboard/components/Widgets/PieChart/PieChart.d.ts +21 -0
- package/ui/Modules/Dashboard/components/Widgets/PieChart/PieChart.js +59 -0
- package/ui/Modules/Dashboard/components/Widgets/PieChart/components/CenteredMetric.d.ts +10 -0
- package/ui/Modules/Dashboard/components/Widgets/PieChart/components/CenteredMetric.js +24 -0
- package/ui/Modules/Dashboard/components/Widgets/PieChart/index.d.ts +4 -0
- package/ui/Modules/Dashboard/components/Widgets/PieChart/index.js +6 -0
- package/ui/Modules/Dashboard/components/Widgets/PieChart/styles.d.ts +14 -0
- package/ui/Modules/Dashboard/components/Widgets/PieChart/styles.js +47 -0
- package/ui/Modules/Dashboard/components/Widgets/Table/Config.d.ts +9 -0
- package/ui/Modules/Dashboard/components/Widgets/Table/Config.js +87 -0
- package/ui/Modules/Dashboard/components/Widgets/Table/Table.d.ts +4 -0
- package/ui/Modules/Dashboard/components/Widgets/Table/Table.js +93 -0
- package/ui/Modules/Dashboard/components/Widgets/Table/components/IconLabelCell.d.ts +8 -0
- package/ui/Modules/Dashboard/components/Widgets/Table/components/IconLabelCell.js +19 -0
- package/ui/Modules/Dashboard/components/Widgets/Table/components/PaginatorList.d.ts +9 -0
- package/ui/Modules/Dashboard/components/Widgets/Table/components/PaginatorList.js +31 -0
- package/ui/Modules/Dashboard/components/Widgets/Table/components/PaginatorLocation.d.ts +8 -0
- package/ui/Modules/Dashboard/components/Widgets/Table/components/PaginatorLocation.js +15 -0
- package/ui/Modules/Dashboard/components/Widgets/Table/components/TableCell.d.ts +6 -0
- package/ui/Modules/Dashboard/components/Widgets/Table/components/TableCell.js +33 -0
- package/ui/Modules/Dashboard/components/Widgets/Table/hooks/useCondition.d.ts +10 -0
- package/ui/Modules/Dashboard/components/Widgets/Table/hooks/useCondition.js +27 -0
- package/ui/Modules/Dashboard/components/Widgets/Table/hooks/usePages.d.ts +17 -0
- package/ui/Modules/Dashboard/components/Widgets/Table/hooks/usePages.js +27 -0
- package/ui/Modules/Dashboard/components/Widgets/Table/hooks/useSort.d.ts +10 -0
- package/ui/Modules/Dashboard/components/Widgets/Table/hooks/useSort.js +31 -0
- package/ui/Modules/Dashboard/components/Widgets/Table/index.d.ts +5 -0
- package/ui/Modules/Dashboard/components/Widgets/Table/index.js +7 -0
- package/ui/Modules/Dashboard/components/Widgets/Table/storybook.sample.d.ts +73 -0
- package/ui/Modules/Dashboard/components/Widgets/Table/storybook.sample.js +211 -0
- package/ui/Modules/Dashboard/components/Widgets/Table/styles.d.ts +23 -0
- package/ui/Modules/Dashboard/components/Widgets/Table/styles.js +69 -0
- package/ui/Modules/Dashboard/components/Widgets/Table/types.d.ts +52 -0
- package/ui/Modules/Dashboard/components/Widgets/Table/types.js +1 -0
- package/ui/Modules/Dashboard/components/Widgets/TextBox/TextBox.d.ts +10 -0
- package/ui/Modules/Dashboard/components/Widgets/TextBox/TextBox.js +12 -0
- package/ui/Modules/Dashboard/components/Widgets/TextBox/index.d.ts +3 -0
- package/ui/Modules/Dashboard/components/Widgets/TextBox/index.js +5 -0
- package/ui/Modules/Dashboard/components/Widgets/index.d.ts +11 -0
- package/ui/Modules/Dashboard/components/Widgets/index.js +108 -0
- package/ui/Modules/Dashboard/components/Widgets/utils/generic.d.ts +5 -0
- package/ui/Modules/Dashboard/components/Widgets/utils/generic.js +20 -0
- package/ui/Modules/Dashboard/components/Widgets/utils/helpers.d.ts +3 -0
- package/ui/Modules/Dashboard/components/Widgets/utils/helpers.js +25 -0
- package/ui/Modules/Dashboard/components/Widgets/utils/legends.d.ts +20 -0
- package/ui/Modules/Dashboard/components/Widgets/utils/legends.js +57 -0
- package/ui/Modules/Dashboard/context/ComponentContext.d.ts +5 -0
- package/ui/Modules/Dashboard/context/ComponentContext.js +15 -0
- package/ui/Modules/Dashboard/context/LangContext.d.ts +3 -0
- package/ui/Modules/Dashboard/context/LangContext.js +5 -0
- package/ui/Modules/Dashboard/errors/ErrorMessage.d.ts +7 -0
- package/ui/Modules/Dashboard/errors/ErrorMessage.js +12 -0
- package/ui/Modules/Dashboard/errors/WidgetError.d.ts +5 -0
- package/ui/Modules/Dashboard/errors/WidgetError.js +10 -0
- package/ui/Modules/Dashboard/hooks/usePrevious.d.ts +5 -0
- package/ui/Modules/Dashboard/hooks/usePrevious.js +14 -0
- package/ui/Modules/Dashboard/hooks/useRefWithCallback.d.ts +2 -0
- package/ui/Modules/Dashboard/hooks/useRefWithCallback.js +16 -0
- package/ui/Modules/Dashboard/hooks/useResize.d.ts +6 -0
- package/ui/Modules/Dashboard/hooks/useResize.js +19 -0
- package/ui/Modules/Dashboard/index.d.ts +7 -0
- package/ui/Modules/Dashboard/index.js +12 -0
- package/ui/Modules/Dashboard/locale/cs.d.ts +24 -0
- package/ui/Modules/Dashboard/locale/cs.js +26 -0
- package/ui/Modules/Dashboard/locale/en.d.ts +24 -0
- package/ui/Modules/Dashboard/locale/en.js +26 -0
- package/ui/Modules/Dashboard/locale/index.d.ts +4 -0
- package/ui/Modules/Dashboard/locale/index.js +13 -0
- package/ui/Modules/Dashboard/locale/it.d.ts +24 -0
- package/ui/Modules/Dashboard/locale/it.js +26 -0
- package/ui/Modules/Dashboard/locale/uk.d.ts +24 -0
- package/ui/Modules/Dashboard/locale/uk.js +26 -0
- package/ui/Modules/Dashboard/store/reducers/index.d.ts +9 -0
- package/ui/Modules/Dashboard/store/reducers/index.js +6 -0
- package/ui/Modules/Dashboard/store/reducers/widgetListReducer.d.ts +41 -0
- package/ui/Modules/Dashboard/store/reducers/widgetListReducer.js +76 -0
- package/ui/Modules/Dashboard/stories/storybook.sample.d.ts +50 -0
- package/ui/Modules/Dashboard/stories/storybook.sample.js +237 -0
- package/ui/Modules/Dashboard/styles.d.ts +63 -0
- package/ui/Modules/Dashboard/styles.js +358 -0
- package/ui/Modules/Dashboard/types.d.ts +185 -0
- package/ui/Modules/Dashboard/types.js +1 -0
- package/ui/Modules/index.d.ts +1 -0
- package/ui/Modules/index.js +8 -0
- package/ui/ThemeProvider/themes/index.d.ts +224 -0
- package/ui/ThemeProvider/themes/index.js +3 -1
- package/ui/ThemeProvider/themes/mailwiseDark.d.ts +225 -0
- package/ui/ThemeProvider/themes/mailwiseDark.js +16 -0
- package/ui/ThemeProvider/types.d.ts +1 -1
- package/ui/Blocks/CommonGrid/storybook/stories/complexWithPaginationAndRedux.stories.d.ts +0 -41
- package/ui/Blocks/CommonGrid/storybook/stories/default.stories.d.ts +0 -6
- package/ui/Blocks/CommonGrid/storybook/stories/gridStates.stories.d.ts +0 -8
- package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNoScrollLayout.stories.d.ts +0 -10
- package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNormalLayout.stories.d.ts +0 -10
- package/ui/Blocks/CommonGrid/storybook/stories/styledCommonGrid.stories.d.ts +0 -6
- package/ui/Blocks/CommonGrid/storybook/stories/withCustomGridActions.stories.d.ts +0 -10
- package/ui/Blocks/CommonGrid/storybook/stories/withForcedCheckboxes.stories.d.ts +0 -14
- package/ui/Blocks/CommonGrid/storybook/stories/withQuickFilter.stories.d.ts +0 -11
- package/ui/Blocks/CornerDialog/stories/CornerDialog.stories.d.ts +0 -13
- package/ui/Blocks/Header/stories/Header.stories.d.ts +0 -52
- package/ui/Blocks/HidePrint/stories/HidePrint.stories.d.ts +0 -12
- package/ui/Blocks/ImageList/stories/ImageList.stories.d.ts +0 -14
- package/ui/Blocks/LanguageSwitch/stories/LanguageSwith.stories.d.ts +0 -10
- package/ui/Blocks/LightBox/stories/LightBox.stories.d.ts +0 -10
- package/ui/Blocks/LoginPage/stories/LoginPage.stories.d.ts +0 -10
- package/ui/Blocks/Modal/stories/Modal.stories.d.ts +0 -28
- package/ui/Blocks/Popover/stories/Popover.stories.d.ts +0 -16
- package/ui/Blocks/Scheduler/stories/Scheduler.stories.d.ts +0 -7
- package/ui/Blocks/SideMenu/stories/SideMenu.stories.d.ts +0 -11
- package/ui/Blocks/Stepper/stories/Stepper.stories.d.ts +0 -9
- package/ui/Blocks/Table/stories/Table.stories.d.ts +0 -12
- package/ui/Blocks/Tabs/stories/Tabs.stories.d.ts +0 -12
- package/ui/Elements/Alert/stories/Alert.stories.d.ts +0 -17
- package/ui/Elements/AsyncSelect/stories/AsyncSelect.stories.d.ts +0 -10
- package/ui/Elements/Avatar/stories/Avatar.stories.d.ts +0 -11
- package/ui/Elements/Badge/stories/Badge.stories.d.ts +0 -12
- package/ui/Elements/BarChartSymbol/stories/BarChartSymbol.stories.d.ts +0 -12
- package/ui/Elements/BorderedBox/stories/BorderedBox.stories.d.ts +0 -10
- package/ui/Elements/Button/stories/Button.stories.d.ts +0 -28
- package/ui/Elements/Card/stories/Card.stories.d.ts +0 -13
- package/ui/Elements/CheckedCircle/storries/CheckedCircle.stories.d.ts +0 -16
- package/ui/Elements/DatePicker/stories/DatePicker.stories.d.ts +0 -11
- package/ui/Elements/Dropdown/stories/Dropdown.stories.d.ts +0 -10
- package/ui/Elements/DropdownMenu/stories/DropdownMenu.stories.d.ts +0 -10
- package/ui/Elements/DropdownSelect/stories/DropdownSelect.stories.d.ts +0 -22
- package/ui/Elements/ErrorMessage/stories/ErrorMessage.stories.d.ts +0 -11
- package/ui/Elements/HighlightBox/stories/HighlightBox.stories.d.ts +0 -31
- package/ui/Elements/Icon/stories/BadgeIcon.stories.d.ts +0 -28
- package/ui/Elements/Icon/stories/Icon.stories.d.ts +0 -15
- package/ui/Elements/Image/stories/Image.stories.d.ts +0 -13
- package/ui/Elements/Label/stories/Label.stories.d.ts +0 -13
- package/ui/Elements/Line/stories/Line.stories.d.ts +0 -16
- package/ui/Elements/Link/stories/Link.stories.d.ts +0 -30
- package/ui/Elements/Logo/stories/Logo.stories.d.ts +0 -37
- package/ui/Elements/Pagination/stories/Pagination.stories.d.ts +0 -13
- package/ui/Elements/Portal/stories/Portal.stories.d.ts +0 -11
- package/ui/Elements/ProgressBar/stories/ProgressBar.stories.d.ts +0 -18
- package/ui/Elements/Select/stories/Select.stories.d.ts +0 -9
- package/ui/Elements/SimpleLink/stories/SimpleLink.stories.d.ts +0 -13
- package/ui/Elements/SingleSelect/stories/SingleSelect.stories.d.ts +0 -10
- package/ui/Elements/SpaceAround/stories/SpaceAround.stories.d.ts +0 -11
- package/ui/Elements/Spinner/stories/Spinner.stories.d.ts +0 -19
- package/ui/Elements/Table/stories/Table.stories.d.ts +0 -8
- package/ui/Elements/Tag/stories/Tag.stories.d.ts +0 -19
- package/ui/Elements/Text/stories/Text.stories.d.ts +0 -15
- package/ui/Elements/Toast/stories/Toast.stories.d.ts +0 -13
- package/ui/Elements/Toggle/stories/Toggle.stories.d.ts +0 -16
- package/ui/Elements/Tooltip/stories/Tooltip.stories.d.ts +0 -10
- package/ui/Elements/Typography/stories/Typography.stories.d.ts +0 -20
- package/ui/Forms/Checkbox/stories/Checkbox.stories.d.ts +0 -13
- package/ui/Forms/Input/stories/Input.stories.d.ts +0 -18
- package/ui/Forms/RadioButton/stories/RadioButton.stories.d.ts +0 -13
- package/ui/utils/KeyPress/KeyPress.stories.d.ts +0 -10
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
interface ItemConfigProps {
|
|
3
|
+
onRemove: () => void;
|
|
4
|
+
onSave: () => void;
|
|
5
|
+
onCancel: () => void;
|
|
6
|
+
}
|
|
7
|
+
declare const ItemConfigControls: ({ onCancel, onSave, onRemove }: ItemConfigProps) => JSX.Element;
|
|
8
|
+
export default ItemConfigControls;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import styles_default from "../../../../styles.js";
|
|
2
|
+
import Text from "../../../Text/Text.js";
|
|
3
|
+
import ComponentContext from "../../../../context/ComponentContext.js";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { x } from "@xstyled/styled-components";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
//#region packages/ui/Modules/Dashboard/components/Layout/components/ItemConfig/ItemConfigControls.tsx
|
|
8
|
+
const ItemConfigControls = ({ onCancel, onSave, onRemove }) => {
|
|
9
|
+
const { Button } = React.useContext(ComponentContext);
|
|
10
|
+
return /* @__PURE__ */ jsxs(styles_default.WidgetConfigButtons, { children: [/* @__PURE__ */ jsx(Button, {
|
|
11
|
+
onClick: onRemove,
|
|
12
|
+
children: /* @__PURE__ */ jsx(Text, { code: "buttons.removeWidget" })
|
|
13
|
+
}), /* @__PURE__ */ jsxs(x.div, {
|
|
14
|
+
display: "flex",
|
|
15
|
+
gap: "8px",
|
|
16
|
+
children: [
|
|
17
|
+
/* @__PURE__ */ jsx(Button, {
|
|
18
|
+
onClick: onCancel,
|
|
19
|
+
appearance: "secondary",
|
|
20
|
+
children: /* @__PURE__ */ jsx(Text, { code: "buttons.cancel" })
|
|
21
|
+
}),
|
|
22
|
+
/* @__PURE__ */ jsx(Button, {
|
|
23
|
+
onClick: onSave,
|
|
24
|
+
children: /* @__PURE__ */ jsx(Text, { code: "buttons.save" })
|
|
25
|
+
}),
|
|
26
|
+
" "
|
|
27
|
+
]
|
|
28
|
+
})] });
|
|
29
|
+
};
|
|
30
|
+
//#endregion
|
|
31
|
+
export { ItemConfigControls as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import type { JSX } from 'react';
|
|
3
|
+
import { WidgetDefinition, WidgetConfig } from '../../../../types';
|
|
4
|
+
type DashboardItemProps = {
|
|
5
|
+
widget: WidgetDefinition;
|
|
6
|
+
config: WidgetConfig;
|
|
7
|
+
toggleConfigOpen: () => void;
|
|
8
|
+
dragHandleClassName: string;
|
|
9
|
+
headerRef: RefObject<HTMLDivElement>;
|
|
10
|
+
};
|
|
11
|
+
declare const ItemHeader: ({ widget, config, toggleConfigOpen, dragHandleClassName, headerRef, }: DashboardItemProps) => JSX.Element;
|
|
12
|
+
export default ItemHeader;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import styles_default from "../../../../styles.js";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import MoveSvg from "../../../../assets/move.svg";
|
|
4
|
+
//#region packages/ui/Modules/Dashboard/components/Layout/components/ItemHeader/ItemHeader.tsx
|
|
5
|
+
const ItemHeader = ({ widget, config, toggleConfigOpen, dragHandleClassName, headerRef }) => {
|
|
6
|
+
const name = config?.name || widget.name;
|
|
7
|
+
const widgetIcon = widget.icon || null;
|
|
8
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
9
|
+
ref: headerRef,
|
|
10
|
+
children: [
|
|
11
|
+
/* @__PURE__ */ jsx(styles_default.ItemMoveWrapper, {
|
|
12
|
+
className: dragHandleClassName,
|
|
13
|
+
children: /* @__PURE__ */ jsx("img", {
|
|
14
|
+
src: MoveSvg,
|
|
15
|
+
alt: "move-icon"
|
|
16
|
+
})
|
|
17
|
+
}),
|
|
18
|
+
/* @__PURE__ */ jsx(styles_default.ItemPanelButton, {
|
|
19
|
+
onClick: toggleConfigOpen,
|
|
20
|
+
children: "⋯"
|
|
21
|
+
}),
|
|
22
|
+
name && /* @__PURE__ */ jsxs(styles_default.ItemName, { children: [widgetIcon, name] })
|
|
23
|
+
]
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { ItemHeader as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Icon from "../../../../Elements/Icon/Icon.js";
|
|
2
|
+
import styles_default from "../../styles.js";
|
|
3
|
+
import Text from "../Text/Text.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region packages/ui/Modules/Dashboard/components/NoData/NoData.tsx
|
|
7
|
+
const NoData = () => {
|
|
8
|
+
return /* @__PURE__ */ jsxs(styles_default.NoData, { children: [/* @__PURE__ */ jsx(Icon, {
|
|
9
|
+
icon: "search",
|
|
10
|
+
size: "64px"
|
|
11
|
+
}), /* @__PURE__ */ jsx(Text, { code: "widgets.noData" })] });
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { NoData as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
import type { WidgetDefinition } from '../../types';
|
|
3
|
+
export interface PickerProps {
|
|
4
|
+
onAdd: (code: string) => void;
|
|
5
|
+
widgetDefinitions: WidgetDefinition[];
|
|
6
|
+
}
|
|
7
|
+
declare const DashboardPicker: ({ onAdd, widgetDefinitions }: PickerProps) => JSX.Element;
|
|
8
|
+
export default DashboardPicker;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import Icon from "../../../../Elements/Icon/Icon.js";
|
|
2
|
+
import styles_default from "../../styles.js";
|
|
3
|
+
import Text from "../Text/Text.js";
|
|
4
|
+
import DashboardPickerItem from "./components/PickerItem.js";
|
|
5
|
+
import ComponentContext from "../../context/ComponentContext.js";
|
|
6
|
+
import React from "react";
|
|
7
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
//#region packages/ui/Modules/Dashboard/components/Picker/Picker.tsx
|
|
9
|
+
const DashboardPicker = ({ onAdd, widgetDefinitions }) => {
|
|
10
|
+
const { Button } = React.useContext(ComponentContext);
|
|
11
|
+
const [isPickerOpen, setIsPickerOpen] = React.useState(false);
|
|
12
|
+
const onPickerOpen = React.useCallback(() => {
|
|
13
|
+
setIsPickerOpen(true);
|
|
14
|
+
}, []);
|
|
15
|
+
const onClose = React.useCallback(() => {
|
|
16
|
+
setIsPickerOpen(false);
|
|
17
|
+
}, []);
|
|
18
|
+
const handleOnAdd = React.useCallback((code) => {
|
|
19
|
+
onAdd(code);
|
|
20
|
+
onClose();
|
|
21
|
+
}, []);
|
|
22
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Button, {
|
|
23
|
+
onClick: onPickerOpen,
|
|
24
|
+
children: /* @__PURE__ */ jsx(Text, { code: "buttons.addWidget" })
|
|
25
|
+
}), isPickerOpen && /* @__PURE__ */ jsx(styles_default.PickerWrapper, { children: /* @__PURE__ */ jsxs(styles_default.Picker, { children: [/* @__PURE__ */ jsxs(styles_default.PickerHeader, { children: [/* @__PURE__ */ jsx(Text, { code: "picker.header" }), /* @__PURE__ */ jsx(styles_default.PickerClose, {
|
|
26
|
+
onClick: onClose,
|
|
27
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
28
|
+
icon: "close",
|
|
29
|
+
size: "16px",
|
|
30
|
+
fill: "gray5"
|
|
31
|
+
})
|
|
32
|
+
})] }), /* @__PURE__ */ jsx(styles_default.PickerBody, { children: (widgetDefinitions || []).map((widget) => /* @__PURE__ */ jsx(DashboardPickerItem, {
|
|
33
|
+
widget,
|
|
34
|
+
onAdd: handleOnAdd
|
|
35
|
+
}, widget.code)) })] }) })] });
|
|
36
|
+
};
|
|
37
|
+
//#endregion
|
|
38
|
+
export { DashboardPicker as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
import type { WidgetDefinition } from '../../types';
|
|
3
|
+
type PickerPropsContainer = {
|
|
4
|
+
widgetDefinitions: WidgetDefinition[];
|
|
5
|
+
};
|
|
6
|
+
declare const PickerContainer: ({ widgetDefinitions }: PickerPropsContainer) => JSX.Element | null;
|
|
7
|
+
export default PickerContainer;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { actions } from "../../store/reducers/widgetListReducer.js";
|
|
2
|
+
import ComponentContext from "../../context/ComponentContext.js";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { nanoid } from "nanoid";
|
|
6
|
+
import { useDispatch } from "react-redux";
|
|
7
|
+
//#region packages/ui/Modules/Dashboard/components/Picker/PickerContainer.tsx
|
|
8
|
+
const PickerContainer = ({ widgetDefinitions }) => {
|
|
9
|
+
const { Picker } = React.useContext(ComponentContext);
|
|
10
|
+
const dispatch = useDispatch();
|
|
11
|
+
return /* @__PURE__ */ jsx(Picker, {
|
|
12
|
+
onAdd: React.useCallback((code) => {
|
|
13
|
+
const widget = widgetDefinitions.find((widget) => widget.code === code);
|
|
14
|
+
const id = nanoid();
|
|
15
|
+
const layout = {
|
|
16
|
+
w: widget?.initWidth,
|
|
17
|
+
h: widget?.initHeight,
|
|
18
|
+
x: 0,
|
|
19
|
+
y: 0,
|
|
20
|
+
i: id,
|
|
21
|
+
minW: widget?.minWidth,
|
|
22
|
+
maxW: widget?.maxWidth,
|
|
23
|
+
minH: widget?.minHeight,
|
|
24
|
+
maxH: widget?.maxHeight,
|
|
25
|
+
moved: false,
|
|
26
|
+
resizeHandles: void 0,
|
|
27
|
+
static: false,
|
|
28
|
+
isDraggable: true,
|
|
29
|
+
isResizable: true,
|
|
30
|
+
isBounded: false
|
|
31
|
+
};
|
|
32
|
+
dispatch(actions.addWidget(code, id, layout, null));
|
|
33
|
+
}, [dispatch, widgetDefinitions]),
|
|
34
|
+
widgetDefinitions
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
//#endregion
|
|
38
|
+
export { PickerContainer as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { JSX } from 'react';
|
|
2
|
+
import type { WidgetDefinition } from '../../../types';
|
|
3
|
+
interface DashboardPickerItemProps {
|
|
4
|
+
widget: WidgetDefinition;
|
|
5
|
+
onAdd: (code: string) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const DashboardPickerItem: ({ widget, onAdd }: DashboardPickerItemProps) => JSX.Element;
|
|
8
|
+
export default DashboardPickerItem;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import styles_default from "../../../styles.js";
|
|
2
|
+
import Text from "../../Text/Text.js";
|
|
3
|
+
import ComponentContext from "../../../context/ComponentContext.js";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region packages/ui/Modules/Dashboard/components/Picker/components/PickerItem.tsx
|
|
7
|
+
const DashboardPickerItem = ({ widget, onAdd }) => {
|
|
8
|
+
const { Button } = React.useContext(ComponentContext);
|
|
9
|
+
const onAddWidget = React.useCallback(() => onAdd(widget.code), [onAdd, widget.code]);
|
|
10
|
+
return /* @__PURE__ */ jsxs(styles_default.PickerItem, { children: [
|
|
11
|
+
/* @__PURE__ */ jsx("img", {
|
|
12
|
+
src: widget.preview,
|
|
13
|
+
width: "50",
|
|
14
|
+
height: "50",
|
|
15
|
+
alt: widget.name
|
|
16
|
+
}),
|
|
17
|
+
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("span", { children: widget.name }), /* @__PURE__ */ jsx("p", { children: widget.description })] }),
|
|
18
|
+
/* @__PURE__ */ jsx(Button, {
|
|
19
|
+
onClick: onAddWidget,
|
|
20
|
+
children: /* @__PURE__ */ jsx(Text, { code: "buttons.addWidget" })
|
|
21
|
+
})
|
|
22
|
+
] });
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { DashboardPickerItem as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import LangContext from "../../context/LangContext.js";
|
|
2
|
+
import translations from "../../locale/index.js";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region packages/ui/Modules/Dashboard/components/Text/Text.tsx
|
|
6
|
+
const Text = ({ code }) => {
|
|
7
|
+
const text = translations[React.useContext(LangContext)]?.[code];
|
|
8
|
+
return /* @__PURE__ */ jsx(Fragment, { children: text || code });
|
|
9
|
+
};
|
|
10
|
+
const useText = (code) => {
|
|
11
|
+
return translations[React.useContext(LangContext)]?.[code] || code;
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { Text as default, useText };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Text';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { JSX } from 'react';
|
|
3
|
+
import { BarDatum } from '@nivo/bar';
|
|
4
|
+
import { WidgetComponentProps } from '../../../types';
|
|
5
|
+
interface BarDataRow extends BarDatum {
|
|
6
|
+
id: string | number;
|
|
7
|
+
value: number;
|
|
8
|
+
label: string;
|
|
9
|
+
}
|
|
10
|
+
export type Props = WidgetComponentProps<BarDataRow[]> & {
|
|
11
|
+
title?: string;
|
|
12
|
+
subtitle?: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
text?: string;
|
|
15
|
+
hasLegend?: boolean;
|
|
16
|
+
legendRowMaxLength?: number;
|
|
17
|
+
};
|
|
18
|
+
declare const _default: React.MemoExoticComponent<({ data, isLoading, error, title, subtitle, description, text, hasLegend, legendRowMaxLength, innerRef, ...barProps }: Props) => JSX.Element>;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import styles_default from "../../../styles.js";
|
|
2
|
+
import LoadingBoundary from "../../../Hoc/LoadingBoundary.js";
|
|
3
|
+
import NoData_default from "../../NoData/index.js";
|
|
4
|
+
import { createLegendData } from "../utils/legends.js";
|
|
5
|
+
import { createWidgetColors } from "../utils/generic.js";
|
|
6
|
+
import { Description, OtherText, Subtitle, Title, Wrapper, WrapperText, margin } from "./styles.js";
|
|
7
|
+
import React from "react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { ResponsiveBar } from "@nivo/bar";
|
|
10
|
+
//#region packages/ui/Modules/Dashboard/components/Widgets/BarChart/BarChart.tsx
|
|
11
|
+
const defaultLegendRowMaxLength = 4;
|
|
12
|
+
const Bar = ({ data = [], isLoading, error, title, subtitle, description, text, hasLegend = true, legendRowMaxLength = defaultLegendRowMaxLength, innerRef, ...barProps }) => {
|
|
13
|
+
const colors = createWidgetColors("barChartColor", 5);
|
|
14
|
+
const hasText = title || subtitle || description || text;
|
|
15
|
+
const legends = React.useMemo(() => {
|
|
16
|
+
if (!hasLegend) return void 0;
|
|
17
|
+
return createLegendData(data, colors, legendRowMaxLength, { translateY: 70 });
|
|
18
|
+
}, [
|
|
19
|
+
hasLegend,
|
|
20
|
+
data,
|
|
21
|
+
colors
|
|
22
|
+
]);
|
|
23
|
+
return /* @__PURE__ */ jsx(LoadingBoundary, {
|
|
24
|
+
isLoading,
|
|
25
|
+
error,
|
|
26
|
+
children: /* @__PURE__ */ jsx(styles_default.ItemContent, {
|
|
27
|
+
ref: innerRef,
|
|
28
|
+
children: /* @__PURE__ */ jsxs(Wrapper, { children: [
|
|
29
|
+
hasText && /* @__PURE__ */ jsxs(WrapperText, { children: [
|
|
30
|
+
/* @__PURE__ */ jsx(Title, { children: title }),
|
|
31
|
+
/* @__PURE__ */ jsx(Subtitle, { children: subtitle }),
|
|
32
|
+
/* @__PURE__ */ jsx(Description, { children: description }),
|
|
33
|
+
/* @__PURE__ */ jsx(OtherText, { children: text })
|
|
34
|
+
] }),
|
|
35
|
+
(!data || data.length === 0) && /* @__PURE__ */ jsx(NoData_default, {}),
|
|
36
|
+
data && data.length > 0 && /* @__PURE__ */ jsx(ResponsiveBar, {
|
|
37
|
+
data,
|
|
38
|
+
isInteractive: true,
|
|
39
|
+
animate: true,
|
|
40
|
+
margin,
|
|
41
|
+
colors,
|
|
42
|
+
colorBy: "indexValue",
|
|
43
|
+
legends,
|
|
44
|
+
...barProps
|
|
45
|
+
})
|
|
46
|
+
] })
|
|
47
|
+
})
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
var BarChart_default = React.memo(Bar);
|
|
51
|
+
//#endregion
|
|
52
|
+
export { BarChart_default as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Config: ({ onChange, config, sources }: import("../../..").MultiConfigProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import BarChart_default$1 from "./BarChart.js";
|
|
2
|
+
import { Config } from "./Config.js";
|
|
3
|
+
//#region packages/ui/Modules/Dashboard/components/Widgets/BarChart/index.tsx
|
|
4
|
+
var BarChart_default = BarChart_default$1;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { Config, BarChart_default as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const margin: {
|
|
2
|
+
top: number;
|
|
3
|
+
bottom: number;
|
|
4
|
+
right: number;
|
|
5
|
+
left: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const Title: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
8
|
+
export declare const Subtitle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
|
+
export declare const Description: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
10
|
+
export declare const OtherText: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
11
|
+
export declare const Wrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
12
|
+
export declare const WrapperText: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
//#region packages/ui/Modules/Dashboard/components/Widgets/BarChart/styles.ts
|
|
3
|
+
const margin = {
|
|
4
|
+
top: 20,
|
|
5
|
+
bottom: 120,
|
|
6
|
+
right: 20,
|
|
7
|
+
left: 100
|
|
8
|
+
};
|
|
9
|
+
const Title = styled.div`
|
|
10
|
+
font-size: 30px;
|
|
11
|
+
color: #333;
|
|
12
|
+
margin-bottom: 35px;
|
|
13
|
+
`;
|
|
14
|
+
const Subtitle = styled.div`
|
|
15
|
+
font-size: 20px;
|
|
16
|
+
color: #999;
|
|
17
|
+
margin-bottom: 5px;
|
|
18
|
+
`;
|
|
19
|
+
const Description = styled.div`
|
|
20
|
+
font-size: 22px;
|
|
21
|
+
color: #333;
|
|
22
|
+
margin-bottom: 15px;
|
|
23
|
+
`;
|
|
24
|
+
const OtherText = styled.div`
|
|
25
|
+
font-size: 15px;
|
|
26
|
+
color: #aaa;
|
|
27
|
+
`;
|
|
28
|
+
const Wrapper = styled.div`
|
|
29
|
+
width: 100%;
|
|
30
|
+
height: 100%;
|
|
31
|
+
display: flex;
|
|
32
|
+
`;
|
|
33
|
+
const WrapperText = styled.div`
|
|
34
|
+
margin-right: 20px;
|
|
35
|
+
padding-left: 30px;
|
|
36
|
+
padding-top: 30px;
|
|
37
|
+
`;
|
|
38
|
+
//#endregion
|
|
39
|
+
export { Description, OtherText, Subtitle, Title, Wrapper, WrapperText, margin };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region packages/ui/Modules/Dashboard/components/Widgets/ColorBox/ColorBox.tsx
|
|
4
|
+
/**
|
|
5
|
+
* This is only example of widget
|
|
6
|
+
*/
|
|
7
|
+
const ColorBox = ({ config = {}, innerRef }) => {
|
|
8
|
+
return /* @__PURE__ */ jsx("div", {
|
|
9
|
+
style: React.useMemo(() => ({
|
|
10
|
+
backgroundColor: config?.color || "transparent",
|
|
11
|
+
border: "1px solid #ccc",
|
|
12
|
+
width: 50,
|
|
13
|
+
height: 50,
|
|
14
|
+
borderRadius: "100%"
|
|
15
|
+
}), [config]),
|
|
16
|
+
ref: innerRef,
|
|
17
|
+
children: config?.name
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { ColorBox as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import styles_default from "../../../styles.js";
|
|
2
|
+
import { useCallback } from "react";
|
|
3
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region packages/ui/Modules/Dashboard/components/Widgets/ColorBox/Config.tsx
|
|
5
|
+
const Config = ({ onChange, config }) => {
|
|
6
|
+
const onChangeInput = useCallback((e) => onChange({
|
|
7
|
+
...config,
|
|
8
|
+
[e.target.name]: e.target.value
|
|
9
|
+
}), [onChange, config]);
|
|
10
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(styles_default.ConfigRow, { children: [/* @__PURE__ */ jsx(styles_default.ConfigLabel, { children: "Name: " }), /* @__PURE__ */ jsx(styles_default.ConfigInput, { children: /* @__PURE__ */ jsx("input", {
|
|
11
|
+
name: "name",
|
|
12
|
+
type: "text",
|
|
13
|
+
onChange: onChangeInput,
|
|
14
|
+
value: config?.name || ""
|
|
15
|
+
}) })] }), /* @__PURE__ */ jsxs(styles_default.ConfigRow, { children: [/* @__PURE__ */ jsx(styles_default.ConfigLabel, { children: "Color: " }), /* @__PURE__ */ jsx(styles_default.ConfigInput, { children: /* @__PURE__ */ jsx("input", {
|
|
16
|
+
name: "color",
|
|
17
|
+
type: "color",
|
|
18
|
+
onChange: onChangeInput,
|
|
19
|
+
value: config?.color || ""
|
|
20
|
+
}) })] })] });
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { Config };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region packages/ui/Modules/Dashboard/components/Widgets/EmptyWidget/EmptyWidget.tsx
|
|
4
|
+
/**
|
|
5
|
+
* Empty widget
|
|
6
|
+
* This is only for error case, invalid widget definition etc...
|
|
7
|
+
*/
|
|
8
|
+
const EmptyWidget = () => /* @__PURE__ */ jsx("span", { children: "Error" });
|
|
9
|
+
//#endregion
|
|
10
|
+
export { EmptyWidget as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Config: ({ onChange, config, sources }: import("../../..").MultiConfigProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import styles_default from "../../../styles.js";
|
|
2
|
+
import LoadingBoundary from "../../../Hoc/LoadingBoundary.js";
|
|
3
|
+
import NoData_default from "../../NoData/index.js";
|
|
4
|
+
import styles_default$1 from "./styles.js";
|
|
5
|
+
import { ProgressLine } from "./components/ProgressLine.js";
|
|
6
|
+
import { LabelsLine } from "./components/LabelsLine.js";
|
|
7
|
+
import React from "react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
//#region packages/ui/Modules/Dashboard/components/Widgets/HorizontalBar/HorizontalBar.tsx
|
|
10
|
+
const fallbackFillColor = "#000";
|
|
11
|
+
const fallbackBgColor = "#ebedf2";
|
|
12
|
+
const HorizontalBar = ({ data = [], title, description, isLoading, error, innerRef }) => /* @__PURE__ */ jsx(LoadingBoundary, {
|
|
13
|
+
isLoading,
|
|
14
|
+
error,
|
|
15
|
+
children: /* @__PURE__ */ jsx(styles_default.ItemContent, { children: /* @__PURE__ */ jsxs("div", {
|
|
16
|
+
ref: innerRef,
|
|
17
|
+
children: [
|
|
18
|
+
title && /* @__PURE__ */ jsx(styles_default$1.Title, { children: title }),
|
|
19
|
+
description && /* @__PURE__ */ jsx(styles_default$1.Description, { children: description }),
|
|
20
|
+
(!data || data.length === 0) && /* @__PURE__ */ jsx(NoData_default, {}),
|
|
21
|
+
data.map((row) => {
|
|
22
|
+
const { id, label, percent, value, color = fallbackFillColor, backgroundColor = fallbackBgColor } = row;
|
|
23
|
+
const validPercent = percent >= 0 && percent <= 100 ? percent : 0;
|
|
24
|
+
return /* @__PURE__ */ jsxs(React.Fragment, { children: [/* @__PURE__ */ jsx(LabelsLine, {
|
|
25
|
+
value,
|
|
26
|
+
label,
|
|
27
|
+
color
|
|
28
|
+
}), /* @__PURE__ */ jsx(ProgressLine, {
|
|
29
|
+
percent: validPercent,
|
|
30
|
+
color,
|
|
31
|
+
backgroundColor
|
|
32
|
+
})] }, id);
|
|
33
|
+
})
|
|
34
|
+
]
|
|
35
|
+
}) })
|
|
36
|
+
});
|
|
37
|
+
//#endregion
|
|
38
|
+
export { HorizontalBar as default };
|