@gooddata/sdk-ui-dashboard 11.18.0-alpha.5 → 11.18.0-alpha.7

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.
Files changed (61) hide show
  1. package/NOTICE +12 -12
  2. package/esm/__version.d.ts +1 -1
  3. package/esm/__version.js +1 -1
  4. package/esm/index.d.ts +5 -3
  5. package/esm/index.d.ts.map +1 -1
  6. package/esm/index.js +1 -0
  7. package/esm/index.js.map +1 -1
  8. package/esm/kdaDialog/dialog/KdaDialog.d.ts.map +1 -1
  9. package/esm/kdaDialog/dialog/KdaDialog.js +4 -2
  10. package/esm/kdaDialog/dialog/KdaDialog.js.map +1 -1
  11. package/esm/plugins/customizationApis/customizationBuilder.d.ts.map +1 -1
  12. package/esm/plugins/customizationApis/customizationBuilder.js +3 -0
  13. package/esm/plugins/customizationApis/customizationBuilder.js.map +1 -1
  14. package/esm/plugins/customizationApis/filterGroupsCustomizer.d.ts +23 -0
  15. package/esm/plugins/customizationApis/filterGroupsCustomizer.d.ts.map +1 -0
  16. package/esm/plugins/customizationApis/filterGroupsCustomizer.js +110 -0
  17. package/esm/plugins/customizationApis/filterGroupsCustomizer.js.map +1 -0
  18. package/esm/plugins/customizationApis/filtersCustomizer.d.ts +3 -0
  19. package/esm/plugins/customizationApis/filtersCustomizer.d.ts.map +1 -1
  20. package/esm/plugins/customizationApis/filtersCustomizer.js +8 -1
  21. package/esm/plugins/customizationApis/filtersCustomizer.js.map +1 -1
  22. package/esm/plugins/customizer.d.ts +16 -1
  23. package/esm/plugins/customizer.d.ts.map +1 -1
  24. package/esm/presentation/dashboard/components/DashboardRenderer.d.ts.map +1 -1
  25. package/esm/presentation/dashboard/components/DashboardRenderer.js +2 -2
  26. package/esm/presentation/dashboard/components/DashboardRenderer.js.map +1 -1
  27. package/esm/presentation/dashboard/hooks/useDashboard.d.ts +2 -1
  28. package/esm/presentation/dashboard/hooks/useDashboard.d.ts.map +1 -1
  29. package/esm/presentation/dashboard/hooks/useDashboard.js +7 -1
  30. package/esm/presentation/dashboard/hooks/useDashboard.js.map +1 -1
  31. package/esm/presentation/dashboard/types.d.ts +16 -1
  32. package/esm/presentation/dashboard/types.d.ts.map +1 -1
  33. package/esm/presentation/dashboard/types.js.map +1 -1
  34. package/esm/presentation/dashboardContexts/DashboardComponentsContext.d.ts +2 -1
  35. package/esm/presentation/dashboardContexts/DashboardComponentsContext.d.ts.map +1 -1
  36. package/esm/presentation/dashboardContexts/DashboardComponentsContext.js +1 -0
  37. package/esm/presentation/dashboardContexts/DashboardComponentsContext.js.map +1 -1
  38. package/esm/presentation/dashboardContexts/types.d.ts +10 -2
  39. package/esm/presentation/dashboardContexts/types.d.ts.map +1 -1
  40. package/esm/presentation/filterBar/attributeFilter/DefaultDashboardAttributeFilter.js +2 -2
  41. package/esm/presentation/filterBar/attributeFilter/DefaultDashboardAttributeFilter.js.map +1 -1
  42. package/esm/presentation/filterBar/attributeFilter/types.d.ts +27 -0
  43. package/esm/presentation/filterBar/attributeFilter/types.d.ts.map +1 -1
  44. package/esm/presentation/filterBar/filterBar/DefaultDashboardFilterGroup.d.ts +7 -0
  45. package/esm/presentation/filterBar/filterBar/DefaultDashboardFilterGroup.d.ts.map +1 -0
  46. package/esm/presentation/filterBar/filterBar/DefaultDashboardFilterGroup.js +85 -0
  47. package/esm/presentation/filterBar/filterBar/DefaultDashboardFilterGroup.js.map +1 -0
  48. package/esm/presentation/filterBar/filterBar/DefaultFilterBarItem.d.ts.map +1 -1
  49. package/esm/presentation/filterBar/filterBar/DefaultFilterBarItem.js +4 -3
  50. package/esm/presentation/filterBar/filterBar/DefaultFilterBarItem.js.map +1 -1
  51. package/esm/presentation/filterBar/filterBar/useFiltersWithAddedPlaceholder.d.ts +6 -0
  52. package/esm/presentation/filterBar/filterBar/useFiltersWithAddedPlaceholder.d.ts.map +1 -1
  53. package/esm/presentation/filterBar/filterBar/useFiltersWithAddedPlaceholder.js.map +1 -1
  54. package/esm/sdk-ui-dashboard.d.ts +116 -0
  55. package/package.json +18 -18
  56. package/styles/css/main.css +16 -0
  57. package/styles/css/main.css.map +1 -1
  58. package/esm/presentation/filterBar/filterBar/DashboardFilterGroup.d.ts +0 -15
  59. package/esm/presentation/filterBar/filterBar/DashboardFilterGroup.d.ts.map +0 -1
  60. package/esm/presentation/filterBar/filterBar/DashboardFilterGroup.js +0 -44
  61. package/esm/presentation/filterBar/filterBar/DashboardFilterGroup.js.map +0 -1
