@infomaximum/widget-sdk 7.0.0-14 → 7.0.0-15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -102,46 +102,6 @@ exports.EActionButtonsTypes = void 0;
102
102
  EActionButtonsTypes["SECONDARY"] = "primary-outlined";
103
103
  })(exports.EActionButtonsTypes || (exports.EActionButtonsTypes = {}));
104
104
 
105
- /**
106
- * Глобальный счетчик для генерации ID.
107
- *
108
- * @todo
109
- * В будущем можно заменить единый счетчик на изолированные счетчики в разных контекстах.
110
- */
111
- var id = 1;
112
- var AutoIdentifiedArrayItemSchema = function (z) {
113
- return z.object({
114
- /**
115
- * Идентификатор, добавляемый системой "на лету" для удобства разработки, не сохраняется на сервер.
116
- * Гарантируется уникальность id в пределах settings виджета.
117
- */
118
- id: z
119
- .number()
120
- .default(-1)
121
- .transform(function (currentId) { return (currentId === -1 ? id++ : currentId); }),
122
- });
123
- };
124
- var BaseWidgetSettingsSchema = function (z) {
125
- return z.object({
126
- title: z.string().default(""),
127
- titleSize: themed(z.number().default(14), function (theme) { return theme.widgets.titleSize; }),
128
- titleColor: themed(ColorSchema(z), function (theme) { return theme.widgets.titleColor; }),
129
- titleWeight: themed(z.enum(exports.EFontWeight).default(exports.EFontWeight.NORMAL), function (theme) { return theme.widgets.titleWeight; }),
130
- stateName: z.string().nullable().default(null),
131
- showMarkdown: z.boolean().default(false),
132
- markdownMeasures: z.array(MarkdownMeasureSchema(z)).default([]),
133
- markdownText: z.string().default(""),
134
- markdownTextSize: z.number().default(14),
135
- filters: z.array(SettingsFilterSchema(z)).default([]),
136
- filterMode: z.enum(exports.EWidgetFilterMode).default(exports.EWidgetFilterMode.DEFAULT),
137
- ignoreFilters: z.boolean().default(false),
138
- sorting: z.array(WidgetSortingIndicatorSchema(z)).default([]),
139
- actionButtons: z.array(ActionButtonSchema(z)).default([]),
140
- paddings: themed(z.union([z.number(), z.string()]).default(8), function (theme) { return theme.widgets.paddings; }),
141
- viewTheme: z.boolean().default(false),
142
- });
143
- };
144
-
145
105
  /******************************************************************************
146
106
  Copyright (c) Microsoft Corporation.
147
107
 
@@ -158,6 +118,20 @@ PERFORMANCE OF THIS SOFTWARE.
158
118
  ***************************************************************************** */
159
119
  /* global Reflect, Promise, SuppressedError, Symbol */
160
120
 
121
+ var extendStatics = function(d, b) {
122
+ extendStatics = Object.setPrototypeOf ||
123
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
124
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
125
+ return extendStatics(d, b);
126
+ };
127
+
128
+ function __extends(d, b) {
129
+ if (typeof b !== "function" && b !== null)
130
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
131
+ extendStatics(d, b);
132
+ function __() { this.constructor = d; }
133
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
134
+ }
161
135
 
162
136
  var __assign = function() {
163
137
  __assign = Object.assign || function __assign(t) {
@@ -211,6 +185,16 @@ function __read(o, n) {
211
185
  return ar;
212
186
  }
213
187
 
188
+ function __spreadArray(to, from, pack) {
189
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
190
+ if (ar || !(i in from)) {
191
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
192
+ ar[i] = from[i];
193
+ }
194
+ }
195
+ return to.concat(ar || Array.prototype.slice.call(from));
196
+ }
197
+
214
198
  function __makeTemplateObject(cooked, raw) {
215
199
  if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
216
200
  return cooked;
@@ -220,6 +204,204 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
220
204
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
221
205
  };
222
206
 
207
+ var compact = function (items) { return ((items === null || items === void 0 ? void 0 : items.filter(Boolean)) || []); };
208
+ var compactMap = function (items, f) {
209
+ return compact(items === null || items === void 0 ? void 0 : items.map(f));
210
+ };
211
+ var isNil = function (value) {
212
+ return value === null || value === undefined;
213
+ };
214
+ function memoize(fn) {
215
+ var cache = new Map();
216
+ return function (arg) {
217
+ if (cache.has(arg)) {
218
+ return cache.get(arg);
219
+ }
220
+ var result = fn(arg);
221
+ cache.set(arg, result);
222
+ return result;
223
+ };
224
+ }
225
+ /** Добавляет свойства к функции */
226
+ function assignPropsToFn(fn, props) {
227
+ return Object.assign(fn, props);
228
+ }
229
+
230
+ /** Фабрика версионированных схем. Не содержит состояния */
231
+ var VersionedSchemaFactory = /** @class */ (function () {
232
+ function VersionedSchemaFactory() {
233
+ }
234
+ VersionedSchemaFactory.compareVersions = function (a, b) {
235
+ var _a, _b;
236
+ var partsA = a.split(".").map(Number);
237
+ var partsB = b.split(".").map(Number);
238
+ var length = Math.max(partsA.length, partsB.length);
239
+ for (var i = 0; i < length; i++) {
240
+ var pa = (_a = partsA[i]) !== null && _a !== void 0 ? _a : 0;
241
+ var pb = (_b = partsB[i]) !== null && _b !== void 0 ? _b : 0;
242
+ var diff = Math.sign(pa - pb);
243
+ if (diff !== 0) {
244
+ return diff;
245
+ }
246
+ }
247
+ return 0;
248
+ };
249
+ VersionedSchemaFactory.findClosestVersion = function (versions, targetVersion, compare) {
250
+ return versions
251
+ .toSorted(function (a, b) { return compare(b, a); })
252
+ .find(function (version) { return compare(version, targetVersion) <= 0; });
253
+ };
254
+ /** Добавляет метаданные к схеме (curried) */
255
+ VersionedSchemaFactory.annotateSchema = function (meta) {
256
+ if (meta === undefined) {
257
+ return function (schemaFactory) { return schemaFactory; };
258
+ }
259
+ return function (schemaFactory) {
260
+ return (function (z) {
261
+ var restArgs = [];
262
+ for (var _i = 1; _i < arguments.length; _i++) {
263
+ restArgs[_i - 1] = arguments[_i];
264
+ }
265
+ return schemaFactory.apply(void 0, __spreadArray([z], __read(restArgs), false)).meta(meta);
266
+ });
267
+ };
268
+ };
269
+ /** Построить версионированную схему */
270
+ VersionedSchemaFactory.build = function (_a) {
271
+ var _this = this;
272
+ var history = _a.history, latestVersion = _a.latestVersion, meta = _a.meta;
273
+ var latestFactory = history[latestVersion];
274
+ if (!latestFactory) {
275
+ throw new Error("Не найдено записи в 'history' по 'latestVersion'");
276
+ }
277
+ var map = this.annotateSchema(meta);
278
+ var schema = assignPropsToFn(map(latestFactory), {
279
+ forVersion: function (targetVersion) {
280
+ if (targetVersion === null || targetVersion === undefined) {
281
+ return map(latestFactory);
282
+ }
283
+ if (targetVersion in history) {
284
+ return map(history[targetVersion]);
285
+ }
286
+ var closestVersion = _this.findClosestVersion(Object.keys(history), targetVersion, VersionedSchemaFactory.compareVersions);
287
+ if (closestVersion === undefined || !(closestVersion in history)) {
288
+ throw new Error("\u041D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E \u043F\u043E\u0434\u0445\u043E\u0434\u044F\u0449\u0435\u0439 \u0441\u0445\u0435\u043C\u044B \u0434\u043B\u044F \u0432\u0435\u0440\u0441\u0438\u0438 '".concat(targetVersion, "'"));
289
+ }
290
+ return map(history[closestVersion]);
291
+ },
292
+ });
293
+ return schema;
294
+ };
295
+ return VersionedSchemaFactory;
296
+ }());
297
+
298
+ /**
299
+ * Глобальный реестр версионированных схем (публичный слой, только чтение).
300
+ *
301
+ * Отвечает за:
302
+ *
303
+ * 1. Хранение зарегистрированных схем
304
+ * 2. Поиск схем по ключу
305
+ *
306
+ * Не предоставляет API для модификации registry.
307
+ */
308
+ var SchemaRegistryReader = /** @class */ (function () {
309
+ function SchemaRegistryReader() {
310
+ }
311
+ /** Получить версионированную схему из `registry` по ключу схемы */
312
+ SchemaRegistryReader.get = function (schemaKey) {
313
+ return this.registry.get(schemaKey);
314
+ };
315
+ /**
316
+ * Имя поля в метаданных схемы, в котором хранится идентификатор типа схемы.
317
+ *
318
+ * Это поле добавляется ко всем схемам, зарегистрированным через `SchemaRegistry`.
319
+ */
320
+ SchemaRegistryReader.typeKey = "type";
321
+ SchemaRegistryReader.registry = new Map();
322
+ return SchemaRegistryReader;
323
+ }());
324
+ /**
325
+ * Глобальный реестр версионированных схем (внутренний слой).
326
+ *
327
+ * Расширяет SchemaRegistryReader возможностью создать запись в registry.
328
+ *
329
+ * Отвечает за:
330
+ * 1. Декларацию схем (build + аннотация)
331
+ * 2. Регистрацию схем по ключу
332
+ */
333
+ var SchemaRegistry = /** @class */ (function (_super) {
334
+ __extends(SchemaRegistry, _super);
335
+ function SchemaRegistry() {
336
+ return _super !== null && _super.apply(this, arguments) || this;
337
+ }
338
+ /** Объявляет версионированную схему и регистрирует её во внутреннем `registry` */
339
+ SchemaRegistry.define = function (_a) {
340
+ var _b;
341
+ var key = _a.key, history = _a.history, latestVersion = _a.latestVersion;
342
+ var schema = VersionedSchemaFactory.build({
343
+ history: history,
344
+ latestVersion: latestVersion,
345
+ meta: (_b = {}, _b[this.typeKey] = key, _b),
346
+ });
347
+ this.registry.set(key, schema);
348
+ return schema;
349
+ };
350
+ return SchemaRegistry;
351
+ }(SchemaRegistryReader));
352
+
353
+ /**
354
+ * Глобальный счетчик для генерации ID.
355
+ *
356
+ * @todo
357
+ * В будущем можно заменить единый счетчик на изолированные счетчики в разных контекстах.
358
+ */
359
+ var id = 1;
360
+ var AutoIdentifiedArrayItemSchema = SchemaRegistry.define({
361
+ key: "AutoIdentifiedArrayItem",
362
+ latestVersion: "17",
363
+ history: {
364
+ "17": function (z) {
365
+ return z.object({
366
+ /**
367
+ * Идентификатор, добавляемый системой "на лету" для удобства разработки, не сохраняется на сервер.
368
+ * Гарантируется уникальность id в пределах settings виджета.
369
+ */
370
+ id: z
371
+ .number()
372
+ .default(-1)
373
+ .transform(function (currentId) { return (currentId === -1 ? id++ : currentId); }),
374
+ });
375
+ },
376
+ },
377
+ });
378
+ var BaseWidgetSettingsSchema = SchemaRegistry.define({
379
+ key: "BaseWidgetSettings",
380
+ latestVersion: "17",
381
+ history: {
382
+ "17": function (z) {
383
+ return z.object({
384
+ title: z.string().default(""),
385
+ titleSize: themed(z.number().default(14), function (theme) { return theme.widgets.titleSize; }),
386
+ titleColor: themed(ColorSchema.forVersion("17")(z), function (theme) { return theme.widgets.titleColor; }),
387
+ titleWeight: themed(z.enum(exports.EFontWeight).default(exports.EFontWeight.NORMAL), function (theme) { return theme.widgets.titleWeight; }),
388
+ stateName: z.string().nullable().default(null),
389
+ showMarkdown: z.boolean().default(false),
390
+ markdownMeasures: z.array(MarkdownMeasureSchema.forVersion("17")(z)).default([]),
391
+ markdownText: z.string().default(""),
392
+ markdownTextSize: z.number().default(14),
393
+ filters: z.array(SettingsFilterSchema.forVersion("17")(z)).default([]),
394
+ filterMode: z.enum(exports.EWidgetFilterMode).default(exports.EWidgetFilterMode.DEFAULT),
395
+ ignoreFilters: z.boolean().default(false),
396
+ sorting: z.array(WidgetSortingIndicatorSchema.forVersion("17")(z)).default([]),
397
+ actionButtons: z.array(ActionButtonSchema.forVersion("17")(z)).default([]),
398
+ paddings: themed(z.union([z.number(), z.string()]).default(8), function (theme) { return theme.widgets.paddings; }),
399
+ viewTheme: z.boolean().default(false),
400
+ });
401
+ },
402
+ },
403
+ });
404
+
223
405
  exports.EWidgetIndicatorType = void 0;
224
406
  (function (EWidgetIndicatorType) {
225
407
  EWidgetIndicatorType["MEASURE"] = "MEASURE";
@@ -359,35 +541,53 @@ exports.EHeightMode = void 0;
359
541
  EHeightMode["PERCENT"] = "PERCENT";
360
542
  })(exports.EHeightMode || (exports.EHeightMode = {}));
361
543
 
362
- var SortDirectionSchema = function (z) {
363
- return z.union([z.literal(exports.ESortDirection.ascend), z.literal(exports.ESortDirection.descend)]);
364
- };
365
- var SortOrderSchema = function (z) {
366
- return z.object({
367
- /** Формула сортировки */
368
- formula: FormulaSchema(z),
369
- /** Тип данных формулы */
370
- dbDataType: z.string().optional(),
371
- /** Направление сортировки */
372
- direction: SortDirectionSchema(z),
373
- /** Условие применения сортировки */
374
- displayCondition: FormulaSchema(z).optional(),
375
- });
376
- };
377
- var WidgetSortingValueSchema = function (z) {
378
- return z.discriminatedUnion("mode", [
379
- z.object({
380
- mode: z.literal(exports.ESortingValueModes.FORMULA),
381
- formula: FormulaSchema(z),
382
- dbDataType: z.string().optional(),
383
- }),
384
- z.object({
385
- mode: z.literal(exports.ESortingValueModes.IN_WIDGET),
386
- group: z.string(),
387
- index: z.number(),
388
- }),
389
- ]);
390
- };
544
+ var SortDirectionSchema = SchemaRegistry.define({
545
+ key: "SortDirection",
546
+ latestVersion: "17",
547
+ history: {
548
+ "17": function (z) {
549
+ return z.union([z.literal(exports.ESortDirection.ascend), z.literal(exports.ESortDirection.descend)]);
550
+ },
551
+ },
552
+ });
553
+ var SortOrderSchema = SchemaRegistry.define({
554
+ key: "SortOrder",
555
+ latestVersion: "17",
556
+ history: {
557
+ "17": function (z) {
558
+ return z.object({
559
+ /** Формула сортировки */
560
+ formula: FormulaSchema.forVersion("17")(z),
561
+ /** Тип данных формулы */
562
+ dbDataType: z.string().optional(),
563
+ /** Направление сортировки */
564
+ direction: SortDirectionSchema.forVersion("17")(z),
565
+ /** Условие применения сортировки */
566
+ displayCondition: FormulaSchema.forVersion("17")(z).optional(),
567
+ });
568
+ },
569
+ },
570
+ });
571
+ var WidgetSortingValueSchema = SchemaRegistry.define({
572
+ key: "WidgetSortingValue",
573
+ latestVersion: "17",
574
+ history: {
575
+ "17": function (z) {
576
+ return z.discriminatedUnion("mode", [
577
+ z.object({
578
+ mode: z.literal(exports.ESortingValueModes.FORMULA),
579
+ formula: FormulaSchema.forVersion("17")(z),
580
+ dbDataType: z.string().optional(),
581
+ }),
582
+ z.object({
583
+ mode: z.literal(exports.ESortingValueModes.IN_WIDGET),
584
+ group: z.string(),
585
+ index: z.number(),
586
+ }),
587
+ ]);
588
+ },
589
+ },
590
+ });
391
591
 
392
592
  /** Ключи мета-данных внутри схем настроек */
393
593
  exports.ESettingsSchemaMetaKey = void 0;
@@ -399,35 +599,59 @@ exports.ESettingsSchemaMetaKey = void 0;
399
599
  })(exports.ESettingsSchemaMetaKey || (exports.ESettingsSchemaMetaKey = {}));
