@infomaximum/widget-sdk 5.0.0-beta10 → 5.0.0-beta11
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 +20 -28
- package/dist/index.esm.js +4 -8
- package/dist/index.js +4 -8
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -363,8 +363,6 @@ interface IAddDurationOfTransitionFilter {
|
|
|
363
363
|
declare enum EFormulaFilterFieldKeys {
|
|
364
364
|
date = "date",
|
|
365
365
|
dateRange = "dateRange",
|
|
366
|
-
duration = "duration",
|
|
367
|
-
number = "number",
|
|
368
366
|
numberRange = "numberRange",
|
|
369
367
|
string = "string",
|
|
370
368
|
lastTimeValue = "lastTimeValue",
|
|
@@ -388,8 +386,6 @@ interface IFormulaFilterValue {
|
|
|
388
386
|
formValues?: Partial<{
|
|
389
387
|
[EFormulaFilterFieldKeys.date]: string | null;
|
|
390
388
|
[EFormulaFilterFieldKeys.dateRange]: [string, string];
|
|
391
|
-
[EFormulaFilterFieldKeys.duration]: string;
|
|
392
|
-
[EFormulaFilterFieldKeys.number]: number;
|
|
393
389
|
[EFormulaFilterFieldKeys.numberRange]: Partial<[number, number]>;
|
|
394
390
|
[EFormulaFilterFieldKeys.string]: string;
|
|
395
391
|
[EFormulaFilterFieldKeys.lastTimeValue]: number;
|
|
@@ -524,18 +520,6 @@ interface IWidgetTable {
|
|
|
524
520
|
/** Колонки таблицы */
|
|
525
521
|
columns: Map<string, IWidgetTableColumn>;
|
|
526
522
|
}
|
|
527
|
-
/**
|
|
528
|
-
* simplified - упрощенный (для работы фильтрации в образах, открытых в модальном/боковом окне)
|
|
529
|
-
*
|
|
530
|
-
* full - полный
|
|
531
|
-
*/
|
|
532
|
-
type TFiltrationMode = "simplified" | "full";
|
|
533
|
-
/**
|
|
534
|
-
* preview - упрощенный
|
|
535
|
-
*
|
|
536
|
-
* full - полный
|
|
537
|
-
*/
|
|
538
|
-
type TDisplayMode = "preview" | "full";
|
|
539
523
|
interface IDisplayRule {
|
|
540
524
|
color: TColor;
|
|
541
525
|
}
|
|
@@ -546,10 +530,6 @@ interface IGlobalContext {
|
|
|
546
530
|
reportName: string;
|
|
547
531
|
/** Имена образов по их ключу(в текущем отчете) */
|
|
548
532
|
viewNameByKey: Map<string, string>;
|
|
549
|
-
/** Режим отображения виджетов */
|
|
550
|
-
displayMode: TDisplayMode;
|
|
551
|
-
/** Режим фильтрации виджетов */
|
|
552
|
-
filtrationMode: TFiltrationMode;
|
|
553
533
|
/** @deprecated имя группы пространства по ее id */
|
|
554
534
|
workspaceGroupNameById: Map<number, string>;
|
|
555
535
|
/** Меры уровня отчета */
|
|
@@ -1486,14 +1466,12 @@ interface ISelectGroupOption {
|
|
|
1486
1466
|
options: IAddButtonSelectOption[];
|
|
1487
1467
|
icon: string;
|
|
1488
1468
|
}
|
|
1489
|
-
/** @deprecated необходимо использовать TSelectFetchNodes*/
|
|
1490
|
-
type TSelectFetchOptions = (searchText?: string) => Promise<TCustomAddButtonSelectOption[]>;
|
|
1491
1469
|
interface ISelectNode {
|
|
1492
1470
|
options: TCustomAddButtonSelectOption[];
|
|
1493
1471
|
isAllRequested: boolean;
|
|
1494
1472
|
}
|
|
1495
1473
|
type TSelectFetchNodes = (searchText?: string) => Promise<ISelectNode>;
|
|
1496
|
-
type TSelectChildOptions = TCustomAddButtonSelectOption[] | TSelectFetchNodes
|
|
1474
|
+
type TSelectChildOptions = TCustomAddButtonSelectOption[] | TSelectFetchNodes;
|
|
1497
1475
|
interface ISelectBranchOption {
|
|
1498
1476
|
type: ESelectOptionTypes.BRANCH;
|
|
1499
1477
|
label: string;
|
|
@@ -1820,9 +1798,21 @@ interface IWidgetPersistValue<T extends object = object> {
|
|
|
1820
1798
|
get(): T | null;
|
|
1821
1799
|
set(value: T | null): void;
|
|
1822
1800
|
}
|
|
1801
|
+
/**
|
|
1802
|
+
* simplified - упрощенный (для работы фильтрации в образах, открытых в модальном/боковом окне)
|
|
1803
|
+
*
|
|
1804
|
+
* full - полный
|
|
1805
|
+
*/
|
|
1806
|
+
type TFiltrationAccessibility = "simplified" | "full";
|
|
1807
|
+
/**
|
|
1808
|
+
* preview - упрощенный
|
|
1809
|
+
*
|
|
1810
|
+
* full - полный
|
|
1811
|
+
*/
|
|
1812
|
+
type TDisplayMode = "preview" | "full";
|
|
1823
1813
|
interface IWidgetProps<WidgetSettings extends IBaseWidgetSettings = IBaseWidgetSettings> {
|
|
1824
|
-
/**
|
|
1825
|
-
|
|
1814
|
+
/** Ключ виджета */
|
|
1815
|
+
widgetKey: string;
|
|
1826
1816
|
/** Настройки виджета */
|
|
1827
1817
|
settings: WidgetSettings;
|
|
1828
1818
|
/** Фабрика для создания вычислителей */
|
|
@@ -1856,6 +1846,10 @@ interface IWidgetProps<WidgetSettings extends IBaseWidgetSettings = IBaseWidgetS
|
|
|
1856
1846
|
actionValidator: TActionValidator;
|
|
1857
1847
|
/** Аксессор для persist-значения виджета, хранимого в localStorage и URL */
|
|
1858
1848
|
persistValue: IWidgetPersistValue;
|
|
1849
|
+
/** Режим отображения виджета */
|
|
1850
|
+
displayMode: TDisplayMode;
|
|
1851
|
+
/** Доступность фильтрации */
|
|
1852
|
+
filtrationAccessibility: TFiltrationAccessibility;
|
|
1859
1853
|
}
|
|
1860
1854
|
/** Манифест виджета */
|
|
1861
1855
|
interface IWidgetManifest {
|
|
@@ -1883,8 +1877,6 @@ interface IWidgetManifest {
|
|
|
1883
1877
|
};
|
|
1884
1878
|
/** Параметры контейнера виджета */
|
|
1885
1879
|
container_params?: {
|
|
1886
|
-
/** @deprecated необходимо использовать show_title */
|
|
1887
|
-
show_header?: boolean;
|
|
1888
1880
|
/** Отображать ли системный заголовок виджета (по умолчанию false) */
|
|
1889
1881
|
show_title?: boolean;
|
|
1890
1882
|
/** Отображать ли markdown "описание" виджета (по умолчанию false) */
|
|
@@ -2009,4 +2001,4 @@ declare global {
|
|
|
2009
2001
|
}
|
|
2010
2002
|
}
|
|
2011
2003
|
|
|
2012
|
-
export { EActionButtonsTypes, EActionTypes, ECalculatorFilterMethods, EClickHouseBaseTypes, EColorMode, EControlType, ECustomSelectTemplates, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationUnit, EEventMeasureTemplateNames, EFontWeight, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureTemplateNames, EProcessFilterNames, ESelectOptionTypes, ESimpleDataType, ESimpleInputType, ESortDirection, ESortingValueModes, ESystemRecordKey, ETransitionMeasureTemplateNames, EUnitMode, EViewMode, EViewOpenIn, EWidgetActionInputMethod, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, type IActionGoToUrl, 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 IColoredValue, type ICommonDimensions, type ICommonMeasures, type ICommonState, 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 IGlobalContext, type IGraphElement, type IGroupSetDescription, type IGroupSetRecord, type IGroupSettings, type IHistogramBin, type IHistogramCalculator, type IHistogramCalculatorInput, type IHistogramCalculatorOutput, type IIndicatorLink, type IInitialSettings, type ILens, type IMarkdownMeasure, type IMeasureAddButtonProps, 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 ISelectBranchOption, type ISelectDividerOption, type ISelectGroupOption, type ISelectLeafOption, type ISelectNode, type ISelectOption, type ISelectSystemOption, type ISettingsMigratorParams, type ISortOrder, type ISortingAddButtonProps, type IStagesFilterValue, type ITwoLimitsCalculator, type ITwoLimitsCalculatorExportInput, type ITwoLimitsCalculatorInput, type ITwoLimitsCalculatorOutput, type ITypeCalculator, type ITypeCalculatorInput, type ITypeCalculatorOutput, type ITypeCalculatorOutputItem, 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, type TAction, type TActionOnClickParameter, type TActionOpenView, type TActionValidator, type TActionsOnClick, type TAddButton, type TAppearanceSettings, 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 TCustomAddButtonSelectOption, type TDefineWidgetOptions, type TDisplayCondition, type TDisplayMode, type TEmptyRecord, type TExtendedFormulaFilterValue, type
|
|
2004
|
+
export { EActionButtonsTypes, EActionTypes, ECalculatorFilterMethods, EClickHouseBaseTypes, EColorMode, EControlType, ECustomSelectTemplates, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationUnit, EEventMeasureTemplateNames, EFontWeight, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureTemplateNames, EProcessFilterNames, ESelectOptionTypes, ESimpleDataType, ESimpleInputType, ESortDirection, ESortingValueModes, ESystemRecordKey, ETransitionMeasureTemplateNames, EUnitMode, EViewMode, EViewOpenIn, EWidgetActionInputMethod, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, type IActionGoToUrl, 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 IColoredValue, type ICommonDimensions, type ICommonMeasures, type ICommonState, 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 IGlobalContext, type IGraphElement, type IGroupSetDescription, type IGroupSetRecord, type IGroupSettings, type IHistogramBin, type IHistogramCalculator, type IHistogramCalculatorInput, type IHistogramCalculatorOutput, type IIndicatorLink, type IInitialSettings, type ILens, type IMarkdownMeasure, type IMeasureAddButtonProps, 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 ISelectBranchOption, type ISelectDividerOption, type ISelectGroupOption, type ISelectLeafOption, type ISelectNode, type ISelectOption, type ISelectSystemOption, type ISettingsMigratorParams, type ISortOrder, type ISortingAddButtonProps, type IStagesFilterValue, type ITwoLimitsCalculator, type ITwoLimitsCalculatorExportInput, type ITwoLimitsCalculatorInput, type ITwoLimitsCalculatorOutput, type ITypeCalculator, type ITypeCalculatorInput, type ITypeCalculatorOutput, type ITypeCalculatorOutputItem, 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, type TAction, type TActionOnClickParameter, type TActionOpenView, type TActionValidator, type TActionsOnClick, type TAddButton, type TAppearanceSettings, 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 TCustomAddButtonSelectOption, type TDefineWidgetOptions, type TDisplayCondition, type TDisplayMode, type TEmptyRecord, type TExtendedFormulaFilterValue, type TFiltrationAccessibility, type TGroupLevelRecord, type TLaunchActionParams, type TMeasureAddButtonSelectOption, type TMigrateProcessor, type TMigrationStruct, 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 TWidgetIndicatorData, type TWidgetLevelRecord, type TWidgetSortingValue, type TWidgetVariable, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, colors, dashboardLinkRegExp, dimensionTemplateFormulas, 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, measureTemplateFormulas, parseClickHouseType, parseIndicatorLink, prepareSortOrders, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, transitionMeasureTemplateFormulas, unescapeSpecialCharacters, updateDefaultModeSelection, updateMultiModeSelection, updateSingleModeSelection, workspaceLinkRegExp };
|
package/dist/index.esm.js
CHANGED
|
@@ -156,8 +156,6 @@ var EFormulaFilterFieldKeys;
|
|
|
156
156
|
(function (EFormulaFilterFieldKeys) {
|
|
157
157
|
EFormulaFilterFieldKeys["date"] = "date";
|
|
158
158
|
EFormulaFilterFieldKeys["dateRange"] = "dateRange";
|
|
159
|
-
EFormulaFilterFieldKeys["duration"] = "duration";
|
|
160
|
-
EFormulaFilterFieldKeys["number"] = "number";
|
|
161
159
|
EFormulaFilterFieldKeys["numberRange"] = "numberRange";
|
|
162
160
|
EFormulaFilterFieldKeys["string"] = "string";
|
|
163
161
|
EFormulaFilterFieldKeys["lastTimeValue"] = "lastTimeValue";
|
|
@@ -689,15 +687,13 @@ var getFormulaFilterValues = function (filterValue) {
|
|
|
689
687
|
case EFormatTypes.DAY_OF_MONTH:
|
|
690
688
|
case EFormatTypes.WEEK:
|
|
691
689
|
case EFormatTypes.HOUR:
|
|
692
|
-
var _g = formValues, _h = EFormulaFilterFieldKeys.
|
|
693
|
-
return isRangeFilteringMethod(filteringMethod)
|
|
694
|
-
? stringifyNumbersRange(numberRange)
|
|
695
|
-
: [String(number !== null && number !== void 0 ? number : 0)];
|
|
690
|
+
var _g = formValues, _h = EFormulaFilterFieldKeys.numberRange, numberRange = _g[_h];
|
|
691
|
+
return isRangeFilteringMethod(filteringMethod) ? stringifyNumbersRange(numberRange) : [];
|
|
696
692
|
case EFormatTypes.DURATION:
|
|
697
|
-
var
|
|
693
|
+
var _j = formValues, _k = EFormulaFilterFieldKeys.numberRange, durationRange = _j[_k], _l = EFormulaFilterFieldKeys.durationUnit, durationUnit = _j[_l];
|
|
698
694
|
return isRangeFilteringMethod(filteringMethod)
|
|
699
695
|
? convertDurationRangeToSecond(durationRange, durationUnit)
|
|
700
|
-
: [
|
|
696
|
+
: [];
|
|
701
697
|
}
|
|
702
698
|
return [];
|
|
703
699
|
};
|
package/dist/index.js
CHANGED
|
@@ -157,8 +157,6 @@ exports.EFormulaFilterFieldKeys = void 0;
|
|
|
157
157
|
(function (EFormulaFilterFieldKeys) {
|
|
158
158
|
EFormulaFilterFieldKeys["date"] = "date";
|
|
159
159
|
EFormulaFilterFieldKeys["dateRange"] = "dateRange";
|
|
160
|
-
EFormulaFilterFieldKeys["duration"] = "duration";
|
|
161
|
-
EFormulaFilterFieldKeys["number"] = "number";
|
|
162
160
|
EFormulaFilterFieldKeys["numberRange"] = "numberRange";
|
|
163
161
|
EFormulaFilterFieldKeys["string"] = "string";
|
|
164
162
|
EFormulaFilterFieldKeys["lastTimeValue"] = "lastTimeValue";
|
|
@@ -690,15 +688,13 @@ var getFormulaFilterValues = function (filterValue) {
|
|
|
690
688
|
case exports.EFormatTypes.DAY_OF_MONTH:
|
|
691
689
|
case exports.EFormatTypes.WEEK:
|
|
692
690
|
case exports.EFormatTypes.HOUR:
|
|
693
|
-
var _g = formValues, _h = exports.EFormulaFilterFieldKeys.
|
|
694
|
-
return isRangeFilteringMethod(filteringMethod)
|
|
695
|
-
? stringifyNumbersRange(numberRange)
|
|
696
|
-
: [String(number !== null && number !== void 0 ? number : 0)];
|
|
691
|
+
var _g = formValues, _h = exports.EFormulaFilterFieldKeys.numberRange, numberRange = _g[_h];
|
|
692
|
+
return isRangeFilteringMethod(filteringMethod) ? stringifyNumbersRange(numberRange) : [];
|
|
697
693
|
case exports.EFormatTypes.DURATION:
|
|
698
|
-
var
|
|
694
|
+
var _j = formValues, _k = exports.EFormulaFilterFieldKeys.numberRange, durationRange = _j[_k], _l = exports.EFormulaFilterFieldKeys.durationUnit, durationUnit = _j[_l];
|
|
699
695
|
return isRangeFilteringMethod(filteringMethod)
|
|
700
696
|
? convertDurationRangeToSecond(durationRange, durationUnit)
|
|
701
|
-
: [
|
|
697
|
+
: [];
|
|
702
698
|
}
|
|
703
699
|
return [];
|
|
704
700
|
};
|