@sisense/sdk-ui 2.5.0 → 2.7.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.
Files changed (60) hide show
  1. package/dist/ai.cjs +17 -17
  2. package/dist/ai.js +653 -650
  3. package/dist/analytics-composer.cjs +82 -82
  4. package/dist/analytics-composer.js +1911 -1911
  5. package/dist/derive-chart-family-BCY-GLVZ.cjs +672 -0
  6. package/dist/derive-chart-family-DvYmrG1k.js +93730 -0
  7. package/dist/dimensions-DAISVpEZ.cjs +1 -0
  8. package/dist/dimensions-WmjaZcrG.js +203 -0
  9. package/dist/index.cjs +14 -14
  10. package/dist/index.js +6403 -6271
  11. package/dist/index.umd.js +297 -297
  12. package/dist/packages/sdk-ui/src/ai/api/types.d.ts +1 -0
  13. package/dist/packages/sdk-ui/src/ai/chat-config.d.ts +7 -0
  14. package/dist/packages/sdk-ui/src/ai/use-get-query-recommendations.d.ts +7 -0
  15. package/dist/packages/sdk-ui/src/analytics-composer/query/fix-ranking-filter-jaql.d.ts +8 -0
  16. package/dist/packages/sdk-ui/src/app/client-application.d.ts +2 -2
  17. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/get-legacy-cartesian-chart-options.d.ts +3 -0
  18. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/legend.d.ts +2 -0
  19. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/tooltip.d.ts +4 -0
  20. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/bar-chart/{highcharts-options-builder.d.ts → highchart-options/highcharts-options-builder.d.ts} +1 -1
  21. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/bar-chart/highchart-options/legend.d.ts +3 -0
  22. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/highcharts-based-chart-renderer/highcharts-based-chart-renderer.d.ts +4 -0
  23. package/dist/packages/sdk-ui/src/chart-options-processor/{cartesian-chart-options.d.ts → cartesian/cartesian-chart-options.d.ts} +6 -6
  24. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis-configuration.d.ts +41 -0
  25. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/chart-configuration.d.ts +13 -0
  26. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/chart-spacing-calculator.d.ts +41 -0
  27. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/series-processor.d.ts +57 -0
  28. package/dist/packages/sdk-ui/src/chart-options-processor/tooltip.d.ts +3 -29
  29. package/dist/packages/sdk-ui/src/chart-options-processor/translations/scatter-plot-options.d.ts +2 -2
  30. package/dist/packages/sdk-ui/src/chart-options-processor/translations/scatter-tooltip.d.ts +2 -2
  31. package/dist/packages/sdk-ui/src/chart-options-processor/translations/tooltip-utils.d.ts +17 -2
  32. package/dist/packages/sdk-ui/src/chart-options-processor/translations/tooltip.d.ts +3 -3
  33. package/dist/packages/sdk-ui/src/chart-options-processor/translations/translations-to-highcharts.d.ts +7 -0
  34. package/dist/packages/sdk-ui/src/chart-options-processor/translations/treemap/treemap-tooltip.d.ts +3 -4
  35. package/dist/packages/sdk-ui/src/chart-options-processor/translations/value-label-section.d.ts +3 -3
  36. package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/utils.d.ts +7 -1
  37. package/dist/packages/sdk-ui/src/dashboard/components/jtd-dashboard.d.ts +2 -1
  38. package/dist/packages/sdk-ui/src/dashboard/hooks/jtd/jtd-filters.d.ts +38 -4
  39. package/dist/packages/sdk-ui/src/dashboard/types.d.ts +26 -19
  40. package/dist/packages/sdk-ui/src/decorators/component-decorators/with-tracking/index.d.ts +1 -1
  41. package/dist/packages/sdk-ui/src/decorators/component-decorators/with-tracking/use-track-component-init.d.ts +4 -1
  42. package/dist/packages/sdk-ui/src/decorators/component-decorators/with-tracking/with-tracking.d.ts +10 -2
  43. package/dist/packages/sdk-ui/src/dynamic-size-container/dynamic-size-container.d.ts +2 -1
  44. package/dist/packages/sdk-ui/src/index.d.ts +1 -0
  45. package/dist/packages/sdk-ui/src/models/dashboard/translate-dashboard-utils.d.ts +1 -0
  46. package/dist/packages/sdk-ui/src/props.d.ts +10 -0
  47. package/dist/packages/sdk-ui/src/sisense-chart/sisense-chart.d.ts +1 -1
  48. package/dist/packages/sdk-ui/src/sisense-chart/types.d.ts +4 -0
  49. package/dist/packages/sdk-ui/src/types.d.ts +27 -0
  50. package/dist/packages/sdk-ui/src/widget-by-id/utils.d.ts +27 -1
  51. package/dist/{use-common-filters-Bf8KKBN2.cjs → use-common-filters-CRrL9rOQ.cjs} +67 -67
  52. package/dist/{use-common-filters-BTk7vuUo.js → use-common-filters-CVgB69Xe.js} +1486 -1453
  53. package/dist/{widget-composer-BtqAxkpr.js → widget-composer-B4eAv2pf.js} +232 -193
  54. package/dist/{widget-composer-CJDaEkCY.cjs → widget-composer-D0FZj1tX.cjs} +8 -8
  55. package/package.json +20 -18
  56. package/dist/derive-chart-family-Cjjn5U5S.cjs +0 -669
  57. package/dist/derive-chart-family-ci86jmVk.js +0 -90516
  58. package/dist/dimensions-COtPNdpu.cjs +0 -1
  59. package/dist/dimensions-wzj4u0MX.js +0 -200
  60. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/get-legacy-cartesian-chart-options.d.ts +0 -3
