@gooddata/sdk-ui-kit 11.54.0-alpha.3 → 11.54.0-alpha.4
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/Dropdown/customDictionary.d.ts +5 -0
- package/esm/Dropdown/customDictionary.d.ts.map +1 -0
- package/esm/Dropdown/customDictionary.js +6 -0
- package/esm/Dropdown/testUtils.d.ts +15 -0
- package/esm/Dropdown/testUtils.d.ts.map +1 -0
- package/esm/Dropdown/testUtils.js +23 -0
- package/esm/Header/mock.d.ts +5 -0
- package/esm/Header/mock.d.ts.map +1 -0
- package/esm/Header/mock.js +42 -0
- package/esm/List/customDictionary.d.ts +17 -0
- package/esm/List/customDictionary.d.ts.map +1 -0
- package/esm/List/customDictionary.js +18 -0
- package/esm/SettingWidget/mocks.d.ts +6 -0
- package/esm/SettingWidget/mocks.d.ts.map +1 -0
- package/esm/SettingWidget/mocks.js +174 -0
- package/package.json +11 -11
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customDictionary.d.ts","sourceRoot":"","sources":["../../src/Dropdown/customDictionary.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc;;;CAG1B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// (C) 2020-2026 GoodData Corporation
|
|
2
|
+
// TODO remove this adhoc translations when NoData component will have own dictionary and dont rely on provided Intl from top
|
|
3
|
+
export const customMessages = {
|
|
4
|
+
"gs.noData.noMatchingData": "No matching data",
|
|
5
|
+
"gs.noData.noDataAvailable": "No data available",
|
|
6
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type JSX, type ReactElement } from "react";
|
|
2
|
+
export interface IComponentMock<T> {
|
|
3
|
+
id: string;
|
|
4
|
+
selector: string;
|
|
5
|
+
component: (props: T) => ReactElement;
|
|
6
|
+
componentWithProps: (mapProps: (props: T) => JSX.IntrinsicElements["div"]) => (props: T) => ReactElement;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Creates a placeholder component & selector from the string.
|
|
10
|
+
* Useful to avoid duplicity & hardcoded selectors in tests, when mocking components
|
|
11
|
+
*
|
|
12
|
+
* @param id - component id
|
|
13
|
+
*/
|
|
14
|
+
export declare function componentMock<T>(id?: string): IComponentMock<T>;
|
|
15
|
+
//# sourceMappingURL=testUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testUtils.d.ts","sourceRoot":"","sources":["../../src/Dropdown/testUtils.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAIpD,MAAM,WAAW,cAAc,CAAC,CAAC;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,YAAY,CAAC;IACtC,kBAAkB,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,KAAK,YAAY,CAAC;CAC5G;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,EAAE,SAA0B,GAAG,cAAc,CAAC,CAAC,CAAC,CAehF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { v4 as uuid } from "uuid";
|
|
3
|
+
/**
|
|
4
|
+
* Creates a placeholder component & selector from the string.
|
|
5
|
+
* Useful to avoid duplicity & hardcoded selectors in tests, when mocking components
|
|
6
|
+
*
|
|
7
|
+
* @param id - component id
|
|
8
|
+
*/
|
|
9
|
+
export function componentMock(id = `s-component-${uuid()}`) {
|
|
10
|
+
return {
|
|
11
|
+
id,
|
|
12
|
+
selector: `#${id}`,
|
|
13
|
+
component: function MockComponent() {
|
|
14
|
+
return _jsx("div", { id: id });
|
|
15
|
+
},
|
|
16
|
+
componentWithProps: (mapProps) => {
|
|
17
|
+
function MockComponent(props) {
|
|
18
|
+
return _jsx("div", { id: id, ...mapProps(props) });
|
|
19
|
+
}
|
|
20
|
+
return MockComponent;
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type ISettings, type IWorkspacePermissions, type PlatformEdition } from "@gooddata/sdk-model";
|
|
2
|
+
export declare const getHelpMenuFeatureFlagsMock: (enableUniversityHelpMenuItem: boolean, enableCommunityHelpMenuItem: boolean) => ISettings;
|
|
3
|
+
export declare const getAccountMenuFeatureFlagsMock: (enableDataSection: boolean, platformEdition: PlatformEdition) => ISettings;
|
|
4
|
+
export declare const getWorkspacePermissionsMock: (canInitData: boolean, canManageMetric: boolean, canManageProject?: boolean) => IWorkspacePermissions;
|
|
5
|
+
//# sourceMappingURL=mock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock.d.ts","sourceRoot":"","sources":["../../src/Header/mock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,qBAAqB,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEvG,eAAO,MAAM,2BAA2B,4FAQvC,CAAC;AAEF,eAAO,MAAM,8BAA8B,6EAQ1C,CAAC;AAEF,eAAO,MAAM,2BAA2B,uGAgCvC,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// (C) 2021-2026 GoodData Corporation
|
|
2
|
+
export const getHelpMenuFeatureFlagsMock = (enableUniversityHelpMenuItem, enableCommunityHelpMenuItem) => {
|
|
3
|
+
return {
|
|
4
|
+
enableUniversityHelpMenuItem,
|
|
5
|
+
enableCommunityHelpMenuItem,
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
export const getAccountMenuFeatureFlagsMock = (enableDataSection, platformEdition) => {
|
|
9
|
+
return {
|
|
10
|
+
enableDataSection,
|
|
11
|
+
platformEdition,
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export const getWorkspacePermissionsMock = (canInitData, canManageMetric, canManageProject = true) => {
|
|
15
|
+
return {
|
|
16
|
+
canAccessWorkbench: true,
|
|
17
|
+
canCreateAnalyticalDashboard: true,
|
|
18
|
+
canCreateReport: true,
|
|
19
|
+
canInitData,
|
|
20
|
+
canCreateScheduledMail: true,
|
|
21
|
+
canCreateVisualization: true,
|
|
22
|
+
canExecuteRaw: true,
|
|
23
|
+
canExportReport: true,
|
|
24
|
+
canExportTabular: true,
|
|
25
|
+
canExportPdf: true,
|
|
26
|
+
canListUsersInProject: true,
|
|
27
|
+
canManageAnalyticalDashboard: true,
|
|
28
|
+
canManageDomain: true,
|
|
29
|
+
canCreateMetric: canManageProject,
|
|
30
|
+
canManageMetric,
|
|
31
|
+
canManageProject,
|
|
32
|
+
canManageReport: true,
|
|
33
|
+
canManageScheduledMail: true,
|
|
34
|
+
canUploadNonProductionCSV: true,
|
|
35
|
+
canInviteUserToProject: true,
|
|
36
|
+
canRefreshData: true,
|
|
37
|
+
canManageACL: true,
|
|
38
|
+
canCreateAutomation: false,
|
|
39
|
+
canCreateFilterView: false,
|
|
40
|
+
canUseAiAssistant: false,
|
|
41
|
+
};
|
|
42
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const customMessages: {
|
|
2
|
+
"gs.list.clear": string;
|
|
3
|
+
"gs.list.only": string;
|
|
4
|
+
"gs.list.all": string;
|
|
5
|
+
"gs.list.is": string;
|
|
6
|
+
"gs.list.searchResults": string;
|
|
7
|
+
"gs.list.selectAll": string;
|
|
8
|
+
"gs.list.except": string;
|
|
9
|
+
"gs.list.isNot": string;
|
|
10
|
+
"gs.list.selected": string;
|
|
11
|
+
"gs.list.limitExceeded": string;
|
|
12
|
+
"gs.list.noItemsFound": string;
|
|
13
|
+
"gs.list.empty.value": string;
|
|
14
|
+
"gs.list.notAvailableAbbreviation": string;
|
|
15
|
+
"gs.filterLabel.none": string;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=customDictionary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customDictionary.d.ts","sourceRoot":"","sources":["../../src/List/customDictionary.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;CAe1B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// (C) 2020-2026 GoodData Corporation
|
|
2
|
+
// TODO remove this adhoc translations when List components will have own dictionary and dont rely on provided Intl from top
|
|
3
|
+
export const customMessages = {
|
|
4
|
+
"gs.list.clear": "Clear",
|
|
5
|
+
"gs.list.only": "Only",
|
|
6
|
+
"gs.list.all": "All",
|
|
7
|
+
"gs.list.is": "is",
|
|
8
|
+
"gs.list.searchResults": "search results",
|
|
9
|
+
"gs.list.selectAll": "Select all",
|
|
10
|
+
"gs.list.except": "except",
|
|
11
|
+
"gs.list.isNot": "is not",
|
|
12
|
+
"gs.list.selected": "selected",
|
|
13
|
+
"gs.list.limitExceeded": "Sorry, you have exceeded the limit ({limit}).",
|
|
14
|
+
"gs.list.noItemsFound": "No items found.",
|
|
15
|
+
"gs.list.empty.value": "empty value",
|
|
16
|
+
"gs.list.notAvailableAbbreviation": "N/A",
|
|
17
|
+
"gs.filterLabel.none": "None",
|
|
18
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ITheme } from "@gooddata/sdk-model";
|
|
2
|
+
import { type IStylingPickerItem } from "../Dialog/StylingEditorDialog/StylingEditorDialog.js";
|
|
3
|
+
export declare const defaultItemMock: IStylingPickerItem<ITheme>;
|
|
4
|
+
export declare const customItemsMock: IStylingPickerItem<ITheme>[];
|
|
5
|
+
export declare const fullyDefinedThemeMock: ITheme;
|
|
6
|
+
//# sourceMappingURL=mocks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mocks.d.ts","sourceRoot":"","sources":["../../src/SettingWidget/mocks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,MAAM,EAAS,MAAM,qBAAqB,CAAC;AAEzD,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,sDAAsD,CAAC;AAE/F,eAAO,MAAM,eAAe,EAAE,kBAAkB,CAAC,MAAM,CAiBtD,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,kBAAkB,CAAC,MAAM,CAAC,EAyCvD,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,MA+GnC,CAAC"}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
// (C) 2022-2026 GoodData Corporation
|
|
2
|
+
import { idRef } from "@gooddata/sdk-model";
|
|
3
|
+
export const defaultItemMock = {
|
|
4
|
+
ref: idRef("default-theme"),
|
|
5
|
+
name: "Default theme",
|
|
6
|
+
content: {
|
|
7
|
+
palette: {
|
|
8
|
+
primary: {
|
|
9
|
+
base: "#14b2e2",
|
|
10
|
+
},
|
|
11
|
+
complementary: {
|
|
12
|
+
c0: "#fff",
|
|
13
|
+
c1: "#303442",
|
|
14
|
+
c7: "#778491",
|
|
15
|
+
c8: "#464e56",
|
|
16
|
+
c9: "#000",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
export const customItemsMock = [
|
|
22
|
+
{
|
|
23
|
+
ref: idRef("theme1"),
|
|
24
|
+
name: "First theme",
|
|
25
|
+
content: {
|
|
26
|
+
palette: {
|
|
27
|
+
complementary: {
|
|
28
|
+
c0: "#292727",
|
|
29
|
+
c1: "#323232",
|
|
30
|
+
c2: "#424242",
|
|
31
|
+
c3: "#4E4E4E",
|
|
32
|
+
c4: "#5F5F5F",
|
|
33
|
+
c5: "#7B7B7B",
|
|
34
|
+
c6: "#A0A0A0",
|
|
35
|
+
c7: "#B9B9B9",
|
|
36
|
+
c8: "#D6D6D6",
|
|
37
|
+
c9: "#EAEAEA",
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
ref: idRef("theme2"),
|
|
44
|
+
name: "Second theme",
|
|
45
|
+
content: {
|
|
46
|
+
palette: {
|
|
47
|
+
complementary: {
|
|
48
|
+
c0: "#122330",
|
|
49
|
+
c1: "#1C3447",
|
|
50
|
+
c2: "#264156",
|
|
51
|
+
c3: "#324F65",
|
|
52
|
+
c4: "#40617B",
|
|
53
|
+
c5: "#4A6C89",
|
|
54
|
+
c6: "#779DBB",
|
|
55
|
+
c7: "#9DBFDA",
|
|
56
|
+
c8: "#C3DDF1",
|
|
57
|
+
c9: "#F0F8FF",
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
];
|
|
63
|
+
export const fullyDefinedThemeMock = {
|
|
64
|
+
analyticalDesigner: {
|
|
65
|
+
title: {
|
|
66
|
+
color: "#000",
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
button: {
|
|
70
|
+
borderRadius: "15",
|
|
71
|
+
dropShadow: true,
|
|
72
|
+
textCapitalization: true,
|
|
73
|
+
},
|
|
74
|
+
dashboards: {
|
|
75
|
+
content: {
|
|
76
|
+
backgroundColor: "#dfdfdf",
|
|
77
|
+
kpiWidget: {
|
|
78
|
+
backgroundColor: "#1b4096",
|
|
79
|
+
borderColor: "#000",
|
|
80
|
+
borderRadius: "4",
|
|
81
|
+
borderWidth: "1",
|
|
82
|
+
dropShadow: false,
|
|
83
|
+
kpi: {
|
|
84
|
+
primaryMeasureColor: "#fff",
|
|
85
|
+
secondaryInfoColor: "#eba12a",
|
|
86
|
+
},
|
|
87
|
+
title: {
|
|
88
|
+
color: "#fff",
|
|
89
|
+
textAlign: "left",
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
widget: {
|
|
93
|
+
borderColor: "#1b4096",
|
|
94
|
+
borderRadius: "50",
|
|
95
|
+
borderWidth: "1",
|
|
96
|
+
dropShadow: false,
|
|
97
|
+
title: {
|
|
98
|
+
color: "#101010",
|
|
99
|
+
textAlign: "center",
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
filterBar: {
|
|
104
|
+
backgroundColor: "#f0f0f0",
|
|
105
|
+
filterButton: {
|
|
106
|
+
backgroundColor: "#dfdfdf",
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
navigation: {
|
|
110
|
+
backgroundColor: "#f0f0f0",
|
|
111
|
+
borderColor: "#1b4096",
|
|
112
|
+
item: {
|
|
113
|
+
color: "#101010",
|
|
114
|
+
hoverColor: "#000",
|
|
115
|
+
selectedBackgroundColor: "#1b4096",
|
|
116
|
+
selectedColor: "#fff",
|
|
117
|
+
},
|
|
118
|
+
title: {
|
|
119
|
+
color: "#000",
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
section: {
|
|
123
|
+
description: {
|
|
124
|
+
color: "#101010",
|
|
125
|
+
},
|
|
126
|
+
title: {
|
|
127
|
+
color: "#000000",
|
|
128
|
+
lineColor: "#dde4eb",
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
title: {
|
|
132
|
+
color: "#ff0000",
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
modal: {
|
|
136
|
+
borderColor: "#14b2e2",
|
|
137
|
+
borderRadius: "50px",
|
|
138
|
+
borderWidth: "15",
|
|
139
|
+
dropShadow: false,
|
|
140
|
+
outsideBackgroundColor: "#ffffbf",
|
|
141
|
+
title: {
|
|
142
|
+
color: "#1b4096",
|
|
143
|
+
lineColor: "#000",
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
palette: {
|
|
147
|
+
error: {
|
|
148
|
+
base: "#ff2e5f",
|
|
149
|
+
},
|
|
150
|
+
info: {
|
|
151
|
+
base: "#00f",
|
|
152
|
+
contrast: "rgba(255,0,0,0.5)",
|
|
153
|
+
dark: "rgb(0,0,125)",
|
|
154
|
+
light: "rgb(100,100,255)",
|
|
155
|
+
},
|
|
156
|
+
primary: {
|
|
157
|
+
base: "#eba12a",
|
|
158
|
+
},
|
|
159
|
+
success: {
|
|
160
|
+
base: "#13ed4d",
|
|
161
|
+
},
|
|
162
|
+
warning: {
|
|
163
|
+
base: "#ddff19",
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
tooltip: {
|
|
167
|
+
backgroundColor: "#101010",
|
|
168
|
+
color: "#fff",
|
|
169
|
+
},
|
|
170
|
+
typography: {
|
|
171
|
+
font: "local('Trebuchet MS')",
|
|
172
|
+
fontBold: "url(https://cdn.jsdelivr.net/npm/roboto-font@0.1.0/fonts/Roboto/roboto-bold-webfont.ttf)",
|
|
173
|
+
},
|
|
174
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-kit",
|
|
3
|
-
"version": "11.54.0-alpha.
|
|
3
|
+
"version": "11.54.0-alpha.4",
|
|
4
4
|
"description": "GoodData SDK - UI Building Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "GoodData Corporation",
|
|
@@ -78,11 +78,11 @@
|
|
|
78
78
|
"unified": "^11.0.5",
|
|
79
79
|
"uuid": "11.1.1",
|
|
80
80
|
"yaml": "2.8.3",
|
|
81
|
-
"@gooddata/sdk-backend-spi": "11.54.0-alpha.
|
|
82
|
-
"@gooddata/sdk-
|
|
83
|
-
"@gooddata/sdk-
|
|
84
|
-
"@gooddata/sdk-ui": "11.54.0-alpha.
|
|
85
|
-
"@gooddata/util": "11.54.0-alpha.
|
|
81
|
+
"@gooddata/sdk-backend-spi": "11.54.0-alpha.4",
|
|
82
|
+
"@gooddata/sdk-ui": "11.54.0-alpha.4",
|
|
83
|
+
"@gooddata/sdk-model": "11.54.0-alpha.4",
|
|
84
|
+
"@gooddata/sdk-ui-theme-provider": "11.54.0-alpha.4",
|
|
85
|
+
"@gooddata/util": "11.54.0-alpha.4"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
88
|
"@microsoft/api-documenter": "^7.17.0",
|
|
@@ -131,11 +131,11 @@
|
|
|
131
131
|
"typescript": "5.9.3",
|
|
132
132
|
"vitest": "4.1.8",
|
|
133
133
|
"vitest-dom": "0.1.1",
|
|
134
|
-
"@gooddata/eslint-config": "11.54.0-alpha.
|
|
135
|
-
"@gooddata/oxlint-config": "11.54.0-alpha.
|
|
136
|
-
"@gooddata/reference-workspace": "11.54.0-alpha.
|
|
137
|
-
"@gooddata/
|
|
138
|
-
"@gooddata/
|
|
134
|
+
"@gooddata/eslint-config": "11.54.0-alpha.4",
|
|
135
|
+
"@gooddata/oxlint-config": "11.54.0-alpha.4",
|
|
136
|
+
"@gooddata/reference-workspace": "11.54.0-alpha.4",
|
|
137
|
+
"@gooddata/sdk-backend-mockingbird": "11.54.0-alpha.4",
|
|
138
|
+
"@gooddata/stylelint-config": "11.54.0-alpha.4"
|
|
139
139
|
},
|
|
140
140
|
"peerDependencies": {
|
|
141
141
|
"react": "^18.0.0 || ^19.0.0",
|