@@ -77,6 +77,7 @@ import { IDashboardDateFilterConfig as IDashboardDateFilterConfig_2 } from '@goo
77
77
  import { IDashboardDateFilterConfigItem } from '@gooddata/sdk-model';
78
78
  import { IDashboardDefinition } from '@gooddata/sdk-model';
79
79
  import { IDashboardExportPresentationOptions } from '@gooddata/sdk-backend-spi';
80
+ import { IDashboardFilterGroup } from '@gooddata/sdk-model';
80
81
  import { IDashboardFilterGroupsConfig } from '@gooddata/sdk-model';
81
82
  import { IDashboardFilterReference } from '@gooddata/sdk-model';
82
83
  import { IDashboardFilterView } from '@gooddata/sdk-model';
@@ -1633,6 +1634,11 @@ export declare type CustomDashboardContentComponent = ComponentType<IDashboardCo
1633
1634
  */
1634
1635
  export declare type CustomDashboardDateFilterComponent = ComponentType<IDashboardDateFilterProps>;
1635
1636
 
1637
+ /**
1638
+ * @public
1639
+ */
1640
+ export declare type CustomDashboardFilterGroupComponent = ComponentType<IDashboardFilterGroupProps>;
1641
+
1636
1642
  /**
1637
1643
  * @public
1638
1644
  */
