@gooddata/sdk-ui-dashboard 11.47.0-alpha.1 → 11.47.0-alpha.2
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/NOTICE +5 -5
- package/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +1 -1
- package/esm/model/store/config/configSelectors.d.ts +0 -6
- package/esm/model/store/config/configSelectors.d.ts.map +1 -1
- package/esm/model/store/config/configSelectors.js +0 -8
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts +0 -3
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.js +0 -3
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts +0 -3
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.js +0 -3
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts +0 -3
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.js +0 -3
- package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts +0 -20
- package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/en-US.localization-bundle.js +0 -20
- package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts +0 -3
- package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/es-419.localization-bundle.js +0 -3
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts +0 -3
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.js +0 -3
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts +0 -3
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.js +0 -3
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts +0 -3
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.js +0 -3
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts +0 -3
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.js +0 -3
- package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts +0 -3
- package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/id-ID.localization-bundle.js +0 -3
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts +0 -3
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.js +0 -3
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts +0 -3
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.js +0 -3
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts +0 -3
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.js +0 -3
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts +0 -3
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.js +0 -3
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts +0 -3
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.js +0 -3
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts +0 -3
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.js +0 -3
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts +0 -3
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.js +0 -3
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts +0 -3
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.js +0 -3
- package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts +0 -3
- package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/sl-SI.localization-bundle.js +0 -3
- package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts +0 -3
- package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/th-TH.localization-bundle.js +0 -3
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts +0 -3
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.js +0 -3
- package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts +0 -3
- package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/uk-UA.localization-bundle.js +0 -3
- package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts +0 -3
- package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/vi-VN.localization-bundle.js +0 -3
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts +0 -3
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.js +0 -3
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts +0 -3
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.js +0 -3
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts +0 -3
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.js +0 -3
- package/esm/presentation/widget/insight/configuration/InsightDrillConfigItem.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightDrillConfigItem.js +2 -41
- package/esm/sdk-ui-dashboard.d.ts +0 -7
- package/package.json +21 -21
- package/styles/css/drillConfigPanel.css +0 -70
- package/styles/css/drillConfigPanel.css.map +1 -1
- package/styles/css/main.css +0 -70
- package/styles/css/main.css.map +1 -1
- package/styles/scss/drillConfigPanel.scss +0 -79
- package/esm/presentation/widget/insight/configuration/DrillIntersectionIgnoredAttributes.d.ts +0 -8
- package/esm/presentation/widget/insight/configuration/DrillIntersectionIgnoredAttributes.d.ts.map +0 -1
- package/esm/presentation/widget/insight/configuration/DrillIntersectionIgnoredAttributes.js +0 -48
- package/esm/presentation/widget/insight/configuration/DrillIntersectionIgnoredAttributesSelect.d.ts +0 -23
- package/esm/presentation/widget/insight/configuration/DrillIntersectionIgnoredAttributesSelect.d.ts.map +0 -1
- package/esm/presentation/widget/insight/configuration/DrillIntersectionIgnoredAttributesSelect.js +0 -77
|
@@ -827,85 +827,6 @@ $gd-gd-drill-to-url-body-width: 230px;
|
|
|
827
827
|
padding: 0 0 10px;
|
|
828
828
|
}
|
|
829
829
|
|
|
830
|
-
.gd-drill-intersection-ignored-attributes-select-section {
|
|
831
|
-
display: flex;
|
|
832
|
-
align-items: center;
|
|
833
|
-
margin-top: 5px;
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
.gd-drill-intersection-ignored-attributes-select-label {
|
|
837
|
-
white-space: nowrap;
|
|
838
|
-
overflow: hidden;
|
|
839
|
-
width: 100%;
|
|
840
|
-
text-overflow: ellipsis;
|
|
841
|
-
font-size: 12px;
|
|
842
|
-
line-height: 16.4px;
|
|
843
|
-
color: kit-variables.$gd-color-link;
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
.gd-drill-intersection-ignored-attributes-select {
|
|
847
|
-
.input-radio-label .input-label-text,
|
|
848
|
-
.input-checkbox-label .input-label-text {
|
|
849
|
-
display: inline;
|
|
850
|
-
font-size: 12px;
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
.gd-drill-intersection-ignored-attributes-select-item-icon {
|
|
854
|
-
margin-right: 5px;
|
|
855
|
-
vertical-align: middle;
|
|
856
|
-
width: 14px;
|
|
857
|
-
height: 14px;
|
|
858
|
-
|
|
859
|
-
&-date {
|
|
860
|
-
path {
|
|
861
|
-
fill: kit-variables.$gd-palette-primary-base;
|
|
862
|
-
}
|
|
863
|
-
}
|
|
864
|
-
}
|
|
865
|
-
}
|
|
866
|
-
|
|
867
|
-
.gd-drill-intersection-ignored-attributes-select-title {
|
|
868
|
-
padding: 5px 10px;
|
|
869
|
-
width: 100%;
|
|
870
|
-
background-color: kit-variables.$is-focused-background;
|
|
871
|
-
color: kit-variables.$gd-color-state-blank;
|
|
872
|
-
line-height: 15px;
|
|
873
|
-
font-size: 11px;
|
|
874
|
-
font-weight: 700;
|
|
875
|
-
height: 35px;
|
|
876
|
-
display: flex;
|
|
877
|
-
align-items: center;
|
|
878
|
-
text-transform: uppercase;
|
|
879
|
-
margin-bottom: 5px;
|
|
880
|
-
}
|
|
881
|
-
|
|
882
|
-
.gd-drill-intersection-ignored-attributes-select-title-tooltip {
|
|
883
|
-
margin-left: 5px;
|
|
884
|
-
margin-top: 2px;
|
|
885
|
-
|
|
886
|
-
path {
|
|
887
|
-
fill: kit-variables.$gd-color-state-blank;
|
|
888
|
-
}
|
|
889
|
-
}
|
|
890
|
-
|
|
891
|
-
.gd-drill-intersection-ignored-attributes-select-title-tooltip-content {
|
|
892
|
-
width: 190px;
|
|
893
|
-
}
|
|
894
|
-
|
|
895
|
-
.drill-config-target .gd-button-small.gd-drill-intersection-ignored-attributes-select-button {
|
|
896
|
-
margin-top: 0;
|
|
897
|
-
width: 95px;
|
|
898
|
-
|
|
899
|
-
&:not(&.gd-is-open, &:hover, &:active, &:focus) {
|
|
900
|
-
box-shadow: none;
|
|
901
|
-
border-color: transparent;
|
|
902
|
-
}
|
|
903
|
-
|
|
904
|
-
&:not(&.gd-is-open, &:active, &:focus) {
|
|
905
|
-
background: transparent;
|
|
906
|
-
}
|
|
907
|
-
}
|
|
908
|
-
|
|
909
830
|
.gd-drill-filters-config-inner {
|
|
910
831
|
display: flex;
|
|
911
832
|
flex-direction: column;
|
package/esm/presentation/widget/insight/configuration/DrillIntersectionIgnoredAttributes.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type DRILL_TARGET_TYPE, type IDrillConfigItem } from "../../../drill/types.js";
|
|
2
|
-
export interface IDrillIntersectionIgnoredAttributesProps {
|
|
3
|
-
item: IDrillConfigItem;
|
|
4
|
-
onChange: (ignoredAttributes: string[]) => void;
|
|
5
|
-
drillTargetType?: DRILL_TARGET_TYPE;
|
|
6
|
-
}
|
|
7
|
-
export declare function DrillIntersectionIgnoredAttributes({ item, onChange, drillTargetType }: IDrillIntersectionIgnoredAttributesProps): import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
-
//# sourceMappingURL=DrillIntersectionIgnoredAttributes.d.ts.map
|
package/esm/presentation/widget/insight/configuration/DrillIntersectionIgnoredAttributes.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DrillIntersectionIgnoredAttributes.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/insight/configuration/DrillIntersectionIgnoredAttributes.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAOxF,MAAM,WAAW,wCAAwC;IACrD,IAAI,EAAE,gBAAgB,CAAC;IACvB,QAAQ,EAAE,CAAC,iBAAiB,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAChD,eAAe,CAAC,EAAE,iBAAiB,CAAC;CACvC;AAED,wBAAgB,kCAAkC,CAAC,EAC/C,IAAI,EACJ,QAAQ,EACR,eAAe,EAClB,EAAE,wCAAwC,kDAgE1C"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// (C) 2020-2026 GoodData Corporation
|
|
3
|
-
import { FormattedMessage } from "react-intl";
|
|
4
|
-
import { areObjRefsEqual, bucketsAttributes, insightBuckets } from "@gooddata/sdk-model";
|
|
5
|
-
import { useDashboardSelector } from "../../../../model/react/DashboardStoreProvider.js";
|
|
6
|
-
import { selectCatalogAttributeDisplayForms, selectCatalogDateDatasets, } from "../../../../model/store/catalog/catalogSelectors.js";
|
|
7
|
-
import { selectInsightByWidgetRef } from "../../../../model/store/insights/insightsSelectors.js";
|
|
8
|
-
import { DrillIntersectionIgnoredAttributesSelect, } from "./DrillIntersectionIgnoredAttributesSelect.js";
|
|
9
|
-
export function DrillIntersectionIgnoredAttributes({ item, onChange, drillTargetType, }) {
|
|
10
|
-
const insight = useDashboardSelector(selectInsightByWidgetRef(item.widgetRef));
|
|
11
|
-
const insightAttributes = bucketsAttributes(insight ? insightBuckets(insight) : []);
|
|
12
|
-
const allCatalogDisplayForms = useDashboardSelector(selectCatalogAttributeDisplayForms);
|
|
13
|
-
const allDateDatasets = useDashboardSelector(selectCatalogDateDatasets);
|
|
14
|
-
const allCatalogDateAttributeDisplayForms = allDateDatasets
|
|
15
|
-
.flatMap((ds) => ds.dateAttributes)
|
|
16
|
-
.flatMap((da) => da.defaultDisplayForm);
|
|
17
|
-
const displayForms = insightAttributes.map((idf) => {
|
|
18
|
-
const catalogAttr = allCatalogDisplayForms.find((df) => areObjRefsEqual(df.ref, idf.attribute.displayForm));
|
|
19
|
-
const catalogDateAttribute = allCatalogDateAttributeDisplayForms.find((df) => areObjRefsEqual(df.ref, idf.attribute.displayForm));
|
|
20
|
-
const type = catalogDateAttribute ? "date" : "attribute";
|
|
21
|
-
return {
|
|
22
|
-
insightAttr: idf,
|
|
23
|
-
catalogAttr: catalogAttr ?? catalogDateAttribute,
|
|
24
|
-
type,
|
|
25
|
-
};
|
|
26
|
-
});
|
|
27
|
-
const options = displayForms.map((df) => ({
|
|
28
|
-
id: df.insightAttr.attribute.localIdentifier,
|
|
29
|
-
title: df.catalogAttr?.title ?? "",
|
|
30
|
-
type: df.type,
|
|
31
|
-
}));
|
|
32
|
-
const selection = item.drillIntersectionIgnoredAttributes?.map((id) => {
|
|
33
|
-
const option = options.find((o) => o.id === id);
|
|
34
|
-
return {
|
|
35
|
-
id,
|
|
36
|
-
title: option?.title ?? "",
|
|
37
|
-
type: option?.type ?? "attribute",
|
|
38
|
-
};
|
|
39
|
-
}) ?? [];
|
|
40
|
-
if (insightAttributes.length === 0) {
|
|
41
|
-
return null;
|
|
42
|
-
}
|
|
43
|
-
return (_jsxs("div", { className: "gd-drill-intersection-ignored-attributes-select-section", children: [
|
|
44
|
-
_jsx("div", { className: "gd-drill-intersection-ignored-attributes-select-label", children: _jsx(FormattedMessage, { id: "configurationPanel.drillConfig.drillIntersectionIgnoredAttributes.label" }) }), _jsx(DrillIntersectionIgnoredAttributesSelect, { drillTargetType: drillTargetType, initialSelection: selection, options: options, onApply: (selection) => {
|
|
45
|
-
onChange(selection.map((s) => s.id));
|
|
46
|
-
} })
|
|
47
|
-
] }));
|
|
48
|
-
}
|
package/esm/presentation/widget/insight/configuration/DrillIntersectionIgnoredAttributesSelect.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { DRILL_TARGET_TYPE } from "../../../drill/types.js";
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
*/
|
|
5
|
-
export interface IDrillIntersectionIgnoredAttributesSelectOption {
|
|
6
|
-
id: string;
|
|
7
|
-
title: string;
|
|
8
|
-
type: "attribute" | "date";
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* @internal
|
|
12
|
-
*/
|
|
13
|
-
export interface IDrillIntersectionIgnoredAttributesSelectProps {
|
|
14
|
-
options: IDrillIntersectionIgnoredAttributesSelectOption[];
|
|
15
|
-
initialSelection?: IDrillIntersectionIgnoredAttributesSelectOption[];
|
|
16
|
-
onApply: (selection: IDrillIntersectionIgnoredAttributesSelectOption[]) => void;
|
|
17
|
-
drillTargetType?: DRILL_TARGET_TYPE;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* @internal
|
|
21
|
-
*/
|
|
22
|
-
export declare function DrillIntersectionIgnoredAttributesSelect({ options, initialSelection, onApply, drillTargetType }: IDrillIntersectionIgnoredAttributesSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
//# sourceMappingURL=DrillIntersectionIgnoredAttributesSelect.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DrillIntersectionIgnoredAttributesSelect.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/insight/configuration/DrillIntersectionIgnoredAttributesSelect.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAU5D;;GAEG;AACH,MAAM,WAAW,+CAA+C;IAC5D,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,WAAW,GAAG,MAAM,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,8CAA8C;IAC3D,OAAO,EAAE,+CAA+C,EAAE,CAAC;IAC3D,gBAAgB,CAAC,EAAE,+CAA+C,EAAE,CAAC;IACrE,OAAO,EAAE,CAAC,SAAS,EAAE,+CAA+C,EAAE,KAAK,IAAI,CAAC;IAChF,eAAe,CAAC,EAAE,iBAAiB,CAAC;CACvC;AAED;;GAEG;AACH,wBAAgB,wCAAwC,CAAC,EACrD,OAAO,EACP,gBAAqB,EACrB,OAAO,EACP,eAAe,EAClB,EAAE,8CAA8C,2CAkIhD"}
|
package/esm/presentation/widget/insight/configuration/DrillIntersectionIgnoredAttributesSelect.js
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// (C) 2020-2025 GoodData Corporation
|
|
3
|
-
import { useState } from "react";
|
|
4
|
-
import cx from "classnames";
|
|
5
|
-
import { differenceBy } from "lodash-es";
|
|
6
|
-
import { FormattedMessage } from "react-intl";
|
|
7
|
-
import { Bubble, BubbleHoverTrigger, Button, Dropdown, IconAttribute, IconDate, IconQuestionMark, InvertableSelect, InvertableSelectItem, } from "@gooddata/sdk-ui-kit";
|
|
8
|
-
import { DRILL_TARGET_TYPE } from "../../../drill/types.js";
|
|
9
|
-
const ALIGN_POINTS = [
|
|
10
|
-
{ align: "cr tl", offset: { x: 3, y: 0 } },
|
|
11
|
-
{ align: "bc tl", offset: { x: 3, y: 0 } },
|
|
12
|
-
{ align: "tc bl", offset: { x: 3, y: 0 } },
|
|
13
|
-
{ align: "tc br", offset: { x: 3, y: 0 } },
|
|
14
|
-
{ align: "bc tr", offset: { x: 3, y: 0 } },
|
|
15
|
-
];
|
|
16
|
-
/**
|
|
17
|
-
* @internal
|
|
18
|
-
*/
|
|
19
|
-
export function DrillIntersectionIgnoredAttributesSelect({ options, initialSelection = [], onApply, drillTargetType, }) {
|
|
20
|
-
const [isInverted, setIsInverted] = useState(true);
|
|
21
|
-
const [selection, setSelection] = useState(initialSelection);
|
|
22
|
-
const appliedSelection = isInverted ? selection : differenceBy(options, selection, "id");
|
|
23
|
-
const shownSelection = isInverted ? differenceBy(options, appliedSelection, "id") : selection;
|
|
24
|
-
return (_jsx(Dropdown, { onOpenStateChanged: (open) => {
|
|
25
|
-
if (!open) {
|
|
26
|
-
onApply(appliedSelection);
|
|
27
|
-
}
|
|
28
|
-
}, renderBody: () => {
|
|
29
|
-
return (_jsx(InvertableSelect, { className: "gd-drill-intersection-ignored-attributes-select", onSelect: (items, isInverted) => {
|
|
30
|
-
setSelection(items);
|
|
31
|
-
setIsInverted(isInverted);
|
|
32
|
-
}, items: options, getItemTitle: (item) => item.title, getItemKey: (item) => item.id, isInverted: isInverted, selectedItems: selection, totalItemsCount: options.length, renderItem: ({ title, item, onSelect, onDeselect, isSelected }) => {
|
|
33
|
-
const isDisabled = item.type === "date" &&
|
|
34
|
-
drillTargetType === DRILL_TARGET_TYPE.DRILL_TO_DASHBOARD;
|
|
35
|
-
let iconComponent = () => null;
|
|
36
|
-
if (item.type === "date") {
|
|
37
|
-
iconComponent = IconDate;
|
|
38
|
-
}
|
|
39
|
-
else if (item.type === "attribute") {
|
|
40
|
-
iconComponent = IconAttribute;
|
|
41
|
-
}
|
|
42
|
-
const IconComponent = iconComponent;
|
|
43
|
-
return (_jsx(InvertableSelectItem, { title: title, renderOnly: () => _jsx(_Fragment, {}), isDisabled: isDisabled, isSelected: !isDisabled && isSelected, icon: _jsx(IconComponent, { className: cx("gd-drill-intersection-ignored-attributes-select-item-icon", `gd-drill-intersection-ignored-attributes-select-item-icon-${item.type}`) }), onClick: () => {
|
|
44
|
-
if (isDisabled) {
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
if (isSelected) {
|
|
48
|
-
onDeselect();
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
onSelect();
|
|
52
|
-
}
|
|
53
|
-
} }));
|
|
54
|
-
}, renderStatusBar: () => _jsx(_Fragment, {}), renderSearchBar: () => (_jsxs("div", { className: "gd-drill-intersection-ignored-attributes-select-title", children: [
|
|
55
|
-
_jsx(FormattedMessage, { id: "configurationPanel.drillConfig.drillIntersectionIgnoredAttributes.dropdown.title" }), _jsxs(BubbleHoverTrigger, { children: [
|
|
56
|
-
_jsx(IconQuestionMark, { className: "gd-drill-intersection-ignored-attributes-select-title-tooltip", width: 12, height: 12 }), _jsx(Bubble, { alignPoints: ALIGN_POINTS, children: _jsx("div", { className: "gd-drill-intersection-ignored-attributes-select-title-tooltip-content", children: _jsx(FormattedMessage, { id: "configurationPanel.drillConfig.drillIntersectionIgnoredAttributes.dropdown.tooltip" }) }) })
|
|
57
|
-
] })
|
|
58
|
-
] })) }));
|
|
59
|
-
}, renderButton: ({ toggleDropdown, isOpen }) => {
|
|
60
|
-
let title = "";
|
|
61
|
-
if (isInverted && selection.length === 0) {
|
|
62
|
-
title = (_jsx(FormattedMessage, { id: "configurationPanel.drillConfig.drillIntersectionIgnoredAttributes.dropdown.all" }));
|
|
63
|
-
}
|
|
64
|
-
else if ((!isInverted && selection.length === 0) ||
|
|
65
|
-
(isInverted && selection.length === options.length)) {
|
|
66
|
-
title = (_jsx(FormattedMessage, { id: "configurationPanel.drillConfig.drillIntersectionIgnoredAttributes.dropdown.none" }));
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
title = shownSelection.map((s) => s.title).join(", ");
|
|
70
|
-
}
|
|
71
|
-
return (_jsx(Button, { onClick: toggleDropdown, iconRight: isOpen ? "gd-icon-navigateup" : "gd-icon-navigatedown", size: "small", variant: "primary", className: cx("gd-drill-intersection-ignored-attributes-select-button", "button-dropdown", "dropdown-button", {
|
|
72
|
-
"gd-is-open": isOpen,
|
|
73
|
-
"is-active": isOpen,
|
|
74
|
-
}), children: _jsxs(BubbleHoverTrigger, { children: [title, _jsx(Bubble, { children: title })
|
|
75
|
-
] }) }));
|
|
76
|
-
} }));
|
|
77
|
-
}
|