@infomaximum/widget-sdk 6.0.0-view-theme.18 → 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 +15 -0
- package/dist/index.d.ts +51 -53
- package/dist/index.esm.js +33 -20
- package/dist/index.js +32 -21
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
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
|
+
|
|
5
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)
|
|
6
21
|
|
|
7
22
|
|
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
|
/** Заголовок */
|
|
@@ -10573,11 +10563,11 @@ interface IDefinition<WidgetSettings extends IBaseWidgetSettings = IBaseWidgetSe
|
|
|
10573
10563
|
/** иконка виджета отображаемая в системе (в base64, svg или png) */
|
|
10574
10564
|
icon?: string;
|
|
10575
10565
|
/** возвращает zod-схему настроек виджета */
|
|
10576
|
-
createSettingsSchema
|
|
10577
|
-
/** возвращает конфигурацию настроек
|
|
10566
|
+
createSettingsSchema: (z: typeof z, context: ISchemaContext) => ZodType<WidgetSettings>;
|
|
10567
|
+
/** возвращает конфигурацию панели настроек */
|
|
10578
10568
|
createPanelDescription: IPanelDescriptionCreator<WidgetSettings, GroupSettings>;
|
|
10579
|
-
/**
|
|
10580
|
-
fillSettings
|
|
10569
|
+
/** обеспечивает консистентность настроек */
|
|
10570
|
+
fillSettings?: IFillSettings<WidgetSettings>;
|
|
10581
10571
|
/** получить начальные настройки виджета, используя заданный пользователем шаблон настроек */
|
|
10582
10572
|
getInitialSettings?: (settings: Partial<IWidgetPresetSettings>) => Partial<IBaseWidgetSettings>;
|
|
10583
10573
|
/** возвращает ключи показателей(разрезов или мер), для которых должна работать системная сортировка */
|
|
@@ -10830,6 +10820,14 @@ interface IWidgetEntity<WidgetSettings extends IBaseWidgetSettings, GroupSetting
|
|
|
10830
10820
|
definition: IDefinition<WidgetSettings, GroupSettings>;
|
|
10831
10821
|
}
|
|
10832
10822
|
|
|
10823
|
+
/** Ключи мета-данных внутри схем настроек */
|
|
10824
|
+
declare enum ESettingsSchemaMetaKey {
|
|
10825
|
+
/** Привязка значения из темы к настройке */
|
|
10826
|
+
themeValue = "themeValue",
|
|
10827
|
+
/** Тип сущности */
|
|
10828
|
+
entity = "entity"
|
|
10829
|
+
}
|
|
10830
|
+
|
|
10833
10831
|
interface IDimensionSelection {
|
|
10834
10832
|
values: Set<string | null>;
|
|
10835
10833
|
replacedFilter: ICalculatorFilter | null;
|
|
@@ -11006,6 +11004,7 @@ interface ITheme {
|
|
|
11006
11004
|
backgroundInEdit: boolean;
|
|
11007
11005
|
spacing: boolean;
|
|
11008
11006
|
widgets: {
|
|
11007
|
+
/** @remarks Заложено для будущего использования */
|
|
11009
11008
|
color: string;
|
|
11010
11009
|
paddings: number | string;
|
|
11011
11010
|
cornerRadius: number | undefined;
|
|
@@ -11052,7 +11051,6 @@ interface ITheme {
|
|
|
11052
11051
|
};
|
|
11053
11052
|
hoverColor: TLimitedColor;
|
|
11054
11053
|
}
|
|
11055
|
-
declare const themeValueMetaKey = "themeValue";
|
|
11056
11054
|
/**
|
|
11057
11055
|
* Привязывает мета-информацию о теме к Zod-схеме
|
|
11058
11056
|
*
|
|
@@ -11087,4 +11085,4 @@ declare global {
|
|
|
11087
11085
|
}
|
|
11088
11086
|
}
|
|
11089
11087
|
|
|
11090
|
-
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 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, 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
|
@@ -690,6 +690,16 @@ var WidgetSortingValueSchema = function (z) {
|
|
|
690
690
|
]);
|
|
691
691
|
};
|
|
692
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;
|
|
693
703
|
var RangeSchema = function (z) {
|
|
694
704
|
return z.object({
|
|
695
705
|
unit: z.string().optional(),
|
|
@@ -720,19 +730,25 @@ var KeyNullableSchema = function (z) { return z.string().nullable().default(null
|
|
|
720
730
|
/** Схема имени сущности (с возможностью находиться в неинициализированном состоянии) */
|
|
721
731
|
var NameNullableSchema = function (z) { return z.string().nullable().default(null); };
|
|
722
732
|
/**
|
|
723
|
-
*
|
|
724
|
-
*
|
|
725
|
-
* @note в будущем к схеме будет привязана мета-информация для того,
|
|
726
|
-
* чтобы система видела расположение формул в настройках
|
|
733
|
+
* Перечисление системных типов сущностей в схеме настроек виджетов.
|
|
734
|
+
* @note при расширении лучше положить на более общий уровень.
|
|
727
735
|
*/
|
|
728
|
-
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); };
|
|
729
743
|
/**
|
|
730
744
|
* Схема формулы, которая не может быть пустой строкой, но может быть в
|
|
731
745
|
* неинициализированном состоянии null (вместо пустой строки)
|
|
732
746
|
*
|
|
733
747
|
* @note для обратной совместимости без необходимости писать миграции
|
|
734
748
|
*/
|
|
735
|
-
var FormulaNullableSchema = function (z) {
|
|
749
|
+
var FormulaNullableSchema = function (z) {
|
|
750
|
+
return z.string().nullable().default(null).meta(formulaMeta);
|
|
751
|
+
};
|
|
736
752
|
|
|
737
753
|
var WidgetIndicatorSchema = function (z) {
|
|
738
754
|
return AutoIdentifiedArrayItemSchema(z).extend({
|
|
@@ -740,10 +756,12 @@ var WidgetIndicatorSchema = function (z) {
|
|
|
740
756
|
});
|
|
741
757
|
};
|
|
742
758
|
var FormatSchema = function (z) {
|
|
743
|
-
return z
|
|
759
|
+
return z
|
|
760
|
+
.object({
|
|
761
|
+
mode: z.enum(EFormatOrFormattingMode),
|
|
744
762
|
value: z.enum(EFormatTypes).optional(),
|
|
745
|
-
|
|
746
|
-
|
|
763
|
+
})
|
|
764
|
+
.default({ mode: EFormatOrFormattingMode.BASE, value: EFormatTypes.STRING });
|
|
747
765
|
};
|
|
748
766
|
var FormattingSchema = function (z) {
|
|
749
767
|
return z
|
|
@@ -1530,13 +1548,6 @@ function sanitizeSingleLineComment(formula, wrapInBrackets) {
|
|
|
1530
1548
|
return wrapInBrackets ? "(".concat(formula, "\n)") : "".concat(formula, "\n");
|
|
1531
1549
|
}
|
|
1532
1550
|
|
|
1533
|
-
/** @deprecated - следует использовать fillTemplateSql */
|
|
1534
|
-
function fillTemplateString(templateString, params) {
|
|
1535
|
-
return templateString.replace(/\{(.*?)\}/g, function (_, key) {
|
|
1536
|
-
var _a;
|
|
1537
|
-
return (_a = params[key]) !== null && _a !== void 0 ? _a : "";
|
|
1538
|
-
});
|
|
1539
|
-
}
|
|
1540
1551
|
/** Функция для безопасного заполнения SQL шаблонов с защитой от однострочных SQL комментариев в подставляемых значениях. */
|
|
1541
1552
|
function fillTemplateSql(templateString, params) {
|
|
1542
1553
|
var e_1, _a;
|
|
@@ -1561,7 +1572,10 @@ function fillTemplateSql(templateString, params) {
|
|
|
1561
1572
|
}
|
|
1562
1573
|
finally { if (e_1) throw e_1.error; }
|
|
1563
1574
|
}
|
|
1564
|
-
return
|
|
1575
|
+
return templateString.replace(/\{(.*?)\}/g, function (_, key) {
|
|
1576
|
+
var _a;
|
|
1577
|
+
return (_a = newParams[key]) !== null && _a !== void 0 ? _a : "";
|
|
1578
|
+
});
|
|
1565
1579
|
}
|
|
1566
1580
|
|
|
1567
1581
|
/** Создать функцию экранирования переданных `specialChars` внутри `str` */
|
|
@@ -2933,7 +2947,6 @@ var WidgetPresetSettingsSchema = function (z) {
|
|
|
2933
2947
|
});
|
|
2934
2948
|
};
|
|
2935
2949
|
|
|
2936
|
-
var themeValueMetaKey = "themeValue";
|
|
2937
2950
|
/**
|
|
2938
2951
|
* Привязывает мета-информацию о теме к Zod-схеме
|
|
2939
2952
|
*
|
|
@@ -2954,7 +2967,7 @@ var themeValueMetaKey = "themeValue";
|
|
|
2954
2967
|
*/
|
|
2955
2968
|
var themed = function (scheme, selectThemeValue) {
|
|
2956
2969
|
var _a;
|
|
2957
|
-
return scheme.meta((_a = {}, _a[
|
|
2970
|
+
return scheme.meta((_a = {}, _a[ESettingsSchemaMetaKey.themeValue] = selectThemeValue, _a));
|
|
2958
2971
|
};
|
|
2959
2972
|
|
|
2960
2973
|
var ColorBaseSchema = function (z) {
|
|
@@ -3032,4 +3045,4 @@ var ColorSchema = function (z) {
|
|
|
3032
3045
|
.default({ mode: EColorMode.AUTO });
|
|
3033
3046
|
};
|
|
3034
3047
|
|
|
3035
|
-
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, 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,
|
|
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
|
@@ -691,6 +691,16 @@ var WidgetSortingValueSchema = function (z) {
|
|
|
691
691
|
]);
|
|
692
692
|
};
|
|
693
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;
|
|
694
704
|
var RangeSchema = function (z) {
|
|
695
705
|
return z.object({
|
|
696
706
|
unit: z.string().optional(),
|
|
@@ -721,19 +731,25 @@ var KeyNullableSchema = function (z) { return z.string().nullable().default(null
|
|
|
721
731
|
/** Схема имени сущности (с возможностью находиться в неинициализированном состоянии) */
|
|
722
732
|
var NameNullableSchema = function (z) { return z.string().nullable().default(null); };
|
|
723
733
|
/**
|
|
724
|
-
*
|
|
725
|
-
*
|
|
726
|
-
* @note в будущем к схеме будет привязана мета-информация для того,
|
|
727
|
-
* чтобы система видела расположение формул в настройках
|
|
734
|
+
* Перечисление системных типов сущностей в схеме настроек виджетов.
|
|
735
|
+
* @note при расширении лучше положить на более общий уровень.
|
|
728
736
|
*/
|
|
729
|
-
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); };
|
|
730
744
|
/**
|
|
731
745
|
* Схема формулы, которая не может быть пустой строкой, но может быть в
|
|
732
746
|
* неинициализированном состоянии null (вместо пустой строки)
|
|
733
747
|
*
|
|
734
748
|
* @note для обратной совместимости без необходимости писать миграции
|
|
735
749
|
*/
|
|
736
|
-
var FormulaNullableSchema = function (z) {
|
|
750
|
+
var FormulaNullableSchema = function (z) {
|
|
751
|
+
return z.string().nullable().default(null).meta(formulaMeta);
|
|
752
|
+
};
|
|
737
753
|
|
|
738
754
|
var WidgetIndicatorSchema = function (z) {
|
|
739
755
|
return AutoIdentifiedArrayItemSchema(z).extend({
|
|
@@ -741,10 +757,12 @@ var WidgetIndicatorSchema = function (z) {
|
|
|
741
757
|
});
|
|
742
758
|
};
|
|
743
759
|
var FormatSchema = function (z) {
|
|
744
|
-
return z
|
|
760
|
+
return z
|
|
761
|
+
.object({
|
|
762
|
+
mode: z.enum(exports.EFormatOrFormattingMode),
|
|
745
763
|
value: z.enum(exports.EFormatTypes).optional(),
|
|
746
|
-
|
|
747
|
-
|
|
764
|
+
})
|
|
765
|
+
.default({ mode: exports.EFormatOrFormattingMode.BASE, value: exports.EFormatTypes.STRING });
|
|
748
766
|
};
|
|
749
767
|
var FormattingSchema = function (z) {
|
|
750
768
|
return z
|
|
@@ -1531,13 +1549,6 @@ function sanitizeSingleLineComment(formula, wrapInBrackets) {
|
|
|
1531
1549
|
return wrapInBrackets ? "(".concat(formula, "\n)") : "".concat(formula, "\n");
|
|
1532
1550
|
}
|
|
1533
1551
|
|
|
1534
|
-
/** @deprecated - следует использовать fillTemplateSql */
|
|
1535
|
-
function fillTemplateString(templateString, params) {
|
|
1536
|
-
return templateString.replace(/\{(.*?)\}/g, function (_, key) {
|
|
1537
|
-
var _a;
|
|
1538
|
-
return (_a = params[key]) !== null && _a !== void 0 ? _a : "";
|
|
1539
|
-
});
|
|
1540
|
-
}
|
|
1541
1552
|
/** Функция для безопасного заполнения SQL шаблонов с защитой от однострочных SQL комментариев в подставляемых значениях. */
|
|
1542
1553
|
function fillTemplateSql(templateString, params) {
|
|
1543
1554
|
var e_1, _a;
|
|
@@ -1562,7 +1573,10 @@ function fillTemplateSql(templateString, params) {
|
|
|
1562
1573
|
}
|
|
1563
1574
|
finally { if (e_1) throw e_1.error; }
|
|
1564
1575
|
}
|
|
1565
|
-
return
|
|
1576
|
+
return templateString.replace(/\{(.*?)\}/g, function (_, key) {
|
|
1577
|
+
var _a;
|
|
1578
|
+
return (_a = newParams[key]) !== null && _a !== void 0 ? _a : "";
|
|
1579
|
+
});
|
|
1566
1580
|
}
|
|
1567
1581
|
|
|
1568
1582
|
/** Создать функцию экранирования переданных `specialChars` внутри `str` */
|
|
@@ -2934,7 +2948,6 @@ var WidgetPresetSettingsSchema = function (z) {
|
|
|
2934
2948
|
});
|
|
2935
2949
|
};
|
|
2936
2950
|
|
|
2937
|
-
var themeValueMetaKey = "themeValue";
|
|
2938
2951
|
/**
|
|
2939
2952
|
* Привязывает мета-информацию о теме к Zod-схеме
|
|
2940
2953
|
*
|
|
@@ -2955,7 +2968,7 @@ var themeValueMetaKey = "themeValue";
|
|
|
2955
2968
|
*/
|
|
2956
2969
|
var themed = function (scheme, selectThemeValue) {
|
|
2957
2970
|
var _a;
|
|
2958
|
-
return scheme.meta((_a = {}, _a[
|
|
2971
|
+
return scheme.meta((_a = {}, _a[exports.ESettingsSchemaMetaKey.themeValue] = selectThemeValue, _a));
|
|
2959
2972
|
};
|
|
2960
2973
|
|
|
2961
2974
|
var ColorBaseSchema = function (z) {
|
|
@@ -3139,7 +3152,6 @@ exports.escapeCurlyBracketLinkName = escapeCurlyBracketLinkName;
|
|
|
3139
3152
|
exports.escapeDoubleQuoteLinkName = escapeDoubleQuoteLinkName;
|
|
3140
3153
|
exports.eventMeasureTemplateFormulas = eventMeasureTemplateFormulas;
|
|
3141
3154
|
exports.fillTemplateSql = fillTemplateSql;
|
|
3142
|
-
exports.fillTemplateString = fillTemplateString;
|
|
3143
3155
|
exports.formattingConfig = formattingConfig;
|
|
3144
3156
|
exports.formulaFilterMethods = formulaFilterMethods;
|
|
3145
3157
|
exports.generateColumnFormula = generateColumnFormula;
|
|
@@ -3182,7 +3194,6 @@ exports.replaceDisplayCondition = replaceDisplayCondition;
|
|
|
3182
3194
|
exports.replaceFiltersBySelection = replaceFiltersBySelection;
|
|
3183
3195
|
exports.replaceHierarchiesWithDimensions = replaceHierarchiesWithDimensions;
|
|
3184
3196
|
exports.selectDimensionFromHierarchy = selectDimensionFromHierarchy;
|
|
3185
|
-
exports.themeValueMetaKey = themeValueMetaKey;
|
|
3186
3197
|
exports.themed = themed;
|
|
3187
3198
|
exports.timeTemplates = timeTemplates;
|
|
3188
3199
|
exports.transitionMeasureTemplateFormulas = transitionMeasureTemplateFormulas;
|