@infomaximum/widget-sdk 4.0.0-beta22 → 4.0.0-beta23
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 +13 -21
- package/dist/index.esm.js +14 -16
- package/dist/index.js +14 -16
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1028,23 +1028,12 @@ interface IWidgetPlaceholderController {
|
|
|
1028
1028
|
setEmpty(value: boolean): void;
|
|
1029
1029
|
}
|
|
1030
1030
|
|
|
1031
|
-
/** Вид переменной для калькулятора */
|
|
1032
|
-
interface ICalculatorVariable {
|
|
1033
|
-
dataType: ESimpleDataType;
|
|
1034
|
-
value: string | string[];
|
|
1035
|
-
}
|
|
1036
|
-
/** Коллекция значений переменных по их имени */
|
|
1037
|
-
interface ICalculatorVariablesValues extends Map<string, ICalculatorVariable> {
|
|
1038
|
-
}
|
|
1039
|
-
|
|
1040
1031
|
/** Формат входного параметра GeneralCalculator */
|
|
1041
1032
|
interface IBaseDimensionsAndMeasuresCalculatorInput {
|
|
1042
1033
|
/** Разрезы */
|
|
1043
1034
|
dimensions: ICalculatorDimensionInput[];
|
|
1044
1035
|
/** Меры */
|
|
1045
1036
|
measures: ICalculatorMeasureInput[];
|
|
1046
|
-
/** Значения переменных */
|
|
1047
|
-
variablesValues?: ICalculatorVariablesValues;
|
|
1048
1037
|
/** Фильтры, использующие WHERE */
|
|
1049
1038
|
filters: ICalculatorFilter[];
|
|
1050
1039
|
/** Фильтры, использующие HAVING */
|
|
@@ -1098,8 +1087,6 @@ interface IHistogramCalculatorInput {
|
|
|
1098
1087
|
dimensions: ICalculatorDimensionInput[];
|
|
1099
1088
|
/** Лимит корзин */
|
|
1100
1089
|
binsLimit: number;
|
|
1101
|
-
/** Значения переменных */
|
|
1102
|
-
variablesValues?: ICalculatorVariablesValues;
|
|
1103
1090
|
/** Формула условия отображения */
|
|
1104
1091
|
displayConditionFormula?: TNullable<string>;
|
|
1105
1092
|
/** Фильтры, использующие WHERE */
|
|
@@ -1152,8 +1139,6 @@ interface IProcessGraphCalculatorInput {
|
|
|
1152
1139
|
filters: ICalculatorFilter[];
|
|
1153
1140
|
eventFilters?: ICalculatorFilter[];
|
|
1154
1141
|
displayConditionFormula?: TNullable<string>;
|
|
1155
|
-
/** Значения переменных */
|
|
1156
|
-
variablesValues?: ICalculatorVariablesValues;
|
|
1157
1142
|
}
|
|
1158
1143
|
interface IProcessGraphCalculatorOutput {
|
|
1159
1144
|
vertexMaxLimit: number;
|
|
@@ -1178,8 +1163,6 @@ interface ITwoLimitsCalculatorInput {
|
|
|
1178
1163
|
dimensionsSecondGroup: ICalculatorDimensionInput[];
|
|
1179
1164
|
/** Меры */
|
|
1180
1165
|
measures: ICalculatorMeasureInput[];
|
|
1181
|
-
/** Значения переменных */
|
|
1182
|
-
variablesValues?: ICalculatorVariablesValues;
|
|
1183
1166
|
/** Фильтры, использующие WHERE */
|
|
1184
1167
|
filters: ICalculatorFilter[];
|
|
1185
1168
|
/** Фильтры, использующие HAVING */
|
|
@@ -1224,7 +1207,6 @@ interface ITypeCalculatorInput {
|
|
|
1224
1207
|
alias: string;
|
|
1225
1208
|
formula: string;
|
|
1226
1209
|
}[];
|
|
1227
|
-
variablesValues: ICalculatorVariablesValues;
|
|
1228
1210
|
}
|
|
1229
1211
|
interface ITypeCalculatorOutput {
|
|
1230
1212
|
types: Map<string, ESimpleDataType>;
|
|
@@ -1234,8 +1216,6 @@ interface ITypeCalculator extends ICalculator<ITypeCalculatorInput, ITypeCalcula
|
|
|
1234
1216
|
|
|
1235
1217
|
declare const prepareValuesForSql: (dataType: ESimpleDataType, values: (string | null)[]) => (string | null)[];
|
|
1236
1218
|
|
|
1237
|
-
declare function mapVariablesToInputs(variables: Map<string, TWidgetVariable>): ICalculatorVariablesValues;
|
|
1238
|
-
|
|
1239
1219
|
declare function checkDisplayCondition(displayCondition: TNullable<TDisplayCondition>, variables: Map<string, TWidgetVariable>): boolean;
|
|
1240
1220
|
declare function getDisplayConditionFormula(displayCondition: TNullable<TDisplayCondition>): TNullable<string>;
|
|
1241
1221
|
declare const replaceDisplayCondition: <I extends IWidgetColumnIndicator>(dimension: I, displayCondition: TNullable<TDisplayCondition>) => TNullable<I>;
|
|
@@ -1285,6 +1265,18 @@ declare function bindContentsWithIndicators<Output extends ICalculatorIndicatorO
|
|
|
1285
1265
|
|
|
1286
1266
|
declare const escapeSpecialCharacters: (formula: string) => string;
|
|
1287
1267
|
|
|
1268
|
+
/** Удалить из строки символы экранирования */
|
|
1269
|
+
declare function unescapeSpecialCharacters(str: string): string;
|
|
1270
|
+
|
|
1271
|
+
/** Вид переменной для калькулятора */
|
|
1272
|
+
interface ICalculatorVariable {
|
|
1273
|
+
dataType: ESimpleDataType;
|
|
1274
|
+
value: string | string[];
|
|
1275
|
+
}
|
|
1276
|
+
/** Коллекция значений переменных по их имени */
|
|
1277
|
+
interface ICalculatorVariablesValues extends Map<string, ICalculatorVariable> {
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1288
1280
|
interface ICalculatorFactory {
|
|
1289
1281
|
general: () => IGeneralCalculator;
|
|
1290
1282
|
pie: () => IPieCalculator;
|
|
@@ -1514,4 +1506,4 @@ declare global {
|
|
|
1514
1506
|
}
|
|
1515
1507
|
}
|
|
1516
1508
|
|
|
1517
|
-
export { EActionTypes, ECalculatorFilterMethods, EColorMode, EColorScope, EControlType, EDbType, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationUnit, EEventMeasureTemplateNames, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureTemplateNames, EOpenViewMode, EProcessFilterNames, ESimpleDataType, ESortDirection, ESortingValueModes, ETransitionMeasureTemplateNames, EViewType, EWidgetActionInputMode, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, type IActionCommon, type IActionGoToUrl, type IActionOpenView, type IActionRunScript, type IActionScript, type IActionScriptField, type IActionUpdateVariable, type IAddDurationOfTransitionFilter, type IAddPresenceOfEventFilter, type IAddPresenceOfTransitionFilter, type IAddRepetitionOfEventFilter, type IBaseDimensionsAndMeasuresCalculator, type IBaseDimensionsAndMeasuresCalculatorInput, type IBaseDimensionsAndMeasuresCalculatorOutput, type IBaseWidgetSettings, type ICalculator, type ICalculatorDimensionInput, type ICalculatorDimensionOutput, type ICalculatorFactory, type ICalculatorFilter, type ICalculatorIndicatorInput, type ICalculatorIndicatorOutput, type ICalculatorMeasureInput, type ICalculatorMeasureOutput, type ICalculatorVariable, type ICalculatorVariablesValues, type IColoredValue, type ICommonColumnIndicator, type IControlRecord, type ICustomAddButtonProps, type ICustomWidgetProps, type IDefinition, type IDimensionSelection, type IDimensionSelectionByFormula, type IDisplayPredicate, type IDisplayRule, type IDivePanelDescription, type IDividerRecord, type IEdge, type IExportColumnOrder, type IFillSettings, type IFormulaFilterValue, type IGeneralCalculator, type IGeneralCalculatorExportInput, type IGeneralCalculatorInput, type IGeneralCalculatorOutput, type IGraphElement, type IGroupSetDescription, type IGroupSetRecord, type IGroupSettings, type IHistogramBin, type IHistogramCalculator, type IHistogramCalculatorInput, type IHistogramCalculatorOutput, type ILens, type IMarkdownMeasure, type IMeasureMenuConfig, type IPanelDescription, type IPanelDescriptionCreator, type IPieCalculator, type IPieCalculatorInput, type IPieCalculatorOutput, type IProcessEventFilterValue, type IProcessEventIndicator, type IProcessGraphCalculator, type IProcessGraphCalculatorInput, type IProcessGraphCalculatorOutput, type IProcessIndicator, type IProcessTransitionFilterValue, type IProcessTransitionIndicator, type IRange, type ISelectOption, type ISortOrder, type ISortingMenuConfig, type IStagesFilterValue, type ITwoLimitsCalculator, type ITwoLimitsCalculatorExportInput, type ITwoLimitsCalculatorInput, type ITwoLimitsCalculatorOutput, type ITypeCalculator, type ITypeCalculatorInput, type ITypeCalculatorOutput, type IVertex, type IWidget, type IWidgetActionInput, type IWidgetColumnIndicator, type IWidgetDimension, type IWidgetDimensionHierarchy, type IWidgetEntity, type IWidgetFilter, type IWidgetFiltration, type IWidgetFormatting, type IWidgetFormulaFilterValue, type IWidgetIndicator, type IWidgetIndicatorMenuConfig, type IWidgetMeasure, type IWidgetPlaceholderController, type IWidgetProcess, type IWidgetProps, type IWidgetSortingIndicator, type IWidgetTable, type IWidgetTableColumn, type IWidgetsContext, type TActionsOnClick, type TBoundedContentWithIndicator, type TColor, type TColorRule, type TColumnIndicatorValue, type TDefineWidgetOptions, type TDisplayCondition, type TDisplayMode, type TEmptyRecord, type TFiltrationMode, type TGroupLevelRecord, type TLaunchActionParams, type TProcessIndicatorValue, type TRecordAccessor, type TSelectivePartial, type TSortDirection, type TUpdateSelection, type TValuePath, type TWidgetActionInputValue, type TWidgetContainer, type TWidgetFilterValue, type TWidgetFiltering, type TWidgetLevelRecord, type TWidgetSortingValue, type TWidgetSortingValueRelatedWidgetDimension, type TWidgetSortingValueRelatedWidgetIndicator, type TWidgetSortingValueRelatedWidgetMeasure, type TWidgetVariable, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, dimensionTemplateFormulas, escapeSpecialCharacters, eventMeasureTemplateFormulas, fillTemplateString, formulaFilterMethods, generateColumnFormula, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getLocalizedText, getMeasureFormula, getTransitionMeasureFormula, isActionValid, isHierarchy, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs,
|
|
1509
|
+
export { EActionTypes, ECalculatorFilterMethods, EColorMode, EColorScope, EControlType, EDbType, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationUnit, EEventMeasureTemplateNames, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureTemplateNames, EOpenViewMode, EProcessFilterNames, ESimpleDataType, ESortDirection, ESortingValueModes, ETransitionMeasureTemplateNames, EViewType, EWidgetActionInputMode, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, type IActionCommon, type IActionGoToUrl, type IActionOpenView, type IActionRunScript, type IActionScript, type IActionScriptField, type IActionUpdateVariable, type IAddDurationOfTransitionFilter, type IAddPresenceOfEventFilter, type IAddPresenceOfTransitionFilter, type IAddRepetitionOfEventFilter, type IBaseDimensionsAndMeasuresCalculator, type IBaseDimensionsAndMeasuresCalculatorInput, type IBaseDimensionsAndMeasuresCalculatorOutput, type IBaseWidgetSettings, type ICalculator, type ICalculatorDimensionInput, type ICalculatorDimensionOutput, type ICalculatorFactory, type ICalculatorFilter, type ICalculatorIndicatorInput, type ICalculatorIndicatorOutput, type ICalculatorMeasureInput, type ICalculatorMeasureOutput, type ICalculatorVariable, type ICalculatorVariablesValues, type IColoredValue, type ICommonColumnIndicator, type IControlRecord, type ICustomAddButtonProps, type ICustomWidgetProps, type IDefinition, type IDimensionSelection, type IDimensionSelectionByFormula, type IDisplayPredicate, type IDisplayRule, type IDivePanelDescription, type IDividerRecord, type IEdge, type IExportColumnOrder, type IFillSettings, type IFormulaFilterValue, type IGeneralCalculator, type IGeneralCalculatorExportInput, type IGeneralCalculatorInput, type IGeneralCalculatorOutput, type IGraphElement, type IGroupSetDescription, type IGroupSetRecord, type IGroupSettings, type IHistogramBin, type IHistogramCalculator, type IHistogramCalculatorInput, type IHistogramCalculatorOutput, type ILens, type IMarkdownMeasure, type IMeasureMenuConfig, type IPanelDescription, type IPanelDescriptionCreator, type IPieCalculator, type IPieCalculatorInput, type IPieCalculatorOutput, type IProcessEventFilterValue, type IProcessEventIndicator, type IProcessGraphCalculator, type IProcessGraphCalculatorInput, type IProcessGraphCalculatorOutput, type IProcessIndicator, type IProcessTransitionFilterValue, type IProcessTransitionIndicator, type IRange, type ISelectOption, type ISortOrder, type ISortingMenuConfig, type IStagesFilterValue, type ITwoLimitsCalculator, type ITwoLimitsCalculatorExportInput, type ITwoLimitsCalculatorInput, type ITwoLimitsCalculatorOutput, type ITypeCalculator, type ITypeCalculatorInput, type ITypeCalculatorOutput, type IVertex, type IWidget, type IWidgetActionInput, type IWidgetColumnIndicator, type IWidgetDimension, type IWidgetDimensionHierarchy, type IWidgetEntity, type IWidgetFilter, type IWidgetFiltration, type IWidgetFormatting, type IWidgetFormulaFilterValue, type IWidgetIndicator, type IWidgetIndicatorMenuConfig, type IWidgetMeasure, type IWidgetPlaceholderController, type IWidgetProcess, type IWidgetProps, type IWidgetSortingIndicator, type IWidgetTable, type IWidgetTableColumn, type IWidgetsContext, type TActionsOnClick, type TBoundedContentWithIndicator, type TColor, type TColorRule, type TColumnIndicatorValue, type TDefineWidgetOptions, type TDisplayCondition, type TDisplayMode, type TEmptyRecord, type TFiltrationMode, type TGroupLevelRecord, type TLaunchActionParams, type TProcessIndicatorValue, type TRecordAccessor, type TSelectivePartial, type TSortDirection, type TUpdateSelection, type TValuePath, type TWidgetActionInputValue, type TWidgetContainer, type TWidgetFilterValue, type TWidgetFiltering, type TWidgetLevelRecord, type TWidgetSortingValue, type TWidgetSortingValueRelatedWidgetDimension, type TWidgetSortingValueRelatedWidgetIndicator, type TWidgetSortingValueRelatedWidgetMeasure, type TWidgetVariable, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, dimensionTemplateFormulas, escapeSpecialCharacters, eventMeasureTemplateFormulas, fillTemplateString, formulaFilterMethods, generateColumnFormula, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getLocalizedText, getMeasureFormula, getTransitionMeasureFormula, isActionValid, isHierarchy, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs, measureTemplateFormulas, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, transitionMeasureTemplateFormulas, unescapeSpecialCharacters, updateDefaultModeSelection, updateMultiModeSelection, updateSingleModeSelection };
|
package/dist/index.esm.js
CHANGED
|
@@ -159,21 +159,6 @@ var escapeSingularQuotes = function (formula) {
|
|
|
159
159
|
return formula.replaceAll("'", "\\'");
|
|
160
160
|
};
|
|
161
161
|
|
|
162
|
-
var compact = function (items) { return ((items === null || items === void 0 ? void 0 : items.filter(Boolean)) || []); };
|
|
163
|
-
var compactMap = function (items, f) {
|
|
164
|
-
return compact(items === null || items === void 0 ? void 0 : items.map(f));
|
|
165
|
-
};
|
|
166
|
-
var isNil = function (value) {
|
|
167
|
-
return value === null || value === undefined;
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
function mapVariablesToInputs(variables) {
|
|
171
|
-
return new Map(compactMap(__spreadArray([], __read(variables.values()), false), function (_a) {
|
|
172
|
-
var name = _a.name, dataType = _a.dataType, value = _a.value;
|
|
173
|
-
return !isNil(value) ? [name, { dataType: dataType, value: value }] : null;
|
|
174
|
-
}));
|
|
175
|
-
}
|
|
176
|
-
|
|
177
162
|
var ECalculatorFilterMethods;
|
|
178
163
|
(function (ECalculatorFilterMethods) {
|
|
179
164
|
ECalculatorFilterMethods["EQUAL_TO"] = "EQUAL_TO";
|
|
@@ -219,6 +204,14 @@ var EFormulaFilterFieldKeys;
|
|
|
219
204
|
EFormulaFilterFieldKeys["durationUnit"] = "durationUnit";
|
|
220
205
|
})(EFormulaFilterFieldKeys || (EFormulaFilterFieldKeys = {}));
|
|
221
206
|
|
|
207
|
+
var compact = function (items) { return ((items === null || items === void 0 ? void 0 : items.filter(Boolean)) || []); };
|
|
208
|
+
var compactMap = function (items, f) {
|
|
209
|
+
return compact(items === null || items === void 0 ? void 0 : items.map(f));
|
|
210
|
+
};
|
|
211
|
+
var isNil = function (value) {
|
|
212
|
+
return value === null || value === undefined;
|
|
213
|
+
};
|
|
214
|
+
|
|
222
215
|
var EFormatTypes;
|
|
223
216
|
(function (EFormatTypes) {
|
|
224
217
|
/** Дата */
|
|
@@ -967,6 +960,11 @@ function bindContentsWithIndicators(outputs, indicators) {
|
|
|
967
960
|
return compactMap(indicators, function (indicator) { return bindContentWithIndicator(outputs, indicator); });
|
|
968
961
|
}
|
|
969
962
|
|
|
963
|
+
/** Удалить из строки символы экранирования */
|
|
964
|
+
function unescapeSpecialCharacters(str) {
|
|
965
|
+
return str.replace(/\\(?!\\)/g, "").replace(/\\\\/g, "\\");
|
|
966
|
+
}
|
|
967
|
+
|
|
970
968
|
var EControlType;
|
|
971
969
|
(function (EControlType) {
|
|
972
970
|
EControlType["inputNumber"] = "inputNumber";
|
|
@@ -1092,4 +1090,4 @@ var getLocalizedText = function (language, locObj, props) {
|
|
|
1092
1090
|
return localization.getLocalized(locObj, props);
|
|
1093
1091
|
};
|
|
1094
1092
|
|
|
1095
|
-
export { EActionTypes, ECalculatorFilterMethods, EColorMode, EColorScope, EControlType, EDbType, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationUnit, EEventMeasureTemplateNames, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureTemplateNames, EOpenViewMode, EProcessFilterNames, ESimpleDataType, ESortDirection, ESortingValueModes, ETransitionMeasureTemplateNames, EViewType, EWidgetActionInputMode, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, dimensionTemplateFormulas, escapeSpecialCharacters, eventMeasureTemplateFormulas, fillTemplateString, formulaFilterMethods, generateColumnFormula, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getLocalizedText, getMeasureFormula, getTransitionMeasureFormula, isActionValid, isHierarchy, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs,
|
|
1093
|
+
export { EActionTypes, ECalculatorFilterMethods, EColorMode, EColorScope, EControlType, EDbType, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationUnit, EEventMeasureTemplateNames, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureTemplateNames, EOpenViewMode, EProcessFilterNames, ESimpleDataType, ESortDirection, ESortingValueModes, ETransitionMeasureTemplateNames, EViewType, EWidgetActionInputMode, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, dimensionTemplateFormulas, escapeSpecialCharacters, eventMeasureTemplateFormulas, fillTemplateString, formulaFilterMethods, generateColumnFormula, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getLocalizedText, getMeasureFormula, getTransitionMeasureFormula, isActionValid, isHierarchy, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs, measureTemplateFormulas, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, transitionMeasureTemplateFormulas, unescapeSpecialCharacters, updateDefaultModeSelection, updateMultiModeSelection, updateSingleModeSelection };
|
package/dist/index.js
CHANGED
|
@@ -160,21 +160,6 @@ var escapeSingularQuotes = function (formula) {
|
|
|
160
160
|
return formula.replaceAll("'", "\\'");
|
|
161
161
|
};
|
|
162
162
|
|
|
163
|
-
var compact = function (items) { return ((items === null || items === void 0 ? void 0 : items.filter(Boolean)) || []); };
|
|
164
|
-
var compactMap = function (items, f) {
|
|
165
|
-
return compact(items === null || items === void 0 ? void 0 : items.map(f));
|
|
166
|
-
};
|
|
167
|
-
var isNil = function (value) {
|
|
168
|
-
return value === null || value === undefined;
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
function mapVariablesToInputs(variables) {
|
|
172
|
-
return new Map(compactMap(__spreadArray([], __read(variables.values()), false), function (_a) {
|
|
173
|
-
var name = _a.name, dataType = _a.dataType, value = _a.value;
|
|
174
|
-
return !isNil(value) ? [name, { dataType: dataType, value: value }] : null;
|
|
175
|
-
}));
|
|
176
|
-
}
|
|
177
|
-
|
|
178
163
|
exports.ECalculatorFilterMethods = void 0;
|
|
179
164
|
(function (ECalculatorFilterMethods) {
|
|
180
165
|
ECalculatorFilterMethods["EQUAL_TO"] = "EQUAL_TO";
|
|
@@ -220,6 +205,14 @@ exports.EFormulaFilterFieldKeys = void 0;
|
|
|
220
205
|
EFormulaFilterFieldKeys["durationUnit"] = "durationUnit";
|
|
221
206
|
})(exports.EFormulaFilterFieldKeys || (exports.EFormulaFilterFieldKeys = {}));
|
|
222
207
|
|
|
208
|
+
var compact = function (items) { return ((items === null || items === void 0 ? void 0 : items.filter(Boolean)) || []); };
|
|
209
|
+
var compactMap = function (items, f) {
|
|
210
|
+
return compact(items === null || items === void 0 ? void 0 : items.map(f));
|
|
211
|
+
};
|
|
212
|
+
var isNil = function (value) {
|
|
213
|
+
return value === null || value === undefined;
|
|
214
|
+
};
|
|
215
|
+
|
|
223
216
|
exports.EFormatTypes = void 0;
|
|
224
217
|
(function (EFormatTypes) {
|
|
225
218
|
/** Дата */
|
|
@@ -968,6 +961,11 @@ function bindContentsWithIndicators(outputs, indicators) {
|
|
|
968
961
|
return compactMap(indicators, function (indicator) { return bindContentWithIndicator(outputs, indicator); });
|
|
969
962
|
}
|
|
970
963
|
|
|
964
|
+
/** Удалить из строки символы экранирования */
|
|
965
|
+
function unescapeSpecialCharacters(str) {
|
|
966
|
+
return str.replace(/\\(?!\\)/g, "").replace(/\\\\/g, "\\");
|
|
967
|
+
}
|
|
968
|
+
|
|
971
969
|
exports.EControlType = void 0;
|
|
972
970
|
(function (EControlType) {
|
|
973
971
|
EControlType["inputNumber"] = "inputNumber";
|
|
@@ -1125,7 +1123,6 @@ exports.mapFormulaFiltersToInputs = mapFormulaFiltersToInputs;
|
|
|
1125
1123
|
exports.mapMeasuresToInputs = mapMeasuresToInputs;
|
|
1126
1124
|
exports.mapSortingToInputs = mapSortingToInputs;
|
|
1127
1125
|
exports.mapTransitionMeasuresToInputs = mapTransitionMeasuresToInputs;
|
|
1128
|
-
exports.mapVariablesToInputs = mapVariablesToInputs;
|
|
1129
1126
|
exports.measureTemplateFormulas = measureTemplateFormulas;
|
|
1130
1127
|
exports.prepareValuesForSql = prepareValuesForSql;
|
|
1131
1128
|
exports.replaceDisplayCondition = replaceDisplayCondition;
|
|
@@ -1133,6 +1130,7 @@ exports.replaceFiltersBySelection = replaceFiltersBySelection;
|
|
|
1133
1130
|
exports.replaceHierarchiesWithDimensions = replaceHierarchiesWithDimensions;
|
|
1134
1131
|
exports.selectDimensionFromHierarchy = selectDimensionFromHierarchy;
|
|
1135
1132
|
exports.transitionMeasureTemplateFormulas = transitionMeasureTemplateFormulas;
|
|
1133
|
+
exports.unescapeSpecialCharacters = unescapeSpecialCharacters;
|
|
1136
1134
|
exports.updateDefaultModeSelection = updateDefaultModeSelection;
|
|
1137
1135
|
exports.updateMultiModeSelection = updateMultiModeSelection;
|
|
1138
1136
|
exports.updateSingleModeSelection = updateSingleModeSelection;
|