400
600
 
401
601
  var _a$7;
402
- var RangeSchema = function (z) {
403
- return z.object({
404
- unit: z.string().optional(),
405
- min: z.number().optional(),
406
- max: z.number().optional(),
407
- });
408
- };
409
- var DisplayConditionSchema = function (z) {
410
- return z
411
- .discriminatedUnion("mode", [
412
- z.object({
413
- mode: z.literal(exports.EDisplayConditionMode.DISABLED),
414
- }),
415
- z.object({
416
- mode: z.literal(exports.EDisplayConditionMode.FORMULA),
417
- formula: FormulaSchema(z),
418
- }),
419
- z.object({
420
- mode: z.literal(exports.EDisplayConditionMode.VARIABLE),
421
- variableName: NameNullableSchema(z),
422
- variableValue: z.string().nullable().default(null),
423
- }),
424
- ])
425
- .default({ mode: exports.EDisplayConditionMode.DISABLED });
426
- };
602
+ var RangeSchema = SchemaRegistry.define({
603
+ key: "Range",
604
+ latestVersion: "17",
605
+ history: {
606
+ "17": function (z) {
607
+ return z.object({
608
+ unit: z.string().optional(),
609
+ min: z.number().optional(),
610
+ max: z.number().optional(),
611
+ });
612
+ },
613
+ },
614
+ });
615
+ var DisplayConditionSchema = SchemaRegistry.define({
616
+ key: "DisplayCondition",
617
+ latestVersion: "17",
618
+ history: {
619
+ "17": function (z) {
620
+ return z
621
+ .discriminatedUnion("mode", [
622
+ z.object({
623
+ mode: z.literal(exports.EDisplayConditionMode.DISABLED),
624
+ }),
625
+ z.object({
626
+ mode: z.literal(exports.EDisplayConditionMode.FORMULA),
627
+ formula: FormulaSchema.forVersion("17")(z),
628
+ }),
629
+ z.object({
630
+ mode: z.literal(exports.EDisplayConditionMode.VARIABLE),
631
+ variableName: NameNullableSchema.forVersion("17")(z),
632
+ variableValue: z.string().nullable().default(null),
633
+ }),
634
+ ])
635
+ .default({ mode: exports.EDisplayConditionMode.DISABLED });
636
+ },
637
+ },
638
+ });
427
639
  /** Схема ключа сущности (с возможностью находиться в неинициализированном состоянии) */
428
- var KeyNullableSchema = function (z) { return z.string().nullable().default(null); };
640
+ var KeyNullableSchema = SchemaRegistry.define({
641
+ key: "KeyNullable",
642
+ latestVersion: "17",
643
+ history: {
644
+ "17": function (z) { return z.string().nullable().default(null); },
645
+ },
646
+ });
429
647
  /** Схема имени сущности (с возможностью находиться в неинициализированном состоянии) */
430
- var NameNullableSchema = function (z) { return z.string().nullable().default(null); };
648
+ var NameNullableSchema = SchemaRegistry.define({
649
+ key: "NameNullable",
650
+ latestVersion: "17",
651
+ history: {
652
+ "17": function (z) { return z.string().nullable().default(null); },
653
+ },
654
+ });
431
655
  /**
432
656
  * Перечисление системных типов сущностей в схеме настроек виджетов.
433
657
  * @note при расширении лучше положить на более общий уровень.
@@ -438,571 +662,929 @@ var EEntity;
438
662
  })(EEntity || (EEntity = {}));
439
663
  var formulaMeta = Object.freeze((_a$7 = {}, _a$7[exports.ESettingsSchemaMetaKey.entity] = EEntity.formula, _a$7));
440
664
  /** Схема формулы */
441
- var FormulaSchema = function (z) { return z.string().default("").meta(formulaMeta); };
665
+ var FormulaSchema = SchemaRegistry.define({
666
+ key: "Formula",
667
+ latestVersion: "17",
668
+ history: {
669
+ "17": function (z) { return z.string().default("").meta(formulaMeta); },
670
+ },
671
+ });
442
672
  /**
443
673
  * Схема формулы, которая не может быть пустой строкой, но может быть в
444
674
  * неинициализированном состоянии null (вместо пустой строки)
445
675
  *
446
676
  * @note для обратной совместимости без необходимости писать миграции
447
677
  */
448
- var FormulaNullableSchema = function (z) {
449
- return z.string().nullable().default(null).meta(formulaMeta);
450
- };
678
+ var FormulaNullableSchema = SchemaRegistry.define({
679
+ key: "FormulaNullable",
680
+ latestVersion: "17",
681
+ history: {
682
+ "17": function (z) { return z.string().nullable().default(null).meta(formulaMeta); },
683
+ },
684
+ });
451
685
 
