@infomaximum/widget-sdk 4.0.0-beta20 → 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 -23
- package/dist/index.esm.js +14 -16
- package/dist/index.js +14 -16
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -876,8 +876,6 @@ interface IWidgetActionInput {
|
|
|
876
876
|
declare const isActionValid: (action: TActionsOnClick, { scripts, tables, variables }: IWidgetsContext) => boolean;
|
|
877
877
|
|
|
878
878
|
interface IBaseWidgetSettings {
|
|
879
|
-
apiVersion: string;
|
|
880
|
-
type: string;
|
|
881
879
|
header?: string;
|
|
882
880
|
headerSize?: number;
|
|
883
881
|
stateName?: string | null;
|
|
@@ -1030,23 +1028,12 @@ interface IWidgetPlaceholderController {
|
|
|
1030
1028
|
setEmpty(value: boolean): void;
|
|
1031
1029
|
}
|
|
1032
1030
|
|
|
1033
|
-
/** Вид переменной для калькулятора */
|
|
1034
|
-
interface ICalculatorVariable {
|
|
1035
|
-
dataType: ESimpleDataType;
|
|
1036
|
-
value: string | string[];
|
|
1037
|
-
}
|
|
1038
|
-
/** Коллекция значений переменных по их имени */
|
|
1039
|
-
interface ICalculatorVariablesValues extends Map<string, ICalculatorVariable> {
|
|
1040
|
-
}
|
|
1041
|
-
|
|
1042
1031
|
/** Формат входного параметра GeneralCalculator */
|
|
1043
1032
|
interface IBaseDimensionsAndMeasuresCalculatorInput {
|
|
1044
1033
|
/** Разрезы */
|
|
1045
1034
|
dimensions: ICalculatorDimensionInput[];
|
|
1046
1035
|
/** Меры */
|
|
1047
1036
|
measures: ICalculatorMeasureInput[];
|
|
1048
|
-
/** Значения переменных */
|
|
1049
|
-
variablesValues?: ICalculatorVariablesValues;
|
|
1050
1037
|
/** Фильтры, использующие WHERE */
|
|
1051
1038
|
filters: ICalculatorFilter[];
|
|
1052
1039
|
/** Фильтры, использующие HAVING */
|
|
@@ -1100,8 +1087,6 @@ interface IHistogramCalculatorInput {
|
|
|
1100
1087
|
dimensions: ICalculatorDimensionInput[];
|
|
1101
1088
|
/** Лимит корзин */
|
|
1102
1089
|
binsLimit: number;
|
|
1103
|
-
/** Значения переменных */
|
|
1104
|
-
variablesValues?: ICalculatorVariablesValues;
|
|
1105
1090
|
/** Формула условия отображения */
|
|
1106
1091
|
displayConditionFormula?: TNullable<string>;
|
|
1107
1092
|
/** Фильтры, использующие WHERE */
|
|
@@ -1154,8 +1139,6 @@ interface IProcessGraphCalculatorInput {
|
|
|
1154
1139
|
filters: ICalculatorFilter[];
|
|
1155
1140
|
eventFilters?: ICalculatorFilter[];
|
|
1156
1141
|
displayConditionFormula?: TNullable<string>;
|
|
1157
|
-
/** Значения переменных */
|
|
1158
|
-
variablesValues?: ICalculatorVariablesValues;
|
|
1159
1142
|
}
|
|
1160
1143
|
interface IProcessGraphCalculatorOutput {
|
|
1161
1144
|
vertexMaxLimit: number;
|
|
@@ -1180,8 +1163,6 @@ interface ITwoLimitsCalculatorInput {
|
|
|
1180
1163
|
dimensionsSecondGroup: ICalculatorDimensionInput[];
|
|
1181
1164
|
/** Меры */
|
|
1182
1165
|
measures: ICalculatorMeasureInput[];
|
|
1183
|
-
/** Значения переменных */
|
|
1184
|
-
variablesValues?: ICalculatorVariablesValues;
|
|
1185
1166
|
/** Фильтры, использующие WHERE */
|
|
1186
1167
|
filters: ICalculatorFilter[];
|
|
1187
1168
|
/** Фильтры, использующие HAVING */
|
|
@@ -1226,7 +1207,6 @@ interface ITypeCalculatorInput {
|
|
|
1226
1207
|
alias: string;
|
|
1227
1208
|
formula: string;
|
|
1228
1209
|
}[];
|
|
1229
|
-
variablesValues: ICalculatorVariablesValues;
|
|
1230
1210
|
}
|
|
1231
1211
|
interface ITypeCalculatorOutput {
|
|
1232
1212
|
types: Map<string, ESimpleDataType>;
|
|
@@ -1236,8 +1216,6 @@ interface ITypeCalculator extends ICalculator<ITypeCalculatorInput, ITypeCalcula
|
|
|
1236
1216
|
|
|
1237
1217
|
declare const prepareValuesForSql: (dataType: ESimpleDataType, values: (string | null)[]) => (string | null)[];
|
|
1238
1218
|
|
|
1239
|
-
declare function mapVariablesToInputs(variables: Map<string, TWidgetVariable>): ICalculatorVariablesValues;
|
|
1240
|
-
|
|
1241
1219
|
declare function checkDisplayCondition(displayCondition: TNullable<TDisplayCondition>, variables: Map<string, TWidgetVariable>): boolean;
|
|
1242
1220
|
declare function getDisplayConditionFormula(displayCondition: TNullable<TDisplayCondition>): TNullable<string>;
|
|
1243
1221
|
declare const replaceDisplayCondition: <I extends IWidgetColumnIndicator>(dimension: I, displayCondition: TNullable<TDisplayCondition>) => TNullable<I>;
|
|
@@ -1287,6 +1265,18 @@ declare function bindContentsWithIndicators<Output extends ICalculatorIndicatorO
|
|
|
1287
1265
|
|
|
1288
1266
|
declare const escapeSpecialCharacters: (formula: string) => string;
|
|
1289
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
|
+
|
|
1290
1280
|
interface ICalculatorFactory {
|
|
1291
1281
|
general: () => IGeneralCalculator;
|
|
1292
1282
|
pie: () => IPieCalculator;
|
|
@@ -1516,4 +1506,4 @@ declare global {
|
|
|
1516
1506
|
}
|
|
1517
1507
|
}
|
|
1518
1508
|
|
|
1519
|
-
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;
|