@sisense/sdk-ui 2.4.1 → 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.
Files changed (54) hide show
  1. package/dist/ai.cjs +1 -1
  2. package/dist/ai.js +4 -4
  3. package/dist/analytics-composer.cjs +82 -82
  4. package/dist/analytics-composer.js +1911 -1911
  5. package/dist/{derive-chart-family-woVAnbRi.js → derive-chart-family-BPYK8evJ.js} +11015 -10951
  6. package/dist/{derive-chart-family-Cqw-HJq1.cjs → derive-chart-family-yUBZXP4x.cjs} +146 -146
  7. package/dist/dimensions-BgPl9ZS9.cjs +1 -0
  8. package/dist/dimensions-DuHaCozA.js +203 -0
  9. package/dist/index.cjs +17 -17
  10. package/dist/index.js +7207 -6831
  11. package/dist/index.umd.js +296 -296
  12. package/dist/packages/sdk-ui/src/analytics-composer/common/utils.d.ts +18 -0
  13. package/dist/packages/sdk-ui/src/api/types/dashboard-dto.d.ts +4 -0
  14. package/dist/packages/sdk-ui/src/app/client-application.d.ts +27 -8
  15. package/dist/packages/sdk-ui/src/chart/advanced-chart.d.ts +1 -1
  16. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/highcharts-based-chart-renderer/highcharts-based-chart-renderer.d.ts +4 -0
  17. package/dist/packages/sdk-ui/src/chart-data-options/types.d.ts +8 -0
  18. package/dist/packages/sdk-ui/src/chart-data-options/utils.d.ts +8 -1
  19. package/dist/packages/sdk-ui/src/common/components/modal/index.d.ts +1 -1
  20. package/dist/packages/sdk-ui/src/common/components/modal/modal-context.d.ts +0 -6
  21. package/dist/packages/sdk-ui/src/common/hooks/use-modal.d.ts +14 -0
  22. package/dist/packages/sdk-ui/src/common/icons/jtd-jumpable-icon.d.ts +1 -0
  23. package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/components/resizable-columns.d.ts +7 -3
  24. package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/const.d.ts +2 -2
  25. package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/helpers.d.ts +6 -0
  26. package/dist/packages/sdk-ui/src/dashboard/components/jtd-dashboard.d.ts +3 -2
  27. package/dist/packages/sdk-ui/src/dashboard/hooks/jtd/index.d.ts +5 -0
  28. package/dist/packages/sdk-ui/src/dashboard/hooks/jtd/jtd-filters.d.ts +129 -0
  29. package/dist/packages/sdk-ui/src/dashboard/hooks/jtd/jtd-handlers.d.ts +46 -0
  30. package/dist/packages/sdk-ui/src/dashboard/hooks/jtd/jtd-menu.d.ts +47 -0
  31. package/dist/packages/sdk-ui/src/dashboard/hooks/jtd/jtd-types.d.ts +93 -0
  32. package/dist/packages/sdk-ui/src/dashboard/hooks/jtd/jtd-widget-transforms.d.ts +48 -0
  33. package/dist/packages/sdk-ui/src/dashboard/hooks/use-jtd.d.ts +1 -92
  34. package/dist/packages/sdk-ui/src/dashboard/types.d.ts +26 -19
  35. package/dist/packages/sdk-ui/src/dynamic-size-container/dynamic-size-container.d.ts +2 -1
  36. package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/utils.d.ts +8 -0
  37. package/dist/packages/sdk-ui/src/models/dashboard/translate-dashboard-utils.d.ts +1 -0
  38. package/dist/packages/sdk-ui/src/models/dashboard/types.d.ts +18 -2
  39. package/dist/packages/sdk-ui/src/pivot-table/formatters/header-cell-formatters/header-cell-value-formatter.d.ts +2 -2
  40. package/dist/packages/sdk-ui/src/props.d.ts +10 -0
  41. package/dist/packages/sdk-ui/src/sisense-chart/sisense-chart.d.ts +1 -1
  42. package/dist/packages/sdk-ui/src/sisense-chart/types.d.ts +4 -0
  43. package/dist/packages/sdk-ui/src/translation/resources/en.d.ts +1 -0
  44. package/dist/packages/sdk-ui/src/translation/resources/index.d.ts +2 -0
  45. package/dist/packages/sdk-ui/src/utils/parseISOWithTimezoneCheck.d.ts +9 -0
  46. package/dist/packages/sdk-ui/src/widget-by-id/types.d.ts +9 -9
  47. package/dist/packages/sdk-ui/src/widget-by-id/utils.d.ts +26 -0
  48. package/dist/{use-common-filters-Br-CoziA.js → use-common-filters-B1RKY2KD.js} +4512 -4440
  49. package/dist/{use-common-filters-CCXbao1t.cjs → use-common-filters-CRgYdKcV.cjs} +78 -78
  50. package/dist/{widget-composer-DheWJukc.cjs → widget-composer-B2r2a9Oh.cjs} +7 -7
  51. package/dist/{widget-composer-BCNu5BzM.js → widget-composer-I9gUFBZt.js} +121 -102
  52. package/package.json +7 -7
  53. package/dist/dimensions-BHdLQaOB.js +0 -200
  54. package/dist/dimensions-oGJ_aWd5.cjs +0 -1