452
- var WidgetIndicatorSchema = function (z) {
453
- return AutoIdentifiedArrayItemSchema(z).extend({
454
- name: z.string(),
455
- });
456
- };
457
- var FormatSchema = function (z) {
458
- return z
459
- .discriminatedUnion("mode", [
460
- z.object({
461
- mode: z.literal(exports.EFormatOrFormattingMode.BASE),
462
- value: z.enum(biFormatting.EFormatTypes).default(biFormatting.EFormatTypes.STRING).optional(),
463
- }),
464
- z.object({
465
- mode: z.literal(exports.EFormatOrFormattingMode.TEMPLATE),
466
- value: z.string().default("").optional(),
467
- }),
468
- ])
469
- .default({ mode: exports.EFormatOrFormattingMode.BASE, value: biFormatting.EFormatTypes.STRING });
470
- };
471
- var FormattingSchema = function (z) {
472
- return z
473
- .discriminatedUnion("mode", [
474
- z.object({
475
- mode: z.literal(exports.EFormatOrFormattingMode.BASE),
476
- value: z.enum(biFormatting.EFormattingPresets).default(biFormatting.EFormattingPresets.AUTO),
477
- }),
478
- z.object({
479
- mode: z.literal(exports.EFormatOrFormattingMode.TEMPLATE),
480
- value: z.string().default(""),
481
- }),
482
- ])
483
- .default({ mode: exports.EFormatOrFormattingMode.BASE, value: biFormatting.EFormattingPresets.AUTO });
484
- };
485
- var WidgetColumnIndicatorSchema = function (z) {
486
- return WidgetIndicatorSchema(z).extend({
487
- dbDataType: z.string().optional(),
488
- format: FormatSchema(z).optional(),
489
- formatting: FormattingSchema(z).optional(),
490
- displayCondition: DisplayConditionSchema(z),
491
- onClick: z.array(ActionsOnClickSchema(z)).optional(),
492
- });
493
- };
494
- var WidgetIndicatorFormulaValueSchema = function (z) {
495
- return z.object({
496
- mode: z.literal(exports.EWidgetIndicatorValueModes.FORMULA),
497
- formula: FormulaSchema(z).optional(),
498
- });
499
- };
500
- var WidgetIndicatorTemplateValueSchema = function (z) {
501
- return z.object({
502
- mode: z.literal(exports.EWidgetIndicatorValueModes.TEMPLATE),
503
- /** Имя шаблонной формулы, использующей колонку таблицы */
504
- templateName: z.string().optional(),
505
- /** Имя таблицы */
506
- tableName: z.string().optional(),
507
- /** Имя колонки */
508
- columnName: z.string().optional(),
509
- });
510
- };
511
- var ColumnIndicatorValueSchema = function (z) {
512
- return z.union([MeasureValueSchema(z), DimensionValueSchema(z)]);
513
- };
514
- var MeasureValueSchema = function (z) {
515
- return z.discriminatedUnion("mode", [
516
- WidgetIndicatorFormulaValueSchema(z),
517
- WidgetIndicatorTemplateValueSchema(z).extend({
518
- innerTemplateName: z.enum(exports.EMeasureInnerTemplateNames).optional(),
519
- }),
520
- ]);
521
- };
522
- var DimensionValueSchema = function (z) {
523
- return z.discriminatedUnion("mode", [
524
- WidgetIndicatorFormulaValueSchema(z),
525
- WidgetIndicatorTemplateValueSchema(z).extend({
526
- innerTemplateName: z.never().optional(),
527
- }),
528
- ]);
529
- };
530
- var WidgetIndicatorAggregationValueSchema = function (z) {
531
- return z.object({
532
- mode: z.literal(exports.EWidgetIndicatorValueModes.AGGREGATION),
533
- templateName: z.string(),
534
- processKey: KeyNullableSchema(z),
535
- eventName: NameNullableSchema(z),
536
- eventNameFormula: FormulaNullableSchema(z),
537
- anyEvent: z.literal(true).optional(),
538
- caseCaseIdFormula: FormulaNullableSchema(z),
539
- filters: z.array(ExtendedFormulaFilterValueSchema(z)).default([]),
540
- tableName: z.string().optional(),
541
- columnName: z.string().optional(),
542
- eventTimeFormula: FormulaNullableSchema(z).optional(),
543
- innerTemplateName: z.string().optional(),
544
- });
545
- };
546
- var WidgetMeasureAggregationValueSchema = function (z) {
547
- return WidgetIndicatorAggregationValueSchema(z).extend({ outerAggregation: z.enum(exports.EOuterAggregation) });
548
- };
549
- var WidgetIndicatorTimeValueSchema = function (z) {
550
- return z.object({
551
- templateName: z.string(),
552
- mode: z.union([
553
- z.literal(exports.EWidgetIndicatorValueModes.START_TIME),
554
- z.literal(exports.EWidgetIndicatorValueModes.END_TIME),
555
- ]),
556
- processKey: KeyNullableSchema(z),
557
- eventName: NameNullableSchema(z),
558
- eventTimeFormula: FormulaNullableSchema(z),
559
- caseCaseIdFormula: FormulaNullableSchema(z),
560
- eventNameFormula: FormulaNullableSchema(z),
561
- filters: z.array(ExtendedFormulaFilterValueSchema(z)).default([]),
562
- });
563
- };
564
- var WidgetDimensionSchema = function (z) {
565
- return WidgetColumnIndicatorSchema(z).extend({
566
- value: z
567
- .discriminatedUnion("mode", [
568
- DimensionValueSchema(z),
569
- WidgetIndicatorAggregationValueSchema(z).extend({
686
+ var WidgetIndicatorSchema = SchemaRegistry.define({
687
+ key: "WidgetIndicator",
688
+ latestVersion: "17",
689
+ history: {
690
+ "17": function (z) {
691
+ return AutoIdentifiedArrayItemSchema.forVersion("17")(z).extend({
692
+ name: z.string(),
693
+ });
694
+ },
695
+ },
696
+ });
697
+ var FormatSchema = SchemaRegistry.define({
698
+ key: "Format",
699
+ latestVersion: "17",
700
+ history: {
701
+ "17": function (z) {
702
+ return z
703
+ .discriminatedUnion("mode", [
704
+ z.object({
705
+ mode: z.literal(exports.EFormatOrFormattingMode.BASE),
706
+ value: z.enum(biFormatting.EFormatTypes).default(biFormatting.EFormatTypes.STRING).optional(),
707
+ }),
708
+ z.object({
709
+ mode: z.literal(exports.EFormatOrFormattingMode.TEMPLATE),
710
+ value: z.string().default("").optional(),
711
+ }),
712
+ ])
713
+ .default({ mode: exports.EFormatOrFormattingMode.BASE, value: biFormatting.EFormatTypes.STRING });
714
+ },
715
+ },
716
+ });
717
+ var FormattingSchema = SchemaRegistry.define({
718
+ key: "Formatting",
719
+ latestVersion: "17",
720
+ history: {
721
+ "17": function (z) {
722
+ return z
723
+ .discriminatedUnion("mode", [
724
+ z.object({
725
+ mode: z.literal(exports.EFormatOrFormattingMode.BASE),
726
+ value: z.enum(biFormatting.EFormattingPresets).default(biFormatting.EFormattingPresets.AUTO),
727
+ }),
728
+ z.object({
729
+ mode: z.literal(exports.EFormatOrFormattingMode.TEMPLATE),
730
+ value: z.string().default(""),
731
+ }),
732
+ ])
733
+ .default({ mode: exports.EFormatOrFormattingMode.BASE, value: biFormatting.EFormattingPresets.AUTO });
734
+ },
735
+ },
736
+ });
737
+ var WidgetColumnIndicatorSchema = SchemaRegistry.define({
738
+ key: "WidgetColumnIndicator",
739
+ latestVersion: "17",
740
+ history: {
741
+ "17": function (z) {
742
+ return WidgetIndicatorSchema.forVersion("17")(z).extend({
743
+ dbDataType: z.string().optional(),
744
+ format: FormatSchema.forVersion("17")(z).optional(),
745
+ formatting: FormattingSchema.forVersion("17")(z).optional(),
746
+ displayCondition: DisplayConditionSchema.forVersion("17")(z),
747
+ onClick: z.array(ActionsOnClickSchema.forVersion("17")(z)).default([]).optional(),
748
+ });
749
+ },
750
+ },
751
+ });
752
+ var WidgetIndicatorFormulaValueSchema = SchemaRegistry.define({
753
+ key: "WidgetIndicatorFormulaValue",
754
+ latestVersion: "17",
755
+ history: {
756
+ "17": function (z) {
757
+ return z.object({
758
+ mode: z.literal(exports.EWidgetIndicatorValueModes.FORMULA),
759
+ formula: FormulaSchema.forVersion("17")(z).optional(),
760
+ });
761
+ },
762
+ },
763
+ });
764
+ var WidgetIndicatorTemplateValueSchema = SchemaRegistry.define({
765
+ key: "WidgetIndicatorTemplateValue",
766
+ latestVersion: "17",
767
+ history: {
768
+ "17": function (z) {
769
+ return z.object({
770
+ mode: z.literal(exports.EWidgetIndicatorValueModes.TEMPLATE),
771
+ /** Имя шаблонной формулы, использующей колонку таблицы */
772
+ templateName: z.string().optional(),
773
+ /** Имя таблицы */
774
+ tableName: z.string().optional(),
775
+ /** Имя колонки */
776
+ columnName: z.string().optional(),
777
+ });
778
+ },
779
+ },
780
+ });
781
+ var ColumnIndicatorValueSchema = SchemaRegistry.define({
782
+ key: "ColumnIndicatorValue",
783
+ latestVersion: "17",
784
+ history: {
785
+ "17": function (z) {
786
+ return z.union([MeasureValueSchema.forVersion("17")(z), DimensionValueSchema.forVersion("17")(z)]);
787
+ },
788
+ },
789
+ });
790
+ var MeasureValueSchema = SchemaRegistry.define({
791
+ key: "MeasureValue",
792
+ latestVersion: "17",
793
+ history: {
794
+ "17": function (z) {
795
+ return z.discriminatedUnion("mode", [
796
+ WidgetIndicatorFormulaValueSchema.forVersion("17")(z),
797
+ WidgetIndicatorTemplateValueSchema.forVersion("17")(z).extend({
798
+ innerTemplateName: z.enum(exports.EMeasureInnerTemplateNames).optional(),
799
+ }),
800
+ ]);
801
+ },
802
+ },
803
+ });
804
+ var DimensionValueSchema = SchemaRegistry.define({
805
+ key: "DimensionValue",
806
+ latestVersion: "17",
807
+ history: {
808
+ "17": function (z) {
809
+ return z.discriminatedUnion("mode", [
810
+ WidgetIndicatorFormulaValueSchema.forVersion("17")(z),
811
+ WidgetIndicatorTemplateValueSchema.forVersion("17")(z).extend({
812
+ innerTemplateName: z.never().optional(),
813
+ }),
814
+ ]);
815
+ },
816
+ },
817
+ });
818
+ var WidgetIndicatorAggregationValueSchema = SchemaRegistry.define({
819
+ key: "WidgetIndicatorAggregationValue",
820
+ latestVersion: "17",
821
+ history: {
822
+ "17": function (z) {
823
+ return z.object({
824
+ mode: z.literal(exports.EWidgetIndicatorValueModes.AGGREGATION),
825
+ templateName: z.string(),
826
+ processKey: KeyNullableSchema.forVersion("17")(z),
827
+ eventName: NameNullableSchema.forVersion("17")(z),
828
+ eventNameFormula: FormulaNullableSchema.forVersion("17")(z),
829
+ anyEvent: z.literal(true).optional(),
830
+ caseCaseIdFormula: FormulaNullableSchema.forVersion("17")(z),
831
+ filters: z.array(ExtendedFormulaFilterValueSchema.forVersion("17")(z)).default([]),
832
+ tableName: z.string().optional(),
833
+ columnName: z.string().optional(),
834
+ eventTimeFormula: FormulaNullableSchema.forVersion("17")(z).optional(),
570
835
  innerTemplateName: z.string().optional(),
571
- }),
572
- WidgetIndicatorTimeValueSchema(z),
573
- ])
574
- .optional(),
575
- hideEmptyValues: z.boolean().default(false),
576
- });
577
- };
578
- var WidgetDimensionInHierarchySchema = function (z) {
579
- return WidgetDimensionSchema(z).omit({ displayCondition: true });
580
- };
581
- var WidgetDimensionHierarchySchema = function (z, dimensionSchema) {
582
- return AutoIdentifiedArrayItemSchema(z).extend({
583
- name: z.string(),
584
- // Для иерархии является дискриминатором, для него нельзя задавать дефолтное значение.
585
- hierarchyDimensions: z.array(dimensionSchema),
586
- displayCondition: DisplayConditionSchema(z),
587
- });
588
- };
589
- var WidgetIndicatorConversionValueSchema = function (z) {
590
- return z.object({
591
- mode: z.literal(exports.EWidgetIndicatorValueModes.CONVERSION),
592
- startEventNameFormula: FormulaNullableSchema(z),
593
- startEventProcessKey: KeyNullableSchema(z),
594
- startEventName: NameNullableSchema(z),
595
- startEventFilters: z.array(ExtendedFormulaFilterValueSchema(z)).default([]),
596
- startEventTimeFormula: FormulaNullableSchema(z),
597
- endEventNameFormula: FormulaNullableSchema(z),
598
- endEventProcessKey: KeyNullableSchema(z),
599
- endEventName: NameNullableSchema(z),
600
- endEventFilters: z.array(ExtendedFormulaFilterValueSchema(z)).default([]),
601
- endCaseCaseIdFormula: FormulaNullableSchema(z),
602
- endEventTimeFormula: FormulaNullableSchema(z),
603
- });
604
- };
605
- var WidgetIndicatorDurationValueSchema = function (z) {
606
- return WidgetIndicatorConversionValueSchema(z).extend({
607
- mode: z.literal(exports.EWidgetIndicatorValueModes.DURATION),
608
- templateName: z.string(),
609
- startEventAppearances: z.enum(exports.EEventAppearances),
610
- endEventAppearances: z.enum(exports.EEventAppearances),
611
- });
612
- };
613
- var WidgetMeasureSchema = function (z) {
614
- return WidgetColumnIndicatorSchema(z).extend({
615
- value: z
616
- .discriminatedUnion("mode", [
617
- MeasureValueSchema(z),
618
- WidgetMeasureAggregationValueSchema(z),
619
- WidgetIndicatorConversionValueSchema(z),
620
- WidgetIndicatorDurationValueSchema(z),
621
- ])
622
- .optional(),
623
- });
624
- };
625
- var MarkdownMeasureSchema = function (z) {
626
- return WidgetMeasureSchema(z).extend({
627
- displaySign: z.enum(exports.EMarkdownDisplayMode).default(exports.EMarkdownDisplayMode.NONE),
628
- });
629
- };
630
- var WidgetSortingIndicatorSchema = function (z) {
631
- return WidgetIndicatorSchema(z).extend({
632
- direction: SortDirectionSchema(z),
633
- value: WidgetSortingValueSchema(z),
634
- });
635
- };
636
- var ProcessIndicatorValueSchema = function (z) {
637
- return z.discriminatedUnion("mode", [
638
- z.object({
639
- mode: z.literal(exports.EWidgetIndicatorValueModes.FORMULA),
640
- formula: FormulaSchema(z),
641
- }),
642
- z.object({
643
- mode: z.literal(exports.EWidgetIndicatorValueModes.TEMPLATE),
644
- /** Имя шаблонной формулы, использующей колонку таблицы */
645
- templateName: z.string(),
646
- }),
647
- ]);
648
- };
649
- var ProcessIndicatorSchema = function (z) {
650
- return WidgetIndicatorSchema(z).extend({
651
- value: ProcessIndicatorValueSchema(z).optional(),
652
- dbDataType: z.string().optional(),
653
- format: FormatSchema(z).optional(),
654
- formatting: FormattingSchema(z).optional(),
655
- displayCondition: DisplayConditionSchema(z),
656
- });
657
- };
658
-
659
- var FormulaFilterValueSchema = function (z) {
660
- var _a;
661
- return z.object({
662
- name: z.string().nullish(),
663
- formula: z.string(),
664
- sliceIndex: z.number().optional(),
665
- dbDataType: z.string(),
666
- format: z.union([z.enum(biFormatting.EFormatTypes), z.string()]).optional(),
667
- filteringMethod: z.enum(Object.values(formulaFilterMethods)),
668
- checkedValues: z.array(z.string().nullable()).optional(),
669
- formValues: z
670
- .object((_a = {},
671
- _a[exports.EFormulaFilterFieldKeys.date] = z.string().nullable(),
672
- _a[exports.EFormulaFilterFieldKeys.dateRange] = z.tuple([z.string(), z.string()]),
673
- _a[exports.EFormulaFilterFieldKeys.numberRange] = z.tuple([
674
- z.number().nullable(),
675
- z.number().nullable(),
676
- ]),
677
- _a[exports.EFormulaFilterFieldKeys.string] = z.string(),
678
- // todo: отказаться от использования z.string(), оставить только z.number() [BI-15912]
679
- _a[exports.EFormulaFilterFieldKeys.lastTimeValue] = z.number().or(z.string()),
680
- _a[exports.EFormulaFilterFieldKeys.lastTimeUnit] = z.enum(exports.ELastTimeUnit),
681
- _a[exports.EFormulaFilterFieldKeys.durationUnit] = z.enum(exports.EDurationUnit),
682
- _a))
683
- .partial()
684
- .optional(),
685
- });
686
- };
687
- var ExtendedFormulaFilterValueSchema = function (z) {
688
- return z.union([FormulaFilterValueSchema(z), z.object({ formula: z.string() })]);
689
- };
690
- var DimensionProcessFilterSchema = function (z) {
691
- return z.object({
692
- value: z.union([
693
- WidgetIndicatorAggregationValueSchema(z).extend({
836
+ });
837
+ },
838
+ },
839
+ });
840
+ var WidgetMeasureAggregationValueSchema = SchemaRegistry.define({
841
+ key: "WidgetMeasureAggregationValue",
842
+ latestVersion: "17",
843
+ history: {
844
+ "17": function (z) {
845
+ return WidgetIndicatorAggregationValueSchema.forVersion("17")(z).extend({
694
846
  outerAggregation: z.enum(exports.EOuterAggregation),
695
- }),
696
- WidgetIndicatorAggregationValueSchema(z).extend({
697
- innerTemplateName: z.string().optional(),
698
- }),
699
- WidgetIndicatorTimeValueSchema(z),
700
- z.object({
701
- mode: z.literal(exports.EWidgetIndicatorValueModes.FORMULA),
702
- formula: z.string().optional(),
703
- }),
704
- ]),
705
- dbDataType: z.string(),
706
- condition: z.object({
707
- filteringMethod: z.enum(Object.values(formulaFilterMethods)),
708
- timeUnit: z.enum(exports.EDimensionProcessFilterTimeUnit).optional(),
709
- values: z.array(z.string().nullable()),
710
- }),
711
- });
712
- };
713
- var SettingsFilterSchema = function (z) {
714
- return z.union([ExtendedFormulaFilterValueSchema(z), DimensionProcessFilterSchema(z)]);
715
- };
847
+ });
848
+ },
849
+ },
850
+ });
851
+ var WidgetIndicatorTimeValueSchema = SchemaRegistry.define({
852
+ key: "WidgetIndicatorTimeValue",
853
+ latestVersion: "17",
854
+ history: {
855
+ "17": function (z) {
856
+ return z.object({
857
+ templateName: z.string(),
858
+ mode: z.union([
859
+ z.literal(exports.EWidgetIndicatorValueModes.START_TIME),
860
+ z.literal(exports.EWidgetIndicatorValueModes.END_TIME),
861
+ ]),
862
+ processKey: KeyNullableSchema.forVersion("17")(z),
863
+ eventName: NameNullableSchema.forVersion("17")(z),
864
+ eventTimeFormula: FormulaNullableSchema.forVersion("17")(z),
865
+ caseCaseIdFormula: FormulaNullableSchema.forVersion("17")(z),
866
+ eventNameFormula: FormulaNullableSchema.forVersion("17")(z),
867
+ filters: z.array(ExtendedFormulaFilterValueSchema.forVersion("17")(z)).default([]),
868
+ });
869
+ },
870
+ },
871
+ });
872
+ var WidgetDimensionSchema = SchemaRegistry.define({
873
+ key: "WidgetDimension",
874
+ latestVersion: "17",
875
+ history: {
876
+ "17": function (z) {
877
+ return WidgetColumnIndicatorSchema.forVersion("17")(z).extend({
878
+ value: z
879
+ .discriminatedUnion("mode", [
880
+ DimensionValueSchema.forVersion("17")(z),
881
+ WidgetIndicatorAggregationValueSchema.forVersion("17")(z).extend({
882
+ innerTemplateName: z.string().optional(),
883
+ }),
884
+ WidgetIndicatorTimeValueSchema.forVersion("17")(z),
885
+ ])
886
+ .optional(),
887
+ hideEmptyValues: z.boolean().default(false),
888
+ });
889
+ },
890
+ },
891
+ });
892
+ var WidgetDimensionInHierarchySchema = SchemaRegistry.define({
893
+ key: "WidgetDimensionInHierarchy",
894
+ latestVersion: "17",
895
+ history: {
896
+ "17": function (z) { return WidgetDimensionSchema.forVersion("17")(z).omit({ displayCondition: true }); },
897
+ },
898
+ });
899
+ var WidgetDimensionHierarchySchema = SchemaRegistry.define({
900
+ key: "WidgetDimensionHierarchy",
901
+ latestVersion: "17",
902
+ history: {
903
+ "17": function (z, dimensionSchema) {
904
+ return AutoIdentifiedArrayItemSchema.forVersion("17")(z).extend({
905
+ name: z.string(),
906
+ // Для иерархии является дискриминатором, для него нельзя задавать дефолтное значение.
907
+ hierarchyDimensions: z.array(dimensionSchema),
908
+ displayCondition: DisplayConditionSchema.forVersion("17")(z),
909
+ });
910
+ },
911
+ },
912
+ });
913
+ var WidgetIndicatorConversionValueSchema = SchemaRegistry.define({
914
+ key: "WidgetIndicatorConversionValue",
915
+ latestVersion: "17",
916
+ history: {
917
+ "17": function (z) {
918
+ return z.object({
919
+ mode: z.literal(exports.EWidgetIndicatorValueModes.CONVERSION),
920
+ startEventNameFormula: FormulaNullableSchema.forVersion("17")(z),
921
+ startEventProcessKey: KeyNullableSchema.forVersion("17")(z),
922
+ startEventName: NameNullableSchema.forVersion("17")(z),
923
+ startEventFilters: z
924
+ .array(ExtendedFormulaFilterValueSchema.forVersion("17")(z))
925
+ .default([]),
926
+ startEventTimeFormula: FormulaNullableSchema.forVersion("17")(z),
927
+ endEventNameFormula: FormulaNullableSchema.forVersion("17")(z),
928
+ endEventProcessKey: KeyNullableSchema.forVersion("17")(z),
929
+ endEventName: NameNullableSchema.forVersion("17")(z),
930
+ endEventFilters: z.array(ExtendedFormulaFilterValueSchema.forVersion("17")(z)).default([]),
931
+ endCaseCaseIdFormula: FormulaNullableSchema.forVersion("17")(z),
932
+ endEventTimeFormula: FormulaNullableSchema.forVersion("17")(z),
933
+ });
934
+ },
935
+ },
936
+ });
937
+ var WidgetIndicatorDurationValueSchema = SchemaRegistry.define({
938
+ key: "WidgetIndicatorDurationValue",
939
+ latestVersion: "17",
940
+ history: {
941
+ "17": function (z) {
942
+ return WidgetIndicatorConversionValueSchema.forVersion("17")(z).extend({
943
+ mode: z.literal(exports.EWidgetIndicatorValueModes.DURATION),
944
+ templateName: z.string(),
945
+ startEventAppearances: z.enum(exports.EEventAppearances),
946
+ endEventAppearances: z.enum(exports.EEventAppearances),
947
+ });
948
+ },
949
+ },
950
+ });
951
+ var WidgetMeasureSchema = SchemaRegistry.define({
952
+ key: "WidgetMeasure",
953
+ latestVersion: "17",
954
+ history: {
955
+ "17": function (z) {
956
+ return WidgetColumnIndicatorSchema.forVersion("17")(z).extend({
957
+ value: z
958
+ .discriminatedUnion("mode", [
959
+ MeasureValueSchema.forVersion("17")(z),
960
+ WidgetMeasureAggregationValueSchema.forVersion("17")(z),
961
+ WidgetIndicatorConversionValueSchema.forVersion("17")(z),
962
+ WidgetIndicatorDurationValueSchema.forVersion("17")(z),
963
+ ])
964
+ .optional(),
965
+ });
966
+ },
967
+ },
968
+ });
969
+ var MarkdownMeasureSchema = SchemaRegistry.define({
970
+ key: "MarkdownMeasure",
971
+ latestVersion: "17",
972
+ history: {
973
+ "17": function (z) {
974
+ return WidgetMeasureSchema.forVersion("17")(z).extend({
975
+ displaySign: z.enum(exports.EMarkdownDisplayMode).default(exports.EMarkdownDisplayMode.NONE),
976
+ });
977
+ },
978
+ },
979
+ });
980
+ var WidgetSortingIndicatorSchema = SchemaRegistry.define({
981
+ key: "WidgetSortingIndicator",
982
+ latestVersion: "17",
983
+ history: {
984
+ "17": function (z) {
985
+ return WidgetIndicatorSchema.forVersion("17")(z).extend({
986
+ direction: SortDirectionSchema.forVersion("17")(z),
987
+ value: WidgetSortingValueSchema.forVersion("17")(z),
988
+ });
989
+ },
990
+ },
991
+ });
992
+ var ProcessIndicatorValueSchema = SchemaRegistry.define({
993
+ key: "ProcessIndicatorValue",
994
+ latestVersion: "17",
995
+ history: {
996
+ "17": function (z) {
997
+ return z.discriminatedUnion("mode", [
998
+ z.object({
999
+ mode: z.literal(exports.EWidgetIndicatorValueModes.FORMULA),
1000
+ formula: FormulaSchema.forVersion("17")(z),
1001
+ }),
1002
+ z.object({
1003
+ mode: z.literal(exports.EWidgetIndicatorValueModes.TEMPLATE),
1004
+ /** Имя шаблонной формулы, использующей колонку таблицы */
1005
+ templateName: z.string(),
1006
+ }),
1007
+ ]);
1008
+ },
1009
+ },
1010
+ });
1011
+ var ProcessIndicatorSchema = SchemaRegistry.define({
1012
+ key: "ProcessIndicator",
1013
+ latestVersion: "17",
1014
+ history: {
1015
+ "17": function (z) {
1016
+ return WidgetIndicatorSchema.forVersion("17")(z).extend({
1017
+ value: ProcessIndicatorValueSchema.forVersion("17")(z).optional(),
1018
+ dbDataType: z.string().optional(),
1019
+ format: FormatSchema.forVersion("17")(z).optional(),
1020
+ formatting: FormattingSchema.forVersion("17")(z).optional(),
1021
+ displayCondition: DisplayConditionSchema.forVersion("17")(z),
1022
+ });
1023
+ },
1024
+ },
1025
+ });
716
1026
 
