@sisense/sdk-ui 2.28.0 → 2.29.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 +1 -1
- package/dist/ai.js +5 -5
- package/dist/analytics-composer/node.cjs +1 -1
- package/dist/analytics-composer/node.js +1256 -1203
- package/dist/analytics-composer.cjs +7 -7
- package/dist/analytics-composer.js +19 -18
- package/dist/apply-styled-options-to-query-CaP4IMrQ.js +6379 -0
- package/dist/apply-styled-options-to-query-D5D8pRl2.cjs +1 -0
- package/dist/index.cjs +398 -398
- package/dist/index.js +22490 -21772
- package/dist/index.umd.js +700 -700
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/get-dashboard-model.d.ts +7 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/translate-dashboard-utils.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/persist-dashboard-model-middleware.d.ts +10 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/types.d.ts +29 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/use-widget-updates-persistence.d.ts +27 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/persistence/deep-merge.d.ts +17 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/persistence/types.d.ts +15 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/persistence/update-types.d.ts +51 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/data.d.ts +0 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data/filter-and-aggregate-chart-data.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data-options/types.d.ts +27 -23
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data-options/utils.d.ts +4 -4
- package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/filter-to-readable-label.d.ts +14 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-definition.d.ts +5 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-pill.d.ts +5 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/truncate-pill-label.d.ts +10 -0
- package/dist/packages/sdk-ui/src/domains/widgets/change-events.d.ts +6 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/custom-widget/types.d.ts +11 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/pivot-table-widget/pivot-table-widget.d.ts +15 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/to-widget-dto-style.d.ts +41 -2
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/types.d.ts +6 -0
- package/dist/packages/sdk-ui/src/domains/widgets/hooks/use-track-widget-init.d.ts +44 -0
- package/dist/packages/sdk-ui/src/domains/widgets/hooks/widget-entity-id.d.ts +30 -0
- package/dist/packages/sdk-ui/src/domains/widgets/hooks/widget-tracking-adapters.d.ts +41 -0
- package/dist/packages/sdk-ui/src/domains/widgets/shared/widget-style-utils.d.ts +29 -0
- package/dist/packages/sdk-ui/src/domains/widgets/widget-model/widget-model-translator/to-widget-dto-panels.d.ts +29 -1
- package/dist/packages/sdk-ui/src/infra/api/rest-api.d.ts +2 -1
- package/dist/packages/sdk-ui/src/infra/app/settings/settings.d.ts +1 -7
- package/dist/packages/sdk-ui/src/infra/app/settings/types/features.d.ts +1 -9
- package/dist/packages/sdk-ui/src/infra/app/types.d.ts +14 -0
- package/dist/packages/sdk-ui/src/infra/contexts/sisense-context/sisense-context-provider.d.ts +1 -1
- package/dist/packages/sdk-ui/src/infra/formatting/format-data-set.d.ts +21 -0
- package/dist/packages/sdk-ui/src/infra/formatting/format-date.d.ts +67 -0
- package/dist/packages/sdk-ui/src/infra/formatting/format-number.d.ts +24 -0
- package/dist/packages/sdk-ui/src/infra/formatting/index.d.ts +5 -0
- package/dist/packages/sdk-ui/src/infra/modules/build-module-graph.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/modules/build-module-registry.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/modules/core-module-providers-tree.d.ts +11 -0
- package/dist/packages/sdk-ui/src/infra/modules/core-module.d.ts +26 -0
- package/dist/packages/sdk-ui/src/infra/modules/index.d.ts +3 -0
- package/dist/packages/sdk-ui/src/infra/modules/module-provider.d.ts +17 -0
- package/dist/packages/sdk-ui/src/infra/modules/modules-context.d.ts +20 -0
- package/dist/packages/sdk-ui/src/infra/modules/types.d.ts +79 -0
- package/dist/packages/sdk-ui/src/infra/plugins/widget-plugins/types.d.ts +52 -2
- package/dist/packages/sdk-ui/src/infra/plugins/widget-plugins/widget-plugin-registry.d.ts +3 -3
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/dimensions/get-dimension-name.d.ts +9 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/dimensions/translate-dimensions-to-json.d.ts +4 -3
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/filters/get-filter-name.d.ts +10 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/filters/translate-filters-to-json.d.ts +3 -3
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/get-query-element-summary.d.ts +23 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/measures/get-measure-name.d.ts +10 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/measures/translate-measures-to-json.d.ts +4 -3
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/index.d.ts +3 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/query/translate-query-from-json.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/query/translate-query-to-json.d.ts +4 -3
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/data-options/adapters.d.ts +3 -2
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/data-options/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/types.d.ts +70 -9
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/widget/helpers/to-widget-props.d.ts +3 -3
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/widget/helpers/translate-envelope-widget-from-json.d.ts +2 -3
- package/dist/packages/sdk-ui/src/modules/analytics-composer/types.d.ts +1 -18
- package/dist/packages/sdk-ui/src/props.d.ts +9 -0
- package/dist/packages/sdk-ui/src/public-api/alpha.d.ts +3 -0
- package/dist/packages/sdk-ui/src/public-api/public.d.ts +3 -1
- package/dist/packages/sdk-ui/src/public-api/sisense-internal.d.ts +1 -1
- package/dist/packages/sdk-ui/src/shared/components/loading-overlay.d.ts +1 -0
- package/dist/packages/sdk-ui/src/shared/hooks/use-element-height.d.ts +19 -0
- package/dist/packages/sdk-ui/src/shared/hooks/use-synced-state.d.ts +23 -2
- package/dist/packages/sdk-ui/src/shared/utils/filter-relations.d.ts +8 -0
- package/dist/packages/sdk-ui/src/shared/utils/gradient.d.ts +5 -0
- package/dist/types-7YG0uOzO.js +74 -0
- package/dist/{types-CzgBH2kL.cjs → types-DlYJ_DZ0.cjs} +1 -1
- package/dist/{use-hover-CaSOzp0i.cjs → use-hover-CANskYrn.cjs} +127 -127
- package/dist/{use-hover-B6VmMb06.js → use-hover-Dju4Dcv3.js} +11021 -10942
- package/dist/{utils-CsV-iYtb.js → utils-BKRpWUGm.js} +1061 -1058
- package/dist/{utils-BwGnDoB0.cjs → utils-C4PIba42.cjs} +10 -10
- package/dist/{widget-composer-C72Io-3c.cjs → widget-composer-BXEyx308.cjs} +1 -1
- package/dist/{widget-composer-Bv_OVu1o.js → widget-composer-DRDw1oBF.js} +3 -3
- package/package.json +9 -8
- package/dist/apply-styled-options-to-query-23D9br-S.cjs +0 -1
- package/dist/apply-styled-options-to-query-BagjzMqm.js +0 -5992
- package/dist/dimensions-Bn1EaWiP.js +0 -204
- package/dist/dimensions-D8r34WRI.cjs +0 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/use-widget-scroll-persistence.d.ts +0 -16
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/with-navigator-scroll-save.d.ts +0 -10
- package/dist/types-D3fPN43o.js +0 -74
|
@@ -94,7 +94,9 @@ export * as dashboardModelTranslator from '../domains/dashboarding/dashboard-mod
|
|
|
94
94
|
export * as dashboardHelpers from '../domains/dashboarding/dashboard-helpers';
|
|
95
95
|
export type { EmptyObject } from '../shared/utils/utility-types';
|
|
96
96
|
export { useFetch, type RequestConfig, type UseQueryResult } from '../shared/hooks/use-fetch';
|
|
97
|
-
export type { StyledColumn, SeriesStyleOptions, StyledMeasureColumn, CartesianChartDataOptions, CategoricalChartDataOptions, IndicatorChartDataOptions, ScatterChartDataOptions, AreamapChartDataOptions, CalendarHeatmapChartDataOptions, TableDataOptions, TabularChartDataOptions, PivotTableDataOptions, ScattermapLocationLevel, ScattermapChartDataOptions, BoxWhiskerType, BoxplotChartDataOptions, BoxplotChartCustomDataOptions, AreaRangeMeasureColumn, RangeChartDataOptions, ChartDataOptions, RegularChartDataOptions, } from '../domains/visualizations/core/chart-data-options/types';
|
|
97
|
+
export type { StyledColumn, SeriesStyleOptions, StyledMeasureColumn, CartesianChartDataOptions, CategoricalChartDataOptions, IndicatorChartDataOptions, ScatterChartDataOptions, AreamapChartDataOptions, CalendarHeatmapChartDataOptions, TableDataOptions, TabularChartDataOptions, PivotTableDataOptions, ScattermapLocationLevel, ScattermapChartDataOptions, BoxWhiskerType, BoxplotChartDataOptions, BoxplotChartCustomDataOptions, AreaRangeMeasureColumn, RangeChartDataOptions, ChartDataOptions, RegularChartDataOptions, CommonDataOptions, } from '../domains/visualizations/core/chart-data-options/types';
|
|
98
|
+
export { formatNumber, formatDate, getDefaultDateFormat, formatDataSet } from '../infra/formatting';
|
|
99
|
+
export type { FormatDateOptions, FormatDataSetOptions } from '../infra/formatting';
|
|
98
100
|
export type { TabberButtonsWidgetProps, SisenseContextProviderProps, ExecuteQueryProps, ThemeProviderProps, BeforeRenderHandler, IndicatorBeforeRenderHandler, ChartDataPointsEventHandler, DataPointsEventHandler, DataPointEventHandler, ScatterDataPointEventHandler, ScatterDataPointsEventHandler, AreamapDataPointEventHandler, ScattermapDataPointEventHandler, BoxplotDataPointEventHandler, IndicatorDataPointEventHandler, CalendarHeatmapDataPointEventHandler, CalendarHeatmapDataPointsEventHandler, PivotTableDataPointEventHandler, ChartEventProps, ChartProps, AreaChartProps, StreamgraphChartProps, BarChartProps, ColumnChartProps, FunnelChartProps, LineChartProps, PieChartProps, PolarChartProps, IndicatorChartProps, TableProps, PivotTableProps, ScatterChartProps, WidgetByIdProps, ExecuteQueryByWidgetIdProps, TreemapChartProps, SunburstChartProps, BoxplotChartProps, ScattermapChartProps, AreamapChartProps, AreaRangeChartProps, ContextMenuProps, DrilldownBreadcrumbsProps, DrilldownWidgetConfig, DrilldownWidgetProps, CalendarHeatmapChartProps, } from '../props';
|
|
99
101
|
export type { AutoZoomNavigatorScrollerLocation } from '../domains/widgets/components/widget-by-id/types';
|
|
100
102
|
export type { SortDirection, PivotRowsSort, AppConfig, DateConfig, CalendarDayOfWeek, IndicatorComponents, ScatterMarkerSize, LegendPosition, Coordinates, TableColorOptions, IndicatorRenderOptions, GeoDataElement, RawGeoDataElement, CartesianChartType, CategoricalChartType, ScatterChartType, IndicatorChartType, BoxplotChartType, ScattermapChartType, AreamapChartType, CalendarHeatmapChartType, TableType, TableChartType, RangeChartType, TextStyle, DataColorCondition, ConditionalDataColorOptions, DataColorOptions, RangeDataColorOptions, UniformDataColorOptions, AreaSubtype, AreaRangeSubtype, LineSubtype, PieSubtype, PolarSubtype, StackableSubtype, BoxplotSubtype, MonthOfYear, DayOfWeek, DateLevel, TabberButtonsWidgetStyleOptions, TabberButtonsWidgetCustomOptions, Color, ColorPaletteTheme, Navigator, LineWidth, DashStyle, EndCapType, LineOptions, Markers, X2Title, SeriesLabelsTextStyle, SeriesLabelsBase, SeriesLabelsAligning, SeriesLabels, TotalLabelsTextStyle, TotalLabels, LegendTitleOptions, LegendItemsOptions, LegendSymbolsOptions, LegendOptions, Legend, Labels, AxisLabel, Convolution, DataLimits, LineStyleOptions, AreaRangeStyleOptions, AreaStyleOptions, StreamgraphStyleOptions, StackableStyleOptions, PiePercentageLabels, PieSeriesLabels, PieStyleOptions, FunnelSeriesLabels, FunnelStyleOptions, PolarStyleOptions, IndicatorStyleOptions, TableStyleOptions, TabularChartStyleOptions, PivotTableStyleOptions, NumericSimpleIndicatorStyleOptions, NumericBarIndicatorStyleOptions, GaugeIndicatorStyleOptions, ScatterSeriesLabels, ScatterStyleOptions, TreemapSeriesLabels, TreemapStyleOptions, SunburstSeriesLabelsBase, SunburstSeriesLabels, SunburstStyleOptions, BoxplotStyleOptions, AreamapType, AreamapStyleOptions, ScattermapMarkers, ScattermapStyleOptions, CalendarHeatmapCellLabels, CalendarHeatmapSubtype, CalendarHeatmapStyleOptions, CalendarHeatmapViewType, ChartStyleOptions, RegularChartStyleOptions, ValueToColorMap, MultiColumnValueToColorMap, ChartType, RegularChartType, SeriesChartType, DecimalScale, NumberFormatConfig, ThemeOid, ChartThemeSettings, AiChatThemeSettings, ThemeSettingsFontSource, ThemeSettingsFont, FontsLoaderSettings, TypographyThemeSettings, GeneralThemeSettings, SpaceSizes, RadiusSizes, ShadowsTypes, AlignmentTypes, WidgetThemeSettings, FilterThemeSettings, ThemeSettings, WidgetStyleOptions, WidgetContainerStyleOptions, WidgetByIdStyleOptions, ChartWidgetStyleOptions, PivotTableWidgetStyleOptions, TextWidgetStyleOptions, CustomWidgetStyleOptions, DrilldownOptions, PivotTableDrilldownOptions, PivotTableSelectableDrilldownOptions, PivotTableNonSelectableDrilldownOptions, DrilldownSelection, DataOptionLocation, ChartDataPoints, ChartDataPoint, DataPoint, DataPointEntry, BasicDataPointEntry, AttributeDataPointEntry, MeasureDataPointEntry, ScatterDataPoint, BoxplotDataPoint, IndicatorDataPoint, CalendarHeatmapDataPoint, PivotTableDataPoint, AreamapDataPoint, ScattermapDataPoint, CustomWidgetDataPoint, CustomWidgetDataPointEventHandler, CustomWidgetDataPointContextMenuHandler, CustomWidgetDataPointsEventHandler, CustomWidgetEventProps, AbstractDataPointWithEntries, MenuPosition, MenuItemSection, CustomDrilldownResult, LoadingIndicatorConfig, GenericDataOptions, NestedTranslationResources, CustomTranslationObject, TranslationConfig, } from '../types';
|
|
@@ -20,7 +20,7 @@ export type { QuotaNotificationProps } from '../shared/components/quota-notifica
|
|
|
20
20
|
export { useQuotaNotification } from '../shared/hooks/use-quota-notification.js';
|
|
21
21
|
export type { QuotaNotificationOptions, QuotaApiResponse, QuotaState, } from '../shared/hooks/use-quota-notification.js';
|
|
22
22
|
export type { Plugin } from '../infra/plugins/types.js';
|
|
23
|
-
export type { WidgetPlugin, CustomVisualization, CustomVisualizationProps, CustomVisualizationStyleOptions, CustomVisualizationEventProps, CustomVisualizationDataPoint, CustomVisualizationDataPointEventHandler, CustomVisualizationDataPointContextMenuHandler, CustomVisualizationDataPointsEventHandler, DesignPanelProps, DesignPanel, } from '../infra/plugins/widget-plugins/types.js';
|
|
23
|
+
export type { WidgetPlugin, CustomVisualization, CustomVisualizationProps, VisualizationStateUpdate, CustomVisualizationStyleOptions, CustomVisualizationEventProps, CustomVisualizationDataPoint, CustomVisualizationDataPointEventHandler, CustomVisualizationDataPointContextMenuHandler, CustomVisualizationDataPointsEventHandler, DesignPanelProps, DesignPanel, } from '../infra/plugins/widget-plugins/types.js';
|
|
24
24
|
export { LoadingIndicator } from '../shared/components/loading-indicator.js';
|
|
25
25
|
export { DataSchemaBrowser } from '../domains/data-browser/data-schema-browser/data-schema-browser.js';
|
|
26
26
|
export { type NarrativeQueryParams } from '../domains/narrative/core/build-narrative-request.js';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Observes an HTML element's height via `ResizeObserver` and reports the latest
|
|
3
|
+
* measured height in CSS pixels.
|
|
4
|
+
*
|
|
5
|
+
* Returns a callback ref to attach to the target element and the current height.
|
|
6
|
+
* Height is `0` while no element is attached. The observer is re-bound when the
|
|
7
|
+
* attached node changes and disconnected on unmount.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* const { ref, height } = useElementHeight<HTMLDivElement>();
|
|
12
|
+
* return <div ref={ref}>{height}px</div>;
|
|
13
|
+
* ```
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
export declare function useElementHeight<T extends HTMLElement = HTMLElement>(): {
|
|
17
|
+
ref: (node: T | null) => void;
|
|
18
|
+
height: number;
|
|
19
|
+
};
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Options for {@link useSyncedState}.
|
|
4
|
+
*
|
|
5
|
+
* @alpha
|
|
6
|
+
*/
|
|
7
|
+
export type UseSyncedStateOptions<T> = {
|
|
3
8
|
/**
|
|
4
9
|
* A callback function that is triggered when the state is updated via the local setter,
|
|
5
10
|
* but not through synchronization with `syncValue`.
|
|
@@ -14,6 +19,22 @@ type UseSyncedStateOptions<T> = {
|
|
|
14
19
|
/**
|
|
15
20
|
* A custom React hook that behaves like the regular `useState`, but also synchronizes the state
|
|
16
21
|
* with an external `syncValue`.
|
|
22
|
+
*
|
|
23
|
+
* @param syncValue - The external value to synchronize with. When this value changes (as
|
|
24
|
+
* determined by `syncCompareFn`), the local state is updated to match it.
|
|
25
|
+
* @param options - Optional configuration object.
|
|
26
|
+
* @param options.onLocalStateChange - Callback invoked whenever the local state is updated via
|
|
27
|
+
* the returned setter (not triggered by external `syncValue` synchronization).
|
|
28
|
+
* @param options.syncCompareFn - Custom equality function used to detect changes in `syncValue`.
|
|
29
|
+
* Defaults to a deep equality check via `isEqual` from lodash-es. See {@link UseSyncedStateOptions}.
|
|
30
|
+
* @returns A tuple of `[localState, setState]` — the current local state and a setter that
|
|
31
|
+
* both updates state and fires `onLocalStateChange`.
|
|
32
|
+
* @example
|
|
33
|
+
* ```tsx
|
|
34
|
+
* const [localState, setLocalState] = useSyncedState(externalValue, {
|
|
35
|
+
* onLocalStateChange: (s) => console.log('local update', s),
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
* @alpha
|
|
17
39
|
*/
|
|
18
40
|
export declare function useSyncedState<T>(syncValue: T, { onLocalStateChange, syncCompareFn }?: UseSyncedStateOptions<T>): [T, Dispatch<SetStateAction<T>>];
|
|
19
|
-
export {};
|
|
@@ -9,6 +9,14 @@ export declare enum FiltersMergeStrategyEnum {
|
|
|
9
9
|
CODE_ONLY = "codeOnly"
|
|
10
10
|
}
|
|
11
11
|
export type FiltersMergeStrategy = `${FiltersMergeStrategyEnum}`;
|
|
12
|
+
/**
|
|
13
|
+
* Returns true if any node in the filter-relations tree uses an OR operator.
|
|
14
|
+
* Used to decide whether to show the AND/OR Formula tile — AND-only trees are the default
|
|
15
|
+
* behavior and don't warrant a visible indicator.
|
|
16
|
+
*
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export declare function hasOrOperator(relations: FilterRelationsRules): boolean;
|
|
12
20
|
/**
|
|
13
21
|
* Textual representation of filter relations for debugging purposes.
|
|
14
22
|
* Returns string like "(([Gender] AND [Country]) OR [Condition])".
|
|
@@ -178,6 +178,7 @@ export type GradientColor = LinearGradientColor | RadialGradientColor;
|
|
|
178
178
|
*
|
|
179
179
|
* @param value - The value to check
|
|
180
180
|
* @returns True if the value is a linear gradient
|
|
181
|
+
* @group Styling
|
|
181
182
|
*/
|
|
182
183
|
export declare const isLinearGradient: (value: any) => value is LinearGradientColor;
|
|
183
184
|
/**
|
|
@@ -185,6 +186,7 @@ export declare const isLinearGradient: (value: any) => value is LinearGradientCo
|
|
|
185
186
|
*
|
|
186
187
|
* @param value - The value to check
|
|
187
188
|
* @returns True if the value is a radial gradient
|
|
189
|
+
* @group Styling
|
|
188
190
|
*/
|
|
189
191
|
export declare const isRadialGradient: (value: any) => value is RadialGradientColor;
|
|
190
192
|
/**
|
|
@@ -192,6 +194,7 @@ export declare const isRadialGradient: (value: any) => value is RadialGradientCo
|
|
|
192
194
|
*
|
|
193
195
|
* @param value - The value to check
|
|
194
196
|
* @returns True if the value is a gradient
|
|
197
|
+
* @group Styling
|
|
195
198
|
*/
|
|
196
199
|
export declare const isGradient: (value: any) => value is GradientColor;
|
|
197
200
|
/**
|
|
@@ -315,6 +318,7 @@ export declare const RadialGradientPresets: {
|
|
|
315
318
|
* ]
|
|
316
319
|
* );
|
|
317
320
|
* ```
|
|
321
|
+
* @group Styling
|
|
318
322
|
*/
|
|
319
323
|
export declare const createLinearGradient: (direction: LinearGradientDirection, stops: readonly GradientStop[]) => LinearGradientColor;
|
|
320
324
|
/**
|
|
@@ -334,6 +338,7 @@ export declare const createLinearGradient: (direction: LinearGradientDirection,
|
|
|
334
338
|
* ]
|
|
335
339
|
* );
|
|
336
340
|
* ```
|
|
341
|
+
* @group Styling
|
|
337
342
|
*/
|
|
338
343
|
export declare const createRadialGradient: (center: RadialGradientConfig, stops: readonly GradientStop[]) => RadialGradientColor;
|
|
339
344
|
/**
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { c as i, g as l, a as n, b as o, D as d, d as u, M as s } from "./apply-styled-options-to-query-CaP4IMrQ.js";
|
|
2
|
+
class c extends d {
|
|
3
|
+
constructor(a, t) {
|
|
4
|
+
var r;
|
|
5
|
+
super((r = a.jaql.title) !== null && r !== void 0 ? r : "", t), this.__serializable = "JaqlElement", this.expression = a.jaql.dim || a.jaql.formula, this.metadataItem = a, a.jaql.agg ? this.aggregation = a.jaql.agg : delete this.aggregation, a.jaql.formula ? this.formula = a.jaql.formula : delete this.formula, a.jaql.sort ? this.sortType = u(a.jaql.sort) : delete this.sortType, this.skipValidation = !0;
|
|
6
|
+
}
|
|
7
|
+
get id() {
|
|
8
|
+
return this.expression;
|
|
9
|
+
}
|
|
10
|
+
jaql(a) {
|
|
11
|
+
return a === !0 ? this.metadataItem.jaql : this.metadataItem;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Gets a serializable representation of the element
|
|
15
|
+
*/
|
|
16
|
+
serialize() {
|
|
17
|
+
const a = super.serialize();
|
|
18
|
+
return a.metadataItem = this.metadataItem, a.type = this.type, a;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
const m = {
|
|
22
|
+
text: s.TextAttribute,
|
|
23
|
+
numeric: s.NumericAttribute,
|
|
24
|
+
datetime: s.DateLevel
|
|
25
|
+
}, y = (e) => e && e.__serializable === "JaqlElement";
|
|
26
|
+
function p(e) {
|
|
27
|
+
var a;
|
|
28
|
+
return new c(e, (a = m[e.jaql.datatype]) !== null && a !== void 0 ? a : "numeric");
|
|
29
|
+
}
|
|
30
|
+
function h(e) {
|
|
31
|
+
const { jaql: a } = e;
|
|
32
|
+
if (a.formula)
|
|
33
|
+
return i(a);
|
|
34
|
+
const t = l(a);
|
|
35
|
+
return "agg" in a && a.dim && a.datatype ? n({
|
|
36
|
+
expression: a.dim,
|
|
37
|
+
dataType: a.datatype,
|
|
38
|
+
agg: a.agg || "",
|
|
39
|
+
granularity: t,
|
|
40
|
+
format: void 0,
|
|
41
|
+
sort: a.sort,
|
|
42
|
+
title: a.title,
|
|
43
|
+
dataSource: a.datasource
|
|
44
|
+
}) : a.dim && a.datatype ? o({
|
|
45
|
+
expression: a.dim,
|
|
46
|
+
dataType: a.datatype,
|
|
47
|
+
granularity: t,
|
|
48
|
+
sort: a.sort,
|
|
49
|
+
title: a.title,
|
|
50
|
+
panel: e.panel,
|
|
51
|
+
dataSource: a.datasource
|
|
52
|
+
}) : p(e);
|
|
53
|
+
}
|
|
54
|
+
const q = {
|
|
55
|
+
jaql: { datasource: { title: "", type: "elasticube" }, metadata: [] },
|
|
56
|
+
queryTitle: "",
|
|
57
|
+
chartRecommendations: {}
|
|
58
|
+
}, f = {
|
|
59
|
+
model: "",
|
|
60
|
+
metadata: [],
|
|
61
|
+
chart: {},
|
|
62
|
+
queryTitle: ""
|
|
63
|
+
}, E = (e) => "widgetProps" in e, j = (e) => "dashboardOid" in e && "widgetOid" in e, b = (e) => "dashboardProps" in e, T = (e) => "dashboardOid" in e;
|
|
64
|
+
export {
|
|
65
|
+
f as E,
|
|
66
|
+
c as J,
|
|
67
|
+
T as a,
|
|
68
|
+
q as b,
|
|
69
|
+
h as c,
|
|
70
|
+
E as d,
|
|
71
|
+
b as e,
|
|
72
|
+
y as f,
|
|
73
|
+
j as i
|
|
74
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("./apply-styled-options-to-query-
|
|
1
|
+
"use strict";const a=require("./apply-styled-options-to-query-D5D8pRl2.cjs");class s extends a.DimensionalElement{constructor(e,r){var i;super((i=e.jaql.title)!==null&&i!==void 0?i:"",r),this.__serializable="JaqlElement",this.expression=e.jaql.dim||e.jaql.formula,this.metadataItem=e,e.jaql.agg?this.aggregation=e.jaql.agg:delete this.aggregation,e.jaql.formula?this.formula=e.jaql.formula:delete this.formula,e.jaql.sort?this.sortType=a.getSortType(e.jaql.sort):delete this.sortType,this.skipValidation=!0}get id(){return this.expression}jaql(e){return e===!0?this.metadataItem.jaql:this.metadataItem}serialize(){const e=super.serialize();return e.metadataItem=this.metadataItem,e.type=this.type,e}}const l={text:a.MetadataTypes.TextAttribute,numeric:a.MetadataTypes.NumericAttribute,datetime:a.MetadataTypes.DateLevel},d=t=>t&&t.__serializable==="JaqlElement";function n(t){var e;return new s(t,(e=l[t.jaql.datatype])!==null&&e!==void 0?e:"numeric")}function o(t){const{jaql:e}=t;if(e.formula)return a.createCalculatedMeasureHelper(e);const r=a.getGranularityFromJaql(e);return"agg"in e&&e.dim&&e.datatype?a.createMeasureHelper({expression:e.dim,dataType:e.datatype,agg:e.agg||"",granularity:r,format:void 0,sort:e.sort,title:e.title,dataSource:e.datasource}):e.dim&&e.datatype?a.createAttributeHelper({expression:e.dim,dataType:e.datatype,granularity:r,sort:e.sort,title:e.title,panel:t.panel,dataSource:e.datasource}):n(t)}const u={jaql:{datasource:{title:"",type:"elasticube"},metadata:[]},queryTitle:"",chartRecommendations:{}},m={model:"",metadata:[],chart:{},queryTitle:""},c=t=>"widgetProps"in t,p=t=>"dashboardOid"in t&&"widgetOid"in t,y=t=>"dashboardProps"in t,g=t=>"dashboardOid"in t;exports.EMPTY_EXPANDED_QUERY_MODEL=u;exports.EMPTY_SIMPLE_QUERY_MODEL=m;exports.JaqlElement=s;exports.createDimensionalElementFromMetadataItem=o;exports.isByIdDashboardCodeParams=g;exports.isByIdWidgetCodeParams=p;exports.isClientSideDashboardCodeParams=y;exports.isClientSideWidgetCodeParams=c;exports.isJaqlElement=d;
|