@@ -1,200 +0,0 @@
1
- import { dW as b, m as h, al as p, dX as T, dY as w, dZ as f, d_ as H, aq as n, ap as o, d$ as _, dJ as A } from "./derive-chart-family-woVAnbRi.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
- };
@@ -1 +0,0 @@
1
- "use strict";const e=require("./derive-chart-family-Cqw-HJq1.cjs");class m extends e.DimensionalElement{constructor(i,t,s,a,u,o,l,h,D,r){if(super(i,u||e.MetadataTypes.Dimension,o,h,D),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=l||e.Sort.None,this._expression=t,this.setDimensions(a||[]),this.setAttributes(s),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 s=i;const a=e.normalizeName(i);return(a==="id"||a==="name"||Object.getOwnPropertyDescriptor(this,a)!==void 0||this[a]!==void 0)&&(s=t),s}setDimensions(i){this._dimensions=i;for(let t=0;t<i.length;t++){const s=this.getAttachedName(i[t].name,i[t].attributes[0].expression);this[e.normalizeName(s)]=i[t],s!=i[t].name&&(i[t].name=s)}}setAttributes(i){this._attributes=i||[];for(let t=0;t<i.length;t++){const s=this.getAttachedName(i[t].name,i[t].expression);this[e.normalizeName(s)]=i[t],i[t].name!=s&&(i[t].name=s)}}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.__serializable="DimensionalDimension",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}}class y extends m{constructor(i,t,s,a,u,o){super(i,t,[],[],e.MetadataTypes.DateDimension,s,a,u,o),this.defaultLevel=e.DateLevels.Years,this.Years=new e.DimensionalLevelAttribute(e.DateLevels.Years,t,e.DateLevels.Years,"yyyy",s,a,u),this.Quarters=new e.DimensionalLevelAttribute(e.DateLevels.Quarters,t,e.DateLevels.Quarters,"Q yyyy",s,a,u),this.Months=new e.DimensionalLevelAttribute(e.DateLevels.Months,t,e.DateLevels.Months,"yyyy-MM",s,a,u),this.Weeks=new e.DimensionalLevelAttribute(e.DateLevels.Weeks,t,e.DateLevels.Weeks,"ww yyyy",s,a,u),this.Days=new e.DimensionalLevelAttribute(e.DateLevels.Days,t,e.DateLevels.Days,"yyyy-MM-dd",s,a,u),this.Hours=new e.DimensionalLevelAttribute(e.DateLevels.Hours,t,e.DateLevels.Hours,"yyyy-MM-dd HH:mm",s,a,u),this.MinutesRoundTo30=new e.DimensionalLevelAttribute(e.DateLevels.MinutesRoundTo30,t,e.DateLevels.MinutesRoundTo30,"yyyy-MM-dd HH:mm",s,a,u),this.MinutesRoundTo15=new e.DimensionalLevelAttribute(e.DateLevels.MinutesRoundTo15,t,e.DateLevels.MinutesRoundTo15,"yyyy-MM-dd HH:mm",s,a,u),this.Minutes=new e.DimensionalLevelAttribute(e.DateLevels.Minutes,t,e.DateLevels.Minutes,"yyyy-MM-dd HH:mm",s,a,u),this.Seconds=new e.DimensionalLevelAttribute(e.DateLevels.Seconds,t,e.DateLevels.Seconds,"yyyy-MM-dd HH:mm:ss",s,a,u),this.AggHours=new e.DimensionalLevelAttribute(e.DateLevels.AggHours,t,e.DateLevels.AggHours,"HH:mm",s,a,u),this.AggMinutesRoundTo30=new e.DimensionalLevelAttribute(e.DateLevels.AggMinutesRoundTo30,t,e.DateLevels.AggMinutesRoundTo30,"HH:mm",s,a,u),this.AggMinutesRoundTo15=new e.DimensionalLevelAttribute(e.DateLevels.AggMinutesRoundTo15,t,e.DateLevels.AggMinutesRoundTo15,"HH:mm",s,a,u),this.AggMinutesRoundTo1=new e.DimensionalLevelAttribute(e.DateLevels.AggMinutesRoundTo1,t,e.DateLevels.AggMinutesRoundTo1,"HH:mm",s,a,u),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(){const i=super.serialize();return i.__serializable="DimensionalDateDimension",i}jaql(i){const t=this[this.defaultLevel].jaql();return t.jaql.title=this.name,i?t.jaql:t}}function M(n){const i=n.name||n.title,t=n.desc||n.description,s=n.expression||n.dim,a=m.parseType(n.dimtype||n.type),u=n.sort,o=n.dataSource;if(a==e.MetadataTypes.DateDimension)return new y(i,s,t,u,o);const l=Object.getOwnPropertyNames(n).map(r=>n[r]).filter(r=>e.MetadataTypes.isAttribute(r==null?void 0:r.type));if(l.length==0)if(n.attributes){let r;for(let d=0;d<n.attributes.length;d++)r=n.attributes[d],l.push(new e.DimensionalAttribute(r.name,r.expression,r.type,r.description,r.sort,r.dataSource))}else s&&l.push(new e.DimensionalAttribute(i,s,a,t,u,o));const h=Object.getOwnPropertyNames(n).map(r=>n[r]).filter(r=>e.MetadataTypes.isDimension(r==null?void 0:r.type));if(h.length==0&&n.dimensions)for(let r=0;r<n.dimensions.length;r++)h.push(M(n.dimensions[r]));const D=new m(i,s,l,h,a,t,u,o);return n.defaultAttribute&&(D.defaultAttribute=l.find(r=>r.name===n.defaultAttribute)),D}function p(n){const i=n.name||n.title,t=n.expression||n.dim,s=n.desc||n.description,a=n.sort,u=n.dataSource;return new y(i,t,s,a,u)}exports.DimensionalDateDimension=y;exports.DimensionalDimension=m;exports.createDateDimension=p;exports.createDimension=M;