717
- var ActionOnClickParameterCommonSchema = function (z) {
718
- return AutoIdentifiedArrayItemSchema(z).extend({
719
- name: z.string(),
720
- });
721
- };
722
- var ParameterFromColumnSchema = function (z) {
723
- return z.object({
724
- inputMethod: z.literal(exports.EWidgetActionInputMethod.COLUMN),
725
- tableName: z.string().nullable().default(null),
726
- columnName: z.string().nullable().default(null),
727
- dbDataType: z.string().optional(),
728
- });
729
- };
730
- var ParameterFromVariableSchema = function (z) {
731
- return z.object({
732
- inputMethod: z.literal(exports.EWidgetActionInputMethod.VARIABLE),
733
- sourceVariable: z.string().nullable().default(null),
734
- });
735
- };
736
- var ParameterFromFormulaSchema = function (z) {
737
- return z.object({
738
- inputMethod: z.literal(exports.EWidgetActionInputMethod.FORMULA),
739
- formula: FormulaSchema(z),
740
- considerFilters: z.boolean().default(false),
741
- dbDataType: z.string().optional(),
742
- });
743
- };
744
- var ParameterFromEventSchema = function (z) {
745
- return z.object({
746
- inputMethod: z.literal(exports.EWidgetActionInputMethod.EVENT),
747
- });
748
- };
749
- var ParameterFromStartEventSchema = function (z) {
750
- return z.object({
751
- inputMethod: z.literal(exports.EWidgetActionInputMethod.START_EVENT),
752
- });
753
- };
754
- var ParameterFromEndEventSchema = function (z) {
755
- return z.object({
756
- inputMethod: z.literal(exports.EWidgetActionInputMethod.FINISH_EVENT),
757
- });
758
- };
759
- var ParameterFromAggregationSchema = function (z) {
760
- return z.object({
761
- inputMethod: z.literal(exports.EWidgetActionInputMethod.AGGREGATION),
762
- formula: FormulaSchema(z),
763
- considerFilters: z.boolean().default(false),
764
- dbDataType: z.string().optional(),
765
- });
766
- };
767
- var ParameterFromManualInputSchema = function (z) {
768
- return z.object({
769
- inputMethod: z.literal(exports.EWidgetActionInputMethod.MANUALLY),
770
- description: z.string().default(""),
771
- defaultValue: FormulaSchema(z),
772
- dbDataType: z.string().optional(),
773
- filterByRows: z.boolean().default(false),
774
- validation: FormulaSchema(z),
775
- acceptEmptyValue: z.boolean().default(false),
776
- });
777
- };
778
- var ParameterFromStaticListSchema = function (z) {
779
- return z.object({
780
- inputMethod: z.literal(exports.EWidgetActionInputMethod.STATIC_LIST),
781
- options: z.string().default(""),
782
- defaultValue: z
783
- .union([z.string(), z.array(z.string())])
784
- .nullable()
785
- .default(null),
786
- acceptEmptyValue: z.boolean().default(false),
787
- });
788
- };
789
- var ParameterFromDynamicListSchema = function (z) {
790
- return z.object({
791
- inputMethod: z.literal(exports.EWidgetActionInputMethod.DYNAMIC_LIST),
792
- options: FormulaSchema(z),
793
- defaultValue: FormulaSchema(z),
794
- dbDataType: z.string().optional(),
795
- displayOptions: FormulaSchema(z),
796
- filters: z.array(ExtendedFormulaFilterValueSchema(z)).default([]),
797
- filterByRows: z.boolean().default(false),
798
- considerFilters: z.boolean().default(false),
799
- insertAnyValues: z.boolean().default(false),
800
- validation: FormulaSchema(z),
801
- acceptEmptyValue: z.boolean().default(false),
802
- });
803
- };
804
- var ParameterFromDataModelSchema = function (z) {
805
- return z.object({
806
- inputMethod: z.literal(exports.EWidgetActionInputMethod.DATA_MODEL),
807
- option: z.enum(exports.EDataModelOption).default(exports.EDataModelOption.TABLE_LIST),
808
- /**
809
- * Используется только при COLUMN_LIST. Не делаем union по option, чтобы сохранить
810
- * одновременно default для option и работоспособность внешнего discriminated union.
811
- */
812
- parent: NameNullableSchema(z),
813
- });
814
- };
815
- var ActionOnClickParameterSchema = function (z) {
816
- return z.intersection(ActionOnClickParameterCommonSchema(z), z.discriminatedUnion("inputMethod", [
817
- ParameterFromColumnSchema(z),
818
- ParameterFromVariableSchema(z),
819
- ParameterFromFormulaSchema(z),
820
- ParameterFromEventSchema(z),
821
- ParameterFromStartEventSchema(z),
822
- ParameterFromEndEventSchema(z),
823
- ParameterFromAggregationSchema(z),
824
- ParameterFromManualInputSchema(z),
825
- ParameterFromStaticListSchema(z),
826
- ParameterFromDynamicListSchema(z),
827
- ParameterFromDataModelSchema(z),
828
- ]));
829
- };
830
- var ActionCommonSchema = function (z) {
831
- return AutoIdentifiedArrayItemSchema(z).extend({
832
- name: z.string(),
833
- });
834
- };
835
- var ActionDrillDownSchema = function (z) {
836
- return ActionCommonSchema(z).extend({
837
- type: z.literal(exports.EActionTypes.DRILL_DOWN),
838
- variables: z.array(ActionOnClickParameterSchema(z)).default([]),
839
- });
840
- };
841
- var ActionGoToURLSchema = function (z) {
842
- return ActionCommonSchema(z).extend({
843
- type: z.literal(exports.EActionTypes.OPEN_URL),
844
- url: z.string(),
845
- newWindow: z.boolean().default(true),
846
- variables: z.array(ActionOnClickParameterSchema(z)).default([]),
847
- });
848
- };
849
- var ActivateConditionSchema = function (z) {
850
- return z
851
- .discriminatedUnion("mode", [
852
- z.object({
853
- mode: z.literal(exports.EActivateConditionMode.FORMULA),
854
- formula: FormulaSchema(z),
855
- }),
856
- z.object({
857
- mode: z.literal(exports.EActivateConditionMode.VARIABLE),
858
- variableName: z.string().nullable().default(null),
859
- variableValue: z.string().nullable().default(null),
860
- }),
861
- ])
862
- .default({ mode: exports.EActivateConditionMode.FORMULA, formula: "" });
863
- };
864
- var ActionRunScriptSchema = function (z) {
865
- return ActionCommonSchema(z).extend({
866
- type: z.literal(exports.EActionTypes.EXECUTE_SCRIPT),
867
- parameters: z.array(ActionOnClickParameterSchema(z)).default([]),
868
- scriptKey: z.string(),
869
- autoUpdate: z.enum(exports.EAutoUpdateMode).default(exports.EAutoUpdateMode.THIS_WIDGET),
870
- hideInactiveButton: z.boolean().default(false),
871
- activateCondition: ActivateConditionSchema(z),
872
- hint: z.string().default(""),
873
- variables: z.array(ActionOnClickParameterSchema(z)).default([]),
874
- runButtonText: z.string().default(""),
875
- });
876
- };
877
- var ActionUpdateVariableSchema = function (z) {
878
- return ActionCommonSchema(z).extend({
879
- type: z.literal(exports.EActionTypes.UPDATE_VARIABLE),
880
- variables: z.array(ActionOnClickParameterSchema(z)).default([]),
881
- });
882
- };
883
- var ActionOpenInSchema = function (z) {
884
- return z.discriminatedUnion("openIn", [
885
- z.object({
886
- openIn: z.literal(exports.EViewOpenIn.DRAWER_WINDOW),
887
- alignment: z.enum(exports.EDrawerPlacement).default(exports.EDrawerPlacement.RIGHT),
888
- inheritFilter: z.boolean().default(true),
889
- }),
890
- z.object({
891
- openIn: z.literal(exports.EViewOpenIn.PLACEHOLDER),
892
- placeholderName: z.string().optional(),
893
- }),
894
- z.object({
895
- openIn: z.literal(exports.EViewOpenIn.MODAL_WINDOW),
896
- positionByClick: z.boolean().default(false),
897
- inheritFilter: z.boolean().default(true),
898
- }),
899
- z.object({
900
- openIn: z.literal(exports.EViewOpenIn.WINDOW),
901
- newWindow: z.boolean().default(true),
902
- inheritFilter: z.boolean().default(true),
903
- }),
904
- ]);
905
- };
906
- var ActionOpenViewCommonSchema = function (z) {
907
- return ActionCommonSchema(z).extend({
908
- type: z.literal(exports.EActionTypes.OPEN_VIEW),
909
- variables: z.array(ActionOnClickParameterSchema(z)).default([]),
910
- });
911
- };
912
- var ActionOpenViewSchema = function (z) {
913
- return z.intersection(z.discriminatedUnion("mode", [
914
- ActionOpenViewCommonSchema(z).extend({
915
- mode: z.literal(exports.EViewMode.GENERATED_BY_SCRIPT),
916
- scriptKey: z.string().optional(),
917
- parameters: z.array(ActionOnClickParameterSchema(z)).default([]),
918
- displayName: z.string().default(""),
919
- }),
920
- ActionOpenViewCommonSchema(z).extend({
921
- mode: z.literal(exports.EViewMode.EXISTED_VIEW),
922
- viewKey: z.string().optional(),
923
- parameters: z.array(ActionOnClickParameterSchema(z)).default([]),
924
- }),
925
- ActionOpenViewCommonSchema(z).extend({
926
- mode: z.literal(exports.EViewMode.EMPTY),
927
- placeholderName: z.string().optional(),
928
- openIn: z.literal(exports.EViewOpenIn.PLACEHOLDER),
929
- }),
930
- ]), ActionOpenInSchema(z));
931
- };
932
- var ActionsOnClickSchema = function (z) {
933
- return z.union([
934
- ActionGoToURLSchema(z),
935
- ActionRunScriptSchema(z),
936
- ActionUpdateVariableSchema(z),
937
- ActionOpenViewSchema(z),
938
- ActionDrillDownSchema(z),
939
- ]);
940
- };
941
- var WidgetActionParameterCommonSchema = function (z) {
942
- return AutoIdentifiedArrayItemSchema(z).extend({
943
- name: z.string(),
944
- displayName: z.string().default(""),
945
- isHidden: z.boolean().default(false),
946
- });
947
- };
948
- var WidgetActionParameterSchema = function (z) {
949
- return z.intersection(WidgetActionParameterCommonSchema(z), z.discriminatedUnion("inputMethod", [
950
- ParameterFromColumnSchema(z),
951
- ParameterFromVariableSchema(z),
952
- ParameterFromFormulaSchema(z),
953
- ParameterFromManualInputSchema(z),
954
- ParameterFromStaticListSchema(z),
955
- ParameterFromDynamicListSchema(z),
956
- ParameterFromAggregationSchema(z),
957
- ParameterFromDataModelSchema(z),
958
- ]));
959
- };
960
- var WidgetActionSchema = function (z) {
961
- return ActionCommonSchema(z).extend({
962
- parameters: z.array(WidgetActionParameterSchema(z)).default([]),
963
- type: z.literal(exports.EActionTypes.EXECUTE_SCRIPT),
964
- scriptKey: z.string(),
965
- autoUpdate: z.enum(exports.EAutoUpdateMode).default(exports.EAutoUpdateMode.THIS_WIDGET),
966
- description: z.string().default(""),
967
- hideInactiveButton: z.boolean().default(false),
968
- hint: z.string().default(""),
969
- activateCondition: ActivateConditionSchema(z),
970
- variables: z.array(WidgetActionParameterSchema(z)).default([]),
971
- runButtonText: z.string().default(""),
972
- });
973
- };
974
- var ViewActionParameterSchema = function (z) {
975
- return z.intersection(AutoIdentifiedArrayItemSchema(z).extend({ name: z.string() }), z.discriminatedUnion("inputMethod", [
976
- ParameterFromAggregationSchema(z),
977
- ParameterFromVariableSchema(z),
978
- ]));
979
- };
980
- var ViewActionSchema = function (z) {
981
- return AutoIdentifiedArrayItemSchema(z).extend({
982
- name: z.string(),
983
- buttonType: z.enum(exports.EActionButtonsTypes).default(exports.EActionButtonsTypes.BASE),
984
- type: z.literal(exports.EActionTypes.EXECUTE_SCRIPT).default(exports.EActionTypes.EXECUTE_SCRIPT),
985
- parameters: z.array(ViewActionParameterSchema(z)).default([]),
986
- scriptKey: KeyNullableSchema(z),
987
- autoUpdate: z
988
- .union([z.literal(exports.EAutoUpdateMode.NONE), z.literal(exports.EAutoUpdateMode.ALL_VIEWS)])
989
- .default(exports.EAutoUpdateMode.NONE),
990
- });
991
- };
992
- var ActionSchema = function (z) {
993
- return z.union([ActionsOnClickSchema(z), WidgetActionSchema(z), ViewActionSchema(z)]);
994
- };
995
- var ActionButtonSchema = function (z) {
996
- return AutoIdentifiedArrayItemSchema(z).extend({
997
- name: z.string(),
998
- onClick: z.array(WidgetActionSchema(z)).default([]),
999
- buttonType: z.enum(exports.EActionButtonsTypes).default(exports.EActionButtonsTypes.BASE),
1000
- backgroundColor: ColorSchema(z),
1001
- borderColor: ColorSchema(z),
1002
- color: ColorSchema(z),
1003
- hint: z.string().default(""),
1004
- });
1005
- };
1027
+ var FormulaFilterValueSchema = SchemaRegistry.define({
1028
+ key: "FormulaFilterValue",
1029
+ latestVersion: "17",
1030
+ history: {
1031
+ "17": function (z) {
1032
+ var _a;
1033
+ return z.object({
1034
+ name: z.string().nullish(),
1035
+ formula: FormulaSchema.forVersion("17")(z),
1036
+ sliceIndex: z.number().optional(),
1037
+ dbDataType: z.string(),
1038
+ format: z.union([z.enum(biFormatting.EFormatTypes), z.string()]).optional(),
1039
+ filteringMethod: z.enum(Object.values(formulaFilterMethods)),
1040
+ checkedValues: z.array(z.string().nullable()).default([]).optional(),
1041
+ formValues: z
1042
+ .object((_a = {},
1043
+ _a[exports.EFormulaFilterFieldKeys.date] = z.string().nullable(),
1044
+ _a[exports.EFormulaFilterFieldKeys.dateRange] = z.tuple([z.string(), z.string()]),
1045
+ _a[exports.EFormulaFilterFieldKeys.numberRange] = z.tuple([
1046
+ z.number().nullable(),
1047
+ z.number().nullable(),
1048
+ ]),
1049
+ _a[exports.EFormulaFilterFieldKeys.string] = z.string(),
1050
+ // todo: отказаться от использования z.string(), оставить только z.number() [BI-15912]
1051
+ _a[exports.EFormulaFilterFieldKeys.lastTimeValue] = z.number().or(z.string()),
1052
+ _a[exports.EFormulaFilterFieldKeys.lastTimeUnit] = z.enum(exports.ELastTimeUnit),
1053
+ _a[exports.EFormulaFilterFieldKeys.durationUnit] = z.enum(exports.EDurationUnit),
1054
+ _a))
1055
+ .partial()
1056
+ .optional(),
1057
+ });
1058
+ },
1059
+ },
1060
+ });
1061
+ var ExtendedFormulaFilterValueSchema = SchemaRegistry.define({
1062
+ key: "ExtendedFormulaFilterValue",
1063
+ latestVersion: "17",
1064
+ history: {
1065
+ "17": function (z) {
1066
+ return z.union([
1067
+ FormulaFilterValueSchema.forVersion("17")(z),
1068
+ z.object({ formula: FormulaSchema.forVersion("17")(z) }),
1069
+ ]);
1070
+ },
1071
+ },
1072
+ });
1073
+ var DimensionProcessFilterSchema = SchemaRegistry.define({
1074
+ key: "DimensionProcessFilter",
1075
+ latestVersion: "17",
1076
+ history: {
1077
+ "17": function (z) {
1078
+ return z.object({
1079
+ value: z.union([
1080
+ WidgetIndicatorAggregationValueSchema.forVersion("17")(z).extend({
1081
+ outerAggregation: z.enum(exports.EOuterAggregation),
1082
+ }),
1083
+ WidgetIndicatorAggregationValueSchema.forVersion("17")(z).extend({
1084
+ innerTemplateName: z.string().optional(),
1085
+ }),
1086
+ WidgetIndicatorTimeValueSchema.forVersion("17")(z),
1087
+ z.object({
1088
+ mode: z.literal(exports.EWidgetIndicatorValueModes.FORMULA),
1089
+ formula: FormulaSchema.forVersion("17")(z).optional(),
1090
+ }),
1091
+ ]),
1092
+ dbDataType: z.string(),
1093
+ condition: z.object({
1094
+ filteringMethod: z.enum(Object.values(formulaFilterMethods)),
1095
+ timeUnit: z.enum(exports.EDimensionProcessFilterTimeUnit).optional(),
1096
+ values: z.array(z.string().nullable()),
1097
+ }),
1098
+ });
1099
+ },
1100
+ },
1101
+ });
1102
+ var SettingsFilterSchema = SchemaRegistry.define({
1103
+ key: "SettingsFilter",
1104
+ latestVersion: "17",
1105
+ history: {
1106
+ "17": function (z) {
1107
+ return z.union([
1108
+ ExtendedFormulaFilterValueSchema.forVersion("17")(z),
1109
+ DimensionProcessFilterSchema.forVersion("17")(z),
1110
+ ]);
1111
+ },
1112
+ },
1113
+ });
1114
+
1115
+ var ActionOnClickParameterCommonSchema = SchemaRegistry.define({
1116
+ key: "ActionOnClickParameterCommon",
1117
+ latestVersion: "17",
1118
+ history: {
1119
+ "17": function (z) {
1120
+ return AutoIdentifiedArrayItemSchema.forVersion("17")(z).extend({
1121
+ name: z.string(),
1122
+ });
1123
+ },
1124
+ },
1125
+ });
1126
+ var ParameterFromColumnSchema = SchemaRegistry.define({
1127
+ key: "ParameterFromColumn",
1128
+ latestVersion: "17",
1129
+ history: {
1130
+ "17": function (z) {
1131
+ return z.object({
1132
+ inputMethod: z.literal(exports.EWidgetActionInputMethod.COLUMN),
1133
+ tableName: z.string().nullable().default(null),
1134
+ columnName: z.string().nullable().default(null),
1135
+ dbDataType: z.string().optional(),
1136
+ });
1137
+ },
1138
+ },
1139
+ });
1140
+ var ParameterFromVariableSchema = SchemaRegistry.define({
1141
+ key: "ParameterFromVariable",
1142
+ latestVersion: "17",
1143
+ history: {
1144
+ "17": function (z) {
1145
+ return z.object({
1146
+ inputMethod: z.literal(exports.EWidgetActionInputMethod.VARIABLE),
1147
+ sourceVariable: z.string().nullable().default(null),
1148
+ });
1149
+ },
1150
+ },
1151
+ });
1152
+ var ParameterFromFormulaSchema = SchemaRegistry.define({
1153
+ key: "ParameterFromFormula",
1154
+ latestVersion: "17",
1155
+ history: {
1156
+ "17": function (z) {
1157
+ return z.object({
1158
+ inputMethod: z.literal(exports.EWidgetActionInputMethod.FORMULA),
1159
+ formula: FormulaSchema.forVersion("17")(z),
1160
+ considerFilters: z.boolean().default(false),
1161
+ dbDataType: z.string().optional(),
1162
+ });
1163
+ },
1164
+ },
1165
+ });
1166
+ var ParameterFromEventSchema = SchemaRegistry.define({
1167
+ key: "ParameterFromEvent",
1168
+ latestVersion: "17",
1169
+ history: {
1170
+ "17": function (z) {
1171
+ return z.object({
1172
+ inputMethod: z.literal(exports.EWidgetActionInputMethod.EVENT),
1173
+ });
1174
+ },
1175
+ },
1176
+ });
1177
+ var ParameterFromStartEventSchema = SchemaRegistry.define({
1178
+ key: "ParameterFromStartEvent",
1179
+ latestVersion: "17",
1180
+ history: {
1181
+ "17": function (z) {
1182
+ return z.object({
1183
+ inputMethod: z.literal(exports.EWidgetActionInputMethod.START_EVENT),
1184
+ });
1185
+ },
1186
+ },
1187
+ });
1188
+ var ParameterFromEndEventSchema = SchemaRegistry.define({
1189
+ key: "ParameterFromEndEvent",
1190
+ latestVersion: "17",
1191
+ history: {
1192
+ "17": function (z) {
1193
+ return z.object({
1194
+ inputMethod: z.literal(exports.EWidgetActionInputMethod.FINISH_EVENT),
1195
+ });
1196
+ },
1197
+ },
1198
+ });
1199
+ var ParameterFromAggregationSchema = SchemaRegistry.define({
1200
+ key: "ParameterFromAggregation",
1201
+ latestVersion: "17",
1202
+ history: {
1203
+ "17": function (z) {
1204
+ return z.object({
1205
+ inputMethod: z.literal(exports.EWidgetActionInputMethod.AGGREGATION),
1206
+ formula: FormulaSchema.forVersion("17")(z),
1207
+ considerFilters: z.boolean().default(false),
1208
+ dbDataType: z.string().optional(),
1209
+ });
1210
+ },
1211
+ },
1212
+ });
1213
+ var ParameterFromManualInputSchema = SchemaRegistry.define({
1214
+ key: "ParameterFromManualInput",
1215
+ latestVersion: "17",
1216
+ history: {
1217
+ "17": function (z) {
1218
+ return z.object({
1219
+ inputMethod: z.literal(exports.EWidgetActionInputMethod.MANUALLY),
1220
+ description: z.string().default(""),
1221
+ defaultValue: FormulaSchema.forVersion("17")(z),
1222
+ dbDataType: z.string().optional(),
1223
+ filterByRows: z.boolean().default(false),
1224
+ validation: FormulaSchema.forVersion("17")(z),
1225
+ acceptEmptyValue: z.boolean().default(false),
1226
+ });
1227
+ },
1228
+ },
1229
+ });
1230
+ var ParameterFromStaticListSchema = SchemaRegistry.define({
1231
+ key: "ParameterFromStaticList",
1232
+ latestVersion: "17",
1233
+ history: {
1234
+ "17": function (z) {
1235
+ return z.object({
1236
+ inputMethod: z.literal(exports.EWidgetActionInputMethod.STATIC_LIST),
1237
+ options: z.string().default(""),
1238
+ defaultValue: z
1239
+ .union([z.string(), z.array(z.string())])
1240
+ .nullable()
1241
+ .default(null),
1242
+ acceptEmptyValue: z.boolean().default(false),
1243
+ });
1244
+ },
1245
+ },
1246
+ });
1247
+ var ParameterFromDynamicListSchema = SchemaRegistry.define({
1248
+ key: "ParameterFromDynamicList",
1249
+ latestVersion: "17",
1250
+ history: {
1251
+ "17": function (z) {
1252
+ return z.object({
1253
+ inputMethod: z.literal(exports.EWidgetActionInputMethod.DYNAMIC_LIST),
1254
+ options: FormulaSchema.forVersion("17")(z),
1255
+ defaultValue: FormulaSchema.forVersion("17")(z),
1256
+ dbDataType: z.string().optional(),
1257
+ displayOptions: FormulaSchema.forVersion("17")(z),
1258
+ filters: z.array(ExtendedFormulaFilterValueSchema.forVersion("17")(z)).default([]),
1259
+ filterByRows: z.boolean().default(false),
1260
+ considerFilters: z.boolean().default(false),
1261
+ insertAnyValues: z.boolean().default(false),
1262
+ validation: FormulaSchema.forVersion("17")(z),
1263
+ acceptEmptyValue: z.boolean().default(false),
1264
+ });
1265
+ },
1266
+ },
1267
+ });
1268
+ var ParameterFromDataModelSchema = SchemaRegistry.define({
1269
+ key: "ParameterFromDataModel",
1270
+ latestVersion: "17",
1271
+ history: {
1272
+ "17": function (z) {
1273
+ return z.object({
1274
+ inputMethod: z.literal(exports.EWidgetActionInputMethod.DATA_MODEL),
1275
+ option: z.enum(exports.EDataModelOption).default(exports.EDataModelOption.TABLE_LIST),
1276
+ /**
1277
+ * Используется только при COLUMN_LIST. Не делаем union по option, чтобы сохранить
1278
+ * одновременно default для option и работоспособность внешнего discriminated union.
1279
+ */
1280
+ parent: NameNullableSchema.forVersion("17")(z),
1281
+ });
1282
+ },
1283
+ },
1284
+ });
1285
+ var ActionOnClickParameterSchema = SchemaRegistry.define({
1286
+ key: "ActionOnClickParameter",
1287
+ latestVersion: "17",
1288
+ history: {
1289
+ "17": function (z) {
1290
+ return z.intersection(ActionOnClickParameterCommonSchema.forVersion("17")(z), z.discriminatedUnion("inputMethod", [
1291
+ ParameterFromColumnSchema.forVersion("17")(z),
1292
+ ParameterFromVariableSchema.forVersion("17")(z),
1293
+ ParameterFromFormulaSchema.forVersion("17")(z),
1294
+ ParameterFromEventSchema.forVersion("17")(z),
1295
+ ParameterFromStartEventSchema.forVersion("17")(z),
1296
+ ParameterFromEndEventSchema.forVersion("17")(z),
1297
+ ParameterFromAggregationSchema.forVersion("17")(z),
1298
+ ParameterFromManualInputSchema.forVersion("17")(z),
1299
+ ParameterFromStaticListSchema.forVersion("17")(z),
1300
+ ParameterFromDynamicListSchema.forVersion("17")(z),
1301
+ ParameterFromDataModelSchema.forVersion("17")(z),
1302
+ ]));
1303
+ },
1304
+ },
1305
+ });
1306
+ var ActionCommonSchema = SchemaRegistry.define({
1307
+ key: "ActionCommon",
1308
+ latestVersion: "17",
1309
+ history: {
1310
+ "17": function (z) {
1311
+ return AutoIdentifiedArrayItemSchema.forVersion("17")(z).extend({
1312
+ name: z.string(),
1313
+ });
1314
+ },
1315
+ },
1316
+ });
1317
+ var ActionDrillDownSchema = SchemaRegistry.define({
1318
+ key: "ActionDrillDown",
1319
+ latestVersion: "17",
1320
+ history: {
1321
+ "17": function (z) {
1322
+ return ActionCommonSchema.forVersion("17")(z).extend({
1323
+ type: z.literal(exports.EActionTypes.DRILL_DOWN),
1324
+ variables: z.array(ActionOnClickParameterSchema.forVersion("17")(z)).default([]),
1325
+ });
1326
+ },
1327
+ },
1328
+ });
1329
+ var ActionGoToURLSchema = SchemaRegistry.define({
1330
+ key: "ActionGoToURL",
1331
+ latestVersion: "17",
1332
+ history: {
1333
+ "17": function (z) {
1334
+ return ActionCommonSchema.forVersion("17")(z).extend({
1335
+ type: z.literal(exports.EActionTypes.OPEN_URL),
1336
+ url: z.string(),
1337
+ newWindow: z.boolean().default(true),
1338
+ variables: z.array(ActionOnClickParameterSchema.forVersion("17")(z)).default([]),
1339
+ });
1340
+ },
1341
+ },
1342
+ });
1343
+ var ActivateConditionSchema = SchemaRegistry.define({
1344
+ key: "ActivateCondition",
1345
+ latestVersion: "17",
1346
+ history: {
1347
+ "17": function (z) {
1348
+ return z
1349
+ .discriminatedUnion("mode", [
1350
+ z.object({
1351
+ mode: z.literal(exports.EActivateConditionMode.FORMULA),
1352
+ formula: FormulaSchema.forVersion("17")(z),
1353
+ }),
1354
+ z.object({
1355
+ mode: z.literal(exports.EActivateConditionMode.VARIABLE),
1356
+ variableName: z.string().nullable().default(null),
1357
+ variableValue: z.string().nullable().default(null),
1358
+ }),
1359
+ ])
1360
+ .default({ mode: exports.EActivateConditionMode.FORMULA, formula: "" });
1361
+ },
1362
+ },
1363
+ });
1364
+ var ActionRunScriptSchema = SchemaRegistry.define({
1365
+ key: "ActionRunScript",
1366
+ latestVersion: "17",
1367
+ history: {
1368
+ "17": function (z) {
1369
+ return ActionCommonSchema.forVersion("17")(z).extend({
1370
+ type: z.literal(exports.EActionTypes.EXECUTE_SCRIPT),
1371
+ parameters: z.array(ActionOnClickParameterSchema.forVersion("17")(z)).default([]),
1372
+ scriptKey: z.string(),
1373
+ autoUpdate: z.enum(exports.EAutoUpdateMode).default(exports.EAutoUpdateMode.THIS_WIDGET),
1374
+ hideInactiveButton: z.boolean().default(false),
1375
+ activateCondition: ActivateConditionSchema.forVersion("17")(z),
1376
+ hint: z.string().default(""),
1377
+ variables: z.array(ActionOnClickParameterSchema.forVersion("17")(z)).default([]),
1378
+ runButtonText: z.string().default(""),
1379
+ });
1380
+ },
1381
+ },
1382
+ });
1383
+ var ActionUpdateVariableSchema = SchemaRegistry.define({
1384
+ key: "ActionUpdateVariable",
1385
+ latestVersion: "17",
1386
+ history: {
1387
+ "17": function (z) {
1388
+ return ActionCommonSchema.forVersion("17")(z).extend({
1389
+ type: z.literal(exports.EActionTypes.UPDATE_VARIABLE),
1390
+ variables: z.array(ActionOnClickParameterSchema.forVersion("17")(z)).default([]),
1391
+ });
1392
+ },
1393
+ },
1394
+ });
1395
+ var ActionOpenInSchema = SchemaRegistry.define({
1396
+ key: "ActionOpenIn",
1397
+ latestVersion: "17",
1398
+ history: {
1399
+ "17": function (z) {
1400
+ return z.discriminatedUnion("openIn", [
1401
+ z.object({
1402
+ openIn: z.literal(exports.EViewOpenIn.DRAWER_WINDOW),
1403
+ alignment: z.enum(exports.EDrawerPlacement).default(exports.EDrawerPlacement.RIGHT),
1404
+ inheritFilter: z.boolean().default(true),
1405
+ }),
1406
+ z.object({
1407
+ openIn: z.literal(exports.EViewOpenIn.PLACEHOLDER),
1408
+ placeholderName: z.string().optional(),
1409
+ }),
1410
+ z.object({
1411
+ openIn: z.literal(exports.EViewOpenIn.MODAL_WINDOW),
1412
+ positionByClick: z.boolean().default(false),
1413
+ inheritFilter: z.boolean().default(true),
1414
+ }),
1415
+ z.object({
1416
+ openIn: z.literal(exports.EViewOpenIn.WINDOW),
1417
+ newWindow: z.boolean().default(true),
1418
+ inheritFilter: z.boolean().default(true),
1419
+ }),
1420
+ ]);
1421
+ },
1422
+ },
1423
+ });
1424
+ var ActionOpenViewCommonSchema = SchemaRegistry.define({
1425
+ key: "ActionOpenViewCommon",
1426
+ latestVersion: "17",
1427
+ history: {
1428
+ "17": function (z) {
1429
+ return ActionCommonSchema.forVersion("17")(z).extend({
1430
+ type: z.literal(exports.EActionTypes.OPEN_VIEW),
1431
+ variables: z.array(ActionOnClickParameterSchema.forVersion("17")(z)).default([]),
1432
+ });
1433
+ },
1434
+ },
1435
+ });
1436
+ var ActionOpenViewSchema = SchemaRegistry.define({
1437
+ key: "ActionOpenView",
1438
+ latestVersion: "17",
1439
+ history: {
1440
+ "17": function (z) {
1441
+ return z.intersection(z.discriminatedUnion("mode", [
1442
+ ActionOpenViewCommonSchema.forVersion("17")(z).extend({
1443
+ mode: z.literal(exports.EViewMode.GENERATED_BY_SCRIPT),
1444
+ scriptKey: z.string().optional(),
1445
+ parameters: z.array(ActionOnClickParameterSchema.forVersion("17")(z)).default([]),
1446
+ displayName: z.string().default(""),
1447
+ }),
1448
+ ActionOpenViewCommonSchema.forVersion("17")(z).extend({
1449
+ mode: z.literal(exports.EViewMode.EXISTED_VIEW),
1450
+ viewKey: z.string().optional(),
1451
+ parameters: z.array(ActionOnClickParameterSchema.forVersion("17")(z)).default([]),
1452
+ }),
1453
+ ActionOpenViewCommonSchema.forVersion("17")(z).extend({
1454
+ mode: z.literal(exports.EViewMode.EMPTY),
1455
+ placeholderName: z.string().optional(),
1456
+ openIn: z.literal(exports.EViewOpenIn.PLACEHOLDER),
1457
+ }),
1458
+ ]), ActionOpenInSchema.forVersion("17")(z));
1459
+ },
1460
+ },
1461
+ });
1462
+ var ActionsOnClickSchema = SchemaRegistry.define({
1463
+ key: "ActionsOnClick",
1464
+ latestVersion: "17",
1465
+ history: {
1466
+ "17": function (z) {
1467
+ return z.union([
1468
+ ActionGoToURLSchema.forVersion("17")(z),
1469
+ ActionRunScriptSchema.forVersion("17")(z),
1470
+ ActionUpdateVariableSchema.forVersion("17")(z),
1471
+ ActionOpenViewSchema.forVersion("17")(z),
1472
+ ActionDrillDownSchema.forVersion("17")(z),
1473
+ ]);
1474
+ },
1475
+ },
1476
+ });
1477
+ var WidgetActionParameterCommonSchema = SchemaRegistry.define({
1478
+ key: "WidgetActionParameterCommon",
1479
+ latestVersion: "17",
1480
+ history: {
1481
+ "17": function (z) {
1482
+ return AutoIdentifiedArrayItemSchema.forVersion("17")(z).extend({
1483
+ name: z.string(),
1484
+ displayName: z.string().default(""),
1485
+ isHidden: z.boolean().default(false),
1486
+ });
1487
+ },
1488
+ },
1489
+ });
1490
+ var WidgetActionParameterSchema = SchemaRegistry.define({
1491
+ key: "WidgetActionParameter",
1492
+ latestVersion: "17",
1493
+ history: {
1494
+ "17": function (z) {
1495
+ return z.intersection(WidgetActionParameterCommonSchema.forVersion("17")(z), z.discriminatedUnion("inputMethod", [
1496
+ ParameterFromColumnSchema.forVersion("17")(z),
1497
+ ParameterFromVariableSchema.forVersion("17")(z),
1498
+ ParameterFromFormulaSchema.forVersion("17")(z),
1499
+ ParameterFromManualInputSchema.forVersion("17")(z),
1500
+ ParameterFromStaticListSchema.forVersion("17")(z),
1501
+ ParameterFromDynamicListSchema.forVersion("17")(z),
1502
+ ParameterFromAggregationSchema.forVersion("17")(z),
1503
+ ParameterFromDataModelSchema.forVersion("17")(z),
1504
+ ]));
1505
+ },
1506
+ },
1507
+ });
1508
+ var WidgetActionSchema = SchemaRegistry.define({
1509
+ key: "WidgetAction",
1510
+ latestVersion: "17",
1511
+ history: {
1512
+ "17": function (z) {
1513
+ return ActionCommonSchema.forVersion("17")(z).extend({
1514
+ parameters: z.array(WidgetActionParameterSchema.forVersion("17")(z)).default([]),
1515
+ type: z.literal(exports.EActionTypes.EXECUTE_SCRIPT),
1516
+ scriptKey: z.string(),
1517
+ autoUpdate: z.enum(exports.EAutoUpdateMode).default(exports.EAutoUpdateMode.THIS_WIDGET),
1518
+ description: z.string().default(""),
1519
+ hideInactiveButton: z.boolean().default(false),
1520
+ hint: z.string().default(""),
1521
+ activateCondition: ActivateConditionSchema.forVersion("17")(z),
1522
+ variables: z.array(WidgetActionParameterSchema.forVersion("17")(z)).default([]),
1523
+ runButtonText: z.string().default(""),
1524
+ });
1525
+ },
1526
+ },
1527
+ });
1528
+ var ViewActionParameterSchema = SchemaRegistry.define({
1529
+ key: "ViewActionParameter",
1530
+ latestVersion: "17",
1531
+ history: {
1532
+ "17": function (z) {
1533
+ return z.intersection(AutoIdentifiedArrayItemSchema.forVersion("17")(z).extend({ name: z.string() }), z.discriminatedUnion("inputMethod", [
1534
+ ParameterFromAggregationSchema.forVersion("17")(z),
1535
+ ParameterFromVariableSchema.forVersion("17")(z),
1536
+ ]));
1537
+ },
1538
+ },
1539
+ });
1540
+ var ViewActionSchema = SchemaRegistry.define({
1541
+ key: "ViewAction",
1542
+ latestVersion: "17",
1543
+ history: {
1544
+ "17": function (z) {
1545
+ return AutoIdentifiedArrayItemSchema.forVersion("17")(z).extend({
1546
+ name: z.string(),
1547
+ buttonType: z.enum(exports.EActionButtonsTypes).default(exports.EActionButtonsTypes.BASE),
1548
+ type: z.literal(exports.EActionTypes.EXECUTE_SCRIPT).default(exports.EActionTypes.EXECUTE_SCRIPT),
1549
+ parameters: z.array(ViewActionParameterSchema.forVersion("17")(z)).default([]),
1550
+ scriptKey: KeyNullableSchema.forVersion("17")(z),
1551
+ autoUpdate: z
1552
+ .union([z.literal(exports.EAutoUpdateMode.NONE), z.literal(exports.EAutoUpdateMode.ALL_VIEWS)])
1553
+ .default(exports.EAutoUpdateMode.NONE),
1554
+ });
1555
+ },
1556
+ },
1557
+ });
1558
+ var ActionSchema = SchemaRegistry.define({
1559
+ key: "Action",
1560
+ latestVersion: "17",
1561
+ history: {
1562
+ "17": function (z) {
1563
+ return z.union([
1564
+ ActionsOnClickSchema.forVersion("17")(z),
1565
+ WidgetActionSchema.forVersion("17")(z),
1566
+ ViewActionSchema.forVersion("17")(z),
1567
+ ]);
1568
+ },
1569
+ },
1570
+ });
1571
+ var ActionButtonSchema = SchemaRegistry.define({
1572
+ key: "ActionButton",
1573
+ latestVersion: "17",
1574
+ history: {
1575
+ "17": function (z) {
1576
+ return AutoIdentifiedArrayItemSchema.forVersion("17")(z).extend({
1577
+ name: z.string(),
1578
+ onClick: z.array(WidgetActionSchema.forVersion("17")(z)).default([]),
1579
+ buttonType: z.enum(exports.EActionButtonsTypes).default(exports.EActionButtonsTypes.BASE),
1580
+ backgroundColor: ColorSchema.forVersion("17")(z),
1581
+ borderColor: ColorSchema.forVersion("17")(z),
1582
+ color: ColorSchema.forVersion("17")(z),
1583
+ hint: z.string().default(""),
1584
+ });
1585
+ },
1586
+ },
1587
+ });
1006
1588
 
