@oanda/labs-widget-common 1.0.252 → 1.0.254
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/CHANGELOG.md +774 -62520
- package/dist/main/components/style.css +1 -1
- package/dist/module/chart/BaseChart.js +15 -7
- package/dist/module/chart/BaseChart.js.map +1 -1
- package/dist/module/chart/formatters.js +12 -3
- package/dist/module/chart/formatters.js.map +1 -1
- package/dist/module/chart/getGridLines.js +16 -9
- package/dist/module/chart/getGridLines.js.map +1 -1
- package/dist/module/chart/getTheme.js +38 -31
- package/dist/module/chart/getTheme.js.map +1 -1
- package/dist/module/chart/getZoomControls.js +12 -5
- package/dist/module/chart/getZoomControls.js.map +1 -1
- package/dist/module/chart/index.js +82 -7
- package/dist/module/chart/index.js.map +1 -1
- package/dist/module/chart/sharedOptions.js +11 -4
- package/dist/module/chart/sharedOptions.js.map +1 -1
- package/dist/module/chart/types.js +5 -1
- package/dist/module/components/Button/Button.js +18 -11
- package/dist/module/components/Button/Button.js.map +1 -1
- package/dist/module/components/Button/index.js +27 -2
- package/dist/module/components/Button/index.js.map +1 -1
- package/dist/module/components/Button/types.js +8 -2
- package/dist/module/components/Button/types.js.map +1 -1
- package/dist/module/components/Card/Card.js +24 -16
- package/dist/module/components/Card/Card.js.map +1 -1
- package/dist/module/components/Card/CardHeader.js +21 -14
- package/dist/module/components/Card/CardHeader.js.map +1 -1
- package/dist/module/components/Card/index.js +38 -3
- package/dist/module/components/Card/index.js.map +1 -1
- package/dist/module/components/Card/rows/DailyChangeCardRow.js +15 -7
- package/dist/module/components/Card/rows/DailyChangeCardRow.js.map +1 -1
- package/dist/module/components/Card/rows/LineChartCardRow.js +17 -10
- package/dist/module/components/Card/rows/LineChartCardRow.js.map +1 -1
- package/dist/module/components/Card/rows/PriceCardRow.js +16 -8
- package/dist/module/components/Card/rows/PriceCardRow.js.map +1 -1
- package/dist/module/components/Card/rows/SentimentCardRow.js +18 -10
- package/dist/module/components/Card/rows/SentimentCardRow.js.map +1 -1
- package/dist/module/components/Card/rows/SpreadCardRow.js +15 -7
- package/dist/module/components/Card/rows/SpreadCardRow.js.map +1 -1
- package/dist/module/components/Card/rows/index.js +60 -5
- package/dist/module/components/Card/rows/index.js.map +1 -1
- package/dist/module/components/Card/types.js +5 -1
- package/dist/module/components/Disclaimer/Disclaimer.js +32 -24
- package/dist/module/components/Disclaimer/Disclaimer.js.map +1 -1
- package/dist/module/components/Disclaimer/index.js +16 -1
- package/dist/module/components/Disclaimer/index.js.map +1 -1
- package/dist/module/components/Error/Error.js +27 -18
- package/dist/module/components/Error/Error.js.map +1 -1
- package/dist/module/components/Error/index.js +16 -1
- package/dist/module/components/Error/index.js.map +1 -1
- package/dist/module/components/InfoBox/InfoBox.js +10 -3
- package/dist/module/components/InfoBox/InfoBox.js.map +1 -1
- package/dist/module/components/InfoBox/index.js +27 -2
- package/dist/module/components/InfoBox/index.js.map +1 -1
- package/dist/module/components/InfoBox/types.js +5 -1
- package/dist/module/components/Input/NumberInput.js +21 -13
- package/dist/module/components/Input/NumberInput.js.map +1 -1
- package/dist/module/components/Input/index.js +38 -3
- package/dist/module/components/Input/index.js.map +1 -1
- package/dist/module/components/Input/types.js +5 -1
- package/dist/module/components/Input/useNumberFormat.js +11 -4
- package/dist/module/components/Input/useNumberFormat.js.map +1 -1
- package/dist/module/components/InstrumentRate/InstrumentRate.js +37 -30
- package/dist/module/components/InstrumentRate/InstrumentRate.js.map +1 -1
- package/dist/module/components/InstrumentRate/InstrumentRateWithChart.js +19 -13
- package/dist/module/components/InstrumentRate/InstrumentRateWithChart.js.map +1 -1
- package/dist/module/components/InstrumentRate/index.js +38 -3
- package/dist/module/components/InstrumentRate/index.js.map +1 -1
- package/dist/module/components/InstrumentRate/types.js +5 -1
- package/dist/module/components/InstrumentRate/utils.js +13 -6
- package/dist/module/components/InstrumentRate/utils.js.map +1 -1
- package/dist/module/components/Label/Label.js +12 -6
- package/dist/module/components/Label/Label.js.map +1 -1
- package/dist/module/components/Label/index.js +16 -1
- package/dist/module/components/Label/index.js.map +1 -1
- package/dist/module/components/LabelWrapper/LabelWrapper.js +24 -17
- package/dist/module/components/LabelWrapper/LabelWrapper.js.map +1 -1
- package/dist/module/components/LabelWrapper/index.js +27 -2
- package/dist/module/components/LabelWrapper/index.js.map +1 -1
- package/dist/module/components/LabelWrapper/types.js +7 -1
- package/dist/module/components/LabelWrapper/types.js.map +1 -1
- package/dist/module/components/LastUpdated/LastUpdated.js +13 -6
- package/dist/module/components/LastUpdated/LastUpdated.js.map +1 -1
- package/dist/module/components/LastUpdated/index.js +27 -2
- package/dist/module/components/LastUpdated/index.js.map +1 -1
- package/dist/module/components/LastUpdated/types.js +5 -1
- package/dist/module/components/LineChart/LineChart.js +18 -11
- package/dist/module/components/LineChart/LineChart.js.map +1 -1
- package/dist/module/components/LineChart/LineChartWithData.js +14 -8
- package/dist/module/components/LineChart/LineChartWithData.js.map +1 -1
- package/dist/module/components/LineChart/index.js +49 -4
- package/dist/module/components/LineChart/index.js.map +1 -1
- package/dist/module/components/LineChart/types.js +7 -1
- package/dist/module/components/LineChart/types.js.map +1 -1
- package/dist/module/components/LineChart/utils.js +16 -8
- package/dist/module/components/LineChart/utils.js.map +1 -1
- package/dist/module/components/Loader/Loader.js +18 -11
- package/dist/module/components/Loader/Loader.js.map +1 -1
- package/dist/module/components/Loader/index.js +27 -2
- package/dist/module/components/Loader/index.js.map +1 -1
- package/dist/module/components/Loader/types.js +7 -1
- package/dist/module/components/Loader/types.js.map +1 -1
- package/dist/module/components/Pagination/Pagination.js +40 -33
- package/dist/module/components/Pagination/Pagination.js.map +1 -1
- package/dist/module/components/Pagination/index.js +27 -2
- package/dist/module/components/Pagination/index.js.map +1 -1
- package/dist/module/components/Pagination/types.js +5 -1
- package/dist/module/components/Pagination/utils.js +8 -1
- package/dist/module/components/Pagination/utils.js.map +1 -1
- package/dist/module/components/Price/Price.js +23 -15
- package/dist/module/components/Price/Price.js.map +1 -1
- package/dist/module/components/Price/index.js +27 -2
- package/dist/module/components/Price/index.js.map +1 -1
- package/dist/module/components/Price/types.js +7 -1
- package/dist/module/components/Price/types.js.map +1 -1
- package/dist/module/components/SearchInput/SearchInput.js +12 -5
- package/dist/module/components/SearchInput/SearchInput.js.map +1 -1
- package/dist/module/components/SearchInput/index.js +27 -2
- package/dist/module/components/SearchInput/index.js.map +1 -1
- package/dist/module/components/SearchInput/types.js +5 -1
- package/dist/module/components/Select/Select.js +44 -36
- package/dist/module/components/Select/Select.js.map +1 -1
- package/dist/module/components/Select/index.js +27 -2
- package/dist/module/components/Select/index.js.map +1 -1
- package/dist/module/components/Select/types.js +5 -1
- package/dist/module/components/Sentiment/Sentiment.js +28 -20
- package/dist/module/components/Sentiment/Sentiment.js.map +1 -1
- package/dist/module/components/Sentiment/SentimentError.js +17 -10
- package/dist/module/components/Sentiment/SentimentError.js.map +1 -1
- package/dist/module/components/Sentiment/SentimentLoader.js +17 -10
- package/dist/module/components/Sentiment/SentimentLoader.js.map +1 -1
- package/dist/module/components/Sentiment/index.js +38 -3
- package/dist/module/components/Sentiment/index.js.map +1 -1
- package/dist/module/components/Sentiment/types.js +7 -1
- package/dist/module/components/Sentiment/types.js.map +1 -1
- package/dist/module/components/Sentiment/utils.js +7 -1
- package/dist/module/components/Sentiment/utils.js.map +1 -1
- package/dist/module/components/Spinner/Spinner.js +18 -10
- package/dist/module/components/Spinner/Spinner.js.map +1 -1
- package/dist/module/components/Spinner/index.js +27 -2
- package/dist/module/components/Spinner/index.js.map +1 -1
- package/dist/module/components/Spinner/types.js +7 -1
- package/dist/module/components/Spinner/types.js.map +1 -1
- package/dist/module/components/Switch/Switch.js +26 -18
- package/dist/module/components/Switch/Switch.js.map +1 -1
- package/dist/module/components/Switch/SwitchItem.js +18 -10
- package/dist/module/components/Switch/SwitchItem.js.map +1 -1
- package/dist/module/components/Switch/constants.js +7 -1
- package/dist/module/components/Switch/constants.js.map +1 -1
- package/dist/module/components/Switch/index.js +16 -1
- package/dist/module/components/Switch/index.js.map +1 -1
- package/dist/module/components/Switch/types.js +5 -1
- package/dist/module/components/Table/Table.js +21 -14
- package/dist/module/components/Table/Table.js.map +1 -1
- package/dist/module/components/Table/TableCell.js +19 -12
- package/dist/module/components/Table/TableCell.js.map +1 -1
- package/dist/module/components/Table/TableHeader.js +20 -13
- package/dist/module/components/Table/TableHeader.js.map +1 -1
- package/dist/module/components/Table/TableRow.js +15 -8
- package/dist/module/components/Table/TableRow.js.map +1 -1
- package/dist/module/components/Table/columns/ChartColumn.js +20 -12
- package/dist/module/components/Table/columns/ChartColumn.js.map +1 -1
- package/dist/module/components/Table/columns/DailyChangeColumn.js +15 -7
- package/dist/module/components/Table/columns/DailyChangeColumn.js.map +1 -1
- package/dist/module/components/Table/columns/InstrumentColumn.js +19 -11
- package/dist/module/components/Table/columns/InstrumentColumn.js.map +1 -1
- package/dist/module/components/Table/columns/PriceColumn.js +16 -8
- package/dist/module/components/Table/columns/PriceColumn.js.map +1 -1
- package/dist/module/components/Table/columns/SentimentColumn.js +16 -8
- package/dist/module/components/Table/columns/SentimentColumn.js.map +1 -1
- package/dist/module/components/Table/columns/SpreadColumn.js +17 -9
- package/dist/module/components/Table/columns/SpreadColumn.js.map +1 -1
- package/dist/module/components/Table/columns/index.js +71 -6
- package/dist/module/components/Table/columns/index.js.map +1 -1
- package/dist/module/components/Table/index.js +60 -5
- package/dist/module/components/Table/index.js.map +1 -1
- package/dist/module/components/Table/types.js +5 -1
- package/dist/module/components/TableWidget/CardRecordRow.js +22 -14
- package/dist/module/components/TableWidget/CardRecordRow.js.map +1 -1
- package/dist/module/components/TableWidget/CardRenderer.js +20 -12
- package/dist/module/components/TableWidget/CardRenderer.js.map +1 -1
- package/dist/module/components/TableWidget/Cards.js +14 -6
- package/dist/module/components/TableWidget/Cards.js.map +1 -1
- package/dist/module/components/TableWidget/ColumnRenderer.js +42 -34
- package/dist/module/components/TableWidget/ColumnRenderer.js.map +1 -1
- package/dist/module/components/TableWidget/DataRecordRow.js +20 -12
- package/dist/module/components/TableWidget/DataRecordRow.js.map +1 -1
- package/dist/module/components/TableWidget/TableWidget.js +34 -26
- package/dist/module/components/TableWidget/TableWidget.js.map +1 -1
- package/dist/module/components/TableWidget/index.js +27 -2
- package/dist/module/components/TableWidget/index.js.map +1 -1
- package/dist/module/components/TableWidget/types.js +5 -1
- package/dist/module/components/TableWidget/utils.js +12 -4
- package/dist/module/components/TableWidget/utils.js.map +1 -1
- package/dist/module/components/Tabs/Tab.js +16 -10
- package/dist/module/components/Tabs/Tab.js.map +1 -1
- package/dist/module/components/Tabs/Tabs.js +11 -5
- package/dist/module/components/Tabs/Tabs.js.map +1 -1
- package/dist/module/components/Tabs/index.js +16 -1
- package/dist/module/components/Tabs/index.js.map +1 -1
- package/dist/module/components/Tabs/types.js +5 -1
- package/dist/module/components/TextInput/TextInput.js +17 -10
- package/dist/module/components/TextInput/TextInput.js.map +1 -1
- package/dist/module/components/TextInput/index.js +16 -1
- package/dist/module/components/TextInput/index.js.map +1 -1
- package/dist/module/components/TimeUnitSwitch/TimeUnitSelect.js +14 -7
- package/dist/module/components/TimeUnitSwitch/TimeUnitSelect.js.map +1 -1
- package/dist/module/components/TimeUnitSwitch/TimeUnitSwitch.js +22 -15
- package/dist/module/components/TimeUnitSwitch/TimeUnitSwitch.js.map +1 -1
- package/dist/module/components/TimeUnitSwitch/index.js +16 -1
- package/dist/module/components/TimeUnitSwitch/index.js.map +1 -1
- package/dist/module/components/TimeUnitSwitch/types.js +5 -1
- package/dist/module/components/Tooltip/Tooltip.js +11 -4
- package/dist/module/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/module/components/Tooltip/index.js +27 -2
- package/dist/module/components/Tooltip/index.js.map +1 -1
- package/dist/module/components/Tooltip/types.js +5 -1
- package/dist/module/components/Truncate/Truncate.js +18 -11
- package/dist/module/components/Truncate/Truncate.js.map +1 -1
- package/dist/module/components/Truncate/index.js +27 -2
- package/dist/module/components/Truncate/index.js.map +1 -1
- package/dist/module/components/Truncate/types.js +5 -1
- package/dist/module/components/WidgetWrapper/WidgetWrapper.js +14 -6
- package/dist/module/components/WidgetWrapper/WidgetWrapper.js.map +1 -1
- package/dist/module/components/WidgetWrapper/index.js +16 -1
- package/dist/module/components/WidgetWrapper/index.js.map +1 -1
- package/dist/module/components/constant.js +8 -2
- package/dist/module/components/constant.js.map +1 -1
- package/dist/module/components/index.js +292 -27
- package/dist/module/components/index.js.map +1 -1
- package/dist/module/components/style.css +1 -1
- package/dist/module/constants/index.js +13 -7
- package/dist/module/constants/index.js.map +1 -1
- package/dist/module/fonts/index.js +27 -4
- package/dist/module/fonts/index.js.map +1 -1
- package/dist/module/hooks/index.js +71 -6
- package/dist/module/hooks/index.js.map +1 -1
- package/dist/module/hooks/useFetchCombinedDataRecords.js +14 -7
- package/dist/module/hooks/useFetchCombinedDataRecords.js.map +1 -1
- package/dist/module/hooks/useLiveRates.js +12 -5
- package/dist/module/hooks/useLiveRates.js.map +1 -1
- package/dist/module/hooks/useLiveRatesMessage.js +26 -19
- package/dist/module/hooks/useLiveRatesMessage.js.map +1 -1
- package/dist/module/hooks/useLiveRatesQuery.js +12 -5
- package/dist/module/hooks/useLiveRatesQuery.js.map +1 -1
- package/dist/module/hooks/useRecords.js +13 -7
- package/dist/module/hooks/useRecords.js.map +1 -1
- package/dist/module/hooks/useVisibleLiveDataRecord.js +16 -9
- package/dist/module/hooks/useVisibleLiveDataRecord.js.map +1 -1
- package/dist/module/images/index.js +111 -16
- package/dist/module/images/index.js.map +1 -1
- package/dist/module/index.js +126 -11
- package/dist/module/index.js.map +1 -1
- package/dist/module/providers/ConditionalProvider.js +11 -3
- package/dist/module/providers/ConditionalProvider.js.map +1 -1
- package/dist/module/providers/Layout/LayoutContext.js +12 -4
- package/dist/module/providers/Layout/LayoutContext.js.map +1 -1
- package/dist/module/providers/Layout/LayoutProvider.js +30 -22
- package/dist/module/providers/Layout/LayoutProvider.js.map +1 -1
- package/dist/module/providers/Layout/LayoutProvider.test.js +61 -58
- package/dist/module/providers/Layout/LayoutProvider.test.js.map +1 -1
- package/dist/module/providers/Layout/index.js +27 -2
- package/dist/module/providers/Layout/index.js.map +1 -1
- package/dist/module/providers/LiveRates/LiveRatesContext.js +11 -4
- package/dist/module/providers/LiveRates/LiveRatesContext.js.map +1 -1
- package/dist/module/providers/LiveRates/LiveRatesProvider.js +37 -29
- package/dist/module/providers/LiveRates/LiveRatesProvider.js.map +1 -1
- package/dist/module/providers/LiveRates/index.js +27 -2
- package/dist/module/providers/LiveRates/index.js.map +1 -1
- package/dist/module/providers/Widget/WidgetProvider.js +26 -18
- package/dist/module/providers/Widget/WidgetProvider.js.map +1 -1
- package/dist/module/providers/Widget/index.js +16 -1
- package/dist/module/providers/Widget/index.js.map +1 -1
- package/dist/module/providers/index.js +38 -3
- package/dist/module/providers/index.js.map +1 -1
- package/dist/module/tailwind/cn.js +11 -4
- package/dist/module/tailwind/cn.js.map +1 -1
- package/dist/module/tailwind/colors.js +9 -3
- package/dist/module/tailwind/colors.js.map +1 -1
- package/dist/module/tailwind/index.js +39 -3
- package/dist/module/tailwind/index.js.map +1 -1
- package/dist/module/tailwind/preset.js +11 -5
- package/dist/module/tailwind/preset.js.map +1 -1
- package/dist/module/tailwind/themes/background.js +14 -8
- package/dist/module/tailwind/themes/background.js.map +1 -1
- package/dist/module/tailwind/themes/border.js +10 -4
- package/dist/module/tailwind/themes/border.js.map +1 -1
- package/dist/module/tailwind/themes/index.js +12 -6
- package/dist/module/tailwind/themes/index.js.map +1 -1
- package/dist/module/tailwind/themes/text.js +18 -12
- package/dist/module/tailwind/themes/text.js.map +1 -1
- package/dist/module/tailwind/themes/themeColors.js +26 -20
- package/dist/module/tailwind/themes/themeColors.js.map +1 -1
- package/dist/module/tailwind/types.js +5 -1
- package/dist/module/tailwind/utils.js +8 -1
- package/dist/module/tailwind/utils.js.map +1 -1
- package/dist/module/testUtils/index.js +15 -7
- package/dist/module/testUtils/index.js.map +1 -1
- package/dist/module/translations/index.js +15 -8
- package/dist/module/translations/index.js.map +1 -1
- package/dist/module/translations/translations.js +7 -1
- package/dist/module/translations/translations.js.map +1 -1
- package/dist/module/types/dataTypes.js +7 -1
- package/dist/module/types/dataTypes.js.map +1 -1
- package/dist/module/types/index.js +36 -4
- package/dist/module/types/index.js.map +1 -1
- package/dist/module/types/liveRatesTypes.js +5 -1
- package/dist/module/utils/dateUtils.js +9 -1
- package/dist/module/utils/dateUtils.js.map +1 -1
- package/dist/module/utils/getLocale.js +20 -13
- package/dist/module/utils/getLocale.js.map +1 -1
- package/dist/module/utils/index.js +38 -3
- package/dist/module/utils/index.js.map +1 -1
- package/dist/module/utils/liveRates/buildUrl.js +8 -1
- package/dist/module/utils/liveRates/buildUrl.js.map +1 -1
- package/dist/module/utils/liveRates/calculatePipsChangeFromOpen.js +7 -1
- package/dist/module/utils/liveRates/calculatePipsChangeFromOpen.js.map +1 -1
- package/dist/module/utils/liveRates/calculatePriceChange.js +8 -1
- package/dist/module/utils/liveRates/calculatePriceChange.js.map +1 -1
- package/dist/module/utils/liveRates/calculatePriceChangeFromOpen.js +8 -1
- package/dist/module/utils/liveRates/calculatePriceChangeFromOpen.js.map +1 -1
- package/dist/module/utils/liveRates/calculateSpread.js +8 -1
- package/dist/module/utils/liveRates/calculateSpread.js.map +1 -1
- package/dist/module/utils/liveRates/decodeLiveRateMessage.js +9 -2
- package/dist/module/utils/liveRates/decodeLiveRateMessage.js.map +1 -1
- package/dist/module/utils/liveRates/decodeUtilities.js +18 -6
- package/dist/module/utils/liveRates/decodeUtilities.js.map +1 -1
- package/dist/module/utils/liveRates/index.js +82 -7
- package/dist/module/utils/liveRates/index.js.map +1 -1
- package/dist/module/utils/validateToolParams.js +7 -1
- package/dist/module/utils/validateToolParams.js.map +1 -1
- package/package.json +9 -4
- package/src/components/style.css +1 -1
- package/tsconfig.types.json +2 -4
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TimeUnitSwitch = void 0;
|
|
7
|
+
var _monoI18n = require("@oanda/mono-i18n");
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _providers = require("../../providers");
|
|
10
|
+
var _types = require("../../types");
|
|
11
|
+
var _Button = require("../Button");
|
|
12
|
+
var _TimeUnitSelect = require("./TimeUnitSelect");
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
7
14
|
const TimeUnitSwitch = _ref => {
|
|
8
15
|
let {
|
|
9
16
|
selected,
|
|
@@ -13,15 +20,15 @@ const TimeUnitSwitch = _ref => {
|
|
|
13
20
|
} = _ref;
|
|
14
21
|
const {
|
|
15
22
|
lang
|
|
16
|
-
} = useLocale();
|
|
23
|
+
} = (0, _monoI18n.useLocale)();
|
|
17
24
|
const {
|
|
18
25
|
size
|
|
19
|
-
} = useLayoutProvider();
|
|
20
|
-
const isDesktop = size === Size.DESKTOP;
|
|
26
|
+
} = (0, _providers.useLayoutProvider)();
|
|
27
|
+
const isDesktop = size === _types.Size.DESKTOP;
|
|
21
28
|
const handleButtonClick = e => {
|
|
22
29
|
callback(e.currentTarget.value);
|
|
23
30
|
};
|
|
24
|
-
return
|
|
31
|
+
return _react.default.createElement(_react.default.Fragment, null, isDesktop ? _react.default.createElement("div", {
|
|
25
32
|
className: "lw-mb-6 lw-flex lw-gap-1 lw-self-end",
|
|
26
33
|
"data-testid": "time-unit-switch"
|
|
27
34
|
}, options.map(_ref2 => {
|
|
@@ -34,20 +41,20 @@ const TimeUnitSwitch = _ref => {
|
|
|
34
41
|
count: tooltipLabel.count
|
|
35
42
|
}) : tooltipLabel;
|
|
36
43
|
const buttonLabel = lang(label);
|
|
37
|
-
return
|
|
44
|
+
return _react.default.createElement(_Button.Button, {
|
|
38
45
|
key: value,
|
|
39
46
|
"data-tooltip-content": tooltip,
|
|
40
47
|
"data-tooltip-id": tooltipId,
|
|
41
|
-
size: ButtonSize.full,
|
|
48
|
+
size: _Button.ButtonSize.full,
|
|
42
49
|
value: value,
|
|
43
|
-
variant: selected === value ? ButtonVariant.primary : ButtonVariant.secondary,
|
|
50
|
+
variant: selected === value ? _Button.ButtonVariant.primary : _Button.ButtonVariant.secondary,
|
|
44
51
|
onClick: handleButtonClick
|
|
45
52
|
}, buttonLabel);
|
|
46
|
-
})) :
|
|
53
|
+
})) : _react.default.createElement(_TimeUnitSelect.TimeUnitSelect, {
|
|
47
54
|
callback: callback,
|
|
48
55
|
options: options,
|
|
49
56
|
selected: selected
|
|
50
57
|
}));
|
|
51
58
|
};
|
|
52
|
-
|
|
59
|
+
exports.TimeUnitSwitch = TimeUnitSwitch;
|
|
53
60
|
//# sourceMappingURL=TimeUnitSwitch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeUnitSwitch.js","names":["
|
|
1
|
+
{"version":3,"file":"TimeUnitSwitch.js","names":["_monoI18n","require","_react","_interopRequireDefault","_providers","_types","_Button","_TimeUnitSelect","e","__esModule","default","TimeUnitSwitch","_ref","selected","options","callback","tooltipId","lang","useLocale","size","useLayoutProvider","isDesktop","Size","DESKTOP","handleButtonClick","currentTarget","value","createElement","Fragment","className","map","_ref2","label","tooltipLabel","tooltip","translationKey","count","buttonLabel","Button","key","ButtonSize","full","variant","ButtonVariant","primary","secondary","onClick","TimeUnitSelect","exports"],"sources":["../../../../src/components/TimeUnitSwitch/TimeUnitSwitch.tsx"],"sourcesContent":["import { useLocale } from '@oanda/mono-i18n';\nimport React from 'react';\n\nimport { useLayoutProvider } from '../../providers';\nimport { Size } from '../../types';\nimport { Button, ButtonSize, ButtonVariant } from '../Button';\nimport { TimeUnitSelect } from './TimeUnitSelect';\nimport type { TimeUnitSwitchProps } from './types';\n\nconst TimeUnitSwitch = <T extends string>({\n selected,\n options,\n callback,\n tooltipId,\n}: TimeUnitSwitchProps<T>) => {\n const { lang } = useLocale();\n const { size } = useLayoutProvider();\n const isDesktop = size === Size.DESKTOP;\n\n const handleButtonClick = (e: React.SyntheticEvent<HTMLButtonElement>) => {\n callback(e.currentTarget.value as T);\n };\n\n return (\n <>\n {isDesktop ? (\n <div\n className=\"lw-mb-6 lw-flex lw-gap-1 lw-self-end\"\n data-testid=\"time-unit-switch\"\n >\n {options.map(({ value, label, tooltipLabel }) => {\n const tooltip = tooltipLabel\n ? lang(tooltipLabel.translationKey, { count: tooltipLabel.count })\n : tooltipLabel;\n const buttonLabel = lang(label);\n\n return (\n <Button\n key={value}\n data-tooltip-content={tooltip}\n data-tooltip-id={tooltipId}\n size={ButtonSize.full}\n value={value}\n variant={\n selected === value\n ? ButtonVariant.primary\n : ButtonVariant.secondary\n }\n onClick={handleButtonClick}\n >\n {buttonLabel}\n </Button>\n );\n })}\n </div>\n ) : (\n <TimeUnitSelect\n callback={callback}\n options={options}\n selected={selected}\n />\n )}\n </>\n );\n};\n\nexport { TimeUnitSwitch };\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,eAAA,GAAAN,OAAA;AAAkD,SAAAE,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAGlD,MAAMG,cAAc,GAAGC,IAAA,IAKO;EAAA,IALY;IACxCC,QAAQ;IACRC,OAAO;IACPC,QAAQ;IACRC;EACsB,CAAC,GAAAJ,IAAA;EACvB,MAAM;IAAEK;EAAK,CAAC,GAAG,IAAAC,mBAAS,EAAC,CAAC;EAC5B,MAAM;IAAEC;EAAK,CAAC,GAAG,IAAAC,4BAAiB,EAAC,CAAC;EACpC,MAAMC,SAAS,GAAGF,IAAI,KAAKG,WAAI,CAACC,OAAO;EAEvC,MAAMC,iBAAiB,GAAIhB,CAA0C,IAAK;IACxEO,QAAQ,CAACP,CAAC,CAACiB,aAAa,CAACC,KAAU,CAAC;EACtC,CAAC;EAED,OACExB,MAAA,CAAAQ,OAAA,CAAAiB,aAAA,CAAAzB,MAAA,CAAAQ,OAAA,CAAAkB,QAAA,QACGP,SAAS,GACRnB,MAAA,CAAAQ,OAAA,CAAAiB,aAAA;IACEE,SAAS,EAAC,sCAAsC;IAChD,eAAY;EAAkB,GAE7Bf,OAAO,CAACgB,GAAG,CAACC,KAAA,IAAoC;IAAA,IAAnC;MAAEL,KAAK;MAAEM,KAAK;MAAEC;IAAa,CAAC,GAAAF,KAAA;IAC1C,MAAMG,OAAO,GAAGD,YAAY,GACxBhB,IAAI,CAACgB,YAAY,CAACE,cAAc,EAAE;MAAEC,KAAK,EAAEH,YAAY,CAACG;IAAM,CAAC,CAAC,GAChEH,YAAY;IAChB,MAAMI,WAAW,GAAGpB,IAAI,CAACe,KAAK,CAAC;IAE/B,OACE9B,MAAA,CAAAQ,OAAA,CAAAiB,aAAA,CAACrB,OAAA,CAAAgC,MAAM;MACLC,GAAG,EAAEb,KAAM;MACX,wBAAsBQ,OAAQ;MAC9B,mBAAiBlB,SAAU;MAC3BG,IAAI,EAAEqB,kBAAU,CAACC,IAAK;MACtBf,KAAK,EAAEA,KAAM;MACbgB,OAAO,EACL7B,QAAQ,KAAKa,KAAK,GACdiB,qBAAa,CAACC,OAAO,GACrBD,qBAAa,CAACE,SACnB;MACDC,OAAO,EAAEtB;IAAkB,GAE1Ba,WACK,CAAC;EAEb,CAAC,CACE,CAAC,GAENnC,MAAA,CAAAQ,OAAA,CAAAiB,aAAA,CAACpB,eAAA,CAAAwC,cAAc;IACbhC,QAAQ,EAAEA,QAAS;IACnBD,OAAO,EAAEA,OAAQ;IACjBD,QAAQ,EAAEA;EAAS,CACpB,CAEH,CAAC;AAEP,CAAC;AAACmC,OAAA,CAAArC,cAAA,GAAAA,cAAA","ignoreList":[]}
|
|
@@ -1,2 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _TimeUnitSwitch = require("./TimeUnitSwitch");
|
|
7
|
+
Object.keys(_TimeUnitSwitch).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _TimeUnitSwitch[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _TimeUnitSwitch[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
2
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/TimeUnitSwitch/index.ts"],"sourcesContent":["export * from './TimeUnitSwitch';\n"],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["_TimeUnitSwitch","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["../../../../src/components/TimeUnitSwitch/index.ts"],"sourcesContent":["export * from './TimeUnitSwitch';\n"],"mappings":";;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,eAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,eAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,eAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Tooltip = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactTooltip = require("react-tooltip");
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
3
10
|
const Tooltip = _ref => {
|
|
4
11
|
let {
|
|
5
12
|
id
|
|
6
13
|
} = _ref;
|
|
7
|
-
return
|
|
14
|
+
return _react.default.createElement(_reactTooltip.Tooltip, {
|
|
8
15
|
disableStyleInjection: true,
|
|
9
16
|
className: "lw-z-10 lw-rounded-sm lw-bg-secondary lw-p-2 lw-font-normal lw-text-text-negative lw-opacity-100",
|
|
10
17
|
classNameArrow: "lw-h-2 lw-w-2 lw-rotate-45 lw-bg-secondary",
|
|
@@ -13,5 +20,5 @@ const Tooltip = _ref => {
|
|
|
13
20
|
opacity: 1
|
|
14
21
|
});
|
|
15
22
|
};
|
|
16
|
-
|
|
23
|
+
exports.Tooltip = Tooltip;
|
|
17
24
|
//# sourceMappingURL=Tooltip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","names":["
|
|
1
|
+
{"version":3,"file":"Tooltip.js","names":["_react","_interopRequireDefault","require","_reactTooltip","e","__esModule","default","Tooltip","_ref","id","createElement","disableStyleInjection","className","classNameArrow","opacity","exports"],"sources":["../../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import React from 'react';\nimport { Tooltip as ReactTooltip } from 'react-tooltip';\n\nimport type { TooltipProps } from './types';\n\nconst Tooltip = ({ id }: TooltipProps) => (\n <ReactTooltip\n disableStyleInjection\n className=\"lw-z-10 lw-rounded-sm lw-bg-secondary lw-p-2 lw-font-normal lw-text-text-negative lw-opacity-100\"\n classNameArrow=\"lw-h-2 lw-w-2 lw-rotate-45 lw-bg-secondary\"\n data-testid=\"tooltip\"\n id={id}\n opacity={1}\n />\n);\n\nexport { Tooltip };\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAAwD,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAIxD,MAAMG,OAAO,GAAGC,IAAA;EAAA,IAAC;IAAEC;EAAiB,CAAC,GAAAD,IAAA;EAAA,OACnCR,MAAA,CAAAM,OAAA,CAAAI,aAAA,CAACP,aAAA,CAAAI,OAAY;IACXI,qBAAqB;IACrBC,SAAS,EAAC,kGAAkG;IAC5GC,cAAc,EAAC,4CAA4C;IAC3D,eAAY,SAAS;IACrBJ,EAAE,EAAEA,EAAG;IACPK,OAAO,EAAE;EAAE,CACZ,CAAC;AAAA,CACH;AAACC,OAAA,CAAAR,OAAA,GAAAA,OAAA","ignoreList":[]}
|
|
@@ -1,3 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _Tooltip = require("./Tooltip");
|
|
7
|
+
Object.keys(_Tooltip).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _Tooltip[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _Tooltip[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _types = require("./types");
|
|
18
|
+
Object.keys(_types).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _types[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _types[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
3
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/Tooltip/index.ts"],"sourcesContent":["export * from './Tooltip';\nexport * from './types';\n"],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["_Tooltip","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_types"],"sources":["../../../../src/components/Tooltip/index.ts"],"sourcesContent":["export * from './Tooltip';\nexport * from './types';\n"],"mappings":";;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,QAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,QAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,QAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,MAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,MAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,MAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,MAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -1,28 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Truncate = void 0;
|
|
7
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _usehooksTs = require("usehooks-ts");
|
|
10
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
const Truncate = exports.Truncate = (0, _react.memo)(_ref => {
|
|
5
13
|
let {
|
|
6
14
|
maxWidth = 150,
|
|
7
15
|
text,
|
|
8
16
|
tooltipId,
|
|
9
17
|
className
|
|
10
18
|
} = _ref;
|
|
11
|
-
const [isTruncated, setIsTruncated] = useState(false);
|
|
12
|
-
const ref = useRef(null);
|
|
13
|
-
const onResize = useDebounceCallback(_ref2 => {
|
|
19
|
+
const [isTruncated, setIsTruncated] = (0, _react.useState)(false);
|
|
20
|
+
const ref = (0, _react.useRef)(null);
|
|
21
|
+
const onResize = (0, _usehooksTs.useDebounceCallback)(_ref2 => {
|
|
14
22
|
let {
|
|
15
23
|
width
|
|
16
24
|
} = _ref2;
|
|
17
25
|
setIsTruncated(width >= maxWidth);
|
|
18
26
|
}, 50);
|
|
19
|
-
useResizeObserver({
|
|
27
|
+
(0, _usehooksTs.useResizeObserver)({
|
|
20
28
|
ref,
|
|
21
29
|
onResize
|
|
22
30
|
});
|
|
23
|
-
return
|
|
31
|
+
return _react.default.createElement("span", {
|
|
24
32
|
ref: ref,
|
|
25
|
-
className:
|
|
33
|
+
className: (0, _classnames.default)('lw-block lw-w-max lw-truncate', className),
|
|
26
34
|
"data-testid": "truncate",
|
|
27
35
|
"data-tooltip-content": text,
|
|
28
36
|
"data-tooltip-id": isTruncated ? tooltipId : undefined,
|
|
@@ -32,5 +40,4 @@ const Truncate = memo(_ref => {
|
|
|
32
40
|
}, text);
|
|
33
41
|
});
|
|
34
42
|
Truncate.displayName = 'Truncate';
|
|
35
|
-
export { Truncate };
|
|
36
43
|
//# sourceMappingURL=Truncate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Truncate.js","names":["
|
|
1
|
+
{"version":3,"file":"Truncate.js","names":["_classnames","_interopRequireDefault","require","_react","_interopRequireWildcard","_usehooksTs","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Truncate","exports","memo","_ref","maxWidth","text","tooltipId","className","isTruncated","setIsTruncated","useState","ref","useRef","onResize","useDebounceCallback","_ref2","width","useResizeObserver","createElement","classnames","undefined","style","displayName"],"sources":["../../../../src/components/Truncate/Truncate.tsx"],"sourcesContent":["import classnames from 'classnames';\nimport React, { memo, useRef, useState } from 'react';\nimport { useDebounceCallback, useResizeObserver } from 'usehooks-ts';\n\nimport type { TruncateProps } from './types';\n\nconst Truncate = memo(\n ({ maxWidth = 150, text, tooltipId, className }: TruncateProps) => {\n const [isTruncated, setIsTruncated] = useState(false);\n const ref = useRef<HTMLAnchorElement>(null);\n\n const onResize = useDebounceCallback(({ width }) => {\n setIsTruncated(width >= maxWidth);\n }, 50);\n\n useResizeObserver({\n ref,\n onResize,\n });\n\n return (\n <span\n ref={ref}\n className={classnames('lw-block lw-w-max lw-truncate', className)}\n data-testid=\"truncate\"\n data-tooltip-content={text}\n data-tooltip-id={isTruncated ? tooltipId : undefined}\n style={{ maxWidth: `${maxWidth}px` }}\n >\n {text}\n </span>\n );\n }\n);\n\nTruncate.displayName = 'Truncate';\n\nexport { Truncate };\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAAqE,SAAAE,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAAA,SAAAN,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAK,UAAA,GAAAL,CAAA,KAAAU,OAAA,EAAAV,CAAA;AAIrE,MAAMmB,QAAQ,GAAAC,OAAA,CAAAD,QAAA,GAAG,IAAAE,WAAI,EACnBC,IAAA,IAAmE;EAAA,IAAlE;IAAEC,QAAQ,GAAG,GAAG;IAAEC,IAAI;IAAEC,SAAS;IAAEC;EAAyB,CAAC,GAAAJ,IAAA;EAC5D,MAAM,CAACK,WAAW,EAAEC,cAAc,CAAC,GAAG,IAAAC,eAAQ,EAAC,KAAK,CAAC;EACrD,MAAMC,GAAG,GAAG,IAAAC,aAAM,EAAoB,IAAI,CAAC;EAE3C,MAAMC,QAAQ,GAAG,IAAAC,+BAAmB,EAACC,KAAA,IAAe;IAAA,IAAd;MAAEC;IAAM,CAAC,GAAAD,KAAA;IAC7CN,cAAc,CAACO,KAAK,IAAIZ,QAAQ,CAAC;EACnC,CAAC,EAAE,EAAE,CAAC;EAEN,IAAAa,6BAAiB,EAAC;IAChBN,GAAG;IACHE;EACF,CAAC,CAAC;EAEF,OACEnC,MAAA,CAAAa,OAAA,CAAA2B,aAAA;IACEP,GAAG,EAAEA,GAAI;IACTJ,SAAS,EAAE,IAAAY,mBAAU,EAAC,+BAA+B,EAAEZ,SAAS,CAAE;IAClE,eAAY,UAAU;IACtB,wBAAsBF,IAAK;IAC3B,mBAAiBG,WAAW,GAAGF,SAAS,GAAGc,SAAU;IACrDC,KAAK,EAAE;MAAEjB,QAAQ,EAAE,GAAGA,QAAQ;IAAK;EAAE,GAEpCC,IACG,CAAC;AAEX,CACF,CAAC;AAEDL,QAAQ,CAACsB,WAAW,GAAG,UAAU","ignoreList":[]}
|
|
@@ -1,3 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _Truncate = require("./Truncate");
|
|
7
|
+
Object.keys(_Truncate).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _Truncate[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _Truncate[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _types = require("./types");
|
|
18
|
+
Object.keys(_types).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _types[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _types[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
3
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/Truncate/index.ts"],"sourcesContent":["export * from './Truncate';\nexport * from './types';\n"],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["_Truncate","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_types"],"sources":["../../../../src/components/Truncate/index.ts"],"sourcesContent":["export * from './Truncate';\nexport * from './types';\n"],"mappings":";;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,SAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,SAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,SAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,MAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,MAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,MAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,MAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.WidgetWrapper = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _Disclaimer = require("../Disclaimer");
|
|
9
|
+
var _Error = require("../Error");
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
const WidgetWrapper = _ref => {
|
|
5
12
|
let {
|
|
6
13
|
children,
|
|
7
14
|
logoLink,
|
|
@@ -12,7 +19,7 @@ export const WidgetWrapper = _ref => {
|
|
|
12
19
|
disclaimer,
|
|
13
20
|
isSlim
|
|
14
21
|
} = _ref;
|
|
15
|
-
return
|
|
22
|
+
return _react.default.createElement(_Disclaimer.Disclaimer, {
|
|
16
23
|
brandingSpace: brandingSpace,
|
|
17
24
|
fitContent: fitContent,
|
|
18
25
|
infoButtonPosition: disclaimer?.position,
|
|
@@ -20,6 +27,7 @@ export const WidgetWrapper = _ref => {
|
|
|
20
27
|
linkArea: linkArea,
|
|
21
28
|
logoLink: logoLink,
|
|
22
29
|
text: disclaimer?.text
|
|
23
|
-
}, isParamError ?
|
|
30
|
+
}, isParamError ? _react.default.createElement(_Error.WidgetError, null) : children);
|
|
24
31
|
};
|
|
32
|
+
exports.WidgetWrapper = WidgetWrapper;
|
|
25
33
|
//# sourceMappingURL=WidgetWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetWrapper.js","names":["
|
|
1
|
+
{"version":3,"file":"WidgetWrapper.js","names":["_react","_interopRequireDefault","require","_Disclaimer","_Error","e","__esModule","default","WidgetWrapper","_ref","children","logoLink","linkArea","brandingSpace","fitContent","isParamError","disclaimer","isSlim","createElement","Disclaimer","infoButtonPosition","position","text","WidgetError","exports"],"sources":["../../../../src/components/WidgetWrapper/WidgetWrapper.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from 'react';\nimport React from 'react';\n\nimport type { WidgetLink, WidgetStyling } from '../../types';\nimport { Disclaimer } from '../Disclaimer';\nimport { WidgetError } from '../Error';\n\nexport type WidgetWrapperProps = PropsWithChildren &\n WidgetLink & {\n isParamError?: boolean | undefined;\n disclaimer?: {\n position?: 'left' | 'top';\n text?: string;\n };\n isSlim?: boolean;\n } & Pick<WidgetStyling, 'brandingSpace' | 'fitContent'>;\n\nexport const WidgetWrapper: FC<WidgetWrapperProps> = ({\n children,\n logoLink,\n linkArea,\n brandingSpace,\n fitContent,\n isParamError,\n disclaimer,\n isSlim,\n}) => (\n <Disclaimer\n brandingSpace={brandingSpace}\n fitContent={fitContent}\n infoButtonPosition={disclaimer?.position}\n isSlim={isSlim}\n linkArea={linkArea}\n logoLink={logoLink}\n text={disclaimer?.text}\n >\n {isParamError ? <WidgetError /> : children}\n </Disclaimer>\n);\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAGA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAAuC,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAYhC,MAAMG,aAAqC,GAAGC,IAAA;EAAA,IAAC;IACpDC,QAAQ;IACRC,QAAQ;IACRC,QAAQ;IACRC,aAAa;IACbC,UAAU;IACVC,YAAY;IACZC,UAAU;IACVC;EACF,CAAC,GAAAR,IAAA;EAAA,OACCT,MAAA,CAAAO,OAAA,CAAAW,aAAA,CAACf,WAAA,CAAAgB,UAAU;IACTN,aAAa,EAAEA,aAAc;IAC7BC,UAAU,EAAEA,UAAW;IACvBM,kBAAkB,EAAEJ,UAAU,EAAEK,QAAS;IACzCJ,MAAM,EAAEA,MAAO;IACfL,QAAQ,EAAEA,QAAS;IACnBD,QAAQ,EAAEA,QAAS;IACnBW,IAAI,EAAEN,UAAU,EAAEM;EAAK,GAEtBP,YAAY,GAAGf,MAAA,CAAAO,OAAA,CAAAW,aAAA,CAACd,MAAA,CAAAmB,WAAW,MAAE,CAAC,GAAGb,QACxB,CAAC;AAAA,CACd;AAACc,OAAA,CAAAhB,aAAA,GAAAA,aAAA","ignoreList":[]}
|
|
@@ -1,2 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _WidgetWrapper = require("./WidgetWrapper");
|
|
7
|
+
Object.keys(_WidgetWrapper).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _WidgetWrapper[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _WidgetWrapper[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
2
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/WidgetWrapper/index.ts"],"sourcesContent":["export * from './WidgetWrapper';\n"],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["_WidgetWrapper","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["../../../../src/components/WidgetWrapper/index.ts"],"sourcesContent":["export * from './WidgetWrapper';\n"],"mappings":";;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,cAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,cAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,cAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.CHART_DEFAULT_POINTS_NUMBER = exports.CELL_EMPTY_VALUE = void 0;
|
|
7
|
+
const CELL_EMPTY_VALUE = exports.CELL_EMPTY_VALUE = '\u2014';
|
|
8
|
+
const CHART_DEFAULT_POINTS_NUMBER = exports.CHART_DEFAULT_POINTS_NUMBER = 10;
|
|
3
9
|
//# sourceMappingURL=constant.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constant.js","names":["CELL_EMPTY_VALUE","CHART_DEFAULT_POINTS_NUMBER"],"sources":["../../../src/components/constant.ts"],"sourcesContent":["export const CELL_EMPTY_VALUE = '\\u2014';\n\nexport const CHART_DEFAULT_POINTS_NUMBER = 10;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"constant.js","names":["CELL_EMPTY_VALUE","exports","CHART_DEFAULT_POINTS_NUMBER"],"sources":["../../../src/components/constant.ts"],"sourcesContent":["export const CELL_EMPTY_VALUE = '\\u2014';\n\nexport const CHART_DEFAULT_POINTS_NUMBER = 10;\n"],"mappings":";;;;;;AAAO,MAAMA,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAG,QAAQ;AAEjC,MAAME,2BAA2B,GAAAD,OAAA,CAAAC,2BAAA,GAAG,EAAE","ignoreList":[]}
|