@infomaximum/widget-sdk 5.16.0 → 5.18.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.
- package/CHANGELOG.md +20 -0
- package/dist/index.d.ts +63 -4
- package/dist/index.esm.js +12 -3
- package/dist/index.js +12 -2
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [5.18.0](https://github.com/Infomaximum/widget-sdk/compare/v5.18.0-0...v5.18.0) (2025-04-30)
|
|
6
|
+
|
|
7
|
+
## [5.18.0-0](https://github.com/Infomaximum/widget-sdk/compare/v5.17.0...v5.18.0-0) (2025-04-30)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* **InputNumberControl:** в props добавлена настройка layout для ориентации поля ([5545657](https://github.com/Infomaximum/widget-sdk/commit/554565767a432ef2748533c2d0b4dccb1a98c0ba))
|
|
13
|
+
* IParameterFromDynamicList расширен флагом enableCustomValue ([4ed6d23](https://github.com/Infomaximum/widget-sdk/commit/4ed6d234828c65350e24e8fee480381462304522))
|
|
14
|
+
* для переменной динамический список добавлен флаг considerFilters ([bf55aad](https://github.com/Infomaximum/widget-sdk/commit/bf55aaddc3bd2b72f5440d3071e2f30c874b05eb))
|
|
15
|
+
|
|
16
|
+
## [5.17.0](https://github.com/Infomaximum/widget-sdk/compare/v5.16.0...v5.17.0) (2025-04-23)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* в мета-описание добавлена возможность позиционирования поля относительно системных полей ([92b59c2](https://github.com/Infomaximum/widget-sdk/commit/92b59c2944121f6f211c3347ba5c4504b1f16dc6))
|
|
22
|
+
* в фильтрах по формуле поддержана возможность работы с элементами массива ([bfc6dcf](https://github.com/Infomaximum/widget-sdk/commit/bfc6dcfdae761d7c8306b250cd849ae64152b1d8))
|
|
23
|
+
* для способов ввода по формуле, агрегации и динамический список, добавлено поле considerFilters ([b7d8f72](https://github.com/Infomaximum/widget-sdk/commit/b7d8f72d417db755d506ccf29434a16041a13876))
|
|
24
|
+
|
|
5
25
|
## [5.16.0](https://github.com/Infomaximum/widget-sdk/compare/v5.12.2...v5.16.0) (2025-04-22)
|
|
6
26
|
|
|
7
27
|
## [5.15.0](https://github.com/Infomaximum/widget-sdk/compare/v5.14.0...v5.15.0) (2025-04-17)
|
package/dist/index.d.ts
CHANGED
|
@@ -238,6 +238,7 @@ declare enum EDurationUnit {
|
|
|
238
238
|
MINUTES = "MINUTES",
|
|
239
239
|
SECONDS = "SECONDS"
|
|
240
240
|
}
|
|
241
|
+
declare const applyIndexToArrayFormula: (formula: string, index: number) => string;
|
|
241
242
|
declare const mapFormulaFilterToCalculatorInput: (filterValue: TExtendedFormulaFilterValue) => TNullable<ICalculatorFilter>;
|
|
242
243
|
declare const mapFormulaFiltersToInputs: (filters: TExtendedFormulaFilterValue[]) => ICalculatorFilter[];
|
|
243
244
|
|
|
@@ -333,7 +334,16 @@ interface IFormulaFilterValue {
|
|
|
333
334
|
name: TNullable<string>;
|
|
334
335
|
/** Формула */
|
|
335
336
|
formula: string;
|
|
336
|
-
/**
|
|
337
|
+
/**
|
|
338
|
+
* Индекс элемента в результате вычисления формулы (если результат - массив).
|
|
339
|
+
*
|
|
340
|
+
* Используется, когда формула возвращает массив значений, но требуется работать только с одним конкретным элементом.
|
|
341
|
+
* Индекс добавляется к вычисляемой формуле, позволяя выбрать нужный элемент из результирующего массива.
|
|
342
|
+
*
|
|
343
|
+
* **Важно:** Индексация начинается с 1, т.к. используется ClickHouse (1-based).
|
|
344
|
+
*/
|
|
345
|
+
sliceIndex?: number;
|
|
346
|
+
/** Тип данных формулы (без учета `sliceIndex`) */
|
|
337
347
|
dbDataType: string;
|
|
338
348
|
/** Формат */
|
|
339
349
|
format: EFormatTypes;
|
|
@@ -390,8 +400,19 @@ interface IWidgetFiltration {
|
|
|
390
400
|
preparedFilterValues: ICalculatorFilter[];
|
|
391
401
|
/** Добавить фильтр по формуле */
|
|
392
402
|
addFormulaFilter(value: TSelectivePartial<IFormulaFilterValue, "format" | "formValues">): void;
|
|
393
|
-
/**
|
|
394
|
-
|
|
403
|
+
/**
|
|
404
|
+
* Удалить фильтр, заданный формулой, из текущего набора фильтров
|
|
405
|
+
*
|
|
406
|
+
* @param formula Формула фильтра, который необходимо удалить. Должна точно соответствовать
|
|
407
|
+
* формуле ранее добавленного фильтра (с учетом регистра и пробелов).
|
|
408
|
+
* @param [sliceIndex] Опциональный индекс элемента массива. См. {@link IFormulaFilterValue.sliceIndex}.
|
|
409
|
+
*
|
|
410
|
+
* @remarks
|
|
411
|
+
* - Если фильтр был добавлен без указания индекса, его нужно удалять без указания индекса.
|
|
412
|
+
* - Если фильтр был добавлен с индексом, тот же индекс должен быть указан при удалении.
|
|
413
|
+
* - Удаление происходит по точному совпадению формулы и индекса (если он был указан).
|
|
414
|
+
*/
|
|
415
|
+
removeFormulaFilter(formula: string, sliceIndex?: number): void;
|
|
395
416
|
/** Добавить процессный фильтр */
|
|
396
417
|
addProcessFilter(...args: Parameters<IAddPresenceOfEventFilter> | Parameters<IAddRepetitionOfEventFilter> | Parameters<IAddPresenceOfTransitionFilter> | Parameters<IAddDurationOfTransitionFilter>): void;
|
|
397
418
|
/** Добавить фильтр по этапам */
|
|
@@ -672,6 +693,8 @@ interface IWidgetDynamicListVariable extends IBaseWidgetVariable {
|
|
|
672
693
|
multipleChoice: boolean;
|
|
673
694
|
/** Фильтры */
|
|
674
695
|
filters: TExtendedFormulaFilterValue[];
|
|
696
|
+
/** Флаг применения фильтров отчета для отображаемого списка */
|
|
697
|
+
considerFilters: boolean;
|
|
675
698
|
}
|
|
676
699
|
interface IWidgetColumnListVariable extends IBaseWidgetVariable {
|
|
677
700
|
/** Тип переменной */
|
|
@@ -953,10 +976,12 @@ interface IParameterFromVariable {
|
|
|
953
976
|
interface IParameterFromFormula {
|
|
954
977
|
inputMethod: EWidgetActionInputMethod.FORMULA;
|
|
955
978
|
formula: string;
|
|
979
|
+
considerFilters: boolean;
|
|
956
980
|
}
|
|
957
981
|
interface IParameterFromAggregation {
|
|
958
982
|
inputMethod: EWidgetActionInputMethod.AGGREGATION;
|
|
959
983
|
formula: string;
|
|
984
|
+
considerFilters: boolean;
|
|
960
985
|
}
|
|
961
986
|
interface IParameterFromEvent {
|
|
962
987
|
inputMethod: EWidgetActionInputMethod.EVENT;
|
|
@@ -985,6 +1010,8 @@ interface IParameterFromDynamicList {
|
|
|
985
1010
|
displayOptions: string;
|
|
986
1011
|
filters: TExtendedFormulaFilterValue[];
|
|
987
1012
|
filterByRows?: boolean;
|
|
1013
|
+
considerFilters: boolean;
|
|
1014
|
+
enableCustomValue?: boolean;
|
|
988
1015
|
}
|
|
989
1016
|
interface IParameterFromDataModelBase {
|
|
990
1017
|
inputMethod: EWidgetActionInputMethod.DATA_MODEL;
|
|
@@ -1421,6 +1448,37 @@ interface IControlRecord<Settings extends object, T extends TControlConstraint =
|
|
|
1421
1448
|
* Предоставлен для удобства разработки. Скрыть элемент можно и условно добавляя его в мета-описание.
|
|
1422
1449
|
*/
|
|
1423
1450
|
shouldDisplay?: IDisplayPredicate<Settings>;
|
|
1451
|
+
/** Позиционирование поля относительно системных полей (см. {@link IControlRecordPosition}) */
|
|
1452
|
+
position?: IControlRecordPosition;
|
|
1453
|
+
}
|
|
1454
|
+
/**
|
|
1455
|
+
* Контроль позиционирования кастомного поля относительно системных полей
|
|
1456
|
+
*
|
|
1457
|
+
* @remarks
|
|
1458
|
+
* Правила применения:
|
|
1459
|
+
* 1. Работает только с ключами системных полей
|
|
1460
|
+
* 2. Приоритет: `insertBefore` > `insertAfter` (если указаны оба)
|
|
1461
|
+
* 3. Если поле переопределяет системное (через key) - правило игнорируется
|
|
1462
|
+
* 4. Если указанный якорь не найден - правило игнорируется
|
|
1463
|
+
*
|
|
1464
|
+
* Статус реализации:
|
|
1465
|
+
* - Не работает на корневом уровне, работает внутри IGroupSetDescription
|
|
1466
|
+
*
|
|
1467
|
+
* // Планируемое расширение:
|
|
1468
|
+
* // 1. Добавить в IControlRecordPosition свойство strict - при true поле не добавляется, если якорь не найден
|
|
1469
|
+
* // 2. Поддержка на корневом уровне мета-описания
|
|
1470
|
+
*/
|
|
1471
|
+
interface IControlRecordPosition {
|
|
1472
|
+
/**
|
|
1473
|
+
* Вставить поле перед указанным системным полем
|
|
1474
|
+
* @param key - ключ системного поля, перед которым нужно вставить
|
|
1475
|
+
*/
|
|
1476
|
+
insertBefore?: string;
|
|
1477
|
+
/**
|
|
1478
|
+
* Вставить поле после указанного системного поля
|
|
1479
|
+
* @param key - ключ системного поля, после которого нужно вставить
|
|
1480
|
+
*/
|
|
1481
|
+
insertAfter?: string;
|
|
1424
1482
|
}
|
|
1425
1483
|
interface IInputControl {
|
|
1426
1484
|
type: EControlType.input;
|
|
@@ -1462,6 +1520,7 @@ interface IInputNumberControl {
|
|
|
1462
1520
|
unitLabel?: string;
|
|
1463
1521
|
isClearable?: boolean;
|
|
1464
1522
|
disabled?: boolean;
|
|
1523
|
+
layout?: "vertical" | "horizontal";
|
|
1465
1524
|
};
|
|
1466
1525
|
}
|
|
1467
1526
|
interface IInputRangeControl {
|
|
@@ -2594,4 +2653,4 @@ declare global {
|
|
|
2594
2653
|
}
|
|
2595
2654
|
}
|
|
2596
2655
|
|
|
2597
|
-
export { EActionButtonsTypes, EActionTypes, EAutoUpdateMode, EBlockingConditionMode, ECalculatorFilterMethods, EClickHouseBaseTypes, EColorMode, EControlType, ECustomSelectTemplates, EDataModelOption, EDimensionAggregationTemplateName, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationTemplateName, EDurationUnit, EEventAppearances, EEventMeasureTemplateNames, EFontWeight, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureAggregationTemplateName, EMeasureTemplateNames, EOuterAggregation, EProcessFilterNames, ESelectOptionTypes, ESimpleDataType, ESimpleInputType, ESortDirection, ESortingValueModes, ESystemRecordKey, ETransitionMeasureTemplateNames, EUnitMode, EViewMode, EViewOpenIn, EWidgetActionInputMethod, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, type IActionGoToUrl, type IActionOnClickControl, type IActionRunScript, type IActionScript, type IActionUpdateVariable, type IAddButtonSelectOption, type IAddDurationOfTransitionFilter, type IAddPresenceOfEventFilter, type IAddPresenceOfTransitionFilter, type IAddRepetitionOfEventFilter, type IAutoIdentifiedArrayItem, 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 ICollapseRecord, type IColorPickerControl, type IColoredValue, type ICommonDimensions, type ICommonMeasures, type ICommonState, type IControlRecord, type ICustomAddButtonProps, type ICustomWidgetProps, type IDefinition, type IDimensionSelection, type IDimensionSelectionByFormula, type IDisplayConditionControl, type IDisplayPredicate, type IDisplayRule, type IDivePanelDescription, type IDividerRecord, type IEdge, type IEventsColorControl, type IEventsPickerControl, type IExportColumnOrder, type IFillSettings, type IFilterControl, type IFormattingControl, type IFormattingTemplateControl, type IFormulaControl, type IFormulaFilterValue, type IGeneralCalculator, type IGeneralCalculatorExportInput, type IGeneralCalculatorInput, type IGeneralCalculatorOutput, type IGlobalContext, type IGraphElement, type IGroupSetDescription, type IGroupSetRecord, type IGroupSettings, type IHistogramBin, type IHistogramCalculator, type IHistogramCalculatorInput, type IHistogramCalculatorOutput, type IIndicatorLink, type IInitialSettings, type IInputControl, type IInputMarkdownControl, type IInputNumberControl, type IInputRangeControl, type ILens, type IMarkdownMeasure, type IMeasureAddButtonProps, type IPanelDescription, type IPanelDescriptionCreator, type IParameterColumnList, type IParameterFromAggregation, type IParameterFromColumn, type IParameterFromDynamicList, type IParameterFromEndEvent, type IParameterFromEvent, type IParameterFromFormula, type IParameterFromManualInput, type IParameterFromStartEvent, type IParameterFromStaticList, type IParameterFromVariable, type IParameterTableList, type IPieCalculator, type IPieCalculatorInput, type IPieCalculatorOutput, type IProcessEventFilterValue, type IProcessEventIndicator, type IProcessFilterPreviewParams, type IProcessGraphCalculator, type IProcessGraphCalculatorInput, type IProcessGraphCalculatorOutput, type IProcessIndicator, type IProcessTransitionFilterValue, type IProcessTransitionIndicator, type IRadioIconGroupControl, type IRange, type ISelectBranchOption, type ISelectControl, type ISelectDividerOption, type ISelectGroupOption, type ISelectLeafOption, type ISelectNode, type ISelectOption, type ISelectSystemOption, type ISettingsMigratorParams, type ISizeControl, type ISortOrder, type ISortingAddButtonProps, type IStagesFilterValue, type IStaticListLabeledOption, type ISwitchControl, type ITagSetControl, type ITwoLimitsCalculator, type ITwoLimitsCalculatorExportInput, type ITwoLimitsCalculatorInput, type ITwoLimitsCalculatorOutput, type ITypeCalculator, type ITypeCalculatorInput, type ITypeCalculatorOutput, type ITypeCalculatorOutputItem, type ITypedFormulaControl, type IVertex, type IViewContext, type IWidget, type IWidgetAction, type IWidgetColumnIndicator, type IWidgetColumnListVariable, type IWidgetDimension, type IWidgetDimensionHierarchy, type IWidgetDynamicListVariable, type IWidgetEntity, type IWidgetFilter, type IWidgetFiltration, type IWidgetFormatting, type IWidgetIndicator, type IWidgetIndicatorAddButtonProps, type IWidgetManifest, type IWidgetMeasure, type IWidgetMigrator, type IWidgetPersistValue, type IWidgetPlaceholderController, type IWidgetPlaceholderValues, type IWidgetPresetSettings, type IWidgetProcess, type IWidgetProps, type IWidgetSortingIndicator, type IWidgetStaticListVariable, type IWidgetStaticVariable, type IWidgetStruct, type IWidgetTable, type IWidgetTableColumn, OuterAggregation, type TAction, type TActionOnClickParameter, type TActionOpenView, type TActionValidator, type TActionsOnClick, type TAddButton, type TBoundedContentWithIndicator, type TColor, type TColorBase, type TColorRule, type TColumnIndicatorValue, type TContextMenu, type TContextMenuButton, type TContextMenuButtonActions, type TContextMenuButtonApply, type TContextMenuButtonClose, type TContextMenuButtonCustom, type TContextMenuButtonGroup, type TContextMenuButtonOptions, type TContextMenuList, type TContextMenuPositionUnit, type TContextMenuRow, type TControlUnion, type TCustomAddButtonSelectOption, type TDefineWidgetOptions, type TDisplayCondition, type TDisplayMode, type TEmptyRecord, type TExtendedFormulaFilterValue, type TFiltrationAccessibility, type TGroupLevelRecord, type TLaunchActionParams, type TMeasureAddButtonSelectOption, type TMigrateProcessor, type TMigrationStruct, type TParameterFromDataModel, type TProcessIndicatorValue, type TRecordAccessor, type TSelectChildOptions, type TSelectFetchNodes, type TSelectivePartial, type TSortDirection, type TUpdateSelection, type TValuePath, type TVersion, type TWidgetActionParameter, type TWidgetContainer, type TWidgetDimensionData, type TWidgetFilterValue, type TWidgetFiltering, type TWidgetIndicatorAggregationValue, type TWidgetIndicatorConversionValue, type TWidgetIndicatorDurationValue, type TWidgetIndicatorTimeValue, type TWidgetLevelRecord, type TWidgetMeasureData, type TWidgetSortingValue, type TWidgetVariable, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, clearMultiLineComments, clearSingleLineComments, colors, conversionTemplate, convertFiltersToFormula, convertToFormulasChain, countExecutionsTemplate, dashboardLinkRegExp, dimensionAggregationTemplates, dimensionTemplateFormulas, displayConditionTemplate, durationTemplates, escapeSpecialCharacters, eventMeasureTemplateFormulas, fillTemplateString, formattingConfig, formulaFilterMethods, generateColumnFormula, getColorByIndex, getDefaultSortOrders, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getLocalizedText, getMeasureFormula, getRuleColor, getTransitionMeasureFormula, isDimensionsHierarchy, isFormulaFilterValue, isValidColor, linkNameRegExp, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs, measureAggregationTemplates, measureTemplateFormulas, parseClickHouseType, parseIndicatorLink, prepareConversionParams, prepareDimensionAggregationParams, prepareDurationParams, prepareFormulaForSql, prepareMeasureAggregationParams, prepareSortOrders, prepareTimeParams, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, timeTemplates, transitionMeasureTemplateFormulas, unescapeSpecialCharacters, updateDefaultModeSelection, updateMultiModeSelection, updateSingleModeSelection, workspaceLinkRegExp };
|
|
2656
|
+
export { EActionButtonsTypes, EActionTypes, EAutoUpdateMode, EBlockingConditionMode, ECalculatorFilterMethods, EClickHouseBaseTypes, EColorMode, EControlType, ECustomSelectTemplates, EDataModelOption, EDimensionAggregationTemplateName, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationTemplateName, EDurationUnit, EEventAppearances, EEventMeasureTemplateNames, EFontWeight, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureAggregationTemplateName, EMeasureTemplateNames, EOuterAggregation, EProcessFilterNames, ESelectOptionTypes, ESimpleDataType, ESimpleInputType, ESortDirection, ESortingValueModes, ESystemRecordKey, ETransitionMeasureTemplateNames, EUnitMode, EViewMode, EViewOpenIn, EWidgetActionInputMethod, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, type IActionGoToUrl, type IActionOnClickControl, type IActionRunScript, type IActionScript, type IActionUpdateVariable, type IAddButtonSelectOption, type IAddDurationOfTransitionFilter, type IAddPresenceOfEventFilter, type IAddPresenceOfTransitionFilter, type IAddRepetitionOfEventFilter, type IAutoIdentifiedArrayItem, 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 ICollapseRecord, type IColorPickerControl, type IColoredValue, type ICommonDimensions, type ICommonMeasures, type ICommonState, type IControlRecord, type ICustomAddButtonProps, type ICustomWidgetProps, type IDefinition, type IDimensionSelection, type IDimensionSelectionByFormula, type IDisplayConditionControl, type IDisplayPredicate, type IDisplayRule, type IDivePanelDescription, type IDividerRecord, type IEdge, type IEventsColorControl, type IEventsPickerControl, type IExportColumnOrder, type IFillSettings, type IFilterControl, type IFormattingControl, type IFormattingTemplateControl, type IFormulaControl, type IFormulaFilterValue, type IGeneralCalculator, type IGeneralCalculatorExportInput, type IGeneralCalculatorInput, type IGeneralCalculatorOutput, type IGlobalContext, type IGraphElement, type IGroupSetDescription, type IGroupSetRecord, type IGroupSettings, type IHistogramBin, type IHistogramCalculator, type IHistogramCalculatorInput, type IHistogramCalculatorOutput, type IIndicatorLink, type IInitialSettings, type IInputControl, type IInputMarkdownControl, type IInputNumberControl, type IInputRangeControl, type ILens, type IMarkdownMeasure, type IMeasureAddButtonProps, type IPanelDescription, type IPanelDescriptionCreator, type IParameterColumnList, type IParameterFromAggregation, type IParameterFromColumn, type IParameterFromDynamicList, type IParameterFromEndEvent, type IParameterFromEvent, type IParameterFromFormula, type IParameterFromManualInput, type IParameterFromStartEvent, type IParameterFromStaticList, type IParameterFromVariable, type IParameterTableList, type IPieCalculator, type IPieCalculatorInput, type IPieCalculatorOutput, type IProcessEventFilterValue, type IProcessEventIndicator, type IProcessFilterPreviewParams, type IProcessGraphCalculator, type IProcessGraphCalculatorInput, type IProcessGraphCalculatorOutput, type IProcessIndicator, type IProcessTransitionFilterValue, type IProcessTransitionIndicator, type IRadioIconGroupControl, type IRange, type ISelectBranchOption, type ISelectControl, type ISelectDividerOption, type ISelectGroupOption, type ISelectLeafOption, type ISelectNode, type ISelectOption, type ISelectSystemOption, type ISettingsMigratorParams, type ISizeControl, type ISortOrder, type ISortingAddButtonProps, type IStagesFilterValue, type IStaticListLabeledOption, type ISwitchControl, type ITagSetControl, type ITwoLimitsCalculator, type ITwoLimitsCalculatorExportInput, type ITwoLimitsCalculatorInput, type ITwoLimitsCalculatorOutput, type ITypeCalculator, type ITypeCalculatorInput, type ITypeCalculatorOutput, type ITypeCalculatorOutputItem, type ITypedFormulaControl, type IVertex, type IViewContext, type IWidget, type IWidgetAction, type IWidgetColumnIndicator, type IWidgetColumnListVariable, type IWidgetDimension, type IWidgetDimensionHierarchy, type IWidgetDynamicListVariable, type IWidgetEntity, type IWidgetFilter, type IWidgetFiltration, type IWidgetFormatting, type IWidgetIndicator, type IWidgetIndicatorAddButtonProps, type IWidgetManifest, type IWidgetMeasure, type IWidgetMigrator, type IWidgetPersistValue, type IWidgetPlaceholderController, type IWidgetPlaceholderValues, type IWidgetPresetSettings, type IWidgetProcess, type IWidgetProps, type IWidgetSortingIndicator, type IWidgetStaticListVariable, type IWidgetStaticVariable, type IWidgetStruct, type IWidgetTable, type IWidgetTableColumn, OuterAggregation, type TAction, type TActionOnClickParameter, type TActionOpenView, type TActionValidator, type TActionsOnClick, type TAddButton, type TBoundedContentWithIndicator, type TColor, type TColorBase, type TColorRule, type TColumnIndicatorValue, type TContextMenu, type TContextMenuButton, type TContextMenuButtonActions, type TContextMenuButtonApply, type TContextMenuButtonClose, type TContextMenuButtonCustom, type TContextMenuButtonGroup, type TContextMenuButtonOptions, type TContextMenuList, type TContextMenuPositionUnit, type TContextMenuRow, type TControlUnion, type TCustomAddButtonSelectOption, type TDefineWidgetOptions, type TDisplayCondition, type TDisplayMode, type TEmptyRecord, type TExtendedFormulaFilterValue, type TFiltrationAccessibility, type TGroupLevelRecord, type TLaunchActionParams, type TMeasureAddButtonSelectOption, type TMigrateProcessor, type TMigrationStruct, type TParameterFromDataModel, type TProcessIndicatorValue, type TRecordAccessor, type TSelectChildOptions, type TSelectFetchNodes, type TSelectivePartial, type TSortDirection, type TUpdateSelection, type TValuePath, type TVersion, type TWidgetActionParameter, type TWidgetContainer, type TWidgetDimensionData, type TWidgetFilterValue, type TWidgetFiltering, type TWidgetIndicatorAggregationValue, type TWidgetIndicatorConversionValue, type TWidgetIndicatorDurationValue, type TWidgetIndicatorTimeValue, type TWidgetLevelRecord, type TWidgetMeasureData, type TWidgetSortingValue, type TWidgetVariable, applyIndexToArrayFormula, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, clearMultiLineComments, clearSingleLineComments, colors, conversionTemplate, convertFiltersToFormula, convertToFormulasChain, countExecutionsTemplate, dashboardLinkRegExp, dimensionAggregationTemplates, dimensionTemplateFormulas, displayConditionTemplate, durationTemplates, escapeSpecialCharacters, eventMeasureTemplateFormulas, fillTemplateString, formattingConfig, formulaFilterMethods, generateColumnFormula, getColorByIndex, getDefaultSortOrders, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getLocalizedText, getMeasureFormula, getRuleColor, getTransitionMeasureFormula, isDimensionsHierarchy, isFormulaFilterValue, isValidColor, linkNameRegExp, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs, measureAggregationTemplates, measureTemplateFormulas, parseClickHouseType, parseIndicatorLink, prepareConversionParams, prepareDimensionAggregationParams, prepareDurationParams, prepareFormulaForSql, prepareMeasureAggregationParams, prepareSortOrders, prepareTimeParams, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, timeTemplates, transitionMeasureTemplateFormulas, unescapeSpecialCharacters, updateDefaultModeSelection, updateMultiModeSelection, updateSingleModeSelection, workspaceLinkRegExp };
|
package/dist/index.esm.js
CHANGED
|
@@ -1466,6 +1466,7 @@ var getFormulaFilterValues = function (filterValue) {
|
|
|
1466
1466
|
}
|
|
1467
1467
|
return [];
|
|
1468
1468
|
};
|
|
1469
|
+
var applyIndexToArrayFormula = function (formula, index) { return "".concat(formula, "[").concat(index, "]"); };
|
|
1469
1470
|
var mapFormulaFilterToCalculatorInput = function (filterValue) {
|
|
1470
1471
|
if (!filterValue) {
|
|
1471
1472
|
return null;
|
|
@@ -1480,8 +1481,16 @@ var mapFormulaFilterToCalculatorInput = function (filterValue) {
|
|
|
1480
1481
|
filteringMethod: formulaFilterMethods.EQUAL_TO,
|
|
1481
1482
|
};
|
|
1482
1483
|
}
|
|
1483
|
-
var
|
|
1484
|
-
var dbDataType = filterValue.dbDataType;
|
|
1484
|
+
var filteringMethod = filterValue.filteringMethod, sliceIndex = filterValue.sliceIndex;
|
|
1485
|
+
var formula = filterValue.formula, dbDataType = filterValue.dbDataType;
|
|
1486
|
+
if (typeof sliceIndex === "number") {
|
|
1487
|
+
var _a = parseClickHouseType(dbDataType), dbBaseDataType = _a.dbBaseDataType, containers = _a.containers;
|
|
1488
|
+
if (!containers.includes("Array") || !dbBaseDataType) {
|
|
1489
|
+
throw new Error("Incorrect dbDataType: ".concat(dbDataType));
|
|
1490
|
+
}
|
|
1491
|
+
dbDataType = dbBaseDataType;
|
|
1492
|
+
formula = applyIndexToArrayFormula(formula, sliceIndex);
|
|
1493
|
+
}
|
|
1485
1494
|
if (filteringMethod === formulaFilterMethods.IN_RANGE ||
|
|
1486
1495
|
filteringMethod === formulaFilterMethods.NOT_IN_RANGE) {
|
|
1487
1496
|
var simpleType = parseClickHouseType(dbDataType).simpleType;
|
|
@@ -2004,4 +2013,4 @@ var getColorByIndex = function (index) {
|
|
|
2004
2013
|
return color;
|
|
2005
2014
|
};
|
|
2006
2015
|
|
|
2007
|
-
export { EActionButtonsTypes, EActionTypes, EAutoUpdateMode, EBlockingConditionMode, ECalculatorFilterMethods, EClickHouseBaseTypes, EColorMode, EControlType, ECustomSelectTemplates, EDataModelOption, EDimensionAggregationTemplateName, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationTemplateName, EDurationUnit, EEventAppearances, EEventMeasureTemplateNames, EFontWeight, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureAggregationTemplateName, EMeasureTemplateNames, EOuterAggregation, EProcessFilterNames, ESelectOptionTypes, ESimpleDataType, ESimpleInputType, ESortDirection, ESortingValueModes, ESystemRecordKey, ETransitionMeasureTemplateNames, EUnitMode, EViewMode, EViewOpenIn, EWidgetActionInputMethod, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, OuterAggregation, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, clearMultiLineComments, clearSingleLineComments, colors, conversionTemplate, convertFiltersToFormula, convertToFormulasChain, countExecutionsTemplate, dashboardLinkRegExp, dimensionAggregationTemplates, dimensionTemplateFormulas, displayConditionTemplate, durationTemplates, escapeSpecialCharacters, eventMeasureTemplateFormulas, fillTemplateString, formattingConfig, formulaFilterMethods, generateColumnFormula, getColorByIndex, getDefaultSortOrders, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getLocalizedText, getMeasureFormula, getRuleColor, getTransitionMeasureFormula, isDimensionsHierarchy, isFormulaFilterValue, isValidColor, linkNameRegExp, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs, measureAggregationTemplates, measureTemplateFormulas, parseClickHouseType, parseIndicatorLink, prepareConversionParams, prepareDimensionAggregationParams, prepareDurationParams, prepareFormulaForSql, prepareMeasureAggregationParams, prepareSortOrders, prepareTimeParams, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, timeTemplates, transitionMeasureTemplateFormulas, unescapeSpecialCharacters, updateDefaultModeSelection, updateMultiModeSelection, updateSingleModeSelection, workspaceLinkRegExp };
|
|
2016
|
+
export { EActionButtonsTypes, EActionTypes, EAutoUpdateMode, EBlockingConditionMode, ECalculatorFilterMethods, EClickHouseBaseTypes, EColorMode, EControlType, ECustomSelectTemplates, EDataModelOption, EDimensionAggregationTemplateName, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationTemplateName, EDurationUnit, EEventAppearances, EEventMeasureTemplateNames, EFontWeight, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureAggregationTemplateName, EMeasureTemplateNames, EOuterAggregation, EProcessFilterNames, ESelectOptionTypes, ESimpleDataType, ESimpleInputType, ESortDirection, ESortingValueModes, ESystemRecordKey, ETransitionMeasureTemplateNames, EUnitMode, EViewMode, EViewOpenIn, EWidgetActionInputMethod, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, OuterAggregation, applyIndexToArrayFormula, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, clearMultiLineComments, clearSingleLineComments, colors, conversionTemplate, convertFiltersToFormula, convertToFormulasChain, countExecutionsTemplate, dashboardLinkRegExp, dimensionAggregationTemplates, dimensionTemplateFormulas, displayConditionTemplate, durationTemplates, escapeSpecialCharacters, eventMeasureTemplateFormulas, fillTemplateString, formattingConfig, formulaFilterMethods, generateColumnFormula, getColorByIndex, getDefaultSortOrders, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getLocalizedText, getMeasureFormula, getRuleColor, getTransitionMeasureFormula, isDimensionsHierarchy, isFormulaFilterValue, isValidColor, linkNameRegExp, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs, measureAggregationTemplates, measureTemplateFormulas, parseClickHouseType, parseIndicatorLink, prepareConversionParams, prepareDimensionAggregationParams, prepareDurationParams, prepareFormulaForSql, prepareMeasureAggregationParams, prepareSortOrders, prepareTimeParams, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, timeTemplates, transitionMeasureTemplateFormulas, unescapeSpecialCharacters, updateDefaultModeSelection, updateMultiModeSelection, updateSingleModeSelection, workspaceLinkRegExp };
|
package/dist/index.js
CHANGED
|
@@ -1467,6 +1467,7 @@ var getFormulaFilterValues = function (filterValue) {
|
|
|
1467
1467
|
}
|
|
1468
1468
|
return [];
|
|
1469
1469
|
};
|
|
1470
|
+
var applyIndexToArrayFormula = function (formula, index) { return "".concat(formula, "[").concat(index, "]"); };
|
|
1470
1471
|
var mapFormulaFilterToCalculatorInput = function (filterValue) {
|
|
1471
1472
|
if (!filterValue) {
|
|
1472
1473
|
return null;
|
|
@@ -1481,8 +1482,16 @@ var mapFormulaFilterToCalculatorInput = function (filterValue) {
|
|
|
1481
1482
|
filteringMethod: formulaFilterMethods.EQUAL_TO,
|
|
1482
1483
|
};
|
|
1483
1484
|
}
|
|
1484
|
-
var
|
|
1485
|
-
var dbDataType = filterValue.dbDataType;
|
|
1485
|
+
var filteringMethod = filterValue.filteringMethod, sliceIndex = filterValue.sliceIndex;
|
|
1486
|
+
var formula = filterValue.formula, dbDataType = filterValue.dbDataType;
|
|
1487
|
+
if (typeof sliceIndex === "number") {
|
|
1488
|
+
var _a = parseClickHouseType(dbDataType), dbBaseDataType = _a.dbBaseDataType, containers = _a.containers;
|
|
1489
|
+
if (!containers.includes("Array") || !dbBaseDataType) {
|
|
1490
|
+
throw new Error("Incorrect dbDataType: ".concat(dbDataType));
|
|
1491
|
+
}
|
|
1492
|
+
dbDataType = dbBaseDataType;
|
|
1493
|
+
formula = applyIndexToArrayFormula(formula, sliceIndex);
|
|
1494
|
+
}
|
|
1486
1495
|
if (filteringMethod === formulaFilterMethods.IN_RANGE ||
|
|
1487
1496
|
filteringMethod === formulaFilterMethods.NOT_IN_RANGE) {
|
|
1488
1497
|
var simpleType = parseClickHouseType(dbDataType).simpleType;
|
|
@@ -2013,6 +2022,7 @@ Object.defineProperty(exports, "EFilteringMethodValues", {
|
|
|
2013
2022
|
enumerable: true,
|
|
2014
2023
|
get: function () { return baseFilter.EFilteringMethodValues; }
|
|
2015
2024
|
});
|
|
2025
|
+
exports.applyIndexToArrayFormula = applyIndexToArrayFormula;
|
|
2016
2026
|
exports.bindContentWithIndicator = bindContentWithIndicator;
|
|
2017
2027
|
exports.bindContentsWithIndicators = bindContentsWithIndicators;
|
|
2018
2028
|
exports.checkDisplayCondition = checkDisplayCondition;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infomaximum/widget-sdk",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.18.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.esm.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"build": "rollup -c",
|
|
15
15
|
"lint": "tsc --noEmit",
|
|
16
16
|
"release": "npm run lint && standard-version && npm run build",
|
|
17
|
+
"prerelease": "npm run lint && standard-version -p && npm run build",
|
|
17
18
|
"format": "prettier --find-config-path --write 'src/**/*'",
|
|
18
19
|
"prepublishOnly": "npm run build",
|
|
19
20
|
"test": "jest"
|