@infomaximum/widget-sdk 4.0.0-beta4 → 4.0.0-beta7

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
@@ -34,7 +34,8 @@ declare enum EControlType {
34
34
  eventsColor = "eventsColor",
35
35
  inputMarkdown = "inputMarkdown",
36
36
  filter = "filter",
37
- actionOnClick = "actionOnClick"
37
+ actionOnClick = "actionOnClick",
38
+ eventsPicker = "eventsPicker"
38
39
  }
39
40
  /** Конфигурация элемента управления настройкой */
40
41
  interface IControlRecord<Settings extends object, Value, ControlType = EControlType> {
@@ -260,6 +261,7 @@ declare enum EDurationUnit {
260
261
  declare const mapFormulaFilterToCalculatorInput: (filterValue: IFormulaFilterValue | string) => TNullable<ICalculatorFilter>;
261
262
  declare const mapFormulaFiltersToInputs: (filters: (string | IFormulaFilterValue)[]) => ICalculatorFilter[];
262
263
 
264
+ type TSelectivePartial<T, Keys extends keyof T> = Omit<T, Keys> & Partial<Pick<T, Keys>>;
263
265
  declare const formulaFilterMethods: {
264
266
  readonly LAST_TIME: "LAST_TIME";
265
267
  readonly EQUAL_TO: ECalculatorFilterMethods.EQUAL_TO;
@@ -289,6 +291,7 @@ declare enum EProcessFilterNames {
289
291
  /** Длительность перехода */
290
292
  durationOfTransition = "durationOfTransition"
291
293
  }
294
+ /** @deprecated необходимо использовать @see {@link IFormulaFilterValue} */
292
295
  interface IWidgetFormulaFilterValue extends ICalculatorFilter {
293
296
  /**
294
297
  * Название фильтра
@@ -329,15 +332,6 @@ interface IAddPresenceOfTransitionFilter {
329
332
  interface IAddDurationOfTransitionFilter {
330
333
  (name: EProcessFilterNames.durationOfTransition, value: IProcessTransitionFilterValue): void;
331
334
  }
332
- interface IWidgetFiltration {
333
- /** Значения фильтров, подготовленные для передачи в вычислитель */
334
- preparedFilterValues: ICalculatorFilter[];
335
- /** Добавить фильтр по формуле */
336
- addFormulaFilter(value: IWidgetFormulaFilterValue): void;
337
- /** Удалить фильтр по формуле */
338
- removeFormulaFilter(formula: string): void;
339
- addProcessFilter(...args: Parameters<IAddPresenceOfEventFilter> | Parameters<IAddRepetitionOfEventFilter> | Parameters<IAddPresenceOfTransitionFilter> | Parameters<IAddDurationOfTransitionFilter>): void;
340
- }
341
335
  declare enum EFormulaFilterFieldKeys {
342
336
  date = "date",
343
337
  dateRange = "dateRange",
@@ -361,7 +355,7 @@ interface IFormulaFilterValue {
361
355
  /** Метод фильтрации */
362
356
  filteringMethod: valueof<typeof formulaFilterMethods>;
363
357
  /** Выбранные в списке значения в виде моделей */
364
- checkedValues: string[];
358
+ checkedValues: (string | null)[];
365
359
  /** Значения полей формы редактора */
366
360
  formValues: Partial<{
367
361
  [EFormulaFilterFieldKeys.date]: string | null;
@@ -375,6 +369,40 @@ interface IFormulaFilterValue {
375
369
  [EFormulaFilterFieldKeys.durationUnit]: EDurationUnit;
376
370
  }>;
377
371
  }
372
+ interface IStagesFilterItem {
373
+ /** Название этапа */
374
+ name: string;
375
+ /** Формула фильтра этапа */
376
+ formula: string;
377
+ isSelected: boolean;
378
+ }
379
+ interface IStagesFilterValue {
380
+ /** Ключ виджета */
381
+ widgetKey: string;
382
+ /** Заголовок фильтра */
383
+ name: TNullable<string>;
384
+ /** Этапы */
385
+ stages: IStagesFilterItem[];
386
+ }
387
+ type TWidgetFilterValue = IFormulaFilterValue | IStagesFilterValue | IProcessEventFilterValue | IProcessTransitionFilterValue;
388
+ interface IWidgetFilter {
389
+ filterValue: TWidgetFilterValue;
390
+ preparedFilterValue: ICalculatorFilter;
391
+ }
392
+ interface IWidgetFiltration {
393
+ /** Значения фильтров, подготовленные для передачи в вычислитель */
394
+ preparedFilterValues: ICalculatorFilter[];
395
+ filters: IWidgetFilter[];
396
+ /** Добавить фильтр по формуле */
397
+ addFormulaFilter(value: IWidgetFormulaFilterValue | TSelectivePartial<IFormulaFilterValue, "format" | "formValues">): void;
398
+ /** Удалить фильтр по формуле */
399
+ removeFormulaFilter(formula: string): void;
400
+ addProcessFilter(...args: Parameters<IAddPresenceOfEventFilter> | Parameters<IAddRepetitionOfEventFilter> | Parameters<IAddPresenceOfTransitionFilter> | Parameters<IAddDurationOfTransitionFilter>): void;
401
+ /** Добавить фильтр по этапам */
402
+ addStagesFilter(value: Omit<IStagesFilterValue, "widgetKey">): void;
403
+ /** Удалить фильтр по этапам */
404
+ removeStagesFilter(widgetKey: string): void;
405
+ }
378
406
 
379
407
  declare enum EWidgetFilterMode {
380
408
  DEFAULT = "DEFAULT",
@@ -1352,4 +1380,4 @@ declare global {
1352
1380
  }
1353
1381
  }
1354
1382
 
1355
- export { ECalculatorFilterMethods, EColorMode, EControlType, EDbType, EDimensionTemplateNames, EDisplayConditionMode, EDurationUnit, EEventMeasureTemplateNames, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMeasureTemplateNames, EProcessFilterNames, ESimpleDataType, ESortDirection, ESortingValueModes, ETransitionMeasureTemplateNames, EWidgetActionInputMode, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, type IActionScript, 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 ICommonColumnIndicator, type IControlRecord, type ICustomAddButtonProps, type ICustomWidgetProps, type IDefinition, type IDimensionSelection, type IDimensionSelectionByFormula, type IDisplayPredicate, 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 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 ITwoLimitsCalculator, type ITwoLimitsCalculatorExportInput, type ITwoLimitsCalculatorInput, type ITwoLimitsCalculatorOutput, type ITypeCalculator, type ITypeCalculatorInput, type ITypeCalculatorOutput, type IVertex, type IWidget, type IWidgetAction, type IWidgetActionInput, type IWidgetColumnIndicator, type IWidgetDimension, type IWidgetDimensionHierarchy, type IWidgetEntity, type IWidgetFiltration, type IWidgetFormatting, type IWidgetFormulaFilterValue, type IWidgetIndicator, type IWidgetMeasure, type IWidgetPlaceholderController, type IWidgetProcess, type IWidgetProps, type IWidgetSortingIndicator, type IWidgetTable, type IWidgetTableColumn, type IWidgetsContext, type TBoundedContentWithIndicator, type TColor, type TColumnIndicatorValue, type TDefineWidgetOptions, type TDisplayCondition, type TDisplayMode, type TEmptyRecord, type TGroupLevelRecord, type TLaunchActionParams, type TProcessIndicatorValue, type TRecordAccessor, type TSortDirection, type TUpdateSelection, type TValuePath, type TWidgetActionInputValue, type TWidgetContainer, 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, mapVariablesToInputs, measureTemplateFormulas, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, transitionMeasureTemplateFormulas, updateDefaultModeSelection, updateMultiModeSelection, updateSingleModeSelection };
1383
+ export { ECalculatorFilterMethods, EColorMode, EControlType, EDbType, EDimensionTemplateNames, EDisplayConditionMode, EDurationUnit, EEventMeasureTemplateNames, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EIndicatorType, ELastTimeUnit, EMeasureTemplateNames, EProcessFilterNames, ESimpleDataType, ESortDirection, ESortingValueModes, ETransitionMeasureTemplateNames, EWidgetActionInputMode, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, type IActionScript, 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 ICommonColumnIndicator, type IControlRecord, type ICustomAddButtonProps, type ICustomWidgetProps, type IDefinition, type IDimensionSelection, type IDimensionSelectionByFormula, type IDisplayPredicate, 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 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 IStagesFilterValue, type ITwoLimitsCalculator, type ITwoLimitsCalculatorExportInput, type ITwoLimitsCalculatorInput, type ITwoLimitsCalculatorOutput, type ITypeCalculator, type ITypeCalculatorInput, type ITypeCalculatorOutput, type IVertex, type IWidget, type IWidgetAction, type IWidgetActionInput, type IWidgetColumnIndicator, type IWidgetDimension, type IWidgetDimensionHierarchy, type IWidgetEntity, type IWidgetFilter, type IWidgetFiltration, type IWidgetFormatting, type IWidgetFormulaFilterValue, type IWidgetIndicator, type IWidgetMeasure, type IWidgetPlaceholderController, type IWidgetProcess, type IWidgetProps, type IWidgetSortingIndicator, type IWidgetTable, type IWidgetTableColumn, type IWidgetsContext, type TBoundedContentWithIndicator, type TColor, type TColumnIndicatorValue, type TDefineWidgetOptions, type TDisplayCondition, type TDisplayMode, type TEmptyRecord, 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, mapVariablesToInputs, measureTemplateFormulas, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, transitionMeasureTemplateFormulas, updateDefaultModeSelection, updateMultiModeSelection, updateSingleModeSelection };
package/dist/index.esm.js CHANGED
@@ -941,6 +941,7 @@ var EControlType;
941
941
  EControlType["inputMarkdown"] = "inputMarkdown";
942
942
  EControlType["filter"] = "filter";
943
943
  EControlType["actionOnClick"] = "actionOnClick";
944
+ EControlType["eventsPicker"] = "eventsPicker";
944
945
  })(EControlType || (EControlType = {}));
945
946
 
946
947
  var ESortDirection;
package/dist/index.js CHANGED
@@ -942,6 +942,7 @@ exports.EControlType = void 0;
942
942
  EControlType["inputMarkdown"] = "inputMarkdown";
943
943
  EControlType["filter"] = "filter";
944
944
  EControlType["actionOnClick"] = "actionOnClick";
945
+ EControlType["eventsPicker"] = "eventsPicker";
945
946
  })(exports.EControlType || (exports.EControlType = {}));
946
947
 
947
948
  exports.ESortDirection = void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infomaximum/widget-sdk",
3
- "version": "4.0.0-beta4",
3
+ "version": "4.0.0-beta7",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",