1007
1589
  exports.ESimpleDataType = void 0;
1008
1590
  (function (ESimpleDataType) {
@@ -1087,25 +1669,6 @@ var isFormulaFilterValue = function (value) {
1087
1669
  };
1088
1670
  var isDimensionProcessFilter = function (filter) { return "value" in filter && "condition" in filter; };
1089
1671
 
1090
- var compact = function (items) { return ((items === null || items === void 0 ? void 0 : items.filter(Boolean)) || []); };
1091
- var compactMap = function (items, f) {
1092
- return compact(items === null || items === void 0 ? void 0 : items.map(f));
1093
- };
1094
- var isNil = function (value) {
1095
- return value === null || value === undefined;
1096
- };
1097
- function memoize(fn) {
1098
- var cache = new Map();
1099
- return function (arg) {
1100
- if (cache.has(arg)) {
1101
- return cache.get(arg);
1102
- }
1103
- var result = fn(arg);
1104
- cache.set(arg, result);
1105
- return result;
1106
- };
1107
- }
1108
-
1109
1672
  exports.EClickHouseBaseTypes = void 0;
1110
1673
  (function (EClickHouseBaseTypes) {
1111
1674
  // DATE
@@ -2670,21 +3233,27 @@ var getColorByIndex = function (index) {
2670
3233
  return color;
2671
3234
  };
2672
3235
 
2673
- var WidgetPresetSettingsSchema = function (z) {
2674
- return BaseWidgetSettingsSchema(z)
2675
- .pick({
2676
- filterMode: true,
2677
- ignoreFilters: true,
2678
- stateName: true,
2679
- titleColor: true,
2680
- titleSize: true,
2681
- titleWeight: true,
2682
- paddings: true,
2683
- })
2684
- .extend({
2685
- textSize: z.number().default(12),
2686
- });
2687
- };
3236
+ var WidgetPresetSettingsSchema = SchemaRegistry.define({
3237
+ key: "WidgetPresetSettings",
3238
+ latestVersion: "17",
3239
+ history: {
3240
+ "17": function (z) {
3241
+ return BaseWidgetSettingsSchema.forVersion("17")(z)
3242
+ .pick({
3243
+ filterMode: true,
3244
+ ignoreFilters: true,
3245
+ stateName: true,
3246
+ titleColor: true,
3247
+ titleSize: true,
3248
+ titleWeight: true,
3249
+ paddings: true,
3250
+ })
3251
+ .extend({
3252
+ textSize: z.number().default(12),
3253
+ });
3254
+ },
3255
+ },
3256
+ });
2688
3257
 
2689
3258
  /**
2690
3259
  * Привязывает мета-информацию о теме к Zod-схеме
@@ -2709,80 +3278,152 @@ var themed = function (scheme, selectThemeValue) {
2709
3278
  return scheme.meta((_a = {}, _a[exports.ESettingsSchemaMetaKey.themeValue] = selectThemeValue, _a));
2710
3279
  };
2711
3280
 
2712
- var ColorBaseSchema = function (z) {
2713
- return z.object({
2714
- mode: z.literal(exports.EColorMode.BASE),
2715
- value: z.string(),
2716
- });
2717
- };
2718
- var ColorRuleSchema = function (z) {
2719
- return z.object({
2720
- mode: z.literal(exports.EColorMode.RULE),
2721
- formula: FormulaSchema(z),
2722
- });
2723
- };
2724
- var ColorAutoSchema = function (z) {
2725
- return z.object({
2726
- mode: z.literal(exports.EColorMode.AUTO),
2727
- });
2728
- };
2729
- var ColorDisabledSchema = function (z) {
2730
- return z.object({
2731
- mode: z.literal(exports.EColorMode.DISABLED),
2732
- });
2733
- };
2734
- var ColorGradientSchema = function (z) {
2735
- return z.object({
2736
- mode: z.literal(exports.EColorMode.GRADIENT),
2737
- startValue: z.string(),
2738
- endValue: z.string(),
2739
- classCount: z.number().min(3).max(10).nullish(),
2740
- });
2741
- };
2742
- var ColorFormulaSchema = function (z) {
2743
- return z.object({
2744
- mode: z.literal(exports.EColorMode.FORMULA),
2745
- formula: FormulaSchema(z),
2746
- });
2747
- };
2748
- var ColorValuesSchema = function (z) {
2749
- return z.object({
2750
- mode: z.literal(exports.EColorMode.VALUES),
2751
- items: z
2752
- .array(z.object({ value: z.string(), color: z.union([ColorBaseSchema(z), ColorRuleSchema(z)]) }))
2753
- .default([]),
2754
- });
2755
- };
2756
- var ColorByDimensionSchema = function (z) {
2757
- return z.object({
2758
- mode: z.literal(exports.EColorMode.BY_DIMENSION),
2759
- /** Имя разреза из области видимости правила отображения */
2760
- dimensionName: z.string(),
2761
- items: z
2762
- .array(z.object({ value: z.string(), color: z.union([ColorBaseSchema(z), ColorRuleSchema(z)]) }))
2763
- .default([]),
2764
- });
2765
- };
2766
- var ColoredValueSchema = function (z) {
2767
- return z.object({
2768
- value: z.string(),
2769
- color: z.union([ColorBaseSchema(z), ColorRuleSchema(z)]),
2770
- });
2771
- };
2772
- var ColorSchema = function (z) {
2773
- return z
2774
- .discriminatedUnion("mode", [
2775
- ColorAutoSchema(z),
2776
- ColorDisabledSchema(z),
2777
- ColorBaseSchema(z),
2778
- ColorRuleSchema(z),
2779
- ColorGradientSchema(z),
2780
- ColorFormulaSchema(z),
2781
- ColorValuesSchema(z),
2782
- ColorByDimensionSchema(z),
2783
- ])
2784
- .default({ mode: exports.EColorMode.AUTO });
2785
- };
3281
+ var ColorBaseSchema = SchemaRegistry.define({
3282
+ key: "ColorBase",
3283
+ latestVersion: "17",
3284
+ history: {
3285
+ "17": function (z) {
3286
+ return z.object({
3287
+ mode: z.literal(exports.EColorMode.BASE),
3288
+ value: z.string(),
3289
+ });
3290
+ },
3291
+ },
3292
+ });
3293
+ var ColorRuleSchema = SchemaRegistry.define({
3294
+ key: "ColorRule",
3295
+ latestVersion: "17",
3296
+ history: {
3297
+ "17": function (z) {
3298
+ return z.object({
3299
+ mode: z.literal(exports.EColorMode.RULE),
3300
+ formula: FormulaSchema.forVersion("17")(z),
3301
+ });
3302
+ },
3303
+ },
3304
+ });
3305
+ var ColorAutoSchema = SchemaRegistry.define({
3306
+ key: "ColorAuto",
3307
+ latestVersion: "17",
3308
+ history: {
3309
+ "17": function (z) {
3310
+ return z.object({
3311
+ mode: z.literal(exports.EColorMode.AUTO),
3312
+ });
3313
+ },
3314
+ },
3315
+ });
3316
+ var ColorDisabledSchema = SchemaRegistry.define({
3317
+ key: "ColorDisabled",
3318
+ latestVersion: "17",
3319
+ history: {
3320
+ "17": function (z) {
3321
+ return z.object({
3322
+ mode: z.literal(exports.EColorMode.DISABLED),
3323
+ });
3324
+ },
3325
+ },
3326
+ });
3327
+ var ColorGradientSchema = SchemaRegistry.define({
3328
+ key: "ColorGradient",
3329
+ latestVersion: "17",
3330
+ history: {
3331
+ "17": function (z) {
3332
+ return z.object({
3333
+ mode: z.literal(exports.EColorMode.GRADIENT),
3334
+ startValue: z.string(),
3335
+ endValue: z.string(),
3336
+ classCount: z.number().min(3).max(10).nullish(),
3337
+ });
3338
+ },
3339
+ },
3340
+ });
3341
+ var ColorFormulaSchema = SchemaRegistry.define({
3342
+ key: "ColorFormula",
3343
+ latestVersion: "17",
3344
+ history: {
3345
+ "17": function (z) {
3346
+ return z.object({
3347
+ mode: z.literal(exports.EColorMode.FORMULA),
3348
+ formula: FormulaSchema.forVersion("17")(z),
3349
+ });
3350
+ },
3351
+ },
3352
+ });
3353
+ var ColorValuesSchema = SchemaRegistry.define({
3354
+ key: "ColorValues",
3355
+ latestVersion: "17",
3356
+ history: {
3357
+ "17": function (z) {
3358
+ return z.object({
3359
+ mode: z.literal(exports.EColorMode.VALUES),
3360
+ items: z
3361
+ .array(z.object({
3362
+ value: z.string(),
3363
+ color: z.union([
3364
+ ColorBaseSchema.forVersion("17")(z),
3365
+ ColorRuleSchema.forVersion("17")(z),
3366
+ ]),
3367
+ }))
3368
+ .default([]),
3369
+ });
3370
+ },
3371
+ },
3372
+ });
3373
+ var ColorByDimensionSchema = SchemaRegistry.define({
3374
+ key: "ColorByDimension",
3375
+ latestVersion: "17",
3376
+ history: {
3377
+ "17": function (z) {
3378
+ return z.object({
3379
+ mode: z.literal(exports.EColorMode.BY_DIMENSION),
3380
+ /** Имя разреза из области видимости правила отображения */
3381
+ dimensionName: z.string(),
3382
+ items: z
3383
+ .array(z.object({
3384
+ value: z.string(),
3385
+ color: z.union([
3386
+ ColorBaseSchema.forVersion("17")(z),
3387
+ ColorRuleSchema.forVersion("17")(z),
3388
+ ]),
3389
+ }))
3390
+ .default([]),
3391
+ });
3392
+ },
3393
+ },
3394
+ });
3395
+ var ColoredValueSchema = SchemaRegistry.define({
3396
+ key: "ColoredValue",
3397
+ latestVersion: "17",
3398
+ history: {
3399
+ "17": function (z) {
3400
+ return z.object({
3401
+ value: z.string(),
3402
+ color: z.union([ColorBaseSchema.forVersion("17")(z), ColorRuleSchema.forVersion("17")(z)]),
3403
+ });
3404
+ },
3405
+ },
3406
+ });
3407
+ var ColorSchema = SchemaRegistry.define({
3408
+ key: "Color",
3409
+ latestVersion: "17",
3410
+ history: {
3411
+ "17": function (z) {
3412
+ return z
3413
+ .discriminatedUnion("mode", [
3414
+ ColorAutoSchema.forVersion("17")(z),
3415
+ ColorDisabledSchema.forVersion("17")(z),
3416
+ ColorBaseSchema.forVersion("17")(z),
3417
+ ColorRuleSchema.forVersion("17")(z),
3418
+ ColorGradientSchema.forVersion("17")(z),
3419
+ ColorFormulaSchema.forVersion("17")(z),
3420
+ ColorValuesSchema.forVersion("17")(z),
3421
+ ColorByDimensionSchema.forVersion("17")(z),
3422
+ ])
3423
+ .default({ mode: exports.EColorMode.AUTO });
3424
+ },
3425
+ },
3426
+ });
2786
3427
 
2787
3428
  Object.defineProperty(exports, "ELanguages", {
2788
3429
  enumerable: true,
@@ -2854,9 +3495,11 @@ exports.ParameterFromVariableSchema = ParameterFromVariableSchema;
2854
3495
  exports.ProcessIndicatorSchema = ProcessIndicatorSchema;
2855
3496
  exports.ProcessIndicatorValueSchema = ProcessIndicatorValueSchema;
2856
3497
  exports.RangeSchema = RangeSchema;
3498
+ exports.SchemaRegistryReader = SchemaRegistryReader;
2857
3499
  exports.SettingsFilterSchema = SettingsFilterSchema;
2858
3500
  exports.SortDirectionSchema = SortDirectionSchema;
2859
3501
  exports.SortOrderSchema = SortOrderSchema;
3502
+ exports.VersionedSchemaFactory = VersionedSchemaFactory;
2860
3503
  exports.ViewActionParameterSchema = ViewActionParameterSchema;
2861
3504
  exports.ViewActionSchema = ViewActionSchema;
2862
3505
  exports.WidgetActionParameterSchema = WidgetActionParameterSchema;