UNPKG

@divkitframework/jsonbuilder

Version:

DivKit TypeScript JSON Builder

1,359 lines (1,281 loc) 93.4 kB
import { createHash } from 'crypto'; // Generated code. Do not modify. class ArrayValue { constructor(props) { this.type = 'array'; this.value = props.value; } } // Generated code. Do not modify. /** * An arbitrary array in JSON format. */ class ArrayVariable { constructor(props) { this.type = 'array'; this.name = props.name; this.value = props.value; } } // Generated code. Do not modify. class BooleanValue { constructor(props) { this.type = 'boolean'; this.value = props.value; } } // Generated code. Do not modify. /** * A Boolean variable in binary format. */ class BooleanVariable { constructor(props) { this.type = 'boolean'; this.name = props.name; this.value = props.value; } } // Generated code. Do not modify. class ColorValue { constructor(props) { this.type = 'color'; this.value = props.value; } } // Generated code. Do not modify. /** * Variable — HEX color as a string. */ class ColorVariable { constructor(props) { this.type = 'color'; this.name = props.name; this.value = props.value; } } // Generated code. Do not modify. class ContentText { constructor(props) { this.type = 'text'; this.value = props.value; } } // Generated code. Do not modify. class ContentUrl { constructor(props) { this.type = 'url'; this.value = props.value; } } // Generated code. Do not modify. class DictValue { constructor(props) { this.type = 'dict'; this.value = props.value; } } // Generated code. Do not modify. /** * An arbitrary object in JSON format. */ class DictVariable { constructor(props) { this.type = 'dict'; this.name = props.name; this.value = props.value; } } // Generated code. Do not modify. /** * Launches the specified animator. */ class DivActionAnimatorStart { constructor(props) { this.type = 'animator_start'; this.animator_id = props.animator_id; this.direction = props.direction; this.duration = props.duration; this.end_value = props.end_value; this.interpolator = props.interpolator; this.repeat_count = props.repeat_count; this.start_delay = props.start_delay; this.start_value = props.start_value; } } // Generated code. Do not modify. /** * Stops the specified animator. */ class DivActionAnimatorStop { constructor(props) { this.type = 'animator_stop'; this.animator_id = props.animator_id; } } // Generated code. Do not modify. /** * Adds a value to the array */ class DivActionArrayInsertValue { constructor(props) { this.type = 'array_insert_value'; this.index = props.index; this.value = props.value; this.variable_name = props.variable_name; } } // Generated code. Do not modify. /** * Deletes a value from the array */ class DivActionArrayRemoveValue { constructor(props) { this.type = 'array_remove_value'; this.index = props.index; this.variable_name = props.variable_name; } } // Generated code. Do not modify. /** * Sets the value in the array by index. */ class DivActionArraySetValue { constructor(props) { this.type = 'array_set_value'; this.index = props.index; this.value = props.value; this.variable_name = props.variable_name; } } // Generated code. Do not modify. /** * Removes focus from an element. */ class DivActionClearFocus { constructor(props) { this.type = 'clear_focus'; } } // Generated code. Do not modify. /** * Copies data to the clipboard. */ class DivActionCopyToClipboard { constructor(props) { this.type = 'copy_to_clipboard'; this.content = props.content; } } // Generated code. Do not modify. /** * Sets the value in the dictionary by the specified key. Deletes the key if the value is not * set. */ class DivActionDictSetValue { constructor(props) { this.type = 'dict_set_value'; this.key = props.key; this.value = props.value; this.variable_name = props.variable_name; } } // Generated code. Do not modify. /** * Loads additional data in `div-patch` format and updates the current element. */ class DivActionDownload { constructor(props) { this.type = 'download'; this.on_fail_actions = props.on_fail_actions; this.on_success_actions = props.on_success_actions; this.url = props.url; } } // Generated code. Do not modify. /** * Requests focus for an element. May require a user action on the web. */ class DivActionFocusElement { constructor(props) { this.type = 'focus_element'; this.element_id = props.element_id; } } // Generated code. Do not modify. /** * Hides the tooltip. */ class DivActionHideTooltip { constructor(props) { this.type = 'hide_tooltip'; this.id = props.id; } } // Generated code. Do not modify. /** * Scrolls the container by `item_count` or `offset` starting from the current position. If both * values are specified, the action will be combined. For scrolling back, use negative values. */ class DivActionScrollBy { constructor(props) { this.type = 'scroll_by'; this.animated = props.animated; this.id = props.id; this.item_count = props.item_count; this.offset = props.offset; this.overflow = props.overflow; } } // Generated code. Do not modify. /** * Scrolls to a position or switches to the container element specified by the `destination` * parameter. */ class DivActionScrollTo { constructor(props) { this.type = 'scroll_to'; this.animated = props.animated; this.destination = props.destination; this.id = props.id; } } // Generated code. Do not modify. /** * Applies a new appearance to the content in `div-state'. */ class DivActionSetState { constructor(props) { this.type = 'set_state'; this.state_id = props.state_id; this.temporary = props.temporary; } } // Generated code. Do not modify. /** * Temporarily saves the variable in storage. */ class DivActionSetStoredValue { constructor(props) { this.type = 'set_stored_value'; this.lifetime = props.lifetime; this.name = props.name; this.value = props.value; } } // Generated code. Do not modify. /** * Assigns a value to the variable */ class DivActionSetVariable { constructor(props) { this.type = 'set_variable'; this.value = props.value; this.variable_name = props.variable_name; } } // Generated code. Do not modify. /** * Shows the tooltip. */ class DivActionShowTooltip { constructor(props) { this.type = 'show_tooltip'; this.id = props.id; this.multiple = props.multiple; } } // Generated code. Do not modify. /** * Sends variables from the container by link. Data sending configuration can be defined by the * host app. By default, variables are sent as JSON in the request body using the POST method. */ class DivActionSubmit { constructor(props) { this.type = 'submit'; this.container_id = props.container_id; this.on_fail_actions = props.on_fail_actions; this.on_success_actions = props.on_success_actions; this.request = props.request; } } // Generated code. Do not modify. /** * Controls the timer. */ class DivActionTimer { constructor(props) { this.type = 'timer'; this.action = props.action; this.id = props.id; } } // Generated code. Do not modify. /** * Set values ​​in a variable of type array or dictionary with different nesting. */ class DivActionUpdateStructure { constructor(props) { this.type = 'update_structure'; this.path = props.path; this.value = props.value; this.variable_name = props.variable_name; } } // Generated code. Do not modify. /** * Manages video playback. */ class DivActionVideo { constructor(props) { this.type = 'video'; this.action = props.action; this.id = props.id; } } // Generated code. Do not modify. /** * A set of animations to be applied simultaneously. */ class DivAppearanceSetTransition { constructor(props) { this.type = 'set'; this.items = props.items; } } // Generated code. Do not modify. /** * Gaussian image blur. */ class DivBlur { constructor(props) { this.type = 'blur'; this.radius = props.radius; } } // Generated code. Do not modify. /** * Element position and size change animation. */ class DivChangeBoundsTransition { constructor(props) { this.type = 'change_bounds'; this.duration = props === null || props === void 0 ? void 0 : props.duration; this.interpolator = props === null || props === void 0 ? void 0 : props.interpolator; this.start_delay = props === null || props === void 0 ? void 0 : props.start_delay; } } // Generated code. Do not modify. /** * Animations. */ class DivChangeSetTransition { constructor(props) { this.type = 'set'; this.items = props.items; } } // Generated code. Do not modify. /** * Circle. */ class DivCircleShape { constructor(props) { this.type = 'circle'; this.background_color = props === null || props === void 0 ? void 0 : props.background_color; this.radius = props === null || props === void 0 ? void 0 : props.radius; this.stroke = props === null || props === void 0 ? void 0 : props.stroke; } } // Generated code. Do not modify. /** * Cloud-style text background. Rows have a rectangular background in the specified color with * rounded corners. */ class DivCloudBackground { constructor(props) { this.type = 'cloud'; this.color = props.color; this.corner_radius = props.corner_radius; this.paddings = props.paddings; } } // Generated code. Do not modify. /** * Color animator. */ class DivColorAnimator { constructor(props) { this.type = 'color_animator'; this.cancel_actions = props.cancel_actions; this.direction = props.direction; this.duration = props.duration; this.end_actions = props.end_actions; this.end_value = props.end_value; this.id = props.id; this.interpolator = props.interpolator; this.repeat_count = props.repeat_count; this.start_delay = props.start_delay; this.start_value = props.start_value; this.variable_name = props.variable_name; } } // Generated code. Do not modify. /** * Container. It contains other elements and is responsible for their location. It is used to * arrange elements vertically, horizontally, and with an overlay in a certain order, simulating * the third dimension. */ class DivContainer { constructor(props) { this.type = 'container'; this.accessibility = props === null || props === void 0 ? void 0 : props.accessibility; this.action = props === null || props === void 0 ? void 0 : props.action; this.action_animation = props === null || props === void 0 ? void 0 : props.action_animation; this.actions = props === null || props === void 0 ? void 0 : props.actions; this.alignment_horizontal = props === null || props === void 0 ? void 0 : props.alignment_horizontal; this.alignment_vertical = props === null || props === void 0 ? void 0 : props.alignment_vertical; this.alpha = props === null || props === void 0 ? void 0 : props.alpha; this.animators = props === null || props === void 0 ? void 0 : props.animators; this.aspect = props === null || props === void 0 ? void 0 : props.aspect; this.background = props === null || props === void 0 ? void 0 : props.background; this.border = props === null || props === void 0 ? void 0 : props.border; this.capture_focus_on_action = props === null || props === void 0 ? void 0 : props.capture_focus_on_action; this.clip_to_bounds = props === null || props === void 0 ? void 0 : props.clip_to_bounds; this.column_span = props === null || props === void 0 ? void 0 : props.column_span; this.content_alignment_horizontal = props === null || props === void 0 ? void 0 : props.content_alignment_horizontal; this.content_alignment_vertical = props === null || props === void 0 ? void 0 : props.content_alignment_vertical; this.disappear_actions = props === null || props === void 0 ? void 0 : props.disappear_actions; this.doubletap_actions = props === null || props === void 0 ? void 0 : props.doubletap_actions; this.extensions = props === null || props === void 0 ? void 0 : props.extensions; this.focus = props === null || props === void 0 ? void 0 : props.focus; this.functions = props === null || props === void 0 ? void 0 : props.functions; this.height = props === null || props === void 0 ? void 0 : props.height; this.hover_end_actions = props === null || props === void 0 ? void 0 : props.hover_end_actions; this.hover_start_actions = props === null || props === void 0 ? void 0 : props.hover_start_actions; this.id = props === null || props === void 0 ? void 0 : props.id; this.item_builder = props === null || props === void 0 ? void 0 : props.item_builder; this.items = props === null || props === void 0 ? void 0 : props.items; this.layout_mode = props === null || props === void 0 ? void 0 : props.layout_mode; this.layout_provider = props === null || props === void 0 ? void 0 : props.layout_provider; this.line_separator = props === null || props === void 0 ? void 0 : props.line_separator; this.longtap_actions = props === null || props === void 0 ? void 0 : props.longtap_actions; this.margins = props === null || props === void 0 ? void 0 : props.margins; this.orientation = props === null || props === void 0 ? void 0 : props.orientation; this.paddings = props === null || props === void 0 ? void 0 : props.paddings; this.press_end_actions = props === null || props === void 0 ? void 0 : props.press_end_actions; this.press_start_actions = props === null || props === void 0 ? void 0 : props.press_start_actions; this.reuse_id = props === null || props === void 0 ? void 0 : props.reuse_id; this.row_span = props === null || props === void 0 ? void 0 : props.row_span; this.selected_actions = props === null || props === void 0 ? void 0 : props.selected_actions; this.separator = props === null || props === void 0 ? void 0 : props.separator; this.tooltips = props === null || props === void 0 ? void 0 : props.tooltips; this.transform = props === null || props === void 0 ? void 0 : props.transform; this.transition_change = props === null || props === void 0 ? void 0 : props.transition_change; this.transition_in = props === null || props === void 0 ? void 0 : props.transition_in; this.transition_out = props === null || props === void 0 ? void 0 : props.transition_out; this.transition_triggers = props === null || props === void 0 ? void 0 : props.transition_triggers; this.variable_triggers = props === null || props === void 0 ? void 0 : props.variable_triggers; this.variables = props === null || props === void 0 ? void 0 : props.variables; this.visibility = props === null || props === void 0 ? void 0 : props.visibility; this.visibility_action = props === null || props === void 0 ? void 0 : props.visibility_action; this.visibility_actions = props === null || props === void 0 ? void 0 : props.visibility_actions; this.width = props === null || props === void 0 ? void 0 : props.width; } } // Generated code. Do not modify. /** * Mask for entering currency in the specified regional format. */ class DivCurrencyInputMask { constructor(props) { this.type = 'currency'; this.locale = props.locale; this.raw_text_variable = props.raw_text_variable; } } // Generated code. Do not modify. /** * Custom element. It is delegated to a host application to create native elements depending on * the platform. */ class DivCustom { constructor(props) { this.type = 'custom'; this.accessibility = props.accessibility; this.alignment_horizontal = props.alignment_horizontal; this.alignment_vertical = props.alignment_vertical; this.alpha = props.alpha; this.animators = props.animators; this.background = props.background; this.border = props.border; this.column_span = props.column_span; this.custom_props = props.custom_props; this.custom_type = props.custom_type; this.disappear_actions = props.disappear_actions; this.extensions = props.extensions; this.focus = props.focus; this.functions = props.functions; this.height = props.height; this.id = props.id; this.items = props.items; this.layout_provider = props.layout_provider; this.margins = props.margins; this.paddings = props.paddings; this.reuse_id = props.reuse_id; this.row_span = props.row_span; this.selected_actions = props.selected_actions; this.tooltips = props.tooltips; this.transform = props.transform; this.transition_change = props.transition_change; this.transition_in = props.transition_in; this.transition_out = props.transition_out; this.transition_triggers = props.transition_triggers; this.variable_triggers = props.variable_triggers; this.variables = props.variables; this.visibility = props.visibility; this.visibility_action = props.visibility_action; this.visibility_actions = props.visibility_actions; this.width = props.width; } } // Generated code. Do not modify. /** * Element size adjusts to a parent element. */ class DivDefaultIndicatorItemPlacement { constructor(props) { this.type = 'default'; this.space_between_centers = props === null || props === void 0 ? void 0 : props.space_between_centers; } } // Generated code. Do not modify. /** * Transparency animation. */ class DivFadeTransition { constructor(props) { this.type = 'fade'; this.alpha = props === null || props === void 0 ? void 0 : props.alpha; this.duration = props === null || props === void 0 ? void 0 : props.duration; this.interpolator = props === null || props === void 0 ? void 0 : props.interpolator; this.start_delay = props === null || props === void 0 ? void 0 : props.start_delay; } } // Generated code. Do not modify. /** * Mirrors an image if the system uses RTL (Right-to-Left) text direction. */ class DivFilterRtlMirror { constructor(props) { this.type = 'rtl_mirror'; } } // Generated code. Do not modify. /** * Fixed number of repetitions. */ class DivFixedCount { constructor(props) { this.type = 'fixed'; this.value = props.value; } } // Generated code. Do not modify. /** * Mask for entering text with a fixed number of characters. */ class DivFixedLengthInputMask { constructor(props) { this.type = 'fixed_length'; this.always_visible = props.always_visible; this.pattern = props.pattern; this.pattern_elements = props.pattern_elements; this.raw_text_variable = props.raw_text_variable; } } // Generated code. Do not modify. /** * Fixed size of an element. */ class DivFixedSize { constructor(props) { this.type = 'fixed'; this.unit = props.unit; this.value = props.value; } } // Generated code. Do not modify. /** * Gallery. It contains a horizontal or vertical set of cards that can be scrolled. */ class DivGallery { constructor(props) { this.type = 'gallery'; this.accessibility = props === null || props === void 0 ? void 0 : props.accessibility; this.alignment_horizontal = props === null || props === void 0 ? void 0 : props.alignment_horizontal; this.alignment_vertical = props === null || props === void 0 ? void 0 : props.alignment_vertical; this.alpha = props === null || props === void 0 ? void 0 : props.alpha; this.animators = props === null || props === void 0 ? void 0 : props.animators; this.background = props === null || props === void 0 ? void 0 : props.background; this.border = props === null || props === void 0 ? void 0 : props.border; this.column_count = props === null || props === void 0 ? void 0 : props.column_count; this.column_span = props === null || props === void 0 ? void 0 : props.column_span; this.cross_content_alignment = props === null || props === void 0 ? void 0 : props.cross_content_alignment; this.cross_spacing = props === null || props === void 0 ? void 0 : props.cross_spacing; this.default_item = props === null || props === void 0 ? void 0 : props.default_item; this.disappear_actions = props === null || props === void 0 ? void 0 : props.disappear_actions; this.extensions = props === null || props === void 0 ? void 0 : props.extensions; this.focus = props === null || props === void 0 ? void 0 : props.focus; this.functions = props === null || props === void 0 ? void 0 : props.functions; this.height = props === null || props === void 0 ? void 0 : props.height; this.id = props === null || props === void 0 ? void 0 : props.id; this.item_builder = props === null || props === void 0 ? void 0 : props.item_builder; this.item_spacing = props === null || props === void 0 ? void 0 : props.item_spacing; this.items = props === null || props === void 0 ? void 0 : props.items; this.layout_provider = props === null || props === void 0 ? void 0 : props.layout_provider; this.margins = props === null || props === void 0 ? void 0 : props.margins; this.orientation = props === null || props === void 0 ? void 0 : props.orientation; this.paddings = props === null || props === void 0 ? void 0 : props.paddings; this.restrict_parent_scroll = props === null || props === void 0 ? void 0 : props.restrict_parent_scroll; this.reuse_id = props === null || props === void 0 ? void 0 : props.reuse_id; this.row_span = props === null || props === void 0 ? void 0 : props.row_span; this.scroll_mode = props === null || props === void 0 ? void 0 : props.scroll_mode; this.scrollbar = props === null || props === void 0 ? void 0 : props.scrollbar; this.selected_actions = props === null || props === void 0 ? void 0 : props.selected_actions; this.tooltips = props === null || props === void 0 ? void 0 : props.tooltips; this.transform = props === null || props === void 0 ? void 0 : props.transform; this.transition_change = props === null || props === void 0 ? void 0 : props.transition_change; this.transition_in = props === null || props === void 0 ? void 0 : props.transition_in; this.transition_out = props === null || props === void 0 ? void 0 : props.transition_out; this.transition_triggers = props === null || props === void 0 ? void 0 : props.transition_triggers; this.variable_triggers = props === null || props === void 0 ? void 0 : props.variable_triggers; this.variables = props === null || props === void 0 ? void 0 : props.variables; this.visibility = props === null || props === void 0 ? void 0 : props.visibility; this.visibility_action = props === null || props === void 0 ? void 0 : props.visibility_action; this.visibility_actions = props === null || props === void 0 ? void 0 : props.visibility_actions; this.width = props === null || props === void 0 ? void 0 : props.width; } } // Generated code. Do not modify. /** * Animated GIF image. */ class DivGifImage { constructor(props) { this.type = 'gif'; this.accessibility = props.accessibility; this.action = props.action; this.action_animation = props.action_animation; this.actions = props.actions; this.alignment_horizontal = props.alignment_horizontal; this.alignment_vertical = props.alignment_vertical; this.alpha = props.alpha; this.animators = props.animators; this.aspect = props.aspect; this.background = props.background; this.border = props.border; this.capture_focus_on_action = props.capture_focus_on_action; this.column_span = props.column_span; this.content_alignment_horizontal = props.content_alignment_horizontal; this.content_alignment_vertical = props.content_alignment_vertical; this.disappear_actions = props.disappear_actions; this.doubletap_actions = props.doubletap_actions; this.extensions = props.extensions; this.focus = props.focus; this.functions = props.functions; this.gif_url = props.gif_url; this.height = props.height; this.hover_end_actions = props.hover_end_actions; this.hover_start_actions = props.hover_start_actions; this.id = props.id; this.layout_provider = props.layout_provider; this.longtap_actions = props.longtap_actions; this.margins = props.margins; this.paddings = props.paddings; this.placeholder_color = props.placeholder_color; this.preload_required = props.preload_required; this.press_end_actions = props.press_end_actions; this.press_start_actions = props.press_start_actions; this.preview = props.preview; this.reuse_id = props.reuse_id; this.row_span = props.row_span; this.scale = props.scale; this.selected_actions = props.selected_actions; this.tooltips = props.tooltips; this.transform = props.transform; this.transition_change = props.transition_change; this.transition_in = props.transition_in; this.transition_out = props.transition_out; this.transition_triggers = props.transition_triggers; this.variable_triggers = props.variable_triggers; this.variables = props.variables; this.visibility = props.visibility; this.visibility_action = props.visibility_action; this.visibility_actions = props.visibility_actions; this.width = props.width; } } // Generated code. Do not modify. /** * A grid with an option to merge cells vertically and horizontally. */ class DivGrid { constructor(props) { this.type = 'grid'; this.accessibility = props.accessibility; this.action = props.action; this.action_animation = props.action_animation; this.actions = props.actions; this.alignment_horizontal = props.alignment_horizontal; this.alignment_vertical = props.alignment_vertical; this.alpha = props.alpha; this.animators = props.animators; this.background = props.background; this.border = props.border; this.capture_focus_on_action = props.capture_focus_on_action; this.column_count = props.column_count; this.column_span = props.column_span; this.content_alignment_horizontal = props.content_alignment_horizontal; this.content_alignment_vertical = props.content_alignment_vertical; this.disappear_actions = props.disappear_actions; this.doubletap_actions = props.doubletap_actions; this.extensions = props.extensions; this.focus = props.focus; this.functions = props.functions; this.height = props.height; this.hover_end_actions = props.hover_end_actions; this.hover_start_actions = props.hover_start_actions; this.id = props.id; this.items = props.items; this.layout_provider = props.layout_provider; this.longtap_actions = props.longtap_actions; this.margins = props.margins; this.paddings = props.paddings; this.press_end_actions = props.press_end_actions; this.press_start_actions = props.press_start_actions; this.reuse_id = props.reuse_id; this.row_span = props.row_span; this.selected_actions = props.selected_actions; this.tooltips = props.tooltips; this.transform = props.transform; this.transition_change = props.transition_change; this.transition_in = props.transition_in; this.transition_out = props.transition_out; this.transition_triggers = props.transition_triggers; this.variable_triggers = props.variable_triggers; this.variables = props.variables; this.visibility = props.visibility; this.visibility_action = props.visibility_action; this.visibility_actions = props.visibility_actions; this.width = props.width; } } // Generated code. Do not modify. /** * Image. */ class DivImage { constructor(props) { this.type = 'image'; this.accessibility = props.accessibility; this.action = props.action; this.action_animation = props.action_animation; this.actions = props.actions; this.alignment_horizontal = props.alignment_horizontal; this.alignment_vertical = props.alignment_vertical; this.alpha = props.alpha; this.animators = props.animators; this.appearance_animation = props.appearance_animation; this.aspect = props.aspect; this.background = props.background; this.border = props.border; this.capture_focus_on_action = props.capture_focus_on_action; this.column_span = props.column_span; this.content_alignment_horizontal = props.content_alignment_horizontal; this.content_alignment_vertical = props.content_alignment_vertical; this.disappear_actions = props.disappear_actions; this.doubletap_actions = props.doubletap_actions; this.extensions = props.extensions; this.filters = props.filters; this.focus = props.focus; this.functions = props.functions; this.height = props.height; this.high_priority_preview_show = props.high_priority_preview_show; this.hover_end_actions = props.hover_end_actions; this.hover_start_actions = props.hover_start_actions; this.id = props.id; this.image_url = props.image_url; this.layout_provider = props.layout_provider; this.longtap_actions = props.longtap_actions; this.margins = props.margins; this.paddings = props.paddings; this.placeholder_color = props.placeholder_color; this.preload_required = props.preload_required; this.press_end_actions = props.press_end_actions; this.press_start_actions = props.press_start_actions; this.preview = props.preview; this.reuse_id = props.reuse_id; this.row_span = props.row_span; this.scale = props.scale; this.selected_actions = props.selected_actions; this.tint_color = props.tint_color; this.tint_mode = props.tint_mode; this.tooltips = props.tooltips; this.transform = props.transform; this.transition_change = props.transition_change; this.transition_in = props.transition_in; this.transition_out = props.transition_out; this.transition_triggers = props.transition_triggers; this.variable_triggers = props.variable_triggers; this.variables = props.variables; this.visibility = props.visibility; this.visibility_action = props.visibility_action; this.visibility_actions = props.visibility_actions; this.width = props.width; } } // Generated code. Do not modify. /** * Background image. */ class DivImageBackground { constructor(props) { this.type = 'image'; this.alpha = props.alpha; this.content_alignment_horizontal = props.content_alignment_horizontal; this.content_alignment_vertical = props.content_alignment_vertical; this.filters = props.filters; this.image_url = props.image_url; this.preload_required = props.preload_required; this.scale = props.scale; } } // Generated code. Do not modify. /** * Progress indicator for [pager](div-pager.md). */ class DivIndicator { constructor(props) { this.type = 'indicator'; this.accessibility = props === null || props === void 0 ? void 0 : props.accessibility; this.active_item_color = props === null || props === void 0 ? void 0 : props.active_item_color; this.active_item_size = props === null || props === void 0 ? void 0 : props.active_item_size; this.active_shape = props === null || props === void 0 ? void 0 : props.active_shape; this.alignment_horizontal = props === null || props === void 0 ? void 0 : props.alignment_horizontal; this.alignment_vertical = props === null || props === void 0 ? void 0 : props.alignment_vertical; this.alpha = props === null || props === void 0 ? void 0 : props.alpha; this.animation = props === null || props === void 0 ? void 0 : props.animation; this.animators = props === null || props === void 0 ? void 0 : props.animators; this.background = props === null || props === void 0 ? void 0 : props.background; this.border = props === null || props === void 0 ? void 0 : props.border; this.column_span = props === null || props === void 0 ? void 0 : props.column_span; this.disappear_actions = props === null || props === void 0 ? void 0 : props.disappear_actions; this.extensions = props === null || props === void 0 ? void 0 : props.extensions; this.focus = props === null || props === void 0 ? void 0 : props.focus; this.functions = props === null || props === void 0 ? void 0 : props.functions; this.height = props === null || props === void 0 ? void 0 : props.height; this.id = props === null || props === void 0 ? void 0 : props.id; this.inactive_item_color = props === null || props === void 0 ? void 0 : props.inactive_item_color; this.inactive_minimum_shape = props === null || props === void 0 ? void 0 : props.inactive_minimum_shape; this.inactive_shape = props === null || props === void 0 ? void 0 : props.inactive_shape; this.items_placement = props === null || props === void 0 ? void 0 : props.items_placement; this.layout_provider = props === null || props === void 0 ? void 0 : props.layout_provider; this.margins = props === null || props === void 0 ? void 0 : props.margins; this.minimum_item_size = props === null || props === void 0 ? void 0 : props.minimum_item_size; this.paddings = props === null || props === void 0 ? void 0 : props.paddings; this.pager_id = props === null || props === void 0 ? void 0 : props.pager_id; this.reuse_id = props === null || props === void 0 ? void 0 : props.reuse_id; this.row_span = props === null || props === void 0 ? void 0 : props.row_span; this.selected_actions = props === null || props === void 0 ? void 0 : props.selected_actions; this.shape = props === null || props === void 0 ? void 0 : props.shape; this.space_between_centers = props === null || props === void 0 ? void 0 : props.space_between_centers; this.tooltips = props === null || props === void 0 ? void 0 : props.tooltips; this.transform = props === null || props === void 0 ? void 0 : props.transform; this.transition_change = props === null || props === void 0 ? void 0 : props.transition_change; this.transition_in = props === null || props === void 0 ? void 0 : props.transition_in; this.transition_out = props === null || props === void 0 ? void 0 : props.transition_out; this.transition_triggers = props === null || props === void 0 ? void 0 : props.transition_triggers; this.variable_triggers = props === null || props === void 0 ? void 0 : props.variable_triggers; this.variables = props === null || props === void 0 ? void 0 : props.variables; this.visibility = props === null || props === void 0 ? void 0 : props.visibility; this.visibility_action = props === null || props === void 0 ? void 0 : props.visibility_action; this.visibility_actions = props === null || props === void 0 ? void 0 : props.visibility_actions; this.width = props === null || props === void 0 ? void 0 : props.width; } } // Generated code. Do not modify. /** * Infinite number of repetitions. */ class DivInfinityCount { constructor(props) { this.type = 'infinity'; } } // Generated code. Do not modify. /** * Text input element. */ class DivInput { constructor(props) { this.type = 'input'; this.accessibility = props.accessibility; this.alignment_horizontal = props.alignment_horizontal; this.alignment_vertical = props.alignment_vertical; this.alpha = props.alpha; this.animators = props.animators; this.autocapitalization = props.autocapitalization; this.background = props.background; this.border = props.border; this.column_span = props.column_span; this.disappear_actions = props.disappear_actions; this.enter_key_actions = props.enter_key_actions; this.enter_key_type = props.enter_key_type; this.extensions = props.extensions; this.filters = props.filters; this.focus = props.focus; this.font_family = props.font_family; this.font_size = props.font_size; this.font_size_unit = props.font_size_unit; this.font_variation_settings = props.font_variation_settings; this.font_weight = props.font_weight; this.font_weight_value = props.font_weight_value; this.functions = props.functions; this.height = props.height; this.highlight_color = props.highlight_color; this.hint_color = props.hint_color; this.hint_text = props.hint_text; this.id = props.id; this.is_enabled = props.is_enabled; this.keyboard_type = props.keyboard_type; this.layout_provider = props.layout_provider; this.letter_spacing = props.letter_spacing; this.line_height = props.line_height; this.margins = props.margins; this.mask = props.mask; this.max_length = props.max_length; this.max_visible_lines = props.max_visible_lines; this.native_interface = props.native_interface; this.paddings = props.paddings; this.reuse_id = props.reuse_id; this.row_span = props.row_span; this.select_all_on_focus = props.select_all_on_focus; this.selected_actions = props.selected_actions; this.text_alignment_horizontal = props.text_alignment_horizontal; this.text_alignment_vertical = props.text_alignment_vertical; this.text_color = props.text_color; this.text_variable = props.text_variable; this.tooltips = props.tooltips; this.transform = props.transform; this.transition_change = props.transition_change; this.transition_in = props.transition_in; this.transition_out = props.transition_out; this.transition_triggers = props.transition_triggers; this.validators = props.validators; this.variable_triggers = props.variable_triggers; this.variables = props.variables; this.visibility = props.visibility; this.visibility_action = props.visibility_action; this.visibility_actions = props.visibility_actions; this.width = props.width; } } // Generated code. Do not modify. /** * Filter based on [calculated expressions](../../expressions). */ class DivInputFilterExpression { constructor(props) { this.type = 'expression'; this.condition = props.condition; } } // Generated code. Do not modify. /** * Filter based on regular expressions. */ class DivInputFilterRegex { constructor(props) { this.type = 'regex'; this.pattern = props.pattern; } } // Generated code. Do not modify. /** * [Calculated expression](../../expressions) validator. */ class DivInputValidatorExpression { constructor(props) { this.type = 'expression'; this.allow_empty = props.allow_empty; this.condition = props.condition; this.label_id = props.label_id; this.variable = props.variable; } } // Generated code. Do not modify. /** * Regex validator. */ class DivInputValidatorRegex { constructor(props) { this.type = 'regex'; this.allow_empty = props.allow_empty; this.label_id = props.label_id; this.pattern = props.pattern; this.variable = props.variable; } } // Generated code. Do not modify. /** * Linear gradient. */ class DivLinearGradient { constructor(props) { this.type = 'gradient'; this.angle = props === null || props === void 0 ? void 0 : props.angle; this.color_map = props === null || props === void 0 ? void 0 : props.color_map; this.colors = props === null || props === void 0 ? void 0 : props.colors; } } // Generated code. Do not modify. /** * Element size adjusts to a parent element. */ class DivMatchParentSize { constructor(props) { this.type = 'match_parent'; this.weight = props === null || props === void 0 ? void 0 : props.weight; } } // Generated code. Do not modify. /** * Fixed width value of the visible part of a neighbouring page. */ class DivNeighbourPageSize { constructor(props) { this.type = 'fixed'; this.neighbour_page_width = props.neighbour_page_width; } } // Generated code. Do not modify. /** * Image in 9-patch format (https://developer.android.com/studio/write/draw9patch). */ class DivNinePatchBackground { constructor(props) { this.type = 'nine_patch_image'; this.image_url = props.image_url; this.insets = props.insets; } } // Generated code. Do not modify. /** * Numeric value animator. */ class DivNumberAnimator { constructor(props) { this.type = 'number_animator'; this.cancel_actions = props.cancel_actions; this.direction = props.direction; this.duration = props.duration; this.end_actions = props.end_actions; this.end_value = props.end_value; this.id = props.id; this.interpolator = props.interpolator; this.repeat_count = props.repeat_count; this.start_delay = props.start_delay; this.start_value = props.start_value; this.variable_name = props.variable_name; } } // Generated code. Do not modify. /** * The page size is equal to the size of its content. */ class DivPageContentSize { constructor(props) { this.type = 'wrap_content'; } } // Generated code. Do not modify. /** * Page width (%). */ class DivPageSize { constructor(props) { this.type = 'percentage'; this.page_width = props.page_width; } } // Generated code. Do not modify. /** * Pages are stacked during animation overlapping one another. */ class DivPageTransformationOverlap { constructor(props) { this.type = 'overlap'; this.interpolator = props === null || props === void 0 ? void 0 : props.interpolator; this.next_page_alpha = props === null || props === void 0 ? void 0 : props.next_page_alpha; this.next_page_scale = props === null || props === void 0 ? void 0 : props.next_page_scale; this.previous_page_alpha = props === null || props === void 0 ? void 0 : props.previous_page_alpha; this.previous_page_scale = props === null || props === void 0 ? void 0 : props.previous_page_scale; this.reversed_stacking_order = props === null || props === void 0 ? void 0 : props.reversed_stacking_order; } } // Generated code. Do not modify. /** * Pages move without overlapping during pager scrolling. */ class DivPageTransformationSlide { constructor(props) { this.type = 'slide'; this.interpolator = props === null || props === void 0 ? void 0 : props.interpolator; this.next_page_alpha = props === null || props === void 0 ? void 0 : props.next_page_alpha; this.next_page_scale = props === null || props === void 0 ? void 0 : props.next_page_scale; this.previous_page_alpha = props === null || props === void 0 ? void 0 : props.previous_page_alpha; this.previous_page_scale = props === null || props === void 0 ? void 0 : props.previous_page_scale; } } // Generated code. Do not modify. /** * Pager. It contains a horizontal set of cards that can be scrolled page by page. It shows the * main page and the beginning of the next one. */ class DivPager { constructor(props) { this.type = 'pager'; this.accessibility = props.accessibility; this.alignment_horizontal = props.alignment_horizontal; this.alignment_vertical = props.alignment_vertical; this.alpha = props.alpha; this.animators = props.animators; this.background = props.background; this.border = props.border; this.column_span = props.column_span; this.cross_axis_alignment = props.cross_axis_alignment; this.default_item = props.default_item; this.disappear_actions = props.disappear_actions; this.extensions = props.extensions; this.focus = props.focus; this.functions = props.functions; this.height = props.height; this.id = props.id; this.infinite_scroll = props.infinite_scroll; this.item_builder = props.item_builder; this.item_spacing = props.item_spacing; this.items = props.items; this.layout_mode = props.layout_mode; this.layout_provider = props.layout_provider; this.margins = props.margins; this.orientation = props.orientation; this.paddings = props.paddings; this.page_transformation = props.page_transformation; this.restrict_parent_scroll = props.restrict_parent_scroll; this.reuse_id = props.reuse_id; this.row_span = props.row_span; this.scroll_axis_alignment = props.scroll_axis_alignment; this.selected_actions = props.selected_actions; this.tooltips = props.tooltips; this.transform = props.transform; this.transition_change = props.transition_change; this.transition_in = props.transition_in; this.transition_out = props.transition_out; this.transition_triggers = props.transition_triggers; this.variable_triggers = props.variable_triggers; this.variables = props.variables; this.visibility = props.visibility; this.visibility_action = props.visibility_action; this.visibility_actions = props.visibility_actions; this.width = props.width; } } // Generated code. Do not modify. /** * Element size (%). */ class DivPercentageSize { constructor(props) { this.type = 'percentage'; this.value = props.value; } } // Generated code. Do not modify. /** * Mask for entering phone numbers with dynamic regional format identification. */ class DivPhoneInputMask { constructor(props) { this.type = 'phone'; this.raw_text_variable = props.raw_text_variable; } } // Generated code. Do not modify. /** * Fixed coordinates of the rotation axis. */ class DivPivotFixed { constructor(props) { this.type = 'pivot-fixed'; this.unit = props === null || props === void 0 ? void 0 : props.unit; this.value = props === null || props === void 0 ? void 0 : props.value; } } // Generated code. Do not modify. /** * Location of the coordinate of the rotation axis as a percentage relative to the element size. */ class DivPivotPercentage { constructor(props) { this.type = 'pivot-percentage'; this.value = props.value; } } // Generated code. Do not modify. /** * Radial gradient. */ class DivRadialGradient { constructor(props) { this.type = 'radial_gradient'; this.center_x = props === null || props === void 0 ? void 0 : props.center_x; this.center_y = props === null || props === void 0 ? void 0 : props.center_y; this.color_map = props === null || props === void 0 ? void 0 : props.color_map; this.colors = props === null || props === void 0 ? void 0 : props.colors; this.radius = props === null || props === void 0 ? void 0 : props.radius; } } // Generated code. Do not modify. /** * Fixed coordinates of the central point of the gradient. */ class DivRadialGradientFixedCenter { constructor(props) { this.type = 'fixed'; this.unit = props.unit; this.value = props.value; } } // Generated code. Do not modify. /** * Location of the central point of the gradient relative to the element borders. */ class DivRadialGradientRelativeCenter { constructor(props) { this.type = 'relative'; this.value = props.value; } } // Generated code. Do not modify. /** * Relative radius of the gradient transition. */ class DivRadialGradientRelativeRadius { constructor(props) { this.type = 'relative'; this.value = props.value; } } // Generated code. Do not modify. /** * A re