@@ -3550,6 +3556,11 @@ export declare function DefaultDashboardDateFilterComponentSetFactory(dateFilter
3550
3556
  */
3551
3557
  export declare function DefaultDashboardExportVariables({ renderMode }: IDefaultDashboardExportVariablesProps): JSX.Element | null;
3552
3558
 
3559
+ /**
3560
+ * @alpha
3561
+ */
3562
+ export declare function DefaultDashboardFilterGroup(props: IDashboardFilterGroupProps): ReactNode;
3563
+
3553
3564
  /**
3554
3565
  * Default implementation of the Dashboard Insight widget.
3555
3566
  *
@@ -4487,11 +4498,43 @@ export declare type FilterableDashboardWidget = IWidget | ICustomWidget;
4487
4498
  */
4488
4499
  export declare function FilterBar(props: IFilterBarProps): ReactElement;
4489
4500
 
4501
+ /**
4502
+ * @internal
4503
+ */
4504
+ export declare type FilterBarAttributeFilterIndexed = {
4505
+ filter: IDashboardAttributeFilter;
4506
+ filterIndex: number;
4507
+ workingFilter?: IDashboardAttributeFilter;
4508
+ };
4509
+
4490
4510
  /**
4491
4511
  * @public
4492
4512
  */
4493
4513
  export declare type FilterBarComponentProvider = (props: IFilterBarProps) => CustomFilterBarComponent;
4494
4514
 
4515
+ /**
4516
+ * @internal
4517
+ */
4518
+ export declare type FilterBarDateFilterIndexed = {
4519
+ filter: IDashboardDateFilter;
4520
+ filterIndex: number;
4521
+ workingFilter?: IDashboardDateFilter;
4522
+ };
4523
+
4524
+ /**
4525
+ * @internal
4526
+ */
4527
+ export declare type FilterBarFilterPlaceholder = {
4528
+ type: "filterPlaceholder";
4529
+ filterIndex: number;
4530
+ displayForm?: ObjRef;
4531
+ };
4532
+
4533
+ /**
4534
+ * @internal
4535
+ */
4536
+ export declare type FilterBarItem = FilterBarFilterPlaceholder | FilterBarAttributeFilterIndexed | FilterBarDateFilterIndexed | IFilterBarFilterGroupItem;
4537
+
4495
4538
  /**
4496
4539
  * Mode of rendering of the FilterBar.
4497
4540
  *
@@ -4627,6 +4670,11 @@ export declare function filterContextToDashboardFiltersByDateDataSet(filterConte
4627
4670
  */
4628
4671
  export declare function filterContextToDashboardFiltersByWidget(filterContext: IFilterContextDefinition | IFilterContext | ITempFilterContext | undefined, widget: IWidgetDefinition): IDashboardFilter[];
4629
4672
 
4673
+ /**
4674
+ * @public
4675
+ */
4676
+ export declare type FilterGroupComponentProvider = (filterGroup: IDashboardFilterGroup) => CustomDashboardFilterGroupComponent;
4677
+
4630
4678
  /**
4631
4679
  * @beta
4632
4680
  */
@@ -6630,6 +6678,20 @@ export declare interface IDashboardAttributeFilterProps {
6630
6678
  * multiple tabs need to be displayed simultaneously.
6631
6679
  */
6632
6680
  tabId?: string;
6681
+ /**
6682
+ * Controls whether the internal implementation of dashboard filter dropdown button should be used.
6683
+ * When true (default), the AttributeFilterButton will receive a DropdownButtonComponent.
6684
+ * When false, the AttributeFilterButton will not receive a DropdownButtonComponent
6685
+ * and therefore can be overridden by the custom component.
6686
+ *
6687
+ * This is useful when extending DashboardAttributeFilterComponent
6688
+ * and want to use a different default dropdown button component internally
6689
+ * but still want to make possible to customize the dropdown button component by user.
6690
+ * Note: It is used in DashboardFilterGroupComponent.
6691
+ *
6692
+ * @alpha
6693
+ */
6694
+ passDropdownButton?: boolean;
6633
6695
  }
6634
6696
 
6635
6697
  /**
@@ -7354,6 +7416,8 @@ export declare interface IDashboardCustomComponentProps {
7354
7416
  * - If not provided, the default implementation {@link DefaultDashboardAttributeFilter} will be used.
7355
7417
  * - If factory function is provided and it returns undefined, then the default implementation {@link DefaultDashboardAttributeFilter}.
7356
7418
  * This is useful if you want to customize just one particular filter and keep all other filters the same.
7419
+ * - Note this only affects attribute filter directly placed in filter bar. Filters placed in filter groups are not affected.
7420
+ * To customize filters in filter groups, use DashboardFilterGroupComponentProvider.
7357
7421
  *
7358
7422
  * @example
7359
7423
  * Here is how to override the component for all filters:
@@ -7370,6 +7434,19 @@ export declare interface IDashboardCustomComponentProps {
7370
7434
  * @alpha
7371
7435
  */
7372
7436
  DashboardDateFilterComponentProvider?: OptionalDateFilterComponentProvider;
7437
+ /**
7438
+ * Specify custom component to use for rendering all filter groups or a factory function to customize the component
7439
+ * per different filter group.
7440
+ *
7441
+ * - If not provided, the default implementation {@link DefaultDashboardFilterGroup} will be used.
7442
+ * - If factory function is provided and it returns undefined, then the default implementation {@link DefaultDashboardFilterGroup}.
7443
+ * This is useful if you want to customize just one particular filter group and keep all other filter groups the same.
7444
+ * - If you want to customize each filter in a filter group, use this provider and customize DefaultDashboardFilterGroup in it.
7445
+ * It accepts some customization props fro deeper component.
7446
+ *
7447
+ * @alpha
7448
+ */
7449
+ DashboardFilterGroupComponentProvider?: OptionalFilterGroupComponentProvider;
7373
7450
  /**
7374
7451
  * Specify function to obtain custom component to use for extend rendering of dashboard content.
7375
7452
  *
@@ -8587,6 +8664,15 @@ export declare interface IDashboardFilterContextSelectionReset extends IDashboar
8587
8664
  readonly type: "GDC.DASH/EVT.FILTER_CONTEXT.SELECTION.RESET";
8588
8665
  }
8589
8666
 
8667
+ /**
8668
+ * @public
8669
+ */
8670
+ export declare interface IDashboardFilterGroupProps {
8671
+ groupItem: IFilterBarFilterGroupItem;
8672
+ onAttributeFilterChanged: (filter: IDashboardAttributeFilter) => void;
8673
+ DashboardAttributeFilterComponent?: CustomDashboardAttributeFilterComponent;
8674
+ }
8675
+
8590
8676
  /**
8591
8677
  * This event is emitted after a dashboard filter view application failed.
8592
8678
  *
@@ -12242,6 +12328,15 @@ export declare interface IFilterBarCustomizer {
12242
12328
  withCustomDecorator(providerFactory: (next: FilterBarComponentProvider) => OptionalFilterBarComponentProvider): IFilterBarCustomizer;
12243
12329
  }
12244
12330
 
12331
+ /**
12332
+ * @alpha
12333
+ */
12334
+ export declare interface IFilterBarFilterGroupItem {
12335
+ filterIndex: number;
12336
+ groupConfig: IDashboardFilterGroup;
12337
+ filters: FilterBarItem[];
12338
+ }
12339
+
12245
12340
  /**
12246
12341
  * @alpha
12247
12342
  */
@@ -12281,6 +12376,18 @@ export declare interface IFilterBarProps {
12281
12376
  DefaultFilterBar: ComponentType<IFilterBarProps>;
12282
12377
  }
12283
12378
 
12379
+ /**
12380
+ * Set of functions you can use to customize how filter groups are rendered.
12381
+ *
12382
+ * @public
12383
+ */
12384
+ export declare interface IFilterGroupsCustomizer {
12385
+ /**
12386
+ * Register a provider for React components to render filter groups.
12387
+ */
12388
+ withCustomProvider(provider: OptionalFilterGroupComponentProvider): IFilterGroupsCustomizer;
12389
+ }
12390
+
12284
12391
  /**
12285
12392
  * @beta
12286
12393
  */
@@ -12442,6 +12549,10 @@ export declare interface IFiltersCustomizer {
12442
12549
  * Customize how rendering of attribute filters is done.
12443
12550
  */
12444
12551
  attribute(): IAttributeFiltersCustomizer;
12552
+ /**
12553
+ * Customize how rendering of filter groups is done.
12554
+ */
12555
+ filterGroup(): IFilterGroupsCustomizer;
12445
12556
  }
12446
12557
 
12447
12558
  /**
@@ -19531,6 +19642,11 @@ export declare type OptionalDateFilterComponentProvider = OptionalProvider<DateF
19531
19642
  */
19532
19643
  export declare type OptionalFilterBarComponentProvider = OptionalProvider<FilterBarComponentProvider>;
19533
19644
 
19645
+ /**
19646
+ * @public
19647
+ */
19648
+ export declare type OptionalFilterGroupComponentProvider = OptionalProvider<FilterGroupComponentProvider>;
19649
+
19534
19650
  /**
19535
19651
  * @alpha
19536
19652
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-ui-dashboard",
3
- "version": "11.18.0-alpha.5",
3
+ "version": "11.18.0-alpha.7",
4
4
  "description": "GoodData SDK - Dashboard Component",
5
5
  "repository": {
6
6
  "type": "git",
@@ -60,19 +60,19 @@
60
60
  "ts-invariant": "^0.7.5",
61
61
  "tslib": "2.8.1",
62
62
  "uuid": "^11.1.0",
63
- "@gooddata/sdk-backend-base": "11.18.0-alpha.5",
64
- "@gooddata/sdk-backend-spi": "11.18.0-alpha.5",
65
- "@gooddata/sdk-model": "11.18.0-alpha.5",
66
- "@gooddata/sdk-ui": "11.18.0-alpha.5",
67
- "@gooddata/sdk-ui-charts": "11.18.0-alpha.5",
68
- "@gooddata/sdk-ui-ext": "11.18.0-alpha.5",
69
- "@gooddata/sdk-ui-filters": "11.18.0-alpha.5",
70
- "@gooddata/sdk-ui-geo": "11.18.0-alpha.5",
71
- "@gooddata/sdk-ui-kit": "11.18.0-alpha.5",
72
- "@gooddata/sdk-ui-pivot": "11.18.0-alpha.5",
73
- "@gooddata/sdk-ui-vis-commons": "11.18.0-alpha.5",
74
- "@gooddata/sdk-ui-theme-provider": "11.18.0-alpha.5",
75
- "@gooddata/util": "11.18.0-alpha.5"
63
+ "@gooddata/sdk-backend-base": "11.18.0-alpha.7",
64
+ "@gooddata/sdk-model": "11.18.0-alpha.7",
65
+ "@gooddata/sdk-backend-spi": "11.18.0-alpha.7",
66
+ "@gooddata/sdk-ui-charts": "11.18.0-alpha.7",
67
+ "@gooddata/sdk-ui": "11.18.0-alpha.7",
68
+ "@gooddata/sdk-ui-ext": "11.18.0-alpha.7",
69
+ "@gooddata/sdk-ui-filters": "11.18.0-alpha.7",
70
+ "@gooddata/sdk-ui-kit": "11.18.0-alpha.7",
71
+ "@gooddata/sdk-ui-geo": "11.18.0-alpha.7",
72
+ "@gooddata/sdk-ui-theme-provider": "11.18.0-alpha.7",
73
+ "@gooddata/sdk-ui-pivot": "11.18.0-alpha.7",
74
+ "@gooddata/sdk-ui-vis-commons": "11.18.0-alpha.7",
75
+ "@gooddata/util": "11.18.0-alpha.7"
76
76
  },
77
77
  "devDependencies": {
78
78
  "@microsoft/api-documenter": "^7.17.0",
@@ -120,10 +120,10 @@
120
120
  "typescript": "5.9.3",
121
121
  "vitest": "4.0.8",
122
122
  "vitest-dom": "0.1.1",
123
- "@gooddata/eslint-config": "11.18.0-alpha.5",
124
- "@gooddata/i18n-toolkit": "11.18.0-alpha.5",
125
- "@gooddata/reference-workspace": "11.18.0-alpha.5",
126
- "@gooddata/sdk-backend-mockingbird": "11.18.0-alpha.5"
123
+ "@gooddata/eslint-config": "11.18.0-alpha.7",
124
+ "@gooddata/i18n-toolkit": "11.18.0-alpha.7",
125
+ "@gooddata/sdk-backend-mockingbird": "11.18.0-alpha.7",
126
+ "@gooddata/reference-workspace": "11.18.0-alpha.7"
127
127
  },
128
128
  "peerDependencies": {
129
129
  "react": "^18.0.0 || ^19.0.0",
@@ -6471,6 +6471,12 @@ input[type=search]::-webkit-search-cancel-button {
6471
6471
  padding-right: 5px;
6472
6472
  }
6473
6473
 
6474
+ .gd-is-mobile .gd-attribute-filter-dropdown-button-icon__next {
6475
+ height: 100%;
6476
+ display: flex;
6477
+ align-items: center;
6478
+ }
6479
+
6474
6480
  .gd-attribute-filter-dropdown-button-content__next {
6475
6481
  position: relative;
6476
6482
  z-index: 1;
@@ -13154,6 +13160,10 @@ a.gd-button-link:hover .gd-button-text, a.gd-button-link-dimmed:hover .gd-button
13154
13160
  padding: 10px 0 0;
13155
13161
  }
13156
13162
 
13163
+ .gd-extended-date-filter-body-wrapper .gd-date-preset-tabs {
13164
+ padding: 0 10px 10px;
13165
+ }
13166
+
13157
13167
  .gd-extended-date-filter-body-wrapper .gd-relative-form-section {
13158
13168
  display: flex;
13159
13169
  }
@@ -17640,6 +17650,12 @@ a.gd-button-link:hover .gd-button-text, a.gd-button-link-dimmed:hover .gd-button
17640
17650
  padding-right: 5px;
17641
17651
  }
17642
17652
 
17653
+ .gd-is-mobile .gd-attribute-filter-dropdown-button-icon__next {
17654
+ height: 100%;
17655
+ display: flex;
17656
+ align-items: center;
17657
+ }
17658
+
17643
17659
  .gd-attribute-filter-dropdown-button-content__next {
17644
17660
  position: relative;
17645
17661
  z-index: 1;