@gooddata/sdk-ui-dashboard 10.9.0-alpha.10 → 10.9.0-alpha.12
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/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/presentation/constants/index.d.ts +1 -0
- package/esm/presentation/constants/index.d.ts.map +1 -1
- package/esm/presentation/constants/index.js +2 -1
- package/esm/presentation/constants/index.js.map +1 -1
- package/esm/presentation/localization/bundles/en-US.json +130 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertActionsDropdown.d.ts +3 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertActionsDropdown.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertActionsDropdown.js +17 -11
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertActionsDropdown.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertComparisonOperatorSelect.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertComparisonOperatorSelect.js +5 -3
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertComparisonOperatorSelect.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertDeleteDialog.d.ts +7 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertDeleteDialog.d.ts.map +1 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertDeleteDialog.js +13 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertDeleteDialog.js.map +1 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertDestinationSelect.js +2 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertDestinationSelect.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertMeasureSelect.js +2 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertMeasureSelect.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertTriggerModeSelect.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertTriggerModeSelect.js +8 -5
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertTriggerModeSelect.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertsList.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertsList.js +5 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertsList.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertsListItem.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertsListItem.js +2 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertsListItem.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.js +12 -6
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlertConfiguration.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlertConfiguration.js +18 -5
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/EditAlertConfiguration.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/constants.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/constants.js +5 -4
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/constants.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/messages.d.ts +48 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/messages.d.ts.map +1 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/messages.js +50 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/messages.js.map +1 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/useEditAlert.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/useEditAlert.js +5 -3
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/useEditAlert.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/useInsightAlerting.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/useInsightAlerting.js +6 -5
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/useInsightAlerting.js.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils.d.ts +2 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils.js +7 -6
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/utils.js.map +1 -1
- package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/DashboardInsightMenu/DashboardInsightMenuItemButton.d.ts.map +1 -1
- package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/DashboardInsightMenu/DashboardInsightMenuItemButton.js +1 -1
- package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/DashboardInsightMenu/DashboardInsightMenuItemButton.js.map +1 -1
- package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/getDefaultInsightMenuItems.d.ts +1 -0
- package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/getDefaultInsightMenuItems.d.ts.map +1 -1
- package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/getDefaultInsightMenuItems.js +9 -1
- package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/getDefaultInsightMenuItems.js.map +1 -1
- package/esm/presentation/widget/insightMenu/types.d.ts +3 -3
- package/esm/presentation/widget/insightMenu/types.d.ts.map +1 -1
- package/esm/presentation/widget/widget/InsightWidget/DefaultDashboardInsightWidget.js +3 -1
- package/esm/presentation/widget/widget/InsightWidget/DefaultDashboardInsightWidget.js.map +1 -1
- package/esm/presentation/widget/widget/InsightWidget/useInsightMenu.d.ts +1 -0
- package/esm/presentation/widget/widget/InsightWidget/useInsightMenu.d.ts.map +1 -1
- package/esm/presentation/widget/widget/InsightWidget/useInsightMenu.js +12 -9
- package/esm/presentation/widget/widget/InsightWidget/useInsightMenu.js.map +1 -1
- package/esm/sdk-ui-dashboard.d.ts +3 -2
- package/package.json +15 -15
- package/styles/css/alerting.css +13 -11
- package/styles/css/alerting.css.map +1 -1
- package/styles/css/main.css +13 -11
- package/styles/css/main.css.map +1 -1
- package/styles/scss/alerting.scss +15 -11
package/esm/__version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "10.9.0-alpha.
|
|
1
|
+
export declare const LIB_VERSION = "10.9.0-alpha.12";
|
|
2
2
|
//# sourceMappingURL=__version.d.ts.map
|
package/esm/__version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/presentation/constants/index.ts"],"names":[],"mappings":"AAEA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/presentation/constants/index.ts"],"names":[],"mappings":"AAEA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/presentation/constants/index.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/presentation/constants/index.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC"}
|
|
@@ -648,6 +648,11 @@
|
|
|
648
648
|
"comment": "",
|
|
649
649
|
"limit": 0
|
|
650
650
|
},
|
|
651
|
+
"add": {
|
|
652
|
+
"value": "Add",
|
|
653
|
+
"comment": "",
|
|
654
|
+
"limit": 0
|
|
655
|
+
},
|
|
651
656
|
"gs.date.today": {
|
|
652
657
|
"value": "Today",
|
|
653
658
|
"comment": "",
|
|
@@ -2538,5 +2543,130 @@
|
|
|
2538
2543
|
"value": "Cancel",
|
|
2539
2544
|
"comment": "Label of the button that cancels and closes the dialog.",
|
|
2540
2545
|
"limit": 0
|
|
2546
|
+
},
|
|
2547
|
+
"insightAlert.config.action.edit": {
|
|
2548
|
+
"value": "Edit",
|
|
2549
|
+
"comment": "Action in alert configuration",
|
|
2550
|
+
"limit": 0
|
|
2551
|
+
},
|
|
2552
|
+
"insightAlert.config.action.pause": {
|
|
2553
|
+
"value": "Pause",
|
|
2554
|
+
"comment": "Action in alert configuration",
|
|
2555
|
+
"limit": 0
|
|
2556
|
+
},
|
|
2557
|
+
"insightAlert.config.action.resume": {
|
|
2558
|
+
"value": "Resume",
|
|
2559
|
+
"comment": "Action in alert configuration",
|
|
2560
|
+
"limit": 0
|
|
2561
|
+
},
|
|
2562
|
+
"insightAlert.config.action.delete": {
|
|
2563
|
+
"value": "Delete",
|
|
2564
|
+
"comment": "Action in alert configuration",
|
|
2565
|
+
"limit": 0
|
|
2566
|
+
},
|
|
2567
|
+
"insightAlert.config.comparisonOperator.lessThan": {
|
|
2568
|
+
"value": "Is less than",
|
|
2569
|
+
"comment": "Comparison operator in alert configuration",
|
|
2570
|
+
"limit": 0
|
|
2571
|
+
},
|
|
2572
|
+
"insightAlert.config.comparisonOperator.lessThanOrEquals": {
|
|
2573
|
+
"value": "Is less than or equal to",
|
|
2574
|
+
"comment": "Comparison operator in alert configuration",
|
|
2575
|
+
"limit": 0
|
|
2576
|
+
},
|
|
2577
|
+
"insightAlert.config.comparisonOperator.greaterThan": {
|
|
2578
|
+
"value": "Is greater than",
|
|
2579
|
+
"comment": "Comparison operator in alert configuration",
|
|
2580
|
+
"limit": 0
|
|
2581
|
+
},
|
|
2582
|
+
"insightAlert.config.comparisonOperator.greaterThanOrEquals": {
|
|
2583
|
+
"value": "Is greater than or equal to",
|
|
2584
|
+
"comment": "Comparison operator in alert configuration",
|
|
2585
|
+
"limit": 0
|
|
2586
|
+
},
|
|
2587
|
+
"insightAlert.config.alerts": {
|
|
2588
|
+
"value": "Alerts",
|
|
2589
|
+
"comment": "Title of the section in insight configuration",
|
|
2590
|
+
"limit": 0
|
|
2591
|
+
},
|
|
2592
|
+
"insightAlert.config.alert": {
|
|
2593
|
+
"value": "Alert",
|
|
2594
|
+
"comment": "Title of the section in insight configuration",
|
|
2595
|
+
"limit": 0
|
|
2596
|
+
},
|
|
2597
|
+
"insightAlert.config.title": {
|
|
2598
|
+
"value": "Configuration",
|
|
2599
|
+
"comment": "Title of the section in insight configuration",
|
|
2600
|
+
"limit": 0
|
|
2601
|
+
},
|
|
2602
|
+
"insightAlert.config.trigger": {
|
|
2603
|
+
"value": "Trigger",
|
|
2604
|
+
"comment": "Title of the section in insight configuration",
|
|
2605
|
+
"limit": 0
|
|
2606
|
+
},
|
|
2607
|
+
"insightAlert.config.trigger.tooltip": {
|
|
2608
|
+
"value": "Configure when to trigger the alert if the condition is met.",
|
|
2609
|
+
"comment": "Tooltip for alert trigger configuration",
|
|
2610
|
+
"limit": 0
|
|
2611
|
+
},
|
|
2612
|
+
"insightAlert.config.when": {
|
|
2613
|
+
"value": "When",
|
|
2614
|
+
"comment": "Title of the section in insight configuration",
|
|
2615
|
+
"limit": 0
|
|
2616
|
+
},
|
|
2617
|
+
"insightAlert.config.addAlert": {
|
|
2618
|
+
"value": "Add alert",
|
|
2619
|
+
"comment": "Action to create new alert",
|
|
2620
|
+
"limit": 0
|
|
2621
|
+
},
|
|
2622
|
+
"insightAlert.config.triggerMode.always": {
|
|
2623
|
+
"value": "Always",
|
|
2624
|
+
"comment": "How many times alert should be triggered",
|
|
2625
|
+
"limit": 0
|
|
2626
|
+
},
|
|
2627
|
+
"insightAlert.config.triggerMode.once": {
|
|
2628
|
+
"value": "Once",
|
|
2629
|
+
"comment": "How many times alert should be triggered",
|
|
2630
|
+
"limit": 0
|
|
2631
|
+
},
|
|
2632
|
+
"insightAlert.config.delete.success": {
|
|
2633
|
+
"value": "Success. The alert has been deleted.",
|
|
2634
|
+
"comment": "Alert action success message",
|
|
2635
|
+
"limit": 0
|
|
2636
|
+
},
|
|
2637
|
+
"insightAlert.config.resume.success": {
|
|
2638
|
+
"value": "Success. The alert has been resumed.",
|
|
2639
|
+
"comment": "Alert action success message",
|
|
2640
|
+
"limit": 0
|
|
2641
|
+
},
|
|
2642
|
+
"insightAlert.config.pause.success": {
|
|
2643
|
+
"value": "Success. The alert has been paused.",
|
|
2644
|
+
"comment": "Alert action success message",
|
|
2645
|
+
"limit": 0
|
|
2646
|
+
},
|
|
2647
|
+
"insightAlert.config.update.success": {
|
|
2648
|
+
"value": "Success. The alert has been updated.",
|
|
2649
|
+
"comment": "Alert action success message",
|
|
2650
|
+
"limit": 0
|
|
2651
|
+
},
|
|
2652
|
+
"insightAlert.config.add.success": {
|
|
2653
|
+
"value": "Success. The alert has been added.",
|
|
2654
|
+
"comment": "Alert action success message",
|
|
2655
|
+
"limit": 0
|
|
2656
|
+
},
|
|
2657
|
+
"insightAlert.config.delete.title": {
|
|
2658
|
+
"value": "Delete alert?",
|
|
2659
|
+
"comment": "Alert action title",
|
|
2660
|
+
"limit": 0
|
|
2661
|
+
},
|
|
2662
|
+
"insightAlert.config.delete.message": {
|
|
2663
|
+
"value": "The alert for <b>{title}</b> will be permanently deleted.",
|
|
2664
|
+
"comment": "Do not translate html tags <b>, </b> or {title} placeholder",
|
|
2665
|
+
"limit": 0
|
|
2666
|
+
},
|
|
2667
|
+
"insightAlert.noDestination.tooltip": {
|
|
2668
|
+
"value": "No destination available. To add an alert, <a>create destination</a>.",
|
|
2669
|
+
"comment": "Do not translate html tags <a>, </a>",
|
|
2670
|
+
"limit": 0
|
|
2541
2671
|
}
|
|
2542
2672
|
}
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertActionsDropdown.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { IAutomationMetadataObject } from "@gooddata/sdk-model";
|
|
2
3
|
export interface IAlertActionsDropdownProps {
|
|
4
|
+
alert: IAutomationMetadataObject;
|
|
3
5
|
onEdit: () => void;
|
|
4
6
|
onPause: () => void;
|
|
5
7
|
onResume: () => void;
|
|
6
8
|
onDelete: () => void;
|
|
7
9
|
isPaused: boolean;
|
|
8
10
|
}
|
|
9
|
-
export declare const AlertActionsDropdown: ({ onEdit, onPause, onResume, onDelete, isPaused, }: IAlertActionsDropdownProps) => React.JSX.Element;
|
|
11
|
+
export declare const AlertActionsDropdown: ({ alert, onEdit, onPause, onResume, onDelete, isPaused, }: IAlertActionsDropdownProps) => React.JSX.Element;
|
|
10
12
|
//# sourceMappingURL=AlertActionsDropdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertActionsDropdown.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/AlertActionsDropdown.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"AlertActionsDropdown.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/AlertActionsDropdown.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAcxC,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AA4BhE,MAAM,WAAW,0BAA0B;IACvC,KAAK,EAAE,yBAAyB,CAAC;IACjC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,oBAAoB,8DAO9B,0BAA0B,sBAqF5B,CAAC"}
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertActionsDropdown.js
CHANGED
|
@@ -1,30 +1,34 @@
|
|
|
1
1
|
// (C) 2024 GoodData Corporation
|
|
2
|
-
import React from "react";
|
|
2
|
+
import React, { useState } from "react";
|
|
3
3
|
import { Dropdown, Button, List, SingleSelectListItem, Icon, } from "@gooddata/sdk-ui-kit";
|
|
4
4
|
import cx from "classnames";
|
|
5
|
+
import { useIntl } from "react-intl";
|
|
5
6
|
import { DROPDOWN_ITEM_HEIGHT, DROPDOWN_SEPARATOR_ITEM_HEIGHT } from "./constants.js";
|
|
7
|
+
import { messages } from "./messages.js";
|
|
8
|
+
import { AlertDeleteDialog } from "./AlertDeleteDialog.js";
|
|
6
9
|
const ALERT_ACTIONS_DROPDOWN_OPTIONS = [
|
|
7
10
|
{
|
|
8
|
-
title:
|
|
11
|
+
title: messages.alertActionEdit.id,
|
|
9
12
|
id: "edit",
|
|
10
13
|
},
|
|
11
14
|
{
|
|
12
|
-
title:
|
|
15
|
+
title: messages.alertActionPause.id,
|
|
13
16
|
id: "pause",
|
|
14
17
|
},
|
|
15
18
|
{
|
|
16
|
-
title:
|
|
19
|
+
title: messages.alertActionResume.id,
|
|
17
20
|
id: "resume",
|
|
18
21
|
},
|
|
19
22
|
{
|
|
20
23
|
type: "separator",
|
|
21
24
|
},
|
|
22
25
|
{
|
|
23
|
-
title:
|
|
26
|
+
title: messages.alertActionDelete.id,
|
|
24
27
|
id: "delete",
|
|
25
28
|
},
|
|
26
29
|
];
|
|
27
|
-
export const AlertActionsDropdown = ({ onEdit, onPause, onResume, onDelete, isPaused, }) => {
|
|
30
|
+
export const AlertActionsDropdown = ({ alert, onEdit, onPause, onResume, onDelete, isPaused, }) => {
|
|
31
|
+
const intl = useIntl();
|
|
28
32
|
const options = ALERT_ACTIONS_DROPDOWN_OPTIONS.filter((option) => {
|
|
29
33
|
if (option.id === "pause") {
|
|
30
34
|
return !isPaused;
|
|
@@ -34,9 +38,10 @@ export const AlertActionsDropdown = ({ onEdit, onPause, onResume, onDelete, isPa
|
|
|
34
38
|
}
|
|
35
39
|
return true;
|
|
36
40
|
});
|
|
41
|
+
const [showDeleteDialog, setShowDeleteDialog] = useState(false);
|
|
37
42
|
return (React.createElement("div", { className: "gd-alert-actions-dropdown" },
|
|
38
43
|
React.createElement(Dropdown, { renderButton: ({ isOpen, toggleDropdown }) => {
|
|
39
|
-
return (React.createElement(Button, { className: cx("gd-alert-actions-dropdown__button gd-button-link gd-button-icon-only", {
|
|
44
|
+
return (React.createElement(Button, { className: cx("gd-alert-actions-dropdown__button gd-button-link gd-button-icon-only s-alert-actions-button", {
|
|
40
45
|
"gd-alert-actions-dropdown__button--open": isOpen,
|
|
41
46
|
}), onClick: (e) => {
|
|
42
47
|
e.stopPropagation();
|
|
@@ -44,9 +49,9 @@ export const AlertActionsDropdown = ({ onEdit, onPause, onResume, onDelete, isPa
|
|
|
44
49
|
} },
|
|
45
50
|
React.createElement(Icon.Ellipsis, null)));
|
|
46
51
|
}, renderBody: ({ closeDropdown }) => {
|
|
47
|
-
return (React.createElement(List, { width: 80, height: 94, className: "gd-alert-actions-dropdown__list", items: options, itemHeightGetter: (idx) => options[idx].type === "separator"
|
|
52
|
+
return (React.createElement(List, { width: 80, height: 94, className: "gd-alert-actions-dropdown__list s-alert-actions-list", items: options, itemHeightGetter: (idx) => options[idx].type === "separator"
|
|
48
53
|
? DROPDOWN_SEPARATOR_ITEM_HEIGHT
|
|
49
|
-
: DROPDOWN_ITEM_HEIGHT, renderItem: (i) => (React.createElement(SingleSelectListItem, { key: i.rowIndex, title: i.item.title, className: `gd-alert-actions-dropdown__list-item-${i.item.id}`, type: i.item.type, onClick: () => {
|
|
54
|
+
: DROPDOWN_ITEM_HEIGHT, renderItem: (i) => (React.createElement(SingleSelectListItem, { key: i.rowIndex, title: i.item.id ? intl.formatMessage({ id: i.item.title }) : "", className: `gd-alert-actions-dropdown__list-item-${i.item.id}`, type: i.item.type, onClick: () => {
|
|
50
55
|
switch (i.item.id) {
|
|
51
56
|
case "edit":
|
|
52
57
|
onEdit();
|
|
@@ -58,11 +63,12 @@ export const AlertActionsDropdown = ({ onEdit, onPause, onResume, onDelete, isPa
|
|
|
58
63
|
onPause();
|
|
59
64
|
break;
|
|
60
65
|
case "delete":
|
|
61
|
-
|
|
66
|
+
setShowDeleteDialog(true);
|
|
62
67
|
break;
|
|
63
68
|
}
|
|
64
69
|
closeDropdown();
|
|
65
70
|
} })) }));
|
|
66
|
-
} })
|
|
71
|
+
} }),
|
|
72
|
+
showDeleteDialog ? (React.createElement(AlertDeleteDialog, { title: alert.title, onDelete: onDelete, onCancel: () => setShowDeleteDialog(false) })) : null));
|
|
67
73
|
};
|
|
68
74
|
//# sourceMappingURL=AlertActionsDropdown.js.map
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertActionsDropdown.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertActionsDropdown.js","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/AlertActionsDropdown.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AlertActionsDropdown.js","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/AlertActionsDropdown.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EACH,QAAQ,EACR,MAAM,EACN,IA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AE,GAAG,EAAE;4BACV,QAAQ,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;gCAChB,KAAK,MAAM;oCACP,MAAM,EAAE,CAAC;oCACT,MAAM;gCACV,KAAK,QAAQ;oCACT,QAAQ,EAAE,CAAC;oCACX,MAAM;gCACV,KAAK,OAAO;oCACR,OAAO,EAAE,CAAC;oCACV,MAAM;gCACV,KAAK,QAAQ;oCACT,mBAAmB,CAAC,IAAI,CAAC,CAAC;oCAC1B,MAAM;4BACd,CAAC;4BAED,aAAa,EAAE,CAAC;wBACpB,CAAC,GACH,CACL,GACH,CACL,CAAC;YACN,CAAC,GACH;QACD,gBAAgB,CAAC,CAAC,CAAC,CAChB,oBAAC,iBAAiB,IACd,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,KAAK,CAAC,GAC5C,CACL,CAAC,CAAC,CAAC,IAAI,CACN,CACT,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertComparisonOperatorSelect.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/AlertComparisonOperatorSelect.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"AlertComparisonOperatorSelect.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/AlertComparisonOperatorSelect.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAK/D,MAAM,WAAW,mCAAmC;IAChD,0BAA0B,EAAE,wBAAwB,CAAC;IACrD,0BAA0B,EAAE,CAAC,kBAAkB,EAAE,wBAAwB,KAAK,IAAI,CAAC;CACtF;AAED,eAAO,MAAM,6BAA6B,UAAW,mCAAmC,sBAgEvF,CAAC"}
|
|
@@ -3,16 +3,18 @@ import React from "react";
|
|
|
3
3
|
import { Dropdown, Button, List, SingleSelectListItem } from "@gooddata/sdk-ui-kit";
|
|
4
4
|
import cx from "classnames";
|
|
5
5
|
import { COMPARISON_OPERATOR_OPTIONS, DROPDOWN_ITEM_HEIGHT } from "./constants.js";
|
|
6
|
+
import { useIntl } from "react-intl";
|
|
6
7
|
export const AlertComparisonOperatorSelect = (props) => {
|
|
7
8
|
const { selectedComparisonOperator, onComparisonOperatorChange } = props;
|
|
8
9
|
const selectedItem = COMPARISON_OPERATOR_OPTIONS.find((option) => option.id === selectedComparisonOperator);
|
|
10
|
+
const intl = useIntl();
|
|
9
11
|
return (React.createElement("div", { className: "gd-alert-comparison-operator-select" },
|
|
10
12
|
React.createElement(Dropdown, { renderButton: ({ isOpen, toggleDropdown }) => {
|
|
11
|
-
return (React.createElement(Button, { className: cx("gd-alert-comparison-operator-select__button", {
|
|
13
|
+
return (React.createElement(Button, { className: cx("gd-alert-comparison-operator-select__button s-alert-operator-select", {
|
|
12
14
|
"is-active": isOpen,
|
|
13
|
-
}), size: "small", variant: "secondary", iconLeft: selectedItem.icon, iconRight: `gd-icon-navigate${isOpen ? "up" : "down"}`, onClick: toggleDropdown }, selectedItem.title));
|
|
15
|
+
}), size: "small", variant: "secondary", iconLeft: selectedItem.icon, iconRight: `gd-icon-navigate${isOpen ? "up" : "down"}`, onClick: toggleDropdown }, intl.formatMessage({ id: selectedItem.title })));
|
|
14
16
|
}, renderBody: ({ closeDropdown }) => {
|
|
15
|
-
return (React.createElement(List, { className: "gd-alert-comparison-operator-select__list", items: COMPARISON_OPERATOR_OPTIONS, itemHeight: DROPDOWN_ITEM_HEIGHT, renderItem: (i) => (React.createElement(SingleSelectListItem, { key: i.rowIndex, icon: i.item.icon ? (React.createElement("div", { className: cx("gd-alert-comparison-operator-select__icon", i.item.icon) })) : undefined, title: i.item.title, isSelected: i.item === selectedItem, onClick: () => {
|
|
17
|
+
return (React.createElement(List, { className: "gd-alert-comparison-operator-select__list s-alert-operator-select-list", items: COMPARISON_OPERATOR_OPTIONS, itemHeight: DROPDOWN_ITEM_HEIGHT, renderItem: (i) => (React.createElement(SingleSelectListItem, { key: i.rowIndex, icon: i.item.icon ? (React.createElement("div", { className: cx("gd-alert-comparison-operator-select__icon", i.item.icon) })) : undefined, title: intl.formatMessage({ id: i.item.title }), isSelected: i.item === selectedItem, onClick: () => {
|
|
16
18
|
if (i.item.id) {
|
|
17
19
|
onComparisonOperatorChange(i.item.id);
|
|
18
20
|
closeDropdown();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertComparisonOperatorSelect.js","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/AlertComparisonOperatorSelect.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAEpF,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"AlertComparisonOperatorSelect.js","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/AlertComparisonOperatorSelect.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAEpF,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACnF,OAAO,E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E,EAAE,CACT,2CAA2C,EAC3C,CAAC,CAAC,IAAI,CAAC,IAAI,CACd,GACH,CACL,CAAC,CAAC,CAAC,SAAS,EAEjB,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,EAC/C,UAAU,EAAE,CAAC,CAAC,IAAI,KAAK,YAAY,EACnC,OAAO,EAAE,GAAG,EAAE;4BACV,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;gCACZ,0BAA0B,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gCACtC,aAAa,EAAE,CAAC;4BACpB,CAAC;wBACL,CAAC,GACH,CACL,GACH,CACL,CAAC;YACN,CAAC,GACH,CACA,CACT,CAAC;AACN,CAAC,CAAC"}
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertDeleteDialog.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertDeleteDialog.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/AlertDeleteDialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAIzC,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,IAAI,CAAC;IAAC,QAAQ,EAAE,MAAM,IAAI,CAAA;CAAE,CA2BrG,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// (C) 2024 GoodData Corporation
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ConfirmDialog } from "@gooddata/sdk-ui-kit";
|
|
4
|
+
import { FormattedMessage, useIntl } from "react-intl";
|
|
5
|
+
export const AlertDeleteDialog = ({ title, onDelete, onCancel, }) => {
|
|
6
|
+
const intl = useIntl();
|
|
7
|
+
return (React.createElement(ConfirmDialog, { displayCloseButton: true, isPositive: false, headline: intl.formatMessage({ id: "insightAlert.config.delete.title" }), cancelButtonText: intl.formatMessage({ id: "cancel" }), submitButtonText: intl.formatMessage({ id: "delete" }), onSubmit: onDelete, onClose: onCancel, onCancel: onCancel },
|
|
8
|
+
React.createElement(FormattedMessage, { id: "insightAlert.config.delete.message", values: {
|
|
9
|
+
title,
|
|
10
|
+
b: (chunks) => React.createElement("strong", null, chunks),
|
|
11
|
+
} })));
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=AlertDeleteDialog.js.map
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertDeleteDialog.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertDeleteDialog.js","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/AlertDeleteDialog.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAEvD,MAAM,CAAC,MAAM,iBAAiB,GAA4E,CAAC,EACvG,KAAK,EACL,QAAQ,EACR,QAAQ,GACX,EAAE,EAAE;IACD,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IAEvB,OAAO,CACH,oBAAC,aAAa,IACV,kBAAkB,EAAE,IAAI,EACxB,UAAU,EAAE,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,EAAE,EAAE,EAAE,kCAAkC,EAAE,CAAC,EACxE,gBAAgB,EAAE,IAAI,CAAC,aAAa,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,EACtD,gBAAgB,EAAE,IAAI,CAAC,aAAa,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,EACtD,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,QAAQ,EACjB,QAAQ,EAAE,QAAQ;QAElB,oBAAC,gBAAgB,IACb,EAAE,EAAC,oCAAoC,EACvC,MAAM,EAAE;gBACJ,KAAK;gBACL,CAAC,EAAE,CAAC,MAAiB,EAAE,EAAE,CAAC,oCAAS,MAAM,CAAU;aACtD,GACH,CACU,CACnB,CAAC;AACN,CAAC,CAAC"}
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertDestinationSelect.js
CHANGED
|
@@ -7,12 +7,12 @@ export const AlertDestinationSelect = ({ selectedDestination, onDestinationChang
|
|
|
7
7
|
const selectedOption = destinations.find((o) => o.id === selectedDestination);
|
|
8
8
|
return (React.createElement("div", { className: "gd-alert-destination-select" },
|
|
9
9
|
React.createElement(Dropdown, { renderButton: ({ isOpen, toggleDropdown }) => {
|
|
10
|
-
return (React.createElement(Button, { onClick: toggleDropdown, iconRight: isOpen ? "gd-icon-navigateup" : "gd-icon-navigatedown", size: "small", variant: "primary", className: cx("gd-alert-destination-select__button", "button-dropdown", "dropdown-button", {
|
|
10
|
+
return (React.createElement(Button, { onClick: toggleDropdown, iconRight: isOpen ? "gd-icon-navigateup" : "gd-icon-navigatedown", size: "small", variant: "primary", className: cx("gd-alert-destination-select__button s-alert-destination-select", "button-dropdown", "dropdown-button", {
|
|
11
11
|
"gd-alert-destination-select__button--open": isOpen,
|
|
12
12
|
"is-active": isOpen,
|
|
13
13
|
}) }, selectedOption?.title));
|
|
14
14
|
}, renderBody: ({ closeDropdown }) => {
|
|
15
|
-
return (React.createElement(List, { className: "gd-alert-destination-select__list", items: destinations, itemHeight: DROPDOWN_ITEM_HEIGHT, renderItem: (i) => (React.createElement(SingleSelectListItem, { key: i.rowIndex, title: i.item.title, isSelected: i.item.id === selectedDestination, onClick: () => {
|
|
15
|
+
return (React.createElement(List, { className: "gd-alert-destination-select__list s-alert-destination-select-list", items: destinations, itemHeight: DROPDOWN_ITEM_HEIGHT, renderItem: (i) => (React.createElement(SingleSelectListItem, { key: i.rowIndex, title: i.item.title, isSelected: i.item.id === selectedDestination, onClick: () => {
|
|
16
16
|
if (i.item.id !== selectedDestination) {
|
|
17
17
|
onDestinationChange(i.item.id);
|
|
18
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertDestinationSelect.js","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/AlertDestinationSelect.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,oBAAoB,EAAwB,MAAM,gBAAgB,CAAC;AAQ5E,MAAM,CAAC,MAAM,sBAAsB,GAA2C,CAAC,EAC3E,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,GACe,EAAE,EAAE;IAC/B,MAAM,cAAc,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,mBAAmB,CAAC,CAAC;IAE9E,OAAO,CACH,6BAAK,SAAS,EAAC,6BAA6B;QACxC,oBAAC,QAAQ,IACL,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,EAAE,EAAE;gBACzC,OAAO,CACH,oBAAC,MAAM,IACH,OAAO,EAAE,cAAc,EACvB,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,sBAAsB,EACjE,IAAI,EAAC,OAAO,EACZ,OAAO,EAAC,SAAS,EACjB,SAAS,EAAE,EAAE,CACT,
|
|
1
|
+
{"version":3,"file":"AlertDestinationSelect.js","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/AlertDestinationSelect.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,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AC,IAAI,CAAC,KAAK,EACnB,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,mBAAmB,EAC7C,OAAO,EAAE,GAAG,EAAE;4BACV,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,mBAAmB,EAAE,CAAC;gCACpC,mBAAmB,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;4BACnC,CAAC;4BACD,aAAa,EAAE,CAAC;wBACpB,CAAC,GACH,CACL,GACH,CACL,CAAC;YACN,CAAC,GACH,CACA,CACT,CAAC;AACN,CAAC,CAAC"}
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertMeasureSelect.js
CHANGED
|
@@ -9,11 +9,11 @@ export const AlertMeasureSelect = ({ selectedMeasure, onMeasureChange, measures,
|
|
|
9
9
|
const selectedMeasureTitle = getMeasureTitle(selectedMeasure);
|
|
10
10
|
return (React.createElement("div", { className: "gd-alert-measure-select" },
|
|
11
11
|
React.createElement(Dropdown, { renderButton: ({ isOpen, toggleDropdown }) => {
|
|
12
|
-
return (React.createElement(Button, { className: cx("gd-alert-measure-select__button", {
|
|
12
|
+
return (React.createElement(Button, { className: cx("gd-alert-measure-select__button s-alert-measure-select", {
|
|
13
13
|
"is-active": isOpen,
|
|
14
14
|
}), size: "small", variant: "secondary", iconLeft: "gd-icon-metric", iconRight: `gd-icon-navigate${isOpen ? "up" : "down"}`, onClick: toggleDropdown }, selectedMeasureTitle));
|
|
15
15
|
}, renderBody: ({ closeDropdown }) => {
|
|
16
|
-
return (React.createElement(List, { className: "gd-alert-measure-select__list", items: measures, itemHeight: DROPDOWN_ITEM_HEIGHT, renderItem: (i) => (React.createElement(SingleSelectListItem, { key: i.rowIndex, icon: measureIcon, title: getMeasureTitle(i.item), isSelected: i.item === selectedMeasure, onClick: () => {
|
|
16
|
+
return (React.createElement(List, { className: "gd-alert-measure-select__list s-alert-measure-select-list", items: measures, itemHeight: DROPDOWN_ITEM_HEIGHT, renderItem: (i) => (React.createElement(SingleSelectListItem, { key: i.rowIndex, icon: measureIcon, title: getMeasureTitle(i.item), isSelected: i.item === selectedMeasure, onClick: () => {
|
|
17
17
|
onMeasureChange(i.item);
|
|
18
18
|
closeDropdown();
|
|
19
19
|
} })) }));
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertMeasureSelect.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertMeasureSelect.js","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/AlertMeasureSelect.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAEpF,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAQtD,MAAM,WAAW,GAAG,6BAAK,SAAS,EAAC,8CAA8C,GAAG,CAAC;AAErF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EAC/B,eAAe,EACf,eAAe,EACf,QAAQ,GACc,EAAE,EAAE;IAC1B,MAAM,oBAAoB,GAAG,eAAe,CAAC,eAAe,CAAC,CAAC;IAE9D,OAAO,CACH,6BAAK,SAAS,EAAC,yBAAyB;QACpC,oBAAC,QAAQ,IACL,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,EAAE,EAAE;gBACzC,OAAO,CACH,oBAAC,MAAM,IACH,SAAS,EAAE,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"AlertMeasureSelect.js","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/AlertMeasureSelect.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,MAAM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jB,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,EAC9B,UAAU,EAAE,CAAC,CAAC,IAAI,KAAK,eAAe,EACtC,OAAO,EAAE,GAAG,EAAE;4BACV,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;4BACxB,aAAa,EAAE,CAAC;wBACpB,CAAC,GACH,CACL,GACH,CACL,CAAC;YACN,CAAC,GACH,CACA,CACT,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertTriggerModeSelect.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/AlertTriggerModeSelect.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"AlertTriggerModeSelect.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/AlertTriggerModeSelect.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAkBxD,MAAM,WAAW,4BAA4B;IACzC,mBAAmB,EAAE,iBAAiB,CAAC;IACvC,mBAAmB,EAAE,CAAC,WAAW,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACjE;AAED,eAAO,MAAM,sBAAsB,kDAGhC,4BAA4B,sBAkD9B,CAAC"}
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertTriggerModeSelect.js
CHANGED
|
@@ -3,25 +3,28 @@ import React from "react";
|
|
|
3
3
|
import { Dropdown, Button, List, SingleSelectListItem } from "@gooddata/sdk-ui-kit";
|
|
4
4
|
import cx from "classnames";
|
|
5
5
|
import { DROPDOWN_ITEM_HEIGHT } from "./constants.js";
|
|
6
|
+
import { useIntl } from "react-intl";
|
|
7
|
+
import { messages } from "./messages.js";
|
|
6
8
|
const options = [
|
|
7
9
|
{
|
|
8
|
-
title:
|
|
10
|
+
title: messages.alertTriggerModeAlways.id,
|
|
9
11
|
id: "ALWAYS",
|
|
10
12
|
},
|
|
11
13
|
{
|
|
12
|
-
title:
|
|
14
|
+
title: messages.alertTriggerModeOnce.id,
|
|
13
15
|
id: "ONCE",
|
|
14
16
|
},
|
|
15
17
|
];
|
|
16
18
|
export const AlertTriggerModeSelect = ({ selectedTriggerMode, onTriggerModeChange, }) => {
|
|
17
19
|
const selectedOption = options.find((o) => o.id === selectedTriggerMode);
|
|
20
|
+
const intl = useIntl();
|
|
18
21
|
return (React.createElement("div", { className: "gd-alert-trigger-mode-select" },
|
|
19
22
|
React.createElement(Dropdown, { renderButton: ({ isOpen, toggleDropdown }) => {
|
|
20
|
-
return (React.createElement(Button, { onClick: toggleDropdown, iconRight: isOpen ? "gd-icon-navigateup" : "gd-icon-navigatedown", size: "small", variant: "secondary", className: cx("gd-edit-alert-trigger-mode-select__button", {
|
|
23
|
+
return (React.createElement(Button, { onClick: toggleDropdown, iconRight: isOpen ? "gd-icon-navigateup" : "gd-icon-navigatedown", size: "small", variant: "secondary", className: cx("gd-edit-alert-trigger-mode-select__button s-alert-trigger-mode-select", {
|
|
21
24
|
"is-active": isOpen,
|
|
22
|
-
}) }, selectedOption
|
|
25
|
+
}) }, selectedOption ? intl.formatMessage({ id: selectedOption.title }) : ""));
|
|
23
26
|
}, renderBody: ({ closeDropdown }) => {
|
|
24
|
-
return (React.createElement(List, { className: "gd-alert-trigger-mode-select__list", items: options, itemHeight: DROPDOWN_ITEM_HEIGHT, renderItem: (i) => (React.createElement(SingleSelectListItem, { key: i.rowIndex, title: i.item.title, isSelected: i.item === selectedOption, onClick: () => {
|
|
27
|
+
return (React.createElement(List, { className: "gd-alert-trigger-mode-select__list s-alert-trigger-mode-select-list", items: options, itemHeight: DROPDOWN_ITEM_HEIGHT, renderItem: (i) => (React.createElement(SingleSelectListItem, { key: i.rowIndex, title: intl.formatMessage({ id: i.item.title }), isSelected: i.item === selectedOption, onClick: () => {
|
|
25
28
|
if (selectedTriggerMode !== i.item.id) {
|
|
26
29
|
onTriggerModeChange(i.item.id);
|
|
27
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertTriggerModeSelect.js","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/AlertTriggerModeSelect.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"AlertTriggerModeSelect.js","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/AlertTriggerModeSelect.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,MAAM,OAAO,GAGP;IACF;QACI,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,EAAE;QACzC,EAAE,EAAE,QAAQ;KACf;IACD;QACI,KAAK,EAAE,QAAQ,CAAC,oBAAoB,CAAC,EAAE;QACvC,EAAE,EAAE,MAAM;KACb;CACJ,CAAC;AAOF,MAAM,CAAC,MAAM,sBAAs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,mBAAmB,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;gCACpC,mBAAmB,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;4BACnC,CAAC;4BACD,aAAa,EAAE,CAAC;wBACpB,CAAC,GACH,CACL,GACH,CACL,CAAC;YACN,CAAC,GACH,CACA,CACT,CAAC;AACN,CAAC,CAAC"}
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertsList.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertsList.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/AlertsList.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"AlertsList.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/AlertsList.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAMhE,UAAU,gBAAgB;IACtB,MAAM,EAAE,yBAAyB,EAAE,CAAC;IACpC,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,WAAW,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IACxD,YAAY,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IACzD,aAAa,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IAC1D,aAAa,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IAC1D,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA4CjD,CAAC"}
|
|
@@ -3,14 +3,17 @@ import React from "react";
|
|
|
3
3
|
import { Button, SeparatorLine } from "@gooddata/sdk-ui-kit";
|
|
4
4
|
import { AlertsListItem } from "./AlertsListItem.js";
|
|
5
5
|
import { DashboardInsightSubmenuContainer } from "../../../insightMenu/DefaultDashboardInsightMenu/DashboardInsightMenu/DashboardInsightSubmenuContainer.js";
|
|
6
|
+
import { FormattedMessage, useIntl } from "react-intl";
|
|
6
7
|
export const AlertsList = ({ alerts, onCreateAlert, onEditAlert, onPauseAlert, onResumeAlert, onDeleteAlert, onClose, onGoBack, }) => {
|
|
7
|
-
|
|
8
|
+
const intl = useIntl();
|
|
9
|
+
return (React.createElement(DashboardInsightSubmenuContainer, { title: intl.formatMessage({ id: "insightAlert.config.alerts" }), onClose: onClose, onBack: onGoBack },
|
|
8
10
|
React.createElement("div", { className: "gd-alerts-list" },
|
|
9
11
|
React.createElement("div", { className: "gd-alerts-list__items" }, alerts.map((alert) => {
|
|
10
12
|
return (React.createElement(AlertsListItem, { key: alert.id, alert: alert, onEditAlert: onEditAlert, onPauseAlert: onPauseAlert, onResumeAlert: onResumeAlert, onDeleteAlert: onDeleteAlert }));
|
|
11
13
|
})),
|
|
12
14
|
React.createElement(SeparatorLine, { pL: 10, pR: 10 }),
|
|
13
15
|
React.createElement("div", { className: "gd-alerts-list__buttons" },
|
|
14
|
-
React.createElement(Button, { className: "gd-button gd-button-link gd-icon-plus", onClick: () => onCreateAlert() },
|
|
16
|
+
React.createElement(Button, { className: "gd-button gd-button-link gd-icon-plus s-alert-add", onClick: () => onCreateAlert() },
|
|
17
|
+
React.createElement(FormattedMessage, { id: "insightAlert.config.addAlert" }))))));
|
|
15
18
|
};
|
|
16
19
|
//# sourceMappingURL=AlertsList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertsList.js","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/AlertsList.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,gCAAgC,EAAE,MAAM,2GAA2G,CAAC;
|
|
1
|
+
{"version":3,"file":"AlertsList.js","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/AlertsList.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,gCAAgC,EAAE,MAAM,2GAA2G,CAAC;AAC7J,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAavD,MAAM,CAAC,MAAM,UAAU,GAA+B,CAAC,EACnD,MAAM,EACN,aAAa,EACb,WAAW,EACX,YAAY,EACZ,aAAa,EACb,aAAa,EACb,OAAO,EACP,QAAQ,GACX,EAAE,EAAE;IACD,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IACvB,OAAO,CACH,oBAAC,gCAAgC,IAC7B,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,EAAE,EAAE,EAAE,4BAA4B,EAAE,CAAC,EAC/D,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,QAAQ;QAEhB,6BAAK,SAAS,EAAC,gBAAgB;YAC3B,6BAAK,SAAS,EAAC,uBAAuB,IACjC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;gBAClB,OAAO,CACH,oBAAC,cAAc,IACX,GAAG,EAAE,KAAK,CAAC,EAAE,EACb,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,EAC5B,aAAa,EAAE,aAAa,GAC9B,CACL,CAAC;YACN,CAAC,CAAC,CACA;YACN,oBAAC,aAAa,IAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAI;YACjC,6BAAK,SAAS,EAAC,yBAAyB;gBACpC,oBAAC,MAAM,IACH,SAAS,EAAC,mDAAmD,EAC7D,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,EAAE;oBAE9B,oBAAC,gBAAgB,IAAC,EAAE,EAAC,8BAA8B,GAAG,CACjD,CACP,CACJ,CACyB,CACtC,CAAC;AACN,CAAC,CAAC"}
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertsListItem.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertsListItem.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/AlertsListItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAIhE,UAAU,oBAAoB;IAC1B,KAAK,EAAE,yBAAyB,CAAC;IACjC,WAAW,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IACxD,YAAY,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IACzD,aAAa,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IAC1D,aAAa,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;CAC7D;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,
|
|
1
|
+
{"version":3,"file":"AlertsListItem.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/AlertsListItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAIhE,UAAU,oBAAoB;IAC1B,KAAK,EAAE,yBAAyB,CAAC;IACjC,WAAW,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IACxD,YAAY,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IACzD,aAAa,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IAC1D,aAAa,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;CAC7D;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA+BzD,CAAC"}
|
|
@@ -5,12 +5,12 @@ import { AlertActionsDropdown } from "./AlertActionsDropdown.js";
|
|
|
5
5
|
export const AlertsListItem = ({ alert, onEditAlert, onPauseAlert, onDeleteAlert, onResumeAlert, }) => {
|
|
6
6
|
const isPaused = alert.alert?.trigger?.state === "PAUSED";
|
|
7
7
|
return (React.createElement("div", { className: "gd-alerts-list-item", key: alert.id, onClick: () => onEditAlert(alert) },
|
|
8
|
-
React.createElement("div", { className: "gd-alerts-list-item__content" },
|
|
8
|
+
React.createElement("div", { className: "gd-alerts-list-item__content s-alert-list-item" },
|
|
9
9
|
React.createElement("div", { className: "gd-alerts-list-item__icon" }, isPaused ? React.createElement(Icon.AlertPaused, null) : React.createElement(Icon.Alert, null)),
|
|
10
10
|
React.createElement("div", { className: "gd-alerts-list-item__details" },
|
|
11
11
|
React.createElement("div", { className: "gd-alerts-list-item__title" }, alert.title),
|
|
12
12
|
React.createElement("div", { className: "gd-alerts-list-item__description" }, alert.description))),
|
|
13
13
|
React.createElement("div", { className: "gd-alerts-list-item__actions" },
|
|
14
|
-
React.createElement(AlertActionsDropdown, { onEdit: () => onEditAlert(alert), onPause: () => onPauseAlert(alert), onDelete: () => onDeleteAlert(alert), onResume: () => onResumeAlert(alert), isPaused: isPaused }))));
|
|
14
|
+
React.createElement(AlertActionsDropdown, { alert: alert, onEdit: () => onEditAlert(alert), onPause: () => onPauseAlert(alert), onDelete: () => onDeleteAlert(alert), onResume: () => onResumeAlert(alert), isPaused: isPaused }))));
|
|
15
15
|
};
|
|
16
16
|
//# sourceMappingURL=AlertsListItem.js.map
|
package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertsListItem.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertsListItem.js","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/AlertsListItem.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAUjE,MAAM,CAAC,MAAM,cAAc,GAAmC,CAAC,EAC3D,KAAK,EACL,WAAW,EACX,YAAY,EACZ,aAAa,EACb,aAAa,GAChB,EAAE,EAAE;IACD,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,KAAK,QAAQ,CAAC;IAC1D,OAAO,CACH,6BAAK,SAAS,EAAC,qBAAqB,EAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC;QACjF,6BAAK,SAAS,EAAC,
|
|
1
|
+
{"version":3,"file":"AlertsListItem.js","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/AlertsListItem.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAUjE,MAAM,CAAC,MAAM,cAAc,GAAmC,CAAC,EAC3D,KAAK,EACL,WAAW,EACX,YAAY,EACZ,aAAa,EACb,aAAa,GAChB,EAAE,EAAE;IACD,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,KAAK,QAAQ,CAAC;IAC1D,OAAO,CACH,6BAAK,SAAS,EAAC,qBAAqB,EAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC;QACjF,6BAAK,SAAS,EAAC,gDAAgD;YAC3D,6BAAK,SAAS,EAAC,2BAA2B,IACrC,QAAQ,CAAC,CAAC,CAAC,oBAAC,IAAI,CAAC,WAAW,OAAG,CAAC,CAAC,CAAC,oBAAC,IAAI,CAAC,KAAK,OAAG,CAC/C;YACN,6BAAK,SAAS,EAAC,8BAA8B;gBACzC,6BAAK,SAAS,EAAC,4BAA4B,IAAE,KAAK,CAAC,KAAK,CAAO;gBAC/D,6BAAK,SAAS,EAAC,kCAAkC,IAAE,KAAK,CAAC,WAAW,CAAO,CACzE,CACJ;QACN,6BAAK,SAAS,EAAC,8BAA8B;YACzC,oBAAC,oBAAoB,IACjB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,EAChC,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,EAClC,QAAQ,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,EACpC,QAAQ,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,EACpC,QAAQ,EAAE,QAAQ,GACpB,CACA,CACJ,CACT,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACH,yBAAyB,EACzB,mCAAmC,EACnC,QAAQ,EACX,MAAM,qBAAqB,CAAC;AAO7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"EditAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/widget/insight/configuration/InsightAlertConfig/EditAlert.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACH,yBAAyB,EACzB,mCAAmC,EACnC,QAAQ,EACX,MAAM,qBAAqB,CAAC;AAO7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAItD,UAAU,eAAe;IACrB,KAAK,EAAE,yBAAyB,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,oBAAoB,EAAE,CAAC;IACrC,QAAQ,EAAE,QAAQ,EAAE,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,mCAAmC,KAAK,IAAI,CAAC;IAChE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;CACzD;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAkH/C,CAAC"}
|