@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/dist/index.js CHANGED
@@ -636,6 +636,26 @@ var WidgetSortingValueSchema = SchemaRegistry.define({
636
636
  },
637
637
  },
638
638
  });
639
+ var SortingValueSchema = SchemaRegistry.define({
640
+ key: "SortingValueSchema",
641
+ latestVersion: "19",
642
+ history: {
643
+ "19": function (z) {
644
+ return z.discriminatedUnion("mode", [
645
+ z.object({
646
+ mode: z.literal(exports.ESortingMode.BY_VALUES),
647
+ direction: SortDirectionSchema(z).default(exports.ESortDirection.ascend),
648
+ }),
649
+ z.object({
650
+ mode: z.literal(exports.ESortingMode.FORMULA),
651
+ direction: SortDirectionSchema(z).default(exports.ESortDirection.ascend),
652
+ formula: FormulaSchema.forVersion("17")(z),
653
+ dbDataType: z.string().optional(),
654
+ }),
655
+ ]);
656
+ },
657
+ },
658
+ });
639
659
 
640
660
  /** Ключи мета-данных внутри схем настроек */
641
661
  exports.ESettingsSchemaMetaKey = void 0;
@@ -646,7 +666,6 @@ exports.ESettingsSchemaMetaKey = void 0;
646
666
  ESettingsSchemaMetaKey["entity"] = "entity";
647
667
  })(exports.ESettingsSchemaMetaKey || (exports.ESettingsSchemaMetaKey = {}));
648
668
 
