@infomaximum/widget-sdk 4.3.0-BI-13455-1 → 4.3.0-BI-13455-2

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 CHANGED
@@ -499,12 +499,16 @@ declare enum EFontWeight {
499
499
  NORMAL = "NORMAL",
500
500
  BOLD = "BOLD"
501
501
  }
502
- interface IAppearanceSettings {
503
- enabled?: boolean;
504
- horizontalPaddings?: string;
505
- verticalPaddings?: string;
506
- cornerRadius?: string;
502
+ interface IAppearanceEnabledSettings {
503
+ enabled: true;
504
+ horizontalPaddings: string | number;
505
+ verticalPaddings: string | number;
506
+ cornerRadius: string | number;
507
507
  }
508
+ interface IAppearanceDisabledSettings {
509
+ enabled: false;
510
+ }
511
+ type TAppearanceSettings = IAppearanceEnabledSettings | IAppearanceDisabledSettings;
508
512
 
509
513
  interface IWidgetTableColumn {
510
514
  /** Имя колонки */
@@ -644,6 +648,12 @@ type TColor = {
644
648
  };
645
649
  declare const getRuleColor: (ruleFormula: string, globalContext: Pick<IGlobalContext, "reportDisplayRules" | "workspaceDisplayRules">) => TColor | undefined;
646
650
  declare const isValidColor: (color: TColor, globalContext: Pick<IGlobalContext, "reportDisplayRules" | "workspaceDisplayRules">) => boolean;
651
+ declare const colors: string[];
652
+ /**
653
+ * Получить цвет по индексу элемента
654
+ * @param index - индекс элемента, которому требуется цвет
655
+ */
656
+ declare const getColorByIndex: (index: number) => string;
647
657
 
648
658
  interface IAutoIdentifiedArrayItem {
649
659
  /**
@@ -668,7 +678,7 @@ interface IBaseWidgetSettings {
668
678
  actions?: IWidgetAction[];
669
679
  displayCondition?: TDisplayCondition;
670
680
  displayConditionComment?: string;
671
- appearance?: IAppearanceSettings;
681
+ appearance?: TAppearanceSettings;
672
682
  }
673
683
 
674
684
  declare enum EWidgetActionInputMethod {
@@ -810,6 +820,10 @@ interface IWidgetAction extends IActionCommon {
810
820
  blockingCondition: {
811
821
  formula: string;
812
822
  };
823
+ buttonType: EActionButtonsTypes;
824
+ backgroundColor?: TColor;
825
+ borderColor?: TColor;
826
+ color: TColor;
813
827
  }
814
828
  type TAction = TActionsOnClick | IWidgetAction;
815
829
  type TActionValidator = (action: TAction) => boolean;
@@ -820,6 +834,11 @@ type TActionValidator = (action: TAction) => boolean;
820
834
  declare const isExecuteScriptActionValid: (action: Extract<TAction, {
821
835
  type: EActionTypes.EXECUTE_SCRIPT;
822
836
  }>, { scripts, tables, variables, systemVariables, }: Pick<IGlobalContext, "scripts" | "tables" | "variables" | "systemVariables">) => boolean;
837
+ declare enum EActionButtonsTypes {
838
+ LINK = "link",
839
+ BASE = "primary",
840
+ SECONDARY = "primary-outlined"
841
+ }
823
842
 
824
843
  declare enum ESortDirection {
825
844
  descend = "DESC",
@@ -1729,13 +1748,29 @@ interface IWidgetManifest {
1729
1748
  en: string;
1730
1749
  }>;
1731
1750
  /** Мажорная версия widget-sdk, использованная при разработке виджета */
1732
- sdk_version: number;
1751
+ sdk_version?: number;
1733
1752
  /** Путь до js-файла, который является входной точкой виджета */
1734
1753
  entry: string;
1735
1754
  /** Путь до иконки(svg или png) */
1736
1755
  icon?: string;
1737
1756
  /** Находится ли виджет на beta-стадии разработки */
1738
1757
  is_beta?: boolean;
1758
+ /** Размер колонки с виджетом */
1759
+ default_size?: {
1760
+ /** Минимальная высота колонки с виджетом (по умолчанию 70) */
1761
+ min_height?: number;
1762
+ /** Минимальная ширина колонки с виджетом (по умолчанию 180) */
1763
+ min_width?: number;
1764
+ };
1765
+ /** Параметры контейнера виджета */
1766
+ container_params?: {
1767
+ /** @deprecated необходимо использовать show_title */
1768
+ show_header?: boolean;
1769
+ /** Отображать ли системный заголовок виджета (по умолчанию false) */
1770
+ show_title?: boolean;
1771
+ /** Отображать ли markdown "описание" виджета (по умолчанию false) */
1772
+ show_markdown?: boolean;
1773
+ };
1739
1774
  }
1740
1775
  interface ICustomWidgetProps<WidgetSettings extends IBaseWidgetSettings = IBaseWidgetSettings> extends IWidgetProps<WidgetSettings> {
1741
1776
  /** Манифест виджета */
@@ -1916,4 +1951,4 @@ declare global {
1916
1951
  }
1917
1952
  }
1918
1953
 
1919
- export { EActionTypes, ECalculatorFilterMethods, EColorMode, EControlType, ECustomSelectTemplates, EDbType, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationUnit, EEventMeasureTemplateNames, EFontWeight, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureTemplateNames, EProcessFilterNames, ESelectOptionTypes, ESimpleDataType, 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 IAppearanceSettings, 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 ISelectOption, type ISelectSystemOption, 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 IViewInputValue, type IWidget, type IWidgetAction, type IWidgetColumnIndicator, type IWidgetDimension, type IWidgetDimensionHierarchy, type IWidgetEntity, type IWidgetFilter, type IWidgetFiltration, type IWidgetFormatting, type IWidgetIndicator, type IWidgetIndicatorAddButtonProps, type IWidgetManifest, type IWidgetMeasure, type IWidgetPersistValue, type IWidgetPlaceholderController, type IWidgetPlaceholderValues, type IWidgetProcess, type IWidgetProps, type IWidgetSortingIndicator, type IWidgetTable, type IWidgetTableColumn, type TAction, type TActionOnClickParameter, type TActionOpenView, type TActionValidator, type TActionsOnClick, type TAddButton, type TBoundedContentWithIndicator, type TColor, 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 TFiltrationMode, type TGroupLevelRecord, type TLaunchActionParams, type TMeasureAddButtonSelectOption, type TProcessIndicatorValue, type TRecordAccessor, type TSelectChildOptions, type TSelectFetchOptions, type TSelectivePartial, type TSortDirection, type TSystemVariable, type TUpdateSelection, type TValuePath, type TWidgetActionParameter, type TWidgetContainer, type TWidgetFilterValue, type TWidgetFiltering, type TWidgetLevelRecord, type TWidgetSortingValue, type TWidgetVariable, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, dashboardLinkRegExp, dimensionTemplateFormulas, escapeSpecialCharacters, eventMeasureTemplateFormulas, fillTemplateString, formattingConfig, formulaFilterMethods, generateColumnFormula, getDefaultSortOrders, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getLocalizedText, getMeasureFormula, getRuleColor, getTransitionMeasureFormula, isDimensionsHierarchy, isExecuteScriptActionValid, isFormulaFilterValue, isValidColor, linkNameRegExp, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs, measureTemplateFormulas, parseIndicatorLink, prepareSortOrders, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, transitionMeasureTemplateFormulas, unescapeSpecialCharacters, updateDefaultModeSelection, updateMultiModeSelection, updateSingleModeSelection, workspaceLinkRegExp };
1954
+ export { EActionButtonsTypes, EActionTypes, ECalculatorFilterMethods, EColorMode, EControlType, ECustomSelectTemplates, EDbType, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationUnit, EEventMeasureTemplateNames, EFontWeight, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureTemplateNames, EProcessFilterNames, ESelectOptionTypes, ESimpleDataType, 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 ISelectOption, type ISelectSystemOption, 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 IViewInputValue, type IWidget, type IWidgetAction, type IWidgetColumnIndicator, type IWidgetDimension, type IWidgetDimensionHierarchy, type IWidgetEntity, type IWidgetFilter, type IWidgetFiltration, type IWidgetFormatting, type IWidgetIndicator, type IWidgetIndicatorAddButtonProps, type IWidgetManifest, type IWidgetMeasure, type IWidgetPersistValue, type IWidgetPlaceholderController, type IWidgetPlaceholderValues, type IWidgetProcess, type IWidgetProps, type IWidgetSortingIndicator, type IWidgetTable, type IWidgetTableColumn, type TAction, type TActionOnClickParameter, type TActionOpenView, type TActionValidator, type TActionsOnClick, type TAddButton, type TAppearanceSettings, type TBoundedContentWithIndicator, type TColor, 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 TFiltrationMode, type TGroupLevelRecord, type TLaunchActionParams, type TMeasureAddButtonSelectOption, type TProcessIndicatorValue, type TRecordAccessor, type TSelectChildOptions, type TSelectFetchOptions, type TSelectivePartial, type TSortDirection, type TSystemVariable, type TUpdateSelection, type TValuePath, type TWidgetActionParameter, type TWidgetContainer, type TWidgetFilterValue, type TWidgetFiltering, 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, isExecuteScriptActionValid, isFormulaFilterValue, isValidColor, linkNameRegExp, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs, measureTemplateFormulas, parseIndicatorLink, prepareSortOrders, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, transitionMeasureTemplateFormulas, unescapeSpecialCharacters, updateDefaultModeSelection, updateMultiModeSelection, updateSingleModeSelection, workspaceLinkRegExp };
package/dist/index.esm.js CHANGED
@@ -82,6 +82,12 @@ var isExecuteScriptActionValid = function (action, _a) {
82
82
  return true;
83
83
  });
84
84
  };
