@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
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
import { D as T, M as h, S as f, p as _, a as H, w as b, n as A, j as R, b as n, c as u, d as w } from "./apply-styled-options-to-query-BagjzMqm.js";
|
|
2
|
-
class y extends T {
|
|
3
|
-
constructor(t, e, r, o, d, m, l, c, a, g) {
|
|
4
|
-
if (super(t, d || h.Dimension, m, c, a), this.__serializable = "DimensionalDimension", this._dimensions = [], this._attributes = [], this._sort = f.None, !a && e) {
|
|
5
|
-
const { table: D, column: s } = _(e);
|
|
6
|
-
this.composeCode = `${H}.${b(D)}.${b(s)}`;
|
|
7
|
-
}
|
|
8
|
-
this._sort = l || f.None, this._expression = e, this.setDimensions(o || []), this.setAttributes(r), g && (this.defaultAttribute = g);
|
|
9
|
-
}
|
|
10
|
-
static parseType(t) {
|
|
11
|
-
switch (t) {
|
|
12
|
-
case "datetime":
|
|
13
|
-
case h.DateDimension:
|
|
14
|
-
return h.DateDimension;
|
|
15
|
-
case "text":
|
|
16
|
-
case h.TextDimension:
|
|
17
|
-
return h.TextDimension;
|
|
18
|
-
case "numeric":
|
|
19
|
-
case h.NumericDimension:
|
|
20
|
-
return h.NumericDimension;
|
|
21
|
-
}
|
|
22
|
-
return h.TextDimension;
|
|
23
|
-
}
|
|
24
|
-
getAttachedName(t, e) {
|
|
25
|
-
let r = t;
|
|
26
|
-
const o = A(t);
|
|
27
|
-
return (o === "id" || o === "name" || Object.getOwnPropertyDescriptor(this, o) !== void 0 || this[o] !== void 0) && (r = e), r;
|
|
28
|
-
}
|
|
29
|
-
setDimensions(t) {
|
|
30
|
-
this._dimensions = t;
|
|
31
|
-
for (let e = 0; e < t.length; e++) {
|
|
32
|
-
const r = this.getAttachedName(t[e].name, t[e].attributes[0].expression);
|
|
33
|
-
this[A(r)] = t[e], r != t[e].name && (t[e].name = r);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
setAttributes(t) {
|
|
37
|
-
this._attributes = t || [];
|
|
38
|
-
for (let e = 0; e < t.length; e++) {
|
|
39
|
-
const r = this.getAttachedName(t[e].name, t[e].expression);
|
|
40
|
-
this[A(r)] = t[e], t[e].name != r && (t[e].name = r);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* gets the element's ID
|
|
45
|
-
*/
|
|
46
|
-
get id() {
|
|
47
|
-
return this._expression;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Gets the child attributes
|
|
51
|
-
*/
|
|
52
|
-
get attributes() {
|
|
53
|
-
return this._attributes;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Gets the child dimensions
|
|
57
|
-
*/
|
|
58
|
-
get dimensions() {
|
|
59
|
-
return this._dimensions;
|
|
60
|
-
}
|
|
61
|
-
get expression() {
|
|
62
|
-
return this._expression;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Gets the sort definition of this instance
|
|
66
|
-
*
|
|
67
|
-
* @returns The Sort definition of this instance
|
|
68
|
-
*/
|
|
69
|
-
getSort() {
|
|
70
|
-
return this._sort;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Gets a sorted {@link Dimension} with the given definition
|
|
74
|
-
*
|
|
75
|
-
* @param sort - Sort definition
|
|
76
|
-
* @returns An instance representing the sorted {@link Dimension} of this instance
|
|
77
|
-
*/
|
|
78
|
-
sort(t) {
|
|
79
|
-
return new y(this.name, this.expression, this.attributes, this.dimensions, this.type, this.description, t, this.dataSource, this.composeCode, this.defaultAttribute);
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Gets a serializable representation of the element
|
|
83
|
-
*/
|
|
84
|
-
serialize() {
|
|
85
|
-
const t = super.serialize();
|
|
86
|
-
return t.expression = this.expression, this.getSort() !== void 0 && (t.sort = this.getSort()), t.attributes = this._attributes.map((e) => e.serialize()), t.dimensions = this._dimensions.map((e) => e.serialize()), this.defaultAttribute && (t.defaultAttribute = this.defaultAttribute.serialize()), t;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Gets the JAQL representation of this instance
|
|
90
|
-
*
|
|
91
|
-
* @param nested - defines whether the JAQL is nested within parent JAQL statement or a root JAQL element
|
|
92
|
-
*/
|
|
93
|
-
jaql(t) {
|
|
94
|
-
if (this.defaultAttribute)
|
|
95
|
-
return this.defaultAttribute.jaql(t);
|
|
96
|
-
if (this.dimensions.length > 0)
|
|
97
|
-
return this.dimensions[0].jaql(t);
|
|
98
|
-
const e = {
|
|
99
|
-
jaql: {
|
|
100
|
-
title: this.name,
|
|
101
|
-
dim: this.expression,
|
|
102
|
-
datatype: R(this.type)
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
return this._sort != f.None && (e.jaql.sort = this._sort == f.Ascending ? "asc" : "desc"), t === !0 ? e.jaql : e;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
const z = (i) => i && i.__serializable === "DimensionalDimension";
|
|
109
|
-
class p extends y {
|
|
110
|
-
constructor(t, e, r, o, d, m, l, c) {
|
|
111
|
-
super(t, e, [], [], h.DateDimension, r, o, d, m), this.__serializable = "DimensionalDateDimension";
|
|
112
|
-
const a = [r, o, d, void 0, void 0, l, c];
|
|
113
|
-
this.defaultLevel = n.Years, this.Years = new u(n.Years, e, n.Years, "yyyy", ...a), this.Quarters = new u(n.Quarters, e, n.Quarters, "Q yyyy", ...a), this.Months = new u(n.Months, e, n.Months, "yyyy-MM", ...a), this.Weeks = new u(n.Weeks, e, n.Weeks, "ww yyyy", ...a), this.Days = new u(n.Days, e, n.Days, "yyyy-MM-dd", ...a), this.Hours = new u(n.Hours, e, n.Hours, "yyyy-MM-dd HH:mm", ...a), this.MinutesRoundTo30 = new u(n.MinutesRoundTo30, e, n.MinutesRoundTo30, "yyyy-MM-dd HH:mm", r, o, d), this.MinutesRoundTo15 = new u(n.MinutesRoundTo15, e, n.MinutesRoundTo15, "yyyy-MM-dd HH:mm", ...a), this.Minutes = new u(n.Minutes, e, n.Minutes, "yyyy-MM-dd HH:mm", ...a), this.Seconds = new u(n.Seconds, e, n.Seconds, "yyyy-MM-dd HH:mm:ss", r, o, d), this.AggHours = new u(n.AggHours, e, n.AggHours, "HH:mm", ...a), this.AggMinutesRoundTo30 = new u(n.AggMinutesRoundTo30, e, n.AggMinutesRoundTo30, "HH:mm", r, o, d), this.AggMinutesRoundTo15 = new u(n.AggMinutesRoundTo15, e, n.AggMinutesRoundTo15, "HH:mm", ...a), this.AggMinutesRoundTo1 = new u(n.AggMinutesRoundTo1, e, n.AggMinutesRoundTo1, "HH:mm", ...a), this.setAttributes([
|
|
114
|
-
this.Years,
|
|
115
|
-
this.Quarters,
|
|
116
|
-
this.Months,
|
|
117
|
-
this.Weeks,
|
|
118
|
-
this.Days,
|
|
119
|
-
this.Hours,
|
|
120
|
-
this.MinutesRoundTo30,
|
|
121
|
-
this.MinutesRoundTo15,
|
|
122
|
-
this.Minutes,
|
|
123
|
-
this.Seconds,
|
|
124
|
-
this.AggHours,
|
|
125
|
-
this.AggMinutesRoundTo30,
|
|
126
|
-
this.AggMinutesRoundTo15,
|
|
127
|
-
this.AggMinutesRoundTo1
|
|
128
|
-
]);
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* gets the element's ID
|
|
132
|
-
*/
|
|
133
|
-
get id() {
|
|
134
|
-
return this.expression;
|
|
135
|
-
}
|
|
136
|
-
setDimensions() {
|
|
137
|
-
}
|
|
138
|
-
setAttributes(t) {
|
|
139
|
-
this._attributes = t;
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Gets the sort definition of this instance
|
|
143
|
-
*
|
|
144
|
-
* @returns The Sort definition of this instance
|
|
145
|
-
*/
|
|
146
|
-
getSort() {
|
|
147
|
-
return this._sort;
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Gets a sorted {@link Dimension} with the given definition
|
|
151
|
-
*
|
|
152
|
-
* @param sort - Sort definition
|
|
153
|
-
* @returns An instance representing the sorted {@link Dimension} of this instance
|
|
154
|
-
*/
|
|
155
|
-
sort(t) {
|
|
156
|
-
return new p(this.name, this.expression, this.description, t, this.dataSource, this.composeCode, this.indexed, this.merged);
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Gets a serializable representation of the element
|
|
160
|
-
*/
|
|
161
|
-
serialize() {
|
|
162
|
-
return super.serialize();
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Gets the JAQL representation of this instance
|
|
166
|
-
*
|
|
167
|
-
* @param nested - defines whether the JAQL is nested within parent JAQL statement or a root JAQL element
|
|
168
|
-
*/
|
|
169
|
-
jaql(t) {
|
|
170
|
-
const e = this[this.defaultLevel].jaql();
|
|
171
|
-
return e.jaql.title = this.name, t ? e.jaql : e;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
const S = (i) => i && i.__serializable === "DimensionalDateDimension";
|
|
175
|
-
function N(i) {
|
|
176
|
-
const t = i.name || i.title, e = i.desc || i.description, r = i.expression || i.dim, o = y.parseType(i.dimtype || i.type), d = i.sort, m = i.dataSource, l = i.indexed, c = i.merged;
|
|
177
|
-
if (o == h.DateDimension)
|
|
178
|
-
return new p(t, r, e, d, m, void 0, l, c);
|
|
179
|
-
const a = Object.getOwnPropertyNames(i).map((s) => i[s]).filter((s) => h.isAttribute(s == null ? void 0 : s.type));
|
|
180
|
-
if (a.length == 0)
|
|
181
|
-
if (i.attributes) {
|
|
182
|
-
let s;
|
|
183
|
-
for (let M = 0; M < i.attributes.length; M++)
|
|
184
|
-
s = i.attributes[M], a.push(new w(s.name, s.expression, s.type, s.description, s.sort, s.dataSource, void 0, void 0, s.indexed, s.merged));
|
|
185
|
-
} else r && a.push(new w(t, r, o, e, d, m, void 0, void 0, l, c));
|
|
186
|
-
const g = Object.getOwnPropertyNames(i).map((s) => i[s]).filter((s) => h.isDimension(s == null ? void 0 : s.type));
|
|
187
|
-
if (g.length == 0 && i.dimensions)
|
|
188
|
-
for (let s = 0; s < i.dimensions.length; s++)
|
|
189
|
-
g.push(N(i.dimensions[s]));
|
|
190
|
-
const D = new y(t, r, a, g, o, e, d, m);
|
|
191
|
-
return i.defaultAttribute && (D.defaultAttribute = a.find((s) => s.name === i.defaultAttribute)), D;
|
|
192
|
-
}
|
|
193
|
-
function q(i) {
|
|
194
|
-
const t = i.name || i.title, e = i.expression || i.dim, r = i.desc || i.description, o = i.sort, d = i.dataSource;
|
|
195
|
-
return new p(t, e, r, o, d, void 0, i.indexed, i.merged);
|
|
196
|
-
}
|
|
197
|
-
export {
|
|
198
|
-
y as D,
|
|
199
|
-
q as a,
|
|
200
|
-
S as b,
|
|
201
|
-
N as c,
|
|
202
|
-
p as d,
|
|
203
|
-
z as i
|
|
204
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("./apply-styled-options-to-query-23D9br-S.cjs");class D extends e.DimensionalElement{constructor(i,t,a,o,u,l,d,m,r,h){if(super(i,u||e.MetadataTypes.Dimension,l,m,r),this.__serializable="DimensionalDimension",this._dimensions=[],this._attributes=[],this._sort=e.Sort.None,!r&&t){const{table:y,column:n}=e.parseExpression(t);this.composeCode=`${e.DATA_MODEL_MODULE_NAME}.${e.wrapIfNeedsNormalization(y)}.${e.wrapIfNeedsNormalization(n)}`}this._sort=d||e.Sort.None,this._expression=t,this.setDimensions(o||[]),this.setAttributes(a),h&&(this.defaultAttribute=h)}static parseType(i){switch(i){case"datetime":case e.MetadataTypes.DateDimension:return e.MetadataTypes.DateDimension;case"text":case e.MetadataTypes.TextDimension:return e.MetadataTypes.TextDimension;case"numeric":case e.MetadataTypes.NumericDimension:return e.MetadataTypes.NumericDimension}return e.MetadataTypes.TextDimension}getAttachedName(i,t){let a=i;const o=e.normalizeName(i);return(o==="id"||o==="name"||Object.getOwnPropertyDescriptor(this,o)!==void 0||this[o]!==void 0)&&(a=t),a}setDimensions(i){this._dimensions=i;for(let t=0;t<i.length;t++){const a=this.getAttachedName(i[t].name,i[t].attributes[0].expression);this[e.normalizeName(a)]=i[t],a!=i[t].name&&(i[t].name=a)}}setAttributes(i){this._attributes=i||[];for(let t=0;t<i.length;t++){const a=this.getAttachedName(i[t].name,i[t].expression);this[e.normalizeName(a)]=i[t],i[t].name!=a&&(i[t].name=a)}}get id(){return this._expression}get attributes(){return this._attributes}get dimensions(){return this._dimensions}get expression(){return this._expression}getSort(){return this._sort}sort(i){return new D(this.name,this.expression,this.attributes,this.dimensions,this.type,this.description,i,this.dataSource,this.composeCode,this.defaultAttribute)}serialize(){const i=super.serialize();return i.expression=this.expression,this.getSort()!==void 0&&(i.sort=this.getSort()),i.attributes=this._attributes.map(t=>t.serialize()),i.dimensions=this._dimensions.map(t=>t.serialize()),this.defaultAttribute&&(i.defaultAttribute=this.defaultAttribute.serialize()),i}jaql(i){if(this.defaultAttribute)return this.defaultAttribute.jaql(i);if(this.dimensions.length>0)return this.dimensions[0].jaql(i);const t={jaql:{title:this.name,dim:this.expression,datatype:e.jaqlSimpleColumnType(this.type)}};return this._sort!=e.Sort.None&&(t.jaql.sort=this._sort==e.Sort.Ascending?"asc":"desc"),i===!0?t.jaql:t}}const M=s=>s&&s.__serializable==="DimensionalDimension";class c extends D{constructor(i,t,a,o,u,l,d,m){super(i,t,[],[],e.MetadataTypes.DateDimension,a,o,u,l),this.__serializable="DimensionalDateDimension";const r=[a,o,u,void 0,void 0,d,m];this.defaultLevel=e.DateLevels.Years,this.Years=new e.DimensionalLevelAttribute(e.DateLevels.Years,t,e.DateLevels.Years,"yyyy",...r),this.Quarters=new e.DimensionalLevelAttribute(e.DateLevels.Quarters,t,e.DateLevels.Quarters,"Q yyyy",...r),this.Months=new e.DimensionalLevelAttribute(e.DateLevels.Months,t,e.DateLevels.Months,"yyyy-MM",...r),this.Weeks=new e.DimensionalLevelAttribute(e.DateLevels.Weeks,t,e.DateLevels.Weeks,"ww yyyy",...r),this.Days=new e.DimensionalLevelAttribute(e.DateLevels.Days,t,e.DateLevels.Days,"yyyy-MM-dd",...r),this.Hours=new e.DimensionalLevelAttribute(e.DateLevels.Hours,t,e.DateLevels.Hours,"yyyy-MM-dd HH:mm",...r),this.MinutesRoundTo30=new e.DimensionalLevelAttribute(e.DateLevels.MinutesRoundTo30,t,e.DateLevels.MinutesRoundTo30,"yyyy-MM-dd HH:mm",a,o,u),this.MinutesRoundTo15=new e.DimensionalLevelAttribute(e.DateLevels.MinutesRoundTo15,t,e.DateLevels.MinutesRoundTo15,"yyyy-MM-dd HH:mm",...r),this.Minutes=new e.DimensionalLevelAttribute(e.DateLevels.Minutes,t,e.DateLevels.Minutes,"yyyy-MM-dd HH:mm",...r),this.Seconds=new e.DimensionalLevelAttribute(e.DateLevels.Seconds,t,e.DateLevels.Seconds,"yyyy-MM-dd HH:mm:ss",a,o,u),this.AggHours=new e.DimensionalLevelAttribute(e.DateLevels.AggHours,t,e.DateLevels.AggHours,"HH:mm",...r),this.AggMinutesRoundTo30=new e.DimensionalLevelAttribute(e.DateLevels.AggMinutesRoundTo30,t,e.DateLevels.AggMinutesRoundTo30,"HH:mm",a,o,u),this.AggMinutesRoundTo15=new e.DimensionalLevelAttribute(e.DateLevels.AggMinutesRoundTo15,t,e.DateLevels.AggMinutesRoundTo15,"HH:mm",...r),this.AggMinutesRoundTo1=new e.DimensionalLevelAttribute(e.DateLevels.AggMinutesRoundTo1,t,e.DateLevels.AggMinutesRoundTo1,"HH:mm",...r),this.setAttributes([this.Years,this.Quarters,this.Months,this.Weeks,this.Days,this.Hours,this.MinutesRoundTo30,this.MinutesRoundTo15,this.Minutes,this.Seconds,this.AggHours,this.AggMinutesRoundTo30,this.AggMinutesRoundTo15,this.AggMinutesRoundTo1])}get id(){return this.expression}setDimensions(){}setAttributes(i){this._attributes=i}getSort(){return this._sort}sort(i){return new c(this.name,this.expression,this.description,i,this.dataSource,this.composeCode,this.indexed,this.merged)}serialize(){return super.serialize()}jaql(i){const t=this[this.defaultLevel].jaql();return t.jaql.title=this.name,i?t.jaql:t}}const A=s=>s&&s.__serializable==="DimensionalDateDimension";function p(s){const i=s.name||s.title,t=s.desc||s.description,a=s.expression||s.dim,o=D.parseType(s.dimtype||s.type),u=s.sort,l=s.dataSource,d=s.indexed,m=s.merged;if(o==e.MetadataTypes.DateDimension)return new c(i,a,t,u,l,void 0,d,m);const r=Object.getOwnPropertyNames(s).map(n=>s[n]).filter(n=>e.MetadataTypes.isAttribute(n==null?void 0:n.type));if(r.length==0)if(s.attributes){let n;for(let g=0;g<s.attributes.length;g++)n=s.attributes[g],r.push(new e.DimensionalAttribute(n.name,n.expression,n.type,n.description,n.sort,n.dataSource,void 0,void 0,n.indexed,n.merged))}else a&&r.push(new e.DimensionalAttribute(i,a,o,t,u,l,void 0,void 0,d,m));const h=Object.getOwnPropertyNames(s).map(n=>s[n]).filter(n=>e.MetadataTypes.isDimension(n==null?void 0:n.type));if(h.length==0&&s.dimensions)for(let n=0;n<s.dimensions.length;n++)h.push(p(s.dimensions[n]));const y=new D(i,a,r,h,o,t,u,l);return s.defaultAttribute&&(y.defaultAttribute=r.find(n=>n.name===s.defaultAttribute)),y}function f(s){const i=s.name||s.title,t=s.expression||s.dim,a=s.desc||s.description,o=s.sort,u=s.dataSource;return new c(i,t,a,o,u,void 0,s.indexed,s.merged)}exports.DimensionalDateDimension=c;exports.DimensionalDimension=D;exports.createDateDimension=f;exports.createDimension=p;exports.isDimensionalDateDimension=A;exports.isDimensionalDimension=M;
|
package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/use-widget-scroll-persistence.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { WidgetsOptions } from '../../../domains/dashboarding/dashboard-model';
|
|
2
|
-
import type { DashboardPersistenceManager } from '../../../domains/dashboarding/persistence/types';
|
|
3
|
-
type ScrollerChangeHandler = (min: number, max: number) => void;
|
|
4
|
-
/**
|
|
5
|
-
* Returns a stable per-widget factory of debounced scroller-position savers.
|
|
6
|
-
* Each call with the same widgetOid reuses the same debounced function.
|
|
7
|
-
* All pending debouncers are cancelled on unmount.
|
|
8
|
-
*
|
|
9
|
-
* @param persistence - The dashboard persistence manager. When `undefined`, the returned factory is a no-op.
|
|
10
|
-
* @param widgetsOptions - Current widget DTO options map, used to include all existing options in the PATCH
|
|
11
|
-
* so the server does not discard other option fields when updating `previousScrollerLocation`.
|
|
12
|
-
* @returns Function that maps a widget OID to its debounced save handler.
|
|
13
|
-
* @internal
|
|
14
|
-
*/
|
|
15
|
-
export declare function useWidgetScrollPersistence(persistence: DashboardPersistenceManager | undefined, widgetsOptions?: WidgetsOptions): (widgetOid: string) => ScrollerChangeHandler;
|
|
16
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { WidgetProps } from '../widget/types';
|
|
2
|
-
/**
|
|
3
|
-
* Injects the navigator scroller-change callback into the widget's navigator style options.
|
|
4
|
-
* Only activates when the widget has a navigator configuration so the event handler is not
|
|
5
|
-
* registered on charts that never show the navigator.
|
|
6
|
-
*
|
|
7
|
-
* @param onScrollerChange - Invoked with navigator min/max when the scroller moves.
|
|
8
|
-
* @returns Widget props transformer for use in a `flow` pipeline.
|
|
9
|
-
*/
|
|
10
|
-
export declare function withNavigatorScrollSave(onScrollerChange: (min: number, max: number) => void): (widgetProps: WidgetProps) => WidgetProps;
|
package/dist/types-D3fPN43o.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { e as i, g as l, f as n, h as o, D as d, i as u, M as s } from "./apply-styled-options-to-query-BagjzMqm.js";
|
|
2
|
-
class m extends d {
|
|
3
|
-
constructor(e, t) {
|
|
4
|
-
var r;
|
|
5
|
-
super((r = e.jaql.title) !== null && r !== void 0 ? r : "", t), 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 = u(e.jaql.sort) : delete this.sortType, this.skipValidation = !0;
|
|
6
|
-
}
|
|
7
|
-
get id() {
|
|
8
|
-
return this.expression;
|
|
9
|
-
}
|
|
10
|
-
jaql(e) {
|
|
11
|
-
return e === !0 ? this.metadataItem.jaql : this.metadataItem;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Gets a serializable representation of the element
|
|
15
|
-
*/
|
|
16
|
-
serialize() {
|
|
17
|
-
const e = super.serialize();
|
|
18
|
-
return e.metadataItem = this.metadataItem, e.type = this.type, e;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
const c = {
|
|
22
|
-
text: s.TextAttribute,
|
|
23
|
-
numeric: s.NumericAttribute,
|
|
24
|
-
datetime: s.DateLevel
|
|
25
|
-
}, h = (a) => a && a.__serializable === "JaqlElement";
|
|
26
|
-
function p(a) {
|
|
27
|
-
var e;
|
|
28
|
-
return new m(a, (e = c[a.jaql.datatype]) !== null && e !== void 0 ? e : "numeric");
|
|
29
|
-
}
|
|
30
|
-
function y(a) {
|
|
31
|
-
const { jaql: e } = a;
|
|
32
|
-
if (e.formula)
|
|
33
|
-
return i(e);
|
|
34
|
-
const t = l(e);
|
|
35
|
-
return "agg" in e && e.dim && e.datatype ? n({
|
|
36
|
-
expression: e.dim,
|
|
37
|
-
dataType: e.datatype,
|
|
38
|
-
agg: e.agg || "",
|
|
39
|
-
granularity: t,
|
|
40
|
-
format: void 0,
|
|
41
|
-
sort: e.sort,
|
|
42
|
-
title: e.title,
|
|
43
|
-
dataSource: e.datasource
|
|
44
|
-
}) : e.dim && e.datatype ? o({
|
|
45
|
-
expression: e.dim,
|
|
46
|
-
dataType: e.datatype,
|
|
47
|
-
granularity: t,
|
|
48
|
-
sort: e.sort,
|
|
49
|
-
title: e.title,
|
|
50
|
-
panel: a.panel,
|
|
51
|
-
dataSource: e.datasource
|
|
52
|
-
}) : p(a);
|
|
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 = (a) => "widgetProps" in a, j = (a) => "dashboardOid" in a && "widgetOid" in a, b = (a) => "dashboardProps" in a, T = (a) => "dashboardOid" in a;
|
|
64
|
-
export {
|
|
65
|
-
f as E,
|
|
66
|
-
m as J,
|
|
67
|
-
T as a,
|
|
68
|
-
q as b,
|
|
69
|
-
y as c,
|
|
70
|
-
E as d,
|
|
71
|
-
b as e,
|
|
72
|
-
h as f,
|
|
73
|
-
j as i
|
|
74
|
-
};
|