@@ -0,0 +1 @@
1
+ "use strict";const e=require("./derive-chart-family-BCY-GLVZ.cjs");class m extends e.DimensionalElement{constructor(i,t,n,a,o,l,u,h,D,r){if(super(i,o||e.MetadataTypes.Dimension,l,h,D),this.__serializable="DimensionalDimension",this._dimensions=[],this._attributes=[],this._sort=e.Sort.None,!D&&t){const{table:d,column:g}=e.parseExpression(t);this.composeCode=e.normalizeAttributeName(d,g,"",e.DATA_MODEL_MODULE_NAME)}this._sort=u||e.Sort.None,this._expression=t,this.setDimensions(a||[]),this.setAttributes(n),r&&(this.defaultAttribute=r)}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 n=i;const a=e.normalizeName(i);return(a==="id"||a==="name"||Object.getOwnPropertyDescriptor(this,a)!==void 0||this[a]!==void 0)&&(n=t),n}setDimensions(i){this._dimensions=i;for(let t=0;t<i.length;t++){const n=this.getAttachedName(i[t].name,i[t].attributes[0].expression);this[e.normalizeName(n)]=i[t],n!=i[t].name&&(i[t].name=n)}}setAttributes(i){this._attributes=i||[];for(let t=0;t<i.length;t++){const n=this.getAttachedName(i[t].name,i[t].expression);this[e.normalizeName(n)]=i[t],i[t].name!=n&&(i[t].name=n)}}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 m(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 p=s=>s&&s.__serializable==="DimensionalDimension";class y extends m{constructor(i,t,n,a,o,l){super(i,t,[],[],e.MetadataTypes.DateDimension,n,a,o,l),this.__serializable="DimensionalDateDimension",this.defaultLevel=e.DateLevels.Years,this.Years=new e.DimensionalLevelAttribute(e.DateLevels.Years,t,e.DateLevels.Years,"yyyy",n,a,o),this.Quarters=new e.DimensionalLevelAttribute(e.DateLevels.Quarters,t,e.DateLevels.Quarters,"Q yyyy",n,a,o),this.Months=new e.DimensionalLevelAttribute(e.DateLevels.Months,t,e.DateLevels.Months,"yyyy-MM",n,a,o),this.Weeks=new e.DimensionalLevelAttribute(e.DateLevels.Weeks,t,e.DateLevels.Weeks,"ww yyyy",n,a,o),this.Days=new e.DimensionalLevelAttribute(e.DateLevels.Days,t,e.DateLevels.Days,"yyyy-MM-dd",n,a,o),this.Hours=new e.DimensionalLevelAttribute(e.DateLevels.Hours,t,e.DateLevels.Hours,"yyyy-MM-dd HH:mm",n,a,o),this.MinutesRoundTo30=new e.DimensionalLevelAttribute(e.DateLevels.MinutesRoundTo30,t,e.DateLevels.MinutesRoundTo30,"yyyy-MM-dd HH:mm",n,a,o),this.MinutesRoundTo15=new e.DimensionalLevelAttribute(e.DateLevels.MinutesRoundTo15,t,e.DateLevels.MinutesRoundTo15,"yyyy-MM-dd HH:mm",n,a,o),this.Minutes=new e.DimensionalLevelAttribute(e.DateLevels.Minutes,t,e.DateLevels.Minutes,"yyyy-MM-dd HH:mm",n,a,o),this.Seconds=new e.DimensionalLevelAttribute(e.DateLevels.Seconds,t,e.DateLevels.Seconds,"yyyy-MM-dd HH:mm:ss",n,a,o),this.AggHours=new e.DimensionalLevelAttribute(e.DateLevels.AggHours,t,e.DateLevels.AggHours,"HH:mm",n,a,o),this.AggMinutesRoundTo30=new e.DimensionalLevelAttribute(e.DateLevels.AggMinutesRoundTo30,t,e.DateLevels.AggMinutesRoundTo30,"HH:mm",n,a,o),this.AggMinutesRoundTo15=new e.DimensionalLevelAttribute(e.DateLevels.AggMinutesRoundTo15,t,e.DateLevels.AggMinutesRoundTo15,"HH:mm",n,a,o),this.AggMinutesRoundTo1=new e.DimensionalLevelAttribute(e.DateLevels.AggMinutesRoundTo1,t,e.DateLevels.AggMinutesRoundTo1,"HH:mm",n,a,o),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 y(this.name,this.expression,this.description,i,this.dataSource,this.composeCode)}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 M(s){const i=s.name||s.title,t=s.desc||s.description,n=s.expression||s.dim,a=m.parseType(s.dimtype||s.type),o=s.sort,l=s.dataSource;if(a==e.MetadataTypes.DateDimension)return new y(i,n,t,o,l);const u=Object.getOwnPropertyNames(s).map(r=>s[r]).filter(r=>e.MetadataTypes.isAttribute(r==null?void 0:r.type));if(u.length==0)if(s.attributes){let r;for(let d=0;d<s.attributes.length;d++)r=s.attributes[d],u.push(new e.DimensionalAttribute(r.name,r.expression,r.type,r.description,r.sort,r.dataSource))}else n&&u.push(new e.DimensionalAttribute(i,n,a,t,o,l));const h=Object.getOwnPropertyNames(s).map(r=>s[r]).filter(r=>e.MetadataTypes.isDimension(r==null?void 0:r.type));if(h.length==0&&s.dimensions)for(let r=0;r<s.dimensions.length;r++)h.push(M(s.dimensions[r]));const D=new m(i,n,u,h,a,t,o,l);return s.defaultAttribute&&(D.defaultAttribute=u.find(r=>r.name===s.defaultAttribute)),D}function c(s){const i=s.name||s.title,t=s.expression||s.dim,n=s.desc||s.description,a=s.sort,o=s.dataSource;return new y(i,t,n,a,o)}exports.DimensionalDateDimension=y;exports.DimensionalDimension=m;exports.createDateDimension=c;exports.createDimension=M;exports.isDimensionalDateDimension=A;exports.isDimensionalDimension=p;
@@ -0,0 +1,203 @@
1
+ import { e5 as b, m as h, aq as D, e6 as T, e7 as w, e8 as p, e9 as _, ea as H, av as n, au as o, dU as f } from "./derive-chart-family-DvYmrG1k.js";
2
+ class c extends b {
3
+ constructor(e, t, s, r, u, m, l, d, y, a) {
4
+ if (super(e, u || h.Dimension, m, d, y), this.__serializable = "DimensionalDimension", this._dimensions = [], this._attributes = [], this._sort = D.None, !y && t) {
5
+ const { table: g, column: A } = T(t);
6
+ this.composeCode = w(g, A, "", H);
7
+ }
8
+ this._sort = l || D.None, this._expression = t, this.setDimensions(r || []), this.setAttributes(s), a && (this.defaultAttribute = a);
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 s = e;
26
+ const r = p(e);
27
+ return (r === "id" || r === "name" || Object.getOwnPropertyDescriptor(this, r) !== void 0 || this[r] !== void 0) && (s = t), s;
28
+ }
29
+ setDimensions(e) {
30
+ this._dimensions = e;
31
+ for (let t = 0; t < e.length; t++) {
32
+ const s = this.getAttachedName(e[t].name, e[t].attributes[0].expression);
33
+ this[p(s)] = e[t], s != e[t].name && (e[t].name = s);
34
+ }
35
+ }
36
+ setAttributes(e) {
37
+ this._attributes = e || [];
38
+ for (let t = 0; t < e.length; t++) {
39
+ const s = this.getAttachedName(e[t].name, e[t].expression);
40
+ this[p(s)] = e[t], e[t].name != s && (e[t].name = s);
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.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: _(this.type)
103
+ }
104
+ };
105
+ return this._sort != D.None && (t.jaql.sort = this._sort == D.Ascending ? "asc" : "desc"), e === !0 ? t.jaql : t;
106
+ }
107
+ }
108
+ const N = (i) => i && i.__serializable === "DimensionalDimension";
109
+ class M extends c {
110
+ constructor(e, t, s, r, u, m) {
111
+ super(e, t, [], [], h.DateDimension, s, r, u, m), this.__serializable = "DimensionalDateDimension", this.defaultLevel = n.Years, this.Years = new o(n.Years, t, n.Years, "yyyy", s, r, u), this.Quarters = new o(n.Quarters, t, n.Quarters, "Q yyyy", s, r, u), this.Months = new o(n.Months, t, n.Months, "yyyy-MM", s, r, u), this.Weeks = new o(n.Weeks, t, n.Weeks, "ww yyyy", s, r, u), this.Days = new o(n.Days, t, n.Days, "yyyy-MM-dd", s, r, u), this.Hours = new o(n.Hours, t, n.Hours, "yyyy-MM-dd HH:mm", s, r, u), this.MinutesRoundTo30 = new o(n.MinutesRoundTo30, t, n.MinutesRoundTo30, "yyyy-MM-dd HH:mm", s, r, u), this.MinutesRoundTo15 = new o(n.MinutesRoundTo15, t, n.MinutesRoundTo15, "yyyy-MM-dd HH:mm", s, r, u), this.Minutes = new o(n.Minutes, t, n.Minutes, "yyyy-MM-dd HH:mm", s, r, u), this.Seconds = new o(n.Seconds, t, n.Seconds, "yyyy-MM-dd HH:mm:ss", s, r, u), this.AggHours = new o(n.AggHours, t, n.AggHours, "HH:mm", s, r, u), this.AggMinutesRoundTo30 = new o(n.AggMinutesRoundTo30, t, n.AggMinutesRoundTo30, "HH:mm", s, r, u), this.AggMinutesRoundTo15 = new o(n.AggMinutesRoundTo15, t, n.AggMinutesRoundTo15, "HH:mm", s, r, u), this.AggMinutesRoundTo1 = new o(n.AggMinutesRoundTo1, t, n.AggMinutesRoundTo1, "HH:mm", s, r, u), this.setAttributes([
112
+ this.Years,
113
+ this.Quarters,
114
+ this.Months,
115
+ this.Weeks,
116
+ this.Days,
117
+ this.Hours,
118
+ this.MinutesRoundTo30,
119
+ this.MinutesRoundTo15,
120
+ this.Minutes,
121
+ this.Seconds,
122
+ this.AggHours,
123
+ this.AggMinutesRoundTo30,
124
+ this.AggMinutesRoundTo15,
125
+ this.AggMinutesRoundTo1
126
+ ]);
127
+ }
128
+ /**
129
+ * gets the element's ID
130
+ */
131
+ get id() {
132
+ return this.expression;
133
+ }
134
+ setDimensions() {
135
+ }
136
+ setAttributes(e) {
137
+ this._attributes = e;
138
+ }
139
+ /**
140
+ * Gets the sort definition of this instance
141
+ *
142
+ * @returns The Sort definition of this instance
143
+ */
144
+ getSort() {
145
+ return this._sort;
146
+ }
147
+ /**
148
+ * Gets a sorted {@link Dimension} with the given definition
149
+ *
150
+ * @param sort - Sort definition
151
+ * @returns An instance representing the sorted {@link Dimension} of this instance
152
+ */
153
+ sort(e) {
154
+ return new M(this.name, this.expression, this.description, e, this.dataSource, this.composeCode);
155
+ }
156
+ /**
157
+ * Gets a serializable representation of the element
158
+ */
159
+ serialize() {
160
+ return super.serialize();
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
+ const q = (i) => i && i.__serializable === "DimensionalDateDimension";
173
+ function R(i) {
174
+ const e = i.name || i.title, t = i.desc || i.description, s = i.expression || i.dim, r = c.parseType(i.dimtype || i.type), u = i.sort, m = i.dataSource;
175
+ if (r == h.DateDimension)
176
+ return new M(e, s, t, u, m);
177
+ const l = Object.getOwnPropertyNames(i).map((a) => i[a]).filter((a) => h.isAttribute(a == null ? void 0 : a.type));
178
+ if (l.length == 0)
179
+ if (i.attributes) {
180
+ let a;
181
+ for (let g = 0; g < i.attributes.length; g++)
182
+ a = i.attributes[g], l.push(new f(a.name, a.expression, a.type, a.description, a.sort, a.dataSource));
183
+ } else
184
+ s && l.push(new f(e, s, r, t, u, m));
185
+ const d = Object.getOwnPropertyNames(i).map((a) => i[a]).filter((a) => h.isDimension(a == null ? void 0 : a.type));
186
+ if (d.length == 0 && i.dimensions)
187
+ for (let a = 0; a < i.dimensions.length; a++)
188
+ d.push(R(i.dimensions[a]));
189
+ const y = new c(e, s, l, d, r, t, u, m);
190
+ return i.defaultAttribute && (y.defaultAttribute = l.find((a) => a.name === i.defaultAttribute)), y;
191
+ }
192
+ function x(i) {
193
+ const e = i.name || i.title, t = i.expression || i.dim, s = i.desc || i.description, r = i.sort, u = i.dataSource;
194
+ return new M(e, t, s, r, u);
195
+ }
196
+ export {
197
+ c as D,
198
+ x as a,
199
+ q as b,
200
+ R as c,
201
+ M as d,
202
+ N as i
203
+ };