85
+ var EActionButtonsTypes;
86
+ (function (EActionButtonsTypes) {
87
+ EActionButtonsTypes["LINK"] = "link";
88
+ EActionButtonsTypes["BASE"] = "primary";
89
+ EActionButtonsTypes["SECONDARY"] = "primary-outlined";
90
+ })(EActionButtonsTypes || (EActionButtonsTypes = {}));
85
91
 
86
92
  var ESimpleDataType;
87
93
  (function (ESimpleDataType) {
@@ -1347,5 +1353,50 @@ var isValidColor = function (color, globalContext) {
1347
1353
  }
1348
1354
  return true;
1349
1355
  };
1356
+ var colors = [
1357
+ "#222F3E",
1358
+ "#00D2D3",
1359
+ "#5F27CD",
1360
+ "#FECA57",
1361
+ "#078936",
1362
+ "#E51320",
1363
+ "#96AABF",
1364
+ "#1C55E7",
1365
+ "#341F97",
1366
+ "#FFDD59",
1367
+ "#D82C46",
1368
+ "#0BE881",
1369
+ "#0ABDE3",
1370
+ "#FF9F43",
1371
+ "#EC41D4",
1372
+ "#117F8E",
1373
+ "#B9B9B9",
1374
+ "#505BF1",
1375
+ "#64FFB6",
1376
+ "#485460",
1377
+ "#FFD32A",
1378
+ "#C74E1A",
1379
+ "#6E70A6",
1380
+ "#3C40C6",
1381
+ "#48DBFB",
1382
+ "#486179",
1383
+ "#FF9FF3",
1384
+ "#1DD1A1",
1385
+ "#BCC8D4",
1386
+ "#BA46AA",
1387
+ ];
1388
+ /**
1389
+ * Получить цвет по индексу элемента
1390
+ * @param index - индекс элемента, которому требуется цвет
1391
+ */
1392
+ var getColorByIndex = function (index) {
1393
+ var colorsLength = colors.length;
1394
+ var countTurns = Math.trunc(index / colorsLength);
1395
+ var color = colors[index - colorsLength * countTurns];
1396
+ if (!color) {
1397
+ throw new Error("Не удалось автоматически определить цвет, возможно палитра цветов пуста.");
1398
+ }
1399
+ return color;
1400
+ };
1350
1401
 
1351
- export { EActionTypes, ECalculatorFilterMethods, EColorMode, EControlType, ECustomSelectTemplates, EDbType, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationUnit, EEventMeasureTemplateNames, EFontWeight, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureTemplateNames, EProcessFilterNames, ESelectOptionTypes, ESimpleDataType, ESortDirection, ESortingValueModes, ESystemRecordKey, ETransitionMeasureTemplateNames, EUnitMode, EViewMode, EViewOpenIn, EWidgetActionInputMethod, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, dashboardLinkRegExp, dimensionTemplateFormulas, escapeSpecialCharacters, eventMeasureTemplateFormulas, fillTemplateString, formattingConfig, formulaFilterMethods, generateColumnFormula, getDefaultSortOrders, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getLocalizedText, getMeasureFormula, getRuleColor, getTransitionMeasureFormula, isDimensionsHierarchy, isExecuteScriptActionValid, isFormulaFilterValue, isValidColor, linkNameRegExp, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs, measureTemplateFormulas, parseIndicatorLink, prepareSortOrders, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, transitionMeasureTemplateFormulas, unescapeSpecialCharacters, updateDefaultModeSelection, updateMultiModeSelection, updateSingleModeSelection, workspaceLinkRegExp };
1402
+ export { EActionButtonsTypes, EActionTypes, ECalculatorFilterMethods, EColorMode, EControlType, ECustomSelectTemplates, EDbType, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationUnit, EEventMeasureTemplateNames, EFontWeight, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureTemplateNames, EProcessFilterNames, ESelectOptionTypes, ESimpleDataType, ESortDirection, ESortingValueModes, ESystemRecordKey, ETransitionMeasureTemplateNames, EUnitMode, EViewMode, EViewOpenIn, EWidgetActionInputMethod, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, colors, dashboardLinkRegExp, dimensionTemplateFormulas, escapeSpecialCharacters, eventMeasureTemplateFormulas, fillTemplateString, formattingConfig, formulaFilterMethods, generateColumnFormula, getColorByIndex, getDefaultSortOrders, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getLocalizedText, getMeasureFormula, getRuleColor, getTransitionMeasureFormula, isDimensionsHierarchy, isExecuteScriptActionValid, isFormulaFilterValue, isValidColor, linkNameRegExp, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs, measureTemplateFormulas, parseIndicatorLink, prepareSortOrders, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, transitionMeasureTemplateFormulas, unescapeSpecialCharacters, updateDefaultModeSelection, updateMultiModeSelection, updateSingleModeSelection, workspaceLinkRegExp };
package/dist/index.js CHANGED
@@ -83,6 +83,12 @@ var isExecuteScriptActionValid = function (action, _a) {
83
83
  return true;
84
84
  });
