@sisense/sdk-ui 2.21.0 → 2.23.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 +58 -58
- package/dist/ai.js +861 -844
- package/dist/analytics-composer/node.cjs +1 -1
- package/dist/analytics-composer/node.js +2240 -1230
- package/dist/analytics-composer.cjs +47 -47
- package/dist/analytics-composer.js +135 -131
- package/dist/dimensions-2t18RSZC.cjs +1 -0
- package/dist/dimensions-C0BmtTH2.js +204 -0
- package/dist/execute-query-CHYTupEo.js +5866 -0
- package/dist/execute-query-DmAyVFF5.cjs +1 -0
- package/dist/{index-Ck90GjPy.js → index-DCAC0mJe.js} +33 -2
- package/dist/{index-0brX9D6q.cjs → index-Dx6wvLd3.cjs} +1 -1
- package/dist/index.cjs +423 -410
- package/dist/index.js +24905 -23677
- package/dist/index.umd.js +728 -675
- package/dist/packages/sdk-ui/src/domains/dashboarding/components/editable-layout/const.d.ts +1 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/components/editable-layout/smart-pointer-sensor.d.ts +17 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/get-dashboard-model.d.ts +2 -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} +43 -38
- 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 +29 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/use-dashboard-persistence.d.ts +6 -5
- 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-types.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/rename-widget/use-widget-renaming.d.ts +34 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/types.d.ts +65 -2
- package/dist/packages/sdk-ui/src/domains/dashboarding/use-composed-dashboard.d.ts +15 -3
- package/dist/packages/sdk-ui/src/domains/dashboarding/use-dashboard-theme.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/data-browser/add-filter-popover/add-filter-data-browser.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/data-browser/data-schema-browser/data-schema-browser.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/data-browser/dimensions-browser/types.d.ts +9 -1
- package/dist/packages/sdk-ui/src/domains/filters/components/cascading-filter-tile/cascading-filter-tile.d.ts +7 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/cascading-filter-tile/cascading-level-filter.d.ts +4 -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/criteria-filter-tile/criteria-filter-tile.d.ts +7 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/custom-filter-tile.d.ts +7 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +7 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-tile.d.ts +7 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/{filter-tile.d.ts → filter-tile/filter-tile.d.ts} +7 -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 +6 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/filters-panel/types.d.ts +13 -0
- 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 +7 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/unsupported-filter-tile.d.ts +10 -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/fetch-formula.d.ts +1 -1
- 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/query-execution/core/execute-query.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/query-execution/hooks/use-execute-query-by-widget-id/use-execute-query-by-widget-id.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/query-execution/hooks/use-query-cache/use-query-cache.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/boxplot-chart/boxplot-utils.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/helpers/get-load-data-function.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/helpers/data-loading.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/types.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/widgets/change-events.d.ts +73 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/chart-widget/types.d.ts +12 -2
- package/dist/packages/sdk-ui/src/domains/widgets/components/pivot-table-widget/types.d.ts +12 -2
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-dashboard-filters.d.ts +3 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-data-options.d.ts +1 -1
- 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/types.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/utils.d.ts +3 -2
- package/dist/packages/sdk-ui/src/domains/widgets/event-to-delta.d.ts +17 -0
- package/dist/packages/sdk-ui/src/domains/widgets/helpers/header-menu-utils.d.ts +14 -4
- package/dist/packages/sdk-ui/src/domains/widgets/helpers/index.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/widgets/hooks/use-title-renaming.d.ts +27 -0
- package/dist/packages/sdk-ui/src/domains/widgets/hooks/use-widget-header-management.d.ts +28 -0
- package/dist/packages/sdk-ui/src/domains/widgets/shared/widget-container/widget-container.d.ts +3 -1
- package/dist/packages/sdk-ui/src/domains/widgets/shared/widget-header/types.d.ts +32 -17
- package/dist/packages/sdk-ui/src/domains/widgets/shared/widget-header/widget-header.d.ts +3 -1
- package/dist/packages/sdk-ui/src/domains/widgets/shared/widget-header/widget-menu-button.d.ts +1 -1
- package/dist/packages/sdk-ui/src/infra/api/rest-api.d.ts +4 -0
- package/dist/packages/sdk-ui/src/infra/api/types/dashboard-dto.d.ts +3 -2
- package/dist/packages/sdk-ui/src/infra/app/client-application.d.ts +6 -215
- package/dist/packages/sdk-ui/src/infra/app/helpers.d.ts +16 -0
- package/dist/packages/sdk-ui/src/infra/app/settings/settings.d.ts +3 -0
- package/dist/packages/sdk-ui/src/infra/app/settings/types/deployment-props.d.ts +4 -1
- package/dist/packages/sdk-ui/src/infra/app/settings/types/features.d.ts +19 -1
- package/dist/packages/sdk-ui/src/infra/app/types.d.ts +236 -0
- 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/contexts/sisense-context/sisense-context.d.ts +1 -1
- package/dist/packages/sdk-ui/src/infra/contexts/theme-provider/theme-context.d.ts +2 -1
- package/dist/packages/sdk-ui/src/infra/decorators/component-decorators/with-tracking/with-tracking.d.ts +1 -1
- package/dist/packages/sdk-ui/src/infra/decorators/hook-decorators/with-tracking.d.ts +1 -1
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/de-de.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/en-us.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-ar.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-es.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/fr-fr.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/it-it.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ja-jp.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ko-kr.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/nl-nl.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/pt-br.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ru-ru.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/tr-tr.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/zh-cn.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/en.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/index.d.ts +62 -0
- package/dist/packages/sdk-ui/src/modules/ai/api/chat-rest-api.d.ts +2 -1
- package/dist/packages/sdk-ui/src/modules/ai/api/narration-endpoints.d.ts +2 -1
- package/dist/packages/sdk-ui/src/modules/ai/get-nlg-insights-from-widget.d.ts +1 -0
- package/dist/packages/sdk-ui/src/modules/ai/use-get-nlq-result.d.ts +1 -0
- package/dist/packages/sdk-ui/src/modules/ai/use-get-query-recommendations.d.ts +1 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/chart/helpers/axis-type-detection.d.ts +17 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/chart/helpers/chart-type-schemas.d.ts +37 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/chart/helpers/index.d.ts +9 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/chart/helpers/translate-data-options.d.ts +9 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/chart/helpers/validate-chart-json.d.ts +19 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/chart/translate-chart-from-json.d.ts +42 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/chart/translate-chart-to-json.d.ts +41 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/dimensions/translate-dimensions-from-json.d.ts +11 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/dimensions/translate-dimensions-to-json.d.ts +22 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{translate-filters-from-json.d.ts → constructs/filters/translate-filters-from-json.d.ts} +2 -2
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{translate-filters-to-json.d.ts → constructs/filters/translate-filters-to-json.d.ts} +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{translate-measures-from-json.d.ts → constructs/measures/translate-measures-from-json.d.ts} +4 -4
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/measures/translate-measures-to-json.d.ts +22 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/index.d.ts +8 -3
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/pivot-table/helpers/index.d.ts +7 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/pivot-table/helpers/translate-data-options.d.ts +14 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/pivot-table/helpers/validate-pivot-table-json.d.ts +19 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/pivot-table/translate-pivot-table-from-json.d.ts +12 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/pivot-table/translate-pivot-table-to-json.d.ts +12 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/query/constants.d.ts +8 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{translate-query-from-json.d.ts → query/translate-query-from-json.d.ts} +3 -3
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{translate-query-to-jaql.d.ts → query/translate-query-to-jaql.d.ts} +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{translate-query-to-json.d.ts → query/translate-query-to-json.d.ts} +2 -2
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/data-options/adapters.d.ts +19 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/data-options/index.d.ts +9 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/data-options/translate-axis-from-json.d.ts +24 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/data-options/translate-axis-to-json.d.ts +18 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/custom-formula/process-custom-formula.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/custom-formula/validate-custom-formula.d.ts +13 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/execute-function.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/factory-function-processors.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/factory-function-schemas.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/filter-processors.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/expression/formula-function-schemas.d.ts +25 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/process-arg.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/process-node.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/utils/attribute-helpers.d.ts +50 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/utils/fuzzy-match.d.ts +16 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{parse-compose-code.d.ts → shared/utils/parse-compose-code.d.ts} +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/utils/schema-index.d.ts +49 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/utils/translation-helpers.d.ts +31 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/types.d.ts +115 -4
- package/dist/packages/sdk-ui/src/modules/analytics-composer/types.d.ts +6 -6
- package/dist/packages/sdk-ui/src/props.d.ts +14 -21
- package/dist/packages/sdk-ui/src/public-api/alpha.d.ts +1 -1
- package/dist/packages/sdk-ui/src/public-api/beta.d.ts +1 -1
- package/dist/packages/sdk-ui/src/public-api/internal.d.ts +9 -6
- package/dist/packages/sdk-ui/src/public-api/public.d.ts +2 -2
- package/dist/packages/sdk-ui/src/public-api/sisense-internal.d.ts +18 -5
- 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/grouped-items-browser/types.d.ts +7 -1
- package/dist/packages/sdk-ui/src/shared/components/inline-text-editor/inline-text-editor.d.ts +26 -0
- package/dist/packages/sdk-ui/src/shared/components/inline-text-editor/use-blur-on-pointer-down-outside.d.ts +11 -0
- package/dist/packages/sdk-ui/src/shared/components/loading-indicator.d.ts +2 -1
- 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 +12 -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/hooks/use-should-load.d.ts +1 -1
- package/dist/packages/sdk-ui/src/shared/hooks/use-with-change-detection.d.ts +5 -5
- 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 +3 -3
- package/dist/{use-common-filters-DBqRT0et.js → quota-notification-CVl0isIV.js} +18254 -16897
- package/dist/quota-notification-RAaHp-eO.cjs +713 -0
- package/dist/translations/de-de.cjs +1 -1
- package/dist/translations/de-de.js +34 -3
- 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 +34 -3
- package/dist/translations/es-es.cjs +1 -1
- package/dist/translations/es-es.js +34 -3
- package/dist/translations/fr-fr.cjs +1 -1
- package/dist/translations/fr-fr.js +34 -3
- package/dist/translations/it-it.cjs +1 -1
- package/dist/translations/it-it.js +34 -3
- package/dist/translations/ja-jp.cjs +1 -1
- package/dist/translations/ja-jp.js +34 -3
- package/dist/translations/ko-kr.cjs +1 -1
- package/dist/translations/ko-kr.js +34 -3
- package/dist/translations/nl-nl.cjs +1 -1
- package/dist/translations/nl-nl.js +34 -3
- package/dist/translations/pt-br.cjs +1 -1
- package/dist/translations/pt-br.js +34 -3
- package/dist/translations/ru-ru.cjs +1 -1
- package/dist/translations/ru-ru.js +34 -3
- package/dist/translations/tr-tr.cjs +1 -1
- package/dist/translations/tr-tr.js +34 -3
- package/dist/translations/zh-cn.cjs +1 -1
- package/dist/translations/zh-cn.js +34 -3
- package/dist/{types-Ockb-LJ0.js → types-B96nVbgX.js} +1 -1
- package/dist/{types-Ch9J6ycn.cjs → types-DZ4vWh8j.cjs} +1 -1
- package/dist/{utils-DH69_bUK.cjs → utils-CgV-jWWQ.cjs} +44 -44
- package/dist/{utils-BXDqo_yg.js → utils-ChqSLRbz.js} +2073 -2081
- package/dist/{widget-composer-DgCWcMJ1.cjs → widget-composer-Blul90Zb.cjs} +3 -3
- package/dist/{widget-composer-DfVCQL2G.js → widget-composer-Cf_CN3Ux.js} +8 -8
- package/package.json +12 -9
- package/dist/dimensions-DVGn8ORR.cjs +0 -1
- package/dist/dimensions-DuUqQgpi.js +0 -202
- package/dist/execute-query-B21bnb05.js +0 -5802
- package/dist/execute-query-BIkhszY1.cjs +0 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/common.d.ts +0 -84
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/translate-dimensions-from-json.d.ts +0 -12
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/translate-dimensions-to-json.d.ts +0 -13
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/translate-measures-to-json.d.ts +0 -13
- package/dist/use-common-filters-CXJN3RSs.cjs +0 -672
- /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,17 @@
|
|
|
1
|
+
import type { PointerEvent } from 'react';
|
|
2
|
+
import { PointerSensor } from '@dnd-kit/core';
|
|
3
|
+
import type { PointerSensorOptions } from '@dnd-kit/core';
|
|
4
|
+
/**
|
|
5
|
+
* PointerSensor that skips activation when the event originates from interactive
|
|
6
|
+
* elements (input, textarea, select, button, contenteditable) or elements
|
|
7
|
+
* explicitly marked with the `data-no-dnd` attribute.
|
|
8
|
+
* Prevents DnD from stealing focus and keyboard events from the widget title editor.
|
|
9
|
+
*
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare class SmartPointerSensor extends PointerSensor {
|
|
13
|
+
static activators: {
|
|
14
|
+
eventName: "onPointerDown";
|
|
15
|
+
handler: ({ nativeEvent: event }: PointerEvent, { onActivation }: PointerSensorOptions) => boolean;
|
|
16
|
+
}[];
|
|
17
|
+
}
|
package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/get-dashboard-model.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export interface GetDashboardModelOptions {
|
|
|
40
40
|
* @param themeSettings - Optional theme settings
|
|
41
41
|
* @param appSettings - Optional application settings
|
|
42
42
|
* @returns The dashboard model
|
|
43
|
-
*
|
|
43
|
+
*
|
|
44
|
+
* @internal @sisenseInternal
|
|
44
45
|
*/
|
|
45
46
|
export declare function getDashboardModel(http: HttpClient, dashboardOid: string, options?: GetDashboardModelOptions, themeSettings?: CompleteThemeSettings, appSettings?: AppSettings): Promise<DashboardModel>;
|
|
@@ -6,5 +6,5 @@ export * from './use-get-dashboard-models';
|
|
|
6
6
|
export * from './dashboard-model';
|
|
7
7
|
export * as dashboardModelTranslator from './dashboard-model-translator';
|
|
8
8
|
export * from './use-dashboard-model/use-dashboard-model';
|
|
9
|
-
export * from './use-dashboard-model/
|
|
9
|
+
export * from './use-dashboard-model/dashboard-model-reducer';
|
|
10
10
|
export * from './use-dashboard-model/use-dashboard-persistence';
|
package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/translate-dashboard-utils.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { TabbersConfig } from '../../../domains/dashboarding/hooks/use-tabber';
|
|
|
4
4
|
import { Panel, WidgetDto } from '../../../domains/widgets/components/widget-by-id/types';
|
|
5
5
|
import { RestApi } from '../../../infra/api/rest-api';
|
|
6
6
|
import { type CascadingFilterDto, DashboardDto, type FilterDto, type LayoutDto } from '../../../infra/api/types/dashboard-dto';
|
|
7
|
-
import type { WidgetsOptions, WidgetsPanelColumnLayout } from './types';
|
|
7
|
+
import type { SpecificWidgetOptions, WidgetsOptions, WidgetsPanelColumnLayout } from './types';
|
|
8
8
|
export declare const translateLayout: (layout: LayoutDto) => WidgetsPanelColumnLayout;
|
|
9
9
|
export declare function extractDashboardFilters(dashboardFilters: Array<FilterDto | CascadingFilterDto>, filterRelationsModel?: FilterRelationsModel | FilterRelationsModelNode): Filter[] | FilterRelations;
|
|
10
10
|
export declare const getJtdNavigateType: (widget: WidgetDto) => TriggerMethod;
|
|
@@ -20,6 +20,13 @@ export declare function extractPivotTargetsConfigFromWidgetDto(widget: WidgetDto
|
|
|
20
20
|
location: 'row' | 'column' | 'value';
|
|
21
21
|
} | Measure, JtdTarget[]> | undefined;
|
|
22
22
|
export declare function translateWidgetsOptions(widgets?: WidgetDto[]): WidgetsOptions;
|
|
23
|
+
/**
|
|
24
|
+
* Applies {@link SpecificWidgetOptions} to a {@link WidgetDto}.
|
|
25
|
+
* Merges filtersOptions and jtdConfig into the DTO for persistence.
|
|
26
|
+
*
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
export declare function withSpecificWidgetOptions(widgetOptions?: SpecificWidgetOptions): (widgetDto: WidgetDto) => WidgetDto;
|
|
23
30
|
export declare function translateTabbersOptions(widgets?: WidgetDto[]): TabbersConfig;
|
|
24
31
|
/**
|
|
25
32
|
* Replace all shared formulas, which defined by id references, in the dashboard with their actual values.
|
|
@@ -74,13 +74,20 @@ export type DashboardId = string;
|
|
|
74
74
|
*
|
|
75
75
|
* For example, how common filters defined at the dashboard level should be applied to widgets.
|
|
76
76
|
*/
|
|
77
|
-
export type WidgetsOptions = Record<WidgetId,
|
|
77
|
+
export type WidgetsOptions = Record<WidgetId, SpecificWidgetOptions>;
|
|
78
|
+
/**
|
|
79
|
+
* Options for a specific widget
|
|
80
|
+
*/
|
|
81
|
+
export type SpecificWidgetOptions = {
|
|
82
|
+
/**
|
|
83
|
+
* Options for common filters defined at the dashboard level to be applied to certain widgets.
|
|
84
|
+
*/
|
|
78
85
|
filtersOptions?: CommonFiltersOptions;
|
|
79
86
|
/**
|
|
80
87
|
* Jump To Dashboard config for widgets.
|
|
81
88
|
*/
|
|
82
89
|
jtdConfig?: JumpToDashboardConfig | JumpToDashboardConfigForPivot;
|
|
83
|
-
}
|
|
90
|
+
};
|
|
84
91
|
/**
|
|
85
92
|
* Style options for the dashboard.
|
|
86
93
|
*/
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RestApi } from '../../../../../infra/api/rest-api';
|
|
2
|
+
import { UseDashboardModelInternalAction } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Middleware that persists the dashboard model changes to the Sisense server.
|
|
5
|
+
*
|
|
6
|
+
* @param dashboardOid - Dashboard OID, or undefined if not initialized
|
|
7
|
+
* @param action - Internal dashboard model action to persist
|
|
8
|
+
* @param restApi - Sisense REST API instance
|
|
9
|
+
* @param sharedMode - Whether the dashboard is in shared mode
|
|
10
|
+
* @returns Promise resolving to the action (possibly transformed, e.g. for ADD_WIDGET)
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare function persistDashboardModelMiddleware(dashboardOid: string | undefined, action: UseDashboardModelInternalAction, restApi: RestApi, sharedMode: boolean): Promise<UseDashboardModelInternalAction>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Filter, FilterRelations } from '@sisense/sdk-data';
|
|
2
|
-
import { DashboardModel, WidgetsPanelLayout } from '
|
|
3
|
-
import { WidgetModel } from '
|
|
4
|
-
import { RestApi } from '../../../../infra/api/rest-api';
|
|
2
|
+
import { DashboardModel, SpecificWidgetOptions, WidgetsPanelLayout } from '../../../../../domains/dashboarding/dashboard-model';
|
|
3
|
+
import { WidgetModel } from '../../../../../domains/widgets/widget-model';
|
|
5
4
|
export type UseDashboardModelState = DashboardModel | null;
|
|
6
5
|
/**
|
|
7
6
|
* Internal action types for the dashboard model state used in {@link useDashboardModel}.
|
|
@@ -15,14 +14,24 @@ export declare enum UseDashboardModelActionTypeInternal {
|
|
|
15
14
|
/**
|
|
16
15
|
* Action types for the dashboard model state used in {@link useDashboardModel}.
|
|
17
16
|
*
|
|
18
|
-
* @
|
|
17
|
+
* @sisenseInternal
|
|
19
18
|
*/
|
|
20
19
|
export declare enum UseDashboardModelActionType {
|
|
21
20
|
FILTERS_UPDATE = "FILTERS.UPDATE",
|
|
22
21
|
ADD_WIDGET = "WIDGETS.ADD",
|
|
22
|
+
PATCH_WIDGET = "WIDGETS.PATCH",
|
|
23
23
|
WIDGETS_PANEL_LAYOUT_UPDATE = "WIDGETS_PANEL_LAYOUT.UPDATE",
|
|
24
24
|
WIDGETS_DELETE = "WIDGETS.DELETE"
|
|
25
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Fields that can be safely patched on a widget without full DTO reconstruction.
|
|
28
|
+
* Intentionally narrow — extend only when lossless roundtrip is guaranteed.
|
|
29
|
+
*
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
export type WidgetPatch = {
|
|
33
|
+
title?: string;
|
|
34
|
+
};
|
|
26
35
|
/**
|
|
27
36
|
* Internal actions for the dashboard model state used in {@link useDashboardModel}.
|
|
28
37
|
*
|
|
@@ -43,7 +52,7 @@ export type UseDashboardModelInternalAction = UseDashboardModelAction | {
|
|
|
43
52
|
*
|
|
44
53
|
* @internal
|
|
45
54
|
*/
|
|
46
|
-
export type UseDashboardModelAction = UseDashboardModelFilterUpdateAction | UseDashboardModelAddWidgetAction | UseDashboardModelLayoutUpdateAction | UseDashboardWidgetsDeleteAction;
|
|
55
|
+
export type UseDashboardModelAction = UseDashboardModelFilterUpdateAction | UseDashboardModelAddWidgetAction | UseDashboardModelPatchWidgetAction | UseDashboardModelLayoutUpdateAction | UseDashboardWidgetsDeleteAction;
|
|
47
56
|
/**
|
|
48
57
|
* Filter update actions for the dashboard model state used in {@link useDashboardModel}.
|
|
49
58
|
*
|
|
@@ -55,12 +64,35 @@ export type UseDashboardModelFilterUpdateAction = {
|
|
|
55
64
|
};
|
|
56
65
|
/**
|
|
57
66
|
* Add widget action for the dashboard model state used in {@link useDashboardModel}.
|
|
67
|
+
* If widgetsPanelLayout is not provided, the widget will be appended to the first cell of the first column.
|
|
58
68
|
*
|
|
59
|
-
*
|
|
69
|
+
* WidgetModel plain payload will be deprecated in the future.
|
|
70
|
+
* Instead, use the following payload:
|
|
71
|
+
* {
|
|
72
|
+
* widget: WidgetModel;
|
|
73
|
+
* widgetsPanelLayout?: WidgetsPanelLayout;
|
|
74
|
+
* widgetOptions?: SpecificWidgetOptions;
|
|
75
|
+
* }
|
|
60
76
|
*/
|
|
61
77
|
export type UseDashboardModelAddWidgetAction = {
|
|
62
78
|
type: UseDashboardModelActionType.ADD_WIDGET;
|
|
63
|
-
payload: WidgetModel
|
|
79
|
+
payload: WidgetModel | {
|
|
80
|
+
widget: WidgetModel;
|
|
81
|
+
widgetsPanelLayout?: WidgetsPanelLayout;
|
|
82
|
+
widgetOptions?: SpecificWidgetOptions;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Patch widget action for the dashboard model state used in {@link useDashboardModel}.
|
|
87
|
+
*
|
|
88
|
+
* @internal
|
|
89
|
+
*/
|
|
90
|
+
export type UseDashboardModelPatchWidgetAction = {
|
|
91
|
+
type: UseDashboardModelActionType.PATCH_WIDGET;
|
|
92
|
+
payload: {
|
|
93
|
+
widgetOid: string;
|
|
94
|
+
patch: WidgetPatch;
|
|
95
|
+
};
|
|
64
96
|
};
|
|
65
97
|
/**
|
|
66
98
|
* Layout update action for the dashboard model state used in {@link useDashboardModel}.
|
|
@@ -72,7 +104,9 @@ export type UseDashboardModelLayoutUpdateAction = {
|
|
|
72
104
|
payload: WidgetsPanelLayout;
|
|
73
105
|
};
|
|
74
106
|
/**
|
|
75
|
-
*
|
|
107
|
+
* Widgets delete action for the dashboard model state used in {@link useDashboardModel}.
|
|
108
|
+
* {@link UseDashboardWidgetsDeleteAction} is dispatched with
|
|
109
|
+
* {@link UseDashboardModelActionType.WIDGETS_DELETE}.
|
|
76
110
|
*
|
|
77
111
|
* @internal
|
|
78
112
|
*/
|
|
@@ -80,33 +114,4 @@ export type UseDashboardWidgetsDeleteAction = {
|
|
|
80
114
|
type: UseDashboardModelActionType.WIDGETS_DELETE;
|
|
81
115
|
payload: string[];
|
|
82
116
|
};
|
|
83
|
-
|
|
84
|
-
* Reducer for the dashboard model state used in {@link useDashboardModel}.
|
|
85
|
-
*
|
|
86
|
-
* @param state
|
|
87
|
-
* @param action
|
|
88
|
-
* @internal
|
|
89
|
-
*/
|
|
90
|
-
export declare function dashboardReducer(state: UseDashboardModelState, action: UseDashboardModelInternalAction): UseDashboardModelState;
|
|
91
|
-
/**
|
|
92
|
-
* Translates filters and relations to DTOs.
|
|
93
|
-
*
|
|
94
|
-
* @param filtersOrFilterRelations - The filters or filter relations to translate
|
|
95
|
-
* @returns The translated filters and relations DTOs for Fusion
|
|
96
|
-
* @internal
|
|
97
|
-
*/
|
|
98
|
-
export declare function translateFiltersAndRelationsToDto(filtersOrFilterRelations: Filter[] | FilterRelations): {
|
|
99
|
-
filters: (import("../../../../infra/api/types/dashboard-dto").FilterDto | import("../../../../infra/api/types/dashboard-dto").CascadingFilterDto)[];
|
|
100
|
-
filterRelations: {
|
|
101
|
-
datasource: string;
|
|
102
|
-
filterRelations: import("@sisense/sdk-data").FilterRelationsModelNode;
|
|
103
|
-
}[] | undefined;
|
|
104
|
-
};
|
|
105
|
-
/**
|
|
106
|
-
* Middleware that persists the dashboard model changes to the Sisense server.
|
|
107
|
-
*
|
|
108
|
-
* @param restApi - The Sisense REST API instance
|
|
109
|
-
* @param reducer - The dashboard model reducer
|
|
110
|
-
* @internal
|
|
111
|
-
*/
|
|
112
|
-
export declare function persistDashboardModelMiddleware(dashboardOid: string | undefined, action: UseDashboardModelInternalAction, restApi: RestApi, sharedMode: boolean): Promise<UseDashboardModelInternalAction>;
|
|
117
|
+
export type AddWidgetPayload = UseDashboardModelAddWidgetAction['payload'];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { UseDashboardModelInternalAction, UseDashboardModelState } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Reducer for the dashboard model state used in {@link useDashboardModel}.
|
|
4
|
+
*
|
|
5
|
+
* @param state
|
|
6
|
+
* @param action
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare function dashboardReducer(state: UseDashboardModelState, action: UseDashboardModelInternalAction): UseDashboardModelState;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Filter, FilterRelations } from '@sisense/sdk-data';
|
|
2
|
+
import { SpecificWidgetOptions, WidgetsPanelLayout } from '../../../../../domains/dashboarding/dashboard-model';
|
|
3
|
+
import { WidgetModel } from '../../../../../domains/widgets/widget-model';
|
|
4
|
+
import { AddWidgetPayload } from './types.js';
|
|
5
|
+
/**
|
|
6
|
+
* Translates filters and relations to DTOs.
|
|
7
|
+
*
|
|
8
|
+
* @param filtersOrFilterRelations - The filters or filter relations to translate
|
|
9
|
+
* @returns The translated filters and relations DTOs for Fusion
|
|
10
|
+
*
|
|
11
|
+
* @sisenseInternal
|
|
12
|
+
*/
|
|
13
|
+
export declare function translateFiltersAndRelationsToDto(filtersOrFilterRelations: Filter[] | FilterRelations): {
|
|
14
|
+
filters: (import("../../../../../infra/api/types/dashboard-dto.js").FilterDto | import("../../../../../infra/api/types/dashboard-dto.js").CascadingFilterDto)[];
|
|
15
|
+
filterRelations: {
|
|
16
|
+
datasource: string;
|
|
17
|
+
filterRelations: import("@sisense/sdk-data").FilterRelationsModelNode;
|
|
18
|
+
}[] | undefined;
|
|
19
|
+
};
|
|
20
|
+
export declare function parseAddWidgetPayload(payload: AddWidgetPayload): {
|
|
21
|
+
widget: WidgetModel;
|
|
22
|
+
widgetsPanelLayout?: WidgetsPanelLayout;
|
|
23
|
+
widgetOptions?: SpecificWidgetOptions;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Appends a widget cell to the first column's first row. Creates row/cells if missing.
|
|
27
|
+
* Returns a new layout (immutable) or the original when no columns exist.
|
|
28
|
+
*/
|
|
29
|
+
export declare function appendWidgetToFirstCell(layout: WidgetsPanelLayout | undefined, widgetId: string): WidgetsPanelLayout | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DashboardModel } from '../../../../domains/dashboarding/dashboard-model';
|
|
2
|
-
import { UseDashboardModelAction } from './
|
|
2
|
+
import { UseDashboardModelAction, UseDashboardModelInternalAction } from './dashboard-model-reducer';
|
|
3
3
|
export interface UseDashboardPersistenceParams {
|
|
4
4
|
/**
|
|
5
5
|
* The dashboard model to manage persistence for
|
|
@@ -25,10 +25,10 @@ export interface UseDashboardPersistenceResult {
|
|
|
25
25
|
*/
|
|
26
26
|
dashboard: DashboardModel | null;
|
|
27
27
|
/**
|
|
28
|
-
* Function to dispatch changes to the dashboard model with optional persistence
|
|
29
|
-
* Returns a promise
|
|
28
|
+
* Function to dispatch changes to the dashboard model with optional persistence.
|
|
29
|
+
* Returns a promise that resolves to the processed (or transformed) action.
|
|
30
30
|
*/
|
|
31
|
-
dispatchChanges: (action: UseDashboardModelAction) => Promise<
|
|
31
|
+
dispatchChanges: (action: UseDashboardModelAction) => Promise<UseDashboardModelInternalAction>;
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
34
|
* Hook that provides persistence capabilities for an already loaded dashboard model.
|
|
@@ -36,6 +36,7 @@ export interface UseDashboardPersistenceResult {
|
|
|
36
36
|
*
|
|
37
37
|
* @param params - Parameters for dashboard persistence
|
|
38
38
|
* @returns Dashboard persistence state and dispatch function
|
|
39
|
-
*
|
|
39
|
+
*
|
|
40
|
+
* @sisenseInternal
|
|
40
41
|
*/
|
|
41
42
|
export declare function useDashboardPersistence({ dashboard, persist, sharedMode, }: UseDashboardPersistenceParams): UseDashboardPersistenceResult;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { WidgetsPanelLayout } from '../../../../domains/dashboarding/dashboard-model/types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Location of a widget cell within the layout structure.
|
|
4
|
+
*/
|
|
5
|
+
export type WidgetCellLocation = {
|
|
6
|
+
columnIndex: number;
|
|
7
|
+
rowIndex: number;
|
|
8
|
+
cellIndex: number;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Finds the location of a widget cell in the layout.
|
|
12
|
+
*
|
|
13
|
+
* @param layout - The widgets panel layout.
|
|
14
|
+
* @param widgetId - The ID of the widget to find.
|
|
15
|
+
* @returns The cell location, or undefined if not found.
|
|
16
|
+
*/
|
|
17
|
+
export declare const getWidgetCellLocation: (layout: Readonly<WidgetsPanelLayout>, widgetId: string) => WidgetCellLocation | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Transformer: Inserts a new cell into the same row as the original cell.
|
|
20
|
+
* Splits the original cell's widthPercentage in half: original and new cell each get 50%.
|
|
21
|
+
*
|
|
22
|
+
* @param originalCellLocation - The location of the original cell.
|
|
23
|
+
* @param newWidgetId - The ID of the new widget.
|
|
24
|
+
* @returns A pure transformer that produces the updated layout.
|
|
25
|
+
*/
|
|
26
|
+
export declare const withNewCellInsertedToTheSameRow: (originalCellLocation: WidgetCellLocation, newWidgetId: string) => (layout: Readonly<WidgetsPanelLayout>) => WidgetsPanelLayout;
|
|
27
|
+
/**
|
|
28
|
+
* Transformer: Replaces a widget ID with another in all cells of the layout.
|
|
29
|
+
*
|
|
30
|
+
* @param oldWidgetId - The widget ID to replace.
|
|
31
|
+
* @param newWidgetId - The new widget ID.
|
|
32
|
+
* @returns A pure transformer that produces the updated layout (immutable).
|
|
33
|
+
*/
|
|
34
|
+
export declare const withReplacedWidgetId: (oldWidgetId: string, newWidgetId: string) => (layout: Readonly<WidgetsPanelLayout>) => WidgetsPanelLayout;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { getWidgetCellLocation, withNewCellInsertedToTheSameRow, withReplacedWidgetId, type WidgetCellLocation, } from './duplicate-widget-utils.js';
|
|
2
|
+
export { useDuplicateWidgetMenuItem, type UseDuplicateWidgetMenuItemParams, type DuplicateWidgetMiddlewareOutput, } from './use-duplicate-widget-menu-item.js';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { WidgetsOptions, WidgetsPanelLayout } from '../../../../domains/dashboarding/dashboard-model/types.js';
|
|
3
|
+
import { type WidgetProps } from '../../../../domains/widgets/components/widget/types.js';
|
|
4
|
+
import type { DashboardPersistenceManager } from '../../types.js';
|
|
5
|
+
/** Setter for widgets array (e.g. React setState or updater function). */
|
|
6
|
+
export type SetWidgets = React.Dispatch<React.SetStateAction<WidgetProps[]>>;
|
|
7
|
+
/** Setter for widgets options array (e.g. React setState or updater function). */
|
|
8
|
+
export type SetWidgetsOptions = React.Dispatch<React.SetStateAction<WidgetsOptions>>;
|
|
9
|
+
/** Setter for widgets panel layout. */
|
|
10
|
+
export type SetWidgetsLayout = (newLayout: WidgetsPanelLayout) => void;
|
|
11
|
+
/** Options for the duplicate widget middleware hook. */
|
|
12
|
+
export type UseDuplicateWidgetMenuItemParams = {
|
|
13
|
+
/** Current widgets. */
|
|
14
|
+
widgets: WidgetProps[];
|
|
15
|
+
/** Setter to update widgets (e.g. from parent state). */
|
|
16
|
+
setWidgets: SetWidgets;
|
|
17
|
+
/** Current widgets panel layout. */
|
|
18
|
+
widgetsLayout: WidgetsPanelLayout;
|
|
19
|
+
/** Setter to update widgets layout (e.g. from parent state). */
|
|
20
|
+
setWidgetsLayout: SetWidgetsLayout;
|
|
21
|
+
/** When false, returns widgets unchanged (no menu item added). */
|
|
22
|
+
enabled?: boolean;
|
|
23
|
+
/** Dashboard-level widget options (applied to cloned widget when persisting). */
|
|
24
|
+
widgetsOptions?: WidgetsOptions;
|
|
25
|
+
/** Setter to update widgets options (e.g. from parent state). */
|
|
26
|
+
setWidgetsOptions: SetWidgetsOptions;
|
|
27
|
+
persistence?: Pick<DashboardPersistenceManager, 'addWidget'>;
|
|
28
|
+
};
|
|
29
|
+
/** Output of the duplicate widget middleware. */
|
|
30
|
+
export type DuplicateWidgetMiddlewareOutput = {
|
|
31
|
+
widgets: WidgetProps[];
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Middleware hook that adds a "Duplicate widget" header menu item to each widget.
|
|
35
|
+
* On click, clones the widget and updates the layout (inserts new cell in the same row).
|
|
36
|
+
*
|
|
37
|
+
* @param options - Options containing widgets, layout, setters, and enabled flag.
|
|
38
|
+
* @returns Updated props with widgets augmented with the duplicate menu item (or unchanged when disabled).
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* const [widgets, setWidgets] = useSyncedState(initialWidgets);
|
|
43
|
+
* const [widgetsLayout, setWidgetsLayout] = useSyncedState(initialLayout);
|
|
44
|
+
* const { widgets: widgetsWithDuplicate, widgetsLayout: widgetsLayoutWithDuplicate } = useDuplicateWidgetMenuItem({
|
|
45
|
+
* widgets,
|
|
46
|
+
* setWidgets,
|
|
47
|
+
* widgetsLayout,
|
|
48
|
+
* setWidgetsLayout,
|
|
49
|
+
* enabled: true,
|
|
50
|
+
* });
|
|
51
|
+
* const { layout: widgetsLayout, setLayout: setWidgetsLayout } = useWidgetsLayoutManagement({
|
|
52
|
+
* layout: widgetsLayoutWithDuplicate,
|
|
53
|
+
* layoutManagers: [tabberLayoutManager],
|
|
54
|
+
* });
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
export declare function useDuplicateWidgetMenuItem(params: UseDuplicateWidgetMenuItemParams): DuplicateWidgetMiddlewareOutput;
|
|
@@ -200,7 +200,7 @@ export interface JumpToDashboardConfigForPivot extends Omit<JumpToDashboardConfi
|
|
|
200
200
|
/**
|
|
201
201
|
* Map of target dashboards for different dimensions/measures
|
|
202
202
|
*
|
|
203
|
-
* @
|
|
203
|
+
* @beta
|
|
204
204
|
* @example
|
|
205
205
|
*
|
|
206
206
|
* const FormulaMeasure = dashboardProps.widgets[0].dataOptions.values[0];
|
package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/rename-widget/use-widget-renaming.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { WidgetProps } from '../../../../domains/widgets/components/widget/types.js';
|
|
2
|
+
import type { DashboardPersistenceManager } from '../../types.js';
|
|
3
|
+
/** Options for the widget renaming middleware hook. */
|
|
4
|
+
export type UseWidgetRenamingParams = {
|
|
5
|
+
/** Current widgets. */
|
|
6
|
+
widgets: WidgetProps[];
|
|
7
|
+
/** When false, returns widgets unchanged (no config.header.title.editing.enabled, no persistence wrap). */
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
/** When provided, persists widget renames to the server on title/changed. */
|
|
10
|
+
persistence?: Pick<DashboardPersistenceManager, 'patchWidget'>;
|
|
11
|
+
};
|
|
12
|
+
/** Output of the widget renaming middleware. */
|
|
13
|
+
export type WidgetRenamingOutput = {
|
|
14
|
+
widgets: WidgetProps[];
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Middleware hook that enables widget-level rename UI and optionally persists renames.
|
|
18
|
+
* Sets config.header.title.editing.enabled on each widget so ChartWidget/PivotTableWidget show rename UI.
|
|
19
|
+
* When persistence is set, wraps widget onChange to call patchWidget on title/changed
|
|
20
|
+
* before forwarding to the change-detection layer.
|
|
21
|
+
*
|
|
22
|
+
* @param options - Options containing widgets, enabled flag, and optional persistence.
|
|
23
|
+
* @returns Widgets with config.header.title.editing.enabled and optionally wrapped onChange.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* const { widgets: widgetsWithRename } = useWidgetRenaming({
|
|
28
|
+
* widgets: widgetsWithDuplicate,
|
|
29
|
+
* enabled: true,
|
|
30
|
+
* persistence,
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export declare function useWidgetRenaming(params: UseWidgetRenamingParams): WidgetRenamingOutput;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { DataSource, Filter, FilterRelations } from '@sisense/sdk-data';
|
|
3
|
-
import { DashboardStyleOptions, WidgetsOptions, WidgetsPanelLayout } from '../../domains/dashboarding/dashboard-model';
|
|
3
|
+
import { DashboardStyleOptions, SpecificWidgetOptions, WidgetPatch, WidgetsOptions, WidgetsPanelLayout } from '../../domains/dashboarding/dashboard-model';
|
|
4
4
|
import { TabbersConfig } from '../../domains/dashboarding/hooks/use-tabber';
|
|
5
5
|
import { FiltersPanelConfig } from '../../domains/filters/components/filters-panel/types';
|
|
6
6
|
import { WidgetProps } from '../../domains/widgets/components/widget/types';
|
|
7
|
-
export type { DashboardStyleOptions, WidgetsPanelColumnLayout, WidgetsPanelLayout, WidgetsPanelCell, WidgetsPanelRow, WidgetsPanelColumn, } from '../../domains/dashboarding/dashboard-model';
|
|
7
|
+
export type { DashboardStyleOptions, SpecificWidgetOptions, WidgetsPanelColumnLayout, WidgetsPanelLayout, WidgetsPanelCell, WidgetsPanelRow, WidgetsPanelColumn, } from '../../domains/dashboarding/dashboard-model';
|
|
8
8
|
export type { TabbersConfig, TabberConfig, TabberTabConfig, } from '../../domains/dashboarding/hooks/use-tabber';
|
|
9
9
|
/**
|
|
10
10
|
* Event triggered when dashboard filters are updated.
|
|
@@ -217,6 +217,39 @@ export interface EditModeConfig {
|
|
|
217
217
|
* @default true
|
|
218
218
|
*/
|
|
219
219
|
showDragHandleIcon?: boolean;
|
|
220
|
+
/**
|
|
221
|
+
* Configuration for the widget duplication feature.
|
|
222
|
+
*
|
|
223
|
+
* @internal
|
|
224
|
+
*/
|
|
225
|
+
duplicateWidget?: {
|
|
226
|
+
/**
|
|
227
|
+
* When `true`, adds a "Duplicate widget" menu item to each widget header.
|
|
228
|
+
* On click, clones the widget and updates the layout.
|
|
229
|
+
* Only has effect when edit mode is also enabled (`editMode.enabled`) and batch mode is disabled (`editMode.applyChangesAsBatch.enabled`).
|
|
230
|
+
* If batch mode is enabled, "Duplicate widget" menu item won't be applied because it would not be possible to undo/redo the duplication.
|
|
231
|
+
*
|
|
232
|
+
* If not specified, the default value is `false`.
|
|
233
|
+
* @internal
|
|
234
|
+
*/
|
|
235
|
+
enabled: boolean;
|
|
236
|
+
};
|
|
237
|
+
/**
|
|
238
|
+
* Configuration for the widget renaming feature.
|
|
239
|
+
*
|
|
240
|
+
* @internal
|
|
241
|
+
*/
|
|
242
|
+
renameWidget?: {
|
|
243
|
+
/**
|
|
244
|
+
* When `true`, adds a "Rename widget" menu item to each widget header.
|
|
245
|
+
* On click, triggers inline title editing of the widget.
|
|
246
|
+
* Only has effect when edit mode is also enabled (`editMode.enabled`).
|
|
247
|
+
*
|
|
248
|
+
* If not specified, the default value is `false`.
|
|
249
|
+
* @internal
|
|
250
|
+
*/
|
|
251
|
+
enabled: boolean;
|
|
252
|
+
};
|
|
220
253
|
}
|
|
221
254
|
/**
|
|
222
255
|
* Dashboard configuration
|
|
@@ -278,6 +311,32 @@ export interface DashboardLayoutOptions {
|
|
|
278
311
|
*/
|
|
279
312
|
widgetsPanel?: WidgetsPanelLayout;
|
|
280
313
|
}
|
|
314
|
+
/**
|
|
315
|
+
* Interface for persisting dashboard changes from the composition layer (e.g. add widget).
|
|
316
|
+
*
|
|
317
|
+
* @internal
|
|
318
|
+
*/
|
|
319
|
+
export type DashboardPersistenceManager = {
|
|
320
|
+
/**
|
|
321
|
+
* Adds a widget to the dashboard.
|
|
322
|
+
*
|
|
323
|
+
* @param widget - The widget to add.
|
|
324
|
+
* @param widgetsPanelLayout - The layout to add the widget to.
|
|
325
|
+
* @param widgetOptions - The options for the widget.
|
|
326
|
+
* @returns The persisted widget (possibly modified by the server, e.g. new id), the new widgets panel layout and the widget options.
|
|
327
|
+
*/
|
|
328
|
+
addWidget: (widget: WidgetProps, widgetsPanelLayout: WidgetsPanelLayout, widgetOptions?: SpecificWidgetOptions) => Promise<{
|
|
329
|
+
widget: WidgetProps;
|
|
330
|
+
widgetsPanelLayout: WidgetsPanelLayout;
|
|
331
|
+
widgetOptions?: SpecificWidgetOptions;
|
|
332
|
+
}>;
|
|
333
|
+
/**
|
|
334
|
+
* Patch a single field (e.g. title) on an existing widget.
|
|
335
|
+
*
|
|
336
|
+
* @internal
|
|
337
|
+
*/
|
|
338
|
+
patchWidget: (widgetOid: string, patch: WidgetPatch) => Promise<void>;
|
|
339
|
+
};
|
|
281
340
|
/**
|
|
282
341
|
* Props for the Dashboard component
|
|
283
342
|
*/
|
|
@@ -317,6 +376,10 @@ export interface DashboardProps {
|
|
|
317
376
|
* @param event The event that occurred
|
|
318
377
|
*/
|
|
319
378
|
onChange?: (event: DashboardChangeEvent) => void;
|
|
379
|
+
/**
|
|
380
|
+
* @internal
|
|
381
|
+
*/
|
|
382
|
+
persistence?: DashboardPersistenceManager;
|
|
320
383
|
}
|
|
321
384
|
/**
|
|
322
385
|
* Props for the Dashboard Header component
|
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
import { Filter, FilterRelations } from '@sisense/sdk-data';
|
|
2
|
-
import { WidgetsPanelLayout } from '../../domains/dashboarding/dashboard-model';
|
|
3
|
-
import { DashboardProps } from './types.js';
|
|
2
|
+
import type { WidgetsPanelLayout } from '../../domains/dashboarding/dashboard-model';
|
|
3
|
+
import { DashboardPersistenceManager, DashboardProps } from './types.js';
|
|
4
4
|
export type ComposableDashboardProps = Pick<DashboardProps, 'filters' | 'widgets' | 'widgetsOptions' | 'layoutOptions' | 'config'>;
|
|
5
5
|
export type UseComposedDashboardOptions = {
|
|
6
6
|
/**
|
|
7
7
|
* @internal
|
|
8
8
|
*/
|
|
9
9
|
onFiltersChange?: (filters: Filter[] | FilterRelations) => void;
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
persistence?: DashboardPersistenceManager;
|
|
14
|
+
/**
|
|
15
|
+
* Runtime edit mode state. When provided (e.g. by Dashboard), used for duplicate-widget visibility
|
|
16
|
+
* instead of only config.widgetsPanel.editMode.isEditing.
|
|
17
|
+
* @internal
|
|
18
|
+
*
|
|
19
|
+
* @deprecated Temporal workaround. Edit mode (with history management) should be managed by the `useComposedDashboard` hook instead of the Dashboard component.
|
|
20
|
+
*/
|
|
21
|
+
isEditing?: boolean;
|
|
10
22
|
};
|
|
11
23
|
/**
|
|
12
24
|
* Result of the {@link useComposedDashboard} hook.
|
|
@@ -24,7 +36,7 @@ export type ComposedDashboardResult<D extends ComposableDashboardProps | Dashboa
|
|
|
24
36
|
*
|
|
25
37
|
* @internal
|
|
26
38
|
*/
|
|
27
|
-
export declare function useComposedDashboardInternal<D extends ComposableDashboardProps | DashboardProps>(initialDashboard: D, { onFiltersChange }?: UseComposedDashboardOptions): ComposedDashboardResult<D>;
|
|
39
|
+
export declare function useComposedDashboardInternal<D extends ComposableDashboardProps | DashboardProps>(initialDashboard: D, { onFiltersChange, persistence, isEditing: isEditingRuntime }?: UseComposedDashboardOptions): ComposedDashboardResult<D>;
|
|
28
40
|
/**
|
|
29
41
|
* React hook that takes in separate dashboard elements and
|
|
30
42
|
* composes them into a coordinated dashboard with change detection, cross filtering, and drill down.
|
|
@@ -34,8 +34,8 @@ export declare const useDashboardThemeInternal: ({ styleOptions }: DashboardThem
|
|
|
34
34
|
* React hook that returns dashboard theme settings
|
|
35
35
|
*
|
|
36
36
|
* @group Dashboards
|
|
37
|
+
*
|
|
37
38
|
* @alpha
|
|
38
|
-
* @internal
|
|
39
39
|
*/
|
|
40
40
|
export declare const useDashboardTheme: (args_0: DashboardThemeParams) => {
|
|
41
41
|
themeSettings: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataSource } from '@sisense/sdk-data';
|
|
1
|
+
import { DataSource, DataSourceField, Dimension } from '@sisense/sdk-data';
|
|
2
2
|
import { AttributiveElement } from '../dimensions-browser/types.js';
|
|
3
3
|
type AddFilterDataBrowserProps = {
|
|
4
4
|
dataSources: DataSource[];
|
|
@@ -13,4 +13,5 @@ type AddFilterDataBrowserProps = {
|
|
|
13
13
|
* A component that allows users to select a data source and an attribute to create a filter.
|
|
14
14
|
*/
|
|
15
15
|
export declare const AddFilterDataBrowser: ({ initialDataSource, dataSources, disabledAttributes, onAttributeClick, }: AddFilterDataBrowserProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const useGetDimensionsFromDataSourceFields: (dataSourceFields: DataSourceField[] | undefined, dataSource: DataSource) => Dimension[];
|
|
16
17
|
export {};
|
package/dist/packages/sdk-ui/src/domains/data-browser/data-schema-browser/data-schema-browser.d.ts
CHANGED
|
@@ -8,7 +8,8 @@ type DataSchemaBrowserProps = {
|
|
|
8
8
|
*
|
|
9
9
|
* @param params DataSchemaBrowserProps
|
|
10
10
|
* @returns ReactElement
|
|
11
|
-
*
|
|
11
|
+
*
|
|
12
|
+
* @sisenseInternal
|
|
12
13
|
*/
|
|
13
14
|
export declare const DataSchemaBrowser: ({ dimensions, collapseAll }: DataSchemaBrowserProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
15
|
export {};
|
|
@@ -54,6 +54,7 @@ export type AttributiveElement = Attribute | DateDimension;
|
|
|
54
54
|
*/
|
|
55
55
|
export type AttributeActionConfig = {
|
|
56
56
|
onClick(this: void, attribute: AttributiveElement): void;
|
|
57
|
+
getLabel?: (this: void, attribute: AttributiveElement) => string;
|
|
57
58
|
};
|
|
58
59
|
/**
|
|
59
60
|
* Config for secondary action to be performed on an attribute.
|
|
@@ -65,10 +66,17 @@ export type AttributeSecondaryActionConfig = {
|
|
|
65
66
|
SecondaryActionButtonIcon: React.ComponentType<{
|
|
66
67
|
attribute: AttributiveElement;
|
|
67
68
|
}>;
|
|
69
|
+
/**
|
|
70
|
+
* When true, the row keeps hover/focus style after the secondary action is clicked (e.g. while a menu is open).
|
|
71
|
+
* Call the `onSubmit` callback passed to `onClick` to clear the focus (e.g. when the menu closes).
|
|
72
|
+
*/
|
|
73
|
+
keepFocusedOnClick?: boolean;
|
|
68
74
|
/**
|
|
69
75
|
* Callback to be executed when the secondary action button is clicked.
|
|
76
|
+
* The optional event provides the click position for positioning menus.
|
|
77
|
+
* When keepFocusedOnClick is true, `onSubmit` is provided; call it to clear the focused state (e.g. in menu onClose).
|
|
70
78
|
*/
|
|
71
|
-
onClick(this: void, attribute: AttributiveElement): void;
|
|
79
|
+
onClick(this: void, attribute: AttributiveElement, event: React.MouseEvent, onSubmit: () => void): void;
|
|
72
80
|
};
|
|
73
81
|
/**
|
|
74
82
|
* Config for secondary action to be performed on a dimension.
|