@infomaximum/widget-sdk 4.11.0 → 4.11.1
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/index.d.ts +4 -0
- package/dist/index.esm.js +13 -2
- package/dist/index.js +13 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -740,6 +740,7 @@ interface IParameterFromManualInput {
|
|
|
740
740
|
inputMethod: EWidgetActionInputMethod.MANUALLY;
|
|
741
741
|
description: string;
|
|
742
742
|
defaultValue?: string;
|
|
743
|
+
filterByRows?: boolean;
|
|
743
744
|
}
|
|
744
745
|
interface IParameterFromStaticList {
|
|
745
746
|
inputMethod: EWidgetActionInputMethod.STATIC_LIST;
|
|
@@ -752,6 +753,7 @@ interface IParameterFromDynamicList {
|
|
|
752
753
|
defaultValue: string;
|
|
753
754
|
displayOptions: string;
|
|
754
755
|
filters: TExtendedFormulaFilterValue[];
|
|
756
|
+
filterByRows?: boolean;
|
|
755
757
|
}
|
|
756
758
|
interface IWidgetActionParameterCommon {
|
|
757
759
|
name: string;
|
|
@@ -850,12 +852,14 @@ declare enum ESortDirection {
|
|
|
850
852
|
type TSortDirection = ESortDirection.ascend | ESortDirection.descend;
|
|
851
853
|
interface ISortOrder {
|
|
852
854
|
formula: string;
|
|
855
|
+
dataType?: ESimpleDataType;
|
|
853
856
|
direction: TSortDirection;
|
|
854
857
|
displayCondition?: TNullable<string>;
|
|
855
858
|
}
|
|
856
859
|
type TWidgetSortingValue = {
|
|
857
860
|
mode: ESortingValueModes.FORMULA;
|
|
858
861
|
formula: string;
|
|
862
|
+
dataType?: ESimpleDataType;
|
|
859
863
|
} | {
|
|
860
864
|
mode: ESortingValueModes.IN_WIDGET;
|
|
861
865
|
group: string;
|
package/dist/index.esm.js
CHANGED
|
@@ -1093,7 +1093,13 @@ var getDefaultSortOrders = function (_a) {
|
|
|
1093
1093
|
].includes(dimension.format);
|
|
1094
1094
|
});
|
|
1095
1095
|
if (timeDimension) {
|
|
1096
|
-
return [
|
|
1096
|
+
return [
|
|
1097
|
+
{
|
|
1098
|
+
formula: getDimensionFormula(timeDimension),
|
|
1099
|
+
dataType: timeDimension.dataType,
|
|
1100
|
+
direction: ESortDirection.ascend,
|
|
1101
|
+
},
|
|
1102
|
+
];
|
|
1097
1103
|
}
|
|
1098
1104
|
if (measures.length > 0) {
|
|
1099
1105
|
var firstMeasure = measures[0];
|
|
@@ -1102,6 +1108,7 @@ var getDefaultSortOrders = function (_a) {
|
|
|
1102
1108
|
{
|
|
1103
1109
|
direction: ESortDirection.descend,
|
|
1104
1110
|
formula: getMeasureFormula(firstMeasure),
|
|
1111
|
+
dataType: firstMeasure.dataType,
|
|
1105
1112
|
},
|
|
1106
1113
|
];
|
|
1107
1114
|
}
|
|
@@ -1115,7 +1122,9 @@ function mapSortingToInputs(_a) {
|
|
|
1115
1122
|
var _b;
|
|
1116
1123
|
var direction = _a.direction, value = _a.value;
|
|
1117
1124
|
if (value.mode === ESortingValueModes.FORMULA) {
|
|
1118
|
-
return value.formula
|
|
1125
|
+
return value.formula
|
|
1126
|
+
? { formula: value.formula, direction: direction, dataType: value.dataType }
|
|
1127
|
+
: undefined;
|
|
1119
1128
|
}
|
|
1120
1129
|
var indicatorsGroup = settings[value.group];
|
|
1121
1130
|
var indicator = indicatorsGroup === null || indicatorsGroup === void 0 ? void 0 : indicatorsGroup[value.index];
|
|
@@ -1133,6 +1142,7 @@ function mapSortingToInputs(_a) {
|
|
|
1133
1142
|
return {
|
|
1134
1143
|
formula: formula,
|
|
1135
1144
|
direction: direction,
|
|
1145
|
+
dataType: activeDimensions.dataType,
|
|
1136
1146
|
displayCondition: ((_b = indicator.displayCondition) === null || _b === void 0 ? void 0 : _b.mode) === EDisplayConditionMode.FORMULA
|
|
1137
1147
|
? indicator.displayCondition.formula
|
|
1138
1148
|
: undefined,
|
|
@@ -1141,6 +1151,7 @@ function mapSortingToInputs(_a) {
|
|
|
1141
1151
|
return {
|
|
1142
1152
|
formula: getMeasureFormula(indicator),
|
|
1143
1153
|
direction: direction,
|
|
1154
|
+
dataType: indicator.dataType,
|
|
1144
1155
|
};
|
|
1145
1156
|
});
|
|
1146
1157
|
return sortOrder;
|
package/dist/index.js
CHANGED
|
@@ -1094,7 +1094,13 @@ var getDefaultSortOrders = function (_a) {
|
|
|
1094
1094
|
].includes(dimension.format);
|
|
1095
1095
|
});
|
|
1096
1096
|
if (timeDimension) {
|
|
1097
|
-
return [
|
|
1097
|
+
return [
|
|
1098
|
+
{
|
|
1099
|
+
formula: getDimensionFormula(timeDimension),
|
|
1100
|
+
dataType: timeDimension.dataType,
|
|
1101
|
+
direction: exports.ESortDirection.ascend,
|
|
1102
|
+
},
|
|
1103
|
+
];
|
|
1098
1104
|
}
|
|
1099
1105
|
if (measures.length > 0) {
|
|
1100
1106
|
var firstMeasure = measures[0];
|
|
@@ -1103,6 +1109,7 @@ var getDefaultSortOrders = function (_a) {
|
|
|
1103
1109
|
{
|
|
1104
1110
|
direction: exports.ESortDirection.descend,
|
|
1105
1111
|
formula: getMeasureFormula(firstMeasure),
|
|
1112
|
+
dataType: firstMeasure.dataType,
|
|
1106
1113
|
},
|
|
1107
1114
|
];
|
|
1108
1115
|
}
|
|
@@ -1116,7 +1123,9 @@ function mapSortingToInputs(_a) {
|
|
|
1116
1123
|
var _b;
|
|
1117
1124
|
var direction = _a.direction, value = _a.value;
|
|
1118
1125
|
if (value.mode === exports.ESortingValueModes.FORMULA) {
|
|
1119
|
-
return value.formula
|
|
1126
|
+
return value.formula
|
|
1127
|
+
? { formula: value.formula, direction: direction, dataType: value.dataType }
|
|
1128
|
+
: undefined;
|
|
1120
1129
|
}
|
|
1121
1130
|
var indicatorsGroup = settings[value.group];
|
|
1122
1131
|
var indicator = indicatorsGroup === null || indicatorsGroup === void 0 ? void 0 : indicatorsGroup[value.index];
|
|
@@ -1134,6 +1143,7 @@ function mapSortingToInputs(_a) {
|
|
|
1134
1143
|
return {
|
|
1135
1144
|
formula: formula,
|
|
1136
1145
|
direction: direction,
|
|
1146
|
+
dataType: activeDimensions.dataType,
|
|
1137
1147
|
displayCondition: ((_b = indicator.displayCondition) === null || _b === void 0 ? void 0 : _b.mode) === exports.EDisplayConditionMode.FORMULA
|
|
1138
1148
|
? indicator.displayCondition.formula
|
|
1139
1149
|
: undefined,
|
|
@@ -1142,6 +1152,7 @@ function mapSortingToInputs(_a) {
|
|
|
1142
1152
|
return {
|
|
1143
1153
|
formula: getMeasureFormula(indicator),
|
|
1144
1154
|
direction: direction,
|
|
1155
|
+
dataType: indicator.dataType,
|
|
1145
1156
|
};
|
|
1146
1157
|
});
|
|
1147
1158
|
return sortOrder;
|