@sisense/sdk-ui 2.20.0 → 2.22.0
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/dist/ai.cjs +68 -68
- package/dist/ai.js +891 -845
- package/dist/analytics-composer/node.cjs +1 -1
- package/dist/analytics-composer/node.js +1002 -858
- package/dist/analytics-composer.cjs +23 -23
- package/dist/analytics-composer.js +8 -8
- package/dist/{dimensions-Blw0p98x.js → dimensions-BiLyFpCg.js} +1 -1
- package/dist/{dimensions-CgMckRe2.cjs → dimensions-X4_igtmO.cjs} +1 -1
- package/dist/{execute-query-VxgY3tbz.js → execute-query-BEeqqDl6.js} +1499 -1491
- package/dist/execute-query-DJDE0zRU.cjs +1 -0
- package/dist/{index-0brX9D6q.cjs → index-NyouhE_A.cjs} +1 -1
- package/dist/{index-Ck90GjPy.js → index-kxX21arA.js} +15 -1
- package/dist/index.cjs +451 -436
- package/dist/index.js +24710 -23005
- package/dist/index.umd.js +689 -624
- package/dist/packages/sdk-ui/src/domains/dashboarding/common-filters/common-filters-connector.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/common-filters/selection-utils.d.ts +4 -3
- package/dist/packages/sdk-ui/src/domains/dashboarding/common-filters/types.d.ts +10 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/common-filters/use-common-filters.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/common-filters/utils.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/components/content-panel.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/components/editable-layout/components/editable-layout-row.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/components/editable-layout/editable-layout.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/components/editable-layout/helpers.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/translate-dashboard-utils.d.ts +8 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/types.d.ts +9 -2
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/index.d.ts +4 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/persist-dashboard-model-middleware.d.ts +13 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/{use-dashboard-model-reducer.d.ts → dashboard-model-reducer/types.d.ts} +19 -36
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/use-dashboard-model-reducer.d.ts +9 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/utils.d.ts +28 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/use-dashboard-persistence.d.ts +4 -4
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/duplicate-widget/duplicate-widget-utils.d.ts +34 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/duplicate-widget/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/duplicate-widget/use-duplicate-widget-menu-item.d.ts +57 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/jtd/jtd-config-transformers.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/jtd/jtd-filters.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/jtd/jtd-handlers.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/jtd/jtd-types.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/jtd/jtd-widget-transforms.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/use-jtd-widget.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/use-jtd.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/use-tabber.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/types.d.ts +44 -3
- package/dist/packages/sdk-ui/src/domains/dashboarding/use-composed-dashboard.d.ts +15 -3
- package/dist/packages/sdk-ui/src/domains/dashboarding/utils.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/filters/components/cascading-filter-tile/cascading-filter-tile.d.ts +13 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/cascading-filter-tile/cascading-level-filter.d.ts +11 -1
- package/dist/packages/sdk-ui/src/domains/filters/components/cascading-filter-tile/use-cascadding-filter-tile-menu-items/use-cascadding-filter-tile-lock-menu-item.d.ts +13 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/cascading-filter-tile/use-cascadding-filter-tile-menu-items/use-cascadding-filter-tile-menu-items.d.ts +14 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/common/reorderable-list.d.ts +32 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts +13 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/custom-filter-tile.d.ts +13 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +13 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-tile.d.ts +13 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/{filter-tile.d.ts → filter-tile/filter-tile.d.ts} +13 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/filter-tile/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/filter-tile/types.d.ts +36 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/filter-tile-container.d.ts +12 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/filters-panel/types.d.ts +27 -1
- package/dist/packages/sdk-ui/src/domains/filters/components/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/filters/components/member-filter-tile/member-filter-tile.d.ts +13 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/unsupported-filter-tile.d.ts +17 -1
- package/dist/packages/sdk-ui/src/domains/filters/shared/clone-filter-and-toggle-locked.d.ts +7 -0
- package/dist/packages/sdk-ui/src/domains/filters/shared/filter-tile-menu-button.d.ts +10 -0
- package/dist/packages/sdk-ui/src/domains/filters/shared/use-filter-tile-menu-items/use-filter-tile-lock-menu-item.d.ts +15 -0
- package/dist/packages/sdk-ui/src/domains/filters/shared/use-filter-tile-menu-items/use-filter-tile-menu-items.d.ts +14 -0
- package/dist/packages/sdk-ui/src/domains/formulas/index.d.ts +0 -1
- package/dist/packages/sdk-ui/src/domains/formulas/use-get-shared-formula.d.ts +20 -7
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data-options/translate-boxplot-data-options.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/widgets/components/chart-widget/chart-widget.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/chart-widget/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/chart-widget/types.d.ts +100 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/chart-widget/use-with-chart-widget-drilldown.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/{common-widget.d.ts → common-widget/common-widget.d.ts} +1 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/common-widget/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/common-widget/types.d.ts +8 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/{custom-widget.d.ts → custom-widget/custom-widget.d.ts} +1 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/custom-widget/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/custom-widget/types.d.ts +71 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/pivot-table-widget/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/pivot-table-widget/pivot-table-widget.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/pivot-table-widget/types.d.ts +141 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/pivot-table-widget/use-with-pivot-table-widget-drilldown.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/tabber-buttons-widget/types.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/table-widget/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/{table-widget.d.ts → table-widget/table-widget.d.ts} +1 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/table-widget/types.d.ts +61 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/text-widget/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/{text-widget.d.ts → text-widget/text-widget.d.ts} +1 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/text-widget/types.d.ts +29 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget/types.d.ts +45 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/{widget.d.ts → widget/widget.d.ts} +1 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-dashboard-filters.d.ts +425 -425
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-filters.d.ts +34 -34
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/to-widget-dto-style.d.ts +63 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/utils.d.ts +11 -5
- package/dist/packages/sdk-ui/src/domains/widgets/helpers/header-menu-utils.d.ts +9 -0
- package/dist/packages/sdk-ui/src/domains/widgets/helpers/index.d.ts +7 -0
- package/dist/packages/sdk-ui/src/domains/widgets/shared/widget-container/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/domains/widgets/shared/{widget-container.d.ts → widget-container/widget-container.d.ts} +7 -3
- package/dist/packages/sdk-ui/src/domains/widgets/shared/widget-header/types.d.ts +42 -0
- package/dist/packages/sdk-ui/src/domains/widgets/shared/widget-header/widget-header-info-button.d.ts +13 -0
- package/dist/packages/sdk-ui/src/domains/widgets/shared/widget-header/widget-header-toolbar.d.ts +23 -0
- package/dist/packages/sdk-ui/src/domains/widgets/shared/widget-header/widget-header.d.ts +14 -0
- package/dist/packages/sdk-ui/src/domains/widgets/shared/widget-header/widget-menu-button.d.ts +5 -0
- package/dist/packages/sdk-ui/src/domains/widgets/widget-model/widget-model-translator/widget-model-translator.d.ts +8 -1
- package/dist/packages/sdk-ui/src/domains/widgets/widget-model/widget-model.d.ts +1 -1
- package/dist/packages/sdk-ui/src/infra/api/rest-api.d.ts +2 -1
- package/dist/packages/sdk-ui/src/infra/api/types/dashboard-dto.d.ts +2 -1
- package/dist/packages/sdk-ui/src/infra/app/client-application.d.ts +17 -0
- package/dist/packages/sdk-ui/src/infra/app/settings/settings.d.ts +4 -0
- package/dist/packages/sdk-ui/src/infra/app/settings/types/deployment-props.d.ts +2 -1
- package/dist/packages/sdk-ui/src/infra/app/settings/types/features.d.ts +18 -1
- package/dist/packages/sdk-ui/src/infra/contexts/custom-widgets-provider/types.d.ts +41 -12
- package/dist/packages/sdk-ui/src/infra/contexts/custom-widgets-provider/use-execute-custom-widget-query.d.ts +12 -3
- package/dist/packages/sdk-ui/src/infra/contexts/plugin-provider/index.d.ts +5 -0
- package/dist/packages/sdk-ui/src/infra/contexts/plugin-provider/plugin-context.d.ts +15 -0
- package/dist/packages/sdk-ui/src/infra/contexts/plugin-provider/plugin-provider.d.ts +21 -0
- package/dist/packages/sdk-ui/src/infra/contexts/plugin-provider/types.d.ts +50 -0
- package/dist/packages/sdk-ui/src/infra/contexts/plugin-provider/validate-plugins.d.ts +9 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/de-de.d.ts +14 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/en-us.d.ts +14 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-ar.d.ts +14 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-es.d.ts +14 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/fr-fr.d.ts +14 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/it-it.d.ts +14 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ja-jp.d.ts +14 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ko-kr.d.ts +14 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/nl-nl.d.ts +14 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/pt-br.d.ts +14 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ru-ru.d.ts +14 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/tr-tr.d.ts +14 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/zh-cn.d.ts +14 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/en.d.ts +14 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/index.d.ts +28 -0
- package/dist/packages/sdk-ui/src/modules/ai/api/chat-rest-api.d.ts +5 -3
- package/dist/packages/sdk-ui/src/modules/ai/api/narration-endpoints.d.ts +25 -0
- package/dist/packages/sdk-ui/src/modules/ai/api/types.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/ai/chart/nlq-chart-widget.d.ts +2 -2
- package/dist/packages/sdk-ui/src/modules/ai/get-nlg-insights-from-widget.d.ts +4 -1
- package/dist/packages/sdk-ui/src/modules/ai/use-get-nlq-result.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/common/utils.d.ts +2 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/dashboard/stringify-widgets.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/translate-dimensions-from-json.d.ts +3 -2
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/translate-dimensions-to-json.d.ts +6 -6
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/translate-filters-to-json.d.ts +3 -4
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/translate-measures-from-json.d.ts +13 -28
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/translate-measures-to-json.d.ts +6 -7
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/types.d.ts +45 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/types.d.ts +3 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/widget/to-widget-code.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/widget/to-widget-props.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/widget/widget-composer.d.ts +1 -1
- package/dist/packages/sdk-ui/src/props.d.ts +19 -427
- package/dist/packages/sdk-ui/src/public-api/internal.d.ts +4 -0
- package/dist/packages/sdk-ui/src/public-api/public.d.ts +7 -7
- package/dist/packages/sdk-ui/src/public-api/sisense-internal.d.ts +6 -0
- package/dist/packages/sdk-ui/src/shared/components/alert/alert.d.ts +91 -0
- package/dist/packages/sdk-ui/src/shared/components/alert/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/shared/components/dynamic-size-container/default-size.d.ts +6 -6
- package/dist/packages/sdk-ui/src/shared/components/menu/menu-button.d.ts +2 -1
- package/dist/packages/sdk-ui/src/shared/components/quota-notification/quota-notification.d.ts +32 -0
- package/dist/packages/sdk-ui/src/shared/hooks/use-app-settings.d.ts +11 -0
- package/dist/packages/sdk-ui/src/shared/hooks/use-quota-notification.d.ts +54 -0
- package/dist/packages/sdk-ui/src/shared/hooks/use-quota-warning-dismissed.d.ts +8 -0
- package/dist/packages/sdk-ui/src/shared/icons/warning-icon.d.ts +6 -0
- package/dist/packages/sdk-ui/src/shared/icons/x-circle-icon.d.ts +6 -0
- package/dist/packages/sdk-ui/src/shared/types/menu-item.d.ts +17 -0
- package/dist/packages/sdk-ui/src/types.d.ts +113 -6
- package/dist/{use-common-filters-B2wOzse2.js → quota-notification-D6oMJal8.js} +11177 -10827
- package/dist/{use-common-filters-BCebg2_K.cjs → quota-notification-z3dv2KoH.cjs} +164 -114
- package/dist/translations/de-de.cjs +1 -1
- package/dist/translations/de-de.js +16 -2
- package/dist/translations/en-us.cjs +1 -1
- package/dist/translations/en-us.js +1 -1
- package/dist/translations/es-ar.cjs +1 -1
- package/dist/translations/es-ar.js +16 -2
- package/dist/translations/es-es.cjs +1 -1
- package/dist/translations/es-es.js +16 -2
- package/dist/translations/fr-fr.cjs +1 -1
- package/dist/translations/fr-fr.js +16 -2
- package/dist/translations/it-it.cjs +1 -1
- package/dist/translations/it-it.js +16 -2
- package/dist/translations/ja-jp.cjs +1 -1
- package/dist/translations/ja-jp.js +16 -2
- package/dist/translations/ko-kr.cjs +1 -1
- package/dist/translations/ko-kr.js +16 -2
- package/dist/translations/nl-nl.cjs +1 -1
- package/dist/translations/nl-nl.js +16 -2
- package/dist/translations/pt-br.cjs +1 -1
- package/dist/translations/pt-br.js +16 -2
- package/dist/translations/ru-ru.cjs +1 -1
- package/dist/translations/ru-ru.js +16 -2
- package/dist/translations/tr-tr.cjs +1 -1
- package/dist/translations/tr-tr.js +16 -2
- package/dist/translations/zh-cn.cjs +1 -1
- package/dist/translations/zh-cn.js +16 -2
- package/dist/{types-YU936hyL.cjs → types-CoY6F8Ma.cjs} +1 -1
- package/dist/{types-tDJE6TNR.js → types-ixSwJkxM.js} +1 -1
- package/dist/{utils-BRCTwjTN.js → utils-BP-BglHE.js} +5797 -5781
- package/dist/{utils-pvzOGByh.cjs → utils-C8YMrOdw.cjs} +36 -36
- package/dist/{widget-composer-T6nvM6Xc.js → widget-composer-CUUFoCb9.js} +3 -3
- package/dist/{widget-composer-ChJ9V_fN.cjs → widget-composer-DI4sHaNe.cjs} +3 -3
- package/package.json +13 -10
- package/dist/execute-query-CgkFRn7s.cjs +0 -1
- package/dist/packages/sdk-ui/src/domains/widgets/shared/widget-header-info-button.d.ts +0 -9
- package/dist/packages/sdk-ui/src/domains/widgets/shared/widget-header.d.ts +0 -13
- /package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/{use-dasboard-model-utils.d.ts → use-dashboard-model-utils.d.ts} +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DistributiveOmit } from '../../../../shared/utils/utility-types/distributive-omit';
|
|
2
|
+
import type { WidgetProps } from '../widget/types';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the facade widget component.
|
|
5
|
+
*
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export type CommonWidgetProps = DistributiveOmit<WidgetProps, 'id'>;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { DataSource, Filter, FilterRelations } from '@sisense/sdk-data';
|
|
2
|
+
import { CustomWidgetEventProps, CustomWidgetStyleOptions, GenericDataOptions } from '../../../../types';
|
|
3
|
+
import { WidgetConfig } from '../widget/types';
|
|
4
|
+
/**
|
|
5
|
+
* Props for the Custom Widget component
|
|
6
|
+
*/
|
|
7
|
+
export interface CustomWidgetProps extends CustomWidgetEventProps {
|
|
8
|
+
/**
|
|
9
|
+
* Custom widget type. This is typically the name/ID of the custom widget.
|
|
10
|
+
*
|
|
11
|
+
* @category Widget
|
|
12
|
+
*/
|
|
13
|
+
customWidgetType: string;
|
|
14
|
+
/**
|
|
15
|
+
* Data source the query is run against - e.g. `Sample ECommerce`
|
|
16
|
+
*
|
|
17
|
+
* If not specified, the query will use the `defaultDataSource` specified in the parent Sisense Context.
|
|
18
|
+
*
|
|
19
|
+
* @category Data
|
|
20
|
+
*/
|
|
21
|
+
dataSource?: DataSource;
|
|
22
|
+
/**
|
|
23
|
+
* Filters that will slice query results
|
|
24
|
+
*
|
|
25
|
+
* @category Data
|
|
26
|
+
*/
|
|
27
|
+
filters?: Filter[] | FilterRelations;
|
|
28
|
+
/**
|
|
29
|
+
* Filters that will highlight query results
|
|
30
|
+
*
|
|
31
|
+
* @category Data
|
|
32
|
+
*/
|
|
33
|
+
highlights?: Filter[];
|
|
34
|
+
/**
|
|
35
|
+
* Configurations for how to interpret and present the data passed to the table
|
|
36
|
+
*
|
|
37
|
+
* @category Chart
|
|
38
|
+
*/
|
|
39
|
+
dataOptions: GenericDataOptions;
|
|
40
|
+
/**
|
|
41
|
+
* Style options for the custom widget.
|
|
42
|
+
*
|
|
43
|
+
* @category Widget
|
|
44
|
+
*/
|
|
45
|
+
styleOptions?: CustomWidgetStyleOptions;
|
|
46
|
+
/**
|
|
47
|
+
* Widget configuration (e.g. header toolbar menu)
|
|
48
|
+
*
|
|
49
|
+
* @category Widget
|
|
50
|
+
* @internal
|
|
51
|
+
*/
|
|
52
|
+
config?: WidgetConfig;
|
|
53
|
+
/**
|
|
54
|
+
* Title of the widget
|
|
55
|
+
*
|
|
56
|
+
* @category Widget
|
|
57
|
+
*/
|
|
58
|
+
title?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Description of the widget
|
|
61
|
+
*
|
|
62
|
+
* @category Widget
|
|
63
|
+
*/
|
|
64
|
+
description?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Specific options for the custom widget.
|
|
67
|
+
*
|
|
68
|
+
* @category Widget
|
|
69
|
+
*/
|
|
70
|
+
customOptions?: Record<string, any>;
|
|
71
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { DataSource, Filter, FilterRelations } from '@sisense/sdk-data';
|
|
3
|
+
import type { CustomDataCellFormatter, CustomHeaderCellFormatter } from '../../../../domains/visualizations/components/pivot-table/formatters/types';
|
|
4
|
+
import { PivotTableDataOptions } from '../../../../domains/visualizations/core/chart-data-options/types';
|
|
5
|
+
import type { PivotTableDataPointEventHandler } from '../../../../props';
|
|
6
|
+
import { PivotTableDrilldownOptions, PivotTableWidgetStyleOptions } from '../../../../types';
|
|
7
|
+
import { WidgetConfig } from '../widget/types';
|
|
8
|
+
/**
|
|
9
|
+
* Props for the {@link PivotTableWidget} component
|
|
10
|
+
*/
|
|
11
|
+
export interface PivotTableWidgetProps {
|
|
12
|
+
/**
|
|
13
|
+
* Data source the query is run against - e.g. `Sample ECommerce`
|
|
14
|
+
*
|
|
15
|
+
* If not specified, the query will use the `defaultDataSource` specified in the parent Sisense Context.
|
|
16
|
+
*
|
|
17
|
+
* @category Data
|
|
18
|
+
*/
|
|
19
|
+
dataSource?: DataSource;
|
|
20
|
+
/**
|
|
21
|
+
* Filters that will slice query results
|
|
22
|
+
*
|
|
23
|
+
* @category Data
|
|
24
|
+
*/
|
|
25
|
+
filters?: Filter[] | FilterRelations;
|
|
26
|
+
/**
|
|
27
|
+
* Filters that will highlight query results
|
|
28
|
+
*
|
|
29
|
+
* @category Data
|
|
30
|
+
*/
|
|
31
|
+
highlights?: Filter[];
|
|
32
|
+
/**
|
|
33
|
+
* Configurations for how to interpret and present the data passed to the table
|
|
34
|
+
*
|
|
35
|
+
* @category Chart
|
|
36
|
+
*/
|
|
37
|
+
dataOptions: PivotTableDataOptions;
|
|
38
|
+
/**
|
|
39
|
+
* Style options for both the table and widget including the widget header
|
|
40
|
+
*
|
|
41
|
+
* @category Widget
|
|
42
|
+
*/
|
|
43
|
+
styleOptions?: PivotTableWidgetStyleOptions;
|
|
44
|
+
/**
|
|
45
|
+
* Widget configuration (e.g. header toolbar menu)
|
|
46
|
+
*
|
|
47
|
+
* @category Widget
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
config?: WidgetConfig;
|
|
51
|
+
/**
|
|
52
|
+
* React nodes to be rendered at the top of component, before the table
|
|
53
|
+
*
|
|
54
|
+
* @category Widget
|
|
55
|
+
* @internal
|
|
56
|
+
*/
|
|
57
|
+
topSlot?: ReactNode;
|
|
58
|
+
/**
|
|
59
|
+
* React nodes to be rendered at the bottom of component, after the table
|
|
60
|
+
*
|
|
61
|
+
* @category Widget
|
|
62
|
+
* @internal
|
|
63
|
+
*/
|
|
64
|
+
bottomSlot?: ReactNode;
|
|
65
|
+
/**
|
|
66
|
+
* Title of the widget
|
|
67
|
+
*
|
|
68
|
+
* @category Widget
|
|
69
|
+
*/
|
|
70
|
+
title?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Description of the widget
|
|
73
|
+
*
|
|
74
|
+
* @category Widget
|
|
75
|
+
*/
|
|
76
|
+
description?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Configuration for the pivot table drilldown
|
|
79
|
+
*
|
|
80
|
+
* @category Widget
|
|
81
|
+
*/
|
|
82
|
+
drilldownOptions?: PivotTableDrilldownOptions;
|
|
83
|
+
/**
|
|
84
|
+
* Callback function that is called when the pivot table cell is clicked
|
|
85
|
+
*
|
|
86
|
+
* @category Callbacks
|
|
87
|
+
*/
|
|
88
|
+
onDataPointClick?: PivotTableDataPointEventHandler;
|
|
89
|
+
/**
|
|
90
|
+
* Callback function that is called when the pivot table cell is right-clicked
|
|
91
|
+
*
|
|
92
|
+
* @category Callbacks
|
|
93
|
+
*/
|
|
94
|
+
onDataPointContextMenu?: PivotTableDataPointEventHandler;
|
|
95
|
+
/**
|
|
96
|
+
* Applies custom styling and behavior to pivot table data cells.
|
|
97
|
+
*
|
|
98
|
+
* This formatter function returns formatting objects instead of mutating parameters,
|
|
99
|
+
* following functional programming principles. Use this single callback to combine
|
|
100
|
+
* multiple handlers and control the call sequence from outside the pivot.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```typescript
|
|
104
|
+
* const customDataFormatter: CustomDataCellFormatter = (cell, jaqlPanelItem, dataOption, id) => {
|
|
105
|
+
* if (cell.value > 1000) {
|
|
106
|
+
* return {
|
|
107
|
+
* style: { backgroundColor: 'lightgreen' },
|
|
108
|
+
* content: `${cell.value} (High)`
|
|
109
|
+
* };
|
|
110
|
+
* }
|
|
111
|
+
* };
|
|
112
|
+
* ```
|
|
113
|
+
*
|
|
114
|
+
* @internal
|
|
115
|
+
*/
|
|
116
|
+
onDataCellFormat?: CustomDataCellFormatter;
|
|
117
|
+
/**
|
|
118
|
+
* Applies custom styling and behavior to pivot table row and column headers.
|
|
119
|
+
*
|
|
120
|
+
* This formatter function returns formatting objects instead of mutating parameters,
|
|
121
|
+
* following functional programming principles. Use this single callback to combine
|
|
122
|
+
* multiple handlers and control the call sequence from outside the pivot.
|
|
123
|
+
*
|
|
124
|
+
* @example
|
|
125
|
+
* ```typescript
|
|
126
|
+
* const customHeaderFormatter: CustomHeaderCellFormatter = (cell, jaqlPanelItem, dataOption, id) => {
|
|
127
|
+
* if (cell.content === 'Total') {
|
|
128
|
+
* return {
|
|
129
|
+
* style: { fontWeight: 'bold', color: 'blue' },
|
|
130
|
+
* className: 'total-header'
|
|
131
|
+
* };
|
|
132
|
+
* }
|
|
133
|
+
* };
|
|
134
|
+
* ```
|
|
135
|
+
*
|
|
136
|
+
* @internal
|
|
137
|
+
*/
|
|
138
|
+
onHeaderCellFormat?: CustomHeaderCellFormatter;
|
|
139
|
+
/** @internal */
|
|
140
|
+
onChange?: (props: Partial<PivotTableWidgetProps>) => void;
|
|
141
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Attribute } from '@sisense/sdk-data';
|
|
2
|
-
import { PivotTableWidgetProps } from '../../../../props.js';
|
|
3
2
|
import { DataOptionLocation, DrilldownSelection } from '../../../../types.js';
|
|
3
|
+
import { PivotTableWidgetProps } from './types';
|
|
4
4
|
type UseWithPivotTableWidgetDrilldownParams = {
|
|
5
5
|
propsToExtend: PivotTableWidgetProps;
|
|
6
6
|
onDrilldownSelectionsChange?: (target: Attribute | DataOptionLocation, selections: DrilldownSelection[]) => void;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { DataSource, Filter, FilterRelations } from '@sisense/sdk-data';
|
|
3
|
+
import { TableDataOptions } from '../../../../domains/visualizations/core/chart-data-options/types';
|
|
4
|
+
import { TableWidgetStyleOptions } from '../../../../types';
|
|
5
|
+
/**
|
|
6
|
+
* Props for the {@link TableWidget} component
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export interface TableWidgetProps {
|
|
11
|
+
/**
|
|
12
|
+
* Data source the query is run against - e.g. `Sample ECommerce`
|
|
13
|
+
*
|
|
14
|
+
* If not specified, the query will use the `defaultDataSource` specified in the parent Sisense Context.
|
|
15
|
+
*
|
|
16
|
+
* @category Data
|
|
17
|
+
*/
|
|
18
|
+
dataSource?: DataSource;
|
|
19
|
+
/**
|
|
20
|
+
* Filters that will slice query results
|
|
21
|
+
*
|
|
22
|
+
* @category Data
|
|
23
|
+
*/
|
|
24
|
+
filters?: Filter[] | FilterRelations;
|
|
25
|
+
/**
|
|
26
|
+
* Configurations for how to interpret and present the data passed to the table
|
|
27
|
+
*
|
|
28
|
+
* @category Chart
|
|
29
|
+
*/
|
|
30
|
+
dataOptions: TableDataOptions;
|
|
31
|
+
/**
|
|
32
|
+
* Style options for both the table and widget including the widget header
|
|
33
|
+
*
|
|
34
|
+
* @category Widget
|
|
35
|
+
*/
|
|
36
|
+
styleOptions?: TableWidgetStyleOptions;
|
|
37
|
+
/**
|
|
38
|
+
* React nodes to be rendered at the top of component, before the table
|
|
39
|
+
*
|
|
40
|
+
* @category Widget
|
|
41
|
+
*/
|
|
42
|
+
topSlot?: ReactNode;
|
|
43
|
+
/**
|
|
44
|
+
* React nodes to be rendered at the bottom of component, after the table
|
|
45
|
+
*
|
|
46
|
+
* @category Widget
|
|
47
|
+
*/
|
|
48
|
+
bottomSlot?: ReactNode;
|
|
49
|
+
/**
|
|
50
|
+
* Title of the widget
|
|
51
|
+
*
|
|
52
|
+
* @category Widget
|
|
53
|
+
*/
|
|
54
|
+
title?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Description of the widget
|
|
57
|
+
*
|
|
58
|
+
* @category Widget
|
|
59
|
+
*/
|
|
60
|
+
description?: string;
|
|
61
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { TextWidgetDataPointEventHandler } from '../../../../props';
|
|
2
|
+
import { TextWidgetStyleOptions } from '../../../../types';
|
|
3
|
+
import { WidgetConfig } from '../widget/types';
|
|
4
|
+
/**
|
|
5
|
+
* Props for the `TextWidget` component.
|
|
6
|
+
*/
|
|
7
|
+
export interface TextWidgetProps {
|
|
8
|
+
/**
|
|
9
|
+
* Style options for the text widget.
|
|
10
|
+
*
|
|
11
|
+
* @category Widget
|
|
12
|
+
*/
|
|
13
|
+
styleOptions: TextWidgetStyleOptions;
|
|
14
|
+
/**
|
|
15
|
+
* A callback that allows you to customize what happens when a text widget is clicked.
|
|
16
|
+
* Since TextWidget doesn't have specific data points, this fires when clicking anywhere on the widget.
|
|
17
|
+
*
|
|
18
|
+
* @category Callbacks
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
onDataPointClick?: TextWidgetDataPointEventHandler;
|
|
22
|
+
/**
|
|
23
|
+
* Widget configuration (e.g. header toolbar menu)
|
|
24
|
+
*
|
|
25
|
+
* @category Widget
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
config?: WidgetConfig;
|
|
29
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { BeforeMenuOpenHandler } from '../../../../infra/contexts/menu-provider/types';
|
|
2
|
+
import type { WidgetHeaderConfig } from '../../shared/widget-header/types';
|
|
3
|
+
import type { ChartWidgetProps } from '../chart-widget/types';
|
|
4
|
+
import type { CustomWidgetProps } from '../custom-widget/types';
|
|
5
|
+
import type { PivotTableWidgetProps } from '../pivot-table-widget/types';
|
|
6
|
+
import type { TextWidgetProps } from '../text-widget/types';
|
|
7
|
+
/**
|
|
8
|
+
* Generic widget configuration (e.g. header menu, toolbar).
|
|
9
|
+
* Shared across chart, pivot, text, and custom widgets.
|
|
10
|
+
*/
|
|
11
|
+
export type WidgetConfig = {
|
|
12
|
+
/**
|
|
13
|
+
* Configurations for the widget header (e.g. toolbar menu items)
|
|
14
|
+
*/
|
|
15
|
+
header?: WidgetHeaderConfig;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Type of the widget component.
|
|
19
|
+
*/
|
|
20
|
+
export type WidgetType = 'chart' | 'pivot' | 'text' | 'custom';
|
|
21
|
+
/**
|
|
22
|
+
* A utility type that combines widget-specific properties (`BaseWidget`)
|
|
23
|
+
* with a common widget props including corresponding widget type (`Type`).
|
|
24
|
+
*/
|
|
25
|
+
export type WithCommonWidgetProps<BaseWidget, Type extends WidgetType> = BaseWidget & {
|
|
26
|
+
/**
|
|
27
|
+
* Unique identifier of the widget within the container component (dashboard)
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
readonly id: string;
|
|
31
|
+
/**
|
|
32
|
+
* Widget type
|
|
33
|
+
*/
|
|
34
|
+
widgetType: Type;
|
|
35
|
+
/**
|
|
36
|
+
* Optional handler function to process menu options before opening the context menu.
|
|
37
|
+
*
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
onBeforeMenuOpen?: BeforeMenuOpenHandler;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Props for the widget component within a container component like dashboard.
|
|
44
|
+
*/
|
|
45
|
+
export type WidgetProps = WithCommonWidgetProps<ChartWidgetProps, 'chart'> | WithCommonWidgetProps<PivotTableWidgetProps, 'pivot'> | WithCommonWidgetProps<TextWidgetProps, 'text'> | WithCommonWidgetProps<CustomWidgetProps, 'custom'>;
|