@sisense/sdk-ui 2.5.0 → 2.6.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 +4 -4
- package/dist/analytics-composer.cjs +82 -82
- package/dist/analytics-composer.js +1911 -1911
- package/dist/{derive-chart-family-ci86jmVk.js → derive-chart-family-BPYK8evJ.js} +11063 -11000
- package/dist/{derive-chart-family-Cjjn5U5S.cjs → derive-chart-family-yUBZXP4x.cjs} +146 -146
- package/dist/dimensions-BgPl9ZS9.cjs +1 -0
- package/dist/dimensions-DuHaCozA.js +203 -0
- package/dist/index.cjs +14 -14
- package/dist/index.js +5390 -5298
- package/dist/index.umd.js +248 -248
- package/dist/packages/sdk-ui/src/app/client-application.d.ts +2 -2
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/highcharts-based-chart-renderer/highcharts-based-chart-renderer.d.ts +4 -0
- package/dist/packages/sdk-ui/src/dashboard/components/jtd-dashboard.d.ts +2 -1
- package/dist/packages/sdk-ui/src/dashboard/hooks/jtd/jtd-filters.d.ts +38 -4
- package/dist/packages/sdk-ui/src/dashboard/types.d.ts +26 -19
- package/dist/packages/sdk-ui/src/dynamic-size-container/dynamic-size-container.d.ts +2 -1
- package/dist/packages/sdk-ui/src/models/dashboard/translate-dashboard-utils.d.ts +1 -0
- package/dist/packages/sdk-ui/src/props.d.ts +10 -0
- package/dist/packages/sdk-ui/src/sisense-chart/sisense-chart.d.ts +1 -1
- package/dist/packages/sdk-ui/src/sisense-chart/types.d.ts +4 -0
- package/dist/packages/sdk-ui/src/widget-by-id/utils.d.ts +26 -0
- package/dist/{use-common-filters-BTk7vuUo.js → use-common-filters-B1RKY2KD.js} +745 -717
- package/dist/{use-common-filters-Bf8KKBN2.cjs → use-common-filters-CRgYdKcV.cjs} +33 -33
- package/dist/{widget-composer-CJDaEkCY.cjs → widget-composer-B2r2a9Oh.cjs} +7 -7
- package/dist/{widget-composer-BtqAxkpr.js → widget-composer-I9gUFBZt.js} +67 -66
- package/package.json +7 -7
- package/dist/dimensions-COtPNdpu.cjs +0 -1
- package/dist/dimensions-wzj4u0MX.js +0 -200
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { dV as b, m as h, al as p, dW as T, dX as w, dY as f, dZ as H, aq as n, ap as o, d_ as _, dI as A } from "./derive-chart-family-ci86jmVk.js";
|
|
2
|
-
class c extends b {
|
|
3
|
-
constructor(e, t, i, r, a, m, l, d, y, u) {
|
|
4
|
-
if (super(e, a || h.Dimension, m, d, y), this._dimensions = [], this._attributes = [], this._sort = p.None, !y && t) {
|
|
5
|
-
const { table: g, column: D } = T(t);
|
|
6
|
-
this.composeCode = w(g, D, "", _);
|
|
7
|
-
}
|
|
8
|
-
this._sort = l || p.None, this._expression = t, this.setDimensions(r || []), this.setAttributes(i), u && (this.defaultAttribute = u);
|
|
9
|
-
}
|
|
10
|
-
static parseType(e) {
|
|
11
|
-
switch (e) {
|
|
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(e, t) {
|
|
25
|
-
let i = e;
|
|
26
|
-
const r = f(e);
|
|
27
|
-
return (r === "id" || r === "name" || Object.getOwnPropertyDescriptor(this, r) !== void 0 || this[r] !== void 0) && (i = t), i;
|
|
28
|
-
}
|
|
29
|
-
setDimensions(e) {
|
|
30
|
-
this._dimensions = e;
|
|
31
|
-
for (let t = 0; t < e.length; t++) {
|
|
32
|
-
const i = this.getAttachedName(e[t].name, e[t].attributes[0].expression);
|
|
33
|
-
this[f(i)] = e[t], i != e[t].name && (e[t].name = i);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
setAttributes(e) {
|
|
37
|
-
this._attributes = e || [];
|
|
38
|
-
for (let t = 0; t < e.length; t++) {
|
|
39
|
-
const i = this.getAttachedName(e[t].name, e[t].expression);
|
|
40
|
-
this[f(i)] = e[t], e[t].name != i && (e[t].name = i);
|
|
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(e) {
|
|
79
|
-
return new c(this.name, this.expression, this.attributes, this.dimensions, this.type, this.description, e, this.dataSource, this.composeCode, this.defaultAttribute);
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Gets a serializable representation of the element
|
|
83
|
-
*/
|
|
84
|
-
serialize() {
|
|
85
|
-
const e = super.serialize();
|
|
86
|
-
return e.__serializable = "DimensionalDimension", e.expression = this.expression, this.getSort() !== void 0 && (e.sort = this.getSort()), e.attributes = this._attributes.map((t) => t.serialize()), e.dimensions = this._dimensions.map((t) => t.serialize()), this.defaultAttribute && (e.defaultAttribute = this.defaultAttribute.serialize()), e;
|
|
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(e) {
|
|
94
|
-
if (this.defaultAttribute)
|
|
95
|
-
return this.defaultAttribute.jaql(e);
|
|
96
|
-
if (this.dimensions.length > 0)
|
|
97
|
-
return this.dimensions[0].jaql(e);
|
|
98
|
-
const t = {
|
|
99
|
-
jaql: {
|
|
100
|
-
title: this.name,
|
|
101
|
-
dim: this.expression,
|
|
102
|
-
datatype: H(this.type)
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
return this._sort != p.None && (t.jaql.sort = this._sort == p.Ascending ? "asc" : "desc"), e === !0 ? t.jaql : t;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
class M extends c {
|
|
109
|
-
constructor(e, t, i, r, a, m) {
|
|
110
|
-
super(e, t, [], [], h.DateDimension, i, r, a, m), this.defaultLevel = n.Years, this.Years = new o(n.Years, t, n.Years, "yyyy", i, r, a), this.Quarters = new o(n.Quarters, t, n.Quarters, "Q yyyy", i, r, a), this.Months = new o(n.Months, t, n.Months, "yyyy-MM", i, r, a), this.Weeks = new o(n.Weeks, t, n.Weeks, "ww yyyy", i, r, a), this.Days = new o(n.Days, t, n.Days, "yyyy-MM-dd", i, r, a), this.Hours = new o(n.Hours, t, n.Hours, "yyyy-MM-dd HH:mm", i, r, a), this.MinutesRoundTo30 = new o(n.MinutesRoundTo30, t, n.MinutesRoundTo30, "yyyy-MM-dd HH:mm", i, r, a), this.MinutesRoundTo15 = new o(n.MinutesRoundTo15, t, n.MinutesRoundTo15, "yyyy-MM-dd HH:mm", i, r, a), this.Minutes = new o(n.Minutes, t, n.Minutes, "yyyy-MM-dd HH:mm", i, r, a), this.Seconds = new o(n.Seconds, t, n.Seconds, "yyyy-MM-dd HH:mm:ss", i, r, a), this.AggHours = new o(n.AggHours, t, n.AggHours, "HH:mm", i, r, a), this.AggMinutesRoundTo30 = new o(n.AggMinutesRoundTo30, t, n.AggMinutesRoundTo30, "HH:mm", i, r, a), this.AggMinutesRoundTo15 = new o(n.AggMinutesRoundTo15, t, n.AggMinutesRoundTo15, "HH:mm", i, r, a), this.AggMinutesRoundTo1 = new o(n.AggMinutesRoundTo1, t, n.AggMinutesRoundTo1, "HH:mm", i, r, a), this.setAttributes([
|
|
111
|
-
this.Years,
|
|
112
|
-
this.Quarters,
|
|
113
|
-
this.Months,
|
|
114
|
-
this.Weeks,
|
|
115
|
-
this.Days,
|
|
116
|
-
this.Hours,
|
|
117
|
-
this.MinutesRoundTo30,
|
|
118
|
-
this.MinutesRoundTo15,
|
|
119
|
-
this.Minutes,
|
|
120
|
-
this.Seconds,
|
|
121
|
-
this.AggHours,
|
|
122
|
-
this.AggMinutesRoundTo30,
|
|
123
|
-
this.AggMinutesRoundTo15,
|
|
124
|
-
this.AggMinutesRoundTo1
|
|
125
|
-
]);
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* gets the element's ID
|
|
129
|
-
*/
|
|
130
|
-
get id() {
|
|
131
|
-
return this.expression;
|
|
132
|
-
}
|
|
133
|
-
setDimensions() {
|
|
134
|
-
}
|
|
135
|
-
setAttributes(e) {
|
|
136
|
-
this._attributes = e;
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Gets the sort definition of this instance
|
|
140
|
-
*
|
|
141
|
-
* @returns The Sort definition of this instance
|
|
142
|
-
*/
|
|
143
|
-
getSort() {
|
|
144
|
-
return this._sort;
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* Gets a sorted {@link Dimension} with the given definition
|
|
148
|
-
*
|
|
149
|
-
* @param sort - Sort definition
|
|
150
|
-
* @returns An instance representing the sorted {@link Dimension} of this instance
|
|
151
|
-
*/
|
|
152
|
-
sort(e) {
|
|
153
|
-
return new M(this.name, this.expression, this.description, e, this.dataSource, this.composeCode);
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Gets a serializable representation of the element
|
|
157
|
-
*/
|
|
158
|
-
serialize() {
|
|
159
|
-
const e = super.serialize();
|
|
160
|
-
return e.__serializable = "DimensionalDateDimension", e;
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* Gets the JAQL representation of this instance
|
|
164
|
-
*
|
|
165
|
-
* @param nested - defines whether the JAQL is nested within parent JAQL statement or a root JAQL element
|
|
166
|
-
*/
|
|
167
|
-
jaql(e) {
|
|
168
|
-
const t = this[this.defaultLevel].jaql();
|
|
169
|
-
return t.jaql.title = this.name, e ? t.jaql : t;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
function R(s) {
|
|
173
|
-
const e = s.name || s.title, t = s.desc || s.description, i = s.expression || s.dim, r = c.parseType(s.dimtype || s.type), a = s.sort, m = s.dataSource;
|
|
174
|
-
if (r == h.DateDimension)
|
|
175
|
-
return new M(e, i, t, a, m);
|
|
176
|
-
const l = Object.getOwnPropertyNames(s).map((u) => s[u]).filter((u) => h.isAttribute(u == null ? void 0 : u.type));
|
|
177
|
-
if (l.length == 0)
|
|
178
|
-
if (s.attributes) {
|
|
179
|
-
let u;
|
|
180
|
-
for (let g = 0; g < s.attributes.length; g++)
|
|
181
|
-
u = s.attributes[g], l.push(new A(u.name, u.expression, u.type, u.description, u.sort, u.dataSource));
|
|
182
|
-
} else
|
|
183
|
-
i && l.push(new A(e, i, r, t, a, m));
|
|
184
|
-
const d = Object.getOwnPropertyNames(s).map((u) => s[u]).filter((u) => h.isDimension(u == null ? void 0 : u.type));
|
|
185
|
-
if (d.length == 0 && s.dimensions)
|
|
186
|
-
for (let u = 0; u < s.dimensions.length; u++)
|
|
187
|
-
d.push(R(s.dimensions[u]));
|
|
188
|
-
const y = new c(e, i, l, d, r, t, a, m);
|
|
189
|
-
return s.defaultAttribute && (y.defaultAttribute = l.find((u) => u.name === s.defaultAttribute)), y;
|
|
190
|
-
}
|
|
191
|
-
function q(s) {
|
|
192
|
-
const e = s.name || s.title, t = s.expression || s.dim, i = s.desc || s.description, r = s.sort, a = s.dataSource;
|
|
193
|
-
return new M(e, t, i, r, a);
|
|
194
|
-
}
|
|
195
|
-
export {
|
|
196
|
-
c as D,
|
|
197
|
-
q as a,
|
|
198
|
-
M as b,
|
|
199
|
-
R as c
|
|
200
|
-
};
|