@infomaximum/widget-sdk 6.0.0-view-theme.17 → 6.0.0-view-theme.19
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 +22 -0
- package/dist/index.d.ts +69 -66
- package/dist/index.esm.js +67 -20
- package/dist/index.js +68 -21
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,28 @@
|
|
|
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
|
+
## [6.0.0-view-theme.19](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-view-theme.18...v6.0.0-view-theme.19) (2026-01-15)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ⚠ BREAKING CHANGES
|
|
9
|
+
|
|
10
|
+
* вместо удаленной функции в виджетах требуется использовать функцию fillTemplateSql
|
|
11
|
+
* требуется поддержка в виджетах
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* в схему формулы добавлена мета-информация о типе сущности ([45cb47f](https://github.com/Infomaximum/widget-sdk/commit/45cb47f79414d47c27529f4506bc507fee2d07cc))
|
|
16
|
+
* из типа линзы убраны TNullable и Partial ([8f85239](https://github.com/Infomaximum/widget-sdk/commit/8f852393700b4914645eb6110fda3b55329cb83f))
|
|
17
|
+
* метод createSettingsSchema сделан обязательным, а метод fillSettings - необязательным ([d0734a8](https://github.com/Infomaximum/widget-sdk/commit/d0734a8319e5abd96863ed345f35678170c0c0e3))
|
|
18
|
+
* удалена функция fillTemplateString ([43a051d](https://github.com/Infomaximum/widget-sdk/commit/43a051dc6cdff3d774b06fe2e63f454b9f90a4d6))
|
|
19
|
+
|
|
20
|
+
## [6.0.0-view-theme.18](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-view-theme.17...v6.0.0-view-theme.18) (2026-01-13)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
* изменен api миграций ([ab086c6](https://github.com/Infomaximum/widget-sdk/commit/ab086c6c22ef489059b9a5ae01460af91b6f4782))
|
|
26
|
+
|
|
5
27
|
## [6.0.0-view-theme.17](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-view-theme.16...v6.0.0-view-theme.17) (2025-12-18)
|
|
6
28
|
|
|
7
29
|
## [6.0.0-view-theme.16](https://github.com/Infomaximum/widget-sdk/compare/v6.0.0-18...v6.0.0-view-theme.16) (2025-12-16)
|
package/dist/index.d.ts
CHANGED
|
@@ -897,12 +897,7 @@ declare const DisplayConditionSchema: (z: TZod) => zod.ZodDefault<zod.ZodDiscrim
|
|
|
897
897
|
declare const KeyNullableSchema: (z: TZod) => zod.ZodDefault<zod.ZodNullable<zod.ZodString>>;
|
|
898
898
|
/** Схема имени сущности (с возможностью находиться в неинициализированном состоянии) */
|
|
899
899
|
declare const NameNullableSchema: (z: TZod) => zod.ZodDefault<zod.ZodNullable<zod.ZodString>>;
|
|
900
|
-
/**
|
|
901
|
-
* Схема формулы
|
|
902
|
-
*
|
|
903
|
-
* @note в будущем к схеме будет привязана мета-информация для того,
|
|
904
|
-
* чтобы система видела расположение формул в настройках
|
|
905
|
-
*/
|
|
900
|
+
/** Схема формулы */
|
|
906
901
|
declare const FormulaSchema: (z: TZod) => zod.ZodDefault<zod.ZodString>;
|
|
907
902
|
/**
|
|
908
903
|
* Схема формулы, которая не может быть пустой строкой, но может быть в
|
|
@@ -955,10 +950,10 @@ declare const WidgetIndicatorSchema: (z: TZod) => zod.ZodObject<{
|
|
|
955
950
|
id: zod.ZodPipe<zod.ZodDefault<zod.ZodNumber>, zod.ZodTransform<number, number>>;
|
|
956
951
|
name: zod.ZodString;
|
|
957
952
|
}, zod_v4_core.$strip>;
|
|
958
|
-
declare const FormatSchema: (z: TZod) => zod.ZodObject<{
|
|
953
|
+
declare const FormatSchema: (z: TZod) => zod.ZodDefault<zod.ZodObject<{
|
|
954
|
+
mode: zod.ZodEnum<typeof EFormatOrFormattingMode>;
|
|
959
955
|
value: zod.ZodOptional<zod.ZodEnum<typeof EFormatTypes>>;
|
|
960
|
-
|
|
961
|
-
}, zod_v4_core.$strip>;
|
|
956
|
+
}, zod_v4_core.$strip>>;
|
|
962
957
|
declare const FormattingSchema: (z: TZod) => zod.ZodDefault<zod.ZodDiscriminatedUnion<[zod.ZodObject<{
|
|
963
958
|
mode: zod.ZodLiteral<EFormatOrFormattingMode.BASE>;
|
|
964
959
|
value: zod.ZodDefault<zod.ZodEnum<typeof EFormattingPresets>>;
|
|
@@ -970,10 +965,10 @@ declare const WidgetColumnIndicatorSchema: (z: TZod) => zod.ZodObject<{
|
|
|
970
965
|
id: zod.ZodPipe<zod.ZodDefault<zod.ZodNumber>, zod.ZodTransform<number, number>>;
|
|
971
966
|
name: zod.ZodString;
|
|
972
967
|
dbDataType: zod.ZodOptional<zod.ZodString>;
|
|
973
|
-
format: zod.ZodOptional<zod.ZodObject<{
|
|
968
|
+
format: zod.ZodOptional<zod.ZodDefault<zod.ZodObject<{
|
|
969
|
+
mode: zod.ZodEnum<typeof EFormatOrFormattingMode>;
|
|
974
970
|
value: zod.ZodOptional<zod.ZodEnum<typeof EFormatTypes>>;
|
|
975
|
-
|
|
976
|
-
}, zod_v4_core.$strip>>;
|
|
971
|
+
}, zod_v4_core.$strip>>>;
|
|
977
972
|
formatting: zod.ZodOptional<zod.ZodDefault<zod.ZodDiscriminatedUnion<[zod.ZodObject<{
|
|
978
973
|
mode: zod.ZodLiteral<EFormatOrFormattingMode.BASE>;
|
|
979
974
|
value: zod.ZodDefault<zod.ZodEnum<typeof EFormattingPresets>>;
|
|
@@ -1631,10 +1626,10 @@ declare const WidgetDimensionSchema: (z: TZod) => zod.ZodObject<{
|
|
|
1631
1626
|
id: zod.ZodPipe<zod.ZodDefault<zod.ZodNumber>, zod.ZodTransform<number, number>>;
|
|
1632
1627
|
name: zod.ZodString;
|
|
1633
1628
|
dbDataType: zod.ZodOptional<zod.ZodString>;
|
|
1634
|
-
format: zod.ZodOptional<zod.ZodObject<{
|
|
1629
|
+
format: zod.ZodOptional<zod.ZodDefault<zod.ZodObject<{
|
|
1630
|
+
mode: zod.ZodEnum<typeof EFormatOrFormattingMode>;
|
|
1635
1631
|
value: zod.ZodOptional<zod.ZodEnum<typeof EFormatTypes>>;
|
|
1636
|
-
|
|
1637
|
-
}, zod_v4_core.$strip>>;
|
|
1632
|
+
}, zod_v4_core.$strip>>>;
|
|
1638
1633
|
formatting: zod.ZodOptional<zod.ZodDefault<zod.ZodDiscriminatedUnion<[zod.ZodObject<{
|
|
1639
1634
|
mode: zod.ZodLiteral<EFormatOrFormattingMode.BASE>;
|
|
1640
1635
|
value: zod.ZodDefault<zod.ZodEnum<typeof EFormattingPresets>>;
|
|
@@ -2200,10 +2195,10 @@ declare const WidgetDimensionSchema: (z: TZod) => zod.ZodObject<{
|
|
|
2200
2195
|
}, zod_v4_core.$strip>;
|
|
2201
2196
|
declare const WidgetDimensionInHierarchySchema: (z: TZod) => zod.ZodObject<{
|
|
2202
2197
|
dbDataType: zod.ZodOptional<zod.ZodString>;
|
|
2203
|
-
format: zod.ZodOptional<zod.ZodObject<{
|
|
2198
|
+
format: zod.ZodOptional<zod.ZodDefault<zod.ZodObject<{
|
|
2199
|
+
mode: zod.ZodEnum<typeof EFormatOrFormattingMode>;
|
|
2204
2200
|
value: zod.ZodOptional<zod.ZodEnum<typeof EFormatTypes>>;
|
|
2205
|
-
|
|
2206
|
-
}, zod_v4_core.$strip>>;
|
|
2201
|
+
}, zod_v4_core.$strip>>>;
|
|
2207
2202
|
id: zod.ZodPipe<zod.ZodDefault<zod.ZodNumber>, zod.ZodTransform<number, number>>;
|
|
2208
2203
|
value: zod.ZodOptional<zod.ZodDiscriminatedUnion<[zod.ZodDiscriminatedUnion<[zod.ZodObject<{
|
|
2209
2204
|
mode: zod.ZodLiteral<EWidgetIndicatorValueModes.FORMULA>;
|
|
@@ -3922,10 +3917,10 @@ declare const WidgetMeasureSchema: (z: TZod) => zod.ZodObject<{
|
|
|
3922
3917
|
id: zod.ZodPipe<zod.ZodDefault<zod.ZodNumber>, zod.ZodTransform<number, number>>;
|
|
3923
3918
|
name: zod.ZodString;
|
|
3924
3919
|
dbDataType: zod.ZodOptional<zod.ZodString>;
|
|
3925
|
-
format: zod.ZodOptional<zod.ZodObject<{
|
|
3920
|
+
format: zod.ZodOptional<zod.ZodDefault<zod.ZodObject<{
|
|
3921
|
+
mode: zod.ZodEnum<typeof EFormatOrFormattingMode>;
|
|
3926
3922
|
value: zod.ZodOptional<zod.ZodEnum<typeof EFormatTypes>>;
|
|
3927
|
-
|
|
3928
|
-
}, zod_v4_core.$strip>>;
|
|
3923
|
+
}, zod_v4_core.$strip>>>;
|
|
3929
3924
|
formatting: zod.ZodOptional<zod.ZodDefault<zod.ZodDiscriminatedUnion<[zod.ZodObject<{
|
|
3930
3925
|
mode: zod.ZodLiteral<EFormatOrFormattingMode.BASE>;
|
|
3931
3926
|
value: zod.ZodDefault<zod.ZodEnum<typeof EFormattingPresets>>;
|
|
@@ -4623,10 +4618,10 @@ declare const MarkdownMeasureSchema: (z: TZod) => zod.ZodObject<{
|
|
|
4623
4618
|
id: zod.ZodPipe<zod.ZodDefault<zod.ZodNumber>, zod.ZodTransform<number, number>>;
|
|
4624
4619
|
name: zod.ZodString;
|
|
4625
4620
|
dbDataType: zod.ZodOptional<zod.ZodString>;
|
|
4626
|
-
format: zod.ZodOptional<zod.ZodObject<{
|
|
4621
|
+
format: zod.ZodOptional<zod.ZodDefault<zod.ZodObject<{
|
|
4622
|
+
mode: zod.ZodEnum<typeof EFormatOrFormattingMode>;
|
|
4627
4623
|
value: zod.ZodOptional<zod.ZodEnum<typeof EFormatTypes>>;
|
|
4628
|
-
|
|
4629
|
-
}, zod_v4_core.$strip>>;
|
|
4624
|
+
}, zod_v4_core.$strip>>>;
|
|
4630
4625
|
formatting: zod.ZodOptional<zod.ZodDefault<zod.ZodDiscriminatedUnion<[zod.ZodObject<{
|
|
4631
4626
|
mode: zod.ZodLiteral<EFormatOrFormattingMode.BASE>;
|
|
4632
4627
|
value: zod.ZodDefault<zod.ZodEnum<typeof EFormattingPresets>>;
|
|
@@ -5353,10 +5348,10 @@ declare const ProcessIndicatorSchema: (z: TZod) => zod.ZodObject<{
|
|
|
5353
5348
|
templateName: zod.ZodString;
|
|
5354
5349
|
}, zod_v4_core.$strip>], "mode">>;
|
|
5355
5350
|
dbDataType: zod.ZodOptional<zod.ZodString>;
|
|
5356
|
-
format: zod.ZodOptional<zod.ZodObject<{
|
|
5351
|
+
format: zod.ZodOptional<zod.ZodDefault<zod.ZodObject<{
|
|
5352
|
+
mode: zod.ZodEnum<typeof EFormatOrFormattingMode>;
|
|
5357
5353
|
value: zod.ZodOptional<zod.ZodEnum<typeof EFormatTypes>>;
|
|
5358
|
-
|
|
5359
|
-
}, zod_v4_core.$strip>>;
|
|
5354
|
+
}, zod_v4_core.$strip>>>;
|
|
5360
5355
|
formatting: zod.ZodOptional<zod.ZodDefault<zod.ZodDiscriminatedUnion<[zod.ZodObject<{
|
|
5361
5356
|
mode: zod.ZodLiteral<EFormatOrFormattingMode.BASE>;
|
|
5362
5357
|
value: zod.ZodDefault<zod.ZodEnum<typeof EFormattingPresets>>;
|
|
@@ -8194,8 +8189,6 @@ declare const transitionMeasureTemplateFormulas: {
|
|
|
8194
8189
|
|
|
8195
8190
|
declare const countExecutionsTemplate = "process(countIf({eventNameFormula} in {eventName}{filters}), {caseCaseIdFormula})";
|
|
8196
8191
|
|
|
8197
|
-
/** @deprecated - следует использовать fillTemplateSql */
|
|
8198
|
-
declare function fillTemplateString(templateString: string, params: Record<string, any>): string;
|
|
8199
8192
|
/** Функция для безопасного заполнения SQL шаблонов с защитой от однострочных SQL комментариев в подставляемых значениях. */
|
|
8200
8193
|
declare function fillTemplateSql(templateString: string, params: Record<string, string>): string;
|
|
8201
8194
|
|
|
@@ -8534,7 +8527,7 @@ interface ITypedFormulaControl {
|
|
|
8534
8527
|
type: EControlType.typedFormula;
|
|
8535
8528
|
value: {
|
|
8536
8529
|
formula: string;
|
|
8537
|
-
dbDataType
|
|
8530
|
+
dbDataType?: string;
|
|
8538
8531
|
};
|
|
8539
8532
|
props: {
|
|
8540
8533
|
disabled?: boolean;
|
|
@@ -8544,8 +8537,8 @@ interface ITypedFormulaControl {
|
|
|
8544
8537
|
interface IFormattingControl {
|
|
8545
8538
|
type: EControlType.formatting;
|
|
8546
8539
|
value: {
|
|
8547
|
-
format
|
|
8548
|
-
formatting
|
|
8540
|
+
format?: TSchemaType<typeof FormatSchema>;
|
|
8541
|
+
formatting?: TSchemaType<typeof FormattingSchema>;
|
|
8549
8542
|
};
|
|
8550
8543
|
props: {
|
|
8551
8544
|
formats?: Partial<Record<ESimpleDataType, EFormatTypes[]>>;
|
|
@@ -8734,10 +8727,10 @@ declare const BaseWidgetSettingsSchema: (z: TZod) => zod.ZodObject<{
|
|
|
8734
8727
|
id: zod.ZodPipe<zod.ZodDefault<zod.ZodNumber>, zod.ZodTransform<number, number>>;
|
|
8735
8728
|
name: zod.ZodString;
|
|
8736
8729
|
dbDataType: zod.ZodOptional<zod.ZodString>;
|
|
8737
|
-
format: zod.ZodOptional<zod.ZodObject<{
|
|
8730
|
+
format: zod.ZodOptional<zod.ZodDefault<zod.ZodObject<{
|
|
8731
|
+
mode: zod.ZodEnum<typeof EFormatOrFormattingMode>;
|
|
8738
8732
|
value: zod.ZodOptional<zod.ZodEnum<typeof EFormatTypes>>;
|
|
8739
|
-
|
|
8740
|
-
}, zod_v4_core.$strip>>;
|
|
8733
|
+
}, zod_v4_core.$strip>>>;
|
|
8741
8734
|
formatting: zod.ZodOptional<zod.ZodDefault<zod.ZodDiscriminatedUnion<[zod.ZodObject<{
|
|
8742
8735
|
mode: zod.ZodLiteral<EFormatOrFormattingMode.BASE>;
|
|
8743
8736
|
value: zod.ZodDefault<zod.ZodEnum<typeof EFormattingPresets>>;
|
|
@@ -10252,20 +10245,12 @@ interface ICalculatorFactory {
|
|
|
10252
10245
|
type: (options?: ICalculatorOptions) => ITypeCalculator;
|
|
10253
10246
|
}
|
|
10254
10247
|
|
|
10255
|
-
interface ILens<
|
|
10256
|
-
get(obj:
|
|
10257
|
-
set(obj:
|
|
10258
|
-
}
|
|
10259
|
-
/**
|
|
10260
|
-
* Линза, которая может вернуть Partial значение из get (будет обработано на стороне control'а),
|
|
10261
|
-
* но требует передачи в set полного значения
|
|
10262
|
-
*/
|
|
10263
|
-
interface IPartialLens<T extends TNullable<object>, Value> {
|
|
10264
|
-
get(obj: T): TNullable<Partial<Value>>;
|
|
10265
|
-
set(obj: T, value: Value): void;
|
|
10248
|
+
interface ILens<InputShape, Value> {
|
|
10249
|
+
get(obj: InputShape): Value;
|
|
10250
|
+
set(obj: InputShape, value: Value): void;
|
|
10266
10251
|
}
|
|
10267
10252
|
type TValuePath = string | string[];
|
|
10268
|
-
type TRecordAccessor<Settings extends object, Value> = TValuePath |
|
|
10253
|
+
type TRecordAccessor<Settings extends object, Value> = TValuePath | ILens<Settings, Value>;
|
|
10269
10254
|
interface IDisplayPredicate<Settings> {
|
|
10270
10255
|
(s: Settings): boolean;
|
|
10271
10256
|
}
|
|
@@ -10415,6 +10400,11 @@ type TWidgetIndicatorData = TWidgetDimensionData | TWidgetMeasureData;
|
|
|
10415
10400
|
* Каждый объект в массиве - это группа настроек.
|
|
10416
10401
|
*
|
|
10417
10402
|
* Группа отображается в виде раскрываемой плашки, может представлять из себя разрез, меру, процесс и др.
|
|
10403
|
+
*
|
|
10404
|
+
* @remarks
|
|
10405
|
+
* Если заменить createDataRecords и createDisplayRecords на общий createRecords:
|
|
10406
|
+
* + Мета-описание станет более универсальным, проще писать код рендеринга.
|
|
10407
|
+
* - Но если IGroupSetDescription нужен в >= 2-х вкладках - для каждой вкладки нужно дублировать IGroupSetDescription.
|
|
10418
10408
|
*/
|
|
10419
10409
|
interface IGroupSetDescription<Settings extends object, GroupSettings extends object> {
|
|
10420
10410
|
/** Заголовок */
|
|
@@ -10536,22 +10526,31 @@ interface IWidgetPlaceholderValues {
|
|
|
10536
10526
|
interface IWidgetPresetSettings extends TSchemaType<typeof WidgetPresetSettingsSchema> {
|
|
10537
10527
|
}
|
|
10538
10528
|
|
|
10539
|
-
type TVersion =
|
|
10529
|
+
type TVersion = `${number}`;
|
|
10540
10530
|
type TMigrationStruct = Record<string, any>;
|
|
10531
|
+
/** Массив версий в строгом порядке, по которому последовательно выполняется миграция */
|
|
10532
|
+
declare const apiVersions: readonly ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "10.1", "10.2", "10.3", "11", "12", "13", "13.1", "14", "15", "15.1", "15.2", "16", "16.1", "16.2", "17"];
|
|
10533
|
+
type TApiVersion = (typeof apiVersions)[number];
|
|
10534
|
+
/**
|
|
10535
|
+
* Актуальная версия settings, с которой работает система.
|
|
10536
|
+
* Используется единая версия для settings виджетов и показателей.
|
|
10537
|
+
*/
|
|
10538
|
+
declare const apiVersion: "1" | "3" | "2" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "10.1" | "10.2" | "11" | "10.3" | "12" | "13" | "14" | "15" | "13.1" | "16" | "17" | "15.1" | "15.2" | "16.1" | "16.2";
|
|
10541
10539
|
interface IWidgetStruct<Settings extends IBaseWidgetSettings = IBaseWidgetSettings> {
|
|
10542
10540
|
key: string;
|
|
10543
|
-
apiVersion:
|
|
10541
|
+
apiVersion: TApiVersion;
|
|
10544
10542
|
type: string;
|
|
10545
10543
|
settings: Settings;
|
|
10546
|
-
localApiVersion?:
|
|
10544
|
+
localApiVersion?: TVersion;
|
|
10547
10545
|
}
|
|
10548
10546
|
type TMigrateProcessor<T extends TMigrationStruct> = (struct: T) => void;
|
|
10549
|
-
interface
|
|
10550
|
-
|
|
10551
|
-
|
|
10547
|
+
interface IMigrateContext {
|
|
10548
|
+
apiVersion: TApiVersion;
|
|
10549
|
+
localApiVersion?: TVersion;
|
|
10550
|
+
type?: string;
|
|
10552
10551
|
}
|
|
10553
10552
|
interface IWidgetMigrator<T extends TMigrationStruct = IWidgetStruct> {
|
|
10554
|
-
registerProcessor(
|
|
10553
|
+
registerProcessor(context: IMigrateContext, processor: TMigrateProcessor<T>): void;
|
|
10555
10554
|
}
|
|
10556
10555
|
|
|
10557
10556
|
/** Используется для вывода типа настроек виджета по описанной схеме в методе `createSettingsSchema`
|
|
@@ -10564,21 +10563,17 @@ interface IDefinition<WidgetSettings extends IBaseWidgetSettings = IBaseWidgetSe
|
|
|
10564
10563
|
/** иконка виджета отображаемая в системе (в base64, svg или png) */
|
|
10565
10564
|
icon?: string;
|
|
10566
10565
|
/** возвращает zod-схему настроек виджета */
|
|
10567
|
-
createSettingsSchema
|
|
10568
|
-
/** возвращает конфигурацию настроек
|
|
10566
|
+
createSettingsSchema: (z: typeof z, context: ISchemaContext) => ZodType<WidgetSettings>;
|
|
10567
|
+
/** возвращает конфигурацию панели настроек */
|
|
10569
10568
|
createPanelDescription: IPanelDescriptionCreator<WidgetSettings, GroupSettings>;
|
|
10570
|
-
/**
|
|
10571
|
-
fillSettings
|
|
10569
|
+
/** обеспечивает консистентность настроек */
|
|
10570
|
+
fillSettings?: IFillSettings<WidgetSettings>;
|
|
10572
10571
|
/** получить начальные настройки виджета, используя заданный пользователем шаблон настроек */
|
|
10573
10572
|
getInitialSettings?: (settings: Partial<IWidgetPresetSettings>) => Partial<IBaseWidgetSettings>;
|
|
10574
10573
|
/** возвращает ключи показателей(разрезов или мер), для которых должна работать системная сортировка */
|
|
10575
10574
|
getSortableIndicatorsKeys?(): Readonly<StringKeyOf<WidgetSettings>[]>;
|
|
10576
|
-
/** Регистрация
|
|
10577
|
-
|
|
10578
|
-
/** Регистрация собственных миграторов виджета */
|
|
10579
|
-
registerLocalMigrateProcessors?(migrator: IWidgetMigrator<MigrationStruct>, globalContext: IGlobalContext): void;
|
|
10580
|
-
/** Возвращает массив версий локальных миграций виджета */
|
|
10581
|
-
getLocalMigrateVersions(): string[];
|
|
10575
|
+
/** Регистрация миграторов виджета */
|
|
10576
|
+
registerMigrateProcessors?(migrator: IWidgetMigrator<MigrationStruct>, globalContext: IGlobalContext): void;
|
|
10582
10577
|
}
|
|
10583
10578
|
|
|
10584
10579
|
type TContextMenu = (TContextMenuList | TContextMenuButtonGroup) & {
|
|
@@ -10825,6 +10820,14 @@ interface IWidgetEntity<WidgetSettings extends IBaseWidgetSettings, GroupSetting
|
|
|
10825
10820
|
definition: IDefinition<WidgetSettings, GroupSettings>;
|
|
10826
10821
|
}
|
|
10827
10822
|
|
|
10823
|
+
/** Ключи мета-данных внутри схем настроек */
|
|
10824
|
+
declare enum ESettingsSchemaMetaKey {
|
|
10825
|
+
/** Привязка значения из темы к настройке */
|
|
10826
|
+
themeValue = "themeValue",
|
|
10827
|
+
/** Тип сущности */
|
|
10828
|
+
entity = "entity"
|
|
10829
|
+
}
|
|
10830
|
+
|
|
10828
10831
|
interface IDimensionSelection {
|
|
10829
10832
|
values: Set<string | null>;
|
|
10830
10833
|
replacedFilter: ICalculatorFilter | null;
|
|
@@ -11001,6 +11004,7 @@ interface ITheme {
|
|
|
11001
11004
|
backgroundInEdit: boolean;
|
|
11002
11005
|
spacing: boolean;
|
|
11003
11006
|
widgets: {
|
|
11007
|
+
/** @remarks Заложено для будущего использования */
|
|
11004
11008
|
color: string;
|
|
11005
11009
|
paddings: number | string;
|
|
11006
11010
|
cornerRadius: number | undefined;
|
|
@@ -11047,7 +11051,6 @@ interface ITheme {
|
|
|
11047
11051
|
};
|
|
11048
11052
|
hoverColor: TLimitedColor;
|
|
11049
11053
|
}
|
|
11050
|
-
declare const themeValueMetaKey = "themeValue";
|
|
11051
11054
|
/**
|
|
11052
11055
|
* Привязывает мета-информацию о теме к Zod-схеме
|
|
11053
11056
|
*
|
|
@@ -11082,4 +11085,4 @@ declare global {
|
|
|
11082
11085
|
}
|
|
11083
11086
|
}
|
|
11084
11087
|
|
|
11085
|
-
export { ActionButtonSchema, ActionGoToURLSchema, ActionOnClickParameterSchema, ActionOpenInSchema, ActionOpenViewSchema, ActionRunScriptSchema, ActionSchema, ActionUpdateVariableSchema, ActionsOnClickSchema, AutoIdentifiedArrayItemSchema, BaseWidgetSettingsSchema, ColorAutoSchema, ColorBaseSchema, ColorByDimensionSchema, ColorDisabledSchema, ColorFormulaSchema, ColorGradientSchema, ColorRuleSchema, ColorSchema, ColorValuesSchema, ColoredValueSchema, ColumnIndicatorValueSchema, DimensionProcessFilterSchema, DimensionValueSchema, DisplayConditionSchema, EActionButtonsTypes, EActionTypes, EActivateConditionMode, EAutoUpdateMode, ECalculatorFilterMethods, EClickHouseBaseTypes, EColorMode, EControlType, ECustomSelectTemplates, EDataModelOption, EDimensionAggregationTemplateName, EDimensionProcessFilterTimeUnit, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationTemplateName, EDurationUnit, EEventAppearances, EEventMeasureTemplateNames, EFontWeight, EFormatOrFormattingMode, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EHeightMode, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureAggregationTemplateName, EMeasureInnerTemplateNames, EMeasureTemplateNames, EOuterAggregation, EProcessFilterNames, ESelectOptionTypes, ESimpleDataType, ESimpleInputType, ESortDirection, ESortingValueModes, ESystemRecordKey, ETransitionMeasureTemplateNames, EUnitMode, EViewMode, EViewOpenIn, EWidgetActionInputMethod, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, ExtendedFormulaFilterValueSchema, FormatSchema, FormattingSchema, FormulaFilterValueSchema, FormulaNullableSchema, FormulaSchema, type IActionButton, 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 ICalculatorOptions, type ICollapseRecord, type IColorPickerControl, type IColoredValue, type ICommonDimensions, type ICommonMeasures, type ICommonState, type IControlRecord, type ICustomAddButtonProps, type ICustomWidgetProps, type IDefinition, type IDimensionProcessFilter, 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 IGradient, 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 IInputTemplatedControl, type ILens, type IMarkdownMeasure, type IMeasureAddButtonProps, type IPanelDescription, type IPanelDescriptionCreator, type IParameterFromAggregation, type IParameterFromColumn, type IParameterFromDynamicList, type IParameterFromEndEvent, type IParameterFromEvent, type IParameterFromFormula, type IParameterFromManualInput, type IParameterFromStartEvent, type IParameterFromStaticList, type IParameterFromVariable, 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 ISchemaContext, 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 ITheme, type ITwoLimitsCalculator, type ITwoLimitsCalculatorExportInput, type ITwoLimitsCalculatorInput, type ITwoLimitsCalculatorOutput, type ITypeCalculator, type ITypeCalculatorInput, type ITypeCalculatorOutput, type ITypeCalculatorOutputItem, type ITypedFormulaControl, type IVertex, type IViewAction, type IViewContext, type IWidget, type IWidgetAction, type IWidgetColumnIndicator, type IWidgetColumnListVariable, type IWidgetDimension, type IWidgetDimensionHierarchy, type IWidgetDimensionInHierarchy, 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, KeyNullableSchema, MarkdownMeasureSchema, MeasureValueSchema, NameNullableSchema, OuterAggregation, ParameterFromAggregationSchema, ParameterFromColumnSchema, ParameterFromDataModelSchema, ParameterFromDynamicListSchema, ParameterFromEndEventSchema, ParameterFromEventSchema, ParameterFromFormulaSchema, ParameterFromManualInputSchema, ParameterFromStartEventSchema, ParameterFromStaticListSchema, ParameterFromVariableSchema, ProcessIndicatorSchema, ProcessIndicatorValueSchema, RangeSchema, SettingsFilterSchema, SortDirectionSchema, SortOrderSchema, type TAction, type TActionOnClickParameter, type TActionOpenView, type TActionValidator, type TActionsOnClick, type TAddButton, type TBoundedContentWithIndicator, type TColor, type TColorBase, type TColorRule, type TColumnIndicatorValue, type TConditionalDimensionInHierarchy, 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 TGradientsSetValue, type TGroupLevelRecord, type THintPlacement, type TLaunchActionParams, type TLimitedColor, type TMeasureAddButtonSelectOption, type TMigrateProcessor, type TMigrationStruct, type TParameterFromDataModel, type TProcessIndicatorValue, type TRecordAccessor, type TSchemaType, type TSelectChildOptions, type TSelectFetchNodes, type TSelectivePartial, type TSettingsFilter, type TSettingsOf, type TSortDirection, type TTabsHorizontalAlignment, type TUpdateSelection, type TValuePath, type TVersion, type TViewActionParameter, type TWidgetActionParameter, type TWidgetContainer, type TWidgetDimensionData, type TWidgetDimensionUnion, type TWidgetFilterValue, type TWidgetFiltering, type TWidgetIndicatorAggregationValue, type TWidgetIndicatorConversionValue, type TWidgetIndicatorDurationValue, type TWidgetIndicatorTimeValue, type TWidgetLevelRecord, type TWidgetMeasureData, type TWidgetSortingValue, type TWidgetVariable, type TWidgetsPaletteValue, type TZod, ViewActionParameterSchema, ViewActionSchema, WidgetActionParameterSchema, WidgetActionSchema, WidgetColumnIndicatorSchema, WidgetDimensionHierarchySchema, WidgetDimensionInHierarchySchema, WidgetDimensionSchema, WidgetIndicatorAggregationValueSchema, WidgetIndicatorConversionValueSchema, WidgetIndicatorDurationValueSchema, WidgetIndicatorFormulaValueSchema, WidgetIndicatorSchema, WidgetIndicatorTemplateValueSchema, WidgetIndicatorTimeValueSchema, WidgetMeasureAggregationValueSchema, WidgetMeasureSchema, WidgetPresetSettingsSchema, WidgetSortingIndicatorSchema, WidgetSortingValueSchema, applyIndexToArrayFormula, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, clearMultiLineComments, clearSingleLineComments, colors, conversionTemplate, convertFiltersToFormula, convertToFormulasChain, countExecutionsTemplate, createEscaper, createAggregationTemplate as createMeasureAggregationTemplate, curlyBracketsContentPattern, dashboardLinkRegExp, dimensionAggregationTemplates, dimensionTemplateFormulas, displayConditionTemplate, doubleQuoteContentPattern, durationTemplates, escapeCurlyBracketLinkName, escapeDoubleQuoteLinkName, eventMeasureTemplateFormulas, fillTemplateSql, fillTemplateString, formattingConfig, formulaFilterMethods, generateColumnFormula, getColorByIndex, getDefaultSortOrders, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getLocalizedText, getMeasureFormula, getProcessDimensionValueFormula, getRuleColor, getTransitionMeasureFormula, inheritDisplayConditionFromHierarchy, isDimensionProcessFilter, isDimensionsHierarchy, isFormulaFilterValue, isValidColor, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSettingsFiltersToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs, measureInnerTemplateFormulas, measureTemplateFormulas, parseClickHouseType, parseIndicatorLink, prepareConversionParams, prepareDimensionAggregationParams, prepareDurationParams, prepareFormulaForSql, prepareMeasureAggregationParams, prepareSortOrders, prepareTimeParams, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, themeValueMetaKey, themed, timeTemplates, transitionMeasureTemplateFormulas, unescapeSpecialCharacters, updateDefaultModeSelection, updateSingleModeSelection, workspaceLinkRegExp };
|
|
11088
|
+
export { ActionButtonSchema, ActionGoToURLSchema, ActionOnClickParameterSchema, ActionOpenInSchema, ActionOpenViewSchema, ActionRunScriptSchema, ActionSchema, ActionUpdateVariableSchema, ActionsOnClickSchema, AutoIdentifiedArrayItemSchema, BaseWidgetSettingsSchema, ColorAutoSchema, ColorBaseSchema, ColorByDimensionSchema, ColorDisabledSchema, ColorFormulaSchema, ColorGradientSchema, ColorRuleSchema, ColorSchema, ColorValuesSchema, ColoredValueSchema, ColumnIndicatorValueSchema, DimensionProcessFilterSchema, DimensionValueSchema, DisplayConditionSchema, EActionButtonsTypes, EActionTypes, EActivateConditionMode, EAutoUpdateMode, ECalculatorFilterMethods, EClickHouseBaseTypes, EColorMode, EControlType, ECustomSelectTemplates, EDataModelOption, EDimensionAggregationTemplateName, EDimensionProcessFilterTimeUnit, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationTemplateName, EDurationUnit, EEventAppearances, EEventMeasureTemplateNames, EFontWeight, EFormatOrFormattingMode, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EHeightMode, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureAggregationTemplateName, EMeasureInnerTemplateNames, EMeasureTemplateNames, EOuterAggregation, EProcessFilterNames, ESelectOptionTypes, ESettingsSchemaMetaKey, ESimpleDataType, ESimpleInputType, ESortDirection, ESortingValueModes, ESystemRecordKey, ETransitionMeasureTemplateNames, EUnitMode, EViewMode, EViewOpenIn, EWidgetActionInputMethod, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, ExtendedFormulaFilterValueSchema, FormatSchema, FormattingSchema, FormulaFilterValueSchema, FormulaNullableSchema, FormulaSchema, type IActionButton, 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 ICalculatorOptions, type ICollapseRecord, type IColorPickerControl, type IColoredValue, type ICommonDimensions, type ICommonMeasures, type ICommonState, type IControlRecord, type ICustomAddButtonProps, type ICustomWidgetProps, type IDefinition, type IDimensionProcessFilter, 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 IGradient, 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 IInputTemplatedControl, type ILens, type IMarkdownMeasure, type IMeasureAddButtonProps, type IMigrateContext, type IPanelDescription, type IPanelDescriptionCreator, type IParameterFromAggregation, type IParameterFromColumn, type IParameterFromDynamicList, type IParameterFromEndEvent, type IParameterFromEvent, type IParameterFromFormula, type IParameterFromManualInput, type IParameterFromStartEvent, type IParameterFromStaticList, type IParameterFromVariable, 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 ISchemaContext, type ISelectBranchOption, type ISelectControl, type ISelectDividerOption, type ISelectGroupOption, type ISelectLeafOption, type ISelectNode, type ISelectOption, type ISelectSystemOption, type ISizeControl, type ISortOrder, type ISortingAddButtonProps, type IStagesFilterValue, type IStaticListLabeledOption, type ISwitchControl, type ITagSetControl, type ITheme, type ITwoLimitsCalculator, type ITwoLimitsCalculatorExportInput, type ITwoLimitsCalculatorInput, type ITwoLimitsCalculatorOutput, type ITypeCalculator, type ITypeCalculatorInput, type ITypeCalculatorOutput, type ITypeCalculatorOutputItem, type ITypedFormulaControl, type IVertex, type IViewAction, type IViewContext, type IWidget, type IWidgetAction, type IWidgetColumnIndicator, type IWidgetColumnListVariable, type IWidgetDimension, type IWidgetDimensionHierarchy, type IWidgetDimensionInHierarchy, 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, KeyNullableSchema, MarkdownMeasureSchema, MeasureValueSchema, NameNullableSchema, OuterAggregation, ParameterFromAggregationSchema, ParameterFromColumnSchema, ParameterFromDataModelSchema, ParameterFromDynamicListSchema, ParameterFromEndEventSchema, ParameterFromEventSchema, ParameterFromFormulaSchema, ParameterFromManualInputSchema, ParameterFromStartEventSchema, ParameterFromStaticListSchema, ParameterFromVariableSchema, ProcessIndicatorSchema, ProcessIndicatorValueSchema, RangeSchema, SettingsFilterSchema, SortDirectionSchema, SortOrderSchema, type TAction, type TActionOnClickParameter, type TActionOpenView, type TActionValidator, type TActionsOnClick, type TAddButton, type TApiVersion, type TBoundedContentWithIndicator, type TColor, type TColorBase, type TColorRule, type TColumnIndicatorValue, type TConditionalDimensionInHierarchy, 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 TGradientsSetValue, type TGroupLevelRecord, type THintPlacement, type TLaunchActionParams, type TLimitedColor, type TMeasureAddButtonSelectOption, type TMigrateProcessor, type TMigrationStruct, type TParameterFromDataModel, type TProcessIndicatorValue, type TRecordAccessor, type TSchemaType, type TSelectChildOptions, type TSelectFetchNodes, type TSelectivePartial, type TSettingsFilter, type TSettingsOf, type TSortDirection, type TTabsHorizontalAlignment, type TUpdateSelection, type TValuePath, type TVersion, type TViewActionParameter, type TWidgetActionParameter, type TWidgetContainer, type TWidgetDimensionData, type TWidgetDimensionUnion, type TWidgetFilterValue, type TWidgetFiltering, type TWidgetIndicatorAggregationValue, type TWidgetIndicatorConversionValue, type TWidgetIndicatorDurationValue, type TWidgetIndicatorTimeValue, type TWidgetLevelRecord, type TWidgetMeasureData, type TWidgetSortingValue, type TWidgetVariable, type TWidgetsPaletteValue, type TZod, ViewActionParameterSchema, ViewActionSchema, WidgetActionParameterSchema, WidgetActionSchema, WidgetColumnIndicatorSchema, WidgetDimensionHierarchySchema, WidgetDimensionInHierarchySchema, WidgetDimensionSchema, WidgetIndicatorAggregationValueSchema, WidgetIndicatorConversionValueSchema, WidgetIndicatorDurationValueSchema, WidgetIndicatorFormulaValueSchema, WidgetIndicatorSchema, WidgetIndicatorTemplateValueSchema, WidgetIndicatorTimeValueSchema, WidgetMeasureAggregationValueSchema, WidgetMeasureSchema, WidgetPresetSettingsSchema, WidgetSortingIndicatorSchema, WidgetSortingValueSchema, apiVersion, apiVersions, applyIndexToArrayFormula, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, clearMultiLineComments, clearSingleLineComments, colors, conversionTemplate, convertFiltersToFormula, convertToFormulasChain, countExecutionsTemplate, createEscaper, createAggregationTemplate as createMeasureAggregationTemplate, curlyBracketsContentPattern, dashboardLinkRegExp, dimensionAggregationTemplates, dimensionTemplateFormulas, displayConditionTemplate, doubleQuoteContentPattern, durationTemplates, escapeCurlyBracketLinkName, escapeDoubleQuoteLinkName, eventMeasureTemplateFormulas, fillTemplateSql, formattingConfig, formulaFilterMethods, generateColumnFormula, getColorByIndex, getDefaultSortOrders, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getLocalizedText, getMeasureFormula, getProcessDimensionValueFormula, getRuleColor, getTransitionMeasureFormula, inheritDisplayConditionFromHierarchy, isDimensionProcessFilter, isDimensionsHierarchy, isFormulaFilterValue, isValidColor, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSettingsFiltersToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs, measureInnerTemplateFormulas, measureTemplateFormulas, parseClickHouseType, parseIndicatorLink, prepareConversionParams, prepareDimensionAggregationParams, prepareDurationParams, prepareFormulaForSql, prepareMeasureAggregationParams, prepareSortOrders, prepareTimeParams, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, themed, timeTemplates, transitionMeasureTemplateFormulas, unescapeSpecialCharacters, updateDefaultModeSelection, updateSingleModeSelection, workspaceLinkRegExp };
|
package/dist/index.esm.js
CHANGED
|
@@ -2,6 +2,40 @@ import { Localization } from '@infomaximum/localization';
|
|
|
2
2
|
export { ELanguages } from '@infomaximum/localization';
|
|
3
3
|
export { EFilteringMethodValues } from '@infomaximum/base-filter';
|
|
4
4
|
|
|
5
|
+
/** Массив версий в строгом порядке, по которому последовательно выполняется миграция */
|
|
6
|
+
var apiVersions = [
|
|
7
|
+
"1",
|
|
8
|
+
"2",
|
|
9
|
+
"3",
|
|
10
|
+
"4",
|
|
11
|
+
"5",
|
|
12
|
+
"6",
|
|
13
|
+
"7", // Версии от 7 и старше пока не удаляем [BI-15416]
|
|
14
|
+
"8",
|
|
15
|
+
"9",
|
|
16
|
+
"10",
|
|
17
|
+
"10.1",
|
|
18
|
+
"10.2",
|
|
19
|
+
"10.3", // 241223
|
|
20
|
+
"11",
|
|
21
|
+
"12",
|
|
22
|
+
"13", // 2503
|
|
23
|
+
"13.1", // 250314
|
|
24
|
+
"14",
|
|
25
|
+
"15", // Для версии системы 2505
|
|
26
|
+
"15.1", // Для версии системы 250609
|
|
27
|
+
"15.2", // Для версии системы 250614
|
|
28
|
+
"16", // Для версии системы 2507
|
|
29
|
+
"16.1", // Для версии системы 250703
|
|
30
|
+
"16.2", // Для версии системы 250709
|
|
31
|
+
"17", // 2508
|
|
32
|
+
];
|
|
33
|
+
/**
|
|
34
|
+
* Актуальная версия settings, с которой работает система.
|
|
35
|
+
* Используется единая версия для settings виджетов и показателей.
|
|
36
|
+
*/
|
|
37
|
+
var apiVersion = apiVersions.at(-1);
|
|
38
|
+
|
|
5
39
|
var EWidgetActionInputMethod;
|
|
6
40
|
(function (EWidgetActionInputMethod) {
|
|
7
41
|
EWidgetActionInputMethod["COLUMN"] = "COLUMN";
|
|
@@ -656,6 +690,16 @@ var WidgetSortingValueSchema = function (z) {
|
|
|
656
690
|
]);
|
|
657
691
|
};
|
|
658
692
|
|
|
693
|
+
/** Ключи мета-данных внутри схем настроек */
|
|
694
|
+
var ESettingsSchemaMetaKey;
|
|
695
|
+
(function (ESettingsSchemaMetaKey) {
|
|
696
|
+
/** Привязка значения из темы к настройке */
|
|
697
|
+
ESettingsSchemaMetaKey["themeValue"] = "themeValue";
|
|
698
|
+
/** Тип сущности */
|
|
699
|
+
ESettingsSchemaMetaKey["entity"] = "entity";
|
|
700
|
+
})(ESettingsSchemaMetaKey || (ESettingsSchemaMetaKey = {}));
|
|
701
|
+
|
|
702
|
+
var _a$6;
|
|
659
703
|
var RangeSchema = function (z) {
|
|
660
704
|
return z.object({
|
|
661
705
|
unit: z.string().optional(),
|
|
@@ -686,19 +730,25 @@ var KeyNullableSchema = function (z) { return z.string().nullable().default(null
|
|
|
686
730
|
/** Схема имени сущности (с возможностью находиться в неинициализированном состоянии) */
|
|
687
731
|
var NameNullableSchema = function (z) { return z.string().nullable().default(null); };
|
|
688
732
|
/**
|
|
689
|
-
*
|
|
690
|
-
*
|
|
691
|
-
* @note в будущем к схеме будет привязана мета-информация для того,
|
|
692
|
-
* чтобы система видела расположение формул в настройках
|
|
733
|
+
* Перечисление системных типов сущностей в схеме настроек виджетов.
|
|
734
|
+
* @note при расширении лучше положить на более общий уровень.
|
|
693
735
|
*/
|
|
694
|
-
var
|
|
736
|
+
var EEntity;
|
|
737
|
+
(function (EEntity) {
|
|
738
|
+
EEntity["formula"] = "formula";
|
|
739
|
+
})(EEntity || (EEntity = {}));
|
|
740
|
+
var formulaMeta = Object.freeze((_a$6 = {}, _a$6[ESettingsSchemaMetaKey.entity] = EEntity.formula, _a$6));
|
|
741
|
+
/** Схема формулы */
|
|
742
|
+
var FormulaSchema = function (z) { return z.string().default("").meta(formulaMeta); };
|
|
695
743
|
/**
|
|
696
744
|
* Схема формулы, которая не может быть пустой строкой, но может быть в
|
|
697
745
|
* неинициализированном состоянии null (вместо пустой строки)
|
|
698
746
|
*
|
|
699
747
|
* @note для обратной совместимости без необходимости писать миграции
|
|
700
748
|
*/
|
|
701
|
-
var FormulaNullableSchema = function (z) {
|
|
749
|
+
var FormulaNullableSchema = function (z) {
|
|
750
|
+
return z.string().nullable().default(null).meta(formulaMeta);
|
|
751
|
+
};
|
|
702
752
|
|
|
703
753
|
var WidgetIndicatorSchema = function (z) {
|
|
704
754
|
return AutoIdentifiedArrayItemSchema(z).extend({
|
|
@@ -706,10 +756,12 @@ var WidgetIndicatorSchema = function (z) {
|
|
|
706
756
|
});
|
|
707
757
|
};
|
|
708
758
|
var FormatSchema = function (z) {
|
|
709
|
-
return z
|
|
759
|
+
return z
|
|
760
|
+
.object({
|
|
761
|
+
mode: z.enum(EFormatOrFormattingMode),
|
|
710
762
|
value: z.enum(EFormatTypes).optional(),
|
|
711
|
-
|
|
712
|
-
|
|
763
|
+
})
|
|
764
|
+
.default({ mode: EFormatOrFormattingMode.BASE, value: EFormatTypes.STRING });
|
|
713
765
|
};
|
|
714
766
|
var FormattingSchema = function (z) {
|
|
715
767
|
return z
|
|
@@ -1496,13 +1548,6 @@ function sanitizeSingleLineComment(formula, wrapInBrackets) {
|
|
|
1496
1548
|
return wrapInBrackets ? "(".concat(formula, "\n)") : "".concat(formula, "\n");
|
|
1497
1549
|
}
|
|
1498
1550
|
|
|
1499
|
-
/** @deprecated - следует использовать fillTemplateSql */
|
|
1500
|
-
function fillTemplateString(templateString, params) {
|
|
1501
|
-
return templateString.replace(/\{(.*?)\}/g, function (_, key) {
|
|
1502
|
-
var _a;
|
|
1503
|
-
return (_a = params[key]) !== null && _a !== void 0 ? _a : "";
|
|
1504
|
-
});
|
|
1505
|
-
}
|
|
1506
1551
|
/** Функция для безопасного заполнения SQL шаблонов с защитой от однострочных SQL комментариев в подставляемых значениях. */
|
|
1507
1552
|
function fillTemplateSql(templateString, params) {
|
|
1508
1553
|
var e_1, _a;
|
|
@@ -1527,7 +1572,10 @@ function fillTemplateSql(templateString, params) {
|
|
|
1527
1572
|
}
|
|
1528
1573
|
finally { if (e_1) throw e_1.error; }
|
|
1529
1574
|
}
|
|
1530
|
-
return
|
|
1575
|
+
return templateString.replace(/\{(.*?)\}/g, function (_, key) {
|
|
1576
|
+
var _a;
|
|
1577
|
+
return (_a = newParams[key]) !== null && _a !== void 0 ? _a : "";
|
|
1578
|
+
});
|
|
1531
1579
|
}
|
|
1532
1580
|
|
|
1533
1581
|
/** Создать функцию экранирования переданных `specialChars` внутри `str` */
|
|
@@ -2899,7 +2947,6 @@ var WidgetPresetSettingsSchema = function (z) {
|
|
|
2899
2947
|
});
|
|
2900
2948
|
};
|
|
2901
2949
|
|
|
2902
|
-
var themeValueMetaKey = "themeValue";
|
|
2903
2950
|
/**
|
|
2904
2951
|
* Привязывает мета-информацию о теме к Zod-схеме
|
|
2905
2952
|
*
|
|
@@ -2920,7 +2967,7 @@ var themeValueMetaKey = "themeValue";
|
|
|
2920
2967
|
*/
|
|
2921
2968
|
var themed = function (scheme, selectThemeValue) {
|
|
2922
2969
|
var _a;
|
|
2923
|
-
return scheme.meta((_a = {}, _a[
|
|
2970
|
+
return scheme.meta((_a = {}, _a[ESettingsSchemaMetaKey.themeValue] = selectThemeValue, _a));
|
|
2924
2971
|
};
|
|
2925
2972
|
|
|
2926
2973
|
var ColorBaseSchema = function (z) {
|
|
@@ -2998,4 +3045,4 @@ var ColorSchema = function (z) {
|
|
|
2998
3045
|
.default({ mode: EColorMode.AUTO });
|
|
2999
3046
|
};
|
|
3000
3047
|
|
|
3001
|
-
export { ActionButtonSchema, ActionGoToURLSchema, ActionOnClickParameterSchema, ActionOpenInSchema, ActionOpenViewSchema, ActionRunScriptSchema, ActionSchema, ActionUpdateVariableSchema, ActionsOnClickSchema, AutoIdentifiedArrayItemSchema, BaseWidgetSettingsSchema, ColorAutoSchema, ColorBaseSchema, ColorByDimensionSchema, ColorDisabledSchema, ColorFormulaSchema, ColorGradientSchema, ColorRuleSchema, ColorSchema, ColorValuesSchema, ColoredValueSchema, ColumnIndicatorValueSchema, DimensionProcessFilterSchema, DimensionValueSchema, DisplayConditionSchema, EActionButtonsTypes, EActionTypes, EActivateConditionMode, EAutoUpdateMode, ECalculatorFilterMethods, EClickHouseBaseTypes, EColorMode, EControlType, ECustomSelectTemplates, EDataModelOption, EDimensionAggregationTemplateName, EDimensionProcessFilterTimeUnit, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationTemplateName, EDurationUnit, EEventAppearances, EEventMeasureTemplateNames, EFontWeight, EFormatOrFormattingMode, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EHeightMode, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureAggregationTemplateName, EMeasureInnerTemplateNames, EMeasureTemplateNames, EOuterAggregation, EProcessFilterNames, ESelectOptionTypes, ESimpleDataType, ESimpleInputType, ESortDirection, ESortingValueModes, ESystemRecordKey, ETransitionMeasureTemplateNames, EUnitMode, EViewMode, EViewOpenIn, EWidgetActionInputMethod, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, ExtendedFormulaFilterValueSchema, FormatSchema, FormattingSchema, FormulaFilterValueSchema, FormulaNullableSchema, FormulaSchema, KeyNullableSchema, MarkdownMeasureSchema, MeasureValueSchema, NameNullableSchema, OuterAggregation, ParameterFromAggregationSchema, ParameterFromColumnSchema, ParameterFromDataModelSchema, ParameterFromDynamicListSchema, ParameterFromEndEventSchema, ParameterFromEventSchema, ParameterFromFormulaSchema, ParameterFromManualInputSchema, ParameterFromStartEventSchema, ParameterFromStaticListSchema, ParameterFromVariableSchema, ProcessIndicatorSchema, ProcessIndicatorValueSchema, RangeSchema, SettingsFilterSchema, SortDirectionSchema, SortOrderSchema, ViewActionParameterSchema, ViewActionSchema, WidgetActionParameterSchema, WidgetActionSchema, WidgetColumnIndicatorSchema, WidgetDimensionHierarchySchema, WidgetDimensionInHierarchySchema, WidgetDimensionSchema, WidgetIndicatorAggregationValueSchema, WidgetIndicatorConversionValueSchema, WidgetIndicatorDurationValueSchema, WidgetIndicatorFormulaValueSchema, WidgetIndicatorSchema, WidgetIndicatorTemplateValueSchema, WidgetIndicatorTimeValueSchema, WidgetMeasureAggregationValueSchema, WidgetMeasureSchema, WidgetPresetSettingsSchema, WidgetSortingIndicatorSchema, WidgetSortingValueSchema, applyIndexToArrayFormula, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, clearMultiLineComments, clearSingleLineComments, colors, conversionTemplate, convertFiltersToFormula, convertToFormulasChain, countExecutionsTemplate, createEscaper, createAggregationTemplate as createMeasureAggregationTemplate, curlyBracketsContentPattern, dashboardLinkRegExp, dimensionAggregationTemplates, dimensionTemplateFormulas, displayConditionTemplate, doubleQuoteContentPattern, durationTemplates, escapeCurlyBracketLinkName, escapeDoubleQuoteLinkName, eventMeasureTemplateFormulas, fillTemplateSql,
|
|
3048
|
+
export { ActionButtonSchema, ActionGoToURLSchema, ActionOnClickParameterSchema, ActionOpenInSchema, ActionOpenViewSchema, ActionRunScriptSchema, ActionSchema, ActionUpdateVariableSchema, ActionsOnClickSchema, AutoIdentifiedArrayItemSchema, BaseWidgetSettingsSchema, ColorAutoSchema, ColorBaseSchema, ColorByDimensionSchema, ColorDisabledSchema, ColorFormulaSchema, ColorGradientSchema, ColorRuleSchema, ColorSchema, ColorValuesSchema, ColoredValueSchema, ColumnIndicatorValueSchema, DimensionProcessFilterSchema, DimensionValueSchema, DisplayConditionSchema, EActionButtonsTypes, EActionTypes, EActivateConditionMode, EAutoUpdateMode, ECalculatorFilterMethods, EClickHouseBaseTypes, EColorMode, EControlType, ECustomSelectTemplates, EDataModelOption, EDimensionAggregationTemplateName, EDimensionProcessFilterTimeUnit, EDimensionTemplateNames, EDisplayConditionMode, EDrawerPlacement, EDurationTemplateName, EDurationUnit, EEventAppearances, EEventMeasureTemplateNames, EFontWeight, EFormatOrFormattingMode, EFormatTypes, EFormattingPresets, EFormulaFilterFieldKeys, EHeightMode, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureAggregationTemplateName, EMeasureInnerTemplateNames, EMeasureTemplateNames, EOuterAggregation, EProcessFilterNames, ESelectOptionTypes, ESettingsSchemaMetaKey, ESimpleDataType, ESimpleInputType, ESortDirection, ESortingValueModes, ESystemRecordKey, ETransitionMeasureTemplateNames, EUnitMode, EViewMode, EViewOpenIn, EWidgetActionInputMethod, EWidgetFilterMode, EWidgetIndicatorType, EWidgetIndicatorValueModes, ExtendedFormulaFilterValueSchema, FormatSchema, FormattingSchema, FormulaFilterValueSchema, FormulaNullableSchema, FormulaSchema, KeyNullableSchema, MarkdownMeasureSchema, MeasureValueSchema, NameNullableSchema, OuterAggregation, ParameterFromAggregationSchema, ParameterFromColumnSchema, ParameterFromDataModelSchema, ParameterFromDynamicListSchema, ParameterFromEndEventSchema, ParameterFromEventSchema, ParameterFromFormulaSchema, ParameterFromManualInputSchema, ParameterFromStartEventSchema, ParameterFromStaticListSchema, ParameterFromVariableSchema, ProcessIndicatorSchema, ProcessIndicatorValueSchema, RangeSchema, SettingsFilterSchema, SortDirectionSchema, SortOrderSchema, ViewActionParameterSchema, ViewActionSchema, WidgetActionParameterSchema, WidgetActionSchema, WidgetColumnIndicatorSchema, WidgetDimensionHierarchySchema, WidgetDimensionInHierarchySchema, WidgetDimensionSchema, WidgetIndicatorAggregationValueSchema, WidgetIndicatorConversionValueSchema, WidgetIndicatorDurationValueSchema, WidgetIndicatorFormulaValueSchema, WidgetIndicatorSchema, WidgetIndicatorTemplateValueSchema, WidgetIndicatorTimeValueSchema, WidgetMeasureAggregationValueSchema, WidgetMeasureSchema, WidgetPresetSettingsSchema, WidgetSortingIndicatorSchema, WidgetSortingValueSchema, apiVersion, apiVersions, applyIndexToArrayFormula, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, clearMultiLineComments, clearSingleLineComments, colors, conversionTemplate, convertFiltersToFormula, convertToFormulasChain, countExecutionsTemplate, createEscaper, createAggregationTemplate as createMeasureAggregationTemplate, curlyBracketsContentPattern, dashboardLinkRegExp, dimensionAggregationTemplates, dimensionTemplateFormulas, displayConditionTemplate, doubleQuoteContentPattern, durationTemplates, escapeCurlyBracketLinkName, escapeDoubleQuoteLinkName, eventMeasureTemplateFormulas, fillTemplateSql, formattingConfig, formulaFilterMethods, generateColumnFormula, getColorByIndex, getDefaultSortOrders, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getLocalizedText, getMeasureFormula, getProcessDimensionValueFormula, getRuleColor, getTransitionMeasureFormula, inheritDisplayConditionFromHierarchy, isDimensionProcessFilter, isDimensionsHierarchy, isFormulaFilterValue, isValidColor, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSettingsFiltersToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs, measureInnerTemplateFormulas, measureTemplateFormulas, parseClickHouseType, parseIndicatorLink, prepareConversionParams, prepareDimensionAggregationParams, prepareDurationParams, prepareFormulaForSql, prepareMeasureAggregationParams, prepareSortOrders, prepareTimeParams, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, themed, timeTemplates, transitionMeasureTemplateFormulas, unescapeSpecialCharacters, updateDefaultModeSelection, updateSingleModeSelection, workspaceLinkRegExp };
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,40 @@
|
|
|
3
3
|
var localization$1 = require('@infomaximum/localization');
|
|
4
4
|
var baseFilter = require('@infomaximum/base-filter');
|
|
5
5
|
|
|
6
|
+
/** Массив версий в строгом порядке, по которому последовательно выполняется миграция */
|
|
7
|
+
var apiVersions = [
|
|
8
|
+
"1",
|
|
9
|
+
"2",
|
|
10
|
+
"3",
|
|
11
|
+
"4",
|
|
12
|
+
"5",
|
|
13
|
+
"6",
|
|
14
|
+
"7", // Версии от 7 и старше пока не удаляем [BI-15416]
|
|
15
|
+
"8",
|
|
16
|
+
"9",
|
|
17
|
+
"10",
|
|
18
|
+
"10.1",
|
|
19
|
+
"10.2",
|
|
20
|
+
"10.3", // 241223
|
|
21
|
+
"11",
|
|
22
|
+
"12",
|
|
23
|
+
"13", // 2503
|
|
24
|
+
"13.1", // 250314
|
|
25
|
+
"14",
|
|
26
|
+
"15", // Для версии системы 2505
|
|
27
|
+
"15.1", // Для версии системы 250609
|
|
28
|
+
"15.2", // Для версии системы 250614
|
|
29
|
+
"16", // Для версии системы 2507
|
|
30
|
+
"16.1", // Для версии системы 250703
|
|
31
|
+
"16.2", // Для версии системы 250709
|
|
32
|
+
"17", // 2508
|
|
33
|
+
];
|
|
34
|
+
/**
|
|
35
|
+
* Актуальная версия settings, с которой работает система.
|
|
36
|
+
* Используется единая версия для settings виджетов и показателей.
|
|
37
|
+
*/
|
|
38
|
+
var apiVersion = apiVersions.at(-1);
|
|
39
|
+
|
|
6
40
|
exports.EWidgetActionInputMethod = void 0;
|
|
7
41
|
(function (EWidgetActionInputMethod) {
|
|
8
42
|
EWidgetActionInputMethod["COLUMN"] = "COLUMN";
|
|
@@ -657,6 +691,16 @@ var WidgetSortingValueSchema = function (z) {
|
|
|
657
691
|
]);
|
|
658
692
|
};
|
|
659
693
|
|
|
694
|
+
/** Ключи мета-данных внутри схем настроек */
|
|
695
|
+
exports.ESettingsSchemaMetaKey = void 0;
|
|
696
|
+
(function (ESettingsSchemaMetaKey) {
|
|
697
|
+
/** Привязка значения из темы к настройке */
|
|
698
|
+
ESettingsSchemaMetaKey["themeValue"] = "themeValue";
|
|
699
|
+
/** Тип сущности */
|
|
700
|
+
ESettingsSchemaMetaKey["entity"] = "entity";
|
|
701
|
+
})(exports.ESettingsSchemaMetaKey || (exports.ESettingsSchemaMetaKey = {}));
|
|
702
|
+
|
|
703
|
+
var _a$6;
|
|
660
704
|
var RangeSchema = function (z) {
|
|
661
705
|
return z.object({
|
|
662
706
|
unit: z.string().optional(),
|
|
@@ -687,19 +731,25 @@ var KeyNullableSchema = function (z) { return z.string().nullable().default(null
|
|
|
687
731
|
/** Схема имени сущности (с возможностью находиться в неинициализированном состоянии) */
|
|
688
732
|
var NameNullableSchema = function (z) { return z.string().nullable().default(null); };
|
|
689
733
|
/**
|
|
690
|
-
*
|
|
691
|
-
*
|
|
692
|
-
* @note в будущем к схеме будет привязана мета-информация для того,
|
|
693
|
-
* чтобы система видела расположение формул в настройках
|
|
734
|
+
* Перечисление системных типов сущностей в схеме настроек виджетов.
|
|
735
|
+
* @note при расширении лучше положить на более общий уровень.
|
|
694
736
|
*/
|
|
695
|
-
var
|
|
737
|
+
var EEntity;
|
|
738
|
+
(function (EEntity) {
|
|
739
|
+
EEntity["formula"] = "formula";
|
|
740
|
+
})(EEntity || (EEntity = {}));
|
|
741
|
+
var formulaMeta = Object.freeze((_a$6 = {}, _a$6[exports.ESettingsSchemaMetaKey.entity] = EEntity.formula, _a$6));
|
|
742
|
+
/** Схема формулы */
|
|
743
|
+
var FormulaSchema = function (z) { return z.string().default("").meta(formulaMeta); };
|
|
696
744
|
/**
|
|
697
745
|
* Схема формулы, которая не может быть пустой строкой, но может быть в
|
|
698
746
|
* неинициализированном состоянии null (вместо пустой строки)
|
|
699
747
|
*
|
|
700
748
|
* @note для обратной совместимости без необходимости писать миграции
|
|
701
749
|
*/
|
|
702
|
-
var FormulaNullableSchema = function (z) {
|
|
750
|
+
var FormulaNullableSchema = function (z) {
|
|
751
|
+
return z.string().nullable().default(null).meta(formulaMeta);
|
|
752
|
+
};
|
|
703
753
|
|
|
704
754
|
var WidgetIndicatorSchema = function (z) {
|
|
705
755
|
return AutoIdentifiedArrayItemSchema(z).extend({
|
|
@@ -707,10 +757,12 @@ var WidgetIndicatorSchema = function (z) {
|
|
|
707
757
|
});
|
|
708
758
|
};
|
|
709
759
|
var FormatSchema = function (z) {
|
|
710
|
-
return z
|
|
760
|
+
return z
|
|
761
|
+
.object({
|
|
762
|
+
mode: z.enum(exports.EFormatOrFormattingMode),
|
|
711
763
|
value: z.enum(exports.EFormatTypes).optional(),
|
|
712
|
-
|
|
713
|
-
|
|
764
|
+
})
|
|
765
|
+
.default({ mode: exports.EFormatOrFormattingMode.BASE, value: exports.EFormatTypes.STRING });
|
|
714
766
|
};
|
|
715
767
|
var FormattingSchema = function (z) {
|
|
716
768
|
return z
|
|
@@ -1497,13 +1549,6 @@ function sanitizeSingleLineComment(formula, wrapInBrackets) {
|
|
|
1497
1549
|
return wrapInBrackets ? "(".concat(formula, "\n)") : "".concat(formula, "\n");
|
|
1498
1550
|
}
|
|
1499
1551
|
|
|
1500
|
-
/** @deprecated - следует использовать fillTemplateSql */
|
|
1501
|
-
function fillTemplateString(templateString, params) {
|
|
1502
|
-
return templateString.replace(/\{(.*?)\}/g, function (_, key) {
|
|
1503
|
-
var _a;
|
|
1504
|
-
return (_a = params[key]) !== null && _a !== void 0 ? _a : "";
|
|
1505
|
-
});
|
|
1506
|
-
}
|
|
1507
1552
|
/** Функция для безопасного заполнения SQL шаблонов с защитой от однострочных SQL комментариев в подставляемых значениях. */
|
|
1508
1553
|
function fillTemplateSql(templateString, params) {
|
|
1509
1554
|
var e_1, _a;
|
|
@@ -1528,7 +1573,10 @@ function fillTemplateSql(templateString, params) {
|
|
|
1528
1573
|
}
|
|
1529
1574
|
finally { if (e_1) throw e_1.error; }
|
|
1530
1575
|
}
|
|
1531
|
-
return
|
|
1576
|
+
return templateString.replace(/\{(.*?)\}/g, function (_, key) {
|
|
1577
|
+
var _a;
|
|
1578
|
+
return (_a = newParams[key]) !== null && _a !== void 0 ? _a : "";
|
|
1579
|
+
});
|
|
1532
1580
|
}
|
|
1533
1581
|
|
|
1534
1582
|
/** Создать функцию экранирования переданных `specialChars` внутри `str` */
|
|
@@ -2900,7 +2948,6 @@ var WidgetPresetSettingsSchema = function (z) {
|
|
|
2900
2948
|
});
|
|
2901
2949
|
};
|
|
2902
2950
|
|
|
2903
|
-
var themeValueMetaKey = "themeValue";
|
|
2904
2951
|
/**
|
|
2905
2952
|
* Привязывает мета-информацию о теме к Zod-схеме
|
|
2906
2953
|
*
|
|
@@ -2921,7 +2968,7 @@ var themeValueMetaKey = "themeValue";
|
|
|
2921
2968
|
*/
|
|
2922
2969
|
var themed = function (scheme, selectThemeValue) {
|
|
2923
2970
|
var _a;
|
|
2924
|
-
return scheme.meta((_a = {}, _a[
|
|
2971
|
+
return scheme.meta((_a = {}, _a[exports.ESettingsSchemaMetaKey.themeValue] = selectThemeValue, _a));
|
|
2925
2972
|
};
|
|
2926
2973
|
|
|
2927
2974
|
var ColorBaseSchema = function (z) {
|
|
@@ -3079,6 +3126,8 @@ exports.WidgetMeasureSchema = WidgetMeasureSchema;
|
|
|
3079
3126
|
exports.WidgetPresetSettingsSchema = WidgetPresetSettingsSchema;
|
|
3080
3127
|
exports.WidgetSortingIndicatorSchema = WidgetSortingIndicatorSchema;
|
|
3081
3128
|
exports.WidgetSortingValueSchema = WidgetSortingValueSchema;
|
|
3129
|
+
exports.apiVersion = apiVersion;
|
|
3130
|
+
exports.apiVersions = apiVersions;
|
|
3082
3131
|
exports.applyIndexToArrayFormula = applyIndexToArrayFormula;
|
|
3083
3132
|
exports.bindContentWithIndicator = bindContentWithIndicator;
|
|
3084
3133
|
exports.bindContentsWithIndicators = bindContentsWithIndicators;
|
|
@@ -3103,7 +3152,6 @@ exports.escapeCurlyBracketLinkName = escapeCurlyBracketLinkName;
|
|
|
3103
3152
|
exports.escapeDoubleQuoteLinkName = escapeDoubleQuoteLinkName;
|
|
3104
3153
|
exports.eventMeasureTemplateFormulas = eventMeasureTemplateFormulas;
|
|
3105
3154
|
exports.fillTemplateSql = fillTemplateSql;
|
|
3106
|
-
exports.fillTemplateString = fillTemplateString;
|
|
3107
3155
|
exports.formattingConfig = formattingConfig;
|
|
3108
3156
|
exports.formulaFilterMethods = formulaFilterMethods;
|
|
3109
3157
|
exports.generateColumnFormula = generateColumnFormula;
|
|
@@ -3146,7 +3194,6 @@ exports.replaceDisplayCondition = replaceDisplayCondition;
|
|
|
3146
3194
|
exports.replaceFiltersBySelection = replaceFiltersBySelection;
|
|
3147
3195
|
exports.replaceHierarchiesWithDimensions = replaceHierarchiesWithDimensions;
|
|
3148
3196
|
exports.selectDimensionFromHierarchy = selectDimensionFromHierarchy;
|
|
3149
|
-
exports.themeValueMetaKey = themeValueMetaKey;
|
|
3150
3197
|
exports.themed = themed;
|
|
3151
3198
|
exports.timeTemplates = timeTemplates;
|
|
3152
3199
|
exports.transitionMeasureTemplateFormulas = transitionMeasureTemplateFormulas;
|