@bizdoc/core 1.13.0 → 1.13.5
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/esm2020/lib/core/layout/layout.component.mjs +2 -2
- package/esm2020/lib/core/models.mjs +2 -2
- package/esm2020/lib/cube/cube.service.mjs +9 -1
- package/esm2020/lib/cube/explore/explore-items.component.mjs +25 -14
- package/fesm2015/bizdoc-core.mjs +34 -15
- package/fesm2015/bizdoc-core.mjs.map +1 -1
- package/fesm2020/bizdoc-core.mjs +34 -15
- package/fesm2020/bizdoc-core.mjs.map +1 -1
- package/lib/core/models.d.ts +1 -1
- package/lib/cube/cube.service.d.ts +6 -0
- package/package.json +1 -2
package/fesm2015/bizdoc-core.mjs
CHANGED
@@ -1764,7 +1764,7 @@ var FieldType;
|
|
1764
1764
|
FieldType["Address"] = "Address";
|
1765
1765
|
FieldType["Object"] = "Object";
|
1766
1766
|
FieldType["Expression"] = "Expression";
|
1767
|
-
FieldType["
|
1767
|
+
FieldType["Duration"] = "Duration";
|
1768
1768
|
FieldType["Autocomplete"] = "Autocomplete";
|
1769
1769
|
FieldType["Percent"] = "Percent";
|
1770
1770
|
FieldType["DateRange"] = "DateRange";
|
@@ -4439,7 +4439,7 @@ class LayoutComponent {
|
|
4439
4439
|
case (FieldType.Expression):
|
4440
4440
|
comp = ExpressionField;
|
4441
4441
|
break;
|
4442
|
-
case (FieldType.
|
4442
|
+
case (FieldType.Duration):
|
4443
4443
|
comp = TimespanField;
|
4444
4444
|
break;
|
4445
4445
|
case (FieldType.Address):
|
@@ -5628,6 +5628,14 @@ class CubeService {
|
|
5628
5628
|
}
|
5629
5629
|
return this._http.get(`/api/cube/exploretype/${cube}`, { params });
|
5630
5630
|
}
|
5631
|
+
/**
|
5632
|
+
* information on expected explore type
|
5633
|
+
* @param cube name
|
5634
|
+
* @param index name
|
5635
|
+
*/
|
5636
|
+
resolveIndex(cube, index) {
|
5637
|
+
return this._http.get(`/api/cube/exploreindextype/${cube}/${index}`);
|
5638
|
+
}
|
5631
5639
|
/**
|
5632
5640
|
* explore items by axis
|
5633
5641
|
* @param cube name
|
@@ -12023,20 +12031,31 @@ class ExploreItemsComponent {
|
|
12023
12031
|
}
|
12024
12032
|
_index() {
|
12025
12033
|
this._loading$.next(true);
|
12026
|
-
this._service.
|
12027
|
-
const columns =
|
12028
|
-
|
12029
|
-
|
12030
|
-
|
12031
|
-
|
12034
|
+
this._service.resolveIndex(this.cube, this.index).subscribe(e => {
|
12035
|
+
const { columns, fields, template } = e;
|
12036
|
+
this._service.indices(this.cube, this.index, this.axes, { scope: this.scope }).subscribe(r => {
|
12037
|
+
if (!columns.length) {
|
12038
|
+
this.columns = this._cube.axes.
|
12039
|
+
filter(a => this.axes[a.name] === undefined && !a.hidden &&
|
12040
|
+
r.find(row => row[a.name] !== undefined)).
|
12041
|
+
map(a => ({ name: a.name, label: a.title }));
|
12042
|
+
const index = this._cube.indices.find(i => i.name === this.index);
|
12043
|
+
this.columns.push({ name: 'value', label: index.title, type: FieldType.Currency });
|
12044
|
+
this.displayedColumns = this.columns.map(c => c.name);
|
12045
|
+
this._template = null;
|
12046
|
+
this.selectable = false;
|
12047
|
+
}
|
12048
|
+
else {
|
12049
|
+
this.columns = columns;
|
12050
|
+
this.displayedColumns = columns.filter(c => !c.hidden && !c.key).map(c => c.name);
|
12051
|
+
this._template = template;
|
12052
|
+
this.selectable = template !== null || fields !== null;
|
12053
|
+
}
|
12054
|
+
this._datasource(r);
|
12055
|
+
}, () => {
|
12056
|
+
this._loading$.next(false);
|
12057
|
+
this._sb.error();
|
12032
12058
|
});
|
12033
|
-
const iindex = this._cube.indices.find(i => i.name === this.index);
|
12034
|
-
columns.push({ name: 'value', label: iindex.title, type: FieldType.Currency });
|
12035
|
-
this.columns = columns;
|
12036
|
-
this.displayedColumns = columns.map(c => c.name);
|
12037
|
-
this._template = null;
|
12038
|
-
this.selectable = false;
|
12039
|
-
this._datasource(r);
|
12040
12059
|
}, () => {
|
12041
12060
|
this._loading$.next(false);
|
12042
12061
|
this._sb.error();
|