@sisense/sdk-ui-vue 2.39.0 → 2.40.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 +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +289 -288
- package/dist/src/ai/components/chatbot.d.ts +3 -0
- package/dist/src/ai/components/get-nlg-insights.d.ts +3 -0
- package/dist/src/ai/composables/use-get-nlg-insights.d.ts +5 -0
- package/dist/src/ai/composables/use-get-nlq-result.d.ts +4 -0
- package/dist/src/ai/composables/use-get-query-recommendations.d.ts +6 -0
- package/dist/src/ai/helpers/context-connectors/ai-context-connector.d.ts +0 -1
- package/dist/src/ai/index.d.ts +4 -4
- package/dist/src/ai/providers/ai-context-provider/ai-context-provider.d.ts +3 -0
- package/dist/src/ai/providers/ai-context-provider/ai-context.d.ts +0 -1
- package/dist/src/ai/public-api/beta.d.ts +6 -0
- package/dist/src/ai/public-api/index.d.ts +5 -0
- package/dist/src/ai/public-api/public.d.ts +9 -0
- package/dist/src/components/charts/area-chart.d.ts +3 -0
- package/dist/src/components/charts/area-range-chart.d.ts +3 -0
- package/dist/src/components/charts/areamap-chart.d.ts +3 -0
- package/dist/src/components/charts/bar-chart.d.ts +3 -0
- package/dist/src/components/charts/boxplot-chart.d.ts +3 -0
- package/dist/src/components/charts/calendar-heatmap-chart.d.ts +3 -0
- package/dist/src/components/charts/chart.d.ts +1 -0
- package/dist/src/components/charts/column-chart.d.ts +3 -0
- package/dist/src/components/charts/funnel-chart.d.ts +3 -0
- package/dist/src/components/charts/indicator-chart.d.ts +3 -0
- package/dist/src/components/charts/kpi-chart.d.ts +3 -0
- package/dist/src/components/charts/line-chart.d.ts +3 -0
- package/dist/src/components/charts/pie-chart.d.ts +3 -0
- package/dist/src/components/charts/pivot-table.d.ts +1 -0
- package/dist/src/components/charts/polar-chart.d.ts +3 -0
- package/dist/src/components/charts/sankey-chart.d.ts +3 -0
- package/dist/src/components/charts/scatter-chart.d.ts +3 -0
- package/dist/src/components/charts/scattermap-chart.d.ts +3 -0
- package/dist/src/components/charts/streamgraph-chart.d.ts +3 -0
- package/dist/src/components/charts/sunburst-chart.d.ts +3 -0
- package/dist/src/components/charts/table.d.ts +1 -0
- package/dist/src/components/charts/treemap-chart.d.ts +3 -0
- package/dist/src/components/context-menu.d.ts +3 -0
- package/dist/src/components/dashboard/dashboard-by-id.d.ts +5 -0
- package/dist/src/components/dashboard/dashboard-header-config.d.ts +10 -0
- package/dist/src/components/dashboard/dashboard-model.d.ts +1 -0
- package/dist/src/components/dashboard/dashboard.d.ts +5 -0
- package/dist/src/components/drilldown-breadcrumbs.d.ts +3 -0
- package/dist/src/components/drilldown-widget.d.ts +2 -0
- package/dist/src/components/filters/criteria-filter-tile.d.ts +3 -0
- package/dist/src/components/filters/date-range-filter-tile.d.ts +3 -0
- package/dist/src/components/filters/filter-tile.d.ts +3 -0
- package/dist/src/components/filters/filters-panel.d.ts +3 -0
- package/dist/src/components/filters/member-filter-tile.d.ts +3 -0
- package/dist/src/components/widgets/chart-widget.d.ts +3 -0
- package/dist/src/components/widgets/widget-by-id.d.ts +3 -0
- package/dist/src/components/widgets/widget-config.d.ts +10 -0
- package/dist/src/components/widgets/widget-header-config.d.ts +2 -0
- package/dist/src/components/widgets/widget-model.d.ts +1 -0
- package/dist/src/components/widgets/widget.d.ts +7 -0
- package/dist/src/composables/use-composed-dashboard.d.ts +2 -0
- package/dist/src/composables/use-custom-widgets.d.ts +3 -0
- package/dist/src/composables/use-execute-csv-query.d.ts +1 -0
- package/dist/src/composables/use-execute-custom-widget-query.d.ts +3 -0
- package/dist/src/composables/use-execute-pivot-query.d.ts +1 -0
- package/dist/src/composables/use-execute-query-by-widget-id.d.ts +1 -0
- package/dist/src/composables/use-execute-query.d.ts +1 -0
- package/dist/src/composables/use-fetch.d.ts +3 -0
- package/dist/src/composables/use-get-dashboard-model.d.ts +1 -0
- package/dist/src/composables/use-get-dashboard-models.d.ts +1 -0
- package/dist/src/composables/use-get-data-source-dimensions.d.ts +1 -0
- package/dist/src/composables/use-get-filter-members.d.ts +1 -0
- package/dist/src/composables/use-get-hierarchy-models.d.ts +1 -0
- package/dist/src/composables/use-get-shared-formula.d.ts +1 -0
- package/dist/src/composables/use-get-widget-model.d.ts +1 -0
- package/dist/src/composables/use-jtd-widget.d.ts +4 -0
- package/dist/src/composables/use-tracking.d.ts +0 -2
- package/dist/src/helpers/component-translator.d.ts +0 -7
- package/dist/src/helpers/context-connectors/custom-widgets-context-connector.d.ts +0 -1
- package/dist/src/helpers/context-connectors/plugin-context-connector.d.ts +0 -1
- package/dist/src/helpers/context-connectors/sisense-context-connector.d.ts +0 -1
- package/dist/src/helpers/context-connectors/theme-context-connector.d.ts +0 -1
- package/dist/src/helpers/setup-helper.d.ts +0 -4
- package/dist/src/helpers/vue-component-adapter.d.ts +0 -4
- package/dist/src/lib.d.ts +4 -13
- package/dist/src/providers/sisense-context-provider/sisense-context-provider.d.ts +3 -0
- package/dist/src/providers/theme-provider/theme-provider.d.ts +3 -0
- package/dist/src/public-api/alpha.d.ts +6 -0
- package/dist/src/public-api/beta.d.ts +7 -0
- package/dist/src/public-api/index.d.ts +7 -0
- package/dist/src/public-api/internal.d.ts +7 -0
- package/dist/src/public-api/public.d.ts +43 -0
- package/dist/src/types/maybe-ref.d.ts +3 -0
- package/dist/use-tracking-3f5321a8.js +541 -0
- package/dist/use-tracking-d839ab35.cjs +1 -0
- package/package.json +4 -3
- package/dist/src/utilities/index.d.ts +0 -23
- package/dist/use-tracking-69d1703f.cjs +0 -1
- package/dist/use-tracking-fa308ec8.js +0 -528
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public API exports of `@sisense/sdk-ui-vue`.
|
|
3
|
+
*
|
|
4
|
+
* Public APIs are stable and safe to use in production.
|
|
5
|
+
*/
|
|
6
|
+
export { DrilldownBreadcrumbs, type DrilldownBreadcrumbsProps, } from '../components/drilldown-breadcrumbs';
|
|
7
|
+
export { AreaChart, type AreaChartProps, AreamapChart, type AreamapChartProps, AreaRangeChart, type AreaRangeChartProps, BarChart, type BarChartProps, BoxplotChart, type BoxplotChartProps, CalendarHeatmapChart, type CalendarHeatmapChartProps, Chart, type ChartProps, ColumnChart, type ColumnChartProps, FunnelChart, type FunnelChartProps, IndicatorChart, type IndicatorChartProps, KpiChart, type KpiChartProps, LineChart, type LineChartProps, PieChart, type PieChartProps, PivotTable, type PivotTableProps, PolarChart, type PolarChartProps, SankeyChart, type SankeyChartProps, ScatterChart, type ScatterChartProps, ScattermapChart, type ScattermapChartProps, StreamgraphChart, type StreamgraphChartProps, SunburstChart, type SunburstChartProps, Table, type TableProps, TreemapChart, type TreemapChartProps, } from '../components/charts';
|
|
8
|
+
export { CriteriaFilterTile, type CriteriaFilterTileProps, DateRangeFilterTile, type DateRangeFilterTileProps, FiltersPanel, type FiltersPanelConfig, type FiltersPanelProps, FilterTile, type FilterTileActionsConfig, type FilterTileConfig, type FilterTileHeaderConfig, type FilterTileMenuActionItem, type FilterTileMenuConfig, type FilterTileMenuItem, type FilterTileMenuSubmenuItem, type FilterTileMenuTarget, FilterTileMenuTargets, type FilterTileProps, MemberFilterTile, type MemberFilterTileProps, RelativeDateFilterTile, type RelativeDateFilterTileProps, } from '../components/filters';
|
|
9
|
+
export { SisenseContextProvider, type SisenseContextProviderProps, ThemeProvider, type ThemeProviderProps, } from '../providers';
|
|
10
|
+
export { type ComposableDashboardProps, type CustomWidgetComponent, type CustomWidgetComponentProps, type CustomWidgetQueryState, type DataSourceDimensionsErrorState, type DataSourceDimensionsLoadingState, type DataSourceDimensionsState, type DataSourceDimensionsSuccessState, type ExecuteCustomWidgetQueryParams, type FilterMembersErrorState, type FilterMembersLoadingState, type FilterMembersState, type FilterMembersSuccessState, type GenericDataOptions, type GetDataSourceDimensionsParams, type GetFilterMembersData, type GetFilterMembersParams, type JumpToDashboardConfig, type JumpToDashboardConfigForPivot, useComposedDashboard, useCustomWidgets, useExecuteCsvQuery, useExecuteCustomWidgetQuery, useExecutePivotQuery, useExecuteQuery, useExecuteQueryByWidgetId, useFetch, type UseFetchOptions, useGetDashboardModel, useGetDashboardModels, useGetDataSourceDimensions, useGetFilterMembers, useGetHierarchyModels, useGetSharedFormula, useGetWidgetModel, useJtdWidget, } from '../composables';
|
|
11
|
+
export { ContextMenu, type ContextMenuProps } from '../components/context-menu';
|
|
12
|
+
export { type MaybeRef, type MaybeRefOrWithRefs, type MaybeWithRefs } from '../types';
|
|
13
|
+
export { default as DrilldownWidget } from '../components/drilldown-widget.vue';
|
|
14
|
+
export { type DrilldownWidgetProps } from '../components/drilldown-widget';
|
|
15
|
+
export { type AppConfig, type AreamapChartDataOptions, type AreamapChartType, type AreamapStyleOptions, type AreaRangeStyleOptions, type AreaStyleOptions, type AreaSubtype, type AxisLabel, type BeforeRenderHandler, type BoxplotChartCustomDataOptions, type BoxplotChartDataOptions, type BoxplotChartType, type BoxplotDataPoint, type BoxplotStyleOptions, type BoxplotSubtype, boxWhiskerProcessResult, type BoxWhiskerType, type CalendarDayOfWeek, type CalendarHeatmapChartDataOptions, type CalendarHeatmapChartType, type CalendarHeatmapDataPoint, type CalendarHeatmapStyleOptions, type CalendarHeatmapSubtype, type CalendarHeatmapViewType, type CartesianChartDataOptions, type CartesianChartType, type CartesianWidgetType, type CategoricalChartDataOptions, type CategoricalChartType, type CategoricalWidgetType, type ChartDataOptions, type ChartStyleOptions, type ChartType, type ChartWidgetStyleOptions, type Color, type ColorPaletteTheme, type CommonDataOptions, type ConditionalDataColorOptions, type Convolution, type DashboardLayoutOptions, type DashStyle, type DataColorCondition, type DataColorOptions, type DataLimits, type DataOptionLocation, type DataPoint, type DateConfig, type DateLevel, type DayOfWeek, type DecimalScale, type DrilldownOptions, type DrilldownSelection, type EndCapType, type ExecuteQueryByWidgetIdParams, type ExecuteQueryParams, extractDimensionsAndMeasures, type FilterVariant, formatDataSet, type FormatDataSetOptions, formatDate, type FormatDateOptions, formatNumber, type FunnelStyleOptions, type GaugeIndicatorStyleOptions, type GetDashboardModelOptions, type GetDashboardModelParams, type GetDashboardModelsOptions, type GetDashboardModelsParams, getDefaultDateFormat, type GetHierarchyModelsParams, type GetSharedFormulaParams, type GetWidgetModelParams, type IndicatorBeforeRenderHandler, type IndicatorChartDataOptions, type IndicatorChartType, type IndicatorComponents, type IndicatorRenderOptions, type IndicatorStyleOptions, type KpiBeforeRenderHandler, type KpiCardStyleOptions, type KpiChartDataOptions, type KpiChartType, type KpiComparison, type KpiComparisonInfo, type KpiComparisonStyleOptions, type KpiDataPoint, type KpiDataPointEventHandler, type KpiIcon, type KpiIconCondition, type KpiIconName, type KpiRenderOptions, type KpiSparklineStyleOptions, type KpiSparklineType, type KpiStyleOptions, type KpiTextSize, type KpiTextStyle, type KpiTextTransform, type KpiTitleAlign, type KpiTitleStyleOptions, type KpiValueMode, type KpiValueStyleOptions, type Labels, type Legend, type LineOptions, type LineStyleOptions, type LineSubtype, type LineWidth, type Markers, type Member, type MenuItemSection, type MenuPosition, type MonthOfYear, type MultiColumnValueToColorMap, type Navigator, type NumberFormatConfig, type NumericBarIndicatorStyleOptions, type NumericSimpleIndicatorStyleOptions, type PieStyleOptions, type PieSubtype, type PivotRowsSort, type PivotTableDataOptions, type PivotTableDrilldownOptions, type PivotTableNonSelectableDrilldownOptions, type PivotTableSelectableDrilldownOptions, type PivotTableStyleOptions, type PolarStyleOptions, type PolarSubtype, type RangeDataColorOptions, type SankeyChartDataOptions, type SankeyChartType, type SankeyStyleOptions, type ScatterChartDataOptions, type ScatterChartType, type ScatterDataPoint, type ScattermapChartDataOptions, type ScattermapChartType, type ScattermapLocationLevel, type ScattermapMarkers, type ScattermapStyleOptions, type ScatterMarkerSize, type ScatterStyleOptions, type SeriesChartType, type SeriesLabels, type SortDirection, type StackableStyleOptions, type StackableSubtype, type StreamgraphStyleOptions, type StyledColumn, type StyledMeasureColumn, type SunburstStyleOptions, type TableDataOptions, type TableStyleOptions, type TableType, type TabularWidgetType, type ThemeOid, type ThemeSettings, type TranslationConfig, type TreemapStyleOptions, type UniformDataColorOptions, type UseGetSharedFormulaParams, type ValueToColorMap, type WidgetByIdStyleOptions, type WidgetDataOptions, type WidgetHeaderMenuActionItem, type WidgetHeaderMenuConfig, type WidgetHeaderMenuItem, type WidgetHeaderMenuSubmenuItem, type WidgetHeaderMenuTarget, WidgetHeaderMenuTargets, type WidgetId, type WidgetNarrativeConfig, type WidgetNarrativeDisplayLocation, type WidgetsOptions, type WidgetsPanelColumnLayout, type WidgetsPanelLayout, type WidgetStyleOptions, type WidgetType, type X2Title, } from '../sdk-ui-core-exports';
|
|
16
|
+
export { ChartWidget, type ChartWidgetConfig, type ChartWidgetProps, type CustomWidgetConfig, type CustomWidgetProps, PivotTableWidget, type PivotTableWidgetConfig, type PivotTableWidgetProps, type TextWidgetConfig, type TextWidgetProps, Widget, WidgetById, type WidgetByIdProps, type WidgetConfig, type WidgetHeaderConfig, type WidgetModel, type WidgetProps, type WithCommonWidgetProps, } from '../components/widgets';
|
|
17
|
+
export { Dashboard, DashboardById, type DashboardByIdConfig, type DashboardByIdProps, type DashboardConfig, type DashboardFiltersPanelConfig, type DashboardHeaderConfig, type DashboardHeaderItem, type DashboardHeaderItemComponent, type DashboardHeaderItemComponentProps, type DashboardHeaderItemPosition, type DashboardHeaderItemSize, type DashboardHeaderItemsTransform, type DashboardHeaderTarget, DashboardHeaderTargets, type DashboardModel, type DashboardProps, type DashboardResolvedHeaderItem, } from '../components/dashboard';
|
|
18
|
+
/**
|
|
19
|
+
* {@inheritDoc @sisense/sdk-ui!dashboardModelTranslator}
|
|
20
|
+
*
|
|
21
|
+
* @group Fusion Assets
|
|
22
|
+
* @fusionEmbed
|
|
23
|
+
* @shortDescription Utility functions to translate a Fusion dashboard model from and to other dashboard data structures
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
export * as dashboardModelTranslator from '../utilities/dashboard-model-translator';
|
|
27
|
+
/**
|
|
28
|
+
* {@inheritDoc @sisense/sdk-ui!dashboardHelpers}
|
|
29
|
+
*
|
|
30
|
+
* @group Dashboards
|
|
31
|
+
* @shortDescription Utility functions to manipulate dashboard elements
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
export * as dashboardHelpers from '../utilities/dashboard-helpers';
|
|
35
|
+
/**
|
|
36
|
+
* {@inheritDoc @sisense/sdk-ui!widgetModelTranslator}
|
|
37
|
+
*
|
|
38
|
+
* @group Fusion Assets
|
|
39
|
+
* @fusionEmbed
|
|
40
|
+
* @shortDescription Utility functions to translate a Fusion widget model from and to other widget data structures
|
|
41
|
+
* @public
|
|
42
|
+
*/
|
|
43
|
+
export * as widgetModelTranslator from '../utilities/widget-model-translator';
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { Ref } from 'vue';
|
|
2
|
+
/** @public */
|
|
2
3
|
export type MaybeRef<T> = Ref<T> | T;
|
|
4
|
+
/** @public */
|
|
3
5
|
export type MaybeWithRefs<T extends object> = {
|
|
4
6
|
[Property in keyof T]: MaybeRef<T[Property]>;
|
|
5
7
|
};
|
|
8
|
+
/** @public */
|
|
6
9
|
export type MaybeRefOrWithRefs<T extends Object> = MaybeRef<T> | MaybeWithRefs<T>;
|
|
7
10
|
/**
|
|
8
11
|
* Converts all non-function properties of `T` into Vue refs while keeping function properties specified by `Fns` unchanged.
|
|
@@ -0,0 +1,541 @@
|
|
|
1
|
+
import { getDefaultThemeSettings as ne, getThemeSettingsByOid as oe, createClientApplication as ae, TabberButtonsWidget as se, DataObserver as h, CustomSisenseContextProvider as ie, CustomThemeProvider as ce, CustomWidgetsProviderAdapter as ue, CustomPluginContextProvider as fe, ComponentAdapter as W, createWrapperElement as le, trackHook as pe } from "@sisense/sdk-ui-preact/internal";
|
|
2
|
+
import { isRef as O, toRaw as _, toValue as de, inject as A, ref as l, defineComponent as S, watchEffect as d, provide as v, shallowRef as ge, watch as be, computed as R, createVNode as ye, onBeforeUnmount as V, h as x, isReactive as me } from "vue";
|
|
3
|
+
function ve(e, t) {
|
|
4
|
+
for (var r = -1, n = e == null ? 0 : e.length, s = Array(n); ++r < n; )
|
|
5
|
+
s[r] = t(e[r], r, e);
|
|
6
|
+
return s;
|
|
7
|
+
}
|
|
8
|
+
function je(e, t) {
|
|
9
|
+
return ve(t, function(r) {
|
|
10
|
+
return e[r];
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function he(e, t) {
|
|
14
|
+
for (var r = -1, n = Array(e); ++r < e; )
|
|
15
|
+
n[r] = t(r);
|
|
16
|
+
return n;
|
|
17
|
+
}
|
|
18
|
+
var Ae = typeof global == "object" && global && global.Object === Object && global;
|
|
19
|
+
const N = Ae;
|
|
20
|
+
var Te = typeof self == "object" && self && self.Object === Object && self, Oe = N || Te || Function("return this")();
|
|
21
|
+
const G = Oe;
|
|
22
|
+
var xe = G.Symbol;
|
|
23
|
+
const j = xe;
|
|
24
|
+
var L = Object.prototype, Ce = L.hasOwnProperty, Se = L.toString, g = j ? j.toStringTag : void 0;
|
|
25
|
+
function we(e) {
|
|
26
|
+
var t = Ce.call(e, g), r = e[g];
|
|
27
|
+
try {
|
|
28
|
+
e[g] = void 0;
|
|
29
|
+
var n = !0;
|
|
30
|
+
} catch {
|
|
31
|
+
}
|
|
32
|
+
var s = Se.call(e);
|
|
33
|
+
return n && (t ? e[g] = r : delete e[g]), s;
|
|
34
|
+
}
|
|
35
|
+
var Pe = Object.prototype, Ee = Pe.toString;
|
|
36
|
+
function $e(e) {
|
|
37
|
+
return Ee.call(e);
|
|
38
|
+
}
|
|
39
|
+
var Re = "[object Null]", Be = "[object Undefined]", B = j ? j.toStringTag : void 0;
|
|
40
|
+
function w(e) {
|
|
41
|
+
return e == null ? e === void 0 ? Be : Re : B && B in Object(e) ? we(e) : $e(e);
|
|
42
|
+
}
|
|
43
|
+
function P(e) {
|
|
44
|
+
return e != null && typeof e == "object";
|
|
45
|
+
}
|
|
46
|
+
var Ie = "[object Arguments]";
|
|
47
|
+
function I(e) {
|
|
48
|
+
return P(e) && w(e) == Ie;
|
|
49
|
+
}
|
|
50
|
+
var q = Object.prototype, Fe = q.hasOwnProperty, De = q.propertyIsEnumerable, Me = I(function() {
|
|
51
|
+
return arguments;
|
|
52
|
+
}()) ? I : function(e) {
|
|
53
|
+
return P(e) && Fe.call(e, "callee") && !De.call(e, "callee");
|
|
54
|
+
};
|
|
55
|
+
const Ke = Me;
|
|
56
|
+
var Ue = Array.isArray;
|
|
57
|
+
const We = Ue;
|
|
58
|
+
function _e() {
|
|
59
|
+
return !1;
|
|
60
|
+
}
|
|
61
|
+
var H = typeof exports == "object" && exports && !exports.nodeType && exports, F = H && typeof module == "object" && module && !module.nodeType && module, Ve = F && F.exports === H, D = Ve ? G.Buffer : void 0, Ne = D ? D.isBuffer : void 0, Ge = Ne || _e;
|
|
62
|
+
const Le = Ge;
|
|
63
|
+
var qe = 9007199254740991, He = /^(?:0|[1-9]\d*)$/;
|
|
64
|
+
function ke(e, t) {
|
|
65
|
+
var r = typeof e;
|
|
66
|
+
return t = t ?? qe, !!t && (r == "number" || r != "symbol" && He.test(e)) && e > -1 && e % 1 == 0 && e < t;
|
|
67
|
+
}
|
|
68
|
+
var ze = 9007199254740991;
|
|
69
|
+
function k(e) {
|
|
70
|
+
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= ze;
|
|
71
|
+
}
|
|
72
|
+
var Xe = "[object Arguments]", Ye = "[object Array]", Je = "[object Boolean]", Qe = "[object Date]", Ze = "[object Error]", et = "[object Function]", tt = "[object Map]", rt = "[object Number]", nt = "[object Object]", ot = "[object RegExp]", at = "[object Set]", st = "[object String]", it = "[object WeakMap]", ct = "[object ArrayBuffer]", ut = "[object DataView]", ft = "[object Float32Array]", lt = "[object Float64Array]", pt = "[object Int8Array]", dt = "[object Int16Array]", gt = "[object Int32Array]", bt = "[object Uint8Array]", yt = "[object Uint8ClampedArray]", mt = "[object Uint16Array]", vt = "[object Uint32Array]", a = {};
|
|
73
|
+
a[ft] = a[lt] = a[pt] = a[dt] = a[gt] = a[bt] = a[yt] = a[mt] = a[vt] = !0;
|
|
74
|
+
a[Xe] = a[Ye] = a[ct] = a[Je] = a[ut] = a[Qe] = a[Ze] = a[et] = a[tt] = a[rt] = a[nt] = a[ot] = a[at] = a[st] = a[it] = !1;
|
|
75
|
+
function jt(e) {
|
|
76
|
+
return P(e) && k(e.length) && !!a[w(e)];
|
|
77
|
+
}
|
|
78
|
+
function ht(e) {
|
|
79
|
+
return function(t) {
|
|
80
|
+
return e(t);
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
var z = typeof exports == "object" && exports && !exports.nodeType && exports, b = z && typeof module == "object" && module && !module.nodeType && module, At = b && b.exports === z, T = At && N.process, Tt = function() {
|
|
84
|
+
try {
|
|
85
|
+
var e = b && b.require && b.require("util").types;
|
|
86
|
+
return e || T && T.binding && T.binding("util");
|
|
87
|
+
} catch {
|
|
88
|
+
}
|
|
89
|
+
}();
|
|
90
|
+
const M = Tt;
|
|
91
|
+
var K = M && M.isTypedArray, Ot = K ? ht(K) : jt;
|
|
92
|
+
const xt = Ot;
|
|
93
|
+
var Ct = Object.prototype, St = Ct.hasOwnProperty;
|
|
94
|
+
function wt(e, t) {
|
|
95
|
+
var r = We(e), n = !r && Ke(e), s = !r && !n && Le(e), o = !r && !n && !s && xt(e), i = r || n || s || o, u = i ? he(e.length, String) : [], p = u.length;
|
|
96
|
+
for (var c in e)
|
|
97
|
+
(t || St.call(e, c)) && !(i && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
98
|
+
(c == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
99
|
+
s && (c == "offset" || c == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
100
|
+
o && (c == "buffer" || c == "byteLength" || c == "byteOffset") || // Skip index properties.
|
|
101
|
+
ke(c, p))) && u.push(c);
|
|
102
|
+
return u;
|
|
103
|
+
}
|
|
104
|
+
var Pt = Object.prototype;
|
|
105
|
+
function Et(e) {
|
|
106
|
+
var t = e && e.constructor, r = typeof t == "function" && t.prototype || Pt;
|
|
107
|
+
return e === r;
|
|
108
|
+
}
|
|
109
|
+
function $t(e, t) {
|
|
110
|
+
return function(r) {
|
|
111
|
+
return e(t(r));
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
var Rt = $t(Object.keys, Object);
|
|
115
|
+
const Bt = Rt;
|
|
116
|
+
var It = Object.prototype, Ft = It.hasOwnProperty;
|
|
117
|
+
function Dt(e) {
|
|
118
|
+
if (!Et(e))
|
|
119
|
+
return Bt(e);
|
|
120
|
+
var t = [];
|
|
121
|
+
for (var r in Object(e))
|
|
122
|
+
Ft.call(e, r) && r != "constructor" && t.push(r);
|
|
123
|
+
return t;
|
|
124
|
+
}
|
|
125
|
+
function Mt(e) {
|
|
126
|
+
var t = typeof e;
|
|
127
|
+
return e != null && (t == "object" || t == "function");
|
|
128
|
+
}
|
|
129
|
+
var Kt = "[object AsyncFunction]", Ut = "[object Function]", Wt = "[object GeneratorFunction]", _t = "[object Proxy]";
|
|
130
|
+
function Vt(e) {
|
|
131
|
+
if (!Mt(e))
|
|
132
|
+
return !1;
|
|
133
|
+
var t = w(e);
|
|
134
|
+
return t == Ut || t == Wt || t == Kt || t == _t;
|
|
135
|
+
}
|
|
136
|
+
function Nt(e) {
|
|
137
|
+
return e != null && k(e.length) && !Vt(e);
|
|
138
|
+
}
|
|
139
|
+
function Gt(e) {
|
|
140
|
+
return Nt(e) ? wt(e) : Dt(e);
|
|
141
|
+
}
|
|
142
|
+
function Lt(e) {
|
|
143
|
+
return e == null ? [] : je(e, Gt(e));
|
|
144
|
+
}
|
|
145
|
+
function X(e) {
|
|
146
|
+
return e !== null && !Array.isArray(e) && typeof e == "object";
|
|
147
|
+
}
|
|
148
|
+
function U(e) {
|
|
149
|
+
return O(e) ? _(de(e)) : e;
|
|
150
|
+
}
|
|
151
|
+
function or(e) {
|
|
152
|
+
const t = U(e);
|
|
153
|
+
return Object.fromEntries(
|
|
154
|
+
Object.entries(t).map(([r, n]) => [r, U(n)])
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
function ar(...e) {
|
|
158
|
+
return e.map((t) => O(t) ? [t] : X(t) ? Lt(t).filter(O) : []).flat();
|
|
159
|
+
}
|
|
160
|
+
const y = (e) => {
|
|
161
|
+
if (typeof e == "object" && e !== null) {
|
|
162
|
+
if (typeof Object.getPrototypeOf == "function") {
|
|
163
|
+
const t = Object.getPrototypeOf(e);
|
|
164
|
+
return t === Object.prototype || t === null;
|
|
165
|
+
}
|
|
166
|
+
return Object.prototype.toString.call(e) === "[object Object]";
|
|
167
|
+
}
|
|
168
|
+
return !1;
|
|
169
|
+
}, qt = /* @__PURE__ */ new Set([
|
|
170
|
+
"__proto__",
|
|
171
|
+
"constructor",
|
|
172
|
+
"prototype",
|
|
173
|
+
"toString",
|
|
174
|
+
"valueOf",
|
|
175
|
+
"hasOwnProperty",
|
|
176
|
+
"isPrototypeOf",
|
|
177
|
+
"propertyIsEnumerable",
|
|
178
|
+
"toLocaleString"
|
|
179
|
+
]), f = (...e) => e.reduce((t, r) => {
|
|
180
|
+
if (r === void 0)
|
|
181
|
+
return t;
|
|
182
|
+
if (Array.isArray(r))
|
|
183
|
+
throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");
|
|
184
|
+
return Object.keys(r).forEach((n) => {
|
|
185
|
+
qt.has(n) || (Array.isArray(t[n]) && Array.isArray(r[n]) ? t[n] = f.options.mergeArrays ? f.options.uniqueArrayItems ? Array.from(new Set(t[n].concat(r[n]))) : [...t[n], ...r[n]] : r[n] : y(t[n]) && y(r[n]) ? t[n] = f(t[n], r[n]) : !y(t[n]) && y(r[n]) ? t[n] = f(r[n], void 0) : t[n] = r[n] === void 0 ? f.options.allowUndefinedOverrides ? r[n] : t[n] : r[n]);
|
|
186
|
+
}), t;
|
|
187
|
+
}, {}), C = {
|
|
188
|
+
allowUndefinedOverrides: !0,
|
|
189
|
+
mergeArrays: !0,
|
|
190
|
+
uniqueArrayItems: !0
|
|
191
|
+
};
|
|
192
|
+
f.options = C;
|
|
193
|
+
f.withOptions = (e, ...t) => {
|
|
194
|
+
f.options = Object.assign(Object.assign({}, C), e);
|
|
195
|
+
const r = f(...t);
|
|
196
|
+
return f.options = C, r;
|
|
197
|
+
};
|
|
198
|
+
const m = {
|
|
199
|
+
isInitialized: !1,
|
|
200
|
+
app: void 0,
|
|
201
|
+
tracking: {
|
|
202
|
+
enabled: !0,
|
|
203
|
+
packageName: "sdk-ui-vue"
|
|
204
|
+
},
|
|
205
|
+
errorBoundary: {
|
|
206
|
+
showErrorBox: !0
|
|
207
|
+
}
|
|
208
|
+
}, Y = Symbol("sisenseContextKey"), E = () => A(
|
|
209
|
+
Y,
|
|
210
|
+
() => l(m),
|
|
211
|
+
!0
|
|
212
|
+
), J = Symbol("pluginsContextKey"), Ht = () => A(J, () => l([]), !0), Q = Symbol("themeContextConfigKey"), Z = () => A(Q, () => l(ne()), !0), kt = S({
|
|
213
|
+
props: {
|
|
214
|
+
theme: [Object, String],
|
|
215
|
+
/**
|
|
216
|
+
* @internal
|
|
217
|
+
*/
|
|
218
|
+
skipTracking: Boolean
|
|
219
|
+
},
|
|
220
|
+
setup(e, { slots: t }) {
|
|
221
|
+
const r = Z(), n = E(), s = l(r == null ? void 0 : r.value);
|
|
222
|
+
return d(async () => {
|
|
223
|
+
const { theme: o = {} } = e, { app: i } = n.value, u = typeof o == "string";
|
|
224
|
+
let p = o;
|
|
225
|
+
if (u && i)
|
|
226
|
+
try {
|
|
227
|
+
p = await oe(o, i.httpClient);
|
|
228
|
+
} catch (c) {
|
|
229
|
+
console.error("Vue ThemeProvider failed to fetch theme by id:", c);
|
|
230
|
+
}
|
|
231
|
+
s.value = f.withOptions(
|
|
232
|
+
{ mergeArrays: !1 },
|
|
233
|
+
r == null ? void 0 : r.value,
|
|
234
|
+
p
|
|
235
|
+
);
|
|
236
|
+
}), v(Q, s), () => {
|
|
237
|
+
var o;
|
|
238
|
+
return (o = t.default) == null ? void 0 : o.call(t);
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
}), sr = /* @__PURE__ */ S({
|
|
242
|
+
props: {
|
|
243
|
+
/**
|
|
244
|
+
* {@inheritDoc @sisense/sdk-ui!SisenseContextProviderProps.defaultDataSource}
|
|
245
|
+
*
|
|
246
|
+
* @category Sisense App
|
|
247
|
+
*/
|
|
248
|
+
defaultDataSource: [String, Object],
|
|
249
|
+
/**
|
|
250
|
+
* {@inheritDoc @sisense/sdk-ui!SisenseContextProviderProps.url}
|
|
251
|
+
*
|
|
252
|
+
* @category Sisense App
|
|
253
|
+
*/
|
|
254
|
+
url: {
|
|
255
|
+
type: String,
|
|
256
|
+
required: !0
|
|
257
|
+
},
|
|
258
|
+
/**
|
|
259
|
+
* {@inheritDoc @sisense/sdk-ui!SisenseContextProviderProps.ssoEnabled}
|
|
260
|
+
*
|
|
261
|
+
* @category Sisense Authentication
|
|
262
|
+
*/
|
|
263
|
+
ssoEnabled: Boolean,
|
|
264
|
+
/**
|
|
265
|
+
* {@inheritDoc @sisense/sdk-ui!SisenseContextProviderProps.enableSilentPreAuth}
|
|
266
|
+
*
|
|
267
|
+
* @category Sisense Authentication
|
|
268
|
+
*/
|
|
269
|
+
enableSilentPreAuth: {
|
|
270
|
+
type: Boolean,
|
|
271
|
+
default: !1
|
|
272
|
+
},
|
|
273
|
+
/**
|
|
274
|
+
* {@inheritDoc @sisense/sdk-ui!SisenseContextProviderProps.token}
|
|
275
|
+
*
|
|
276
|
+
* @category Sisense Authentication
|
|
277
|
+
*/
|
|
278
|
+
token: String,
|
|
279
|
+
/**
|
|
280
|
+
* {@inheritDoc @sisense/sdk-ui!SisenseContextProviderProps.wat}
|
|
281
|
+
*
|
|
282
|
+
* @category Sisense Authentication
|
|
283
|
+
*/
|
|
284
|
+
wat: String,
|
|
285
|
+
/**
|
|
286
|
+
* {@inheritDoc @sisense/sdk-ui!SisenseContextProviderProps.appConfig}
|
|
287
|
+
*
|
|
288
|
+
* @category Sisense App
|
|
289
|
+
*/
|
|
290
|
+
appConfig: Object,
|
|
291
|
+
/**
|
|
292
|
+
* {@inheritDoc @sisense/sdk-ui!SisenseContextProviderProps.plugins}
|
|
293
|
+
*
|
|
294
|
+
* @category Sisense App
|
|
295
|
+
* @internal
|
|
296
|
+
*/
|
|
297
|
+
plugins: {
|
|
298
|
+
type: Array,
|
|
299
|
+
default: () => []
|
|
300
|
+
},
|
|
301
|
+
/**
|
|
302
|
+
* {@inheritDoc @sisense/sdk-ui!SisenseContextProviderProps.ssoMaxAuthRedirectAttempts}
|
|
303
|
+
*
|
|
304
|
+
* @category Sisense Authentication
|
|
305
|
+
* @alpha
|
|
306
|
+
*/
|
|
307
|
+
ssoMaxAuthRedirectAttempts: Number,
|
|
308
|
+
/**
|
|
309
|
+
* {@inheritDoc @sisense/sdk-ui!SisenseContextProviderProps.ssoRedirectAttemptsTtlMs}
|
|
310
|
+
*
|
|
311
|
+
* @category Sisense Authentication
|
|
312
|
+
* @alpha
|
|
313
|
+
*/
|
|
314
|
+
ssoRedirectAttemptsTtlMs: Number,
|
|
315
|
+
/**
|
|
316
|
+
* @internal
|
|
317
|
+
*/
|
|
318
|
+
showRuntimeErrors: {
|
|
319
|
+
type: Boolean,
|
|
320
|
+
default: m.errorBoundary.showErrorBox
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
setup(e, {
|
|
324
|
+
slots: t
|
|
325
|
+
}) {
|
|
326
|
+
const r = ge();
|
|
327
|
+
be(() => [e.url, e.token, e.wat, e.ssoEnabled, e.defaultDataSource, e.appConfig, e.enableSilentPreAuth, e.ssoMaxAuthRedirectAttempts, e.ssoRedirectAttemptsTtlMs], (o, i, u) => {
|
|
328
|
+
let p = !1;
|
|
329
|
+
u(() => {
|
|
330
|
+
p = !0;
|
|
331
|
+
}), !(e.token === null || e.wat === null) && ae({
|
|
332
|
+
...e,
|
|
333
|
+
packageName: "sdk-ui-vue"
|
|
334
|
+
}).then((c) => {
|
|
335
|
+
p || (r.value = c);
|
|
336
|
+
}).catch((c) => {
|
|
337
|
+
p ? console.debug("Ignoring a failed Sisense app creation that was superseded", c) : console.error("Failed to create the Sisense app", c);
|
|
338
|
+
});
|
|
339
|
+
}, {
|
|
340
|
+
immediate: !0
|
|
341
|
+
});
|
|
342
|
+
const n = R(() => {
|
|
343
|
+
var o, i, u;
|
|
344
|
+
return {
|
|
345
|
+
...m,
|
|
346
|
+
isInitialized: !0,
|
|
347
|
+
app: r.value,
|
|
348
|
+
loadingIndicatorConfig: (o = e.appConfig) == null ? void 0 : o.loadingIndicatorConfig,
|
|
349
|
+
errorBoundary: {
|
|
350
|
+
showErrorBox: e.showRuntimeErrors ?? !0
|
|
351
|
+
},
|
|
352
|
+
tracking: {
|
|
353
|
+
...m.tracking,
|
|
354
|
+
enabled: ((u = (i = e.appConfig) == null ? void 0 : i.trackingConfig) == null ? void 0 : u.enabled) ?? !0
|
|
355
|
+
}
|
|
356
|
+
};
|
|
357
|
+
});
|
|
358
|
+
v(Y, n);
|
|
359
|
+
const s = R(() => e.plugins ?? []);
|
|
360
|
+
return v(J, s), () => {
|
|
361
|
+
var o;
|
|
362
|
+
return ye(kt, {
|
|
363
|
+
theme: (o = n.value.app) == null ? void 0 : o.settings.serverThemeSettings
|
|
364
|
+
}, {
|
|
365
|
+
default: () => {
|
|
366
|
+
var i;
|
|
367
|
+
return [(i = t.default) == null ? void 0 : i.call(t)];
|
|
368
|
+
}
|
|
369
|
+
});
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
}), ee = {
|
|
373
|
+
customWidgetsMap: /* @__PURE__ */ new Map([
|
|
374
|
+
// The built-in widget is stored in the type-erased custom-widget map.
|
|
375
|
+
["tabber-buttons", se]
|
|
376
|
+
])
|
|
377
|
+
}, te = Symbol("customWidgetsContextKey"), zt = () => A(
|
|
378
|
+
te,
|
|
379
|
+
() => l(ee),
|
|
380
|
+
!0
|
|
381
|
+
), ir = S({
|
|
382
|
+
setup(e, { slots: t }) {
|
|
383
|
+
return v(te, l(ee)), () => {
|
|
384
|
+
var r;
|
|
385
|
+
return (r = t.default) == null ? void 0 : r.call(t);
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
}), Xt = () => {
|
|
389
|
+
const e = E(), t = new h({
|
|
390
|
+
context: e.value
|
|
391
|
+
});
|
|
392
|
+
return d(() => {
|
|
393
|
+
t.setValue({ context: e.value });
|
|
394
|
+
}), {
|
|
395
|
+
propsObserver: t,
|
|
396
|
+
providerComponent: ie
|
|
397
|
+
};
|
|
398
|
+
}, Yt = () => {
|
|
399
|
+
const e = {
|
|
400
|
+
skipTracking: !0
|
|
401
|
+
}, t = Z(), r = new h({
|
|
402
|
+
context: {
|
|
403
|
+
...e,
|
|
404
|
+
...t.value && {
|
|
405
|
+
themeSettings: t == null ? void 0 : t.value
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
});
|
|
409
|
+
return d(() => {
|
|
410
|
+
r.setValue({
|
|
411
|
+
context: {
|
|
412
|
+
...e,
|
|
413
|
+
...t.value && {
|
|
414
|
+
themeSettings: t.value
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
});
|
|
418
|
+
}), {
|
|
419
|
+
propsObserver: r,
|
|
420
|
+
providerComponent: ce
|
|
421
|
+
};
|
|
422
|
+
}, Jt = () => {
|
|
423
|
+
const e = zt(), t = new h({
|
|
424
|
+
context: e.value
|
|
425
|
+
});
|
|
426
|
+
return d(() => {
|
|
427
|
+
t.setValue({
|
|
428
|
+
context: e.value
|
|
429
|
+
});
|
|
430
|
+
}), {
|
|
431
|
+
propsObserver: t,
|
|
432
|
+
providerComponent: ue
|
|
433
|
+
};
|
|
434
|
+
}, Qt = () => {
|
|
435
|
+
const e = Ht(), t = new h({
|
|
436
|
+
context: { plugins: e.value }
|
|
437
|
+
});
|
|
438
|
+
return d(() => {
|
|
439
|
+
t.setValue({ context: { plugins: e.value } });
|
|
440
|
+
}), {
|
|
441
|
+
propsObserver: t,
|
|
442
|
+
providerComponent: fe
|
|
443
|
+
};
|
|
444
|
+
};
|
|
445
|
+
function re() {
|
|
446
|
+
return [
|
|
447
|
+
Qt(),
|
|
448
|
+
Jt(),
|
|
449
|
+
Xt(),
|
|
450
|
+
Yt()
|
|
451
|
+
];
|
|
452
|
+
}
|
|
453
|
+
function Zt(e) {
|
|
454
|
+
return me(e) ? _(e) : e;
|
|
455
|
+
}
|
|
456
|
+
function $(e) {
|
|
457
|
+
const t = Zt(e);
|
|
458
|
+
for (const r in t) {
|
|
459
|
+
const n = t[r];
|
|
460
|
+
!X(n) && !Array.isArray(n) || (t[r] = $(n));
|
|
461
|
+
}
|
|
462
|
+
return t;
|
|
463
|
+
}
|
|
464
|
+
const cr = (e, t, r = re()) => {
|
|
465
|
+
if (!t)
|
|
466
|
+
return null;
|
|
467
|
+
const n = l(null), s = typeof t == "function" ? t : () => $(t), o = new W(e, r);
|
|
468
|
+
return V(() => {
|
|
469
|
+
o.destroy();
|
|
470
|
+
}), () => (n.value && o.render(n.value, s()), x("div", { ref: n, style: "width: 100%; height: 100%" }));
|
|
471
|
+
}, ur = (e, t, r, n = re()) => {
|
|
472
|
+
const s = l(), o = l(), i = new W(e, n);
|
|
473
|
+
return V(() => {
|
|
474
|
+
i.destroy();
|
|
475
|
+
}), () => {
|
|
476
|
+
if (s.value && o.value) {
|
|
477
|
+
const u = le(o.value);
|
|
478
|
+
i.render(s.value, { ...$(t), children: u });
|
|
479
|
+
}
|
|
480
|
+
return [
|
|
481
|
+
x("div", { ref: s }),
|
|
482
|
+
x("div", { ref: o }, r.default ? r.default() : [])
|
|
483
|
+
];
|
|
484
|
+
};
|
|
485
|
+
};
|
|
486
|
+
function er(e, t) {
|
|
487
|
+
Object.assign(e.value, t);
|
|
488
|
+
}
|
|
489
|
+
function tr(e) {
|
|
490
|
+
const t = l(e);
|
|
491
|
+
function r(n) {
|
|
492
|
+
typeof n == "object" && typeof t.value == "object" ? er(t, n) : t.value = n;
|
|
493
|
+
}
|
|
494
|
+
return [t, r];
|
|
495
|
+
}
|
|
496
|
+
function fr(e, t) {
|
|
497
|
+
const [r, n] = tr(t);
|
|
498
|
+
return [r, (o) => {
|
|
499
|
+
const i = e(r.value, o);
|
|
500
|
+
n(i);
|
|
501
|
+
}];
|
|
502
|
+
}
|
|
503
|
+
const lr = (e) => {
|
|
504
|
+
const t = l(!1), r = E(), n = () => {
|
|
505
|
+
const { app: s } = r.value;
|
|
506
|
+
if (!s || t.value)
|
|
507
|
+
return null;
|
|
508
|
+
try {
|
|
509
|
+
pe(e, "sdk-ui-vue", s, () => t.value = !0);
|
|
510
|
+
} catch (o) {
|
|
511
|
+
console.error("An error occurred when calling the trackHook", o);
|
|
512
|
+
}
|
|
513
|
+
};
|
|
514
|
+
return d(() => {
|
|
515
|
+
n();
|
|
516
|
+
}), { hasTrackedRef: t };
|
|
517
|
+
};
|
|
518
|
+
export {
|
|
519
|
+
ir as C,
|
|
520
|
+
sr as S,
|
|
521
|
+
kt as T,
|
|
522
|
+
fr as a,
|
|
523
|
+
ar as b,
|
|
524
|
+
re as c,
|
|
525
|
+
ur as d,
|
|
526
|
+
U as e,
|
|
527
|
+
Xt as f,
|
|
528
|
+
E as g,
|
|
529
|
+
tr as h,
|
|
530
|
+
Z as i,
|
|
531
|
+
Y as j,
|
|
532
|
+
Q as k,
|
|
533
|
+
te as l,
|
|
534
|
+
$ as m,
|
|
535
|
+
zt as n,
|
|
536
|
+
Qt as o,
|
|
537
|
+
Yt as p,
|
|
538
|
+
cr as s,
|
|
539
|
+
or as t,
|
|
540
|
+
lr as u
|
|
541
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const f=require("@sisense/sdk-ui-preact/internal"),o=require("vue");function Z(e,t){for(var r=-1,n=e==null?0:e.length,s=Array(n);++r<n;)s[r]=t(e[r],r,e);return s}function ee(e,t){return Z(t,function(r){return e[r]})}function te(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var re=typeof global=="object"&&global&&global.Object===Object&&global;const K=re;var ne=typeof self=="object"&&self&&self.Object===Object&&self,oe=K||ne||Function("return this")();const M=oe;var ae=M.Symbol;const v=ae;var U=Object.prototype,ie=U.hasOwnProperty,se=U.toString,g=v?v.toStringTag:void 0;function ce(e){var t=ie.call(e,g),r=e[g];try{e[g]=void 0;var n=!0}catch{}var s=se.call(e);return n&&(t?e[g]=r:delete e[g]),s}var ue=Object.prototype,fe=ue.toString;function le(e){return fe.call(e)}var pe="[object Null]",de="[object Undefined]",$=v?v.toStringTag:void 0;function O(e){return e==null?e===void 0?de:pe:$&&$ in Object(e)?ce(e):le(e)}function x(e){return e!=null&&typeof e=="object"}var ge="[object Arguments]";function B(e){return x(e)&&O(e)==ge}var V=Object.prototype,be=V.hasOwnProperty,ye=V.propertyIsEnumerable,me=B(function(){return arguments}())?B:function(e){return x(e)&&be.call(e,"callee")&&!ye.call(e,"callee")};const ve=me;var he=Array.isArray;const je=he;function Ce(){return!1}var _=typeof exports=="object"&&exports&&!exports.nodeType&&exports,D=_&&typeof module=="object"&&module&&!module.nodeType&&module,Ae=D&&D.exports===_,I=Ae?M.Buffer:void 0,Te=I?I.isBuffer:void 0,Oe=Te||Ce;const xe=Oe;var we=9007199254740991,Se=/^(?:0|[1-9]\d*)$/;function Pe(e,t){var r=typeof e;return t=t??we,!!t&&(r=="number"||r!="symbol"&&Se.test(e))&&e>-1&&e%1==0&&e<t}var Ee=9007199254740991;function N(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ee}var Re="[object Arguments]",$e="[object Array]",Be="[object Boolean]",De="[object Date]",Ie="[object Error]",Fe="[object Function]",We="[object Map]",Ke="[object Number]",Me="[object Object]",Ue="[object RegExp]",Ve="[object Set]",_e="[object String]",Ne="[object WeakMap]",qe="[object ArrayBuffer]",Ge="[object DataView]",He="[object Float32Array]",Le="[object Float64Array]",ke="[object Int8Array]",ze="[object Int16Array]",Xe="[object Int32Array]",Ye="[object Uint8Array]",Je="[object Uint8ClampedArray]",Qe="[object Uint16Array]",Ze="[object Uint32Array]",i={};i[He]=i[Le]=i[ke]=i[ze]=i[Xe]=i[Ye]=i[Je]=i[Qe]=i[Ze]=!0;i[Re]=i[$e]=i[qe]=i[Be]=i[Ge]=i[De]=i[Ie]=i[Fe]=i[We]=i[Ke]=i[Me]=i[Ue]=i[Ve]=i[_e]=i[Ne]=!1;function et(e){return x(e)&&N(e.length)&&!!i[O(e)]}function tt(e){return function(t){return e(t)}}var q=typeof exports=="object"&&exports&&!exports.nodeType&&exports,b=q&&typeof module=="object"&&module&&!module.nodeType&&module,rt=b&&b.exports===q,C=rt&&K.process,nt=function(){try{var e=b&&b.require&&b.require("util").types;return e||C&&C.binding&&C.binding("util")}catch{}}();const F=nt;var W=F&&F.isTypedArray,ot=W?tt(W):et;const at=ot;var it=Object.prototype,st=it.hasOwnProperty;function ct(e,t){var r=je(e),n=!r&&ve(e),s=!r&&!n&&xe(e),a=!r&&!n&&!s&&at(e),c=r||n||s||a,l=c?te(e.length,String):[],d=l.length;for(var u in e)(t||st.call(e,u))&&!(c&&(u=="length"||s&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Pe(u,d)))&&l.push(u);return l}var ut=Object.prototype;function ft(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||ut;return e===r}function lt(e,t){return function(r){return e(t(r))}}var pt=lt(Object.keys,Object);const dt=pt;var gt=Object.prototype,bt=gt.hasOwnProperty;function yt(e){if(!ft(e))return dt(e);var t=[];for(var r in Object(e))bt.call(e,r)&&r!="constructor"&&t.push(r);return t}function mt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var vt="[object AsyncFunction]",ht="[object Function]",jt="[object GeneratorFunction]",Ct="[object Proxy]";function At(e){if(!mt(e))return!1;var t=O(e);return t==ht||t==jt||t==vt||t==Ct}function Tt(e){return e!=null&&N(e.length)&&!At(e)}function Ot(e){return Tt(e)?ct(e):yt(e)}function xt(e){return e==null?[]:ee(e,Ot(e))}function G(e){return e!==null&&!Array.isArray(e)&&typeof e=="object"}function A(e){return o.isRef(e)?o.toRaw(o.toValue(e)):e}function wt(e){const t=A(e);return Object.fromEntries(Object.entries(t).map(([r,n])=>[r,A(n)]))}function St(...e){return e.map(t=>o.isRef(t)?[t]:G(t)?xt(t).filter(o.isRef):[]).flat()}const y=e=>{if(typeof e=="object"&&e!==null){if(typeof Object.getPrototypeOf=="function"){const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}return Object.prototype.toString.call(e)==="[object Object]"}return!1},Pt=new Set(["__proto__","constructor","prototype","toString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString"]),p=(...e)=>e.reduce((t,r)=>{if(r===void 0)return t;if(Array.isArray(r))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(r).forEach(n=>{Pt.has(n)||(Array.isArray(t[n])&&Array.isArray(r[n])?t[n]=p.options.mergeArrays?p.options.uniqueArrayItems?Array.from(new Set(t[n].concat(r[n]))):[...t[n],...r[n]]:r[n]:y(t[n])&&y(r[n])?t[n]=p(t[n],r[n]):!y(t[n])&&y(r[n])?t[n]=p(r[n],void 0):t[n]=r[n]===void 0?p.options.allowUndefinedOverrides?r[n]:t[n]:r[n])}),t},{}),T={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};p.options=T;p.withOptions=(e,...t)=>{p.options=Object.assign(Object.assign({},T),e);const r=p(...t);return p.options=T,r};const m={isInitialized:!1,app:void 0,tracking:{enabled:!0,packageName:"sdk-ui-vue"},errorBoundary:{showErrorBox:!0}},w=Symbol("sisenseContextKey"),h=()=>o.inject(w,()=>o.ref(m),!0),H=Symbol("pluginsContextKey"),Et=()=>o.inject(H,()=>o.ref([]),!0),S=Symbol("themeContextConfigKey"),P=()=>o.inject(S,()=>o.ref(f.getDefaultThemeSettings()),!0),L=o.defineComponent({props:{theme:[Object,String],skipTracking:Boolean},setup(e,{slots:t}){const r=P(),n=h(),s=o.ref(r==null?void 0:r.value);return o.watchEffect(async()=>{const{theme:a={}}=e,{app:c}=n.value,l=typeof a=="string";let d=a;if(l&&c)try{d=await f.getThemeSettingsByOid(a,c.httpClient)}catch(u){console.error("Vue ThemeProvider failed to fetch theme by id:",u)}s.value=p.withOptions({mergeArrays:!1},r==null?void 0:r.value,d)}),o.provide(S,s),()=>{var a;return(a=t.default)==null?void 0:a.call(t)}}}),Rt=o.defineComponent({props:{defaultDataSource:[String,Object],url:{type:String,required:!0},ssoEnabled:Boolean,enableSilentPreAuth:{type:Boolean,default:!1},token:String,wat:String,appConfig:Object,plugins:{type:Array,default:()=>[]},ssoMaxAuthRedirectAttempts:Number,ssoRedirectAttemptsTtlMs:Number,showRuntimeErrors:{type:Boolean,default:m.errorBoundary.showErrorBox}},setup(e,{slots:t}){const r=o.shallowRef();o.watch(()=>[e.url,e.token,e.wat,e.ssoEnabled,e.defaultDataSource,e.appConfig,e.enableSilentPreAuth,e.ssoMaxAuthRedirectAttempts,e.ssoRedirectAttemptsTtlMs],(a,c,l)=>{let d=!1;l(()=>{d=!0}),!(e.token===null||e.wat===null)&&f.createClientApplication({...e,packageName:"sdk-ui-vue"}).then(u=>{d||(r.value=u)}).catch(u=>{d?console.debug("Ignoring a failed Sisense app creation that was superseded",u):console.error("Failed to create the Sisense app",u)})},{immediate:!0});const n=o.computed(()=>{var a,c,l;return{...m,isInitialized:!0,app:r.value,loadingIndicatorConfig:(a=e.appConfig)==null?void 0:a.loadingIndicatorConfig,errorBoundary:{showErrorBox:e.showRuntimeErrors??!0},tracking:{...m.tracking,enabled:((l=(c=e.appConfig)==null?void 0:c.trackingConfig)==null?void 0:l.enabled)??!0}}});o.provide(w,n);const s=o.computed(()=>e.plugins??[]);return o.provide(H,s),()=>{var a;return o.createVNode(L,{theme:(a=n.value.app)==null?void 0:a.settings.serverThemeSettings},{default:()=>{var c;return[(c=t.default)==null?void 0:c.call(t)]}})}}}),k={customWidgetsMap:new Map([["tabber-buttons",f.TabberButtonsWidget]])},E=Symbol("customWidgetsContextKey"),z=()=>o.inject(E,()=>o.ref(k),!0),$t=o.defineComponent({setup(e,{slots:t}){return o.provide(E,o.ref(k)),()=>{var r;return(r=t.default)==null?void 0:r.call(t)}}}),X=()=>{const e=h(),t=new f.DataObserver({context:e.value});return o.watchEffect(()=>{t.setValue({context:e.value})}),{propsObserver:t,providerComponent:f.CustomSisenseContextProvider}},Y=()=>{const e={skipTracking:!0},t=P(),r=new f.DataObserver({context:{...e,...t.value&&{themeSettings:t==null?void 0:t.value}}});return o.watchEffect(()=>{r.setValue({context:{...e,...t.value&&{themeSettings:t.value}}})}),{propsObserver:r,providerComponent:f.CustomThemeProvider}},Bt=()=>{const e=z(),t=new f.DataObserver({context:e.value});return o.watchEffect(()=>{t.setValue({context:e.value})}),{propsObserver:t,providerComponent:f.CustomWidgetsProviderAdapter}},J=()=>{const e=Et(),t=new f.DataObserver({context:{plugins:e.value}});return o.watchEffect(()=>{t.setValue({context:{plugins:e.value}})}),{propsObserver:t,providerComponent:f.CustomPluginContextProvider}};function R(){return[J(),Bt(),X(),Y()]}function Dt(e){return o.isReactive(e)?o.toRaw(e):e}function j(e){const t=Dt(e);for(const r in t){const n=t[r];!G(n)&&!Array.isArray(n)||(t[r]=j(n))}return t}const It=(e,t,r=R())=>{if(!t)return null;const n=o.ref(null),s=typeof t=="function"?t:()=>j(t),a=new f.ComponentAdapter(e,r);return o.onBeforeUnmount(()=>{a.destroy()}),()=>(n.value&&a.render(n.value,s()),o.h("div",{ref:n,style:"width: 100%; height: 100%"}))},Ft=(e,t,r,n=R())=>{const s=o.ref(),a=o.ref(),c=new f.ComponentAdapter(e,n);return o.onBeforeUnmount(()=>{c.destroy()}),()=>{if(s.value&&a.value){const l=f.createWrapperElement(a.value);c.render(s.value,{...j(t),children:l})}return[o.h("div",{ref:s}),o.h("div",{ref:a},r.default?r.default():[])]}};function Wt(e,t){Object.assign(e.value,t)}function Q(e){const t=o.ref(e);function r(n){typeof n=="object"&&typeof t.value=="object"?Wt(t,n):t.value=n}return[t,r]}function Kt(e,t){const[r,n]=Q(t);return[r,a=>{const c=e(r.value,a);n(c)}]}const Mt=e=>{const t=o.ref(!1),r=h(),n=()=>{const{app:s}=r.value;if(!s||t.value)return null;try{f.trackHook(e,"sdk-ui-vue",s,()=>t.value=!0)}catch(a){console.error("An error occurred when calling the trackHook",a)}};return o.watchEffect(()=>{n()}),{hasTrackedRef:t}};exports.CustomWidgetsProvider=$t;exports.SisenseContextProvider=Rt;exports.ThemeProvider=L;exports.collectRefs=St;exports.createDefaultContextConnectors=R;exports.createPluginContextConnector=J;exports.createSisenseContextConnector=X;exports.createThemeContextConnector=Y;exports.customWidgetsContextKey=E;exports.getCustomWidgetsContext=z;exports.getSisenseContext=h;exports.getThemeContext=P;exports.setupHelper=It;exports.setupHelperWithChildren=Ft;exports.sisenseContextKey=w;exports.themeContextConfigKey=S;exports.toDeepRaw=j;exports.toPlainObject=wt;exports.toPlainValue=A;exports.useReducer=Kt;exports.useRefState=Q;exports.useTracking=Mt;
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"Sisense",
|
|
12
12
|
"Compose SDK"
|
|
13
13
|
],
|
|
14
|
-
"version": "2.
|
|
14
|
+
"version": "2.40.0",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"main": "./dist/index.cjs",
|
|
17
17
|
"module": "./dist/index.js",
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"dist/**/*"
|
|
53
53
|
],
|
|
54
54
|
"scripts": {
|
|
55
|
+
"public-api-check": "node ./scripts/public-api-check.cjs",
|
|
55
56
|
"dev": "vite",
|
|
56
57
|
"build": "run-p type-check build-only",
|
|
57
58
|
"build:prod": "run-p type-check build-only:prod",
|
|
@@ -73,8 +74,8 @@
|
|
|
73
74
|
"clean": "rm -rf ./dist && rm -rf ./coverage && rm -rf tsconfig.tsbuildinfo"
|
|
74
75
|
},
|
|
75
76
|
"dependencies": {
|
|
76
|
-
"@sisense/sdk-data": "2.
|
|
77
|
-
"@sisense/sdk-ui-preact": "2.
|
|
77
|
+
"@sisense/sdk-data": "2.40.0",
|
|
78
|
+
"@sisense/sdk-ui-preact": "2.40.0",
|
|
78
79
|
"lodash-es": "^4.17.21",
|
|
79
80
|
"ts-deepmerge": "^8.0.0",
|
|
80
81
|
"vue": "^3.3.2"
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* {@inheritDoc @sisense/sdk-ui!dashboardModelTranslator}
|
|
3
|
-
*
|
|
4
|
-
* @group Fusion Assets
|
|
5
|
-
* @fusionEmbed
|
|
6
|
-
* @shortDescription Utility functions to translate a Fusion dashboard model from and to other dashboard data structures
|
|
7
|
-
*/
|
|
8
|
-
export * as dashboardModelTranslator from './dashboard-model-translator';
|
|
9
|
-
/**
|
|
10
|
-
* {@inheritDoc @sisense/sdk-ui!dashboardHelpers}
|
|
11
|
-
*
|
|
12
|
-
* @group Dashboards
|
|
13
|
-
* @shortDescription Utility functions to manipulate dashboard elements
|
|
14
|
-
*/
|
|
15
|
-
export * as dashboardHelpers from './dashboard-helpers';
|
|
16
|
-
/**
|
|
17
|
-
* {@inheritDoc @sisense/sdk-ui!widgetModelTranslator}
|
|
18
|
-
*
|
|
19
|
-
* @group Fusion Assets
|
|
20
|
-
* @fusionEmbed
|
|
21
|
-
* @shortDescription Utility functions to translate a Fusion widget model from and to other widget data structures
|
|
22
|
-
*/
|
|
23
|
-
export * as widgetModelTranslator from './widget-model-translator';
|