mdt-client 31.3.13 → 31.3.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mdt-client",
3
- "version": "31.3.13",
3
+ "version": "31.3.14",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -33,6 +33,10 @@ export interface Field extends Record {
33
33
  multiple?: boolean;
34
34
  refFilter?: Valued<IFilter>;
35
35
  validate?: Function;
36
+ /**
37
+ * Флаг, указывающий, что поле скрыто по умолчанию в списке и на форме
38
+ */
39
+ flagHiddenByDefault?: boolean;
36
40
  min?: number;
37
41
  max?: number;
38
42
  dynamicFkObjectPath?: string;
@@ -5,6 +5,7 @@ import { Field } from "../../../../common/Field";
5
5
  import { IButton } from "../../../../views/form/controls/monacoEditor/jsonSchemas/Button.schema";
6
6
  import { IObjectFacade } from "../schema/IObjectFacade";
7
7
  import { IFormControlFacade } from "./IFormControlFacade";
8
+ import { FieldPhysicalType } from "../schema/ISchemaFacade";
8
9
  export declare type ActionButton = IButton & {
9
10
  /** Всплывающая подсказка */
10
11
  description?: Valued<FormattedText>;
@@ -54,6 +55,12 @@ export interface FormViewSettings {
54
55
  hideSubTitle?: boolean;
55
56
  hideTitle?: boolean;
56
57
  }
58
+ export declare type ObjectManagementField = {
59
+ code: string;
60
+ title: string;
61
+ type: FieldPhysicalType;
62
+ module?: string;
63
+ };
57
64
  export interface IFormServiceFacade {
58
65
  /** Создать форму, привязанную объекту */
59
66
  create(tableCode: string, id?: RecordId, options?: any, extOptions?: any): IFormControlFacade;
@@ -100,6 +100,9 @@ export interface ILegacyFacade {
100
100
  FilterSettings: any;
101
101
  TextFieldCtrl: any;
102
102
  QuickFilterPipelines: any;
103
+ uiComponents: {
104
+ alert: any;
105
+ };
103
106
  }
104
107
  export interface ModulesLegacyFacade {
105
108
  pbi?: {
@@ -26,6 +26,8 @@ export interface IListControlFacade extends ParentCtrl {
26
26
  addCommand(command: ButtonFacade): void;
27
27
  /** Установить фильтр на список */
28
28
  setFilter(filter: IFilter | null, options?: FilterSetterOptions, key?: string): void;
29
+ /** Подписаться на событие обновления фильтра */
30
+ onFilterUpdated(callback: (data: FilterUpdatedData) => void): void;
29
31
  /** Обновить данные списка */
30
32
  refresh(): PromiseLike<unknown>;
31
33
  /** Изменить отображение строк списка */
@@ -75,3 +77,12 @@ export interface IColumnValueHandlerCtx {
75
77
  col: ILayoutColumnBase;
76
78
  idx?: number;
77
79
  }
80
+ export interface FilterUpdatedData {
81
+ /** Ключ фильтра */
82
+ key: string;
83
+ /**
84
+ * Объект фильтра
85
+ * Если фильтр удаляется, filter будет undefined
86
+ */
87
+ filter?: IFilter;
88
+ }
@@ -1,5 +1,8 @@
1
1
  import { IObjectFacade } from "./IObjectFacade";
2
+ declare const allFieldPhysicalTypes: readonly ["bigint", "binary", "bit", "char", "date", "datetime", "datetime2", "datetimeoffset", "decimal", "float", "geography", "geometry", "hierarchyid", "image", "int", "money", "nchar", "ntext", "numeric", "nvarchar", "real", "smalldatetime", "smallint", "smallmoney", "sql_variant", "sysname", "text", "time", "timestamp", "tinyint", "uniqueidentifier", "varbinary", "varchar", "xml"];
3
+ export declare type FieldPhysicalType = typeof allFieldPhysicalTypes[number];
2
4
  export interface ISchemaFacade {
3
5
  /** Получить объект по коду или по ID */
4
6
  getObject(idOrCode: string | number, check?: boolean): IObjectFacade;
5
7
  }
8
+ export {};
@@ -1,3 +1,9 @@
1
+ declare type MdtChartsDataRow = Record<string, any>;
2
+ declare type TitleFunctionParams = {
3
+ data: MdtChartsDataRow[];
4
+ };
5
+ declare type TitleFunction = (params: TitleFunctionParams) => string;
6
+ declare type Title = string | TitleFunction;
1
7
  export declare type Orientation = "horizontal" | "vertical";
2
8
  declare type AxisPosition = "start" | "end";
3
9
  export declare type AxisLabelPosition = "vertical" | "horizontal";
@@ -231,7 +237,7 @@ interface GraphicChartBlockOptions extends BaseChartBlockOptions {
231
237
  /**
232
238
  * @title Заголовок диаграммы
233
239
  */
234
- title?: string;
240
+ title?: Title;
235
241
  /**
236
242
  * @title Наименование поля-ключа
237
243
  */
@@ -319,6 +325,7 @@ interface TwoDimensionalChartOptions {
319
325
  * @title Наименования отображаемых полей-значений
320
326
  */
321
327
  valueFields: TwoDimensionalValueField[];
328
+ secondaryValue?: boolean;
322
329
  };
323
330
  /**
324
331
  * @title Отображение диаграммы в сегментированном виде