@infomaximum/widget-sdk 7.0.0-17 → 7.0.0-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 +1315 -18
- package/dist/index.esm.js +141 -36
- package/dist/index.js +145 -35
- package/package.json +5 -2
package/dist/index.esm.js
CHANGED
|
@@ -635,6 +635,26 @@ var WidgetSortingValueSchema = SchemaRegistry.define({
|
|
|
635
635
|
},
|
|
636
636
|
},
|
|
637
637
|
});
|
|
638
|
+
var SortingValueSchema = SchemaRegistry.define({
|
|
639
|
+
key: "SortingValueSchema",
|
|
640
|
+
latestVersion: "19",
|
|
641
|
+
history: {
|
|
642
|
+
"19": function (z) {
|
|
643
|
+
return z.discriminatedUnion("mode", [
|
|
644
|
+
z.object({
|
|
645
|
+
mode: z.literal(ESortingMode.BY_VALUES),
|
|
646
|
+
direction: SortDirectionSchema(z).default(ESortDirection.ascend),
|
|
647
|
+
}),
|
|
648
|
+
z.object({
|
|
649
|
+
mode: z.literal(ESortingMode.FORMULA),
|
|
650
|
+
direction: SortDirectionSchema(z).default(ESortDirection.ascend),
|
|
651
|
+
formula: FormulaSchema.forVersion("17")(z),
|
|
652
|
+
dbDataType: z.string().optional(),
|
|
653
|
+
}),
|
|
654
|
+
]);
|
|
655
|
+
},
|
|
656
|
+
},
|
|
657
|
+
});
|
|
638
658
|
|
|
639
659
|
/** Ключи мета-данных внутри схем настроек */
|
|
640
660
|
var ESettingsSchemaMetaKey;
|
|
@@ -645,7 +665,6 @@ var ESettingsSchemaMetaKey;
|
|
|
645
665
|
ESettingsSchemaMetaKey["entity"] = "entity";
|
|
646
666
|
})(ESettingsSchemaMetaKey || (ESettingsSchemaMetaKey = {}));
|
|
647
667
|
|
|
648
|
-
var _a$7;
|
|
649
668
|
var RangeSchema = SchemaRegistry.define({
|
|
650
669
|
key: "Range",
|
|
651
670
|
latestVersion: "17",
|
|
@@ -707,13 +726,12 @@ var EEntity;
|
|
|
707
726
|
(function (EEntity) {
|
|
708
727
|
EEntity["formula"] = "formula";
|
|
709
728
|
})(EEntity || (EEntity = {}));
|
|
710
|
-
var formulaMeta = Object.freeze((_a$7 = {}, _a$7[ESettingsSchemaMetaKey.entity] = EEntity.formula, _a$7));
|
|
711
729
|
/** Схема формулы */
|
|
712
730
|
var FormulaSchema = SchemaRegistry.define({
|
|
713
731
|
key: "Formula",
|
|
714
732
|
latestVersion: "17",
|
|
715
733
|
history: {
|
|
716
|
-
"17": function (z) { return z.string().default("")
|
|
734
|
+
"17": function (z) { return z.string().default(""); },
|
|
717
735
|
},
|
|
718
736
|
});
|
|
719
737
|
/**
|
|
@@ -726,16 +744,88 @@ var FormulaNullableSchema = SchemaRegistry.define({
|
|
|
726
744
|
key: "FormulaNullable",
|
|
727
745
|
latestVersion: "17",
|
|
728
746
|
history: {
|
|
729
|
-
"17": function (z) { return z.string().nullable().default(null)
|
|
747
|
+
"17": function (z) { return z.string().nullable().default(null); },
|
|
730
748
|
},
|
|
731
749
|
});
|
|
732
750
|
|
|
751
|
+
// NOTE: В будущем можно сделать fluent-обёртку для цепочных вызовов:
|
|
752
|
+
// withMetaDecorator(schema).omit({ field: true }).extend({ newField: z.string() })
|
|
753
|
+
// Это позволит избежать вложенных вызовов omitWithMeta/extendWithMeta.
|
|
754
|
+
var PARENT_META_KEY = "parent";
|
|
755
|
+
/**
|
|
756
|
+
* Возвращает родительскую мету схемы, установленную через extendWithMeta / omitWithMeta.
|
|
757
|
+
* Используй для обхода цепочки наследования схем.
|
|
758
|
+
*/
|
|
759
|
+
function getParentMeta(meta) {
|
|
760
|
+
return meta[PARENT_META_KEY];
|
|
761
|
+
}
|
|
762
|
+
function inheritMeta(target, source) {
|
|
763
|
+
var _a;
|
|
764
|
+
var sourceMeta = source.meta();
|
|
765
|
+
return sourceMeta !== undefined ? target.meta((_a = {}, _a[PARENT_META_KEY] = sourceMeta, _a)) : target;
|
|
766
|
+
}
|
|
767
|
+
/**
|
|
768
|
+
* Расширяет Zod-схему дополнительными полями, сохраняя цепочку наследования мет.
|
|
769
|
+
*
|
|
770
|
+
* Мета базовой схемы сохраняется как `parent` в мете расширенной схемы — формируя
|
|
771
|
+
* иммутабельный связанный список.
|
|
772
|
+
*
|
|
773
|
+
* Используй вместо `.extend()` при расширении схем, задекларированных через
|
|
774
|
+
* `SchemaRegistry.define`, — это обязательное условие корректной работы миграций.
|
|
775
|
+
*
|
|
776
|
+
* @example
|
|
777
|
+
* // Вместо:
|
|
778
|
+
* DimensionSchema(z).extend({ color: ColorSchema(z) })
|
|
779
|
+
*
|
|
780
|
+
* // Используй:
|
|
781
|
+
* extendWithMeta(DimensionSchema(z), { color: ColorSchema(z) })
|
|
782
|
+
*/
|
|
783
|
+
function extendWithMeta(schema, extension) {
|
|
784
|
+
return inheritMeta(schema.extend(extension), schema);
|
|
785
|
+
}
|
|
786
|
+
/**
|
|
787
|
+
* Создаёт Zod-схему с удалёнными полями, сохраняя цепочку наследования мет.
|
|
788
|
+
*
|
|
789
|
+
* Мета базовой схемы сохраняется как `parent` в мете результирующей схемы.
|
|
790
|
+
*
|
|
791
|
+
* Используй вместо `.omit()` при работе со схемами, задекларированными через
|
|
792
|
+
* `SchemaRegistry.define`, — это обязательное условие корректной работы миграций.
|
|
793
|
+
*
|
|
794
|
+
* @example
|
|
795
|
+
* // Вместо:
|
|
796
|
+
* BaseWidgetSettingsSchema(z).omit({ paddings: true })
|
|
797
|
+
*
|
|
798
|
+
* // Используй:
|
|
799
|
+
* omitWithMeta(BaseWidgetSettingsSchema(z), { paddings: true })
|
|
800
|
+
*/
|
|
801
|
+
function omitWithMeta(schema, keys) {
|
|
802
|
+
return inheritMeta(schema.omit(keys), schema);
|
|
803
|
+
}
|
|
804
|
+
/**
|
|
805
|
+
* Проверяет, есть ли в цепочке наследования мет узел, удовлетворяющий предикату.
|
|
806
|
+
*
|
|
807
|
+
* Обходит цепочку от текущей меты к корню через ссылки parent, установленные
|
|
808
|
+
* функциями extendWithMeta / omitWithMeta.
|
|
809
|
+
*
|
|
810
|
+
* @example
|
|
811
|
+
* hasInMetaChain(schema.meta(), (meta) => meta.type === "WidgetDimension")
|
|
812
|
+
*/
|
|
813
|
+
function hasInMetaChain(meta, predicate) {
|
|
814
|
+
var current = meta;
|
|
815
|
+
while (current !== undefined) {
|
|
816
|
+
if (predicate(current))
|
|
817
|
+
return true;
|
|
818
|
+
current = getParentMeta(current);
|
|
819
|
+
}
|
|
820
|
+
return false;
|
|
821
|
+
}
|
|
822
|
+
|
|
733
823
|
var WidgetIndicatorSchema = SchemaRegistry.define({
|
|
734
824
|
key: "WidgetIndicator",
|
|
735
825
|
latestVersion: "17",
|
|
736
826
|
history: {
|
|
737
827
|
"17": function (z) {
|
|
738
|
-
return AutoIdentifiedArrayItemSchema.forVersion("17")(z)
|
|
828
|
+
return extendWithMeta(AutoIdentifiedArrayItemSchema.forVersion("17")(z), {
|
|
739
829
|
name: z.string(),
|
|
740
830
|
});
|
|
741
831
|
},
|
|
@@ -786,7 +876,7 @@ var WidgetColumnIndicatorSchema = SchemaRegistry.define({
|
|
|
786
876
|
latestVersion: "17",
|
|
787
877
|
history: {
|
|
788
878
|
"17": function (z) {
|
|
789
|
-
return WidgetIndicatorSchema.forVersion("17")(z)
|
|
879
|
+
return extendWithMeta(WidgetIndicatorSchema.forVersion("17")(z), {
|
|
790
880
|
dbDataType: z.string().optional(),
|
|
791
881
|
format: FormatSchema.forVersion("17")(z).optional(),
|
|
792
882
|
formatting: FormattingSchema.forVersion("17")(z).optional(),
|
|
@@ -841,7 +931,7 @@ var MeasureValueSchema = SchemaRegistry.define({
|
|
|
841
931
|
"17": function (z) {
|
|
842
932
|
return z.discriminatedUnion("mode", [
|
|
843
933
|
WidgetIndicatorFormulaValueSchema.forVersion("17")(z),
|
|
844
|
-
WidgetIndicatorTemplateValueSchema.forVersion("17")(z)
|
|
934
|
+
extendWithMeta(WidgetIndicatorTemplateValueSchema.forVersion("17")(z), {
|
|
845
935
|
innerTemplateName: z.enum(EMeasureInnerTemplateNames).optional(),
|
|
846
936
|
}),
|
|
847
937
|
]);
|
|
@@ -855,7 +945,7 @@ var DimensionValueSchema = SchemaRegistry.define({
|
|
|
855
945
|
"17": function (z) {
|
|
856
946
|
return z.discriminatedUnion("mode", [
|
|
857
947
|
WidgetIndicatorFormulaValueSchema.forVersion("17")(z),
|
|
858
|
-
WidgetIndicatorTemplateValueSchema.forVersion("17")(z)
|
|
948
|
+
extendWithMeta(WidgetIndicatorTemplateValueSchema.forVersion("17")(z), {
|
|
859
949
|
innerTemplateName: z.never().optional(),
|
|
860
950
|
}),
|
|
861
951
|
]);
|
|
@@ -889,7 +979,7 @@ var WidgetMeasureAggregationValueSchema = SchemaRegistry.define({
|
|
|
889
979
|
latestVersion: "17",
|
|
890
980
|
history: {
|
|
891
981
|
"17": function (z) {
|
|
892
|
-
return WidgetIndicatorAggregationValueSchema.forVersion("17")(z)
|
|
982
|
+
return extendWithMeta(WidgetIndicatorAggregationValueSchema.forVersion("17")(z), {
|
|
893
983
|
outerAggregation: z.enum(EOuterAggregation),
|
|
894
984
|
});
|
|
895
985
|
},
|
|
@@ -921,11 +1011,11 @@ var WidgetDimensionSchema = SchemaRegistry.define({
|
|
|
921
1011
|
latestVersion: "17",
|
|
922
1012
|
history: {
|
|
923
1013
|
"17": function (z) {
|
|
924
|
-
return WidgetColumnIndicatorSchema.forVersion("17")(z)
|
|
1014
|
+
return extendWithMeta(WidgetColumnIndicatorSchema.forVersion("17")(z), {
|
|
925
1015
|
value: z
|
|
926
1016
|
.discriminatedUnion("mode", [
|
|
927
1017
|
DimensionValueSchema.forVersion("17")(z),
|
|
928
|
-
WidgetIndicatorAggregationValueSchema.forVersion("17")(z)
|
|
1018
|
+
extendWithMeta(WidgetIndicatorAggregationValueSchema.forVersion("17")(z), {
|
|
929
1019
|
innerTemplateName: z.string().optional(),
|
|
930
1020
|
}),
|
|
931
1021
|
WidgetIndicatorTimeValueSchema.forVersion("17")(z),
|
|
@@ -940,7 +1030,9 @@ var WidgetDimensionInHierarchySchema = SchemaRegistry.define({
|
|
|
940
1030
|
key: "WidgetDimensionInHierarchy",
|
|
941
1031
|
latestVersion: "17",
|
|
942
1032
|
history: {
|
|
943
|
-
"17": function (z) {
|
|
1033
|
+
"17": function (z) {
|
|
1034
|
+
return omitWithMeta(WidgetDimensionSchema.forVersion("17")(z), { displayCondition: true });
|
|
1035
|
+
},
|
|
944
1036
|
},
|
|
945
1037
|
});
|
|
946
1038
|
var WidgetDimensionHierarchySchema = SchemaRegistry.define({
|
|
@@ -948,7 +1040,7 @@ var WidgetDimensionHierarchySchema = SchemaRegistry.define({
|
|
|
948
1040
|
latestVersion: "17",
|
|
949
1041
|
history: {
|
|
950
1042
|
"17": function (z, dimensionSchema) {
|
|
951
|
-
return AutoIdentifiedArrayItemSchema.forVersion("17")(z)
|
|
1043
|
+
return extendWithMeta(AutoIdentifiedArrayItemSchema.forVersion("17")(z), {
|
|
952
1044
|
name: z.string(),
|
|
953
1045
|
// Для иерархии является дискриминатором, для него нельзя задавать дефолтное значение.
|
|
954
1046
|
hierarchyDimensions: z.array(dimensionSchema),
|
|
@@ -986,7 +1078,7 @@ var WidgetIndicatorDurationValueSchema = SchemaRegistry.define({
|
|
|
986
1078
|
latestVersion: "17",
|
|
987
1079
|
history: {
|
|
988
1080
|
"17": function (z) {
|
|
989
|
-
return WidgetIndicatorConversionValueSchema.forVersion("17")(z)
|
|
1081
|
+
return extendWithMeta(WidgetIndicatorConversionValueSchema.forVersion("17")(z), {
|
|
990
1082
|
mode: z.literal(EWidgetIndicatorValueModes.DURATION),
|
|
991
1083
|
templateName: z.string(),
|
|
992
1084
|
startEventAppearances: z.enum(EEventAppearances),
|
|
@@ -1000,7 +1092,7 @@ var WidgetMeasureSchema = SchemaRegistry.define({
|
|
|
1000
1092
|
latestVersion: "17",
|
|
1001
1093
|
history: {
|
|
1002
1094
|
"17": function (z) {
|
|
1003
|
-
return WidgetColumnIndicatorSchema.forVersion("17")(z)
|
|
1095
|
+
return extendWithMeta(WidgetColumnIndicatorSchema.forVersion("17")(z), {
|
|
1004
1096
|
value: z
|
|
1005
1097
|
.discriminatedUnion("mode", [
|
|
1006
1098
|
MeasureValueSchema.forVersion("17")(z),
|
|
@@ -1018,7 +1110,7 @@ var MarkdownMeasureSchema = SchemaRegistry.define({
|
|
|
1018
1110
|
latestVersion: "17",
|
|
1019
1111
|
history: {
|
|
1020
1112
|
"17": function (z) {
|
|
1021
|
-
return WidgetMeasureSchema.forVersion("17")(z)
|
|
1113
|
+
return extendWithMeta(WidgetMeasureSchema.forVersion("17")(z), {
|
|
1022
1114
|
displaySign: z.enum(EMarkdownDisplayMode).default(EMarkdownDisplayMode.NONE),
|
|
1023
1115
|
});
|
|
1024
1116
|
},
|
|
@@ -1029,7 +1121,7 @@ var WidgetSortingIndicatorSchema = SchemaRegistry.define({
|
|
|
1029
1121
|
latestVersion: "17",
|
|
1030
1122
|
history: {
|
|
1031
1123
|
"17": function (z) {
|
|
1032
|
-
return WidgetIndicatorSchema.forVersion("17")(z)
|
|
1124
|
+
return extendWithMeta(WidgetIndicatorSchema.forVersion("17")(z), {
|
|
1033
1125
|
direction: SortDirectionSchema.forVersion("17")(z),
|
|
1034
1126
|
value: WidgetSortingValueSchema.forVersion("17")(z),
|
|
1035
1127
|
});
|
|
@@ -1060,7 +1152,7 @@ var ProcessIndicatorSchema = SchemaRegistry.define({
|
|
|
1060
1152
|
latestVersion: "17",
|
|
1061
1153
|
history: {
|
|
1062
1154
|
"17": function (z) {
|
|
1063
|
-
return WidgetIndicatorSchema.forVersion("17")(z)
|
|
1155
|
+
return extendWithMeta(WidgetIndicatorSchema.forVersion("17")(z), {
|
|
1064
1156
|
value: ProcessIndicatorValueSchema.forVersion("17")(z).optional(),
|
|
1065
1157
|
dbDataType: z.string().optional(),
|
|
1066
1158
|
format: FormatSchema.forVersion("17")(z).optional(),
|
|
@@ -1124,10 +1216,10 @@ var DimensionProcessFilterSchema = SchemaRegistry.define({
|
|
|
1124
1216
|
"17": function (z) {
|
|
1125
1217
|
return z.object({
|
|
1126
1218
|
value: z.union([
|
|
1127
|
-
WidgetIndicatorAggregationValueSchema.forVersion("17")(z)
|
|
1219
|
+
extendWithMeta(WidgetIndicatorAggregationValueSchema.forVersion("17")(z), {
|
|
1128
1220
|
outerAggregation: z.enum(EOuterAggregation),
|
|
1129
1221
|
}),
|
|
1130
|
-
WidgetIndicatorAggregationValueSchema.forVersion("17")(z)
|
|
1222
|
+
extendWithMeta(WidgetIndicatorAggregationValueSchema.forVersion("17")(z), {
|
|
1131
1223
|
innerTemplateName: z.string().optional(),
|
|
1132
1224
|
}),
|
|
1133
1225
|
WidgetIndicatorTimeValueSchema.forVersion("17")(z),
|
|
@@ -1164,7 +1256,7 @@ var ActionOnClickParameterCommonSchema = SchemaRegistry.define({
|
|
|
1164
1256
|
latestVersion: "17",
|
|
1165
1257
|
history: {
|
|
1166
1258
|
"17": function (z) {
|
|
1167
|
-
return AutoIdentifiedArrayItemSchema.forVersion("17")(z)
|
|
1259
|
+
return extendWithMeta(AutoIdentifiedArrayItemSchema.forVersion("17")(z), {
|
|
1168
1260
|
name: z.string(),
|
|
1169
1261
|
});
|
|
1170
1262
|
},
|
|
@@ -1308,6 +1400,12 @@ var ParameterFromDynamicListSchema = SchemaRegistry.define({
|
|
|
1308
1400
|
insertAnyValues: z.boolean().default(false),
|
|
1309
1401
|
validation: FormulaSchema.forVersion("17")(z),
|
|
1310
1402
|
acceptEmptyValue: z.boolean().default(false),
|
|
1403
|
+
sorting: SortingValueSchema.forVersion("19")(z)
|
|
1404
|
+
.default({
|
|
1405
|
+
direction: ESortDirection.ascend,
|
|
1406
|
+
mode: ESortingMode.BY_VALUES,
|
|
1407
|
+
})
|
|
1408
|
+
.optional(),
|
|
1311
1409
|
});
|
|
1312
1410
|
},
|
|
1313
1411
|
},
|
|
@@ -1355,7 +1453,7 @@ var ActionCommonSchema = SchemaRegistry.define({
|
|
|
1355
1453
|
latestVersion: "17",
|
|
1356
1454
|
history: {
|
|
1357
1455
|
"17": function (z) {
|
|
1358
|
-
return AutoIdentifiedArrayItemSchema.forVersion("17")(z)
|
|
1456
|
+
return extendWithMeta(AutoIdentifiedArrayItemSchema.forVersion("17")(z), {
|
|
1359
1457
|
name: z.string(),
|
|
1360
1458
|
});
|
|
1361
1459
|
},
|
|
@@ -1366,7 +1464,7 @@ var ActionDrillDownSchema = SchemaRegistry.define({
|
|
|
1366
1464
|
latestVersion: "17",
|
|
1367
1465
|
history: {
|
|
1368
1466
|
"17": function (z) {
|
|
1369
|
-
return ActionCommonSchema.forVersion("17")(z)
|
|
1467
|
+
return extendWithMeta(ActionCommonSchema.forVersion("17")(z), {
|
|
1370
1468
|
type: z.literal(EActionTypes.DRILL_DOWN),
|
|
1371
1469
|
variables: z.array(ActionOnClickParameterSchema.forVersion("17")(z)).default([]),
|
|
1372
1470
|
});
|
|
@@ -1378,7 +1476,7 @@ var ActionGoToURLSchema = SchemaRegistry.define({
|
|
|
1378
1476
|
latestVersion: "17",
|
|
1379
1477
|
history: {
|
|
1380
1478
|
"17": function (z) {
|
|
1381
|
-
return ActionCommonSchema.forVersion("17")(z)
|
|
1479
|
+
return extendWithMeta(ActionCommonSchema.forVersion("17")(z), {
|
|
1382
1480
|
type: z.literal(EActionTypes.OPEN_URL),
|
|
1383
1481
|
url: z.string(),
|
|
1384
1482
|
newWindow: z.boolean().default(true),
|
|
@@ -1413,7 +1511,7 @@ var ActionRunScriptSchema = SchemaRegistry.define({
|
|
|
1413
1511
|
latestVersion: "17",
|
|
1414
1512
|
history: {
|
|
1415
1513
|
"17": function (z) {
|
|
1416
|
-
return ActionCommonSchema.forVersion("17")(z)
|
|
1514
|
+
return extendWithMeta(ActionCommonSchema.forVersion("17")(z), {
|
|
1417
1515
|
type: z.literal(EActionTypes.EXECUTE_SCRIPT),
|
|
1418
1516
|
parameters: z.array(ActionOnClickParameterSchema.forVersion("17")(z)).default([]),
|
|
1419
1517
|
scriptKey: z.string(),
|
|
@@ -1432,7 +1530,7 @@ var ActionUpdateVariableSchema = SchemaRegistry.define({
|
|
|
1432
1530
|
latestVersion: "17",
|
|
1433
1531
|
history: {
|
|
1434
1532
|
"17": function (z) {
|
|
1435
|
-
return ActionCommonSchema.forVersion("17")(z)
|
|
1533
|
+
return extendWithMeta(ActionCommonSchema.forVersion("17")(z), {
|
|
1436
1534
|
type: z.literal(EActionTypes.UPDATE_VARIABLE),
|
|
1437
1535
|
variables: z.array(ActionOnClickParameterSchema.forVersion("17")(z)).default([]),
|
|
1438
1536
|
});
|
|
@@ -1473,7 +1571,7 @@ var ActionOpenViewCommonSchema = SchemaRegistry.define({
|
|
|
1473
1571
|
latestVersion: "17",
|
|
1474
1572
|
history: {
|
|
1475
1573
|
"17": function (z) {
|
|
1476
|
-
return ActionCommonSchema.forVersion("17")(z)
|
|
1574
|
+
return extendWithMeta(ActionCommonSchema.forVersion("17")(z), {
|
|
1477
1575
|
type: z.literal(EActionTypes.OPEN_VIEW),
|
|
1478
1576
|
variables: z.array(ActionOnClickParameterSchema.forVersion("17")(z)).default([]),
|
|
1479
1577
|
});
|
|
@@ -1486,18 +1584,18 @@ var ActionOpenViewSchema = SchemaRegistry.define({
|
|
|
1486
1584
|
history: {
|
|
1487
1585
|
"17": function (z) {
|
|
1488
1586
|
return z.intersection(z.discriminatedUnion("mode", [
|
|
1489
|
-
ActionOpenViewCommonSchema.forVersion("17")(z)
|
|
1587
|
+
extendWithMeta(ActionOpenViewCommonSchema.forVersion("17")(z), {
|
|
1490
1588
|
mode: z.literal(EViewMode.GENERATED_BY_SCRIPT),
|
|
1491
1589
|
scriptKey: z.string().optional(),
|
|
1492
1590
|
parameters: z.array(ActionOnClickParameterSchema.forVersion("17")(z)).default([]),
|
|
1493
1591
|
displayName: z.string().default(""),
|
|
1494
1592
|
}),
|
|
1495
|
-
ActionOpenViewCommonSchema.forVersion("17")(z)
|
|
1593
|
+
extendWithMeta(ActionOpenViewCommonSchema.forVersion("17")(z), {
|
|
1496
1594
|
mode: z.literal(EViewMode.EXISTED_VIEW),
|
|
1497
1595
|
viewKey: z.string().optional(),
|
|
1498
1596
|
parameters: z.array(ActionOnClickParameterSchema.forVersion("17")(z)).default([]),
|
|
1499
1597
|
}),
|
|
1500
|
-
ActionOpenViewCommonSchema.forVersion("17")(z)
|
|
1598
|
+
extendWithMeta(ActionOpenViewCommonSchema.forVersion("17")(z), {
|
|
1501
1599
|
mode: z.literal(EViewMode.EMPTY),
|
|
1502
1600
|
placeholderName: z.string().optional(),
|
|
1503
1601
|
openIn: z.literal(EViewOpenIn.PLACEHOLDER),
|
|
@@ -1526,7 +1624,7 @@ var WidgetActionParameterCommonSchema = SchemaRegistry.define({
|
|
|
1526
1624
|
latestVersion: "17",
|
|
1527
1625
|
history: {
|
|
1528
1626
|
"17": function (z) {
|
|
1529
|
-
return AutoIdentifiedArrayItemSchema.forVersion("17")(z)
|
|
1627
|
+
return extendWithMeta(AutoIdentifiedArrayItemSchema.forVersion("17")(z), {
|
|
1530
1628
|
name: z.string(),
|
|
1531
1629
|
displayName: z.string().default(""),
|
|
1532
1630
|
isHidden: z.boolean().default(false),
|
|
@@ -1557,7 +1655,7 @@ var WidgetActionSchema = SchemaRegistry.define({
|
|
|
1557
1655
|
latestVersion: "17",
|
|
1558
1656
|
history: {
|
|
1559
1657
|
"17": function (z) {
|
|
1560
|
-
return ActionCommonSchema.forVersion("17")(z)
|
|
1658
|
+
return extendWithMeta(ActionCommonSchema.forVersion("17")(z), {
|
|
1561
1659
|
parameters: z.array(WidgetActionParameterSchema.forVersion("17")(z)).default([]),
|
|
1562
1660
|
type: z.literal(EActionTypes.EXECUTE_SCRIPT),
|
|
1563
1661
|
scriptKey: z.string(),
|
|
@@ -1577,7 +1675,7 @@ var ViewActionParameterSchema = SchemaRegistry.define({
|
|
|
1577
1675
|
latestVersion: "17",
|
|
1578
1676
|
history: {
|
|
1579
1677
|
"17": function (z) {
|
|
1580
|
-
return z.intersection(AutoIdentifiedArrayItemSchema.forVersion("17")(z)
|
|
1678
|
+
return z.intersection(extendWithMeta(AutoIdentifiedArrayItemSchema.forVersion("17")(z), { name: z.string() }), z.discriminatedUnion("inputMethod", [
|
|
1581
1679
|
ParameterFromAggregationSchema.forVersion("17")(z),
|
|
1582
1680
|
ParameterFromVariableSchema.forVersion("17")(z),
|
|
1583
1681
|
]));
|
|
@@ -1589,7 +1687,7 @@ var ViewActionSchema = SchemaRegistry.define({
|
|
|
1589
1687
|
latestVersion: "17",
|
|
1590
1688
|
history: {
|
|
1591
1689
|
"17": function (z) {
|
|
1592
|
-
return AutoIdentifiedArrayItemSchema.forVersion("17")(z)
|
|
1690
|
+
return extendWithMeta(AutoIdentifiedArrayItemSchema.forVersion("17")(z), {
|
|
1593
1691
|
name: z.string(),
|
|
1594
1692
|
buttonType: z.enum(EActionButtonsTypes).default(EActionButtonsTypes.BASE),
|
|
1595
1693
|
type: z.literal(EActionTypes.EXECUTE_SCRIPT).default(EActionTypes.EXECUTE_SCRIPT),
|
|
@@ -1620,7 +1718,7 @@ var ActionButtonSchema = SchemaRegistry.define({
|
|
|
1620
1718
|
latestVersion: "17",
|
|
1621
1719
|
history: {
|
|
1622
1720
|
"17": function (z) {
|
|
1623
|
-
return AutoIdentifiedArrayItemSchema.forVersion("17")(z)
|
|
1721
|
+
return extendWithMeta(AutoIdentifiedArrayItemSchema.forVersion("17")(z), {
|
|
1624
1722
|
name: z.string(),
|
|
1625
1723
|
onClick: z.array(WidgetActionSchema.forVersion("17")(z)).default([]),
|
|
1626
1724
|
buttonType: z.enum(EActionButtonsTypes).default(EActionButtonsTypes.BASE),
|
|
@@ -2873,6 +2971,11 @@ var ESortDirection;
|
|
|
2873
2971
|
ESortDirection["ASC"] = "ascend";
|
|
2874
2972
|
ESortDirection["DESC"] = "descend";
|
|
2875
2973
|
})(ESortDirection || (ESortDirection = {}));
|
|
2974
|
+
var ESortingMode;
|
|
2975
|
+
(function (ESortingMode) {
|
|
2976
|
+
ESortingMode["BY_VALUES"] = "BY_VALUES";
|
|
2977
|
+
ESortingMode["FORMULA"] = "FORMULA";
|
|
2978
|
+
})(ESortingMode || (ESortingMode = {}));
|
|
2876
2979
|
|
|
2877
2980
|
/**
|
|
2878
2981
|
* Выбрать активный разрез иерархии на основе активных фильтров.
|
|
@@ -3080,6 +3183,8 @@ var EControlType;
|
|
|
3080
3183
|
* Ввод цветов для событий процесса.
|
|
3081
3184
|
*/
|
|
3082
3185
|
EControlType["eventsColor"] = "eventsColor";
|
|
3186
|
+
/** Сортировка */
|
|
3187
|
+
EControlType["sorting"] = "sorting";
|
|
3083
3188
|
})(EControlType || (EControlType = {}));
|
|
3084
3189
|
var EUnitMode;
|
|
3085
3190
|
(function (EUnitMode) {
|
|
@@ -3521,4 +3626,4 @@ var themed = function (scheme, selectThemeValue) {
|
|
|
3521
3626
|
return scheme.meta((_a = {}, _a[ESettingsSchemaMetaKey.themeValue] = selectThemeValue, _a));
|
|
3522
3627
|
};
|
|
3523
3628
|
|
|
3524
|
-
export { ActionButtonSchema, ActionDrillDownSchema, 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, 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, SchemaRegistryReader, SettingsFilterSchema, SortDirectionSchema, SortOrderSchema, VersionedSchemaFactory, ViewActionParameterSchema, ViewActionSchema, WidgetActionParameterSchema, WidgetActionSchema, WidgetColumnIndicatorSchema, WidgetDimensionHierarchySchema, WidgetDimensionInHierarchySchema, WidgetDimensionSchema, WidgetIndicatorAggregationValueSchema, WidgetIndicatorConversionValueSchema, WidgetIndicatorDurationValueSchema, WidgetIndicatorFormulaValueSchema, WidgetIndicatorSchema, WidgetIndicatorTemplateValueSchema, WidgetIndicatorTimeValueSchema, WidgetMeasureAggregationValueSchema, WidgetMeasureSchema, WidgetPresetSettingsSchema, WidgetSortingIndicatorSchema, WidgetSortingValueSchema, apiVersion, apiVersions, applyIndexToArrayFormula, availableFormatsBySimpleType, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, clearMultiLineComments, clearSingleLineComments, colors, conversionTemplate, convertFiltersToFormula, convertToFormulasChain, countExecutionsTemplate, createEscaper, createAggregationTemplate as createMeasureAggregationTemplate, curlyBracketsContentPattern, dashboardLinkRegExp, defaultActionsConfig, dimensionAggregationTemplates, dimensionTemplateFormulas, displayConditionTemplate, doubleQuoteContentPattern, durationTemplates, escapeCurlyBracketLinkName, escapeDoubleQuoteLinkName, eventMeasureTemplateFormulas, fillTemplateSql, formulaFilterMethods, generateColumnFormula, getColorByIndex, getDefaultSortOrders, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getMeasureFormula, getProcessDimensionValueFormula, getRuleColor, getTransitionMeasureFormula, hexToRgb, inheritDisplayConditionFromHierarchy, interpolateHexColor, 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 };
|
|
3629
|
+
export { ActionButtonSchema, ActionDrillDownSchema, 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, EFormulaFilterFieldKeys, EHeightMode, EIndicatorType, ELastTimeUnit, EMarkdownDisplayMode, EMeasureAggregationTemplateName, EMeasureInnerTemplateNames, EMeasureTemplateNames, EOuterAggregation, EProcessFilterNames, ESelectOptionTypes, ESettingsSchemaMetaKey, ESimpleDataType, ESimpleInputType, ESortDirection, ESortingMode, 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, SchemaRegistryReader, SettingsFilterSchema, SortDirectionSchema, SortOrderSchema, SortingValueSchema, VersionedSchemaFactory, ViewActionParameterSchema, ViewActionSchema, WidgetActionParameterSchema, WidgetActionSchema, WidgetColumnIndicatorSchema, WidgetDimensionHierarchySchema, WidgetDimensionInHierarchySchema, WidgetDimensionSchema, WidgetIndicatorAggregationValueSchema, WidgetIndicatorConversionValueSchema, WidgetIndicatorDurationValueSchema, WidgetIndicatorFormulaValueSchema, WidgetIndicatorSchema, WidgetIndicatorTemplateValueSchema, WidgetIndicatorTimeValueSchema, WidgetMeasureAggregationValueSchema, WidgetMeasureSchema, WidgetPresetSettingsSchema, WidgetSortingIndicatorSchema, WidgetSortingValueSchema, apiVersion, apiVersions, applyIndexToArrayFormula, availableFormatsBySimpleType, bindContentWithIndicator, bindContentsWithIndicators, checkDisplayCondition, clearMultiLineComments, clearSingleLineComments, colors, conversionTemplate, convertFiltersToFormula, convertToFormulasChain, countExecutionsTemplate, createEscaper, createAggregationTemplate as createMeasureAggregationTemplate, curlyBracketsContentPattern, dashboardLinkRegExp, defaultActionsConfig, dimensionAggregationTemplates, dimensionTemplateFormulas, displayConditionTemplate, doubleQuoteContentPattern, durationTemplates, escapeCurlyBracketLinkName, escapeDoubleQuoteLinkName, eventMeasureTemplateFormulas, extendWithMeta, fillTemplateSql, formulaFilterMethods, generateColumnFormula, getColorByIndex, getDefaultSortOrders, getDimensionFormula, getDisplayConditionFormula, getEventMeasureFormula, getMeasureFormula, getParentMeta, getProcessDimensionValueFormula, getRuleColor, getTransitionMeasureFormula, hasInMetaChain, hexToRgb, inheritDisplayConditionFromHierarchy, interpolateHexColor, isDimensionProcessFilter, isDimensionsHierarchy, isFormulaFilterValue, isValidColor, mapDimensionsToInputs, mapEventMeasuresToInputs, mapFormulaFilterToCalculatorInput, mapFormulaFiltersToInputs, mapMeasuresToInputs, mapSettingsFiltersToInputs, mapSortingToInputs, mapTransitionMeasuresToInputs, measureInnerTemplateFormulas, measureTemplateFormulas, omitWithMeta, parseClickHouseType, parseIndicatorLink, prepareConversionParams, prepareDimensionAggregationParams, prepareDurationParams, prepareFormulaForSql, prepareMeasureAggregationParams, prepareSortOrders, prepareTimeParams, prepareValuesForSql, replaceDisplayCondition, replaceFiltersBySelection, replaceHierarchiesWithDimensions, selectDimensionFromHierarchy, themed, timeTemplates, transitionMeasureTemplateFormulas, unescapeSpecialCharacters, updateDefaultModeSelection, updateSingleModeSelection, workspaceLinkRegExp };
|