@divkitframework/jsonbuilder 32.61.0 → 33.0.0

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.
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var crypto = require('crypto');
6
4
 
7
5
  // Generated code. Do not modify.
@@ -734,7 +732,6 @@ class DivGallery {
734
732
  this.functions = props === null || props === void 0 ? void 0 : props.functions;
735
733
  this.height = props === null || props === void 0 ? void 0 : props.height;
736
734
  this.id = props === null || props === void 0 ? void 0 : props.id;
737
- this.infinite_scroll = props === null || props === void 0 ? void 0 : props.infinite_scroll;
738
735
  this.item_builder = props === null || props === void 0 ? void 0 : props.item_builder;
739
736
  this.item_spacing = props === null || props === void 0 ? void 0 : props.item_spacing;
740
737
  this.items = props === null || props === void 0 ? void 0 : props.items;
@@ -772,58 +769,58 @@ class DivGallery {
772
769
  class DivGifImage {
773
770
  constructor(props) {
774
771
  this.type = 'gif';
775
- this.accessibility = props.accessibility;
776
- this.action = props.action;
777
- this.action_animation = props.action_animation;
778
- this.actions = props.actions;
779
- this.alignment_horizontal = props.alignment_horizontal;
780
- this.alignment_vertical = props.alignment_vertical;
781
- this.alpha = props.alpha;
782
- this.animators = props.animators;
783
- this.aspect = props.aspect;
784
- this.background = props.background;
785
- this.border = props.border;
786
- this.capture_focus_on_action = props.capture_focus_on_action;
787
- this.column_span = props.column_span;
788
- this.content_alignment_horizontal = props.content_alignment_horizontal;
789
- this.content_alignment_vertical = props.content_alignment_vertical;
790
- this.disappear_actions = props.disappear_actions;
791
- this.doubletap_actions = props.doubletap_actions;
792
- this.extensions = props.extensions;
793
- this.focus = props.focus;
794
- this.functions = props.functions;
795
- this.gif_url = props.gif_url;
796
- this.height = props.height;
797
- this.hover_end_actions = props.hover_end_actions;
798
- this.hover_start_actions = props.hover_start_actions;
799
- this.id = props.id;
800
- this.layout_provider = props.layout_provider;
801
- this.longtap_actions = props.longtap_actions;
802
- this.margins = props.margins;
803
- this.paddings = props.paddings;
804
- this.placeholder_color = props.placeholder_color;
805
- this.preload_required = props.preload_required;
806
- this.press_end_actions = props.press_end_actions;
807
- this.press_start_actions = props.press_start_actions;
808
- this.preview = props.preview;
809
- this.preview_url = props.preview_url;
810
- this.reuse_id = props.reuse_id;
811
- this.row_span = props.row_span;
812
- this.scale = props.scale;
813
- this.selected_actions = props.selected_actions;
814
- this.tooltips = props.tooltips;
815
- this.transform = props.transform;
816
- this.transformations = props.transformations;
817
- this.transition_change = props.transition_change;
818
- this.transition_in = props.transition_in;
819
- this.transition_out = props.transition_out;
820
- this.transition_triggers = props.transition_triggers;
821
- this.variable_triggers = props.variable_triggers;
822
- this.variables = props.variables;
823
- this.visibility = props.visibility;
824
- this.visibility_action = props.visibility_action;
825
- this.visibility_actions = props.visibility_actions;
826
- this.width = props.width;
772
+ this.accessibility = props === null || props === void 0 ? void 0 : props.accessibility;
773
+ this.action = props === null || props === void 0 ? void 0 : props.action;
774
+ this.action_animation = props === null || props === void 0 ? void 0 : props.action_animation;
775
+ this.actions = props === null || props === void 0 ? void 0 : props.actions;
776
+ this.alignment_horizontal = props === null || props === void 0 ? void 0 : props.alignment_horizontal;
777
+ this.alignment_vertical = props === null || props === void 0 ? void 0 : props.alignment_vertical;
778
+ this.alpha = props === null || props === void 0 ? void 0 : props.alpha;
779
+ this.animators = props === null || props === void 0 ? void 0 : props.animators;
780
+ this.aspect = props === null || props === void 0 ? void 0 : props.aspect;
781
+ this.background = props === null || props === void 0 ? void 0 : props.background;
782
+ this.border = props === null || props === void 0 ? void 0 : props.border;
783
+ this.capture_focus_on_action = props === null || props === void 0 ? void 0 : props.capture_focus_on_action;
784
+ this.column_span = props === null || props === void 0 ? void 0 : props.column_span;
785
+ this.content_alignment_horizontal = props === null || props === void 0 ? void 0 : props.content_alignment_horizontal;
786
+ this.content_alignment_vertical = props === null || props === void 0 ? void 0 : props.content_alignment_vertical;
787
+ this.disappear_actions = props === null || props === void 0 ? void 0 : props.disappear_actions;
788
+ this.doubletap_actions = props === null || props === void 0 ? void 0 : props.doubletap_actions;
789
+ this.extensions = props === null || props === void 0 ? void 0 : props.extensions;
790
+ this.focus = props === null || props === void 0 ? void 0 : props.focus;
791
+ this.functions = props === null || props === void 0 ? void 0 : props.functions;
792
+ this.gif_url = props === null || props === void 0 ? void 0 : props.gif_url;
793
+ this.height = props === null || props === void 0 ? void 0 : props.height;
794
+ this.hover_end_actions = props === null || props === void 0 ? void 0 : props.hover_end_actions;
795
+ this.hover_start_actions = props === null || props === void 0 ? void 0 : props.hover_start_actions;
796
+ this.id = props === null || props === void 0 ? void 0 : props.id;
797
+ this.layout_provider = props === null || props === void 0 ? void 0 : props.layout_provider;
798
+ this.longtap_actions = props === null || props === void 0 ? void 0 : props.longtap_actions;
799
+ this.margins = props === null || props === void 0 ? void 0 : props.margins;
800
+ this.paddings = props === null || props === void 0 ? void 0 : props.paddings;
801
+ this.placeholder_color = props === null || props === void 0 ? void 0 : props.placeholder_color;
802
+ this.preload_required = props === null || props === void 0 ? void 0 : props.preload_required;
803
+ this.press_end_actions = props === null || props === void 0 ? void 0 : props.press_end_actions;
804
+ this.press_start_actions = props === null || props === void 0 ? void 0 : props.press_start_actions;
805
+ this.preview = props === null || props === void 0 ? void 0 : props.preview;
806
+ this.preview_url = props === null || props === void 0 ? void 0 : props.preview_url;
807
+ this.reuse_id = props === null || props === void 0 ? void 0 : props.reuse_id;
808
+ this.row_span = props === null || props === void 0 ? void 0 : props.row_span;
809
+ this.scale = props === null || props === void 0 ? void 0 : props.scale;
810
+ this.selected_actions = props === null || props === void 0 ? void 0 : props.selected_actions;
811
+ this.tooltips = props === null || props === void 0 ? void 0 : props.tooltips;
812
+ this.transform = props === null || props === void 0 ? void 0 : props.transform;
813
+ this.transformations = props === null || props === void 0 ? void 0 : props.transformations;
814
+ this.transition_change = props === null || props === void 0 ? void 0 : props.transition_change;
815
+ this.transition_in = props === null || props === void 0 ? void 0 : props.transition_in;
816
+ this.transition_out = props === null || props === void 0 ? void 0 : props.transition_out;
817
+ this.transition_triggers = props === null || props === void 0 ? void 0 : props.transition_triggers;
818
+ this.variable_triggers = props === null || props === void 0 ? void 0 : props.variable_triggers;
819
+ this.variables = props === null || props === void 0 ? void 0 : props.variables;
820
+ this.visibility = props === null || props === void 0 ? void 0 : props.visibility;
821
+ this.visibility_action = props === null || props === void 0 ? void 0 : props.visibility_action;
822
+ this.visibility_actions = props === null || props === void 0 ? void 0 : props.visibility_actions;
823
+ this.width = props === null || props === void 0 ? void 0 : props.width;
827
824
  }
828
825
  }
829
826
 
@@ -891,62 +888,62 @@ class DivGrid {
891
888
  class DivImage {
892
889
  constructor(props) {
893
890
  this.type = 'image';
894
- this.accessibility = props.accessibility;
895
- this.action = props.action;
896
- this.action_animation = props.action_animation;
897
- this.actions = props.actions;
898
- this.alignment_horizontal = props.alignment_horizontal;
899
- this.alignment_vertical = props.alignment_vertical;
900
- this.alpha = props.alpha;
901
- this.animators = props.animators;
902
- this.appearance_animation = props.appearance_animation;
903
- this.aspect = props.aspect;
904
- this.background = props.background;
905
- this.border = props.border;
906
- this.capture_focus_on_action = props.capture_focus_on_action;
907
- this.column_span = props.column_span;
908
- this.content_alignment_horizontal = props.content_alignment_horizontal;
909
- this.content_alignment_vertical = props.content_alignment_vertical;
910
- this.disappear_actions = props.disappear_actions;
911
- this.doubletap_actions = props.doubletap_actions;
912
- this.extensions = props.extensions;
913
- this.filters = props.filters;
914
- this.focus = props.focus;
915
- this.functions = props.functions;
916
- this.height = props.height;
917
- this.high_priority_preview_show = props.high_priority_preview_show;
918
- this.hover_end_actions = props.hover_end_actions;
919
- this.hover_start_actions = props.hover_start_actions;
920
- this.id = props.id;
921
- this.image_url = props.image_url;
922
- this.layout_provider = props.layout_provider;
923
- this.longtap_actions = props.longtap_actions;
924
- this.margins = props.margins;
925
- this.paddings = props.paddings;
926
- this.placeholder_color = props.placeholder_color;
927
- this.preload_required = props.preload_required;
928
- this.press_end_actions = props.press_end_actions;
929
- this.press_start_actions = props.press_start_actions;
930
- this.preview = props.preview;
931
- this.reuse_id = props.reuse_id;
932
- this.row_span = props.row_span;
933
- this.scale = props.scale;
934
- this.selected_actions = props.selected_actions;
935
- this.tint_color = props.tint_color;
936
- this.tint_mode = props.tint_mode;
937
- this.tooltips = props.tooltips;
938
- this.transform = props.transform;
939
- this.transformations = props.transformations;
940
- this.transition_change = props.transition_change;
941
- this.transition_in = props.transition_in;
942
- this.transition_out = props.transition_out;
943
- this.transition_triggers = props.transition_triggers;
944
- this.variable_triggers = props.variable_triggers;
945
- this.variables = props.variables;
946
- this.visibility = props.visibility;
947
- this.visibility_action = props.visibility_action;
948
- this.visibility_actions = props.visibility_actions;
949
- this.width = props.width;
891
+ this.accessibility = props === null || props === void 0 ? void 0 : props.accessibility;
892
+ this.action = props === null || props === void 0 ? void 0 : props.action;
893
+ this.action_animation = props === null || props === void 0 ? void 0 : props.action_animation;
894
+ this.actions = props === null || props === void 0 ? void 0 : props.actions;
895
+ this.alignment_horizontal = props === null || props === void 0 ? void 0 : props.alignment_horizontal;
896
+ this.alignment_vertical = props === null || props === void 0 ? void 0 : props.alignment_vertical;
897
+ this.alpha = props === null || props === void 0 ? void 0 : props.alpha;
898
+ this.animators = props === null || props === void 0 ? void 0 : props.animators;
899
+ this.appearance_animation = props === null || props === void 0 ? void 0 : props.appearance_animation;
900
+ this.aspect = props === null || props === void 0 ? void 0 : props.aspect;
901
+ this.background = props === null || props === void 0 ? void 0 : props.background;
902
+ this.border = props === null || props === void 0 ? void 0 : props.border;
903
+ this.capture_focus_on_action = props === null || props === void 0 ? void 0 : props.capture_focus_on_action;
904
+ this.column_span = props === null || props === void 0 ? void 0 : props.column_span;
905
+ this.content_alignment_horizontal = props === null || props === void 0 ? void 0 : props.content_alignment_horizontal;
906
+ this.content_alignment_vertical = props === null || props === void 0 ? void 0 : props.content_alignment_vertical;
907
+ this.disappear_actions = props === null || props === void 0 ? void 0 : props.disappear_actions;
908
+ this.doubletap_actions = props === null || props === void 0 ? void 0 : props.doubletap_actions;
909
+ this.extensions = props === null || props === void 0 ? void 0 : props.extensions;
910
+ this.filters = props === null || props === void 0 ? void 0 : props.filters;
911
+ this.focus = props === null || props === void 0 ? void 0 : props.focus;
912
+ this.functions = props === null || props === void 0 ? void 0 : props.functions;
913
+ this.height = props === null || props === void 0 ? void 0 : props.height;
914
+ this.high_priority_preview_show = props === null || props === void 0 ? void 0 : props.high_priority_preview_show;
915
+ this.hover_end_actions = props === null || props === void 0 ? void 0 : props.hover_end_actions;
916
+ this.hover_start_actions = props === null || props === void 0 ? void 0 : props.hover_start_actions;
917
+ this.id = props === null || props === void 0 ? void 0 : props.id;
918
+ this.image_url = props === null || props === void 0 ? void 0 : props.image_url;
919
+ this.layout_provider = props === null || props === void 0 ? void 0 : props.layout_provider;
920
+ this.longtap_actions = props === null || props === void 0 ? void 0 : props.longtap_actions;
921
+ this.margins = props === null || props === void 0 ? void 0 : props.margins;
922
+ this.paddings = props === null || props === void 0 ? void 0 : props.paddings;
923
+ this.placeholder_color = props === null || props === void 0 ? void 0 : props.placeholder_color;
924
+ this.preload_required = props === null || props === void 0 ? void 0 : props.preload_required;
925
+ this.press_end_actions = props === null || props === void 0 ? void 0 : props.press_end_actions;
926
+ this.press_start_actions = props === null || props === void 0 ? void 0 : props.press_start_actions;
927
+ this.preview = props === null || props === void 0 ? void 0 : props.preview;
928
+ this.reuse_id = props === null || props === void 0 ? void 0 : props.reuse_id;
929
+ this.row_span = props === null || props === void 0 ? void 0 : props.row_span;
930
+ this.scale = props === null || props === void 0 ? void 0 : props.scale;
931
+ this.selected_actions = props === null || props === void 0 ? void 0 : props.selected_actions;
932
+ this.tint_color = props === null || props === void 0 ? void 0 : props.tint_color;
933
+ this.tint_mode = props === null || props === void 0 ? void 0 : props.tint_mode;
934
+ this.tooltips = props === null || props === void 0 ? void 0 : props.tooltips;
935
+ this.transform = props === null || props === void 0 ? void 0 : props.transform;
936
+ this.transformations = props === null || props === void 0 ? void 0 : props.transformations;
937
+ this.transition_change = props === null || props === void 0 ? void 0 : props.transition_change;
938
+ this.transition_in = props === null || props === void 0 ? void 0 : props.transition_in;
939
+ this.transition_out = props === null || props === void 0 ? void 0 : props.transition_out;
940
+ this.transition_triggers = props === null || props === void 0 ? void 0 : props.transition_triggers;
941
+ this.variable_triggers = props === null || props === void 0 ? void 0 : props.variable_triggers;
942
+ this.variables = props === null || props === void 0 ? void 0 : props.variables;
943
+ this.visibility = props === null || props === void 0 ? void 0 : props.visibility;
944
+ this.visibility_action = props === null || props === void 0 ? void 0 : props.visibility_action;
945
+ this.visibility_actions = props === null || props === void 0 ? void 0 : props.visibility_actions;
946
+ this.width = props === null || props === void 0 ? void 0 : props.width;
950
947
  }
951
948
  }
952
949
 
@@ -1042,6 +1039,7 @@ class DivInput {
1042
1039
  this.accessibility = props.accessibility;
1043
1040
  this.alignment_horizontal = props.alignment_horizontal;
1044
1041
  this.alignment_vertical = props.alignment_vertical;
1042
+ this.allow_suggestions_bar = props.allow_suggestions_bar;
1045
1043
  this.alpha = props.alpha;
1046
1044
  this.animators = props.animators;
1047
1045
  this.autocapitalization = props.autocapitalization;
@@ -1062,7 +1060,6 @@ class DivInput {
1062
1060
  this.font_weight_value = props.font_weight_value;
1063
1061
  this.functions = props.functions;
1064
1062
  this.height = props.height;
1065
- this.hide_suggestions_bar = props.hide_suggestions_bar;
1066
1063
  this.highlight_color = props.highlight_color;
1067
1064
  this.hint_color = props.hint_color;
1068
1065
  this.hint_text = props.hint_text;
@@ -1307,6 +1304,7 @@ class DivPager {
1307
1304
  this.layout_mode = props.layout_mode;
1308
1305
  this.layout_provider = props.layout_provider;
1309
1306
  this.margins = props.margins;
1307
+ this.multi_page_scroll = props.multi_page_scroll;
1310
1308
  this.orientation = props.orientation;
1311
1309
  this.paddings = props.paddings;
1312
1310
  this.page_transformation = props.page_transformation;
@@ -2361,7 +2359,6 @@ function copyTemplates(templates) {
2361
2359
  return copy;
2362
2360
  }
2363
2361
 
2364
- /* eslint-disable @typescript-eslint/ban-types */
2365
2362
  class TemplatePropertyReference {
2366
2363
  constructor(name) {
2367
2364
  this.templatePropertyName = name;
@@ -2423,7 +2420,6 @@ function divCard(templates, card) {
2423
2420
  return new Card(templates, card);
2424
2421
  }
2425
2422
 
2426
- /* eslint-disable @typescript-eslint/ban-types */
2427
2423
  /**
2428
2424
  * Creates typed functions for templates instance construction
2429
2425
  * @param templates templates map of the form { template_name: template }
@@ -2532,6 +2528,7 @@ function thelperWithMemo(options) {
2532
2528
  get(_, templateName) {
2533
2529
  const templateRenamed = (options === null || options === void 0 ? void 0 : options.customName) ? options.customName(templateName) : templateName;
2534
2530
  used.add(templateName);
2531
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2535
2532
  return (props) => (Object.assign(Object.assign({}, props), { type: templateRenamed }));
2536
2533
  },
2537
2534
  };
@@ -2558,6 +2555,7 @@ function rewriteNames(templates, rename, resolvedNames = {}) {
2558
2555
  resolvedNames = runResolveDeps(templates, ({ name, template, depsResolved }) => {
2559
2556
  treeWalkDFS(template, (node) => {
2560
2557
  if (node instanceof TemplateBlock) {
2558
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2561
2559
  node.type = depsResolved[node.type];
2562
2560
  }
2563
2561
  });
@@ -2571,13 +2569,14 @@ function rewriteRefsTemplate(template) {
2571
2569
  while (stack.length > 0) {
2572
2570
  const obj = stack.pop();
2573
2571
  if (obj && typeof obj === 'object') {
2574
- for (const key in obj) {
2575
- const objChild = obj[key];
2572
+ const castedObj = obj;
2573
+ for (const key in castedObj) {
2574
+ const objChild = castedObj[key];
2576
2575
  if (objChild && typeof objChild === 'object') {
2577
2576
  if (objChild instanceof TemplatePropertyReference) {
2578
- obj[key] = undefined;
2577
+ castedObj[key] = undefined;
2579
2578
  if (objChild.templatePropertyName !== key) {
2580
- obj['$' + key] = objChild.templatePropertyName;
2579
+ castedObj['$' + key] = objChild.templatePropertyName;
2581
2580
  }
2582
2581
  }
2583
2582
  else {