85
85
  };
86
+ exports.EActionButtonsTypes = void 0;
87
+ (function (EActionButtonsTypes) {
88
+ EActionButtonsTypes["LINK"] = "link";
89
+ EActionButtonsTypes["BASE"] = "primary";
90
+ EActionButtonsTypes["SECONDARY"] = "primary-outlined";
91
+ })(exports.EActionButtonsTypes || (exports.EActionButtonsTypes = {}));
86
92
 
87
93
  exports.ESimpleDataType = void 0;
88
94
  (function (ESimpleDataType) {
@@ -1348,6 +1354,51 @@ var isValidColor = function (color, globalContext) {
1348
1354
  }
1349
1355
  return true;
1350
1356
  };
1357
+ var colors = [
1358
+ "#222F3E",
1359
+ "#00D2D3",
1360
+ "#5F27CD",
1361
+ "#FECA57",
1362
+ "#078936",
1363
+ "#E51320",
1364
+ "#96AABF",
1365
+ "#1C55E7",
1366
+ "#341F97",
1367
+ "#FFDD59",
1368
+ "#D82C46",
1369
+ "#0BE881",
1370
+ "#0ABDE3",
1371
+ "#FF9F43",
1372
+ "#EC41D4",
1373
+ "#117F8E",
1374
+ "#B9B9B9",
1375
+ "#505BF1",
1376
+ "#64FFB6",
1377
+ "#485460",
1378
+ "#FFD32A",
1379
+ "#C74E1A",
1380
+ "#6E70A6",
1381
+ "#3C40C6",
1382
+ "#48DBFB",
1383
+ "#486179",
1384
+ "#FF9FF3",
1385
+ "#1DD1A1",
1386
+ "#BCC8D4",
1387
+ "#BA46AA",
1388
+ ];
1389
+ /**
1390
+ * Получить цвет по индексу элемента
1391
+ * @param index - индекс элемента, которому требуется цвет
1392
+ */
1393
+ var getColorByIndex = function (index) {
1394
+ var colorsLength = colors.length;
1395
+ var countTurns = Math.trunc(index / colorsLength);
1396
+ var color = colors[index - colorsLength * countTurns];
1397
+ if (!color) {
1398
+ throw new Error("Не удалось автоматически определить цвет, возможно палитра цветов пуста.");
1399
+ }
1400
+ return color;
1401
+ };
1351
1402
 
1352
1403
  Object.defineProperty(exports, "ELanguages", {
1353
1404
  enumerable: true,
@@ -1360,6 +1411,7 @@ Object.defineProperty(exports, "EFilteringMethodValues", {
1360
1411
  exports.bindContentWithIndicator = bindContentWithIndicator;
1361
1412
  exports.bindContentsWithIndicators = bindContentsWithIndicators;
1362
1413
  exports.checkDisplayCondition = checkDisplayCondition;
1414
+ exports.colors = colors;
1363
1415
  exports.dashboardLinkRegExp = dashboardLinkRegExp;
1364
1416
  exports.dimensionTemplateFormulas = dimensionTemplateFormulas;
1365
1417
  exports.escapeSpecialCharacters = escapeSpecialCharacters;
@@ -1368,6 +1420,7 @@ exports.fillTemplateString = fillTemplateString;
1368
1420
  exports.formattingConfig = formattingConfig;
1369
1421
  exports.formulaFilterMethods = formulaFilterMethods;
1370
1422
  exports.generateColumnFormula = generateColumnFormula;
1423
+ exports.getColorByIndex = getColorByIndex;
1371
1424
  exports.getDefaultSortOrders = getDefaultSortOrders;
1372
1425
  exports.getDimensionFormula = getDimensionFormula;
1373
1426
  exports.getDisplayConditionFormula = getDisplayConditionFormula;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infomaximum/widget-sdk",
3
- "version": "4.3.0-BI-13455-1",
3
+ "version": "4.3.0-BI-13455-2",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",