649
- var _a$7;
650
669
  var RangeSchema = SchemaRegistry.define({
651
670
  key: "Range",
652
671
  latestVersion: "17",
@@ -708,13 +727,12 @@ var EEntity;
708
727
  (function (EEntity) {
709
728
  EEntity["formula"] = "formula";
710
729
  })(EEntity || (EEntity = {}));
711
- var formulaMeta = Object.freeze((_a$7 = {}, _a$7[exports.ESettingsSchemaMetaKey.entity] = EEntity.formula, _a$7));
712
730
  /** Схема формулы */
713
731
  var FormulaSchema = SchemaRegistry.define({
714
732
  key: "Formula",
715
733
  latestVersion: "17",
716
734
  history: {
717
- "17": function (z) { return z.string().default("").meta(formulaMeta); },
735
+ "17": function (z) { return z.string().default(""); },
718
736
  },
719
737
  });
720
738
  /**
@@ -727,16 +745,88 @@ var FormulaNullableSchema = SchemaRegistry.define({
727
745
  key: "FormulaNullable",
728
746
  latestVersion: "17",
729
747
  history: {
730
- "17": function (z) { return z.string().nullable().default(null).meta(formulaMeta); },
748
+ "17": function (z) { return z.string().nullable().default(null); },
731
749
  },
732
750
  });
733
751
 
752
+ // NOTE: В будущем можно сделать fluent-обёртку для цепочных вызовов:
753
+ // withMetaDecorator(schema).omit({ field: true }).extend({ newField: z.string() })
754
+ // Это позволит избежать вложенных вызовов omitWithMeta/extendWithMeta.
755
+ var PARENT_META_KEY = "parent";
756
+ /**
757
+ * Возвращает родительскую мету схемы, установленную через extendWithMeta / omitWithMeta.
758
+ * Используй для обхода цепочки наследования схем.
759
+ */
760
+ function getParentMeta(meta) {
761
+ return meta[PARENT_META_KEY];
762
+ }
763
+ function inheritMeta(target, source) {
764
+ var _a;
765
+ var sourceMeta = source.meta();
766
+ return sourceMeta !== undefined ? target.meta((_a = {}, _a[PARENT_META_KEY] = sourceMeta, _a)) : target;
767
+ }
768
+ /**
769
+ * Расширяет Zod-схему дополнительными полями, сохраняя цепочку наследования мет.
770
+ *
771
+ * Мета базовой схемы сохраняется как `parent` в мете расширенной схемы — формируя
772
+ * иммутабельный связанный список.
773
+ *
774
+ * Используй вместо `.extend()` при расширении схем, задекларированных через
775
+ * `SchemaRegistry.define`, — это обязательное условие корректной работы миграций.
776
+ *
777
+ * @example
778
+ * // Вместо:
779
+ * DimensionSchema(z).extend({ color: ColorSchema(z) })
780
+ *
781
+ * // Используй:
782
+ * extendWithMeta(DimensionSchema(z), { color: ColorSchema(z) })
783
+ */
784
+ function extendWithMeta(schema, extension) {
785
+ return inheritMeta(schema.extend(extension), schema);
786
+ }
787
+ /**
788
+ * Создаёт Zod-схему с удалёнными полями, сохраняя цепочку наследования мет.
789
+ *
790
+ * Мета базовой схемы сохраняется как `parent` в мете результирующей схемы.
791
+ *
792
+ * Используй вместо `.omit()` при работе со схемами, задекларированными через
793
+ * `SchemaRegistry.define`, — это обязательное условие корректной работы миграций.
794
+ *
795
+ * @example
796
+ * // Вместо:
797
+ * BaseWidgetSettingsSchema(z).omit({ paddings: true })
798
+ *
799
+ * // Используй:
800
+ * omitWithMeta(BaseWidgetSettingsSchema(z), { paddings: true })
801
+ */
802
+ function omitWithMeta(schema, keys) {
803
+ return inheritMeta(schema.omit(keys), schema);
804
+ }
805
+ /**
806
+ * Проверяет, есть ли в цепочке наследования мет узел, удовлетворяющий предикату.
807
+ *
808
+ * Обходит цепочку от текущей меты к корню через ссылки parent, установленные
809
+ * функциями extendWithMeta / omitWithMeta.
810
+ *
811
+ * @example
812
+ * hasInMetaChain(schema.meta(), (meta) => meta.type === "WidgetDimension")
813
+ */
814
+ function hasInMetaChain(meta, predicate) {
815
+ var current = meta;
816
+ while (current !== undefined) {
817
+ if (predicate(current))
818
+ return true;
819
+ current = getParentMeta(current);
820
+ }
821
+ return false;
822
+ }
823
+
734
824
  var WidgetIndicatorSchema = SchemaRegistry.define({
735
825
  key: "WidgetIndicator",
736
826
  latestVersion: "17",
737
827
  history: {
738
828
  "17": function (z) {
739
- return AutoIdentifiedArrayItemSchema.forVersion("17")(z).extend({
829
+ return extendWithMeta(AutoIdentifiedArrayItemSchema.forVersion("17")(z), {
740
830
  name: z.string(),
741
831
  });
742
832
  },
@@ -787,7 +877,7 @@ var WidgetColumnIndicatorSchema = SchemaRegistry.define({
787
877
  latestVersion: "17",
788
878
  history: {
789
879
  "17": function (z) {
790
- return WidgetIndicatorSchema.forVersion("17")(z).extend({
880
+ return extendWithMeta(WidgetIndicatorSchema.forVersion("17")(z), {
791
881
  dbDataType: z.string().optional(),
792
882
  format: FormatSchema.forVersion("17")(z).optional(),
793
883
  formatting: FormattingSchema.forVersion("17")(z).optional(),
@@ -842,7 +932,7 @@ var MeasureValueSchema = SchemaRegistry.define({
842
932
  "17": function (z) {
843
933
  return z.discriminatedUnion("mode", [
844
934
  WidgetIndicatorFormulaValueSchema.forVersion("17")(z),
845
- WidgetIndicatorTemplateValueSchema.forVersion("17")(z).extend({
935
+ extendWithMeta(WidgetIndicatorTemplateValueSchema.forVersion("17")(z), {
846
936
  innerTemplateName: z.enum(exports.EMeasureInnerTemplateNames).optional(),
847
937
  }),
848
938
  ]);
@@ -856,7 +946,7 @@ var DimensionValueSchema = SchemaRegistry.define({
856
946
  "17": function (z) {
857
947
  return z.discriminatedUnion("mode", [
858
948
  WidgetIndicatorFormulaValueSchema.forVersion("17")(z),
859
- WidgetIndicatorTemplateValueSchema.forVersion("17")(z).extend({
949
+ extendWithMeta(WidgetIndicatorTemplateValueSchema.forVersion("17")(z), {
860
950
  innerTemplateName: z.never().optional(),
861
951
  }),
862
952
  ]);
@@ -890,7 +980,7 @@ var WidgetMeasureAggregationValueSchema = SchemaRegistry.define({
890
980
  latestVersion: "17",
891
981
  history: {
892
982
  "17": function (z) {
893
- return WidgetIndicatorAggregationValueSchema.forVersion("17")(z).extend({
983
+ return extendWithMeta(WidgetIndicatorAggregationValueSchema.forVersion("17")(z), {
894
984
  outerAggregation: z.enum(exports.EOuterAggregation),
895
985
  });
896
986
  },
@@ -922,11 +1012,11 @@ var WidgetDimensionSchema = SchemaRegistry.define({
922
1012
  latestVersion: "17",
923
1013
  history: {
924
1014
  "17": function (z) {
925
- return WidgetColumnIndicatorSchema.forVersion("17")(z).extend({
1015
+ return extendWithMeta(WidgetColumnIndicatorSchema.forVersion("17")(z), {
926
1016
  value: z
927
1017
  .discriminatedUnion("mode", [
928
1018
  DimensionValueSchema.forVersion("17")(z),
929
- WidgetIndicatorAggregationValueSchema.forVersion("17")(z).extend({
1019
+ extendWithMeta(WidgetIndicatorAggregationValueSchema.forVersion("17")(z), {
930
1020
  innerTemplateName: z.string().optional(),
931
1021
  }),
932
1022
  WidgetIndicatorTimeValueSchema.forVersion("17")(z),
@@ -941,7 +1031,9 @@ var WidgetDimensionInHierarchySchema = SchemaRegistry.define({
941
1031
  key: "WidgetDimensionInHierarchy",
942
1032
  latestVersion: "17",
943
1033
  history: {
944
- "17": function (z) { return WidgetDimensionSchema.forVersion("17")(z).omit({ displayCondition: true }); },
1034
+ "17": function (z) {
1035
+ return omitWithMeta(WidgetDimensionSchema.forVersion("17")(z), { displayCondition: true });
1036
+ },
945
1037
  },
946
1038
  });
947
1039
  var WidgetDimensionHierarchySchema = SchemaRegistry.define({
@@ -949,7 +1041,7 @@ var WidgetDimensionHierarchySchema = SchemaRegistry.define({
949
1041
  latestVersion: "17",
950
1042
  history: {
951
1043
  "17": function (z, dimensionSchema) {
952
- return AutoIdentifiedArrayItemSchema.forVersion("17")(z).extend({
1044
+ return extendWithMeta(AutoIdentifiedArrayItemSchema.forVersion("17")(z), {
953
1045
  name: z.string(),
954
1046
  // Для иерархии является дискриминатором, для него нельзя задавать дефолтное значение.
955
1047
  hierarchyDimensions: z.array(dimensionSchema),
@@ -987,7 +1079,7 @@ var WidgetIndicatorDurationValueSchema = SchemaRegistry.define({
987
1079
  latestVersion: "17",
988
1080
  history: {
989
1081
  "17": function (z) {
990
- return WidgetIndicatorConversionValueSchema.forVersion("17")(z).extend({
1082
+ return extendWithMeta(WidgetIndicatorConversionValueSchema.forVersion("17")(z), {
991
1083
  mode: z.literal(exports.EWidgetIndicatorValueModes.DURATION),
992
1084
  templateName: z.string(),
993
1085
  startEventAppearances: z.enum(exports.EEventAppearances),
@@ -1001,7 +1093,7 @@ var WidgetMeasureSchema = SchemaRegistry.define({
1001
1093
  latestVersion: "17",
1002
1094
  history: {
1003
1095
  "17": function (z) {
1004
- return WidgetColumnIndicatorSchema.forVersion("17")(z).extend({
1096
+ return extendWithMeta(WidgetColumnIndicatorSchema.forVersion("17")(z), {
1005
1097
  value: z
1006
1098
  .discriminatedUnion("mode", [
1007
1099
  MeasureValueSchema.forVersion("17")(z),
@@ -1019,7 +1111,7 @@ var MarkdownMeasureSchema = SchemaRegistry.define({
1019
1111
  latestVersion: "17",
1020
1112
  history: {
1021
1113
  "17": function (z) {
1022
- return WidgetMeasureSchema.forVersion("17")(z).extend({
1114
+ return extendWithMeta(WidgetMeasureSchema.forVersion("17")(z), {
1023
1115
  displaySign: z.enum(exports.EMarkdownDisplayMode).default(exports.EMarkdownDisplayMode.NONE),
1024
1116
  });
1025
1117
  },
@@ -1030,7 +1122,7 @@ var WidgetSortingIndicatorSchema = SchemaRegistry.define({
1030
1122
  latestVersion: "17",
1031
1123
  history: {
1032
1124
  "17": function (z) {
1033
- return WidgetIndicatorSchema.forVersion("17")(z).extend({
1125
+ return extendWithMeta(WidgetIndicatorSchema.forVersion("17")(z), {
1034
1126
  direction: SortDirectionSchema.forVersion("17")(z),
1035
1127
  value: WidgetSortingValueSchema.forVersion("17")(z),
1036
1128
  });
@@ -1061,7 +1153,7 @@ var ProcessIndicatorSchema = SchemaRegistry.define({
1061
1153
  latestVersion: "17",
1062
1154
  history: {
1063
1155
  "17": function (z) {
1064
- return WidgetIndicatorSchema.forVersion("17")(z).extend({
1156
+ return extendWithMeta(WidgetIndicatorSchema.forVersion("17")(z), {
1065
1157
  value: ProcessIndicatorValueSchema.forVersion("17")(z).optional(),
1066
1158
  dbDataType: z.string().optional(),
1067
1159
  format: FormatSchema.forVersion("17")(z).optional(),
@@ -1125,10 +1217,10 @@ var DimensionProcessFilterSchema = SchemaRegistry.define({
1125
1217
  "17": function (z) {
1126
1218
  return z.object({
1127
1219
  value: z.union([
1128
- WidgetIndicatorAggregationValueSchema.forVersion("17")(z).extend({
1220
+ extendWithMeta(WidgetIndicatorAggregationValueSchema.forVersion("17")(z), {
1129
1221
  outerAggregation: z.enum(exports.EOuterAggregation),
1130
1222
  }),
1131
- WidgetIndicatorAggregationValueSchema.forVersion("17")(z).extend({
1223
+ extendWithMeta(WidgetIndicatorAggregationValueSchema.forVersion("17")(z), {
1132
1224
  innerTemplateName: z.string().optional(),
1133
1225
  }),
1134
1226
  WidgetIndicatorTimeValueSchema.forVersion("17")(z),
@@ -1165,7 +1257,7 @@ var ActionOnClickParameterCommonSchema = SchemaRegistry.define({
1165
1257
  latestVersion: "17",
1166
1258
  history: {
1167
1259
  "17": function (z) {
1168
- return AutoIdentifiedArrayItemSchema.forVersion("17")(z).extend({
1260
+ return extendWithMeta(AutoIdentifiedArrayItemSchema.forVersion("17")(z), {
1169
1261
  name: z.string(),
1170
1262
  });
1171
1263
  },
@@ -1309,6 +1401,12 @@ var ParameterFromDynamicListSchema = SchemaRegistry.define({
1309
1401
  insertAnyValues: z.boolean().default(false),
1310
1402
  validation: FormulaSchema.forVersion("17")(z),
1311
1403
  acceptEmptyValue: z.boolean().default(false),
1404
+ sorting: SortingValueSchema.forVersion("19")(z)
1405
+ .default({
1406
+ direction: exports.ESortDirection.ascend,
1407
+ mode: exports.ESortingMode.BY_VALUES,
1408
+ })
1409
+ .optional(),
1312
1410
  });
1313
1411
  },
1314
1412
  },
@@ -1356,7 +1454,7 @@ var ActionCommonSchema = SchemaRegistry.define({
1356
1454
  latestVersion: "17",
1357
1455
  history: {
1358
1456
  "17": function (z) {
1359
- return AutoIdentifiedArrayItemSchema.forVersion("17")(z).extend({
1457
+ return extendWithMeta(AutoIdentifiedArrayItemSchema.forVersion("17")(z), {
1360
1458
  name: z.string(),
1361
1459
  });
1362
1460
  },
@@ -1367,7 +1465,7 @@ var ActionDrillDownSchema = SchemaRegistry.define({
1367
1465
  latestVersion: "17",
1368
1466
  history: {
1369
1467
  "17": function (z) {
1370
- return ActionCommonSchema.forVersion("17")(z).extend({
1468
+ return extendWithMeta(ActionCommonSchema.forVersion("17")(z), {
1371
1469
  type: z.literal(exports.EActionTypes.DRILL_DOWN),
1372
1470
  variables: z.array(ActionOnClickParameterSchema.forVersion("17")(z)).default([]),
1373
1471
  });
@@ -1379,7 +1477,7 @@ var ActionGoToURLSchema = SchemaRegistry.define({
1379
1477
  latestVersion: "17",
1380
1478
  history: {
1381
1479
  "17": function (z) {
1382
- return ActionCommonSchema.forVersion("17")(z).extend({
1480
+ return extendWithMeta(ActionCommonSchema.forVersion("17")(z), {
1383
1481
  type: z.literal(exports.EActionTypes.OPEN_URL),
1384
1482
  url: z.string(),
1385
1483
  newWindow: z.boolean().default(true),
@@ -1414,7 +1512,7 @@ var ActionRunScriptSchema = SchemaRegistry.define({
1414
1512
  latestVersion: "17",
1415
1513
  history: {
1416
1514
  "17": function (z) {
1417
- return ActionCommonSchema.forVersion("17")(z).extend({
1515
+ return extendWithMeta(ActionCommonSchema.forVersion("17")(z), {
1418
1516
  type: z.literal(exports.EActionTypes.EXECUTE_SCRIPT),
1419
1517
  parameters: z.array(ActionOnClickParameterSchema.forVersion("17")(z)).default([]),
1420
1518
  scriptKey: z.string(),
@@ -1433,7 +1531,7 @@ var ActionUpdateVariableSchema = SchemaRegistry.define({
1433
1531
  latestVersion: "17",
1434
1532
  history: {
1435
1533
  "17": function (z) {
1436
- return ActionCommonSchema.forVersion("17")(z).extend({
1534
+ return extendWithMeta(ActionCommonSchema.forVersion("17")(z), {
1437
1535
  type: z.literal(exports.EActionTypes.UPDATE_VARIABLE),
1438
1536
  variables: z.array(ActionOnClickParameterSchema.forVersion("17")(z)).default([]),
1439
1537
  });
@@ -1474,7 +1572,7 @@ var ActionOpenViewCommonSchema = SchemaRegistry.define({
1474
1572
  latestVersion: "17",
1475
1573
  history: {
1476
1574
  "17": function (z) {
1477
- return ActionCommonSchema.forVersion("17")(z).extend({
1575
+ return extendWithMeta(ActionCommonSchema.forVersion("17")(z), {
1478
1576
  type: z.literal(exports.EActionTypes.OPEN_VIEW),
1479
1577
  variables: z.array(ActionOnClickParameterSchema.forVersion("17")(z)).default([]),
1480
1578
  });
@@ -1487,18 +1585,18 @@ var ActionOpenViewSchema = SchemaRegistry.define({
1487
1585
  history: {
1488
1586
  "17": function (z) {
1489
1587
  return z.intersection(z.discriminatedUnion("mode", [
1490
- ActionOpenViewCommonSchema.forVersion("17")(z).extend({
1588
+ extendWithMeta(ActionOpenViewCommonSchema.forVersion("17")(z), {
1491
1589
  mode: z.literal(exports.EViewMode.GENERATED_BY_SCRIPT),
1492
1590
  scriptKey: z.string().optional(),
1493
1591
  parameters: z.array(ActionOnClickParameterSchema.forVersion("17")(z)).default([]),
1494
1592
  displayName: z.string().default(""),
1495
1593
  }),
1496
- ActionOpenViewCommonSchema.forVersion("17")(z).extend({
1594
+ extendWithMeta(ActionOpenViewCommonSchema.forVersion("17")(z), {
1497
1595
  mode: z.literal(exports.EViewMode.EXISTED_VIEW),
1498
1596
  viewKey: z.string().optional(),
1499
1597
  parameters: z.array(ActionOnClickParameterSchema.forVersion("17")(z)).default([]),
1500
1598
  }),
1501
- ActionOpenViewCommonSchema.forVersion("17")(z).extend({
1599
+ extendWithMeta(ActionOpenViewCommonSchema.forVersion("17")(z), {
1502
1600
  mode: z.literal(exports.EViewMode.EMPTY),
1503
1601
  placeholderName: z.string().optional(),
1504
1602
  openIn: z.literal(exports.EViewOpenIn.PLACEHOLDER),
@@ -1527,7 +1625,7 @@ var WidgetActionParameterCommonSchema = SchemaRegistry.define({
1527
1625
  latestVersion: "17",
1528
1626
  history: {
1529
1627
  "17": function (z) {
1530
- return AutoIdentifiedArrayItemSchema.forVersion("17")(z).extend({
1628
+ return extendWithMeta(AutoIdentifiedArrayItemSchema.forVersion("17")(z), {
1531
1629
  name: z.string(),
1532
1630
  displayName: z.string().default(""),
1533
1631
  isHidden: z.boolean().default(false),
@@ -1558,7 +1656,7 @@ var WidgetActionSchema = SchemaRegistry.define({
1558
1656
  latestVersion: "17",
1559
1657
  history: {
1560
1658
  "17": function (z) {
1561
- return ActionCommonSchema.forVersion("17")(z).extend({
1659
+ return extendWithMeta(ActionCommonSchema.forVersion("17")(z), {
1562
1660
  parameters: z.array(WidgetActionParameterSchema.forVersion("17")(z)).default([]),
1563
1661
  type: z.literal(exports.EActionTypes.EXECUTE_SCRIPT),
1564
1662
  scriptKey: z.string(),
@@ -1578,7 +1676,7 @@ var ViewActionParameterSchema = SchemaRegistry.define({
1578
1676
  latestVersion: "17",
1579
1677
  history: {
1580
1678
  "17": function (z) {
1581
- return z.intersection(AutoIdentifiedArrayItemSchema.forVersion("17")(z).extend({ name: z.string() }), z.discriminatedUnion("inputMethod", [
1679
+ return z.intersection(extendWithMeta(AutoIdentifiedArrayItemSchema.forVersion("17")(z), { name: z.string() }), z.discriminatedUnion("inputMethod", [
1582
1680
  ParameterFromAggregationSchema.forVersion("17")(z),
1583
1681
  ParameterFromVariableSchema.forVersion("17")(z),
1584
1682
  ]));
@@ -1590,7 +1688,7 @@ var ViewActionSchema = SchemaRegistry.define({
1590
1688
  latestVersion: "17",
1591
1689
  history: {
1592
1690
  "17": function (z) {
1593
- return AutoIdentifiedArrayItemSchema.forVersion("17")(z).extend({
1691
+ return extendWithMeta(AutoIdentifiedArrayItemSchema.forVersion("17")(z), {
1594
1692
  name: z.string(),
1595
1693
  buttonType: z.enum(exports.EActionButtonsTypes).default(exports.EActionButtonsTypes.BASE),
1596
1694
  type: z.literal(exports.EActionTypes.EXECUTE_SCRIPT).default(exports.EActionTypes.EXECUTE_SCRIPT),
@@ -1621,7 +1719,7 @@ var ActionButtonSchema = SchemaRegistry.define({
1621
1719
  latestVersion: "17",
1622
1720
  history: {
1623
1721
  "17": function (z) {
1624
- return AutoIdentifiedArrayItemSchema.forVersion("17")(z).extend({
1722
+ return extendWithMeta(AutoIdentifiedArrayItemSchema.forVersion("17")(z), {
1625
1723
  name: z.string(),
1626
1724
  onClick: z.array(WidgetActionSchema.forVersion("17")(z)).default([]),
1627
1725
  buttonType: z.enum(exports.EActionButtonsTypes).default(exports.EActionButtonsTypes.BASE),
@@ -2874,6 +2972,11 @@ exports.ESortDirection = void 0;
2874
2972
  ESortDirection["ASC"] = "ascend";
2875
2973
  ESortDirection["DESC"] = "descend";
2876
2974
  })(exports.ESortDirection || (exports.ESortDirection = {}));
2975
+ exports.ESortingMode = void 0;
2976
+ (function (ESortingMode) {
2977
+ ESortingMode["BY_VALUES"] = "BY_VALUES";
2978
+ ESortingMode["FORMULA"] = "FORMULA";
2979
+ })(exports.ESortingMode || (exports.ESortingMode = {}));
2877
2980
 
2878
2981
  /**
2879
2982
  * Выбрать активный разрез иерархии на основе активных фильтров.
@@ -3081,6 +3184,8 @@ exports.EControlType = void 0;
3081
3184
  * Ввод цветов для событий процесса.
3082
3185
  */
3083
3186
  EControlType["eventsColor"] = "eventsColor";
3187
+ /** Сортировка */
3188
+ EControlType["sorting"] = "sorting";
3084
3189
  })(exports.EControlType || (exports.EControlType = {}));
3085
3190
  exports.EUnitMode = void 0;
3086
3191
  (function (EUnitMode) {
@@ -3596,6 +3701,7 @@ exports.SchemaRegistryReader = SchemaRegistryReader;
3596
3701
  exports.SettingsFilterSchema = SettingsFilterSchema;
3597
3702
  exports.SortDirectionSchema = SortDirectionSchema;
3598
3703
  exports.SortOrderSchema = SortOrderSchema;
3704
+ exports.SortingValueSchema = SortingValueSchema;
3599
3705
  exports.VersionedSchemaFactory = VersionedSchemaFactory;
3600
3706
  exports.ViewActionParameterSchema = ViewActionParameterSchema;
3601
3707
  exports.ViewActionSchema = ViewActionSchema;
@@ -3644,6 +3750,7 @@ exports.durationTemplates = durationTemplates;
3644
3750
  exports.escapeCurlyBracketLinkName = escapeCurlyBracketLinkName;
3645
3751
  exports.escapeDoubleQuoteLinkName = escapeDoubleQuoteLinkName;
3646
3752
  exports.eventMeasureTemplateFormulas = eventMeasureTemplateFormulas;
3753
+ exports.extendWithMeta = extendWithMeta;
3647
3754
  exports.fillTemplateSql = fillTemplateSql;
3648
3755
  exports.formulaFilterMethods = formulaFilterMethods;
3649
3756
  exports.generateColumnFormula = generateColumnFormula;
@@ -3653,9 +3760,11 @@ exports.getDimensionFormula = getDimensionFormula;
3653
3760
  exports.getDisplayConditionFormula = getDisplayConditionFormula;
3654
3761
  exports.getEventMeasureFormula = getEventMeasureFormula;
3655
3762
  exports.getMeasureFormula = getMeasureFormula;
3763
+ exports.getParentMeta = getParentMeta;
3656
3764
  exports.getProcessDimensionValueFormula = getProcessDimensionValueFormula;
3657
3765
  exports.getRuleColor = getRuleColor;
3658
3766
  exports.getTransitionMeasureFormula = getTransitionMeasureFormula;
3767
+ exports.hasInMetaChain = hasInMetaChain;
3659
3768
  exports.hexToRgb = hexToRgb;
3660
3769
  exports.inheritDisplayConditionFromHierarchy = inheritDisplayConditionFromHierarchy;
3661
3770
  exports.interpolateHexColor = interpolateHexColor;
@@ -3673,6 +3782,7 @@ exports.mapSortingToInputs = mapSortingToInputs;
3673
3782
  exports.mapTransitionMeasuresToInputs = mapTransitionMeasuresToInputs;
3674
3783
  exports.measureInnerTemplateFormulas = measureInnerTemplateFormulas;
3675
3784
  exports.measureTemplateFormulas = measureTemplateFormulas;
3785
+ exports.omitWithMeta = omitWithMeta;
3676
3786
  exports.parseClickHouseType = parseClickHouseType;
3677
3787
  exports.parseIndicatorLink = parseIndicatorLink;
3678
3788
  exports.prepareConversionParams = prepareConversionParams;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infomaximum/widget-sdk",
3
- "version": "7.0.0-17",
3
+ "version": "7.0.0-19",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",
@@ -12,7 +12,7 @@
12
12
  "sideEffects": false,
13
13
  "scripts": {
14
14
  "build": "rollup -c",
15
- "lint": "tsc --noEmit",
15
+ "lint": "tsc --noEmit && eslint src --ext .ts",
16
16
  "release": "standard-version",
17
17
  "release:rc": "standard-version -p",
18
18
  "release:prev": "node ./scripts/re-release.mjs",
@@ -37,6 +37,9 @@
37
37
  "@rollup/plugin-typescript": "11.1.5",
38
38
  "@types/jest": "^29.5.14",
39
39
  "@types/semver": "^7.7.0",
40
+ "@typescript-eslint/eslint-plugin": "^8",
41
+ "@typescript-eslint/parser": "^8",
42
+ "eslint": "^8",
40
43
  "core-js": "^3.38.0",
41
44
  "jest": "^29.7.0",
42
45
  "prettier": "3.2.5",